diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 00000000..1afcaaf5 --- /dev/null +++ b/.eslintignore @@ -0,0 +1 @@ +charting_library \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index d6fcad50..76187753 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,20 +10,19 @@ "dependencies": { "@casl/ability": "4.1.6", "@casl/vue": "1.1.1", - "@cosmjs/amino": "^0.26.0", - "@cosmjs/crypto": "^0.26.0", - "@cosmjs/encoding": "^0.26.0", - "@cosmjs/launchpad": "^0.26.0", - "@cosmjs/ledger-amino": "^0.26.0", - "@cosmjs/math": "^0.26.0", - "@cosmjs/proto-signing": "^0.26.0", - "@cosmjs/stargate": "0.26.0", + "@cosmjs/amino": "^0.26.5", + "@cosmjs/crypto": "^0.26.5", + "@cosmjs/encoding": "^0.26.5", + "@cosmjs/launchpad": "^0.26.5", + "@cosmjs/ledger-amino": "^0.26.5", + "@cosmjs/math": "^0.26.5", + "@cosmjs/proto-signing": "^0.26.5", + "@cosmjs/stargate": "0.26.5", "@cosmostation/cosmosjs": "^0.10.6", "@intlify/vue-i18n-loader": "^2.1.2", "@ledgerhq/hw-app-cosmos": "^6.3.0", "@ledgerhq/hw-transport-web-ble": "^6.3.0", "@ledgerhq/hw-transport-webusb": "^6.3.0", - "@vue/composition-api": "1.0.0-beta.22", "@vueuse/core": "4.0.0", "animate.css": "4.1.1", "apexcharts": "3.24.0", @@ -40,10 +39,14 @@ "leaflet": "1.6.0", "ledger-cosmos-js": "2.1.8", "node-fetch": "^2.6.1", + "pako": "^1.0.11", "portal-vue": "2.1.7", "postcss-rtl": "1.7.3", "prismjs": "1.24.0", + "protobufjs-cli-dbx": "^7.0.7", + "protobufjs-dbx": "^7.0.0", "swiper": "6.5.1", + "trading-vue-js": "^1.0.2", "uuid": "8.3.2", "vee-validate": "3.4.5", "vue": "2.x", @@ -59,7 +62,6 @@ "vue-flatpickr-component": "8.1.6", "vue-flex-waterfall": "^1.0.7", "vue-form-wizard": "0.8.4", - "vue-gtag": "^1.16.1", "vue-i18n": "8.22.2", "vue-loader": "^15.9.6", "vue-perfect-scrollbar": "0.2.1", @@ -91,7 +93,7 @@ "eslint-plugin-vue": "6.2.2", "sass": "1.32.*", "sass-loader": "^10.1.0", - "vue-cli-plugin-tauri": "~1.0.0-beta.3", + "vue-cli-plugin-tauri": "~1.0.0-beta.6", "vue-template-compiler": "2.x" } }, @@ -563,7 +565,6 @@ "version": "7.14.7", "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.14.7.tgz", "integrity": "sha512-X67Z5y+VBJuHB/RjwECp8kSl5uYi0BvRbNeWqkaJCVh+LiTPl19WBUfG627psSgp9rSf6ojuXghQM3ha6qHHdA==", - "dev": true, "bin": { "parser": "bin/babel-parser.js" }, @@ -1806,24 +1807,24 @@ } }, "node_modules/@cosmjs/amino": { - "version": "0.26.1", - "resolved": "https://registry.npmjs.org/@cosmjs/amino/-/amino-0.26.1.tgz", - "integrity": "sha512-8jcEwsLrLW2ltJdNQzdbx+g6Ii9lgG3j7hqaSatnqJE+8OyUjjLH1beigrpz9PhRF3qzQS8WFweTNkkTgNEcSA==", + "version": "0.26.5", + "resolved": "https://registry.npmjs.org/@cosmjs/amino/-/amino-0.26.5.tgz", + "integrity": "sha512-RFf9P1eb7O60JEWaZ5jbQA0wVbwU4SiBJINEjZkhkB1vUrAxCkfSHBZdJrVg8+IIRSWxPUUVr8PMuIyWlORV3A==", "dependencies": { - "@cosmjs/crypto": "0.26.1", - "@cosmjs/encoding": "0.26.1", - "@cosmjs/math": "0.26.1", - "@cosmjs/utils": "0.26.1" + "@cosmjs/crypto": "0.26.5", + "@cosmjs/encoding": "0.26.5", + "@cosmjs/math": "0.26.5", + "@cosmjs/utils": "0.26.5" } }, "node_modules/@cosmjs/crypto": { - "version": "0.26.1", - "resolved": "https://registry.npmjs.org/@cosmjs/crypto/-/crypto-0.26.1.tgz", - "integrity": "sha512-KzX++HMvCYjekdYr6vRRfJmAzJvdB10nRSyudzirn4/055yKh9oKk/wgjq9QGOIrMzEZNoQJNE0RndbS3nRccA==", + "version": "0.26.5", + "resolved": "https://registry.npmjs.org/@cosmjs/crypto/-/crypto-0.26.5.tgz", + "integrity": "sha512-ab7+qR/gdRi/DIdOLrjyimRdyD/2K/JdpRaFY1bl6Drr3ktVjDQrGsv53THvHONy33yCwD+YS+328ayQRv/pQA==", "dependencies": { - "@cosmjs/encoding": "0.26.1", - "@cosmjs/math": "0.26.1", - "@cosmjs/utils": "0.26.1", + "@cosmjs/encoding": "0.26.5", + "@cosmjs/math": "0.26.5", + "@cosmjs/utils": "0.26.5", "bip39": "^3.0.2", "bn.js": "^4.11.8", "elliptic": "^6.5.3", @@ -1834,9 +1835,9 @@ } }, "node_modules/@cosmjs/encoding": { - "version": "0.26.1", - "resolved": "https://registry.npmjs.org/@cosmjs/encoding/-/encoding-0.26.1.tgz", - "integrity": "sha512-wDFRvSQrTVIX7k4dPPSS/NmaytTU8ludDXi06TsaqVrgL/OR1hcGEkHhoKjodhZ2NS4gLvncI8XagV3SFySGhA==", + "version": "0.26.5", + "resolved": "https://registry.npmjs.org/@cosmjs/encoding/-/encoding-0.26.5.tgz", + "integrity": "sha512-lkw2mLvDZJqVCOZCBqdMzoGUtC4CN7c4+WMCGKDej3TpC0khsv7KZ1eFcsnN6EuZwHyGH67uyyjrs5x0ah9rYg==", "dependencies": { "base64-js": "^1.3.0", "bech32": "^1.1.4", @@ -1844,24 +1845,24 @@ } }, "node_modules/@cosmjs/json-rpc": { - "version": "0.26.0", - "resolved": "https://registry.npmjs.org/@cosmjs/json-rpc/-/json-rpc-0.26.0.tgz", - "integrity": "sha512-Jc+O0fDZjb8bxKSwH8SG9lJxV/y6lN4bYhiUqHNU6AUDUD9wzVr1mPgMudCJQ1DkQrgz8dQg2cDwgFp6eN428g==", + "version": "0.26.5", + "resolved": "https://registry.npmjs.org/@cosmjs/json-rpc/-/json-rpc-0.26.5.tgz", + "integrity": "sha512-SFGm5MlY54v3I26hXThwVteh91U+/DKS+KGqFL5lPLHZ2EHxggASqhKMiTJBMJVUDWvnmv1ikjFndkWNhpTPNw==", "dependencies": { - "@cosmjs/stream": "0.26.0", + "@cosmjs/stream": "0.26.5", "xstream": "^11.14.0" } }, "node_modules/@cosmjs/launchpad": { - "version": "0.26.1", - "resolved": "https://registry.npmjs.org/@cosmjs/launchpad/-/launchpad-0.26.1.tgz", - "integrity": "sha512-RCwBRbIBAJa3AsjLTjGHHUWmq1eIoAIinQLz0BJ1FF9FI1WuAjlwr/m9KRGhoNZvMeEzAtQvxNFxFzL+BOotEQ==", + "version": "0.26.5", + "resolved": "https://registry.npmjs.org/@cosmjs/launchpad/-/launchpad-0.26.5.tgz", + "integrity": "sha512-V+9bLlvlybm9TeqXAoD10KxFHK5exoUYHIoKdj03g78E2oOn82bLRMNs9ti5UtWWOzIe9suyv5/OvunTSlvA7Q==", "dependencies": { - "@cosmjs/amino": "0.26.1", - "@cosmjs/crypto": "0.26.1", - "@cosmjs/encoding": "0.26.1", - "@cosmjs/math": "0.26.1", - "@cosmjs/utils": "0.26.1", + "@cosmjs/amino": "0.26.5", + "@cosmjs/crypto": "0.26.5", + "@cosmjs/encoding": "0.26.5", + "@cosmjs/math": "0.26.5", + "@cosmjs/utils": "0.26.5", "axios": "^0.21.2", "fast-deep-equal": "^3.1.3" } @@ -1875,15 +1876,15 @@ } }, "node_modules/@cosmjs/ledger-amino": { - "version": "0.26.1", - "resolved": "https://registry.npmjs.org/@cosmjs/ledger-amino/-/ledger-amino-0.26.1.tgz", - "integrity": "sha512-A0hnujAhezAkIAc+NCQurN8si16Ub211AVTZvO6xQXCk8/3XRkub7YAvctxyQfM9fOb/a2mGGPGk6dne51tpBA==", + "version": "0.26.5", + "resolved": "https://registry.npmjs.org/@cosmjs/ledger-amino/-/ledger-amino-0.26.5.tgz", + "integrity": "sha512-UY3OsohGamLXp1P3M7hIW/Wk7Jj04xfFipyw+n4JQ0KSFrniju5idM89kqLELTimXptdI15TaivfHb4MJqfh7g==", "dependencies": { - "@cosmjs/amino": "0.26.1", - "@cosmjs/crypto": "0.26.1", - "@cosmjs/encoding": "0.26.1", - "@cosmjs/math": "0.26.1", - "@cosmjs/utils": "0.26.1", + "@cosmjs/amino": "0.26.5", + "@cosmjs/crypto": "0.26.5", + "@cosmjs/encoding": "0.26.5", + "@cosmjs/math": "0.26.5", + "@cosmjs/utils": "0.26.5", "ledger-cosmos-js": "^2.1.8", "semver": "^7.3.2" } @@ -1914,41 +1915,41 @@ } }, "node_modules/@cosmjs/math": { - "version": "0.26.1", - "resolved": "https://registry.npmjs.org/@cosmjs/math/-/math-0.26.1.tgz", - "integrity": "sha512-FvCpguKswL2PYsONXHDzbcaq1gFQteFUz2w7DasVXvVlnzStDS8ePz8k36psNQ1efyX6oF62ZqMizxOZgCW33A==", + "version": "0.26.5", + "resolved": "https://registry.npmjs.org/@cosmjs/math/-/math-0.26.5.tgz", + "integrity": "sha512-1G7NgLJ35g4jUupvyu7Igtgu/fj2NmgpOofpNk1JqIwMXrm3Tx7lOWbxJq8Wrjj2EoH7FNytSO1dXNGeK15UJw==", "dependencies": { "bn.js": "^4.11.8" } }, "node_modules/@cosmjs/proto-signing": { - "version": "0.26.1", - "resolved": "https://registry.npmjs.org/@cosmjs/proto-signing/-/proto-signing-0.26.1.tgz", - "integrity": "sha512-R6vHulxH5njTru9Ezr8k5+u6fBzenNRE3EbQtbVreL++TLV/jKu0Vl2CFz89X8su7BqWZImqzE9+BAesLUKVfw==", + "version": "0.26.5", + "resolved": "https://registry.npmjs.org/@cosmjs/proto-signing/-/proto-signing-0.26.5.tgz", + "integrity": "sha512-F94Uh+PX9nF5zGzUHMdEGgys+YCOudaWQehiHBfOjbHUIv0khufcRXs3l9/5dKzizz9ouQ5DHQAiWq/nYKZKqA==", "dependencies": { - "@cosmjs/amino": "0.26.1", - "@cosmjs/crypto": "0.26.1", - "@cosmjs/math": "0.26.1", + "@cosmjs/amino": "0.26.5", + "@cosmjs/crypto": "0.26.5", + "@cosmjs/math": "0.26.5", "cosmjs-types": "^0.2.0", "long": "^4.0.0", "protobufjs": "~6.10.2" } }, "node_modules/@cosmjs/socket": { - "version": "0.26.0", - "resolved": "https://registry.npmjs.org/@cosmjs/socket/-/socket-0.26.0.tgz", - "integrity": "sha512-eLGRWDpu7ywHEAvO5B5+75pP8xT5yta4OP/nvMYa4zMtwQgLxZQsGlzQhfeIclB/G57zrupgHECtQFGIttbZPg==", + "version": "0.26.5", + "resolved": "https://registry.npmjs.org/@cosmjs/socket/-/socket-0.26.5.tgz", + "integrity": "sha512-kBpXw9wuNHkO1AGuKgDA4/DOA+jZ6Lt0GVJVJIJ6bfjGbsewsNVocktAiH+1dGb47xXg2oH7OwGJL+B/PB3qPQ==", "dependencies": { - "@cosmjs/stream": "0.26.0", + "@cosmjs/stream": "0.26.5", "isomorphic-ws": "^4.0.1", "ws": "^7", "xstream": "^11.14.0" } }, "node_modules/@cosmjs/socket/node_modules/ws": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.5.tgz", - "integrity": "sha512-BAkMFcAzl8as1G/hArkxOxq3G7pjUqQ3gzYbLL0/5zNkph70e+lCoxBGnm6AW1+/aiNeV4fnKqZ8m4GZewmH2w==", + "version": "7.5.6", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.6.tgz", + "integrity": "sha512-6GLgCqo2cy2A2rjCNFlxQS6ZljG/coZfZXclldI8FB/1G3CCI36Zd8xy2HrFVACi8tfk5XrgLQEk+P0Tnz9UcA==", "engines": { "node": ">=8.3.0" }, @@ -1966,156 +1967,60 @@ } }, "node_modules/@cosmjs/stargate": { - "version": "0.26.0", - "resolved": "https://registry.npmjs.org/@cosmjs/stargate/-/stargate-0.26.0.tgz", - "integrity": "sha512-+60Mbu5Y3x+vDRGfs9DgyQYx7QqKXQ7t4dH8Y0JIs+4Gn38WbrcAHaqcT58K/sQHSZPueRsBGkZTZdQkJII2zw==", + "version": "0.26.5", + "resolved": "https://registry.npmjs.org/@cosmjs/stargate/-/stargate-0.26.5.tgz", + "integrity": "sha512-rnRptbn01zXAa29272XZgxvH6zemPAvlE9/qGouRXpUm3ilHU+PscAq2k1pD17qtOKWRBLY2+x4feXYHwJg9VA==", "dependencies": { "@confio/ics23": "^0.6.3", - "@cosmjs/amino": "0.26.0", - "@cosmjs/encoding": "0.26.0", - "@cosmjs/math": "0.26.0", - "@cosmjs/proto-signing": "0.26.0", - "@cosmjs/stream": "0.26.0", - "@cosmjs/tendermint-rpc": "0.26.0", - "@cosmjs/utils": "0.26.0", + "@cosmjs/amino": "0.26.5", + "@cosmjs/encoding": "0.26.5", + "@cosmjs/math": "0.26.5", + "@cosmjs/proto-signing": "0.26.5", + "@cosmjs/stream": "0.26.5", + "@cosmjs/tendermint-rpc": "0.26.5", + "@cosmjs/utils": "0.26.5", "cosmjs-types": "^0.2.0", "long": "^4.0.0", "protobufjs": "~6.10.2", "xstream": "^11.14.0" } }, - "node_modules/@cosmjs/stargate/node_modules/@cosmjs/amino": { - "version": "0.26.0", - "resolved": "https://registry.npmjs.org/@cosmjs/amino/-/amino-0.26.0.tgz", - "integrity": "sha512-CDGCdGYsxrJxhiI57e7no25LPuzKQOe4DdsJQyLrOzAnFnGHYJvPh0NAX4eEh3dOfwJCwMNnA1w79JNm0lzhOA==", - "dependencies": { - "@cosmjs/crypto": "0.26.0", - "@cosmjs/encoding": "0.26.0", - "@cosmjs/math": "0.26.0", - "@cosmjs/utils": "0.26.0" - } - }, - "node_modules/@cosmjs/stargate/node_modules/@cosmjs/crypto": { - "version": "0.26.0", - "resolved": "https://registry.npmjs.org/@cosmjs/crypto/-/crypto-0.26.0.tgz", - "integrity": "sha512-/36R7BzBNag1QRA2tpOrnr7x02B/YuaCgXKmKGLNd1+62Ud6aKkORyZMDvEt65SKoLhbDUzvNpSHAUjMsUbDfg==", - "dependencies": { - "@cosmjs/encoding": "0.26.0", - "@cosmjs/math": "0.26.0", - "@cosmjs/utils": "0.26.0", - "bip39": "^3.0.2", - "bn.js": "^4.11.8", - "elliptic": "^6.5.3", - "js-sha3": "^0.8.0", - "libsodium-wrappers": "^0.7.6", - "ripemd160": "^2.0.2", - "sha.js": "^2.4.11" - } - }, - "node_modules/@cosmjs/stargate/node_modules/@cosmjs/encoding": { - "version": "0.26.0", - "resolved": "https://registry.npmjs.org/@cosmjs/encoding/-/encoding-0.26.0.tgz", - "integrity": "sha512-ctw6cBDsQSd0OJFWEwU6fJYrAXf63JNhOS3mjawo/hRyEFpVSBSEKEHvfICPc+4dT40v9L3eYEr8LXDYxat4AA==", - "dependencies": { - "base64-js": "^1.3.0", - "bech32": "^1.1.4", - "readonly-date": "^1.0.0" - } - }, - "node_modules/@cosmjs/stargate/node_modules/@cosmjs/math": { - "version": "0.26.0", - "resolved": "https://registry.npmjs.org/@cosmjs/math/-/math-0.26.0.tgz", - "integrity": "sha512-wfzdK/PnEnIA+CXM6VCyUr2daiEMvaF/iBaK3YCpkbXLfHUXQB+7bNh1HAHgJmp+PaYn3MhgBTnQbsmMsE3cKw==", - "dependencies": { - "bn.js": "^4.11.8" - } - }, - "node_modules/@cosmjs/stargate/node_modules/@cosmjs/proto-signing": { - "version": "0.26.0", - "resolved": "https://registry.npmjs.org/@cosmjs/proto-signing/-/proto-signing-0.26.0.tgz", - "integrity": "sha512-hNiebrGiDCf3tq6SMHtrf4Qhd8Fn4Z868mWJrbIxamR3EsGuAPb5fKFWYEmpS8IXDfD6qRkO845oMAfnmh5Oxg==", - "dependencies": { - "@cosmjs/amino": "0.26.0", - "@cosmjs/crypto": "0.26.0", - "@cosmjs/math": "0.26.0", - "cosmjs-types": "^0.2.0", - "long": "^4.0.0", - "protobufjs": "~6.10.2" - } - }, - "node_modules/@cosmjs/stargate/node_modules/@cosmjs/utils": { - "version": "0.26.0", - "resolved": "https://registry.npmjs.org/@cosmjs/utils/-/utils-0.26.0.tgz", - "integrity": "sha512-InTQ3P1noUR0U5zJs8ssqnToIGH2NKbFb+hS5wmYGLB0XRdlNk0UGcb9pjbAzaWRQPWxTd08YQvXg6IK/WE4fA==" - }, "node_modules/@cosmjs/stream": { - "version": "0.26.0", - "resolved": "https://registry.npmjs.org/@cosmjs/stream/-/stream-0.26.0.tgz", - "integrity": "sha512-TaB8aXj5vskllj39fFTlsJviqm+bZjrV6JzBneJMjV0ltuXEaocKo4x+EOe68ZLjF6+lK4XUu1g2rP1iAPdmAQ==", + "version": "0.26.5", + "resolved": "https://registry.npmjs.org/@cosmjs/stream/-/stream-0.26.5.tgz", + "integrity": "sha512-CIr/8bkRlLl36LAtbapsKxA7cMVhmPPWTihAcXgBXik1FM/0XCVNETPTQ64HX47eNQuP5AhWwaMoO553Sf9T2w==", "dependencies": { "xstream": "^11.14.0" } }, "node_modules/@cosmjs/tendermint-rpc": { - "version": "0.26.0", - "resolved": "https://registry.npmjs.org/@cosmjs/tendermint-rpc/-/tendermint-rpc-0.26.0.tgz", - "integrity": "sha512-PQbDLerUGAm8GwRiobVfdy7SM5nI9PzFQVDYOAnwwDME0kDsLGy83e7QNTG2DE1G+8861z9CXne5qz+54NbKwQ==", + "version": "0.26.5", + "resolved": "https://registry.npmjs.org/@cosmjs/tendermint-rpc/-/tendermint-rpc-0.26.5.tgz", + "integrity": "sha512-bBcFgpTHEP15m8n/bG3cx/LO110sScpEvYvurZDewfy7MW8WETF6sYZaPCGfVDGWde1EPjFLwKKxQ1Da/XoK0A==", "dependencies": { - "@cosmjs/crypto": "0.26.0", - "@cosmjs/encoding": "0.26.0", - "@cosmjs/json-rpc": "0.26.0", - "@cosmjs/math": "0.26.0", - "@cosmjs/socket": "0.26.0", - "@cosmjs/stream": "0.26.0", - "axios": "^0.21.1", + "@cosmjs/crypto": "0.26.5", + "@cosmjs/encoding": "0.26.5", + "@cosmjs/json-rpc": "0.26.5", + "@cosmjs/math": "0.26.5", + "@cosmjs/socket": "0.26.5", + "@cosmjs/stream": "0.26.5", + "axios": "^0.21.2", "readonly-date": "^1.0.0", "xstream": "^11.14.0" } }, - "node_modules/@cosmjs/tendermint-rpc/node_modules/@cosmjs/crypto": { - "version": "0.26.0", - "resolved": "https://registry.npmjs.org/@cosmjs/crypto/-/crypto-0.26.0.tgz", - "integrity": "sha512-/36R7BzBNag1QRA2tpOrnr7x02B/YuaCgXKmKGLNd1+62Ud6aKkORyZMDvEt65SKoLhbDUzvNpSHAUjMsUbDfg==", + "node_modules/@cosmjs/tendermint-rpc/node_modules/axios": { + "version": "0.21.4", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", + "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", "dependencies": { - "@cosmjs/encoding": "0.26.0", - "@cosmjs/math": "0.26.0", - "@cosmjs/utils": "0.26.0", - "bip39": "^3.0.2", - "bn.js": "^4.11.8", - "elliptic": "^6.5.3", - "js-sha3": "^0.8.0", - "libsodium-wrappers": "^0.7.6", - "ripemd160": "^2.0.2", - "sha.js": "^2.4.11" + "follow-redirects": "^1.14.0" } }, - "node_modules/@cosmjs/tendermint-rpc/node_modules/@cosmjs/encoding": { - "version": "0.26.0", - "resolved": "https://registry.npmjs.org/@cosmjs/encoding/-/encoding-0.26.0.tgz", - "integrity": "sha512-ctw6cBDsQSd0OJFWEwU6fJYrAXf63JNhOS3mjawo/hRyEFpVSBSEKEHvfICPc+4dT40v9L3eYEr8LXDYxat4AA==", - "dependencies": { - "base64-js": "^1.3.0", - "bech32": "^1.1.4", - "readonly-date": "^1.0.0" - } - }, - "node_modules/@cosmjs/tendermint-rpc/node_modules/@cosmjs/math": { - "version": "0.26.0", - "resolved": "https://registry.npmjs.org/@cosmjs/math/-/math-0.26.0.tgz", - "integrity": "sha512-wfzdK/PnEnIA+CXM6VCyUr2daiEMvaF/iBaK3YCpkbXLfHUXQB+7bNh1HAHgJmp+PaYn3MhgBTnQbsmMsE3cKw==", - "dependencies": { - "bn.js": "^4.11.8" - } - }, - "node_modules/@cosmjs/tendermint-rpc/node_modules/@cosmjs/utils": { - "version": "0.26.0", - "resolved": "https://registry.npmjs.org/@cosmjs/utils/-/utils-0.26.0.tgz", - "integrity": "sha512-InTQ3P1noUR0U5zJs8ssqnToIGH2NKbFb+hS5wmYGLB0XRdlNk0UGcb9pjbAzaWRQPWxTd08YQvXg6IK/WE4fA==" - }, "node_modules/@cosmjs/utils": { - "version": "0.26.1", - "resolved": "https://registry.npmjs.org/@cosmjs/utils/-/utils-0.26.1.tgz", - "integrity": "sha512-E7sYhHfcq2V4oB504FNSt8nx6QInTea1KZT5FrtyqONmgQwccfTv5+E2PuRbQs91i56YzHORHuP57rhV7NPn3g==" + "version": "0.26.5", + "resolved": "https://registry.npmjs.org/@cosmjs/utils/-/utils-0.26.5.tgz", + "integrity": "sha512-VB4Z7lEIXA36q0RON15KexzEosToUtdDyMv7UXSBHSl4mLG/fIZgBIpBEYsaPZ1kh43xyINeKQJiGCp2z5rI+g==" }, "node_modules/@cosmostation/cosmosjs": { "version": "0.10.8", @@ -2458,8 +2363,8 @@ }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", - "resolved": "https://registry.nlark.com/@nodelib/fs.scandir/download/@nodelib/fs.scandir-2.1.5.tgz?cache=0&sync_timestamp=1622792738877&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40nodelib%2Ffs.scandir%2Fdownload%2F%40nodelib%2Ffs.scandir-2.1.5.tgz", - "integrity": "sha1-dhnC6yGyVIP20WdUi0z9WnSIw9U=", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", "dev": true, "dependencies": { "@nodelib/fs.stat": "2.0.5", @@ -2471,8 +2376,8 @@ }, "node_modules/@nodelib/fs.stat": { "version": "2.0.5", - "resolved": "https://registry.nlark.com/@nodelib/fs.stat/download/@nodelib/fs.stat-2.0.5.tgz?cache=0&sync_timestamp=1622792616417&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40nodelib%2Ffs.stat%2Fdownload%2F%40nodelib%2Ffs.stat-2.0.5.tgz", - "integrity": "sha1-W9Jir5Tp0lvR5xsF3u1Eh2oiLos=", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", "dev": true, "engines": { "node": ">= 8" @@ -2480,8 +2385,8 @@ }, "node_modules/@nodelib/fs.walk": { "version": "1.2.8", - "resolved": "https://registry.nlark.com/@nodelib/fs.walk/download/@nodelib/fs.walk-1.2.8.tgz", - "integrity": "sha1-6Vc36LtnRt3t9pxVaVNJTxlv5po=", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", "dev": true, "dependencies": { "@nodelib/fs.scandir": "2.1.5", @@ -2622,9 +2527,9 @@ "integrity": "sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA=" }, "node_modules/@sindresorhus/is": { - "version": "4.0.1", - "resolved": "https://registry.nlark.com/@sindresorhus/is/download/@sindresorhus/is-4.0.1.tgz", - "integrity": "sha1-0mcp24UPoye3ysxVIiUhlEBCJvU=", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.2.0.tgz", + "integrity": "sha512-VkE3KLBmJwcCaVARtQpfuKcKv8gcBmUubrfHGF84dXuuW6jgsRYxPtzcIhPyK9WAPpRt2/xY6zkD9MnRaJzSyw==", "dev": true, "engines": { "node": ">=10" @@ -2714,8 +2619,8 @@ }, "node_modules/@szmarczak/http-timer": { "version": "4.0.6", - "resolved": "https://registry.nlark.com/@szmarczak/http-timer/download/@szmarczak/http-timer-4.0.6.tgz?cache=0&sync_timestamp=1626126261719&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40szmarczak%2Fhttp-timer%2Fdownload%2F%40szmarczak%2Fhttp-timer-4.0.6.tgz", - "integrity": "sha1-tKkUu2LnwnLU5Zif5EQPgSqx2Ac=", + "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-4.0.6.tgz", + "integrity": "sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w==", "dev": true, "dependencies": { "defer-to-connect": "^2.0.0" @@ -2725,9 +2630,9 @@ } }, "node_modules/@tauri-apps/cli": { - "version": "1.0.0-beta.3", - "resolved": "https://registry.nlark.com/@tauri-apps/cli/download/@tauri-apps/cli-1.0.0-beta.3.tgz", - "integrity": "sha1-zt6EjiYSLI7mB3SdhCafzI08LuE=", + "version": "1.0.0-beta.6", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli/-/cli-1.0.0-beta.6.tgz", + "integrity": "sha512-zcF7+diZk3LHcS1/Rwo2f/6hRMY9fOVQYSgqSkjZDGGkTXhysrEiCCc4DwLmB1QES9P0lhRt4CPBJLpH0MdsWA==", "dev": true, "dependencies": { "@tauri-apps/toml": "2.2.4", @@ -2777,6 +2682,17 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "node_modules/@tauri-apps/cli/node_modules/bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "dev": true, + "dependencies": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, "node_modules/@tauri-apps/cli/node_modules/chalk": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", @@ -2807,8 +2723,8 @@ }, "node_modules/@tauri-apps/cli/node_modules/fs-extra": { "version": "10.0.0", - "resolved": "https://registry.nlark.com/fs-extra/download/fs-extra-10.0.0.tgz", - "integrity": "sha1-n/YbZV3eU/s0qC34S7IUzoAuF8E=", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.0.tgz", + "integrity": "sha512-C5owb14u9eJwizKGdchcDUQeFtlSHHthBk8pbX9Vc1PFZrLombudjDnNns88aYslCyF6IY5SUw3Roz6xShcEIQ==", "dev": true, "dependencies": { "graceful-fs": "^4.2.0", @@ -2830,8 +2746,8 @@ }, "node_modules/@tauri-apps/cli/node_modules/inquirer": { "version": "8.1.1", - "resolved": "https://registry.nlark.com/inquirer/download/inquirer-8.1.1.tgz", - "integrity": "sha1-fFPZTG0DARx7sqlH8NyjuYJGwmo=", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-8.1.1.tgz", + "integrity": "sha512-hUDjc3vBkh/uk1gPfMAD/7Z188Q8cvTGl0nxwaCdwSbzFh6ZKkZh+s2ozVxbE5G9ZNRyeY0+lgbAIOUFsFf98w==", "dev": true, "dependencies": { "ansi-escapes": "^4.2.1", @@ -2853,22 +2769,10 @@ "node": ">=8.0.0" } }, - "node_modules/@tauri-apps/cli/node_modules/is-png": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/is-png/download/is-png-3.0.0.tgz", - "integrity": "sha1-e/XbfzJSfRDJBZSnUcFfdNRsj14=", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/@tauri-apps/cli/node_modules/jsonfile": { "version": "6.1.0", - "resolved": "https://registry.npm.taobao.org/jsonfile/download/jsonfile-6.1.0.tgz?cache=0&sync_timestamp=1604161876665&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fjsonfile%2Fdownload%2Fjsonfile-6.1.0.tgz", - "integrity": "sha1-vFWyY0eTxnnsZAMJTrE2mKbsCq4=", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", "dev": true, "dependencies": { "universalify": "^2.0.0" @@ -2879,8 +2783,8 @@ }, "node_modules/@tauri-apps/cli/node_modules/log-symbols": { "version": "4.1.0", - "resolved": "https://registry.nlark.com/log-symbols/download/log-symbols-4.1.0.tgz", - "integrity": "sha1-P727lbRoOsn8eFER55LlWNSr1QM=", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", "dev": true, "dependencies": { "chalk": "^4.1.0", @@ -2907,8 +2811,8 @@ }, "node_modules/@tauri-apps/cli/node_modules/ora": { "version": "5.4.1", - "resolved": "https://registry.nlark.com/ora/download/ora-5.4.1.tgz", - "integrity": "sha1-GyZ4Qmr0rEpQkAjl5KyemVnbnhg=", + "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", + "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==", "dev": true, "dependencies": { "bl": "^4.1.0", @@ -2928,6 +2832,20 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/@tauri-apps/cli/node_modules/readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dev": true, + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/@tauri-apps/cli/node_modules/semver": { "version": "7.3.5", "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", @@ -2957,8 +2875,8 @@ }, "node_modules/@tauri-apps/toml": { "version": "2.2.4", - "resolved": "https://registry.npm.taobao.org/@tauri-apps/toml/download/@tauri-apps/toml-2.2.4.tgz", - "integrity": "sha1-K09jet7X/DpzAnJGBWgsj6OsdQU=", + "resolved": "https://registry.npmjs.org/@tauri-apps/toml/-/toml-2.2.4.tgz", + "integrity": "sha512-NJV/pdgJObDlDWi5+MTHZ2qyNvdL0dlHqQ72nzQYXWbW1LHMPXgCJYl0pLqL1XxxLtxtInYbtVCGVAcwhGxdkw==", "dev": true, "funding": { "type": "opencollective", @@ -2966,9 +2884,9 @@ } }, "node_modules/@tokenizer/token": { - "version": "0.1.1", - "resolved": "https://registry.nlark.com/@tokenizer/token/download/@tokenizer/token-0.1.1.tgz", - "integrity": "sha1-8NksEvhwed39Gyn2FHWLlpa8KeM=", + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@tokenizer/token/-/token-0.3.0.tgz", + "integrity": "sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A==", "dev": true }, "node_modules/@types/body-parser": { @@ -2983,8 +2901,8 @@ }, "node_modules/@types/cacheable-request": { "version": "6.0.2", - "resolved": "https://registry.nlark.com/@types/cacheable-request/download/@types/cacheable-request-6.0.2.tgz?cache=0&sync_timestamp=1625596835916&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40types%2Fcacheable-request%2Fdownload%2F%40types%2Fcacheable-request-6.0.2.tgz", - "integrity": "sha1-wyTaAZfeCpiiMSFWU2riYkKf9rk=", + "resolved": "https://registry.npmjs.org/@types/cacheable-request/-/cacheable-request-6.0.2.tgz", + "integrity": "sha512-B3xVo+dlKM6nnKTcmm5ZtY/OL8bOAOd2Olee9M1zft65ox50OzjEHW91sDiU9j6cvW8Ejg1/Qkf4xd2kugApUA==", "dev": true, "dependencies": { "@types/http-cache-semantics": "*", @@ -3047,8 +2965,8 @@ }, "node_modules/@types/http-cache-semantics": { "version": "4.0.1", - "resolved": "https://registry.nlark.com/@types/http-cache-semantics/download/@types/http-cache-semantics-4.0.1.tgz?cache=0&sync_timestamp=1625607856094&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40types%2Fhttp-cache-semantics%2Fdownload%2F%40types%2Fhttp-cache-semantics-4.0.1.tgz", - "integrity": "sha1-Dqe2FJaQK5WJDcTDoRa2DLja6BI=", + "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.1.tgz", + "integrity": "sha512-SZs7ekbP8CN0txVG2xVRH6EgKmEm31BOxA07vkFaETzZz1xh+cbt8BcI0slpymvwhx5dlFnQG2rTlPVQn+iRPQ==", "dev": true }, "node_modules/@types/http-proxy": { @@ -3066,9 +2984,9 @@ "integrity": "sha512-YSBPTLTVm2e2OoQIDYx8HaeWJ5tTToLH67kXR7zYNGupXMEHa2++G8k+DczX2cFVgalypqtyZIcU19AFcmOpmg==" }, "node_modules/@types/keyv": { - "version": "3.1.2", - "resolved": "https://registry.nlark.com/@types/keyv/download/@types/keyv-3.1.2.tgz?cache=0&sync_timestamp=1625610098677&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40types%2Fkeyv%2Fdownload%2F%40types%2Fkeyv-3.1.2.tgz", - "integrity": "sha1-XZe7ZVJsILbghF9rDSreTyhgTuU=", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.3.tgz", + "integrity": "sha512-FXCJgyyN3ivVgRoml4h94G/p3kY+u/B86La+QptcqJaWtBWtmc6TtkNfS40n9bIvyLteHh7zXOtgbobORKPbDg==", "dev": true, "dependencies": { "@types/node": "*" @@ -3128,8 +3046,8 @@ }, "node_modules/@types/responselike": { "version": "1.0.0", - "resolved": "https://registry.nlark.com/@types/responselike/download/@types/responselike-1.0.0.tgz?cache=0&sync_timestamp=1621242544305&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40types%2Fresponselike%2Fdownload%2F%40types%2Fresponselike-1.0.0.tgz", - "integrity": "sha1-JR9P59FU0rrRJavhtCmyOv0mLik=", + "resolved": "https://registry.npmjs.org/@types/responselike/-/responselike-1.0.0.tgz", + "integrity": "sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA==", "dev": true, "dependencies": { "@types/node": "*" @@ -3830,11 +3748,11 @@ } }, "node_modules/@vue/composition-api": { - "version": "1.0.0-beta.22", - "resolved": "https://registry.npmjs.org/@vue/composition-api/-/composition-api-1.0.0-beta.22.tgz", - "integrity": "sha512-KkTeHVWgsJbtoA5t6pUien/ARw7JhVM7QZh05ko/UdgzALYMGwJsBf4WlcvbpMKE5eAu4ONYJypQ+r8LwBIOhA==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/@vue/composition-api/-/composition-api-1.4.1.tgz", + "integrity": "sha512-ZTat9ru/rwecveRnFzlO2mduOBpGfnBdXn+WtBcFLV9UsL/D+6nX47RWuLiVdNxNDX0qphGZRC+JDjwt+YTnRA==", "dependencies": { - "tslib": "^2.0.1" + "tslib": "^2.3.1" }, "peerDependencies": { "vue": ">= 2.5 < 3" @@ -4162,53 +4080,12 @@ "integrity": "sha512-+mRmCTv6SbCmtYJCN4faJMNFVNN5EuCTTprDTAo7YzIGji2KADmakjVA3+8mVDkZ2Bf09vayB35lSQIex2+QaQ==" }, "node_modules/ansi-align": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/ansi-align/download/ansi-align-3.0.0.tgz", - "integrity": "sha1-tTazcc9ofKrvI2wY0+If43l0Z8s=", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.1.tgz", + "integrity": "sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w==", "dev": true, "dependencies": { - "string-width": "^3.0.0" - } - }, - "node_modules/ansi-align/node_modules/ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/ansi-align/node_modules/emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", - "dev": true - }, - "node_modules/ansi-align/node_modules/string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, - "dependencies": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/ansi-align/node_modules/strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "dependencies": { - "ansi-regex": "^4.1.0" - }, - "engines": { - "node": ">=6" + "string-width": "^4.1.0" } }, "node_modules/ansi-colors": { @@ -4328,7 +4205,7 @@ }, "node_modules/archive-type": { "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/archive-type/download/archive-type-4.0.0.tgz", + "resolved": "https://registry.npmjs.org/archive-type/-/archive-type-4.0.0.tgz", "integrity": "sha1-+S5yIzBW38aWlHJ0nCZ72wRrHXA=", "dev": true, "dependencies": { @@ -4340,7 +4217,7 @@ }, "node_modules/archive-type/node_modules/file-type": { "version": "4.4.0", - "resolved": "https://registry.nlark.com/file-type/download/file-type-4.4.0.tgz", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-4.4.0.tgz", "integrity": "sha1-G2AOX8ofvcboDApwxxyNul95BsU=", "dev": true, "engines": { @@ -4348,9 +4225,9 @@ } }, "node_modules/are-we-there-yet": { - "version": "1.1.5", - "resolved": "https://registry.npm.taobao.org/are-we-there-yet/download/are-we-there-yet-1.1.5.tgz", - "integrity": "sha1-SzXClE8GKov82mZBB2A1D+nd/CE=", + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.7.tgz", + "integrity": "sha512-nxwy40TuMiUGqMyRHgCSWZ9FM4VAoRP4xUYSTv5ImRog+h9yISPbVH7H8fASCIzYn9wlEv4zvFL7uKDMCFQm3g==", "dev": true, "dependencies": { "delegates": "^1.0.0", @@ -4397,7 +4274,7 @@ }, "node_modules/array-find-index": { "version": "1.0.2", - "resolved": "https://registry.nlark.com/array-find-index/download/array-find-index-1.0.2.tgz", + "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=", "dev": true, "engines": { @@ -4475,6 +4352,11 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/arrayslicer": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/arrayslicer/-/arrayslicer-1.2.3.tgz", + "integrity": "sha1-IaSQMQKpq6fYpzxEv1fz4oxWATY=" + }, "node_modules/asn1": { "version": "0.2.4", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", @@ -4964,8 +4846,8 @@ }, "node_modules/bin-build": { "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/bin-build/download/bin-build-3.0.0.tgz", - "integrity": "sha1-xXgKJaip+WbYJEIX5sH1CCoUOGE=", + "resolved": "https://registry.npmjs.org/bin-build/-/bin-build-3.0.0.tgz", + "integrity": "sha512-jcUOof71/TNAI2uM5uoUaDq2ePcVBQ3R/qhxAz1rX7UfvduAL/RXD3jXzvn8cVcDJdGVkiR1shal3OH0ImpuhA==", "dev": true, "dependencies": { "decompress": "^4.0.0", @@ -4991,7 +4873,7 @@ }, "node_modules/bin-build/node_modules/execa": { "version": "0.7.0", - "resolved": "https://registry.nlark.com/execa/download/execa-0.7.0.tgz", + "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", "dev": true, "dependencies": { @@ -5009,8 +4891,8 @@ }, "node_modules/bin-check": { "version": "4.1.0", - "resolved": "https://registry.npm.taobao.org/bin-check/download/bin-check-4.1.0.tgz", - "integrity": "sha1-/ElZcL3Ii7HVo1/BfmXEoUn8Skk=", + "resolved": "https://registry.npmjs.org/bin-check/-/bin-check-4.1.0.tgz", + "integrity": "sha512-b6weQyEUKsDGFlACWSIOfveEnImkJyK/FGW6FAG42loyoquvjdtOIqO6yBFzHyqyVVhNgNkQxxx09SFLK28YnA==", "dev": true, "dependencies": { "execa": "^0.7.0", @@ -5033,7 +4915,7 @@ }, "node_modules/bin-check/node_modules/execa": { "version": "0.7.0", - "resolved": "https://registry.nlark.com/execa/download/execa-0.7.0.tgz", + "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", "dev": true, "dependencies": { @@ -5051,8 +4933,8 @@ }, "node_modules/bin-version": { "version": "3.1.0", - "resolved": "https://registry.nlark.com/bin-version/download/bin-version-3.1.0.tgz", - "integrity": "sha1-WwnrKAdSsb0o8MnbP5by9DtsCDk=", + "resolved": "https://registry.npmjs.org/bin-version/-/bin-version-3.1.0.tgz", + "integrity": "sha512-Mkfm4iE1VFt4xd4vH+gx+0/71esbfus2LsnCGe8Pi4mndSPyT+NGES/Eg99jx8/lUGWfu3z2yuB/bt5UB+iVbQ==", "dev": true, "dependencies": { "execa": "^1.0.0", @@ -5064,8 +4946,8 @@ }, "node_modules/bin-version-check": { "version": "4.0.0", - "resolved": "https://registry.nlark.com/bin-version-check/download/bin-version-check-4.0.0.tgz?cache=0&sync_timestamp=1619602121719&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fbin-version-check%2Fdownload%2Fbin-version-check-4.0.0.tgz", - "integrity": "sha1-fYGcYklpkfgNiT5uAqMDI2Fgj3E=", + "resolved": "https://registry.npmjs.org/bin-version-check/-/bin-version-check-4.0.0.tgz", + "integrity": "sha512-sR631OrhC+1f8Cvs8WyVWOA33Y8tgwjETNPyyD/myRBXLkfS/vl74FmH/lFcRl9KY3zwGh7jFhvyk9vV3/3ilQ==", "dev": true, "dependencies": { "bin-version": "^3.0.0", @@ -5087,8 +4969,8 @@ }, "node_modules/bin-wrapper": { "version": "4.1.0", - "resolved": "https://registry.npm.taobao.org/bin-wrapper/download/bin-wrapper-4.1.0.tgz", - "integrity": "sha1-mTSPLPhQMePvfvzn5TAK6q6WBgU=", + "resolved": "https://registry.npmjs.org/bin-wrapper/-/bin-wrapper-4.1.0.tgz", + "integrity": "sha512-hfRmo7hWIXPkbpi0ZltboCMVrU+0ClXR/JgbCKKjlDjQf6igXa7OwdqNcFWQZPZTgiY7ZpzE3+LjjkLiTN2T7Q==", "dev": true, "dependencies": { "bin-check": "^4.1.0", @@ -5104,8 +4986,8 @@ }, "node_modules/bin-wrapper/node_modules/@sindresorhus/is": { "version": "0.7.0", - "resolved": "https://registry.nlark.com/@sindresorhus/is/download/@sindresorhus/is-0.7.0.tgz", - "integrity": "sha1-mgb08TfuhNffBGDB/bETX/psUP0=", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.7.0.tgz", + "integrity": "sha512-ONhaKPIufzzrlNbqtWFFd+jlnemX6lJAgq9ZeiZtS7I1PIf/la7CW4m83rTXRnVnsMbW2k56pGYu7AUFJD9Pow==", "dev": true, "engines": { "node": ">=4" @@ -5113,7 +4995,7 @@ }, "node_modules/bin-wrapper/node_modules/cacheable-request": { "version": "2.1.4", - "resolved": "https://registry.nlark.com/cacheable-request/download/cacheable-request-2.1.4.tgz", + "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-2.1.4.tgz", "integrity": "sha1-DYCIAbY0KtM8kd+dC0TcCbkeXD0=", "dev": true, "dependencies": { @@ -5128,17 +5010,29 @@ }, "node_modules/bin-wrapper/node_modules/cacheable-request/node_modules/lowercase-keys": { "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/lowercase-keys/download/lowercase-keys-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.0.tgz", "integrity": "sha1-TjNms55/VFfjXxMkvfb4jQv8cwY=", "dev": true, "engines": { "node": ">=0.10.0" } }, + "node_modules/bin-wrapper/node_modules/decompress-response": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", + "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", + "dev": true, + "dependencies": { + "mimic-response": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/bin-wrapper/node_modules/download": { "version": "7.1.0", - "resolved": "https://registry.npm.taobao.org/download/download/download-7.1.0.tgz", - "integrity": "sha1-kFmqnXC1A+52oTKJe+beyOVYcjM=", + "resolved": "https://registry.npmjs.org/download/-/download-7.1.0.tgz", + "integrity": "sha512-xqnBTVd/E+GxJVrX5/eUJiLYjCGPwMpdL+jGhGU57BvtcA7wwhtHVbXBeUk51kOpW3S7Jn3BQbN9Q1R1Km2qDQ==", "dev": true, "dependencies": { "archive-type": "^4.0.0", @@ -5169,8 +5063,8 @@ }, "node_modules/bin-wrapper/node_modules/file-type": { "version": "8.1.0", - "resolved": "https://registry.nlark.com/file-type/download/file-type-8.1.0.tgz", - "integrity": "sha1-JE87fvZBu+DMoZbHJ25LMyOZ9ow=", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-8.1.0.tgz", + "integrity": "sha512-qyQ0pzAy78gVoJsmYeNgl8uH8yKhr1lVhW7JbzJmnlRi0I4R2eEDEJZVKG8agpDnLpacwNbDhLNG/LMdxHD2YQ==", "dev": true, "engines": { "node": ">=6" @@ -5178,8 +5072,8 @@ }, "node_modules/bin-wrapper/node_modules/got": { "version": "8.3.2", - "resolved": "https://registry.nlark.com/got/download/got-8.3.2.tgz", - "integrity": "sha1-HSP2Q5Dpf3dsrFLluTbl9RTS6Tc=", + "resolved": "https://registry.npmjs.org/got/-/got-8.3.2.tgz", + "integrity": "sha512-qjUJ5U/hawxosMryILofZCkm3C84PLJS/0grRIpjAwu+Lkxxj5cxeCU25BG0/3mDSpXKTyZr8oh8wIgLaH0QCw==", "dev": true, "dependencies": { "@sindresorhus/is": "^0.7.0", @@ -5215,32 +5109,38 @@ }, "node_modules/bin-wrapper/node_modules/http-cache-semantics": { "version": "3.8.1", - "resolved": "https://registry.nlark.com/http-cache-semantics/download/http-cache-semantics-3.8.1.tgz", - "integrity": "sha1-ObDhat2bYFvwqe89nar0hDtMrNI=", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz", + "integrity": "sha512-5ai2iksyV8ZXmnZhHH4rWPoxxistEexSi5936zIQ1bnNTW5VnA85B6P/VpXiRM017IgRvb2kKo1a//y+0wSp3w==", "dev": true }, - "node_modules/bin-wrapper/node_modules/import-lazy": { - "version": "3.1.0", - "resolved": "https://registry.npm.taobao.org/import-lazy/download/import-lazy-3.1.0.tgz", - "integrity": "sha1-iRJ5ICyKIoD9vWZ029jaGh38Z8w=", - "dev": true, - "engines": { - "node": ">=6" - } + "node_modules/bin-wrapper/node_modules/json-buffer": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", + "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=", + "dev": true }, "node_modules/bin-wrapper/node_modules/keyv": { "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/keyv/download/keyv-3.0.0.tgz", - "integrity": "sha1-RJI7o55osSp87H32wyaMAx8u83M=", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.0.0.tgz", + "integrity": "sha512-eguHnq22OE3uVoSYG0LVWNP+4ppamWr9+zWBe1bsNcovIMy6huUJFPgy4mGwCd/rnl3vOLGW1MTlu4c57CT1xA==", "dev": true, "dependencies": { "json-buffer": "3.0.0" } }, + "node_modules/bin-wrapper/node_modules/lowercase-keys": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", + "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/bin-wrapper/node_modules/normalize-url": { "version": "2.0.1", - "resolved": "https://registry.nlark.com/normalize-url/download/normalize-url-2.0.1.tgz?cache=0&sync_timestamp=1625826787829&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fnormalize-url%2Fdownload%2Fnormalize-url-2.0.1.tgz", - "integrity": "sha1-g1qdoVUfom9w6SMpBpojqmV01+Y=", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-2.0.1.tgz", + "integrity": "sha512-D6MUW4K/VzoJ4rJ01JFKxDrtY1v9wrgzCX5f2qj/lzH1m/lW6MhUZFKerVsnyjOhOsYzI9Kqqak+10l4LvLpMw==", "dev": true, "dependencies": { "prepend-http": "^2.0.0", @@ -5253,8 +5153,8 @@ }, "node_modules/bin-wrapper/node_modules/p-cancelable": { "version": "0.4.1", - "resolved": "https://registry.nlark.com/p-cancelable/download/p-cancelable-0.4.1.tgz", - "integrity": "sha1-NfNj1n1SCByNlYXje8zrfgu8sqA=", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-0.4.1.tgz", + "integrity": "sha512-HNa1A8LvB1kie7cERyy21VNeHb2CWJJYqyyC2o3klWFfMGlFmWv2Z7sFgZH8ZiaYL95ydToKTFVXgMV/Os0bBQ==", "dev": true, "engines": { "node": ">=4" @@ -5262,8 +5162,8 @@ }, "node_modules/bin-wrapper/node_modules/p-event": { "version": "2.3.1", - "resolved": "https://registry.nlark.com/p-event/download/p-event-2.3.1.tgz", - "integrity": "sha1-WWJ57xaassPgyuiMHPuwgHmZPvY=", + "resolved": "https://registry.npmjs.org/p-event/-/p-event-2.3.1.tgz", + "integrity": "sha512-NQCqOFhbpVTMX4qMe8PF8lbGtzZ+LCiN7pcNrb/413Na7+TRoe1xkKUzuWa/YEJdGQ0FvKtj35EEbDoVPO2kbA==", "dev": true, "dependencies": { "p-timeout": "^2.0.1" @@ -5274,8 +5174,8 @@ }, "node_modules/bin-wrapper/node_modules/p-timeout": { "version": "2.0.1", - "resolved": "https://registry.nlark.com/p-timeout/download/p-timeout-2.0.1.tgz", - "integrity": "sha1-2N0ZeVldLcATnh/ka4tkbLPN8Dg=", + "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-2.0.1.tgz", + "integrity": "sha512-88em58dDVB/KzPEx1X0N3LwFfYZPyDc4B6eF38M1rk9VTZMbxXXgjugz8mmwpS9Ox4BDZ+t6t3QP5+/gazweIA==", "dev": true, "dependencies": { "p-finally": "^1.0.0" @@ -5295,7 +5195,7 @@ }, "node_modules/bin-wrapper/node_modules/prepend-http": { "version": "2.0.0", - "resolved": "https://registry.nlark.com/prepend-http/download/prepend-http-2.0.0.tgz", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=", "dev": true, "engines": { @@ -5304,8 +5204,8 @@ }, "node_modules/bin-wrapper/node_modules/query-string": { "version": "5.1.1", - "resolved": "https://registry.nlark.com/query-string/download/query-string-5.1.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fquery-string%2Fdownload%2Fquery-string-5.1.1.tgz", - "integrity": "sha1-p4wBK3HBfgXy4/ojGd0zBoLvs8s=", + "resolved": "https://registry.npmjs.org/query-string/-/query-string-5.1.1.tgz", + "integrity": "sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw==", "dev": true, "dependencies": { "decode-uri-component": "^0.2.0", @@ -5316,9 +5216,18 @@ "node": ">=0.10.0" } }, + "node_modules/bin-wrapper/node_modules/responselike": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz", + "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=", + "dev": true, + "dependencies": { + "lowercase-keys": "^1.0.0" + } + }, "node_modules/bin-wrapper/node_modules/sort-keys": { "version": "2.0.0", - "resolved": "https://registry.nlark.com/sort-keys/download/sort-keys-2.0.0.tgz", + "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-2.0.0.tgz", "integrity": "sha1-ZYU1WEhh7JfXMNbPQYIuH1ZoQSg=", "dev": true, "dependencies": { @@ -5443,28 +5352,13 @@ } }, "node_modules/bl": { - "version": "4.1.0", - "resolved": "https://registry.nlark.com/bl/download/bl-4.1.0.tgz", - "integrity": "sha1-RRU1JkGCvsL7vIOmKrmM8R2fezo=", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/bl/-/bl-1.2.3.tgz", + "integrity": "sha512-pvcNpa0UU69UT341rO6AYy4FVAIkUHuZXRIWbq+zHnsVcRzDDjIAhGuuYoi0d//cwIwtt4pkpKycWEfjdV+vww==", "dev": true, "dependencies": { - "buffer": "^5.5.0", - "inherits": "^2.0.4", - "readable-stream": "^3.4.0" - } - }, - "node_modules/bl/node_modules/readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "dev": true, - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" + "readable-stream": "^2.3.5", + "safe-buffer": "^5.1.1" } }, "node_modules/bluebird": { @@ -5551,16 +5445,16 @@ } }, "node_modules/boxen": { - "version": "5.0.1", - "resolved": "https://registry.npm.taobao.org/boxen/download/boxen-5.0.1.tgz", - "integrity": "sha1-ZXUovdP1mncrgnm4MfJ+wsdEZks=", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/boxen/-/boxen-5.1.2.tgz", + "integrity": "sha512-9gYgQKXx+1nP8mP7CzFyaUARhg7D3n1dF/FnErWmu9l6JvGpNUN278h0aSb+QjoiKSWG+iZ3uHrcqk0qrY9RQQ==", "dev": true, "dependencies": { "ansi-align": "^3.0.0", "camelcase": "^6.2.0", "chalk": "^4.1.0", "cli-boxes": "^2.2.1", - "string-width": "^4.2.0", + "string-width": "^4.2.2", "type-fest": "^0.20.2", "widest-line": "^3.1.0", "wrap-ansi": "^7.0.0" @@ -5588,9 +5482,9 @@ } }, "node_modules/boxen/node_modules/camelcase": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.0.tgz", - "integrity": "sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==", + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.1.tgz", + "integrity": "sha512-tVI4q5jjFV5CavAU8DXfza/TJcZutVKo/5Foskmsqcm0MsL91moHvwiGNnqaa2o6PF/7yT5ikDRcVcl8Rj6LCA==", "dev": true, "engines": { "node": ">=10" @@ -5600,9 +5494,9 @@ } }, "node_modules/boxen/node_modules/chalk": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", - "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "dependencies": { "ansi-styles": "^4.1.0", @@ -5650,8 +5544,8 @@ }, "node_modules/boxen/node_modules/type-fest": { "version": "0.20.2", - "resolved": "https://registry.nlark.com/type-fest/download/type-fest-0.20.2.tgz?cache=0&sync_timestamp=1625745315038&other_urls=https%3A%2F%2Fregistry.nlark.com%2Ftype-fest%2Fdownload%2Ftype-fest-0.20.2.tgz", - "integrity": "sha1-G/IH9LKPkVg2ZstfvTJ4hzAc1fQ=", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", "dev": true, "engines": { "node": ">=10" @@ -5827,8 +5721,8 @@ }, "node_modules/buffer": { "version": "5.7.1", - "resolved": "https://registry.nlark.com/buffer/download/buffer-5.7.1.tgz", - "integrity": "sha1-umLnwTEzBTWCGXFghRqPZI6Z7tA=", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", "dev": true, "funding": [ { @@ -5851,8 +5745,8 @@ }, "node_modules/buffer-alloc": { "version": "1.2.0", - "resolved": "https://registry.nlark.com/buffer-alloc/download/buffer-alloc-1.2.0.tgz", - "integrity": "sha1-iQ3ZDZI6hz4I4Q5f1RpX5bfM4Ow=", + "resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz", + "integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==", "dev": true, "dependencies": { "buffer-alloc-unsafe": "^1.1.0", @@ -5861,13 +5755,13 @@ }, "node_modules/buffer-alloc-unsafe": { "version": "1.1.0", - "resolved": "https://registry.npm.taobao.org/buffer-alloc-unsafe/download/buffer-alloc-unsafe-1.1.0.tgz", - "integrity": "sha1-vX3CauKXLQ7aJTvgYdupkjScGfA=", + "resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz", + "integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==", "dev": true }, "node_modules/buffer-crc32": { "version": "0.2.13", - "resolved": "https://registry.npm.taobao.org/buffer-crc32/download/buffer-crc32-0.2.13.tgz", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=", "dev": true, "engines": { @@ -5876,7 +5770,7 @@ }, "node_modules/buffer-fill": { "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/buffer-fill/download/buffer-fill-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz", "integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw=", "dev": true }, @@ -6108,8 +6002,8 @@ }, "node_modules/cacheable-lookup": { "version": "5.0.4", - "resolved": "https://registry.npm.taobao.org/cacheable-lookup/download/cacheable-lookup-5.0.4.tgz?cache=0&sync_timestamp=1613567617958&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcacheable-lookup%2Fdownload%2Fcacheable-lookup-5.0.4.tgz", - "integrity": "sha1-WmuGWyxENXvj1evCpGewMnGacAU=", + "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz", + "integrity": "sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA==", "dev": true, "engines": { "node": ">=10.6.0" @@ -6117,8 +6011,8 @@ }, "node_modules/cacheable-request": { "version": "7.0.2", - "resolved": "https://registry.nlark.com/cacheable-request/download/cacheable-request-7.0.2.tgz", - "integrity": "sha1-6g0LiJNkolhUdXMByhKy2nf5HSc=", + "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-7.0.2.tgz", + "integrity": "sha512-pouW8/FmiPQbuGpkXQ9BAPv/Mo5xDGANgSNXzTzJ8DrKGuXOssM4wIQRjfanNRh3Yu5cfYPvcorqbhg2KIJtew==", "dev": true, "dependencies": { "clone-response": "^1.0.2", @@ -6148,19 +6042,10 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/cacheable-request/node_modules/lowercase-keys": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/lowercase-keys/download/lowercase-keys-2.0.0.tgz", - "integrity": "sha1-JgPni3tLAAbLyi+8yKMgJVislHk=", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/cacheable-request/node_modules/normalize-url": { "version": "6.1.0", - "resolved": "https://registry.nlark.com/normalize-url/download/normalize-url-6.1.0.tgz?cache=0&sync_timestamp=1625826787829&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fnormalize-url%2Fdownload%2Fnormalize-url-6.1.0.tgz", - "integrity": "sha1-QNCIW1Nd7/4/MUe+yHfQX+TFZoo=", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz", + "integrity": "sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==", "dev": true, "engines": { "node": ">=10" @@ -6169,15 +6054,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/cacheable-request/node_modules/responselike": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/responselike/download/responselike-2.0.0.tgz", - "integrity": "sha1-JjkbzDF091D5p56sxAoSpcQtdyM=", - "dev": true, - "dependencies": { - "lowercase-keys": "^2.0.0" - } - }, "node_modules/call-bind": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", @@ -6258,7 +6134,7 @@ }, "node_modules/camelcase-keys": { "version": "2.1.0", - "resolved": "https://registry.nlark.com/camelcase-keys/download/camelcase-keys-2.1.0.tgz?cache=0&sync_timestamp=1624609060222&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fcamelcase-keys%2Fdownload%2Fcamelcase-keys-2.1.0.tgz", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", "dev": true, "dependencies": { @@ -6271,7 +6147,7 @@ }, "node_modules/camelcase-keys/node_modules/camelcase": { "version": "2.1.1", - "resolved": "https://registry.npm.taobao.org/camelcase/download/camelcase-2.1.1.tgz", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=", "dev": true, "engines": { @@ -6314,10 +6190,21 @@ "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" }, + "node_modules/catharsis": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/catharsis/-/catharsis-0.9.0.tgz", + "integrity": "sha512-prMTQVpcns/tzFgFVkVp6ak6RykZyWb3gu8ckUpd6YkTlacOd3DXGJjIpD4Q6zJirizvaiAjSSHlOsA+6sNh2A==", + "dependencies": { + "lodash": "^4.17.15" + }, + "engines": { + "node": ">= 10" + } + }, "node_modules/caw": { "version": "2.0.1", - "resolved": "https://registry.npm.taobao.org/caw/download/caw-2.0.1.tgz", - "integrity": "sha1-bDygcfwZRyCIPC3F2psHS/x+npU=", + "resolved": "https://registry.npmjs.org/caw/-/caw-2.0.1.tgz", + "integrity": "sha512-Cg8/ZSBEa8ZVY9HspcGUYaK63d/bN7rqS3CYCzEGUxuYv6UlmcjzDUz2fCFFHyTvUW5Pk0I+3hkA3iXlIj6guA==", "dev": true, "dependencies": { "get-proxy": "^2.0.0", @@ -6485,8 +6372,8 @@ }, "node_modules/cli-boxes": { "version": "2.2.1", - "resolved": "https://registry.nlark.com/cli-boxes/download/cli-boxes-2.2.1.tgz", - "integrity": "sha1-3dUDXSUJT84iDpyrQKRYQKRAMY8=", + "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-2.2.1.tgz", + "integrity": "sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw==", "dev": true, "engines": { "node": ">=6" @@ -6748,7 +6635,7 @@ }, "node_modules/clone-response": { "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/clone-response/download/clone-response-1.0.2.tgz", + "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz", "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=", "dev": true, "dependencies": { @@ -6771,7 +6658,7 @@ }, "node_modules/code-point-at": { "version": "1.1.0", - "resolved": "https://registry.nlark.com/code-point-at/download/code-point-at-1.1.0.tgz", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", "dev": true, "engines": { @@ -6939,8 +6826,8 @@ }, "node_modules/config-chain": { "version": "1.1.13", - "resolved": "https://registry.nlark.com/config-chain/download/config-chain-1.1.13.tgz?cache=0&sync_timestamp=1622745851079&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fconfig-chain%2Fdownload%2Fconfig-chain-1.1.13.tgz", - "integrity": "sha1-+tB5Wqamza/57Rto6d/5Q3LCMvQ=", + "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.13.tgz", + "integrity": "sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==", "dev": true, "dependencies": { "ini": "^1.3.4", @@ -6949,8 +6836,8 @@ }, "node_modules/configstore": { "version": "5.0.1", - "resolved": "https://registry.npm.taobao.org/configstore/download/configstore-5.0.1.tgz", - "integrity": "sha1-02UCG130uYzdGH1qOw4/anzF7ZY=", + "resolved": "https://registry.npmjs.org/configstore/-/configstore-5.0.1.tgz", + "integrity": "sha512-aMKprgk5YhBNyH25hj8wGt2+D52Sw1DRRIzqBwLp2Ya9mFmY8KPvvtvmna8SxVR9JMZ4kzMD68N22vlaRpkeFA==", "dev": true, "dependencies": { "dot-prop": "^5.2.0", @@ -7006,13 +6893,13 @@ }, "node_modules/console-control-strings": { "version": "1.1.0", - "resolved": "https://registry.nlark.com/console-control-strings/download/console-control-strings-1.1.0.tgz", + "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", "dev": true }, "node_modules/console-stream": { "version": "0.1.1", - "resolved": "https://registry.npm.taobao.org/console-stream/download/console-stream-0.1.1.tgz", + "resolved": "https://registry.npmjs.org/console-stream/-/console-stream-0.1.1.tgz", "integrity": "sha1-oJX+B7IEZZVfL6/Si11yvM2UnUQ=", "dev": true }, @@ -7308,8 +7195,8 @@ }, "node_modules/cross-env": { "version": "7.0.3", - "resolved": "https://registry.nlark.com/cross-env/download/cross-env-7.0.3.tgz", - "integrity": "sha1-hlJkspZ33AFbqEGJGJZd0jL8VM8=", + "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-7.0.3.tgz", + "integrity": "sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==", "dev": true, "dependencies": { "cross-spawn": "^7.0.1" @@ -7406,8 +7293,8 @@ }, "node_modules/crypto-random-string": { "version": "2.0.0", - "resolved": "https://registry.nlark.com/crypto-random-string/download/crypto-random-string-2.0.0.tgz", - "integrity": "sha1-7yp6lm7BEIM4g2m6oC6+rSKbMNU=", + "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz", + "integrity": "sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==", "dev": true, "engines": { "node": ">=8" @@ -7673,7 +7560,7 @@ }, "node_modules/currently-unhandled": { "version": "0.4.1", - "resolved": "https://registry.nlark.com/currently-unhandled/download/currently-unhandled-0.4.1.tgz?cache=0&sync_timestamp=1618847033604&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fcurrently-unhandled%2Fdownload%2Fcurrently-unhandled-0.4.1.tgz", + "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", "dev": true, "dependencies": { @@ -7742,8 +7629,8 @@ }, "node_modules/decompress": { "version": "4.2.1", - "resolved": "https://registry.nlark.com/decompress/download/decompress-4.2.1.tgz", - "integrity": "sha1-AH9VzGpiwFWvo3wH62pO4bdz8Rg=", + "resolved": "https://registry.npmjs.org/decompress/-/decompress-4.2.1.tgz", + "integrity": "sha512-e48kc2IjU+2Zw8cTb6VZcJQ3lgVbS4uuB1TfCHbiZIP/haNXm+SVyhu+87jts5/3ROpd82GSVCoNs/z8l4ZOaQ==", "dev": true, "dependencies": { "decompress-tar": "^4.0.0", @@ -7760,21 +7647,36 @@ } }, "node_modules/decompress-response": { - "version": "3.3.0", - "resolved": "https://registry.npm.taobao.org/decompress-response/download/decompress-response-3.3.0.tgz?cache=0&sync_timestamp=1613125280468&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdecompress-response%2Fdownload%2Fdecompress-response-3.3.0.tgz", - "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", + "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", "dev": true, "dependencies": { - "mimic-response": "^1.0.0" + "mimic-response": "^3.1.0" }, "engines": { - "node": ">=4" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/decompress-response/node_modules/mimic-response": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", + "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/decompress-tar": { "version": "4.1.1", - "resolved": "https://registry.npm.taobao.org/decompress-tar/download/decompress-tar-4.1.1.tgz", - "integrity": "sha1-cYy9P8sWIJcW5womuE57pFkuWvE=", + "resolved": "https://registry.npmjs.org/decompress-tar/-/decompress-tar-4.1.1.tgz", + "integrity": "sha512-JdJMaCrGpB5fESVyxwpCx4Jdj2AagLmv3y58Qy4GE6HMVjWz1FeVQk1Ct4Kye7PftcdOo/7U7UKzYBJgqnGeUQ==", "dev": true, "dependencies": { "file-type": "^5.2.0", @@ -7785,38 +7687,19 @@ "node": ">=4" } }, - "node_modules/decompress-tar/node_modules/bl": { - "version": "1.2.3", - "resolved": "https://registry.nlark.com/bl/download/bl-1.2.3.tgz", - "integrity": "sha1-Ho3YAULqyA1xWMnczAR/tiDgNec=", + "node_modules/decompress-tar/node_modules/file-type": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-5.2.0.tgz", + "integrity": "sha1-LdvqfHP/42No365J3DOMBYwritY=", "dev": true, - "dependencies": { - "readable-stream": "^2.3.5", - "safe-buffer": "^5.1.1" - } - }, - "node_modules/decompress-tar/node_modules/tar-stream": { - "version": "1.6.2", - "resolved": "https://registry.npm.taobao.org/tar-stream/download/tar-stream-1.6.2.tgz", - "integrity": "sha1-jqVdqzeXIlPZqa+Q/c1VmuQ1xVU=", - "dev": true, - "dependencies": { - "bl": "^1.0.0", - "buffer-alloc": "^1.2.0", - "end-of-stream": "^1.0.0", - "fs-constants": "^1.0.0", - "readable-stream": "^2.3.0", - "to-buffer": "^1.1.1", - "xtend": "^4.0.0" - }, "engines": { - "node": ">= 0.8.0" + "node": ">=4" } }, "node_modules/decompress-tarbz2": { "version": "4.1.1", - "resolved": "https://registry.npm.taobao.org/decompress-tarbz2/download/decompress-tarbz2-4.1.1.tgz", - "integrity": "sha1-MIKluIDqQEOBY0nzeLVsUWvho5s=", + "resolved": "https://registry.npmjs.org/decompress-tarbz2/-/decompress-tarbz2-4.1.1.tgz", + "integrity": "sha512-s88xLzf1r81ICXLAVQVzaN6ZmX4A6U4z2nMbOwobxkLoIIfjVMBg7TeguTUXkKeXni795B6y5rnvDw7rxhAq9A==", "dev": true, "dependencies": { "decompress-tar": "^4.1.0", @@ -7831,8 +7714,8 @@ }, "node_modules/decompress-tarbz2/node_modules/file-type": { "version": "6.2.0", - "resolved": "https://registry.nlark.com/file-type/download/file-type-6.2.0.tgz", - "integrity": "sha1-5QzXXTVv/tTjBtxPW89Sp5kDqRk=", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-6.2.0.tgz", + "integrity": "sha512-YPcTBDV+2Tm0VqjybVd32MHdlEGAtuxS3VAYsumFokDSMG+ROT5wawGlnHDoz7bfMcMDt9hxuXvXwoKUx2fkOg==", "dev": true, "engines": { "node": ">=4" @@ -7840,8 +7723,8 @@ }, "node_modules/decompress-targz": { "version": "4.1.1", - "resolved": "https://registry.npm.taobao.org/decompress-targz/download/decompress-targz-4.1.1.tgz", - "integrity": "sha1-wJvDXE0R894J8tLaU+neI+fOHu4=", + "resolved": "https://registry.npmjs.org/decompress-targz/-/decompress-targz-4.1.1.tgz", + "integrity": "sha512-4z81Znfr6chWnRDNfFNqLwPvm4db3WuZkqV+UgXQzSngG3CEKdBkw5jrv3axjjL96glyiiKjsxJG3X6WBZwX3w==", "dev": true, "dependencies": { "decompress-tar": "^4.1.1", @@ -7852,9 +7735,18 @@ "node": ">=4" } }, + "node_modules/decompress-targz/node_modules/file-type": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-5.2.0.tgz", + "integrity": "sha1-LdvqfHP/42No365J3DOMBYwritY=", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/decompress-unzip": { "version": "4.0.1", - "resolved": "https://registry.npm.taobao.org/decompress-unzip/download/decompress-unzip-4.0.1.tgz", + "resolved": "https://registry.npmjs.org/decompress-unzip/-/decompress-unzip-4.0.1.tgz", "integrity": "sha1-3qrM39FK6vhVePczroIQ+bSEj2k=", "dev": true, "dependencies": { @@ -7869,7 +7761,7 @@ }, "node_modules/decompress-unzip/node_modules/file-type": { "version": "3.9.0", - "resolved": "https://registry.nlark.com/file-type/download/file-type-3.9.0.tgz", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-3.9.0.tgz", "integrity": "sha1-JXoHg4TR24CHvESdEH1SpSZyuek=", "dev": true, "engines": { @@ -7878,7 +7770,7 @@ }, "node_modules/decompress-unzip/node_modules/get-stream": { "version": "2.3.1", - "resolved": "https://registry.npm.taobao.org/get-stream/download/get-stream-2.3.1.tgz", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-2.3.1.tgz", "integrity": "sha1-Xzj5PzRgCWZu4BUKBUFn+Rvdld4=", "dev": true, "dependencies": { @@ -7926,8 +7818,8 @@ }, "node_modules/deep-extend": { "version": "0.6.0", - "resolved": "https://registry.nlark.com/deep-extend/download/deep-extend-0.6.0.tgz", - "integrity": "sha1-xPp8lUBKF6nD6Mp+FTcxK3NjMKw=", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", "dev": true, "engines": { "node": ">=4.0.0" @@ -8054,8 +7946,8 @@ }, "node_modules/defer-to-connect": { "version": "2.0.1", - "resolved": "https://registry.nlark.com/defer-to-connect/download/defer-to-connect-2.0.1.tgz", - "integrity": "sha1-gBa9tBQ+RjK3ejRJxiNid95SBYc=", + "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.1.tgz", + "integrity": "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==", "dev": true, "engines": { "node": ">=10" @@ -8215,7 +8107,7 @@ }, "node_modules/delegates": { "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/delegates/download/delegates-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", "dev": true }, @@ -8245,7 +8137,7 @@ }, "node_modules/detect-libc": { "version": "1.0.3", - "resolved": "https://registry.npm.taobao.org/detect-libc/download/detect-libc-1.0.3.tgz", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=", "dev": true, "bin": { @@ -8430,8 +8322,8 @@ }, "node_modules/download": { "version": "6.2.5", - "resolved": "https://registry.npm.taobao.org/download/download/download-6.2.5.tgz", - "integrity": "sha1-rNalQuTNC7Qspwz8mMnkOwcDlxQ=", + "resolved": "https://registry.npmjs.org/download/-/download-6.2.5.tgz", + "integrity": "sha512-DpO9K1sXAST8Cpzb7kmEhogJxymyVUd5qz/vCOSyvwtp2Klj2XcDt5YUuasgxka44SxF0q5RriKIwJmQHG2AuA==", "dev": true, "dependencies": { "caw": "^2.0.0", @@ -8450,10 +8342,31 @@ "node": ">=4" } }, + "node_modules/download/node_modules/decompress-response": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", + "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", + "dev": true, + "dependencies": { + "mimic-response": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/download/node_modules/file-type": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-5.2.0.tgz", + "integrity": "sha1-LdvqfHP/42No365J3DOMBYwritY=", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/download/node_modules/got": { "version": "7.1.0", - "resolved": "https://registry.nlark.com/got/download/got-7.1.0.tgz", - "integrity": "sha1-BUUP2ECU5rvqVvRRpDqcKJFmOFo=", + "resolved": "https://registry.npmjs.org/got/-/got-7.1.0.tgz", + "integrity": "sha512-Y5WMo7xKKq1muPsxD+KmrR8DH5auG7fBdDVueZwETwV6VytKyU9OX/ddpq2/1hp1vIPvVb4T81dKQz3BivkNLw==", "dev": true, "dependencies": { "decompress-response": "^3.2.0", @@ -8475,10 +8388,19 @@ "node": ">=4" } }, + "node_modules/download/node_modules/lowercase-keys": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", + "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/download/node_modules/p-cancelable": { "version": "0.3.0", - "resolved": "https://registry.nlark.com/p-cancelable/download/p-cancelable-0.3.0.tgz", - "integrity": "sha1-ueEjgAvOu3rBOkeb4ZW1B7mNMPo=", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-0.3.0.tgz", + "integrity": "sha512-RVbZPLso8+jFeq1MfNvgXtCRED2raz/dKpacfTNxsx6pLEpEomM7gah6VeHSYV3+vo0OAi4MkArtQcWWXuQoyw==", "dev": true, "engines": { "node": ">=4" @@ -8486,7 +8408,7 @@ }, "node_modules/download/node_modules/url-parse-lax": { "version": "1.0.0", - "resolved": "https://registry.nlark.com/url-parse-lax/download/url-parse-lax-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", "dev": true, "dependencies": { @@ -8517,7 +8439,7 @@ }, "node_modules/duplexer3": { "version": "0.1.4", - "resolved": "https://registry.npm.taobao.org/duplexer3/download/duplexer3-0.1.4.tgz", + "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=", "dev": true }, @@ -8749,8 +8671,8 @@ }, "node_modules/escape-goat": { "version": "2.1.1", - "resolved": "https://registry.npm.taobao.org/escape-goat/download/escape-goat-2.1.1.tgz", - "integrity": "sha1-Gy3HcANnbEV+x2Cy3GjttkgYhnU=", + "resolved": "https://registry.npmjs.org/escape-goat/-/escape-goat-2.1.1.tgz", + "integrity": "sha512-8/uIhbG12Csjy2JEW7D9pHbreaVaS/OpN3ycnyvElTdwM5n6GY6W6e2IPemfvGZeUMqZ9A/3GqIZMgKnBhAw/Q==", "dev": true, "engines": { "node": ">=8" @@ -8770,6 +8692,27 @@ "node": ">=0.8.0" } }, + "node_modules/escodegen": { + "version": "1.14.3", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.14.3.tgz", + "integrity": "sha512-qFcX0XJkdg+PB3xjZZG/wKSuT1PnQWx57+TVSjIMmILd2yC/6ByYElPwJnslDsuWuSAp4AwJGumarAAmJch5Kw==", + "dependencies": { + "esprima": "^4.0.1", + "estraverse": "^4.2.0", + "esutils": "^2.0.2", + "optionator": "^0.8.1" + }, + "bin": { + "escodegen": "bin/escodegen.js", + "esgenerate": "bin/esgenerate.js" + }, + "engines": { + "node": ">=4.0" + }, + "optionalDependencies": { + "source-map": "~0.6.1" + } + }, "node_modules/eslint": { "version": "6.8.0", "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.8.0.tgz", @@ -9279,8 +9222,8 @@ }, "node_modules/exec-buffer": { "version": "3.2.0", - "resolved": "https://registry.npm.taobao.org/exec-buffer/download/exec-buffer-3.2.0.tgz", - "integrity": "sha1-sWhtvZBMfPmC5lLB9aebHlVzCCs=", + "resolved": "https://registry.npmjs.org/exec-buffer/-/exec-buffer-3.2.0.tgz", + "integrity": "sha512-wsiD+2Tp6BWHoVv3B+5Dcx6E7u5zky+hUwOHjuH2hKSLR3dvRmX8fk8UD8uqQixHs4Wk6eDmiegVrMPjKj7wpA==", "dev": true, "dependencies": { "execa": "^0.7.0", @@ -9306,7 +9249,7 @@ }, "node_modules/exec-buffer/node_modules/execa": { "version": "0.7.0", - "resolved": "https://registry.nlark.com/execa/download/execa-0.7.0.tgz", + "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", "dev": true, "dependencies": { @@ -9379,8 +9322,8 @@ }, "node_modules/executable": { "version": "4.1.1", - "resolved": "https://registry.npm.taobao.org/executable/download/executable-4.1.1.tgz", - "integrity": "sha1-QVMr/zYdPlevTXY7cFgtsY9dEzw=", + "resolved": "https://registry.npmjs.org/executable/-/executable-4.1.1.tgz", + "integrity": "sha512-8iA79xD3uAch729dUG8xaaBBFGaEa0wdD2VkYLFHwlqosEj/jT66AzcreRDSgV7ehnNLBW2WR5jIXwGKjVdTLg==", "dev": true, "dependencies": { "pify": "^2.2.0" @@ -9417,8 +9360,8 @@ }, "node_modules/expand-template": { "version": "2.0.3", - "resolved": "https://registry.npm.taobao.org/expand-template/download/expand-template-2.0.3.tgz", - "integrity": "sha1-bhSz/O4POmNA7LV9LokYaSBSpHw=", + "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz", + "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==", "dev": true, "engines": { "node": ">=6" @@ -9473,8 +9416,8 @@ }, "node_modules/ext-list": { "version": "2.2.2", - "resolved": "https://registry.npm.taobao.org/ext-list/download/ext-list-2.2.2.tgz", - "integrity": "sha1-C5jmTtgvWs8PKTG6v2khLvUt3Tc=", + "resolved": "https://registry.npmjs.org/ext-list/-/ext-list-2.2.2.tgz", + "integrity": "sha512-u+SQgsubraE6zItfVA0tBuCBhfU9ogSRnsvygI7wht9TS510oLkBRXBsqopeUG/GBOIQyKZO9wjTqIu/sf5zFA==", "dev": true, "dependencies": { "mime-db": "^1.28.0" @@ -9485,8 +9428,8 @@ }, "node_modules/ext-name": { "version": "5.0.0", - "resolved": "https://registry.nlark.com/ext-name/download/ext-name-5.0.0.tgz", - "integrity": "sha1-cHgZgdGD7hXROZPIgiBFxQbI8KY=", + "resolved": "https://registry.npmjs.org/ext-name/-/ext-name-5.0.0.tgz", + "integrity": "sha512-yblEwXAbGv1VQDmow7s38W77hzAgJAO50ztBLMcUyUBfxv1HC+LGwtiEN+Co6LtlqT/5uwVOxsD4TNIilWhwdQ==", "dev": true, "dependencies": { "ext-list": "^2.0.0", @@ -9604,9 +9547,9 @@ "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=" }, "node_modules/fastq": { - "version": "1.11.1", - "resolved": "https://registry.nlark.com/fastq/download/fastq-1.11.1.tgz?cache=0&sync_timestamp=1625392906410&other_urls=https%3A%2F%2Fregistry.nlark.com%2Ffastq%2Fdownload%2Ffastq-1.11.1.tgz", - "integrity": "sha1-XYF1quF9thlH+LFiz8f2MmTSKAc=", + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", + "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", "dev": true, "dependencies": { "reusify": "^1.0.4" @@ -9626,7 +9569,7 @@ }, "node_modules/fd-slicer": { "version": "1.1.0", - "resolved": "https://registry.npm.taobao.org/fd-slicer/download/fd-slicer-1.1.0.tgz", + "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", "integrity": "sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4=", "dev": true, "dependencies": { @@ -9698,12 +9641,21 @@ } }, "node_modules/file-type": { - "version": "5.2.0", - "resolved": "https://registry.nlark.com/file-type/download/file-type-5.2.0.tgz", - "integrity": "sha1-LdvqfHP/42No365J3DOMBYwritY=", + "version": "14.7.1", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-14.7.1.tgz", + "integrity": "sha512-sXAMgFk67fQLcetXustxfKX+PZgHIUFn96Xld9uH8aXPdX3xOp0/jg9OdouVTvQrf7mrn+wAa4jN/y9fUOOiRA==", "dev": true, + "dependencies": { + "readable-web-to-node-stream": "^2.0.0", + "strtok3": "^6.0.3", + "token-types": "^2.0.0", + "typedarray-to-buffer": "^3.1.5" + }, "engines": { - "node": ">=4" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sindresorhus/file-type?sponsor=1" } }, "node_modules/file-uri-to-path": { @@ -9713,7 +9665,7 @@ }, "node_modules/filename-reserved-regex": { "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/filename-reserved-regex/download/filename-reserved-regex-2.0.0.tgz", + "resolved": "https://registry.npmjs.org/filename-reserved-regex/-/filename-reserved-regex-2.0.0.tgz", "integrity": "sha1-q/c9+rc10EVECr/qLZHzieu/oik=", "dev": true, "engines": { @@ -9722,8 +9674,8 @@ }, "node_modules/filenamify": { "version": "2.1.0", - "resolved": "https://registry.nlark.com/filenamify/download/filenamify-2.1.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.nlark.com%2Ffilenamify%2Fdownload%2Ffilenamify-2.1.0.tgz", - "integrity": "sha1-iPr0lfsbR6v9YSMAACoWIoxnfuk=", + "resolved": "https://registry.npmjs.org/filenamify/-/filenamify-2.1.0.tgz", + "integrity": "sha512-ICw7NTT6RsDp2rnYKVd8Fu4cr6ITzGy3+u4vUujPkabyaz+03F24NWEX7fs5fp+kBonlaqPH8fAO2NM+SXt/JA==", "dev": true, "dependencies": { "filename-reserved-regex": "^2.0.0", @@ -9836,8 +9788,8 @@ }, "node_modules/find-versions": { "version": "3.2.0", - "resolved": "https://registry.nlark.com/find-versions/download/find-versions-3.2.0.tgz?cache=0&sync_timestamp=1619599444272&other_urls=https%3A%2F%2Fregistry.nlark.com%2Ffind-versions%2Fdownload%2Ffind-versions-3.2.0.tgz", - "integrity": "sha1-ECl/mAMKeGgpaBaQVF72We0dJU4=", + "resolved": "https://registry.npmjs.org/find-versions/-/find-versions-3.2.0.tgz", + "integrity": "sha512-P8WRou2S+oe222TOCHitLy8zj+SIsVJh52VP4lvXkaFVnOFFdoWv1H1Jjvel1aI6NCFOAaeAVm8qrI0odiLcww==", "dev": true, "dependencies": { "semver-regex": "^2.0.0" @@ -10000,8 +9952,8 @@ }, "node_modules/fs-constants": { "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/fs-constants/download/fs-constants-1.0.0.tgz", - "integrity": "sha1-a+Dem+mYzhavivwkSXue6bfM2a0=", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", "dev": true }, "node_modules/fs-extra": { @@ -10074,7 +10026,7 @@ }, "node_modules/gauge": { "version": "2.7.4", - "resolved": "https://registry.npm.taobao.org/gauge/download/gauge-2.7.4.tgz", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", "dev": true, "dependencies": { @@ -10090,7 +10042,7 @@ }, "node_modules/gauge/node_modules/is-fullwidth-code-point": { "version": "1.0.0", - "resolved": "https://registry.nlark.com/is-fullwidth-code-point/download/is-fullwidth-code-point-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", "dev": true, "dependencies": { @@ -10102,7 +10054,7 @@ }, "node_modules/gauge/node_modules/string-width": { "version": "1.0.2", - "resolved": "https://registry.nlark.com/string-width/download/string-width-1.0.2.tgz", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "dev": true, "dependencies": { @@ -10160,8 +10112,8 @@ }, "node_modules/get-proxy": { "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/get-proxy/download/get-proxy-2.1.0.tgz", - "integrity": "sha1-NJ8rTZHUTE1NTpy6KtkBQ/rF75M=", + "resolved": "https://registry.npmjs.org/get-proxy/-/get-proxy-2.1.0.tgz", + "integrity": "sha512-zmZIaQTWnNQb4R4fJUEp/FC51eZsc6EkErspy3xtIYStaq8EB/hDIWipxsal+E8rz0qD7f2sL/NA9Xee4RInJw==", "dev": true, "dependencies": { "npm-conf": "^1.1.0" @@ -10172,7 +10124,7 @@ }, "node_modules/get-stdin": { "version": "4.0.1", - "resolved": "https://registry.npm.taobao.org/get-stdin/download/get-stdin-4.0.1.tgz?cache=0&sync_timestamp=1618557719783&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fget-stdin%2Fdownload%2Fget-stdin-4.0.1.tgz", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=", "dev": true, "engines": { @@ -10206,7 +10158,7 @@ }, "node_modules/github-from-package": { "version": "0.0.0", - "resolved": "https://registry.npm.taobao.org/github-from-package/download/github-from-package-0.0.0.tgz", + "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", "integrity": "sha1-l/tdlr/eiXMxPyDoKI75oWf6ZM4=", "dev": true }, @@ -10259,8 +10211,8 @@ }, "node_modules/global-dirs": { "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/global-dirs/download/global-dirs-3.0.0.tgz?cache=0&sync_timestamp=1610454716901&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fglobal-dirs%2Fdownload%2Fglobal-dirs-3.0.0.tgz", - "integrity": "sha1-cKdv6E6jFas3sfVXbL3n1I73JoY=", + "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-3.0.0.tgz", + "integrity": "sha512-v8ho2DS5RiCjftj1nD9NmnfaOzTdud7RRnVd9kFNOjqZbISlx5DQ+OrTkywgd0dIt7oFCvKetZSHoHcP3sDdiA==", "dev": true, "dependencies": { "ini": "2.0.0" @@ -10274,8 +10226,8 @@ }, "node_modules/global-dirs/node_modules/ini": { "version": "2.0.0", - "resolved": "https://registry.nlark.com/ini/download/ini-2.0.0.tgz", - "integrity": "sha1-5f1Vbs3VcmvpePoQAYYurLCpS8U=", + "resolved": "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz", + "integrity": "sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==", "dev": true, "engines": { "node": ">=10" @@ -10347,8 +10299,8 @@ }, "node_modules/got": { "version": "11.8.2", - "resolved": "https://registry.nlark.com/got/download/got-11.8.2.tgz", - "integrity": "sha1-ers5Weoowx81dvFXbB7/ziPzNZk=", + "resolved": "https://registry.npmjs.org/got/-/got-11.8.2.tgz", + "integrity": "sha512-D0QywKgIe30ODs+fm8wMZiAcZjypcCodPNuMz5H9Mny7RJ+IjJ10BdmGW7OM7fHXP+O7r6ZwapQ/YQmMSvB0UQ==", "dev": true, "dependencies": { "@sindresorhus/is": "^4.0.0", @@ -10370,51 +10322,6 @@ "url": "https://github.com/sindresorhus/got?sponsor=1" } }, - "node_modules/got/node_modules/decompress-response": { - "version": "6.0.0", - "resolved": "https://registry.npm.taobao.org/decompress-response/download/decompress-response-6.0.0.tgz?cache=0&sync_timestamp=1613125280468&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdecompress-response%2Fdownload%2Fdecompress-response-6.0.0.tgz", - "integrity": "sha1-yjh2Et234QS9FthaqwDV7PCcZvw=", - "dev": true, - "dependencies": { - "mimic-response": "^3.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/got/node_modules/lowercase-keys": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/lowercase-keys/download/lowercase-keys-2.0.0.tgz", - "integrity": "sha1-JgPni3tLAAbLyi+8yKMgJVislHk=", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/got/node_modules/mimic-response": { - "version": "3.1.0", - "resolved": "https://registry.nlark.com/mimic-response/download/mimic-response-3.1.0.tgz", - "integrity": "sha1-LR1Zr5wbEpgVrMwsRqAipc4fo8k=", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/got/node_modules/responselike": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/responselike/download/responselike-2.0.0.tgz", - "integrity": "sha1-JjkbzDF091D5p56sxAoSpcQtdyM=", - "dev": true, - "dependencies": { - "lowercase-keys": "^2.0.0" - } - }, "node_modules/graceful-fs": { "version": "4.2.6", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz", @@ -10442,6 +10349,19 @@ "node": ">=6" } }, + "node_modules/hammerjs": { + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/hammerjs/-/hammerjs-2.0.8.tgz", + "integrity": "sha1-BO93hiz/K7edMPdpIJWTAiK/YPE=", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/hamsterjs": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/hamsterjs/-/hamsterjs-1.1.3.tgz", + "integrity": "sha512-q4XBr7hnxx1WyZA8mpVDuZVa1YXaR0WZaFSBxnj8hUXltuqXJOt5yuWYkAbMXsj+q0REDUO990+/TuxEadXFyg==" + }, "node_modules/handle-thing": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/handle-thing/-/handle-thing-2.0.1.tgz", @@ -10483,7 +10403,7 @@ }, "node_modules/has-ansi": { "version": "2.0.0", - "resolved": "https://registry.nlark.com/has-ansi/download/has-ansi-2.0.0.tgz", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", "dev": true, "dependencies": { @@ -10512,8 +10432,8 @@ }, "node_modules/has-symbol-support-x": { "version": "1.4.2", - "resolved": "https://registry.npm.taobao.org/has-symbol-support-x/download/has-symbol-support-x-1.4.2.tgz", - "integrity": "sha1-FAn5i8ACR9pF2mfO4KNvKC/yZFU=", + "resolved": "https://registry.npmjs.org/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz", + "integrity": "sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw==", "dev": true, "engines": { "node": "*" @@ -10533,8 +10453,8 @@ }, "node_modules/has-to-string-tag-x": { "version": "1.4.1", - "resolved": "https://registry.npm.taobao.org/has-to-string-tag-x/download/has-to-string-tag-x-1.4.1.tgz", - "integrity": "sha1-oEWrOD17SyASoAFIqwql8pAETU0=", + "resolved": "https://registry.npmjs.org/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz", + "integrity": "sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw==", "dev": true, "dependencies": { "has-symbol-support-x": "^1.4.1" @@ -10545,7 +10465,7 @@ }, "node_modules/has-unicode": { "version": "2.0.1", - "resolved": "https://registry.npm.taobao.org/has-unicode/download/has-unicode-2.0.1.tgz", + "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", "dev": true }, @@ -10587,8 +10507,8 @@ }, "node_modules/has-yarn": { "version": "2.1.0", - "resolved": "https://registry.nlark.com/has-yarn/download/has-yarn-2.1.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fhas-yarn%2Fdownload%2Fhas-yarn-2.1.0.tgz", - "integrity": "sha1-E34RNUp7W/EapctknPDG8/8rLnc=", + "resolved": "https://registry.npmjs.org/has-yarn/-/has-yarn-2.1.0.tgz", + "integrity": "sha512-UqBRqi4ju7T+TqGNdqAO0PaSVGsDGJUBQvk9eUWNGRY1CFGDzYhLWoM7JQEemnlvVcv/YEmc2wNW8BC24EnUsw==", "dev": true, "engines": { "node": ">=8" @@ -10831,8 +10751,8 @@ }, "node_modules/http-cache-semantics": { "version": "4.1.0", - "resolved": "https://registry.nlark.com/http-cache-semantics/download/http-cache-semantics-4.1.0.tgz", - "integrity": "sha1-SekcXL82yblLz81xwj1SSex045A=", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz", + "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==", "dev": true }, "node_modules/http-deceiver": { @@ -10920,8 +10840,8 @@ }, "node_modules/http2-wrapper": { "version": "1.0.3", - "resolved": "https://registry.nlark.com/http2-wrapper/download/http2-wrapper-1.0.3.tgz?cache=0&sync_timestamp=1626124919738&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fhttp2-wrapper%2Fdownload%2Fhttp2-wrapper-1.0.3.tgz", - "integrity": "sha1-uPVeDB8l1OvQizsMLAeflZCACz0=", + "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-1.0.3.tgz", + "integrity": "sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg==", "dev": true, "dependencies": { "quick-lru": "^5.1.1", @@ -11001,8 +10921,8 @@ }, "node_modules/imagemin": { "version": "8.0.0", - "resolved": "https://registry.nlark.com/imagemin/download/imagemin-8.0.0.tgz?cache=0&sync_timestamp=1618999751113&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fimagemin%2Fdownload%2Fimagemin-8.0.0.tgz", - "integrity": "sha1-1weSDWx6f4synS4C2MeNXcyCY1Y=", + "resolved": "https://registry.npmjs.org/imagemin/-/imagemin-8.0.0.tgz", + "integrity": "sha512-z/SoCabSI9nYbCefdu1xgCJJ+KMjsu17dlaL7sGXAdaljIg7K32TUuj9Vt9jMjBZJd/qyWXJ+FvjChkvc2mXOw==", "dev": true, "dependencies": { "file-type": "^14.6.0", @@ -11018,8 +10938,8 @@ }, "node_modules/imagemin-optipng": { "version": "8.0.0", - "resolved": "https://registry.npm.taobao.org/imagemin-optipng/download/imagemin-optipng-8.0.0.tgz", - "integrity": "sha1-uI5c9tolzIR54HzfOMOuBHnffvI=", + "resolved": "https://registry.npmjs.org/imagemin-optipng/-/imagemin-optipng-8.0.0.tgz", + "integrity": "sha512-CUGfhfwqlPjAC0rm8Fy+R2DJDBGjzy2SkfyT09L8rasnF9jSoHFqJ1xxSZWK6HVPZBMhGPMxCTL70OgTHlLF5A==", "dev": true, "dependencies": { "exec-buffer": "^3.0.0", @@ -11030,10 +10950,19 @@ "node": ">=10" } }, + "node_modules/imagemin-optipng/node_modules/is-png": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-png/-/is-png-2.0.0.tgz", + "integrity": "sha512-4KPGizaVGj2LK7xwJIz8o5B2ubu1D/vcQsgOGFEDlpcvgZHto4gBnyd0ig7Ws+67ixmwKoNmu0hYnpo6AaKb5g==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/imagemin-zopfli": { "version": "7.0.0", - "resolved": "https://registry.npm.taobao.org/imagemin-zopfli/download/imagemin-zopfli-7.0.0.tgz", - "integrity": "sha1-pE2qO7gOJiDNHciD2COyC003iNY=", + "resolved": "https://registry.npmjs.org/imagemin-zopfli/-/imagemin-zopfli-7.0.0.tgz", + "integrity": "sha512-nmffj58rVb0O3AlCZLBBVKGyZ5MYPZZfKxUhvA7bwPGougHl/F7EUKSse9jkgXjdvtJYG2ojJeh5N67mYgBM9g==", "dev": true, "dependencies": { "exec-buffer": "^3.0.0", @@ -11044,10 +10973,19 @@ "node": ">=10" } }, + "node_modules/imagemin-zopfli/node_modules/is-png": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-png/-/is-png-2.0.0.tgz", + "integrity": "sha512-4KPGizaVGj2LK7xwJIz8o5B2ubu1D/vcQsgOGFEDlpcvgZHto4gBnyd0ig7Ws+67ixmwKoNmu0hYnpo6AaKb5g==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/imagemin/node_modules/array-union": { "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/array-union/download/array-union-2.1.0.tgz?cache=0&sync_timestamp=1614624262896&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Farray-union%2Fdownload%2Farray-union-2.1.0.tgz", - "integrity": "sha1-t5hCCtvrHego2ErNii4j0+/oXo0=", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", "dev": true, "engines": { "node": ">=8" @@ -11067,8 +11005,8 @@ }, "node_modules/imagemin/node_modules/dir-glob": { "version": "3.0.1", - "resolved": "https://registry.npm.taobao.org/dir-glob/download/dir-glob-3.0.1.tgz", - "integrity": "sha1-Vtv3PZkqSpO6FYT0U0Bj/S5BcX8=", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", "dev": true, "dependencies": { "path-type": "^4.0.0" @@ -11079,8 +11017,8 @@ }, "node_modules/imagemin/node_modules/fast-glob": { "version": "3.2.7", - "resolved": "https://registry.nlark.com/fast-glob/download/fast-glob-3.2.7.tgz", - "integrity": "sha1-/Wy3otfpqnp4RhEehaGW1rL3ZqE=", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.7.tgz", + "integrity": "sha512-rYGMRwip6lUMvYD3BTScMwT1HtAs2d71SMv66Vrxs0IekGZEjhM0pcMfjQPnknBt2zeCwQMEupiN02ZP4DiT1Q==", "dev": true, "dependencies": { "@nodelib/fs.stat": "^2.0.2", @@ -11093,24 +11031,6 @@ "node": ">=8" } }, - "node_modules/imagemin/node_modules/file-type": { - "version": "14.7.1", - "resolved": "https://registry.nlark.com/file-type/download/file-type-14.7.1.tgz", - "integrity": "sha1-90hzKz5wR4v/Uw4c8Owv4zYIsbs=", - "dev": true, - "dependencies": { - "readable-web-to-node-stream": "^2.0.0", - "strtok3": "^6.0.3", - "token-types": "^2.0.0", - "typedarray-to-buffer": "^3.1.5" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sindresorhus/file-type?sponsor=1" - } - }, "node_modules/imagemin/node_modules/fill-range": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", @@ -11137,8 +11057,8 @@ }, "node_modules/imagemin/node_modules/globby": { "version": "11.0.4", - "resolved": "https://registry.nlark.com/globby/download/globby-11.0.4.tgz?cache=0&sync_timestamp=1623850192942&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fglobby%2Fdownload%2Fglobby-11.0.4.tgz", - "integrity": "sha1-LLr/d8Lypi5x6bKBOme5ejowAaU=", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.4.tgz", + "integrity": "sha512-9O4MVG9ioZJ08ffbcyVYyLOJLk5JQ688pJ4eMGLpdWLHq/Wr1D9BlriLQyL0E+jbkuePVZXYFj47QM/v093wHg==", "dev": true, "dependencies": { "array-union": "^2.1.0", @@ -11156,9 +11076,9 @@ } }, "node_modules/imagemin/node_modules/ignore": { - "version": "5.1.8", - "resolved": "https://registry.nlark.com/ignore/download/ignore-5.1.8.tgz", - "integrity": "sha1-8VCotQo0KJsz4i9YiavU2AFvDlc=", + "version": "5.1.9", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.9.tgz", + "integrity": "sha512-2zeMQpbKz5dhZ9IwL0gbxSW5w0NK/MSAMtNuhgIHEPmaU3vPdKPL0UdvUCXs5SS4JAwsBxysK5sFMW8ocFiVjQ==", "dev": true, "engines": { "node": ">= 4" @@ -11188,8 +11108,8 @@ }, "node_modules/imagemin/node_modules/path-type": { "version": "4.0.0", - "resolved": "https://registry.nlark.com/path-type/download/path-type-4.0.0.tgz", - "integrity": "sha1-hO0BwKe6OAr+CdkKjBgNzZ0DBDs=", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", "dev": true, "engines": { "node": ">=8" @@ -11197,8 +11117,8 @@ }, "node_modules/imagemin/node_modules/slash": { "version": "3.0.0", - "resolved": "https://registry.nlark.com/slash/download/slash-3.0.0.tgz", - "integrity": "sha1-ZTm+hwwWWtvVJAIg2+Nh8bxNRjQ=", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", "dev": true, "engines": { "node": ">=8" @@ -11264,12 +11184,12 @@ } }, "node_modules/import-lazy": { - "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/import-lazy/download/import-lazy-2.1.0.tgz", - "integrity": "sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-3.1.0.tgz", + "integrity": "sha512-8/gvXvX2JMn0F+CDlSC4l6kOmVaLOO3XLkksI7CI3Ud95KDYJuYur2b9P/PUt/i/pDAMd/DulQsNbbbmRRsDIQ==", "dev": true, "engines": { - "node": ">=4" + "node": ">=6" } }, "node_modules/import-local": { @@ -11298,7 +11218,7 @@ }, "node_modules/indent-string": { "version": "2.1.0", - "resolved": "https://registry.nlark.com/indent-string/download/indent-string-2.1.0.tgz?cache=0&sync_timestamp=1618847271946&other_urls=https%3A%2F%2Fregistry.nlark.com%2Findent-string%2Fdownload%2Findent-string-2.1.0.tgz", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", "dev": true, "dependencies": { @@ -11335,8 +11255,8 @@ }, "node_modules/ini": { "version": "1.3.8", - "resolved": "https://registry.nlark.com/ini/download/ini-1.3.8.tgz", - "integrity": "sha1-op2kJbSIBvNHZ6Tvzjlyaa8oQyw=", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", "dev": true }, "node_modules/inquirer": { @@ -11458,7 +11378,7 @@ }, "node_modules/into-stream": { "version": "3.1.0", - "resolved": "https://registry.npm.taobao.org/into-stream/download/into-stream-3.1.0.tgz", + "resolved": "https://registry.npmjs.org/into-stream/-/into-stream-3.1.0.tgz", "integrity": "sha1-lvsKk2wSur1v8XUqF9BWFqvQlMY=", "dev": true, "dependencies": { @@ -11727,8 +11647,8 @@ }, "node_modules/is-finite": { "version": "1.1.0", - "resolved": "https://registry.nlark.com/is-finite/download/is-finite-1.1.0.tgz", - "integrity": "sha1-kEE1x3+0LAZB1qobzbxNqo2ggvM=", + "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.1.0.tgz", + "integrity": "sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w==", "dev": true, "engines": { "node": ">=0.10.0" @@ -11758,8 +11678,8 @@ }, "node_modules/is-installed-globally": { "version": "0.4.0", - "resolved": "https://registry.npm.taobao.org/is-installed-globally/download/is-installed-globally-0.4.0.tgz?cache=0&sync_timestamp=1610875398433&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fis-installed-globally%2Fdownload%2Fis-installed-globally-0.4.0.tgz", - "integrity": "sha1-mg/UB5ScMPhutpWe8beZTtC3tSA=", + "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.4.0.tgz", + "integrity": "sha512-iwGqO3J21aaSkC7jWnHP/difazwS7SFeIqxv6wEtLU8Y5KlzFTjyqcSIT0d8s4+dDhKytsk9PJZ2BkS5eZwQRQ==", "dev": true, "dependencies": { "global-dirs": "^3.0.0", @@ -11774,8 +11694,8 @@ }, "node_modules/is-installed-globally/node_modules/is-path-inside": { "version": "3.0.3", - "resolved": "https://registry.nlark.com/is-path-inside/download/is-path-inside-3.0.3.tgz?cache=0&sync_timestamp=1620046845369&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fis-path-inside%2Fdownload%2Fis-path-inside-3.0.3.tgz", - "integrity": "sha1-0jE2LlOgf/Kw4Op/7QSRYf/RYoM=", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", "dev": true, "engines": { "node": ">=8" @@ -11783,8 +11703,8 @@ }, "node_modules/is-interactive": { "version": "1.0.0", - "resolved": "https://registry.nlark.com/is-interactive/download/is-interactive-1.0.0.tgz", - "integrity": "sha1-zqbmrlyHCnsKAAQHC3tYfgJSkS4=", + "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz", + "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==", "dev": true, "engines": { "node": ">=8" @@ -11792,7 +11712,7 @@ }, "node_modules/is-natural-number": { "version": "4.0.1", - "resolved": "https://registry.npm.taobao.org/is-natural-number/download/is-natural-number-4.0.1.tgz", + "resolved": "https://registry.npmjs.org/is-natural-number/-/is-natural-number-4.0.1.tgz", "integrity": "sha1-q5124dtM7VHjXeDHLr7PCfc0zeg=", "dev": true }, @@ -11810,8 +11730,8 @@ }, "node_modules/is-npm": { "version": "5.0.0", - "resolved": "https://registry.nlark.com/is-npm/download/is-npm-5.0.0.tgz", - "integrity": "sha1-Q+jWXMVuG2f41HJiz2ZwmRk/Rag=", + "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-5.0.0.tgz", + "integrity": "sha512-WW/rQLOazUq+ST/bCAVBp/2oMERWLsR7OrKyt052dNDk4DHcDE0/7QSXITlmi+VBcV13DfIbysG3tZJm5RfdBA==", "dev": true, "engines": { "node": ">=10" @@ -11854,8 +11774,8 @@ }, "node_modules/is-object": { "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/is-object/download/is-object-1.0.2.tgz", - "integrity": "sha1-pWVS4cZlyelQtKAlRh2ofnL4b88=", + "resolved": "https://registry.npmjs.org/is-object/-/is-object-1.0.2.tgz", + "integrity": "sha512-2rRIahhZr2UWb45fIOuvZGpFtz0TyOZLf32KxBbSoUCeZR495zCKlWUKKUByk3geS2eAs7ZAABt0Y/Rx0GiQGA==", "dev": true, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -11915,12 +11835,15 @@ } }, "node_modules/is-png": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/is-png/download/is-png-2.0.0.tgz", - "integrity": "sha1-7oy8npsFBCXO3utKb7dKZJsKSo0=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-png/-/is-png-3.0.0.tgz", + "integrity": "sha512-waa2qEuqgLjjYT14KOUQqAEIRRIv7ttkzPVctY/qv+IAKnzXf+JAPKQas50RgO0ECPDUG/iB1zQmwpyB9kkZtQ==", "dev": true, "engines": { - "node": ">=8" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/is-regex": { @@ -11947,8 +11870,8 @@ }, "node_modules/is-retry-allowed": { "version": "1.2.0", - "resolved": "https://registry.npm.taobao.org/is-retry-allowed/download/is-retry-allowed-1.2.0.tgz?cache=0&sync_timestamp=1618646442055&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fis-retry-allowed%2Fdownload%2Fis-retry-allowed-1.2.0.tgz", - "integrity": "sha1-13hIi9CkZmo76KFIK58rqv7eqLQ=", + "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz", + "integrity": "sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg==", "dev": true, "engines": { "node": ">=0.10.0" @@ -11997,8 +11920,8 @@ }, "node_modules/is-unicode-supported": { "version": "0.1.0", - "resolved": "https://registry.nlark.com/is-unicode-supported/download/is-unicode-supported-0.1.0.tgz?cache=0&sync_timestamp=1625294010675&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fis-unicode-supported%2Fdownload%2Fis-unicode-supported-0.1.0.tgz", - "integrity": "sha1-PybHaoCVk7Ur+i7LVxDtJ3m1Iqc=", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", "dev": true, "engines": { "node": ">=10" @@ -12009,7 +11932,7 @@ }, "node_modules/is-utf8": { "version": "0.2.1", - "resolved": "https://registry.nlark.com/is-utf8/download/is-utf8-0.2.1.tgz", + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", "dev": true }, @@ -12031,8 +11954,8 @@ }, "node_modules/is-yarn-global": { "version": "0.3.0", - "resolved": "https://registry.nlark.com/is-yarn-global/download/is-yarn-global-0.3.0.tgz?cache=0&sync_timestamp=1619356824740&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fis-yarn-global%2Fdownload%2Fis-yarn-global-0.3.0.tgz", - "integrity": "sha1-1QLTOCWQ6jAEiTdGdUyJE5lz4jI=", + "resolved": "https://registry.npmjs.org/is-yarn-global/-/is-yarn-global-0.3.0.tgz", + "integrity": "sha512-VjSeb/lHmkoyd8ryPVIKvOCn4D1koMqY+vqyjjUfc3xyKtP4dYOxM44sZrnqQSzSds3xyOrUTLTC9LVCVgLngw==", "dev": true }, "node_modules/isarray": { @@ -12068,8 +11991,8 @@ }, "node_modules/isurl": { "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/isurl/download/isurl-1.0.0.tgz", - "integrity": "sha1-sn9PSfPNqj6kSgpbfzRi5u3DnWc=", + "resolved": "https://registry.npmjs.org/isurl/-/isurl-1.0.0.tgz", + "integrity": "sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w==", "dev": true, "dependencies": { "has-to-string-tag-x": "^1.2.0", @@ -12133,11 +12056,76 @@ "js-yaml": "bin/js-yaml.js" } }, + "node_modules/js2xmlparser": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/js2xmlparser/-/js2xmlparser-4.0.2.tgz", + "integrity": "sha512-6n4D8gLlLf1n5mNLQPRfViYzu9RATblzPEtm1SthMX1Pjao0r9YI9nw7ZIfRxQMERS87mcswrg+r/OYrPRX6jA==", + "dependencies": { + "xmlcreate": "^2.0.4" + } + }, "node_modules/jsbn": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" }, + "node_modules/jsdoc": { + "version": "3.6.7", + "resolved": "https://registry.npmjs.org/jsdoc/-/jsdoc-3.6.7.tgz", + "integrity": "sha512-sxKt7h0vzCd+3Y81Ey2qinupL6DpRSZJclS04ugHDNmRUXGzqicMJ6iwayhSA0S0DwwX30c5ozyUthr1QKF6uw==", + "dependencies": { + "@babel/parser": "^7.9.4", + "bluebird": "^3.7.2", + "catharsis": "^0.9.0", + "escape-string-regexp": "^2.0.0", + "js2xmlparser": "^4.0.1", + "klaw": "^3.0.0", + "markdown-it": "^10.0.0", + "markdown-it-anchor": "^5.2.7", + "marked": "^2.0.3", + "mkdirp": "^1.0.4", + "requizzle": "^0.2.3", + "strip-json-comments": "^3.1.0", + "taffydb": "2.6.2", + "underscore": "~1.13.1" + }, + "bin": { + "jsdoc": "jsdoc.js" + }, + "engines": { + "node": ">=8.15.0" + } + }, + "node_modules/jsdoc/node_modules/escape-string-regexp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "engines": { + "node": ">=8" + } + }, + "node_modules/jsdoc/node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/jsdoc/node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/jsesc": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", @@ -12151,9 +12139,9 @@ } }, "node_modules/json-buffer": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/json-buffer/download/json-buffer-3.0.0.tgz", - "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", "dev": true }, "node_modules/json-parse-better-errors": { @@ -12302,28 +12290,22 @@ }, "node_modules/junk": { "version": "3.1.0", - "resolved": "https://registry.npm.taobao.org/junk/download/junk-3.1.0.tgz", - "integrity": "sha1-MUmQmNkCt+mMXZucgPQ0V6iKv6E=", + "resolved": "https://registry.npmjs.org/junk/-/junk-3.1.0.tgz", + "integrity": "sha512-pBxcB3LFc8QVgdggvZWyeys+hnrNWg4OcZIU/1X59k5jQdLBlCsYGRQaz234SqoRLTCgMH00fY0xRJH+F9METQ==", "dev": true, "engines": { "node": ">=8" } }, "node_modules/keyv": { - "version": "4.0.3", - "resolved": "https://registry.npm.taobao.org/keyv/download/keyv-4.0.3.tgz", - "integrity": "sha1-TzqpjeJUgDyvzSiWc0EI2qNeQlQ=", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.0.4.tgz", + "integrity": "sha512-vqNHbAc8BBsxk+7QBYLW0Y219rWcClspR6WSeoHYKG5mnsSoOH+BL1pWq02DDCVdvvuUny5rkBlzMRzoqc+GIg==", "dev": true, "dependencies": { "json-buffer": "3.0.1" } }, - "node_modules/keyv/node_modules/json-buffer": { - "version": "3.0.1", - "resolved": "https://registry.npm.taobao.org/json-buffer/download/json-buffer-3.0.1.tgz", - "integrity": "sha1-kziAKjDTtmBfvgYT4JQAjKjAWhM=", - "dev": true - }, "node_modules/killable": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/killable/-/killable-1.0.1.tgz", @@ -12341,6 +12323,14 @@ "node": ">=0.10.0" } }, + "node_modules/klaw": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/klaw/-/klaw-3.0.0.tgz", + "integrity": "sha512-0Fo5oir+O9jnXu5EefYbVK+mHMBeEVEy2cmctR1O1NECcCkPRreJKrS6Qt/j3KC2C148Dfo9i3pCmCMsdqGr0g==", + "dependencies": { + "graceful-fs": "^4.1.9" + } + }, "node_modules/klona": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/klona/-/klona-2.0.4.tgz", @@ -12352,8 +12342,8 @@ }, "node_modules/latest-version": { "version": "5.1.0", - "resolved": "https://registry.nlark.com/latest-version/download/latest-version-5.1.0.tgz?cache=0&sync_timestamp=1618847146540&other_urls=https%3A%2F%2Fregistry.nlark.com%2Flatest-version%2Fdownload%2Flatest-version-5.1.0.tgz", - "integrity": "sha1-EZ3+kI/jjRXfpD7NE/oS7Igy+s4=", + "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-5.1.0.tgz", + "integrity": "sha512-weT+r0kTkRQdCdYCNtkMwWXQTMEswKrFBkm4ckQOMVhhqhIMI1UT2hMj+1iigIhgSZm5gTmrRXBNoGUgaTY1xA==", "dev": true, "dependencies": { "package-json": "^6.3.0" @@ -12484,6 +12474,14 @@ "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=", "dev": true }, + "node_modules/linkify-it": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-2.2.0.tgz", + "integrity": "sha512-GnAl/knGn+i1U/wjBz3akz2stz+HrHLsxMwHQGofCDfPvlf+gDKN58UtfmUquTY4/MXeE2x7k19KQmeoZi94Iw==", + "dependencies": { + "uc.micro": "^1.0.1" + } + }, "node_modules/load-json-file": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", @@ -12666,7 +12664,7 @@ }, "node_modules/logalot": { "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/logalot/download/logalot-2.1.0.tgz", + "resolved": "https://registry.npmjs.org/logalot/-/logalot-2.1.0.tgz", "integrity": "sha1-X46MkNME7fElMJUaVVSruMXj9VI=", "dev": true, "dependencies": { @@ -12679,7 +12677,7 @@ }, "node_modules/logalot/node_modules/figures": { "version": "1.7.0", - "resolved": "https://registry.nlark.com/figures/download/figures-1.7.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.nlark.com%2Ffigures%2Fdownload%2Ffigures-1.7.0.tgz", + "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", "dev": true, "dependencies": { @@ -12710,7 +12708,7 @@ }, "node_modules/longest": { "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/longest/download/longest-1.0.1.tgz", + "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", "dev": true, "engines": { @@ -12730,7 +12728,7 @@ }, "node_modules/loud-rejection": { "version": "1.6.0", - "resolved": "https://registry.npm.taobao.org/loud-rejection/download/loud-rejection-1.6.0.tgz", + "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", "dev": true, "dependencies": { @@ -12748,17 +12746,17 @@ "dev": true }, "node_modules/lowercase-keys": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/lowercase-keys/download/lowercase-keys-1.0.1.tgz", - "integrity": "sha1-b54wtHCE2XGnyCD/FabFFnt0wm8=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", + "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", "dev": true, "engines": { - "node": ">=0.10.0" + "node": ">=8" } }, "node_modules/lpad-align": { "version": "1.1.2", - "resolved": "https://registry.nlark.com/lpad-align/download/lpad-align-1.1.2.tgz", + "resolved": "https://registry.npmjs.org/lpad-align/-/lpad-align-1.1.2.tgz", "integrity": "sha1-IfYArBwwlcPG5JfuZyce4ISB/p4=", "dev": true, "dependencies": { @@ -12788,10 +12786,18 @@ "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=" }, + "node_modules/lz-string": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/lz-string/-/lz-string-1.4.4.tgz", + "integrity": "sha1-wNjq82BZ9wV5bh40SBHPTEmNOiY=", + "bin": { + "lz-string": "bin/bin.js" + } + }, "node_modules/make-dir": { "version": "1.3.0", - "resolved": "https://registry.nlark.com/make-dir/download/make-dir-1.3.0.tgz", - "integrity": "sha1-ecEDO4BRW9bSTsmTPoYMp17ifww=", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", + "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", "dev": true, "dependencies": { "pify": "^3.0.0" @@ -12810,7 +12816,7 @@ }, "node_modules/map-obj": { "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/map-obj/download/map-obj-1.0.1.tgz?cache=0&sync_timestamp=1617771341569&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmap-obj%2Fdownload%2Fmap-obj-1.0.1.tgz", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", "dev": true, "engines": { @@ -12828,6 +12834,45 @@ "node": ">=0.10.0" } }, + "node_modules/markdown-it": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-10.0.0.tgz", + "integrity": "sha512-YWOP1j7UbDNz+TumYP1kpwnP0aEa711cJjrAQrzd0UXlbJfc5aAq0F/PZHjiioqDC1NKgvIMX+o+9Bk7yuM2dg==", + "dependencies": { + "argparse": "^1.0.7", + "entities": "~2.0.0", + "linkify-it": "^2.0.0", + "mdurl": "^1.0.1", + "uc.micro": "^1.0.5" + }, + "bin": { + "markdown-it": "bin/markdown-it.js" + } + }, + "node_modules/markdown-it-anchor": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/markdown-it-anchor/-/markdown-it-anchor-5.3.0.tgz", + "integrity": "sha512-/V1MnLL/rgJ3jkMWo84UR+K+jF1cxNG1a+KwqeXqTIJ+jtA8aWSHuigx8lTzauiIjBDbwF3NcWQMotd0Dm39jA==", + "peerDependencies": { + "markdown-it": "*" + } + }, + "node_modules/markdown-it/node_modules/entities": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.0.3.tgz", + "integrity": "sha512-MyoZ0jgnLvB2X3Lg5HqpFmn1kybDiIfEQmKzTb5apr51Rb+T3KdmMiqa70T+bhGnyv7bQ6WMj2QMHpGMmlrUYQ==" + }, + "node_modules/marked": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/marked/-/marked-2.1.3.tgz", + "integrity": "sha512-/Q+7MGzaETqifOMWYEA7HVMaZb4XbcRfaOzcSsHZEith83KGlvaSG33u0SKu89Mj5h+T8V2hM+8O45Qc5XTgwA==", + "bin": { + "marked": "bin/marked" + }, + "engines": { + "node": ">= 10" + } + }, "node_modules/md5.js": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", @@ -12844,6 +12889,11 @@ "integrity": "sha512-iV3XNKw06j5Q7mi6h+9vbx23Tv7JkjEVgKHW4pimwyDGWm0OIQntJJ+u1C6mg6mK1EaTv42XQ7w76yuzH7M2cA==", "dev": true }, + "node_modules/mdurl": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz", + "integrity": "sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4=" + }, "node_modules/media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", @@ -12870,7 +12920,7 @@ }, "node_modules/meow": { "version": "3.7.0", - "resolved": "https://registry.nlark.com/meow/download/meow-3.7.0.tgz?cache=0&sync_timestamp=1626388195360&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fmeow%2Fdownload%2Fmeow-3.7.0.tgz", + "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", "dev": true, "dependencies": { @@ -12904,7 +12954,7 @@ }, "node_modules/meow/node_modules/load-json-file": { "version": "1.1.0", - "resolved": "https://registry.nlark.com/load-json-file/download/load-json-file-1.1.0.tgz", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", "dev": true, "dependencies": { @@ -12920,7 +12970,7 @@ }, "node_modules/meow/node_modules/parse-json": { "version": "2.2.0", - "resolved": "https://registry.nlark.com/parse-json/download/parse-json-2.2.0.tgz", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", "dev": true, "dependencies": { @@ -12944,7 +12994,7 @@ }, "node_modules/meow/node_modules/path-type": { "version": "1.1.0", - "resolved": "https://registry.nlark.com/path-type/download/path-type-1.1.0.tgz", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", "dev": true, "dependencies": { @@ -12967,7 +13017,7 @@ }, "node_modules/meow/node_modules/read-pkg": { "version": "1.1.0", - "resolved": "https://registry.nlark.com/read-pkg/download/read-pkg-1.1.0.tgz", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", "dev": true, "dependencies": { @@ -12981,7 +13031,7 @@ }, "node_modules/meow/node_modules/read-pkg-up": { "version": "1.0.1", - "resolved": "https://registry.nlark.com/read-pkg-up/download/read-pkg-up-1.0.1.tgz?cache=0&sync_timestamp=1618846971516&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fread-pkg-up%2Fdownload%2Fread-pkg-up-1.0.1.tgz", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", "dev": true, "dependencies": { @@ -12994,7 +13044,7 @@ }, "node_modules/meow/node_modules/strip-bom": { "version": "2.0.0", - "resolved": "https://registry.nlark.com/strip-bom/download/strip-bom-2.0.0.tgz", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", "dev": true, "dependencies": { @@ -13166,8 +13216,8 @@ }, "node_modules/mimic-response": { "version": "1.0.1", - "resolved": "https://registry.nlark.com/mimic-response/download/mimic-response-1.0.1.tgz", - "integrity": "sha1-SSNTiHju9CBjy4o+OweYeBSHqxs=", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", + "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", "dev": true, "engines": { "node": ">=4" @@ -13285,8 +13335,8 @@ }, "node_modules/mkdirp-classic": { "version": "0.5.3", - "resolved": "https://registry.nlark.com/mkdirp-classic/download/mkdirp-classic-0.5.3.tgz", - "integrity": "sha1-+hDJEVzG2IZb4iG6R+6b7XhgERM=", + "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", + "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", "dev": true }, "node_modules/moment": { @@ -13422,8 +13472,8 @@ }, "node_modules/napi-build-utils": { "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/napi-build-utils/download/napi-build-utils-1.0.2.tgz", - "integrity": "sha1-sf3cCyxG44Cgt6dvmE3UfEGhOAY=", + "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz", + "integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==", "dev": true }, "node_modules/natural-compare": { @@ -13460,9 +13510,9 @@ } }, "node_modules/node-abi": { - "version": "2.30.0", - "resolved": "https://registry.nlark.com/node-abi/download/node-abi-2.30.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fnode-abi%2Fdownload%2Fnode-abi-2.30.0.tgz", - "integrity": "sha1-i+U78+eUWjTuoQ4PyaWYJ3bPVQs=", + "version": "2.30.1", + "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.30.1.tgz", + "integrity": "sha512-/2D0wOQPgaUWzVSVgRMx+trKJRC2UG4SUc4oCJoXx9Uxjtp0Vy3/kt7zcbxHF8+Z/pK3UloLWzBISg72brfy1w==", "dev": true, "dependencies": { "semver": "^5.4.1" @@ -13479,8 +13529,8 @@ }, "node_modules/node-addon-api": { "version": "3.2.1", - "resolved": "https://registry.nlark.com/node-addon-api/download/node-addon-api-3.2.1.tgz", - "integrity": "sha1-gTJeCiEXeJwBKNq2Xn448HzroWE=", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-3.2.1.tgz", + "integrity": "sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A==", "dev": true }, "node_modules/node-fetch": { @@ -13620,8 +13670,8 @@ }, "node_modules/npm-conf": { "version": "1.1.3", - "resolved": "https://registry.npm.taobao.org/npm-conf/download/npm-conf-1.1.3.tgz", - "integrity": "sha1-JWzEe9DiGMJZxOlVC/QTvCGSr/k=", + "resolved": "https://registry.npmjs.org/npm-conf/-/npm-conf-1.1.3.tgz", + "integrity": "sha512-Yic4bZHJOt9RCFbRP3GgpqhScOY4HH3V2P8yBj6CeYq118Qr+BLXqT2JvpJ00mryLESpgOxf5XlFv4ZjXxLScw==", "dev": true, "dependencies": { "config-chain": "^1.1.11", @@ -13645,8 +13695,8 @@ }, "node_modules/npmlog": { "version": "4.1.2", - "resolved": "https://registry.nlark.com/npmlog/download/npmlog-4.1.2.tgz", - "integrity": "sha1-CKfyqL9zRgR3mp76StXMcXq7lUs=", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", + "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", "dev": true, "dependencies": { "are-we-there-yet": "~1.1.2", @@ -13675,7 +13725,7 @@ }, "node_modules/number-is-nan": { "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/number-is-nan/download/number-is-nan-1.0.1.tgz", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", "dev": true, "engines": { @@ -13940,15 +13990,14 @@ } }, "node_modules/optipng-bin": { - "version": "7.0.0", - "resolved": "https://registry.npm.taobao.org/optipng-bin/download/optipng-bin-7.0.0.tgz", - "integrity": "sha1-LfzGil8AbndG52rWTTF9b7fH+e0=", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/optipng-bin/-/optipng-bin-7.0.1.tgz", + "integrity": "sha512-W99mpdW7Nt2PpFiaO+74pkht7KEqkXkeRomdWXfEz3SALZ6hns81y/pm1dsGZ6ItUIfchiNIP6ORDr1zETU1jA==", "dev": true, "hasInstallScript": true, "dependencies": { "bin-build": "^3.0.0", - "bin-wrapper": "^4.0.0", - "logalot": "^2.0.0" + "bin-wrapper": "^4.0.0" }, "bin": { "optipng": "cli.js" @@ -14057,8 +14106,8 @@ }, "node_modules/os-filter-obj": { "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/os-filter-obj/download/os-filter-obj-2.0.0.tgz", - "integrity": "sha1-HAti1fOiRCdJotE55t3e5ugdjRY=", + "resolved": "https://registry.npmjs.org/os-filter-obj/-/os-filter-obj-2.0.0.tgz", + "integrity": "sha512-uksVLsqG3pVdzzPvmAHpBK0wKxYItuzZr7SziusRPoz67tGV8rL1szZ6IdeUrbqLjGDwApBtN29eEE3IqGHOjg==", "dev": true, "dependencies": { "arch": "^2.1.0" @@ -14077,8 +14126,8 @@ }, "node_modules/p-cancelable": { "version": "2.1.1", - "resolved": "https://registry.nlark.com/p-cancelable/download/p-cancelable-2.1.1.tgz", - "integrity": "sha1-qrf71BZYL6MqPbSYWcEiSHxe0s8=", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-2.1.1.tgz", + "integrity": "sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg==", "dev": true, "engines": { "node": ">=8" @@ -14086,7 +14135,7 @@ }, "node_modules/p-event": { "version": "1.3.0", - "resolved": "https://registry.nlark.com/p-event/download/p-event-1.3.0.tgz", + "resolved": "https://registry.npmjs.org/p-event/-/p-event-1.3.0.tgz", "integrity": "sha1-jmtPT2XHK8W2/ii3XtqHT5akoIU=", "dev": true, "dependencies": { @@ -14107,7 +14156,7 @@ }, "node_modules/p-is-promise": { "version": "1.1.0", - "resolved": "https://registry.nlark.com/p-is-promise/download/p-is-promise-1.1.0.tgz", + "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-1.1.0.tgz", "integrity": "sha1-nJRWmJ6fZYgBewQ01WCXZ1w9oF4=", "dev": true, "engines": { @@ -14172,7 +14221,7 @@ }, "node_modules/p-map-series": { "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/p-map-series/download/p-map-series-1.0.0.tgz?cache=0&sync_timestamp=1617950183954&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fp-map-series%2Fdownload%2Fp-map-series-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/p-map-series/-/p-map-series-1.0.0.tgz", "integrity": "sha1-v5j+V1cFZYqeE1G++4WuTB8Hvco=", "dev": true, "dependencies": { @@ -14184,8 +14233,8 @@ }, "node_modules/p-pipe": { "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/p-pipe/download/p-pipe-4.0.0.tgz?cache=0&sync_timestamp=1617892628060&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fp-pipe%2Fdownload%2Fp-pipe-4.0.0.tgz", - "integrity": "sha1-flQkVpNRsqtFKkeCasuTzgmtaiw=", + "resolved": "https://registry.npmjs.org/p-pipe/-/p-pipe-4.0.0.tgz", + "integrity": "sha512-HkPfFklpZQPUKBFXzKFB6ihLriIHxnmuQdK9WmLDwe4hf2PdhhfWT/FJa+pc3bA1ywvKXtedxIRmd4Y7BTXE4w==", "dev": true, "engines": { "node": ">=12" @@ -14196,7 +14245,7 @@ }, "node_modules/p-reduce": { "version": "1.0.0", - "resolved": "https://registry.nlark.com/p-reduce/download/p-reduce-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/p-reduce/-/p-reduce-1.0.0.tgz", "integrity": "sha1-GMKw3ZNqRpClKfgjH1ig/bakffo=", "dev": true, "engines": { @@ -14217,7 +14266,7 @@ }, "node_modules/p-timeout": { "version": "1.2.1", - "resolved": "https://registry.nlark.com/p-timeout/download/p-timeout-1.2.1.tgz", + "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-1.2.1.tgz", "integrity": "sha1-XrOzU7f86Z8QGhA4iAuwVOu+o4Y=", "dev": true, "dependencies": { @@ -14237,8 +14286,8 @@ }, "node_modules/package-json": { "version": "6.5.0", - "resolved": "https://registry.nlark.com/package-json/download/package-json-6.5.0.tgz", - "integrity": "sha1-b+7ayjXnVyWHbQsOZJdGl/7RRbA=", + "resolved": "https://registry.npmjs.org/package-json/-/package-json-6.5.0.tgz", + "integrity": "sha512-k3bdm2n25tkyxcjSKzB5x8kfVxlMdgsbPr0GkZcwHsLpba6cBjqCt1KlcChKEvxHIcTB1FVMuwoijZ26xex5MQ==", "dev": true, "dependencies": { "got": "^9.6.0", @@ -14252,8 +14301,8 @@ }, "node_modules/package-json/node_modules/@sindresorhus/is": { "version": "0.14.0", - "resolved": "https://registry.nlark.com/@sindresorhus/is/download/@sindresorhus/is-0.14.0.tgz", - "integrity": "sha1-n7OjzzEyMoFR81PeRjLgHlIQK+o=", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz", + "integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==", "dev": true, "engines": { "node": ">=6" @@ -14261,8 +14310,8 @@ }, "node_modules/package-json/node_modules/@szmarczak/http-timer": { "version": "1.1.2", - "resolved": "https://registry.nlark.com/@szmarczak/http-timer/download/@szmarczak/http-timer-1.1.2.tgz?cache=0&sync_timestamp=1626126261719&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40szmarczak%2Fhttp-timer%2Fdownload%2F%40szmarczak%2Fhttp-timer-1.1.2.tgz", - "integrity": "sha1-sWZeLEYaLNkvTBu/UNVFTeDUtCE=", + "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz", + "integrity": "sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==", "dev": true, "dependencies": { "defer-to-connect": "^1.0.1" @@ -14273,8 +14322,8 @@ }, "node_modules/package-json/node_modules/cacheable-request": { "version": "6.1.0", - "resolved": "https://registry.nlark.com/cacheable-request/download/cacheable-request-6.1.0.tgz", - "integrity": "sha1-IP+4vRYrpL4R6VZ9gj22UQUsqRI=", + "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-6.1.0.tgz", + "integrity": "sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg==", "dev": true, "dependencies": { "clone-response": "^1.0.2", @@ -14304,19 +14353,22 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/package-json/node_modules/cacheable-request/node_modules/lowercase-keys": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/lowercase-keys/download/lowercase-keys-2.0.0.tgz", - "integrity": "sha1-JgPni3tLAAbLyi+8yKMgJVislHk=", + "node_modules/package-json/node_modules/decompress-response": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", + "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", "dev": true, + "dependencies": { + "mimic-response": "^1.0.0" + }, "engines": { - "node": ">=8" + "node": ">=4" } }, "node_modules/package-json/node_modules/defer-to-connect": { "version": "1.1.3", - "resolved": "https://registry.nlark.com/defer-to-connect/download/defer-to-connect-1.1.3.tgz", - "integrity": "sha1-MxrgUMCNz3ifjIOnuB8O2U9KxZE=", + "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz", + "integrity": "sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==", "dev": true }, "node_modules/package-json/node_modules/get-stream": { @@ -14333,8 +14385,8 @@ }, "node_modules/package-json/node_modules/got": { "version": "9.6.0", - "resolved": "https://registry.nlark.com/got/download/got-9.6.0.tgz", - "integrity": "sha1-7fRefWf5lUVwXeH3u+7rEhdl7YU=", + "resolved": "https://registry.npmjs.org/got/-/got-9.6.0.tgz", + "integrity": "sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q==", "dev": true, "dependencies": { "@sindresorhus/is": "^0.14.0", @@ -14353,10 +14405,25 @@ "node": ">=8.6" } }, + "node_modules/package-json/node_modules/got/node_modules/lowercase-keys": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", + "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/package-json/node_modules/json-buffer": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", + "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=", + "dev": true + }, "node_modules/package-json/node_modules/keyv": { "version": "3.1.0", - "resolved": "https://registry.npm.taobao.org/keyv/download/keyv-3.1.0.tgz", - "integrity": "sha1-7MIoSG9pmR5J6UdkhaW+Ho/FxNk=", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz", + "integrity": "sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==", "dev": true, "dependencies": { "json-buffer": "3.0.0" @@ -14364,8 +14431,8 @@ }, "node_modules/package-json/node_modules/normalize-url": { "version": "4.5.1", - "resolved": "https://registry.nlark.com/normalize-url/download/normalize-url-4.5.1.tgz?cache=0&sync_timestamp=1625826787829&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fnormalize-url%2Fdownload%2Fnormalize-url-4.5.1.tgz", - "integrity": "sha1-DdkM8SiO4dExO4cIHJpZMu5IUYo=", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.1.tgz", + "integrity": "sha512-9UZCFRHQdNrfTpGg8+1INIg93B6zE0aXMVFkw1WFwvO4SlZywU6aLg5Of0Ap/PgcbSw4LNxvMWXMeugwMCX0AA==", "dev": true, "engines": { "node": ">=8" @@ -14373,13 +14440,31 @@ }, "node_modules/package-json/node_modules/p-cancelable": { "version": "1.1.0", - "resolved": "https://registry.nlark.com/p-cancelable/download/p-cancelable-1.1.0.tgz", - "integrity": "sha1-0HjRWjr0CSIMiG8dmgyi5EGrJsw=", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz", + "integrity": "sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==", "dev": true, "engines": { "node": ">=6" } }, + "node_modules/package-json/node_modules/responselike": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz", + "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=", + "dev": true, + "dependencies": { + "lowercase-keys": "^1.0.0" + } + }, + "node_modules/package-json/node_modules/responselike/node_modules/lowercase-keys": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", + "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/pako": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", @@ -14559,9 +14644,9 @@ } }, "node_modules/peek-readable": { - "version": "3.1.4", - "resolved": "https://registry.nlark.com/peek-readable/download/peek-readable-3.1.4.tgz", - "integrity": "sha1-9cO0Gk7rY6EyLEEx8LW6xxBbiS4=", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/peek-readable/-/peek-readable-4.0.1.tgz", + "integrity": "sha512-7qmhptnR0WMSpxT5rMHG9bW/mYSR1uqaPFj2MHvT+y/aOUu6msJijpKt5SkTDKySwg65OWG2JwTMBlgcbwMHrQ==", "dev": true, "engines": { "node": ">=8" @@ -14573,7 +14658,7 @@ }, "node_modules/pend": { "version": "1.2.0", - "resolved": "https://registry.nlark.com/pend/download/pend-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", "integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA=", "dev": true }, @@ -14683,8 +14768,8 @@ }, "node_modules/png2icons": { "version": "2.0.1", - "resolved": "https://registry.npm.taobao.org/png2icons/download/png2icons-2.0.1.tgz", - "integrity": "sha1-CdjxC3EwLpjKF40zJLxN7/m5ASQ=", + "resolved": "https://registry.npmjs.org/png2icons/-/png2icons-2.0.1.tgz", + "integrity": "sha512-GDEQJr8OG4e6JMp7mABtXFSEpgJa1CCpbQiAR+EjhkHJHnUL9zPPtbOrjsMD8gUbikgv3j7x404b0YJsV3aVFA==", "dev": true, "bin": { "png2icons": "png2icons-cli.js" @@ -15322,9 +15407,9 @@ } }, "node_modules/prebuild-install": { - "version": "6.1.3", - "resolved": "https://registry.nlark.com/prebuild-install/download/prebuild-install-6.1.3.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fprebuild-install%2Fdownload%2Fprebuild-install-6.1.3.tgz", - "integrity": "sha1-jqH51zhqCzD37yAkfjb4srgoJaI=", + "version": "6.1.4", + "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-6.1.4.tgz", + "integrity": "sha512-Z4vpywnK1lBg+zdPCVCsKq0xO66eEV9rWo2zrROGGiRS4JtueBOdlB1FnY8lcy7JsUud/Q3ijUxyWN26Ika0vQ==", "dev": true, "dependencies": { "detect-libc": "^1.0.3", @@ -15420,7 +15505,7 @@ }, "node_modules/proto-list": { "version": "1.2.4", - "resolved": "https://registry.npm.taobao.org/proto-list/download/proto-list-1.2.4.tgz", + "resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz", "integrity": "sha1-IS1b/hMYMGpCD2QCuOJv85ZHqEk=", "dev": true }, @@ -15449,6 +15534,117 @@ "pbts": "bin/pbts" } }, + "node_modules/protobufjs-cli-dbx": { + "version": "7.0.7", + "resolved": "https://registry.npmjs.org/protobufjs-cli-dbx/-/protobufjs-cli-dbx-7.0.7.tgz", + "integrity": "sha512-lP9nIEfV1fw1SjRBS5qpLEbBkImHHgtrYXzqX6s6Hn7hcuTDFwCXEy6Tzz4sAh4IgCKcjDT8ZK7AluerVHaGHQ==", + "dependencies": { + "chalk": "^2.4.1", + "escodegen": "^1.9.1", + "espree": "^3.5.4", + "estraverse": "^4.2.0", + "glob": "^7.1.2", + "jsdoc": "^3.4.2", + "minimist": "^1.2.0", + "semver": "^5.5.0", + "tmp": "0.0.31", + "uglify-js": "^3.3.25" + }, + "bin": { + "pbjs": "bin/pbjs", + "pbts": "bin/pbts" + }, + "peerDependencies": { + "protobufjs-dbx": "~7.0.0" + } + }, + "node_modules/protobufjs-cli-dbx/node_modules/acorn": { + "version": "5.7.4", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.4.tgz", + "integrity": "sha512-1D++VG7BhrtvQpNbBzovKNc1FLGGEE/oGe7b9xJm/RFHMBeUaUGpluV9RLjZa47YFdPcDAenEYuq9pQPcMdLJg==", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/protobufjs-cli-dbx/node_modules/acorn-jsx": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-3.0.1.tgz", + "integrity": "sha1-r9+UiPsezvyDSPb7IvRk4ypYs2s=", + "dependencies": { + "acorn": "^3.0.4" + } + }, + "node_modules/protobufjs-cli-dbx/node_modules/acorn-jsx/node_modules/acorn": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz", + "integrity": "sha1-ReN/s56No/JbruP/U2niu18iAXo=", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/protobufjs-cli-dbx/node_modules/espree": { + "version": "3.5.4", + "resolved": "https://registry.npmjs.org/espree/-/espree-3.5.4.tgz", + "integrity": "sha512-yAcIQxtmMiB/jL32dzEp2enBeidsB7xWPLNiw3IIkpVds1P+h7qF9YwJq1yUNzp2OKXgAprs4F61ih66UsoD1A==", + "dependencies": { + "acorn": "^5.5.0", + "acorn-jsx": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/protobufjs-cli-dbx/node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/protobufjs-cli-dbx/node_modules/tmp": { + "version": "0.0.31", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.31.tgz", + "integrity": "sha1-jzirlDjhcxXl29izZX6L+yd65Kc=", + "dependencies": { + "os-tmpdir": "~1.0.1" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/protobufjs-dbx": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/protobufjs-dbx/-/protobufjs-dbx-7.0.0.tgz", + "integrity": "sha512-y4ECgn5J39e4RqlbyQhwJF72nLuyY9JhkhnfTRr03/bx0aonZ/VfDSxrXls8RxLup7Hk2rx/fandTmtYO6XGZQ==", + "hasInstallScript": true, + "dependencies": { + "@protobufjs/aspromise": "^1.1.2", + "@protobufjs/base64": "^1.1.2", + "@protobufjs/codegen": "^2.0.4", + "@protobufjs/eventemitter": "^1.1.0", + "@protobufjs/fetch": "^1.1.0", + "@protobufjs/float": "^1.0.2", + "@protobufjs/inquire": "^1.1.0", + "@protobufjs/path": "^1.1.2", + "@protobufjs/pool": "^1.1.0", + "@protobufjs/utf8": "^1.1.0", + "@types/long": "^4.0.0", + "@types/node": "^10.1.0", + "long": "^4.0.0" + } + }, + "node_modules/protobufjs-dbx/node_modules/@types/node": { + "version": "10.17.60", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.60.tgz", + "integrity": "sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw==" + }, "node_modules/protobufjs/node_modules/@types/node": { "version": "13.13.52", "resolved": "https://registry.npmjs.org/@types/node/-/node-13.13.52.tgz", @@ -15533,8 +15729,8 @@ }, "node_modules/pupa": { "version": "2.1.1", - "resolved": "https://registry.nlark.com/pupa/download/pupa-2.1.1.tgz?cache=0&sync_timestamp=1626170133238&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fpupa%2Fdownload%2Fpupa-2.1.1.tgz", - "integrity": "sha1-9ej9SvwsXZeCj6pSNUnth0SiDWI=", + "resolved": "https://registry.npmjs.org/pupa/-/pupa-2.1.1.tgz", + "integrity": "sha512-l1jNAspIBSFqbT+y+5FosojNpVpF94nlI+wDUpqP9enwOTfHx9f0gh5nB96vl+6yTpsJsypeNrwfzPrKuHB41A==", "dev": true, "dependencies": { "escape-goat": "^2.0.0" @@ -15608,8 +15804,8 @@ }, "node_modules/queue-microtask": { "version": "1.2.3", - "resolved": "https://registry.npm.taobao.org/queue-microtask/download/queue-microtask-1.2.3.tgz?cache=0&sync_timestamp=1616391471040&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fqueue-microtask%2Fdownload%2Fqueue-microtask-1.2.3.tgz", - "integrity": "sha1-SSkii7xyTfrEPg77BYyve2z7YkM=", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", "dev": true, "funding": [ { @@ -15628,8 +15824,8 @@ }, "node_modules/quick-lru": { "version": "5.1.1", - "resolved": "https://registry.nlark.com/quick-lru/download/quick-lru-5.1.1.tgz", - "integrity": "sha1-NmST5rPkKjpoheLpnRj4D7eoyTI=", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", + "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==", "dev": true, "engines": { "node": ">=10" @@ -15681,8 +15877,8 @@ }, "node_modules/rc": { "version": "1.2.8", - "resolved": "https://registry.nlark.com/rc/download/rc-1.2.8.tgz", - "integrity": "sha1-zZJL9SAKB1uDwYjNa54hG3/A0+0=", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", "dev": true, "dependencies": { "deep-extend": "^0.6.0", @@ -15696,8 +15892,8 @@ }, "node_modules/read-chunk": { "version": "3.2.0", - "resolved": "https://registry.npm.taobao.org/read-chunk/download/read-chunk-3.2.0.tgz", - "integrity": "sha1-KYSv54ypv7vbdLGTh7+ehiicFso=", + "resolved": "https://registry.npmjs.org/read-chunk/-/read-chunk-3.2.0.tgz", + "integrity": "sha512-CEjy9LCzhmD7nUpJ1oVOE6s/hBkejlcJEgLQHVnQznOSilOPb+kpKktlLfFDK3/WP43+F80xkUTM2VOkYoSYvQ==", "dev": true, "dependencies": { "pify": "^4.0.1", @@ -15772,8 +15968,8 @@ }, "node_modules/readable-web-to-node-stream": { "version": "2.0.0", - "resolved": "https://registry.nlark.com/readable-web-to-node-stream/download/readable-web-to-node-stream-2.0.0.tgz", - "integrity": "sha1-dR5jL0ZlUqwNXEQMwBRwNS+TxLc=", + "resolved": "https://registry.npmjs.org/readable-web-to-node-stream/-/readable-web-to-node-stream-2.0.0.tgz", + "integrity": "sha512-+oZJurc4hXpaaqsN68GoZGQAQIA3qr09Or4fqEsargABnbe5Aau8hFn6ISVleT3cpY/0n/8drn7huyyEvTbghA==", "dev": true }, "node_modules/readdirp": { @@ -15797,7 +15993,7 @@ }, "node_modules/redent": { "version": "1.0.0", - "resolved": "https://registry.nlark.com/redent/download/redent-1.0.0.tgz?cache=0&sync_timestamp=1620069702182&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fredent%2Fdownload%2Fredent-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", "dev": true, "dependencies": { @@ -15810,7 +16006,7 @@ }, "node_modules/redent/node_modules/strip-indent": { "version": "1.0.1", - "resolved": "https://registry.nlark.com/strip-indent/download/strip-indent-1.0.1.tgz", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", "dev": true, "dependencies": { @@ -15933,8 +16129,8 @@ }, "node_modules/registry-auth-token": { "version": "4.2.1", - "resolved": "https://registry.npm.taobao.org/registry-auth-token/download/registry-auth-token-4.2.1.tgz", - "integrity": "sha1-bXtABkQZGJcszV/tzUHcMix5slA=", + "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-4.2.1.tgz", + "integrity": "sha512-6gkSb4U6aWJB4SF2ZvLb76yCBjcvufXBqvvEx1HbmKPkutswjW1xNVRY0+daljIYRbogN7O0etYSlbiaEQyMyw==", "dev": true, "dependencies": { "rc": "^1.2.8" @@ -15945,8 +16141,8 @@ }, "node_modules/registry-url": { "version": "5.1.0", - "resolved": "https://registry.npm.taobao.org/registry-url/download/registry-url-5.1.0.tgz?cache=0&sync_timestamp=1618681893788&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fregistry-url%2Fdownload%2Fregistry-url-5.1.0.tgz", - "integrity": "sha1-6YM0tQ1UNLgRNrROxjjZwgCcUAk=", + "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-5.1.0.tgz", + "integrity": "sha512-8acYXXTI0AkQv6RAOjE3vOaIXZkT9wo4LOFbBKYQEEnnMNBpKqdUrI6S4NT0KPIo/WVvJ5tE/X5LF/TQUf0ekw==", "dev": true, "dependencies": { "rc": "^1.2.8" @@ -16040,7 +16236,7 @@ }, "node_modules/repeating": { "version": "2.0.1", - "resolved": "https://registry.nlark.com/repeating/download/repeating-2.0.1.tgz", + "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", "dev": true, "dependencies": { @@ -16052,8 +16248,8 @@ }, "node_modules/replace-ext": { "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/replace-ext/download/replace-ext-2.0.0.tgz", - "integrity": "sha1-lHHCE9IuG8wmcXzW5QiB2I+BKwY=", + "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-2.0.0.tgz", + "integrity": "sha512-UszKE5KVK6JvyD92nzMn9cDapSk6w/CaFZ96CnmDMUqH9oowfxF/ZjRITD25H4DnOQClLA4/j7jLGXXLVKxAug==", "dev": true, "engines": { "node": ">= 10" @@ -16128,6 +16324,14 @@ "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=", "dev": true }, + "node_modules/requizzle": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/requizzle/-/requizzle-0.2.3.tgz", + "integrity": "sha512-YanoyJjykPxGHii0fZP0uUPEXpvqfBDxWV7s6GKAiiOsiqhX6vHNyW3Qzdmqp/iq/ExbhaGbVrjB4ruEVSM4GQ==", + "dependencies": { + "lodash": "^4.17.14" + } + }, "node_modules/resize-detector": { "version": "0.1.10", "resolved": "https://registry.npmjs.org/resize-detector/-/resize-detector-0.1.10.tgz", @@ -16147,9 +16351,9 @@ } }, "node_modules/resolve-alpn": { - "version": "1.1.2", - "resolved": "https://registry.npm.taobao.org/resolve-alpn/download/resolve-alpn-1.1.2.tgz", - "integrity": "sha1-MLYM+7DAuNyJeUD+E/4lWvzdTSg=", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.2.1.tgz", + "integrity": "sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==", "dev": true }, "node_modules/resolve-cwd": { @@ -16180,12 +16384,12 @@ "deprecated": "https://github.com/lydell/resolve-url#deprecated" }, "node_modules/responselike": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/responselike/download/responselike-1.0.2.tgz", - "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/responselike/-/responselike-2.0.0.tgz", + "integrity": "sha512-xH48u3FTB9VsZw7R+vvgaKeLKzT6jOogbQhEe/jewwnZgzPcnyWui2Av6JpoYZF/91uueC+lqhWqeURw5/qhCw==", "dev": true, "dependencies": { - "lowercase-keys": "^1.0.0" + "lowercase-keys": "^2.0.0" } }, "node_modules/restore-cursor": { @@ -16219,8 +16423,8 @@ }, "node_modules/reusify": { "version": "1.0.4", - "resolved": "https://registry.npm.taobao.org/reusify/download/reusify-1.0.4.tgz", - "integrity": "sha1-kNo4Kx4SbvwCFG6QhFqI2xKSXXY=", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", "dev": true, "engines": { "iojs": ">=1.0.0", @@ -16297,8 +16501,8 @@ }, "node_modules/run-parallel": { "version": "1.2.0", - "resolved": "https://registry.nlark.com/run-parallel/download/run-parallel-1.2.0.tgz", - "integrity": "sha1-ZtE2jae9+SHrnZW9GpIp5/IaQ+4=", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", "dev": true, "funding": [ { @@ -16650,8 +16854,8 @@ }, "node_modules/seek-bzip": { "version": "1.0.6", - "resolved": "https://registry.npm.taobao.org/seek-bzip/download/seek-bzip-1.0.6.tgz", - "integrity": "sha1-NcQXH1WmgJFrUqB4WezztYV/IcQ=", + "resolved": "https://registry.npmjs.org/seek-bzip/-/seek-bzip-1.0.6.tgz", + "integrity": "sha512-e1QtP3YL5tWww8uKaOCQ18UxIT2laNBXHjV/S2WYCiK4udiv8lkG89KRIoCjUagnAmCBurjF4zEVX2ByBbnCjQ==", "dev": true, "dependencies": { "commander": "^2.8.1" @@ -16691,8 +16895,8 @@ }, "node_modules/semver-diff": { "version": "3.1.1", - "resolved": "https://registry.nlark.com/semver-diff/download/semver-diff-3.1.1.tgz?cache=0&sync_timestamp=1620044887257&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fsemver-diff%2Fdownload%2Fsemver-diff-3.1.1.tgz", - "integrity": "sha1-Bfd85Z8yXgDicGr9Z7tQbdscoys=", + "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-3.1.1.tgz", + "integrity": "sha512-GX0Ix/CJcHyB8c4ykpHGIAvLyOwOobtM/8d+TQkAd81/bEjgPHrfba41Vpesr7jX/t8Uh+R3EX9eAS5be+jQYg==", "dev": true, "dependencies": { "semver": "^6.3.0" @@ -16703,8 +16907,8 @@ }, "node_modules/semver-regex": { "version": "2.0.0", - "resolved": "https://registry.nlark.com/semver-regex/download/semver-regex-2.0.0.tgz", - "integrity": "sha1-qTwsWERTmncCMzeRB7OMe0rJ0zg=", + "resolved": "https://registry.npmjs.org/semver-regex/-/semver-regex-2.0.0.tgz", + "integrity": "sha512-mUdIBBvdn0PLOeP3TEkMH7HHeUP3GjsXCwKarjv/kGmUFOYg1VqEemKhoQpWMu6X2I8kHeuVdGibLGkVK+/5Qw==", "dev": true, "engines": { "node": ">=6" @@ -16712,7 +16916,7 @@ }, "node_modules/semver-truncate": { "version": "1.1.2", - "resolved": "https://registry.nlark.com/semver-truncate/download/semver-truncate-1.1.2.tgz", + "resolved": "https://registry.npmjs.org/semver-truncate/-/semver-truncate-1.1.2.tgz", "integrity": "sha1-V/Qd5pcHpicJp+AQS6IRcQnqR+g=", "dev": true, "dependencies": { @@ -16902,8 +17106,8 @@ }, "node_modules/sharp": { "version": "0.28.3", - "resolved": "https://registry.nlark.com/sharp/download/sharp-0.28.3.tgz?cache=0&sync_timestamp=1621876609161&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fsharp%2Fdownload%2Fsharp-0.28.3.tgz", - "integrity": "sha1-7NdM79AgvuSJG7E3yYUO4s4neos=", + "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.28.3.tgz", + "integrity": "sha512-21GEP45Rmr7q2qcmdnjDkNP04Ooh5v0laGS5FDpojOO84D1DJwUijLiSq8XNNM6e8aGXYtoYRh3sVNdm8NodMA==", "dev": true, "hasInstallScript": true, "dependencies": { @@ -16987,8 +17191,8 @@ }, "node_modules/simple-concat": { "version": "1.0.1", - "resolved": "https://registry.nlark.com/simple-concat/download/simple-concat-1.0.1.tgz", - "integrity": "sha1-9Gl2CCujXCJj8cirXt/ibEHJVS8=", + "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", + "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", "dev": true, "funding": [ { @@ -17007,8 +17211,8 @@ }, "node_modules/simple-get": { "version": "3.1.0", - "resolved": "https://registry.npm.taobao.org/simple-get/download/simple-get-3.1.0.tgz", - "integrity": "sha1-tFvgYkNeUNFZVAtXYgLO7EC5xrM=", + "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-3.1.0.tgz", + "integrity": "sha512-bCR6cP+aTdScaQCnQKbPKtJOKDp/hj9EDLJo3Nw4y1QksqaovlW/bnptB6/c1e+qmNIDHRK+oXFDdEqBT8WzUA==", "dev": true, "dependencies": { "decompress-response": "^4.2.0", @@ -17018,8 +17222,8 @@ }, "node_modules/simple-get/node_modules/decompress-response": { "version": "4.2.1", - "resolved": "https://registry.npm.taobao.org/decompress-response/download/decompress-response-4.2.1.tgz?cache=0&sync_timestamp=1613125280468&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdecompress-response%2Fdownload%2Fdecompress-response-4.2.1.tgz", - "integrity": "sha1-QUAjzHowLaJc4uyC0NUjjMr9iYY=", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-4.2.1.tgz", + "integrity": "sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw==", "dev": true, "dependencies": { "mimic-response": "^2.0.0" @@ -17030,8 +17234,8 @@ }, "node_modules/simple-get/node_modules/mimic-response": { "version": "2.1.0", - "resolved": "https://registry.nlark.com/mimic-response/download/mimic-response-2.1.0.tgz", - "integrity": "sha1-0Tdj019hPQnsN+uzC6wEacDuj0M=", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-2.1.0.tgz", + "integrity": "sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA==", "dev": true, "engines": { "node": ">=8" @@ -17196,7 +17400,7 @@ }, "node_modules/sort-keys-length": { "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/sort-keys-length/download/sort-keys-length-1.0.1.tgz", + "resolved": "https://registry.npmjs.org/sort-keys-length/-/sort-keys-length-1.0.1.tgz", "integrity": "sha1-nLb09OnkgVWmqgZx7dM2/xR5oYg=", "dev": true, "dependencies": { @@ -17413,7 +17617,7 @@ }, "node_modules/squeak": { "version": "1.3.0", - "resolved": "https://registry.npm.taobao.org/squeak/download/squeak-1.3.0.tgz", + "resolved": "https://registry.npmjs.org/squeak/-/squeak-1.3.0.tgz", "integrity": "sha1-MwRQN7ZDiLVnZ0uEMiplIQc5FsM=", "dev": true, "dependencies": { @@ -17427,7 +17631,7 @@ }, "node_modules/squeak/node_modules/ansi-styles": { "version": "2.2.1", - "resolved": "https://registry.nlark.com/ansi-styles/download/ansi-styles-2.2.1.tgz?cache=0&sync_timestamp=1618995588464&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fansi-styles%2Fdownload%2Fansi-styles-2.2.1.tgz", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", "dev": true, "engines": { @@ -17436,7 +17640,7 @@ }, "node_modules/squeak/node_modules/chalk": { "version": "1.1.3", - "resolved": "https://registry.nlark.com/chalk/download/chalk-1.1.3.tgz", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, "dependencies": { @@ -17464,7 +17668,7 @@ }, "node_modules/squeak/node_modules/supports-color": { "version": "2.0.0", - "resolved": "https://registry.nlark.com/supports-color/download/supports-color-2.0.0.tgz?cache=0&sync_timestamp=1622293579301&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fsupports-color%2Fdownload%2Fsupports-color-2.0.0.tgz", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", "dev": true, "engines": { @@ -17674,8 +17878,8 @@ }, "node_modules/strip-dirs": { "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/strip-dirs/download/strip-dirs-2.1.0.tgz", - "integrity": "sha1-SYdzYmT8NEzyD2w0rKnRPR1O1sU=", + "resolved": "https://registry.npmjs.org/strip-dirs/-/strip-dirs-2.1.0.tgz", + "integrity": "sha512-JOCxOeKLm2CAS73y/U4ZeZPTkE+gNVCzKt7Eox84Iej1LT/2pTWYpZKJuxwQpvX1LiZb1xokNR7RLfuBAa7T3g==", "dev": true, "dependencies": { "is-natural-number": "^4.0.1" @@ -17718,8 +17922,8 @@ }, "node_modules/strip-outer": { "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/strip-outer/download/strip-outer-1.0.1.tgz", - "integrity": "sha1-sv0qv2YEudHmATBXGV34Nrip1jE=", + "resolved": "https://registry.npmjs.org/strip-outer/-/strip-outer-1.0.1.tgz", + "integrity": "sha512-k55yxKHwaXnpYGsOzg4Vl8+tDrWylxDEpknGjhTiZB8dFRU5rTo9CAzeycivxV3s+zlTKwrs6WxMxR95n26kwg==", "dev": true, "dependencies": { "escape-string-regexp": "^1.0.2" @@ -17729,13 +17933,13 @@ } }, "node_modules/strtok3": { - "version": "6.1.3", - "resolved": "https://registry.nlark.com/strtok3/download/strtok3-6.1.3.tgz", - "integrity": "sha1-SI/oypFmTPk0MslHUrqeXHhb2d0=", + "version": "6.2.4", + "resolved": "https://registry.npmjs.org/strtok3/-/strtok3-6.2.4.tgz", + "integrity": "sha512-GO8IcFF9GmFDvqduIspUBwCzCbqzegyVKIsSymcMgiZKeCfrN9SowtUoi8+b59WZMAjIzVZic/Ft97+pynR3Iw==", "dev": true, "dependencies": { - "@tokenizer/token": "^0.1.1", - "peek-readable": "^3.1.4" + "@tokenizer/token": "^0.3.0", + "peek-readable": "^4.0.1" }, "engines": { "node": ">=10" @@ -18088,6 +18292,11 @@ "node": ">=6" } }, + "node_modules/taffydb": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/taffydb/-/taffydb-2.6.2.tgz", + "integrity": "sha1-fLy2S1oUG2ou/CxdLGe04VCyomg=" + }, "node_modules/tapable": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/tapable/-/tapable-1.1.3.tgz", @@ -18098,8 +18307,8 @@ }, "node_modules/tar-fs": { "version": "2.1.1", - "resolved": "https://registry.nlark.com/tar-fs/download/tar-fs-2.1.1.tgz", - "integrity": "sha1-SJoVq4Xx8L76uzcLfeT561y+h4Q=", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", + "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", "dev": true, "dependencies": { "chownr": "^1.1.1", @@ -18108,23 +18317,18 @@ "tar-stream": "^2.1.4" } }, - "node_modules/tar-stream": { - "version": "2.2.0", - "resolved": "https://registry.npm.taobao.org/tar-stream/download/tar-stream-2.2.0.tgz", - "integrity": "sha1-rK2EwoQTawYNw/qmRHSqmuvXcoc=", + "node_modules/tar-fs/node_modules/bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", "dev": true, "dependencies": { - "bl": "^4.0.3", - "end-of-stream": "^1.4.1", - "fs-constants": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^3.1.1" - }, - "engines": { - "node": ">=6" + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" } }, - "node_modules/tar-stream/node_modules/readable-stream": { + "node_modules/tar-fs/node_modules/readable-stream": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", @@ -18138,9 +18342,43 @@ "node": ">= 6" } }, + "node_modules/tar-fs/node_modules/tar-stream": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", + "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", + "dev": true, + "dependencies": { + "bl": "^4.0.3", + "end-of-stream": "^1.4.1", + "fs-constants": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/tar-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.6.2.tgz", + "integrity": "sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A==", + "dev": true, + "dependencies": { + "bl": "^1.0.0", + "buffer-alloc": "^1.2.0", + "end-of-stream": "^1.0.0", + "fs-constants": "^1.0.0", + "readable-stream": "^2.3.0", + "to-buffer": "^1.1.1", + "xtend": "^4.0.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/temp-dir": { "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/temp-dir/download/temp-dir-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/temp-dir/-/temp-dir-1.0.0.tgz", "integrity": "sha1-CnwOom06Oa+n4OvqnB/AvE2qAR0=", "dev": true, "engines": { @@ -18149,7 +18387,7 @@ }, "node_modules/tempfile": { "version": "2.0.0", - "resolved": "https://registry.nlark.com/tempfile/download/tempfile-2.0.0.tgz?cache=0&sync_timestamp=1623137926951&other_urls=https%3A%2F%2Fregistry.nlark.com%2Ftempfile%2Fdownload%2Ftempfile-2.0.0.tgz", + "resolved": "https://registry.npmjs.org/tempfile/-/tempfile-2.0.0.tgz", "integrity": "sha1-awRGhWqbERTRhW/8vlCczLCXcmU=", "dev": true, "dependencies": { @@ -18273,7 +18511,7 @@ }, "node_modules/timed-out": { "version": "4.0.1", - "resolved": "https://registry.nlark.com/timed-out/download/timed-out-4.0.1.tgz?cache=0&sync_timestamp=1619073467606&other_urls=https%3A%2F%2Fregistry.nlark.com%2Ftimed-out%2Fdownload%2Ftimed-out-4.0.1.tgz", + "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", "integrity": "sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=", "dev": true, "engines": { @@ -18336,8 +18574,8 @@ }, "node_modules/to-buffer": { "version": "1.1.1", - "resolved": "https://registry.npm.taobao.org/to-buffer/download/to-buffer-1.1.1.tgz", - "integrity": "sha1-STvUj2LXxD/N7TE6A9ytsuEhOoA=", + "resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.1.1.tgz", + "integrity": "sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg==", "dev": true }, "node_modules/to-fast-properties": { @@ -18362,8 +18600,8 @@ }, "node_modules/to-readable-stream": { "version": "1.0.0", - "resolved": "https://registry.nlark.com/to-readable-stream/download/to-readable-stream-1.0.0.tgz", - "integrity": "sha1-zgqgwvPfat+FLvtASng+d8BHV3E=", + "resolved": "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz", + "integrity": "sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==", "dev": true, "engines": { "node": ">=6" @@ -18441,8 +18679,8 @@ }, "node_modules/token-types": { "version": "2.1.1", - "resolved": "https://registry.nlark.com/token-types/download/token-types-2.1.1.tgz", - "integrity": "sha1-vVhdZJAqr3ILiXnSV7S4ULTUXEU=", + "resolved": "https://registry.npmjs.org/token-types/-/token-types-2.1.1.tgz", + "integrity": "sha512-wnQcqlreS6VjthyHO3Y/kpK/emflxDBNhlNUPfh7wE39KnuDdOituXomIbyI79vBtF0Ninpkh72mcuRHo+RG3Q==", "dev": true, "dependencies": { "@tokenizer/token": "^0.1.1", @@ -18456,6 +18694,12 @@ "url": "https://github.com/sponsors/Borewit" } }, + "node_modules/token-types/node_modules/@tokenizer/token": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@tokenizer/token/-/token-0.1.1.tgz", + "integrity": "sha512-XO6INPbZCxdprl+9qa/AAbFFOMzzwqYxpjPgLICrMD6C2FCw6qfJOPcBk6JqqPLSaZ/Qx87qn4rpPmPMwaAK6w==", + "dev": true + }, "node_modules/toposort": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/toposort/-/toposort-1.0.7.tgz", @@ -18474,9 +18718,23 @@ "node": ">=0.8" } }, + "node_modules/trading-vue-js": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/trading-vue-js/-/trading-vue-js-1.0.2.tgz", + "integrity": "sha512-RObZR4OF5rtdgh/CyyRv0soPxlVlwHudlpAziOeQeOeId4j/2RcGUSp4/lKwzYo8b51tnAiRnMtDS+ZSmg208g==", + "dependencies": { + "@babel/runtime": "^7.13.10", + "arrayslicer": "^1.2.3", + "hammerjs": "^2.0.8", + "hamsterjs": "^1.1.3", + "lz-string": "^1.4.4", + "moment": "^2.29.1", + "vue": "^2.6.12" + } + }, "node_modules/trim-newlines": { "version": "1.0.0", - "resolved": "https://registry.nlark.com/trim-newlines/download/trim-newlines-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=", "dev": true, "engines": { @@ -18485,7 +18743,7 @@ }, "node_modules/trim-repeated": { "version": "1.0.0", - "resolved": "https://registry.nlark.com/trim-repeated/download/trim-repeated-1.0.0.tgz?cache=0&sync_timestamp=1619005347796&other_urls=https%3A%2F%2Fregistry.nlark.com%2Ftrim-repeated%2Fdownload%2Ftrim-repeated-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/trim-repeated/-/trim-repeated-1.0.0.tgz", "integrity": "sha1-42RqLqTokTEr9+rObPsFOAvAHCE=", "dev": true, "dependencies": { @@ -18527,9 +18785,9 @@ } }, "node_modules/tslib": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.0.tgz", - "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==" + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" }, "node_modules/tty-browserify": { "version": "0.0.0", @@ -18594,8 +18852,8 @@ }, "node_modules/typedarray-to-buffer": { "version": "3.1.5", - "resolved": "https://registry.npm.taobao.org/typedarray-to-buffer/download/typedarray-to-buffer-3.1.5.tgz", - "integrity": "sha1-qX7nqf9CaRufeD/xvFES/j/KkIA=", + "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", + "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", "dev": true, "dependencies": { "is-typedarray": "^1.0.0" @@ -18606,11 +18864,15 @@ "resolved": "https://registry.npmjs.org/typeforce/-/typeforce-1.18.0.tgz", "integrity": "sha512-7uc1O8h1M1g0rArakJdf0uLRSSgFcYexrVoKo+bzJd32gd4gDy2L/Z+8/FjPnU9ydY3pEnVPtr9FyscYY60K1g==" }, + "node_modules/uc.micro": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz", + "integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==" + }, "node_modules/uglify-js": { "version": "3.4.10", "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.4.10.tgz", "integrity": "sha512-Y2VsbPVs0FIshJztycsO2SfPk7/KAF/T72qzv9u5EpQ4kB2hQoHlhNQTsNyy6ul7lQtqJN/AoWeS23OzEiEFxw==", - "dev": true, "dependencies": { "commander": "~2.19.0", "source-map": "~0.6.1" @@ -18625,8 +18887,7 @@ "node_modules/uglify-js/node_modules/commander": { "version": "2.19.0", "resolved": "https://registry.npmjs.org/commander/-/commander-2.19.0.tgz", - "integrity": "sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg==", - "dev": true + "integrity": "sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg==" }, "node_modules/unbox-primitive": { "version": "1.0.1", @@ -18645,14 +18906,19 @@ }, "node_modules/unbzip2-stream": { "version": "1.4.3", - "resolved": "https://registry.nlark.com/unbzip2-stream/download/unbzip2-stream-1.4.3.tgz", - "integrity": "sha1-sNoExDcTEd93HNwhXofyEwmRrOc=", + "resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz", + "integrity": "sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==", "dev": true, "dependencies": { "buffer": "^5.2.1", "through": "^2.3.8" } }, + "node_modules/underscore": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.1.tgz", + "integrity": "sha512-hzSoAVtJF+3ZtiFX0VgfFPHEDRm7Y/QPjGyNo4TVdnDTdft3tr8hEkD25a1jC+TjTuE7tkHGKkhwCgs9dgBB2g==" + }, "node_modules/unicode-canonical-property-names-ecmascript": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz", @@ -18737,8 +19003,8 @@ }, "node_modules/unique-string": { "version": "2.0.0", - "resolved": "https://registry.nlark.com/unique-string/download/unique-string-2.0.0.tgz", - "integrity": "sha1-OcZFH4GvsnSd4rIz4/fF6IQ72J0=", + "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz", + "integrity": "sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg==", "dev": true, "dependencies": { "crypto-random-string": "^2.0.0" @@ -18749,8 +19015,8 @@ }, "node_modules/universalify": { "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/universalify/download/universalify-2.0.0.tgz?cache=0&sync_timestamp=1603180004159&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Funiversalify%2Fdownload%2Funiversalify-2.0.0.tgz", - "integrity": "sha1-daSYTv7cSwiXXFrrc/Uw0C3yVxc=", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", "dev": true, "engines": { "node": ">= 10.0.0" @@ -18835,8 +19101,8 @@ }, "node_modules/update-notifier": { "version": "5.1.0", - "resolved": "https://registry.npm.taobao.org/update-notifier/download/update-notifier-5.1.0.tgz", - "integrity": "sha1-SrDXx/NqIx3XMWz3cpMT8CFNmtk=", + "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-5.1.0.tgz", + "integrity": "sha512-ItnICHbeMh9GqUy31hFPrD1kcuZ3rpxDZbf4KUDavXwS0bW5m7SLbDQpGX3UYr072cbrF5hFUs3r5tUsPwjfHw==", "dev": true, "dependencies": { "boxen": "^5.0.0", @@ -18877,9 +19143,9 @@ } }, "node_modules/update-notifier/node_modules/chalk": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", - "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "dependencies": { "ansi-styles": "^4.1.0", @@ -18894,8 +19160,8 @@ }, "node_modules/update-notifier/node_modules/ci-info": { "version": "2.0.0", - "resolved": "https://registry.nlark.com/ci-info/download/ci-info-2.0.0.tgz", - "integrity": "sha1-Z6npZL4xpR4V5QENWObxKDQAL0Y=", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", + "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", "dev": true }, "node_modules/update-notifier/node_modules/color-convert": { @@ -18919,10 +19185,19 @@ "node": ">=8" } }, + "node_modules/update-notifier/node_modules/import-lazy": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz", + "integrity": "sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/update-notifier/node_modules/is-ci": { "version": "2.0.0", - "resolved": "https://registry.nlark.com/is-ci/download/is-ci-2.0.0.tgz?cache=0&sync_timestamp=1618847026826&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fis-ci%2Fdownload%2Fis-ci-2.0.0.tgz", - "integrity": "sha1-a8YzQYGBDgS1wis9WJ/cpVAmQEw=", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz", + "integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==", "dev": true, "dependencies": { "ci-info": "^2.0.0" @@ -19052,7 +19327,7 @@ }, "node_modules/url-parse-lax": { "version": "3.0.0", - "resolved": "https://registry.nlark.com/url-parse-lax/download/url-parse-lax-3.0.0.tgz", + "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=", "dev": true, "dependencies": { @@ -19064,7 +19339,7 @@ }, "node_modules/url-parse-lax/node_modules/prepend-http": { "version": "2.0.0", - "resolved": "https://registry.nlark.com/prepend-http/download/prepend-http-2.0.0.tgz", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=", "dev": true, "engines": { @@ -19073,7 +19348,7 @@ }, "node_modules/url-to-options": { "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/url-to-options/download/url-to-options-1.0.1.tgz", + "resolved": "https://registry.npmjs.org/url-to-options/-/url-to-options-1.0.1.tgz", "integrity": "sha1-FQWgOiiaSMvXpDTvuu7FBV9WM6k=", "dev": true, "engines": { @@ -19293,89 +19568,13 @@ } }, "node_modules/vue-cli-plugin-tauri": { - "version": "1.0.0-beta.3", - "resolved": "https://registry.nlark.com/vue-cli-plugin-tauri/download/vue-cli-plugin-tauri-1.0.0-beta.3.tgz", - "integrity": "sha1-1J0JK9L+EcCfoCA1aPyINyh0LDA=", + "version": "1.0.0-beta.6", + "resolved": "https://registry.npmjs.org/vue-cli-plugin-tauri/-/vue-cli-plugin-tauri-1.0.0-beta.6.tgz", + "integrity": "sha512-GB7xqsadehgwgJXaOvyMg5UEedBCxW4Tf8voMgzw/6B0kCfGZop6dMkKQOuQSdcffS69M73CpXdFYYjqdZVHDA==", "dev": true, "dependencies": { - "@tauri-apps/cli": "1.0.0-beta.3", - "@vue/cli-shared-utils": "^4.1.1", - "execa": "^3.4.0" - } - }, - "node_modules/vue-cli-plugin-tauri/node_modules/execa": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-3.4.0.tgz", - "integrity": "sha512-r9vdGQk4bmCuK1yKQu1KTwcT2zwfWdbdaXfCtAh+5nU/4fSX+JAb7vZGvI5naJrQlvONrEB20jeruESI69530g==", - "dev": true, - "dependencies": { - "cross-spawn": "^7.0.0", - "get-stream": "^5.0.0", - "human-signals": "^1.1.1", - "is-stream": "^2.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.0", - "onetime": "^5.1.0", - "p-finally": "^2.0.0", - "signal-exit": "^3.0.2", - "strip-final-newline": "^2.0.0" - }, - "engines": { - "node": "^8.12.0 || >=9.7.0" - } - }, - "node_modules/vue-cli-plugin-tauri/node_modules/get-stream": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", - "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", - "dev": true, - "dependencies": { - "pump": "^3.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/vue-cli-plugin-tauri/node_modules/is-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", - "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/vue-cli-plugin-tauri/node_modules/npm-run-path": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", - "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", - "dev": true, - "dependencies": { - "path-key": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/vue-cli-plugin-tauri/node_modules/p-finally": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-2.0.1.tgz", - "integrity": "sha512-vpm09aKwq6H9phqRQzecoDpD8TmVyGw70qmWlyq5onxY7tqyTTFVvxMykxQSQKILBSFlbXpypIw2T1Ml7+DDtw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/vue-cli-plugin-tauri/node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true, - "engines": { - "node": ">=8" + "@tauri-apps/cli": "1.0.0-beta.6", + "@vue/cli-shared-utils": "^4.1.1" } }, "node_modules/vue-clickaway": { @@ -19543,14 +19742,6 @@ "resolved": "https://registry.npmjs.org/vue-functional-data-merge/-/vue-functional-data-merge-3.1.0.tgz", "integrity": "sha512-leT4kdJVQyeZNY1kmnS1xiUlQ9z1B/kdBFCILIjYYQDqZgLqCLa0UhjSSeRX6c3mUe6U5qYeM8LrEqkHJ1B4LA==" }, - "node_modules/vue-gtag": { - "version": "1.16.1", - "resolved": "https://registry.npmjs.org/vue-gtag/-/vue-gtag-1.16.1.tgz", - "integrity": "sha512-5vs0pSGxdqrfXqN1Qwt0ZFXG0iTYjRMu/saddc7QIC5yp+DKgjWQRpGYVa7Pq+KbThxwzzMfo0sGi7ISa6NowA==", - "peerDependencies": { - "vue": "^2.0.0" - } - }, "node_modules/vue-hot-reload-api": { "version": "2.3.4", "resolved": "https://registry.npmjs.org/vue-hot-reload-api/-/vue-hot-reload-api-2.3.4.tgz", @@ -20365,52 +20556,18 @@ "dev": true }, "node_modules/wide-align": { - "version": "1.1.3", - "resolved": "https://registry.nlark.com/wide-align/download/wide-align-1.1.3.tgz", - "integrity": "sha1-rgdOa9wMFKQx6ATmJFScYzsABFc=", + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz", + "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==", "dev": true, "dependencies": { - "string-width": "^1.0.2 || 2" - } - }, - "node_modules/wide-align/node_modules/ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/wide-align/node_modules/string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "dependencies": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/wide-align/node_modules/strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "dependencies": { - "ansi-regex": "^3.0.0" - }, - "engines": { - "node": ">=4" + "string-width": "^1.0.2 || 2 || 3 || 4" } }, "node_modules/widest-line": { "version": "3.1.0", - "resolved": "https://registry.nlark.com/widest-line/download/widest-line-3.1.0.tgz", - "integrity": "sha1-gpIzO79my0X/DeFgOxNreuFJbso=", + "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz", + "integrity": "sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==", "dev": true, "dependencies": { "string-width": "^4.0.0" @@ -20429,8 +20586,8 @@ }, "node_modules/with-open-file": { "version": "0.1.7", - "resolved": "https://registry.npm.taobao.org/with-open-file/download/with-open-file-0.1.7.tgz", - "integrity": "sha1-4t6Nl06KiubliIa+T+jnRltYpyk=", + "resolved": "https://registry.npmjs.org/with-open-file/-/with-open-file-0.1.7.tgz", + "integrity": "sha512-ecJS2/oHtESJ1t3ZfMI3B7KIDKyfN0O16miWxdn30zdh66Yd3LsRFebXZXq6GU4xfxLf6nVxp9kIqElb5fqczA==", "dev": true, "dependencies": { "p-finally": "^1.0.0", @@ -20528,8 +20685,8 @@ }, "node_modules/write-file-atomic": { "version": "3.0.3", - "resolved": "https://registry.npm.taobao.org/write-file-atomic/download/write-file-atomic-3.0.3.tgz", - "integrity": "sha1-Vr1cWlxwSBzRnFcb05q5ZaXeVug=", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", + "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", "dev": true, "dependencies": { "imurmurhash": "^0.1.4", @@ -20548,13 +20705,18 @@ }, "node_modules/xdg-basedir": { "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/xdg-basedir/download/xdg-basedir-4.0.0.tgz?cache=0&sync_timestamp=1617611838739&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fxdg-basedir%2Fdownload%2Fxdg-basedir-4.0.0.tgz", - "integrity": "sha1-S8jZmEQDaWIl74OhVzy7y0552xM=", + "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz", + "integrity": "sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==", "dev": true, "engines": { "node": ">=8" } }, + "node_modules/xmlcreate": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/xmlcreate/-/xmlcreate-2.0.4.tgz", + "integrity": "sha512-nquOebG4sngPmGPICTS5EnxqhKbCmz5Ox5hsszI2T6U5qdrJizBc+0ilYSEjTSzU0yZcmvppztXe/5Al5fUwdg==" + }, "node_modules/xstream": { "version": "11.14.0", "resolved": "https://registry.npmjs.org/xstream/-/xstream-11.14.0.tgz", @@ -20733,7 +20895,7 @@ }, "node_modules/yauzl": { "version": "2.10.0", - "resolved": "https://registry.nlark.com/yauzl/download/yauzl-2.10.0.tgz", + "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", "integrity": "sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk=", "dev": true, "dependencies": { @@ -20797,8 +20959,8 @@ }, "node_modules/zopflipng-bin": { "version": "6.0.1", - "resolved": "https://registry.npm.taobao.org/zopflipng-bin/download/zopflipng-bin-6.0.1.tgz", - "integrity": "sha1-qR74G9uhjhUd2j803yPT7NfQSh8=", + "resolved": "https://registry.npmjs.org/zopflipng-bin/-/zopflipng-bin-6.0.1.tgz", + "integrity": "sha512-+aybvXv/xafL6I67uSH5yLHrSy4/OaSOV9tniw4yZFIHpINXUcctVHE/WzHxOONrL2GHzJ8Fd4iDrNyaS6TVbg==", "dev": true, "hasInstallScript": true, "dependencies": { @@ -21171,8 +21333,7 @@ "@babel/parser": { "version": "7.14.7", "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.14.7.tgz", - "integrity": "sha512-X67Z5y+VBJuHB/RjwECp8kSl5uYi0BvRbNeWqkaJCVh+LiTPl19WBUfG627psSgp9rSf6ojuXghQM3ha6qHHdA==", - "dev": true + "integrity": "sha512-X67Z5y+VBJuHB/RjwECp8kSl5uYi0BvRbNeWqkaJCVh+LiTPl19WBUfG627psSgp9rSf6ojuXghQM3ha6qHHdA==" }, "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": { "version": "7.14.5", @@ -22007,24 +22168,24 @@ } }, "@cosmjs/amino": { - "version": "0.26.1", - "resolved": "https://registry.npmjs.org/@cosmjs/amino/-/amino-0.26.1.tgz", - "integrity": "sha512-8jcEwsLrLW2ltJdNQzdbx+g6Ii9lgG3j7hqaSatnqJE+8OyUjjLH1beigrpz9PhRF3qzQS8WFweTNkkTgNEcSA==", + "version": "0.26.5", + "resolved": "https://registry.npmjs.org/@cosmjs/amino/-/amino-0.26.5.tgz", + "integrity": "sha512-RFf9P1eb7O60JEWaZ5jbQA0wVbwU4SiBJINEjZkhkB1vUrAxCkfSHBZdJrVg8+IIRSWxPUUVr8PMuIyWlORV3A==", "requires": { - "@cosmjs/crypto": "0.26.1", - "@cosmjs/encoding": "0.26.1", - "@cosmjs/math": "0.26.1", - "@cosmjs/utils": "0.26.1" + "@cosmjs/crypto": "0.26.5", + "@cosmjs/encoding": "0.26.5", + "@cosmjs/math": "0.26.5", + "@cosmjs/utils": "0.26.5" } }, "@cosmjs/crypto": { - "version": "0.26.1", - "resolved": "https://registry.npmjs.org/@cosmjs/crypto/-/crypto-0.26.1.tgz", - "integrity": "sha512-KzX++HMvCYjekdYr6vRRfJmAzJvdB10nRSyudzirn4/055yKh9oKk/wgjq9QGOIrMzEZNoQJNE0RndbS3nRccA==", + "version": "0.26.5", + "resolved": "https://registry.npmjs.org/@cosmjs/crypto/-/crypto-0.26.5.tgz", + "integrity": "sha512-ab7+qR/gdRi/DIdOLrjyimRdyD/2K/JdpRaFY1bl6Drr3ktVjDQrGsv53THvHONy33yCwD+YS+328ayQRv/pQA==", "requires": { - "@cosmjs/encoding": "0.26.1", - "@cosmjs/math": "0.26.1", - "@cosmjs/utils": "0.26.1", + "@cosmjs/encoding": "0.26.5", + "@cosmjs/math": "0.26.5", + "@cosmjs/utils": "0.26.5", "bip39": "^3.0.2", "bn.js": "^4.11.8", "elliptic": "^6.5.3", @@ -22035,9 +22196,9 @@ } }, "@cosmjs/encoding": { - "version": "0.26.1", - "resolved": "https://registry.npmjs.org/@cosmjs/encoding/-/encoding-0.26.1.tgz", - "integrity": "sha512-wDFRvSQrTVIX7k4dPPSS/NmaytTU8ludDXi06TsaqVrgL/OR1hcGEkHhoKjodhZ2NS4gLvncI8XagV3SFySGhA==", + "version": "0.26.5", + "resolved": "https://registry.npmjs.org/@cosmjs/encoding/-/encoding-0.26.5.tgz", + "integrity": "sha512-lkw2mLvDZJqVCOZCBqdMzoGUtC4CN7c4+WMCGKDej3TpC0khsv7KZ1eFcsnN6EuZwHyGH67uyyjrs5x0ah9rYg==", "requires": { "base64-js": "^1.3.0", "bech32": "^1.1.4", @@ -22045,24 +22206,24 @@ } }, "@cosmjs/json-rpc": { - "version": "0.26.0", - "resolved": "https://registry.npmjs.org/@cosmjs/json-rpc/-/json-rpc-0.26.0.tgz", - "integrity": "sha512-Jc+O0fDZjb8bxKSwH8SG9lJxV/y6lN4bYhiUqHNU6AUDUD9wzVr1mPgMudCJQ1DkQrgz8dQg2cDwgFp6eN428g==", + "version": "0.26.5", + "resolved": "https://registry.npmjs.org/@cosmjs/json-rpc/-/json-rpc-0.26.5.tgz", + "integrity": "sha512-SFGm5MlY54v3I26hXThwVteh91U+/DKS+KGqFL5lPLHZ2EHxggASqhKMiTJBMJVUDWvnmv1ikjFndkWNhpTPNw==", "requires": { - "@cosmjs/stream": "0.26.0", + "@cosmjs/stream": "0.26.5", "xstream": "^11.14.0" } }, "@cosmjs/launchpad": { - "version": "0.26.1", - "resolved": "https://registry.npmjs.org/@cosmjs/launchpad/-/launchpad-0.26.1.tgz", - "integrity": "sha512-RCwBRbIBAJa3AsjLTjGHHUWmq1eIoAIinQLz0BJ1FF9FI1WuAjlwr/m9KRGhoNZvMeEzAtQvxNFxFzL+BOotEQ==", + "version": "0.26.5", + "resolved": "https://registry.npmjs.org/@cosmjs/launchpad/-/launchpad-0.26.5.tgz", + "integrity": "sha512-V+9bLlvlybm9TeqXAoD10KxFHK5exoUYHIoKdj03g78E2oOn82bLRMNs9ti5UtWWOzIe9suyv5/OvunTSlvA7Q==", "requires": { - "@cosmjs/amino": "0.26.1", - "@cosmjs/crypto": "0.26.1", - "@cosmjs/encoding": "0.26.1", - "@cosmjs/math": "0.26.1", - "@cosmjs/utils": "0.26.1", + "@cosmjs/amino": "0.26.5", + "@cosmjs/crypto": "0.26.5", + "@cosmjs/encoding": "0.26.5", + "@cosmjs/math": "0.26.5", + "@cosmjs/utils": "0.26.5", "axios": "^0.21.2", "fast-deep-equal": "^3.1.3" }, @@ -22078,15 +22239,15 @@ } }, "@cosmjs/ledger-amino": { - "version": "0.26.1", - "resolved": "https://registry.npmjs.org/@cosmjs/ledger-amino/-/ledger-amino-0.26.1.tgz", - "integrity": "sha512-A0hnujAhezAkIAc+NCQurN8si16Ub211AVTZvO6xQXCk8/3XRkub7YAvctxyQfM9fOb/a2mGGPGk6dne51tpBA==", + "version": "0.26.5", + "resolved": "https://registry.npmjs.org/@cosmjs/ledger-amino/-/ledger-amino-0.26.5.tgz", + "integrity": "sha512-UY3OsohGamLXp1P3M7hIW/Wk7Jj04xfFipyw+n4JQ0KSFrniju5idM89kqLELTimXptdI15TaivfHb4MJqfh7g==", "requires": { - "@cosmjs/amino": "0.26.1", - "@cosmjs/crypto": "0.26.1", - "@cosmjs/encoding": "0.26.1", - "@cosmjs/math": "0.26.1", - "@cosmjs/utils": "0.26.1", + "@cosmjs/amino": "0.26.5", + "@cosmjs/crypto": "0.26.5", + "@cosmjs/encoding": "0.26.5", + "@cosmjs/math": "0.26.5", + "@cosmjs/utils": "0.26.5", "ledger-cosmos-js": "^2.1.8", "semver": "^7.3.2" }, @@ -22110,200 +22271,102 @@ } }, "@cosmjs/math": { - "version": "0.26.1", - "resolved": "https://registry.npmjs.org/@cosmjs/math/-/math-0.26.1.tgz", - "integrity": "sha512-FvCpguKswL2PYsONXHDzbcaq1gFQteFUz2w7DasVXvVlnzStDS8ePz8k36psNQ1efyX6oF62ZqMizxOZgCW33A==", + "version": "0.26.5", + "resolved": "https://registry.npmjs.org/@cosmjs/math/-/math-0.26.5.tgz", + "integrity": "sha512-1G7NgLJ35g4jUupvyu7Igtgu/fj2NmgpOofpNk1JqIwMXrm3Tx7lOWbxJq8Wrjj2EoH7FNytSO1dXNGeK15UJw==", "requires": { "bn.js": "^4.11.8" } }, "@cosmjs/proto-signing": { - "version": "0.26.1", - "resolved": "https://registry.npmjs.org/@cosmjs/proto-signing/-/proto-signing-0.26.1.tgz", - "integrity": "sha512-R6vHulxH5njTru9Ezr8k5+u6fBzenNRE3EbQtbVreL++TLV/jKu0Vl2CFz89X8su7BqWZImqzE9+BAesLUKVfw==", + "version": "0.26.5", + "resolved": "https://registry.npmjs.org/@cosmjs/proto-signing/-/proto-signing-0.26.5.tgz", + "integrity": "sha512-F94Uh+PX9nF5zGzUHMdEGgys+YCOudaWQehiHBfOjbHUIv0khufcRXs3l9/5dKzizz9ouQ5DHQAiWq/nYKZKqA==", "requires": { - "@cosmjs/amino": "0.26.1", - "@cosmjs/crypto": "0.26.1", - "@cosmjs/math": "0.26.1", + "@cosmjs/amino": "0.26.5", + "@cosmjs/crypto": "0.26.5", + "@cosmjs/math": "0.26.5", "cosmjs-types": "^0.2.0", "long": "^4.0.0", "protobufjs": "~6.10.2" } }, "@cosmjs/socket": { - "version": "0.26.0", - "resolved": "https://registry.npmjs.org/@cosmjs/socket/-/socket-0.26.0.tgz", - "integrity": "sha512-eLGRWDpu7ywHEAvO5B5+75pP8xT5yta4OP/nvMYa4zMtwQgLxZQsGlzQhfeIclB/G57zrupgHECtQFGIttbZPg==", + "version": "0.26.5", + "resolved": "https://registry.npmjs.org/@cosmjs/socket/-/socket-0.26.5.tgz", + "integrity": "sha512-kBpXw9wuNHkO1AGuKgDA4/DOA+jZ6Lt0GVJVJIJ6bfjGbsewsNVocktAiH+1dGb47xXg2oH7OwGJL+B/PB3qPQ==", "requires": { - "@cosmjs/stream": "0.26.0", + "@cosmjs/stream": "0.26.5", "isomorphic-ws": "^4.0.1", "ws": "^7", "xstream": "^11.14.0" }, "dependencies": { "ws": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.5.tgz", - "integrity": "sha512-BAkMFcAzl8as1G/hArkxOxq3G7pjUqQ3gzYbLL0/5zNkph70e+lCoxBGnm6AW1+/aiNeV4fnKqZ8m4GZewmH2w==", + "version": "7.5.6", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.6.tgz", + "integrity": "sha512-6GLgCqo2cy2A2rjCNFlxQS6ZljG/coZfZXclldI8FB/1G3CCI36Zd8xy2HrFVACi8tfk5XrgLQEk+P0Tnz9UcA==", "requires": {} } } }, "@cosmjs/stargate": { - "version": "0.26.0", - "resolved": "https://registry.npmjs.org/@cosmjs/stargate/-/stargate-0.26.0.tgz", - "integrity": "sha512-+60Mbu5Y3x+vDRGfs9DgyQYx7QqKXQ7t4dH8Y0JIs+4Gn38WbrcAHaqcT58K/sQHSZPueRsBGkZTZdQkJII2zw==", + "version": "0.26.5", + "resolved": "https://registry.npmjs.org/@cosmjs/stargate/-/stargate-0.26.5.tgz", + "integrity": "sha512-rnRptbn01zXAa29272XZgxvH6zemPAvlE9/qGouRXpUm3ilHU+PscAq2k1pD17qtOKWRBLY2+x4feXYHwJg9VA==", "requires": { "@confio/ics23": "^0.6.3", - "@cosmjs/amino": "0.26.0", - "@cosmjs/encoding": "0.26.0", - "@cosmjs/math": "0.26.0", - "@cosmjs/proto-signing": "0.26.0", - "@cosmjs/stream": "0.26.0", - "@cosmjs/tendermint-rpc": "0.26.0", - "@cosmjs/utils": "0.26.0", + "@cosmjs/amino": "0.26.5", + "@cosmjs/encoding": "0.26.5", + "@cosmjs/math": "0.26.5", + "@cosmjs/proto-signing": "0.26.5", + "@cosmjs/stream": "0.26.5", + "@cosmjs/tendermint-rpc": "0.26.5", + "@cosmjs/utils": "0.26.5", "cosmjs-types": "^0.2.0", "long": "^4.0.0", "protobufjs": "~6.10.2", "xstream": "^11.14.0" - }, - "dependencies": { - "@cosmjs/amino": { - "version": "0.26.0", - "resolved": "https://registry.npmjs.org/@cosmjs/amino/-/amino-0.26.0.tgz", - "integrity": "sha512-CDGCdGYsxrJxhiI57e7no25LPuzKQOe4DdsJQyLrOzAnFnGHYJvPh0NAX4eEh3dOfwJCwMNnA1w79JNm0lzhOA==", - "requires": { - "@cosmjs/crypto": "0.26.0", - "@cosmjs/encoding": "0.26.0", - "@cosmjs/math": "0.26.0", - "@cosmjs/utils": "0.26.0" - } - }, - "@cosmjs/crypto": { - "version": "0.26.0", - "resolved": "https://registry.npmjs.org/@cosmjs/crypto/-/crypto-0.26.0.tgz", - "integrity": "sha512-/36R7BzBNag1QRA2tpOrnr7x02B/YuaCgXKmKGLNd1+62Ud6aKkORyZMDvEt65SKoLhbDUzvNpSHAUjMsUbDfg==", - "requires": { - "@cosmjs/encoding": "0.26.0", - "@cosmjs/math": "0.26.0", - "@cosmjs/utils": "0.26.0", - "bip39": "^3.0.2", - "bn.js": "^4.11.8", - "elliptic": "^6.5.3", - "js-sha3": "^0.8.0", - "libsodium-wrappers": "^0.7.6", - "ripemd160": "^2.0.2", - "sha.js": "^2.4.11" - } - }, - "@cosmjs/encoding": { - "version": "0.26.0", - "resolved": "https://registry.npmjs.org/@cosmjs/encoding/-/encoding-0.26.0.tgz", - "integrity": "sha512-ctw6cBDsQSd0OJFWEwU6fJYrAXf63JNhOS3mjawo/hRyEFpVSBSEKEHvfICPc+4dT40v9L3eYEr8LXDYxat4AA==", - "requires": { - "base64-js": "^1.3.0", - "bech32": "^1.1.4", - "readonly-date": "^1.0.0" - } - }, - "@cosmjs/math": { - "version": "0.26.0", - "resolved": "https://registry.npmjs.org/@cosmjs/math/-/math-0.26.0.tgz", - "integrity": "sha512-wfzdK/PnEnIA+CXM6VCyUr2daiEMvaF/iBaK3YCpkbXLfHUXQB+7bNh1HAHgJmp+PaYn3MhgBTnQbsmMsE3cKw==", - "requires": { - "bn.js": "^4.11.8" - } - }, - "@cosmjs/proto-signing": { - "version": "0.26.0", - "resolved": "https://registry.npmjs.org/@cosmjs/proto-signing/-/proto-signing-0.26.0.tgz", - "integrity": "sha512-hNiebrGiDCf3tq6SMHtrf4Qhd8Fn4Z868mWJrbIxamR3EsGuAPb5fKFWYEmpS8IXDfD6qRkO845oMAfnmh5Oxg==", - "requires": { - "@cosmjs/amino": "0.26.0", - "@cosmjs/crypto": "0.26.0", - "@cosmjs/math": "0.26.0", - "cosmjs-types": "^0.2.0", - "long": "^4.0.0", - "protobufjs": "~6.10.2" - } - }, - "@cosmjs/utils": { - "version": "0.26.0", - "resolved": "https://registry.npmjs.org/@cosmjs/utils/-/utils-0.26.0.tgz", - "integrity": "sha512-InTQ3P1noUR0U5zJs8ssqnToIGH2NKbFb+hS5wmYGLB0XRdlNk0UGcb9pjbAzaWRQPWxTd08YQvXg6IK/WE4fA==" - } } }, "@cosmjs/stream": { - "version": "0.26.0", - "resolved": "https://registry.npmjs.org/@cosmjs/stream/-/stream-0.26.0.tgz", - "integrity": "sha512-TaB8aXj5vskllj39fFTlsJviqm+bZjrV6JzBneJMjV0ltuXEaocKo4x+EOe68ZLjF6+lK4XUu1g2rP1iAPdmAQ==", + "version": "0.26.5", + "resolved": "https://registry.npmjs.org/@cosmjs/stream/-/stream-0.26.5.tgz", + "integrity": "sha512-CIr/8bkRlLl36LAtbapsKxA7cMVhmPPWTihAcXgBXik1FM/0XCVNETPTQ64HX47eNQuP5AhWwaMoO553Sf9T2w==", "requires": { "xstream": "^11.14.0" } }, "@cosmjs/tendermint-rpc": { - "version": "0.26.0", - "resolved": "https://registry.npmjs.org/@cosmjs/tendermint-rpc/-/tendermint-rpc-0.26.0.tgz", - "integrity": "sha512-PQbDLerUGAm8GwRiobVfdy7SM5nI9PzFQVDYOAnwwDME0kDsLGy83e7QNTG2DE1G+8861z9CXne5qz+54NbKwQ==", + "version": "0.26.5", + "resolved": "https://registry.npmjs.org/@cosmjs/tendermint-rpc/-/tendermint-rpc-0.26.5.tgz", + "integrity": "sha512-bBcFgpTHEP15m8n/bG3cx/LO110sScpEvYvurZDewfy7MW8WETF6sYZaPCGfVDGWde1EPjFLwKKxQ1Da/XoK0A==", "requires": { - "@cosmjs/crypto": "0.26.0", - "@cosmjs/encoding": "0.26.0", - "@cosmjs/json-rpc": "0.26.0", - "@cosmjs/math": "0.26.0", - "@cosmjs/socket": "0.26.0", - "@cosmjs/stream": "0.26.0", - "axios": "^0.21.1", + "@cosmjs/crypto": "0.26.5", + "@cosmjs/encoding": "0.26.5", + "@cosmjs/json-rpc": "0.26.5", + "@cosmjs/math": "0.26.5", + "@cosmjs/socket": "0.26.5", + "@cosmjs/stream": "0.26.5", + "axios": "^0.21.2", "readonly-date": "^1.0.0", "xstream": "^11.14.0" }, "dependencies": { - "@cosmjs/crypto": { - "version": "0.26.0", - "resolved": "https://registry.npmjs.org/@cosmjs/crypto/-/crypto-0.26.0.tgz", - "integrity": "sha512-/36R7BzBNag1QRA2tpOrnr7x02B/YuaCgXKmKGLNd1+62Ud6aKkORyZMDvEt65SKoLhbDUzvNpSHAUjMsUbDfg==", + "axios": { + "version": "0.21.4", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", + "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", "requires": { - "@cosmjs/encoding": "0.26.0", - "@cosmjs/math": "0.26.0", - "@cosmjs/utils": "0.26.0", - "bip39": "^3.0.2", - "bn.js": "^4.11.8", - "elliptic": "^6.5.3", - "js-sha3": "^0.8.0", - "libsodium-wrappers": "^0.7.6", - "ripemd160": "^2.0.2", - "sha.js": "^2.4.11" + "follow-redirects": "^1.14.0" } - }, - "@cosmjs/encoding": { - "version": "0.26.0", - "resolved": "https://registry.npmjs.org/@cosmjs/encoding/-/encoding-0.26.0.tgz", - "integrity": "sha512-ctw6cBDsQSd0OJFWEwU6fJYrAXf63JNhOS3mjawo/hRyEFpVSBSEKEHvfICPc+4dT40v9L3eYEr8LXDYxat4AA==", - "requires": { - "base64-js": "^1.3.0", - "bech32": "^1.1.4", - "readonly-date": "^1.0.0" - } - }, - "@cosmjs/math": { - "version": "0.26.0", - "resolved": "https://registry.npmjs.org/@cosmjs/math/-/math-0.26.0.tgz", - "integrity": "sha512-wfzdK/PnEnIA+CXM6VCyUr2daiEMvaF/iBaK3YCpkbXLfHUXQB+7bNh1HAHgJmp+PaYn3MhgBTnQbsmMsE3cKw==", - "requires": { - "bn.js": "^4.11.8" - } - }, - "@cosmjs/utils": { - "version": "0.26.0", - "resolved": "https://registry.npmjs.org/@cosmjs/utils/-/utils-0.26.0.tgz", - "integrity": "sha512-InTQ3P1noUR0U5zJs8ssqnToIGH2NKbFb+hS5wmYGLB0XRdlNk0UGcb9pjbAzaWRQPWxTd08YQvXg6IK/WE4fA==" } } }, "@cosmjs/utils": { - "version": "0.26.1", - "resolved": "https://registry.npmjs.org/@cosmjs/utils/-/utils-0.26.1.tgz", - "integrity": "sha512-E7sYhHfcq2V4oB504FNSt8nx6QInTea1KZT5FrtyqONmgQwccfTv5+E2PuRbQs91i56YzHORHuP57rhV7NPn3g==" + "version": "0.26.5", + "resolved": "https://registry.npmjs.org/@cosmjs/utils/-/utils-0.26.5.tgz", + "integrity": "sha512-VB4Z7lEIXA36q0RON15KexzEosToUtdDyMv7UXSBHSl4mLG/fIZgBIpBEYsaPZ1kh43xyINeKQJiGCp2z5rI+g==" }, "@cosmostation/cosmosjs": { "version": "0.10.8", @@ -22590,8 +22653,8 @@ }, "@nodelib/fs.scandir": { "version": "2.1.5", - "resolved": "https://registry.nlark.com/@nodelib/fs.scandir/download/@nodelib/fs.scandir-2.1.5.tgz?cache=0&sync_timestamp=1622792738877&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40nodelib%2Ffs.scandir%2Fdownload%2F%40nodelib%2Ffs.scandir-2.1.5.tgz", - "integrity": "sha1-dhnC6yGyVIP20WdUi0z9WnSIw9U=", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", "dev": true, "requires": { "@nodelib/fs.stat": "2.0.5", @@ -22600,14 +22663,14 @@ }, "@nodelib/fs.stat": { "version": "2.0.5", - "resolved": "https://registry.nlark.com/@nodelib/fs.stat/download/@nodelib/fs.stat-2.0.5.tgz?cache=0&sync_timestamp=1622792616417&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40nodelib%2Ffs.stat%2Fdownload%2F%40nodelib%2Ffs.stat-2.0.5.tgz", - "integrity": "sha1-W9Jir5Tp0lvR5xsF3u1Eh2oiLos=", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", "dev": true }, "@nodelib/fs.walk": { "version": "1.2.8", - "resolved": "https://registry.nlark.com/@nodelib/fs.walk/download/@nodelib/fs.walk-1.2.8.tgz", - "integrity": "sha1-6Vc36LtnRt3t9pxVaVNJTxlv5po=", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", "dev": true, "requires": { "@nodelib/fs.scandir": "2.1.5", @@ -22719,9 +22782,9 @@ "integrity": "sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA=" }, "@sindresorhus/is": { - "version": "4.0.1", - "resolved": "https://registry.nlark.com/@sindresorhus/is/download/@sindresorhus/is-4.0.1.tgz", - "integrity": "sha1-0mcp24UPoye3ysxVIiUhlEBCJvU=", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.2.0.tgz", + "integrity": "sha512-VkE3KLBmJwcCaVARtQpfuKcKv8gcBmUubrfHGF84dXuuW6jgsRYxPtzcIhPyK9WAPpRt2/xY6zkD9MnRaJzSyw==", "dev": true }, "@soda/friendly-errors-webpack-plugin": { @@ -22788,17 +22851,17 @@ }, "@szmarczak/http-timer": { "version": "4.0.6", - "resolved": "https://registry.nlark.com/@szmarczak/http-timer/download/@szmarczak/http-timer-4.0.6.tgz?cache=0&sync_timestamp=1626126261719&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40szmarczak%2Fhttp-timer%2Fdownload%2F%40szmarczak%2Fhttp-timer-4.0.6.tgz", - "integrity": "sha1-tKkUu2LnwnLU5Zif5EQPgSqx2Ac=", + "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-4.0.6.tgz", + "integrity": "sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w==", "dev": true, "requires": { "defer-to-connect": "^2.0.0" } }, "@tauri-apps/cli": { - "version": "1.0.0-beta.3", - "resolved": "https://registry.nlark.com/@tauri-apps/cli/download/@tauri-apps/cli-1.0.0-beta.3.tgz", - "integrity": "sha1-zt6EjiYSLI7mB3SdhCafzI08LuE=", + "version": "1.0.0-beta.6", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli/-/cli-1.0.0-beta.6.tgz", + "integrity": "sha512-zcF7+diZk3LHcS1/Rwo2f/6hRMY9fOVQYSgqSkjZDGGkTXhysrEiCCc4DwLmB1QES9P0lhRt4CPBJLpH0MdsWA==", "dev": true, "requires": { "@tauri-apps/toml": "2.2.4", @@ -22830,6 +22893,17 @@ "color-convert": "^2.0.1" } }, + "bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "dev": true, + "requires": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, "chalk": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", @@ -22851,8 +22925,8 @@ }, "fs-extra": { "version": "10.0.0", - "resolved": "https://registry.nlark.com/fs-extra/download/fs-extra-10.0.0.tgz", - "integrity": "sha1-n/YbZV3eU/s0qC34S7IUzoAuF8E=", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.0.tgz", + "integrity": "sha512-C5owb14u9eJwizKGdchcDUQeFtlSHHthBk8pbX9Vc1PFZrLombudjDnNns88aYslCyF6IY5SUw3Roz6xShcEIQ==", "dev": true, "requires": { "graceful-fs": "^4.2.0", @@ -22868,8 +22942,8 @@ }, "inquirer": { "version": "8.1.1", - "resolved": "https://registry.nlark.com/inquirer/download/inquirer-8.1.1.tgz", - "integrity": "sha1-fFPZTG0DARx7sqlH8NyjuYJGwmo=", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-8.1.1.tgz", + "integrity": "sha512-hUDjc3vBkh/uk1gPfMAD/7Z188Q8cvTGl0nxwaCdwSbzFh6ZKkZh+s2ozVxbE5G9ZNRyeY0+lgbAIOUFsFf98w==", "dev": true, "requires": { "ansi-escapes": "^4.2.1", @@ -22888,16 +22962,10 @@ "through": "^2.3.6" } }, - "is-png": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/is-png/download/is-png-3.0.0.tgz", - "integrity": "sha1-e/XbfzJSfRDJBZSnUcFfdNRsj14=", - "dev": true - }, "jsonfile": { "version": "6.1.0", - "resolved": "https://registry.npm.taobao.org/jsonfile/download/jsonfile-6.1.0.tgz?cache=0&sync_timestamp=1604161876665&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fjsonfile%2Fdownload%2Fjsonfile-6.1.0.tgz", - "integrity": "sha1-vFWyY0eTxnnsZAMJTrE2mKbsCq4=", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", "dev": true, "requires": { "graceful-fs": "^4.1.6", @@ -22906,8 +22974,8 @@ }, "log-symbols": { "version": "4.1.0", - "resolved": "https://registry.nlark.com/log-symbols/download/log-symbols-4.1.0.tgz", - "integrity": "sha1-P727lbRoOsn8eFER55LlWNSr1QM=", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", "dev": true, "requires": { "chalk": "^4.1.0", @@ -22925,8 +22993,8 @@ }, "ora": { "version": "5.4.1", - "resolved": "https://registry.nlark.com/ora/download/ora-5.4.1.tgz", - "integrity": "sha1-GyZ4Qmr0rEpQkAjl5KyemVnbnhg=", + "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", + "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==", "dev": true, "requires": { "bl": "^4.1.0", @@ -22940,6 +23008,17 @@ "wcwidth": "^1.0.1" } }, + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + }, "semver": { "version": "7.3.5", "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", @@ -22962,14 +23041,14 @@ }, "@tauri-apps/toml": { "version": "2.2.4", - "resolved": "https://registry.npm.taobao.org/@tauri-apps/toml/download/@tauri-apps/toml-2.2.4.tgz", - "integrity": "sha1-K09jet7X/DpzAnJGBWgsj6OsdQU=", + "resolved": "https://registry.npmjs.org/@tauri-apps/toml/-/toml-2.2.4.tgz", + "integrity": "sha512-NJV/pdgJObDlDWi5+MTHZ2qyNvdL0dlHqQ72nzQYXWbW1LHMPXgCJYl0pLqL1XxxLtxtInYbtVCGVAcwhGxdkw==", "dev": true }, "@tokenizer/token": { - "version": "0.1.1", - "resolved": "https://registry.nlark.com/@tokenizer/token/download/@tokenizer/token-0.1.1.tgz", - "integrity": "sha1-8NksEvhwed39Gyn2FHWLlpa8KeM=", + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@tokenizer/token/-/token-0.3.0.tgz", + "integrity": "sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A==", "dev": true }, "@types/body-parser": { @@ -22984,8 +23063,8 @@ }, "@types/cacheable-request": { "version": "6.0.2", - "resolved": "https://registry.nlark.com/@types/cacheable-request/download/@types/cacheable-request-6.0.2.tgz?cache=0&sync_timestamp=1625596835916&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40types%2Fcacheable-request%2Fdownload%2F%40types%2Fcacheable-request-6.0.2.tgz", - "integrity": "sha1-wyTaAZfeCpiiMSFWU2riYkKf9rk=", + "resolved": "https://registry.npmjs.org/@types/cacheable-request/-/cacheable-request-6.0.2.tgz", + "integrity": "sha512-B3xVo+dlKM6nnKTcmm5ZtY/OL8bOAOd2Olee9M1zft65ox50OzjEHW91sDiU9j6cvW8Ejg1/Qkf4xd2kugApUA==", "dev": true, "requires": { "@types/http-cache-semantics": "*", @@ -23048,8 +23127,8 @@ }, "@types/http-cache-semantics": { "version": "4.0.1", - "resolved": "https://registry.nlark.com/@types/http-cache-semantics/download/@types/http-cache-semantics-4.0.1.tgz?cache=0&sync_timestamp=1625607856094&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40types%2Fhttp-cache-semantics%2Fdownload%2F%40types%2Fhttp-cache-semantics-4.0.1.tgz", - "integrity": "sha1-Dqe2FJaQK5WJDcTDoRa2DLja6BI=", + "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.1.tgz", + "integrity": "sha512-SZs7ekbP8CN0txVG2xVRH6EgKmEm31BOxA07vkFaETzZz1xh+cbt8BcI0slpymvwhx5dlFnQG2rTlPVQn+iRPQ==", "dev": true }, "@types/http-proxy": { @@ -23067,9 +23146,9 @@ "integrity": "sha512-YSBPTLTVm2e2OoQIDYx8HaeWJ5tTToLH67kXR7zYNGupXMEHa2++G8k+DczX2cFVgalypqtyZIcU19AFcmOpmg==" }, "@types/keyv": { - "version": "3.1.2", - "resolved": "https://registry.nlark.com/@types/keyv/download/@types/keyv-3.1.2.tgz?cache=0&sync_timestamp=1625610098677&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40types%2Fkeyv%2Fdownload%2F%40types%2Fkeyv-3.1.2.tgz", - "integrity": "sha1-XZe7ZVJsILbghF9rDSreTyhgTuU=", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.3.tgz", + "integrity": "sha512-FXCJgyyN3ivVgRoml4h94G/p3kY+u/B86La+QptcqJaWtBWtmc6TtkNfS40n9bIvyLteHh7zXOtgbobORKPbDg==", "dev": true, "requires": { "@types/node": "*" @@ -23129,8 +23208,8 @@ }, "@types/responselike": { "version": "1.0.0", - "resolved": "https://registry.nlark.com/@types/responselike/download/@types/responselike-1.0.0.tgz?cache=0&sync_timestamp=1621242544305&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40types%2Fresponselike%2Fdownload%2F%40types%2Fresponselike-1.0.0.tgz", - "integrity": "sha1-JR9P59FU0rrRJavhtCmyOv0mLik=", + "resolved": "https://registry.npmjs.org/@types/responselike/-/responselike-1.0.0.tgz", + "integrity": "sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA==", "dev": true, "requires": { "@types/node": "*" @@ -23686,11 +23765,11 @@ } }, "@vue/composition-api": { - "version": "1.0.0-beta.22", - "resolved": "https://registry.npmjs.org/@vue/composition-api/-/composition-api-1.0.0-beta.22.tgz", - "integrity": "sha512-KkTeHVWgsJbtoA5t6pUien/ARw7JhVM7QZh05ko/UdgzALYMGwJsBf4WlcvbpMKE5eAu4ONYJypQ+r8LwBIOhA==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/@vue/composition-api/-/composition-api-1.4.1.tgz", + "integrity": "sha512-ZTat9ru/rwecveRnFzlO2mduOBpGfnBdXn+WtBcFLV9UsL/D+6nX47RWuLiVdNxNDX0qphGZRC+JDjwt+YTnRA==", "requires": { - "tslib": "^2.0.1" + "tslib": "^2.3.1" } }, "@vue/eslint-config-airbnb": { @@ -23979,46 +24058,12 @@ "integrity": "sha512-+mRmCTv6SbCmtYJCN4faJMNFVNN5EuCTTprDTAo7YzIGji2KADmakjVA3+8mVDkZ2Bf09vayB35lSQIex2+QaQ==" }, "ansi-align": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/ansi-align/download/ansi-align-3.0.0.tgz", - "integrity": "sha1-tTazcc9ofKrvI2wY0+If43l0Z8s=", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.1.tgz", + "integrity": "sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w==", "dev": true, "requires": { - "string-width": "^3.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true - }, - "emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", - "dev": true - }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - } - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - } - } + "string-width": "^4.1.0" } }, "ansi-colors": { @@ -24097,7 +24142,7 @@ }, "archive-type": { "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/archive-type/download/archive-type-4.0.0.tgz", + "resolved": "https://registry.npmjs.org/archive-type/-/archive-type-4.0.0.tgz", "integrity": "sha1-+S5yIzBW38aWlHJ0nCZ72wRrHXA=", "dev": true, "requires": { @@ -24106,16 +24151,16 @@ "dependencies": { "file-type": { "version": "4.4.0", - "resolved": "https://registry.nlark.com/file-type/download/file-type-4.4.0.tgz", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-4.4.0.tgz", "integrity": "sha1-G2AOX8ofvcboDApwxxyNul95BsU=", "dev": true } } }, "are-we-there-yet": { - "version": "1.1.5", - "resolved": "https://registry.npm.taobao.org/are-we-there-yet/download/are-we-there-yet-1.1.5.tgz", - "integrity": "sha1-SzXClE8GKov82mZBB2A1D+nd/CE=", + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.7.tgz", + "integrity": "sha512-nxwy40TuMiUGqMyRHgCSWZ9FM4VAoRP4xUYSTv5ImRog+h9yISPbVH7H8fASCIzYn9wlEv4zvFL7uKDMCFQm3g==", "dev": true, "requires": { "delegates": "^1.0.0", @@ -24153,7 +24198,7 @@ }, "array-find-index": { "version": "1.0.2", - "resolved": "https://registry.nlark.com/array-find-index/download/array-find-index-1.0.2.tgz", + "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=", "dev": true }, @@ -24207,6 +24252,11 @@ "es-abstract": "^1.18.0-next.1" } }, + "arrayslicer": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/arrayslicer/-/arrayslicer-1.2.3.tgz", + "integrity": "sha1-IaSQMQKpq6fYpzxEv1fz4oxWATY=" + }, "asn1": { "version": "0.2.4", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", @@ -24578,8 +24628,8 @@ }, "bin-build": { "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/bin-build/download/bin-build-3.0.0.tgz", - "integrity": "sha1-xXgKJaip+WbYJEIX5sH1CCoUOGE=", + "resolved": "https://registry.npmjs.org/bin-build/-/bin-build-3.0.0.tgz", + "integrity": "sha512-jcUOof71/TNAI2uM5uoUaDq2ePcVBQ3R/qhxAz1rX7UfvduAL/RXD3jXzvn8cVcDJdGVkiR1shal3OH0ImpuhA==", "dev": true, "requires": { "decompress": "^4.0.0", @@ -24602,7 +24652,7 @@ }, "execa": { "version": "0.7.0", - "resolved": "https://registry.nlark.com/execa/download/execa-0.7.0.tgz", + "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", "dev": true, "requires": { @@ -24619,8 +24669,8 @@ }, "bin-check": { "version": "4.1.0", - "resolved": "https://registry.npm.taobao.org/bin-check/download/bin-check-4.1.0.tgz", - "integrity": "sha1-/ElZcL3Ii7HVo1/BfmXEoUn8Skk=", + "resolved": "https://registry.npmjs.org/bin-check/-/bin-check-4.1.0.tgz", + "integrity": "sha512-b6weQyEUKsDGFlACWSIOfveEnImkJyK/FGW6FAG42loyoquvjdtOIqO6yBFzHyqyVVhNgNkQxxx09SFLK28YnA==", "dev": true, "requires": { "execa": "^0.7.0", @@ -24640,7 +24690,7 @@ }, "execa": { "version": "0.7.0", - "resolved": "https://registry.nlark.com/execa/download/execa-0.7.0.tgz", + "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", "dev": true, "requires": { @@ -24657,8 +24707,8 @@ }, "bin-version": { "version": "3.1.0", - "resolved": "https://registry.nlark.com/bin-version/download/bin-version-3.1.0.tgz", - "integrity": "sha1-WwnrKAdSsb0o8MnbP5by9DtsCDk=", + "resolved": "https://registry.npmjs.org/bin-version/-/bin-version-3.1.0.tgz", + "integrity": "sha512-Mkfm4iE1VFt4xd4vH+gx+0/71esbfus2LsnCGe8Pi4mndSPyT+NGES/Eg99jx8/lUGWfu3z2yuB/bt5UB+iVbQ==", "dev": true, "requires": { "execa": "^1.0.0", @@ -24667,8 +24717,8 @@ }, "bin-version-check": { "version": "4.0.0", - "resolved": "https://registry.nlark.com/bin-version-check/download/bin-version-check-4.0.0.tgz?cache=0&sync_timestamp=1619602121719&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fbin-version-check%2Fdownload%2Fbin-version-check-4.0.0.tgz", - "integrity": "sha1-fYGcYklpkfgNiT5uAqMDI2Fgj3E=", + "resolved": "https://registry.npmjs.org/bin-version-check/-/bin-version-check-4.0.0.tgz", + "integrity": "sha512-sR631OrhC+1f8Cvs8WyVWOA33Y8tgwjETNPyyD/myRBXLkfS/vl74FmH/lFcRl9KY3zwGh7jFhvyk9vV3/3ilQ==", "dev": true, "requires": { "bin-version": "^3.0.0", @@ -24686,8 +24736,8 @@ }, "bin-wrapper": { "version": "4.1.0", - "resolved": "https://registry.npm.taobao.org/bin-wrapper/download/bin-wrapper-4.1.0.tgz", - "integrity": "sha1-mTSPLPhQMePvfvzn5TAK6q6WBgU=", + "resolved": "https://registry.npmjs.org/bin-wrapper/-/bin-wrapper-4.1.0.tgz", + "integrity": "sha512-hfRmo7hWIXPkbpi0ZltboCMVrU+0ClXR/JgbCKKjlDjQf6igXa7OwdqNcFWQZPZTgiY7ZpzE3+LjjkLiTN2T7Q==", "dev": true, "requires": { "bin-check": "^4.1.0", @@ -24700,13 +24750,13 @@ "dependencies": { "@sindresorhus/is": { "version": "0.7.0", - "resolved": "https://registry.nlark.com/@sindresorhus/is/download/@sindresorhus/is-0.7.0.tgz", - "integrity": "sha1-mgb08TfuhNffBGDB/bETX/psUP0=", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.7.0.tgz", + "integrity": "sha512-ONhaKPIufzzrlNbqtWFFd+jlnemX6lJAgq9ZeiZtS7I1PIf/la7CW4m83rTXRnVnsMbW2k56pGYu7AUFJD9Pow==", "dev": true }, "cacheable-request": { "version": "2.1.4", - "resolved": "https://registry.nlark.com/cacheable-request/download/cacheable-request-2.1.4.tgz", + "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-2.1.4.tgz", "integrity": "sha1-DYCIAbY0KtM8kd+dC0TcCbkeXD0=", "dev": true, "requires": { @@ -24721,16 +24771,25 @@ "dependencies": { "lowercase-keys": { "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/lowercase-keys/download/lowercase-keys-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.0.tgz", "integrity": "sha1-TjNms55/VFfjXxMkvfb4jQv8cwY=", "dev": true } } }, + "decompress-response": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", + "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", + "dev": true, + "requires": { + "mimic-response": "^1.0.0" + } + }, "download": { "version": "7.1.0", - "resolved": "https://registry.npm.taobao.org/download/download/download-7.1.0.tgz", - "integrity": "sha1-kFmqnXC1A+52oTKJe+beyOVYcjM=", + "resolved": "https://registry.npmjs.org/download/-/download-7.1.0.tgz", + "integrity": "sha512-xqnBTVd/E+GxJVrX5/eUJiLYjCGPwMpdL+jGhGU57BvtcA7wwhtHVbXBeUk51kOpW3S7Jn3BQbN9Q1R1Km2qDQ==", "dev": true, "requires": { "archive-type": "^4.0.0", @@ -24757,14 +24816,14 @@ }, "file-type": { "version": "8.1.0", - "resolved": "https://registry.nlark.com/file-type/download/file-type-8.1.0.tgz", - "integrity": "sha1-JE87fvZBu+DMoZbHJ25LMyOZ9ow=", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-8.1.0.tgz", + "integrity": "sha512-qyQ0pzAy78gVoJsmYeNgl8uH8yKhr1lVhW7JbzJmnlRi0I4R2eEDEJZVKG8agpDnLpacwNbDhLNG/LMdxHD2YQ==", "dev": true }, "got": { "version": "8.3.2", - "resolved": "https://registry.nlark.com/got/download/got-8.3.2.tgz", - "integrity": "sha1-HSP2Q5Dpf3dsrFLluTbl9RTS6Tc=", + "resolved": "https://registry.npmjs.org/got/-/got-8.3.2.tgz", + "integrity": "sha512-qjUJ5U/hawxosMryILofZCkm3C84PLJS/0grRIpjAwu+Lkxxj5cxeCU25BG0/3mDSpXKTyZr8oh8wIgLaH0QCw==", "dev": true, "requires": { "@sindresorhus/is": "^0.7.0", @@ -24796,29 +24855,35 @@ }, "http-cache-semantics": { "version": "3.8.1", - "resolved": "https://registry.nlark.com/http-cache-semantics/download/http-cache-semantics-3.8.1.tgz", - "integrity": "sha1-ObDhat2bYFvwqe89nar0hDtMrNI=", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz", + "integrity": "sha512-5ai2iksyV8ZXmnZhHH4rWPoxxistEexSi5936zIQ1bnNTW5VnA85B6P/VpXiRM017IgRvb2kKo1a//y+0wSp3w==", "dev": true }, - "import-lazy": { - "version": "3.1.0", - "resolved": "https://registry.npm.taobao.org/import-lazy/download/import-lazy-3.1.0.tgz", - "integrity": "sha1-iRJ5ICyKIoD9vWZ029jaGh38Z8w=", + "json-buffer": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", + "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=", "dev": true }, "keyv": { "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/keyv/download/keyv-3.0.0.tgz", - "integrity": "sha1-RJI7o55osSp87H32wyaMAx8u83M=", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.0.0.tgz", + "integrity": "sha512-eguHnq22OE3uVoSYG0LVWNP+4ppamWr9+zWBe1bsNcovIMy6huUJFPgy4mGwCd/rnl3vOLGW1MTlu4c57CT1xA==", "dev": true, "requires": { "json-buffer": "3.0.0" } }, + "lowercase-keys": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", + "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", + "dev": true + }, "normalize-url": { "version": "2.0.1", - "resolved": "https://registry.nlark.com/normalize-url/download/normalize-url-2.0.1.tgz?cache=0&sync_timestamp=1625826787829&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fnormalize-url%2Fdownload%2Fnormalize-url-2.0.1.tgz", - "integrity": "sha1-g1qdoVUfom9w6SMpBpojqmV01+Y=", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-2.0.1.tgz", + "integrity": "sha512-D6MUW4K/VzoJ4rJ01JFKxDrtY1v9wrgzCX5f2qj/lzH1m/lW6MhUZFKerVsnyjOhOsYzI9Kqqak+10l4LvLpMw==", "dev": true, "requires": { "prepend-http": "^2.0.0", @@ -24828,14 +24893,14 @@ }, "p-cancelable": { "version": "0.4.1", - "resolved": "https://registry.nlark.com/p-cancelable/download/p-cancelable-0.4.1.tgz", - "integrity": "sha1-NfNj1n1SCByNlYXje8zrfgu8sqA=", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-0.4.1.tgz", + "integrity": "sha512-HNa1A8LvB1kie7cERyy21VNeHb2CWJJYqyyC2o3klWFfMGlFmWv2Z7sFgZH8ZiaYL95ydToKTFVXgMV/Os0bBQ==", "dev": true }, "p-event": { "version": "2.3.1", - "resolved": "https://registry.nlark.com/p-event/download/p-event-2.3.1.tgz", - "integrity": "sha1-WWJ57xaassPgyuiMHPuwgHmZPvY=", + "resolved": "https://registry.npmjs.org/p-event/-/p-event-2.3.1.tgz", + "integrity": "sha512-NQCqOFhbpVTMX4qMe8PF8lbGtzZ+LCiN7pcNrb/413Na7+TRoe1xkKUzuWa/YEJdGQ0FvKtj35EEbDoVPO2kbA==", "dev": true, "requires": { "p-timeout": "^2.0.1" @@ -24843,8 +24908,8 @@ }, "p-timeout": { "version": "2.0.1", - "resolved": "https://registry.nlark.com/p-timeout/download/p-timeout-2.0.1.tgz", - "integrity": "sha1-2N0ZeVldLcATnh/ka4tkbLPN8Dg=", + "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-2.0.1.tgz", + "integrity": "sha512-88em58dDVB/KzPEx1X0N3LwFfYZPyDc4B6eF38M1rk9VTZMbxXXgjugz8mmwpS9Ox4BDZ+t6t3QP5+/gazweIA==", "dev": true, "requires": { "p-finally": "^1.0.0" @@ -24858,14 +24923,14 @@ }, "prepend-http": { "version": "2.0.0", - "resolved": "https://registry.nlark.com/prepend-http/download/prepend-http-2.0.0.tgz", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=", "dev": true }, "query-string": { "version": "5.1.1", - "resolved": "https://registry.nlark.com/query-string/download/query-string-5.1.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fquery-string%2Fdownload%2Fquery-string-5.1.1.tgz", - "integrity": "sha1-p4wBK3HBfgXy4/ojGd0zBoLvs8s=", + "resolved": "https://registry.npmjs.org/query-string/-/query-string-5.1.1.tgz", + "integrity": "sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw==", "dev": true, "requires": { "decode-uri-component": "^0.2.0", @@ -24873,9 +24938,18 @@ "strict-uri-encode": "^1.0.0" } }, + "responselike": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz", + "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=", + "dev": true, + "requires": { + "lowercase-keys": "^1.0.0" + } + }, "sort-keys": { "version": "2.0.0", - "resolved": "https://registry.nlark.com/sort-keys/download/sort-keys-2.0.0.tgz", + "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-2.0.0.tgz", "integrity": "sha1-ZYU1WEhh7JfXMNbPQYIuH1ZoQSg=", "dev": true, "requires": { @@ -24993,27 +25067,13 @@ } }, "bl": { - "version": "4.1.0", - "resolved": "https://registry.nlark.com/bl/download/bl-4.1.0.tgz", - "integrity": "sha1-RRU1JkGCvsL7vIOmKrmM8R2fezo=", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/bl/-/bl-1.2.3.tgz", + "integrity": "sha512-pvcNpa0UU69UT341rO6AYy4FVAIkUHuZXRIWbq+zHnsVcRzDDjIAhGuuYoi0d//cwIwtt4pkpKycWEfjdV+vww==", "dev": true, "requires": { - "buffer": "^5.5.0", - "inherits": "^2.0.4", - "readable-stream": "^3.4.0" - }, - "dependencies": { - "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - } + "readable-stream": "^2.3.5", + "safe-buffer": "^5.1.1" } }, "bluebird": { @@ -25091,16 +25151,16 @@ } }, "boxen": { - "version": "5.0.1", - "resolved": "https://registry.npm.taobao.org/boxen/download/boxen-5.0.1.tgz", - "integrity": "sha1-ZXUovdP1mncrgnm4MfJ+wsdEZks=", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/boxen/-/boxen-5.1.2.tgz", + "integrity": "sha512-9gYgQKXx+1nP8mP7CzFyaUARhg7D3n1dF/FnErWmu9l6JvGpNUN278h0aSb+QjoiKSWG+iZ3uHrcqk0qrY9RQQ==", "dev": true, "requires": { "ansi-align": "^3.0.0", "camelcase": "^6.2.0", "chalk": "^4.1.0", "cli-boxes": "^2.2.1", - "string-width": "^4.2.0", + "string-width": "^4.2.2", "type-fest": "^0.20.2", "widest-line": "^3.1.0", "wrap-ansi": "^7.0.0" @@ -25116,15 +25176,15 @@ } }, "camelcase": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.0.tgz", - "integrity": "sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==", + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.1.tgz", + "integrity": "sha512-tVI4q5jjFV5CavAU8DXfza/TJcZutVKo/5Foskmsqcm0MsL91moHvwiGNnqaa2o6PF/7yT5ikDRcVcl8Rj6LCA==", "dev": true }, "chalk": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", - "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "requires": { "ansi-styles": "^4.1.0", @@ -25157,8 +25217,8 @@ }, "type-fest": { "version": "0.20.2", - "resolved": "https://registry.nlark.com/type-fest/download/type-fest-0.20.2.tgz?cache=0&sync_timestamp=1625745315038&other_urls=https%3A%2F%2Fregistry.nlark.com%2Ftype-fest%2Fdownload%2Ftype-fest-0.20.2.tgz", - "integrity": "sha1-G/IH9LKPkVg2ZstfvTJ4hzAc1fQ=", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", "dev": true } } @@ -25318,8 +25378,8 @@ }, "buffer": { "version": "5.7.1", - "resolved": "https://registry.nlark.com/buffer/download/buffer-5.7.1.tgz", - "integrity": "sha1-umLnwTEzBTWCGXFghRqPZI6Z7tA=", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", "dev": true, "requires": { "base64-js": "^1.3.1", @@ -25328,8 +25388,8 @@ }, "buffer-alloc": { "version": "1.2.0", - "resolved": "https://registry.nlark.com/buffer-alloc/download/buffer-alloc-1.2.0.tgz", - "integrity": "sha1-iQ3ZDZI6hz4I4Q5f1RpX5bfM4Ow=", + "resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz", + "integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==", "dev": true, "requires": { "buffer-alloc-unsafe": "^1.1.0", @@ -25338,19 +25398,19 @@ }, "buffer-alloc-unsafe": { "version": "1.1.0", - "resolved": "https://registry.npm.taobao.org/buffer-alloc-unsafe/download/buffer-alloc-unsafe-1.1.0.tgz", - "integrity": "sha1-vX3CauKXLQ7aJTvgYdupkjScGfA=", + "resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz", + "integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==", "dev": true }, "buffer-crc32": { "version": "0.2.13", - "resolved": "https://registry.npm.taobao.org/buffer-crc32/download/buffer-crc32-0.2.13.tgz", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=", "dev": true }, "buffer-fill": { "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/buffer-fill/download/buffer-fill-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz", "integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw=", "dev": true }, @@ -25540,14 +25600,14 @@ }, "cacheable-lookup": { "version": "5.0.4", - "resolved": "https://registry.npm.taobao.org/cacheable-lookup/download/cacheable-lookup-5.0.4.tgz?cache=0&sync_timestamp=1613567617958&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcacheable-lookup%2Fdownload%2Fcacheable-lookup-5.0.4.tgz", - "integrity": "sha1-WmuGWyxENXvj1evCpGewMnGacAU=", + "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz", + "integrity": "sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA==", "dev": true }, "cacheable-request": { "version": "7.0.2", - "resolved": "https://registry.nlark.com/cacheable-request/download/cacheable-request-7.0.2.tgz", - "integrity": "sha1-6g0LiJNkolhUdXMByhKy2nf5HSc=", + "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-7.0.2.tgz", + "integrity": "sha512-pouW8/FmiPQbuGpkXQ9BAPv/Mo5xDGANgSNXzTzJ8DrKGuXOssM4wIQRjfanNRh3Yu5cfYPvcorqbhg2KIJtew==", "dev": true, "requires": { "clone-response": "^1.0.2", @@ -25568,26 +25628,11 @@ "pump": "^3.0.0" } }, - "lowercase-keys": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/lowercase-keys/download/lowercase-keys-2.0.0.tgz", - "integrity": "sha1-JgPni3tLAAbLyi+8yKMgJVislHk=", - "dev": true - }, "normalize-url": { "version": "6.1.0", - "resolved": "https://registry.nlark.com/normalize-url/download/normalize-url-6.1.0.tgz?cache=0&sync_timestamp=1625826787829&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fnormalize-url%2Fdownload%2Fnormalize-url-6.1.0.tgz", - "integrity": "sha1-QNCIW1Nd7/4/MUe+yHfQX+TFZoo=", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz", + "integrity": "sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==", "dev": true - }, - "responselike": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/responselike/download/responselike-2.0.0.tgz", - "integrity": "sha1-JjkbzDF091D5p56sxAoSpcQtdyM=", - "dev": true, - "requires": { - "lowercase-keys": "^2.0.0" - } } } }, @@ -25655,7 +25700,7 @@ }, "camelcase-keys": { "version": "2.1.0", - "resolved": "https://registry.nlark.com/camelcase-keys/download/camelcase-keys-2.1.0.tgz?cache=0&sync_timestamp=1624609060222&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fcamelcase-keys%2Fdownload%2Fcamelcase-keys-2.1.0.tgz", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", "dev": true, "requires": { @@ -25665,7 +25710,7 @@ "dependencies": { "camelcase": { "version": "2.1.1", - "resolved": "https://registry.npm.taobao.org/camelcase/download/camelcase-2.1.1.tgz", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=", "dev": true } @@ -25700,10 +25745,18 @@ "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" }, + "catharsis": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/catharsis/-/catharsis-0.9.0.tgz", + "integrity": "sha512-prMTQVpcns/tzFgFVkVp6ak6RykZyWb3gu8ckUpd6YkTlacOd3DXGJjIpD4Q6zJirizvaiAjSSHlOsA+6sNh2A==", + "requires": { + "lodash": "^4.17.15" + } + }, "caw": { "version": "2.0.1", - "resolved": "https://registry.npm.taobao.org/caw/download/caw-2.0.1.tgz", - "integrity": "sha1-bDygcfwZRyCIPC3F2psHS/x+npU=", + "resolved": "https://registry.npmjs.org/caw/-/caw-2.0.1.tgz", + "integrity": "sha512-Cg8/ZSBEa8ZVY9HspcGUYaK63d/bN7rqS3CYCzEGUxuYv6UlmcjzDUz2fCFFHyTvUW5Pk0I+3hkA3iXlIj6guA==", "dev": true, "requires": { "get-proxy": "^2.0.0", @@ -25854,8 +25907,8 @@ }, "cli-boxes": { "version": "2.2.1", - "resolved": "https://registry.nlark.com/cli-boxes/download/cli-boxes-2.2.1.tgz", - "integrity": "sha1-3dUDXSUJT84iDpyrQKRYQKRAMY8=", + "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-2.2.1.tgz", + "integrity": "sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw==", "dev": true }, "cli-cursor": { @@ -26050,7 +26103,7 @@ }, "clone-response": { "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/clone-response/download/clone-response-1.0.2.tgz", + "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz", "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=", "dev": true, "requires": { @@ -26070,7 +26123,7 @@ }, "code-point-at": { "version": "1.1.0", - "resolved": "https://registry.nlark.com/code-point-at/download/code-point-at-1.1.0.tgz", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", "dev": true }, @@ -26218,8 +26271,8 @@ }, "config-chain": { "version": "1.1.13", - "resolved": "https://registry.nlark.com/config-chain/download/config-chain-1.1.13.tgz?cache=0&sync_timestamp=1622745851079&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fconfig-chain%2Fdownload%2Fconfig-chain-1.1.13.tgz", - "integrity": "sha1-+tB5Wqamza/57Rto6d/5Q3LCMvQ=", + "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.13.tgz", + "integrity": "sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==", "dev": true, "requires": { "ini": "^1.3.4", @@ -26228,8 +26281,8 @@ }, "configstore": { "version": "5.0.1", - "resolved": "https://registry.npm.taobao.org/configstore/download/configstore-5.0.1.tgz", - "integrity": "sha1-02UCG130uYzdGH1qOw4/anzF7ZY=", + "resolved": "https://registry.npmjs.org/configstore/-/configstore-5.0.1.tgz", + "integrity": "sha512-aMKprgk5YhBNyH25hj8wGt2+D52Sw1DRRIzqBwLp2Ya9mFmY8KPvvtvmna8SxVR9JMZ4kzMD68N22vlaRpkeFA==", "dev": true, "requires": { "dot-prop": "^5.2.0", @@ -26275,13 +26328,13 @@ }, "console-control-strings": { "version": "1.1.0", - "resolved": "https://registry.nlark.com/console-control-strings/download/console-control-strings-1.1.0.tgz", + "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", "dev": true }, "console-stream": { "version": "0.1.1", - "resolved": "https://registry.npm.taobao.org/console-stream/download/console-stream-0.1.1.tgz", + "resolved": "https://registry.npmjs.org/console-stream/-/console-stream-0.1.1.tgz", "integrity": "sha1-oJX+B7IEZZVfL6/Si11yvM2UnUQ=", "dev": true }, @@ -26535,8 +26588,8 @@ }, "cross-env": { "version": "7.0.3", - "resolved": "https://registry.nlark.com/cross-env/download/cross-env-7.0.3.tgz", - "integrity": "sha1-hlJkspZ33AFbqEGJGJZd0jL8VM8=", + "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-7.0.3.tgz", + "integrity": "sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==", "dev": true, "requires": { "cross-spawn": "^7.0.1" @@ -26605,8 +26658,8 @@ }, "crypto-random-string": { "version": "2.0.0", - "resolved": "https://registry.nlark.com/crypto-random-string/download/crypto-random-string-2.0.0.tgz", - "integrity": "sha1-7yp6lm7BEIM4g2m6oC6+rSKbMNU=", + "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz", + "integrity": "sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==", "dev": true }, "css-color-names": { @@ -26808,7 +26861,7 @@ }, "currently-unhandled": { "version": "0.4.1", - "resolved": "https://registry.nlark.com/currently-unhandled/download/currently-unhandled-0.4.1.tgz?cache=0&sync_timestamp=1618847033604&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fcurrently-unhandled%2Fdownload%2Fcurrently-unhandled-0.4.1.tgz", + "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", "dev": true, "requires": { @@ -26867,8 +26920,8 @@ }, "decompress": { "version": "4.2.1", - "resolved": "https://registry.nlark.com/decompress/download/decompress-4.2.1.tgz", - "integrity": "sha1-AH9VzGpiwFWvo3wH62pO4bdz8Rg=", + "resolved": "https://registry.npmjs.org/decompress/-/decompress-4.2.1.tgz", + "integrity": "sha512-e48kc2IjU+2Zw8cTb6VZcJQ3lgVbS4uuB1TfCHbiZIP/haNXm+SVyhu+87jts5/3ROpd82GSVCoNs/z8l4ZOaQ==", "dev": true, "requires": { "decompress-tar": "^4.0.0", @@ -26890,18 +26943,26 @@ } }, "decompress-response": { - "version": "3.3.0", - "resolved": "https://registry.npm.taobao.org/decompress-response/download/decompress-response-3.3.0.tgz?cache=0&sync_timestamp=1613125280468&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdecompress-response%2Fdownload%2Fdecompress-response-3.3.0.tgz", - "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", + "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", "dev": true, "requires": { - "mimic-response": "^1.0.0" + "mimic-response": "^3.1.0" + }, + "dependencies": { + "mimic-response": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", + "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", + "dev": true + } } }, "decompress-tar": { "version": "4.1.1", - "resolved": "https://registry.npm.taobao.org/decompress-tar/download/decompress-tar-4.1.1.tgz", - "integrity": "sha1-cYy9P8sWIJcW5womuE57pFkuWvE=", + "resolved": "https://registry.npmjs.org/decompress-tar/-/decompress-tar-4.1.1.tgz", + "integrity": "sha512-JdJMaCrGpB5fESVyxwpCx4Jdj2AagLmv3y58Qy4GE6HMVjWz1FeVQk1Ct4Kye7PftcdOo/7U7UKzYBJgqnGeUQ==", "dev": true, "requires": { "file-type": "^5.2.0", @@ -26909,37 +26970,18 @@ "tar-stream": "^1.5.2" }, "dependencies": { - "bl": { - "version": "1.2.3", - "resolved": "https://registry.nlark.com/bl/download/bl-1.2.3.tgz", - "integrity": "sha1-Ho3YAULqyA1xWMnczAR/tiDgNec=", - "dev": true, - "requires": { - "readable-stream": "^2.3.5", - "safe-buffer": "^5.1.1" - } - }, - "tar-stream": { - "version": "1.6.2", - "resolved": "https://registry.npm.taobao.org/tar-stream/download/tar-stream-1.6.2.tgz", - "integrity": "sha1-jqVdqzeXIlPZqa+Q/c1VmuQ1xVU=", - "dev": true, - "requires": { - "bl": "^1.0.0", - "buffer-alloc": "^1.2.0", - "end-of-stream": "^1.0.0", - "fs-constants": "^1.0.0", - "readable-stream": "^2.3.0", - "to-buffer": "^1.1.1", - "xtend": "^4.0.0" - } + "file-type": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-5.2.0.tgz", + "integrity": "sha1-LdvqfHP/42No365J3DOMBYwritY=", + "dev": true } } }, "decompress-tarbz2": { "version": "4.1.1", - "resolved": "https://registry.npm.taobao.org/decompress-tarbz2/download/decompress-tarbz2-4.1.1.tgz", - "integrity": "sha1-MIKluIDqQEOBY0nzeLVsUWvho5s=", + "resolved": "https://registry.npmjs.org/decompress-tarbz2/-/decompress-tarbz2-4.1.1.tgz", + "integrity": "sha512-s88xLzf1r81ICXLAVQVzaN6ZmX4A6U4z2nMbOwobxkLoIIfjVMBg7TeguTUXkKeXni795B6y5rnvDw7rxhAq9A==", "dev": true, "requires": { "decompress-tar": "^4.1.0", @@ -26951,26 +26993,34 @@ "dependencies": { "file-type": { "version": "6.2.0", - "resolved": "https://registry.nlark.com/file-type/download/file-type-6.2.0.tgz", - "integrity": "sha1-5QzXXTVv/tTjBtxPW89Sp5kDqRk=", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-6.2.0.tgz", + "integrity": "sha512-YPcTBDV+2Tm0VqjybVd32MHdlEGAtuxS3VAYsumFokDSMG+ROT5wawGlnHDoz7bfMcMDt9hxuXvXwoKUx2fkOg==", "dev": true } } }, "decompress-targz": { "version": "4.1.1", - "resolved": "https://registry.npm.taobao.org/decompress-targz/download/decompress-targz-4.1.1.tgz", - "integrity": "sha1-wJvDXE0R894J8tLaU+neI+fOHu4=", + "resolved": "https://registry.npmjs.org/decompress-targz/-/decompress-targz-4.1.1.tgz", + "integrity": "sha512-4z81Znfr6chWnRDNfFNqLwPvm4db3WuZkqV+UgXQzSngG3CEKdBkw5jrv3axjjL96glyiiKjsxJG3X6WBZwX3w==", "dev": true, "requires": { "decompress-tar": "^4.1.1", "file-type": "^5.2.0", "is-stream": "^1.1.0" + }, + "dependencies": { + "file-type": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-5.2.0.tgz", + "integrity": "sha1-LdvqfHP/42No365J3DOMBYwritY=", + "dev": true + } } }, "decompress-unzip": { "version": "4.0.1", - "resolved": "https://registry.npm.taobao.org/decompress-unzip/download/decompress-unzip-4.0.1.tgz", + "resolved": "https://registry.npmjs.org/decompress-unzip/-/decompress-unzip-4.0.1.tgz", "integrity": "sha1-3qrM39FK6vhVePczroIQ+bSEj2k=", "dev": true, "requires": { @@ -26982,13 +27032,13 @@ "dependencies": { "file-type": { "version": "3.9.0", - "resolved": "https://registry.nlark.com/file-type/download/file-type-3.9.0.tgz", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-3.9.0.tgz", "integrity": "sha1-JXoHg4TR24CHvESdEH1SpSZyuek=", "dev": true }, "get-stream": { "version": "2.3.1", - "resolved": "https://registry.npm.taobao.org/get-stream/download/get-stream-2.3.1.tgz", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-2.3.1.tgz", "integrity": "sha1-Xzj5PzRgCWZu4BUKBUFn+Rvdld4=", "dev": true, "requires": { @@ -27020,8 +27070,8 @@ }, "deep-extend": { "version": "0.6.0", - "resolved": "https://registry.nlark.com/deep-extend/download/deep-extend-0.6.0.tgz", - "integrity": "sha1-xPp8lUBKF6nD6Mp+FTcxK3NjMKw=", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", "dev": true }, "deep-is": { @@ -27119,8 +27169,8 @@ }, "defer-to-connect": { "version": "2.0.1", - "resolved": "https://registry.nlark.com/defer-to-connect/download/defer-to-connect-2.0.1.tgz", - "integrity": "sha1-gBa9tBQ+RjK3ejRJxiNid95SBYc=", + "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.1.tgz", + "integrity": "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==", "dev": true }, "define-properties": { @@ -27248,7 +27298,7 @@ }, "delegates": { "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/delegates/download/delegates-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", "dev": true }, @@ -27275,7 +27325,7 @@ }, "detect-libc": { "version": "1.0.3", - "resolved": "https://registry.npm.taobao.org/detect-libc/download/detect-libc-1.0.3.tgz", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=", "dev": true }, @@ -27420,8 +27470,8 @@ }, "download": { "version": "6.2.5", - "resolved": "https://registry.npm.taobao.org/download/download/download-6.2.5.tgz", - "integrity": "sha1-rNalQuTNC7Qspwz8mMnkOwcDlxQ=", + "resolved": "https://registry.npmjs.org/download/-/download-6.2.5.tgz", + "integrity": "sha512-DpO9K1sXAST8Cpzb7kmEhogJxymyVUd5qz/vCOSyvwtp2Klj2XcDt5YUuasgxka44SxF0q5RriKIwJmQHG2AuA==", "dev": true, "requires": { "caw": "^2.0.0", @@ -27437,10 +27487,25 @@ "pify": "^3.0.0" }, "dependencies": { + "decompress-response": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", + "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", + "dev": true, + "requires": { + "mimic-response": "^1.0.0" + } + }, + "file-type": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-5.2.0.tgz", + "integrity": "sha1-LdvqfHP/42No365J3DOMBYwritY=", + "dev": true + }, "got": { "version": "7.1.0", - "resolved": "https://registry.nlark.com/got/download/got-7.1.0.tgz", - "integrity": "sha1-BUUP2ECU5rvqVvRRpDqcKJFmOFo=", + "resolved": "https://registry.npmjs.org/got/-/got-7.1.0.tgz", + "integrity": "sha512-Y5WMo7xKKq1muPsxD+KmrR8DH5auG7fBdDVueZwETwV6VytKyU9OX/ddpq2/1hp1vIPvVb4T81dKQz3BivkNLw==", "dev": true, "requires": { "decompress-response": "^3.2.0", @@ -27459,15 +27524,21 @@ "url-to-options": "^1.0.1" } }, + "lowercase-keys": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", + "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", + "dev": true + }, "p-cancelable": { "version": "0.3.0", - "resolved": "https://registry.nlark.com/p-cancelable/download/p-cancelable-0.3.0.tgz", - "integrity": "sha1-ueEjgAvOu3rBOkeb4ZW1B7mNMPo=", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-0.3.0.tgz", + "integrity": "sha512-RVbZPLso8+jFeq1MfNvgXtCRED2raz/dKpacfTNxsx6pLEpEomM7gah6VeHSYV3+vo0OAi4MkArtQcWWXuQoyw==", "dev": true }, "url-parse-lax": { "version": "1.0.0", - "resolved": "https://registry.nlark.com/url-parse-lax/download/url-parse-lax-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", "dev": true, "requires": { @@ -27494,7 +27565,7 @@ }, "duplexer3": { "version": "0.1.4", - "resolved": "https://registry.npm.taobao.org/duplexer3/download/duplexer3-0.1.4.tgz", + "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=", "dev": true }, @@ -27688,8 +27759,8 @@ }, "escape-goat": { "version": "2.1.1", - "resolved": "https://registry.npm.taobao.org/escape-goat/download/escape-goat-2.1.1.tgz", - "integrity": "sha1-Gy3HcANnbEV+x2Cy3GjttkgYhnU=", + "resolved": "https://registry.npmjs.org/escape-goat/-/escape-goat-2.1.1.tgz", + "integrity": "sha512-8/uIhbG12Csjy2JEW7D9pHbreaVaS/OpN3ycnyvElTdwM5n6GY6W6e2IPemfvGZeUMqZ9A/3GqIZMgKnBhAw/Q==", "dev": true }, "escape-html": { @@ -27703,6 +27774,18 @@ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" }, + "escodegen": { + "version": "1.14.3", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.14.3.tgz", + "integrity": "sha512-qFcX0XJkdg+PB3xjZZG/wKSuT1PnQWx57+TVSjIMmILd2yC/6ByYElPwJnslDsuWuSAp4AwJGumarAAmJch5Kw==", + "requires": { + "esprima": "^4.0.1", + "estraverse": "^4.2.0", + "esutils": "^2.0.2", + "optionator": "^0.8.1", + "source-map": "~0.6.1" + } + }, "eslint": { "version": "6.8.0", "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.8.0.tgz", @@ -28084,8 +28167,8 @@ }, "exec-buffer": { "version": "3.2.0", - "resolved": "https://registry.npm.taobao.org/exec-buffer/download/exec-buffer-3.2.0.tgz", - "integrity": "sha1-sWhtvZBMfPmC5lLB9aebHlVzCCs=", + "resolved": "https://registry.npmjs.org/exec-buffer/-/exec-buffer-3.2.0.tgz", + "integrity": "sha512-wsiD+2Tp6BWHoVv3B+5Dcx6E7u5zky+hUwOHjuH2hKSLR3dvRmX8fk8UD8uqQixHs4Wk6eDmiegVrMPjKj7wpA==", "dev": true, "requires": { "execa": "^0.7.0", @@ -28108,7 +28191,7 @@ }, "execa": { "version": "0.7.0", - "resolved": "https://registry.nlark.com/execa/download/execa-0.7.0.tgz", + "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", "dev": true, "requires": { @@ -28170,8 +28253,8 @@ }, "executable": { "version": "4.1.1", - "resolved": "https://registry.npm.taobao.org/executable/download/executable-4.1.1.tgz", - "integrity": "sha1-QVMr/zYdPlevTXY7cFgtsY9dEzw=", + "resolved": "https://registry.npmjs.org/executable/-/executable-4.1.1.tgz", + "integrity": "sha512-8iA79xD3uAch729dUG8xaaBBFGaEa0wdD2VkYLFHwlqosEj/jT66AzcreRDSgV7ehnNLBW2WR5jIXwGKjVdTLg==", "dev": true, "requires": { "pify": "^2.2.0" @@ -28201,8 +28284,8 @@ }, "expand-template": { "version": "2.0.3", - "resolved": "https://registry.npm.taobao.org/expand-template/download/expand-template-2.0.3.tgz", - "integrity": "sha1-bhSz/O4POmNA7LV9LokYaSBSpHw=", + "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz", + "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==", "dev": true }, "express": { @@ -28253,8 +28336,8 @@ }, "ext-list": { "version": "2.2.2", - "resolved": "https://registry.npm.taobao.org/ext-list/download/ext-list-2.2.2.tgz", - "integrity": "sha1-C5jmTtgvWs8PKTG6v2khLvUt3Tc=", + "resolved": "https://registry.npmjs.org/ext-list/-/ext-list-2.2.2.tgz", + "integrity": "sha512-u+SQgsubraE6zItfVA0tBuCBhfU9ogSRnsvygI7wht9TS510oLkBRXBsqopeUG/GBOIQyKZO9wjTqIu/sf5zFA==", "dev": true, "requires": { "mime-db": "^1.28.0" @@ -28262,8 +28345,8 @@ }, "ext-name": { "version": "5.0.0", - "resolved": "https://registry.nlark.com/ext-name/download/ext-name-5.0.0.tgz", - "integrity": "sha1-cHgZgdGD7hXROZPIgiBFxQbI8KY=", + "resolved": "https://registry.npmjs.org/ext-name/-/ext-name-5.0.0.tgz", + "integrity": "sha512-yblEwXAbGv1VQDmow7s38W77hzAgJAO50ztBLMcUyUBfxv1HC+LGwtiEN+Co6LtlqT/5uwVOxsD4TNIilWhwdQ==", "dev": true, "requires": { "ext-list": "^2.0.0", @@ -28361,9 +28444,9 @@ "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=" }, "fastq": { - "version": "1.11.1", - "resolved": "https://registry.nlark.com/fastq/download/fastq-1.11.1.tgz?cache=0&sync_timestamp=1625392906410&other_urls=https%3A%2F%2Fregistry.nlark.com%2Ffastq%2Fdownload%2Ffastq-1.11.1.tgz", - "integrity": "sha1-XYF1quF9thlH+LFiz8f2MmTSKAc=", + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", + "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", "dev": true, "requires": { "reusify": "^1.0.4" @@ -28380,7 +28463,7 @@ }, "fd-slicer": { "version": "1.1.0", - "resolved": "https://registry.npm.taobao.org/fd-slicer/download/fd-slicer-1.1.0.tgz", + "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", "integrity": "sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4=", "dev": true, "requires": { @@ -28432,10 +28515,16 @@ } }, "file-type": { - "version": "5.2.0", - "resolved": "https://registry.nlark.com/file-type/download/file-type-5.2.0.tgz", - "integrity": "sha1-LdvqfHP/42No365J3DOMBYwritY=", - "dev": true + "version": "14.7.1", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-14.7.1.tgz", + "integrity": "sha512-sXAMgFk67fQLcetXustxfKX+PZgHIUFn96Xld9uH8aXPdX3xOp0/jg9OdouVTvQrf7mrn+wAa4jN/y9fUOOiRA==", + "dev": true, + "requires": { + "readable-web-to-node-stream": "^2.0.0", + "strtok3": "^6.0.3", + "token-types": "^2.0.0", + "typedarray-to-buffer": "^3.1.5" + } }, "file-uri-to-path": { "version": "1.0.0", @@ -28444,14 +28533,14 @@ }, "filename-reserved-regex": { "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/filename-reserved-regex/download/filename-reserved-regex-2.0.0.tgz", + "resolved": "https://registry.npmjs.org/filename-reserved-regex/-/filename-reserved-regex-2.0.0.tgz", "integrity": "sha1-q/c9+rc10EVECr/qLZHzieu/oik=", "dev": true }, "filenamify": { "version": "2.1.0", - "resolved": "https://registry.nlark.com/filenamify/download/filenamify-2.1.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.nlark.com%2Ffilenamify%2Fdownload%2Ffilenamify-2.1.0.tgz", - "integrity": "sha1-iPr0lfsbR6v9YSMAACoWIoxnfuk=", + "resolved": "https://registry.npmjs.org/filenamify/-/filenamify-2.1.0.tgz", + "integrity": "sha512-ICw7NTT6RsDp2rnYKVd8Fu4cr6ITzGy3+u4vUujPkabyaz+03F24NWEX7fs5fp+kBonlaqPH8fAO2NM+SXt/JA==", "dev": true, "requires": { "filename-reserved-regex": "^2.0.0", @@ -28539,8 +28628,8 @@ }, "find-versions": { "version": "3.2.0", - "resolved": "https://registry.nlark.com/find-versions/download/find-versions-3.2.0.tgz?cache=0&sync_timestamp=1619599444272&other_urls=https%3A%2F%2Fregistry.nlark.com%2Ffind-versions%2Fdownload%2Ffind-versions-3.2.0.tgz", - "integrity": "sha1-ECl/mAMKeGgpaBaQVF72We0dJU4=", + "resolved": "https://registry.npmjs.org/find-versions/-/find-versions-3.2.0.tgz", + "integrity": "sha512-P8WRou2S+oe222TOCHitLy8zj+SIsVJh52VP4lvXkaFVnOFFdoWv1H1Jjvel1aI6NCFOAaeAVm8qrI0odiLcww==", "dev": true, "requires": { "semver-regex": "^2.0.0" @@ -28657,8 +28746,8 @@ }, "fs-constants": { "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/fs-constants/download/fs-constants-1.0.0.tgz", - "integrity": "sha1-a+Dem+mYzhavivwkSXue6bfM2a0=", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", "dev": true }, "fs-extra": { @@ -28719,7 +28808,7 @@ }, "gauge": { "version": "2.7.4", - "resolved": "https://registry.npm.taobao.org/gauge/download/gauge-2.7.4.tgz", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", "dev": true, "requires": { @@ -28735,7 +28824,7 @@ "dependencies": { "is-fullwidth-code-point": { "version": "1.0.0", - "resolved": "https://registry.nlark.com/is-fullwidth-code-point/download/is-fullwidth-code-point-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", "dev": true, "requires": { @@ -28744,7 +28833,7 @@ }, "string-width": { "version": "1.0.2", - "resolved": "https://registry.nlark.com/string-width/download/string-width-1.0.2.tgz", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "dev": true, "requires": { @@ -28789,8 +28878,8 @@ }, "get-proxy": { "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/get-proxy/download/get-proxy-2.1.0.tgz", - "integrity": "sha1-NJ8rTZHUTE1NTpy6KtkBQ/rF75M=", + "resolved": "https://registry.npmjs.org/get-proxy/-/get-proxy-2.1.0.tgz", + "integrity": "sha512-zmZIaQTWnNQb4R4fJUEp/FC51eZsc6EkErspy3xtIYStaq8EB/hDIWipxsal+E8rz0qD7f2sL/NA9Xee4RInJw==", "dev": true, "requires": { "npm-conf": "^1.1.0" @@ -28798,7 +28887,7 @@ }, "get-stdin": { "version": "4.0.1", - "resolved": "https://registry.npm.taobao.org/get-stdin/download/get-stdin-4.0.1.tgz?cache=0&sync_timestamp=1618557719783&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fget-stdin%2Fdownload%2Fget-stdin-4.0.1.tgz", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=", "dev": true }, @@ -28823,7 +28912,7 @@ }, "github-from-package": { "version": "0.0.0", - "resolved": "https://registry.npm.taobao.org/github-from-package/download/github-from-package-0.0.0.tgz", + "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", "integrity": "sha1-l/tdlr/eiXMxPyDoKI75oWf6ZM4=", "dev": true }, @@ -28869,8 +28958,8 @@ }, "global-dirs": { "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/global-dirs/download/global-dirs-3.0.0.tgz?cache=0&sync_timestamp=1610454716901&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fglobal-dirs%2Fdownload%2Fglobal-dirs-3.0.0.tgz", - "integrity": "sha1-cKdv6E6jFas3sfVXbL3n1I73JoY=", + "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-3.0.0.tgz", + "integrity": "sha512-v8ho2DS5RiCjftj1nD9NmnfaOzTdud7RRnVd9kFNOjqZbISlx5DQ+OrTkywgd0dIt7oFCvKetZSHoHcP3sDdiA==", "dev": true, "requires": { "ini": "2.0.0" @@ -28878,8 +28967,8 @@ "dependencies": { "ini": { "version": "2.0.0", - "resolved": "https://registry.nlark.com/ini/download/ini-2.0.0.tgz", - "integrity": "sha1-5f1Vbs3VcmvpePoQAYYurLCpS8U=", + "resolved": "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz", + "integrity": "sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==", "dev": true } } @@ -28937,8 +29026,8 @@ }, "got": { "version": "11.8.2", - "resolved": "https://registry.nlark.com/got/download/got-11.8.2.tgz", - "integrity": "sha1-ers5Weoowx81dvFXbB7/ziPzNZk=", + "resolved": "https://registry.npmjs.org/got/-/got-11.8.2.tgz", + "integrity": "sha512-D0QywKgIe30ODs+fm8wMZiAcZjypcCodPNuMz5H9Mny7RJ+IjJ10BdmGW7OM7fHXP+O7r6ZwapQ/YQmMSvB0UQ==", "dev": true, "requires": { "@sindresorhus/is": "^4.0.0", @@ -28952,38 +29041,6 @@ "lowercase-keys": "^2.0.0", "p-cancelable": "^2.0.0", "responselike": "^2.0.0" - }, - "dependencies": { - "decompress-response": { - "version": "6.0.0", - "resolved": "https://registry.npm.taobao.org/decompress-response/download/decompress-response-6.0.0.tgz?cache=0&sync_timestamp=1613125280468&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdecompress-response%2Fdownload%2Fdecompress-response-6.0.0.tgz", - "integrity": "sha1-yjh2Et234QS9FthaqwDV7PCcZvw=", - "dev": true, - "requires": { - "mimic-response": "^3.1.0" - } - }, - "lowercase-keys": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/lowercase-keys/download/lowercase-keys-2.0.0.tgz", - "integrity": "sha1-JgPni3tLAAbLyi+8yKMgJVislHk=", - "dev": true - }, - "mimic-response": { - "version": "3.1.0", - "resolved": "https://registry.nlark.com/mimic-response/download/mimic-response-3.1.0.tgz", - "integrity": "sha1-LR1Zr5wbEpgVrMwsRqAipc4fo8k=", - "dev": true - }, - "responselike": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/responselike/download/responselike-2.0.0.tgz", - "integrity": "sha1-JjkbzDF091D5p56sxAoSpcQtdyM=", - "dev": true, - "requires": { - "lowercase-keys": "^2.0.0" - } - } } }, "graceful-fs": { @@ -29009,6 +29066,16 @@ } } }, + "hammerjs": { + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/hammerjs/-/hammerjs-2.0.8.tgz", + "integrity": "sha1-BO93hiz/K7edMPdpIJWTAiK/YPE=" + }, + "hamsterjs": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/hamsterjs/-/hamsterjs-1.1.3.tgz", + "integrity": "sha512-q4XBr7hnxx1WyZA8mpVDuZVa1YXaR0WZaFSBxnj8hUXltuqXJOt5yuWYkAbMXsj+q0REDUO990+/TuxEadXFyg==" + }, "handle-thing": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/handle-thing/-/handle-thing-2.0.1.tgz", @@ -29040,7 +29107,7 @@ }, "has-ansi": { "version": "2.0.0", - "resolved": "https://registry.nlark.com/has-ansi/download/has-ansi-2.0.0.tgz", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", "dev": true, "requires": { @@ -29060,8 +29127,8 @@ }, "has-symbol-support-x": { "version": "1.4.2", - "resolved": "https://registry.npm.taobao.org/has-symbol-support-x/download/has-symbol-support-x-1.4.2.tgz", - "integrity": "sha1-FAn5i8ACR9pF2mfO4KNvKC/yZFU=", + "resolved": "https://registry.npmjs.org/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz", + "integrity": "sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw==", "dev": true }, "has-symbols": { @@ -29072,8 +29139,8 @@ }, "has-to-string-tag-x": { "version": "1.4.1", - "resolved": "https://registry.npm.taobao.org/has-to-string-tag-x/download/has-to-string-tag-x-1.4.1.tgz", - "integrity": "sha1-oEWrOD17SyASoAFIqwql8pAETU0=", + "resolved": "https://registry.npmjs.org/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz", + "integrity": "sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw==", "dev": true, "requires": { "has-symbol-support-x": "^1.4.1" @@ -29081,7 +29148,7 @@ }, "has-unicode": { "version": "2.0.1", - "resolved": "https://registry.npm.taobao.org/has-unicode/download/has-unicode-2.0.1.tgz", + "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", "dev": true }, @@ -29116,8 +29183,8 @@ }, "has-yarn": { "version": "2.1.0", - "resolved": "https://registry.nlark.com/has-yarn/download/has-yarn-2.1.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fhas-yarn%2Fdownload%2Fhas-yarn-2.1.0.tgz", - "integrity": "sha1-E34RNUp7W/EapctknPDG8/8rLnc=", + "resolved": "https://registry.npmjs.org/has-yarn/-/has-yarn-2.1.0.tgz", + "integrity": "sha512-UqBRqi4ju7T+TqGNdqAO0PaSVGsDGJUBQvk9eUWNGRY1CFGDzYhLWoM7JQEemnlvVcv/YEmc2wNW8BC24EnUsw==", "dev": true }, "hash-base": { @@ -29316,8 +29383,8 @@ }, "http-cache-semantics": { "version": "4.1.0", - "resolved": "https://registry.nlark.com/http-cache-semantics/download/http-cache-semantics-4.1.0.tgz", - "integrity": "sha1-SekcXL82yblLz81xwj1SSex045A=", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz", + "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==", "dev": true }, "http-deceiver": { @@ -29396,8 +29463,8 @@ }, "http2-wrapper": { "version": "1.0.3", - "resolved": "https://registry.nlark.com/http2-wrapper/download/http2-wrapper-1.0.3.tgz?cache=0&sync_timestamp=1626124919738&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fhttp2-wrapper%2Fdownload%2Fhttp2-wrapper-1.0.3.tgz", - "integrity": "sha1-uPVeDB8l1OvQizsMLAeflZCACz0=", + "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-1.0.3.tgz", + "integrity": "sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg==", "dev": true, "requires": { "quick-lru": "^5.1.1", @@ -29448,8 +29515,8 @@ }, "imagemin": { "version": "8.0.0", - "resolved": "https://registry.nlark.com/imagemin/download/imagemin-8.0.0.tgz?cache=0&sync_timestamp=1618999751113&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fimagemin%2Fdownload%2Fimagemin-8.0.0.tgz", - "integrity": "sha1-1weSDWx6f4synS4C2MeNXcyCY1Y=", + "resolved": "https://registry.npmjs.org/imagemin/-/imagemin-8.0.0.tgz", + "integrity": "sha512-z/SoCabSI9nYbCefdu1xgCJJ+KMjsu17dlaL7sGXAdaljIg7K32TUuj9Vt9jMjBZJd/qyWXJ+FvjChkvc2mXOw==", "dev": true, "requires": { "file-type": "^14.6.0", @@ -29462,8 +29529,8 @@ "dependencies": { "array-union": { "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/array-union/download/array-union-2.1.0.tgz?cache=0&sync_timestamp=1614624262896&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Farray-union%2Fdownload%2Farray-union-2.1.0.tgz", - "integrity": "sha1-t5hCCtvrHego2ErNii4j0+/oXo0=", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", "dev": true }, "braces": { @@ -29477,8 +29544,8 @@ }, "dir-glob": { "version": "3.0.1", - "resolved": "https://registry.npm.taobao.org/dir-glob/download/dir-glob-3.0.1.tgz", - "integrity": "sha1-Vtv3PZkqSpO6FYT0U0Bj/S5BcX8=", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", "dev": true, "requires": { "path-type": "^4.0.0" @@ -29486,8 +29553,8 @@ }, "fast-glob": { "version": "3.2.7", - "resolved": "https://registry.nlark.com/fast-glob/download/fast-glob-3.2.7.tgz", - "integrity": "sha1-/Wy3otfpqnp4RhEehaGW1rL3ZqE=", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.7.tgz", + "integrity": "sha512-rYGMRwip6lUMvYD3BTScMwT1HtAs2d71SMv66Vrxs0IekGZEjhM0pcMfjQPnknBt2zeCwQMEupiN02ZP4DiT1Q==", "dev": true, "requires": { "@nodelib/fs.stat": "^2.0.2", @@ -29497,18 +29564,6 @@ "micromatch": "^4.0.4" } }, - "file-type": { - "version": "14.7.1", - "resolved": "https://registry.nlark.com/file-type/download/file-type-14.7.1.tgz", - "integrity": "sha1-90hzKz5wR4v/Uw4c8Owv4zYIsbs=", - "dev": true, - "requires": { - "readable-web-to-node-stream": "^2.0.0", - "strtok3": "^6.0.3", - "token-types": "^2.0.0", - "typedarray-to-buffer": "^3.1.5" - } - }, "fill-range": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", @@ -29529,8 +29584,8 @@ }, "globby": { "version": "11.0.4", - "resolved": "https://registry.nlark.com/globby/download/globby-11.0.4.tgz?cache=0&sync_timestamp=1623850192942&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fglobby%2Fdownload%2Fglobby-11.0.4.tgz", - "integrity": "sha1-LLr/d8Lypi5x6bKBOme5ejowAaU=", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.4.tgz", + "integrity": "sha512-9O4MVG9ioZJ08ffbcyVYyLOJLk5JQ688pJ4eMGLpdWLHq/Wr1D9BlriLQyL0E+jbkuePVZXYFj47QM/v093wHg==", "dev": true, "requires": { "array-union": "^2.1.0", @@ -29542,9 +29597,9 @@ } }, "ignore": { - "version": "5.1.8", - "resolved": "https://registry.nlark.com/ignore/download/ignore-5.1.8.tgz", - "integrity": "sha1-8VCotQo0KJsz4i9YiavU2AFvDlc=", + "version": "5.1.9", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.9.tgz", + "integrity": "sha512-2zeMQpbKz5dhZ9IwL0gbxSW5w0NK/MSAMtNuhgIHEPmaU3vPdKPL0UdvUCXs5SS4JAwsBxysK5sFMW8ocFiVjQ==", "dev": true }, "is-number": { @@ -29565,14 +29620,14 @@ }, "path-type": { "version": "4.0.0", - "resolved": "https://registry.nlark.com/path-type/download/path-type-4.0.0.tgz", - "integrity": "sha1-hO0BwKe6OAr+CdkKjBgNzZ0DBDs=", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", "dev": true }, "slash": { "version": "3.0.0", - "resolved": "https://registry.nlark.com/slash/download/slash-3.0.0.tgz", - "integrity": "sha1-ZTm+hwwWWtvVJAIg2+Nh8bxNRjQ=", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", "dev": true }, "to-regex-range": { @@ -29588,24 +29643,40 @@ }, "imagemin-optipng": { "version": "8.0.0", - "resolved": "https://registry.npm.taobao.org/imagemin-optipng/download/imagemin-optipng-8.0.0.tgz", - "integrity": "sha1-uI5c9tolzIR54HzfOMOuBHnffvI=", + "resolved": "https://registry.npmjs.org/imagemin-optipng/-/imagemin-optipng-8.0.0.tgz", + "integrity": "sha512-CUGfhfwqlPjAC0rm8Fy+R2DJDBGjzy2SkfyT09L8rasnF9jSoHFqJ1xxSZWK6HVPZBMhGPMxCTL70OgTHlLF5A==", "dev": true, "requires": { "exec-buffer": "^3.0.0", "is-png": "^2.0.0", "optipng-bin": "^7.0.0" + }, + "dependencies": { + "is-png": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-png/-/is-png-2.0.0.tgz", + "integrity": "sha512-4KPGizaVGj2LK7xwJIz8o5B2ubu1D/vcQsgOGFEDlpcvgZHto4gBnyd0ig7Ws+67ixmwKoNmu0hYnpo6AaKb5g==", + "dev": true + } } }, "imagemin-zopfli": { "version": "7.0.0", - "resolved": "https://registry.npm.taobao.org/imagemin-zopfli/download/imagemin-zopfli-7.0.0.tgz", - "integrity": "sha1-pE2qO7gOJiDNHciD2COyC003iNY=", + "resolved": "https://registry.npmjs.org/imagemin-zopfli/-/imagemin-zopfli-7.0.0.tgz", + "integrity": "sha512-nmffj58rVb0O3AlCZLBBVKGyZ5MYPZZfKxUhvA7bwPGougHl/F7EUKSse9jkgXjdvtJYG2ojJeh5N67mYgBM9g==", "dev": true, "requires": { "exec-buffer": "^3.0.0", "is-png": "^2.0.0", "zopflipng-bin": "^6.0.0" + }, + "dependencies": { + "is-png": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-png/-/is-png-2.0.0.tgz", + "integrity": "sha512-4KPGizaVGj2LK7xwJIz8o5B2ubu1D/vcQsgOGFEDlpcvgZHto4gBnyd0ig7Ws+67ixmwKoNmu0hYnpo6AaKb5g==", + "dev": true + } } }, "import-cwd": { @@ -29643,9 +29714,9 @@ } }, "import-lazy": { - "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/import-lazy/download/import-lazy-2.1.0.tgz", - "integrity": "sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-3.1.0.tgz", + "integrity": "sha512-8/gvXvX2JMn0F+CDlSC4l6kOmVaLOO3XLkksI7CI3Ud95KDYJuYur2b9P/PUt/i/pDAMd/DulQsNbbbmRRsDIQ==", "dev": true }, "import-local": { @@ -29665,7 +29736,7 @@ }, "indent-string": { "version": "2.1.0", - "resolved": "https://registry.nlark.com/indent-string/download/indent-string-2.1.0.tgz?cache=0&sync_timestamp=1618847271946&other_urls=https%3A%2F%2Fregistry.nlark.com%2Findent-string%2Fdownload%2Findent-string-2.1.0.tgz", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", "dev": true, "requires": { @@ -29699,8 +29770,8 @@ }, "ini": { "version": "1.3.8", - "resolved": "https://registry.nlark.com/ini/download/ini-1.3.8.tgz", - "integrity": "sha1-op2kJbSIBvNHZ6Tvzjlyaa8oQyw=", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", "dev": true }, "inquirer": { @@ -29793,7 +29864,7 @@ }, "into-stream": { "version": "3.1.0", - "resolved": "https://registry.npm.taobao.org/into-stream/download/into-stream-3.1.0.tgz", + "resolved": "https://registry.npmjs.org/into-stream/-/into-stream-3.1.0.tgz", "integrity": "sha1-lvsKk2wSur1v8XUqF9BWFqvQlMY=", "dev": true, "requires": { @@ -29984,8 +30055,8 @@ }, "is-finite": { "version": "1.1.0", - "resolved": "https://registry.nlark.com/is-finite/download/is-finite-1.1.0.tgz", - "integrity": "sha1-kEE1x3+0LAZB1qobzbxNqo2ggvM=", + "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.1.0.tgz", + "integrity": "sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w==", "dev": true }, "is-fullwidth-code-point": { @@ -30003,8 +30074,8 @@ }, "is-installed-globally": { "version": "0.4.0", - "resolved": "https://registry.npm.taobao.org/is-installed-globally/download/is-installed-globally-0.4.0.tgz?cache=0&sync_timestamp=1610875398433&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fis-installed-globally%2Fdownload%2Fis-installed-globally-0.4.0.tgz", - "integrity": "sha1-mg/UB5ScMPhutpWe8beZTtC3tSA=", + "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.4.0.tgz", + "integrity": "sha512-iwGqO3J21aaSkC7jWnHP/difazwS7SFeIqxv6wEtLU8Y5KlzFTjyqcSIT0d8s4+dDhKytsk9PJZ2BkS5eZwQRQ==", "dev": true, "requires": { "global-dirs": "^3.0.0", @@ -30013,21 +30084,21 @@ "dependencies": { "is-path-inside": { "version": "3.0.3", - "resolved": "https://registry.nlark.com/is-path-inside/download/is-path-inside-3.0.3.tgz?cache=0&sync_timestamp=1620046845369&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fis-path-inside%2Fdownload%2Fis-path-inside-3.0.3.tgz", - "integrity": "sha1-0jE2LlOgf/Kw4Op/7QSRYf/RYoM=", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", "dev": true } } }, "is-interactive": { "version": "1.0.0", - "resolved": "https://registry.nlark.com/is-interactive/download/is-interactive-1.0.0.tgz", - "integrity": "sha1-zqbmrlyHCnsKAAQHC3tYfgJSkS4=", + "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz", + "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==", "dev": true }, "is-natural-number": { "version": "4.0.1", - "resolved": "https://registry.npm.taobao.org/is-natural-number/download/is-natural-number-4.0.1.tgz", + "resolved": "https://registry.npmjs.org/is-natural-number/-/is-natural-number-4.0.1.tgz", "integrity": "sha1-q5124dtM7VHjXeDHLr7PCfc0zeg=", "dev": true }, @@ -30039,8 +30110,8 @@ }, "is-npm": { "version": "5.0.0", - "resolved": "https://registry.nlark.com/is-npm/download/is-npm-5.0.0.tgz", - "integrity": "sha1-Q+jWXMVuG2f41HJiz2ZwmRk/Rag=", + "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-5.0.0.tgz", + "integrity": "sha512-WW/rQLOazUq+ST/bCAVBp/2oMERWLsR7OrKyt052dNDk4DHcDE0/7QSXITlmi+VBcV13DfIbysG3tZJm5RfdBA==", "dev": true }, "is-number": { @@ -30065,8 +30136,8 @@ }, "is-object": { "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/is-object/download/is-object-1.0.2.tgz", - "integrity": "sha1-pWVS4cZlyelQtKAlRh2ofnL4b88=", + "resolved": "https://registry.npmjs.org/is-object/-/is-object-1.0.2.tgz", + "integrity": "sha512-2rRIahhZr2UWb45fIOuvZGpFtz0TyOZLf32KxBbSoUCeZR495zCKlWUKKUByk3geS2eAs7ZAABt0Y/Rx0GiQGA==", "dev": true }, "is-path-cwd": { @@ -30108,9 +30179,9 @@ } }, "is-png": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/is-png/download/is-png-2.0.0.tgz", - "integrity": "sha1-7oy8npsFBCXO3utKb7dKZJsKSo0=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-png/-/is-png-3.0.0.tgz", + "integrity": "sha512-waa2qEuqgLjjYT14KOUQqAEIRRIv7ttkzPVctY/qv+IAKnzXf+JAPKQas50RgO0ECPDUG/iB1zQmwpyB9kkZtQ==", "dev": true }, "is-regex": { @@ -30131,8 +30202,8 @@ }, "is-retry-allowed": { "version": "1.2.0", - "resolved": "https://registry.npm.taobao.org/is-retry-allowed/download/is-retry-allowed-1.2.0.tgz?cache=0&sync_timestamp=1618646442055&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fis-retry-allowed%2Fdownload%2Fis-retry-allowed-1.2.0.tgz", - "integrity": "sha1-13hIi9CkZmo76KFIK58rqv7eqLQ=", + "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz", + "integrity": "sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg==", "dev": true }, "is-stream": { @@ -30163,13 +30234,13 @@ }, "is-unicode-supported": { "version": "0.1.0", - "resolved": "https://registry.nlark.com/is-unicode-supported/download/is-unicode-supported-0.1.0.tgz?cache=0&sync_timestamp=1625294010675&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fis-unicode-supported%2Fdownload%2Fis-unicode-supported-0.1.0.tgz", - "integrity": "sha1-PybHaoCVk7Ur+i7LVxDtJ3m1Iqc=", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", "dev": true }, "is-utf8": { "version": "0.2.1", - "resolved": "https://registry.nlark.com/is-utf8/download/is-utf8-0.2.1.tgz", + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", "dev": true }, @@ -30185,8 +30256,8 @@ }, "is-yarn-global": { "version": "0.3.0", - "resolved": "https://registry.nlark.com/is-yarn-global/download/is-yarn-global-0.3.0.tgz?cache=0&sync_timestamp=1619356824740&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fis-yarn-global%2Fdownload%2Fis-yarn-global-0.3.0.tgz", - "integrity": "sha1-1QLTOCWQ6jAEiTdGdUyJE5lz4jI=", + "resolved": "https://registry.npmjs.org/is-yarn-global/-/is-yarn-global-0.3.0.tgz", + "integrity": "sha512-VjSeb/lHmkoyd8ryPVIKvOCn4D1koMqY+vqyjjUfc3xyKtP4dYOxM44sZrnqQSzSds3xyOrUTLTC9LVCVgLngw==", "dev": true }, "isarray": { @@ -30217,8 +30288,8 @@ }, "isurl": { "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/isurl/download/isurl-1.0.0.tgz", - "integrity": "sha1-sn9PSfPNqj6kSgpbfzRi5u3DnWc=", + "resolved": "https://registry.npmjs.org/isurl/-/isurl-1.0.0.tgz", + "integrity": "sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w==", "dev": true, "requires": { "has-to-string-tag-x": "^1.2.0", @@ -30270,11 +30341,57 @@ "esprima": "^4.0.0" } }, + "js2xmlparser": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/js2xmlparser/-/js2xmlparser-4.0.2.tgz", + "integrity": "sha512-6n4D8gLlLf1n5mNLQPRfViYzu9RATblzPEtm1SthMX1Pjao0r9YI9nw7ZIfRxQMERS87mcswrg+r/OYrPRX6jA==", + "requires": { + "xmlcreate": "^2.0.4" + } + }, "jsbn": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" }, + "jsdoc": { + "version": "3.6.7", + "resolved": "https://registry.npmjs.org/jsdoc/-/jsdoc-3.6.7.tgz", + "integrity": "sha512-sxKt7h0vzCd+3Y81Ey2qinupL6DpRSZJclS04ugHDNmRUXGzqicMJ6iwayhSA0S0DwwX30c5ozyUthr1QKF6uw==", + "requires": { + "@babel/parser": "^7.9.4", + "bluebird": "^3.7.2", + "catharsis": "^0.9.0", + "escape-string-regexp": "^2.0.0", + "js2xmlparser": "^4.0.1", + "klaw": "^3.0.0", + "markdown-it": "^10.0.0", + "markdown-it-anchor": "^5.2.7", + "marked": "^2.0.3", + "mkdirp": "^1.0.4", + "requizzle": "^0.2.3", + "strip-json-comments": "^3.1.0", + "taffydb": "2.6.2", + "underscore": "~1.13.1" + }, + "dependencies": { + "escape-string-regexp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==" + }, + "mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==" + }, + "strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==" + } + } + }, "jsesc": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", @@ -30282,9 +30399,9 @@ "dev": true }, "json-buffer": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/json-buffer/download/json-buffer-3.0.0.tgz", - "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", "dev": true }, "json-parse-better-errors": { @@ -30409,25 +30526,17 @@ }, "junk": { "version": "3.1.0", - "resolved": "https://registry.npm.taobao.org/junk/download/junk-3.1.0.tgz", - "integrity": "sha1-MUmQmNkCt+mMXZucgPQ0V6iKv6E=", + "resolved": "https://registry.npmjs.org/junk/-/junk-3.1.0.tgz", + "integrity": "sha512-pBxcB3LFc8QVgdggvZWyeys+hnrNWg4OcZIU/1X59k5jQdLBlCsYGRQaz234SqoRLTCgMH00fY0xRJH+F9METQ==", "dev": true }, "keyv": { - "version": "4.0.3", - "resolved": "https://registry.npm.taobao.org/keyv/download/keyv-4.0.3.tgz", - "integrity": "sha1-TzqpjeJUgDyvzSiWc0EI2qNeQlQ=", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.0.4.tgz", + "integrity": "sha512-vqNHbAc8BBsxk+7QBYLW0Y219rWcClspR6WSeoHYKG5mnsSoOH+BL1pWq02DDCVdvvuUny5rkBlzMRzoqc+GIg==", "dev": true, "requires": { "json-buffer": "3.0.1" - }, - "dependencies": { - "json-buffer": { - "version": "3.0.1", - "resolved": "https://registry.npm.taobao.org/json-buffer/download/json-buffer-3.0.1.tgz", - "integrity": "sha1-kziAKjDTtmBfvgYT4JQAjKjAWhM=", - "dev": true - } } }, "killable": { @@ -30444,6 +30553,14 @@ "is-buffer": "^1.1.5" } }, + "klaw": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/klaw/-/klaw-3.0.0.tgz", + "integrity": "sha512-0Fo5oir+O9jnXu5EefYbVK+mHMBeEVEy2cmctR1O1NECcCkPRreJKrS6Qt/j3KC2C148Dfo9i3pCmCMsdqGr0g==", + "requires": { + "graceful-fs": "^4.1.9" + } + }, "klona": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/klona/-/klona-2.0.4.tgz", @@ -30452,8 +30569,8 @@ }, "latest-version": { "version": "5.1.0", - "resolved": "https://registry.nlark.com/latest-version/download/latest-version-5.1.0.tgz?cache=0&sync_timestamp=1618847146540&other_urls=https%3A%2F%2Fregistry.nlark.com%2Flatest-version%2Fdownload%2Flatest-version-5.1.0.tgz", - "integrity": "sha1-EZ3+kI/jjRXfpD7NE/oS7Igy+s4=", + "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-5.1.0.tgz", + "integrity": "sha512-weT+r0kTkRQdCdYCNtkMwWXQTMEswKrFBkm4ckQOMVhhqhIMI1UT2hMj+1iigIhgSZm5gTmrRXBNoGUgaTY1xA==", "dev": true, "requires": { "package-json": "^6.3.0" @@ -30571,6 +30688,14 @@ "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=", "dev": true }, + "linkify-it": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-2.2.0.tgz", + "integrity": "sha512-GnAl/knGn+i1U/wjBz3akz2stz+HrHLsxMwHQGofCDfPvlf+gDKN58UtfmUquTY4/MXeE2x7k19KQmeoZi94Iw==", + "requires": { + "uc.micro": "^1.0.1" + } + }, "load-json-file": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", @@ -30727,7 +30852,7 @@ }, "logalot": { "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/logalot/download/logalot-2.1.0.tgz", + "resolved": "https://registry.npmjs.org/logalot/-/logalot-2.1.0.tgz", "integrity": "sha1-X46MkNME7fElMJUaVVSruMXj9VI=", "dev": true, "requires": { @@ -30737,7 +30862,7 @@ "dependencies": { "figures": { "version": "1.7.0", - "resolved": "https://registry.nlark.com/figures/download/figures-1.7.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.nlark.com%2Ffigures%2Fdownload%2Ffigures-1.7.0.tgz", + "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", "dev": true, "requires": { @@ -30760,7 +30885,7 @@ }, "longest": { "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/longest/download/longest-1.0.1.tgz", + "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", "dev": true }, @@ -30774,7 +30899,7 @@ }, "loud-rejection": { "version": "1.6.0", - "resolved": "https://registry.npm.taobao.org/loud-rejection/download/loud-rejection-1.6.0.tgz", + "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", "dev": true, "requires": { @@ -30789,14 +30914,14 @@ "dev": true }, "lowercase-keys": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/lowercase-keys/download/lowercase-keys-1.0.1.tgz", - "integrity": "sha1-b54wtHCE2XGnyCD/FabFFnt0wm8=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", + "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", "dev": true }, "lpad-align": { "version": "1.1.2", - "resolved": "https://registry.nlark.com/lpad-align/download/lpad-align-1.1.2.tgz", + "resolved": "https://registry.npmjs.org/lpad-align/-/lpad-align-1.1.2.tgz", "integrity": "sha1-IfYArBwwlcPG5JfuZyce4ISB/p4=", "dev": true, "requires": { @@ -30822,10 +30947,15 @@ } } }, + "lz-string": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/lz-string/-/lz-string-1.4.4.tgz", + "integrity": "sha1-wNjq82BZ9wV5bh40SBHPTEmNOiY=" + }, "make-dir": { "version": "1.3.0", - "resolved": "https://registry.nlark.com/make-dir/download/make-dir-1.3.0.tgz", - "integrity": "sha1-ecEDO4BRW9bSTsmTPoYMp17ifww=", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", + "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", "dev": true, "requires": { "pify": "^3.0.0" @@ -30838,7 +30968,7 @@ }, "map-obj": { "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/map-obj/download/map-obj-1.0.1.tgz?cache=0&sync_timestamp=1617771341569&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmap-obj%2Fdownload%2Fmap-obj-1.0.1.tgz", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", "dev": true }, @@ -30850,6 +30980,36 @@ "object-visit": "^1.0.0" } }, + "markdown-it": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-10.0.0.tgz", + "integrity": "sha512-YWOP1j7UbDNz+TumYP1kpwnP0aEa711cJjrAQrzd0UXlbJfc5aAq0F/PZHjiioqDC1NKgvIMX+o+9Bk7yuM2dg==", + "requires": { + "argparse": "^1.0.7", + "entities": "~2.0.0", + "linkify-it": "^2.0.0", + "mdurl": "^1.0.1", + "uc.micro": "^1.0.5" + }, + "dependencies": { + "entities": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.0.3.tgz", + "integrity": "sha512-MyoZ0jgnLvB2X3Lg5HqpFmn1kybDiIfEQmKzTb5apr51Rb+T3KdmMiqa70T+bhGnyv7bQ6WMj2QMHpGMmlrUYQ==" + } + } + }, + "markdown-it-anchor": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/markdown-it-anchor/-/markdown-it-anchor-5.3.0.tgz", + "integrity": "sha512-/V1MnLL/rgJ3jkMWo84UR+K+jF1cxNG1a+KwqeXqTIJ+jtA8aWSHuigx8lTzauiIjBDbwF3NcWQMotd0Dm39jA==", + "requires": {} + }, + "marked": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/marked/-/marked-2.1.3.tgz", + "integrity": "sha512-/Q+7MGzaETqifOMWYEA7HVMaZb4XbcRfaOzcSsHZEith83KGlvaSG33u0SKu89Mj5h+T8V2hM+8O45Qc5XTgwA==" + }, "md5.js": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", @@ -30866,6 +31026,11 @@ "integrity": "sha512-iV3XNKw06j5Q7mi6h+9vbx23Tv7JkjEVgKHW4pimwyDGWm0OIQntJJ+u1C6mg6mK1EaTv42XQ7w76yuzH7M2cA==", "dev": true }, + "mdurl": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz", + "integrity": "sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4=" + }, "media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", @@ -30889,7 +31054,7 @@ }, "meow": { "version": "3.7.0", - "resolved": "https://registry.nlark.com/meow/download/meow-3.7.0.tgz?cache=0&sync_timestamp=1626388195360&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fmeow%2Fdownload%2Fmeow-3.7.0.tgz", + "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", "dev": true, "requires": { @@ -30917,7 +31082,7 @@ }, "load-json-file": { "version": "1.1.0", - "resolved": "https://registry.nlark.com/load-json-file/download/load-json-file-1.1.0.tgz", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", "dev": true, "requires": { @@ -30930,7 +31095,7 @@ }, "parse-json": { "version": "2.2.0", - "resolved": "https://registry.nlark.com/parse-json/download/parse-json-2.2.0.tgz", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", "dev": true, "requires": { @@ -30948,7 +31113,7 @@ }, "path-type": { "version": "1.1.0", - "resolved": "https://registry.nlark.com/path-type/download/path-type-1.1.0.tgz", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", "dev": true, "requires": { @@ -30965,7 +31130,7 @@ }, "read-pkg": { "version": "1.1.0", - "resolved": "https://registry.nlark.com/read-pkg/download/read-pkg-1.1.0.tgz", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", "dev": true, "requires": { @@ -30976,7 +31141,7 @@ }, "read-pkg-up": { "version": "1.0.1", - "resolved": "https://registry.nlark.com/read-pkg-up/download/read-pkg-up-1.0.1.tgz?cache=0&sync_timestamp=1618846971516&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fread-pkg-up%2Fdownload%2Fread-pkg-up-1.0.1.tgz", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", "dev": true, "requires": { @@ -30986,7 +31151,7 @@ }, "strip-bom": { "version": "2.0.0", - "resolved": "https://registry.nlark.com/strip-bom/download/strip-bom-2.0.0.tgz", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", "dev": true, "requires": { @@ -31120,8 +31285,8 @@ }, "mimic-response": { "version": "1.0.1", - "resolved": "https://registry.nlark.com/mimic-response/download/mimic-response-1.0.1.tgz", - "integrity": "sha1-SSNTiHju9CBjy4o+OweYeBSHqxs=", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", + "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", "dev": true }, "mini-css-extract-plugin": { @@ -31214,8 +31379,8 @@ }, "mkdirp-classic": { "version": "0.5.3", - "resolved": "https://registry.nlark.com/mkdirp-classic/download/mkdirp-classic-0.5.3.tgz", - "integrity": "sha1-+hDJEVzG2IZb4iG6R+6b7XhgERM=", + "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", + "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", "dev": true }, "moment": { @@ -31332,8 +31497,8 @@ }, "napi-build-utils": { "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/napi-build-utils/download/napi-build-utils-1.0.2.tgz", - "integrity": "sha1-sf3cCyxG44Cgt6dvmE3UfEGhOAY=", + "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz", + "integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==", "dev": true }, "natural-compare": { @@ -31367,9 +31532,9 @@ } }, "node-abi": { - "version": "2.30.0", - "resolved": "https://registry.nlark.com/node-abi/download/node-abi-2.30.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fnode-abi%2Fdownload%2Fnode-abi-2.30.0.tgz", - "integrity": "sha1-i+U78+eUWjTuoQ4PyaWYJ3bPVQs=", + "version": "2.30.1", + "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.30.1.tgz", + "integrity": "sha512-/2D0wOQPgaUWzVSVgRMx+trKJRC2UG4SUc4oCJoXx9Uxjtp0Vy3/kt7zcbxHF8+Z/pK3UloLWzBISg72brfy1w==", "dev": true, "requires": { "semver": "^5.4.1" @@ -31385,8 +31550,8 @@ }, "node-addon-api": { "version": "3.2.1", - "resolved": "https://registry.nlark.com/node-addon-api/download/node-addon-api-3.2.1.tgz", - "integrity": "sha1-gTJeCiEXeJwBKNq2Xn448HzroWE=", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-3.2.1.tgz", + "integrity": "sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A==", "dev": true }, "node-fetch": { @@ -31509,8 +31674,8 @@ }, "npm-conf": { "version": "1.1.3", - "resolved": "https://registry.npm.taobao.org/npm-conf/download/npm-conf-1.1.3.tgz", - "integrity": "sha1-JWzEe9DiGMJZxOlVC/QTvCGSr/k=", + "resolved": "https://registry.npmjs.org/npm-conf/-/npm-conf-1.1.3.tgz", + "integrity": "sha512-Yic4bZHJOt9RCFbRP3GgpqhScOY4HH3V2P8yBj6CeYq118Qr+BLXqT2JvpJ00mryLESpgOxf5XlFv4ZjXxLScw==", "dev": true, "requires": { "config-chain": "^1.1.11", @@ -31528,8 +31693,8 @@ }, "npmlog": { "version": "4.1.2", - "resolved": "https://registry.nlark.com/npmlog/download/npmlog-4.1.2.tgz", - "integrity": "sha1-CKfyqL9zRgR3mp76StXMcXq7lUs=", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", + "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", "dev": true, "requires": { "are-we-there-yet": "~1.1.2", @@ -31555,7 +31720,7 @@ }, "number-is-nan": { "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/number-is-nan/download/number-is-nan-1.0.1.tgz", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", "dev": true }, @@ -31742,14 +31907,13 @@ } }, "optipng-bin": { - "version": "7.0.0", - "resolved": "https://registry.npm.taobao.org/optipng-bin/download/optipng-bin-7.0.0.tgz", - "integrity": "sha1-LfzGil8AbndG52rWTTF9b7fH+e0=", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/optipng-bin/-/optipng-bin-7.0.1.tgz", + "integrity": "sha512-W99mpdW7Nt2PpFiaO+74pkht7KEqkXkeRomdWXfEz3SALZ6hns81y/pm1dsGZ6ItUIfchiNIP6ORDr1zETU1jA==", "dev": true, "requires": { "bin-build": "^3.0.0", - "bin-wrapper": "^4.0.0", - "logalot": "^2.0.0" + "bin-wrapper": "^4.0.0" } }, "ora": { @@ -31833,8 +31997,8 @@ }, "os-filter-obj": { "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/os-filter-obj/download/os-filter-obj-2.0.0.tgz", - "integrity": "sha1-HAti1fOiRCdJotE55t3e5ugdjRY=", + "resolved": "https://registry.npmjs.org/os-filter-obj/-/os-filter-obj-2.0.0.tgz", + "integrity": "sha512-uksVLsqG3pVdzzPvmAHpBK0wKxYItuzZr7SziusRPoz67tGV8rL1szZ6IdeUrbqLjGDwApBtN29eEE3IqGHOjg==", "dev": true, "requires": { "arch": "^2.1.0" @@ -31847,13 +32011,13 @@ }, "p-cancelable": { "version": "2.1.1", - "resolved": "https://registry.nlark.com/p-cancelable/download/p-cancelable-2.1.1.tgz", - "integrity": "sha1-qrf71BZYL6MqPbSYWcEiSHxe0s8=", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-2.1.1.tgz", + "integrity": "sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg==", "dev": true }, "p-event": { "version": "1.3.0", - "resolved": "https://registry.nlark.com/p-event/download/p-event-1.3.0.tgz", + "resolved": "https://registry.npmjs.org/p-event/-/p-event-1.3.0.tgz", "integrity": "sha1-jmtPT2XHK8W2/ii3XtqHT5akoIU=", "dev": true, "requires": { @@ -31868,7 +32032,7 @@ }, "p-is-promise": { "version": "1.1.0", - "resolved": "https://registry.nlark.com/p-is-promise/download/p-is-promise-1.1.0.tgz", + "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-1.1.0.tgz", "integrity": "sha1-nJRWmJ6fZYgBewQ01WCXZ1w9oF4=", "dev": true }, @@ -31914,7 +32078,7 @@ }, "p-map-series": { "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/p-map-series/download/p-map-series-1.0.0.tgz?cache=0&sync_timestamp=1617950183954&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fp-map-series%2Fdownload%2Fp-map-series-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/p-map-series/-/p-map-series-1.0.0.tgz", "integrity": "sha1-v5j+V1cFZYqeE1G++4WuTB8Hvco=", "dev": true, "requires": { @@ -31923,13 +32087,13 @@ }, "p-pipe": { "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/p-pipe/download/p-pipe-4.0.0.tgz?cache=0&sync_timestamp=1617892628060&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fp-pipe%2Fdownload%2Fp-pipe-4.0.0.tgz", - "integrity": "sha1-flQkVpNRsqtFKkeCasuTzgmtaiw=", + "resolved": "https://registry.npmjs.org/p-pipe/-/p-pipe-4.0.0.tgz", + "integrity": "sha512-HkPfFklpZQPUKBFXzKFB6ihLriIHxnmuQdK9WmLDwe4hf2PdhhfWT/FJa+pc3bA1ywvKXtedxIRmd4Y7BTXE4w==", "dev": true }, "p-reduce": { "version": "1.0.0", - "resolved": "https://registry.nlark.com/p-reduce/download/p-reduce-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/p-reduce/-/p-reduce-1.0.0.tgz", "integrity": "sha1-GMKw3ZNqRpClKfgjH1ig/bakffo=", "dev": true }, @@ -31944,7 +32108,7 @@ }, "p-timeout": { "version": "1.2.1", - "resolved": "https://registry.nlark.com/p-timeout/download/p-timeout-1.2.1.tgz", + "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-1.2.1.tgz", "integrity": "sha1-XrOzU7f86Z8QGhA4iAuwVOu+o4Y=", "dev": true, "requires": { @@ -31958,8 +32122,8 @@ }, "package-json": { "version": "6.5.0", - "resolved": "https://registry.nlark.com/package-json/download/package-json-6.5.0.tgz", - "integrity": "sha1-b+7ayjXnVyWHbQsOZJdGl/7RRbA=", + "resolved": "https://registry.npmjs.org/package-json/-/package-json-6.5.0.tgz", + "integrity": "sha512-k3bdm2n25tkyxcjSKzB5x8kfVxlMdgsbPr0GkZcwHsLpba6cBjqCt1KlcChKEvxHIcTB1FVMuwoijZ26xex5MQ==", "dev": true, "requires": { "got": "^9.6.0", @@ -31970,14 +32134,14 @@ "dependencies": { "@sindresorhus/is": { "version": "0.14.0", - "resolved": "https://registry.nlark.com/@sindresorhus/is/download/@sindresorhus/is-0.14.0.tgz", - "integrity": "sha1-n7OjzzEyMoFR81PeRjLgHlIQK+o=", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz", + "integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==", "dev": true }, "@szmarczak/http-timer": { "version": "1.1.2", - "resolved": "https://registry.nlark.com/@szmarczak/http-timer/download/@szmarczak/http-timer-1.1.2.tgz?cache=0&sync_timestamp=1626126261719&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40szmarczak%2Fhttp-timer%2Fdownload%2F%40szmarczak%2Fhttp-timer-1.1.2.tgz", - "integrity": "sha1-sWZeLEYaLNkvTBu/UNVFTeDUtCE=", + "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz", + "integrity": "sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==", "dev": true, "requires": { "defer-to-connect": "^1.0.1" @@ -31985,8 +32149,8 @@ }, "cacheable-request": { "version": "6.1.0", - "resolved": "https://registry.nlark.com/cacheable-request/download/cacheable-request-6.1.0.tgz", - "integrity": "sha1-IP+4vRYrpL4R6VZ9gj22UQUsqRI=", + "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-6.1.0.tgz", + "integrity": "sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg==", "dev": true, "requires": { "clone-response": "^1.0.2", @@ -32006,19 +32170,22 @@ "requires": { "pump": "^3.0.0" } - }, - "lowercase-keys": { - "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/lowercase-keys/download/lowercase-keys-2.0.0.tgz", - "integrity": "sha1-JgPni3tLAAbLyi+8yKMgJVislHk=", - "dev": true } } }, + "decompress-response": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", + "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", + "dev": true, + "requires": { + "mimic-response": "^1.0.0" + } + }, "defer-to-connect": { "version": "1.1.3", - "resolved": "https://registry.nlark.com/defer-to-connect/download/defer-to-connect-1.1.3.tgz", - "integrity": "sha1-MxrgUMCNz3ifjIOnuB8O2U9KxZE=", + "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz", + "integrity": "sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==", "dev": true }, "get-stream": { @@ -32032,8 +32199,8 @@ }, "got": { "version": "9.6.0", - "resolved": "https://registry.nlark.com/got/download/got-9.6.0.tgz", - "integrity": "sha1-7fRefWf5lUVwXeH3u+7rEhdl7YU=", + "resolved": "https://registry.npmjs.org/got/-/got-9.6.0.tgz", + "integrity": "sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q==", "dev": true, "requires": { "@sindresorhus/is": "^0.14.0", @@ -32047,12 +32214,26 @@ "p-cancelable": "^1.0.0", "to-readable-stream": "^1.0.0", "url-parse-lax": "^3.0.0" + }, + "dependencies": { + "lowercase-keys": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", + "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", + "dev": true + } } }, + "json-buffer": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", + "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=", + "dev": true + }, "keyv": { "version": "3.1.0", - "resolved": "https://registry.npm.taobao.org/keyv/download/keyv-3.1.0.tgz", - "integrity": "sha1-7MIoSG9pmR5J6UdkhaW+Ho/FxNk=", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz", + "integrity": "sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==", "dev": true, "requires": { "json-buffer": "3.0.0" @@ -32060,15 +32241,32 @@ }, "normalize-url": { "version": "4.5.1", - "resolved": "https://registry.nlark.com/normalize-url/download/normalize-url-4.5.1.tgz?cache=0&sync_timestamp=1625826787829&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fnormalize-url%2Fdownload%2Fnormalize-url-4.5.1.tgz", - "integrity": "sha1-DdkM8SiO4dExO4cIHJpZMu5IUYo=", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.1.tgz", + "integrity": "sha512-9UZCFRHQdNrfTpGg8+1INIg93B6zE0aXMVFkw1WFwvO4SlZywU6aLg5Of0Ap/PgcbSw4LNxvMWXMeugwMCX0AA==", "dev": true }, "p-cancelable": { "version": "1.1.0", - "resolved": "https://registry.nlark.com/p-cancelable/download/p-cancelable-1.1.0.tgz", - "integrity": "sha1-0HjRWjr0CSIMiG8dmgyi5EGrJsw=", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz", + "integrity": "sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==", "dev": true + }, + "responselike": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz", + "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=", + "dev": true, + "requires": { + "lowercase-keys": "^1.0.0" + }, + "dependencies": { + "lowercase-keys": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", + "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", + "dev": true + } + } } } }, @@ -32226,14 +32424,14 @@ } }, "peek-readable": { - "version": "3.1.4", - "resolved": "https://registry.nlark.com/peek-readable/download/peek-readable-3.1.4.tgz", - "integrity": "sha1-9cO0Gk7rY6EyLEEx8LW6xxBbiS4=", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/peek-readable/-/peek-readable-4.0.1.tgz", + "integrity": "sha512-7qmhptnR0WMSpxT5rMHG9bW/mYSR1uqaPFj2MHvT+y/aOUu6msJijpKt5SkTDKySwg65OWG2JwTMBlgcbwMHrQ==", "dev": true }, "pend": { "version": "1.2.0", - "resolved": "https://registry.nlark.com/pend/download/pend-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", "integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA=", "dev": true }, @@ -32315,8 +32513,8 @@ }, "png2icons": { "version": "2.0.1", - "resolved": "https://registry.npm.taobao.org/png2icons/download/png2icons-2.0.1.tgz", - "integrity": "sha1-CdjxC3EwLpjKF40zJLxN7/m5ASQ=", + "resolved": "https://registry.npmjs.org/png2icons/-/png2icons-2.0.1.tgz", + "integrity": "sha512-GDEQJr8OG4e6JMp7mABtXFSEpgJa1CCpbQiAR+EjhkHJHnUL9zPPtbOrjsMD8gUbikgv3j7x404b0YJsV3aVFA==", "dev": true }, "pnp-webpack-plugin": { @@ -32824,9 +33022,9 @@ "dev": true }, "prebuild-install": { - "version": "6.1.3", - "resolved": "https://registry.nlark.com/prebuild-install/download/prebuild-install-6.1.3.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fprebuild-install%2Fdownload%2Fprebuild-install-6.1.3.tgz", - "integrity": "sha1-jqH51zhqCzD37yAkfjb4srgoJaI=", + "version": "6.1.4", + "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-6.1.4.tgz", + "integrity": "sha512-Z4vpywnK1lBg+zdPCVCsKq0xO66eEV9rWo2zrROGGiRS4JtueBOdlB1FnY8lcy7JsUud/Q3ijUxyWN26Ika0vQ==", "dev": true, "requires": { "detect-libc": "^1.0.3", @@ -32898,7 +33096,7 @@ }, "proto-list": { "version": "1.2.4", - "resolved": "https://registry.npm.taobao.org/proto-list/download/proto-list-1.2.4.tgz", + "resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz", "integrity": "sha1-IS1b/hMYMGpCD2QCuOJv85ZHqEk=", "dev": true }, @@ -32929,6 +33127,94 @@ } } }, + "protobufjs-cli-dbx": { + "version": "7.0.7", + "resolved": "https://registry.npmjs.org/protobufjs-cli-dbx/-/protobufjs-cli-dbx-7.0.7.tgz", + "integrity": "sha512-lP9nIEfV1fw1SjRBS5qpLEbBkImHHgtrYXzqX6s6Hn7hcuTDFwCXEy6Tzz4sAh4IgCKcjDT8ZK7AluerVHaGHQ==", + "requires": { + "chalk": "^2.4.1", + "escodegen": "^1.9.1", + "espree": "^3.5.4", + "estraverse": "^4.2.0", + "glob": "^7.1.2", + "jsdoc": "^3.4.2", + "minimist": "^1.2.0", + "semver": "^5.5.0", + "tmp": "0.0.31", + "uglify-js": "^3.3.25" + }, + "dependencies": { + "acorn": { + "version": "5.7.4", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.4.tgz", + "integrity": "sha512-1D++VG7BhrtvQpNbBzovKNc1FLGGEE/oGe7b9xJm/RFHMBeUaUGpluV9RLjZa47YFdPcDAenEYuq9pQPcMdLJg==" + }, + "acorn-jsx": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-3.0.1.tgz", + "integrity": "sha1-r9+UiPsezvyDSPb7IvRk4ypYs2s=", + "requires": { + "acorn": "^3.0.4" + }, + "dependencies": { + "acorn": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz", + "integrity": "sha1-ReN/s56No/JbruP/U2niu18iAXo=" + } + } + }, + "espree": { + "version": "3.5.4", + "resolved": "https://registry.npmjs.org/espree/-/espree-3.5.4.tgz", + "integrity": "sha512-yAcIQxtmMiB/jL32dzEp2enBeidsB7xWPLNiw3IIkpVds1P+h7qF9YwJq1yUNzp2OKXgAprs4F61ih66UsoD1A==", + "requires": { + "acorn": "^5.5.0", + "acorn-jsx": "^3.0.0" + } + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + }, + "tmp": { + "version": "0.0.31", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.31.tgz", + "integrity": "sha1-jzirlDjhcxXl29izZX6L+yd65Kc=", + "requires": { + "os-tmpdir": "~1.0.1" + } + } + } + }, + "protobufjs-dbx": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/protobufjs-dbx/-/protobufjs-dbx-7.0.0.tgz", + "integrity": "sha512-y4ECgn5J39e4RqlbyQhwJF72nLuyY9JhkhnfTRr03/bx0aonZ/VfDSxrXls8RxLup7Hk2rx/fandTmtYO6XGZQ==", + "requires": { + "@protobufjs/aspromise": "^1.1.2", + "@protobufjs/base64": "^1.1.2", + "@protobufjs/codegen": "^2.0.4", + "@protobufjs/eventemitter": "^1.1.0", + "@protobufjs/fetch": "^1.1.0", + "@protobufjs/float": "^1.0.2", + "@protobufjs/inquire": "^1.1.0", + "@protobufjs/path": "^1.1.2", + "@protobufjs/pool": "^1.1.0", + "@protobufjs/utf8": "^1.1.0", + "@types/long": "^4.0.0", + "@types/node": "^10.1.0", + "long": "^4.0.0" + }, + "dependencies": { + "@types/node": { + "version": "10.17.60", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.60.tgz", + "integrity": "sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw==" + } + } + }, "proxy-addr": { "version": "2.0.7", "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", @@ -33004,8 +33290,8 @@ }, "pupa": { "version": "2.1.1", - "resolved": "https://registry.nlark.com/pupa/download/pupa-2.1.1.tgz?cache=0&sync_timestamp=1626170133238&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fpupa%2Fdownload%2Fpupa-2.1.1.tgz", - "integrity": "sha1-9ej9SvwsXZeCj6pSNUnth0SiDWI=", + "resolved": "https://registry.npmjs.org/pupa/-/pupa-2.1.1.tgz", + "integrity": "sha512-l1jNAspIBSFqbT+y+5FosojNpVpF94nlI+wDUpqP9enwOTfHx9f0gh5nB96vl+6yTpsJsypeNrwfzPrKuHB41A==", "dev": true, "requires": { "escape-goat": "^2.0.0" @@ -33059,14 +33345,14 @@ }, "queue-microtask": { "version": "1.2.3", - "resolved": "https://registry.npm.taobao.org/queue-microtask/download/queue-microtask-1.2.3.tgz?cache=0&sync_timestamp=1616391471040&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fqueue-microtask%2Fdownload%2Fqueue-microtask-1.2.3.tgz", - "integrity": "sha1-SSkii7xyTfrEPg77BYyve2z7YkM=", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", "dev": true }, "quick-lru": { "version": "5.1.1", - "resolved": "https://registry.nlark.com/quick-lru/download/quick-lru-5.1.1.tgz", - "integrity": "sha1-NmST5rPkKjpoheLpnRj4D7eoyTI=", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", + "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==", "dev": true }, "randombytes": { @@ -33106,8 +33392,8 @@ }, "rc": { "version": "1.2.8", - "resolved": "https://registry.nlark.com/rc/download/rc-1.2.8.tgz", - "integrity": "sha1-zZJL9SAKB1uDwYjNa54hG3/A0+0=", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", "dev": true, "requires": { "deep-extend": "^0.6.0", @@ -33118,8 +33404,8 @@ }, "read-chunk": { "version": "3.2.0", - "resolved": "https://registry.npm.taobao.org/read-chunk/download/read-chunk-3.2.0.tgz", - "integrity": "sha1-KYSv54ypv7vbdLGTh7+ehiicFso=", + "resolved": "https://registry.npmjs.org/read-chunk/-/read-chunk-3.2.0.tgz", + "integrity": "sha512-CEjy9LCzhmD7nUpJ1oVOE6s/hBkejlcJEgLQHVnQznOSilOPb+kpKktlLfFDK3/WP43+F80xkUTM2VOkYoSYvQ==", "dev": true, "requires": { "pify": "^4.0.1", @@ -33186,8 +33472,8 @@ }, "readable-web-to-node-stream": { "version": "2.0.0", - "resolved": "https://registry.nlark.com/readable-web-to-node-stream/download/readable-web-to-node-stream-2.0.0.tgz", - "integrity": "sha1-dR5jL0ZlUqwNXEQMwBRwNS+TxLc=", + "resolved": "https://registry.npmjs.org/readable-web-to-node-stream/-/readable-web-to-node-stream-2.0.0.tgz", + "integrity": "sha512-+oZJurc4hXpaaqsN68GoZGQAQIA3qr09Or4fqEsargABnbe5Aau8hFn6ISVleT3cpY/0n/8drn7huyyEvTbghA==", "dev": true }, "readdirp": { @@ -33208,7 +33494,7 @@ }, "redent": { "version": "1.0.0", - "resolved": "https://registry.nlark.com/redent/download/redent-1.0.0.tgz?cache=0&sync_timestamp=1620069702182&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fredent%2Fdownload%2Fredent-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", "dev": true, "requires": { @@ -33218,7 +33504,7 @@ "dependencies": { "strip-indent": { "version": "1.0.1", - "resolved": "https://registry.nlark.com/strip-indent/download/strip-indent-1.0.1.tgz", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", "dev": true, "requires": { @@ -33315,8 +33601,8 @@ }, "registry-auth-token": { "version": "4.2.1", - "resolved": "https://registry.npm.taobao.org/registry-auth-token/download/registry-auth-token-4.2.1.tgz", - "integrity": "sha1-bXtABkQZGJcszV/tzUHcMix5slA=", + "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-4.2.1.tgz", + "integrity": "sha512-6gkSb4U6aWJB4SF2ZvLb76yCBjcvufXBqvvEx1HbmKPkutswjW1xNVRY0+daljIYRbogN7O0etYSlbiaEQyMyw==", "dev": true, "requires": { "rc": "^1.2.8" @@ -33324,8 +33610,8 @@ }, "registry-url": { "version": "5.1.0", - "resolved": "https://registry.npm.taobao.org/registry-url/download/registry-url-5.1.0.tgz?cache=0&sync_timestamp=1618681893788&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fregistry-url%2Fdownload%2Fregistry-url-5.1.0.tgz", - "integrity": "sha1-6YM0tQ1UNLgRNrROxjjZwgCcUAk=", + "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-5.1.0.tgz", + "integrity": "sha512-8acYXXTI0AkQv6RAOjE3vOaIXZkT9wo4LOFbBKYQEEnnMNBpKqdUrI6S4NT0KPIo/WVvJ5tE/X5LF/TQUf0ekw==", "dev": true, "requires": { "rc": "^1.2.8" @@ -33402,7 +33688,7 @@ }, "repeating": { "version": "2.0.1", - "resolved": "https://registry.nlark.com/repeating/download/repeating-2.0.1.tgz", + "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", "dev": true, "requires": { @@ -33411,8 +33697,8 @@ }, "replace-ext": { "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/replace-ext/download/replace-ext-2.0.0.tgz", - "integrity": "sha1-lHHCE9IuG8wmcXzW5QiB2I+BKwY=", + "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-2.0.0.tgz", + "integrity": "sha512-UszKE5KVK6JvyD92nzMn9cDapSk6w/CaFZ96CnmDMUqH9oowfxF/ZjRITD25H4DnOQClLA4/j7jLGXXLVKxAug==", "dev": true }, "request": { @@ -33472,6 +33758,14 @@ "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=", "dev": true }, + "requizzle": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/requizzle/-/requizzle-0.2.3.tgz", + "integrity": "sha512-YanoyJjykPxGHii0fZP0uUPEXpvqfBDxWV7s6GKAiiOsiqhX6vHNyW3Qzdmqp/iq/ExbhaGbVrjB4ruEVSM4GQ==", + "requires": { + "lodash": "^4.17.14" + } + }, "resize-detector": { "version": "0.1.10", "resolved": "https://registry.npmjs.org/resize-detector/-/resize-detector-0.1.10.tgz", @@ -33488,9 +33782,9 @@ } }, "resolve-alpn": { - "version": "1.1.2", - "resolved": "https://registry.npm.taobao.org/resolve-alpn/download/resolve-alpn-1.1.2.tgz", - "integrity": "sha1-MLYM+7DAuNyJeUD+E/4lWvzdTSg=", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.2.1.tgz", + "integrity": "sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==", "dev": true }, "resolve-cwd": { @@ -33514,12 +33808,12 @@ "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=" }, "responselike": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/responselike/download/responselike-1.0.2.tgz", - "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/responselike/-/responselike-2.0.0.tgz", + "integrity": "sha512-xH48u3FTB9VsZw7R+vvgaKeLKzT6jOogbQhEe/jewwnZgzPcnyWui2Av6JpoYZF/91uueC+lqhWqeURw5/qhCw==", "dev": true, "requires": { - "lowercase-keys": "^1.0.0" + "lowercase-keys": "^2.0.0" } }, "restore-cursor": { @@ -33544,8 +33838,8 @@ }, "reusify": { "version": "1.0.4", - "resolved": "https://registry.npm.taobao.org/reusify/download/reusify-1.0.4.tgz", - "integrity": "sha1-kNo4Kx4SbvwCFG6QhFqI2xKSXXY=", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", "dev": true }, "rgb-regex": { @@ -33608,8 +33902,8 @@ }, "run-parallel": { "version": "1.2.0", - "resolved": "https://registry.nlark.com/run-parallel/download/run-parallel-1.2.0.tgz", - "integrity": "sha1-ZtE2jae9+SHrnZW9GpIp5/IaQ+4=", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", "dev": true, "requires": { "queue-microtask": "^1.2.2" @@ -33844,8 +34138,8 @@ }, "seek-bzip": { "version": "1.0.6", - "resolved": "https://registry.npm.taobao.org/seek-bzip/download/seek-bzip-1.0.6.tgz", - "integrity": "sha1-NcQXH1WmgJFrUqB4WezztYV/IcQ=", + "resolved": "https://registry.npmjs.org/seek-bzip/-/seek-bzip-1.0.6.tgz", + "integrity": "sha512-e1QtP3YL5tWww8uKaOCQ18UxIT2laNBXHjV/S2WYCiK4udiv8lkG89KRIoCjUagnAmCBurjF4zEVX2ByBbnCjQ==", "dev": true, "requires": { "commander": "^2.8.1" @@ -33878,8 +34172,8 @@ }, "semver-diff": { "version": "3.1.1", - "resolved": "https://registry.nlark.com/semver-diff/download/semver-diff-3.1.1.tgz?cache=0&sync_timestamp=1620044887257&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fsemver-diff%2Fdownload%2Fsemver-diff-3.1.1.tgz", - "integrity": "sha1-Bfd85Z8yXgDicGr9Z7tQbdscoys=", + "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-3.1.1.tgz", + "integrity": "sha512-GX0Ix/CJcHyB8c4ykpHGIAvLyOwOobtM/8d+TQkAd81/bEjgPHrfba41Vpesr7jX/t8Uh+R3EX9eAS5be+jQYg==", "dev": true, "requires": { "semver": "^6.3.0" @@ -33887,13 +34181,13 @@ }, "semver-regex": { "version": "2.0.0", - "resolved": "https://registry.nlark.com/semver-regex/download/semver-regex-2.0.0.tgz", - "integrity": "sha1-qTwsWERTmncCMzeRB7OMe0rJ0zg=", + "resolved": "https://registry.npmjs.org/semver-regex/-/semver-regex-2.0.0.tgz", + "integrity": "sha512-mUdIBBvdn0PLOeP3TEkMH7HHeUP3GjsXCwKarjv/kGmUFOYg1VqEemKhoQpWMu6X2I8kHeuVdGibLGkVK+/5Qw==", "dev": true }, "semver-truncate": { "version": "1.1.2", - "resolved": "https://registry.nlark.com/semver-truncate/download/semver-truncate-1.1.2.tgz", + "resolved": "https://registry.npmjs.org/semver-truncate/-/semver-truncate-1.1.2.tgz", "integrity": "sha1-V/Qd5pcHpicJp+AQS6IRcQnqR+g=", "dev": true, "requires": { @@ -34056,8 +34350,8 @@ }, "sharp": { "version": "0.28.3", - "resolved": "https://registry.nlark.com/sharp/download/sharp-0.28.3.tgz?cache=0&sync_timestamp=1621876609161&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fsharp%2Fdownload%2Fsharp-0.28.3.tgz", - "integrity": "sha1-7NdM79AgvuSJG7E3yYUO4s4neos=", + "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.28.3.tgz", + "integrity": "sha512-21GEP45Rmr7q2qcmdnjDkNP04Ooh5v0laGS5FDpojOO84D1DJwUijLiSq8XNNM6e8aGXYtoYRh3sVNdm8NodMA==", "dev": true, "requires": { "color": "^3.1.3", @@ -34121,14 +34415,14 @@ }, "simple-concat": { "version": "1.0.1", - "resolved": "https://registry.nlark.com/simple-concat/download/simple-concat-1.0.1.tgz", - "integrity": "sha1-9Gl2CCujXCJj8cirXt/ibEHJVS8=", + "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", + "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", "dev": true }, "simple-get": { "version": "3.1.0", - "resolved": "https://registry.npm.taobao.org/simple-get/download/simple-get-3.1.0.tgz", - "integrity": "sha1-tFvgYkNeUNFZVAtXYgLO7EC5xrM=", + "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-3.1.0.tgz", + "integrity": "sha512-bCR6cP+aTdScaQCnQKbPKtJOKDp/hj9EDLJo3Nw4y1QksqaovlW/bnptB6/c1e+qmNIDHRK+oXFDdEqBT8WzUA==", "dev": true, "requires": { "decompress-response": "^4.2.0", @@ -34138,8 +34432,8 @@ "dependencies": { "decompress-response": { "version": "4.2.1", - "resolved": "https://registry.npm.taobao.org/decompress-response/download/decompress-response-4.2.1.tgz?cache=0&sync_timestamp=1613125280468&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdecompress-response%2Fdownload%2Fdecompress-response-4.2.1.tgz", - "integrity": "sha1-QUAjzHowLaJc4uyC0NUjjMr9iYY=", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-4.2.1.tgz", + "integrity": "sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw==", "dev": true, "requires": { "mimic-response": "^2.0.0" @@ -34147,8 +34441,8 @@ }, "mimic-response": { "version": "2.1.0", - "resolved": "https://registry.nlark.com/mimic-response/download/mimic-response-2.1.0.tgz", - "integrity": "sha1-0Tdj019hPQnsN+uzC6wEacDuj0M=", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-2.1.0.tgz", + "integrity": "sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA==", "dev": true } } @@ -34291,7 +34585,7 @@ }, "sort-keys-length": { "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/sort-keys-length/download/sort-keys-length-1.0.1.tgz", + "resolved": "https://registry.npmjs.org/sort-keys-length/-/sort-keys-length-1.0.1.tgz", "integrity": "sha1-nLb09OnkgVWmqgZx7dM2/xR5oYg=", "dev": true, "requires": { @@ -34477,7 +34771,7 @@ }, "squeak": { "version": "1.3.0", - "resolved": "https://registry.npm.taobao.org/squeak/download/squeak-1.3.0.tgz", + "resolved": "https://registry.npmjs.org/squeak/-/squeak-1.3.0.tgz", "integrity": "sha1-MwRQN7ZDiLVnZ0uEMiplIQc5FsM=", "dev": true, "requires": { @@ -34488,13 +34782,13 @@ "dependencies": { "ansi-styles": { "version": "2.2.1", - "resolved": "https://registry.nlark.com/ansi-styles/download/ansi-styles-2.2.1.tgz?cache=0&sync_timestamp=1618995588464&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fansi-styles%2Fdownload%2Fansi-styles-2.2.1.tgz", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", "dev": true }, "chalk": { "version": "1.1.3", - "resolved": "https://registry.nlark.com/chalk/download/chalk-1.1.3.tgz", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, "requires": { @@ -34516,7 +34810,7 @@ }, "supports-color": { "version": "2.0.0", - "resolved": "https://registry.nlark.com/supports-color/download/supports-color-2.0.0.tgz?cache=0&sync_timestamp=1622293579301&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fsupports-color%2Fdownload%2Fsupports-color-2.0.0.tgz", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", "dev": true } @@ -34688,8 +34982,8 @@ }, "strip-dirs": { "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/strip-dirs/download/strip-dirs-2.1.0.tgz", - "integrity": "sha1-SYdzYmT8NEzyD2w0rKnRPR1O1sU=", + "resolved": "https://registry.npmjs.org/strip-dirs/-/strip-dirs-2.1.0.tgz", + "integrity": "sha512-JOCxOeKLm2CAS73y/U4ZeZPTkE+gNVCzKt7Eox84Iej1LT/2pTWYpZKJuxwQpvX1LiZb1xokNR7RLfuBAa7T3g==", "dev": true, "requires": { "is-natural-number": "^4.0.1" @@ -34720,21 +35014,21 @@ }, "strip-outer": { "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/strip-outer/download/strip-outer-1.0.1.tgz", - "integrity": "sha1-sv0qv2YEudHmATBXGV34Nrip1jE=", + "resolved": "https://registry.npmjs.org/strip-outer/-/strip-outer-1.0.1.tgz", + "integrity": "sha512-k55yxKHwaXnpYGsOzg4Vl8+tDrWylxDEpknGjhTiZB8dFRU5rTo9CAzeycivxV3s+zlTKwrs6WxMxR95n26kwg==", "dev": true, "requires": { "escape-string-regexp": "^1.0.2" } }, "strtok3": { - "version": "6.1.3", - "resolved": "https://registry.nlark.com/strtok3/download/strtok3-6.1.3.tgz", - "integrity": "sha1-SI/oypFmTPk0MslHUrqeXHhb2d0=", + "version": "6.2.4", + "resolved": "https://registry.npmjs.org/strtok3/-/strtok3-6.2.4.tgz", + "integrity": "sha512-GO8IcFF9GmFDvqduIspUBwCzCbqzegyVKIsSymcMgiZKeCfrN9SowtUoi8+b59WZMAjIzVZic/Ft97+pynR3Iw==", "dev": true, "requires": { - "@tokenizer/token": "^0.1.1", - "peek-readable": "^3.1.4" + "@tokenizer/token": "^0.3.0", + "peek-readable": "^4.0.1" } }, "stylehacks": { @@ -35001,6 +35295,11 @@ } } }, + "taffydb": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/taffydb/-/taffydb-2.6.2.tgz", + "integrity": "sha1-fLy2S1oUG2ou/CxdLGe04VCyomg=" + }, "tapable": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/tapable/-/tapable-1.1.3.tgz", @@ -35008,29 +35307,27 @@ }, "tar-fs": { "version": "2.1.1", - "resolved": "https://registry.nlark.com/tar-fs/download/tar-fs-2.1.1.tgz", - "integrity": "sha1-SJoVq4Xx8L76uzcLfeT561y+h4Q=", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", + "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", "dev": true, "requires": { "chownr": "^1.1.1", "mkdirp-classic": "^0.5.2", "pump": "^3.0.0", "tar-stream": "^2.1.4" - } - }, - "tar-stream": { - "version": "2.2.0", - "resolved": "https://registry.npm.taobao.org/tar-stream/download/tar-stream-2.2.0.tgz", - "integrity": "sha1-rK2EwoQTawYNw/qmRHSqmuvXcoc=", - "dev": true, - "requires": { - "bl": "^4.0.3", - "end-of-stream": "^1.4.1", - "fs-constants": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^3.1.1" }, "dependencies": { + "bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "dev": true, + "requires": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, "readable-stream": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", @@ -35041,18 +35338,46 @@ "string_decoder": "^1.1.1", "util-deprecate": "^1.0.1" } + }, + "tar-stream": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", + "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", + "dev": true, + "requires": { + "bl": "^4.0.3", + "end-of-stream": "^1.4.1", + "fs-constants": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1" + } } } }, + "tar-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.6.2.tgz", + "integrity": "sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A==", + "dev": true, + "requires": { + "bl": "^1.0.0", + "buffer-alloc": "^1.2.0", + "end-of-stream": "^1.0.0", + "fs-constants": "^1.0.0", + "readable-stream": "^2.3.0", + "to-buffer": "^1.1.1", + "xtend": "^4.0.0" + } + }, "temp-dir": { "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/temp-dir/download/temp-dir-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/temp-dir/-/temp-dir-1.0.0.tgz", "integrity": "sha1-CnwOom06Oa+n4OvqnB/AvE2qAR0=", "dev": true }, "tempfile": { "version": "2.0.0", - "resolved": "https://registry.nlark.com/tempfile/download/tempfile-2.0.0.tgz?cache=0&sync_timestamp=1623137926951&other_urls=https%3A%2F%2Fregistry.nlark.com%2Ftempfile%2Fdownload%2Ftempfile-2.0.0.tgz", + "resolved": "https://registry.npmjs.org/tempfile/-/tempfile-2.0.0.tgz", "integrity": "sha1-awRGhWqbERTRhW/8vlCczLCXcmU=", "dev": true, "requires": { @@ -35150,7 +35475,7 @@ }, "timed-out": { "version": "4.0.1", - "resolved": "https://registry.nlark.com/timed-out/download/timed-out-4.0.1.tgz?cache=0&sync_timestamp=1619073467606&other_urls=https%3A%2F%2Fregistry.nlark.com%2Ftimed-out%2Fdownload%2Ftimed-out-4.0.1.tgz", + "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", "integrity": "sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=", "dev": true }, @@ -35200,8 +35525,8 @@ }, "to-buffer": { "version": "1.1.1", - "resolved": "https://registry.npm.taobao.org/to-buffer/download/to-buffer-1.1.1.tgz", - "integrity": "sha1-STvUj2LXxD/N7TE6A9ytsuEhOoA=", + "resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.1.1.tgz", + "integrity": "sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg==", "dev": true }, "to-fast-properties": { @@ -35220,8 +35545,8 @@ }, "to-readable-stream": { "version": "1.0.0", - "resolved": "https://registry.nlark.com/to-readable-stream/download/to-readable-stream-1.0.0.tgz", - "integrity": "sha1-zgqgwvPfat+FLvtASng+d8BHV3E=", + "resolved": "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz", + "integrity": "sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==", "dev": true }, "to-regex": { @@ -35280,12 +35605,20 @@ }, "token-types": { "version": "2.1.1", - "resolved": "https://registry.nlark.com/token-types/download/token-types-2.1.1.tgz", - "integrity": "sha1-vVhdZJAqr3ILiXnSV7S4ULTUXEU=", + "resolved": "https://registry.npmjs.org/token-types/-/token-types-2.1.1.tgz", + "integrity": "sha512-wnQcqlreS6VjthyHO3Y/kpK/emflxDBNhlNUPfh7wE39KnuDdOituXomIbyI79vBtF0Ninpkh72mcuRHo+RG3Q==", "dev": true, "requires": { "@tokenizer/token": "^0.1.1", "ieee754": "^1.2.1" + }, + "dependencies": { + "@tokenizer/token": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@tokenizer/token/-/token-0.1.1.tgz", + "integrity": "sha512-XO6INPbZCxdprl+9qa/AAbFFOMzzwqYxpjPgLICrMD6C2FCw6qfJOPcBk6JqqPLSaZ/Qx87qn4rpPmPMwaAK6w==", + "dev": true + } } }, "toposort": { @@ -35303,15 +35636,29 @@ "punycode": "^2.1.1" } }, + "trading-vue-js": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/trading-vue-js/-/trading-vue-js-1.0.2.tgz", + "integrity": "sha512-RObZR4OF5rtdgh/CyyRv0soPxlVlwHudlpAziOeQeOeId4j/2RcGUSp4/lKwzYo8b51tnAiRnMtDS+ZSmg208g==", + "requires": { + "@babel/runtime": "^7.13.10", + "arrayslicer": "^1.2.3", + "hammerjs": "^2.0.8", + "hamsterjs": "^1.1.3", + "lz-string": "^1.4.4", + "moment": "^2.29.1", + "vue": "^2.6.12" + } + }, "trim-newlines": { "version": "1.0.0", - "resolved": "https://registry.nlark.com/trim-newlines/download/trim-newlines-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=", "dev": true }, "trim-repeated": { "version": "1.0.0", - "resolved": "https://registry.nlark.com/trim-repeated/download/trim-repeated-1.0.0.tgz?cache=0&sync_timestamp=1619005347796&other_urls=https%3A%2F%2Fregistry.nlark.com%2Ftrim-repeated%2Fdownload%2Ftrim-repeated-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/trim-repeated/-/trim-repeated-1.0.0.tgz", "integrity": "sha1-42RqLqTokTEr9+rObPsFOAvAHCE=", "dev": true, "requires": { @@ -35342,9 +35689,9 @@ } }, "tslib": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.0.tgz", - "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==" + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" }, "tty-browserify": { "version": "0.0.0", @@ -35394,8 +35741,8 @@ }, "typedarray-to-buffer": { "version": "3.1.5", - "resolved": "https://registry.npm.taobao.org/typedarray-to-buffer/download/typedarray-to-buffer-3.1.5.tgz", - "integrity": "sha1-qX7nqf9CaRufeD/xvFES/j/KkIA=", + "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", + "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", "dev": true, "requires": { "is-typedarray": "^1.0.0" @@ -35406,11 +35753,15 @@ "resolved": "https://registry.npmjs.org/typeforce/-/typeforce-1.18.0.tgz", "integrity": "sha512-7uc1O8h1M1g0rArakJdf0uLRSSgFcYexrVoKo+bzJd32gd4gDy2L/Z+8/FjPnU9ydY3pEnVPtr9FyscYY60K1g==" }, + "uc.micro": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz", + "integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==" + }, "uglify-js": { "version": "3.4.10", "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.4.10.tgz", "integrity": "sha512-Y2VsbPVs0FIshJztycsO2SfPk7/KAF/T72qzv9u5EpQ4kB2hQoHlhNQTsNyy6ul7lQtqJN/AoWeS23OzEiEFxw==", - "dev": true, "requires": { "commander": "~2.19.0", "source-map": "~0.6.1" @@ -35419,8 +35770,7 @@ "commander": { "version": "2.19.0", "resolved": "https://registry.npmjs.org/commander/-/commander-2.19.0.tgz", - "integrity": "sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg==", - "dev": true + "integrity": "sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg==" } } }, @@ -35438,14 +35788,19 @@ }, "unbzip2-stream": { "version": "1.4.3", - "resolved": "https://registry.nlark.com/unbzip2-stream/download/unbzip2-stream-1.4.3.tgz", - "integrity": "sha1-sNoExDcTEd93HNwhXofyEwmRrOc=", + "resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz", + "integrity": "sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==", "dev": true, "requires": { "buffer": "^5.2.1", "through": "^2.3.8" } }, + "underscore": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.1.tgz", + "integrity": "sha512-hzSoAVtJF+3ZtiFX0VgfFPHEDRm7Y/QPjGyNo4TVdnDTdft3tr8hEkD25a1jC+TjTuE7tkHGKkhwCgs9dgBB2g==" + }, "unicode-canonical-property-names-ecmascript": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz", @@ -35515,8 +35870,8 @@ }, "unique-string": { "version": "2.0.0", - "resolved": "https://registry.nlark.com/unique-string/download/unique-string-2.0.0.tgz", - "integrity": "sha1-OcZFH4GvsnSd4rIz4/fF6IQ72J0=", + "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz", + "integrity": "sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg==", "dev": true, "requires": { "crypto-random-string": "^2.0.0" @@ -35524,8 +35879,8 @@ }, "universalify": { "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/universalify/download/universalify-2.0.0.tgz?cache=0&sync_timestamp=1603180004159&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Funiversalify%2Fdownload%2Funiversalify-2.0.0.tgz", - "integrity": "sha1-daSYTv7cSwiXXFrrc/Uw0C3yVxc=", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", "dev": true }, "unorm": { @@ -35589,8 +35944,8 @@ }, "update-notifier": { "version": "5.1.0", - "resolved": "https://registry.npm.taobao.org/update-notifier/download/update-notifier-5.1.0.tgz", - "integrity": "sha1-SrDXx/NqIx3XMWz3cpMT8CFNmtk=", + "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-5.1.0.tgz", + "integrity": "sha512-ItnICHbeMh9GqUy31hFPrD1kcuZ3rpxDZbf4KUDavXwS0bW5m7SLbDQpGX3UYr072cbrF5hFUs3r5tUsPwjfHw==", "dev": true, "requires": { "boxen": "^5.0.0", @@ -35619,9 +35974,9 @@ } }, "chalk": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", - "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "requires": { "ansi-styles": "^4.1.0", @@ -35630,8 +35985,8 @@ }, "ci-info": { "version": "2.0.0", - "resolved": "https://registry.nlark.com/ci-info/download/ci-info-2.0.0.tgz", - "integrity": "sha1-Z6npZL4xpR4V5QENWObxKDQAL0Y=", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", + "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", "dev": true }, "color-convert": { @@ -35649,10 +36004,16 @@ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, + "import-lazy": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz", + "integrity": "sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=", + "dev": true + }, "is-ci": { "version": "2.0.0", - "resolved": "https://registry.nlark.com/is-ci/download/is-ci-2.0.0.tgz?cache=0&sync_timestamp=1618847026826&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fis-ci%2Fdownload%2Fis-ci-2.0.0.tgz", - "integrity": "sha1-a8YzQYGBDgS1wis9WJ/cpVAmQEw=", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz", + "integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==", "dev": true, "requires": { "ci-info": "^2.0.0" @@ -35758,7 +36119,7 @@ }, "url-parse-lax": { "version": "3.0.0", - "resolved": "https://registry.nlark.com/url-parse-lax/download/url-parse-lax-3.0.0.tgz", + "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=", "dev": true, "requires": { @@ -35767,7 +36128,7 @@ "dependencies": { "prepend-http": { "version": "2.0.0", - "resolved": "https://registry.nlark.com/prepend-http/download/prepend-http-2.0.0.tgz", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=", "dev": true } @@ -35775,7 +36136,7 @@ }, "url-to-options": { "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/url-to-options/download/url-to-options-1.0.1.tgz", + "resolved": "https://registry.npmjs.org/url-to-options/-/url-to-options-1.0.1.tgz", "integrity": "sha1-FQWgOiiaSMvXpDTvuu7FBV9WM6k=", "dev": true }, @@ -35938,70 +36299,13 @@ } }, "vue-cli-plugin-tauri": { - "version": "1.0.0-beta.3", - "resolved": "https://registry.nlark.com/vue-cli-plugin-tauri/download/vue-cli-plugin-tauri-1.0.0-beta.3.tgz", - "integrity": "sha1-1J0JK9L+EcCfoCA1aPyINyh0LDA=", + "version": "1.0.0-beta.6", + "resolved": "https://registry.npmjs.org/vue-cli-plugin-tauri/-/vue-cli-plugin-tauri-1.0.0-beta.6.tgz", + "integrity": "sha512-GB7xqsadehgwgJXaOvyMg5UEedBCxW4Tf8voMgzw/6B0kCfGZop6dMkKQOuQSdcffS69M73CpXdFYYjqdZVHDA==", "dev": true, "requires": { - "@tauri-apps/cli": "1.0.0-beta.3", - "@vue/cli-shared-utils": "^4.1.1", - "execa": "^3.4.0" - }, - "dependencies": { - "execa": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-3.4.0.tgz", - "integrity": "sha512-r9vdGQk4bmCuK1yKQu1KTwcT2zwfWdbdaXfCtAh+5nU/4fSX+JAb7vZGvI5naJrQlvONrEB20jeruESI69530g==", - "dev": true, - "requires": { - "cross-spawn": "^7.0.0", - "get-stream": "^5.0.0", - "human-signals": "^1.1.1", - "is-stream": "^2.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.0", - "onetime": "^5.1.0", - "p-finally": "^2.0.0", - "signal-exit": "^3.0.2", - "strip-final-newline": "^2.0.0" - } - }, - "get-stream": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", - "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", - "dev": true, - "requires": { - "pump": "^3.0.0" - } - }, - "is-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", - "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==", - "dev": true - }, - "npm-run-path": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", - "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", - "dev": true, - "requires": { - "path-key": "^3.0.0" - } - }, - "p-finally": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-2.0.1.tgz", - "integrity": "sha512-vpm09aKwq6H9phqRQzecoDpD8TmVyGw70qmWlyq5onxY7tqyTTFVvxMykxQSQKILBSFlbXpypIw2T1Ml7+DDtw==", - "dev": true - }, - "path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true - } + "@tauri-apps/cli": "1.0.0-beta.6", + "@vue/cli-shared-utils": "^4.1.1" } }, "vue-clickaway": { @@ -36113,12 +36417,6 @@ "resolved": "https://registry.npmjs.org/vue-functional-data-merge/-/vue-functional-data-merge-3.1.0.tgz", "integrity": "sha512-leT4kdJVQyeZNY1kmnS1xiUlQ9z1B/kdBFCILIjYYQDqZgLqCLa0UhjSSeRX6c3mUe6U5qYeM8LrEqkHJ1B4LA==" }, - "vue-gtag": { - "version": "1.16.1", - "resolved": "https://registry.npmjs.org/vue-gtag/-/vue-gtag-1.16.1.tgz", - "integrity": "sha512-5vs0pSGxdqrfXqN1Qwt0ZFXG0iTYjRMu/saddc7QIC5yp+DKgjWQRpGYVa7Pq+KbThxwzzMfo0sGi7ISa6NowA==", - "requires": {} - }, "vue-hot-reload-api": { "version": "2.3.4", "resolved": "https://registry.npmjs.org/vue-hot-reload-api/-/vue-hot-reload-api-2.3.4.tgz", @@ -36760,45 +37058,18 @@ "dev": true }, "wide-align": { - "version": "1.1.3", - "resolved": "https://registry.nlark.com/wide-align/download/wide-align-1.1.3.tgz", - "integrity": "sha1-rgdOa9wMFKQx6ATmJFScYzsABFc=", + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz", + "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==", "dev": true, "requires": { - "string-width": "^1.0.2 || 2" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } + "string-width": "^1.0.2 || 2 || 3 || 4" } }, "widest-line": { "version": "3.1.0", - "resolved": "https://registry.nlark.com/widest-line/download/widest-line-3.1.0.tgz", - "integrity": "sha1-gpIzO79my0X/DeFgOxNreuFJbso=", + "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz", + "integrity": "sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==", "dev": true, "requires": { "string-width": "^4.0.0" @@ -36814,8 +37085,8 @@ }, "with-open-file": { "version": "0.1.7", - "resolved": "https://registry.npm.taobao.org/with-open-file/download/with-open-file-0.1.7.tgz", - "integrity": "sha1-4t6Nl06KiubliIa+T+jnRltYpyk=", + "resolved": "https://registry.npmjs.org/with-open-file/-/with-open-file-0.1.7.tgz", + "integrity": "sha512-ecJS2/oHtESJ1t3ZfMI3B7KIDKyfN0O16miWxdn30zdh66Yd3LsRFebXZXq6GU4xfxLf6nVxp9kIqElb5fqczA==", "dev": true, "requires": { "p-finally": "^1.0.0", @@ -36890,8 +37161,8 @@ }, "write-file-atomic": { "version": "3.0.3", - "resolved": "https://registry.npm.taobao.org/write-file-atomic/download/write-file-atomic-3.0.3.tgz", - "integrity": "sha1-Vr1cWlxwSBzRnFcb05q5ZaXeVug=", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", + "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", "dev": true, "requires": { "imurmurhash": "^0.1.4", @@ -36910,10 +37181,15 @@ }, "xdg-basedir": { "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/xdg-basedir/download/xdg-basedir-4.0.0.tgz?cache=0&sync_timestamp=1617611838739&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fxdg-basedir%2Fdownload%2Fxdg-basedir-4.0.0.tgz", - "integrity": "sha1-S8jZmEQDaWIl74OhVzy7y0552xM=", + "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz", + "integrity": "sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==", "dev": true }, + "xmlcreate": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/xmlcreate/-/xmlcreate-2.0.4.tgz", + "integrity": "sha512-nquOebG4sngPmGPICTS5EnxqhKbCmz5Ox5hsszI2T6U5qdrJizBc+0ilYSEjTSzU0yZcmvppztXe/5Al5fUwdg==" + }, "xstream": { "version": "11.14.0", "resolved": "https://registry.npmjs.org/xstream/-/xstream-11.14.0.tgz", @@ -37067,7 +37343,7 @@ }, "yauzl": { "version": "2.10.0", - "resolved": "https://registry.nlark.com/yauzl/download/yauzl-2.10.0.tgz", + "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", "integrity": "sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk=", "dev": true, "requires": { @@ -37123,8 +37399,8 @@ }, "zopflipng-bin": { "version": "6.0.1", - "resolved": "https://registry.npm.taobao.org/zopflipng-bin/download/zopflipng-bin-6.0.1.tgz", - "integrity": "sha1-qR74G9uhjhUd2j803yPT7NfQSh8=", + "resolved": "https://registry.npmjs.org/zopflipng-bin/-/zopflipng-bin-6.0.1.tgz", + "integrity": "sha512-+aybvXv/xafL6I67uSH5yLHrSy4/OaSOV9tniw4yZFIHpINXUcctVHE/WzHxOONrL2GHzJ8Fd4iDrNyaS6TVbg==", "dev": true, "requires": { "bin-build": "^3.0.0", diff --git a/package.json b/package.json index 1815f0ba..a3141e4f 100644 --- a/package.json +++ b/package.json @@ -12,20 +12,20 @@ "dependencies": { "@casl/ability": "4.1.6", "@casl/vue": "1.1.1", - "@cosmjs/amino": "^0.26.0", - "@cosmjs/crypto": "^0.26.0", - "@cosmjs/encoding": "^0.26.0", - "@cosmjs/launchpad": "^0.26.0", - "@cosmjs/ledger-amino": "^0.26.0", - "@cosmjs/math": "^0.26.0", - "@cosmjs/proto-signing": "^0.26.0", - "@cosmjs/stargate": "0.26.0", + "@cosmjs/amino": "^0.26.5", + "@cosmjs/crypto": "^0.26.5", + "@cosmjs/encoding": "^0.26.5", + "@cosmjs/launchpad": "^0.26.5", + "@cosmjs/ledger-amino": "^0.26.5", + "@cosmjs/math": "^0.26.5", + "@cosmjs/proto-signing": "^0.26.5", + "@cosmjs/stargate": "0.26.5", "@cosmostation/cosmosjs": "^0.10.6", "@intlify/vue-i18n-loader": "^2.1.2", "@ledgerhq/hw-app-cosmos": "^6.3.0", "@ledgerhq/hw-transport-web-ble": "^6.3.0", "@ledgerhq/hw-transport-webusb": "^6.3.0", - "@vue/composition-api": "1.0.0-beta.22", + "@vue/composition-api": "^1.4.0", "@vueuse/core": "4.0.0", "animate.css": "4.1.1", "apexcharts": "3.24.0", @@ -42,10 +42,14 @@ "leaflet": "1.6.0", "ledger-cosmos-js": "2.1.8", "node-fetch": "^2.6.1", + "pako": "^1.0.11", "portal-vue": "2.1.7", "postcss-rtl": "1.7.3", "prismjs": "1.24.0", + "protobufjs-cli-dbx": "^7.0.7", + "protobufjs-dbx": "^7.0.0", "swiper": "6.5.1", + "trading-vue-js": "^1.0.2", "uuid": "8.3.2", "vee-validate": "3.4.5", "vue": "2.x", diff --git a/public/charting_library/ar-tv-chart.b555c6a4.html b/public/charting_library/ar-tv-chart.b555c6a4.html new file mode 100644 index 00000000..db3d7126 --- /dev/null +++ b/public/charting_library/ar-tv-chart.b555c6a4.html @@ -0,0 +1 @@ +
\ No newline at end of file diff --git a/public/charting_library/bundles/0.3a5522db90c672e977eb.js b/public/charting_library/bundles/0.3a5522db90c672e977eb.js new file mode 100644 index 00000000..805bdab8 --- /dev/null +++ b/public/charting_library/bundles/0.3a5522db90c672e977eb.js @@ -0,0 +1,2 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[0],{Nkvk:function(e,t,i){"use strict";i.r(t);var n,r=i("mrSG"),o=i("4O8T"),s=i.n(o),d=i("qocr"),a={desktop:1/0,desktopHd:1919,phone:767,"phone-vertical":479,tablet:1019},c=function(){var e;if(void 0===n){var t=document.createElement("div"),i=t.style;i.visibility="hidden",i.width="100px",i.msOverflowStyle="scrollbar",document.body.appendChild(t);var r=t.offsetWidth;t.style.overflow="scroll";var o=document.createElement("div");o.style.width="100%",t.appendChild(o);var s=o.offsetWidth;null===(e=t.parentNode)||void 0===e||e.removeChild(t),n=r-s}return n};function h(e,t,i){null!==e&&e.style.setProperty(t,i)}function u(e,t){return getComputedStyle(e,null).getPropertyValue(t)}function l(e,t){return parseInt(u(e,t))}i.d(t,"setFixedBodyState",(function(){return w})),i.d(t,"mediaState",(function(){return g}));var p=function(e){function t(){var t=e.call(this)||this;return t.width=0,t.height=0,t.device=null,t.breakpoints=a,t._checkDevice(),window.addEventListener("resize",t._checkDevice),Object.entries(a).sort((function(e,t){e[0];var i=e[1];t[0];return i-t[1]})).forEach((function(e,i,n){var r,o=e[0],s=e[1];0!==i?r=n[i-1][1]+1:r=0;var d,a,c=(d=r,(a=s)===1/0?window.matchMedia("(min-width: "+d+"px)"):window.matchMedia("(min-width: "+d+"px) and (max-width: "+a+"px)"));c.matches&&t._setNewDevice(o),c.addListener((function(e){e.matches&&(t._checkDevice(),t._setNewDevice(o))}))})),Object(d.a)(t._checkDevice.bind(t)),t.isPhoneSizeDevice.bind(t),t}return Object(r.__extends)(t,e),t.prototype.isPhoneSizeDevice=function(){return"phone"===this.device||"phone-vertical"===this.device},t.prototype._checkDevice=function(){this.width=window.innerWidth,this.height=window.innerHeight},t.prototype._setNewDevice=function(e){var t=this.device;this.device=e,this.trigger("changeDevice",[e,t])},t}(s.a),v=0,f=!1;function w(e){var t=document.body,i=t.querySelector(".widgetbar-wrap");if(e&&1==++v){var n=u(t,"overflow"),r=l(t,"padding-right");"hidden"!==n.toLowerCase()&&t.scrollHeight>t.offsetHeight&&(h(i,"right",c()+"px"),t.style.paddingRight=r+c()+"px",f=!0),t.classList.add("i-no-scroll")}else if(!e&&v>0&&0==--v&&(t.classList.remove("i-no-scroll"),f)){h(i,"right","0px");var o=Boolean(window.widgetbar&&window.widgetbar.resizerBridge.fullscreen.value())?0:function(e){if(null!==e)return l(e,"width")-l(e,"padding-left")-l(e,"padding-right")}(i)||0;t.scrollHeight<=t.clientHeight&&(o-=c()),t.style.paddingRight=(o<0?0:o)+"px",f=!1}}var g=new p},jAh7:function(e,t,i){"use strict";i.r(t),i.d(t,"OverlapManager",(function(){return o})),i.d(t,"getRootOverlapManager",(function(){return d}));var n=i("Eyy1"),r=function(){function e(){this._storage=[]}return e.prototype.add=function(e){this._storage.push(e)},e.prototype.remove=function(e){this._storage=this._storage.filter((function(t){return e!==t}))},e.prototype.has=function(e){return this._storage.includes(e)},e.prototype.getItems=function(){return this._storage},e}(),o=function(){function e(e){void 0===e&&(e=document),this._storage=new r,this._windows=new Map, +this._index=0,this._document=e,this._container=e.createDocumentFragment()}return e.prototype.setContainer=function(e){var t=this._container,i=null===e?this._document.createDocumentFragment():e;!function(e,t){Array.from(e.childNodes).forEach((function(e){e.nodeType===Node.ELEMENT_NODE&&t.appendChild(e)}))}(t,i),this._container=i},e.prototype.registerWindow=function(e){this._storage.has(e)||this._storage.add(e)},e.prototype.ensureWindow=function(e,t){void 0===t&&(t={position:"fixed",direction:"normal"});var i=this._windows.get(e);if(void 0!==i)return i;this.registerWindow(e);var n=this._document.createElement("div");if(n.style.position=t.position,n.style.zIndex=this._index.toString(),n.dataset.id=e,void 0!==t.index){var r=this._container.childNodes.length;if(t.index>=r)this._container.appendChild(n);else if(t.index<=0)this._container.insertBefore(n,this._container.firstChild);else{var o=this._container.childNodes[t.index];this._container.insertBefore(n,o)}}else"reverse"===t.direction?this._container.insertBefore(n,this._container.firstChild):this._container.appendChild(n);return this._windows.set(e,n),++this._index,n},e.prototype.unregisterWindow=function(e){this._storage.remove(e);var t=this._windows.get(e);void 0!==t&&(null!==t.parentElement&&t.parentElement.removeChild(t),this._windows.delete(e))},e.prototype.getZindex=function(e){var t=this.ensureWindow(e);return parseInt(t.style.zIndex||"0")},e.prototype.moveToTop=function(e){this.getZindex(e)!==this._index&&(this.ensureWindow(e).style.zIndex=(++this._index).toString())},e.prototype.removeWindow=function(e){this.unregisterWindow(e)},e}(),s=new WeakMap;function d(e){void 0===e&&(e=document);var t=e.getElementById("overlap-manager-root");if(null!==t)return Object(n.ensureDefined)(s.get(t));var i=new o(e),r=function(e){var t=e.createElement("div");return t.style.position="absolute",t.style.zIndex=150..toString(),t.style.top="0px",t.style.left="0px",t.id="overlap-manager-root",t}(e);return s.set(r,i),i.setContainer(r),e.body.appendChild(r),i}}}]); \ No newline at end of file diff --git a/public/charting_library/bundles/0579d40b812fa2c3ffe72e5803a6e14c.cur b/public/charting_library/bundles/0579d40b812fa2c3ffe72e5803a6e14c.cur new file mode 100644 index 00000000..13b6033a Binary files /dev/null and b/public/charting_library/bundles/0579d40b812fa2c3ffe72e5803a6e14c.cur differ diff --git a/public/charting_library/bundles/1.92647ec0a7beb8b2898d.css b/public/charting_library/bundles/1.92647ec0a7beb8b2898d.css new file mode 100644 index 00000000..e69de29b diff --git a/public/charting_library/bundles/1.92647ec0a7beb8b2898d.rtl.css b/public/charting_library/bundles/1.92647ec0a7beb8b2898d.rtl.css new file mode 100644 index 00000000..e69de29b diff --git a/public/charting_library/bundles/1.b288a641198a0f397ac3.js b/public/charting_library/bundles/1.b288a641198a0f397ac3.js new file mode 100644 index 00000000..5cb2eb09 --- /dev/null +++ b/public/charting_library/bundles/1.b288a641198a0f397ac3.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[1],[]]); \ No newline at end of file diff --git a/public/charting_library/bundles/10.f55b7ccd689ba318c0b1.css b/public/charting_library/bundles/10.f55b7ccd689ba318c0b1.css new file mode 100644 index 00000000..5a58cd4b --- /dev/null +++ b/public/charting_library/bundles/10.f55b7ccd689ba318c0b1.css @@ -0,0 +1 @@ +.container-12F9cTKw{cursor:default;display:flex;flex:0 0 auto;align-items:center;padding:0 17px 0 20px}.unsetAlign-39w7dDTj{align-items:stretch}.title-TQFObfxW{padding:17px 0;flex-grow:1;font-size:20px;font-weight:700;line-height:28px;color:#131722;min-width:0}html.theme-dark .title-TQFObfxW{color:#b2b5be}@media screen and (max-height:360px){.title-TQFObfxW{padding:10px 0}}.subtitle-EM1kLgFz{font-size:16px;line-height:24px;font-weight:400;margin:8px 0 3px}.ellipsis-1PT8QOxq{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.close-3NTwKnT_{display:flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:2px;color:#787b86;cursor:default;margin:17px 0}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.close-3NTwKnT_:hover{color:#131722;background-color:#f0f3fa}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .close-3NTwKnT_:hover{background-color:#363a45;color:#b2b5be}}@media screen and (max-height:360px){.close-3NTwKnT_{margin:10px 0}}.dialog-2QwUBM-N{display:block;min-width:380px;max-width:550px;width:auto}@media screen and (max-width:379px){.dialog-2QwUBM-N{min-width:100%;min-height:auto}}.wrapper-3ePvQMAQ{display:flex;flex-direction:column;height:100%}.separator-1L40XQyb{margin:0 0 2px;flex:none} \ No newline at end of file diff --git a/public/charting_library/bundles/10.f55b7ccd689ba318c0b1.rtl.css b/public/charting_library/bundles/10.f55b7ccd689ba318c0b1.rtl.css new file mode 100644 index 00000000..3a8ae342 --- /dev/null +++ b/public/charting_library/bundles/10.f55b7ccd689ba318c0b1.rtl.css @@ -0,0 +1 @@ +.container-12F9cTKw{cursor:default;display:flex;flex:0 0 auto;align-items:center;padding:0 20px 0 17px}.unsetAlign-39w7dDTj{align-items:stretch}.title-TQFObfxW{padding:17px 0;flex-grow:1;font-size:20px;font-weight:700;line-height:28px;color:#131722;min-width:0}html.theme-dark .title-TQFObfxW{color:#b2b5be}@media screen and (max-height:360px){.title-TQFObfxW{padding:10px 0}}.subtitle-EM1kLgFz{font-size:16px;line-height:24px;font-weight:400;margin:8px 0 3px}.ellipsis-1PT8QOxq{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.close-3NTwKnT_{display:flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:2px;color:#787b86;cursor:default;margin:17px 0}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.close-3NTwKnT_:hover{color:#131722;background-color:#f0f3fa}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .close-3NTwKnT_:hover{background-color:#363a45;color:#b2b5be}}@media screen and (max-height:360px){.close-3NTwKnT_{margin:10px 0}}.dialog-2QwUBM-N{display:block;min-width:380px;max-width:550px;width:auto}@media screen and (max-width:379px){.dialog-2QwUBM-N{min-width:100%;min-height:auto}}.wrapper-3ePvQMAQ{display:flex;flex-direction:column;height:100%}.separator-1L40XQyb{margin:0 0 2px;flex:none} \ No newline at end of file diff --git a/public/charting_library/bundles/10.f71cece1b9ed270fa72b.js b/public/charting_library/bundles/10.f71cece1b9ed270fa72b.js new file mode 100644 index 00000000..d57c266b --- /dev/null +++ b/public/charting_library/bundles/10.f71cece1b9ed270fa72b.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[10],[]]); \ No newline at end of file diff --git a/public/charting_library/bundles/11.1ebf9c9231959101aacd.js b/public/charting_library/bundles/11.1ebf9c9231959101aacd.js new file mode 100644 index 00000000..f41f6235 --- /dev/null +++ b/public/charting_library/bundles/11.1ebf9c9231959101aacd.js @@ -0,0 +1,3 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[11],{"+l/S":function(e,t,n){},"02pg":function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var a=n("q1tI"),r=n("TSYQ"),i=n("XiJV");function o(e){return a.createElement("div",{className:r(i.separator,e.className)})}},"2A9e":function(e){e.exports=JSON.parse('{"button":"button-1iktpaT1","content":"content-2PGssb8d","noOutline":"noOutline-d9Yp4qvi","appearance-default":"appearance-default-dMjF_2Hu","intent-primary":"intent-primary-1-IOYcbg","intent-success":"intent-success-25a4XZXM","intent-default":"intent-default-2ZbSqQDs","intent-warning":"intent-warning-24j5HMi0","intent-danger":"intent-danger-1EETHCla","appearance-stroke":"appearance-stroke-12lxiUSM","appearance-text":"appearance-text-DqKJVT3U","appearance-inverse":"appearance-inverse-r1Y2JQg_","size-s":"size-s-3mait84m","size-m":"size-m-2G7L7Qat","size-l":"size-l-2NEs9_xt","size-p":"size-p-3D4rn3v0","full-width":"full-width-1wU8ljjC","with-icon":"with-icon-yumghDr-","icon":"icon-1grlgNdV"}')},"4vL2":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getButtonClasses=void 0;var a=n("TSYQ");t.getButtonClasses=function(e,t){var n=t.intent,r=void 0===n?"primary":n,i=t.size,o=void 0===i?"m":i,l=t.appearance,s=void 0===l?"default":l,c=t.useFullWidth,u=void 0!==c&&c,d=t.tabIndex,p=void 0===d?0:d,f=t.icon,m=t.className;return a(m,e.button,e["size-"+o],e["intent-"+r],e["appearance-"+s],u&&e["full-width"],-1===p&&e.noOutline,f&&"s"!==o&&e["with-icon"])}},ItnF:function(e,t,n){e.exports={dialog:"dialog-2QwUBM-N",wrapper:"wrapper-3ePvQMAQ",separator:"separator-1L40XQyb"}},V6cB:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Button=void 0;var a=n("mrSG"),r=n("q1tI"),i=n("TSYQ"),o=n("4vL2"),l=n("2A9e");n("+l/S"),t.Button=function(e){var t=e.className,n=e.intent,s=e.size,c=e.appearance,u=e.disabled,d=e.useFullWidth,p=e.reference,f=e.icon,m=e.children,h=e.tabIndex,v=a.__rest(e,["className","intent","size","appearance","disabled","useFullWidth","reference","icon","children","tabIndex"]),b=o.getButtonClasses(l,{intent:n,size:s,appearance:c,disabled:u,useFullWidth:d,tabIndex:h,icon:f});return r.createElement("button",a.__assign({className:i(b,t),disabled:u,ref:p,tabIndex:h},v),f&&"s"!==s&&r.createElement("span",{className:l.icon},f),r.createElement("span",{className:l.content},m))}},XiJV:function(e,t,n){e.exports={separator:"separator-1TZB5HZ-"}},"e95/":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AnchorButton=void 0;var a=n("mrSG"),r=n("q1tI"),i=n("TSYQ"),o=n("4vL2"),l=n("2A9e");n("+l/S"),t.AnchorButton=function(e){var t=e.className,n=e.intent,s=e.size,c=e.appearance,u=e.disabled,d=e.useFullWidth,p=e.reference,f=e.icon,m=e.children,h=e.href,v=e.tabIndex,b=a.__rest(e,["className","intent","size","appearance","disabled","useFullWidth","reference","icon","children","href","tabIndex"]),_=o.getButtonClasses(l,{intent:n,size:s,appearance:c,disabled:u,useFullWidth:d,tabIndex:v,icon:f});return r.createElement("a",a.__assign({ +className:i(t,_),href:u?void 0:h,"aria-disabled":u,ref:p,tabIndex:v},b),f&&"s"!==s&&r.createElement("span",{className:l.icon},f),r.createElement("span",{className:l.content},m))}},g89m:function(e,t,n){"use strict";var a=n("mrSG"),r=n("q1tI"),i=n.n(r),o=n("Eyy1"),l=n("TSYQ"),s=n.n(l),c=n("/3z9"),u=n("d700"),d=n("WXjp"),p=n("02pg"),f=n("uhCe"),m=n("/KDZ"),h=n("pafz"),v=n("ZjKI"),b=n("FQhm"),_=n("Iivm"),g=n("zztK"),w=n("px1m");function N(e){var t=e.title,n=e.subtitle,a=e.onClose,r=e.renderBefore,o=e.renderAfter,l=e.draggable;return i.a.createElement("div",{className:s()(w.container,n&&w.unsetAlign)},r,i.a.createElement("div",{"data-dragg-area":l,className:w.title},i.a.createElement("div",{className:w.ellipsis},t),n&&i.a.createElement("div",{className:s()(w.ellipsis,w.subtitle)},n)),o,i.a.createElement(_.Icon,{className:w.close,icon:g,onClick:a,"data-name":"close","data-role":"button"}))}var E=n("ItnF");n.d(t,"a",(function(){return O}));var C={vertical:20},x={vertical:0},O=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._controller=null,t._reference=null,t._renderChildren=function(e,n){return t._controller=e,t.props.render({requestResize:t._requestResize,centerAndFit:t._centerAndFit,isSmallWidth:n})},t._handleReference=function(e){return t._reference=e},t._handleClose=function(){t.props.onClose()},t._handleKeyDown=function(e){if(!e.defaultPrevented)switch(t.props.onKeyDown&&t.props.onKeyDown(e),Object(c.hashFromEvent)(e)){case 27:if(e.defaultPrevented)return;if(t.props.forceCloseOnEsc&&t.props.forceCloseOnEsc())return void t._handleClose();var n=document.activeElement,a=Object(o.ensureNotNull)(t._reference);if(null!==n){if(e.preventDefault(),S(n))return void t._handleClose();if(Object(u.b)(n))return void a.focus();if(a.contains(n))return void t._handleClose()}}},t._requestResize=function(){null!==t._controller&&t._controller.recalculateBounds()},t._centerAndFit=function(){null!==t._controller&&t._controller.centerAndFit()},t}return Object(a.__extends)(t,e),t.prototype.componentDidMount=function(){b.subscribe(v.CLOSE_POPUPS_AND_DIALOGS_COMMAND,this._handleClose,null)},t.prototype.componentWillUnmount=function(){b.unsubscribe(v.CLOSE_POPUPS_AND_DIALOGS_COMMAND,this._handleClose,null)},t.prototype.focus=function(){Object(o.ensureNotNull)(this._reference).focus()},t.prototype.getElement=function(){return this._reference},t.prototype.render=function(){var e=this,t=this.props,n=t.className,a=t.isOpened,r=t.title,o=t.dataName,l=t.onClickOutside,c=t.additionalElementPos,u=t.additionalHeaderElement,v=t.backdrop,b=t.shouldForceFocus,_=void 0===b||b,g=t.showSeparator,w=t.subtitle,O=t.draggable,S=void 0===O||O,z=t.fullScreen,A=void 0!==z&&z,F=t.isAnimationEnabled,y=t.growPoint,I=t.dialogTooltip,D="after"!==c?u:void 0,P="after"===c?u:void 0;return i.a.createElement(m.a,{rule:f.a.SmallHeight},(function(t){return i.a.createElement(m.a,{rule:f.a.TabletSmall},(function(c){return i.a.createElement(d.a,{className:s()(E.dialog,n),isOpened:a,reference:e._handleReference,onKeyDown:e._handleKeyDown, +onClickOutside:l,onClickBackdrop:l,fullscreen:c||A,guard:t?x:C,boundByScreen:c||A,shouldForceFocus:_,backdrop:v,draggable:S,isAnimationEnabled:F,growPoint:y,name:e.props.dataName,dialogTooltip:I},i.a.createElement("div",{className:E.wrapper,"data-name":o,"data-dialog-name":r},i.a.createElement(N,{draggable:S&&!(c||A),onClose:e._handleClose,renderAfter:P,renderBefore:D,subtitle:w,title:r}),g&&i.a.createElement(p.a,{className:E.separator}),i.a.createElement(h.a.Consumer,null,(function(t){return e._renderChildren(t,c||A)}))))}))}))},t}(i.a.PureComponent);function S(e){return"true"===e.getAttribute("data-haspopup")&&"true"!==e.getAttribute("data-expanded")}},mwqF:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n("mrSG");a.__exportStar(n("V6cB"),t),a.__exportStar(n("e95/"),t)},px1m:function(e,t,n){e.exports={"small-height-breakpoint":"screen and (max-height: 360px)",container:"container-12F9cTKw",unsetAlign:"unsetAlign-39w7dDTj",title:"title-TQFObfxW",subtitle:"subtitle-EM1kLgFz",ellipsis:"ellipsis-1PT8QOxq",close:"close-3NTwKnT_"}},zztK:function(e,t){e.exports=''}}]); \ No newline at end of file diff --git a/public/charting_library/bundles/12.19fddd1156a17841a7f3.js b/public/charting_library/bundles/12.19fddd1156a17841a7f3.js new file mode 100644 index 00000000..e4605527 --- /dev/null +++ b/public/charting_library/bundles/12.19fddd1156a17841a7f3.js @@ -0,0 +1,3 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[12],{bdgK:function(t,e,n){"use strict";n.r(e),function(t){var n=function(){if("undefined"!=typeof Map)return Map;function t(t,e){var n=-1;return t.some((function(t,i){return t[0]===e&&(n=i,!0)})),n}return function(){function e(){this.__entries__=[]}var n={size:{configurable:!0}};return n.size.get=function(){return this.__entries__.length},e.prototype.get=function(e){var n=t(this.__entries__,e),i=this.__entries__[n];return i&&i[1]},e.prototype.set=function(e,n){var i=t(this.__entries__,e);~i?this.__entries__[i][1]=n:this.__entries__.push([e,n])},e.prototype.delete=function(e){var n=this.__entries__,i=t(n,e);~i&&n.splice(i,1)},e.prototype.has=function(e){return!!~t(this.__entries__,e)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(t,e){void 0===e&&(e=null);for(var n=0,i=this.__entries__;n0},a.prototype.connect_=function(){i&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),c?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},a.prototype.disconnect_=function(){i&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh), +this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},a.prototype.onTransitionEnd_=function(t){var e=t.propertyName;void 0===e&&(e=""),s.some((function(t){return!!~e.indexOf(t)}))&&this.refresh()},a.getInstance=function(){return this.instance_||(this.instance_=new a),this.instance_},a.instance_=null;var h=function(t,e){for(var n=0,i=Object.keys(e);n0;)e[n]=arguments[n+1];return e.reduce((function(e,n){return e+d(t["border-"+n+"-width"])}),0)}function v(t){var e=t.clientWidth,n=t.clientHeight;if(!e&&!n)return f;var i=u(t).getComputedStyle(t),r=function(t){for(var e={},n=0,i=["top","right","bottom","left"];n0};var g="undefined"!=typeof WeakMap?new WeakMap:new n,E=function(t){if(!(this instanceof E))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var e=a.getInstance(),n=new w(t,e,this);g.set(this,n)};["observe","unobserve","disconnect"].forEach((function(t){E.prototype[t]=function(){return(e=g.get(this))[t].apply(e,arguments);var e}}));var O=void 0!==r.ResizeObserver?r.ResizeObserver:E;e.default=O}.call(this,n("yLpj"))}}]); \ No newline at end of file diff --git a/public/charting_library/bundles/13.102513570821ffa4cacc.css b/public/charting_library/bundles/13.102513570821ffa4cacc.css new file mode 100644 index 00000000..d8795d1f --- /dev/null +++ b/public/charting_library/bundles/13.102513570821ffa4cacc.css @@ -0,0 +1 @@ +.button-1iktpaT1{display:inline-flex;position:relative;align-items:center;justify-content:center;box-sizing:border-box;border-width:1px;border-style:solid;outline:0;max-width:100%;transition-duration:.35s;transition-timing-function:ease;transition-property:border-color,background-color,color}.button-1iktpaT1 .content-2PGssb8d{text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.button-1iktpaT1:after{content:"";position:absolute;box-sizing:border-box;top:-5px;left:-5px;width:calc(100% + 10px);height:calc(100% + 10px);border-width:2px;border-style:solid;transform:scale(.81);opacity:0;transition-duration:.35s;transition-timing-function:ease;transition-property:opacity,transform,border-color;will-change:border-color}.button-1iktpaT1.noOutline-d9Yp4qvi:after{content:none}.button-1iktpaT1:focus:after{transform:scale(1);opacity:1}.appearance-default-dMjF_2Hu.intent-primary-1-IOYcbg{transform:translateY(0)}.appearance-default-dMjF_2Hu.intent-primary-1-IOYcbg,.appearance-default-dMjF_2Hu.intent-primary-1-IOYcbg:link,.appearance-default-dMjF_2Hu.intent-primary-1-IOYcbg:visited{color:#fff;background-color:#2196f3;border-color:#2196f3}html.theme-dark .appearance-default-dMjF_2Hu.intent-primary-1-IOYcbg,html.theme-dark .appearance-default-dMjF_2Hu.intent-primary-1-IOYcbg:link,html.theme-dark .appearance-default-dMjF_2Hu.intent-primary-1-IOYcbg:visited{border-color:#1976d2;background-color:#1976d2;color:#fff}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.appearance-default-dMjF_2Hu.intent-primary-1-IOYcbg:hover:not(:disabled):not([aria-disabled=true]){color:#fff;border-color:#1e88e5;background-color:#1e88e5}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .appearance-default-dMjF_2Hu.intent-primary-1-IOYcbg:hover:not(:disabled):not([aria-disabled=true]){background-color:#1e88e5;border-color:#1e88e5;color:#fff}}.appearance-default-dMjF_2Hu.intent-primary-1-IOYcbg:active:not(:disabled):not([aria-disabled=true]){color:#fff;border-color:#1976d2;background-color:#1976d2;transform:translateY(1px)}html.theme-dark .appearance-default-dMjF_2Hu.intent-primary-1-IOYcbg:active:not(:disabled):not([aria-disabled=true]){background-color:#2196f3;border-color:#2196f3;color:#fff}.appearance-default-dMjF_2Hu.intent-primary-1-IOYcbg:disabled,.appearance-default-dMjF_2Hu.intent-primary-1-IOYcbg:disabled:link,.appearance-default-dMjF_2Hu.intent-primary-1-IOYcbg:disabled:visited,.appearance-default-dMjF_2Hu.intent-primary-1-IOYcbg[aria-disabled=true],.appearance-default-dMjF_2Hu.intent-primary-1-IOYcbg[aria-disabled=true]:link,.appearance-default-dMjF_2Hu.intent-primary-1-IOYcbg[aria-disabled=true]:visited{color:#b2b5be;background-color:#e0e3eb;border-color:#e0e3eb}html.theme-dark .appearance-default-dMjF_2Hu.intent-primary-1-IOYcbg:disabled,html.theme-dark .appearance-default-dMjF_2Hu.intent-primary-1-IOYcbg:disabled:link,html.theme-dark .appearance-default-dMjF_2Hu.intent-primary-1-IOYcbg:disabled:visited,html.theme-dark .appearance-default-dMjF_2Hu.intent-primary-1-IOYcbg[aria-disabled=true],html.theme-dark .appearance-default-dMjF_2Hu.intent-primary-1-IOYcbg[aria-disabled=true]:link,html.theme-dark .appearance-default-dMjF_2Hu.intent-primary-1-IOYcbg[aria-disabled=true]:visited{border-color:#363a45;background-color:#363a45;color:#5d606b}.appearance-default-dMjF_2Hu.intent-primary-1-IOYcbg:focus{background-color:#1e88e5;border-color:#1e88e5}html.theme-dark .appearance-default-dMjF_2Hu.intent-primary-1-IOYcbg:focus{border-color:#1e88e5;background-color:#1e88e5}.appearance-default-dMjF_2Hu.intent-primary-1-IOYcbg:after{border-color:rgba(33,150,243,0)}html.theme-dark .appearance-default-dMjF_2Hu.intent-primary-1-IOYcbg:after{border-color:rgba(25,118,210,0)}.appearance-default-dMjF_2Hu.intent-primary-1-IOYcbg:focus:after{border-color:rgba(33,150,243,.3)}html.theme-dark .appearance-default-dMjF_2Hu.intent-primary-1-IOYcbg:focus:after{border-color:rgba(25,118,210,.3)}.appearance-default-dMjF_2Hu.intent-success-25a4XZXM{transform:translateY(0)}.appearance-default-dMjF_2Hu.intent-success-25a4XZXM,.appearance-default-dMjF_2Hu.intent-success-25a4XZXM:link,.appearance-default-dMjF_2Hu.intent-success-25a4XZXM:visited{color:#fff;background-color:#26a69a;border-color:#26a69a}html.theme-dark .appearance-default-dMjF_2Hu.intent-success-25a4XZXM,html.theme-dark .appearance-default-dMjF_2Hu.intent-success-25a4XZXM:link,html.theme-dark .appearance-default-dMjF_2Hu.intent-success-25a4XZXM:visited{border-color:#00897b;background-color:#00897b;color:#fff}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.appearance-default-dMjF_2Hu.intent-success-25a4XZXM:hover:not(:disabled):not([aria-disabled=true]){color:#fff;border-color:#009688;background-color:#009688}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .appearance-default-dMjF_2Hu.intent-success-25a4XZXM:hover:not(:disabled):not([aria-disabled=true]){background-color:#009688;border-color:#009688;color:#fff}}.appearance-default-dMjF_2Hu.intent-success-25a4XZXM:active:not(:disabled):not([aria-disabled=true]){color:#fff;border-color:#00897b;background-color:#00897b;transform:translateY(1px)}html.theme-dark .appearance-default-dMjF_2Hu.intent-success-25a4XZXM:active:not(:disabled):not([aria-disabled=true]){background-color:#26a69a;border-color:#26a69a;color:#fff}.appearance-default-dMjF_2Hu.intent-success-25a4XZXM:disabled,.appearance-default-dMjF_2Hu.intent-success-25a4XZXM:disabled:link,.appearance-default-dMjF_2Hu.intent-success-25a4XZXM:disabled:visited,.appearance-default-dMjF_2Hu.intent-success-25a4XZXM[aria-disabled=true],.appearance-default-dMjF_2Hu.intent-success-25a4XZXM[aria-disabled=true]:link,.appearance-default-dMjF_2Hu.intent-success-25a4XZXM[aria-disabled=true]:visited{color:#b2b5be;background-color:#e0e3eb;border-color:#e0e3eb}html.theme-dark .appearance-default-dMjF_2Hu.intent-success-25a4XZXM:disabled,html.theme-dark .appearance-default-dMjF_2Hu.intent-success-25a4XZXM:disabled:link,html.theme-dark .appearance-default-dMjF_2Hu.intent-success-25a4XZXM:disabled:visited,html.theme-dark .appearance-default-dMjF_2Hu.intent-success-25a4XZXM[aria-disabled=true],html.theme-dark .appearance-default-dMjF_2Hu.intent-success-25a4XZXM[aria-disabled=true]:link,html.theme-dark .appearance-default-dMjF_2Hu.intent-success-25a4XZXM[aria-disabled=true]:visited{border-color:#363a45;background-color:#363a45;color:#5d606b}.appearance-default-dMjF_2Hu.intent-success-25a4XZXM:focus{background-color:#009688;border-color:#009688}html.theme-dark .appearance-default-dMjF_2Hu.intent-success-25a4XZXM:focus{border-color:#009688;background-color:#009688}.appearance-default-dMjF_2Hu.intent-success-25a4XZXM:after{border-color:rgba(38,166,154,0)}html.theme-dark .appearance-default-dMjF_2Hu.intent-success-25a4XZXM:after{border-color:rgba(0,137,123,0)}.appearance-default-dMjF_2Hu.intent-success-25a4XZXM:focus:after{border-color:rgba(38,166,154,.3)}html.theme-dark .appearance-default-dMjF_2Hu.intent-success-25a4XZXM:focus:after{border-color:rgba(0,137,123,.3)}.appearance-default-dMjF_2Hu.intent-default-2ZbSqQDs{transform:translateY(0)}.appearance-default-dMjF_2Hu.intent-default-2ZbSqQDs,.appearance-default-dMjF_2Hu.intent-default-2ZbSqQDs:link,.appearance-default-dMjF_2Hu.intent-default-2ZbSqQDs:visited{color:#fff;background-color:#9598a1;border-color:#9598a1}html.theme-dark .appearance-default-dMjF_2Hu.intent-default-2ZbSqQDs,html.theme-dark .appearance-default-dMjF_2Hu.intent-default-2ZbSqQDs:link,html.theme-dark .appearance-default-dMjF_2Hu.intent-default-2ZbSqQDs:visited{border-color:#5d606b;background-color:#5d606b;color:#fff}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.appearance-default-dMjF_2Hu.intent-default-2ZbSqQDs:hover:not(:disabled):not([aria-disabled=true]){color:#fff;border-color:#787b86;background-color:#787b86}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .appearance-default-dMjF_2Hu.intent-default-2ZbSqQDs:hover:not(:disabled):not([aria-disabled=true]){background-color:#787b86;border-color:#787b86;color:#fff}}.appearance-default-dMjF_2Hu.intent-default-2ZbSqQDs:active:not(:disabled):not([aria-disabled=true]){color:#fff;border-color:#5d606b;background-color:#5d606b;transform:translateY(1px)}html.theme-dark .appearance-default-dMjF_2Hu.intent-default-2ZbSqQDs:active:not(:disabled):not([aria-disabled=true]){background-color:#9598a1;border-color:#9598a1;color:#fff}.appearance-default-dMjF_2Hu.intent-default-2ZbSqQDs:disabled,.appearance-default-dMjF_2Hu.intent-default-2ZbSqQDs:disabled:link,.appearance-default-dMjF_2Hu.intent-default-2ZbSqQDs:disabled:visited,.appearance-default-dMjF_2Hu.intent-default-2ZbSqQDs[aria-disabled=true],.appearance-default-dMjF_2Hu.intent-default-2ZbSqQDs[aria-disabled=true]:link,.appearance-default-dMjF_2Hu.intent-default-2ZbSqQDs[aria-disabled=true]:visited{color:#b2b5be;background-color:#e0e3eb;border-color:#e0e3eb}html.theme-dark .appearance-default-dMjF_2Hu.intent-default-2ZbSqQDs:disabled,html.theme-dark .appearance-default-dMjF_2Hu.intent-default-2ZbSqQDs:disabled:link,html.theme-dark .appearance-default-dMjF_2Hu.intent-default-2ZbSqQDs:disabled:visited,html.theme-dark .appearance-default-dMjF_2Hu.intent-default-2ZbSqQDs[aria-disabled=true],html.theme-dark .appearance-default-dMjF_2Hu.intent-default-2ZbSqQDs[aria-disabled=true]:link,html.theme-dark .appearance-default-dMjF_2Hu.intent-default-2ZbSqQDs[aria-disabled=true]:visited{border-color:#363a45;background-color:#363a45;color:#5d606b}.appearance-default-dMjF_2Hu.intent-default-2ZbSqQDs:focus{background-color:#787b86;border-color:#787b86}html.theme-dark .appearance-default-dMjF_2Hu.intent-default-2ZbSqQDs:focus{border-color:#787b86;background-color:#787b86}.appearance-default-dMjF_2Hu.intent-default-2ZbSqQDs:after{border-color:hsla(225,6%,61%,0)}html.theme-dark .appearance-default-dMjF_2Hu.intent-default-2ZbSqQDs:after{border-color:rgba(93,96,107,0)}.appearance-default-dMjF_2Hu.intent-default-2ZbSqQDs:focus:after{border-color:hsla(225,6%,61%,.3)}html.theme-dark .appearance-default-dMjF_2Hu.intent-default-2ZbSqQDs:focus:after{border-color:rgba(93,96,107,.3)}.appearance-default-dMjF_2Hu.intent-warning-24j5HMi0{transform:translateY(0)}.appearance-default-dMjF_2Hu.intent-warning-24j5HMi0,.appearance-default-dMjF_2Hu.intent-warning-24j5HMi0:link,.appearance-default-dMjF_2Hu.intent-warning-24j5HMi0:visited{color:#fff;background-color:#ff9800;border-color:#ff9800}html.theme-dark .appearance-default-dMjF_2Hu.intent-warning-24j5HMi0,html.theme-dark .appearance-default-dMjF_2Hu.intent-warning-24j5HMi0:link,html.theme-dark .appearance-default-dMjF_2Hu.intent-warning-24j5HMi0:visited{border-color:#f57c00;background-color:#f57c00;color:#fff}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.appearance-default-dMjF_2Hu.intent-warning-24j5HMi0:hover:not(:disabled):not([aria-disabled=true]){color:#fff;border-color:#fb8c00;background-color:#fb8c00}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .appearance-default-dMjF_2Hu.intent-warning-24j5HMi0:hover:not(:disabled):not([aria-disabled=true]){background-color:#fb8c00;border-color:#fb8c00;color:#fff}}.appearance-default-dMjF_2Hu.intent-warning-24j5HMi0:active:not(:disabled):not([aria-disabled=true]){color:#fff;border-color:#f57c00;background-color:#f57c00;transform:translateY(1px)}html.theme-dark .appearance-default-dMjF_2Hu.intent-warning-24j5HMi0:active:not(:disabled):not([aria-disabled=true]){background-color:#ff9800;border-color:#ff9800;color:#fff}.appearance-default-dMjF_2Hu.intent-warning-24j5HMi0:disabled,.appearance-default-dMjF_2Hu.intent-warning-24j5HMi0:disabled:link,.appearance-default-dMjF_2Hu.intent-warning-24j5HMi0:disabled:visited,.appearance-default-dMjF_2Hu.intent-warning-24j5HMi0[aria-disabled=true],.appearance-default-dMjF_2Hu.intent-warning-24j5HMi0[aria-disabled=true]:link,.appearance-default-dMjF_2Hu.intent-warning-24j5HMi0[aria-disabled=true]:visited{color:#b2b5be;background-color:#e0e3eb;border-color:#e0e3eb}html.theme-dark .appearance-default-dMjF_2Hu.intent-warning-24j5HMi0:disabled,html.theme-dark .appearance-default-dMjF_2Hu.intent-warning-24j5HMi0:disabled:link,html.theme-dark .appearance-default-dMjF_2Hu.intent-warning-24j5HMi0:disabled:visited,html.theme-dark .appearance-default-dMjF_2Hu.intent-warning-24j5HMi0[aria-disabled=true],html.theme-dark .appearance-default-dMjF_2Hu.intent-warning-24j5HMi0[aria-disabled=true]:link,html.theme-dark .appearance-default-dMjF_2Hu.intent-warning-24j5HMi0[aria-disabled=true]:visited{border-color:#363a45;background-color:#363a45;color:#5d606b}.appearance-default-dMjF_2Hu.intent-warning-24j5HMi0:focus{background-color:#fb8c00;border-color:#fb8c00}html.theme-dark .appearance-default-dMjF_2Hu.intent-warning-24j5HMi0:focus{border-color:#fb8c00;background-color:#fb8c00}.appearance-default-dMjF_2Hu.intent-warning-24j5HMi0:after{border-color:rgba(255,152,0,0)}html.theme-dark .appearance-default-dMjF_2Hu.intent-warning-24j5HMi0:after{border-color:rgba(245,124,0,0)}.appearance-default-dMjF_2Hu.intent-warning-24j5HMi0:focus:after{border-color:rgba(255,152,0,.3)}html.theme-dark .appearance-default-dMjF_2Hu.intent-warning-24j5HMi0:focus:after{border-color:rgba(245,124,0,.3)}.appearance-default-dMjF_2Hu.intent-danger-1EETHCla{transform:translateY(0)}.appearance-default-dMjF_2Hu.intent-danger-1EETHCla,.appearance-default-dMjF_2Hu.intent-danger-1EETHCla:link,.appearance-default-dMjF_2Hu.intent-danger-1EETHCla:visited{color:#fff;background-color:#ef5350;border-color:#ef5350}html.theme-dark .appearance-default-dMjF_2Hu.intent-danger-1EETHCla,html.theme-dark .appearance-default-dMjF_2Hu.intent-danger-1EETHCla:link,html.theme-dark .appearance-default-dMjF_2Hu.intent-danger-1EETHCla:visited{border-color:#e53935;background-color:#e53935;color:#fff}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.appearance-default-dMjF_2Hu.intent-danger-1EETHCla:hover:not(:disabled):not([aria-disabled=true]){color:#fff;border-color:#f44336;background-color:#f44336}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .appearance-default-dMjF_2Hu.intent-danger-1EETHCla:hover:not(:disabled):not([aria-disabled=true]){background-color:#f44336;border-color:#f44336;color:#fff}}.appearance-default-dMjF_2Hu.intent-danger-1EETHCla:active:not(:disabled):not([aria-disabled=true]){color:#fff;border-color:#e53935;background-color:#e53935;transform:translateY(1px)}html.theme-dark .appearance-default-dMjF_2Hu.intent-danger-1EETHCla:active:not(:disabled):not([aria-disabled=true]){background-color:#ef5350;border-color:#ef5350;color:#fff}.appearance-default-dMjF_2Hu.intent-danger-1EETHCla:disabled,.appearance-default-dMjF_2Hu.intent-danger-1EETHCla:disabled:link,.appearance-default-dMjF_2Hu.intent-danger-1EETHCla:disabled:visited,.appearance-default-dMjF_2Hu.intent-danger-1EETHCla[aria-disabled=true],.appearance-default-dMjF_2Hu.intent-danger-1EETHCla[aria-disabled=true]:link,.appearance-default-dMjF_2Hu.intent-danger-1EETHCla[aria-disabled=true]:visited{color:#b2b5be;background-color:#e0e3eb;border-color:#e0e3eb}html.theme-dark .appearance-default-dMjF_2Hu.intent-danger-1EETHCla:disabled,html.theme-dark .appearance-default-dMjF_2Hu.intent-danger-1EETHCla:disabled:link,html.theme-dark .appearance-default-dMjF_2Hu.intent-danger-1EETHCla:disabled:visited,html.theme-dark .appearance-default-dMjF_2Hu.intent-danger-1EETHCla[aria-disabled=true],html.theme-dark .appearance-default-dMjF_2Hu.intent-danger-1EETHCla[aria-disabled=true]:link,html.theme-dark .appearance-default-dMjF_2Hu.intent-danger-1EETHCla[aria-disabled=true]:visited{border-color:#363a45;background-color:#363a45;color:#5d606b}.appearance-default-dMjF_2Hu.intent-danger-1EETHCla:focus{background-color:#f44336;border-color:#f44336}html.theme-dark .appearance-default-dMjF_2Hu.intent-danger-1EETHCla:focus{border-color:#f44336;background-color:#f44336}.appearance-default-dMjF_2Hu.intent-danger-1EETHCla:after{border-color:rgba(239,83,80,0)}html.theme-dark .appearance-default-dMjF_2Hu.intent-danger-1EETHCla:after{border-color:rgba(229,57,53,0)}.appearance-default-dMjF_2Hu.intent-danger-1EETHCla:focus:after{border-color:rgba(239,83,80,.3)}html.theme-dark .appearance-default-dMjF_2Hu.intent-danger-1EETHCla:focus:after{border-color:rgba(229,57,53,.3)}.appearance-stroke-12lxiUSM.intent-primary-1-IOYcbg{transform:translateY(0)}.appearance-stroke-12lxiUSM.intent-primary-1-IOYcbg,.appearance-stroke-12lxiUSM.intent-primary-1-IOYcbg:link,.appearance-stroke-12lxiUSM.intent-primary-1-IOYcbg:visited{color:#2196f3;background-color:transparent;border-color:#2196f3}html.theme-dark .appearance-stroke-12lxiUSM.intent-primary-1-IOYcbg,html.theme-dark .appearance-stroke-12lxiUSM.intent-primary-1-IOYcbg:link,html.theme-dark .appearance-stroke-12lxiUSM.intent-primary-1-IOYcbg:visited{border-color:#1976d2;background-color:transparent;color:#1976d2}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.appearance-stroke-12lxiUSM.intent-primary-1-IOYcbg:hover:not(:disabled):not([aria-disabled=true]){color:#fff;border-color:#1e88e5;background-color:#1e88e5}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .appearance-stroke-12lxiUSM.intent-primary-1-IOYcbg:hover:not(:disabled):not([aria-disabled=true]){background-color:#1e88e5;border-color:#1e88e5;color:#fff}}.appearance-stroke-12lxiUSM.intent-primary-1-IOYcbg:active:not(:disabled):not([aria-disabled=true]){color:#fff;border-color:#1976d2;background-color:#1976d2;transform:translateY(1px)}html.theme-dark .appearance-stroke-12lxiUSM.intent-primary-1-IOYcbg:active:not(:disabled):not([aria-disabled=true]){background-color:#2196f3;border-color:#2196f3;color:#fff}.appearance-stroke-12lxiUSM.intent-primary-1-IOYcbg:disabled,.appearance-stroke-12lxiUSM.intent-primary-1-IOYcbg:disabled:link,.appearance-stroke-12lxiUSM.intent-primary-1-IOYcbg:disabled:visited,.appearance-stroke-12lxiUSM.intent-primary-1-IOYcbg[aria-disabled=true],.appearance-stroke-12lxiUSM.intent-primary-1-IOYcbg[aria-disabled=true]:link,.appearance-stroke-12lxiUSM.intent-primary-1-IOYcbg[aria-disabled=true]:visited{color:#b2b5be;background-color:#e0e3eb;border-color:#e0e3eb}html.theme-dark .appearance-stroke-12lxiUSM.intent-primary-1-IOYcbg:disabled,html.theme-dark .appearance-stroke-12lxiUSM.intent-primary-1-IOYcbg:disabled:link,html.theme-dark .appearance-stroke-12lxiUSM.intent-primary-1-IOYcbg:disabled:visited,html.theme-dark .appearance-stroke-12lxiUSM.intent-primary-1-IOYcbg[aria-disabled=true],html.theme-dark .appearance-stroke-12lxiUSM.intent-primary-1-IOYcbg[aria-disabled=true]:link,html.theme-dark .appearance-stroke-12lxiUSM.intent-primary-1-IOYcbg[aria-disabled=true]:visited{border-color:#363a45;background-color:#363a45;color:#5d606b}.appearance-stroke-12lxiUSM.intent-primary-1-IOYcbg:focus{color:#fff;background-color:#1e88e5;border-color:#1e88e5}html.theme-dark .appearance-stroke-12lxiUSM.intent-primary-1-IOYcbg:focus{border-color:#1e88e5;background-color:#1e88e5;color:#fff}.appearance-stroke-12lxiUSM.intent-primary-1-IOYcbg:after{border-color:rgba(33,150,243,0)}html.theme-dark .appearance-stroke-12lxiUSM.intent-primary-1-IOYcbg:after{border-color:rgba(25,118,210,0)}.appearance-stroke-12lxiUSM.intent-primary-1-IOYcbg:focus:after{border-color:rgba(33,150,243,.3)}html.theme-dark .appearance-stroke-12lxiUSM.intent-primary-1-IOYcbg:focus:after{border-color:rgba(25,118,210,.3)}.appearance-stroke-12lxiUSM.intent-success-25a4XZXM{transform:translateY(0)}.appearance-stroke-12lxiUSM.intent-success-25a4XZXM,.appearance-stroke-12lxiUSM.intent-success-25a4XZXM:link,.appearance-stroke-12lxiUSM.intent-success-25a4XZXM:visited{color:#26a69a;background-color:transparent;border-color:#26a69a}html.theme-dark .appearance-stroke-12lxiUSM.intent-success-25a4XZXM,html.theme-dark .appearance-stroke-12lxiUSM.intent-success-25a4XZXM:link,html.theme-dark .appearance-stroke-12lxiUSM.intent-success-25a4XZXM:visited{border-color:#00897b;background-color:transparent;color:#00897b}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.appearance-stroke-12lxiUSM.intent-success-25a4XZXM:hover:not(:disabled):not([aria-disabled=true]){color:#fff;border-color:#009688;background-color:#009688}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .appearance-stroke-12lxiUSM.intent-success-25a4XZXM:hover:not(:disabled):not([aria-disabled=true]){background-color:#009688;border-color:#009688;color:#fff}}.appearance-stroke-12lxiUSM.intent-success-25a4XZXM:active:not(:disabled):not([aria-disabled=true]){color:#fff;border-color:#00897b;background-color:#00897b;transform:translateY(1px)}html.theme-dark .appearance-stroke-12lxiUSM.intent-success-25a4XZXM:active:not(:disabled):not([aria-disabled=true]){background-color:#26a69a;border-color:#26a69a;color:#fff}.appearance-stroke-12lxiUSM.intent-success-25a4XZXM:disabled,.appearance-stroke-12lxiUSM.intent-success-25a4XZXM:disabled:link,.appearance-stroke-12lxiUSM.intent-success-25a4XZXM:disabled:visited,.appearance-stroke-12lxiUSM.intent-success-25a4XZXM[aria-disabled=true],.appearance-stroke-12lxiUSM.intent-success-25a4XZXM[aria-disabled=true]:link,.appearance-stroke-12lxiUSM.intent-success-25a4XZXM[aria-disabled=true]:visited{color:#b2b5be;background-color:#e0e3eb;border-color:#e0e3eb}html.theme-dark .appearance-stroke-12lxiUSM.intent-success-25a4XZXM:disabled,html.theme-dark .appearance-stroke-12lxiUSM.intent-success-25a4XZXM:disabled:link,html.theme-dark .appearance-stroke-12lxiUSM.intent-success-25a4XZXM:disabled:visited,html.theme-dark .appearance-stroke-12lxiUSM.intent-success-25a4XZXM[aria-disabled=true],html.theme-dark .appearance-stroke-12lxiUSM.intent-success-25a4XZXM[aria-disabled=true]:link,html.theme-dark .appearance-stroke-12lxiUSM.intent-success-25a4XZXM[aria-disabled=true]:visited{border-color:#363a45;background-color:#363a45;color:#5d606b}.appearance-stroke-12lxiUSM.intent-success-25a4XZXM:focus{color:#fff;background-color:#009688;border-color:#009688}html.theme-dark .appearance-stroke-12lxiUSM.intent-success-25a4XZXM:focus{border-color:#009688;background-color:#009688;color:#fff}.appearance-stroke-12lxiUSM.intent-success-25a4XZXM:after{border-color:rgba(38,166,154,0)}html.theme-dark .appearance-stroke-12lxiUSM.intent-success-25a4XZXM:after{border-color:rgba(0,137,123,0)}.appearance-stroke-12lxiUSM.intent-success-25a4XZXM:focus:after{border-color:rgba(38,166,154,.3)}html.theme-dark .appearance-stroke-12lxiUSM.intent-success-25a4XZXM:focus:after{border-color:rgba(0,137,123,.3)}.appearance-stroke-12lxiUSM.intent-default-2ZbSqQDs{transform:translateY(0)}.appearance-stroke-12lxiUSM.intent-default-2ZbSqQDs,.appearance-stroke-12lxiUSM.intent-default-2ZbSqQDs:link,.appearance-stroke-12lxiUSM.intent-default-2ZbSqQDs:visited{color:#131722;background-color:transparent;border-color:#9598a1}html.theme-dark .appearance-stroke-12lxiUSM.intent-default-2ZbSqQDs,html.theme-dark .appearance-stroke-12lxiUSM.intent-default-2ZbSqQDs:link,html.theme-dark .appearance-stroke-12lxiUSM.intent-default-2ZbSqQDs:visited{border-color:#5d606b;background-color:transparent;color:#d1d4dc}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.appearance-stroke-12lxiUSM.intent-default-2ZbSqQDs:hover:not(:disabled):not([aria-disabled=true]){color:#fff;border-color:#787b86;background-color:#787b86}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .appearance-stroke-12lxiUSM.intent-default-2ZbSqQDs:hover:not(:disabled):not([aria-disabled=true]){background-color:#787b86;border-color:#787b86;color:#fff}}.appearance-stroke-12lxiUSM.intent-default-2ZbSqQDs:active:not(:disabled):not([aria-disabled=true]){color:#fff;border-color:#5d606b;background-color:#5d606b;transform:translateY(1px)}html.theme-dark .appearance-stroke-12lxiUSM.intent-default-2ZbSqQDs:active:not(:disabled):not([aria-disabled=true]){background-color:#9598a1;border-color:#9598a1;color:#fff}.appearance-stroke-12lxiUSM.intent-default-2ZbSqQDs:disabled,.appearance-stroke-12lxiUSM.intent-default-2ZbSqQDs:disabled:link,.appearance-stroke-12lxiUSM.intent-default-2ZbSqQDs:disabled:visited,.appearance-stroke-12lxiUSM.intent-default-2ZbSqQDs[aria-disabled=true],.appearance-stroke-12lxiUSM.intent-default-2ZbSqQDs[aria-disabled=true]:link,.appearance-stroke-12lxiUSM.intent-default-2ZbSqQDs[aria-disabled=true]:visited{color:#b2b5be;background-color:#e0e3eb;border-color:#e0e3eb}html.theme-dark .appearance-stroke-12lxiUSM.intent-default-2ZbSqQDs:disabled,html.theme-dark .appearance-stroke-12lxiUSM.intent-default-2ZbSqQDs:disabled:link,html.theme-dark .appearance-stroke-12lxiUSM.intent-default-2ZbSqQDs:disabled:visited,html.theme-dark .appearance-stroke-12lxiUSM.intent-default-2ZbSqQDs[aria-disabled=true],html.theme-dark .appearance-stroke-12lxiUSM.intent-default-2ZbSqQDs[aria-disabled=true]:link,html.theme-dark .appearance-stroke-12lxiUSM.intent-default-2ZbSqQDs[aria-disabled=true]:visited{border-color:#363a45;background-color:#363a45;color:#5d606b}.appearance-stroke-12lxiUSM.intent-default-2ZbSqQDs:focus{color:#fff;background-color:#787b86;border-color:#787b86}html.theme-dark .appearance-stroke-12lxiUSM.intent-default-2ZbSqQDs:focus{border-color:#787b86;background-color:#787b86;color:#fff}.appearance-stroke-12lxiUSM.intent-default-2ZbSqQDs:after{border-color:hsla(225,6%,61%,0)}html.theme-dark .appearance-stroke-12lxiUSM.intent-default-2ZbSqQDs:after{border-color:rgba(93,96,107,0)}.appearance-stroke-12lxiUSM.intent-default-2ZbSqQDs:focus:after{border-color:hsla(225,6%,61%,.3)}html.theme-dark .appearance-stroke-12lxiUSM.intent-default-2ZbSqQDs:focus:after{border-color:rgba(93,96,107,.3)}.appearance-stroke-12lxiUSM.intent-warning-24j5HMi0{transform:translateY(0)}.appearance-stroke-12lxiUSM.intent-warning-24j5HMi0,.appearance-stroke-12lxiUSM.intent-warning-24j5HMi0:link,.appearance-stroke-12lxiUSM.intent-warning-24j5HMi0:visited{color:#ff9800;background-color:transparent;border-color:#ff9800}html.theme-dark .appearance-stroke-12lxiUSM.intent-warning-24j5HMi0,html.theme-dark .appearance-stroke-12lxiUSM.intent-warning-24j5HMi0:link,html.theme-dark .appearance-stroke-12lxiUSM.intent-warning-24j5HMi0:visited{border-color:#f57c00;background-color:transparent;color:#f57c00}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.appearance-stroke-12lxiUSM.intent-warning-24j5HMi0:hover:not(:disabled):not([aria-disabled=true]){color:#fff;border-color:#fb8c00;background-color:#fb8c00}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .appearance-stroke-12lxiUSM.intent-warning-24j5HMi0:hover:not(:disabled):not([aria-disabled=true]){background-color:#fb8c00;border-color:#fb8c00;color:#fff}}.appearance-stroke-12lxiUSM.intent-warning-24j5HMi0:active:not(:disabled):not([aria-disabled=true]){color:#fff;border-color:#f57c00;background-color:#f57c00;transform:translateY(1px)}html.theme-dark .appearance-stroke-12lxiUSM.intent-warning-24j5HMi0:active:not(:disabled):not([aria-disabled=true]){background-color:#ff9800;border-color:#ff9800;color:#fff}.appearance-stroke-12lxiUSM.intent-warning-24j5HMi0:disabled,.appearance-stroke-12lxiUSM.intent-warning-24j5HMi0:disabled:link,.appearance-stroke-12lxiUSM.intent-warning-24j5HMi0:disabled:visited,.appearance-stroke-12lxiUSM.intent-warning-24j5HMi0[aria-disabled=true],.appearance-stroke-12lxiUSM.intent-warning-24j5HMi0[aria-disabled=true]:link,.appearance-stroke-12lxiUSM.intent-warning-24j5HMi0[aria-disabled=true]:visited{color:#b2b5be;background-color:#e0e3eb;border-color:#e0e3eb}html.theme-dark .appearance-stroke-12lxiUSM.intent-warning-24j5HMi0:disabled,html.theme-dark .appearance-stroke-12lxiUSM.intent-warning-24j5HMi0:disabled:link,html.theme-dark .appearance-stroke-12lxiUSM.intent-warning-24j5HMi0:disabled:visited,html.theme-dark .appearance-stroke-12lxiUSM.intent-warning-24j5HMi0[aria-disabled=true],html.theme-dark .appearance-stroke-12lxiUSM.intent-warning-24j5HMi0[aria-disabled=true]:link,html.theme-dark .appearance-stroke-12lxiUSM.intent-warning-24j5HMi0[aria-disabled=true]:visited{border-color:#363a45;background-color:#363a45;color:#5d606b}.appearance-stroke-12lxiUSM.intent-warning-24j5HMi0:focus{color:#fff;background-color:#fb8c00;border-color:#fb8c00}html.theme-dark .appearance-stroke-12lxiUSM.intent-warning-24j5HMi0:focus{border-color:#fb8c00;background-color:#fb8c00;color:#fff}.appearance-stroke-12lxiUSM.intent-warning-24j5HMi0:after{border-color:rgba(255,152,0,0)}html.theme-dark .appearance-stroke-12lxiUSM.intent-warning-24j5HMi0:after{border-color:rgba(245,124,0,0)}.appearance-stroke-12lxiUSM.intent-warning-24j5HMi0:focus:after{border-color:rgba(255,152,0,.3)}html.theme-dark .appearance-stroke-12lxiUSM.intent-warning-24j5HMi0:focus:after{border-color:rgba(245,124,0,.3)}.appearance-stroke-12lxiUSM.intent-danger-1EETHCla{transform:translateY(0)}.appearance-stroke-12lxiUSM.intent-danger-1EETHCla,.appearance-stroke-12lxiUSM.intent-danger-1EETHCla:link,.appearance-stroke-12lxiUSM.intent-danger-1EETHCla:visited{color:#ef5350;background-color:transparent;border-color:#ef5350}html.theme-dark .appearance-stroke-12lxiUSM.intent-danger-1EETHCla,html.theme-dark .appearance-stroke-12lxiUSM.intent-danger-1EETHCla:link,html.theme-dark .appearance-stroke-12lxiUSM.intent-danger-1EETHCla:visited{border-color:#e53935;background-color:transparent;color:#e53935}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.appearance-stroke-12lxiUSM.intent-danger-1EETHCla:hover:not(:disabled):not([aria-disabled=true]){color:#fff;border-color:#f44336;background-color:#f44336}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .appearance-stroke-12lxiUSM.intent-danger-1EETHCla:hover:not(:disabled):not([aria-disabled=true]){background-color:#f44336;border-color:#f44336;color:#fff}}.appearance-stroke-12lxiUSM.intent-danger-1EETHCla:active:not(:disabled):not([aria-disabled=true]){color:#fff;border-color:#e53935;background-color:#e53935;transform:translateY(1px)}html.theme-dark .appearance-stroke-12lxiUSM.intent-danger-1EETHCla:active:not(:disabled):not([aria-disabled=true]){background-color:#ef5350;border-color:#ef5350;color:#fff}.appearance-stroke-12lxiUSM.intent-danger-1EETHCla:disabled,.appearance-stroke-12lxiUSM.intent-danger-1EETHCla:disabled:link,.appearance-stroke-12lxiUSM.intent-danger-1EETHCla:disabled:visited,.appearance-stroke-12lxiUSM.intent-danger-1EETHCla[aria-disabled=true],.appearance-stroke-12lxiUSM.intent-danger-1EETHCla[aria-disabled=true]:link,.appearance-stroke-12lxiUSM.intent-danger-1EETHCla[aria-disabled=true]:visited{color:#b2b5be;background-color:#e0e3eb;border-color:#e0e3eb}html.theme-dark .appearance-stroke-12lxiUSM.intent-danger-1EETHCla:disabled,html.theme-dark .appearance-stroke-12lxiUSM.intent-danger-1EETHCla:disabled:link,html.theme-dark .appearance-stroke-12lxiUSM.intent-danger-1EETHCla:disabled:visited,html.theme-dark .appearance-stroke-12lxiUSM.intent-danger-1EETHCla[aria-disabled=true],html.theme-dark .appearance-stroke-12lxiUSM.intent-danger-1EETHCla[aria-disabled=true]:link,html.theme-dark .appearance-stroke-12lxiUSM.intent-danger-1EETHCla[aria-disabled=true]:visited{border-color:#363a45;background-color:#363a45;color:#5d606b}.appearance-stroke-12lxiUSM.intent-danger-1EETHCla:focus{color:#fff;background-color:#f44336;border-color:#f44336}html.theme-dark .appearance-stroke-12lxiUSM.intent-danger-1EETHCla:focus{border-color:#f44336;background-color:#f44336;color:#fff}.appearance-stroke-12lxiUSM.intent-danger-1EETHCla:after{border-color:rgba(239,83,80,0)}html.theme-dark .appearance-stroke-12lxiUSM.intent-danger-1EETHCla:after{border-color:rgba(229,57,53,0)}.appearance-stroke-12lxiUSM.intent-danger-1EETHCla:focus:after{border-color:rgba(239,83,80,.3)}html.theme-dark .appearance-stroke-12lxiUSM.intent-danger-1EETHCla:focus:after{border-color:rgba(229,57,53,.3)}.appearance-text-DqKJVT3U.intent-primary-1-IOYcbg{transform:translateY(0)}.appearance-text-DqKJVT3U.intent-primary-1-IOYcbg,.appearance-text-DqKJVT3U.intent-primary-1-IOYcbg:link,.appearance-text-DqKJVT3U.intent-primary-1-IOYcbg:visited{color:#2196f3;background-color:transparent;border-color:transparent}html.theme-dark .appearance-text-DqKJVT3U.intent-primary-1-IOYcbg,html.theme-dark .appearance-text-DqKJVT3U.intent-primary-1-IOYcbg:link,html.theme-dark .appearance-text-DqKJVT3U.intent-primary-1-IOYcbg:visited{border-color:transparent;background-color:transparent;color:#1976d2}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.appearance-text-DqKJVT3U.intent-primary-1-IOYcbg:hover:not(:disabled):not([aria-disabled=true]){color:#1e88e5;border-color:#1e88e5;background-color:transparent}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .appearance-text-DqKJVT3U.intent-primary-1-IOYcbg:hover:not(:disabled):not([aria-disabled=true]){background-color:transparent;border-color:#1e88e5;color:#1e88e5}}.appearance-text-DqKJVT3U.intent-primary-1-IOYcbg:active:not(:disabled):not([aria-disabled=true]){color:#fff;border-color:#1976d2;background-color:#1976d2;transform:translateY(1px)}html.theme-dark .appearance-text-DqKJVT3U.intent-primary-1-IOYcbg:active:not(:disabled):not([aria-disabled=true]){background-color:#2196f3;border-color:#2196f3;color:#fff}.appearance-text-DqKJVT3U.intent-primary-1-IOYcbg:disabled,.appearance-text-DqKJVT3U.intent-primary-1-IOYcbg:disabled:link,.appearance-text-DqKJVT3U.intent-primary-1-IOYcbg:disabled:visited,.appearance-text-DqKJVT3U.intent-primary-1-IOYcbg[aria-disabled=true],.appearance-text-DqKJVT3U.intent-primary-1-IOYcbg[aria-disabled=true]:link,.appearance-text-DqKJVT3U.intent-primary-1-IOYcbg[aria-disabled=true]:visited{color:#b2b5be;background-color:#e0e3eb;border-color:#e0e3eb}html.theme-dark .appearance-text-DqKJVT3U.intent-primary-1-IOYcbg:disabled,html.theme-dark .appearance-text-DqKJVT3U.intent-primary-1-IOYcbg:disabled:link,html.theme-dark .appearance-text-DqKJVT3U.intent-primary-1-IOYcbg:disabled:visited,html.theme-dark .appearance-text-DqKJVT3U.intent-primary-1-IOYcbg[aria-disabled=true],html.theme-dark .appearance-text-DqKJVT3U.intent-primary-1-IOYcbg[aria-disabled=true]:link,html.theme-dark .appearance-text-DqKJVT3U.intent-primary-1-IOYcbg[aria-disabled=true]:visited{border-color:#363a45;background-color:#363a45;color:#5d606b}.appearance-text-DqKJVT3U.intent-primary-1-IOYcbg:focus,html.theme-dark .appearance-text-DqKJVT3U.intent-primary-1-IOYcbg:focus{border-color:#1e88e5}.appearance-text-DqKJVT3U.intent-primary-1-IOYcbg:after{border-color:rgba(33,150,243,0)}html.theme-dark .appearance-text-DqKJVT3U.intent-primary-1-IOYcbg:after{border-color:rgba(25,118,210,0)}.appearance-text-DqKJVT3U.intent-primary-1-IOYcbg:focus:after{border-color:rgba(33,150,243,.3)}html.theme-dark .appearance-text-DqKJVT3U.intent-primary-1-IOYcbg:focus:after{border-color:rgba(25,118,210,.3)}.appearance-text-DqKJVT3U.intent-success-25a4XZXM{transform:translateY(0)}.appearance-text-DqKJVT3U.intent-success-25a4XZXM,.appearance-text-DqKJVT3U.intent-success-25a4XZXM:link,.appearance-text-DqKJVT3U.intent-success-25a4XZXM:visited{color:#26a69a;background-color:transparent;border-color:transparent}html.theme-dark .appearance-text-DqKJVT3U.intent-success-25a4XZXM,html.theme-dark .appearance-text-DqKJVT3U.intent-success-25a4XZXM:link,html.theme-dark .appearance-text-DqKJVT3U.intent-success-25a4XZXM:visited{border-color:transparent;background-color:transparent;color:#00897b}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.appearance-text-DqKJVT3U.intent-success-25a4XZXM:hover:not(:disabled):not([aria-disabled=true]){color:#009688;border-color:#009688;background-color:transparent}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .appearance-text-DqKJVT3U.intent-success-25a4XZXM:hover:not(:disabled):not([aria-disabled=true]){background-color:transparent;border-color:#009688;color:#009688}}.appearance-text-DqKJVT3U.intent-success-25a4XZXM:active:not(:disabled):not([aria-disabled=true]){color:#fff;border-color:#00897b;background-color:#00897b;transform:translateY(1px)}html.theme-dark .appearance-text-DqKJVT3U.intent-success-25a4XZXM:active:not(:disabled):not([aria-disabled=true]){background-color:#26a69a;border-color:#26a69a;color:#fff}.appearance-text-DqKJVT3U.intent-success-25a4XZXM:disabled,.appearance-text-DqKJVT3U.intent-success-25a4XZXM:disabled:link,.appearance-text-DqKJVT3U.intent-success-25a4XZXM:disabled:visited,.appearance-text-DqKJVT3U.intent-success-25a4XZXM[aria-disabled=true],.appearance-text-DqKJVT3U.intent-success-25a4XZXM[aria-disabled=true]:link,.appearance-text-DqKJVT3U.intent-success-25a4XZXM[aria-disabled=true]:visited{color:#b2b5be;background-color:#e0e3eb;border-color:#e0e3eb}html.theme-dark .appearance-text-DqKJVT3U.intent-success-25a4XZXM:disabled,html.theme-dark .appearance-text-DqKJVT3U.intent-success-25a4XZXM:disabled:link,html.theme-dark .appearance-text-DqKJVT3U.intent-success-25a4XZXM:disabled:visited,html.theme-dark .appearance-text-DqKJVT3U.intent-success-25a4XZXM[aria-disabled=true],html.theme-dark .appearance-text-DqKJVT3U.intent-success-25a4XZXM[aria-disabled=true]:link,html.theme-dark .appearance-text-DqKJVT3U.intent-success-25a4XZXM[aria-disabled=true]:visited{border-color:#363a45;background-color:#363a45;color:#5d606b}.appearance-text-DqKJVT3U.intent-success-25a4XZXM:focus,html.theme-dark .appearance-text-DqKJVT3U.intent-success-25a4XZXM:focus{border-color:#009688}.appearance-text-DqKJVT3U.intent-success-25a4XZXM:after{border-color:rgba(38,166,154,0)}html.theme-dark .appearance-text-DqKJVT3U.intent-success-25a4XZXM:after{border-color:rgba(0,137,123,0)}.appearance-text-DqKJVT3U.intent-success-25a4XZXM:focus:after{border-color:rgba(38,166,154,.3)}html.theme-dark .appearance-text-DqKJVT3U.intent-success-25a4XZXM:focus:after{border-color:rgba(0,137,123,.3)}.appearance-text-DqKJVT3U.intent-default-2ZbSqQDs{transform:translateY(0)}.appearance-text-DqKJVT3U.intent-default-2ZbSqQDs,.appearance-text-DqKJVT3U.intent-default-2ZbSqQDs:link,.appearance-text-DqKJVT3U.intent-default-2ZbSqQDs:visited{color:#131722;background-color:transparent;border-color:transparent}html.theme-dark .appearance-text-DqKJVT3U.intent-default-2ZbSqQDs,html.theme-dark .appearance-text-DqKJVT3U.intent-default-2ZbSqQDs:link,html.theme-dark .appearance-text-DqKJVT3U.intent-default-2ZbSqQDs:visited{border-color:transparent;background-color:transparent;color:#d1d4dc}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.appearance-text-DqKJVT3U.intent-default-2ZbSqQDs:hover:not(:disabled):not([aria-disabled=true]){color:#131722;border-color:#787b86;background-color:transparent}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .appearance-text-DqKJVT3U.intent-default-2ZbSqQDs:hover:not(:disabled):not([aria-disabled=true]){background-color:transparent;border-color:#787b86;color:#d1d4dc}}.appearance-text-DqKJVT3U.intent-default-2ZbSqQDs:active:not(:disabled):not([aria-disabled=true]){color:#fff;border-color:#5d606b;background-color:#5d606b;transform:translateY(1px)}html.theme-dark .appearance-text-DqKJVT3U.intent-default-2ZbSqQDs:active:not(:disabled):not([aria-disabled=true]){background-color:#9598a1;border-color:#9598a1;color:#fff}.appearance-text-DqKJVT3U.intent-default-2ZbSqQDs:disabled,.appearance-text-DqKJVT3U.intent-default-2ZbSqQDs:disabled:link,.appearance-text-DqKJVT3U.intent-default-2ZbSqQDs:disabled:visited,.appearance-text-DqKJVT3U.intent-default-2ZbSqQDs[aria-disabled=true],.appearance-text-DqKJVT3U.intent-default-2ZbSqQDs[aria-disabled=true]:link,.appearance-text-DqKJVT3U.intent-default-2ZbSqQDs[aria-disabled=true]:visited{color:#b2b5be;background-color:#e0e3eb;border-color:#e0e3eb}html.theme-dark .appearance-text-DqKJVT3U.intent-default-2ZbSqQDs:disabled,html.theme-dark .appearance-text-DqKJVT3U.intent-default-2ZbSqQDs:disabled:link,html.theme-dark .appearance-text-DqKJVT3U.intent-default-2ZbSqQDs:disabled:visited,html.theme-dark .appearance-text-DqKJVT3U.intent-default-2ZbSqQDs[aria-disabled=true],html.theme-dark .appearance-text-DqKJVT3U.intent-default-2ZbSqQDs[aria-disabled=true]:link,html.theme-dark .appearance-text-DqKJVT3U.intent-default-2ZbSqQDs[aria-disabled=true]:visited{border-color:#363a45;background-color:#363a45;color:#5d606b}.appearance-text-DqKJVT3U.intent-default-2ZbSqQDs:focus{border-color:#131722}html.theme-dark .appearance-text-DqKJVT3U.intent-default-2ZbSqQDs:focus{border-color:#d1d4dc}.appearance-text-DqKJVT3U.intent-default-2ZbSqQDs:after{border-color:hsla(225,6%,61%,0)}html.theme-dark .appearance-text-DqKJVT3U.intent-default-2ZbSqQDs:after{border-color:rgba(93,96,107,0)}.appearance-text-DqKJVT3U.intent-default-2ZbSqQDs:focus:after{border-color:hsla(225,6%,61%,.3)}html.theme-dark .appearance-text-DqKJVT3U.intent-default-2ZbSqQDs:focus:after{border-color:rgba(93,96,107,.3)}.appearance-text-DqKJVT3U.intent-warning-24j5HMi0{transform:translateY(0)}.appearance-text-DqKJVT3U.intent-warning-24j5HMi0,.appearance-text-DqKJVT3U.intent-warning-24j5HMi0:link,.appearance-text-DqKJVT3U.intent-warning-24j5HMi0:visited{color:#ff9800;background-color:transparent;border-color:transparent}html.theme-dark .appearance-text-DqKJVT3U.intent-warning-24j5HMi0,html.theme-dark .appearance-text-DqKJVT3U.intent-warning-24j5HMi0:link,html.theme-dark .appearance-text-DqKJVT3U.intent-warning-24j5HMi0:visited{border-color:transparent;background-color:transparent;color:#f57c00}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.appearance-text-DqKJVT3U.intent-warning-24j5HMi0:hover:not(:disabled):not([aria-disabled=true]){color:#fb8c00;border-color:#fb8c00;background-color:transparent}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .appearance-text-DqKJVT3U.intent-warning-24j5HMi0:hover:not(:disabled):not([aria-disabled=true]){background-color:transparent;border-color:#fb8c00;color:#fb8c00}}.appearance-text-DqKJVT3U.intent-warning-24j5HMi0:active:not(:disabled):not([aria-disabled=true]){color:#fff;border-color:#f57c00;background-color:#f57c00;transform:translateY(1px)}html.theme-dark .appearance-text-DqKJVT3U.intent-warning-24j5HMi0:active:not(:disabled):not([aria-disabled=true]){background-color:#ff9800;border-color:#ff9800;color:#fff}.appearance-text-DqKJVT3U.intent-warning-24j5HMi0:disabled,.appearance-text-DqKJVT3U.intent-warning-24j5HMi0:disabled:link,.appearance-text-DqKJVT3U.intent-warning-24j5HMi0:disabled:visited,.appearance-text-DqKJVT3U.intent-warning-24j5HMi0[aria-disabled=true],.appearance-text-DqKJVT3U.intent-warning-24j5HMi0[aria-disabled=true]:link,.appearance-text-DqKJVT3U.intent-warning-24j5HMi0[aria-disabled=true]:visited{color:#b2b5be;background-color:#e0e3eb;border-color:#e0e3eb}html.theme-dark .appearance-text-DqKJVT3U.intent-warning-24j5HMi0:disabled,html.theme-dark .appearance-text-DqKJVT3U.intent-warning-24j5HMi0:disabled:link,html.theme-dark .appearance-text-DqKJVT3U.intent-warning-24j5HMi0:disabled:visited,html.theme-dark .appearance-text-DqKJVT3U.intent-warning-24j5HMi0[aria-disabled=true],html.theme-dark .appearance-text-DqKJVT3U.intent-warning-24j5HMi0[aria-disabled=true]:link,html.theme-dark .appearance-text-DqKJVT3U.intent-warning-24j5HMi0[aria-disabled=true]:visited{border-color:#363a45;background-color:#363a45;color:#5d606b}.appearance-text-DqKJVT3U.intent-warning-24j5HMi0:focus,html.theme-dark .appearance-text-DqKJVT3U.intent-warning-24j5HMi0:focus{border-color:#fb8c00}.appearance-text-DqKJVT3U.intent-warning-24j5HMi0:after{border-color:rgba(255,152,0,0)}html.theme-dark .appearance-text-DqKJVT3U.intent-warning-24j5HMi0:after{border-color:rgba(245,124,0,0)}.appearance-text-DqKJVT3U.intent-warning-24j5HMi0:focus:after{border-color:rgba(255,152,0,.3)}html.theme-dark .appearance-text-DqKJVT3U.intent-warning-24j5HMi0:focus:after{border-color:rgba(245,124,0,.3)}.appearance-text-DqKJVT3U.intent-danger-1EETHCla{transform:translateY(0)}.appearance-text-DqKJVT3U.intent-danger-1EETHCla,.appearance-text-DqKJVT3U.intent-danger-1EETHCla:link,.appearance-text-DqKJVT3U.intent-danger-1EETHCla:visited{color:#ef5350;background-color:transparent;border-color:transparent}html.theme-dark .appearance-text-DqKJVT3U.intent-danger-1EETHCla,html.theme-dark .appearance-text-DqKJVT3U.intent-danger-1EETHCla:link,html.theme-dark .appearance-text-DqKJVT3U.intent-danger-1EETHCla:visited{border-color:transparent;background-color:transparent;color:#e53935}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.appearance-text-DqKJVT3U.intent-danger-1EETHCla:hover:not(:disabled):not([aria-disabled=true]){color:#f44336;border-color:#f44336;background-color:transparent}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .appearance-text-DqKJVT3U.intent-danger-1EETHCla:hover:not(:disabled):not([aria-disabled=true]){background-color:transparent;border-color:#f44336;color:#f44336}}.appearance-text-DqKJVT3U.intent-danger-1EETHCla:active:not(:disabled):not([aria-disabled=true]){color:#fff;border-color:#e53935;background-color:#e53935;transform:translateY(1px)}html.theme-dark .appearance-text-DqKJVT3U.intent-danger-1EETHCla:active:not(:disabled):not([aria-disabled=true]){background-color:#ef5350;border-color:#ef5350;color:#fff}.appearance-text-DqKJVT3U.intent-danger-1EETHCla:disabled,.appearance-text-DqKJVT3U.intent-danger-1EETHCla:disabled:link,.appearance-text-DqKJVT3U.intent-danger-1EETHCla:disabled:visited,.appearance-text-DqKJVT3U.intent-danger-1EETHCla[aria-disabled=true],.appearance-text-DqKJVT3U.intent-danger-1EETHCla[aria-disabled=true]:link,.appearance-text-DqKJVT3U.intent-danger-1EETHCla[aria-disabled=true]:visited{color:#b2b5be;background-color:#e0e3eb;border-color:#e0e3eb}html.theme-dark .appearance-text-DqKJVT3U.intent-danger-1EETHCla:disabled,html.theme-dark .appearance-text-DqKJVT3U.intent-danger-1EETHCla:disabled:link,html.theme-dark .appearance-text-DqKJVT3U.intent-danger-1EETHCla:disabled:visited,html.theme-dark .appearance-text-DqKJVT3U.intent-danger-1EETHCla[aria-disabled=true],html.theme-dark .appearance-text-DqKJVT3U.intent-danger-1EETHCla[aria-disabled=true]:link,html.theme-dark .appearance-text-DqKJVT3U.intent-danger-1EETHCla[aria-disabled=true]:visited{border-color:#363a45;background-color:#363a45;color:#5d606b}.appearance-text-DqKJVT3U.intent-danger-1EETHCla:focus,html.theme-dark .appearance-text-DqKJVT3U.intent-danger-1EETHCla:focus{border-color:#f44336}.appearance-text-DqKJVT3U.intent-danger-1EETHCla:after{border-color:rgba(239,83,80,0)}html.theme-dark .appearance-text-DqKJVT3U.intent-danger-1EETHCla:after{border-color:rgba(229,57,53,0)}.appearance-text-DqKJVT3U.intent-danger-1EETHCla:focus:after{border-color:rgba(239,83,80,.3)}html.theme-dark .appearance-text-DqKJVT3U.intent-danger-1EETHCla:focus:after{border-color:rgba(229,57,53,.3)}.appearance-inverse-r1Y2JQg_.intent-primary-1-IOYcbg{transform:translateY(0)}.appearance-inverse-r1Y2JQg_.intent-primary-1-IOYcbg,.appearance-inverse-r1Y2JQg_.intent-primary-1-IOYcbg:link,.appearance-inverse-r1Y2JQg_.intent-primary-1-IOYcbg:visited{color:#2196f3;background-color:#fff;border-color:#fff}html.theme-dark .appearance-inverse-r1Y2JQg_.intent-primary-1-IOYcbg,html.theme-dark .appearance-inverse-r1Y2JQg_.intent-primary-1-IOYcbg:link,html.theme-dark .appearance-inverse-r1Y2JQg_.intent-primary-1-IOYcbg:visited{color:#1976d2}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.appearance-inverse-r1Y2JQg_.intent-primary-1-IOYcbg:hover:not(:disabled):not([aria-disabled=true]){color:#1e88e5;border-color:#fff;background-color:#fff}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .appearance-inverse-r1Y2JQg_.intent-primary-1-IOYcbg:hover:not(:disabled):not([aria-disabled=true]){color:#1e88e5}}.appearance-inverse-r1Y2JQg_.intent-primary-1-IOYcbg:active:not(:disabled):not([aria-disabled=true]){color:#1976d2;border-color:#fff;background-color:#fff;transform:translateY(1px)}html.theme-dark .appearance-inverse-r1Y2JQg_.intent-primary-1-IOYcbg:active:not(:disabled):not([aria-disabled=true]){color:#2196f3}.appearance-inverse-r1Y2JQg_.intent-primary-1-IOYcbg:disabled,.appearance-inverse-r1Y2JQg_.intent-primary-1-IOYcbg:disabled:link,.appearance-inverse-r1Y2JQg_.intent-primary-1-IOYcbg:disabled:visited,.appearance-inverse-r1Y2JQg_.intent-primary-1-IOYcbg[aria-disabled=true],.appearance-inverse-r1Y2JQg_.intent-primary-1-IOYcbg[aria-disabled=true]:link,.appearance-inverse-r1Y2JQg_.intent-primary-1-IOYcbg[aria-disabled=true]:visited{color:#b2b5be;background-color:#e0e3eb;border-color:#e0e3eb}html.theme-dark .appearance-inverse-r1Y2JQg_.intent-primary-1-IOYcbg:disabled,html.theme-dark .appearance-inverse-r1Y2JQg_.intent-primary-1-IOYcbg:disabled:link,html.theme-dark .appearance-inverse-r1Y2JQg_.intent-primary-1-IOYcbg:disabled:visited,html.theme-dark .appearance-inverse-r1Y2JQg_.intent-primary-1-IOYcbg[aria-disabled=true],html.theme-dark .appearance-inverse-r1Y2JQg_.intent-primary-1-IOYcbg[aria-disabled=true]:link,html.theme-dark .appearance-inverse-r1Y2JQg_.intent-primary-1-IOYcbg[aria-disabled=true]:visited{border-color:#363a45;background-color:#363a45;color:#5d606b}.appearance-inverse-r1Y2JQg_.intent-primary-1-IOYcbg:focus,html.theme-dark .appearance-inverse-r1Y2JQg_.intent-primary-1-IOYcbg:focus{color:#1e88e5}.appearance-inverse-r1Y2JQg_.intent-primary-1-IOYcbg:after{border-color:rgba(33,150,243,0)}html.theme-dark .appearance-inverse-r1Y2JQg_.intent-primary-1-IOYcbg:after{border-color:rgba(25,118,210,0)}.appearance-inverse-r1Y2JQg_.intent-primary-1-IOYcbg:focus:after{border-color:rgba(33,150,243,.3)}html.theme-dark .appearance-inverse-r1Y2JQg_.intent-primary-1-IOYcbg:focus:after{border-color:rgba(25,118,210,.3)}.appearance-inverse-r1Y2JQg_.intent-success-25a4XZXM{transform:translateY(0)}.appearance-inverse-r1Y2JQg_.intent-success-25a4XZXM,.appearance-inverse-r1Y2JQg_.intent-success-25a4XZXM:link,.appearance-inverse-r1Y2JQg_.intent-success-25a4XZXM:visited{color:#26a69a;background-color:#fff;border-color:#fff}html.theme-dark .appearance-inverse-r1Y2JQg_.intent-success-25a4XZXM,html.theme-dark .appearance-inverse-r1Y2JQg_.intent-success-25a4XZXM:link,html.theme-dark .appearance-inverse-r1Y2JQg_.intent-success-25a4XZXM:visited{color:#00897b}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.appearance-inverse-r1Y2JQg_.intent-success-25a4XZXM:hover:not(:disabled):not([aria-disabled=true]){color:#009688;border-color:#fff;background-color:#fff}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .appearance-inverse-r1Y2JQg_.intent-success-25a4XZXM:hover:not(:disabled):not([aria-disabled=true]){color:#009688}}.appearance-inverse-r1Y2JQg_.intent-success-25a4XZXM:active:not(:disabled):not([aria-disabled=true]){color:#00897b;border-color:#fff;background-color:#fff;transform:translateY(1px)}html.theme-dark .appearance-inverse-r1Y2JQg_.intent-success-25a4XZXM:active:not(:disabled):not([aria-disabled=true]){color:#26a69a}.appearance-inverse-r1Y2JQg_.intent-success-25a4XZXM:disabled,.appearance-inverse-r1Y2JQg_.intent-success-25a4XZXM:disabled:link,.appearance-inverse-r1Y2JQg_.intent-success-25a4XZXM:disabled:visited,.appearance-inverse-r1Y2JQg_.intent-success-25a4XZXM[aria-disabled=true],.appearance-inverse-r1Y2JQg_.intent-success-25a4XZXM[aria-disabled=true]:link,.appearance-inverse-r1Y2JQg_.intent-success-25a4XZXM[aria-disabled=true]:visited{color:#b2b5be;background-color:#e0e3eb;border-color:#e0e3eb}html.theme-dark .appearance-inverse-r1Y2JQg_.intent-success-25a4XZXM:disabled,html.theme-dark .appearance-inverse-r1Y2JQg_.intent-success-25a4XZXM:disabled:link,html.theme-dark .appearance-inverse-r1Y2JQg_.intent-success-25a4XZXM:disabled:visited,html.theme-dark .appearance-inverse-r1Y2JQg_.intent-success-25a4XZXM[aria-disabled=true],html.theme-dark .appearance-inverse-r1Y2JQg_.intent-success-25a4XZXM[aria-disabled=true]:link,html.theme-dark .appearance-inverse-r1Y2JQg_.intent-success-25a4XZXM[aria-disabled=true]:visited{border-color:#363a45;background-color:#363a45;color:#5d606b}.appearance-inverse-r1Y2JQg_.intent-success-25a4XZXM:focus,html.theme-dark .appearance-inverse-r1Y2JQg_.intent-success-25a4XZXM:focus{color:#009688}.appearance-inverse-r1Y2JQg_.intent-success-25a4XZXM:after{border-color:rgba(38,166,154,0)}html.theme-dark .appearance-inverse-r1Y2JQg_.intent-success-25a4XZXM:after{border-color:rgba(0,137,123,0)}.appearance-inverse-r1Y2JQg_.intent-success-25a4XZXM:focus:after{border-color:rgba(38,166,154,.3)}html.theme-dark .appearance-inverse-r1Y2JQg_.intent-success-25a4XZXM:focus:after{border-color:rgba(0,137,123,.3)}.appearance-inverse-r1Y2JQg_.intent-default-2ZbSqQDs{transform:translateY(0)}.appearance-inverse-r1Y2JQg_.intent-default-2ZbSqQDs,.appearance-inverse-r1Y2JQg_.intent-default-2ZbSqQDs:link,.appearance-inverse-r1Y2JQg_.intent-default-2ZbSqQDs:visited{color:#9598a1;background-color:#fff;border-color:#fff}html.theme-dark .appearance-inverse-r1Y2JQg_.intent-default-2ZbSqQDs,html.theme-dark .appearance-inverse-r1Y2JQg_.intent-default-2ZbSqQDs:link,html.theme-dark .appearance-inverse-r1Y2JQg_.intent-default-2ZbSqQDs:visited{color:#5d606b}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.appearance-inverse-r1Y2JQg_.intent-default-2ZbSqQDs:hover:not(:disabled):not([aria-disabled=true]){color:#787b86;border-color:#fff;background-color:#fff}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .appearance-inverse-r1Y2JQg_.intent-default-2ZbSqQDs:hover:not(:disabled):not([aria-disabled=true]){color:#787b86}}.appearance-inverse-r1Y2JQg_.intent-default-2ZbSqQDs:active:not(:disabled):not([aria-disabled=true]){color:#5d606b;border-color:#fff;background-color:#fff;transform:translateY(1px)}html.theme-dark .appearance-inverse-r1Y2JQg_.intent-default-2ZbSqQDs:active:not(:disabled):not([aria-disabled=true]){color:#9598a1}.appearance-inverse-r1Y2JQg_.intent-default-2ZbSqQDs:disabled,.appearance-inverse-r1Y2JQg_.intent-default-2ZbSqQDs:disabled:link,.appearance-inverse-r1Y2JQg_.intent-default-2ZbSqQDs:disabled:visited,.appearance-inverse-r1Y2JQg_.intent-default-2ZbSqQDs[aria-disabled=true],.appearance-inverse-r1Y2JQg_.intent-default-2ZbSqQDs[aria-disabled=true]:link,.appearance-inverse-r1Y2JQg_.intent-default-2ZbSqQDs[aria-disabled=true]:visited{color:#b2b5be;background-color:#e0e3eb;border-color:#e0e3eb}html.theme-dark .appearance-inverse-r1Y2JQg_.intent-default-2ZbSqQDs:disabled,html.theme-dark .appearance-inverse-r1Y2JQg_.intent-default-2ZbSqQDs:disabled:link,html.theme-dark .appearance-inverse-r1Y2JQg_.intent-default-2ZbSqQDs:disabled:visited,html.theme-dark .appearance-inverse-r1Y2JQg_.intent-default-2ZbSqQDs[aria-disabled=true],html.theme-dark .appearance-inverse-r1Y2JQg_.intent-default-2ZbSqQDs[aria-disabled=true]:link,html.theme-dark .appearance-inverse-r1Y2JQg_.intent-default-2ZbSqQDs[aria-disabled=true]:visited{border-color:#363a45;background-color:#363a45;color:#5d606b}.appearance-inverse-r1Y2JQg_.intent-default-2ZbSqQDs:focus,html.theme-dark .appearance-inverse-r1Y2JQg_.intent-default-2ZbSqQDs:focus{color:#787b86}.appearance-inverse-r1Y2JQg_.intent-default-2ZbSqQDs:after{border-color:hsla(225,6%,61%,0)}html.theme-dark .appearance-inverse-r1Y2JQg_.intent-default-2ZbSqQDs:after{border-color:rgba(93,96,107,0)}.appearance-inverse-r1Y2JQg_.intent-default-2ZbSqQDs:focus:after{border-color:hsla(225,6%,61%,.3)}html.theme-dark .appearance-inverse-r1Y2JQg_.intent-default-2ZbSqQDs:focus:after{border-color:rgba(93,96,107,.3)}.appearance-inverse-r1Y2JQg_.intent-warning-24j5HMi0{transform:translateY(0)}.appearance-inverse-r1Y2JQg_.intent-warning-24j5HMi0,.appearance-inverse-r1Y2JQg_.intent-warning-24j5HMi0:link,.appearance-inverse-r1Y2JQg_.intent-warning-24j5HMi0:visited{color:#ff9800;background-color:#fff;border-color:#fff}html.theme-dark .appearance-inverse-r1Y2JQg_.intent-warning-24j5HMi0,html.theme-dark .appearance-inverse-r1Y2JQg_.intent-warning-24j5HMi0:link,html.theme-dark .appearance-inverse-r1Y2JQg_.intent-warning-24j5HMi0:visited{color:#f57c00}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.appearance-inverse-r1Y2JQg_.intent-warning-24j5HMi0:hover:not(:disabled):not([aria-disabled=true]){color:#fb8c00;border-color:#fff;background-color:#fff}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .appearance-inverse-r1Y2JQg_.intent-warning-24j5HMi0:hover:not(:disabled):not([aria-disabled=true]){color:#fb8c00}}.appearance-inverse-r1Y2JQg_.intent-warning-24j5HMi0:active:not(:disabled):not([aria-disabled=true]){color:#f57c00;border-color:#fff;background-color:#fff;transform:translateY(1px)}html.theme-dark .appearance-inverse-r1Y2JQg_.intent-warning-24j5HMi0:active:not(:disabled):not([aria-disabled=true]){color:#ff9800}.appearance-inverse-r1Y2JQg_.intent-warning-24j5HMi0:disabled,.appearance-inverse-r1Y2JQg_.intent-warning-24j5HMi0:disabled:link,.appearance-inverse-r1Y2JQg_.intent-warning-24j5HMi0:disabled:visited,.appearance-inverse-r1Y2JQg_.intent-warning-24j5HMi0[aria-disabled=true],.appearance-inverse-r1Y2JQg_.intent-warning-24j5HMi0[aria-disabled=true]:link,.appearance-inverse-r1Y2JQg_.intent-warning-24j5HMi0[aria-disabled=true]:visited{color:#b2b5be;background-color:#e0e3eb;border-color:#e0e3eb}html.theme-dark .appearance-inverse-r1Y2JQg_.intent-warning-24j5HMi0:disabled,html.theme-dark .appearance-inverse-r1Y2JQg_.intent-warning-24j5HMi0:disabled:link,html.theme-dark .appearance-inverse-r1Y2JQg_.intent-warning-24j5HMi0:disabled:visited,html.theme-dark .appearance-inverse-r1Y2JQg_.intent-warning-24j5HMi0[aria-disabled=true],html.theme-dark .appearance-inverse-r1Y2JQg_.intent-warning-24j5HMi0[aria-disabled=true]:link,html.theme-dark .appearance-inverse-r1Y2JQg_.intent-warning-24j5HMi0[aria-disabled=true]:visited{border-color:#363a45;background-color:#363a45;color:#5d606b}.appearance-inverse-r1Y2JQg_.intent-warning-24j5HMi0:focus,html.theme-dark .appearance-inverse-r1Y2JQg_.intent-warning-24j5HMi0:focus{color:#fb8c00}.appearance-inverse-r1Y2JQg_.intent-warning-24j5HMi0:after{border-color:rgba(255,152,0,0)}html.theme-dark .appearance-inverse-r1Y2JQg_.intent-warning-24j5HMi0:after{border-color:rgba(245,124,0,0)}.appearance-inverse-r1Y2JQg_.intent-warning-24j5HMi0:focus:after{border-color:rgba(255,152,0,.3)}html.theme-dark .appearance-inverse-r1Y2JQg_.intent-warning-24j5HMi0:focus:after{border-color:rgba(245,124,0,.3)}.appearance-inverse-r1Y2JQg_.intent-danger-1EETHCla{transform:translateY(0)}.appearance-inverse-r1Y2JQg_.intent-danger-1EETHCla,.appearance-inverse-r1Y2JQg_.intent-danger-1EETHCla:link,.appearance-inverse-r1Y2JQg_.intent-danger-1EETHCla:visited{color:#ef5350;background-color:#fff;border-color:#fff}html.theme-dark .appearance-inverse-r1Y2JQg_.intent-danger-1EETHCla,html.theme-dark .appearance-inverse-r1Y2JQg_.intent-danger-1EETHCla:link,html.theme-dark .appearance-inverse-r1Y2JQg_.intent-danger-1EETHCla:visited{color:#e53935}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.appearance-inverse-r1Y2JQg_.intent-danger-1EETHCla:hover:not(:disabled):not([aria-disabled=true]){color:#f44336;border-color:#fff;background-color:#fff}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .appearance-inverse-r1Y2JQg_.intent-danger-1EETHCla:hover:not(:disabled):not([aria-disabled=true]){color:#f44336}}.appearance-inverse-r1Y2JQg_.intent-danger-1EETHCla:active:not(:disabled):not([aria-disabled=true]){color:#e53935;border-color:#fff;background-color:#fff;transform:translateY(1px)}html.theme-dark .appearance-inverse-r1Y2JQg_.intent-danger-1EETHCla:active:not(:disabled):not([aria-disabled=true]){color:#ef5350}.appearance-inverse-r1Y2JQg_.intent-danger-1EETHCla:disabled,.appearance-inverse-r1Y2JQg_.intent-danger-1EETHCla:disabled:link,.appearance-inverse-r1Y2JQg_.intent-danger-1EETHCla:disabled:visited,.appearance-inverse-r1Y2JQg_.intent-danger-1EETHCla[aria-disabled=true],.appearance-inverse-r1Y2JQg_.intent-danger-1EETHCla[aria-disabled=true]:link,.appearance-inverse-r1Y2JQg_.intent-danger-1EETHCla[aria-disabled=true]:visited{color:#b2b5be;background-color:#e0e3eb;border-color:#e0e3eb}html.theme-dark .appearance-inverse-r1Y2JQg_.intent-danger-1EETHCla:disabled,html.theme-dark .appearance-inverse-r1Y2JQg_.intent-danger-1EETHCla:disabled:link,html.theme-dark .appearance-inverse-r1Y2JQg_.intent-danger-1EETHCla:disabled:visited,html.theme-dark .appearance-inverse-r1Y2JQg_.intent-danger-1EETHCla[aria-disabled=true],html.theme-dark .appearance-inverse-r1Y2JQg_.intent-danger-1EETHCla[aria-disabled=true]:link,html.theme-dark .appearance-inverse-r1Y2JQg_.intent-danger-1EETHCla[aria-disabled=true]:visited{border-color:#363a45;background-color:#363a45;color:#5d606b}.appearance-inverse-r1Y2JQg_.intent-danger-1EETHCla:focus,html.theme-dark .appearance-inverse-r1Y2JQg_.intent-danger-1EETHCla:focus{color:#f44336}.appearance-inverse-r1Y2JQg_.intent-danger-1EETHCla:after{border-color:rgba(239,83,80,0)}html.theme-dark .appearance-inverse-r1Y2JQg_.intent-danger-1EETHCla:after{border-color:rgba(229,57,53,0)}.appearance-inverse-r1Y2JQg_.intent-danger-1EETHCla:focus:after{border-color:rgba(239,83,80,.3)}html.theme-dark .appearance-inverse-r1Y2JQg_.intent-danger-1EETHCla:focus:after{border-color:rgba(229,57,53,.3)}.size-s-3mait84m{height:26px;padding:0 11px;border-radius:4px}.size-s-3mait84m .content-2PGssb8d{font-size:14px;text-transform:none}.size-s-3mait84m:after{border-radius:8px}.size-m-2G7L7Qat{height:34px;padding:0 23px;border-radius:4px}.size-m-2G7L7Qat .content-2PGssb8d{font-size:16px;text-transform:none}.size-m-2G7L7Qat:after{border-radius:8px}.size-l-2NEs9_xt{height:48px;padding:0 31px;border-radius:4px}.size-l-2NEs9_xt .content-2PGssb8d{font-size:16px;text-transform:none}.size-l-2NEs9_xt:after{border-radius:8px}.size-p-3D4rn3v0{height:56px;padding:0 40px;border-radius:120px}.size-p-3D4rn3v0 .content-2PGssb8d{font-size:24px;text-transform:none}.size-p-3D4rn3v0:after{border-radius:124px}.full-width-1wU8ljjC{width:100%}.with-icon-yumghDr- .content-2PGssb8d{margin-right:3px}.icon-1grlgNdV{display:flex;align-items:center;justify-content:center;width:28px;height:28px;margin-right:4px} \ No newline at end of file diff --git a/public/charting_library/bundles/13.102513570821ffa4cacc.rtl.css b/public/charting_library/bundles/13.102513570821ffa4cacc.rtl.css new file mode 100644 index 00000000..e82c35ac --- /dev/null +++ b/public/charting_library/bundles/13.102513570821ffa4cacc.rtl.css @@ -0,0 +1 @@ +.button-1iktpaT1{display:inline-flex;position:relative;align-items:center;justify-content:center;box-sizing:border-box;border-width:1px;border-style:solid;outline:0;max-width:100%;transition-duration:.35s;transition-timing-function:ease;transition-property:border-color,background-color,color}.button-1iktpaT1 .content-2PGssb8d{text-align:right;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.button-1iktpaT1:after{content:"";position:absolute;box-sizing:border-box;top:-5px;right:-5px;width:calc(100% + 10px);height:calc(100% + 10px);border-width:2px;border-style:solid;transform:scale(.81);opacity:0;transition-duration:.35s;transition-timing-function:ease;transition-property:opacity,transform,border-color;will-change:border-color}.button-1iktpaT1.noOutline-d9Yp4qvi:after{content:none}.button-1iktpaT1:focus:after{transform:scale(1);opacity:1}.appearance-default-dMjF_2Hu.intent-primary-1-IOYcbg{transform:translateY(0)}.appearance-default-dMjF_2Hu.intent-primary-1-IOYcbg,.appearance-default-dMjF_2Hu.intent-primary-1-IOYcbg:link,.appearance-default-dMjF_2Hu.intent-primary-1-IOYcbg:visited{color:#fff;background-color:#2196f3;border-color:#2196f3}html.theme-dark .appearance-default-dMjF_2Hu.intent-primary-1-IOYcbg,html.theme-dark .appearance-default-dMjF_2Hu.intent-primary-1-IOYcbg:link,html.theme-dark .appearance-default-dMjF_2Hu.intent-primary-1-IOYcbg:visited{border-color:#1976d2;background-color:#1976d2;color:#fff}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.appearance-default-dMjF_2Hu.intent-primary-1-IOYcbg:hover:not(:disabled):not([aria-disabled=true]){color:#fff;border-color:#1e88e5;background-color:#1e88e5}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .appearance-default-dMjF_2Hu.intent-primary-1-IOYcbg:hover:not(:disabled):not([aria-disabled=true]){background-color:#1e88e5;border-color:#1e88e5;color:#fff}}.appearance-default-dMjF_2Hu.intent-primary-1-IOYcbg:active:not(:disabled):not([aria-disabled=true]){color:#fff;border-color:#1976d2;background-color:#1976d2;transform:translateY(1px)}html.theme-dark .appearance-default-dMjF_2Hu.intent-primary-1-IOYcbg:active:not(:disabled):not([aria-disabled=true]){background-color:#2196f3;border-color:#2196f3;color:#fff}.appearance-default-dMjF_2Hu.intent-primary-1-IOYcbg:disabled,.appearance-default-dMjF_2Hu.intent-primary-1-IOYcbg:disabled:link,.appearance-default-dMjF_2Hu.intent-primary-1-IOYcbg:disabled:visited,.appearance-default-dMjF_2Hu.intent-primary-1-IOYcbg[aria-disabled=true],.appearance-default-dMjF_2Hu.intent-primary-1-IOYcbg[aria-disabled=true]:link,.appearance-default-dMjF_2Hu.intent-primary-1-IOYcbg[aria-disabled=true]:visited{color:#b2b5be;background-color:#e0e3eb;border-color:#e0e3eb}html.theme-dark .appearance-default-dMjF_2Hu.intent-primary-1-IOYcbg:disabled,html.theme-dark .appearance-default-dMjF_2Hu.intent-primary-1-IOYcbg:disabled:link,html.theme-dark .appearance-default-dMjF_2Hu.intent-primary-1-IOYcbg:disabled:visited,html.theme-dark .appearance-default-dMjF_2Hu.intent-primary-1-IOYcbg[aria-disabled=true],html.theme-dark .appearance-default-dMjF_2Hu.intent-primary-1-IOYcbg[aria-disabled=true]:link,html.theme-dark .appearance-default-dMjF_2Hu.intent-primary-1-IOYcbg[aria-disabled=true]:visited{border-color:#363a45;background-color:#363a45;color:#5d606b}.appearance-default-dMjF_2Hu.intent-primary-1-IOYcbg:focus{background-color:#1e88e5;border-color:#1e88e5}html.theme-dark .appearance-default-dMjF_2Hu.intent-primary-1-IOYcbg:focus{border-color:#1e88e5;background-color:#1e88e5}.appearance-default-dMjF_2Hu.intent-primary-1-IOYcbg:after{border-color:rgba(33,150,243,0)}html.theme-dark .appearance-default-dMjF_2Hu.intent-primary-1-IOYcbg:after{border-color:rgba(25,118,210,0)}.appearance-default-dMjF_2Hu.intent-primary-1-IOYcbg:focus:after{border-color:rgba(33,150,243,.3)}html.theme-dark .appearance-default-dMjF_2Hu.intent-primary-1-IOYcbg:focus:after{border-color:rgba(25,118,210,.3)}.appearance-default-dMjF_2Hu.intent-success-25a4XZXM{transform:translateY(0)}.appearance-default-dMjF_2Hu.intent-success-25a4XZXM,.appearance-default-dMjF_2Hu.intent-success-25a4XZXM:link,.appearance-default-dMjF_2Hu.intent-success-25a4XZXM:visited{color:#fff;background-color:#26a69a;border-color:#26a69a}html.theme-dark .appearance-default-dMjF_2Hu.intent-success-25a4XZXM,html.theme-dark .appearance-default-dMjF_2Hu.intent-success-25a4XZXM:link,html.theme-dark .appearance-default-dMjF_2Hu.intent-success-25a4XZXM:visited{border-color:#00897b;background-color:#00897b;color:#fff}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.appearance-default-dMjF_2Hu.intent-success-25a4XZXM:hover:not(:disabled):not([aria-disabled=true]){color:#fff;border-color:#009688;background-color:#009688}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .appearance-default-dMjF_2Hu.intent-success-25a4XZXM:hover:not(:disabled):not([aria-disabled=true]){background-color:#009688;border-color:#009688;color:#fff}}.appearance-default-dMjF_2Hu.intent-success-25a4XZXM:active:not(:disabled):not([aria-disabled=true]){color:#fff;border-color:#00897b;background-color:#00897b;transform:translateY(1px)}html.theme-dark .appearance-default-dMjF_2Hu.intent-success-25a4XZXM:active:not(:disabled):not([aria-disabled=true]){background-color:#26a69a;border-color:#26a69a;color:#fff}.appearance-default-dMjF_2Hu.intent-success-25a4XZXM:disabled,.appearance-default-dMjF_2Hu.intent-success-25a4XZXM:disabled:link,.appearance-default-dMjF_2Hu.intent-success-25a4XZXM:disabled:visited,.appearance-default-dMjF_2Hu.intent-success-25a4XZXM[aria-disabled=true],.appearance-default-dMjF_2Hu.intent-success-25a4XZXM[aria-disabled=true]:link,.appearance-default-dMjF_2Hu.intent-success-25a4XZXM[aria-disabled=true]:visited{color:#b2b5be;background-color:#e0e3eb;border-color:#e0e3eb}html.theme-dark .appearance-default-dMjF_2Hu.intent-success-25a4XZXM:disabled,html.theme-dark .appearance-default-dMjF_2Hu.intent-success-25a4XZXM:disabled:link,html.theme-dark .appearance-default-dMjF_2Hu.intent-success-25a4XZXM:disabled:visited,html.theme-dark .appearance-default-dMjF_2Hu.intent-success-25a4XZXM[aria-disabled=true],html.theme-dark .appearance-default-dMjF_2Hu.intent-success-25a4XZXM[aria-disabled=true]:link,html.theme-dark .appearance-default-dMjF_2Hu.intent-success-25a4XZXM[aria-disabled=true]:visited{border-color:#363a45;background-color:#363a45;color:#5d606b}.appearance-default-dMjF_2Hu.intent-success-25a4XZXM:focus{background-color:#009688;border-color:#009688}html.theme-dark .appearance-default-dMjF_2Hu.intent-success-25a4XZXM:focus{border-color:#009688;background-color:#009688}.appearance-default-dMjF_2Hu.intent-success-25a4XZXM:after{border-color:rgba(38,166,154,0)}html.theme-dark .appearance-default-dMjF_2Hu.intent-success-25a4XZXM:after{border-color:rgba(0,137,123,0)}.appearance-default-dMjF_2Hu.intent-success-25a4XZXM:focus:after{border-color:rgba(38,166,154,.3)}html.theme-dark .appearance-default-dMjF_2Hu.intent-success-25a4XZXM:focus:after{border-color:rgba(0,137,123,.3)}.appearance-default-dMjF_2Hu.intent-default-2ZbSqQDs{transform:translateY(0)}.appearance-default-dMjF_2Hu.intent-default-2ZbSqQDs,.appearance-default-dMjF_2Hu.intent-default-2ZbSqQDs:link,.appearance-default-dMjF_2Hu.intent-default-2ZbSqQDs:visited{color:#fff;background-color:#9598a1;border-color:#9598a1}html.theme-dark .appearance-default-dMjF_2Hu.intent-default-2ZbSqQDs,html.theme-dark .appearance-default-dMjF_2Hu.intent-default-2ZbSqQDs:link,html.theme-dark .appearance-default-dMjF_2Hu.intent-default-2ZbSqQDs:visited{border-color:#5d606b;background-color:#5d606b;color:#fff}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.appearance-default-dMjF_2Hu.intent-default-2ZbSqQDs:hover:not(:disabled):not([aria-disabled=true]){color:#fff;border-color:#787b86;background-color:#787b86}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .appearance-default-dMjF_2Hu.intent-default-2ZbSqQDs:hover:not(:disabled):not([aria-disabled=true]){background-color:#787b86;border-color:#787b86;color:#fff}}.appearance-default-dMjF_2Hu.intent-default-2ZbSqQDs:active:not(:disabled):not([aria-disabled=true]){color:#fff;border-color:#5d606b;background-color:#5d606b;transform:translateY(1px)}html.theme-dark .appearance-default-dMjF_2Hu.intent-default-2ZbSqQDs:active:not(:disabled):not([aria-disabled=true]){background-color:#9598a1;border-color:#9598a1;color:#fff}.appearance-default-dMjF_2Hu.intent-default-2ZbSqQDs:disabled,.appearance-default-dMjF_2Hu.intent-default-2ZbSqQDs:disabled:link,.appearance-default-dMjF_2Hu.intent-default-2ZbSqQDs:disabled:visited,.appearance-default-dMjF_2Hu.intent-default-2ZbSqQDs[aria-disabled=true],.appearance-default-dMjF_2Hu.intent-default-2ZbSqQDs[aria-disabled=true]:link,.appearance-default-dMjF_2Hu.intent-default-2ZbSqQDs[aria-disabled=true]:visited{color:#b2b5be;background-color:#e0e3eb;border-color:#e0e3eb}html.theme-dark .appearance-default-dMjF_2Hu.intent-default-2ZbSqQDs:disabled,html.theme-dark .appearance-default-dMjF_2Hu.intent-default-2ZbSqQDs:disabled:link,html.theme-dark .appearance-default-dMjF_2Hu.intent-default-2ZbSqQDs:disabled:visited,html.theme-dark .appearance-default-dMjF_2Hu.intent-default-2ZbSqQDs[aria-disabled=true],html.theme-dark .appearance-default-dMjF_2Hu.intent-default-2ZbSqQDs[aria-disabled=true]:link,html.theme-dark .appearance-default-dMjF_2Hu.intent-default-2ZbSqQDs[aria-disabled=true]:visited{border-color:#363a45;background-color:#363a45;color:#5d606b}.appearance-default-dMjF_2Hu.intent-default-2ZbSqQDs:focus{background-color:#787b86;border-color:#787b86}html.theme-dark .appearance-default-dMjF_2Hu.intent-default-2ZbSqQDs:focus{border-color:#787b86;background-color:#787b86}.appearance-default-dMjF_2Hu.intent-default-2ZbSqQDs:after{border-color:hsla(225,6%,61%,0)}html.theme-dark .appearance-default-dMjF_2Hu.intent-default-2ZbSqQDs:after{border-color:rgba(93,96,107,0)}.appearance-default-dMjF_2Hu.intent-default-2ZbSqQDs:focus:after{border-color:hsla(225,6%,61%,.3)}html.theme-dark .appearance-default-dMjF_2Hu.intent-default-2ZbSqQDs:focus:after{border-color:rgba(93,96,107,.3)}.appearance-default-dMjF_2Hu.intent-warning-24j5HMi0{transform:translateY(0)}.appearance-default-dMjF_2Hu.intent-warning-24j5HMi0,.appearance-default-dMjF_2Hu.intent-warning-24j5HMi0:link,.appearance-default-dMjF_2Hu.intent-warning-24j5HMi0:visited{color:#fff;background-color:#ff9800;border-color:#ff9800}html.theme-dark .appearance-default-dMjF_2Hu.intent-warning-24j5HMi0,html.theme-dark .appearance-default-dMjF_2Hu.intent-warning-24j5HMi0:link,html.theme-dark .appearance-default-dMjF_2Hu.intent-warning-24j5HMi0:visited{border-color:#f57c00;background-color:#f57c00;color:#fff}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.appearance-default-dMjF_2Hu.intent-warning-24j5HMi0:hover:not(:disabled):not([aria-disabled=true]){color:#fff;border-color:#fb8c00;background-color:#fb8c00}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .appearance-default-dMjF_2Hu.intent-warning-24j5HMi0:hover:not(:disabled):not([aria-disabled=true]){background-color:#fb8c00;border-color:#fb8c00;color:#fff}}.appearance-default-dMjF_2Hu.intent-warning-24j5HMi0:active:not(:disabled):not([aria-disabled=true]){color:#fff;border-color:#f57c00;background-color:#f57c00;transform:translateY(1px)}html.theme-dark .appearance-default-dMjF_2Hu.intent-warning-24j5HMi0:active:not(:disabled):not([aria-disabled=true]){background-color:#ff9800;border-color:#ff9800;color:#fff}.appearance-default-dMjF_2Hu.intent-warning-24j5HMi0:disabled,.appearance-default-dMjF_2Hu.intent-warning-24j5HMi0:disabled:link,.appearance-default-dMjF_2Hu.intent-warning-24j5HMi0:disabled:visited,.appearance-default-dMjF_2Hu.intent-warning-24j5HMi0[aria-disabled=true],.appearance-default-dMjF_2Hu.intent-warning-24j5HMi0[aria-disabled=true]:link,.appearance-default-dMjF_2Hu.intent-warning-24j5HMi0[aria-disabled=true]:visited{color:#b2b5be;background-color:#e0e3eb;border-color:#e0e3eb}html.theme-dark .appearance-default-dMjF_2Hu.intent-warning-24j5HMi0:disabled,html.theme-dark .appearance-default-dMjF_2Hu.intent-warning-24j5HMi0:disabled:link,html.theme-dark .appearance-default-dMjF_2Hu.intent-warning-24j5HMi0:disabled:visited,html.theme-dark .appearance-default-dMjF_2Hu.intent-warning-24j5HMi0[aria-disabled=true],html.theme-dark .appearance-default-dMjF_2Hu.intent-warning-24j5HMi0[aria-disabled=true]:link,html.theme-dark .appearance-default-dMjF_2Hu.intent-warning-24j5HMi0[aria-disabled=true]:visited{border-color:#363a45;background-color:#363a45;color:#5d606b}.appearance-default-dMjF_2Hu.intent-warning-24j5HMi0:focus{background-color:#fb8c00;border-color:#fb8c00}html.theme-dark .appearance-default-dMjF_2Hu.intent-warning-24j5HMi0:focus{border-color:#fb8c00;background-color:#fb8c00}.appearance-default-dMjF_2Hu.intent-warning-24j5HMi0:after{border-color:rgba(255,152,0,0)}html.theme-dark .appearance-default-dMjF_2Hu.intent-warning-24j5HMi0:after{border-color:rgba(245,124,0,0)}.appearance-default-dMjF_2Hu.intent-warning-24j5HMi0:focus:after{border-color:rgba(255,152,0,.3)}html.theme-dark .appearance-default-dMjF_2Hu.intent-warning-24j5HMi0:focus:after{border-color:rgba(245,124,0,.3)}.appearance-default-dMjF_2Hu.intent-danger-1EETHCla{transform:translateY(0)}.appearance-default-dMjF_2Hu.intent-danger-1EETHCla,.appearance-default-dMjF_2Hu.intent-danger-1EETHCla:link,.appearance-default-dMjF_2Hu.intent-danger-1EETHCla:visited{color:#fff;background-color:#ef5350;border-color:#ef5350}html.theme-dark .appearance-default-dMjF_2Hu.intent-danger-1EETHCla,html.theme-dark .appearance-default-dMjF_2Hu.intent-danger-1EETHCla:link,html.theme-dark .appearance-default-dMjF_2Hu.intent-danger-1EETHCla:visited{border-color:#e53935;background-color:#e53935;color:#fff}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.appearance-default-dMjF_2Hu.intent-danger-1EETHCla:hover:not(:disabled):not([aria-disabled=true]){color:#fff;border-color:#f44336;background-color:#f44336}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .appearance-default-dMjF_2Hu.intent-danger-1EETHCla:hover:not(:disabled):not([aria-disabled=true]){background-color:#f44336;border-color:#f44336;color:#fff}}.appearance-default-dMjF_2Hu.intent-danger-1EETHCla:active:not(:disabled):not([aria-disabled=true]){color:#fff;border-color:#e53935;background-color:#e53935;transform:translateY(1px)}html.theme-dark .appearance-default-dMjF_2Hu.intent-danger-1EETHCla:active:not(:disabled):not([aria-disabled=true]){background-color:#ef5350;border-color:#ef5350;color:#fff}.appearance-default-dMjF_2Hu.intent-danger-1EETHCla:disabled,.appearance-default-dMjF_2Hu.intent-danger-1EETHCla:disabled:link,.appearance-default-dMjF_2Hu.intent-danger-1EETHCla:disabled:visited,.appearance-default-dMjF_2Hu.intent-danger-1EETHCla[aria-disabled=true],.appearance-default-dMjF_2Hu.intent-danger-1EETHCla[aria-disabled=true]:link,.appearance-default-dMjF_2Hu.intent-danger-1EETHCla[aria-disabled=true]:visited{color:#b2b5be;background-color:#e0e3eb;border-color:#e0e3eb}html.theme-dark .appearance-default-dMjF_2Hu.intent-danger-1EETHCla:disabled,html.theme-dark .appearance-default-dMjF_2Hu.intent-danger-1EETHCla:disabled:link,html.theme-dark .appearance-default-dMjF_2Hu.intent-danger-1EETHCla:disabled:visited,html.theme-dark .appearance-default-dMjF_2Hu.intent-danger-1EETHCla[aria-disabled=true],html.theme-dark .appearance-default-dMjF_2Hu.intent-danger-1EETHCla[aria-disabled=true]:link,html.theme-dark .appearance-default-dMjF_2Hu.intent-danger-1EETHCla[aria-disabled=true]:visited{border-color:#363a45;background-color:#363a45;color:#5d606b}.appearance-default-dMjF_2Hu.intent-danger-1EETHCla:focus{background-color:#f44336;border-color:#f44336}html.theme-dark .appearance-default-dMjF_2Hu.intent-danger-1EETHCla:focus{border-color:#f44336;background-color:#f44336}.appearance-default-dMjF_2Hu.intent-danger-1EETHCla:after{border-color:rgba(239,83,80,0)}html.theme-dark .appearance-default-dMjF_2Hu.intent-danger-1EETHCla:after{border-color:rgba(229,57,53,0)}.appearance-default-dMjF_2Hu.intent-danger-1EETHCla:focus:after{border-color:rgba(239,83,80,.3)}html.theme-dark .appearance-default-dMjF_2Hu.intent-danger-1EETHCla:focus:after{border-color:rgba(229,57,53,.3)}.appearance-stroke-12lxiUSM.intent-primary-1-IOYcbg{transform:translateY(0)}.appearance-stroke-12lxiUSM.intent-primary-1-IOYcbg,.appearance-stroke-12lxiUSM.intent-primary-1-IOYcbg:link,.appearance-stroke-12lxiUSM.intent-primary-1-IOYcbg:visited{color:#2196f3;background-color:transparent;border-color:#2196f3}html.theme-dark .appearance-stroke-12lxiUSM.intent-primary-1-IOYcbg,html.theme-dark .appearance-stroke-12lxiUSM.intent-primary-1-IOYcbg:link,html.theme-dark .appearance-stroke-12lxiUSM.intent-primary-1-IOYcbg:visited{border-color:#1976d2;background-color:transparent;color:#1976d2}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.appearance-stroke-12lxiUSM.intent-primary-1-IOYcbg:hover:not(:disabled):not([aria-disabled=true]){color:#fff;border-color:#1e88e5;background-color:#1e88e5}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .appearance-stroke-12lxiUSM.intent-primary-1-IOYcbg:hover:not(:disabled):not([aria-disabled=true]){background-color:#1e88e5;border-color:#1e88e5;color:#fff}}.appearance-stroke-12lxiUSM.intent-primary-1-IOYcbg:active:not(:disabled):not([aria-disabled=true]){color:#fff;border-color:#1976d2;background-color:#1976d2;transform:translateY(1px)}html.theme-dark .appearance-stroke-12lxiUSM.intent-primary-1-IOYcbg:active:not(:disabled):not([aria-disabled=true]){background-color:#2196f3;border-color:#2196f3;color:#fff}.appearance-stroke-12lxiUSM.intent-primary-1-IOYcbg:disabled,.appearance-stroke-12lxiUSM.intent-primary-1-IOYcbg:disabled:link,.appearance-stroke-12lxiUSM.intent-primary-1-IOYcbg:disabled:visited,.appearance-stroke-12lxiUSM.intent-primary-1-IOYcbg[aria-disabled=true],.appearance-stroke-12lxiUSM.intent-primary-1-IOYcbg[aria-disabled=true]:link,.appearance-stroke-12lxiUSM.intent-primary-1-IOYcbg[aria-disabled=true]:visited{color:#b2b5be;background-color:#e0e3eb;border-color:#e0e3eb}html.theme-dark .appearance-stroke-12lxiUSM.intent-primary-1-IOYcbg:disabled,html.theme-dark .appearance-stroke-12lxiUSM.intent-primary-1-IOYcbg:disabled:link,html.theme-dark .appearance-stroke-12lxiUSM.intent-primary-1-IOYcbg:disabled:visited,html.theme-dark .appearance-stroke-12lxiUSM.intent-primary-1-IOYcbg[aria-disabled=true],html.theme-dark .appearance-stroke-12lxiUSM.intent-primary-1-IOYcbg[aria-disabled=true]:link,html.theme-dark .appearance-stroke-12lxiUSM.intent-primary-1-IOYcbg[aria-disabled=true]:visited{border-color:#363a45;background-color:#363a45;color:#5d606b}.appearance-stroke-12lxiUSM.intent-primary-1-IOYcbg:focus{color:#fff;background-color:#1e88e5;border-color:#1e88e5}html.theme-dark .appearance-stroke-12lxiUSM.intent-primary-1-IOYcbg:focus{border-color:#1e88e5;background-color:#1e88e5;color:#fff}.appearance-stroke-12lxiUSM.intent-primary-1-IOYcbg:after{border-color:rgba(33,150,243,0)}html.theme-dark .appearance-stroke-12lxiUSM.intent-primary-1-IOYcbg:after{border-color:rgba(25,118,210,0)}.appearance-stroke-12lxiUSM.intent-primary-1-IOYcbg:focus:after{border-color:rgba(33,150,243,.3)}html.theme-dark .appearance-stroke-12lxiUSM.intent-primary-1-IOYcbg:focus:after{border-color:rgba(25,118,210,.3)}.appearance-stroke-12lxiUSM.intent-success-25a4XZXM{transform:translateY(0)}.appearance-stroke-12lxiUSM.intent-success-25a4XZXM,.appearance-stroke-12lxiUSM.intent-success-25a4XZXM:link,.appearance-stroke-12lxiUSM.intent-success-25a4XZXM:visited{color:#26a69a;background-color:transparent;border-color:#26a69a}html.theme-dark .appearance-stroke-12lxiUSM.intent-success-25a4XZXM,html.theme-dark .appearance-stroke-12lxiUSM.intent-success-25a4XZXM:link,html.theme-dark .appearance-stroke-12lxiUSM.intent-success-25a4XZXM:visited{border-color:#00897b;background-color:transparent;color:#00897b}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.appearance-stroke-12lxiUSM.intent-success-25a4XZXM:hover:not(:disabled):not([aria-disabled=true]){color:#fff;border-color:#009688;background-color:#009688}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .appearance-stroke-12lxiUSM.intent-success-25a4XZXM:hover:not(:disabled):not([aria-disabled=true]){background-color:#009688;border-color:#009688;color:#fff}}.appearance-stroke-12lxiUSM.intent-success-25a4XZXM:active:not(:disabled):not([aria-disabled=true]){color:#fff;border-color:#00897b;background-color:#00897b;transform:translateY(1px)}html.theme-dark .appearance-stroke-12lxiUSM.intent-success-25a4XZXM:active:not(:disabled):not([aria-disabled=true]){background-color:#26a69a;border-color:#26a69a;color:#fff}.appearance-stroke-12lxiUSM.intent-success-25a4XZXM:disabled,.appearance-stroke-12lxiUSM.intent-success-25a4XZXM:disabled:link,.appearance-stroke-12lxiUSM.intent-success-25a4XZXM:disabled:visited,.appearance-stroke-12lxiUSM.intent-success-25a4XZXM[aria-disabled=true],.appearance-stroke-12lxiUSM.intent-success-25a4XZXM[aria-disabled=true]:link,.appearance-stroke-12lxiUSM.intent-success-25a4XZXM[aria-disabled=true]:visited{color:#b2b5be;background-color:#e0e3eb;border-color:#e0e3eb}html.theme-dark .appearance-stroke-12lxiUSM.intent-success-25a4XZXM:disabled,html.theme-dark .appearance-stroke-12lxiUSM.intent-success-25a4XZXM:disabled:link,html.theme-dark .appearance-stroke-12lxiUSM.intent-success-25a4XZXM:disabled:visited,html.theme-dark .appearance-stroke-12lxiUSM.intent-success-25a4XZXM[aria-disabled=true],html.theme-dark .appearance-stroke-12lxiUSM.intent-success-25a4XZXM[aria-disabled=true]:link,html.theme-dark .appearance-stroke-12lxiUSM.intent-success-25a4XZXM[aria-disabled=true]:visited{border-color:#363a45;background-color:#363a45;color:#5d606b}.appearance-stroke-12lxiUSM.intent-success-25a4XZXM:focus{color:#fff;background-color:#009688;border-color:#009688}html.theme-dark .appearance-stroke-12lxiUSM.intent-success-25a4XZXM:focus{border-color:#009688;background-color:#009688;color:#fff}.appearance-stroke-12lxiUSM.intent-success-25a4XZXM:after{border-color:rgba(38,166,154,0)}html.theme-dark .appearance-stroke-12lxiUSM.intent-success-25a4XZXM:after{border-color:rgba(0,137,123,0)}.appearance-stroke-12lxiUSM.intent-success-25a4XZXM:focus:after{border-color:rgba(38,166,154,.3)}html.theme-dark .appearance-stroke-12lxiUSM.intent-success-25a4XZXM:focus:after{border-color:rgba(0,137,123,.3)}.appearance-stroke-12lxiUSM.intent-default-2ZbSqQDs{transform:translateY(0)}.appearance-stroke-12lxiUSM.intent-default-2ZbSqQDs,.appearance-stroke-12lxiUSM.intent-default-2ZbSqQDs:link,.appearance-stroke-12lxiUSM.intent-default-2ZbSqQDs:visited{color:#131722;background-color:transparent;border-color:#9598a1}html.theme-dark .appearance-stroke-12lxiUSM.intent-default-2ZbSqQDs,html.theme-dark .appearance-stroke-12lxiUSM.intent-default-2ZbSqQDs:link,html.theme-dark .appearance-stroke-12lxiUSM.intent-default-2ZbSqQDs:visited{border-color:#5d606b;background-color:transparent;color:#d1d4dc}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.appearance-stroke-12lxiUSM.intent-default-2ZbSqQDs:hover:not(:disabled):not([aria-disabled=true]){color:#fff;border-color:#787b86;background-color:#787b86}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .appearance-stroke-12lxiUSM.intent-default-2ZbSqQDs:hover:not(:disabled):not([aria-disabled=true]){background-color:#787b86;border-color:#787b86;color:#fff}}.appearance-stroke-12lxiUSM.intent-default-2ZbSqQDs:active:not(:disabled):not([aria-disabled=true]){color:#fff;border-color:#5d606b;background-color:#5d606b;transform:translateY(1px)}html.theme-dark .appearance-stroke-12lxiUSM.intent-default-2ZbSqQDs:active:not(:disabled):not([aria-disabled=true]){background-color:#9598a1;border-color:#9598a1;color:#fff}.appearance-stroke-12lxiUSM.intent-default-2ZbSqQDs:disabled,.appearance-stroke-12lxiUSM.intent-default-2ZbSqQDs:disabled:link,.appearance-stroke-12lxiUSM.intent-default-2ZbSqQDs:disabled:visited,.appearance-stroke-12lxiUSM.intent-default-2ZbSqQDs[aria-disabled=true],.appearance-stroke-12lxiUSM.intent-default-2ZbSqQDs[aria-disabled=true]:link,.appearance-stroke-12lxiUSM.intent-default-2ZbSqQDs[aria-disabled=true]:visited{color:#b2b5be;background-color:#e0e3eb;border-color:#e0e3eb}html.theme-dark .appearance-stroke-12lxiUSM.intent-default-2ZbSqQDs:disabled,html.theme-dark .appearance-stroke-12lxiUSM.intent-default-2ZbSqQDs:disabled:link,html.theme-dark .appearance-stroke-12lxiUSM.intent-default-2ZbSqQDs:disabled:visited,html.theme-dark .appearance-stroke-12lxiUSM.intent-default-2ZbSqQDs[aria-disabled=true],html.theme-dark .appearance-stroke-12lxiUSM.intent-default-2ZbSqQDs[aria-disabled=true]:link,html.theme-dark .appearance-stroke-12lxiUSM.intent-default-2ZbSqQDs[aria-disabled=true]:visited{border-color:#363a45;background-color:#363a45;color:#5d606b}.appearance-stroke-12lxiUSM.intent-default-2ZbSqQDs:focus{color:#fff;background-color:#787b86;border-color:#787b86}html.theme-dark .appearance-stroke-12lxiUSM.intent-default-2ZbSqQDs:focus{border-color:#787b86;background-color:#787b86;color:#fff}.appearance-stroke-12lxiUSM.intent-default-2ZbSqQDs:after{border-color:hsla(225,6%,61%,0)}html.theme-dark .appearance-stroke-12lxiUSM.intent-default-2ZbSqQDs:after{border-color:rgba(93,96,107,0)}.appearance-stroke-12lxiUSM.intent-default-2ZbSqQDs:focus:after{border-color:hsla(225,6%,61%,.3)}html.theme-dark .appearance-stroke-12lxiUSM.intent-default-2ZbSqQDs:focus:after{border-color:rgba(93,96,107,.3)}.appearance-stroke-12lxiUSM.intent-warning-24j5HMi0{transform:translateY(0)}.appearance-stroke-12lxiUSM.intent-warning-24j5HMi0,.appearance-stroke-12lxiUSM.intent-warning-24j5HMi0:link,.appearance-stroke-12lxiUSM.intent-warning-24j5HMi0:visited{color:#ff9800;background-color:transparent;border-color:#ff9800}html.theme-dark .appearance-stroke-12lxiUSM.intent-warning-24j5HMi0,html.theme-dark .appearance-stroke-12lxiUSM.intent-warning-24j5HMi0:link,html.theme-dark .appearance-stroke-12lxiUSM.intent-warning-24j5HMi0:visited{border-color:#f57c00;background-color:transparent;color:#f57c00}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.appearance-stroke-12lxiUSM.intent-warning-24j5HMi0:hover:not(:disabled):not([aria-disabled=true]){color:#fff;border-color:#fb8c00;background-color:#fb8c00}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .appearance-stroke-12lxiUSM.intent-warning-24j5HMi0:hover:not(:disabled):not([aria-disabled=true]){background-color:#fb8c00;border-color:#fb8c00;color:#fff}}.appearance-stroke-12lxiUSM.intent-warning-24j5HMi0:active:not(:disabled):not([aria-disabled=true]){color:#fff;border-color:#f57c00;background-color:#f57c00;transform:translateY(1px)}html.theme-dark .appearance-stroke-12lxiUSM.intent-warning-24j5HMi0:active:not(:disabled):not([aria-disabled=true]){background-color:#ff9800;border-color:#ff9800;color:#fff}.appearance-stroke-12lxiUSM.intent-warning-24j5HMi0:disabled,.appearance-stroke-12lxiUSM.intent-warning-24j5HMi0:disabled:link,.appearance-stroke-12lxiUSM.intent-warning-24j5HMi0:disabled:visited,.appearance-stroke-12lxiUSM.intent-warning-24j5HMi0[aria-disabled=true],.appearance-stroke-12lxiUSM.intent-warning-24j5HMi0[aria-disabled=true]:link,.appearance-stroke-12lxiUSM.intent-warning-24j5HMi0[aria-disabled=true]:visited{color:#b2b5be;background-color:#e0e3eb;border-color:#e0e3eb}html.theme-dark .appearance-stroke-12lxiUSM.intent-warning-24j5HMi0:disabled,html.theme-dark .appearance-stroke-12lxiUSM.intent-warning-24j5HMi0:disabled:link,html.theme-dark .appearance-stroke-12lxiUSM.intent-warning-24j5HMi0:disabled:visited,html.theme-dark .appearance-stroke-12lxiUSM.intent-warning-24j5HMi0[aria-disabled=true],html.theme-dark .appearance-stroke-12lxiUSM.intent-warning-24j5HMi0[aria-disabled=true]:link,html.theme-dark .appearance-stroke-12lxiUSM.intent-warning-24j5HMi0[aria-disabled=true]:visited{border-color:#363a45;background-color:#363a45;color:#5d606b}.appearance-stroke-12lxiUSM.intent-warning-24j5HMi0:focus{color:#fff;background-color:#fb8c00;border-color:#fb8c00}html.theme-dark .appearance-stroke-12lxiUSM.intent-warning-24j5HMi0:focus{border-color:#fb8c00;background-color:#fb8c00;color:#fff}.appearance-stroke-12lxiUSM.intent-warning-24j5HMi0:after{border-color:rgba(255,152,0,0)}html.theme-dark .appearance-stroke-12lxiUSM.intent-warning-24j5HMi0:after{border-color:rgba(245,124,0,0)}.appearance-stroke-12lxiUSM.intent-warning-24j5HMi0:focus:after{border-color:rgba(255,152,0,.3)}html.theme-dark .appearance-stroke-12lxiUSM.intent-warning-24j5HMi0:focus:after{border-color:rgba(245,124,0,.3)}.appearance-stroke-12lxiUSM.intent-danger-1EETHCla{transform:translateY(0)}.appearance-stroke-12lxiUSM.intent-danger-1EETHCla,.appearance-stroke-12lxiUSM.intent-danger-1EETHCla:link,.appearance-stroke-12lxiUSM.intent-danger-1EETHCla:visited{color:#ef5350;background-color:transparent;border-color:#ef5350}html.theme-dark .appearance-stroke-12lxiUSM.intent-danger-1EETHCla,html.theme-dark .appearance-stroke-12lxiUSM.intent-danger-1EETHCla:link,html.theme-dark .appearance-stroke-12lxiUSM.intent-danger-1EETHCla:visited{border-color:#e53935;background-color:transparent;color:#e53935}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.appearance-stroke-12lxiUSM.intent-danger-1EETHCla:hover:not(:disabled):not([aria-disabled=true]){color:#fff;border-color:#f44336;background-color:#f44336}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .appearance-stroke-12lxiUSM.intent-danger-1EETHCla:hover:not(:disabled):not([aria-disabled=true]){background-color:#f44336;border-color:#f44336;color:#fff}}.appearance-stroke-12lxiUSM.intent-danger-1EETHCla:active:not(:disabled):not([aria-disabled=true]){color:#fff;border-color:#e53935;background-color:#e53935;transform:translateY(1px)}html.theme-dark .appearance-stroke-12lxiUSM.intent-danger-1EETHCla:active:not(:disabled):not([aria-disabled=true]){background-color:#ef5350;border-color:#ef5350;color:#fff}.appearance-stroke-12lxiUSM.intent-danger-1EETHCla:disabled,.appearance-stroke-12lxiUSM.intent-danger-1EETHCla:disabled:link,.appearance-stroke-12lxiUSM.intent-danger-1EETHCla:disabled:visited,.appearance-stroke-12lxiUSM.intent-danger-1EETHCla[aria-disabled=true],.appearance-stroke-12lxiUSM.intent-danger-1EETHCla[aria-disabled=true]:link,.appearance-stroke-12lxiUSM.intent-danger-1EETHCla[aria-disabled=true]:visited{color:#b2b5be;background-color:#e0e3eb;border-color:#e0e3eb}html.theme-dark .appearance-stroke-12lxiUSM.intent-danger-1EETHCla:disabled,html.theme-dark .appearance-stroke-12lxiUSM.intent-danger-1EETHCla:disabled:link,html.theme-dark .appearance-stroke-12lxiUSM.intent-danger-1EETHCla:disabled:visited,html.theme-dark .appearance-stroke-12lxiUSM.intent-danger-1EETHCla[aria-disabled=true],html.theme-dark .appearance-stroke-12lxiUSM.intent-danger-1EETHCla[aria-disabled=true]:link,html.theme-dark .appearance-stroke-12lxiUSM.intent-danger-1EETHCla[aria-disabled=true]:visited{border-color:#363a45;background-color:#363a45;color:#5d606b}.appearance-stroke-12lxiUSM.intent-danger-1EETHCla:focus{color:#fff;background-color:#f44336;border-color:#f44336}html.theme-dark .appearance-stroke-12lxiUSM.intent-danger-1EETHCla:focus{border-color:#f44336;background-color:#f44336;color:#fff}.appearance-stroke-12lxiUSM.intent-danger-1EETHCla:after{border-color:rgba(239,83,80,0)}html.theme-dark .appearance-stroke-12lxiUSM.intent-danger-1EETHCla:after{border-color:rgba(229,57,53,0)}.appearance-stroke-12lxiUSM.intent-danger-1EETHCla:focus:after{border-color:rgba(239,83,80,.3)}html.theme-dark .appearance-stroke-12lxiUSM.intent-danger-1EETHCla:focus:after{border-color:rgba(229,57,53,.3)}.appearance-text-DqKJVT3U.intent-primary-1-IOYcbg{transform:translateY(0)}.appearance-text-DqKJVT3U.intent-primary-1-IOYcbg,.appearance-text-DqKJVT3U.intent-primary-1-IOYcbg:link,.appearance-text-DqKJVT3U.intent-primary-1-IOYcbg:visited{color:#2196f3;background-color:transparent;border-color:transparent}html.theme-dark .appearance-text-DqKJVT3U.intent-primary-1-IOYcbg,html.theme-dark .appearance-text-DqKJVT3U.intent-primary-1-IOYcbg:link,html.theme-dark .appearance-text-DqKJVT3U.intent-primary-1-IOYcbg:visited{border-color:transparent;background-color:transparent;color:#1976d2}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.appearance-text-DqKJVT3U.intent-primary-1-IOYcbg:hover:not(:disabled):not([aria-disabled=true]){color:#1e88e5;border-color:#1e88e5;background-color:transparent}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .appearance-text-DqKJVT3U.intent-primary-1-IOYcbg:hover:not(:disabled):not([aria-disabled=true]){background-color:transparent;border-color:#1e88e5;color:#1e88e5}}.appearance-text-DqKJVT3U.intent-primary-1-IOYcbg:active:not(:disabled):not([aria-disabled=true]){color:#fff;border-color:#1976d2;background-color:#1976d2;transform:translateY(1px)}html.theme-dark .appearance-text-DqKJVT3U.intent-primary-1-IOYcbg:active:not(:disabled):not([aria-disabled=true]){background-color:#2196f3;border-color:#2196f3;color:#fff}.appearance-text-DqKJVT3U.intent-primary-1-IOYcbg:disabled,.appearance-text-DqKJVT3U.intent-primary-1-IOYcbg:disabled:link,.appearance-text-DqKJVT3U.intent-primary-1-IOYcbg:disabled:visited,.appearance-text-DqKJVT3U.intent-primary-1-IOYcbg[aria-disabled=true],.appearance-text-DqKJVT3U.intent-primary-1-IOYcbg[aria-disabled=true]:link,.appearance-text-DqKJVT3U.intent-primary-1-IOYcbg[aria-disabled=true]:visited{color:#b2b5be;background-color:#e0e3eb;border-color:#e0e3eb}html.theme-dark .appearance-text-DqKJVT3U.intent-primary-1-IOYcbg:disabled,html.theme-dark .appearance-text-DqKJVT3U.intent-primary-1-IOYcbg:disabled:link,html.theme-dark .appearance-text-DqKJVT3U.intent-primary-1-IOYcbg:disabled:visited,html.theme-dark .appearance-text-DqKJVT3U.intent-primary-1-IOYcbg[aria-disabled=true],html.theme-dark .appearance-text-DqKJVT3U.intent-primary-1-IOYcbg[aria-disabled=true]:link,html.theme-dark .appearance-text-DqKJVT3U.intent-primary-1-IOYcbg[aria-disabled=true]:visited{border-color:#363a45;background-color:#363a45;color:#5d606b}.appearance-text-DqKJVT3U.intent-primary-1-IOYcbg:focus,html.theme-dark .appearance-text-DqKJVT3U.intent-primary-1-IOYcbg:focus{border-color:#1e88e5}.appearance-text-DqKJVT3U.intent-primary-1-IOYcbg:after{border-color:rgba(33,150,243,0)}html.theme-dark .appearance-text-DqKJVT3U.intent-primary-1-IOYcbg:after{border-color:rgba(25,118,210,0)}.appearance-text-DqKJVT3U.intent-primary-1-IOYcbg:focus:after{border-color:rgba(33,150,243,.3)}html.theme-dark .appearance-text-DqKJVT3U.intent-primary-1-IOYcbg:focus:after{border-color:rgba(25,118,210,.3)}.appearance-text-DqKJVT3U.intent-success-25a4XZXM{transform:translateY(0)}.appearance-text-DqKJVT3U.intent-success-25a4XZXM,.appearance-text-DqKJVT3U.intent-success-25a4XZXM:link,.appearance-text-DqKJVT3U.intent-success-25a4XZXM:visited{color:#26a69a;background-color:transparent;border-color:transparent}html.theme-dark .appearance-text-DqKJVT3U.intent-success-25a4XZXM,html.theme-dark .appearance-text-DqKJVT3U.intent-success-25a4XZXM:link,html.theme-dark .appearance-text-DqKJVT3U.intent-success-25a4XZXM:visited{border-color:transparent;background-color:transparent;color:#00897b}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.appearance-text-DqKJVT3U.intent-success-25a4XZXM:hover:not(:disabled):not([aria-disabled=true]){color:#009688;border-color:#009688;background-color:transparent}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .appearance-text-DqKJVT3U.intent-success-25a4XZXM:hover:not(:disabled):not([aria-disabled=true]){background-color:transparent;border-color:#009688;color:#009688}}.appearance-text-DqKJVT3U.intent-success-25a4XZXM:active:not(:disabled):not([aria-disabled=true]){color:#fff;border-color:#00897b;background-color:#00897b;transform:translateY(1px)}html.theme-dark .appearance-text-DqKJVT3U.intent-success-25a4XZXM:active:not(:disabled):not([aria-disabled=true]){background-color:#26a69a;border-color:#26a69a;color:#fff}.appearance-text-DqKJVT3U.intent-success-25a4XZXM:disabled,.appearance-text-DqKJVT3U.intent-success-25a4XZXM:disabled:link,.appearance-text-DqKJVT3U.intent-success-25a4XZXM:disabled:visited,.appearance-text-DqKJVT3U.intent-success-25a4XZXM[aria-disabled=true],.appearance-text-DqKJVT3U.intent-success-25a4XZXM[aria-disabled=true]:link,.appearance-text-DqKJVT3U.intent-success-25a4XZXM[aria-disabled=true]:visited{color:#b2b5be;background-color:#e0e3eb;border-color:#e0e3eb}html.theme-dark .appearance-text-DqKJVT3U.intent-success-25a4XZXM:disabled,html.theme-dark .appearance-text-DqKJVT3U.intent-success-25a4XZXM:disabled:link,html.theme-dark .appearance-text-DqKJVT3U.intent-success-25a4XZXM:disabled:visited,html.theme-dark .appearance-text-DqKJVT3U.intent-success-25a4XZXM[aria-disabled=true],html.theme-dark .appearance-text-DqKJVT3U.intent-success-25a4XZXM[aria-disabled=true]:link,html.theme-dark .appearance-text-DqKJVT3U.intent-success-25a4XZXM[aria-disabled=true]:visited{border-color:#363a45;background-color:#363a45;color:#5d606b}.appearance-text-DqKJVT3U.intent-success-25a4XZXM:focus,html.theme-dark .appearance-text-DqKJVT3U.intent-success-25a4XZXM:focus{border-color:#009688}.appearance-text-DqKJVT3U.intent-success-25a4XZXM:after{border-color:rgba(38,166,154,0)}html.theme-dark .appearance-text-DqKJVT3U.intent-success-25a4XZXM:after{border-color:rgba(0,137,123,0)}.appearance-text-DqKJVT3U.intent-success-25a4XZXM:focus:after{border-color:rgba(38,166,154,.3)}html.theme-dark .appearance-text-DqKJVT3U.intent-success-25a4XZXM:focus:after{border-color:rgba(0,137,123,.3)}.appearance-text-DqKJVT3U.intent-default-2ZbSqQDs{transform:translateY(0)}.appearance-text-DqKJVT3U.intent-default-2ZbSqQDs,.appearance-text-DqKJVT3U.intent-default-2ZbSqQDs:link,.appearance-text-DqKJVT3U.intent-default-2ZbSqQDs:visited{color:#131722;background-color:transparent;border-color:transparent}html.theme-dark .appearance-text-DqKJVT3U.intent-default-2ZbSqQDs,html.theme-dark .appearance-text-DqKJVT3U.intent-default-2ZbSqQDs:link,html.theme-dark .appearance-text-DqKJVT3U.intent-default-2ZbSqQDs:visited{border-color:transparent;background-color:transparent;color:#d1d4dc}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.appearance-text-DqKJVT3U.intent-default-2ZbSqQDs:hover:not(:disabled):not([aria-disabled=true]){color:#131722;border-color:#787b86;background-color:transparent}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .appearance-text-DqKJVT3U.intent-default-2ZbSqQDs:hover:not(:disabled):not([aria-disabled=true]){background-color:transparent;border-color:#787b86;color:#d1d4dc}}.appearance-text-DqKJVT3U.intent-default-2ZbSqQDs:active:not(:disabled):not([aria-disabled=true]){color:#fff;border-color:#5d606b;background-color:#5d606b;transform:translateY(1px)}html.theme-dark .appearance-text-DqKJVT3U.intent-default-2ZbSqQDs:active:not(:disabled):not([aria-disabled=true]){background-color:#9598a1;border-color:#9598a1;color:#fff}.appearance-text-DqKJVT3U.intent-default-2ZbSqQDs:disabled,.appearance-text-DqKJVT3U.intent-default-2ZbSqQDs:disabled:link,.appearance-text-DqKJVT3U.intent-default-2ZbSqQDs:disabled:visited,.appearance-text-DqKJVT3U.intent-default-2ZbSqQDs[aria-disabled=true],.appearance-text-DqKJVT3U.intent-default-2ZbSqQDs[aria-disabled=true]:link,.appearance-text-DqKJVT3U.intent-default-2ZbSqQDs[aria-disabled=true]:visited{color:#b2b5be;background-color:#e0e3eb;border-color:#e0e3eb}html.theme-dark .appearance-text-DqKJVT3U.intent-default-2ZbSqQDs:disabled,html.theme-dark .appearance-text-DqKJVT3U.intent-default-2ZbSqQDs:disabled:link,html.theme-dark .appearance-text-DqKJVT3U.intent-default-2ZbSqQDs:disabled:visited,html.theme-dark .appearance-text-DqKJVT3U.intent-default-2ZbSqQDs[aria-disabled=true],html.theme-dark .appearance-text-DqKJVT3U.intent-default-2ZbSqQDs[aria-disabled=true]:link,html.theme-dark .appearance-text-DqKJVT3U.intent-default-2ZbSqQDs[aria-disabled=true]:visited{border-color:#363a45;background-color:#363a45;color:#5d606b}.appearance-text-DqKJVT3U.intent-default-2ZbSqQDs:focus{border-color:#131722}html.theme-dark .appearance-text-DqKJVT3U.intent-default-2ZbSqQDs:focus{border-color:#d1d4dc}.appearance-text-DqKJVT3U.intent-default-2ZbSqQDs:after{border-color:hsla(225,6%,61%,0)}html.theme-dark .appearance-text-DqKJVT3U.intent-default-2ZbSqQDs:after{border-color:rgba(93,96,107,0)}.appearance-text-DqKJVT3U.intent-default-2ZbSqQDs:focus:after{border-color:hsla(225,6%,61%,.3)}html.theme-dark .appearance-text-DqKJVT3U.intent-default-2ZbSqQDs:focus:after{border-color:rgba(93,96,107,.3)}.appearance-text-DqKJVT3U.intent-warning-24j5HMi0{transform:translateY(0)}.appearance-text-DqKJVT3U.intent-warning-24j5HMi0,.appearance-text-DqKJVT3U.intent-warning-24j5HMi0:link,.appearance-text-DqKJVT3U.intent-warning-24j5HMi0:visited{color:#ff9800;background-color:transparent;border-color:transparent}html.theme-dark .appearance-text-DqKJVT3U.intent-warning-24j5HMi0,html.theme-dark .appearance-text-DqKJVT3U.intent-warning-24j5HMi0:link,html.theme-dark .appearance-text-DqKJVT3U.intent-warning-24j5HMi0:visited{border-color:transparent;background-color:transparent;color:#f57c00}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.appearance-text-DqKJVT3U.intent-warning-24j5HMi0:hover:not(:disabled):not([aria-disabled=true]){color:#fb8c00;border-color:#fb8c00;background-color:transparent}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .appearance-text-DqKJVT3U.intent-warning-24j5HMi0:hover:not(:disabled):not([aria-disabled=true]){background-color:transparent;border-color:#fb8c00;color:#fb8c00}}.appearance-text-DqKJVT3U.intent-warning-24j5HMi0:active:not(:disabled):not([aria-disabled=true]){color:#fff;border-color:#f57c00;background-color:#f57c00;transform:translateY(1px)}html.theme-dark .appearance-text-DqKJVT3U.intent-warning-24j5HMi0:active:not(:disabled):not([aria-disabled=true]){background-color:#ff9800;border-color:#ff9800;color:#fff}.appearance-text-DqKJVT3U.intent-warning-24j5HMi0:disabled,.appearance-text-DqKJVT3U.intent-warning-24j5HMi0:disabled:link,.appearance-text-DqKJVT3U.intent-warning-24j5HMi0:disabled:visited,.appearance-text-DqKJVT3U.intent-warning-24j5HMi0[aria-disabled=true],.appearance-text-DqKJVT3U.intent-warning-24j5HMi0[aria-disabled=true]:link,.appearance-text-DqKJVT3U.intent-warning-24j5HMi0[aria-disabled=true]:visited{color:#b2b5be;background-color:#e0e3eb;border-color:#e0e3eb}html.theme-dark .appearance-text-DqKJVT3U.intent-warning-24j5HMi0:disabled,html.theme-dark .appearance-text-DqKJVT3U.intent-warning-24j5HMi0:disabled:link,html.theme-dark .appearance-text-DqKJVT3U.intent-warning-24j5HMi0:disabled:visited,html.theme-dark .appearance-text-DqKJVT3U.intent-warning-24j5HMi0[aria-disabled=true],html.theme-dark .appearance-text-DqKJVT3U.intent-warning-24j5HMi0[aria-disabled=true]:link,html.theme-dark .appearance-text-DqKJVT3U.intent-warning-24j5HMi0[aria-disabled=true]:visited{border-color:#363a45;background-color:#363a45;color:#5d606b}.appearance-text-DqKJVT3U.intent-warning-24j5HMi0:focus,html.theme-dark .appearance-text-DqKJVT3U.intent-warning-24j5HMi0:focus{border-color:#fb8c00}.appearance-text-DqKJVT3U.intent-warning-24j5HMi0:after{border-color:rgba(255,152,0,0)}html.theme-dark .appearance-text-DqKJVT3U.intent-warning-24j5HMi0:after{border-color:rgba(245,124,0,0)}.appearance-text-DqKJVT3U.intent-warning-24j5HMi0:focus:after{border-color:rgba(255,152,0,.3)}html.theme-dark .appearance-text-DqKJVT3U.intent-warning-24j5HMi0:focus:after{border-color:rgba(245,124,0,.3)}.appearance-text-DqKJVT3U.intent-danger-1EETHCla{transform:translateY(0)}.appearance-text-DqKJVT3U.intent-danger-1EETHCla,.appearance-text-DqKJVT3U.intent-danger-1EETHCla:link,.appearance-text-DqKJVT3U.intent-danger-1EETHCla:visited{color:#ef5350;background-color:transparent;border-color:transparent}html.theme-dark .appearance-text-DqKJVT3U.intent-danger-1EETHCla,html.theme-dark .appearance-text-DqKJVT3U.intent-danger-1EETHCla:link,html.theme-dark .appearance-text-DqKJVT3U.intent-danger-1EETHCla:visited{border-color:transparent;background-color:transparent;color:#e53935}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.appearance-text-DqKJVT3U.intent-danger-1EETHCla:hover:not(:disabled):not([aria-disabled=true]){color:#f44336;border-color:#f44336;background-color:transparent}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .appearance-text-DqKJVT3U.intent-danger-1EETHCla:hover:not(:disabled):not([aria-disabled=true]){background-color:transparent;border-color:#f44336;color:#f44336}}.appearance-text-DqKJVT3U.intent-danger-1EETHCla:active:not(:disabled):not([aria-disabled=true]){color:#fff;border-color:#e53935;background-color:#e53935;transform:translateY(1px)}html.theme-dark .appearance-text-DqKJVT3U.intent-danger-1EETHCla:active:not(:disabled):not([aria-disabled=true]){background-color:#ef5350;border-color:#ef5350;color:#fff}.appearance-text-DqKJVT3U.intent-danger-1EETHCla:disabled,.appearance-text-DqKJVT3U.intent-danger-1EETHCla:disabled:link,.appearance-text-DqKJVT3U.intent-danger-1EETHCla:disabled:visited,.appearance-text-DqKJVT3U.intent-danger-1EETHCla[aria-disabled=true],.appearance-text-DqKJVT3U.intent-danger-1EETHCla[aria-disabled=true]:link,.appearance-text-DqKJVT3U.intent-danger-1EETHCla[aria-disabled=true]:visited{color:#b2b5be;background-color:#e0e3eb;border-color:#e0e3eb}html.theme-dark .appearance-text-DqKJVT3U.intent-danger-1EETHCla:disabled,html.theme-dark .appearance-text-DqKJVT3U.intent-danger-1EETHCla:disabled:link,html.theme-dark .appearance-text-DqKJVT3U.intent-danger-1EETHCla:disabled:visited,html.theme-dark .appearance-text-DqKJVT3U.intent-danger-1EETHCla[aria-disabled=true],html.theme-dark .appearance-text-DqKJVT3U.intent-danger-1EETHCla[aria-disabled=true]:link,html.theme-dark .appearance-text-DqKJVT3U.intent-danger-1EETHCla[aria-disabled=true]:visited{border-color:#363a45;background-color:#363a45;color:#5d606b}.appearance-text-DqKJVT3U.intent-danger-1EETHCla:focus,html.theme-dark .appearance-text-DqKJVT3U.intent-danger-1EETHCla:focus{border-color:#f44336}.appearance-text-DqKJVT3U.intent-danger-1EETHCla:after{border-color:rgba(239,83,80,0)}html.theme-dark .appearance-text-DqKJVT3U.intent-danger-1EETHCla:after{border-color:rgba(229,57,53,0)}.appearance-text-DqKJVT3U.intent-danger-1EETHCla:focus:after{border-color:rgba(239,83,80,.3)}html.theme-dark .appearance-text-DqKJVT3U.intent-danger-1EETHCla:focus:after{border-color:rgba(229,57,53,.3)}.appearance-inverse-r1Y2JQg_.intent-primary-1-IOYcbg{transform:translateY(0)}.appearance-inverse-r1Y2JQg_.intent-primary-1-IOYcbg,.appearance-inverse-r1Y2JQg_.intent-primary-1-IOYcbg:link,.appearance-inverse-r1Y2JQg_.intent-primary-1-IOYcbg:visited{color:#2196f3;background-color:#fff;border-color:#fff}html.theme-dark .appearance-inverse-r1Y2JQg_.intent-primary-1-IOYcbg,html.theme-dark .appearance-inverse-r1Y2JQg_.intent-primary-1-IOYcbg:link,html.theme-dark .appearance-inverse-r1Y2JQg_.intent-primary-1-IOYcbg:visited{color:#1976d2}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.appearance-inverse-r1Y2JQg_.intent-primary-1-IOYcbg:hover:not(:disabled):not([aria-disabled=true]){color:#1e88e5;border-color:#fff;background-color:#fff}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .appearance-inverse-r1Y2JQg_.intent-primary-1-IOYcbg:hover:not(:disabled):not([aria-disabled=true]){color:#1e88e5}}.appearance-inverse-r1Y2JQg_.intent-primary-1-IOYcbg:active:not(:disabled):not([aria-disabled=true]){color:#1976d2;border-color:#fff;background-color:#fff;transform:translateY(1px)}html.theme-dark .appearance-inverse-r1Y2JQg_.intent-primary-1-IOYcbg:active:not(:disabled):not([aria-disabled=true]){color:#2196f3}.appearance-inverse-r1Y2JQg_.intent-primary-1-IOYcbg:disabled,.appearance-inverse-r1Y2JQg_.intent-primary-1-IOYcbg:disabled:link,.appearance-inverse-r1Y2JQg_.intent-primary-1-IOYcbg:disabled:visited,.appearance-inverse-r1Y2JQg_.intent-primary-1-IOYcbg[aria-disabled=true],.appearance-inverse-r1Y2JQg_.intent-primary-1-IOYcbg[aria-disabled=true]:link,.appearance-inverse-r1Y2JQg_.intent-primary-1-IOYcbg[aria-disabled=true]:visited{color:#b2b5be;background-color:#e0e3eb;border-color:#e0e3eb}html.theme-dark .appearance-inverse-r1Y2JQg_.intent-primary-1-IOYcbg:disabled,html.theme-dark .appearance-inverse-r1Y2JQg_.intent-primary-1-IOYcbg:disabled:link,html.theme-dark .appearance-inverse-r1Y2JQg_.intent-primary-1-IOYcbg:disabled:visited,html.theme-dark .appearance-inverse-r1Y2JQg_.intent-primary-1-IOYcbg[aria-disabled=true],html.theme-dark .appearance-inverse-r1Y2JQg_.intent-primary-1-IOYcbg[aria-disabled=true]:link,html.theme-dark .appearance-inverse-r1Y2JQg_.intent-primary-1-IOYcbg[aria-disabled=true]:visited{border-color:#363a45;background-color:#363a45;color:#5d606b}.appearance-inverse-r1Y2JQg_.intent-primary-1-IOYcbg:focus,html.theme-dark .appearance-inverse-r1Y2JQg_.intent-primary-1-IOYcbg:focus{color:#1e88e5}.appearance-inverse-r1Y2JQg_.intent-primary-1-IOYcbg:after{border-color:rgba(33,150,243,0)}html.theme-dark .appearance-inverse-r1Y2JQg_.intent-primary-1-IOYcbg:after{border-color:rgba(25,118,210,0)}.appearance-inverse-r1Y2JQg_.intent-primary-1-IOYcbg:focus:after{border-color:rgba(33,150,243,.3)}html.theme-dark .appearance-inverse-r1Y2JQg_.intent-primary-1-IOYcbg:focus:after{border-color:rgba(25,118,210,.3)}.appearance-inverse-r1Y2JQg_.intent-success-25a4XZXM{transform:translateY(0)}.appearance-inverse-r1Y2JQg_.intent-success-25a4XZXM,.appearance-inverse-r1Y2JQg_.intent-success-25a4XZXM:link,.appearance-inverse-r1Y2JQg_.intent-success-25a4XZXM:visited{color:#26a69a;background-color:#fff;border-color:#fff}html.theme-dark .appearance-inverse-r1Y2JQg_.intent-success-25a4XZXM,html.theme-dark .appearance-inverse-r1Y2JQg_.intent-success-25a4XZXM:link,html.theme-dark .appearance-inverse-r1Y2JQg_.intent-success-25a4XZXM:visited{color:#00897b}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.appearance-inverse-r1Y2JQg_.intent-success-25a4XZXM:hover:not(:disabled):not([aria-disabled=true]){color:#009688;border-color:#fff;background-color:#fff}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .appearance-inverse-r1Y2JQg_.intent-success-25a4XZXM:hover:not(:disabled):not([aria-disabled=true]){color:#009688}}.appearance-inverse-r1Y2JQg_.intent-success-25a4XZXM:active:not(:disabled):not([aria-disabled=true]){color:#00897b;border-color:#fff;background-color:#fff;transform:translateY(1px)}html.theme-dark .appearance-inverse-r1Y2JQg_.intent-success-25a4XZXM:active:not(:disabled):not([aria-disabled=true]){color:#26a69a}.appearance-inverse-r1Y2JQg_.intent-success-25a4XZXM:disabled,.appearance-inverse-r1Y2JQg_.intent-success-25a4XZXM:disabled:link,.appearance-inverse-r1Y2JQg_.intent-success-25a4XZXM:disabled:visited,.appearance-inverse-r1Y2JQg_.intent-success-25a4XZXM[aria-disabled=true],.appearance-inverse-r1Y2JQg_.intent-success-25a4XZXM[aria-disabled=true]:link,.appearance-inverse-r1Y2JQg_.intent-success-25a4XZXM[aria-disabled=true]:visited{color:#b2b5be;background-color:#e0e3eb;border-color:#e0e3eb}html.theme-dark .appearance-inverse-r1Y2JQg_.intent-success-25a4XZXM:disabled,html.theme-dark .appearance-inverse-r1Y2JQg_.intent-success-25a4XZXM:disabled:link,html.theme-dark .appearance-inverse-r1Y2JQg_.intent-success-25a4XZXM:disabled:visited,html.theme-dark .appearance-inverse-r1Y2JQg_.intent-success-25a4XZXM[aria-disabled=true],html.theme-dark .appearance-inverse-r1Y2JQg_.intent-success-25a4XZXM[aria-disabled=true]:link,html.theme-dark .appearance-inverse-r1Y2JQg_.intent-success-25a4XZXM[aria-disabled=true]:visited{border-color:#363a45;background-color:#363a45;color:#5d606b}.appearance-inverse-r1Y2JQg_.intent-success-25a4XZXM:focus,html.theme-dark .appearance-inverse-r1Y2JQg_.intent-success-25a4XZXM:focus{color:#009688}.appearance-inverse-r1Y2JQg_.intent-success-25a4XZXM:after{border-color:rgba(38,166,154,0)}html.theme-dark .appearance-inverse-r1Y2JQg_.intent-success-25a4XZXM:after{border-color:rgba(0,137,123,0)}.appearance-inverse-r1Y2JQg_.intent-success-25a4XZXM:focus:after{border-color:rgba(38,166,154,.3)}html.theme-dark .appearance-inverse-r1Y2JQg_.intent-success-25a4XZXM:focus:after{border-color:rgba(0,137,123,.3)}.appearance-inverse-r1Y2JQg_.intent-default-2ZbSqQDs{transform:translateY(0)}.appearance-inverse-r1Y2JQg_.intent-default-2ZbSqQDs,.appearance-inverse-r1Y2JQg_.intent-default-2ZbSqQDs:link,.appearance-inverse-r1Y2JQg_.intent-default-2ZbSqQDs:visited{color:#9598a1;background-color:#fff;border-color:#fff}html.theme-dark .appearance-inverse-r1Y2JQg_.intent-default-2ZbSqQDs,html.theme-dark .appearance-inverse-r1Y2JQg_.intent-default-2ZbSqQDs:link,html.theme-dark .appearance-inverse-r1Y2JQg_.intent-default-2ZbSqQDs:visited{color:#5d606b}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.appearance-inverse-r1Y2JQg_.intent-default-2ZbSqQDs:hover:not(:disabled):not([aria-disabled=true]){color:#787b86;border-color:#fff;background-color:#fff}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .appearance-inverse-r1Y2JQg_.intent-default-2ZbSqQDs:hover:not(:disabled):not([aria-disabled=true]){color:#787b86}}.appearance-inverse-r1Y2JQg_.intent-default-2ZbSqQDs:active:not(:disabled):not([aria-disabled=true]){color:#5d606b;border-color:#fff;background-color:#fff;transform:translateY(1px)}html.theme-dark .appearance-inverse-r1Y2JQg_.intent-default-2ZbSqQDs:active:not(:disabled):not([aria-disabled=true]){color:#9598a1}.appearance-inverse-r1Y2JQg_.intent-default-2ZbSqQDs:disabled,.appearance-inverse-r1Y2JQg_.intent-default-2ZbSqQDs:disabled:link,.appearance-inverse-r1Y2JQg_.intent-default-2ZbSqQDs:disabled:visited,.appearance-inverse-r1Y2JQg_.intent-default-2ZbSqQDs[aria-disabled=true],.appearance-inverse-r1Y2JQg_.intent-default-2ZbSqQDs[aria-disabled=true]:link,.appearance-inverse-r1Y2JQg_.intent-default-2ZbSqQDs[aria-disabled=true]:visited{color:#b2b5be;background-color:#e0e3eb;border-color:#e0e3eb}html.theme-dark .appearance-inverse-r1Y2JQg_.intent-default-2ZbSqQDs:disabled,html.theme-dark .appearance-inverse-r1Y2JQg_.intent-default-2ZbSqQDs:disabled:link,html.theme-dark .appearance-inverse-r1Y2JQg_.intent-default-2ZbSqQDs:disabled:visited,html.theme-dark .appearance-inverse-r1Y2JQg_.intent-default-2ZbSqQDs[aria-disabled=true],html.theme-dark .appearance-inverse-r1Y2JQg_.intent-default-2ZbSqQDs[aria-disabled=true]:link,html.theme-dark .appearance-inverse-r1Y2JQg_.intent-default-2ZbSqQDs[aria-disabled=true]:visited{border-color:#363a45;background-color:#363a45;color:#5d606b}.appearance-inverse-r1Y2JQg_.intent-default-2ZbSqQDs:focus,html.theme-dark .appearance-inverse-r1Y2JQg_.intent-default-2ZbSqQDs:focus{color:#787b86}.appearance-inverse-r1Y2JQg_.intent-default-2ZbSqQDs:after{border-color:hsla(225,6%,61%,0)}html.theme-dark .appearance-inverse-r1Y2JQg_.intent-default-2ZbSqQDs:after{border-color:rgba(93,96,107,0)}.appearance-inverse-r1Y2JQg_.intent-default-2ZbSqQDs:focus:after{border-color:hsla(225,6%,61%,.3)}html.theme-dark .appearance-inverse-r1Y2JQg_.intent-default-2ZbSqQDs:focus:after{border-color:rgba(93,96,107,.3)}.appearance-inverse-r1Y2JQg_.intent-warning-24j5HMi0{transform:translateY(0)}.appearance-inverse-r1Y2JQg_.intent-warning-24j5HMi0,.appearance-inverse-r1Y2JQg_.intent-warning-24j5HMi0:link,.appearance-inverse-r1Y2JQg_.intent-warning-24j5HMi0:visited{color:#ff9800;background-color:#fff;border-color:#fff}html.theme-dark .appearance-inverse-r1Y2JQg_.intent-warning-24j5HMi0,html.theme-dark .appearance-inverse-r1Y2JQg_.intent-warning-24j5HMi0:link,html.theme-dark .appearance-inverse-r1Y2JQg_.intent-warning-24j5HMi0:visited{color:#f57c00}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.appearance-inverse-r1Y2JQg_.intent-warning-24j5HMi0:hover:not(:disabled):not([aria-disabled=true]){color:#fb8c00;border-color:#fff;background-color:#fff}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .appearance-inverse-r1Y2JQg_.intent-warning-24j5HMi0:hover:not(:disabled):not([aria-disabled=true]){color:#fb8c00}}.appearance-inverse-r1Y2JQg_.intent-warning-24j5HMi0:active:not(:disabled):not([aria-disabled=true]){color:#f57c00;border-color:#fff;background-color:#fff;transform:translateY(1px)}html.theme-dark .appearance-inverse-r1Y2JQg_.intent-warning-24j5HMi0:active:not(:disabled):not([aria-disabled=true]){color:#ff9800}.appearance-inverse-r1Y2JQg_.intent-warning-24j5HMi0:disabled,.appearance-inverse-r1Y2JQg_.intent-warning-24j5HMi0:disabled:link,.appearance-inverse-r1Y2JQg_.intent-warning-24j5HMi0:disabled:visited,.appearance-inverse-r1Y2JQg_.intent-warning-24j5HMi0[aria-disabled=true],.appearance-inverse-r1Y2JQg_.intent-warning-24j5HMi0[aria-disabled=true]:link,.appearance-inverse-r1Y2JQg_.intent-warning-24j5HMi0[aria-disabled=true]:visited{color:#b2b5be;background-color:#e0e3eb;border-color:#e0e3eb}html.theme-dark .appearance-inverse-r1Y2JQg_.intent-warning-24j5HMi0:disabled,html.theme-dark .appearance-inverse-r1Y2JQg_.intent-warning-24j5HMi0:disabled:link,html.theme-dark .appearance-inverse-r1Y2JQg_.intent-warning-24j5HMi0:disabled:visited,html.theme-dark .appearance-inverse-r1Y2JQg_.intent-warning-24j5HMi0[aria-disabled=true],html.theme-dark .appearance-inverse-r1Y2JQg_.intent-warning-24j5HMi0[aria-disabled=true]:link,html.theme-dark .appearance-inverse-r1Y2JQg_.intent-warning-24j5HMi0[aria-disabled=true]:visited{border-color:#363a45;background-color:#363a45;color:#5d606b}.appearance-inverse-r1Y2JQg_.intent-warning-24j5HMi0:focus,html.theme-dark .appearance-inverse-r1Y2JQg_.intent-warning-24j5HMi0:focus{color:#fb8c00}.appearance-inverse-r1Y2JQg_.intent-warning-24j5HMi0:after{border-color:rgba(255,152,0,0)}html.theme-dark .appearance-inverse-r1Y2JQg_.intent-warning-24j5HMi0:after{border-color:rgba(245,124,0,0)}.appearance-inverse-r1Y2JQg_.intent-warning-24j5HMi0:focus:after{border-color:rgba(255,152,0,.3)}html.theme-dark .appearance-inverse-r1Y2JQg_.intent-warning-24j5HMi0:focus:after{border-color:rgba(245,124,0,.3)}.appearance-inverse-r1Y2JQg_.intent-danger-1EETHCla{transform:translateY(0)}.appearance-inverse-r1Y2JQg_.intent-danger-1EETHCla,.appearance-inverse-r1Y2JQg_.intent-danger-1EETHCla:link,.appearance-inverse-r1Y2JQg_.intent-danger-1EETHCla:visited{color:#ef5350;background-color:#fff;border-color:#fff}html.theme-dark .appearance-inverse-r1Y2JQg_.intent-danger-1EETHCla,html.theme-dark .appearance-inverse-r1Y2JQg_.intent-danger-1EETHCla:link,html.theme-dark .appearance-inverse-r1Y2JQg_.intent-danger-1EETHCla:visited{color:#e53935}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.appearance-inverse-r1Y2JQg_.intent-danger-1EETHCla:hover:not(:disabled):not([aria-disabled=true]){color:#f44336;border-color:#fff;background-color:#fff}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .appearance-inverse-r1Y2JQg_.intent-danger-1EETHCla:hover:not(:disabled):not([aria-disabled=true]){color:#f44336}}.appearance-inverse-r1Y2JQg_.intent-danger-1EETHCla:active:not(:disabled):not([aria-disabled=true]){color:#e53935;border-color:#fff;background-color:#fff;transform:translateY(1px)}html.theme-dark .appearance-inverse-r1Y2JQg_.intent-danger-1EETHCla:active:not(:disabled):not([aria-disabled=true]){color:#ef5350}.appearance-inverse-r1Y2JQg_.intent-danger-1EETHCla:disabled,.appearance-inverse-r1Y2JQg_.intent-danger-1EETHCla:disabled:link,.appearance-inverse-r1Y2JQg_.intent-danger-1EETHCla:disabled:visited,.appearance-inverse-r1Y2JQg_.intent-danger-1EETHCla[aria-disabled=true],.appearance-inverse-r1Y2JQg_.intent-danger-1EETHCla[aria-disabled=true]:link,.appearance-inverse-r1Y2JQg_.intent-danger-1EETHCla[aria-disabled=true]:visited{color:#b2b5be;background-color:#e0e3eb;border-color:#e0e3eb}html.theme-dark .appearance-inverse-r1Y2JQg_.intent-danger-1EETHCla:disabled,html.theme-dark .appearance-inverse-r1Y2JQg_.intent-danger-1EETHCla:disabled:link,html.theme-dark .appearance-inverse-r1Y2JQg_.intent-danger-1EETHCla:disabled:visited,html.theme-dark .appearance-inverse-r1Y2JQg_.intent-danger-1EETHCla[aria-disabled=true],html.theme-dark .appearance-inverse-r1Y2JQg_.intent-danger-1EETHCla[aria-disabled=true]:link,html.theme-dark .appearance-inverse-r1Y2JQg_.intent-danger-1EETHCla[aria-disabled=true]:visited{border-color:#363a45;background-color:#363a45;color:#5d606b}.appearance-inverse-r1Y2JQg_.intent-danger-1EETHCla:focus,html.theme-dark .appearance-inverse-r1Y2JQg_.intent-danger-1EETHCla:focus{color:#f44336}.appearance-inverse-r1Y2JQg_.intent-danger-1EETHCla:after{border-color:rgba(239,83,80,0)}html.theme-dark .appearance-inverse-r1Y2JQg_.intent-danger-1EETHCla:after{border-color:rgba(229,57,53,0)}.appearance-inverse-r1Y2JQg_.intent-danger-1EETHCla:focus:after{border-color:rgba(239,83,80,.3)}html.theme-dark .appearance-inverse-r1Y2JQg_.intent-danger-1EETHCla:focus:after{border-color:rgba(229,57,53,.3)}.size-s-3mait84m{height:26px;padding:0 11px;border-radius:4px}.size-s-3mait84m .content-2PGssb8d{font-size:14px;text-transform:none}.size-s-3mait84m:after{border-radius:8px}.size-m-2G7L7Qat{height:34px;padding:0 23px;border-radius:4px}.size-m-2G7L7Qat .content-2PGssb8d{font-size:16px;text-transform:none}.size-m-2G7L7Qat:after{border-radius:8px}.size-l-2NEs9_xt{height:48px;padding:0 31px;border-radius:4px}.size-l-2NEs9_xt .content-2PGssb8d{font-size:16px;text-transform:none}.size-l-2NEs9_xt:after{border-radius:8px}.size-p-3D4rn3v0{height:56px;padding:0 40px;border-radius:120px}.size-p-3D4rn3v0 .content-2PGssb8d{font-size:24px;text-transform:none}.size-p-3D4rn3v0:after{border-radius:124px}.full-width-1wU8ljjC{width:100%}.with-icon-yumghDr- .content-2PGssb8d{margin-left:3px}.icon-1grlgNdV{display:flex;align-items:center;justify-content:center;width:28px;height:28px;margin-left:4px} \ No newline at end of file diff --git a/public/charting_library/bundles/13.bd9a7b50624ae8dfb71b.js b/public/charting_library/bundles/13.bd9a7b50624ae8dfb71b.js new file mode 100644 index 00000000..613b0543 --- /dev/null +++ b/public/charting_library/bundles/13.bd9a7b50624ae8dfb71b.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[13],[]]); \ No newline at end of file diff --git a/public/charting_library/bundles/14.f0c743fc89255ca1fdc0.js b/public/charting_library/bundles/14.f0c743fc89255ca1fdc0.js new file mode 100644 index 00000000..ba0b6b6e --- /dev/null +++ b/public/charting_library/bundles/14.f0c743fc89255ca1fdc0.js @@ -0,0 +1,6 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[14],{Iivm:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n("mrSG").__exportStar(n("swCq"),t)},cvc5:function(e,t,n){var r,o,i;e.exports=(r=n("q1tI"),o=n("i8i4"),i=n("bdgK"),function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="dist/",t(0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){return e&&e.__esModule?e:{default:e}}(n(1));t.default=r.default,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:n.props.includeMargin;if(n.props.shouldMeasure){n._node.parentNode||n._setDOMNode();var t=n.getDimensions(n._node,e),r="function"==typeof n.props.children;n._propsToMeasure.some((function(e){if(t[e]!==n._lastDimensions[e])return n.props.onMeasure(t),r&&void 0!==n&&n.setState({dimensions:t}),n._lastDimensions=t,!0}))}},n.state={dimensions:{width:0,height:0,top:0,right:0,bottom:0,left:0}},n._node=null,n._propsToMeasure=n._getPropsToMeasure(e),n._lastDimensions={},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"componentDidMount",value:function(){var e=this;this._setDOMNode(),this.measure(),this.resizeObserver=new c.default((function(){return e.measure()})),this.resizeObserver.observe(this._node)}},{key:"componentWillReceiveProps",value:function(e){var t=(e.config,e.whitelist),n=e.blacklist;this.props.whitelist===t&&this.props.blacklist===n||(this._propsToMeasure=this._getPropsToMeasure({whitelist:t,blacklist:n}))}},{key:"componentWillUnmount",value:function(){this.resizeObserver.disconnect(this._node),this._node=null}},{key:"_setDOMNode",value:function(){this._node=s.default.findDOMNode(this)}},{key:"getDimensions",value:function(){ +var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._node,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.props.includeMargin;return(0,f.default)(e,{margin:t})}},{key:"_getPropsToMeasure",value:function(e){var t=e.whitelist,n=e.blacklist;return t.filter((function(e){return n.indexOf(e)<0}))}},{key:"render",value:function(){var e=this.props.children;return i.Children.only("function"==typeof e?e(this.state.dimensions):e)}}]),t}(i.Component);l.propTypes={whitelist:a.default.array,blacklist:a.default.array,includeMargin:a.default.bool,useClone:a.default.bool,cloneOptions:a.default.object,shouldMeasure:a.default.bool,onMeasure:a.default.func},l.defaultProps={whitelist:["width","height","top","right","bottom","left"],blacklist:[],includeMargin:!0,useClone:!1,cloneOptions:{},shouldMeasure:!0,onMeasure:function(){return null}},t.default=l,e.exports=t.default},function(e,t){e.exports=r},function(e,t,n){(function(t){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};if("production"!==t.env.NODE_ENV){var o="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103;e.exports=n(5)((function(e){return"object"===(void 0===e?"undefined":r(e))&&null!==e&&e.$$typeof===o}),!0)}else e.exports=n(12)()}).call(t,n(4))},function(e,t){"use strict";function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function o(e){if(c===setTimeout)return setTimeout(e,0);if((c===n||!c)&&setTimeout)return c=setTimeout,setTimeout(e,0);try{return c(e,0)}catch(t){try{return c.call(null,e,0)}catch(t){return c.call(this,e,0)}}}function i(){y&&p&&(y=!1,p.length?d=p.concat(d):h=-1,d.length&&u())}function u(){if(!y){var e=o(i);y=!0;for(var t=d.length;t;){for(p=d,d=[];++h1)for(var n=1;n1?t-1:0),r=1;r2?n-2:0),i=2;i1&&void 0!==arguments[1]?arguments[1]:{},n=e.getBoundingClientRect(),o=void 0,i=void 0,u=void 0;return t.margin&&(u=(0,r.default)(getComputedStyle(e))),t.margin?(o=u.left+n.width+u.right,i=u.top+n.height+u.bottom):(o=n.width,i=n.height),{width:o,height:i,top:n.top,right:n.right,bottom:n.bottom,left:n.left}};var r=function(e){return e&&e.__esModule?e:{default:e}}(n(16));e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return{top:n((e=e||{}).marginTop),right:n(e.marginRight),bottom:n(e.marginBottom),left:n(e.marginLeft)}};var n=function(e){return parseInt(e)||0};e.exports=t.default}]))},swCq:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Icon=void 0;var r=n("mrSG"),o=n("q1tI");t.Icon=o.forwardRef((function(e,t){var n=e.icon,i=void 0===n?"":n,u=r.__rest(e,["icon"]);return o.createElement("span",r.__assign({},u,{ref:t,dangerouslySetInnerHTML:{__html:i}}))}))}}]); \ No newline at end of file diff --git a/public/charting_library/bundles/15.c3822fc777211ee8315c.js b/public/charting_library/bundles/15.c3822fc777211ee8315c.js new file mode 100644 index 00000000..699203fc --- /dev/null +++ b/public/charting_library/bundles/15.c3822fc777211ee8315c.js @@ -0,0 +1,3 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[15],{A6WY:function(e,t,n){"use strict";n.r(t),n.d(t,"LazyJqueryUI",(function(){return o})),n.d(t,"lazyJqueryUI",(function(){return a}));var r;n("P5fv");function i(e){return e in $.fn?Promise.resolve():(r||(r=new Promise((function(e){Promise.all([n.e(89),n.e("lazy-jquery-ui")]).then(function(t){n("BvgM"),e()}.bind(null,n)).catch(void 0)}))),r)}var o=function(){function e(e){this._$elem=e}return e.prototype.draggable=function(){var e=arguments,t=this._$elem;return i("draggable").then((function(){return t.draggable.apply(t,e)}))},e.prototype.resizable=function(){var e=arguments,t=this._$elem;return i("resizable").then((function(){return t.resizable.apply(t,e)}))},e.prototype.sortable=function(){var e=arguments,t=this._$elem;return i("sortable").then((function(){return t.sortable.apply(t,e)}))},e.prototype.datepicker=function(){var e=arguments,t=this._$elem;return i("datepicker").then((function(){return t.datepicker.apply(t,e)}))},e}();function a(e){return new o(e)}},nbsC:function(e,t,n){var r,i,o,a;a=function(e){var t=Object.prototype.toString,n=Array.isArray||function(e){return"[object Array]"===t.call(e)};function r(e){return"function"==typeof e}function i(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function o(e,t){return null!=e&&"object"==typeof e&&t in e}var a=RegExp.prototype.test,s=/\S/;function u(e){return!function(e,t){return a.call(e,t)}(s,e)}var c={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="},p=/\s*/,l=/\s+/,f=/\s*=/,h=/\s*\}/,d=/#|\^|\/|>|\{|&|=|!/;function v(e){this.string=e,this.tail=e,this.pos=0}function g(e,t){this.view=e,this.cache={".":this.view},this.parent=t}function y(){this.cache={}}v.prototype.eos=function(){return""===this.tail},v.prototype.scan=function(e){var t=this.tail.match(e);if(!t||0!==t.index)return"";var n=t[0];return this.tail=this.tail.substring(n.length),this.pos+=n.length,n},v.prototype.scanUntil=function(e){var t,n=this.tail.search(e);switch(n){case-1:t=this.tail,this.tail="";break;case 0:t="";break;default:t=this.tail.substring(0,n),this.tail=this.tail.substring(n)}return this.pos+=t.length,t},g.prototype.push=function(e){return new g(e,this)},g.prototype.lookup=function(e){var t,n=this.cache;if(n.hasOwnProperty(e))t=n[e];else{for(var i,a,s=this,u=!1;s;){if(e.indexOf(".")>0)for(t=s.view,i=e.split("."),a=0;null!=t&&a0?i[i.length-1][4]:n;break;default:r.push(t)}return n}(function(e){for(var t,n,r=[],i=0,o=e.length;i"===o?a=this.renderPartial(i,t,n,r):"&"===o?a=this.unescapedValue(i,t):"name"===o?a=this.escapedValue(i,t):"text"===o&&(a=this.rawValue(i)),void 0!==a&&(s+=a);return s},y.prototype.renderSection=function(e,t,i,o){var a=this,s="",u=t.lookup(e[1]);if(u){if(n(u))for(var c=0,p=u.length;c"'`=\/]/g,(function(e){return c[e]}))},e.Scanner=v,e.Context=g,e.Writer=y},t&&"string"!=typeof t.nodeName?a(t):(i=[t],void 0===(o="function"==typeof(r=a)?r.apply(t,i):r)||(e.exports=o))}}]); \ No newline at end of file diff --git a/public/charting_library/bundles/16.4b079d411d2e03610769.css b/public/charting_library/bundles/16.4b079d411d2e03610769.css new file mode 100644 index 00000000..37e1a9dc --- /dev/null +++ b/public/charting_library/bundles/16.4b079d411d2e03610769.css @@ -0,0 +1 @@ +.footer-1mvnCDqp{display:flex;flex:0 0 auto;border-top:1px solid #e0e3eb;padding:20px}html.theme-dark .footer-1mvnCDqp{border-top:1px solid #434651}@media screen and (max-height:360px){.footer-1mvnCDqp{padding:10px 20px}}.footer-1mvnCDqp .submitButton-2lNICzl3{padding-left:12px}.footer-1mvnCDqp .buttons-3yvtQ_uI{margin-left:auto} \ No newline at end of file diff --git a/public/charting_library/bundles/16.4b079d411d2e03610769.rtl.css b/public/charting_library/bundles/16.4b079d411d2e03610769.rtl.css new file mode 100644 index 00000000..211eed99 --- /dev/null +++ b/public/charting_library/bundles/16.4b079d411d2e03610769.rtl.css @@ -0,0 +1 @@ +.footer-1mvnCDqp{display:flex;flex:0 0 auto;border-top:1px solid #e0e3eb;padding:20px}html.theme-dark .footer-1mvnCDqp{border-top:1px solid #434651}@media screen and (max-height:360px){.footer-1mvnCDqp{padding:10px 20px}}.footer-1mvnCDqp .submitButton-2lNICzl3{padding-right:12px}.footer-1mvnCDqp .buttons-3yvtQ_uI{margin-right:auto} \ No newline at end of file diff --git a/public/charting_library/bundles/16.ce20b7ac96647a3f8db3.js b/public/charting_library/bundles/16.ce20b7ac96647a3f8db3.js new file mode 100644 index 00000000..1be04eab --- /dev/null +++ b/public/charting_library/bundles/16.ce20b7ac96647a3f8db3.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[16],[]]); \ No newline at end of file diff --git a/public/charting_library/bundles/17.1a3ca6d3a9c62dfe1f17.js b/public/charting_library/bundles/17.1a3ca6d3a9c62dfe1f17.js new file mode 100644 index 00000000..57416eb0 --- /dev/null +++ b/public/charting_library/bundles/17.1a3ca6d3a9c62dfe1f17.js @@ -0,0 +1,4 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[17],{"3G1X":function(e,t,n){"use strict";n.d(t,"a",(function(){return h})),n.d(t,"c",(function(){return p})),n.d(t,"b",(function(){return g}));var r,o=n("mrSG"),i=n("q1tI"),a=n.n(i),c=n("TSYQ"),s=n.n(c),l=n("Eyy1"),u=n("Wvr1"),d=n("Oi2w"),m=n("l9+T"),f=n("k+zC"),b=n("Hk3L");(r={}).FontSizeMedium=Object(l.ensureDefined)(b["font-size-medium"]),r.FontSizeLarge=Object(l.ensureDefined)(b["font-size-large"]),r.GroupedVertical=Object(l.ensureDefined)(b["grouped-vertical"]),r.GroupedHorizontal=Object(l.ensureDefined)(b["grouped-horizontal"]);function h(e){var t=e.borderStyle,n=void 0===t?"thin":t,r=e.removeRoundBorder,c=void 0===r?0:r,f=e.highlightRemoveRoundBorder,h=void 0===f?0:f,p=e.intent,g=void 0===p?"default":p,v=e.size,O=void 0===v?"medium":v,C=e.tabIndex,j=void 0===C?0:C,w=e.className,y=e.disabled,z=e.readonly,N=e.icon,_=e.iconPosition,E=e.highlight,B=e.reference,k=e.containerReference,F=e.inputClassName,S=e.onFocus,x=e.onBlur,D=e.interactive,R=Object(o.__rest)(e,["borderStyle","removeRoundBorder","highlightRemoveRoundBorder","intent","size","tabIndex","className","disabled","readonly","icon","iconPosition","highlight","reference","containerReference","inputClassName","onFocus","onBlur","interactive"]),I=Object(i.useRef)(null),A=Object(d.a)(),T=A[0],q=A[1],K=Object(u.a)(c),M=Object(u.a)(h),G=Object(m.a)(q.onFocus,S),Y=Object(m.a)(q.onBlur,x);return a.a.createElement("span",{className:s()(b.container,w,b["intent-"+g],b["border-"+n],b["size-"+O],K,E&&b.highlight,Boolean(N)&&_&&b["icon-"+_],y&&b.disabled,z&&b.readonly,T&&b.focused),tabIndex:y||D?void 0:T?-1:j,onFocus:function(e){D||Object(l.ensureNotNull)(I.current).focus()},ref:k},N,a.a.createElement("input",Object(o.__assign)({},R,{className:s()(b.input,F),disabled:y,readOnly:z,tabIndex:y?void 0:T?j:-1,onFocus:G,onBlur:Y,ref:function(e){I.current=e,B&&B(e)}})),E&&a.a.createElement("span",{className:s()(b.shadow,M)}))}function p(e){var t=e.className,n=e.children,r=e.interactive,i=void 0===r||r,c=Object(o.__rest)(e,["className","children","interactive"]);return a.a.createElement("span",Object(o.__assign)({},c,{className:s()(t,b.icon,i&&b.interactive)}),n)}function g(e){return e=Object(f.a)(e),a.a.createElement(h,Object(o.__assign)({},e))}},"8NUT":function(e,t,n){e.exports={"small-height-breakpoint":"screen and (max-height: 360px)",footer:"footer-1mvnCDqp",submitButton:"submitButton-2lNICzl3",buttons:"buttons-3yvtQ_uI"}},Ce4d:function(e,t,n){e.exports={container:"container-AqxbM340",focused:"focused-3bgZ4yBI",readonly:"readonly-3YlYTz9Q",disabled:"disabled-3kisU58M","size-small":"size-small-ST9O9iKu","size-medium":"size-medium-2saizg8j","size-large":"size-large-1HDInl7D","font-size-small":"font-size-small-AVVl6ljq","font-size-medium":"font-size-medium-3qTDml7i","font-size-large":"font-size-large-36ClMPCZ","border-none":"border-none-2VoAEzD9",shadow:"shadow-rtripSA4","border-thin":"border-thin-2A_CUSMk","border-thick":"border-thick-1_qIhMms","intent-default":"intent-default-saHBD6pK", +"intent-success":"intent-success-3xXQLoWT","intent-warning":"intent-warning-SstNFztT","intent-danger":"intent-danger-1URZFATh","intent-primary":"intent-primary-npIFDxc3","corner-top-left":"corner-top-left-1Ex1ff4b","corner-top-right":"corner-top-right-37x9-mDc","corner-bottom-right":"corner-bottom-right-3-_3mqIz","corner-bottom-left":"corner-bottom-left-3mogFNyF",placeholder:"placeholder-3IHl8nis",selected:"selected-2IjEMdXr",hiddenArrow:"hiddenArrow-1HtcxiMc"}},H172:function(e,t,n){"use strict";var r=n("mrSG"),o=n("q1tI"),i=n.n(o),a=n("TSYQ"),c=n.n(a),s=n("Eyy1"),l=n("/3z9"),u=n("9dlw"),d=n("N5tr"),m=n("Oi2w"),f=n("l9+T"),b=n("Wvr1"),h=n("Iivm"),p=n("VGf/"),g=n("uhWF");function v(e){return i.a.createElement("span",{className:g.wrapper,onClick:e.onClick},i.a.createElement("span",{className:g.button},i.a.createElement(h.Icon,{className:c()(g.icon,e.isDropped&&g.dropped),icon:p})))}var O=n("k+zC"),C=n("QpNh"),j=n("Ce4d");function w(e){var t=e.value,n=e.className,a=e.menuClassName,h=e.menuItemClassName,p=e.placeholder,g=e.disabled,O=e.hideArrowButton,w=e.borderStyle,y=void 0===w?"thin":w,z=e.intent,N=void 0===z?"default":z,_=e.size,E=void 0===_?"medium":_,B=e.highlight,k=e.removeRoundBorder,F=void 0===k?0:k,S=e.highlightRemoveRoundBorder,x=void 0===S?0:S,D=e.onFocus,R=e.onBlur,I=e.items,A=Object(o.useRef)(null),T=Object(o.useState)(!1),q=T[0],K=T[1],M=Object(m.a)(),G=M[0],Y=M[1],H=Object(b.a)(F),L=Object(b.a)(x),Q=Object(f.a)(Y.onFocus,D),P=Object(f.a)(Y.onBlur,R);return p&&(I=[{content:p}].concat(I)),i.a.createElement(i.a.Fragment,null,i.a.createElement("div",Object(r.__assign)({className:c()(j.container,n,G&&j.focused,q&&j.open,g&&j.disabled,j["intent-"+(q?"primary":N)],j["border-"+y],j["size-"+E],H,B&&j.highlight),ref:A,onClick:g?void 0:function(){K(!q)},onFocus:Q,onBlur:P,onKeyDown:U,tabIndex:g?void 0:-1,"data-role":"listbox"},Object(C.a)(e)),function(){var e=I.find((function(e){return e.value===t}));if(!e)return i.a.createElement("div",{className:c()(j.placeholder,O&&j.hiddenArrow)},p);var n=e.selectedContent||e.content;if("string"==typeof n)return i.a.createElement("div",{className:c()(j.selected,O&&j.hiddenArrow)},n);return i.a.createElement("div",{className:c()(j.selected,O&&j.hiddenArrow)},i.a.cloneElement(n))}(),!O&&i.a.createElement(v,{isDropped:q}),(B||q)&&i.a.createElement("span",{className:c()(j.shadow,L)})),i.a.createElement(u.a,{className:a,isOpened:q,position:function(){var e=Object(s.ensureNotNull)(A.current).getBoundingClientRect();return{x:e.left,y:e.top+e.height}},onClose:W,doNotCloseOn:A.current,onKeyDown:U},I.map((function(e,n){return e.readonly?i.a.createElement(i.a.Fragment,{key:"readonly_item_"+n},e.content):i.a.createElement(d.b,{key:e.value||"",className:h,isActive:t===e.value,label:e.content,onClick:V,onClickArg:e.value})}))));function V(t){var n=e.onChange,r=e.onChangeArg;n&&n(t,r),Object(s.ensureNotNull)(A.current).focus()}function W(){K(!1),Object(s.ensureNotNull)(A.current).focus()}function U(e){switch(Object(l.hashFromEvent)(e)){case 27:q&&(e.preventDefault(),W())}}}function y(e){ +return e=Object(O.a)(e),i.a.createElement(w,Object(r.__assign)({},e))}n.d(t,"a",(function(){return y}))},Hk3L:function(e,t,n){e.exports={container:"container-2kDJVADV",focused:"focused-GwkJELgF",readonly:"readonly-3PcaDYes",disabled:"disabled-3y5wOPXy","size-small":"size-small-vNxOpxFU","size-medium":"size-medium-2QF4qrsy","size-large":"size-large-3c0aAmCz","font-size-small":"font-size-small-1atK0oxP","font-size-medium":"font-size-medium-15_hd7kR","font-size-large":"font-size-large-sNxmYZSZ","border-none":"border-none-2W-f5CeX",shadow:"shadow-fRMVHbcr","border-thin":"border-thin-39LN06wV","border-thick":"border-thick-3YqbfLWG","intent-default":"intent-default-2WqrktAC","intent-success":"intent-success-2qRddKlF","intent-warning":"intent-warning-3nKtF1a7","intent-danger":"intent-danger-2UcBu3hY","intent-primary":"intent-primary-1GPjPo8I","corner-top-left":"corner-top-left-1UYBpB66","corner-top-right":"corner-top-right-3vjbw1SH","corner-bottom-right":"corner-bottom-right-2Xs3BwD0","corner-bottom-left":"corner-bottom-left-2m7Qn1wR",input:"input-1Fp9QlzO","icon-left":"icon-left-sV9DQagg",icon:"icon-1S_6X6gw","icon-right":"icon-right-2uMWnixv","grouped-vertical":"grouped-vertical-2lC0wjMX","grouped-horizontal":"grouped-horizontal-3T_Yy5c3",highlight:"highlight-fnJ4zkJY",interactive:"interactive-3QZtt2FP"}},Oi2w:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n("q1tI");function o(e){var t=Object(r.useState)(!1),n=t[0],o=t[1];return[n,{onFocus:Object(r.useCallback)((function(t){void 0!==e&&e.current!==t.target||o(!0)}),[e]),onBlur:Object(r.useCallback)((function(t){void 0!==e&&e.current!==t.target||o(!1)}),[e]),setFocus:Object(r.useCallback)((function(){var t;null===(t=null==e?void 0:e.current)||void 0===t||t.focus()}),[e])}]}},"VGf/":function(e,t){e.exports=''},Wvr1:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n("TSYQ"),o=n.n(r),i=n("Hk3L");function a(e){var t="";return 0!==e&&(1&e&&(t=o()(t,i["corner-top-left"])),2&e&&(t=o()(t,i["corner-top-right"])),4&e&&(t=o()(t,i["corner-bottom-right"])),8&e&&(t=o()(t,i["corner-bottom-left"]))),t}},"k+zC":function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n("mrSG"),o=n("Oi2w"),i=n("l9+T");function a(e){var t=e.onFocus,n=e.onBlur,a=e.intent,c=e.highlight,s=Object(o.a)(),l=s[0],u=s[1],d=Object(i.a)(u.onFocus,t),m=Object(i.a)(u.onBlur,n);return Object(r.__assign)(Object(r.__assign)({},e),{intent:a||(l?"primary":"default"),highlight:c||l,onFocus:d,onBlur:m})}},"l9+T":function(e,t,n){"use strict";function r(){for(var e=[],t=0;tr.timeStamp)){var i=r.target;void 0!==n&&null!==t&&null!==i&&i.ownerDocument===o&&(t.contains(i)||n(r))}}return r.click&&o.addEventListener("click",i,!1),r.mouseDown&&o.addEventListener("mousedown",i,!1),r.touchEnd&&o.addEventListener("touchend",i,!1),r.touchStart&&o.addEventListener("touchstart",i,!1),function(){o.removeEventListener("click",i,!1),o.removeEventListener("mousedown",i,!1),o.removeEventListener("touchend",i,!1),o.removeEventListener("touchstart",i,!1)}}n.d(t,"a",(function(){return o}))},v1bN:function(e,t,n){e.exports={"tablet-small-breakpoint":"screen and (max-width: 419px)",item:"item-2xPVYue0",hovered:"hovered-1uf45E05",isDisabled:"isDisabled-1wLqKupj",isActive:"isActive-2j-GhQs_",shortcut:"shortcut-30pveiCO",toolbox:"toolbox-3ulPxfe-",withIcon:"withIcon-1xBjf-oB",icon:"icon-2Qm7YIcz",labelRow:"labelRow-3Q0rdE8-",label:"label-3Xqxy756",showOnHover:"showOnHover-1q6ySzZc"}},"x0D+":function(e,t,n){var o,r,i;r=[t],void 0===(i="function"==typeof(o=function(e){"use strict";function t(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);ts;if(c)Object(a.ensureNotNull)(n._scrollWrapRef).style.overflowY="scroll",o=r.getBoundingClientRect();var p=o.width,d=o.height,h="function"==typeof t?t(p,d):t,f=u-(h.overrideWidth||p)-0,m=Object(l.clamp)(h.x,0,Math.max(0,f)),v=i-(h.overrideHeight||d)-0,_=Object(l.clamp)(h.y,0,Math.max(0,v));h.forbidCorrectYCoord&&_1&&(l=1);var u=1-a/i.height;u<0?u=0:u>1&&(u=1),r({h:o,s:l,v:u})}},t._mouseDown=function(e){window.addEventListener("mouseup",t._mouseUp),window.addEventListener("mousemove",t._mouseMove)},t._mouseUp=function(e){window.removeEventListener("mousemove",t._mouseMove),window.removeEventListener("mouseup",t._mouseUp),t._handlePosition(e)},t._mouseMove=S()(t._handlePosition,100),t._handleTouch=function(e){t._handlePosition(e.nativeEvent.touches[0])},t}return Object(a.__extends)(t,e),t.prototype.render=function(){var e=this.props,t=e.className,n=e.hsv,r=n.h,i=n.s,a=n.v,c="hsl("+360*r+", 100%, 50%)";return o.createElement("div",{className:s()(x.saturation,t),style:{backgroundColor:c},ref:this._refContainer,onMouseDown:this._mouseDown,onTouchStart:this._handleTouch,onTouchMove:this._handleTouch},o.createElement("div",{className:x.pointer,style:{left:100*i+"%",top:100*(1-a)+"%"}}))},t}(o.PureComponent),I=n("jpE+"),j=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._container=null,t._refContainer=function(e){t._container=e},t._handlePosition=function(e){var n=t.props,o=n.hsv,r=o.s,i=o.v,s=n.onChange;if(s){var a=Object(c.ensureNotNull)(t._container).getBoundingClientRect(),l=e.clientY-a.top;l>=a.top&&(l=a.top-1);var u=l/a.height;u<0?u=0:u>1&&(u=1),s({h:u,s:r,v:i})}},t._mouseDown=function(e){window.addEventListener("mouseup",t._mouseUp), +window.addEventListener("mousemove",t._mouseMove)},t._mouseUp=function(e){window.removeEventListener("mousemove",t._mouseMove),window.removeEventListener("mouseup",t._mouseUp),t._handlePosition(e)},t._mouseMove=S()(t._handlePosition,100),t._handleTouch=function(e){t._handlePosition(e.nativeEvent.touches[0])},t}return Object(a.__extends)(t,e),t.prototype.render=function(){var e=this.props,t=e.className,n=e.hsv.h;return o.createElement("div",{className:s()(I.hue,t)},o.createElement("div",{className:I.pointerContainer,ref:this._refContainer,onMouseDown:this._mouseDown,onTouchStart:this._handleTouch,onTouchMove:this._handleTouch},o.createElement("div",{className:I.pointer,style:{top:100*n+"%"}})))},t}(o.PureComponent),M=n("uJfL"),T=window.t("Add",{context:"Color Picker"}),W=function(e){function t(t){var n=e.call(this,t)||this;n._handleHSV=function(e){var t=function(e){var t,n,o,r=e.h,i=e.s,s=e.v,a=Math.floor(6*r),c=6*r-a,l=s*(1-i),u=s*(1-c*i),p=s*(1-(1-c)*i);switch(a%6){case 0:t=s,n=p,o=l;break;case 1:t=u,n=s,o=l;break;case 2:t=l,n=s,o=p;break;case 3:t=l,n=u,o=s;break;case 4:t=p,n=l,o=s;break;case 5:t=s,n=l,o=u;break;default:t=0,n=0,o=0}return"#"+[255*t,255*n,255*o].map((function(e){return("0"+Math.round(e).toString(16)).replace(/.+?([a-f0-9]{2})$/i,"$1")})).join("")}(e)||"#000000";n.setState({color:t,inputColor:t.replace(/^#/,""),hsv:e}),n.props.onSelect(t)},n._handleInput=function(e){var t=e.currentTarget.value;try{var o=N(t),r="#"+t;n.setState({color:r,inputColor:t,hsv:o}),n.props.onSelect(r)}catch(i){n.setState({inputColor:t})}},n._handleAddColor=function(){return n.props.onAdd(n.state.color)};var o=t.color||"#000000";return n.state={color:o,inputColor:o.replace(/^#/,""),hsv:N(o)},n}return Object(a.__extends)(t,e),t.prototype.render=function(){var e=this.state,t=e.color,n=e.hsv,r=e.inputColor;return o.createElement("div",{className:M.container},o.createElement("div",{className:M.form},o.createElement("div",{className:M.swatch,style:{backgroundColor:t}}),o.createElement("div",{className:M.inputWrap},o.createElement("span",{className:M.inputHash},"#"),o.createElement("input",{type:"text",className:M.input,value:r,onChange:this._handleInput})),o.createElement("div",{className:M.buttonWrap},o.createElement(k.Button,{size:"s",onClick:this._handleAddColor},T))),o.createElement("div",{className:M.hueSaturationWrap},o.createElement(P,{className:M.saturation,hsv:n,onChange:this._handleHSV}),o.createElement(j,{className:M.hue,hsv:n,onChange:this._handleHSV})))},t}(o.PureComponent),D=n("1Kfe"),R=window.t("Add Custom Color",{context:"Color Picker"}),L=window.t("Opacity",{context:"Color Picker"}),F=function(e){function t(t){var n=e.call(this,t)||this;return n._handleAddColor=function(e){n.setState({isCustom:!1}),n._onToggleCustom(!1);var t=n.props.onAddColor;t&&t(e)},n._handleSelectColor=function(e){var t=n.props.onColorChange;t&&t(e)},n._handleCustomClick=function(){n.setState({isCustom:!0}),n._onToggleCustom(!0)},n._handleOpacity=function(e){var t=n.props.onOpacityChange;t&&t(e)},n.state={isCustom:!1},n} +return Object(a.__extends)(t,e),t.prototype.componentDidUpdate=function(e,t){e.selectOpacity!==this.props.selectOpacity&&this.props.menu&&this.props.menu.update()},t.prototype.render=function(){var e=this.props,t=e.color,n=e.opacity,r=e.selectCustom,i=e.selectOpacity,a=e.customColors,c="number"==typeof n?n:1;return this.state.isCustom?o.createElement(W,{color:t,onSelect:this._handleSelectColor,onAdd:this._handleAddColor}):o.createElement("div",{className:D.container},o.createElement(w,{colors:b,color:t,onSelect:this._handleSelectColor}),o.createElement(w,{colors:_,color:t,onSelect:this._handleSelectColor}),o.createElement("div",{className:D.separator}),o.createElement(w,{colors:a,color:t,onSelect:this._handleSelectColor},r&&o.createElement("div",{className:s()(D.customButton,"apply-common-tooltip"),onClick:this._handleCustomClick,title:R})),i&&o.createElement(o.Fragment,null,o.createElement("div",{className:D.sectionTitle},L),o.createElement(E.a,{color:t,opacity:c,onChange:this._handleOpacity})))},t.prototype._onToggleCustom=function(e){var t=this.props.onToggleCustom;t&&t(e)},t}(o.PureComponent),U=n("PN6A");function B(e){var t=e.button,n=e.children,i=e.className,s=e.onPopupClose,h=Object(a.__rest)(e,["button","children","className","onPopupClose"]),d=Object(o.useState)(!1),f=d[0],m=d[1],v=Object(o.useState)(!1),b=v[0],g=v[1],_=Object(p.a)(),C=_[0],y=_[1],w=Object(o.useRef)(null);return r.a.createElement("div",{className:i},r.a.createElement("div",{tabIndex:e.disabled?void 0:-1,ref:w,onClick:E,onFocus:y.onFocus,onBlur:y.onBlur,onKeyDown:k},"function"==typeof t?t(b,C):t),r.a.createElement(u.a,{isOpened:b,onClose:N,position:function(){var e=Object(c.ensureNotNull)(w.current).getBoundingClientRect();return{x:e.left,y:e.top+e.height}},doNotCloseOn:w.current,onKeyDown:k},r.a.createElement(U.a.Consumer,null,(function(e){return r.a.createElement(F,Object(a.__assign)({},h,{onToggleCustom:m,menu:e}))})),!f&&n));function E(){e.disabled||(g((function(e){return!e})),m(!1))}function k(e){switch(Object(l.hashFromEvent)(e)){case 27:b&&(e.preventDefault(),N())}}function N(){E(),Object(c.ensureNotNull)(w.current).focus(),s&&s()}}var G=n("Vdly"),z=n("FQhm");function A(){var e,t,n=Object(o.useState)(Object(G.getJSON)("pickerCustomColors",[])),r=n[0],i=n[1];e="add_new_custom_color",t=function(e){return i(V(e,r))},Object(o.useEffect)((function(){return z.subscribe(e,t,null),function(){z.unsubscribe(e,t,null)}}),[e,t]);var s=Object(o.useCallback)((function(e){var t=e?Object(h.parseRgb)(e):null;r.some((function(e){return null!==e&&null!==t&&Object(h.areEqualRgb)(Object(h.parseRgb)(e),t)}))||(z.emit("add_new_custom_color",e),Object(G.setJSON)("pickerCustomColors",V(e,r)))}),[r]);return[r,s]}function V(e,t){var n=t.slice();return n.push(e),n.length>29&&n.shift(),n}var q=n("Tmoa"),K=n("0W35"),J=n("95N5"),Y=Object(K.makeSwitchGroupItem)(function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._onChange=function(){t.props.onChange&&t.props.onChange(t.props.value)},t}return Object(a.__extends)(t,e), +t.prototype.render=function(){var e,t,n=this.props,r=n.name,s=n.checked,a=n.value,c=i(J.thicknessItem,((e={})[J.checked]=s,e)),l=i(J.bar,((t={})[J.checked]=s,t)),u={borderTopWidth:parseInt(a)};return o.createElement("div",{className:c},o.createElement("input",{type:"radio",className:J.radio,name:r,value:a,onChange:this._onChange,checked:s}),o.createElement("div",{className:l,style:u}," "))},t}(o.PureComponent));function Q(e){var t=e.name,n=e.values,r=e.selectedValues,i=e.onChange,s=n.map((function(e,t){return o.createElement(Y,{key:t,value:e.toString()})})),a=r.map((function(e){return e.toString()}));return o.createElement("div",{className:J.wrap},o.createElement(K.SwitchGroup,{name:t,onChange:function(e){i(parseInt(e))},values:a},s))}var X=n("85uA"),H=window.t("Thickness");function Z(e){return r.a.createElement("div",{className:X.thicknessContainer},r.a.createElement("div",{className:X.thicknessTitle},H),r.a.createElement(Q,{name:"color_picker_thickness_select",onChange:e.onChange,values:e.items,selectedValues:[e.value]}))}var $=n("4bOu");function ee(e){var t=e.className,n=e.selectOpacity,o=void 0===n?void 0!==e.opacity:n,i=e.thickness,a=e.color,c=e.disabled,l=e.opacity,u=void 0===l?1:l,p=e.onColorChange,h=e.onOpacityChange,d=e.onThicknessChange,f=e.thicknessItems,m=e.onPopupClose,v=A(),b=v[0],g=v[1];return r.a.createElement(B,{className:t,disabled:c,color:a,selectOpacity:o,opacity:u,selectCustom:!0,customColors:b,onColorChange:p,onOpacityChange:a?h:void 0,onAddColor:g,button:function(e,t){var n=e||t,o=n?"primary":"default";return r.a.createElement("div",{className:s()($.colorPickerWrap,$["intent-"+o],$["border-thin"],$["size-medium"],n&&$.highlight,n&&$.focused,c&&$.disabled),"data-role":"button","data-name":i?"color-with-thickness-select":"color-select"},r.a.createElement("div",{className:s()($.colorPicker,c&&$.disabled)},a?(l=te(a,u),p=u>=.95&&ne(a),r.a.createElement("div",{className:$.opacitySwatch},r.a.createElement("div",{style:{backgroundColor:l},className:s()($.swatch,p&&$.white)}))):r.a.createElement("div",{className:$.placeholderContainer},r.a.createElement("div",{className:$.placeholder})),i&&r.a.createElement("span",{className:s()($.colorLine,ne(a)&&$.white),style:{height:i,backgroundColor:te(a,u)}})),n&&r.a.createElement("span",{className:$.shadow}));var l,p},onPopupClose:m},i&&f&&r.a.createElement(Z,{value:i,items:f,onChange:function(e){d&&d(e)}}))}function te(e,t){return e?Object(q.generateColor)(e,Object(q.alphaToTransparency)(t)):"#000000"}function ne(e){return!!e&&e.toLowerCase()===f}n.d(t,"a",(function(){return ee}))},"85uA":function(e,t,n){e.exports={thicknessContainer:"thicknessContainer-1lrdH7bz",thicknessTitle:"thicknessTitle-2nZV_6CD"}},"8d0Q":function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return i}));var o=n("q1tI");function r(){var e=Object(o.useState)(!1),t=e[0],n=e[1];return[t,{onMouseOver:function(e){i(e)&&n(!0)},onMouseOut:function(e){i(e)&&n(!1)}}]}function i(e){return!e.currentTarget.contains(e.relatedTarget)}},"95N5":function(e,t,n){e.exports={ +wrap:"wrap-3KIz6IQG",thicknessItem:"thicknessItem-1D40arGe",checked:"checked-pDy7EtmX",radio:"radio-mk150mXO",bar:"bar-3l4jwcsX"}},ASyk:function(e,t,n){e.exports={"tablet-normal-breakpoint":"screen and (max-width: 768px)","small-height-breakpoint":"screen and (max-height: 360px)","tablet-small-breakpoint":"screen and (max-width: 419px)"}},DXuF:function(e,t,n){e.exports={swatches:"swatches-2NO2y7Xs",swatch:"swatch-CMyFZXry",empty:"empty-1lteEy1B",white:"white-RBcZELAh",selected:"selected-3mQR-gqr"}},E9Pn:function(e,t,n){},F0Qt:function(e){e.exports=JSON.parse('{"wrapper":"wrapper-21v50zE8","input":"input-24iGIobO","box":"box-3574HVnv","icon":"icon-2jsUbtec","noOutline":"noOutline-3VoWuntz","check":"check-382c8Fu1","dot":"dot-3gRd-7Qt"}')},O6kz:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.makeSwitchGroupItem=void 0;var o=n("mrSG"),r=n("q1tI"),i=n("17x9");t.makeSwitchGroupItem=function(e){var t;return(t=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e._onChange=function(t){e.context.switchGroupContext.getOnChange()(t)},e._onUpdate=function(t){t.includes(e.props.value)&&e.forceUpdate()},e}return o.__extends(n,t),n.prototype.componentDidMount=function(){this.context.switchGroupContext.subscribe(this._onUpdate)},n.prototype.render=function(){return r.createElement(e,o.__assign({},this.props,{name:this._getName(),onChange:this._onChange,checked:this._isChecked()}))},n.prototype.componentWillUnmount=function(){this.context.switchGroupContext.unsubscribe(this._onUpdate)},n.prototype._getName=function(){return this.context.switchGroupContext.getName()},n.prototype._isChecked=function(){return this.context.switchGroupContext.getValues().includes(this.props.value)},n}(r.PureComponent)).contextTypes={switchGroupContext:i.any.isRequired},t}},OGHR:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SwitchGroup=void 0;var o=n("mrSG"),r=n("q1tI"),i=n("17x9"),s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._subscriptions=new Set,t._getName=function(){return t.props.name},t._getValues=function(){return t.props.values},t._getOnChange=function(){return t.props.onChange},t._subscribe=function(e){t._subscriptions.add(e)},t._unsubscribe=function(e){t._subscriptions.delete(e)},t}return o.__extends(t,e),t.prototype.getChildContext=function(){return{switchGroupContext:{getName:this._getName,getValues:this._getValues,getOnChange:this._getOnChange,subscribe:this._subscribe,unsubscribe:this._unsubscribe}}},t.prototype.render=function(){return this.props.children},t.prototype.componentDidUpdate=function(e){this._notify(this._getUpdates(this.props.values,e.values))},t.prototype._notify=function(e){this._subscriptions.forEach((function(t){return t(e)}))},t.prototype._getUpdates=function(e,t){return o.__spreadArrays(t,e).filter((function(n){return t.includes(n)?!e.includes(n):e.includes(n)}))},t.childContextTypes={switchGroupContext:i.any.isRequired},t}(r.PureComponent);t.SwitchGroup=s},Oqo1:function(e,t,n){e.exports={ +opacity:"opacity-2aYjtVUz",opacitySlider:"opacitySlider-2S5vLqQZ",opacitySliderGradient:"opacitySliderGradient-1uUWtQAG",pointer:"pointer-3pBhp8nL",dragged:"dragged-1FWLoCMd",opacityPointerWrap:"opacityPointerWrap-133eLPOE",opacityInputWrap:"opacityInputWrap-1okRhpq9",opacityInput:"opacityInput-1A9bqplo",opacityInputPercent:"opacityInputPercent-n0mDvs0P"}},"P4l+":function(e,t,n){},"Q+1u":function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var o=n("mrSG"),r=n("q1tI"),i=n("TSYQ"),s=n("Eyy1"),a=n("QpNh"),c=n("qFKp"),l=n("6ix9"),u=r.createContext(null),p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._rows=new WeakMap,t._rowCount=1,t}return Object(o.__extends)(t,e),t.prototype.render=function(){return r.createElement(u.Provider,{value:this},r.createElement("div",{ref:this.props.reference,className:i(l.content,c.isIE&&l.ie)},this.props.children))},t.prototype.getRowIndex=function(e){var t=this._rows.get(e);return void 0===t&&(t=this._rowCount++,this._rows.set(e,t)),t},t}(r.PureComponent),h=r.createContext(0),d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(o.__extends)(t,e),t.prototype.render=function(){return r.createElement(h.Provider,{value:Object(s.ensureNotNull)(this.context).getRowIndex(this)},this.props.children)},t.contextType=u,t}(r.PureComponent);function f(e){return c.isIE?{msGridRow:e}:void 0}p.Row=d,p.Cell=function(e){var t=i(l.cell,e.offset&&l.offset,e.grouped&&l.grouped,"top"===e.verticalAlign&&l.top,"adaptive"===e.verticalAlign&&l.adaptive,e.checkableTitle&&l.checkableTitle,2===e.colSpan&&l.fill,"first"===e.placement&&2!==e.colSpan&&l.first,"last"===e.placement&&2!==e.colSpan&&l.last),n=Object(a.a)(e);return r.createElement(h.Consumer,null,(function(s){return r.createElement("div",Object(o.__assign)({},n,{className:t,style:f(s)}),r.createElement("div",{className:i(l.inner,e.className)},e.children))}))},p.Separator=function(e){return r.createElement(p.Row,null,r.createElement(h.Consumer,null,(function(e){return r.createElement("div",{className:i(l.cell,l.separator,l.fill),style:f(e)})})))},p.GroupSeparator=function(e){var t=e.size||0;return r.createElement(p.Row,null,r.createElement(h.Consumer,null,(function(e){return r.createElement("div",{className:i(l.cell,l.groupSeparator,l.fill,1===t&&l.big),style:f(e)})})))}},"R4+T":function(e,t){e.exports=''},U1eG:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var o=n("mrSG"),r=n("q1tI"),i=n("TSYQ"),s=n("Eyy1"),a=n("Hr11"),c=n("Oqo1"),l=function(e){function t(t){var n=e.call(this,t)||this;return n._container=null,n._pointer=null,n._raf=null,n._refContainer=function(e){n._container=e},n._refPointer=function(e){n._pointer=e},n._handlePosition=function(e){null===n._raf&&(n._raf=requestAnimationFrame((function(){ +var t=Object(s.ensureNotNull)(n._container),o=Object(s.ensureNotNull)(n._pointer),r=t.getBoundingClientRect(),i=o.offsetWidth,c=e.clientX-i/2-r.left,l=Object(a.clamp)(c/(r.width-i),0,1);n.setState({inputOpacity:Math.round(100*l).toString()}),n.props.onChange(l),n._raf=null})))},n._onSliderClick=function(e){n._handlePosition(e.nativeEvent),n._dragSubscribe()},n._mouseUp=function(e){n.setState({isPointerDragged:!1}),n._dragUnsubscribe(),n._handlePosition(e)},n._mouseMove=function(e){n.setState({isPointerDragged:!0}),n._handlePosition(e)},n._onTouchStart=function(e){n._handlePosition(e.nativeEvent.touches[0])},n._handleTouch=function(e){n.setState({isPointerDragged:!0}),n._handlePosition(e.nativeEvent.touches[0])},n._handleTouchEnd=function(){n.setState({isPointerDragged:!1})},n._handleInput=function(e){var t=e.currentTarget.value,o=Number(t)/100;n.setState({inputOpacity:t}),Number.isNaN(o)||o>1||n.props.onChange(o)},n.state={inputOpacity:Math.round(100*t.opacity).toString(),isPointerDragged:!1},n}return Object(o.__extends)(t,e),t.prototype.componentWillUnmount=function(){null!==this._raf&&(cancelAnimationFrame(this._raf),this._raf=null),this._dragUnsubscribe()},t.prototype.render=function(){var e=this.props,t=e.color,n=e.opacity,o=e.hideInput,s=this.state,a=s.inputOpacity,l=s.isPointerDragged,u={color:t||void 0};return r.createElement("div",{className:c.opacity},r.createElement("div",{className:c.opacitySlider,style:u,ref:this._refContainer,onMouseDown:this._onSliderClick,onTouchStart:this._onTouchStart,onTouchMove:this._handleTouch,onTouchEnd:this._handleTouchEnd},r.createElement("div",{className:c.opacitySliderGradient,style:{backgroundImage:"linear-gradient(90deg, transparent, "+t+")"}}),r.createElement("div",{className:c.opacityPointerWrap},r.createElement("div",{className:i(c.pointer,l&&c.dragged),style:{left:100*n+"%"},ref:this._refPointer}))),!o&&r.createElement("div",{className:c.opacityInputWrap},r.createElement("input",{type:"text",className:c.opacityInput,value:a,onChange:this._handleInput}),r.createElement("span",{className:c.opacityInputPercent},"%")))},t.prototype._dragSubscribe=function(){var e=Object(s.ensureNotNull)(this._container).ownerDocument;e&&(e.addEventListener("mouseup",this._mouseUp),e.addEventListener("mousemove",this._mouseMove))},t.prototype._dragUnsubscribe=function(){var e=Object(s.ensureNotNull)(this._container).ownerDocument;e&&(e.removeEventListener("mousemove",this._mouseMove),e.removeEventListener("mouseup",this._mouseUp))},t}(r.PureComponent)},WboT:function(e,t,n){"use strict";var o=n("mrSG"),r=n("q1tI"),i=n.n(r),s=(n("EsMY"),n("TSYQ")),a=n("kSQs"),c=n("Eyy1"),l=n("Ialn"),u=n("qFKp"),p=n("ZgM/"),h={attachment:{horizontal:"left",vertical:"bottom"},targetAttachment:{horizontal:"left",vertical:"top"}},d=function(e){function t(t){var n=e.call(this,t)||this;return n._input=null,n._buttons=null,n._innerLabel=null,n._container=null,n._onBlur=function(e){n.setState({focused:!1}),n.props.onBlur&&n.props.onBlur(e)},n._onFocus=function(e){n.setState({focused:!0}), +n.props.onFocus&&n.props.onFocus(e)},n._containerFocus=function(e){(!Modernizr.mobiletouch&&n._buttons&&n._buttons.contains(e.target)||n._innerLabel&&n._innerLabel.contains(e.target))&&Object(c.ensureNotNull)(n._input).focus()},n._setContainerRef=function(e){n._container=e,n.props.containerReference&&n.props.containerReference(e)},n._setInputRef=function(e){n._input=e,n.props.inputReference&&n.props.inputReference(e)},n._setButtonsRef=function(e){n._buttons=e},n._setInnerLabelRef=function(e){n._innerLabel=e},n.state={focused:!1},n}return Object(o.__extends)(t,e),t.prototype.componentDidMount=function(){this.props.onWheelNoPassive&&this._addPassiveListenerOnWheel(this.props.onWheelNoPassive)},t.prototype.componentDidUpdate=function(e){this.props.onWheelNoPassive!==e.onWheelNoPassive&&this._updatePassiveListenerOnWheel(e.onWheelNoPassive)},t.prototype.componentWillUnmount=function(){this.props.onWheelNoPassive&&this._removePassiveListenerOnWheel(this.props.onWheelNoPassive)},t.prototype.render=function(){var e;this.props.error?e=p.error:this.props.warning&&(e=p.warning);var t=this.props,n=t.borderStyle,o=void 0===n?"thick":n,i=t.fontSizeStyle,a=void 0===i?"large":i,c=s(p.inputWithErrorWrapper,"thick"===o&&p.thickBorder,this.props.className,this.state.focused&&!this.props.disabled&&p.focused,e,this.props.disabled&&p.disabled,this.props.readOnly&&p.readonly),h=s(p.innerInput,"large"===a&&p.largeFont,Object(l.isRtl)()&&!u.isChrome&&p.innerInputFix);return r.createElement("div",{className:c},r.createElement("div",{className:p.inputWithError,ref:this._setContainerRef,onMouseOver:this.props.onMouseOver,onMouseOut:this.props.onMouseOut,onClick:this.props.onClick,onFocus:this._containerFocus,onWheel:this.props.onWheel},r.createElement("div",{className:s(p.inputContainer,Object(l.isRtl)()&&!u.isChrome&&p.inputContainerFix)},this.props.innerLabel&&r.createElement("div",{className:p.innerLabel,tabIndex:-1,ref:this._setInnerLabelRef},this.props.innerLabel),r.createElement("div",{className:p.innerInputContainer},r.createElement("input",{name:this.props.name,ref:this._setInputRef,className:h,pattern:this.props.pattern,type:this.props.type||"text",value:this.props.value,placeholder:this.props.placeholder,readOnly:this.props.readOnly,disabled:this.props.disabled,inputMode:this.props.inputMode,onBlur:this._onBlur,onChange:this.props.onChange,onClick:this.props.onInputClick,onFocus:this._onFocus,onKeyDown:this.props.onKeyDown,onKeyUp:this.props.onKeyUp})),r.createElement("div",{className:p.iconBlock,tabIndex:-1,ref:this._setButtonsRef},this.props.button)),this.props.children),this._renderError())},t.prototype._renderError=function(){return void 0!==this.props.errorMessage?r.createElement(a.a,{root:"document",show:!0,isOpened:this.props.showErrorMessage,targetAttachment:h.targetAttachment,attachment:h.attachment,target:this._container||void 0,inheritWidthFromTarget:!0,customErrorClass:p.errorMessage,attachmentOffsetY:-4},[this.props.errorMessage]):void 0},t.prototype._updatePassiveListenerOnWheel=function(e){ +e&&this._removePassiveListenerOnWheel(e),this.props.onWheelNoPassive&&this._addPassiveListenerOnWheel(this.props.onWheelNoPassive)},t.prototype._addPassiveListenerOnWheel=function(e){Object(c.ensureNotNull)(this._container).addEventListener("wheel",e,{passive:!1})},t.prototype._removePassiveListenerOnWheel=function(e){Object(c.ensureNotNull)(this._container).removeEventListener("wheel",e)},t}(r.PureComponent),f=n("Iivm"),m=n("R4+T"),v=n("uZsJ");function b(e){var t=s(v.control,v.controlIncrease),n=s(v.control,v.controlDecrease);return r.createElement("div",{className:s(v.controlWrapper,!e.visible&&v.hidden)},r.createElement("div",{className:t,onClick:e.increaseValue},r.createElement(f.Icon,{icon:m,className:v.increaseControlIcon})),r.createElement("div",{className:n,onClick:e.decreaseValue},r.createElement(f.Icon,{icon:m,className:v.decreaseControlIcon})))}var g=n("8d0Q"),_=n("Oi2w"),C=n("l9+T"),y=n("/3z9");n.d(t,"a",(function(){return k}));var w=[38],E=[40];function k(e){var t,n,r=Object(g.b)(),s=r[0],a=r[1],c=Object(_.a)(),l=c[0],u=c[1],p=Object(C.a)(u.onFocus,e.onFocus),h=Object(C.a)(u.onBlur,e.onBlur);return i.a.createElement(d,Object(o.__assign)({},a,{name:e.name,pattern:e.pattern,borderStyle:e.borderStyle,fontSizeStyle:e.fontSizeStyle,value:e.value,className:e.className,button:(t=e.button,n=e.forceShowControls,e.disabled?void 0:i.a.createElement(i.a.Fragment,null,t||i.a.createElement(b,{visible:!Modernizr.mobiletouch&&(n||l||s),increaseValue:f,decreaseValue:m}))),disabled:e.disabled,placeholder:e.placeholder,innerLabel:e.innerLabel,containerReference:e.containerReference,inputReference:e.inputReference,inputMode:e.inputMode,error:e.error,errorMessage:e.errorMessage,showErrorMessage:e.error&&s,onClick:e.onClick,onFocus:p,onBlur:h,onChange:e.onValueChange,onKeyDown:function(t){if(e.disabled||0!==Object(y.modifiersFromEvent)(t.nativeEvent))return;var n=w,o=E;e.controlDecKeyCodes&&(o=o.concat(e.controlDecKeyCodes));e.controlIncKeyCodes&&(n=n.concat(e.controlIncKeyCodes));(o.includes(t.keyCode)||n.includes(t.keyCode))&&(t.preventDefault(),e.onValueByStepChange(o.includes(t.keyCode)?-1:1));e.onKeyDown&&e.onKeyDown(t)},onWheelNoPassive:function(t){if(e.disabled)return;if(!l)return;t.preventDefault(),t.deltaY<0?e.onValueByStepChange(1):e.onValueByStepChange(-1)}}));function f(){e.disabled||e.onValueByStepChange(1)}function m(){e.disabled||e.onValueByStepChange(-1)}}},"ZgM/":function(e,t,n){e.exports={inputWithErrorWrapper:"inputWithErrorWrapper-3VldItns",disabled:"disabled-1H5pTmbC",thickBorder:"thickBorder-17UV-SuS",readonly:"readonly-3wmbSVwP",focused:"focused-3rk113Ah",innerInput:"innerInput-29Ku0bwF",error:"error-32uXEKXM",warning:"warning-1fcuxDP3",inputWithError:"inputWithError-1wKt_k8s",inputContainer:"inputContainer-2JfcvOzg",inputContainerFix:"inputContainerFix-3bYyvsOT",innerInputContainer:"innerInputContainer-FSOtBYl0",largeFont:"largeFont-1Tlrlf5g",innerInputFix:"innerInputFix-3nQEuMmn",errorMessage:"errorMessage-3U3e1ayv",iconBlock:"iconBlock-1uOkuIhU",innerLabel:"innerLabel-1oKvCwg6"}}, +Zzxg:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GroupedCheckbox=t.Checkbox=void 0;var o=n("mrSG"),r=n("q1tI"),i=n("TSYQ"),s=n("0W35"),a=n("vCF3"),c=n("qibD");n("E9Pn");var l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o.__extends(t,e),t.prototype.render=function(){var e,t,n=i(this.props.className,c.checkbox,((e={})[c.reverse]=Boolean(this.props.labelPositionReverse),e[c.baseline]=Boolean(this.props.labelAlignBaseline),e)),s=i(c.label,((t={})[c.disabled]=this.props.disabled,t)),l=null;return this.props.label&&(l=r.createElement("span",{className:s},this.props.label)),r.createElement("label",{className:n},r.createElement(a.CheckboxInput,o.__assign({},this.props)),l)},t.defaultProps={value:"on"},t}(r.PureComponent);t.Checkbox=l,t.GroupedCheckbox=s.makeSwitchGroupItem(l)},aJjg:function(e,t){e.exports=''},fV0y:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n("mrSG").__exportStar(n("Zzxg"),t)},"jpE+":function(e,t,n){e.exports={hue:"hue-2mlXxlkM",pointer:"pointer-3fNcCimp",pointerContainer:"pointerContainer-1T_sOwrr"}},lY1a:function(e,t,n){e.exports={saturation:"saturation-2SLmW8C-",pointer:"pointer-2fX2g8ap"}},nc0P:function(e,t,n){var o;!function(r){"use strict";var i,s="[big.js] ",a=s+"Invalid ",c=a+"decimal places",l={},u=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;function p(e,t,n,o){var r=e.c,i=e.e+t+1;if(i=5;else if(2===n)o=r[i]>5||5==r[i]&&(o||i<0||void 0!==r[i+1]||1&r[i-1]);else if(3===n)o=o||!!r[0];else if(o=!1,0!==n)throw Error("[big.js] Invalid rounding mode");if(i<1)r.length=1,o?(e.e=-t,r[0]=1):r[0]=e.e=0;else{if(r.length=i--,o)for(;++r[i]>9;)r[i]=0,i--||(++e.e,r.unshift(1));for(i=r.length;!r[--i];)r.pop()}}else if(n<0||n>3||n!==~~n)throw Error("[big.js] Invalid rounding mode");return e}function h(e,t,n,o){var r,i,s=e.constructor,l=!e.c[0];if(void 0!==n){if(n!==~~n||n<(3==t)||n>1e6)throw Error(3==t?a+"precision":c);for(n=o-(e=new s(e)).e,e.c.length>++o&&p(e,n,s.RM),2==t&&(o=e.e+n+1);e.c.length=s.PE))i=i.charAt(0)+(n>1?"."+i.slice(1):"")+(r<0?"e":"e+")+r;else if(r<0){for(;++r;)i="0"+i;i="0."+i}else if(r>0)if(++r>n)for(r-=n;r--;)i+="0";else r1&&(i=i.charAt(0)+"."+i.slice(1));return e.s<0&&(!l||4==t)?"-"+i:i}l.abs=function(){var e=new this.constructor(this);return e.s=1,e},l.cmp=function(e){var t,n=this,o=n.c,r=(e=new n.constructor(e)).c,i=n.s,s=e.s,a=n.e,c=e.e;if(!o[0]||!r[0])return o[0]?i:r[0]?-s:0;if(i!=s)return i;if(t=i<0,a!=c)return a>c^t?1:-1;for(s=(a=o.length)<(c=r.length)?a:c,i=-1;++ir[i]^t?1:-1;return a==c?0:a>c^t?1:-1},l.div=function(e){var t=this,n=t.constructor,o=t.c,r=(e=new n(e)).c,i=t.s==e.s?1:-1,s=n.DP;if(s!==~~s||s<0||s>1e6)throw Error(c) +;if(!r[0])throw Error("[big.js] Division by zero");if(!o[0])return new n(0*i);var a,l,u,h,d,f=r.slice(),m=a=r.length,v=o.length,b=o.slice(0,a),g=b.length,_=e,C=_.c=[],y=0,w=s+(_.e=t.e-e.e)+1;for(_.s=i,i=w<0?0:w,f.unshift(0);g++g?1:-1;else for(d=-1,h=0;++db[d]?1:-1;break}if(!(h<0))break;for(l=g==a?r:f;g;){if(b[--g]w&&p(_,s,n.RM,void 0!==b[0]),_},l.eq=function(e){return!this.cmp(e)},l.gt=function(e){return this.cmp(e)>0},l.gte=function(e){return this.cmp(e)>-1},l.lt=function(e){return this.cmp(e)<0},l.lte=function(e){return this.cmp(e)<1},l.minus=l.sub=function(e){var t,n,o,r,i=this,s=i.constructor,a=i.s,c=(e=new s(e)).s;if(a!=c)return e.s=-c,i.plus(e);var l=i.c.slice(),u=i.e,p=e.c,h=e.e;if(!l[0]||!p[0])return p[0]?(e.s=-c,e):new s(l[0]?i:0);if(a=u-h){for((r=a<0)?(a=-a,o=l):(h=u,o=p),o.reverse(),c=a;c--;)o.push(0);o.reverse()}else for(n=((r=l.length0)for(;c--;)l[t++]=0;for(c=t;n>a;){if(l[--n]0?(c=s,t=l):(r=-r,t=a),t.reverse();r--;)t.push(0);t.reverse()}for(a.length-l.length<0&&(t=l,l=a,a=t),r=l.length,i=0;r;a[r]%=10)i=(a[--r]=a[r]+l[r]+i)/10|0;for(i&&(a.unshift(i),++c),r=a.length;0===a[--r];)a.pop();return e.c=a,e.e=c,e},l.pow=function(e){var t=this,n=new t.constructor(1),o=n,r=e<0;if(e!==~~e||e<-1e6||e>1e6)throw Error(a+"exponent");for(r&&(e=-e);1&e&&(o=o.times(t)),e>>=1;)t=t.times(t);return r?n.div(o):o},l.round=function(e,t){var n=this.constructor;if(void 0===e)e=0;else if(e!==~~e||e<-1e6||e>1e6)throw Error(c);return p(new n(this),e,void 0===t?n.RM:t)},l.sqrt=function(){var e,t,n,o=this,r=o.constructor,i=o.s,a=o.e,c=new r(.5);if(!o.c[0])return new r(o);if(i<0)throw Error(s+"No square root");0===(i=Math.sqrt(o+""))||i===1/0?((t=o.c.join("")).length+a&1||(t+="0"),a=((a+1)/2|0)-(a<0||1&a),e=new r(((i=Math.sqrt(t))==1/0?"1e":(i=i.toExponential()).slice(0,i.indexOf("e")+1))+a)):e=new r(i),a=e.e+(r.DP+=4);do{n=e,e=c.times(n.plus(o.div(n)))}while(n.c.slice(0,a).join("")!==e.c.slice(0,a).join(""));return p(e,r.DP-=4,r.RM)},l.times=l.mul=function(e){ +var t,n=this,o=n.constructor,r=n.c,i=(e=new o(e)).c,s=r.length,a=i.length,c=n.e,l=e.e;if(e.s=n.s==e.s?1:-1,!r[0]||!i[0])return new o(0*e.s);for(e.e=c+l,sc;)a=t[l]+i[c]*r[l-c-1]+a,t[l--]=a%10,a=a/10|0;t[l]=(t[l]+a)%10}for(a?++e.e:t.shift(),c=t.length;!t[--c];)t.pop();return e.c=t,e},l.toExponential=function(e){return h(this,1,e,e)},l.toFixed=function(e){return h(this,2,e,this.e+e)},l.toPrecision=function(e){return h(this,3,e,e-1)},l.toString=function(){return h(this)},l.valueOf=l.toJSON=function(){return h(this,4)},(i=function e(){function t(n){var o=this;if(!(o instanceof t))return void 0===n?e():new t(n);n instanceof t?(o.s=n.s,o.e=n.e,o.c=n.c.slice()):function(e,t){var n,o,r;if(0===t&&1/t<0)t="-0";else if(!u.test(t+=""))throw Error(a+"number");e.s="-"==t.charAt(0)?(t=t.slice(1),-1):1,(n=t.indexOf("."))>-1&&(t=t.replace(".",""));(o=t.search(/e/i))>0?(n<0&&(n=o),n+=+t.slice(o+1),t=t.substring(0,o)):n<0&&(n=t.length);for(r=t.length,o=0;o0&&"0"==t.charAt(--r););for(e.e=n-o-1,e.c=[],n=0;o<=r;)e.c[n++]=+t.charAt(o++)}}(o,n),o.constructor=t}return t.prototype=l,t.DP=20,t.RM=1,t.NE=-7,t.PE=21,t.version="5.2.2",t}()).default=i.Big=i,void 0===(o=function(){return i}.call(t,n,t,e))||(e.exports=o)}()},qibD:function(e){e.exports=JSON.parse('{"checkbox":"checkbox-3xZUD-2M","reverse":"reverse-3xeTx96y","label":"label-cyItEVpF","baseline":"baseline-6TXKro4X"}')},uJfL:function(e,t,n){e.exports={container:"container-1-OmVBa-",form:"form-1PwJY7C7",swatch:"swatch-1yekatxU",inputWrap:"inputWrap-11zHN5-G",inputHash:"inputHash-2IZ-P-A4",input:"input-35LrVJJj",buttonWrap:"buttonWrap-37bmOXG9",hueSaturationWrap:"hueSaturationWrap-2qtz1WJa",saturation:"saturation-3duvfnxs",hue:"hue-31zIOKyJ"}},uZsJ:function(e,t,n){e.exports={controlWrapper:"controlWrapper-skuqZLfC",hidden:"hidden-3NLdXwWA",control:"control-1HTkHp6S",controlIncrease:"controlIncrease-2YFIq5Gk",controlDecrease:"controlDecrease-3RZJUOOQ",increaseControlIcon:"increaseControlIcon-1tvvZsEf",decreaseControlIcon:"decreaseControlIcon-O8mAFFIw"}},uhCe:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var o=n("ASyk"),r={SmallHeight:o["small-height-breakpoint"],TabletSmall:o["tablet-small-breakpoint"],TabletNormal:o["tablet-normal-breakpoint"]}},vCF3:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CheckboxInput=void 0;var o=n("q1tI"),r=n("TSYQ"),i=n("Iivm"),s=n("aJjg"),a=n("F0Qt");n("P4l+"),t.CheckboxInput=function(e){var t,n=r(a.box,((t={})[a.check]=!Boolean(e.indeterminate),t[a.dot]=Boolean(e.indeterminate),t[a.noOutline]=-1===e.tabIndex,t));return o.createElement("div",{className:a.wrapper,title:e.title},o.createElement("input",{id:e.id,tabIndex:e.tabIndex,className:a.input,type:"checkbox",name:e.name,checked:e.checked,disabled:e.disabled,value:e.value,autoFocus:e.autoFocus,role:e.role,onChange:function(){e.onChange&&e.onChange(e.value)},ref:e.reference}),o.createElement("div",{className:n +},o.createElement(i.Icon,{icon:s,className:a.icon})))}}}]); \ No newline at end of file diff --git a/public/charting_library/bundles/29.4c923634e8711048f68e.js b/public/charting_library/bundles/29.4c923634e8711048f68e.js new file mode 100644 index 00000000..5f320a5c --- /dev/null +++ b/public/charting_library/bundles/29.4c923634e8711048f68e.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[29],[]]); \ No newline at end of file diff --git a/public/charting_library/bundles/29.848432cc94542f647449.css b/public/charting_library/bundles/29.848432cc94542f647449.css new file mode 100644 index 00000000..372be860 --- /dev/null +++ b/public/charting_library/bundles/29.848432cc94542f647449.css @@ -0,0 +1 @@ +.inputWithErrorWrapper-3VldItns{display:block;position:relative;z-index:0;box-sizing:border-box;height:34px;box-shadow:inset 0 0 0 1px transparent;border:1px solid #d1d4dc;border-radius:4px;background-color:transparent;font-size:15px;color:#131722;-webkit-appearance:none;-moz-appearance:none;appearance:none;transition:border-color 87.5ms ease,box-shadow 87.5ms ease}html.theme-dark .inputWithErrorWrapper-3VldItns{color:#b2b5be;border:1px solid #50535e}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.inputWithErrorWrapper-3VldItns:hover{z-index:1;border-color:#b2b5be}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .inputWithErrorWrapper-3VldItns:hover{border-color:#6a6d78}}.disabled-1H5pTmbC{border-color:#d1d4dc;background-color:#f0f3fa;color:#b2b5be}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.disabled-1H5pTmbC:hover{border-color:#d1d4dc;background-color:#f0f3fa;color:#b2b5be}}html.theme-dark .disabled-1H5pTmbC{color:#50535e}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .disabled-1H5pTmbC:hover{color:#50535e}}html.theme-dark .disabled-1H5pTmbC{background-color:#2a2e39}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .disabled-1H5pTmbC:hover{background-color:#2a2e39}}html.theme-dark .disabled-1H5pTmbC{border-color:#50535e}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .disabled-1H5pTmbC:hover{border-color:#50535e}}.disabled-1H5pTmbC.thickBorder-17UV-SuS{box-shadow:inset 0 0 0 1px transparent}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.disabled-1H5pTmbC:hover.thickBorder-17UV-SuS{box-shadow:inset 0 0 0 1px transparent}}.readonly-3wmbSVwP{border-color:#b2b5be;background-color:#f0f3fa}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.readonly-3wmbSVwP:hover{border-color:#b2b5be;background-color:#f0f3fa}}html.theme-dark .readonly-3wmbSVwP{background-color:#50535e}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .readonly-3wmbSVwP:hover{background-color:#50535e}}html.theme-dark .readonly-3wmbSVwP{border-color:#50535e}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .readonly-3wmbSVwP:hover{border-color:#50535e}}.readonly-3wmbSVwP.thickBorder-17UV-SuS{box-shadow:inset 0 0 0 1px transparent}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.readonly-3wmbSVwP:hover.thickBorder-17UV-SuS{box-shadow:inset 0 0 0 1px transparent}}.inputWithErrorWrapper-3VldItns.focused-3rk113Ah{border-color:#2196f3;z-index:2}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.inputWithErrorWrapper-3VldItns.focused-3rk113Ah:hover{border-color:#2196f3;z-index:2}}html.theme-dark .inputWithErrorWrapper-3VldItns.focused-3rk113Ah{border-color:#1976d2}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .inputWithErrorWrapper-3VldItns.focused-3rk113Ah:hover{border-color:#1976d2}}.inputWithErrorWrapper-3VldItns.focused-3rk113Ah.thickBorder-17UV-SuS{box-shadow:inset 0 0 0 1px #2196f3!important}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.inputWithErrorWrapper-3VldItns.focused-3rk113Ah:hover.thickBorder-17UV-SuS{box-shadow:inset 0 0 0 1px #2196f3!important}}html.theme-dark .inputWithErrorWrapper-3VldItns.focused-3rk113Ah.thickBorder-17UV-SuS{box-shadow:inset 0 0 0 1px #1976d2!important}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .inputWithErrorWrapper-3VldItns.focused-3rk113Ah:hover.thickBorder-17UV-SuS{box-shadow:inset 0 0 0 1px #1976d2!important}}.inputWithErrorWrapper-3VldItns.focused-3rk113Ah .innerInput-29Ku0bwF{color:#131722}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.inputWithErrorWrapper-3VldItns.focused-3rk113Ah:hover .innerInput-29Ku0bwF{color:#131722}}html.theme-dark .inputWithErrorWrapper-3VldItns.focused-3rk113Ah .innerInput-29Ku0bwF{color:#b2b5be}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .inputWithErrorWrapper-3VldItns.focused-3rk113Ah:hover .innerInput-29Ku0bwF{color:#b2b5be}}.inputWithErrorWrapper-3VldItns.focused-3rk113Ah .innerInput-29Ku0bwF::placeholder{opacity:1;color:#e0e3eb}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.inputWithErrorWrapper-3VldItns.focused-3rk113Ah:hover .innerInput-29Ku0bwF::placeholder{opacity:1;color:#e0e3eb}}html.theme-dark .inputWithErrorWrapper-3VldItns.focused-3rk113Ah .innerInput-29Ku0bwF::placeholder{color:#363a45}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .inputWithErrorWrapper-3VldItns.focused-3rk113Ah:hover .innerInput-29Ku0bwF::placeholder{color:#363a45}}.inputWithErrorWrapper-3VldItns.error-32uXEKXM{border-color:#ef5350}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.inputWithErrorWrapper-3VldItns.error-32uXEKXM:hover{border-color:#ef5350}}html.theme-dark .inputWithErrorWrapper-3VldItns.error-32uXEKXM{border-color:#e53935}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .inputWithErrorWrapper-3VldItns.error-32uXEKXM:hover{border-color:#e53935}}.inputWithErrorWrapper-3VldItns.error-32uXEKXM.thickBorder-17UV-SuS{box-shadow:inset 0 0 0 1px #ef5350!important}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.inputWithErrorWrapper-3VldItns.error-32uXEKXM:hover.thickBorder-17UV-SuS{box-shadow:inset 0 0 0 1px #ef5350!important}}html.theme-dark .inputWithErrorWrapper-3VldItns.error-32uXEKXM.thickBorder-17UV-SuS{box-shadow:inset 0 0 0 1px #e53935!important}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .inputWithErrorWrapper-3VldItns.error-32uXEKXM:hover.thickBorder-17UV-SuS{box-shadow:inset 0 0 0 1px #e53935!important}}.inputWithErrorWrapper-3VldItns.error-32uXEKXM .innerInput-29Ku0bwF{color:#ef5350}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.inputWithErrorWrapper-3VldItns.error-32uXEKXM:hover .innerInput-29Ku0bwF{color:#ef5350}}html.theme-dark .inputWithErrorWrapper-3VldItns.error-32uXEKXM .innerInput-29Ku0bwF{color:#e53935}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .inputWithErrorWrapper-3VldItns.error-32uXEKXM:hover .innerInput-29Ku0bwF{color:#e53935}}.inputWithErrorWrapper-3VldItns.warning-1fcuxDP3 .innerInput-29Ku0bwF{color:#ef6c00}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.inputWithErrorWrapper-3VldItns.warning-1fcuxDP3:hover .innerInput-29Ku0bwF{color:#ef6c00}}html.theme-dark .inputWithErrorWrapper-3VldItns.warning-1fcuxDP3 .innerInput-29Ku0bwF{color:#ef6c00}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .inputWithErrorWrapper-3VldItns.warning-1fcuxDP3:hover .innerInput-29Ku0bwF{color:#ef6c00}}.inputWithError-1wKt_k8s{flex:0 0 auto;justify-content:space-between;box-sizing:border-box}.inputContainer-2JfcvOzg,.inputWithError-1wKt_k8s{display:flex;position:relative;align-items:center;height:100%}.inputContainer-2JfcvOzg{width:100%}.inputContainerFix-3bYyvsOT{flex-direction:row}.innerInputContainer-FSOtBYl0{display:flex;flex:1 1 auto;align-items:center;justify-content:space-between}.innerInput-29Ku0bwF{display:block;width:100%;height:100%;border:none;padding:0 3px 0 8px;background-color:transparent;box-shadow:0 0 0 0 transparent;font-size:14px;-webkit-appearance:none;-moz-appearance:none;appearance:none;transition:color .35s ease;box-sizing:border-box;-webkit-text-fill-color:currentColor}.innerInput-29Ku0bwF.largeFont-1Tlrlf5g{font-size:16px}.innerInput-29Ku0bwF::placeholder{opacity:1;color:#c1c4cd}html.theme-dark .innerInput-29Ku0bwF::placeholder{color:#2a2e39}.innerInput-29Ku0bwF::selection{background:rgba(33,150,243,.25)}html.theme-dark .innerInput-29Ku0bwF::selection{background:rgba(25,118,210,.25)}.innerInputFix-3nQEuMmn{direction:ltr;text-align:left;padding:0 3px 0 8px}.errorMessage-3U3e1ayv{padding:5px 8px;font-size:12px;line-height:14px;color:#fff;background-color:#2a2e39;box-sizing:border-box}html.theme-dark .errorMessage-3U3e1ayv{background-color:#434651;color:#b2b5be}.errorMessage-3U3e1ayv:after{content:"";display:block;position:absolute;bottom:-5px;left:50%;transform:translateX(-50%);width:0;height:0;border-style:solid;border-width:5px 8px 0;border-color:#2a2e39 transparent transparent}html.theme-dark .errorMessage-3U3e1ayv:after{border-color:#434651 transparent transparent}.iconBlock-1uOkuIhU{display:flex;flex:0 0 auto;height:100%}.innerLabel-1oKvCwg6{display:flex;flex:0 0 auto;color:#d1d4dc;font-size:16px;padding-left:8px}html.theme-dark .innerLabel-1oKvCwg6{color:#50535e}.controlWrapper-skuqZLfC{box-sizing:border-box;margin-right:2px;padding:2px 0;height:100%;border-radius:0 4px 4px 0;overflow:hidden}.controlWrapper-skuqZLfC.hidden-3NLdXwWA{display:none}.control-1HTkHp6S{display:flex;flex:0 0 auto;box-sizing:border-box;align-items:center;border-radius:2px;padding:0 6px;height:50%;background-color:transparent;color:#787b86;cursor:pointer;transition:color .35s ease,background-color .35s ease}.control-1HTkHp6S svg{fill:currentColor}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.control-1HTkHp6S:hover{color:#131722;background-color:#f0f3fa}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .control-1HTkHp6S:hover{background-color:#363a45;color:#b2b5be}}.controlIncrease-2YFIq5Gk{transform:rotate(180deg)}.decreaseControlIcon-O8mAFFIw,.increaseControlIcon-1tvvZsEf{display:flex;flex:0 0 auto;justify-content:center;width:10px}.decreaseControlIcon-O8mAFFIw svg,.increaseControlIcon-1tvvZsEf svg{width:100%}.swatches-2NO2y7Xs{display:flex;flex-wrap:wrap;margin:0 -3px 6px}.swatch-CMyFZXry{position:relative;flex:0 0 15px;width:15px;height:15px;margin:3px;border:1px solid currentColor;border-radius:2px;background-color:currentColor}.swatch-CMyFZXry:after{content:"";position:absolute;box-sizing:content-box;left:-4px;top:-4px;width:100%;height:100%;padding:2px;border:2px solid;border-color:transparent;border-radius:5px;transition:border-color .35s ease}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.swatch-CMyFZXry:hover:after{border-color:#d1d4dc}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .swatch-CMyFZXry:hover:after{border-color:#50535e}}.swatch-CMyFZXry.empty-1lteEy1B{border-color:#000;background-color:transparent}html.theme-dark .swatch-CMyFZXry.empty-1lteEy1B{border-color:#fff}.swatch-CMyFZXry.empty-1lteEy1B:before{content:"";position:absolute;width:1px;height:21px;left:7px;top:-3px;transform:rotate(45deg);background-color:#ef5350}html.theme-dark .swatch-CMyFZXry.empty-1lteEy1B:before{background-color:#ef5350}.swatch-CMyFZXry.white-RBcZELAh{border-color:#d1d4dc}html.theme-dark .swatch-CMyFZXry.white-RBcZELAh{border-color:transparent}.swatch-CMyFZXry.selected-3mQR-gqr:after{content:"";position:absolute;z-index:1;box-sizing:content-box;left:-4px;top:-4px;width:100%;height:100%;padding:2px;border:2px solid #2196f3;border-radius:5px}html.theme-dark .swatch-CMyFZXry.selected-3mQR-gqr:after{border:2px solid #1976d2}.opacity-2aYjtVUz{display:flex;align-items:center}.opacitySlider-2S5vLqQZ{position:relative;flex:1 0 auto;height:10px;border-radius:5px;background-color:#fff;background-image:url(a6506134daec7169f68f563f084a9d41.svg);background-position:1px}html.theme-dark .opacitySlider-2S5vLqQZ{background-color:#000}.opacitySliderGradient-1uUWtQAG{display:block;width:100%;height:100%;border-radius:4px;border:1px solid currentColor;color:inherit;background-image:linear-gradient(90deg,transparent,currentColor)}.opacitySliderGradient-1uUWtQAG,.pointer-3pBhp8nL{box-sizing:border-box;background-color:transparent}.pointer-3pBhp8nL{position:absolute;border:2px solid #fff;box-shadow:0 1px 2px rgba(0,0,0,.5);transition:left .1s,top .1s;width:12px;height:12px;margin:-1px 0 0;border-radius:50%}.pointer-3pBhp8nL,html.theme-dark .pointer-3pBhp8nL{background-color:#fff}html.theme-dark .pointer-3pBhp8nL{border:2px solid #fff}.pointer-3pBhp8nL.dragged-1FWLoCMd{transition:left 0s}.opacityPointerWrap-133eLPOE{position:absolute;left:0;top:0;width:calc(100% - 12px)}.opacityInputWrap-1okRhpq9{display:flex;position:relative;align-items:center;color:#131722}html.theme-dark .opacityInputWrap-1okRhpq9{color:#b2b5be}.opacityInput-1A9bqplo{display:flex;padding:0 5px;height:26px;border:1px solid #d1d4dc;box-sizing:border-box;border-radius:4px;line-height:24px;background-color:transparent;width:47px;margin-left:8px;padding-right:14px;text-align:right}html.theme-dark .opacityInput-1A9bqplo{border:1px solid #50535e}.opacityInput-1A9bqplo:focus{border-color:#2196f3}html.theme-dark .opacityInput-1A9bqplo:focus{border-color:#1976d2}.opacityInputPercent-n0mDvs0P{position:absolute;top:5px;left:40px;text-align:right;pointer-events:none}.saturation-2SLmW8C-{position:relative;z-index:0;border-radius:2px;overflow:hidden}.saturation-2SLmW8C-:after,.saturation-2SLmW8C-:before{content:"";position:absolute;left:0;top:0;width:100%;height:100%}.saturation-2SLmW8C-:before{background-image:linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.saturation-2SLmW8C-:after{background-image:linear-gradient(0deg,#000,transparent)}.saturation-2SLmW8C- .pointer-2fX2g8ap{position:absolute;border:2px solid #fff;background-color:transparent;box-shadow:0 1px 2px rgba(0,0,0,.5);transition:left .1s,top .1s;z-index:1;width:10px;height:10px;margin:-6px 0 0 -6px;border-radius:50%}html.theme-dark .saturation-2SLmW8C- .pointer-2fX2g8ap{border:2px solid #fff}.hue-2mlXxlkM{display:flex;align-items:stretch;border-radius:2px;background-image:linear-gradient(180deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.hue-2mlXxlkM .pointer-3fNcCimp{position:absolute;border:2px solid #fff;background-color:transparent;box-shadow:0 1px 2px rgba(0,0,0,.5);transition:left .1s,top .1s;width:100%;height:5px;margin:-4px 0 0 -2px;border-radius:2px}html.theme-dark .hue-2mlXxlkM .pointer-3fNcCimp{border:2px solid #fff}.pointerContainer-1T_sOwrr{position:relative;margin:3px 0;width:100%}.container-1-OmVBa-{width:224px;padding:6px 12px}.form-1PwJY7C7{display:flex;margin-bottom:12px}.swatch-1yekatxU{width:26px;height:26px;box-sizing:border-box;border-radius:4px}.inputWrap-11zHN5-G{display:flex;position:relative;align-items:center;color:#131722}html.theme-dark .inputWrap-11zHN5-G{color:#b2b5be}.inputHash-2IZ-P-A4{position:absolute;top:5px;width:21px;text-align:right;pointer-events:none}.input-35LrVJJj{display:flex;padding:0 5px;height:26px;border:1px solid #d1d4dc;box-sizing:border-box;border-radius:4px;line-height:24px;background-color:transparent;width:68px;margin-left:8px;padding-left:12px}html.theme-dark .input-35LrVJJj{border:1px solid #50535e}.input-35LrVJJj:focus{border-color:#2196f3}html.theme-dark .input-35LrVJJj:focus{border-color:#1976d2}.buttonWrap-37bmOXG9{height:26px;margin-left:auto}.hueSaturationWrap-2qtz1WJa{display:flex;height:184px}.saturation-3duvfnxs{width:200px;height:100%;margin-right:7px}.hue-31zIOKyJ{width:17px;height:100%}.container-3jqXx6VY{width:224px;padding:6px 12px}.sectionTitle-14f4vHhw{margin:12px 0 4px;font-size:12px;line-height:14px;color:#787b86}html.theme-dark .sectionTitle-14f4vHhw{color:#787b86}.separator-37206dUD{height:1px;margin:12px 0;background-color:#d1d4dc}html.theme-dark .separator-37206dUD{background-color:#434651}.separator-37206dUD:last-child{display:none}.customButton-1OVL2GM7{position:relative;flex:0 0 17px;width:17px;height:17px;margin:3px;border-radius:2px;transition:background-color .35s}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.customButton-1OVL2GM7:hover{background-color:#f0f3fa}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .customButton-1OVL2GM7:hover{background-color:#2a2e39}}.customButton-1OVL2GM7:after,.customButton-1OVL2GM7:before{content:"";position:absolute;background-color:#131722}html.theme-dark .customButton-1OVL2GM7:after,html.theme-dark .customButton-1OVL2GM7:before{background-color:#b2b5be}.customButton-1OVL2GM7:before{width:1px;height:13px;left:8px;top:2px}.customButton-1OVL2GM7:after{width:13px;height:1px;left:2px;top:8px}.wrap-3KIz6IQG{display:flex}.thicknessItem-1D40arGe{display:inline-flex;position:relative;justify-content:center;align-items:center;flex:1;box-sizing:border-box;height:32px;background-color:transparent;border:1px solid #d1d4dc;padding:0 12px}html.theme-dark .thicknessItem-1D40arGe{border-color:#50535e;background-color:transparent}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.thicknessItem-1D40arGe:hover{background-color:#f0f3fa}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .thicknessItem-1D40arGe:hover{background-color:#2a2e39}}.thicknessItem-1D40arGe.checked-pDy7EtmX{background-color:#2196f3;border-color:#2196f3;z-index:1}html.theme-dark .thicknessItem-1D40arGe.checked-pDy7EtmX{border-color:#2196f3;background-color:#2196f3}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.thicknessItem-1D40arGe.checked-pDy7EtmX:hover{background-color:#2196f3;border-color:#2196f3}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .thicknessItem-1D40arGe.checked-pDy7EtmX:hover{border-color:#2196f3;background-color:#2196f3}}.thicknessItem-1D40arGe+.thicknessItem-1D40arGe{margin-left:-1px}.thicknessItem-1D40arGe:first-child{margin-left:0;border-bottom-left-radius:3px;border-top-left-radius:3px}.thicknessItem-1D40arGe:last-child{border-bottom-right-radius:3px;border-top-right-radius:3px}.radio-mk150mXO{position:absolute;width:100%;height:100%;opacity:0;padding:0;margin:0;top:0;left:0}.bar-3l4jwcsX{width:100%;height:0;border:0 solid #131722}html.theme-dark .bar-3l4jwcsX{border:0 solid #b2b5be}.bar-3l4jwcsX.checked-pDy7EtmX,html.theme-dark .bar-3l4jwcsX.checked-pDy7EtmX{border-top-color:#fff}.thicknessContainer-1lrdH7bz{padding:0 12px}.thicknessTitle-2nZV_6CD{margin:6px 0 4px;font-size:12px;line-height:14px;color:#787b86}html.theme-dark .thicknessTitle-2nZV_6CD{color:#787b86}.colorPickerWrap-3CKoS76B{display:inline-flex;position:relative;box-sizing:border-box;align-items:center;margin:0;border-radius:4px;border-style:solid;border-color:#d1d4dc}html.theme-dark .colorPickerWrap-3CKoS76B{border-color:#50535e}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.colorPickerWrap-3CKoS76B:hover{border-color:#a3a6af}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .colorPickerWrap-3CKoS76B:hover{border-color:#6a6d78}}.colorPickerWrap-3CKoS76B.focused-1eNVgMcK{border-color:#2196f3}html.theme-dark .colorPickerWrap-3CKoS76B.focused-1eNVgMcK{border-color:#1976d2}.colorPickerWrap-3CKoS76B.readonly-3WKrZDDZ{border-color:#d1d4dc;background-color:#f0f3fa}html.theme-dark .colorPickerWrap-3CKoS76B.readonly-3WKrZDDZ{background-color:#2a2e39;border-color:#50535e}.colorPickerWrap-3CKoS76B.disabled-3JLIZoXG{color:#b2b5be;border-color:#d1d4dc;background-color:#f0f3fa}html.theme-dark .colorPickerWrap-3CKoS76B.disabled-3JLIZoXG{background-color:#2a2e39;border-color:#50535e;color:#50535e}.colorPickerWrap-3CKoS76B.size-small-171myYWP{height:24px}.colorPickerWrap-3CKoS76B.size-medium-vQ4tJKsY{height:34px}.colorPickerWrap-3CKoS76B.size-large-36sdciXs{height:48px}.colorPickerWrap-3CKoS76B.font-size-medium-2FxxjPlX,.colorPickerWrap-3CKoS76B.font-size-small-2MhPDpOT{font-size:14px;line-height:20px}.colorPickerWrap-3CKoS76B.font-size-large-272pPq9L{font-size:16px;line-height:24px}.colorPickerWrap-3CKoS76B.border-none-IfU-lwor{border-width:0}.colorPickerWrap-3CKoS76B.border-none-IfU-lwor .shadow-2guXPu-j{margin:0}.colorPickerWrap-3CKoS76B.border-thin-1PBFvGUv{border-width:1px}.colorPickerWrap-3CKoS76B.border-thin-1PBFvGUv .shadow-2guXPu-j{margin:-1px}.colorPickerWrap-3CKoS76B.border-thick-sfRUs3z9{border-width:2px}.colorPickerWrap-3CKoS76B.border-thick-sfRUs3z9 .shadow-2guXPu-j{margin:-2px}.colorPickerWrap-3CKoS76B.intent-default-24Iojkmz .shadow-2guXPu-j{border-color:#d1d4dc}html.theme-dark .colorPickerWrap-3CKoS76B.intent-default-24Iojkmz .shadow-2guXPu-j{border-color:#50535e}.colorPickerWrap-3CKoS76B.intent-success-2MeIS_Pu,.colorPickerWrap-3CKoS76B.intent-success-2MeIS_Pu .shadow-2guXPu-j,html.theme-dark .colorPickerWrap-3CKoS76B.intent-success-2MeIS_Pu,html.theme-dark .colorPickerWrap-3CKoS76B.intent-success-2MeIS_Pu .shadow-2guXPu-j{border-color:#00897b}.colorPickerWrap-3CKoS76B.intent-warning-28gYd2KQ,.colorPickerWrap-3CKoS76B.intent-warning-28gYd2KQ .shadow-2guXPu-j,html.theme-dark .colorPickerWrap-3CKoS76B.intent-warning-28gYd2KQ,html.theme-dark .colorPickerWrap-3CKoS76B.intent-warning-28gYd2KQ .shadow-2guXPu-j{border-color:#ff9800}.colorPickerWrap-3CKoS76B.intent-danger-1bAU5SPR{border-color:#f44336}html.theme-dark .colorPickerWrap-3CKoS76B.intent-danger-1bAU5SPR{border-color:#d32f2f}.colorPickerWrap-3CKoS76B.intent-danger-1bAU5SPR .shadow-2guXPu-j{border-color:#f44336}html.theme-dark .colorPickerWrap-3CKoS76B.intent-danger-1bAU5SPR .shadow-2guXPu-j{border-color:#d32f2f}.colorPickerWrap-3CKoS76B.intent-primary-dbxJRTNV{border-color:#2196f3}html.theme-dark .colorPickerWrap-3CKoS76B.intent-primary-dbxJRTNV{border-color:#1976d2}.colorPickerWrap-3CKoS76B.intent-primary-dbxJRTNV .shadow-2guXPu-j{border-color:#2196f3}html.theme-dark .colorPickerWrap-3CKoS76B.intent-primary-dbxJRTNV .shadow-2guXPu-j{border-color:#1976d2}.colorPickerWrap-3CKoS76B.corner-top-left-1YL_woIU{border-top-left-radius:0}.colorPickerWrap-3CKoS76B.corner-top-right-2ch4nt0D{border-top-right-radius:0}.colorPickerWrap-3CKoS76B.corner-bottom-right-yxUtJRuR{border-bottom-right-radius:0}.colorPickerWrap-3CKoS76B.corner-bottom-left-RaqUovla{border-bottom-left-radius:0}.shadow-2guXPu-j{position:absolute;top:0;left:0;right:0;bottom:0;z-index:3;pointer-events:none;border-radius:4px;border:2px solid}.shadow-2guXPu-j.corner-top-left-1YL_woIU{border-top-left-radius:0}.shadow-2guXPu-j.corner-top-right-2ch4nt0D{border-top-right-radius:0}.shadow-2guXPu-j.corner-bottom-right-yxUtJRuR{border-bottom-right-radius:0}.shadow-2guXPu-j.corner-bottom-left-RaqUovla{border-bottom-left-radius:0}.colorPicker-3Y3x2ZTE{display:flex;align-items:center;justify-content:center;padding:4px}.colorPicker-3Y3x2ZTE.disabled-3JLIZoXG{opacity:.5}.swatch-1HdO4thS{display:block;width:100%;height:100%;box-sizing:border-box;border-radius:3px}.placeholderContainer-162UtvCf{position:relative;width:24px;height:24px;border-radius:3px;overflow:hidden}.placeholderContainer-162UtvCf .placeholder-1EJtBXNo{width:24px;height:24px;background-color:#ef5350}html.theme-dark .placeholderContainer-162UtvCf .placeholder-1EJtBXNo{background-color:#ef5350}.placeholderContainer-162UtvCf .placeholder-1EJtBXNo:after{content:" ";position:absolute;border-top:24px solid #26a69a;border-left:24px solid transparent;width:0}html.theme-dark .placeholderContainer-162UtvCf .placeholder-1EJtBXNo:after{border-top:24px solid #26a69a}.white-1wi9uYIx{border:1px solid #d1d4dc}html.theme-dark .white-1wi9uYIx{border:1px solid transparent}.opacitySwatch-JY_FJG0h{position:relative;flex:0 0 24px;width:24px;height:24px;border-radius:3px;background-color:#fff;background-image:url(a6506134daec7169f68f563f084a9d41.svg);background-size:50%}html.theme-dark .opacitySwatch-JY_FJG0h{background-color:#000}.colorLine-2ayGuwQX{width:30px;margin-left:8px;margin-right:4px;border-radius:1px}.colorLine-2ayGuwQX.white-1wi9uYIx{margin-left:7px;margin-right:3px}.thicknessContainer-b-mOHnpg{padding:0 12px}.thicknessTitle-3PQDSIFb{margin:6px 0 4px;font-size:12px;line-height:14px;color:#787b86}html.theme-dark .thicknessTitle-3PQDSIFb{color:#787b86}.content-jw-2aYgg{display:inline-grid;grid-template-columns:auto 1fr;color:#131722;padding:16px 20px;max-width:550px;box-sizing:border-box;width:100%}html.theme-dark .content-jw-2aYgg{color:#b2b5be}.content-jw-2aYgg.ie-2-BNrQbP{display:-ms-inline-grid;-ms-grid-columns:1fr auto}.cell-hIDC3uV- .inner--hn7i_PK{display:flex;align-items:center;padding:8px 0}.ie-2-BNrQbP .cell-hIDC3uV- .inner--hn7i_PK{width:100%}.cell-hIDC3uV-.first-2n3flLMC{display:flex;min-width:0;align-items:center}.ie-2-BNrQbP .cell-hIDC3uV-.first-2n3flLMC{-ms-grid-column:1}.cell-hIDC3uV-.first-2n3flLMC .inner--hn7i_PK{display:block;padding-right:20px;text-transform:capitalize;min-width:0;word-wrap:break-word;cursor:default}.cell-hIDC3uV-.fill-1Pff_fQf{grid-column:1/3}.ie-2-BNrQbP .cell-hIDC3uV-.fill-1Pff_fQf{-ms-grid-column-span:2}.ie-2-BNrQbP .cell-hIDC3uV-.last-3u0rzQsJ{-ms-grid-column:2}.cell-hIDC3uV-.top-E6bk4zZh{align-items:flex-start}.ie-2-BNrQbP .cell-hIDC3uV-.top-E6bk4zZh{-ms-grid-row-align:start}.cell-hIDC3uV-:only-child{max-width:340px}.cell-hIDC3uV-.offset-2t8eK615{padding-left:26px}.grouped-HUhXUUdM .inner--hn7i_PK{padding:4px 0}.separator-27YVz1Zr{margin:8px -20px;height:1px;background-color:#e0e3eb}html.theme-dark .separator-27YVz1Zr{background-color:#434651}.groupSeparator-3LbEcdXc{height:8px}.groupSeparator-3LbEcdXc.big-1ygh-FzO{height:14px}@media screen and (max-width:379px){.content-jw-2aYgg{grid-template-columns:1fr -webkit-min-content;grid-template-columns:1fr min-content}.cell-hIDC3uV-.first-2n3flLMC .inner--hn7i_PK{padding:8px 20px 8px 0}.cell-hIDC3uV-.adaptive-3nNVfvpI{align-items:flex-start}.ie-2-BNrQbP .cell-hIDC3uV-.adaptive-3nNVfvpI{-ms-grid-row-align:start}.cell-hIDC3uV-.adaptive-3nNVfvpI:not(.checkableTitle-3xDSPDqb){padding-top:8px}} \ No newline at end of file diff --git a/public/charting_library/bundles/29.848432cc94542f647449.rtl.css b/public/charting_library/bundles/29.848432cc94542f647449.rtl.css new file mode 100644 index 00000000..95eee7ca --- /dev/null +++ b/public/charting_library/bundles/29.848432cc94542f647449.rtl.css @@ -0,0 +1 @@ +.inputWithErrorWrapper-3VldItns{display:block;position:relative;z-index:0;box-sizing:border-box;height:34px;box-shadow:inset 0 0 0 1px transparent;border:1px solid #d1d4dc;border-radius:4px;background-color:transparent;font-size:15px;color:#131722;-webkit-appearance:none;-moz-appearance:none;appearance:none;transition:border-color 87.5ms ease,box-shadow 87.5ms ease}html.theme-dark .inputWithErrorWrapper-3VldItns{color:#b2b5be;border:1px solid #50535e}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.inputWithErrorWrapper-3VldItns:hover{z-index:1;border-color:#b2b5be}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .inputWithErrorWrapper-3VldItns:hover{border-color:#6a6d78}}.disabled-1H5pTmbC{border-color:#d1d4dc;background-color:#f0f3fa;color:#b2b5be}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.disabled-1H5pTmbC:hover{border-color:#d1d4dc;background-color:#f0f3fa;color:#b2b5be}}html.theme-dark .disabled-1H5pTmbC{color:#50535e}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .disabled-1H5pTmbC:hover{color:#50535e}}html.theme-dark .disabled-1H5pTmbC{background-color:#2a2e39}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .disabled-1H5pTmbC:hover{background-color:#2a2e39}}html.theme-dark .disabled-1H5pTmbC{border-color:#50535e}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .disabled-1H5pTmbC:hover{border-color:#50535e}}.disabled-1H5pTmbC.thickBorder-17UV-SuS{box-shadow:inset 0 0 0 1px transparent}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.disabled-1H5pTmbC:hover.thickBorder-17UV-SuS{box-shadow:inset 0 0 0 1px transparent}}.readonly-3wmbSVwP{border-color:#b2b5be;background-color:#f0f3fa}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.readonly-3wmbSVwP:hover{border-color:#b2b5be;background-color:#f0f3fa}}html.theme-dark .readonly-3wmbSVwP{background-color:#50535e}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .readonly-3wmbSVwP:hover{background-color:#50535e}}html.theme-dark .readonly-3wmbSVwP{border-color:#50535e}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .readonly-3wmbSVwP:hover{border-color:#50535e}}.readonly-3wmbSVwP.thickBorder-17UV-SuS{box-shadow:inset 0 0 0 1px transparent}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.readonly-3wmbSVwP:hover.thickBorder-17UV-SuS{box-shadow:inset 0 0 0 1px transparent}}.inputWithErrorWrapper-3VldItns.focused-3rk113Ah{border-color:#2196f3;z-index:2}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.inputWithErrorWrapper-3VldItns.focused-3rk113Ah:hover{border-color:#2196f3;z-index:2}}html.theme-dark .inputWithErrorWrapper-3VldItns.focused-3rk113Ah{border-color:#1976d2}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .inputWithErrorWrapper-3VldItns.focused-3rk113Ah:hover{border-color:#1976d2}}.inputWithErrorWrapper-3VldItns.focused-3rk113Ah.thickBorder-17UV-SuS{box-shadow:inset 0 0 0 1px #2196f3!important}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.inputWithErrorWrapper-3VldItns.focused-3rk113Ah:hover.thickBorder-17UV-SuS{box-shadow:inset 0 0 0 1px #2196f3!important}}html.theme-dark .inputWithErrorWrapper-3VldItns.focused-3rk113Ah.thickBorder-17UV-SuS{box-shadow:inset 0 0 0 1px #1976d2!important}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .inputWithErrorWrapper-3VldItns.focused-3rk113Ah:hover.thickBorder-17UV-SuS{box-shadow:inset 0 0 0 1px #1976d2!important}}.inputWithErrorWrapper-3VldItns.focused-3rk113Ah .innerInput-29Ku0bwF{color:#131722}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.inputWithErrorWrapper-3VldItns.focused-3rk113Ah:hover .innerInput-29Ku0bwF{color:#131722}}html.theme-dark .inputWithErrorWrapper-3VldItns.focused-3rk113Ah .innerInput-29Ku0bwF{color:#b2b5be}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .inputWithErrorWrapper-3VldItns.focused-3rk113Ah:hover .innerInput-29Ku0bwF{color:#b2b5be}}.inputWithErrorWrapper-3VldItns.focused-3rk113Ah .innerInput-29Ku0bwF::placeholder{opacity:1;color:#e0e3eb}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.inputWithErrorWrapper-3VldItns.focused-3rk113Ah:hover .innerInput-29Ku0bwF::placeholder{opacity:1;color:#e0e3eb}}html.theme-dark .inputWithErrorWrapper-3VldItns.focused-3rk113Ah .innerInput-29Ku0bwF::placeholder{color:#363a45}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .inputWithErrorWrapper-3VldItns.focused-3rk113Ah:hover .innerInput-29Ku0bwF::placeholder{color:#363a45}}.inputWithErrorWrapper-3VldItns.error-32uXEKXM{border-color:#ef5350}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.inputWithErrorWrapper-3VldItns.error-32uXEKXM:hover{border-color:#ef5350}}html.theme-dark .inputWithErrorWrapper-3VldItns.error-32uXEKXM{border-color:#e53935}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .inputWithErrorWrapper-3VldItns.error-32uXEKXM:hover{border-color:#e53935}}.inputWithErrorWrapper-3VldItns.error-32uXEKXM.thickBorder-17UV-SuS{box-shadow:inset 0 0 0 1px #ef5350!important}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.inputWithErrorWrapper-3VldItns.error-32uXEKXM:hover.thickBorder-17UV-SuS{box-shadow:inset 0 0 0 1px #ef5350!important}}html.theme-dark .inputWithErrorWrapper-3VldItns.error-32uXEKXM.thickBorder-17UV-SuS{box-shadow:inset 0 0 0 1px #e53935!important}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .inputWithErrorWrapper-3VldItns.error-32uXEKXM:hover.thickBorder-17UV-SuS{box-shadow:inset 0 0 0 1px #e53935!important}}.inputWithErrorWrapper-3VldItns.error-32uXEKXM .innerInput-29Ku0bwF{color:#ef5350}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.inputWithErrorWrapper-3VldItns.error-32uXEKXM:hover .innerInput-29Ku0bwF{color:#ef5350}}html.theme-dark .inputWithErrorWrapper-3VldItns.error-32uXEKXM .innerInput-29Ku0bwF{color:#e53935}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .inputWithErrorWrapper-3VldItns.error-32uXEKXM:hover .innerInput-29Ku0bwF{color:#e53935}}.inputWithErrorWrapper-3VldItns.warning-1fcuxDP3 .innerInput-29Ku0bwF{color:#ef6c00}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.inputWithErrorWrapper-3VldItns.warning-1fcuxDP3:hover .innerInput-29Ku0bwF{color:#ef6c00}}html.theme-dark .inputWithErrorWrapper-3VldItns.warning-1fcuxDP3 .innerInput-29Ku0bwF{color:#ef6c00}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .inputWithErrorWrapper-3VldItns.warning-1fcuxDP3:hover .innerInput-29Ku0bwF{color:#ef6c00}}.inputWithError-1wKt_k8s{flex:0 0 auto;justify-content:space-between;box-sizing:border-box}.inputContainer-2JfcvOzg,.inputWithError-1wKt_k8s{display:flex;position:relative;align-items:center;height:100%}.inputContainer-2JfcvOzg{width:100%;flex-direction:row-reverse}.inputContainerFix-3bYyvsOT{flex-direction:row}.innerInputContainer-FSOtBYl0{display:flex;flex:1 1 auto;align-items:center;justify-content:space-between}.innerInput-29Ku0bwF{display:block;width:100%;height:100%;border:none;padding:0 8px 0 3px;background-color:transparent;box-shadow:0 0 0 0 transparent;font-size:14px;-webkit-appearance:none;-moz-appearance:none;appearance:none;transition:color .35s ease;box-sizing:border-box;-webkit-text-fill-color:currentColor}direction:ltr;text-align:right;padding:0 8px 0 3px;.innerInput-29Ku0bwF.largeFont-1Tlrlf5g{font-size:16px}.innerInput-29Ku0bwF::placeholder{opacity:1;color:#c1c4cd}html.theme-dark .innerInput-29Ku0bwF::placeholder{color:#2a2e39}.innerInput-29Ku0bwF::selection{background:rgba(33,150,243,.25)}html.theme-dark .innerInput-29Ku0bwF::selection{background:rgba(25,118,210,.25)}.innerInputFix-3nQEuMmn{direction:ltr;text-align:left;padding:0 3px 0 8px}.errorMessage-3U3e1ayv{padding:5px 8px;font-size:12px;line-height:14px;color:#fff;background-color:#2a2e39;box-sizing:border-box}html.theme-dark .errorMessage-3U3e1ayv{background-color:#434651;color:#b2b5be}.errorMessage-3U3e1ayv:after{content:"";display:block;position:absolute;bottom:-5px;right:50%;transform:translateX(50%);width:0;height:0;border-style:solid;border-width:5px 8px 0;border-color:#2a2e39 transparent transparent}html.theme-dark .errorMessage-3U3e1ayv:after{border-color:#434651 transparent transparent}.iconBlock-1uOkuIhU{display:flex;flex:0 0 auto;height:100%}.innerLabel-1oKvCwg6{display:flex;flex:0 0 auto;color:#d1d4dc;font-size:16px;padding-right:8px}html.theme-dark .innerLabel-1oKvCwg6{color:#50535e}.controlWrapper-skuqZLfC{box-sizing:border-box;margin-left:2px;padding:2px 0;height:100%;border-radius:4px 0 0 4px;overflow:hidden}margin-left:2px;margin-right:0;.controlWrapper-skuqZLfC.hidden-3NLdXwWA{display:none}.control-1HTkHp6S{display:flex;flex:0 0 auto;box-sizing:border-box;align-items:center;border-radius:2px;padding:0 6px;height:50%;background-color:transparent;color:#787b86;cursor:pointer;transition:color .35s ease,background-color .35s ease}.control-1HTkHp6S svg{fill:currentColor}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.control-1HTkHp6S:hover{color:#131722;background-color:#f0f3fa}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .control-1HTkHp6S:hover{background-color:#363a45;color:#b2b5be}}.controlIncrease-2YFIq5Gk{transform:rotate(-180deg)}.decreaseControlIcon-O8mAFFIw,.increaseControlIcon-1tvvZsEf{display:flex;flex:0 0 auto;justify-content:center;width:10px}.decreaseControlIcon-O8mAFFIw svg,.increaseControlIcon-1tvvZsEf svg{width:100%}.swatches-2NO2y7Xs{display:flex;flex-wrap:wrap;margin:0 -3px 6px}.swatch-CMyFZXry{position:relative;flex:0 0 15px;width:15px;height:15px;margin:3px;border:1px solid currentColor;border-radius:2px;background-color:currentColor}.swatch-CMyFZXry:after{content:"";position:absolute;box-sizing:content-box;right:-4px;top:-4px;width:100%;height:100%;padding:2px;border:2px solid;border-color:transparent;border-radius:5px;transition:border-color .35s ease}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.swatch-CMyFZXry:hover:after{border-color:#d1d4dc}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .swatch-CMyFZXry:hover:after{border-color:#50535e}}.swatch-CMyFZXry.empty-1lteEy1B{border-color:#000;background-color:transparent}html.theme-dark .swatch-CMyFZXry.empty-1lteEy1B{border-color:#fff}.swatch-CMyFZXry.empty-1lteEy1B:before{content:"";position:absolute;width:1px;height:21px;right:7px;top:-3px;transform:rotate(-45deg);background-color:#ef5350}html.theme-dark .swatch-CMyFZXry.empty-1lteEy1B:before{background-color:#ef5350}.swatch-CMyFZXry.white-RBcZELAh{border-color:#d1d4dc}html.theme-dark .swatch-CMyFZXry.white-RBcZELAh{border-color:transparent}.swatch-CMyFZXry.selected-3mQR-gqr:after{content:"";position:absolute;z-index:1;box-sizing:content-box;right:-4px;top:-4px;width:100%;height:100%;padding:2px;border:2px solid #2196f3;border-radius:5px}html.theme-dark .swatch-CMyFZXry.selected-3mQR-gqr:after{border:2px solid #1976d2}.opacity-2aYjtVUz{display:flex;align-items:center}.opacitySlider-2S5vLqQZ{position:relative;flex:1 0 auto;height:10px;border-radius:5px;background-color:#fff;background-image:url(a6506134daec7169f68f563f084a9d41.svg);background-position:1px}html.theme-dark .opacitySlider-2S5vLqQZ{background-color:#000}.opacitySliderGradient-1uUWtQAG{display:block;width:100%;height:100%;border-radius:4px;border:1px solid currentColor;color:inherit;background-image:linear-gradient(270deg,transparent,currentColor)}.opacitySliderGradient-1uUWtQAG,.pointer-3pBhp8nL{box-sizing:border-box;background-color:transparent}.pointer-3pBhp8nL{position:absolute;border:2px solid #fff;box-shadow:0 1px 2px rgba(0,0,0,.5);transition:right .1s,top .1s;width:12px;height:12px;margin:-1px 0 0;border-radius:50%}.pointer-3pBhp8nL,html.theme-dark .pointer-3pBhp8nL{background-color:#fff}html.theme-dark .pointer-3pBhp8nL{border:2px solid #fff}.pointer-3pBhp8nL.dragged-1FWLoCMd{transition:right 0s}.opacityPointerWrap-133eLPOE{position:absolute;right:0;top:0;width:calc(100% - 12px)}.opacityInputWrap-1okRhpq9{display:flex;position:relative;align-items:center;color:#131722}html.theme-dark .opacityInputWrap-1okRhpq9{color:#b2b5be}.opacityInput-1A9bqplo{display:flex;padding:0 5px;height:26px;border:1px solid #d1d4dc;box-sizing:border-box;border-radius:4px;line-height:24px;background-color:transparent;width:47px;margin-right:8px;padding-left:14px;text-align:left}html.theme-dark .opacityInput-1A9bqplo{border:1px solid #50535e}.opacityInput-1A9bqplo:focus{border-color:#2196f3}html.theme-dark .opacityInput-1A9bqplo:focus{border-color:#1976d2}.opacityInputPercent-n0mDvs0P{position:absolute;top:5px;right:40px;text-align:left;pointer-events:none}.saturation-2SLmW8C-{position:relative;z-index:0;border-radius:2px;overflow:hidden}.saturation-2SLmW8C-:after,.saturation-2SLmW8C-:before{content:"";position:absolute;right:0;top:0;width:100%;height:100%}.saturation-2SLmW8C-:before{background-image:linear-gradient(270deg,#fff,hsla(0,0%,100%,0))}.saturation-2SLmW8C-:after{background-image:linear-gradient(0deg,#000,transparent)}.saturation-2SLmW8C- .pointer-2fX2g8ap{position:absolute;border:2px solid #fff;background-color:transparent;box-shadow:0 1px 2px rgba(0,0,0,.5);transition:right .1s,top .1s;z-index:1;width:10px;height:10px;margin:-6px -6px 0 0;border-radius:50%}html.theme-dark .saturation-2SLmW8C- .pointer-2fX2g8ap{border:2px solid #fff}.hue-2mlXxlkM{display:flex;align-items:stretch;border-radius:2px;background-image:linear-gradient(180deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.hue-2mlXxlkM .pointer-3fNcCimp{position:absolute;border:2px solid #fff;background-color:transparent;box-shadow:0 1px 2px rgba(0,0,0,.5);transition:right .1s,top .1s;width:100%;height:5px;margin:-4px -2px 0 0;border-radius:2px}html.theme-dark .hue-2mlXxlkM .pointer-3fNcCimp{border:2px solid #fff}.pointerContainer-1T_sOwrr{position:relative;margin:3px 0;width:100%}.container-1-OmVBa-{width:224px;padding:6px 12px}.form-1PwJY7C7{display:flex;margin-bottom:12px}.swatch-1yekatxU{width:26px;height:26px;box-sizing:border-box;border-radius:4px}.inputWrap-11zHN5-G{display:flex;position:relative;align-items:center;color:#131722}html.theme-dark .inputWrap-11zHN5-G{color:#b2b5be}.inputHash-2IZ-P-A4{position:absolute;top:5px;width:21px;text-align:left;pointer-events:none}.input-35LrVJJj{display:flex;padding:0 5px;height:26px;border:1px solid #d1d4dc;box-sizing:border-box;border-radius:4px;line-height:24px;background-color:transparent;width:68px;margin-right:8px;padding-right:12px}html.theme-dark .input-35LrVJJj{border:1px solid #50535e}.input-35LrVJJj:focus{border-color:#2196f3}html.theme-dark .input-35LrVJJj:focus{border-color:#1976d2}.buttonWrap-37bmOXG9{height:26px;margin-right:auto}.hueSaturationWrap-2qtz1WJa{display:flex;height:184px}.saturation-3duvfnxs{width:200px;height:100%;margin-left:7px}.hue-31zIOKyJ{width:17px;height:100%}.container-3jqXx6VY{width:224px;padding:6px 12px}.sectionTitle-14f4vHhw{margin:12px 0 4px;font-size:12px;line-height:14px;color:#787b86}html.theme-dark .sectionTitle-14f4vHhw{color:#787b86}.separator-37206dUD{height:1px;margin:12px 0;background-color:#d1d4dc}html.theme-dark .separator-37206dUD{background-color:#434651}.separator-37206dUD:last-child{display:none}.customButton-1OVL2GM7{position:relative;flex:0 0 17px;width:17px;height:17px;margin:3px;border-radius:2px;transition:background-color .35s}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.customButton-1OVL2GM7:hover{background-color:#f0f3fa}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .customButton-1OVL2GM7:hover{background-color:#2a2e39}}.customButton-1OVL2GM7:after,.customButton-1OVL2GM7:before{content:"";position:absolute;background-color:#131722}html.theme-dark .customButton-1OVL2GM7:after,html.theme-dark .customButton-1OVL2GM7:before{background-color:#b2b5be}.customButton-1OVL2GM7:before{width:1px;height:13px;right:8px;top:2px}.customButton-1OVL2GM7:after{width:13px;height:1px;right:2px;top:8px}.wrap-3KIz6IQG{display:flex}.thicknessItem-1D40arGe{display:inline-flex;position:relative;justify-content:center;align-items:center;flex:1;box-sizing:border-box;height:32px;background-color:transparent;border:1px solid #d1d4dc;padding:0 12px}html.theme-dark .thicknessItem-1D40arGe{border-color:#50535e;background-color:transparent}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.thicknessItem-1D40arGe:hover{background-color:#f0f3fa}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .thicknessItem-1D40arGe:hover{background-color:#2a2e39}}.thicknessItem-1D40arGe.checked-pDy7EtmX{background-color:#2196f3;border-color:#2196f3;z-index:1}html.theme-dark .thicknessItem-1D40arGe.checked-pDy7EtmX{border-color:#2196f3;background-color:#2196f3}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.thicknessItem-1D40arGe.checked-pDy7EtmX:hover{background-color:#2196f3;border-color:#2196f3}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .thicknessItem-1D40arGe.checked-pDy7EtmX:hover{border-color:#2196f3;background-color:#2196f3}}.thicknessItem-1D40arGe+.thicknessItem-1D40arGe{margin-right:-1px}.thicknessItem-1D40arGe:first-child{margin-right:0;border-bottom-right-radius:3px;border-top-right-radius:3px}.thicknessItem-1D40arGe:last-child{border-bottom-left-radius:3px;border-top-left-radius:3px}.radio-mk150mXO{position:absolute;width:100%;height:100%;opacity:0;padding:0;margin:0;top:0;right:0}.bar-3l4jwcsX{width:100%;height:0;border:0 solid #131722}html.theme-dark .bar-3l4jwcsX{border:0 solid #b2b5be}.bar-3l4jwcsX.checked-pDy7EtmX,html.theme-dark .bar-3l4jwcsX.checked-pDy7EtmX{border-top-color:#fff}.thicknessContainer-1lrdH7bz{padding:0 12px}.thicknessTitle-2nZV_6CD{margin:6px 0 4px;font-size:12px;line-height:14px;color:#787b86}html.theme-dark .thicknessTitle-2nZV_6CD{color:#787b86}.colorPickerWrap-3CKoS76B{display:inline-flex;position:relative;box-sizing:border-box;align-items:center;margin:0;border-radius:4px;border-style:solid;border-color:#d1d4dc}html.theme-dark .colorPickerWrap-3CKoS76B{border-color:#50535e}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.colorPickerWrap-3CKoS76B:hover{border-color:#a3a6af}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .colorPickerWrap-3CKoS76B:hover{border-color:#6a6d78}}.colorPickerWrap-3CKoS76B.focused-1eNVgMcK{border-color:#2196f3}html.theme-dark .colorPickerWrap-3CKoS76B.focused-1eNVgMcK{border-color:#1976d2}.colorPickerWrap-3CKoS76B.readonly-3WKrZDDZ{border-color:#d1d4dc;background-color:#f0f3fa}html.theme-dark .colorPickerWrap-3CKoS76B.readonly-3WKrZDDZ{background-color:#2a2e39;border-color:#50535e}.colorPickerWrap-3CKoS76B.disabled-3JLIZoXG{color:#b2b5be;border-color:#d1d4dc;background-color:#f0f3fa}html.theme-dark .colorPickerWrap-3CKoS76B.disabled-3JLIZoXG{background-color:#2a2e39;border-color:#50535e;color:#50535e}.colorPickerWrap-3CKoS76B.size-small-171myYWP{height:24px}.colorPickerWrap-3CKoS76B.size-medium-vQ4tJKsY{height:34px}.colorPickerWrap-3CKoS76B.size-large-36sdciXs{height:48px}.colorPickerWrap-3CKoS76B.font-size-medium-2FxxjPlX,.colorPickerWrap-3CKoS76B.font-size-small-2MhPDpOT{font-size:14px;line-height:20px}.colorPickerWrap-3CKoS76B.font-size-large-272pPq9L{font-size:16px;line-height:24px}.colorPickerWrap-3CKoS76B.border-none-IfU-lwor{border-width:0}.colorPickerWrap-3CKoS76B.border-none-IfU-lwor .shadow-2guXPu-j{margin:0}.colorPickerWrap-3CKoS76B.border-thin-1PBFvGUv{border-width:1px}.colorPickerWrap-3CKoS76B.border-thin-1PBFvGUv .shadow-2guXPu-j{margin:-1px}.colorPickerWrap-3CKoS76B.border-thick-sfRUs3z9{border-width:2px}.colorPickerWrap-3CKoS76B.border-thick-sfRUs3z9 .shadow-2guXPu-j{margin:-2px}.colorPickerWrap-3CKoS76B.intent-default-24Iojkmz .shadow-2guXPu-j{border-color:#d1d4dc}html.theme-dark .colorPickerWrap-3CKoS76B.intent-default-24Iojkmz .shadow-2guXPu-j{border-color:#50535e}.colorPickerWrap-3CKoS76B.intent-success-2MeIS_Pu,.colorPickerWrap-3CKoS76B.intent-success-2MeIS_Pu .shadow-2guXPu-j,html.theme-dark .colorPickerWrap-3CKoS76B.intent-success-2MeIS_Pu,html.theme-dark .colorPickerWrap-3CKoS76B.intent-success-2MeIS_Pu .shadow-2guXPu-j{border-color:#00897b}.colorPickerWrap-3CKoS76B.intent-warning-28gYd2KQ,.colorPickerWrap-3CKoS76B.intent-warning-28gYd2KQ .shadow-2guXPu-j,html.theme-dark .colorPickerWrap-3CKoS76B.intent-warning-28gYd2KQ,html.theme-dark .colorPickerWrap-3CKoS76B.intent-warning-28gYd2KQ .shadow-2guXPu-j{border-color:#ff9800}.colorPickerWrap-3CKoS76B.intent-danger-1bAU5SPR{border-color:#f44336}html.theme-dark .colorPickerWrap-3CKoS76B.intent-danger-1bAU5SPR{border-color:#d32f2f}.colorPickerWrap-3CKoS76B.intent-danger-1bAU5SPR .shadow-2guXPu-j{border-color:#f44336}html.theme-dark .colorPickerWrap-3CKoS76B.intent-danger-1bAU5SPR .shadow-2guXPu-j{border-color:#d32f2f}.colorPickerWrap-3CKoS76B.intent-primary-dbxJRTNV{border-color:#2196f3}html.theme-dark .colorPickerWrap-3CKoS76B.intent-primary-dbxJRTNV{border-color:#1976d2}.colorPickerWrap-3CKoS76B.intent-primary-dbxJRTNV .shadow-2guXPu-j{border-color:#2196f3}html.theme-dark .colorPickerWrap-3CKoS76B.intent-primary-dbxJRTNV .shadow-2guXPu-j{border-color:#1976d2}.colorPickerWrap-3CKoS76B.corner-top-left-1YL_woIU{border-top-right-radius:0}.colorPickerWrap-3CKoS76B.corner-top-right-2ch4nt0D{border-top-left-radius:0}.colorPickerWrap-3CKoS76B.corner-bottom-right-yxUtJRuR{border-bottom-left-radius:0}.colorPickerWrap-3CKoS76B.corner-bottom-left-RaqUovla{border-bottom-right-radius:0}.shadow-2guXPu-j{position:absolute;top:0;right:0;left:0;bottom:0;z-index:3;pointer-events:none;border-radius:4px;border:2px solid}.shadow-2guXPu-j.corner-top-left-1YL_woIU{border-top-right-radius:0}.shadow-2guXPu-j.corner-top-right-2ch4nt0D{border-top-left-radius:0}.shadow-2guXPu-j.corner-bottom-right-yxUtJRuR{border-bottom-left-radius:0}.shadow-2guXPu-j.corner-bottom-left-RaqUovla{border-bottom-right-radius:0}.colorPicker-3Y3x2ZTE{display:flex;align-items:center;justify-content:center;padding:4px}.colorPicker-3Y3x2ZTE.disabled-3JLIZoXG{opacity:.5}.swatch-1HdO4thS{display:block;width:100%;height:100%;box-sizing:border-box;border-radius:3px}.placeholderContainer-162UtvCf{position:relative;width:24px;height:24px;border-radius:3px;overflow:hidden}.placeholderContainer-162UtvCf .placeholder-1EJtBXNo{width:24px;height:24px;background-color:#ef5350}html.theme-dark .placeholderContainer-162UtvCf .placeholder-1EJtBXNo{background-color:#ef5350}.placeholderContainer-162UtvCf .placeholder-1EJtBXNo:after{content:" ";position:absolute;border-top:24px solid #26a69a;border-right:24px solid transparent;width:0}html.theme-dark .placeholderContainer-162UtvCf .placeholder-1EJtBXNo:after{border-top:24px solid #26a69a}.white-1wi9uYIx{border:1px solid #d1d4dc}html.theme-dark .white-1wi9uYIx{border:1px solid transparent}.opacitySwatch-JY_FJG0h{position:relative;flex:0 0 24px;width:24px;height:24px;border-radius:3px;background-color:#fff;background-image:url(a6506134daec7169f68f563f084a9d41.svg);background-size:50%}html.theme-dark .opacitySwatch-JY_FJG0h{background-color:#000}.colorLine-2ayGuwQX{width:30px;margin-right:8px;margin-left:4px;border-radius:1px}.colorLine-2ayGuwQX.white-1wi9uYIx{margin-right:7px;margin-left:3px}.thicknessContainer-b-mOHnpg{padding:0 12px}.thicknessTitle-3PQDSIFb{margin:6px 0 4px;font-size:12px;line-height:14px;color:#787b86}html.theme-dark .thicknessTitle-3PQDSIFb{color:#787b86}.content-jw-2aYgg{display:inline-grid;grid-template-columns:auto 1fr;color:#131722;padding:16px 20px;max-width:550px;box-sizing:border-box;width:100%}html.theme-dark .content-jw-2aYgg{color:#b2b5be}.content-jw-2aYgg.ie-2-BNrQbP{display:-ms-inline-grid;-ms-grid-columns:1fr auto}.cell-hIDC3uV- .inner--hn7i_PK{display:flex;align-items:center;padding:8px 0}.ie-2-BNrQbP .cell-hIDC3uV- .inner--hn7i_PK{width:100%}.cell-hIDC3uV-.first-2n3flLMC{display:flex;min-width:0;align-items:center}.ie-2-BNrQbP .cell-hIDC3uV-.first-2n3flLMC{-ms-grid-column:1}.cell-hIDC3uV-.first-2n3flLMC .inner--hn7i_PK{display:block;padding-left:20px;text-transform:capitalize;min-width:0;word-wrap:break-word;cursor:default}.cell-hIDC3uV-.fill-1Pff_fQf{grid-column:1/3}.ie-2-BNrQbP .cell-hIDC3uV-.fill-1Pff_fQf{-ms-grid-column-span:2}.ie-2-BNrQbP .cell-hIDC3uV-.last-3u0rzQsJ{-ms-grid-column:2}.cell-hIDC3uV-.top-E6bk4zZh{align-items:flex-start}.ie-2-BNrQbP .cell-hIDC3uV-.top-E6bk4zZh{-ms-grid-row-align:start}.cell-hIDC3uV-:only-child{max-width:340px}.cell-hIDC3uV-.offset-2t8eK615{padding-right:26px}.grouped-HUhXUUdM .inner--hn7i_PK{padding:4px 0}.separator-27YVz1Zr{margin:8px -20px;height:1px;background-color:#e0e3eb}html.theme-dark .separator-27YVz1Zr{background-color:#434651}.groupSeparator-3LbEcdXc{height:8px}.groupSeparator-3LbEcdXc.big-1ygh-FzO{height:14px}@media screen and (max-width:379px){.content-jw-2aYgg{grid-template-columns:1fr -webkit-min-content;grid-template-columns:1fr min-content}.cell-hIDC3uV-.first-2n3flLMC .inner--hn7i_PK{padding:8px 0 8px 20px}.cell-hIDC3uV-.adaptive-3nNVfvpI{align-items:flex-start}.ie-2-BNrQbP .cell-hIDC3uV-.adaptive-3nNVfvpI{-ms-grid-row-align:start}.cell-hIDC3uV-.adaptive-3nNVfvpI:not(.checkableTitle-3xDSPDqb){padding-top:8px}} \ No newline at end of file diff --git a/public/charting_library/bundles/3.0f5a56645104b8e303b5.js b/public/charting_library/bundles/3.0f5a56645104b8e303b5.js new file mode 100644 index 00000000..5bc43e3f --- /dev/null +++ b/public/charting_library/bundles/3.0f5a56645104b8e303b5.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[3],[]]); \ No newline at end of file diff --git a/public/charting_library/bundles/3.bbc49badf465eedb68cb.css b/public/charting_library/bundles/3.bbc49badf465eedb68cb.css new file mode 100644 index 00000000..fc02a54f --- /dev/null +++ b/public/charting_library/bundles/3.bbc49badf465eedb68cb.css @@ -0,0 +1 @@ +.dialog-2APwxL3O{display:flex;min-width:280px;text-align:left;box-sizing:border-box;background-color:#fff;flex-direction:column}html.theme-dark .dialog-2APwxL3O{background-color:#1e222d}.dialog-2APwxL3O.rounded-tXI9mwGE{border-radius:6px}.dialog-2APwxL3O.shadowed-2M13-xZa{box-shadow:0 1px 2px 1px rgba(0,0,0,.275)}.dialog-2APwxL3O.fullscreen-2RqU2pqU{position:fixed;top:0;left:0;right:0;bottom:0;width:100%;max-width:100%;height:100%;max-height:100%;min-height:100%}.dialog-2APwxL3O.darker-2nhdv2oS{background-color:#fff}html.theme-dark .dialog-2APwxL3O.darker-2nhdv2oS{background-color:#131722}.backdrop-1tKdKmN_{position:fixed;left:0;top:0;right:0;bottom:0;background-color:#9598a1;transform:translateZ(0);opacity:.5;z-index:-1}html.theme-dark .backdrop-1tKdKmN_{background-color:#0c0e15} \ No newline at end of file diff --git a/public/charting_library/bundles/3.bbc49badf465eedb68cb.rtl.css b/public/charting_library/bundles/3.bbc49badf465eedb68cb.rtl.css new file mode 100644 index 00000000..19249418 --- /dev/null +++ b/public/charting_library/bundles/3.bbc49badf465eedb68cb.rtl.css @@ -0,0 +1 @@ +.dialog-2APwxL3O{display:flex;min-width:280px;text-align:right;box-sizing:border-box;background-color:#fff;flex-direction:column}html.theme-dark .dialog-2APwxL3O{background-color:#1e222d}.dialog-2APwxL3O.rounded-tXI9mwGE{border-radius:6px}.dialog-2APwxL3O.shadowed-2M13-xZa{box-shadow:0 1px 2px 1px rgba(0,0,0,.275)}.dialog-2APwxL3O.fullscreen-2RqU2pqU{position:fixed;top:0;right:0;left:0;bottom:0;width:100%;max-width:100%;height:100%;max-height:100%;min-height:100%}.dialog-2APwxL3O.darker-2nhdv2oS{background-color:#fff}html.theme-dark .dialog-2APwxL3O.darker-2nhdv2oS{background-color:#131722}.backdrop-1tKdKmN_{position:fixed;right:0;top:0;left:0;bottom:0;background-color:#9598a1;transform:translateZ(0);opacity:.5;z-index:-1}html.theme-dark .backdrop-1tKdKmN_{background-color:#0c0e15} \ No newline at end of file diff --git a/public/charting_library/bundles/30.d95a3f827655ae6f4d41.js b/public/charting_library/bundles/30.d95a3f827655ae6f4d41.js new file mode 100644 index 00000000..884722d1 --- /dev/null +++ b/public/charting_library/bundles/30.d95a3f827655ae6f4d41.js @@ -0,0 +1,4 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[30],{"56W2":function(e,t,s){(function(t){var s;s=void 0!==t?t:this,e.exports=function(e){if(e.CSS&&e.CSS.escape)return e.CSS.escape;var t=function(e){if(0==arguments.length)throw new TypeError("`CSS.escape` requires an argument.");for(var t,s=String(e),n=s.length,i=-1,o="",l=s.charCodeAt(0);++i=1&&t<=31||127==t||0==i&&t>=48&&t<=57||1==i&&t>=48&&t<=57&&45==l?"\\"+t.toString(16)+" ":0==i&&1==n&&45==t||!(t>=128||45==t||95==t||t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122)?"\\"+s.charAt(i):s.charAt(i):o+="�";return o};return e.CSS||(e.CSS={}),e.CSS.escape=t,t}(s)}).call(this,s("yLpj"))},Gs9W:function(e,t,s){},sZhh:function(e,t,s){"use strict";var n=s("56W2");s("Gs9W"),function(e,t){function s(){this._state=[],this._defaults={classHolder:"sbHolder",classHolderDisabled:"sbHolderDisabled",classHolderOpen:"sbHolderOpen",classSelector:"sbSelector",classOptions:"sbOptions",classGroup:"sbGroup",classSub:"sbSub",classDisabled:"sbDisabled",classToggleOpen:"sbToggleOpen",classToggle:"sbToggle",classSeparator:"sbSeparator",useCustomPrependWithSelector:"",customPrependSelectorClass:"",speed:200,slidesUp:!1,effect:"slide",onChange:null,beforeOpen:null,onOpen:null,onClose:null}}function i(t,s,n,i){function o(){s.removeClass(t.settings.customPrependSelectorClass),t._lastSelectorPrepend&&(t._lastSelectorPrepend.remove(),delete t._lastSelectorPrepend),n.data("custom-option-prepend")&&(t.settings.customPrependSelectorClass&&s.addClass(t.settings.customPrependSelectorClass),t._lastSelectorPrepend=e(n.data("custom-option-prepend")).clone(),s[t.settings.useCustomPrependWithSelector](t._lastSelectorPrepend))}t.settings.useCustomPrependWithSelector&&(i?t._onAttachCallback=o:o())}e.extend(s.prototype,{_refreshSelectbox:function(e,t){if(!e)return!1;var s=this._getInst(e);return null!=s&&(this._fillList(e,s,t),!0)},_isOpenSelectbox:function(e){return!!e&&this._getInst(e).isOpen},_isDisabledSelectbox:function(e){return!!e&&this._getInst(e).isDisabled},_attachSelectbox:function(t,s){if(this._getInst(t))return!1;var i,o,l,a,c=e(t),r=this,d=r._newInst(c);c.find("optgroup"),c.find("option").length;function p(){var t,s=this.attr("id").split("_")[1];for(t in r._state)t!==s&&r._state.hasOwnProperty(t)&&e(":input[sb='"+t+"']")[0]&&r._closeSelectbox(e(":input[sb='"+t+"']")[0])}c.attr("sb",d.uid),e.extend(d.settings,r._defaults,s),r._state[d.uid]=!1,c.hide(),i=e("
",{id:"sbHolder_"+d.uid,class:d.settings.classHolder});var u=c.data("selectbox-css");function b(s){c.children().each((function(n){var i;if(e(this).is(":selected")){if(38==s&&n>0)return i=e(c.children()[n-1]),r._changeSelectbox(t,i.val(),i.text()),!1;if(40==s&&n",{id:"sbSelector_"+d.uid,href:"#",class:d.settings.classSelector,click:function(s){s.preventDefault(),s.stopPropagation(),p.apply(e(this),[]);var n=e(this).attr("id").split("_")[1];r._state[n]?r._closeSelectbox(t):(r._openSelectbox(t), +l.focus())},keyup:function(e){b(e.keyCode)}}),l=e("",{id:"sbToggle_"+d.uid,href:"#",class:d.settings.classToggle,click:function(s){s.preventDefault(),s.stopPropagation(),p.apply(e(this),[]);var n=e(this).attr("id").split("_")[1];r._state[n]?r._closeSelectbox(t):(r._openSelectbox(t),l.focus())},keyup:function(e){b(e.keyCode)}}),e('
').appendTo(l),l.appendTo(i),a=e("
    ",{id:"sbOptions_"+d.uid,class:d.settings.classOptions,css:{display:"none"}}),d.sbOptions=a,d.sbToggle=l,d.sbSelector=o,this._fillList(t,d),e.data(t,"selectbox",d),o.appendTo(i),a.appendTo(i),i.insertAfter(c),d._onAttachCallback&&(d._onAttachCallback(),delete d._onAttachCallback),c.is(":disabled")&&e.selectbox._disableSelectbox(t),c.change((function(){var s=e(this).val(),i=c.find("option[value='"+n(s)+"']").text();r._changeSelectbox(t,s,i)}))},_detachSelectbox:function(t){var s=this._getInst(t);if(!s)return!1;e("#sbHolder_"+s.uid).remove(),delete this._state[s.uid],e.data(t,"selectbox",null),e(t).show()},_changeSelectbox:function(t,s,o){var l=e(t.ownerDocument),a=this._getInst(t),c=this._get(a,"onChange");if(!(l.find("#sbSelector_"+a.uid).text()===o&&l.find("#sbOptions_"+a.uid).find('a[rel="'+s+'"]').hasClass("active"))){var r=e(t).find("option[value='"+n(s)+"']"),d=l.find("#sbSelector_"+a.uid);d.text(o),i(a,d,r),l.find("#sbOptions_"+a.uid).find(".active").removeClass("active"),l.find("#sbOptions_"+a.uid).find('a[rel="'+s+'"]').addClass("active"),e(t).find("option").attr("selected",!1),r.attr("selected",!0),c?c.apply(a.input?a.input[0]:null,[s,a]):a.input&&a.input.trigger("change")}},_enableSelectbox:function(t){var s=this._getInst(t);if(!s||!s.isDisabled)return!1;e(t.ownerDocument).find("#sbHolder_"+s.uid).removeClass(s.settings.classHolderDisabled),s.isDisabled=!1,e.data(t,"selectbox",s)},_disableSelectbox:function(t){var s=this._getInst(t);if(!s||s.isDisabled)return!1;e(t.ownerDocument).find("#sbHolder_"+s.uid).addClass(s.settings.classHolderDisabled),s.isDisabled=!0,e.data(t,"selectbox",s)},_optionSelectbox:function(t,s,n){var i=this._getInst(t);return!!i&&(null==n?i[s]:(i[s]=n,void e.data(t,"selectbox",i)))},_openSelectbox:function(t){var s=this._getInst(t),n=this;if(s&&!s.isOpen&&!s.isDisabled){var i=e(t.ownerDocument),o=e(t.ownerDocument.defaultView),l=i.find("#sbOptions_"+s.uid),a=parseInt(o.height(),10),c=parseInt(o.width(),10),r=i.find("#sbHolder_"+s.uid).offset(),d=o.scrollTop(),p=l.prev().height(),u=a-(r.top-d)-p/2,b=this._get(s,"onOpen"),f=this._get(s,"beforeOpen"),h=null;f&&(h=f()),"object"==typeof h&&null!==h?l.css(h):(u>50&&!s.settings.slidesUp?l.css({bottom:"auto",top:p+2+"px",maxHeight:u-p+"px"}):l.css({top:"auto",bottom:p+2+"px",maxHeight:r.top-d-p/2+"px"}),r.left+l.width()>c?l.css("left","-"+(l.width()-l.parent().width()+3)+"px"):l.css("left","-1px")),"fade"===s.settings.effect?l.fadeIn(s.settings.speed):l.slideDown(s.settings.speed),i.find("#sbToggle_"+s.uid).addClass(s.settings.classToggleOpen),i.find("#sbHolder_"+s.uid).addClass(s.settings.classHolderOpen),this._state[s.uid]=!0,s.isOpen=!0, +b&&b.apply(s.input?s.input[0]:null,[s]),e.data(t,"selectbox",s),i.unbind("click.sbClose").one("click.sbClose",(function(){n._closeSelectbox(t)}))}},_closeSelectbox:function(t){var s=this._getInst(t);if(s&&s.isOpen){var n=e(t.ownerDocument),i=this._get(s,"onClose");n.find("#sbOptions_"+s.uid).hide(),n.find("#sbToggle_"+s.uid).removeClass(s.settings.classToggleOpen),n.find("#sbHolder_"+s.uid).removeClass(s.settings.classHolderOpen),this._state[s.uid]=!1,s.isOpen=!1,i&&i.apply(s.input?s.input[0]:null,[s]),e.data(t,"selectbox",s),n.unbind("click.sbClose")}},_newInst:function(e){return{id:e[0].id.replace(/([^A-Za-z0-9_-])/g,"\\\\$1"),input:e,uid:Math.floor(99999999*Math.random()),isOpen:!1,isDisabled:!1,isSelected:!1,settings:{}}},_getInst:function(t){try{return e.data(t,"selectbox")}catch(s){throw"Missing instance data for this selectbox"}},_get:function(e,t){return void 0!==e.settings[t]?e.settings[t]:this._defaults[t]},_getOptions:function(t,s,n,o,l){var a=!(!arguments[1]||!arguments[1].sub),c=!(!arguments[1]||!arguments[1].disabled),r=this;arguments[0].each((function(t){var s,d=e(this),p=e("
  • ");d.is(":selected")&&(n.sbSelector.text(d.text()),i(n,n.sbSelector,d,!0),n.isSelected=!0),t===o-1&&p.addClass("last"),function(){var t=d.text(),i=d.data("custom-option-text"),o=void 0!==i?i:t;"__separator__"===d.val()?(s=e("").addClass(n.settings.classSeparator)).appendTo(p):d.is(":disabled")||c?(s=e("",{text:o}).addClass(n.settings.classDisabled),a&&s.addClass(n.settings.classSub),s.appendTo(p)):(s=e("",{href:"#"+d.val(),rel:d.val(),text:o,class:"filter",click:function(s){s.preventDefault();var i=n.sbToggle;i.attr("id").split("_")[1];r._closeSelectbox(l),r._changeSelectbox(l,e(this).attr("rel"),t),i.focus()}}),d.is(":selected")&&s.addClass("active"),a&&s.addClass(n.settings.classSub),s.appendTo(p));var u=d.data("custom-option-prepend");u&&s.prepend(u)}(),p.addClass(d.attr("class")),p.appendTo(n.sbOptions)}))},_fillList:function(t,s,n){var o=this,l=e(t),a=(l.find("optgroup"),l.find("option")),c=a.length;n||(n=0),l.children().slice(n).each((function(n){var i,l=e(this),a={};l.is("option")?o._getOptions(l,null,s,c,t):l.is("optgroup")&&(i=e("
  • "),e("",{text:l.attr("label")}).addClass(s.settings.classGroup).appendTo(i),i.appendTo(s.sbOptions),l.is(":disabled")&&(a.disabled=!0),a.sub=!0,o._getOptions(l.find("option"),a,s,c,t))})),s.isSelected||(s.sbSelector.text(a.first().text()),i(s,s.sbSelector,a.first(),!0),s.isSelected=!0)}}),e.fn.selectbox=function(t){var s=Array.prototype.slice.call(arguments,1);return"string"==typeof t&&"isDisabled"==t||"option"==t&&2==arguments.length&&"string"==typeof arguments[1]?e.selectbox["_"+t+"Selectbox"].apply(e.selectbox,[this[0]].concat(s)):this.each((function(){"string"==typeof t?e.selectbox["_"+t+"Selectbox"].apply(e.selectbox,[this].concat(s)):e.selectbox._attachSelectbox(this,t)}))},e.selectbox=new s,e.selectbox.version="0.1.3"}(jQuery)},wmOI:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.LEFT_ARROW=37,t.UP_ARROW=38,t.RIGHT_ARROW=39, +t.DOWN_ARROW=40,t.ENTER=13,t.ESC=27,t.SPACE=32,t.SLASH=47}}]); \ No newline at end of file diff --git a/public/charting_library/bundles/31.81abab3dfb2b9a5bdff1.css b/public/charting_library/bundles/31.81abab3dfb2b9a5bdff1.css new file mode 100644 index 00000000..5c5de462 --- /dev/null +++ b/public/charting_library/bundles/31.81abab3dfb2b9a5bdff1.css @@ -0,0 +1 @@ +.tv-ticker{display:inline;position:absolute;width:13px;height:27px;margin:0 0 0 -13px}.tv-ticker__btn{width:7px;height:8px;padding:2px;border:1px solid;border-color:#dadde0;background:#fff;fill:#9db2bd}html.theme-dark .tv-ticker__btn{background:#131722;border-color:#363c4e}.tv-ticker__btn>svg{display:block;width:7px;height:8px}.tv-ticker__btn--up>svg{transform:scaleY(-1)}.tv-ticker__btn--down{border-top-width:0}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-ticker__btn:hover{background-color:#f2f2f2}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-ticker__btn:hover{background-color:#1c2030}}.tv-ticker__btn.i-active,.tv-ticker__btn:active{background-color:#ececec}html.theme-dark .tv-ticker__btn.i-active,html.theme-dark .tv-ticker__btn:active{background-color:#262b3e}input:focus+.tv-ticker .tv-ticker__btn{border-color:#2196f3;fill:#2196f3}html.theme-dark input:focus+.tv-ticker .tv-ticker__btn{fill:#1976d2;border-color:#1976d2}input:disabled+.tv-ticker{display:none} \ No newline at end of file diff --git a/public/charting_library/bundles/31.81abab3dfb2b9a5bdff1.rtl.css b/public/charting_library/bundles/31.81abab3dfb2b9a5bdff1.rtl.css new file mode 100644 index 00000000..d91ede70 --- /dev/null +++ b/public/charting_library/bundles/31.81abab3dfb2b9a5bdff1.rtl.css @@ -0,0 +1 @@ +.tv-ticker{display:inline;position:absolute;width:13px;height:27px;margin:0 -13px 0 0}.tv-ticker__btn{width:7px;height:8px;padding:2px;border:1px solid;border-color:#dadde0;background:#fff;fill:#9db2bd}html.theme-dark .tv-ticker__btn{background:#131722;border-color:#363c4e}.tv-ticker__btn>svg{display:block;width:7px;height:8px}.tv-ticker__btn--up>svg{transform:scaleY(-1)}.tv-ticker__btn--down{border-top-width:0}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-ticker__btn:hover{background-color:#f2f2f2}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-ticker__btn:hover{background-color:#1c2030}}.tv-ticker__btn.i-active,.tv-ticker__btn:active{background-color:#ececec}html.theme-dark .tv-ticker__btn.i-active,html.theme-dark .tv-ticker__btn:active{background-color:#262b3e}input:focus+.tv-ticker .tv-ticker__btn{border-color:#2196f3;fill:#2196f3}html.theme-dark input:focus+.tv-ticker .tv-ticker__btn{fill:#1976d2;border-color:#1976d2}input:disabled+.tv-ticker{display:none} \ No newline at end of file diff --git a/public/charting_library/bundles/31.c031c34eff81df66ef7c.js b/public/charting_library/bundles/31.c031c34eff81df66ef7c.js new file mode 100644 index 00000000..9b840334 --- /dev/null +++ b/public/charting_library/bundles/31.c031c34eff81df66ef7c.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[31],[]]); \ No newline at end of file diff --git a/public/charting_library/bundles/32.27d1f6a4564f13116070.css b/public/charting_library/bundles/32.27d1f6a4564f13116070.css new file mode 100644 index 00000000..2a30cade --- /dev/null +++ b/public/charting_library/bundles/32.27d1f6a4564f13116070.css @@ -0,0 +1 @@ +.tv-select{display:none}.tv-select-container{background-color:#f1f3f6;border:1px solid;border-color:#dadde0;border-radius:0;height:26px;position:relative;display:inline-block;vertical-align:top;color:#4a4a4a}html.theme-dark .tv-select-container{color:#c5cbce;border-color:#363c4e;background-color:#2f3241}.tv-select-container a{color:#4a4a4a}html.theme-dark .tv-select-container a{color:#c5cbce}.tv-select-container.sbHolderOpen,.tv-select-container.sbHolderOpen a{color:#000}.tv-select-container.sbHolderDisabled{background-color:#fff;border-color:#e3e5e6;color:gray}.tv-select-container.sbHolderDisabled a{color:gray}.tv-select-container.sbHolderDisabled .sbToggle{opacity:.2}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-select-container:hover:not(.sbHolderDisabled) .sbToggle:after{border-color:#000 transparent transparent}}.tv-select-container .sbSelector{cursor:default;display:block;height:26px;line-height:26px;outline:none;overflow:hidden;padding:0 23px 0 10px;color:#333}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-select-container .sbSelector:hover{outline:none;text-decoration:none}}.tv-select-container .sbToggle{display:flex;align-items:center;position:absolute;right:5px;top:6px;height:15px;width:13px;cursor:default}.tv-select-container .sbToggle .tv-caret{color:#4a4a4a}html.theme-dark .tv-select-container .sbToggle .tv-caret{color:#c5cbce}.tv-select-container.dialog{height:25px;vertical-align:middle}.tv-select-container.dialog .sbSelector{height:25px;line-height:25px;padding:0 20px 0 10px;min-width:80px;width:calc(100% - 30px)}.tv-select-container.dialog .sbOptions{min-width:100%;z-index:3}.tv-select-container.dialog .sbOptions::-webkit-scrollbar{width:5px;height:5px}.tv-select-container.dialog .sbOptions::-webkit-scrollbar-thumb{border:1px solid;border-color:#f1f3f6;border-radius:3px;background-color:#9598a1}html.theme-dark .tv-select-container.dialog .sbOptions::-webkit-scrollbar-thumb{background-color:#363a45;border-color:#1e222d}.tv-select-container.dialog .sbOptions::-webkit-scrollbar-track{background-color:transparent;border-radius:3px}.tv-select-container.dialog .sbOptions::-webkit-scrollbar-corner{display:none}.tv-select-container .sbSeparator{display:block;height:1px;background:#c9cbcd}.tv-select.inset+.tv-select-container{background:#eff3f6;box-shadow:inset 0 1px 2px rgba(0,0,0,.15);color:#6f7073}.tv-unstyled-select-container{position:relative}.property-wide-select .tv-select-container.dialog .sbSelector{width:90px}.tv-report-dialog-select .sbOptions{max-width:600px}.tv-report-dialog-select .sbOptions a{overflow:hidden;text-overflow:ellipsis}.tv-select-container .sbHolderDisabled{background-color:#3c3c3c;border:1px solid #515151}.tv-select-container .sbOptions,.tv-unstyled-select-container .sbOptions{list-style:none;margin:0;padding:0;position:absolute;top:30px;min-width:150px;z-index:3;overflow-y:auto;background:#fff;border:1px solid;border-color:#dadde0;overflow-x:hidden}html.theme-dark .tv-select-container .sbOptions,html.theme-dark .tv-unstyled-select-container .sbOptions{border-color:#363c4e;background:#1e222d}.tv-select-container .sbOptions.tv-quandl-select,.tv-unstyled-select-container .sbOptions.tv-quandl-select{max-width:350px}.tv-select-container .sbOptions.three-column-filter,.tv-unstyled-select-container .sbOptions.three-column-filter{width:700px}.tv-select-container .sbOptions.three-column-filter li.filter-item:nth-child(2n),.tv-unstyled-select-container .sbOptions.three-column-filter li.filter-item:nth-child(2n){width:46%}.tv-select-container .sbOptions.three-column-filter li.filter-item,.tv-unstyled-select-container .sbOptions.three-column-filter li.filter-item{overflow:hidden;float:left;width:54%;min-height:34px}.tv-select-container .sbOptions.three-column-filter li.filter-item:first-child,.tv-unstyled-select-container .sbOptions.three-column-filter li.filter-item:first-child{width:100%}.tv-select-container .sbOptions.three-column-filter li.filter-item .filter,.tv-unstyled-select-container .sbOptions.three-column-filter li.filter-item .filter{border-bottom:0}.tv-select-container .sbOptions.three-column-filter li.filter-item .sbIcon,.tv-unstyled-select-container .sbOptions.three-column-filter li.filter-item .sbIcon{display:inline-block;width:16px;height:11px;margin:0 5px 3px 0;vertical-align:middle}.tv-select-container .sbOptions.three-column-filter li.filter-item .sbIcon.flag-btc,.tv-unstyled-select-container .sbOptions.three-column-filter li.filter-item .sbIcon.flag-btc{height:16px;margin-bottom:2px}.tv-select-container .sbOptions a,.tv-unstyled-select-container .sbOptions a{display:block;white-space:nowrap;outline:none;padding:7px 12px;font-weight:400;font-size:13px;line-height:16px;color:#4a4a4a}html.theme-dark .tv-select-container .sbOptions a,html.theme-dark .tv-unstyled-select-container .sbOptions a{color:#c5cbce}.tv-select-container .sbOptions.tv-quandl-select a,.tv-unstyled-select-container .sbOptions.tv-quandl-select a{overflow:hidden;text-overflow:ellipsis;border-bottom:none}.tv-select-container .sbOptions .spinner-container,.tv-unstyled-select-container .sbOptions .spinner-container{position:relative;height:30px}.sbOptions a:visited,.tv-select-container .sbOptions a:link,.tv-unstyled-select-container .sbOptions a:link{color:#4a4a4a;text-decoration:none}html.theme-dark .sbOptions a:visited,html.theme-dark .tv-select-container .sbOptions a:link,html.theme-dark .tv-unstyled-select-container .sbOptions a:link{color:#c5cbce}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-select-container .sbOptions a:hover,.tv-unstyled-select-container .sbOptions a:hover{background:#f1f3f6}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-select-container .sbOptions a:hover,html.theme-dark .tv-unstyled-select-container .sbOptions a:hover{background:#262b3e}}.tv-select-container .sbOptions a.active,.tv-unstyled-select-container .sbOptions a.active{background:#f1f3f6;border-left:3px solid #5cb888;padding-left:9px;color:#333}html.theme-dark .tv-select-container .sbOptions a.active,html.theme-dark .tv-unstyled-select-container .sbOptions a.active{background:#262b3e}.tv-select-container .sbOptions li.last a,.tv-unstyled-select-container .sbOptions li.last a{border-bottom:none}.tv-select-container .sbOptions .sbDisabled,.tv-unstyled-select-container .sbOptions .sbDisabled{display:block;padding:7px 0 7px 10px}.tv-select-container .sbOptions .sbGroup,.tv-unstyled-select-container .sbOptions .sbGroup{display:block;font-weight:700;padding:7px 0 7px 3px}.tv-select-container .sbOptions .sbSub,.tv-unstyled-select-container .sbOptions .sbSub{padding-left:17px}.tv-select-container.tv-select-container-fontsize .sbSelector{width:26px}.tv-select-container.tv-select-container-fontsize .sbOptions{min-width:54px}.tv-select-container-timezone .sbOptions{min-width:170px} \ No newline at end of file diff --git a/public/charting_library/bundles/32.27d1f6a4564f13116070.rtl.css b/public/charting_library/bundles/32.27d1f6a4564f13116070.rtl.css new file mode 100644 index 00000000..1c66c850 --- /dev/null +++ b/public/charting_library/bundles/32.27d1f6a4564f13116070.rtl.css @@ -0,0 +1 @@ +.tv-select{display:none}.tv-select-container{background-color:#f1f3f6;border:1px solid;border-color:#dadde0;border-radius:0;height:26px;position:relative;display:inline-block;vertical-align:top;color:#4a4a4a}html.theme-dark .tv-select-container{color:#c5cbce;border-color:#363c4e;background-color:#2f3241}.tv-select-container a{color:#4a4a4a}html.theme-dark .tv-select-container a{color:#c5cbce}.tv-select-container.sbHolderOpen,.tv-select-container.sbHolderOpen a{color:#000}.tv-select-container.sbHolderDisabled{background-color:#fff;border-color:#e3e5e6;color:gray}.tv-select-container.sbHolderDisabled a{color:gray}.tv-select-container.sbHolderDisabled .sbToggle{opacity:.2}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-select-container:hover:not(.sbHolderDisabled) .sbToggle:after{border-color:#000 transparent transparent}}.tv-select-container .sbSelector{cursor:default;display:block;height:26px;line-height:26px;outline:none;overflow:hidden;padding:0 10px 0 23px;color:#333}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-select-container .sbSelector:hover{outline:none;text-decoration:none}}.tv-select-container .sbToggle{display:flex;align-items:center;position:absolute;left:5px;top:6px;height:15px;width:13px;cursor:default}.tv-select-container .sbToggle .tv-caret{color:#4a4a4a}html.theme-dark .tv-select-container .sbToggle .tv-caret{color:#c5cbce}.tv-select-container.dialog{height:25px;vertical-align:middle}.tv-select-container.dialog .sbSelector{height:25px;line-height:25px;padding:0 10px 0 20px;min-width:80px;width:calc(100% - 30px)}.tv-select-container.dialog .sbOptions{min-width:100%;z-index:3}.tv-select-container.dialog .sbOptions::-webkit-scrollbar{width:5px;height:5px}.tv-select-container.dialog .sbOptions::-webkit-scrollbar-thumb{border:1px solid;border-color:#f1f3f6;border-radius:3px;background-color:#9598a1}html.theme-dark .tv-select-container.dialog .sbOptions::-webkit-scrollbar-thumb{background-color:#363a45;border-color:#1e222d}.tv-select-container.dialog .sbOptions::-webkit-scrollbar-track{background-color:transparent;border-radius:3px}.tv-select-container.dialog .sbOptions::-webkit-scrollbar-corner{display:none}.tv-select-container .sbSeparator{display:block;height:1px;background:#c9cbcd}.tv-select.inset+.tv-select-container{background:#eff3f6;box-shadow:inset 0 1px 2px rgba(0,0,0,.15);color:#6f7073}.tv-unstyled-select-container{position:relative}.property-wide-select .tv-select-container.dialog .sbSelector{width:90px}.tv-report-dialog-select .sbOptions{max-width:600px}.tv-report-dialog-select .sbOptions a{overflow:hidden;text-overflow:ellipsis}.tv-select-container .sbHolderDisabled{background-color:#3c3c3c;border:1px solid #515151}.tv-select-container .sbOptions,.tv-unstyled-select-container .sbOptions{list-style:none;margin:0;padding:0;position:absolute;top:30px;min-width:150px;z-index:3;overflow-y:auto;background:#fff;border:1px solid;border-color:#dadde0;overflow-x:hidden}html.theme-dark .tv-select-container .sbOptions,html.theme-dark .tv-unstyled-select-container .sbOptions{border-color:#363c4e;background:#1e222d}.tv-select-container .sbOptions.tv-quandl-select,.tv-unstyled-select-container .sbOptions.tv-quandl-select{max-width:350px}.tv-select-container .sbOptions.three-column-filter,.tv-unstyled-select-container .sbOptions.three-column-filter{width:700px}.tv-select-container .sbOptions.three-column-filter li.filter-item:nth-child(2n),.tv-unstyled-select-container .sbOptions.three-column-filter li.filter-item:nth-child(2n){width:46%}.tv-select-container .sbOptions.three-column-filter li.filter-item,.tv-unstyled-select-container .sbOptions.three-column-filter li.filter-item{overflow:hidden;float:right;width:54%;min-height:34px}.tv-select-container .sbOptions.three-column-filter li.filter-item:first-child,.tv-unstyled-select-container .sbOptions.three-column-filter li.filter-item:first-child{width:100%}.tv-select-container .sbOptions.three-column-filter li.filter-item .filter,.tv-unstyled-select-container .sbOptions.three-column-filter li.filter-item .filter{border-bottom:0}.tv-select-container .sbOptions.three-column-filter li.filter-item .sbIcon,.tv-unstyled-select-container .sbOptions.three-column-filter li.filter-item .sbIcon{display:inline-block;width:16px;height:11px;margin:0 0 3px 5px;vertical-align:middle}.tv-select-container .sbOptions.three-column-filter li.filter-item .sbIcon.flag-btc,.tv-unstyled-select-container .sbOptions.three-column-filter li.filter-item .sbIcon.flag-btc{height:16px;margin-bottom:2px}.tv-select-container .sbOptions a,.tv-unstyled-select-container .sbOptions a{display:block;white-space:nowrap;outline:none;padding:7px 12px;font-weight:400;font-size:13px;line-height:16px;color:#4a4a4a}html.theme-dark .tv-select-container .sbOptions a,html.theme-dark .tv-unstyled-select-container .sbOptions a{color:#c5cbce}.tv-select-container .sbOptions.tv-quandl-select a,.tv-unstyled-select-container .sbOptions.tv-quandl-select a{overflow:hidden;text-overflow:ellipsis;border-bottom:none}.tv-select-container .sbOptions .spinner-container,.tv-unstyled-select-container .sbOptions .spinner-container{position:relative;height:30px}.sbOptions a:visited,.tv-select-container .sbOptions a:link,.tv-unstyled-select-container .sbOptions a:link{color:#4a4a4a;text-decoration:none}html.theme-dark .sbOptions a:visited,html.theme-dark .tv-select-container .sbOptions a:link,html.theme-dark .tv-unstyled-select-container .sbOptions a:link{color:#c5cbce}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-select-container .sbOptions a:hover,.tv-unstyled-select-container .sbOptions a:hover{background:#f1f3f6}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-select-container .sbOptions a:hover,html.theme-dark .tv-unstyled-select-container .sbOptions a:hover{background:#262b3e}}.tv-select-container .sbOptions a.active,.tv-unstyled-select-container .sbOptions a.active{background:#f1f3f6;border-right:3px solid #5cb888;padding-right:9px;color:#333}html.theme-dark .tv-select-container .sbOptions a.active,html.theme-dark .tv-unstyled-select-container .sbOptions a.active{background:#262b3e}.tv-select-container .sbOptions li.last a,.tv-unstyled-select-container .sbOptions li.last a{border-bottom:none}.tv-select-container .sbOptions .sbDisabled,.tv-unstyled-select-container .sbOptions .sbDisabled{display:block;padding:7px 10px 7px 0}.tv-select-container .sbOptions .sbGroup,.tv-unstyled-select-container .sbOptions .sbGroup{display:block;font-weight:700;padding:7px 3px 7px 0}.tv-select-container .sbOptions .sbSub,.tv-unstyled-select-container .sbOptions .sbSub{padding-right:17px}.tv-select-container.tv-select-container-fontsize .sbSelector{width:26px}.tv-select-container.tv-select-container-fontsize .sbOptions{min-width:54px}.tv-select-container-timezone .sbOptions{min-width:170px} \ No newline at end of file diff --git a/public/charting_library/bundles/32.56b37cf403a9e9eceea4.js b/public/charting_library/bundles/32.56b37cf403a9e9eceea4.js new file mode 100644 index 00000000..bae58312 --- /dev/null +++ b/public/charting_library/bundles/32.56b37cf403a9e9eceea4.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[32],[]]); \ No newline at end of file diff --git a/public/charting_library/bundles/3293616ec0c605c7c2db25829a0a509e.woff b/public/charting_library/bundles/3293616ec0c605c7c2db25829a0a509e.woff new file mode 100644 index 00000000..8c1748aa Binary files /dev/null and b/public/charting_library/bundles/3293616ec0c605c7c2db25829a0a509e.woff differ diff --git a/public/charting_library/bundles/33.8dd04cdbdff54e865f75.css b/public/charting_library/bundles/33.8dd04cdbdff54e865f75.css new file mode 100644 index 00000000..e22f25d1 --- /dev/null +++ b/public/charting_library/bundles/33.8dd04cdbdff54e865f75.css @@ -0,0 +1 @@ +.favorite-2V8VHwKe{display:inline-flex;align-items:center;justify-content:center;border-radius:4px;min-width:22px;width:22px;height:22px;font-size:0;color:#787b86}.favorite-2V8VHwKe:active{color:#131722;background-color:var(--tv-list-item-button-background-hover-color,#e0e3eb)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.favorite-2V8VHwKe:hover{color:#131722;background-color:var(--tv-list-item-button-background-hover-color,#e0e3eb)}}html.theme-dark .favorite-2V8VHwKe:active{background-color:var(--tv-list-item-button-background-hover-color,#363a45)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .favorite-2V8VHwKe:hover{background-color:var(--tv-list-item-button-background-hover-color,#363a45)}}html.theme-dark .favorite-2V8VHwKe:active{color:#b2b5be}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .favorite-2V8VHwKe:hover{color:#b2b5be}}.favorite-2V8VHwKe.disabled-3ebwimbb:active{background-color:transparent}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.favorite-2V8VHwKe.disabled-3ebwimbb:hover{background-color:transparent}}html.theme-dark .favorite-2V8VHwKe.disabled-3ebwimbb:active{background-color:transparent}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .favorite-2V8VHwKe.disabled-3ebwimbb:hover{background-color:transparent}}.favorite-2V8VHwKe.active-3pQAvYvT,html.theme-dark .favorite-2V8VHwKe.active-3pQAvYvT{color:#90caf9}.favorite-2V8VHwKe.active-3pQAvYvT:active{background-color:#1e88e5}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.favorite-2V8VHwKe.active-3pQAvYvT:hover{background-color:#1e88e5}}html.theme-dark .favorite-2V8VHwKe.active-3pQAvYvT:active{background-color:#1e88e5}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .favorite-2V8VHwKe.active-3pQAvYvT:hover{background-color:#1e88e5}}.favorite-2V8VHwKe.checked-2bhy04CF{color:#fbc02d}html.theme-dark .favorite-2V8VHwKe.checked-2bhy04CF{color:#f9a825} \ No newline at end of file diff --git a/public/charting_library/bundles/33.8dd04cdbdff54e865f75.rtl.css b/public/charting_library/bundles/33.8dd04cdbdff54e865f75.rtl.css new file mode 100644 index 00000000..e22f25d1 --- /dev/null +++ b/public/charting_library/bundles/33.8dd04cdbdff54e865f75.rtl.css @@ -0,0 +1 @@ +.favorite-2V8VHwKe{display:inline-flex;align-items:center;justify-content:center;border-radius:4px;min-width:22px;width:22px;height:22px;font-size:0;color:#787b86}.favorite-2V8VHwKe:active{color:#131722;background-color:var(--tv-list-item-button-background-hover-color,#e0e3eb)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.favorite-2V8VHwKe:hover{color:#131722;background-color:var(--tv-list-item-button-background-hover-color,#e0e3eb)}}html.theme-dark .favorite-2V8VHwKe:active{background-color:var(--tv-list-item-button-background-hover-color,#363a45)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .favorite-2V8VHwKe:hover{background-color:var(--tv-list-item-button-background-hover-color,#363a45)}}html.theme-dark .favorite-2V8VHwKe:active{color:#b2b5be}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .favorite-2V8VHwKe:hover{color:#b2b5be}}.favorite-2V8VHwKe.disabled-3ebwimbb:active{background-color:transparent}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.favorite-2V8VHwKe.disabled-3ebwimbb:hover{background-color:transparent}}html.theme-dark .favorite-2V8VHwKe.disabled-3ebwimbb:active{background-color:transparent}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .favorite-2V8VHwKe.disabled-3ebwimbb:hover{background-color:transparent}}.favorite-2V8VHwKe.active-3pQAvYvT,html.theme-dark .favorite-2V8VHwKe.active-3pQAvYvT{color:#90caf9}.favorite-2V8VHwKe.active-3pQAvYvT:active{background-color:#1e88e5}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.favorite-2V8VHwKe.active-3pQAvYvT:hover{background-color:#1e88e5}}html.theme-dark .favorite-2V8VHwKe.active-3pQAvYvT:active{background-color:#1e88e5}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .favorite-2V8VHwKe.active-3pQAvYvT:hover{background-color:#1e88e5}}.favorite-2V8VHwKe.checked-2bhy04CF{color:#fbc02d}html.theme-dark .favorite-2V8VHwKe.checked-2bhy04CF{color:#f9a825} \ No newline at end of file diff --git a/public/charting_library/bundles/33.adbdf95fb83198a65aa6.js b/public/charting_library/bundles/33.adbdf95fb83198a65aa6.js new file mode 100644 index 00000000..28ac26bc --- /dev/null +++ b/public/charting_library/bundles/33.adbdf95fb83198a65aa6.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[33],[]]); \ No newline at end of file diff --git a/public/charting_library/bundles/34.63bbc5bc6ac0d6223b3d.js b/public/charting_library/bundles/34.63bbc5bc6ac0d6223b3d.js new file mode 100644 index 00000000..ae07c2dd --- /dev/null +++ b/public/charting_library/bundles/34.63bbc5bc6ac0d6223b3d.js @@ -0,0 +1,18 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[34],{"0tRk":function(e,t,n){!function(e){"use strict";e.defineLocale("pt-br",{months:"Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),weekdays:"Domingo_Segunda-Feira_Terça-Feira_Quarta-Feira_Quinta-Feira_Sexta-Feira_Sábado".split("_"),weekdaysShort:"Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"),weekdaysMin:"Dom_2ª_3ª_4ª_5ª_6ª_Sáb".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY [às] HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY [às] HH:mm"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return 0===this.day()||6===this.day()?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"%s atrás",s:"poucos segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},ordinalParse:/\d{1,2}º/,ordinal:"%dº"})}(n("wd/R"))},"8mBD":function(e,t,n){!function(e){"use strict";e.defineLocale("pt",{months:"Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),weekdays:"Domingo_Segunda-Feira_Terça-Feira_Quarta-Feira_Quinta-Feira_Sexta-Feira_Sábado".split("_"),weekdaysShort:"Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"),weekdaysMin:"Dom_2ª_3ª_4ª_5ª_6ª_Sáb".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY HH:mm"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return 0===this.day()||6===this.day()?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"há %s",s:"segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},ordinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(n("wd/R"))},B55N:function(e,t,n){!function(e){"use strict";e.defineLocale("ja",{months:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日".split("_"),weekdaysShort:"日_月_火_水_木_金_土".split("_"),weekdaysMin:"日_月_火_水_木_金_土".split("_"),longDateFormat:{LT:"Ah時m分",LTS:"Ah時m分s秒",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah時m分",LLLL:"YYYY年M月D日Ah時m分 dddd"},meridiemParse:/午前|午後/i,isPM:function(e){return"午後"===e},meridiem:function(e,t,n){return e<12?"午前":"午後"},calendar:{sameDay:"[今日] LT",nextDay:"[明日] LT",nextWeek:"[来週]dddd LT",lastDay:"[昨日] LT",lastWeek:"[前週]dddd LT",sameElse:"L"},relativeTime:{future:"%s後",past:"%s前",s:"数秒",m:"1分",mm:"%d分",h:"1時間",hh:"%d時間",d:"1日",dd:"%d日",M:"1ヶ月",MM:"%dヶ月",y:"1年",yy:"%d年"}}) +}(n("wd/R"))},DoHr:function(e,t,n){!function(e){"use strict";var t={1:"'inci",5:"'inci",8:"'inci",70:"'inci",80:"'inci",2:"'nci",7:"'nci",20:"'nci",50:"'nci",3:"'üncü",4:"'üncü",100:"'üncü",6:"'ncı",9:"'uncu",10:"'uncu",30:"'uncu",60:"'ıncı",90:"'ıncı"};e.defineLocale("tr",{months:"Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık".split("_"),monthsShort:"Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara".split("_"),weekdays:"Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi".split("_"),weekdaysShort:"Paz_Pts_Sal_Çar_Per_Cum_Cts".split("_"),weekdaysMin:"Pz_Pt_Sa_Ça_Pe_Cu_Ct".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bugün saat] LT",nextDay:"[yarın saat] LT",nextWeek:"[haftaya] dddd [saat] LT",lastDay:"[dün] LT",lastWeek:"[geçen hafta] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s önce",s:"birkaç saniye",m:"bir dakika",mm:"%d dakika",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",M:"bir ay",MM:"%d ay",y:"bir yıl",yy:"%d yıl"},ordinalParse:/\d{1,2}'(inci|nci|üncü|ncı|uncu|ıncı)/,ordinal:function(e){if(0===e)return e+"'ıncı";var n=e%10;return e+(t[n]||t[e%100-n]||t[e>=100?100:null])},week:{dow:1,doy:7}})}(n("wd/R"))},Iivm:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n("mrSG").__exportStar(n("swCq"),t)},"Ivi+":function(e,t,n){!function(e){"use strict";e.defineLocale("ko",{months:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),monthsShort:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),weekdays:"일요일_월요일_화요일_수요일_목요일_금요일_토요일".split("_"),weekdaysShort:"일_월_화_수_목_금_토".split("_"),weekdaysMin:"일_월_화_수_목_금_토".split("_"),longDateFormat:{LT:"A h시 m분",LTS:"A h시 m분 s초",L:"YYYY.MM.DD",LL:"YYYY년 MMMM D일",LLL:"YYYY년 MMMM D일 A h시 m분",LLLL:"YYYY년 MMMM D일 dddd A h시 m분"},calendar:{sameDay:"오늘 LT",nextDay:"내일 LT",nextWeek:"dddd LT",lastDay:"어제 LT",lastWeek:"지난주 dddd LT",sameElse:"L"},relativeTime:{future:"%s 후",past:"%s 전",s:"몇초",ss:"%d초",m:"일분",mm:"%d분",h:"한시간",hh:"%d시간",d:"하루",dd:"%d일",M:"한달",MM:"%d달",y:"일년",yy:"%d년"},ordinalParse:/\d{1,2}일/,ordinal:"%d일",meridiemParse:/오전|오후/,isPM:function(e){return"오후"===e},meridiem:function(e,t,n){return e<12?"오전":"오후"}})}(n("wd/R"))},Oaa7:function(e,t,n){!function(e){"use strict";e.defineLocale("en-gb",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago", +s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},ordinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(n("wd/R"))},QpNh:function(e,t,n){"use strict";function i(e){for(var t={},n=0,i=Object.entries(e).filter(a);na.timeStamp)){var s=a.target;void 0!==n&&null!==t&&null!==s&&s.ownerDocument===i&&(t.contains(s)||n(a))}}return a.click&&i.addEventListener("click",s,!1),a.mouseDown&&i.addEventListener("mousedown",s,!1),a.touchEnd&&i.addEventListener("touchend",s,!1),a.touchStart&&i.addEventListener("touchstart",s,!1),function(){i.removeEventListener("click",s,!1),i.removeEventListener("mousedown",s,!1),i.removeEventListener("touchend",s,!1),i.removeEventListener("touchstart",s,!1)}}n.d(t,"a",(function(){return i}))},bpih:function(e,t,n){!function(e){"use strict";e.defineLocale("it",{months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),weekdays:"Domenica_Lunedì_Martedì_Mercoledì_Giovedì_Venerdì_Sabato".split("_"),weekdaysShort:"Dom_Lun_Mar_Mer_Gio_Ven_Sab".split("_"),weekdaysMin:"D_L_Ma_Me_G_V_S".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Oggi alle] LT",nextDay:"[Domani alle] LT",nextWeek:"dddd [alle] LT",lastDay:"[Ieri alle] LT",lastWeek:function(){switch(this.day()){case 0:return"[la scorsa] dddd [alle] LT";default:return"[lo scorso] dddd [alle] LT"}},sameElse:"L"},relativeTime:{future:function(e){return(/^[0-9].+$/.test(e)?"tra":"in")+" "+e},past:"%s fa",s:"alcuni secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},ordinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(n("wd/R"))},iYuL:function(e,t,n){!function(e){"use strict";var t="Ene._Feb._Mar._Abr._May._Jun._Jul._Ago._Sep._Oct._Nov._Dic.".split("_"),n="Ene_Feb_Mar_Abr_May_Jun_Jul_Ago_Sep_Oct_Nov_Dic".split("_");e.defineLocale("es",{months:"Enero_Febrero_Marzo_Abril_Mayo_Junio_Julio_Agosto_Septiembre_Octubre_Noviembre_Diciembre".split("_"),monthsShort:function(e,i){return/-MMM-/.test(i)?n[e.month()]:t[e.month()]},weekdays:"Domingo_Lunes_Martes_Miércoles_Jueves_Viernes_Sábado".split("_"),weekdaysShort:"Dom._Lun._Mar._Mié._Jue._Vie._Sáb.".split("_"),weekdaysMin:"Do_Lu_Ma_Mi_Ju_Vi_Sá".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){ +return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},ordinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(n("wd/R"))},jVdC:function(e,t,n){!function(e){"use strict";var t="styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień".split("_"),n="stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia".split("_");function i(e){return e%10<5&&e%10>1&&~~(e/10)%10!=1}function a(e,t,n){var a=e+" ";switch(n){case"m":return t?"minuta":"minutę";case"mm":return a+(i(e)?"minuty":"minut");case"h":return t?"godzina":"godzinę";case"hh":return a+(i(e)?"godziny":"godzin");case"MM":return a+(i(e)?"miesiące":"miesięcy");case"yy":return a+(i(e)?"lata":"lat")}}e.defineLocale("pl",{months:function(e,i){return""===i?"("+n[e.month()]+"|"+t[e.month()]+")":/D MMMM/.test(i)?n[e.month()]:t[e.month()]},monthsShort:"sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru".split("_"),weekdays:"niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota".split("_"),weekdaysShort:"nie_pon_wt_śr_czw_pt_sb".split("_"),weekdaysMin:"N_Pn_Wt_Śr_Cz_Pt_So".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Dziś o] LT",nextDay:"[Jutro o] LT",nextWeek:"[W] dddd [o] LT",lastDay:"[Wczoraj o] LT",lastWeek:function(){switch(this.day()){case 0:return"[W zeszłą niedzielę o] LT";case 3:return"[W zeszłą środę o] LT";case 6:return"[W zeszłą sobotę o] LT";default:return"[W zeszły] dddd [o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"%s temu",s:"kilka sekund",m:a,mm:a,h:a,hh:a,d:"1 dzień",dd:"%d dni",M:"miesiąc",MM:a,y:"rok",yy:a},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n("wd/R"))},lXzo:function(e,t,n){!function(e){"use strict";function t(e,t,n){var i,a;return"m"===n?t?"минута":"минуту":e+" "+(i=+e,a={mm:t?"минута_минуты_минут":"минуту_минуты_минут",hh:"час_часа_часов",dd:"день_дня_дней",MM:"месяц_месяца_месяцев",yy:"год_года_лет"}[n].split("_"),i%10==1&&i%100!=11?a[0]:i%10>=2&&i%10<=4&&(i%100<10||i%100>=20)?a[1]:a[2])}e.defineLocale("ru",{months:function(e,t){return{nominative:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_"),accusative:"января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря".split("_")}[/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/.test(t)?"accusative":"nominative"][e.month()]},monthsShort:function(e,t){return{ +nominative:"янв_фев_март_апр_май_июнь_июль_авг_сен_окт_ноя_дек".split("_"),accusative:"янв_фев_мар_апр_мая_июня_июля_авг_сен_окт_ноя_дек".split("_")}[/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/.test(t)?"accusative":"nominative"][e.month()]},weekdays:function(e,t){return{nominative:"воскресенье_понедельник_вторник_среда_четверг_пятница_суббота".split("_"),accusative:"воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу".split("_")}[/\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?\] ?dddd/.test(t)?"accusative":"nominative"][e.day()]},weekdaysShort:"вс_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:"вс_пн_вт_ср_чт_пт_сб".split("_"),monthsParse:[/^янв/i,/^фев/i,/^мар/i,/^апр/i,/^ма[й|я]/i,/^июн/i,/^июл/i,/^авг/i,/^сен/i,/^окт/i,/^ноя/i,/^дек/i],longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., HH:mm",LLLL:"dddd, D MMMM YYYY г., HH:mm"},calendar:{sameDay:"[Сегодня в] LT",nextDay:"[Завтра в] LT",lastDay:"[Вчера в] LT",nextWeek:function(){return 2===this.day()?"[Во] dddd [в] LT":"[В] dddd [в] LT"},lastWeek:function(e){if(e.week()===this.week())return 2===this.day()?"[Во] dddd [в] LT":"[В] dddd [в] LT";switch(this.day()){case 0:return"[В прошлое] dddd [в] LT";case 1:case 2:case 4:return"[В прошлый] dddd [в] LT";case 3:case 5:case 6:return"[В прошлую] dddd [в] LT"}},sameElse:"L"},relativeTime:{future:"через %s",past:"%s назад",s:"несколько секунд",m:t,mm:t,h:"час",hh:t,d:"день",dd:t,M:"месяц",MM:t,y:"год",yy:t},meridiemParse:/ночи|утра|дня|вечера/i,isPM:function(e){return/^(дня|вечера)$/.test(e)},meridiem:function(e,t,n){return e<4?"ночи":e<12?"утра":e<17?"дня":"вечера"},ordinalParse:/\d{1,2}-(й|го|я)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":return e+"-й";case"D":return e+"-го";case"w":case"W":return e+"-я";default:return e}},week:{dow:1,doy:7}})}(n("wd/R"))},ldgD:function(e,t,n){"use strict";n("YFKU"),n("HbRj");var i=n("wd/R");window.language&&(i.locale(window.language,{months:[window.t("January"),window.t("February"),window.t("March"),window.t("April"),window.t("May"),window.t("June"),window.t("July"),window.t("August"),window.t("September"),window.t("October"),window.t("November"),window.t("December")],monthsShort:[window.t("Jan"),window.t("Feb"),window.t("Mar"),window.t("Apr"),window.t("May"),window.t("Jun"),window.t("Jul"),window.t("Aug"),window.t("Sep"),window.t("Oct"),window.t("Nov"),window.t("Dec")],weekdays:[window.t("Sunday"),window.t("Monday"),window.t("Tuesday"),window.t("Wednesday"),window.t("Thursday"),window.t("Friday"),window.t("Saturday")],weekdaysShort:[window.t("Sun"),window.t("Mon"),window.t("Tue"),window.t("Wed"),window.t("Thu"),window.t("Fri"),window.t("Sat")],weekdaysMin:[window.t("Su",{context:"day_of_week"}),window.t("Mo",{context:"day_of_week"}),window.t("Tu",{context:"day_of_week"}),window.t("We",{context:"day_of_week"}),window.t("Th",{context:"day_of_week"}),window.t("Fr",{context:"day_of_week"}),window.t("Sa",{context:"day_of_week"})],longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"MMM D",l:"M/D/YYYY",LL:"MMM D, YYYY",ll:"MMM D LT",LLL:"LT - LL", +lll:"MMM D, YYYY LT",LLLL:"ddd D MMMM YYYY LT",llll:"ddd D MMM YYYY LT"},calendar:{sameDay:window.t("{specialSymbolOpen}Today at{specialSymbolClose} {dayTime}").format({specialSymbolOpen:"[",specialSymbolClose:"]",dayTime:"LT"}),nextDay:window.t("{specialSymbolOpen}Tomorrow at{specialSymbolClose} {dayTime}").format({specialSymbolOpen:"[",specialSymbolClose:"]",dayTime:"LT"}),nextWeek:window.t("{dayName} {specialSymbolOpen}at{specialSymbolClose} {dayTime}").format({specialSymbolOpen:"[",specialSymbolClose:"]",dayTime:"LT",dayName:"dddd"}),lastDay:window.t("{specialSymbolOpen}Yesterday at{specialSymbolClose} {dayTime}").format({specialSymbolOpen:"[",specialSymbolClose:"]",dayTime:"LT"}),lastWeek:window.t("{specialSymbolOpen}Last{specialSymbolClose} {dayName} {specialSymbolOpen}at{specialSymbolClose} {dayTime}").format({specialSymbolOpen:"[",specialSymbolClose:"]",dayTime:"LT",dayName:"dddd"}),sameElse:"L"},relativeTime:{future:function(e){return e===window.t("just now")?e:window.t("in %s",{context:"time_range"}).replace("%s",e)},past:function(e){return e===window.t("just now")?e:window.t("%s ago",{context:"time_range"}).replace("%s",e)},s:window.t("just now"),m:function(e){return window.t("%d minute",{plural:"%d minutes",count:e}).replace("%d",e)},mm:function(e){return window.t("%d minute",{plural:"%d minutes",count:e}).replace("%d",e)},h:window.t("an hour"),hh:function(e){return window.t("%d hour",{plural:"%d hours",count:e}).replace("%d",e)},d:window.t("a day"),dd:function(e){return window.t("%d day",{plural:"%d days",count:e}).replace("%d",e)},M:window.t("a month"),MM:function(e){return window.t("%d month",{plural:"%d months",count:e}).replace("%d",e)},y:window.t("a year"),yy:function(e){return window.t("%d year",{plural:"%d years",count:e}).replace("%d",e)}},week:{dow:1,doy:4}}),i.locale(window.language)),e.exports=i},qoI1:function(e,t,n){var i={"./en-gb":"Oaa7","./en-gb.js":"Oaa7","./es":"iYuL","./es.js":"iYuL","./it":"bpih","./it.js":"bpih","./ja":"B55N","./ja.js":"B55N","./ko":"Ivi+","./ko.js":"Ivi+","./pl":"jVdC","./pl.js":"jVdC","./pt":"8mBD","./pt-br":"0tRk","./pt-br.js":"0tRk","./pt.js":"8mBD","./ru":"lXzo","./ru.js":"lXzo","./tr":"DoHr","./tr.js":"DoHr"};function a(e){var t=s(e);return n(t)}function s(e){if(!n.o(i,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return i[e]}a.keys=function(){return Object.keys(i)},a.resolve=s,e.exports=a,a.id="qoI1"},swCq:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Icon=void 0;var i=n("mrSG"),a=n("q1tI");t.Icon=a.forwardRef((function(e,t){var n=e.icon,s=void 0===n?"":n,r=i.__rest(e,["icon"]);return a.createElement("span",i.__assign({},r,{ref:t,dangerouslySetInnerHTML:{__html:s}}))}))},"wd/R":function(e,t,n){(function(e){e.exports=function(){"use strict";var t;function i(){return t.apply(null,arguments)}function a(e){return"[object Array]"===Object.prototype.toString.call(e)}function s(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function r(e,t){ +return Object.prototype.hasOwnProperty.call(e,t)}function o(e,t){for(var n in t)r(t,n)&&(e[n]=t[n]);return r(t,"toString")&&(e.toString=t.toString),r(t,"valueOf")&&(e.valueOf=t.valueOf),e}function d(e,t,n,i){return Pe(e,t,n,i,!0).utc()}function u(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1}),e._pf}function l(e){if(null==e._isValid){var t=u(e);e._isValid=!(isNaN(e._d.getTime())||!(t.overflow<0)||t.empty||t.invalidMonth||t.invalidWeekday||t.nullInput||t.invalidFormat||t.userInvalidated),e._strict&&(e._isValid=e._isValid&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour)}return e._isValid}function _(e){var t=d(NaN);return null!=e?o(u(t),e):u(t).userInvalidated=!0,t}var c=i.momentProperties=[];function m(e,t){var n,i,a;if(void 0!==t._isAMomentObject&&(e._isAMomentObject=t._isAMomentObject),void 0!==t._i&&(e._i=t._i),void 0!==t._f&&(e._f=t._f),void 0!==t._l&&(e._l=t._l),void 0!==t._strict&&(e._strict=t._strict),void 0!==t._tzm&&(e._tzm=t._tzm),void 0!==t._isUTC&&(e._isUTC=t._isUTC),void 0!==t._offset&&(e._offset=t._offset),void 0!==t._pf&&(e._pf=u(t)),void 0!==t._locale&&(e._locale=t._locale),c.length>0)for(n in c)void 0!==(a=t[i=c[n]])&&(e[i]=a);return e}var h=!1;function f(e){m(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),!1===h&&(h=!0,i.updateOffset(this),h=!1)}function y(e){return e instanceof f||null!=e&&null!=e._isAMomentObject}function M(e){return e<0?Math.ceil(e):Math.floor(e)}function w(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=M(t)),n}function p(e,t,n){var i,a=Math.min(e.length,t.length),s=Math.abs(e.length-t.length),r=0;for(i=0;i0;){if(i=g(a.slice(0,t).join("-")))return i;if(n&&n.length>=t&&p(a,n,!0)>=t-1)break;t--}s++}return null}(e)}var b={};function O(e,t){var n=e.toLowerCase();b[n]=b[n+"s"]=b[t]=e}function H(e){return"string"==typeof e?b[e]||b[e.toLowerCase()]:void 0}function F(e){var t,n,i={};for(n in e)r(e,n)&&(t=H(n))&&(i[t]=e[n]);return i}function W(e,t){return function(n){return null!=n?(P(this,e,n),i.updateOffset(this,t),this):C(this,e)}}function C(e,t){return e._d["get"+(e._isUTC?"UTC":"")+t]()}function P(e,t,n){return e._d["set"+(e._isUTC?"UTC":"")+t](n)}function x(e,t){var n +;if("object"==typeof e)for(n in e)this.set(n,e[n]);else if("function"==typeof this[e=H(e)])return this[e](t);return this}function z(e,t,n){var i=""+Math.abs(e),a=t-i.length;return(e>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,a)).toString().substr(1)+i}var A=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Q|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,U=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,G={},E={};function j(e,t,n,i){var a=i;"string"==typeof i&&(a=function(){return this[i]()}),e&&(E[e]=a),t&&(E[t[0]]=function(){return z(a.apply(this,arguments),t[1],t[2])}),n&&(E[n]=function(){return this.localeData().ordinal(a.apply(this,arguments),e)})}function I(e,t){return e.isValid()?(t=N(t,e.localeData()),G[t]=G[t]||function(e){var t,n,i,a=e.match(A);for(t=0,n=a.length;t=0&&U.test(e);)e=e.replace(U,i),U.lastIndex=0,n-=1;return e}var J=/\d/,R=/\d\d/,V=/\d{3}/,Z=/\d{4}/,q=/[+-]?\d{6}/,Q=/\d\d?/,B=/\d{1,3}/,$=/\d{1,4}/,X=/[+-]?\d{1,6}/,K=/\d+/,ee=/[+-]?\d+/,te=/Z|[+-]\d\d:?\d\d/gi,ne=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,ie={};function ae(e,t,n){var i;ie[e]="function"==typeof(i=t)&&"[object Function]"===Object.prototype.toString.call(i)?t:function(e){return e&&n?n:t}}function se(e,t){return r(ie,e)?ie[e](t._strict,t._locale):new RegExp(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,n,i,a){return t||n||i||a})).replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))}var re={};function oe(e,t){var n,i=t;for("string"==typeof e&&(e=[e]),"number"==typeof t&&(i=function(e,n){n[t]=w(e)}),n=0;n11?1:n[2]<1||n[2]>le(n[0],n[1])?2:n[3]<0||n[3]>24||24===n[3]&&(0!==n[4]||0!==n[5]||0!==n[6])?3:n[4]<0||n[4]>59?4:n[5]<0||n[5]>59?5:n[6]<0||n[6]>999?6:-1,u(e)._overflowDayOfYear&&(t<0||t>2)&&(t=2),u(e).overflow=t),e}function ye(e){!1===i.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function Me(e,t){var n=!0;return o((function(){return n&&(ye(e+"\n"+(new Error).stack),n=!1),t.apply(this,arguments)}),t)}var we={};i.suppressDeprecationWarnings=!1;var pe=/^\s*(?:[+-]\d{6}|\d{4})-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Ye=[["YYYYYY-MM-DD",/[+-]\d{6}-\d{2}-\d{2}/],["YYYY-MM-DD",/\d{4}-\d{2}-\d{2}/],["GGGG-[W]WW-E",/\d{4}-W\d{2}-\d/],["GGGG-[W]WW",/\d{4}-W\d{2}/],["YYYY-DDD",/\d{4}-\d{3}/]],De=[["HH:mm:ss.SSSS",/(T| )\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss",/(T| )\d\d:\d\d:\d\d/],["HH:mm",/(T| )\d\d:\d\d/],["HH",/(T| )\d\d/]],Le=/^\/?Date\((\-?\d+)/i;function ve(e){var t,n,i=e._i,a=pe.exec(i);if(a){for(u(e).iso=!0,t=0,n=Ye.length;t68?1900:2e3)};var be=W("FullYear",!1);function Oe(e,t,n){var i,a=n-t,s=n-e.day();return s>a&&(s-=7),s0?e:e-1,dayOfYear:s>0?s:Te(e-1)+s}}(n,i,a,r,s),e._a[0]=o.year,e._dayOfYear=o.dayOfYear}(e),e._dayOfYear&&(a=He(e._a[0],i[0]),e._dayOfYear>Te(a)&&(u(e)._overflowDayOfYear=!0),n=Se(a,0,e._dayOfYear),e._a[1]=n.getUTCMonth(),e._a[2]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=s[t]=i[t];for(;t<7;t++)e._a[t]=s[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[3]&&0===e._a[4]&&0===e._a[5]&&0===e._a[6]&&(e._nextDay=!0,e._a[3]=0),e._d=(e._useUTC?Se:ge).apply(null,s),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[3]=24)}}function We(e){if(e._f!==i.ISO_8601){e._a=[],u(e).empty=!0;var t,n,a,s,r,o=""+e._i,d=o.length,l=0;for(a=N(e._f,e._locale).match(A)||[],t=0;t0&&u(e).unusedInput.push(r),o=o.slice(o.indexOf(n)+n.length),l+=n.length),E[s]?(n?u(e).empty=!1:u(e).unusedTokens.push(s),ue(s,n,e)):e._strict&&!n&&u(e).unusedTokens.push(s);u(e).charsLeftOver=d-l,o.length>0&&u(e).unusedInput.push(o),!0===u(e).bigHour&&e._a[3]<=12&&e._a[3]>0&&(u(e).bigHour=void 0),e._a[3]=function(e,t,n){var i;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((i=e.isPM(n))&&t<12&&(t+=12),i||12!==t||(t=0),t):t}(e._locale,e._a[3],e._meridiem),Fe(e),fe(e)}else ve(e)}function Ce(e){var t=e._i,n=e._f;return e._locale=e._locale||k(e._l),null===t||void 0===n&&""===t?_({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),y(t)?new f(fe(t)):(a(n)?function(e){var t,n,i,a,s;if(0===e._f.length)return u(e).invalidFormat=!0,void(e._d=new Date(NaN));for(a=0;athis?this:e}));function Ue(e,t){var n,i;if(1===t.length&&a(t[0])&&(t=t[0]),!t.length)return xe();for(n=t[0],i=1;i+(e=y(e)?e:xe(e)):(y(e)?+e:+xe(e))<+this.clone().startOf(t)},Yt.isBefore=function(e,t){var n;return"millisecond"===(t=H(void 0!==t?t:"millisecond"))?+this<+(e=y(e)?e:xe(e)):(n=y(e)?+e:+xe(e),+this.clone().endOf(t)this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},Yt.isDSTShifted=function(){if(void 0!==this._isDSTShifted)return this._isDSTShifted;var e={};if(m(e,this),(e=Ce(e))._a){var t=e._isUTC?d(e._a):xe(e._a);this._isDSTShifted=this.isValid()&&p(e._a,t.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted},Yt.isLocal=function(){return!this._isUTC},Yt.isUtcOffset=function(){return this._isUTC},Yt.isUtc=Ve,Yt.isUTC=Ve,Yt.zoneAbbr=function(){return this._isUTC?"UTC":""},Yt.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},Yt.dates=Me("dates accessor is deprecated. Use date instead.",dt),Yt.months=Me("months accessor is deprecated. Use month instead",he),Yt.years=Me("years accessor is deprecated. Use year instead",be),Yt.zone=Me("moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779",(function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}));var Dt=Yt;function Lt(e){return e}var vt=Y.prototype;function gt(e,t,n,i){var a=k(),s=d().set(i,t);return a[n](s,e)}function St(e,t,n,i,a){if("number"==typeof e&&(t=e,e=void 0),e=e||"",null!=t)return gt(e,t,n,a);var s,r=[];for(s=0;s0?"future":"past"];return"function"==typeof n?n(t):n.replace(/%s/i,t)},vt.set=function(e){var t,n;for(n in e)"function"==typeof(t=e[n])?this[n]=t:this["_"+n]=t;this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)},vt.months=function(e){ +return this._months[e.month()]},vt._months=_e,vt.monthsShort=function(e){return this._monthsShort[e.month()]},vt._monthsShort=ce,vt.monthsParse=function(e,t,n){var i,a,s;for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),i=0;i<12;i++){if(a=d([2e3,i]),n&&!this._longMonthsParse[i]&&(this._longMonthsParse[i]=new RegExp("^"+this.months(a,"").replace(".","")+"$","i"),this._shortMonthsParse[i]=new RegExp("^"+this.monthsShort(a,"").replace(".","")+"$","i")),n||this._monthsParse[i]||(s="^"+this.months(a,"")+"|^"+this.monthsShort(a,""),this._monthsParse[i]=new RegExp(s.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[i].test(e))return i;if(n&&"MMM"===t&&this._shortMonthsParse[i].test(e))return i;if(!n&&this._monthsParse[i].test(e))return i}},vt.week=function(e){return Oe(e,this._week.dow,this._week.doy).week},vt._week={dow:0,doy:6},vt.firstDayOfYear=function(){return this._week.doy},vt.firstDayOfWeek=function(){return this._week.dow},vt.weekdays=function(e){return this._weekdays[e.day()]},vt._weekdays=ut,vt.weekdaysMin=function(e){return this._weekdaysMin[e.day()]},vt._weekdaysMin=_t,vt.weekdaysShort=function(e){return this._weekdaysShort[e.day()]},vt._weekdaysShort=lt,vt.weekdaysParse=function(e){var t,n,i;for(this._weekdaysParse=this._weekdaysParse||[],t=0;t<7;t++)if(this._weekdaysParse[t]||(n=xe([2e3,1]).day(t),i="^"+this.weekdays(n,"")+"|^"+this.weekdaysShort(n,"")+"|^"+this.weekdaysMin(n,""),this._weekdaysParse[t]=new RegExp(i.replace(".",""),"i")),this._weekdaysParse[t].test(e))return t},vt.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},vt._meridiemParse=/[ap]\.?m?\.?/i,vt.meridiem=function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},S("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===w(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),i.lang=Me("moment.lang is deprecated. Use moment.locale instead.",S),i.langData=Me("moment.langData is deprecated. Use moment.localeData instead.",k);var Tt=Math.abs;function kt(e,t,n,i){var a=Qe(t,n);return e._milliseconds+=i*a._milliseconds,e._days+=i*a._days,e._months+=i*a._months,e._bubble()}function bt(e){return e<0?Math.floor(e):Math.ceil(e)}function Ot(e){return 4800*e/146097}function Ht(e){return 146097*e/4800}function Ft(e){return function(){return this.as(e)}}var Wt=Ft("ms"),Ct=Ft("s"),Pt=Ft("m"),xt=Ft("h"),zt=Ft("d"),At=Ft("w"),Ut=Ft("M"),Gt=Ft("y");function Et(e){return function(){return this._data[e]}}var jt=Et("milliseconds"),It=Et("seconds"),Nt=Et("minutes"),Jt=Et("hours"),Rt=Et("days"),Vt=Et("months"),Zt=Et("years"),qt=Math.round,Qt={s:45,m:45,h:22,d:26,M:11};function Bt(e,t,n,i,a){return a.relativeTime(t||1,!!n,e,i)}var $t=Math.abs;function Xt(){var e,t,n=$t(this._milliseconds)/1e3,i=$t(this._days),a=$t(this._months);e=M(n/60),t=M(e/60),n%=60,e%=60;var s=M(a/12),r=a%=12,o=i,d=t,u=e,l=n,_=this.asSeconds();return _?(_<0?"-":"")+"P"+(s?s+"Y":"")+(r?r+"M":"")+(o?o+"D":"")+(d||u||l?"T":"")+(d?d+"H":"")+(u?u+"M":"")+(l?l+"S":""):"P0D"}var Kt=Ge.prototype +;return Kt.abs=function(){var e=this._data;return this._milliseconds=Tt(this._milliseconds),this._days=Tt(this._days),this._months=Tt(this._months),e.milliseconds=Tt(e.milliseconds),e.seconds=Tt(e.seconds),e.minutes=Tt(e.minutes),e.hours=Tt(e.hours),e.months=Tt(e.months),e.years=Tt(e.years),this},Kt.add=function(e,t){return kt(this,e,t,1)},Kt.subtract=function(e,t){return kt(this,e,t,-1)},Kt.as=function(e){var t,n,i=this._milliseconds;if("month"===(e=H(e))||"year"===e)return t=this._days+i/864e5,n=this._months+Ot(t),"month"===e?n:n/12;switch(t=this._days+Math.round(Ht(this._months)),e){case"week":return t/7+i/6048e5;case"day":return t+i/864e5;case"hour":return 24*t+i/36e5;case"minute":return 1440*t+i/6e4;case"second":return 86400*t+i/1e3;case"millisecond":return Math.floor(864e5*t)+i;default:throw new Error("Unknown unit "+e)}},Kt.asMilliseconds=Wt,Kt.asSeconds=Ct,Kt.asMinutes=Pt,Kt.asHours=xt,Kt.asDays=zt,Kt.asWeeks=At,Kt.asMonths=Ut,Kt.asYears=Gt,Kt.valueOf=function(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*w(this._months/12)},Kt._bubble=function(){var e,t,n,i,a,s=this._milliseconds,r=this._days,o=this._months,d=this._data;return s>=0&&r>=0&&o>=0||s<=0&&r<=0&&o<=0||(s+=864e5*bt(Ht(o)+r),r=0,o=0),d.milliseconds=s%1e3,e=M(s/1e3),d.seconds=e%60,t=M(e/60),d.minutes=t%60,n=M(t/60),d.hours=n%24,r+=M(n/24),a=M(Ot(r)),o+=a,r-=bt(Ht(a)),i=M(o/12),o%=12,d.days=r,d.months=o,d.years=i,this},Kt.get=function(e){return this[(e=H(e))+"s"]()},Kt.milliseconds=jt,Kt.seconds=It,Kt.minutes=Nt,Kt.hours=Jt,Kt.days=Rt,Kt.weeks=function(){return M(this.days()/7)},Kt.months=Vt,Kt.years=Zt,Kt.humanize=function(e){var t=this.localeData(),n=function(e,t,n){var i=Qe(e).abs(),a=qt(i.as("s")),s=qt(i.as("m")),r=qt(i.as("h")),o=qt(i.as("d")),d=qt(i.as("M")),u=qt(i.as("y")),l=a0,l[4]=n,Bt.apply(null,l)}(this,!e,t);return e&&(n=t.pastFuture(+this,n)),t.postformat(n)},Kt.toISOString=Xt,Kt.toString=Xt,Kt.toJSON=Xt,Kt.locale=it,Kt.localeData=st,Kt.toIsoString=Me("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Xt),Kt.lang=at,j("X",0,0,"unix"),j("x",0,0,"valueOf"),ae("x",ee),ae("X",/[+-]?\d+(\.\d{1,3})?/),oe("X",(function(e,t,n){n._d=new Date(1e3*parseFloat(e,10))})),oe("x",(function(e,t,n){n._d=new Date(w(e))})),i.version="2.10.6",t=xe,i.fn=Dt,i.min=function(){var e=[].slice.call(arguments,0);return Ue("isBefore",e)},i.max=function(){var e=[].slice.call(arguments,0);return Ue("isAfter",e)},i.utc=d,i.unix=function(e){return xe(1e3*e)},i.months=function(e,t){return St(e,t,"months",12,"month")},i.isDate=s,i.locale=S,i.invalid=_,i.duration=Qe,i.isMoment=y,i.weekdays=function(e,t){return St(e,t,"weekdays",7,"day")},i.parseZone=function(){return xe.apply(null,arguments).parseZone()},i.localeData=k,i.isDuration=Ee,i.monthsShort=function(e,t){return St(e,t,"monthsShort",12,"month")}, +i.weekdaysMin=function(e,t){return St(e,t,"weekdaysMin",7,"day")},i.defineLocale=T,i.weekdaysShort=function(e,t){return St(e,t,"weekdaysShort",7,"day")},i.normalizeUnits=H,i.relativeTimeThreshold=function(e,t){return void 0!==Qt[e]&&(void 0===t?Qt[e]:(Qt[e]=t,!0))},i}()}).call(this,n("YuTi")(e))}}]); \ No newline at end of file diff --git a/public/charting_library/bundles/35.cdf3658f4055352d11fd.js b/public/charting_library/bundles/35.cdf3658f4055352d11fd.js new file mode 100644 index 00000000..97b87d26 --- /dev/null +++ b/public/charting_library/bundles/35.cdf3658f4055352d11fd.js @@ -0,0 +1,14 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[35],{DxCR:function(t,e,i){"use strict";(function(t){i("sZhh"),i("QBwY");var r=i("56W2");i("pay7");var o=i("Eyy1").ensureNotNull,n=i("ivNn").isNaN,s=i("eJTA"),a=s.rgba,l=s.rgbaToString,c=s.parseRgb,u=i("XPit").TimePointIndexSearchMode,h=i("zXvd").NumericFormatter,p=i("Tmoa"),d=i("jNEI").addColorPicker,v=i("2h0C").Binding,f=i("txPx").getLogger("Chart.PropertyPage");function g(t,e){return'"}function _(t,e){this._model=e,this._bindings=[],this._property=t,this.supportThemeSwitcher=!1}function m(t){return function(e){return et?t:e}}function y(t){return function(e){var i=parseInt(e,10);return n(i)?t:i}}function C(t,e,i,r,o,n,s){v.call(this,t,e,r,o,n),this._transformFunction=i,this._setter=s,this._attachToControl(t,r)}function k(t,e,i,r,o,n){this._subControlIds=e,v.call(this,t,i,r,o,n),this._forEachSubControl((function(t){this._attachToControl(t,r)}))}function T(t,e,i,r,o,n,s){this._model=r,this._mainSeries=n,this._toIntTransformer=y(s),this._disabled=!1,v.call(this,t,e,i,r,o);var a=this;i&&t.change((function(){a.setValueToProperty(a.value())})),this._mainSeries.dataEvents().barReceived().subscribe(this,(function(){a.setValue(this.property().value())}))}function x(t,e,i,r,o,n,s){v.call(this,t,e,i,r,o),this._transform=n,i&&t.on("accept-symbol",function(t,e){this.setValueToProperty(e),this.setValue(e)}.bind(this)),s&&(s.subscribe(this,this._updateDisplayedSymbol),this._updateDelegate=s)}function M(t,e,i,r,o,n,s,a){v.call(this,t,e,r,o,n),this._transformFunction=i,this._propertyChangedHook=a,this._setter=s;var l=this;r&&t.change((function(){l._setter?l._setter.call(l,l.value()):l.setValueToProperty(l.value())}))}function w(t,e,i,r,o,n){if(!t.is(":checkbox, :radio"))return new S(t,e,i,r,o);v.call(this,t,e,i,r,o),this._setter=n;var s=this;i&&t.change((function(){s._setter?s._setter.call(s,s.value()):s.setValueToProperty(s.value())}))}function V(t,e,i,r,o,n){v.call(this,t,e,i,r,o),this._inverted=!0===n}function S(t,e,i,r,o){v.call(this,t,e,i,r,o);var n=this;i&&t.click((function(){var t=$(this).toggleClass("active").hasClass("active");n.setValueToProperty(t)}))}function O(t,e,i,r,o,n){var s;s=t.is("input")?t:t.find("input"),v.call(this,s,e,i,r,o),this._transparencyProperty=n,this.applyOldTransparency();var a=this;i&&s.change((function(){a.setValueToProperty(a.value())}))}function E(e,i,r,o,n,s){isNumber(i.value())||(f.logWarn("Property cannot be binded to control, bad value (expect number): "+i.value()),i=new t),v.call(this,e,i,r,o,n);var a=this;function l(t,e){var i=a.control().slider("option","min"),r=a.control().slider("option","max"),o=a._property.value();(i<=o&&o<=r||il._transformers[1]&&$(n[1]).val(l._transformers[1]),-1!==$.inArray(t.keyCode,[46,8,9,27,13,110,190])||65===t.keyCode&&!0===t.ctrlKey||67===t.keyCode&&!0===t.ctrlKey||88===t.keyCode&&!0===t.ctrlKey||t.keyCode>=35&&t.keyCode<=39||(t.shiftKey||t.keyCode<48||t.keyCode>57)&&(t.keyCode<96||t.keyCode>105)&&t.preventDefault()}))})),$(n[0]).on("keyup",(function(t){parseInt($(this).val())l._transformers[1]&&$(this).val(l._transformers[1]),parseInt($(this).val())>parseInt($(n[1]).val())&&$(this).val(n[1].val()),l._control.slider("values",0,$(this).val()),P.prototype.setValueToProperty.call(l,l._control.slider("values"),"from")})),$(n[1]).on("keyup",(function(t){parseInt($(this).val())l._transformers[1]&&$(this).val(l._transformers[1]),parseInt($(this).val())<$(n[0]).val()&&$(this).val(n[0].val()),l._control.slider("values",1,$(this).val()),P.prototype.setValueToProperty.call(l,l._control.slider("values"),"to")}))),this._propFrom.listeners().subscribe(this,P.prototype.propertyChanged),this._propTo.listeners().subscribe(this,P.prototype.propertyChanged),r&&t.on("slide",(function(t,e){l.setValueToProperty(l._control.slider("values"),e.handle)})),t.slider({stop:function(t,e){n&&($(n[0]).val(l._control.slider("values",0)),$(n[1]).val(l._control.slider("values",1))),l.setValueToProperty(l._control.slider("values"),e.handle)},start:function(t,e){n&&($(n[0]).val(l._control.slider("values",0)),$(n[1]).val(l._control.slider("values",1))),l.setValueToProperty(l._control.slider("values"),e.handle)}})}_.prototype.model=function(){return this._model}, +_.prototype.bindControl=function(t){return this._bindings.push(t),t},_.prototype.unbindControl=function(t){var e=this._bindings.indexOf(t);-1!==e&&this._bindings.splice(e,1)},_.prototype.loadData=function(){for(var t=0;t',t).slider({max:4,min:1,step:1})},_.prototype.createColorPicker=function(t){return d(null,t)},_.prototype.createCombo=function(t){var e=$(document.createElement("select")),i=t.reduce((function(t,e){return t.add($(document.createElement("option")).prop({value:e,text:e}))}),$());return e.append(i)},_.prototype.createFontEditor=function(t){var e=t||TradingView.factoryDefaults("chartproperties.editorFontsList");return this.createCombo(e)},_.prototype.createFontSizeEditor=function(t){var e=t||[10,11,12,14,16,20,24,28,32,40];return this.createCombo(e).addClass("tv-select-container-fontsize")},_.prototype.createSeriesMinTickEditor=function(){var t="",$(t)},_.prototype.createPrecisionEditor=function(){for(var t="",$(t)},_.prototype.createLabeledCell=function(t,e,i){var r,o,n=null;"number"==typeof t.valueOf()?(n=t,r=e,o=i):(r=t,o=e),r+="";var s=this._labelToId(r),a=$("");return $("");this.handles=o.add(t(n.join("")).appendTo(this.element)), +this._addClass(this.handles,"ui-slider-handle","ui-state-default"),this.handle=this.handles.eq(0),this.handles.each((function(e){t(this).data("ui-slider-handle-index",e).attr("tabIndex",0)}))},_createRange:function(){var e=this.options;e.range?(!0===e.range&&(e.values?e.values.length&&2!==e.values.length?e.values=[e.values[0],e.values[0]]:t.isArray(e.values)&&(e.values=e.values.slice(0)):e.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?(this._removeClass(this.range,"ui-slider-range-min ui-slider-range-max"),this.range.css({left:"",bottom:""})):(this.range=t("
    ").appendTo(this.element),this._addClass(this.range,"ui-slider-range")),"min"!==e.range&&"max"!==e.range||this._addClass(this.range,"ui-slider-range-"+e.range)):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){this._off(this.handles),this._on(this.handles,this._handleEvents),this._hoverable(this.handles),this._focusable(this.handles)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this._mouseDestroy()},_mouseCapture:function(e){var i,r,o,n,s,a,l,c=this,u=this.options;return!u.disabled&&(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:e.pageX,y:e.pageY},r=this._normValueFromMouse(i),o=this._valueMax()-this._valueMin()+1,this.handles.each((function(e){var i=Math.abs(r-c.values(e));(o>i||o===i&&(e===c._lastChangedValue||c.values(e)===u.min))&&(o=i,n=t(this),s=e)})),!1!==this._start(e,s)&&(this._mouseSliding=!0,this._handleIndex=s,this._addClass(n,null,"ui-state-active"),n.trigger("focus"),a=n.offset(),l=!t(e.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=l?{left:0,top:0}:{left:e.pageX-a.left-n.width()/2,top:e.pageY-a.top-n.height()/2-(parseInt(n.css("borderTopWidth"),10)||0)-(parseInt(n.css("borderBottomWidth"),10)||0)+(parseInt(n.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(e,s,r),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(t){var e={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(e);return this._slide(t,this._handleIndex,i),!1},_mouseStop:function(t){return this._removeClass(this.handles,null,"ui-state-active"),this._mouseSliding=!1,this._stop(t,this._handleIndex),this._change(t,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(t){var e,i,r,o,n;return"horizontal"===this.orientation?(e=this.elementSize.width,i=t.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,i=t.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),(r=i/e)>1&&(r=1),r<0&&(r=0),"vertical"===this.orientation&&(r=1-r),o=this._valueMax()-this._valueMin(),n=this._valueMin()+r*o,this._trimAlignValue(n)},_uiHash:function(t,e,i){var r={handle:this.handles[t],handleIndex:t,value:void 0!==e?e:this.value()} +;return this._hasMultipleValues()&&(r.value=void 0!==e?e:this.values(t),r.values=i||this.values()),r},_hasMultipleValues:function(){return this.options.values&&this.options.values.length},_start:function(t,e){return this._trigger("start",t,this._uiHash(e))},_slide:function(t,e,i){var r,o=this.value(),n=this.values();this._hasMultipleValues()&&(r=this.values(e?0:1),o=this.values(e),2===this.options.values.length&&!0===this.options.range&&(i=0===e?Math.min(r,i):Math.max(r,i)),n[e]=i),i!==o&&!1!==this._trigger("slide",t,this._uiHash(e,i,n))&&(this._hasMultipleValues()?this.values(e,i):this.value(i))},_stop:function(t,e){this._trigger("stop",t,this._uiHash(e))},_change:function(t,e){this._keySliding||this._mouseSliding||(this._lastChangedValue=e,this._trigger("change",t,this._uiHash(e)))},value:function(t){return arguments.length?(this.options.value=this._trimAlignValue(t),this._refreshValue(),void this._change(null,0)):this._value()},values:function(e,i){var r,o,n;if(arguments.length>1)return this.options.values[e]=this._trimAlignValue(i),this._refreshValue(),void this._change(null,e);if(!arguments.length)return this._values();if(!t.isArray(arguments[0]))return this._hasMultipleValues()?this._values(e):this.value();for(r=this.options.values,o=arguments[0],n=0;n=0;r--)this._change(null,r);this._animateOff=!1;break;case"step":case"min":case"max":this._animateOff=!0,this._calculateNewMax(),this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_setOptionDisabled:function(t){this._super(t),this._toggleClass(null,"ui-state-disabled",!!t)},_value:function(){var t=this.options.value;return t=this._trimAlignValue(t)},_values:function(t){var e,i,r;if(arguments.length)return e=this.options.values[t],e=this._trimAlignValue(e);if(this._hasMultipleValues()){for(i=this.options.values.slice(),r=0;r=this._valueMax())return this._valueMax();var e=this.options.step>0?this.options.step:1,i=(t-this._valueMin())%e,r=t-i;return 2*Math.abs(i)>=e&&(r+=i>0?e:-e),parseFloat(r.toFixed(5))}, +_calculateNewMax:function(){var t=this.options.max,e=this._valueMin(),i=this.options.step;(t=Math.round((t-e)/i)*i+e)>this.options.max&&(t-=i),this.max=parseFloat(t.toFixed(this._precision()))},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=t.toString(),i=e.indexOf(".");return-1===i?0:e.length-i-1},_valueMin:function(){return this.options.min},_valueMax:function(){return this.max},_refreshRange:function(t){"vertical"===t&&this.range.css({width:"",left:""}),"horizontal"===t&&this.range.css({height:"",bottom:""})},_refreshValue:function(){var e,i,r,o,n,s=this.options.range,a=this.options,l=this,c=!this._animateOff&&a.animate,u={};this._hasMultipleValues()?this.handles.each((function(r){i=(l.values(r)-l._valueMin())/(l._valueMax()-l._valueMin())*100,u["horizontal"===l.orientation?"left":"bottom"]=i+"%",t(this).stop(1,1)[c?"animate":"css"](u,a.animate),!0===l.options.range&&("horizontal"===l.orientation?(0===r&&l.range.stop(1,1)[c?"animate":"css"]({left:i+"%"},a.animate),1===r&&l.range[c?"animate":"css"]({width:i-e+"%"},{queue:!1,duration:a.animate})):(0===r&&l.range.stop(1,1)[c?"animate":"css"]({bottom:i+"%"},a.animate),1===r&&l.range[c?"animate":"css"]({height:i-e+"%"},{queue:!1,duration:a.animate}))),e=i})):(r=this.value(),o=this._valueMin(),n=this._valueMax(),i=n!==o?(r-o)/(n-o)*100:0,u["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[c?"animate":"css"](u,a.animate),"min"===s&&"horizontal"===this.orientation&&this.range.stop(1,1)[c?"animate":"css"]({width:i+"%"},a.animate),"max"===s&&"horizontal"===this.orientation&&this.range.stop(1,1)[c?"animate":"css"]({width:100-i+"%"},a.animate),"min"===s&&"vertical"===this.orientation&&this.range.stop(1,1)[c?"animate":"css"]({height:i+"%"},a.animate),"max"===s&&"vertical"===this.orientation&&this.range.stop(1,1)[c?"animate":"css"]({height:100-i+"%"},a.animate))},_handleEvents:{keydown:function(e){var i,r,o,n=t(e.target).data("ui-slider-handle-index");switch(e.keyCode){case t.ui.keyCode.HOME:case t.ui.keyCode.END:case t.ui.keyCode.PAGE_UP:case t.ui.keyCode.PAGE_DOWN:case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(e.preventDefault(),!this._keySliding&&(this._keySliding=!0,this._addClass(t(e.target),null,"ui-state-active"),!1===this._start(e,n)))return}switch(o=this.options.step,i=r=this._hasMultipleValues()?this.values(n):this.value(),e.keyCode){case t.ui.keyCode.HOME:r=this._valueMin();break;case t.ui.keyCode.END:r=this._valueMax();break;case t.ui.keyCode.PAGE_UP:r=this._trimAlignValue(i+(this._valueMax()-this._valueMin())/this.numPages);break;case t.ui.keyCode.PAGE_DOWN:r=this._trimAlignValue(i-(this._valueMax()-this._valueMin())/this.numPages);break;case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:if(i===this._valueMax())return;r=this._trimAlignValue(i+o);break;case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(i===this._valueMin())return;r=this._trimAlignValue(i-o)} +this._slide(e,n,r)},keyup:function(e){var i=t(e.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(e,i),this._change(e,i),this._removeClass(t(e.target),null,"ui-state-active"))}}})})?r.apply(e,o):r)||(t.exports=n)},"Y+MS":function(t,e,i){"use strict";var r=function(){function t(t,e){this.mouseFlag=!1,this.accuracy=2,this.value=1,this.colorInput=t,this.$el=$('
    ',t.prop("ownerDocument")),e&&this.$el.hide(),this.$gradient=$('
    ').appendTo(this.$el),this.$roller=$('').appendTo(this.$gradient)}return t.prototype.calculateRollerPosition=function(t){var e=t.pageX-this.$gradient.offset().left,i=this.$gradient.width();return e>i?100:e<0?0:~~(e/i*100)},t.prototype.toRgb=function(t){var e;return~t.indexOf("#")?t:(e=t.match(/[0-9.]+/g))?"rgb("+e.slice(0,3).join(", ")+")":"rgb(127, 127, 127)"},t.prototype.setValue=function(t){this.value=1!==t?t.toFixed(this.accuracy):t},t.prototype.updateRoller=function(){this.$roller.css("left",100-100*this.value+"%")},t.prototype.rollerMoveHandler=function(t){if(this.mouseFlag){var e=this.calculateRollerPosition(t);this.setValue((100-e)/100),$(this).trigger("change",[this.val()]),this.$roller.css("left",e+"%")}t.preventDefault()},t.prototype.mouseupHandler=function(t){this.mouseFlag&&(this.mouseFlag=!1,$(this).trigger("afterChange",[this.val()]))},t.prototype.initEvents=function(){var t=this.$el.prop("ownerDocument"),e=function(t){return this.rollerMoveHandler(t)}.bind(this),i=function(r){return $(t).off("mousemove mouseup",e),$(t).off("mouseup",i),this.mouseupHandler(r)}.bind(this);this.$el.on("mousedown",function(r){this.mouseFlag=!0,$(t).on("mousemove mouseup",e),$(t).on("mouseup",i),r.preventDefault()}.bind(this)),this.colorInput.on("change",function(t){this.updateColor()}.bind(this))},t.prototype.removeEvents=function(){},t.prototype.updateColor=function(){var t=this.colorInput.val()||"black",e=this.toRgb(t);$.browser.msie?this.$gradient.css("filter",["progid:DXImageTransform.Microsoft.gradient(startColorstr='",e,"', EndColor=0, GradientType=1)"].join("")):["-moz-linear-gradient(left, %COLOR 0%, transparent 100%)","-webkit-gradient(linear, left top, right top, color-stop(0%,%COLOR), color-stop(100%,transparent))","-webkit-linear-gradient(left, %COLOR 0%,transparent 100%)","-o-linear-gradient(left, %COLOR 0%,transparent 100%)","linear-gradient(to right, %COLOR 0%,transparent 100%)"].forEach(function(t){this.$gradient.css("background-image",t.replace(/%COLOR/,e))}.bind(this))},t.prototype.val=function(t){return void 0!==t&&(this.setValue(+t),this.updateRoller()),this.value},function(e,i){return new t(e,i)}}();t.exports=r},jNEI:function(t,e,i){"use strict";i.r(e),i.d(e,"addColorPicker",(function(){return s}));i("P5fv"),i("vrQV");var r=i("eJTA"),o=i("Vdly");function n(t){for(var e=[],i=0,o=t;i');return null!==t&&i.appendTo(t),void 0!==e.addClass&&i.addClass(e.addClass),$('
    ').appendTo(i),$('').tvcolorpicker({customColors:n(Object(o.getJSON)("pickerCustomColors",[])),direction:e.direction,hideTransparency:!!e.hideTransparency}).on("change",(function(){var t,e;$(this).css("border-color",(t=$(this).val()||"#727272",e=Object(r.parseRgb)(t).map((function(t){return t>50?t-50:0})),Object(r.rgbToString)(e)))})).bind("customcolorchange",(function(t,e){Object(o.setJSON)("pickerCustomColors",e)})).appendTo(i),i}},pay7:function(t,e,i){},utoz:function(t,e,i){},vBzC:function(t,e,i){var r,o,n;o=[i("P5fv"),i("Qwlt")],void 0===(n="function"==typeof(r=function(t){return t.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}})?r.apply(e,o):r)||(t.exports=n)},vrQV:function(t,e,i){"use strict";i("KjDF"),i("utoz"),i("pay7");var r=i("eJTA"),o=r.rgba,n=r.areEqualRgb,s=r.areEqualRgba,a=r.normalizeHue,l=r.normalizeHsvSaturation,c=r.normalizeValue,u=r.hsv,h=r.rgbToHsv,p=r.hsvToRgb,d=r.rgbToString,v=r.rgbaToString,f=r.parseRgb,g=r.parseRgba,_=i("Y+MS"),m=i("wmOI").ESC;!function(t){if(!t)throw new Error("This program cannot be run in DOS mode");b.setCustomColors=r,t.fn.tvcolorpicker=b;var e=[];function i(t){return""===t?t:v(g(t))}function r(t){t&&(t.join||(t=t?(""+t).split(","):[]),e=t)}function b(y){var C;function k(e,i,r){var n=t(this);e=v(o(f(e),i)),T.call(this,e),n.removeData("tvcolorpicker").removeData("tvcolorpicker-custom-color"),r&&(w.call(n),n.blur())}function T(e){var i=t(this);i.val(e),i.change(),e?i.trigger("pick-color",e):i.trigger("pick-transparent"),x.call(this,e)}function x(e){""!==e?(t(this).removeClass("tvcolorpicker-gradient-widget"),t(this).css({backgroundColor:e,color:e})):t(this).addClass("tvcolorpicker-gradient-widget")}function M(e,i){i=i||{};var r,o=this,s=o.prop("ownerDocument"),a=t(o).val().toLowerCase(),l=s.createElement("table"),c=s.createElement("tbody");l.appendChild(c);var u=0;return t.each(e,(function(e,s){u++,e%10==0&&(r=t("").appendTo(c));var l=t('').appendTo(r),h=t('
    ').appendTo(l).find(".tvcolorpicker-swatch").data("color",s);i.addClass&&h.addClass(i.addClass),s&&(s=s.toLowerCase(),a&&n(f(a),f(s))&&h.addClass("active"),h.css({backgroundColor:s}).data("color",s),h.bind("click",(function(){k.call(o,s,C.val(),!0)})))})),t(l).addClass("tvcolorpicker-table"),u?l:t()}function $(i){var r=!1,n=t(this),m=n.prop("ownerDocument"),b=t('
    '),y=t('
    ').appendTo(b) +;y.append(M.call(this,["rgb(0, 0, 0)","rgb(66, 66, 66)","rgb(101, 101, 101)","rgb(152, 152, 152)","rgb(182, 182, 182)","rgb(203, 203, 203)","rgb(216, 216, 216)","rgb(238, 238, 238)","rgb(242, 242, 242)","rgb(255, 255, 255)"])),y.append(M.call(this,["rgb(151, 0, 0)","rgb(255, 0, 0)","rgb(255, 152, 0)","rgb(255, 255, 0)","rgb(0, 255, 0)","rgb(0, 255, 255)","rgb(73, 133, 231)","rgb(0, 0, 255)","rgb(152, 0, 255)","rgb(255, 0, 255)"])),y.append(M.call(this,["rgb(230, 184, 175)","rgb(244, 204, 204)","rgb(252, 229, 205)","rgb(255, 242, 204)","rgb(217, 234, 211)","rgb(208, 224, 227)","rgb(201, 218, 248)","rgb(207, 226, 243)","rgb(217, 210, 233)","rgb(234, 209, 220)","rgb(221, 126, 107)","rgb(234, 153, 153)","rgb(249, 203, 156)","rgb(255, 229, 153)","rgb(182, 215, 168)","rgb(162, 196, 201)","rgb(164, 194, 244)","rgb(159, 197, 232)","rgb(180, 167, 214)","rgb(213, 166, 189)","rgb(204, 65, 37)","rgb(224, 102, 102)","rgb(246, 178, 107)","rgb(255, 217, 102)","rgb(147, 196, 125)","rgb(118, 165, 175)","rgb(109, 158, 235)","rgb(111, 168, 220)","rgb(142, 124, 195)","rgb(194, 123, 160)","rgb(166, 28, 0)","rgb(204, 0, 0)","rgb(230, 145, 56)","rgb(241, 194, 50)","rgb(106, 168, 79)","rgb(69, 129, 142)","rgb(60, 120, 216)","rgb(61, 133, 198)","rgb(103, 78, 167)","rgb(166, 77, 121)","rgb(133, 32, 12)","rgb(153, 0, 0)","rgb(180, 95, 6)","rgb(191, 144, 0)","rgb(56, 118, 29)","rgb(19, 79, 92)","rgb(17, 85, 204)","rgb(11, 83, 148)","rgb(53, 28, 117)","rgb(116, 27, 71)","rgb(91, 15, 0)","rgb(102, 0, 0)","rgb(120, 63, 4)","rgb(127, 96, 0)","rgb(39, 78, 19)","rgb(12, 52, 61)","rgb(28, 69, 135)","rgb(7, 55, 99)","rgb(32, 18, 77)","rgb(76, 17, 48)"]));var x=t('
    ').css({display:"none"}).appendTo(b),$=t('
    ').appendTo(x),w=t('
    ').appendTo($),S=t('
    ').appendTo(w),O=t('
    ').appendTo(w),E=t('
    ').appendTo($),P=t('
    ').appendTo(E),I=t('
    ').appendTo(P),D=t('
    ').appendTo(P);(C=_(t(this),i.hideTransparency)).initEvents(),C.updateColor(),C.$el.appendTo(b),C.val(g(n.val()||"rgb(14, 15, 16)")[3]);var F=w.height(),R=w.width(),A=!1,H=!1,z=!0,L=[0,0,.5];function N(t){var e=t.originalEvent,i=t.offsetX||t.layerX||e&&(e.offsetX||e.layerX)||0,r=t.offsetY||t.layerY||e&&(e.offsetY||e.layerY)||0;S.css({left:i+"px",top:r+"px"}),L[0]=a(i/R),L[1]=l(1-r/F),P.css({backgroundColor:d(p(u(L[0],L[1],1)))}),j()}function B(e){1==e.which&&(A=!1,b.is(".opened")&&t(n).get(0).focus())}function U(e){var i=function(e){var i=e.pageY,r=t(D),o=i-r.offset().top;return o>r.height()?r.height():o<0?0:o}(e);I.css({top:i+"px"}),L[2]=c(1-Math.max(0,Math.min(i,F))/F),j()}function W(e){1==e.which&&(H=!1,t(m).unbind("mouseup",W),b.is(".opened")&&t(n).get(0).focus())}function j(){z&&(z=!1,b.find(".tvcolorpicker-swatch.active").removeClass("active"));var t=o(p(L),C.val()) +;if(!s(g(n.val().toUpperCase()),t)){var e=v(t);n.data("tvcolorpicker-custom-color",e),T.call(n,e)}}O.bind("mousedown",(function(e){1==e.which&&(A=!0,t(m).bind("mouseup",B),N(e),e.preventDefault())})),O.bind("mousemove",(function(t){A&&(N(t),t.preventDefault())})),t(C).on("change",function(){r?j():k.call(this,t(this).val()||"rgb(14, 15, 16)",C.val())}.bind(this)),t(C).on("afterChange",function(){t(this).focus()}.bind(this)),E.bind("mousedown",(function(e){1==e.which&&(H=!0,t(m).bind("mouseup",W),U(e),e.preventDefault())})),t(m).bind("mousemove",(function(t){H&&(U(t),t.preventDefault())}));t('
    '+window.t("Custom color...")+"").appendTo(b).bind("click",(function(){var e=t(this).is(".active");if(e||x.css({minWidth:y.width()+"px",minHeight:y.height()+"px"}),t(this)[e?"removeClass":"addClass"]("active"),r=t(this).is(".active"),x.css({display:e?"none":"block"}),y.css({display:e?"block":"none"}),e)n.removeData("tvcolorpicker-custom-color");else{F=w.height(),R=w.width();var i=f(n.val()||"rgb(14, 15, 16)");L=h(i),S.css({left:~~(L[0]*R)+"px",top:~~((1-L[1])*F)+"px"}),I.css({top:~~((1-L[2])*F)+"px"}),P.css({backgroundColor:d(p(u(L[0],L[1],1)))})}}));return b.append(t(M.call(this,e,{addClass:"tvcolorpicker-user"})).addClass("tvcolorpicker-user-swatches")),t(m.body).append(b),function(e,i,r){var o,n=t(e).prop("ownerDocument"),s=n.defaultView,a=t(e).offset(),l=(t(n).scrollLeft(),t(n).scrollTop()),c=t(e).outerWidth(),u=t(e).outerHeight(),h=t(s).width(),p=t(s).height(),d=t(i).outerWidth(),v=t(i).outerHeight();switch("function"==typeof r.direction?r.direction():r.direction){default:case"down":o={top:a.top+u+r.offset,left:a.left+r.drift};break;case"right":o={top:a.top+r.drift,left:a.left+c+r.offset}}o.top+v>p+l&&(o.top=p-v+l),a.left+d>h&&(o.left=h-d),o.left+="px",o.top+="px",i.css(o)}(n,b,i),m.addEventListener("keydown",V,!1),b}function w(){var i=t(this).prop("ownerDocument")||document;t(i).find(".tvcolorpicker-popup").removeClass("opened").remove(),t(C).off("change"),t(C).off("afterChange"),i.removeEventListener("keydown",V,!1),t(S).data("tvcolorpicker",null),t(S).each((function(){var i=t(this).data("tvcolorpicker-custom-color");i&&(function(i){var r=!1,o=f(i);return t.each(e,(function(t,e){if(n(f(e),o))return r=!0,!1})),!r&&(e=[d(o)].concat(e.slice(0,28)),!0)}(i)&&t(this).trigger("customcolorchange",[e]),t(this).data("tvcolorpicker-custom-color",null));var r=t(this).data("tvcolorpicker-previous-color");r&&r!=t(this).val()&&t(this).trigger("change"),t(this).removeData("tvcolorpicker-previous-color")}))}function V(t){t.keyCode===m&&(w.call(S),S.blur())}y=t.extend({},b.options,y||{});var S=this;return y&&"customColors"in y&&r(y.customColors),this.each((function(){var e=t(this);e.val(i(e.val()));var r=null,o=!1;e.addClass("tvcolorpicker-widget").attr("autocomplete","off").attr("readonly",!0);var n=function(){e.data("tvcolorpicker")||(w.call(e),r=$.call(e,y),e.data("tvcolorpicker-custom-color",null),e.data("tvcolorpicker",r),e.data("tvcolorpicker-previous-color",e.val()), +r.bind("mousedown click",(function(i){t(i.target).parents().andSelf().is(r)&&(e.focus(),o=!0,setTimeout((function(){o=!1}),0))})))};function s(){var t=i(e.val());x.call(e,t)}e.on("touchstart",n),e.focus(n),w.call(e),e.bind("blur",(function(t){o?t.stopPropagation():w.call(e)})),e.change((function(t){s()})),s()}))}b.options={direction:"down",offset:0,drift:0}}(window.jQuery)}}]); \ No newline at end of file diff --git a/public/charting_library/bundles/36.0f30a765c5ed2cc28e47.js b/public/charting_library/bundles/36.0f30a765c5ed2cc28e47.js new file mode 100644 index 00000000..6dd8108e --- /dev/null +++ b/public/charting_library/bundles/36.0f30a765c5ed2cc28e47.js @@ -0,0 +1,6 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[36],{BhuR:function(t,o){t.exports=''},GAqT:function(t,o,e){"use strict";(function(o,i){var n=e("Hr11").max,a=e("A6WY").lazyJqueryUI,s=e("jAh7").getRootOverlapManager;e("PVgW");var d={modalDialog:null,dialogs:[],NOTIFICATION_ANIMATION_START_OFFSET:"-33px",_constrainDraggableOptionsIfNeeded:function(t){return o.enabled("constraint_dialogs_movement")&&(t.containment=".chart-page"),t},showNotice:function(t,o,e){"object"==typeof o&&(e=o,o="");var n=(e=e||{}).doNotCloseOnBgClick||!1,a=e.html||"",s=e.width||"400px",l={};l.noClose=e.noClose||null,l.addClass=e.modalDialogClass||null,d.createModalDialog(t,l);var r=e.centerCaption?"caption-big-center":"caption-big";d.modalDialog.find("._tv-dialog").css("width",s);var c=e.customButtonCaption?e.customButtonCaption:$.t("OK");return d.modalDialog.find("._tv-dialog-content").html(i.render('
    {{text}}'+a+'
    {{^removeOkButton}}
    {{/removeOkButton}}
    ',{captionClassName:r,classSuffix:e.classSuffix||"",text:o,removeOkButton:e&&e.removeOkButton})),d.modalDialog.find("._tv-button.ok").on("click",(function(){d.destroy(),e.onOkButtonClick&&e.onOkButtonClick()})),d.positionDialog(),d.applyHandlers(!1,{doNotCloseOnBgClickIfShadowbox:n,beforeDestroy:e.onClose}),d.modalDialog},showCustomDialog:function(t){function o(t){d.destroy(),t.preventDefault()}return d.createModalDialog(t.title||$.t("Dialog"),{addClass:""}),d.modalDialog.find("._tv-dialog").css("width",t.width||"400px"),d.modalDialog.find("._tv-dialog-content").html('
    '+(t.html||$.t("Content"))+"
    "),d.modalDialog.find(".ok").click(o),d.modalDialog.find("form").submit(o),d.modalDialog.find(".cancel").click(o),d.modalDialog.find("._tv-dialog-title-close").click(o),d.positionDialog(),d.applyHandlers(),d.modalDialog},createModalDialog:function(t,o){o=o||{},null!==d.modalDialog&&d.destroy(),d.modalDialog=$('
    '+(o.noHeader?"":'
    '+(o.noClose?"":'')+''+t+"
    ")+'
    ').appendTo($("body")).data("title",t),d._addMessageCloseButton(d.modalDialog.find("._tv-dialog-error")),d._addMessageCloseButton(d.modalDialog.find("._tv-dialog-message")),o.noShadowBox&&d.modalDialog.addClass("transparent"),o.addClass&&d.modalDialog.addClass(o.addClass),o.width&&d.modalDialog.find("._tv-dialog").css({width:o.width}),o.content&&d.modalDialog.find("._tv-dialog-content").html(o.content) +;var e=$(".fancybox-overlay");if(e.length){var i=e.css("z-index");$("._tv-dialog-shadowbox").css("z-index",i+1)}return o.draggable&&a(d.modalDialog).draggable(d._constrainDraggableOptionsIfNeeded({handle:d.modalDialog.find("._tv-dialog-title")})),o.zIndex&&d.modalDialog.css("z-index",o.zIndex),d.modalDialog},_addMessageCloseButton:function(t){var o=$(e("BhuR")).attr({class:"close",title:$.t("Close message")});t.append(o),$(o).on("click",(function(){t.animate({marginTop:d.NOTIFICATION_ANIMATION_START_OFFSET,opacity:0},"fast",(function(){t.hide()}))}))},createDialog:function(t,o){if(d.isOpen(t))return(c=d.get(t)).find("._tv-dialog-content").html(""),c.data("new",!1),c;var e=(o=o||{}).ownerDocument||document,l=s(e),r=l.ensureWindow(t,{position:"relative"}),c=$(i.render('
    {{^hideTitle}} {{&title}}{{/hideTitle}}{{^hideCloseCross}}{{/hideCloseCross}}
    ',{addClass:o.addClass||"",hideTitle:o.hideTitle,hideCloseCross:o.hideCloseCross,title:t}),e).appendTo(r);d._addMessageCloseButton(c.find("._tv-dialog-error")),d._addMessageCloseButton(c.find("._tv-dialog-message")),o.width&&c.css({width:o.width}),o.content&&c.find("._tv-dialog-content").html(o.content);var g=0;g=o.zIndex?o.zIndex:d.dialogs&&d.dialogs.length?n($.map(d.dialogs,(function(t){return parseInt((t.dialog||t).css("z-index"),10)})))+1:110,c.css("z-index",g),c.data("new",!0),c.data("title",t),c.data("id",d.dialogs.length+1),d.dialogs.push({title:t,dialog:c,id:d.dialogs.length+1}),c.on("mousedown touchstart",(function(){l.moveToTop(t)}));var u={start:function(t,o){for(var e=o.helper.css("z-index"),i=0,n=null,a=0;ai&&(i=s,n=d.dialogs[a].dialog)}o.helper.css("z-index",i),n.css("z-index",e)}};return o.dragHandle?u.handle=o.dragHandle:o.hideTitle||(u.handle="._tv-dialog-title"),o.dragOptions&&$.extend(u,o.dragOptions),a(c).draggable(d._constrainDraggableOptionsIfNeeded(u)),c},positionDialog:function(t,o,e){e=e||{};function i(){h.css("margin-left",-Math.round(h.outerWidth()/2)+"px"),h.css("margin-top",-Math.round(h.outerHeight()/2)+"px")}if(o=o||e.position,t){var n,a,s=t.prop("ownerDocument"),l=s.defaultView,r=t.width(),c=t.height(),g=$(l).width(),u=$(l).height();if(o&&o.top&&o.left)a=e.forcePosition?o.left:Math.max(2,Math.min(g-r-4,o.left))+"px",n=e.forcePosition?o.top:Math.max(2,Math.min(u-c-4,o.top))+"px";else if(o&&o.considerScroll){var p=$(s);a=Math.round((g-r)/2+p.scrollLeft())+"px",n=Math.round((u-c)/2+p.scrollTop())+"px"}else a=Math.round((g-r)/2)+"px",n=Math.round((u-c)/2)+"px";e.fadeIn?t.css({left:a,top:n}).hide().fadeIn("fast"):e.smooth?t.animate({left:a,top:n}):t.css({left:a,top:n}) +}else{var h=(t=d.modalDialog).find("._tv-dialog");i(),h.resize(i)}},applyHandlers:function(t,o){var e=!t||t===this.modalDialog,i=(o=o||{},e?function(){d.destroy()}:function(){d.destroy(t.data("title"))}),n=(t=t||d.modalDialog.find("._tv-dialog")).prop("ownerDocument");o.beforeDestroy&&t.on("destroy",o.beforeDestroy),t.find("._tv-dialog-title ._tv-dialog-title-close, .js-dialog-close").on("click",(function(t){o.closeHandler&&"function"==typeof o.closeHandler?o.closeHandler(t):i()})),o.doNotCloseOnBgClick||setTimeout((function(){$(n).on("mousedown.closeDialog",(function(e){var a=$(e.target).parents().andSelf();a.is(t)||o.doNotCloseOnBgClickIfShadowbox&&a.is("._tv-dialog-shadowbox, .tv-dialog__modal-wrap")||a.is(".colorpicker, .charts-popup-list, ._tv-dialog, .tvcolorpicker-popup, .symbol-edit-popup, .ui-datepicker, .clockpicker-popover, .pac-container, .context-menu-wrapper")||($(n).off("mousedown.closeDialog"),i())}))}),0),t.find('input[type="checkbox"]').change((function(){var t=$(this);t.next("._tv-dialog-checkbox-mask").toggleClass("disabled",t.prop("disabled")).toggleClass("_tv-dialog-checkbox-mask-active",t.is(":checked"))}));var a=t.find('input[type="text"]').focus((function(){$(this).addClass("_tv-dialog-content-textactive")})).blur((function(){$(this).removeClass("_tv-dialog-content-textactive")})).first();Modernizr.mobiletouch||o.notFocusFirst||a.focus(),t.find('input[type="password"]').focus((function(){$(this).addClass("_tv-dialog-content-textactive")})).blur((function(){$(this).removeClass("_tv-dialog-content-textactive")})),t.find("textarea").focus((function(){$(this).addClass("_tv-dialog-content-textareaactive")})).blur((function(){$(this).removeClass("_tv-dialog-content-textareaactive")})),t.find("._tv-dialog-checkbox-mask").click((function(){var t=$(this).prev();t.prop("disabled")||(t.prop("checked",!t[0].checked),t.change())})),o.doNotCloseOnEsc||$(n).bind("keyup.hideDialog",(function(o){if(27===o.keyCode)return t?d.destroy(t.data("title")):d.destroy(),!1})),o.processEnterButton&&$(n).bind("keyup.confirmAndCloseDialog",(function(t){13===t.keyCode&&"textarea"!==t.target.tagName.toLowerCase()&&(o.processEnterButton.click(),$(n).unbind("keyup.confirmAndCloseDialog"))}))},showError:function(t,o,e){d.showMessage(t,o,$.extend(e||{},{isError:!0}))},showMessage:function(t,o,e){o||(o=$("._tv-dialog"));var i=(e=e||{}).isError?"_tv-dialog-error":"_tv-dialog-message",n=o.find("."+i),a=n.find(".message");e.html?a.html("string"==typeof e.html?e.html:t):a.text(t),a.css("width",o.width()).toggleClass("selectable",Boolean(e.selectable)),n.toggleClass("with-close",Boolean(e.withClose)).css({marginTop:d.NOTIFICATION_ANIMATION_START_OFFSET,opacity:"0"}).show().animate({marginTop:0,opacity:1},"fast"),e.withClose||(e.hideWithoutAnimation?n.on("touchstartoutside mousedownoutside keydownoutside",(function t(){n.hide(),n.off("touchstartoutside mousedownoutside keydownoutside",t)})):n.on("touchstartoutside mousedownoutside keydownoutside",(function t(){n.animate({marginTop:d.NOTIFICATION_ANIMATION_START_OFFSET,opacity:0 +},"fast",(function(){n.hide()})),n.off("touchstartoutside mousedownoutside keydownoutside",t)})))},isOpen:function(t){for(var o=0;oi&&(n-=t-i,n=Math.max(0,n),o.height(n))}};t.exports.TVOldDialogs=d}).call(this,e("Kxc7"),e("nbsC"))},PVgW:function(t,o,e){"use strict";e.r(o);e("P5fv"),e("si6p");var i=e("ogJP"),n=e("R4+T");function a(t){return t=Math.abs(t),!Object(i.isInteger)(t)&&t>1&&(t=parseFloat(t.toString().replace(/^.+\./,"0."))),0').appendTo(e.parent()),s=$('
    ').html(n).appendTo(a),r=$('
    ').html(n).appendTo(a);a.on("mousedown",(function(t){t.preventDefault(),e.focus()})),s.click((function(){e.is(":disabled")||d(e)})),r.click((function(){e.is(":disabled")||l(e)})),e.keydown((function(t){e.is(":disabled")||(38===t.keyCode?s.addClass("i-active"):40===t.keyCode&&r.addClass("i-active"))})), +e.keyup((function(t){e.is(":disabled")||(38===t.keyCode?(d(e),s.removeClass("i-active")):40===t.keyCode&&(l(e),r.removeClass("i-active")))})),e.mousewheel((function(t){t.deltaY*(t.deltaFactor/100)>0?s.click():r.click()}))}}))}},"R4+T":function(t,o){t.exports=''},jAh7:function(t,o,e){"use strict";e.r(o),e.d(o,"OverlapManager",(function(){return a})),e.d(o,"getRootOverlapManager",(function(){return d}));var i=e("Eyy1"),n=function(){function t(){this._storage=[]}return t.prototype.add=function(t){this._storage.push(t)},t.prototype.remove=function(t){this._storage=this._storage.filter((function(o){return t!==o}))},t.prototype.has=function(t){return this._storage.includes(t)},t.prototype.getItems=function(){return this._storage},t}(),a=function(){function t(t){void 0===t&&(t=document),this._storage=new n,this._windows=new Map,this._index=0,this._document=t,this._container=t.createDocumentFragment()}return t.prototype.setContainer=function(t){var o=this._container,e=null===t?this._document.createDocumentFragment():t;!function(t,o){Array.from(t.childNodes).forEach((function(t){t.nodeType===Node.ELEMENT_NODE&&o.appendChild(t)}))}(o,e),this._container=e},t.prototype.registerWindow=function(t){this._storage.has(t)||this._storage.add(t)},t.prototype.ensureWindow=function(t,o){void 0===o&&(o={position:"fixed",direction:"normal"});var e=this._windows.get(t);if(void 0!==e)return e;this.registerWindow(t);var i=this._document.createElement("div");if(i.style.position=o.position,i.style.zIndex=this._index.toString(),i.dataset.id=t,void 0!==o.index){var n=this._container.childNodes.length;if(o.index>=n)this._container.appendChild(i);else if(o.index<=0)this._container.insertBefore(i,this._container.firstChild);else{var a=this._container.childNodes[o.index];this._container.insertBefore(i,a)}}else"reverse"===o.direction?this._container.insertBefore(i,this._container.firstChild):this._container.appendChild(i);return this._windows.set(t,i),++this._index,i},t.prototype.unregisterWindow=function(t){this._storage.remove(t);var o=this._windows.get(t);void 0!==o&&(null!==o.parentElement&&o.parentElement.removeChild(o),this._windows.delete(t))},t.prototype.getZindex=function(t){var o=this.ensureWindow(t);return parseInt(o.style.zIndex||"0")},t.prototype.moveToTop=function(t){this.getZindex(t)!==this._index&&(this.ensureWindow(t).style.zIndex=(++this._index).toString())},t.prototype.removeWindow=function(t){this.unregisterWindow(t)},t}(),s=new WeakMap;function d(t){void 0===t&&(t=document);var o=t.getElementById("overlap-manager-root");if(null!==o)return Object(i.ensureDefined)(s.get(o));var e=new a(t),n=function(t){var o=t.createElement("div");return o.style.position="absolute",o.style.zIndex=150..toString(),o.style.top="0px",o.style.left="0px",o.id="overlap-manager-root",o}(t);return s.set(n,e),e.setContainer(n),t.body.appendChild(n),e}}, +"y1L/":function(t,o,e){},zjLg:function(t,o,e){}}]); \ No newline at end of file diff --git a/public/charting_library/bundles/37.77adb3ee2dc981cb218c.css b/public/charting_library/bundles/37.77adb3ee2dc981cb218c.css new file mode 100644 index 00000000..5905e1bb --- /dev/null +++ b/public/charting_library/bundles/37.77adb3ee2dc981cb218c.css @@ -0,0 +1 @@ +.header-dpl-vtN_{position:relative;font-size:14px;font-weight:700;color:#212121;padding:30px 60px 30px 30px;border-bottom:1px solid;border-bottom-color:#dadde0}html.theme-dark .header-dpl-vtN_{border-bottom-color:#363c4e;color:#c5cbce}@media screen and (max-width:767px){.header-dpl-vtN_{padding:20px 60px 20px 20px}}.header-dpl-vtN_ .close-3kPn4OTV{position:absolute;padding:15px;top:17px;right:15px;cursor:pointer;opacity:.5;transition:opacity .35s ease;-webkit-user-select:none;user-select:none;color:#4a4a4a}html.theme-dark .header-dpl-vtN_ .close-3kPn4OTV{color:#c5cbce}@media screen and (max-width:767px){.header-dpl-vtN_ .close-3kPn4OTV{top:7px;right:7px}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.header-dpl-vtN_ .close-3kPn4OTV:hover{opacity:1;transition-duration:.06s}}.header-dpl-vtN_ .close-3kPn4OTV svg{display:block;width:13px;height:13px}.footer-2Zoji8zg{padding:0 30px 30px}@media screen and (max-width:767px){.footer-2Zoji8zg{padding:0 20px 20px}}.body-2N-vuwQW{flex-grow:1;padding:30px;overflow:auto;-webkit-overflow-scrolling:touch}.body-2N-vuwQW::-webkit-scrollbar{width:5px;height:5px}.body-2N-vuwQW::-webkit-scrollbar-thumb{border:1px solid;border-color:#f1f3f6;border-radius:3px;background-color:#9598a1}html.theme-dark .body-2N-vuwQW::-webkit-scrollbar-thumb{background-color:#363a45;border-color:#1e222d}.body-2N-vuwQW::-webkit-scrollbar-track{background-color:transparent;border-radius:3px}.body-2N-vuwQW::-webkit-scrollbar-corner{display:none}@media screen and (max-width:767px){.body-2N-vuwQW{padding:20px}}.message-2o-rtQm0{position:absolute;left:0;top:0;right:0;font-size:14px;padding:30px;text-align:center;color:#37bc9b;background:#ebf9f5;transition:opacity .2625s ease,transform .2625s ease}html.theme-dark .message-2o-rtQm0{background:#21384d}.message-2o-rtQm0.error-2EW0C6z-{color:#ff4a68;background:#ffedf0}html.theme-dark .message-2o-rtQm0.error-2EW0C6z-{background:#6f2626} \ No newline at end of file diff --git a/public/charting_library/bundles/37.77adb3ee2dc981cb218c.rtl.css b/public/charting_library/bundles/37.77adb3ee2dc981cb218c.rtl.css new file mode 100644 index 00000000..01afac3a --- /dev/null +++ b/public/charting_library/bundles/37.77adb3ee2dc981cb218c.rtl.css @@ -0,0 +1 @@ +.header-dpl-vtN_{position:relative;font-size:14px;font-weight:700;color:#212121;padding:30px 30px 30px 60px;border-bottom:1px solid;border-bottom-color:#dadde0}html.theme-dark .header-dpl-vtN_{border-bottom-color:#363c4e;color:#c5cbce}@media screen and (max-width:767px){.header-dpl-vtN_{padding:20px 20px 20px 60px}}.header-dpl-vtN_ .close-3kPn4OTV{position:absolute;padding:15px;top:17px;left:15px;cursor:pointer;opacity:.5;transition:opacity .35s ease;-webkit-user-select:none;user-select:none;color:#4a4a4a}html.theme-dark .header-dpl-vtN_ .close-3kPn4OTV{color:#c5cbce}@media screen and (max-width:767px){.header-dpl-vtN_ .close-3kPn4OTV{top:7px;left:7px}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.header-dpl-vtN_ .close-3kPn4OTV:hover{opacity:1;transition-duration:.06s}}.header-dpl-vtN_ .close-3kPn4OTV svg{display:block;width:13px;height:13px}.footer-2Zoji8zg{padding:0 30px 30px}@media screen and (max-width:767px){.footer-2Zoji8zg{padding:0 20px 20px}}.body-2N-vuwQW{flex-grow:1;padding:30px;overflow:auto;-webkit-overflow-scrolling:touch}.body-2N-vuwQW::-webkit-scrollbar{width:5px;height:5px}.body-2N-vuwQW::-webkit-scrollbar-thumb{border:1px solid;border-color:#f1f3f6;border-radius:3px;background-color:#9598a1}html.theme-dark .body-2N-vuwQW::-webkit-scrollbar-thumb{background-color:#363a45;border-color:#1e222d}.body-2N-vuwQW::-webkit-scrollbar-track{background-color:transparent;border-radius:3px}.body-2N-vuwQW::-webkit-scrollbar-corner{display:none}@media screen and (max-width:767px){.body-2N-vuwQW{padding:20px}}.message-2o-rtQm0{position:absolute;right:0;top:0;left:0;font-size:14px;padding:30px;text-align:center;color:#37bc9b;background:#ebf9f5;transition:opacity .2625s ease,transform .2625s ease}html.theme-dark .message-2o-rtQm0{background:#21384d}.message-2o-rtQm0.error-2EW0C6z-{color:#ff4a68;background:#ffedf0}html.theme-dark .message-2o-rtQm0.error-2EW0C6z-{background:#6f2626} \ No newline at end of file diff --git a/public/charting_library/bundles/37.d31bd65f603d1bb9ebf1.js b/public/charting_library/bundles/37.d31bd65f603d1bb9ebf1.js new file mode 100644 index 00000000..7f6fcf64 --- /dev/null +++ b/public/charting_library/bundles/37.d31bd65f603d1bb9ebf1.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[37],[]]); \ No newline at end of file diff --git a/public/charting_library/bundles/37a0b0d526f57fdfe7bef1333f5b36f1.png b/public/charting_library/bundles/37a0b0d526f57fdfe7bef1333f5b36f1.png new file mode 100644 index 00000000..9fafc4bd Binary files /dev/null and b/public/charting_library/bundles/37a0b0d526f57fdfe7bef1333f5b36f1.png differ diff --git a/public/charting_library/bundles/38.f7058b17c9cf23a00b5b.js b/public/charting_library/bundles/38.f7058b17c9cf23a00b5b.js new file mode 100644 index 00000000..b7ff39d4 --- /dev/null +++ b/public/charting_library/bundles/38.f7058b17c9cf23a00b5b.js @@ -0,0 +1,2 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[38],{"4Cm8":function(t,e,i){"use strict";i.d(e,"a",(function(){return M}));var s=i("mrSG"),r=i("q1tI"),n=i("TSYQ"),o=i("cvc5"),l=i("Iivm"),a=i("//lZ"),c=i("9uLv"),u=i("Ialn"),h=i("Vike"),p=i("ji/R"),d={isVisibleScrollbar:!0,shouldMeasure:!0,hideButtonsFrom:1};function f(t){var e;return r.createElement("div",{className:n(p.fadeLeft,(e={},e[p.isVisible]=t.isVisible,e))})}function w(t){var e;return r.createElement("div",{className:n(p.fadeRight,(e={},e[p.isVisible]=t.isVisible,e))})}function m(t){return r.createElement(v,Object(s.__assign)({},t,{className:p.scrollLeft}))}function b(t){return r.createElement(v,Object(s.__assign)({},t,{className:p.scrollRight}))}function v(t){var e;return r.createElement("div",{className:n(t.className,(e={},e[p.isVisible]=t.isVisible,e)),onClick:t.onClick},r.createElement("div",{className:p.iconWrap},r.createElement(l.Icon,{icon:h,className:p.icon})))}var _,R,S,V,g,M=(void 0===(_=m)&&(_=m),void 0===(R=b)&&(R=b),void 0===(S=f)&&(S=f),void 0===(V=w)&&(V=w),(g=function(t){function e(e){var i=t.call(this,e)||this;return i._scroll=r.createRef(),i._wrapMeasureRef=r.createRef(),i._contentMeasureRef=r.createRef(),i._handleScrollLeft=function(){if(i.props.onScrollButtonClick)i.props.onScrollButtonClick("left");else{var t=i.props.scrollStepSize||i.state.widthWrap-50;i.animateTo(Math.max(0,i.currentPosition()-t))}},i._handleScrollRight=function(){if(i.props.onScrollButtonClick)i.props.onScrollButtonClick("right");else{var t=i.props.scrollStepSize||i.state.widthWrap-50;i.animateTo(Math.min((i.state.widthContent||0)-(i.state.widthWrap||0),i.currentPosition()+t))}},i._handleResizeWrap=function(t){i.props.onMeasureWrap&&i.props.onMeasureWrap(t),i.setState({widthWrap:t.width}),i._checkButtonsVisibility()},i._handleResizeContent=function(t){i.props.onMeasureContent&&i.props.onMeasureContent(t);var e=i.props,s=e.shouldDecreaseWidthContent,r=e.buttonsWidthIfDecreasedWidthContent;s&&r?i.setState({widthContent:t.width+2*r}):i.setState({widthContent:t.width})},i._handleScroll=function(){var t=i.props.onScroll;t&&t(i.currentPosition(),i.isAtLeft(),i.isAtRight()),i._checkButtonsVisibility()},i._checkButtonsVisibility=function(){var t=i.state,e=t.isVisibleLeftButton,s=t.isVisibleRightButton,r=i.isAtLeft(),n=i.isAtRight();r||e?r&&e&&i.setState({isVisibleLeftButton:!1}):i.setState({isVisibleLeftButton:!0}),n||s?n&&s&&i.setState({isVisibleRightButton:!1}):i.setState({isVisibleRightButton:!0})},i.state={widthContent:0,widthWrap:0,isVisibleRightButton:!1,isVisibleLeftButton:!1},i}return Object(s.__extends)(e,t),e.prototype.componentDidMount=function(){this._checkButtonsVisibility()},e.prototype.componentDidUpdate=function(t,e){e.widthWrap===this.state.widthWrap&&e.widthContent===this.state.widthContent||this._handleScroll(),this.props.shouldMeasure&&this._wrapMeasureRef.current&&this._contentMeasureRef.current&&(this._wrapMeasureRef.current.measure(),this._contentMeasureRef.current.measure())},e.prototype.currentPosition=function(){ +return this._scroll.current?Object(u.isRtl)()?Object(u.getLTRScrollLeft)(this._scroll.current):this._scroll.current.scrollLeft:0},e.prototype.isAtLeft=function(){return!this._isOverflowed()||this.currentPosition()<=this.props.hideButtonsFrom},e.prototype.isAtRight=function(){return!this._isOverflowed()||this.currentPosition()+this.state.widthWrap>=this.state.widthContent-this.props.hideButtonsFrom},e.prototype.animateTo=function(t,e){void 0===e&&(e=c.dur);var i=this._scroll.current;i&&(Object(u.isRtl)()&&(t=Object(u.getLTRScrollLeftOffset)(i,t)),e<=0?i.scrollLeft=Math.round(t):Object(a.doAnimate)({onStep:function(t,e){i.scrollLeft=Math.round(e)},from:i.scrollLeft,to:Math.round(t),easing:c.easingFunc.easeInOutCubic,duration:e}))},e.prototype.render=function(){var t,e=this.props,i=e.children,s=e.isVisibleScrollbar,l=e.isVisibleFade,a=e.isVisibleButtons,c=e.shouldMeasure,u=e.shouldDecreaseWidthContent,h=e.buttonsWidthIfDecreasedWidthContent,d=e.onMouseOver,f=e.onMouseOut,w=this.state,m=w.isVisibleRightButton,b=w.isVisibleLeftButton,v=u&&h;return r.createElement(o,{whitelist:["width"],onMeasure:this._handleResizeWrap,shouldMeasure:c,ref:this._wrapMeasureRef},r.createElement("div",{className:p.wrapOverflow,onMouseOver:d,onMouseOut:f},r.createElement("div",{className:n(p.wrap,v?p.wrapWithArrowsOuting:"")},r.createElement("div",{className:n(p.scrollWrap,(t={},t[p.noScrollBar]=!s,t)),onScroll:this._handleScroll,ref:this._scroll},r.createElement(o,{onMeasure:this._handleResizeContent,whitelist:["width"],shouldMeasure:c,ref:this._contentMeasureRef},i)),l&&r.createElement(S,{isVisible:b}),l&&r.createElement(V,{isVisible:m}),a&&r.createElement(_,{onClick:this._handleScrollLeft,isVisible:b}),a&&r.createElement(R,{onClick:this._handleScrollRight,isVisible:m}))))},e.prototype._isOverflowed=function(){var t=this.state;return t.widthContent>t.widthWrap},e}(r.PureComponent)).defaultProps=d,g)},Vike:function(t,e){t.exports=''},"ji/R":function(t,e,i){t.exports={wrap:"wrap-5DN0XnS4",wrapWithArrowsOuting:"wrapWithArrowsOuting-1OPNi0IP",wrapOverflow:"wrapOverflow-2FHnhKaN",scrollWrap:"scrollWrap-nAnkzkWd",noScrollBar:"noScrollBar-34JzryqI",icon:"icon-1nfNqIRh",scrollLeft:"scrollLeft-2cl_k1e7",scrollRight:"scrollRight-2SEqCpTf",isVisible:"isVisible-Stm3XOHb",iconWrap:"iconWrap-1E4GEP7h",fadeLeft:"fadeLeft-244lj3pA",fadeRight:"fadeRight-1JnS42hI"}}}]); \ No newline at end of file diff --git a/public/charting_library/bundles/39.68ade11ff88f4442dc87.js b/public/charting_library/bundles/39.68ade11ff88f4442dc87.js new file mode 100644 index 00000000..bcd80d70 --- /dev/null +++ b/public/charting_library/bundles/39.68ade11ff88f4442dc87.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[39],[]]); \ No newline at end of file diff --git a/public/charting_library/bundles/39.9ca0e701a9ed5880e321.css b/public/charting_library/bundles/39.9ca0e701a9ed5880e321.css new file mode 100644 index 00000000..a1c3b153 --- /dev/null +++ b/public/charting_library/bundles/39.9ca0e701a9ed5880e321.css @@ -0,0 +1 @@ +._tv-button .icon-dropdown{position:relative;left:5px;display:inline-block;height:15px;width:13px;vertical-align:top;background:url(37a0b0d526f57fdfe7bef1333f5b36f1.png) 2px 5px no-repeat}._tv-button.active .icon-dropdown{background-position:2px -15px}._tv-button._tv-button-fontstyle{height:14px;padding-left:0;padding-right:0;width:25px;text-align:center}._tv-button.process,.ajax-process-bg{background-image:url(8443ec594898865ce13f99215e8e82a4.gif)!important;background-repeat:repeat!important;background-position:0 0!important;pointer-events:none}.ajax-process-bg,html.theme-dark ._tv-button.process{background-image:url(65b878304c17beb46ef1c52c9b7eb7c7.gif)!important}._tv-button._tv-button-fontstyle .icon-fontstyle-bold,._tv-button._tv-button-fontstyle .icon-fontstyle-italic{display:block;height:11px;margin:auto;background:url(1df47f578aeef40dd1f2328338a133be.png) 0 0 no-repeat;position:relative;top:1px}._tv-button._tv-button-fontstyle .icon-fontstyle-bold{width:10px;background-position:-40px -260px}._tv-button._tv-button-fontstyle .icon-fontstyle-italic{width:7px;background-position:-60px -260px}._tv-button,button._tv-button{cursor:default;padding:6px 10px 5px;height:15px;display:inline-block;vertical-align:top;text-decoration:none!important;color:#4a4a4a;border:1px solid;border-color:#dadde0;font-size:11px;font-weight:700;text-align:center;background-color:#f1f3f6;-webkit-user-select:none;user-select:none;box-sizing:content-box;-webkit-appearance:none;-moz-appearance:none;appearance:none}html.theme-dark ._tv-button,html.theme-dark button._tv-button{background-color:#2f3241;border-color:#363c4e;color:#c5cbce}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){._tv-button:hover{background-position:0 -26px;color:#131722}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark ._tv-button:hover{color:#d6d8e0}}._tv-button.active,._tv-button.toolbutton.active,._tv-button.toolbutton:active,._tv-button:active:not([disabled]),.tv-select-container.sbHolderOpen,.tv-select-container:active{background:#fff;color:#2196f3}html.theme-dark ._tv-button.active,html.theme-dark ._tv-button.toolbutton.active,html.theme-dark ._tv-button.toolbutton:active,html.theme-dark ._tv-button:active:not([disabled]),html.theme-dark .tv-select-container.sbHolderOpen,html.theme-dark .tv-select-container:active{background:#2f3241}._tv-button.ok{min-width:30px;background:#2196f3;border-color:transparent!important;color:#fff!important}html.theme-dark ._tv-button.ok{background:#1976d2}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){._tv-button.ok:hover{background:#1e88e5;border-color:transparent}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark ._tv-button.ok:hover{background:#1e88e5}}._tv-button.ok:active{background:#1e88e5;border-color:transparent}html.theme-dark ._tv-button.ok:active{background:#1e88e5}._tv-button.ok.disabled,._tv-button.ok:disabled{background:#99cfd8!important;border-color:transparent}html.theme-dark ._tv-button.ok.disabled,html.theme-dark ._tv-button.ok:disabled{background:#21384d!important}._tv-button.ok.process{background:url(77a5d6e16116f4dd430d89ed1ef42fa8.gif) 0 0 repeat!important}._tv-button.block{display:block;text-align:center}._tv-button.slim{padding:3px 8px;font-weight:400}.chart-description ._tv-button.slim{line-height:normal}._tv-button.icon{padding:5px}._tv-button.icon.active{background:#cfe1ff}._tv-button.toolbutton{width:24px;height:25px;padding:0!important;text-align:center}._tv-button.wide{padding:5px 15px;min-width:50px}._tv-button.xwide{padding:5px 0;width:175px}._tv-button.xxwide{padding:5px 0;width:185px}._tv-button.disabled{color:#848484;background-position:0 -78px;opacity:.7;cursor:default}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){._tv-button.disabled:hover{background-position:0 -78px}}._tv-button.disabled:active{background-position:0 -78px}._tv-button.theblueone{background:#4387f6 url(b65971fb3f32027c92536ebacba6683f.png);color:#fff!important;border:1px solid #346bc2;padding:4px 10px 5px}._tv-button.theblueone:active{background-position:0 -26px}._tv-button.half-left{border-radius:3px 0 0 3px;border-right:none}._tv-button.half-right{border-radius:0 3px 3px 0}._tv-button.cancel{background:#9ca0a6!important;border-color:transparent;color:#fff!important}html.theme-dark ._tv-button.cancel{color:#c5cbce!important;background:#2f3241!important}._tv-button.cancel:active,._tv-button.cancel:disabled{border-color:transparent}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){._tv-button.cancel:not(.disabled):hover{border-color:transparent;background-color:#898c91!important}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark ._tv-button.cancel:not(.disabled):hover{background-color:#393d4f!important}}._tv-button.cancel:not(.disabled):active{background-color:#787b7f!important}html.theme-dark ._tv-button.cancel:not(.disabled):active{background-color:#3f4357!important}._tv-button.cancel:disabled{background:#cfd3db!important}html.theme-dark ._tv-button.cancel:disabled{background:#1c2030!important}._tv-button.process{background:url(8443ec594898865ce13f99215e8e82a4.gif) 0 0 repeat}html.theme-dark ._tv-button.process{background:url(65b878304c17beb46ef1c52c9b7eb7c7.gif) 0 0 repeat}._tv-button.delete{background:#d75442;border-color:transparent;color:#fff!important}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){._tv-button.delete:not(.disabled):hover{background:#da5f4f;border-color:transparent}}._tv-button.delete:active{background:#d44935;border-color:transparent}._tv-button.green{background:#43be83;border-color:transparent;color:#fff!important}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){._tv-button.green:hover{background:#4ec28a;border-color:transparent}}._tv-button.green:active{background:#3eb47b;border-color:transparent}._tv-button.with-arrow{position:relative;margin-left:2px}._tv-button.with-arrow.arrow-left:after,._tv-button.with-arrow.arrow-left:before{right:100%;border:solid transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none}._tv-button.with-arrow.arrow-left:after{border-color:hsla(0,0%,98%,0);border-right-color:#f9f9f9;border-width:5px;top:50%;margin-top:-5px}._tv-button.with-arrow.arrow-left:before{border-color:hsla(0,0%,74%,0);border-right-color:#bcbcbc;border-width:6px;top:50%;margin-top:-6px}._tv-button.with-arrow.arrow-left:active:after{border-color:rgba(227,231,233,0);border-right-color:#e3e7e9;margin-right:-1px}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){._tv-dialog ._tv-button:not(.ok):not(.cancel):not(.disabled):not(.delete):hover,.bottom-widgetbar-content.backtesting ._tv-button:not(.ok):not(.cancel):not(.disabled):not(.delete):hover,.properties-toolbar ._tv-button:not(.ok):not(.cancel):not(.disabled):not(.delete):hover,.widgetbar-widgetheader ._tv-button:not(.ok):not(.cancel):not(.disabled):not(.delete):hover{border:1px solid;border-color:#b5b7b9}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark ._tv-dialog ._tv-button:not(.ok):not(.cancel):not(.disabled):not(.delete):hover,html.theme-dark .bottom-widgetbar-content.backtesting ._tv-button:not(.ok):not(.cancel):not(.disabled):not(.delete):hover,html.theme-dark .properties-toolbar ._tv-button:not(.ok):not(.cancel):not(.disabled):not(.delete):hover,html.theme-dark .widgetbar-widgetheader ._tv-button:not(.ok):not(.cancel):not(.disabled):not(.delete):hover{border-color:#4c525e}}.tv-uppercase{text-transform:uppercase}.ui-slider{position:relative;text-align:left}.ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default}.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background-position:0 0}.ui-slider-horizontal{height:.8em}.ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-left:-.6em}.ui-slider-horizontal .ui-slider-range{top:0;height:100%}.ui-slider-horizontal .ui-slider-range-min{left:0}.ui-slider-horizontal .ui-slider-range-max{right:0}.ui-slider-vertical{width:.8em;height:100px}.ui-slider-vertical .ui-slider-handle{left:-.3em;margin-left:0;margin-bottom:-.6em}.ui-slider-vertical .ui-slider-range{left:0;width:100%}.ui-slider-vertical .ui-slider-range-min{bottom:0}.ui-slider-vertical .ui-slider-range-max{top:0}.colorpicker.main{border:1px solid #c9cbcd;box-shadow:0 1px 3px rgba(0,0,0,.4)}.tvcolorpicker-widget{vertical-align:middle;background-image:url(79f0e781be418df4a4d5b052ba1b61a2.png);background-position:0 0;background-repeat:no-repeat;border:1px solid #e0e3eb;overflow:hidden;padding:0;width:25px;height:25px;cursor:pointer;font-size:0;-webkit-user-select:none;user-select:none}html.theme-dark .tvcolorpicker-widget{border:1px solid #434651}.tvcolorpicker-gradient-widget{background-image:url(79f0e781be418df4a4d5b052ba1b61a2.png),url(ef184b625728ec530a7958618e0a3a86.png);background-size:cover}.tvcolorpicker-popup{position:absolute;z-index:1000;padding:4px;background:#fff;border:1px solid;border-color:#b5b7b9;box-shadow:0 1px 2px rgba(0,0,0,.3)}html.theme-dark .tvcolorpicker-popup{border-color:#363c4e;background:#131722}.tvcolorpicker-table{border-collapse:collapse;table-layout:fixed;margin:0 0 6px}.tvcolorpicker-popup .tvcolorpicker-table:last-of-type{margin-bottom:0}.tvcolorpicker-table td{padding:0;width:18px;height:18px}.tvcolorpicker-swatch{width:16px;height:16px;border:0 none;margin:1px;cursor:pointer;overflow:hidden}.tvcolorpicker-swatch.low-contrast{margin:0;border:1px solid #ccc}.tvcolorpicker-swatch.tvcolorpicker-user{border:1px solid #eee;margin:0}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tvcolorpicker-cell:hover .tvcolorpicker-swatch{border:1px solid #000;margin:0}}.tvcolorpicker-swatch.active{background:url(417aec8f751eaf532fa7760b2779716d.png) 50% 50% no-repeat;border:1px solid #fff;outline:1px solid #000;margin:0}.tvcolorpicker-custom-button{display:block}.tvcolorpicker-hsv{position:relative;top:4px;height:130px;width:160px;margin:0 auto}.tvcolorpicker-hs{position:absolute;top:0;left:-7px;width:147px;height:148px;background:url(b738e5c5b8acbd9891b5f89d3fc6f274.png) 0 0 no-repeat;border:1px solid #eee}.tvcolorpicker-hs-area,.tvcolorpicker-v-area{position:absolute;top:0;left:0;width:100%;height:100%}.tvcolorpicker-v{position:absolute;background:url(b738e5c5b8acbd9891b5f89d3fc6f274.png) -165px 1px no-repeat;border:1px solid #eee;height:149px;width:9px;margin:auto;left:0;right:0}.tvcolorpicker-vv{position:relative;top:0;left:145px;width:25px;height:128px;cursor:default}.tvcolorpicker-hs-handle{width:11px;height:11px;position:absolute;left:0;top:0;margin:-5px 0 0 -5px;background:url(b738e5c5b8acbd9891b5f89d3fc6f274.png) -37px -148px no-repeat}.tvcolorpicker-v-handle{position:absolute;left:0;top:0;width:25px;height:11px;margin:-5px 0 0 -8px;background:url(b738e5c5b8acbd9891b5f89d3fc6f274.png) -48px -148px no-repeat}.tvcolorpicker-custom-button,.tvcolorpicker-user-swatches{margin:6px 0 0}.tvcolorpicker-user-swatches .tvcolorpicker-transparency{background:url(7e0cc5f7d7f5151500dd60b8d6ca60a1.png)!important}.some-colorpicker .tvcolorpicker-container{display:inline-block;margin-right:8px}.tvcolorpicker-container{display:inline-block;position:relative;width:27px;height:27px}div .tvcolorpicker-container:last-of-type{border-right-width:0}.tvcolorpicker-container .tvcolorpicker-transparency{background:url(7e0cc5f7d7f5151500dd60b8d6ca60a1.png)!important;position:absolute;width:25px;height:25px;z-index:1}.tvcolorpicker-container .tvcolorpicker-widget{z-index:2;position:absolute}.widgetbar-widgetheader .colorpicker-widget:not(.disabled):not(.selected){position:relative}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.widgetbar-widgetheader .colorpicker-widget:not(.disabled):not(.selected):not(.disabled):hover{border:1px solid;border-color:#d6d8e0;z-index:1}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .widgetbar-widgetheader .colorpicker-widget:not(.disabled):not(.selected):not(.disabled):hover{border-color:#131722}} \ No newline at end of file diff --git a/public/charting_library/bundles/39.9ca0e701a9ed5880e321.rtl.css b/public/charting_library/bundles/39.9ca0e701a9ed5880e321.rtl.css new file mode 100644 index 00000000..6db0444b --- /dev/null +++ b/public/charting_library/bundles/39.9ca0e701a9ed5880e321.rtl.css @@ -0,0 +1 @@ +._tv-button .icon-dropdown{position:relative;right:5px;display:inline-block;height:15px;width:13px;vertical-align:top;background:url(37a0b0d526f57fdfe7bef1333f5b36f1.png) 2px 5px no-repeat}._tv-button.active .icon-dropdown{background-position:2px -15px}._tv-button._tv-button-fontstyle{height:14px;padding-right:0;padding-left:0;width:25px;text-align:center}._tv-button.process,.ajax-process-bg{background-image:url(8443ec594898865ce13f99215e8e82a4.gif)!important;background-repeat:repeat!important;background-position:100% 0!important;pointer-events:none}.ajax-process-bg,html.theme-dark ._tv-button.process{background-image:url(65b878304c17beb46ef1c52c9b7eb7c7.gif)!important}._tv-button._tv-button-fontstyle .icon-fontstyle-bold,._tv-button._tv-button-fontstyle .icon-fontstyle-italic{display:block;height:11px;margin:auto;background:url(1df47f578aeef40dd1f2328338a133be.png) 100% 0 no-repeat;position:relative;top:1px}._tv-button._tv-button-fontstyle .icon-fontstyle-bold{width:10px;background-position:-40px -260px}._tv-button._tv-button-fontstyle .icon-fontstyle-italic{width:7px;background-position:-60px -260px}._tv-button,button._tv-button{cursor:default;padding:6px 10px 5px;height:15px;display:inline-block;vertical-align:top;text-decoration:none!important;color:#4a4a4a;border:1px solid;border-color:#dadde0;font-size:11px;font-weight:700;text-align:center;background-color:#f1f3f6;-webkit-user-select:none;user-select:none;box-sizing:content-box;-webkit-appearance:none;-moz-appearance:none;appearance:none}html.theme-dark ._tv-button,html.theme-dark button._tv-button{background-color:#2f3241;border-color:#363c4e;color:#c5cbce}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){._tv-button:hover{background-position:100% -26px;color:#131722}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark ._tv-button:hover{color:#d6d8e0}}._tv-button.active,._tv-button.toolbutton.active,._tv-button.toolbutton:active,._tv-button:active:not([disabled]),.tv-select-container.sbHolderOpen,.tv-select-container:active{background:#fff;color:#2196f3}html.theme-dark ._tv-button.active,html.theme-dark ._tv-button.toolbutton.active,html.theme-dark ._tv-button.toolbutton:active,html.theme-dark ._tv-button:active:not([disabled]),html.theme-dark .tv-select-container.sbHolderOpen,html.theme-dark .tv-select-container:active{background:#2f3241}._tv-button.ok{min-width:30px;background:#2196f3;border-color:transparent!important;color:#fff!important}html.theme-dark ._tv-button.ok{background:#1976d2}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){._tv-button.ok:hover{background:#1e88e5;border-color:transparent}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark ._tv-button.ok:hover{background:#1e88e5}}._tv-button.ok:active{background:#1e88e5;border-color:transparent}html.theme-dark ._tv-button.ok:active{background:#1e88e5}._tv-button.ok.disabled,._tv-button.ok:disabled{background:#99cfd8!important;border-color:transparent}html.theme-dark ._tv-button.ok.disabled,html.theme-dark ._tv-button.ok:disabled{background:#21384d!important}._tv-button.ok.process{background:url(77a5d6e16116f4dd430d89ed1ef42fa8.gif) 100% 0 repeat!important}._tv-button.block{display:block;text-align:center}._tv-button.slim{padding:3px 8px;font-weight:400}.chart-description ._tv-button.slim{line-height:normal}._tv-button.icon{padding:5px}._tv-button.icon.active{background:#cfe1ff}._tv-button.toolbutton{width:24px;height:25px;padding:0!important;text-align:center}._tv-button.wide{padding:5px 15px;min-width:50px}._tv-button.xwide{padding:5px 0;width:175px}._tv-button.xxwide{padding:5px 0;width:185px}._tv-button.disabled{color:#848484;background-position:100% -78px;opacity:.7;cursor:default}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){._tv-button.disabled:hover{background-position:100% -78px}}._tv-button.disabled:active{background-position:100% -78px}._tv-button.theblueone{background:#4387f6 url(b65971fb3f32027c92536ebacba6683f.png);color:#fff!important;border:1px solid #346bc2;padding:4px 10px 5px}._tv-button.theblueone:active{background-position:100% -26px}._tv-button.half-left{border-radius:0 3px 3px 0;border-left:none}._tv-button.half-right{border-radius:3px 0 0 3px}._tv-button.cancel{background:#9ca0a6!important;border-color:transparent;color:#fff!important}html.theme-dark ._tv-button.cancel{color:#c5cbce!important;background:#2f3241!important}._tv-button.cancel:active,._tv-button.cancel:disabled{border-color:transparent}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){._tv-button.cancel:not(.disabled):hover{border-color:transparent;background-color:#898c91!important}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark ._tv-button.cancel:not(.disabled):hover{background-color:#393d4f!important}}._tv-button.cancel:not(.disabled):active{background-color:#787b7f!important}html.theme-dark ._tv-button.cancel:not(.disabled):active{background-color:#3f4357!important}._tv-button.cancel:disabled{background:#cfd3db!important}html.theme-dark ._tv-button.cancel:disabled{background:#1c2030!important}._tv-button.process{background:url(8443ec594898865ce13f99215e8e82a4.gif) 100% 0 repeat}html.theme-dark ._tv-button.process{background:url(65b878304c17beb46ef1c52c9b7eb7c7.gif) 100% 0 repeat}._tv-button.delete{background:#d75442;border-color:transparent;color:#fff!important}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){._tv-button.delete:not(.disabled):hover{background:#da5f4f;border-color:transparent}}._tv-button.delete:active{background:#d44935;border-color:transparent}._tv-button.green{background:#43be83;border-color:transparent;color:#fff!important}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){._tv-button.green:hover{background:#4ec28a;border-color:transparent}}._tv-button.green:active{background:#3eb47b;border-color:transparent}._tv-button.with-arrow{position:relative;margin-right:2px}._tv-button.with-arrow.arrow-left:after,._tv-button.with-arrow.arrow-left:before{left:100%;border:solid transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none}._tv-button.with-arrow.arrow-left:after{border-color:hsla(0,0%,98%,0);border-left-color:#f9f9f9;border-width:5px;top:50%;margin-top:-5px}._tv-button.with-arrow.arrow-left:before{border-color:hsla(0,0%,74%,0);border-left-color:#bcbcbc;border-width:6px;top:50%;margin-top:-6px}._tv-button.with-arrow.arrow-left:active:after{border-color:rgba(227,231,233,0);border-left-color:#e3e7e9;margin-left:-1px}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){._tv-dialog ._tv-button:not(.ok):not(.cancel):not(.disabled):not(.delete):hover,.bottom-widgetbar-content.backtesting ._tv-button:not(.ok):not(.cancel):not(.disabled):not(.delete):hover,.properties-toolbar ._tv-button:not(.ok):not(.cancel):not(.disabled):not(.delete):hover,.widgetbar-widgetheader ._tv-button:not(.ok):not(.cancel):not(.disabled):not(.delete):hover{border:1px solid;border-color:#b5b7b9}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark ._tv-dialog ._tv-button:not(.ok):not(.cancel):not(.disabled):not(.delete):hover,html.theme-dark .bottom-widgetbar-content.backtesting ._tv-button:not(.ok):not(.cancel):not(.disabled):not(.delete):hover,html.theme-dark .properties-toolbar ._tv-button:not(.ok):not(.cancel):not(.disabled):not(.delete):hover,html.theme-dark .widgetbar-widgetheader ._tv-button:not(.ok):not(.cancel):not(.disabled):not(.delete):hover{border-color:#4c525e}}.tv-uppercase{text-transform:uppercase}.ui-slider{position:relative;text-align:right}.ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default}.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background-position:100% 0}.ui-slider-horizontal{height:.8em}.ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-right:-.6em}.ui-slider-horizontal .ui-slider-range{top:0;height:100%}.ui-slider-horizontal .ui-slider-range-min{right:0}.ui-slider-horizontal .ui-slider-range-max{left:0}.ui-slider-vertical{width:.8em;height:100px}.ui-slider-vertical .ui-slider-handle{right:-.3em;margin-right:0;margin-bottom:-.6em}.ui-slider-vertical .ui-slider-range{right:0;width:100%}.ui-slider-vertical .ui-slider-range-min{bottom:0}.ui-slider-vertical .ui-slider-range-max{top:0}.colorpicker.main{border:1px solid #c9cbcd;box-shadow:0 1px 3px rgba(0,0,0,.4)}.tvcolorpicker-widget{vertical-align:middle;background-image:url(79f0e781be418df4a4d5b052ba1b61a2.png);background-position:100% 0;background-repeat:no-repeat;border:1px solid #e0e3eb;overflow:hidden;padding:0;width:25px;height:25px;cursor:pointer;font-size:0;-webkit-user-select:none;user-select:none}html.theme-dark .tvcolorpicker-widget{border:1px solid #434651}.tvcolorpicker-gradient-widget{background-image:url(79f0e781be418df4a4d5b052ba1b61a2.png),url(ef184b625728ec530a7958618e0a3a86.png);background-size:cover}.tvcolorpicker-popup{position:absolute;z-index:1000;padding:4px;background:#fff;border:1px solid;border-color:#b5b7b9;box-shadow:0 1px 2px rgba(0,0,0,.3)}html.theme-dark .tvcolorpicker-popup{border-color:#363c4e;background:#131722}.tvcolorpicker-table{border-collapse:collapse;table-layout:fixed;margin:0 0 6px}.tvcolorpicker-popup .tvcolorpicker-table:last-of-type{margin-bottom:0}.tvcolorpicker-table td{padding:0;width:18px;height:18px}.tvcolorpicker-swatch{width:16px;height:16px;border:0 none;margin:1px;cursor:pointer;overflow:hidden}.tvcolorpicker-swatch.low-contrast{margin:0;border:1px solid #ccc}.tvcolorpicker-swatch.tvcolorpicker-user{border:1px solid #eee;margin:0}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tvcolorpicker-cell:hover .tvcolorpicker-swatch{border:1px solid #000;margin:0}}.tvcolorpicker-swatch.active{background:url(417aec8f751eaf532fa7760b2779716d.png) 50% 50% no-repeat;border:1px solid #fff;outline:1px solid #000;margin:0}.tvcolorpicker-custom-button{display:block}.tvcolorpicker-hsv{position:relative;top:4px;height:130px;width:160px;margin:0 auto}.tvcolorpicker-hs{position:absolute;top:0;right:-7px;width:147px;height:148px;background:url(b738e5c5b8acbd9891b5f89d3fc6f274.png) 0 0 no-repeat;border:1px solid #eee}.tvcolorpicker-hs-area,.tvcolorpicker-v-area{position:absolute;top:0;right:0;width:100%;height:100%}.tvcolorpicker-v{position:absolute;background:url(b738e5c5b8acbd9891b5f89d3fc6f274.png) -165px 1px no-repeat;border:1px solid #eee;height:149px;width:9px;margin:auto;right:0;left:0}.tvcolorpicker-vv{position:relative;top:0;right:145px;width:25px;height:128px;cursor:default}.tvcolorpicker-hs-handle{width:11px;height:11px;position:absolute;right:0;top:0;margin:-5px -5px 0 0;background:url(b738e5c5b8acbd9891b5f89d3fc6f274.png) -37px -148px no-repeat}.tvcolorpicker-v-handle{position:absolute;right:0;top:0;width:25px;height:11px;margin:-5px -8px 0 0;background:url(b738e5c5b8acbd9891b5f89d3fc6f274.png) -48px -148px no-repeat}.tvcolorpicker-custom-button,.tvcolorpicker-user-swatches{margin:6px 0 0}.tvcolorpicker-user-swatches .tvcolorpicker-transparency{background:url(7e0cc5f7d7f5151500dd60b8d6ca60a1.png)!important}.some-colorpicker .tvcolorpicker-container{display:inline-block;margin-left:8px}.tvcolorpicker-container{display:inline-block;position:relative;width:27px;height:27px}div .tvcolorpicker-container:last-of-type{border-left-width:0}.tvcolorpicker-container .tvcolorpicker-transparency{background:url(7e0cc5f7d7f5151500dd60b8d6ca60a1.png)!important;position:absolute;width:25px;height:25px;z-index:1}.tvcolorpicker-container .tvcolorpicker-widget{z-index:2;position:absolute}.widgetbar-widgetheader .colorpicker-widget:not(.disabled):not(.selected){position:relative}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.widgetbar-widgetheader .colorpicker-widget:not(.disabled):not(.selected):not(.disabled):hover{border:1px solid;border-color:#d6d8e0;z-index:1}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .widgetbar-widgetheader .colorpicker-widget:not(.disabled):not(.selected):not(.disabled):hover{border-color:#131722}} \ No newline at end of file diff --git a/public/charting_library/bundles/396b43348362fa7fe5cb2e187f2e6d78.svg b/public/charting_library/bundles/396b43348362fa7fe5cb2e187f2e6d78.svg new file mode 100644 index 00000000..61af3907 --- /dev/null +++ b/public/charting_library/bundles/396b43348362fa7fe5cb2e187f2e6d78.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/charting_library/bundles/4.4ff9c577f4760401b8ac.css b/public/charting_library/bundles/4.4ff9c577f4760401b8ac.css new file mode 100644 index 00000000..2a0971cb --- /dev/null +++ b/public/charting_library/bundles/4.4ff9c577f4760401b8ac.css @@ -0,0 +1 @@ +.menuWrap-1gEtmoET{text-align:left;-webkit-user-select:none;user-select:none;box-sizing:border-box;z-index:100;border-radius:3px;background-color:#fff;box-shadow:0 2px 4px 0 rgba(107,121,136,.4)}html.theme-dark .menuWrap-1gEtmoET{background-color:#1e222d;box-shadow:0 2px 4px 0 #000}.menuWrap-1gEtmoET.isMeasuring-FZ0EJCM2{position:fixed;visibility:hidden;opacity:0;pointer-events:none}.scrollWrap-1B5MfTJt{height:100%;overflow-x:hidden;overflow-y:auto;-ms-overflow-style:scrollbar}.scrollWrap-1B5MfTJt.momentumBased-1Jq4gQt2{-webkit-overflow-scrolling:touch}.scrollWrap-1B5MfTJt::-webkit-scrollbar{width:5px;height:5px}.scrollWrap-1B5MfTJt::-webkit-scrollbar-thumb{border:1px solid;border-color:#f1f3f6;border-radius:3px;background-color:#9598a1}html.theme-dark .scrollWrap-1B5MfTJt::-webkit-scrollbar-thumb{background-color:#363a45;border-color:#1e222d}.scrollWrap-1B5MfTJt::-webkit-scrollbar-track{background-color:transparent;border-radius:3px}.scrollWrap-1B5MfTJt::-webkit-scrollbar-corner{display:none}.menuBox-20sJGjtG{padding:6px 0}.isHidden-2vLQpR1t{display:none} \ No newline at end of file diff --git a/public/charting_library/bundles/4.4ff9c577f4760401b8ac.rtl.css b/public/charting_library/bundles/4.4ff9c577f4760401b8ac.rtl.css new file mode 100644 index 00000000..ce380fd2 --- /dev/null +++ b/public/charting_library/bundles/4.4ff9c577f4760401b8ac.rtl.css @@ -0,0 +1 @@ +.menuWrap-1gEtmoET{text-align:right;-webkit-user-select:none;user-select:none;box-sizing:border-box;z-index:100;border-radius:3px;background-color:#fff;box-shadow:0 2px 4px 0 rgba(107,121,136,.4)}html.theme-dark .menuWrap-1gEtmoET{background-color:#1e222d;box-shadow:0 2px 4px 0 #000}.menuWrap-1gEtmoET.isMeasuring-FZ0EJCM2{position:fixed;visibility:hidden;opacity:0;pointer-events:none}.scrollWrap-1B5MfTJt{height:100%;overflow-x:hidden;overflow-y:auto;-ms-overflow-style:scrollbar}.scrollWrap-1B5MfTJt.momentumBased-1Jq4gQt2{-webkit-overflow-scrolling:touch}.scrollWrap-1B5MfTJt::-webkit-scrollbar{width:5px;height:5px}.scrollWrap-1B5MfTJt::-webkit-scrollbar-thumb{border:1px solid;border-color:#f1f3f6;border-radius:3px;background-color:#9598a1}html.theme-dark .scrollWrap-1B5MfTJt::-webkit-scrollbar-thumb{background-color:#363a45;border-color:#1e222d}.scrollWrap-1B5MfTJt::-webkit-scrollbar-track{background-color:transparent;border-radius:3px}.scrollWrap-1B5MfTJt::-webkit-scrollbar-corner{display:none}.menuBox-20sJGjtG{padding:6px 0}.isHidden-2vLQpR1t{display:none} \ No newline at end of file diff --git a/public/charting_library/bundles/4.f5c620a1ef39d481d562.js b/public/charting_library/bundles/4.f5c620a1ef39d481d562.js new file mode 100644 index 00000000..d49e7cc6 --- /dev/null +++ b/public/charting_library/bundles/4.f5c620a1ef39d481d562.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[4],[]]); \ No newline at end of file diff --git a/public/charting_library/bundles/40.5c159009e31f3357f5b1.js b/public/charting_library/bundles/40.5c159009e31f3357f5b1.js new file mode 100644 index 00000000..5eb65b10 --- /dev/null +++ b/public/charting_library/bundles/40.5c159009e31f3357f5b1.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[40],[]]); \ No newline at end of file diff --git a/public/charting_library/bundles/40.5f251467fd134b78e377.css b/public/charting_library/bundles/40.5f251467fd134b78e377.css new file mode 100644 index 00000000..e38a38a3 --- /dev/null +++ b/public/charting_library/bundles/40.5f251467fd134b78e377.css @@ -0,0 +1 @@ +.itemWrap-3qF9ynvx{padding-left:0}.icon-2y6cSg4c,.item-112BZuXZ{display:flex;align-items:center;justify-content:center}.icon-2y6cSg4c{height:28px;width:28px}.selected-3tUrY97Z{margin:0 -8px}.label-1uw3rZaL{padding-left:6px}.lineStyleSelect-1s1ap44b{width:34px}.defaultSelect-2RDyqwu4{cursor:default;width:100px} \ No newline at end of file diff --git a/public/charting_library/bundles/40.5f251467fd134b78e377.rtl.css b/public/charting_library/bundles/40.5f251467fd134b78e377.rtl.css new file mode 100644 index 00000000..169baf65 --- /dev/null +++ b/public/charting_library/bundles/40.5f251467fd134b78e377.rtl.css @@ -0,0 +1 @@ +.itemWrap-3qF9ynvx{padding-right:0}.icon-2y6cSg4c,.item-112BZuXZ{display:flex;align-items:center;justify-content:center}.icon-2y6cSg4c{height:28px;width:28px}.selected-3tUrY97Z{margin:0 -8px}.label-1uw3rZaL{padding-right:6px}.lineStyleSelect-1s1ap44b{width:34px}.defaultSelect-2RDyqwu4{cursor:default;width:100px} \ No newline at end of file diff --git a/public/charting_library/bundles/40566afd832a155e5e370a8bd423de4b.svg b/public/charting_library/bundles/40566afd832a155e5e370a8bd423de4b.svg new file mode 100644 index 00000000..ed228918 --- /dev/null +++ b/public/charting_library/bundles/40566afd832a155e5e370a8bd423de4b.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/charting_library/bundles/40f9a03d174178efb12303caa9bc7cd8.woff2 b/public/charting_library/bundles/40f9a03d174178efb12303caa9bc7cd8.woff2 new file mode 100644 index 00000000..4d3772b6 Binary files /dev/null and b/public/charting_library/bundles/40f9a03d174178efb12303caa9bc7cd8.woff2 differ diff --git a/public/charting_library/bundles/41.7194ede4f533ae00748b.js b/public/charting_library/bundles/41.7194ede4f533ae00748b.js new file mode 100644 index 00000000..a2e1fe3d --- /dev/null +++ b/public/charting_library/bundles/41.7194ede4f533ae00748b.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[41],[]]); \ No newline at end of file diff --git a/public/charting_library/bundles/41.c4ffdcc57402c9a4393e.css b/public/charting_library/bundles/41.c4ffdcc57402c9a4393e.css new file mode 100644 index 00000000..e99a514f --- /dev/null +++ b/public/charting_library/bundles/41.c4ffdcc57402c9a4393e.css @@ -0,0 +1 @@ +.inputWrapper-6bNZbTW4{display:flex;flex-grow:1;position:relative;border-radius:4px 4px 4px 4px}.textInput-3WRWEmm7{background-color:#fff;border:1px solid;box-sizing:border-box;color:#535353;display:flex;font-size:13px;height:34px;padding:0 12px;transition:border-color .35s ease 0s,background-color .35s ease 0s,box-shadow .35s ease 0s;width:100%;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:inherit;border-color:#dadde0;flex:1}html.theme-dark .textInput-3WRWEmm7{border-color:#363c4e;color:#f2f3f5;background-color:#131722}.textInput-3WRWEmm7::placeholder{color:#d1d4dc;opacity:1}html.theme-dark .textInput-3WRWEmm7::placeholder{color:#50535e}.textInput-3WRWEmm7[readonly]{border-color:#dadde0;color:#8a8a8a}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.textInput-3WRWEmm7[readonly]:hover{border-color:#dadde0;color:#8a8a8a}}html.theme-dark .textInput-3WRWEmm7[readonly]{color:#758696}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .textInput-3WRWEmm7[readonly]:hover{color:#758696}}html.theme-dark .textInput-3WRWEmm7[readonly]{border-color:#363c4e}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .textInput-3WRWEmm7[readonly]:hover{border-color:#363c4e}}.textInput-3WRWEmm7[disabled]{color:#ececec;border-color:#ececec;background-color:#fff;cursor:auto}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.textInput-3WRWEmm7[disabled]:hover{color:#ececec;border-color:#ececec;background-color:#fff;cursor:auto}}html.theme-dark .textInput-3WRWEmm7[disabled]{background-color:#131722}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .textInput-3WRWEmm7[disabled]:hover{background-color:#131722}}html.theme-dark .textInput-3WRWEmm7[disabled]{border-color:#262b3e}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .textInput-3WRWEmm7[disabled]:hover{border-color:#262b3e}}html.theme-dark .textInput-3WRWEmm7[disabled]{color:#262b3e}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .textInput-3WRWEmm7[disabled]:hover{color:#262b3e}}.textInput-3WRWEmm7[disabled]::placeholder{color:#ececec}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.textInput-3WRWEmm7[disabled]:hover::placeholder{color:#ececec}}html.theme-dark .textInput-3WRWEmm7[disabled]::placeholder{color:#262b3e}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .textInput-3WRWEmm7[disabled]:hover::placeholder{color:#262b3e}}.textInput-3WRWEmm7.error-v0663AtN,.textInput-3WRWEmm7.error-v0663AtN[disabled],.textInput-3WRWEmm7.error-v0663AtN[readonly]{border-color:#f24965!important}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.textInput-3WRWEmm7.error-v0663AtN:hover{border-color:#f24965!important}}.textInput-3WRWEmm7.success-7iP8kTY5,.textInput-3WRWEmm7.success-7iP8kTY5[disabled],.textInput-3WRWEmm7.success-7iP8kTY5[readonly]{border-color:#38b395!important}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.textInput-3WRWEmm7.success-7iP8kTY5:hover{border-color:#38b395!important}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.textInput-3WRWEmm7:hover{border-color:#c8c8c8;transition-duration:.06s}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .textInput-3WRWEmm7:hover{border-color:#4c525e}}.textInput-3WRWEmm7:focus{border-color:#2196f3!important;box-shadow:inset 0 0 0 1px #2196f3;border-width:1px;transition-duration:.06s}html.theme-dark .textInput-3WRWEmm7:focus{box-shadow:inset 0 0 0 1px #1976d2;border-color:#1976d2!important}.textInput-3WRWEmm7.textInputLeftDirection-mlAXPh8V{text-align:left;direction:ltr}.xsmall-3Ah_Or2-{height:19px}.small-2bmxiJCE{height:27px}.large-1JDowW2I{height:48px}.iconed-3ZQvxTot .textInput-3WRWEmm7{padding-left:30px}.iconed-3ZQvxTot .inputIcon-W_Bse-a1{opacity:.4}.iconed-3ZQvxTot .inputIcon-W_Bse-a1 svg{display:inline-block;position:absolute;width:14px;height:14px;margin:10px 0 0 10px;fill:#4a4a4a;stroke:#4a4a4a}.clearable-2tabt_rj .textInput-3WRWEmm7{display:inline-block;width:100%}.clearable-2tabt_rj .clearIcon-389FR5J4{display:inline-flex;position:absolute;right:12px;top:10px;cursor:pointer;opacity:.4}.clearable-2tabt_rj .clearIcon-389FR5J4 svg{max-width:16px;height:16px;fill:#4a4a4a;stroke:#4a4a4a} \ No newline at end of file diff --git a/public/charting_library/bundles/41.c4ffdcc57402c9a4393e.rtl.css b/public/charting_library/bundles/41.c4ffdcc57402c9a4393e.rtl.css new file mode 100644 index 00000000..4018d015 --- /dev/null +++ b/public/charting_library/bundles/41.c4ffdcc57402c9a4393e.rtl.css @@ -0,0 +1 @@ +.inputWrapper-6bNZbTW4{display:flex;flex-grow:1;position:relative;border-radius:4px 4px 4px 4px}.textInput-3WRWEmm7{background-color:#fff;border:1px solid;box-sizing:border-box;color:#535353;display:flex;font-size:13px;height:34px;padding:0 12px;transition:border-color .35s ease 0s,background-color .35s ease 0s,box-shadow .35s ease 0s;width:100%;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:inherit;border-color:#dadde0;flex:1}html.theme-dark .textInput-3WRWEmm7{border-color:#363c4e;color:#f2f3f5;background-color:#131722}.textInput-3WRWEmm7::placeholder{color:#d1d4dc;opacity:1}html.theme-dark .textInput-3WRWEmm7::placeholder{color:#50535e}.textInput-3WRWEmm7[readonly]{border-color:#dadde0;color:#8a8a8a}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.textInput-3WRWEmm7[readonly]:hover{border-color:#dadde0;color:#8a8a8a}}html.theme-dark .textInput-3WRWEmm7[readonly]{color:#758696}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .textInput-3WRWEmm7[readonly]:hover{color:#758696}}html.theme-dark .textInput-3WRWEmm7[readonly]{border-color:#363c4e}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .textInput-3WRWEmm7[readonly]:hover{border-color:#363c4e}}.textInput-3WRWEmm7[disabled]{color:#ececec;border-color:#ececec;background-color:#fff;cursor:auto}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.textInput-3WRWEmm7[disabled]:hover{color:#ececec;border-color:#ececec;background-color:#fff;cursor:auto}}html.theme-dark .textInput-3WRWEmm7[disabled]{background-color:#131722}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .textInput-3WRWEmm7[disabled]:hover{background-color:#131722}}html.theme-dark .textInput-3WRWEmm7[disabled]{border-color:#262b3e}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .textInput-3WRWEmm7[disabled]:hover{border-color:#262b3e}}html.theme-dark .textInput-3WRWEmm7[disabled]{color:#262b3e}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .textInput-3WRWEmm7[disabled]:hover{color:#262b3e}}.textInput-3WRWEmm7[disabled]::placeholder{color:#ececec}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.textInput-3WRWEmm7[disabled]:hover::placeholder{color:#ececec}}html.theme-dark .textInput-3WRWEmm7[disabled]::placeholder{color:#262b3e}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .textInput-3WRWEmm7[disabled]:hover::placeholder{color:#262b3e}}.textInput-3WRWEmm7.error-v0663AtN,.textInput-3WRWEmm7.error-v0663AtN[disabled],.textInput-3WRWEmm7.error-v0663AtN[readonly]{border-color:#f24965!important}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.textInput-3WRWEmm7.error-v0663AtN:hover{border-color:#f24965!important}}.textInput-3WRWEmm7.success-7iP8kTY5,.textInput-3WRWEmm7.success-7iP8kTY5[disabled],.textInput-3WRWEmm7.success-7iP8kTY5[readonly]{border-color:#38b395!important}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.textInput-3WRWEmm7.success-7iP8kTY5:hover{border-color:#38b395!important}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.textInput-3WRWEmm7:hover{border-color:#c8c8c8;transition-duration:.06s}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .textInput-3WRWEmm7:hover{border-color:#4c525e}}.textInput-3WRWEmm7:focus{border-color:#2196f3!important;box-shadow:inset 0 0 0 1px #2196f3;border-width:1px;transition-duration:.06s}html.theme-dark .textInput-3WRWEmm7:focus{box-shadow:inset 0 0 0 1px #1976d2;border-color:#1976d2!important}.textInput-3WRWEmm7.textInputLeftDirection-mlAXPh8V{text-align:left;direction:ltr}.xsmall-3Ah_Or2-{height:19px}.small-2bmxiJCE{height:27px}.large-1JDowW2I{height:48px}.iconed-3ZQvxTot .textInput-3WRWEmm7{padding-right:30px}.iconed-3ZQvxTot .inputIcon-W_Bse-a1{opacity:.4}.iconed-3ZQvxTot .inputIcon-W_Bse-a1 svg{display:inline-block;position:absolute;width:14px;height:14px;margin:10px 10px 0 0;fill:#4a4a4a;stroke:#4a4a4a}.clearable-2tabt_rj .textInput-3WRWEmm7{display:inline-block;width:100%}.clearable-2tabt_rj .clearIcon-389FR5J4{display:inline-flex;position:absolute;left:12px;top:10px;cursor:pointer;opacity:.4}.clearable-2tabt_rj .clearIcon-389FR5J4 svg{max-width:16px;height:16px;fill:#4a4a4a;stroke:#4a4a4a} \ No newline at end of file diff --git a/public/charting_library/bundles/417aec8f751eaf532fa7760b2779716d.png b/public/charting_library/bundles/417aec8f751eaf532fa7760b2779716d.png new file mode 100644 index 00000000..d6fe4337 Binary files /dev/null and b/public/charting_library/bundles/417aec8f751eaf532fa7760b2779716d.png differ diff --git a/public/charting_library/bundles/42.ab85ca47ac2776a76a67.css b/public/charting_library/bundles/42.ab85ca47ac2776a76a67.css new file mode 100644 index 00000000..d6df135f --- /dev/null +++ b/public/charting_library/bundles/42.ab85ca47ac2776a76a67.css @@ -0,0 +1 @@ +._tv-dialog-shadowbox{position:fixed;left:0;top:0;width:100%;height:100%;background:rgba(0,0,0,.5);z-index:110;-webkit-transform:translateZ(0)}._tv-dialog-shadowbox.transparent{background:none}._tv-dialog{position:absolute;min-height:18px;left:50%;top:50%;background:#fff;border:1px solid;border-color:#b5b7b9;box-shadow:0 0 10px 0 rgba(0,0,0,.15)}html.theme-dark ._tv-dialog{border-color:#363c4e;background:#1e222d}._tv-dialog__link{color:#2196f3;transition:color .35s ease}html.theme-dark ._tv-dialog__link{color:#1976d2}._tv-dialog__link:visited{color:#2196f3;fill:#2196f3}html.theme-dark ._tv-dialog__link:visited{fill:#1976d2;color:#1976d2}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){._tv-dialog__link:hover{color:#1e88e5;fill:#1e88e5;transition-duration:.06s}}._tv-dialog__link:focus{outline:auto}._tv-dialog__link:focus:not(:-moz-focusring){outline:none}._tv-dialog__link:-moz-focusring{outline:auto}._tv-dialog__link:active{color:#1e88e5;fill:#1e88e5;transition-duration:.06s}._tv-dialog__indented-list{padding-left:20px}._tv-dialog__highlightedText{box-shadow:0 0 0 .37em #fff2cf;background:#fff2cf}html.theme-dark ._tv-dialog__highlightedText{background:#194453;box-shadow:0 0 0 .37em #194453}._tv-dialog__highlightedText:empty{background:transparent;box-shadow:none}._tv-dialog__subTitle{margin-top:20px;font-weight:700;display:block}._tv-dialog._tv-dialog-min-width{min-width:400px}._tv-dialog--alert-email a,._tv-dialog--open-a-chart a{color:#2196f3;transition:color .35s ease}html.theme-dark ._tv-dialog--alert-email a,html.theme-dark ._tv-dialog--open-a-chart a{color:#1976d2}._tv-dialog--alert-email a:visited,._tv-dialog--open-a-chart a:visited{color:#2196f3;fill:#2196f3}html.theme-dark ._tv-dialog--alert-email a:visited,html.theme-dark ._tv-dialog--open-a-chart a:visited{fill:#1976d2;color:#1976d2}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){._tv-dialog--alert-email a:hover,._tv-dialog--open-a-chart a:hover{color:#1e88e5;fill:#1e88e5;transition-duration:.06s}}._tv-dialog--alert-email a:focus,._tv-dialog--open-a-chart a:focus{outline:auto}._tv-dialog--alert-email a:focus:not(:-moz-focusring),._tv-dialog--open-a-chart a:focus:not(:-moz-focusring){outline:none}._tv-dialog--alert-email a:-moz-focusring,._tv-dialog--open-a-chart a:-moz-focusring{outline:auto}._tv-dialog--alert-email a:active,._tv-dialog--open-a-chart a:active{color:#1e88e5;fill:#1e88e5;transition-duration:.06s}._tv-dialog .colorpicker-widget:not(.disabled):not(.selected){position:relative}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){._tv-dialog .colorpicker-widget:not(.disabled):not(.selected):not(.disabled):hover{border:1px solid;border-color:#d6d8e0;z-index:1}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark ._tv-dialog .colorpicker-widget:not(.disabled):not(.selected):not(.disabled):hover{border-color:#131722}}._tv-dialog.ui-resizable{position:absolute}._tv-dialog-title{color:#4c525e;font-weight:700;font-size:15px;padding:17px 35px 17px 20px;cursor:default;word-wrap:break-word}html.theme-dark ._tv-dialog-title{color:#d6d8e0}._tv-dialog-title._tv-dialog-title-no-close{padding-right:20px}._tv-dialog-title._tv-dialog-title-hidden{padding:0;font-size:0;color:transparent;-webkit-user-select:none;user-select:none}._tv-dialog-title ._tv-dialog-title-close{width:21px;height:21px;display:block;position:absolute;right:15px;top:13px;cursor:pointer;z-index:1}._tv-dialog-title ._tv-dialog-title-close:after{width:9px;height:9px;content:" ";position:absolute;top:6px;left:6px;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAASCAYAAACJgPRIAAAAUElEQVR42pWQMQoAIAwD++d+x8HJbyoOWXJDSSBgwpVS62vtc8ulXg/ZAZkFMycNoBJgXoUcX1cm9N1NSL0esgMyC2ZOGkAlwLwKObhu/qcHp/zWImEdH8EAAAAASUVORK5CYII=);display:block}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){._tv-dialog-title ._tv-dialog-title-close:hover:after{background-position:bottom}}._tv-dialog-content{color:#131722;max-width:100%}html.theme-dark ._tv-dialog-content{color:#d6d8e0}._tv-dialog-content a:not([class*=button]):not([class*=btn]):not([class*=tabs]):not([class*=tab]):not([class*=sbSelector]):not([class*=filter]):not(a[href="#yes"]):not(a[href="#no"]){color:#2196f3;transition:color .35s ease}html.theme-dark ._tv-dialog-content a:not([class*=button]):not([class*=btn]):not([class*=tabs]):not([class*=tab]):not([class*=sbSelector]):not([class*=filter]):not(a[href="#yes"]):not(a[href="#no"]){color:#1976d2}._tv-dialog-content a:not([class*=button]):not([class*=btn]):not([class*=tabs]):not([class*=tab]):not([class*=sbSelector]):not([class*=filter]):not(a[href="#yes"]):not(a[href="#no"]):visited{color:#2196f3;fill:#2196f3}html.theme-dark ._tv-dialog-content a:not([class*=button]):not([class*=btn]):not([class*=tabs]):not([class*=tab]):not([class*=sbSelector]):not([class*=filter]):not(a[href="#yes"]):not(a[href="#no"]):visited{fill:#1976d2;color:#1976d2}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){._tv-dialog-content a:not([class*=button]):not([class*=btn]):not([class*=tabs]):not([class*=tab]):not([class*=sbSelector]):not([class*=filter]):not(a[href="#yes"]):not(a[href="#no"]):hover{color:#1e88e5;fill:#1e88e5;transition-duration:.06s}}._tv-dialog-content a:not([class*=button]):not([class*=btn]):not([class*=tabs]):not([class*=tab]):not([class*=sbSelector]):not([class*=filter]):not(a[href="#yes"]):not(a[href="#no"]):focus{outline:auto}._tv-dialog-content a:not([class*=button]):not([class*=btn]):not([class*=tabs]):not([class*=tab]):not([class*=sbSelector]):not([class*=filter]):not(a[href="#yes"]):not(a[href="#no"]):focus:not(:-moz-focusring){outline:none}._tv-dialog-content a:not([class*=button]):not([class*=btn]):not([class*=tabs]):not([class*=tab]):not([class*=sbSelector]):not([class*=filter]):not(a[href="#yes"]):not(a[href="#no"]):-moz-focusring{outline:auto}._tv-dialog-content a:not([class*=button]):not([class*=btn]):not([class*=tabs]):not([class*=tab]):not([class*=sbSelector]):not([class*=filter]):not(a[href="#yes"]):not(a[href="#no"]):active{color:#1e88e5;fill:#1e88e5;transition-duration:.06s}._tv-dialog-content .main{padding:0 20px 20px}._tv-dialog-content .main p:first-child{margin-top:0}._tv-dialog-content .main p:last-child{margin-bottom:0}._tv-dialog-content .main .buttons{margin-top:25px;text-align:right}._tv-dialog-content .main .buttons.center{text-align:center}._tv-dialog-content .main .buttons ._tv-button{min-width:60px;text-transform:uppercase}._tv-dialog-content .main-properties{padding:25px}._tv-dialog-content .main-properties.alert-aftertabs,._tv-dialog-content .main-properties.main-properties-aftertabs{padding-top:5px}._tv-dialog-content .main-properties.main-properties-tabless{padding-top:40px}._tv-dialog-content .main-properties td{padding:3px 4px;height:27px}._tv-dialog-content .main-properties td:empty{padding:0}._tv-dialog-content .main-properties td.no-left-indent,._tv-dialog-content .main-properties td:first-child{padding-left:0}._tv-dialog-content .main-properties td:last-child{padding-right:0}._tv-dialog-content .main-properties .percents-label{position:relative;top:5px;left:5px}._tv-dialog-content .main-browser-extension{padding:40px 70px 40px 52px;padding:0}._tv-dialog-content .main-browser-extension .extension-poster{width:328px;height:377px;background:url(fdbb9f3cb0365a7ab5cad76bff0b3e2b.png) 0 0}._tv-dialog-content .main-browser-extension .left,._tv-dialog-content .main-browser-extension .right{width:50%;box-sizing:border-box}._tv-dialog-content .main-browser-extension .left{float:left;padding:32px 0 0 46px}._tv-dialog-content .main-browser-extension .right{float:right;padding:51px 70px 0 44px}._tv-dialog-content .main-browser-extension .logo{float:left;width:36px;height:36px;background-size:36px 36px;margin-right:10px}._tv-dialog-content .main-browser-extension .logo.chrome{background:url(396b43348362fa7fe5cb2e187f2e6d78.svg) 0 0}._tv-dialog-content .main-browser-extension .info,._tv-dialog-content .main-browser-extension .name{float:left;clear:right;color:#a9a9a9;width:200px}._tv-dialog-content .main-browser-extension .name{font-size:20px;height:20px;line-height:20px}._tv-dialog-content .main-browser-extension .info{font-size:12px;height:14px;line-height:20px}._tv-dialog-content .main-browser-extension h1{margin-top:48px;margin-bottom:0;font-size:20px;line-height:20px}._tv-dialog-content .main-browser-extension p{color:#c2c5cb;margin:14px 0 28px}._tv-dialog-content .main-browser-extension .install-extension button{height:42px;padding:0 25px;line-height:42px;text-align:center;border:none;font-size:12px;text-transform:uppercase;background:#52c3e7;color:#fff;cursor:pointer}._tv-dialog-content .properties-separator{border-bottom:1px solid #b5b7b9}html.theme-dark ._tv-dialog-content .properties-separator{border-bottom:1px solid #363c4e}._tv-dialog-content ._tv-dialog-checkbox-mask{width:18px;height:16px;position:absolute;top:2px;left:2px;background:url(683e7a8e04465dc3fac39ed37f0789b8.png) 0 0}._tv-dialog-content ._tv-dialog-checkbox-mask.radio{background:#fff url(1df47f578aeef40dd1f2328338a133be.png);background-position:-100px -140px;width:16px}._tv-dialog-content ._tv-dialog-checkbox-mask.disabled{background-position:0 -32px}._tv-dialog-content ._tv-dialog-checkbox-mask-active{background:url(683e7a8e04465dc3fac39ed37f0789b8.png) 0 -16px}._tv-dialog-content ._tv-dialog-checkbox-mask-active.radio{background-position:-120px -140px}._tv-dialog-content--with-padding-top{padding-top:40px}._tv-dialog-content form input:not(.tv-control-input)[type=text],._tv-dialog-content form input[type=password],._tv-dialog-text-input{width:100%;box-sizing:border-box;height:33px;border:1px solid #b5b7b9;margin:1px;padding:0 5px;background-color:#fff;color:#4a4a4a}html.theme-dark ._tv-dialog-content form input:not(.tv-control-input)[type=text],html.theme-dark ._tv-dialog-content form input[type=password],html.theme-dark ._tv-dialog-text-input{color:#c5cbce;background-color:#1e222d;border:1px solid #363c4e}._tv-dialog-content form input:not(.tv-control-input)[type=text]:disabled,._tv-dialog-content form input[type=password]:disabled,._tv-dialog-text-input:disabled{color:#5a5a5a;opacity:.5}._tv-dialog-content ._tv-dialog-text-input{height:27px}._tv-dialog-text-input.disabled{color:#909292!important}._tv-dialog-content form input[type=password].error,._tv-dialog-content form input[type=text].error{margin:0;border:2px solid #de5764;background:#f7e4e6;color:#e06571}._tv-dialog-content textarea{color:#4a4a4a;font-size:12px;line-height:18px;border:1px solid;border-color:#b5b7b9;padding:8px 5px;box-sizing:border-box}html.theme-dark ._tv-dialog-content textarea{background:#1e222d;border-color:#363c4e;color:#c5cbce}._tv-dialog-content textarea:disabled{color:#5a5a5a;opacity:.5}._tv-dialog-content form input:not(.tv-control-input)._tv-dialog-content-textactive,._tv-dialog-text-input:focus{background:#fff;border-color:#2196f3!important;color:#595959}html.theme-dark ._tv-dialog-content form input:not(.tv-control-input)._tv-dialog-content-textactive,html.theme-dark ._tv-dialog-text-input:focus{color:#9db2bd;border-color:#1976d2!important;background:#1e222d}._tv-dialog-content textarea{border:1px solid #b5b7b9;background:#fff}html.theme-dark ._tv-dialog-content textarea{border:1px solid #363c4e}._tv-dialog-content textarea._tv-dialog-content-textareaactive{color:#595959;border-color:#2196f3!important}html.theme-dark ._tv-dialog-content textarea._tv-dialog-content-textareaactive{border-color:#1976d2!important}._tv-dialog-content .caption{font-size:11px;color:#4f5966;margin-bottom:3px;margin-top:7px;font-weight:700}html.theme-dark ._tv-dialog-content .caption{color:#f7f8fa}._tv-dialog-content .caption.half{float:left;width:50%}._tv-dialog-content .caption-big{font-size:12px;color:#4f5966;margin:15px 0}html.theme-dark ._tv-dialog-content .caption-big{color:#f7f8fa}._tv-dialog-content .caption-big-center{font-size:12px;color:#4f5966;margin:15px 0;text-align:center}html.theme-dark ._tv-dialog-content .caption-big-center{color:#f7f8fa}._tv-dialog-content .caption-big-center.slim{margin:0;text-align:left}._tv-dialog-content .caption-big-center.slim ul{padding-left:20px}._tv-dialog-content .caption-big.slim{margin:0;text-align:left}._tv-dialog-content .caption.first{margin-top:0}._tv-dialog-content .critical,._tv-dialog-content .disconnect{padding-bottom:15px}._tv-dialog-content .disconnect ol,._tv-dialog-content .disconnect ul{padding-left:1.5em;margin-bottom:0}._tv-dialog-content .disconnect ul{list-style:square}._tv-dialog-content .input input{width:298px!important}._tv-dialog-content .input{margin-bottom:7px}._tv-dialog-content .big-button ._tv-button{padding:10px 50px;background:#fff}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){._tv-dialog-content .big-button ._tv-button:hover{background:#fcfcfc}}._tv-dialog-content label{color:#4a4a4a}html.theme-dark ._tv-dialog-content label{color:#c5cbce}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){._tv-dialog-content .flat:hover:before{border-width:0!important}}._tv-dialog-error,._tv-dialog-message{display:none;position:absolute;top:0;width:100%;font-size:12px;z-index:100;text-align:center}._tv-dialog-error .message,._tv-dialog-message .message{display:table-cell;vertical-align:middle;padding:10px;height:32px}._tv-dialog-error .close,._tv-dialog-message .close{display:none;position:absolute;top:4px;right:4px;width:9px;height:9px;border:4px solid transparent;cursor:pointer;opacity:.7}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){._tv-dialog-error .close:hover,._tv-dialog-message .close:hover{opacity:1}}._tv-dialog-error.with-close .message,._tv-dialog-message.with-close .message{padding:10px 30px}._tv-dialog-error.with-close .close,._tv-dialog-message.with-close .close{display:block}._tv-dialog-error a,._tv-dialog-message a{color:#2196f3;transition:color .35s ease}html.theme-dark ._tv-dialog-error a,html.theme-dark ._tv-dialog-message a{color:#1976d2}._tv-dialog-error a:visited,._tv-dialog-message a:visited{color:#2196f3;fill:#2196f3}html.theme-dark ._tv-dialog-error a:visited,html.theme-dark ._tv-dialog-message a:visited{fill:#1976d2;color:#1976d2}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){._tv-dialog-error a:hover,._tv-dialog-message a:hover{color:#1e88e5;fill:#1e88e5;transition-duration:.06s}}._tv-dialog-error a:focus,._tv-dialog-message a:focus{outline:auto}._tv-dialog-error a:focus:not(:-moz-focusring),._tv-dialog-message a:focus:not(:-moz-focusring){outline:none}._tv-dialog-error a:-moz-focusring,._tv-dialog-message a:-moz-focusring{outline:auto}._tv-dialog-error a:active,._tv-dialog-message a:active{color:#1e88e5;fill:#1e88e5;transition-duration:.06s}._tv-dialog-error{color:#c34c36;background:#f9e3e6}html.theme-dark ._tv-dialog-error{background:#6f2626;color:#ffedf0}._tv-dialog-error .close{fill:#9b0202}html.theme-dark ._tv-dialog-error .close{fill:#ffa4b3}._tv-dialog-message{color:#0a8415;background:#e2fde1}html.theme-dark ._tv-dialog-message{background:#21384d;color:#9addcc}._tv-dialog-message .close{fill:#096201}html.theme-dark ._tv-dialog-message .close{fill:#3bc2a1}._tv-dialog-content .dialog-buttons{text-align:right;margin-top:10px}._tv-dialog-content .dialog-comment{float:left;margin-top:15px}._tv-dialog-content .dialog-buttons a{margin:0 0 0 5px;min-width:50px;text-align:center;position:relative}._tv-dialog-content .dialog-buttons a.tv-left{margin:0 5px 0 0}._tv-dialog .ui-resizable-handle{width:11px;height:11px;background:url(c9653f735b42cd4bff0ba442c742ba82.png) 0 0 no-repeat}._tv-dialog.change-interval-dialog ._tv-dialog-title{text-align:center;font-size:13px;padding:28px 0 23px}._tv-dialog.change-interval-dialog ._tv-dialog-content{padding:0 50px 13px;text-align:center}._tv-dialog.change-interval-dialog ._tv-dialog-content .change-interval-input{box-sizing:border-box;display:block;width:180px;height:76px;border:1px solid #2196f3;text-align:inherit;font-size:43px;color:#4a4a4a;background-color:#fff;text-transform:uppercase}html.theme-dark ._tv-dialog.change-interval-dialog ._tv-dialog-content .change-interval-input{background-color:#2f3241;color:#c5cbce;border:1px solid #1976d2}._tv-dialog.change-interval-dialog ._tv-dialog-content .change-interval-input.error{border-color:#d75442;background-color:#ffefef}._tv-dialog.change-interval-dialog ._tv-dialog-content i{display:block;font-style:normal}._tv-dialog.change-interval-dialog ._tv-dialog-content i.interval-caption{margin:8px 0 15px;color:#a8a8a8;font-size:12px;font-weight:600;cursor:default}._tv-dialog.change-interval-dialog ._tv-dialog-content i.interval-caption.error{color:#d75442}._tv-dialog.change-interval-dialog ._tv-dialog-content i.help-tooltip-trigger{margin:0 auto;width:12px;height:12px;font-size:11px;font-weight:700;line-height:12px;border:1px solid;border-color:rgba(0,0,0,.5);border-radius:50%;cursor:default}html.theme-dark ._tv-dialog.change-interval-dialog ._tv-dialog-content i.help-tooltip-trigger{border-color:rgba(157,178,189,.5)}._tv-dialog-charting-library._tv-dialog{font-size:14px;font-weight:400;background:#f2f5f8}._tv-dialog-charting-library .main{padding:0 20px 20px}._tv-dialog-charting-library .line{height:1px;background:#ced5db;overflow:hidden}._tv-dialog-charting-library .lead-in{margin-bottom:5px}._tv-dialog-charting-library h3{font-size:26px;font-weight:400;text-transform:uppercase;color:#26282f;margin:0}._tv-dialog-charting-library li,._tv-dialog-charting-library p{line-height:28px;margin:0}._tv-dialog-charting-library p,._tv-dialog-charting-library ul{margin:12px 1px}._tv-dialog-charting-library form .dropzone{margin:1px;border:1px dashed rgba(0,0,0,.3);background:#fff;display:inline-block;padding:20px 0;width:140px;height:110px;float:left;box-sizing:border-box}._tv-dialog-charting-library form .dropzone *{box-sizing:border-box}._tv-dialog-charting-library form .dropzone.dz-clickable{cursor:pointer}._tv-dialog-charting-library form .dropzone.dz-started .dz-message{display:none}._tv-dialog-charting-library form .dropzone.dz-drag-hover{border-style:solid}._tv-dialog-charting-library form .dropzone.dz-drag-hover .dz-message{opacity:.5}._tv-dialog-charting-library form .dropzone .dz-message{text-align:center}._tv-dialog-charting-library form .dropzone .dz-message .link{color:#0099d4}._tv-dialog-charting-library form .dropzone .dz-filename{text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-transform:lowercase}._tv-dialog-charting-library form .dropzone .dz-filename span{padding:0 .4em}._tv-dialog-charting-library form .dropzone .dz-icon{padding:1px 42px}._tv-dialog-charting-library form .dropzone .dz-remove{fill:#ff6565;position:relative;top:-80px;left:110px}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){._tv-dialog-charting-library form .dropzone .dz-remove:hover{fill:red}}._tv-dialog-charting-library form>div{margin-bottom:12px}._tv-dialog-charting-library form .description{margin:6px 0}._tv-dialog-charting-library form .agreement{margin-bottom:10px}._tv-dialog-charting-library form .agreement .description{display:inline-block;padding:27px 5px;width:388px}._tv-dialog-charting-library form textarea{width:100%;height:90px;margin:1px}._tv-dialog-charting-library form .attach{cursor:pointer;font-size:14px;font-weight:400}._tv-dialog-charting-library form input[type=text].error{margin:1px}._tv-dialog-charting-library form .two-columns .column-wrap{box-sizing:border-box;display:inline-block;width:50%}._tv-dialog-charting-library form .two-columns .column-wrap:first-child{padding-right:10px}._tv-dialog-charting-library .big-buttons{text-align:right;padding:10px 0}._tv-dialog-charting-library .big-buttons .cancel-button{cursor:pointer;border:1px solid transparent;font-size:15px;margin:0 15px;color:#686868;background:#f2f5f8}._tv-dialog-charting-library .big-buttons .big-button{cursor:pointer;border:1px solid transparent;background-color:#06b2ce;color:#fff;font-size:15px;text-transform:uppercase;padding:10px 45px;background-image:url(77a5d6e16116f4dd430d89ed1ef42fa8.gif);background-position:-9999px -9999px;background-repeat:no-repeat}._tv-dialog-charting-library .big-buttons .big-button.process{background-position:0 0;background-repeat:repeat}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){._tv-dialog-charting-library .big-buttons .big-button:hover{background-color:#06bbd8}}._tv-dialog-charting-library .big-buttons .big-button:active{background-color:#07c3e2}._tv-dialog-charting-library .big-buttons .big-button.disabled{cursor:default;background-color:#c3c8cf}._tv-dialog.dialog-highlight .main .message textarea{width:350px;height:130px} \ No newline at end of file diff --git a/public/charting_library/bundles/42.ab85ca47ac2776a76a67.rtl.css b/public/charting_library/bundles/42.ab85ca47ac2776a76a67.rtl.css new file mode 100644 index 00000000..bbbca459 --- /dev/null +++ b/public/charting_library/bundles/42.ab85ca47ac2776a76a67.rtl.css @@ -0,0 +1 @@ +._tv-dialog-shadowbox{position:fixed;right:0;top:0;width:100%;height:100%;background:rgba(0,0,0,.5);z-index:110;-webkit-transform:translateZ(0)}._tv-dialog-shadowbox.transparent{background:none}._tv-dialog{position:absolute;min-height:18px;left:50%;top:50%;background:#fff;border:1px solid;border-color:#b5b7b9;box-shadow:0 0 10px 0 rgba(0,0,0,.15)}html.theme-dark ._tv-dialog{border-color:#363c4e;background:#1e222d}._tv-dialog__link{color:#2196f3;transition:color .35s ease}html.theme-dark ._tv-dialog__link{color:#1976d2}._tv-dialog__link:visited{color:#2196f3;fill:#2196f3}html.theme-dark ._tv-dialog__link:visited{fill:#1976d2;color:#1976d2}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){._tv-dialog__link:hover{color:#1e88e5;fill:#1e88e5;transition-duration:.06s}}._tv-dialog__link:focus{outline:auto}._tv-dialog__link:focus:not(:-moz-focusring){outline:none}._tv-dialog__link:-moz-focusring{outline:auto}._tv-dialog__link:active{color:#1e88e5;fill:#1e88e5;transition-duration:.06s}._tv-dialog__indented-list{padding-right:20px}._tv-dialog__highlightedText{box-shadow:0 0 0 .37em #fff2cf;background:#fff2cf}html.theme-dark ._tv-dialog__highlightedText{background:#194453;box-shadow:0 0 0 .37em #194453}._tv-dialog__highlightedText:empty{background:transparent;box-shadow:none}._tv-dialog__subTitle{margin-top:20px;font-weight:700;display:block}._tv-dialog._tv-dialog-min-width{min-width:400px}._tv-dialog--alert-email a,._tv-dialog--open-a-chart a{color:#2196f3;transition:color .35s ease}html.theme-dark ._tv-dialog--alert-email a,html.theme-dark ._tv-dialog--open-a-chart a{color:#1976d2}._tv-dialog--alert-email a:visited,._tv-dialog--open-a-chart a:visited{color:#2196f3;fill:#2196f3}html.theme-dark ._tv-dialog--alert-email a:visited,html.theme-dark ._tv-dialog--open-a-chart a:visited{fill:#1976d2;color:#1976d2}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){._tv-dialog--alert-email a:hover,._tv-dialog--open-a-chart a:hover{color:#1e88e5;fill:#1e88e5;transition-duration:.06s}}._tv-dialog--alert-email a:focus,._tv-dialog--open-a-chart a:focus{outline:auto}._tv-dialog--alert-email a:focus:not(:-moz-focusring),._tv-dialog--open-a-chart a:focus:not(:-moz-focusring){outline:none}._tv-dialog--alert-email a:-moz-focusring,._tv-dialog--open-a-chart a:-moz-focusring{outline:auto}._tv-dialog--alert-email a:active,._tv-dialog--open-a-chart a:active{color:#1e88e5;fill:#1e88e5;transition-duration:.06s}._tv-dialog .colorpicker-widget:not(.disabled):not(.selected){position:relative}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){._tv-dialog .colorpicker-widget:not(.disabled):not(.selected):not(.disabled):hover{border:1px solid;border-color:#d6d8e0;z-index:1}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark ._tv-dialog .colorpicker-widget:not(.disabled):not(.selected):not(.disabled):hover{border-color:#131722}}._tv-dialog.ui-resizable{position:absolute}._tv-dialog-title{color:#4c525e;font-weight:700;font-size:15px;padding:17px 20px 17px 35px;cursor:default;word-wrap:break-word}html.theme-dark ._tv-dialog-title{color:#d6d8e0}._tv-dialog-title._tv-dialog-title-no-close{padding-left:20px}._tv-dialog-title._tv-dialog-title-hidden{padding:0;font-size:0;color:transparent;-webkit-user-select:none;user-select:none}._tv-dialog-title ._tv-dialog-title-close{width:21px;height:21px;display:block;position:absolute;left:15px;top:13px;cursor:pointer;z-index:1}._tv-dialog-title ._tv-dialog-title-close:after{width:9px;height:9px;content:" ";position:absolute;top:6px;right:6px;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAASCAYAAACJgPRIAAAAUElEQVR42pWQMQoAIAwD++d+x8HJbyoOWXJDSSBgwpVS62vtc8ulXg/ZAZkFMycNoBJgXoUcX1cm9N1NSL0esgMyC2ZOGkAlwLwKObhu/qcHp/zWImEdH8EAAAAASUVORK5CYII=);display:block}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){._tv-dialog-title ._tv-dialog-title-close:hover:after{background-position:bottom}}._tv-dialog-content{color:#131722;max-width:100%}html.theme-dark ._tv-dialog-content{color:#d6d8e0}._tv-dialog-content a:not([class*=button]):not([class*=btn]):not([class*=tabs]):not([class*=tab]):not([class*=sbSelector]):not([class*=filter]):not(a[href="#yes"]):not(a[href="#no"]){color:#2196f3;transition:color .35s ease}html.theme-dark ._tv-dialog-content a:not([class*=button]):not([class*=btn]):not([class*=tabs]):not([class*=tab]):not([class*=sbSelector]):not([class*=filter]):not(a[href="#yes"]):not(a[href="#no"]){color:#1976d2}._tv-dialog-content a:not([class*=button]):not([class*=btn]):not([class*=tabs]):not([class*=tab]):not([class*=sbSelector]):not([class*=filter]):not(a[href="#yes"]):not(a[href="#no"]):visited{color:#2196f3;fill:#2196f3}html.theme-dark ._tv-dialog-content a:not([class*=button]):not([class*=btn]):not([class*=tabs]):not([class*=tab]):not([class*=sbSelector]):not([class*=filter]):not(a[href="#yes"]):not(a[href="#no"]):visited{fill:#1976d2;color:#1976d2}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){._tv-dialog-content a:not([class*=button]):not([class*=btn]):not([class*=tabs]):not([class*=tab]):not([class*=sbSelector]):not([class*=filter]):not(a[href="#yes"]):not(a[href="#no"]):hover{color:#1e88e5;fill:#1e88e5;transition-duration:.06s}}._tv-dialog-content a:not([class*=button]):not([class*=btn]):not([class*=tabs]):not([class*=tab]):not([class*=sbSelector]):not([class*=filter]):not(a[href="#yes"]):not(a[href="#no"]):focus{outline:auto}._tv-dialog-content a:not([class*=button]):not([class*=btn]):not([class*=tabs]):not([class*=tab]):not([class*=sbSelector]):not([class*=filter]):not(a[href="#yes"]):not(a[href="#no"]):focus:not(:-moz-focusring){outline:none}._tv-dialog-content a:not([class*=button]):not([class*=btn]):not([class*=tabs]):not([class*=tab]):not([class*=sbSelector]):not([class*=filter]):not(a[href="#yes"]):not(a[href="#no"]):-moz-focusring{outline:auto}._tv-dialog-content a:not([class*=button]):not([class*=btn]):not([class*=tabs]):not([class*=tab]):not([class*=sbSelector]):not([class*=filter]):not(a[href="#yes"]):not(a[href="#no"]):active{color:#1e88e5;fill:#1e88e5;transition-duration:.06s}._tv-dialog-content .main{padding:0 20px 20px}._tv-dialog-content .main p:first-child{margin-top:0}._tv-dialog-content .main p:last-child{margin-bottom:0}._tv-dialog-content .main .buttons{margin-top:25px;text-align:left}._tv-dialog-content .main .buttons.center{text-align:center}._tv-dialog-content .main .buttons ._tv-button{min-width:60px;text-transform:uppercase}._tv-dialog-content .main-properties{padding:25px}._tv-dialog-content .main-properties.alert-aftertabs,._tv-dialog-content .main-properties.main-properties-aftertabs{padding-top:5px}._tv-dialog-content .main-properties.main-properties-tabless{padding-top:40px}._tv-dialog-content .main-properties td{padding:3px 4px;height:27px}._tv-dialog-content .main-properties td:empty{padding:0}._tv-dialog-content .main-properties td.no-left-indent,._tv-dialog-content .main-properties td:first-child{padding-right:0}._tv-dialog-content .main-properties td:last-child{padding-left:0}._tv-dialog-content .main-properties .percents-label{position:relative;top:5px;right:5px}._tv-dialog-content .main-browser-extension{padding:40px 52px 40px 70px;padding:0}._tv-dialog-content .main-browser-extension .extension-poster{width:328px;height:377px;background:url(fdbb9f3cb0365a7ab5cad76bff0b3e2b.png) 100% 0}._tv-dialog-content .main-browser-extension .left,._tv-dialog-content .main-browser-extension .right{width:50%;box-sizing:border-box}._tv-dialog-content .main-browser-extension .left{float:right;padding:32px 46px 0 0}._tv-dialog-content .main-browser-extension .right{float:left;padding:51px 44px 0 70px}._tv-dialog-content .main-browser-extension .logo{float:right;width:36px;height:36px;background-size:36px 36px;margin-left:10px}._tv-dialog-content .main-browser-extension .logo.chrome{background:url(396b43348362fa7fe5cb2e187f2e6d78.svg) 100% 0}._tv-dialog-content .main-browser-extension .info,._tv-dialog-content .main-browser-extension .name{float:right;clear:left;color:#a9a9a9;width:200px}._tv-dialog-content .main-browser-extension .name{font-size:20px;height:20px;line-height:20px}._tv-dialog-content .main-browser-extension .info{font-size:12px;height:14px;line-height:20px}._tv-dialog-content .main-browser-extension h1{margin-top:48px;margin-bottom:0;font-size:20px;line-height:20px}._tv-dialog-content .main-browser-extension p{color:#c2c5cb;margin:14px 0 28px}._tv-dialog-content .main-browser-extension .install-extension button{height:42px;padding:0 25px;line-height:42px;text-align:center;border:none;font-size:12px;text-transform:uppercase;background:#52c3e7;color:#fff;cursor:pointer}._tv-dialog-content .properties-separator{border-bottom:1px solid #b5b7b9}html.theme-dark ._tv-dialog-content .properties-separator{border-bottom:1px solid #363c4e}._tv-dialog-content ._tv-dialog-checkbox-mask{width:18px;height:16px;position:absolute;top:2px;right:2px;background:url(683e7a8e04465dc3fac39ed37f0789b8.png) 100% 0}._tv-dialog-content ._tv-dialog-checkbox-mask.radio{background:#fff url(1df47f578aeef40dd1f2328338a133be.png);background-position:-100px -140px;width:16px}._tv-dialog-content ._tv-dialog-checkbox-mask.disabled{background-position:100% -32px}._tv-dialog-content ._tv-dialog-checkbox-mask-active{background:url(683e7a8e04465dc3fac39ed37f0789b8.png) 100% -16px}._tv-dialog-content ._tv-dialog-checkbox-mask-active.radio{background-position:-120px -140px}._tv-dialog-content--with-padding-top{padding-top:40px}._tv-dialog-content form input:not(.tv-control-input)[type=text],._tv-dialog-content form input[type=password],._tv-dialog-text-input{width:100%;box-sizing:border-box;height:33px;border:1px solid #b5b7b9;margin:1px;padding:0 5px;background-color:#fff;color:#4a4a4a}html.theme-dark ._tv-dialog-content form input:not(.tv-control-input)[type=text],html.theme-dark ._tv-dialog-content form input[type=password],html.theme-dark ._tv-dialog-text-input{color:#c5cbce;background-color:#1e222d;border:1px solid #363c4e}._tv-dialog-content form input:not(.tv-control-input)[type=text]:disabled,._tv-dialog-content form input[type=password]:disabled,._tv-dialog-text-input:disabled{color:#5a5a5a;opacity:.5}._tv-dialog-content ._tv-dialog-text-input{height:27px}._tv-dialog-text-input.disabled{color:#909292!important}._tv-dialog-content form input[type=password].error,._tv-dialog-content form input[type=text].error{margin:0;border:2px solid #de5764;background:#f7e4e6;color:#e06571}._tv-dialog-content textarea{color:#4a4a4a;font-size:12px;line-height:18px;border:1px solid;border-color:#b5b7b9;padding:8px 5px;box-sizing:border-box}html.theme-dark ._tv-dialog-content textarea{background:#1e222d;border-color:#363c4e;color:#c5cbce}._tv-dialog-content textarea:disabled{color:#5a5a5a;opacity:.5}._tv-dialog-content form input:not(.tv-control-input)._tv-dialog-content-textactive,._tv-dialog-text-input:focus{background:#fff;border-color:#2196f3!important;color:#595959}html.theme-dark ._tv-dialog-content form input:not(.tv-control-input)._tv-dialog-content-textactive,html.theme-dark ._tv-dialog-text-input:focus{color:#9db2bd;border-color:#1976d2!important;background:#1e222d}._tv-dialog-content textarea{border:1px solid #b5b7b9;background:#fff}html.theme-dark ._tv-dialog-content textarea{border:1px solid #363c4e}._tv-dialog-content textarea._tv-dialog-content-textareaactive{color:#595959;border-color:#2196f3!important}html.theme-dark ._tv-dialog-content textarea._tv-dialog-content-textareaactive{border-color:#1976d2!important}._tv-dialog-content .caption{font-size:11px;color:#4f5966;margin-bottom:3px;margin-top:7px;font-weight:700}html.theme-dark ._tv-dialog-content .caption{color:#f7f8fa}._tv-dialog-content .caption.half{float:right;width:50%}._tv-dialog-content .caption-big{font-size:12px;color:#4f5966;margin:15px 0}html.theme-dark ._tv-dialog-content .caption-big{color:#f7f8fa}._tv-dialog-content .caption-big-center{font-size:12px;color:#4f5966;margin:15px 0;text-align:center}html.theme-dark ._tv-dialog-content .caption-big-center{color:#f7f8fa}._tv-dialog-content .caption-big-center.slim{margin:0;text-align:right}._tv-dialog-content .caption-big-center.slim ul{padding-right:20px}._tv-dialog-content .caption-big.slim{margin:0;text-align:right}._tv-dialog-content .caption.first{margin-top:0}._tv-dialog-content .critical,._tv-dialog-content .disconnect{padding-bottom:15px}._tv-dialog-content .disconnect ol,._tv-dialog-content .disconnect ul{padding-right:1.5em;margin-bottom:0}._tv-dialog-content .disconnect ul{list-style:square}._tv-dialog-content .input input{width:298px!important}._tv-dialog-content .input{margin-bottom:7px}._tv-dialog-content .big-button ._tv-button{padding:10px 50px;background:#fff}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){._tv-dialog-content .big-button ._tv-button:hover{background:#fcfcfc}}._tv-dialog-content label{color:#4a4a4a}html.theme-dark ._tv-dialog-content label{color:#c5cbce}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){._tv-dialog-content .flat:hover:before{border-width:0!important}}._tv-dialog-error,._tv-dialog-message{display:none;position:absolute;top:0;width:100%;font-size:12px;z-index:100;text-align:center}._tv-dialog-error .message,._tv-dialog-message .message{display:table-cell;vertical-align:middle;padding:10px;height:32px}._tv-dialog-error .close,._tv-dialog-message .close{display:none;position:absolute;top:4px;left:4px;width:9px;height:9px;border:4px solid transparent;cursor:pointer;opacity:.7}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){._tv-dialog-error .close:hover,._tv-dialog-message .close:hover{opacity:1}}._tv-dialog-error.with-close .message,._tv-dialog-message.with-close .message{padding:10px 30px}._tv-dialog-error.with-close .close,._tv-dialog-message.with-close .close{display:block}._tv-dialog-error a,._tv-dialog-message a{color:#2196f3;transition:color .35s ease}html.theme-dark ._tv-dialog-error a,html.theme-dark ._tv-dialog-message a{color:#1976d2}._tv-dialog-error a:visited,._tv-dialog-message a:visited{color:#2196f3;fill:#2196f3}html.theme-dark ._tv-dialog-error a:visited,html.theme-dark ._tv-dialog-message a:visited{fill:#1976d2;color:#1976d2}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){._tv-dialog-error a:hover,._tv-dialog-message a:hover{color:#1e88e5;fill:#1e88e5;transition-duration:.06s}}._tv-dialog-error a:focus,._tv-dialog-message a:focus{outline:auto}._tv-dialog-error a:focus:not(:-moz-focusring),._tv-dialog-message a:focus:not(:-moz-focusring){outline:none}._tv-dialog-error a:-moz-focusring,._tv-dialog-message a:-moz-focusring{outline:auto}._tv-dialog-error a:active,._tv-dialog-message a:active{color:#1e88e5;fill:#1e88e5;transition-duration:.06s}._tv-dialog-error{color:#c34c36;background:#f9e3e6}html.theme-dark ._tv-dialog-error{background:#6f2626;color:#ffedf0}._tv-dialog-error .close{fill:#9b0202}html.theme-dark ._tv-dialog-error .close{fill:#ffa4b3}._tv-dialog-message{color:#0a8415;background:#e2fde1}html.theme-dark ._tv-dialog-message{background:#21384d;color:#9addcc}._tv-dialog-message .close{fill:#096201}html.theme-dark ._tv-dialog-message .close{fill:#3bc2a1}._tv-dialog-content .dialog-buttons{text-align:left;margin-top:10px}._tv-dialog-content .dialog-comment{float:right;margin-top:15px}._tv-dialog-content .dialog-buttons a{margin:0 5px 0 0;min-width:50px;text-align:center;position:relative}._tv-dialog-content .dialog-buttons a.tv-left{margin:0 0 0 5px}._tv-dialog .ui-resizable-handle{width:11px;height:11px;background:url(c9653f735b42cd4bff0ba442c742ba82.png) 100% 0 no-repeat}._tv-dialog.change-interval-dialog ._tv-dialog-title{text-align:center;font-size:13px;padding:28px 0 23px}._tv-dialog.change-interval-dialog ._tv-dialog-content{padding:0 50px 13px;text-align:center}._tv-dialog.change-interval-dialog ._tv-dialog-content .change-interval-input{box-sizing:border-box;display:block;width:180px;height:76px;border:1px solid #2196f3;text-align:inherit;font-size:43px;color:#4a4a4a;background-color:#fff;text-transform:uppercase}html.theme-dark ._tv-dialog.change-interval-dialog ._tv-dialog-content .change-interval-input{background-color:#2f3241;color:#c5cbce;border:1px solid #1976d2}._tv-dialog.change-interval-dialog ._tv-dialog-content .change-interval-input.error{border-color:#d75442;background-color:#ffefef}._tv-dialog.change-interval-dialog ._tv-dialog-content i{display:block;font-style:normal}._tv-dialog.change-interval-dialog ._tv-dialog-content i.interval-caption{margin:8px 0 15px;color:#a8a8a8;font-size:12px;font-weight:600;cursor:default}._tv-dialog.change-interval-dialog ._tv-dialog-content i.interval-caption.error{color:#d75442}._tv-dialog.change-interval-dialog ._tv-dialog-content i.help-tooltip-trigger{margin:0 auto;width:12px;height:12px;font-size:11px;font-weight:700;line-height:12px;border:1px solid;border-color:rgba(0,0,0,.5);border-radius:50%;cursor:default}html.theme-dark ._tv-dialog.change-interval-dialog ._tv-dialog-content i.help-tooltip-trigger{border-color:rgba(157,178,189,.5)}._tv-dialog-charting-library._tv-dialog{font-size:14px;font-weight:400;background:#f2f5f8}._tv-dialog-charting-library .main{padding:0 20px 20px}._tv-dialog-charting-library .line{height:1px;background:#ced5db;overflow:hidden}._tv-dialog-charting-library .lead-in{margin-bottom:5px}._tv-dialog-charting-library h3{font-size:26px;font-weight:400;text-transform:uppercase;color:#26282f;margin:0}._tv-dialog-charting-library li,._tv-dialog-charting-library p{line-height:28px;margin:0}._tv-dialog-charting-library p,._tv-dialog-charting-library ul{margin:12px 1px}._tv-dialog-charting-library form .dropzone{margin:1px;border:1px dashed rgba(0,0,0,.3);background:#fff;display:inline-block;padding:20px 0;width:140px;height:110px;float:right;box-sizing:border-box}._tv-dialog-charting-library form .dropzone *{box-sizing:border-box}._tv-dialog-charting-library form .dropzone.dz-clickable{cursor:pointer}._tv-dialog-charting-library form .dropzone.dz-started .dz-message{display:none}._tv-dialog-charting-library form .dropzone.dz-drag-hover{border-style:solid}._tv-dialog-charting-library form .dropzone.dz-drag-hover .dz-message{opacity:.5}._tv-dialog-charting-library form .dropzone .dz-message{text-align:center}._tv-dialog-charting-library form .dropzone .dz-message .link{color:#0099d4}._tv-dialog-charting-library form .dropzone .dz-filename{text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-transform:lowercase}._tv-dialog-charting-library form .dropzone .dz-filename span{padding:0 .4em}._tv-dialog-charting-library form .dropzone .dz-icon{padding:1px 42px}._tv-dialog-charting-library form .dropzone .dz-remove{fill:#ff6565;position:relative;top:-80px;right:110px}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){._tv-dialog-charting-library form .dropzone .dz-remove:hover{fill:red}}._tv-dialog-charting-library form>div{margin-bottom:12px}._tv-dialog-charting-library form .description{margin:6px 0}._tv-dialog-charting-library form .agreement{margin-bottom:10px}._tv-dialog-charting-library form .agreement .description{display:inline-block;padding:27px 5px;width:388px}._tv-dialog-charting-library form textarea{width:100%;height:90px;margin:1px}._tv-dialog-charting-library form .attach{cursor:pointer;font-size:14px;font-weight:400}._tv-dialog-charting-library form input[type=text].error{margin:1px}._tv-dialog-charting-library form .two-columns .column-wrap{box-sizing:border-box;display:inline-block;width:50%}._tv-dialog-charting-library form .two-columns .column-wrap:first-child{padding-left:10px}._tv-dialog-charting-library .big-buttons{text-align:left;padding:10px 0}._tv-dialog-charting-library .big-buttons .cancel-button{cursor:pointer;border:1px solid transparent;font-size:15px;margin:0 15px;color:#686868;background:#f2f5f8}._tv-dialog-charting-library .big-buttons .big-button{cursor:pointer;border:1px solid transparent;background-color:#06b2ce;color:#fff;font-size:15px;text-transform:uppercase;padding:10px 45px;background-image:url(77a5d6e16116f4dd430d89ed1ef42fa8.gif);background-position:-9999px -9999px;background-repeat:no-repeat}._tv-dialog-charting-library .big-buttons .big-button.process{background-position:100% 0;background-repeat:repeat}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){._tv-dialog-charting-library .big-buttons .big-button:hover{background-color:#06bbd8}}._tv-dialog-charting-library .big-buttons .big-button:active{background-color:#07c3e2}._tv-dialog-charting-library .big-buttons .big-button.disabled{cursor:default;background-color:#c3c8cf}._tv-dialog.dialog-highlight .main .message textarea{width:350px;height:130px} \ No newline at end of file diff --git a/public/charting_library/bundles/42.ac659c8ecce1a72e706a.js b/public/charting_library/bundles/42.ac659c8ecce1a72e706a.js new file mode 100644 index 00000000..3c709615 --- /dev/null +++ b/public/charting_library/bundles/42.ac659c8ecce1a72e706a.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[42],[]]); \ No newline at end of file diff --git a/public/charting_library/bundles/43.d0fb62d739ece98891c1.js b/public/charting_library/bundles/43.d0fb62d739ece98891c1.js new file mode 100644 index 00000000..01e9c983 --- /dev/null +++ b/public/charting_library/bundles/43.d0fb62d739ece98891c1.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[43],[]]); \ No newline at end of file diff --git a/public/charting_library/bundles/43.da62deb6f4f1ddeea0b7.css b/public/charting_library/bundles/43.da62deb6f4f1ddeea0b7.css new file mode 100644 index 00000000..d2154586 --- /dev/null +++ b/public/charting_library/bundles/43.da62deb6f4f1ddeea0b7.css @@ -0,0 +1 @@ +.button-2ioYhFEY{display:flex;align-items:center;height:100%;box-sizing:border-box;cursor:default;transition:background-color 60ms ease,opacity 60ms ease,color 60ms ease;color:var(--tv-color-toolbar-button-text,#131722)}html.theme-dark .button-2ioYhFEY{color:var(--tv-color-toolbar-button-text,#787b86)}.button-2ioYhFEY.hover-yHQNmTbI,.button-2ioYhFEY:active{color:var(--tv-color-toolbar-button-text-hover,#000)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.button-2ioYhFEY:hover{color:var(--tv-color-toolbar-button-text-hover,#000)}}html.theme-dark .button-2ioYhFEY.hover-yHQNmTbI,html.theme-dark .button-2ioYhFEY:active{color:var(--tv-color-toolbar-button-text-hover,#868993)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .button-2ioYhFEY:hover{color:var(--tv-color-toolbar-button-text-hover,#868993)}}.button-2ioYhFEY svg{display:block;-moz-transform:translateX(0)}.button-2ioYhFEY.isInteractive-20uLObIc{position:relative;z-index:0}.button-2ioYhFEY.isInteractive-20uLObIc.hover-yHQNmTbI:before,.button-2ioYhFEY.isInteractive-20uLObIc:active:before{content:"";display:block;position:absolute;z-index:-1;top:var(--tv-toolbar-explicit-hover-margin,2px);right:var(--tv-toolbar-explicit-hover-margin,2px);bottom:var(--tv-toolbar-explicit-hover-margin,2px);left:var(--tv-toolbar-explicit-hover-margin,2px);background-color:var(--tv-color-toolbar-button-background-hover,#f0f3fa);border-radius:var(--tv-toolbar-explicit-hover-border-radius,2px)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.button-2ioYhFEY.isInteractive-20uLObIc:hover:before{content:"";display:block;position:absolute;z-index:-1;top:var(--tv-toolbar-explicit-hover-margin,2px);right:var(--tv-toolbar-explicit-hover-margin,2px);bottom:var(--tv-toolbar-explicit-hover-margin,2px);left:var(--tv-toolbar-explicit-hover-margin,2px);background-color:var(--tv-color-toolbar-button-background-hover,#f0f3fa);border-radius:var(--tv-toolbar-explicit-hover-border-radius,2px)}}html.theme-dark .button-2ioYhFEY.isInteractive-20uLObIc.hover-yHQNmTbI:before,html.theme-dark .button-2ioYhFEY.isInteractive-20uLObIc:active:before{background-color:var(--tv-color-toolbar-button-background-hover,#2a2e39)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .button-2ioYhFEY.isInteractive-20uLObIc:hover:before{background-color:var(--tv-color-toolbar-button-background-hover,#2a2e39)}}.button-2ioYhFEY.isInteractive-20uLObIc.isGrouped-2BBXQnbO{position:relative;z-index:0}.button-2ioYhFEY.isInteractive-20uLObIc.isGrouped-2BBXQnbO.hover-yHQNmTbI:before,.button-2ioYhFEY.isInteractive-20uLObIc.isGrouped-2BBXQnbO:active:before{content:"";display:block;position:absolute;z-index:-1;top:var(--tv-toolbar-explicit-hover-margin,2px);right:var(--tv-toolbar-explicit-hover-margin,2px);bottom:var(--tv-toolbar-explicit-hover-margin,2px);left:var(--tv-toolbar-explicit-hover-margin,2px);background-color:var(--tv-color-toolbar-button-background-hover,#f0f3fa);border-radius:var(--tv-toolbar-explicit-hover-border-radius,2px);right:0;left:0}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.button-2ioYhFEY.isInteractive-20uLObIc.isGrouped-2BBXQnbO:hover:before{content:"";display:block;position:absolute;z-index:-1;top:var(--tv-toolbar-explicit-hover-margin,2px);right:var(--tv-toolbar-explicit-hover-margin,2px);bottom:var(--tv-toolbar-explicit-hover-margin,2px);left:var(--tv-toolbar-explicit-hover-margin,2px);background-color:var(--tv-color-toolbar-button-background-hover,#f0f3fa);border-radius:var(--tv-toolbar-explicit-hover-border-radius,2px);right:0;left:0}}html.theme-dark .button-2ioYhFEY.isInteractive-20uLObIc.isGrouped-2BBXQnbO.hover-yHQNmTbI:before,html.theme-dark .button-2ioYhFEY.isInteractive-20uLObIc.isGrouped-2BBXQnbO:active:before{background-color:var(--tv-color-toolbar-button-background-hover,#2a2e39)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .button-2ioYhFEY.isInteractive-20uLObIc.isGrouped-2BBXQnbO:hover:before{background-color:var(--tv-color-toolbar-button-background-hover,#2a2e39)}}.button-2ioYhFEY.isInteractive-20uLObIc.isActive-22S-lGpa{color:var(--tv-color-toolbar-button-text-active,#2196f3)}html.theme-sa .button-2ioYhFEY.isInteractive-20uLObIc.isActive-22S-lGpa{color:var(--tv-color-toolbar-button-text-active,#ff7200)}html.theme-dark .button-2ioYhFEY.isInteractive-20uLObIc.isActive-22S-lGpa{color:var(--tv-color-toolbar-button-text-active,#1976d2)}.button-2ioYhFEY.isInteractive-20uLObIc.isActive-22S-lGpa.hover-yHQNmTbI,.button-2ioYhFEY.isInteractive-20uLObIc.isActive-22S-lGpa:active{color:var(--tv-color-toolbar-button-text-active-hover,#1e88e5)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.button-2ioYhFEY.isInteractive-20uLObIc.isActive-22S-lGpa:hover{color:var(--tv-color-toolbar-button-text-active-hover,#1e88e5)}}html.theme-dark .button-2ioYhFEY.isInteractive-20uLObIc.isActive-22S-lGpa.hover-yHQNmTbI,html.theme-dark .button-2ioYhFEY.isInteractive-20uLObIc.isActive-22S-lGpa:active{color:var(--tv-color-toolbar-button-text-active-hover,#1e88e5)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .button-2ioYhFEY.isInteractive-20uLObIc.isActive-22S-lGpa:hover{color:var(--tv-color-toolbar-button-text-active-hover,#1e88e5)}}.button-2ioYhFEY.isInteractive-20uLObIc.isOpened-p-Ume5l9.hover-yHQNmTbI:before,.button-2ioYhFEY.isInteractive-20uLObIc.isOpened-p-Ume5l9:active:before,.button-2ioYhFEY.isInteractive-20uLObIc.isOpened-p-Ume5l9:before{content:"";display:block;position:absolute;z-index:-1;top:var(--tv-toolbar-opened-element-hover-margin-top,0);right:var(--tv-toolbar-opened-element-hover-margin-right,0);bottom:var(--tv-toolbar-opened-element-hover-margin-bottom,0);left:var(--tv-toolbar-opened-element-hover-margin-left,0);border-radius:var(--tv-toolbar-opened-element-hover-border-radius,0);background-color:var(--tv-color-toolbar-button-background-expanded,#f0f3fa)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.button-2ioYhFEY.isInteractive-20uLObIc.isOpened-p-Ume5l9:hover:before{content:"";display:block;position:absolute;z-index:-1;top:var(--tv-toolbar-opened-element-hover-margin-top,0);right:var(--tv-toolbar-opened-element-hover-margin-right,0);bottom:var(--tv-toolbar-opened-element-hover-margin-bottom,0);left:var(--tv-toolbar-opened-element-hover-margin-left,0);border-radius:var(--tv-toolbar-opened-element-hover-border-radius,0);background-color:var(--tv-color-toolbar-button-background-expanded,#f0f3fa)}}html.theme-dark .button-2ioYhFEY.isInteractive-20uLObIc.isOpened-p-Ume5l9.hover-yHQNmTbI:before,html.theme-dark .button-2ioYhFEY.isInteractive-20uLObIc.isOpened-p-Ume5l9:active:before,html.theme-dark .button-2ioYhFEY.isInteractive-20uLObIc.isOpened-p-Ume5l9:before{background-color:var(--tv-color-toolbar-button-background-expanded,#2a2e39)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .button-2ioYhFEY.isInteractive-20uLObIc.isOpened-p-Ume5l9:hover:before{background-color:var(--tv-color-toolbar-button-background-expanded,#2a2e39)}}.button-2ioYhFEY.isDisabled-1_tmrLfP{opacity:.3}.button-2ioYhFEY.isDisabled-1_tmrLfP,.button-2ioYhFEY.isDisabled-1_tmrLfP:active{background-color:transparent}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.button-2ioYhFEY.isDisabled-1_tmrLfP:hover{background-color:transparent}}.button-2ioYhFEY.isDisabled-1_tmrLfP.isActive-22S-lGpa{opacity:1;color:var(--tv-color-toolbar-button-text-active,#2196f3)}html.theme-sa .button-2ioYhFEY.isDisabled-1_tmrLfP.isActive-22S-lGpa{color:var(--tv-color-toolbar-button-text-active,#ff7200)}html.theme-dark .button-2ioYhFEY.isDisabled-1_tmrLfP.isActive-22S-lGpa{color:var(--tv-color-toolbar-button-text-active,#1976d2)}.icon-beK_KS0k+.text-1sK7vbvh,.text-1sK7vbvh+.icon-beK_KS0k{margin-left:2px} \ No newline at end of file diff --git a/public/charting_library/bundles/43.da62deb6f4f1ddeea0b7.rtl.css b/public/charting_library/bundles/43.da62deb6f4f1ddeea0b7.rtl.css new file mode 100644 index 00000000..7d24b204 --- /dev/null +++ b/public/charting_library/bundles/43.da62deb6f4f1ddeea0b7.rtl.css @@ -0,0 +1 @@ +.button-2ioYhFEY{display:flex;align-items:center;height:100%;box-sizing:border-box;cursor:default;transition:background-color 60ms ease,opacity 60ms ease,color 60ms ease;color:var(--tv-color-toolbar-button-text,#131722)}html.theme-dark .button-2ioYhFEY{color:var(--tv-color-toolbar-button-text,#787b86)}.button-2ioYhFEY.hover-yHQNmTbI,.button-2ioYhFEY:active{color:var(--tv-color-toolbar-button-text-hover,#000)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.button-2ioYhFEY:hover{color:var(--tv-color-toolbar-button-text-hover,#000)}}html.theme-dark .button-2ioYhFEY.hover-yHQNmTbI,html.theme-dark .button-2ioYhFEY:active{color:var(--tv-color-toolbar-button-text-hover,#868993)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .button-2ioYhFEY:hover{color:var(--tv-color-toolbar-button-text-hover,#868993)}}.button-2ioYhFEY svg{display:block;-moz-transform:translateX(0)}.button-2ioYhFEY.isInteractive-20uLObIc{position:relative;z-index:0}.button-2ioYhFEY.isInteractive-20uLObIc.hover-yHQNmTbI:before,.button-2ioYhFEY.isInteractive-20uLObIc:active:before{content:"";display:block;position:absolute;z-index:-1;top:var(--tv-toolbar-explicit-hover-margin,2px);left:var(--tv-toolbar-explicit-hover-margin,2px);bottom:var(--tv-toolbar-explicit-hover-margin,2px);right:var(--tv-toolbar-explicit-hover-margin,2px);background-color:var(--tv-color-toolbar-button-background-hover,#f0f3fa);border-radius:var(--tv-toolbar-explicit-hover-border-radius,2px)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.button-2ioYhFEY.isInteractive-20uLObIc:hover:before{content:"";display:block;position:absolute;z-index:-1;top:var(--tv-toolbar-explicit-hover-margin,2px);left:var(--tv-toolbar-explicit-hover-margin,2px);bottom:var(--tv-toolbar-explicit-hover-margin,2px);right:var(--tv-toolbar-explicit-hover-margin,2px);background-color:var(--tv-color-toolbar-button-background-hover,#f0f3fa);border-radius:var(--tv-toolbar-explicit-hover-border-radius,2px)}}html.theme-dark .button-2ioYhFEY.isInteractive-20uLObIc.hover-yHQNmTbI:before,html.theme-dark .button-2ioYhFEY.isInteractive-20uLObIc:active:before{background-color:var(--tv-color-toolbar-button-background-hover,#2a2e39)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .button-2ioYhFEY.isInteractive-20uLObIc:hover:before{background-color:var(--tv-color-toolbar-button-background-hover,#2a2e39)}}.button-2ioYhFEY.isInteractive-20uLObIc.isGrouped-2BBXQnbO{position:relative;z-index:0}.button-2ioYhFEY.isInteractive-20uLObIc.isGrouped-2BBXQnbO.hover-yHQNmTbI:before,.button-2ioYhFEY.isInteractive-20uLObIc.isGrouped-2BBXQnbO:active:before{content:"";display:block;position:absolute;z-index:-1;top:var(--tv-toolbar-explicit-hover-margin,2px);left:var(--tv-toolbar-explicit-hover-margin,2px);bottom:var(--tv-toolbar-explicit-hover-margin,2px);right:var(--tv-toolbar-explicit-hover-margin,2px);background-color:var(--tv-color-toolbar-button-background-hover,#f0f3fa);border-radius:var(--tv-toolbar-explicit-hover-border-radius,2px);left:0;right:0}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.button-2ioYhFEY.isInteractive-20uLObIc.isGrouped-2BBXQnbO:hover:before{content:"";display:block;position:absolute;z-index:-1;top:var(--tv-toolbar-explicit-hover-margin,2px);left:var(--tv-toolbar-explicit-hover-margin,2px);bottom:var(--tv-toolbar-explicit-hover-margin,2px);right:var(--tv-toolbar-explicit-hover-margin,2px);background-color:var(--tv-color-toolbar-button-background-hover,#f0f3fa);border-radius:var(--tv-toolbar-explicit-hover-border-radius,2px);left:0;right:0}}html.theme-dark .button-2ioYhFEY.isInteractive-20uLObIc.isGrouped-2BBXQnbO.hover-yHQNmTbI:before,html.theme-dark .button-2ioYhFEY.isInteractive-20uLObIc.isGrouped-2BBXQnbO:active:before{background-color:var(--tv-color-toolbar-button-background-hover,#2a2e39)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .button-2ioYhFEY.isInteractive-20uLObIc.isGrouped-2BBXQnbO:hover:before{background-color:var(--tv-color-toolbar-button-background-hover,#2a2e39)}}.button-2ioYhFEY.isInteractive-20uLObIc.isActive-22S-lGpa{color:var(--tv-color-toolbar-button-text-active,#2196f3)}html.theme-sa .button-2ioYhFEY.isInteractive-20uLObIc.isActive-22S-lGpa{color:var(--tv-color-toolbar-button-text-active,#ff7200)}html.theme-dark .button-2ioYhFEY.isInteractive-20uLObIc.isActive-22S-lGpa{color:var(--tv-color-toolbar-button-text-active,#1976d2)}.button-2ioYhFEY.isInteractive-20uLObIc.isActive-22S-lGpa.hover-yHQNmTbI,.button-2ioYhFEY.isInteractive-20uLObIc.isActive-22S-lGpa:active{color:var(--tv-color-toolbar-button-text-active-hover,#1e88e5)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.button-2ioYhFEY.isInteractive-20uLObIc.isActive-22S-lGpa:hover{color:var(--tv-color-toolbar-button-text-active-hover,#1e88e5)}}html.theme-dark .button-2ioYhFEY.isInteractive-20uLObIc.isActive-22S-lGpa.hover-yHQNmTbI,html.theme-dark .button-2ioYhFEY.isInteractive-20uLObIc.isActive-22S-lGpa:active{color:var(--tv-color-toolbar-button-text-active-hover,#1e88e5)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .button-2ioYhFEY.isInteractive-20uLObIc.isActive-22S-lGpa:hover{color:var(--tv-color-toolbar-button-text-active-hover,#1e88e5)}}.button-2ioYhFEY.isInteractive-20uLObIc.isOpened-p-Ume5l9.hover-yHQNmTbI:before,.button-2ioYhFEY.isInteractive-20uLObIc.isOpened-p-Ume5l9:active:before,.button-2ioYhFEY.isInteractive-20uLObIc.isOpened-p-Ume5l9:before{content:"";display:block;position:absolute;z-index:-1;top:var(--tv-toolbar-opened-element-hover-margin-top,0);left:var(--tv-toolbar-opened-element-hover-margin-right,0);bottom:var(--tv-toolbar-opened-element-hover-margin-bottom,0);right:var(--tv-toolbar-opened-element-hover-margin-left,0);border-radius:var(--tv-toolbar-opened-element-hover-border-radius,0);background-color:var(--tv-color-toolbar-button-background-expanded,#f0f3fa)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.button-2ioYhFEY.isInteractive-20uLObIc.isOpened-p-Ume5l9:hover:before{content:"";display:block;position:absolute;z-index:-1;top:var(--tv-toolbar-opened-element-hover-margin-top,0);left:var(--tv-toolbar-opened-element-hover-margin-right,0);bottom:var(--tv-toolbar-opened-element-hover-margin-bottom,0);right:var(--tv-toolbar-opened-element-hover-margin-left,0);border-radius:var(--tv-toolbar-opened-element-hover-border-radius,0);background-color:var(--tv-color-toolbar-button-background-expanded,#f0f3fa)}}html.theme-dark .button-2ioYhFEY.isInteractive-20uLObIc.isOpened-p-Ume5l9.hover-yHQNmTbI:before,html.theme-dark .button-2ioYhFEY.isInteractive-20uLObIc.isOpened-p-Ume5l9:active:before,html.theme-dark .button-2ioYhFEY.isInteractive-20uLObIc.isOpened-p-Ume5l9:before{background-color:var(--tv-color-toolbar-button-background-expanded,#2a2e39)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .button-2ioYhFEY.isInteractive-20uLObIc.isOpened-p-Ume5l9:hover:before{background-color:var(--tv-color-toolbar-button-background-expanded,#2a2e39)}}.button-2ioYhFEY.isDisabled-1_tmrLfP{opacity:.3}.button-2ioYhFEY.isDisabled-1_tmrLfP,.button-2ioYhFEY.isDisabled-1_tmrLfP:active{background-color:transparent}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.button-2ioYhFEY.isDisabled-1_tmrLfP:hover{background-color:transparent}}.button-2ioYhFEY.isDisabled-1_tmrLfP.isActive-22S-lGpa{opacity:1;color:var(--tv-color-toolbar-button-text-active,#2196f3)}html.theme-sa .button-2ioYhFEY.isDisabled-1_tmrLfP.isActive-22S-lGpa{color:var(--tv-color-toolbar-button-text-active,#ff7200)}html.theme-dark .button-2ioYhFEY.isDisabled-1_tmrLfP.isActive-22S-lGpa{color:var(--tv-color-toolbar-button-text-active,#1976d2)}.icon-beK_KS0k+.text-1sK7vbvh,.text-1sK7vbvh+.icon-beK_KS0k{margin-right:2px} \ No newline at end of file diff --git a/public/charting_library/bundles/44.41a84319e3fd92e98c79.js b/public/charting_library/bundles/44.41a84319e3fd92e98c79.js new file mode 100644 index 00000000..19f6a4a3 --- /dev/null +++ b/public/charting_library/bundles/44.41a84319e3fd92e98c79.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[44],[]]); \ No newline at end of file diff --git a/public/charting_library/bundles/44.7ec72ee1a8a8ef96dbc9.css b/public/charting_library/bundles/44.7ec72ee1a8a8ef96dbc9.css new file mode 100644 index 00000000..a7837e16 --- /dev/null +++ b/public/charting_library/bundles/44.7ec72ee1a8a8ef96dbc9.css @@ -0,0 +1 @@ +.wrap-5DN0XnS4{position:relative;direction:ltr;width:100%;height:100%;overflow:hidden}.wrap-5DN0XnS4 svg{display:block}.wrapWithArrowsOuting-1OPNi0IP{width:calc(100% - 40px);margin-left:auto;margin-right:auto;overflow:visible}.wrapOverflow-2FHnhKaN{overflow:hidden;width:100%}.scrollWrap-nAnkzkWd{position:relative;width:100%;height:100%;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch}.scrollWrap-nAnkzkWd::-webkit-scrollbar{width:5px;height:5px}.scrollWrap-nAnkzkWd::-webkit-scrollbar-thumb{border:1px solid;border-color:#f1f3f6;border-radius:3px;background-color:#9598a1}html.theme-dark .scrollWrap-nAnkzkWd::-webkit-scrollbar-thumb{background-color:#363a45;border-color:#1e222d}.scrollWrap-nAnkzkWd::-webkit-scrollbar-track{background-color:transparent;border-radius:3px}.scrollWrap-nAnkzkWd::-webkit-scrollbar-corner{display:none}.scrollWrap-nAnkzkWd.noScrollBar-34JzryqI{padding-bottom:100px;margin-bottom:-100px;-ms-overflow-style:none}.scrollWrap-nAnkzkWd.noScrollBar-34JzryqI.sb-scrollbar-wrap{display:none}.scrollWrap-nAnkzkWd.noScrollBar-34JzryqI::-webkit-scrollbar{display:none;width:0;height:0}.scrollWrap-nAnkzkWd.noScrollBar-34JzryqI::-webkit-scrollbar-thumb,.scrollWrap-nAnkzkWd.noScrollBar-34JzryqI::-webkit-scrollbar-track{display:none}.scrollWrap-nAnkzkWd.noScrollBar-34JzryqI::-webkit-scrollbar-corner{display:none}.icon-1nfNqIRh{display:block;transition:transform 60ms ease}.scrollLeft-2cl_k1e7,.scrollRight-2SEqCpTf{display:flex;position:absolute;top:0;height:100%;width:24px;background-color:rgba(30,34,45,.6);color:#fff;transition:background-color .35s ease,transform .11666667s cubic-bezier(.55,.055,.675,.19);flex-direction:column;justify-content:center;align-items:center;overflow:hidden}html.theme-dark .scrollLeft-2cl_k1e7,html.theme-dark .scrollRight-2SEqCpTf{color:#fff;background-color:hsla(227,6%,44%,.6)}.scrollLeft-2cl_k1e7:active,.scrollRight-2SEqCpTf:active{transition:background-color 58.33333ms ease,transform .11666667s cubic-bezier(.215,.61,.355,1)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.scrollLeft-2cl_k1e7:hover,.scrollRight-2SEqCpTf:hover{transition:background-color 58.33333ms ease,transform .11666667s cubic-bezier(.215,.61,.355,1)}}.scrollLeft-2cl_k1e7:active .icon-1nfNqIRh,.scrollRight-2SEqCpTf:active .icon-1nfNqIRh{transform:translateY(1px)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.scrollLeft-2cl_k1e7:hover .icon-1nfNqIRh,.scrollRight-2SEqCpTf:hover .icon-1nfNqIRh{transform:translateY(1px)}}.scrollLeft-2cl_k1e7.isVisible-Stm3XOHb,.scrollRight-2SEqCpTf.isVisible-Stm3XOHb{transform:translateX(0);transition-timing-function:cubic-bezier(.215,.61,.355,1)}.scrollLeft-2cl_k1e7{left:0;transform:translateX(-100%)}.scrollLeft-2cl_k1e7 .iconWrap-1E4GEP7h{transform:rotate(90deg)}.scrollRight-2SEqCpTf{right:0;transform:translateX(100%)}.scrollRight-2SEqCpTf .iconWrap-1E4GEP7h{transform:rotate(-90deg)}.fadeLeft-244lj3pA,.fadeRight-1JnS42hI{position:absolute;pointer-events:none;width:50px;height:100%;top:0}.fadeLeft-244lj3pA.isVisible-Stm3XOHb,.fadeRight-1JnS42hI.isVisible-Stm3XOHb{transform:translateX(0);transition-timing-function:cubic-bezier(.215,.61,.355,1)}.fadeLeft-244lj3pA{left:0;background-image:linear-gradient(270deg,hsla(0,0%,100%,0),#fff);transform:translateX(-100%)}html.theme-dark .fadeLeft-244lj3pA{background-image:linear-gradient(270deg,rgba(19,23,34,0),#131722)}.fadeRight-1JnS42hI{right:0;background-image:linear-gradient(90deg,hsla(0,0%,100%,0),#fff);transform:translateX(100%)}html.theme-dark .fadeRight-1JnS42hI{background-image:linear-gradient(90deg,rgba(19,23,34,0),#131722)} \ No newline at end of file diff --git a/public/charting_library/bundles/44.7ec72ee1a8a8ef96dbc9.rtl.css b/public/charting_library/bundles/44.7ec72ee1a8a8ef96dbc9.rtl.css new file mode 100644 index 00000000..9aebd081 --- /dev/null +++ b/public/charting_library/bundles/44.7ec72ee1a8a8ef96dbc9.rtl.css @@ -0,0 +1 @@ +.wrap-5DN0XnS4{position:relative;direction:rtl;width:100%;height:100%;overflow:hidden}.wrap-5DN0XnS4 svg{display:block}.wrapWithArrowsOuting-1OPNi0IP{width:calc(100% - 40px);margin-right:auto;margin-left:auto;overflow:visible}.wrapOverflow-2FHnhKaN{overflow:hidden;width:100%}.scrollWrap-nAnkzkWd{position:relative;width:100%;height:100%;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch}.scrollWrap-nAnkzkWd::-webkit-scrollbar{width:5px;height:5px}.scrollWrap-nAnkzkWd::-webkit-scrollbar-thumb{border:1px solid;border-color:#f1f3f6;border-radius:3px;background-color:#9598a1}html.theme-dark .scrollWrap-nAnkzkWd::-webkit-scrollbar-thumb{background-color:#363a45;border-color:#1e222d}.scrollWrap-nAnkzkWd::-webkit-scrollbar-track{background-color:transparent;border-radius:3px}.scrollWrap-nAnkzkWd::-webkit-scrollbar-corner{display:none}.scrollWrap-nAnkzkWd.noScrollBar-34JzryqI{padding-bottom:100px;margin-bottom:-100px;-ms-overflow-style:none}.scrollWrap-nAnkzkWd.noScrollBar-34JzryqI.sb-scrollbar-wrap{display:none}.scrollWrap-nAnkzkWd.noScrollBar-34JzryqI::-webkit-scrollbar{display:none;width:0;height:0}.scrollWrap-nAnkzkWd.noScrollBar-34JzryqI::-webkit-scrollbar-thumb,.scrollWrap-nAnkzkWd.noScrollBar-34JzryqI::-webkit-scrollbar-track{display:none}.scrollWrap-nAnkzkWd.noScrollBar-34JzryqI::-webkit-scrollbar-corner{display:none}.icon-1nfNqIRh{display:block;transition:transform 60ms ease}.scrollLeft-2cl_k1e7,.scrollRight-2SEqCpTf{display:flex;position:absolute;top:0;height:100%;width:24px;background-color:rgba(30,34,45,.6);color:#fff;transition:background-color .35s ease,transform .11666667s cubic-bezier(.55,.055,.675,.19);flex-direction:column;justify-content:center;align-items:center;overflow:hidden}html.theme-dark .scrollLeft-2cl_k1e7,html.theme-dark .scrollRight-2SEqCpTf{color:#fff;background-color:hsla(227,6%,44%,.6)}.scrollLeft-2cl_k1e7:active,.scrollRight-2SEqCpTf:active{transition:background-color 58.33333ms ease,transform .11666667s cubic-bezier(.215,.61,.355,1)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.scrollLeft-2cl_k1e7:hover,.scrollRight-2SEqCpTf:hover{transition:background-color 58.33333ms ease,transform .11666667s cubic-bezier(.215,.61,.355,1)}}.scrollLeft-2cl_k1e7:active .icon-1nfNqIRh,.scrollRight-2SEqCpTf:active .icon-1nfNqIRh{transform:translateY(1px)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.scrollLeft-2cl_k1e7:hover .icon-1nfNqIRh,.scrollRight-2SEqCpTf:hover .icon-1nfNqIRh{transform:translateY(1px)}}.scrollLeft-2cl_k1e7.isVisible-Stm3XOHb,.scrollRight-2SEqCpTf.isVisible-Stm3XOHb{transform:translateX(0);transition-timing-function:cubic-bezier(.215,.61,.355,1)}.scrollLeft-2cl_k1e7{left:0;transform:translateX(-100%)}.scrollLeft-2cl_k1e7 .iconWrap-1E4GEP7h{transform:rotate(90deg)}.scrollRight-2SEqCpTf{right:0;transform:translateX(100%)}.scrollRight-2SEqCpTf .iconWrap-1E4GEP7h{transform:rotate(-90deg)}.fadeLeft-244lj3pA,.fadeRight-1JnS42hI{position:absolute;pointer-events:none;width:50px;height:100%;top:0}.fadeLeft-244lj3pA.isVisible-Stm3XOHb,.fadeRight-1JnS42hI.isVisible-Stm3XOHb{transform:translateX(0);transition-timing-function:cubic-bezier(.215,.61,.355,1)}.fadeLeft-244lj3pA{right:0;background-image:linear-gradient(90deg,hsla(0,0%,100%,0),#fff);transform:translateX(100%)}html.theme-dark .fadeLeft-244lj3pA{background-image:linear-gradient(90deg,rgba(19,23,34,0),#131722)}.fadeRight-1JnS42hI{left:0;background-image:linear-gradient(270deg,hsla(0,0%,100%,0),#fff);transform:translateX(-100%)}html.theme-dark .fadeRight-1JnS42hI{background-image:linear-gradient(270deg,rgba(19,23,34,0),#131722)} \ No newline at end of file diff --git a/public/charting_library/bundles/45.11bad41d3b9230cd2771.js b/public/charting_library/bundles/45.11bad41d3b9230cd2771.js new file mode 100644 index 00000000..da06bc1a --- /dev/null +++ b/public/charting_library/bundles/45.11bad41d3b9230cd2771.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[45],[]]); \ No newline at end of file diff --git a/public/charting_library/bundles/45.71eab448131944179f76.css b/public/charting_library/bundles/45.71eab448131944179f76.css new file mode 100644 index 00000000..da69183a --- /dev/null +++ b/public/charting_library/bundles/45.71eab448131944179f76.css @@ -0,0 +1 @@ +.tabs-1LGqoVz6{display:flex;position:relative;width:100%}.tab-1Yr0rq0J{flex:1 1;padding:13px 0;-webkit-user-select:none;user-select:none;text-align:center;border-bottom:1px solid;border-color:#e0e3eb;transition:color .35s ease;color:#131722}html.theme-dark .tab-1Yr0rq0J{color:#d1d4dc;border-color:#434651}.tab-1Yr0rq0J.noBorder-oc3HwerO{border-bottom:0}.tab-1Yr0rq0J.disabled-s8cEYElA{color:#eceff2}.tab-1Yr0rq0J.active-37sipdzm{color:#2196f3}html.theme-dark .tab-1Yr0rq0J.active-37sipdzm{color:#1976d2}.defaultCursor-Np9BHjTg{cursor:default}.slider-1-X4lOmE{position:absolute;bottom:0;left:0;height:3px;background-color:#2196f3;transition-timing-function:cubic-bezier(.215,.61,.355,1)}html.theme-dark .slider-1-X4lOmE{background-color:#1976d2}.content-2asssfGq{width:100%} \ No newline at end of file diff --git a/public/charting_library/bundles/45.71eab448131944179f76.rtl.css b/public/charting_library/bundles/45.71eab448131944179f76.rtl.css new file mode 100644 index 00000000..da69183a --- /dev/null +++ b/public/charting_library/bundles/45.71eab448131944179f76.rtl.css @@ -0,0 +1 @@ +.tabs-1LGqoVz6{display:flex;position:relative;width:100%}.tab-1Yr0rq0J{flex:1 1;padding:13px 0;-webkit-user-select:none;user-select:none;text-align:center;border-bottom:1px solid;border-color:#e0e3eb;transition:color .35s ease;color:#131722}html.theme-dark .tab-1Yr0rq0J{color:#d1d4dc;border-color:#434651}.tab-1Yr0rq0J.noBorder-oc3HwerO{border-bottom:0}.tab-1Yr0rq0J.disabled-s8cEYElA{color:#eceff2}.tab-1Yr0rq0J.active-37sipdzm{color:#2196f3}html.theme-dark .tab-1Yr0rq0J.active-37sipdzm{color:#1976d2}.defaultCursor-Np9BHjTg{cursor:default}.slider-1-X4lOmE{position:absolute;bottom:0;left:0;height:3px;background-color:#2196f3;transition-timing-function:cubic-bezier(.215,.61,.355,1)}html.theme-dark .slider-1-X4lOmE{background-color:#1976d2}.content-2asssfGq{width:100%} \ No newline at end of file diff --git a/public/charting_library/bundles/46.6614f1d452109bd0ef6a.js b/public/charting_library/bundles/46.6614f1d452109bd0ef6a.js new file mode 100644 index 00000000..9802a138 --- /dev/null +++ b/public/charting_library/bundles/46.6614f1d452109bd0ef6a.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[46],[]]); \ No newline at end of file diff --git a/public/charting_library/bundles/46.fc24c2c028c08753d55b.css b/public/charting_library/bundles/46.fc24c2c028c08753d55b.css new file mode 100644 index 00000000..d8fd6e94 --- /dev/null +++ b/public/charting_library/bundles/46.fc24c2c028c08753d55b.css @@ -0,0 +1 @@ +.icon-3yfDkFjY{display:flex;flex-direction:row;align-items:center;transition:transform .35s cubic-bezier(.175,.885,.32,1.275)}.icon-3yfDkFjY svg{display:block;fill:currentColor;width:8px;height:4px}.icon-3yfDkFjY.dropped-50rfOQ8V{transform:rotate(180deg)} \ No newline at end of file diff --git a/public/charting_library/bundles/46.fc24c2c028c08753d55b.rtl.css b/public/charting_library/bundles/46.fc24c2c028c08753d55b.rtl.css new file mode 100644 index 00000000..0e83f99e --- /dev/null +++ b/public/charting_library/bundles/46.fc24c2c028c08753d55b.rtl.css @@ -0,0 +1 @@ +.icon-3yfDkFjY{display:flex;flex-direction:row;align-items:center;transition:transform .35s cubic-bezier(.175,.885,.32,1.275)}.icon-3yfDkFjY svg{display:block;fill:currentColor;width:8px;height:4px}.icon-3yfDkFjY.dropped-50rfOQ8V{transform:rotate(-180deg)} \ No newline at end of file diff --git a/public/charting_library/bundles/47.bd5957415fc28f83be44.js b/public/charting_library/bundles/47.bd5957415fc28f83be44.js new file mode 100644 index 00000000..26e2b961 --- /dev/null +++ b/public/charting_library/bundles/47.bd5957415fc28f83be44.js @@ -0,0 +1,34 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[47],{"0Ez2":function(o,e){o.exports=''},"0Q2B":function(o,e){o.exports=''},"11T/":function(o,e){o.exports=''},"2dtg":function(o,e){ +o.exports=''},"2fn7":function(o,e){o.exports=''},"2gmH":function(o,e){o.exports=''},"2lje":function(o,e){o.exports=''},"39u9":function(o,e){ +o.exports=''},"3s8f":function(o,e){o.exports=''},"4+EX":function(o,e){o.exports=''},"43BO":function(o,e){o.exports=''},"43aP":function(o,e){ +o.exports=''},"4rDL":function(o,e){o.exports=''},"6oLA":function(o,e){o.exports=''},"7jlp":function(o,e){ +o.exports=''},"82rr":function(o,e){o.exports=''},"8I/E":function(o,e){o.exports=''},"9QR3":function(o,e){o.exports=''},"9wu9":function(o,e){o.exports=''},Awez:function(o,e){ +o.exports=''},BZH7:function(o,e){o.exports=''},Csdk:function(o,e){o.exports=''},D1H9:function(o,e){o.exports=''},EWkI:function(o,e){o.exports=''},EyuB:function(o,e){ +o.exports=''},FVBd:function(o,e){o.exports=''},G1jy:function(o,e){o.exports=''},G3Kc:function(o,e){ +o.exports=''},Ijvb:function(o,e,l){"use strict";l.d(e,"a",(function(){return t}));var t={SyncDrawing:l("G1jy"),arrow:l("tceb"),cursor:l("WHEt"),dot:l("Csdk"),drawginmode:l("2dtg"),drawginmodeActive:l("FVBd"),eraser:l("2lje"),group:l("lZXH"),hideAllDrawings:l("6oLA"),hideAllDrawingsActive:l("dmHa"),lockAllDrawings:l("Uh5y"),lockAllDrawingsActive:l("43BO"),magnet:l("3s8f"),strongMagnet:l("xjKU"),measure:l("oCKS"),removeAllDrawingTools:l("aVjL"),showObjectTree:l("qQ3E"),zoom:l("kmdM"),"zoom-out":l("mbEK")}},JEPD:function(o,e){o.exports=''},JR4H:function(o,e){ +o.exports=''},JsLp:function(o,e){o.exports=''},M4my:function(o,e){ +o.exports=''},"MP+M":function(o,e,l){"use strict";l("YFKU");var t=l("+GxX"),i=l("/DW5"),n=(l("HbRj"),{LineTool5PointsPattern:l("JR4H"),LineToolABCD:l("yeNt"),LineToolArc:l("XSJB"),LineToolArrow:l("nkas"),LineToolArrowMarker:l("l833"),LineToolArrowMarkDown:l("o7ef"),LineToolArrowMarkLeft:l("JEPD"),LineToolArrowMarkRight:l("pQ6k"),LineToolArrowMarkUp:l("chXN"),LineToolBalloon:l("Y3NG"),LineToolBarsPattern:l("Awez"),LineToolBezierCubic:l("VSwc"),LineToolBezierQuadro:l("po04"),LineToolBrush:l("WF4l"),LineToolCallout:l("7jlp"),LineToolCircleLines:l("4+EX"),LineToolCypherPattern:l("yppm"),LineToolDateAndPriceRange:l("BZH7"),LineToolDateRange:l("D1H9"),LineToolDisjointAngle:l("mDnV"),LineToolElliottCorrection:l("cv0m"),LineToolElliottDoubleCombo:l("gtlc"),LineToolElliottImpulse:l("W3cW"),LineToolElliottTriangle:l("N98A"),LineToolElliottTripleCombo:l("TyyN"),LineToolEllipse:l("4rDL"),LineToolExtended:l("S2na"),LineToolFibChannel:l("M4my"),LineToolFibCircles:l("hL0p"),LineToolFibRetracement:l("fhJv"),LineToolFibSpeedResistanceArcs:l("39u9"),LineToolFibSpeedResistanceFan:l("9QR3"),LineToolFibSpiral:l("eKNX"),LineToolFibTimeZone:l("xIA3"),LineToolFibWedge:l("0Q2B"),LineToolFlagMark:l("82rr"),LineToolFlatBottom:l("EyuB"),LineToolAnchoredVWAP:"",LineToolGannComplex:l("W0qL"),LineToolGannFixed:l("V53V"),LineToolGannFan:l("11T/"),LineToolGannSquare:l("8I/E"),LineToolGhostFeed:l("JsLp"),LineToolHeadAndShoulders:l("jqYn"),LineToolHorzLine:l("V9Qq"),LineToolHorzRay:l("qSes"),LineToolIcon:"icon",LineToolInsidePitchfork:l("2fn7"),LineToolNote:l("0Ez2"),LineToolNoteAbsolute:l("2gmH"),LineToolParallelChannel:l("P8r3"),LineToolPitchfan:l("iaAB"),LineToolPitchfork:l("43aP"),LineToolPolyline:l("XkCl"),LineToolPath:l("yk2I"),LineToolPrediction:l("Z6JI"),LineToolPriceLabel:l("RxfQ"),LineToolPriceRange:l("v23R"),LineToolProjection:l("EWkI"),LineToolRay:l("NKMx"),LineToolRectangle:l("a/b0"),LineToolRegressionTrend:"",LineToolRiskRewardLong:l("tD/+"),LineToolRiskRewardShort:l("G3Kc"),LineToolRotatedRectangle:l("y6kn"),LineToolSchiffPitchfork:l("zQJQ"),LineToolSchiffPitchfork2:l("qXlY"),LineToolSineLine:l("wemi"),LineToolText:l("w++H"),LineToolTextAbsolute:l("exgs"),LineToolThreeDrivers:l("e4c6"),LineToolTimeCycles:l("Yo3o"), +LineToolTrendAngle:l("mD8t"),LineToolTrendBasedFibExtension:l("v+GK"),LineToolTrendBasedFibTime:l("tdX5"),LineToolTrendLine:l("oIsX"),LineToolInfoLine:l("b5Ss"),LineToolTriangle:l("9wu9"),LineToolTrianglePattern:l("O4df"),LineToolVertLine:l("Ukrx"),LineToolCrossLine:l("v030")}),h=l("Ijvb");l.d(e,"a",(function(){return z}));var r={keys:["Shift"],text:window.t("{0} — drawing a straight line at angles of 45")},c={keys:["Shift"],text:window.t("{0} — circle")},s={keys:["Shift"],text:window.t("{0} — square")},z={LineTool5PointsPattern:{icon:n.LineTool5PointsPattern,localizedName:window.t("XABCD Pattern")},LineToolABCD:{icon:n.LineToolABCD,localizedName:window.t("ABCD Pattern")},LineToolArc:{icon:n.LineToolArc,localizedName:window.t("Arc")},LineToolArrow:{icon:n.LineToolArrow,localizedName:window.t("Arrow")},LineToolArrowMarkDown:{icon:n.LineToolArrowMarkDown,localizedName:window.t("Arrow Mark Down")},LineToolArrowMarkLeft:{icon:n.LineToolArrowMarkLeft,localizedName:window.t("Arrow Mark Left")},LineToolArrowMarkRight:{icon:n.LineToolArrowMarkRight,localizedName:window.t("Arrow Mark Right")},LineToolArrowMarkUp:{icon:n.LineToolArrowMarkUp,localizedName:window.t("Arrow Mark Up")},LineToolBalloon:{icon:n.LineToolBalloon,localizedName:window.t("Balloon")},LineToolBarsPattern:{icon:n.LineToolBarsPattern,localizedName:window.t("Bars Pattern")},LineToolBezierCubic:{icon:n.LineToolBezierCubic,localizedName:window.t("Double Curve")},LineToolBezierQuadro:{icon:n.LineToolBezierQuadro,localizedName:window.t("Curve")},LineToolBrush:{icon:n.LineToolBrush,localizedName:window.t("Brush")},LineToolCallout:{icon:n.LineToolCallout,localizedName:window.t("Callout")},LineToolCircleLines:{icon:n.LineToolCircleLines,localizedName:window.t("Cyclic Lines")},LineToolCypherPattern:{icon:n.LineToolCypherPattern,localizedName:window.t("Cypher Pattern")},LineToolDateAndPriceRange:{icon:n.LineToolDateAndPriceRange,localizedName:window.t("Date and Price Range")},LineToolDateRange:{icon:n.LineToolDateRange,localizedName:window.t("Date Range")},LineToolDisjointAngle:{icon:n.LineToolDisjointAngle,localizedName:window.t("Disjoint Channel"),hotKey:Object(i.b)(r)},LineToolElliottCorrection:{icon:n.LineToolElliottCorrection,localizedName:window.t("Elliott Correction Wave (ABC)")},LineToolElliottDoubleCombo:{icon:n.LineToolElliottDoubleCombo,localizedName:window.t("Elliott Double Combo Wave (WXY)")},LineToolElliottImpulse:{icon:n.LineToolElliottImpulse,localizedName:window.t("Elliott Impulse Wave (12345)")},LineToolElliottTriangle:{icon:n.LineToolElliottTriangle,localizedName:window.t("Elliott Triangle Wave (ABCDE)")},LineToolElliottTripleCombo:{icon:n.LineToolElliottTripleCombo,localizedName:window.t("Elliott Triple Combo Wave (WXYXZ)")},LineToolEllipse:{icon:n.LineToolEllipse,localizedName:window.t("Ellipse"),hotKey:Object(i.b)(c)},LineToolExtended:{icon:n.LineToolExtended,localizedName:window.t("Extended")},LineToolFibChannel:{icon:n.LineToolFibChannel,localizedName:window.t("Fib Channel")},LineToolFibCircles:{icon:n.LineToolFibCircles, +localizedName:window.t("Fib Circles"),hotKey:Object(i.b)(c)},LineToolFibRetracement:{icon:n.LineToolFibRetracement,localizedName:window.t("Fib Retracement")},LineToolFibSpeedResistanceArcs:{icon:n.LineToolFibSpeedResistanceArcs,localizedName:window.t("Fib Speed Resistance Arcs")},LineToolFibSpeedResistanceFan:{icon:n.LineToolFibSpeedResistanceFan,localizedName:window.t("Fib Speed Resistance Fan"),hotKey:Object(i.b)(s)},LineToolFibSpiral:{icon:n.LineToolFibSpiral,localizedName:window.t("Fib Spiral")},LineToolFibTimeZone:{icon:n.LineToolFibTimeZone,localizedName:window.t("Fib Time Zone")},LineToolFibWedge:{icon:n.LineToolFibWedge,localizedName:window.t("Fib Wedge")},LineToolFlagMark:{icon:n.LineToolFlagMark,localizedName:window.t("Flag Mark")},LineToolFlatBottom:{icon:n.LineToolFlatBottom,localizedName:window.t("Flat Top/Bottom"),hotKey:Object(i.b)(r)},LineToolAnchoredVWAP:{icon:n.LineToolAnchoredVWAP,localizedName:window.t("Anchored VWAP")},LineToolGannComplex:{icon:n.LineToolGannComplex,localizedName:window.t("Gann Square")},LineToolGannFixed:{icon:n.LineToolGannFixed,localizedName:window.t("Gann Square Fixed")},LineToolGannFan:{icon:n.LineToolGannFan,localizedName:window.t("Gann Fan")},LineToolGannSquare:{icon:n.LineToolGannSquare,localizedName:window.t("Gann Box"),hotKey:Object(i.b)({keys:["Shift"],text:window.t("{0} — fixed increments")})},LineToolHeadAndShoulders:{icon:n.LineToolHeadAndShoulders,localizedName:window.t("Head and Shoulders")},LineToolHorzLine:{icon:n.LineToolHorzLine,localizedName:window.t("Horizontal Line"),hotKey:Object(i.b)({keys:["Alt","H"],text:"{0} + {1}"})},LineToolHorzRay:{icon:n.LineToolHorzRay,localizedName:window.t("Horizontal Ray")},LineToolIcon:{icon:n.LineToolIcon,localizedName:window.t("Font Icons")},LineToolInsidePitchfork:{icon:n.LineToolInsidePitchfork,localizedName:window.t("Inside Pitchfork")},LineToolNote:{icon:n.LineToolNote,localizedName:window.t("Note")},LineToolNoteAbsolute:{icon:n.LineToolNoteAbsolute,localizedName:window.t("Anchored Note")},LineToolParallelChannel:{icon:n.LineToolParallelChannel,localizedName:window.t("Parallel Channel"),hotKey:Object(i.b)(r)},LineToolPitchfan:{icon:n.LineToolPitchfan,localizedName:window.t("Pitchfan")},LineToolPitchfork:{icon:n.LineToolPitchfork,localizedName:window.t("Pitchfork")},LineToolPolyline:{icon:n.LineToolPolyline,localizedName:window.t("Polyline")},LineToolPath:{icon:n.LineToolPath,localizedName:window.t("Path")},LineToolPrediction:{icon:n.LineToolPrediction,localizedName:window.t("Forecast")},LineToolPriceLabel:{icon:n.LineToolPriceLabel,localizedName:window.t("Price Label")},LineToolArrowMarker:{icon:n.LineToolArrowMarker,localizedName:window.t("Arrow Marker")},LineToolPriceRange:{icon:n.LineToolPriceRange,localizedName:window.t("Price Range")},LineToolProjection:{icon:n.LineToolProjection,localizedName:window.t("Projection")},LineToolRay:{icon:n.LineToolRay,localizedName:window.t("Ray")},LineToolRectangle:{icon:n.LineToolRectangle,localizedName:window.t("Rectangle"),hotKey:Object(i.b)({keys:["Shift"], +text:window.t("{0} — square")})},LineToolRegressionTrend:{icon:n.LineToolRegressionTrend,localizedName:window.t("Regression Trend")},LineToolRiskRewardLong:{icon:n.LineToolRiskRewardLong,localizedName:window.t("Long Position")},LineToolRiskRewardShort:{icon:n.LineToolRiskRewardShort,localizedName:window.t("Short Position")},LineToolRotatedRectangle:{icon:n.LineToolRotatedRectangle,localizedName:window.t("Rotated Rectangle"),hotKey:Object(i.b)(r)},LineToolSchiffPitchfork:{icon:n.LineToolSchiffPitchfork,localizedName:window.t("Modified Schiff Pitchfork")},LineToolSchiffPitchfork2:{icon:n.LineToolSchiffPitchfork2,localizedName:window.t("Schiff Pitchfork")},LineToolSineLine:{icon:n.LineToolSineLine,localizedName:window.t("Sine Line")},LineToolText:{icon:n.LineToolText,localizedName:window.t("Text",{context:"tool"})},LineToolTextAbsolute:{icon:n.LineToolTextAbsolute,localizedName:window.t("Anchored Text")},LineToolThreeDrivers:{icon:n.LineToolThreeDrivers,localizedName:window.t("Three Drives Pattern")},LineToolTimeCycles:{icon:n.LineToolTimeCycles,localizedName:window.t("Time Cycles")},LineToolTrendAngle:{icon:n.LineToolTrendAngle,localizedName:window.t("Trend Angle"),hotKey:Object(i.b)(r)},LineToolTrendBasedFibExtension:{icon:n.LineToolTrendBasedFibExtension,localizedName:window.t("Trend-Based Fib Extension")},LineToolTrendBasedFibTime:{icon:n.LineToolTrendBasedFibTime,localizedName:window.t("Trend-Based Fib Time")},LineToolTrendLine:{icon:n.LineToolTrendLine,localizedName:window.t("Trend Line"),hotKey:Object(i.b)(r)},LineToolInfoLine:{icon:n.LineToolInfoLine,localizedName:window.t("Info Line")},LineToolTriangle:{icon:n.LineToolTriangle,localizedName:window.t("Triangle")},LineToolTrianglePattern:{icon:n.LineToolTrianglePattern,localizedName:window.t("Triangle Pattern")},LineToolVertLine:{icon:n.LineToolVertLine,localizedName:window.t("Vertical Line"),hotKey:Object(i.b)({keys:["Alt","V"],text:"{0} + {1}"})},LineToolCrossLine:{icon:n.LineToolCrossLine,localizedName:$.t("Cross Line")},SyncDrawing:{icon:h.a.SyncDrawing,iconActive:h.a.SyncDrawingActive,localizedName:window.t("New drawings are replicated to all charts in the layout and shown when the same ticker is selected")},arrow:{icon:h.a.arrow,localizedName:window.t("Arrow")},cursor:{icon:h.a.cursor,localizedName:window.t("Cross")},dot:{icon:h.a.dot,localizedName:window.t("Dot")},drawginmode:{icon:h.a.drawginmode,iconActive:h.a.drawginmodeActive,localizedName:window.t("Stay in Drawing Mode")},eraser:{icon:h.a.eraser,localizedName:window.t("Eraser")},group:{icon:h.a.group,localizedName:window.t("Show Hidden Tools")},hideAllDrawings:{icon:h.a.hideAllDrawings,iconActive:h.a.hideAllDrawingsActive,localizedName:window.t("Hide All Drawing Tools"),hotKey:Object(i.b)({keys:["Ctrl","Alt","H"],text:"{0} + {1} + {2}"})},lockAllDrawings:{icon:h.a.lockAllDrawings,iconActive:h.a.lockAllDrawingsActive,localizedName:window.t("Lock All Drawing Tools")},magnet:{icon:h.a.magnet,localizedName:window.t("Magnet Mode snaps drawings placed near price bars to the closest OHLC value"), +hotKey:Object(i.b)({keys:["Ctrl"],text:"{0}"})},measure:{icon:h.a.measure,localizedName:window.t("Measure"),hotKey:Object(i.b)({keys:["Shift"],text:window.t("{0} + Click on the chart")})},removeAllDrawingTools:{icon:h.a.removeAllDrawingTools,localizedName:window.t("Remove Drawings")},showObjectsTree:{icon:h.a.showObjectTree,localizedName:window.t("Show Object Tree")},zoom:{icon:h.a.zoom,localizedName:window.t("Zoom In")},"zoom-out":{icon:h.a["zoom-out"],localizedName:window.t("Zoom Out")}};Object(t.isFeatureEnabled)("remove-line-tool-ghost-feed")||(z.LineToolGhostFeed={icon:n.LineToolGhostFeed,localizedName:window.t("Ghost Feed")})},N98A:function(o,e){o.exports=''},NKMx:function(o,e){o.exports=''},O4df:function(o,e){ +o.exports=''},P8r3:function(o,e){o.exports=''},RxfQ:function(o,e){o.exports=''},S2na:function(o,e){ +o.exports=''},TyyN:function(o,e){o.exports=''},Uh5y:function(o,e){o.exports=''},Ukrx:function(o,e){o.exports=''},V53V:function(o,e){o.exports=''}, +V9Qq:function(o,e){o.exports=''},VSwc:function(o,e){o.exports=''},W0qL:function(o,e){o.exports=''},W3cW:function(o,e){ +o.exports=''},WF4l:function(o,e){o.exports=''},WHEt:function(o,e){o.exports=''},XSJB:function(o,e){ +o.exports=''},XkCl:function(o,e){o.exports=''},Y3NG:function(o,e){o.exports=''},Yo3o:function(o,e){ +o.exports=''},Z6JI:function(o,e){o.exports=''},"a/b0":function(o,e){o.exports=''},aVjL:function(o,e){o.exports=''},b2d7:function(o,e,l){"use strict";l.d(e,"a",(function(){return i}));var t,i,n=l("aIyQ"),h=l.n(n),r=l("Vdly");!function(o){function e(){o.favorites=[], +Object(r.getJSON)("chart.favoriteDrawings",[]).forEach((function(e){o.favorites.push(e.tool||e)})),o.favoritesSynced.fire()}o.favorites=[],o.favoritesSynced=new h.a,o.favoriteIndex=function(e){return o.favorites.indexOf(e)},o.saveFavorites=function(){Object(r.setJSON)("chart.favoriteDrawings",o.favorites)},e(),r.onSync.subscribe(null,e)}(t||(t={})),function(o){function e(){return t.favorites.length}function l(o){return-1!==t.favoriteIndex(o)}o.favoriteAdded=new h.a,o.favoriteRemoved=new h.a,o.favoriteMoved=new h.a,o.favoritesSynced=t.favoritesSynced,o.favorites=function(){return t.favorites.slice()},o.favoritesCount=e,o.favorite=function(o){return o<0||o>=e()?"":t.favorites[o]},o.addFavorite=function(e){return!l(e)&&(t.favorites.push(e),t.saveFavorites(),o.favoriteAdded.fire(e),!0)},o.removeFavorite=function(e){var l=t.favoriteIndex(e);return-1!==l&&(t.favorites.splice(l,1),t.saveFavorites(),o.favoriteRemoved.fire(e),!0)},o.isFavorite=l,o.moveFavorite=function(l,i){if(i<0||i>=e())return!1;var n=t.favoriteIndex(l);return-1!==n&&i!==n&&(t.favorites.splice(n,1),t.favorites.splice(i,0,l),t.saveFavorites(),o.favoriteMoved.fire(l,n,i),!0)}}(i||(i={}))},b5Ss:function(o,e){o.exports=''},chXN:function(o,e){o.exports=''},cv0m:function(o,e){ +o.exports=''},dmHa:function(o,e){o.exports=''},e4c6:function(o,e){ +o.exports=''},eKNX:function(o,e){ +o.exports=''},exgs:function(o,e){o.exports=''},fhJv:function(o,e){o.exports=''},gtlc:function(o,e){ +o.exports=''},hL0p:function(o,e){o.exports=''},iaAB:function(o,e){ +o.exports=''},jqYn:function(o,e){o.exports=''},kmdM:function(o,e){ +o.exports=''},l833:function(o,e){o.exports=''},lZXH:function(o,e){o.exports=''},mD8t:function(o,e){o.exports=''},mDnV:function(o,e){ +o.exports=''},mbEK:function(o,e){o.exports=''},nkas:function(o,e){o.exports=''},o7ef:function(o,e){o.exports=''},oCKS:function(o,e){o.exports=''},oIsX:function(o,e){ +o.exports=''},pQ6k:function(o,e){o.exports=''},po04:function(o,e){o.exports=''},qQ3E:function(o,e){o.exports=''},qSes:function(o,e){o.exports=''},qXlY:function(o,e){ +o.exports=''},"tD/+":function(o,e){o.exports=''},tceb:function(o,e){o.exports=''},tdX5:function(o,e){ +o.exports=''},"v+GK":function(o,e){o.exports=''},v030:function(o,e){o.exports=''},v23R:function(o,e){o.exports=''},"w++H":function(o,e){ +o.exports=''},wemi:function(o,e){o.exports=''},xIA3:function(o,e){o.exports=''},xjKU:function(o,e){o.exports=''},y6kn:function(o,e){ +o.exports=''},yeNt:function(o,e){o.exports=''},yk2I:function(o,e){o.exports=''},yppm:function(o,e){ +o.exports=''},zQJQ:function(o,e){o.exports=''}}]); \ No newline at end of file diff --git a/public/charting_library/bundles/48.e25933e0cd7ea6345715.js b/public/charting_library/bundles/48.e25933e0cd7ea6345715.js new file mode 100644 index 00000000..68b8d512 --- /dev/null +++ b/public/charting_library/bundles/48.e25933e0cd7ea6345715.js @@ -0,0 +1,16 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[48],{"+ByK":function(e,t,n){e.exports={itemWrap:"itemWrap-3qF9ynvx",item:"item-112BZuXZ",icon:"icon-2y6cSg4c",selected:"selected-3tUrY97Z",label:"label-1uw3rZaL"}},"4Fxa":function(e,t){e.exports=''},"6w4h":function(e,t,n){e.exports={row:"row-1NK-hr1x",wrap:"wrap-tVR5Scov",breakpointNormal:"breakpointNormal-KzkqSNOX",breakpointMedium:"breakpointMedium-pbm8vBGT",breakpointSmall:"breakpointSmall-32f3vdsC"}},"7EmB":function(e,t,n){e.exports={range:"range-2i0X47Lu",valueInput:"valueInput-2CKQO1Lv",rangeSlider:"rangeSlider-suG521NL",input:"input-2kx6q_pc"}},"8XTa":function(e,t,n){e.exports={lineEndSelect:"lineEndSelect-25TizNST",right:"right-3IlPseCZ"}},"9gev":function(e,t,n){e.exports={dropdown:"dropdown-3Y1U1Nkm",normal:"normal-i7fM20bU",big:"big-2ruaa2z2",dropdownMenu:"dropdownMenu-3UShCdED"}},CHgb:function(e,t,n){"use strict";n.d(t,"c",(function(){return d})),n.d(t,"a",(function(){return p})),n.d(t,"b",(function(){return m}));var a=n("mrSG"),r=n("q1tI"),i=n.n(r),o=n("TSYQ"),l=n.n(o),c=n("H172"),s=n("Iivm"),u=n("+ByK");function d(e){var t=e.menuItemClassName,n=Object(a.__rest)(e,["menuItemClassName"]);return i.a.createElement(c.a,Object(a.__assign)({},n,{menuItemClassName:l()(t,u.itemWrap)}))}function p(e){return i.a.createElement("div",{className:l()(u.item,u.selected)},i.a.createElement(s.Icon,{className:u.icon,icon:e.icon}))}function m(e){return i.a.createElement("div",{className:u.item},i.a.createElement(s.Icon,{className:l()(u.icon,e.iconClassName),icon:e.icon}),i.a.createElement("div",{className:u.label},e.label))}},CaTF:function(e,t,n){e.exports={colorPicker:"colorPicker-3NIIN0Y8",fontStyleButton:"fontStyleButton-1445FY6N",dropdown:"dropdown-5N0LMJdQ",dropdownMenu:"dropdownMenu-yysG7ZzF",textarea:"textarea-2fko2YtQ",normal:"normal-AMDLZbUS",big:"big-1CfoFALo"}},EJl2:function(e,t,n){e.exports={input:"input-DGMBjOG0",control:"control-fEqNtKpC",item:"item-1ym_rlZM",cell:"cell-2byf6BGW",fragmentCell:"fragmentCell-1FhKQVpC",withTitle:"withTitle-QRL8YpBY",title:"title-3K1l5aiR"}},FIOl:function(e,t){e.exports=''},G7lD:function(e,t,n){e.exports={range:"range-46to1pZu",disabled:"disabled-v1pYljFO",rangeSlider:"rangeSlider-10OqoFDT",rangeSliderMiddleWrap:"rangeSliderMiddleWrap-3-EULCcf",rangeSliderMiddle:"rangeSliderMiddle-3BlpfHSS",dragged:"dragged-36bXd7Hw",pointer:"pointer-23eauHul",rangePointerWrap:"rangePointerWrap-1vnhGySq"}},HWhk:function(e,t){ +e.exports=''},J4oI:function(e,t,n){e.exports={lineStyleSelect:"lineStyleSelect-1s1ap44b"}},K5B3:function(e,t,n){e.exports={input:"input-2Cr8E1vs"}},KacW:function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var a=n("mrSG"),r=(n("YFKU"),n("q1tI")),i=n.n(r),o=n("TSYQ"),l=n.n(o),c=n("8Uy/"),s=n("CHgb"),u=n("bQEj"),d=n("UXdH"),p=n("ZSM+"),m=n("J4oI"),f=[{type:c.LINESTYLE_SOLID,icon:u,label:window.t("Line")},{type:c.LINESTYLE_DASHED,icon:d,label:window.t("Dashed Line")},{type:c.LINESTYLE_DOTTED,icon:p,label:window.t("Dotted Line")}];var h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(a.__extends)(t,e),t.prototype.render=function(){var e,t,n=this.props,r=n.lineStyle,o=n.className,c=n.lineStyleChange,u=n.disabled,d=n.additionalItems,p=n.allowedLineStyles,h=(e=p,t=Object(a.__spreadArrays)(f),void 0!==e&&(t=t.filter((function(t){return e.includes(t.type)}))),t.map((function(e){return{value:e.type,selectedContent:i.a.createElement(s.a,{icon:e.icon}),content:i.a.createElement(s.b,{icon:e.icon,label:e.label})}})));return d&&(h=Object(a.__spreadArrays)([{readonly:!0,content:d}],h)),i.a.createElement(s.c,{disabled:u,className:l()(m.lineStyleSelect,o),hideArrowButton:!0,items:h,value:r,onChange:c,"data-name":"line-style-select"})},t}(i.a.PureComponent)},Q40t:function(e,t,n){e.exports={titleWrap:"titleWrap-1bavobjQ"}},To8B:function(e,t){e.exports=''},UXdH:function(e,t){e.exports=''},UXjO:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var a=n("mrSG"),r=n("q1tI"),i=n.n(r),o=n("TSYQ"),l=n.n(o),c=n("H172"),s=n("QpNh"),u=n("z1Uu");function d(e){var t,n=e.fontSize,r=e.fontSizes,o=void 0===r?[]:r,d=e.className,p=e.disabled,m=e.fontSizeChange;return i.a.createElement(c.a,Object(a.__assign)({disabled:p,className:l()(d,u.defaultSelect),menuClassName:u.defaultSelect,items:(t=o,t.map((function(e){return{value:e.value,content:e.title}}))),value:n,onChange:m},Object(s.a)(e)))}},ZRxn:function(e,t,n){e.exports={unit:"unit-b-yYYxjl",input:"input-124DCFwV",normal:"normal-3N4mfpQO",big:"big-1ixMJ1Cb",dropdown:"dropdown-NF5Htz1I",dropdownMenu:"dropdownMenu-36OGqXRr"}},"ZSM+":function(e,t){ +e.exports=''},ZcEB:function(e,t,n){e.exports={dropdown:"dropdown-2xTnctYy",menu:"menu-ZFNz6yWw"}},aSdR:function(e,t,n){e.exports={coordinates:"coordinates-1KIxFYVo",input:"input-1N6PPaVy"}},aw5J:function(e,t,n){e.exports={container:"container-1sHZXWOS",active:"active-2c5C-1Pl",disabled:"disabled-1s7-KBqG",icon:"icon-2ux26WKl"}},bQEj:function(e,t){e.exports=''},bvfV:function(e,t,n){"use strict";var a=n("mrSG"),r=n("q1tI"),i=n.n(r),o=n("HSjo"),l=n("yqnI"),c=function(e){var t="property"in e?e.property:void 0,n="defaultValue"in e?e.defaultValue:e.property.value(),a=Object(r.useState)(t?t.value():n),i=a[0],o=a[1];Object(r.useEffect)((function(){if(t){var n={};return o(t.value()),t.subscribe(n,(function(t){var n=t.value();e.handler&&e.handler(n),o(n)})),function(){return t.unsubscribeAll(n)}}return function(){}}),[t]);return[i,function(e){if(void 0!==t){var n=t.value();l.a.logNormal('Changing property value from "'+n+'" to "'+e+'"'),t.setValue(e)}}]},s=n("Q+1u"),u=n("qFKp"),d=n("fV0y");function p(e){var t=e.property,n=Object(a.__rest)(e,["property"]),r=c({property:t}),o=r[0],l=r[1];return i.a.createElement(d.Checkbox,Object(a.__assign)({},n,{name:"toggle-enabled",checked:o,onChange:function(){l(!o)}}))}var m=n("TSYQ"),f=n.n(m),h=n("eG6P");function b(e){return i.a.createElement("div",{className:f()(h.wrap,e.className)},e.children)}var v=n("vxCt");function g(e){var t=e.property,n=e.disabled,a=e.title,r=e.className,o=e.name,l=i.a.createElement("span",{className:v.title},a);return i.a.createElement(b,{className:r},t&&i.a.createElement(p,{name:o,className:v.checkbox,property:t,disabled:n,label:l,labelAlignBaseline:!u.isIE}),!t&&l)}function E(e){var t=e.id,n=e.offset,a=e.disabled,r=e.checked,o=e.title,l=e.children;return i.a.createElement(s.a.Row,null,i.a.createElement(s.a.Cell,{placement:"first",verticalAlign:"adaptive",offset:n,"data-section-name":t,colSpan:Boolean(l)?void 0:2,checkableTitle:!0},i.a.createElement(g,{name:"is-enabled-"+t,title:o,disabled:a,property:r})),Boolean(l)&&i.a.createElement(s.a.Cell,{placement:"last","data-section-name":t},l))}function y(e){var t=e.definition,n=t.id,a=t.properties,r=a.checked,o=a.disabled,l=t.title,s=e.offset,u=c({property:o,defaultValue:!1})[0];return i.a.createElement(E,{id:n,offset:s,checked:r,title:l,disabled:e.disabled||u})}var _=n("KacW");function w(e){var t=e.property,n=c({property:t}),r=n[0],o=n[1];return i.a.createElement(_.a,Object(a.__assign)({},e,{lineStyle:r,lineStyleChange:o}))}var N=n("H172"),S=n("kJwE"),C=[1,2,3,4];function O(e){var t,n=e.value,a=e.items,r=void 0===a?C:a,o=e.disabled,l=e.onChange;return i.a.createElement(N.a,{disabled:o,hideArrowButton:!0,className:S.lineWidthSelect,items:(t=r,t.map((function(e){return{ +value:e,selectedContent:c(e,!0),content:c(e)}}))),value:n,onChange:l,"data-name":"line-width-select"});function c(e,t){var a,r={borderTopWidth:e};return i.a.createElement("div",{className:S.item},i.a.createElement("div",{className:m(S.bar,(a={},a[S.isActive]=e===n&&!t,a)),style:r}," "))}}function j(e){var t=e.property,n=c({property:t}),r=n[0],o=n[1];return i.a.createElement(O,Object(a.__assign)({},e,{value:r,onChange:o}))}var x=n("nc0P"),k=n("Eyy1");function V(e,t,n){var a=Object(r.useState)(e),i=a[0],o=a[1],l=Object(r.useRef)(i);return Object(r.useEffect)((function(){o(e)}),[e,n]),[i,function(e){l.current=e,o(e)},function(){t(l.current)},function(){l.current=e,o(e)}]}var M=n("/3z9"),T=n("WboT"),I=n("Hr11"),z=n("zXvd");function A(e){var t=e.property,n=Object(a.__rest)(e,["property"]),o=Object(r.useState)(performance.now()),l=o[0],s=o[1],u=c({property:t,handler:function(){return s(performance.now())}}),d=V(u[0],u[1],l);return i.a.createElement(P,Object(a.__assign)({},n,{valueHash:l,sharedBuffer:d}))}function P(e){var t=e.sharedBuffer,n=e.min,o=e.max,l=e.step,c=Object(a.__rest)(e,["sharedBuffer","min","max","step"]),s=t[0],d=t[1],p=t[2],m=t[3],f=Object(r.useRef)(null),h=Object(r.useRef)(null),b={flushed:!1};return i.a.createElement(B,Object(a.__assign)({},c,{ref:h,onValueChange:function(e,t){d(e),"step"!==t||b.flushed||(p(),b.flushed=!0)},onKeyDown:function(e){if(e.defaultPrevented||b.flushed)return;switch(Object(M.hashFromEvent)(e.nativeEvent)){case 27:m(),b.flushed=!0;break;case 13:e.preventDefault();var t=Object(k.ensureNotNull)(h.current).getClampedValue();null!==t&&(d(t),p(),b.flushed=!0)}},onBlur:function(e){var t=Object(k.ensureNotNull)(f.current);if(!t.contains(document.activeElement)&&!t.contains(e.relatedTarget)){var n=Object(k.ensureNotNull)(h.current).getClampedValue();null===n||b.flushed||(d(n),p(),b.flushed=!0)}},value:s,roundByStep:!1,containerReference:function(e){f.current=e},inputMode:u.CheckMobile.iOS()?void 0:"numeric",min:n,max:o,step:l}))}var R={mode:"float",min:-Number.MAX_VALUE,max:Number.MAX_VALUE,step:1,precision:0,inheritPrecisionFromStep:!0},B=function(e){function t(t){var n=e.call(this,t)||this;n._selection=null,n._restoreSelection=!1,n._input=null,n._handleSelectionChange=function(){n._restoreSelection||document.activeElement!==Object(k.ensureNotNull)(n._input)||n._saveSelection(Object(k.ensureNotNull)(n._input))},n._handleInputReference=function(e){n._input=e,n.props.inputReference&&n.props.inputReference(e)},n._onFocus=function(e){n._saveSelection(Object(k.ensureNotNull)(n._input)),n.setState({focused:!0}),n.props.onFocus&&n.props.onFocus(e)},n._onBlur=function(e){n._selection=null,n.setState({displayValue:D(n.props,n.props.value,W(n.props)),focused:!1}),n.props.onBlur&&n.props.onBlur(e)},n._onValueChange=function(e){var t,a,r=e.currentTarget,i=r.value,o=function(e,t,n){switch(n){case"integer":return F.test(t)?t:e;case"float":return t=t.replace(/,/g,"."),L.test(t)?t:e}}(n.state.displayValue,i,n.props.mode),l=U(o),c=n._checkValueBoundaries(l);n.setState({displayValue:o}), +o!==i&&(t=n.state.displayValue,a=(a=o).replace(/,/g,"."),(t=t.replace(/,/g,".")).includes(".")||!a.includes("."))?(n._restoreSelection=!0,n.forceUpdate()):n._saveSelection(r),c.value&&D(n.props,l)===o&&n.props.onValueChange(l,"input")},n._onValueByStepChange=function(e){var t=n.props,a=t.roundByStep,r=void 0===a||a,i=t.step,o=void 0===i?1:i,l=U(n.state.displayValue);if(!isNaN(l)){var c=new x.Big(l),s=new x.Big(o),u=c.mod(s),d=c.plus(e*o);!u.eq(0)&&r&&(d=d.plus((e>0?0:1)*o).minus(u));var p=Number(d);n._checkValueBoundaries(p).value&&(n.setState({displayValue:D(n.props,p,W(n.props))}),n.props.onValueChange(p,"step"))}};var a=G(n.props.value);return n.state={value:a,displayValue:D(n.props,a,W(n.props)),focused:!1,valueHash:n.props.valueHash},n}return Object(a.__extends)(t,e),t.prototype.componentDidMount=function(){document.addEventListener("selectionchange",this._handleSelectionChange)},t.prototype.componentWillUnmount=function(){document.removeEventListener("selectionchange",this._handleSelectionChange)},t.prototype.componentDidUpdate=function(){var e=Object(k.ensureNotNull)(this._input),t=this._selection;if(null!==t&&this._restoreSelection&&document.activeElement===e){var n=t.start,a=t.end,r=t.direction;e.setSelectionRange(n,a,r)}this._restoreSelection=!1},t.prototype.render=function(){return i.a.createElement(T.a,{inputMode:this.props.inputMode,name:this.props.name,borderStyle:"thick",fontSizeStyle:"medium",value:this.state.displayValue,className:this.props.className,placeholder:this.props.placeholder,disabled:this.props.disabled,onValueChange:this._onValueChange,onValueByStepChange:this._onValueByStepChange,containerReference:this.props.containerReference,inputReference:this._handleInputReference,onClick:this.props.onClick,onFocus:this._onFocus,onBlur:this._onBlur,onKeyDown:this.props.onKeyDown})},t.prototype.getClampedValue=function(){var e=this.props,t=e.min,n=e.max,a=U(this.state.displayValue);return isNaN(a)?null:Object(I.clamp)(a,t,n)},t.getDerivedStateFromProps=function(e,t){var n=e.valueHash,a=G(e.value);return t.value!==a||t.valueHash!==n?{value:a,valueHash:n,displayValue:D(e,a,t.focused&&t.valueHash===n?void 0:W(e))}:null},t.prototype._saveSelection=function(e){var t=e.selectionStart,n=e.selectionEnd,a=e.selectionDirection;null!==t&&null!==n&&null!==a&&(this._selection={start:t,end:n,direction:a})},t.prototype._checkValueBoundaries=function(e){var t=this.props;return{value:function(e,t,n){var a=e>=t,r=e<=n;return{passMin:a,passMax:r,pass:a&&r,clamped:Object(I.clamp)(e,t,n)}}(e,t.min,t.max).pass}},t.defaultProps=R,t}(i.a.PureComponent),F=/^-?[0-9]*$/,L=/^(-?([0-9]+\.?[0-9]*)|(-?[0-9]*))$/;function D(e,t,n){return null!==(t=G(t))&&void 0!==n&&(n=Math.max(H(t),n)),function(e,t){if(null===e)return"";return new z.NumericFormatter(t).format(e)}(t,n)}function W(e){var t=0;return e.inheritPrecisionFromStep&&e.step<=1&&(t=H(e.step)),Math.max(e.precision,t)||void 0}function H(e){var t=Math.trunc(e).toString();return Object(I.clamp)(z.NumericFormatter.formatNoE(e).length-t.length-1,0,15)}function U(e,t){ +return new z.NumericFormatter(t).parse(e)}function G(e){return"number"==typeof e&&Number.isFinite(e)?e:null}var Y=n("eJTA"),q=n("7MId"),K=n("Tmoa");function X(e){var t=e.color,n=e.thickness,r=e.thicknessItems,o=e.noAlpha,l=c({property:t}),s=l[0],u=l[1],d=c(n?{property:n}:{defaultValue:void 0}),p=d[0],m=d[1];return i.a.createElement(q.a,Object(a.__assign)({},e,{color:function(){if(!s)return null;return Object(Y.rgbToHexString)(Object(Y.parseRgb)(s))}(),onColorChange:function(e){var t=s?Object(K.alphaToTransparency)(Object(Y.parseRgba)(s)[3]):0;u(Object(K.generateColor)(String(e),t,!0))},thickness:p,thicknessItems:r,onThicknessChange:m,opacity:o?void 0:s?Object(Y.parseRgba)(s)[3]:void 0,onOpacityChange:o?void 0:function(e){u(Object(K.generateColor)(s,Object(K.alphaToTransparency)(e),!0))}}))}var Q=n("YFKU"),Z=n("a7Ha"),J=n("CHgb"),$=n("QpNh"),ee=n("FIOl"),te=n("jAqK"),ne=n("8XTa"),ae=[{type:Z.LineEnd.Normal,icon:ee,label:window.t("Normal")},{type:Z.LineEnd.Arrow,icon:te,label:window.t("Arrow")}],re=function(e){function t(t){var n=e.call(this,t)||this;return n._items=[],n._items=ae.map((function(e){return{value:e.type,selectedContent:i.a.createElement(J.a,{icon:e.icon}),content:i.a.createElement(J.b,{icon:e.icon,iconClassName:f()(t.isRight&&ne.right),label:e.label})}})),n}return Object(a.__extends)(t,e),t.prototype.render=function(){var e=this.props,t=e.lineEnd,n=e.className,r=e.lineEndChange,o=e.isRight,l=e.disabled;return i.a.createElement(J.c,Object(a.__assign)({disabled:l,className:f()(ne.lineEndSelect,o&&ne.right,n),items:this._items,value:t,onChange:r,hideArrowButton:!0},Object($.a)(this.props)))},t}(i.a.PureComponent);function ie(e){var t=e.property,n=c({property:t}),r=n[0],o=n[1];return i.a.createElement(re,Object(a.__assign)({},e,{lineEnd:r,lineEndChange:o}))}var oe,le=n("6w4h");function ce(e){var t=e.children,n=e.className,a=e.breakPoint,i=void 0===a?"Normal":a;return r.createElement(b,{className:m(le.wrap,n,le["breakpoint"+i])},r.Children.map(t,(function(e){return r.isValidElement(e)?r.createElement("span",{key:null===e.key?void 0:e.key,className:le.row},e):e})))}var se=((oe={})[1]="float",oe[0]="integer",oe),ue=n("vqb8"),de=n("eU7S");function pe(e){var t,n,a=e.definition,o=a.id,l=a.properties,s=l.checked,u=l.disabled,d=l.leftEnd,p=l.rightEnd,f=l.value,h=l.extendLeft,b=l.extendRight,v=a.title,g=a.valueMin,y=a.valueMax,_=a.valueStep,N=a.valueUnit,S=a.extendLeftTitle,C=a.extendRightTitle,O=e.offset,x=c({property:s,defaultValue:!0})[0],k=c({property:u,defaultValue:!1})[0],V=Object(ue.a)({watchedValue:g,defaultValue:void 0}),M=Object(ue.a)({watchedValue:y,defaultValue:void 0}),T=Object(ue.a)({watchedValue:_,defaultValue:void 0}),I=Object(ue.a)({watchedValue:N,defaultValue:void 0}),z=e.disabled||!x;return i.a.createElement(r.Fragment,null,i.a.createElement(E,{id:o,offset:O,checked:s,title:v,disabled:e.disabled||k},i.a.createElement(ce,{className:de.line,breakPoint:"Small"},i.a.createElement(r.Fragment,null,function(){var t=e.definition,n=t.properties,a=n.color,r=n.width,o=t.widthValues +;if(a)return i.a.createElement("span",{className:de.control},i.a.createElement(X,{color:a,thickness:r,disabled:z,thicknessItems:o}));return r&&i.a.createElement("span",{className:de.control},i.a.createElement(j,{items:o,property:r,disabled:z}))}(),(n=e.definition.properties.style)&&i.a.createElement("span",{className:de.control},i.a.createElement(w,{property:n,disabled:z}))),(d||p||f)&&i.a.createElement(r.Fragment,null,i.a.createElement(r.Fragment,null,d&&i.a.createElement(ie,{className:de.control,property:d,disabled:z,"data-name":"left-end-select"}),p&&i.a.createElement(ie,{className:de.control,property:p,disabled:z,"data-name":"right-end-select",isRight:!0})),(t=e.definition.valueType,f&&i.a.createElement("span",{className:m(de.valueInput,de.control)},i.a.createElement(A,{className:de.input,property:f,min:V,max:M,step:T,disabled:z,mode:void 0!==t?se[t]:void 0,name:"line-value-input"}),i.a.createElement("span",{className:de.valueUnit},I)))))),h&&i.a.createElement(E,{id:o+"ExtendLeft",offset:O,checked:h,title:S,disabled:e.disabled||k}),b&&i.a.createElement(E,{id:o+"ExtendRight",offset:O,checked:b,title:C,disabled:e.disabled||k}))}var me=n("4vW/"),fe=n("gla1");function he(e){var t=e.property,n=e.options,o=Object(a.__rest)(e,["property","options"]),l=c({property:t}),s=l[0],u=l[1],d=Object(fe.a)();return Object(r.useEffect)((function(){var e=function(){return d()};return Array.isArray(n)||n.subscribe(e),function(){Array.isArray(n)||n.unsubscribe(e)}}),[]),i.a.createElement(N.a,Object(a.__assign)({},o,{onChange:u,value:s,items:(Array.isArray(n)?n:n.value()).map((function(e){return{content:e.title,value:e.value}}))}))}var be=n("ioCK"),ve=[{title:Object(Q.t)("Solid"),value:me.ColorType.Solid},{title:Object(Q.t)("Gradient"),value:me.ColorType.Gradient}];function ge(e){var t=e.disabled,n=e.noAlpha,a=e.properties,r=a.color,o=a.gradientColor1,l=a.gradientColor2,s=a.type,u=c({property:s,defaultValue:me.ColorType.Solid})[0];return i.a.createElement(ce,null,i.a.createElement(he,{className:be.dropdown,menuClassName:be.dropdownMenu,disabled:t,property:s,options:ve,"data-name":"background-type-options-dropdown"}),u===me.ColorType.Solid?i.a.createElement(X,{color:r,disabled:t,noAlpha:n}):i.a.createElement(i.a.Fragment,null,i.a.createElement(X,{className:be.firstColorPicker,color:o,disabled:t,noAlpha:n}),i.a.createElement(X,{color:l,disabled:t,noAlpha:n})))}function Ee(e){var t=e.definition,n=t.id,a=t.properties,r=t.title,o=t.noAlpha,l=e.offset,s=a.color,u=a.checked,d=a.disabled,p=c({property:u,defaultValue:!0})[0],m=c({property:d,defaultValue:!1})[0],f=e.disabled||!p;return i.a.createElement(E,{id:n,offset:l,checked:u,title:r,disabled:e.disabled||m},i.a.createElement(b,null,a.hasOwnProperty("type")?i.a.createElement(ge,{properties:a,disabled:f,noAlpha:o}):i.a.createElement(X,{color:s,disabled:f,noAlpha:o})))}var ye=n("U1eG"),_e=n("HGP3"),we=n("lB1i");function Ne(e){var t,n=e.value,a=e.disabled,r=e.onChange;return i.a.createElement("div",{className:m(we.wrap,(t={},t[we.disabled]=a,t))},i.a.createElement(ye.a,{hideInput:!0, +color:_e.colorsPalette["color-tv-blue-500"],opacity:1-n/100,onChange:function(e){a||r(100-100*e)}}))}function Se(e){var t=e.property,n=Object(a.__rest)(e,["property"]),i=c({property:t}),o=i[0],l=i[1];return r.createElement(Ne,Object(a.__assign)({},n,{value:o,onChange:l}))}function Ce(e){var t=e.definition,n=t.id,a=t.properties,r=a.transparency,o=a.checked,l=a.disabled,s=t.title,u=e.offset,d=c({property:o,defaultValue:!0})[0],p=c({property:l,defaultValue:!1})[0],m=e.disabled||!d;return i.a.createElement(E,{id:n,offset:u,checked:o,title:s,disabled:e.disabled||p},i.a.createElement(b,null,i.a.createElement(Se,{property:r,disabled:m})))}var Oe=n("oWdB");function je(e){var t=e.definition,n=t.id,a=t.properties,r=a.color1,o=a.color2,l=a.checked,s=a.disabled,u=t.title,d=t.noAlpha1,p=t.noAlpha2,m=e.offset,f=c({property:l,defaultValue:!0})[0],h=c({property:s,defaultValue:!1})[0],v=e.disabled||!f||h;return i.a.createElement(E,{id:n,offset:m,checked:l,title:u,disabled:e.disabled||h},i.a.createElement(b,{className:Oe.twoColors},g(r,d),g(o,p)));function g(e,t){return i.a.createElement("span",{className:Oe.colorPicker},i.a.createElement(X,{color:e,disabled:v,noAlpha:t}))}}var xe=n("ybVX"),ke=n("ZRxn");function Ve(e){var t=e.definition,n=t.id,a=t.properties,o=a.checked,l=a.value,s=a.unitOptionsValue,u=a.disabled,d=t.min,p=t.max,f=t.step,h=t.title,v=t.unit,g=t.unitOptions,y=t.type,_=e.offset,w=c({property:o,defaultValue:!0})[0],N=c({property:u,defaultValue:!1})[0],S=Object(ue.a)({watchedValue:d,defaultValue:void 0}),C=Object(ue.a)({watchedValue:p,defaultValue:void 0}),O=Object(ue.a)({watchedValue:f,defaultValue:void 0}),j=Object(ue.a)({watchedValue:v,defaultValue:void 0}),x=Object(r.useContext)(xe.b),V=e.disabled||!w;return i.a.createElement(E,{id:n,offset:_,checked:o,title:h,disabled:e.disabled||N},i.a.createElement(b,null,i.a.createElement(ce,null,i.a.createElement(A,{className:m(ke.input,x[n]&&ke[x[n]]),property:l,min:S,max:C,step:O,disabled:V,mode:se[y],name:"number-input"}),s&&i.a.createElement(he,{className:ke.dropdown,menuClassName:ke.dropdownMenu,disabled:V,property:s,options:Object(k.ensureDefined)(g),"data-name":"unit-options-dropdown"})),i.a.createElement("span",{className:ke.unit},j)))}function Me(e){var t=e.definition,n=t.id,a=t.properties,r=a.checked,o=a.disabled,l=t.childrenDefinitions,s=t.title,u=e.offset,d=c({property:r,defaultValue:!0})[0],p=c({property:o,defaultValue:!1})[0],m=e.disabled||!d;return i.a.createElement(i.a.Fragment,null,i.a.createElement(E,{id:n,offset:u,checked:r,title:s,disabled:e.disabled||p}),l.map((function(e){return i.a.createElement(wt,{key:e.id,disabled:m,definition:e,offset:!0})})))}var Te=n("UXjO");function Ie(e){var t=e.property,n=c({property:t}),r=n[0],o=n[1];return i.a.createElement(Te.a,Object(a.__assign)({},e,{fontSize:r,fontSizeChange:o,"data-name":"font-size-select"}))}var ze=n("Iivm"),Ae=n("aw5J");function Pe(e){var t=e.className,n=e.checked,r=e.icon,o=e.disabled,l=e.onClick;return i.a.createElement("div",Object(a.__assign)({ +className:f()(t,Ae.container,n&&!o&&Ae.active,o&&Ae.disabled),onClick:o?void 0:l,"data-role":"button"},Object($.a)(e)),i.a.createElement(ze.Icon,{className:Ae.icon,icon:r}))}function Re(e){var t=e.icon,n=e.className,i=e.property,o=e.disabled,l=c({property:i}),s=l[0],u=l[1];return r.createElement(Pe,Object(a.__assign)({className:n,icon:t,checked:s,onClick:function(){u(!s)},disabled:o},Object($.a)(e)))}var Be=n("Wvr1"),Fe=n("k+zC"),Le=n("jggR");function De(e){var t=e.value,n=e.className,a=e.onChange,i=e.disabled,o=e.readonly,l=e.name,c=e.highlight,s=e.onFocus,u=e.onBlur,d=e.intent,p=e.borderStyle,f=void 0===p?"thin":p,h=e.size,b=void 0===h?"medium":h,v=e.removeRoundBorder,g=void 0===v?0:v,E=e.highlightRemoveRoundBorder,y=void 0===E?0:E,_=Object(Be.a)(g),w=Object(Be.a)(y);return r.createElement("span",{className:m(Le.container,n,Le["intent-"+d],Le["border-"+f],Le["size-"+b],i&&Le.disabled,o&&Le.readonly,_,c&&Le.highlight)},r.createElement("textarea",{className:Le.textarea,value:t,onChange:function(e){i||o||a(e.currentTarget.value)},onFocus:s,onBlur:u,disabled:i,readOnly:o,name:l}),c&&r.createElement("span",{className:m(Le.shadow,w)}))}function We(e){return e=Object(Fe.a)(e),r.createElement(De,Object(a.__assign)({},e))}function He(e){var t=e.property,n=Object(a.__rest)(e,["property"]),i=c({property:t}),o=i[0],l=i[1];return r.createElement(We,Object(a.__assign)({},n,{value:o,onChange:l}))}var Ue=n("rRJX"),Ge=n("4Fxa"),Ye=n("CaTF"),qe=function(e){return{content:e.title,title:e.title,value:e.value}},Ke=function(e){return{content:e.title,title:e.title,value:e.value}};function Xe(e){var t=e.definition,n=t.id,a=t.properties,o=a.color,l=a.size,u=a.checked,d=a.disabled,p=a.bold,m=a.italic,h=a.text,v=a.alignmentHorizontal,g=a.alignmentVertical,y=a.orientation,_=a.backgroundVisible,w=a.backgroundColor,S=a.borderVisible,C=a.borderColor,O=a.borderWidth,j=a.wrap,x=t.title,k=t.sizeItems,V=t.alignmentTitle,M=t.alignmentHorizontalItems,T=t.alignmentVerticalItems,I=t.orientationTitle,z=t.orientationItems,A=t.backgroundTitle,P=t.borderTitle,R=t.borderWidthItems,B=t.wrapTitle,F=e.offset,L=Object(r.useContext)(xe.a),D=c({property:u,defaultValue:!0})[0],W=c({property:d,defaultValue:!1})[0],H=c({property:g,defaultValue:void 0}),U=H[0],G=H[1],Y=c({property:y,defaultValue:"horizontal"}),q=Y[0],K=Y[1],Q=c({property:v,defaultValue:void 0}),Z=Q[0],J=Q[1],$=c({property:_,defaultValue:!1})[0],ee=c({property:S,defaultValue:!1})[0],te=e.disabled||!D;return i.a.createElement(r.Fragment,null,function(){if(x)return i.a.createElement(E,{id:n,offset:F,checked:u,title:x,disabled:e.disabled||W},i.a.createElement(ce,{breakPoint:"Small"},ae(),re()));return i.a.createElement(s.a.Row,null,i.a.createElement(s.a.Cell,{placement:"first",colSpan:2,offset:F,"data-section-name":n},ae(),re()))}(),h&&i.a.createElement(s.a.Row,null,i.a.createElement(s.a.Cell,{placement:"first",colSpan:2,offset:F,"data-section-name":n},i.a.createElement(He,{className:f()(Ye.textarea,L[n]&&Ye[L[n]]),property:h,disabled:te,onFocus:function(e){e.target.select()},name:"text-input" +}))),(v||g)&&i.a.createElement(s.a.Row,null,i.a.createElement(s.a.Cell,{placement:"first",verticalAlign:"adaptive",offset:F,"data-section-name":n},i.a.createElement(b,null,V)),i.a.createElement(s.a.Cell,{placement:"last",verticalAlign:"adaptive","data-section-name":n},i.a.createElement(ce,{breakPoint:"Small"},void 0!==U&&void 0!==T&&i.a.createElement(N.a,{className:Ye.dropdown,menuClassName:Ye.dropdownMenu,disabled:te,value:U,items:T.map(qe),onChange:G,"data-name":"alignment-vertical-select"}),void 0!==Z&&void 0!==M&&i.a.createElement(N.a,{className:Ye.dropdown,menuClassName:Ye.dropdownMenu,disabled:te,value:Z,items:M.map(qe),onChange:J,"data-name":"alignment-horizontal-select"})))),void 0!==y&&void 0!==z&&i.a.createElement(s.a.Row,null,i.a.createElement(s.a.Cell,{placement:"first",verticalAlign:"adaptive",offset:F,"data-section-name":n},i.a.createElement(b,null,I)),i.a.createElement(s.a.Cell,{placement:"last",verticalAlign:"adaptive","data-section-name":n},i.a.createElement(ce,{breakPoint:"Small"},i.a.createElement(N.a,{className:Ye.dropdown,menuClassName:Ye.dropdownMenu,disabled:te,value:q,items:z.map(Ke),onChange:K,"data-name":"orientation-select"})))),ie(A,_,w,!!_&&!$),ie(P,S,C,!!S&&!ee,O,R),j&&i.a.createElement(E,{id:n+"Wrap",offset:F,checked:j,title:B,disabled:e.disabled||W}));function ne(e,t,n){return e?i.a.createElement(Re,{className:Ye.fontStyleButton,icon:t,property:e,disabled:te,"data-name":n}):null}function ae(){return i.a.createElement(r.Fragment,null,o&&i.a.createElement("div",{className:Ye.colorPicker},i.a.createElement(X,{color:o,disabled:te})),l&&k&&i.a.createElement(Ie,{property:l,fontSizes:k,disabled:te}))}function re(){return i.a.createElement(r.Fragment,null,ne(p,Ue,"toggle-bold"),ne(m,Ge,"toggle-italic"))}function ie(t,a,r,o,l,c){return r?i.a.createElement(E,{id:n+"ColorSelect",offset:F,checked:a,title:t,disabled:e.disabled||W},i.a.createElement(X,{color:r,thickness:l,thicknessItems:c,disabled:te||o})):null}}var Qe=n("3G1X"),Ze=n("jAh7"),Je=n("pZll"),$e=n("RgaO"),et=n("e3/o"),tt=n("+EG+"),nt=n("K5B3"),at=function(e){function t(t){var n=e.call(this,t)||this;return n._symbolSearch=null,n._input=null,n._popup=null,n._uuid=Object(et.guid)(),n._updateSymbolName=function(){var e=n.props.definition,t=e.propType,a=e.properties[t];n._symbolSearch&&(Object(k.ensureNotNull)(n._input).value=a.value(),n._symbolSearch.acceptTypeIn())},n._onSetSymbol=function(e){var t=n.props.definition,a=t.propType;t.properties[a].setValue(e)},n._handleOutsideClick=function(e){null!==n._input&&document.activeElement===n._input&&e.target instanceof Node&&null!==n._popup&&!n._popup.contains(e.target)&&n._input.blur()},n._refInput=function(e){n._input=e},n.state={expanded:!1},n}return Object(a.__extends)(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props.definition;t.properties[t.propType].subscribe(this,this._updateSymbolName);var n=this.context||Object(Ze.getRootOverlapManager)();Object(Je.symbolSearchUIService)().bindToInput(Object(k.ensureNotNull)(this._input),{syncWithChartWidget:!1,syncOnBlur:!0, +callback:this._onSetSymbol,onPopupOpen:function(t){e._popup=n.ensureWindow(e._uuid),t.appendTo(e._popup),e.setState({expanded:!0})},onPopupClose:function(){e._popup=null,e.setState({expanded:!1}),n.removeWindow(e._uuid),e._input&&e._input.focus()},keepFocus:!0}).then((function(t){return e._symbolSearch=t}))},t.prototype.componentWillUnmount=function(){var e=this.props.definition;e.properties[e.propType].unsubscribe(this,this._updateSymbolName)},t.prototype.render=function(){var e=this,t=this.props.definition,n=t.id,a=t.title,r=void 0===a?"":a,o=this.state.expanded,l=this.props.definition,c=l.propType,s=l.properties[c].value()||"";return i.a.createElement(E,{id:n,title:r},i.a.createElement(b,null,i.a.createElement($e.a,{mouseDown:!0,touchStart:!0,handler:this._handleOutsideClick},(function(t){return i.a.createElement(Qe.b,{className:nt.input,reference:e._refInput,containerReference:t,defaultValue:s,"data-haspopup":!0,"data-expanded":o})}))))},t.contextType=tt.b,t}(r.PureComponent),rt=n("aSdR");function it(e){var t=e.definition,n=t.properties,a=n.x,r=n.y,o=n.disabled,l=t.id,c=t.minX,u=t.maxX,d=t.stepX,p=t.minY,m=t.maxY,f=t.stepY,h=t.title,b=t.typeX,v=t.typeY,g=e.offset,E=o&&o.value()||e.disabled,y=Object(ue.a)({watchedValue:c,defaultValue:void 0}),_=Object(ue.a)({watchedValue:u,defaultValue:void 0}),w=Object(ue.a)({watchedValue:d,defaultValue:void 0}),N=Object(ue.a)({watchedValue:p,defaultValue:void 0}),S=Object(ue.a)({watchedValue:m,defaultValue:void 0}),C=Object(ue.a)({watchedValue:f,defaultValue:void 0});return i.a.createElement(s.a.Row,null,i.a.createElement(s.a.Cell,{verticalAlign:"adaptive",placement:"first",offset:g,"data-section-name":l},i.a.createElement("span",{className:rt.coordinates},h)),(a||r)&&i.a.createElement(s.a.Cell,{placement:"last",offset:g,"data-section-name":l},i.a.createElement(ce,{breakPoint:"Medium"},r&&i.a.createElement(A,{className:rt.input,property:r,min:N,max:S,step:C,disabled:E,name:"y-input",mode:void 0!==v?se[v]:"integer"}),a&&i.a.createElement(A,{className:rt.input,property:a,min:y,max:_,step:w,disabled:E,name:"x-input",mode:void 0!==b?se[b]:"integer"}))))}var ot=n("9gev");function lt(e){var t=e.definition,n=t.id,a=t.properties,o=a.checked,l=a.option,s=a.disabled,u=t.title,d=t.options,p=e.offset,m=c({property:o,defaultValue:!0})[0],h=c({property:s,defaultValue:!1})[0],v=Object(r.useContext)(xe.b),g=e.disabled||!m;return i.a.createElement(E,{id:n,offset:p,checked:o,title:u,disabled:e.disabled||h},i.a.createElement(b,null,i.a.createElement(he,{className:f()(ot.dropdown,v[n]&&ot[v[n]]),menuClassName:f()(ot.dropdownMenu,v[n]&&ot[v[n]]),disabled:g,property:l,options:d,"data-name":"options-dropdown"})))}var ct=n("Ialn"),st=n("G7lD"),ut=function(e){function t(t){var n=e.call(this,t)||this;return n._container=null,n._pointer=null,n._rafPosition=null,n._rafDragStop=null,n._refContainer=function(e){n._container=e},n._refPointer=function(e){n._pointer=e},n._handlePosition=function(e){null!==n._rafPosition||n.props.disabled||(n._rafPosition=requestAnimationFrame((function(){ +var t=n.props,a=t.from,r=t.to,i=t.min,o=t.max,l=n._getNewPosition(e),c=1===n._detectPointerMode(e),s=c?Object(I.clamp)(l,i,r):a,u=c?r:Object(I.clamp)(l,a,o);s<=u&&n._handleChange(s,u),n._rafPosition=null})))},n._handleDragStop=function(){null!==n._rafDragStop||n.props.disabled||(n._rafDragStop=requestAnimationFrame((function(){n.setState({pointerDragMode:0}),n._rafDragStop=null,n.props.onCommit()})))},n._onSliderClick=function(e){u.CheckMobile.any()||(n._handlePosition(e.nativeEvent),n._dragSubscribe())},n._mouseUp=function(e){n._dragUnsubscribe(),n._handlePosition(e),n._handleDragStop()},n._mouseMove=function(e){n._handlePosition(e)},n._onTouchStart=function(e){n._handlePosition(e.nativeEvent.touches[0])},n._handleTouch=function(e){n._handlePosition(e.nativeEvent.touches[0])},n._handleTouchEnd=function(){n._handleDragStop()},n.state={pointerDragMode:0},n}return Object(a.__extends)(t,e),t.prototype.componentWillUnmount=function(){null!==this._rafPosition&&(cancelAnimationFrame(this._rafPosition),this._rafPosition=null),null!==this._rafDragStop&&(cancelAnimationFrame(this._rafDragStop),this._rafDragStop=null),this._dragUnsubscribe()},t.prototype.render=function(){var e,t,n,a=this.props,i=a.className,o=a.disabled,l=a.from,c=a.to,s=a.min,u=a.max,d=0!==this.state.pointerDragMode,p=u-s,f=(l-s)/p,h=(c-s)/p,b=Object(ct.isRtl)()?"right":"left";return r.createElement("div",{className:m(i,st.range,o&&st.disabled)},r.createElement("div",{className:st.rangeSlider,ref:this._refContainer,onMouseDown:this._onSliderClick,onTouchStart:this._onTouchStart,onTouchMove:this._handleTouch,onTouchEnd:this._handleTouchEnd},r.createElement("div",{className:st.rangeSliderMiddleWrap},r.createElement("div",{className:m(st.rangeSliderMiddle,d&&st.dragged),style:(e={},e[b]=100*f+"%",e.width=100*(h-f)+"%",e)})),r.createElement("div",{className:st.rangePointerWrap},r.createElement("div",{className:m(st.pointer,d&&st.dragged),style:(t={},t[b]=100*f+"%",t),ref:this._refPointer})),r.createElement("div",{className:st.rangePointerWrap},r.createElement("div",{className:m(st.pointer,d&&st.dragged),style:(n={},n[b]=100*h+"%",n)}))))},t.prototype._dragSubscribe=function(){var e=Object(k.ensureNotNull)(this._container).ownerDocument;e&&(e.addEventListener("mouseup",this._mouseUp),e.addEventListener("mousemove",this._mouseMove))},t.prototype._dragUnsubscribe=function(){var e=Object(k.ensureNotNull)(this._container).ownerDocument;e&&(e.removeEventListener("mousemove",this._mouseMove),e.removeEventListener("mouseup",this._mouseUp))},t.prototype._getNewPosition=function(e){var t=this.props,n=t.min,a=t.max-n,r=Object(k.ensureNotNull)(this._container),i=Object(k.ensureNotNull)(this._pointer),o=r.getBoundingClientRect(),l=i.offsetWidth,c=e.clientX-l/2-o.left;return Object(ct.isRtl)()&&(c=o.width-c-l),Object(I.clamp)(c/(o.width-l),0,1)*a+n},t.prototype._detectPointerMode=function(e){var t=this.props,n=t.from,a=t.to,r=this.state.pointerDragMode;if(0!==r)return r;var i=this._getNewPosition(e),o=Math.abs(n-i),l=Math.abs(a-i),c=o===l?i'},jggR:function(e,t,n){e.exports={container:"container-2IsTVQ49",focused:"focused-1QCDvHCH",readonly:"readonly-3TW7INT8",disabled:"disabled-Ju2phm9i","size-small":"size-small-1qV-ZeVg","size-medium":"size-medium-2lM1uGoO","size-large":"size-large-1NHR4lnE","font-size-small":"font-size-small-3eSt8Wl7","font-size-medium":"font-size-medium-3lwViqM8","font-size-large":"font-size-large-uTIroj7p","border-none":"border-none-2LzWNqL7",shadow:"shadow-AN9BmmG5","border-thin":"border-thin-2QjYg4o3","border-thick":"border-thick-3XUkSewU","intent-default":"intent-default-1A7eWGEJ","intent-success":"intent-success-1Oz2EYaq","intent-warning":"intent-warning-2CIKi-Sg","intent-danger":"intent-danger-34bo52Yx","intent-primary":"intent-primary-30cIvmgZ","corner-top-left":"corner-top-left-3jqic47X","corner-top-right":"corner-top-right-YZ3WAu2k","corner-bottom-right":"corner-bottom-right-3_DA5L_W","corner-bottom-left":"corner-bottom-left-3lFAslf6",textarea:"textarea-bk9MQutx"}},kJwE:function(e,t,n){e.exports={lineWidthSelect:"lineWidthSelect-3ziEuHcz",bar:"bar-37_AfcZG",isActive:"isActive-dohf9HfR",item:"item-2zVrXM_1"}},kXJy:function(e,t,n){e.exports={button:"button-1scLo53s",disabled:"disabled-2eJ5fvUz",active:"active-2T0ofIIp",hidden:"hidden-2GRQzIQ1"}},lB1i:function(e,t,n){e.exports={wrap:"wrap-K_N9jM1e",disabled:"disabled-2QK47L8c"}},oWdB:function(e,t,n){e.exports={twoColors:"twoColors-iyrZVlk4",colorPicker:"colorPicker-3hYQ60NL"}},rRJX:function(e,t){ +e.exports=''},vqb8:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var a=n("q1tI"),r=function(e){var t="watchedValue"in e?e.watchedValue:void 0,n="defaultValue"in e?e.defaultValue:e.watchedValue.value(),r=Object(a.useState)(t?t.value():n),i=r[0],o=r[1];return Object(a.useEffect)((function(){if(t){o(t.value());var e=function(e){return o(e)};return t.subscribe(e),function(){return t.unsubscribe(e)}}return function(){}}),[t]),i}},vxCt:function(e,t,n){e.exports={checkbox:"checkbox-1So8p7GP",title:"title-1uAaOORo"}},ybVX:function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return o}));var a=n("q1tI"),r=n.n(a),i=r.a.createContext({}),o=r.a.createContext({})},yqnI:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var a=n("txPx"),r=Object(a.getLogger)("Platform.GUI.PropertyDefinitionTrace")},z1Uu:function(e,t,n){e.exports={defaultSelect:"defaultSelect-2RDyqwu4"}}}]); \ No newline at end of file diff --git a/public/charting_library/bundles/49.f33a65d14266ef322741.js b/public/charting_library/bundles/49.f33a65d14266ef322741.js new file mode 100644 index 00000000..3d3e812f --- /dev/null +++ b/public/charting_library/bundles/49.f33a65d14266ef322741.js @@ -0,0 +1,13 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[49],{"+8gn":function(e,t,n){"use strict";n.d(t,"b",(function(){return s})),n.d(t,"a",(function(){return c}));var r=n("mrSG"),o=n("q1tI"),a=n("Eyy1"),u=n("txPx"),i=Object(u.getLogger)("Platform.GUI.StudyInputPropertyContainer"),s=o.createContext(null),c=function(e){function t(t){var n=e.call(this,t)||this;n._setValue=function(e,t,r){var o=n.props,u=o.property,s=o.model,c=Object(a.ensureDefined)(u.child(e));i.logNormal('Changing property "'+e+'" value from "'+u.value()+'" to "'+t+'"'),s.setProperty(c,t,"Change "+r)};var r=t.property,o={};return r.childNames().forEach((function(e){var t=Object(a.ensureDefined)(r.child(e));o.hasOwnProperty(e)||(o[e]=t.value())})),n.state=o,n}return Object(r.__extends)(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props.property;t.childNames().forEach((function(n){Object(a.ensureDefined)(t.child(n)).subscribe(e,(function(t){var r,o=t.value();i.logNormal('Property "'+n+'" updated to value "'+o+'"'),e.setState(((r={})[n]=o,r))}))}))},t.prototype.componentWillUnmount=function(){var e=this,t=this.props.property;t.childNames().forEach((function(n){Object(a.ensureDefined)(t.child(n)).unsubscribeAll(e)}))},t.prototype.render=function(){var e=this.props,t=e.study,n=e.model,r=e.children,a={study:t,model:n,values:this.state,setValue:this._setValue};return o.createElement(s.Provider,{value:a},r)},t}(o.PureComponent)},"1Tw0":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n("mrSG").__exportStar(n("SMoP"),t)},"5Ssy":function(e,t,n){"use strict";var r=n("mrSG"),o=n("YFKU"),a=n("q1tI"),u=n.n(a),i=n("+8gn"),s=n("rJEJ"),c=n("h5Dg"),l=n("Q+1u"),p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(r.__extends)(t,e),t.prototype.render=function(){var e=this.props,t=e.label,n=e.input;return a.createElement(l.a.Row,null,a.createElement(l.a.Cell,{placement:"first",colSpan:2},a.createElement(c.a,{label:t,input:n})))},t}(a.PureComponent),d=n("0W35"),f=n("1Tw0"),h=n("Eyy1"),m=n("fV01"),v=n("HfwS"),b=n("tDS2");function y(e){var t=e.children,n=e.input,s=e.disabled,c=e.onChange,p=e.grouped,m=Object(a.useContext)(i.b),y=Object(h.ensureNotNull)(m),_=y.values,C=y.setValue,O=_[n.id],j=Object(a.useState)(O?"another-symbol":"main-symbol"),S=j[0],E=j[1],w=Object(a.useRef)(null);return u.a.createElement(d.SwitchGroup,{name:"symbol-source-"+n.id,values:[S],onChange:function(e){E(e),"main-symbol"===e?Object(v.b)(C)("",n.id,n.name):Object(h.ensureNotNull)(w.current).updateSymbol()}},u.a.createElement(l.a.Row,null,u.a.createElement(l.a.Cell,{colSpan:2,placement:"first",grouped:p},u.a.createElement(f.RadioButton,{value:"main-symbol",className:b.checkbox,disabled:s,label:u.a.createElement("span",{className:b.label},Object(o.t)("Main chart symbol",{context:"input"}))}))),u.a.createElement(l.a.Row,null,u.a.createElement(l.a.Cell,{placement:"first",grouped:p},u.a.createElement(f.RadioButton,{value:"another-symbol",className:b.checkbox,disabled:s,label:u.a.createElement("span",{className:b.label +},Object(o.t)("Another symbol",{context:"input"}))})),u.a.createElement(l.a.Cell,{placement:"last",grouped:p},t||u.a.createElement(g,Object(r.__assign)({},{reference:w},{input:Object(h.ensureDefined)(n),onChange:c,disabled:s||"main-symbol"===S,autofocus:"another-symbol"===S})))))}var g=Object(v.a)((function(e){var t=Object(a.useContext)(i.b),n=Object(h.ensureNotNull)(t).study,o=e.value,s=void 0===o?"":o,c=e.reference;return u.a.createElement(m.b,Object(r.__assign)({},e,{allowEmpty:!0,value:Object(m.c)(s,n),study:n,ref:c}))}));n.d(t,"a",(function(){return C}));var _={offset:window.t("Offset")},C=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(r.__extends)(t,e),t.prototype.render=function(){var e=this,t=this.props,n=t.reference,r=t.inputs,o=t.property,u=t.study,i=t.model,s=o.offset,c=o.offsets;return a.createElement(l.a,{reference:n},a.createElement(O,{study:u,model:i,property:o.inputs,inputs:r}),s&&this._createOffsetSection(s),c&&c.childNames().map((function(t){var n=c.childs()[t];return e._createOffsetSection(n)})))},t.prototype._createOffsetSection=function(e){var t=e.childs();return a.createElement(O,{key:"offset_"+t.title.value(),study:this.props.study,model:this.props.model,inputs:[j(t)],property:e})},t}(a.PureComponent);function O(e){var t=e.study,n=e.model,r=e.inputs,o=e.property;return a.createElement(i.a,{property:o,study:t,model:n},r.map((function(e){return"symbol"===e.type&&e.optional?a.createElement(y,{key:e.id,input:e}):"bool"===e.type?a.createElement(p,{key:e.id,label:window.t(e.name,{context:"input"}),input:e}):a.createElement(s.a,{labelAlign:"session"===e.type?"adaptive":void 0,key:e.id,input:e})})))}function j(e){return{id:"val",name:e.title.value()||_.offset,defval:e.val.value(),type:"integer",min:e.min.value(),max:e.max.value()}}},"5YG5":function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));n("CW80");var r=n("3ClC");function o(e){if(Object(r.isStudy)(e))return e;if("isInputsStudy"in e)return e;throw new TypeError("Unsupported source type.")}},"9XXR":function(e,t,n){"use strict";n.r(t),n.d(t,"splitThousands",(function(){return o}));var r=n("ivNn");function o(e,t){void 0===t&&(t=" ");var n=e+"";-1!==n.indexOf("e")&&(n=function(e){return Object(r.fixComputationError)(e).toFixed(10).replace(/\.?0+$/,"")}(Number(e)));var o=n.split(".");return o[0].replace(/\B(?=(\d{3})+(?!\d))/g,t)+(o[1]?"."+o[1]:"")}},GZ2k:function(e,t,n){},HGyE:function(e,t,n){"use strict";n.d(t,"b",(function(){return s})),n.d(t,"a",(function(){return c}));var r=n("mrSG"),o=n("q1tI"),a=n("H172"),u=n("HfwS"),i=n("tDS2"),s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._onChange=function(e){var n=t.props,r=n.input,o=r.id,a=r.name;(0,n.onChange)(e,o,a)},t}return Object(r.__extends)(t,e),t.prototype.render=function(){var e=this.props,t=e.input,n=t.defval,r=t.options,u=t.optionsTitles,s=e.value,c=e.disabled,l=r.map((function(e){var t=u&&u[e]?u[e]:e;return{value:e,content:window.t(t,{context:"input"})}})),p=void 0!==s&&r.includes(s)?s:n +;return o.createElement(a.a,{className:i.input,menuClassName:i.dropdownMenu,value:p,items:l,onChange:this._onChange,disabled:c})},t}(o.PureComponent),c=Object(u.a)(s)},HfwS:function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return i}));var r=n("mrSG"),o=n("q1tI"),a=n("+8gn");function u(e){var t;return(t=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e._onChange=function(t,n,r){i(e.context.setValue,e.props.onChange)(t,n,r)},e}return Object(r.__extends)(n,t),n.prototype.render=function(){var t=this.props.input,n=this.context.values;return o.createElement(e,Object(r.__assign)({},this.props,{value:n[t.id],onChange:this._onChange}))},n}(o.PureComponent)).contextType=a.b,t}function i(e,t){return function(n,r,o){e(r,n,o),t&&t(n,r,o)}}},KJt4:function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return u}));var r=n("mrSG"),o=n("q1tI"),a=o.createContext(null);function u(e,t){return o.createElement(a.Consumer,null,(function(n){return n?o.createElement(e,Object(r.__assign)({},Object.assign({model:n},t))):null}))}},OL6p:function(e,t,n){e.exports={icon:"icon-1NLCncqj"}},PjdP:function(e,t,n){"use strict";var r=n("mrSG"),o=n("q1tI"),a=n.n(o),u=n("HfwS"),i=n("Yi2Q"),s=n("UYhW"),c=n("tDS2"),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(r.__extends)(t,e),t.prototype.render=function(){return o.createElement(s.a,Object(r.__assign)({},this.props,{mode:"integer",className:c.input}))},t}(o.PureComponent),p=Object(i.a)(l,{change:1/0,commit:0,blur:0}),d=Object(u.a)(p),f=n("YS4w"),h=n("h5Dg"),m=n("3G1X"),v=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._onChange=function(e){var n=t.props,r=n.input,o=r.id,a=r.name;(0,n.onChange)(e.currentTarget.value,o,a)},t}return Object(r.__extends)(t,e),t.prototype.render=function(){var e=this.props,t=e.input.defval,n=e.value,r=e.disabled,a=e.onBlur,u=e.onKeyDown;return o.createElement(m.b,{className:c.input,value:void 0===n?t:n,onChange:this._onChange,onBlur:a,onKeyDown:u,disabled:r})},t}(o.PureComponent),b=Object(i.a)(v),y=Object(u.a)(b),g=n("fV01"),_=n("TSYQ"),C=n.n(_),O=n("Eyy1"),j=n("XDrA"),S=n("qFKp"),E=n("Iivm"),w=n("OL6p"),x=n("yd0C");function N(e){return o.createElement(E.Icon,{className:w.icon,icon:x})}var P=n("Oi2w"),k=n("wnq4");var I,T=n("8Rai"),V=n("Hr11"),D=((I={})[0]={pattern:/\d/},I[9]={pattern:/\d/,optional:!0},I["#"]={pattern:/\d/,recursive:!0},I.A={pattern:/[a-zA-Z0-9]/},I.S={pattern:/[a-zA-Z]/},I);function B(e,t,n){for(var r,o=[],a=n,u=0,i=0,s=e.length,c=a.length,l=-1,p=0,d=[],f=s-1,h=[];u=0&&o[d];d--)s++;for(d=r-1;d>=0;d--)o[d]&&l++;for(d=n-1;d>=0;d--)a[d]&&p++;if(r>i)r=10*u;else if(n>=r&&n!==i){if(a[r]){var f=r;r-=p-l,o[r-=s]&&(r=f)}}else r>n&&(r+=l-p,r+=c)}return r}(c,a,d,M(t),u,i);f(s),v(!0)},onSelect:function(){var e=Object(O.ensureNotNull)(n.current);f(M(e))},maxLength:r}];function g(e){var t=b.current;return b.current=e,t}}function M(e){return e.selectionStart||0}function F(e){var t=e.value,n=e.mask,u=e.onChange,i=Object(r.__rest)(e,["value","mask","onChange"]),s=Object(o.useRef)(null),c=R(n,t,s),l=c[0],p=c[1],d=c[2];return Object(o.useLayoutEffect)((function(){void 0!==e.reference&&(e.reference.current=s.current)}),[e.reference]),a.a.createElement(m.b,Object(r.__assign)({},i,{iconPosition:"right",maxLength:d.maxLength,value:l,autoComplete:"off",reference:function(e){s.current=e},onChange:function(){d.onChange(),u(p.current)},onSelect:d.onSelect}))}var G=n("/3z9"),H=n("9dlw"),A=n("N5tr"),K=n("Y7w9"),q=function(){for(var e=[],t=0;t<24;++t)for(var n=0;n<60;n+=15){var r=[X(t.toString()),X(n.toString())],o=r[0]+":"+r[1],a=L(o)?o:W(o);e.push(a)}return e}();function U(e){var t=!1,n=Object(o.useRef)(null),u=Object(o.useRef)(null),i=Object(o.useRef)(null),s=Object(o.useRef)(null),c=Object(P.a)(),l=c[0],p=c[1],d=Object(o.useState)(e.value),f=d[0],h=d[1],v=Y(f),b=L(v)?v:W(v),y=Object(o.useState)(b),g=y[0],_=y[1],j=l||M().some((function(e){return null!==e&&e.contains(document.activeElement)}));Object(o.useLayoutEffect)((function(){return h(e.value)}),[e.value]),Object(o.useLayoutEffect)((function(){return _(b)}),[f,j]),Object(o.useEffect)((function(){return U(g===b?"auto":"smooth")}),[g]);var E=Object(K.lowerbound)(q,b,(function(e,t){return er&&o>t){var u=Object(V.clamp)(o,0,r),i=Object(V.clamp)(o,0,t);o=Math.max(u,i),a=u>i?e.top-u:e.bottom}else o>t&&(a=e.top-o);return{x:e.left,y:a,overrideWidth:e.width,overrideHeight:o}},closeOnClickOutside:!1,isOpened:j,tabIndex:-1,reference:i},w.map((function(e){return a.a.createElement(A.b,{key:e,label:e,isActive:e===b,isHovered:e===g,reference:e===g?I:void 0,onClick:D,onClickArg:e})}))));function k(n){var r=Y(n),o=L(r)?r:W(r);h(o),t||(t=!0,e.onChange(o))}function I(e){s.current=e}function D(e){if(k(Object(O.ensureDefined)(e)),S.isIE){var t=window.document.activeElement;t instanceof Node&&HTMLElement.prototype.blur.call(t)}else Object(O.ensureNotNull)(i.current).blur()}function B(e){return l&&(null!==R(document.activeElement)||null!==R(e.relatedTarget))}function R(e){return e instanceof Node&&M().find((function(t){return null!==t&&t.contains(e)}))||null}function M(){return[i.current,u.current]}function U(e){if(void 0===e&&(e="auto"),null!==s.current){var t=Object(O.ensureNotNull)(i.current).getBoundingClientRect(),n=s.current.getBoundingClientRect();(t.top>n.top||t.bottom1){var s=i.reduce((function(e,o,u){var i,s;if(!re.a.canPlotBeSourceOfChildStudy(o.type))return e;try{s=Object(O.ensureDefined)(Object(O.ensureDefined)(a)[o.id]).title}catch(c){s=o.id}return Object(r.__assign)(Object(r.__assign)({},e),((i={})[n+"$"+u]=t+": "+s,i))}),{});u=Object(r.__assign)(Object(r.__assign)({},u),s)}}))}var d=Object(r.__assign)(Object(r.__assign)({},e),{type:"text", +options:Object.keys(u),optionsTitles:u});return o.createElement(ae.a,Object(r.__assign)({},this.props,{input:d}))},t.prototype._isStudy=function(e){return!e.hasOwnProperty("isInputsStudy")},t.contextType=oe.b,t}(o.PureComponent),ce=n("LxhU"),le=n("pPtI"),pe=n("H172"),de=["","1","3","5","15","30","45","60","120","180","240","1D","1W","1M"],fe=de.map((function(e){return{value:e,content:""===e?Object(ee.t)("Same as symbol"):Object(le.getTranslatedResolutionModel)(e).hint}})),he=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._onChange=function(e){var n=t.props,r=n.input,o=r.id,a=r.name;(0,n.onChange)(e,o,a)},t}return Object(r.__extends)(t,e),t.prototype.render=function(){var e=this.props,t=e.input,n=e.value,r=e.disabled,a=ce.Interval.parse(void 0===n?t.defval:n),u=a.multiplier(),i=a.value();return u&&de.includes(i)||(i=de[0]),o.createElement(pe.a,{className:C()(c.input,c.resolution),menuClassName:C()(c.dropdownMenu,c.resolution),items:fe,value:i,onChange:this._onChange,disabled:r})},t}(o.PureComponent),me=Object(u.a)(he),ve=n("xx2B"),be=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._onChange=function(e){var n=t.props,r=n.input,o=r.id,a=r.name;(0,n.onChange)(e,o,a)},t}return Object(r.__extends)(t,e),t.prototype.render=function(){var e=this.props,t=e.input,n=t.defval,r=t.min,a=t.max,u=e.value,i=e.disabled;return o.createElement(ve.a,{className:c.input,value:Number(void 0===u?n:u),min:r,max:a,onValueChange:this._onChange,disabled:i})},t}(o.PureComponent),ye=Object(u.a)(be),ge=n("lkVX"),_e=n("Z1Tk"),Ce=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(r.__extends)(t,e),t.prototype.render=function(){var e=this;return o.createElement(oe.b.Consumer,null,(function(t){return t?e._getColorInputWithContext(t):null}))},t.prototype._getColorInputWithContext=function(e){var t,n=this.props,r=n.input.id,a=n.disabled,u=e.model,i=e.study;if("properties"in i||"tempProperties"in i){var s="properties"in i?i.properties().inputs[r]:null===(t=i.tempProperties)||void 0===t?void 0:t.inputs.child(r);return o.createElement(_e.a,{model:u,property:s},o.createElement(ge.a,{color:s,disabled:a}))}return null},t}(o.PureComponent);n.d(t,"a",(function(){return Oe}));var Oe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(r.__extends)(t,e),t.prototype.render=function(){var e,t=this.props,n=t.input,r=t.disabled,a=t.onChange;if(["text","integer","float","session","resolution"].includes((e=n).type)&&e.hasOwnProperty("options"))return o.createElement(ae.a,{input:n,disabled:r,onChange:a});switch(n.type){case"integer":return o.createElement(d,{input:n,disabled:r,onChange:a});case"float":return o.createElement(f.a,{input:n,disabled:r,onChange:a});case"bool":return o.createElement(h.a,{input:n,disabled:r,onChange:a});case"text":return o.createElement(y,{input:n,disabled:r,onChange:a});case"symbol":return o.createElement(g.a,{input:n,disabled:r,onChange:a});case"session":return o.createElement($,{input:n,disabled:r,onChange:a}) +;case"source":return o.createElement(se,{input:n,disabled:r,onChange:a});case"resolution":return o.createElement(me,{input:n,disabled:r,onChange:a});case"time":return o.createElement(ye,{input:n,disabled:r,onChange:a});case"color":return o.createElement(Ce,{input:n,disabled:r,onChange:a});default:return null}},t}(o.PureComponent)},S0KV:function(e,t,n){"use strict";function r(e){return Array.isArray(e)?e[0].value():e.value()}function o(e,t){if(Array.isArray(e))for(var n=0,r=e;n "+(o?"Palette":"Single")},t._onOpacityChange=function(e){var n=t.props.color,r=Object(l.a)(n);t._setProperty(n,Object(i.generateColor)(r,Object(i.alphaToTransparency)(e),!0),h)},t._onPopupClose=function(){t._trackEventLabel&&(Object(p.trackEvent)("GUI","Study settings",t._trackEventLabel),t._trackEventLabel=null)},t}return Object(r.__extends)(t,e),t.prototype.componentWillUnmount=function(){this._onPopupClose()},t.prototype.render=function(){var e=this.props,t=e.selectOpacity,n=void 0===t||t,r=e.disabled;return a.a.createElement(c.a,{disabled:r,color:this._getColorValueInHex(),selectOpacity:n,opacity:this._getOpacityValue(),thickness:this._getThicknessValue(),thicknessItems:m,onColorChange:this._onColorChange,onOpacityChange:this._onOpacityChange,onThicknessChange:this._onThicknessChange,onPopupClose:this._onPopupClose})},t.prototype._getThicknessValue=function(){var e=this.props.thickness;return e?Object(l.a)(e):void 0},t.prototype._setProperty=function(e,t,n){var r=this.context.setValue;Object(l.b)(e,(function(e){return r(e,t,n)}))},t.contextType=s.b,t}(a.a.PureComponent)},rJEJ:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n("mrSG"),o=(n("YFKU"),n("q1tI")),a=n("Eyy1"),u=n("PjdP"),i=n("Q+1u"),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(r.__extends)(t,e),t.prototype.render=function(){var e=this.props,t=e.label,n=e.children,r=e.input,s=e.disabled,c=e.onChange,l=e.labelAlign,p=e.grouped;return o.createElement(i.a.Row,null,o.createElement(i.a.Cell,{ +placement:"first",verticalAlign:l,grouped:p},void 0!==t?t:window.t(Object(a.ensureDefined)(r).name,{context:"input"})),o.createElement(i.a.Cell,{placement:"last",grouped:p},n||o.createElement(u.a,{input:Object(a.ensureDefined)(r),onChange:c,disabled:s})))},t}(o.PureComponent)},tDS2:function(e,t,n){e.exports={input:"input-2M6pUl-Q",resolution:"resolution-2qfO1lUf",symbol:"symbol-1be49jiU",checkbox:"checkbox-15VqCFje",label:"label-3rCCk0Td",symbolInput:"symbolInput-1r0O05gG",isFocused:"isFocused-3ps_uNFG",readonly:"readonly-3HE9PFCu",disabled:"disabled-3omO9UCm",error:"error-3HEkUG-H",dropdownMenu:"dropdownMenu-sPl98nIf",sessionStart:"sessionStart-20Y_zZKF",sessionEnd:"sessionEnd-Biyt0SRM",sessionInputContainer:"sessionInputContainer-3fr-ovpl",sessionDash:"sessionDash-3i8ftDqe",inputGroup:"inputGroup-13um8mnj"}},wnq4:function(e,t,n){e.exports={wrap:"wrap-3UffnxXt",input:"input-1Xqn_2Yr"}},xx2B:function(e,t,n){"use strict";var r=n("mrSG"),o=n("q1tI"),a=n.n(o),u=(n("YFKU"),n("WboT")),i=n("9XXR"),s=n("Ialn"),c=n("qFKp"),l=function(){function e(e){void 0===e&&(e=" "),this._divider=e}return e.prototype.format=function(e){var t=Object(i.splitThousands)(e,this._divider);return Object(s.isRtl)()&&c.isChrome?Object(s.startWithLTR)(t):t},e.prototype.parse=function(e){var t=Object(s.stripLTRMarks)(e).split(this._divider).join(""),n=Number(t);return isNaN(n)||/e/i.test(t)?{res:!1}:{res:!0,value:n,suggest:this.format(n)}},e}(),p=n("zXvd"),d=n("nc0P"),f=n("Hr11");n.d(t,"a",(function(){return g}));var h=window.t("Number format is invalid."),m=window.t("Specified value is less that the instrument minimum."),v=window.t("Specified value is more than the instrument maximum."),b=new l,y=/^-?[0-9]*$/,g=function(e){function t(t){var n=e.call(this,t)||this;n._onFocus=function(e){n.setState({focused:!0}),n.props.onFocus&&n.props.onFocus(e)},n._onBlur=function(e){n.setState({displayValue:_(n.props,n.props.value),focused:!1}),n.props.errorHandler&&n.props.errorHandler(!1),n.props.onBlur&&n.props.onBlur(e)},n._onValueChange=function(e){var t=e.target.value;if(void 0!==n.props.onEmptyString&&""===t&&n.props.onEmptyString(),"integer"!==n.props.mode||y.test(t)){var r=C(t,n.props.formatter),o=r.res?n._checkValueBoundaries(r.value):{value:!1},a=r.res&&!o.value,u=r.res&&r.suggest&&!n.state.focused?r.suggest:t,i=a&&o.msg?o.msg:h;n.setState({displayValue:u,errorMsg:i}),r.res&&o.value&&n.props.onValueChange(r.value,"input"),n.props.errorHandler&&n.props.errorHandler(!r.res||a)}},n._onValueByStepChange=function(e){var t=n.props,r=t.roundByStep,o=void 0===r||r,a=t.step,u=void 0===a?1:a,i=t.formatter,s=C(n.state.displayValue,i),c=u;if(s.res){var l=new d.Big(s.value),p=new d.Big(u),f=l.mod(p),h=l.plus(e*u);!f.eq(0)&&o&&(h=h.plus((e>0?0:1)*u).minus(f)),c=Number(h)}n._checkValueBoundaries(c).value&&(n.setState({displayValue:_(n.props,c)}),n.props.onValueChange(c,"step")),n.props.errorHandler&&n.props.errorHandler(!1)};var r=t.value;return n.state={value:r,displayValue:_(t,r),focused:!1,errorMsg:h},n}return Object(r.__extends)(t,e), +t.prototype.render=function(){return a.a.createElement(u.a,{inputMode:this.props.inputMode,borderStyle:this.props.borderStyle,fontSizeStyle:this.props.fontSizeStyle,value:this.state.displayValue,forceShowControls:this.props.forceShowControls,className:this.props.className,button:this.props.button,placeholder:this.props.placeholder,innerLabel:this.props.innerLabel,disabled:this.props.disabled,error:this.props.error,errorMessage:this.props.errorMessage||this.state.errorMsg,onValueChange:this._onValueChange,onValueByStepChange:this._onValueByStepChange,containerReference:this.props.containerReference,inputReference:this.props.inputReference,onClick:this.props.onClick,onFocus:this._onFocus,onBlur:this._onBlur,onKeyDown:this.props.onKeyDown,controlDecKeyCodes:this.props.controlDecKeyCodes,controlIncKeyCodes:this.props.controlIncKeyCodes})},t.prototype.getClampedValue=function(){var e=this.props,t=e.min,n=void 0===t?-1/0:t,r=e.max,o=void 0===r?9e15:r,a=C(this.state.displayValue,this.props.formatter);return a.res?Object(f.clamp)(a.value,n,o):null},t.getDerivedStateFromProps=function(e,t){var n=e.alwaysUpdateValueFromProps,r=e.value;return t.focused&&!n||t.value===r?null:{value:r,displayValue:_(e,r)}},t.prototype._checkValueBoundaries=function(e){var t=this.props,n=t.min,r=void 0===n?-1/0:n,o=t.max,a=function(e,t,n){var r=e>=t,o=e<=n;return{passMin:r,passMax:o,pass:r&&o,clamped:Object(f.clamp)(e,t,n)}}(e,r,void 0===o?9e15:o),u=a.passMax?a.passMin?void 0:m:v;return{value:a.pass,msg:u}},t}(a.a.PureComponent);function _(e,t){var n=e.useFormatter,r=void 0===n||n,o=e.formatter,a=e.mode;return r&&"integer"!==a?function(e,t){void 0===t&&(t=b);return null!==e?t.format(e):""}(t,o):function(e){if(null===e)return"";return p.NumericFormatter.formatNoE(e)}(t)}function C(e,t){return void 0===t&&(t=b),t.parse?t.parse(e):{res:!1,error:"Formatter does not support parse"}}},yd0C:function(e,t){e.exports=''}}]); \ No newline at end of file diff --git a/public/charting_library/bundles/4a9abefd31dab7c8239e02e925aacd78.png b/public/charting_library/bundles/4a9abefd31dab7c8239e02e925aacd78.png new file mode 100644 index 00000000..464eb9d2 Binary files /dev/null and b/public/charting_library/bundles/4a9abefd31dab7c8239e02e925aacd78.png differ diff --git a/public/charting_library/bundles/4fafff07d8914dc11f6d335f606ff47c.png b/public/charting_library/bundles/4fafff07d8914dc11f6d335f606ff47c.png new file mode 100644 index 00000000..5d519098 Binary files /dev/null and b/public/charting_library/bundles/4fafff07d8914dc11f6d335f606ff47c.png differ diff --git a/public/charting_library/bundles/5.58f99b04ffe42689fe9a.js b/public/charting_library/bundles/5.58f99b04ffe42689fe9a.js new file mode 100644 index 00000000..8239eb44 --- /dev/null +++ b/public/charting_library/bundles/5.58f99b04ffe42689fe9a.js @@ -0,0 +1,4 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[5],{"1O6C":function(t,e,n){"use strict";n.d(e,"a",(function(){return d}));var o=n("mrSG"),i=n("q1tI"),r=n("TSYQ"),a=n("+EG+"),s=n("jAh7"),l=n("QpNh"),c=n("aYmi"),d=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._manager=new s.OverlapManager,e._handleSlot=function(t){e._manager.setContainer(t)},e}return Object(o.__extends)(e,t),e.prototype.render=function(){var t=this.props,e=t.rounded,n=void 0===e||e,s=t.shadowed,d=void 0===s||s,u=t.fullscreen,h=void 0!==u&&u,p=t.darker,_=void 0!==p&&p,g=t.className,f=t.backdrop,m=r(g,c.dialog,n&&c.rounded,d&&c.shadowed,h&&c.fullscreen,_&&c.darker),v=Object(l.a)(this.props),y=this.props.style?Object(o.__assign)(Object(o.__assign)({},this._createStyles()),this.props.style):this._createStyles();return i.createElement(i.Fragment,null,i.createElement(a.b.Provider,{value:this._manager},f&&i.createElement("div",{onClick:this.props.onClickBackdrop,className:c.backdrop}),i.createElement("div",Object(o.__assign)({},v,{className:m,style:y,ref:this.props.reference,onFocus:this.props.onFocus,onMouseDown:this.props.onMouseDown,onMouseUp:this.props.onMouseUp,onClick:this.props.onClick,onKeyDown:this.props.onKeyDown,tabIndex:-1}),this.props.children)),i.createElement(a.a,{reference:this._handleSlot}))},e.prototype._createStyles=function(){var t=this.props,e=t.bottom,n=t.left,o=t.width;return{bottom:e,left:n,right:t.right,top:t.top,zIndex:t.zIndex,maxWidth:o,height:t.height}},e}(i.PureComponent)},RgaO:function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var o=n("mrSG"),i=n("8Rai");function r(t){var e=t.children,n=Object(o.__rest)(t,["children"]);return e(Object(i.a)(n))}},WXjp:function(t,e,n){"use strict";var o=n("mrSG"),i=n("q1tI"),r=n("TSYQ"),a=n("Eyy1"),s=n("1O6C"),l=n("uqKQ"),c=n("RgaO"),d=n("Hr11");function u(t,e,n,o){return t+e>o&&(t=o-e),t'},COH4:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Loader=void 0;var r,o=n("mrSG"),a=n("q1tI"),i=n("TSYQ"),s=n("K9GE"),c=n("YZ9j");n("O7m7"),function(e){e[e.Initial=0]="Initial",e[e.Appear=1]="Appear",e[e.Active=2]="Active"}(r||(r={}));var l=function(e){function t(t){var n=e.call(this,t)||this;return n._stateChangeTimeout=null,n.state={state:r.Initial},n}return o.__extends(t,e),t.prototype.render=function(){var e,t=this.props,n=t.className,r=t.color,o=void 0===r?"black":r,s=i(c.item,((e={})[c[o]]=Boolean(o),e));return a.createElement("span",{className:i(c.loader,n,this._getStateClass())},a.createElement("span",{className:s}),a.createElement("span",{className:s}),a.createElement("span",{className:s}))},t.prototype.componentDidMount=function(){var e=this;this.setState({state:r.Appear}),this._stateChangeTimeout=setTimeout((function(){e.setState({state:r.Active})}),2*s.dur)},t.prototype.componentWillUnmount=function(){this._stateChangeTimeout&&(clearTimeout(this._stateChangeTimeout),this._stateChangeTimeout=null)},t.prototype._getStateClass=function(){switch(this.state.state){case r.Initial:return c["loader-initial"];case r.Appear:return c["loader-appear"];default:return""}},t}(a.PureComponent);t.Loader=l},"D/i5":function(e,t,n){e.exports={inputWrapper:"inputWrapper-6bNZbTW4",textInput:"textInput-3WRWEmm7",error:"error-v0663AtN",success:"success-7iP8kTY5",textInputLeftDirection:"textInputLeftDirection-mlAXPh8V",xsmall:"xsmall-3Ah_Or2-",small:"small-2bmxiJCE",large:"large-1JDowW2I",iconed:"iconed-3ZQvxTot",inputIcon:"inputIcon-W_Bse-a1",clearable:"clearable-2tabt_rj",clearIcon:"clearIcon-389FR5J4"}},L0Sj:function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return u}));var r=n("mrSG"),o=n("q1tI"),a=n("TSYQ"),i=n("Iivm"),s=n("Ald9"),c=n("D/i5"),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(r.__extends)(t,e),t.prototype.render=function(){var e,t,n=this.props,i=n.theme,s=n.error,l=n.success,u=n.sizeMode,d=n.leftComponent,p=n.rightComponent,m=n.grouped,f=n.columnGrouped,h=n.fontSize,v=n.reference,g=n.className,b=(n.strictLeftDirectionInput, +Object(r.__rest)(n,["theme","error","success","sizeMode","leftComponent","rightComponent","grouped","columnGrouped","fontSize","reference","className","strictLeftDirectionInput"])),y={fontSize:h},w=a(i.textInput,this.props.strictLeftDirectionInput&&c.textInputLeftDirection,((e={})[i.error]=s,e[i.success]=l,e[i[u]]=Boolean(u),e)),x=a(i.inputWrapper,((t={})[g]=Boolean(g),t[i.grouped]=m,t[i.column]=f,t)),_=[],I=o.createElement("input",Object(r.__assign)({ref:v,className:w,key:"textInput",style:y},b));if(d){var C={className:a(i.leftComponent,d.props.className),key:"leftComponent"};_.push(o.cloneElement(d,C))}if(_.push(I),p){var E={className:a(i.rightComponent,p.props.className),key:"rightComponent"};_.push(o.cloneElement(p,E))}return o.createElement("div",{className:x},_)},t}(o.PureComponent);function u(e){var t,n=e.className,u=e.icon,d=e.clearable,p=e.onClear,m=e.size,f=e.strictLeftDirectionInput,h=Object(r.__rest)(e,["className","icon","clearable","onClear","size","strictLeftDirectionInput"]),v=a(c.inputWrapper,((t={})[n]=Boolean(n),t[c.iconed]=Boolean(u),t[c.clearable]=d,t));return o.createElement(l,Object(r.__assign)({theme:c,className:v,leftComponent:u?o.createElement(i.Icon,{key:"inputIcon",icon:u,className:c.inputIcon}):void 0,rightComponent:d?o.createElement(i.Icon,{className:c.clearIcon,icon:s,key:"clearIcon",onClick:p}):void 0,sizeMode:m,strictLeftDirectionInput:f},h))}},O7m7:function(e,t,n){},XYXm:function(e,t,n){e.exports={body:"body-2N-vuwQW"}},YZ9j:function(e){e.exports=JSON.parse('{"loader":"loader-8x1ZxRwP","item":"item-2-89r_cd","tv-button-loader":"tv-button-loader-23vqS1uY","black":"black-20Ytsf0V","white":"white-1ucCcc2I","gray":"gray-XDhHSS-T","loader-initial":"loader-initial-1deQDeio","loader-appear":"loader-appear-2krFtMrd"}')},cJj4:function(e,t,n){e.exports={message:"message-2o-rtQm0",error:"error-2EW0C6z-"}},kQXJ:function(e,t,n){e.exports={footer:"footer-2Zoji8zg"}},kgsH:function(e,t,n){e.exports={header:"header-dpl-vtN_",close:"close-3kPn4OTV"}},oj21:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n("mrSG"),o=n("q1tI"),a=n("TSYQ"),i=n("qsaw"),s=n("6KyJ");function c(e){var t,n=e.active,c=void 0===n||n,l=e.children,u=e.className,d=void 0===u?"":u,p=e.disabled,m=void 0!==p&&p,f=e.grouped,h=void 0!==f&&f,v=e.growable,g=void 0!==v&&v,b=e.onClick,y=e.reference,w=e.size,x=e.theme,_=e.type,I=void 0===_?"default":_,C=e.loading,E=void 0!==C&&C,N=e.withPadding,O=void 0===N||N,k=e.title,S=void 0===k?"":k,j=e.disabledClassName,T=e.tabIndex,L=void 0===T?0:T,D=e.target,W=void 0===D?"":D,z=e.href,A=void 0===z?"":z,P=e.rounded,q=void 0!==P&&P,J=e.name,M=a(((t={})[d]=Boolean(d),t[i.button]=!0,t[i.active]=c&&!m,t[j||i.disabled]=m,t[i.grouped]=h,t[i.growable]=g,t[i.withPadding]=O,t[function(e){switch(e){case"xsmall":return i.xsmall;case"small":return i.small;case"large":return i.large;default:return""}}(w)]=Boolean(w),t[function(e){switch(e){case"ghost":return i.ghost;default:return""}}(x)]=Boolean(x),t[function(e){switch(e){case"default":return i.base;case"primary":return i.primary +;case"secondary":return i.secondary;case"secondary-script":return i.secondaryScript;case"success":return i.success;case"warning":return i.warning;case"danger":return i.danger;case"link":return i.link;default:return""}}(I)]=!0,t[i.rounded]=q,t)),B="default"===I?"black":"white",G={disabled:m,title:S,target:W,href:A};return o.createElement("button",Object(r.__assign)({name:J,className:M,tabIndex:L,onClick:E?void 0:b,ref:y},G),o.createElement("span",{className:i.hiddenText},l),E?o.createElement("span",{className:i.loader},o.createElement(s.Loader,{color:B})):o.createElement("span",{className:i.text},l))}},qsaw:function(e,t,n){e.exports={ghost:"ghost-3yO24wIn",primary:"primary-1rSzOFdX",success:"success-1qQ3_tEI",danger:"danger-jKTO4wDd",warning:"warning-2uDfz7Zc",secondary:"secondary-3ll81brZ",button:"button-2O-nMUcz",withPadding:"withPadding-_5CJoO5q",hiddenText:"hiddenText-3qcN5Wif",text:"text-2KOWx3rB",loader:"loader-1CC-1F8J",base:"base-2d4XFcnI",secondaryScript:"secondaryScript-2iIeFIWW",link:"link-2sR0CShp",xsmall:"xsmall-1aiWe3Hs",rounded:"rounded-3qEdyiAz",small:"small-2-nQtW8O",large:"large-33HYhX8D",grouped:"grouped-1WsMjajI",growable:"growable-F6tv8R_j",active:"active-2UxWxOgk",disabled:"disabled-3u0ULovv"}},uo4K:function(e,t){e.exports=''},"ycI/":function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n("mrSG"),o=n("q1tI"),a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._handleKeyDown=function(e){e.keyCode===t.props.keyCode&&t.props.handler(e)},t}return Object(r.__extends)(t,e),t.prototype.componentDidMount=function(){document.addEventListener(this.props.eventType||"keydown",this._handleKeyDown,!1)},t.prototype.componentWillUnmount=function(){document.removeEventListener(this.props.eventType||"keydown",this._handleKeyDown,!1)},t.prototype.render=function(){return null},t}(o.PureComponent)}}]); \ No newline at end of file diff --git a/public/charting_library/bundles/52.e9f9363307cf0f56bd9b.js b/public/charting_library/bundles/52.e9f9363307cf0f56bd9b.js new file mode 100644 index 00000000..6667266c --- /dev/null +++ b/public/charting_library/bundles/52.e9f9363307cf0f56bd9b.js @@ -0,0 +1,4 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[52],{"1TxM":function(t,e,r){"use strict";r.d(e,"c",(function(){return s})),r.d(e,"a",(function(){return l})),r.d(e,"b",(function(){return u}));var o=r("q1tI"),n=r.n(o),i=r("17x9"),a=r.n(i),c=n.a.createContext({});function s(t,e){a.a.checkPropTypes(e,t,"context","RegistryContext")}function l(t){var e=t.validation,r=t.value;return s(r,e),n.a.createElement(c.Provider,{value:r},t.children)}function u(){return c}},"5YsI":function(t,e,r){t.exports={button:"button-13wlLwhJ",hover:"hover-3L87f6Kw",arrow:"arrow-2pXEy7ej",arrowWrap:"arrowWrap-r5l5nQXU",isOpened:"isOpened-1939ai3F"}},"6KyJ":function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),r("mrSG").__exportStar(r("COH4"),e)},"82wv":function(t,e,r){"use strict";r.d(e,"a",(function(){return h}));var o=r("mrSG"),n=r("q1tI"),i=r("TSYQ"),a=r("9dlw"),c=r("ML8+"),s=r("QpNh"),l=r("mkWe"),u=r("Sn4D"),p=r("Iksw"),d=r("5YsI"),h=function(t){function e(e){var r=t.call(this,e)||this;return r._wrapperRef=null,r._controller=n.createRef(),r._handleWrapperRef=function(t){r._wrapperRef=t,r.props.reference&&r.props.reference(t)},r._handleClick=function(t){t.target instanceof Node&&t.currentTarget.contains(t.target)&&(r._handleToggleDropdown(),r.props.onClick&&r.props.onClick(t,!r.state.isOpened))},r._handleToggleDropdown=function(t){var e=r.props,o=e.onClose,n=e.onOpen,i=r.state.isOpened,a="boolean"==typeof t?t:!i;r.setState({isOpened:a}),a&&n&&n(),!a&&o&&o()},r._handleClose=function(){r.close()},r.state={isOpened:!1},r}return Object(o.__extends)(e,t),e.prototype.render=function(){var t,e=this.props,r=e.id,d=e.arrow,h=e.children,f=e.content,m=e.isDisabled,v=e.isDrawer,b=e.drawerPosition,w=void 0===b?"Bottom":b,g=e.isShowTooltip,O=e.minWidth,D=e.title,_=e.className,T=e.menuClassName,C=e.hotKey,E=e.theme,x=this.state.isOpened,N=i(_,E.button,((t={})["apply-common-tooltip"]=g||!m,t[E.isDisabled]=m,t[E.isOpened]=x,t)),S=x&&v&&w,k={horizontalMargin:this.props.horizontalMargin||0,verticalMargin:this.props.verticalMargin||2,verticalAttachEdge:this.props.verticalAttachEdge,horizontalAttachEdge:this.props.horizontalAttachEdge,verticalDropDirection:this.props.verticalDropDirection,horizontalDropDirection:this.props.horizontalDropDirection};return n.createElement("div",Object(o.__assign)({id:r,className:N,onClick:m?void 0:this._handleClick,title:D,"data-tooltip-hotkey":C,ref:this._handleWrapperRef,"data-role":"button"},Object(s.a)(this.props)),f,d&&n.createElement("div",{className:E.arrow},n.createElement("div",{className:E.arrowWrap},n.createElement(c.a,{dropped:x}))),S?n.createElement(l.b,null,n.createElement(u.a,{onClose:this._handleClose,position:w},h)):n.createElement(a.a,{controller:this._controller,closeOnClickOutside:this.props.closeOnClickOutside,doNotCloseOn:this,isOpened:x,minWidth:O,onClose:this._handleClose,position:Object(p.c)(this._wrapperRef,k),className:T},h))},e.prototype.close=function(){this._handleToggleDropdown(!1)},e.prototype.update=function(){ +null!==this._controller.current&&this._controller.current.update()},e.defaultProps={arrow:!0,closeOnClickOutside:!0,theme:d},e}(n.PureComponent)},COH4:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Loader=void 0;var o,n=r("mrSG"),i=r("q1tI"),a=r("TSYQ"),c=r("K9GE"),s=r("YZ9j");r("O7m7"),function(t){t[t.Initial=0]="Initial",t[t.Appear=1]="Appear",t[t.Active=2]="Active"}(o||(o={}));var l=function(t){function e(e){var r=t.call(this,e)||this;return r._stateChangeTimeout=null,r.state={state:o.Initial},r}return n.__extends(e,t),e.prototype.render=function(){var t,e=this.props,r=e.className,o=e.color,n=void 0===o?"black":o,c=a(s.item,((t={})[s[n]]=Boolean(n),t));return i.createElement("span",{className:a(s.loader,r,this._getStateClass())},i.createElement("span",{className:c}),i.createElement("span",{className:c}),i.createElement("span",{className:c}))},e.prototype.componentDidMount=function(){var t=this;this.setState({state:o.Appear}),this._stateChangeTimeout=setTimeout((function(){t.setState({state:o.Active})}),2*c.dur)},e.prototype.componentWillUnmount=function(){this._stateChangeTimeout&&(clearTimeout(this._stateChangeTimeout),this._stateChangeTimeout=null)},e.prototype._getStateClass=function(){switch(this.state.state){case o.Initial:return s["loader-initial"];case o.Appear:return s["loader-appear"];default:return""}},e}(i.PureComponent);e.Loader=l},Iksw:function(t,e,r){"use strict";r.d(e,"a",(function(){return o})),r.d(e,"b",(function(){return i})),r.d(e,"c",(function(){return l}));var o,n,i,a,c=r("Eyy1");!function(t){t[t.Top=0]="Top",t[t.Bottom=1]="Bottom"}(o||(o={})),function(t){t[t.Left=0]="Left",t[t.Right=1]="Right"}(n||(n={})),function(t){t[t.FromTopToBottom=0]="FromTopToBottom",t[t.FromBottomToTop=1]="FromBottomToTop"}(i||(i={})),function(t){t[t.FromLeftToRight=0]="FromLeftToRight",t[t.FromRightToLeft=1]="FromRightToLeft"}(a||(a={}));var s={verticalAttachEdge:o.Bottom,horizontalAttachEdge:n.Left,verticalDropDirection:i.FromTopToBottom,horizontalDropDirection:a.FromLeftToRight,verticalMargin:0,horizontalMargin:0};function l(t,e){return function(r,l){var u=Object(c.ensureNotNull)(t).getBoundingClientRect(),p=e.verticalAttachEdge,d=void 0===p?s.verticalAttachEdge:p,h=e.verticalDropDirection,f=void 0===h?s.verticalDropDirection:h,m=e.horizontalAttachEdge,v=void 0===m?s.horizontalAttachEdge:m,b=e.horizontalDropDirection,w=void 0===b?s.horizontalDropDirection:b,g=e.horizontalMargin,O=void 0===g?s.horizontalMargin:g,D=e.verticalMargin,_=void 0===D?s.verticalMargin:D,T=d===o.Top?-1*_:_,C=v===n.Right?u.right:u.left,E=d===o.Top?u.top:u.bottom;return{x:C-(w===a.FromRightToLeft?r:0)+O,y:E-(f===i.FromBottomToTop?l:0)+T}}}},"ML8+":function(t,e,r){"use strict";r.d(e,"a",(function(){return s}));var o=r("q1tI"),n=r("TSYQ"),i=r("Iivm"),a=r("cvzQ"),c=r("R4+T");function s(t){var e,r=t.dropped,s=t.className;return o.createElement(i.Icon,{className:n(s,a.icon,(e={},e[a.dropped]=r,e)),icon:c})}},O7m7:function(t,e,r){},"R4+T":function(t,e){ +t.exports=''},Sn4D:function(t,e,r){"use strict";r.d(e,"a",(function(){return f}));var o=r("q1tI"),n=r.n(o),i=r("Eyy1"),a=r("TSYQ"),c=r("x0D+"),s=r("Nkvk"),l=r("AiMB"),u=r("mkWe"),p=r("qFKp"),d=r("X0gx"),h=r("sHQ4");function f(t){var e=t.position,r=t.onClose,f=t.children,m=t.className,v=Object(i.ensureNotNull)(Object(o.useContext)(u.a)),b=Object(o.useState)(0),w=b[0],g=b[1],O=Object(o.useRef)(null),D=Object(o.useContext)(d.a);return Object(o.useEffect)((function(){var t;return null===(t=O.current)||void 0===t||t.focus({preventScroll:!0}),D.subscribe(v,r),Object(s.setFixedBodyState)(!0),p.CheckMobile.iOS()&&Object(c.disableBodyScroll)(Object(i.ensureNotNull)(O.current)),g(v.addDrawer()),function(){D.unsubscribe(v,r);var t=v.removeDrawer();p.CheckMobile.iOS()&&Object(c.enableBodyScroll)(Object(i.ensureNotNull)(O.current)),0===t&&Object(s.setFixedBodyState)(!1)}}),[]),n.a.createElement(l.a,null,n.a.createElement("div",{className:a(h.wrap,h["position"+e])},w===v.currentDrawer&&n.a.createElement("div",{className:h.backdrop,onClick:r}),n.a.createElement("div",{className:a(h.drawer,h["position"+e],m),ref:function(t){O.current=t},tabIndex:-1,onScroll:function(t){t.stopPropagation()}},f)))}},YZ9j:function(t){t.exports=JSON.parse('{"loader":"loader-8x1ZxRwP","item":"item-2-89r_cd","tv-button-loader":"tv-button-loader-23vqS1uY","black":"black-20Ytsf0V","white":"white-1ucCcc2I","gray":"gray-XDhHSS-T","loader-initial":"loader-initial-1deQDeio","loader-appear":"loader-appear-2krFtMrd"}')},bQ7Y:function(t,e,r){t.exports={button:"button-2ioYhFEY",hover:"hover-yHQNmTbI",isInteractive:"isInteractive-20uLObIc",isGrouped:"isGrouped-2BBXQnbO",isActive:"isActive-22S-lGpa",isOpened:"isOpened-p-Ume5l9",isDisabled:"isDisabled-1_tmrLfP",text:"text-1sK7vbvh",icon:"icon-beK_KS0k"}},cvzQ:function(t,e,r){t.exports={icon:"icon-3yfDkFjY",dropped:"dropped-50rfOQ8V"}},mkWe:function(t,e,r){"use strict";r.d(e,"b",(function(){return a})),r.d(e,"a",(function(){return c}));var o=r("mrSG"),n=r("q1tI"),i=r.n(n),a=function(t){function e(e){var r=t.call(this,e)||this;return r._addDrawer=function(){var t=r.state.currentDrawer+1;return r.setState({currentDrawer:t}),t},r._removeDrawer=function(){var t=r.state.currentDrawer-1;return r.setState({currentDrawer:t}),t},r.state={currentDrawer:0},r}return Object(o.__extends)(e,t),e.prototype.render=function(){return i.a.createElement(c.Provider,{value:{addDrawer:this._addDrawer,removeDrawer:this._removeDrawer,currentDrawer:this.state.currentDrawer}},this.props.children)},e}(i.a.PureComponent),c=i.a.createContext(null)},nPPD:function(t,e,r){"use strict";function o(t,e,r){void 0===r&&(r={});for(var o=Object.assign({},e),n=0,i=Object.keys(e);n]/g,n=function(e){return"&#"+e.charCodeAt(0)+";"};function r(e){return e.replace(o,n)}function s(e){return void 0===e&&(e=""),e.replace(/\s+/g,"")}function l(e){return void 0===e&&(e=""),e.replace(/\b\w/g,(function(e){return e.toUpperCase()}))}},Equz:function(e,i,t){"use strict";t.d(i,"a",(function(){return A}));var o=t("mrSG"),n=t("Eyy1"),r=t("HSjo"),s=t("n5al"),l=t("hY0g"),c=t.n(l),a=t("Kxc7"),d=t("Z5lT"),u=t("25b6"),h=window.t("Color Bars Based on Previous Close"),b=window.t("HLC Bars"),p=window.t("Up Color"),w=window.t("Down Color"),y=window.t("Thin Bars"),f=window.t("Body"),C=window.t("Borders"),S=window.t("Wick"),O=window.t("Price Source"),j=window.t("Type"),v=window.t("Line"),_=window.t("Top Line"),g=window.t("Bottom Line"),m=window.t("Fill"),P=window.t("Fill Top Area"),L=window.t("Fill Bottom Area"),B=(window.t("Up bars"),window.t("Down bars"),window.t("Projection up bars"),window.t("Projection down bars"),window.t("Show real prices on price scale (instead of Heikin-Ashi price)")),M=window.t("Base Level"),k=window.t("Body"),D=window.t("Borders"),T=window.t("Labels");function E(e,i,t,o){var n=Object(u.c)(t);return[Object(r.r)({checked:Object(r.b)(e,i.drawBody,"Change "+t+" Body Visibility"),color1:Object(r.u)(e,i.upColor,null,"Change "+t+" Up Color"),color2:Object(r.u)(e,i.downColor,null,"Change "+t+" Down Color")},{id:o+"Symbol"+n+"CandlesColor",title:f}),Object(r.r)({checked:Object(r.b)(e,i.drawBorder,"Change "+t+" Border Visibility"),color1:Object(r.u)(e,i.borderUpColor,null,"Change "+t+" Up Border Color"),color2:Object(r.u)(e,i.borderDownColor,null,"Change "+t+" Down Border Color")},{id:o+"Symbol"+n+"BordersColor",title:C}),Object(r.r)({checked:Object(r.b)(e,i.drawWick,"Change "+t+" Wick Visibility"),color1:Object(r.u)(e,i.wickUpColor,null,"Change "+t+" Wick Up Color"),color2:Object(r.u)(e,i.wickDownColor,null,"Change "+t+" Wick Down Color")},{id:o+"Symbol"+n+"WickColors",title:S})]}function A(e,i,t,l,u){switch(t){case 0:return function(e,i,t){return[Object(r.c)({checked:Object(r.b)(e,i.barColorsOnPrevClose,"Change Color Bars Based on Previous Close")},{id:t+"SymbolBarStyleBarColorsOnPrevClose",title:h}),Object(r.c)({checked:Object(r.b)(e,i.dontDrawOpen,"Change HLC Bars")},{id:t+"SymbolDontDrawOpen",title:b}),Object(r.e)({color:Object(r.u)(e,i.upColor,null,"Change Bar Up Color")},{id:t+"SymbolUpColor",title:p}),Object(r.e)({color:Object(r.u)(e,i.downColor,null,"Change Bar Down Color")},{id:t+"SymbolDownColor",title:w}),Object(r.c)({checked:Object(r.b)(e,i.thinBars,"Change Thin Bars")},{id:t+"SymbolBarThinBars",title:y})]}(e,i.barStyle.childs(),u);case 1:return function(e,i,t){ +var n=Object(r.c)({checked:Object(r.b)(e,i.barColorsOnPrevClose,"Change Color Bars Based on Previous Close")},{id:t+"SymbolCandleStyleBarColorsOnPrevClose",title:h});return Object(o.__spreadArrays)([n],E(e,i,"Candle",t))}(e,i.candleStyle.childs(),u);case 2:return function(e,i,t,o,n){return[Object(r.j)({option:Object(r.b)(e,i.priceSource,"Change Price Source")},{id:n+"SymbolLinePriceSource",title:O,options:new c.a(t)}),Object(r.j)({option:Object(r.b)(e,i.styleType,"Change Line Type")},{id:n+"SymbolStyleType",title:j,options:new c.a(o)}),Object(r.h)({color:Object(r.u)(e,i.color,null,"Change Line Color"),width:Object(r.b)(e,i.linewidth,"Change Line Width")},{id:n+"SymbolLineStyle",title:v})]}(e,i.lineStyle.childs(),l.seriesPriceSources,l.lineStyleTypes,u);case 3:return function(e,i,t,o){return[Object(r.j)({option:Object(r.b)(e,i.priceSource,"Change Area Price Source")},{id:o+"SymbolAreaPriceSource",title:O,options:new c.a(t)}),Object(r.h)({color:Object(r.u)(e,i.linecolor,null,"Change Area Line Color"),width:Object(r.b)(e,i.linewidth,"Change Area Line Width")},{id:o+"SymbolAreaLineStyle",title:v}),Object(r.r)({color1:Object(r.u)(e,i.color1,i.transparency,"Change Area Fill Color"),color2:Object(r.u)(e,i.color2,i.transparency,"Change Area Fill Color")},{id:o+"SymbolAreaFills",title:m})]}(e,i.areaStyle.childs(),l.seriesPriceSources,u);case 9:return E(e,i.hollowCandleStyle.childs(),"Hollow Candles",u);case 10:return function(e,i,t,o){return[Object(r.j)({option:Object(r.b)(e,i.priceSource,"Change Baseline Price Source")},{id:o+"SymbolBaseLinePriceSource",title:O,options:new c.a(t)}),Object(r.h)({color:Object(r.u)(e,i.topLineColor,null,"Change Baseline Top Line Color"),width:Object(r.b)(e,i.topLineWidth,"Change Baseline Top Line Width")},{id:o+"SymbolBaseLineTopLine",title:_}),Object(r.h)({color:Object(r.u)(e,i.bottomLineColor,null,"Change Baseline Bottom Line Color"),width:Object(r.b)(e,i.bottomLineWidth,"Change Baseline Bottom Line Width")},{id:o+"SymbolBaseLineBottomLine",title:g}),Object(r.r)({color1:Object(r.u)(e,i.topFillColor1,null,"Change Baseline Fill Top Area Color"),color2:Object(r.u)(e,i.topFillColor2,null,"Change Baseline Fill Top Area Color")},{id:o+"SymbolBaseLineTopFills",title:P}),Object(r.r)({color1:Object(r.u)(e,i.bottomFillColor1,null,"Change Baseline Fill Bottom Area Color"),color2:Object(r.u)(e,i.bottomFillColor2,null,"Change Baseline Fill Bottom Area Color")},{id:o+"SymbolBaseLineBottomFills",title:L}),Object(r.i)({value:Object(r.b)(e,i.baseLevelPercentage,"Change Base Level",[d.b])},{id:o+"SymbolBaseLevelPercentage",title:M,type:0,min:new c.a(0),max:new c.a(100),step:new c.a(1),unit:new c.a("%")})]}(e,i.baselineStyle.childs(),l.seriesPriceSources,u)}if(!i.hasOwnProperty("haStyle"))return[];if(l.isJapaneseChartsAvailable&&8===t)return function(e,i,t){var n=Object(r.c)({checked:Object(r.b)(e,i.showRealLastPrice,"Change Show real prices on price scale (instead of Heiken-Ashi price)")},{id:t+"SymbolRealLastPrice",title:B}),s=Object(r.c)({ +checked:Object(r.b)(e,i.barColorsOnPrevClose,"Change Color Bars Based on Previous Close")},{id:t+"SymbolHAStyleBarColorsOnPrevClose",title:h});return Object(o.__spreadArrays)([n,s],E(e,i,"Heikin Ashi",t))}(e,i.haStyle.childs(),u);if(l.isJapaneseChartsAvailable&&a.enabled("japanese_chart_styles"));if(a.enabled("chart_style_hilo")&&12===t){var f=i.hiloStyle.childs(),C=Object(s.chartStyleStudyId)(12);return function(e,i,t,o){var n=Object(r.e)({checked:Object(r.b)(e,i.drawBody,"Change High-Low Body Visibility"),color:Object(r.u)(e,i.color,null,"Change High-Low Body Color")},{id:o+"SymbolBodiesColor",title:k}),s=Object(r.e)({checked:Object(r.b)(e,i.showBorders,"Change Show High-Low Borders"),color:Object(r.u)(e,i.borderColor,null,"Change High-Low Border Color")},{id:o+"SymbolBorderColor",title:D}),l=t.map((function(e){return{title:String(e),value:e}}));return[n,s,Object(r.p)({checked:Object(r.b)(e,i.showLabels,"Change Show High-Low Labels"),color:Object(r.u)(e,i.labelColor,null,"Change High-Low Labels Color"),size:Object(r.b)(e,i.fontSize,"Change High-Low Labels Font Size")},{id:o+"SymbolLabels",title:T,isEditable:!1,isMultiLine:!1,sizeItems:l})]}(e,f,Object(n.ensure)(l.defaultSeriesFontSizes)[C],u)}return[]}},Z5lT:function(e,i,t){"use strict";t.d(i,"b",(function(){return n})),t.d(i,"a",(function(){return r})),t.d(i,"c",(function(){return s}));var o=t("T6Of");function n(e){return Math.floor(e)}function r(e){return parseInt(String(e))}function s(e){var i=new o.LimitedPrecisionNumericFormatter(e);return function(e){if(null===e)return e;var t=i.parse(i.format(e));return t.res?t.value:null}}},zqjM:function(e,i,t){"use strict";var o=t("mrSG"),n=t("Eyy1"),r=t("HSjo"),s=t("hY0g"),l=t.n(s),c=t("n5al"),a=t("dfhE"),d=t("Equz"),u=t("Z5lT");function h(e){return e.map((function(e){return{value:e,title:window.t(e)}}))}function b(e,i,t,o,s,a,d){var b=[];return t.forEach((function(t){if(function(e,i){return!e.isHidden&&(void 0===e.visible||function(e,i){if(!e)return!0;var t=e.split("==");return!(t.length<2)&&i[t[0]].value()===t[1]}(e.visible,i))}(t,o)){var p=t.id;if(o.hasOwnProperty(p)){var w=o[p],y=function(e,i){return"style"===e.id?window.t("Box size assignment method"):"boxSize"===e.id?window.t("Box Size"):window.t(i.childs().name.value())}(t,s[p]);if("options"in t){var f=Object(n.ensure)(t.options);b.push(Object(r.j)({option:Object(r.b)(e,w,"Change "+y)},{id:""+d+t.name,title:y,options:new l.a(h(f))}))}else if("integer"!==t.type){if("float"===t.type){var C=void 0;return C=function(e,i){return!((i===Object(c.chartStyleStudyId)(4)||i===Object(c.chartStyleStudyId)(6))&&"boxSize"===e||i===Object(c.chartStyleStudyId)(5)&&"reversalAmount"===e)}(p,i)||null===a.value()?new l.a(t.min):a,void b.push(Object(r.i)({value:Object(r.b)(e,w,"Change "+y)},{id:""+d+t.name,title:y,type:1,min:C,max:new l.a(t.max),defval:t.defval}))}"text"!==t.type?"bool"!==t.type||b.push(Object(r.c)({checked:Object(r.b)(e,w,"Change "+y)},{id:""+d+t.name,title:y})):b.push(Object(r.p)({text:Object(r.b)(e,w,"Change "+y)},{id:""+d+t.name,title:y,isEditable:!0,isMultiLine:!1 +}))}else b.push(Object(r.i)({value:Object(r.b)(e,w,"Change "+y,[u.b])},{id:""+d+t.name,title:y,type:0,min:new l.a(t.min),max:new l.a(t.max),defval:t.defval}))}}})),b}var p,w=t("txPx"),y=t("Cf1E");t.d(i,"b",(function(){return I})),t.d(i,"c",(function(){return H})),t.d(i,"d",(function(){return W})),t.d(i,"a",(function(){return x}));var f=Object(w.getLogger)("Chart.Definitions.Series"),C=(window.t("Adjust Data for Dividends"),window.t("Extended Hours (Intraday Only)")),S=window.t("Last Price Line"),O=(window.t("Previous Day Close Price Line"),window.t("Bid and Ask lines"),window.t("Pre/Post Market Price Line"),window.t("Precision")),j=window.t("Time Zone"),v=window.t("Open"),_=window.t("High"),g=window.t("Low"),m=window.t("Close"),P=window.t("(H + L)/2"),L=window.t("(H + L + C)/3"),B=window.t("(O + H + L + C)/4"),M=window.t("Simple"),k=window.t("With Markers"),D=window.t("Step"),T=window.t("Default"),E=((p={})[Object(c.chartStyleStudyId)(12)]=[7,8,9,10,11,12,14,16,20,24,28,32,40],p),A=[{priceScale:1,minMove:1,frac:!1},{priceScale:10,minMove:1,frac:!1},{priceScale:100,minMove:1,frac:!1},{priceScale:1e3,minMove:1,frac:!1},{priceScale:1e4,minMove:1,frac:!1},{priceScale:1e5,minMove:1,frac:!1},{priceScale:1e6,minMove:1,frac:!1},{priceScale:1e7,minMove:1,frac:!1},{priceScale:1e8,minMove:1,frac:!1},{priceScale:2,minMove:1,frac:!0},{priceScale:4,minMove:1,frac:!0},{priceScale:8,minMove:1,frac:!0},{priceScale:16,minMove:1,frac:!0},{priceScale:32,minMove:1,frac:!0},{priceScale:64,minMove:1,frac:!0},{priceScale:128,minMove:1,frac:!0},{priceScale:320,minMove:1,frac:!0}],I=[{title:v,value:"open"},{title:_,value:"high"},{title:g,value:"low"},{title:m,value:"close"},{title:P,value:"hl2"},{title:L,value:"hlc3"},{title:B,value:"ohlc4"}],H=[{title:M,value:a.STYLE_LINE_TYPE_SIMPLE},{title:k,value:a.STYLE_LINE_TYPE_MARKERS},{title:D,value:a.STYLE_LINE_TYPE_STEP}];function W(){for(var e=[{title:T,value:"default"}],i=0;i0?this._inputsSubscriptions=o:this._inputsSubscriptions=null},e.prototype._createSeriesDefinitions=function(){var e=this,i=this._series.properties().childs(),t=this._series.getInputsProperties(),s=this._series.getInputsInfoProperties(),a=i.style.value(),u=this._series.getStyleShortName();return new Promise((function(i){var o=Object(c.chartStyleStudyId)(a);null!==o?e._model.studyMetaInfoRepository().findById({type:"java",studyId:o}).then((function(o){if(e._isDestroyed)throw new Error("SeriesPropertyDefinitionsViewModel already destroyed");if(null===e._definitions){var r=Object(n.ensureNotNull)(e._seriesMinTickWV),l=b(e._undoModel,o.id,o.inputs,t,s,r,u);e._subscribeInputsUpdate(o.inputs,t),i(l)}else i(null)})).catch((function(e){f.logWarn("Find meta info for create series definitions with error - "+Object(y.a)(e)),i(null)})):i(null)})).then((function(t){if(e._isDestroyed)throw new Error("SeriesPropertyDefinitionsViewModel already destroyed");if(null!==e._definitions)return e._definitions;var n=Object(d.a)(e._undoModel,i,a,{seriesPriceSources:I,lineStyleTypes:H,isJapaneseChartsAvailable:!0,defaultSeriesFontSizes:E},"mainSeries");null!==t&&n.push.apply(n,t);var s=Object(r.j)({option:Object(r.b)(e._undoModel,i.minTick,"Change Decimal Places")},{id:u+"SymbolMinTick",title:O,options:new l.a(W())}),c=Object(r.j)({option:Object(r.b)(e._undoModel,e._timezonePropertyObj.property,"Change Timezone")},{id:u+"SymbolTimezone",title:j,options:new l.a(e._timezonePropertyObj.values)}) +;return e._definitions=Object(o.__spreadArrays)([Object(r.k)(n,"generalSymbolStylesGroup")],e._seriesPriceLinesDefinitions(u),e._seriesDataDefinitions(u),[s,c]),e._definitions}))},e.prototype._seriesDataDefinitions=function(e){this._series.dividendsAdjustmentProperty();return[]},e.prototype._createOutOfSessionDefinition=function(e){var i=this._series.properties().childs().extendedHours,t=this._model.sessions().properties().childs().graphics.childs().backgrounds.childs().outOfSession.childs();return Object(r.e)({disabled:Object(r.b)(this._undoModel,this._series.isDWMProperty(),"Change Disabled Extended hours visibility"),checked:Object(r.b)(this._undoModel,i,"Change Extended hours visibility"),color:Object(r.u)(this._undoModel,t.color,t.transparency,"Change Extended hours color")},{id:e+"SymbolExtendedHours",title:C})},e.prototype._createPrePostMarketDefinition=function(e){var i=this._series.properties().childs().extendedHours,t=this._model.sessions(),o=t.properties().childs().graphics.childs().backgrounds.childs().preMarket.childs(),n=t.properties().childs().graphics.childs().backgrounds.childs().postMarket.childs();return Object(r.r)({disabled:Object(r.b)(this._undoModel,this._series.isDWMProperty(),"Change Disabled Extended hours visibility"),checked:Object(r.b)(this._undoModel,i,"Change Extended hours visibility"),color1:Object(r.u)(this._undoModel,o.color,o.transparency,"Change Pre Market Color"),color2:Object(r.u)(this._undoModel,n.color,n.transparency,"Change Post Market Down Color")},{id:e+"SymbolExtendedHours",title:C})},e.prototype._seriesPriceLinesDefinitions=function(e){var i=[],t=this._series.properties().childs();if(this._series.hasClosePrice()){var o=Object(r.h)({checked:Object(r.b)(this._undoModel,t.showPriceLine,"Change Price Price Line"),color:Object(r.u)(this._undoModel,t.priceLineColor,null,"Change Price Line Color"),width:Object(r.b)(this._undoModel,t.priceLineWidth,"Change Price Line Width")},{id:e+"SymbolLastValuePriceLine",title:S});i.push(o)}return this._series.hasClosePrice(),i},e}()}}]); \ No newline at end of file diff --git a/public/charting_library/bundles/55.07422567f0fbb1810a02.js b/public/charting_library/bundles/55.07422567f0fbb1810a02.js new file mode 100644 index 00000000..4185c340 --- /dev/null +++ b/public/charting_library/bundles/55.07422567f0fbb1810a02.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[55],[]]); \ No newline at end of file diff --git a/public/charting_library/bundles/55.92e5c3a0907e418f2072.css b/public/charting_library/bundles/55.92e5c3a0907e418f2072.css new file mode 100644 index 00000000..e1548532 --- /dev/null +++ b/public/charting_library/bundles/55.92e5c3a0907e418f2072.css @@ -0,0 +1 @@ +.tv-button{position:relative;display:inline-block;vertical-align:middle;min-width:40px;margin:0;padding:1px 22px;-webkit-user-select:none;user-select:none;line-height:32px;text-align:center;white-space:nowrap;text-decoration:none;font-size:14px;color:#757575;fill:currentColor;border:none;border-radius:4px;outline:0;background-color:transparent;cursor:pointer;overflow:hidden;box-sizing:border-box;-webkit-tap-highlight-color:transparent;transition:background-color .35s ease,border-color .35s ease,color .35s ease}.tv-button.tv-button--danger_ghost,.tv-button.tv-button--default,.tv-button.tv-button--default_ghost,.tv-button.tv-button--primary_ghost,.tv-button.tv-button--secondary_ghost,.tv-button.tv-button--state,.tv-button.tv-button--success_ghost,.tv-button.tv-button--warning_ghost{padding:0 21px}.tv-button.i-active,.tv-button.i-hover,.tv-button:active{transition-duration:.06s}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button:hover{transition-duration:.06s}}.tv-button svg{vertical-align:middle}.tv-button--block{display:block;width:100%;text-align:center}.tv-button+.tv-button{margin-left:15px}.tv-button.tv-button--no-left-margin{margin-left:0}.tv-button__text{position:relative;display:inline-block}.tv-button__text--full-height{display:flex;align-items:center;justify-content:center;height:100%;width:100%;white-space:normal;word-wrap:break-word;line-height:1.2em;margin:11px 5px}.tv-button--default,.tv-button--default_ghost{color:#fff;border-color:#fff;background-color:#fff}html.theme-dark .tv-button--default,html.theme-dark .tv-button--default_ghost{background-color:#1e222d;border-color:#1e222d}.tv-button--default_ghost{color:#fff}html.theme-dark .tv-button--default_ghost{color:#1e222d}.tv-button--default_ghost.i-checked{color:#fff;border-color:#fff;background-color:#fff}html.theme-dark .tv-button--default_ghost.i-checked{background-color:#1e222d;border-color:#1e222d}.tv-button--default.i-active,.tv-button--default:active,.tv-button--default_ghost.i-active,.tv-button--default_ghost:active{color:#fff;border-color:#ececec;background-color:#ececec;transform:translateY(1px)}html.theme-dark .tv-button--default.i-active,html.theme-dark .tv-button--default:active,html.theme-dark .tv-button--default_ghost.i-active,html.theme-dark .tv-button--default_ghost:active{background-color:#1c2030;border-color:#1c2030}.tv-button--default.i-hover,.tv-button--default_ghost.i-hover{color:#fff;border-color:#f2f2f2;background-color:#f2f2f2}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--default:hover,.tv-button--default_ghost:hover{color:#fff;border-color:#f2f2f2;background-color:#f2f2f2}}html.theme-dark .tv-button--default.i-hover,html.theme-dark .tv-button--default_ghost.i-hover{background-color:#1c2030}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button--default:hover,html.theme-dark .tv-button--default_ghost:hover{background-color:#1c2030}}html.theme-dark .tv-button--default.i-hover,html.theme-dark .tv-button--default_ghost.i-hover{border-color:#1c2030}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button--default:hover,html.theme-dark .tv-button--default_ghost:hover{border-color:#1c2030}}.tv-button--default_ghost .tv-button__loader-item{background-color:#f2f2f2}html.theme-dark .tv-button--default_ghost .tv-button__loader-item{background-color:#1c2030}.tv-button--default_ghost.i-hover .tv-button__loader-item{background-color:#fff}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--default_ghost:hover .tv-button__loader-item{background-color:#fff}}.tv-button--default,.tv-button--default.i-checked,.tv-button--default_ghost,.tv-button--default_ghost.i-checked{color:#757575;border:1px solid;border-color:#b5b7b9}html.theme-dark .tv-button--default,html.theme-dark .tv-button--default.i-checked,html.theme-dark .tv-button--default_ghost,html.theme-dark .tv-button--default_ghost.i-checked{border-color:#363c4e;color:#758696}.tv-button--default.i-hover,.tv-button--default_ghost.i-hover{color:#757575;border-color:#b5b7b9}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--default:hover,.tv-button--default_ghost:hover{color:#757575;border-color:#b5b7b9}}html.theme-dark .tv-button--default.i-hover,html.theme-dark .tv-button--default_ghost.i-hover{border-color:#363c4e}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button--default:hover,html.theme-dark .tv-button--default_ghost:hover{border-color:#363c4e}}html.theme-dark .tv-button--default.i-hover,html.theme-dark .tv-button--default_ghost.i-hover{color:#758696}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button--default:hover,html.theme-dark .tv-button--default_ghost:hover{color:#758696}}.tv-button--default.i-active,.tv-button--default:active,.tv-button--default_ghost.i-active,.tv-button--default_ghost:active{color:#757575;border-color:#b5b7b9}html.theme-dark .tv-button--default.i-active,html.theme-dark .tv-button--default:active,html.theme-dark .tv-button--default_ghost.i-active,html.theme-dark .tv-button--default_ghost:active{border-color:#363c4e;color:#758696}.tv-button--primary,.tv-button--primary_ghost{color:#fff;border-color:#2196f3;background-color:#2196f3}html.theme-dark .tv-button--primary,html.theme-dark .tv-button--primary_ghost{background-color:#1976d2;border-color:#1976d2;color:#fff}.tv-button--primary_ghost{color:#2196f3}html.theme-dark .tv-button--primary_ghost{color:#1976d2}.tv-button--primary_ghost.i-checked{color:#fff;border-color:#2196f3;background-color:#2196f3}html.theme-dark .tv-button--primary_ghost.i-checked{background-color:#1976d2;border-color:#1976d2;color:#fff}.tv-button--primary.i-active,.tv-button--primary:active,.tv-button--primary_ghost.i-active,.tv-button--primary_ghost:active{color:#fff;border-color:#1e88e5;background-color:#1e88e5;transform:translateY(1px)}.tv-button--primary.i-hover,.tv-button--primary_ghost.i-hover,html.theme-dark .tv-button--primary.i-active,html.theme-dark .tv-button--primary:active,html.theme-dark .tv-button--primary_ghost.i-active,html.theme-dark .tv-button--primary_ghost:active{background-color:#1e88e5;border-color:#1e88e5;color:#fff}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--primary:hover,.tv-button--primary_ghost:hover{color:#fff;border-color:#1e88e5;background-color:#1e88e5}}html.theme-dark .tv-button--primary.i-hover,html.theme-dark .tv-button--primary_ghost.i-hover{background-color:#1e88e5}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button--primary:hover,html.theme-dark .tv-button--primary_ghost:hover{background-color:#1e88e5}}html.theme-dark .tv-button--primary.i-hover,html.theme-dark .tv-button--primary_ghost.i-hover{border-color:#1e88e5}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button--primary:hover,html.theme-dark .tv-button--primary_ghost:hover{border-color:#1e88e5}}html.theme-dark .tv-button--primary.i-hover,html.theme-dark .tv-button--primary_ghost.i-hover{color:#fff}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button--primary:hover,html.theme-dark .tv-button--primary_ghost:hover{color:#fff}}.tv-button--primary_ghost .tv-button__loader-item,html.theme-dark .tv-button--primary_ghost .tv-button__loader-item{background-color:#1e88e5}.tv-button--primary_ghost.i-hover .tv-button__loader-item{background-color:#fff}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--primary_ghost:hover .tv-button__loader-item{background-color:#fff}}html.theme-dark .tv-button--primary_ghost.i-hover .tv-button__loader-item{background-color:#fff}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button--primary_ghost:hover .tv-button__loader-item{background-color:#fff}}.tv-button--secondary,.tv-button--secondary_ghost{color:#757575;border-color:#e9eff2;background-color:#e9eff2}.tv-button--secondary_ghost{color:#757575}.tv-button--secondary_ghost.i-checked{color:#757575;border-color:#e9eff2;background-color:#e9eff2}.tv-button--secondary.i-active,.tv-button--secondary:active,.tv-button--secondary_ghost.i-active,.tv-button--secondary_ghost:active{color:#757575;border-color:#cfdce3;background-color:#cfdce3;transform:translateY(1px)}.tv-button--secondary.i-hover,.tv-button--secondary_ghost.i-hover{color:#757575;border-color:#dce6ea;background-color:#dce6ea}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--secondary:hover,.tv-button--secondary_ghost:hover{color:#757575;border-color:#dce6ea;background-color:#dce6ea}}.tv-button--secondary_ghost .tv-button__loader-item{background-color:#dce6ea}.tv-button--secondary_ghost.i-hover .tv-button__loader-item{background-color:#757575}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--secondary_ghost:hover .tv-button__loader-item{background-color:#757575}}.tv-button--success,.tv-button--success_ghost{color:#fff;border-color:#009688;background-color:#009688}html.theme-dark .tv-button--success,html.theme-dark .tv-button--success_ghost{background-color:#00796b;border-color:#00796b;color:#fff}.tv-button--success_ghost{color:#009688}html.theme-dark .tv-button--success_ghost{color:#00796b}.tv-button--success_ghost.i-checked{color:#fff;border-color:#009688;background-color:#009688}html.theme-dark .tv-button--success_ghost.i-checked{background-color:#00796b;border-color:#00796b;color:#fff}.tv-button--success.i-active,.tv-button--success:active,.tv-button--success_ghost.i-active,.tv-button--success_ghost:active{color:#fff;border-color:#00796b;background-color:#00796b;transform:translateY(1px)}html.theme-dark .tv-button--success.i-active,html.theme-dark .tv-button--success:active,html.theme-dark .tv-button--success_ghost.i-active,html.theme-dark .tv-button--success_ghost:active{background-color:#009688;border-color:#009688;color:#fff}.tv-button--success.i-hover,.tv-button--success_ghost.i-hover{color:#fff;border-color:#00897b;background-color:#00897b}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--success:hover,.tv-button--success_ghost:hover{color:#fff;border-color:#00897b;background-color:#00897b}}html.theme-dark .tv-button--success.i-hover,html.theme-dark .tv-button--success_ghost.i-hover{background-color:#00897b}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button--success:hover,html.theme-dark .tv-button--success_ghost:hover{background-color:#00897b}}html.theme-dark .tv-button--success.i-hover,html.theme-dark .tv-button--success_ghost.i-hover{border-color:#00897b}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button--success:hover,html.theme-dark .tv-button--success_ghost:hover{border-color:#00897b}}html.theme-dark .tv-button--success.i-hover,html.theme-dark .tv-button--success_ghost.i-hover{color:#fff}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button--success:hover,html.theme-dark .tv-button--success_ghost:hover{color:#fff}}.tv-button--success_ghost .tv-button__loader-item,html.theme-dark .tv-button--success_ghost .tv-button__loader-item{background-color:#00897b}.tv-button--success_ghost.i-hover .tv-button__loader-item{background-color:#fff}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--success_ghost:hover .tv-button__loader-item{background-color:#fff}}html.theme-dark .tv-button--success_ghost.i-hover .tv-button__loader-item{background-color:#fff}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button--success_ghost:hover .tv-button__loader-item{background-color:#fff}}.tv-button--danger,.tv-button--danger_ghost{color:#fff;border-color:#ef5350;background-color:#ef5350}html.theme-dark .tv-button--danger,html.theme-dark .tv-button--danger_ghost{background-color:#d32f2f;border-color:#d32f2f;color:#fff}.tv-button--danger_ghost{color:#ef5350}html.theme-dark .tv-button--danger_ghost{color:#d32f2f}.tv-button--danger_ghost.i-checked{color:#fff;border-color:#ef5350;background-color:#ef5350}html.theme-dark .tv-button--danger_ghost.i-checked{background-color:#d32f2f;border-color:#d32f2f;color:#fff}.tv-button--danger.i-active,.tv-button--danger:active,.tv-button--danger_ghost.i-active,.tv-button--danger_ghost:active{color:#fff;border-color:#d32f2f;background-color:#d32f2f;transform:translateY(1px)}html.theme-dark .tv-button--danger.i-active,html.theme-dark .tv-button--danger:active,html.theme-dark .tv-button--danger_ghost.i-active,html.theme-dark .tv-button--danger_ghost:active{background-color:#f44336;border-color:#f44336;color:#fff}.tv-button--danger.i-hover,.tv-button--danger_ghost.i-hover{color:#fff;border-color:#e53935;background-color:#e53935}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--danger:hover,.tv-button--danger_ghost:hover{color:#fff;border-color:#e53935;background-color:#e53935}}html.theme-dark .tv-button--danger.i-hover,html.theme-dark .tv-button--danger_ghost.i-hover{background-color:#e53935}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button--danger:hover,html.theme-dark .tv-button--danger_ghost:hover{background-color:#e53935}}html.theme-dark .tv-button--danger.i-hover,html.theme-dark .tv-button--danger_ghost.i-hover{border-color:#e53935}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button--danger:hover,html.theme-dark .tv-button--danger_ghost:hover{border-color:#e53935}}html.theme-dark .tv-button--danger.i-hover,html.theme-dark .tv-button--danger_ghost.i-hover{color:#fff}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button--danger:hover,html.theme-dark .tv-button--danger_ghost:hover{color:#fff}}.tv-button--danger_ghost .tv-button__loader-item,html.theme-dark .tv-button--danger_ghost .tv-button__loader-item{background-color:#e53935}.tv-button--danger_ghost.i-hover .tv-button__loader-item{background-color:#fff}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--danger_ghost:hover .tv-button__loader-item{background-color:#fff}}html.theme-dark .tv-button--danger_ghost.i-hover .tv-button__loader-item{background-color:#fff}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button--danger_ghost:hover .tv-button__loader-item{background-color:#fff}}.tv-button--warning,.tv-button--warning_ghost{color:#fff;border-color:#f89e30;background-color:#f89e30}.tv-button--warning_ghost{color:#f89e30}.tv-button--warning_ghost.i-checked{color:#fff;border-color:#f89e30;background-color:#f89e30}.tv-button--warning.i-active,.tv-button--warning:active,.tv-button--warning_ghost.i-active,.tv-button--warning_ghost:active{color:#fff;border-color:#d47807;background-color:#d47807;transform:translateY(1px)}.tv-button--warning.i-hover,.tv-button--warning_ghost.i-hover{color:#fff;border-color:#f79217;background-color:#f79217}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--warning:hover,.tv-button--warning_ghost:hover{color:#fff;border-color:#f79217;background-color:#f79217}}.tv-button--warning_ghost .tv-button__loader-item{background-color:#f79217}.tv-button--warning_ghost.i-hover .tv-button__loader-item{background-color:#fff}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--warning_ghost:hover .tv-button__loader-item{background-color:#fff}}.tv-button--link{color:#2196f3;transition:color .35s ease}html.theme-dark .tv-button--link{color:#1976d2}.tv-button--link:visited{color:#2196f3;fill:#2196f3}html.theme-dark .tv-button--link:visited{fill:#1976d2;color:#1976d2}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--link:hover{color:#1e88e5;fill:#1e88e5;transition-duration:.06s}}.tv-button--link:focus{outline:auto}.tv-button--link:focus:not(:-moz-focusring){outline:none}.tv-button--link:-moz-focusring{outline:auto}.tv-button--link:active{color:#1e88e5;fill:#1e88e5;transition-duration:.06s}.tv-button--danger_ghost,.tv-button--default_ghost,.tv-button--primary_ghost,.tv-button--secondary_ghost,.tv-button--success_ghost,.tv-button--warning_ghost{border-width:1px;border-style:solid;background-color:transparent}html.theme-dark .tv-button--danger_ghost,html.theme-dark .tv-button--default_ghost,html.theme-dark .tv-button--primary_ghost,html.theme-dark .tv-button--secondary_ghost,html.theme-dark .tv-button--success_ghost,html.theme-dark .tv-button--warning_ghost{background-color:transparent}.tv-button--danger_ghost.tv-button--size_large,.tv-button--default_ghost.tv-button--size_large,.tv-button--primary_ghost.tv-button--size_large,.tv-button--secondary_ghost.tv-button--size_large,.tv-button--success_ghost.tv-button--size_large,.tv-button--warning_ghost.tv-button--size_large{border-width:2px}.tv-button--danger_ghost.tv-button--size_large.tv-button--thin-border,.tv-button--default_ghost.tv-button--size_large.tv-button--thin-border,.tv-button--primary_ghost.tv-button--size_large.tv-button--thin-border,.tv-button--secondary_ghost.tv-button--size_large.tv-button--thin-border,.tv-button--success_ghost.tv-button--size_large.tv-button--thin-border,.tv-button--warning_ghost.tv-button--size_large.tv-button--thin-border{border-width:1px}.tv-button .tv-ripple{background-color:hsla(0,0%,100%,.25)}.tv-button--default .tv-ripple,.tv-button--default_ghost .tv-ripple{background-color:rgba(117,134,150,.25)}.tv-button.i-disabled .tv-ripple{background-color:transparent}.tv-button.i-disabled,.tv-button.i-disabled:active,.tv-button:disabled,.tv-button:disabled:active{cursor:default;color:#b2b5be;border-color:#e0e3eb;background-color:#e0e3eb}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button.i-disabled:hover,.tv-button:disabled:hover{cursor:default;color:#b2b5be;border-color:#e0e3eb;background-color:#e0e3eb}}html.theme-dark .tv-button.i-disabled,html.theme-dark .tv-button.i-disabled:active,html.theme-dark .tv-button:disabled,html.theme-dark .tv-button:disabled:active{background-color:#363a45}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button.i-disabled:hover,html.theme-dark .tv-button:disabled:hover{background-color:#363a45}}html.theme-dark .tv-button.i-disabled,html.theme-dark .tv-button.i-disabled:active,html.theme-dark .tv-button:disabled,html.theme-dark .tv-button:disabled:active{border-color:#363a45}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button.i-disabled:hover,html.theme-dark .tv-button:disabled:hover{border-color:#363a45}}html.theme-dark .tv-button.i-disabled,html.theme-dark .tv-button.i-disabled:active,html.theme-dark .tv-button:disabled,html.theme-dark .tv-button:disabled:active{color:#50535e}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button.i-disabled:hover,html.theme-dark .tv-button:disabled:hover{color:#50535e}}.tv-button.i-disabled:active,.tv-button:disabled:active{transform:translateY(0)}.tv-button--size_xsmall{padding:2px 7px;line-height:15px;border-radius:1px;font-size:11px;font-weight:400}.tv-button--size_xsmall.tv-button--danger_ghost,.tv-button--size_xsmall.tv-button--default,.tv-button--size_xsmall.tv-button--default_ghost,.tv-button--size_xsmall.tv-button--primary_ghost,.tv-button--size_xsmall.tv-button--secondary_ghost,.tv-button--size_xsmall.tv-button--state,.tv-button--size_xsmall.tv-button--success_ghost,.tv-button--size_xsmall.tv-button--warning_ghost{padding:1px 6px}.tv-button--size_xsmall+.tv-button--size_xsmall{margin-left:10px}.tv-button--size_small{padding:1px 12px;line-height:25px;font-size:13px}.tv-button--size_small.tv-button--danger_ghost,.tv-button--size_small.tv-button--default,.tv-button--size_small.tv-button--default_ghost,.tv-button--size_small.tv-button--primary_ghost,.tv-button--size_small.tv-button--secondary_ghost,.tv-button--size_small.tv-button--state,.tv-button--size_small.tv-button--success_ghost,.tv-button--size_small.tv-button--warning_ghost{padding:0 11px}.tv-button--size_small+.tv-button--size_small{margin-left:10px}.tv-button--size_large{padding:1px 30px;font-size:17px;letter-spacing:1px;line-height:44px}.tv-button--size_large.tv-button--danger_ghost,.tv-button--size_large.tv-button--default,.tv-button--size_large.tv-button--default_ghost,.tv-button--size_large.tv-button--primary_ghost,.tv-button--size_large.tv-button--secondary_ghost,.tv-button--size_large.tv-button--state,.tv-button--size_large.tv-button--success_ghost,.tv-button--size_large.tv-button--warning_ghost{padding:0 29px}.tv-button--no-padding{padding:1px}.tv-button--no-padding.tv-button--danger_ghost,.tv-button--no-padding.tv-button--default,.tv-button--no-padding.tv-button--default_ghost,.tv-button--no-padding.tv-button--primary_ghost,.tv-button--no-padding.tv-button--secondary_ghost,.tv-button--no-padding.tv-button--state,.tv-button--no-padding.tv-button--success_ghost,.tv-button--no-padding.tv-button--warning_ghost{padding:0}.tv-button--state{text-align:center;border-width:1px;border-style:solid}.tv-button--state,html.theme-dark .tv-button--state{background:transparent}.tv-button--state:after{content:"";display:inline-block}.tv-button--state__checked,.tv-button--state__uncheck-hint,.tv-button--state__unchecked{display:block;height:0;transition:opacity .2625s ease,transform .2625s ease}.tv-button--state__ellipsis-text{display:block;white-space:nowrap;text-overflow:ellipsis;overflow-x:hidden}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--state.i-checked:hover .tv-button--state__checked,.tv-button--state.i-checked:hover .tv-button--state__uncheck-hint,.tv-button--state.i-checked:hover .tv-button--state__unchecked{will-change:opacity,transform}}.tv-button--state.i-checked .tv-button--state__unchecked,.tv-button--state__checked,.tv-button--state__uncheck-hint{opacity:0}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--state.i-checked:hover .tv-button--state__checked{opacity:0}}.tv-button--state.i-checked .tv-button--state__checked,.tv-button--state__unchecked{opacity:1}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--state.i-checked:hover .tv-button--state__uncheck-hint{opacity:1}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--state.i-checked:hover .tv-button--state__checked{transform:translateY(-5px)}}.tv-button--state.i-checked .tv-button--state__unchecked,.tv-button--state__checked,.tv-button--state__uncheck-hint{transform:translateY(5px)}.tv-button--state.i-checked .tv-button--state__checked{transform:translateY(0)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--state.i-checked:hover .tv-button--state__uncheck-hint{transform:translateY(0)}}.tv-button--state.tv-button--success{color:#009688;background-color:transparent}html.theme-dark .tv-button--state.tv-button--success{background-color:transparent;color:#00796b}.tv-button--state.tv-button--success.i-checked{color:#fff;background-color:#009688}html.theme-dark .tv-button--state.tv-button--success.i-checked{background-color:#00796b;color:#fff}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--state.tv-button--success:hover{color:#fff;background-color:#00897b}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button--state.tv-button--success:hover{background-color:#00897b;color:#fff}}.tv-button--state.tv-button--success:active{color:#fff;background-color:#00796b}html.theme-dark .tv-button--state.tv-button--success:active{background-color:#009688;color:#fff}.tv-button--state.tv-button--danger{color:#ef5350;background-color:transparent}html.theme-dark .tv-button--state.tv-button--danger{background-color:transparent;color:#d32f2f}.tv-button--state.tv-button--danger.i-checked{color:#fff;background-color:#ff4a68}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--state.tv-button--danger:hover{color:#fff;background-color:#f24965}}.tv-button--state.tv-button--danger:active{color:#fff;background-color:#ff173e}.tv-button--state.tv-button--primary{color:#2196f3;background-color:transparent}html.theme-dark .tv-button--state.tv-button--primary{background-color:transparent;color:#1976d2}.tv-button--state.tv-button--primary.i-checked{color:#fff;background-color:#2196f3}html.theme-dark .tv-button--state.tv-button--primary.i-checked{background-color:#1976d2;color:#fff}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--state.tv-button--primary:hover{color:#fff;background-color:#1e88e5}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button--state.tv-button--primary:hover{background-color:#1e88e5;color:#fff}}.tv-button--state.tv-button--primary:active{color:#fff;background-color:#1e88e5}html.theme-dark .tv-button--state.tv-button--primary:active{background-color:#1e88e5;color:#fff}.tv-button--state.tv-button--primary_ghost-hover.i-checked{color:#2196f3;background-color:transparent}html.theme-dark .tv-button--state.tv-button--primary_ghost-hover.i-checked{background-color:transparent;color:#1976d2}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--state.tv-button--primary_ghost-hover:hover{color:#fff;background-color:#1e88e5}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button--state.tv-button--primary_ghost-hover:hover{background-color:#1e88e5;color:#fff}}.tv-button--state.tv-button--primary_ghost-hover:active{color:#fff;background-color:#1e88e5}html.theme-dark .tv-button--state.tv-button--primary_ghost-hover:active{background-color:#1e88e5;color:#fff}.tv-button--state.tv-button--secondary{color:#757575;background-color:transparent}.tv-button--state.tv-button--secondary.i-checked{color:#757575;background-color:#e9eff2}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--state.tv-button--secondary:hover{color:#757575;background-color:#dce6ea}}.tv-button--state.tv-button--secondary:active{color:#757575;background-color:#cfdce3}.tv-button--state.tv-button--warning{color:#f89e30;background-color:transparent}.tv-button--state.tv-button--warning.i-checked{color:#fff;background-color:#f89e30}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--state.tv-button--warning:hover{color:#fff;background-color:#f79217}}.tv-button--state.tv-button--warning:active{color:#fff;background-color:#d47807}.tv-button--state.tv-button--icon-with-text svg{margin-right:8px;margin-bottom:-8px;vertical-align:unset}.tv-button--icon{display:inline-flex;align-items:center;justify-content:center;padding:0!important;min-width:auto;width:34px;height:34px}.tv-button--icon.tv-button--size_xsmall{width:19px;height:19px}.tv-button--icon.tv-button--size_small{width:27px;height:27px}.tv-button--icon.tv-button--size_large{width:46px;height:46px}.tv-button--loader .tv-button__text{transition:opacity .175s ease,transform .175s ease}.tv-button--loader.i-start-load .tv-button__text{opacity:0;transform:translateY(-5px)}.tv-button--loader.i-loading .tv-button__text{opacity:0;transform:translateY(5px)}.tv-button--loader.i-stop-load .tv-button__text{opacity:1;transform:translateY(0);transition-delay:.175s}.tv-button__loader{position:absolute;top:0;left:0;right:0;bottom:0;height:100%;margin:0 auto;text-align:center;font-size:0;opacity:0;transition:opacity .35s ease}.tv-button__loader:after{content:"";display:inline-block;height:100%;vertical-align:middle}.tv-button--loader.i-loading .tv-button__loader,.tv-button--loader.i-start-load .tv-button__loader{opacity:1}.tv-button--loader.i-stop-load .tv-button__loader{opacity:0}.tv-button__loader-item{margin-right:2px;margin-left:2px;display:inline-block;vertical-align:middle;width:10px;height:10px;opacity:0;border-radius:100%;background-color:#fff;transform:translateY(12px) scale(.6);transition:transform .35s cubic-bezier(.68,-.55,.265,1.55),opacity .35s ease}.tv-button__loader-item:nth-child(2){transition-delay:.11666667s}.tv-button__loader-item:nth-child(3){transition-delay:.23333333s}.tv-button--default .tv-button__loader-item{background-color:#757575}.tv-button--loader.i-loading .tv-button__loader-item,.tv-button--loader.i-start-load .tv-button__loader-item{opacity:1}.tv-button--loader.i-stop-load .tv-button__loader-item{opacity:0}.tv-button--loader.i-loading .tv-button__loader-item,.tv-button--loader.i-start-load .tv-button__loader-item,.tv-button--loader.i-stop-load .tv-button__loader-item{transform:translateY(0) scale(.6)}.tv-button--loader.i-loading .tv-button__loader-item,.tv-button--loader.i-stop-load .tv-button__loader-item{animation:tv-button-loader .96s infinite ease-in-out both}.tv-button--loader.i-loading .tv-button__loader-item:nth-child(2),.tv-button--loader.i-stop-load .tv-button__loader-item:nth-child(2){animation-delay:.151s}.tv-button--loader.i-loading .tv-button__loader-item:nth-child(3),.tv-button--loader.i-stop-load .tv-button__loader-item:nth-child(3){animation-delay:.32s}.tv-button--no-border-radius{border-radius:0}.tv-button--no-border{border:none}.tv-button--connect{border-radius:0}.tv-button--connect_left{border-top-left-radius:0;border-bottom-left-radius:0}.tv-button--connect_right{border-top-right-radius:0;border-bottom-right-radius:0}@keyframes tv-button-loader{0%,to{transform:scale(.6)}50%{transform:scale(.9)}}.tv-control-checkbox{cursor:pointer;-webkit-tap-highlight-color:transparent}.tv-control-checkbox--in-actions{max-width:50%}@media screen and (max-width:479px){.tv-control-checkbox--in-actions{max-width:none}}.tv-control-checkbox,.tv-control-checkbox__label{position:relative;display:inline-block;vertical-align:middle;-webkit-user-select:none;user-select:none}.tv-control-checkbox--nowrap,.tv-control-checkbox__label--nowrap{white-space:nowrap}.tv-control-checkbox__input{position:absolute;top:0;left:0;width:18px;height:18px;opacity:0}.tv-control-checkbox__box{display:block;width:18px;height:18px;line-height:1;border-radius:2px;box-sizing:border-box;pointer-events:none;transition:background-color .35s ease}.tv-control-checkbox__box:before{top:50%;left:50%;margin-top:-9px;margin-left:-9px;border-radius:2px;background-color:transparent;transform:scale(1);transition:transform .35s ease,background-color .35s ease,border-radius .35s ease}.tv-control-checkbox__box:after,.tv-control-checkbox__box:before{content:"";display:block;position:absolute;width:18px;height:18px}.tv-control-checkbox__box:after{top:0;left:0;border:2px solid #758696;border-radius:2px;box-sizing:border-box;transition:border-color .35s ease}.tv-control-checkbox__box svg{display:block;position:absolute;top:50%;left:50%;margin-top:-6px;margin-left:-6px;width:12px;height:12px;stroke:transparent;transform:scale(0);transition:stroke .35s ease 1ms,transform .35s ease 1ms}.tv-control-checkbox__label{white-space:normal;margin-right:10px}.tv-control-checkbox__label--two-lines{width:155px}.tv-control-checkbox__label--nowrap{white-space:nowrap}.tv-control-checkbox__label--lil-line-height{line-height:16px;min-width:45%;max-width:80%}.tv-control-checkbox__label+.tv-control-checkbox{margin-left:0}.tv-control-checkbox+.tv-control-checkbox__label{margin-right:0;margin-left:10px;max-width:calc(100% - 1ex - 28px)}.tv-control-checkbox:active .tv-control-checkbox__box,.tv-control-checkbox__input:focus+.tv-control-checkbox__box{will-change:background-color}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-control-checkbox:hover .tv-control-checkbox__box{will-change:background-color}}.tv-control-checkbox:active .tv-control-checkbox__box:before,.tv-control-checkbox__input:focus+.tv-control-checkbox__box:before{will-change:transform,border-radius}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-control-checkbox:hover .tv-control-checkbox__box:before{will-change:transform,border-radius}}.tv-control-checkbox:active .tv-control-checkbox__box:after,.tv-control-checkbox__input:focus+.tv-control-checkbox__box:after{will-change:border-color}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-control-checkbox:hover .tv-control-checkbox__box:after{will-change:border-color;border-color:#627384}}.tv-control-checkbox:active .tv-control-checkbox__box:after,.tv-control-checkbox__input:focus+.tv-control-checkbox__box:after{border-color:#2196f3}html.theme-dark .tv-control-checkbox:active .tv-control-checkbox__box:after,html.theme-dark .tv-control-checkbox__input:focus+.tv-control-checkbox__box:after{border-color:#1976d2}.tv-control-checkbox__input:checked+.tv-control-checkbox__box{background-color:#2196f3}html.theme-dark .tv-control-checkbox__input:checked+.tv-control-checkbox__box{background-color:#1976d2}.tv-control-checkbox__input:checked+.tv-control-checkbox__box,.tv-control-checkbox__input:checked+.tv-control-checkbox__box:after,.tv-control-checkbox__input:checked+.tv-control-checkbox__box:before{transition-timing-function:cubic-bezier(.215,.61,.355,1)}.tv-control-checkbox__input:checked+.tv-control-checkbox__box:before{border-radius:50%;transform:scale(0)}.tv-control-checkbox__input:checked+.tv-control-checkbox__box:after{border-color:#2196f3}html.theme-dark .tv-control-checkbox__input:checked+.tv-control-checkbox__box:after{border-color:#1976d2}.tv-control-checkbox__input:checked+.tv-control-checkbox__box svg{stroke:#fff;transform:scale(1);transition-timing-function:cubic-bezier(.215,.61,.355,1);transition-delay:.0875s;will-change:stroke,transform}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-control-checkbox:hover .tv-control-checkbox__input:checked+.tv-control-checkbox__box{background-color:#1e88e5}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-control-checkbox:hover .tv-control-checkbox__input:checked+.tv-control-checkbox__box:after{border-color:#1e88e5}}.tv-control-checkbox:active .tv-control-checkbox__input:checked+.tv-control-checkbox__box,.tv-control-checkbox__input:focus:checked+.tv-control-checkbox__box{background-color:#049ddc}.tv-control-checkbox:active .tv-control-checkbox__input:checked+.tv-control-checkbox__box:after,.tv-control-checkbox__input:focus:checked+.tv-control-checkbox__box:after{border-color:#049ddc}.tv-control-checkbox:active .tv-control-checkbox__input[disabled]+.tv-control-checkbox__box:after,.tv-control-checkbox:active .tv-control-checkbox__input[disabled]:checked+.tv-control-checkbox__box:after,.tv-control-checkbox__input[disabled]+.tv-control-checkbox__box:after,.tv-control-checkbox__input[disabled]:checked+.tv-control-checkbox__box:after{border-color:#dadde0}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-control-checkbox:hover .tv-control-checkbox__input[disabled]+.tv-control-checkbox__box:after,.tv-control-checkbox:hover .tv-control-checkbox__input[disabled]:checked+.tv-control-checkbox__box:after{border-color:#dadde0}}html.theme-dark .tv-control-checkbox:active .tv-control-checkbox__input[disabled]+.tv-control-checkbox__box:after,html.theme-dark .tv-control-checkbox:active .tv-control-checkbox__input[disabled]:checked+.tv-control-checkbox__box:after,html.theme-dark .tv-control-checkbox__input[disabled]+.tv-control-checkbox__box:after,html.theme-dark .tv-control-checkbox__input[disabled]:checked+.tv-control-checkbox__box:after{border-color:#363c4e}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-control-checkbox:hover .tv-control-checkbox__input[disabled]+.tv-control-checkbox__box:after,html.theme-dark .tv-control-checkbox:hover .tv-control-checkbox__input[disabled]:checked+.tv-control-checkbox__box:after{border-color:#363c4e}}.tv-control-checkbox:active .tv-control-checkbox__input[disabled]+.tv-control-checkbox__box:before,.tv-control-checkbox:active .tv-control-checkbox__input[disabled]:checked+.tv-control-checkbox__box:before{background-color:#f1f3f6;transition:background-color .35s ease}html.theme-dark .tv-control-checkbox:active .tv-control-checkbox__input[disabled]+.tv-control-checkbox__box:before,html.theme-dark .tv-control-checkbox:active .tv-control-checkbox__input[disabled]:checked+.tv-control-checkbox__box:before{background-color:#2f3241}.tv-control-checkbox:active .tv-control-checkbox__input[disabled]:checked+.tv-control-checkbox__box,.tv-control-checkbox__input[disabled]:checked+.tv-control-checkbox__box{background-color:#dadde0}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-control-checkbox:hover .tv-control-checkbox__input[disabled]:checked+.tv-control-checkbox__box{background-color:#dadde0}}.tv-control-checkbox__ripple{display:block;position:absolute;top:0;right:0;width:100%;height:100%;margin:-10px;padding:10px;overflow:hidden;border-radius:50%;-webkit-mask-image:radial-gradient(circle,#fff 100%,#000 0);mask-image:radial-gradient(circle,#fff 100%,#000 0)}.tv-control-checkbox__input:checked+.tv-control-checkbox__box+.tv-control-checkbox__ripple .tv-ripple{background-color:rgba(33,150,243,.25)}.tv-control-checkbox__input[disabled]+.tv-control-checkbox__box+.tv-control-checkbox__ripple .tv-ripple,.tv-control-checkbox__input[disabled]:checked+.tv-control-checkbox__box+.tv-control-checkbox__ripple .tv-ripple{background-color:transparent}.tv-control-checkbox.i-error .tv-control-checkbox__box:after{border-color:#ff4a68}.tv-control-checkbox.i-disabled{cursor:default}.i-hidden{display:none!important}.i-invisible{visibility:hidden!important}.i-clearfix:after{clear:both;display:table;content:""}.i-align_left{text-align:left!important}.i-align_right{text-align:right!important}.i-align_center{text-align:center!important}.i-float_left{float:left!important}.i-float_right{float:right!important}.i-float_none{float:none!important}@media screen and (min-width:1020px){.i-device-only{display:none!important}}@media screen and (max-width:1019px){.i-desktop-only{display:none!important}}@media screen and (min-width:479px){.i-phones-only{display:none!important}}@media screen and (max-width:479px){.i-except-phones-only{display:none!important}}.i-no-break{white-space:nowrap}.sb-inner-shadow{box-shadow:0 0 5px rgba(0,0,0,.15);position:absolute;bottom:-10px;width:100%;height:10px;background:#fff;z-index:5;pointer-events:none;transform:translateY(0);transition:opacity .11666667s ease,transform .11666667s ease}html.theme-dark .sb-inner-shadow{background:#1e222d}.sb-inner-shadow.top{box-shadow:0 0 5px rgba(0,0,0,.15);top:-10px}.sb-inner-shadow.i-invisible{transform:translateY(5px)}.sb-inner-shadow.i-invisible.top{transform:translateY(-5px)}.sb-inner-shadow.i-invisible{opacity:0}.sb-scrollbar{position:absolute!important;opacity:0;width:7px;top:73px;right:1px;z-index:1;transition:opacity .3s}.sb-scrollbar.active,.sb-scrollbar.active-always{opacity:1}.sb-scrollbar__content-wrapper--scroll-inited{position:relative}.sb-scrollbar__content--scroll-inited{position:absolute}.sb-scrollbar-wrap{position:absolute;top:0;right:1px;width:6px;height:100%;z-index:1}.sb-scrollbar-wrap .sb-scrollbar{right:0}.sb-scrollbar-body{width:6px;border:0;background:#d8d8d8}html.theme-dark .sb-scrollbar-body{background:#4f5966}.gray .sb-scrollbar-body{background:#75757a;border-color:#75757a;border-radius:3px}.sb-scrollbar-bottom,.sb-scrollbar-top{display:none}.active-always.gray,.gray{opacity:.5}.wrapper-2KWBfDVB.touch-E6yQTRo_.wrapper-2KWBfDVB.touch-E6yQTRo_{overflow-y:auto;-webkit-overflow-scrolling:touch;-ms-overflow-style:scrollbar}.wrapper-2KWBfDVB.touch-E6yQTRo_.wrapper-2KWBfDVB.touch-E6yQTRo_::-webkit-scrollbar{width:5px;height:5px}.wrapper-2KWBfDVB.touch-E6yQTRo_.wrapper-2KWBfDVB.touch-E6yQTRo_::-webkit-scrollbar-thumb{border:1px solid;border-color:#f1f3f6;border-radius:3px;background-color:#9598a1}html.theme-dark .wrapper-2KWBfDVB.touch-E6yQTRo_.wrapper-2KWBfDVB.touch-E6yQTRo_::-webkit-scrollbar-thumb{background-color:#363a45;border-color:#1e222d}.wrapper-2KWBfDVB.touch-E6yQTRo_.wrapper-2KWBfDVB.touch-E6yQTRo_::-webkit-scrollbar-track{background-color:transparent;border-radius:3px}.wrapper-2KWBfDVB.touch-E6yQTRo_.wrapper-2KWBfDVB.touch-E6yQTRo_::-webkit-scrollbar-corner{display:none} \ No newline at end of file diff --git a/public/charting_library/bundles/55.92e5c3a0907e418f2072.rtl.css b/public/charting_library/bundles/55.92e5c3a0907e418f2072.rtl.css new file mode 100644 index 00000000..0e497405 --- /dev/null +++ b/public/charting_library/bundles/55.92e5c3a0907e418f2072.rtl.css @@ -0,0 +1 @@ +.tv-button{position:relative;display:inline-block;vertical-align:middle;min-width:40px;margin:0;padding:1px 22px;-webkit-user-select:none;user-select:none;line-height:32px;text-align:center;white-space:nowrap;text-decoration:none;font-size:14px;color:#757575;fill:currentColor;border:none;border-radius:4px;outline:0;background-color:transparent;cursor:pointer;overflow:hidden;box-sizing:border-box;-webkit-tap-highlight-color:transparent;transition:background-color .35s ease,border-color .35s ease,color .35s ease}.tv-button.tv-button--danger_ghost,.tv-button.tv-button--default,.tv-button.tv-button--default_ghost,.tv-button.tv-button--primary_ghost,.tv-button.tv-button--secondary_ghost,.tv-button.tv-button--state,.tv-button.tv-button--success_ghost,.tv-button.tv-button--warning_ghost{padding:0 21px}.tv-button.i-active,.tv-button.i-hover,.tv-button:active{transition-duration:.06s}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button:hover{transition-duration:.06s}}.tv-button svg{vertical-align:middle}.tv-button--block{display:block;width:100%;text-align:center}.tv-button+.tv-button{margin-right:15px}.tv-button.tv-button--no-left-margin{margin-right:0}.tv-button__text{position:relative;display:inline-block}.tv-button__text--full-height{display:flex;align-items:center;justify-content:center;height:100%;width:100%;white-space:normal;word-wrap:break-word;line-height:1.2em;margin:11px 5px}.tv-button--default,.tv-button--default_ghost{color:#fff;border-color:#fff;background-color:#fff}html.theme-dark .tv-button--default,html.theme-dark .tv-button--default_ghost{background-color:#1e222d;border-color:#1e222d}.tv-button--default_ghost{color:#fff}html.theme-dark .tv-button--default_ghost{color:#1e222d}.tv-button--default_ghost.i-checked{color:#fff;border-color:#fff;background-color:#fff}html.theme-dark .tv-button--default_ghost.i-checked{background-color:#1e222d;border-color:#1e222d}.tv-button--default.i-active,.tv-button--default:active,.tv-button--default_ghost.i-active,.tv-button--default_ghost:active{color:#fff;border-color:#ececec;background-color:#ececec;transform:translateY(1px)}html.theme-dark .tv-button--default.i-active,html.theme-dark .tv-button--default:active,html.theme-dark .tv-button--default_ghost.i-active,html.theme-dark .tv-button--default_ghost:active{background-color:#1c2030;border-color:#1c2030}.tv-button--default.i-hover,.tv-button--default_ghost.i-hover{color:#fff;border-color:#f2f2f2;background-color:#f2f2f2}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--default:hover,.tv-button--default_ghost:hover{color:#fff;border-color:#f2f2f2;background-color:#f2f2f2}}html.theme-dark .tv-button--default.i-hover,html.theme-dark .tv-button--default_ghost.i-hover{background-color:#1c2030}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button--default:hover,html.theme-dark .tv-button--default_ghost:hover{background-color:#1c2030}}html.theme-dark .tv-button--default.i-hover,html.theme-dark .tv-button--default_ghost.i-hover{border-color:#1c2030}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button--default:hover,html.theme-dark .tv-button--default_ghost:hover{border-color:#1c2030}}.tv-button--default_ghost .tv-button__loader-item{background-color:#f2f2f2}html.theme-dark .tv-button--default_ghost .tv-button__loader-item{background-color:#1c2030}.tv-button--default_ghost.i-hover .tv-button__loader-item{background-color:#fff}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--default_ghost:hover .tv-button__loader-item{background-color:#fff}}.tv-button--default,.tv-button--default.i-checked,.tv-button--default_ghost,.tv-button--default_ghost.i-checked{color:#757575;border:1px solid;border-color:#b5b7b9}html.theme-dark .tv-button--default,html.theme-dark .tv-button--default.i-checked,html.theme-dark .tv-button--default_ghost,html.theme-dark .tv-button--default_ghost.i-checked{border-color:#363c4e;color:#758696}.tv-button--default.i-hover,.tv-button--default_ghost.i-hover{color:#757575;border-color:#b5b7b9}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--default:hover,.tv-button--default_ghost:hover{color:#757575;border-color:#b5b7b9}}html.theme-dark .tv-button--default.i-hover,html.theme-dark .tv-button--default_ghost.i-hover{border-color:#363c4e}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button--default:hover,html.theme-dark .tv-button--default_ghost:hover{border-color:#363c4e}}html.theme-dark .tv-button--default.i-hover,html.theme-dark .tv-button--default_ghost.i-hover{color:#758696}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button--default:hover,html.theme-dark .tv-button--default_ghost:hover{color:#758696}}.tv-button--default.i-active,.tv-button--default:active,.tv-button--default_ghost.i-active,.tv-button--default_ghost:active{color:#757575;border-color:#b5b7b9}html.theme-dark .tv-button--default.i-active,html.theme-dark .tv-button--default:active,html.theme-dark .tv-button--default_ghost.i-active,html.theme-dark .tv-button--default_ghost:active{border-color:#363c4e;color:#758696}.tv-button--primary,.tv-button--primary_ghost{color:#fff;border-color:#2196f3;background-color:#2196f3}html.theme-dark .tv-button--primary,html.theme-dark .tv-button--primary_ghost{background-color:#1976d2;border-color:#1976d2;color:#fff}.tv-button--primary_ghost{color:#2196f3}html.theme-dark .tv-button--primary_ghost{color:#1976d2}.tv-button--primary_ghost.i-checked{color:#fff;border-color:#2196f3;background-color:#2196f3}html.theme-dark .tv-button--primary_ghost.i-checked{background-color:#1976d2;border-color:#1976d2;color:#fff}.tv-button--primary.i-active,.tv-button--primary:active,.tv-button--primary_ghost.i-active,.tv-button--primary_ghost:active{color:#fff;border-color:#1e88e5;background-color:#1e88e5;transform:translateY(1px)}.tv-button--primary.i-hover,.tv-button--primary_ghost.i-hover,html.theme-dark .tv-button--primary.i-active,html.theme-dark .tv-button--primary:active,html.theme-dark .tv-button--primary_ghost.i-active,html.theme-dark .tv-button--primary_ghost:active{background-color:#1e88e5;border-color:#1e88e5;color:#fff}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--primary:hover,.tv-button--primary_ghost:hover{color:#fff;border-color:#1e88e5;background-color:#1e88e5}}html.theme-dark .tv-button--primary.i-hover,html.theme-dark .tv-button--primary_ghost.i-hover{background-color:#1e88e5}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button--primary:hover,html.theme-dark .tv-button--primary_ghost:hover{background-color:#1e88e5}}html.theme-dark .tv-button--primary.i-hover,html.theme-dark .tv-button--primary_ghost.i-hover{border-color:#1e88e5}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button--primary:hover,html.theme-dark .tv-button--primary_ghost:hover{border-color:#1e88e5}}html.theme-dark .tv-button--primary.i-hover,html.theme-dark .tv-button--primary_ghost.i-hover{color:#fff}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button--primary:hover,html.theme-dark .tv-button--primary_ghost:hover{color:#fff}}.tv-button--primary_ghost .tv-button__loader-item,html.theme-dark .tv-button--primary_ghost .tv-button__loader-item{background-color:#1e88e5}.tv-button--primary_ghost.i-hover .tv-button__loader-item{background-color:#fff}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--primary_ghost:hover .tv-button__loader-item{background-color:#fff}}html.theme-dark .tv-button--primary_ghost.i-hover .tv-button__loader-item{background-color:#fff}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button--primary_ghost:hover .tv-button__loader-item{background-color:#fff}}.tv-button--secondary,.tv-button--secondary_ghost{color:#757575;border-color:#e9eff2;background-color:#e9eff2}.tv-button--secondary_ghost{color:#757575}.tv-button--secondary_ghost.i-checked{color:#757575;border-color:#e9eff2;background-color:#e9eff2}.tv-button--secondary.i-active,.tv-button--secondary:active,.tv-button--secondary_ghost.i-active,.tv-button--secondary_ghost:active{color:#757575;border-color:#cfdce3;background-color:#cfdce3;transform:translateY(1px)}.tv-button--secondary.i-hover,.tv-button--secondary_ghost.i-hover{color:#757575;border-color:#dce6ea;background-color:#dce6ea}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--secondary:hover,.tv-button--secondary_ghost:hover{color:#757575;border-color:#dce6ea;background-color:#dce6ea}}.tv-button--secondary_ghost .tv-button__loader-item{background-color:#dce6ea}.tv-button--secondary_ghost.i-hover .tv-button__loader-item{background-color:#757575}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--secondary_ghost:hover .tv-button__loader-item{background-color:#757575}}.tv-button--success,.tv-button--success_ghost{color:#fff;border-color:#009688;background-color:#009688}html.theme-dark .tv-button--success,html.theme-dark .tv-button--success_ghost{background-color:#00796b;border-color:#00796b;color:#fff}.tv-button--success_ghost{color:#009688}html.theme-dark .tv-button--success_ghost{color:#00796b}.tv-button--success_ghost.i-checked{color:#fff;border-color:#009688;background-color:#009688}html.theme-dark .tv-button--success_ghost.i-checked{background-color:#00796b;border-color:#00796b;color:#fff}.tv-button--success.i-active,.tv-button--success:active,.tv-button--success_ghost.i-active,.tv-button--success_ghost:active{color:#fff;border-color:#00796b;background-color:#00796b;transform:translateY(1px)}html.theme-dark .tv-button--success.i-active,html.theme-dark .tv-button--success:active,html.theme-dark .tv-button--success_ghost.i-active,html.theme-dark .tv-button--success_ghost:active{background-color:#009688;border-color:#009688;color:#fff}.tv-button--success.i-hover,.tv-button--success_ghost.i-hover{color:#fff;border-color:#00897b;background-color:#00897b}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--success:hover,.tv-button--success_ghost:hover{color:#fff;border-color:#00897b;background-color:#00897b}}html.theme-dark .tv-button--success.i-hover,html.theme-dark .tv-button--success_ghost.i-hover{background-color:#00897b}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button--success:hover,html.theme-dark .tv-button--success_ghost:hover{background-color:#00897b}}html.theme-dark .tv-button--success.i-hover,html.theme-dark .tv-button--success_ghost.i-hover{border-color:#00897b}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button--success:hover,html.theme-dark .tv-button--success_ghost:hover{border-color:#00897b}}html.theme-dark .tv-button--success.i-hover,html.theme-dark .tv-button--success_ghost.i-hover{color:#fff}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button--success:hover,html.theme-dark .tv-button--success_ghost:hover{color:#fff}}.tv-button--success_ghost .tv-button__loader-item,html.theme-dark .tv-button--success_ghost .tv-button__loader-item{background-color:#00897b}.tv-button--success_ghost.i-hover .tv-button__loader-item{background-color:#fff}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--success_ghost:hover .tv-button__loader-item{background-color:#fff}}html.theme-dark .tv-button--success_ghost.i-hover .tv-button__loader-item{background-color:#fff}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button--success_ghost:hover .tv-button__loader-item{background-color:#fff}}.tv-button--danger,.tv-button--danger_ghost{color:#fff;border-color:#ef5350;background-color:#ef5350}html.theme-dark .tv-button--danger,html.theme-dark .tv-button--danger_ghost{background-color:#d32f2f;border-color:#d32f2f;color:#fff}.tv-button--danger_ghost{color:#ef5350}html.theme-dark .tv-button--danger_ghost{color:#d32f2f}.tv-button--danger_ghost.i-checked{color:#fff;border-color:#ef5350;background-color:#ef5350}html.theme-dark .tv-button--danger_ghost.i-checked{background-color:#d32f2f;border-color:#d32f2f;color:#fff}.tv-button--danger.i-active,.tv-button--danger:active,.tv-button--danger_ghost.i-active,.tv-button--danger_ghost:active{color:#fff;border-color:#d32f2f;background-color:#d32f2f;transform:translateY(1px)}html.theme-dark .tv-button--danger.i-active,html.theme-dark .tv-button--danger:active,html.theme-dark .tv-button--danger_ghost.i-active,html.theme-dark .tv-button--danger_ghost:active{background-color:#f44336;border-color:#f44336;color:#fff}.tv-button--danger.i-hover,.tv-button--danger_ghost.i-hover{color:#fff;border-color:#e53935;background-color:#e53935}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--danger:hover,.tv-button--danger_ghost:hover{color:#fff;border-color:#e53935;background-color:#e53935}}html.theme-dark .tv-button--danger.i-hover,html.theme-dark .tv-button--danger_ghost.i-hover{background-color:#e53935}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button--danger:hover,html.theme-dark .tv-button--danger_ghost:hover{background-color:#e53935}}html.theme-dark .tv-button--danger.i-hover,html.theme-dark .tv-button--danger_ghost.i-hover{border-color:#e53935}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button--danger:hover,html.theme-dark .tv-button--danger_ghost:hover{border-color:#e53935}}html.theme-dark .tv-button--danger.i-hover,html.theme-dark .tv-button--danger_ghost.i-hover{color:#fff}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button--danger:hover,html.theme-dark .tv-button--danger_ghost:hover{color:#fff}}.tv-button--danger_ghost .tv-button__loader-item,html.theme-dark .tv-button--danger_ghost .tv-button__loader-item{background-color:#e53935}.tv-button--danger_ghost.i-hover .tv-button__loader-item{background-color:#fff}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--danger_ghost:hover .tv-button__loader-item{background-color:#fff}}html.theme-dark .tv-button--danger_ghost.i-hover .tv-button__loader-item{background-color:#fff}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button--danger_ghost:hover .tv-button__loader-item{background-color:#fff}}.tv-button--warning,.tv-button--warning_ghost{color:#fff;border-color:#f89e30;background-color:#f89e30}.tv-button--warning_ghost{color:#f89e30}.tv-button--warning_ghost.i-checked{color:#fff;border-color:#f89e30;background-color:#f89e30}.tv-button--warning.i-active,.tv-button--warning:active,.tv-button--warning_ghost.i-active,.tv-button--warning_ghost:active{color:#fff;border-color:#d47807;background-color:#d47807;transform:translateY(1px)}.tv-button--warning.i-hover,.tv-button--warning_ghost.i-hover{color:#fff;border-color:#f79217;background-color:#f79217}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--warning:hover,.tv-button--warning_ghost:hover{color:#fff;border-color:#f79217;background-color:#f79217}}.tv-button--warning_ghost .tv-button__loader-item{background-color:#f79217}.tv-button--warning_ghost.i-hover .tv-button__loader-item{background-color:#fff}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--warning_ghost:hover .tv-button__loader-item{background-color:#fff}}.tv-button--link{color:#2196f3;transition:color .35s ease}html.theme-dark .tv-button--link{color:#1976d2}.tv-button--link:visited{color:#2196f3;fill:#2196f3}html.theme-dark .tv-button--link:visited{fill:#1976d2;color:#1976d2}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--link:hover{color:#1e88e5;fill:#1e88e5;transition-duration:.06s}}.tv-button--link:focus{outline:auto}.tv-button--link:focus:not(:-moz-focusring){outline:none}.tv-button--link:-moz-focusring{outline:auto}.tv-button--link:active{color:#1e88e5;fill:#1e88e5;transition-duration:.06s}.tv-button--danger_ghost,.tv-button--default_ghost,.tv-button--primary_ghost,.tv-button--secondary_ghost,.tv-button--success_ghost,.tv-button--warning_ghost{border-width:1px;border-style:solid;background-color:transparent}html.theme-dark .tv-button--danger_ghost,html.theme-dark .tv-button--default_ghost,html.theme-dark .tv-button--primary_ghost,html.theme-dark .tv-button--secondary_ghost,html.theme-dark .tv-button--success_ghost,html.theme-dark .tv-button--warning_ghost{background-color:transparent}.tv-button--danger_ghost.tv-button--size_large,.tv-button--default_ghost.tv-button--size_large,.tv-button--primary_ghost.tv-button--size_large,.tv-button--secondary_ghost.tv-button--size_large,.tv-button--success_ghost.tv-button--size_large,.tv-button--warning_ghost.tv-button--size_large{border-width:2px}.tv-button--danger_ghost.tv-button--size_large.tv-button--thin-border,.tv-button--default_ghost.tv-button--size_large.tv-button--thin-border,.tv-button--primary_ghost.tv-button--size_large.tv-button--thin-border,.tv-button--secondary_ghost.tv-button--size_large.tv-button--thin-border,.tv-button--success_ghost.tv-button--size_large.tv-button--thin-border,.tv-button--warning_ghost.tv-button--size_large.tv-button--thin-border{border-width:1px}.tv-button .tv-ripple{background-color:hsla(0,0%,100%,.25)}.tv-button--default .tv-ripple,.tv-button--default_ghost .tv-ripple{background-color:rgba(117,134,150,.25)}.tv-button.i-disabled .tv-ripple{background-color:transparent}.tv-button.i-disabled,.tv-button.i-disabled:active,.tv-button:disabled,.tv-button:disabled:active{cursor:default;color:#b2b5be;border-color:#e0e3eb;background-color:#e0e3eb}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button.i-disabled:hover,.tv-button:disabled:hover{cursor:default;color:#b2b5be;border-color:#e0e3eb;background-color:#e0e3eb}}html.theme-dark .tv-button.i-disabled,html.theme-dark .tv-button.i-disabled:active,html.theme-dark .tv-button:disabled,html.theme-dark .tv-button:disabled:active{background-color:#363a45}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button.i-disabled:hover,html.theme-dark .tv-button:disabled:hover{background-color:#363a45}}html.theme-dark .tv-button.i-disabled,html.theme-dark .tv-button.i-disabled:active,html.theme-dark .tv-button:disabled,html.theme-dark .tv-button:disabled:active{border-color:#363a45}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button.i-disabled:hover,html.theme-dark .tv-button:disabled:hover{border-color:#363a45}}html.theme-dark .tv-button.i-disabled,html.theme-dark .tv-button.i-disabled:active,html.theme-dark .tv-button:disabled,html.theme-dark .tv-button:disabled:active{color:#50535e}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button.i-disabled:hover,html.theme-dark .tv-button:disabled:hover{color:#50535e}}.tv-button.i-disabled:active,.tv-button:disabled:active{transform:translateY(0)}.tv-button--size_xsmall{padding:2px 7px;line-height:15px;border-radius:1px;font-size:11px;font-weight:400}.tv-button--size_xsmall.tv-button--danger_ghost,.tv-button--size_xsmall.tv-button--default,.tv-button--size_xsmall.tv-button--default_ghost,.tv-button--size_xsmall.tv-button--primary_ghost,.tv-button--size_xsmall.tv-button--secondary_ghost,.tv-button--size_xsmall.tv-button--state,.tv-button--size_xsmall.tv-button--success_ghost,.tv-button--size_xsmall.tv-button--warning_ghost{padding:1px 6px}.tv-button--size_xsmall+.tv-button--size_xsmall{margin-right:10px}.tv-button--size_small{padding:1px 12px;line-height:25px;font-size:13px}.tv-button--size_small.tv-button--danger_ghost,.tv-button--size_small.tv-button--default,.tv-button--size_small.tv-button--default_ghost,.tv-button--size_small.tv-button--primary_ghost,.tv-button--size_small.tv-button--secondary_ghost,.tv-button--size_small.tv-button--state,.tv-button--size_small.tv-button--success_ghost,.tv-button--size_small.tv-button--warning_ghost{padding:0 11px}.tv-button--size_small+.tv-button--size_small{margin-right:10px}.tv-button--size_large{padding:1px 30px;font-size:17px;letter-spacing:1px;line-height:44px}.tv-button--size_large.tv-button--danger_ghost,.tv-button--size_large.tv-button--default,.tv-button--size_large.tv-button--default_ghost,.tv-button--size_large.tv-button--primary_ghost,.tv-button--size_large.tv-button--secondary_ghost,.tv-button--size_large.tv-button--state,.tv-button--size_large.tv-button--success_ghost,.tv-button--size_large.tv-button--warning_ghost{padding:0 29px}.tv-button--no-padding{padding:1px}.tv-button--no-padding.tv-button--danger_ghost,.tv-button--no-padding.tv-button--default,.tv-button--no-padding.tv-button--default_ghost,.tv-button--no-padding.tv-button--primary_ghost,.tv-button--no-padding.tv-button--secondary_ghost,.tv-button--no-padding.tv-button--state,.tv-button--no-padding.tv-button--success_ghost,.tv-button--no-padding.tv-button--warning_ghost{padding:0}.tv-button--state{text-align:center;border-width:1px;border-style:solid}.tv-button--state,html.theme-dark .tv-button--state{background:transparent}.tv-button--state:after{content:"";display:inline-block}.tv-button--state__checked,.tv-button--state__uncheck-hint,.tv-button--state__unchecked{display:block;height:0;transition:opacity .2625s ease,transform .2625s ease}.tv-button--state__ellipsis-text{display:block;white-space:nowrap;text-overflow:ellipsis;overflow-x:hidden}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--state.i-checked:hover .tv-button--state__checked,.tv-button--state.i-checked:hover .tv-button--state__uncheck-hint,.tv-button--state.i-checked:hover .tv-button--state__unchecked{will-change:opacity,transform}}.tv-button--state.i-checked .tv-button--state__unchecked,.tv-button--state__checked,.tv-button--state__uncheck-hint{opacity:0}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--state.i-checked:hover .tv-button--state__checked{opacity:0}}.tv-button--state.i-checked .tv-button--state__checked,.tv-button--state__unchecked{opacity:1}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--state.i-checked:hover .tv-button--state__uncheck-hint{opacity:1}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--state.i-checked:hover .tv-button--state__checked{transform:translateY(-5px)}}.tv-button--state.i-checked .tv-button--state__unchecked,.tv-button--state__checked,.tv-button--state__uncheck-hint{transform:translateY(5px)}.tv-button--state.i-checked .tv-button--state__checked{transform:translateY(0)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--state.i-checked:hover .tv-button--state__uncheck-hint{transform:translateY(0)}}.tv-button--state.tv-button--success{color:#009688;background-color:transparent}html.theme-dark .tv-button--state.tv-button--success{background-color:transparent;color:#00796b}.tv-button--state.tv-button--success.i-checked{color:#fff;background-color:#009688}html.theme-dark .tv-button--state.tv-button--success.i-checked{background-color:#00796b;color:#fff}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--state.tv-button--success:hover{color:#fff;background-color:#00897b}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button--state.tv-button--success:hover{background-color:#00897b;color:#fff}}.tv-button--state.tv-button--success:active{color:#fff;background-color:#00796b}html.theme-dark .tv-button--state.tv-button--success:active{background-color:#009688;color:#fff}.tv-button--state.tv-button--danger{color:#ef5350;background-color:transparent}html.theme-dark .tv-button--state.tv-button--danger{background-color:transparent;color:#d32f2f}.tv-button--state.tv-button--danger.i-checked{color:#fff;background-color:#ff4a68}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--state.tv-button--danger:hover{color:#fff;background-color:#f24965}}.tv-button--state.tv-button--danger:active{color:#fff;background-color:#ff173e}.tv-button--state.tv-button--primary{color:#2196f3;background-color:transparent}html.theme-dark .tv-button--state.tv-button--primary{background-color:transparent;color:#1976d2}.tv-button--state.tv-button--primary.i-checked{color:#fff;background-color:#2196f3}html.theme-dark .tv-button--state.tv-button--primary.i-checked{background-color:#1976d2;color:#fff}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--state.tv-button--primary:hover{color:#fff;background-color:#1e88e5}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button--state.tv-button--primary:hover{background-color:#1e88e5;color:#fff}}.tv-button--state.tv-button--primary:active{color:#fff;background-color:#1e88e5}html.theme-dark .tv-button--state.tv-button--primary:active{background-color:#1e88e5;color:#fff}.tv-button--state.tv-button--primary_ghost-hover.i-checked{color:#2196f3;background-color:transparent}html.theme-dark .tv-button--state.tv-button--primary_ghost-hover.i-checked{background-color:transparent;color:#1976d2}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--state.tv-button--primary_ghost-hover:hover{color:#fff;background-color:#1e88e5}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button--state.tv-button--primary_ghost-hover:hover{background-color:#1e88e5;color:#fff}}.tv-button--state.tv-button--primary_ghost-hover:active{color:#fff;background-color:#1e88e5}html.theme-dark .tv-button--state.tv-button--primary_ghost-hover:active{background-color:#1e88e5;color:#fff}.tv-button--state.tv-button--secondary{color:#757575;background-color:transparent}.tv-button--state.tv-button--secondary.i-checked{color:#757575;background-color:#e9eff2}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--state.tv-button--secondary:hover{color:#757575;background-color:#dce6ea}}.tv-button--state.tv-button--secondary:active{color:#757575;background-color:#cfdce3}.tv-button--state.tv-button--warning{color:#f89e30;background-color:transparent}.tv-button--state.tv-button--warning.i-checked{color:#fff;background-color:#f89e30}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--state.tv-button--warning:hover{color:#fff;background-color:#f79217}}.tv-button--state.tv-button--warning:active{color:#fff;background-color:#d47807}.tv-button--state.tv-button--icon-with-text svg{margin-left:8px;margin-bottom:-8px;vertical-align:unset}.tv-button--icon{display:inline-flex;align-items:center;justify-content:center;padding:0!important;min-width:auto;width:34px;height:34px}.tv-button--icon.tv-button--size_xsmall{width:19px;height:19px}.tv-button--icon.tv-button--size_small{width:27px;height:27px}.tv-button--icon.tv-button--size_large{width:46px;height:46px}.tv-button--loader .tv-button__text{transition:opacity .175s ease,transform .175s ease}.tv-button--loader.i-start-load .tv-button__text{opacity:0;transform:translateY(-5px)}.tv-button--loader.i-loading .tv-button__text{opacity:0;transform:translateY(5px)}.tv-button--loader.i-stop-load .tv-button__text{opacity:1;transform:translateY(0);transition-delay:.175s}.tv-button__loader{position:absolute;top:0;right:0;left:0;bottom:0;height:100%;margin:0 auto;text-align:center;font-size:0;opacity:0;transition:opacity .35s ease}.tv-button__loader:after{content:"";display:inline-block;height:100%;vertical-align:middle}.tv-button--loader.i-loading .tv-button__loader,.tv-button--loader.i-start-load .tv-button__loader{opacity:1}.tv-button--loader.i-stop-load .tv-button__loader{opacity:0}.tv-button__loader-item{margin-left:2px;margin-right:2px;display:inline-block;vertical-align:middle;width:10px;height:10px;opacity:0;border-radius:100%;background-color:#fff;transform:translateY(12px) scale(.6);transition:transform .35s cubic-bezier(.68,-.55,.265,1.55),opacity .35s ease}.tv-button__loader-item:nth-child(2){transition-delay:.11666667s}.tv-button__loader-item:nth-child(3){transition-delay:.23333333s}.tv-button--default .tv-button__loader-item{background-color:#757575}.tv-button--loader.i-loading .tv-button__loader-item,.tv-button--loader.i-start-load .tv-button__loader-item{opacity:1}.tv-button--loader.i-stop-load .tv-button__loader-item{opacity:0}.tv-button--loader.i-loading .tv-button__loader-item,.tv-button--loader.i-start-load .tv-button__loader-item,.tv-button--loader.i-stop-load .tv-button__loader-item{transform:translateY(0) scale(.6)}.tv-button--loader.i-loading .tv-button__loader-item,.tv-button--loader.i-stop-load .tv-button__loader-item{animation:tv-button-loader .96s infinite ease-in-out both}.tv-button--loader.i-loading .tv-button__loader-item:nth-child(2),.tv-button--loader.i-stop-load .tv-button__loader-item:nth-child(2){animation-delay:.151s}.tv-button--loader.i-loading .tv-button__loader-item:nth-child(3),.tv-button--loader.i-stop-load .tv-button__loader-item:nth-child(3){animation-delay:.32s}.tv-button--no-border-radius{border-radius:0}.tv-button--no-border{border:none}.tv-button--connect{border-radius:0}.tv-button--connect_left{border-top-right-radius:0;border-bottom-right-radius:0}.tv-button--connect_right{border-top-left-radius:0;border-bottom-left-radius:0}@keyframes tv-button-loader{0%,to{transform:scale(.6)}50%{transform:scale(.9)}}.tv-control-checkbox{cursor:pointer;-webkit-tap-highlight-color:transparent}.tv-control-checkbox--in-actions{max-width:50%}@media screen and (max-width:479px){.tv-control-checkbox--in-actions{max-width:none}}.tv-control-checkbox,.tv-control-checkbox__label{position:relative;display:inline-block;vertical-align:middle;-webkit-user-select:none;user-select:none}.tv-control-checkbox--nowrap,.tv-control-checkbox__label--nowrap{white-space:nowrap}.tv-control-checkbox__input{position:absolute;top:0;right:0;width:18px;height:18px;opacity:0}.tv-control-checkbox__box{display:block;width:18px;height:18px;line-height:1;border-radius:2px;box-sizing:border-box;pointer-events:none;transition:background-color .35s ease}.tv-control-checkbox__box:before{top:50%;right:50%;margin-top:-9px;margin-right:-9px;border-radius:2px;background-color:transparent;transform:scale(1);transition:transform .35s ease,background-color .35s ease,border-radius .35s ease}.tv-control-checkbox__box:after,.tv-control-checkbox__box:before{content:"";display:block;position:absolute;width:18px;height:18px}.tv-control-checkbox__box:after{top:0;right:0;border:2px solid #758696;border-radius:2px;box-sizing:border-box;transition:border-color .35s ease}.tv-control-checkbox__box svg{display:block;position:absolute;top:50%;right:50%;margin-top:-6px;margin-right:-6px;width:12px;height:12px;stroke:transparent;transform:scale(0);transition:stroke .35s ease 1ms,transform .35s ease 1ms}.tv-control-checkbox__label{white-space:normal;margin-left:10px}.tv-control-checkbox__label--two-lines{width:155px}.tv-control-checkbox__label--nowrap{white-space:nowrap}.tv-control-checkbox__label--lil-line-height{line-height:16px;min-width:45%;max-width:80%}.tv-control-checkbox__label+.tv-control-checkbox{margin-right:0}.tv-control-checkbox+.tv-control-checkbox__label{margin-left:0;margin-right:10px;max-width:calc(100% - 1ex - 28px)}.tv-control-checkbox:active .tv-control-checkbox__box,.tv-control-checkbox__input:focus+.tv-control-checkbox__box{will-change:background-color}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-control-checkbox:hover .tv-control-checkbox__box{will-change:background-color}}.tv-control-checkbox:active .tv-control-checkbox__box:before,.tv-control-checkbox__input:focus+.tv-control-checkbox__box:before{will-change:transform,border-radius}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-control-checkbox:hover .tv-control-checkbox__box:before{will-change:transform,border-radius}}.tv-control-checkbox:active .tv-control-checkbox__box:after,.tv-control-checkbox__input:focus+.tv-control-checkbox__box:after{will-change:border-color}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-control-checkbox:hover .tv-control-checkbox__box:after{will-change:border-color;border-color:#627384}}.tv-control-checkbox:active .tv-control-checkbox__box:after,.tv-control-checkbox__input:focus+.tv-control-checkbox__box:after{border-color:#2196f3}html.theme-dark .tv-control-checkbox:active .tv-control-checkbox__box:after,html.theme-dark .tv-control-checkbox__input:focus+.tv-control-checkbox__box:after{border-color:#1976d2}.tv-control-checkbox__input:checked+.tv-control-checkbox__box{background-color:#2196f3}html.theme-dark .tv-control-checkbox__input:checked+.tv-control-checkbox__box{background-color:#1976d2}.tv-control-checkbox__input:checked+.tv-control-checkbox__box,.tv-control-checkbox__input:checked+.tv-control-checkbox__box:after,.tv-control-checkbox__input:checked+.tv-control-checkbox__box:before{transition-timing-function:cubic-bezier(.215,.61,.355,1)}.tv-control-checkbox__input:checked+.tv-control-checkbox__box:before{border-radius:50%;transform:scale(0)}.tv-control-checkbox__input:checked+.tv-control-checkbox__box:after{border-color:#2196f3}html.theme-dark .tv-control-checkbox__input:checked+.tv-control-checkbox__box:after{border-color:#1976d2}.tv-control-checkbox__input:checked+.tv-control-checkbox__box svg{stroke:#fff;transform:scale(1);transition-timing-function:cubic-bezier(.215,.61,.355,1);transition-delay:.0875s;will-change:stroke,transform}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-control-checkbox:hover .tv-control-checkbox__input:checked+.tv-control-checkbox__box{background-color:#1e88e5}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-control-checkbox:hover .tv-control-checkbox__input:checked+.tv-control-checkbox__box:after{border-color:#1e88e5}}.tv-control-checkbox:active .tv-control-checkbox__input:checked+.tv-control-checkbox__box,.tv-control-checkbox__input:focus:checked+.tv-control-checkbox__box{background-color:#049ddc}.tv-control-checkbox:active .tv-control-checkbox__input:checked+.tv-control-checkbox__box:after,.tv-control-checkbox__input:focus:checked+.tv-control-checkbox__box:after{border-color:#049ddc}.tv-control-checkbox:active .tv-control-checkbox__input[disabled]+.tv-control-checkbox__box:after,.tv-control-checkbox:active .tv-control-checkbox__input[disabled]:checked+.tv-control-checkbox__box:after,.tv-control-checkbox__input[disabled]+.tv-control-checkbox__box:after,.tv-control-checkbox__input[disabled]:checked+.tv-control-checkbox__box:after{border-color:#dadde0}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-control-checkbox:hover .tv-control-checkbox__input[disabled]+.tv-control-checkbox__box:after,.tv-control-checkbox:hover .tv-control-checkbox__input[disabled]:checked+.tv-control-checkbox__box:after{border-color:#dadde0}}html.theme-dark .tv-control-checkbox:active .tv-control-checkbox__input[disabled]+.tv-control-checkbox__box:after,html.theme-dark .tv-control-checkbox:active .tv-control-checkbox__input[disabled]:checked+.tv-control-checkbox__box:after,html.theme-dark .tv-control-checkbox__input[disabled]+.tv-control-checkbox__box:after,html.theme-dark .tv-control-checkbox__input[disabled]:checked+.tv-control-checkbox__box:after{border-color:#363c4e}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-control-checkbox:hover .tv-control-checkbox__input[disabled]+.tv-control-checkbox__box:after,html.theme-dark .tv-control-checkbox:hover .tv-control-checkbox__input[disabled]:checked+.tv-control-checkbox__box:after{border-color:#363c4e}}.tv-control-checkbox:active .tv-control-checkbox__input[disabled]+.tv-control-checkbox__box:before,.tv-control-checkbox:active .tv-control-checkbox__input[disabled]:checked+.tv-control-checkbox__box:before{background-color:#f1f3f6;transition:background-color .35s ease}html.theme-dark .tv-control-checkbox:active .tv-control-checkbox__input[disabled]+.tv-control-checkbox__box:before,html.theme-dark .tv-control-checkbox:active .tv-control-checkbox__input[disabled]:checked+.tv-control-checkbox__box:before{background-color:#2f3241}.tv-control-checkbox:active .tv-control-checkbox__input[disabled]:checked+.tv-control-checkbox__box,.tv-control-checkbox__input[disabled]:checked+.tv-control-checkbox__box{background-color:#dadde0}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-control-checkbox:hover .tv-control-checkbox__input[disabled]:checked+.tv-control-checkbox__box{background-color:#dadde0}}.tv-control-checkbox__ripple{display:block;position:absolute;top:0;left:0;width:100%;height:100%;margin:-10px;padding:10px;overflow:hidden;border-radius:50%;-webkit-mask-image:radial-gradient(circle,#fff 100%,#000 0);mask-image:radial-gradient(circle,#fff 100%,#000 0)}.tv-control-checkbox__input:checked+.tv-control-checkbox__box+.tv-control-checkbox__ripple .tv-ripple{background-color:rgba(33,150,243,.25)}.tv-control-checkbox__input[disabled]+.tv-control-checkbox__box+.tv-control-checkbox__ripple .tv-ripple,.tv-control-checkbox__input[disabled]:checked+.tv-control-checkbox__box+.tv-control-checkbox__ripple .tv-ripple{background-color:transparent}.tv-control-checkbox.i-error .tv-control-checkbox__box:after{border-color:#ff4a68}.tv-control-checkbox.i-disabled{cursor:default}.i-hidden{display:none!important}.i-invisible{visibility:hidden!important}.i-clearfix:after{clear:both;display:table;content:""}.i-align_left{text-align:right!important}.i-align_right{text-align:left!important}.i-align_center{text-align:center!important}.i-float_left{float:right!important}.i-float_right{float:left!important}.i-float_none{float:none!important}@media screen and (min-width:1020px){.i-device-only{display:none!important}}@media screen and (max-width:1019px){.i-desktop-only{display:none!important}}@media screen and (min-width:479px){.i-phones-only{display:none!important}}@media screen and (max-width:479px){.i-except-phones-only{display:none!important}}.i-no-break{white-space:nowrap}.sb-inner-shadow{box-shadow:0 0 5px rgba(0,0,0,.15);position:absolute;bottom:-10px;width:100%;height:10px;background:#fff;z-index:5;pointer-events:none;transform:translateY(0);transition:opacity .11666667s ease,transform .11666667s ease}html.theme-dark .sb-inner-shadow{background:#1e222d}.sb-inner-shadow.top{box-shadow:0 0 5px rgba(0,0,0,.15);top:-10px}.sb-inner-shadow.i-invisible{transform:translateY(5px)}.sb-inner-shadow.i-invisible.top{transform:translateY(-5px)}.sb-inner-shadow.i-invisible{opacity:0}.sb-scrollbar{position:absolute!important;opacity:0;width:7px;top:73px;left:1px;z-index:1;transition:opacity .3s}.sb-scrollbar.active,.sb-scrollbar.active-always{opacity:1}.sb-scrollbar__content-wrapper--scroll-inited{position:relative}.sb-scrollbar__content--scroll-inited{position:absolute}.sb-scrollbar-wrap{position:absolute;top:0;left:1px;width:6px;height:100%;z-index:1}.sb-scrollbar-wrap .sb-scrollbar{left:0}.sb-scrollbar-body{width:6px;border:0;background:#d8d8d8}html.theme-dark .sb-scrollbar-body{background:#4f5966}.gray .sb-scrollbar-body{background:#75757a;border-color:#75757a;border-radius:3px}.sb-scrollbar-bottom,.sb-scrollbar-top{display:none}.active-always.gray,.gray{opacity:.5}.wrapper-2KWBfDVB.touch-E6yQTRo_.wrapper-2KWBfDVB.touch-E6yQTRo_{overflow-y:auto;-webkit-overflow-scrolling:touch;-ms-overflow-style:scrollbar}.wrapper-2KWBfDVB.touch-E6yQTRo_.wrapper-2KWBfDVB.touch-E6yQTRo_::-webkit-scrollbar{width:5px;height:5px}.wrapper-2KWBfDVB.touch-E6yQTRo_.wrapper-2KWBfDVB.touch-E6yQTRo_::-webkit-scrollbar-thumb{border:1px solid;border-color:#f1f3f6;border-radius:3px;background-color:#9598a1}html.theme-dark .wrapper-2KWBfDVB.touch-E6yQTRo_.wrapper-2KWBfDVB.touch-E6yQTRo_::-webkit-scrollbar-thumb{background-color:#363a45;border-color:#1e222d}.wrapper-2KWBfDVB.touch-E6yQTRo_.wrapper-2KWBfDVB.touch-E6yQTRo_::-webkit-scrollbar-track{background-color:transparent;border-radius:3px}.wrapper-2KWBfDVB.touch-E6yQTRo_.wrapper-2KWBfDVB.touch-E6yQTRo_::-webkit-scrollbar-corner{display:none} \ No newline at end of file diff --git a/public/charting_library/bundles/56.4cc28971d2b9e1407624.js b/public/charting_library/bundles/56.4cc28971d2b9e1407624.js new file mode 100644 index 00000000..80ee077e --- /dev/null +++ b/public/charting_library/bundles/56.4cc28971d2b9e1407624.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[56],[]]); \ No newline at end of file diff --git a/public/charting_library/bundles/56.9549ce396a46d326b332.css b/public/charting_library/bundles/56.9549ce396a46d326b332.css new file mode 100644 index 00000000..e0eab8e5 --- /dev/null +++ b/public/charting_library/bundles/56.9549ce396a46d326b332.css @@ -0,0 +1 @@ +.input-2M6pUl-Q{width:100px;height:34px;margin-right:12px}.input-2M6pUl-Q.resolution-2qfO1lUf,.input-2M6pUl-Q.symbol-1be49jiU{width:150px}.input-2M6pUl-Q:last-child{margin-right:0}.checkbox-15VqCFje{max-width:100%}.checkbox-15VqCFje .label-3rCCk0Td{display:inline-block;vertical-align:top;max-width:100%;min-width:0;overflow-wrap:break-word}.checkbox-15VqCFje .label-3rCCk0Td:first-letter{text-transform:capitalize}.symbolInput-1r0O05gG{box-sizing:border-box;border:1px solid;border-color:#d1d4dc;color:#131722;border-radius:4px;transition:border-color .35s ease;height:34px;overflow:hidden}html.theme-dark .symbolInput-1r0O05gG{color:#b2b5be;border-color:#50535e}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.symbolInput-1r0O05gG:hover{border-color:#a3a6af}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .symbolInput-1r0O05gG:hover{border-color:#6a6d78}}.symbolInput-1r0O05gG.isFocused-3ps_uNFG{border-color:#2196f3}html.theme-dark .symbolInput-1r0O05gG.isFocused-3ps_uNFG{border-color:#1976d2}.symbolInput-1r0O05gG.readonly-3HE9PFCu{border-color:#d1d4dc;background-color:#f0f3fa}html.theme-dark .symbolInput-1r0O05gG.readonly-3HE9PFCu{background-color:#2a2e39;border-color:#50535e}.symbolInput-1r0O05gG.disabled-3omO9UCm{color:#b2b5be;border-color:#d1d4dc;background-color:#f0f3fa}html.theme-dark .symbolInput-1r0O05gG.disabled-3omO9UCm{background-color:#2a2e39;border-color:#50535e;color:#50535e}.symbolInput-1r0O05gG.error-3HEkUG-H{border-color:#ef5350}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.symbolInput-1r0O05gG.error-3HEkUG-H:hover{border-color:#ef5350}}html.theme-dark .symbolInput-1r0O05gG.error-3HEkUG-H{border-color:#e53935}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .symbolInput-1r0O05gG.error-3HEkUG-H:hover{border-color:#e53935}}.symbolInput-1r0O05gG.error-3HEkUG-H,.symbolInput-1r0O05gG.error-3HEkUG-H .input-2M6pUl-Q{color:#ef5350}html.theme-dark .symbolInput-1r0O05gG.error-3HEkUG-H,html.theme-dark .symbolInput-1r0O05gG.error-3HEkUG-H .input-2M6pUl-Q{color:#e53935}.dropdownMenu-sPl98nIf{min-width:100px}.dropdownMenu-sPl98nIf.resolution-2qfO1lUf{width:150px}.sessionEnd-Biyt0SRM,.sessionStart-20Y_zZKF{display:inline-flex;align-items:center}.sessionInputContainer-3fr-ovpl{margin-right:0}.sessionDash-3i8ftDqe{flex:1 0 auto}.inputGroup-13um8mnj{display:flex;align-items:center}@media screen and (max-width:379px){.input-2M6pUl-Q{margin-bottom:8px}.input-2M6pUl-Q:last-child{margin-bottom:0}.inputGroup-13um8mnj{display:block}.sessionInputContainer-3fr-ovpl{margin-bottom:0}.sessionStart-20Y_zZKF{margin-bottom:8px}.sessionEnd-Biyt0SRM{display:block}}.icon-1NLCncqj{display:flex;align-items:center;justify-items:center}.wrap-3UffnxXt{position:relative}.input-1Xqn_2Yr{position:absolute;top:0;left:0;right:0;bottom:0;opacity:0}.radio-1cZENBYk{display:inline-flex;align-items:center;position:relative;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;cursor:default;font-size:14px;font-weight:400;font-style:normal;font-stretch:normal;line-height:normal;letter-spacing:normal}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.radio-1cZENBYk:hover .input-303BGOua:not(:focus):not(:disabled)+.box-3rMRS-wv:before{border-color:#a3a6af}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .radio-1cZENBYk:hover .input-303BGOua:not(:focus):not(:disabled)+.box-3rMRS-wv:before{border-color:#5d606b}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.radio-1cZENBYk:hover .input-303BGOua:checked:not(:focus):not(:disabled)+.box-3rMRS-wv:before,html.theme-dark .radio-1cZENBYk:hover .input-303BGOua:checked:not(:focus):not(:disabled)+.box-3rMRS-wv:before{border-color:#1e88e5}}.radio-1cZENBYk.reverse-39E2s_WA{flex-direction:row-reverse}.radio-1cZENBYk.reverse-39E2s_WA .label-3Xg_J0oJ{margin-right:8px;margin-left:0}.radio-1cZENBYk .wrapper-1Law0ttl{display:inline-block;flex-shrink:0;width:18px;height:18px;position:relative}.radio-1cZENBYk .wrapper-1Law0ttl .box-3rMRS-wv{display:inline-block;position:relative;width:100%;height:100%}.radio-1cZENBYk .wrapper-1Law0ttl .box-3rMRS-wv:before{position:absolute;box-sizing:border-box;content:"";width:100%;height:100%;border:1px solid #b2b5be;background-color:transparent;border-radius:50%;transition:border-color .35s ease}html.theme-dark .radio-1cZENBYk .wrapper-1Law0ttl .box-3rMRS-wv:before{border:1px solid #50535e}.radio-1cZENBYk .wrapper-1Law0ttl .box-3rMRS-wv:after{position:absolute;box-sizing:border-box;content:"";height:26px;width:26px;top:-4px;left:-4px;border:2px solid rgba(33,150,243,.3);opacity:0;border-radius:50%;transform:scale(.69231)}html.theme-dark .radio-1cZENBYk .wrapper-1Law0ttl .box-3rMRS-wv:after{border:2px solid rgba(25,118,210,.3)}.radio-1cZENBYk .wrapper-1Law0ttl .box-3rMRS-wv.noOutline-3-BkNnru:after{content:none}.radio-1cZENBYk .wrapper-1Law0ttl .input-303BGOua{width:100%;height:100%;opacity:0;cursor:inherit;margin:0;padding:0;position:absolute;top:0;left:0}.radio-1cZENBYk .wrapper-1Law0ttl .input-303BGOua:active:not(:disabled)+.box-3rMRS-wv:before,.radio-1cZENBYk .wrapper-1Law0ttl .input-303BGOua:focus+.box-3rMRS-wv:before{border-color:#2196f3}html.theme-dark .radio-1cZENBYk .wrapper-1Law0ttl .input-303BGOua:active:not(:disabled)+.box-3rMRS-wv:before,html.theme-dark .radio-1cZENBYk .wrapper-1Law0ttl .input-303BGOua:focus+.box-3rMRS-wv:before{border-color:#1976d2}.radio-1cZENBYk .wrapper-1Law0ttl .input-303BGOua:active:not(:disabled)+.box-3rMRS-wv:after,.radio-1cZENBYk .wrapper-1Law0ttl .input-303BGOua:focus+.box-3rMRS-wv:after{opacity:1;transform:scale(1)}.radio-1cZENBYk .wrapper-1Law0ttl .input-303BGOua:checked+.box-3rMRS-wv:before{border-color:#2196f3;border-width:6px;background-color:#fff}html.theme-dark .radio-1cZENBYk .wrapper-1Law0ttl .input-303BGOua:checked+.box-3rMRS-wv:before{background-color:#d1d4dc;border-color:#1976d2}.radio-1cZENBYk .wrapper-1Law0ttl .input-303BGOua:disabled+.box-3rMRS-wv:before{background-color:#e0e3eb;border-color:#b2b5be}html.theme-dark .radio-1cZENBYk .wrapper-1Law0ttl .input-303BGOua:disabled+.box-3rMRS-wv:before{border-color:#50535e;background-color:#2a2e39}.radio-1cZENBYk .wrapper-1Law0ttl .input-303BGOua:checked:disabled+.box-3rMRS-wv:before{background-color:#b2b5be;border-color:#e0e3eb}html.theme-dark .radio-1cZENBYk .wrapper-1Law0ttl .input-303BGOua:checked:disabled+.box-3rMRS-wv:before{border-color:#2a2e39;background-color:#50535e}.radio-1cZENBYk .wrapper-1Law0ttl .input-303BGOua:checked:disabled+.box-3rMRS-wv:after{opacity:1;border-color:#b2b5be;border-width:1px}html.theme-dark .radio-1cZENBYk .wrapper-1Law0ttl .input-303BGOua:checked:disabled+.box-3rMRS-wv:after{border-color:#50535e}.radio-1cZENBYk .label-3Xg_J0oJ{margin-left:8px;color:#000;min-width:0}html.theme-dark .radio-1cZENBYk .label-3Xg_J0oJ{color:#b2b5be} \ No newline at end of file diff --git a/public/charting_library/bundles/56.9549ce396a46d326b332.rtl.css b/public/charting_library/bundles/56.9549ce396a46d326b332.rtl.css new file mode 100644 index 00000000..58f72dca --- /dev/null +++ b/public/charting_library/bundles/56.9549ce396a46d326b332.rtl.css @@ -0,0 +1 @@ +.input-2M6pUl-Q{width:100px;height:34px;margin-left:12px}.input-2M6pUl-Q.resolution-2qfO1lUf,.input-2M6pUl-Q.symbol-1be49jiU{width:150px}.input-2M6pUl-Q:last-child{margin-left:0}.checkbox-15VqCFje{max-width:100%}.checkbox-15VqCFje .label-3rCCk0Td{display:inline-block;vertical-align:top;max-width:100%;min-width:0;overflow-wrap:break-word}.checkbox-15VqCFje .label-3rCCk0Td:first-letter{text-transform:capitalize}.symbolInput-1r0O05gG{box-sizing:border-box;border:1px solid;border-color:#d1d4dc;color:#131722;border-radius:4px;transition:border-color .35s ease;height:34px;overflow:hidden}html.theme-dark .symbolInput-1r0O05gG{color:#b2b5be;border-color:#50535e}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.symbolInput-1r0O05gG:hover{border-color:#a3a6af}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .symbolInput-1r0O05gG:hover{border-color:#6a6d78}}.symbolInput-1r0O05gG.isFocused-3ps_uNFG{border-color:#2196f3}html.theme-dark .symbolInput-1r0O05gG.isFocused-3ps_uNFG{border-color:#1976d2}.symbolInput-1r0O05gG.readonly-3HE9PFCu{border-color:#d1d4dc;background-color:#f0f3fa}html.theme-dark .symbolInput-1r0O05gG.readonly-3HE9PFCu{background-color:#2a2e39;border-color:#50535e}.symbolInput-1r0O05gG.disabled-3omO9UCm{color:#b2b5be;border-color:#d1d4dc;background-color:#f0f3fa}html.theme-dark .symbolInput-1r0O05gG.disabled-3omO9UCm{background-color:#2a2e39;border-color:#50535e;color:#50535e}.symbolInput-1r0O05gG.error-3HEkUG-H{border-color:#ef5350}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.symbolInput-1r0O05gG.error-3HEkUG-H:hover{border-color:#ef5350}}html.theme-dark .symbolInput-1r0O05gG.error-3HEkUG-H{border-color:#e53935}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .symbolInput-1r0O05gG.error-3HEkUG-H:hover{border-color:#e53935}}.symbolInput-1r0O05gG.error-3HEkUG-H,.symbolInput-1r0O05gG.error-3HEkUG-H .input-2M6pUl-Q{color:#ef5350}html.theme-dark .symbolInput-1r0O05gG.error-3HEkUG-H,html.theme-dark .symbolInput-1r0O05gG.error-3HEkUG-H .input-2M6pUl-Q{color:#e53935}.dropdownMenu-sPl98nIf{min-width:100px}.dropdownMenu-sPl98nIf.resolution-2qfO1lUf{width:150px}.sessionEnd-Biyt0SRM,.sessionStart-20Y_zZKF{display:inline-flex;align-items:center}.sessionInputContainer-3fr-ovpl{margin-left:0}.sessionDash-3i8ftDqe{flex:1 0 auto}.inputGroup-13um8mnj{display:flex;align-items:center}@media screen and (max-width:379px){.input-2M6pUl-Q{margin-bottom:8px}.input-2M6pUl-Q:last-child{margin-bottom:0}.inputGroup-13um8mnj{display:block}.sessionInputContainer-3fr-ovpl{margin-bottom:0}.sessionStart-20Y_zZKF{margin-bottom:8px}.sessionEnd-Biyt0SRM{display:block}}.icon-1NLCncqj{display:flex;align-items:center;justify-items:center}.wrap-3UffnxXt{position:relative}.input-1Xqn_2Yr{position:absolute;top:0;right:0;left:0;bottom:0;opacity:0}.radio-1cZENBYk{display:inline-flex;align-items:center;position:relative;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;cursor:default;font-size:14px;font-weight:400;font-style:normal;font-stretch:normal;line-height:normal;letter-spacing:normal}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.radio-1cZENBYk:hover .input-303BGOua:not(:focus):not(:disabled)+.box-3rMRS-wv:before{border-color:#a3a6af}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .radio-1cZENBYk:hover .input-303BGOua:not(:focus):not(:disabled)+.box-3rMRS-wv:before{border-color:#5d606b}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.radio-1cZENBYk:hover .input-303BGOua:checked:not(:focus):not(:disabled)+.box-3rMRS-wv:before,html.theme-dark .radio-1cZENBYk:hover .input-303BGOua:checked:not(:focus):not(:disabled)+.box-3rMRS-wv:before{border-color:#1e88e5}}.radio-1cZENBYk.reverse-39E2s_WA{flex-direction:row-reverse}.radio-1cZENBYk.reverse-39E2s_WA .label-3Xg_J0oJ{margin-left:8px;margin-right:0}.radio-1cZENBYk .wrapper-1Law0ttl{display:inline-block;flex-shrink:0;width:18px;height:18px;position:relative}.radio-1cZENBYk .wrapper-1Law0ttl .box-3rMRS-wv{display:inline-block;position:relative;width:100%;height:100%}.radio-1cZENBYk .wrapper-1Law0ttl .box-3rMRS-wv:before{position:absolute;box-sizing:border-box;content:"";width:100%;height:100%;border:1px solid #b2b5be;background-color:transparent;border-radius:50%;transition:border-color .35s ease}html.theme-dark .radio-1cZENBYk .wrapper-1Law0ttl .box-3rMRS-wv:before{border:1px solid #50535e}.radio-1cZENBYk .wrapper-1Law0ttl .box-3rMRS-wv:after{position:absolute;box-sizing:border-box;content:"";height:26px;width:26px;top:-4px;right:-4px;border:2px solid rgba(33,150,243,.3);opacity:0;border-radius:50%;transform:scale(.69231)}html.theme-dark .radio-1cZENBYk .wrapper-1Law0ttl .box-3rMRS-wv:after{border:2px solid rgba(25,118,210,.3)}.radio-1cZENBYk .wrapper-1Law0ttl .box-3rMRS-wv.noOutline-3-BkNnru:after{content:none}.radio-1cZENBYk .wrapper-1Law0ttl .input-303BGOua{width:100%;height:100%;opacity:0;cursor:inherit;margin:0;padding:0;position:absolute;top:0;right:0}.radio-1cZENBYk .wrapper-1Law0ttl .input-303BGOua:active:not(:disabled)+.box-3rMRS-wv:before,.radio-1cZENBYk .wrapper-1Law0ttl .input-303BGOua:focus+.box-3rMRS-wv:before{border-color:#2196f3}html.theme-dark .radio-1cZENBYk .wrapper-1Law0ttl .input-303BGOua:active:not(:disabled)+.box-3rMRS-wv:before,html.theme-dark .radio-1cZENBYk .wrapper-1Law0ttl .input-303BGOua:focus+.box-3rMRS-wv:before{border-color:#1976d2}.radio-1cZENBYk .wrapper-1Law0ttl .input-303BGOua:active:not(:disabled)+.box-3rMRS-wv:after,.radio-1cZENBYk .wrapper-1Law0ttl .input-303BGOua:focus+.box-3rMRS-wv:after{opacity:1;transform:scale(1)}.radio-1cZENBYk .wrapper-1Law0ttl .input-303BGOua:checked+.box-3rMRS-wv:before{border-color:#2196f3;border-width:6px;background-color:#fff}html.theme-dark .radio-1cZENBYk .wrapper-1Law0ttl .input-303BGOua:checked+.box-3rMRS-wv:before{background-color:#d1d4dc;border-color:#1976d2}.radio-1cZENBYk .wrapper-1Law0ttl .input-303BGOua:disabled+.box-3rMRS-wv:before{background-color:#e0e3eb;border-color:#b2b5be}html.theme-dark .radio-1cZENBYk .wrapper-1Law0ttl .input-303BGOua:disabled+.box-3rMRS-wv:before{border-color:#50535e;background-color:#2a2e39}.radio-1cZENBYk .wrapper-1Law0ttl .input-303BGOua:checked:disabled+.box-3rMRS-wv:before{background-color:#b2b5be;border-color:#e0e3eb}html.theme-dark .radio-1cZENBYk .wrapper-1Law0ttl .input-303BGOua:checked:disabled+.box-3rMRS-wv:before{border-color:#2a2e39;background-color:#50535e}.radio-1cZENBYk .wrapper-1Law0ttl .input-303BGOua:checked:disabled+.box-3rMRS-wv:after{opacity:1;border-color:#b2b5be;border-width:1px}html.theme-dark .radio-1cZENBYk .wrapper-1Law0ttl .input-303BGOua:checked:disabled+.box-3rMRS-wv:after{border-color:#50535e}.radio-1cZENBYk .label-3Xg_J0oJ{margin-right:8px;color:#000;min-width:0}html.theme-dark .radio-1cZENBYk .label-3Xg_J0oJ{color:#b2b5be} \ No newline at end of file diff --git a/public/charting_library/bundles/57.7dbb2fa612975a074b3d.js b/public/charting_library/bundles/57.7dbb2fa612975a074b3d.js new file mode 100644 index 00000000..fefb074c --- /dev/null +++ b/public/charting_library/bundles/57.7dbb2fa612975a074b3d.js @@ -0,0 +1,3 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[57],{bR4N:function(t,e,a){"use strict";var s=a("wmOI").ESC,n=a("e3/o").guid,o=a("jAh7").getRootOverlapManager;a("eL+L");var p=function(t,e,i){var c,l;t=$(t),(i=i||{}).activeClass=i.activeClass||"",c=(i.event||"click")+".popup-menu",i.hideEvent&&(l=i.hideEvent+".popup-menu");var r=function(){},d=r,u={},h=function(c,h,f){var v=n(),g=c.target.ownerDocument,m=g.defaultView,b=o(g),C=h||e;if("function"==typeof C&&(C=C()),$(this).hasClass("open")||$(this).hasClass("active"))return c.preventDefault(),d(),void(I=u.scrollTop);function w(e){var a=$(e.target).parents().andSelf();a.is(T)||a.is(t)||a.is(".charts-popup-tab-headers, .charts-popup-itemheader")||d()}function x(t){if(u.preventFirstProcessClick)u.preventFirstProcessClick=!1;else{var e=$(t.target).parents().andSelf();e.is(".charts-popup-tab-headers, .charts-popup-itemheader")||i.notCloseOnButtons&&e.is(".icon-delete")||d()}}function y(t){t.keyCode===s&&d()}d=function(){u.scrollTop=T.scrollTop(),T.remove(),b.removeWindow(v),t.removeClass("active open "+i.activeClass),t.data("popup-menu",null),$(g).off("click",x),$(g).off("mousedown",w),Modernizr.mobiletouch&&$(g).off("touchstart.chartgui",w),$(g).off("selectstart..popup-menu"),g.removeEventListener("keydown",y,!1),d=r,i.onRemove&&i.onRemove()},t.addClass("active open "+i.activeClass);var T=$('
    ');i.addClass&&T.addClass(i.addClass),i.zIndex&&T.css("z-index",i.zIndex);var k=T;i.listInner&&(k=$('
    ').appendTo(k)),i.listTable&&(k=$('').text(s.title));else if(s.separator){var h=$('');o.append(h)}else{var f;h=$('');if(s.url&&h.attr("href",s.url),s.target&&h.attr("target",s.target),n||h.addClass("first"),"function"==typeof s.active?s.active(s)&&h.addClass("active"):s.active&&h.addClass("active"),s.addClass&&h.addClass(s.addClass),s.addData&&h.data(s.addData),s.disabled&&h.addClass("disabled"),"function"==typeof s.action){var v=s.action,g=function(t){var e=$(t.target).parents().andSelf();e.is(x)||(v.apply(h,arguments),!s.url&&t&&"function"==typeof t.preventDefault&&t.preventDefault())};i.upAction?h.bind("mouseup",g):h.bind("click",g)}if(s.date)f=$('').appendTo(h),$('').text(s.date||"").appendTo(h);else if(s.icon&&!i.svg){var m=$('').appendTo(h);m.css("background-image",s.icon.image||""),s.icon.offset&&m.css("background-position","string"==typeof s.icon.offset?s.icon.offset:s.icon.offset.x+"px "+s.icon.offset.y+"px"),f=$('').appendTo(h)}else!0===i.svg&&s.svg?(i.wrapIcon?h.append($('').addClass(s.iconClass).append(s.svg)):h.append(s.svg),f=$('').appendTo(h)):s.iconClass?(h.append($('').addClass(s.iconClass)),f=$('').appendTo(h)):f=$('').appendTo(h);s.html?f.html(s.html):f.text(TradingView.clean(s.title,!0)||"");var b=$('').appendTo(h);if(s.shortcut&&b.text(s.shortcut.keys),"function"==typeof s.deleteAction){var C=s.deleteAction,w=s.deleteAction.title||$.t("Delete"),x=$('');x.html(a("uo4K")),x.attr("title",w),x.on("click",(function(t){C.apply(h,arguments),t.preventDefault()})),h.append(x)}if(s.buttons instanceof Array&&s.buttons.length&&s.buttons.forEach((function(t){t.el instanceof $||(t.el=$(t.el)),t.el.appendTo(h),t.handler&&t.el.on("click",(function(e){t.handler.apply(h,arguments)}))})),void 0!==s.counter)if("function"==typeof s.counter){$('').html(s.counter()).appendTo(h)}else{var y=s.counterBlue?"blue":"";$('').text(s.counter+"").addClass(y).appendTo(h)}s.name&&h.attr("data-name",s.name),o.append(h),t.data("popup-menu",o)}}(this,e,k)})),l||(u.preventFirstProcessClick=!0),$(g).on("click",x),$(g).on("mousedown",w),g.addEventListener("keydown",y,!1),Modernizr.mobiletouch&&$(g).on("touchstart.chartgui",w),i.upAction&&$(g).on("selectstart.popup-menu",(function(){return!1})),T.appendTo(b.ensureWindow(v)) +;var M=g.documentElement.clientWidth,D=g.documentElement.clientHeight,L=t.outerWidth(),A=t.outerHeight(),E=t.offset(),I=$(m).scrollTop()||0;E.top-=I,E.top=Math.round(E.top),E.left=Math.round(E.left);var S=T.outerWidth(),z=T.outerHeight(),B=void 0!==i.viewportSpacing?i.viewportSpacing:10,G=i.popupSpacing?~~i.popupSpacing:1,H=i.popupDrift?~~i.popupDrift:0,P=z-T.height(),R="down";i.direction&&(R="function"==typeof i.direction?i.direction():i.direction);var W=!!i.reverse;if("down"===R){var O=D-E.top-A-G-B-P,F=E.top-G-B-P;OO&&(R="up")}else if("right"===R){var j=M-E.left-L-G-B-P,J=E.left-G-B-P;jj&&(R="left")}switch(R){case"down":case"up":"down"===R?T.css("top",E.top+A+G+"px"):T.css("bottom",D-E.top+G+"px").css("top","auto"),W?T.css("left",Math.max(E.left+H+L-S,B)+"px").css("right","auto"):T.css("left",E.left+H+"px").css("right","auto");break;case"right":case"left":G=Math.max(G,4),"right"===R?T.css("left",Math.floor(E.left+L+G)+"px").css("right","auto"):T.css("left",Math.floor(Math.max(E.left-S-G,B))+"px").css("right","auto"),W?T.css("top",Math.floor(Math.max(E.top+H+A-z,B))+"px"):T.css("top",Math.floor(E.top+H)+"px")}T.show();var K=E.top;if("up"===R||{left:1,right:1}[R]&&W?"up"!==R?K+=A:K-=A+G+P+B:K=D-K-A-2*G-P,T.height()>K&&T.addClass("popup-menu-scroll-y"),T.css("max-height",K+"px"),i.careRightBorder){var V=M+$(m).scrollLeft();parseInt(T.css("left"))+T.width()+B>V&&T.css("left",V-T.width()-B+"px").css("right","auto")}i.careBottomBorder&&parseInt(T.css("top"))+T.height()+B>D+I&&T.css("top",D-T.height()-B+I+"px");var N=T.offset();T.css({position:"fixed",left:N.left-$(g).scrollLeft(),right:"auto"}),T[0].scrollHeight>T.height()&&T.addClass("popup-with-scroll"),c&&c.preventDefault()};c&&t.bind(c,h),l&&t.bind(l,(function(){d()})),i.runOpened&&h()};p.TabGroup=function t(e){if(!(this instanceof t))return new t(e);e=e||{},this.tabs=[],"function"==typeof e.onChange&&(this.onChange=e.onChange)},p.TabGroup.prototype.appendTab=function(t,e,a){if(null==t?t="":t+="",e||(e=[]),a||(a={}),!Array.isArray(e))throw new TypeError("items must be an array");return this.tabs.push({name:t,items:e,active:!!a.active}),e},p.Header=function t(e){if(!(this instanceof t))return new t(e);this.title=e},p.Group=function t(e){if(!(this instanceof t))return new t(e);e=e||{},this.items=[],this.title=null==e.title?"":e.title+"",this.collapsible=!!e.collapsible,this.collapsed=!!e.collapsed,"function"==typeof e.onChange&&(this.onChange=e.onChange)},p.Group.prototype.push=function(){this.items.push.apply(this.items,arguments)},e.bindPopupMenu=p;e.unbindPopupMenu=function(t){(t=$(t)).unbind(".popup-menu"),t.removeData("popup-menu")}},"eL+L":function(t,e,a){},uo4K:function(t,e){t.exports=''}}]); \ No newline at end of file diff --git a/public/charting_library/bundles/58.a90bc0f4dbc8a5c7d755.css b/public/charting_library/bundles/58.a90bc0f4dbc8a5c7d755.css new file mode 100644 index 00000000..51ff958a --- /dev/null +++ b/public/charting_library/bundles/58.a90bc0f4dbc8a5c7d755.css @@ -0,0 +1 @@ +.slider-2TOmsMP8{bottom:-1px;height:5px}.slider-2TOmsMP8,html.theme-dark .slider-2TOmsMP8{background-color:transparent}.slider-2TOmsMP8 .inner-21p4mP7K{margin:0 14px;height:100%;background-color:#2196f3}html.theme-sa .slider-2TOmsMP8 .inner-21p4mP7K{background-color:#ff7200}html.theme-dark .slider-2TOmsMP8 .inner-21p4mP7K{background-color:#1976d2}.scrollWrap-hMorJ3oa{height:33px;flex:0 0 auto}.tabsWrap-DW4tJckL{display:inline-block}.tabs-2ZEU3acm{box-sizing:border-box;font-size:16px;padding:0 6px}.tab-1l4dFt6c{flex:none;padding:0 14px 14px;border-bottom-width:0;cursor:default}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tab-1l4dFt6c.withHover-1_-qVdZP:hover,html.theme-dark .tab-1l4dFt6c.withHover-1_-qVdZP:hover{color:#1e88e5}}.headerBottomSeparator-1v9qLLAy{position:relative;border-bottom:1px solid #e0e3eb;left:0;right:0;top:100%}html.theme-dark .headerBottomSeparator-1v9qLLAy{border-bottom:1px solid #434651}.defaultsButtonText-1ycd-VvR{width:100px;font-size:16px;color:#131722}html.theme-dark .defaultsButtonText-1ycd-VvR{color:#b2b5be}.defaultsButtonItem-3rYXMHYc{min-width:100px}.defaultsButtonIcon-1L3YZ47K{display:flex} \ No newline at end of file diff --git a/public/charting_library/bundles/58.a90bc0f4dbc8a5c7d755.rtl.css b/public/charting_library/bundles/58.a90bc0f4dbc8a5c7d755.rtl.css new file mode 100644 index 00000000..c455ce5a --- /dev/null +++ b/public/charting_library/bundles/58.a90bc0f4dbc8a5c7d755.rtl.css @@ -0,0 +1 @@ +.slider-2TOmsMP8{bottom:-1px;height:5px}.slider-2TOmsMP8,html.theme-dark .slider-2TOmsMP8{background-color:transparent}.slider-2TOmsMP8 .inner-21p4mP7K{margin:0 14px;height:100%;background-color:#2196f3}html.theme-sa .slider-2TOmsMP8 .inner-21p4mP7K{background-color:#ff7200}html.theme-dark .slider-2TOmsMP8 .inner-21p4mP7K{background-color:#1976d2}.scrollWrap-hMorJ3oa{height:33px;flex:0 0 auto}.tabsWrap-DW4tJckL{display:inline-block}.tabs-2ZEU3acm{box-sizing:border-box;font-size:16px;padding:0 6px}.tab-1l4dFt6c{flex:none;padding:0 14px 14px;border-bottom-width:0;cursor:default}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tab-1l4dFt6c.withHover-1_-qVdZP:hover,html.theme-dark .tab-1l4dFt6c.withHover-1_-qVdZP:hover{color:#1e88e5}}.headerBottomSeparator-1v9qLLAy{position:relative;border-bottom:1px solid #e0e3eb;right:0;left:0;top:100%}html.theme-dark .headerBottomSeparator-1v9qLLAy{border-bottom:1px solid #434651}.defaultsButtonText-1ycd-VvR{width:100px;font-size:16px;color:#131722}html.theme-dark .defaultsButtonText-1ycd-VvR{color:#b2b5be}.defaultsButtonItem-3rYXMHYc{min-width:100px}.defaultsButtonIcon-1L3YZ47K{display:flex} \ No newline at end of file diff --git a/public/charting_library/bundles/58.ac20449ddbb7f37874cc.js b/public/charting_library/bundles/58.ac20449ddbb7f37874cc.js new file mode 100644 index 00000000..e5d51fba --- /dev/null +++ b/public/charting_library/bundles/58.ac20449ddbb7f37874cc.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[58],[]]); \ No newline at end of file diff --git a/public/charting_library/bundles/59.3c85911ad1fb5ec78b74.css b/public/charting_library/bundles/59.3c85911ad1fb5ec78b74.css new file mode 100644 index 00000000..6433ea6c --- /dev/null +++ b/public/charting_library/bundles/59.3c85911ad1fb5ec78b74.css @@ -0,0 +1 @@ +.switcherWrapper-1wFH-_jm{--tv-switcher-wrapper-width:38px;--tv-switcher-wrapper-height:20px;--tv-switcher-wrapper-radius:10px;--tv-switcher-thumb-size:14px;--tv-switcher-thumb-padding:3px;display:inline-block;position:relative;z-index:0;flex:0 0 auto;width:var(--tv-switcher-wrapper-width);height:var(--tv-switcher-wrapper-height);vertical-align:middle;-webkit-tap-highlight-color:transparent}.switcherWrapper-1wFH-_jm.size-large-MOSirnj_{--tv-switcher-wrapper-height:34px;--tv-switcher-wrapper-width:64px;--tv-switcher-thumb-size:28px;--tv-switcher-wrapper-radius:28px}.switcherWrapper-1wFH-_jm.intent-select-2kut8F29 .switcherThumbWrapper-2u191lDO:before{content:none}.switcherWrapper-1wFH-_jm.intent-select-2kut8F29 .input-J7QIcTTo:checked+.switcherThumbWrapper-2u191lDO .switcherTrack-2XruDVTa{border-color:#00bfa5;background-color:#00bfa5}html.theme-dark .switcherWrapper-1wFH-_jm.intent-select-2kut8F29 .input-J7QIcTTo:checked+.switcherThumbWrapper-2u191lDO .switcherTrack-2XruDVTa{background-color:#00897b;border-color:#00897b}.switcherWrapper-1wFH-_jm.intent-select-2kut8F29 .switcherTrack-2XruDVTa{border-color:#42a5f5;background-color:#42a5f5}html.theme-dark .switcherWrapper-1wFH-_jm.intent-select-2kut8F29 .switcherTrack-2XruDVTa{background-color:#1e88e5;border-color:#1e88e5}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.switcherWrapper-1wFH-_jm.intent-select-2kut8F29:hover .input-J7QIcTTo:checked+.switcherThumbWrapper-2u191lDO .switcherTrack-2XruDVTa{border-color:#4db6ac;background-color:#4db6ac}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .switcherWrapper-1wFH-_jm.intent-select-2kut8F29:hover .input-J7QIcTTo:checked+.switcherThumbWrapper-2u191lDO .switcherTrack-2XruDVTa{background-color:#00796b;border-color:#00796b}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.switcherWrapper-1wFH-_jm.intent-select-2kut8F29:hover .switcherTrack-2XruDVTa{border-color:#2196f3;background-color:#2196f3}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .switcherWrapper-1wFH-_jm.intent-select-2kut8F29:hover .switcherTrack-2XruDVTa{background-color:#1976d2;border-color:#1976d2}}.input-J7QIcTTo{position:absolute;z-index:1;top:0;left:0;width:100%;height:100%;opacity:0}.input-J7QIcTTo:checked,.input-J7QIcTTo:disabled,.input-J7QIcTTo:focus{border:0;outline:0}.input-J7QIcTTo:checked+.switcherThumbWrapper-2u191lDO .switcherTrack-2XruDVTa{border-color:#2196f3;background-color:#2196f3}html.theme-dark .input-J7QIcTTo:checked+.switcherThumbWrapper-2u191lDO .switcherTrack-2XruDVTa{background-color:#1976d2;border-color:#1976d2}.input-J7QIcTTo:checked+.switcherThumbWrapper-2u191lDO .switcherThumb-2yuEucci{transform:translate(calc(var(--tv-switcher-wrapper-width) - var(--tv-switcher-thumb-size) - var(--tv-switcher-thumb-padding)),var(--tv-switcher-thumb-padding))}.input-J7QIcTTo:disabled+.switcherThumbWrapper-2u191lDO .switcherTrack-2XruDVTa{border-color:#d6d8e0;background-color:#fff}html.theme-dark .input-J7QIcTTo:disabled+.switcherThumbWrapper-2u191lDO .switcherTrack-2XruDVTa{background-color:#131722;border-color:#4c525e}.input-J7QIcTTo:disabled+.switcherThumbWrapper-2u191lDO .switcherThumb-2yuEucci{background-color:#d6d8e0}html.theme-dark .input-J7QIcTTo:disabled+.switcherThumbWrapper-2u191lDO .switcherThumb-2yuEucci{background-color:#4c525e}.input-J7QIcTTo.focus-uZMRkCO0:focus+.switcherThumbWrapper-2u191lDO:before{opacity:.2}.switcherThumbWrapper-2u191lDO{position:relative;z-index:0;width:100%;height:100%}.switcherThumbWrapper-2u191lDO:before{content:"";position:absolute;top:-4px;left:-4px;width:calc(100% + 8px);height:calc(100% + 8px);border-radius:calc(var(--tv-switcher-wrapper-radius) + 8px);background-color:#37a6ef;transition-duration:.6s;transition-property:opacity;transition-timing-function:ease-out;opacity:0}html.theme-dark .switcherThumbWrapper-2u191lDO:before{background-color:#2e7bb2}.switcherTrack-2XruDVTa{position:absolute;left:0;top:0;width:calc(100% - 2px);height:calc(100% - 2px);border-radius:var(--tv-switcher-wrapper-radius);border:1px solid #d6d8e0;background:#d6d8e0}html.theme-dark .switcherTrack-2XruDVTa{background:#363c4e;border-color:#363c4e}.switcherThumb-2yuEucci{width:var(--tv-switcher-thumb-size);height:var(--tv-switcher-thumb-size);border-radius:var(--tv-switcher-thumb-size);transform:translate(var(--tv-switcher-thumb-padding),var(--tv-switcher-thumb-padding));transition-duration:.25s;transition-property:transform;transition-timing-function:ease-out;background:#fff}html.theme-dark .switcherThumb-2yuEucci{background:#fff}.wrapper-3Sj-FzgR{display:flex;flex-direction:row;justify-content:space-between;align-content:flex-start;align-items:flex-start;white-space:nowrap;padding:6px 10px 2px 12px;background-color:#fff;color:#131722}html.theme-dark .wrapper-3Sj-FzgR{color:#b2b5be;background-color:#1e222d}.wrapper-3Sj-FzgR.hovered-1G0yygIe,.wrapper-3Sj-FzgR:active{color:#000}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.wrapper-3Sj-FzgR:hover{color:#000}}html.theme-dark .wrapper-3Sj-FzgR.hovered-1G0yygIe,html.theme-dark .wrapper-3Sj-FzgR:active{color:#c1c4cd}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .wrapper-3Sj-FzgR:hover{color:#c1c4cd}}.wrapper-3Sj-FzgR.hovered-1G0yygIe,.wrapper-3Sj-FzgR:active{background-color:#f0f3fa}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.wrapper-3Sj-FzgR:hover{background-color:#f0f3fa}}html.theme-dark .wrapper-3Sj-FzgR.hovered-1G0yygIe,html.theme-dark .wrapper-3Sj-FzgR:active{background-color:#2a2e39}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .wrapper-3Sj-FzgR:hover{background-color:#2a2e39}}.wrapper-3Sj-FzgR:before{content:"";display:block;height:20px}.labelRow-3h7cSJ_L{flex:1 1 auto;padding:2px 0 6px;min-width:0}.label-3iLxp29M{font-size:14px;margin-right:12px;overflow:hidden}.labelHint-3qxeiVfa{max-height:0;margin-top:0;font-size:12px;font-weight:400;color:#787b86;overflow:hidden;opacity:0;contain:content;white-space:normal;transition:max-height .25s ease-in,margin-top .25s ease-in,opacity .35s linear}.labelOn-10QGwv2n+.labelHint-3qxeiVfa{margin-top:4px;transition:max-height .2s ease-out,margin-top .2s ease-out,opacity .35s linear;max-height:34px;opacity:1} \ No newline at end of file diff --git a/public/charting_library/bundles/59.3c85911ad1fb5ec78b74.rtl.css b/public/charting_library/bundles/59.3c85911ad1fb5ec78b74.rtl.css new file mode 100644 index 00000000..583636b0 --- /dev/null +++ b/public/charting_library/bundles/59.3c85911ad1fb5ec78b74.rtl.css @@ -0,0 +1 @@ +.switcherWrapper-1wFH-_jm{--tv-switcher-wrapper-width:38px;--tv-switcher-wrapper-height:20px;--tv-switcher-wrapper-radius:10px;--tv-switcher-thumb-size:14px;--tv-switcher-thumb-padding:3px;display:inline-block;position:relative;z-index:0;flex:0 0 auto;width:var(--tv-switcher-wrapper-width);height:var(--tv-switcher-wrapper-height);vertical-align:middle;-webkit-tap-highlight-color:transparent}.switcherWrapper-1wFH-_jm.size-large-MOSirnj_{--tv-switcher-wrapper-height:34px;--tv-switcher-wrapper-width:64px;--tv-switcher-thumb-size:28px;--tv-switcher-wrapper-radius:28px}.switcherWrapper-1wFH-_jm.intent-select-2kut8F29 .switcherThumbWrapper-2u191lDO:before{content:none}.switcherWrapper-1wFH-_jm.intent-select-2kut8F29 .input-J7QIcTTo:checked+.switcherThumbWrapper-2u191lDO .switcherTrack-2XruDVTa{border-color:#00bfa5;background-color:#00bfa5}html.theme-dark .switcherWrapper-1wFH-_jm.intent-select-2kut8F29 .input-J7QIcTTo:checked+.switcherThumbWrapper-2u191lDO .switcherTrack-2XruDVTa{background-color:#00897b;border-color:#00897b}.switcherWrapper-1wFH-_jm.intent-select-2kut8F29 .switcherTrack-2XruDVTa{border-color:#42a5f5;background-color:#42a5f5}html.theme-dark .switcherWrapper-1wFH-_jm.intent-select-2kut8F29 .switcherTrack-2XruDVTa{background-color:#1e88e5;border-color:#1e88e5}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.switcherWrapper-1wFH-_jm.intent-select-2kut8F29:hover .input-J7QIcTTo:checked+.switcherThumbWrapper-2u191lDO .switcherTrack-2XruDVTa{border-color:#4db6ac;background-color:#4db6ac}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .switcherWrapper-1wFH-_jm.intent-select-2kut8F29:hover .input-J7QIcTTo:checked+.switcherThumbWrapper-2u191lDO .switcherTrack-2XruDVTa{background-color:#00796b;border-color:#00796b}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.switcherWrapper-1wFH-_jm.intent-select-2kut8F29:hover .switcherTrack-2XruDVTa{border-color:#2196f3;background-color:#2196f3}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .switcherWrapper-1wFH-_jm.intent-select-2kut8F29:hover .switcherTrack-2XruDVTa{background-color:#1976d2;border-color:#1976d2}}.input-J7QIcTTo{position:absolute;z-index:1;top:0;right:0;width:100%;height:100%;opacity:0}.input-J7QIcTTo:checked,.input-J7QIcTTo:disabled,.input-J7QIcTTo:focus{border:0;outline:0}.input-J7QIcTTo:checked+.switcherThumbWrapper-2u191lDO .switcherTrack-2XruDVTa{border-color:#2196f3;background-color:#2196f3}html.theme-dark .input-J7QIcTTo:checked+.switcherThumbWrapper-2u191lDO .switcherTrack-2XruDVTa{background-color:#1976d2;border-color:#1976d2}.input-J7QIcTTo:checked+.switcherThumbWrapper-2u191lDO .switcherThumb-2yuEucci{transform:translate(calc(-1*(var(--tv-switcher-wrapper-width) - var(--tv-switcher-thumb-size) - var(--tv-switcher-thumb-padding))),var(--tv-switcher-thumb-padding))}.input-J7QIcTTo:disabled+.switcherThumbWrapper-2u191lDO .switcherTrack-2XruDVTa{border-color:#d6d8e0;background-color:#fff}html.theme-dark .input-J7QIcTTo:disabled+.switcherThumbWrapper-2u191lDO .switcherTrack-2XruDVTa{background-color:#131722;border-color:#4c525e}.input-J7QIcTTo:disabled+.switcherThumbWrapper-2u191lDO .switcherThumb-2yuEucci{background-color:#d6d8e0}html.theme-dark .input-J7QIcTTo:disabled+.switcherThumbWrapper-2u191lDO .switcherThumb-2yuEucci{background-color:#4c525e}.input-J7QIcTTo.focus-uZMRkCO0:focus+.switcherThumbWrapper-2u191lDO:before{opacity:.2}.switcherThumbWrapper-2u191lDO{position:relative;z-index:0;width:100%;height:100%}.switcherThumbWrapper-2u191lDO:before{content:"";position:absolute;top:-4px;right:-4px;width:calc(100% + 8px);height:calc(100% + 8px);border-radius:calc(var(--tv-switcher-wrapper-radius) + 8px);background-color:#37a6ef;transition-duration:.6s;transition-property:opacity;transition-timing-function:ease-out;opacity:0}html.theme-dark .switcherThumbWrapper-2u191lDO:before{background-color:#2e7bb2}.switcherTrack-2XruDVTa{position:absolute;right:0;top:0;width:calc(100% - 2px);height:calc(100% - 2px);border-radius:var(--tv-switcher-wrapper-radius);border:1px solid #d6d8e0;background:#d6d8e0}html.theme-dark .switcherTrack-2XruDVTa{background:#363c4e;border-color:#363c4e}.switcherThumb-2yuEucci{width:var(--tv-switcher-thumb-size);height:var(--tv-switcher-thumb-size);border-radius:var(--tv-switcher-thumb-size);transform:translate(var(--tv-switcher-thumb-padding),var(--tv-switcher-thumb-padding));transform:translate(calc(-1*(var(--tv-switcher-thumb-padding))),var(--tv-switcher-thumb-padding));transition-duration:.25s;transition-property:transform;transition-timing-function:ease-out;background:#fff}html.theme-dark .switcherThumb-2yuEucci{background:#fff}.wrapper-3Sj-FzgR{display:flex;flex-direction:row;justify-content:space-between;align-content:flex-start;align-items:flex-start;white-space:nowrap;padding:6px 12px 2px 10px;background-color:#fff;color:#131722}html.theme-dark .wrapper-3Sj-FzgR{color:#b2b5be;background-color:#1e222d}.wrapper-3Sj-FzgR.hovered-1G0yygIe,.wrapper-3Sj-FzgR:active{color:#000}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.wrapper-3Sj-FzgR:hover{color:#000}}html.theme-dark .wrapper-3Sj-FzgR.hovered-1G0yygIe,html.theme-dark .wrapper-3Sj-FzgR:active{color:#c1c4cd}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .wrapper-3Sj-FzgR:hover{color:#c1c4cd}}.wrapper-3Sj-FzgR.hovered-1G0yygIe,.wrapper-3Sj-FzgR:active{background-color:#f0f3fa}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.wrapper-3Sj-FzgR:hover{background-color:#f0f3fa}}html.theme-dark .wrapper-3Sj-FzgR.hovered-1G0yygIe,html.theme-dark .wrapper-3Sj-FzgR:active{background-color:#2a2e39}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .wrapper-3Sj-FzgR:hover{background-color:#2a2e39}}.wrapper-3Sj-FzgR:before{content:"";display:block;height:20px}.labelRow-3h7cSJ_L{flex:1 1 auto;padding:2px 0 6px;min-width:0}.label-3iLxp29M{font-size:14px;margin-left:12px;overflow:hidden}.labelHint-3qxeiVfa{max-height:0;margin-top:0;font-size:12px;font-weight:400;color:#787b86;overflow:hidden;opacity:0;contain:content;white-space:normal;transition:max-height .25s ease-in,margin-top .25s ease-in,opacity .35s linear}.labelOn-10QGwv2n+.labelHint-3qxeiVfa{margin-top:4px;transition:max-height .2s ease-out,margin-top .2s ease-out,opacity .35s linear;max-height:34px;opacity:1} \ No newline at end of file diff --git a/public/charting_library/bundles/59.a19f5e1e13430596a3a9.js b/public/charting_library/bundles/59.a19f5e1e13430596a3a9.js new file mode 100644 index 00000000..e488fa9e --- /dev/null +++ b/public/charting_library/bundles/59.a19f5e1e13430596a3a9.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[59],[]]); \ No newline at end of file diff --git a/public/charting_library/bundles/6.f4dd5808ba4d6d1a8617.css b/public/charting_library/bundles/6.f4dd5808ba4d6d1a8617.css new file mode 100644 index 00000000..8a1c802d --- /dev/null +++ b/public/charting_library/bundles/6.f4dd5808ba4d6d1a8617.css @@ -0,0 +1 @@ +.dialog-34XTwGTT{position:fixed;min-width:280px;width:100%;max-width:380px}.dialog-34XTwGTT [data-dragg-area=true]{cursor:grab}.dialog-34XTwGTT [data-dragg-area=true].dragging-33JfMDO6{cursor:grabbing}.dialogAnimatedAppearance-ByFJP_o1{transform-origin:0 0;animation-name:dialogAnimation-3u2LnCGZ;animation-duration:.3s}@keyframes dialogAnimation-3u2LnCGZ{0%{transform:translate(var(--animationTranslateStartX),var(--animationTranslateStartY)) scale(0);opacity:0}to{transform:translate(var(--animationTranslateEndX),var(--animationTranslateEndY)) scale(1);opacity:1}}.dialogTooltip-C1Jm8akl{position:absolute;left:50%;top:-20px;transform:translateX(-50%);width:-webkit-max-content;width:-moz-max-content;width:max-content;max-width:540px;font-size:14px;line-height:21px;color:#fff}@media screen and (max-width:768px){.dialogTooltip-C1Jm8akl{max-width:240px}} \ No newline at end of file diff --git a/public/charting_library/bundles/6.f4dd5808ba4d6d1a8617.rtl.css b/public/charting_library/bundles/6.f4dd5808ba4d6d1a8617.rtl.css new file mode 100644 index 00000000..b4f45b21 --- /dev/null +++ b/public/charting_library/bundles/6.f4dd5808ba4d6d1a8617.rtl.css @@ -0,0 +1 @@ +.dialog-34XTwGTT{position:fixed;min-width:280px;width:100%;max-width:380px}.dialog-34XTwGTT [data-dragg-area=true]{cursor:grab}.dialog-34XTwGTT [data-dragg-area=true].dragging-33JfMDO6{cursor:grabbing}.dialogAnimatedAppearance-ByFJP_o1{transform-origin:100% 0;animation-name:dialogAnimation-3u2LnCGZ;animation-duration:.3s}@keyframes dialogAnimation-3u2LnCGZ{0%{transform:translate(var(--animationTranslateStartX),var(--animationTranslateStartY)) scale(0);opacity:0}to{transform:translate(var(--animationTranslateEndX),var(--animationTranslateEndY)) scale(1);opacity:1}}.dialogTooltip-C1Jm8akl{position:absolute;right:50%;top:-20px;transform:translateX(50%);width:-webkit-max-content;width:-moz-max-content;width:max-content;max-width:540px;font-size:14px;line-height:21px;color:#fff}@media screen and (max-width:768px){.dialogTooltip-C1Jm8akl{max-width:240px}} \ No newline at end of file diff --git a/public/charting_library/bundles/6.fcc6fec60acc5d922a67.js b/public/charting_library/bundles/6.fcc6fec60acc5d922a67.js new file mode 100644 index 00000000..7cf99758 --- /dev/null +++ b/public/charting_library/bundles/6.fcc6fec60acc5d922a67.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[6],[]]); \ No newline at end of file diff --git a/public/charting_library/bundles/60.0b2b2d99a039b120fb25.css b/public/charting_library/bundles/60.0b2b2d99a039b120fb25.css new file mode 100644 index 00000000..6a076958 --- /dev/null +++ b/public/charting_library/bundles/60.0b2b2d99a039b120fb25.css @@ -0,0 +1 @@ +.item-stVdeCwG{vertical-align:middle;white-space:nowrap;height:32px}.item-stVdeCwG.interactive-3E0jwVyG{color:#131722}html.theme-dark .item-stVdeCwG.interactive-3E0jwVyG{color:#b2b5be}.item-stVdeCwG.interactive-3E0jwVyG.hovered-2HCCgw6c,.item-stVdeCwG.interactive-3E0jwVyG:active{color:#000}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.item-stVdeCwG.interactive-3E0jwVyG:hover{color:#000}}html.theme-dark .item-stVdeCwG.interactive-3E0jwVyG.hovered-2HCCgw6c,html.theme-dark .item-stVdeCwG.interactive-3E0jwVyG:active{color:#c1c4cd}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .item-stVdeCwG.interactive-3E0jwVyG:hover{color:#c1c4cd}}.item-stVdeCwG.interactive-3E0jwVyG.hovered-2HCCgw6c,.item-stVdeCwG.interactive-3E0jwVyG:active{background-color:#f0f3fa}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.item-stVdeCwG.interactive-3E0jwVyG:hover{background-color:#f0f3fa}}html.theme-dark .item-stVdeCwG.interactive-3E0jwVyG.hovered-2HCCgw6c,html.theme-dark .item-stVdeCwG.interactive-3E0jwVyG:active{background-color:#2a2e39}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .item-stVdeCwG.interactive-3E0jwVyG:hover{background-color:#2a2e39}}.item-stVdeCwG.disabled-2K7FyUI3{opacity:.3;cursor:default}.item-stVdeCwG.disabled-2K7FyUI3,.item-stVdeCwG.disabled-2K7FyUI3:active{color:#131722;background-color:#fff}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.item-stVdeCwG.disabled-2K7FyUI3:hover{color:#131722;background-color:#fff}}html.theme-dark .item-stVdeCwG.disabled-2K7FyUI3,html.theme-dark .item-stVdeCwG.disabled-2K7FyUI3:active{background-color:#1e222d}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .item-stVdeCwG.disabled-2K7FyUI3:hover{background-color:#1e222d}}html.theme-dark .item-stVdeCwG.disabled-2K7FyUI3,html.theme-dark .item-stVdeCwG.disabled-2K7FyUI3:active{color:#b2b5be}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .item-stVdeCwG.disabled-2K7FyUI3:hover{color:#b2b5be}}.item-stVdeCwG.active-muW4lycL,.item-stVdeCwG.active-muW4lycL:active{color:#fff;background-color:#2196f3}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.item-stVdeCwG.active-muW4lycL:hover{color:#fff;background-color:#2196f3}}html.theme-dark .item-stVdeCwG.active-muW4lycL,html.theme-dark .item-stVdeCwG.active-muW4lycL:active{background-color:#1976d2}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .item-stVdeCwG.active-muW4lycL:hover{background-color:#1976d2}}html.theme-dark .item-stVdeCwG.active-muW4lycL,html.theme-dark .item-stVdeCwG.active-muW4lycL:active{color:#d1d4dc}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .item-stVdeCwG.active-muW4lycL:hover{color:#d1d4dc}}.item-stVdeCwG.active-muW4lycL .shortcut-2P38AivB,.item-stVdeCwG.active-muW4lycL:active .shortcut-2P38AivB{color:hsla(225,8%,72%,.7)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.item-stVdeCwG.active-muW4lycL:hover .shortcut-2P38AivB{color:hsla(225,8%,72%,.7)}}html.theme-dark .item-stVdeCwG.active-muW4lycL .shortcut-2P38AivB,html.theme-dark .item-stVdeCwG.active-muW4lycL:active .shortcut-2P38AivB{color:hsla(227,6%,50%,.7)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .item-stVdeCwG.active-muW4lycL:hover .shortcut-2P38AivB{color:hsla(227,6%,50%,.7)}}.iconCell-OhwVvlgA{min-width:6px}.icon-3DDcYD-t{display:flex;align-items:center;justify-content:center;padding-left:8px;width:28px}.icon-3DDcYD-t svg{width:28px;height:28px}.icon-3DDcYD-t.checkmark-2UE1siCn svg{width:18px;height:14px;fill:currentColor}.content-1GXgstZ5{display:flex;align-items:center;padding-left:6px;padding-right:20px;max-width:365px}.label-1If3beUH{flex:1 1 auto;text-align:left;font-size:14px;overflow-x:hidden}.toolbox-2XX2mSNw{flex:0 1 auto;margin-left:10px;line-height:14px}.feature-no-mobiletouch .toolbox-2XX2mSNw.showToolboxOnHover-iCrUIcOG{opacity:0}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.feature-no-mobiletouch .item-stVdeCwG:hover .toolbox-2XX2mSNw.showToolboxOnHover-iCrUIcOG{opacity:1}}.arrowIcon-2FMesq_x{flex:0 1 auto;margin-left:10px}.arrowIcon-2FMesq_x svg{height:10px;fill:currentColor}.shortcut-2P38AivB{flex:0 1 auto;margin-left:10px;color:#9598a1;font-size:12px;padding-top:2px}html.theme-dark .shortcut-2P38AivB{color:#5d606b}.subMenu-QM4GIDtY{height:0}.item-3uG--HK9{display:flex;position:relative;align-items:flex-start;justify-content:flex-start;box-sizing:border-box;min-height:40px;padding:8px 8px 8px 42px}.item-3uG--HK9.emptyIcons-m0h_sZp0{padding-left:20px}.item-3uG--HK9.loading-cNheEKQv{position:relative;justify-content:center}.item-3uG--HK9.disabled-3ilLPdQ4{opacity:.3;cursor:default}.item-3uG--HK9.disabled-3ilLPdQ4,.item-3uG--HK9.disabled-3ilLPdQ4:active{color:#131722;background-color:#fff}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.item-3uG--HK9.disabled-3ilLPdQ4:hover{color:#131722;background-color:#fff}}html.theme-dark .item-3uG--HK9.disabled-3ilLPdQ4,html.theme-dark .item-3uG--HK9.disabled-3ilLPdQ4:active{background-color:#1e222d}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .item-3uG--HK9.disabled-3ilLPdQ4:hover{background-color:#1e222d}}html.theme-dark .item-3uG--HK9.disabled-3ilLPdQ4,html.theme-dark .item-3uG--HK9.disabled-3ilLPdQ4:active{color:#b2b5be}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .item-3uG--HK9.disabled-3ilLPdQ4:hover{color:#b2b5be}}.item-3uG--HK9.interactive-2W_Hkhdy{color:#131722}html.theme-dark .item-3uG--HK9.interactive-2W_Hkhdy{color:#b2b5be}.item-3uG--HK9.interactive-2W_Hkhdy.hovered-D1oc5kww,.item-3uG--HK9.interactive-2W_Hkhdy:active{color:#000}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.item-3uG--HK9.interactive-2W_Hkhdy:hover{color:#000}}html.theme-dark .item-3uG--HK9.interactive-2W_Hkhdy.hovered-D1oc5kww,html.theme-dark .item-3uG--HK9.interactive-2W_Hkhdy:active{color:#c1c4cd}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .item-3uG--HK9.interactive-2W_Hkhdy:hover{color:#c1c4cd}}.item-3uG--HK9.interactive-2W_Hkhdy.hovered-D1oc5kww,.item-3uG--HK9.interactive-2W_Hkhdy:active{background-color:#f0f3fa}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.item-3uG--HK9.interactive-2W_Hkhdy:hover{background-color:#f0f3fa}}html.theme-dark .item-3uG--HK9.interactive-2W_Hkhdy.hovered-D1oc5kww,html.theme-dark .item-3uG--HK9.interactive-2W_Hkhdy:active{background-color:#2a2e39}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .item-3uG--HK9.interactive-2W_Hkhdy:hover{background-color:#2a2e39}}.icon-1Mb1FjSX{display:flex;position:absolute;top:6px;left:8px;align-items:center;justify-content:center;width:28px;height:28px;color:#131722}html.theme-dark .icon-1Mb1FjSX{color:#b2b5be}.label-3O4C0UM-{margin-right:8px;font-size:16px;line-height:24px;color:#131722;word-break:break-word}html.theme-dark .label-3O4C0UM-{color:#b2b5be}.label-3O4C0UM-.fullWidth-1uGfIWwz{width:100%}.title-22oXfKpQ{font-weight:700}.nested-1ZM4Mhrc{display:flex;align-items:center;justify-content:center;align-self:center;width:18px;height:18px;margin-left:auto}.shortcut-3ZjqDeQg{margin-left:auto;margin-right:8px;line-height:24px;padding:0}.remove-3gWfSy1e{display:flex;margin-left:auto;margin-right:8px;height:24px;align-items:center;color:#131722}html.theme-dark .remove-3gWfSy1e{color:#b2b5be} \ No newline at end of file diff --git a/public/charting_library/bundles/60.0b2b2d99a039b120fb25.rtl.css b/public/charting_library/bundles/60.0b2b2d99a039b120fb25.rtl.css new file mode 100644 index 00000000..1012147c --- /dev/null +++ b/public/charting_library/bundles/60.0b2b2d99a039b120fb25.rtl.css @@ -0,0 +1 @@ +.item-stVdeCwG{vertical-align:middle;white-space:nowrap;height:32px}.item-stVdeCwG.interactive-3E0jwVyG{color:#131722}html.theme-dark .item-stVdeCwG.interactive-3E0jwVyG{color:#b2b5be}.item-stVdeCwG.interactive-3E0jwVyG.hovered-2HCCgw6c,.item-stVdeCwG.interactive-3E0jwVyG:active{color:#000}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.item-stVdeCwG.interactive-3E0jwVyG:hover{color:#000}}html.theme-dark .item-stVdeCwG.interactive-3E0jwVyG.hovered-2HCCgw6c,html.theme-dark .item-stVdeCwG.interactive-3E0jwVyG:active{color:#c1c4cd}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .item-stVdeCwG.interactive-3E0jwVyG:hover{color:#c1c4cd}}.item-stVdeCwG.interactive-3E0jwVyG.hovered-2HCCgw6c,.item-stVdeCwG.interactive-3E0jwVyG:active{background-color:#f0f3fa}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.item-stVdeCwG.interactive-3E0jwVyG:hover{background-color:#f0f3fa}}html.theme-dark .item-stVdeCwG.interactive-3E0jwVyG.hovered-2HCCgw6c,html.theme-dark .item-stVdeCwG.interactive-3E0jwVyG:active{background-color:#2a2e39}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .item-stVdeCwG.interactive-3E0jwVyG:hover{background-color:#2a2e39}}.item-stVdeCwG.disabled-2K7FyUI3{opacity:.3;cursor:default}.item-stVdeCwG.disabled-2K7FyUI3,.item-stVdeCwG.disabled-2K7FyUI3:active{color:#131722;background-color:#fff}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.item-stVdeCwG.disabled-2K7FyUI3:hover{color:#131722;background-color:#fff}}html.theme-dark .item-stVdeCwG.disabled-2K7FyUI3,html.theme-dark .item-stVdeCwG.disabled-2K7FyUI3:active{background-color:#1e222d}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .item-stVdeCwG.disabled-2K7FyUI3:hover{background-color:#1e222d}}html.theme-dark .item-stVdeCwG.disabled-2K7FyUI3,html.theme-dark .item-stVdeCwG.disabled-2K7FyUI3:active{color:#b2b5be}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .item-stVdeCwG.disabled-2K7FyUI3:hover{color:#b2b5be}}.item-stVdeCwG.active-muW4lycL,.item-stVdeCwG.active-muW4lycL:active{color:#fff;background-color:#2196f3}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.item-stVdeCwG.active-muW4lycL:hover{color:#fff;background-color:#2196f3}}html.theme-dark .item-stVdeCwG.active-muW4lycL,html.theme-dark .item-stVdeCwG.active-muW4lycL:active{background-color:#1976d2}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .item-stVdeCwG.active-muW4lycL:hover{background-color:#1976d2}}html.theme-dark .item-stVdeCwG.active-muW4lycL,html.theme-dark .item-stVdeCwG.active-muW4lycL:active{color:#d1d4dc}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .item-stVdeCwG.active-muW4lycL:hover{color:#d1d4dc}}.item-stVdeCwG.active-muW4lycL .shortcut-2P38AivB,.item-stVdeCwG.active-muW4lycL:active .shortcut-2P38AivB{color:hsla(225,8%,72%,.7)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.item-stVdeCwG.active-muW4lycL:hover .shortcut-2P38AivB{color:hsla(225,8%,72%,.7)}}html.theme-dark .item-stVdeCwG.active-muW4lycL .shortcut-2P38AivB,html.theme-dark .item-stVdeCwG.active-muW4lycL:active .shortcut-2P38AivB{color:hsla(227,6%,50%,.7)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .item-stVdeCwG.active-muW4lycL:hover .shortcut-2P38AivB{color:hsla(227,6%,50%,.7)}}.iconCell-OhwVvlgA{min-width:6px}.icon-3DDcYD-t{display:flex;align-items:center;justify-content:center;padding-right:8px;width:28px}.icon-3DDcYD-t svg{width:28px;height:28px}.icon-3DDcYD-t.checkmark-2UE1siCn svg{width:18px;height:14px;fill:currentColor}.content-1GXgstZ5{display:flex;align-items:center;padding-right:6px;padding-left:20px;max-width:365px}.label-1If3beUH{flex:1 1 auto;text-align:right;font-size:14px;overflow-x:hidden}.toolbox-2XX2mSNw{flex:0 1 auto;margin-right:10px;line-height:14px}.feature-no-mobiletouch .toolbox-2XX2mSNw.showToolboxOnHover-iCrUIcOG{opacity:0}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.feature-no-mobiletouch .item-stVdeCwG:hover .toolbox-2XX2mSNw.showToolboxOnHover-iCrUIcOG{opacity:1}}.arrowIcon-2FMesq_x{flex:0 1 auto;margin-right:10px}.arrowIcon-2FMesq_x svg{transform:scaleX(-1);height:10px;fill:currentColor}.shortcut-2P38AivB{flex:0 1 auto;margin-right:10px;color:#9598a1;font-size:12px;padding-top:2px}html.theme-dark .shortcut-2P38AivB{color:#5d606b}.subMenu-QM4GIDtY{height:0}.item-3uG--HK9{display:flex;position:relative;align-items:flex-start;justify-content:flex-start;box-sizing:border-box;min-height:40px;padding:8px 42px 8px 8px}.item-3uG--HK9.emptyIcons-m0h_sZp0{padding-right:20px}.item-3uG--HK9.loading-cNheEKQv{position:relative;justify-content:center}.item-3uG--HK9.disabled-3ilLPdQ4{opacity:.3;cursor:default}.item-3uG--HK9.disabled-3ilLPdQ4,.item-3uG--HK9.disabled-3ilLPdQ4:active{color:#131722;background-color:#fff}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.item-3uG--HK9.disabled-3ilLPdQ4:hover{color:#131722;background-color:#fff}}html.theme-dark .item-3uG--HK9.disabled-3ilLPdQ4,html.theme-dark .item-3uG--HK9.disabled-3ilLPdQ4:active{background-color:#1e222d}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .item-3uG--HK9.disabled-3ilLPdQ4:hover{background-color:#1e222d}}html.theme-dark .item-3uG--HK9.disabled-3ilLPdQ4,html.theme-dark .item-3uG--HK9.disabled-3ilLPdQ4:active{color:#b2b5be}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .item-3uG--HK9.disabled-3ilLPdQ4:hover{color:#b2b5be}}.item-3uG--HK9.interactive-2W_Hkhdy{color:#131722}html.theme-dark .item-3uG--HK9.interactive-2W_Hkhdy{color:#b2b5be}.item-3uG--HK9.interactive-2W_Hkhdy.hovered-D1oc5kww,.item-3uG--HK9.interactive-2W_Hkhdy:active{color:#000}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.item-3uG--HK9.interactive-2W_Hkhdy:hover{color:#000}}html.theme-dark .item-3uG--HK9.interactive-2W_Hkhdy.hovered-D1oc5kww,html.theme-dark .item-3uG--HK9.interactive-2W_Hkhdy:active{color:#c1c4cd}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .item-3uG--HK9.interactive-2W_Hkhdy:hover{color:#c1c4cd}}.item-3uG--HK9.interactive-2W_Hkhdy.hovered-D1oc5kww,.item-3uG--HK9.interactive-2W_Hkhdy:active{background-color:#f0f3fa}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.item-3uG--HK9.interactive-2W_Hkhdy:hover{background-color:#f0f3fa}}html.theme-dark .item-3uG--HK9.interactive-2W_Hkhdy.hovered-D1oc5kww,html.theme-dark .item-3uG--HK9.interactive-2W_Hkhdy:active{background-color:#2a2e39}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .item-3uG--HK9.interactive-2W_Hkhdy:hover{background-color:#2a2e39}}.icon-1Mb1FjSX{display:flex;position:absolute;top:6px;right:8px;align-items:center;justify-content:center;width:28px;height:28px;color:#131722}html.theme-dark .icon-1Mb1FjSX{color:#b2b5be}.label-3O4C0UM-{margin-left:8px;font-size:16px;line-height:24px;color:#131722;word-break:break-word}html.theme-dark .label-3O4C0UM-{color:#b2b5be}.label-3O4C0UM-.fullWidth-1uGfIWwz{width:100%}.title-22oXfKpQ{font-weight:700}.nested-1ZM4Mhrc,.title-22oXfKpQ .icon-1Mb1FjSX{transform:scaleX(-1)}.nested-1ZM4Mhrc{display:flex;align-items:center;justify-content:center;align-self:center;width:18px;height:18px;margin-right:auto}.shortcut-3ZjqDeQg{margin-right:auto;margin-left:8px;line-height:24px;padding:0}.remove-3gWfSy1e{display:flex;margin-right:auto;margin-left:8px;height:24px;align-items:center;color:#131722}html.theme-dark .remove-3gWfSy1e{color:#b2b5be} \ No newline at end of file diff --git a/public/charting_library/bundles/60.1ac249f4421296f40f75.js b/public/charting_library/bundles/60.1ac249f4421296f40f75.js new file mode 100644 index 00000000..21a9df64 --- /dev/null +++ b/public/charting_library/bundles/60.1ac249f4421296f40f75.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[60],[]]); \ No newline at end of file diff --git a/public/charting_library/bundles/61.366fecec1b24a0b335af.css b/public/charting_library/bundles/61.366fecec1b24a0b335af.css new file mode 100644 index 00000000..db16a9fb --- /dev/null +++ b/public/charting_library/bundles/61.366fecec1b24a0b335af.css @@ -0,0 +1 @@ +.ghost-3yO24wIn.primary-1rSzOFdX{color:#2196f3;border:1px solid #2196f3;background-color:transparent}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.ghost-3yO24wIn.primary-1rSzOFdX:hover{color:#fff;transition-duration:.06s}}.ghost-3yO24wIn.success-1qQ3_tEI{color:#3cbc98;border:1px solid #3cbc98;background-color:transparent}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.ghost-3yO24wIn.success-1qQ3_tEI:hover{color:#fff;transition-duration:.06s}}.ghost-3yO24wIn.danger-jKTO4wDd{color:#ff4a68;border:1px solid #ff4a68;background-color:transparent}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.ghost-3yO24wIn.danger-jKTO4wDd:hover{color:#fff;transition-duration:.06s}}.ghost-3yO24wIn.warning-2uDfz7Zc{color:#f89e30;border:1px solid #f89e30;background-color:transparent}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.ghost-3yO24wIn.warning-2uDfz7Zc:hover{color:#fff;transition-duration:.06s}}.ghost-3yO24wIn.secondary-3ll81brZ{color:#757575;border:1px solid #e9eff2;background-color:transparent}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.ghost-3yO24wIn.secondary-3ll81brZ:hover{color:#757575;transition-duration:.06s}}.button-2O-nMUcz{display:inline-flex;justify-content:center;align-items:center;padding:0;position:relative;min-width:35px;-webkit-user-select:none;user-select:none;text-align:center;white-space:nowrap;outline:0;cursor:pointer;overflow:hidden;box-sizing:border-box;line-height:32px;font-size:14px;transition:background-color .35s ease,border-color .35s ease,color .35s ease;border-radius:2px;border:1px solid transparent}.button-2O-nMUcz.withPadding-_5CJoO5q{padding:0 22px}.button-2O-nMUcz+.button-2O-nMUcz{margin-left:15px}.hiddenText-3qcN5Wif{visibility:hidden;flex:1 1 auto}.text-2KOWx3rB{position:absolute;left:0;right:0;bottom:0;top:0;text-align:center;display:inline-flex;justify-content:center;align-items:center;transition:opacity .175s ease,transform .175s ease}.loader-1CC-1F8J{display:inline-block;transition:opacity .35s ease;opacity:1}.base-2d4XFcnI{color:#757575;border-color:#adaeb0;background-color:transparent}html.theme-dark .base-2d4XFcnI{border-color:#4f5966;color:#758696}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.base-2d4XFcnI:hover{background-color:#f2f2f2;transition-duration:.06s}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .base-2d4XFcnI:hover{background-color:#1c2030}}.base-2d4XFcnI:active{background-color:#ececec;transition-duration:.06s}html.theme-dark .base-2d4XFcnI:active{background-color:#262b3e}.primary-1rSzOFdX{color:#fff;border-color:#2196f3;background-color:#2196f3}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.primary-1rSzOFdX:hover{background-color:#1e88e5;transition-duration:.06s}}.primary-1rSzOFdX:active{background-color:#049ddc;transition-duration:.06s}.success-1qQ3_tEI{color:#fff;border-color:#3cbc98;background-color:#3cbc98}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.success-1qQ3_tEI:hover{background-color:#38b395;transition-duration:.06s}}.success-1qQ3_tEI:active{background-color:#00a97f;transition-duration:.06s}.danger-jKTO4wDd{color:#fff;border-color:#ff4a68;background-color:#ff4a68}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.danger-jKTO4wDd:hover{background-color:#f24965;transition-duration:.06s}}.danger-jKTO4wDd:active{background-color:#ff173e;transition-duration:.06s}.warning-2uDfz7Zc{color:#fff;border-color:#f89e30;background-color:#f89e30}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.warning-2uDfz7Zc:hover{background-color:#f79217;transition-duration:.06s}}.warning-2uDfz7Zc:active{background-color:#d47807;transition-duration:.06s}.secondary-3ll81brZ{color:#757575;border-color:#eceff2;background-color:#eceff2}html.theme-dark .secondary-3ll81brZ{background-color:#363c4e;border-color:#363c4e;color:#c5cbce}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.secondary-3ll81brZ:hover{background-color:#dce6ea;transition-duration:.06s}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .secondary-3ll81brZ:hover{background-color:#4f5966}}.secondary-3ll81brZ:active{background-color:#cfdce3;transition-duration:.06s}html.theme-dark .secondary-3ll81brZ:active{background-color:#4f5966}.secondaryScript-2iIeFIWW{color:#fff;border-color:#9db2bd;background-color:#9db2bd}html.theme-dark .secondaryScript-2iIeFIWW{background-color:#363c4e;border-color:#363c4e}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.secondaryScript-2iIeFIWW:hover{background-color:#9db2bd;transition-duration:.06s}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .secondaryScript-2iIeFIWW:hover{background-color:#363c4e}}.secondaryScript-2iIeFIWW:active{background-color:#cfdce3;transition-duration:.06s}html.theme-dark .secondaryScript-2iIeFIWW:active{background-color:#363c4e}.link-2sR0CShp{color:#2196f3;transition:color .35s ease;background-color:transparent}html.theme-dark .link-2sR0CShp{color:#1976d2}.link-2sR0CShp:visited{color:#2196f3;fill:#2196f3}html.theme-dark .link-2sR0CShp:visited{fill:#1976d2;color:#1976d2}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.link-2sR0CShp:hover{color:#1e88e5;fill:#1e88e5;transition-duration:.06s}}.link-2sR0CShp:focus{outline:auto}.link-2sR0CShp:focus:not(:-moz-focusring){outline:none}.link-2sR0CShp:-moz-focusring{outline:auto}.link-2sR0CShp:active{color:#1e88e5;fill:#1e88e5;transition-duration:.06s}.xsmall-1aiWe3Hs{line-height:17px;border-radius:1px;font-size:11px;font-weight:400}.xsmall-1aiWe3Hs.withPadding-_5CJoO5q{padding:0 7px}.xsmall-1aiWe3Hs+.xsmall-1aiWe3Hs{margin-left:10px}.xsmall-1aiWe3Hs.rounded-3qEdyiAz{border-radius:10px}.small-2-nQtW8O{line-height:25px;font-size:13px}.small-2-nQtW8O.withPadding-_5CJoO5q{padding:0 12px}.small-2-nQtW8O+.small-2-nQtW8O{margin-left:10px}.small-2-nQtW8O.rounded-3qEdyiAz{border-radius:14px}.large-33HYhX8D{line-height:46px;font-size:17px;letter-spacing:1px}.large-33HYhX8D.withPadding-_5CJoO5q{padding:0 30px}.large-33HYhX8D.rounded-3qEdyiAz{border-radius:24px}.grouped-1WsMjajI:not(:first-child):not(:last-child){border-radius:0}.grouped-1WsMjajI+.grouped-1WsMjajI{margin-left:-1px}.grouped-1WsMjajI:first-child{margin-left:0}.grouped-1WsMjajI:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.grouped-1WsMjajI:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.growable-F6tv8R_j{flex:1}.growable-F6tv8R_j.withPadding-_5CJoO5q{padding:0}.active-2UxWxOgk:active{transform:translateY(1px)}.disabled-3u0ULovv{color:#adaeb0;border-color:#f1f3f6;background-color:#f1f3f6;cursor:default}html.theme-dark .disabled-3u0ULovv{background-color:#262b3e;border-color:#262b3e;color:#363c4e}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.disabled-3u0ULovv:hover{background-color:#f1f3f6;transition-duration:.06s}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .disabled-3u0ULovv:hover{background-color:#262b3e}}.disabled-3u0ULovv:active{background-color:#f1f3f6;transition-duration:.06s}html.theme-dark .disabled-3u0ULovv:active{background-color:#262b3e}.disabled-3u0ULovv:active{transform:none}.rounded-3qEdyiAz{border-radius:17px} \ No newline at end of file diff --git a/public/charting_library/bundles/61.366fecec1b24a0b335af.rtl.css b/public/charting_library/bundles/61.366fecec1b24a0b335af.rtl.css new file mode 100644 index 00000000..2b066d0d --- /dev/null +++ b/public/charting_library/bundles/61.366fecec1b24a0b335af.rtl.css @@ -0,0 +1 @@ +.ghost-3yO24wIn.primary-1rSzOFdX{color:#2196f3;border:1px solid #2196f3;background-color:transparent}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.ghost-3yO24wIn.primary-1rSzOFdX:hover{color:#fff;transition-duration:.06s}}.ghost-3yO24wIn.success-1qQ3_tEI{color:#3cbc98;border:1px solid #3cbc98;background-color:transparent}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.ghost-3yO24wIn.success-1qQ3_tEI:hover{color:#fff;transition-duration:.06s}}.ghost-3yO24wIn.danger-jKTO4wDd{color:#ff4a68;border:1px solid #ff4a68;background-color:transparent}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.ghost-3yO24wIn.danger-jKTO4wDd:hover{color:#fff;transition-duration:.06s}}.ghost-3yO24wIn.warning-2uDfz7Zc{color:#f89e30;border:1px solid #f89e30;background-color:transparent}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.ghost-3yO24wIn.warning-2uDfz7Zc:hover{color:#fff;transition-duration:.06s}}.ghost-3yO24wIn.secondary-3ll81brZ{color:#757575;border:1px solid #e9eff2;background-color:transparent}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.ghost-3yO24wIn.secondary-3ll81brZ:hover{color:#757575;transition-duration:.06s}}.button-2O-nMUcz{display:inline-flex;justify-content:center;align-items:center;padding:0;position:relative;min-width:35px;-webkit-user-select:none;user-select:none;text-align:center;white-space:nowrap;outline:0;cursor:pointer;overflow:hidden;box-sizing:border-box;line-height:32px;font-size:14px;transition:background-color .35s ease,border-color .35s ease,color .35s ease;border-radius:2px;border:1px solid transparent}.button-2O-nMUcz.withPadding-_5CJoO5q{padding:0 22px}.button-2O-nMUcz+.button-2O-nMUcz{margin-right:15px}.hiddenText-3qcN5Wif{visibility:hidden;flex:1 1 auto}.text-2KOWx3rB{position:absolute;right:0;left:0;bottom:0;top:0;text-align:center;display:inline-flex;justify-content:center;align-items:center;transition:opacity .175s ease,transform .175s ease}.loader-1CC-1F8J{display:inline-block;transition:opacity .35s ease;opacity:1}.base-2d4XFcnI{color:#757575;border-color:#adaeb0;background-color:transparent}html.theme-dark .base-2d4XFcnI{border-color:#4f5966;color:#758696}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.base-2d4XFcnI:hover{background-color:#f2f2f2;transition-duration:.06s}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .base-2d4XFcnI:hover{background-color:#1c2030}}.base-2d4XFcnI:active{background-color:#ececec;transition-duration:.06s}html.theme-dark .base-2d4XFcnI:active{background-color:#262b3e}.primary-1rSzOFdX{color:#fff;border-color:#2196f3;background-color:#2196f3}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.primary-1rSzOFdX:hover{background-color:#1e88e5;transition-duration:.06s}}.primary-1rSzOFdX:active{background-color:#049ddc;transition-duration:.06s}.success-1qQ3_tEI{color:#fff;border-color:#3cbc98;background-color:#3cbc98}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.success-1qQ3_tEI:hover{background-color:#38b395;transition-duration:.06s}}.success-1qQ3_tEI:active{background-color:#00a97f;transition-duration:.06s}.danger-jKTO4wDd{color:#fff;border-color:#ff4a68;background-color:#ff4a68}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.danger-jKTO4wDd:hover{background-color:#f24965;transition-duration:.06s}}.danger-jKTO4wDd:active{background-color:#ff173e;transition-duration:.06s}.warning-2uDfz7Zc{color:#fff;border-color:#f89e30;background-color:#f89e30}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.warning-2uDfz7Zc:hover{background-color:#f79217;transition-duration:.06s}}.warning-2uDfz7Zc:active{background-color:#d47807;transition-duration:.06s}.secondary-3ll81brZ{color:#757575;border-color:#eceff2;background-color:#eceff2}html.theme-dark .secondary-3ll81brZ{background-color:#363c4e;border-color:#363c4e;color:#c5cbce}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.secondary-3ll81brZ:hover{background-color:#dce6ea;transition-duration:.06s}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .secondary-3ll81brZ:hover{background-color:#4f5966}}.secondary-3ll81brZ:active{background-color:#cfdce3;transition-duration:.06s}html.theme-dark .secondary-3ll81brZ:active{background-color:#4f5966}.secondaryScript-2iIeFIWW{color:#fff;border-color:#9db2bd;background-color:#9db2bd}html.theme-dark .secondaryScript-2iIeFIWW{background-color:#363c4e;border-color:#363c4e}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.secondaryScript-2iIeFIWW:hover{background-color:#9db2bd;transition-duration:.06s}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .secondaryScript-2iIeFIWW:hover{background-color:#363c4e}}.secondaryScript-2iIeFIWW:active{background-color:#cfdce3;transition-duration:.06s}html.theme-dark .secondaryScript-2iIeFIWW:active{background-color:#363c4e}.link-2sR0CShp{color:#2196f3;transition:color .35s ease;background-color:transparent}html.theme-dark .link-2sR0CShp{color:#1976d2}.link-2sR0CShp:visited{color:#2196f3;fill:#2196f3}html.theme-dark .link-2sR0CShp:visited{fill:#1976d2;color:#1976d2}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.link-2sR0CShp:hover{color:#1e88e5;fill:#1e88e5;transition-duration:.06s}}.link-2sR0CShp:focus{outline:auto}.link-2sR0CShp:focus:not(:-moz-focusring){outline:none}.link-2sR0CShp:-moz-focusring{outline:auto}.link-2sR0CShp:active{color:#1e88e5;fill:#1e88e5;transition-duration:.06s}.xsmall-1aiWe3Hs{line-height:17px;border-radius:1px;font-size:11px;font-weight:400}.xsmall-1aiWe3Hs.withPadding-_5CJoO5q{padding:0 7px}.xsmall-1aiWe3Hs+.xsmall-1aiWe3Hs{margin-right:10px}.xsmall-1aiWe3Hs.rounded-3qEdyiAz{border-radius:10px}.small-2-nQtW8O{line-height:25px;font-size:13px}.small-2-nQtW8O.withPadding-_5CJoO5q{padding:0 12px}.small-2-nQtW8O+.small-2-nQtW8O{margin-right:10px}.small-2-nQtW8O.rounded-3qEdyiAz{border-radius:14px}.large-33HYhX8D{line-height:46px;font-size:17px;letter-spacing:1px}.large-33HYhX8D.withPadding-_5CJoO5q{padding:0 30px}.large-33HYhX8D.rounded-3qEdyiAz{border-radius:24px}.grouped-1WsMjajI:not(:first-child):not(:last-child){border-radius:0}.grouped-1WsMjajI+.grouped-1WsMjajI{margin-right:-1px}.grouped-1WsMjajI:first-child{margin-right:0}.grouped-1WsMjajI:not(:last-child){border-bottom-left-radius:0;border-top-left-radius:0}.grouped-1WsMjajI:not(:first-child){border-bottom-right-radius:0;border-top-right-radius:0}.growable-F6tv8R_j{flex:1}.growable-F6tv8R_j.withPadding-_5CJoO5q{padding:0}.active-2UxWxOgk:active{transform:translateY(1px)}.disabled-3u0ULovv{color:#adaeb0;border-color:#f1f3f6;background-color:#f1f3f6;cursor:default}html.theme-dark .disabled-3u0ULovv{background-color:#262b3e;border-color:#262b3e;color:#363c4e}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.disabled-3u0ULovv:hover{background-color:#f1f3f6;transition-duration:.06s}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .disabled-3u0ULovv:hover{background-color:#262b3e}}.disabled-3u0ULovv:active{background-color:#f1f3f6;transition-duration:.06s}html.theme-dark .disabled-3u0ULovv:active{background-color:#262b3e}.disabled-3u0ULovv:active{transform:none}.rounded-3qEdyiAz{border-radius:17px} \ No newline at end of file diff --git a/public/charting_library/bundles/61.fb29f65342062c04fe5b.js b/public/charting_library/bundles/61.fb29f65342062c04fe5b.js new file mode 100644 index 00000000..e57c97d3 --- /dev/null +++ b/public/charting_library/bundles/61.fb29f65342062c04fe5b.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[61],[]]); \ No newline at end of file diff --git a/public/charting_library/bundles/62.40b2f091122109aa2e58.js b/public/charting_library/bundles/62.40b2f091122109aa2e58.js new file mode 100644 index 00000000..e9a21d75 --- /dev/null +++ b/public/charting_library/bundles/62.40b2f091122109aa2e58.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[62],[]]); \ No newline at end of file diff --git a/public/charting_library/bundles/62.eb00d46231222c518012.css b/public/charting_library/bundles/62.eb00d46231222c518012.css new file mode 100644 index 00000000..b04cb8cd --- /dev/null +++ b/public/charting_library/bundles/62.eb00d46231222c518012.css @@ -0,0 +1 @@ +.tv-tabs{display:flex;position:relative;height:53px;line-height:53px;padding:0 16px;overflow:hidden;white-space:nowrap;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.tv-tabs:before{content:"";display:block;position:absolute;bottom:0;left:0;right:0;height:1px;background-color:#dadde0}html.theme-dark .tv-tabs:before{background-color:#363c4e}.tv-tabs::-webkit-scrollbar{display:none}.tv-tabs.i-loaded{padding:0}.tv-tabs--category-content{padding:0 6px}.tv-tabs__scroll-wrap{display:block;position:relative;height:100%;width:100%;overflow-y:hidden;overflow-x:scroll;padding-bottom:100px;white-space:nowrap;-webkit-overflow-scrolling:touch;-webkit-transform:translateZ(0)}.tv-tabs__scroll-box{display:flex;position:relative}.tv-tabs.i-loaded .tv-tabs__scroll-box{padding:0 16px}.tv-tabs__additional-info{color:#b2b5be;transition:inherit}.tv-tabs__tab{display:block;position:relative;margin:0;padding:0 16px;height:53px;font-size:15px;line-height:53px;color:#131722;cursor:pointer;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;box-sizing:border-box;transition:color .35s ease}html.theme-dark .tv-tabs__tab{color:#d1d4dc}.tv-tabs__tab:active{transition-duration:.06s}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-tabs__tab:hover{transition-duration:.06s}}.tv-tabs__tab.i-active,.tv-tabs__tab:active{color:#2196f3}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-tabs__tab:hover{color:#2196f3}}html.theme-dark .tv-tabs__tab.i-active,html.theme-dark .tv-tabs__tab:active{color:#1976d2}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-tabs__tab:hover{color:#1976d2}}.tv-tabs__tab.i-disabled,.tv-tabs__tab:disabled,.tv-tabs__tab[disabled]{cursor:default;color:#dadde0}html.theme-dark .tv-tabs__tab.i-disabled,html.theme-dark .tv-tabs__tab:disabled,html.theme-dark .tv-tabs__tab[disabled]{color:#363c4e}.tv-tabs__tab--no-padding{padding:0}.tv-tabs__tab--right-shifter{margin-left:auto}.tv-tabs__tab--icon-tab{padding:0}.tv-tabs--category-header{height:46px}.tv-tabs--category-header .tv-tabs__tab{padding-left:24px;padding-right:24px;font-size:18px;height:46px;line-height:46px;color:#131722}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-tabs--category-header .tv-tabs__tab:hover,.tv-tabs--category-header .tv-tabs__tab:hover .tv-tabs__additional-info{color:#1e88e5}}.tv-tabs--category-header .tv-tabs__tab.i-active{cursor:default}.tv-tabs--category-header .tv-tabs__tab.i-active,.tv-tabs--category-header .tv-tabs__tab.i-active .tv-tabs__additional-info{color:#2196f3}.tv-tabs__slider,.tv-tabs__tab.i-active:after{display:block;position:absolute;bottom:0;height:3px;pointer-events:none;background-color:#2196f3}html.theme-dark .tv-tabs__slider,html.theme-dark .tv-tabs__tab.i-active:after{background-color:#1976d2}.tv-tabs--compact,.tv-tabs--compact .tv-tabs__scroll-box,.tv-tabs--compact .tv-tabs__tab{height:23px}.tv-tabs--compact .tv-tabs__tab{line-height:23px;font-size:13px}.tv-tabs--semi-compact,.tv-tabs--semi-compact .tv-tabs__scroll-box,.tv-tabs--semi-compact .tv-tabs__tab{height:38px}.tv-tabs--semi-compact .tv-tabs__tab{line-height:38px}.tv-tabs--category-header.i-loaded,.tv-tabs--category-header.i-loaded .tv-tabs__scroll-box,.tv-tabs--compact,.tv-tabs--compact.i-loaded .tv-tabs__scroll-box,.tv-tabs--semi-compact,.tv-tabs--semi-compact.i-loaded .tv-tabs__scroll-box{padding-left:0;padding-right:0}.tv-tabs--category-header,.tv-tabs--category-header.i-loaded .tv-tabs__scroll-box,.tv-tabs--category-header .tv-tabs__scroll-box{padding-left:20px;padding-right:20px}.tv-tabs--category-header:before,.tv-tabs--compact:before,.tv-tabs--semi-compact:before{bottom:0}.tv-tabs--compact .tv-tabs__tab:first-child,.tv-tabs--semi-compact .tv-tabs__tab:first-child{margin-left:-16px}.tv-tabs--compact .tv-tabs__tab:last-child,.tv-tabs--semi-compact .tv-tabs__tab:last-child{margin-right:-16px}.tv-tabs--category-header .tv-tabs__tab:first-child{margin-left:-24px}.tv-tabs--category-header .tv-tabs__tab:last-child{margin-right:-24px}.page-wide .tv-tabs--category-header .tv-tabs__tab{padding-left:32px;padding-right:32px}.page-wide .tv-tabs--category-header .tv-tabs__tab:first-child{margin-left:-32px}.page-wide .tv-tabs--category-header .tv-tabs__tab:last-child{margin-right:-32px}.tv-tabs--compact .tv-tabs__tab.i-hidden:first-child+.tv-tabs__tab{margin-left:-16px}.tv-tabs--compact .tv-tabs__slider,.tv-tabs--compact .tv-tabs__tab.i-active:after{bottom:0;height:1px}@media screen and (max-width:767px){.tv-tabs--with-wrap-padding-mobile .tv-tabs__tab:first-child{margin-left:0;padding-left:0}.tv-tabs--with-wrap-padding-mobile .tv-tabs__tab:nth-last-child(2){margin-right:0;padding-right:0}}.tv-tabs--no-margin .tv-tabs__tab:first-child,.tv-tabs--semi-compact.tv-tabs--no-margin .tv-tabs__tab:first-child{margin-left:0}.tv-tabs--no-margin .tv-tabs__tab:last-child,.tv-tabs--semi-compact.tv-tabs--no-margin .tv-tabs__tab:last-child{margin-right:0}.tv-tabs--secondary-active .tv-tabs__wrap{display:flex;align-items:center;height:23px;padding:0 14px}.tv-tabs--secondary-active.tv-tabs--semi-compact .tv-tabs__wrap{height:26px;padding:0 8px}.tv-tabs--secondary-active.tv-tabs--semi-compact .tv-tabs__tab{padding:6px}.tv-tabs--secondary-active .tv-tabs__tab{padding:0 6px}.tv-tabs--secondary-active .tv-tabs__tab.i-active .tv-tabs__wrap{background-color:#9db2bd;color:#fff;transition:color .35s ease,background-color .35s ease}html.theme-dark .tv-tabs--secondary-active .tv-tabs__tab.i-active .tv-tabs__wrap{color:#c5cbce;background-color:#4c525e}.tv-tabs--no-border:before{display:none}.tv-tabs--no-padding,.tv-tabs--no-padding.i-loaded .tv-tabs__scroll-box{padding:0}.tv-tabs--no-padding .tv-tabs__tab{padding:0 16px}.tv-tabs--no-padding .tv-tabs__tab.tv-tabs__tab--no-padding{padding:0}.tv-tabs.i-loaded .tv-tabs__tab.i-active:after{content:none;display:none}.tv-tabs__left-arrow,.tv-tabs__right-arrow{display:flex;position:absolute;align-items:center;padding:0 5px;bottom:0;top:0;background-color:#fff;cursor:pointer;width:36px;direction:ltr;-webkit-user-select:none;user-select:none;box-sizing:content-box}.tv-tabs__left-arrow:after,.tv-tabs__right-arrow:after{content:"";display:inline-block;vertical-align:middle;height:100%}.tv-tabs__left-arrow svg,.tv-tabs__right-arrow svg{display:inline-block;width:12px;height:12px;vertical-align:middle;transform:scale(1);transition:fill .35s ease}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-tabs__left-arrow:hover svg,.tv-tabs__right-arrow:hover svg{fill:#4f5966;transition-duration:.06s}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-tabs__left-arrow:hover svg,html.theme-dark .tv-tabs__right-arrow:hover svg{fill:#c5cbce}}.tv-tabs__left-arrow:active svg,.tv-tabs__right-arrow:active svg{fill:#271d2b;transition-duration:.06s}html.theme-dark .tv-tabs__left-arrow:active svg,html.theme-dark .tv-tabs__right-arrow:active svg{fill:#9db2bd}.tv-tabs__right-arrow{justify-content:flex-end}.tv-tabs--category-header .tv-tabs__left-arrow,.tv-tabs--category-header .tv-tabs__right-arrow{bottom:3px;margin-top:-1px}.tv-tabs--category-header .tv-tabs__left-arrow svg,.tv-tabs--category-header .tv-tabs__right-arrow svg{vertical-align:top}.tv-tabs__left-arrow{left:0;text-align:left;background:linear-gradient(90deg,#fff,hsla(0,0%,100%,.85),hsla(0,0%,100%,0))}html.theme-dark .tv-tabs__left-arrow{background:linear-gradient(90deg,#1e222d,rgba(30,34,45,.85),rgba(30,34,45,0))}.tv-tabs__left-arrow.i-slided{transform:translateX(-100%)}.tv-tabs__right-arrow{right:0;text-align:right;background:linear-gradient(270deg,#fff,hsla(0,0%,100%,.85),hsla(0,0%,100%,0))}html.theme-dark .tv-tabs__right-arrow{background:linear-gradient(270deg,#1e222d,rgba(30,34,45,.85),rgba(30,34,45,0))}.tv-tabs__right-arrow.i-slided{transform:translateX(100%)}.tv-tabs--compact .tv-tabs__left-arrow,.tv-tabs--compact .tv-tabs__right-arrow{width:23px}.tv-tabs--semi-compact .tv-tabs__left-arrow,.tv-tabs--semi-compact .tv-tabs__right-arrow{width:34px}.tv-tabs--category-header .tv-tabs__left-arrow,.tv-tabs--category-header .tv-tabs__right-arrow{width:45px}.tv-tabs--searchbar:before{display:none}.tv-tabs--searchbar,.tv-tabs--searchbar .tv-tabs__scroll-box{height:80px}@media screen and (max-width:1019px){.tv-tabs--searchbar,.tv-tabs--searchbar .tv-tabs__scroll-box{height:54px}}.tv-tabs--searchbar .tv-tabs__slider,.tv-tabs--searchbar .tv-tabs__tab.i-active:after{bottom:0;background-color:#fff}html.theme-dark .tv-tabs--searchbar .tv-tabs__slider,html.theme-dark .tv-tabs--searchbar .tv-tabs__tab.i-active:after{background-color:#fff}.tv-tabs--searchbar .tv-tabs__left-arrow svg,.tv-tabs--searchbar .tv-tabs__right-arrow svg{fill:#fff;opacity:.65}.tv-tabs--searchbar .tv-tabs__left-arrow:active svg,.tv-tabs--searchbar .tv-tabs__right-arrow:active svg{fill:#fff;opacity:1}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-tabs--searchbar .tv-tabs__left-arrow:hover svg,.tv-tabs--searchbar .tv-tabs__right-arrow:hover svg{fill:#fff;opacity:1}}.tv-tabs--searchbar .tv-tabs__left-arrow,html.theme-dark .tv-tabs--searchbar .tv-tabs__left-arrow{background:linear-gradient(90deg,#1e222d,rgba(30,34,45,.85),rgba(30,34,45,0))}.tv-tabs--searchbar .tv-tabs__right-arrow,html.theme-dark .tv-tabs--searchbar .tv-tabs__right-arrow{background:linear-gradient(270deg,#1e222d,rgba(30,34,45,.85),rgba(30,34,45,0))}.tv-tabs--searchbar_sub,.tv-tabs--searchbar_sub .tv-tabs__scroll-box{height:40px;line-height:40px}.tv-tabs--searchbar_sub .tv-tabs__left-arrow{background:linear-gradient(90deg,#1e8ae0 0,#1e8ae0 15%,rgba(30,138,224,0))}html.theme-dark .tv-tabs--searchbar_sub .tv-tabs__left-arrow{background:linear-gradient(90deg,#176dc1 0,#176dc1 15%,rgba(23,109,193,0))}.tv-tabs--searchbar_sub .tv-tabs__right-arrow{background:linear-gradient(90deg,rgba(30,138,224,0) 0,#1e8ae0 85%,#1e8ae0)}html.theme-dark .tv-tabs--searchbar_sub .tv-tabs__right-arrow{background:linear-gradient(90deg,rgba(23,109,193,0) 0,#176dc1 85%,#176dc1)}.tv-tabs--searchbar-bright .tv-tabs__left-arrow{background:linear-gradient(90deg,#2196f3 0,#2196f3 15%,rgba(33,150,243,0))}html.theme-dark .tv-tabs--searchbar-bright .tv-tabs__left-arrow{background:linear-gradient(90deg,#1976d2 0,#1976d2 15%,rgba(25,118,210,0))}.tv-tabs--searchbar-bright .tv-tabs__right-arrow{background:linear-gradient(90deg,rgba(33,150,243,0) 0,#2196f3 85%,#2196f3)}html.theme-dark .tv-tabs--searchbar-bright .tv-tabs__right-arrow{background:linear-gradient(90deg,rgba(25,118,210,0) 0,#1976d2 85%,#1976d2)} \ No newline at end of file diff --git a/public/charting_library/bundles/62.eb00d46231222c518012.rtl.css b/public/charting_library/bundles/62.eb00d46231222c518012.rtl.css new file mode 100644 index 00000000..fdccde51 --- /dev/null +++ b/public/charting_library/bundles/62.eb00d46231222c518012.rtl.css @@ -0,0 +1 @@ +.tv-tabs{display:flex;position:relative;height:53px;line-height:53px;padding:0 16px;overflow:hidden;white-space:nowrap;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.tv-tabs:before{content:"";display:block;position:absolute;bottom:0;right:0;left:0;height:1px;background-color:#dadde0}html.theme-dark .tv-tabs:before{background-color:#363c4e}.tv-tabs::-webkit-scrollbar{display:none}.tv-tabs.i-loaded{padding:0}.tv-tabs--category-content{padding:0 6px}.tv-tabs__scroll-wrap{display:block;position:relative;height:100%;width:100%;overflow-y:hidden;overflow-x:scroll;padding-bottom:100px;white-space:nowrap;-webkit-overflow-scrolling:touch;-webkit-transform:translateZ(0)}.tv-tabs__scroll-box{display:flex;position:relative}.tv-tabs.i-loaded .tv-tabs__scroll-box{padding:0 16px}.tv-tabs__additional-info{color:#b2b5be;transition:inherit}.tv-tabs__tab{display:block;position:relative;margin:0;padding:0 16px;height:53px;font-size:15px;line-height:53px;color:#131722;cursor:pointer;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;box-sizing:border-box;transition:color .35s ease}html.theme-dark .tv-tabs__tab{color:#d1d4dc}.tv-tabs__tab:active{transition-duration:.06s}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-tabs__tab:hover{transition-duration:.06s}}.tv-tabs__tab.i-active,.tv-tabs__tab:active{color:#2196f3}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-tabs__tab:hover{color:#2196f3}}html.theme-dark .tv-tabs__tab.i-active,html.theme-dark .tv-tabs__tab:active{color:#1976d2}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-tabs__tab:hover{color:#1976d2}}.tv-tabs__tab.i-disabled,.tv-tabs__tab:disabled,.tv-tabs__tab[disabled]{cursor:default;color:#dadde0}html.theme-dark .tv-tabs__tab.i-disabled,html.theme-dark .tv-tabs__tab:disabled,html.theme-dark .tv-tabs__tab[disabled]{color:#363c4e}.tv-tabs__tab--no-padding{padding:0}.tv-tabs__tab--right-shifter{margin-right:auto}.tv-tabs__tab--icon-tab{padding:0}.tv-tabs--category-header{height:46px}.tv-tabs--category-header .tv-tabs__tab{padding-right:24px;padding-left:24px;font-size:18px;height:46px;line-height:46px;color:#131722}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-tabs--category-header .tv-tabs__tab:hover,.tv-tabs--category-header .tv-tabs__tab:hover .tv-tabs__additional-info{color:#1e88e5}}.tv-tabs--category-header .tv-tabs__tab.i-active{cursor:default}.tv-tabs--category-header .tv-tabs__tab.i-active,.tv-tabs--category-header .tv-tabs__tab.i-active .tv-tabs__additional-info{color:#2196f3}.tv-tabs__slider,.tv-tabs__tab.i-active:after{display:block;position:absolute;bottom:0;height:3px;pointer-events:none;background-color:#2196f3}html.theme-dark .tv-tabs__slider,html.theme-dark .tv-tabs__tab.i-active:after{background-color:#1976d2}.tv-tabs--compact,.tv-tabs--compact .tv-tabs__scroll-box,.tv-tabs--compact .tv-tabs__tab{height:23px}.tv-tabs--compact .tv-tabs__tab{line-height:23px;font-size:13px}.tv-tabs--semi-compact,.tv-tabs--semi-compact .tv-tabs__scroll-box,.tv-tabs--semi-compact .tv-tabs__tab{height:38px}.tv-tabs--semi-compact .tv-tabs__tab{line-height:38px}.tv-tabs--category-header.i-loaded,.tv-tabs--category-header.i-loaded .tv-tabs__scroll-box,.tv-tabs--compact,.tv-tabs--compact.i-loaded .tv-tabs__scroll-box,.tv-tabs--semi-compact,.tv-tabs--semi-compact.i-loaded .tv-tabs__scroll-box{padding-right:0;padding-left:0}.tv-tabs--category-header,.tv-tabs--category-header.i-loaded .tv-tabs__scroll-box,.tv-tabs--category-header .tv-tabs__scroll-box{padding-right:20px;padding-left:20px}.tv-tabs--category-header:before,.tv-tabs--compact:before,.tv-tabs--semi-compact:before{bottom:0}.tv-tabs--compact .tv-tabs__tab:first-child,.tv-tabs--semi-compact .tv-tabs__tab:first-child{margin-right:-16px}.tv-tabs--compact .tv-tabs__tab:last-child,.tv-tabs--semi-compact .tv-tabs__tab:last-child{margin-left:-16px}.tv-tabs--category-header .tv-tabs__tab:first-child{margin-right:-24px}.tv-tabs--category-header .tv-tabs__tab:last-child{margin-left:-24px}.page-wide .tv-tabs--category-header .tv-tabs__tab{padding-right:32px;padding-left:32px}.page-wide .tv-tabs--category-header .tv-tabs__tab:first-child{margin-right:-32px}.page-wide .tv-tabs--category-header .tv-tabs__tab:last-child{margin-left:-32px}.tv-tabs--compact .tv-tabs__tab.i-hidden:first-child+.tv-tabs__tab{margin-right:-16px}.tv-tabs--compact .tv-tabs__slider,.tv-tabs--compact .tv-tabs__tab.i-active:after{bottom:0;height:1px}@media screen and (max-width:767px){.tv-tabs--with-wrap-padding-mobile .tv-tabs__tab:first-child{margin-right:0;padding-right:0}.tv-tabs--with-wrap-padding-mobile .tv-tabs__tab:nth-last-child(2){margin-left:0;padding-left:0}}.tv-tabs--no-margin .tv-tabs__tab:first-child,.tv-tabs--semi-compact.tv-tabs--no-margin .tv-tabs__tab:first-child{margin-right:0}.tv-tabs--no-margin .tv-tabs__tab:last-child,.tv-tabs--semi-compact.tv-tabs--no-margin .tv-tabs__tab:last-child{margin-left:0}.tv-tabs--secondary-active .tv-tabs__wrap{display:flex;align-items:center;height:23px;padding:0 14px}.tv-tabs--secondary-active.tv-tabs--semi-compact .tv-tabs__wrap{height:26px;padding:0 8px}.tv-tabs--secondary-active.tv-tabs--semi-compact .tv-tabs__tab{padding:6px}.tv-tabs--secondary-active .tv-tabs__tab{padding:0 6px}.tv-tabs--secondary-active .tv-tabs__tab.i-active .tv-tabs__wrap{background-color:#9db2bd;color:#fff;transition:color .35s ease,background-color .35s ease}html.theme-dark .tv-tabs--secondary-active .tv-tabs__tab.i-active .tv-tabs__wrap{color:#c5cbce;background-color:#4c525e}.tv-tabs--no-border:before{display:none}.tv-tabs--no-padding,.tv-tabs--no-padding.i-loaded .tv-tabs__scroll-box{padding:0}.tv-tabs--no-padding .tv-tabs__tab{padding:0 16px}.tv-tabs--no-padding .tv-tabs__tab.tv-tabs__tab--no-padding{padding:0}.tv-tabs.i-loaded .tv-tabs__tab.i-active:after{content:none;display:none}.tv-tabs__left-arrow,.tv-tabs__right-arrow{display:flex;position:absolute;align-items:center;padding:0 5px;bottom:0;top:0;background-color:#fff;cursor:pointer;width:36px;direction:ltr;-webkit-user-select:none;user-select:none;box-sizing:content-box}.tv-tabs__left-arrow:after,.tv-tabs__right-arrow:after{content:"";display:inline-block;vertical-align:middle;height:100%}.tv-tabs__left-arrow svg,.tv-tabs__right-arrow svg{display:inline-block;width:12px;height:12px;vertical-align:middle;transform:scale(1);transition:fill .35s ease}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-tabs__left-arrow:hover svg,.tv-tabs__right-arrow:hover svg{fill:#4f5966;transition-duration:.06s}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-tabs__left-arrow:hover svg,html.theme-dark .tv-tabs__right-arrow:hover svg{fill:#c5cbce}}.tv-tabs__left-arrow:active svg,.tv-tabs__right-arrow:active svg{fill:#271d2b;transition-duration:.06s}html.theme-dark .tv-tabs__left-arrow:active svg,html.theme-dark .tv-tabs__right-arrow:active svg{fill:#9db2bd}.tv-tabs__right-arrow{justify-content:flex-end}.tv-tabs--category-header .tv-tabs__left-arrow,.tv-tabs--category-header .tv-tabs__right-arrow{bottom:3px;margin-top:-1px}.tv-tabs--category-header .tv-tabs__left-arrow svg,.tv-tabs--category-header .tv-tabs__right-arrow svg{vertical-align:top}.tv-tabs__left-arrow{left:0;text-align:left;background:linear-gradient(90deg,#fff,hsla(0,0%,100%,.85),hsla(0,0%,100%,0))}html.theme-dark .tv-tabs__left-arrow{background:linear-gradient(270deg,#1e222d,rgba(30,34,45,.85),rgba(30,34,45,0))}.tv-tabs__left-arrow.i-slided{transform:translateX(-100%)}.tv-tabs__right-arrow{right:0;text-align:right;background:linear-gradient(270deg,#fff,hsla(0,0%,100%,.85),hsla(0,0%,100%,0))}html.theme-dark .tv-tabs__right-arrow{background:linear-gradient(90deg,#1e222d,rgba(30,34,45,.85),rgba(30,34,45,0))}.tv-tabs__right-arrow.i-slided{transform:translateX(100%)}.tv-tabs--compact .tv-tabs__left-arrow,.tv-tabs--compact .tv-tabs__right-arrow{width:23px}.tv-tabs--semi-compact .tv-tabs__left-arrow,.tv-tabs--semi-compact .tv-tabs__right-arrow{width:34px}.tv-tabs--category-header .tv-tabs__left-arrow,.tv-tabs--category-header .tv-tabs__right-arrow{width:45px}.tv-tabs--searchbar:before{display:none}.tv-tabs--searchbar,.tv-tabs--searchbar .tv-tabs__scroll-box{height:80px}@media screen and (max-width:1019px){.tv-tabs--searchbar,.tv-tabs--searchbar .tv-tabs__scroll-box{height:54px}}.tv-tabs--searchbar .tv-tabs__slider,.tv-tabs--searchbar .tv-tabs__tab.i-active:after{bottom:0;background-color:#fff}html.theme-dark .tv-tabs--searchbar .tv-tabs__slider,html.theme-dark .tv-tabs--searchbar .tv-tabs__tab.i-active:after{background-color:#fff}.tv-tabs--searchbar .tv-tabs__left-arrow svg,.tv-tabs--searchbar .tv-tabs__right-arrow svg{fill:#fff;opacity:.65}.tv-tabs--searchbar .tv-tabs__left-arrow:active svg,.tv-tabs--searchbar .tv-tabs__right-arrow:active svg{fill:#fff;opacity:1}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-tabs--searchbar .tv-tabs__left-arrow:hover svg,.tv-tabs--searchbar .tv-tabs__right-arrow:hover svg{fill:#fff;opacity:1}}.tv-tabs--searchbar .tv-tabs__left-arrow{background:linear-gradient(90deg,#1e222d,rgba(30,34,45,.85),rgba(30,34,45,0))}.tv-tabs--searchbar .tv-tabs__right-arrow,html.theme-dark .tv-tabs--searchbar .tv-tabs__left-arrow{background:linear-gradient(270deg,#1e222d,rgba(30,34,45,.85),rgba(30,34,45,0))}html.theme-dark .tv-tabs--searchbar .tv-tabs__right-arrow{background:linear-gradient(90deg,#1e222d,rgba(30,34,45,.85),rgba(30,34,45,0))}.tv-tabs--searchbar_sub,.tv-tabs--searchbar_sub .tv-tabs__scroll-box{height:40px;line-height:40px}.tv-tabs--searchbar_sub .tv-tabs__left-arrow{background:linear-gradient(90deg,#1e8ae0 0,#1e8ae0 15%,rgba(30,138,224,0))}html.theme-dark .tv-tabs--searchbar_sub .tv-tabs__left-arrow{background:linear-gradient(270deg,#176dc1 0,#176dc1 15%,rgba(23,109,193,0))}.tv-tabs--searchbar_sub .tv-tabs__right-arrow{background:linear-gradient(90deg,rgba(30,138,224,0) 0,#1e8ae0 85%,#1e8ae0)}html.theme-dark .tv-tabs--searchbar_sub .tv-tabs__right-arrow{background:linear-gradient(270deg,rgba(23,109,193,0) 0,#176dc1 85%,#176dc1)}.tv-tabs--searchbar-bright .tv-tabs__left-arrow{background:linear-gradient(90deg,#2196f3 0,#2196f3 15%,rgba(33,150,243,0))}html.theme-dark .tv-tabs--searchbar-bright .tv-tabs__left-arrow{background:linear-gradient(270deg,#1976d2 0,#1976d2 15%,rgba(25,118,210,0))}.tv-tabs--searchbar-bright .tv-tabs__right-arrow{background:linear-gradient(90deg,rgba(33,150,243,0) 0,#2196f3 85%,#2196f3)}html.theme-dark .tv-tabs--searchbar-bright .tv-tabs__right-arrow{background:linear-gradient(270deg,rgba(25,118,210,0) 0,#1976d2 85%,#1976d2)} \ No newline at end of file diff --git a/public/charting_library/bundles/63.1dcbc7aa3999df0c4e14.css b/public/charting_library/bundles/63.1dcbc7aa3999df0c4e14.css new file mode 100644 index 00000000..19cf3f5e --- /dev/null +++ b/public/charting_library/bundles/63.1dcbc7aa3999df0c4e14.css @@ -0,0 +1 @@ +.charts-popup-list{display:none;overflow:auto;right:7px;top:46px;position:absolute;border:1px solid;border-color:#dadde0;background:#fff;z-index:110;margin:0}html.theme-dark .charts-popup-list{background:#1e222d;border-color:#363c4e}.charts-popup-list.popup-menu-scroll-y{overflow-y:scroll}.charts-popup-list .item.special{background:rgba(247,248,250,.8)}html.theme-dark .charts-popup-list .item.special{background:rgba(23,27,41,.8)}.charts-popup-list .item.active{background:#f1f3f6}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.charts-popup-list .item:hover{background:#f1f3f6}}html.theme-dark .charts-popup-list .item.active{background:#2f3241}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .charts-popup-list .item:hover{background:#2f3241}}.charts-popup-list .item.first{border-top-left-radius:3px;border-top-right-radius:3px}.charts-popup-list .item:last-child{border-bottom-right-radius:3px}.charts-popup-list .item span{color:#4a4a4a;fill:currentColor;display:inline-block}html.theme-dark .charts-popup-list .item span{color:#c5cbce}.charts-popup-list .item.active{background:#f4f7f9}.charts-popup-list .item{display:block;padding:7px;height:16px;position:relative;overflow:hidden;-webkit-user-select:none;user-select:none;cursor:default}.charts-popup-list .item.setting-hidden{padding-left:28px;padding-right:16px}.charts-popup-list .item.setting-hidden>span.title-expanded{width:auto}.charts-popup-list .item.button-load,.charts-popup-list .item.button-new{overflow:hidden;text-align:center;border-color:#dadde0;border-style:solid;border-width:1px 0 0;padding-left:0;padding-right:0}html.theme-dark .charts-popup-list .item.button-load,html.theme-dark .charts-popup-list .item.button-new{border-color:#363c4e}.charts-popup-list .item.button-load .title-expanded,.charts-popup-list .item.button-new .title-expanded{width:auto}.charts-popup-list .item.button-load{width:50%;float:left;border-width:1px 1px 0 0}.charts-popup-list .item .icon-external{margin-left:20px;vertical-align:top;float:right}.charts-popup-list .item .icon-external svg{width:10px;height:10px;stroke:#9db2bd}.charts-popup-list .item:last-child{border-bottom-left-radius:3px}.charts-popup-list .item.special.disabled{cursor:default}.charts-popup-list .item.special.disabled span{color:#9d9d9d}html.theme-dark .charts-popup-list .item.special.disabled span{color:#4c525e}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.charts-popup-list .item.special.disabled:hover{background:rgba(247,248,250,.8)}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .charts-popup-list .item.special.disabled:hover{background:rgba(23,27,41,.8)}}.charts-popup-list .item .title{width:140px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.charts-popup-list .item .title-expanded{width:225px;max-width:100%;font-weight:400;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.charts-popup-list .item.active-item-backlight{background-color:#f2f3f5;border-radius:0}html.theme-dark .charts-popup-list .item.active-item-backlight{background-color:#2f3241}.charts-popup-list .item .date{width:65px;padding-right:20px;vertical-align:top;white-space:nowrap;float:right}.charts-popup-list .separator{display:block;margin:0;height:0;overflow:hidden;border-top:1px solid;border-top-color:#c9cbcd}html.theme-dark .charts-popup-list .separator{border-top-color:#363c4e}.charts-popup-list .charts-popup-tab-headers{overflow:hidden;padding:8px 0;font-size:14px}.charts-popup-list .charts-popup-tab-header{float:left;margin:0 10px 5px}.charts-popup-list .charts-popup-tab-header-label{padding:0;font-weight:700;border-bottom:1px dashed;cursor:pointer}.charts-popup-list .charts-popup-tab-header.active .charts-popup-tab-header-label{color:#595959;border-bottom:none;cursor:default}.charts-popup-list .item.with-indent{padding-left:28px}.charts-popup-list .item .icon-delete{width:16px;height:16px;position:absolute;top:7px;right:5px}.charts-popup-list .item .icon-delete svg{display:block;width:12px;height:12px;margin:2px 0 0 2px;color:#9d9d9d}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.charts-popup-list .item .icon-delete:hover svg{color:#7d7d7d}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.charts-popup-list .item .icon-delete:hover{background-position:-81px -362px}}.charts-popup-list .item .icon-delete{visibility:hidden}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.charts-popup-list .item:hover .icon-delete{visibility:visible}}.charts-popup-list .item .icon{display:inline-block;width:16px;height:16px;margin:0 5px 0 0;vertical-align:top;background-position:0 0}.charts-popup-list .item .icon.checked-icon svg{position:absolute;top:3px;left:2px}.charts-popup-list.iconed .item{height:32px;padding:3px 2px;line-height:34px;white-space:nowrap;position:relative;overflow:hidden}.charts-popup-list.iconed .item .title{padding-right:20px}.charts-popup-list.iconed .item .icon{width:32px;height:32px;margin:0 5px}.charts-popup-list.iconed.thin .title{width:50px}.charts-popup-list.narrow{width:165px}.charts-popup-list.narrow .item .title-expanded{width:140px}.charts-popup-list.narrow.with-scroll .item .title-expanded{width:100px}.charts-popup-list.thin,.charts-popup-list.thin .item .title-expanded{width:auto}.charts-popup-list .item .counter{position:absolute;top:8px;right:10px;color:#b8b8b8}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.charts-popup-list .item:hover .counter{color:#595959}}.charts-popup-list .item .counter.blue{background:#4e8ff6;color:#fff;padding:2px 3px;border-radius:2px;top:5px}.charts-popup-list .item.grayed span{opacity:.3}.charts-popup-list.small-font{font-size:12px}.charts-popup-list.small-font .item{height:12px}.charts-popup-itemheader{padding:3px 8px 4px;border-top:1px solid;border-top-color:#b5b7b9;cursor:pointer;color:#4a4a4a;background:hsla(210,3%,72%,.2)}html.theme-dark .charts-popup-itemheader{background:rgba(54,60,78,.2);color:#c5cbce;border-top-color:#363c4e}.charts-popup-group-collapsible.collapsed .item{display:none}.charts-popup-group-collapsible .charts-popup-itemheader-icon{display:inline-block;vertical-align:middle;position:relative;top:-1px;width:11px;height:11px;margin:0 5px 0 -3px;background:url(data:image/gif;base64,R0lGODlhCwALAIABAH19fQAAACH5BAEKAAEALAAAAAALAAsAAAIUhI8Wy6zdHlxyqnTBdHqHCoERlhQAOw==) no-repeat}.charts-popup-group-collapsible.collapsed .charts-popup-itemheader-icon{background-image:url(data:image/gif;base64,R0lGODlhCwALAIABAH19fQAAACH5BAEKAAEALAAAAAALAAsAAAIXhI8Wy6ze3gKRQkeTksFO31WR2FQaUgAAOw==)} \ No newline at end of file diff --git a/public/charting_library/bundles/63.1dcbc7aa3999df0c4e14.rtl.css b/public/charting_library/bundles/63.1dcbc7aa3999df0c4e14.rtl.css new file mode 100644 index 00000000..1316a3d1 --- /dev/null +++ b/public/charting_library/bundles/63.1dcbc7aa3999df0c4e14.rtl.css @@ -0,0 +1 @@ +.charts-popup-list{display:none;overflow:auto;left:7px;top:46px;position:absolute;border:1px solid;border-color:#dadde0;background:#fff;z-index:110;margin:0}html.theme-dark .charts-popup-list{background:#1e222d;border-color:#363c4e}.charts-popup-list.popup-menu-scroll-y{overflow-y:scroll}.charts-popup-list .item.special{background:rgba(247,248,250,.8)}html.theme-dark .charts-popup-list .item.special{background:rgba(23,27,41,.8)}.charts-popup-list .item.active{background:#f1f3f6}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.charts-popup-list .item:hover{background:#f1f3f6}}html.theme-dark .charts-popup-list .item.active{background:#2f3241}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .charts-popup-list .item:hover{background:#2f3241}}.charts-popup-list .item.first{border-top-right-radius:3px;border-top-left-radius:3px}.charts-popup-list .item:last-child{border-bottom-left-radius:3px}.charts-popup-list .item span{color:#4a4a4a;fill:currentColor;display:inline-block}html.theme-dark .charts-popup-list .item span{color:#c5cbce}.charts-popup-list .item.active{background:#f4f7f9}.charts-popup-list .item{display:block;padding:7px;height:16px;position:relative;overflow:hidden;-webkit-user-select:none;user-select:none;cursor:default}.charts-popup-list .item.setting-hidden{padding-right:28px;padding-left:16px}.charts-popup-list .item.setting-hidden>span.title-expanded{width:auto}.charts-popup-list .item.button-load,.charts-popup-list .item.button-new{overflow:hidden;text-align:center;border-color:#dadde0;border-style:solid;border-width:1px 0 0;padding-right:0;padding-left:0}html.theme-dark .charts-popup-list .item.button-load,html.theme-dark .charts-popup-list .item.button-new{border-color:#363c4e}.charts-popup-list .item.button-load .title-expanded,.charts-popup-list .item.button-new .title-expanded{width:auto}.charts-popup-list .item.button-load{width:50%;float:right;border-width:1px 0 0 1px}.charts-popup-list .item .icon-external{margin-right:20px;vertical-align:top;float:left}.charts-popup-list .item .icon-external svg{width:10px;height:10px;stroke:#9db2bd}.charts-popup-list .item:last-child{border-bottom-right-radius:3px}.charts-popup-list .item.special.disabled{cursor:default}.charts-popup-list .item.special.disabled span{color:#9d9d9d}html.theme-dark .charts-popup-list .item.special.disabled span{color:#4c525e}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.charts-popup-list .item.special.disabled:hover{background:rgba(247,248,250,.8)}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .charts-popup-list .item.special.disabled:hover{background:rgba(23,27,41,.8)}}.charts-popup-list .item .title{width:140px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.charts-popup-list .item .title-expanded{width:225px;max-width:100%;font-weight:400;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.charts-popup-list .item.active-item-backlight{background-color:#f2f3f5;border-radius:0}html.theme-dark .charts-popup-list .item.active-item-backlight{background-color:#2f3241}.charts-popup-list .item .date{width:65px;padding-left:20px;vertical-align:top;white-space:nowrap;float:left}.charts-popup-list .separator{display:block;margin:0;height:0;overflow:hidden;border-top:1px solid;border-top-color:#c9cbcd}html.theme-dark .charts-popup-list .separator{border-top-color:#363c4e}.charts-popup-list .charts-popup-tab-headers{overflow:hidden;padding:8px 0;font-size:14px}.charts-popup-list .charts-popup-tab-header{float:right;margin:0 10px 5px}.charts-popup-list .charts-popup-tab-header-label{padding:0;font-weight:700;border-bottom:1px dashed;cursor:pointer}.charts-popup-list .charts-popup-tab-header.active .charts-popup-tab-header-label{color:#595959;border-bottom:none;cursor:default}.charts-popup-list .item.with-indent{padding-right:28px}.charts-popup-list .item .icon-delete{width:16px;height:16px;position:absolute;top:7px;left:5px}.charts-popup-list .item .icon-delete svg{display:block;width:12px;height:12px;margin:2px 2px 0 0;color:#9d9d9d}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.charts-popup-list .item .icon-delete:hover svg{color:#7d7d7d}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.charts-popup-list .item .icon-delete:hover{background-position:-81px -362px}}.charts-popup-list .item .icon-delete{visibility:hidden}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.charts-popup-list .item:hover .icon-delete{visibility:visible}}.charts-popup-list .item .icon{display:inline-block;width:16px;height:16px;margin:0 0 0 5px;vertical-align:top;background-position:0 0}.charts-popup-list .item .icon.checked-icon svg{position:absolute;top:3px;right:2px}.charts-popup-list.iconed .item{height:32px;padding:3px 2px;line-height:34px;white-space:nowrap;position:relative;overflow:hidden}.charts-popup-list.iconed .item .title{padding-left:20px}.charts-popup-list.iconed .item .icon{width:32px;height:32px;margin:0 5px}.charts-popup-list.iconed.thin .title{width:50px}.charts-popup-list.narrow{width:165px}.charts-popup-list.narrow .item .title-expanded{width:140px}.charts-popup-list.narrow.with-scroll .item .title-expanded{width:100px}.charts-popup-list.thin,.charts-popup-list.thin .item .title-expanded{width:auto}.charts-popup-list .item .counter{position:absolute;top:8px;left:10px;color:#b8b8b8}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.charts-popup-list .item:hover .counter{color:#595959}}.charts-popup-list .item .counter.blue{background:#4e8ff6;color:#fff;padding:2px 3px;border-radius:2px;top:5px}.charts-popup-list .item.grayed span{opacity:.3}.charts-popup-list.small-font{font-size:12px}.charts-popup-list.small-font .item{height:12px}.charts-popup-itemheader{padding:3px 8px 4px;border-top:1px solid;border-top-color:#b5b7b9;cursor:pointer;color:#4a4a4a;background:hsla(210,3%,72%,.2)}html.theme-dark .charts-popup-itemheader{background:rgba(54,60,78,.2);color:#c5cbce;border-top-color:#363c4e}.charts-popup-group-collapsible.collapsed .item{display:none}.charts-popup-group-collapsible .charts-popup-itemheader-icon{display:inline-block;vertical-align:middle;position:relative;top:-1px;width:11px;height:11px;margin:0 -3px 0 5px;background:url(data:image/gif;base64,R0lGODlhCwALAIABAH19fQAAACH5BAEKAAEALAAAAAALAAsAAAIUhI8Wy6zdHlxyqnTBdHqHCoERlhQAOw==) no-repeat}.charts-popup-group-collapsible.collapsed .charts-popup-itemheader-icon{background-image:url(data:image/gif;base64,R0lGODlhCwALAIABAH19fQAAACH5BAEKAAEALAAAAAALAAsAAAIXhI8Wy6ze3gKRQkeTksFO31WR2FQaUgAAOw==)} \ No newline at end of file diff --git a/public/charting_library/bundles/63.a4646519c7b7cc08d52e.js b/public/charting_library/bundles/63.a4646519c7b7cc08d52e.js new file mode 100644 index 00000000..3b86b7c3 --- /dev/null +++ b/public/charting_library/bundles/63.a4646519c7b7cc08d52e.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[63],[]]); \ No newline at end of file diff --git a/public/charting_library/bundles/64.c7c323e7fdf173702b72.css b/public/charting_library/bundles/64.c7c323e7fdf173702b72.css new file mode 100644 index 00000000..6b3db612 --- /dev/null +++ b/public/charting_library/bundles/64.c7c323e7fdf173702b72.css @@ -0,0 +1 @@ +.button-13wlLwhJ{display:flex;flex:1 0 auto;align-items:center;height:100%;cursor:default;color:var(--tv-color-toolbar-button-text,#131722);position:relative;z-index:0;transition:background-color .35s ease,color 60ms ease}html.theme-dark .button-13wlLwhJ{color:var(--tv-color-toolbar-button-text,#787b86)}.button-13wlLwhJ.hover-3L87f6Kw,.button-13wlLwhJ:active{color:var(--tv-color-toolbar-button-text-hover,#000)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.button-13wlLwhJ:hover{color:var(--tv-color-toolbar-button-text-hover,#000)}}html.theme-dark .button-13wlLwhJ.hover-3L87f6Kw,html.theme-dark .button-13wlLwhJ:active{color:var(--tv-color-toolbar-button-text-hover,#868993)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .button-13wlLwhJ:hover{color:var(--tv-color-toolbar-button-text-hover,#868993)}}.button-13wlLwhJ.hover-3L87f6Kw:before,.button-13wlLwhJ:active:before{content:"";display:block;position:absolute;z-index:-1;top:var(--tv-toolbar-explicit-hover-margin,2px);right:var(--tv-toolbar-explicit-hover-margin,2px);bottom:var(--tv-toolbar-explicit-hover-margin,2px);left:var(--tv-toolbar-explicit-hover-margin,2px);background-color:var(--tv-color-toolbar-button-background-hover,#f0f3fa);border-radius:var(--tv-toolbar-explicit-hover-border-radius,2px)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.button-13wlLwhJ:hover:before{content:"";display:block;position:absolute;z-index:-1;top:var(--tv-toolbar-explicit-hover-margin,2px);right:var(--tv-toolbar-explicit-hover-margin,2px);bottom:var(--tv-toolbar-explicit-hover-margin,2px);left:var(--tv-toolbar-explicit-hover-margin,2px);background-color:var(--tv-color-toolbar-button-background-hover,#f0f3fa);border-radius:var(--tv-toolbar-explicit-hover-border-radius,2px)}}html.theme-dark .button-13wlLwhJ.hover-3L87f6Kw:before,html.theme-dark .button-13wlLwhJ:active:before{background-color:var(--tv-color-toolbar-button-background-hover,#2a2e39)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .button-13wlLwhJ:hover:before{background-color:var(--tv-color-toolbar-button-background-hover,#2a2e39)}}.button-13wlLwhJ svg{display:block}.button-13wlLwhJ .arrow-2pXEy7ej{display:flex;contain:content;align-items:center;height:100%}.button-13wlLwhJ .arrowWrap-r5l5nQXU{margin:0 6px;transition:transform .35s ease}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.button-13wlLwhJ:hover .arrowWrap-r5l5nQXU{transform:translateY(2px)}}.button-13wlLwhJ.isOpened-1939ai3F.hover-3L87f6Kw:before,.button-13wlLwhJ.isOpened-1939ai3F:active:before,.button-13wlLwhJ.isOpened-1939ai3F:before{content:"";display:block;position:absolute;z-index:-1;top:var(--tv-toolbar-opened-element-hover-margin-top,0);right:var(--tv-toolbar-opened-element-hover-margin-right,0);bottom:var(--tv-toolbar-opened-element-hover-margin-bottom,0);left:var(--tv-toolbar-opened-element-hover-margin-left,0);border-radius:var(--tv-toolbar-opened-element-hover-border-radius,0);background-color:var(--tv-color-toolbar-button-background-expanded,#f0f3fa)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.button-13wlLwhJ.isOpened-1939ai3F:hover:before{content:"";display:block;position:absolute;z-index:-1;top:var(--tv-toolbar-opened-element-hover-margin-top,0);right:var(--tv-toolbar-opened-element-hover-margin-right,0);bottom:var(--tv-toolbar-opened-element-hover-margin-bottom,0);left:var(--tv-toolbar-opened-element-hover-margin-left,0);border-radius:var(--tv-toolbar-opened-element-hover-border-radius,0);background-color:var(--tv-color-toolbar-button-background-expanded,#f0f3fa)}}html.theme-dark .button-13wlLwhJ.isOpened-1939ai3F.hover-3L87f6Kw:before,html.theme-dark .button-13wlLwhJ.isOpened-1939ai3F:active:before,html.theme-dark .button-13wlLwhJ.isOpened-1939ai3F:before{background-color:var(--tv-color-toolbar-button-background-expanded,#2a2e39)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .button-13wlLwhJ.isOpened-1939ai3F:hover:before{background-color:var(--tv-color-toolbar-button-background-expanded,#2a2e39)}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.button-13wlLwhJ.isOpened-1939ai3F:hover .arrowWrap-r5l5nQXU{transform:none}} \ No newline at end of file diff --git a/public/charting_library/bundles/64.c7c323e7fdf173702b72.rtl.css b/public/charting_library/bundles/64.c7c323e7fdf173702b72.rtl.css new file mode 100644 index 00000000..e198ba5e --- /dev/null +++ b/public/charting_library/bundles/64.c7c323e7fdf173702b72.rtl.css @@ -0,0 +1 @@ +.button-13wlLwhJ{display:flex;flex:1 0 auto;align-items:center;height:100%;cursor:default;color:var(--tv-color-toolbar-button-text,#131722);position:relative;z-index:0;transition:background-color .35s ease,color 60ms ease}html.theme-dark .button-13wlLwhJ{color:var(--tv-color-toolbar-button-text,#787b86)}.button-13wlLwhJ.hover-3L87f6Kw,.button-13wlLwhJ:active{color:var(--tv-color-toolbar-button-text-hover,#000)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.button-13wlLwhJ:hover{color:var(--tv-color-toolbar-button-text-hover,#000)}}html.theme-dark .button-13wlLwhJ.hover-3L87f6Kw,html.theme-dark .button-13wlLwhJ:active{color:var(--tv-color-toolbar-button-text-hover,#868993)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .button-13wlLwhJ:hover{color:var(--tv-color-toolbar-button-text-hover,#868993)}}.button-13wlLwhJ.hover-3L87f6Kw:before,.button-13wlLwhJ:active:before{content:"";display:block;position:absolute;z-index:-1;top:var(--tv-toolbar-explicit-hover-margin,2px);left:var(--tv-toolbar-explicit-hover-margin,2px);bottom:var(--tv-toolbar-explicit-hover-margin,2px);right:var(--tv-toolbar-explicit-hover-margin,2px);background-color:var(--tv-color-toolbar-button-background-hover,#f0f3fa);border-radius:var(--tv-toolbar-explicit-hover-border-radius,2px)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.button-13wlLwhJ:hover:before{content:"";display:block;position:absolute;z-index:-1;top:var(--tv-toolbar-explicit-hover-margin,2px);left:var(--tv-toolbar-explicit-hover-margin,2px);bottom:var(--tv-toolbar-explicit-hover-margin,2px);right:var(--tv-toolbar-explicit-hover-margin,2px);background-color:var(--tv-color-toolbar-button-background-hover,#f0f3fa);border-radius:var(--tv-toolbar-explicit-hover-border-radius,2px)}}html.theme-dark .button-13wlLwhJ.hover-3L87f6Kw:before,html.theme-dark .button-13wlLwhJ:active:before{background-color:var(--tv-color-toolbar-button-background-hover,#2a2e39)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .button-13wlLwhJ:hover:before{background-color:var(--tv-color-toolbar-button-background-hover,#2a2e39)}}.button-13wlLwhJ svg{display:block}.button-13wlLwhJ .arrow-2pXEy7ej{display:flex;contain:content;align-items:center;height:100%}.button-13wlLwhJ .arrowWrap-r5l5nQXU{margin:0 6px;transition:transform .35s ease}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.button-13wlLwhJ:hover .arrowWrap-r5l5nQXU{transform:translateY(2px)}}.button-13wlLwhJ.isOpened-1939ai3F.hover-3L87f6Kw:before,.button-13wlLwhJ.isOpened-1939ai3F:active:before,.button-13wlLwhJ.isOpened-1939ai3F:before{content:"";display:block;position:absolute;z-index:-1;top:var(--tv-toolbar-opened-element-hover-margin-top,0);left:var(--tv-toolbar-opened-element-hover-margin-right,0);bottom:var(--tv-toolbar-opened-element-hover-margin-bottom,0);right:var(--tv-toolbar-opened-element-hover-margin-left,0);border-radius:var(--tv-toolbar-opened-element-hover-border-radius,0);background-color:var(--tv-color-toolbar-button-background-expanded,#f0f3fa)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.button-13wlLwhJ.isOpened-1939ai3F:hover:before{content:"";display:block;position:absolute;z-index:-1;top:var(--tv-toolbar-opened-element-hover-margin-top,0);left:var(--tv-toolbar-opened-element-hover-margin-right,0);bottom:var(--tv-toolbar-opened-element-hover-margin-bottom,0);right:var(--tv-toolbar-opened-element-hover-margin-left,0);border-radius:var(--tv-toolbar-opened-element-hover-border-radius,0);background-color:var(--tv-color-toolbar-button-background-expanded,#f0f3fa)}}html.theme-dark .button-13wlLwhJ.isOpened-1939ai3F.hover-3L87f6Kw:before,html.theme-dark .button-13wlLwhJ.isOpened-1939ai3F:active:before,html.theme-dark .button-13wlLwhJ.isOpened-1939ai3F:before{background-color:var(--tv-color-toolbar-button-background-expanded,#2a2e39)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .button-13wlLwhJ.isOpened-1939ai3F:hover:before{background-color:var(--tv-color-toolbar-button-background-expanded,#2a2e39)}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.button-13wlLwhJ.isOpened-1939ai3F:hover .arrowWrap-r5l5nQXU{transform:none}} \ No newline at end of file diff --git a/public/charting_library/bundles/64.db4e3db232312db40830.js b/public/charting_library/bundles/64.db4e3db232312db40830.js new file mode 100644 index 00000000..0d745777 --- /dev/null +++ b/public/charting_library/bundles/64.db4e3db232312db40830.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[64],[]]); \ No newline at end of file diff --git a/public/charting_library/bundles/65.837b4c0cde707c4ed481.js b/public/charting_library/bundles/65.837b4c0cde707c4ed481.js new file mode 100644 index 00000000..58622463 --- /dev/null +++ b/public/charting_library/bundles/65.837b4c0cde707c4ed481.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[65],[]]); \ No newline at end of file diff --git a/public/charting_library/bundles/65.d88c92098707097e1846.css b/public/charting_library/bundles/65.d88c92098707097e1846.css new file mode 100644 index 00000000..17d50a25 --- /dev/null +++ b/public/charting_library/bundles/65.d88c92098707097e1846.css @@ -0,0 +1 @@ +.container-jKs34Xgq{display:flex;position:relative;align-items:center;flex-shrink:0;cursor:default;border-top:1px solid;border-bottom:1px solid;border-color:#e0e3eb}html.theme-dark .container-jKs34Xgq{border-color:#434651}.inputContainer-1KMWEbBN{width:100%;height:24px;padding:8px 16px 8px 47px}.inputContainer-1KMWEbBN.withCancel-2WUzxNv9{padding-right:70px}.input-2pz7DtzH{width:100%;height:100%;border:none;padding:0;margin:0;background-color:transparent;font-size:16px;color:#131722}html.theme-dark .input-2pz7DtzH{color:#a3a6af}.input-2pz7DtzH::placeholder{font-weight:400;color:#a3a6af}html.theme-dark .input-2pz7DtzH::placeholder{color:#434651}.icon-3SNZP2-_{position:absolute;left:20px;height:18px;top:calc(50% - 9px);pointer-events:none;color:#a3a6af}.cancel-CnoMjYid{position:absolute;right:20px;color:#787b86} \ No newline at end of file diff --git a/public/charting_library/bundles/65.d88c92098707097e1846.rtl.css b/public/charting_library/bundles/65.d88c92098707097e1846.rtl.css new file mode 100644 index 00000000..978681ba --- /dev/null +++ b/public/charting_library/bundles/65.d88c92098707097e1846.rtl.css @@ -0,0 +1 @@ +.container-jKs34Xgq{display:flex;position:relative;align-items:center;flex-shrink:0;cursor:default;border-top:1px solid;border-bottom:1px solid;border-color:#e0e3eb}html.theme-dark .container-jKs34Xgq{border-color:#434651}.inputContainer-1KMWEbBN{width:100%;height:24px;padding:8px 47px 8px 16px}.inputContainer-1KMWEbBN.withCancel-2WUzxNv9{padding-left:70px}.input-2pz7DtzH{width:100%;height:100%;border:none;padding:0;margin:0;background-color:transparent;font-size:16px;color:#131722}html.theme-dark .input-2pz7DtzH{color:#a3a6af}.input-2pz7DtzH::placeholder{font-weight:400;color:#a3a6af}html.theme-dark .input-2pz7DtzH::placeholder{color:#434651}.icon-3SNZP2-_{position:absolute;right:20px;height:18px;top:calc(50% - 9px);pointer-events:none;color:#a3a6af}.cancel-CnoMjYid{position:absolute;left:20px;color:#787b86} \ No newline at end of file diff --git a/public/charting_library/bundles/65b878304c17beb46ef1c52c9b7eb7c7.gif b/public/charting_library/bundles/65b878304c17beb46ef1c52c9b7eb7c7.gif new file mode 100644 index 00000000..8fccb166 Binary files /dev/null and b/public/charting_library/bundles/65b878304c17beb46ef1c52c9b7eb7c7.gif differ diff --git a/public/charting_library/bundles/66.6a1a05ff6258f0d9c0b5.js b/public/charting_library/bundles/66.6a1a05ff6258f0d9c0b5.js new file mode 100644 index 00000000..6f4b1b18 --- /dev/null +++ b/public/charting_library/bundles/66.6a1a05ff6258f0d9c0b5.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[66],[]]); \ No newline at end of file diff --git a/public/charting_library/bundles/66.c4290186596553eeb2d0.css b/public/charting_library/bundles/66.c4290186596553eeb2d0.css new file mode 100644 index 00000000..4795d3d5 --- /dev/null +++ b/public/charting_library/bundles/66.c4290186596553eeb2d0.css @@ -0,0 +1 @@ +.wrapper-1S1BAxTC{display:flex;flex:1 1 auto;overflow:hidden}.container-2mBp3oqG{display:flex;flex-direction:column;padding-top:6px;padding-bottom:6px;flex:1 1 auto;overflow-y:auto;overflow-x:hidden;min-height:145px;-webkit-overflow-scrolling:touch;width:200px;border-right:1px solid #e0e3eb;flex:none}html.theme-dark .container-2mBp3oqG{border-right:1px solid #434651}@media screen and (max-height:290px){.container-2mBp3oqG{min-height:auto}}.container-2mBp3oqG::-webkit-scrollbar{width:5px;height:5px}.container-2mBp3oqG::-webkit-scrollbar-thumb{border:1px solid;border-color:#f1f3f6;border-radius:3px;background-color:#9598a1}html.theme-dark .container-2mBp3oqG::-webkit-scrollbar-thumb{background-color:#363a45;border-color:#1e222d}.container-2mBp3oqG::-webkit-scrollbar-track{background-color:transparent;border-radius:3px}.container-2mBp3oqG::-webkit-scrollbar-corner{display:none}.tab-1EqAs-Lb{display:flex;padding:6px 0 6px 20px;align-items:center;color:#131722}html.theme-dark .tab-1EqAs-Lb{color:#b2b5be}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tab-1EqAs-Lb:hover{background-color:#f0f3fa}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tab-1EqAs-Lb:hover{background-color:#2a2e39}}.tab-1EqAs-Lb.active-3u5zV0YP{background-color:#2196f3}html.theme-dark .tab-1EqAs-Lb.active-3u5zV0YP{background-color:#1976d2}.tab-1EqAs-Lb.active-3u5zV0YP .icon-2RKetbyG,.tab-1EqAs-Lb.active-3u5zV0YP .title-1SrCEkqk{color:#fff}html.theme-dark .tab-1EqAs-Lb.active-3u5zV0YP .icon-2RKetbyG,html.theme-dark .tab-1EqAs-Lb.active-3u5zV0YP .title-1SrCEkqk{color:#d1d4dc}.icon-2RKetbyG{height:28px;width:28px}.title-1SrCEkqk{display:flex;min-width:0;margin-left:8px;font-size:14px;white-space:nowrap;cursor:default}.titleText-QNKMAlbN{flex:0 100%;min-width:0;text-overflow:ellipsis;overflow:hidden}.nested-H6CeL6Wc{display:flex;height:0;flex:1 1 auto;align-items:center;padding-right:8px;justify-content:flex-end;color:#787b86}.isTablet-2Pl3hVJ9.container-2mBp3oqG{width:48px}.isTablet-2Pl3hVJ9.tab-1EqAs-Lb{padding-left:0;justify-content:center}.isMobile-2OnSZ08h.container-2mBp3oqG{width:100%}.isMobile-2OnSZ08h.tab-1EqAs-Lb{padding:0 0 0 20px;justify-content:flex-start}.isMobile-2OnSZ08h.tab-1EqAs-Lb:last-child .title-1SrCEkqk{border-bottom-width:0}.isMobile-2OnSZ08h .title-1SrCEkqk{display:flex;flex:1 1 auto;align-items:center;padding-top:17px;padding-bottom:17px;font-size:18px;border-bottom:1px solid;border-bottom-color:#e0e3eb}html.theme-dark .isMobile-2OnSZ08h .title-1SrCEkqk{border-bottom-color:#434651} \ No newline at end of file diff --git a/public/charting_library/bundles/66.c4290186596553eeb2d0.rtl.css b/public/charting_library/bundles/66.c4290186596553eeb2d0.rtl.css new file mode 100644 index 00000000..6a745bbd --- /dev/null +++ b/public/charting_library/bundles/66.c4290186596553eeb2d0.rtl.css @@ -0,0 +1 @@ +.wrapper-1S1BAxTC{display:flex;flex:1 1 auto;overflow:hidden}.container-2mBp3oqG{display:flex;flex-direction:column;padding-top:6px;padding-bottom:6px;flex:1 1 auto;overflow-y:auto;overflow-x:hidden;min-height:145px;-webkit-overflow-scrolling:touch;width:200px;border-left:1px solid #e0e3eb;flex:none}html.theme-dark .container-2mBp3oqG{border-left:1px solid #434651}@media screen and (max-height:290px){.container-2mBp3oqG{min-height:auto}}.container-2mBp3oqG::-webkit-scrollbar{width:5px;height:5px}.container-2mBp3oqG::-webkit-scrollbar-thumb{border:1px solid;border-color:#f1f3f6;border-radius:3px;background-color:#9598a1}html.theme-dark .container-2mBp3oqG::-webkit-scrollbar-thumb{background-color:#363a45;border-color:#1e222d}.container-2mBp3oqG::-webkit-scrollbar-track{background-color:transparent;border-radius:3px}.container-2mBp3oqG::-webkit-scrollbar-corner{display:none}.tab-1EqAs-Lb{display:flex;padding:6px 20px 6px 0;align-items:center;color:#131722}html.theme-dark .tab-1EqAs-Lb{color:#b2b5be}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tab-1EqAs-Lb:hover{background-color:#f0f3fa}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tab-1EqAs-Lb:hover{background-color:#2a2e39}}.tab-1EqAs-Lb.active-3u5zV0YP{background-color:#2196f3}html.theme-dark .tab-1EqAs-Lb.active-3u5zV0YP{background-color:#1976d2}.tab-1EqAs-Lb.active-3u5zV0YP .icon-2RKetbyG,.tab-1EqAs-Lb.active-3u5zV0YP .title-1SrCEkqk{color:#fff}html.theme-dark .tab-1EqAs-Lb.active-3u5zV0YP .icon-2RKetbyG,html.theme-dark .tab-1EqAs-Lb.active-3u5zV0YP .title-1SrCEkqk{color:#d1d4dc}.icon-2RKetbyG{height:28px;width:28px}.title-1SrCEkqk{display:flex;min-width:0;margin-right:8px;font-size:14px;white-space:nowrap;cursor:default}.titleText-QNKMAlbN{flex:0 100%;min-width:0;text-overflow:ellipsis;overflow:hidden}.nested-H6CeL6Wc{display:flex;height:0;flex:1 1 auto;align-items:center;padding-left:8px;justify-content:flex-end;color:#787b86}.nested-H6CeL6Wc svg{transform:rotate(180deg)}.isTablet-2Pl3hVJ9.container-2mBp3oqG{width:48px}.isTablet-2Pl3hVJ9.tab-1EqAs-Lb{padding-right:0;justify-content:center}.isMobile-2OnSZ08h.container-2mBp3oqG{width:100%}.isMobile-2OnSZ08h.tab-1EqAs-Lb{padding:0 20px 0 0;justify-content:flex-start}.isMobile-2OnSZ08h.tab-1EqAs-Lb:last-child .title-1SrCEkqk{border-bottom-width:0}.isMobile-2OnSZ08h .title-1SrCEkqk{display:flex;flex:1 1 auto;align-items:center;padding-top:17px;padding-bottom:17px;font-size:18px;border-bottom:1px solid;border-bottom-color:#e0e3eb}html.theme-dark .isMobile-2OnSZ08h .title-1SrCEkqk{border-bottom-color:#434651} \ No newline at end of file diff --git a/public/charting_library/bundles/67.2cf5dadaebf6858d8623.js b/public/charting_library/bundles/67.2cf5dadaebf6858d8623.js new file mode 100644 index 00000000..0d91d2cc --- /dev/null +++ b/public/charting_library/bundles/67.2cf5dadaebf6858d8623.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[67],[]]); \ No newline at end of file diff --git a/public/charting_library/bundles/67.61a74b077527e7385641.css b/public/charting_library/bundles/67.61a74b077527e7385641.css new file mode 100644 index 00000000..053423a2 --- /dev/null +++ b/public/charting_library/bundles/67.61a74b077527e7385641.css @@ -0,0 +1 @@ +.item-184T8X5A{align-items:flex-start;white-space:normal;padding-right:20px;font-size:16px}.label-20cSBx98{overflow:visible;line-height:24px}.labelRow-2fmEJqjl{margin-top:2px;margin-bottom:2px}.toolbox-2H0D5bLi{margin-top:3px} \ No newline at end of file diff --git a/public/charting_library/bundles/67.61a74b077527e7385641.rtl.css b/public/charting_library/bundles/67.61a74b077527e7385641.rtl.css new file mode 100644 index 00000000..c2849ae6 --- /dev/null +++ b/public/charting_library/bundles/67.61a74b077527e7385641.rtl.css @@ -0,0 +1 @@ +.item-184T8X5A{align-items:flex-start;white-space:normal;padding-left:20px;font-size:16px}.label-20cSBx98{overflow:visible;line-height:24px}.labelRow-2fmEJqjl{margin-top:2px;margin-bottom:2px}.toolbox-2H0D5bLi{margin-top:3px} \ No newline at end of file diff --git a/public/charting_library/bundles/68.b36f4cddc110cd1477c0.js b/public/charting_library/bundles/68.b36f4cddc110cd1477c0.js new file mode 100644 index 00000000..3b683b4c --- /dev/null +++ b/public/charting_library/bundles/68.b36f4cddc110cd1477c0.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[68],[]]); \ No newline at end of file diff --git a/public/charting_library/bundles/68.f0d6d87e38e67f352f9e.css b/public/charting_library/bundles/68.f0d6d87e38e67f352f9e.css new file mode 100644 index 00000000..563ebe40 --- /dev/null +++ b/public/charting_library/bundles/68.f0d6d87e38e67f352f9e.css @@ -0,0 +1 @@ +.wrap-18oKCBRc{display:flex;align-items:center;flex:1 0 auto;flex-direction:row;height:100%}.button-1IIz2ju4.first-bfrNico9{margin-left:2px}.button-1IIz2ju4.last-3h-LFsOr{margin-right:2px}.button-1F3Go35E{padding:0 1px}.menu-16FRUKka:only-child{padding:0 5px}.button-YsN2vRuA.withText-JhQdRoPu{padding:0 10px 0 5px}.button-2-lC3gh4,.button-YsN2vRuA.withoutText-f6SoijeW{padding:0 5px}.spinnerWrap-EgWaITv6{position:relative;height:68px}.title-17mjZSJk{font-size:11px;line-height:16px;color:#787b86;letter-spacing:.4px;text-transform:uppercase;padding:0 12px;margin:6px 0}.dropdown-3caJUCGx{min-width:200px}.label-3vchy5zS{max-width:314px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.smallWidthTitle-2IQL6W7f{margin-bottom:8px;margin-top:2px;padding-left:20px;padding-right:20px}.smallWidthMenuItem-1ZGyfGnk{padding:6px 16px}.smallWidthWrapper-DpXp8jNn{padding-top:8px}.value-DWZXOdoK{text-align:left;font-size:14px}.value-DWZXOdoK.selected-2V87KUXm{color:#2196f3}html.theme-sa .value-DWZXOdoK.selected-2V87KUXm{color:#ff7200}html.theme-dark .value-DWZXOdoK.selected-2V87KUXm{color:#1976d2}.form-2itceCqS{display:flex;margin:-6px 0;flex-direction:row;align-items:center;width:100%;height:38px;min-width:200px;font-size:14px;color:#131722;box-sizing:border-box}html.theme-dark .form-2itceCqS{color:#b2b5be}.form-2itceCqS.interacting-3joY26dg .add-1NrfSAvb,.form-2itceCqS.interacting-3joY26dg .input-z46tLQgj,.form-2itceCqS.interacting-3joY26dg .menu-35lWsSKr{color:#131722}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.form-2itceCqS:hover .add-1NrfSAvb,.form-2itceCqS:hover .input-z46tLQgj,.form-2itceCqS:hover .menu-35lWsSKr{color:#131722}}html.theme-dark .form-2itceCqS.interacting-3joY26dg .add-1NrfSAvb,html.theme-dark .form-2itceCqS.interacting-3joY26dg .input-z46tLQgj,html.theme-dark .form-2itceCqS.interacting-3joY26dg .menu-35lWsSKr{color:#b2b5be}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .form-2itceCqS:hover .add-1NrfSAvb,html.theme-dark .form-2itceCqS:hover .input-z46tLQgj,html.theme-dark .form-2itceCqS:hover .menu-35lWsSKr{color:#b2b5be}}.form-2itceCqS.interacting-3joY26dg .add-1NrfSAvb.hovered-1nwOcWv8,.form-2itceCqS.interacting-3joY26dg .add-1NrfSAvb:active,.form-2itceCqS.interacting-3joY26dg .input-z46tLQgj.hovered-1nwOcWv8,.form-2itceCqS.interacting-3joY26dg .input-z46tLQgj:active,.form-2itceCqS.interacting-3joY26dg .menu-35lWsSKr.hovered-1nwOcWv8,.form-2itceCqS.interacting-3joY26dg .menu-35lWsSKr:active{color:#000}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.form-2itceCqS.interacting-3joY26dg .add-1NrfSAvb:hover,.form-2itceCqS.interacting-3joY26dg .input-z46tLQgj:hover,.form-2itceCqS.interacting-3joY26dg .menu-35lWsSKr:hover,.form-2itceCqS:hover .add-1NrfSAvb.hovered-1nwOcWv8,.form-2itceCqS:hover .add-1NrfSAvb:active,.form-2itceCqS:hover .add-1NrfSAvb:hover,.form-2itceCqS:hover .input-z46tLQgj.hovered-1nwOcWv8,.form-2itceCqS:hover .input-z46tLQgj:active,.form-2itceCqS:hover .input-z46tLQgj:hover,.form-2itceCqS:hover .menu-35lWsSKr.hovered-1nwOcWv8,.form-2itceCqS:hover .menu-35lWsSKr:active,.form-2itceCqS:hover .menu-35lWsSKr:hover{color:#000}}html.theme-dark .form-2itceCqS.interacting-3joY26dg .add-1NrfSAvb.hovered-1nwOcWv8,html.theme-dark .form-2itceCqS.interacting-3joY26dg .add-1NrfSAvb:active,html.theme-dark .form-2itceCqS.interacting-3joY26dg .input-z46tLQgj.hovered-1nwOcWv8,html.theme-dark .form-2itceCqS.interacting-3joY26dg .input-z46tLQgj:active,html.theme-dark .form-2itceCqS.interacting-3joY26dg .menu-35lWsSKr.hovered-1nwOcWv8,html.theme-dark .form-2itceCqS.interacting-3joY26dg .menu-35lWsSKr:active{color:#c1c4cd}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .form-2itceCqS.interacting-3joY26dg .add-1NrfSAvb:hover,html.theme-dark .form-2itceCqS.interacting-3joY26dg .input-z46tLQgj:hover,html.theme-dark .form-2itceCqS.interacting-3joY26dg .menu-35lWsSKr:hover,html.theme-dark .form-2itceCqS:hover .add-1NrfSAvb.hovered-1nwOcWv8,html.theme-dark .form-2itceCqS:hover .add-1NrfSAvb:active,html.theme-dark .form-2itceCqS:hover .add-1NrfSAvb:hover,html.theme-dark .form-2itceCqS:hover .input-z46tLQgj.hovered-1nwOcWv8,html.theme-dark .form-2itceCqS:hover .input-z46tLQgj:active,html.theme-dark .form-2itceCqS:hover .input-z46tLQgj:hover,html.theme-dark .form-2itceCqS:hover .menu-35lWsSKr.hovered-1nwOcWv8,html.theme-dark .form-2itceCqS:hover .menu-35lWsSKr:active,html.theme-dark .form-2itceCqS:hover .menu-35lWsSKr:hover{color:#c1c4cd}}.form-2itceCqS.interacting-3joY26dg .add-1NrfSAvb,.form-2itceCqS.interacting-3joY26dg .menu-35lWsSKr{position:relative;z-index:0}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.form-2itceCqS:hover .add-1NrfSAvb,.form-2itceCqS:hover .menu-35lWsSKr{position:relative;z-index:0}}.form-2itceCqS.interacting-3joY26dg .add-1NrfSAvb.hover-2JY1kj4n:before,.form-2itceCqS.interacting-3joY26dg .add-1NrfSAvb:active:before,.form-2itceCqS.interacting-3joY26dg .menu-35lWsSKr.hover-2JY1kj4n:before,.form-2itceCqS.interacting-3joY26dg .menu-35lWsSKr:active:before{content:"";display:block;position:absolute;z-index:-1;top:var(--tv-toolbar-explicit-hover-margin,2px);right:var(--tv-toolbar-explicit-hover-margin,2px);bottom:var(--tv-toolbar-explicit-hover-margin,2px);left:var(--tv-toolbar-explicit-hover-margin,2px);background-color:var(--tv-color-toolbar-button-background-hover,#f0f3fa);border-radius:var(--tv-toolbar-explicit-hover-border-radius,2px)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.form-2itceCqS.interacting-3joY26dg .add-1NrfSAvb:hover:before,.form-2itceCqS.interacting-3joY26dg .menu-35lWsSKr:hover:before,.form-2itceCqS:hover .add-1NrfSAvb.hover-2JY1kj4n:before,.form-2itceCqS:hover .add-1NrfSAvb:active:before,.form-2itceCqS:hover .add-1NrfSAvb:hover:before,.form-2itceCqS:hover .menu-35lWsSKr.hover-2JY1kj4n:before,.form-2itceCqS:hover .menu-35lWsSKr:active:before,.form-2itceCqS:hover .menu-35lWsSKr:hover:before{content:"";display:block;position:absolute;z-index:-1;top:var(--tv-toolbar-explicit-hover-margin,2px);right:var(--tv-toolbar-explicit-hover-margin,2px);bottom:var(--tv-toolbar-explicit-hover-margin,2px);left:var(--tv-toolbar-explicit-hover-margin,2px);background-color:var(--tv-color-toolbar-button-background-hover,#f0f3fa);border-radius:var(--tv-toolbar-explicit-hover-border-radius,2px)}}html.theme-dark .form-2itceCqS.interacting-3joY26dg .add-1NrfSAvb.hover-2JY1kj4n:before,html.theme-dark .form-2itceCqS.interacting-3joY26dg .add-1NrfSAvb:active:before,html.theme-dark .form-2itceCqS.interacting-3joY26dg .menu-35lWsSKr.hover-2JY1kj4n:before,html.theme-dark .form-2itceCqS.interacting-3joY26dg .menu-35lWsSKr:active:before{background-color:var(--tv-color-toolbar-button-background-hover,#2a2e39)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .form-2itceCqS.interacting-3joY26dg .add-1NrfSAvb:hover:before,html.theme-dark .form-2itceCqS.interacting-3joY26dg .menu-35lWsSKr:hover:before,html.theme-dark .form-2itceCqS:hover .add-1NrfSAvb.hover-2JY1kj4n:before,html.theme-dark .form-2itceCqS:hover .add-1NrfSAvb:active:before,html.theme-dark .form-2itceCqS:hover .add-1NrfSAvb:hover:before,html.theme-dark .form-2itceCqS:hover .menu-35lWsSKr.hover-2JY1kj4n:before,html.theme-dark .form-2itceCqS:hover .menu-35lWsSKr:active:before,html.theme-dark .form-2itceCqS:hover .menu-35lWsSKr:hover:before{background-color:var(--tv-color-toolbar-button-background-hover,#2a2e39)}}.wrap-1oB2WI2R{flex:1 0 auto}.input-z46tLQgj{margin:0;padding:0 2px;width:50px;border:none;text-align:center;height:100%;background-color:transparent}.add-1NrfSAvb,.menu-35lWsSKr{display:flex;align-items:center;height:100%}.menu-35lWsSKr{box-sizing:border-box;flex:1 0 auto;padding:0 6px 0 10px;cursor:default;justify-content:space-between;border-right:1px solid;border-left:1px solid;border-color:#e0e3eb}html.theme-dark .menu-35lWsSKr{border-color:#434651}.add-1NrfSAvb{padding:0 10px;cursor:default}.smallWidthMenuItem-276aFv5_{padding:6px 16px}.summary-3_6tmh1R{display:flex;flex:none;width:100%;min-width:0;align-items:center;padding:0 8px 0 12px;box-sizing:border-box;color:#787b86;line-height:16px;font-size:11px;letter-spacing:.4px;text-transform:uppercase}html.theme-dark .summary-3_6tmh1R{color:#787b86}.summary-3_6tmh1R.hovered-1yGmee-_,.summary-3_6tmh1R:active{background-color:#f0f3fa}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.summary-3_6tmh1R:hover{background-color:#f0f3fa}}html.theme-dark .summary-3_6tmh1R.hovered-1yGmee-_,html.theme-dark .summary-3_6tmh1R:active{background-color:#2a2e39}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .summary-3_6tmh1R:hover{background-color:#2a2e39}}.caret-1v4NzWzm{margin:2px 0 2px auto;width:18px;height:18px;justify-content:center}.button-1XkSWU32{padding:0 6px}.button-1XkSWU32.first-2UbSFGzF{margin-left:2px}.button-1XkSWU32.last-1rdUnwE6{margin-right:2px}.menu-1fA401bY:only-child{padding:0 10px}.dropdown-1zOBoqnG{min-width:140px}.menuContent-1vyIDg3J{justify-content:center}.section-1p7gLxC9{margin:-2px 0}.section-1p7gLxC9:first-child{margin-top:4px}.section-1p7gLxC9[data-open=true]{margin-bottom:4px}.smallTabletSectionTitle-37qvpInD{padding:10px 20px 8px;font-size:11px;line-height:16px;letter-spacing:.4px;text-transform:uppercase;color:#787b86;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.addCustomInterval-J84ksScT{margin-top:6px;padding:8px 20px;font-size:16px;line-height:24px;color:#131722}html.theme-dark .addCustomInterval-J84ksScT{color:#b2b5be}.addCustomInterval-J84ksScT.hovered-3E4iNJoh,.addCustomInterval-J84ksScT:active{color:#000}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.addCustomInterval-J84ksScT:hover{color:#000}}html.theme-dark .addCustomInterval-J84ksScT.hovered-3E4iNJoh,html.theme-dark .addCustomInterval-J84ksScT:active{color:#c1c4cd}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .addCustomInterval-J84ksScT:hover{color:#c1c4cd}}.addCustomInterval-J84ksScT.hovered-3E4iNJoh,.addCustomInterval-J84ksScT:active{background-color:#f0f3fa}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.addCustomInterval-J84ksScT:hover{background-color:#f0f3fa}}html.theme-dark .addCustomInterval-J84ksScT.hovered-3E4iNJoh,html.theme-dark .addCustomInterval-J84ksScT:active{background-color:#2a2e39}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .addCustomInterval-J84ksScT:hover{background-color:#2a2e39}}.button-3wAyKO3i{justify-content:center;width:37px}.check-3V48_rMp,.dottedCloud-1Vw3lVny,.spinningCloud-2fkbB-rw{display:none}.arrow-1zkKEROH{opacity:0;transition:transform .2s ease-in,opacity .2s ease-in}.arrowGap-gjAe6jEn{fill:#f0f3fa;opacity:0;transition:opacity .2s ease-in}html.theme-dark .arrowGap-gjAe6jEn{fill:#2a2e39}.container-riYIb01a{overflow:hidden}.container-riYIb01a.unsaved-2Kg_w3Vw .dottedCloud-1Vw3lVny{display:inline}.container-riYIb01a.unsaved-2Kg_w3Vw .arrow-1zkKEROH{transform:translateY(200%)}.container-riYIb01a.unsaved-2Kg_w3Vw.hovered-18DzoW0E .arrow-1zkKEROH{opacity:1;transform:translateY(0)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.container-riYIb01a.unsaved-2Kg_w3Vw:hover .arrow-1zkKEROH{opacity:1;transform:translateY(0)}}.container-riYIb01a.unsaved-2Kg_w3Vw.hovered-18DzoW0E .arrowGap-gjAe6jEn{opacity:1}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.container-riYIb01a.unsaved-2Kg_w3Vw:hover .arrowGap-gjAe6jEn{opacity:1}}.container-riYIb01a.saving-31YVVfHU .spinningCloud-2fkbB-rw{display:inline}.container-riYIb01a.saving-31YVVfHU .arrow-1zkKEROH{transform:translateY(-300%)}.container-riYIb01a.saved-2kLd4nmd .check-3V48_rMp,.container-riYIb01a.saved-2kLd4nmd .spinningCloud-2fkbB-rw{display:inline}.container-riYIb01a.saved-2kLd4nmd .arrow-1zkKEROH{display:inline;transform:translateY(-300%)}.container-riYIb01a.saved-2kLd4nmd .arrowGap-gjAe6jEn{display:inline}.wrapper-24zqYyK4{padding:10px 20px}.labelRow-1iPG3dcw{padding:0;line-height:20px}.label-2LqksoTK{font-size:16px}.labelHint-3H3QjpAE{line-height:17px}.labelOn-1_CJ0mp2+.labelHint-3H3QjpAE{margin-top:0}.opened-GQFVkrpV.hover-1s0KqpdE:before,.opened-GQFVkrpV:active:before,.opened-GQFVkrpV:before{content:"";display:block;position:absolute;z-index:-1;top:var(--tv-toolbar-opened-element-hover-margin-top,0);right:var(--tv-toolbar-opened-element-hover-margin-right,0);bottom:var(--tv-toolbar-opened-element-hover-margin-bottom,0);left:var(--tv-toolbar-opened-element-hover-margin-left,0);border-radius:var(--tv-toolbar-opened-element-hover-border-radius,0);background-color:var(--tv-color-toolbar-button-background-expanded,#f0f3fa)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.opened-GQFVkrpV:hover:before{content:"";display:block;position:absolute;z-index:-1;top:var(--tv-toolbar-opened-element-hover-margin-top,0);right:var(--tv-toolbar-opened-element-hover-margin-right,0);bottom:var(--tv-toolbar-opened-element-hover-margin-bottom,0);left:var(--tv-toolbar-opened-element-hover-margin-left,0);border-radius:var(--tv-toolbar-opened-element-hover-border-radius,0);background-color:var(--tv-color-toolbar-button-background-expanded,#f0f3fa)}}html.theme-dark .opened-GQFVkrpV.hover-1s0KqpdE:before,html.theme-dark .opened-GQFVkrpV:active:before,html.theme-dark .opened-GQFVkrpV:before{background-color:var(--tv-color-toolbar-button-background-expanded,#2a2e39)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .opened-GQFVkrpV:hover:before{background-color:var(--tv-color-toolbar-button-background-expanded,#2a2e39)}}.autoSaveWrapper-1MJY41zr,.sharingWrapper-2a3BKnuf{width:192px;min-width:calc(100% - 22px)}.button-X9fdkr3t.buttonSmallPadding-3OtdkF4f{padding-right:6px}.hintPlaceHolder-3xGrUHN7{height:128px}.smallHintPlaceHolder-3ftZG2PP{height:100%;width:100%}.popupItemRowTabletSmall-3IpexBN9:first-child{padding-left:12px;padding-right:0;margin-top:6px;margin-bottom:6px}.button-1EU5-JL7.isDisabled-1RjJSnJ7{opacity:1!important}.text-1HWeUAzA{max-width:100px;overflow:hidden;text-overflow:ellipsis}.wrap-CUt4Mg1V{flex:1 1 auto;height:100%;min-width:0}.wrap-CUt4Mg1V.withHover-12uXCBc3{position:relative;z-index:0}.wrap-CUt4Mg1V.withHover-12uXCBc3.hover-3dmVjFov:before,.wrap-CUt4Mg1V.withHover-12uXCBc3:active:before{content:"";display:block;position:absolute;z-index:-1;top:var(--tv-toolbar-explicit-hover-margin,2px);right:var(--tv-toolbar-explicit-hover-margin,2px);bottom:var(--tv-toolbar-explicit-hover-margin,2px);left:var(--tv-toolbar-explicit-hover-margin,2px);background-color:var(--tv-color-toolbar-button-background-hover,#f0f3fa);border-radius:var(--tv-toolbar-explicit-hover-border-radius,2px)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.wrap-CUt4Mg1V.withHover-12uXCBc3:hover:before{content:"";display:block;position:absolute;z-index:-1;top:var(--tv-toolbar-explicit-hover-margin,2px);right:var(--tv-toolbar-explicit-hover-margin,2px);bottom:var(--tv-toolbar-explicit-hover-margin,2px);left:var(--tv-toolbar-explicit-hover-margin,2px);background-color:var(--tv-color-toolbar-button-background-hover,#f0f3fa);border-radius:var(--tv-toolbar-explicit-hover-border-radius,2px)}}html.theme-dark .wrap-CUt4Mg1V.withHover-12uXCBc3.hover-3dmVjFov:before,html.theme-dark .wrap-CUt4Mg1V.withHover-12uXCBc3:active:before{background-color:var(--tv-color-toolbar-button-background-hover,#2a2e39)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .wrap-CUt4Mg1V.withHover-12uXCBc3:hover:before{background-color:var(--tv-color-toolbar-button-background-hover,#2a2e39)}}.inner-32OP7ejC{display:flex;position:relative;flex:1 1 auto;overflow:hidden;width:100px;height:100%}.actions-1cGPn1dW{display:flex;position:relative;flex-flow:row nowrap;align-items:center;opacity:0;padding:0 4px;background-color:var(--tv-color-pane-background,#fff)}html.theme-dark .actions-1cGPn1dW{background-color:var(--tv-color-pane-background,#131722)}.actions-1cGPn1dW:before{content:"";display:block;position:absolute;left:0;height:18px;width:1px;background-color:var(--tv-color-platform-background,#e0e3eb)}html.theme-dark .actions-1cGPn1dW:before{background-color:var(--tv-color-platform-background,#2a2e39)}.actions-1cGPn1dW button{display:flex;width:26px;height:26px;color:#4c525e;align-items:center;justify-content:center;margin-right:3px;padding:0;border:none;border-radius:50%;background-color:transparent;transition:color 60ms ease,background-color 60ms ease;color:var(--tv-color-toolbar-button-text,#131722)}html.theme-dark .actions-1cGPn1dW button{color:var(--tv-color-toolbar-button-text,#787b86)}.actions-1cGPn1dW button.hover-3dmVjFov,.actions-1cGPn1dW button:active{color:var(--tv-color-toolbar-button-text-hover,#000)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.actions-1cGPn1dW button:hover{color:var(--tv-color-toolbar-button-text-hover,#000)}}html.theme-dark .actions-1cGPn1dW button.hover-3dmVjFov,html.theme-dark .actions-1cGPn1dW button:active{color:var(--tv-color-toolbar-button-text-hover,#868993)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .actions-1cGPn1dW button:hover{color:var(--tv-color-toolbar-button-text-hover,#868993)}}.actions-1cGPn1dW button:last-child{margin-right:0}.actions-1cGPn1dW button:active{background-color:var(--tv-color-toolbar-button-background-hover,#f0f3fa)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.actions-1cGPn1dW button:hover{background-color:var(--tv-color-toolbar-button-background-hover,#f0f3fa)}}html.theme-dark .actions-1cGPn1dW button:active{background-color:var(--tv-color-toolbar-button-background-hover,#2a2e39)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .actions-1cGPn1dW button:hover{background-color:var(--tv-color-toolbar-button-background-hover,#2a2e39)}}.actions-1cGPn1dW button svg{display:block}.actions-1cGPn1dW button.disabled{background-color:transparent}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.actions-1cGPn1dW button.disabled:hover{background-color:transparent}}.actions-1cGPn1dW button.disabled svg{color:#d6d8e0}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.actions-1cGPn1dW button.disabled:hover svg{color:#d6d8e0}}.input-3lfOzLDc{display:block;flex:1 1 auto;padding:5px 12px;font-size:14px;font-weight:700;width:0;min-width:100px;height:100%;border:none;box-sizing:border-box;background-color:transparent;color:var(--tv-color-toolbar-button-text,#131722)}html.theme-dark .input-3lfOzLDc{color:var(--tv-color-toolbar-button-text,#787b86)}.input-3lfOzLDc.hover-3dmVjFov,.input-3lfOzLDc:active{color:var(--tv-color-toolbar-button-text-hover,#000)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.input-3lfOzLDc:hover{color:var(--tv-color-toolbar-button-text-hover,#000)}}html.theme-dark .input-3lfOzLDc.hover-3dmVjFov,html.theme-dark .input-3lfOzLDc:active{color:var(--tv-color-toolbar-button-text-hover,#868993)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .input-3lfOzLDc:hover{color:var(--tv-color-toolbar-button-text-hover,#868993)}}.input-3lfOzLDc.defaultCursor-3uzgANBW{cursor:default}.inner-32OP7ejC.isExpanded-1pdStI5Z{width:auto}.inner-32OP7ejC.isExpanded-1pdStI5Z .input-3lfOzLDc{min-width:70px}.inner-32OP7ejC.isExpanded-1pdStI5Z .actions-1cGPn1dW{opacity:1}.mobileButton-19PXAUYw{position:absolute;pointer-events:none;height:100%;width:100%}@media screen and (max-height:445px),screen and (max-width:602px){.mobileButton-19PXAUYw{pointer-events:auto}}.wrap-3OynVXTx{padding-left:4px}.titleWrap-yVINuOIC{display:flex;flex-direction:column}.indicators-CRJ2i71K{margin-left:33px;margin-right:12px}.title-Iod5hZQV{display:flex;flex-direction:row;align-items:center;white-space:nowrap;color:#131722}html.theme-dark .title-Iod5hZQV{color:#b2b5be}.title-Iod5hZQV .icon-3bTRbX0U{display:flex}.title-Iod5hZQV .icon-3bTRbX0U svg{display:block;fill:#131722}html.theme-dark .title-Iod5hZQV .icon-3bTRbX0U svg{fill:#b2b5be}.title-Iod5hZQV .text-2BJe_3ce{font-size:14px;margin:0 20px 0 5px}.titleTabletSmall-23pyY8Xw{padding-top:4px;padding-bottom:4px}.titleTabletSmall-23pyY8Xw .text-2BJe_3ce{font-size:16px}.labelRow-2Vs9IqnP{flex:1 0 100%;min-width:100%}.label-1LxfyrID{flex:0 0 100%;min-width:100%}.description-3yVDcIyu{color:#787b86;min-width:170px;max-width:280px;padding-bottom:4px;font-size:12px;line-height:18px;white-space:normal;word-wrap:break-word}.labelRow-1loM6nbt{display:block;width:calc(100% - 60px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.toolbox-3y2qhvbG{margin-left:auto}.description-UeULl1bt{padding:0}.descriptionTabletSmall-iXl7OFTS{padding-right:56px;max-width:100%}.item-GOMwFObW{margin-top:-3px;padding-top:0;padding-bottom:8px}.item-GOMwFObW:before{content:none}.item-GOMwFObW,.item-GOMwFObW:active,.titleItem-3OGNprLt,.titleItem-3OGNprLt:active,html.theme-dark .item-GOMwFObW,html.theme-dark .item-GOMwFObW:active,html.theme-dark .titleItem-3OGNprLt,html.theme-dark .titleItem-3OGNprLt:active{background-color:transparent}.itemTabletSmall-3fytMoGU:before,.titleItemTabletSmall-HWAlNL6k:before{content:none}.itemTabletSmall-3fytMoGU,.itemTabletSmall-3fytMoGU:active,.titleItemTabletSmall-HWAlNL6k,.titleItemTabletSmall-HWAlNL6k:active,html.theme-dark .itemTabletSmall-3fytMoGU,html.theme-dark .itemTabletSmall-3fytMoGU:active,html.theme-dark .titleItemTabletSmall-HWAlNL6k,html.theme-dark .titleItemTabletSmall-HWAlNL6k:active{background-color:transparent}.titleItemTabletSmall-HWAlNL6k{padding:4px 20px 0 16px;line-height:24px}.itemTabletSmall-3fytMoGU{padding:1px 20px 8px 16px;line-height:17px}.itemLabelTabletSmall-3VG7Qvey{font-size:16px}.wrap-3ulNVWio{color:#131722}html.theme-dark .wrap-3ulNVWio{color:#b2b5be}.wrap-3ulNVWio.hovered-tcAOA2o_,.wrap-3ulNVWio:active{color:#000}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.wrap-3ulNVWio:hover{color:#000}}html.theme-dark .wrap-3ulNVWio.hovered-tcAOA2o_,html.theme-dark .wrap-3ulNVWio:active{color:#c1c4cd}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .wrap-3ulNVWio:hover{color:#c1c4cd}}.wrap-3ulNVWio.hovered-tcAOA2o_,.wrap-3ulNVWio:active{background-color:#f0f3fa}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.wrap-3ulNVWio:hover{background-color:#f0f3fa}}html.theme-dark .wrap-3ulNVWio.hovered-tcAOA2o_,html.theme-dark .wrap-3ulNVWio:active{background-color:#2a2e39}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .wrap-3ulNVWio:hover{background-color:#2a2e39}}.item-b8AKccvl{display:flex;position:relative;flex:0 0 auto;align-items:center;cursor:default;padding:0 3px;height:100%;z-index:0;color:#131722}html.theme-dark .item-b8AKccvl{color:#787b86}.item-b8AKccvl:active{color:#000}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.item-b8AKccvl:hover{color:#000}}html.theme-dark .item-b8AKccvl:active{color:#868993}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .item-b8AKccvl:hover{color:#868993}}.item-b8AKccvl:active:before{content:"";display:block;position:absolute;border-radius:50%;background-color:#f0f3fa;margin:auto;top:0;left:0;right:0;bottom:0;width:28px;height:28px;z-index:-1}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.item-b8AKccvl:hover:before{content:"";display:block;position:absolute;border-radius:50%;background-color:#f0f3fa;margin:auto;top:0;left:0;right:0;bottom:0;width:28px;height:28px;z-index:-1}}html.theme-dark .item-b8AKccvl:active:before{background-color:#2a2e39}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .item-b8AKccvl:hover:before{background-color:#2a2e39}}.round-2UQxqNA1{display:flex;flex:0 0 auto;align-items:center;justify-content:center;border:1px solid;border-color:#d6d8e0;border-radius:50%;font-size:10px;text-align:center;cursor:default;height:20px;width:20px}html.theme-dark .round-2UQxqNA1{border-color:#6b7988}.wrap-15BhAobm.full-2VMT2UlC .first-1vAzGgSq{margin-left:0}.wrap-15BhAobm.full-2VMT2UlC .last-xMjAcadb{margin-right:7px}.wrap-15BhAobm.medium-1BEsHMFf .first-1vAzGgSq{margin-left:0}.wrap-15BhAobm.medium-1BEsHMFf .last-xMjAcadb{margin-right:7px}.loader-1uURoPBh{position:relative}.buttonWithFavorites-3S-vuMxR{padding-right:7px}.menu-pdQdEiwV{max-width:340px}.menuSmallTablet-tXzCU-3p{max-width:100%}.menuItemHeader-228dcYv3{margin:0;padding-top:4px;padding-bottom:3px}.menuItemHeaderTabletSmall-QIvgZc1i{padding:10px 20px 2px}.buttonUndo-342XpPC1{padding-right:0;padding-left:3px}.buttonRedo-3o_XdU_J{padding-left:0;padding-right:3px} \ No newline at end of file diff --git a/public/charting_library/bundles/68.f0d6d87e38e67f352f9e.rtl.css b/public/charting_library/bundles/68.f0d6d87e38e67f352f9e.rtl.css new file mode 100644 index 00000000..670ee213 --- /dev/null +++ b/public/charting_library/bundles/68.f0d6d87e38e67f352f9e.rtl.css @@ -0,0 +1 @@ +.wrap-18oKCBRc{display:flex;align-items:center;flex:1 0 auto;flex-direction:row;height:100%}.button-1IIz2ju4.first-bfrNico9{margin-right:2px}.button-1IIz2ju4.last-3h-LFsOr{margin-left:2px}.button-1F3Go35E{padding:0 1px}.menu-16FRUKka:only-child{padding:0 5px}.button-YsN2vRuA.withText-JhQdRoPu{padding:0 5px 0 10px}.button-2-lC3gh4,.button-YsN2vRuA.withoutText-f6SoijeW{padding:0 5px}.spinnerWrap-EgWaITv6{position:relative;height:68px}.title-17mjZSJk{font-size:11px;line-height:16px;color:#787b86;letter-spacing:.4px;text-transform:uppercase;padding:0 12px;margin:6px 0}.dropdown-3caJUCGx{min-width:200px}.label-3vchy5zS{max-width:314px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.smallWidthTitle-2IQL6W7f{margin-bottom:8px;margin-top:2px;padding-right:20px;padding-left:20px}.smallWidthMenuItem-1ZGyfGnk{padding:6px 16px}.smallWidthWrapper-DpXp8jNn{padding-top:8px}.value-DWZXOdoK{text-align:right;font-size:14px}.value-DWZXOdoK.selected-2V87KUXm{color:#2196f3}html.theme-sa .value-DWZXOdoK.selected-2V87KUXm{color:#ff7200}html.theme-dark .value-DWZXOdoK.selected-2V87KUXm{color:#1976d2}.form-2itceCqS{display:flex;margin:-6px 0;flex-direction:row;align-items:center;width:100%;height:38px;min-width:200px;font-size:14px;color:#131722;box-sizing:border-box}html.theme-dark .form-2itceCqS{color:#b2b5be}.form-2itceCqS.interacting-3joY26dg .add-1NrfSAvb,.form-2itceCqS.interacting-3joY26dg .input-z46tLQgj,.form-2itceCqS.interacting-3joY26dg .menu-35lWsSKr{color:#131722}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.form-2itceCqS:hover .add-1NrfSAvb,.form-2itceCqS:hover .input-z46tLQgj,.form-2itceCqS:hover .menu-35lWsSKr{color:#131722}}html.theme-dark .form-2itceCqS.interacting-3joY26dg .add-1NrfSAvb,html.theme-dark .form-2itceCqS.interacting-3joY26dg .input-z46tLQgj,html.theme-dark .form-2itceCqS.interacting-3joY26dg .menu-35lWsSKr{color:#b2b5be}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .form-2itceCqS:hover .add-1NrfSAvb,html.theme-dark .form-2itceCqS:hover .input-z46tLQgj,html.theme-dark .form-2itceCqS:hover .menu-35lWsSKr{color:#b2b5be}}.form-2itceCqS.interacting-3joY26dg .add-1NrfSAvb.hovered-1nwOcWv8,.form-2itceCqS.interacting-3joY26dg .add-1NrfSAvb:active,.form-2itceCqS.interacting-3joY26dg .input-z46tLQgj.hovered-1nwOcWv8,.form-2itceCqS.interacting-3joY26dg .input-z46tLQgj:active,.form-2itceCqS.interacting-3joY26dg .menu-35lWsSKr.hovered-1nwOcWv8,.form-2itceCqS.interacting-3joY26dg .menu-35lWsSKr:active{color:#000}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.form-2itceCqS.interacting-3joY26dg .add-1NrfSAvb:hover,.form-2itceCqS.interacting-3joY26dg .input-z46tLQgj:hover,.form-2itceCqS.interacting-3joY26dg .menu-35lWsSKr:hover,.form-2itceCqS:hover .add-1NrfSAvb.hovered-1nwOcWv8,.form-2itceCqS:hover .add-1NrfSAvb:active,.form-2itceCqS:hover .add-1NrfSAvb:hover,.form-2itceCqS:hover .input-z46tLQgj.hovered-1nwOcWv8,.form-2itceCqS:hover .input-z46tLQgj:active,.form-2itceCqS:hover .input-z46tLQgj:hover,.form-2itceCqS:hover .menu-35lWsSKr.hovered-1nwOcWv8,.form-2itceCqS:hover .menu-35lWsSKr:active,.form-2itceCqS:hover .menu-35lWsSKr:hover{color:#000}}html.theme-dark .form-2itceCqS.interacting-3joY26dg .add-1NrfSAvb.hovered-1nwOcWv8,html.theme-dark .form-2itceCqS.interacting-3joY26dg .add-1NrfSAvb:active,html.theme-dark .form-2itceCqS.interacting-3joY26dg .input-z46tLQgj.hovered-1nwOcWv8,html.theme-dark .form-2itceCqS.interacting-3joY26dg .input-z46tLQgj:active,html.theme-dark .form-2itceCqS.interacting-3joY26dg .menu-35lWsSKr.hovered-1nwOcWv8,html.theme-dark .form-2itceCqS.interacting-3joY26dg .menu-35lWsSKr:active{color:#c1c4cd}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .form-2itceCqS.interacting-3joY26dg .add-1NrfSAvb:hover,html.theme-dark .form-2itceCqS.interacting-3joY26dg .input-z46tLQgj:hover,html.theme-dark .form-2itceCqS.interacting-3joY26dg .menu-35lWsSKr:hover,html.theme-dark .form-2itceCqS:hover .add-1NrfSAvb.hovered-1nwOcWv8,html.theme-dark .form-2itceCqS:hover .add-1NrfSAvb:active,html.theme-dark .form-2itceCqS:hover .add-1NrfSAvb:hover,html.theme-dark .form-2itceCqS:hover .input-z46tLQgj.hovered-1nwOcWv8,html.theme-dark .form-2itceCqS:hover .input-z46tLQgj:active,html.theme-dark .form-2itceCqS:hover .input-z46tLQgj:hover,html.theme-dark .form-2itceCqS:hover .menu-35lWsSKr.hovered-1nwOcWv8,html.theme-dark .form-2itceCqS:hover .menu-35lWsSKr:active,html.theme-dark .form-2itceCqS:hover .menu-35lWsSKr:hover{color:#c1c4cd}}.form-2itceCqS.interacting-3joY26dg .add-1NrfSAvb,.form-2itceCqS.interacting-3joY26dg .menu-35lWsSKr{position:relative;z-index:0}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.form-2itceCqS:hover .add-1NrfSAvb,.form-2itceCqS:hover .menu-35lWsSKr{position:relative;z-index:0}}.form-2itceCqS.interacting-3joY26dg .add-1NrfSAvb.hover-2JY1kj4n:before,.form-2itceCqS.interacting-3joY26dg .add-1NrfSAvb:active:before,.form-2itceCqS.interacting-3joY26dg .menu-35lWsSKr.hover-2JY1kj4n:before,.form-2itceCqS.interacting-3joY26dg .menu-35lWsSKr:active:before{content:"";display:block;position:absolute;z-index:-1;top:var(--tv-toolbar-explicit-hover-margin,2px);left:var(--tv-toolbar-explicit-hover-margin,2px);bottom:var(--tv-toolbar-explicit-hover-margin,2px);right:var(--tv-toolbar-explicit-hover-margin,2px);background-color:var(--tv-color-toolbar-button-background-hover,#f0f3fa);border-radius:var(--tv-toolbar-explicit-hover-border-radius,2px)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.form-2itceCqS.interacting-3joY26dg .add-1NrfSAvb:hover:before,.form-2itceCqS.interacting-3joY26dg .menu-35lWsSKr:hover:before,.form-2itceCqS:hover .add-1NrfSAvb.hover-2JY1kj4n:before,.form-2itceCqS:hover .add-1NrfSAvb:active:before,.form-2itceCqS:hover .add-1NrfSAvb:hover:before,.form-2itceCqS:hover .menu-35lWsSKr.hover-2JY1kj4n:before,.form-2itceCqS:hover .menu-35lWsSKr:active:before,.form-2itceCqS:hover .menu-35lWsSKr:hover:before{content:"";display:block;position:absolute;z-index:-1;top:var(--tv-toolbar-explicit-hover-margin,2px);left:var(--tv-toolbar-explicit-hover-margin,2px);bottom:var(--tv-toolbar-explicit-hover-margin,2px);right:var(--tv-toolbar-explicit-hover-margin,2px);background-color:var(--tv-color-toolbar-button-background-hover,#f0f3fa);border-radius:var(--tv-toolbar-explicit-hover-border-radius,2px)}}html.theme-dark .form-2itceCqS.interacting-3joY26dg .add-1NrfSAvb.hover-2JY1kj4n:before,html.theme-dark .form-2itceCqS.interacting-3joY26dg .add-1NrfSAvb:active:before,html.theme-dark .form-2itceCqS.interacting-3joY26dg .menu-35lWsSKr.hover-2JY1kj4n:before,html.theme-dark .form-2itceCqS.interacting-3joY26dg .menu-35lWsSKr:active:before{background-color:var(--tv-color-toolbar-button-background-hover,#2a2e39)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .form-2itceCqS.interacting-3joY26dg .add-1NrfSAvb:hover:before,html.theme-dark .form-2itceCqS.interacting-3joY26dg .menu-35lWsSKr:hover:before,html.theme-dark .form-2itceCqS:hover .add-1NrfSAvb.hover-2JY1kj4n:before,html.theme-dark .form-2itceCqS:hover .add-1NrfSAvb:active:before,html.theme-dark .form-2itceCqS:hover .add-1NrfSAvb:hover:before,html.theme-dark .form-2itceCqS:hover .menu-35lWsSKr.hover-2JY1kj4n:before,html.theme-dark .form-2itceCqS:hover .menu-35lWsSKr:active:before,html.theme-dark .form-2itceCqS:hover .menu-35lWsSKr:hover:before{background-color:var(--tv-color-toolbar-button-background-hover,#2a2e39)}}.wrap-1oB2WI2R{flex:1 0 auto}.input-z46tLQgj{margin:0;padding:0 2px;width:50px;border:none;text-align:center;height:100%;background-color:transparent}.add-1NrfSAvb,.menu-35lWsSKr{display:flex;align-items:center;height:100%}.menu-35lWsSKr{box-sizing:border-box;flex:1 0 auto;padding:0 10px 0 6px;cursor:default;justify-content:space-between;border-left:1px solid;border-right:1px solid;border-color:#e0e3eb}html.theme-dark .menu-35lWsSKr{border-color:#434651}.add-1NrfSAvb{padding:0 10px;cursor:default}.smallWidthMenuItem-276aFv5_{padding:6px 16px}.summary-3_6tmh1R{display:flex;flex:none;width:100%;min-width:0;align-items:center;padding:0 12px 0 8px;box-sizing:border-box;color:#787b86;line-height:16px;font-size:11px;letter-spacing:.4px;text-transform:uppercase}html.theme-dark .summary-3_6tmh1R{color:#787b86}.summary-3_6tmh1R.hovered-1yGmee-_,.summary-3_6tmh1R:active{background-color:#f0f3fa}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.summary-3_6tmh1R:hover{background-color:#f0f3fa}}html.theme-dark .summary-3_6tmh1R.hovered-1yGmee-_,html.theme-dark .summary-3_6tmh1R:active{background-color:#2a2e39}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .summary-3_6tmh1R:hover{background-color:#2a2e39}}.caret-1v4NzWzm{margin:2px auto 2px 0;width:18px;height:18px;justify-content:center}.button-1XkSWU32{padding:0 6px}.button-1XkSWU32.first-2UbSFGzF{margin-right:2px}.button-1XkSWU32.last-1rdUnwE6{margin-left:2px}.menu-1fA401bY:only-child{padding:0 10px}.dropdown-1zOBoqnG{min-width:140px}.menuContent-1vyIDg3J{justify-content:center}.section-1p7gLxC9{margin:-2px 0}.section-1p7gLxC9:first-child{margin-top:4px}.section-1p7gLxC9[data-open=true]{margin-bottom:4px}.smallTabletSectionTitle-37qvpInD{padding:10px 20px 8px;font-size:11px;line-height:16px;letter-spacing:.4px;text-transform:uppercase;color:#787b86;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.addCustomInterval-J84ksScT{margin-top:6px;padding:8px 20px;font-size:16px;line-height:24px;color:#131722}html.theme-dark .addCustomInterval-J84ksScT{color:#b2b5be}.addCustomInterval-J84ksScT.hovered-3E4iNJoh,.addCustomInterval-J84ksScT:active{color:#000}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.addCustomInterval-J84ksScT:hover{color:#000}}html.theme-dark .addCustomInterval-J84ksScT.hovered-3E4iNJoh,html.theme-dark .addCustomInterval-J84ksScT:active{color:#c1c4cd}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .addCustomInterval-J84ksScT:hover{color:#c1c4cd}}.addCustomInterval-J84ksScT.hovered-3E4iNJoh,.addCustomInterval-J84ksScT:active{background-color:#f0f3fa}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.addCustomInterval-J84ksScT:hover{background-color:#f0f3fa}}html.theme-dark .addCustomInterval-J84ksScT.hovered-3E4iNJoh,html.theme-dark .addCustomInterval-J84ksScT:active{background-color:#2a2e39}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .addCustomInterval-J84ksScT:hover{background-color:#2a2e39}}.button-3wAyKO3i{justify-content:center;width:37px}.check-3V48_rMp,.dottedCloud-1Vw3lVny,.spinningCloud-2fkbB-rw{display:none}.arrow-1zkKEROH{opacity:0;transition:transform .2s ease-in,opacity .2s ease-in}.arrowGap-gjAe6jEn{fill:#f0f3fa;opacity:0;transition:opacity .2s ease-in}html.theme-dark .arrowGap-gjAe6jEn{fill:#2a2e39}.container-riYIb01a{overflow:hidden}.container-riYIb01a.unsaved-2Kg_w3Vw .dottedCloud-1Vw3lVny{display:inline}.container-riYIb01a.unsaved-2Kg_w3Vw .arrow-1zkKEROH{transform:translateY(200%)}.container-riYIb01a.unsaved-2Kg_w3Vw.hovered-18DzoW0E .arrow-1zkKEROH{opacity:1;transform:translateY(0)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.container-riYIb01a.unsaved-2Kg_w3Vw:hover .arrow-1zkKEROH{opacity:1;transform:translateY(0)}}.container-riYIb01a.unsaved-2Kg_w3Vw.hovered-18DzoW0E .arrowGap-gjAe6jEn{opacity:1}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.container-riYIb01a.unsaved-2Kg_w3Vw:hover .arrowGap-gjAe6jEn{opacity:1}}.container-riYIb01a.saving-31YVVfHU .spinningCloud-2fkbB-rw{display:inline}.container-riYIb01a.saving-31YVVfHU .arrow-1zkKEROH{transform:translateY(-300%)}.container-riYIb01a.saved-2kLd4nmd .check-3V48_rMp,.container-riYIb01a.saved-2kLd4nmd .spinningCloud-2fkbB-rw{display:inline}.container-riYIb01a.saved-2kLd4nmd .arrow-1zkKEROH{display:inline;transform:translateY(-300%)}.container-riYIb01a.saved-2kLd4nmd .arrowGap-gjAe6jEn{display:inline}.wrapper-24zqYyK4{padding:10px 20px}.labelRow-1iPG3dcw{padding:0;line-height:20px}.label-2LqksoTK{font-size:16px}.labelHint-3H3QjpAE{line-height:17px}.labelOn-1_CJ0mp2+.labelHint-3H3QjpAE{margin-top:0}.opened-GQFVkrpV.hover-1s0KqpdE:before,.opened-GQFVkrpV:active:before,.opened-GQFVkrpV:before{content:"";display:block;position:absolute;z-index:-1;top:var(--tv-toolbar-opened-element-hover-margin-top,0);left:var(--tv-toolbar-opened-element-hover-margin-right,0);bottom:var(--tv-toolbar-opened-element-hover-margin-bottom,0);right:var(--tv-toolbar-opened-element-hover-margin-left,0);border-radius:var(--tv-toolbar-opened-element-hover-border-radius,0);background-color:var(--tv-color-toolbar-button-background-expanded,#f0f3fa)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.opened-GQFVkrpV:hover:before{content:"";display:block;position:absolute;z-index:-1;top:var(--tv-toolbar-opened-element-hover-margin-top,0);left:var(--tv-toolbar-opened-element-hover-margin-right,0);bottom:var(--tv-toolbar-opened-element-hover-margin-bottom,0);right:var(--tv-toolbar-opened-element-hover-margin-left,0);border-radius:var(--tv-toolbar-opened-element-hover-border-radius,0);background-color:var(--tv-color-toolbar-button-background-expanded,#f0f3fa)}}html.theme-dark .opened-GQFVkrpV.hover-1s0KqpdE:before,html.theme-dark .opened-GQFVkrpV:active:before,html.theme-dark .opened-GQFVkrpV:before{background-color:var(--tv-color-toolbar-button-background-expanded,#2a2e39)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .opened-GQFVkrpV:hover:before{background-color:var(--tv-color-toolbar-button-background-expanded,#2a2e39)}}.autoSaveWrapper-1MJY41zr,.sharingWrapper-2a3BKnuf{width:192px;min-width:calc(100% - 22px)}.button-X9fdkr3t.buttonSmallPadding-3OtdkF4f{padding-left:6px}.hintPlaceHolder-3xGrUHN7{height:128px}.smallHintPlaceHolder-3ftZG2PP{height:100%;width:100%}.popupItemRowTabletSmall-3IpexBN9:first-child{padding-right:12px;padding-left:0;margin-top:6px;margin-bottom:6px}.button-1EU5-JL7.isDisabled-1RjJSnJ7{opacity:1!important}.text-1HWeUAzA{max-width:100px;overflow:hidden;text-overflow:ellipsis}.wrap-CUt4Mg1V{flex:1 1 auto;height:100%;min-width:0}.wrap-CUt4Mg1V.withHover-12uXCBc3{position:relative;z-index:0}.wrap-CUt4Mg1V.withHover-12uXCBc3.hover-3dmVjFov:before,.wrap-CUt4Mg1V.withHover-12uXCBc3:active:before{content:"";display:block;position:absolute;z-index:-1;top:var(--tv-toolbar-explicit-hover-margin,2px);left:var(--tv-toolbar-explicit-hover-margin,2px);bottom:var(--tv-toolbar-explicit-hover-margin,2px);right:var(--tv-toolbar-explicit-hover-margin,2px);background-color:var(--tv-color-toolbar-button-background-hover,#f0f3fa);border-radius:var(--tv-toolbar-explicit-hover-border-radius,2px)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.wrap-CUt4Mg1V.withHover-12uXCBc3:hover:before{content:"";display:block;position:absolute;z-index:-1;top:var(--tv-toolbar-explicit-hover-margin,2px);left:var(--tv-toolbar-explicit-hover-margin,2px);bottom:var(--tv-toolbar-explicit-hover-margin,2px);right:var(--tv-toolbar-explicit-hover-margin,2px);background-color:var(--tv-color-toolbar-button-background-hover,#f0f3fa);border-radius:var(--tv-toolbar-explicit-hover-border-radius,2px)}}html.theme-dark .wrap-CUt4Mg1V.withHover-12uXCBc3.hover-3dmVjFov:before,html.theme-dark .wrap-CUt4Mg1V.withHover-12uXCBc3:active:before{background-color:var(--tv-color-toolbar-button-background-hover,#2a2e39)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .wrap-CUt4Mg1V.withHover-12uXCBc3:hover:before{background-color:var(--tv-color-toolbar-button-background-hover,#2a2e39)}}.inner-32OP7ejC{display:flex;position:relative;flex:1 1 auto;overflow:hidden;width:100px;height:100%}.actions-1cGPn1dW{display:flex;position:relative;flex-flow:row nowrap;align-items:center;opacity:0;padding:0 4px;background-color:var(--tv-color-pane-background,#fff)}html.theme-dark .actions-1cGPn1dW{background-color:var(--tv-color-pane-background,#131722)}.actions-1cGPn1dW:before{content:"";display:block;position:absolute;right:0;height:18px;width:1px;background-color:var(--tv-color-platform-background,#e0e3eb)}html.theme-dark .actions-1cGPn1dW:before{background-color:var(--tv-color-platform-background,#2a2e39)}.actions-1cGPn1dW button{display:flex;width:26px;height:26px;color:#4c525e;align-items:center;justify-content:center;margin-left:3px;padding:0;border:none;border-radius:50%;background-color:transparent;transition:color 60ms ease,background-color 60ms ease;color:var(--tv-color-toolbar-button-text,#131722)}html.theme-dark .actions-1cGPn1dW button{color:var(--tv-color-toolbar-button-text,#787b86)}.actions-1cGPn1dW button.hover-3dmVjFov,.actions-1cGPn1dW button:active{color:var(--tv-color-toolbar-button-text-hover,#000)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.actions-1cGPn1dW button:hover{color:var(--tv-color-toolbar-button-text-hover,#000)}}html.theme-dark .actions-1cGPn1dW button.hover-3dmVjFov,html.theme-dark .actions-1cGPn1dW button:active{color:var(--tv-color-toolbar-button-text-hover,#868993)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .actions-1cGPn1dW button:hover{color:var(--tv-color-toolbar-button-text-hover,#868993)}}.actions-1cGPn1dW button:last-child{margin-left:0}.actions-1cGPn1dW button:active{background-color:var(--tv-color-toolbar-button-background-hover,#f0f3fa)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.actions-1cGPn1dW button:hover{background-color:var(--tv-color-toolbar-button-background-hover,#f0f3fa)}}html.theme-dark .actions-1cGPn1dW button:active{background-color:var(--tv-color-toolbar-button-background-hover,#2a2e39)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .actions-1cGPn1dW button:hover{background-color:var(--tv-color-toolbar-button-background-hover,#2a2e39)}}.actions-1cGPn1dW button svg{display:block}.actions-1cGPn1dW button.disabled{background-color:transparent}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.actions-1cGPn1dW button.disabled:hover{background-color:transparent}}.actions-1cGPn1dW button.disabled svg{color:#d6d8e0}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.actions-1cGPn1dW button.disabled:hover svg{color:#d6d8e0}}.input-3lfOzLDc{display:block;flex:1 1 auto;padding:5px 12px;font-size:14px;font-weight:700;width:0;min-width:100px;height:100%;border:none;box-sizing:border-box;background-color:transparent;direction:ltr;text-align:right;color:var(--tv-color-toolbar-button-text,#131722)}html.theme-dark .input-3lfOzLDc{color:var(--tv-color-toolbar-button-text,#787b86)}.input-3lfOzLDc.hover-3dmVjFov,.input-3lfOzLDc:active{color:var(--tv-color-toolbar-button-text-hover,#000)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.input-3lfOzLDc:hover{color:var(--tv-color-toolbar-button-text-hover,#000)}}html.theme-dark .input-3lfOzLDc.hover-3dmVjFov,html.theme-dark .input-3lfOzLDc:active{color:var(--tv-color-toolbar-button-text-hover,#868993)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .input-3lfOzLDc:hover{color:var(--tv-color-toolbar-button-text-hover,#868993)}}.input-3lfOzLDc.defaultCursor-3uzgANBW{cursor:default}.inner-32OP7ejC.isExpanded-1pdStI5Z{width:auto}.inner-32OP7ejC.isExpanded-1pdStI5Z .input-3lfOzLDc{min-width:70px}.inner-32OP7ejC.isExpanded-1pdStI5Z .actions-1cGPn1dW{opacity:1}.mobileButton-19PXAUYw{position:absolute;pointer-events:none;height:100%;width:100%}@media screen and (max-height:445px),screen and (max-width:602px){.mobileButton-19PXAUYw{pointer-events:auto}}.wrap-3OynVXTx{padding-right:4px}.titleWrap-yVINuOIC{display:flex;flex-direction:column}.indicators-CRJ2i71K{margin-right:33px;margin-left:12px}.title-Iod5hZQV{display:flex;flex-direction:row;align-items:center;white-space:nowrap;color:#131722}html.theme-dark .title-Iod5hZQV{color:#b2b5be}.title-Iod5hZQV .icon-3bTRbX0U{display:flex}.title-Iod5hZQV .icon-3bTRbX0U svg{display:block;fill:#131722}html.theme-dark .title-Iod5hZQV .icon-3bTRbX0U svg{fill:#b2b5be}.title-Iod5hZQV .text-2BJe_3ce{font-size:14px;margin:0 5px 0 20px}.titleTabletSmall-23pyY8Xw{padding-top:4px;padding-bottom:4px}.titleTabletSmall-23pyY8Xw .text-2BJe_3ce{font-size:16px}.labelRow-2Vs9IqnP{flex:1 0 100%;min-width:100%}.label-1LxfyrID{flex:0 0 100%;min-width:100%}.description-3yVDcIyu{color:#787b86;min-width:170px;max-width:280px;padding-bottom:4px;font-size:12px;line-height:18px;white-space:normal;word-wrap:break-word}.labelRow-1loM6nbt{display:block;width:calc(100% - 60px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.toolbox-3y2qhvbG{margin-right:auto}.description-UeULl1bt{padding:0}.descriptionTabletSmall-iXl7OFTS{padding-left:56px;max-width:100%}.item-GOMwFObW{margin-top:-3px;padding-top:0;padding-bottom:8px}.item-GOMwFObW:before{content:none}.item-GOMwFObW,.item-GOMwFObW:active,.titleItem-3OGNprLt,.titleItem-3OGNprLt:active,html.theme-dark .item-GOMwFObW,html.theme-dark .item-GOMwFObW:active,html.theme-dark .titleItem-3OGNprLt,html.theme-dark .titleItem-3OGNprLt:active{background-color:transparent}.itemTabletSmall-3fytMoGU:before,.titleItemTabletSmall-HWAlNL6k:before{content:none}.itemTabletSmall-3fytMoGU,.itemTabletSmall-3fytMoGU:active,.titleItemTabletSmall-HWAlNL6k,.titleItemTabletSmall-HWAlNL6k:active,html.theme-dark .itemTabletSmall-3fytMoGU,html.theme-dark .itemTabletSmall-3fytMoGU:active,html.theme-dark .titleItemTabletSmall-HWAlNL6k,html.theme-dark .titleItemTabletSmall-HWAlNL6k:active{background-color:transparent}.titleItemTabletSmall-HWAlNL6k{padding:4px 16px 0 20px;line-height:24px}.itemTabletSmall-3fytMoGU{padding:1px 16px 8px 20px;line-height:17px}.itemLabelTabletSmall-3VG7Qvey{font-size:16px}.wrap-3ulNVWio{color:#131722}html.theme-dark .wrap-3ulNVWio{color:#b2b5be}.wrap-3ulNVWio.hovered-tcAOA2o_,.wrap-3ulNVWio:active{color:#000}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.wrap-3ulNVWio:hover{color:#000}}html.theme-dark .wrap-3ulNVWio.hovered-tcAOA2o_,html.theme-dark .wrap-3ulNVWio:active{color:#c1c4cd}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .wrap-3ulNVWio:hover{color:#c1c4cd}}.wrap-3ulNVWio.hovered-tcAOA2o_,.wrap-3ulNVWio:active{background-color:#f0f3fa}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.wrap-3ulNVWio:hover{background-color:#f0f3fa}}html.theme-dark .wrap-3ulNVWio.hovered-tcAOA2o_,html.theme-dark .wrap-3ulNVWio:active{background-color:#2a2e39}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .wrap-3ulNVWio:hover{background-color:#2a2e39}}.item-b8AKccvl{display:flex;position:relative;flex:0 0 auto;align-items:center;cursor:default;padding:0 3px;height:100%;z-index:0;color:#131722}html.theme-dark .item-b8AKccvl{color:#787b86}.item-b8AKccvl:active{color:#000}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.item-b8AKccvl:hover{color:#000}}html.theme-dark .item-b8AKccvl:active{color:#868993}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .item-b8AKccvl:hover{color:#868993}}.item-b8AKccvl:active:before{content:"";display:block;position:absolute;border-radius:50%;background-color:#f0f3fa;margin:auto;top:0;right:0;left:0;bottom:0;width:28px;height:28px;z-index:-1}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.item-b8AKccvl:hover:before{content:"";display:block;position:absolute;border-radius:50%;background-color:#f0f3fa;margin:auto;top:0;right:0;left:0;bottom:0;width:28px;height:28px;z-index:-1}}html.theme-dark .item-b8AKccvl:active:before{background-color:#2a2e39}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .item-b8AKccvl:hover:before{background-color:#2a2e39}}.round-2UQxqNA1{display:flex;flex:0 0 auto;align-items:center;justify-content:center;border:1px solid;border-color:#d6d8e0;border-radius:50%;font-size:10px;text-align:center;cursor:default;height:20px;width:20px}html.theme-dark .round-2UQxqNA1{border-color:#6b7988}.wrap-15BhAobm.full-2VMT2UlC .first-1vAzGgSq{margin-right:0}.wrap-15BhAobm.full-2VMT2UlC .last-xMjAcadb{margin-left:7px}.wrap-15BhAobm.medium-1BEsHMFf .first-1vAzGgSq{margin-right:0}.wrap-15BhAobm.medium-1BEsHMFf .last-xMjAcadb{margin-left:7px}.loader-1uURoPBh{position:relative}.buttonWithFavorites-3S-vuMxR{padding-left:7px}.menu-pdQdEiwV{max-width:340px}.menuSmallTablet-tXzCU-3p{max-width:100%}.menuItemHeader-228dcYv3{margin:0;padding-top:4px;padding-bottom:3px}.menuItemHeaderTabletSmall-QIvgZc1i{padding:10px 20px 2px}.buttonUndo-342XpPC1{padding-left:0;padding-right:3px}.buttonRedo-3o_XdU_J{padding-right:0;padding-left:3px} \ No newline at end of file diff --git a/public/charting_library/bundles/683e7a8e04465dc3fac39ed37f0789b8.png b/public/charting_library/bundles/683e7a8e04465dc3fac39ed37f0789b8.png new file mode 100644 index 00000000..9a01791c Binary files /dev/null and b/public/charting_library/bundles/683e7a8e04465dc3fac39ed37f0789b8.png differ diff --git a/public/charting_library/bundles/69.7d3206a8fc66bf9d894d.js b/public/charting_library/bundles/69.7d3206a8fc66bf9d894d.js new file mode 100644 index 00000000..5f2d19d9 --- /dev/null +++ b/public/charting_library/bundles/69.7d3206a8fc66bf9d894d.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[69],[]]); \ No newline at end of file diff --git a/public/charting_library/bundles/69.ed35d12e9213121440b4.css b/public/charting_library/bundles/69.ed35d12e9213121440b4.css new file mode 100644 index 00000000..6fd25e7d --- /dev/null +++ b/public/charting_library/bundles/69.ed35d12e9213121440b4.css @@ -0,0 +1 @@ +.button-1VVj8kLG{margin-left:4px;padding:0 6px 0 12px}.separator-2I6DZkMH{margin:6px 0}.item-3cgIlGYO{display:flex;align-items:center;padding:0 7px;height:100%;font-size:14px;color:var(--tv-color-toolbar-button-text,#131722);position:relative;z-index:0}html.theme-dark .item-3cgIlGYO{color:var(--tv-color-toolbar-button-text,#787b86)}.item-3cgIlGYO.hover-2y46_KNk,.item-3cgIlGYO:active{color:var(--tv-color-toolbar-button-text-hover,#000)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.item-3cgIlGYO:hover{color:var(--tv-color-toolbar-button-text-hover,#000)}}html.theme-dark .item-3cgIlGYO.hover-2y46_KNk,html.theme-dark .item-3cgIlGYO:active{color:var(--tv-color-toolbar-button-text-hover,#868993)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .item-3cgIlGYO:hover{color:var(--tv-color-toolbar-button-text-hover,#868993)}}.item-3cgIlGYO.hover-2y46_KNk:before,.item-3cgIlGYO:active:before{content:"";display:block;position:absolute;z-index:-1;top:var(--tv-toolbar-explicit-hover-margin,2px);right:var(--tv-toolbar-explicit-hover-margin,2px);bottom:var(--tv-toolbar-explicit-hover-margin,2px);left:var(--tv-toolbar-explicit-hover-margin,2px);background-color:var(--tv-color-toolbar-button-background-hover,#f0f3fa);border-radius:var(--tv-toolbar-explicit-hover-border-radius,2px);right:0;left:0}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.item-3cgIlGYO:hover:before{content:"";display:block;position:absolute;z-index:-1;top:var(--tv-toolbar-explicit-hover-margin,2px);right:var(--tv-toolbar-explicit-hover-margin,2px);bottom:var(--tv-toolbar-explicit-hover-margin,2px);left:var(--tv-toolbar-explicit-hover-margin,2px);background-color:var(--tv-color-toolbar-button-background-hover,#f0f3fa);border-radius:var(--tv-toolbar-explicit-hover-border-radius,2px);right:0;left:0}}html.theme-dark .item-3cgIlGYO.hover-2y46_KNk:before,html.theme-dark .item-3cgIlGYO:active:before{background-color:var(--tv-color-toolbar-button-background-hover,#2a2e39)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .item-3cgIlGYO:hover:before{background-color:var(--tv-color-toolbar-button-background-hover,#2a2e39)}}.item-3cgIlGYO.isActive-2M6dwA7-{color:var(--tv-color-toolbar-button-text-active,#2196f3)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.item-3cgIlGYO.isActive-2M6dwA7-:hover{color:var(--tv-color-toolbar-button-text-active,#2196f3)}}html.theme-sa .item-3cgIlGYO.isActive-2M6dwA7-{color:var(--tv-color-toolbar-button-text-active,#ff7200)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-sa .item-3cgIlGYO.isActive-2M6dwA7-:hover{color:var(--tv-color-toolbar-button-text-active,#ff7200)}}html.theme-dark .item-3cgIlGYO.isActive-2M6dwA7-{color:var(--tv-color-toolbar-button-text-active,#1976d2)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .item-3cgIlGYO.isActive-2M6dwA7-:hover{color:var(--tv-color-toolbar-button-text-active,#1976d2)}}.item-3cgIlGYO.isFirst-2kfAV5tf{margin-left:9px}.item-3cgIlGYO.isLast-voJ1bqZh{margin-right:9px}.slider-1ealLtjI{height:2px;bottom:15%;transition-duration:175ms;transition-property:transform,opacity}.slider-1ealLtjI,html.theme-dark .slider-1ealLtjI{background-color:transparent}.slider-1ealLtjI .inner-3lmAEIjy{background-color:var(--tv-color-toolbar-button-text-active,#2196f3);margin:0 8px;height:100%}html.theme-sa .slider-1ealLtjI .inner-3lmAEIjy{background-color:var(--tv-color-toolbar-button-text-active,#ff7200)}html.theme-dark .slider-1ealLtjI .inner-3lmAEIjy{background-color:var(--tv-color-toolbar-button-text-active,#1976d2)}.sliderRow-Tv1W7hM5{height:100%}.button-2gir_Bbb{display:flex;height:100%;align-items:center;margin-left:9px;padding:0 7px;color:var(--tv-color-toolbar-button-text,#131722);position:relative;z-index:0}html.theme-dark .button-2gir_Bbb{color:var(--tv-color-toolbar-button-text,#787b86)}.button-2gir_Bbb.hover-SrAyrKlT,.button-2gir_Bbb:active{color:var(--tv-color-toolbar-button-text-hover,#000)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.button-2gir_Bbb:hover{color:var(--tv-color-toolbar-button-text-hover,#000)}}html.theme-dark .button-2gir_Bbb.hover-SrAyrKlT,html.theme-dark .button-2gir_Bbb:active{color:var(--tv-color-toolbar-button-text-hover,#868993)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .button-2gir_Bbb:hover{color:var(--tv-color-toolbar-button-text-hover,#868993)}}.button-2gir_Bbb.hover-SrAyrKlT:before,.button-2gir_Bbb:active:before{content:"";display:block;position:absolute;z-index:-1;top:var(--tv-toolbar-explicit-hover-margin,2px);right:var(--tv-toolbar-explicit-hover-margin,2px);bottom:var(--tv-toolbar-explicit-hover-margin,2px);left:var(--tv-toolbar-explicit-hover-margin,2px);background-color:var(--tv-color-toolbar-button-background-hover,#f0f3fa);border-radius:var(--tv-toolbar-explicit-hover-border-radius,2px);right:0;left:0}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.button-2gir_Bbb:hover:before{content:"";display:block;position:absolute;z-index:-1;top:var(--tv-toolbar-explicit-hover-margin,2px);right:var(--tv-toolbar-explicit-hover-margin,2px);bottom:var(--tv-toolbar-explicit-hover-margin,2px);left:var(--tv-toolbar-explicit-hover-margin,2px);background-color:var(--tv-color-toolbar-button-background-hover,#f0f3fa);border-radius:var(--tv-toolbar-explicit-hover-border-radius,2px);right:0;left:0}}html.theme-dark .button-2gir_Bbb.hover-SrAyrKlT:before,html.theme-dark .button-2gir_Bbb:active:before{background-color:var(--tv-color-toolbar-button-background-hover,#2a2e39)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .button-2gir_Bbb:hover:before{background-color:var(--tv-color-toolbar-button-background-hover,#2a2e39)}}.icon-MwaAItz1{width:18px;height:18px}.button-88UE6omC{display:flex;height:100%;align-items:center;border:none;outline:none;padding:0;margin:0;background-color:transparent;cursor:default;color:var(--tv-color-toolbar-button-text,#131722);position:relative;z-index:0}html.theme-dark .button-88UE6omC{color:var(--tv-color-toolbar-button-text,#787b86)}.button-88UE6omC.hover-3_vVP91F,.button-88UE6omC:active{color:var(--tv-color-toolbar-button-text-hover,#000)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.button-88UE6omC:hover{color:var(--tv-color-toolbar-button-text-hover,#000)}}html.theme-dark .button-88UE6omC.hover-3_vVP91F,html.theme-dark .button-88UE6omC:active{color:var(--tv-color-toolbar-button-text-hover,#868993)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .button-88UE6omC:hover{color:var(--tv-color-toolbar-button-text-hover,#868993)}}.button-88UE6omC.hover-3_vVP91F:before,.button-88UE6omC:active:before{content:"";display:block;position:absolute;z-index:-1;top:var(--tv-toolbar-explicit-hover-margin,2px);right:var(--tv-toolbar-explicit-hover-margin,2px);bottom:var(--tv-toolbar-explicit-hover-margin,2px);left:var(--tv-toolbar-explicit-hover-margin,2px);background-color:var(--tv-color-toolbar-button-background-hover,#f0f3fa);border-radius:var(--tv-toolbar-explicit-hover-border-radius,2px);right:0;left:0}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.button-88UE6omC:hover:before{content:"";display:block;position:absolute;z-index:-1;top:var(--tv-toolbar-explicit-hover-margin,2px);right:var(--tv-toolbar-explicit-hover-margin,2px);bottom:var(--tv-toolbar-explicit-hover-margin,2px);left:var(--tv-toolbar-explicit-hover-margin,2px);background-color:var(--tv-color-toolbar-button-background-hover,#f0f3fa);border-radius:var(--tv-toolbar-explicit-hover-border-radius,2px);right:0;left:0}}html.theme-dark .button-88UE6omC.hover-3_vVP91F:before,html.theme-dark .button-88UE6omC:active:before{background-color:var(--tv-color-toolbar-button-background-hover,#2a2e39)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .button-88UE6omC:hover:before{background-color:var(--tv-color-toolbar-button-background-hover,#2a2e39)}}.button-88UE6omC[disabled]{position:relative;z-index:0}.button-88UE6omC[disabled].hover-3_vVP91F:before,.button-88UE6omC[disabled]:active:before{content:"";display:block;position:absolute;z-index:-1;top:var(--tv-toolbar-explicit-hover-margin,2px);right:var(--tv-toolbar-explicit-hover-margin,2px);bottom:var(--tv-toolbar-explicit-hover-margin,2px);left:var(--tv-toolbar-explicit-hover-margin,2px);background-color:var(--tv-color-toolbar-button-background-hover,#f0f3fa);border-radius:var(--tv-toolbar-explicit-hover-border-radius,2px);background-color:transparent}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.button-88UE6omC[disabled]:hover:before{content:"";display:block;position:absolute;z-index:-1;top:var(--tv-toolbar-explicit-hover-margin,2px);right:var(--tv-toolbar-explicit-hover-margin,2px);bottom:var(--tv-toolbar-explicit-hover-margin,2px);left:var(--tv-toolbar-explicit-hover-margin,2px);background-color:var(--tv-color-toolbar-button-background-hover,#f0f3fa);border-radius:var(--tv-toolbar-explicit-hover-border-radius,2px);background-color:transparent}}html.theme-dark .button-88UE6omC[disabled].hover-3_vVP91F:before,html.theme-dark .button-88UE6omC[disabled]:active:before{background-color:var(--tv-color-toolbar-button-background-hover,#2a2e39)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .button-88UE6omC[disabled]:hover:before{background-color:var(--tv-color-toolbar-button-background-hover,#2a2e39)}}.button-88UE6omC.open.hover-3_vVP91F:before,.button-88UE6omC.open:active:before,.button-88UE6omC.open:before{content:"";display:block;position:absolute;z-index:-1;top:var(--tv-toolbar-opened-element-hover-margin-top,0);right:var(--tv-toolbar-opened-element-hover-margin-right,0);bottom:var(--tv-toolbar-opened-element-hover-margin-bottom,0);left:var(--tv-toolbar-opened-element-hover-margin-left,0);border-radius:var(--tv-toolbar-opened-element-hover-border-radius,0);background-color:var(--tv-color-toolbar-button-background-expanded,#f0f3fa)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.button-88UE6omC.open:hover:before{content:"";display:block;position:absolute;z-index:-1;top:var(--tv-toolbar-opened-element-hover-margin-top,0);right:var(--tv-toolbar-opened-element-hover-margin-right,0);bottom:var(--tv-toolbar-opened-element-hover-margin-bottom,0);left:var(--tv-toolbar-opened-element-hover-margin-left,0);border-radius:var(--tv-toolbar-opened-element-hover-border-radius,0);background-color:var(--tv-color-toolbar-button-background-expanded,#f0f3fa)}}html.theme-dark .button-88UE6omC.open.hover-3_vVP91F:before,html.theme-dark .button-88UE6omC.open:active:before,html.theme-dark .button-88UE6omC.open:before{background-color:var(--tv-color-toolbar-button-background-expanded,#2a2e39)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .button-88UE6omC.open:hover:before{background-color:var(--tv-color-toolbar-button-background-expanded,#2a2e39)}}.button-88UE6omC .inner-2FptJsfC{position:relative}.button-37qwTsBL{white-space:nowrap}.separator-3bp1jCsV{display:inline-block;width:1px;margin:8px 0;background-color:var(--tv-color-platform-background,#e0e3eb);height:calc(100% - 16px)}html.theme-dark .separator-3bp1jCsV{background-color:var(--tv-color-platform-background,#2a2e39)}.toolbar-2MJefnwP{position:relative;height:100%;font-size:14px;white-space:nowrap;cursor:default}.dateRangeWrapper-yS_7EK1i{display:block;position:absolute;left:0;height:100%}.seriesControlWrapper-1c7dZFwu{display:block;position:absolute;right:0;height:100%}.dateRangeCollapsed-1-pFg0M1,.dateRangeExpanded-Eh9SAOEe{display:inline-flex;flex:0 1 0%;height:100%}.item-2cWFW_ze{height:100%;padding:0 7px;flex:0 0 auto}.item-2cWFW_ze.first-1XNI05qr{margin-left:9px}.item-2cWFW_ze.last-2VBe7EFW{margin-right:4px}.inline-2rwBBIxN{display:inline-block;height:100%;vertical-align:top}.timezone-34WAZb8x{margin-right:9px;padding:0 7px;flex:0 0 auto}.icon-3VRthUnU{height:100%;padding:0 7px;flex:0 0 auto}.icon-3VRthUnU.first-1XNI05qr{margin-left:9px}.icon-3VRthUnU.last-2VBe7EFW{margin-right:9px}.hidden-3Tq8Bf9V{visibility:hidden}.collapsed-2lhil-Rc{position:absolute;visibility:hidden;height:100%;left:0;top:0} \ No newline at end of file diff --git a/public/charting_library/bundles/69.ed35d12e9213121440b4.rtl.css b/public/charting_library/bundles/69.ed35d12e9213121440b4.rtl.css new file mode 100644 index 00000000..2cc8a611 --- /dev/null +++ b/public/charting_library/bundles/69.ed35d12e9213121440b4.rtl.css @@ -0,0 +1 @@ +.button-1VVj8kLG{margin-right:4px;padding:0 12px 0 6px}.separator-2I6DZkMH{margin:6px 0}.item-3cgIlGYO{display:flex;align-items:center;padding:0 7px;height:100%;font-size:14px;color:var(--tv-color-toolbar-button-text,#131722);position:relative;z-index:0}html.theme-dark .item-3cgIlGYO{color:var(--tv-color-toolbar-button-text,#787b86)}.item-3cgIlGYO.hover-2y46_KNk,.item-3cgIlGYO:active{color:var(--tv-color-toolbar-button-text-hover,#000)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.item-3cgIlGYO:hover{color:var(--tv-color-toolbar-button-text-hover,#000)}}html.theme-dark .item-3cgIlGYO.hover-2y46_KNk,html.theme-dark .item-3cgIlGYO:active{color:var(--tv-color-toolbar-button-text-hover,#868993)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .item-3cgIlGYO:hover{color:var(--tv-color-toolbar-button-text-hover,#868993)}}.item-3cgIlGYO.hover-2y46_KNk:before,.item-3cgIlGYO:active:before{content:"";display:block;position:absolute;z-index:-1;top:var(--tv-toolbar-explicit-hover-margin,2px);left:var(--tv-toolbar-explicit-hover-margin,2px);bottom:var(--tv-toolbar-explicit-hover-margin,2px);right:var(--tv-toolbar-explicit-hover-margin,2px);background-color:var(--tv-color-toolbar-button-background-hover,#f0f3fa);border-radius:var(--tv-toolbar-explicit-hover-border-radius,2px);left:0;right:0}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.item-3cgIlGYO:hover:before{content:"";display:block;position:absolute;z-index:-1;top:var(--tv-toolbar-explicit-hover-margin,2px);left:var(--tv-toolbar-explicit-hover-margin,2px);bottom:var(--tv-toolbar-explicit-hover-margin,2px);right:var(--tv-toolbar-explicit-hover-margin,2px);background-color:var(--tv-color-toolbar-button-background-hover,#f0f3fa);border-radius:var(--tv-toolbar-explicit-hover-border-radius,2px);left:0;right:0}}html.theme-dark .item-3cgIlGYO.hover-2y46_KNk:before,html.theme-dark .item-3cgIlGYO:active:before{background-color:var(--tv-color-toolbar-button-background-hover,#2a2e39)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .item-3cgIlGYO:hover:before{background-color:var(--tv-color-toolbar-button-background-hover,#2a2e39)}}.item-3cgIlGYO.isActive-2M6dwA7-{color:var(--tv-color-toolbar-button-text-active,#2196f3)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.item-3cgIlGYO.isActive-2M6dwA7-:hover{color:var(--tv-color-toolbar-button-text-active,#2196f3)}}html.theme-sa .item-3cgIlGYO.isActive-2M6dwA7-{color:var(--tv-color-toolbar-button-text-active,#ff7200)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-sa .item-3cgIlGYO.isActive-2M6dwA7-:hover{color:var(--tv-color-toolbar-button-text-active,#ff7200)}}html.theme-dark .item-3cgIlGYO.isActive-2M6dwA7-{color:var(--tv-color-toolbar-button-text-active,#1976d2)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .item-3cgIlGYO.isActive-2M6dwA7-:hover{color:var(--tv-color-toolbar-button-text-active,#1976d2)}}.item-3cgIlGYO.isFirst-2kfAV5tf{margin-right:9px}.item-3cgIlGYO.isLast-voJ1bqZh{margin-left:9px}.slider-1ealLtjI{height:2px;bottom:15%;transition-duration:175ms;transition-property:transform,opacity}.slider-1ealLtjI,html.theme-dark .slider-1ealLtjI{background-color:transparent}.slider-1ealLtjI .inner-3lmAEIjy{background-color:var(--tv-color-toolbar-button-text-active,#2196f3);margin:0 8px;height:100%}html.theme-sa .slider-1ealLtjI .inner-3lmAEIjy{background-color:var(--tv-color-toolbar-button-text-active,#ff7200)}html.theme-dark .slider-1ealLtjI .inner-3lmAEIjy{background-color:var(--tv-color-toolbar-button-text-active,#1976d2)}.sliderRow-Tv1W7hM5{height:100%}.button-2gir_Bbb{display:flex;height:100%;align-items:center;margin-right:9px;padding:0 7px;color:var(--tv-color-toolbar-button-text,#131722);position:relative;z-index:0}html.theme-dark .button-2gir_Bbb{color:var(--tv-color-toolbar-button-text,#787b86)}.button-2gir_Bbb.hover-SrAyrKlT,.button-2gir_Bbb:active{color:var(--tv-color-toolbar-button-text-hover,#000)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.button-2gir_Bbb:hover{color:var(--tv-color-toolbar-button-text-hover,#000)}}html.theme-dark .button-2gir_Bbb.hover-SrAyrKlT,html.theme-dark .button-2gir_Bbb:active{color:var(--tv-color-toolbar-button-text-hover,#868993)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .button-2gir_Bbb:hover{color:var(--tv-color-toolbar-button-text-hover,#868993)}}.button-2gir_Bbb.hover-SrAyrKlT:before,.button-2gir_Bbb:active:before{content:"";display:block;position:absolute;z-index:-1;top:var(--tv-toolbar-explicit-hover-margin,2px);left:var(--tv-toolbar-explicit-hover-margin,2px);bottom:var(--tv-toolbar-explicit-hover-margin,2px);right:var(--tv-toolbar-explicit-hover-margin,2px);background-color:var(--tv-color-toolbar-button-background-hover,#f0f3fa);border-radius:var(--tv-toolbar-explicit-hover-border-radius,2px);left:0;right:0}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.button-2gir_Bbb:hover:before{content:"";display:block;position:absolute;z-index:-1;top:var(--tv-toolbar-explicit-hover-margin,2px);left:var(--tv-toolbar-explicit-hover-margin,2px);bottom:var(--tv-toolbar-explicit-hover-margin,2px);right:var(--tv-toolbar-explicit-hover-margin,2px);background-color:var(--tv-color-toolbar-button-background-hover,#f0f3fa);border-radius:var(--tv-toolbar-explicit-hover-border-radius,2px);left:0;right:0}}html.theme-dark .button-2gir_Bbb.hover-SrAyrKlT:before,html.theme-dark .button-2gir_Bbb:active:before{background-color:var(--tv-color-toolbar-button-background-hover,#2a2e39)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .button-2gir_Bbb:hover:before{background-color:var(--tv-color-toolbar-button-background-hover,#2a2e39)}}.icon-MwaAItz1{width:18px;height:18px}.button-88UE6omC{display:flex;height:100%;align-items:center;border:none;outline:none;padding:0;margin:0;background-color:transparent;cursor:default;color:var(--tv-color-toolbar-button-text,#131722);position:relative;z-index:0}html.theme-dark .button-88UE6omC{color:var(--tv-color-toolbar-button-text,#787b86)}.button-88UE6omC.hover-3_vVP91F,.button-88UE6omC:active{color:var(--tv-color-toolbar-button-text-hover,#000)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.button-88UE6omC:hover{color:var(--tv-color-toolbar-button-text-hover,#000)}}html.theme-dark .button-88UE6omC.hover-3_vVP91F,html.theme-dark .button-88UE6omC:active{color:var(--tv-color-toolbar-button-text-hover,#868993)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .button-88UE6omC:hover{color:var(--tv-color-toolbar-button-text-hover,#868993)}}.button-88UE6omC.hover-3_vVP91F:before,.button-88UE6omC:active:before{content:"";display:block;position:absolute;z-index:-1;top:var(--tv-toolbar-explicit-hover-margin,2px);left:var(--tv-toolbar-explicit-hover-margin,2px);bottom:var(--tv-toolbar-explicit-hover-margin,2px);right:var(--tv-toolbar-explicit-hover-margin,2px);background-color:var(--tv-color-toolbar-button-background-hover,#f0f3fa);border-radius:var(--tv-toolbar-explicit-hover-border-radius,2px);left:0;right:0}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.button-88UE6omC:hover:before{content:"";display:block;position:absolute;z-index:-1;top:var(--tv-toolbar-explicit-hover-margin,2px);left:var(--tv-toolbar-explicit-hover-margin,2px);bottom:var(--tv-toolbar-explicit-hover-margin,2px);right:var(--tv-toolbar-explicit-hover-margin,2px);background-color:var(--tv-color-toolbar-button-background-hover,#f0f3fa);border-radius:var(--tv-toolbar-explicit-hover-border-radius,2px);left:0;right:0}}html.theme-dark .button-88UE6omC.hover-3_vVP91F:before,html.theme-dark .button-88UE6omC:active:before{background-color:var(--tv-color-toolbar-button-background-hover,#2a2e39)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .button-88UE6omC:hover:before{background-color:var(--tv-color-toolbar-button-background-hover,#2a2e39)}}.button-88UE6omC[disabled]{position:relative;z-index:0}.button-88UE6omC[disabled].hover-3_vVP91F:before,.button-88UE6omC[disabled]:active:before{content:"";display:block;position:absolute;z-index:-1;top:var(--tv-toolbar-explicit-hover-margin,2px);left:var(--tv-toolbar-explicit-hover-margin,2px);bottom:var(--tv-toolbar-explicit-hover-margin,2px);right:var(--tv-toolbar-explicit-hover-margin,2px);background-color:var(--tv-color-toolbar-button-background-hover,#f0f3fa);border-radius:var(--tv-toolbar-explicit-hover-border-radius,2px);background-color:transparent}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.button-88UE6omC[disabled]:hover:before{content:"";display:block;position:absolute;z-index:-1;top:var(--tv-toolbar-explicit-hover-margin,2px);left:var(--tv-toolbar-explicit-hover-margin,2px);bottom:var(--tv-toolbar-explicit-hover-margin,2px);right:var(--tv-toolbar-explicit-hover-margin,2px);background-color:var(--tv-color-toolbar-button-background-hover,#f0f3fa);border-radius:var(--tv-toolbar-explicit-hover-border-radius,2px);background-color:transparent}}html.theme-dark .button-88UE6omC[disabled].hover-3_vVP91F:before,html.theme-dark .button-88UE6omC[disabled]:active:before{background-color:var(--tv-color-toolbar-button-background-hover,#2a2e39)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .button-88UE6omC[disabled]:hover:before{background-color:var(--tv-color-toolbar-button-background-hover,#2a2e39)}}.button-88UE6omC.open.hover-3_vVP91F:before,.button-88UE6omC.open:active:before,.button-88UE6omC.open:before{content:"";display:block;position:absolute;z-index:-1;top:var(--tv-toolbar-opened-element-hover-margin-top,0);left:var(--tv-toolbar-opened-element-hover-margin-right,0);bottom:var(--tv-toolbar-opened-element-hover-margin-bottom,0);right:var(--tv-toolbar-opened-element-hover-margin-left,0);border-radius:var(--tv-toolbar-opened-element-hover-border-radius,0);background-color:var(--tv-color-toolbar-button-background-expanded,#f0f3fa)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.button-88UE6omC.open:hover:before{content:"";display:block;position:absolute;z-index:-1;top:var(--tv-toolbar-opened-element-hover-margin-top,0);left:var(--tv-toolbar-opened-element-hover-margin-right,0);bottom:var(--tv-toolbar-opened-element-hover-margin-bottom,0);right:var(--tv-toolbar-opened-element-hover-margin-left,0);border-radius:var(--tv-toolbar-opened-element-hover-border-radius,0);background-color:var(--tv-color-toolbar-button-background-expanded,#f0f3fa)}}html.theme-dark .button-88UE6omC.open.hover-3_vVP91F:before,html.theme-dark .button-88UE6omC.open:active:before,html.theme-dark .button-88UE6omC.open:before{background-color:var(--tv-color-toolbar-button-background-expanded,#2a2e39)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .button-88UE6omC.open:hover:before{background-color:var(--tv-color-toolbar-button-background-expanded,#2a2e39)}}.button-88UE6omC .inner-2FptJsfC{position:relative}.button-37qwTsBL{white-space:nowrap}.separator-3bp1jCsV{display:inline-block;width:1px;margin:8px 0;background-color:var(--tv-color-platform-background,#e0e3eb);height:calc(100% - 16px)}html.theme-dark .separator-3bp1jCsV{background-color:var(--tv-color-platform-background,#2a2e39)}.toolbar-2MJefnwP{position:relative;height:100%;font-size:14px;white-space:nowrap;cursor:default}.dateRangeWrapper-yS_7EK1i{display:block;position:absolute;right:0;height:100%}.seriesControlWrapper-1c7dZFwu{display:block;position:absolute;left:0;height:100%}.dateRangeCollapsed-1-pFg0M1,.dateRangeExpanded-Eh9SAOEe{display:inline-flex;flex:0 1 0%;height:100%}.item-2cWFW_ze{height:100%;padding:0 7px;flex:0 0 auto}.item-2cWFW_ze.first-1XNI05qr{margin-right:9px}.item-2cWFW_ze.last-2VBe7EFW{margin-left:4px}.inline-2rwBBIxN{display:inline-block;height:100%;vertical-align:top}.timezone-34WAZb8x{margin-left:9px;padding:0 7px;flex:0 0 auto}.icon-3VRthUnU{height:100%;padding:0 7px;flex:0 0 auto}.icon-3VRthUnU.first-1XNI05qr{margin-right:9px}.icon-3VRthUnU.last-2VBe7EFW{margin-left:9px}.hidden-3Tq8Bf9V{visibility:hidden}.collapsed-2lhil-Rc{position:absolute;visibility:hidden;height:100%;right:0;top:0} \ No newline at end of file diff --git a/public/charting_library/bundles/6bbe99469a47c58a056f32085bbdfc26.png b/public/charting_library/bundles/6bbe99469a47c58a056f32085bbdfc26.png new file mode 100644 index 00000000..a2fd01bf Binary files /dev/null and b/public/charting_library/bundles/6bbe99469a47c58a056f32085bbdfc26.png differ diff --git a/public/charting_library/bundles/7.92647ec0a7beb8b2898d.css b/public/charting_library/bundles/7.92647ec0a7beb8b2898d.css new file mode 100644 index 00000000..e69de29b diff --git a/public/charting_library/bundles/7.92647ec0a7beb8b2898d.rtl.css b/public/charting_library/bundles/7.92647ec0a7beb8b2898d.rtl.css new file mode 100644 index 00000000..e69de29b diff --git a/public/charting_library/bundles/7.ed2052c5b657f5d653a5.js b/public/charting_library/bundles/7.ed2052c5b657f5d653a5.js new file mode 100644 index 00000000..5d0355ad --- /dev/null +++ b/public/charting_library/bundles/7.ed2052c5b657f5d653a5.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[7],[]]); \ No newline at end of file diff --git a/public/charting_library/bundles/70.50a6d9aa8157538b5bd6.js b/public/charting_library/bundles/70.50a6d9aa8157538b5bd6.js new file mode 100644 index 00000000..ed492cb1 --- /dev/null +++ b/public/charting_library/bundles/70.50a6d9aa8157538b5bd6.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[70],[]]); \ No newline at end of file diff --git a/public/charting_library/bundles/70.736727f897e2be517230.css b/public/charting_library/bundles/70.736727f897e2be517230.css new file mode 100644 index 00000000..bdac728d --- /dev/null +++ b/public/charting_library/bundles/70.736727f897e2be517230.css @@ -0,0 +1 @@ +.control-bar-wrapper{position:absolute;pointer-events:none;height:28px;z-index:1;direction:ltr}.control-bar{display:flex;visibility:visible;transition:opacity .3s,visibility .3s}.control-bar--hidden,.control-bar--hidden .control-bar__btn{visibility:hidden;opacity:0}.control-bar__group{display:flex;align-items:center;margin:0 7px}.control-bar__btn{display:inline-flex;align-items:center;justify-content:center;border-radius:50%;margin:0 4px;width:28px;height:28px;background-color:hsla(0,0%,100%,.75);color:#5d606b;box-shadow:0 1px 4px rgba(19,23,34,.2);pointer-events:auto;transition:background-color .3s,color .3s,visibility .4s,opacity .4s;-webkit-user-select:none;user-select:none;z-index:1;visibility:visible;opacity:1}.control-bar__btn--btn-hidden{visibility:hidden;opacity:0}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.control-bar__btn:hover{background-color:#fff;color:#131722}}.control-bar__btn:active{background-color:#f8f9fd;transition:none}.control-bar__btn--minimize{background-color:#2196f3;color:#fff}.control-bar__btn--minimize:active{color:#fff;background-color:#1e88e5}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.control-bar__btn--minimize:hover{color:#fff;background-color:#1e88e5}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.control-bar__btn--minimize:hover .corner-left-top{animation:animation-minimize-corner-left-top-1QFR0TYG .6s ease}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.control-bar__btn--minimize:hover .corner-right-top{animation:animation-minimize-corner-right-top-2OigqFDd .6s ease}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.control-bar__btn--minimize:hover .corner-right-bottom{animation:animation-minimize-corner-right-bottom-171Xjuh0 .6s ease}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.control-bar__btn--minimize:hover .corner-left-bottom{animation:animation-minimize-corner-left-bottom-Gj_EWVOk .6s ease}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.control-bar__btn--maximize:hover .corner-left-top{animation:animation-maximize-corner-left-top-1dOMET94 .6s ease}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.control-bar__btn--maximize:hover .corner-right-top{animation:animation-maximize-corner-right-top-X6SjWmdM .6s ease}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.control-bar__btn--maximize:hover .corner-right-bottom{animation:animation-maximize-corner-right-bottom-2lZ_pYbV .6s ease}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.control-bar__btn--maximize:hover .corner-left-bottom{animation:animation-maximize-corner-left-bottom-28bRbB5v .6s ease}}.chart-widget__bottom--themed-dark .control-bar__btn{background-color:rgba(30,34,45,.75);color:#b2b5be;box-shadow:0 2px 6px #000}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.chart-widget__bottom--themed-dark .control-bar__btn:hover{background-color:#1e222d;color:#d1d4dc}}.chart-widget__bottom--themed-dark .control-bar__btn:active{background-color:#2a2e39}.chart-widget__bottom--themed-dark .control-bar__btn--minimize{background-color:#1976d2;color:#bbdefb}.chart-widget__bottom--themed-dark .control-bar__btn--minimize:active{background-color:#1e88e5;color:#bbdefb}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.chart-widget__bottom--themed-dark .control-bar__btn--minimize:hover{background-color:#1e88e5;color:#bbdefb}}.control-bar__btn--back-present{position:absolute;right:2px}.control-bar__btn svg{pointer-events:none}@keyframes animation-maximize-corner-left-top-1dOMET94{50%{transform:translate(-1px,-1px)}}@keyframes animation-maximize-corner-right-top-X6SjWmdM{50%{transform:translate(1px,-1px)}}@keyframes animation-maximize-corner-right-bottom-2lZ_pYbV{50%{transform:translate(1px,1px)}}@keyframes animation-maximize-corner-left-bottom-28bRbB5v{50%{transform:translate(-1px,1px)}}@keyframes animation-minimize-corner-left-top-1QFR0TYG{50%{transform:translate(1px,1px)}}@keyframes animation-minimize-corner-right-top-2OigqFDd{50%{transform:translate(-1px,1px)}}@keyframes animation-minimize-corner-right-bottom-171Xjuh0{50%{transform:translate(-1px,-1px)}}@keyframes animation-minimize-corner-left-bottom-Gj_EWVOk{50%{transform:translate(1px,-1px)}}.loader-1ON1rkY9{content:"";position:absolute;display:none;height:22px;align-items:center;justify-content:center;top:50%;transform:translateY(-50%);left:2px;font-size:0}.loader-1ON1rkY9 .loaderItem-6asdclOe{width:5px;height:5px;opacity:1;border-radius:50%;transform:scale(.6);animation:loader-animation-1vbmOmyN .96s infinite ease-in-out both;background-color:#b2b5be}html.theme-dark .loader-1ON1rkY9 .loaderItem-6asdclOe{background-color:#787b86}.loader-1ON1rkY9 .loaderItem-6asdclOe:not(:last-child){margin-right:2px}.loader-1ON1rkY9 .loaderItem-6asdclOe:nth-child(2){transition-delay:.35s/3;animation-delay:.151s}.loader-1ON1rkY9 .loaderItem-6asdclOe:nth-child(3){transition-delay:(.35s/3)*2;animation-delay:.32s}.loader-1ON1rkY9.shown-1QFCxvPl{display:flex}@keyframes loader-animation-1vbmOmyN{0%,to{transform:scale(.6)}50%{transform:scale(.9)}}.chart-widget__top--themed-light .loader-1ON1rkY9 .loaderItem-6asdclOe{background-color:#b2b5be}html.theme-dark .chart-widget__top--themed-light .loader-1ON1rkY9 .loaderItem-6asdclOe{background-color:#787b86}.chart-widget__top--themed-dark .loader-1ON1rkY9 .loaderItem-6asdclOe{background-color:#b2b5be}html.theme-dark .chart-widget__top--themed-dark .loader-1ON1rkY9 .loaderItem-6asdclOe{background-color:#787b86}.touchMode-I-CBM3V3 .loader-1ON1rkY9{height:24px}.legend-29zvAld0{flex:1 1 auto;direction:ltr;max-width:100%;margin:0;padding-top:4px;color:transparent;line-height:normal;-webkit-user-select:none;user-select:none;transform:translateZ(0);contain:content;pointer-events:none;z-index:6}.item-3eXPhOmy{max-width:100%;min-height:24px;flex-wrap:wrap;font-size:13px;z-index:1;-webkit-backface-visibility:hidden;backface-visibility:hidden}.item-3eXPhOmy.series-12hzsxbp{margin:0 4px}.item-3eXPhOmy.selected-2qw9PFUJ,.item-3eXPhOmy.withAction-1y86Ymm9{z-index:2}.item-3eXPhOmy.last-3Xus0HXW{align-items:center;max-width:18px;order:100000;padding:0 4px;border:1px solid transparent;border-top-width:0;border-bottom-width:0;background-color:currentColor;cursor:default;pointer-events:auto}.item-3eXPhOmy.last-3Xus0HXW .text-1pYqyE6B{color:#131722}.item-3eXPhOmy .noWrapWrapper-AC879h-w{display:flex;flex-wrap:nowrap;max-width:100%}.noWrap-ODIQgNap .item-3eXPhOmy{flex-wrap:nowrap}.noWrap-ODIQgNap .series-12hzsxbp.item-3eXPhOmy{flex-wrap:wrap}.noWrap-ODIQgNap .series-12hzsxbp .valuesAdditionalWrapper-3BfAIuML{display:block;align-self:auto}.noWrap-ODIQgNap .series-12hzsxbp .valuesAdditionalWrapper-3BfAIuML .valueItem-3JDGGSt_,.noWrap-ODIQgNap .series-12hzsxbp .valuesAdditionalWrapper-3BfAIuML .valueTitle-1myNPdtH,.noWrap-ODIQgNap .series-12hzsxbp .valuesAdditionalWrapper-3BfAIuML .valueValue-3kA0oJs5{display:inline}.noWrap-ODIQgNap .series-12hzsxbp .valuesAdditionalWrapper-3BfAIuML .valueItem-3JDGGSt_:before,.noWrap-ODIQgNap .series-12hzsxbp .valuesAdditionalWrapper-3BfAIuML .valueTitle-1myNPdtH:before,.noWrap-ODIQgNap .series-12hzsxbp .valuesAdditionalWrapper-3BfAIuML .valueValue-3kA0oJs5:before{display:none}.noWrap-ODIQgNap .valuesWrapper-1ukbb5SP{align-items:center}.noWrap-ODIQgNap .valuesAdditionalWrapper-3BfAIuML{display:block;align-self:auto;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#131722}.directionColumn-abL_Vsle .series-12hzsxbp{flex-direction:column}.directionColumn-abL_Vsle .series-12hzsxbp .valuesWrapper-1ukbb5SP{max-width:100%;align-self:flex-start}.button-22Ex8G2W,.statusesWrapper-GnubQvDb,.titleWrapper-1Zs2rjQ6,.valueItem-3JDGGSt_{background-color:currentColor}.buttons-1-XhYDHM,.buttonsWrapper-3eBZpnXm,.item-3eXPhOmy,.statusesWrapper-GnubQvDb,.titleWrapper-1Zs2rjQ6,.valueItem-3JDGGSt_,.valuesWrapper-1ukbb5SP{display:flex}.statusesWrapper-GnubQvDb{z-index:1}.statusesWrapper-GnubQvDb,.titleWrapper-1Zs2rjQ6{position:relative;pointer-events:auto;cursor:default}.titleWrapper-1Zs2rjQ6{flex:0 0 auto;align-items:center;max-width:100%;overflow:hidden;padding:0 4px;border:1px solid transparent;border-right-width:0;box-sizing:border-box}.noActions-1D515O5o .titleWrapper-1Zs2rjQ6{pointer-events:none}.title-bcHj6pEn{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;min-width:23px;text-align:left;color:#131722}.title-bcHj6pEn.title2nd-2igtq1cH{min-width:auto}.disabled-3P6bUcMx .title-bcHj6pEn{color:#b2b5be}.disabled-3P6bUcMx.withCustomTextColor-Pw_dabsC .title-bcHj6pEn{color:#b2b5be!important}.study-lgC0tuTJ .title-bcHj6pEn.title1st-2at68hKe{min-width:15px;flex:0 4 auto}.study-lgC0tuTJ .title-bcHj6pEn.title2nd-2igtq1cH{min-width:0;padding-left:4px;flex:0 1 auto;color:#5d606b}.study-lgC0tuTJ.disabled-3P6bUcMx .title-bcHj6pEn.title2nd-2igtq1cH{color:#b2b5be}.study-lgC0tuTJ.disabled-3P6bUcMx.withCustomTextColor-Pw_dabsC .title-bcHj6pEn{color:#b2b5be!important}.study-lgC0tuTJ.hideValues-3JtC3-Os .valuesWrapper-1ukbb5SP{display:none}.legend-29zvAld0 .study-lgC0tuTJ.has5Buttons-3tuydZU5.selected-2qw9PFUJ.withTail-2tfD0t7T .valuesWrapper-1ukbb5SP:after,.legend-29zvAld0 .study-lgC0tuTJ.has5Buttons-3tuydZU5.stayInHoveredMode-3K55nNni.withTail-2tfD0t7T .valuesWrapper-1ukbb5SP:after{left:calc(var(--legend-source-item-button-width)*5)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.legend-29zvAld0:hover .study-lgC0tuTJ.has5Buttons-3tuydZU5.withAction-1y86Ymm9.withTail-2tfD0t7T .valuesWrapper-1ukbb5SP:after{left:calc(var(--legend-source-item-button-width)*5)}}.loading-37LPn65g .valuesWrapper-1ukbb5SP,.noWrap-ODIQgNap .valuesWrapper-1ukbb5SP,.series-12hzsxbp .valuesWrapper-1ukbb5SP{background-color:currentColor;border-top:1px solid transparent;border-bottom:1px solid transparent}.loader-iCjkbLoX{margin-left:4px}.noWrap-ODIQgNap .valuesAdditionalWrapper-3BfAIuML,.series-12hzsxbp .valuesAdditionalWrapper-3BfAIuML{border-left-color:transparent}.noWrap-ODIQgNap .valueItem-3JDGGSt_,.series-12hzsxbp .valueItem-3JDGGSt_{background-color:transparent}.noWrap-ODIQgNap .valueItem-3JDGGSt_,.noWrap-ODIQgNap .valueItem-3JDGGSt_ .valueTitle-1myNPdtH,.noWrap-ODIQgNap .valueItem-3JDGGSt_ .valueValue-3kA0oJs5,.series-12hzsxbp .valueItem-3JDGGSt_,.series-12hzsxbp .valueItem-3JDGGSt_ .valueTitle-1myNPdtH,.series-12hzsxbp .valueItem-3JDGGSt_ .valueValue-3kA0oJs5{display:inline-flex}.series-12hzsxbp .titleWrapper-1Zs2rjQ6{position:relative;max-width:100%;min-height:24px;font-size:16px;line-height:normal;align-items:center}.series-12hzsxbp .titleWrapper-1Zs2rjQ6 .title-bcHj6pEn.withDot-VrJCTK--:not(:first-child){position:relative;padding-left:12px}.series-12hzsxbp .titleWrapper-1Zs2rjQ6 .title-bcHj6pEn.withDot-VrJCTK--:not(:first-child):before{content:"\b7";position:absolute;left:0;top:0;width:12px;height:100%;font-size:16px;color:#c1c4cd;text-align:center;line-height:inherit}.series-12hzsxbp .titleWrapper-1Zs2rjQ6 .title-bcHj6pEn.title1st-2at68hKe{flex:0 1 auto}.series-12hzsxbp .titleWrapper-1Zs2rjQ6 .title-bcHj6pEn.title2nd-2igtq1cH{flex:0 0 auto}.series-12hzsxbp .titleWrapper-1Zs2rjQ6 .title-bcHj6pEn.title3rd-2bpagZ7H{flex:0 1 auto}.series-12hzsxbp .titleWrapper-1Zs2rjQ6 .title-bcHj6pEn.title4th-28_-ZX9R{flex:0 3 auto}.series-12hzsxbp .valuesWrapper-1ukbb5SP{border-bottom-width:3px;align-items:flex-end}.series-12hzsxbp .titleWrapper-1Zs2rjQ6,.series-12hzsxbp .valuesWrapper-1ukbb5SP{min-width:23px}.series-12hzsxbp .valuesWrapper-1ukbb5SP{display:flex}.hidden3Title-22u6NoOK .series-12hzsxbp .titleWrapper-1Zs2rjQ6 .title-bcHj6pEn.title3rd-2bpagZ7H,.microHidden2Title-37EAZYGX .series-12hzsxbp .titleWrapper-1Zs2rjQ6 .title-bcHj6pEn.title2nd-2igtq1cH,.single-visible .miniHidden2Title-1xHUL0G8 .series-12hzsxbp .titleWrapper-1Zs2rjQ6 .title-bcHj6pEn.title2nd-2igtq1cH{display:none}.legend-29zvAld0 .series-12hzsxbp.selected-2qw9PFUJ.withTail-2tfD0t7T .valuesWrapper-1ukbb5SP:after,.legend-29zvAld0 .series-12hzsxbp.stayInHoveredMode-3K55nNni.withTail-2tfD0t7T .valuesWrapper-1ukbb5SP:after{left:calc(var(--legend-source-item-button-width)*3)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.legend-29zvAld0:hover .series-12hzsxbp.withAction-1y86Ymm9.withTail-2tfD0t7T .valuesWrapper-1ukbb5SP:after{left:calc(var(--legend-source-item-button-width)*3)}}.legend-29zvAld0 .series-12hzsxbp.flagged-3lOrkL__.selected-2qw9PFUJ.withTail-2tfD0t7T .valuesWrapper-1ukbb5SP:after,.legend-29zvAld0 .series-12hzsxbp.flagged-3lOrkL__.stayInHoveredMode-3K55nNni.withTail-2tfD0t7T .valuesWrapper-1ukbb5SP:after{left:calc(var(--legend-source-item-button-width)*2)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.legend-29zvAld0:hover .series-12hzsxbp.flagged-3lOrkL__.withAction-1y86Ymm9.withTail-2tfD0t7T .valuesWrapper-1ukbb5SP:after{left:calc(var(--legend-source-item-button-width)*2)}}.selected-2qw9PFUJ .buttons-1-XhYDHM,.selected-2qw9PFUJ .titleWrapper-1Zs2rjQ6,.withAction-1y86Ymm9 .buttons-1-XhYDHM,.withAction-1y86Ymm9 .titleWrapper-1Zs2rjQ6{background-color:#fff}.selected-2qw9PFUJ .button-22Ex8G2W,.withAction-1y86Ymm9 .button-22Ex8G2W{background-color:transparent}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.selected-2qw9PFUJ .button-22Ex8G2W:hover:after{background-color:#e3f2fd}}.selected-2qw9PFUJ .titleWrapper-1Zs2rjQ6,.withAction-1y86Ymm9 .titleWrapper-1Zs2rjQ6,.withAction-1y86Ymm9.selected-2qw9PFUJ .titleWrapper-1Zs2rjQ6{border-radius:4px 0 0 4px}.medium-2Vr6MA2I.legend-29zvAld0 .item-3eXPhOmy.study-lgC0tuTJ.selected-2qw9PFUJ.withTail-2tfD0t7T .valuesWrapper-1ukbb5SP:after,.medium-2Vr6MA2I.legend-29zvAld0 .item-3eXPhOmy.study-lgC0tuTJ.stayInHoveredMode-3K55nNni.withTail-2tfD0t7T .valuesWrapper-1ukbb5SP:after{left:calc(var(--legend-source-item-button-width)*3)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.medium-2Vr6MA2I.legend-29zvAld0:hover .item-3eXPhOmy.study-lgC0tuTJ.withAction-1y86Ymm9.withTail-2tfD0t7T .valuesWrapper-1ukbb5SP:after{left:calc(var(--legend-source-item-button-width)*3)}}.minimized-25_VM9I8.legend-29zvAld0 .item-3eXPhOmy.study-lgC0tuTJ.selected-2qw9PFUJ.withTail-2tfD0t7T .valuesWrapper-1ukbb5SP:after,.minimized-25_VM9I8.legend-29zvAld0 .item-3eXPhOmy.study-lgC0tuTJ.stayInHoveredMode-3K55nNni.withTail-2tfD0t7T .valuesWrapper-1ukbb5SP:after{left:calc(var(--legend-source-item-button-width)*2)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.minimized-25_VM9I8.legend-29zvAld0:hover .item-3eXPhOmy.study-lgC0tuTJ.withAction-1y86Ymm9.withTail-2tfD0t7T .valuesWrapper-1ukbb5SP:after{left:calc(var(--legend-source-item-button-width)*2)}}.valuesWrapper-1ukbb5SP{position:relative;align-self:stretch;align-items:center;flex-wrap:wrap;overflow:hidden;pointer-events:auto;cursor:default}.valuesAdditionalWrapper-3BfAIuML{display:flex;flex-wrap:wrap;align-self:stretch;align-items:baseline;border-left:4px solid currentColor}.loading-37LPn65g .valuesWrapper-1ukbb5SP{min-width:24px}.disabled-3P6bUcMx .valuesWrapper-1ukbb5SP{display:none}.valueItem-3JDGGSt_{display:flex;align-self:stretch;align-items:center;text-align:left}.valueItem-3JDGGSt_:not(:last-child){padding-right:6px}.valueItem-3JDGGSt_:last-child{padding-right:4px}.valueItem-3JDGGSt_ .valueTitle-1myNPdtH{padding-right:1px}.valueItem-3JDGGSt_ .valueTitle-1myNPdtH,.valueItem-3JDGGSt_ .valueValue-3kA0oJs5{color:#131722}.loading-37LPn65g .valueItem-3JDGGSt_,.loading-37LPn65g .valuesAdditionalWrapper-3BfAIuML{opacity:0}.series-12hzsxbp .valueItem-3JDGGSt_:last-child{padding-right:6px}.series-12hzsxbp .valueItem-3JDGGSt_:last-child .title-bcHj6pEn{display:none}.series-12hzsxbp .valueItem-3JDGGSt_ .valueTitle-1myNPdtH{color:#5d606b}.buttonsWrapper-3eBZpnXm{position:relative;width:0;max-width:0;z-index:2}.micro-1-90nTmg .series-12hzsxbp .buttonsWrapper-3eBZpnXm{width:0;max-width:0}.disabled-3P6bUcMx .buttonsWrapper-3eBZpnXm,.flagged-3lOrkL__ .buttonsWrapper-3eBZpnXm{width:var(--legend-source-item-button-width);max-width:var(--legend-source-item-button-width)}.disabled-3P6bUcMx.series-12hzsxbp:not(.onlyOneButtonCanBeStick-16Vrffc6) .buttonsWrapper-3eBZpnXm{width:calc(var(--legend-source-item-button-width)*2);max-width:calc(var(--legend-source-item-button-width)*2)}.buttons-1-XhYDHM{display:flex;padding:0;align-items:center;flex-shrink:0;pointer-events:auto;opacity:0}.disabled-3P6bUcMx .buttons-1-XhYDHM,.flagged-3lOrkL__ .buttons-1-XhYDHM,.touchMode-2jC98z1- .buttons-1-XhYDHM{opacity:1}.noActions-1D515O5o .buttons-1-XhYDHM{pointer-events:none}.selected-2qw9PFUJ .buttons-1-XhYDHM,.withAction-1y86Ymm9 .buttons-1-XhYDHM{border-radius:0 4px 4px 0}.legend-29zvAld0 .selected-2qw9PFUJ .buttons-1-XhYDHM,.legend-29zvAld0 .stayInHoveredMode-3K55nNni .buttons-1-XhYDHM{cursor:default;opacity:1}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.legend-29zvAld0:hover .withAction-1y86Ymm9 .buttons-1-XhYDHM{cursor:default;opacity:1}}.legend-29zvAld0 .selected-2qw9PFUJ.withTail-2tfD0t7T .valuesWrapper-1ukbb5SP:after,.legend-29zvAld0 .stayInHoveredMode-3K55nNni.withTail-2tfD0t7T .valuesWrapper-1ukbb5SP:after{content:"";position:absolute;width:16px;height:18px;top:3px;left:calc(var(--legend-source-item-button-width)*4);background:radial-gradient(10px at 0 50%,currentColor 0,transparent 100%)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.legend-29zvAld0:hover .withAction-1y86Ymm9.withTail-2tfD0t7T .valuesWrapper-1ukbb5SP:after{content:"";position:absolute;width:16px;height:18px;top:3px;left:calc(var(--legend-source-item-button-width)*4);background:radial-gradient(10px at 0 50%,currentColor 0,transparent 100%)}}.button-22Ex8G2W{display:none;position:relative;width:var(--legend-source-item-button-width);justify-content:center;align-self:stretch;align-items:center;opacity:0;z-index:0}.buttonIcon-2lrp9MHZ{display:flex;color:#131722}.button-22Ex8G2W:last-child{border-radius:0 4px 4px 0}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.button-22Ex8G2W:hover:after{content:"";display:block;position:absolute;top:1px;right:0;bottom:1px;left:0;background-color:#f0f3fa;border-radius:2px;z-index:-1}}.button-22Ex8G2W.flag-1kqFt7GH>span{margin-top:-1px}.disabled-3P6bUcMx .buttonIcon-2lrp9MHZ{color:#131722}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.legend-29zvAld0:hover .study-lgC0tuTJ.invisibleHover-qowat1V5 .button-22Ex8G2W{display:flex}}.withAction-1y86Ymm9 .buttons-1-XhYDHM .button-22Ex8G2W:not(:first-child),.withAction-1y86Ymm9 .titleWrapper-1Zs2rjQ6{border-color:#d1d4dc}.selected-2qw9PFUJ .titleWrapper-1Zs2rjQ6:after,.withAction-1y86Ymm9 .titleWrapper-1Zs2rjQ6:after{background-color:#d1d4dc}.selected-2qw9PFUJ .buttons-1-XhYDHM,.withAction-1y86Ymm9 .buttons-1-XhYDHM{border:1px solid #d1d4dc;border-left:0}.selected-2qw9PFUJ .buttons-1-XhYDHM,.selected-2qw9PFUJ .buttons-1-XhYDHM .button-22Ex8G2W:not(:first-child),.selected-2qw9PFUJ .buttonsWrapper-3eBZpnXm,.selected-2qw9PFUJ .titleWrapper-1Zs2rjQ6{border-color:#2196f3}.buttons-1-XhYDHM .eye-3mqNMkLJ .animated-loading-eye,.buttons-1-XhYDHM .eye-3mqNMkLJ .crossed-eye,.buttons-1-XhYDHM .eye-3mqNMkLJ .loading-eye,.disabled-3P6bUcMx .buttons-1-XhYDHM .eye-3mqNMkLJ .animated-loading-eye,.disabled-3P6bUcMx .buttons-1-XhYDHM .eye-3mqNMkLJ .loading-eye,.disabled-3P6bUcMx .buttons-1-XhYDHM .eye-3mqNMkLJ .normal-eye,.medium-2Vr6MA2I .study-lgC0tuTJ .buttons-1-XhYDHM .button-22Ex8G2W:nth-child(2),.medium-2Vr6MA2I .study-lgC0tuTJ .buttons-1-XhYDHM .button-22Ex8G2W:nth-child(3):nth-last-child(3),.micro-1-90nTmg .series-12hzsxbp .buttons-1-XhYDHM .button-22Ex8G2W:not(:last-child),.minimized-25_VM9I8 .study-lgC0tuTJ .button-22Ex8G2W:not(:last-child):not(:first-child){display:none}.disabled-3P6bUcMx .buttons-1-XhYDHM .eye-3mqNMkLJ .crossed-eye{display:block}.hiddenLoading-hcuRRcWh .buttons-1-XhYDHM .eye-3mqNMkLJ .crossed-eye,.hiddenLoading-hcuRRcWh .buttons-1-XhYDHM .eye-3mqNMkLJ .normal-eye{display:none}.hiddenLoading-hcuRRcWh .buttons-1-XhYDHM .eye-3mqNMkLJ .animated-loading-eye,.hiddenLoading-hcuRRcWh .buttons-1-XhYDHM .eye-3mqNMkLJ .loading-eye{display:block}.hiddenLoading-hcuRRcWh .buttons-1-XhYDHM .eye-3mqNMkLJ .animated-loading-eye{transform-origin:center;animation:eye-animation-1pyfCZvS .96s linear infinite}.disabled-3P6bUcMx .buttons-1-XhYDHM .eye-3mqNMkLJ,.flagged-3lOrkL__ .buttons-1-XhYDHM .flag-1kqFt7GH,.selected-2qw9PFUJ .buttons-1-XhYDHM .button-22Ex8G2W,.series-12hzsxbp.disabled-3P6bUcMx .buttons-1-XhYDHM .flag-1kqFt7GH,.withAction-1y86Ymm9 .buttons-1-XhYDHM .button-22Ex8G2W{display:flex;opacity:1}.series-12hzsxbp.disabled-3P6bUcMx .flag-1kqFt7GH .buttonIcon-2lrp9MHZ{visibility:hidden}.selected-2qw9PFUJ.series-12hzsxbp.disabled-3P6bUcMx .flag-1kqFt7GH .buttonIcon-2lrp9MHZ,.series-12hzsxbp.disabled-3P6bUcMx.flagged-3lOrkL__ .flag-1kqFt7GH .buttonIcon-2lrp9MHZ,.withAction-1y86Ymm9.series-12hzsxbp.disabled-3P6bUcMx .flag-1kqFt7GH .buttonIcon-2lrp9MHZ{visibility:visible}.flag-1kqFt7GH .buttonIcon-2lrp9MHZ{flex:1;align-self:stretch}.flagWrapper-14Sd7MtI,.markerContainer-3MnDLQVD{display:flex;flex:1;justify-content:center}.markerContainer-3MnDLQVD{align-items:stretch}.flagWrapper-14Sd7MtI{width:12px}.flagWrapper-14Sd7MtI svg{height:12px}.sourcesWrapper-2JcXD9TK{display:flex;position:relative;margin:0 8px;align-items:flex-start;min-height:26px}.newCollapser-1F6pNRDi .sourcesWrapper-2JcXD9TK{flex-direction:column-reverse;margin:0 4px;min-height:auto}.sources-6Hp4M7li{display:flex;flex-direction:column;flex:1 1 auto;width:100%}.toggler-_SUZ7r_5{display:flex;position:relative;margin:2px 2px 0 0;flex:0 0 auto;align-items:center}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.toggler-_SUZ7r_5:hover:after{z-index:0}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.toggler-_SUZ7r_5:hover .counter-1hG1zy7A,.toggler-_SUZ7r_5:hover .iconArrow-3q7vxxnz,.toggler-_SUZ7r_5:hover .objectTree-2tLil0dm{color:#000}}.toggler-_SUZ7r_5 .counter-1hG1zy7A{display:none;padding-right:6px;font-size:13px;line-height:16px;color:inherit}.toggler-_SUZ7r_5 .iconArrow-3q7vxxnz{display:flex;transition:transform .1s cubic-bezier(.06,.52,1,.54)}.toggler-_SUZ7r_5 .objectTree-2tLil0dm{display:none}.toggler-_SUZ7r_5 .iconArrow-3q7vxxnz,.toggler-_SUZ7r_5 .objectTree-2tLil0dm{width:19px;height:19px;justify-content:center;align-items:center}.toggler-_SUZ7r_5 .counter-1hG1zy7A,.toggler-_SUZ7r_5 .iconArrow-3q7vxxnz,.toggler-_SUZ7r_5 .objectTree-2tLil0dm{position:relative;color:#131722;z-index:1}.newCollapser-1F6pNRDi .toggler-_SUZ7r_5{margin:2px 0 0 5px}.newCollapser-1F6pNRDi .toggler-_SUZ7r_5.onlyOneSourceShown-1dCmMKoj{display:none}.newCollapser-1F6pNRDi .toggler-_SUZ7r_5 .counter-1hG1zy7A{padding-right:4px}.newCollapser-1F6pNRDi .toggler-_SUZ7r_5 .iconArrow-3q7vxxnz{width:27px;transform:rotate(-180deg)}.newCollapser-1F6pNRDi .toggler-_SUZ7r_5 .objectTree-2tLil0dm{width:19px}.closed-1Sz6CztG.sourcesWrapper-2JcXD9TK{padding-bottom:4px}.closed-1Sz6CztG .toggler-_SUZ7r_5 .counter-1hG1zy7A{display:flex}.closed-1Sz6CztG .toggler-_SUZ7r_5 .iconArrow-3q7vxxnz{transform:rotate(-90deg)}.closed-1Sz6CztG .sources-6Hp4M7li{display:none}.newCollapser-1F6pNRDi .closed-1Sz6CztG .toggler-_SUZ7r_5 .iconArrow-3q7vxxnz{transform:rotate(0)}.newCollapser-1F6pNRDi .closed-1Sz6CztG .toggler-_SUZ7r_5 .iconArrow-3q7vxxnz,.newCollapser-1F6pNRDi .closed-1Sz6CztG .toggler-_SUZ7r_5 .objectTree-2tLil0dm{width:19px}.micro-1-90nTmg .sourcesWrapper-2JcXD9TK{padding-bottom:4px}.micro-1-90nTmg .toggler-_SUZ7r_5.objectsTreeCanBeShown-2R_D8NJP .objectTree-2tLil0dm,.micro-1-90nTmg .toggler-_SUZ7r_5.objectsTreeCanBeShown-2R_D8NJP.onlyOneSourceShown-1dCmMKoj{display:flex}.micro-1-90nTmg .closed-1Sz6CztG .toggler-_SUZ7r_5 .counter-1hG1zy7A,.micro-1-90nTmg .closed-1Sz6CztG .toggler-_SUZ7r_5 .iconArrow-3q7vxxnz,.micro-1-90nTmg .series-12hzsxbp .valuesWrapper-1ukbb5SP,.micro-1-90nTmg .sources-6Hp4M7li,.micro-1-90nTmg .toggler-_SUZ7r_5 .counter-1hG1zy7A,.micro-1-90nTmg .toggler-_SUZ7r_5 .iconArrow-3q7vxxnz{display:none}.touchMode-2jC98z1- .titleWrapper-1Zs2rjQ6{line-height:25px;height:26px}.touchMode-2jC98z1- .selected-2qw9PFUJ .titleWrapper-1Zs2rjQ6:after,.touchMode-2jC98z1- .withAction-1y86Ymm9 .titleWrapper-1Zs2rjQ6:after{top:5px;bottom:5px}.touchMode-2jC98z1- .series-12hzsxbp .titleWrapper-1Zs2rjQ6{min-height:26px}.touchMode-2jC98z1- .toggler-_SUZ7r_5{margin:0 2px 0 0}.touchMode-2jC98z1- .toggler-_SUZ7r_5 .iconArrow-3q7vxxnz,.touchMode-2jC98z1- .toggler-_SUZ7r_5 .objectTree-2tLil0dm{width:24px;height:24px}.touchMode-2jC98z1- .toggler-_SUZ7r_5 .counter-1hG1zy7A{font-size:14px}.touchMode-2jC98z1- .item-3eXPhOmy{min-height:26px}.newCollapser-1F6pNRDi.touchMode-2jC98z1- .toggler-_SUZ7r_5{margin:2px 0 0 5px}.newCollapser-1F6pNRDi.touchMode-2jC98z1- .toggler-_SUZ7r_5 .iconArrow-3q7vxxnz,.newCollapser-1F6pNRDi.touchMode-2jC98z1- .toggler-_SUZ7r_5 .objectTree-2tLil0dm{width:30px}.newCollapser-1F6pNRDi.touchMode-2jC98z1- .closed-1Sz6CztG .toggler-_SUZ7r_5 .iconArrow-3q7vxxnz,.newCollapser-1F6pNRDi.touchMode-2jC98z1- .closed-1Sz6CztG .toggler-_SUZ7r_5 .objectTree-2tLil0dm{width:24px}.chart-widget__top--themed-dark .item-3eXPhOmy.last-3Xus0HXW .text-1pYqyE6B,.chart-widget__top--themed-dark .noWrap-ODIQgNap .valuesAdditionalWrapper-3BfAIuML,.chart-widget__top--themed-dark .title-bcHj6pEn,.chart-widget__top--themed-dark .valueTitle-1myNPdtH,.chart-widget__top--themed-dark .valueValue-3kA0oJs5{color:#b2b5be}.chart-widget__top--themed-dark .disabled-3P6bUcMx .title-bcHj6pEn,.chart-widget__top--themed-dark .disabled-3P6bUcMx .valueTitle-1myNPdtH,.chart-widget__top--themed-dark .disabled-3P6bUcMx .valueValue-3kA0oJs5{color:#434651}.chart-widget__top--themed-dark .disabled-3P6bUcMx.withCustomTextColor-Pw_dabsC .title-bcHj6pEn,.chart-widget__top--themed-dark .disabled-3P6bUcMx.withCustomTextColor-Pw_dabsC .valueTitle-1myNPdtH,.chart-widget__top--themed-dark .disabled-3P6bUcMx.withCustomTextColor-Pw_dabsC .valueValue-3kA0oJs5{color:#434651!important}.chart-widget__top--themed-dark .study-lgC0tuTJ .title-bcHj6pEn.title2nd-2igtq1cH{color:#868993}.chart-widget__top--themed-dark .study-lgC0tuTJ.disabled-3P6bUcMx .title-bcHj6pEn.title2nd-2igtq1cH{color:#434651}.chart-widget__top--themed-dark .study-lgC0tuTJ.withCustomTextColor-Pw_dabsC.disabled-3P6bUcMx .title-bcHj6pEn.title2nd-2igtq1cH{color:#434651!important}.chart-widget__top--themed-dark .series-12hzsxbp .titleWrapper-1Zs2rjQ6 .title-bcHj6pEn.withDot-VrJCTK--:not(:first-child):before{color:#434651}.chart-widget__top--themed-dark .buttonIcon-2lrp9MHZ,.chart-widget__top--themed-dark .series-12hzsxbp .valueItem-3JDGGSt_ .valueTitle-1myNPdtH{color:#b2b5be}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.chart-widget__top--themed-dark .button-22Ex8G2W:hover:after{background-color:#2a2e39}}.chart-widget__top--themed-dark .withAction-1y86Ymm9 .buttons-1-XhYDHM,.chart-widget__top--themed-dark .withAction-1y86Ymm9 .buttons-1-XhYDHM .button-22Ex8G2W:not(:first-child),.chart-widget__top--themed-dark .withAction-1y86Ymm9 .titleWrapper-1Zs2rjQ6{border-color:#363a45}.chart-widget__top--themed-dark .selected-2qw9PFUJ .titleWrapper-1Zs2rjQ6:after,.chart-widget__top--themed-dark .withAction-1y86Ymm9 .titleWrapper-1Zs2rjQ6:after{background-color:#363a45}.chart-widget__top--themed-dark .selected-2qw9PFUJ .buttons-1-XhYDHM,.chart-widget__top--themed-dark .selected-2qw9PFUJ .titleWrapper-1Zs2rjQ6,.chart-widget__top--themed-dark .withAction-1y86Ymm9 .buttons-1-XhYDHM,.chart-widget__top--themed-dark .withAction-1y86Ymm9 .titleWrapper-1Zs2rjQ6{background-color:#131722}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.chart-widget__top--themed-dark .selected-2qw9PFUJ .button-22Ex8G2W:hover:after{background-color:rgba(25,118,210,.2)}}.chart-widget__top--themed-dark .selected-2qw9PFUJ .buttons-1-XhYDHM,.chart-widget__top--themed-dark .selected-2qw9PFUJ .buttons-1-XhYDHM .button-22Ex8G2W:not(:first-child),.chart-widget__top--themed-dark .selected-2qw9PFUJ .buttonsWrapper-3eBZpnXm,.chart-widget__top--themed-dark .selected-2qw9PFUJ .titleWrapper-1Zs2rjQ6{border-color:#1976d2}.chart-widget__top--themed-dark .toggler-_SUZ7r_5{border-color:#363a45}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.chart-widget__top--themed-dark .toggler-_SUZ7r_5:hover:after{background-color:hsla(0,0%,100%,.1)}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.chart-widget__top--themed-dark .toggler-_SUZ7r_5:hover .counter-1hG1zy7A,.chart-widget__top--themed-dark .toggler-_SUZ7r_5:hover .iconArrow-3q7vxxnz,.chart-widget__top--themed-dark .toggler-_SUZ7r_5:hover .objectTree-2tLil0dm{color:#f0f3fa}}.chart-widget__top--themed-dark .toggler-_SUZ7r_5 .counter-1hG1zy7A,.chart-widget__top--themed-dark .toggler-_SUZ7r_5 .iconArrow-3q7vxxnz,.chart-widget__top--themed-dark .toggler-_SUZ7r_5 .objectTree-2tLil0dm{color:#d1d4dc}@keyframes eye-animation-1pyfCZvS{to{transform:rotate(1turn)}}.blockHidden-pECc1q1w{display:none!important}.pane-button-3IbFaPrJ{border:1px solid #d1d4dc;border-radius:3px;background-color:currentColor;cursor:default;pointer-events:all}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.pane-button-3IbFaPrJ:hover:after{content:"";display:block;position:absolute;top:0;left:0;bottom:0;right:0;background-color:rgba(19,23,34,.06);border-radius:3px;z-index:0}}.chart-widget__top--themed-dark .pane-button-3IbFaPrJ{border-color:#363a45}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.chart-widget__top--themed-dark .pane-button-3IbFaPrJ:hover:after{background-color:hsla(0,0%,100%,.1)}}.statuses-29yrFaoA{display:inline-flex;border-radius:9px;overflow:hidden;align-self:center}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.statuses-29yrFaoA:hover .statusItem-1gsKvHgg:after{opacity:.25}}.statuses-29yrFaoA.small-3_g6DSwX{border-radius:9px}.statuses-29yrFaoA.large-2E_Sb0cV{border-radius:11px}.statuses-29yrFaoA.blinking-2Xm4xMXd{will-change:opacity}.oneWidgetsVisible-17p3P_dQ.statuses-29yrFaoA,.threeWidgetsVisible-sIjrbNL1.statuses-29yrFaoA,.twoWidgetsVisible-3kEfsgAz.statuses-29yrFaoA{margin-left:11px;margin-right:12px}.statusItem-1gsKvHgg{display:flex;position:relative;-webkit-user-select:none;user-select:none}.statusItem-1gsKvHgg:after{content:"";display:block;position:absolute;top:0;left:0;width:100%;height:100%;opacity:.15;z-index:-1}.statusItem-1gsKvHgg svg{position:relative;top:50%;left:50%;transform:translate(-50%,-50%);z-index:0}.statusItem-1gsKvHgg.small-3_g6DSwX{width:18px;height:18px}.statusItem-1gsKvHgg.large-2E_Sb0cV{width:22px;height:22px}.statusItem-1gsKvHgg.blinking-2Xm4xMXd:after{animation:blinking-animation-1jTWzbXG 2.5s infinite cubic-bezier(.25,0,.75,1)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.statusItem-1gsKvHgg.blinking-2Xm4xMXd:after:hover{opacity:inherit}}.marketStatusOpen-2d8WAYHQ,html.theme-dark .marketStatusOpen-2d8WAYHQ{color:#009688}.marketStatusOpen-2d8WAYHQ:after,html.theme-dark .marketStatusOpen-2d8WAYHQ:after{background-color:#26a69a}.marketStatusClose-2LgI3IBx,html.theme-dark .marketStatusClose-2LgI3IBx{color:#9598a1}.marketStatusClose-2LgI3IBx:after,html.theme-dark .marketStatusClose-2LgI3IBx:after{background-color:#9598a1}.marketStatusPre-3tiNWinG,html.theme-dark .marketStatusPre-3tiNWinG{color:#fb8c00}.marketStatusPre-3tiNWinG:after,html.theme-dark .marketStatusPre-3tiNWinG:after{background-color:#ffa726}.marketStatusPost-1wCjJrHi,html.theme-dark .marketStatusPost-1wCjJrHi{color:#2196f3}.marketStatusPost-1wCjJrHi:after,html.theme-dark .marketStatusPost-1wCjJrHi:after{background-color:#42a5f5}.marketStatusHoliday-HyAcvqXa,html.theme-dark .marketStatusHoliday-HyAcvqXa{color:#9598a1}.marketStatusHoliday-HyAcvqXa:after,html.theme-dark .marketStatusHoliday-HyAcvqXa:after{background-color:#9598a1}.invalidSymbol-2tnvnmzm{color:#fff}.invalidSymbol-2tnvnmzm,html.theme-dark .invalidSymbol-2tnvnmzm{background-color:#ef5350}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.statuses-29yrFaoA .invalidSymbol-2tnvnmzm:hover{background-color:#d32f2f}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .statuses-29yrFaoA .invalidSymbol-2tnvnmzm:hover{background-color:#f44336}}.replayMode-2O_B03jx{color:#fff;background-color:#2196f3}html.theme-dark .replayMode-2O_B03jx{background-color:#1976d2;color:#e3f2fd}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.statuses-29yrFaoA .replayMode-2O_B03jx:hover,html.theme-dark .statuses-29yrFaoA .replayMode-2O_B03jx:hover{background-color:#1e88e5}}.notAccurate-2qEIEgim,html.theme-dark .notAccurate-2qEIEgim{color:#d81b60}.notAccurate-2qEIEgim.blinking-2Xm4xMXd{animation:blinking-color-animation-notaccurate-IBDzDS-b 2.5s infinite cubic-bezier(.25,0,.75,1)}.notAccurate-2qEIEgim:after,html.theme-dark .notAccurate-2qEIEgim:after{background-color:#ec407a}.delay-NXuSKUfA,html.theme-dark .delay-NXuSKUfA{color:#fb8c00}.delay-NXuSKUfA.blinking-2Xm4xMXd{animation:blinking-color-animation-delay-37meAg0d 2.5s infinite cubic-bezier(.25,0,.75,1)}.delay-NXuSKUfA:after,html.theme-dark .delay-NXuSKUfA:after{background-color:#ffa726}.eod-TNCDZArR,html.theme-dark .eod-TNCDZArR{color:#ab47bc}.eod-TNCDZArR.blinking-2Xm4xMXd{animation:blinking-color-animation-eod-1k5aef9K 2.5s infinite cubic-bezier(.25,0,.75,1)}.eod-TNCDZArR:after,html.theme-dark .eod-TNCDZArR:after{background-color:#ab47bc}.twoWidgetsVisible-3kEfsgAz .delay-NXuSKUfA,.twoWidgetsVisible-3kEfsgAz .eod-TNCDZArR,.twoWidgetsVisible-3kEfsgAz .notAccurate-2qEIEgim{padding-right:2px}.dataProblemHigh-2SJE6Anp{color:#fff;background-color:#ef5350}html.theme-dark .dataProblemHigh-2SJE6Anp{background-color:#ef5350}.dataProblemLow-iRGvvWWe,html.theme-dark .dataProblemLow-iRGvvWWe{color:#e53935}.dataProblemLow-iRGvvWWe:after,html.theme-dark .dataProblemLow-iRGvvWWe:after{background-color:#ef5350}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.statuses-29yrFaoA .dataProblemHigh-2SJE6Anp:hover{background-color:#d32f2f}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .statuses-29yrFaoA .dataProblemHigh-2SJE6Anp:hover{background-color:#f44336}}.threeWidgetsVisible-sIjrbNL1 .marketStatusClose-2LgI3IBx,.threeWidgetsVisible-sIjrbNL1 .marketStatusHoliday-HyAcvqXa,.threeWidgetsVisible-sIjrbNL1 .marketStatusOpen-2d8WAYHQ,.threeWidgetsVisible-sIjrbNL1 .marketStatusPost-1wCjJrHi,.threeWidgetsVisible-sIjrbNL1 .marketStatusPre-3tiNWinG,.twoWidgetsVisible-3kEfsgAz .marketStatusClose-2LgI3IBx,.twoWidgetsVisible-3kEfsgAz .marketStatusHoliday-HyAcvqXa,.twoWidgetsVisible-3kEfsgAz .marketStatusOpen-2d8WAYHQ,.twoWidgetsVisible-3kEfsgAz .marketStatusPost-1wCjJrHi,.twoWidgetsVisible-3kEfsgAz .marketStatusPre-3tiNWinG{padding-left:2px}.threeWidgetsVisible-sIjrbNL1 .dataProblemLow-iRGvvWWe,.twoWidgetsVisible-3kEfsgAz .dataProblemLow-iRGvvWWe{padding-right:2px}@keyframes blinking-animation-1jTWzbXG{0%,to{opacity:.15}50%{opacity:.4}}@keyframes blinking-color-animation-notaccurate-IBDzDS-b{0%,to{color:#d81b60}:global(html.theme-dark) 0%,:global(html.theme-dark) to{color:#d81b60}50%{color:#ad1457}}@keyframes blinking-color-animation-delay-37meAg0d{0%,to{color:#fb8c00}:global(html.theme-dark) 0%,:global(html.theme-dark) to{color:#fb8c00}50%{color:#ef6c00}}@keyframes blinking-color-animation-eod-1k5aef9K{0%,to{color:#ab47bc}:global(html.theme-dark) 0%,:global(html.theme-dark) to{color:#ab47bc}50%{color:#8e24aa}}.paneControls-3t_VmRy0{position:static;padding:0 5px 0 1px;margin-top:6px;z-index:7;color:#fff;transition:opacity .4s,visibility .4s}.paneControls-3t_VmRy0.hasTopMargin-2samtQKI{top:30px}.paneControls-3t_VmRy0.hidden-3ndYaA31{visibility:hidden;opacity:0}.paneControls-3t_VmRy0.forceHidden-2qoGxuLX{width:0;height:0;line-height:0;margin:0;padding:0}.button-1T73noHe{position:relative;display:flex;width:19px;height:19px;overflow:hidden;justify-content:center;align-items:center;flex:0 0 auto}.button-1T73noHe:not(:first-child){margin-left:4px}.button-1T73noHe .buttonIcon-1vsadlK4{color:#131722}.button-1T73noHe.minimize-UL6CPYKt .buttonIcon-1vsadlK4{color:#fff}.button-1T73noHe.newButton-2UJTRB7V{border-radius:4px}.touchMode-33C2amJm .button-1T73noHe{width:24px;height:24px}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.maximize-2gtRCsC0:hover .bracket-up{animation:maximize-animation-up-bracket-PKA42SoI .6s ease}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.maximize-2gtRCsC0:hover .bracket-down{animation:maximize-animation-down-bracket-6VpX9y4d .6s ease}}.maximize-2gtRCsC0 .bracket-down,.maximize-2gtRCsC0 .bracket-up{transform:translateY(0)}@keyframes maximize-animation-up-bracket-PKA42SoI{50%{transform:translateY(1px)}}@keyframes maximize-animation-down-bracket-6VpX9y4d{50%{transform:translateY(-1px)}}.minimize-UL6CPYKt{background-color:#2196f3!important;border-color:#2196f3!important}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.minimize-UL6CPYKt:hover .bracket-up{animation:minimize-animation-up-bracket-1ZcEx180 .6s ease}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.minimize-UL6CPYKt:hover .bracket-down{animation:minimize-animation-down-bracket-2sZM5-ln .6s ease}}.minimize-UL6CPYKt .bracket-down,.minimize-UL6CPYKt .bracket-up{transform:translateY(0)}@keyframes minimize-animation-up-bracket-1ZcEx180{50%{transform:translateY(-1px)}}@keyframes minimize-animation-down-bracket-2sZM5-ln{50%{transform:translateY(1px)}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.up-3-Dp9Ytc:hover .buttonIcon-1vsadlK4{animation:up-animation-2oGxHhg9 .6s ease}}@keyframes up-animation-2oGxHhg9{0%{transform:translateY(0)}50%{transform:translateY(-2px)}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.down-2qp_j-xN:hover .buttonIcon-1vsadlK4{animation:down-animation-28i3s7Bs .6s ease}}@keyframes down-animation-28i3s7Bs{0%{transform:translateY(0)}50%{transform:translateY(2px)}}.buttonsWrapper-326cDko9{display:flex;align-items:center;flex-wrap:nowrap;flex:0 0 auto}.chart-widget__top--themed-dark .paneControls-3t_VmRy0{color:#131722}.chart-widget__top--themed-dark .minimize-UL6CPYKt{background-color:#1976d2!important;border-color:#1976d2!important}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.chart-widget__top--themed-dark .button-1T73noHe:hover .buttonIcon-1vsadlK4{color:#f0f3fa}}.chart-widget__top--themed-dark .button-1T73noHe .buttonIcon-1vsadlK4{color:#d1d4dc} \ No newline at end of file diff --git a/public/charting_library/bundles/70.736727f897e2be517230.rtl.css b/public/charting_library/bundles/70.736727f897e2be517230.rtl.css new file mode 100644 index 00000000..d54af114 --- /dev/null +++ b/public/charting_library/bundles/70.736727f897e2be517230.rtl.css @@ -0,0 +1 @@ +.control-bar-wrapper{position:absolute;pointer-events:none;height:28px;z-index:1;direction:ltr}.control-bar{display:flex;visibility:visible;transition:opacity .3s,visibility .3s}.control-bar--hidden,.control-bar--hidden .control-bar__btn{visibility:hidden;opacity:0}.control-bar__group{display:flex;align-items:center;margin:0 7px}.control-bar__btn{display:inline-flex;align-items:center;justify-content:center;border-radius:50%;margin:0 4px;width:28px;height:28px;background-color:hsla(0,0%,100%,.75);color:#5d606b;box-shadow:0 1px 4px rgba(19,23,34,.2);pointer-events:auto;transition:background-color .3s,color .3s,visibility .4s,opacity .4s;-webkit-user-select:none;user-select:none;z-index:1;visibility:visible;opacity:1}.control-bar__btn--btn-hidden{visibility:hidden;opacity:0}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.control-bar__btn:hover{background-color:#fff;color:#131722}}.control-bar__btn:active{background-color:#f8f9fd;transition:none}.control-bar__btn--minimize{background-color:#2196f3;color:#fff}.control-bar__btn--minimize:active{color:#fff;background-color:#1e88e5}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.control-bar__btn--minimize:hover{color:#fff;background-color:#1e88e5}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.control-bar__btn--minimize:hover .corner-left-top{animation:animation-minimize-corner-left-top-1QFR0TYG .6s ease}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.control-bar__btn--minimize:hover .corner-right-top{animation:animation-minimize-corner-right-top-2OigqFDd .6s ease}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.control-bar__btn--minimize:hover .corner-right-bottom{animation:animation-minimize-corner-right-bottom-171Xjuh0 .6s ease}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.control-bar__btn--minimize:hover .corner-left-bottom{animation:animation-minimize-corner-left-bottom-Gj_EWVOk .6s ease}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.control-bar__btn--maximize:hover .corner-left-top{animation:animation-maximize-corner-left-top-1dOMET94 .6s ease}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.control-bar__btn--maximize:hover .corner-right-top{animation:animation-maximize-corner-right-top-X6SjWmdM .6s ease}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.control-bar__btn--maximize:hover .corner-right-bottom{animation:animation-maximize-corner-right-bottom-2lZ_pYbV .6s ease}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.control-bar__btn--maximize:hover .corner-left-bottom{animation:animation-maximize-corner-left-bottom-28bRbB5v .6s ease}}.chart-widget__bottom--themed-dark .control-bar__btn{background-color:rgba(30,34,45,.75);color:#b2b5be;box-shadow:0 2px 6px #000}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.chart-widget__bottom--themed-dark .control-bar__btn:hover{background-color:#1e222d;color:#d1d4dc}}.chart-widget__bottom--themed-dark .control-bar__btn:active{background-color:#2a2e39}.chart-widget__bottom--themed-dark .control-bar__btn--minimize{background-color:#1976d2;color:#bbdefb}.chart-widget__bottom--themed-dark .control-bar__btn--minimize:active{background-color:#1e88e5;color:#bbdefb}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.chart-widget__bottom--themed-dark .control-bar__btn--minimize:hover{background-color:#1e88e5;color:#bbdefb}}.control-bar__btn--back-present{position:absolute;right:2px}.control-bar__btn svg{pointer-events:none}@keyframes animation-maximize-corner-left-top-1dOMET94{50%{transform:translate(1px,-1px)}}@keyframes animation-maximize-corner-right-top-X6SjWmdM{50%{transform:translate(-1px,-1px)}}@keyframes animation-maximize-corner-right-bottom-2lZ_pYbV{50%{transform:translate(-1px,1px)}}@keyframes animation-maximize-corner-left-bottom-28bRbB5v{50%{transform:translate(1px,1px)}}@keyframes animation-minimize-corner-left-top-1QFR0TYG{50%{transform:translate(-1px,1px)}}@keyframes animation-minimize-corner-right-top-2OigqFDd{50%{transform:translate(1px,1px)}}@keyframes animation-minimize-corner-right-bottom-171Xjuh0{50%{transform:translate(1px,-1px)}}@keyframes animation-minimize-corner-left-bottom-Gj_EWVOk{50%{transform:translate(-1px,-1px)}}.loader-1ON1rkY9{content:"";position:absolute;display:none;height:22px;align-items:center;justify-content:center;top:50%;transform:translateY(-50%);left:2px;font-size:0}.loader-1ON1rkY9 .loaderItem-6asdclOe{width:5px;height:5px;opacity:1;border-radius:50%;transform:scale(.6);animation:loader-animation-1vbmOmyN .96s infinite ease-in-out both;background-color:#b2b5be}html.theme-dark .loader-1ON1rkY9 .loaderItem-6asdclOe{background-color:#787b86}.loader-1ON1rkY9 .loaderItem-6asdclOe:not(:last-child){margin-right:2px}.loader-1ON1rkY9 .loaderItem-6asdclOe:nth-child(2){transition-delay:.35s/3;animation-delay:.151s}.loader-1ON1rkY9 .loaderItem-6asdclOe:nth-child(3){transition-delay:(.35s/3)*2;animation-delay:.32s}.loader-1ON1rkY9.shown-1QFCxvPl{display:flex}@keyframes loader-animation-1vbmOmyN{0%,to{transform:scale(.6)}50%{transform:scale(.9)}}.chart-widget__top--themed-light .loader-1ON1rkY9 .loaderItem-6asdclOe{background-color:#b2b5be}html.theme-dark .chart-widget__top--themed-light .loader-1ON1rkY9 .loaderItem-6asdclOe{background-color:#787b86}.chart-widget__top--themed-dark .loader-1ON1rkY9 .loaderItem-6asdclOe{background-color:#b2b5be}html.theme-dark .chart-widget__top--themed-dark .loader-1ON1rkY9 .loaderItem-6asdclOe{background-color:#787b86}.touchMode-I-CBM3V3 .loader-1ON1rkY9{height:24px}.legend-29zvAld0{flex:1 1 auto;direction:ltr;max-width:100%;margin:0;padding-top:4px;color:transparent;line-height:normal;-webkit-user-select:none;user-select:none;transform:translateZ(0);contain:content;pointer-events:none;z-index:6}.item-3eXPhOmy{max-width:100%;min-height:24px;flex-wrap:wrap;font-size:13px;z-index:1;-webkit-backface-visibility:hidden;backface-visibility:hidden}.item-3eXPhOmy.series-12hzsxbp{margin:0 4px}.item-3eXPhOmy.selected-2qw9PFUJ,.item-3eXPhOmy.withAction-1y86Ymm9{z-index:2}.item-3eXPhOmy.last-3Xus0HXW{align-items:center;max-width:18px;order:100000;padding:0 4px;border:1px solid transparent;border-top-width:0;border-bottom-width:0;background-color:currentColor;cursor:default;pointer-events:auto}.item-3eXPhOmy.last-3Xus0HXW .text-1pYqyE6B{color:#131722}.item-3eXPhOmy .noWrapWrapper-AC879h-w{display:flex;flex-wrap:nowrap;max-width:100%}.noWrap-ODIQgNap .item-3eXPhOmy{flex-wrap:nowrap}.noWrap-ODIQgNap .series-12hzsxbp.item-3eXPhOmy{flex-wrap:wrap}.noWrap-ODIQgNap .series-12hzsxbp .valuesAdditionalWrapper-3BfAIuML{display:block;align-self:auto}.noWrap-ODIQgNap .series-12hzsxbp .valuesAdditionalWrapper-3BfAIuML .valueItem-3JDGGSt_,.noWrap-ODIQgNap .series-12hzsxbp .valuesAdditionalWrapper-3BfAIuML .valueTitle-1myNPdtH,.noWrap-ODIQgNap .series-12hzsxbp .valuesAdditionalWrapper-3BfAIuML .valueValue-3kA0oJs5{display:inline}.noWrap-ODIQgNap .series-12hzsxbp .valuesAdditionalWrapper-3BfAIuML .valueItem-3JDGGSt_:before,.noWrap-ODIQgNap .series-12hzsxbp .valuesAdditionalWrapper-3BfAIuML .valueTitle-1myNPdtH:before,.noWrap-ODIQgNap .series-12hzsxbp .valuesAdditionalWrapper-3BfAIuML .valueValue-3kA0oJs5:before{display:none}.noWrap-ODIQgNap .valuesWrapper-1ukbb5SP{align-items:center}.noWrap-ODIQgNap .valuesAdditionalWrapper-3BfAIuML{display:block;align-self:auto;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#131722}.directionColumn-abL_Vsle .series-12hzsxbp{flex-direction:column}.directionColumn-abL_Vsle .series-12hzsxbp .valuesWrapper-1ukbb5SP{max-width:100%;align-self:flex-start}.button-22Ex8G2W,.statusesWrapper-GnubQvDb,.titleWrapper-1Zs2rjQ6,.valueItem-3JDGGSt_{background-color:currentColor}.buttons-1-XhYDHM,.buttonsWrapper-3eBZpnXm,.item-3eXPhOmy,.statusesWrapper-GnubQvDb,.titleWrapper-1Zs2rjQ6,.valueItem-3JDGGSt_,.valuesWrapper-1ukbb5SP{display:flex}.statusesWrapper-GnubQvDb{z-index:1}.statusesWrapper-GnubQvDb,.titleWrapper-1Zs2rjQ6{position:relative;pointer-events:auto;cursor:default}.titleWrapper-1Zs2rjQ6{flex:0 0 auto;align-items:center;max-width:100%;overflow:hidden;padding:0 4px;border:1px solid transparent;border-left-width:0;box-sizing:border-box}.noActions-1D515O5o .titleWrapper-1Zs2rjQ6{pointer-events:none}.title-bcHj6pEn{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;min-width:23px;text-align:left;color:#131722}.title-bcHj6pEn.title2nd-2igtq1cH{min-width:auto}.disabled-3P6bUcMx .title-bcHj6pEn{color:#b2b5be}.disabled-3P6bUcMx.withCustomTextColor-Pw_dabsC .title-bcHj6pEn{color:#b2b5be!important}.study-lgC0tuTJ .title-bcHj6pEn.title1st-2at68hKe{min-width:15px;flex:0 4 auto}.study-lgC0tuTJ .title-bcHj6pEn.title2nd-2igtq1cH{min-width:0;padding-left:4px;flex:0 1 auto;color:#5d606b}.study-lgC0tuTJ.disabled-3P6bUcMx .title-bcHj6pEn.title2nd-2igtq1cH{color:#b2b5be}.study-lgC0tuTJ.disabled-3P6bUcMx.withCustomTextColor-Pw_dabsC .title-bcHj6pEn{color:#b2b5be!important}.study-lgC0tuTJ.hideValues-3JtC3-Os .valuesWrapper-1ukbb5SP{display:none}.legend-29zvAld0 .study-lgC0tuTJ.has5Buttons-3tuydZU5.selected-2qw9PFUJ.withTail-2tfD0t7T .valuesWrapper-1ukbb5SP:after,.legend-29zvAld0 .study-lgC0tuTJ.has5Buttons-3tuydZU5.stayInHoveredMode-3K55nNni.withTail-2tfD0t7T .valuesWrapper-1ukbb5SP:after{left:calc(var(--legend-source-item-button-width)*5)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.legend-29zvAld0:hover .study-lgC0tuTJ.has5Buttons-3tuydZU5.withAction-1y86Ymm9.withTail-2tfD0t7T .valuesWrapper-1ukbb5SP:after{left:calc(var(--legend-source-item-button-width)*5)}}.loading-37LPn65g .valuesWrapper-1ukbb5SP,.noWrap-ODIQgNap .valuesWrapper-1ukbb5SP,.series-12hzsxbp .valuesWrapper-1ukbb5SP{background-color:currentColor;border-top:1px solid transparent;border-bottom:1px solid transparent}.loader-iCjkbLoX{margin-left:4px}.noWrap-ODIQgNap .valuesAdditionalWrapper-3BfAIuML,.series-12hzsxbp .valuesAdditionalWrapper-3BfAIuML{border-left-color:transparent}.noWrap-ODIQgNap .valueItem-3JDGGSt_,.series-12hzsxbp .valueItem-3JDGGSt_{background-color:transparent}.noWrap-ODIQgNap .valueItem-3JDGGSt_,.noWrap-ODIQgNap .valueItem-3JDGGSt_ .valueTitle-1myNPdtH,.noWrap-ODIQgNap .valueItem-3JDGGSt_ .valueValue-3kA0oJs5,.series-12hzsxbp .valueItem-3JDGGSt_,.series-12hzsxbp .valueItem-3JDGGSt_ .valueTitle-1myNPdtH,.series-12hzsxbp .valueItem-3JDGGSt_ .valueValue-3kA0oJs5{display:inline-flex}.series-12hzsxbp .titleWrapper-1Zs2rjQ6{position:relative;max-width:100%;min-height:24px;font-size:16px;line-height:normal;align-items:center}.series-12hzsxbp .titleWrapper-1Zs2rjQ6 .title-bcHj6pEn.withDot-VrJCTK--:not(:first-child){position:relative;padding-left:12px}.series-12hzsxbp .titleWrapper-1Zs2rjQ6 .title-bcHj6pEn.withDot-VrJCTK--:not(:first-child):before{content:"\b7";position:absolute;left:0;top:0;width:12px;height:100%;font-size:16px;color:#c1c4cd;text-align:center;line-height:inherit}.series-12hzsxbp .titleWrapper-1Zs2rjQ6 .title-bcHj6pEn.title1st-2at68hKe{flex:0 1 auto}.series-12hzsxbp .titleWrapper-1Zs2rjQ6 .title-bcHj6pEn.title2nd-2igtq1cH{flex:0 0 auto}.series-12hzsxbp .titleWrapper-1Zs2rjQ6 .title-bcHj6pEn.title3rd-2bpagZ7H{flex:0 1 auto}.series-12hzsxbp .titleWrapper-1Zs2rjQ6 .title-bcHj6pEn.title4th-28_-ZX9R{flex:0 3 auto}.series-12hzsxbp .valuesWrapper-1ukbb5SP{border-bottom-width:3px;align-items:flex-end}.series-12hzsxbp .titleWrapper-1Zs2rjQ6,.series-12hzsxbp .valuesWrapper-1ukbb5SP{min-width:23px}.series-12hzsxbp .valuesWrapper-1ukbb5SP{display:flex}.hidden3Title-22u6NoOK .series-12hzsxbp .titleWrapper-1Zs2rjQ6 .title-bcHj6pEn.title3rd-2bpagZ7H,.microHidden2Title-37EAZYGX .series-12hzsxbp .titleWrapper-1Zs2rjQ6 .title-bcHj6pEn.title2nd-2igtq1cH,.single-visible .miniHidden2Title-1xHUL0G8 .series-12hzsxbp .titleWrapper-1Zs2rjQ6 .title-bcHj6pEn.title2nd-2igtq1cH{display:none}.legend-29zvAld0 .series-12hzsxbp.selected-2qw9PFUJ.withTail-2tfD0t7T .valuesWrapper-1ukbb5SP:after,.legend-29zvAld0 .series-12hzsxbp.stayInHoveredMode-3K55nNni.withTail-2tfD0t7T .valuesWrapper-1ukbb5SP:after{left:calc(var(--legend-source-item-button-width)*3)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.legend-29zvAld0:hover .series-12hzsxbp.withAction-1y86Ymm9.withTail-2tfD0t7T .valuesWrapper-1ukbb5SP:after{left:calc(var(--legend-source-item-button-width)*3)}}.legend-29zvAld0 .series-12hzsxbp.flagged-3lOrkL__.selected-2qw9PFUJ.withTail-2tfD0t7T .valuesWrapper-1ukbb5SP:after,.legend-29zvAld0 .series-12hzsxbp.flagged-3lOrkL__.stayInHoveredMode-3K55nNni.withTail-2tfD0t7T .valuesWrapper-1ukbb5SP:after{left:calc(var(--legend-source-item-button-width)*2)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.legend-29zvAld0:hover .series-12hzsxbp.flagged-3lOrkL__.withAction-1y86Ymm9.withTail-2tfD0t7T .valuesWrapper-1ukbb5SP:after{left:calc(var(--legend-source-item-button-width)*2)}}.selected-2qw9PFUJ .buttons-1-XhYDHM,.selected-2qw9PFUJ .titleWrapper-1Zs2rjQ6,.withAction-1y86Ymm9 .buttons-1-XhYDHM,.withAction-1y86Ymm9 .titleWrapper-1Zs2rjQ6{background-color:#fff}.selected-2qw9PFUJ .button-22Ex8G2W,.withAction-1y86Ymm9 .button-22Ex8G2W{background-color:transparent}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.selected-2qw9PFUJ .button-22Ex8G2W:hover:after{background-color:#e3f2fd}}.selected-2qw9PFUJ .titleWrapper-1Zs2rjQ6,.withAction-1y86Ymm9 .titleWrapper-1Zs2rjQ6,.withAction-1y86Ymm9.selected-2qw9PFUJ .titleWrapper-1Zs2rjQ6{border-radius:4px 0 0 4px}.medium-2Vr6MA2I.legend-29zvAld0 .item-3eXPhOmy.study-lgC0tuTJ.selected-2qw9PFUJ.withTail-2tfD0t7T .valuesWrapper-1ukbb5SP:after,.medium-2Vr6MA2I.legend-29zvAld0 .item-3eXPhOmy.study-lgC0tuTJ.stayInHoveredMode-3K55nNni.withTail-2tfD0t7T .valuesWrapper-1ukbb5SP:after{left:calc(var(--legend-source-item-button-width)*3)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.medium-2Vr6MA2I.legend-29zvAld0:hover .item-3eXPhOmy.study-lgC0tuTJ.withAction-1y86Ymm9.withTail-2tfD0t7T .valuesWrapper-1ukbb5SP:after{left:calc(var(--legend-source-item-button-width)*3)}}.minimized-25_VM9I8.legend-29zvAld0 .item-3eXPhOmy.study-lgC0tuTJ.selected-2qw9PFUJ.withTail-2tfD0t7T .valuesWrapper-1ukbb5SP:after,.minimized-25_VM9I8.legend-29zvAld0 .item-3eXPhOmy.study-lgC0tuTJ.stayInHoveredMode-3K55nNni.withTail-2tfD0t7T .valuesWrapper-1ukbb5SP:after{left:calc(var(--legend-source-item-button-width)*2)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.minimized-25_VM9I8.legend-29zvAld0:hover .item-3eXPhOmy.study-lgC0tuTJ.withAction-1y86Ymm9.withTail-2tfD0t7T .valuesWrapper-1ukbb5SP:after{left:calc(var(--legend-source-item-button-width)*2)}}.valuesWrapper-1ukbb5SP{position:relative;align-self:stretch;align-items:center;flex-wrap:wrap;overflow:hidden;pointer-events:auto;cursor:default}.valuesAdditionalWrapper-3BfAIuML{display:flex;flex-wrap:wrap;align-self:stretch;align-items:baseline;border-left:4px solid currentColor}.loading-37LPn65g .valuesWrapper-1ukbb5SP{min-width:24px}.disabled-3P6bUcMx .valuesWrapper-1ukbb5SP{display:none}.valueItem-3JDGGSt_{display:flex;align-self:stretch;align-items:center;text-align:left}.valueItem-3JDGGSt_:not(:last-child){padding-right:6px}.valueItem-3JDGGSt_:last-child{padding-right:4px}.valueItem-3JDGGSt_ .valueTitle-1myNPdtH{padding-right:1px}.valueItem-3JDGGSt_ .valueTitle-1myNPdtH,.valueItem-3JDGGSt_ .valueValue-3kA0oJs5{color:#131722}.loading-37LPn65g .valueItem-3JDGGSt_,.loading-37LPn65g .valuesAdditionalWrapper-3BfAIuML{opacity:0}.series-12hzsxbp .valueItem-3JDGGSt_:last-child{padding-right:6px}.series-12hzsxbp .valueItem-3JDGGSt_:last-child .title-bcHj6pEn{display:none}.series-12hzsxbp .valueItem-3JDGGSt_ .valueTitle-1myNPdtH{color:#5d606b}.buttonsWrapper-3eBZpnXm{position:relative;width:0;max-width:0;z-index:2}.micro-1-90nTmg .series-12hzsxbp .buttonsWrapper-3eBZpnXm{width:0;max-width:0}.disabled-3P6bUcMx .buttonsWrapper-3eBZpnXm,.flagged-3lOrkL__ .buttonsWrapper-3eBZpnXm{width:var(--legend-source-item-button-width);max-width:var(--legend-source-item-button-width)}.disabled-3P6bUcMx.series-12hzsxbp:not(.onlyOneButtonCanBeStick-16Vrffc6) .buttonsWrapper-3eBZpnXm{width:calc(var(--legend-source-item-button-width)*2);max-width:calc(var(--legend-source-item-button-width)*2)}.buttons-1-XhYDHM{display:flex;padding:0;align-items:center;flex-shrink:0;pointer-events:auto;opacity:0}.disabled-3P6bUcMx .buttons-1-XhYDHM,.flagged-3lOrkL__ .buttons-1-XhYDHM,.touchMode-2jC98z1- .buttons-1-XhYDHM{opacity:1}.noActions-1D515O5o .buttons-1-XhYDHM{pointer-events:none}.selected-2qw9PFUJ .buttons-1-XhYDHM,.withAction-1y86Ymm9 .buttons-1-XhYDHM{border-radius:0 4px 4px 0}.legend-29zvAld0 .selected-2qw9PFUJ .buttons-1-XhYDHM,.legend-29zvAld0 .stayInHoveredMode-3K55nNni .buttons-1-XhYDHM{cursor:default;opacity:1}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.legend-29zvAld0:hover .withAction-1y86Ymm9 .buttons-1-XhYDHM{cursor:default;opacity:1}}.legend-29zvAld0 .selected-2qw9PFUJ.withTail-2tfD0t7T .valuesWrapper-1ukbb5SP:after,.legend-29zvAld0 .stayInHoveredMode-3K55nNni.withTail-2tfD0t7T .valuesWrapper-1ukbb5SP:after{content:"";position:absolute;width:16px;height:18px;top:3px;left:calc(var(--legend-source-item-button-width)*4);background:radial-gradient(10px at 0 50%,currentColor 0,transparent 100%)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.legend-29zvAld0:hover .withAction-1y86Ymm9.withTail-2tfD0t7T .valuesWrapper-1ukbb5SP:after{content:"";position:absolute;width:16px;height:18px;top:3px;left:calc(var(--legend-source-item-button-width)*4);background:radial-gradient(10px at 0 50%,currentColor 0,transparent 100%)}}.button-22Ex8G2W{display:none;position:relative;width:var(--legend-source-item-button-width);justify-content:center;align-self:stretch;align-items:center;opacity:0;z-index:0}.buttonIcon-2lrp9MHZ{display:flex;color:#131722}.button-22Ex8G2W:last-child{border-radius:0 4px 4px 0}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.button-22Ex8G2W:hover:after{content:"";display:block;position:absolute;top:1px;right:0;bottom:1px;left:0;background-color:#f0f3fa;border-radius:2px;z-index:-1}}.button-22Ex8G2W.flag-1kqFt7GH>span{margin-top:-1px}.disabled-3P6bUcMx .buttonIcon-2lrp9MHZ{color:#131722}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.legend-29zvAld0:hover .study-lgC0tuTJ.invisibleHover-qowat1V5 .button-22Ex8G2W{display:flex}}.withAction-1y86Ymm9 .buttons-1-XhYDHM .button-22Ex8G2W:not(:first-child),.withAction-1y86Ymm9 .titleWrapper-1Zs2rjQ6{border-color:#d1d4dc}.selected-2qw9PFUJ .titleWrapper-1Zs2rjQ6:after,.withAction-1y86Ymm9 .titleWrapper-1Zs2rjQ6:after{background-color:#d1d4dc}.selected-2qw9PFUJ .buttons-1-XhYDHM,.withAction-1y86Ymm9 .buttons-1-XhYDHM{border:1px solid #d1d4dc;border-left:0}.selected-2qw9PFUJ .buttons-1-XhYDHM,.selected-2qw9PFUJ .buttons-1-XhYDHM .button-22Ex8G2W:not(:first-child),.selected-2qw9PFUJ .buttonsWrapper-3eBZpnXm,.selected-2qw9PFUJ .titleWrapper-1Zs2rjQ6{border-color:#2196f3}.buttons-1-XhYDHM .eye-3mqNMkLJ .animated-loading-eye,.buttons-1-XhYDHM .eye-3mqNMkLJ .crossed-eye,.buttons-1-XhYDHM .eye-3mqNMkLJ .loading-eye,.disabled-3P6bUcMx .buttons-1-XhYDHM .eye-3mqNMkLJ .animated-loading-eye,.disabled-3P6bUcMx .buttons-1-XhYDHM .eye-3mqNMkLJ .loading-eye,.disabled-3P6bUcMx .buttons-1-XhYDHM .eye-3mqNMkLJ .normal-eye,.medium-2Vr6MA2I .study-lgC0tuTJ .buttons-1-XhYDHM .button-22Ex8G2W:nth-child(2),.medium-2Vr6MA2I .study-lgC0tuTJ .buttons-1-XhYDHM .button-22Ex8G2W:nth-child(3):nth-last-child(3),.micro-1-90nTmg .series-12hzsxbp .buttons-1-XhYDHM .button-22Ex8G2W:not(:last-child),.minimized-25_VM9I8 .study-lgC0tuTJ .button-22Ex8G2W:not(:last-child):not(:first-child){display:none}.disabled-3P6bUcMx .buttons-1-XhYDHM .eye-3mqNMkLJ .crossed-eye{display:block}.hiddenLoading-hcuRRcWh .buttons-1-XhYDHM .eye-3mqNMkLJ .crossed-eye,.hiddenLoading-hcuRRcWh .buttons-1-XhYDHM .eye-3mqNMkLJ .normal-eye{display:none}.hiddenLoading-hcuRRcWh .buttons-1-XhYDHM .eye-3mqNMkLJ .animated-loading-eye,.hiddenLoading-hcuRRcWh .buttons-1-XhYDHM .eye-3mqNMkLJ .loading-eye{display:block}.hiddenLoading-hcuRRcWh .buttons-1-XhYDHM .eye-3mqNMkLJ .animated-loading-eye{transform-origin:center;animation:eye-animation-1pyfCZvS .96s linear infinite}.disabled-3P6bUcMx .buttons-1-XhYDHM .eye-3mqNMkLJ,.flagged-3lOrkL__ .buttons-1-XhYDHM .flag-1kqFt7GH,.selected-2qw9PFUJ .buttons-1-XhYDHM .button-22Ex8G2W,.series-12hzsxbp.disabled-3P6bUcMx .buttons-1-XhYDHM .flag-1kqFt7GH,.withAction-1y86Ymm9 .buttons-1-XhYDHM .button-22Ex8G2W{display:flex;opacity:1}.series-12hzsxbp.disabled-3P6bUcMx .flag-1kqFt7GH .buttonIcon-2lrp9MHZ{visibility:hidden}.selected-2qw9PFUJ.series-12hzsxbp.disabled-3P6bUcMx .flag-1kqFt7GH .buttonIcon-2lrp9MHZ,.series-12hzsxbp.disabled-3P6bUcMx.flagged-3lOrkL__ .flag-1kqFt7GH .buttonIcon-2lrp9MHZ,.withAction-1y86Ymm9.series-12hzsxbp.disabled-3P6bUcMx .flag-1kqFt7GH .buttonIcon-2lrp9MHZ{visibility:visible}.flag-1kqFt7GH .buttonIcon-2lrp9MHZ{flex:1;align-self:stretch}.flagWrapper-14Sd7MtI,.markerContainer-3MnDLQVD{display:flex;flex:1;justify-content:center}.markerContainer-3MnDLQVD{align-items:stretch}.flagWrapper-14Sd7MtI{width:12px}.flagWrapper-14Sd7MtI svg{height:12px}.sourcesWrapper-2JcXD9TK{display:flex;position:relative;margin:0 8px;align-items:flex-start;min-height:26px}.newCollapser-1F6pNRDi .sourcesWrapper-2JcXD9TK{flex-direction:column-reverse;margin:0 4px;min-height:auto}.sources-6Hp4M7li{display:flex;flex-direction:column;flex:1 1 auto;width:100%}.toggler-_SUZ7r_5{display:flex;position:relative;margin:2px 2px 0 0;flex:0 0 auto;align-items:center}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.toggler-_SUZ7r_5:hover:after{z-index:0}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.toggler-_SUZ7r_5:hover .counter-1hG1zy7A,.toggler-_SUZ7r_5:hover .iconArrow-3q7vxxnz,.toggler-_SUZ7r_5:hover .objectTree-2tLil0dm{color:#000}}.toggler-_SUZ7r_5 .counter-1hG1zy7A{display:none;padding-right:6px;font-size:13px;line-height:16px;color:inherit}.toggler-_SUZ7r_5 .iconArrow-3q7vxxnz{display:flex;transition:transform .1s cubic-bezier(.06,.52,1,.54)}.toggler-_SUZ7r_5 .objectTree-2tLil0dm{display:none}.toggler-_SUZ7r_5 .iconArrow-3q7vxxnz,.toggler-_SUZ7r_5 .objectTree-2tLil0dm{width:19px;height:19px;justify-content:center;align-items:center}.toggler-_SUZ7r_5 .counter-1hG1zy7A,.toggler-_SUZ7r_5 .iconArrow-3q7vxxnz,.toggler-_SUZ7r_5 .objectTree-2tLil0dm{position:relative;color:#131722;z-index:1}.newCollapser-1F6pNRDi .toggler-_SUZ7r_5{margin:2px 5px 0 0}.newCollapser-1F6pNRDi .toggler-_SUZ7r_5.onlyOneSourceShown-1dCmMKoj{display:none}.newCollapser-1F6pNRDi .toggler-_SUZ7r_5 .counter-1hG1zy7A{padding-right:4px}.newCollapser-1F6pNRDi .toggler-_SUZ7r_5 .iconArrow-3q7vxxnz{width:27px;transform:rotate(-180deg)}.newCollapser-1F6pNRDi .toggler-_SUZ7r_5 .objectTree-2tLil0dm{width:19px}.closed-1Sz6CztG.sourcesWrapper-2JcXD9TK{padding-bottom:4px}.closed-1Sz6CztG .toggler-_SUZ7r_5 .counter-1hG1zy7A{display:flex}.closed-1Sz6CztG .toggler-_SUZ7r_5 .iconArrow-3q7vxxnz{transform:rotate(-90deg)}.closed-1Sz6CztG .sources-6Hp4M7li{display:none}.newCollapser-1F6pNRDi .closed-1Sz6CztG .toggler-_SUZ7r_5 .iconArrow-3q7vxxnz{transform:rotate(0)}.newCollapser-1F6pNRDi .closed-1Sz6CztG .toggler-_SUZ7r_5 .iconArrow-3q7vxxnz,.newCollapser-1F6pNRDi .closed-1Sz6CztG .toggler-_SUZ7r_5 .objectTree-2tLil0dm{width:19px}.micro-1-90nTmg .sourcesWrapper-2JcXD9TK{padding-bottom:4px}.micro-1-90nTmg .toggler-_SUZ7r_5.objectsTreeCanBeShown-2R_D8NJP .objectTree-2tLil0dm,.micro-1-90nTmg .toggler-_SUZ7r_5.objectsTreeCanBeShown-2R_D8NJP.onlyOneSourceShown-1dCmMKoj{display:flex}.micro-1-90nTmg .closed-1Sz6CztG .toggler-_SUZ7r_5 .counter-1hG1zy7A,.micro-1-90nTmg .closed-1Sz6CztG .toggler-_SUZ7r_5 .iconArrow-3q7vxxnz,.micro-1-90nTmg .series-12hzsxbp .valuesWrapper-1ukbb5SP,.micro-1-90nTmg .sources-6Hp4M7li,.micro-1-90nTmg .toggler-_SUZ7r_5 .counter-1hG1zy7A,.micro-1-90nTmg .toggler-_SUZ7r_5 .iconArrow-3q7vxxnz{display:none}.touchMode-2jC98z1- .titleWrapper-1Zs2rjQ6{line-height:25px;height:26px}.touchMode-2jC98z1- .selected-2qw9PFUJ .titleWrapper-1Zs2rjQ6:after,.touchMode-2jC98z1- .withAction-1y86Ymm9 .titleWrapper-1Zs2rjQ6:after{top:5px;bottom:5px}.touchMode-2jC98z1- .series-12hzsxbp .titleWrapper-1Zs2rjQ6{min-height:26px}.touchMode-2jC98z1- .toggler-_SUZ7r_5{margin:0 2px 0 0}.touchMode-2jC98z1- .toggler-_SUZ7r_5 .iconArrow-3q7vxxnz,.touchMode-2jC98z1- .toggler-_SUZ7r_5 .objectTree-2tLil0dm{width:24px;height:24px}.touchMode-2jC98z1- .toggler-_SUZ7r_5 .counter-1hG1zy7A{font-size:14px}.touchMode-2jC98z1- .item-3eXPhOmy{min-height:26px}.newCollapser-1F6pNRDi.touchMode-2jC98z1- .toggler-_SUZ7r_5{margin:2px 5px 0 0}.newCollapser-1F6pNRDi.touchMode-2jC98z1- .toggler-_SUZ7r_5 .iconArrow-3q7vxxnz,.newCollapser-1F6pNRDi.touchMode-2jC98z1- .toggler-_SUZ7r_5 .objectTree-2tLil0dm{width:30px}.newCollapser-1F6pNRDi.touchMode-2jC98z1- .closed-1Sz6CztG .toggler-_SUZ7r_5 .iconArrow-3q7vxxnz,.newCollapser-1F6pNRDi.touchMode-2jC98z1- .closed-1Sz6CztG .toggler-_SUZ7r_5 .objectTree-2tLil0dm{width:24px}.chart-widget__top--themed-dark .item-3eXPhOmy.last-3Xus0HXW .text-1pYqyE6B,.chart-widget__top--themed-dark .noWrap-ODIQgNap .valuesAdditionalWrapper-3BfAIuML,.chart-widget__top--themed-dark .title-bcHj6pEn,.chart-widget__top--themed-dark .valueTitle-1myNPdtH,.chart-widget__top--themed-dark .valueValue-3kA0oJs5{color:#b2b5be}.chart-widget__top--themed-dark .disabled-3P6bUcMx .title-bcHj6pEn,.chart-widget__top--themed-dark .disabled-3P6bUcMx .valueTitle-1myNPdtH,.chart-widget__top--themed-dark .disabled-3P6bUcMx .valueValue-3kA0oJs5{color:#434651}.chart-widget__top--themed-dark .disabled-3P6bUcMx.withCustomTextColor-Pw_dabsC .title-bcHj6pEn,.chart-widget__top--themed-dark .disabled-3P6bUcMx.withCustomTextColor-Pw_dabsC .valueTitle-1myNPdtH,.chart-widget__top--themed-dark .disabled-3P6bUcMx.withCustomTextColor-Pw_dabsC .valueValue-3kA0oJs5{color:#434651!important}.chart-widget__top--themed-dark .study-lgC0tuTJ .title-bcHj6pEn.title2nd-2igtq1cH{color:#868993}.chart-widget__top--themed-dark .study-lgC0tuTJ.disabled-3P6bUcMx .title-bcHj6pEn.title2nd-2igtq1cH{color:#434651}.chart-widget__top--themed-dark .study-lgC0tuTJ.withCustomTextColor-Pw_dabsC.disabled-3P6bUcMx .title-bcHj6pEn.title2nd-2igtq1cH{color:#434651!important}.chart-widget__top--themed-dark .series-12hzsxbp .titleWrapper-1Zs2rjQ6 .title-bcHj6pEn.withDot-VrJCTK--:not(:first-child):before{color:#434651}.chart-widget__top--themed-dark .buttonIcon-2lrp9MHZ,.chart-widget__top--themed-dark .series-12hzsxbp .valueItem-3JDGGSt_ .valueTitle-1myNPdtH{color:#b2b5be}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.chart-widget__top--themed-dark .button-22Ex8G2W:hover:after{background-color:#2a2e39}}.chart-widget__top--themed-dark .withAction-1y86Ymm9 .buttons-1-XhYDHM,.chart-widget__top--themed-dark .withAction-1y86Ymm9 .buttons-1-XhYDHM .button-22Ex8G2W:not(:first-child),.chart-widget__top--themed-dark .withAction-1y86Ymm9 .titleWrapper-1Zs2rjQ6{border-color:#363a45}.chart-widget__top--themed-dark .selected-2qw9PFUJ .titleWrapper-1Zs2rjQ6:after,.chart-widget__top--themed-dark .withAction-1y86Ymm9 .titleWrapper-1Zs2rjQ6:after{background-color:#363a45}.chart-widget__top--themed-dark .selected-2qw9PFUJ .buttons-1-XhYDHM,.chart-widget__top--themed-dark .selected-2qw9PFUJ .titleWrapper-1Zs2rjQ6,.chart-widget__top--themed-dark .withAction-1y86Ymm9 .buttons-1-XhYDHM,.chart-widget__top--themed-dark .withAction-1y86Ymm9 .titleWrapper-1Zs2rjQ6{background-color:#131722}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.chart-widget__top--themed-dark .selected-2qw9PFUJ .button-22Ex8G2W:hover:after{background-color:rgba(25,118,210,.2)}}.chart-widget__top--themed-dark .selected-2qw9PFUJ .buttons-1-XhYDHM,.chart-widget__top--themed-dark .selected-2qw9PFUJ .buttons-1-XhYDHM .button-22Ex8G2W:not(:first-child),.chart-widget__top--themed-dark .selected-2qw9PFUJ .buttonsWrapper-3eBZpnXm,.chart-widget__top--themed-dark .selected-2qw9PFUJ .titleWrapper-1Zs2rjQ6{border-color:#1976d2}.chart-widget__top--themed-dark .toggler-_SUZ7r_5{border-color:#363a45}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.chart-widget__top--themed-dark .toggler-_SUZ7r_5:hover:after{background-color:hsla(0,0%,100%,.1)}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.chart-widget__top--themed-dark .toggler-_SUZ7r_5:hover .counter-1hG1zy7A,.chart-widget__top--themed-dark .toggler-_SUZ7r_5:hover .iconArrow-3q7vxxnz,.chart-widget__top--themed-dark .toggler-_SUZ7r_5:hover .objectTree-2tLil0dm{color:#f0f3fa}}.chart-widget__top--themed-dark .toggler-_SUZ7r_5 .counter-1hG1zy7A,.chart-widget__top--themed-dark .toggler-_SUZ7r_5 .iconArrow-3q7vxxnz,.chart-widget__top--themed-dark .toggler-_SUZ7r_5 .objectTree-2tLil0dm{color:#d1d4dc}@keyframes eye-animation-1pyfCZvS{to{transform:rotate(1turn)}}.blockHidden-pECc1q1w{display:none!important}.pane-button-3IbFaPrJ{border:1px solid #d1d4dc;border-radius:3px;background-color:currentColor;cursor:default;pointer-events:all}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.pane-button-3IbFaPrJ:hover:after{content:"";display:block;position:absolute;top:0;left:0;bottom:0;right:0;background-color:rgba(19,23,34,.06);border-radius:3px;z-index:0}}.chart-widget__top--themed-dark .pane-button-3IbFaPrJ{border-color:#363a45}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.chart-widget__top--themed-dark .pane-button-3IbFaPrJ:hover:after{background-color:hsla(0,0%,100%,.1)}}.statuses-29yrFaoA{display:inline-flex;border-radius:9px;overflow:hidden;align-self:center}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.statuses-29yrFaoA:hover .statusItem-1gsKvHgg:after{opacity:.25}}.statuses-29yrFaoA.small-3_g6DSwX{border-radius:9px}.statuses-29yrFaoA.large-2E_Sb0cV{border-radius:11px}.statuses-29yrFaoA.blinking-2Xm4xMXd{will-change:opacity}.oneWidgetsVisible-17p3P_dQ.statuses-29yrFaoA,.threeWidgetsVisible-sIjrbNL1.statuses-29yrFaoA,.twoWidgetsVisible-3kEfsgAz.statuses-29yrFaoA{margin-right:11px;margin-left:12px}.statusItem-1gsKvHgg{display:flex;position:relative;-webkit-user-select:none;user-select:none}.statusItem-1gsKvHgg:after{content:"";display:block;position:absolute;top:0;right:0;width:100%;height:100%;opacity:.15;z-index:-1}.statusItem-1gsKvHgg svg{position:relative;top:50%;right:50%;transform:translate(50%,-50%);z-index:0}.statusItem-1gsKvHgg.small-3_g6DSwX{width:18px;height:18px}.statusItem-1gsKvHgg.large-2E_Sb0cV{width:22px;height:22px}.statusItem-1gsKvHgg.blinking-2Xm4xMXd:after{animation:blinking-animation-1jTWzbXG 2.5s infinite cubic-bezier(.25,0,.75,1)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.statusItem-1gsKvHgg.blinking-2Xm4xMXd:after:hover{opacity:inherit}}.marketStatusOpen-2d8WAYHQ,html.theme-dark .marketStatusOpen-2d8WAYHQ{color:#009688}.marketStatusOpen-2d8WAYHQ:after,html.theme-dark .marketStatusOpen-2d8WAYHQ:after{background-color:#26a69a}.marketStatusClose-2LgI3IBx,html.theme-dark .marketStatusClose-2LgI3IBx{color:#9598a1}.marketStatusClose-2LgI3IBx:after,html.theme-dark .marketStatusClose-2LgI3IBx:after{background-color:#9598a1}.marketStatusPre-3tiNWinG,html.theme-dark .marketStatusPre-3tiNWinG{color:#fb8c00}.marketStatusPre-3tiNWinG:after,html.theme-dark .marketStatusPre-3tiNWinG:after{background-color:#ffa726}.marketStatusPost-1wCjJrHi,html.theme-dark .marketStatusPost-1wCjJrHi{color:#2196f3}.marketStatusPost-1wCjJrHi:after,html.theme-dark .marketStatusPost-1wCjJrHi:after{background-color:#42a5f5}.marketStatusHoliday-HyAcvqXa,html.theme-dark .marketStatusHoliday-HyAcvqXa{color:#9598a1}.marketStatusHoliday-HyAcvqXa:after,html.theme-dark .marketStatusHoliday-HyAcvqXa:after{background-color:#9598a1}.invalidSymbol-2tnvnmzm{color:#fff}.invalidSymbol-2tnvnmzm,html.theme-dark .invalidSymbol-2tnvnmzm{background-color:#ef5350}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.statuses-29yrFaoA .invalidSymbol-2tnvnmzm:hover{background-color:#d32f2f}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .statuses-29yrFaoA .invalidSymbol-2tnvnmzm:hover{background-color:#f44336}}.replayMode-2O_B03jx{color:#fff;background-color:#2196f3}html.theme-dark .replayMode-2O_B03jx{background-color:#1976d2;color:#e3f2fd}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.statuses-29yrFaoA .replayMode-2O_B03jx:hover,html.theme-dark .statuses-29yrFaoA .replayMode-2O_B03jx:hover{background-color:#1e88e5}}.notAccurate-2qEIEgim,html.theme-dark .notAccurate-2qEIEgim{color:#d81b60}.notAccurate-2qEIEgim.blinking-2Xm4xMXd{animation:blinking-color-animation-notaccurate-IBDzDS-b 2.5s infinite cubic-bezier(.25,0,.75,1)}.notAccurate-2qEIEgim:after,html.theme-dark .notAccurate-2qEIEgim:after{background-color:#ec407a}.delay-NXuSKUfA,html.theme-dark .delay-NXuSKUfA{color:#fb8c00}.delay-NXuSKUfA.blinking-2Xm4xMXd{animation:blinking-color-animation-delay-37meAg0d 2.5s infinite cubic-bezier(.25,0,.75,1)}.delay-NXuSKUfA:after,html.theme-dark .delay-NXuSKUfA:after{background-color:#ffa726}.eod-TNCDZArR,html.theme-dark .eod-TNCDZArR{color:#ab47bc}.eod-TNCDZArR.blinking-2Xm4xMXd{animation:blinking-color-animation-eod-1k5aef9K 2.5s infinite cubic-bezier(.25,0,.75,1)}.eod-TNCDZArR:after,html.theme-dark .eod-TNCDZArR:after{background-color:#ab47bc}.twoWidgetsVisible-3kEfsgAz .delay-NXuSKUfA,.twoWidgetsVisible-3kEfsgAz .eod-TNCDZArR,.twoWidgetsVisible-3kEfsgAz .notAccurate-2qEIEgim{padding-left:2px}.dataProblemHigh-2SJE6Anp{color:#fff;background-color:#ef5350}html.theme-dark .dataProblemHigh-2SJE6Anp{background-color:#ef5350}.dataProblemLow-iRGvvWWe,html.theme-dark .dataProblemLow-iRGvvWWe{color:#e53935}.dataProblemLow-iRGvvWWe:after,html.theme-dark .dataProblemLow-iRGvvWWe:after{background-color:#ef5350}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.statuses-29yrFaoA .dataProblemHigh-2SJE6Anp:hover{background-color:#d32f2f}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .statuses-29yrFaoA .dataProblemHigh-2SJE6Anp:hover{background-color:#f44336}}.threeWidgetsVisible-sIjrbNL1 .marketStatusClose-2LgI3IBx,.threeWidgetsVisible-sIjrbNL1 .marketStatusHoliday-HyAcvqXa,.threeWidgetsVisible-sIjrbNL1 .marketStatusOpen-2d8WAYHQ,.threeWidgetsVisible-sIjrbNL1 .marketStatusPost-1wCjJrHi,.threeWidgetsVisible-sIjrbNL1 .marketStatusPre-3tiNWinG,.twoWidgetsVisible-3kEfsgAz .marketStatusClose-2LgI3IBx,.twoWidgetsVisible-3kEfsgAz .marketStatusHoliday-HyAcvqXa,.twoWidgetsVisible-3kEfsgAz .marketStatusOpen-2d8WAYHQ,.twoWidgetsVisible-3kEfsgAz .marketStatusPost-1wCjJrHi,.twoWidgetsVisible-3kEfsgAz .marketStatusPre-3tiNWinG{padding-right:2px}.threeWidgetsVisible-sIjrbNL1 .dataProblemLow-iRGvvWWe,.twoWidgetsVisible-3kEfsgAz .dataProblemLow-iRGvvWWe{padding-left:2px}@keyframes blinking-animation-1jTWzbXG{0%,to{opacity:.15}50%{opacity:.4}}@keyframes blinking-color-animation-notaccurate-IBDzDS-b{0%,to{color:#d81b60}:global(html.theme-dark) 0%,:global(html.theme-dark) to{color:#d81b60}50%{color:#ad1457}}@keyframes blinking-color-animation-delay-37meAg0d{0%,to{color:#fb8c00}:global(html.theme-dark) 0%,:global(html.theme-dark) to{color:#fb8c00}50%{color:#ef6c00}}@keyframes blinking-color-animation-eod-1k5aef9K{0%,to{color:#ab47bc}:global(html.theme-dark) 0%,:global(html.theme-dark) to{color:#ab47bc}50%{color:#8e24aa}}.paneControls-3t_VmRy0{position:static;padding:0 1px 0 5px;margin-top:6px;z-index:7;color:#fff;transition:opacity .4s,visibility .4s}.paneControls-3t_VmRy0.hasTopMargin-2samtQKI{top:30px}.paneControls-3t_VmRy0.hidden-3ndYaA31{visibility:hidden;opacity:0}.paneControls-3t_VmRy0.forceHidden-2qoGxuLX{width:0;height:0;line-height:0;margin:0;padding:0}.button-1T73noHe{position:relative;display:flex;width:19px;height:19px;overflow:hidden;justify-content:center;align-items:center;flex:0 0 auto}.button-1T73noHe:not(:first-child){margin-left:4px}.button-1T73noHe .buttonIcon-1vsadlK4{color:#131722}.button-1T73noHe.minimize-UL6CPYKt .buttonIcon-1vsadlK4{color:#fff}.button-1T73noHe.newButton-2UJTRB7V{border-radius:4px}.touchMode-33C2amJm .button-1T73noHe{width:24px;height:24px}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.maximize-2gtRCsC0:hover .bracket-up{animation:maximize-animation-up-bracket-PKA42SoI .6s ease}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.maximize-2gtRCsC0:hover .bracket-down{animation:maximize-animation-down-bracket-6VpX9y4d .6s ease}}.maximize-2gtRCsC0 .bracket-down,.maximize-2gtRCsC0 .bracket-up{transform:translateY(0)}@keyframes maximize-animation-up-bracket-PKA42SoI{50%{transform:translateY(1px)}}@keyframes maximize-animation-down-bracket-6VpX9y4d{50%{transform:translateY(-1px)}}.minimize-UL6CPYKt{background-color:#2196f3!important;border-color:#2196f3!important}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.minimize-UL6CPYKt:hover .bracket-up{animation:minimize-animation-up-bracket-1ZcEx180 .6s ease}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.minimize-UL6CPYKt:hover .bracket-down{animation:minimize-animation-down-bracket-2sZM5-ln .6s ease}}.minimize-UL6CPYKt .bracket-down,.minimize-UL6CPYKt .bracket-up{transform:translateY(0)}@keyframes minimize-animation-up-bracket-1ZcEx180{50%{transform:translateY(-1px)}}@keyframes minimize-animation-down-bracket-2sZM5-ln{50%{transform:translateY(1px)}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.up-3-Dp9Ytc:hover .buttonIcon-1vsadlK4{animation:up-animation-2oGxHhg9 .6s ease}}@keyframes up-animation-2oGxHhg9{0%{transform:translateY(0)}50%{transform:translateY(-2px)}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.down-2qp_j-xN:hover .buttonIcon-1vsadlK4{animation:down-animation-28i3s7Bs .6s ease}}@keyframes down-animation-28i3s7Bs{0%{transform:translateY(0)}50%{transform:translateY(2px)}}.buttonsWrapper-326cDko9{display:flex;align-items:center;flex-wrap:nowrap;flex:0 0 auto}.chart-widget__top--themed-dark .paneControls-3t_VmRy0{color:#131722}.chart-widget__top--themed-dark .minimize-UL6CPYKt{background-color:#1976d2!important;border-color:#1976d2!important}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.chart-widget__top--themed-dark .button-1T73noHe:hover .buttonIcon-1vsadlK4{color:#f0f3fa}}.chart-widget__top--themed-dark .button-1T73noHe .buttonIcon-1vsadlK4{color:#d1d4dc} \ No newline at end of file diff --git a/public/charting_library/bundles/70464b308617ebaa2bc504b4a50c3463.svg b/public/charting_library/bundles/70464b308617ebaa2bc504b4a50c3463.svg new file mode 100644 index 00000000..e25d5241 --- /dev/null +++ b/public/charting_library/bundles/70464b308617ebaa2bc504b4a50c3463.svg @@ -0,0 +1 @@ + diff --git a/public/charting_library/bundles/71.0647b6ab152cbbfe213f.js b/public/charting_library/bundles/71.0647b6ab152cbbfe213f.js new file mode 100644 index 00000000..eaab8afc --- /dev/null +++ b/public/charting_library/bundles/71.0647b6ab152cbbfe213f.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[71],[]]); \ No newline at end of file diff --git a/public/charting_library/bundles/71.56b42534718929251c6c.css b/public/charting_library/bundles/71.56b42534718929251c6c.css new file mode 100644 index 00000000..2971d65b --- /dev/null +++ b/public/charting_library/bundles/71.56b42534718929251c6c.css @@ -0,0 +1 @@ +.calendar-H-c9lyXG{display:flex;flex-direction:column;width:100%;height:100%;direction:ltr;-webkit-user-select:none;user-select:none;border-radius:3px;background-color:#fff;box-shadow:0 2px 4px 0 rgba(107,121,136,.4)}html.theme-dark .calendar-H-c9lyXG{background-color:#1e222d;box-shadow:0 2px 4px 0 #000}.header-29jmPJB_{flex:0 0 50px;display:flex;align-items:center;height:50px;box-sizing:border-box;background:#fff;border-bottom:1px solid;border-color:#eceff2}html.theme-dark .header-29jmPJB_{border-color:#363c4e;background:#1e222d}.header-29jmPJB_>*{flex-grow:1;display:block}.header-29jmPJB_ .title-3BLccpWI{text-align:center;font-size:22px;color:#262b3e}html.theme-dark .header-29jmPJB_ .title-3BLccpWI{color:#c5cbce}.header-29jmPJB_ .titleDay-3Mp9czBi{color:#2196f3}html.theme-dark .header-29jmPJB_ .titleDay-3Mp9czBi{color:#1976d2}.header-29jmPJB_ .switchBtn-p718bDyp{cursor:pointer}.header-29jmPJB_ .switchBtn-p718bDyp>svg{fill:#262b3e;height:13px}html.theme-dark .header-29jmPJB_ .switchBtn-p718bDyp>svg{fill:#c5cbce}.header-29jmPJB_ .switchBtn-p718bDyp.prev-1vUszsRH>svg{float:left;margin-left:12px}.header-29jmPJB_ .switchBtn-p718bDyp.next-Xxv3BCz0>svg{float:right;margin-right:12px}.month-14xTSVpQ{flex:1 1 auto;display:flex;flex-direction:column;background:#fff}html.theme-dark .month-14xTSVpQ{background:#262b3e}.month-14xTSVpQ .weekdays-p5haX_xf{display:flex;flex-direction:row;padding:6px 0;background-color:#f7f8fa;border:1px solid;border-top:0;border-color:#f7f8fa}html.theme-dark .month-14xTSVpQ .weekdays-p5haX_xf{border-color:#1c2030;background-color:#1c2030}.month-14xTSVpQ .weekdays-p5haX_xf>span{flex:1 1;text-align:center;font-size:13px;color:#8797a5}.month-14xTSVpQ .weeks-1LCs6d3o{flex:1 1 auto;display:flex;flex-direction:column;border-left:1px solid;border-color:#f7f8fa}html.theme-dark .month-14xTSVpQ .weeks-1LCs6d3o{border-color:#1c2030}.month-14xTSVpQ .weeks-1LCs6d3o .week-49DNXkE3{flex:1 1 auto;display:flex;flex-direction:row}.month-14xTSVpQ .weeks-1LCs6d3o .week-49DNXkE3 .day-3x8ZipuB{flex:1 1 40px;height:40px;display:flex;font-size:14px;color:#262b3e;cursor:pointer;position:relative;box-sizing:border-box;border-bottom:1px solid;border-right:1px solid;padding:2px 1px 1px 2px;border-color:#f7f8fa;transition:background-color 60ms ease}html.theme-dark .month-14xTSVpQ .weeks-1LCs6d3o .week-49DNXkE3 .day-3x8ZipuB{border-color:#1c2030;color:#c5cbce}.month-14xTSVpQ .weeks-1LCs6d3o .week-49DNXkE3 .day-3x8ZipuB>span{flex:1 1;align-self:center;text-align:center}.month-14xTSVpQ .weeks-1LCs6d3o .week-49DNXkE3 .day-3x8ZipuB:active:not(.disabled-34cO1Z8u){background-color:#f7f8fa}html.theme-dark .month-14xTSVpQ .weeks-1LCs6d3o .week-49DNXkE3 .day-3x8ZipuB:active:not(.disabled-34cO1Z8u){background-color:#1c2030}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.month-14xTSVpQ .weeks-1LCs6d3o .week-49DNXkE3 .day-3x8ZipuB:hover:not(.disabled-34cO1Z8u){background-color:rgba(247,248,250,.5)}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .month-14xTSVpQ .weeks-1LCs6d3o .week-49DNXkE3 .day-3x8ZipuB:hover:not(.disabled-34cO1Z8u){background-color:rgba(28,32,48,.5)}}.month-14xTSVpQ .weeks-1LCs6d3o .week-49DNXkE3 .day-3x8ZipuB.selected-qmTqaBK3{color:#2196f3;border:2px solid;padding:0;border-color:#2196f3;margin-top:-1px;margin-left:-1px;z-index:1}html.theme-dark .month-14xTSVpQ .weeks-1LCs6d3o .week-49DNXkE3 .day-3x8ZipuB.selected-qmTqaBK3{border-color:#1976d2;color:#1976d2}.month-14xTSVpQ .weeks-1LCs6d3o .week-49DNXkE3 .day-3x8ZipuB.disabled-34cO1Z8u{color:#c5cbce;cursor:not-allowed}html.theme-dark .month-14xTSVpQ .weeks-1LCs6d3o .week-49DNXkE3 .day-3x8ZipuB.disabled-34cO1Z8u{color:#4c525e}.month-14xTSVpQ .weeks-1LCs6d3o .week-49DNXkE3 .day-3x8ZipuB.currentDay-3sTNH-Yi{color:#2196f3}html.theme-dark .month-14xTSVpQ .weeks-1LCs6d3o .week-49DNXkE3 .day-3x8ZipuB.currentDay-3sTNH-Yi{color:#1976d2}.month-14xTSVpQ .weeks-1LCs6d3o .week-49DNXkE3 .day-3x8ZipuB.currentDay-3sTNH-Yi:after{position:absolute;top:0;right:-1px;content:" ";width:0;height:0;border-style:solid;border-width:0 11px 11px 0;border-color:transparent #2196f3 transparent transparent}.month-14xTSVpQ .weeks-1LCs6d3o .week-49DNXkE3 .day-3x8ZipuB.selected-qmTqaBK3.currentDay-3sTNH-Yi:after{top:-2px;right:-2px}.month-14xTSVpQ .weeks-1LCs6d3o .week-49DNXkE3 .day-3x8ZipuB.otherMonth-1WMn4XfI{color:#c5cbce}html.theme-dark .month-14xTSVpQ .weeks-1LCs6d3o .week-49DNXkE3 .day-3x8ZipuB.otherMonth-1WMn4XfI{color:#4c525e}.month-14xTSVpQ .weeks-1LCs6d3o .week-49DNXkE3:last-child .day-3x8ZipuB{border-bottom:0}.calendar-Q5DuQzKD{width:280px}.field-1YbeVGCL{position:relative;display:flex;flex-grow:1}.field-1YbeVGCL .errorIcon-3nKBmNTE,.field-1YbeVGCL .warningIcon-2FTdXbRt{position:absolute;right:2px;top:2px;padding:6px 7px;border-radius:4px;background-color:#fff;display:inline-flex}html.theme-dark .field-1YbeVGCL .errorIcon-3nKBmNTE,html.theme-dark .field-1YbeVGCL .warningIcon-2FTdXbRt{background-color:#131722}.field-1YbeVGCL .errorIcon-3nKBmNTE svg,.field-1YbeVGCL .warningIcon-2FTdXbRt svg{width:18px;height:18px}.field-1YbeVGCL .errorIcon--large-1UBncQuh,.field-1YbeVGCL .warningIcon--large-2-nZYwjj{top:8px}.field-1YbeVGCL .errorIcon--small-3eBcxlqP,.field-1YbeVGCL .warningIcon--small-60SRfITp{right:5px;padding:3px}.field-1YbeVGCL .errorIcon--xsmall-8a2JUSk7,.field-1YbeVGCL .warningIcon--xsmall-2rOz7ig5{right:7px;top:2px;padding:0}.field-1YbeVGCL .errorIcon--xsmall-8a2JUSk7 svg,.field-1YbeVGCL .warningIcon--xsmall-2rOz7ig5 svg{width:14px;height:14px}.field-1YbeVGCL .errorIcon-3nKBmNTE{color:#ff4a68}.field-1YbeVGCL .warningIcon-2FTdXbRt{color:#ffca3b}.textInput-3SndIvsX{color:#4a4a4a;background-color:#fff}html.theme-dark .textInput-3SndIvsX{background-color:#1e222d;color:#c5cbce}.inputWrapper-u_TvMxrq{display:block}.field-3OP1xeZc .errorIcon-AjhrEkSc,.field-3OP1xeZc .warningIcon-309b7fMg{background-color:#fff}html.theme-dark .field-3OP1xeZc .errorIcon-AjhrEkSc,html.theme-dark .field-3OP1xeZc .warningIcon-309b7fMg{background-color:#1e222d}.pickerInput-3XGDmslV{position:relative}.pickerInput-3XGDmslV .inputIcon-1N28V7pi{display:inline-flex;position:absolute;right:9px;top:9px;cursor:pointer;opacity:.5}.pickerInput-3XGDmslV .inputIcon-1N28V7pi svg{height:16px;width:16px;fill:#7d7d7d}html.theme-dark .pickerInput-3XGDmslV .inputIcon-1N28V7pi svg{fill:#758696}.pickerInput-3XGDmslV .inputIcon-1N28V7pi.disabled-aKY-xwhe{opacity:.1}.pickerInput-3XGDmslV .inputIcon--large-91Ho2uuh{top:16px}.pickerInput-3XGDmslV .inputIcon--small-93KX0qGd{top:6px}.pickerInput-3XGDmslV .inputIcon--xsmall-1GLk5pdh{top:2px}.picker-HQJc7fVy{z-index:99;transition:opacity .2625s ease}.fixed-QBCsU0Gi{position:fixed}.absolute-2hW9cE-c{position:absolute}.nativePicker-1F6noucK{position:absolute;box-sizing:border-box;width:100%;height:100%;opacity:0;top:0}.clock-3pqBsiNm{display:flex;flex-direction:column;border-radius:3px;background-color:#fff;box-shadow:0 2px 4px 0 rgba(107,121,136,.4)}html.theme-dark .clock-3pqBsiNm{background-color:#1e222d;box-shadow:0 2px 4px 0 #000}.header-pTWMGSpm{flex:0 0 50px;height:50px;box-sizing:border-box;font-size:24px;line-height:1;text-align:center;padding:10px 0;border-bottom:1px solid;border-bottom-color:#eceff2;color:#262b3e}html.theme-dark .header-pTWMGSpm{color:#c5cbce;border-bottom-color:#363c4e}.header-pTWMGSpm .number-9PC9lvyt{padding:0 3px;cursor:pointer}.header-pTWMGSpm .number-9PC9lvyt.active-1sonmMLV{color:#2196f3}.body-2Q-g3GDd{padding:10px;background:#f7f8fa;flex:1 1 auto;display:flex;flex-direction:column;justify-content:center}html.theme-dark .body-2Q-g3GDd{background:#1c2030}.clockFace-eHYbqh-S{position:relative;width:200px;height:200px;border-radius:50%;box-sizing:border-box;margin:0 auto;background:#fff}html.theme-dark .clockFace-eHYbqh-S{background:#262b3e}.clockFace-eHYbqh-S div{position:absolute;width:100%;height:100%}.clockFace-eHYbqh-S .face-2iCoBAOV{position:absolute;top:0;left:0;border-radius:50%;font-size:15px;pointer-events:none}.clockFace-eHYbqh-S .face-2iCoBAOV .number-9PC9lvyt{position:absolute;width:28px;height:28px;margin-top:-14px;margin-left:-14px;-webkit-user-select:none;user-select:none;cursor:pointer;border-radius:50%;display:flex;align-items:center;text-align:center;pointer-events:all;color:#262b3e;transition:background-color 60ms ease}html.theme-dark .clockFace-eHYbqh-S .face-2iCoBAOV .number-9PC9lvyt{color:#c5cbce}.clockFace-eHYbqh-S .face-2iCoBAOV .number-9PC9lvyt>span{flex:1 1 auto}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.clockFace-eHYbqh-S .face-2iCoBAOV .number-9PC9lvyt:hover{background-color:rgba(247,248,250,.5)}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .clockFace-eHYbqh-S .face-2iCoBAOV .number-9PC9lvyt:hover{background-color:rgba(28,32,48,.5)}}.clockFace-eHYbqh-S .face-2iCoBAOV .number-9PC9lvyt:active{background-color:#f7f8fa}html.theme-dark .clockFace-eHYbqh-S .face-2iCoBAOV .number-9PC9lvyt:active{background-color:#1c2030}.clockFace-eHYbqh-S .face-2iCoBAOV .number-9PC9lvyt.inner-1mVlhYbe{font-size:120%}.clockFace-eHYbqh-S .hand-2ZG8pJQb{position:absolute;display:block;pointer-events:none;bottom:50%;left:50%;width:1px;margin-left:-.5px;transform-origin:50% 100%;background:#2196f3}.clockFace-eHYbqh-S .hand-2ZG8pJQb .knob-31dEppHa{position:absolute;top:-26px;left:50%;width:26px;height:26px;margin-left:-13px;box-sizing:border-box;border-radius:50%;border:2px solid;border-color:#2196f3}html.theme-dark .clockFace-eHYbqh-S .hand-2ZG8pJQb .knob-31dEppHa{border-color:#1976d2}.clockFace-eHYbqh-S .centerDot-210Fo0oV{position:absolute;top:50%;left:50%;width:4px;height:4px;margin-top:-2px;margin-left:-2px;content:"";border-radius:50%;background:#2196f3}.dialog-1oXvxbfL{max-width:345px}.dialog-1oXvxbfL .formRow-28Ldm-ki{display:flex}.dialog-1oXvxbfL .formRow-28Ldm-ki .cell-m5Uv3CRU.input-2rGFhmey{margin-right:14px}.dialog-1oXvxbfL .formRow-28Ldm-ki .cell-m5Uv3CRU.input-2rGFhmey input{font-size:15px;overflow:hidden}.dialog-1oXvxbfL .formRow-28Ldm-ki .cell-m5Uv3CRU.input-2rGFhmey:first-child{flex:0 4 100%}.dialog-1oXvxbfL .formRow-28Ldm-ki .cell-m5Uv3CRU.input-2rGFhmey:nth-child(2){flex:0 5 100%}.dialog-1oXvxbfL .formRow-28Ldm-ki .cell-m5Uv3CRU.btn-1wL_hi5U{margin-left:3px}.dialog-1oXvxbfL .formRow-28Ldm-ki .button-1xrfeyEj{padding:0 8px;line-height:32px;font-size:16px}.dialog-1oXvxbfL .formRow-28Ldm-ki .button-1xrfeyEj svg{fill:#fff;width:12px;height:12px}html.theme-dark .dialog-1oXvxbfL .formRow-28Ldm-ki .button-1xrfeyEj svg{fill:#d1d4dc} \ No newline at end of file diff --git a/public/charting_library/bundles/71.56b42534718929251c6c.rtl.css b/public/charting_library/bundles/71.56b42534718929251c6c.rtl.css new file mode 100644 index 00000000..3d27071d --- /dev/null +++ b/public/charting_library/bundles/71.56b42534718929251c6c.rtl.css @@ -0,0 +1 @@ +.calendar-H-c9lyXG{display:flex;flex-direction:column;width:100%;height:100%;direction:ltr;-webkit-user-select:none;user-select:none;border-radius:3px;background-color:#fff;box-shadow:0 2px 4px 0 rgba(107,121,136,.4)}html.theme-dark .calendar-H-c9lyXG{background-color:#1e222d;box-shadow:0 2px 4px 0 #000}.header-29jmPJB_{flex:0 0 50px;display:flex;align-items:center;height:50px;box-sizing:border-box;background:#fff;border-bottom:1px solid;border-color:#eceff2}html.theme-dark .header-29jmPJB_{border-color:#363c4e;background:#1e222d}.header-29jmPJB_>*{flex-grow:1;display:block}.header-29jmPJB_ .title-3BLccpWI{text-align:center;font-size:22px;color:#262b3e}html.theme-dark .header-29jmPJB_ .title-3BLccpWI{color:#c5cbce}.header-29jmPJB_ .titleDay-3Mp9czBi{color:#2196f3}html.theme-dark .header-29jmPJB_ .titleDay-3Mp9czBi{color:#1976d2}.header-29jmPJB_ .switchBtn-p718bDyp{cursor:pointer}.header-29jmPJB_ .switchBtn-p718bDyp>svg{fill:#262b3e;height:13px}html.theme-dark .header-29jmPJB_ .switchBtn-p718bDyp>svg{fill:#c5cbce}.header-29jmPJB_ .switchBtn-p718bDyp.prev-1vUszsRH>svg{float:left;margin-left:12px}.header-29jmPJB_ .switchBtn-p718bDyp.next-Xxv3BCz0>svg{float:right;margin-right:12px}.month-14xTSVpQ{flex:1 1 auto;display:flex;flex-direction:column;background:#fff}html.theme-dark .month-14xTSVpQ{background:#262b3e}.month-14xTSVpQ .weekdays-p5haX_xf{display:flex;flex-direction:row;padding:6px 0;background-color:#f7f8fa;border:1px solid;border-top:0;border-color:#f7f8fa}html.theme-dark .month-14xTSVpQ .weekdays-p5haX_xf{border-color:#1c2030;background-color:#1c2030}.month-14xTSVpQ .weekdays-p5haX_xf>span{flex:1 1;text-align:center;font-size:13px;color:#8797a5}.month-14xTSVpQ .weeks-1LCs6d3o{flex:1 1 auto;display:flex;flex-direction:column;border-right:1px solid;border-color:#f7f8fa}html.theme-dark .month-14xTSVpQ .weeks-1LCs6d3o{border-color:#1c2030}.month-14xTSVpQ .weeks-1LCs6d3o .week-49DNXkE3{flex:1 1 auto;display:flex;flex-direction:row}.month-14xTSVpQ .weeks-1LCs6d3o .week-49DNXkE3 .day-3x8ZipuB{flex:1 1 40px;height:40px;display:flex;font-size:14px;color:#262b3e;cursor:pointer;position:relative;box-sizing:border-box;border-bottom:1px solid;border-left:1px solid;padding:2px 2px 1px 1px;border-color:#f7f8fa;transition:background-color 60ms ease}html.theme-dark .month-14xTSVpQ .weeks-1LCs6d3o .week-49DNXkE3 .day-3x8ZipuB{border-color:#1c2030;color:#c5cbce}.month-14xTSVpQ .weeks-1LCs6d3o .week-49DNXkE3 .day-3x8ZipuB>span{flex:1 1;align-self:center;text-align:center}.month-14xTSVpQ .weeks-1LCs6d3o .week-49DNXkE3 .day-3x8ZipuB:active:not(.disabled-34cO1Z8u){background-color:#f7f8fa}html.theme-dark .month-14xTSVpQ .weeks-1LCs6d3o .week-49DNXkE3 .day-3x8ZipuB:active:not(.disabled-34cO1Z8u){background-color:#1c2030}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.month-14xTSVpQ .weeks-1LCs6d3o .week-49DNXkE3 .day-3x8ZipuB:hover:not(.disabled-34cO1Z8u){background-color:rgba(247,248,250,.5)}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .month-14xTSVpQ .weeks-1LCs6d3o .week-49DNXkE3 .day-3x8ZipuB:hover:not(.disabled-34cO1Z8u){background-color:rgba(28,32,48,.5)}}.month-14xTSVpQ .weeks-1LCs6d3o .week-49DNXkE3 .day-3x8ZipuB.selected-qmTqaBK3{color:#2196f3;border:2px solid;padding:0;border-color:#2196f3;margin-top:-1px;margin-left:-1px;z-index:1}html.theme-dark .month-14xTSVpQ .weeks-1LCs6d3o .week-49DNXkE3 .day-3x8ZipuB.selected-qmTqaBK3{border-color:#1976d2;color:#1976d2}.month-14xTSVpQ .weeks-1LCs6d3o .week-49DNXkE3 .day-3x8ZipuB.disabled-34cO1Z8u{color:#c5cbce;cursor:not-allowed}html.theme-dark .month-14xTSVpQ .weeks-1LCs6d3o .week-49DNXkE3 .day-3x8ZipuB.disabled-34cO1Z8u{color:#4c525e}.month-14xTSVpQ .weeks-1LCs6d3o .week-49DNXkE3 .day-3x8ZipuB.currentDay-3sTNH-Yi{color:#2196f3}html.theme-dark .month-14xTSVpQ .weeks-1LCs6d3o .week-49DNXkE3 .day-3x8ZipuB.currentDay-3sTNH-Yi{color:#1976d2}.month-14xTSVpQ .weeks-1LCs6d3o .week-49DNXkE3 .day-3x8ZipuB.currentDay-3sTNH-Yi:after{position:absolute;top:0;left:-1px;content:" ";width:0;height:0;border-style:solid;border-width:0 0 11px 11px;border-color:transparent transparent transparent #2196f3}.month-14xTSVpQ .weeks-1LCs6d3o .week-49DNXkE3 .day-3x8ZipuB.selected-qmTqaBK3.currentDay-3sTNH-Yi:after{top:-2px;left:-2px}.month-14xTSVpQ .weeks-1LCs6d3o .week-49DNXkE3 .day-3x8ZipuB.otherMonth-1WMn4XfI{color:#c5cbce}html.theme-dark .month-14xTSVpQ .weeks-1LCs6d3o .week-49DNXkE3 .day-3x8ZipuB.otherMonth-1WMn4XfI{color:#4c525e}.month-14xTSVpQ .weeks-1LCs6d3o .week-49DNXkE3:last-child .day-3x8ZipuB{border-bottom:0}.calendar-Q5DuQzKD{width:280px}.field-1YbeVGCL{position:relative;display:flex;flex-grow:1}.field-1YbeVGCL .errorIcon-3nKBmNTE,.field-1YbeVGCL .warningIcon-2FTdXbRt{position:absolute;left:2px;top:2px;padding:6px 7px;border-radius:4px;background-color:#fff;display:inline-flex}html.theme-dark .field-1YbeVGCL .errorIcon-3nKBmNTE,html.theme-dark .field-1YbeVGCL .warningIcon-2FTdXbRt{background-color:#131722}.field-1YbeVGCL .errorIcon-3nKBmNTE svg,.field-1YbeVGCL .warningIcon-2FTdXbRt svg{width:18px;height:18px}.field-1YbeVGCL .errorIcon--large-1UBncQuh,.field-1YbeVGCL .warningIcon--large-2-nZYwjj{top:8px}.field-1YbeVGCL .errorIcon--small-3eBcxlqP,.field-1YbeVGCL .warningIcon--small-60SRfITp{left:5px;padding:3px}.field-1YbeVGCL .errorIcon--xsmall-8a2JUSk7,.field-1YbeVGCL .warningIcon--xsmall-2rOz7ig5{left:7px;top:2px;padding:0}.field-1YbeVGCL .errorIcon--xsmall-8a2JUSk7 svg,.field-1YbeVGCL .warningIcon--xsmall-2rOz7ig5 svg{width:14px;height:14px}.field-1YbeVGCL .errorIcon-3nKBmNTE{color:#ff4a68}.field-1YbeVGCL .warningIcon-2FTdXbRt{color:#ffca3b}.textInput-3SndIvsX{color:#4a4a4a;background-color:#fff}html.theme-dark .textInput-3SndIvsX{background-color:#1e222d;color:#c5cbce}.inputWrapper-u_TvMxrq{display:block}.field-3OP1xeZc .errorIcon-AjhrEkSc,.field-3OP1xeZc .warningIcon-309b7fMg{background-color:#fff}html.theme-dark .field-3OP1xeZc .errorIcon-AjhrEkSc,html.theme-dark .field-3OP1xeZc .warningIcon-309b7fMg{background-color:#1e222d}.pickerInput-3XGDmslV{position:relative}.pickerInput-3XGDmslV .inputIcon-1N28V7pi{display:inline-flex;position:absolute;left:9px;top:9px;cursor:pointer;opacity:.5}.pickerInput-3XGDmslV .inputIcon-1N28V7pi svg{height:16px;width:16px;fill:#7d7d7d}html.theme-dark .pickerInput-3XGDmslV .inputIcon-1N28V7pi svg{fill:#758696}.pickerInput-3XGDmslV .inputIcon-1N28V7pi.disabled-aKY-xwhe{opacity:.1}.pickerInput-3XGDmslV .inputIcon--large-91Ho2uuh{top:16px}.pickerInput-3XGDmslV .inputIcon--small-93KX0qGd{top:6px}.pickerInput-3XGDmslV .inputIcon--xsmall-1GLk5pdh{top:2px}.picker-HQJc7fVy{z-index:99;transition:opacity .2625s ease}.fixed-QBCsU0Gi{position:fixed}.absolute-2hW9cE-c{position:absolute}.nativePicker-1F6noucK{position:absolute;box-sizing:border-box;width:100%;height:100%;opacity:0;top:0}.clock-3pqBsiNm{display:flex;flex-direction:column;border-radius:3px;background-color:#fff;box-shadow:0 2px 4px 0 rgba(107,121,136,.4)}html.theme-dark .clock-3pqBsiNm{background-color:#1e222d;box-shadow:0 2px 4px 0 #000}.header-pTWMGSpm{flex:0 0 50px;height:50px;box-sizing:border-box;font-size:24px;line-height:1;text-align:center;padding:10px 0;border-bottom:1px solid;border-bottom-color:#eceff2;color:#262b3e}html.theme-dark .header-pTWMGSpm{color:#c5cbce;border-bottom-color:#363c4e}.header-pTWMGSpm .number-9PC9lvyt{padding:0 3px;cursor:pointer}.header-pTWMGSpm .number-9PC9lvyt.active-1sonmMLV{color:#2196f3}.body-2Q-g3GDd{padding:10px;background:#f7f8fa;flex:1 1 auto;display:flex;flex-direction:column;justify-content:center}html.theme-dark .body-2Q-g3GDd{background:#1c2030}.clockFace-eHYbqh-S{position:relative;width:200px;height:200px;border-radius:50%;box-sizing:border-box;margin:0 auto;background:#fff}html.theme-dark .clockFace-eHYbqh-S{background:#262b3e}.clockFace-eHYbqh-S div{position:absolute;width:100%;height:100%}.clockFace-eHYbqh-S .face-2iCoBAOV{position:absolute;top:0;right:0;border-radius:50%;font-size:15px;pointer-events:none}.clockFace-eHYbqh-S .face-2iCoBAOV .number-9PC9lvyt{position:absolute;width:28px;height:28px;margin-top:-14px;margin-left:-14px;-webkit-user-select:none;user-select:none;cursor:pointer;border-radius:50%;display:flex;align-items:center;text-align:center;pointer-events:all;color:#262b3e;transition:background-color 60ms ease}html.theme-dark .clockFace-eHYbqh-S .face-2iCoBAOV .number-9PC9lvyt{color:#c5cbce}.clockFace-eHYbqh-S .face-2iCoBAOV .number-9PC9lvyt>span{flex:1 1 auto}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.clockFace-eHYbqh-S .face-2iCoBAOV .number-9PC9lvyt:hover{background-color:rgba(247,248,250,.5)}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .clockFace-eHYbqh-S .face-2iCoBAOV .number-9PC9lvyt:hover{background-color:rgba(28,32,48,.5)}}.clockFace-eHYbqh-S .face-2iCoBAOV .number-9PC9lvyt:active{background-color:#f7f8fa}html.theme-dark .clockFace-eHYbqh-S .face-2iCoBAOV .number-9PC9lvyt:active{background-color:#1c2030}.clockFace-eHYbqh-S .face-2iCoBAOV .number-9PC9lvyt.inner-1mVlhYbe{font-size:120%}.clockFace-eHYbqh-S .hand-2ZG8pJQb{position:absolute;display:block;pointer-events:none;bottom:50%;right:50%;width:1px;margin-right:-.5px;transform-origin:50% 100%;background:#2196f3}.clockFace-eHYbqh-S .hand-2ZG8pJQb .knob-31dEppHa{position:absolute;top:-26px;right:50%;width:26px;height:26px;margin-right:-13px;box-sizing:border-box;border-radius:50%;border:2px solid;border-color:#2196f3}html.theme-dark .clockFace-eHYbqh-S .hand-2ZG8pJQb .knob-31dEppHa{border-color:#1976d2}.clockFace-eHYbqh-S .centerDot-210Fo0oV{position:absolute;top:50%;right:50%;width:4px;height:4px;margin-top:-2px;margin-right:-2px;content:"";border-radius:50%;background:#2196f3}.dialog-1oXvxbfL{max-width:345px}.dialog-1oXvxbfL .formRow-28Ldm-ki{display:flex}.dialog-1oXvxbfL .formRow-28Ldm-ki .cell-m5Uv3CRU.input-2rGFhmey{margin-left:14px}.dialog-1oXvxbfL .formRow-28Ldm-ki .cell-m5Uv3CRU.input-2rGFhmey input{font-size:15px;overflow:hidden}.dialog-1oXvxbfL .formRow-28Ldm-ki .cell-m5Uv3CRU.input-2rGFhmey:first-child{flex:0 4 100%}.dialog-1oXvxbfL .formRow-28Ldm-ki .cell-m5Uv3CRU.input-2rGFhmey:nth-child(2){flex:0 5 100%}.dialog-1oXvxbfL .formRow-28Ldm-ki .cell-m5Uv3CRU.btn-1wL_hi5U{margin-right:3px}.dialog-1oXvxbfL .formRow-28Ldm-ki .button-1xrfeyEj{padding:0 8px;line-height:32px;font-size:16px}.dialog-1oXvxbfL .formRow-28Ldm-ki .button-1xrfeyEj svg{fill:#fff;width:12px;height:12px}html.theme-dark .dialog-1oXvxbfL .formRow-28Ldm-ki .button-1xrfeyEj svg{fill:#d1d4dc} \ No newline at end of file diff --git a/public/charting_library/bundles/72.4b79d29d2c0e13ea94c5.js b/public/charting_library/bundles/72.4b79d29d2c0e13ea94c5.js new file mode 100644 index 00000000..e3bd0953 --- /dev/null +++ b/public/charting_library/bundles/72.4b79d29d2c0e13ea94c5.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[72],[]]); \ No newline at end of file diff --git a/public/charting_library/bundles/72.c7dff1d5063ddf603a81.css b/public/charting_library/bundles/72.c7dff1d5063ddf603a81.css new file mode 100644 index 00000000..e0ad9f68 --- /dev/null +++ b/public/charting_library/bundles/72.c7dff1d5063ddf603a81.css @@ -0,0 +1 @@ +.wrap-1h7U5nKd{position:relative;direction:ltr;width:100%;height:100%;overflow:hidden}.wrap-1h7U5nKd svg{display:block}.scrollWrap-3gtPS0Fe{display:flex;position:relative;flex-direction:column;flex:0 0 auto;width:100%;height:100%;overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:touch}.scrollWrap-3gtPS0Fe::-webkit-scrollbar{width:5px;height:5px}.scrollWrap-3gtPS0Fe::-webkit-scrollbar-thumb{border:1px solid;border-color:#f1f3f6;border-radius:3px;background-color:#9598a1}html.theme-dark .scrollWrap-3gtPS0Fe::-webkit-scrollbar-thumb{background-color:#363a45;border-color:#1e222d}.scrollWrap-3gtPS0Fe::-webkit-scrollbar-track{background-color:transparent;border-radius:3px}.scrollWrap-3gtPS0Fe::-webkit-scrollbar-corner{display:none}.scrollWrap-3gtPS0Fe.noScrollBar-ieMwbfur{padding-right:100px;-ms-overflow-style:none}.scrollWrap-3gtPS0Fe.noScrollBar-ieMwbfur.sb-scrollbar-wrap{display:none}.scrollWrap-3gtPS0Fe.noScrollBar-ieMwbfur::-webkit-scrollbar{display:none;width:0;height:0}.scrollWrap-3gtPS0Fe.noScrollBar-ieMwbfur::-webkit-scrollbar-thumb,.scrollWrap-3gtPS0Fe.noScrollBar-ieMwbfur::-webkit-scrollbar-track{display:none}.scrollWrap-3gtPS0Fe.noScrollBar-ieMwbfur::-webkit-scrollbar-corner{display:none}.content-YhoA_L2m{display:flex;position:relative;flex:1 0 auto;flex-direction:column}.icon-2xObs8DI{display:block;transition:transform 60ms ease}.scrollBot-2HHpZNuf,.scrollTop-1eXi8ltS{display:flex;position:absolute;left:0;width:100%;height:24px;background-color:rgba(30,34,45,.6);color:#fff;transition:background-color .35s ease,transform .11666667s cubic-bezier(.55,.055,.675,.19);justify-content:center;align-items:center;overflow:hidden}html.theme-dark .scrollBot-2HHpZNuf,html.theme-dark .scrollTop-1eXi8ltS{color:#fff;background-color:hsla(227,6%,44%,.6)}.scrollBot-2HHpZNuf:active,.scrollTop-1eXi8ltS:active{transition:background-color 58.33333ms ease,transform .11666667s cubic-bezier(.215,.61,.355,1)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.scrollBot-2HHpZNuf:hover,.scrollTop-1eXi8ltS:hover{transition:background-color 58.33333ms ease,transform .11666667s cubic-bezier(.215,.61,.355,1)}}.scrollBot-2HHpZNuf:active .icon-2xObs8DI,.scrollTop-1eXi8ltS:active .icon-2xObs8DI{transform:translateY(1px)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.scrollBot-2HHpZNuf:hover .icon-2xObs8DI,.scrollTop-1eXi8ltS:hover .icon-2xObs8DI{transform:translateY(1px)}}.scrollBot-2HHpZNuf.isVisible-3zZOL3TO,.scrollTop-1eXi8ltS.isVisible-3zZOL3TO{transform:translateY(0);transition-timing-function:cubic-bezier(.215,.61,.355,1)}.scrollTop-1eXi8ltS{top:0;transform:translateY(-100%)}.scrollTop-1eXi8ltS .iconWrap-2Q69rfEO{transform:rotate(180deg)}.scrollBot-2HHpZNuf{bottom:0;transform:translateY(100%)}.fadeBot-3JstnoWq,.fadeTop-3oJzNyTq{position:absolute;left:0;width:100%;height:24px;pointer-events:none}.fadeBot-3JstnoWq.isVisible-3zZOL3TO,.fadeTop-3oJzNyTq.isVisible-3zZOL3TO{transform:translateY(0);transition-timing-function:cubic-bezier(.215,.61,.355,1)}.fadeTop-3oJzNyTq{top:0;transform:translateY(-100%);background-image:linear-gradient(0deg,hsla(0,0%,100%,0),#fff)}html.theme-dark .fadeTop-3oJzNyTq{background-image:linear-gradient(0deg,rgba(19,23,34,0),#131722)}.fadeBot-3JstnoWq{bottom:0;transform:translateY(100%);background-image:linear-gradient(180deg,hsla(0,0%,100%,0),#fff)}html.theme-dark .fadeBot-3JstnoWq{background-image:linear-gradient(180deg,rgba(19,23,34,0),#131722)}.button-263WXsg-{display:flex;position:relative;align-items:center;justify-content:center;width:52px;height:36px;cursor:default;-webkit-user-select:none;user-select:none;color:var(--tv-color-toolbar-button-text,#131722)}html.theme-dark .button-263WXsg-{color:var(--tv-color-toolbar-button-text,#787b86)}.button-263WXsg-.hover-6KHfIHhL,.button-263WXsg-:active{color:var(--tv-color-toolbar-button-text-hover,#000)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.button-263WXsg-:hover{color:var(--tv-color-toolbar-button-text-hover,#000)}}html.theme-dark .button-263WXsg-.hover-6KHfIHhL,html.theme-dark .button-263WXsg-:active{color:var(--tv-color-toolbar-button-text-hover,#868993)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .button-263WXsg-:hover{color:var(--tv-color-toolbar-button-text-hover,#868993)}}.button-263WXsg- .bg-1kRv1Pf2{display:flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:4px}.button-263WXsg-.hover-6KHfIHhL .bg-1kRv1Pf2,.button-263WXsg-:active .bg-1kRv1Pf2{background-color:var(--tv-color-toolbar-button-background-hover,#f0f3fa)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.button-263WXsg-:hover .bg-1kRv1Pf2{background-color:var(--tv-color-toolbar-button-background-hover,#f0f3fa)}}html.theme-dark .button-263WXsg-.hover-6KHfIHhL .bg-1kRv1Pf2,html.theme-dark .button-263WXsg-:active .bg-1kRv1Pf2{background-color:var(--tv-color-toolbar-button-background-hover,#2a2e39)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .button-263WXsg-:hover .bg-1kRv1Pf2{background-color:var(--tv-color-toolbar-button-background-hover,#2a2e39)}}.button-263WXsg- .icon-1Y-3MM9F svg{vertical-align:middle}.button-263WXsg-.isActive-2mI1-NUL .bg-1kRv1Pf2{background-color:var(--tv-color-toolbar-toggle-button-background-active,#2196f3);width:30px;height:30px}html.theme-dark .button-263WXsg-.isActive-2mI1-NUL .bg-1kRv1Pf2{background-color:var(--tv-color-toolbar-toggle-button-background-active,#1976d2)}.button-263WXsg-.isActive-2mI1-NUL .icon-1Y-3MM9F{color:var(--tv-color-item-active-text,#fff)}html.theme-dark .button-263WXsg-.isActive-2mI1-NUL .icon-1Y-3MM9F{color:var(--tv-color-item-active-text,#d1d4dc)}.button-263WXsg-.isActive-2mI1-NUL.hover-6KHfIHhL .bg-1kRv1Pf2,.button-263WXsg-.isActive-2mI1-NUL:active .bg-1kRv1Pf2{background-color:var(--tv-color-toolbar-toggle-button-background-active-hover,#1e88e5)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.button-263WXsg-.isActive-2mI1-NUL:hover .bg-1kRv1Pf2{background-color:var(--tv-color-toolbar-toggle-button-background-active-hover,#1e88e5)}}html.theme-dark .button-263WXsg-.isActive-2mI1-NUL.hover-6KHfIHhL .bg-1kRv1Pf2,html.theme-dark .button-263WXsg-.isActive-2mI1-NUL:active .bg-1kRv1Pf2{background-color:var(--tv-color-toolbar-toggle-button-background-active-hover,#1e88e5)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .button-263WXsg-.isActive-2mI1-NUL:hover .bg-1kRv1Pf2{background-color:var(--tv-color-toolbar-toggle-button-background-active-hover,#1e88e5)}}.button-263WXsg-.isActive-2mI1-NUL.hover-6KHfIHhL .icon-1Y-3MM9F,.button-263WXsg-.isActive-2mI1-NUL:active .icon-1Y-3MM9F{color:var(--tv-color-item-active-text,#fff)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.button-263WXsg-.isActive-2mI1-NUL:hover .icon-1Y-3MM9F{color:var(--tv-color-item-active-text,#fff)}}html.theme-dark .button-263WXsg-.isActive-2mI1-NUL.hover-6KHfIHhL .icon-1Y-3MM9F,html.theme-dark .button-263WXsg-.isActive-2mI1-NUL:active .icon-1Y-3MM9F{color:var(--tv-color-item-active-text,#d1d4dc)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .button-263WXsg-.isActive-2mI1-NUL:hover .icon-1Y-3MM9F{color:var(--tv-color-item-active-text,#d1d4dc)}}.button-263WXsg-.isTransparent-sRmateFl.isActive-2mI1-NUL .icon-1Y-3MM9F{color:var(--tv-color-toolbar-button-text-active,#2196f3)}html.theme-sa .button-263WXsg-.isTransparent-sRmateFl.isActive-2mI1-NUL .icon-1Y-3MM9F{color:var(--tv-color-toolbar-button-text-active,#ff7200)}html.theme-dark .button-263WXsg-.isTransparent-sRmateFl.isActive-2mI1-NUL .icon-1Y-3MM9F{color:var(--tv-color-toolbar-button-text-active,#1976d2)}.button-263WXsg-.isTransparent-sRmateFl.isActive-2mI1-NUL.hover-6KHfIHhL .bg-1kRv1Pf2,.button-263WXsg-.isTransparent-sRmateFl.isActive-2mI1-NUL:active .bg-1kRv1Pf2{background-color:var(--tv-color-toolbar-button-background-hover,#f0f3fa);width:34px;height:34px}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.button-263WXsg-.isTransparent-sRmateFl.isActive-2mI1-NUL:hover .bg-1kRv1Pf2{background-color:var(--tv-color-toolbar-button-background-hover,#f0f3fa);width:34px;height:34px}}html.theme-dark .button-263WXsg-.isTransparent-sRmateFl.isActive-2mI1-NUL.hover-6KHfIHhL .bg-1kRv1Pf2,html.theme-dark .button-263WXsg-.isTransparent-sRmateFl.isActive-2mI1-NUL:active .bg-1kRv1Pf2{background-color:var(--tv-color-toolbar-button-background-hover,#2a2e39)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .button-263WXsg-.isTransparent-sRmateFl.isActive-2mI1-NUL:hover .bg-1kRv1Pf2{background-color:var(--tv-color-toolbar-button-background-hover,#2a2e39)}}.button-263WXsg-.isTransparent-sRmateFl.isActive-2mI1-NUL.hover-6KHfIHhL .icon-1Y-3MM9F,.button-263WXsg-.isTransparent-sRmateFl.isActive-2mI1-NUL:active .icon-1Y-3MM9F{color:var(--tv-color-toolbar-button-text-active-hover,#1e88e5)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.button-263WXsg-.isTransparent-sRmateFl.isActive-2mI1-NUL:hover .icon-1Y-3MM9F{color:var(--tv-color-toolbar-button-text-active-hover,#1e88e5)}}html.theme-dark .button-263WXsg-.isTransparent-sRmateFl.isActive-2mI1-NUL.hover-6KHfIHhL .icon-1Y-3MM9F,html.theme-dark .button-263WXsg-.isTransparent-sRmateFl.isActive-2mI1-NUL:active .icon-1Y-3MM9F{color:var(--tv-color-toolbar-button-text-active-hover,#1e88e5)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .button-263WXsg-.isTransparent-sRmateFl.isActive-2mI1-NUL:hover .icon-1Y-3MM9F{color:var(--tv-color-toolbar-button-text-active-hover,#1e88e5)}}.button-263WXsg-.isTransparent-sRmateFl.isActive-2mI1-NUL .bg-1kRv1Pf2{background-color:transparent;width:34px;height:34px}html.theme-dark .button-263WXsg-.isTransparent-sRmateFl.isActive-2mI1-NUL .bg-1kRv1Pf2{background-color:transparent}.button-263WXsg-.isGrayed-1kWObWVr{opacity:.3;cursor:default}.button-263WXsg-.isGrayed-1kWObWVr,.button-263WXsg-.isGrayed-1kWObWVr .bg-1kRv1Pf2,.button-263WXsg-.isGrayed-1kWObWVr:active,.button-263WXsg-.isGrayed-1kWObWVr:active .bg-1kRv1Pf2{background-color:transparent}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.button-263WXsg-.isGrayed-1kWObWVr:hover,.button-263WXsg-.isGrayed-1kWObWVr:hover .bg-1kRv1Pf2{background-color:transparent}}html.theme-dark .button-263WXsg-.isGrayed-1kWObWVr,html.theme-dark .button-263WXsg-.isGrayed-1kWObWVr .bg-1kRv1Pf2,html.theme-dark .button-263WXsg-.isGrayed-1kWObWVr:active,html.theme-dark .button-263WXsg-.isGrayed-1kWObWVr:active .bg-1kRv1Pf2{background-color:transparent}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .button-263WXsg-.isGrayed-1kWObWVr:hover,html.theme-dark .button-263WXsg-.isGrayed-1kWObWVr:hover .bg-1kRv1Pf2{background-color:transparent}}.button-263WXsg-.isHidden-2VzaskeU{display:none}.dropdown-3_ASLzSj{position:relative}.buttonWrap-3fZWypJl{transform:translateX(0)}.control-1TyEfSIx{position:relative;overflow:hidden;width:52px;box-sizing:border-box;touch-action:manipulation}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.control-1TyEfSIx:hover .arrow-1cFKS5Ok{opacity:1}}.arrow-1cFKS5Ok{display:flex;position:absolute;top:1px;right:0;bottom:1px;align-items:center;justify-content:center;width:11px;cursor:default;box-sizing:border-box;border-radius:4px 0 0 4px;color:#131722;opacity:0;overflow:hidden}html.theme-dark .arrow-1cFKS5Ok{color:#787b86}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.arrow-1cFKS5Ok:hover{color:#000}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .arrow-1cFKS5Ok:hover{color:#868993}}.arrow-1cFKS5Ok .arrowIcon-2wA7q8om,.arrow-1cFKS5Ok .arrowIcon-2wA7q8om svg{transition:transform .5s cubic-bezier(.175,.885,.32,1.275)}.arrow-1cFKS5Ok .arrowIcon-2wA7q8om svg{display:block;width:4px;height:7px;fill:currentColor}.feature-mobiletouch .control-1TyEfSIx .arrow-1cFKS5Ok,.isOpened-22vLOY9o .control-1TyEfSIx .arrow-1cFKS5Ok{transform:translateX(0)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.control-1TyEfSIx:hover .arrow-1cFKS5Ok{transform:translateX(0)}}.feature-mobiletouch .control-1TyEfSIx .arrow-1cFKS5Ok.hover-2eKqN_v0,.isOpened-22vLOY9o .control-1TyEfSIx .arrow-1cFKS5Ok.hover-2eKqN_v0{background-color:var(--tv-color-toolbar-button-background-hover,#f0f3fa)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.control-1TyEfSIx:hover .arrow-1cFKS5Ok.hover-2eKqN_v0,.control-1TyEfSIx:hover .arrow-1cFKS5Ok:hover,.feature-mobiletouch .control-1TyEfSIx .arrow-1cFKS5Ok:hover,.isOpened-22vLOY9o .control-1TyEfSIx .arrow-1cFKS5Ok:hover{background-color:var(--tv-color-toolbar-button-background-hover,#f0f3fa)}}html.theme-dark .feature-mobiletouch .control-1TyEfSIx .arrow-1cFKS5Ok.hover-2eKqN_v0,html.theme-dark .isOpened-22vLOY9o .control-1TyEfSIx .arrow-1cFKS5Ok.hover-2eKqN_v0{background-color:var(--tv-color-toolbar-button-background-hover,#2a2e39)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .control-1TyEfSIx:hover .arrow-1cFKS5Ok.hover-2eKqN_v0,html.theme-dark .control-1TyEfSIx:hover .arrow-1cFKS5Ok:hover,html.theme-dark .feature-mobiletouch .control-1TyEfSIx .arrow-1cFKS5Ok:hover,html.theme-dark .isOpened-22vLOY9o .control-1TyEfSIx .arrow-1cFKS5Ok:hover{background-color:var(--tv-color-toolbar-button-background-hover,#2a2e39)}}.feature-mobiletouch .control-1TyEfSIx .arrow-1cFKS5Ok.hover-2eKqN_v0 svg,.isOpened-22vLOY9o .control-1TyEfSIx .arrow-1cFKS5Ok.hover-2eKqN_v0 svg{transform:translateX(1px)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.control-1TyEfSIx:hover .arrow-1cFKS5Ok.hover-2eKqN_v0 svg,.control-1TyEfSIx:hover .arrow-1cFKS5Ok:hover svg,.feature-mobiletouch .control-1TyEfSIx .arrow-1cFKS5Ok:hover svg,.isOpened-22vLOY9o .control-1TyEfSIx .arrow-1cFKS5Ok:hover svg{transform:translateX(1px)}}.isOpened-22vLOY9o .control-1TyEfSIx .arrow-1cFKS5Ok{opacity:1;background-color:var(--tv-color-toolbar-button-background-hover,#f0f3fa)}html.theme-dark .isOpened-22vLOY9o .control-1TyEfSIx .arrow-1cFKS5Ok{background-color:var(--tv-color-toolbar-button-background-hover,#2a2e39)}.isOpened-22vLOY9o .control-1TyEfSIx .arrow-1cFKS5Ok .arrowIcon-2wA7q8om{transform:rotate(180deg)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.isOpened-22vLOY9o .control-1TyEfSIx .arrow-1cFKS5Ok:hover svg{transform:translateX(-1px)}}.feature-mobiletouch .isGrayed-xr-mULNo .control-1TyEfSIx .buttonWrap-3fZWypJl{transform:translateX(0)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.isGrayed-xr-mULNo .control-1TyEfSIx:hover .buttonWrap-3fZWypJl{transform:translateX(0)}}.wrap-2I6DAtXG{display:flex;flex-wrap:wrap;padding:0 5px;width:390px;box-sizing:border-box}.wrap-2I6DAtXG.smallTablet-3_DPsWKG{padding:0 16px;width:100%}.buttonIcon-2rBwJ1QM,.item-31XunD5q{font-family:FontAwesome;font-size:19px}.item-31XunD5q{display:flex;align-items:center;justify-content:center;text-align:center;width:38px;height:38px;cursor:pointer;color:#131722}html.theme-dark .item-31XunD5q{color:#b2b5be}.item-31XunD5q.smallTablet-3_DPsWKG{margin-right:8px;margin-bottom:6px}.item-31XunD5q.hovered-2A1Cpat5,.item-31XunD5q:active{color:#000}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.item-31XunD5q:hover{color:#000}}html.theme-dark .item-31XunD5q.hovered-2A1Cpat5,html.theme-dark .item-31XunD5q:active{color:#c1c4cd}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .item-31XunD5q:hover{color:#c1c4cd}}.active-3xIuXjh4{color:#fff;background-color:#2196f3;border-radius:6px}html.theme-dark .active-3xIuXjh4{background-color:#1976d2;color:#d1d4dc}.title-KfwqaWX5{padding:10px 0 8px 20px;color:#787b86;font-weight:400;font-style:normal;font-size:11px;line-height:16px;letter-spacing:.4px;text-transform:uppercase}html.theme-dark .title-KfwqaWX5{color:#787b86}.separator-3h4R1USD{margin-top:0}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.button-21ihqWJ8:hover .buttonIcon-2rBwJ1QM{transition-duration:60ms}}.item-19VSB8co{padding-top:10px;padding-bottom:6px;font-size:16px;white-space:normal}.item-19VSB8co:before{content:none}.label-1NuMQGIE{overflow:visible;line-height:24px}.container-3_8ayT2Q{display:block;transition:fill 60ms ease,stroke 60ms ease}.container-3_8ayT2Q.mirror-crJbq8d0{transform:rotate(180deg)}.container-3_8ayT2Q .background-Q1Fcmxly{fill:var(--tv-color-pane-background,#fff);stroke:var(--tv-color-platform-background,#e0e3eb)}html.theme-dark .container-3_8ayT2Q .background-Q1Fcmxly{stroke:var(--tv-color-platform-background,#2a2e39);fill:var(--tv-color-pane-background,#131722)}.container-3_8ayT2Q .arrow-WcYWFXUn,html.theme-dark .container-3_8ayT2Q .arrow-WcYWFXUn{stroke:#9db2bd}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.container-3_8ayT2Q:hover .background-Q1Fcmxly{fill:var(--tv-color-toolbar-toggle-button-background-active,#2196f3)}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.container-3_8ayT2Q:hover .background-Q1Fcmxly,html.theme-dark .container-3_8ayT2Q:hover .background-Q1Fcmxly{stroke:var(--tv-color-toolbar-toggle-button-background-active-hover,#1e88e5)}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .container-3_8ayT2Q:hover .background-Q1Fcmxly{fill:var(--tv-color-toolbar-toggle-button-background-active,#1976d2)}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.container-3_8ayT2Q:hover .arrow-WcYWFXUn{stroke:var(--tv-color-pane-background,#fff)}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .container-3_8ayT2Q:hover .arrow-WcYWFXUn{stroke:var(--tv-color-pane-background,#131722)}}.toggleButton-3TAD9tll{position:absolute;z-index:10;bottom:58px;left:100%;margin-left:-6px}.toggleButton-3TAD9tll.collapsed-2PwwPYYB{left:0;margin-left:0}.toggleButton-3TAD9tll .background-1bSnR2Ey{fill:var(--tv-color-toolbar-toggle-button-background-active,#2196f3)}.toggleButton-3TAD9tll .background-1bSnR2Ey,html.theme-dark .toggleButton-3TAD9tll .background-1bSnR2Ey{stroke:var(--tv-color-toolbar-toggle-button-background-active-hover,#1e88e5)}html.theme-dark .toggleButton-3TAD9tll .background-1bSnR2Ey{fill:var(--tv-color-toolbar-toggle-button-background-active,#1976d2)}.toggleButton-3TAD9tll .arrow-liYbPQ3o{stroke:var(--tv-color-pane-background,#fff)}html.theme-dark .toggleButton-3TAD9tll .arrow-liYbPQ3o{stroke:var(--tv-color-pane-background,#131722)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.toggleButton-3TAD9tll:hover .background-1bSnR2Ey{fill:var(--tv-color-toolbar-toggle-button-background-active-hover,#1e88e5)}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.toggleButton-3TAD9tll:hover .background-1bSnR2Ey,html.theme-dark .toggleButton-3TAD9tll:hover .background-1bSnR2Ey{stroke:var(--tv-color-toolbar-toggle-button-background-active-hover,#1e88e5)}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .toggleButton-3TAD9tll:hover .background-1bSnR2Ey{fill:var(--tv-color-toolbar-toggle-button-background-active-hover,#1e88e5)}}.drawingToolbar-U3_QXRof{position:relative;height:100%;-webkit-user-select:none;user-select:none;background-color:var(--tv-color-pane-background,#fff)}html.theme-dark .drawingToolbar-U3_QXRof{background-color:var(--tv-color-pane-background,#131722)}.drawingToolbar-U3_QXRof.isHidden-2d-PYkzV,html.theme-dark .drawingToolbar-U3_QXRof.isHidden-2d-PYkzV{background-color:transparent}.drawingToolbar-U3_QXRof.isHidden-2d-PYkzV .inner-1xuW-gY4{display:none}.popupMenuItem-1b59KAzs{font-size:16px}.inner-1xuW-gY4{display:flex;flex:1 0 auto;flex-direction:column;width:52px;background-color:var(--tv-color-platform-background,#e0e3eb)}html.theme-dark .inner-1xuW-gY4{background-color:var(--tv-color-platform-background,#2a2e39)}.group-2JyOhh7Z{padding:6px 0;background-color:var(--tv-color-pane-background,#fff);border-top-right-radius:2px;border-bottom-right-radius:2px}html.theme-dark .group-2JyOhh7Z{background-color:var(--tv-color-pane-background,#131722)}.group-2JyOhh7Z+.group-2JyOhh7Z{margin-top:1px}.group-2JyOhh7Z:first-child{border-top-right-radius:0}.group-2JyOhh7Z.noGroupPadding-1TTjVKWk{padding:0}.lastGroup-O75UB5Xa{border-radius:0;padding-bottom:20px}.fill-1djIbBXv{flex:1 1 100%;background-color:var(--tv-color-pane-background,#fff);margin-top:-2px;min-height:2px}html.theme-dark .fill-1djIbBXv{background-color:var(--tv-color-pane-background,#131722)}.separator-1BAqp1-l{position:relative;margin:5px 0;width:100%;height:1px;background-color:#e0e3eb}html.theme-dark .separator-1BAqp1-l{background-color:#434651} \ No newline at end of file diff --git a/public/charting_library/bundles/72.c7dff1d5063ddf603a81.rtl.css b/public/charting_library/bundles/72.c7dff1d5063ddf603a81.rtl.css new file mode 100644 index 00000000..a30be72e --- /dev/null +++ b/public/charting_library/bundles/72.c7dff1d5063ddf603a81.rtl.css @@ -0,0 +1 @@ +.wrap-1h7U5nKd{position:relative;direction:rtl;width:100%;height:100%;overflow:hidden}.wrap-1h7U5nKd svg{display:block}.scrollWrap-3gtPS0Fe{display:flex;position:relative;flex-direction:column;flex:0 0 auto;width:100%;height:100%;overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:touch}.scrollWrap-3gtPS0Fe::-webkit-scrollbar{width:5px;height:5px}.scrollWrap-3gtPS0Fe::-webkit-scrollbar-thumb{border:1px solid;border-color:#f1f3f6;border-radius:3px;background-color:#9598a1}html.theme-dark .scrollWrap-3gtPS0Fe::-webkit-scrollbar-thumb{background-color:#363a45;border-color:#1e222d}.scrollWrap-3gtPS0Fe::-webkit-scrollbar-track{background-color:transparent;border-radius:3px}.scrollWrap-3gtPS0Fe::-webkit-scrollbar-corner{display:none}.scrollWrap-3gtPS0Fe.noScrollBar-ieMwbfur{padding-left:100px;-ms-overflow-style:none}.scrollWrap-3gtPS0Fe.noScrollBar-ieMwbfur.sb-scrollbar-wrap{display:none}.scrollWrap-3gtPS0Fe.noScrollBar-ieMwbfur::-webkit-scrollbar{display:none;width:0;height:0}.scrollWrap-3gtPS0Fe.noScrollBar-ieMwbfur::-webkit-scrollbar-thumb,.scrollWrap-3gtPS0Fe.noScrollBar-ieMwbfur::-webkit-scrollbar-track{display:none}.scrollWrap-3gtPS0Fe.noScrollBar-ieMwbfur::-webkit-scrollbar-corner{display:none}.content-YhoA_L2m{display:flex;position:relative;flex:1 0 auto;flex-direction:column}.icon-2xObs8DI{display:block;transition:transform 60ms ease}.scrollBot-2HHpZNuf,.scrollTop-1eXi8ltS{display:flex;position:absolute;right:0;width:100%;height:24px;background-color:rgba(30,34,45,.6);color:#fff;transition:background-color .35s ease,transform .11666667s cubic-bezier(.55,.055,.675,.19);justify-content:center;align-items:center;overflow:hidden}html.theme-dark .scrollBot-2HHpZNuf,html.theme-dark .scrollTop-1eXi8ltS{color:#fff;background-color:hsla(227,6%,44%,.6)}.scrollBot-2HHpZNuf:active,.scrollTop-1eXi8ltS:active{transition:background-color 58.33333ms ease,transform .11666667s cubic-bezier(.215,.61,.355,1)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.scrollBot-2HHpZNuf:hover,.scrollTop-1eXi8ltS:hover{transition:background-color 58.33333ms ease,transform .11666667s cubic-bezier(.215,.61,.355,1)}}.scrollBot-2HHpZNuf:active .icon-2xObs8DI,.scrollTop-1eXi8ltS:active .icon-2xObs8DI{transform:translateY(1px)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.scrollBot-2HHpZNuf:hover .icon-2xObs8DI,.scrollTop-1eXi8ltS:hover .icon-2xObs8DI{transform:translateY(1px)}}.scrollBot-2HHpZNuf.isVisible-3zZOL3TO,.scrollTop-1eXi8ltS.isVisible-3zZOL3TO{transform:translateY(0);transition-timing-function:cubic-bezier(.215,.61,.355,1)}.scrollTop-1eXi8ltS{top:0;transform:translateY(-100%)}.scrollTop-1eXi8ltS .iconWrap-2Q69rfEO{transform:rotate(-180deg)}.scrollBot-2HHpZNuf{bottom:0;transform:translateY(100%)}.fadeBot-3JstnoWq,.fadeTop-3oJzNyTq{position:absolute;right:0;width:100%;height:24px;pointer-events:none}.fadeBot-3JstnoWq.isVisible-3zZOL3TO,.fadeTop-3oJzNyTq.isVisible-3zZOL3TO{transform:translateY(0);transition-timing-function:cubic-bezier(.215,.61,.355,1)}.fadeTop-3oJzNyTq{top:0;transform:translateY(-100%);background-image:linear-gradient(0deg,hsla(0,0%,100%,0),#fff)}html.theme-dark .fadeTop-3oJzNyTq{background-image:linear-gradient(0deg,rgba(19,23,34,0),#131722)}.fadeBot-3JstnoWq{bottom:0;transform:translateY(100%);background-image:linear-gradient(180deg,hsla(0,0%,100%,0),#fff)}html.theme-dark .fadeBot-3JstnoWq{background-image:linear-gradient(180deg,rgba(19,23,34,0),#131722)}.button-263WXsg-{display:flex;position:relative;align-items:center;justify-content:center;width:52px;height:36px;cursor:default;-webkit-user-select:none;user-select:none;color:var(--tv-color-toolbar-button-text,#131722)}html.theme-dark .button-263WXsg-{color:var(--tv-color-toolbar-button-text,#787b86)}.button-263WXsg-.hover-6KHfIHhL,.button-263WXsg-:active{color:var(--tv-color-toolbar-button-text-hover,#000)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.button-263WXsg-:hover{color:var(--tv-color-toolbar-button-text-hover,#000)}}html.theme-dark .button-263WXsg-.hover-6KHfIHhL,html.theme-dark .button-263WXsg-:active{color:var(--tv-color-toolbar-button-text-hover,#868993)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .button-263WXsg-:hover{color:var(--tv-color-toolbar-button-text-hover,#868993)}}.button-263WXsg- .bg-1kRv1Pf2{display:flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:4px}.button-263WXsg-.hover-6KHfIHhL .bg-1kRv1Pf2,.button-263WXsg-:active .bg-1kRv1Pf2{background-color:var(--tv-color-toolbar-button-background-hover,#f0f3fa)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.button-263WXsg-:hover .bg-1kRv1Pf2{background-color:var(--tv-color-toolbar-button-background-hover,#f0f3fa)}}html.theme-dark .button-263WXsg-.hover-6KHfIHhL .bg-1kRv1Pf2,html.theme-dark .button-263WXsg-:active .bg-1kRv1Pf2{background-color:var(--tv-color-toolbar-button-background-hover,#2a2e39)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .button-263WXsg-:hover .bg-1kRv1Pf2{background-color:var(--tv-color-toolbar-button-background-hover,#2a2e39)}}.button-263WXsg- .icon-1Y-3MM9F svg{vertical-align:middle}.button-263WXsg-.isActive-2mI1-NUL .bg-1kRv1Pf2{background-color:var(--tv-color-toolbar-toggle-button-background-active,#2196f3);width:30px;height:30px}html.theme-dark .button-263WXsg-.isActive-2mI1-NUL .bg-1kRv1Pf2{background-color:var(--tv-color-toolbar-toggle-button-background-active,#1976d2)}.button-263WXsg-.isActive-2mI1-NUL .icon-1Y-3MM9F{color:var(--tv-color-item-active-text,#fff)}html.theme-dark .button-263WXsg-.isActive-2mI1-NUL .icon-1Y-3MM9F{color:var(--tv-color-item-active-text,#d1d4dc)}.button-263WXsg-.isActive-2mI1-NUL.hover-6KHfIHhL .bg-1kRv1Pf2,.button-263WXsg-.isActive-2mI1-NUL:active .bg-1kRv1Pf2{background-color:var(--tv-color-toolbar-toggle-button-background-active-hover,#1e88e5)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.button-263WXsg-.isActive-2mI1-NUL:hover .bg-1kRv1Pf2{background-color:var(--tv-color-toolbar-toggle-button-background-active-hover,#1e88e5)}}html.theme-dark .button-263WXsg-.isActive-2mI1-NUL.hover-6KHfIHhL .bg-1kRv1Pf2,html.theme-dark .button-263WXsg-.isActive-2mI1-NUL:active .bg-1kRv1Pf2{background-color:var(--tv-color-toolbar-toggle-button-background-active-hover,#1e88e5)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .button-263WXsg-.isActive-2mI1-NUL:hover .bg-1kRv1Pf2{background-color:var(--tv-color-toolbar-toggle-button-background-active-hover,#1e88e5)}}.button-263WXsg-.isActive-2mI1-NUL.hover-6KHfIHhL .icon-1Y-3MM9F,.button-263WXsg-.isActive-2mI1-NUL:active .icon-1Y-3MM9F{color:var(--tv-color-item-active-text,#fff)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.button-263WXsg-.isActive-2mI1-NUL:hover .icon-1Y-3MM9F{color:var(--tv-color-item-active-text,#fff)}}html.theme-dark .button-263WXsg-.isActive-2mI1-NUL.hover-6KHfIHhL .icon-1Y-3MM9F,html.theme-dark .button-263WXsg-.isActive-2mI1-NUL:active .icon-1Y-3MM9F{color:var(--tv-color-item-active-text,#d1d4dc)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .button-263WXsg-.isActive-2mI1-NUL:hover .icon-1Y-3MM9F{color:var(--tv-color-item-active-text,#d1d4dc)}}.button-263WXsg-.isTransparent-sRmateFl.isActive-2mI1-NUL .icon-1Y-3MM9F{color:var(--tv-color-toolbar-button-text-active,#2196f3)}html.theme-sa .button-263WXsg-.isTransparent-sRmateFl.isActive-2mI1-NUL .icon-1Y-3MM9F{color:var(--tv-color-toolbar-button-text-active,#ff7200)}html.theme-dark .button-263WXsg-.isTransparent-sRmateFl.isActive-2mI1-NUL .icon-1Y-3MM9F{color:var(--tv-color-toolbar-button-text-active,#1976d2)}.button-263WXsg-.isTransparent-sRmateFl.isActive-2mI1-NUL.hover-6KHfIHhL .bg-1kRv1Pf2,.button-263WXsg-.isTransparent-sRmateFl.isActive-2mI1-NUL:active .bg-1kRv1Pf2{background-color:var(--tv-color-toolbar-button-background-hover,#f0f3fa);width:34px;height:34px}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.button-263WXsg-.isTransparent-sRmateFl.isActive-2mI1-NUL:hover .bg-1kRv1Pf2{background-color:var(--tv-color-toolbar-button-background-hover,#f0f3fa);width:34px;height:34px}}html.theme-dark .button-263WXsg-.isTransparent-sRmateFl.isActive-2mI1-NUL.hover-6KHfIHhL .bg-1kRv1Pf2,html.theme-dark .button-263WXsg-.isTransparent-sRmateFl.isActive-2mI1-NUL:active .bg-1kRv1Pf2{background-color:var(--tv-color-toolbar-button-background-hover,#2a2e39)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .button-263WXsg-.isTransparent-sRmateFl.isActive-2mI1-NUL:hover .bg-1kRv1Pf2{background-color:var(--tv-color-toolbar-button-background-hover,#2a2e39)}}.button-263WXsg-.isTransparent-sRmateFl.isActive-2mI1-NUL.hover-6KHfIHhL .icon-1Y-3MM9F,.button-263WXsg-.isTransparent-sRmateFl.isActive-2mI1-NUL:active .icon-1Y-3MM9F{color:var(--tv-color-toolbar-button-text-active-hover,#1e88e5)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.button-263WXsg-.isTransparent-sRmateFl.isActive-2mI1-NUL:hover .icon-1Y-3MM9F{color:var(--tv-color-toolbar-button-text-active-hover,#1e88e5)}}html.theme-dark .button-263WXsg-.isTransparent-sRmateFl.isActive-2mI1-NUL.hover-6KHfIHhL .icon-1Y-3MM9F,html.theme-dark .button-263WXsg-.isTransparent-sRmateFl.isActive-2mI1-NUL:active .icon-1Y-3MM9F{color:var(--tv-color-toolbar-button-text-active-hover,#1e88e5)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .button-263WXsg-.isTransparent-sRmateFl.isActive-2mI1-NUL:hover .icon-1Y-3MM9F{color:var(--tv-color-toolbar-button-text-active-hover,#1e88e5)}}.button-263WXsg-.isTransparent-sRmateFl.isActive-2mI1-NUL .bg-1kRv1Pf2{background-color:transparent;width:34px;height:34px}html.theme-dark .button-263WXsg-.isTransparent-sRmateFl.isActive-2mI1-NUL .bg-1kRv1Pf2{background-color:transparent}.button-263WXsg-.isGrayed-1kWObWVr{opacity:.3;cursor:default}.button-263WXsg-.isGrayed-1kWObWVr,.button-263WXsg-.isGrayed-1kWObWVr .bg-1kRv1Pf2,.button-263WXsg-.isGrayed-1kWObWVr:active,.button-263WXsg-.isGrayed-1kWObWVr:active .bg-1kRv1Pf2{background-color:transparent}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.button-263WXsg-.isGrayed-1kWObWVr:hover,.button-263WXsg-.isGrayed-1kWObWVr:hover .bg-1kRv1Pf2{background-color:transparent}}html.theme-dark .button-263WXsg-.isGrayed-1kWObWVr,html.theme-dark .button-263WXsg-.isGrayed-1kWObWVr .bg-1kRv1Pf2,html.theme-dark .button-263WXsg-.isGrayed-1kWObWVr:active,html.theme-dark .button-263WXsg-.isGrayed-1kWObWVr:active .bg-1kRv1Pf2{background-color:transparent}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .button-263WXsg-.isGrayed-1kWObWVr:hover,html.theme-dark .button-263WXsg-.isGrayed-1kWObWVr:hover .bg-1kRv1Pf2{background-color:transparent}}.button-263WXsg-.isHidden-2VzaskeU{display:none}.dropdown-3_ASLzSj{position:relative}.buttonWrap-3fZWypJl{transform:translateX(0)}.control-1TyEfSIx{position:relative;overflow:hidden;width:52px;box-sizing:border-box;touch-action:manipulation}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.control-1TyEfSIx:hover .arrow-1cFKS5Ok{opacity:1}}.arrow-1cFKS5Ok{display:flex;position:absolute;top:1px;right:0;bottom:1px;align-items:center;justify-content:center;width:11px;cursor:default;box-sizing:border-box;border-radius:0 4px 4px 0;color:#131722;opacity:0;overflow:hidden}html.theme-dark .arrow-1cFKS5Ok{color:#787b86}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.arrow-1cFKS5Ok:hover{color:#000}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .arrow-1cFKS5Ok:hover{color:#868993}}.arrow-1cFKS5Ok .arrowIcon-2wA7q8om,.arrow-1cFKS5Ok .arrowIcon-2wA7q8om svg{transition:transform .5s cubic-bezier(.175,.885,.32,1.275)}.arrow-1cFKS5Ok .arrowIcon-2wA7q8om svg{display:block;width:4px;height:7px;fill:currentColor}.feature-mobiletouch .control-1TyEfSIx .arrow-1cFKS5Ok,.isOpened-22vLOY9o .control-1TyEfSIx .arrow-1cFKS5Ok{transform:translateX(0)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.control-1TyEfSIx:hover .arrow-1cFKS5Ok{transform:translateX(0)}}.feature-mobiletouch .control-1TyEfSIx .arrow-1cFKS5Ok.hover-2eKqN_v0,.isOpened-22vLOY9o .control-1TyEfSIx .arrow-1cFKS5Ok.hover-2eKqN_v0{background-color:var(--tv-color-toolbar-button-background-hover,#f0f3fa)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.control-1TyEfSIx:hover .arrow-1cFKS5Ok.hover-2eKqN_v0,.control-1TyEfSIx:hover .arrow-1cFKS5Ok:hover,.feature-mobiletouch .control-1TyEfSIx .arrow-1cFKS5Ok:hover,.isOpened-22vLOY9o .control-1TyEfSIx .arrow-1cFKS5Ok:hover{background-color:var(--tv-color-toolbar-button-background-hover,#f0f3fa)}}html.theme-dark .feature-mobiletouch .control-1TyEfSIx .arrow-1cFKS5Ok.hover-2eKqN_v0,html.theme-dark .isOpened-22vLOY9o .control-1TyEfSIx .arrow-1cFKS5Ok.hover-2eKqN_v0{background-color:var(--tv-color-toolbar-button-background-hover,#2a2e39)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .control-1TyEfSIx:hover .arrow-1cFKS5Ok.hover-2eKqN_v0,html.theme-dark .control-1TyEfSIx:hover .arrow-1cFKS5Ok:hover,html.theme-dark .feature-mobiletouch .control-1TyEfSIx .arrow-1cFKS5Ok:hover,html.theme-dark .isOpened-22vLOY9o .control-1TyEfSIx .arrow-1cFKS5Ok:hover{background-color:var(--tv-color-toolbar-button-background-hover,#2a2e39)}}.feature-mobiletouch .control-1TyEfSIx .arrow-1cFKS5Ok.hover-2eKqN_v0 svg,.isOpened-22vLOY9o .control-1TyEfSIx .arrow-1cFKS5Ok.hover-2eKqN_v0 svg{transform:translateX(-1px)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.control-1TyEfSIx:hover .arrow-1cFKS5Ok.hover-2eKqN_v0 svg,.control-1TyEfSIx:hover .arrow-1cFKS5Ok:hover svg,.feature-mobiletouch .control-1TyEfSIx .arrow-1cFKS5Ok:hover svg,.isOpened-22vLOY9o .control-1TyEfSIx .arrow-1cFKS5Ok:hover svg{transform:translateX(-1px)}}.isOpened-22vLOY9o .control-1TyEfSIx .arrow-1cFKS5Ok{opacity:1;background-color:var(--tv-color-toolbar-button-background-hover,#f0f3fa)}html.theme-dark .isOpened-22vLOY9o .control-1TyEfSIx .arrow-1cFKS5Ok{background-color:var(--tv-color-toolbar-button-background-hover,#2a2e39)}.isOpened-22vLOY9o .control-1TyEfSIx .arrow-1cFKS5Ok .arrowIcon-2wA7q8om{transform:rotate(-180deg)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.isOpened-22vLOY9o .control-1TyEfSIx .arrow-1cFKS5Ok:hover svg{transform:translateX(1px)}}.feature-mobiletouch .isGrayed-xr-mULNo .control-1TyEfSIx .buttonWrap-3fZWypJl{transform:translateX(0)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.isGrayed-xr-mULNo .control-1TyEfSIx:hover .buttonWrap-3fZWypJl{transform:translateX(0)}}.wrap-2I6DAtXG{display:flex;flex-wrap:wrap;padding:0 5px;width:390px;box-sizing:border-box}.wrap-2I6DAtXG.smallTablet-3_DPsWKG{padding:0 16px;width:100%}.buttonIcon-2rBwJ1QM,.item-31XunD5q{font-family:FontAwesome;font-size:19px}.item-31XunD5q{display:flex;align-items:center;justify-content:center;text-align:center;width:38px;height:38px;cursor:pointer;color:#131722}html.theme-dark .item-31XunD5q{color:#b2b5be}.item-31XunD5q.smallTablet-3_DPsWKG{margin-left:8px;margin-bottom:6px}.item-31XunD5q.hovered-2A1Cpat5,.item-31XunD5q:active{color:#000}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.item-31XunD5q:hover{color:#000}}html.theme-dark .item-31XunD5q.hovered-2A1Cpat5,html.theme-dark .item-31XunD5q:active{color:#c1c4cd}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .item-31XunD5q:hover{color:#c1c4cd}}.active-3xIuXjh4{color:#fff;background-color:#2196f3;border-radius:6px}html.theme-dark .active-3xIuXjh4{background-color:#1976d2;color:#d1d4dc}.title-KfwqaWX5{padding:10px 20px 8px 0;color:#787b86;font-weight:400;font-style:normal;font-size:11px;line-height:16px;letter-spacing:.4px;text-transform:uppercase}html.theme-dark .title-KfwqaWX5{color:#787b86}.separator-3h4R1USD{margin-top:0}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.button-21ihqWJ8:hover .buttonIcon-2rBwJ1QM{transition-duration:60ms}}.item-19VSB8co{padding-top:10px;padding-bottom:6px;font-size:16px;white-space:normal}.item-19VSB8co:before{content:none}.label-1NuMQGIE{overflow:visible;line-height:24px}.container-3_8ayT2Q{display:block;transition:fill 60ms ease,stroke 60ms ease}.container-3_8ayT2Q.mirror-crJbq8d0{transform:rotate(-180deg)}.container-3_8ayT2Q .background-Q1Fcmxly{fill:var(--tv-color-pane-background,#fff);stroke:var(--tv-color-platform-background,#e0e3eb)}html.theme-dark .container-3_8ayT2Q .background-Q1Fcmxly{stroke:var(--tv-color-platform-background,#2a2e39);fill:var(--tv-color-pane-background,#131722)}.container-3_8ayT2Q .arrow-WcYWFXUn,html.theme-dark .container-3_8ayT2Q .arrow-WcYWFXUn{stroke:#9db2bd}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.container-3_8ayT2Q:hover .background-Q1Fcmxly{fill:var(--tv-color-toolbar-toggle-button-background-active,#2196f3)}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.container-3_8ayT2Q:hover .background-Q1Fcmxly,html.theme-dark .container-3_8ayT2Q:hover .background-Q1Fcmxly{stroke:var(--tv-color-toolbar-toggle-button-background-active-hover,#1e88e5)}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .container-3_8ayT2Q:hover .background-Q1Fcmxly{fill:var(--tv-color-toolbar-toggle-button-background-active,#1976d2)}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.container-3_8ayT2Q:hover .arrow-WcYWFXUn{stroke:var(--tv-color-pane-background,#fff)}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .container-3_8ayT2Q:hover .arrow-WcYWFXUn{stroke:var(--tv-color-pane-background,#131722)}}.toggleButton-3TAD9tll{position:absolute;z-index:10;bottom:58px;left:100%;margin-left:-6px}.toggleButton-3TAD9tll.collapsed-2PwwPYYB{left:0;margin-left:0}.toggleButton-3TAD9tll .background-1bSnR2Ey{fill:var(--tv-color-toolbar-toggle-button-background-active,#2196f3)}.toggleButton-3TAD9tll .background-1bSnR2Ey,html.theme-dark .toggleButton-3TAD9tll .background-1bSnR2Ey{stroke:var(--tv-color-toolbar-toggle-button-background-active-hover,#1e88e5)}html.theme-dark .toggleButton-3TAD9tll .background-1bSnR2Ey{fill:var(--tv-color-toolbar-toggle-button-background-active,#1976d2)}.toggleButton-3TAD9tll .arrow-liYbPQ3o{stroke:var(--tv-color-pane-background,#fff)}html.theme-dark .toggleButton-3TAD9tll .arrow-liYbPQ3o{stroke:var(--tv-color-pane-background,#131722)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.toggleButton-3TAD9tll:hover .background-1bSnR2Ey{fill:var(--tv-color-toolbar-toggle-button-background-active-hover,#1e88e5)}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.toggleButton-3TAD9tll:hover .background-1bSnR2Ey,html.theme-dark .toggleButton-3TAD9tll:hover .background-1bSnR2Ey{stroke:var(--tv-color-toolbar-toggle-button-background-active-hover,#1e88e5)}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .toggleButton-3TAD9tll:hover .background-1bSnR2Ey{fill:var(--tv-color-toolbar-toggle-button-background-active-hover,#1e88e5)}}.drawingToolbar-U3_QXRof{position:relative;height:100%;-webkit-user-select:none;user-select:none;background-color:var(--tv-color-pane-background,#fff)}html.theme-dark .drawingToolbar-U3_QXRof{background-color:var(--tv-color-pane-background,#131722)}.drawingToolbar-U3_QXRof.isHidden-2d-PYkzV,html.theme-dark .drawingToolbar-U3_QXRof.isHidden-2d-PYkzV{background-color:transparent}.drawingToolbar-U3_QXRof.isHidden-2d-PYkzV .inner-1xuW-gY4{display:none}.popupMenuItem-1b59KAzs{font-size:16px}.inner-1xuW-gY4{display:flex;flex:1 0 auto;flex-direction:column;width:52px;background-color:var(--tv-color-platform-background,#e0e3eb)}html.theme-dark .inner-1xuW-gY4{background-color:var(--tv-color-platform-background,#2a2e39)}.group-2JyOhh7Z{padding:6px 0;background-color:var(--tv-color-pane-background,#fff);border-top-left-radius:2px;border-bottom-left-radius:2px}html.theme-dark .group-2JyOhh7Z{background-color:var(--tv-color-pane-background,#131722)}.group-2JyOhh7Z+.group-2JyOhh7Z{margin-top:1px}.group-2JyOhh7Z:first-child{border-top-left-radius:0}.group-2JyOhh7Z.noGroupPadding-1TTjVKWk{padding:0}.lastGroup-O75UB5Xa{border-radius:0;padding-bottom:20px}.fill-1djIbBXv{flex:1 1 100%;background-color:var(--tv-color-pane-background,#fff);margin-top:-2px;min-height:2px}html.theme-dark .fill-1djIbBXv{background-color:var(--tv-color-pane-background,#131722)}.separator-1BAqp1-l{position:relative;margin:5px 0;width:100%;height:1px;background-color:#e0e3eb}html.theme-dark .separator-1BAqp1-l{background-color:#434651} \ No newline at end of file diff --git a/public/charting_library/bundles/73.801f0de9b068229d1755.js b/public/charting_library/bundles/73.801f0de9b068229d1755.js new file mode 100644 index 00000000..e093ed90 --- /dev/null +++ b/public/charting_library/bundles/73.801f0de9b068229d1755.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[73],[]]); \ No newline at end of file diff --git a/public/charting_library/bundles/73.f43bede83ca343c13a7e.css b/public/charting_library/bundles/73.f43bede83ca343c13a7e.css new file mode 100644 index 00000000..1833e2cc --- /dev/null +++ b/public/charting_library/bundles/73.f43bede83ca343c13a7e.css @@ -0,0 +1 @@ +.sortButton-16hjqEoU{display:flex;align-items:center;justify-content:center;margin-left:auto;color:#131722;width:34px;height:34px;border-radius:2px}html.theme-dark .sortButton-16hjqEoU{color:#b2b5be}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.sortButton-16hjqEoU:hover{background-color:#f0f3fa}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .sortButton-16hjqEoU:hover{background-color:#363a45}}.sortButton-16hjqEoU .icon-2nbSQjFT{height:28px}.container-3Qk84Vpk{padding:2px 0}.labelWrap-1kffAsJL{display:flex;align-items:center;justify-content:center}.labelWrap-1kffAsJL .icon-3s9Fy0WO{height:28px;width:28px;padding-right:6px}.labelWrap-1kffAsJL .text-1ie73mtL{padding-right:11px}.container-1oGzHiUj{display:flex;align-items:flex-end;flex-shrink:0;box-sizing:border-box;padding:9px 17px 3px 32px}.title-2FsC4R5h{margin-bottom:5px;font-size:11px;line-height:16px;letter-spacing:.4px;text-transform:uppercase;color:#787b86}.wrap-ghxWUnOu{position:absolute;right:0;top:0;bottom:0;width:8px;cursor:default;pointer-events:all;will-change:height}.wrap--horizontal-1sVOJLqZ{top:auto;left:0;right:0;height:8px;will-change:width}.bar-2ZGFe1r-{display:flex;position:absolute;justify-content:center;align-items:center;top:0;left:0;width:100%;will-change:height,transform}.bar-2ZGFe1r- .barInner-2f6z58Ci{width:4px;height:calc(100% - 4px);border-radius:2px;background-color:#d1d4dc}html.theme-dark .bar-2ZGFe1r- .barInner-2f6z58Ci{background-color:#50535e}.bar-2ZGFe1r- .barInner--horizontal-35zIxXob{width:calc(100% - 4px);height:4px}.bar--horizontal-2ofOPj8L{top:0;left:0;width:auto;height:100%;will-change:width,transform}.scrollWrap-2ycJ5xsk{position:absolute;will-change:visibility;pointer-events:none}.overlapScrollWrap-236iNA0w{position:absolute;right:0}.scrollContainer-1OsLRrZC{flex:1 1 auto;overflow-y:auto;overflow-x:hidden;min-height:145px;-webkit-overflow-scrolling:touch;-ms-overflow-style:none;scrollbar-width:none}@media screen and (max-height:290px){.scrollContainer-1OsLRrZC{min-height:auto}}.scrollContainer-1OsLRrZC::-webkit-scrollbar{width:5px;height:5px}.scrollContainer-1OsLRrZC::-webkit-scrollbar-thumb{border:1px solid;border-color:#f1f3f6;border-radius:3px;background-color:#9598a1}html.theme-dark .scrollContainer-1OsLRrZC::-webkit-scrollbar-thumb{background-color:#363a45;border-color:#1e222d}.scrollContainer-1OsLRrZC::-webkit-scrollbar-track{background-color:transparent;border-radius:3px}.scrollContainer-1OsLRrZC.sb-scrollbar-wrap{display:none}.scrollContainer-1OsLRrZC::-webkit-scrollbar{display:none;width:0;height:0}.scrollContainer-1OsLRrZC::-webkit-scrollbar-thumb,.scrollContainer-1OsLRrZC::-webkit-scrollbar-track{display:none}.scrollContainer-1OsLRrZC::-webkit-scrollbar-corner{display:none}.itemRow-3JQtg1cT{display:flex;align-items:center;height:52px;cursor:default}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.itemRow-3JQtg1cT:hover{background-color:#f0f3fa}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .itemRow-3JQtg1cT:hover{background-color:#2a2e39}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.itemRow-3JQtg1cT:hover .favoriteButton-1yjXmqy0{opacity:1}}.itemRow-3JQtg1cT:last-child{margin-bottom:6px}.itemRow-3JQtg1cT.active-2Ne8Zyok{background-color:#2196f3}html.theme-dark .itemRow-3JQtg1cT.active-2Ne8Zyok{background-color:#1976d2}.itemRow-3JQtg1cT.mobile-3cRbBpAw{height:55px}.itemRow-3JQtg1cT .itemInfo-3NQvH05Z{display:flex;flex-direction:column;padding-right:20px;overflow:hidden}.itemRow-3JQtg1cT .itemInfo-3NQvH05Z .title-utNMTX_N{font-size:14px;line-height:21px;margin-bottom:4px;color:#131722;overflow:hidden;white-space:nowrap}html.theme-dark .itemRow-3JQtg1cT .itemInfo-3NQvH05Z .title-utNMTX_N{color:#b2b5be}.itemRow-3JQtg1cT .itemInfo-3NQvH05Z .title-utNMTX_N.active-2Ne8Zyok{color:#fff}html.theme-dark .itemRow-3JQtg1cT .itemInfo-3NQvH05Z .title-utNMTX_N.active-2Ne8Zyok{color:#d1d4dc}.itemRow-3JQtg1cT .itemInfo-3NQvH05Z .title-utNMTX_N.mobile-3cRbBpAw{font-size:16px;line-height:24px;margin:4px 0 2px}.itemRow-3JQtg1cT .itemInfo-3NQvH05Z .details-1rOd8IMz{font-size:12px;line-height:17px;color:#787b86;overflow:hidden;white-space:nowrap}.itemRow-3JQtg1cT .itemInfo-3NQvH05Z .details-1rOd8IMz.active-2Ne8Zyok{color:#fff}html.theme-dark .itemRow-3JQtg1cT .itemInfo-3NQvH05Z .details-1rOd8IMz.active-2Ne8Zyok{color:#d1d4dc}.itemRow-3JQtg1cT .itemInfo-3NQvH05Z .details-1rOd8IMz.mobile-3cRbBpAw{margin-bottom:8px}.itemRow-3JQtg1cT .itemInfo-3NQvH05Z .highlight-3BtgMHlt{color:#1e88e5}.itemRow-3JQtg1cT .itemInfo-3NQvH05Z .highlight-3BtgMHlt.active-2Ne8Zyok,html.theme-dark .itemRow-3JQtg1cT .itemInfo-3NQvH05Z .highlight-3BtgMHlt.active-2Ne8Zyok{color:#90caf9}.itemRow-3JQtg1cT .itemInfoWithPadding-2CZUseHM{padding-left:20px}.itemRow-3JQtg1cT .favoriteButton-1yjXmqy0{margin:0 4px 0 6px}.itemRow-3JQtg1cT .favoriteButton-1yjXmqy0.favorite-3iQ0dczX,.itemRow-3JQtg1cT .favoriteButton-1yjXmqy0.mobile-3cRbBpAw{opacity:1}.itemRow-3JQtg1cT .removeButton-1FahXcg8{margin-left:auto;margin-right:18px}.contentList-VpXJB1aY{min-height:0;max-height:526px;width:420px}@media screen and (min-width:480px){.contentList-VpXJB1aY{width:480px;max-height:526px}}@media screen and (max-width:419px){.contentList-VpXJB1aY{width:100%;max-height:none}} \ No newline at end of file diff --git a/public/charting_library/bundles/73.f43bede83ca343c13a7e.rtl.css b/public/charting_library/bundles/73.f43bede83ca343c13a7e.rtl.css new file mode 100644 index 00000000..b525dffa --- /dev/null +++ b/public/charting_library/bundles/73.f43bede83ca343c13a7e.rtl.css @@ -0,0 +1 @@ +.sortButton-16hjqEoU{display:flex;align-items:center;justify-content:center;margin-right:auto;color:#131722;width:34px;height:34px;border-radius:2px}html.theme-dark .sortButton-16hjqEoU{color:#b2b5be}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.sortButton-16hjqEoU:hover{background-color:#f0f3fa}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .sortButton-16hjqEoU:hover{background-color:#363a45}}.sortButton-16hjqEoU .icon-2nbSQjFT{height:28px}.container-3Qk84Vpk{padding:2px 0}.labelWrap-1kffAsJL{display:flex;align-items:center;justify-content:center}.labelWrap-1kffAsJL .icon-3s9Fy0WO{height:28px;width:28px;padding-left:6px}.labelWrap-1kffAsJL .text-1ie73mtL{padding-left:11px}.container-1oGzHiUj{display:flex;align-items:flex-end;flex-shrink:0;box-sizing:border-box;padding:9px 32px 3px 17px}.title-2FsC4R5h{margin-bottom:5px;font-size:11px;line-height:16px;letter-spacing:.4px;text-transform:uppercase;color:#787b86}.wrap-ghxWUnOu{position:absolute;left:0;top:0;bottom:0;width:8px;cursor:default;pointer-events:all;will-change:height}.wrap--horizontal-1sVOJLqZ{top:auto;right:0;left:0;height:8px;will-change:width}.bar-2ZGFe1r-{display:flex;position:absolute;justify-content:center;align-items:center;top:0;right:0;width:100%;will-change:height,transform}.bar-2ZGFe1r- .barInner-2f6z58Ci{width:4px;height:calc(100% - 4px);border-radius:2px;background-color:#d1d4dc}html.theme-dark .bar-2ZGFe1r- .barInner-2f6z58Ci{background-color:#50535e}.bar-2ZGFe1r- .barInner--horizontal-35zIxXob{width:calc(100% - 4px);height:4px}.bar--horizontal-2ofOPj8L{top:0;right:0;width:auto;height:100%;will-change:width,transform}.scrollWrap-2ycJ5xsk{position:absolute;will-change:visibility;pointer-events:none}.overlapScrollWrap-236iNA0w{position:absolute;left:0}.scrollContainer-1OsLRrZC{flex:1 1 auto;overflow-y:auto;overflow-x:hidden;min-height:145px;-webkit-overflow-scrolling:touch;-ms-overflow-style:none;scrollbar-width:none}@media screen and (max-height:290px){.scrollContainer-1OsLRrZC{min-height:auto}}.scrollContainer-1OsLRrZC::-webkit-scrollbar{width:5px;height:5px}.scrollContainer-1OsLRrZC::-webkit-scrollbar-thumb{border:1px solid;border-color:#f1f3f6;border-radius:3px;background-color:#9598a1}html.theme-dark .scrollContainer-1OsLRrZC::-webkit-scrollbar-thumb{background-color:#363a45;border-color:#1e222d}.scrollContainer-1OsLRrZC::-webkit-scrollbar-track{background-color:transparent;border-radius:3px}.scrollContainer-1OsLRrZC.sb-scrollbar-wrap{display:none}.scrollContainer-1OsLRrZC::-webkit-scrollbar{display:none;width:0;height:0}.scrollContainer-1OsLRrZC::-webkit-scrollbar-thumb,.scrollContainer-1OsLRrZC::-webkit-scrollbar-track{display:none}.scrollContainer-1OsLRrZC::-webkit-scrollbar-corner{display:none}.itemRow-3JQtg1cT{display:flex;align-items:center;height:52px;cursor:default}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.itemRow-3JQtg1cT:hover{background-color:#f0f3fa}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .itemRow-3JQtg1cT:hover{background-color:#2a2e39}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.itemRow-3JQtg1cT:hover .favoriteButton-1yjXmqy0{opacity:1}}.itemRow-3JQtg1cT:last-child{margin-bottom:6px}.itemRow-3JQtg1cT.active-2Ne8Zyok{background-color:#2196f3}html.theme-dark .itemRow-3JQtg1cT.active-2Ne8Zyok{background-color:#1976d2}.itemRow-3JQtg1cT.mobile-3cRbBpAw{height:55px}.itemRow-3JQtg1cT .itemInfo-3NQvH05Z{display:flex;flex-direction:column;padding-left:20px;overflow:hidden}.itemRow-3JQtg1cT .itemInfo-3NQvH05Z .title-utNMTX_N{font-size:14px;line-height:21px;margin-bottom:4px;color:#131722;overflow:hidden;white-space:nowrap}html.theme-dark .itemRow-3JQtg1cT .itemInfo-3NQvH05Z .title-utNMTX_N{color:#b2b5be}.itemRow-3JQtg1cT .itemInfo-3NQvH05Z .title-utNMTX_N.active-2Ne8Zyok{color:#fff}html.theme-dark .itemRow-3JQtg1cT .itemInfo-3NQvH05Z .title-utNMTX_N.active-2Ne8Zyok{color:#d1d4dc}.itemRow-3JQtg1cT .itemInfo-3NQvH05Z .title-utNMTX_N.mobile-3cRbBpAw{font-size:16px;line-height:24px;margin:4px 0 2px}.itemRow-3JQtg1cT .itemInfo-3NQvH05Z .details-1rOd8IMz{font-size:12px;line-height:17px;color:#787b86;overflow:hidden;white-space:nowrap}.itemRow-3JQtg1cT .itemInfo-3NQvH05Z .details-1rOd8IMz.active-2Ne8Zyok{color:#fff}html.theme-dark .itemRow-3JQtg1cT .itemInfo-3NQvH05Z .details-1rOd8IMz.active-2Ne8Zyok{color:#d1d4dc}.itemRow-3JQtg1cT .itemInfo-3NQvH05Z .details-1rOd8IMz.mobile-3cRbBpAw{margin-bottom:8px}.itemRow-3JQtg1cT .itemInfo-3NQvH05Z .highlight-3BtgMHlt{color:#1e88e5}.itemRow-3JQtg1cT .itemInfo-3NQvH05Z .highlight-3BtgMHlt.active-2Ne8Zyok,html.theme-dark .itemRow-3JQtg1cT .itemInfo-3NQvH05Z .highlight-3BtgMHlt.active-2Ne8Zyok{color:#90caf9}.itemRow-3JQtg1cT .itemInfoWithPadding-2CZUseHM{padding-right:20px}.itemRow-3JQtg1cT .favoriteButton-1yjXmqy0{margin:0 6px 0 4px}.itemRow-3JQtg1cT .favoriteButton-1yjXmqy0.favorite-3iQ0dczX,.itemRow-3JQtg1cT .favoriteButton-1yjXmqy0.mobile-3cRbBpAw{opacity:1}.itemRow-3JQtg1cT .removeButton-1FahXcg8{margin-right:auto;margin-left:18px}.contentList-VpXJB1aY{min-height:0;max-height:526px;width:420px}@media screen and (min-width:480px){.contentList-VpXJB1aY{width:480px;max-height:526px}}@media screen and (max-width:419px){.contentList-VpXJB1aY{width:100%;max-height:none}} \ No newline at end of file diff --git a/public/charting_library/bundles/7393f661fc7d4389ea6d4dabd2a5aeea.png b/public/charting_library/bundles/7393f661fc7d4389ea6d4dabd2a5aeea.png new file mode 100644 index 00000000..f493b31c Binary files /dev/null and b/public/charting_library/bundles/7393f661fc7d4389ea6d4dabd2a5aeea.png differ diff --git a/public/charting_library/bundles/74.2521feec78da95ba2621.js b/public/charting_library/bundles/74.2521feec78da95ba2621.js new file mode 100644 index 00000000..2d2d1d1f --- /dev/null +++ b/public/charting_library/bundles/74.2521feec78da95ba2621.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[74],[]]); \ No newline at end of file diff --git a/public/charting_library/bundles/74.38f652489bddb2b9802b.css b/public/charting_library/bundles/74.38f652489bddb2b9802b.css new file mode 100644 index 00000000..a3f50595 --- /dev/null +++ b/public/charting_library/bundles/74.38f652489bddb2b9802b.css @@ -0,0 +1 @@ +.container-V40c9xRz{position:relative;width:100%;min-width:0;overflow:auto}.title-34aDs39w{margin-left:4px;font-size:14px;color:#131722;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.title-34aDs39w.disabled-17IgfIYd,html.theme-dark .title-34aDs39w{color:#b2b5be}html.theme-dark .title-34aDs39w.disabled-17IgfIYd{color:#50535e}.icon-2hTCJTIH{font-size:0;margin-left:4px}.icon-2hTCJTIH.locked-20ljjQkW{color:#ef5350}.icon-2hTCJTIH.open-19XeUlGJ{color:#26a69a}.actionIcon-3jB28-_s+.actionIcon-3jB28-_s{margin-left:4px}.actionIcon-3jB28-_s.selected-lKkvzAlt{--tv-list-item-button-background-hover-color:#90caf9}html.theme-dark .actionIcon-3jB28-_s.selected-lKkvzAlt{--tv-list-item-button-background-hover-color:#144987}@media screen and (max-height:445px),screen and (max-width:567px){.codeIcon-1DtZ78WN{display:none}}.highlighted-3Ob1jr_R,html.theme-dark .highlighted-3Ob1jr_R{color:#1e88e5}@keyframes highlight-animation-theme-light-1TIZ6Gga{0%{background-color:transparent}30%{background-color:#e3f2fd}60%{background-color:transparent}to{background-color:#bbdefb}}@keyframes highlight-animation-theme-dark-3xWPfm4R{0%{background-color:transparent}30%{background-color:#132742}60%{background-color:transparent}to{background-color:#143661}}.container-1e-eHKCj{display:flex;align-items:center;height:32px;padding-left:6px;padding-right:16px;box-sizing:border-box}.container-1e-eHKCj.selected-ObuRahJa{background-color:#bbdefb}html.theme-dark .container-1e-eHKCj.selected-ObuRahJa{background-color:#143661}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.container-1e-eHKCj:not(.disabled-3lywlGlv):hover{background-color:#f0f3fa}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .container-1e-eHKCj:not(.disabled-3lywlGlv):hover{background-color:#2a2e39}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.container-1e-eHKCj:not(.disabled-3lywlGlv):hover .favorite-PSp_jkxl{visibility:visible}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.container-1e-eHKCj:not(.disabled-3lywlGlv):hover.selected-ObuRahJa{background-color:#bbdefb}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .container-1e-eHKCj:not(.disabled-3lywlGlv):hover.selected-ObuRahJa{background-color:#143661}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.container-1e-eHKCj:not(.disabled-3lywlGlv):hover.selected-ObuRahJa .favorite-PSp_jkxl:hover{background-color:#90caf9}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .container-1e-eHKCj:not(.disabled-3lywlGlv):hover.selected-ObuRahJa .favorite-PSp_jkxl:hover{background-color:#144987}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.container-1e-eHKCj:not(.disabled-3lywlGlv):hover .actions-29vlkAXU{visibility:visible}}.container-1e-eHKCj.highlighted-3YDl6jC6{animation-duration:.8s;animation-iteration-count:1;animation-fill-mode:forwards}.container-1e-eHKCj.highlighted-3YDl6jC6.light-2HF6Zxxl{animation-name:highlight-animation-theme-light-1TIZ6Gga}.container-1e-eHKCj.highlighted-3YDl6jC6.dark-1FO6oC-E{animation-name:highlight-animation-theme-dark-3xWPfm4R}@media screen and (max-width:419px){.container-1e-eHKCj{height:40px}}.main-34wD0nIh{display:flex;flex:1 1 auto;min-width:0;margin-right:auto;align-items:center}.main-34wD0nIh.paddingLeft-1urwbIqx{padding-left:22px}.favorite-PSp_jkxl{visibility:hidden}.favorite-PSp_jkxl.isActive-2O3vI4me,.favorite-PSp_jkxl.isMobile-2aXWDdT8{visibility:visible}.author-3sD2DZRV{flex-basis:100px;min-width:100px;color:#2196f3;margin-left:24px;cursor:default;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}html.theme-dark .author-3sD2DZRV{color:#1976d2}.likes-17ztM5mP{flex-basis:50px;min-width:50px;color:#131722;margin-left:24px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}html.theme-dark .likes-17ztM5mP{color:#b2b5be}.actions-29vlkAXU{display:flex;flex-basis:44px;min-width:44px;justify-content:flex-end;margin-left:24px;visibility:hidden}.actions-29vlkAXU.isMobile-2aXWDdT8{visibility:visible}.title-34kQlbrM{margin:0;font-weight:400;font-size:11px;line-height:16px;color:#787b86;letter-spacing:.4px;text-transform:uppercase;white-space:nowrap}html.theme-dark .title-34kQlbrM{color:#787b86}.title-34kQlbrM:first-child{margin-right:auto}.title-34kQlbrM+.title-34kQlbrM{margin-left:24px}.title-34kQlbrM.small-vZQvMj9o{width:50px}.title-34kQlbrM.normal-2Xipsjws{width:100px}.title-34kQlbrM.large-3RKX3yN_{width:150px}.container-2xksDfDy{display:flex;padding:16px 84px 8px 32px;box-sizing:border-box}.container-1nR_bX0y{display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center}.image-1upzSf_2{margin-bottom:8px}.title-3EHABq-W{margin:0 0 16px;font-size:20px;font-weight:700;color:#000}html.theme-dark .title-3EHABq-W{color:#b2b5be}.description-3sR4j2iN{margin:0 0 24px;font-size:16px;line-height:24px;color:#000}html.theme-dark .description-3sR4j2iN{color:#b2b5be}.dialog-12W2lAaB{width:calc(100% - 20px);max-width:840px;height:600px}.dialogLibrary-11wUWBuU{height:600px}.listContainer-313-x-WK::-webkit-scrollbar{width:5px;height:5px}.listContainer-313-x-WK::-webkit-scrollbar-thumb{border:1px solid;border-color:#f1f3f6;border-radius:3px;background-color:#9598a1}html.theme-dark .listContainer-313-x-WK::-webkit-scrollbar-thumb{background-color:#363a45;border-color:#1e222d}.listContainer-313-x-WK::-webkit-scrollbar-track{background-color:transparent;border-radius:3px}.listContainer-313-x-WK::-webkit-scrollbar-corner{display:none}.scroll-3Eu9HUkX::-webkit-scrollbar{width:5px;height:5px}.scroll-3Eu9HUkX::-webkit-scrollbar-thumb{border:1px solid;border-color:#f1f3f6;border-radius:3px;background-color:#9598a1}html.theme-dark .scroll-3Eu9HUkX::-webkit-scrollbar-thumb{background-color:#363a45;border-color:#1e222d}.scroll-3Eu9HUkX::-webkit-scrollbar-track{background-color:transparent;border-radius:3px}.scroll-3Eu9HUkX::-webkit-scrollbar-corner{display:none}@media screen and (max-width:419px){.scroll-3Eu9HUkX{box-sizing:border-box;padding-top:6px;padding-bottom:6px}}.sidebarContainer-1lfmvpaZ{padding-top:6px;padding-bottom:6px}.backButton-C9cNFJsB{display:flex;align-items:center;width:28px;height:100%;padding-right:20px;color:#787b86}.noContentBlock-Ly1pGn6p{min-height:100%;padding:24px 40px 60px;box-sizing:border-box} \ No newline at end of file diff --git a/public/charting_library/bundles/74.38f652489bddb2b9802b.rtl.css b/public/charting_library/bundles/74.38f652489bddb2b9802b.rtl.css new file mode 100644 index 00000000..382a6679 --- /dev/null +++ b/public/charting_library/bundles/74.38f652489bddb2b9802b.rtl.css @@ -0,0 +1 @@ +.container-V40c9xRz{position:relative;width:100%;min-width:0;overflow:auto}.title-34aDs39w{margin-right:4px;font-size:14px;color:#131722;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.title-34aDs39w.disabled-17IgfIYd,html.theme-dark .title-34aDs39w{color:#b2b5be}html.theme-dark .title-34aDs39w.disabled-17IgfIYd{color:#50535e}.icon-2hTCJTIH{font-size:0;margin-right:4px}.icon-2hTCJTIH.locked-20ljjQkW{color:#ef5350}.icon-2hTCJTIH.open-19XeUlGJ{color:#26a69a}.actionIcon-3jB28-_s+.actionIcon-3jB28-_s{margin-right:4px}.actionIcon-3jB28-_s.selected-lKkvzAlt{--tv-list-item-button-background-hover-color:#90caf9}html.theme-dark .actionIcon-3jB28-_s.selected-lKkvzAlt{--tv-list-item-button-background-hover-color:#144987}@media screen and (max-height:445px),screen and (max-width:567px){.codeIcon-1DtZ78WN{display:none}}.highlighted-3Ob1jr_R,html.theme-dark .highlighted-3Ob1jr_R{color:#1e88e5}@keyframes highlight-animation-theme-light-1TIZ6Gga{0%{background-color:transparent}30%{background-color:#e3f2fd}60%{background-color:transparent}to{background-color:#bbdefb}}@keyframes highlight-animation-theme-dark-3xWPfm4R{0%{background-color:transparent}30%{background-color:#132742}60%{background-color:transparent}to{background-color:#143661}}.container-1e-eHKCj{display:flex;align-items:center;height:32px;padding-right:6px;padding-left:16px;box-sizing:border-box}.container-1e-eHKCj.selected-ObuRahJa{background-color:#bbdefb}html.theme-dark .container-1e-eHKCj.selected-ObuRahJa{background-color:#143661}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.container-1e-eHKCj:not(.disabled-3lywlGlv):hover{background-color:#f0f3fa}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .container-1e-eHKCj:not(.disabled-3lywlGlv):hover{background-color:#2a2e39}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.container-1e-eHKCj:not(.disabled-3lywlGlv):hover .favorite-PSp_jkxl{visibility:visible}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.container-1e-eHKCj:not(.disabled-3lywlGlv):hover.selected-ObuRahJa{background-color:#bbdefb}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .container-1e-eHKCj:not(.disabled-3lywlGlv):hover.selected-ObuRahJa{background-color:#143661}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.container-1e-eHKCj:not(.disabled-3lywlGlv):hover.selected-ObuRahJa .favorite-PSp_jkxl:hover{background-color:#90caf9}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .container-1e-eHKCj:not(.disabled-3lywlGlv):hover.selected-ObuRahJa .favorite-PSp_jkxl:hover{background-color:#144987}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.container-1e-eHKCj:not(.disabled-3lywlGlv):hover .actions-29vlkAXU{visibility:visible}}.container-1e-eHKCj.highlighted-3YDl6jC6{animation-duration:.8s;animation-iteration-count:1;animation-fill-mode:forwards}.container-1e-eHKCj.highlighted-3YDl6jC6.light-2HF6Zxxl{animation-name:highlight-animation-theme-light-1TIZ6Gga}.container-1e-eHKCj.highlighted-3YDl6jC6.dark-1FO6oC-E{animation-name:highlight-animation-theme-dark-3xWPfm4R}@media screen and (max-width:419px){.container-1e-eHKCj{height:40px}}.main-34wD0nIh{display:flex;flex:1 1 auto;min-width:0;margin-left:auto;align-items:center}.main-34wD0nIh.paddingLeft-1urwbIqx{padding-right:22px}.favorite-PSp_jkxl{visibility:hidden}.favorite-PSp_jkxl.isActive-2O3vI4me,.favorite-PSp_jkxl.isMobile-2aXWDdT8{visibility:visible}.author-3sD2DZRV{flex-basis:100px;min-width:100px;color:#2196f3;margin-right:24px;cursor:default;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}html.theme-dark .author-3sD2DZRV{color:#1976d2}.likes-17ztM5mP{flex-basis:50px;min-width:50px;color:#131722;margin-right:24px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}html.theme-dark .likes-17ztM5mP{color:#b2b5be}.actions-29vlkAXU{display:flex;flex-basis:44px;min-width:44px;justify-content:flex-end;margin-right:24px;visibility:hidden}.actions-29vlkAXU.isMobile-2aXWDdT8{visibility:visible}.title-34kQlbrM{margin:0;font-weight:400;font-size:11px;line-height:16px;color:#787b86;letter-spacing:.4px;text-transform:uppercase;white-space:nowrap}html.theme-dark .title-34kQlbrM{color:#787b86}.title-34kQlbrM:first-child{margin-left:auto}.title-34kQlbrM+.title-34kQlbrM{margin-right:24px}.title-34kQlbrM.small-vZQvMj9o{width:50px}.title-34kQlbrM.normal-2Xipsjws{width:100px}.title-34kQlbrM.large-3RKX3yN_{width:150px}.container-2xksDfDy{display:flex;padding:16px 32px 8px 84px;box-sizing:border-box}.container-1nR_bX0y{display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center}.image-1upzSf_2{margin-bottom:8px}.title-3EHABq-W{margin:0 0 16px;font-size:20px;font-weight:700;color:#000}html.theme-dark .title-3EHABq-W{color:#b2b5be}.description-3sR4j2iN{margin:0 0 24px;font-size:16px;line-height:24px;color:#000}html.theme-dark .description-3sR4j2iN{color:#b2b5be}.dialog-12W2lAaB{width:calc(100% - 20px);max-width:840px;height:600px}.dialogLibrary-11wUWBuU{height:600px}.listContainer-313-x-WK::-webkit-scrollbar{width:5px;height:5px}.listContainer-313-x-WK::-webkit-scrollbar-thumb{border:1px solid;border-color:#f1f3f6;border-radius:3px;background-color:#9598a1}html.theme-dark .listContainer-313-x-WK::-webkit-scrollbar-thumb{background-color:#363a45;border-color:#1e222d}.listContainer-313-x-WK::-webkit-scrollbar-track{background-color:transparent;border-radius:3px}.listContainer-313-x-WK::-webkit-scrollbar-corner{display:none}.scroll-3Eu9HUkX::-webkit-scrollbar{width:5px;height:5px}.scroll-3Eu9HUkX::-webkit-scrollbar-thumb{border:1px solid;border-color:#f1f3f6;border-radius:3px;background-color:#9598a1}html.theme-dark .scroll-3Eu9HUkX::-webkit-scrollbar-thumb{background-color:#363a45;border-color:#1e222d}.scroll-3Eu9HUkX::-webkit-scrollbar-track{background-color:transparent;border-radius:3px}.scroll-3Eu9HUkX::-webkit-scrollbar-corner{display:none}@media screen and (max-width:419px){.scroll-3Eu9HUkX{box-sizing:border-box;padding-top:6px;padding-bottom:6px}}.sidebarContainer-1lfmvpaZ{padding-top:6px;padding-bottom:6px}.backButton-C9cNFJsB{display:flex;align-items:center;width:28px;height:100%;padding-left:20px;color:#787b86}.backButton-C9cNFJsB svg{transform:rotate(180deg)}.noContentBlock-Ly1pGn6p{min-height:100%;padding:24px 40px 60px;box-sizing:border-box} \ No newline at end of file diff --git a/public/charting_library/bundles/75.17abe3e8dce352c1b3ab.css b/public/charting_library/bundles/75.17abe3e8dce352c1b3ab.css new file mode 100644 index 00000000..d83262c7 --- /dev/null +++ b/public/charting_library/bundles/75.17abe3e8dce352c1b3ab.css @@ -0,0 +1 @@ +.group-wWM3zP_M{display:flex;align-items:center;height:100%;flex:0 0 auto;background-color:var(--tv-color-pane-background,#fff);margin-left:1px;border-radius:0;overflow:hidden;min-width:37px;justify-content:center;cursor:default}html.theme-dark .group-wWM3zP_M{background-color:var(--tv-color-pane-background,#131722)}.group-wWM3zP_M:first-child{border-bottom-left-radius:0;margin-left:0}.group-wWM3zP_M:last-child{border-bottom-right-radius:0;margin-right:0}.group-wWM3zP_M.noLeftDecoration-15F5a1TB{margin-left:0;border-bottom-left-radius:0}.group-wWM3zP_M.noRightDecoration-2GcAAgVb{margin-right:0;border-bottom-right-radius:0}.group-wWM3zP_M.noMinimalWidth-1sbl_ff5{min-width:0}.wrap-3tiHesTk{display:flex;height:38px;flex:1 1 auto;min-width:0}.wrap-3K4w_7te{display:flex;align-items:center;color:#8797a5;cursor:default}html.theme-dark .wrap-3K4w_7te{color:#8797a5}.wrap-3K4w_7te .icon-1dNdRXKB{margin:0 1px 0 8px}.wrap-3K4w_7te svg{fill:currentColor}.inner-v8eiKwdM{display:flex;height:100%}.fake-37paHC6T{position:fixed;visibility:hidden;top:0;left:0;height:38px}.fill-2axUON87{flex:1 1 100%;min-width:0}.fill-2axUON87.minimalPriority-1MGEuVHu{flex:1 1 0%}.fill-2axUON87.collapse-17ig2Mxu{flex:0 0 0%}.button-3xrjDzA4{padding:0 10px 0 5px}.iconButton-3vyD3BPg{padding:0 5px}.hidden-2kSvETGo{display:none}.symbolSearch-3I4QF1U_{max-width:500px;flex:1 1 100%;justify-content:flex-start}.symbolSearchClose-3QSRPDvy{min-width:38px;justify-content:center}.content-3mgFz85m{display:table;position:relative;width:100%;height:100%;white-space:nowrap}.desktopPublish-3xVralL7{display:flex}@media screen and (max-width:1019px){.desktopPublish-3xVralL7{display:none}}.mobilePublish-v3HVdbH2{display:none}@media screen and (max-width:1019px){.mobilePublish-v3HVdbH2{display:flex}}.toolbar-2n2cwgp5{position:relative;height:100%;padding:0;font-size:14px}.toolbar-2n2cwgp5.isHidden-GTob3P_C,html.theme-dark .toolbar-2n2cwgp5.isHidden-GTob3P_C{background-color:transparent}.toolbar-2n2cwgp5.isHidden-GTob3P_C .overflowWrap-PWdgT-U_{display:none}.overflowWrap-PWdgT-U_{overflow:hidden;height:38px}.customButton--jqJTfH5{color:#131722;padding:0 10px}html.theme-dark .customButton--jqJTfH5{color:#b2b5be}.customButton--jqJTfH5.hovered-1mGRUp3y,.customButton--jqJTfH5:active{color:#000}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.customButton--jqJTfH5:hover{color:#000}}html.theme-dark .customButton--jqJTfH5.hovered-1mGRUp3y,html.theme-dark .customButton--jqJTfH5:active{color:#c1c4cd}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .customButton--jqJTfH5:hover{color:#c1c4cd}} \ No newline at end of file diff --git a/public/charting_library/bundles/75.17abe3e8dce352c1b3ab.rtl.css b/public/charting_library/bundles/75.17abe3e8dce352c1b3ab.rtl.css new file mode 100644 index 00000000..95c5f759 --- /dev/null +++ b/public/charting_library/bundles/75.17abe3e8dce352c1b3ab.rtl.css @@ -0,0 +1 @@ +.group-wWM3zP_M{display:flex;align-items:center;height:100%;flex:0 0 auto;background-color:var(--tv-color-pane-background,#fff);margin-right:1px;border-radius:0;overflow:hidden;min-width:37px;justify-content:center;cursor:default}html.theme-dark .group-wWM3zP_M{background-color:var(--tv-color-pane-background,#131722)}.group-wWM3zP_M:first-child{border-bottom-right-radius:0;margin-right:0}.group-wWM3zP_M:last-child{border-bottom-left-radius:0;margin-left:0}.group-wWM3zP_M.noLeftDecoration-15F5a1TB{margin-right:0;border-bottom-right-radius:0}.group-wWM3zP_M.noRightDecoration-2GcAAgVb{margin-left:0;border-bottom-left-radius:0}.group-wWM3zP_M.noMinimalWidth-1sbl_ff5{min-width:0}.wrap-3tiHesTk{display:flex;height:38px;flex:1 1 auto;min-width:0}.wrap-3K4w_7te{display:flex;align-items:center;color:#8797a5;cursor:default}html.theme-dark .wrap-3K4w_7te{color:#8797a5}.wrap-3K4w_7te .icon-1dNdRXKB{margin:0 8px 0 1px}.wrap-3K4w_7te svg{fill:currentColor}.inner-v8eiKwdM{display:flex;height:100%}.fake-37paHC6T{position:fixed;visibility:hidden;top:0;right:0;height:38px}.fill-2axUON87{flex:1 1 100%;min-width:0}.fill-2axUON87.minimalPriority-1MGEuVHu{flex:1 1 0%}.fill-2axUON87.collapse-17ig2Mxu{flex:0 0 0%}.button-3xrjDzA4{padding:0 5px 0 10px}.iconButton-3vyD3BPg{padding:0 5px}.hidden-2kSvETGo{display:none}.symbolSearch-3I4QF1U_{max-width:500px;flex:1 1 100%;justify-content:flex-start}.symbolSearchClose-3QSRPDvy{min-width:38px;justify-content:center}.content-3mgFz85m{display:table;position:relative;width:100%;height:100%;white-space:nowrap}.desktopPublish-3xVralL7{display:flex}@media screen and (max-width:1019px){.desktopPublish-3xVralL7{display:none}}.mobilePublish-v3HVdbH2{display:none}@media screen and (max-width:1019px){.mobilePublish-v3HVdbH2{display:flex}}.toolbar-2n2cwgp5{position:relative;height:100%;padding:0;font-size:14px}.toolbar-2n2cwgp5.isHidden-GTob3P_C,html.theme-dark .toolbar-2n2cwgp5.isHidden-GTob3P_C{background-color:transparent}.toolbar-2n2cwgp5.isHidden-GTob3P_C .overflowWrap-PWdgT-U_{display:none}.overflowWrap-PWdgT-U_{overflow:hidden;height:38px}.customButton--jqJTfH5{color:#131722;padding:0 10px}html.theme-dark .customButton--jqJTfH5{color:#b2b5be}.customButton--jqJTfH5.hovered-1mGRUp3y,.customButton--jqJTfH5:active{color:#000}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.customButton--jqJTfH5:hover{color:#000}}html.theme-dark .customButton--jqJTfH5.hovered-1mGRUp3y,html.theme-dark .customButton--jqJTfH5:active{color:#c1c4cd}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .customButton--jqJTfH5:hover{color:#c1c4cd}} \ No newline at end of file diff --git a/public/charting_library/bundles/75.8bb207814ad927d3c48d.js b/public/charting_library/bundles/75.8bb207814ad927d3c48d.js new file mode 100644 index 00000000..e8e864cb --- /dev/null +++ b/public/charting_library/bundles/75.8bb207814ad927d3c48d.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[75],[]]); \ No newline at end of file diff --git a/public/charting_library/bundles/76.4db2074aaa017b28c166.js b/public/charting_library/bundles/76.4db2074aaa017b28c166.js new file mode 100644 index 00000000..acb38945 --- /dev/null +++ b/public/charting_library/bundles/76.4db2074aaa017b28c166.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[76],[]]); \ No newline at end of file diff --git a/public/charting_library/bundles/76.7d988838b0406bd4d5eb.css b/public/charting_library/bundles/76.7d988838b0406bd4d5eb.css new file mode 100644 index 00000000..e7440b96 --- /dev/null +++ b/public/charting_library/bundles/76.7d988838b0406bd4d5eb.css @@ -0,0 +1 @@ +.tv-control-input{display:block;padding:0 12px;width:100%;height:34px;font-size:13px;color:#4a4a4a;border:1px solid #dadde0;background-color:#fff;border-radius:2px;box-sizing:border-box;-webkit-tap-highlight-color:transparent;transition:border-color .35s ease,background-color .35s ease;-webkit-appearance:none;-moz-appearance:none;appearance:none}html.theme-dark .tv-control-input{background-color:#1e222d;border-color:#363c4e;color:#c5cbce}.tv-control-input::placeholder{color:#adaeb0;opacity:1}html.theme-dark .tv-control-input::placeholder{color:#4f5966}.tv-control-input:-webkit-autofill{-webkit-text-fill-color:#535353!important;box-shadow:inset 0 0 0 1000px #fff!important}.tv-control-input--size_xsmall{height:19px}.tv-control-input--size_small{height:27px}.tv-control-input--size_large{height:48px;font-size:16px}.tv-control-input--connect{border-left:0;border-right:0;border-radius:0}.tv-control-input--connect_left{border-left:none;border-top-left-radius:0;border-bottom-left-radius:0}.tv-control-input--connect_right{border-right:none;border-top-right-radius:0;border-bottom-right-radius:0}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-control-input:hover{border-color:#c8c8c8;transition-duration:.06s}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-control-input:hover{border-color:#4c525e}}.tv-control-input:focus{border-color:#2196f3!important;transition-duration:.06s}.tv-control-input[readonly]{color:#8a8a8a;border-color:#dadde0}.tv-control-input[readonly]:focus{border-color:#ececec!important}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-control-input[readonly]:hover{border-color:#ececec!important}}html.theme-dark .tv-control-input[readonly]:focus{border-color:#262b3e!important}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-control-input[readonly]:hover{border-color:#262b3e!important}}.tv-control-input--readonly_dark,.tv-control-input--readonly_dark[readonly]{color:#555}html.theme-dark .tv-control-input--readonly_dark,html.theme-dark .tv-control-input--readonly_dark[readonly]{color:#4c525e}.tv-control-input.i-disabled,.tv-control-input[disabled]{color:#ececec!important;border-color:#ececec!important}html.theme-dark .tv-control-input.i-disabled,html.theme-dark .tv-control-input[disabled]{border-color:#262b3e!important;color:#262b3e!important}.tv-control-input.i-disabled::placeholder,.tv-control-input[disabled]::placeholder{color:#ececec!important}html.theme-dark .tv-control-input.i-disabled::placeholder,html.theme-dark .tv-control-input[disabled]::placeholder{color:#262b3e!important}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-control-input.i-disabled:hover,.tv-control-input[disabled]:hover{border-color:#ececec!important}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-control-input.i-disabled:hover,html.theme-dark .tv-control-input[disabled]:hover{border-color:#262b3e!important}}.tv-control-input.i-error{border-color:#ff4a68!important}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-control-input.i-error:hover{border-color:#f24965!important}}.tv-control-input.i-error:focus{border-color:#ff173e!important}.tv-control-input.i-success{border-color:#009688!important}html.theme-dark .tv-control-input.i-success{border-color:#00796b!important}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-control-input.i-success:hover,html.theme-dark .tv-control-input.i-success:hover{border-color:#00897b!important}}.tv-control-input.i-success:active,.tv-control-input.i-success:focus{border-color:#00796b!important}html.theme-dark .tv-control-input.i-success:active,html.theme-dark .tv-control-input.i-success:focus{border-color:#009688!important}.tv-control-input--phone{direction:ltr;text-align:left}.tv-control-input--file{display:none}.tv-compare-tab__predefines{display:flex;flex-wrap:wrap}.tv-compare-tab__predefine-cell{width:50%;margin-top:20px}.tv-compare-tab__predefine-cell--wide{width:100%}.tv-compare-tab__checkbox-label{font-size:13px}.tv-compare-tab__checkbox-box:after{border-color:#9db2bd}.tv-add-symbol-tab__add-symbol-overlay{margin-top:20px}.tv-add-symbol-tab__checkbox-label{font-size:13px}.tv-add-symbol-tab__checkbox-box:after{border-color:#9db2bd}.tv-tabbed-dialog{background-color:#fff;color:#4a4a4a}html.theme-dark .tv-tabbed-dialog{color:#c5cbce;background-color:#1e222d}.tv-tabbed-dialog__header{display:flex;position:relative;padding-top:0;padding-left:0;padding-bottom:0;border-bottom:none!important;margin-bottom:-1px;z-index:6}.tv-tabbed-dialog__bottom-border{position:absolute;left:0;right:0;bottom:0;height:1px;background-color:#dadde0;z-index:-1}html.theme-dark .tv-tabbed-dialog__bottom-border{background-color:#363c4e}.tv-tabbed-dialog__tab-page{height:100%;display:none}.tv-tabbed-dialog__tab-page.active{overflow-y:auto;-webkit-overflow-scrolling:touch;-ms-overflow-style:-ms-autohiding-scrollbar;display:block}.tv-tabbed-dialog__close{z-index:6;top:5px}.tv-tabbed-dialog__tabs{width:100%;flex-shrink:1;height:53px}.tv-tabbed-dialog__custom-controls{margin-left:10px;flex-shrink:0}.tv-tabbed-dialog__tabs-arrow-left:before,.tv-tabbed-dialog__tabs-arrow-right:before{content:"";position:absolute;bottom:1px;left:0;right:0;height:1px}.tv-tabbed-dialog__tabs-arrow-left:before{background:linear-gradient(90deg,#dadde0 0,#dadde0 85%,hsla(0,0%,100%,0))}.tv-tabbed-dialog__tabs-arrow-right:before{background:linear-gradient(270deg,#dadde0 0,#dadde0 85%,hsla(0,0%,100%,0))}.tv-compare-dialog__scroll-box{padding:0 15px!important}.tv-compare-dialog__tab{padding:0 15px}.tv-compare-dialog__tab-page{position:relative;padding:20px 30px}.tv-compare-dialog__tab-page input{color:#4a4a4a;background-color:#fff;border-color:#dadde0}html.theme-dark .tv-compare-dialog__tab-page input{border-color:#363c4e;background-color:#1e222d;color:#c5cbce}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-compare-dialog__tab-page input:hover{border-color:#c8c8c8}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-compare-dialog__tab-page input:hover{border-color:#4c525e}} \ No newline at end of file diff --git a/public/charting_library/bundles/76.7d988838b0406bd4d5eb.rtl.css b/public/charting_library/bundles/76.7d988838b0406bd4d5eb.rtl.css new file mode 100644 index 00000000..1e97da93 --- /dev/null +++ b/public/charting_library/bundles/76.7d988838b0406bd4d5eb.rtl.css @@ -0,0 +1 @@ +.tv-control-input{display:block;padding:0 12px;width:100%;height:34px;font-size:13px;color:#4a4a4a;border:1px solid #dadde0;background-color:#fff;border-radius:2px;box-sizing:border-box;-webkit-tap-highlight-color:transparent;transition:border-color .35s ease,background-color .35s ease;-webkit-appearance:none;-moz-appearance:none;appearance:none}html.theme-dark .tv-control-input{background-color:#1e222d;border-color:#363c4e;color:#c5cbce}.tv-control-input::placeholder{color:#adaeb0;opacity:1}html.theme-dark .tv-control-input::placeholder{color:#4f5966}.tv-control-input:-webkit-autofill{-webkit-text-fill-color:#535353!important;box-shadow:inset 0 0 0 1000px #fff!important}.tv-control-input--size_xsmall{height:19px}.tv-control-input--size_small{height:27px}.tv-control-input--size_large{height:48px;font-size:16px}.tv-control-input--connect{border-right:0;border-left:0;border-radius:0}.tv-control-input--connect_left{border-right:none;border-top-right-radius:0;border-bottom-right-radius:0}.tv-control-input--connect_right{border-left:none;border-top-left-radius:0;border-bottom-left-radius:0}.tv-control-input--connect_right#id_username{direction:ltr;text-align:right}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-control-input:hover{border-color:#c8c8c8;transition-duration:.06s}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-control-input:hover{border-color:#4c525e}}.tv-control-input:focus{border-color:#2196f3!important;transition-duration:.06s}.tv-control-input[readonly]{color:#8a8a8a;border-color:#dadde0}.tv-control-input[readonly]:focus{border-color:#ececec!important}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-control-input[readonly]:hover{border-color:#ececec!important}}html.theme-dark .tv-control-input[readonly]:focus{border-color:#262b3e!important}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-control-input[readonly]:hover{border-color:#262b3e!important}}.tv-control-input--readonly_dark,.tv-control-input--readonly_dark[readonly]{color:#555}html.theme-dark .tv-control-input--readonly_dark,html.theme-dark .tv-control-input--readonly_dark[readonly]{color:#4c525e}.tv-control-input.i-disabled,.tv-control-input[disabled]{color:#ececec!important;border-color:#ececec!important}html.theme-dark .tv-control-input.i-disabled,html.theme-dark .tv-control-input[disabled]{border-color:#262b3e!important;color:#262b3e!important}.tv-control-input.i-disabled::placeholder,.tv-control-input[disabled]::placeholder{color:#ececec!important}html.theme-dark .tv-control-input.i-disabled::placeholder,html.theme-dark .tv-control-input[disabled]::placeholder{color:#262b3e!important}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-control-input.i-disabled:hover,.tv-control-input[disabled]:hover{border-color:#ececec!important}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-control-input.i-disabled:hover,html.theme-dark .tv-control-input[disabled]:hover{border-color:#262b3e!important}}.tv-control-input.i-error{border-color:#ff4a68!important}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-control-input.i-error:hover{border-color:#f24965!important}}.tv-control-input.i-error:focus{border-color:#ff173e!important}.tv-control-input.i-success{border-color:#009688!important}html.theme-dark .tv-control-input.i-success{border-color:#00796b!important}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-control-input.i-success:hover,html.theme-dark .tv-control-input.i-success:hover{border-color:#00897b!important}}.tv-control-input.i-success:active,.tv-control-input.i-success:focus{border-color:#00796b!important}html.theme-dark .tv-control-input.i-success:active,html.theme-dark .tv-control-input.i-success:focus{border-color:#009688!important}.tv-control-input--phone{direction:ltr;text-align:right}.tv-control-input--file{display:none}.tv-compare-tab__predefines{display:flex;flex-wrap:wrap}.tv-compare-tab__predefine-cell{width:50%;margin-top:20px}.tv-compare-tab__predefine-cell--wide{width:100%}.tv-compare-tab__checkbox-label{font-size:13px}.tv-compare-tab__checkbox-box:after{border-color:#9db2bd}.tv-add-symbol-tab__add-symbol-overlay{margin-top:20px}.tv-add-symbol-tab__checkbox-label{font-size:13px}.tv-add-symbol-tab__checkbox-box:after{border-color:#9db2bd}.tv-tabbed-dialog{background-color:#fff;color:#4a4a4a}html.theme-dark .tv-tabbed-dialog{color:#c5cbce;background-color:#1e222d}.tv-tabbed-dialog__header{display:flex;position:relative;padding-top:0;padding-right:0;padding-bottom:0;border-bottom:none!important;margin-bottom:-1px;z-index:6}.tv-tabbed-dialog__bottom-border{position:absolute;right:0;left:0;bottom:0;height:1px;background-color:#dadde0;z-index:-1}html.theme-dark .tv-tabbed-dialog__bottom-border{background-color:#363c4e}.tv-tabbed-dialog__tab-page{height:100%;display:none}.tv-tabbed-dialog__tab-page.active{overflow-y:auto;-webkit-overflow-scrolling:touch;-ms-overflow-style:-ms-autohiding-scrollbar;display:block}.tv-tabbed-dialog__close{z-index:6;top:5px}.tv-tabbed-dialog__tabs{width:100%;flex-shrink:1;height:53px}.tv-tabbed-dialog__custom-controls{margin-right:10px;flex-shrink:0}.tv-tabbed-dialog__tabs-arrow-left:before,.tv-tabbed-dialog__tabs-arrow-right:before{content:"";position:absolute;bottom:1px;right:0;left:0;height:1px}.tv-tabbed-dialog__tabs-arrow-left:before{background:linear-gradient(270deg,#dadde0 0,#dadde0 85%,hsla(0,0%,100%,0))}.tv-tabbed-dialog__tabs-arrow-right:before{background:linear-gradient(90deg,#dadde0 0,#dadde0 85%,hsla(0,0%,100%,0))}.tv-compare-dialog__scroll-box{padding:0 15px!important}.tv-compare-dialog__tab{padding:0 15px}.tv-compare-dialog__tab-page{position:relative;padding:20px 30px}.tv-compare-dialog__tab-page input{color:#4a4a4a;background-color:#fff;border-color:#dadde0}html.theme-dark .tv-compare-dialog__tab-page input{border-color:#363c4e;background-color:#1e222d;color:#c5cbce}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-compare-dialog__tab-page input:hover{border-color:#c8c8c8}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-compare-dialog__tab-page input:hover{border-color:#4c525e}} \ No newline at end of file diff --git a/public/charting_library/bundles/77.251aca00b6d789124aa9.css b/public/charting_library/bundles/77.251aca00b6d789124aa9.css new file mode 100644 index 00000000..c426f01e --- /dev/null +++ b/public/charting_library/bundles/77.251aca00b6d789124aa9.css @@ -0,0 +1 @@ +.tv-floating-toolbar{display:flex;position:absolute!important;align-items:stretch;flex-direction:column;opacity:1;transition:transform .2625s cubic-bezier(.215,.61,.355,1),opacity .2625s cubic-bezier(.215,.61,.355,1);border-radius:3px;background-color:#fff;box-shadow:0 2px 4px 0 rgba(107,121,136,.4);border-radius:4px;border:1px solid;border-color:#e6eaef}html.theme-dark .tv-floating-toolbar{border-color:#363c4e;background-color:#1e222d;box-shadow:0 2px 4px 0 #000}.tv-floating-toolbar.i-closed{transform:scale(.925);opacity:0;pointer-events:none}.tv-floating-toolbar.i-vertical{height:auto;min-width:37px}.tv-floating-toolbar__widget-wrapper{display:flex}.tv-floating-toolbar.i-vertical .tv-floating-toolbar__widget-wrapper{flex-direction:column}.tv-floating-toolbar__drag{display:flex;justify-content:center;align-items:center;flex-shrink:0;cursor:grab;width:14px}.feature-mobiletouch .tv-floating-toolbar__drag{width:20px}.tv-floating-toolbar__drag svg{width:6px;height:12px;fill:#dadde0}.tv-floating-toolbar.ui-draggable-dragging .tv-floating-toolbar__drag{cursor:grabbing}.tv-floating-toolbar__drag-ext{height:100%;width:14px;position:absolute;padding:4px 0 0 4px;left:-4px;top:-4px}.feature-mobiletouch .tv-floating-toolbar__drag-ext{width:20px}.tv-floating-toolbar.i-vertical .tv-floating-toolbar__drag-ext{width:100%;height:14px}.feature-mobiletouch .tv-floating-toolbar.i-vertical .tv-floating-toolbar__drag-ext{height:20px}.tv-floating-toolbar.i-vertical .tv-floating-toolbar__drag{width:100%;height:14px}.feature-mobiletouch .tv-floating-toolbar.i-vertical .tv-floating-toolbar__drag{height:20px}.tv-floating-toolbar.i-vertical .tv-floating-toolbar__drag svg{transform:rotate(90deg)}.tv-floating-toolbar__content{display:flex;flex-shrink:0;overflow:hidden;border-top-right-radius:4px;border-bottom-right-radius:4px}.tv-floating-toolbar.i-vertical .tv-floating-toolbar__content{flex-direction:column;border-top-right-radius:0;border-bottom-left-radius:4px}.tv-floating-toolbar .ui-sortable-placeholder{border-left:1px solid #e6eaef}html.theme-dark .tv-floating-toolbar .ui-sortable-placeholder{border-left:1px solid #363c4e}.tv-floating-toolbar.i-vertical .ui-sortable-placeholder{border-left:none;border-top:1px solid #e6eaef}html.theme-dark .tv-floating-toolbar.i-vertical .ui-sortable-placeholder{border-top:1px solid #363c4e}.tv-floating-toolbar__widget{display:flex;align-items:stretch;border-left:1px solid;border-left-color:#e6eaef}html.theme-dark .tv-floating-toolbar__widget{border-left-color:#363c4e}.tv-floating-toolbar__widget.ui-sortable-placeholder{visibility:visible!important}.tv-floating-toolbar__widget.ui-sortable-helper{border-left-color:transparent}.tv-floating-toolbar.i-vertical .tv-floating-toolbar__widget{border-left:none;border-top:1px solid;border-top-color:#eceff2}html.theme-dark .tv-floating-toolbar.i-vertical .tv-floating-toolbar__widget{border-top-color:#363c4e}.tv-floating-toolbar.i-vertical .tv-floating-toolbar__widget.ui-sortable-helper{border-top-color:transparent}.tv-caret{content:"";display:inline-block;width:0;height:0;border-style:solid;border-width:4px 4px 0;border-color:currentColor transparent transparent;margin-left:5px;vertical-align:middle;transition:transform .35s ease}.active .tv-caret,.i-dropped .tv-caret:not(.tv-caret--strict),.tv-caret--strict.i-dropped{transform:rotate(-180deg);will-change:transform;transition-duration:.33}.tv-caret--small{margin-left:3px;margin-right:-1px;border-top-width:3px;border-right-width:3px;border-left-width:3px}.tv-caret--colored{transition:transform .35s ease,color .35s ease}.tv-caret--no-margin{margin-left:0}.tv-grouped-floating-toolbar{color:#4a4a4a}html.theme-dark .tv-grouped-floating-toolbar{color:#c5cbce}.tv-grouped-floating-toolbar__popup{display:flex;position:absolute;top:100%;opacity:0;border-radius:0 0 1px 1px;border-radius:3px;background-color:#fff;box-shadow:0 2px 4px 0 rgba(107,121,136,.4);transition:opacity .35s ease}html.theme-dark .tv-grouped-floating-toolbar__popup{background-color:#1e222d;box-shadow:0 2px 4px 0 #000}.tv-grouped-floating-toolbar__popup.i-opened{opacity:1;transition-duration:.11666667s}.tv-grouped-floating-toolbar__popup--at-top{top:calc(-100% - 2px);border-radius:1px 1px 0 0;box-shadow:0 -5px 10px -5px rgba(0,0,0,.15)}.tv-grouped-floating-toolbar__popup--at-left{left:0;border-radius:1px 0 0 1px;transform:translateX(-100%)}.tv-grouped-floating-toolbar.i-vertical .tv-grouped-floating-toolbar__popup:not(.tv-grouped-floating-toolbar__popup--at-left){left:100%;border-radius:0 1px 1px 0}.tv-grouped-floating-toolbar__sub-widget{display:flex;align-items:center;justify-content:center;opacity:0;cursor:pointer;transition:background-color .35s ease,opacity .35s ease}.tv-grouped-floating-toolbar__sub-widget--current{background-color:#f1f3f6;transition-duration:.06s}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-grouped-floating-toolbar__sub-widget:hover{background-color:#f1f3f6;transition-duration:.06s}}html.theme-dark .tv-grouped-floating-toolbar__sub-widget--current{background-color:#2f3241}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-grouped-floating-toolbar__sub-widget:hover{background-color:#2f3241}}.tv-grouped-floating-toolbar__sub-widget:active{background-color:#eaecef;transition-duration:.06s}.tv-grouped-floating-toolbar__popup--at-left .tv-grouped-floating-toolbar__sub-widget--slide-left-9,.tv-grouped-floating-toolbar__sub-widget--slide-right-9{transition-delay:0s,.2422s}.tv-grouped-floating-toolbar__popup--at-left .tv-grouped-floating-toolbar__sub-widget--slide-left-8,.tv-grouped-floating-toolbar__sub-widget--slide-right-8{transition-delay:0s,.20055s}.tv-grouped-floating-toolbar__popup--at-left .tv-grouped-floating-toolbar__sub-widget--slide-left-7,.tv-grouped-floating-toolbar__sub-widget--slide-right-7{transition-delay:0s,.1638s}.tv-grouped-floating-toolbar__popup--at-left .tv-grouped-floating-toolbar__sub-widget--slide-left-6,.tv-grouped-floating-toolbar__sub-widget--slide-right-6{transition-delay:0s,.13195s}.tv-grouped-floating-toolbar__popup--at-left .tv-grouped-floating-toolbar__sub-widget--slide-left-5,.tv-grouped-floating-toolbar__sub-widget--slide-right-5{transition-delay:0s,.105s}.tv-grouped-floating-toolbar__popup--at-left .tv-grouped-floating-toolbar__sub-widget--slide-left-4,.tv-grouped-floating-toolbar__sub-widget--slide-right-4{transition-delay:0s,.08295s}.tv-grouped-floating-toolbar__popup--at-left .tv-grouped-floating-toolbar__sub-widget--slide-left-3,.tv-grouped-floating-toolbar__sub-widget--slide-right-3{transition-delay:0s,.0658s}.tv-grouped-floating-toolbar__popup--at-left .tv-grouped-floating-toolbar__sub-widget--slide-left-2,.tv-grouped-floating-toolbar__sub-widget--slide-right-2{transition-delay:0s,.05355s}.tv-grouped-floating-toolbar__popup--at-left .tv-grouped-floating-toolbar__sub-widget--slide-left-1,.tv-grouped-floating-toolbar__sub-widget--slide-right-1{transition-delay:0s,.0462s}.tv-grouped-floating-toolbar__popup--at-left .tv-grouped-floating-toolbar__sub-widget--slide-left-0,.tv-grouped-floating-toolbar__sub-widget--slide-right-0{transition-delay:0s,.04375s}.tv-grouped-floating-toolbar__popup.i-opened .tv-grouped-floating-toolbar__sub-widget{opacity:1}.tv-grouped-floating-toolbar__sub-widget:not(:first-child){border-left:1px solid;border-left-color:#dadde0}html.theme-dark .tv-grouped-floating-toolbar__sub-widget:not(:first-child){border-left-color:#363c4e}.tv-grouped-floating-toolbar__widget-wrapper{display:flex;align-items:center;justify-content:center;flex-grow:1;cursor:pointer;background-color:#fff;transition:background-color .35s ease}html.theme-dark .tv-grouped-floating-toolbar__widget-wrapper{background-color:#1e222d}.tv-grouped-floating-toolbar__widget-wrapper.i-dropped{background-color:#f1f3f6;transition-duration:.06s}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-grouped-floating-toolbar__widget-wrapper:hover{background-color:#f1f3f6;transition-duration:.06s}}html.theme-dark .tv-grouped-floating-toolbar__widget-wrapper.i-dropped{background-color:#2f3241}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-grouped-floating-toolbar__widget-wrapper:hover{background-color:#2f3241}}.tv-grouped-floating-toolbar__widget-wrapper.i-disabled{cursor:default;color:#adaeb0}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-grouped-floating-toolbar__widget-wrapper.i-disabled:hover{background-color:#fff}}.tv-grouped-floating-toolbar__widget-wrapper:active{background-color:#eaecef;transition-duration:.06s}.tv-linetool-properties-toolbar__button{display:flex;align-items:center;justify-content:center;flex-grow:1;cursor:pointer;transition:background-color .35s ease}.tv-linetool-properties-toolbar__button.i-dropped{background-color:#f1f3f6}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-linetool-properties-toolbar__button:hover{background-color:#f1f3f6}}html.theme-dark .tv-linetool-properties-toolbar__button.i-dropped{background-color:#2f3241}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-linetool-properties-toolbar__button:hover{background-color:#2f3241}}.tv-linetool-properties-toolbar__button:active{background-color:#eaecef}html.theme-dark .tv-linetool-properties-toolbar__button:active{background-color:#2f3241}.tv-linetool-properties-toolbar__button:active{transition-duration:.06s}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-linetool-properties-toolbar__button:hover{transition-duration:.06s}}.tv-linetool-properties-toolbar__button.i-active{background-color:#f1f3f6}html.theme-dark .tv-linetool-properties-toolbar__button.i-active{background-color:#262b3e}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-linetool-properties-toolbar__button.i-active:hover{background-color:#e8ebf0}}.tv-linetool-properties-toolbar__button.i-active:active{background-color:#dee3ea}.tv-linetool-properties-toolbar__button,.tv-linetool-properties-toolbar__grouped-button,.tv-linetool-properties-toolbar__sub-widget{min-width:38px;min-height:38px}.tv-linetool-properties-toolbar__text{transition:color .35s ease}.tv-linetool-properties-toolbar__icon{display:flex}.tv-linetool-properties-toolbar__icon svg{width:16px;height:16px;fill:#758696;transition:fill .35s ease,stroke .35s ease}.i-active .tv-linetool-properties-toolbar__icon svg{fill:#2196f3}.tv-linetool-properties-toolbar__icon--line-props svg{width:22px;height:6px}.tv-linetool-properties-toolbar__button:active .tv-linetool-properties-toolbar__icon svg{transition-duration:.06s}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-linetool-properties-toolbar__button:hover .tv-linetool-properties-toolbar__icon svg{transition-duration:.06s}}.tv-linetool-properties-toolbar__color-picker{height:38px!important;width:38px!important;cursor:pointer}.tv-linetool-properties-toolbar__color-picker .tvcolorpicker-transparency{width:38px!important;height:4px!important;bottom:5px}.tv-linetool-properties-toolbar__color-picker .colorpicker-widget{border-color:#c9cbcd;border:0!important;width:34px;height:34px;padding:2px;z-index:10;position:relative!important}.tv-linetool-properties-toolbar__color-picker .colorpicker-widget+svg{position:absolute;top:0;left:0;width:38px;height:38px;z-index:40}.tv-linetool-properties-toolbar__color-picker .colorpicker-widget+svg .bg{fill:#fff;transition:fill .35s ease}html.theme-dark .tv-linetool-properties-toolbar__color-picker .colorpicker-widget+svg .bg{fill:#1e222d}.tv-linetool-properties-toolbar__color-picker .colorpicker-widget+svg .icon{fill:#758696;transition:fill .35s ease}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-linetool-properties-toolbar__color-picker .colorpicker-widget+svg:hover .bg{fill:#f1f3f6}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-linetool-properties-toolbar__color-picker .colorpicker-widget+svg:hover .bg{fill:#2f3241}}.tv-linetool-properties-toolbar__color-picker .colorpicker-widget.i-active+svg .bg{fill:#f1f3f6}.tv-favorited-drawings-toolbar__widget{display:flex;align-items:center;justify-content:center;flex-grow:1;min-width:38px;min-height:38px;cursor:pointer;transition:color .35s ease;color:#4c525e}html.theme-dark .tv-favorited-drawings-toolbar__widget{color:#758696}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-favorited-drawings-toolbar__widget:hover{color:#131722}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-favorited-drawings-toolbar__widget:hover{color:#9db2bd}}.tv-favorited-drawings-toolbar__widget.i-active{color:#1592e6}html.theme-dark .tv-favorited-drawings-toolbar__widget.i-active{color:#2196f3} \ No newline at end of file diff --git a/public/charting_library/bundles/77.251aca00b6d789124aa9.rtl.css b/public/charting_library/bundles/77.251aca00b6d789124aa9.rtl.css new file mode 100644 index 00000000..063f3c83 --- /dev/null +++ b/public/charting_library/bundles/77.251aca00b6d789124aa9.rtl.css @@ -0,0 +1 @@ +.tv-floating-toolbar{display:flex;position:absolute!important;align-items:stretch;flex-direction:column;opacity:1;transition:transform .2625s cubic-bezier(.215,.61,.355,1),opacity .2625s cubic-bezier(.215,.61,.355,1);border-radius:3px;background-color:#fff;box-shadow:0 2px 4px 0 rgba(107,121,136,.4);border-radius:4px;border:1px solid;border-color:#e6eaef}html.theme-dark .tv-floating-toolbar{border-color:#363c4e;background-color:#1e222d;box-shadow:0 2px 4px 0 #000}.tv-floating-toolbar.i-closed{transform:scale(.925);opacity:0;pointer-events:none}.tv-floating-toolbar.i-vertical{height:auto;min-width:37px}.tv-floating-toolbar__widget-wrapper{display:flex}.tv-floating-toolbar.i-vertical .tv-floating-toolbar__widget-wrapper{flex-direction:column}.tv-floating-toolbar__drag{display:flex;justify-content:center;align-items:center;flex-shrink:0;cursor:grab;width:14px}.feature-mobiletouch .tv-floating-toolbar__drag{width:20px}.tv-floating-toolbar__drag svg{width:6px;height:12px;fill:#dadde0}.tv-floating-toolbar.ui-draggable-dragging .tv-floating-toolbar__drag{cursor:grabbing}.tv-floating-toolbar__drag-ext{height:100%;width:14px;position:absolute;padding:4px 4px 0 0;right:-4px;top:-4px}.feature-mobiletouch .tv-floating-toolbar__drag-ext{width:20px}.tv-floating-toolbar.i-vertical .tv-floating-toolbar__drag-ext{width:100%;height:14px}.feature-mobiletouch .tv-floating-toolbar.i-vertical .tv-floating-toolbar__drag-ext{height:20px}.tv-floating-toolbar.i-vertical .tv-floating-toolbar__drag{width:100%;height:14px}.feature-mobiletouch .tv-floating-toolbar.i-vertical .tv-floating-toolbar__drag{height:20px}.tv-floating-toolbar.i-vertical .tv-floating-toolbar__drag svg{transform:rotate(-90deg)}.tv-floating-toolbar__content{display:flex;flex-shrink:0;overflow:hidden;border-top-left-radius:4px;border-bottom-left-radius:4px}.tv-floating-toolbar.i-vertical .tv-floating-toolbar__content{flex-direction:column;border-top-left-radius:0;border-bottom-right-radius:4px}.tv-floating-toolbar .ui-sortable-placeholder{border-right:1px solid #e6eaef}html.theme-dark .tv-floating-toolbar .ui-sortable-placeholder{border-right:1px solid #363c4e}.tv-floating-toolbar.i-vertical .ui-sortable-placeholder{border-right:none;border-top:1px solid #e6eaef}html.theme-dark .tv-floating-toolbar.i-vertical .ui-sortable-placeholder{border-top:1px solid #363c4e}.tv-floating-toolbar__widget{display:flex;align-items:stretch;border-right:1px solid;border-right-color:#e6eaef}html.theme-dark .tv-floating-toolbar__widget{border-right-color:#363c4e}.tv-floating-toolbar__widget.ui-sortable-placeholder{visibility:visible!important}.tv-floating-toolbar__widget.ui-sortable-helper{border-right-color:transparent}.tv-floating-toolbar.i-vertical .tv-floating-toolbar__widget{border-right:none;border-top:1px solid;border-top-color:#eceff2}html.theme-dark .tv-floating-toolbar.i-vertical .tv-floating-toolbar__widget{border-top-color:#363c4e}.tv-floating-toolbar.i-vertical .tv-floating-toolbar__widget.ui-sortable-helper{border-top-color:transparent}.tv-caret{content:"";display:inline-block;width:0;height:0;border-style:solid;border-width:4px 4px 0;border-color:currentColor transparent transparent;margin-right:5px;vertical-align:middle;transition:transform .35s ease}.active .tv-caret,.i-dropped .tv-caret:not(.tv-caret--strict),.tv-caret--strict.i-dropped{transform:rotate(180deg);will-change:transform;transition-duration:.33}.tv-caret--small{margin-right:3px;margin-left:-1px;border-top-width:3px;border-left-width:3px;border-right-width:3px}.tv-caret--colored{transition:transform .35s ease,color .35s ease}.tv-caret--no-margin{margin-right:0}.tv-grouped-floating-toolbar{color:#4a4a4a}html.theme-dark .tv-grouped-floating-toolbar{color:#c5cbce}.tv-grouped-floating-toolbar__popup{display:flex;position:absolute;top:100%;opacity:0;border-radius:0 0 1px 1px;border-radius:3px;background-color:#fff;box-shadow:0 2px 4px 0 rgba(107,121,136,.4);transition:opacity .35s ease}html.theme-dark .tv-grouped-floating-toolbar__popup{background-color:#1e222d;box-shadow:0 2px 4px 0 #000}.tv-grouped-floating-toolbar__popup.i-opened{opacity:1;transition-duration:.11666667s}.tv-grouped-floating-toolbar__popup--at-top{top:calc(-100% - 2px);border-radius:1px 1px 0 0;box-shadow:0 -5px 10px -5px rgba(0,0,0,.15)}.tv-grouped-floating-toolbar__popup--at-left{right:0;border-radius:0 1px 1px 0;transform:translateX(100%)}.tv-grouped-floating-toolbar.i-vertical .tv-grouped-floating-toolbar__popup:not(.tv-grouped-floating-toolbar__popup--at-left){right:100%;border-radius:1px 0 0 1px}.tv-grouped-floating-toolbar__sub-widget{display:flex;align-items:center;justify-content:center;opacity:0;cursor:pointer;transition:background-color .35s ease,opacity .35s ease}.tv-grouped-floating-toolbar__sub-widget--current{background-color:#f1f3f6;transition-duration:.06s}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-grouped-floating-toolbar__sub-widget:hover{background-color:#f1f3f6;transition-duration:.06s}}html.theme-dark .tv-grouped-floating-toolbar__sub-widget--current{background-color:#2f3241}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-grouped-floating-toolbar__sub-widget:hover{background-color:#2f3241}}.tv-grouped-floating-toolbar__sub-widget:active{background-color:#eaecef;transition-duration:.06s}.tv-grouped-floating-toolbar__popup--at-left .tv-grouped-floating-toolbar__sub-widget--slide-left-9,.tv-grouped-floating-toolbar__sub-widget--slide-right-9{transition-delay:0s,.2422s}.tv-grouped-floating-toolbar__popup--at-left .tv-grouped-floating-toolbar__sub-widget--slide-left-8,.tv-grouped-floating-toolbar__sub-widget--slide-right-8{transition-delay:0s,.20055s}.tv-grouped-floating-toolbar__popup--at-left .tv-grouped-floating-toolbar__sub-widget--slide-left-7,.tv-grouped-floating-toolbar__sub-widget--slide-right-7{transition-delay:0s,.1638s}.tv-grouped-floating-toolbar__popup--at-left .tv-grouped-floating-toolbar__sub-widget--slide-left-6,.tv-grouped-floating-toolbar__sub-widget--slide-right-6{transition-delay:0s,.13195s}.tv-grouped-floating-toolbar__popup--at-left .tv-grouped-floating-toolbar__sub-widget--slide-left-5,.tv-grouped-floating-toolbar__sub-widget--slide-right-5{transition-delay:0s,.105s}.tv-grouped-floating-toolbar__popup--at-left .tv-grouped-floating-toolbar__sub-widget--slide-left-4,.tv-grouped-floating-toolbar__sub-widget--slide-right-4{transition-delay:0s,.08295s}.tv-grouped-floating-toolbar__popup--at-left .tv-grouped-floating-toolbar__sub-widget--slide-left-3,.tv-grouped-floating-toolbar__sub-widget--slide-right-3{transition-delay:0s,.0658s}.tv-grouped-floating-toolbar__popup--at-left .tv-grouped-floating-toolbar__sub-widget--slide-left-2,.tv-grouped-floating-toolbar__sub-widget--slide-right-2{transition-delay:0s,.05355s}.tv-grouped-floating-toolbar__popup--at-left .tv-grouped-floating-toolbar__sub-widget--slide-left-1,.tv-grouped-floating-toolbar__sub-widget--slide-right-1{transition-delay:0s,.0462s}.tv-grouped-floating-toolbar__popup--at-left .tv-grouped-floating-toolbar__sub-widget--slide-left-0,.tv-grouped-floating-toolbar__sub-widget--slide-right-0{transition-delay:0s,.04375s}.tv-grouped-floating-toolbar__popup.i-opened .tv-grouped-floating-toolbar__sub-widget{opacity:1}.tv-grouped-floating-toolbar__sub-widget:not(:first-child){border-right:1px solid;border-right-color:#dadde0}html.theme-dark .tv-grouped-floating-toolbar__sub-widget:not(:first-child){border-right-color:#363c4e}.tv-grouped-floating-toolbar__widget-wrapper{display:flex;align-items:center;justify-content:center;flex-grow:1;cursor:pointer;background-color:#fff;transition:background-color .35s ease}html.theme-dark .tv-grouped-floating-toolbar__widget-wrapper{background-color:#1e222d}.tv-grouped-floating-toolbar__widget-wrapper.i-dropped{background-color:#f1f3f6;transition-duration:.06s}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-grouped-floating-toolbar__widget-wrapper:hover{background-color:#f1f3f6;transition-duration:.06s}}html.theme-dark .tv-grouped-floating-toolbar__widget-wrapper.i-dropped{background-color:#2f3241}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-grouped-floating-toolbar__widget-wrapper:hover{background-color:#2f3241}}.tv-grouped-floating-toolbar__widget-wrapper.i-disabled{cursor:default;color:#adaeb0}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-grouped-floating-toolbar__widget-wrapper.i-disabled:hover{background-color:#fff}}.tv-grouped-floating-toolbar__widget-wrapper:active{background-color:#eaecef;transition-duration:.06s}.tv-linetool-properties-toolbar__button{display:flex;align-items:center;justify-content:center;flex-grow:1;cursor:pointer;transition:background-color .35s ease}.tv-linetool-properties-toolbar__button.i-dropped{background-color:#f1f3f6}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-linetool-properties-toolbar__button:hover{background-color:#f1f3f6}}html.theme-dark .tv-linetool-properties-toolbar__button.i-dropped{background-color:#2f3241}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-linetool-properties-toolbar__button:hover{background-color:#2f3241}}.tv-linetool-properties-toolbar__button:active{background-color:#eaecef}html.theme-dark .tv-linetool-properties-toolbar__button:active{background-color:#2f3241}.tv-linetool-properties-toolbar__button:active{transition-duration:.06s}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-linetool-properties-toolbar__button:hover{transition-duration:.06s}}.tv-linetool-properties-toolbar__button.i-active{background-color:#f1f3f6}html.theme-dark .tv-linetool-properties-toolbar__button.i-active{background-color:#262b3e}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-linetool-properties-toolbar__button.i-active:hover{background-color:#e8ebf0}}.tv-linetool-properties-toolbar__button.i-active:active{background-color:#dee3ea}.tv-linetool-properties-toolbar__button,.tv-linetool-properties-toolbar__grouped-button,.tv-linetool-properties-toolbar__sub-widget{min-width:38px;min-height:38px}.tv-linetool-properties-toolbar__text{transition:color .35s ease}.tv-linetool-properties-toolbar__icon{display:flex}.tv-linetool-properties-toolbar__icon svg{width:16px;height:16px;fill:#758696;transition:fill .35s ease,stroke .35s ease}.i-active .tv-linetool-properties-toolbar__icon svg{fill:#2196f3}.tv-linetool-properties-toolbar__icon--line-props svg{width:22px;height:6px}.tv-linetool-properties-toolbar__button:active .tv-linetool-properties-toolbar__icon svg{transition-duration:.06s}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-linetool-properties-toolbar__button:hover .tv-linetool-properties-toolbar__icon svg{transition-duration:.06s}}.tv-linetool-properties-toolbar__color-picker{height:38px!important;width:38px!important;cursor:pointer}.tv-linetool-properties-toolbar__color-picker .tvcolorpicker-transparency{width:38px!important;height:4px!important;bottom:5px}.tv-linetool-properties-toolbar__color-picker .colorpicker-widget{border-color:#c9cbcd;border:0!important;width:34px;height:34px;padding:2px;z-index:10;position:relative!important}.tv-linetool-properties-toolbar__color-picker .colorpicker-widget+svg{position:absolute;top:0;right:0;width:38px;height:38px;z-index:40}.tv-linetool-properties-toolbar__color-picker .colorpicker-widget+svg .bg{fill:#fff;transition:fill .35s ease}html.theme-dark .tv-linetool-properties-toolbar__color-picker .colorpicker-widget+svg .bg{fill:#1e222d}.tv-linetool-properties-toolbar__color-picker .colorpicker-widget+svg .icon{fill:#758696;transition:fill .35s ease}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-linetool-properties-toolbar__color-picker .colorpicker-widget+svg:hover .bg{fill:#f1f3f6}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-linetool-properties-toolbar__color-picker .colorpicker-widget+svg:hover .bg{fill:#2f3241}}.tv-linetool-properties-toolbar__color-picker .colorpicker-widget.i-active+svg .bg{fill:#f1f3f6}.tv-favorited-drawings-toolbar__widget{display:flex;align-items:center;justify-content:center;flex-grow:1;min-width:38px;min-height:38px;cursor:pointer;transition:color .35s ease;color:#4c525e}html.theme-dark .tv-favorited-drawings-toolbar__widget{color:#758696}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-favorited-drawings-toolbar__widget:hover{color:#131722}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-favorited-drawings-toolbar__widget:hover{color:#9db2bd}}.tv-favorited-drawings-toolbar__widget.i-active{color:#1592e6}html.theme-dark .tv-favorited-drawings-toolbar__widget.i-active{color:#2196f3} \ No newline at end of file diff --git a/public/charting_library/bundles/77.8587c41bdb5c9a5ff60c.js b/public/charting_library/bundles/77.8587c41bdb5c9a5ff60c.js new file mode 100644 index 00000000..810f20f6 --- /dev/null +++ b/public/charting_library/bundles/77.8587c41bdb5c9a5ff60c.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[77],[]]); \ No newline at end of file diff --git a/public/charting_library/bundles/77a5d6e16116f4dd430d89ed1ef42fa8.gif b/public/charting_library/bundles/77a5d6e16116f4dd430d89ed1ef42fa8.gif new file mode 100644 index 00000000..ea5f6b7d Binary files /dev/null and b/public/charting_library/bundles/77a5d6e16116f4dd430d89ed1ef42fa8.gif differ diff --git a/public/charting_library/bundles/78.0836c0a10065469ef826.js b/public/charting_library/bundles/78.0836c0a10065469ef826.js new file mode 100644 index 00000000..f11df5ee --- /dev/null +++ b/public/charting_library/bundles/78.0836c0a10065469ef826.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[78],[]]); \ No newline at end of file diff --git a/public/charting_library/bundles/78.3fe3c9cd713ad9a8eb84.css b/public/charting_library/bundles/78.3fe3c9cd713ad9a8eb84.css new file mode 100644 index 00000000..eeb0953f --- /dev/null +++ b/public/charting_library/bundles/78.3fe3c9cd713ad9a8eb84.css @@ -0,0 +1 @@ +.row-1Gn06tA2{vertical-align:top}.line-c_e_alAN{margin:6px 0;height:1px;background-color:#e0e3eb}html.theme-dark .line-c_e_alAN{background-color:#434651}.hint-18i4fysm{color:#8797a5;font-size:12px;margin-left:6px;margin-top:12px;text-align:left}html.theme-dark .hint-18i4fysm{color:#4f5966}.loaderWrap-18NjkayD{height:32px;margin-left:-2px}.loader-Cgjcl0qz{position:static;opacity:.4}.separator-3SZSQm0_{margin:6px 0;height:1px;background-color:#e0e3eb}html.theme-dark .separator-3SZSQm0_{background-color:#434651}.menu-1y0eDKzl{overflow:visible;-webkit-user-select:none;user-select:none;border-collapse:collapse;z-index:500;cursor:default} \ No newline at end of file diff --git a/public/charting_library/bundles/78.3fe3c9cd713ad9a8eb84.rtl.css b/public/charting_library/bundles/78.3fe3c9cd713ad9a8eb84.rtl.css new file mode 100644 index 00000000..2829a664 --- /dev/null +++ b/public/charting_library/bundles/78.3fe3c9cd713ad9a8eb84.rtl.css @@ -0,0 +1 @@ +.row-1Gn06tA2{vertical-align:top}.line-c_e_alAN{margin:6px 0;height:1px;background-color:#e0e3eb}html.theme-dark .line-c_e_alAN{background-color:#434651}.hint-18i4fysm{color:#8797a5;font-size:12px;margin-right:6px;margin-top:12px;text-align:right}html.theme-dark .hint-18i4fysm{color:#4f5966}.loaderWrap-18NjkayD{height:32px;margin-right:-2px}.loader-Cgjcl0qz{position:static;opacity:.4}.separator-3SZSQm0_{margin:6px 0;height:1px;background-color:#e0e3eb}html.theme-dark .separator-3SZSQm0_{background-color:#434651}.menu-1y0eDKzl{overflow:visible;-webkit-user-select:none;user-select:none;border-collapse:collapse;z-index:500;cursor:default} \ No newline at end of file diff --git a/public/charting_library/bundles/79.ca2cc06c230c1c63e7c8.css b/public/charting_library/bundles/79.ca2cc06c230c1c63e7c8.css new file mode 100644 index 00000000..59934a4c --- /dev/null +++ b/public/charting_library/bundles/79.ca2cc06c230c1c63e7c8.css @@ -0,0 +1 @@ +.scrollable-mKj9lAM_{flex:1 1 auto;overflow-y:auto;overflow-x:hidden;min-height:145px;-webkit-overflow-scrolling:touch}@media screen and (max-height:290px){.scrollable-mKj9lAM_{min-height:auto}}.scrollable-mKj9lAM_::-webkit-scrollbar{width:5px;height:5px}.scrollable-mKj9lAM_::-webkit-scrollbar-thumb{border:1px solid;border-color:#f1f3f6;border-radius:3px;background-color:#9598a1}html.theme-dark .scrollable-mKj9lAM_::-webkit-scrollbar-thumb{background-color:#363a45;border-color:#1e222d}.scrollable-mKj9lAM_::-webkit-scrollbar-track{background-color:transparent;border-radius:3px}.scrollable-mKj9lAM_::-webkit-scrollbar-corner{display:none}.recalculateCheckbox-1Xa1TR7D{margin-bottom:16px}.recalculateCheckbox-1Xa1TR7D:last-child{margin-bottom:0}.descriptionCell-3oIbGAm4{margin-left:12px}.smallStyleControl-1XGqoHgA{width:34px;margin-left:8px}.smallStyleControl-1XGqoHgA:first-child{margin-left:0}.additionalSelect-1RoWzlTA{margin-left:8px}.childRowContainer-_iCnmDPI{margin-left:26px;cursor:default}.defaultSelect-DeTJWnAh{cursor:default;width:100px}.defaultSelectItem-1jN74NCa{box-sizing:border-box;min-width:100px}.block-3Tp_jRog{display:flex}@media screen and (max-width:379px){.block-3Tp_jRog{display:block}}.group-2HQIdqE5{display:flex}@media screen and (max-width:379px){.wrapGroup-3gHGJIrr{margin-left:0;margin-top:8px}}.textMarkGraphicBlock-1nDopgxR{display:flex}@media screen and (max-width:550px){.textMarkGraphicBlock-1nDopgxR{display:block}}.textMarkGraphicWrapGroup-3QaIoY03{display:flex}@media screen and (max-width:550px){.textMarkGraphicWrapGroup-3QaIoY03{margin-left:0;margin-top:8px}} \ No newline at end of file diff --git a/public/charting_library/bundles/79.ca2cc06c230c1c63e7c8.rtl.css b/public/charting_library/bundles/79.ca2cc06c230c1c63e7c8.rtl.css new file mode 100644 index 00000000..b7335a84 --- /dev/null +++ b/public/charting_library/bundles/79.ca2cc06c230c1c63e7c8.rtl.css @@ -0,0 +1 @@ +.scrollable-mKj9lAM_{flex:1 1 auto;overflow-y:auto;overflow-x:hidden;min-height:145px;-webkit-overflow-scrolling:touch}@media screen and (max-height:290px){.scrollable-mKj9lAM_{min-height:auto}}.scrollable-mKj9lAM_::-webkit-scrollbar{width:5px;height:5px}.scrollable-mKj9lAM_::-webkit-scrollbar-thumb{border:1px solid;border-color:#f1f3f6;border-radius:3px;background-color:#9598a1}html.theme-dark .scrollable-mKj9lAM_::-webkit-scrollbar-thumb{background-color:#363a45;border-color:#1e222d}.scrollable-mKj9lAM_::-webkit-scrollbar-track{background-color:transparent;border-radius:3px}.scrollable-mKj9lAM_::-webkit-scrollbar-corner{display:none}.recalculateCheckbox-1Xa1TR7D{margin-bottom:16px}.recalculateCheckbox-1Xa1TR7D:last-child{margin-bottom:0}.descriptionCell-3oIbGAm4{margin-right:12px}.smallStyleControl-1XGqoHgA{width:34px;margin-right:8px}.smallStyleControl-1XGqoHgA:first-child{margin-right:0}.additionalSelect-1RoWzlTA{margin-right:8px}.childRowContainer-_iCnmDPI{margin-right:26px;cursor:default}.defaultSelect-DeTJWnAh{cursor:default;width:100px}.defaultSelectItem-1jN74NCa{box-sizing:border-box;min-width:100px}.block-3Tp_jRog{display:flex}@media screen and (max-width:379px){.block-3Tp_jRog{display:block}}.group-2HQIdqE5{display:flex}@media screen and (max-width:379px){.wrapGroup-3gHGJIrr{margin-right:0;margin-top:8px}}.textMarkGraphicBlock-1nDopgxR{display:flex}@media screen and (max-width:550px){.textMarkGraphicBlock-1nDopgxR{display:block}}.textMarkGraphicWrapGroup-3QaIoY03{display:flex}@media screen and (max-width:550px){.textMarkGraphicWrapGroup-3QaIoY03{margin-right:0;margin-top:8px}} \ No newline at end of file diff --git a/public/charting_library/bundles/79.d0fe3aa80138c7afb9d7.js b/public/charting_library/bundles/79.d0fe3aa80138c7afb9d7.js new file mode 100644 index 00000000..d88f9f02 --- /dev/null +++ b/public/charting_library/bundles/79.d0fe3aa80138c7afb9d7.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[79],[]]); \ No newline at end of file diff --git a/public/charting_library/bundles/79f0e781be418df4a4d5b052ba1b61a2.png b/public/charting_library/bundles/79f0e781be418df4a4d5b052ba1b61a2.png new file mode 100644 index 00000000..bea0579a Binary files /dev/null and b/public/charting_library/bundles/79f0e781be418df4a4d5b052ba1b61a2.png differ diff --git a/public/charting_library/bundles/7e0cc5f7d7f5151500dd60b8d6ca60a1.png b/public/charting_library/bundles/7e0cc5f7d7f5151500dd60b8d6ca60a1.png new file mode 100644 index 00000000..e42efca9 Binary files /dev/null and b/public/charting_library/bundles/7e0cc5f7d7f5151500dd60b8d6ca60a1.png differ diff --git a/public/charting_library/bundles/8.3b3758d54e7f7ba8727e.js b/public/charting_library/bundles/8.3b3758d54e7f7ba8727e.js new file mode 100644 index 00000000..1db6c69e --- /dev/null +++ b/public/charting_library/bundles/8.3b3758d54e7f7ba8727e.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[8],[]]); \ No newline at end of file diff --git a/public/charting_library/bundles/8.451da7e139a77029afdd.css b/public/charting_library/bundles/8.451da7e139a77029afdd.css new file mode 100644 index 00000000..a50650dd --- /dev/null +++ b/public/charting_library/bundles/8.451da7e139a77029afdd.css @@ -0,0 +1 @@ +.separator-1TZB5HZ-{margin:8px 0;height:1px;background-color:#e0e3eb}html.theme-dark .separator-1TZB5HZ-{background-color:#434651} \ No newline at end of file diff --git a/public/charting_library/bundles/8.451da7e139a77029afdd.rtl.css b/public/charting_library/bundles/8.451da7e139a77029afdd.rtl.css new file mode 100644 index 00000000..a50650dd --- /dev/null +++ b/public/charting_library/bundles/8.451da7e139a77029afdd.rtl.css @@ -0,0 +1 @@ +.separator-1TZB5HZ-{margin:8px 0;height:1px;background-color:#e0e3eb}html.theme-dark .separator-1TZB5HZ-{background-color:#434651} \ No newline at end of file diff --git a/public/charting_library/bundles/80.a3b77ef8012f54b9d9d2.css b/public/charting_library/bundles/80.a3b77ef8012f54b9d9d2.css new file mode 100644 index 00000000..827ce3c9 --- /dev/null +++ b/public/charting_library/bundles/80.a3b77ef8012f54b9d9d2.css @@ -0,0 +1 @@ +.wrap-3axdIL2R{position:fixed;left:0;top:0;right:0;bottom:0;overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:touch;transform:translateZ(0)}.wrap-3axdIL2R::-webkit-scrollbar{display:none}.container-p3zks2PX{height:100%;text-align:center}.container-p3zks2PX:after{content:"";display:inline-block;vertical-align:middle;height:100%}.backdrop-1qZHPwi_{position:fixed;left:0;top:0;right:0;bottom:0;background-color:#9598a1;transform:translateZ(0);opacity:.5;z-index:-1}html.theme-dark .backdrop-1qZHPwi_{background-color:#0c0e15}.modal-GUK9cvUQ{display:inline-block;vertical-align:middle}.dialog-2Ei1ngXh{margin:0 auto}.modal-C2LSTwhC{min-width:320px}.content-tr28wPlV,.form-2GifjSKe .copyForm-1HuPoKA0,.modal-C2LSTwhC{position:relative}.form-2GifjSKe .copyForm-1HuPoKA0 .copyBtn-1oB8tEqo{position:absolute;top:0;right:0;font-weight:700;background:#fff;border-radius:2px}html.theme-dark .form-2GifjSKe .copyForm-1HuPoKA0 .copyBtn-1oB8tEqo{background:#1e222d}.form-2GifjSKe .copyForm-1HuPoKA0 .shadow-2JTdO0Fb{box-shadow:0 0 0 0 #fff,-8px 0 10px -3px #fff}html.theme-dark .form-2GifjSKe .copyForm-1HuPoKA0 .shadow-2JTdO0Fb{box-shadow:0 0 0 0 #1e222d,-8px 0 10px -3px #1e222d}.form-2GifjSKe .actions-3fKk-h7d{display:flex;align-items:center;justify-content:space-between;padding-top:25px;height:16px}.form-2GifjSKe .link-1alPBTTQ{display:block;float:left;font-weight:700;font-size:14px;cursor:pointer;color:#757575;fill:#757575}html.theme-dark .form-2GifjSKe .link-1alPBTTQ{fill:#758696;color:#758696}.form-2GifjSKe .link-1alPBTTQ svg{width:22px;height:14px;position:relative;top:2px;padding-right:8px}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.form-2GifjSKe .link-1alPBTTQ:hover{color:#1e88e5;fill:#1e88e5}}.form-2GifjSKe .socials-rht5Uvp-{display:inline-flex;align-items:center;cursor:pointer;color:#2196f3;fill:#2196f3}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.form-2GifjSKe .socials-rht5Uvp-:hover{color:#1e88e5}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.form-2GifjSKe .socials-rht5Uvp-:hover svg path{fill:#1e88e5}}.form-2GifjSKe .icon-4wFj5iyU{padding-right:4px;font-size:0}.form-2GifjSKe .socialsText-2yWFq9iu{font-weight:700;font-size:14px} \ No newline at end of file diff --git a/public/charting_library/bundles/80.a3b77ef8012f54b9d9d2.rtl.css b/public/charting_library/bundles/80.a3b77ef8012f54b9d9d2.rtl.css new file mode 100644 index 00000000..67763b2b --- /dev/null +++ b/public/charting_library/bundles/80.a3b77ef8012f54b9d9d2.rtl.css @@ -0,0 +1 @@ +.wrap-3axdIL2R{position:fixed;right:0;top:0;left:0;bottom:0;overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:touch;transform:translateZ(0)}.wrap-3axdIL2R::-webkit-scrollbar{display:none}.container-p3zks2PX{height:100%;text-align:center}.container-p3zks2PX:after{content:"";display:inline-block;vertical-align:middle;height:100%}.backdrop-1qZHPwi_{position:fixed;right:0;top:0;left:0;bottom:0;background-color:#9598a1;transform:translateZ(0);opacity:.5;z-index:-1}html.theme-dark .backdrop-1qZHPwi_{background-color:#0c0e15}.modal-GUK9cvUQ{display:inline-block;vertical-align:middle}.dialog-2Ei1ngXh{margin:0 auto}.modal-C2LSTwhC{min-width:320px}.content-tr28wPlV,.form-2GifjSKe .copyForm-1HuPoKA0,.modal-C2LSTwhC{position:relative}.form-2GifjSKe .copyForm-1HuPoKA0 .copyBtn-1oB8tEqo{position:absolute;top:0;left:0;font-weight:700;background:#fff;border-radius:2px}html.theme-dark .form-2GifjSKe .copyForm-1HuPoKA0 .copyBtn-1oB8tEqo{background:#1e222d}.form-2GifjSKe .copyForm-1HuPoKA0 .shadow-2JTdO0Fb{box-shadow:0 0 0 0 #fff,8px 0 10px -3px #fff}html.theme-dark .form-2GifjSKe .copyForm-1HuPoKA0 .shadow-2JTdO0Fb{box-shadow:0 0 0 0 #1e222d,8px 0 10px -3px #1e222d}.form-2GifjSKe .actions-3fKk-h7d{display:flex;align-items:center;justify-content:space-between;padding-top:25px;height:16px}.form-2GifjSKe .link-1alPBTTQ{display:block;float:right;font-weight:700;font-size:14px;cursor:pointer;color:#757575;fill:#757575}html.theme-dark .form-2GifjSKe .link-1alPBTTQ{fill:#758696;color:#758696}.form-2GifjSKe .link-1alPBTTQ svg{width:22px;height:14px;position:relative;top:2px;padding-left:8px}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.form-2GifjSKe .link-1alPBTTQ:hover{color:#1e88e5;fill:#1e88e5}}.form-2GifjSKe .socials-rht5Uvp-{display:inline-flex;align-items:center;cursor:pointer;color:#2196f3;fill:#2196f3}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.form-2GifjSKe .socials-rht5Uvp-:hover{color:#1e88e5}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.form-2GifjSKe .socials-rht5Uvp-:hover svg path{fill:#1e88e5}}.form-2GifjSKe .icon-4wFj5iyU{padding-left:4px;font-size:0}.form-2GifjSKe .socialsText-2yWFq9iu{font-weight:700;font-size:14px} \ No newline at end of file diff --git a/public/charting_library/bundles/80.c12bb8ac041c5c08c24e.js b/public/charting_library/bundles/80.c12bb8ac041c5c08c24e.js new file mode 100644 index 00000000..6f29cc51 --- /dev/null +++ b/public/charting_library/bundles/80.c12bb8ac041c5c08c24e.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[80],[]]); \ No newline at end of file diff --git a/public/charting_library/bundles/81.6f28b555e1393d7bdfac.css b/public/charting_library/bundles/81.6f28b555e1393d7bdfac.css new file mode 100644 index 00000000..3f6f82a6 --- /dev/null +++ b/public/charting_library/bundles/81.6f28b555e1393d7bdfac.css @@ -0,0 +1 @@ +.autocomplete-S6SpJGmW{flex:1 1 auto;position:relative}.autocomplete-S6SpJGmW .caret-3fqF_ykE{display:flex;flex-direction:row;align-items:center;justify-content:center;position:absolute;right:0;top:0;bottom:0;border-color:#dadde0;border-left:none;width:21px;padding:0;text-align:center;margin:3px 2px;border-radius:2px}html.theme-dark .autocomplete-S6SpJGmW .caret-3fqF_ykE{border-color:#363c4e}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.autocomplete-S6SpJGmW .caret-3fqF_ykE:hover{background-color:#f0f3fa}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .autocomplete-S6SpJGmW .caret-3fqF_ykE:hover{background-color:#363a45}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.autocomplete-S6SpJGmW .caret-3fqF_ykE:hover .icon-1POgzoN_{color:#131722}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .autocomplete-S6SpJGmW .caret-3fqF_ykE:hover .icon-1POgzoN_{color:#b2b5be}}.autocomplete-S6SpJGmW .caret-3fqF_ykE .icon-1POgzoN_{color:#787b86}.autocomplete-S6SpJGmW .textInput-1mZnCCcA input{font-size:14px;color:#131722;background-color:#fff;border-color:#d1d4dc;padding-right:52px;border-radius:4px}html.theme-dark .autocomplete-S6SpJGmW .textInput-1mZnCCcA input{border-color:#50535e;background-color:#1e222d;color:#b2b5be}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.autocomplete-S6SpJGmW .textInput-1mZnCCcA input:hover{border-color:#a3a6af}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .autocomplete-S6SpJGmW .textInput-1mZnCCcA input:hover{border-color:#6a6d78}}.autocomplete-S6SpJGmW .suggestions-NOVMFmSY{position:absolute;background-color:#fff;border-radius:3px;font-size:13px;padding:10px 0;outline:0;box-shadow:0 1px 2px 1px rgba(0,0,0,.275);visibility:hidden;overflow-x:hidden;overflow-y:auto;width:100%;max-height:0;z-index:150;transform:translateZ(0)}html.theme-dark .autocomplete-S6SpJGmW .suggestions-NOVMFmSY{background-color:#1e222d}.autocomplete-S6SpJGmW .suggestions-NOVMFmSY::-webkit-scrollbar{width:5px;height:5px}.autocomplete-S6SpJGmW .suggestions-NOVMFmSY::-webkit-scrollbar-thumb{border:1px solid;border-color:#f1f3f6;border-radius:3px;background-color:#9598a1}html.theme-dark .autocomplete-S6SpJGmW .suggestions-NOVMFmSY::-webkit-scrollbar-thumb{background-color:#363a45;border-color:#1e222d}.autocomplete-S6SpJGmW .suggestions-NOVMFmSY::-webkit-scrollbar-track{background-color:transparent;border-radius:3px}.autocomplete-S6SpJGmW .suggestions-NOVMFmSY::-webkit-scrollbar-corner{display:none}.autocomplete-S6SpJGmW .suggestions-NOVMFmSY .noResults-1pgHgvGL,.autocomplete-S6SpJGmW .suggestions-NOVMFmSY .suggestion-3xakscNf{position:relative;white-space:nowrap;padding:10px 15px;text-align:left;overflow:hidden;text-overflow:ellipsis}.autocomplete-S6SpJGmW .suggestions-NOVMFmSY .suggestion-3xakscNf{cursor:pointer}.autocomplete-S6SpJGmW .suggestions-NOVMFmSY .suggestion-3xakscNf.selected-3wOAQHl8{color:#4a4a4a;background-color:#eafafe}html.theme-dark .autocomplete-S6SpJGmW .suggestions-NOVMFmSY .suggestion-3xakscNf.selected-3wOAQHl8{background-color:#21384d;color:#758696}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.autocomplete-S6SpJGmW .suggestions-NOVMFmSY .suggestion-3xakscNf:hover{color:#4a4a4a;background-color:#f2f2f2}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .autocomplete-S6SpJGmW .suggestions-NOVMFmSY .suggestion-3xakscNf:hover{background-color:#1c2030;color:#758696}}.autocomplete-S6SpJGmW .suggestions-NOVMFmSY .suggestion-3xakscNf:active{color:#4a4a4a;background-color:#ececec}html.theme-dark .autocomplete-S6SpJGmW .suggestions-NOVMFmSY .suggestion-3xakscNf:active{background-color:#262b3e;color:#758696}.autocomplete-S6SpJGmW .suggestions-NOVMFmSY .noResults-1pgHgvGL{color:#8a8a8a}html.theme-dark .autocomplete-S6SpJGmW .suggestions-NOVMFmSY .noResults-1pgHgvGL{color:#758696}.autocomplete-S6SpJGmW.opened-2C-bn3cP .suggestions-NOVMFmSY{visibility:visible;max-height:45vh}.autocomplete-S6SpJGmW.opened-2C-bn3cP .suggestions-NOVMFmSY::-webkit-scrollbar{width:5px;height:5px}.autocomplete-S6SpJGmW.opened-2C-bn3cP .suggestions-NOVMFmSY::-webkit-scrollbar-thumb{border:1px solid;border-color:#f1f3f6;border-radius:3px;background-color:#9598a1}html.theme-dark .autocomplete-S6SpJGmW.opened-2C-bn3cP .suggestions-NOVMFmSY::-webkit-scrollbar-thumb{background-color:#363a45;border-color:#1e222d}.autocomplete-S6SpJGmW.opened-2C-bn3cP .suggestions-NOVMFmSY::-webkit-scrollbar-track{background-color:transparent;border-radius:3px}.autocomplete-S6SpJGmW.opened-2C-bn3cP .suggestions-NOVMFmSY::-webkit-scrollbar-corner{display:none}.container-3QIqByoJ{display:flex;flex-direction:column;height:100%;min-height:0;max-width:400px;flex:1 1 auto;border-top:1px solid #e0e3eb;padding:16px 20px 0;overflow:auto}html.theme-dark .container-3QIqByoJ{border-top:1px solid #434651}.container-3QIqByoJ::-webkit-scrollbar{width:5px;height:5px}.container-3QIqByoJ::-webkit-scrollbar-thumb{border:1px solid;border-color:#f1f3f6;border-radius:3px;background-color:#9598a1}html.theme-dark .container-3QIqByoJ::-webkit-scrollbar-thumb{background-color:#363a45;border-color:#1e222d}.container-3QIqByoJ::-webkit-scrollbar-track{background-color:transparent;border-radius:3px}.container-3QIqByoJ::-webkit-scrollbar-corner{display:none}.container-3QIqByoJ.withSuggestions-22pawmYM{overflow:visible}.container-3QIqByoJ .title-2CczwBhX{display:flex;flex:0 0 auto;text-transform:uppercase;font-size:11px;letter-spacing:.4px;line-height:16px;color:#787b86}.container-3QIqByoJ .autocomplete-2f7MJ4QF{display:flex;flex:0 0 auto;padding-top:2px}.container-3QIqByoJ .saveInterval-4oPxh7GH,.container-3QIqByoJ .saveSymbol-31e2t0Ua{display:flex;flex:0 0 auto;padding-top:16px}.container-3QIqByoJ .saveInterval-4oPxh7GH{padding-bottom:24px}.container-3QIqByoJ .indicators-9neV2G7Q{display:flex;flex-direction:column;flex:1 1 auto;color:#131722;padding-top:8px;font-size:14px;line-height:21px;word-wrap:break-word}html.theme-dark .container-3QIqByoJ .indicators-9neV2G7Q{color:#b2b5be}.container-3QIqByoJ .indicators-9neV2G7Q.withSuggestions-22pawmYM{overflow:hidden}.container-3QIqByoJ .indicators-9neV2G7Q:after{content:"";display:block;padding-bottom:20px}.container-3QIqByoJ .hintLabel-35eBgBBj{display:flex}.container-3QIqByoJ .hintLabel-35eBgBBj .hintMark-3nV4PBLt{width:16px;height:16px;margin-left:10px;color:#868993} \ No newline at end of file diff --git a/public/charting_library/bundles/81.6f28b555e1393d7bdfac.rtl.css b/public/charting_library/bundles/81.6f28b555e1393d7bdfac.rtl.css new file mode 100644 index 00000000..93463506 --- /dev/null +++ b/public/charting_library/bundles/81.6f28b555e1393d7bdfac.rtl.css @@ -0,0 +1 @@ +.autocomplete-S6SpJGmW{flex:1 1 auto;position:relative}.autocomplete-S6SpJGmW .caret-3fqF_ykE{display:flex;flex-direction:row;align-items:center;justify-content:center;position:absolute;left:0;top:0;bottom:0;border-color:#dadde0;border-right:none;width:21px;padding:0;text-align:center;margin:3px 2px;border-radius:2px}html.theme-dark .autocomplete-S6SpJGmW .caret-3fqF_ykE{border-color:#363c4e}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.autocomplete-S6SpJGmW .caret-3fqF_ykE:hover{background-color:#f0f3fa}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .autocomplete-S6SpJGmW .caret-3fqF_ykE:hover{background-color:#363a45}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.autocomplete-S6SpJGmW .caret-3fqF_ykE:hover .icon-1POgzoN_{color:#131722}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .autocomplete-S6SpJGmW .caret-3fqF_ykE:hover .icon-1POgzoN_{color:#b2b5be}}.autocomplete-S6SpJGmW .caret-3fqF_ykE .icon-1POgzoN_{color:#787b86}.autocomplete-S6SpJGmW .textInput-1mZnCCcA input{font-size:14px;color:#131722;background-color:#fff;border-color:#d1d4dc;padding-left:52px;border-radius:4px}html.theme-dark .autocomplete-S6SpJGmW .textInput-1mZnCCcA input{border-color:#50535e;background-color:#1e222d;color:#b2b5be}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.autocomplete-S6SpJGmW .textInput-1mZnCCcA input:hover{border-color:#a3a6af}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .autocomplete-S6SpJGmW .textInput-1mZnCCcA input:hover{border-color:#6a6d78}}.autocomplete-S6SpJGmW .suggestions-NOVMFmSY{position:absolute;background-color:#fff;border-radius:3px;font-size:13px;padding:10px 0;outline:0;box-shadow:0 1px 2px 1px rgba(0,0,0,.275);visibility:hidden;overflow-x:hidden;overflow-y:auto;width:100%;max-height:0;z-index:150;transform:translateZ(0)}html.theme-dark .autocomplete-S6SpJGmW .suggestions-NOVMFmSY{background-color:#1e222d}.autocomplete-S6SpJGmW .suggestions-NOVMFmSY::-webkit-scrollbar{width:5px;height:5px}.autocomplete-S6SpJGmW .suggestions-NOVMFmSY::-webkit-scrollbar-thumb{border:1px solid;border-color:#f1f3f6;border-radius:3px;background-color:#9598a1}html.theme-dark .autocomplete-S6SpJGmW .suggestions-NOVMFmSY::-webkit-scrollbar-thumb{background-color:#363a45;border-color:#1e222d}.autocomplete-S6SpJGmW .suggestions-NOVMFmSY::-webkit-scrollbar-track{background-color:transparent;border-radius:3px}.autocomplete-S6SpJGmW .suggestions-NOVMFmSY::-webkit-scrollbar-corner{display:none}.autocomplete-S6SpJGmW .suggestions-NOVMFmSY .noResults-1pgHgvGL,.autocomplete-S6SpJGmW .suggestions-NOVMFmSY .suggestion-3xakscNf{position:relative;white-space:nowrap;padding:10px 15px;text-align:right;overflow:hidden;text-overflow:ellipsis}.autocomplete-S6SpJGmW .suggestions-NOVMFmSY .suggestion-3xakscNf{cursor:pointer}.autocomplete-S6SpJGmW .suggestions-NOVMFmSY .suggestion-3xakscNf.selected-3wOAQHl8{color:#4a4a4a;background-color:#eafafe}html.theme-dark .autocomplete-S6SpJGmW .suggestions-NOVMFmSY .suggestion-3xakscNf.selected-3wOAQHl8{background-color:#21384d;color:#758696}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.autocomplete-S6SpJGmW .suggestions-NOVMFmSY .suggestion-3xakscNf:hover{color:#4a4a4a;background-color:#f2f2f2}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .autocomplete-S6SpJGmW .suggestions-NOVMFmSY .suggestion-3xakscNf:hover{background-color:#1c2030;color:#758696}}.autocomplete-S6SpJGmW .suggestions-NOVMFmSY .suggestion-3xakscNf:active{color:#4a4a4a;background-color:#ececec}html.theme-dark .autocomplete-S6SpJGmW .suggestions-NOVMFmSY .suggestion-3xakscNf:active{background-color:#262b3e;color:#758696}.autocomplete-S6SpJGmW .suggestions-NOVMFmSY .noResults-1pgHgvGL{color:#8a8a8a}html.theme-dark .autocomplete-S6SpJGmW .suggestions-NOVMFmSY .noResults-1pgHgvGL{color:#758696}.autocomplete-S6SpJGmW.opened-2C-bn3cP .suggestions-NOVMFmSY{visibility:visible;max-height:45vh}.autocomplete-S6SpJGmW.opened-2C-bn3cP .suggestions-NOVMFmSY::-webkit-scrollbar{width:5px;height:5px}.autocomplete-S6SpJGmW.opened-2C-bn3cP .suggestions-NOVMFmSY::-webkit-scrollbar-thumb{border:1px solid;border-color:#f1f3f6;border-radius:3px;background-color:#9598a1}html.theme-dark .autocomplete-S6SpJGmW.opened-2C-bn3cP .suggestions-NOVMFmSY::-webkit-scrollbar-thumb{background-color:#363a45;border-color:#1e222d}.autocomplete-S6SpJGmW.opened-2C-bn3cP .suggestions-NOVMFmSY::-webkit-scrollbar-track{background-color:transparent;border-radius:3px}.autocomplete-S6SpJGmW.opened-2C-bn3cP .suggestions-NOVMFmSY::-webkit-scrollbar-corner{display:none}.container-3QIqByoJ{display:flex;flex-direction:column;height:100%;min-height:0;max-width:400px;flex:1 1 auto;border-top:1px solid #e0e3eb;padding:16px 20px 0;overflow:auto}html.theme-dark .container-3QIqByoJ{border-top:1px solid #434651}.container-3QIqByoJ::-webkit-scrollbar{width:5px;height:5px}.container-3QIqByoJ::-webkit-scrollbar-thumb{border:1px solid;border-color:#f1f3f6;border-radius:3px;background-color:#9598a1}html.theme-dark .container-3QIqByoJ::-webkit-scrollbar-thumb{background-color:#363a45;border-color:#1e222d}.container-3QIqByoJ::-webkit-scrollbar-track{background-color:transparent;border-radius:3px}.container-3QIqByoJ::-webkit-scrollbar-corner{display:none}.container-3QIqByoJ.withSuggestions-22pawmYM{overflow:visible}.container-3QIqByoJ .title-2CczwBhX{display:flex;flex:0 0 auto;text-transform:uppercase;font-size:11px;letter-spacing:.4px;line-height:16px;color:#787b86}.container-3QIqByoJ .autocomplete-2f7MJ4QF{display:flex;flex:0 0 auto;padding-top:2px}.container-3QIqByoJ .saveInterval-4oPxh7GH,.container-3QIqByoJ .saveSymbol-31e2t0Ua{display:flex;flex:0 0 auto;padding-top:16px}.container-3QIqByoJ .saveInterval-4oPxh7GH{padding-bottom:24px}.container-3QIqByoJ .indicators-9neV2G7Q{display:flex;flex-direction:column;flex:1 1 auto;color:#131722;padding-top:8px;font-size:14px;line-height:21px;word-wrap:break-word}html.theme-dark .container-3QIqByoJ .indicators-9neV2G7Q{color:#b2b5be}.container-3QIqByoJ .indicators-9neV2G7Q.withSuggestions-22pawmYM{overflow:hidden}.container-3QIqByoJ .indicators-9neV2G7Q:after{content:"";display:block;padding-bottom:20px}.container-3QIqByoJ .hintLabel-35eBgBBj{display:flex}.container-3QIqByoJ .hintLabel-35eBgBBj .hintMark-3nV4PBLt{width:16px;height:16px;margin-right:10px;color:#868993} \ No newline at end of file diff --git a/public/charting_library/bundles/81.ade0deec07870e8797be.js b/public/charting_library/bundles/81.ade0deec07870e8797be.js new file mode 100644 index 00000000..6a28b41f --- /dev/null +++ b/public/charting_library/bundles/81.ade0deec07870e8797be.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[81],[]]); \ No newline at end of file diff --git a/public/charting_library/bundles/82.3259d48ee3e8c45a291b.css b/public/charting_library/bundles/82.3259d48ee3e8c45a291b.css new file mode 100644 index 00000000..354f8d4e --- /dev/null +++ b/public/charting_library/bundles/82.3259d48ee3e8c45a291b.css @@ -0,0 +1 @@ +.custom-select{display:inline-block;position:relative;vertical-align:middle;height:27px}.custom-select .switcher{background:#f1f3f6;border:1px solid;border-color:#dadde0;clear:both;height:25px;min-width:65px}html.theme-dark .custom-select .switcher{border-color:#363c4e;background:#2f3241}.custom-select .switcher .title{display:block;float:left;background-repeat:repeat-x;height:10px;overflow:hidden;padding:5px 20px 5px 12px;vertical-align:middle;width:78px}.custom-select .switcher .icon{display:flex;align-items:center;position:absolute;right:5px;top:6px;height:15px;width:13px;cursor:default;background:none}.custom-select .switcher .icon:before{content:"";display:inline-block;width:0;height:0;border-style:solid;border-width:4px 4px 0;border-color:currentColor transparent transparent;margin-left:5px;color:#4a4a4a;vertical-align:middle;transition:transform .35s ease}html.theme-dark .custom-select .switcher .icon:before{color:#c5cbce}.custom-select .items{position:absolute;z-index:3;background:#fff;border:1px solid;border-color:#dadde0;clear:both;cursor:pointer;top:28px;box-sizing:border-box;width:100%}html.theme-dark .custom-select .items{border-color:#363c4e;background:#131722}.custom-select .items .item{cursor:pointer;padding:7px 12px}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.custom-select .items .item:hover{background:#f1f3f6}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .custom-select .items .item:hover{background:#2f3241}}.custom-select .items .item.selected{padding-left:8px;background:#f1f3f6;border-left:4px solid #5cb888}html.theme-dark .custom-select .items .item.selected{background:#2f3241}.tv-line-style-option{height:15px;background:none 0 7px repeat-x}.tv-line-style-option--solid{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23797979' height='2' width='2'%3E%3Cpath d='m0 0h2v2H0z'/%3E%3C/svg%3E")}.tv-line-style-option--dotted{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23797979' height='2' width='3'%3E%3Cpath d='m0 0h2v2H0z'/%3E%3C/svg%3E")}.tv-line-style-option--dashed{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23797979' height='2' width='13'%3E%3Cpath d='m0 0h9v2H0z'/%3E%3C/svg%3E")} \ No newline at end of file diff --git a/public/charting_library/bundles/82.3259d48ee3e8c45a291b.rtl.css b/public/charting_library/bundles/82.3259d48ee3e8c45a291b.rtl.css new file mode 100644 index 00000000..8cf6752e --- /dev/null +++ b/public/charting_library/bundles/82.3259d48ee3e8c45a291b.rtl.css @@ -0,0 +1 @@ +.custom-select{display:inline-block;position:relative;vertical-align:middle;height:27px}.custom-select .switcher{background:#f1f3f6;border:1px solid;border-color:#dadde0;clear:both;height:25px;min-width:65px}html.theme-dark .custom-select .switcher{border-color:#363c4e;background:#2f3241}.custom-select .switcher .title{display:block;float:right;background-repeat:repeat-x;height:10px;overflow:hidden;padding:5px 12px 5px 20px;vertical-align:middle;width:78px}.custom-select .switcher .icon{display:flex;align-items:center;position:absolute;left:5px;top:6px;height:15px;width:13px;cursor:default;background:none}.custom-select .switcher .icon:before{content:"";display:inline-block;width:0;height:0;border-style:solid;border-width:4px 4px 0;border-color:currentColor transparent transparent;margin-right:5px;color:#4a4a4a;vertical-align:middle;transition:transform .35s ease}html.theme-dark .custom-select .switcher .icon:before{color:#c5cbce}.custom-select .items{position:absolute;z-index:3;background:#fff;border:1px solid;border-color:#dadde0;clear:both;cursor:pointer;top:28px;box-sizing:border-box;width:100%}html.theme-dark .custom-select .items{border-color:#363c4e;background:#131722}.custom-select .items .item{cursor:pointer;padding:7px 12px}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.custom-select .items .item:hover{background:#f1f3f6}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .custom-select .items .item:hover{background:#2f3241}}.custom-select .items .item.selected{padding-right:8px;background:#f1f3f6;border-right:4px solid #5cb888}html.theme-dark .custom-select .items .item.selected{background:#2f3241}.tv-line-style-option{height:15px;background:none 100% 7px repeat-x}.tv-line-style-option--solid{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23797979' height='2' width='2'%3E%3Cpath d='m0 0h2v2H0z'/%3E%3C/svg%3E")}.tv-line-style-option--dotted{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23797979' height='2' width='3'%3E%3Cpath d='m0 0h2v2H0z'/%3E%3C/svg%3E")}.tv-line-style-option--dashed{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23797979' height='2' width='13'%3E%3Cpath d='m0 0h9v2H0z'/%3E%3C/svg%3E")} \ No newline at end of file diff --git a/public/charting_library/bundles/82.b5b1ff09fec0a31d9994.js b/public/charting_library/bundles/82.b5b1ff09fec0a31d9994.js new file mode 100644 index 00000000..966b3eb7 --- /dev/null +++ b/public/charting_library/bundles/82.b5b1ff09fec0a31d9994.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[82],[]]); \ No newline at end of file diff --git a/public/charting_library/bundles/83.49cdafc9d9d9ae09e012.js b/public/charting_library/bundles/83.49cdafc9d9d9ae09e012.js new file mode 100644 index 00000000..ede8a3ea --- /dev/null +++ b/public/charting_library/bundles/83.49cdafc9d9d9ae09e012.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[83],[]]); \ No newline at end of file diff --git a/public/charting_library/bundles/83.9cb26800ae66a17fccc8.css b/public/charting_library/bundles/83.9cb26800ae66a17fccc8.css new file mode 100644 index 00000000..6687ed3f --- /dev/null +++ b/public/charting_library/bundles/83.9cb26800ae66a17fccc8.css @@ -0,0 +1 @@ +.container-RYiwcUsM{display:flex;align-items:flex-start;overflow:auto;background:#2196f3;border-radius:4px;padding:8px}html.theme-dark .container-RYiwcUsM{background:#1976d2}.content-2QNYOBPt{padding:4px 8px}.arrowHolder-1VdSgMwV{position:absolute}.arrowHolder-1VdSgMwV:after{content:"";display:block;position:absolute;box-sizing:border-box;width:0;height:0;border:0 solid;border-color:#2196f3}html.theme-dark .arrowHolder-1VdSgMwV:after{border-color:#1976d2}.arrowHolder--above-3dafVndi:after,.arrowHolder--below-FwRPJmQk:after{left:50%;margin-left:-6px;border-left:6px solid;border-left-color:transparent;border-right:6px solid;border-right-color:transparent}html.theme-dark .arrowHolder--above-3dafVndi:after,html.theme-dark .arrowHolder--below-FwRPJmQk:after{border-right-color:transparent;border-left-color:transparent}.arrowHolder--below-FwRPJmQk:after{bottom:100%;border-bottom-width:4px}.arrowHolder--above-3dafVndi:after{top:100%;border-top-width:4px}.arrowHolder--after-3LNL_hrq:after,.arrowHolder--before-J9LaRkO3:after{top:50%;margin-top:-6px;border-top:6px solid;border-top-color:transparent;border-bottom:6px solid;border-bottom-color:transparent}html.theme-dark .arrowHolder--after-3LNL_hrq:after,html.theme-dark .arrowHolder--before-J9LaRkO3:after{border-bottom-color:transparent;border-top-color:transparent}.arrowHolder--before-J9LaRkO3:after{right:100%;border-right-width:4px}.arrowHolder--after-3LNL_hrq:after{left:100%;border-left-width:4px}.arrowHolder--above-fix-1jpQDk8-{bottom:0}.arrowHolder--after-ltr-fix-1W2mlyUF{right:0}.label-2D_bIpcf{display:flex;flex:1 1 auto;margin-right:24px}.closeButton-2425ZrEc{color:#fff}.container-2yI8A9Vu{display:flex;position:absolute;justify-content:center;left:10px;right:10px;bottom:70px;pointer-events:none}.centerElement-UEMVlR9F{pointer-events:auto;z-index:1}.text-2Q2WewIi{font-size:14px;line-height:21px;color:#fff;margin-bottom:auto;word-wrap:break-word} \ No newline at end of file diff --git a/public/charting_library/bundles/83.9cb26800ae66a17fccc8.rtl.css b/public/charting_library/bundles/83.9cb26800ae66a17fccc8.rtl.css new file mode 100644 index 00000000..23b88533 --- /dev/null +++ b/public/charting_library/bundles/83.9cb26800ae66a17fccc8.rtl.css @@ -0,0 +1 @@ +.container-RYiwcUsM{display:flex;align-items:flex-start;overflow:auto;background:#2196f3;border-radius:4px;padding:8px}html.theme-dark .container-RYiwcUsM{background:#1976d2}.content-2QNYOBPt{padding:4px 8px}.arrowHolder-1VdSgMwV{position:absolute}.arrowHolder-1VdSgMwV:after{content:"";display:block;position:absolute;box-sizing:border-box;width:0;height:0;border:0 solid;border-color:#2196f3}html.theme-dark .arrowHolder-1VdSgMwV:after{border-color:#1976d2}.arrowHolder--above-3dafVndi:after,.arrowHolder--below-FwRPJmQk:after{left:50%;margin-left:-6px;border-left:6px solid;border-left-color:transparent;border-right:6px solid;border-right-color:transparent}html.theme-dark .arrowHolder--above-3dafVndi:after,html.theme-dark .arrowHolder--below-FwRPJmQk:after{border-left-color:transparent;border-right-color:transparent}.arrowHolder--below-FwRPJmQk:after{bottom:100%;border-bottom-width:4px}.arrowHolder--above-3dafVndi:after{top:100%;border-top-width:4px}.arrowHolder--after-3LNL_hrq:after,.arrowHolder--before-J9LaRkO3:after{top:50%;margin-top:-6px;border-top:6px solid;border-top-color:transparent;border-bottom:6px solid;border-bottom-color:transparent}html.theme-dark .arrowHolder--after-3LNL_hrq:after,html.theme-dark .arrowHolder--before-J9LaRkO3:after{border-bottom-color:transparent;border-top-color:transparent}.arrowHolder--before-J9LaRkO3:after{right:100%;border-right-width:4px}.arrowHolder--after-3LNL_hrq:after{left:100%;border-left-width:4px}.arrowHolder--above-fix-1jpQDk8-{bottom:0}.arrowHolder--before-rtl-fix-zFykJHSt{left:0}.arrowHolder--after-ltr-fix-1W2mlyUF{right:0}.label-2D_bIpcf{display:flex;flex:1 1 auto;margin-left:24px}.closeButton-2425ZrEc{color:#fff}.container-2yI8A9Vu{display:flex;position:absolute;justify-content:center;right:10px;left:10px;bottom:70px;pointer-events:none}.centerElement-UEMVlR9F{pointer-events:auto;z-index:1}.text-2Q2WewIi{font-size:14px;line-height:21px;color:#fff;margin-bottom:auto;word-wrap:break-word} \ No newline at end of file diff --git a/public/charting_library/bundles/84.d0bc6b5ed24222952735.js b/public/charting_library/bundles/84.d0bc6b5ed24222952735.js new file mode 100644 index 00000000..8252d739 --- /dev/null +++ b/public/charting_library/bundles/84.d0bc6b5ed24222952735.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[84],[]]); \ No newline at end of file diff --git a/public/charting_library/bundles/84.ee9032b7dbf988aeda7c.css b/public/charting_library/bundles/84.ee9032b7dbf988aeda7c.css new file mode 100644 index 00000000..6fc78cc4 --- /dev/null +++ b/public/charting_library/bundles/84.ee9032b7dbf988aeda7c.css @@ -0,0 +1 @@ +.themesButtonText-2QMmFP4s{width:100px;font-size:14px;color:#131722}html.theme-dark .themesButtonText-2QMmFP4s{color:#b2b5be}.themesButtonIcon-7BX3V6du{display:flex}.defaultsButtonText-ezA5ZCBQ{width:100px;font-size:16px;color:#131722}html.theme-dark .defaultsButtonText-ezA5ZCBQ{color:#b2b5be}.defaultsButtonItem-3eSfgMfv{min-width:100px}.withSidebar-1v16TX_2{display:block;min-width:610px;max-width:750px;width:auto}@media screen and (max-width:768px){.withSidebar-1v16TX_2{min-width:420px;max-width:610px;width:auto}}@media screen and (max-width:419px){.withSidebar-1v16TX_2{min-width:100%;min-height:auto}}.withSidebar-1v16TX_2 .content-1KOxICHZ{display:flex;flex:1 1 auto;flex-direction:row;border-top:1px solid #e0e3eb;overflow:hidden}html.theme-dark .withSidebar-1v16TX_2 .content-1KOxICHZ{border-top:1px solid #434651}.withSidebar-1v16TX_2 .tabContent-uYpWHhq0{flex:1 1 auto;overflow-y:auto;overflow-x:hidden;min-height:145px;-webkit-overflow-scrolling:touch;width:auto}@media screen and (max-height:290px){.withSidebar-1v16TX_2 .tabContent-uYpWHhq0{min-height:auto}}.withSidebar-1v16TX_2 .tabContent-uYpWHhq0::-webkit-scrollbar{width:5px;height:5px}.withSidebar-1v16TX_2 .tabContent-uYpWHhq0::-webkit-scrollbar-thumb{border:1px solid;border-color:#f1f3f6;border-radius:3px;background-color:#9598a1}html.theme-dark .withSidebar-1v16TX_2 .tabContent-uYpWHhq0::-webkit-scrollbar-thumb{background-color:#363a45;border-color:#1e222d}.withSidebar-1v16TX_2 .tabContent-uYpWHhq0::-webkit-scrollbar-track{background-color:transparent;border-radius:3px}.withSidebar-1v16TX_2 .tabContent-uYpWHhq0::-webkit-scrollbar-corner{display:none}.withSidebar-1v16TX_2 .backButton-1BRkbiCz{display:flex;align-items:center;width:28px;height:100%;padding-right:20px;color:#787b86}.withSidebar-1v16TX_2 .applyToAllButton-1mQDSNsO{padding-right:12px} \ No newline at end of file diff --git a/public/charting_library/bundles/84.ee9032b7dbf988aeda7c.rtl.css b/public/charting_library/bundles/84.ee9032b7dbf988aeda7c.rtl.css new file mode 100644 index 00000000..52bdfa69 --- /dev/null +++ b/public/charting_library/bundles/84.ee9032b7dbf988aeda7c.rtl.css @@ -0,0 +1 @@ +.themesButtonText-2QMmFP4s{width:100px;font-size:14px;color:#131722}html.theme-dark .themesButtonText-2QMmFP4s{color:#b2b5be}.themesButtonIcon-7BX3V6du{display:flex}.defaultsButtonText-ezA5ZCBQ{width:100px;font-size:16px;color:#131722}html.theme-dark .defaultsButtonText-ezA5ZCBQ{color:#b2b5be}.defaultsButtonItem-3eSfgMfv{min-width:100px}.withSidebar-1v16TX_2{display:block;min-width:610px;max-width:750px;width:auto}@media screen and (max-width:768px){.withSidebar-1v16TX_2{min-width:420px;max-width:610px;width:auto}}@media screen and (max-width:419px){.withSidebar-1v16TX_2{min-width:100%;min-height:auto}}.withSidebar-1v16TX_2 .content-1KOxICHZ{display:flex;flex:1 1 auto;flex-direction:row;border-top:1px solid #e0e3eb;overflow:hidden}html.theme-dark .withSidebar-1v16TX_2 .content-1KOxICHZ{border-top:1px solid #434651}.withSidebar-1v16TX_2 .tabContent-uYpWHhq0{flex:1 1 auto;overflow-y:auto;overflow-x:hidden;min-height:145px;-webkit-overflow-scrolling:touch;width:auto}@media screen and (max-height:290px){.withSidebar-1v16TX_2 .tabContent-uYpWHhq0{min-height:auto}}.withSidebar-1v16TX_2 .tabContent-uYpWHhq0::-webkit-scrollbar{width:5px;height:5px}.withSidebar-1v16TX_2 .tabContent-uYpWHhq0::-webkit-scrollbar-thumb{border:1px solid;border-color:#f1f3f6;border-radius:3px;background-color:#9598a1}html.theme-dark .withSidebar-1v16TX_2 .tabContent-uYpWHhq0::-webkit-scrollbar-thumb{background-color:#363a45;border-color:#1e222d}.withSidebar-1v16TX_2 .tabContent-uYpWHhq0::-webkit-scrollbar-track{background-color:transparent;border-radius:3px}.withSidebar-1v16TX_2 .tabContent-uYpWHhq0::-webkit-scrollbar-corner{display:none}.withSidebar-1v16TX_2 .backButton-1BRkbiCz{display:flex;align-items:center;width:28px;height:100%;padding-left:20px;color:#787b86}.withSidebar-1v16TX_2 .backButton-1BRkbiCz svg{transform:rotate(180deg)}.withSidebar-1v16TX_2 .applyToAllButton-1mQDSNsO{padding-left:12px} \ No newline at end of file diff --git a/public/charting_library/bundles/8443ec594898865ce13f99215e8e82a4.gif b/public/charting_library/bundles/8443ec594898865ce13f99215e8e82a4.gif new file mode 100644 index 00000000..9e34fa74 Binary files /dev/null and b/public/charting_library/bundles/8443ec594898865ce13f99215e8e82a4.gif differ diff --git a/public/charting_library/bundles/85.bf8b8486318ff980a873.js b/public/charting_library/bundles/85.bf8b8486318ff980a873.js new file mode 100644 index 00000000..ed537b25 --- /dev/null +++ b/public/charting_library/bundles/85.bf8b8486318ff980a873.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[85],[]]); \ No newline at end of file diff --git a/public/charting_library/bundles/85.eb69a67796d2aa2e3a38.css b/public/charting_library/bundles/85.eb69a67796d2aa2e3a38.css new file mode 100644 index 00000000..49520686 --- /dev/null +++ b/public/charting_library/bundles/85.eb69a67796d2aa2e3a38.css @@ -0,0 +1 @@ +.themesButtonText-2XRZOVS_{width:100px;font-size:14px;color:#131722}html.theme-dark .themesButtonText-2XRZOVS_{color:#b2b5be}.themesButtonIcon-37H2TIZ0{display:flex}.defaultsButtonText-3NI8VPPT{width:100px;font-size:16px;color:#131722}html.theme-dark .defaultsButtonText-3NI8VPPT{color:#b2b5be}.defaultsButtonItem-3mtq1Y8x{min-width:100px}.scrollable-1DxdJw53{flex:1 1 auto;overflow-y:auto;overflow-x:hidden;min-height:145px;-webkit-overflow-scrolling:touch}@media screen and (max-height:290px){.scrollable-1DxdJw53{min-height:auto}}.scrollable-1DxdJw53::-webkit-scrollbar{width:5px;height:5px}.scrollable-1DxdJw53::-webkit-scrollbar-thumb{border:1px solid;border-color:#f1f3f6;border-radius:3px;background-color:#9598a1}html.theme-dark .scrollable-1DxdJw53::-webkit-scrollbar-thumb{background-color:#363a45;border-color:#1e222d}.scrollable-1DxdJw53::-webkit-scrollbar-track{background-color:transparent;border-radius:3px}.scrollable-1DxdJw53::-webkit-scrollbar-corner{display:none} \ No newline at end of file diff --git a/public/charting_library/bundles/85.eb69a67796d2aa2e3a38.rtl.css b/public/charting_library/bundles/85.eb69a67796d2aa2e3a38.rtl.css new file mode 100644 index 00000000..49520686 --- /dev/null +++ b/public/charting_library/bundles/85.eb69a67796d2aa2e3a38.rtl.css @@ -0,0 +1 @@ +.themesButtonText-2XRZOVS_{width:100px;font-size:14px;color:#131722}html.theme-dark .themesButtonText-2XRZOVS_{color:#b2b5be}.themesButtonIcon-37H2TIZ0{display:flex}.defaultsButtonText-3NI8VPPT{width:100px;font-size:16px;color:#131722}html.theme-dark .defaultsButtonText-3NI8VPPT{color:#b2b5be}.defaultsButtonItem-3mtq1Y8x{min-width:100px}.scrollable-1DxdJw53{flex:1 1 auto;overflow-y:auto;overflow-x:hidden;min-height:145px;-webkit-overflow-scrolling:touch}@media screen and (max-height:290px){.scrollable-1DxdJw53{min-height:auto}}.scrollable-1DxdJw53::-webkit-scrollbar{width:5px;height:5px}.scrollable-1DxdJw53::-webkit-scrollbar-thumb{border:1px solid;border-color:#f1f3f6;border-radius:3px;background-color:#9598a1}html.theme-dark .scrollable-1DxdJw53::-webkit-scrollbar-thumb{background-color:#363a45;border-color:#1e222d}.scrollable-1DxdJw53::-webkit-scrollbar-track{background-color:transparent;border-radius:3px}.scrollable-1DxdJw53::-webkit-scrollbar-corner{display:none} \ No newline at end of file diff --git a/public/charting_library/bundles/86.3f98f1eb055238a52282.css b/public/charting_library/bundles/86.3f98f1eb055238a52282.css new file mode 100644 index 00000000..7121d031 --- /dev/null +++ b/public/charting_library/bundles/86.3f98f1eb055238a52282.css @@ -0,0 +1 @@ +.popupDialog-2VK9ttEi{max-width:450px}.content-BtJ6qB4V .row-3iYHykfo{display:flex;padding-bottom:12px}.content-BtJ6qB4V .row-3iYHykfo .column-2FlX4ngi{font-size:13px}.content-BtJ6qB4V .row-3iYHykfo .column-2FlX4ngi .title-22tx3Djt{color:#888989}html.theme-dark .content-BtJ6qB4V .row-3iYHykfo .column-2FlX4ngi .title-22tx3Djt{color:#758696}.content-BtJ6qB4V .row-3iYHykfo .column-2FlX4ngi .value-2xvVEs1a{font-weight:700;color:#4a4a4a}html.theme-dark .content-BtJ6qB4V .row-3iYHykfo .column-2FlX4ngi .value-2xvVEs1a{color:#c5cbce}.content-BtJ6qB4V .row-3iYHykfo .columnTitle-3ypCTDKd{text-align:left}.content-BtJ6qB4V .row-3iYHykfo .columnValue-Xr4j0qyI{margin-left:auto;text-align:right} \ No newline at end of file diff --git a/public/charting_library/bundles/86.3f98f1eb055238a52282.rtl.css b/public/charting_library/bundles/86.3f98f1eb055238a52282.rtl.css new file mode 100644 index 00000000..912629e9 --- /dev/null +++ b/public/charting_library/bundles/86.3f98f1eb055238a52282.rtl.css @@ -0,0 +1 @@ +.popupDialog-2VK9ttEi{max-width:450px}.content-BtJ6qB4V .row-3iYHykfo{display:flex;padding-bottom:12px}.content-BtJ6qB4V .row-3iYHykfo .column-2FlX4ngi{font-size:13px}.content-BtJ6qB4V .row-3iYHykfo .column-2FlX4ngi .title-22tx3Djt{color:#888989}html.theme-dark .content-BtJ6qB4V .row-3iYHykfo .column-2FlX4ngi .title-22tx3Djt{color:#758696}.content-BtJ6qB4V .row-3iYHykfo .column-2FlX4ngi .value-2xvVEs1a{font-weight:700;color:#4a4a4a}html.theme-dark .content-BtJ6qB4V .row-3iYHykfo .column-2FlX4ngi .value-2xvVEs1a{color:#c5cbce}.content-BtJ6qB4V .row-3iYHykfo .columnTitle-3ypCTDKd{text-align:right}.content-BtJ6qB4V .row-3iYHykfo .columnValue-Xr4j0qyI{margin-right:auto;text-align:left} \ No newline at end of file diff --git a/public/charting_library/bundles/86.f3b65677452be8f13552.js b/public/charting_library/bundles/86.f3b65677452be8f13552.js new file mode 100644 index 00000000..345d0702 --- /dev/null +++ b/public/charting_library/bundles/86.f3b65677452be8f13552.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[86],[]]); \ No newline at end of file diff --git a/public/charting_library/bundles/87.ee16a5780032802b4163.css b/public/charting_library/bundles/87.ee16a5780032802b4163.css new file mode 100644 index 00000000..d346fdcd --- /dev/null +++ b/public/charting_library/bundles/87.ee16a5780032802b4163.css @@ -0,0 +1 @@ +.bottom-widgetbar-content.backtesting .button{display:block;position:relative;float:left;cursor:default;padding:7px 12px;border:1px solid;border-color:#dadde0;height:14px;background:#fff;color:#555;font-size:11px;font-weight:600}html.theme-dark .bottom-widgetbar-content.backtesting .button{color:#758696;background:#131722;border-color:#363c4e}.symbol-search-dialog .symbol-block input,input.symbol-edit{float:left;background-color:#fff;border:1px solid #dadde0;width:291px;height:28px;padding:0 0 0 7px;color:#4a4a4a;font-size:13px;font-weight:600}html.theme-dark .symbol-search-dialog .symbol-block input,html.theme-dark input.symbol-edit{color:#c5cbce;border-color:#363c4e;background-color:#131722}.symbol-search-dialog input.incomplete,input.symbol-edit.incomplete{background-color:#ffffef}.symbol-search-dialog input.error,.symbol-search-dialog input.interval-error,input.symbol-edit.error,input.symbol-edit.interval-error{background-color:#ffefef}.symbol-search-loading{position:relative;width:51px;height:51px;padding:10px;margin:0 auto}.property-page input.symbol-edit{padding:0 5px}div.symbol-edit-popup{display:block;position:absolute;width:705px;border:1px solid;border-color:#d6d8e0;z-index:111;background:hsla(0,0%,100%,.9)}html.theme-dark div.symbol-edit-popup{background:rgba(30,34,45,.9);border-color:#131722}div.symbol-edit-popup .table-wrapper{border-top:1px solid;border-top-color:#dde1e6;overflow-y:auto;width:700px;position:relative;z-index:0}html.theme-dark div.symbol-edit-popup .table-wrapper{border-top-color:#363c4e}div.symbol-edit-popup .table-wrapper::-webkit-scrollbar{width:5px;height:5px}div.symbol-edit-popup .table-wrapper::-webkit-scrollbar-thumb{border:1px solid;border-color:#f1f3f6;border-radius:3px;background-color:#9598a1}html.theme-dark div.symbol-edit-popup .table-wrapper::-webkit-scrollbar-thumb{background-color:#363a45;border-color:#1e222d}div.symbol-edit-popup .table-wrapper::-webkit-scrollbar-track{background-color:transparent;border-radius:3px}div.symbol-edit-popup .table-wrapper::-webkit-scrollbar-corner{display:none}table.symbol-edit-popup{border-collapse:collapse}table.symbol-edit-popup tr.group-title{cursor:default}table.symbol-edit-popup tr.group-title td:first-child div{position:relative;border-color:#ccc;transition:border-color .1s linear}table.symbol-edit-popup tr.group-title td:first-child div:before{content:"";display:block;position:absolute;top:50%;left:-13px;margin-top:-2px;width:0;height:0;border-color:inherit;border-style:solid;border-width:7px 4px 0}table.symbol-edit-popup tr.group-title:not(.collapsed) td:first-child div:before{border-left-color:transparent;border-right-color:transparent}table.symbol-edit-popup tr.group-title.collapsed td:first-child div{border-color:#ccc}table.symbol-edit-popup tr.group-title.collapsed td:first-child div:before{left:-12px;margin-top:-3px;border-top-color:transparent;border-bottom-color:transparent;border-width:4px 0 4px 7px}table.symbol-edit-popup tr.group-title.symbol-edit-popup-active td:first-child div{border-color:#555}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){table.symbol-edit-popup tr.group-title:hover td:first-child div{border-color:#555}}table.symbol-edit-popup tr.hidden{display:none}table.symbol-edit-popup td{padding:7px}table.symbol-edit-popup td:first-child{padding-left:20px}table.symbol-edit-popup td:last-child{max-width:130px;padding-right:20px}tr.symbol-edit-popup{cursor:pointer;height:25px}tr.symbol-edit-popup td:first-child{max-width:165px}span.symbol-edit-highlight{color:#4c82ce;font-weight:700}.symbol-edit-popup-td{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:230px;line-height:14px;vertical-align:middle}.symbol-edit-popup-td.name{font-weight:700}.symbol-edit-popup-td.desc{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:100%}.symbol-edit-popup-td.desc:after,.symbol-edit-popup-td.name:after{content:"\200E"}.symbol-edit-popup-td.name>div{display:inline}.symbol-edit-popup-td.name>div:after{content:"\200E"}.symbol-edit-popup-td.desc strong,.symbol-edit-popup-td.name strong{font-weight:700;color:#4c82ce}.symbol-edit-popup-td.desc em,.symbol-edit-popup-td.name em{font-weight:700;color:#4c82ce;font-style:normal}.symbol-edit-popup-td.type{font-size:11px;color:#999;white-space:nowrap;text-align:right}.symbol-edit-popup-td.flag svg{position:relative;display:block;right:-2px}.symbol-edit-popup-td.flag svg.bitcoin{top:0}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){tr.symbol-edit-popup:hover:not(.group-title){background:#f1f3f6}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark tr.symbol-edit-popup:hover:not(.group-title){background:#363c4e}}.symbol-edit-popup-active{background:#d1e1f8}html.theme-dark .symbol-edit-popup-active{background:#2f3241}.symbol-edit-popup i.eod,.symbol-edit-popup i.pro{display:inline-block;height:auto;width:auto;font-size:10px;color:#fff;text-transform:uppercase;font-style:normal;line-height:12px;vertical-align:0;padding:1px 3px 0;overflow:visible}.symbol-edit-popup i.eod{background:#c9cbcd}html.theme-dark .symbol-edit-popup i.eod{background:#363c4e}.symbol-edit-popup i.pro{background:#bf645c}.tv-close-mixin{cursor:pointer}.tv-close-mixin:after{content:" ";display:block;position:absolute;width:9px;height:9px;top:6px;left:6px;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAASCAYAAACJgPRIAAAAUElEQVR42pWQMQoAIAwD++d+x8HJbyoOWXJDSSBgwpVS62vtc8ulXg/ZAZkFMycNoBJgXoUcX1cm9N1NSL0esgMyC2ZOGkAlwLwKObhu/qcHp/zWImEdH8EAAAAASUVORK5CYII=)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-close-mixin:hover:after{background-position:bottom}}.symbol-edit-notification{position:relative;padding:15px 20px;background:#ebf7fc;font-size:12px}html.theme-dark .symbol-edit-notification{background:#4c525e}.symbol-edit-notification a{color:#2196f3;transition:color .35s ease}html.theme-dark .symbol-edit-notification a{color:#1976d2}.symbol-edit-notification a:visited{color:#2196f3;fill:#2196f3}html.theme-dark .symbol-edit-notification a:visited{fill:#1976d2;color:#1976d2}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.symbol-edit-notification a:hover{color:#1e88e5;fill:#1e88e5;transition-duration:.06s}}.symbol-edit-notification a:focus{outline:auto}.symbol-edit-notification a:focus:not(:-moz-focusring){outline:none}.symbol-edit-notification a:-moz-focusring{outline:auto}.symbol-edit-notification a:active{color:#1e88e5;fill:#1e88e5;transition-duration:.06s}.symbol-edit-notification .close{display:block;position:absolute;width:21px;height:21px;right:0;top:0;cursor:pointer}.symbol-edit-notification .close:after{content:" ";display:block;position:absolute;width:9px;height:9px;top:6px;left:6px;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAASCAYAAACJgPRIAAAAUElEQVR42pWQMQoAIAwD++d+x8HJbyoOWXJDSSBgwpVS62vtc8ulXg/ZAZkFMycNoBJgXoUcX1cm9N1NSL0esgMyC2ZOGkAlwLwKObhu/qcHp/zWImEdH8EAAAAASUVORK5CYII=)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.symbol-edit-notification .close:hover:after{background-position:bottom}}.symbol-search-dialog .symbol-block{width:auto;margin:0;overflow:hidden}.symbol-search-dialog .symbol-block .spread-actions{height:36px;border-top:none;border-right:none;background:#fff}html.theme-dark .symbol-search-dialog .symbol-block .spread-actions{background:#131722}.symbol-search-dialog .symbol-block .spread-actions:empty{border:none;background:transparent}.symbol-search-dialog .symbol-block button{width:30px;height:36px;border-left:1px solid;border-left-color:#dadde0}html.theme-dark .symbol-search-dialog .symbol-block button{border-left-color:#363c4e}.symbol-search-dialog .symbol-block button:first-child{border-left:none!important}.symbol-search-dialog .symbol-block-inputspacer{overflow:hidden}.symbol-search-dialog .symbol-block-inputspacer input{float:none;width:100%;height:37px;font-size:13px;margin:0;padding:0 7px 0 34px;border-width:0;border-bottom-width:1px;border-radius:0;box-sizing:border-box}.symbol-search-dialog .symbol-block-inputspacer .search-icon{content:" ";display:block;position:absolute;width:13px;height:13px;background:url(1df47f578aeef40dd1f2328338a133be.png) no-repeat -80px -339px;top:12px;left:12px}.symbol-search-dialog .filter{padding:0 20px;border-bottom:1px solid;border-color:#dde1e6}html.theme-dark .symbol-search-dialog .filter{border-color:#363c4e}.symbol-search-dialog .filter .exchange-filter,.symbol-search-dialog .filter .tradable-filter,.symbol-search-dialog .filter a.type-filter{position:relative;display:inline-block;margin-right:18px;padding:10px 0;font-size:13px;line-height:16px;color:#555}html.theme-dark .symbol-search-dialog .filter .exchange-filter,html.theme-dark .symbol-search-dialog .filter .tradable-filter,html.theme-dark .symbol-search-dialog .filter a.type-filter{color:#8b8f95}.symbol-search-dialog .filter .exchange-filter a,.symbol-search-dialog .filter .tradable-filter a,.symbol-search-dialog .filter a.type-filter a{color:#555}html.theme-dark .symbol-search-dialog .filter .exchange-filter a,html.theme-dark .symbol-search-dialog .filter .tradable-filter a,html.theme-dark .symbol-search-dialog .filter a.type-filter a{color:#8b8f95}.symbol-search-dialog .filter .exchange-filter.active,.symbol-search-dialog .filter .tradable-filter.active,.symbol-search-dialog .filter a.type-filter.active{font-weight:700}.symbol-search-dialog .filter .exchange-filter.active:after,.symbol-search-dialog .filter .tradable-filter.active:after,.symbol-search-dialog .filter a.type-filter.active:after{content:" ";display:block;position:absolute;bottom:-1px;width:100%;height:3px;background-color:#5cb888}.symbol-search-dialog .filter .exchange-filter,.symbol-search-dialog .filter .exchange-filter:last-child,.symbol-search-dialog .filter a.type-filter:last-child{margin-right:0}.symbol-search-dialog .filter .tradable-filter{margin:0 10px;padding-bottom:11px;line-height:14px;vertical-align:middle}.symbol-search-dialog .filter .tradable-filter *{vertical-align:middle}.symbol-search-dialog .filter .tradable-filter .tradable-text{padding-left:5px;cursor:default}.symbol-search-dialog .results{width:100%;height:500px;overflow-x:hidden;overflow-y:auto;margin:0}.symbol-search-dialog .results::-webkit-scrollbar{width:5px;height:5px}.symbol-search-dialog .results::-webkit-scrollbar-thumb{border:1px solid;border-color:#f1f3f6;border-radius:3px;background-color:#9598a1}html.theme-dark .symbol-search-dialog .results::-webkit-scrollbar-thumb{background-color:#363a45;border-color:#1e222d}.symbol-search-dialog .results::-webkit-scrollbar-track{background-color:transparent;border-radius:3px}.symbol-search-dialog .results::-webkit-scrollbar-corner{display:none}.symbol-search-dialog .results table{width:100%;border-collapse:collapse}.symbol-search-dialog .results table .symbol-edit-popup-td:first-child{padding-left:20px}.symbol-search-dialog .results table .symbol-edit-popup-td:last-child{padding-right:20px}.symbol-search-dialog .results table tr:first-child .symbol-edit-popup-td{padding-top:12px}.spread-actions{float:right;height:28px;border:1px solid;border-color:#dadde0;background:#fff;margin:0}html.theme-dark .spread-actions{background:#131722;border-color:#363c4e}.spread-actions button{position:relative;float:left;width:20px;height:28px;background:none;padding:0;margin:0;border:none;cursor:pointer}.spread-actions button::-moz-focus-inner{padding:0!important;margin:0!important}.spread-actions button.disabled{cursor:default}.spread-actions button .action-icon{display:block;position:absolute;margin:auto;left:0;top:0;right:0;bottom:0;color:#7d7d7d}html.theme-dark .spread-actions button .action-icon{color:#758696}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.spread-actions button:hover .action-icon{color:#2196f3}}.spread-actions button.disabled .action-icon{color:#a6a6a6}html.theme-dark .spread-actions button.disabled .action-icon{color:#2f3241}.symbol-search-dialog .exchange-filter,div.symbol-edit-popup .exchange-filter{float:right}.exchange-filter .tv-symbol-select>.flag{display:block;position:absolute;top:2px;right:15px}.exchange-filter-overflow{width:90px;text-overflow:ellipsis;overflow:hidden;text-align:right;white-space:nowrap}.flagged-exchange{margin-right:36px}.symbol-search-dialog .exchange-filter .sbSelector{width:90px;text-overflow:ellipsis;overflow:hidden;text-align:right;white-space:nowrap;display:block;width:auto;margin:0 12px 0 15px}.symbol-search-dialog .exchange-filter .sbSelector.exchange-with-flag{margin-right:36px}div.symbol-edit-popup .exchange-filter .sbSelector{width:90px;text-overflow:ellipsis;overflow:hidden;text-align:right;white-space:nowrap;display:block;width:auto;margin:0 10px 0 15px;font-weight:700;font-size:11px;height:13px}div.symbol-edit-popup .exchange-filter .sbSelector.exchange-with-flag{margin-right:36px}.symbol-search-dialog .exchange-filter .sbToggle,div.symbol-edit-popup .exchange-filter .sbToggle{position:absolute;right:1px}.symbol-edit-popup .filter{padding:0 20px;margin:0;width:100%;box-sizing:border-box}.symbol-edit-popup .filter .exchange-filter,.symbol-edit-popup .filter a.type-filter{display:inline-block;position:relative;padding:6px 0;margin-right:18px;font-weight:700;font-size:11px;line-height:14px;border-bottom:none;color:#4a4a4a}html.theme-dark .symbol-edit-popup .filter .exchange-filter,html.theme-dark .symbol-edit-popup .filter a.type-filter{color:#c5cbce}.symbol-edit-popup .filter .exchange-filter a,.symbol-edit-popup .filter a.type-filter a{color:#4a4a4a}html.theme-dark .symbol-edit-popup .filter .exchange-filter a,html.theme-dark .symbol-edit-popup .filter a.type-filter a{color:#c5cbce}.symbol-edit-popup .filter .exchange-filter.active:after,.symbol-edit-popup .filter a.type-filter.active:after{content:" ";display:block;position:absolute;bottom:-1px;width:100%;height:3px;background-color:#5cb888}.symbol-edit-popup .filter .exchange-filter:last-child,.symbol-edit-popup .filter a.type-filter:last-child{margin-right:0}.symbol-edit-popup .filter .exchange-filter{margin:0}.symbol-edit-popup .filter .tradable-filter{margin:0 10px;font-size:11px;line-height:14px;padding:6px 0;display:inline-flex;vertical-align:middle;align-items:center}.symbol-edit-popup .filter .tradable-filter .tradable-text{padding-left:5px;cursor:default;vertical-align:middle}.symbol-search-dialog .tradable-filter,div.symbol-edit-popup .tradable-filter{float:right}.bottom-widgetbar-content.backtesting .button.active,.bottom-widgetbar-content.backtesting .button:active{background:#f2f3f5;color:#4c525e}html.theme-dark .bottom-widgetbar-content.backtesting .button.active,html.theme-dark .bottom-widgetbar-content.backtesting .button:active{color:#f7f8fa;background:#131722}.button.iconed{padding:6px 10px 8px}@media (max-width:550px){div.symbol-edit-popup{width:100vw}div.symbol-edit-popup .filter{padding:0 10px}div.symbol-edit-popup .filter .exchange-filter,div.symbol-edit-popup .filter a.type-filter{margin-left:0;margin-right:10px}div.symbol-edit-popup .table-wrapper{width:100%}table.symbol-edit-popup{width:100%;table-layout:fixed}table.symbol-edit-popup td{padding:5px}table.symbol-edit-popup td:first-child{padding-left:10px}.symbol-edit-popup-td{overflow:hidden;text-overflow:ellipsis;box-sizing:border-box}.symbol-edit-popup-td.name{width:30%}.symbol-edit-popup-td.desc{width:40%}.symbol-edit-popup-td.type{width:30%}} \ No newline at end of file diff --git a/public/charting_library/bundles/87.ee16a5780032802b4163.rtl.css b/public/charting_library/bundles/87.ee16a5780032802b4163.rtl.css new file mode 100644 index 00000000..3cfcb448 --- /dev/null +++ b/public/charting_library/bundles/87.ee16a5780032802b4163.rtl.css @@ -0,0 +1 @@ +.bottom-widgetbar-content.backtesting .button{display:block;position:relative;float:right;cursor:default;padding:7px 12px;border:1px solid;border-color:#dadde0;height:14px;background:#fff;color:#555;font-size:11px;font-weight:600}html.theme-dark .bottom-widgetbar-content.backtesting .button{color:#758696;background:#131722;border-color:#363c4e}.symbol-search-dialog .symbol-block input,input.symbol-edit{float:right;background-color:#fff;border:1px solid #dadde0;width:291px;height:28px;padding:0 7px 0 0;color:#4a4a4a;font-size:13px;font-weight:600}html.theme-dark .symbol-search-dialog .symbol-block input,html.theme-dark input.symbol-edit{color:#c5cbce;border-color:#363c4e;background-color:#131722}.symbol-search-dialog input.incomplete,input.symbol-edit.incomplete{background-color:#ffffef}.symbol-search-dialog input.error,.symbol-search-dialog input.interval-error,input.symbol-edit.error,input.symbol-edit.interval-error{background-color:#ffefef}.symbol-search-loading{position:relative;width:51px;height:51px;padding:10px;margin:0 auto}.property-page input.symbol-edit{padding:0 5px}div.symbol-edit-popup{display:block;position:absolute;width:705px;border:1px solid;border-color:#d6d8e0;z-index:111;background:hsla(0,0%,100%,.9)}html.theme-dark div.symbol-edit-popup{background:rgba(30,34,45,.9);border-color:#131722}div.symbol-edit-popup .table-wrapper{border-top:1px solid;border-top-color:#dde1e6;overflow-y:auto;width:700px;position:relative;z-index:0}html.theme-dark div.symbol-edit-popup .table-wrapper{border-top-color:#363c4e}div.symbol-edit-popup .table-wrapper::-webkit-scrollbar{width:5px;height:5px}div.symbol-edit-popup .table-wrapper::-webkit-scrollbar-thumb{border:1px solid;border-color:#f1f3f6;border-radius:3px;background-color:#9598a1}html.theme-dark div.symbol-edit-popup .table-wrapper::-webkit-scrollbar-thumb{background-color:#363a45;border-color:#1e222d}div.symbol-edit-popup .table-wrapper::-webkit-scrollbar-track{background-color:transparent;border-radius:3px}div.symbol-edit-popup .table-wrapper::-webkit-scrollbar-corner{display:none}table.symbol-edit-popup{border-collapse:collapse}table.symbol-edit-popup tr.group-title{cursor:default}table.symbol-edit-popup tr.group-title td:first-child div{position:relative;border-color:#ccc;transition:border-color .1s linear}table.symbol-edit-popup tr.group-title td:first-child div:before{content:"";display:block;position:absolute;top:50%;right:-13px;margin-top:-2px;width:0;height:0;border-color:inherit;border-style:solid;border-width:7px 4px 0}table.symbol-edit-popup tr.group-title:not(.collapsed) td:first-child div:before{border-right-color:transparent;border-left-color:transparent}table.symbol-edit-popup tr.group-title.collapsed td:first-child div{border-color:#ccc}table.symbol-edit-popup tr.group-title.collapsed td:first-child div:before{right:-12px;margin-top:-3px;border-top-color:transparent;border-bottom-color:transparent;border-width:4px 7px 4px 0}table.symbol-edit-popup tr.group-title.symbol-edit-popup-active td:first-child div{border-color:#555}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){table.symbol-edit-popup tr.group-title:hover td:first-child div{border-color:#555}}table.symbol-edit-popup tr.hidden{display:none}table.symbol-edit-popup td{padding:7px}table.symbol-edit-popup td:first-child{padding-right:20px}table.symbol-edit-popup td:last-child{max-width:130px;padding-left:20px}tr.symbol-edit-popup{cursor:pointer;height:25px}tr.symbol-edit-popup td:first-child{max-width:165px}span.symbol-edit-highlight{color:#4c82ce;font-weight:700}.symbol-edit-popup-td{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:230px;line-height:14px;vertical-align:middle}.symbol-edit-popup-td.name{font-weight:700}.symbol-edit-popup-td.desc{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:100%}.symbol-edit-popup-td.desc:after,.symbol-edit-popup-td.name:after{content:"\200E"}.symbol-edit-popup-td.name>div{display:inline}.symbol-edit-popup-td.name>div:after{content:"\200E"}.symbol-edit-popup-td.desc strong,.symbol-edit-popup-td.name strong{font-weight:700;color:#4c82ce}.symbol-edit-popup-td.desc em,.symbol-edit-popup-td.name em{font-weight:700;color:#4c82ce;font-style:normal}.symbol-edit-popup-td.type{font-size:11px;color:#999;white-space:nowrap;text-align:left}.symbol-edit-popup-td.flag svg{position:relative;display:block;left:-2px}.symbol-edit-popup-td.flag svg.bitcoin{top:0}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){tr.symbol-edit-popup:hover:not(.group-title){background:#f1f3f6}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark tr.symbol-edit-popup:hover:not(.group-title){background:#363c4e}}.symbol-edit-popup-active{background:#d1e1f8}html.theme-dark .symbol-edit-popup-active{background:#2f3241}.symbol-edit-popup i.eod,.symbol-edit-popup i.pro{display:inline-block;height:auto;width:auto;font-size:10px;color:#fff;text-transform:uppercase;font-style:normal;line-height:12px;vertical-align:0;padding:1px 3px 0;overflow:visible}.symbol-edit-popup i.eod{background:#c9cbcd}html.theme-dark .symbol-edit-popup i.eod{background:#363c4e}.symbol-edit-popup i.pro{background:#bf645c}.tv-close-mixin{cursor:pointer}.tv-close-mixin:after{content:" ";display:block;position:absolute;width:9px;height:9px;top:6px;right:6px;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAASCAYAAACJgPRIAAAAUElEQVR42pWQMQoAIAwD++d+x8HJbyoOWXJDSSBgwpVS62vtc8ulXg/ZAZkFMycNoBJgXoUcX1cm9N1NSL0esgMyC2ZOGkAlwLwKObhu/qcHp/zWImEdH8EAAAAASUVORK5CYII=)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-close-mixin:hover:after{background-position:bottom}}.symbol-edit-notification{position:relative;padding:15px 20px;background:#ebf7fc;font-size:12px}html.theme-dark .symbol-edit-notification{background:#4c525e}.symbol-edit-notification a{color:#2196f3;transition:color .35s ease}html.theme-dark .symbol-edit-notification a{color:#1976d2}.symbol-edit-notification a:visited{color:#2196f3;fill:#2196f3}html.theme-dark .symbol-edit-notification a:visited{fill:#1976d2;color:#1976d2}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.symbol-edit-notification a:hover{color:#1e88e5;fill:#1e88e5;transition-duration:.06s}}.symbol-edit-notification a:focus{outline:auto}.symbol-edit-notification a:focus:not(:-moz-focusring){outline:none}.symbol-edit-notification a:-moz-focusring{outline:auto}.symbol-edit-notification a:active{color:#1e88e5;fill:#1e88e5;transition-duration:.06s}.symbol-edit-notification .close{display:block;position:absolute;width:21px;height:21px;left:0;top:0;cursor:pointer}.symbol-edit-notification .close:after{content:" ";display:block;position:absolute;width:9px;height:9px;top:6px;right:6px;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAASCAYAAACJgPRIAAAAUElEQVR42pWQMQoAIAwD++d+x8HJbyoOWXJDSSBgwpVS62vtc8ulXg/ZAZkFMycNoBJgXoUcX1cm9N1NSL0esgMyC2ZOGkAlwLwKObhu/qcHp/zWImEdH8EAAAAASUVORK5CYII=)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.symbol-edit-notification .close:hover:after{background-position:bottom}}.symbol-search-dialog .symbol-block{width:auto;margin:0;overflow:hidden}.symbol-search-dialog .symbol-block .spread-actions{height:36px;border-top:none;border-left:none;background:#fff}html.theme-dark .symbol-search-dialog .symbol-block .spread-actions{background:#131722}.symbol-search-dialog .symbol-block .spread-actions:empty{border:none;background:transparent}.symbol-search-dialog .symbol-block button{width:30px;height:36px;border-right:1px solid;border-right-color:#dadde0}html.theme-dark .symbol-search-dialog .symbol-block button{border-right-color:#363c4e}.symbol-search-dialog .symbol-block button:first-child{border-right:none!important}.symbol-search-dialog .symbol-block-inputspacer{overflow:hidden}.symbol-search-dialog .symbol-block-inputspacer input{float:none;width:100%;height:37px;font-size:13px;margin:0;padding:0 34px 0 7px;border-width:0;border-bottom-width:1px;border-radius:0;box-sizing:border-box}.symbol-search-dialog .symbol-block-inputspacer .search-icon{content:" ";display:block;position:absolute;width:13px;height:13px;background:url(1df47f578aeef40dd1f2328338a133be.png) no-repeat -80px -339px;top:12px;right:12px}.symbol-search-dialog .filter{padding:0 20px;border-bottom:1px solid;border-color:#dde1e6}html.theme-dark .symbol-search-dialog .filter{border-color:#363c4e}.symbol-search-dialog .filter .exchange-filter,.symbol-search-dialog .filter .tradable-filter,.symbol-search-dialog .filter a.type-filter{position:relative;display:inline-block;margin-left:18px;padding:10px 0;font-size:13px;line-height:16px;color:#555}html.theme-dark .symbol-search-dialog .filter .exchange-filter,html.theme-dark .symbol-search-dialog .filter .tradable-filter,html.theme-dark .symbol-search-dialog .filter a.type-filter{color:#8b8f95}.symbol-search-dialog .filter .exchange-filter a,.symbol-search-dialog .filter .tradable-filter a,.symbol-search-dialog .filter a.type-filter a{color:#555}html.theme-dark .symbol-search-dialog .filter .exchange-filter a,html.theme-dark .symbol-search-dialog .filter .tradable-filter a,html.theme-dark .symbol-search-dialog .filter a.type-filter a{color:#8b8f95}.symbol-search-dialog .filter .exchange-filter.active,.symbol-search-dialog .filter .tradable-filter.active,.symbol-search-dialog .filter a.type-filter.active{font-weight:700}.symbol-search-dialog .filter .exchange-filter.active:after,.symbol-search-dialog .filter .tradable-filter.active:after,.symbol-search-dialog .filter a.type-filter.active:after{content:" ";display:block;position:absolute;bottom:-1px;width:100%;height:3px;background-color:#5cb888}.symbol-search-dialog .filter .exchange-filter,.symbol-search-dialog .filter .exchange-filter:last-child,.symbol-search-dialog .filter a.type-filter:last-child{margin-left:0}.symbol-search-dialog .filter .tradable-filter{margin:0 10px;padding-bottom:11px;line-height:14px;vertical-align:middle}.symbol-search-dialog .filter .tradable-filter *{vertical-align:middle}.symbol-search-dialog .filter .tradable-filter .tradable-text{padding-right:5px;cursor:default}.symbol-search-dialog .results{width:100%;height:500px;overflow-x:hidden;overflow-y:auto;margin:0}.symbol-search-dialog .results::-webkit-scrollbar{width:5px;height:5px}.symbol-search-dialog .results::-webkit-scrollbar-thumb{border:1px solid;border-color:#f1f3f6;border-radius:3px;background-color:#9598a1}html.theme-dark .symbol-search-dialog .results::-webkit-scrollbar-thumb{background-color:#363a45;border-color:#1e222d}.symbol-search-dialog .results::-webkit-scrollbar-track{background-color:transparent;border-radius:3px}.symbol-search-dialog .results::-webkit-scrollbar-corner{display:none}.symbol-search-dialog .results table{width:100%;border-collapse:collapse}.symbol-search-dialog .results table .symbol-edit-popup-td:first-child{padding-right:20px}.symbol-search-dialog .results table .symbol-edit-popup-td:last-child{padding-left:20px}.symbol-search-dialog .results table tr:first-child .symbol-edit-popup-td{padding-top:12px}.spread-actions{float:left;height:28px;border:1px solid;border-color:#dadde0;background:#fff;margin:0}html.theme-dark .spread-actions{background:#131722;border-color:#363c4e}.spread-actions button{position:relative;float:right;width:20px;height:28px;background:none;padding:0;margin:0;border:none;cursor:pointer}.spread-actions button::-moz-focus-inner{padding:0!important;margin:0!important}.spread-actions button.disabled{cursor:default}.spread-actions button .action-icon{display:block;position:absolute;margin:auto;right:0;top:0;left:0;bottom:0;color:#7d7d7d}html.theme-dark .spread-actions button .action-icon{color:#758696}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.spread-actions button:hover .action-icon{color:#2196f3}}.spread-actions button.disabled .action-icon{color:#a6a6a6}html.theme-dark .spread-actions button.disabled .action-icon{color:#2f3241}.symbol-search-dialog .exchange-filter,div.symbol-edit-popup .exchange-filter{float:left}.exchange-filter .tv-symbol-select>.flag{display:block;position:absolute;top:2px;left:15px}.exchange-filter-overflow{width:90px;text-overflow:ellipsis;overflow:hidden;text-align:left;white-space:nowrap}.flagged-exchange{margin-left:36px}.symbol-search-dialog .exchange-filter .sbSelector{width:90px;text-overflow:ellipsis;overflow:hidden;text-align:left;white-space:nowrap;display:block;width:auto;margin:0 15px 0 12px}.symbol-search-dialog .exchange-filter .sbSelector.exchange-with-flag{margin-left:36px}div.symbol-edit-popup .exchange-filter .sbSelector{width:90px;text-overflow:ellipsis;overflow:hidden;text-align:left;white-space:nowrap;display:block;width:auto;margin:0 15px 0 10px;font-weight:700;font-size:11px;height:13px}div.symbol-edit-popup .exchange-filter .sbSelector.exchange-with-flag{margin-left:36px}.symbol-search-dialog .exchange-filter .sbToggle,div.symbol-edit-popup .exchange-filter .sbToggle{position:absolute;left:1px}.symbol-edit-popup .filter{padding:0 20px;margin:0;width:100%;box-sizing:border-box}.symbol-edit-popup .filter .exchange-filter,.symbol-edit-popup .filter a.type-filter{display:inline-block;position:relative;padding:6px 0;margin-left:18px;font-weight:700;font-size:11px;line-height:14px;border-bottom:none;color:#4a4a4a}html.theme-dark .symbol-edit-popup .filter .exchange-filter,html.theme-dark .symbol-edit-popup .filter a.type-filter{color:#c5cbce}.symbol-edit-popup .filter .exchange-filter a,.symbol-edit-popup .filter a.type-filter a{color:#4a4a4a}html.theme-dark .symbol-edit-popup .filter .exchange-filter a,html.theme-dark .symbol-edit-popup .filter a.type-filter a{color:#c5cbce}.symbol-edit-popup .filter .exchange-filter.active:after,.symbol-edit-popup .filter a.type-filter.active:after{content:" ";display:block;position:absolute;bottom:-1px;width:100%;height:3px;background-color:#5cb888}.symbol-edit-popup .filter .exchange-filter:last-child,.symbol-edit-popup .filter a.type-filter:last-child{margin-left:0}.symbol-edit-popup .filter .exchange-filter{margin:0}.symbol-edit-popup .filter .tradable-filter{margin:0 10px;font-size:11px;line-height:14px;padding:6px 0;display:inline-flex;vertical-align:middle;align-items:center}.symbol-edit-popup .filter .tradable-filter .tradable-text{padding-right:5px;cursor:default;vertical-align:middle}.symbol-search-dialog .tradable-filter,div.symbol-edit-popup .tradable-filter{float:left}.bottom-widgetbar-content.backtesting .button.active,.bottom-widgetbar-content.backtesting .button:active{background:#f2f3f5;color:#4c525e}html.theme-dark .bottom-widgetbar-content.backtesting .button.active,html.theme-dark .bottom-widgetbar-content.backtesting .button:active{color:#f7f8fa;background:#131722}.button.iconed{padding:6px 10px 8px}@media (max-width:550px){div.symbol-edit-popup{width:100vw}div.symbol-edit-popup .filter{padding:0 10px}div.symbol-edit-popup .filter .exchange-filter,div.symbol-edit-popup .filter a.type-filter{margin-right:0;margin-left:10px}div.symbol-edit-popup .table-wrapper{width:100%}table.symbol-edit-popup{width:100%;table-layout:fixed}table.symbol-edit-popup td{padding:5px}table.symbol-edit-popup td:first-child{padding-right:10px}.symbol-edit-popup-td{overflow:hidden;text-overflow:ellipsis;box-sizing:border-box}.symbol-edit-popup-td.name{width:30%}.symbol-edit-popup-td.desc{width:40%}.symbol-edit-popup-td.type{width:30%}} \ No newline at end of file diff --git a/public/charting_library/bundles/87.f1667756b87758e62352.js b/public/charting_library/bundles/87.f1667756b87758e62352.js new file mode 100644 index 00000000..051f1094 --- /dev/null +++ b/public/charting_library/bundles/87.f1667756b87758e62352.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[87],[]]); \ No newline at end of file diff --git a/public/charting_library/bundles/88.3566ae24d07b0a360ea7.js b/public/charting_library/bundles/88.3566ae24d07b0a360ea7.js new file mode 100644 index 00000000..8e229eac --- /dev/null +++ b/public/charting_library/bundles/88.3566ae24d07b0a360ea7.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[88],[]]); \ No newline at end of file diff --git a/public/charting_library/bundles/88.e9a6bec06ee11d2c2d4a.css b/public/charting_library/bundles/88.e9a6bec06ee11d2c2d4a.css new file mode 100644 index 00000000..78806e4b --- /dev/null +++ b/public/charting_library/bundles/88.e9a6bec06ee11d2c2d4a.css @@ -0,0 +1 @@ +.tv-text-input{color:#4a4a4a;margin:0;border:1px solid;border-color:#dadde0;display:inline-block;overflow:hidden;width:100px;height:26px;vertical-align:top;padding:0 5px}html.theme-dark .tv-text-input{border-color:#363c4e;color:#c5cbce}.tv-text-input:focus{border-color:#2196f3}html.theme-dark .tv-text-input:focus{border-color:#1976d2}.tv-text-input.inset{background:#fff}html.theme-dark .tv-text-input.inset{background:#131722}.tv-text-input.ticker{height:25px;width:60px}.tv-text-input.ticker--longer-sign_8{width:72px}.tv-text-input.ticker--evenlonger{width:90px} \ No newline at end of file diff --git a/public/charting_library/bundles/88.e9a6bec06ee11d2c2d4a.rtl.css b/public/charting_library/bundles/88.e9a6bec06ee11d2c2d4a.rtl.css new file mode 100644 index 00000000..72a7a5ed --- /dev/null +++ b/public/charting_library/bundles/88.e9a6bec06ee11d2c2d4a.rtl.css @@ -0,0 +1 @@ +.tv-text-input{color:#4a4a4a;margin:0;border:1px solid;border-color:#dadde0;display:inline-block;overflow:hidden;width:100px;height:26px;vertical-align:top;padding:0 5px;direction:ltr;text-align:right}html.theme-dark .tv-text-input{border-color:#363c4e;color:#c5cbce}.tv-text-input:focus{border-color:#2196f3}html.theme-dark .tv-text-input:focus{border-color:#1976d2}.tv-text-input.inset{background:#fff}html.theme-dark .tv-text-input.inset{background:#131722}.tv-text-input.ticker{height:25px;width:60px}.tv-text-input.ticker--longer-sign_8{width:72px}.tv-text-input.ticker--evenlonger{width:90px} \ No newline at end of file diff --git a/public/charting_library/bundles/89.38c1dbb0153001054e99.js b/public/charting_library/bundles/89.38c1dbb0153001054e99.js new file mode 100644 index 00000000..794a6ed4 --- /dev/null +++ b/public/charting_library/bundles/89.38c1dbb0153001054e99.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[89],[]]); \ No newline at end of file diff --git a/public/charting_library/bundles/89.8f574331c5f7254e658c.css b/public/charting_library/bundles/89.8f574331c5f7254e658c.css new file mode 100644 index 00000000..9732bcd1 --- /dev/null +++ b/public/charting_library/bundles/89.8f574331c5f7254e658c.css @@ -0,0 +1 @@ +.ui-slider{position:relative;text-align:left}.ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default}.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background-position:0 0}.ui-slider-horizontal{height:.8em}.ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-left:-.6em}.ui-slider-horizontal .ui-slider-range{top:0;height:100%}.ui-slider-horizontal .ui-slider-range-min{left:0}.ui-slider-horizontal .ui-slider-range-max{right:0}.ui-slider-vertical{width:.8em;height:100px}.ui-slider-vertical .ui-slider-handle{left:-.3em;margin-left:0;margin-bottom:-.6em}.ui-slider-vertical .ui-slider-range{left:0;width:100%}.ui-slider-vertical .ui-slider-range-min{bottom:0}.ui-slider-vertical .ui-slider-range-max{top:0}.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{position:absolute!important;clip:rect(1px 1px 1px 1px);clip:rect(1px,1px,1px,1px)}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:after{content:".";display:block;height:0;clear:both;visibility:hidden}.ui-helper-clearfix{display:inline-block}* html .ui-helper-clearfix{height:1%}.ui-helper-clearfix{display:block}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:alpha(opacity=0)}.ui-state-disabled{cursor:default!important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-overlay{position:absolute;top:0;left:0;width:100%;height:100%}.ui-widget{font-family:Verdana,Arial,sans-serif;font-size:1.1em}.ui-widget .ui-widget{font-size:1em}.ui-widget button,.ui-widget input,.ui-widget select,.ui-widget textarea{font-family:Verdana,Arial,sans-serif;font-size:1em}.ui-widget-content{border:1px solid #aaa;background:#fff 50% 50% repeat-x;color:#6b6b6d}html.theme-dark .ui-widget-content{color:#2f3241;background:#1e222d 50% 50% repeat-x}.ui-widget-content a{color:#6b6b6d}html.theme-dark .ui-widget-content a{color:#2f3241}.ui-widget-header{border:1px solid;border-color:#c9cbcd;background:#fafafa;color:#6b6b6d}html.theme-dark .ui-widget-header{color:#2f3241;background:#2f3241;border-color:#2f3241}.ui-widget-header a{color:#6b6b6d}html.theme-dark .ui-widget-header a{color:#2f3241}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default{border:1px solid #d3d3d3;background:#fafafa;font-weight:400;color:#555}html.theme-dark .ui-state-default,html.theme-dark .ui-widget-content .ui-state-default,html.theme-dark .ui-widget-header .ui-state-default{color:#8b8f95}.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited{color:#555;text-decoration:none}html.theme-dark .ui-state-default a,html.theme-dark .ui-state-default a:link,html.theme-dark .ui-state-default a:visited{color:#8b8f95}.ui-state-focus,.ui-state-hover,.ui-widget-content .ui-state-focus,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-focus,.ui-widget-header .ui-state-hover{border:1px solid #999;background:#dadada;font-weight:400;color:#212121}.ui-state-hover a{color:#212121;text-decoration:none}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.ui-state-hover a:hover{color:#212121;text-decoration:none}}.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active{border:1px solid #aaa;background:#fff 50% 50% repeat-x;font-weight:400;color:#212121}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#212121;text-decoration:none}.ui-widget :active{outline:none}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #fde763;background:#fff8cf;color:#363636}.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#363636}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #cd0a0a;background:#fef1ec 50% 50% repeat-x;color:#cd0a0a}.ui-state-error-text,.ui-state-error a,.ui-widget-content .ui-state-error-text,.ui-widget-content .ui-state-error a,.ui-widget-header .ui-state-error-text,.ui-widget-header .ui-state-error a{color:#cd0a0a}.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:700}.ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.7;filter:alpha(opacity=70);font-weight:400}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.35;filter:alpha(opacity=35);background-image:none}.ui-widget-overlay,.ui-widget-shadow{background:#aaa 50% 50% repeat-x;opacity:.3;filter:alpha(opacity=30)}.ui-widget-shadow{margin:-8px 0 0 -8px;padding:8px;border-radius:8px}.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:.1px;z-index:99999;display:block}.ui-resizable-autohide .ui-resizable-handle,.ui-resizable-disabled .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%}.ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px}.ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px}.ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px}.ui-selectable-helper{position:absolute;z-index:100;border:1px dotted #000}.ui-autocomplete{position:absolute;cursor:default}* html .ui-autocomplete{width:1px}.ui-menu{list-style:none;padding:2px;margin:0;display:block;float:left}.ui-menu .ui-menu{margin-top:-3px}.ui-menu .ui-menu-item{margin:0;padding:0;zoom:1;float:left;clear:left;width:100%}.ui-menu .ui-menu-item a{text-decoration:none;display:block;padding:.2em .4em;line-height:1.5;zoom:1}.ui-menu .ui-menu-item a.ui-state-active,.ui-menu .ui-menu-item a.ui-state-hover{font-weight:400;margin:-1px}.ui-button{display:inline-block;position:relative;padding:0;margin-right:.1em;text-decoration:none!important;cursor:pointer;text-align:center;zoom:1;overflow:visible}.ui-button-icon-only{width:2.2em}button.ui-button-icon-only{width:2.4em}.ui-button-icons-only{width:3.4em}button.ui-button-icons-only{width:3.7em}.ui-button .ui-button-text{display:block;line-height:1.4}.ui-button-text-only .ui-button-text{padding:.4em 1em}.ui-button-icon-only .ui-button-text,.ui-button-icons-only .ui-button-text{padding:.4em;text-indent:-9999999px}.ui-button-text-icon-primary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 1em .4em 2.1em}.ui-button-text-icon-secondary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 2.1em .4em 1em}.ui-button-text-icons .ui-button-text{padding-left:2.1em;padding-right:2.1em}input.ui-button{padding:.4em 1em}.ui-button-icon-only .ui-icon,.ui-button-icons-only .ui-icon,.ui-button-text-icon-primary .ui-icon,.ui-button-text-icon-secondary .ui-icon,.ui-button-text-icons .ui-icon{position:absolute;top:50%;margin-top:-8px}.ui-button-icon-only .ui-icon{left:50%;margin-left:-8px}.ui-button-icons-only .ui-button-icon-primary,.ui-button-text-icon-primary .ui-button-icon-primary,.ui-button-text-icons .ui-button-icon-primary{left:.5em}.ui-button-icons-only .ui-button-icon-secondary,.ui-button-text-icon-secondary .ui-button-icon-secondary,.ui-button-text-icons .ui-button-icon-secondary{right:.5em}.ui-buttonset{margin-right:7px}.ui-buttonset .ui-button{margin-left:0;margin-right:-.3em}button.ui-button::-moz-focus-inner{border:0;padding:0}.ui-tabs .ui-tabs-nav{margin:0;padding:.2em .2em 0}.ui-tabs .ui-tabs-nav li{list-style:none;float:left;position:relative;top:1px;margin:0 .2em 1px 0;border-bottom:0!important;padding:0;white-space:nowrap}.ui-tabs .ui-tabs-nav li a{float:left;padding:.5em 1em;text-decoration:none}.ui-tabs .ui-tabs-nav li.ui-tabs-selected{margin-bottom:0;padding-bottom:1px}.ui-tabs .ui-tabs-nav li.ui-state-disabled a,.ui-tabs .ui-tabs-nav li.ui-state-processing a,.ui-tabs .ui-tabs-nav li.ui-tabs-selected a{cursor:text}.ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a,.ui-tabs .ui-tabs-nav li a{cursor:pointer}.ui-tabs .ui-tabs-panel{display:block;border-width:0;margin:5px 0;background:none}.ui-tabs .ui-tabs-hide{position:absolute;left:-10000px}.ui-datepicker{padding:0;border:none;display:none}.ui-datepicker .ui-datepicker-header{position:relative;height:53px;line-height:53px;border:none;padding:0;background-color:#2196f3;color:#fff}html.theme-dark .ui-datepicker .ui-datepicker-header{color:#c5cbce;background-color:#21384d}.ui-datepicker .ui-datepicker-header .ui-datepicker-next,.ui-datepicker .ui-datepicker-header .ui-datepicker-prev{opacity:.8;position:absolute;top:0;width:40px;height:100%;background:none;border:none;cursor:pointer}.ui-datepicker .ui-datepicker-header .ui-datepicker-next.ui-state-disabled,.ui-datepicker .ui-datepicker-header .ui-datepicker-prev.ui-state-disabled{opacity:.4}.ui-datepicker .ui-datepicker-header .ui-datepicker-next-hover:not(.ui-state-disabled),.ui-datepicker .ui-datepicker-header .ui-datepicker-prev-hover:not(.ui-state-disabled){opacity:1;background:none;border:none}.ui-datepicker .ui-datepicker-header .ui-datepicker-next{right:0}.ui-datepicker .ui-datepicker-header .ui-datepicker-next span{margin-left:-5px;width:9px;height:14px;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 14' width='9' height='14' fill='%23fff'%3E%3Cpath d='m2 0l-2 2 5 5-5 5 2 2 7-7z'/%3E%3C/svg%3E")}.ui-datepicker .ui-datepicker-header .ui-datepicker-prev{left:0}.ui-datepicker .ui-datepicker-header .ui-datepicker-prev span{margin-left:-4px;width:9px;height:14px;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 14' width='9' height='14' fill='%23fff'%3E%3Cpath d='m0 7l7-7 2 2-5 5 5 5-2 2z'/%3E%3C/svg%3E")}.ui-datepicker .ui-datepicker-next span,.ui-datepicker .ui-datepicker-prev span{display:block;position:absolute;left:50%;margin-left:-8px;top:50%;margin-top:-8px}.ui-datepicker .ui-datepicker-title{margin:0;text-align:center}.ui-datepicker .ui-datepicker-title select{font-size:1em}.ui-datepicker select.ui-datepicker-month-year{width:100%}.ui-datepicker select.ui-datepicker-month,.ui-datepicker select.ui-datepicker-year{width:49%}.ui-datepicker table{width:100%;font-size:12px;border-collapse:collapse;margin:0;border:1px solid;border-color:#d6d6d6;border-top:none}html.theme-dark .ui-datepicker table{border-color:#363c4e}.ui-datepicker th{width:40px;height:28px;border-bottom:1px solid red;padding:0;border:none;border-bottom:1px solid;border-bottom-color:#d6d6d6;text-align:center;font-weight:400;color:#8d9196;background-color:#f8f8f8}html.theme-dark .ui-datepicker th{background-color:#2f3241;border-bottom-color:#363c4e}.ui-datepicker td{border:none;padding:0;margin:0}.ui-datepicker td a,.ui-datepicker td a.ui-state-default,.ui-datepicker td span,.ui-datepicker td span.ui-state-default{display:block;position:relative;height:39px;padding:0;margin:0;text-align:center;line-height:40px;background:#fff;border:none;border-width:0 1px 1px 0;border-style:solid;border-color:#d6d6d6;text-decoration:none}html.theme-dark .ui-datepicker td a,html.theme-dark .ui-datepicker td a.ui-state-default,html.theme-dark .ui-datepicker td span,html.theme-dark .ui-datepicker td span.ui-state-default{border-color:#363c4e;background:#1e222d}.ui-datepicker td a.ui-state-default.ui-state-highlight,.ui-datepicker td a.ui-state-highlight,.ui-datepicker td span.ui-state-default.ui-state-highlight,.ui-datepicker td span.ui-state-highlight{color:#00b9db}.ui-datepicker td a.ui-state-default.ui-state-highlight:after,.ui-datepicker td a.ui-state-highlight:after,.ui-datepicker td span.ui-state-default.ui-state-highlight:after,.ui-datepicker td span.ui-state-highlight:after{position:absolute;top:0;right:0;content:" ";width:0;height:0;border-style:solid;border-width:0 11px 11px 0;border-color:transparent #00badb transparent transparent}.ui-datepicker td a.ui-state-default.ui-state-hover,.ui-datepicker td a.ui-state-hover,.ui-datepicker td span.ui-state-default.ui-state-hover,.ui-datepicker td span.ui-state-hover{background:#edf1f2}html.theme-dark .ui-datepicker td a.ui-state-default.ui-state-hover,html.theme-dark .ui-datepicker td a.ui-state-hover,html.theme-dark .ui-datepicker td span.ui-state-default.ui-state-hover,html.theme-dark .ui-datepicker td span.ui-state-hover{background:#262b3e}.ui-datepicker td.ui-datepicker-current-day a,.ui-datepicker td.ui-datepicker-current-day span{border:2px solid;border-color:#2196f3;color:#2196f3;height:36px;line-height:37px}html.theme-dark .ui-datepicker td.ui-datepicker-current-day a,html.theme-dark .ui-datepicker td.ui-datepicker-current-day span{color:#1976d2;border-color:#1976d2}.ui-datepicker .ui-datepicker-buttonpane{background-image:none;margin:.7em 0 0;padding:0 .2em;border-left:0;border-right:0;border-bottom:0}.ui-datepicker .ui-datepicker-buttonpane button{float:right;margin:.5em .2em .4em;cursor:pointer;padding:.2em .6em .3em;width:auto;overflow:visible}.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current{float:left}.ui-datepicker.ui-datepicker-multi{width:auto}.ui-datepicker-multi .ui-datepicker-group{float:left}.ui-datepicker-multi .ui-datepicker-group table{width:95%;margin:0 auto .4em}.ui-datepicker-multi-2 .ui-datepicker-group{width:50%}.ui-datepicker-multi-3 .ui-datepicker-group{width:33.3%}.ui-datepicker-multi-4 .ui-datepicker-group{width:25%}.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header{border-left-width:0}.ui-datepicker-multi .ui-datepicker-buttonpane{clear:left}.ui-datepicker-row-break{clear:both;width:100%} \ No newline at end of file diff --git a/public/charting_library/bundles/89.8f574331c5f7254e658c.rtl.css b/public/charting_library/bundles/89.8f574331c5f7254e658c.rtl.css new file mode 100644 index 00000000..6453275a --- /dev/null +++ b/public/charting_library/bundles/89.8f574331c5f7254e658c.rtl.css @@ -0,0 +1 @@ +.ui-slider{position:relative;text-align:right}.ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default}.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background-position:100% 0}.ui-slider-horizontal{height:.8em}.ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-right:-.6em}.ui-slider-horizontal .ui-slider-range{top:0;height:100%}.ui-slider-horizontal .ui-slider-range-min{right:0}.ui-slider-horizontal .ui-slider-range-max{left:0}.ui-slider-vertical{width:.8em;height:100px}.ui-slider-vertical .ui-slider-handle{right:-.3em;margin-right:0;margin-bottom:-.6em}.ui-slider-vertical .ui-slider-range{right:0;width:100%}.ui-slider-vertical .ui-slider-range-min{bottom:0}.ui-slider-vertical .ui-slider-range-max{top:0}.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{position:absolute!important;clip:rect(1px 1px 1px 1px);clip:rect(1px,1px,1px,1px)}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:after{content:".";display:block;height:0;clear:both;visibility:hidden}.ui-helper-clearfix{display:inline-block}* html .ui-helper-clearfix{height:1%}.ui-helper-clearfix{display:block}.ui-helper-zfix{width:100%;height:100%;top:0;right:0;position:absolute;opacity:0;filter:alpha(opacity=0)}.ui-state-disabled{cursor:default!important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-overlay{position:absolute;top:0;right:0;width:100%;height:100%}.ui-widget{font-family:Verdana,Arial,sans-serif;font-size:1.1em}.ui-widget .ui-widget{font-size:1em}.ui-widget button,.ui-widget input,.ui-widget select,.ui-widget textarea{font-family:Verdana,Arial,sans-serif;font-size:1em}.ui-widget-content{border:1px solid #aaa;background:#fff 50% 50% repeat-x;color:#6b6b6d}html.theme-dark .ui-widget-content{color:#2f3241;background:#1e222d 50% 50% repeat-x}.ui-widget-content a{color:#6b6b6d}html.theme-dark .ui-widget-content a{color:#2f3241}.ui-widget-header{border:1px solid;border-color:#c9cbcd;background:#fafafa;color:#6b6b6d}html.theme-dark .ui-widget-header{color:#2f3241;background:#2f3241;border-color:#2f3241}.ui-widget-header a{color:#6b6b6d}html.theme-dark .ui-widget-header a{color:#2f3241}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default{border:1px solid #d3d3d3;background:#fafafa;font-weight:400;color:#555}html.theme-dark .ui-state-default,html.theme-dark .ui-widget-content .ui-state-default,html.theme-dark .ui-widget-header .ui-state-default{color:#8b8f95}.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited{color:#555;text-decoration:none}html.theme-dark .ui-state-default a,html.theme-dark .ui-state-default a:link,html.theme-dark .ui-state-default a:visited{color:#8b8f95}.ui-state-focus,.ui-state-hover,.ui-widget-content .ui-state-focus,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-focus,.ui-widget-header .ui-state-hover{border:1px solid #999;background:#dadada;font-weight:400;color:#212121}.ui-state-hover a{color:#212121;text-decoration:none}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.ui-state-hover a:hover{color:#212121;text-decoration:none}}.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active{border:1px solid #aaa;background:#fff 50% 50% repeat-x;font-weight:400;color:#212121}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#212121;text-decoration:none}.ui-widget :active{outline:none}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #fde763;background:#fff8cf;color:#363636}.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#363636}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #cd0a0a;background:#fef1ec 50% 50% repeat-x;color:#cd0a0a}.ui-state-error-text,.ui-state-error a,.ui-widget-content .ui-state-error-text,.ui-widget-content .ui-state-error a,.ui-widget-header .ui-state-error-text,.ui-widget-header .ui-state-error a{color:#cd0a0a}.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:700}.ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.7;filter:alpha(opacity=70);font-weight:400}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.35;filter:alpha(opacity=35);background-image:none}.ui-widget-overlay,.ui-widget-shadow{background:#aaa 50% 50% repeat-x;opacity:.3;filter:alpha(opacity=30)}.ui-widget-shadow{margin:-8px -8px 0 0;padding:8px;border-radius:8px}.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:.1px;z-index:99999;display:block}.ui-resizable-autohide .ui-resizable-handle,.ui-resizable-disabled .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;right:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;right:0}.ui-resizable-e{cursor:e-resize;width:7px;left:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-se{cursor:sw-resize;width:12px;height:12px;left:1px;bottom:1px}.ui-resizable-sw{cursor:se-resize;width:9px;height:9px;right:-5px;bottom:-5px}.ui-resizable-nw{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px}.ui-resizable-ne{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px}.ui-selectable-helper{position:absolute;z-index:100;border:1px dotted #000}.ui-autocomplete{position:absolute;cursor:default}* html .ui-autocomplete{width:1px}.ui-menu{list-style:none;padding:2px;margin:0;display:block;float:right}.ui-menu .ui-menu{margin-top:-3px}.ui-menu .ui-menu-item{margin:0;padding:0;zoom:1;float:right;clear:right;width:100%}.ui-menu .ui-menu-item a{text-decoration:none;display:block;padding:.2em .4em;line-height:1.5;zoom:1}.ui-menu .ui-menu-item a.ui-state-active,.ui-menu .ui-menu-item a.ui-state-hover{font-weight:400;margin:-1px}.ui-button{display:inline-block;position:relative;padding:0;margin-left:.1em;text-decoration:none!important;cursor:pointer;text-align:center;zoom:1;overflow:visible}.ui-button-icon-only{width:2.2em}button.ui-button-icon-only{width:2.4em}.ui-button-icons-only{width:3.4em}button.ui-button-icons-only{width:3.7em}.ui-button .ui-button-text{display:block;line-height:1.4}.ui-button-text-only .ui-button-text{padding:.4em 1em}.ui-button-icon-only .ui-button-text,.ui-button-icons-only .ui-button-text{padding:.4em;text-indent:-9999999px}.ui-button-text-icon-primary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 2.1em .4em 1em}.ui-button-text-icon-secondary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 1em .4em 2.1em}.ui-button-text-icons .ui-button-text{padding-right:2.1em;padding-left:2.1em}input.ui-button{padding:.4em 1em}.ui-button-icon-only .ui-icon,.ui-button-icons-only .ui-icon,.ui-button-text-icon-primary .ui-icon,.ui-button-text-icon-secondary .ui-icon,.ui-button-text-icons .ui-icon{position:absolute;top:50%;margin-top:-8px}.ui-button-icon-only .ui-icon{right:50%;margin-right:-8px}.ui-button-icons-only .ui-button-icon-primary,.ui-button-text-icon-primary .ui-button-icon-primary,.ui-button-text-icons .ui-button-icon-primary{right:.5em}.ui-button-icons-only .ui-button-icon-secondary,.ui-button-text-icon-secondary .ui-button-icon-secondary,.ui-button-text-icons .ui-button-icon-secondary{left:.5em}.ui-buttonset{margin-left:7px}.ui-buttonset .ui-button{margin-right:0;margin-left:-.3em}button.ui-button::-moz-focus-inner{border:0;padding:0}.ui-tabs .ui-tabs-nav{margin:0;padding:.2em .2em 0}.ui-tabs .ui-tabs-nav li{list-style:none;float:right;position:relative;top:1px;margin:0 0 1px .2em;border-bottom:0!important;padding:0;white-space:nowrap}.ui-tabs .ui-tabs-nav li a{float:right;padding:.5em 1em;text-decoration:none}.ui-tabs .ui-tabs-nav li.ui-tabs-selected{margin-bottom:0;padding-bottom:1px}.ui-tabs .ui-tabs-nav li.ui-state-disabled a,.ui-tabs .ui-tabs-nav li.ui-state-processing a,.ui-tabs .ui-tabs-nav li.ui-tabs-selected a{cursor:text}.ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a,.ui-tabs .ui-tabs-nav li a{cursor:pointer}.ui-tabs .ui-tabs-panel{display:block;border-width:0;margin:5px 0;background:none}.ui-tabs .ui-tabs-hide{position:absolute;right:-10000px}.ui-datepicker{padding:0;border:none;display:none}.ui-datepicker .ui-datepicker-header{position:relative;height:53px;line-height:53px;border:none;padding:0;background-color:#2196f3;color:#fff}html.theme-dark .ui-datepicker .ui-datepicker-header{color:#c5cbce;background-color:#21384d}.ui-datepicker .ui-datepicker-header .ui-datepicker-next,.ui-datepicker .ui-datepicker-header .ui-datepicker-prev{opacity:.8;position:absolute;top:0;width:40px;height:100%;background:none;border:none;cursor:pointer}.ui-datepicker .ui-datepicker-header .ui-datepicker-next.ui-state-disabled,.ui-datepicker .ui-datepicker-header .ui-datepicker-prev.ui-state-disabled{opacity:.4}.ui-datepicker .ui-datepicker-header .ui-datepicker-next-hover:not(.ui-state-disabled),.ui-datepicker .ui-datepicker-header .ui-datepicker-prev-hover:not(.ui-state-disabled){opacity:1;background:none;border:none}.ui-datepicker .ui-datepicker-header .ui-datepicker-next{right:0}.ui-datepicker .ui-datepicker-header .ui-datepicker-next span{margin-right:-5px;width:9px;height:14px;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 14' width='9' height='14' fill='%23fff'%3E%3Cpath d='m2 0l-2 2 5 5-5 5 2 2 7-7z'/%3E%3C/svg%3E")}.ui-datepicker .ui-datepicker-header .ui-datepicker-prev{left:0}.ui-datepicker .ui-datepicker-header .ui-datepicker-prev span{margin-right:-4px;width:9px;height:14px;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 14' width='9' height='14' fill='%23fff'%3E%3Cpath d='m0 7l7-7 2 2-5 5 5 5-2 2z'/%3E%3C/svg%3E")}.ui-datepicker .ui-datepicker-next span,.ui-datepicker .ui-datepicker-prev span{display:block;position:absolute;right:50%;margin-right:-8px;top:50%;margin-top:-8px}.ui-datepicker .ui-datepicker-title{margin:0;text-align:center}.ui-datepicker .ui-datepicker-title select{font-size:1em}.ui-datepicker select.ui-datepicker-month-year{width:100%}.ui-datepicker select.ui-datepicker-month,.ui-datepicker select.ui-datepicker-year{width:49%}.ui-datepicker table{width:100%;font-size:12px;border-collapse:collapse;margin:0;border:1px solid;border-color:#d6d6d6;border-top:none}html.theme-dark .ui-datepicker table{border-color:#363c4e}.ui-datepicker th{width:40px;height:28px;border-bottom:1px solid red;padding:0;border:none;border-bottom:1px solid;border-bottom-color:#d6d6d6;text-align:center;font-weight:400;color:#8d9196;background-color:#f8f8f8}html.theme-dark .ui-datepicker th{background-color:#2f3241;border-bottom-color:#363c4e}.ui-datepicker td{border:none;padding:0;margin:0}.ui-datepicker td a,.ui-datepicker td a.ui-state-default,.ui-datepicker td span,.ui-datepicker td span.ui-state-default{display:block;position:relative;height:39px;padding:0;margin:0;text-align:center;line-height:40px;background:#fff;border:none;border-width:0 0 1px 1px;border-style:solid;border-color:#d6d6d6;text-decoration:none}html.theme-dark .ui-datepicker td a,html.theme-dark .ui-datepicker td a.ui-state-default,html.theme-dark .ui-datepicker td span,html.theme-dark .ui-datepicker td span.ui-state-default{border-color:#363c4e;background:#1e222d}.ui-datepicker td a.ui-state-default.ui-state-highlight,.ui-datepicker td a.ui-state-highlight,.ui-datepicker td span.ui-state-default.ui-state-highlight,.ui-datepicker td span.ui-state-highlight{color:#00b9db}.ui-datepicker td a.ui-state-default.ui-state-highlight:after,.ui-datepicker td a.ui-state-highlight:after,.ui-datepicker td span.ui-state-default.ui-state-highlight:after,.ui-datepicker td span.ui-state-highlight:after{position:absolute;top:0;left:0;content:" ";width:0;height:0;border-style:solid;border-width:0 0 11px 11px;border-color:transparent transparent transparent #00badb}.ui-datepicker td a.ui-state-default.ui-state-hover,.ui-datepicker td a.ui-state-hover,.ui-datepicker td span.ui-state-default.ui-state-hover,.ui-datepicker td span.ui-state-hover{background:#edf1f2}html.theme-dark .ui-datepicker td a.ui-state-default.ui-state-hover,html.theme-dark .ui-datepicker td a.ui-state-hover,html.theme-dark .ui-datepicker td span.ui-state-default.ui-state-hover,html.theme-dark .ui-datepicker td span.ui-state-hover{background:#262b3e}.ui-datepicker td.ui-datepicker-current-day a,.ui-datepicker td.ui-datepicker-current-day span{border:2px solid;border-color:#2196f3;color:#2196f3;height:36px;line-height:37px}html.theme-dark .ui-datepicker td.ui-datepicker-current-day a,html.theme-dark .ui-datepicker td.ui-datepicker-current-day span{color:#1976d2;border-color:#1976d2}.ui-datepicker .ui-datepicker-buttonpane{background-image:none;margin:.7em 0 0;padding:0 .2em;border-right:0;border-left:0;border-bottom:0}.ui-datepicker .ui-datepicker-buttonpane button{float:left;margin:.5em .2em .4em;cursor:pointer;padding:.2em .6em .3em;width:auto;overflow:visible}.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current{float:right}.ui-datepicker.ui-datepicker-multi{width:auto}.ui-datepicker-multi .ui-datepicker-group{float:right}.ui-datepicker-multi .ui-datepicker-group table{width:95%;margin:0 auto .4em}.ui-datepicker-multi-2 .ui-datepicker-group{width:50%}.ui-datepicker-multi-3 .ui-datepicker-group{width:33.3%}.ui-datepicker-multi-4 .ui-datepicker-group{width:25%}.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header{border-right-width:0}.ui-datepicker-multi .ui-datepicker-buttonpane{clear:right}.ui-datepicker-row-break{clear:both;width:100%} \ No newline at end of file diff --git a/public/charting_library/bundles/898929f1acdb622689e0fc0c95c8fcd0.png b/public/charting_library/bundles/898929f1acdb622689e0fc0c95c8fcd0.png new file mode 100644 index 00000000..f12b96fd Binary files /dev/null and b/public/charting_library/bundles/898929f1acdb622689e0fc0c95c8fcd0.png differ diff --git a/public/charting_library/bundles/9.c893b34fedaa1aaead69.js b/public/charting_library/bundles/9.c893b34fedaa1aaead69.js new file mode 100644 index 00000000..ec800d5d --- /dev/null +++ b/public/charting_library/bundles/9.c893b34fedaa1aaead69.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[9],[]]); \ No newline at end of file diff --git a/public/charting_library/bundles/9.efabbd82e0d48b89b9ab.css b/public/charting_library/bundles/9.efabbd82e0d48b89b9ab.css new file mode 100644 index 00000000..f555b27c --- /dev/null +++ b/public/charting_library/bundles/9.efabbd82e0d48b89b9ab.css @@ -0,0 +1 @@ +.item-2xPVYue0{display:flex;flex-flow:row nowrap;align-items:center;white-space:nowrap;padding:2px 10px 2px 8px;font-size:14px;background-color:#fff;cursor:default;transition-property:none;color:#131722}html.theme-dark .item-2xPVYue0{color:#b2b5be;background-color:#1e222d}.item-2xPVYue0.hovered-1uf45E05,.item-2xPVYue0:active{color:#000}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.item-2xPVYue0:hover{color:#000}}html.theme-dark .item-2xPVYue0.hovered-1uf45E05,html.theme-dark .item-2xPVYue0:active{color:#c1c4cd}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .item-2xPVYue0:hover{color:#c1c4cd}}.item-2xPVYue0.hovered-1uf45E05,.item-2xPVYue0:active{background-color:#f0f3fa}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.item-2xPVYue0:hover{background-color:#f0f3fa}}html.theme-dark .item-2xPVYue0.hovered-1uf45E05,html.theme-dark .item-2xPVYue0:active{background-color:#2a2e39}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .item-2xPVYue0:hover{background-color:#2a2e39}}.item-2xPVYue0.isDisabled-1wLqKupj{opacity:.3;cursor:default}.item-2xPVYue0.isDisabled-1wLqKupj,.item-2xPVYue0.isDisabled-1wLqKupj:active{color:#131722;background-color:#fff}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.item-2xPVYue0.isDisabled-1wLqKupj:hover{color:#131722;background-color:#fff}}html.theme-dark .item-2xPVYue0.isDisabled-1wLqKupj,html.theme-dark .item-2xPVYue0.isDisabled-1wLqKupj:active{background-color:#1e222d}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .item-2xPVYue0.isDisabled-1wLqKupj:hover{background-color:#1e222d}}html.theme-dark .item-2xPVYue0.isDisabled-1wLqKupj,html.theme-dark .item-2xPVYue0.isDisabled-1wLqKupj:active{color:#b2b5be}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .item-2xPVYue0.isDisabled-1wLqKupj:hover{color:#b2b5be}}.item-2xPVYue0.isActive-2j-GhQs_,.item-2xPVYue0.isActive-2j-GhQs_:active{color:#fff;background-color:#2196f3}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.item-2xPVYue0.isActive-2j-GhQs_:hover{color:#fff;background-color:#2196f3}}html.theme-dark .item-2xPVYue0.isActive-2j-GhQs_,html.theme-dark .item-2xPVYue0.isActive-2j-GhQs_:active{background-color:#1976d2}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .item-2xPVYue0.isActive-2j-GhQs_:hover{background-color:#1976d2}}html.theme-dark .item-2xPVYue0.isActive-2j-GhQs_,html.theme-dark .item-2xPVYue0.isActive-2j-GhQs_:active{color:#d1d4dc}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .item-2xPVYue0.isActive-2j-GhQs_:hover{color:#d1d4dc}}.item-2xPVYue0.isActive-2j-GhQs_ .shortcut-30pveiCO,.item-2xPVYue0.isActive-2j-GhQs_:active .shortcut-30pveiCO{color:hsla(0,0%,100%,.7)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.item-2xPVYue0.isActive-2j-GhQs_:hover .shortcut-30pveiCO{color:hsla(0,0%,100%,.7)}}html.theme-dark .item-2xPVYue0.isActive-2j-GhQs_ .shortcut-30pveiCO,html.theme-dark .item-2xPVYue0.isActive-2j-GhQs_:active .shortcut-30pveiCO{color:rgba(19,23,34,.7)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .item-2xPVYue0.isActive-2j-GhQs_:hover .shortcut-30pveiCO{color:rgba(19,23,34,.7)}}.item-2xPVYue0.isActive-2j-GhQs_ .toolbox-3ulPxfe-,.item-2xPVYue0.isActive-2j-GhQs_:active .toolbox-3ulPxfe-{color:#fff}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.item-2xPVYue0.isActive-2j-GhQs_:hover .toolbox-3ulPxfe-{color:#fff}}html.theme-dark .item-2xPVYue0.isActive-2j-GhQs_ .toolbox-3ulPxfe-,html.theme-dark .item-2xPVYue0.isActive-2j-GhQs_:active .toolbox-3ulPxfe-{color:#fff}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .item-2xPVYue0.isActive-2j-GhQs_:hover .toolbox-3ulPxfe-{color:#fff}}.item-2xPVYue0.withIcon-1xBjf-oB{padding-top:6px;padding-bottom:6px}.item-2xPVYue0:before{content:" ";display:block;height:28px}.icon-2Qm7YIcz{display:flex;margin-right:6px;align-items:center;justify-content:center;width:28px;height:28px}.icon-2Qm7YIcz svg{display:block}.labelRow-3Q0rdE8-{display:flex;flex-direction:row;align-items:baseline;justify-content:space-between;flex:0 1 100%;min-width:0;max-width:100%;box-sizing:border-box;padding-right:12px}.labelRow-3Q0rdE8-:first-child{padding-left:4px}.labelRow-3Q0rdE8-:last-child{padding-right:4px}.label-3Xqxy756{display:flex;flex:0 0 auto;max-width:100%;overflow:hidden}.shortcut-30pveiCO{font-size:11px;margin-right:14px;min-width:27px;color:#9598a1}html.theme-dark .shortcut-30pveiCO{color:#5d606b}.toolbox-3ulPxfe-{display:flex;position:relative;align-items:center;color:#9db2bd}html.theme-dark .toolbox-3ulPxfe-{color:#9db2bd}.feature-no-touch .toolbox-3ulPxfe-.showOnHover-1q6ySzZc{opacity:0}.toolbox-3ulPxfe->:not(:last-child){margin-right:4px}@media screen and (max-width:419px){.toolbox-3ulPxfe->:not(:last-child){margin-right:8px}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.feature-no-touch .item-2xPVYue0:hover .toolbox-3ulPxfe-.showOnHover-1q6ySzZc{opacity:1}} \ No newline at end of file diff --git a/public/charting_library/bundles/9.efabbd82e0d48b89b9ab.rtl.css b/public/charting_library/bundles/9.efabbd82e0d48b89b9ab.rtl.css new file mode 100644 index 00000000..c7c64418 --- /dev/null +++ b/public/charting_library/bundles/9.efabbd82e0d48b89b9ab.rtl.css @@ -0,0 +1 @@ +.item-2xPVYue0{display:flex;flex-flow:row nowrap;align-items:center;white-space:nowrap;padding:2px 8px 2px 10px;font-size:14px;background-color:#fff;cursor:default;transition-property:none;color:#131722}html.theme-dark .item-2xPVYue0{color:#b2b5be;background-color:#1e222d}.item-2xPVYue0.hovered-1uf45E05,.item-2xPVYue0:active{color:#000}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.item-2xPVYue0:hover{color:#000}}html.theme-dark .item-2xPVYue0.hovered-1uf45E05,html.theme-dark .item-2xPVYue0:active{color:#c1c4cd}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .item-2xPVYue0:hover{color:#c1c4cd}}.item-2xPVYue0.hovered-1uf45E05,.item-2xPVYue0:active{background-color:#f0f3fa}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.item-2xPVYue0:hover{background-color:#f0f3fa}}html.theme-dark .item-2xPVYue0.hovered-1uf45E05,html.theme-dark .item-2xPVYue0:active{background-color:#2a2e39}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .item-2xPVYue0:hover{background-color:#2a2e39}}.item-2xPVYue0.isDisabled-1wLqKupj{opacity:.3;cursor:default}.item-2xPVYue0.isDisabled-1wLqKupj,.item-2xPVYue0.isDisabled-1wLqKupj:active{color:#131722;background-color:#fff}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.item-2xPVYue0.isDisabled-1wLqKupj:hover{color:#131722;background-color:#fff}}html.theme-dark .item-2xPVYue0.isDisabled-1wLqKupj,html.theme-dark .item-2xPVYue0.isDisabled-1wLqKupj:active{background-color:#1e222d}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .item-2xPVYue0.isDisabled-1wLqKupj:hover{background-color:#1e222d}}html.theme-dark .item-2xPVYue0.isDisabled-1wLqKupj,html.theme-dark .item-2xPVYue0.isDisabled-1wLqKupj:active{color:#b2b5be}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .item-2xPVYue0.isDisabled-1wLqKupj:hover{color:#b2b5be}}.item-2xPVYue0.isActive-2j-GhQs_,.item-2xPVYue0.isActive-2j-GhQs_:active{color:#fff;background-color:#2196f3}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.item-2xPVYue0.isActive-2j-GhQs_:hover{color:#fff;background-color:#2196f3}}html.theme-dark .item-2xPVYue0.isActive-2j-GhQs_,html.theme-dark .item-2xPVYue0.isActive-2j-GhQs_:active{background-color:#1976d2}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .item-2xPVYue0.isActive-2j-GhQs_:hover{background-color:#1976d2}}html.theme-dark .item-2xPVYue0.isActive-2j-GhQs_,html.theme-dark .item-2xPVYue0.isActive-2j-GhQs_:active{color:#d1d4dc}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .item-2xPVYue0.isActive-2j-GhQs_:hover{color:#d1d4dc}}.item-2xPVYue0.isActive-2j-GhQs_ .shortcut-30pveiCO,.item-2xPVYue0.isActive-2j-GhQs_:active .shortcut-30pveiCO{color:hsla(0,0%,100%,.7)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.item-2xPVYue0.isActive-2j-GhQs_:hover .shortcut-30pveiCO{color:hsla(0,0%,100%,.7)}}html.theme-dark .item-2xPVYue0.isActive-2j-GhQs_ .shortcut-30pveiCO,html.theme-dark .item-2xPVYue0.isActive-2j-GhQs_:active .shortcut-30pveiCO{color:rgba(19,23,34,.7)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .item-2xPVYue0.isActive-2j-GhQs_:hover .shortcut-30pveiCO{color:rgba(19,23,34,.7)}}.item-2xPVYue0.isActive-2j-GhQs_ .toolbox-3ulPxfe-,.item-2xPVYue0.isActive-2j-GhQs_:active .toolbox-3ulPxfe-{color:#fff}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.item-2xPVYue0.isActive-2j-GhQs_:hover .toolbox-3ulPxfe-{color:#fff}}html.theme-dark .item-2xPVYue0.isActive-2j-GhQs_ .toolbox-3ulPxfe-,html.theme-dark .item-2xPVYue0.isActive-2j-GhQs_:active .toolbox-3ulPxfe-{color:#fff}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .item-2xPVYue0.isActive-2j-GhQs_:hover .toolbox-3ulPxfe-{color:#fff}}.item-2xPVYue0.withIcon-1xBjf-oB{padding-top:6px;padding-bottom:6px}.item-2xPVYue0:before{content:" ";display:block;height:28px}.icon-2Qm7YIcz{display:flex;margin-left:6px;align-items:center;justify-content:center;width:28px;height:28px}.icon-2Qm7YIcz svg{display:block}.labelRow-3Q0rdE8-{display:flex;flex-direction:row;align-items:baseline;justify-content:space-between;flex:0 1 100%;min-width:0;max-width:100%;box-sizing:border-box;padding-left:12px}.labelRow-3Q0rdE8-:first-child{padding-right:4px}.labelRow-3Q0rdE8-:last-child{padding-left:4px}.label-3Xqxy756{display:flex;flex:0 0 auto;max-width:100%;overflow:hidden}.shortcut-30pveiCO{font-size:11px;margin-left:14px;min-width:27px;color:#9598a1}html.theme-dark .shortcut-30pveiCO{color:#5d606b}.toolbox-3ulPxfe-{display:flex;position:relative;align-items:center;color:#9db2bd}html.theme-dark .toolbox-3ulPxfe-{color:#9db2bd}.feature-no-touch .toolbox-3ulPxfe-.showOnHover-1q6ySzZc{opacity:0}.toolbox-3ulPxfe->:not(:last-child){margin-left:4px}@media screen and (max-width:419px){.toolbox-3ulPxfe->:not(:last-child){margin-left:8px}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.feature-no-touch .item-2xPVYue0:hover .toolbox-3ulPxfe-.showOnHover-1q6ySzZc{opacity:1}} \ No newline at end of file diff --git a/public/charting_library/bundles/90.ce3193491dd785bd0aea.css b/public/charting_library/bundles/90.ce3193491dd785bd0aea.css new file mode 100644 index 00000000..8acc874c --- /dev/null +++ b/public/charting_library/bundles/90.ce3193491dd785bd0aea.css @@ -0,0 +1 @@ +.currencyLabelMenuSeparator-13pkukWx{margin:6px 0;height:1px;background-color:#e0e3eb}html.theme-dark .currencyLabelMenuSeparator-13pkukWx{background-color:#434651} \ No newline at end of file diff --git a/public/charting_library/bundles/90.ce3193491dd785bd0aea.rtl.css b/public/charting_library/bundles/90.ce3193491dd785bd0aea.rtl.css new file mode 100644 index 00000000..8acc874c --- /dev/null +++ b/public/charting_library/bundles/90.ce3193491dd785bd0aea.rtl.css @@ -0,0 +1 @@ +.currencyLabelMenuSeparator-13pkukWx{margin:6px 0;height:1px;background-color:#e0e3eb}html.theme-dark .currencyLabelMenuSeparator-13pkukWx{background-color:#434651} \ No newline at end of file diff --git a/public/charting_library/bundles/90.d2b7abe9dbef67c1ac2f.js b/public/charting_library/bundles/90.d2b7abe9dbef67c1ac2f.js new file mode 100644 index 00000000..caa741fa --- /dev/null +++ b/public/charting_library/bundles/90.d2b7abe9dbef67c1ac2f.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[90],[]]); \ No newline at end of file diff --git a/public/charting_library/bundles/91.483a8d7dc828f742da6e.js b/public/charting_library/bundles/91.483a8d7dc828f742da6e.js new file mode 100644 index 00000000..3f04ae83 --- /dev/null +++ b/public/charting_library/bundles/91.483a8d7dc828f742da6e.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[91],[]]); \ No newline at end of file diff --git a/public/charting_library/bundles/91.cc1ebe280e7f1c658409.css b/public/charting_library/bundles/91.cc1ebe280e7f1c658409.css new file mode 100644 index 00000000..ad788151 --- /dev/null +++ b/public/charting_library/bundles/91.cc1ebe280e7f1c658409.css @@ -0,0 +1 @@ +.scrollable-Yu-wPchb{flex:1 1 auto;overflow-y:auto;overflow-x:hidden;min-height:145px;-webkit-overflow-scrolling:touch}@media screen and (max-height:290px){.scrollable-Yu-wPchb{min-height:auto}}.scrollable-Yu-wPchb::-webkit-scrollbar{width:5px;height:5px}.scrollable-Yu-wPchb::-webkit-scrollbar-thumb{border:1px solid;border-color:#f1f3f6;border-radius:3px;background-color:#9598a1}html.theme-dark .scrollable-Yu-wPchb::-webkit-scrollbar-thumb{background-color:#363a45;border-color:#1e222d}.scrollable-Yu-wPchb::-webkit-scrollbar-track{background-color:transparent;border-radius:3px}.scrollable-Yu-wPchb::-webkit-scrollbar-corner{display:none}.content-2n4jbVjv{flex:1 1 auto;box-sizing:border-box;border-top:1px solid;border-color:#e0e3eb;padding:24px 20px}html.theme-dark .content-2n4jbVjv{border-color:#434651}.content-2n4jbVjv .row-37rvoi2g{display:flex;align-items:center;margin-top:16px;color:#131722}html.theme-dark .content-2n4jbVjv .row-37rvoi2g{color:#b2b5be}.content-2n4jbVjv .row-37rvoi2g:first-child{margin-top:0}.content-2n4jbVjv .row-37rvoi2g .title-2jd7Qo8W{display:flex;flex:none;line-height:21px;width:80px;margin-right:20px;word-break:break-word}.content-2n4jbVjv .row-37rvoi2g .control-1o8LMgzl{width:100px;line-height:21px} \ No newline at end of file diff --git a/public/charting_library/bundles/91.cc1ebe280e7f1c658409.rtl.css b/public/charting_library/bundles/91.cc1ebe280e7f1c658409.rtl.css new file mode 100644 index 00000000..cfac5c9e --- /dev/null +++ b/public/charting_library/bundles/91.cc1ebe280e7f1c658409.rtl.css @@ -0,0 +1 @@ +.scrollable-Yu-wPchb{flex:1 1 auto;overflow-y:auto;overflow-x:hidden;min-height:145px;-webkit-overflow-scrolling:touch}@media screen and (max-height:290px){.scrollable-Yu-wPchb{min-height:auto}}.scrollable-Yu-wPchb::-webkit-scrollbar{width:5px;height:5px}.scrollable-Yu-wPchb::-webkit-scrollbar-thumb{border:1px solid;border-color:#f1f3f6;border-radius:3px;background-color:#9598a1}html.theme-dark .scrollable-Yu-wPchb::-webkit-scrollbar-thumb{background-color:#363a45;border-color:#1e222d}.scrollable-Yu-wPchb::-webkit-scrollbar-track{background-color:transparent;border-radius:3px}.scrollable-Yu-wPchb::-webkit-scrollbar-corner{display:none}.content-2n4jbVjv{flex:1 1 auto;box-sizing:border-box;border-top:1px solid;border-color:#e0e3eb;padding:24px 20px}html.theme-dark .content-2n4jbVjv{border-color:#434651}.content-2n4jbVjv .row-37rvoi2g{display:flex;align-items:center;margin-top:16px;color:#131722}html.theme-dark .content-2n4jbVjv .row-37rvoi2g{color:#b2b5be}.content-2n4jbVjv .row-37rvoi2g:first-child{margin-top:0}.content-2n4jbVjv .row-37rvoi2g .title-2jd7Qo8W{display:flex;flex:none;line-height:21px;width:80px;margin-left:20px;word-break:break-word}.content-2n4jbVjv .row-37rvoi2g .control-1o8LMgzl{width:100px;line-height:21px} \ No newline at end of file diff --git a/public/charting_library/bundles/92.b58f53d578fc65c1d1e0.css b/public/charting_library/bundles/92.b58f53d578fc65c1d1e0.css new file mode 100644 index 00000000..d11d4f1a --- /dev/null +++ b/public/charting_library/bundles/92.b58f53d578fc65c1d1e0.css @@ -0,0 +1 @@ +.popupWidget-2X0DYakn{display:flex;padding:12px 14px}@media only screen and (min-width:420px){.popupWidget-2X0DYakn{max-width:296px}}.popupWidget-2X0DYakn:not(:last-child){border-bottom:1px solid #f0f3fa}html.theme-dark .popupWidget-2X0DYakn:not(:last-child){border-bottom:1px solid #2a2e39}.popupWidget-2X0DYakn .desc-btEANXbj{display:flex;flex-direction:column}.popupWidget-2X0DYakn .icon-2jQlAvgr{flex:0 0 auto;margin:2px 6px 2px 0;overflow:hidden}.popupWidget-2X0DYakn .icon-2jQlAvgr.small-3UTqSQwC{width:18px;height:18px;border-radius:9px}.popupWidget-2X0DYakn .icon-2jQlAvgr.large-2BZlk4pO{width:22px;height:22px;border-radius:11px}.popupWidget-2X0DYakn .title-1Yt34zFi{font-weight:700}.popupWidget-2X0DYakn .title-1Yt34zFi.small-3UTqSQwC{font-size:16px;line-height:22px;margin-bottom:4px}.popupWidget-2X0DYakn .title-1Yt34zFi.large-2BZlk4pO{font-size:18px;line-height:26px;margin-bottom:2px}.popupWidget-2X0DYakn .text-Md3DtcCM:first-letter{text-transform:capitalize}.popupWidget-2X0DYakn .text-Md3DtcCM.small-3UTqSQwC{font-size:14px;line-height:21px}.popupWidget-2X0DYakn .text-Md3DtcCM.large-2BZlk4pO{font-size:16px;line-height:25px}.popupWidget-2X0DYakn .action-6Ezy2_v3{color:#2196f3;margin-top:8px;cursor:pointer}.popupWidget-2X0DYakn .action-6Ezy2_v3.small-3UTqSQwC{font-size:14px;line-height:21px}.popupWidget-2X0DYakn .action-6Ezy2_v3.large-2BZlk4pO{font-size:16px;line-height:25px} \ No newline at end of file diff --git a/public/charting_library/bundles/92.b58f53d578fc65c1d1e0.rtl.css b/public/charting_library/bundles/92.b58f53d578fc65c1d1e0.rtl.css new file mode 100644 index 00000000..690da224 --- /dev/null +++ b/public/charting_library/bundles/92.b58f53d578fc65c1d1e0.rtl.css @@ -0,0 +1 @@ +.popupWidget-2X0DYakn{display:flex;padding:12px 14px}@media only screen and (min-width:420px){.popupWidget-2X0DYakn{max-width:296px}}.popupWidget-2X0DYakn:not(:last-child){border-bottom:1px solid #f0f3fa}html.theme-dark .popupWidget-2X0DYakn:not(:last-child){border-bottom:1px solid #2a2e39}.popupWidget-2X0DYakn .desc-btEANXbj{display:flex;flex-direction:column}.popupWidget-2X0DYakn .icon-2jQlAvgr{flex:0 0 auto;margin:2px 0 2px 6px;overflow:hidden}.popupWidget-2X0DYakn .icon-2jQlAvgr.small-3UTqSQwC{width:18px;height:18px;border-radius:9px}.popupWidget-2X0DYakn .icon-2jQlAvgr.large-2BZlk4pO{width:22px;height:22px;border-radius:11px}.popupWidget-2X0DYakn .title-1Yt34zFi{font-weight:700}.popupWidget-2X0DYakn .title-1Yt34zFi.small-3UTqSQwC{font-size:16px;line-height:22px;margin-bottom:4px}.popupWidget-2X0DYakn .title-1Yt34zFi.large-2BZlk4pO{font-size:18px;line-height:26px;margin-bottom:2px}.popupWidget-2X0DYakn .text-Md3DtcCM:first-letter{text-transform:capitalize}.popupWidget-2X0DYakn .text-Md3DtcCM.small-3UTqSQwC{font-size:14px;line-height:21px}.popupWidget-2X0DYakn .text-Md3DtcCM.large-2BZlk4pO{font-size:16px;line-height:25px}.popupWidget-2X0DYakn .action-6Ezy2_v3{color:#2196f3;margin-top:8px;cursor:pointer}.popupWidget-2X0DYakn .action-6Ezy2_v3.small-3UTqSQwC{font-size:14px;line-height:21px}.popupWidget-2X0DYakn .action-6Ezy2_v3.large-2BZlk4pO{font-size:16px;line-height:25px} \ No newline at end of file diff --git a/public/charting_library/bundles/92.cb54431056b47772623a.js b/public/charting_library/bundles/92.cb54431056b47772623a.js new file mode 100644 index 00000000..f6afbbe3 --- /dev/null +++ b/public/charting_library/bundles/92.cb54431056b47772623a.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[92],[]]); \ No newline at end of file diff --git a/public/charting_library/bundles/93.325b9405f45d6fda33a6.css b/public/charting_library/bundles/93.325b9405f45d6fda33a6.css new file mode 100644 index 00000000..dafc07af --- /dev/null +++ b/public/charting_library/bundles/93.325b9405f45d6fda33a6.css @@ -0,0 +1 @@ +.separator-1fBbiGH4{border-top:1px solid #e0e3eb}html.theme-dark .separator-1fBbiGH4{border-top:1px solid #434651}.scrollable-1was6mON{flex:1 1 auto;overflow-y:auto;overflow-x:hidden;min-height:145px;-webkit-overflow-scrolling:touch}@media screen and (max-height:290px){.scrollable-1was6mON{min-height:auto}}.scrollable-1was6mON::-webkit-scrollbar{width:5px;height:5px}.scrollable-1was6mON::-webkit-scrollbar-thumb{border:1px solid;border-color:#f1f3f6;border-radius:3px;background-color:#9598a1}html.theme-dark .scrollable-1was6mON::-webkit-scrollbar-thumb{background-color:#363a45;border-color:#1e222d}.scrollable-1was6mON::-webkit-scrollbar-track{background-color:transparent;border-radius:3px}.scrollable-1was6mON::-webkit-scrollbar-corner{display:none} \ No newline at end of file diff --git a/public/charting_library/bundles/93.325b9405f45d6fda33a6.rtl.css b/public/charting_library/bundles/93.325b9405f45d6fda33a6.rtl.css new file mode 100644 index 00000000..dafc07af --- /dev/null +++ b/public/charting_library/bundles/93.325b9405f45d6fda33a6.rtl.css @@ -0,0 +1 @@ +.separator-1fBbiGH4{border-top:1px solid #e0e3eb}html.theme-dark .separator-1fBbiGH4{border-top:1px solid #434651}.scrollable-1was6mON{flex:1 1 auto;overflow-y:auto;overflow-x:hidden;min-height:145px;-webkit-overflow-scrolling:touch}@media screen and (max-height:290px){.scrollable-1was6mON{min-height:auto}}.scrollable-1was6mON::-webkit-scrollbar{width:5px;height:5px}.scrollable-1was6mON::-webkit-scrollbar-thumb{border:1px solid;border-color:#f1f3f6;border-radius:3px;background-color:#9598a1}html.theme-dark .scrollable-1was6mON::-webkit-scrollbar-thumb{background-color:#363a45;border-color:#1e222d}.scrollable-1was6mON::-webkit-scrollbar-track{background-color:transparent;border-radius:3px}.scrollable-1was6mON::-webkit-scrollbar-corner{display:none} \ No newline at end of file diff --git a/public/charting_library/bundles/93.397809bee4d08b92d346.js b/public/charting_library/bundles/93.397809bee4d08b92d346.js new file mode 100644 index 00000000..6d9ef0db --- /dev/null +++ b/public/charting_library/bundles/93.397809bee4d08b92d346.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[93],[]]); \ No newline at end of file diff --git a/public/charting_library/bundles/932c209e6bf69970ca313047d5da8964.png b/public/charting_library/bundles/932c209e6bf69970ca313047d5da8964.png new file mode 100644 index 00000000..cdf4be15 Binary files /dev/null and b/public/charting_library/bundles/932c209e6bf69970ca313047d5da8964.png differ diff --git a/public/charting_library/bundles/a6506134daec7169f68f563f084a9d41.svg b/public/charting_library/bundles/a6506134daec7169f68f563f084a9d41.svg new file mode 100644 index 00000000..8c4fa80f --- /dev/null +++ b/public/charting_library/bundles/a6506134daec7169f68f563f084a9d41.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/charting_library/bundles/add-compare-dialog.a581e24a8887be371793.js b/public/charting_library/bundles/add-compare-dialog.a581e24a8887be371793.js new file mode 100644 index 00000000..deafa5a7 --- /dev/null +++ b/public/charting_library/bundles/add-compare-dialog.a581e24a8887be371793.js @@ -0,0 +1,8 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([["add-compare-dialog"],{"/NcV":function(t,e){t.exports=''},FxnJ:function(t,e,i){},MjtL:function(t,e){t.exports=''},NhD9:function(t,e,i){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.createTabbedDialog=function(e){e=$.extend({},s,e);var i=$(t.render('
    {{#tabs}}
    {{name}}
    {{/tabs}}
    {{#customControls}}
    {{/customControls}}
    {{>additionalHeaderContent}}',{tabs:e.tabs,customControls:e.customControls,customControlsAddClass:e.customControlsContainerAddClass},{additionalHeaderContent:e.additionalHeaderContent})),n=$('
    '),r=n;e.contentAddClass&&n.addClass(e.contentAddClass);!1!==e.withScroll&&(n=$('
    ').append(r.addClass("tv-dialog__scroll-wrap-inner")));var l=$('
    ').append(i).append(n);e.customControls&&i.find(".js-custom-controls").append(e.customControls);if(!0!==e.doNotCreatePages)for(var c=0;c').append(e.tabs[c].page));var d=e.tabStateSaveKey,u=e.activeTab,p=e.tabsScrollBoxAddClass,h=e.tabAddClass;delete e.tabs,delete e.activeTab,delete e.customControls,delete e.tabStateSaveKey,delete e.customControlsContainerAddClass,delete e.tabsScrollBoxAddClass,delete e.tabAddClass,e.closeButtonAddClass="tv-tabbed-dialog__close",e.contentWrapTemplate=l;var b=(0,a.createDialog)(e),f=new o.Tabs(i.find(".tv-tabs").get(0),r.get(0),{addLeftArrowsClass:"tv-tabbed-dialog__tabs-arrow-left",addRightArrowsClass:"tv-tabbed-dialog__tabs-arrow-right",addScrollBoxClass:p,tabClass:h,saveTab:d,activeTab:u});return b.on("afterOpen",(function(){f.setActivePage(f.index(),!0,!0)})),{dialog:b,tabs:f}};var o=i("pIOw"),a=i("YDhE");i("FxnJ");var s={tabs:[]}}).call(this,i("nbsC"))},UnpO:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AddSymbolTab=void 0;var o=function(){function t(t,e){for(var i=0;i\n\t\t
    \n\t
    ';e.AddSymbolTab=function(){function t(e,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._chartWidgetCollection=e,this._dialog=i,this._$popup=null,this.init()}return o(t,[{key:"init",value:function(){var t=this;this.$tab=$(n),this._$input=this.$tab.find(".js-add-symbol-tab-input"),this._checkbox=new a.AddSymbolCheckbox({labelRight:$.t("Overlay the main chart"),labelAddClass:"tv-add-symbol-tab__checkbox-label",boxAddClass:"tv-add-symbol-tab__checkbox-box"}),this.$tab.find(".js-add-symbol-tab-checkbox").append(this._checkbox.$el),(0,s.symbolSearchUIService)().bindToInput(this._$input,{callback:function(e){var i=t._chartWidgetCollection.activeChartWidget.value();i&&i.addOverlayStudy(e,t._checkbox.checked)},onPopupOpen:function(e){e.css("z-index",t._dialog.getZIndex()),t._$popup=e},onPopupClose:function(){t._$popup=null},keepFocus:!0,clearAfterAccept:!0})}},{key:"focus",value:function(){Modernizr.mobiletouch||this._$input.focus()}},{key:"isClickOnTab",value:function(t){return!!this._$popup&&!(this._$popup[0]!==t.target&&!this._$popup[0].contains(t.target))}}]),t}()},UxRG:function(t,e,i){},dKfe:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AddSymbolCheckbox=void 0;var o,a=i("QwKQ"),s=(o=a)&&o.__esModule?o:{default:o};e.AddSymbolCheckbox=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),t.checked=TVSettings.getBool("showAddSymbolDialog.checkboxState",!0);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return i.$checkbox.change((function(){setTimeout((function(){TVSettings.setValue("showAddSymbolDialog.checkboxState",i.checked)}))})),i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(s.default)},frtK:function(t,e,i){},jPTo:function(t,e,i){},k47Q:function(t,e,i){},ocUP:function(t,e,i){"use strict";(function(t,o){Object.defineProperty(e,"__esModule",{value:!0}),e.CompareTab=void 0;var a=function(){function t(t,e){for(var i=0;i\n\t
    ',l='\n\t
    \n\t\t\n\t
    ';e.CompareTab=function(){function e(i,o){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),this.selectedSymbols=[],this._chartWidgetCollection=i,this._dialog=o,this._$popup=null,this._predefines={},this._symbolAlias={},this._isBovespa=t.enabled("bovespa_widget"),this._predefines=this._chartWidgetCollection.activeChartWidget.value().compareSymbols()||[],this.init()}return a(e,[{key:"_addCompareSymbol",value:function(t,e,i){var o=this._chartWidgetCollection.activeChartWidget.value();if(o)return this.selectedSymbols.push(t),o.addCompareStudy(t).then((function(t){var e=null!==t;return e&&(0,n.trackEvent)("GUI","Add Compare"),e}))}},{key:"removeCompareSymbol",value:function(t){var e=this,i=this._chartWidgetCollection.activeChartWidget.value();if(i){var o=i.model();o&&(this.selectedSymbols=this.selectedSymbols.filter((function(e){return e!==t})),o.dataSources().forEach((function(i){if(i._metaInfo&&"Compare@tv-basicstudies"===i._metaInfo.id){var a=i.properties().inputs.symbol.value();(a===t||e._symbolAlias[a]&&e._symbolAlias[a]===t)&&o.removeSource(i)}})))}}},{key:"init",value:function(){var t=this,e=this._chartWidgetCollection.activeChartWidget.value();if(e){var i=e.model();if(i){var o=i.dataSources();this.$tab=$(r),this._initSymbolSearch(),this._createPredefinesList();var a=this.$tab.find(".js-compare-tab-predefines");a.find(".js-predefine-checkbox").attr("checked",!1),this._predefines.forEach((function(e){var i=e.symbol,s=t._symbolToId(i),n=a.find("#"+s);o.forEach((function(e){if(e._metaInfo&&"Compare@tv-basicstudies"===e._metaInfo.id){var o=e.properties().inputs.symbol.value();(o===i||t._symbolAlias[o]&&t._symbolAlias[o]===i)&&(n.attr("checked",!0),t.selectedSymbols.push(o))}}))}))}}}},{key:"_initSymbolSearch",value:function(){var t=this;this._$input=this.$tab.find(".js-compare-tab-input"),(0,s.symbolSearchUIService)().bindToInput(this._$input,{callback:function(e){return t._addCompareSymbol(e)},onPopupOpen:function(e){e.css("z-index",t._dialog.getZIndex()),t._$popup=e},onPopupClose:function(){t._$popup=null},keepFocus:!0,clearAfterAccept:!0})}},{key:"_createPredefinesList",value:function(){var t=this,e=this;function i(t){var i=this;setTimeout((function(){$(i).is(":checked")?e._addCompareSymbol(t.data.symbol).then((function(t){ +t||$(i).attr("checked",!1)})):e.removeCompareSymbol(t.data.symbol)}))}var a=$('
    ');this._predefines.forEach((function(e){var s=e.symbol,n=e.title,r=$(o.render(l,{symbolId:t._symbolToId(s),label:n,additionalClass:t._isBovespa?"tv-compare-tab__predefine-cell--wide":""}));r.find(".js-predefine-checkbox").change({symbol:s},i),r.appendTo(a)})),a.appendTo(this.$tab)}},{key:"_symbolToId",value:function(t){return t.replace(/[^a-z0-9]/gi,"_")}},{key:"focus",value:function(){Modernizr.mobiletouch||this._$input.focus()}},{key:"isClickOnTab",value:function(t){return!!this._$popup&&!(this._$popup[0]!==t.target&&!this._$popup[0].contains(t.target))}}]),e}()}).call(this,i("Kxc7"),i("nbsC"))},ohga:function(t,e,i){},pIOw:function(t,e,i){"use strict";i.r(e);i("ohga");var o=i("Eyy1");i("P5fv");function a(){return new Promise((function(t){i.e("lazy-velocity").then(function(e){i("WJ2Z"),t()}.bind(null,i)).catch(void 0)}))}$.fn.velocity=function(){for(var t=this,e=[],i=0;i'+f+"
    "),this._elArrowRight=y(this._options.rArrowClass||"",this._elTabs,"append",'
    '+v+"
    "),this._addClass(this._elArrowLeft,this._options.addLeftArrowsClass),this._addClass(this._elArrowRight,this._options.addRightArrowsClass)),this._addClass(this._elScrollBox,this._options.addScrollBoxClass),this._addClass(this._elSlider,this._options.addSliderClass),this._addClass(this._elTabs,this._options.tabsContainerClass),this._addClass(this.getTabsArray(),this._options.tabClass),this._addClass(this._elTabs,this._options.loadedClass),this.checkScrollArrows(!0),this._initActivePage(),this._bindEvents()}return t.prototype.getTabsArray=function(){ +var t=this._elScrollBox.children;if(!this._options.sliderClass)return Array.prototype.slice.call(t);for(var e=[],i=0;i=1?r(this._elArrowLeft):(e<=1||this._elScrollWrap.scrollWidth<=i)&&l(this._elArrowLeft,s.Left)),this._elArrowRight&&(o-e>1?r(this._elArrowRight):(e>=o||this._elScrollWrap.scrollWidth<=i)&&l(this._elArrowRight,s.Right))},t.prototype.index=function(){var t=this.getElActiveTab();return t?this.getTabsArray().indexOf(t):-1},t.prototype.getElActiveTab=function(){return this._getActiveElement(this.getTabsArray(),this._options.activeTabClass||"",this._options.inactiveTabClass)},t.prototype.getElActivePage=function(){return this._getActiveElement(this.getPagesArray(),this._options.activePageClass||"",this._options.inactivePageClass)},t.prototype.setActivePage=function(t,e,i){if(-1!==t&&(t!==this.index()||i)){var o=this.index();a(this.getTabsArray(),this._options.activeTabClass,this._options.inactiveTabClass),a(this.getPagesArray(),this._options.activePageClass,this._options.inactivePageClass),this._options.noSlider||this.updateSlider(o,t,e),this._options.saveTab&&p.setValue(this._options.saveTab,t),this.tabChanged.fire(t)}function a(e,i,o){e.forEach((function(e,a){var s=t===a;i&&S(e,i,s),o&&S(e,o,!s)}))}},t.prototype.updateSlider=function(t,e,i){var o=this;if(!this._options.noSlider){var s=this.getTabsArray()[e];if(!(0===s.clientWidth||0===s.clientHeight||"none"===window.getComputedStyle(s).getPropertyValue("display"))){var r=window.getComputedStyle(s),l=s.offsetLeft+parseInt(r.getPropertyValue("padding-left")),c=g(s),d=s.querySelector(".js-tabs__slider-pos");if(d){var u=window.getComputedStyle(d);l+=parseInt(u.getPropertyValue("padding-left"))+d.offsetLeft,c-=c-g(d)}(i=i||-1===t||document.all&&!window.atob)?(this._elSlider.style.left=l+"px",this._elSlider.style.width=c+"px"):(this._animating=!0,a().then((function(){$.Velocity.animate(o._elSlider,{left:l},{duration:n.dur,easing:"easeOutCubic",queue:!1}),$.Velocity.animate(o._elSlider,{width:c},{complete:function(){o._animating=!1},duration:n.dur,easing:"easeOutCubic",queue:!1})})))}}},t.prototype.onTabClick=function(t){var e=t.currentTarget||t.target,i=this.getTabsArray().indexOf(e) +;-1===i||this._isTabDisabled(e)||this.setActivePage(i),document.activeElement.blur(),t.preventDefault()},t.prototype.resizeSlider=function(){if(!this._options.noSlider){var t=this._elTabs.offsetWidth;if(t!==this._prevWidth){this._prevWidth=t;var e=this.index();this.updateSlider(e,e,!0)}}},t.prototype.count=function(){return this.getTabsArray().length},t.prototype.add=function(t,e){this._elScrollBox.appendChild(t),this._elPages&&e&&this._elPages.appendChild(e),this._bindTabEvents(t),this.checkScrollArrows(!0)},t.prototype.remove=function(t){function e(t){t.parentElement&&t.parentElement.removeChild(t)}var i=this.tabAt(t);i&&(this._unbindTabEvents(i),e(i));var o=this.pageAt(t);o&&e(o);var a=t-1>=0?t-1:0;this.setActivePage(a),this.checkScrollArrows(!0)},t.prototype.indexOfTab=function(t){return this.getTabsArray().indexOf(t)},t.prototype.indexOfPage=function(t){return this.getPagesArray().indexOf(t)},t.prototype.pageAt=function(t){return this.getPagesArray()[t]||null},t.prototype.tabAt=function(t){return this.getTabsArray()[t]||null},t.prototype.deselect=function(){var t=this.getElActiveTab();this._options.activeTabClass&&t&&C(t,this._options.activeTabClass);var e=this.getElActivePage();return this._options.activePageClass&&e&&C(e,this._options.activePageClass),this._elSlider&&(this._elSlider.style.left="",this._elSlider.style.width=""),this},t.prototype.stop=function(){this._unbindEvents({})},t.prototype._addClass=function(t,e){"string"==typeof e&&(Array.isArray(t)||(t=[t]),t.forEach((function(t){m(t,e)})))},t.prototype._initActivePage=function(){var t=0;this._options.saveTab&&(t=p.getInt(this._options.saveTab,0));var e=this.index();-1!==e&&(t=e),void 0!==this._options.activeTab&&(t=this._options.activeTab),this.setActivePage(t,!0,!0)},t.prototype._bindEvents=function(){var t=this;this.getTabsArray().forEach(this._bindTabEvents.bind(this)),this._bindOneEvent({eventName:"scroll",listener:this.checkScrollArrows.bind(this,!1),target:this._elScrollWrap}),this._elArrowLeft&&this._bindOneEvent({eventName:"click",listener:function(){var e=t.getTabsArray(),i=0,o=!1,s=t._elScrollWrap.scrollLeft;Object(h.isRtl)()&&e.reverse(),e.forEach((function(t){if(!o){var e=t.offsetLeft+t.offsetWidth;e>s?o=!0:i=e}})),a().then((function(){$.Velocity.animate(t._elScrollWrap,"scroll",{axis:"x",container:$(t._elScrollWrap),duration:n.dur/2,easing:"easeInOutCubic",offset:Math.floor(i-s-g(t._elArrowLeft)),queue:!1})}))},target:this._elArrowLeft}),this._elArrowRight&&this._bindOneEvent({eventName:"click",listener:function(){var e=t.getTabsArray(),i=0,s=Object(h.isRtl)()?0:t._elScrollWrap.scrollLeft+g(t._elScrollWrap);Object(h.isRtl)()&&e.reverse(),e.forEach((function(t){if(0===i){var e=t.offsetLeft+t.offsetWidth;e>s&&(i=e)}})),a().then((function(){$.Velocity.animate(t._elScrollWrap,"scroll",{axis:"x",container:$(t._elScrollWrap),duration:n.dur/2,easing:"easeInOutCubic",offset:Math.ceil(i-s+g(Object(o.ensureDefined)(t._elArrowRight))),queue:!1})}))},target:this._elArrowRight}) +;var e=Array.prototype.slice.call(this._elTabs.querySelectorAll(".js-tabs__slider-hover")||[]);e.length&&e.forEach((function(e){return t._bindOneEvent({eventName:"mouseenter",listener:function(e){if(!t._animating){var i=e.currentTarget;i&&t._options.activeTabClass&&w(i,t._options.activeTabClass)&&t._hoverSlider(i)}},target:e})}));var i=null,s=function(){i=null,t.checkScrollArrows(!0),t._options.noSlider||t.resizeSlider()};this._bindOneEvent({eventName:"resize",listener:function(){null===i&&(i=window.requestAnimationFrame(s))},target:window})},t.prototype._bindTabEvents=function(t){var e=this;this._bindOneEvent({eventName:"click",listener:function(t){"function"==typeof e._options.onTabClick?e._options.onTabClick(t):e.onTabClick(t)},target:t})},t.prototype._unbindTabEvents=function(t){this._unbindEvents({target:t})},t.prototype._bindOneEvent=function(t){t.target.addEventListener(t.eventName,t.listener),this._bindings.push(t)},t.prototype._unbindEvents=function(t){var e=function(e){return!(void 0!==e.eventName&&e.eventName!==t.eventName||void 0!==e.target&&e.target!==t.target||void 0!==e.listener&&e.listener!==t.listener)};this._bindings.filter(e).forEach((function(t){return t.target.removeEventListener(t.eventName,t.listener)})),this._bindings=this._bindings.filter((function(t){return!e(t)}))},t.prototype._getActiveElement=function(t,e,i){return t.filter((function(t){return e?w(t,e):!!i&&!w(t,i)}))[0]||null},t.prototype._isTabDisabled=function(t){return w(t,"i-disabled")||this._options.tabDisabledClass&&w(t,this._options.tabDisabledClass)||t.hasAttribute("disabled")},t.prototype._hoverSlider=function(t){var e=this,i=g(t),o=window.getComputedStyle(t),s=t.offsetLeft+parseInt(o.getPropertyValue("padding-left"))+parseInt(o.getPropertyValue("margin-left")),r={duration:n.dur/4,easing:"easeOutCubic",queue:!1};a().then((function(){$.Velocity.animate(e._elSlider,{left:s},r),$.Velocity.animate(e._elSlider,{width:i},r)}));var l=function(){e.getElActiveTab()===t&&e._unhoverSlider(t),t.removeEventListener("mousleave",l)};t.addEventListener("mouseleave",l)},t.prototype._unhoverSlider=function(t){var e=this,i=window.getComputedStyle(t),o=t.querySelector(".js-tabs__slider-pos"),s=window.getComputedStyle(o),r=t.offsetLeft+parseInt(i.getPropertyValue("padding-left"))+parseInt(i.getPropertyValue("margin-left"))+parseInt(s.getPropertyValue("padding-left"))+o.offsetLeft,l=g(t),c=l-(l-g(o)),d={duration:n.dur/2,easing:"easeInSine",queue:!1};a().then((function(){$.Velocity.animate(e._elSlider,{left:r},d),$.Velocity.animate(e._elSlider,{width:c},d)}))},t}();function g(t){if(0===t.offsetWidth)return 0;var e=window.getComputedStyle(t);return t.offsetWidth-parseFloat(e.getPropertyValue("padding-left"))-parseFloat(e.getPropertyValue("padding-right"))-parseFloat(e.getPropertyValue("border-left-width"))-parseFloat(e.getPropertyValue("border-right-width"))}function y(t,e,i,o){var a=e.querySelector("."+t);if(!a){var s=document.createElement("div");if(s.innerHTML=o||'
    ',a=s.firstElementChild,"append"===i)e.appendChild(a);else{ +if("wrapInner"!==i)throw new Error("Unknown insertMethod");for(var n=Array.prototype.slice.call(e.childNodes),r=0;r').html(" "),this._helpTooltipTrigger=$('').text("?").attr("title",v()?d:u),this._dialogTitle=$.t("Change Interval")}function v(){return r.enabled("seconds_resolution")}_.prototype._setInput=function(){this._input=$(''),this._input.on("keypress",this._handleInput.bind(this)).on("input",function(){this._validate(),this._updateCaption()}.bind(this)).on("blur",function(){setTimeout(this._submit.bind(this),0)}.bind(this))},_.prototype._validate=function(){var t=this._input.val();this._parsed=o(t),this._valid=!this._parsed.error,this._supported=!this._parsed.error&&a(t);var i=this._parsed.unit;if(this._supported)if("R"===i&&this._parsed.qty>l.getMaxResolutionValue("R"))this._supported=!1;else if(null===i||"H"===i){this._parsed.qty*("H"===i?60:1)>1440&&(this._supported=!1)}else"S"!==i||c.includes(this._parsed.qty)||(this._supported=!1)},_.prototype._updateCaption=function(){var t;if(this._valid&&this._supported){var i=this._parsed.qty||1,e=this._parsed.unit||"";t=l.getTranslatedResolutionModel(i+e).hint,this._input.add(this._caption).removeClass("error")}else t=this._parsed.error?" ":$.t("Not applicable"),this._input.add(this._caption).addClass("error");this._caption.html(t)},_.prototype._handleInput=function(t){13!==t.which?t.ctrlKey||t.metaKey||!t.charCode||!t.which||t.which<=32||function(t){var i,e;i=/[\dhdwms]/i,e=/[\dhdwm]/i;return v()?i.test(t):e.test(t)}(String.fromCharCode(t.charCode))||t.preventDefault():this._submit()},_.prototype._submit=function(){if(p.isOpen(this._dialogTitle)){if(this._valid&&this._supported){var t=h.normalize(this._input.val()),i=s.interval.value();t&&i!==t&&"function"==typeof this._options.callback&&this._options.callback(t)}p.destroy(this._dialogTitle)}},_.prototype._setInitialValue=function(t){var i="",e=!1;(t=t||this._options.initialValue)&&","!==t?i=h.normalize(t)||"":(i=t=s.interval.value(),e=!0),this._input.val(i),e&&this._input.select()},_.prototype.isValid=function(){return Boolean(this._valid)},_.prototype.show=function(t){ +n("GUI","Show Change Interval Dialog",t);var i=p.createDialog(this._dialogTitle,{hideCloseCross:!0,addClass:"change-interval-dialog",ownerDocument:this._options.ownerDocument}),e=i.find("._tv-dialog-content");return i.css("min-width",0),e.css("min-width",0).mousedown(function(t){this._input.is(t.target)||t.preventDefault()}.bind(this)).append(this._input.add(this._caption).add(this._helpTooltipTrigger)),p.applyHandlers(i),p.positionDialog(i),this._setInitialValue(t),this._validate(),this._updateCaption(),i},t.exports.ChangeIntervalDialog=_}}]); \ No newline at end of file diff --git a/public/charting_library/bundles/chart-bottom-toolbar.06ad0fcc06b649c280d0.js b/public/charting_library/bundles/chart-bottom-toolbar.06ad0fcc06b649c280d0.js new file mode 100644 index 00000000..b4d3a8f3 --- /dev/null +++ b/public/charting_library/bundles/chart-bottom-toolbar.06ad0fcc06b649c280d0.js @@ -0,0 +1,12 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([["chart-bottom-toolbar"],{"+GaQ":function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var a=n("q1tI");function i(e){return e.map?a.Children.toArray(e.children).map(e.map):e.children}},"02pg":function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var a=n("q1tI"),i=n("TSYQ"),o=n("XiJV");function r(e){return a.createElement("div",{className:i(o.separator,e.className)})}},"20PO":function(e,t){e.exports=''},"2mG+":function(e,t,n){e.exports={button:"button-37qwTsBL"}},"5o6O":function(e,t,n){e.exports={tabs:"tabs-1LGqoVz6",tab:"tab-1Yr0rq0J",noBorder:"noBorder-oc3HwerO",disabled:"disabled-s8cEYElA",active:"active-37sipdzm",defaultCursor:"defaultCursor-Np9BHjTg",slider:"slider-1-X4lOmE",content:"content-2asssfGq"}},"9VJd":function(e,t){e.exports=''},ApAi:function(e,t){e.exports=''},"J+f8":function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var a=n("q1tI"),i=a.createContext(!1)},J3OW:function(e,t,n){e.exports={button:"button-1VVj8kLG",separator:"separator-2I6DZkMH"}},K3s3:function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return l})),n.d(t,"c",(function(){return u}));var a=n("mrSG"),i=n("q1tI"),o=n("TSYQ"),r=n("Eyy1"),s=n("5o6O"),c=s;function l(e){var t,n=o(e.className,s.tab,((t={})[s.active]=e.isActive,t[s.disabled]=e.isDisabled,t[s.defaultCursor]=!!e.shouldUseDefaultCursor,t[s.noBorder]=!!e.noBorder,t));return i.createElement("div",{className:n,onClick:e.onClick,ref:e.reference},e.children)}function u(e){return function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.activeTab={current:null},e}return Object(a.__extends)(n,t),n.prototype.componentDidUpdate=function(){Object(r.ensureNotNull)(this._slider).style.transition="transform 350ms",this._componentDidUpdate()},n.prototype.componentDidMount=function(){this._componentDidUpdate()},n.prototype.render=function(){var t=this,n=this.props.className,a=this._generateTabs();return i.createElement("div",{className:o(n,s.tabs),"data-name":this.props["data-name"]},a,i.createElement(e,{reference:function(e){t._slider=e}}))},n.prototype._generateTabs=function(){var e=this;return this.activeTab.current=null, +i.Children.map(this.props.children,(function(t){var n=t,a=Boolean(n.props.isActive),o={reference:function(t){a&&(e.activeTab.current=t),n.props.reference&&n.props.reference(t)}};return i.cloneElement(n,o)}))},n.prototype._componentDidUpdate=function(){var e=Object(r.ensureNotNull)(this._slider).style;if(this.activeTab.current){var t=this.activeTab.current.offsetWidth,n=this.activeTab.current.offsetLeft;e.transform="translateX("+n+"px)",e.width=t+"px",e.opacity="1"}else e.opacity="0"},n}(i.PureComponent)}u((function(e){return i.createElement("div",{className:s.slider,ref:e.reference})}))},MfqI:function(e,t,n){"use strict";n.r(t);var a=n("q1tI"),i=n.n(a),o=n("i8i4"),r=n("mrSG"),s=n("YFKU"),c=n("17x9"),l=n("TSYQ"),u=n("cvc5"),d=n("Kxc7"),h=n("82wv"),p=n("Iksw"),m=n("tWVy"),g=n("/KDZ"),b=n("N5tr"),f=n("KKsp"),v=n("Eyy1"),_=n("JWMC"),C=n("1TxM"),y=n("aIyQ"),S=n.n(y),E=n("dfhE"),x=function(){function e(e){var t=this;this._state={ranges:[]},this._change=new S.a,this._rangeChangedListenerBound=this._onRangeChanged.bind(this);var n=(this._context=e).chartWidget;n.withModel(null,(function(){var e=n.model(),a=e.mainSeries();a.onStatusChanged().subscribe(t,t._updateAvailableRanges),d.enabled("update_timeframes_set_on_symbol_resolve")&&a.dataEvents().symbolResolved().subscribe(t,t._updateAvailableRanges),a.priceScale().properties().childs().lockScale.subscribe(t,t._updateAvailableRanges),e.appliedTimeFrame().subscribe(t._rangeChangedListenerBound),t._updateAvailableRanges()}))}return e.prototype.state=function(){return this._state},e.prototype.onChange=function(){return this._change},e.prototype.selectRange=function(e){this._setState({activeRange:e.value.value});var t=this._context.chartWidgetCollection,n={val:e.value,res:e.targetResolution};t.setTimeFrame(n)},e.prototype.destroy=function(){var e=this,t=this._context.chartWidget;t.withModel(null,(function(){var n=t.model(),a=n.mainSeries();a.onStatusChanged().unsubscribe(e,e._updateAvailableRanges),d.enabled("update_timeframes_set_on_symbol_resolve")&&a.dataEvents().symbolResolved().unsubscribe(e,e._updateAvailableRanges),a.priceScale().properties().childs().lockScale.unsubscribe(e,e._updateAvailableRanges),n.appliedTimeFrame().unsubscribe(e._rangeChangedListenerBound)})),this._change.destroy()},e.prototype._setState=function(e){this._state=Object.assign({},this._state,e),this._change.fire(this._state)},e.prototype._onRangeChanged=function(e){var t;null!==e&&"period-back"===e.val.type&&(t=e.val.value),this._setState({activeRange:t})},e.prototype._updateAvailableRanges=function(){var e=this._context,t=e.availableTimeFrames,n=e.chartWidget;if(n.model()){var a=n.model().mainSeries(),i=a.status();if(i!==E.STATUS_LOADING&&i!==E.STATUS_RESOLVING){var o=t(a.symbolInfo(),a.status());0!==o.length&&this._setState({ranges:o})}}},e}(),w=Object(C.b)();function R(e){var t;return(t=function(t){function n(e,n){var a=t.call(this,e,n)||this;a._handleUpdate=function(e){a.setState(e)},a._handleSelectRange=function(e){Object(_.trackEvent)("GUI","Chart Bottom Toolbar","range "+e.value), +a._binding.selectRange(e)},Object(C.c)(n,{availableTimeFrames:c.any.isRequired,chartWidgetCollection:c.any.isRequired,chartWidget:c.any.isRequired}),N.has(n.chartWidget)||N.set(n.chartWidget,new x(n));var i=a._binding=Object(v.ensureDefined)(N.get(n.chartWidget));return a.state=i.state(),a}return Object(r.__extends)(n,t),n.prototype.componentDidMount=function(){this._binding.onChange().subscribe(this,this._handleUpdate)},n.prototype.componentWillUnmount=function(){this._binding.onChange().unsubscribe(this,this._handleUpdate)},n.prototype.render=function(){return a.createElement(e,{goToDateButton:this.props.goToDateButton,className:this.props.className,ranges:this.state.ranges,activeRange:this.state.activeRange,onSelectRange:this._handleSelectRange})},n}(a.PureComponent)).contextType=w,t}var N=new WeakMap,k=n("cdbK"),W=n("l4ku"),M=n("02pg"),T=n("9VJd"),O=n("J3OW");function j(e){var t=e.ranges,n=e.activeRange,a=e.onSelectRange;return i.a.createElement(i.a.Fragment,null,t.map((function(e){return i.a.createElement(W.a,{key:e.value.value,label:e.description||e.text,active:n===e.value.value,checked:n===e.value.value,checkable:!0,disabled:!1,onClick:o.bind(null,e),doNotCloseOnClick:!1,subItems:[]})})));function o(e){e&&a&&a(e),Object(m.b)()}}function A(e){var t=e.onGoToDateClick;return i.a.createElement(i.a.Fragment,null,i.a.createElement(M.a,{className:O.separator}),i.a.createElement(W.a,{icon:T,label:Object(s.t)("Go to..."),onClick:t,active:!1,checked:!1,checkable:!1,disabled:!1,doNotCloseOnClick:!1,subItems:[]}))}var B={title:window.t("Date Range"),goToDate:window.t("Go to...")},D=Object(C.b)(),z=R(function(e){function t(t,n){var i=e.call(this,t,n)||this;return i._handleGoToDateClick=function(){var e=i.context.chartWidget;Object(k.showGoToDateDialog)(e.model()),Object(m.b)()},i._handleRangeSelect=function(e){e&&i.props.onSelectRange&&i.props.onSelectRange(e),Object(m.b)()},i._renderChildren=function(e){var t=i.props,n=t.ranges,o=t.activeRange,r=t.goToDateButton;return e?a.createElement(a.Fragment,null,a.createElement(j,{ranges:n,activeRange:o,onSelectRange:i._handleRangeSelect}),r&&a.createElement(A,{onGoToDateClick:i._handleGoToDateClick})):a.createElement(a.Fragment,null,n.map((function(e){return a.createElement(b.b,{key:e.value.value,label:e.description||e.text,isActive:o===e.value.value,onClick:i._handleRangeSelect,onClickArg:e})})),r&&a.createElement(f.a,null),r&&a.createElement(b.b,{label:B.goToDate,onClick:i._handleGoToDateClick}))},Object(C.c)(n,{chartWidget:c.any.isRequired}),i}return Object(r.__extends)(t,e),t.prototype.render=function(){var e=this;return a.createElement(g.a,{rule:"screen and (max-width: 419px)"},(function(t){return a.createElement(h.a,{className:O.button,content:B.title,arrow:!0,verticalAttachEdge:p.a.Top,verticalDropDirection:p.b.FromBottomToTop,horizontalMargin:4,"data-name":"date-ranges-menu",isDrawer:t},e._renderChildren(t))}))},t.contextType=D,t}(a.PureComponent)),I=n("K3s3"),L=n("W9Y+");function F(e){var t,n=l(e.className,L.item,((t={})[L.isActive]=e.isActive,t[L.isFirst]=e.isFirst, +t[L.isLast]=e.isLast,t));return a.createElement("div",{className:n,onClick:e.onClick,ref:e.reference},e.children)}var P=n("nPPD"),q=n("RZ2Z"),G=Object(P.a)(I.a,q);var U=n("qSb5"),H=Object(I.c)((function(e){return a.createElement("div",{className:l(e.className,G.slider),ref:e.reference},a.createElement("div",{className:G.inner}))}));var V=R((function(e){var t=e.className,n=e.ranges,i=e.activeRange,o=e.onSelectRange;return a.createElement(H,{className:l(U.sliderRow,t),"data-name":"date-ranges-tabs"},n.map((function(e,t){return a.createElement(F,{key:e.value.value,isFirst:0===t,isLast:t===n.length-1,isActive:i===e.value.value,onClick:o&&o.bind(null,e)},a.createElement("div",{title:e.description||e.text,className:"apply-common-tooltip"},e.text))})))})),Z=n("Iivm"),X=n("/DW5"),Q=n("ul7r"),K=n("c7H2"),J=Object(X.b)({keys:["Alt","G"],text:"{0} + {1}"}),Y=Object(C.b)(),$=R(function(e){function t(t,n){var a=e.call(this,t,n)||this;return a._handleClick=function(){var e=a.context.chartWidget;Object(_.trackEvent)("GUI","Chart Bottom Toolbar","go to"),Object(k.showGoToDateDialog)(e.model())},Object(C.c)(n,{chartWidget:c.any.isRequired}),a}return Object(r.__extends)(t,e),t.prototype.render=function(){var e=this.props,t=e.className;return e.ranges.length>0&&a.createElement("div",{className:l("apply-common-tooltip",K.button,t),"data-name":"go-to-date","data-tooltip-hotkey":J,onClick:this._handleClick,title:Object(s.t)("Go to")},a.createElement(Z.Icon,{className:K.icon,icon:Q}))},t.contextType=Y,t}(a.PureComponent)),ee=n("URQ3");function te(e){var t=e.reference,n=e.className,i=e.children,o=Object(r.__rest)(e,["reference","className","children"]);return a.createElement("button",Object(r.__assign)({},o,{className:l(n,ee.button),ref:t}),a.createElement("span",{className:ee.inner},i))}var ne=n("/+9u"),ae=n("4kQX"),ie=n("7KDR"),oe=n("5VQP"),re=function(e){function t(t){var n=e.call(this,t)||this;return n._element=null,n._menu=null,n._handleRef=function(e){n._element=e},n._showMenu=function(){if(n._menu&&n._menu.isShown())return n._menu.hide(),void n._menu.destroy();var e=n.props,t=e.getActions,a=e.right,i=Object(v.ensureNotNull)(n._element),o=t();0!==o.length&&oe.ContextMenuManager.createMenu(o).then((function(e){n._menu=e,e.show((function(e,t){var n=i.getBoundingClientRect();return{clientX:a?n.right-e:n.left,clientY:n.top-Math.min(t,n.top),overrideHeight:n.top'},URQ3:function(e,t,n){e.exports={button:"button-88UE6omC",hover:"hover-3_vVP91F",inner:"inner-2FptJsfC"}},"W9Y+":function(e,t,n){e.exports={item:"item-3cgIlGYO",hover:"hover-2y46_KNk",isActive:"isActive-2M6dwA7-",isFirst:"isFirst-2kfAV5tf",isLast:"isLast-voJ1bqZh"}},XXQ5:function(e,t,n){e.exports={item:"item-3uG--HK9",emptyIcons:"emptyIcons-m0h_sZp0",loading:"loading-cNheEKQv",disabled:"disabled-3ilLPdQ4",interactive:"interactive-2W_Hkhdy",hovered:"hovered-D1oc5kww",icon:"icon-1Mb1FjSX",label:"label-3O4C0UM-",fullWidth:"fullWidth-1uGfIWwz",title:"title-22oXfKpQ",nested:"nested-1ZM4Mhrc",shortcut:"shortcut-3ZjqDeQg",remove:"remove-3gWfSy1e"}},XiJV:function(e,t,n){e.exports={separator:"separator-1TZB5HZ-"}},Xy1d:function(e,t){e.exports=''},Xzy5:function(e,t){e.exports=''},c7H2:function(e,t,n){e.exports={button:"button-2gir_Bbb",hover:"hover-SrAyrKlT",icon:"icon-MwaAItz1"}},l4ku:function(e,t,n){"use strict";n.d(t,"a",(function(){return m})) +;var a=n("q1tI"),i=n.n(a),o=n("TSYQ"),r=n("Iivm"),s=n("6KyJ"),c=n("J+f8"),l=n("w+Rv"),u=n("Xy1d"),d=n("Xzy5"),h=n("20PO"),p=n("XXQ5");function m(e){var t=e.isTitle,n=e.isLoading,m=e.isHovered,g=e.active,b=e.checkable,f=e.disabled,v=e.checked,_=e.icon,C=e.iconChecked,y=e.hint,S=e.subItems,E=e.label,x=e.onClick,w=e.children,R=e.toolbox,N=e.fullWidthLabel,k=Object(a.useContext)(c.a),W=!!S.length;return n?i.a.createElement("li",{className:o(p.item,p.loading)},i.a.createElement(s.Loader,{color:"gray"})):i.a.createElement("li",{className:o(p.item,p.interactive,t&&p.title,f&&p.disabled,m&&p.hovered,g&&p.active,k&&p.emptyIcons),onClick:x},i.a.createElement(r.Icon,{className:o(p.icon),icon:function(){if(b&&v)return C||_||u;return _}()}),i.a.createElement("span",{className:o(p.label,N&&p.fullWidth)},E),!!R&&i.a.createElement(r.Icon,{onClick:function(){R&&R.action()},className:p.remove,icon:h}),!W&&y&&i.a.createElement(l.a,{className:p.shortcut,text:y}),W&&i.a.createElement(r.Icon,{className:p.nested,icon:d}),w)}},qSb5:function(e,t,n){e.exports={sliderRow:"sliderRow-Tv1W7hM5"}},ul7r:function(e,t){e.exports=''},"w+Rv":function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var a=n("q1tI"),i=n("TSYQ"),o=n.n(i),r=n("ycgn");function s(e){var t=e.text,n=void 0===t?"":t,i=e.className;return a.createElement("span",{className:o()(r.shortcut,i)},n)}},ycgn:function(e,t,n){e.exports={item:"item-stVdeCwG",interactive:"interactive-3E0jwVyG",hovered:"hovered-2HCCgw6c",disabled:"disabled-2K7FyUI3",active:"active-muW4lycL",shortcut:"shortcut-2P38AivB",iconCell:"iconCell-OhwVvlgA",icon:"icon-3DDcYD-t",checkmark:"checkmark-2UE1siCn",content:"content-1GXgstZ5",label:"label-1If3beUH",checked:"checked-5eQn8630",toolbox:"toolbox-2XX2mSNw",showToolboxOnHover:"showToolboxOnHover-iCrUIcOG",arrowIcon:"arrowIcon-2FMesq_x",subMenu:"subMenu-QM4GIDtY"}},z6ID:function(e,t,n){e.exports={separator:"separator-3bp1jCsV"}}}]); \ No newline at end of file diff --git a/public/charting_library/bundles/chart-event-hint.a5bbf042a6ae27521744.js b/public/charting_library/bundles/chart-event-hint.a5bbf042a6ae27521744.js new file mode 100644 index 00000000..278db752 --- /dev/null +++ b/public/charting_library/bundles/chart-event-hint.a5bbf042a6ae27521744.js @@ -0,0 +1,3 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([["chart-event-hint"],{"+EG+":function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return s}));var r=n("mrSG"),o=n("q1tI"),i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(r.__extends)(t,e),t.prototype.shouldComponentUpdate=function(){return!1},t.prototype.render=function(){return o.createElement("div",{style:{position:"fixed",zIndex:150,left:0,top:0},ref:this.props.reference})},t}(o.Component),s=o.createContext(null)},"79vt":function(e,t,n){e.exports={container:"container-RYiwcUsM",content:"content-2QNYOBPt",arrowHolder:"arrowHolder-1VdSgMwV","arrowHolder--below":"arrowHolder--below-FwRPJmQk","arrowHolder--above":"arrowHolder--above-3dafVndi","arrowHolder--before":"arrowHolder--before-J9LaRkO3","arrowHolder--after":"arrowHolder--after-3LNL_hrq","arrowHolder--above-fix":"arrowHolder--above-fix-1jpQDk8-","arrowHolder--before-rtl-fix":"arrowHolder--before-rtl-fix-zFykJHSt","arrowHolder--after-ltr-fix":"arrowHolder--after-ltr-fix-1W2mlyUF",label:"label-2D_bIpcf",closeButton:"closeButton-2425ZrEc"}},AiMB:function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return d}));var r=n("mrSG"),o=n("q1tI"),i=n("i8i4"),s=n("e3/o"),a=n("jAh7"),c=n("+EG+"),l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._uuid=Object(s.guid)(),t}return Object(r.__extends)(t,e),t.prototype.componentWillUnmount=function(){this._manager().removeWindow(this._uuid)},t.prototype.render=function(){var e=this._manager().ensureWindow(this._uuid,this.props.layerOptions);return e.style.top=this.props.top||"",e.style.bottom=this.props.bottom||"",e.style.left=this.props.left||"",e.style.right=this.props.right||"",e.style.pointerEvents=this.props.pointerEvents||"",i.createPortal(o.createElement(d.Provider,{value:this},this.props.children),e)},t.prototype.moveToTop=function(){this._manager().moveToTop(this._uuid)},t.prototype._manager=function(){return null===this.context?Object(a.getRootOverlapManager)():this.context},t.contextType=c.b,t}(o.PureComponent),d=o.createContext(null)},Iivm:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n("mrSG").__exportStar(n("swCq"),t)},PN5r:function(e,t,n){"use strict";n.r(t);var r=n("mrSG"),o=n("q1tI"),i=n.n(o),s=n("i8i4"),a=n("TSYQ"),c=n("Iivm"),l=n("AiMB"),d=n("To8B"),u=n("79vt");o.PureComponent;function p(e){var t=e.className,n=e.containerClassName,i=e.reference,s=e.style,l=e.arrow,p=void 0===l||l,h=e.arrowClassName,f=e.arrowReference,m=e.onClose,v=e.arrowStyle,w=e.children,_=Object(r.__rest)(e,["className","containerClassName","reference","style","arrow","arrowClassName","arrowReference","onClose","arrowStyle","children"]);return o.createElement("div",Object(r.__assign)({},_,{className:t,ref:i,style:s}),p&&o.createElement("div",{className:h,ref:f,style:v}),o.createElement("div",{className:a(u.container,n)},o.createElement("div",{className:u.content},w),m&&o.createElement(c.Icon,{className:u.closeButton,icon:d, +onClick:m})))}var h=n("g2Cz");function f(e){var t=e.isOpened,n=e.text,r=e.onClose;return t?i.a.createElement("div",{className:h.container},i.a.createElement("div",{className:h.centerElement},i.a.createElement(p,{arrow:!1,onClose:r},i.a.createElement("div",{className:h.text},n)))):null}n.d(t,"ChartEventHintRenderer",(function(){return m}));var m=function(){function e(e){this._wrap=document.createElement("div"),this._container=e}return e.prototype.show=function(e,t){var n=this;if(this._wrap){this.hide(),this._container.append(this._wrap);var i={isOpened:!0,text:e,onClose:function(){t&&t(),n.hide()}};s.render(o.createElement(f,Object(r.__assign)({},i)),this._wrap)}},e.prototype.hide=function(){this._wrap&&(s.unmountComponentAtNode(this._wrap),this._wrap.remove())},e.prototype.destroy=function(){this.hide(),delete this._wrap},e}()},To8B:function(e,t){e.exports=''},g2Cz:function(e,t,n){e.exports={container:"container-2yI8A9Vu",centerElement:"centerElement-UEMVlR9F",text:"text-2Q2WewIi"}},jAh7:function(e,t,n){"use strict";n.r(t),n.d(t,"OverlapManager",(function(){return i})),n.d(t,"getRootOverlapManager",(function(){return a}));var r=n("Eyy1"),o=function(){function e(){this._storage=[]}return e.prototype.add=function(e){this._storage.push(e)},e.prototype.remove=function(e){this._storage=this._storage.filter((function(t){return e!==t}))},e.prototype.has=function(e){return this._storage.includes(e)},e.prototype.getItems=function(){return this._storage},e}(),i=function(){function e(e){void 0===e&&(e=document),this._storage=new o,this._windows=new Map,this._index=0,this._document=e,this._container=e.createDocumentFragment()}return e.prototype.setContainer=function(e){var t=this._container,n=null===e?this._document.createDocumentFragment():e;!function(e,t){Array.from(e.childNodes).forEach((function(e){e.nodeType===Node.ELEMENT_NODE&&t.appendChild(e)}))}(t,n),this._container=n},e.prototype.registerWindow=function(e){this._storage.has(e)||this._storage.add(e)},e.prototype.ensureWindow=function(e,t){void 0===t&&(t={position:"fixed",direction:"normal"});var n=this._windows.get(e);if(void 0!==n)return n;this.registerWindow(e);var r=this._document.createElement("div");if(r.style.position=t.position,r.style.zIndex=this._index.toString(),r.dataset.id=e,void 0!==t.index){var o=this._container.childNodes.length;if(t.index>=o)this._container.appendChild(r);else if(t.index<=0)this._container.insertBefore(r,this._container.firstChild);else{var i=this._container.childNodes[t.index];this._container.insertBefore(r,i)}}else"reverse"===t.direction?this._container.insertBefore(r,this._container.firstChild):this._container.appendChild(r);return this._windows.set(e,r),++this._index,r},e.prototype.unregisterWindow=function(e){this._storage.remove(e);var t=this._windows.get(e) +;void 0!==t&&(null!==t.parentElement&&t.parentElement.removeChild(t),this._windows.delete(e))},e.prototype.getZindex=function(e){var t=this.ensureWindow(e);return parseInt(t.style.zIndex||"0")},e.prototype.moveToTop=function(e){this.getZindex(e)!==this._index&&(this.ensureWindow(e).style.zIndex=(++this._index).toString())},e.prototype.removeWindow=function(e){this.unregisterWindow(e)},e}(),s=new WeakMap;function a(e){void 0===e&&(e=document);var t=e.getElementById("overlap-manager-root");if(null!==t)return Object(r.ensureDefined)(s.get(t));var n=new i(e),o=function(e){var t=e.createElement("div");return t.style.position="absolute",t.style.zIndex=150..toString(),t.style.top="0px",t.style.left="0px",t.id="overlap-manager-root",t}(e);return s.set(o,n),n.setContainer(o),e.body.appendChild(o),n}},swCq:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Icon=void 0;var r=n("mrSG"),o=n("q1tI");t.Icon=o.forwardRef((function(e,t){var n=e.icon,i=void 0===n?"":n,s=r.__rest(e,["icon"]);return o.createElement("span",r.__assign({},s,{ref:t,dangerouslySetInnerHTML:{__html:i}}))}))}}]); \ No newline at end of file diff --git a/public/charting_library/bundles/chart-widget-gui.5650b2a3d8cef650fbe8.js b/public/charting_library/bundles/chart-widget-gui.5650b2a3d8cef650fbe8.js new file mode 100644 index 00000000..f1887f3a --- /dev/null +++ b/public/charting_library/bundles/chart-widget-gui.5650b2a3d8cef650fbe8.js @@ -0,0 +1,55 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([["chart-widget-gui"],{"+jnJ":function(t,e,i){"use strict";i.d(e,"a",(function(){return s})),i.d(e,"b",(function(){return a}));i("YFKU"),i("EsMY");var s,o=i("m/cY"),n=i("Vdly");function l(t){return t===s.AlwaysOn||t===s.AlwaysOff?t:s.VisibleOnMouseOver}function a(t,e){var i,a;function r(){if(!i){i=Object(o.a)();var s=n.getValue(t);void 0===s&&void 0!==e&&(s=n.getValue(e)),i.setValue(l(s)),i.subscribe(i,(function(e){n.setValue(t,l(e.value()))}))}return i}return{property:r,availableValues:function(){return[{value:s.VisibleOnMouseOver,title:window.t("Visible on Mouse Over")},{value:s.AlwaysOn,title:window.t("Always Visible")},{value:s.AlwaysOff,title:window.t("Always Invisible")}]},actualBehavior:function(){if(!a){a=Object(o.a)();var t=r(),e=function(){var e=t.value();e!==s.AlwaysOn&&e!==s.AlwaysOff&&(e=Modernizr.mobiletouch?s.AlwaysOn:s.VisibleOnMouseOver),a&&a.setValue(e)};t.subscribe(a,e),e()}return a}}}!function(t){t.AlwaysOn="alwaysOn",t.VisibleOnMouseOver="visibleOnMouseOver",t.AlwaysOff="alwaysOff"}(s||(s={}))},"/NcV":function(t,e){t.exports=''},"0jws":function(t,e,i){t.exports={blockHidden:"blockHidden-pECc1q1w","pane-button":"pane-button-3IbFaPrJ"}},"1ANp":function(t,e,i){"use strict";i.d(e,"c",(function(){return n})),i.d(e,"d",(function(){return l})),i.d(e,"b",(function(){return a})),i.d(e,"a",(function(){return r}));var s,o=i("+jnJ"),n="NavigationButtons.visibility",l=(s=Object(o.b)(n)).property,a=s.availableValues,r=s.actualBehavior},"1Wf8":function(t,e){t.exports=''},"25b6":function(t,e,i){"use strict";i.d(e,"b",(function(){return n})),i.d(e,"c",(function(){return l})),i.d(e,"a",(function(){return a}));var s=/[<"'&>]/g,o=function(t){return"&#"+t.charCodeAt(0)+";"};function n(t){return t.replace(s,o)}function l(t){return void 0===t&&(t=""),t.replace(/\s+/g,"")}function a(t){return void 0===t&&(t=""),t.replace(/\b\w/g,(function(t){return t.toUpperCase()}))}},"2CEX":function(t,e){ +t.exports=''},"5Alx":function(t,e,i){t.exports={legend:"legend-29zvAld0",item:"item-3eXPhOmy",series:"series-12hzsxbp",withAction:"withAction-1y86Ymm9",selected:"selected-2qw9PFUJ",last:"last-3Xus0HXW",text:"text-1pYqyE6B",noWrapWrapper:"noWrapWrapper-AC879h-w",noWrap:"noWrap-ODIQgNap",valuesAdditionalWrapper:"valuesAdditionalWrapper-3BfAIuML",valueItem:"valueItem-3JDGGSt_",valueTitle:"valueTitle-1myNPdtH",valueValue:"valueValue-3kA0oJs5",valuesWrapper:"valuesWrapper-1ukbb5SP",directionColumn:"directionColumn-abL_Vsle",titleWrapper:"titleWrapper-1Zs2rjQ6",button:"button-22Ex8G2W",statusesWrapper:"statusesWrapper-GnubQvDb",buttonsWrapper:"buttonsWrapper-3eBZpnXm",buttons:"buttons-1-XhYDHM",noActions:"noActions-1D515O5o",title:"title-bcHj6pEn",title2nd:"title2nd-2igtq1cH",disabled:"disabled-3P6bUcMx",withCustomTextColor:"withCustomTextColor-Pw_dabsC",study:"study-lgC0tuTJ",title1st:"title1st-2at68hKe",hideValues:"hideValues-3JtC3-Os",has5Buttons:"has5Buttons-3tuydZU5",stayInHoveredMode:"stayInHoveredMode-3K55nNni",withTail:"withTail-2tfD0t7T",loading:"loading-37LPn65g",loader:"loader-iCjkbLoX",withDot:"withDot-VrJCTK--",title3rd:"title3rd-2bpagZ7H",title4th:"title4th-28_-ZX9R",miniHidden2Title:"miniHidden2Title-1xHUL0G8",microHidden2Title:"microHidden2Title-37EAZYGX",hidden3Title:"hidden3Title-22u6NoOK",flagged:"flagged-3lOrkL__",medium:"medium-2Vr6MA2I",minimized:"minimized-25_VM9I8",micro:"micro-1-90nTmg",onlyOneButtonCanBeStick:"onlyOneButtonCanBeStick-16Vrffc6",touchMode:"touchMode-2jC98z1-",buttonIcon:"buttonIcon-2lrp9MHZ",flag:"flag-1kqFt7GH",invisibleHover:"invisibleHover-qowat1V5",eye:"eye-3mqNMkLJ",hiddenLoading:"hiddenLoading-hcuRRcWh","eye-animation":"eye-animation-1pyfCZvS",markerContainer:"markerContainer-3MnDLQVD",flagWrapper:"flagWrapper-14Sd7MtI",sourcesWrapper:"sourcesWrapper-2JcXD9TK",newCollapser:"newCollapser-1F6pNRDi",sources:"sources-6Hp4M7li",toggler:"toggler-_SUZ7r_5 pane-button-3IbFaPrJ",counter:"counter-1hG1zy7A",iconArrow:"iconArrow-3q7vxxnz",objectTree:"objectTree-2tLil0dm",onlyOneSourceShown:"onlyOneSourceShown-1dCmMKoj",closed:"closed-1Sz6CztG",objectsTreeCanBeShown:"objectsTreeCanBeShown-2R_D8NJP"}},"61S9":function(t,e){ +t.exports=''},"6dGu":function(t,e){t.exports=''},"94TV":function(t,e){t.exports=''},"956S":function(t,e){t.exports=''},"9Crk":function(t,e){ +t.exports=''},"9lPX":function(t,e){t.exports=''},AH3n:function(t,e){t.exports=''},AvGy:function(t,e,i){"use strict";i.d(e,"a",(function(){return o}));var s=i("qFKp"),o=s.CheckMobile.any()},D8x7:function(t,e){t.exports=''},EV8o:function(t,e,i){"use strict";i.d(e,"a",(function(){return o}));var s=i("ogJP");function o(t,e,i,o,n){var l=document.createElement("div");l.className=e,l.classList.toggle(o,!t.visible.value()),Object.assign(l.dataset,t.dataset),void 0!==t.className&&l.classList.add(t.className),void 0!==t.title&&(l.classList.add("apply-common-tooltip"),l.setAttribute("title",t.title.value()),void 0!==t.hotKeyTitle&&(l.dataset.tooltipHotkey=t.hotKeyTitle)),l.addEventListener("touchend",t.action),l.addEventListener("mousedown",(function(e){0===e.button&&t.action(e)}));var a=document.createElement("div");a.classList.add(i);var r=t.iconMap.get(n)||"";return Object(s.isString)(r)?a.innerHTML=r:a.appendChild(r),l.appendChild(a),l}},G2LI:function(t,e){t.exports=''},GOhO:function(t,e,i){"use strict";var s=i("+DwS");i("tc+8");var o=i("m/cY");function n(t){for(var e=[],i=1;io.timeStamp)){var n=o.target;void 0!==i&&null!==e&&null!==n&&n.ownerDocument===s&&(e.contains(n)||i(o))}}return o.click&&s.addEventListener("click",n,!1),o.mouseDown&&s.addEventListener("mousedown",n,!1),o.touchEnd&&s.addEventListener("touchend",n,!1),o.touchStart&&s.addEventListener("touchstart",n,!1),function(){s.removeEventListener("click",n,!1),s.removeEventListener("mousedown",n,!1),s.removeEventListener("touchend",n,!1),s.removeEventListener("touchstart",n,!1)}}i.d(e,"a",(function(){return s}))},RgOa:function(t,e){t.exports=''},RspR:function(t,e,i){"use strict";i.d(e,"c",(function(){return l})),i.d(e,"b",(function(){return a})),i.d(e,"a",(function(){return r}));var s,o=i("+jnJ"),n=i("1ANp"),l=(s=Object(o.b)("PaneButtons.visibility",n.c)).property,a=s.availableValues,r=s.actualBehavior},S48P:function(t,e){ +t.exports=''},TGRH:function(t,e,i){"use strict";i.r(e),i.d(e,"ControlBarNavigation",(function(){return H}));var s,o=i("Eyy1"),n=(i("YFKU"),i("1ANp")),l=i("Ialn"),a=i("gWrr"),r=i("/DW5"),u=i("qFKp"),d=i("/3z9"),h=i("d700"),c=(i("JWMC"),i("MjtL")),p=i("e8Rm"),_=i("e2QN"),b=i("vg09"),g=i("/NcV"),m=i("94TV"),v=i("qfuz"),w=i("MQEA"),y=i("eYcT"),f=i("nFx7"),S=(i("jrhZ"),Object(r.b)({keys:["Alt","R"],text:"{0} + {1}"})),M=Object(r.b)({keys:["Alt","Click","Alt","Enter"],text:"{0} + {1}, {2} + {3}"}),C=Object(r.b)({keys:[v],text:"{0}"}),E=Object(r.b)({keys:[w],text:"{0}"}),V='
    \n\t
    \n\t\t
    \n\t\t\t
    \n\t\t\t\t'+p+'\n\t\t\t
    \n\t\t\t
    \n\t\t\t\t'+b+'\n\t\t\t
    \n\t\t
    \n\t\t
    \n\t\t\t
    \n\t\t\t\t'+y+'\n\t\t\t
    \n\t\t\t
    \n\t\t\t\t'+f+'\n\t\t\t
    \n\t\t
    \n\t\t
    \n\t\t\t
    \n\t\t\t\t'+c+'\n\t\t\t
    \n\t\t\t
    \n\t\t\t\t'+g+'\n\t\t\t
    \n\t\t
    \n\t\t
    \n\t\t\t
    \n\t\t\t\t'+_+"\n\t\t\t
    \n\t\t
    \n\t
    \n
    ",k='
    \n\t'+m+"\n
    ",T=u.CheckMobile.any(),x=((s={}).moving="wait_finishing",s.wait_finishing="stop",s.stop="moving",s),L={zoomInOut:!0,maximize:!0,scrollLeftRight:!0,resetScale:!0,goToRealtime:!0},H=function(){function t(t,e,i){ +this._widget=Object(o.ensureNotNull)(Object(a.a)(V).querySelector(".control-bar-wrapper")),this._controlBar=Object(o.ensureNotNull)(this._widget.querySelector(".control-bar")),this._back=Object(o.ensureNotNull)(Object(a.a)(k).querySelector(".control-bar__btn--back-present")),this._btnGroups=Array.from(this._controlBar.querySelectorAll(".js-btn-group")),this._backButtonVisible=!1,this._boundKeydownHandler=null,this._boundKeyupHandler=null,this._boundMouseHandler=null,this._chartModel=null,this._checkIntervalId=0,this._controlBarVisible=!1,this._currentDistance=0,this._deferredFinishTimeout=0,this._finishingTimeout=0,this._moveType="",this._movingTimeout=0,this._pressedKey=[],this._priceAxisChanged=null,this._resetAvailabilityChanged=null,this._priceAxisName="",this._rafId=0,this._startTime=0,this._state="stop",this._visibilityTypeProperty=null,this._boundUpdateMaximizeButtonsVisibility=this._updateMaximizeButtonsVisibility.bind(this),this._boundToggleFullscreenButtons=this._toggleFullscreenButtons.bind(this),this._paneWidth=0,this._leftPriceScaleWidth=0,this._rightPriceScaleWidth=0,this._chart=t,this._parent=e,this._options=Object.assign({},L,i),this._visibilityPrioritizedGroups=this._initGroupDescriptions(),this._init(),this._initHandlers(),this.updatePosition()}return t.prototype.destroy=function(){if(null!==this._visibilityTypeProperty&&(this._visibilityTypeProperty.unsubscribe(this,this._onVisibilityTypeChange),this._visibilityTypeProperty=null),null!==this._boundMouseHandler&&(this._parent.removeEventListener("mousemove",this._boundMouseHandler,!1),this._parent.removeEventListener("mouseleave",this._boundMouseHandler,!1),this._boundMouseHandler=null),null!==this._boundKeydownHandler&&(this._parent.ownerDocument.removeEventListener("keydown",this._boundKeydownHandler),this._boundKeydownHandler=null),null!==this._boundKeyupHandler&&(this._parent.ownerDocument.removeEventListener("keyup",this._boundKeyupHandler),this._boundKeyupHandler=null),clearTimeout(this._movingTimeout),null!==this._priceAxisChanged&&(this._priceAxisChanged.unsubscribe(this,this._updateBackBtnPosition),this._priceAxisChanged=null),clearInterval(this._checkIntervalId),null!==this._resetAvailabilityChanged){this._resetAvailabilityChanged.unsubscribe(this,this._updateResetScalesButtonVisibility);var t=this._chart.getResizerDetacher();t.fullscreenable.unsubscribe(this._boundUpdateMaximizeButtonsVisibility),t.fullscreen.unsubscribe(this._boundToggleFullscreenButtons),this._resetAvailabilityChanged=null}this._chart=null},t.prototype.updatePosition=function(){var t=this._chart.paneWidgets();if(0!==t.length){this._paneWidth=t[0].width(),this._leftPriceScaleWidth=this._chart.getPriceAxisMaxWidthByName("left"),this._rightPriceScaleWidth=this._chart.getPriceAxisMaxWidthByName("right");var e=this._chart.timeAxisHeight()+this._bottomMargin();this._widget.style.bottom=e+"px",this._back.style.bottom=e+"px",this._updateBtnGroupVisibility()}},t.prototype._bottomMargin=function(){var t,e=this._chart.paneWidgets() +;return(null!==(t=this._chart.maximizedPaneWidget())&&void 0!==t?t:e[e.length-1]).containsMainSeries()?32:5},t.prototype._init=function(){var t=this;if(u.CheckMobile.any())for(var e=0,i=this._btnGroups;e=i.left-100&&t.clientX<=i.right+100&&t.clientY>=i.top-s&&t.clientY<=i.bottom+100}this._controlBarVisible!==e&&(this._controlBarVisible=e,null===this._rafId&&(this._rafId=this._controlBar.ownerDocument.defaultView.requestAnimationFrame(this._updateControlBarVisibility.bind(this))))}},t.prototype._updateControlBarVisibility=function(){this._rafId=null,this._controlBar.classList.toggle("control-bar--hidden",!this._controlBarVisible)},t.prototype._updateBackBtnPosition=function(){if("left"===this._priceAxisName||"right"===this._priceAxisName){ +var t=this._chart.getPriceAxisMaxWidthByName(this._priceAxisName)+14;t&&(this._back.style.marginRight=t+"px")}},t.prototype._updateBtnGroupVisibility=function(){for(var t=this._leftPriceScaleWidth+this._paneWidth,e=(t+this._rightPriceScaleWidth)/2,i=2*Math.min(t-e,e-this._leftPriceScaleWidth)-50-50,s=!1,o=0,n=this._visibilityPrioritizedGroups;o=0&&!s,s=s||!l.enoughSpaceForGroup),!l.enoughSpaceForGroup!==l.element.classList.contains("js-hidden")&&l.element.classList.toggle("js-hidden",!l.enoughSpaceForGroup)}this._updateControlBarPosition()},t.prototype._getBtnGroup=function(t){return Object(o.ensureDefined)(this._btnGroups.find((function(e){return e.classList.contains(t)})))},t.prototype._updateControlBarPosition=function(){var t=this._visibilityPrioritizedGroups.reduce((function(t,e){return t+(e.enoughSpaceForGroup?e.totalWidth:0)}),0),e=(this._paneWidth+this._leftPriceScaleWidth+this._rightPriceScaleWidth)/2-Math.ceil(t/2);this._widget.style.left=e+"px"},t.prototype._updateResetScalesButtonVisibility=function(){if(null!==this._chartModel){var t=this._chartModel.model().isScalesResetAvailable();this._buttons.turn.classList.toggle("control-bar__btn--btn-hidden",!t)}},t.prototype._updateMaximizeButtonsVisibility=function(){this._updateBtnGroupVisibility()},t.prototype._toggleFullscreenButtons=function(){var t=this._chart.getResizerDetacher().fullscreen.value();this._buttons.maximize.classList.toggle("js-hidden",t),this._buttons.minimize.classList.toggle("js-hidden",!t)},t.prototype._isMaximizeButtonAvailable=function(){return this._options.maximize,!1},t.prototype._move=function(t){var e=this;if(null!==this._chartModel&&"stop"===this._state&&this._chartModel.beginUndoMacro(1===t?"Move Left":"Move Right"),this._state=x.stop,this._moveType="animated",this._deferredFinishTimeout&&(clearTimeout(this._deferredFinishTimeout),this._deferredFinishTimeout=0),this._finishingTimeout&&(clearTimeout(this._finishingTimeout),this._finishingTimeout=0),this._startTime=Date.now(),0===this._movingTimeout){var i=this._startTime,s=function(){e._moveStep(i,0,50*t,1e3),e._movingTimeout=setTimeout(s,10)};this._movingTimeout=setTimeout(s,10)}},t.prototype._moveStep=function(t,e,i,s){if(null!==this._chartModel&&!this._chartModel.timeScale().isEmpty()){var o=Date.now();o1||!isFinite(n))&&(n=1);var l=1-Math.pow(1-n,3);return this._currentDistance=(i-e)*l+e,this._chartModel.scrollChart(this._currentDistance),n}},t.prototype._finishMove=function(){var t=this;clearTimeout(this._movingTimeout),this._movingTimeout=0,this._deferredFinishTimeout=0;var e=this._currentDistance,i=Date.now(),s=function(){var o=t._moveStep(i,e,0,700);o&&o<1?t._finishingTimeout=setTimeout(s,10):null!==t._chartModel&&(t._state=x.wait_finishing,t._moveType="",t._movingTimeout=0,t._currentDistance=0,t._chartModel.endUndoMacro())};this._finishingTimeout=setTimeout(s,10)},t.prototype._stopMove=function(){ +"moving"===this._state&&(this._state=x.moving,Date.now()-this._startTime<200?this._deferredFinishTimeout=setTimeout(this._finishMove.bind(this),200-(Date.now()-this._startTime)):this._finishMove())},t.prototype._moveByBar=function(t){var e=this;if(null!==this._chartModel){var i=this._chartModel.timeScale();if(i.isEmpty())return;if("stop"===this._state&&this._chartModel.beginUndoMacro(1===t?"Move Left":"Move Right"),null!==i.visibleBarsStrictRange()){var s=i.indexToCoordinate(i.visibleBarsStrictRange().lastBar())+i.barSpacing()/2;Math.abs(i.width()-s)>i.barSpacing()/6&&this._chartModel.scrollChart(i.width()-s)}if(this._state=x.stop,this._moveType="by_bar",this._startTime=Date.now(),!this._movingTimeout){var o=0,n=150,l=function(){e._moveByBarStep(t),o++,n>100&&(n-=o/5*20),e._movingTimeout=setTimeout(l,n)};this._movingTimeout=setTimeout(l,400),this._moveByBarStep(t)}}},t.prototype._moveByBarStep=function(t){if(null!==this._chartModel){if(this._chartModel.timeScale().isEmpty())return;this._chartModel.scrollChartByBar(t)}},t.prototype._stopMoveByBar=function(){"moving"===this._state&&(clearTimeout(this._movingTimeout),this._movingTimeout=0,this._state=x.wait_finishing,this._moveType="",this._movingTimeout=0,this._currentDistance=0,null!==this._chartModel&&this._chartModel.endUndoMacro())},t.prototype._keydownHandler=function(t){var e,i=Object(d.hashFromEvent)(t),s=255&i,o=Object(d.modifiersFromEvent)(t);if(37===s)e=1;else{if(39!==s)return;e=-1}d.isMacKeyboard&&o===d.Modifiers.Mod||o!==d.Modifiers.Mod&&o!==d.Modifiers.Alt&&o!==d.Modifiers.None||Object(h.a)(i,t.target)||this._pressedKey[s]||(this._pressedKey[s]=!0,o===d.Modifiers.None?this._moveByBar(e):this._move(e),t.preventDefault())},t.prototype._keyupHandler=function(t){var e=Object(d.hashFromEvent)(t);if(!Object(h.a)(e,t.target)){var i=255&e,s=Object(d.modifiersFromEvent)(t);37!==i&&39!==i||s!==d.Modifiers.Mod&&s!==d.Modifiers.Alt&&s!==d.Modifiers.None||(this._pressedKey[i]=!1,"by_bar"===this._moveType?this._stopMoveByBar():this._stopMove())}},t.prototype._trackEvent=function(t){0},t}()},Tq3g:function(t,e){t.exports=''},Uua9:function(t,e){t.exports=''},VrXG:function(t,e){ +t.exports=''},VrrN:function(t,e){t.exports=''},WYzw:function(t,e){t.exports=''},"Y+EN":function(t,e){t.exports=''},YGQl:function(t,e){t.exports=''},ZKFq:function(t,e,i){t.exports={"css-value-pane-controls-padding-left":"1px","css-value-pane-controls-padding-right":"5px",paneControls:"paneControls-3t_VmRy0",hasTopMargin:"hasTopMargin-2samtQKI",hidden:"hidden-3ndYaA31",forceHidden:"forceHidden-2qoGxuLX",button:"button-1T73noHe pane-button-3IbFaPrJ",buttonIcon:"buttonIcon-1vsadlK4",minimize:"minimize-UL6CPYKt",newButton:"newButton-2UJTRB7V",touchMode:"touchMode-33C2amJm",maximize:"maximize-2gtRCsC0","maximize-animation-up-bracket":"maximize-animation-up-bracket-PKA42SoI","maximize-animation-down-bracket":"maximize-animation-down-bracket-6VpX9y4d","minimize-animation-up-bracket":"minimize-animation-up-bracket-1ZcEx180","minimize-animation-down-bracket":"minimize-animation-down-bracket-2sZM5-ln",up:"up-3-Dp9Ytc","up-animation":"up-animation-2oGxHhg9",down:"down-2qp_j-xN","down-animation":"down-animation-28i3s7Bs",buttonsWrapper:"buttonsWrapper-326cDko9"}},bNWL:function(t,e){ +t.exports=''},cbig:function(t,e){t.exports=''},e2QN:function(t,e){t.exports=''},e8Rm:function(t,e){t.exports=''},eYcT:function(t,e){t.exports=''},fBig:function(t,e,i){t.exports={loader:"loader-1ON1rkY9",loaderItem:"loaderItem-6asdclOe","loader-animation":"loader-animation-1vbmOmyN",shown:"shown-1QFCxvPl",touchMode:"touchMode-I-CBM3V3"}},fk9O:function(t,e){t.exports=''},gKdq:function(t,e){t.exports=''},i9xP:function(t,e){ +t.exports=''},jXu8:function(t,e){t.exports=''},jrhZ:function(t,e,i){t.exports={"animation-minimize-corner-left-top":"animation-minimize-corner-left-top-1QFR0TYG","animation-minimize-corner-right-top":"animation-minimize-corner-right-top-2OigqFDd","animation-minimize-corner-right-bottom":"animation-minimize-corner-right-bottom-171Xjuh0","animation-minimize-corner-left-bottom":"animation-minimize-corner-left-bottom-Gj_EWVOk","animation-maximize-corner-left-top":"animation-maximize-corner-left-top-1dOMET94","animation-maximize-corner-right-top":"animation-maximize-corner-right-top-X6SjWmdM","animation-maximize-corner-right-bottom":"animation-maximize-corner-right-bottom-2lZ_pYbV","animation-maximize-corner-left-bottom":"animation-maximize-corner-left-bottom-28bRbB5v"}},ku84:function(t,e){t.exports=''},lvAK:function(t,e,i){"use strict";i.r(e);var s=i("RspR"),o=i("3ClC"),n=(i("LVLx"),i("Eyy1")),l=i("eJTA"),a=i("+jnJ"),r=i("AvGy"),u=i("EV8o"),d=i("ZKFq"),h=i("0jws"),c=function(){function t(t,e,i){this._parentEl=document.createElement("div"),this._listActionsWrapperEl=null,this._listActionsElements={},this._actionsSpawns={},this._onMouseEnterLeaveEventHandler=null,this._mouseOverWidget=!1,this._wrapEl=t,this._onMouseEnterLeaveEventHandler=this._onMouseEnterLeaveEvent.bind(this),this._wrapEl.addEventListener("mouseenter",this._onMouseEnterLeaveEventHandler),this._wrapEl.addEventListener("mouseleave",this._onMouseEnterLeaveEventHandler),this._actions=e,this._globalVisibility=i.globalVisibility.spawn(),this._globalVisibility.subscribe(this._updatePaneControlsWidgetVisibility.bind(this)),this._visibilityType=i.visibilityType.spawn(),this._visibilityType.subscribe(this._updatePaneControlsWidgetVisibility.bind(this)),this._doNotSwitchToContextMenuMode=i.doNotSwitchToContextMenuMode,this._themedColor=i.themedColor.spawn(),this._themedColor.subscribe(this._updateThemedColor.bind(this));for(var s=0,o=Object.entries(this._actions);s0){var e=Object(l.parseRgb)(t),i=e[0],s=e[1],o=e[2];this._parentEl.style.color=Object(l.rgbaToString)([i,s,o,Object(l.normalizeAlphaComponent)(.8)])}else this._parentEl.style.removeProperty("color")},t}(),p=i("7KDR"),_=i("5VQP"),b=i("obM5"),g=i("fk9O"),m=i("gKdq"),v=i("WYzw");function w(t,e){var i=Object(n.ensureNotNull)(e.target);return function(t){var e=[];if(t.maximize.visible.value()){var i=Object(n.ensure)(t.maximize.title),s=Object(n.ensureNotNull)(t.maximize.action);e.push(new p.Action({icon:v,label:i.value(),statName:"Maximize Pane",shortcutHint:y,onExecute:function(){return s()}}))}else if(t.minimize.visible.value()){i=Object(n.ensure)(t.minimize.title);var o=Object(n.ensureNotNull)(t.minimize.action);e.push(new p.Action({icon:v,label:i.value(),statName:"Minimize Pane",shortcutHint:y,onExecute:function(){return o()}}))}if(t.up.visible.value()){i=Object(n.ensure)(t.up.title);var l=Object(n.ensureNotNull)(t.up.action);e.push(new p.Action({icon:g,label:i.value(),statName:"Move pane up",onExecute:function(){return l()}}))}if(t.down.visible.value()){i=Object(n.ensure)(t.down.title);var a=Object(n.ensureNotNull)(t.down.action);e.push(new p.Action({icon:m,label:i.value(),statName:"Move pane down",onExecute:function(){return a()}}))}if(t.close.visible.value()){i=Object(n.ensure)(t.close.title);var r=Object(n.ensureNotNull)(t.close.action);e.push(new p.Action({icon:b,label:i.value(),statName:"Delete pane",onExecute:function(){return r()}}))}return _.ContextMenuManager.createMenu(e)}(t).then((function(t){return t.show((function(t){var e=i.getBoundingClientRect();return{clientX:e.right-t,clientY:e.top+e.height+3}})),t}))}var y=window.t("Double click");var f=i("hY0g"),S=i.n(f),M=i("EsvI"),C=i("/DW5"),E=i("OJSF"),V=i("PXSR"),k=i("QEZv"),T=i("ku84"),x=i("i9xP"),L=i("1Wf8"),H=i("956S");i.d(e,"PaneControlsWidget",(function(){return I}));var B=Modernizr.mobiletouch,W=window.t("Delete pane"),A=window.t("Move pane up"),O=window.t("Move pane down"),P=window.t("Maximize pane"),D=window.t("Restore pane"),z=window.t("Manage panes"),j=window.t("Double click"),N=Object(C.b)({keys:[""],text:j}),I=function(){function t(t,e,i,o,n){var l=this;this._actions={},this._moreActionCM=null,this._themedColor=new S.a(""),this._model=t,this._paneWidget=e,this._callbacks=o,this._closeButtonVisibility=new S.a(this._getCloseButtonVisibility()),this._upButtonVisibility=new S.a(this._getUpButtonVisibility()), +this._downButtonVisibility=new S.a(this._getDownButtonVisibility()),this._maximizeButtonVisibility=new S.a(this._getMaximizeButtonVisibility()),this._minimizeButtonVisibility=new S.a(this._getMinimizeButtonVisibility()),this._createActions(),this._visibilityTypeProperty=Object(s.a)(),this._visibilityTypeProperty.subscribe(this,(function(t){l._visibilityType.setValue(t.value())})),this._visibilityType=new S.a(this._visibilityTypeProperty.value()),this._isPaneMaximize=new S.a(this._getIsPaneMaximizeValue()),this._isWidgetShow=new S.a(this._getIsWidgetShow()),this._backgroundThemeName=i.backgroundThemeName,this._renderer=new c(n,this._actions,{visibilityType:this._visibilityType.readonly(),globalVisibility:this._isWidgetShow.readonly(),doNotSwitchToContextMenuMode:this._isPaneMaximize.readonly(),themedColor:this._themedColor.readonly()})}return t.prototype.destroy=function(){this._visibilityTypeProperty.unsubscribeAll(this),this._renderer.destroy()},t.prototype.getElement=function(){return this._renderer.getElement()},t.prototype.action=function(){return this._actions},t.prototype.update=function(){this._updateButtonsVisibility(),this._isPaneMaximize.setValue(this._getIsPaneMaximizeValue()),this._isWidgetShow.setValue(this._getIsWidgetShow())},t.prototype.updateWidgetModeByWidth=function(t){this._renderer.updateWidgetModeByWidth(t)},t.prototype.updateThemedColors=function(t){null===t&&(t=Object(M.getStdThemedValue)("chartProperties.paneProperties.background",this._backgroundThemeName.value())),this._themedColor.setValue(t||"")},t.prototype._updateButtonsVisibility=function(){this._closeButtonVisibility.setValue(this._getCloseButtonVisibility()),this._upButtonVisibility.setValue(this._getUpButtonVisibility()),this._downButtonVisibility.setValue(this._getDownButtonVisibility()),this._maximizeButtonVisibility.setValue(this._getMaximizeButtonVisibility()),this._minimizeButtonVisibility.setValue(this._getMinimizeButtonVisibility())},t.prototype._createActions=function(){this._actions.up={iconMap:new Map([["large",V],["small",V]]),action:this._onUpDownButton.bind(this,"up"),visible:this._upButtonVisibility,title:new S.a(A),className:d.up,dataset:{name:"pane-button-up"}},this._actions.down={iconMap:new Map([["large",k],["small",k]]),action:this._onUpDownButton.bind(this,"down"),visible:this._downButtonVisibility,title:new S.a(O),className:d.down,dataset:{name:"pane-button-down"}},this._actions.close={iconMap:new Map([["large",E],["small",E]]),action:this._onCloseButton.bind(this),visible:this._closeButtonVisibility,title:new S.a(W),dataset:{name:"pane-button-close"}},this._actions.maximize={iconMap:new Map([["large",L],["small",T]]),action:this._onToggleMaximizeButton.bind(this),visible:this._maximizeButtonVisibility,title:new S.a(P),hotKeyTitle:N,className:d.maximize,dataset:{name:"pane-button-maximize"}},this._actions.minimize={iconMap:new Map([["large",L],["small",T]]),action:this._onToggleMaximizeButton.bind(this),visible:this._minimizeButtonVisibility,title:new S.a(D),hotKeyTitle:N,className:d.minimize,dataset:{ +name:"pane-button-minimize"}},this._actions.more={iconMap:new Map([["large",H],["small",x]]),action:this._showButtonsInContextMenu.bind(this),visible:new S.a(!B),title:new S.a(z),dataset:{name:"pane-button-more"}}},t.prototype._getCloseButtonVisibility=function(){var t=this._paneWidget.state(),e=!1;return t.containsMainSeries()||t.isMaximized()||B||(e=t.dataSources().some((function(t){return Object(o.isStudy)(t)}))),e},t.prototype._onCloseButton=function(){var t=this._model.model().panes().indexOf(this._paneWidget.state());this._model.removePane(t)},t.prototype._getUpButtonVisibility=function(){var t=this._paneWidget.state();return this._model.model().panes().indexOf(t)>0&&!t.isMaximized()&&!B},t.prototype._getDownButtonVisibility=function(){var t=this._paneWidget.state(),e=this._model.model().panes();return e.indexOf(t)1&&!t.isMaximized()&&!B},t.prototype._getMinimizeButtonVisibility=function(){var t=this._paneWidget.state();return this._model.model().panes().length>1&&t.isMaximized()},t.prototype._onToggleMaximizeButton=function(){this._callbacks.toggleMaximizePane(this._paneWidget)},t.prototype._showButtonsInContextMenu=function(t){var e=this;t.preventDefault(),null!==this._moreActionCM&&this._moreActionCM.isShown()?this._moreActionCM=null:w(this._actions,t).then((function(t){e._moreActionCM=t}))},t.prototype._getIsPaneMaximizeValue=function(){return this._paneWidget.state().isMaximized()},t.prototype._getIsWidgetShow=function(){return this._model.model().panes().length>1},t}()},nFx7:function(t,e){t.exports=''},obM5:function(t,e){t.exports=''}, +qfuz:function(t,e){t.exports=''},rGGD:function(t,e){t.exports=''},rh3U:function(t,e,i){t.exports={"css-value-small-size":"18px","css-value-border-radius-small-size":"9px","css-value-large-size":"22px","css-value-border-radius-large-size":"11px",statuses:"statuses-29yrFaoA",statusItem:"statusItem-1gsKvHgg",small:"small-3_g6DSwX",large:"large-2E_Sb0cV",blinking:"blinking-2Xm4xMXd",oneWidgetsVisible:"oneWidgetsVisible-17p3P_dQ",twoWidgetsVisible:"twoWidgetsVisible-3kEfsgAz",threeWidgetsVisible:"threeWidgetsVisible-sIjrbNL1","blinking-animation":"blinking-animation-1jTWzbXG",marketStatusOpen:"marketStatusOpen-2d8WAYHQ",marketStatusClose:"marketStatusClose-2LgI3IBx",marketStatusPre:"marketStatusPre-3tiNWinG",marketStatusPost:"marketStatusPost-1wCjJrHi",marketStatusHoliday:"marketStatusHoliday-HyAcvqXa",invalidSymbol:"invalidSymbol-2tnvnmzm",replayMode:"replayMode-2O_B03jx",notAccurate:"notAccurate-2qEIEgim","blinking-color-animation-notaccurate":"blinking-color-animation-notaccurate-IBDzDS-b",delay:"delay-NXuSKUfA","blinking-color-animation-delay":"blinking-color-animation-delay-37meAg0d",eod:"eod-TNCDZArR","blinking-color-animation-eod":"blinking-color-animation-eod-1k5aef9K",dataProblemHigh:"dataProblemHigh-2SJE6Anp",dataProblemLow:"dataProblemLow-iRGvvWWe"}},sAH5:function(t,e,i){"use strict";i.r(e);var s=i("mrSG"),o=i("Eyy1"),n=i("hY0g"),l=i.n(n),a=i("ogJP"),r=i("eJTA"),u=i("Kxc7"),d=i("AvGy"),h=(i("LVLx"),i("bdgK")),c=i("EV8o"),p=i("S8xo"),_=i("GUQs"),b=i("fBig"),g=function(){function t(t,e){void 0===e&&(e={}),this._loadingEl=null,this._parentEl=t,this._options=e,this._renderLoading()}return t.prototype.toggleVisibility=function(t){null!==this._loadingEl&&this._loadingEl.classList.toggle(b.shown,t)},t.prototype._renderLoading=function(){this._loadingEl=document.createElement("span"),this._loadingEl.classList.add(b.loader),this._options.className&&this._loadingEl.classList.add(this._options.className),this._loadingEl.innerHTML='\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t',this._parentEl.appendChild(this._loadingEl)},t}(),m=i("5Alx"),v=i("0jws"),w=i("qFKp");function y(t,e){null===t.firstChild?t.textContent=e:t.firstChild.nodeValue=e}var f=w.CheckMobile.any(),S=[m.title1st,m.title2nd,m.title3rd,m.title4th];var M=function(){function t(t,e,i){this._el=null,this._firstBlockWrapper=null,this._titleParentEl=null,this._titleElements=[],this._valuesParentEl=null,this._valuesAdditionalWrapperEl=null,this._valuesElements=[],this._actionsParentEl=null,this._actionAdditionalWrapperEl=null,this._stayInHoveredMode=!1,this._mode=4,this._statusesWrapper=null, +this._resizeObserver=null,this._hideInvisibleHover=null,this._hideValues=null,this._allButtonsWidth=null,this._lastStatusesWrapperWidth=null,this._lastActionsWrapperWidth=null,this._showActionsHandler=null,this._hideActionsHandler=null,this._selectedSourceHandler=null,this._mouseEventHandlers=[],this._disableTimeout=null,this._loader=null,this._model=t,this._parentEl=e,this._disabled=this._model.disabled().spawn(),this._disabled.subscribe(this._updateDisabledState.bind(this)),this._selected=this._model.selected().spawn(),this._selected.subscribe(this._updateSelectedState.bind(this)),this._loading=this._model.loading().spawn(),this._loading.subscribe(function(t,e){var i=0;return function(s){clearTimeout(i),Boolean(s)?t():i=setTimeout(t,e,!1)}}(this._updateLoadingState.bind(this),700)),this._isTitleHidden=this._model.isTitleHidden().spawn(),this._isValuesHidden=this._model.isValuesHidden().spawn(),this._isRowHidden=this._model.isRowHidden().spawn(),this._isTitleHidden.subscribe(this._updateShowTitles.bind(this)),this._isValuesHidden.subscribe(this._updateShowValues.bind(this)),this._isRowHidden.subscribe(this._updateShowLine.bind(this)),this._titlesSpawns=this._model.titles().map((function(t){return t.spawn()}));for(var s=0;s0?(i.appendChild(document.createTextNode(s)),i.classList.add(m.withDot)):i.classList.add(v.blockHidden),t.appendChild(i),this._titleElements.push(i)}},t.prototype._renderActions=function(){if(this._withActions){null===this._actionsParentEl&&(this._actionsParentEl=document.createElement("div"),this._actionsParentEl.classList.add(m.buttonsWrapper),this._parentEl.append(this._actionsParentEl),this._actionAdditionalWrapperEl=document.createElement("div"),this._actionAdditionalWrapperEl.classList.add(m.buttons),this._actionsParentEl.appendChild(this._actionAdditionalWrapperEl));for(var t=Object(o.ensureNotNull)(this._actionAdditionalWrapperEl),e=d.a?"large":"small",i=0,s=this._model.actions();i0}))},t.prototype._addStatusesWidget=function(t,e,i){this._statusesWrapper=document.createElement("div"),this._statusesWrapper.classList.add(m.statusesWrapper),this._statusesWrapper.appendChild(t),Object(o.ensureNotNull)(this._firstBlockWrapper).appendChild(this._statusesWrapper),this._hideInvisibleHover=e.spawn(),this._hideInvisibleHover.subscribe(this._updateInvisibleHoverMode.bind(this),{callWithLast:!0}),this._hideValues=i.spawn(),this._hideValues.subscribe(this._updateHideValuesMode.bind(this),{callWithLast:!0}),this._updateStatusWidgetVisibility(this._disabled.value()),this._resizeObserver=new h.default(this._handlerRestrictTitleWidth.bind(this)),null!==this._actionsParentEl&&this._resizeObserver.observe(this._actionsParentEl),this._resizeObserver.observe(this._statusesWrapper)},t.prototype._updateTitleMaxWidth=function(){if(null!==this._firstBlockWrapper){var t=this._allButtonsWidth||0,e=(this._lastActionsWrapperWidth||0)+(this._lastStatusesWrapperWidth||0);this._isWidthButtonsMode()?this._firstBlockWrapper.style.maxWidth="calc(100% - "+Math.max(t,e)+"px)":this._firstBlockWrapper.style.maxWidth=e>0?"calc(100% - "+e+"px)":""}},t.prototype._updateAllButtonsWidth=function(){this._allButtonsWidth=this._getButtonsCount()*z,this._updateTitleMaxWidth()},t.prototype._updateInvisibleHoverMode=function(t){null!==this._el&&this._el.classList.toggle(m.invisibleHover,!t)},t.prototype._updateHideValuesMode=function(t){null!==this._el&&this._el.classList.toggle(m.hideValues,t)},t.prototype._showActions=function(){if(null!==this._el&&this._withActions){this._el.classList.add(m.withAction);var t=null!==this._valuesParentEl&&null!==this._titleParentEl&&this._valuesParentEl.offsetTop===this._titleParentEl.offsetTop;this._el.classList.toggle(m.withTail,t),this._updateTitleMaxWidth()}},t.prototype._hideActions=function(){null!==this._el&&this._withActions&&!this._stayInHoveredMode&&(this._el.classList.remove(m.withAction),null!==this._valuesParentEl&&this._valuesParentEl.classList.remove(m.withTail),this._updateTitleMaxWidth())},t.prototype._handlerRestrictTitleWidth=function(t){if(null!==this._actionsParentEl&&null!==this._firstBlockWrapper){for(var e=null,i=null,s=0,o=t;s0||(t.title.value()||"").length>0}))},e.prototype._updateValuesTitleHTMLElHandler=function(t,e){void 0===e&&(e="");var i=Object(o.ensure)(this._valuesElements[t].title);y(i,e),i.classList.toggle(v.blockHidden,0===e.length),this._updateShowValues()}, +e.prototype._isWidthButtonsMode=function(){return null!==this._el&&(void 0!==this._flagged&&Boolean(this._flagged.value())||t.prototype._isWidthButtonsMode.call(this))},e.prototype._updateFlaggedState=function(){void 0!==this._flagged&&(Object(o.ensureNotNull)(this._el).classList.toggle(m.flagged,Boolean(this._flagged.value())),this._updateTitleMaxWidth())},e}(M),E=w.isSafari?"click":"auxclick",V=function(t){function e(e,i,s){var o=t.call(this,e,i,s)||this;return o._wheelClickHandler=null,o._canUpdateRowVisibility=!0,o._globalRowVisibility=o._model.globalVisibility().spawn(),o._globalRowVisibility.subscribe(o._updateShowLine.bind(o),{callWithLast:!0}),o._has5Buttons=o._model.isPineScriptDataSource().spawn(),o._has5Buttons.subscribe(o._update5ButtonsStyles.bind(o)),o._updateStates(!o._disabled.value()),s.statusWidgetEl&&o._addStatusesWidget(s.statusWidgetEl,s.hideInvisibleHover,s.hideValues),o._selected.subscribe(o._updateTitleMaxWidth.bind(o)),s.withActions&&(o._wheelClickHandler=o._onWheelClicked.bind(o),null!==o._titleParentEl&&o._titleParentEl.addEventListener(E,o._wheelClickHandler)),o}return Object(s.__extends)(e,t),e.prototype.destroy=function(){t.prototype.destroy.call(this),this._has5Buttons.destroy(),this._globalRowVisibility&&this._globalRowVisibility.destroy(),null!==this._wheelClickHandler&&null!==this._titleParentEl&&this._titleParentEl.removeEventListener(E,this._wheelClickHandler)},e.prototype._updateShowLine=function(){if(null!==this._el&&this._canUpdateRowVisibility){var e=!this._globalRowVisibility.value();e?this._el.classList.toggle(v.blockHidden,e):t.prototype._updateShowLine.call(this)}},e.prototype._getButtonsCount=function(){switch(this._mode){case 4:return this._has5Buttons.value()?5:4;case 3:return 3;default:return 2}},e.prototype._render=function(){t.prototype._render.call(this);var e=Object(o.ensureNotNull)(this._el);e.classList.add(m.item,m.study),e.dataset.name="legend-source-item"},e.prototype._renderValues=function(){null===this._valuesParentEl&&(this._valuesParentEl=document.createElement("div"),this._valuesParentEl.classList.add(m.valuesWrapper),this._valuesAdditionalWrapperEl=document.createElement("div"),this._valuesAdditionalWrapperEl.classList.add(m.valuesAdditionalWrapper),this._valuesParentEl.appendChild(this._valuesAdditionalWrapperEl));for(var t=Object(o.ensureNotNull)(this._valuesAdditionalWrapperEl),e=0,i=this._values.value();e0){var e=Object(r.parseRgb)(t),i=e[0],s=e[1],o=e[2];this._el.style.backgroundColor=Object(r.rgbaToString)([i,s,o,Object(r.normalizeAlphaComponent)(.8)])}else this._el.style.removeProperty("background-color")}, +t.prototype._updateSourceCount=function(t){y(Object(o.ensureNotNull)(this._counterEl),String(t));var e=Object(o.ensureNotNull)(this._el),i=t<1;e.classList.toggle(v.blockHidden,i);var s=1===t;e.classList.toggle(m.onlyOneSourceShown,s)},t.prototype._updateCounterVisibility=function(t){if(null!==this._counterEl){var e=1===t;this._counterEl.classList.toggle(v.blockHidden,e)}},t.prototype._updateState=function(){var t=!this._isStateOpen.value();this._parentEl.classList.toggle(m.closed,t),this._updateTooltip(),Ai((t?"Hide":"Show")+" not main sources")},t.prototype._tooltip=function(){return 1===this._mode?W:this._isStateOpen.value()?H:B},t.prototype._updateTooltip=function(){null!==this._el&&this._el.setAttribute("title",this._tooltip())},t.prototype._updateObjectTreeVisibility=function(t){Object(o.ensureNotNull)(this._el).classList.toggle(m.objectsTreeCanBeShown,t)},t}(),O=i("+6II"),P=i("R5JZ");function D(t,e){var i=new l.a(e(t.value()));t.subscribe((function(t){i.setValue(e(t))}));return i.readonly().spawn((function(){return t.unsubscribe()}))}var z=d.a?44:28,j=u.enabled("object_tree_legend_mode"),N=function(){function t(t,e){this._renderToggler=null,this._mainDataSourceRenderer=null,this._dataSourceRenderers=[],this._wrapText=null,this._parentEl=document.createElement("div"),this._mainDataSourceEl=null,this._dataSourcesEl=null,this._dataSourcesAdditionalWrapperEl=null,this._collapsedDataSourcesWrapperEl=null,this._collapsedDataSourcesEl=null,this._outsideEventForCollapsedTooltip=null,this._options=t,this._togglerOptions=e,this._isStudiesLegendHidden=t.isStudiesLegendHidden.spawn(),this._isStudiesLegendHidden.subscribe(this._updateLegendVisibility.bind(this)),this._isAllLegendHidden=t.isAllLegendHidden.spawn(),this._isAllLegendHidden.subscribe(this._updateLegendVisibility.bind(this)),this._updateLegendVisibility(),this._themedColor=t.themedColor.spawn(),this._themedColor.subscribe(this._setCustomBg.bind(this)),this._showBackground=t.showBackground.spawn(),this._showBackground.subscribe(this._setCustomBg.bind(this)),this._backgroundTransparency=t.backgroundTransparency.spawn(),this._backgroundTransparency.subscribe(this._setCustomBg.bind(this)),this._collapsedDataSourcesCountSpawn=t.collapsedDataSourcesCount.spawn(),this._collapsedDataSourcesCountSpawn.subscribe(this._updateCollapsedSourcesCount.bind(this)),this._showCollapsedDataSourcesTooltipHandler=this._showCollapsedDataSourcesTooltip.bind(this),d.a||(this._wrapText=t.wrapText.spawn(),this._wrapText.subscribe(this._updateWrapText.bind(this)),this._updateWrapText(this._wrapText.value())),this._parentEl.classList.add(m.legend),this._parentEl.classList.toggle(m.noActions,!this._options.withActions),this._parentEl.classList.toggle(m.touchMode,d.a),this._parentEl.classList.toggle(m.newCollapser,!0),this._parentEl.dataset.name="legend",this._parentEl.style.setProperty("--legend-source-item-button-width",z+"px"),this._parentEl.addEventListener("contextmenu",(function(e){e.preventDefault(),t.showLegendWidgetContextMenu(e)}))}return t.prototype.destroy=function(){ +if(this._isStudiesLegendHidden.destroy(),this._isAllLegendHidden.destroy(),this._themedColor.destroy(),this._showBackground.destroy(),this._backgroundTransparency.destroy(),this._collapsedDataSourcesCountSpawn.destroy(),d.a&&null!==this._collapsedDataSourcesWrapperEl&&this._collapsedDataSourcesWrapperEl.removeEventListener("touchend",this._showCollapsedDataSourcesTooltipHandler),this._outsideEventForCollapsedTooltip&&this._outsideEventForCollapsedTooltip(),null!==this._wrapText&&this._wrapText.destroy(),null!==this._dataSourcesAdditionalWrapperEl&&(this._dataSourcesAdditionalWrapperEl.innerHTML="",this._dataSourcesAdditionalWrapperEl=null),null!==this._dataSourcesEl&&(this._dataSourcesEl.innerHTML="",this._dataSourcesEl=null),null!==this._renderToggler&&(this._renderToggler.destroy(),this._renderToggler=null),null!==this._mainDataSourceRenderer&&(this._mainDataSourceRenderer.destroy(),this._mainDataSourceRenderer=null),0!==this._dataSourceRenderers.length){for(var t=0,e=this._dataSourceRenderers;t0},t.prototype._getEyeTitle=function(){return this._disabled.value()?q:J},t.prototype._getDisabledState=function(){return!this._source.properties().visible.value()},t.prototype._updateRowVisibilities=function(){this._isRowHidden.setValue(this._getRowHiddenValue())},t.prototype._getRowHiddenValue=function(){return this._options.readOnlyMode&&this._disabled.value()||this._isTitleHidden.value()&&(this._isValuesHidden.value()||this._disabled.value())},t.prototype._calcNewPosition=function(t){var e={};if(function(t){return t.hasOwnProperty("touches")}(t)&&t.touches.length>0)e={clientX:t.touches[0].clientX,clientY:t.touches[0].clientY};else if(null!==t.target){var i=t.target.getBoundingClientRect();e={clientX:Object(G.isRtl)()?i.right:i.left,clientY:i.top+i.height+3}}else{var s=t;e={clientX:s.clientX,clientY:s.clientY}}return e},t}(),Q=i("z4c1"),$=i("61S9"),tt=i("vWJB"),et=i("wZiV"),it=window.t("More"),st=window.t("Flag Symbol"),ot=window.t("Unflag Symbol"),nt=u.enabled("show_hide_button_in_legend"),lt=function(t){function e(e,i,s,o,n){var a=t.call(this,e,i,s,o,n)||this;a._titles=[new l.a(""),new l.a(""),new l.a(""),new l.a("")],a._symbolMarker=null,a._symbolMarkerIcon=null,a._flagged=new l.a(null),a._symbolAction=null,a._symbol=null,a._isOneButtonCanBeStick=!1,a._createActions(),a._updateSymbolMarker(),a._model.model().properties().paneProperties.legendProperties.showSeriesTitle.subscribe(a,(function(){a._isTitleHidden.setValue(a._getTitleHiddenValue())}));for(var r=0,u=[a._model.model().properties().paneProperties.legendProperties.showSeriesOHLC,a._model.model().properties().paneProperties.legendProperties.showBarChange];r0;if(0===e.length){var o={value:new l.a(""),color:new l.a(""),visible:new l.a(s),title:new l.a(i)},n=t.items().map((function(t){return{value:new l.a(t.value()),color:new l.a(Z(t.color())),visible:new l.a(t.visible()),title:new l.a(t.title())}}));this._values.setValue([o].concat(n))}else{e[0].title.setValue(i),e[0].visible.setValue(s);for(var a=t.items(),r=0;r0&&(n.push.apply(n,a),n.push(new Ct.Separator))}var r=t.model().properties().paneProperties.legendProperties;n.push(new Ct.Action({checkable:!0,checked:r.showSeriesTitle.value(),label:Lt,statName:"Show Symbol",onExecute:function(){return Tt(t,r.showSeriesTitle,"Change Symbol Description Visibility")}})),e.showOpenMarketStatus&&n.push(new Ct.Action({checkable:!0,checked:Vt.b.value(),label:Ht,statName:"Show Open market status",onExecute:function(){return Tt(t,Vt.b,"Change open market status visibility")}}));if(n.push(new Ct.Action({checkable:!0,checked:r.showSeriesOHLC.value(),label:Bt,statName:"Show OHLC Values",onExecute:function(){return Tt(t,r.showSeriesOHLC,"Change OHLC Values Visibility")}})),n.push(new Ct.Action({checkable:!0,checked:r.showBarChange.value(),label:Wt,statName:"Show Bar Change Values",onExecute:function(){return Tt(t,r.showBarChange,"Change Bar Change Visibility")}})),n.push(new Ct.Separator),void 0!==l){var u=l.get(0);void 0!==u&&u.length>0&&(n.push.apply(n,u),n.push(new Ct.Separator))}var d=s.get(1);if(void 0!==d){var h=d.get(1);void 0!==h&&h.length>0&&(n.push.apply(n,h),n.push(new Ct.Separator))}if(n.push(new Ct.Action({checkable:!0,checked:r.showStudyTitles.value(),label:At, +statName:"Show Indicator Titles",onExecute:function(){return Tt(t,r.showStudyTitles,"Change Indicator Titles Visibility")}})),n.push(new Ct.Action({checkable:!0,checked:r.showStudyArguments.value(),label:Ot,statName:"Show Indicator Arguments",onExecute:function(){return Tt(t,r.showStudyArguments,"Change Indicator Arguments Visibility")}})),n.push(new Ct.Action({checkable:!0,checked:r.showStudyValues.value(),label:Pt,statName:"Show Indicator Values",onExecute:function(){return Tt(t,r.showStudyValues,"Change Indicator Values Visibility")}})),void 0!==d){var c=d.get(0);void 0!==c&&c.length>0&&(n.push.apply(n,c),n.push(new Ct.Separator))}0;e.settings&&(n.push(new Ct.Separator),n.push(new Ct.Action({label:window.t("Settings..."),icon:kt,statName:"Settings...",onExecute:function(){return i(U.TabNames.legend)}})));return Et.ContextMenuManager.createMenu(n,{},o)}(t,e,i,s,n).then((function(t){return t.show(o),t}))}var Lt=window.t("Show Symbol"),Ht=window.t("Show Open market status"),Bt=window.t("Show OHLC Values"),Wt=window.t("Show Bar Change Values"),At=window.t("Show Indicator Titles"),Ot=window.t("Show Indicator Arguments"),Pt=window.t("Show Indicator Values");window.t("Wrap text"),w.CheckMobile.any();var Dt=i("+DwS"),zt=i("HGP3"),jt=i("GOhO"),Nt=i("25b6"),It=i("rh3U"),Rt=function(){function t(t){this.isBlinkingMode=new l.a(!1),this._status=new l.a(null),this._fullTooltip=new l.a(null),this._iconClassNames=new l.a(null),this._visible=new l.a(!1),this._tooltip=new l.a(null),this._icon=new l.a(null),this._className=new l.a(null),this._infoMaps=t,this._size=t.size||"small",this._status.subscribe(this._updateByStatus.bind(this),{callWithLast:!0}),this._className.subscribe(this._updateIconClassName.bind(this))}return t.prototype.turnOffBlinkingMode=function(){},t.prototype.status=function(){return this._status},t.prototype.tooltip=function(){return this._tooltip},t.prototype.icon=function(){return this._icon},t.prototype.className=function(){return this._className},t.prototype.visible=function(){return this._visible},t.prototype.size=function(){return this._size},t.prototype.fullInfo=function(){return this._fullTooltip},t.prototype._getTooltip=function(t){var e,i;return null!==(i=null===(e=this._infoMaps.tooltipMap)||void 0===e?void 0:e.get(t))&&void 0!==i?i:null},t.prototype._getIcon=function(t){var e,i=this._infoMaps.iconMap.get(t);return void 0!==i&&(e=i.get(this._size)),e||null},t.prototype._getClassName=function(t){return this._infoMaps.classNameMap.get(t)||null},t.prototype._getTitle=function(t){var e,i;return null!==(i=null===(e=this._infoMaps.titleMap)||void 0===e?void 0:e.get(t))&&void 0!==i?i:null},t.prototype._getTitleColor=function(t){var e,i;return null!==(i=null===(e=this._infoMaps.titleColorMap)||void 0===e?void 0:e.get(t))&&void 0!==i?i:null},t.prototype._getHtml=function(t){var e,i,o;return Object(s.__awaiter)(this,void 0,void 0,(function(){return Object(s.__generator)(this,(function(s){ +return[2,null!==(o=null===(i=null===(e=this._infoMaps.htmlMap)||void 0===e?void 0:e.get(t))||void 0===i?void 0:i.map(Nt.b))&&void 0!==o?o:null]}))}))},t.prototype._getAction=function(t){var e,i;return null!==(i=null===(e=this._infoMaps.actionMap)||void 0===e?void 0:e.get(t))&&void 0!==i?i:null},t.prototype._updateFullTooltipByStatus=function(t){return Object(s.__awaiter)(this,void 0,void 0,(function(){var e;return Object(s.__generator)(this,(function(i){switch(i.label){case 0:return[4,this._getHtml(t)];case 1:return e=i.sent(),this._status.value()!==t?[2]:(this._fullTooltip.setValue([{icon:this._icon.value(),iconClassName:this._iconClassNames.value(),title:this._getTitle(t),titleColor:this._getTitleColor(t),html:e,size:this._size,action:this._getAction(t)}]),[2])}}))}))},t.prototype._updateByStatus=function(t){if(null===t)return this._icon.setValue(null),this._tooltip.setValue(null),void this._visible.setValue(!1);this._icon.setValue(this._getIcon(t)),this._className.setValue(this._getClassName(t)),this._tooltip.setValue(this._getTooltip(t)),this._visible.setValue(!0),this._updateFullTooltipByStatus(t)},t.prototype._updateIconClassName=function(t){null!==t?this._iconClassNames.setValue([It.statusItem,t]):this._iconClassNames.setValue(null)},t}(),Ft=i("Vdly"),Gt=[];function Ut(){return Ft.getJSON("tv.alreadyBlinkedStatuses",Gt)}var Xt=new l.a(Ut());Ft.onSync.subscribe(null,(function(){return Xt.setValue(Ut())})) +;var Kt=Xt,Zt=i("Cf1E"),qt=i("VrrN"),Jt=i("VrXG"),Yt=i("LIcf"),Qt=i("Uua9"),$t=i("9Crk"),te=i("Tq3g"),ee=Object(dt.getLogger)("Chart.LegendWidget"),ie=new Map([["DelayToRealtime",new Map([["small",qt],["large",Jt]])],["DelayNoRealtime",new Map([["small",qt],["large",Jt]])],["TFEXDelayForGuest",new Map([["small",qt],["large",Jt]])],["MOEXDelayForGuest",new Map([["small",qt],["large",Jt]])],["EOD",new Map([["small",Yt],["large",Qt]])],["TickByTick",new Map([["small",$t],["large",te]])],["BATSToRealtime",new Map([["small",$t],["large",te]])]]),se=new Map([["DelayToRealtime",It.delay],["DelayNoRealtime",It.delay],["TFEXDelayForGuest",It.delay],["MOEXDelayForGuest",It.delay],["EOD",It.eod],["TickByTick",It.notAccurate],["BATSToRealtime",It.notAccurate]]),oe=new Map([["DelayToRealtime",zt.colorsPalette["color-delay-mode"]],["DelayNoRealtime",zt.colorsPalette["color-delay-mode"]],["TFEXDelayForGuest",zt.colorsPalette["color-delay-mode"]],["MOEXDelayForGuest",zt.colorsPalette["color-delay-mode"]],["EOD",zt.colorsPalette["color-eod-mode"]],["TickByTick",zt.colorsPalette["color-notaccurate-mode"]],["BATSToRealtime",zt.colorsPalette["color-notaccurate-mode"]]]),ne=window.t("Data is delayed"),le=window.t("End of day data"),ae=window.t("One update per second"),re=window.t("Cboe BZX"),ue=Object(Nt.b)(window.t("{symbolName} data is delayed by {time} minutes.")),de=Object(Nt.b)(window.t("{listedExchange} real-time data is available for free to registered users.")),he=Object(Nt.b)(window.t("To get real-time data for {description}, please buy the real-time data package.")),ce=Object(Nt.b)(window.t("Real-time data for {description} is not supported right now. We may support it in the future.")),pe=Object(Nt.b)(window.t("Data is updated once a day.")),_e=Object(Nt.b)(window.t("Data on our Basic plan is updated once per second, even if there are more updates on the market.")),be=Object(Nt.b)(window.t("Data is updated once per second, even if there are more updates on the market.")),ge=Object(Nt.b)(window.t("Paid plans feature faster data updates.")),me=Object(Nt.b)(window.t("Real-time data for {symbolName} is provided by {exchange} exchange.")),ve=Object(Nt.b)(window.t("This data is real-time, but it’s slightly different to its official counterpart coming from primary exchanges.")),we=(window.t("Create a free account"),window.t("Learn more"),function(t){function e(e,i,s){var o=t.call(this,{iconMap:ie,classNameMap:se,titleColorMap:oe,size:i})||this;return o._dataUpdatedMode=new l.a(null).spawn(),o._options=s,o._model=e,o._dataModeBlinkingStatuses=Kt.spawn(),o._dataModeBlinkingStatuses.subscribe(o._updateBlinkingMode.bind(o)),o.turnOffBlinkingMode=o._turnOffBlinking.bind(o),o.setModel(e),o}return Object(s.__extends)(e,t),e.prototype.destroy=function(){this._dataUpdatedMode.destroy(),this._dataModeBlinkingStatuses.destroy()},e.prototype.setModel=function(t){if(this._dataUpdatedMode.destroy(),null===t)return this._model=t,void(this._dataUpdatedMode=new l.a(null).spawn());this._dataUpdatedMode=t.status().spawn(), +this._dataUpdatedMode.subscribe(this._updateStatus.bind(this),{callWithLast:!0})},e.prototype._getTooltip=function(){var t=this._getShortTexts();return null===t?null:Object.values(t).join(" · ")},e.prototype._updateFullTooltipByStatus=function(){return Object(s.__awaiter)(this,void 0,void 0,(function(){var t,e,i,o,n,l,a,r;return Object(s.__generator)(this,(function(s){switch(s.label){case 0:return null===(t=this._dataUpdatedMode.value())?(this._fullTooltip.setValue(null),[2]):(e=this._getShortTexts(),[4,this._getHtmls()]);case 1:return i=s.sent(),[4,this._getActions()];case 2:if(o=s.sent(),t!==this._dataUpdatedMode.value())return[2];for(n=[],l=0,a=t;l"+o+""})),null!==o&&"DelayNoRealtime"===u&&e[u].push(ce.format({description:""+o+""})),this._options.subscriptionFullInfo&&(u.includes("TFEXDelayForGuest")||u.includes("MOEXDelayForGuest"))&&e[u].push(de.format({listedExchange:this._model.listedExchange()}))),"EOD"===u&&(e[u]=[pe]),"TickByTick"===u&&(e[u].push(this._options.subscriptionFullInfo?_e:be),this._options.subscriptionFullInfo&&e[u].push(ge)),null!==n&&"BATSToRealtime"===u&&e[u].push(me.format({symbolName:i,exchange:n}),ve);return Object.keys(e).length>0?[2,e]:[2,null]}}))}))},e.prototype._getActions=function(){return Object(s.__awaiter)(this,void 0,void 0,(function(){var t,e,i,o,n;return Object(s.__generator)(this,(function(s){switch(s.label){case 0:return null===this._dataUpdatedMode.value()||null===this._model?[2,null]:(t={},[3,4]);case 1:return i0?[2,t]:[2,null]}}))}))},e.prototype._getShortTexts=function(){var t=this._dataUpdatedMode.value();if(null===t)return null;for(var e={},i=0,s=t;i0?e:null},e.prototype._updateBlinkingMode=function(){var t=this._dataUpdatedMode.value();if(null!==t){for(var e=this._dataModeBlinkingStatuses.value(),i=0,s=t;i1&&(o-=2);var n=this.element.getBoundingClientRect(),l={x:n.left-o,y:n.bottom+4};this._onClickCallback(l)},t.prototype._updateTooltip=function(){this.element.setAttribute("title",this._tooltips.value().join(" · "))},t.prototype._updateSpecialClassAndTooltip=function(){var t=this._visibleWidgetsCount.value();this.element.classList.toggle(It.oneWidgetsVisible,1===t),this.element.classList.toggle(It.twoWidgetsVisible,2===t),this.element.classList.toggle(It.threeWidgetsVisible,3===t),this._updateTooltip()},t.prototype._updateBlinkingMode=function(){var t=this._blinkingSpawns.some((function(t){return t.value()}));this.element.classList.toggle(It.blinking,t)},t +}(),qe=i("9lPX"),Je=i("MyT/"),Ye=i("jXu8"),Qe=i("cbig"),$e=i("G2LI"),ti=i("QkND"),ei=i("Gp/h"),ii=i("S48P"),si=window.t("Market open"),oi=window.t("Pre-market"),ni=window.t("Post-market"),li=window.t("Market closed"),ai=window.t("Holiday"),ri=window.t("All's well — Market is open."),ui=window.t("Morning. Market is open for pre-market trading."),di=window.t("Evening. Market is open for post-market trading."),hi=window.t("Time for a walk — this market is closed."),ci=window.t("Market is currently on holiday. Lucky them."),pi=new Map([["market",new Map([["small",Je],["large",Ye]])],["pre_market",new Map([["small",ei],["large",ii]])],["post_market",new Map([["small",$e],["large",ti]])],["out_of_session",new Map([["small",qe],["large",qe]])],["holiday",new Map([["small",Qe],["large",Qe]])]]),_i=new Map([["market",It.marketStatusOpen],["pre_market",It.marketStatusPre],["post_market",It.marketStatusPost],["out_of_session",It.marketStatusClose],["holiday",It.marketStatusHoliday]]),bi=new Map([["market",si],["pre_market",oi],["post_market",ni],["out_of_session",li],["holiday",ai]]),gi=new Map([["market",si],["pre_market",oi],["post_market",ni],["out_of_session",li],["holiday",ai]]),mi=new Map([["market",zt.colorsPalette["color-market-open"]],["pre_market",zt.colorsPalette["color-pre-market"]],["post_market",zt.colorsPalette["color-post-market"]],["out_of_session",zt.colorsPalette["color-market-closed"]],["holiday",zt.colorsPalette["color-market-holiday"]]]),vi=new Map([["market",[ri]],["pre_market",[ui]],["post_market",[di]],["out_of_session",[hi]],["holiday",[ci]]]),wi=new Map([["market",null],["pre_market",null],["post_market",null],["out_of_session",null],["holiday",null]]),yi=window.t("You can turn this data on or off."),fi=function(t){function e(e,i,s){var o=t.call(this,{tooltipMap:bi,iconMap:pi,classNameMap:_i,titleMap:gi,titleColorMap:mi,htmlMap:vi,actionMap:wi,size:i})||this;return o._marketStatus=new l.a(null).spawn(),o._options=s,o.setModel(e),o}return Object(s.__extends)(e,t),e.prototype.destroy=function(){this._marketStatus.destroy()},e.prototype.setModel=function(t){this._marketStatus.destroy(),null!==t?(this._marketStatus=t.status().spawn(),this._marketStatus.subscribe(this._updateStatus.bind(this),{callWithLast:!0})):this._marketStatus=new l.a(null).spawn()},e.prototype._getHtml=function(e){return Object(s.__awaiter)(this,void 0,void 0,(function(){var i;return Object(s.__generator)(this,(function(s){switch(s.label){case 0:return[4,t.prototype._getHtml.call(this,e)];case 1:return null!==(i=s.sent())&&(this._options.preMarketSolution||this._options.postMarketSolution)&&("pre_market"===e&&this._options.preMarketSolution&&i.push(yi),"post_market"===e&&this._options.postMarketSolution&&i.push(yi)),[2,i]}}))}))},e.prototype._getAction=function(e){return t.prototype._getAction.call(this,e)},e.prototype._updateStatus=function(t){this._status.setValue(t)},e}(Rt),Si=i("JWMC");var Mi=function(){function t(t,e,i){this.visibleWidgetsCount=new l.a(0),this.errorWidgetIsShown=new l.a(!1),this._size=d.a?"large":"small", +this._tooltips=new l.a([]),this._visibilitySpawns=[],this._tooltipSpawns=[],this._statusWidgetInfos=[],this._renderer=new Ze(this._size,this.visibleWidgetsCount,this._tooltips,{onClick:this._handleToggleDropdown.bind(this)}),this._symbolInvalidViewModel=null,this._dataSourceErrorStatusViewModel=null,this._marketStatusViewModel=null,this._dataUpdatedModeViewModel=null,this._dataProblemViewModel=null,this._isSymbolInvalid=null,this._dataSourceHasErrorVisible=null,this._studyErrorCanBeShown=new l.a(!1),this._marketStatusCanBeShown=new l.a(!1),this._dataUpdatedModeCanBeShown=new l.a(!1),this._dataProblemCanBeShown=new l.a(!1),this._isDataProblemCritical=null,this._container=document.createElement("div"),this._menuOpened=!1,this._menuPosition=null,this._source=t,this._model=e,this._options=i,this._recreateWidgets(),this._addSubscriptionForSymbolInvalid(),null!==this._dataSourceHasErrorVisible&&(this._dataSourceHasErrorVisible.subscribe(this._updateStatusWidgetsVisibilities.bind(this)),this._dataSourceHasErrorVisible.subscribe(this._updateErrorWidgetIsShown.bind(this))),this._options.dataProblemEnabled&&null!==this._isDataProblemCritical&&this._isDataProblemCritical.subscribe(this._updateStatusWidgetsVisibilities.bind(this));for(var s=0,o=this._tooltipSpawns;s0&&t.push(i)}this._tooltips.setValue(t)},t.prototype._recreateWidgets=function(){var t,e=this;if(this._options.sourceStatusesEnabled){if(Object(at.isStudy)(this._source)||Object(at.isStudyStub)(this._source)||this._source===this._model.mainSeries()){null===(t=this._isSymbolInvalid)||void 0===t||t.destroy();var i=this._source;if(this._isSymbolInvalid=Object(Dt.a)(i.isSymbolInvalid.bind(this._source),i.onStatusChanged()),null===this._symbolInvalidViewModel){this._symbolInvalidViewModel=new Oe(this._isSymbolInvalid,{tooltipMap:Re,iconMap:Ne,classNameMap:Ie,titleMap:Fe,titleColorMap:Ge,htmlMap:Ue,actionMap:Xe,size:this._size});var s=this._symbolInvalidViewModel.visible().spawn();this._visibilitySpawns.push(s),this._tooltipSpawns.push(this._symbolInvalidViewModel.tooltip().spawn());var n={visible:s,model:this._symbolInvalidViewModel};this._statusWidgetInfos.push(n),this._renderer.addStatusModel(n)}else this._symbolInvalidViewModel.updateStatus(this._isSymbolInvalid),this._addSubscriptionForSymbolInvalid()}if(Object(at.isStudy)(this._source)||Object(at.isStudyStub)(this._source))if(null===this._dataSourceErrorStatusViewModel){this._dataSourceErrorStatusViewModel=new Te(this._source,this._size,this._options.sourceStatuses),this._dataSourceHasErrorVisible=Object(X.a)((function(){return e._studyErrorCanBeShown.value()&&Object(o.ensureNotNull)(e._dataSourceErrorStatusViewModel).visible().value()}),this._studyErrorCanBeShown,this._dataSourceErrorStatusViewModel.visible()),this._visibilitySpawns.push(this._dataSourceHasErrorVisible),this._tooltipSpawns.push(this._dataSourceErrorStatusViewModel.tooltip().spawn());var l={visible:this._dataSourceHasErrorVisible,model:this._dataSourceErrorStatusViewModel};this._statusWidgetInfos.push(l),this._renderer.addStatusModel(l)}else this._dataSourceErrorStatusViewModel.setSource(this._source)}if(this._options.marketStatusEnabled){var a=this._source.marketStatusModel();if(null===this._marketStatusViewModel){this._marketStatusViewModel=new fi(a,this._size,this._options.marketStatus);s=Object(X.a)((function(){return e._marketStatusCanBeShown.value()&&Object(o.ensureNotNull)(e._marketStatusViewModel).visible().value()}),this._marketStatusCanBeShown,this._marketStatusViewModel.visible());this._visibilitySpawns.push(s),this._tooltipSpawns.push(this._marketStatusViewModel.tooltip().spawn());var r={visible:s,model:this._marketStatusViewModel};this._statusWidgetInfos.push(r), +this._renderer.addStatusModel(r)}else this._marketStatusViewModel.setModel(a)}if(this._options.dataUpdateModeEnabled){var u=this._source.dataUpdatedModeModel();if(null===this._dataUpdatedModeViewModel){this._dataUpdatedModeViewModel=new we(u,this._size,this._options.dataUpdateMode);s=Object(X.a)((function(){return e._dataUpdatedModeCanBeShown.value()&&Object(o.ensureNotNull)(e._dataUpdatedModeViewModel).visible().value()}),this._dataUpdatedModeCanBeShown,this._dataUpdatedModeViewModel.visible());this._visibilitySpawns.push(s),this._tooltipSpawns.push(this._dataUpdatedModeViewModel.tooltip().spawn());var d={visible:s,model:this._dataUpdatedModeViewModel};this._statusWidgetInfos.push(d),this._renderer.addStatusModel(d)}else this._dataUpdatedModeViewModel.setModel(u)}if(this._options.dataProblemEnabled){var h=this._source.dataProblemModel();if(null===this._dataProblemViewModel){this._dataProblemViewModel=new Ae(h,this._size),this._isDataProblemCritical=this._dataProblemViewModel.isDataProblemCritical().spawn();s=Object(X.a)((function(){return e._dataProblemCanBeShown.value()&&Object(o.ensureNotNull)(e._dataProblemViewModel).visible().value()}),this._dataProblemCanBeShown,this._dataProblemViewModel.visible());this._visibilitySpawns.push(s),this._tooltipSpawns.push(this._dataProblemViewModel.tooltip().spawn());d={visible:s,model:this._dataProblemViewModel};this._statusWidgetInfos.push(d),this._renderer.addStatusModel(d)}else this._dataProblemViewModel.setModel(h)}},t.prototype._addSubscriptionForSymbolInvalid=function(){this._options.sourceStatusesEnabled&&null!==this._isSymbolInvalid&&(this._isSymbolInvalid.subscribe(this._updateStatusWidgetsVisibilities.bind(this)),this._isSymbolInvalid.subscribe(this._updateErrorWidgetIsShown.bind(this),{callWithLast:!0}))},t.prototype._updateErrorWidgetIsShown=function(){var t,e,i,s,o=null!==(e=null===(t=this._isSymbolInvalid)||void 0===t?void 0:t.value())&&void 0!==e&&e,n=null!==(s=null===(i=this._dataSourceHasErrorVisible)||void 0===i?void 0:i.value())&&void 0!==s&&s;this.errorWidgetIsShown.setValue(o||n)},t.prototype._handleToggleDropdown=function(t){var e;this._menuPosition=t,this._menuOpened=!this._menuOpened,this._menuOpened&&(this._source.properties().hasChild("symbol")&&this._source.properties().symbol.listeners().subscribe(this,this._handleDropdownMenuClose),e="Open full tooltip for statuses: "+this._tooltips.value().join(", "),Object(Si.trackEvent)("GUI","Statuses widget's action",e)),this._updateDropdownMenu()},t.prototype._handleDropdownMenuClose=function(){this._menuOpened=!1,this._source.properties().hasChild("symbol")&&this._source.properties().symbol.listeners().unsubscribeAll(this),this._updateDropdownMenu()},t.prototype._updateDropdownMenu=function(){var t=this;Promise.all([i.e("react"),i.e(4),i.e(24),i.e(92),i.e(0),i.e(2),i.e("full-tooltips-popup")]).then(i.bind(null,"vR7+")).then((function(e){e.render(t._menuOpened,t._container,t._renderer.element,t._statusWidgetInfos,t._handleDropdownMenuClose.bind(t),Object(o.ensureNotNull)(t._menuPosition))}))},t +}(),Ci=i("AH3n"),Ei=window.t("Replay mode"),Vi=window.t("You're in Replay mode. You're in Replay mode. You're in Replay mode."),ki=(new Map([[!0,new Map([["small",Ci],["large",Ci]])],[!1,new Map([["small",""],["large",""]])]]),new Map([[!0,It.replayMode],[!1,null]]),new Map([[!0,Ei],[!1,null]]),new Map([[!0,Ei],[!1,null]]),new Map([[!0,zt.colorsPalette["color-replay-mode"]],[!1,null]]),new Map([[!0,[Vi]],[!1,null]]),new Map([[!0,null],[!1,null]]),function(t){function e(e,i,s){var o=t.call(this,e,i,s)||this;return o._isInReplay=new l.a(!1).readonly().spawn(),o._isInReplayCanBeShown=null,o._inited=!1,o}return Object(s.__extends)(e,t),e.prototype.destroy=function(){t.prototype.destroy.call(this)},e.prototype._updateStatusWidgetsVisibilities=function(){t.prototype._updateStatusWidgetsVisibilities.call(this)},e.prototype._isPrimaryWidgetShown=function(){var e,i;return t.prototype._isPrimaryWidgetShown.call(this)||null!==(i=null===(e=this._isInReplay)||void 0===e?void 0:e.value())&&void 0!==i&&i},e}(Mi)),Ti=i("PoSe"),xi=i.n(Ti),Li=i("EsvI");i.d(e,"trackLegendEvent",(function(){return Ai})),i.d(e,"LegendWidget",(function(){return Oi}));var Hi={readOnlyMode:!1,contextMenu:{settings:!0,mainSeries:!0,studies:!0,showOpenMarketStatus:!1},symbolMarkerEnabled:!1,showToggleButton:!0,canShowSourceCode:!1,statusesWidgets:{sourceStatusesEnabled:!1,sourceStatuses:{errorSolution:!0},marketStatusEnabled:!1,marketStatus:{preMarketSolution:!0,postMarketSolution:!0},dataUpdateModeEnabled:!1,dataUpdateMode:{subscriptionFullInfo:!0},dataProblemEnabled:!1}},Bi=(u.enabled("hide_legend_by_default"),u.enabled("fundamental_widget")),Wi=u.enabled("legend_context_menu");function Ai(t){Object(Si.trackEvent)("GUI","Legend action",t)}var Oi=function(){function t(t,e,i,o,n,r){var u=this;this._mainSeriesViewModel=null,this._dataSourceViewModels=[],this._visibleDataSourceCount=new l.a(0),this._themedColor=new l.a(""),this._mainSeriesRowHidden=null,this._dataSourceRowsHidden=[],this._customWidgetsVisibilities=[],this._allLegendHidden=new l.a(!1),this._studiesLegendHidden=new l.a(!1),this._onLegendVisibilityToggled=null,this._availableHeight=0,this._collapsedDataSourcesCount=new l.a(0),this._collapsedDataSourcesTitle=new l.a(""),this._mainSeriesStatusWidget=null,this._dataSourcesStatusesWidgets=[],this._size=null,this._customLegendWidgetsFactoriesMap=new Map,this._customLegendWidgetsMap=new Map,this._model=t,this._paneWidget=e,this._options=Object(a.merge)(Object(a.clone)(Hi),n),this._callbacks=r,this._mainSeriesViewModelsOptions={readOnlyMode:this._options.readOnlyMode,symbolMarkerEnabled:this._options.symbolMarkerEnabled},this._dataSourceViewModelsOptions=Object(s.__assign)(Object(s.__assign)({},this._mainSeriesViewModelsOptions),{canShowSourceCode:this._options.canShowSourceCode}),this._backgroundThemeName=i;var d=this._showLegendCalculatedProperty();this._isDataSourcesCollapsed=new l.a(d.value()),d.subscribe(this,(function(){u._isDataSourcesCollapsed.setValue(d.value())}));var h=new l.a(this._getCustomTextColorValue()) +;this._model.model().properties().scalesProperties.textColor.subscribe(this,(function(){h.setValue(u._getCustomTextColorValue())}));var c=this._model.model().properties().paneProperties.legendProperties.showBackground,p=new l.a(c.value());c.subscribe(this,(function(){p.setValue(c.value())}));var _=this._model.model().properties().paneProperties.legendProperties.backgroundTransparency,b=new l.a(_.value());_.subscribe(this,(function(){b.setValue(_.value())})),this._wrapText=new l.a(!1),this._hideNotMainSources=o.spawn(),this._hideNotMainSources.subscribe(this._updateVisibilityNotMainSources.bind(this)),this._isPaneMain=new l.a(this._getIsPaneMainValue()),this._updateCollapsedSourcesModeThrottle=xi()(this._updateCollapsedSourcesMode.bind(this),100),this._renderer=new N({withActions:!this._options.readOnlyMode,showToggleButton:this._options.showToggleButton,isStudiesLegendHidden:this._studiesLegendHidden.readonly(),isAllLegendHidden:this._allLegendHidden.readonly(),customTextColor:h.readonly(),themedColor:this._themedColor.readonly(),showBackground:p.readonly(),backgroundTransparency:b.readonly(),wrapText:this._wrapText.readonly(),collapsedDataSourcesCount:this._collapsedDataSourcesCount.readonly(),collapsedDataSourcesTitle:this._collapsedDataSourcesTitle.readonly(),showLegendWidgetContextMenu:this.onShowLegendWidgetContextMenu.bind(this)},{visibleDataSourceCount:this._visibleDataSourceCount.readonly(),isDataSourcesCollapsed:this._isDataSourcesCollapsed.readonly(),showObjectsTree:this._isPaneMain.readonly(),onCollapseDataSources:this.onCollapseDataSources.bind(this),onShowObjectsTreeDialog:this._callbacks.showObjectsTreeDialog})}return t.prototype.destroy=function(){this._hideNotMainSources.destroy(),null!==this._mainSeriesViewModel&&this._destroyMainDataSource();for(var t=0,e=this._dataSourceViewModels;t-1?(i.splice(n,1),Bi||null!==this._mainSeriesViewModel||(this._mainSeriesViewModel=new lt(this._model,s,this._mainSeriesViewModelsOptions,this._callbacks,this._options.contextMenu),this._mainSeriesStatusWidget=new ki(s,this._model.model(),this._options.statusesWidgets),this._renderer.addMainDataSource(this._mainSeriesViewModel,this._mainSeriesStatusWidget)),this._addCustomWidgetForLayerBlock(0)):null!==this._mainSeriesViewModel&&(this._destroyMainDataSource(),this._destroyCustomWidgetFromLayerBlock(0));var l=[],a=[],r=this._dataSourceViewModels.length;if(0===r)for(var u=i.length-1;u>=0;u--)l.push(new Mt(this._model,i[u],this._dataSourceViewModelsOptions,this._callbacks,this._options.contextMenu)),a.push(new Mi(i[u],this._model.model(),this._options.statusesWidgets));else{var d=0;for(u=i.length-1;u>=0;u--)this._dataSourceViewModels[d]?(this._dataSourceViewModels[d].updateSource(i[u]),this._dataSourcesStatusesWidgets[d].updateSource(i[u])):(l.push(new Mt(this._model,i[u],this._dataSourceViewModelsOptions,this._callbacks,this._options.contextMenu)),a.push(new Mi(i[u],this._model.model(),this._options.statusesWidgets))),d++;for(;this._dataSourceViewModels.length>d;)Object(o.ensureDefined)(this._dataSourceViewModels.pop()).destroy();for(;this._dataSourcesStatusesWidgets.length>d;)Object(o.ensureDefined)(this._dataSourcesStatusesWidgets.pop()).destroy()}0!==l.length&&(this._renderer.addDataSources(l,a),(t=this._dataSourceViewModels).push.apply(t,l),(e=this._dataSourcesStatusesWidgets).push.apply(e,a)),r!==this._dataSourceViewModels.length&&this._updateCollapsedSourcesMode(),this._dataSourceViewModels.length>0?this._addCustomWidgetForLayerBlock(1):this._destroyCustomWidgetFromLayerBlock(1),this._recreateVisibilitiesSubscriptions(),this._isPaneMain.setValue(this._getIsPaneMainValue()),this.update(),this._updateWidgetModeByWidth()},t.prototype.update=function(){null!==this._mainSeriesViewModel&&this._mainSeriesViewModel.update();for(var t=0,e=this._dataSourceViewModels;t0&&t>2){var e=this._renderer.getMainSourceHeight(),i=this._renderer.getDataSourceHeight();if(null!==e&&null!==i){var s=Math.floor((this._availableHeight-e)/i),o=Math.max(s,2)-1;if(t>o+1){for(var n="",l=0;l'},vYP1:function(t,e){t.exports=''},vg09:function(t,e){ +t.exports=''},wZiV:function(t,e){t.exports=''},z4c1:function(t,e){ +t.exports='' +}}]); \ No newline at end of file diff --git a/public/charting_library/bundles/clipboard.995cff27aef8666b7892.js b/public/charting_library/bundles/clipboard.995cff27aef8666b7892.js new file mode 100644 index 00000000..b5d567a9 --- /dev/null +++ b/public/charting_library/bundles/clipboard.995cff27aef8666b7892.js @@ -0,0 +1,4 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([["clipboard"],{sxGJ:function(t,e,n){var r;r=function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o=function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof t.action?t.action:this.defaultAction,this.target="function"==typeof t.target?t.target:this.defaultTarget,this.text="function"==typeof t.text?t.text:this.defaultText,this.container="object"===r(t.container)?t.container:document.body}},{key:"listenClick",value:function(t){var e=this;this.listener=(0,c.default)(t,"click",(function(t){return e.onClick(t)}))}},{key:"onClick",value:function(t){var e=t.delegateTarget||t.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new i.default({action:this.action(e),target:this.target(e),text:this.text(e),container:this.container, +trigger:e,emitter:this})}},{key:"defaultAction",value:function(t){return s("action",t)}},{key:"defaultTarget",value:function(t){var e=s("target",t);if(e)return document.querySelector(e)}},{key:"defaultText",value:function(t){return s("text",t)}},{key:"destroy",value:function(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}],[{key:"isSupported",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["copy","cut"],e="string"==typeof t?[t]:t,n=!!document.queryCommandSupported;return e.forEach((function(t){n=n&&!!document.queryCommandSupported(t)})),n}}]),e}(a.default);function s(t,e){var n="data-clipboard-"+t;if(e.hasAttribute(n))return e.getAttribute(n)}t.exports=l},function(t,e,n){"use strict";var r,o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};this.action=t.action,this.container=t.container,this.emitter=t.emitter,this.target=t.target,this.text=t.text,this.trigger=t.trigger,this.selectedText=""}},{key:"initSelection",value:function(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"selectFake",value:function(){var t=this,e="rtl"==document.documentElement.getAttribute("dir");this.removeFake(),this.fakeHandlerCallback=function(){return t.removeFake()},this.fakeHandler=this.container.addEventListener("click",this.fakeHandlerCallback)||!0,this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[e?"right":"left"]="-9999px";var n=window.pageYOffset||document.documentElement.scrollTop;this.fakeElem.style.top=n+"px",this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,this.container.appendChild(this.fakeElem),this.selectedText=(0,c.default)(this.fakeElem),this.copyText()}},{key:"removeFake",value:function(){this.fakeHandler&&(this.container.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(this.container.removeChild(this.fakeElem),this.fakeElem=null)}},{key:"selectTarget",value:function(){this.selectedText=(0,c.default)(this.target),this.copyText()}},{key:"copyText",value:function(){var t=void 0;try{t=document.execCommand(this.action) +}catch(e){t=!1}this.handleResult(t)}},{key:"handleResult",value:function(t){this.emitter.emit(t?"success":"error",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})}},{key:"clearSelection",value:function(){this.trigger&&this.trigger.focus(),window.getSelection().removeAllRanges()}},{key:"destroy",value:function(){this.removeFake()}},{key:"action",set:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"copy";if(this._action=t,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function(){return this._action}},{key:"target",set:function(t){if(void 0!==t){if(!t||"object"!==(void 0===t?"undefined":o(t))||1!==t.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&t.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(t.hasAttribute("readonly")||t.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=t}},get:function(){return this._target}}]),t}();t.exports=u},function(t,e){t.exports=function(t){var e;if("SELECT"===t.nodeName)t.focus(),e=t.value;else if("INPUT"===t.nodeName||"TEXTAREA"===t.nodeName){var n=t.hasAttribute("readonly");n||t.setAttribute("readonly",""),t.select(),t.setSelectionRange(0,t.value.length),n||t.removeAttribute("readonly"),e=t.value}else{t.hasAttribute("contenteditable")&&t.focus();var r=window.getSelection(),o=document.createRange();o.selectNodeContents(t),r.removeAllRanges(),r.addRange(o),e=r.toString()}return e}},function(t,e){function n(){}n.prototype={on:function(t,e,n){var r=this.e||(this.e={});return(r[t]||(r[t]=[])).push({fn:e,ctx:n}),this},once:function(t,e,n){var r=this;function o(){r.off(t,o),e.apply(n,arguments)}return o._=e,this.on(t,o,n)},emit:function(t){for(var e=[].slice.call(arguments,1),n=((this.e||(this.e={}))[t]||[]).slice(),r=0,o=n.length;r'},"38fQ":function(e,t,n){e.exports={separator:"separator-3SZSQm0_"}},"6KyJ":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n("mrSG").__exportStar(n("COH4"),t)},COH4:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Loader=void 0;var o,r=n("mrSG"),i=n("q1tI"),a=n("TSYQ"),s=n("K9GE"),c=n("YZ9j");n("O7m7"),function(e){e[e.Initial=0]="Initial",e[e.Appear=1]="Appear",e[e.Active=2]="Active"}(o||(o={}));var u=function(e){function t(t){var n=e.call(this,t)||this;return n._stateChangeTimeout=null,n.state={state:o.Initial},n}return r.__extends(t,e),t.prototype.render=function(){var e,t=this.props,n=t.className,o=t.color,r=void 0===o?"black":o,s=a(c.item,((e={})[c[r]]=Boolean(r),e));return i.createElement("span",{className:a(c.loader,n,this._getStateClass())},i.createElement("span",{className:s}),i.createElement("span",{className:s}),i.createElement("span",{className:s}))},t.prototype.componentDidMount=function(){var e=this;this.setState({state:o.Appear}),this._stateChangeTimeout=setTimeout((function(){e.setState({state:o.Active})}),2*s.dur)},t.prototype.componentWillUnmount=function(){this._stateChangeTimeout&&(clearTimeout(this._stateChangeTimeout),this._stateChangeTimeout=null)},t.prototype._getStateClass=function(){switch(this.state.state){case o.Initial:return c["loader-initial"];case o.Appear:return c["loader-appear"];default:return""}},t}(i.PureComponent);t.Loader=u},Gpmm:function(e,t,n){e.exports={row:"row-1Gn06tA2",line:"line-c_e_alAN",hint:"hint-18i4fysm"}},Iivm:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n("mrSG").__exportStar(n("swCq"),t)},"J+f8":function(e,t,n){"use strict";n.d(t,"a",(function(){return r})) +;var o=n("q1tI"),r=o.createContext(!1)},O7m7:function(e,t,n){},R5JZ:function(e,t,n){"use strict";function o(e,t,n,o,r){function i(r){if(!(e>r.timeStamp)){var i=r.target;void 0!==n&&null!==t&&null!==i&&i.ownerDocument===o&&(t.contains(i)||n(r))}}return r.click&&o.addEventListener("click",i,!1),r.mouseDown&&o.addEventListener("mousedown",i,!1),r.touchEnd&&o.addEventListener("touchend",i,!1),r.touchStart&&o.addEventListener("touchstart",i,!1),function(){o.removeEventListener("click",i,!1),o.removeEventListener("mousedown",i,!1),o.removeEventListener("touchend",i,!1),o.removeEventListener("touchstart",i,!1)}}n.d(t,"a",(function(){return o}))},RgaO:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var o=n("mrSG"),r=n("8Rai");function i(e){var t=e.children,n=Object(o.__rest)(e,["children"]);return t(Object(r.a)(n))}},Sn4D:function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var o=n("q1tI"),r=n.n(o),i=n("Eyy1"),a=n("TSYQ"),s=n("x0D+"),c=n("Nkvk"),u=n("AiMB"),l=n("mkWe"),d=n("qFKp"),p=n("X0gx"),h=n("sHQ4");function m(e){var t=e.position,n=e.onClose,m=e.children,f=e.className,v=Object(i.ensureNotNull)(Object(o.useContext)(l.a)),b=Object(o.useState)(0),_=b[0],w=b[1],y=Object(o.useRef)(null),g=Object(o.useContext)(p.a);return Object(o.useEffect)((function(){var e;return null===(e=y.current)||void 0===e||e.focus({preventScroll:!0}),g.subscribe(v,n),Object(c.setFixedBodyState)(!0),d.CheckMobile.iOS()&&Object(s.disableBodyScroll)(Object(i.ensureNotNull)(y.current)),w(v.addDrawer()),function(){g.unsubscribe(v,n);var e=v.removeDrawer();d.CheckMobile.iOS()&&Object(s.enableBodyScroll)(Object(i.ensureNotNull)(y.current)),0===e&&Object(c.setFixedBodyState)(!1)}}),[]),r.a.createElement(u.a,null,r.a.createElement("div",{className:a(h.wrap,h["position"+t])},_===v.currentDrawer&&r.a.createElement("div",{className:h.backdrop,onClick:n}),r.a.createElement("div",{className:a(h.drawer,h["position"+t],f),ref:function(e){y.current=e},tabIndex:-1,onScroll:function(e){e.stopPropagation()}},m)))}},To8B:function(e,t){e.exports=''},X64X:function(e,t,n){e.exports={loaderWrap:"loaderWrap-18NjkayD",loader:"loader-Cgjcl0qz"}},XXQ5:function(e,t,n){e.exports={item:"item-3uG--HK9",emptyIcons:"emptyIcons-m0h_sZp0",loading:"loading-cNheEKQv",disabled:"disabled-3ilLPdQ4",interactive:"interactive-2W_Hkhdy",hovered:"hovered-D1oc5kww",icon:"icon-1Mb1FjSX",label:"label-3O4C0UM-",fullWidth:"fullWidth-1uGfIWwz",title:"title-22oXfKpQ",nested:"nested-1ZM4Mhrc",shortcut:"shortcut-3ZjqDeQg",remove:"remove-3gWfSy1e"}},Xy1d:function(e,t){e.exports=''},Xzy5:function(e,t){ +e.exports=''},YZ9j:function(e){e.exports=JSON.parse('{"loader":"loader-8x1ZxRwP","item":"item-2-89r_cd","tv-button-loader":"tv-button-loader-23vqS1uY","black":"black-20Ytsf0V","white":"white-1ucCcc2I","gray":"gray-XDhHSS-T","loader-initial":"loader-initial-1deQDeio","loader-appear":"loader-appear-2krFtMrd"}')},cbq4:function(e,t,n){"use strict";n.r(t);var o=n("mrSG"),r=n("q1tI"),i=n.n(r),a=n("i8i4"),s=n("DTHj"),c=n("RgaO"),u=n("ycI/"),l=n("TSYQ"),d=n("zRdu"),p=n("Gpmm");function h(e){return r.createElement("tr",{className:p.row},r.createElement("td",null,r.createElement("div",{className:p.line})),r.createElement("td",null,r.createElement("div",{className:p.line}),e.hint?r.createElement("div",{className:p.hint},e.hint):null))}var m=n("ycgn"),f=n("euMy"),v=n("hn2c");n("EsMY");function b(e){var t=e.sourceCapabilities,n=t&&t.firesTouchEvents;return void 0===n&&(n=Modernizr.touch),n}var _=n("L/Ed"),w=n("i/MG"),y=n("qFKp"),g=n("w+Rv"),S=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._handleMouseOver=function(e){b(e.nativeEvent)||t.props.onMouseOver&&t.props.onMouseOver()},t._handleClickToolbox=function(e){e.stopPropagation(),t.props.onClickToolbox&&t.props.onClickToolbox()},t}return Object(o.__extends)(t,e),t.prototype.render=function(){var e=this.props,t=e.hasSubItems,n=e.shortcutHint,o=e.hint;return r.createElement(r.Fragment,null,r.createElement("tr",{className:l(m.item,!this.props.noInteractive&&m.interactive,this.props.hovered&&m.hovered,this.props.disabled&&m.disabled,this.props.active&&m.active),onClick:this.props.onClick,onMouseOver:this._handleMouseOver,ref:this.props.reference,"data-action-name":this.props.actionName},r.createElement("td",{className:l(m.iconCell),"data-icon-cell":!0},this._icon()),r.createElement("td",null,r.createElement("div",{className:m.content},r.createElement("span",{className:l(m.label,this.props.checked&&m.checked),"data-label":!0},this.props.label),this._toolbox(),t&&r.createElement("span",{className:m.arrowIcon,dangerouslySetInnerHTML:{__html:v},"data-submenu-arrow":!0}),!t&&n&&!y.CheckMobile.any()&&r.createElement(g.a,{text:n}),!t&&!n&&o&&r.createElement(g.a,{text:o})))),r.createElement("tr",{className:m.subMenu},r.createElement("td",null,this.props.children)))},t.prototype._icon=function(){if(this.props.checkable){if(this.props.checked){var e=!this.props.icon&&!this.props.iconChecked,t=this.props.iconChecked||this.props.icon||f;return r.createElement("span",{className:l(m.icon,e&&m.checkmark),dangerouslySetInnerHTML:{__html:t},"data-icon-checkmark":e})}return this.props.icon?r.createElement("span",{className:m.icon,dangerouslySetInnerHTML:{__html:this.props.icon}}):r.createElement("span",{className:m.icon})}return this.props.icon?r.createElement("span",{className:m.icon,dangerouslySetInnerHTML:{__html:this.props.icon}}):null},t.prototype._toolbox=function(){ +return this.props.toolbox?r.createElement("span",{className:l(m.toolbox,this.props.showToolboxOnHover&&m.showToolboxOnHover),onClick:this._handleClickToolbox,"data-toolbox":!0},this._renderToolboxContent()):null},t.prototype._renderToolboxContent=function(){if(this.props.toolbox)switch(this.props.toolbox.type){case _.ToolboxType.Delete:return r.createElement(w.a,{onClick:this.props.toolbox.action})}return null},t}(r.PureComponent),E=n("tWVy"),O=n("JWMC"),C=n("Ialn");var x=n("dxYz"),k=n("Eyy1"),M=function(e){function t(t){var n=e.call(this,t)||this;return n._itemRef=null,n._menuElementRef=r.createRef(),n._menuRef=null,n._handleClick=function(e){e.isDefaultPrevented()||n.state.disabled||(n._hasSubItems()?n._showSubMenu():(n.state.doNotCloseOnClick||Object(E.b)(),n.props.action.execute(),n._trackEvent()))},n._handleClickToolbox=function(){Object(E.b)()},n._handleItemMouseOver=function(){n._showSubMenu(),n._setCurrentContextValue()},n._handleMenuMouseOver=function(){n._setCurrentContextValue()},n._showSubMenu=function(){n.props.onShowSubMenu(n.props.action)},n._calcSubMenuPos=function(e){return function(e,t,n){if(void 0===n&&(n={x:0,y:10}),t){var o=t.getBoundingClientRect(),r=o.left,i=o.right,a=o.top,s=document.documentElement.clientWidth,c={x:r-e,y:a},u={x:i,y:a};return Object(C.isRtl)()?r<=e?u:c:s-i>=e?u:c}return n}(e,n._itemRef)},n._updateState=function(e){n.setState(e.getState())},n._setItemRef=function(e){n._itemRef=e},n._handleMenuRef=function(e){n._menuRef=e},n.state=Object(o.__assign)({},n.props.action.getState()),n}return Object(o.__extends)(t,e),t.prototype.componentDidMount=function(){var e,t=this;this.props.action.onUpdate().subscribe(this,this._updateState),this.state.subItems.length&&(this._unsubscribe=null===(e=this.context)||void 0===e?void 0:e.registerSubmenu(this.props.action.id,(function(e){return Object(k.ensureNotNull)(t._itemRef).contains(e)||null!==t._menuElementRef.current&&t._menuElementRef.current.contains(e)})))},t.prototype.componentDidUpdate=function(e,t){t.subItems!==this.state.subItems&&null!==this._menuRef&&this._menuRef.update()},t.prototype.componentWillUnmount=function(){this.props.action.onUpdate().unsubscribe(this,this._updateState),this._unsubscribe&&this._unsubscribe()},t.prototype.render=function(){var e,t=(null===(e=this.context)||void 0===e?void 0:e.current)?this.context.current===this.props.action.id:this.props.isSubMenuOpened;return r.createElement(S,Object(o.__assign)({reference:this._setItemRef,onClick:this._handleClick,onClickToolbox:this._handleClickToolbox,onMouseOver:this._handleItemMouseOver,hovered:t,hasSubItems:this._hasSubItems(),actionName:this.state.name},this.state),r.createElement(Z,{isOpened:t,items:this.state.subItems,position:this._calcSubMenuPos,menuStatName:this.props.menuStatName,parentStatName:this._getStatName(),menuElementReference:this._menuElementRef,onMouseOver:this.state.subItems.length?this._handleMenuMouseOver:void 0,ref:this._handleMenuRef}))},t.prototype._setCurrentContextValue=function(){var e +;this.state.subItems.length&&(null===(e=this.context)||void 0===e||e.setCurrent(this.props.action.id))},t.prototype._hasSubItems=function(){return this.state.subItems.length>0},t.prototype._trackEvent=function(){var e=this._getStatName();Object(O.trackEvent)("ContextMenuClick",this.props.menuStatName||"",e)},t.prototype._getStatName=function(){return[this.props.parentStatName,this.state.statName].filter((function(e){return Boolean(e)})).join(".")},t.contextType=x.a,t}(r.PureComponent),N=n("6KyJ"),I=n("X64X");function j(e){return r.createElement(S,{label:r.createElement("div",{className:I.loaderWrap},r.createElement(N.Loader,{className:I.loader,color:"gray"})),noInteractive:!0,onMouseOver:e.onMouseOver})}function D(e){return r.createElement(S,{label:e.label,noInteractive:!0,disabled:!0,onMouseOver:e.onMouseOver})}var T=n("4O8T"),L=n.n(T),R=function(e){function t(t){var n=e.call(this,t)||this;return n._loadEmitter=new L.a,n._onDone=function(){n.setState({loaded:!0,failed:!1},n._updateMenu)},n._onFail=function(e){n.setState({failed:!0,error:e},n._updateMenu)},n._updateMenu=function(){n.props.menu&&n.props.menu.update()},n._handleMouseOver=function(){n.props.onShowSubMenu(n.props.action)},n.state={loaded:n.props.action.isLoaded(),failed:!1,error:""},n}return Object(o.__extends)(t,e),t.prototype.componentDidMount=function(){this._loadEmitter.on("done",this._onDone),this._loadEmitter.on("fail",this._onFail),this._load()},t.prototype.componentWillUnmount=function(){this._loadEmitter.removeEvent("done"),this._loadEmitter.removeEvent("fail")},t.prototype.render=function(){return this.state.failed?r.createElement(D,{label:this.state.error,onMouseOver:this._handleMouseOver}):this.state.loaded?r.createElement(M,Object(o.__assign)({},this.props)):r.createElement(j,{onMouseOver:this._handleMouseOver})},t.prototype._load=function(){var e=this;this.props.action.loadOptions().then((function(){e._loadEmitter.emit("done")})).catch((function(t){e._loadEmitter.emit("fail",t)}))},t}(r.PureComponent),P=n("PN6A"),B=function(e){function t(t){var n=e.call(this,t)||this;return n._handleShowSubMenu=function(e){var t=e.getState();n.setState({showSubMenuOf:t.subItems.length?e:void 0})},n.state={},n}return Object(o.__extends)(t,e),t.prototype.render=function(){var e=this;return r.createElement("table",null,r.createElement("tbody",null,this.props.items.map((function(t){return e._item(t)}))))},t.getDerivedStateFromProps=function(e,t){return!e.parentIsOpened&&t.showSubMenuOf?{showSubMenuOf:void 0}:null},t.prototype._item=function(e){var t=this;switch(e.type){case d.a.Separator:return r.createElement(h,{key:e.id,hint:e.getHint()});case d.a.Action:return r.createElement(M,{key:e.id,action:e,onShowSubMenu:this._handleShowSubMenu,isSubMenuOpened:this.state.showSubMenuOf===e,menuStatName:this.props.menuStatName,parentStatName:this.props.parentStatName});case d.a.ActionAsync:return r.createElement(P.a.Consumer,{key:e.id},(function(n){return r.createElement(R,{action:e,onShowSubMenu:t._handleShowSubMenu,isSubMenuOpened:t.state.showSubMenuOf===e, +menuStatName:t.props.menuStatName,parentStatName:t.props.parentStatName,menu:n})}));default:return null}},t}(r.PureComponent),q=n("mkWe"),A=n("/KDZ"),H=n("38fQ");function G(e){return i.a.createElement("li",{className:H.separator})}var W=n("l4ku"),X=n("Sn4D");function Q(e){var t=e.action,n=e.isLoading,a=Object(r.useState)(t.getState()),s=a[0],c=a[1],u=Object(r.useState)(!1),l=u[0],d=u[1],p=function(){return c(t.getState())},h=!!s.subItems.length,m=h&&l;return Object(r.useEffect)((function(){n||c(t.getState())}),[n]),Object(r.useEffect)((function(){return t.onUpdate().subscribe(null,p),function(){t.onUpdate().unsubscribe(null,p)}}),[]),i.a.createElement(W.a,Object(o.__assign)({},s,{onClick:function(e){if(s.disabled||e.defaultPrevented)return;if(h)return void d(!0);s.doNotCloseOnClick||Object(E.b)();t.execute()},isLoading:n,isHovered:m}),m&&i.a.createElement(X.a,{onClose:f,position:"Bottom"},i.a.createElement(F,{items:s.subItems,parentAction:t,closeNested:f})));function f(e){e&&e.preventDefault(),d(!1)}}function U(e){var t=e.action,n=Object(r.useState)(t.isLoaded()),o=n[0],a=n[1],s=Object(r.useState)(!1),c=s[0],u=s[1],l=function(){var e=Object(r.useRef)(!1);return Object(r.useEffect)((function(){return e.current=!0,function(){e.current=!1}}),[]),e}();return Object(r.useEffect)((function(){t.loadOptions().then((function(){l.current&&(a(!0),u(!1))})).catch((function(){l.current&&u(!0)}))}),[]),i.a.createElement(Q,{isLoading:!o||c,action:t})}var Y=n("J+f8"),K=n("fwrW");function F(e){var t=e.items,n=e.parentAction,o=e.closeNested,r=!Boolean(n)&&t.every((function(e){return!Boolean(e.type!==d.a.Separator&&(e.getState().icon||e.getState().checkable))}));return i.a.createElement(Y.a.Provider,{value:r},i.a.createElement("ul",null,n&&i.a.createElement(i.a.Fragment,null,i.a.createElement(W.a,{label:n.getState().label,isTitle:!0,active:!1,disabled:!1,subItems:[],checkable:!1,checked:!1,doNotCloseOnClick:!1,icon:K,onClick:o}),i.a.createElement(G,null)),t.map((function(e){switch(e.type){case d.a.Action:return i.a.createElement(Q,{key:e.id,action:e});case d.a.Separator:return i.a.createElement(G,{key:e.id});case d.a.ActionAsync:return i.a.createElement(U,{key:e.id,action:e});default:return null}}))))}var J=r.createContext(!1),z=n("t3rk"),Z=function(e){function t(t){var n=e.call(this,t)||this;return n._menuRef=r.createRef(),n._handleClose=function(){n.props.onClose&&n.props.onClose()},n._handleOutsideClickClose=function(e){var t=n.props,o=t.doNotCloseOn,r=t.onClose;!r||void 0!==o&&o.contains(e.target)||r()},n.state={},n}return Object(o.__extends)(t,e),t.prototype.render=function(){var e=this,t=this.props,n=t.isOpened,i=(t.onClose,t.items),a=(t.doNotCloseOn,t.menuStatName),d=t.parentStatName,p=Object(o.__rest)(t,["isOpened","onClose","items","doNotCloseOn","menuStatName","parentStatName"]);return n?r.createElement(r.Fragment,null,r.createElement(u.a,{keyCode:27,eventType:"keyup",handler:this._handleClose}),r.createElement(q.b,null,r.createElement(A.a,{rule:"screen and (max-width: 419px)"},(function(t){ +return e._isDrawer(t)?r.createElement(X.a,{onClose:e._handleClose,position:"Bottom"},r.createElement(J.Provider,{value:t},r.createElement(F,{items:i}))):r.createElement(c.a,{handler:e._handleOutsideClickClose,mouseDown:!0,touchStart:!0,reference:e.props.menuElementReference},(function(t){return r.createElement(s.a,Object(o.__assign)({},p,{reference:t,isOpened:e.props.isOpened,className:l(z.menu,"context-menu"),onClose:e._handleClose,noMomentumBasedScroll:!0,ref:e._menuRef}),r.createElement(B,{items:i,menuStatName:a,parentStatName:d,parentIsOpened:n}))}))})))):null},t.prototype.update=function(){this._menuRef.current&&this._menuRef.current.update()},t.prototype._isDrawer=function(e){return void 0===this.props.mode?e:"drawer"===this.props.mode},t}(r.PureComponent);n.d(t,"ContextMenuRenderer",(function(){return V}));var V=function(){function e(e,t,n,o){this._root=null,this._isShown=!1,this._props={isOpened:!1,items:e,position:{x:0,y:0},menuStatName:t.statName,mode:t.mode},this._onDestroy=n,this._onShow=o}return e.prototype.show=function(e,t,n){var r=this;this._onShow&&this._onShow(),this._isShown=!0,this._render(Object(o.__assign)(Object(o.__assign)({},this._props),{position:function(t,o){return"function"==typeof e&&(e=e(t,o)),e.touches&&e.touches.length>0&&(e={clientX:e.touches[0].clientX,clientY:e.touches[0].clientY}),{x:!n&&Object(C.isRtl)()?e.clientX-t:e.clientX,y:e.clientY,overrideHeight:e.overrideHeight}},isOpened:!0,onClose:function(){r.hide(),r.destroy()},doNotCloseOn:t}))},e.prototype.hide=function(){this._isShown=!1,this._render(Object(o.__assign)(Object(o.__assign)({},this._props),{isOpened:!1}))},e.prototype.isShown=function(){return this._isShown},e.prototype.destroy=function(){this._isShown=!1,this._root&&(a.unmountComponentAtNode(this._root),document.body.removeChild(this._root),this._root=null),this._onDestroy&&this._onDestroy()},e.prototype._render=function(e){this._root||(this._root=document.createElement("span"),this._root.className="context-menu-wrapper",document.body.appendChild(this._root)),a.render(r.createElement(Z,e),this._root)},e}()},euMy:function(e,t){e.exports=''},fwrW:function(e,t){e.exports=''},hn2c:function(e,t){e.exports=''},"i/MG":function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var o=n("mrSG"),r=(n("YFKU"),n("q1tI")),i=n("TSYQ"),a=n("Iivm"),s=n("To8B"),c=n("kXJy"),u={remove:window.t("Remove")};function l(e){ +var t=e.className,n=e.isActive,l=e.onClick,d=e.title,p=e.hidden,h=e["data-name"],m=void 0===h?"remove-button":h,f=Object(o.__rest)(e,["className","isActive","onClick","title","hidden","data-name"]);return r.createElement(a.Icon,Object(o.__assign)({},f,{"data-name":m,className:i(c.button,"apply-common-tooltip",n&&c.active,p&&c.hidden,t),icon:s,onClick:l,title:d||u.remove}))}},kXJy:function(e,t,n){e.exports={button:"button-1scLo53s",disabled:"disabled-2eJ5fvUz",active:"active-2T0ofIIp",hidden:"hidden-2GRQzIQ1"}},l4ku:function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var o=n("q1tI"),r=n.n(o),i=n("TSYQ"),a=n("Iivm"),s=n("6KyJ"),c=n("J+f8"),u=n("w+Rv"),l=n("Xy1d"),d=n("Xzy5"),p=n("20PO"),h=n("XXQ5");function m(e){var t=e.isTitle,n=e.isLoading,m=e.isHovered,f=e.active,v=e.checkable,b=e.disabled,_=e.checked,w=e.icon,y=e.iconChecked,g=e.hint,S=e.subItems,E=e.label,O=e.onClick,C=e.children,x=e.toolbox,k=e.fullWidthLabel,M=Object(o.useContext)(c.a),N=!!S.length;return n?r.a.createElement("li",{className:i(h.item,h.loading)},r.a.createElement(s.Loader,{color:"gray"})):r.a.createElement("li",{className:i(h.item,h.interactive,t&&h.title,b&&h.disabled,m&&h.hovered,f&&h.active,M&&h.emptyIcons),onClick:O},r.a.createElement(a.Icon,{className:i(h.icon),icon:function(){if(v&&_)return y||w||l;return w}()}),r.a.createElement("span",{className:i(h.label,k&&h.fullWidth)},E),!!x&&r.a.createElement(a.Icon,{onClick:function(){x&&x.action()},className:h.remove,icon:p}),!N&&g&&r.a.createElement(u.a,{className:h.shortcut,text:g}),N&&r.a.createElement(a.Icon,{className:h.nested,icon:d}),C)}},mkWe:function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return s}));var o=n("mrSG"),r=n("q1tI"),i=n.n(r),a=function(e){function t(t){var n=e.call(this,t)||this;return n._addDrawer=function(){var e=n.state.currentDrawer+1;return n.setState({currentDrawer:e}),e},n._removeDrawer=function(){var e=n.state.currentDrawer-1;return n.setState({currentDrawer:e}),e},n.state={currentDrawer:0},n}return Object(o.__extends)(t,e),t.prototype.render=function(){return i.a.createElement(s.Provider,{value:{addDrawer:this._addDrawer,removeDrawer:this._removeDrawer,currentDrawer:this.state.currentDrawer}},this.props.children)},t}(i.a.PureComponent),s=i.a.createContext(null)},sHQ4:function(e,t,n){e.exports={wrap:"wrap-3vvdSnDX",backdrop:"backdrop-1knaw_yl",positionBottom:"positionBottom-3zJf6Byh",drawer:"drawer-1_nJUEiM",positionLeft:"positionLeft-2wxVhi9G"}},swCq:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Icon=void 0;var o=n("mrSG"),r=n("q1tI");t.Icon=r.forwardRef((function(e,t){var n=e.icon,i=void 0===n?"":n,a=o.__rest(e,["icon"]);return r.createElement("span",o.__assign({},a,{ref:t,dangerouslySetInnerHTML:{__html:i}}))}))},t3rk:function(e,t,n){e.exports={menu:"menu-1y0eDKzl"}},"w+Rv":function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var o=n("q1tI"),r=n("TSYQ"),i=n.n(r),a=n("ycgn");function s(e){var t=e.text,n=void 0===t?"":t,r=e.className;return o.createElement("span",{ +className:i()(a.shortcut,r)},n)}},"x0D+":function(e,t,n){var o,r,i;r=[t],void 0===(i="function"==typeof(o=function(e){"use strict";function t(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t=0&&e<=x};function S(t){function e(e,n,r,i,o,s){for(;o>=0&&o0?0:a-1;return arguments.length<3&&(i=n[s?s[u]:u],u+=t),e(n,r,i,s,u,a)}}g.each=g.forEach=function(t,e,n){var r,i;if(e=b(e,n),C(t))for(r=0,i=t.length;r=0},g.invoke=function(t,e){var n=l.call(arguments,2),r=g.isFunction(e);return g.map(t,(function(t){var i=r?e:t[e];return null==i?i:i.apply(t,n)}))},g.pluck=function(t,e){return g.map(t,g.property(e))},g.where=function(t,e){return g.filter(t,g.matcher(e))},g.findWhere=function(t,e){return g.find(t,g.matcher(e))},g.max=function(t,e,n){var r,i,o=-1/0,s=-1/0;if(null==e&&null!=t)for(var a=0,u=(t=C(t)?t:g.values(t)).length;ao&&(o=r);else e=y(e,n),g.each(t,(function(t,n,r){((i=e(t,n,r))>s||i===-1/0&&o===-1/0)&&(o=t,s=i)}));return o},g.min=function(t,e,n){var r,i,o=1/0,s=1/0;if(null==e&&null!=t)for(var a=0,u=(t=C(t)?t:g.values(t)).length;ar||void 0===n)return 1;if(n0?0:i-1;o>=0&&o0?s=o>=0?o:Math.max(o+a,s):a=o>=0?Math.min(o+1,a):o+a+1;else if(n&&o&&a)return r[o=n(r,i)]===i?o:-1;if(i!=i)return(o=e(l.call(r,s,a),g.isNaN))>=0?o+s:-1;for(o=t>0?s:a-1;o>=0&&oe?(s&&(clearTimeout(s),s=null),a=l,o=t.apply(r,i),s||(r=i=null)):s||!1===n.trailing||(s=setTimeout(u,c)),o}},g.debounce=function(t,e,n){var r,i,o,s,a,u=function(){var l=g.now()-s;l=0?r=setTimeout(u,e-l):(r=null,n||(a=t.apply(o,i),r||(o=i=null)))};return function(){o=this,i=arguments,s=g.now();var l=n&&!r;return r||(r=setTimeout(u,e)),l&&(a=t.apply(o,i),o=i=null),a}},g.wrap=function(t,e){return g.partial(e,t)},g.negate=function(t){return function(){return!t.apply(this,arguments)}},g.compose=function(){var t=arguments,e=t.length-1;return function(){for(var n=e,r=t[e].apply(this,arguments);n--;)r=t[n].call(this,r);return r}},g.after=function(t,e){return function(){if(--t<1)return e.apply(this,arguments)}},g.before=function(t,e){var n;return function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=null),n}},g.once=g.partial(g.before,2);var I=!{toString:null}.propertyIsEnumerable("toString"),E=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];function M(t,e){var n=E.length,r=t.constructor,i=g.isFunction(r)&&r.prototype||s,o="constructor";for(g.has(t,o)&&!g.contains(e,o)&&e.push(o);n--;)(o=E[n])in t&&t[o]!==i[o]&&!g.contains(e,o)&&e.push(o)}g.keys=function(t){if(!g.isObject(t))return[];if(f)return f(t);var e=[];for(var n in t)g.has(t,n)&&e.push(n);return I&&M(t,e),e},g.allKeys=function(t){if(!g.isObject(t))return[];var e=[];for(var n in t)e.push(n);return I&&M(t,e),e},g.values=function(t){for(var e=g.keys(t),n=e.length,r=Array(n),i=0;i":">",'"':""","'":"'","`":"`"},L=g.invert(F),W=function(t){var e=function(e){return t[e]},n="(?:"+g.keys(t).join("|")+")",r=RegExp(n),i=RegExp(n,"g");return function(t){return t=null==t?"":""+t,r.test(t)?t.replace(i,e):t}};g.escape=W(F),g.unescape=W(L),g.result=function(t,e,n){var r=null==t?void 0:t[e];return void 0===r&&(r=n),g.isFunction(r)?r.call(t):r};var D=0;g.uniqueId=function(t){var e=++D+"";return t?t+e:e},g.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var R=/(.)^/,V={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},P=/\\|'|\r|\n|\u2028|\u2029/g,z=function(t){return"\\"+V[t]};g.template=function(t,e,n){!e&&n&&(e=n),e=g.defaults({},e,g.templateSettings);var r=RegExp([(e.escape||R).source,(e.interpolate||R).source,(e.evaluate||R).source].join("|")+"|$","g"),i=0,o="__p+='";t.replace(r,(function(e,n,r,s,a){return o+=t.slice(i,a).replace(P,z),i=a+e.length,n?o+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?o+="'+\n((__t=("+r+"))==null?'':__t)+\n'":s&&(o+="';\n"+s+"\n__p+='"),e})),o+="';\n",e.variable||(o="with(obj||{}){\n"+o+"}\n"),o="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+o+"return __p;\n";try{var s=new Function(e.variable||"obj","_",o)}catch(l){throw l.source=o,l}var a=function(t){return s.call(this,t,g)},u=e.variable||"obj";return a.source="function("+u+"){\n"+o+"}",a},g.chain=function(t){var e=g(t);return e._chain=!0,e};var N=function(t,e){return t._chain?g(e).chain():e};g.mixin=function(t){g.each(g.functions(t),(function(e){var n=g[e]=t[e];g.prototype[e]=function(){var t=[this._wrapped];return u.apply(t,arguments),N(this,n.apply(g,t))}}))},g.mixin(g),g.each(["pop","push","reverse","shift","sort","splice","unshift"],(function(t){var e=o[t];g.prototype[t]=function(){var n=this._wrapped;return e.apply(n,arguments),"shift"!==t&&"splice"!==t||0!==n.length||delete n[0],N(this,n)}})),g.each(["concat","join","slice"],(function(t){var e=o[t];g.prototype[t]=function(){return N(this,e.apply(this._wrapped,arguments))}})),g.prototype.value=function(){return this._wrapped},g.prototype.valueOf=g.prototype.toJSON=g.prototype.value,g.prototype.toString=function(){return""+this._wrapped},void 0===(r=function(){return g}.apply(e,[]))||(t.exports=r)}).call(this)},IwoD:function(t,e,n){},QwKQ:function(t,e,n){"use strict";(function(r){Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n{{#labelLeft}}{{labelLeft}}{{/labelLeft}}{{> inputWrapper }}{{#labelRight}}{{labelRight}}{{/labelRight}}{{/hasLabel}}{{^hasLabel}}{{> inputWrapper }}{{/hasLabel}}',inputWrapper:'<{{ tag }} class="{{ customClass }}{{#disabled}} i-disabled{{/disabled}}">{{^hasCheckbox}}{{> checkbox }}{{/hasCheckbox}}{{> box }}{{> ripple }}',checkbox:'',checkboxClass:"{{ customClass }}__input",box:''+n("aLUT")+"",ripple:''},u=function(){function t(e){var n=e.customClass,r=void 0===n?"tv-control-checkbox":n,i=e.$checkbox,o=e.tag,a=e.id,u=e.name,l=e.checked,c=e.disabled,h=e.labelLeft,p=e.labelRight,f=e.labelAddClass,d=e.boxAddClass;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.$el=null,void 0===o&&(o=h||p?"span":"label");var _=i instanceof $&&!!i.length;if(_){if(!i.is("input[type=checkbox]"))return void s.logError("`$checkbox` need to be input[type=checkbox]");if(i.hasClass("i-inited"))return;this._setInputId(i,a),this._setInputClass(i,r),this._setInputName(i,u),this._setInputChecked(i,l),this._setInputDisabled(i,c),l=!!i.prop("checked"),c=!!i.attr("disabled")}this.$el=this.render({$checkbox:i,hasCheckbox:_,customClass:r,tag:o,id:a,name:u,checked:l,disabled:c,labelLeft:h,labelRight:p,hasLabel:h||p,labelAddClass:f,boxAddClass:d}),this.$checkbox=_?i:this.$el.find("input[type=checkbox]")}return i(t,[{key:"_setInputId",value:function(t,e){void 0!==e&&t.attr("id",e)}},{key:"_setInputClass",value:function(t,e){var n=r.render(a.checkboxClass,{customClass:e});t.addClass(n)}},{key:"_setInputName",value:function(t,e){void 0!==e&&t.attr("name",e)}},{key:"_setInputChecked",value:function(t,e){void 0!==e&&t.prop("checked",!!e)}},{key:"_setInputDisabled",value:function(t,e){void 0!==e&&(e?t.setAttribute("disabled","disabled"):t.removeAttr("disabled"))}},{key:"render",value:function(t){var e=t.$checkbox,n=$(r.render(a.labelWrapper,t,a));t.hasCheckbox&&(n.insertBefore(e),n.find("."+t.customClass).andSelf().filter("."+t.customClass).eq(0).prepend(e.detach()),e.addClass("i-inited"));return n}},{key:"checked",set:function(t){this._setInputChecked(this.$checkbox,!!t)},get:function(){return!!this.$checkbox.prop("checked")}}]),t}();$.fn.tvControlCheckbox=(0,o.createTvBlockWithInstance)("tv-control-checkbox",(function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new u(TradingView.mergeObj(e,{$checkbox:t}))})),e.default=u,t.exports=e.default}).call(this,n("nbsC"))},YDhE:function(t,e,n){ +"use strict";n.r(e),n.d(e,"createDialog",(function(){return o}));var r=n("6aJD"),i=n("tKRU");function o(t){var e=t.type||"popup";return delete t.type,"modal"===e?new r.a(t):new i.a(t)}},aLUT:function(t,e){t.exports=''},"b6p+":function(t,e,n){},nec0:function(t,e,n){},nzny:function(t,e,n){},pLUm:function(t,e,n){t.exports={wrapper:"wrapper-2KWBfDVB",touch:"touch-E6yQTRo_"}},sFgq:function(t,e,n){"use strict";(function(t){var r=n("A6WY").lazyJqueryUI;n("nzny");var i=n("pLUm");function o(e,n,r){var o=this;if(this._options=$.extend({},this._defaultOptions,r||{}),this._$wrapper=e,this._$wrapper.addClass(i.wrapper),this._$content=n,this._scroll_speed=40,this._shadow_offset=10,this._header_height=this._options.headerHeight,this._scroll_margin_top=this._options.scrollMarginTop,this.scrolled=new t,this.scrolltoend=new t,this.scrolltostart=new t,this.visibilityCallbacks=[],this._touch=Modernizr.touch,this._touch)return this._$content.css("position","relative"),void this._$wrapper.addClass(i.touch).scroll(this._onScroll.bind(this));this._$wrapper.css("overflow","hidden"),this._$wrapper.on("mouseenter.sidebar-scroll",(function(){o._bottomFixed||o._dragging||(o._options.alwaysVisible||o._$scrollBar.addClass("active"),o._onScroll())})).on("mouseleave.sidebar-scroll",(function(){o._bottomFixed||o._dragging||(o._options.alwaysVisible||o._$scrollBar.removeClass("active"),o._onScroll())})).on("mousewheel.sidebar-scroll",(function(t){if(!t.isDefaultPrevented()){var e=t.deltaY*(t.deltaFactor/100);return o.scroll(e)}})),!1!==this._options.showTopShadow&&(this._$shadowTop=$('
    ').appendTo(this._$wrapper)),!1!==this._options.showBottomShadow&&(this._$shadowBottom=$('
    ').appendTo(this._$wrapper)),this._$shadowTop&&this._header_height&&this._$shadowTop.css("top",this._header_height-this._shadow_offset);var s=this._options.additionalClass?" "+this._options.additionalClass:"",a=this._options.alwaysVisible?" active-always":"";this._$scrollBarWrapper=$('
    ').appendTo(this._$wrapper),this._$scrollBar=$('
    ').appendTo(this._$scrollBarWrapper),this._onScroll()}o.prototype.isTouch=function(){return this._touch},o.prototype.getScrollBar=function(){return this._$scrollBar},o.prototype._defaultOptions={headerHeight:0,additionalClass:"",alwaysVisible:!1,showBottomShadow:!0,scrollMarginTop:1,bubbleScrollEvent:!1},o.prototype.initDraggable=function(){if(this._dragInitialized)return this;var t=this;return r(this._$scrollBar).draggable({axis:"y",containment:this._$scrollBarWrapper,start:function(){t._dragging=!0},stop:function(){t._dragging=!1},drag:function(e,n){t.updateScroll()}}),this._dragInitialized=!0,this},o.prototype.updateScroll=function(){if(this._touch)return this +;var t=Math.ceil(this._$scrollBar.position().top-this._scroll_margin_top-this._header_height),e=this.getContainerHeightWithoutHeader(),n=this._$content.outerHeight(),r=n-e-1;return e<=0||(this._scroll_target_top=r<=0?this._header_height:Math.min(-t*n/e+this._header_height,this._header_height),t+this._$scrollBar.height()+2>=e?this.scrollToEnd():(this._$content.css("top",this._scroll_target_top+"px"),this._onScroll())),this},o.prototype.getContainerHeightWithoutHeader=function(){return this._$wrapper[0].getBoundingClientRect().height-this._header_height},o.prototype.getContainerHeight=function(){return this._$wrapper[0].getBoundingClientRect().height},o.prototype.getContentHeight=function(){return this._$content[0].getBoundingClientRect().height},o.prototype.updateScrollBar=function(){if(this._touch)return this;var t=this._$content.position().top,e=this.getContentHeight(),n=this.getContainerHeight(),r=this.getContainerHeightWithoutHeader(),i=1+this._header_height,o=r-2,s=(Math.abs(t)-this._header_height)*o/e,a=n*n/e;return this.isContentShort()?(this._$scrollBar.addClass("js-hidden"),this._$wrapper.removeClass("sb-scroll-active")):(this._$scrollBar.removeClass("js-hidden").height(a).css("top",i+s),this._$wrapper.addClass("sb-scroll-active"),this.initDraggable()),this},o.prototype.scroll=function(t,e){var n=this._$content.position().top,r=this._$content.outerHeight()-this.getContainerHeightWithoutHeader()-1,i=e||this._scroll_speed;return r<=0||(this._scroll_target_top=Math.max(-r+this._header_height,Math.min(this._header_height,n+t*i)),this.setContentTop(this._scroll_target_top),this._onScroll())},o.prototype.animateTo=function(t){if(this._touch)return this;var e=this._$content.outerHeight()-this.getContainerHeightWithoutHeader()-1;if(e<=0)return!0;this._scroll_target_top=Math.max(-e+this._header_height,Math.min(this._header_height,-t)),this._$content.animate({top:this._scroll_target_top},500,function(){this._onScroll()}.bind(this))},o.prototype.resize=function(){if(!this._bottomFixed){var t=this._$content.outerHeight(),e=this._$wrapper.outerHeight();!this._options.vAlignBottom&&to&&t+e.areaHeights?s-t-e.areaHeight:o-t}else"top"===e.position&&(a=o-t);return this.scroll(a,1),this._onScroll(),!1}, +o.prototype.scrollToEnd=function(){var t=this._$content.position().top,e=this._$content.outerHeight(),n=this._$wrapper.outerHeight(),r=e>n?t+(n-(e+t))+1:1;return this.setContentTop(r),this._onScroll(),this},o.prototype.scrollToStart=function(){return this.setContentTop(this._header_height),this._onScroll(),this},o.prototype.currentPosition=function(){return Math.round(this._$content.position().top)},o.prototype.atStart=function(){return Math.round(this._$content.position().top)>=this._header_height},o.prototype.atEnd=function(t){"number"==typeof t&&isFinite(t)||(t=0);var e=Math.round(this._$content.position().top),n=this._$content.outerHeight(),r=this._$wrapper.outerHeight();return n-Math.abs(e)-1<=r+t},o.prototype._onScroll=function(t){this._touch||this._$content.css("bottom","auto"),this.scrolled.fire(),this._dragging&&!0!==t||this.updateScrollBar();var e=this.atStart(),n=this.atEnd();return this._$shadowTop&&this._$shadowTop.toggleClass("i-invisible",!!e),this._$shadowBottom&&this._$shadowBottom.toggleClass("i-invisible",!!n),this._onContentVisible(),!this._atStart&&e?(this._atStart=!0,this.scrolltostart.fire()):this._atStart&&!e&&delete this._atStart,!this._atEnd&&n?(this._atEnd=!0,this.scrolltoend.fire()):this._atEnd&&!n&&delete this._atEnd,this._options.vAlignBottom&&(this._stickyBottom=this._$content.outerHeight()-Math.abs(this._$content.position().top)-this._$wrapper.outerHeight()),!(!this._atStart&&!this._atEnd||("function"==typeof this._options.bubbleScrollEvent?!this._options.bubbleScrollEvent():!this._options.bubbleScrollEvent))},o.prototype.checkContentVisibility=function(){this._onContentVisible()},o.prototype.subscribeToContentVisible=function(t,e,n){this.visibilityCallbacks.push({id:t,$el:e,callback:n})},o.prototype.triggerVisibilityCallbacks=function(t){this._onContentVisible(t)},o.prototype._contentIsVisible=function(t){return t.$el.position().top>-1*this.currentPosition()},o.prototype._onContentVisible=function(t){if(this.visibilityCallbacks.length){var e=t||this._contentIsVisible.bind(this),n=[],r=this.visibilityCallbacks.filter((function(t,r){if(!$.contains(this._$content,t.$el[0]))return!1;var i=e(t);return i&&n.push(r),!i}),this);n.forEach((function(e){this.visibilityCallbacks[e].callback(!!t)}),this),delete this.visibilityCallbacks,this.visibilityCallbacks=r}},o.prototype.save=function(){return this._saved={top:this._$content.position().top,height:this._$content.outerHeight()},this},o.prototype.restore=function(){if(this._saved){if(this._saved.top===this._$content.position().top&&this._saved.height===this._$content.outerHeight())return delete this._saved,this;this._options.vAlignBottom&&(this._saved.top-=this._$content.outerHeight()-this._saved.height,this._saved.top>this._header_height&&(this._saved.top=this._header_height)),this.setContentTop(this._saved.top),delete this._saved,this._onScroll(!0)}return this},o.prototype.fixBottom=function(){if(this._bottomFixed)return this;if(this._touch){var t=this._$content.outerHeight(),e=this._$wrapper.scrollTop() +;this._tempIntervalID=setInterval(function(){this._$wrapper.scrollTop(e+(this._$content.outerHeight()-t))}.bind(this),0)}else this._$content.css({top:"auto",bottom:this._$wrapper.outerHeight()-this._$content.position().top-this._$content.outerHeight()});return this._bottomFixed=!0,this},o.prototype.releaseBottom=function(){return this._bottomFixed?(this._touch?clearInterval(this._tempIntervalID):this._$content.css({top:this._$content.position().top,bottom:"auto"}),delete this._bottomFixed,this._onScroll(),this):this},o.prototype.setContentTop=function(t){return this._touch?this._options.vAlignBottom&&this._$content.outerHeight()'}}]); \ No newline at end of file diff --git a/public/charting_library/bundles/currency-label-menu.3c1430252f424363fa39.js b/public/charting_library/bundles/currency-label-menu.3c1430252f424363fa39.js new file mode 100644 index 00000000..3b0e1a79 --- /dev/null +++ b/public/charting_library/bundles/currency-label-menu.3c1430252f424363fa39.js @@ -0,0 +1,3 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([["currency-label-menu"],{"9dlw":function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var o=n("mrSG"),r=n("q1tI"),i=n.n(r),s=n("i8i4"),a=n.n(s),c=(n("EsMY"),n("AiMB")),u=n("DTHj"),l=n("X0gx"),d=n("8Rai");function p(e){var t=e.controller,n=e.children,s=e.isOpened,p=e.closeOnClickOutside,h=void 0===p||p,f=e.doNotCloseOn,v=e.onClickOutside,m=e.onClose,b=Object(o.__rest)(e,["controller","children","isOpened","closeOnClickOutside","doNotCloseOn","onClickOutside","onClose"]),g=Object(r.useContext)(l.a),_=Object(d.a)({handler:function(e){v&&v(e);if(!h)return;if(f&&e.target instanceof Node){var t=a.a.findDOMNode(f);if(t instanceof Node&&t.contains(e.target))return}m()},mouseDown:!0,touchStart:!0});return s?i.a.createElement(c.a,{top:"0",left:"0",right:"0",bottom:"0",pointerEvents:"none"},i.a.createElement("span",{ref:_,style:{pointerEvents:"auto"}},i.a.createElement(u.a,Object(o.__assign)({},b,{isOpened:s,onClose:m,onScroll:function(t){var n=e.onScroll;n&&n(t);t.stopPropagation()},customCloseDelegate:g,ref:t}),n))):null}},FO7Z:function(e,t,n){"use strict";n.r(t),n.d(t,"CurrencyLabelMenu",(function(){return l})),n.d(t,"showCurrencyLabelMenu",(function(){return d}));var o=n("mrSG"),r=n("q1tI"),i=n("i8i4"),s=n("9dlw"),a=n("N5tr"),c=n("7KDR"),u=n("Gwk6"),l=function(e){function t(t){return e.call(this,t)||this}return Object(o.__extends)(t,e),t.prototype.render=function(){return r.createElement(s.a,{isOpened:!0,onClose:this.props.onClose,doNotCloseOn:this.props.element,position:this.props.position},this._menuItems())},t.prototype._menuItems=function(){return this.props.actions.map((function(e,t){return e instanceof c.Separator?r.createElement("div",{key:"separator"+t,className:u.currencyLabelMenuSeparator}):r.createElement(a.b,{key:e.getLabel(),label:e.getLabel(),isActive:e.isChecked(),onClick:function(){return e.execute()}})}))},t}(r.PureComponent);function d(e,t,n){var o=document.createElement("span");o.className="currency-label-menu-wrapper",document.body.appendChild(o);var s=function(){null!==o&&(i.unmountComponentAtNode(o),document.body.removeChild(o),o=null)},a={actions:e,position:t,element:n,onClose:s};return i.render(r.createElement(l,a),o),{close:s,isOpened:function(){return null!==o}}}},Gwk6:function(e,t,n){e.exports={currencyLabelMenuSeparator:"currencyLabelMenuSeparator-13pkukWx"}},N5tr:function(e,t,n){"use strict";n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return f}));var o=n("mrSG"),r=n("q1tI"),i=n.n(r),s=n("TSYQ"),a=n("tWVy"),c=n("JWMC"),u=n("QpNh"),l=n("v1bN"),d=l;function p(e){var t=e.reference,n=Object(o.__rest)(e,["reference"]),r=Object(o.__assign)(Object(o.__assign)({},n),{ref:t});return i.a.createElement(e.href?"a":"div",r)}function h(e){e.stopPropagation()}function f(e){ +var t,n,d,f=e.className,v=e.title,m=e.labelRowClassName,b=e.shortcut,g=e.forceShowShortcuts,_=e.icon,w=e.isActive,O=e.isDisabled,y=e.isHovered,E=e.appearAsDisabled,C=e.label,x=e.link,k=e.showToolboxOnHover,N=e.target,j=e.toolbox,M=e.reference,S=e.onMouseOut,L=e.onMouseOver,I=e.theme,D=void 0===I?l:I,W=Object(u.a)(e),A=Object(r.useRef)(null);return i.a.createElement(p,Object(o.__assign)({},W,{className:s(f,D.item,_&&D.withIcon,(t={},t[D.isActive]=w,t[D.isDisabled]=O||E,t[D.hovered]=y,t)),title:v,href:x,target:N,reference:function(e){A.current=e,M&&M(e)},onClick:function(t){var n=e.dontClosePopup,o=e.onClick,r=e.onClickArg,i=e.trackEventObject;if(O)return;i&&Object(c.trackEvent)(i.category,i.event,i.label);o&&o(r,t);n||Object(a.b)()},onContextMenu:function(t){var n=e.trackEventObject,o=e.trackRightClick;n&&o&&Object(c.trackEvent)(n.category,n.event,n.label+"_rightClick")},onMouseUp:function(t){var n=e.trackEventObject,o=e.trackMouseWheelClick;if(1===t.button&&x&&n){var r=n.label;o&&(r+="_mouseWheelClick"),Object(c.trackEvent)(n.category,n.event,r)}},onMouseOver:L,onMouseOut:S}),void 0!==_&&i.a.createElement("div",{className:D.icon,dangerouslySetInnerHTML:{__html:_}}),i.a.createElement("div",{className:s(D.labelRow,m)},i.a.createElement("div",{className:D.label},C)),(void 0!==b||g)&&i.a.createElement("div",{className:D.shortcut},(d=b)&&d.split("+").join(" + ")),void 0!==j&&i.a.createElement("div",{onClick:h,className:s(D.toolbox,(n={},n[D.showOnHover]=k,n))},j))}},QpNh:function(e,t,n){"use strict";function o(e){for(var t={},n=0,o=Object.entries(e).filter(r);nr.timeStamp)){var i=r.target;void 0!==n&&null!==t&&null!==i&&i.ownerDocument===o&&(t.contains(i)||n(r))}}return r.click&&o.addEventListener("click",i,!1),r.mouseDown&&o.addEventListener("mousedown",i,!1),r.touchEnd&&o.addEventListener("touchend",i,!1),r.touchStart&&o.addEventListener("touchstart",i,!1),function(){o.removeEventListener("click",i,!1),o.removeEventListener("mousedown",i,!1),o.removeEventListener("touchend",i,!1),o.removeEventListener("touchstart",i,!1)}}n.d(t,"a",(function(){return o}))},jAh7:function(e,t,n){"use strict";n.r(t),n.d(t,"OverlapManager",(function(){return i})),n.d(t,"getRootOverlapManager",(function(){return a}));var o=n("Eyy1"),r=function(){function e(){this._storage=[]}return e.prototype.add=function(e){this._storage.push(e)},e.prototype.remove=function(e){this._storage=this._storage.filter((function(t){return e!==t}))},e.prototype.has=function(e){return this._storage.includes(e)},e.prototype.getItems=function(){return this._storage},e}(),i=function(){function e(e){void 0===e&&(e=document),this._storage=new r,this._windows=new Map,this._index=0,this._document=e,this._container=e.createDocumentFragment()}return e.prototype.setContainer=function(e){ +var t=this._container,n=null===e?this._document.createDocumentFragment():e;!function(e,t){Array.from(e.childNodes).forEach((function(e){e.nodeType===Node.ELEMENT_NODE&&t.appendChild(e)}))}(t,n),this._container=n},e.prototype.registerWindow=function(e){this._storage.has(e)||this._storage.add(e)},e.prototype.ensureWindow=function(e,t){void 0===t&&(t={position:"fixed",direction:"normal"});var n=this._windows.get(e);if(void 0!==n)return n;this.registerWindow(e);var o=this._document.createElement("div");if(o.style.position=t.position,o.style.zIndex=this._index.toString(),o.dataset.id=e,void 0!==t.index){var r=this._container.childNodes.length;if(t.index>=r)this._container.appendChild(o);else if(t.index<=0)this._container.insertBefore(o,this._container.firstChild);else{var i=this._container.childNodes[t.index];this._container.insertBefore(o,i)}}else"reverse"===t.direction?this._container.insertBefore(o,this._container.firstChild):this._container.appendChild(o);return this._windows.set(e,o),++this._index,o},e.prototype.unregisterWindow=function(e){this._storage.remove(e);var t=this._windows.get(e);void 0!==t&&(null!==t.parentElement&&t.parentElement.removeChild(t),this._windows.delete(e))},e.prototype.getZindex=function(e){var t=this.ensureWindow(e);return parseInt(t.style.zIndex||"0")},e.prototype.moveToTop=function(e){this.getZindex(e)!==this._index&&(this.ensureWindow(e).style.zIndex=(++this._index).toString())},e.prototype.removeWindow=function(e){this.unregisterWindow(e)},e}(),s=new WeakMap;function a(e){void 0===e&&(e=document);var t=e.getElementById("overlap-manager-root");if(null!==t)return Object(o.ensureDefined)(s.get(t));var n=new i(e),r=function(e){var t=e.createElement("div");return t.style.position="absolute",t.style.zIndex=150..toString(),t.style.top="0px",t.style.left="0px",t.id="overlap-manager-root",t}(e);return s.set(r,n),n.setContainer(r),e.body.appendChild(r),n}},v1bN:function(e,t,n){e.exports={"tablet-small-breakpoint":"screen and (max-width: 419px)",item:"item-2xPVYue0",hovered:"hovered-1uf45E05",isDisabled:"isDisabled-1wLqKupj",isActive:"isActive-2j-GhQs_",shortcut:"shortcut-30pveiCO",toolbox:"toolbox-3ulPxfe-",withIcon:"withIcon-1xBjf-oB",icon:"icon-2Qm7YIcz",labelRow:"labelRow-3Q0rdE8-",label:"label-3Xqxy756",showOnHover:"showOnHover-1q6ySzZc"}}}]); \ No newline at end of file diff --git a/public/charting_library/bundles/custom-intervals-add-dialog.841cdbed196b50c0e2ac.js b/public/charting_library/bundles/custom-intervals-add-dialog.841cdbed196b50c0e2ac.js new file mode 100644 index 00000000..01da8a19 --- /dev/null +++ b/public/charting_library/bundles/custom-intervals-add-dialog.841cdbed196b50c0e2ac.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([["custom-intervals-add-dialog"],{Qhte:function(e,t,n){e.exports={scrollable:"scrollable-Yu-wPchb",content:"content-2n4jbVjv",row:"row-37rvoi2g",title:"title-2jd7Qo8W",control:"control-1o8LMgzl"}},w9vS:function(e,t,n){"use strict";n.r(t),n.d(t,"ToolWidgetIntervalsAddDialog",(function(){return v}));var a=n("q1tI"),o=n.n(a),c=n("YFKU"),l=n("ycFu"),r=n("H172"),i=n("3G1X"),s=n("tWVy"),u=n("tmL0"),m=n("cSDC"),d=n("Qhte"),b=m.a.map((function(e){return{value:e.name,content:e.label}}));function v(e){var t=e.onAdd,n=e.onClose,v=e.onUnmount,f=Object(a.useState)(m.a[0].name),w=f[0],O=f[1],j=Object(a.useState)("1"),E=j[0],g=j[1];return Object(a.useEffect)((function(){return function(){v&&v()}}),[]),o.a.createElement(l.a,{dataName:"add-custom-interval-dialog",title:Object(c.t)("Add custom time interval"),isOpened:!0,onSubmit:function(){var e=Object(m.b)(E,w);void 0!==e&&t(e);n()},onCancel:n,onClickOutside:n,onClose:n,render:function(){return o.a.createElement(u.a,{className:d.scrollable,onScroll:N},o.a.createElement("div",{className:d.content},o.a.createElement("div",{className:d.row},o.a.createElement("div",{className:d.title},Object(c.t)("Type")),o.a.createElement(r.a,{className:d.control,value:w,items:b,onChange:C})),o.a.createElement("div",{className:d.row},o.a.createElement("div",{className:d.title},Object(c.t)("Interval")),o.a.createElement(i.b,{className:d.control,inputMode:"numeric",maxLength:6,value:E,onChange:p}))))},defaultActionOnClose:l.b.None,submitButtonText:Object(c.t)("Add"),submitOnEnterKey:!1,fullScreen:!0});function p(e){var t=e.currentTarget.value;/^[0-9]*$/.test(t)&&g(t)}function N(){s.a.fire()}function C(e){O(e)}}}}]); \ No newline at end of file diff --git a/public/charting_library/bundles/dialogs-core.76a8074978d8af748add.css b/public/charting_library/bundles/dialogs-core.76a8074978d8af748add.css new file mode 100644 index 00000000..ed9b9a96 --- /dev/null +++ b/public/charting_library/bundles/dialogs-core.76a8074978d8af748add.css @@ -0,0 +1 @@ +.tv-dialog__section{padding:30px;border-bottom:1px solid;border-bottom-color:#dadde0}html.theme-dark .tv-dialog__section{border-bottom-color:#363c4e}.tv-dialog__section--last,.tv-dialog__section--no-border,.tv-dialog__section:last-child{border-bottom:none!important}@media screen and (max-width:767px){.tv-dialog__section{padding:20px}}.tv-dialog__section--no-padding_bottom{padding-bottom:0}.tv-dialog__section--actions{display:inline-block;box-sizing:border-box;white-space:nowrap;width:100%;padding-bottom:40px;text-align:right}.tv-dialog__section--actions_with-help:after{clear:both;display:table;content:""}.tv-dialog__section--actions_with-border{border-top:1px solid;border-top-color:#dadde0;padding-top:29px}html.theme-dark .tv-dialog__section--actions_with-border{border-top-color:#363c4e}@media screen and (max-width:767px){.tv-dialog__section--actions_with-border{padding:19px}}.tv-dialog__section--actions_multiline{white-space:normal;padding-top:24px}@media screen and (max-width:479px){.tv-dialog__section--actions_multiline{padding-top:20px}}.tv-dialog__section--actions_multiline .tv-control-checkbox--do-not-show-again{width:100%;margin-bottom:24px}@media screen and (max-width:479px){.tv-dialog__section--actions_multiline .tv-control-checkbox--do-not-show-again{margin-bottom:0}}@media screen and (max-width:479px){.tv-dialog__section--actions-adaptive{display:flex;flex-flow:column-reverse wrap}.tv-dialog__section--actions-adaptive .tv-button{margin-top:10px}.tv-dialog__section--actions-adaptive .tv-control-checkbox{order:1}.tv-dialog__section--actions-adaptive .tv-button:first-child,.tv-dialog__section--actions-adaptive .tv-button:last-child{margin-left:0}}.tv-dialog__section--title{padding-right:70px}.tv-dialog__section--one-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tv-dialog{display:inline-block;position:relative;min-width:280px;text-align:left;box-sizing:border-box;transition-property:none;border-radius:3px;background-color:#fff;box-shadow:0 2px 4px 0 rgba(107,121,136,.4)}html.theme-dark .tv-dialog{background-color:#1e222d;box-shadow:0 2px 4px 0 #000}.tv-dialog .tv-text p:last-child,.tv-dialog ul:last-child{margin-bottom:0}.tv-dialog--animated{transition:transform .2625s cubic-bezier(.215,.61,.355,1),opacity .2625s cubic-bezier(.215,.61,.355,1),box-shadow .2625s cubic-bezier(.215,.61,.355,1)}.tv-dialog.i-focused{box-shadow:0 1px 6px 1px rgba(0,0,0,.275)}.tv-dialog--signin{transition-delay:.2625s}.tv-dialog--signin.i-closing{transition-delay:1ms;transition-duration:.175s}.tv-dialog--signin,.tv-dialog--signin.i-focused{box-shadow:none!important;background-color:transparent}html.theme-dark .tv-dialog--signin,html.theme-dark .tv-dialog--signin.i-focused{background-color:transparent}.tv-dialog--popup{width:calc(100% - 20px)}.tv-dialog__modal-wrap,.tv-dialog__overlay{position:fixed;contain:layout style size;left:0;top:0;right:0;bottom:0;z-index:110;box-sizing:border-box}.tv-dialog__modal-wrap--contain-size,.tv-dialog__overlay--contain-size{contain:size}.tv-dialog__overlay{background-color:rgba(0,0,0,.05);transition:opacity .2625s cubic-bezier(.215,.61,.355,1)}.tv-dialog__overlay.i-closed{opacity:0;transition-duration:.175s;transition-timing-function:cubic-bezier(.55,.055,.675,.19)}.tv-dialog__overlay--signin,html.theme-dark .tv-dialog__overlay--signin{background-color:#fff}.tv-dialog__overlay--signin.i-closing{transition-delay:.175s}.tv-dialog__modal-wrap{overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:touch}.tv-dialog__modal-wrap.i-closed .tv-dialog{opacity:0;transform:translateY(20px);transition-duration:.175s;transition-timing-function:cubic-bezier(.55,.055,.675,.19)}.tv-dialog__modal-wrap.i-closed .tv-dialog--signin{transform:scale(.9)}.tv-dialog__modal-wrap.i-closed .tv-dialog--signin.i-closing{transform:scale(1.1)}.tv-dialog__modal-container{height:100%;margin:0;padding:0;border:0;text-align:center;box-sizing:border-box}.tv-dialog__modal-container:after{content:"";display:inline-block;vertical-align:middle;height:100%}.tv-dialog__modal-body{display:inline-block;vertical-align:middle;padding:40px 20px;font-size:14px;width:100%;box-sizing:border-box}@media screen and (max-width:1019px){.tv-dialog__modal-body{padding:20px}}.tv-dialog__error{position:absolute;padding:30px;top:0;left:0;right:0;color:#ff4a68;background:#fff;border:1px solid #ff4a68;border-radius:3px 3px 0 0;transform-origin:top center;box-sizing:border-box;transition:transform .175s cubic-bezier(.215,.61,.355,1),opacity .175s cubic-bezier(.215,.61,.355,1);z-index:1}html.theme-dark .tv-dialog__error{background:#1e222d}.tv-dialog__error.i-slided{opacity:0;transform:translateY(-5px) scaleY(.85);transition-timing-function:cubic-bezier(.55,.055,.675,.19)}.tv-dialog__error.i-fixed{margin:0 auto;position:fixed;top:10px}@media screen and (max-width:767px){.tv-dialog__error{padding:20px}}.tv-dialog__error a{color:#ff4a68;transition:color .35s ease;text-decoration:underline}.tv-dialog__error a:visited{color:#ff4a68;fill:#ff4a68}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-dialog__error a:hover{color:#f24965;fill:#f24965;transition-duration:.06s}}.tv-dialog__error a:focus{outline:auto}.tv-dialog__error a:focus:not(:-moz-focusring){outline:none}.tv-dialog__error a:-moz-focusring{outline:auto}.tv-dialog__error a:active{color:#ff173e;fill:#ff173e;transition-duration:.06s}.tv-dialog__error--dark{border-radius:3px;border-color:#4e5866;background-color:#2a2c39}.tv-dialog__header{display:flex;padding-top:10px}@media screen and (max-width:479px){.tv-dialog__header--adaptive{flex-direction:column;text-align:center}}.tv-dialog__header-logo{margin-right:20px;margin-bottom:10px;flex:0 0 auto}.tv-dialog__header-logo svg{max-height:95px}.tv-dialog__header-title{flex:1 1 auto}.tv-dialog__grab{cursor:grab}.tv-dialog__grab:active,.ui-draggable-dragging .tv-dialog__grab{cursor:grabbing}.tv-dialog__title{font-size:14px;font-weight:700;color:#4a4a4a}html.theme-dark .tv-dialog__title{color:#c5cbce}.tv-dialog__title--relative{position:relative}.tv-dialog__close{position:absolute;padding:15px;top:17px;right:15px;cursor:pointer;opacity:.5;transition:opacity .35s ease;-webkit-user-select:none;user-select:none;color:#4a4a4a}html.theme-dark .tv-dialog__close{color:#c5cbce}@media screen and (max-width:767px){.tv-dialog__close{top:7px;right:7px}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-dialog__close:hover{opacity:1;transition-duration:.06s}}.tv-dialog__close svg{display:block;width:13px;height:13px}.tv-dialog__close--new-style svg{width:21px;height:21px;fill:#4c525e}.tv-dialog__widetextarea{display:block;padding:0 12px;width:100%;height:34px;font-size:13px;border:1px solid #dadde0;border-radius:2px;box-sizing:border-box;-webkit-tap-highlight-color:transparent;transition:border-color .35s ease,background-color .35s ease;-webkit-appearance:none;-moz-appearance:none;appearance:none;height:auto;padding-top:9px;padding-bottom:9px;padding:25px 30px;border-radius:0;border-left:none;border-right:none;background-color:#fff;color:#4a4a4a}html.theme-dark .tv-dialog__widetextarea{color:#c5cbce;background-color:#1e222d;border-color:#363c4e}.tv-dialog__widetextarea::placeholder{color:#adaeb0;opacity:1}html.theme-dark .tv-dialog__widetextarea::placeholder{color:#4f5966}.tv-dialog__widetextarea:-webkit-autofill{-webkit-text-fill-color:#535353!important;box-shadow:inset 0 0 0 1000px #fff!important}.tv-dialog__widetextarea--size_xsmall{height:19px}.tv-dialog__widetextarea--size_small{height:27px}.tv-dialog__widetextarea--size_large{height:48px;font-size:16px}.tv-dialog__widetextarea--connect{border-left:0;border-right:0;border-radius:0}.tv-dialog__widetextarea--connect_left{border-left:none;border-top-left-radius:0;border-bottom-left-radius:0}.tv-dialog__widetextarea--connect_right{border-right:none;border-top-right-radius:0;border-bottom-right-radius:0}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-dialog__widetextarea:hover{border-color:#c8c8c8;transition-duration:.06s}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-dialog__widetextarea:hover{border-color:#4c525e}}.tv-dialog__widetextarea:focus{border-color:#2196f3!important;transition-duration:.06s}.tv-dialog__widetextarea[readonly]{color:#8a8a8a;border-color:#dadde0}.tv-dialog__widetextarea[readonly]:focus{border-color:#ececec!important}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-dialog__widetextarea[readonly]:hover{border-color:#ececec!important}}html.theme-dark .tv-dialog__widetextarea[readonly]:focus{border-color:#262b3e!important}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-dialog__widetextarea[readonly]:hover{border-color:#262b3e!important}}.tv-dialog__widetextarea.i-disabled,.tv-dialog__widetextarea[disabled]{color:#ececec!important;border-color:#ececec!important}html.theme-dark .tv-dialog__widetextarea.i-disabled,html.theme-dark .tv-dialog__widetextarea[disabled]{border-color:#262b3e!important;color:#262b3e!important}.tv-dialog__widetextarea.i-disabled::placeholder,.tv-dialog__widetextarea[disabled]::placeholder{color:#ececec!important}html.theme-dark .tv-dialog__widetextarea.i-disabled::placeholder,html.theme-dark .tv-dialog__widetextarea[disabled]::placeholder{color:#262b3e!important}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-dialog__widetextarea.i-disabled:hover,.tv-dialog__widetextarea[disabled]:hover{border-color:#ececec!important}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-dialog__widetextarea.i-disabled:hover,html.theme-dark .tv-dialog__widetextarea[disabled]:hover{border-color:#262b3e!important}}.tv-dialog__widetextarea.i-error{border-color:#ff4a68!important}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-dialog__widetextarea.i-error:hover{border-color:#f24965!important}}.tv-dialog__widetextarea.i-error:focus{border-color:#ff173e!important}.tv-dialog__widetextarea.i-success{border-color:#009688!important}html.theme-dark .tv-dialog__widetextarea.i-success{border-color:#00796b!important}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-dialog__widetextarea.i-success:hover,html.theme-dark .tv-dialog__widetextarea.i-success:hover{border-color:#00897b!important}}.tv-dialog__widetextarea.i-success:active,.tv-dialog__widetextarea.i-success:focus{border-color:#00796b!important}html.theme-dark .tv-dialog__widetextarea.i-success:active,html.theme-dark .tv-dialog__widetextarea.i-success:focus{border-color:#009688!important}.tv-dialog__widetextarea--phone{direction:ltr;text-align:left}.tv-dialog__widetextarea--readonly_dark,.tv-dialog__widetextarea--readonly_dark[readonly]{color:#555}html.theme-dark .tv-dialog__widetextarea--readonly_dark,html.theme-dark .tv-dialog__widetextarea--readonly_dark[readonly]{color:#4c525e}@media screen and (max-width:767px){.tv-dialog__widetextarea{padding:15px 20px}}.tv-dialog__expand-section{margin:0 -30px}@media screen and (max-width:767px){.tv-dialog__expand-section{margin:0 -20px}}.tv-dialog--popup{position:fixed}.tv-dialog--popup.i-closed{opacity:0;transform:scale(.925)}.tv-dialog__help{float:left;position:relative;top:8px;margin-right:15px;width:18px;height:18px;font-size:13px;line-height:16px;color:#787b86;border:1px solid;border-color:#787b86;border-radius:50%;transition:border-color .35s ease,color .35s ease}html.theme-dark .tv-dialog__help{border-color:#787b86;color:#787b86}.tv-dialog__help:after{content:"?";position:absolute;display:inline-block;top:2px;left:7px}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-dialog__help:hover{color:#212121;border:1px solid;border-color:#4a4a4a;transition-duration:.06s}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-dialog__help:hover{border-color:#c5cbce}}.tv-dialog__username-pretext{margin-right:5px}.tv-dialog__chat-username-input{display:block;padding:0 12px;width:100%;height:34px;font-size:13px;color:#4a4a4a;border:1px solid #dadde0;background-color:#fff;border-radius:2px;box-sizing:border-box;-webkit-tap-highlight-color:transparent;transition:border-color .35s ease,background-color .35s ease;-webkit-appearance:none;-moz-appearance:none;appearance:none}html.theme-dark .tv-dialog__chat-username-input{background-color:#1e222d;border-color:#363c4e;color:#c5cbce}.tv-dialog__chat-username-input::placeholder{color:#adaeb0;opacity:1}html.theme-dark .tv-dialog__chat-username-input::placeholder{color:#4f5966}.tv-dialog__chat-username-input:-webkit-autofill{-webkit-text-fill-color:#535353!important;box-shadow:inset 0 0 0 1000px #fff!important}.tv-dialog__chat-username-input--size_xsmall{height:19px}.tv-dialog__chat-username-input--size_small{height:27px}.tv-dialog__chat-username-input--size_large{height:48px;font-size:16px}.tv-dialog__chat-username-input--connect{border-left:0;border-right:0;border-radius:0}.tv-dialog__chat-username-input--connect_left{border-left:none;border-top-left-radius:0;border-bottom-left-radius:0}.tv-dialog__chat-username-input--connect_right{border-right:none;border-top-right-radius:0;border-bottom-right-radius:0}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-dialog__chat-username-input:hover{border-color:#c8c8c8;transition-duration:.06s}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-dialog__chat-username-input:hover{border-color:#4c525e}}.tv-dialog__chat-username-input:focus{border-color:#2196f3!important;transition-duration:.06s}.tv-dialog__chat-username-input[readonly]{color:#8a8a8a;border-color:#dadde0}.tv-dialog__chat-username-input[readonly]:focus{border-color:#ececec!important}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-dialog__chat-username-input[readonly]:hover{border-color:#ececec!important}}html.theme-dark .tv-dialog__chat-username-input[readonly]:focus{border-color:#262b3e!important}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-dialog__chat-username-input[readonly]:hover{border-color:#262b3e!important}}.tv-dialog__chat-username-input--readonly_dark,.tv-dialog__chat-username-input--readonly_dark[readonly]{color:#555}html.theme-dark .tv-dialog__chat-username-input--readonly_dark,html.theme-dark .tv-dialog__chat-username-input--readonly_dark[readonly]{color:#4c525e}.tv-dialog__chat-username-input.i-disabled,.tv-dialog__chat-username-input[disabled]{color:#ececec!important;border-color:#ececec!important}html.theme-dark .tv-dialog__chat-username-input.i-disabled,html.theme-dark .tv-dialog__chat-username-input[disabled]{border-color:#262b3e!important;color:#262b3e!important}.tv-dialog__chat-username-input.i-disabled::placeholder,.tv-dialog__chat-username-input[disabled]::placeholder{color:#ececec!important}html.theme-dark .tv-dialog__chat-username-input.i-disabled::placeholder,html.theme-dark .tv-dialog__chat-username-input[disabled]::placeholder{color:#262b3e!important}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-dialog__chat-username-input.i-disabled:hover,.tv-dialog__chat-username-input[disabled]:hover{border-color:#ececec!important}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-dialog__chat-username-input.i-disabled:hover,html.theme-dark .tv-dialog__chat-username-input[disabled]:hover{border-color:#262b3e!important}}.tv-dialog__chat-username-input.i-error{border-color:#ff4a68!important}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-dialog__chat-username-input.i-error:hover{border-color:#f24965!important}}.tv-dialog__chat-username-input.i-error:focus{border-color:#ff173e!important}.tv-dialog__chat-username-input.i-success{border-color:#009688!important}html.theme-dark .tv-dialog__chat-username-input.i-success{border-color:#00796b!important}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-dialog__chat-username-input.i-success:hover,html.theme-dark .tv-dialog__chat-username-input.i-success:hover{border-color:#00897b!important}}.tv-dialog__chat-username-input.i-success:active,.tv-dialog__chat-username-input.i-success:focus{border-color:#00796b!important}html.theme-dark .tv-dialog__chat-username-input.i-success:active,html.theme-dark .tv-dialog__chat-username-input.i-success:focus{border-color:#009688!important}.tv-dialog__chat-username-input--phone{direction:ltr;text-align:left}.tv-dialog__chat-username-input.tv-dialog__chat-username-input{display:inline-block;border-width:0;width:85%;height:15px;background-color:#fff;color:#4a4a4a}html.theme-dark .tv-dialog__chat-username-input.tv-dialog__chat-username-input{color:#c5cbce;background-color:#1e222d}.tv-dialog__chat-username-input--error{background-color:#daa}html.theme-dark .tv-dialog__chat-username-input--error{background-color:#ff4a68}.tv-dialog__scroll-wrap{position:relative}.tv-dialog__scroll-wrap.i-scrollable{overflow:hidden}.feature-mobiletouch .tv-dialog__scroll-wrap.i-scrollable{overflow-x:hidden;overflow-y:scroll}.tv-dialog__scroll-wrap-inner{position:relative;padding-bottom:0}.tv-dialog__scroll-wrap.i-with-actions.i-scrollable .tv-dialog__scroll-wrap-inner{padding-bottom:30px}@media screen and (max-width:767px){.tv-dialog__scroll-wrap.i-with-actions.i-scrollable .tv-dialog__scroll-wrap-inner{padding-bottom:20px}}.tv-dialog__link{color:#2196f3;transition:color .35s ease}html.theme-dark .tv-dialog__link{color:#1976d2}.tv-dialog__link:visited{color:#2196f3;fill:#2196f3}html.theme-dark .tv-dialog__link:visited{fill:#1976d2;color:#1976d2}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-dialog__link:hover{color:#1e88e5;fill:#1e88e5;transition-duration:.06s}}.tv-dialog__link:focus{outline:auto}.tv-dialog__link:focus:not(:-moz-focusring){outline:none}.tv-dialog__link:-moz-focusring{outline:auto}.tv-dialog__link:active{color:#1e88e5;fill:#1e88e5;transition-duration:.06s} \ No newline at end of file diff --git a/public/charting_library/bundles/dialogs-core.76a8074978d8af748add.rtl.css b/public/charting_library/bundles/dialogs-core.76a8074978d8af748add.rtl.css new file mode 100644 index 00000000..e02736ee --- /dev/null +++ b/public/charting_library/bundles/dialogs-core.76a8074978d8af748add.rtl.css @@ -0,0 +1 @@ +.tv-dialog__section{padding:30px;border-bottom:1px solid;border-bottom-color:#dadde0}html.theme-dark .tv-dialog__section{border-bottom-color:#363c4e}.tv-dialog__section--last,.tv-dialog__section--no-border,.tv-dialog__section:last-child{border-bottom:none!important}@media screen and (max-width:767px){.tv-dialog__section{padding:20px}}.tv-dialog__section--no-padding_bottom{padding-bottom:0}.tv-dialog__section--actions{display:inline-block;box-sizing:border-box;white-space:nowrap;width:100%;padding-bottom:40px;text-align:left}.tv-dialog__section--actions_with-help:after{clear:both;display:table;content:""}.tv-dialog__section--actions_with-border{border-top:1px solid;border-top-color:#dadde0;padding-top:29px}html.theme-dark .tv-dialog__section--actions_with-border{border-top-color:#363c4e}@media screen and (max-width:767px){.tv-dialog__section--actions_with-border{padding:19px}}.tv-dialog__section--actions_multiline{white-space:normal;padding-top:24px}@media screen and (max-width:479px){.tv-dialog__section--actions_multiline{padding-top:20px}}.tv-dialog__section--actions_multiline .tv-control-checkbox--do-not-show-again{width:100%;margin-bottom:24px}@media screen and (max-width:479px){.tv-dialog__section--actions_multiline .tv-control-checkbox--do-not-show-again{margin-bottom:0}}@media screen and (max-width:479px){.tv-dialog__section--actions-adaptive{display:flex;flex-flow:column-reverse wrap}.tv-dialog__section--actions-adaptive .tv-button{margin-top:10px}.tv-dialog__section--actions-adaptive .tv-control-checkbox{order:1}.tv-dialog__section--actions-adaptive .tv-button:first-child,.tv-dialog__section--actions-adaptive .tv-button:last-child{margin-right:0}}.tv-dialog__section--title{padding-left:70px}.tv-dialog__section--one-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tv-dialog{display:inline-block;position:relative;min-width:280px;text-align:right;box-sizing:border-box;transition-property:none;border-radius:3px;background-color:#fff;box-shadow:0 2px 4px 0 rgba(107,121,136,.4)}html.theme-dark .tv-dialog{background-color:#1e222d;box-shadow:0 2px 4px 0 #000}.tv-dialog .tv-text p:last-child,.tv-dialog ul:last-child{margin-bottom:0}.tv-dialog--animated{transition:transform .2625s cubic-bezier(.215,.61,.355,1),opacity .2625s cubic-bezier(.215,.61,.355,1),box-shadow .2625s cubic-bezier(.215,.61,.355,1)}.tv-dialog.i-focused{box-shadow:0 1px 6px 1px rgba(0,0,0,.275)}.tv-dialog--signin{transition-delay:.2625s}.tv-dialog--signin.i-closing{transition-delay:1ms;transition-duration:.175s}.tv-dialog--signin,.tv-dialog--signin.i-focused{box-shadow:none!important;background-color:transparent}html.theme-dark .tv-dialog--signin,html.theme-dark .tv-dialog--signin.i-focused{background-color:transparent}.tv-dialog--popup{width:calc(100% - 20px)}.tv-dialog__modal-wrap,.tv-dialog__overlay{position:fixed;contain:layout style size;right:0;top:0;left:0;bottom:0;z-index:110;box-sizing:border-box}.tv-dialog__modal-wrap--contain-size,.tv-dialog__overlay--contain-size{contain:size}.tv-dialog__overlay{background-color:rgba(0,0,0,.05);transition:opacity .2625s cubic-bezier(.215,.61,.355,1)}.tv-dialog__overlay.i-closed{opacity:0;transition-duration:.175s;transition-timing-function:cubic-bezier(.55,.055,.675,.19)}.tv-dialog__overlay--signin,html.theme-dark .tv-dialog__overlay--signin{background-color:#fff}.tv-dialog__overlay--signin.i-closing{transition-delay:.175s}.tv-dialog__modal-wrap{overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:touch}.tv-dialog__modal-wrap.i-closed .tv-dialog{opacity:0;transform:translateY(20px);transition-duration:.175s;transition-timing-function:cubic-bezier(.55,.055,.675,.19)}.tv-dialog__modal-wrap.i-closed .tv-dialog--signin{transform:scale(.9)}.tv-dialog__modal-wrap.i-closed .tv-dialog--signin.i-closing{transform:scale(1.1)}.tv-dialog__modal-container{height:100%;margin:0;padding:0;border:0;text-align:center;box-sizing:border-box}.tv-dialog__modal-container:after{content:"";display:inline-block;vertical-align:middle;height:100%}.tv-dialog__modal-body{display:inline-block;vertical-align:middle;padding:40px 20px;font-size:14px;width:100%;box-sizing:border-box}@media screen and (max-width:1019px){.tv-dialog__modal-body{padding:20px}}.tv-dialog__error{position:absolute;padding:30px;top:0;right:0;left:0;color:#ff4a68;background:#fff;border:1px solid #ff4a68;border-radius:3px 3px 0 0;transform-origin:top center;box-sizing:border-box;transition:transform .175s cubic-bezier(.215,.61,.355,1),opacity .175s cubic-bezier(.215,.61,.355,1);z-index:1}html.theme-dark .tv-dialog__error{background:#1e222d}.tv-dialog__error.i-slided{opacity:0;transform:translateY(-5px) scaleY(.85);transition-timing-function:cubic-bezier(.55,.055,.675,.19)}.tv-dialog__error.i-fixed{margin:0 auto;position:fixed;top:10px}@media screen and (max-width:767px){.tv-dialog__error{padding:20px}}.tv-dialog__error a{color:#ff4a68;transition:color .35s ease;text-decoration:underline}.tv-dialog__error a:visited{color:#ff4a68;fill:#ff4a68}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-dialog__error a:hover{color:#f24965;fill:#f24965;transition-duration:.06s}}.tv-dialog__error a:focus{outline:auto}.tv-dialog__error a:focus:not(:-moz-focusring){outline:none}.tv-dialog__error a:-moz-focusring{outline:auto}.tv-dialog__error a:active{color:#ff173e;fill:#ff173e;transition-duration:.06s}.tv-dialog__error--dark{border-radius:3px;border-color:#4e5866;background-color:#2a2c39}.tv-dialog__header{display:flex;padding-top:10px}@media screen and (max-width:479px){.tv-dialog__header--adaptive{flex-direction:column;text-align:center}}.tv-dialog__header-logo{margin-left:20px;margin-bottom:10px;flex:0 0 auto}.tv-dialog__header-logo svg{max-height:95px}.tv-dialog__header-title{flex:1 1 auto}.tv-dialog__grab{cursor:grab}.tv-dialog__grab:active,.ui-draggable-dragging .tv-dialog__grab{cursor:grabbing}.tv-dialog__title{font-size:14px;font-weight:700;color:#4a4a4a}html.theme-dark .tv-dialog__title{color:#c5cbce}.tv-dialog__title--relative{position:relative}.tv-dialog__close{position:absolute;padding:15px;top:17px;left:15px;cursor:pointer;opacity:.5;transition:opacity .35s ease;-webkit-user-select:none;user-select:none;color:#4a4a4a}html.theme-dark .tv-dialog__close{color:#c5cbce}@media screen and (max-width:767px){.tv-dialog__close{top:7px;left:7px}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-dialog__close:hover{opacity:1;transition-duration:.06s}}.tv-dialog__close svg{display:block;width:13px;height:13px}.tv-dialog__close--new-style svg{width:21px;height:21px;fill:#4c525e}.tv-dialog__widetextarea{display:block;padding:0 12px;width:100%;height:34px;font-size:13px;border:1px solid #dadde0;border-radius:2px;box-sizing:border-box;-webkit-tap-highlight-color:transparent;transition:border-color .35s ease,background-color .35s ease;-webkit-appearance:none;-moz-appearance:none;appearance:none;height:auto;padding-top:9px;padding-bottom:9px;padding:25px 30px;border-radius:0;border-right:none;border-left:none;background-color:#fff;color:#4a4a4a}html.theme-dark .tv-dialog__widetextarea{color:#c5cbce;background-color:#1e222d;border-color:#363c4e}.tv-dialog__widetextarea::placeholder{color:#adaeb0;opacity:1}html.theme-dark .tv-dialog__widetextarea::placeholder{color:#4f5966}.tv-dialog__widetextarea:-webkit-autofill{-webkit-text-fill-color:#535353!important;box-shadow:inset 0 0 0 1000px #fff!important}.tv-dialog__widetextarea--size_xsmall{height:19px}.tv-dialog__widetextarea--size_small{height:27px}.tv-dialog__widetextarea--size_large{height:48px;font-size:16px}.tv-dialog__widetextarea--connect{border-right:0;border-left:0;border-radius:0}.tv-dialog__widetextarea--connect_left{border-right:none;border-top-right-radius:0;border-bottom-right-radius:0}.tv-dialog__widetextarea--connect_right{border-left:none;border-top-left-radius:0;border-bottom-left-radius:0}.tv-dialog__widetextarea--connect_right#id_username{direction:ltr;text-align:right}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-dialog__widetextarea:hover{border-color:#c8c8c8;transition-duration:.06s}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-dialog__widetextarea:hover{border-color:#4c525e}}.tv-dialog__widetextarea:focus{border-color:#2196f3!important;transition-duration:.06s}.tv-dialog__widetextarea[readonly]{color:#8a8a8a;border-color:#dadde0}.tv-dialog__widetextarea[readonly]:focus{border-color:#ececec!important}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-dialog__widetextarea[readonly]:hover{border-color:#ececec!important}}html.theme-dark .tv-dialog__widetextarea[readonly]:focus{border-color:#262b3e!important}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-dialog__widetextarea[readonly]:hover{border-color:#262b3e!important}}.tv-dialog__widetextarea.i-disabled,.tv-dialog__widetextarea[disabled]{color:#ececec!important;border-color:#ececec!important}html.theme-dark .tv-dialog__widetextarea.i-disabled,html.theme-dark .tv-dialog__widetextarea[disabled]{border-color:#262b3e!important;color:#262b3e!important}.tv-dialog__widetextarea.i-disabled::placeholder,.tv-dialog__widetextarea[disabled]::placeholder{color:#ececec!important}html.theme-dark .tv-dialog__widetextarea.i-disabled::placeholder,html.theme-dark .tv-dialog__widetextarea[disabled]::placeholder{color:#262b3e!important}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-dialog__widetextarea.i-disabled:hover,.tv-dialog__widetextarea[disabled]:hover{border-color:#ececec!important}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-dialog__widetextarea.i-disabled:hover,html.theme-dark .tv-dialog__widetextarea[disabled]:hover{border-color:#262b3e!important}}.tv-dialog__widetextarea.i-error{border-color:#ff4a68!important}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-dialog__widetextarea.i-error:hover{border-color:#f24965!important}}.tv-dialog__widetextarea.i-error:focus{border-color:#ff173e!important}.tv-dialog__widetextarea.i-success{border-color:#009688!important}html.theme-dark .tv-dialog__widetextarea.i-success{border-color:#00796b!important}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-dialog__widetextarea.i-success:hover,html.theme-dark .tv-dialog__widetextarea.i-success:hover{border-color:#00897b!important}}.tv-dialog__widetextarea.i-success:active,.tv-dialog__widetextarea.i-success:focus{border-color:#00796b!important}html.theme-dark .tv-dialog__widetextarea.i-success:active,html.theme-dark .tv-dialog__widetextarea.i-success:focus{border-color:#009688!important}.tv-dialog__widetextarea--phone{direction:ltr;text-align:right}.tv-dialog__widetextarea--readonly_dark,.tv-dialog__widetextarea--readonly_dark[readonly]{color:#555}html.theme-dark .tv-dialog__widetextarea--readonly_dark,html.theme-dark .tv-dialog__widetextarea--readonly_dark[readonly]{color:#4c525e}@media screen and (max-width:767px){.tv-dialog__widetextarea{padding:15px 20px}}.tv-dialog__expand-section{margin:0 -30px}@media screen and (max-width:767px){.tv-dialog__expand-section{margin:0 -20px}}.tv-dialog--popup{position:fixed}.tv-dialog--popup.i-closed{opacity:0;transform:scale(.925)}.tv-dialog__help{float:right;position:relative;top:8px;margin-left:15px;width:18px;height:18px;font-size:13px;line-height:16px;color:#787b86;border:1px solid;border-color:#787b86;border-radius:50%;transition:border-color .35s ease,color .35s ease}html.theme-dark .tv-dialog__help{border-color:#787b86;color:#787b86}.tv-dialog__help:after{content:"?";position:absolute;display:inline-block;top:2px;right:7px}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-dialog__help:hover{color:#212121;border:1px solid;border-color:#4a4a4a;transition-duration:.06s}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-dialog__help:hover{border-color:#c5cbce}}.tv-dialog__username-pretext{margin-left:5px}.tv-dialog__chat-username-input{display:block;padding:0 12px;width:100%;height:34px;font-size:13px;color:#4a4a4a;border:1px solid #dadde0;background-color:#fff;border-radius:2px;box-sizing:border-box;-webkit-tap-highlight-color:transparent;transition:border-color .35s ease,background-color .35s ease;-webkit-appearance:none;-moz-appearance:none;appearance:none}html.theme-dark .tv-dialog__chat-username-input{background-color:#1e222d;border-color:#363c4e;color:#c5cbce}.tv-dialog__chat-username-input::placeholder{color:#adaeb0;opacity:1}html.theme-dark .tv-dialog__chat-username-input::placeholder{color:#4f5966}.tv-dialog__chat-username-input:-webkit-autofill{-webkit-text-fill-color:#535353!important;box-shadow:inset 0 0 0 1000px #fff!important}.tv-dialog__chat-username-input--size_xsmall{height:19px}.tv-dialog__chat-username-input--size_small{height:27px}.tv-dialog__chat-username-input--size_large{height:48px;font-size:16px}.tv-dialog__chat-username-input--connect{border-right:0;border-left:0;border-radius:0}.tv-dialog__chat-username-input--connect_left{border-right:none;border-top-right-radius:0;border-bottom-right-radius:0}.tv-dialog__chat-username-input--connect_right{border-left:none;border-top-left-radius:0;border-bottom-left-radius:0}.tv-dialog__chat-username-input--connect_right#id_username{direction:ltr;text-align:right}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-dialog__chat-username-input:hover{border-color:#c8c8c8;transition-duration:.06s}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-dialog__chat-username-input:hover{border-color:#4c525e}}.tv-dialog__chat-username-input:focus{border-color:#2196f3!important;transition-duration:.06s}.tv-dialog__chat-username-input[readonly]{color:#8a8a8a;border-color:#dadde0}.tv-dialog__chat-username-input[readonly]:focus{border-color:#ececec!important}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-dialog__chat-username-input[readonly]:hover{border-color:#ececec!important}}html.theme-dark .tv-dialog__chat-username-input[readonly]:focus{border-color:#262b3e!important}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-dialog__chat-username-input[readonly]:hover{border-color:#262b3e!important}}.tv-dialog__chat-username-input--readonly_dark,.tv-dialog__chat-username-input--readonly_dark[readonly]{color:#555}html.theme-dark .tv-dialog__chat-username-input--readonly_dark,html.theme-dark .tv-dialog__chat-username-input--readonly_dark[readonly]{color:#4c525e}.tv-dialog__chat-username-input.i-disabled,.tv-dialog__chat-username-input[disabled]{color:#ececec!important;border-color:#ececec!important}html.theme-dark .tv-dialog__chat-username-input.i-disabled,html.theme-dark .tv-dialog__chat-username-input[disabled]{border-color:#262b3e!important;color:#262b3e!important}.tv-dialog__chat-username-input.i-disabled::placeholder,.tv-dialog__chat-username-input[disabled]::placeholder{color:#ececec!important}html.theme-dark .tv-dialog__chat-username-input.i-disabled::placeholder,html.theme-dark .tv-dialog__chat-username-input[disabled]::placeholder{color:#262b3e!important}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-dialog__chat-username-input.i-disabled:hover,.tv-dialog__chat-username-input[disabled]:hover{border-color:#ececec!important}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-dialog__chat-username-input.i-disabled:hover,html.theme-dark .tv-dialog__chat-username-input[disabled]:hover{border-color:#262b3e!important}}.tv-dialog__chat-username-input.i-error{border-color:#ff4a68!important}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-dialog__chat-username-input.i-error:hover{border-color:#f24965!important}}.tv-dialog__chat-username-input.i-error:focus{border-color:#ff173e!important}.tv-dialog__chat-username-input.i-success{border-color:#009688!important}html.theme-dark .tv-dialog__chat-username-input.i-success{border-color:#00796b!important}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-dialog__chat-username-input.i-success:hover,html.theme-dark .tv-dialog__chat-username-input.i-success:hover{border-color:#00897b!important}}.tv-dialog__chat-username-input.i-success:active,.tv-dialog__chat-username-input.i-success:focus{border-color:#00796b!important}html.theme-dark .tv-dialog__chat-username-input.i-success:active,html.theme-dark .tv-dialog__chat-username-input.i-success:focus{border-color:#009688!important}.tv-dialog__chat-username-input--phone{direction:ltr;text-align:right}.tv-dialog__chat-username-input.tv-dialog__chat-username-input{display:inline-block;border-width:0;width:85%;height:15px;background-color:#fff;color:#4a4a4a}html.theme-dark .tv-dialog__chat-username-input.tv-dialog__chat-username-input{color:#c5cbce;background-color:#1e222d}.tv-dialog__chat-username-input--error{background-color:#daa}html.theme-dark .tv-dialog__chat-username-input--error{background-color:#ff4a68}.tv-dialog__scroll-wrap{position:relative}.tv-dialog__scroll-wrap.i-scrollable{overflow:hidden}.feature-mobiletouch .tv-dialog__scroll-wrap.i-scrollable{overflow-x:hidden;overflow-y:scroll}.tv-dialog__scroll-wrap-inner{position:relative;padding-bottom:0}.tv-dialog__scroll-wrap.i-with-actions.i-scrollable .tv-dialog__scroll-wrap-inner{padding-bottom:30px}@media screen and (max-width:767px){.tv-dialog__scroll-wrap.i-with-actions.i-scrollable .tv-dialog__scroll-wrap-inner{padding-bottom:20px}}.tv-dialog__link{color:#2196f3;transition:color .35s ease}html.theme-dark .tv-dialog__link{color:#1976d2}.tv-dialog__link:visited{color:#2196f3;fill:#2196f3}html.theme-dark .tv-dialog__link:visited{fill:#1976d2;color:#1976d2}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-dialog__link:hover{color:#1e88e5;fill:#1e88e5;transition-duration:.06s}}.tv-dialog__link:focus{outline:auto}.tv-dialog__link:focus:not(:-moz-focusring){outline:none}.tv-dialog__link:-moz-focusring{outline:auto}.tv-dialog__link:active{color:#1e88e5;fill:#1e88e5;transition-duration:.06s} \ No newline at end of file diff --git a/public/charting_library/bundles/dialogs-core.e38859b0949bd10b7f09.js b/public/charting_library/bundles/dialogs-core.e38859b0949bd10b7f09.js new file mode 100644 index 00000000..b615c3f9 --- /dev/null +++ b/public/charting_library/bundles/dialogs-core.e38859b0949bd10b7f09.js @@ -0,0 +1,9 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([["dialogs-core"],{"6aJD":function(t,e,o){"use strict";var n=o("APlX");o.d(e,"a",(function(){return n.TVModal}))},APlX:function(t,e,o){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.TVModal=void 0;var n=Object.assign||function(t){for(var e=1;e
    ',containerTemplate:'
    ',ajaxErrorTemplate:'
    '+window.t("Error")+"
    "};e.TVModal=function(e){function o(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};h(this,o);var e=f(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,n({},g,t)));if(e.$overlay=$(e.options.overlayTemplate),e.$modalWrap=$(e.options.containerTemplate),e.$body=e.$modalWrap.find(".tv-dialog__modal-body").append(e.$el),e.options.closeOnOutsideClick&&e.$overlay.add(e.$modalWrap).click((function(t){e.isEventOut(t)&&e.close()})),e.on("change:zIndex",(function(){e.$overlay.css("z-index",e.zIndex),e.$modalWrap.css("z-index",e.zIndex)})),e.on("destroy",(function(){var t=function(){e.$overlay.remove(),e.$modalWrap.remove()};e.opened?(e.close(),setTimeout(t,e.options.closingDuration)):t()})),e.on("beforeOpen",(function(){v.push(e)})),e.options.ajax.url){var i=e.options.ajax.beforeSend||$.noop,s=e.options.ajax.success||!1,r=e.options.ajax.error||$.noop;$.extend(e.options.ajax,{beforeSend:function(){e.trigger("beforeLoading",[e]),e.startSpinner(),i(e)},success:function(t){e.trigger("afterLoading",[e]),e.renderContent(s?s(e,t):t).showContent(),e.trigger("afterLoadingShow",[e])},error:function(){e.renderContent(e.options.ajaxErrorTemplate),r(e),e.trigger("errorLoading",[e])}})}return e.on("error",(function(t,o){e.$modalWrap[0].getBoundingClientRect().height0&&v[v.length-1].focus(),e.options.destroyOnClose&&e.destroy()}),this.options.closingDuration),this}},{key:"showContent",value:function(){var t=this;return this.$modalWrap.removeClass("i-hidden"),setTimeout((function(){t.$modalWrap.removeClass("i-closed")}),20),setTimeout((function(){t.trigger("afterOpen",[t]),t.spinner&&t.stopSpinner()}),.75*s.dur+20),this}},{key:"hideContent",value:function(){if(this.$el)return this.$modalWrap.addClass("i-closed"),this.unfocus(),this}},{key:"startSpinner",value:function(){return this.spinner=new c.Spinner("large"),this.spinner.spin(this.$overlay[0]),this}},{key:"stopSpinner",value:function(){if(this.spinner)return this.spinner.stop(),delete this.spinner,this}}]),o}(l.TVDialogAbstract)}).call(this,o("F/us"))},KHon:function(t,e,o){"use strict";o.r(e);var n=o("v2PZ");o.d(e,"TVDialogAbstract",(function(){return n.TVDialogAbstract})),o.d(e,"closeAllDialogs",(function(){return n.closeAllDialogs}))},nZrM:function(t,e,o){},nbyR:function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TVPopup=void 0;var n=Object.assign||function(t){for(var e=1;e',scrollWrapInner:'
    ',withScroll:!0};e.TVPopup=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};p(this,e);var o=h(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,n({},g,t)));o.$scrollWrap=o.$content.hasClass("js-dialog__scroll-wrap")?o.$content:o.$content.find(".js-dialog__scroll-wrap"),o.$scrollWrap.length?o.$scrollWrapInner=o.$scrollWrap.children().first():(o.$scrollWrap=o.$content.wrap($(o.options.scrollWrap)).parent(),o.$scrollWrapInner=o.$content.wrap($(o.options.scrollWrapInner)).parent()),o.$actions&&o.$scrollWrap.addClass("i-with-actions"),o.options.withScroll&&(o.scroll=new l.SidebarCustomScroll(o.$scrollWrap,o.$scrollWrapInner),o.scroll.scrolled.subscribe(null,(function(){return o.trigger("scroll")}))),o.$scrollWrap.css("overflow","");var i=o.getDialogId();return o.$el.addClass("tv-dialog--popup i-closed i-hidden"),o.options.width&&o.$el.css({width:"calc(100% - 20px)","max-width":o.options.width}),o._hotkeys=u.createGroup({desc:"Dialog",isDisabled:function(){return!o.opened},modal:!1}),o.options.closeOnEsc&&o._hotkeys.add({desc:"Close",hotkey:27,handler:function(){return o.close()}}),o.$el.on("mousedown touchstart",o.toTop.bind(o)),o.options.closeOnOutsideClick&&(o._preventClick=!0,o.on("beforeOpen",(function(){setTimeout((function(){o.opened&&($(document).on("mousedown touchstart",(function(){o._preventClick=!1})),$(document).on("click.tv-popup-"+i,(function(t){if(!o._preventClick){var e=$(t.target).closest(".js-dialog");(o.options.closeOnClickAtOtherDialogs||0===e.length)&&o.isEventOut(t)&&o.close()}})))}),0)})),o.on("beforeClose",(function(){return $(document).off("click.tv-popup-"+i)}))),o.on("change:zIndex",(function(){o.$el.css("z-index",o.zIndex)})),o.on("destroy",(function(){var t=function(){o.$el.remove(),o._hotkeys.destroy()};o.opened?(o.close(),setTimeout(t,s.dur/2)):t()})),o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),i(e,[{key:"open",value:function(){ +var t=this;return this.opened||(this.opened=!0,this.trigger("beforeOpen",[this]),this.$el.appendTo(this.$wrap).removeClass("i-hidden").css(function(){t.calcHeight();var e=v.height(),o=v.width(),n=t.$el.height(),i=t.$el.width(),s=t.options.position;return s||(s={top:e/2-n/2,left:o/2-i/2}),s.top>e-n&&(s.top=e-n),s.left>o-i&&(s.left=o-i),s.top<10&&(s.top=10),s.left<10&&(s.left=10),s}()),this.focus(),this.toTop(),this._doOpenAnimation().then((function(){t.opened&&(t.$el.removeClass("i-closed"),t.options.draggable&&((0,c.lazyJqueryUI)(t.$el).draggable({handle:".js-dialog__drag",cancel:"input, textarea, button, select, option, .js-dialog__no-drag, .js-dialog__close",containment:"window",cursor:"-webkit-grabbing",stop:function(e,o){t.trigger("dragEnd",[t])}}),t.$el.find(".js-dialog__drag").addClass("tv-dialog__grab")),t.trigger("afterOpen",[t]))})),v.on("resize.tv-popup-"+this.getDialogId(),(function(){t.calcHeight(),t.fixPos()}))),this}},{key:"close",value:function(){var t=this;if(this.opened)return this.trigger("beforeClose",[this]),this.$el.addClass("i-closed"),this.opened=!1,this._doCloseAnimation().then((function(){t.opened||((0,c.lazyJqueryUI)(t.$el).draggable("instance").then((function(t){t&&t.destroy()})),t.$el.addClass("i-hidden").detach(),f.css("cursor","auto"),t.trigger("afterClose",[t]),t.options.destroyOnClose&&t.destroy())})),v.off("resize.tv-popup-"+this.getDialogId()),this}},{key:"hide",value:function(){this.$el.addClass("i-hidden")}},{key:"show",value:function(){this.$el.removeClass("i-hidden")}},{key:"fixPos",value:function(){var t=this.$el[0].getBoundingClientRect(),e={};t.bottom>r.mediaState.height-10&&(e.top=r.mediaState.height-10-t.height,e.top<10&&(e.top=10)),t.right>r.mediaState.width-10&&(e.left=r.mediaState.width-10-t.width,e.left<10&&(e.left=10)),(e.top||e.left)&&this.$el.css(e)}},{key:"calcHeight",value:function(){var t=this.$el[0].getBoundingClientRect(),e=this.$scrollWrapInner[0].getBoundingClientRect(),o=this.$scrollWrap[0].getBoundingClientRect(),n=this.options.height&&this.options.heightn)&&((n-=t.height-o.height)<60&&(n=60),this.$scrollWrap.css({height:n})),this.options.withScroll&&this.scroll.resize();var s=n'+this.$btn.html()+''),this.loading=this.$btn.hasClass("i-loading")}return n(t,[{key:"_start",value:function(){var t=this;this.starting=!0,this.$btn.addClass("i-start-load"),this.$btn.trigger("tv-button-loader:start"),setTimeout((function(){t.loading=!0,t.starting=!1,t._startPromise=!1,t.$btn.addClass("i-loading"),t.$btn.removeClass("i-start-load"),t._stopPromise&&t._stop()}),2*s.dur)}},{key:"start",value:function(){this.starting||(this.stopping?this._startPromise=!0:this._start())}},{key:"_stop",value:function(){var t=this;this.stopping=!0,this.$btn.addClass("i-stop-load"),this.$btn.trigger("tv-button-loader:stop"),setTimeout((function(){t.loading=!1,t.stopping=!1,t._stopPromise=!1,t.$btn.removeClass("i-loading i-start-load i-stop-load"),t._startPromise&&t._start()}),s.dur)}},{key:"stop",value:function(){this.stopping||(this.starting?this._stopPromise=!0:this._stop())}},{key:"toggle",value:function(){this.loading?this.stop():this.start()}},{key:"contentHtml",value:function(t){return t?(this.$btn.find(".tv-button__text").html(t),t):this.$btn.find(".tv-button__text").html()}},{key:"contentNojQuery",value:function(){return this.$btn.get(0)}},{key:"disable",value:function(){this.stop(),this.$btn.addClass("i-disabled")}},{key:"enable",value:function(){this.$btn.removeClass("i-disabled")}}]),t}()},tKRU:function(t,e,o){"use strict";var n=o("nbyR");o.d(e,"a",(function(){return n.TVPopup}))},v2PZ:function(t,e,o){"use strict";(function(t,n){Object.defineProperty(e,"__esModule",{value:!0}),e.TVDialogAbstract=void 0;var i=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var o=[],n=!0,i=!1,s=void 0;try{for(var r,a=t[Symbol.iterator]();!(n=(r=a.next()).done)&&(o.push(r.value),!e||o.length!==e);n=!0);}catch(l){i=!0,s=l}finally{try{!n&&a.return&&a.return()}finally{if(i)throw s}}return o}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},s=Object.assign||function(t){for(var e=1;e',errorTemplate:'
    {{{ error }}}
    ',titleTemplate:'
    {{{ title }}}
    ',contentWrapTemplate:'
    ',actionsWrapTemplate:'
    ',closeButtonTemplate:'
    '+o("uo4K")+"
    ",helpButtonTemplate:'
    ',helpActionsMod:"tv-dialog__section--actions_with-help"},_={default:"tv-button tv-button--default",primary:"tv-button tv-button--primary",success:"tv-button tv-button--success",danger:"tv-button tv-button--danger",warning:"tv-button tv-button--warning",link:"tv-button tv-button--link",checkbox:"tv-control-checkbox tv-control-checkbox--in-actions","default-ghost":"tv-button tv-button--default_ghost","primary-ghost":"tv-button tv-button--primary_ghost","success-ghost":"tv-button tv-button--success_ghost","danger-ghost":"tv-button tv-button--danger_ghost","warning-ghost":"tv-button tv-button--warning_ghost"},m={_default:'
    {{ text }}
    ',"submit-primary":'',"submit-success":''},k=function(e){function o(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};p(this,o);var n=h(this,(o.__proto__||Object.getPrototypeOf(o)).call(this));if(n.manager=e.manager||(0,u.getRootOverlapManager)(e.ownerDocument),n._id=f++, +n.loadingActions=[],n.disabledActions=[],n.firstFocusControl=null,n.options=s({},y,e),n.$el=$(t.render(n.options.template,{title:n.options.title,closeButton:n.options.closeButton})),n.$el.addClass("js-dialog"),n.el=n.$el[0],n.options.dataset){var r=!0,a=!1,c=void 0;try{for(var d,g=Object.entries(n.options.dataset)[Symbol.iterator]();!(r=(d=g.next()).done);r=!0){var k=d.value,w=i(k,2),C=w[0],O=w[1];"string"==typeof O&&n.el.setAttribute("data-"+C,O)}}catch(P){a=!0,c=P}finally{try{!r&&g.return&&g.return()}finally{if(a)throw c}}}for(n.options.addClass&&n.$el.addClass(n.options.addClass),n.options.width&&n.$el.css({width:"100%","max-width":n.options.width}),n.on("beforeOpen",(function(){n.$wrap=n.manager.ensureWindow(n._id)})),n.on("afterClose",(function(){n.$wrap=null,n.manager.unregisterWindow(n._id)})),n.options.title&&(n.$title=$(t.render(n.options.titleTemplate,{title:n.options.title})).appendTo(n.$el)),n.$content=$(n.options.contentWrapTemplate).appendTo(n.$el),n.$contentIn=n.$content;n.$contentIn.length;)n.$contentIn=n.$contentIn.children();if(n.$contentIn=n.$contentIn.end(),n.options.content&&n.renderContent(n.options.content),(n.options.actions||n.options.help)&&(n.$content.hasClass("tv-dialog__section")&&n.$content.addClass("tv-dialog__section--no-padding_bottom"),n.$actions=$(n.options.actionsWrapTemplate).appendTo(n.$el)),n.options.actions){n.actions={},n.$el.on("click touchend",".js-dialog__action-click",(function(t){t.preventDefault(),n.actionDispatcher($(t.currentTarget).data("name"))}));for(var x=function(e){var o=n.options.actions[e];if(o.type||(o.type="default"),o.class||(o.class=_[o.type]?_[o.type]:_.default),"checkbox"===o.type){var i=new l.default({labelRight:o.text,name:o.name,checked:o.checked});n.actions[o.name]=i.$el.appendTo(n.$actions),n.actions[o.name].on("change",(function(){setTimeout((function(){return n.actionDispatcher(o.name,i.checked)}))}))}else n.actions[o.name]=$(t.render(o.template?o.template:m[o.type]||m._default,o,o)).appendTo(n.$actions);if(o.method&&"function"==typeof n[o.method]&&n.on("action:"+o.name,n[o.method].bind(n)),o.addClass&&n.actions[o.name].addClass(o.addClass),o.key){var s=void 0;if("string"==typeof o.key&&o.key.split("+").length>1){var r=[],a=o.key.split("+");s=function(t){r=[]};var c=function(t){var e=""+t.keyCode;-1!==a.indexOf(e)&&r.indexOf(e)&&r.push(e),n._focused&&r.length===a.length&&(r=[],n.actionDispatcher(o.name))};n.on("afterOpen",(function(){b.on("keydown",c),b.on("keyup",s)})),n.on("beforeClose",(function(){b.off("keydown",c),b.off("keyup",s)}))}else{var u=$.isArray(o.key)?o.key:[o.key];s=function(t){!t.isDefaultPrevented()&&n._focused&&-1!==u.indexOf(t.keyCode)&&n.actionDispatcher(o.name)},n.on("afterOpen",(function(){return b.on("keyup",s)})),n.on("beforeClose",(function(){return b.off("keyup",s)}))}}},T=n.options.actions.length-1;T>=0;T--)x(T)}if(n.options.help&&$(t.render(n.options.helpButtonTemplate,n.options.help)).prependTo(n.$actions.addClass(n.options.helpActionsMod)),n.options.closeButton){var j=$(n.options.closeButtonTemplate) +;j.addClass(n.options.closeButtonAddClass||"");var I=n.$el;1===n.$el.find(".js-close-button-place").length&&(I=n.$el.find(".js-close-button-place")),j.appendTo(I)}return n.setZIndex(110+v.length),e.errorMod&&(n.errorMod=e.errorMod),n.on("afterOpen",(function(){n.$el.focus(),n.options.focusFirstControl&&!Modernizr.mobiletouch&&(n.firstFocusControl||n.$el.find('input:not([type="hidden"]), textarea').first()).focus()})),n.$el.on("click",".js-dialog__close",n.close.bind(n)),n.$el.on("mousedown touchstart",n.focus.bind(n)),v.push(n),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(o,e),r(o,[{key:"renderContent",value:function(t){return this.$contentIn.html("function"==typeof t?t(this):t),this}},{key:"setDestroyOnClose",value:function(t){this.options.destroyOnClose=t}},{key:"setZIndex",value:function(t){return this.zIndex=t,this.trigger("change:zIndex",[this]),this}},{key:"toTop",value:function(){for(var t=v.length-1;t>=0;t--)v[t].zIndex>this.zIndex&&v[t].setZIndex(v[t].zIndex-1);return this.setZIndex(110+v.length),this.manager.moveToTop(this._id),this._hotkeys&&this._hotkeys.promote(),this}},{key:"isEventOut",value:function(t){if(this.options.isClickOutFn){var e=this.options.isClickOutFn(t);if(void 0!==e)return e}var o=!0,n=$(t.target);return n.get(0)!==this.$el.get(0)&&($(">*",this.$el).each((function(){n.get(0)===$(this).get(0)&&(o=!1),0===n.closest("HTML",$(this).get(0)).length&&(o=!1)})),o)}},{key:"focus",value:function(){var t=this;g&&g!==this&&g.unfocus(),this._setFocused(),this._focused=!0,this.$el.addClass(this.options.focusClass),this.trigger("focus",[this]),setTimeout((function(){b.on("mousedown.tv-dialog-unfocus-"+t._id,(function(e){t.isEventOut(e)&&(t.unfocus(),b.off("mousedown.tv-dialog-unfocus-"+t._id))}))}),20)}},{key:"_setFocused",value:function(){g!==this&&(g=this)}},{key:"_setUnfocused",value:function(){g===this&&(g=void 0)}},{key:"unfocus",value:function(){g===this&&(this._setUnfocused(),this._focused=!1,this.$el.removeClass(this.options.focusClass).find(":focus").blur(),this.trigger("unfocus",[this]))}},{key:"isFocused",value:function(){return this._focused}},{key:"setTitle",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.$title.toggleClass("tv-dialog__section--one-line apply-overflow-tooltip",e),this.$title.html(t),this}},{key:"setTitleText",value:function(t){this.$title.find(".js-title-text").text(t)}},{key:"actionDispatcher",value:function(t){if(!this.disabledActions.includes(t)&&!this.loadingActions.includes(t)){for(var e=arguments.length,o=Array(e>1?e-1:0),n=1;n1&&void 0!==arguments[1]?arguments[1]:"init";return this.actions[t].tvButtonLoader(o),"init"===o&&(this.actions[t].off("tv-button-loader:start.dialog-action").on("tv-button-loader:start.dialog-action",(function(){e.loadingActions.push(t)})),this.actions[t].off("tv-button-loader:stop.dialog-action").on("tv-button-loader:stop.dialog-action",(function(){e.loadingActions=n.without(e.loadingActions,t)}))),this}},{key:"error",value:function(e){var o=$(t.render(this.options.errorTemplate,{error:e,errorMod:this.errorMod})).appendTo(this.$el);return setTimeout((function(){return o.removeClass("i-slided")}),20),b.one("touchstart mousedown keydown",(function(){o.addClass("i-slided"),setTimeout((function(){return o.remove()}),.75*a.dur)})),this.trigger("error",[this,o]),this}},{key:"destroy",value:function(){this.$wrap=null,this.manager.unregisterWindow(this._id),this._hotkeys&&this._hotkeys.destroy(),v=n.without(v,this);for(var t=0;t=this.state.heightContent-1},t.prototype.animateTo=function(e,t){void 0===t&&(t=E.dur);var o=this._scroll +;o&&Object(O.doAnimate)({onStep:function(e,t){o.scrollTop=t},from:o.scrollTop,to:Math.round(e),easing:E.easingFunc.easeInOutCubic,duration:t})},t.prototype.render=function(){var e,t,o,n,i,r=this,l=this.props,s=l.children,u=l.isVisibleScrollbar,d=l.isVisibleFade,p=l.isVisibleButtons,h=l.onMouseOver,m=l.onMouseOut,b=this.state,v=b.heightContent,g=b.heightWrap,f=b.isVisibleBotButton,_=b.isVisibleTopButton;return a.a.createElement(k,{whitelist:["height"],onMeasure:this._handleResizeWrap},a.a.createElement("div",{className:M.wrap,onMouseOver:h,onMouseOut:m},a.a.createElement("div",{className:c()(M.scrollWrap,(e={},e[M.noScrollBar]=!u,e)),onScroll:this._handleScroll,ref:function(e){return r._scroll=e}},a.a.createElement(k,{onMeasure:this._handleResizeContent,whitelist:["height"]},a.a.createElement("div",{className:M.content},s))),d&&a.a.createElement("div",{className:c()(M.fadeTop,(t={},t[M.isVisible]=_&&v>g,t))}),d&&a.a.createElement("div",{className:c()(M.fadeBot,(o={},o[M.isVisible]=f&&v>g,o))}),p&&a.a.createElement("div",{className:c()(M.scrollTop,(n={},n[M.isVisible]=_&&v>g,n)),onClick:this._handleScrollTop},a.a.createElement("div",{className:M.iconWrap},a.a.createElement(S.Icon,{icon:D,className:M.icon}))),p&&a.a.createElement("div",{className:c()(M.scrollBot,(i={},i[M.isVisible]=f&&v>g,i)),onClick:this._handleScrollBot},a.a.createElement("div",{className:M.iconWrap},a.a.createElement(S.Icon,{icon:D,className:M.icon})))))},t.defaultProps=L,t}(a.a.PureComponent),A=o("lxNp"),j=o("tWVy"),x=o("wZIs"),B=[61536,61537,61538,61539,61725,61726,61575,61576,61796,61797,61779,61780,61781,61782,61783,61784,61785,61786,61440,61441,61442,61444,61445,61446,61447,61448,61452,61453,61454,61456,61457,61458,61459,61460,61461,61463,61464,61466,61467,61469,61470,61473,61475,61476,61488,61502,61504,61505,61507,61510,61523,61524,61525,61526,61527,61528,61529,61530,61531,61532,61533,61534,61540,61541,61542,61543,61544,61545,61546,61547,61548,61550,61552,61553,61554,61555,61557,61558,61559,61560,61565,61566,61568,61572,61574,61578,61588,61597,61601,61602,61603,61604,61605,61606,61607,61608,61609,61610,61611,61616,61617,61635,61648,61649,61654,61655,61656,61657,61658,61659,61666,61667,61669,61670,61671,61672,61673,61675,61681,61682,61683,61684,61696,61697,61698,61699,61700,61701,61702,61703,61704,61705,61706,61707,61712,61713,61714,61715,61720,61721,61722,61731,61732,61736,61737,61738,61746,61747,61748,61749,61751,61752,61753,61754,61757,61758,61760,61764,61768,61769,61770,61771,61772,61773,61774,61776,61777,61778,61799,61811,61812,61813,61814,61815,61816,61817,61818,61819,61820,61821,61826,61827,61828,61829,61830,61831,61832,61836,61838,61840,61842,61845],W=o("9dlw"),P=o("QpNh"),V=o("gb5g");function F(e){var t,o=e.id,a=e.activeClass,r=e.children,l=e.className,c=e.icon,u=e.isActive,d=e.isGrayed,p=e.isHidden,h=e.isTransparent,m=e.theme,b=void 0===m?V:m,v=e.onClick,g=e.title,f=e.buttonHotKey;return i.createElement("div",Object(n.__assign)({id:o,className:s(b.button,l,u&&a,(t={},t["apply-common-tooltip common-tooltip-vertical"]=Boolean(g), +t[b.isActive]=u,t[b.isGrayed]=d,t[b.isHidden]=p,t[b.isTransparent]=h,t)),onClick:v,title:g,"data-role":"button","data-tooltip-hotkey":f},Object(P.a)(e)),i.createElement("div",{className:b.bg},c&&("string"==typeof c?i.createElement(S.Icon,{className:b.icon,icon:c}):i.createElement("span",{className:b.icon},c)),r))}var I=o("Sn4D"),z=o("hn2c"),R=o("KmEK"),G=function(e){function t(t){var o=e.call(this,t)||this;return o._toggleDropdown=function(e){o.setState({isOpened:void 0!==e?e:!o.state.isOpened})},o._handleClose=function(){o._toggleDropdown(!1)},o._getDropdownPosition=function(){if(!o._control)return{x:0,y:0};var e=o._control.getBoundingClientRect();return{x:e.left+e.width+1,y:e.top-6}},o._handleClickArrow=function(){o._toggleDropdown()},o._handleTouchStart=function(){o.props.onClickButton(),o._toggleDropdown()},o._handlePressStart=function(){if(Modernizr.mobiletouch&&!o.props.checkable)o._longPressDelay||o.props.onClickButton();else{if(o._doubleClickDelay)return clearTimeout(o._doubleClickDelay),delete o._doubleClickDelay,void o._toggleDropdown(!0);o._doubleClickDelay=setTimeout((function(){delete o._doubleClickDelay,o._longPressDelay||o.props.onClickButton()}),175)}o._longPressDelay=setTimeout((function(){delete o._longPressDelay,o._toggleDropdown(!0)}),300)},o._handlePressEnd=function(){o._longPressDelay&&(clearTimeout(o._longPressDelay),delete o._longPressDelay,o.state.isOpened?o._toggleDropdown(!1):o.props.checkable||o.state.isOpened||!o.props.isActive||Modernizr.mobiletouch?o._doubleClickDelay||o.props.onClickButton():o._toggleDropdown(!0))},o.state={isOpened:!1},o}return Object(n.__extends)(t,e),t.prototype.render=function(){var e,t=this,o=this.props,a=o.buttonActiveClass,r=o.buttonClass,l=o.buttonIcon,c=o.buttonTitle,u=o.buttonHotKey,d=o.dropdownTooltip,p=o.children,h=o.isActive,m=o.isGrayed,b=o.onClickWhenGrayed,v=o.checkable,g=o.isSmallTablet,f=this.state.isOpened,_=Object(P.a)(this.props);return i.createElement("div",{className:s(R.dropdown,(e={},e[R.isGrayed]=m,e[R.isActive]=h,e[R.isOpened]=f,e)),onClick:m?b:void 0},i.createElement("div",Object(n.__assign)({},_,{ref:function(e){return t._control=e},className:R.control}),i.createElement("div",{className:s(R.buttonWrap,{"apply-common-tooltip common-tooltip-vertical":Boolean(c||u)}),"data-tooltip-hotkey":u,"data-tooltip-delay":1500,"data-role":"button",title:c,onMouseDown:m||Modernizr.mobiletouch?void 0:this._handlePressStart,onMouseUp:m||Modernizr.mobiletouch?void 0:this._handlePressEnd,onTouchStart:!m&&v&&Modernizr.mobiletouch?this._handlePressStart:void 0,onTouchEnd:!m&&v&&Modernizr.mobiletouch?this._handlePressEnd:void 0,onClick:m||v||!Modernizr.mobiletouch?void 0:this._handleTouchStart},i.createElement(F,{activeClass:a,className:r,icon:l,isActive:h,isGrayed:m,isTransparent:!v})),!m&&!Modernizr.mobiletouch&&i.createElement("div",{className:s(R.arrow,d&&"apply-common-tooltip common-tooltip-vertical"),title:d,onClick:this._handleClickArrow,"data-role":"menu-handle"},i.createElement(S.Icon,{className:R.arrowIcon,icon:z}))),!m&&(g?f&&i.createElement(I.a,{ +onClose:this._handleClose,position:"Bottom"},p):i.createElement(W.a,{doNotCloseOn:this,isOpened:f,onClose:this._handleClose,position:this._getDropdownPosition},p)))},t}(i.PureComponent),H=o("KKsp"),U=o("EA32"),K={icon:window.t("Icon"),dropdownTooltip:window.t("Icons")},Q=function(e){function t(t){var o=e.call(this,t)||this;return o._renderItem=function(e,t){var n=o.props.isSmallTablet,a=c()(U.item,n&&U.smallTablet,t&&n&&o.state.isActive&&e===o.state.current&&U.active);return i.createElement("div",{className:a,key:e,onClick:function(){o._handleSelect(e),Object(j.b)()}},String.fromCharCode(e))},o._onChangeDrawingState=function(){o.setState({isActive:o._isActive()})},o._handleSelect=function(e){Object(x.saveDefaults)("linetoolicon",Object(n.__assign)(Object(n.__assign)({},Object(x.defaults)("linetoolicon")),{icon:e})),p.tool.setValue("LineToolIcon");var t=o.state.recents,i=t.indexOf(e);-1!==i&&t.splice(i,1),t=Object(n.__spreadArrays)([e],t.slice(0,9)),Object(u.setJSON)("linetoolicon.recenticons",t),o.setState({current:e,recents:t})},o.state={current:Object(x.defaults)("linetoolicon").icon,recents:Object(u.getJSON)("linetoolicon.recenticons")||[]},o}return Object(n.__extends)(t,e),t.prototype.componentDidMount=function(){p.tool.subscribe(this._onChangeDrawingState),u.onSync.subscribe(this,this._onSyncSettings)},t.prototype.componentWillUnmount=function(){p.tool.unsubscribe(this._onChangeDrawingState),u.onSync.unsubscribe(this,this._onSyncSettings)},t.prototype.render=function(){var e=this,t=this.props,o=t.isGrayed,a=t.toolName,r=t.isSmallTablet,l=this.state,s=l.current,u=l.isActive,d=l.recents,p=Object(P.a)(this.props),h=c()(U.wrap,r&&U.smallTablet);return i.createElement(G,Object(n.__assign)({buttonClass:U.button,buttonIcon:i.createElement("div",{className:U.buttonIcon},String.fromCharCode(s||B[0])),buttonTitle:K.icon,dropdownTooltip:K.dropdownTooltip,isActive:u,isGrayed:o,isSmallTablet:r,onClickButton:function(){return e._handleSelect(s||B[0])},onClickWhenGrayed:function(){return Object(m.emit)("onGrayedObjectClicked",{type:"drawing",name:f.a[a].localizedName})}},p),d&&i.createElement(i.Fragment,null,r&&i.createElement("div",{className:U.title},window.t("Recently used")),i.createElement("div",{className:h},d.map((function(t){return e._renderItem(t,!0)}))),i.createElement(H.a,{className:c()(r&&U.separator)})),i.createElement("div",{key:"all",className:h},B.map((function(t){return e._renderItem(t)}))))},t.prototype._isActive=function(){return p.tool.value()===this.props.toolName},t.prototype._onSyncSettings=function(){this.setState({recents:Object(u.getJSON)("linetoolicon.recenticons")})},t}(i.Component),q=o("Ocx9"),J=function(e){function t(t){var o=e.call(this,t)||this;return o._handleClick=function(){o.props.saveDefaultOnChange&&Object(q.saveDefaultProperties)(!0);var e=!o.props.property.value();o.props.property.setValue(e),o.props.saveDefaultOnChange&&Object(q.saveDefaultProperties)(!1),o.props.onClick&&o.props.onClick(e)},o.state={isActive:o.props.property.value()},o}return Object(n.__extends)(t,e), +t.prototype.componentDidMount=function(){this.props.property.subscribe(this,this._onChange)},t.prototype.componentWillUnmount=function(){this.props.property.unsubscribe(this,this._onChange)},t.prototype.render=function(){var e=this.props.toolName,t=this.state.isActive,o=f.a[e];return i.createElement(F,{icon:t&&o.iconActive?o.iconActive:o.icon,isActive:t,onClick:this._handleClick,title:o.localizedName,buttonHotKey:o.hotKey,"data-name":e})},t.prototype._onChange=function(e){this.setState({isActive:e.value()})},t}(i.PureComponent),X=function(e){function t(t){var o=e.call(this,t)||this;return o._handleClick=function(){p.tool.setValue(o.props.toolName)},o._onChange=function(){o.setState({isActive:p.tool.value()===o.props.toolName})},o.state={isActive:p.tool.value()===o.props.toolName},o}return Object(n.__extends)(t,e),t.prototype.componentDidMount=function(){p.tool.subscribe(this._onChange)},t.prototype.componentWillUnmount=function(){p.tool.unsubscribe(this._onChange)},t.prototype.render=function(){var e=this.props.toolName,t=this.state.isActive,o=f.a[e];return i.createElement(F,{icon:f.a[e].icon,isActive:t,isTransparent:!0,onClick:this._handleClick,title:o.localizedName,buttonHotKey:o.hotKey,"data-name":e})},t}(i.PureComponent);function Y(e){var t=e.id,o=e.action,n=e.isActive,a=e.isHidden,r=e.isTransparent,l=e.toolName;return i.createElement(F,{id:t,icon:f.a[l].icon,isActive:n,isHidden:a,isTransparent:r,onClick:o,title:f.a[l].localizedName,"data-name":l})}var Z,$=function(e){function t(t){var o=e.call(this,t)||this;return o._boundUndoModel=null,o._handleClick=function(){var e=o._activeChartWidget().model();e&&e.zoomFromViewport()},o._syncUnzoomButton=function(){var e=o._activeChartWidget(),t=e.model(),n=!1;t?(o._boundUndoModel!==t&&(o._boundUndoModel&&o._boundUndoModel.zoomStack().onChange().unsubscribe(null,o._syncUnzoomButton),t.zoomStack().onChange().subscribe(null,o._syncUnzoomButton),o._boundUndoModel=t),n=!t.zoomStack().isEmpty()):e.withModel(null,o._syncUnzoomButton),o.setState({isVisible:n})},o.state={isVisible:!1},o}return Object(n.__extends)(t,e),t.prototype.componentDidMount=function(){this.props.chartWidgetCollection.activeChartWidget.subscribe(this._syncUnzoomButton,{callWithLast:!0})},t.prototype.componentWillUnmount=function(){this.props.chartWidgetCollection.activeChartWidget.unsubscribe(this._syncUnzoomButton)},t.prototype.render=function(){return this.state.isVisible?i.createElement(Y,{action:this._handleClick,isTransparent:!0,toolName:"zoom-out"}):i.createElement("div",null)},t.prototype._activeChartWidget=function(){return this.props.chartWidgetCollection.activeChartWidget.value()},t}(i.PureComponent),ee=o("b2d7"),te=o("pr86"),oe=o("N5tr"),ne=o("dhVi"),ie=function(e){function t(t){var o=e.call(this,t)||this;o._onChangeDrawingState=function(){var e=o._getActiveToolIndex();o.setState({current:-1!==e?e:o.state.current,isActive:-1!==e})},o._handleClickButton=function(){if(!g.CheckMobile.any()){var e=o._getCurrentToolName();o._selectTool(e)}},o._handleClickItem=function(e){o._selectTool(e)}, +o._handleGrayedClick=function(e){Object(m.emit)("onGrayedObjectClicked",{type:"drawing",name:f.a[e].localizedName})},o._handleClickFavorite=function(e){o.state.favState&&o.state.favState[e]?ee.a.removeFavorite(e):ee.a.addFavorite(e)},o._onAddFavorite=function(e){var t;o.setState({favState:Object(n.__assign)(Object(n.__assign)({},o.state.favState),(t={},t[e]=!0,t))})},o._onRemoveFavorite=function(e){var t;o.setState({favState:Object(n.__assign)(Object(n.__assign)({},o.state.favState),(t={},t[e]=!1,t))})},o._onSyncFavorites=function(){o.setState({favState:o._composeFavState()})};var i=o._getActiveToolIndex();return o.state={current:-1===i?o._firstNonGrayedTool():i,favState:o._composeFavState(),isActive:-1!==i},o}return Object(n.__extends)(t,e),t.prototype.componentDidMount=function(){p.tool.subscribe(this._onChangeDrawingState),ee.a.favoriteAdded.subscribe(null,this._onAddFavorite),ee.a.favoriteRemoved.subscribe(null,this._onRemoveFavorite),ee.a.favoritesSynced.subscribe(null,this._onSyncFavorites)},t.prototype.componentWillUnmount=function(){p.tool.unsubscribe(this._onChangeDrawingState),ee.a.favoriteAdded.unsubscribe(null,this._onAddFavorite),ee.a.favoriteRemoved.unsubscribe(null,this._onRemoveFavorite),ee.a.favoritesSynced.unsubscribe(null,this._onSyncFavorites)},t.prototype.componentDidUpdate=function(e,t){e.lineTools!==this.props.lineTools&&this.setState({favState:this._composeFavState()})},t.prototype.render=function(){var e=this,t=this.props,o=t.favoriting,a=t.grayedTools,r=t.lineTools,l=t.dropdownTooltip,s=t.isSmallTablet,c=this.state,u=c.current,d=c.favState,p=c.isActive,h=this._getCurrentToolName(),m=f.a[h],b=this._showShortcuts(),v=Object(P.a)(this.props);return i.createElement("span",null,i.createElement(G,Object(n.__assign)({buttonIcon:m.icon,buttonTitle:m.localizedName,buttonHotKey:m.hotKey,dropdownTooltip:l,isActive:p,onClickButton:this._handleClickButton,isSmallTablet:s},v),r.map((function(t,n){var r=t.name,l=f.a[r],c=a[r];return i.createElement(oe.b,{key:r,"data-name":t.name,theme:s?ne.a:void 0,dontClosePopup:c,forceShowShortcuts:b,shortcut:!s&&t.hotkeyHash?Object(w.humanReadableHash)(t.hotkeyHash):void 0,icon:l.icon,isActive:p&&u===n,appearAsDisabled:c,label:l.localizedName,onClick:c?e._handleGrayedClick:e._handleClickItem,onClickArg:r,showToolboxOnHover:!d[r],toolbox:o&&!c?i.createElement(te.a,{isActive:p&&u===n,isFilled:d[r],onClick:function(){return e._handleClickFavorite(r)}}):void 0})}))))},t.prototype._getCurrentToolName=function(){var e=this.state.current;return this.props.lineTools[e||0].name},t.prototype._firstNonGrayedTool=function(){var e=this.props,t=e.grayedTools;return e.lineTools.findIndex((function(e){return!t[e.name]}))},t.prototype._getActiveToolIndex=function(){return this.props.lineTools.findIndex((function(e){return e.name===p.tool.value()}))},t.prototype._showShortcuts=function(){return this.props.lineTools.some((function(e){return"shortcut"in e}))},t.prototype._selectTool=function(e){p.tool.setValue(e)},t.prototype._composeFavState=function(){var e={} +;return this.props.lineTools.forEach((function(t){e[t.name]=ee.a.isFavorite(t.name)})),e},t}(i.PureComponent),ae=o("JWMC"),re=o("nPPD"),le=o("11r7"),se=Object(re.a)(oe.a,le),ce={all:window.t("Remove Drawings & Indicators"),drawings:window.t("Remove Drawings"),studies:window.t("Remove Indicators")},ue=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._handleRemoveToolClick=function(){Modernizr.mobiletouch||t._handleRemoveDrawings()},t._handleRemoveDrawings=function(){Object(ae.trackEvent)("GUI","Chart Left Toolbar","remove drawing"),t.props.chartWidgetCollection.activeChartWidget.value().removeAllDrawingTools()},t._handleRemoveStudies=function(){Object(ae.trackEvent)("GUI","Chart Left Toolbar","remove indicator"),t.props.chartWidgetCollection.activeChartWidget.value().removeAllStudies()},t._handleRemoveAll=function(){Object(ae.trackEvent)("GUI","Chart Left Toolbar","remove all"),t.props.chartWidgetCollection.activeChartWidget.value().removeAllStudiesDrawingTools()},t}return Object(n.__extends)(t,e),t.prototype.render=function(){var e=this.props.isSmallTablet?se:void 0;return i.createElement(G,{buttonIcon:f.a[this.props.toolName].icon,buttonTitle:ce.drawings,onClickButton:this._handleRemoveToolClick,isSmallTablet:this.props.isSmallTablet,"data-name":this.props.toolName},i.createElement(oe.b,{"data-name":"remove-drawing-tools",label:ce.drawings,onClick:this._handleRemoveDrawings,theme:e}),i.createElement(oe.b,{"data-name":"remove-studies",label:ce.studies,onClick:this._handleRemoveStudies,theme:e}),i.createElement(oe.b,{"data-name":"remove-all",label:ce.all,onClick:this._handleRemoveAll,theme:e}))},t}(i.PureComponent),de=o("g5Qf"),pe=o("85c9"),he=window.t("Show Favorite Drawing Tools Toolbar"),me=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._instance=null,t._promise=null,t._bindedForceUpdate=function(){return t.forceUpdate()},t._handleClick=function(){null!==t._instance&&(t._instance.isVisible()?t._instance.hide():t._instance.show())},t}return Object(n.__extends)(t,e),t.prototype.componentDidMount=function(){var e=this,t=this._promise=Object(l.ensureNotNull)(Object(de.getFavoriteDrawingToolbarPromise)());t.then((function(o){e._promise===t&&(e._instance=o,e._instance.canBeShown().subscribe(e._bindedForceUpdate),e._instance.visibility().subscribe(e._bindedForceUpdate),e.forceUpdate())}))},t.prototype.componentWillUnmount=function(){this._promise=null,null!==this._instance&&(this._instance.canBeShown().unsubscribe(this._bindedForceUpdate),this._instance.visibility().unsubscribe(this._bindedForceUpdate),this._instance=null)},t.prototype.render=function(){return null!==this._instance&&this._instance.canBeShown().value()?i.createElement(F,{id:this.props.id,icon:pe,isActive:this._instance.isVisible(),onClick:this._handleClick,title:he}):null},t}(i.PureComponent),be=o("Ijvb"),ve=o("4o++");!function(e){e.Screenshot="drawing-toolbar-screenshot",e.FavoriteDrawings="drawing-toolbar-favorite-drawings",e.ObjectTree="drawing-toolbar-object-tree"}(Z||(Z={})) +;var ge=o("8d0Q"),fe=o("XAms"),_e=o("7RN7"),we=o("X0gx"),Te=o("Wz44"),ye=Te,Ce="http://www.w3.org/2000/svg";function ke(e){var t=e.direction,o=e.theme,n=void 0===o?Te:o;return i.createElement("svg",{xmlns:Ce,width:"9",height:"27",viewBox:"0 0 9 27",className:s(n.container,"right"===t?n.mirror:null),onContextMenu:fe.a},i.createElement("g",{fill:"none",fillRule:"evenodd"},i.createElement("path",{className:n.background,d:"M4.5.5a4 4 0 0 1 4 4v18a4 4 0 1 1-8 0v-18a4 4 0 0 1 4-4z"}),i.createElement("path",{className:n.arrow,d:"M5.5 10l-2 3.5 2 3.5"})))}var Se=o("ybOa"),Oe=Object(re.a)(ye,Se),Ee={hide:window.t("Hide Drawings Toolbar"),show:window.t("Show Drawings Toolbar")},Me=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._toggleVisibility=function(){C.isDrawingToolbarVisible.setValue(!C.isDrawingToolbarVisible.value())},t}return Object(n.__extends)(t,e),t.prototype.render=function(){var e=this.props.toolbarVisible;return i.createElement("div",{className:s(Oe.toggleButton,"apply-common-tooltip common-tooltip-vertical",!e&&Oe.collapsed),onClick:this._toggleVisibility,title:e?Ee.hide:Ee.show},i.createElement(ke,{direction:e?"left":"right",theme:e?void 0:Oe}))},t}(i.PureComponent),De=o("mkWe"),Le=o("uhCe"),Ne=o("/KDZ"),Ae={chartWidgetCollection:o("17x9").any.isRequired},je=o("1TxM"),xe=o("JQKp"),Be={weakMagnet:window.t("Weak Magnet"),strongMagnet:window.t("Strong Magnet")},We=Object(g.onWidget)(),Pe=new v.a,Ve=ae.trackEvent.bind(null,"GUI","Chart Left Toolbar"),Fe=function(e,t){return Ve(e+" "+(t?"on":"off"))};function Ie(){var e=!p.properties().childs().magnet.value();Fe("magnet mode",e),Object(q.saveDefaultProperties)(!0),p.properties().childs().magnet.setValue(e),Object(q.saveDefaultProperties)(!1)}function ze(){Object(ae.trackEvent)("GUI","Magnet mode","Weak"),Object(q.saveDefaultProperties)(!0),p.properties().childs().magnetMode.setValue(ve.MagnetMode.WeakMagnet),p.properties().childs().magnet.setValue(!0),Object(q.saveDefaultProperties)(!1)}function Re(){Object(ae.trackEvent)("GUI","Magnet mode","Strong"),Object(q.saveDefaultProperties)(!0),p.properties().childs().magnetMode.setValue(ve.MagnetMode.StrongMagnet),p.properties().childs().magnet.setValue(!0),Object(q.saveDefaultProperties)(!1)}var Ge=function(e){function t(t){var o,n=e.call(this,t)||this;return n._grayedTools={},n._handleDrawingClick=function(e){Fe("drawing mode",e)},n._handleLockClick=function(e){Fe("lock all drawing",e)},n._handleHideClick=function(e){Fe("hide",e)},n._handleSyncClick=function(e){Fe("sync",e)},n._handleMouseOver=function(e){Object(ge.a)(e)&&n.setState({isHovered:!0})},n._handleMouseOut=function(e){Object(ge.a)(e)&&n.setState({isHovered:!1})},n._handleChangeVisibility=function(e){n.setState({isVisible:e})},n._handleEsc=function(){p.resetToCursor(!0)},n._updateMagnetEnabled=function(){var e={magnet:Object(h.a)().value()};n.setState(e)},n._updateMagnetMode=function(){var e={magnetMode:Object(h.b)().value()};n.setState(e)},n._handleWidgetbarSettled=function(e){var t;n.setState({ +isWidgetbarVisible:null===(t=window.widgetbar)||void 0===t?void 0:t.visible().value(),widgetbarSettled:e})},n._handleWidgetbarVisible=function(e){n.setState({isWidgetbarVisible:e})},p.init(),n._toolsFilter=new _(n.props.drawingsAccess),n._filteredLineTools=y.map((function(e){return{id:e.id,title:e.title,items:e.items.filter((function(e){return n._toolsFilter.isToolEnabled(f.a[e.name].localizedName)}))}})).filter((function(e){return 0!==e.items.length})),n._filteredLineTools.forEach((function(e){return e.items.forEach((function(e){n._grayedTools[e.name]=n._toolsFilter.isToolGrayed(f.a[e.name].localizedName)}))})),n.state={isHovered:!1,isVisible:C.isDrawingToolbarVisible.value(),isWidgetbarVisible:Boolean(null===(o=window.widgetbar)||void 0===o?void 0:o.visible().value()),widgetbarSettled:void 0!==window.widgetbar,magnet:p.properties().childs().magnet.value(),magnetMode:p.properties().childs().magnetMode.value()},n._features={favoriting:!We&&d.enabled("items_favoriting"),multicharts:d.enabled("support_multicharts"),tools:!We||d.enabled("charting_library_base")},n._registry={chartWidgetCollection:n.props.chartWidgetCollection},n._negotiateResizer(),n}return Object(n.__extends)(t,e),t.prototype.componentDidMount=function(){var e;C.isDrawingToolbarVisible.subscribe(this._handleChangeVisibility),j.a.subscribe(this,this._handleGlobalClose),Object(h.a)().subscribe(this._updateMagnetEnabled),Object(h.b)().subscribe(this._updateMagnetMode),this._tool=p.tool.spawn(),this._tool.subscribe(this._updateHotkeys.bind(this)),this._initHotkeys(),this.props.widgetbarSettled&&(this.props.widgetbarSettled.subscribe(this,this._handleWidgetbarSettled),g.CheckMobile.any()&&(null===(e=window.widgetbar)||void 0===e||e.visible().subscribe(this._handleWidgetbarVisible)))},t.prototype.componentWillUnmount=function(){var e;null===(e=window.widgetbar)||void 0===e||e.visible().unsubscribe(this._handleWidgetbarVisible),C.isDrawingToolbarVisible.unsubscribe(this._handleChangeVisibility),j.a.unsubscribe(this,this._handleGlobalClose),Object(h.a)().unsubscribe(this._updateMagnetEnabled),Object(h.b)().unsubscribe(this._updateMagnetMode),this._tool.destroy(),this._hotkeys.destroy()},t.prototype.componentDidUpdate=function(e,t){var o,n=this.state,i=n.isVisible,a=n.widgetbarSettled;i!==t.isVisible&&(m.emit("toggle_sidebar",!i),u.setValue("ChartDrawingToolbarWidget.visible",i),this._negotiateResizer()),t.widgetbarSettled!==a&&a&&g.CheckMobile.any()&&(null===(o=window.widgetbar)||void 0===o||o.visible().subscribe(this._handleWidgetbarVisible))},t.prototype.render=function(){var e,t=this,o=this.props,n=o.bgColor,a=o.chartWidgetCollection,r=o.readOnly,l=this.state,c=l.isHovered,u=l.isVisible,d=l.magnet,h=l.magnetMode,m={backgroundColor:n&&"#"+n};e=i.createElement(Me,{toolbarVisible:u});return i.createElement(je.a,{validation:Ae,value:this._registry},i.createElement(we.a.Provider,{value:Pe},i.createElement(De.b,null,i.createElement(Ne.a,{rule:Le.a.TabletSmall},(function(o){var n;return i.createElement("div",{id:"drawing-toolbar", +className:s(xe.drawingToolbar,(n={},n[xe.isHidden]=!u,n)),style:m,onClick:t.props.onClick,onContextMenu:fe.b},i.createElement(N,{onScroll:t._handleGlobalClose,isVisibleFade:Modernizr.mobiletouch,isVisibleButtons:!Modernizr.mobiletouch&&c,isVisibleScrollbar:!1,onMouseOver:t._handleMouseOver,onMouseOut:t._handleMouseOut},i.createElement("div",{className:xe.inner},!r&&i.createElement("div",{className:xe.group,style:m},t._filteredLineTools.map((function(e,n){return i.createElement(ie,{"data-name":e.id,chartWidgetCollection:a,favoriting:t._features.favoriting,grayedTools:t._grayedTools,key:n,dropdownTooltip:e.title,lineTools:e.items,isSmallTablet:o})})),t._toolsFilter.isToolEnabled("Font Icons")&&i.createElement(Q,{"data-name":"linetool-group-font-icons",isGrayed:t._grayedTools["Font Icons"],toolName:"LineToolIcon",isSmallTablet:o})),!r&&i.createElement("div",{className:xe.group,style:m},i.createElement(X,{toolName:"measure"}),i.createElement(X,{toolName:"zoom"}),i.createElement($,{chartWidgetCollection:a})),!r&&i.createElement("div",{className:xe.group,style:m},i.createElement(G,{"data-name":"magnet-button",buttonIcon:h===ve.MagnetMode.StrongMagnet?be.a.strongMagnet:be.a.magnet,buttonTitle:f.a.magnet.localizedName,isActive:d,onClickButton:Ie,buttonHotKey:f.a.magnet.hotKey,checkable:!0,isSmallTablet:o},i.createElement(oe.b,{key:"weakMagnet",className:o?xe.popupMenuItem:void 0,"data-name":"weakMagnet",icon:be.a.magnet,isActive:d&&h!==ve.MagnetMode.StrongMagnet,label:Be.weakMagnet,onClick:ze}),i.createElement(oe.b,{key:"strongMagnet",className:o?xe.popupMenuItem:void 0,"data-name":"strongMagnet",icon:be.a.strongMagnet,isActive:d&&h===ve.MagnetMode.StrongMagnet,label:Be.strongMagnet,onClick:Re})),t._features.tools&&i.createElement(J,{property:p.properties().childs().stayInDrawingMode,saveDefaultOnChange:!0,toolName:"drawginmode",onClick:t._handleDrawingClick}),t._features.tools&&i.createElement(J,{property:p.lockDrawings(),toolName:"lockAllDrawings",onClick:t._handleLockClick}),t._features.tools&&i.createElement(J,{property:p.hideAllDrawings(),toolName:"hideAllDrawings",onClick:t._handleHideClick}),!1),!r&&t._features.tools&&i.createElement("div",{className:xe.group,style:m},i.createElement(ue,{chartWidgetCollection:a,isSmallTablet:o,toolName:"removeAllDrawingTools"})),i.createElement("div",{className:xe.fill,style:m}),!r&&(t._features.tools||!1)&&i.createElement("div",{className:s(xe.group,xe.lastGroup),style:m},!1,t._features.tools&&t._features.favoriting&&i.createElement(me,{id:Z.FavoriteDrawings}),!1))),e)})))))},t.prototype._activeChartWidget=function(){return this.props.chartWidgetCollection.activeChartWidget.value()},t.prototype._negotiateResizer=function(){var e=_e.a;this.props.resizerBridge.negotiateWidth(this.state.isVisible?_e.b:e)},t.prototype._handleGlobalClose=function(){Pe.fire()},t.prototype._updateHotkeys=function(){this._hotkeys.promote()},t.prototype._initHotkeys=function(){var e=this;this._hotkeys=A.createGroup({desc:"Drawing Toolbar"}),this._hotkeys.add({desc:"Reset",hotkey:27,handler:function(){ +return e._handleEsc()},isDisabled:function(){return p.toolIsCursor(p.tool.value())}})},t}(i.PureComponent);o.d(t,"DrawingToolbarRenderer",(function(){return He}));var He=function(){function e(e,t){var o=this;this._component=null,this._handleRef=function(e){o._component=e},this._container=e,r.render(i.createElement(Ge,Object(n.__assign)({},t,{ref:this._handleRef})),this._container)}return e.prototype.destroy=function(){r.unmountComponentAtNode(this._container)},e.prototype.getComponent=function(){return Object(l.ensureNotNull)(this._component)},e}()},"85c9":function(e,t){e.exports=''},"8d0Q":function(e,t,o){"use strict";o.d(t,"b",(function(){return i})),o.d(t,"a",(function(){return a}));var n=o("q1tI");function i(){var e=Object(n.useState)(!1),t=e[0],o=e[1];return[t,{onMouseOver:function(e){a(e)&&o(!0)},onMouseOut:function(e){a(e)&&o(!1)}}]}function a(e){return!e.currentTarget.contains(e.relatedTarget)}},ASyk:function(e,t,o){e.exports={"tablet-normal-breakpoint":"screen and (max-width: 768px)","small-height-breakpoint":"screen and (max-height: 360px)","tablet-small-breakpoint":"screen and (max-width: 419px)"}},EA32:function(e,t,o){e.exports={wrap:"wrap-2I6DAtXG",smallTablet:"smallTablet-3_DPsWKG",buttonIcon:"buttonIcon-2rBwJ1QM",item:"item-31XunD5q",hovered:"hovered-2A1Cpat5",active:"active-3xIuXjh4",title:"title-KfwqaWX5",separator:"separator-3h4R1USD",button:"button-21ihqWJ8"}},HD8h:function(e,t,o){e.exports={item:"item-184T8X5A",label:"label-20cSBx98",labelRow:"labelRow-2fmEJqjl",toolbox:"toolbox-2H0D5bLi"}},JQKp:function(e,t,o){e.exports={drawingToolbar:"drawingToolbar-U3_QXRof",isHidden:"isHidden-2d-PYkzV",inner:"inner-1xuW-gY4",popupMenuItem:"popupMenuItem-1b59KAzs",group:"group-2JyOhh7Z",noGroupPadding:"noGroupPadding-1TTjVKWk",lastGroup:"lastGroup-O75UB5Xa",fill:"fill-1djIbBXv",separator:"separator-1BAqp1-l"}},KmEK:function(e,t,o){e.exports={dropdown:"dropdown-3_ASLzSj",buttonWrap:"buttonWrap-3fZWypJl",control:"control-1TyEfSIx",arrow:"arrow-1cFKS5Ok",arrowIcon:"arrowIcon-2wA7q8om",isOpened:"isOpened-22vLOY9o",hover:"hover-2eKqN_v0",isGrayed:"isGrayed-xr-mULNo"}},Sn4D:function(e,t,o){"use strict";o.d(t,"a",(function(){return m}));var n=o("q1tI"),i=o.n(n),a=o("Eyy1"),r=o("TSYQ"),l=o("x0D+"),s=o("Nkvk"),c=o("AiMB"),u=o("mkWe"),d=o("qFKp"),p=o("X0gx"),h=o("sHQ4");function m(e){var t=e.position,o=e.onClose,m=e.children,b=e.className,v=Object(a.ensureNotNull)(Object(n.useContext)(u.a)),g=Object(n.useState)(0),f=g[0],_=g[1],w=Object(n.useRef)(null),T=Object(n.useContext)(p.a);return Object(n.useEffect)((function(){var e +;return null===(e=w.current)||void 0===e||e.focus({preventScroll:!0}),T.subscribe(v,o),Object(s.setFixedBodyState)(!0),d.CheckMobile.iOS()&&Object(l.disableBodyScroll)(Object(a.ensureNotNull)(w.current)),_(v.addDrawer()),function(){T.unsubscribe(v,o);var e=v.removeDrawer();d.CheckMobile.iOS()&&Object(l.enableBodyScroll)(Object(a.ensureNotNull)(w.current)),0===e&&Object(s.setFixedBodyState)(!1)}}),[]),i.a.createElement(c.a,null,i.a.createElement("div",{className:r(h.wrap,h["position"+t])},f===v.currentDrawer&&i.a.createElement("div",{className:h.backdrop,onClick:o}),i.a.createElement("div",{className:r(h.drawer,h["position"+t],b),ref:function(e){w.current=e},tabIndex:-1,onScroll:function(e){e.stopPropagation()}},m)))}},Vike:function(e,t){e.exports=''},Wz44:function(e,t,o){e.exports={container:"container-3_8ayT2Q",mirror:"mirror-crJbq8d0",background:"background-Q1Fcmxly",arrow:"arrow-WcYWFXUn"}},XfUw:function(e,t){e.exports=''},dhVi:function(e,t,o){"use strict";o.d(t,"a",(function(){return r}));var n=o("nPPD"),i=o("v1bN"),a=o("HD8h"),r=Object(n.a)(i,a)},fEjm:function(e,t,o){e.exports={favorite:"favorite-2V8VHwKe",disabled:"disabled-3ebwimbb",active:"active-3pQAvYvT",checked:"checked-2bhy04CF"}},gb5g:function(e,t,o){e.exports={button:"button-263WXsg-",hover:"hover-6KHfIHhL",bg:"bg-1kRv1Pf2",icon:"icon-1Y-3MM9F",isActive:"isActive-2mI1-NUL",isTransparent:"isTransparent-sRmateFl",isGrayed:"isGrayed-1kWObWVr",isHidden:"isHidden-2VzaskeU"}},hn2c:function(e,t){e.exports=''},mkWe:function(e,t,o){"use strict";o.d(t,"b",(function(){return r})),o.d(t,"a",(function(){return l}));var n=o("mrSG"),i=o("q1tI"),a=o.n(i),r=function(e){function t(t){var o=e.call(this,t)||this;return o._addDrawer=function(){var e=o.state.currentDrawer+1;return o.setState({currentDrawer:e}),e},o._removeDrawer=function(){var e=o.state.currentDrawer-1;return o.setState({currentDrawer:e}),e},o.state={currentDrawer:0},o}return Object(n.__extends)(t,e),t.prototype.render=function(){return a.a.createElement(l.Provider,{value:{addDrawer:this._addDrawer,removeDrawer:this._removeDrawer,currentDrawer:this.state.currentDrawer}},this.props.children)},t}(a.a.PureComponent),l=a.a.createContext(null)},nPPD:function(e,t,o){"use strict";function n(e,t,o){void 0===o&&(o={});for(var n=Object.assign({},t),i=0,a=Object.keys(t);i'},uJ8n:function(e,t,o){e.exports={wrap:"wrap-1h7U5nKd",scrollWrap:"scrollWrap-3gtPS0Fe",noScrollBar:"noScrollBar-ieMwbfur",content:"content-YhoA_L2m",icon:"icon-2xObs8DI",scrollBot:"scrollBot-2HHpZNuf",scrollTop:"scrollTop-1eXi8ltS",isVisible:"isVisible-3zZOL3TO",iconWrap:"iconWrap-2Q69rfEO",fadeBot:"fadeBot-3JstnoWq",fadeTop:"fadeTop-3oJzNyTq"}},uhCe:function(e,t,o){"use strict";o.d(t,"a",(function(){return i}));var n=o("ASyk"),i={SmallHeight:n["small-height-breakpoint"],TabletSmall:n["tablet-small-breakpoint"],TabletNormal:n["tablet-normal-breakpoint"]}},ybOa:function(e,t,o){e.exports={toggleButton:"toggleButton-3TAD9tll",collapsed:"collapsed-2PwwPYYB",background:"background-1bSnR2Ey",arrow:"arrow-liYbPQ3o"}}}]); \ No newline at end of file diff --git a/public/charting_library/bundles/ds-property-pages.0df3525d8468799b909d.js b/public/charting_library/bundles/ds-property-pages.0df3525d8468799b909d.js new file mode 100644 index 00000000..2bf00fa1 --- /dev/null +++ b/public/charting_library/bundles/ds-property-pages.0df3525d8468799b909d.js @@ -0,0 +1,16 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([["ds-property-pages"],{"/4PT":function(t,e,i){"use strict";i.r(e);i("P5fv"),i("oA7e");var o=function(){function t(t,e){this.value=t,this.html=e,this.jqItem=this._render()}return t.prototype.eq=function(t){return this.value===t},t.prototype.width=function(){return this.jqItem.width()},t.prototype.render=function(){return this.jqItem},t.prototype.select=function(t){this.jqItem.toggleClass("selected",!!t)},t.prototype.selectAndReturnIfValueMatch=function(t){return this.eq(t)?(this.select(!0),this):(this.select(!1),null)},t.prototype._render=function(){return $('
    ').append($("").html(this.html))},t}(),n=function(){function t(t){var e=this;this._disabled=!1,this._closeCb=null,this.opened=!1,this._value=null,this.items=[],this.width=0,this._jqWrapper=$('
    '),this._jqWrapper.data({disable:this.disable.bind(this),enable:this.enable.bind(this)}),this._jqWrapper.selectable(!1),this._jqSwitcher=$('
    ').appendTo(this._jqWrapper),this._jqSwitcher.on("click",(function(){e.toggleItems()})),this._jqTitle=$('').appendTo(this._jqSwitcher),$('').appendTo(this._jqSwitcher),this._jqItems=$('
    ').appendTo(this._jqWrapper),this._callback=null,t&&this.addItems(t)}return t.prototype.toggleItems=function(){this.opened?this._close():this._open()},t.prototype.setWidth=function(){this._jqWrapper.width(this.width)},t.prototype.render=function(){return this._jqWrapper},t.prototype.selectItemByValue=function(t){for(var e=null,i=0,o=this.items;i',value:a.LINESTYLE_SOLID},{html:'
    ',value:a.LINESTYLE_DOTTED},{html:'
    ',value:a.LINESTYLE_DASHED}])}i.d(e,"createLineStyleEditor",(function(){return s}))},A3Hk:function(t,e,i){"use strict";i.r(e);var o,n;i("P5fv"),i("YFKU"),i("mrSG"),i("Eyy1"),i("tqok"),i("hsV8");function a(){var t=$("");l.appendTo(p),l.addClass("ticker");var d=this._linetool.pointsProperty().points[o];this.bindBarIndex(d.bar,l,this.model(),"Change "+this._linetool.title()+" point bar index")}var h=this._model.model().studyMetaInfoRepository().findByIdSync({type:"java",studyId:this._linetool.studyId()});n.prototype.prepareLayoutImpl.call(this,h,e)},r.prototype.widget=function(){return this._table},t.exports=r},L9lC:function(t,e,i){(function(t){var o=i("DxCR"),n=o.UppercaseTransformer,a=o.SymbolBinder,s=o.BarTimeBinder,r=o.SessionBinder,p=o.PropertyPage,l=o.GreateTransformer,d=o.LessTransformer,h=o.ToIntTransformer,c=o.ToFloatTransformer,u=o.SymbolInfoSymbolTransformer,y=o.SimpleComboBinder,v=o.BooleanBinder,b=o.SimpleStringBinder,f=i("zXvd").NumericFormatter,C=i("0YCj"),m=i("txPx").getLogger("Chart.Study.PropertyPage.Inputs"),_=i("pZll").symbolSearchUIService;function T(t,e,i,o,n){p.call(this,t,e),this._study=i,this._showOnlyConfirmInputs=o,this._symbolSearchZindex=n,this.prepareLayout(),this._$symbolSearchPopup=null}inherit(T,p),T.prototype._addSessionEditor=function(t,e,i,o){ +if("session"===i.type){var n=function(t,e){var i=$("");i.appendTo(t),i.css("padding-left","0px"),i.css("padding-right","0px");var o=$("");o.attr("type","text"),o.addClass("ticker"),o.css("width","40px"),o.attr("id",e),o.appendTo(i)},a=function(t,e,i){var o=$("");o.css("padding-left",i),o.css("padding-right",i),o.appendTo(t);var n=$("
    ");n.appendTo(o),n.append(e),n.css("font-size","150%")},s=$("");s.appendTo(t);var p=$("");p.appendTo(s);var l=["start_hours","start_minutes","end_hours","end_minutes"];n.call(this,p,l[0]),a.call(this,p,":",0),n.call(this,p,l[1]),a.call(this,p,"-",4),n.call(this,p,l[2]),a.call(this,p,":",0),n.call(this,p,l[3]);this.bindControl(new r(p,l,e,!1,this.model(),o))}else m.logError("Session editor adding FAILED: wrong input type.")},T.prototype.prepareControl=function(e,i,o){var n=this;var a=null,s=null,r=null;if("resolution"===e.type)a=$('");else if("symbol"===e.type)a=$(''),_().bindToInput(a,{onPopupOpen:function(t){this._$symbolSearchPopup=t,this._symbolSearchZindex&&t.css("z-index",this._symbolSearchZindex)}.bind(this),onPopupClose:function(){this._$symbolSearchPopup=null}.bind(this),callback:function(t){e.value=t}}),i.attr("colspan",5);else if("session"===e.type)this._addSessionEditor(i,this._property.inputs[e.id],e,o);else if("source"===e.type){for(var p={},l={open:window.t("open"),high:window.t("high"),low:window.t("low"),close:window.t("close"),hl2:window.t("hl2"),hlc3:window.t("hlc3"),ohlc4:window.t("ohlc4")},d=Object.keys(l),h=0;h").attr("value",I).text(B).appendTo(a)}i.addClass("js-value-cell")}else if(e.options){a=$(""),"bool"===e.type?a.attr("type","checkbox"):a.attr("type","text");return a&&(a.appendTo(i),a.is(":checkbox")||"symbol"===e.type||a.css("width","100px")),{valueEditor:a,valueSetter:s,propertyChangedHook:r}},T.prototype._symbolInfoBySymbolProperty=function(t){return this._study.resolvedSymbolInfoBySymbol(t.value())},T.prototype._sortInputs=function(t){return t},T.prototype.prepareLayoutImpl=function(t,e){function i(t){return(new f).format(t)}for(var o=this._sortInputs(t.inputs),r=0;r");_.appendTo(e);var T=$("
    ");T.appendTo(_),T.addClass("propertypage-name-label"),T.text(window.t(F,{context:"input"}));var g=$("");g.appendTo(_);var w=this.prepareControl(p,g,m),k=w.valueEditor,P=w.valueSetter,L=w.propertyChangedHook;if(p.options)this.bindControl(new y(k,this._property.inputs[C],null,!0,this.model(),m,P,L));else if("bar_time"===p.type){this.bindControl(new s(k,this._property.inputs[C],!0,this.model(),m,this.model().mainSeries(),10)),k.addClass("ticker")}else if("integer"===p.type){var x=[h(p.defval)];(0===p.min||p.min)&&x.push(l(p.min)),(0===p.max||p.max)&&x.push(d(p.max)),this.bindControl(new b(k,this._property.inputs[C],x,!1,this.model(),m)),k.addClass("ticker"),isFinite(p.step)&&p.step>0&&k.attr("data-step",p.step)}else if("float"===p.type){x=[c(p.defval)];(0===p.min||p.min)&&x.push(l(p.min)),(0===p.max||p.max)&&x.push(d(p.max));var S=new b(k,this._property.inputs[C],x,!1,this.model(),m);S.addFormatter(i),this.bindControl(S),k.addClass("ticker"),isFinite(p.step)&&p.step>0&&k.attr("data-step",p.step) +}else if("text"===p.type)this.bindControl(new b(k,this._property.inputs[C],null,!1,this.model(),m));else if("bool"===p.type)this.bindControl(new v(k,this._property.inputs[C],!0,this.model(),m));else if("resolution"===p.type)this.bindControl(new y(k,this._property.inputs[C],n,!0,this.model(),"Change Interval"));else if("symbol"===p.type){var I=this._symbolInfoBySymbolProperty.bind(this,this._property.inputs[C]),B=u(I,this._property.inputs[C]),E=new a(k,this._property.inputs[C],!0,this.model(),"Change Symbol",B,this._study.symbolsResolved());this.bindControl(E)}}}if(this._property.offset){var F=this._property.offset.title?this._property.offset.title.value():window.t("Offset");k=this.addOffsetEditorRow(e,F),(x=[h(this._property.offset.val)]).push(l(this._property.offset.min)),x.push(d(this._property.offset.max)),this.bindControl(new b(k,this._property.offset.val,x,!1,this.model(),"Undo "+F))}this._property.offsets&&$.each(t.plots,function(t,i){if(this._property.offsets[i.id]){var o=this._property.offsets[i.id];if(void 0===o.isHidden||!o.isHidden.value()){var n=o.title.value();k=this.addOffsetEditorRow(e,n);var a=[h(o.val)];a.push(l(o.min)),a.push(d(o.max)),this.bindControl(new b(k,o.val,a,!1,this.model(),"Undo "+n))}}}.bind(this))},T.prototype.prepareLayout=function(){this._table=$(""),this._table.addClass("property-page"),this._table.attr("cellspacing","0"),this._table.attr("cellpadding","2");var t=this._study.metaInfo();this.prepareLayoutImpl(t,this._table),this.loadData()},T.prototype.symbolSearchPopup=function(){return this._$symbolSearchPopup},T.prototype.widget=function(){return this._table},e.StudyInputsPropertyPage=T}).call(this,i("Kxc7"))},PVgW:function(t,e,i){"use strict";i.r(e);i("P5fv"),i("si6p");var o=i("ogJP"),n=i("R4+T");function a(t){return t=Math.abs(t),!Object(o.isInteger)(t)&&t>1&&(t=parseFloat(t.toString().replace(/^.+\./,"0."))),0').appendTo(i.parent()),s=$('
    ').html(n).appendTo(a),l=$('
    ').html(n).appendTo(a);a.on("mousedown",(function(t){t.preventDefault(),i.focus()})),s.click((function(){i.is(":disabled")||r(i)})),l.click((function(){i.is(":disabled")||p(i)})),i.keydown((function(t){i.is(":disabled")||(38===t.keyCode?s.addClass("i-active"):40===t.keyCode&&l.addClass("i-active"))})),i.keyup((function(t){i.is(":disabled")||(38===t.keyCode?(r(i),s.removeClass("i-active")):40===t.keyCode&&(p(i),l.removeClass("i-active")))})),i.mousewheel((function(t){t.deltaY*(t.deltaFactor/100)>0?s.click():l.click()}))}}))}},"R4+T":function(t,e){t.exports=''},RTm2:function(t,e,i){"use strict";var o=i("DxCR"),n=o.PropertyPage,a=o.BooleanBinder,s=o.RangeBinder,r=i("Kxc7"),p=i("Ialn").isRtl;function l(t,e,i){n.call(this,t,e),this._linetool=i,this.prepareLayout()}inherit(l,n),l.prototype.prepareLayout=function(){this._block=$('
    ');var t=this._linetool.properties().intervalsVisibilities;if(r.enabled("seconds_resolution")){var e=$("").appendTo(this._block),i=$("").appendTo(this._block),i=$("").appendTo(this._block),i=$("").appendTo(this._block),i=$("").css("height","29px").appendTo(this._block),i=$("").css("height","29px").appendTo(this._block),i=$(""),n=$("
    ").css("padding-right","15px").append(i).appendTo(e);var n=$("").addClass("ticker-text");$("").append(n).appendTo(e);var l=$("
    ").addClass("slider-range ui-slider-horizontal").slider();$("
    ").append(l).appendTo(e);var d=$("").addClass("ticker-text");$("").append(d).appendTo(e),this.bindControl(new a(o,t.seconds,!0,this.model(),"Change Line Tool Visibility On Seconds")),this.bindControl(new s(l,[t.secondsFrom,t.secondsTo],[1,59],!1,this.model(),[n,d],[$.t("Change Seconds From"),$.t("Change Seconds To")],o))}e=$("
    ").css(c,"15px").append(i).appendTo(e);n=$("").addClass("ticker-text");$("").append(n).appendTo(e);l=$("
    ").addClass("slider-range ui-slider-horizontal").slider();$("
    ").append(l).appendTo(e);d=$("").addClass("ticker-text");$("").append(d).appendTo(e),this.bindControl(new a(h,t.minutes,!0,this.model(),"Change Line Tool Visibility On Minutes")),this.bindControl(new s(l,[t.minutesFrom,t.minutesTo],[1,59],!1,this.model(),[n,d],[$.t("Change Minutes From"),$.t("Change Minutes To")],h));e=$("
    ").append(i).appendTo(e);n=$("").addClass("ticker-text");$("").append(n).appendTo(e) +;l=$("
    ").addClass("slider-range ui-slider-horizontal").slider();$("
    ").append(l).appendTo(e);d=$("").addClass("ticker-text");$("").append(d).appendTo(e),this.bindControl(new a(u,t.hours,!0,this.model(),"Change Line Tool Visibility On Hours")),this.bindControl(new s(l,[t.hoursFrom,t.hoursTo],[1,24],!1,this.model(),[n,d],[$.t("Change Minutes From"),$.t("Change Hours To")],u));e=$("
    ").append(i).appendTo(e);n=$("").addClass("ticker-text");$("").append(n).appendTo(e);l=$("
    ").addClass("slider-range ui-slider-horizontal").slider();$("
    ").append(l).appendTo(e);d=$("").addClass("ticker-text");$("").append(d).appendTo(e),this.bindControl(new a(y,t.days,!0,this.model(),"Change Line Tool Visibility On Days")),this.bindControl(new s(l,[t.daysFrom,t.daysTo],[1,366],!1,this.model(),[n,d],[$.t("Change Minutes From"),$.t("Change Days To")],y));e=$("
    ").append(i).appendTo(e),this.bindControl(new a(v,t.weeks,!0,this.model(),"Change Line Tool Visibility On Weeks"));e=$("
    ").append(i).appendTo(e),this.bindControl(new a(b,t.months,!0,this.model(),"Change Line Tool Visibility On Months")),this.loadData()},l.prototype.widget=function(){return this._block},t.exports=l},SA6f:function(t,e,i){"use strict";i.r(e),i.d(e,"createShapeStyleEditor",(function(){return n}));i("P5fv");var o=i("Nu4p");function n(){var t="",$(t)}},XgUb:function(t,e,i){"use strict";i.r(e),i.d(e,"createShapeLocationEditor",(function(){return n}));i("P5fv"),i("YFKU");var o=i("972a");function n(){return $('")}},a0Rg:function(t,e,i){"use strict";i.r(e),i.d(e,"createPlotEditor",(function(){return n}));i("P5fv"),i("YFKU");var o=i("23IT");function n(){var t=$("')}},n3Kh:function(t,e,i){"use strict";var o=i("DxCR"),n=o.PropertyPage,a=o.GreateTransformer,s=o.LessTransformer,r=o.ToIntTransformer,p=o.SimpleStringBinder;function l(t,e,i){n.call(this,t,e),this._linetool=i,this.prepareLayout()}i("PVgW"),inherit(l,n),l.BarIndexPastLimit=-5e4,l.BarIndexFutureLimit=15e3,l.prototype.bindBarIndex=function(t,e,i,o){var n=[r(t.value()),a(l.BarIndexPastLimit),s(l.BarIndexFutureLimit)];this.bindControl(this.createStringBinder(e,t,n,!0,i,o))},l.prototype.createPriceEditor=function(t){var e=this._linetool,i=e.ownerSource().formatter(),o=function(t){var e=i.parse(t);if(e.res)return e.value},n=$("");if(n.TVTicker({step:i._minMove/i._priceScale||1,formatter:function(t){return i.format(t)},parser:o}),t){var a=[function(e){var i=o(e);return void 0===i?t.value():i}],s="Change "+e.title()+" point price",r=this.createStringBinder(n,t,a,!1,this.model(),s);r.addFormatter((function(t){return i.format(t)})),this.bindControl(r)}return n},l.prototype._createPointRow=function(t,e,i){var o=$("
    ");n.html($.t("Price")+i),n.appendTo(o);var a=$("");a.appendTo(o),this.createPriceEditor(e.price).appendTo(a);var s=$("");s.html($.t("Bar #")),s.appendTo(o);var r=$("");r.appendTo(o);var p=$("");return p.appendTo(r),p.addClass("ticker"),this.bindBarIndex(e.bar,p,this.model(),"Change "+this._linetool.title()+" point bar index"),o},l.prototype.prepareLayoutForTable=function(t){for(var e=this._linetool.points(),i=e.length,o=0;o1?" "+(o+1):"";this._createPointRow(n,a,s).appendTo(t)}}},l.prototype.prepareLayout=function(){this._table=$(document.createElement("table")),this._table.addClass("property-page"),this._table.attr("cellspacing","0"),this._table.attr("cellpadding","2"),this.prepareLayoutForTable(this._table),this.loadData()},l.prototype.widget=function(){return this._table},l.prototype.createStringBinder=function(t,e,i,o,n,a){return new p(t,e,i,o,n,a)},t.exports=l},o6hY:function(t,e,i){"use strict" +;var o=i("DxCR"),n=o.PropertyPage,a=o.GreateTransformer,s=o.LessTransformer,r=o.ToIntTransformer,p=o.ToFloatTransformer,l=o.SimpleComboBinder,d=o.BooleanBinder,h=o.DisabledBinder,c=o.ColorBinding,u=o.SliderBinder,y=o.SimpleStringBinder,v=i("jNEI").addColorPicker,b=i("/4PT").createLineStyleEditor,f=i("XgUb").createShapeLocationEditor,C=i("SA6f").createShapeStyleEditor,m=i("mBo9").createVisibilityEditor,_=i("A3Hk").createHHistDirectionEditor,T=i("a0Rg").createPlotEditor,g=i("zXvd").NumericFormatter,w=i("0YCj"),k=i("txPx").getLogger("Chart.Study.PropertyPage"),P=i("JWMC").trackEvent;function L(t,e,i){n.call(this,t,e),this._study=i,this.prepareLayout()}function x(t,e,i){n.call(this,t,e),this._study=i,this._property=t,this.prepareLayout()}inherit(L,n),L.prototype.prepareLayout=function(){this._table=$(""),this._table.addClass("property-page"),this._table.attr("cellspacing","0"),this._table.attr("cellpadding","2");var t=this._study.metaInfo(),e={};function i(t){return(new g).format(t)}for(var o=0;o0)for(o=0;o')).appendTo(this._table),(Y=$("]","i"),ne=/checked\s*(?:[^=]|=\s*.checked.)/i,re=/\/(java|ecma)script/i,oe=/^\s*",""],legend:[1,"
    ","
    "],thead:[1,"
    ")).appendTo(W),(V=$("")).appendTo(Y);var f=$.t(R.name.value(),{context:"input"}),C=this.createLabeledCell(f,V).appendTo(W).addClass("propertypage-name-label"),m=$("");m.appendTo(W),m.addClass("colorpicker-cell");var _=v(m),T=$("");T.appendTo(W);var P=this.createLineWidthEditor();P.appendTo(T);var x=$('').css({whiteSpace:"nowrap"});x.appendTo(W);var S=b();S.render().appendTo(x);var I=$("");I.appendTo(x);var B=[p(R.value.value())],E="Change band",F=new y(I,R.value,B,!1,this.model(),E);F.addFormatter(i),this.bindControl(F),this.bindControl(new d(V,R.visible,!0,this.model(),E)),this.bindControl(new c(_,R.color,!0,this.model(),E)), +this.bindControl(new l(S,R.linestyle,parseInt,!0,this.model(),E)),this.bindControl(new u(P,R.linewidth,!0,this.model(),E))}}if(this._study.properties().bandsBackground){var R=this._study.properties().bandsBackground,O=$.t("Background");E=$.t("Change band background");(W=this._prepareFilledAreaBackground(R.fillBackground,R.backgroundColor,R.transparency,O,E)).appendTo(this._table)}if(this._study.properties().areaBackground){R=this._study.properties().areaBackground,O=$.t("Background"),E=$.t("Change area background");(W=this._prepareFilledAreaBackground(R.fillBackground,R.backgroundColor,R.transparency,O,E)).appendTo(this._table)}var j=t.filledAreas;if(void 0!==j)for(o=0;o');(Y=$("")).appendTo(W),(V=$("")).appendTo(Y),this.bindControl(new d(V,R.visible,!0,this.model(),E+" visibility"));var A=$.t(O,{context:"study"});this.createLabeledCell(A,V).appendTo(W).addClass("propertypage-name-label"),W.appendTo(this._table);var H=this._findPlotPalette(o,D),M=H.palette,q=H.paletteProps;this._prepareLayoutForPalette(0,D,M,q,E)}else{(W=this._prepareFilledAreaBackground(R.visible,R.color,R.transparency,O,E)).appendTo(this._table)}}}for(var z in t.graphics){var N=t.graphics[z];for(var U in N){R=this._property.graphics[z][U];L["_createRow_"+z].call(this,this._table,R)}}var Y,K=this._table.find(".visibility-switch.plot-visibility-switch");1===K.length&&((Y=K.parent()).css("display","none"),1===(C=this._table.find(".propertypage-plot-with-palette")).length?C.css("display","none"):((C=this._table.find(".propertypage-name-label")).css("padding-left",0),C.find("label").attr("for","")));var G=this._prepareStudyPropertiesLayout();if(this._table=this._table.add(G),w.isScriptStrategy(t)){var Q=this._prepareOrdersSwitches();this._table=this._table.add(Q)}this.loadData()},L.prototype._prepareOrdersSwitches=function(){var t=$(''),e="chart-orders-switch_"+Date.now().toString(36),i=$("").appendTo(t),o=$('').appendTo($("").appendTo(t),s=$('').appendTo($("").appendTo(t),l=$('').appendTo($("')).appendTo(this._table),(y=$("')).appendTo(this._table),(y=$("');p.appendTo(this._table);var l=$("');a.appendTo(this._table);var s=$("')).appendTo(this._table);var p=$("')).appendTo(this._table),$("')).appendTo(this._table);var p=$("')).appendTo(this._table),$("');C.appendTo(this._table),$("');a.appendTo(this._table);var s=$("")).appendTo(t),$("").appendTo(i),$("")).appendTo(t),$("").appendTo(i),$("'),s=$(""),o=$("",e.document[0]).appendTo(n)):"tr"===s?e._createTrPlaceholder(e.currentItem,n):"img"===s&&n.attr("src",e.currentItem.attr("src")),i||n.css("visibility","hidden"),n},update:function(t,n){i&&!s.forcePlaceholderSize||(n.height()||n.height(e.currentItem.innerHeight()-parseInt(e.currentItem.css("paddingTop")||0,10)-parseInt(e.currentItem.css("paddingBottom")||0,10)),n.width()||n.width(e.currentItem.innerWidth()-parseInt(e.currentItem.css("paddingLeft")||0,10)-parseInt(e.currentItem.css("paddingRight")||0,10)))}}),e.placeholder=t(s.placeholder.element.call(e.element,e.currentItem)),e.currentItem.after(e.placeholder),s.placeholder.update(e,e.placeholder)},_createTrPlaceholder:function(e,i){var s=this;e.children().each((function(){t("",s.document[0]).attr("colspan",t(this).attr("colspan")||1).appendTo(i)}))},_contactContainers:function(e){var i,s,n,o,r,a,h,l,c,p,d=null,u=null;for(i=this.containers.length-1;i>=0;i--)if(!t.contains(this.currentItem[0],this.containers[i].element[0]))if(this._intersectsWith(this.containers[i].containerCache)){if(d&&t.contains(this.containers[i].element[0],d.element[0]))continue;d=this.containers[i],u=i}else this.containers[i].containerCache.over&&(this.containers[i]._trigger("out",e,this._uiHash(this)),this.containers[i].containerCache.over=0);if(d)if(1===this.containers.length)this.containers[u].containerCache.over||(this.containers[u]._trigger("over",e,this._uiHash(this)),this.containers[u].containerCache.over=1);else{for(n=1e4,o=null,r=(c=d.floating||this._isFloating(this.currentItem))?"left":"top",a=c?"width":"height",p=c?"pageX":"pageY",s=this.items.length-1;s>=0;s--)t.contains(this.containers[u].element[0],this.items[s].item[0])&&this.items[s].item[0]!==this.currentItem[0]&&(h=this.items[s].item.offset()[r],l=!1,e[p]-h>this.items[s][a]/2&&(l=!0),Math.abs(e[p]-h)this.containment[2]&&(o=this.containment[2]+this.offset.click.left),e.pageY-this.offset.click.top>this.containment[3]&&(r=this.containment[3]+this.offset.click.top)),n.grid&&(i=this.originalPageY+Math.round((r-this.originalPageY)/n.grid[1])*n.grid[1],r=this.containment?i-this.offset.click.top>=this.containment[1]&&i-this.offset.click.top<=this.containment[3]?i:i-this.offset.click.top>=this.containment[1]?i-n.grid[1]:i+n.grid[1]:i, +s=this.originalPageX+Math.round((o-this.originalPageX)/n.grid[0])*n.grid[0],o=this.containment?s-this.offset.click.left>=this.containment[0]&&s-this.offset.click.left<=this.containment[2]?s:s-this.offset.click.left>=this.containment[0]?s-n.grid[0]:s+n.grid[0]:s)),{top:r-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():h?0:a.scrollTop()),left:o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():h?0:a.scrollLeft())}},_rearrange:function(t,e,i,s){i?i[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var n=this.counter;this._delay((function(){n===this.counter&&this.refreshPositions(!s)}))},_clear:function(t,e){this.reverting=!1;var i,s=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(i in this._storedCSS)"auto"!==this._storedCSS[i]&&"static"!==this._storedCSS[i]||(this._storedCSS[i]="");this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")}else this.currentItem.show();function n(t,e,i){return function(s){i._trigger(t,s,e._uiHash(e))}}for(this.fromOutside&&!e&&s.push((function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))})),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||s.push((function(t){this._trigger("update",t,this._uiHash())})),this!==this.currentContainer&&(e||(s.push((function(t){this._trigger("remove",t,this._uiHash())})),s.push(function(t){return function(e){t._trigger("receive",e,this._uiHash(this))}}.call(this,this.currentContainer)),s.push(function(t){return function(e){t._trigger("update",e,this._uiHash(this))}}.call(this,this.currentContainer)))),i=this.containers.length-1;i>=0;i--)e||s.push(n("deactivate",this,this.containers[i])),this.containers[i].containerCache.over&&(s.push(n("out",this,this.containers[i])),this.containers[i].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!e){for(i=0;i"))}function s(e){var i="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return e.on("mouseout",i,(function(){t(this).removeClass("ui-state-hover"), +-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).removeClass("ui-datepicker-next-hover")})).on("mouseover",i,n)}function n(){t.datepicker._isDisabledDatepicker(e.inline?e.dpDiv.parent()[0]:e.input[0])||(t(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),t(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).addClass("ui-datepicker-next-hover"))}function o(e,i){for(var s in t.extend(e,i),i)null==i[s]&&(e[s]=i[s]);return e}return t.extend(t.ui,{datepicker:{version:"1.12.1"}}),t.extend(i.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(t){return o(this._defaults,t||{}),this},_attachDatepicker:function(e,i){var s,n,o;n="div"===(s=e.nodeName.toLowerCase())||"span"===s,e.id||(this.uuid+=1,e.id="dp"+this.uuid),(o=this._newInst(t(e),n)).settings=t.extend({},i||{}),"input"===s?this._connectDatepicker(e,o):n&&this._inlineDatepicker(e,o)},_newInst:function(e,i){return{id:e[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1"),input:e,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:i,dpDiv:i?s(t("
    ")):this.dpDiv}},_connectDatepicker:function(e,i){var s=t(e);i.append=t([]),i.trigger=t([]),s.hasClass(this.markerClassName)||(this._attachments(s,i),s.addClass(this.markerClassName).on("keydown",this._doKeyDown).on("keypress",this._doKeyPress).on("keyup",this._doKeyUp),this._autoSize(i),t.data(e,"datepicker",i),i.settings.disabled&&this._disableDatepicker(e))},_attachments:function(e,i){var s,n,o,r=this._get(i,"appendText"),a=this._get(i,"isRTL");i.append&&i.append.remove(),r&&(i.append=t(""+r+""),e[a?"before":"after"](i.append)),e.off("focus",this._showDatepicker),i.trigger&&i.trigger.remove(),"focus"!==(s=this._get(i,"showOn"))&&"both"!==s||e.on("focus",this._showDatepicker),"button"!==s&&"both"!==s||(n=this._get(i,"buttonText"),o=this._get(i,"buttonImage"),i.trigger=t(this._get(i,"buttonImageOnly")?t("").addClass(this._triggerClass).attr({src:o,alt:n,title:n}):t("").addClass(this._triggerClass).html(o?t("").attr({src:o,alt:n,title:n}):n)),e[a?"before":"after"](i.trigger),i.trigger.on("click",(function(){return t.datepicker._datepickerShowing&&t.datepicker._lastInput===e[0]?t.datepicker._hideDatepicker():t.datepicker._datepickerShowing&&t.datepicker._lastInput!==e[0]?(t.datepicker._hideDatepicker(),t.datepicker._showDatepicker(e[0])):t.datepicker._showDatepicker(e[0]),!1})))},_autoSize:function(t){if(this._get(t,"autoSize")&&!t.inline){var e,i,s,n,o=new Date(2009,11,20),r=this._get(t,"dateFormat");r.match(/[DM]/)&&(e=function(t){for(i=0,s=0, +n=0;ni&&(i=t[n].length,s=n);return s},o.setMonth(e(this._get(t,r.match(/MM/)?"monthNames":"monthNamesShort"))),o.setDate(e(this._get(t,r.match(/DD/)?"dayNames":"dayNamesShort"))+20-o.getDay())),t.input.attr("size",this._formatDate(t,o).length)}},_inlineDatepicker:function(e,i){var s=t(e);s.hasClass(this.markerClassName)||(s.addClass(this.markerClassName).append(i.dpDiv),t.data(e,"datepicker",i),this._setDate(i,this._getDefaultDate(i),!0),this._updateDatepicker(i),this._updateAlternate(i),i.settings.disabled&&this._disableDatepicker(e),i.dpDiv.css("display","block"))},_dialogDatepicker:function(e,i,s,n,r){var a,h,l,c,p,d=this._dialogInst;return d||(this.uuid+=1,a="dp"+this.uuid,this._dialogInput=t(""),this._dialogInput.on("keydown",this._doKeyDown),t("body").append(this._dialogInput),(d=this._dialogInst=this._newInst(this._dialogInput,!1)).settings={},t.data(this._dialogInput[0],"datepicker",d)),o(d.settings,n||{}),i=i&&i.constructor===Date?this._formatDate(d,i):i,this._dialogInput.val(i),this._pos=r?r.length?r:[r.pageX,r.pageY]:null,this._pos||(h=document.documentElement.clientWidth,l=document.documentElement.clientHeight,c=document.documentElement.scrollLeft||document.body.scrollLeft,p=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[h/2-100+c,l/2-150+p]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),d.settings.onSelect=s,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),t.blockUI&&t.blockUI(this.dpDiv),t.data(this._dialogInput[0],"datepicker",d),this},_destroyDatepicker:function(i){var s,n=t(i),o=t.data(i,"datepicker");n.hasClass(this.markerClassName)&&(s=i.nodeName.toLowerCase(),t.removeData(i,"datepicker"),"input"===s?(o.append.remove(),o.trigger.remove(),n.removeClass(this.markerClassName).off("focus",this._showDatepicker).off("keydown",this._doKeyDown).off("keypress",this._doKeyPress).off("keyup",this._doKeyUp)):"div"!==s&&"span"!==s||n.removeClass(this.markerClassName).empty(),e===o&&(e=null))},_enableDatepicker:function(e){var i,s,n=t(e),o=t.data(e,"datepicker");n.hasClass(this.markerClassName)&&("input"===(i=e.nodeName.toLowerCase())?(e.disabled=!1,o.trigger.filter("button").each((function(){this.disabled=!1})).end().filter("img").css({opacity:"1.0",cursor:""})):"div"!==i&&"span"!==i||((s=n.children("."+this._inlineClass)).children().removeClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=t.map(this._disabledInputs,(function(t){return t===e?null:t})))},_disableDatepicker:function(e){var i,s,n=t(e),o=t.data(e,"datepicker");n.hasClass(this.markerClassName)&&("input"===(i=e.nodeName.toLowerCase())?(e.disabled=!0,o.trigger.filter("button").each((function(){this.disabled=!0})).end().filter("img").css({opacity:"0.5",cursor:"default" +})):"div"!==i&&"span"!==i||((s=n.children("."+this._inlineClass)).children().addClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=t.map(this._disabledInputs,(function(t){return t===e?null:t})),this._disabledInputs[this._disabledInputs.length]=e)},_isDisabledDatepicker:function(t){if(!t)return!1;for(var e=0;e-1},_doKeyUp:function(e){var i=t.datepicker._getInst(e.target);if(i.input.val()!==i.lastVal)try{t.datepicker.parseDate(t.datepicker._get(i,"dateFormat"),i.input?i.input.val():null,t.datepicker._getFormatConfig(i))&&(t.datepicker._setDateFromField(i),t.datepicker._updateAlternate(i),t.datepicker._updateDatepicker(i))}catch(s){}return!0},_showDatepicker:function(e){var i,s,n,r,a,h,l;"input"!==(e=e.target||e).nodeName.toLowerCase()&&(e=t("input",e.parentNode)[0]),t.datepicker._isDisabledDatepicker(e)||t.datepicker._lastInput===e||(i=t.datepicker._getInst(e),t.datepicker._curInst&&t.datepicker._curInst!==i&&(t.datepicker._curInst.dpDiv.stop(!0,!0),i&&t.datepicker._datepickerShowing&&t.datepicker._hideDatepicker(t.datepicker._curInst.input[0])),!1!==(n=(s=t.datepicker._get(i,"beforeShow"))?s.apply(e,[e,i]):{})&&(o(i.settings,n),i.lastVal=null,t.datepicker._lastInput=e,t.datepicker._setDateFromField(i),t.datepicker._inDialog&&(e.value=""),t.datepicker._pos||(t.datepicker._pos=t.datepicker._findPos(e),t.datepicker._pos[1]+=e.offsetHeight),r=!1,t(e).parents().each((function(){return!(r|="fixed"===t(this).css("position"))})),a={left:t.datepicker._pos[0],top:t.datepicker._pos[1]},t.datepicker._pos=null,i.dpDiv.empty(),i.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),t.datepicker._updateDatepicker(i),a=t.datepicker._checkOffset(i,a,r),i.dpDiv.css({position:t.datepicker._inDialog&&t.blockUI?"static":r?"fixed":"absolute",display:"none",left:a.left+"px",top:a.top+"px"}),i.inline||(h=t.datepicker._get(i,"showAnim"),l=t.datepicker._get(i,"duration"),i.dpDiv.css("z-index",function(t){for(var e,i;t.length&&t[0]!==document;){if(("absolute"===(e=t.css("position"))||"relative"===e||"fixed"===e)&&(i=parseInt(t.css("zIndex"),10),!isNaN(i)&&0!==i))return i;t=t.parent()}return 0}(t(e))+1),t.datepicker._datepickerShowing=!0,t.effects&&t.effects.effect[h]?i.dpDiv.show(h,t.datepicker._get(i,"showOptions"),l):i.dpDiv[h||"show"](h?l:null),t.datepicker._shouldFocusInput(i)&&i.input.trigger("focus"),t.datepicker._curInst=i)))}, +_updateDatepicker:function(i){this.maxRows=4,e=i,i.dpDiv.empty().append(this._generateHTML(i)),this._attachHandlers(i);var s,o=this._getNumberOfMonths(i),r=o[1],a=i.dpDiv.find("."+this._dayOverClass+" a");a.length>0&&n.apply(a.get(0)),i.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),r>1&&i.dpDiv.addClass("ui-datepicker-multi-"+r).css("width",17*r+"em"),i.dpDiv[(1!==o[0]||1!==o[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),i.dpDiv[(this._get(i,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),i===t.datepicker._curInst&&t.datepicker._datepickerShowing&&t.datepicker._shouldFocusInput(i)&&i.input.trigger("focus"),i.yearshtml&&(s=i.yearshtml,setTimeout((function(){s===i.yearshtml&&i.yearshtml&&i.dpDiv.find("select.ui-datepicker-year:first").replaceWith(i.yearshtml),s=i.yearshtml=null}),0))},_shouldFocusInput:function(t){return t.input&&t.input.is(":visible")&&!t.input.is(":disabled")&&!t.input.is(":focus")},_checkOffset:function(e,i,s){var n=e.dpDiv.outerWidth(),o=e.dpDiv.outerHeight(),r=e.input?e.input.outerWidth():0,a=e.input?e.input.outerHeight():0,h=document.documentElement.clientWidth+(s?0:t(document).scrollLeft()),l=document.documentElement.clientHeight+(s?0:t(document).scrollTop());return i.left-=this._get(e,"isRTL")?n-r:0,i.left-=s&&i.left===e.input.offset().left?t(document).scrollLeft():0,i.top-=s&&i.top===e.input.offset().top+a?t(document).scrollTop():0,i.left-=Math.min(i.left,i.left+n>h&&h>n?Math.abs(i.left+n-h):0),i.top-=Math.min(i.top,i.top+o>l&&l>o?Math.abs(o+a):0),i},_findPos:function(e){for(var i,s=this._getInst(e),n=this._get(s,"isRTL");e&&("hidden"===e.type||1!==e.nodeType||t.expr.filters.hidden(e));)e=e[n?"previousSibling":"nextSibling"];return[(i=t(e).offset()).left,i.top]},_hideDatepicker:function(e){var i,s,n,o,r=this._curInst;!r||e&&r!==t.data(e,"datepicker")||this._datepickerShowing&&(i=this._get(r,"showAnim"),s=this._get(r,"duration"),n=function(){t.datepicker._tidyDialog(r)},t.effects&&(t.effects.effect[i]||t.effects[i])?r.dpDiv.hide(i,t.datepicker._get(r,"showOptions"),s,n):r.dpDiv["slideDown"===i?"slideUp":"fadeIn"===i?"fadeOut":"hide"](i?s:null,n),i||n(),this._datepickerShowing=!1,(o=this._get(r,"onClose"))&&o.apply(r.input?r.input[0]:null,[r.input?r.input.val():"",r]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),t.blockUI&&(t.unblockUI(),t("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(t){t.dpDiv.removeClass(this._dialogClass).off(".ui-datepicker-calendar")},_checkExternalClick:function(e){if(t.datepicker._curInst){var i=t(e.target),s=t.datepicker._getInst(i[0]);(i[0].id===t.datepicker._mainDivId||0!==i.parents("#"+t.datepicker._mainDivId).length||i.hasClass(t.datepicker.markerClassName)||i.closest("."+t.datepicker._triggerClass).length||!t.datepicker._datepickerShowing||t.datepicker._inDialog&&t.blockUI)&&(!i.hasClass(t.datepicker.markerClassName)||t.datepicker._curInst===s)||t.datepicker._hideDatepicker()}},_adjustDate:function(e,i,s){ +var n=t(e),o=this._getInst(n[0]);this._isDisabledDatepicker(n[0])||(this._adjustInstDate(o,i+("M"===s?this._get(o,"showCurrentAtPos"):0),s),this._updateDatepicker(o))},_gotoToday:function(e){var i,s=t(e),n=this._getInst(s[0]);this._get(n,"gotoCurrent")&&n.currentDay?(n.selectedDay=n.currentDay,n.drawMonth=n.selectedMonth=n.currentMonth,n.drawYear=n.selectedYear=n.currentYear):(i=new Date,n.selectedDay=i.getDate(),n.drawMonth=n.selectedMonth=i.getMonth(),n.drawYear=n.selectedYear=i.getFullYear()),this._notifyChange(n),this._adjustDate(s)},_selectMonthYear:function(e,i,s){var n=t(e),o=this._getInst(n[0]);o["selected"+("M"===s?"Month":"Year")]=o["draw"+("M"===s?"Month":"Year")]=parseInt(i.options[i.selectedIndex].value,10),this._notifyChange(o),this._adjustDate(n)},_selectDay:function(e,i,s,n){var o,r=t(e);t(n).hasClass(this._unselectableClass)||this._isDisabledDatepicker(r[0])||((o=this._getInst(r[0])).selectedDay=o.currentDay=t("a",n).html(),o.selectedMonth=o.currentMonth=i,o.selectedYear=o.currentYear=s,this._selectDate(e,this._formatDate(o,o.currentDay,o.currentMonth,o.currentYear)))},_clearDate:function(e){var i=t(e);this._selectDate(i,"")},_selectDate:function(e,i){var s,n=t(e),o=this._getInst(n[0]);i=null!=i?i:this._formatDate(o),o.input&&o.input.val(i),this._updateAlternate(o),(s=this._get(o,"onSelect"))?s.apply(o.input?o.input[0]:null,[i,o]):o.input&&o.input.trigger("change"),o.inline?this._updateDatepicker(o):(this._hideDatepicker(),this._lastInput=o.input[0],"object"!=typeof o.input[0]&&o.input.trigger("focus"),this._lastInput=null)},_updateAlternate:function(e){var i,s,n,o=this._get(e,"altField");o&&(i=this._get(e,"altFormat")||this._get(e,"dateFormat"),s=this._getDate(e),n=this.formatDate(i,s,this._getFormatConfig(e)),t(o).val(n))},noWeekends:function(t){var e=t.getDay();return[e>0&&e<6,""]},iso8601Week:function(t){var e,i=new Date(t.getTime());return i.setDate(i.getDate()+4-(i.getDay()||7)),e=i.getTime(),i.setMonth(0),i.setDate(1),Math.floor(Math.round((e-i)/864e5)/7)+1},parseDate:function(e,i,s){if(null==e||null==i)throw"Invalid arguments";if(""===(i="object"==typeof i?i.toString():i+""))return null;var n,o,r,a,h=0,l=(s?s.shortYearCutoff:null)||this._defaults.shortYearCutoff,c="string"!=typeof l?l:(new Date).getFullYear()%100+parseInt(l,10),p=(s?s.dayNamesShort:null)||this._defaults.dayNamesShort,d=(s?s.dayNames:null)||this._defaults.dayNames,u=(s?s.monthNamesShort:null)||this._defaults.monthNamesShort,f=(s?s.monthNames:null)||this._defaults.monthNames,g=-1,m=-1,_=-1,v=-1,y=!1,k=function(t){var i=n+1-1)for(m=1,_=v;!(_<=(o=this._getDaysInMonth(g,m-1)));)m++,_-=o;if((a=this._daylightSavingAdjust(new Date(g,m-1,_))).getFullYear()!==g||a.getMonth()+1!==m||a.getDate()!==_)throw"Invalid date";return a},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*60*60*1e7,formatDate:function(t,e,i){if(!e)return"";var s,n=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,o=(i?i.dayNames:null)||this._defaults.dayNames,r=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,a=(i?i.monthNames:null)||this._defaults.monthNames,h=function(e){var i=s+112?t.getHours()+2:0),t):null},_setDate:function(t,e,i){var s=!e,n=t.selectedMonth,o=t.selectedYear,r=this._restrictMinMax(t,this._determineDate(t,e,new Date));t.selectedDay=t.currentDay=r.getDate(),t.drawMonth=t.selectedMonth=t.currentMonth=r.getMonth(),t.drawYear=t.selectedYear=t.currentYear=r.getFullYear(),n===t.selectedMonth&&o===t.selectedYear||i||this._notifyChange(t),this._adjustInstDate(t),t.input&&t.input.val(s?"":this._formatDate(t))},_getDate:function(t){return!t.currentYear||t.input&&""===t.input.val()?null:this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay))},_attachHandlers:function(e){var i=this._get(e,"stepMonths"),s="#"+e.id.replace(/\\\\/g,"\\");e.dpDiv.find("[data-handler]").map((function(){var e={prev:function(){t.datepicker._adjustDate(s,-i,"M")},next:function(){t.datepicker._adjustDate(s,+i,"M")},hide:function(){t.datepicker._hideDatepicker()},today:function(){t.datepicker._gotoToday(s)},selectDay:function(){return t.datepicker._selectDay(s,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return t.datepicker._selectMonthYear(s,this,"M"),!1},selectYear:function(){return t.datepicker._selectMonthYear(s,this,"Y"),!1}};t(this).on(this.getAttribute("data-event"),e[this.getAttribute("data-handler")])}))},_generateHTML:function(t){ +var e,i,s,n,o,r,a,h,l,c,p,d,u,f,g,m,_,v,y,k,w,b,D,P,x,I,C,M,z,S,T,H,N,A,F,Y,E,W,O,R=new Date,L=this._daylightSavingAdjust(new Date(R.getFullYear(),R.getMonth(),R.getDate())),j=this._get(t,"isRTL"),K=this._get(t,"showButtonPanel"),B=this._get(t,"hideIfNoPrevNext"),X=this._get(t,"navigationAsDateFormat"),U=this._getNumberOfMonths(t),Q=this._get(t,"showCurrentAtPos"),V=this._get(t,"stepMonths"),J=1!==U[0]||1!==U[1],$=this._daylightSavingAdjust(t.currentDay?new Date(t.currentYear,t.currentMonth,t.currentDay):new Date(9999,9,9)),G=this._getMinMaxDate(t,"min"),q=this._getMinMaxDate(t,"max"),Z=t.drawMonth-Q,tt=t.drawYear;if(Z<0&&(Z+=12,tt--),q)for(e=this._daylightSavingAdjust(new Date(q.getFullYear(),q.getMonth()-U[0]*U[1]+1,q.getDate())),e=G&&ee;)--Z<0&&(Z=11,tt--);for(t.drawMonth=Z,t.drawYear=tt,i=this._get(t,"prevText"),i=X?this.formatDate(i,this._daylightSavingAdjust(new Date(tt,Z-V,1)),this._getFormatConfig(t)):i,s=this._canAdjustMonth(t,-1,tt,Z)?""+i+"":B?"":""+i+"",n=this._get(t,"nextText"),n=X?this.formatDate(n,this._daylightSavingAdjust(new Date(tt,Z+V,1)),this._getFormatConfig(t)):n,o=this._canAdjustMonth(t,1,tt,Z)?""+n+"":B?"":""+n+"",r=this._get(t,"currentText"),a=this._get(t,"gotoCurrent")&&t.currentDay?$:L,r=X?this.formatDate(r,a,this._getFormatConfig(t)):r,h=t.inline?"":"",l=K?"
    "+(j?h:"")+(this._isInRange(t,a)?"":"")+(j?"":h)+"
    ":"",c=parseInt(this._get(t,"firstDay"),10),c=isNaN(c)?0:c,p=this._get(t,"showWeek"),d=this._get(t,"dayNames"),u=this._get(t,"dayNamesMin"),f=this._get(t,"monthNames"),g=this._get(t,"monthNamesShort"),m=this._get(t,"beforeShowDay"),_=this._get(t,"showOtherMonths"),v=this._get(t,"selectOtherMonths"),y=this._getDefaultDate(t),k="",b=0;b1)switch(P){case 0:C+=" ui-datepicker-group-first",I=" ui-corner-"+(j?"right":"left");break;case U[1]-1: +C+=" ui-datepicker-group-last",I=" ui-corner-"+(j?"left":"right");break;default:C+=" ui-datepicker-group-middle",I=""}C+="'>"}for(C+="
    "+(/all|left/.test(I)&&0===b?j?o:s:"")+(/all|right/.test(I)&&0===b?j?s:o:"")+this._generateMonthYearHeader(t,Z,tt,G,q,b>0||P>0,f,g)+"
    ").appendTo(i));$('").appendTo($("").appendTo(i));var n="chart-orders-labels-switch_"+Date.now().toString(36),a=$("
    ").appendTo(a));$('").appendTo($("").appendTo(a));var r="chart-orders-qty-switch_"+Date.now().toString(36),p=$("
    ").appendTo(p));$('").appendTo($("").appendTo(p));var c=this._study.properties();return this.bindControl(new d(o,c.strategy.orders.visible,!0,this.model(),"Trades on chart visibility")), +this.bindControl(new d(s,c.strategy.orders.showLabels,!0,this.model(),"Signal labels visibility")),this.bindControl(new h(s,c.strategy.orders.visible,!0,this.model(),"Signal labels visibility",!0)),this.bindControl(new d(l,c.strategy.orders.showQty,!0,this.model(),"Quantity visibility")),this.bindControl(new h(l,c.strategy.orders.visible,!0,this.model(),"Quantity visibility",!0)),t},L.prototype._prepareLayoutForPlot=function(t,e){var i=e.id,o=this._study.properties().styles[i],n=this._findPlotPalette(t,e),a=n.palette,s=n.paletteProps,r="Change "+i;if(a){(h=$('
    ")).appendTo(h),y.addClass("visibility-cell"),(b=$("")).appendTo(y),this.bindControl(new d(b,o.visible,!0,this.model(),r));var p=$.t(o.title.value(),{context:"input"});this.createLabeledCell(p,b).appendTo(h).addClass("propertypage-name-label propertypage-plot-with-palette"),this._prepareLayoutForPalette(t,e,a,s,r)}else{var h,y,b;(h=$('
    ")).appendTo(h),y.addClass("visibility-cell"),(b=$("")).appendTo(y);p=$.t(this._study.properties().styles[i].title.value(),{context:"input"});this.createLabeledCell(p,b).appendTo(h).addClass("propertypage-name-label");var f=$("");f.appendTo(h),f.addClass("colorpicker-cell");var C=v(f),m=$("");m.appendTo(h);var _=this.createLineWidthEditor();_.appendTo(m);var g=$("");g.appendTo(h);var w=T();w.appendTo(g);var k=$("");k.appendTo(h);var P=$("");P.on("change",this._trackPriceLine.bind(this)).appendTo(k),this.createLabeledCell("Price Line",P).appendTo(h),this.bindControl(new d(b,o.visible,!0,this.model(),r)),this.bindControl(new c(C,o.color,!0,this.model(),r,o.transparency)),this.bindControl(new u(_,o.linewidth,!0,this.model(),r,this._study.metaInfo().isTVScript)),this.bindControl(new l(w,o.plottype,parseInt,!0,this.model(),r)),this.bindControl(new d(P,o.trackPrice,!0,this.model(),"Change Price Line"))}},L.prototype._prepareLayoutForBarsPlot=function(t,e){var i=e.id,o=this._study.properties().ohlcPlots[i],n=this._findPlotPalette(t,e),a=n.palette,s=n.paletteProps,r="Change "+i,p=$('
    ");l.appendTo(p),l.addClass("visibility-cell");var h=$("");h.appendTo(l),this.bindControl(new d(h,o.visible,!0,this.model(),r));var u=o.title.value();if(this.createLabeledCell(u,h).appendTo(p).addClass("propertypage-name-label"),a){this._prepareLayoutForPalette(t,e,a,s,r,!0)}else{var y=$("");y.appendTo(p),y.addClass("colorpicker-cell");var b=v(y);this.bindControl(new c(b,o.color,!0,this.model(),r))}},L.prototype._prepareLayoutForCandlesPlot=function(t,e){this._prepareLayoutForBarsPlot(t,e);var i=e.id,o=this._study.properties().ohlcPlots[i],n="Change "+i,a=$('
    ");s.appendTo(a), +s.addClass("visibility-cell");var r=$("");r.appendTo(s),this.bindControl(new d(r,o.drawWick,!0,this.model(),n));this.createLabeledCell("Wick",r).appendTo(a);var p=$("");p.appendTo(a),p.addClass("colorpicker-cell");var l=v(p);this.bindControl(new c(l,o.wickColor,!0,this.model(),n))},L.prototype._prepareLayoutForShapesPlot=function(t,e){var i=e.id,o=this._study.properties().styles[i],n=this._findPlotPalette(t,e),a=n.palette,s=n.paletteProps,r="Change "+i;(T=$('
    ");p.appendTo(T),p.addClass("visibility-cell");var h=$("");h.appendTo(p),this.bindControl(new d(h,o.visible,!0,this.model(),r));var u=$.t(this._study.properties().styles[i].title.value(),{context:"input"});this.createLabeledCell(u,h).appendTo(T).addClass("propertypage-name-label");var y=$("");y.appendTo(T);var b=C();b.appendTo(y),this.bindControl(new l(b,o.plottype,null,!0,this.model(),r));var m=$("");m.appendTo(T);var _=f();if(_.appendTo(m),this.bindControl(new l(_,o.location,null,!0,this.model(),r)),a)this._prepareLayoutForPalette(t,e,a,s,r);else{var T;(T=$('
    ").appendTo(T),$("").appendTo(T);var g=$("");g.appendTo(T),g.addClass("colorpicker-cell");var w=v(g);this.bindControl(new c(w,o.color,!0,this.model(),r,o.transparency))}},L.prototype._prepareLayoutForCharsPlot=function(t,e){var i=e.id,o=this._study.properties().styles[i],n=this._findPlotPalette(t,e),a=n.palette,s=n.paletteProps,r="Change "+i;(T=$('
    ");p.appendTo(T),p.addClass("visibility-cell");var h=$("");h.appendTo(p),this.bindControl(new d(h,o.visible,!0,this.model(),r));var u=$.t(this._study.properties().styles[i].title.value(),{context:"input"});this.createLabeledCell(u,h).appendTo(T).addClass("propertypage-name-label");var b=$("");b.appendTo(T);var C=$('');C.appendTo(b),C.keyup((function(){var t=$(this),e=t.val();e&&(t.val(e.split("")[e.length-1]),t.change())})),this.bindControl(new y(C,o.char,null,!1,this.model(),r));var m=$("");m.appendTo(T);var _=f();if(_.appendTo(m),this.bindControl(new l(_,o.location,null,!0,this.model(),r)),a)this._prepareLayoutForPalette(t,e,a,s,r);else{var T;(T=$('
    ").appendTo(T),$("").appendTo(T);var g=$("");g.appendTo(T),g.addClass("colorpicker-cell");var w=v(g);this.bindControl(new c(w,o.color,!0,this.model(),r,o.transparency))}},L.prototype._prepareLayoutForPalette=function(t,e,i,o,n,a){var s=t,r=e.id,p=null,h=r.startsWith("fill");p=a?this._study.properties().ohlcPlots[r]:h?this._study.properties().filledAreasStyle[r]:this._study.properties().styles[r];var y=0;for(var b in i.colors){var f=o.colors[b],C=$('
    ").appendTo(C);var m=$("");m.appendTo(C),m.addClass("propertypage-name-label"), +m.html($.t(f.name.value(),{context:"input"}));var _=$("");_.appendTo(C),_.addClass("colorpicker-cell");var g=v(_);if(this.bindControl(new c(g,f.color,!0,this.model(),n,p.transparency)),!h&&this._study.isLinePlot(s)){var w=$("");w.appendTo(C);var k=this.createLineWidthEditor();k.appendTo(w),this.bindControl(new u(k,f.width,!0,this.model(),n,this._study.metaInfo().isTVScript));var P=$("");if(P.appendTo(C),0===y){var L=T();L.appendTo(P),this.bindControl(new l(L,p.plottype,parseInt,!0,this.model(),n));var x=$("");x.appendTo(C);var S=$("");S.on("change",this._trackPriceLine.bind(this)).appendTo(x),this.createLabeledCell("Price Line",S).appendTo(C),this.bindControl(new d(S,p.trackPrice,!0,this.model(),"Change Price Line"))}}y++}},L.prototype._trackPriceLine=function(){P("GUI","Add Price Line",this._study.properties().description.value())},L.prototype._prepareLayoutForArrowsPlot=function(t,e){var i=e.id,o=this._study.properties().styles[i],n="Change "+i,a=$('
    ");s.appendTo(a),s.addClass("visibility-cell");var r=$("");r.appendTo(s);var p=$.t(this._study.properties().styles[i].title.value(),{context:"input"});this.createLabeledCell(p,r).appendTo(a).addClass("propertypage-name-label");var l=$("");l.appendTo(a),l.addClass("colorpicker-cell");var h=v(l),u=$("");u.appendTo(a),u.addClass("colorpicker-cell");var y=v(u);this.bindControl(new d(r,o.visible,!0,this.model(),n)),this.bindControl(new c(h,o.colorup,!0,this.model(),n,o.transparency)),this.bindControl(new c(y,o.colordown,!0,this.model(),n,o.transparency))},L.prototype._findPlotPalette=function(t,e){var i=t,o=e.id,n=null,a=null,s=this._study.metaInfo().plots;if(this._study.isBarColorerPlot(i)||this._study.isBgColorerPlot(i))n=this._study.metaInfo().palettes[e.palette],a=this._study.properties().palettes[e.palette];else for(var r=0;r'),e=this.createPrecisionEditor();if((i=$("
    "+$.t("Precision")+"").append(e).appendTo(i),this.bindControl(new l(e,this._study.properties().precision,null,!0,this.model(),"Change Precision")),"Compare@tv-basicstudies"===this._study.metaInfo().id){var i;e=this.createSeriesMinTickEditor();(i=$("
    "+$.t("Override Min Tick")+"").append(e).appendTo(i),this.bindControl(new l(e,this._study.properties().minTick,null,!0,this.model(),"Change MinTick"))}return this._putStudyDefaultStyles(t),t},L.prototype._putStudyDefaultStyles=function(t,e){var i=null,o=this._study +;return(!o.properties().linkedToSeries||!o.properties().linkedToSeries.value())&&($.each(this._model.m_model.panes(),(function(t,e){$.each(e.dataSources(),(function(t,n){if(n===o)return i=e,!1}))})),this._pane=i,t)},L.prototype.widget=function(){return this._table},L.prototype._prepareFilledAreaBackground=function(t,e,i,o,n){var a=$('
    ");s.appendTo(a);var r=$("");r.appendTo(s),this.createLabeledCell(o,r).appendTo(a).addClass("propertypage-name-label");var p=$("");p.appendTo(a),p.addClass("colorpicker-cell");var l=v(p);return this.bindControl(new d(r,t,!0,this.model(),n+" visibility")),this.bindControl(new c(l,e,!0,this.model(),n+" color",i)),a},inherit(x,n),x.prototype.prepareLayout=function(){this._study.properties().linkedToSeries&&this._study.properties().linkedToSeries.value(),this._table=$()},x.prototype.widget=function(){return this._table},L._createRow_horizlines=function(t,e){var i=this.addRow(t),o=e.name.value(),n=$(""),a=this.createColorPicker(),s=this.createLineWidthEditor(),r=b();$("").append(n).appendTo(i),this.createLabeledCell(o,n).appendTo(i),$("").append(a).appendTo(i),$("").append(s).appendTo(i),$("").append(r.render()).appendTo(i),this.bindControl(new d(n,e.visible,!0,this.model(),"Change "+o+" visibility")),this.bindControl(new c(a,e.color,!0,this.model(),"Change "+o+" color")),this.bindControl(new l(r,e.style,parseInt,!0,this.model(),"Change "+o+" style")),this.bindControl(new u(s,e.width,!0,this.model(),"Change "+o+" width"))},L._createRow_vertlines=function(t,e){var i=this.addRow(t),o=e.name.value(),n=$(""),a=this.createColorPicker(),s=this.createLineWidthEditor(),r=b();$("").append(n).appendTo(i),this.createLabeledCell(o,n).appendTo(i),$("").append(a).appendTo(i),$("").append(s).appendTo(i),$("").append(r.render()).appendTo(i),this.bindControl(new d(n,e.visible,!0,this.model(),"Change "+o+" visibility")),this.bindControl(new c(a,e.color,!0,this.model(),"Change "+o+" color")),this.bindControl(new l(r,e.style,parseInt,!0,this.model(),"Change "+o+" style")),this.bindControl(new u(s,e.width,!0,this.model(),"Change "+o+" width"))},L._createRow_lines=function(t,e){var i=this.addRow(t),o=e.title.value(),n=$(""),a=this.createColorPicker(),s=this.createLineWidthEditor(),r=b();$("").append(n).appendTo(i),this.createLabeledCell(o,n).appendTo(i),$("").append(a).appendTo(i),$("").append(s).appendTo(i),$("").append(r.render()).appendTo(i),this.bindControl(new d(n,e.visible,!0,this.model(),"Change "+o+" visibility")),this.bindControl(new c(a,e.color,!0,this.model(),"Change "+o+" color")),this.bindControl(new l(r,e.style,parseInt,!0,this.model(),"Change "+o+" style")),this.bindControl(new u(s,e.width,!0,this.model(),"Change "+o+" width"))},L._createRow_hlines=function(t,e){ +var i=this.addRow(t),o=e.name.value(),n=$(""),a=this.createColorPicker(),s=this.createLineWidthEditor(),r=b(),p=$("");if($("").append(n).appendTo(i),this.createLabeledCell(o,n).appendTo(i),$("").append(a).appendTo(i),$("").append(s).appendTo(i),$("").append(r.render()).appendTo(i),$("").appendTo(i),$("").append(p).appendTo(i),this.createLabeledCell("Show Price",p).appendTo(i),this.bindControl(new d(n,e.visible,!0,this.model(),"Change "+o+" visibility")),this.bindControl(new c(a,e.color,!0,this.model(),"Change "+o+" color")),this.bindControl(new l(r,e.style,parseInt,!0,this.model(),"Change "+o+" style")),this.bindControl(new u(s,e.width,!0,this.model(),"Change "+o+" width")),this.bindControl(new d(p,e.showPrice,!0,this.model(),"Change "+o+" show price")),e.enableText.value()){i=this.addRow(t);$('').appendTo(i);var h=$("");$('').append(h).appendTo(i),this.createLabeledCell("Show Text",h).appendTo(i),this.bindControl(new d(h,e.showText,!0,this.model(),"Change "+o+" show text"));var y=TradingView.createTextPosEditor();$("").append(y.render()).appendTo(i),this.bindControl(new l(y,e.textPos,parseInt,!0,this.model(),"Change "+o+" text position"));var v=this.createFontSizeEditor();$('').append(v).appendTo(i),this.bindControl(new l(v,e.fontSize,parseInt,!0,this.model(),"Change "+o+" font size"))}},L._createRow_hhists=function(t,e){var i=e.title.value(),o=[],n=[],p=this.addRow(t),h=m();$("").append(h).appendTo(p),this.createLabeledCell(i,h).appendTo(p),this.bindControl(new d(h,e.visible,!0,this.model(),"Change "+i+" Visibility"));p=this.addRow(t);var u=$("");u.attr("type","text"),u.addClass("ticker"),this.createLabeledCell($.t("Width (% of the Box)"),u).appendTo(p),$("").append(u).appendTo(p);var v=[r(40)];v.push(a(0)),v.push(s(100)),this.bindControl(new y(u,e.percentWidth,v,!1,this.model(),"Change Percent Width"));p=this.addLabeledRow(t,"Placement");var b=_();$("").append(b).appendTo(p),this.bindControl(new l(b,e.direction,null,!0,this.model(),"Change "+i+" Placement"));p=this.addRow(t);var f=$("");$("").append(f).appendTo(p),this.createLabeledCell($.t("Show Values"),f).appendTo(p),this.bindControl(new d(f,e.showValues,!0,this.model(),"Change "+i+" Show Values"));p=this.addRow(t);var C=this.createColorPicker();for(var T in this.createLabeledCell($.t("Text Color"),C).appendTo(p),$("").append(C).appendTo(p),this.bindControl(new c(C,e.valuesColor,!0,this.model(),"Change "+i+" Text Color")),e.colors)if(isNumber(parseInt(T,10))){p=this.addRow(t);o[T]=e.titles[T].value(),n[T]=this.createColorPicker(),$("").append(o[T]).appendTo(p),$("").append(n[T]).appendTo(p),this.bindControl(new c(n[T],e.colors[T],!0,this.model(),"Change "+o[T]+" color"))}},L._createRow_backgrounds=function(t,e){ +var i=this.addRow(t),o=$(""),n=e.name.value(),a=this.createColorPicker();$("").append(o).appendTo(i),this.createLabeledCell(n,o).appendTo(i),$("").append(a).appendTo(i),this.bindControl(new d(o,e.visible,!0,this.model(),"Change "+n+" visibility")),this.bindControl(new c(a,e.color,!0,this.model(),"Change "+n+" color",e.transparency))},L._createRow_polygons=function(t,e){var i=this.addRow(t),o=e.name.value(),n=this.createColorPicker();$("").append(o).appendTo(i),$("").append(n).appendTo(i),this.bindControl(new c(n,e.color,!0,this.model(),"Change "+o+" color"))},L._createRow_trendchannels=function(t,e){var i=this.addRow(t),o=e.name.value(),n=this.createColorPicker();$("").append(o).appendTo(i),$("").append(n).appendTo(i),this.bindControl(new c(n,e.color,!0,this.model(),"Change "+o+" color",e.transparency))},L._createRow_textmarks=function(t,e){var i=this.addLabeledRow(t),o=e.name.value(),n=this.createColorPicker(),a=this.createColorPicker(),s=this.createFontEditor(),r=this.createFontSizeEditor(),p=$(''),h=$('');$("").append(o).appendTo(i),"rectangle"!==e.shape.value()&&$("").append(n).appendTo(i),$("").append(a).appendTo(i),$("").append(s).appendTo(i),$("").append(r).appendTo(i),$("").append(p).appendTo(i),$("").append(h).appendTo(i),this.bindControl(new c(n,e.color,!0,this.model(),"Change "+o+" color",e.transparency)),this.bindControl(new c(a,e.fontColor,!0,this.model(),"Change "+o+" text color",e.transparency)),this.bindControl(new l(r,e.fontSize,parseInt,!0,this.model(),"Change "+o+" font size")),this.bindControl(new l(s,e.fontFamily,null,!0,this.model(),"Change "+o+" font")),this.bindControl(new d(p,e.fontBold,!0,this.model(),"Change Text Font Bold")),this.bindControl(new d(h,e.fontItalic,!0,this.model(),"Change Text Font Italic"))},L._createRow_shapemarks=function(t,e){var i=this.addRow(t),o=$(""),n=e.name.value(),a=this.createColorPicker(),s=$("");s.attr("type","text"),s.addClass("ticker"),$("").append(o).appendTo(i),this.createLabeledCell(n,o).appendTo(i),$("").append(a).appendTo(i),this.createLabeledCell("Size",s).appendTo(i),$("").append(s).appendTo(i),this.bindControl(new d(o,e.visible,!0,this.model(),"Change "+n+" visibility")),this.bindControl(new c(a,e.color,!0,this.model(),"Change "+n+" back color",e.transparency)),this.bindControl(new y(s,e.size,null,!1,this.model(),"Change size"))},e.StudyStylesPropertyPage=L,e.StudyDisplayPropertyPage=x},qbxA:function(t,e,i){},"y1L/":function(t,e,i){}}]); \ No newline at end of file diff --git a/public/charting_library/bundles/ed68e83c16f77203e73dbc4c3a7c7fa1.cur b/public/charting_library/bundles/ed68e83c16f77203e73dbc4c3a7c7fa1.cur new file mode 100644 index 00000000..8b121388 Binary files /dev/null and b/public/charting_library/bundles/ed68e83c16f77203e73dbc4c3a7c7fa1.cur differ diff --git a/public/charting_library/bundles/editobjectdialog.151f705c3978181806a3.js b/public/charting_library/bundles/editobjectdialog.151f705c3978181806a3.js new file mode 100644 index 00000000..884795b5 --- /dev/null +++ b/public/charting_library/bundles/editobjectdialog.151f705c3978181806a3.js @@ -0,0 +1,5 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([["editobjectdialog"],{KFNk:function(t,e,i){},Kqsj:function(t,e,i){"use strict";(function(t){i("sZhh"),i("KFNk"),i("pay7"),i("ohga");var a=i("Ss5c").LineDataSource,o=i("GVHu").Study,r=i("qJq3").Series,n=i("fgLi").DataSource,s=i("FQhm"),l=i("bR4N").bindPopupMenu,p=i("QloM"),c=i("GAqT").TVOldDialogs,d=i("JWMC").trackEvent,u=i("CW80").isLineTool;function h(t,e,i){this._source=t,this._model=e,this._undoCheckpoint=i}i("PVgW"),h.prototype.hide=function(t){c.destroy(this._dialogTitle,{undoChanges:!!t})},h.prototype._onDestroy=function(t,e){var i=(e||{}).undoChanges;if($(window).unbind("keyup.hidePropertyDialog"),i){var a=this._undoCheckpoint?this._undoCheckpoint:this._undoCheckpointOnShow;a&&this._model.undoToCheckpoint(a)}else if(this._source.hasAlert&&this._source.hasAlert.value()){var o=this._source;setTimeout((function(){o.localAndServerAlertsMismatch&&o.synchronizeAlert(!0)}))}this._undoCheckpointOnShow&&delete this._undoCheckpointOnShow,window.lineToolPropertiesToolbar&&window.lineToolPropertiesToolbar.refresh()},h.prototype.isVisible=function(){return this._dialog&&this._dialog.is(":visible")},h.prototype.focusOnText=function(){this._dialog.find('input[type="text"]').focus().select()},h.prototype.switchTab=function(t,e){if(this._tabs){var i=null;if(t?t=t.valueOf():null===t&&(t=void 0),"string"==typeof t&&$.each(this._tabs,(function(e,a){if(a.name===t)return i=a,!1})),"object"==typeof t&&$.each(this._tabs,(function(e,a){if(t===a||$(a.labelObject).is(t)||$(a.wrapperObject).is(t))return i=a,!1})),i||(i=this._tabs[~~t]),!i)return!1;if($.each(this._tabs,(function(t,e){var a=e===i;$(e.wrapperObject)[a?"show":"hide"](),$(e.labelObject)[a?"addClass":"removeClass"]("active")})),e){var a=this.activeTabSettingsName();a&&TVSettings.setValue(a,i.name)}return this._dialog.height()+100>$(window).height()&&!i.isScrollable&&this.makeScrollable(i),$(":focus").blur(),!0}},h.prototype.makeScrollable=function(t){var e=t.wrapperObject,i=$(t.objects[0]),a=i.width();e.css({height:$(window).height()/1.4,overflow:"auto"}),i.css("width",a+20),t.isScrollable=!0},h.prototype.appendToTab=function(t,e,i,a,o,r){if(!$(t).is("table")||$(t).find("tr").size()){var n;this._tabs||(this._tabs=[]),$.each(this._tabs,(function(t,i){if(i.name===e)return n=t,!1})),void 0===n&&(this._tabs.push({name:e,localizedName:$.t(e),objects:$(),displayPriority:0,defaultOpen:0,isButton:!!o,callback:o?r||function(){}:null}),n=this._tabs.length-1);var s=this._tabs[n];s.objects=s.objects.add(t),s.displayPriority=Math.max(s.displayPriority||0,i||0),s.defaultOpen=Math.max(s.defaultOpen||0,a||0)}},h.prototype.insertTabs=function(){if(this._tabs){this._tabs.sort((function(t,e){return(e.displayPriority||0)-(t.displayPriority||0)}));var t=this,e=null,i=this.activeTabSettingsName();if(i)var a=TVSettings.getValue(i);$.each(this._tabs,(function(e,i){var a;i.isButton?((a=i).labelObject=$('').text(a.localizedName).appendTo(t._tabContainer), +a.labelObject.bind("click",a.callback)):o(i)})),this.switchTab(e)}function o(i){a&&a.toLowerCase()===i.name.toLowerCase()&&(i.defaultOpen=Math.max(~~i.defaultOpen,p.TabOpenFrom.UserSave)),(!e||~~e.defaultOpen<~~i.defaultOpen)&&(e=i),i.labelObject=$('').text(i.localizedName).appendTo(t._tabContainer),i.labelObject.on("mousedown",(function(e){var i=e.pageX,a=e.pageY,o=!1,r=this;function n(t){var e;o=o||(e=t,Math.abs(i-e.pageX)>5||Math.abs(a-e.pageY)>5)}$(r).on("mousemove",n),$(r).one("mouseup",(function(){o||t.switchTab(r,!0),$(r).off("mousemove",n)}))}));var o=$('
    ');i.wrapperObject=$().add(o),i.objects.each((function(t,e){var a=$(e);a.is("table")?(a.data("layout-separated")&&(i.wrapperObject=i.wrapperObject.add('
    ').add(o=$('
    ')),a.removeData("layout-separated")),o.append(a),a.children("tbody").each((function(t,a){if(0!==t&&$(a).data("layout-separated")){i.wrapperObject=i.wrapperObject.add('
    ').add(o=$('
    '));var r=$(e).clone(!0,!1).appendTo(o);r.children().remove(),r.append(a),$(a).removeData("layout-separated")}}))):o.append(a)})),i.wrapperObject.appendTo(t._container)}},h.prototype.activeTabSettingsName=function(){var t=this._source;if(t)return t instanceof r?"properties_dialog.active_tab.chart":t instanceof a?"properties_dialog.active_tab.drawing":t instanceof o?"properties_dialog.active_tab.study":void 0},h.prototype.show=function(e){if(t.enabled("property_pages")){var h=i("kSsA"),f=(e=e||{}).onWidget||!1,b=null;if(TradingView.isInherited(this._source.constructor,r)&&(b="series-properties-dialog",d("GUI","Series Properties")),TradingView.isInherited(this._source.constructor,o)){b="indicator-properties-dialog";var _=!this._source.isPine()||this._source.isStandardPine()?this._source.metaInfo().description:"Custom Pine";d("GUI","Study Properties",_)}if(u(this._source)&&(b="drawing-properties-dialog",d("GUI","Drawing Properties",this._source.name())),TradingView.isInherited(this._source.constructor,n)){var v=this;this._model.selectionMacro((function(t){t.addSourceToSelection(v._source)}))}var y=h.createInputsPropertyPage(this._source,this._model),g=h.createStylesPropertyPage(this._source,this._model),m=h.createVisibilitiesPropertyPage(this._source,this._model),T=h.createDisplayPropertyPage(this._source,this._model);if(y&&!y.widget().is(":empty")||g){v=this;var w,P,S=null!==y,C=this._source.title(),k=e.ownerDocument||this._model._chartWidget.widget().prop("ownerDocument"),D=c.createDialog(C,{hideTitle:!0,dragHandle:".properties-tabs",ownerDocument:k}).attr("data-dialog-type",b),O=D.find("._tv-dialog-content"),x=$('
    ').appendTo(O);if(this._tabs=[],this._dialog=D,this._dialogTitle=C,this._container=O,this._tabContainer=x,this._undoCheckpointOnShow=this._model.createUndoCheckpoint(),D.on("destroy",(function(t,e){e=e||{};y&&y.destroy(), +g&&g.destroy(),T&&T.destroy(),m&&m.destroy(),$("select",O).each((function(){$(this).selectbox("detach")})),v._onDestroy(t,e)})),this._model.readOnly()||!S||y.widget().is(":empty")||y.widget().each((function(t,e){var a=i("n3Kh"),o=y instanceof a,r=+$(e).data("layout-tab-priority");TradingView.isNaN(r)&&(r=o?p.TabPriority.Coordinates:p.TabPriority.Inputs);var n=~~$(e).data("layout-tab-open"),s=$(e).data("layout-tab");void 0===s&&(s=o?p.TabNames.coordinates:p.TabNames.inputs),v.appendToTab(e,s,r,n)})),g&&g.widget().each((function(t,e){var a=+$(e).data("layout-tab-priority");TradingView.isNaN(a)&&(a=p.TabPriority.Style);var o=~~$(e).data("layout-tab-open"),r=i("Yc1q");!o&&g instanceof r&&(o=p.TabOpenFrom.Default);var n=$(e).data("layout-tab");void 0===n&&(n=p.TabNames.style),v.appendToTab(e,n,a,o)})),T&&T.widget().each((function(t,e){var i=+$(e).data("layout-tab-priority");TradingView.isNaN(i)&&(i=p.TabPriority.Display);var a=~~$(e).data("layout-tab-open"),o=$(e).data("layout-tab");void 0===o&&(o=p.TabNames.properties),v.appendToTab(e,o,i,a)})),m&&m.widget().each((function(t,e){v.appendToTab(e,p.TabNames.visibility,p.TabPriority.Display,!1)})),this._source instanceof o&&!!this._source.metaInfo().pine)this._source.metaInfo();this.insertTabs(),this._helpItemRequired()&&this._createHelp();var I=110;$(".js-dialog").each((function(){var t=parseInt($(this).css("z-index"),10);t>I&&(I=t)})),D.css("z-index",I),w=$('
    ').appendTo(O),P=$('
    ').appendTo(w);if((!f||window.is_authenticated)&&g&&"function"==typeof g.createTemplateButton&&t.enabled("linetoolpropertieswidget_template_button"))v._templateButton=g.createTemplateButton({popupZIndex:I,defaultsCallback:e.onResetToDefault,loadTemplateCallback:function(){m&&m.loadData(),y&&y.loadData()}}).addClass("tv-left").appendTo(P);else if(TradingView.isInherited(this._source.constructor,o)){var j=[{title:$.t("Reset Settings"),action:e.onResetToDefault},{title:$.t("Save As Default"),action:function(){v._source.properties().saveDefaults()}}],N=$(''+$.t("Defaults")+'');N.on("click",(function(t){t.preventDefault();var e=$(this);e.is(".active")||e.trigger("button-popup",[j,!0])})).appendTo(P),l(N,null,{direction:"down",event:"button-popup",notCloseOnButtons:!0,zIndex:I})}else $(''+$.t("Defaults")+"").appendTo(P).click(e.onResetToDefault);$(''+$.t("OK")+"").appendTo(P).click((function(){v.hide()})),$(''+$.t("Cancel")+"").appendTo(P).on("click",(function(t){B(0,!0)})),D.find("._tv-dialog-title a").on("click",B),$(window).bind("keyup.hidePropertyDialog",(function(t){13===t.keyCode&&"textarea"!==t.target.tagName.toLowerCase()&&(v._templateButton&&v._templateButton.trigger("hide-popup"),v.hide())})),$("select",O).each((function(){var t=$(this),e="tv-select-container dialog" +;t.hasClass("tv-select-container-fontsize")&&(e+=" tv-select-container-fontsize"),t.selectbox({speed:100,classHolder:e})})),$('input[type="text"]',O).addClass("tv-text-input inset dialog"),$("input.ticker",O).TVTicker(),D.css("min-width","400px"),c.applyHandlers(D,e);var V={top:($(window).height()-D.height())/2,left:($(window).width()-D.width())/2};return c.positionDialog(D,V),window.lineToolPropertiesToolbar&&window.lineToolPropertiesToolbar.hide(),s.emit("edit_object_dialog",{objectType:this._source===this._model.mainSeries()?"mainSeries":this._source instanceof a?"drawing":this._source instanceof o?"study":"other",scriptTitle:this._source.title()}),D}}function B(t,e){v.hide(!!e)}},h.prototype._helpItemRequired=function(){return this._source._metaInfo&&!!this._source._metaInfo.helpURL},h.prototype._createHelp=function(){var t=$('');t.attr("href",this._source._metaInfo.helpURL),this._tabContainer.prepend(t)},h.prototype.dialogWidget=function(){return this._dialog},e.EditObjectDialog=h}).call(this,i("Kxc7"))},Yc1q:function(t,e,i){"use strict";var a=i("DxCR").PropertyPage;function o(t){function e(e,i,a){t.call(this,e,i,a),this._linetool=a}return inherit(e,t),e.prototype.applyTemplate=function(t){this.model().applyLineToolTemplate(this._linetool,t,"Apply Drawing Template"),this.loadData()},e}function r(t,e,i){a.call(this,t,e),this._linetool=i}inherit(r,a),(r=o(r)).createTemplatesPropertyPage=o,t.exports=r},kSsA:function(t,e,i){"use strict";e.createInputsPropertyPage=function(t,e){var i=t.getInputsPropertyPage();return null==i?null:new i(t.properties(),e,t)},e.createStylesPropertyPage=function(t,e){var i=t.getStylesPropertyPage();return null==i?null:new i(t.properties(),e,t)},e.createDisplayPropertyPage=function(t,e){var i=t.getDisplayPropertyPage();return null==i?null:new i(t.properties(),e,t)},e.createVisibilitiesPropertyPage=function(t,e){var i=t.getVisibilitiesPropertyPage();return null==i?null:new i(t.properties(),e,t)}},n3Kh:function(t,e,i){"use strict";var a=i("DxCR"),o=a.PropertyPage,r=a.GreateTransformer,n=a.LessTransformer,s=a.ToIntTransformer,l=a.SimpleStringBinder;function p(t,e,i){o.call(this,t,e),this._linetool=i,this.prepareLayout()}i("PVgW"),inherit(p,o),p.BarIndexPastLimit=-5e4,p.BarIndexFutureLimit=15e3,p.prototype.bindBarIndex=function(t,e,i,a){var o=[s(t.value()),r(p.BarIndexPastLimit),n(p.BarIndexFutureLimit)];this.bindControl(this.createStringBinder(e,t,o,!0,i,a))},p.prototype.createPriceEditor=function(t){var e=this._linetool,i=e.ownerSource().formatter(),a=function(t){var e=i.parse(t);if(e.res)return e.value},o=$("");if(o.TVTicker({step:i._minMove/i._priceScale||1,formatter:function(t){return i.format(t)},parser:a}),t){var r=[function(e){var i=a(e);return void 0===i?t.value():i}],n="Change "+e.title()+" point price",s=this.createStringBinder(o,t,r,!1,this.model(),n);s.addFormatter((function(t){return i.format(t)})),this.bindControl(s)}return o},p.prototype._createPointRow=function(t,e,i){ +var a=$("
    ");o.html($.t("Price")+i),o.appendTo(a);var r=$("");r.appendTo(a),this.createPriceEditor(e.price).appendTo(r);var n=$("");n.html($.t("Bar #")),n.appendTo(a);var s=$("");s.appendTo(a);var l=$("");return l.appendTo(s),l.addClass("ticker"),this.bindBarIndex(e.bar,l,this.model(),"Change "+this._linetool.title()+" point bar index"),a},p.prototype.prepareLayoutForTable=function(t){for(var e=this._linetool.points(),i=e.length,a=0;a1?" "+(a+1):"";this._createPointRow(o,r,n).appendTo(t)}}},p.prototype.prepareLayout=function(){this._table=$(document.createElement("table")),this._table.addClass("property-page"),this._table.attr("cellspacing","0"),this._table.attr("cellpadding","2"),this.prepareLayoutForTable(this._table),this.loadData()},p.prototype.widget=function(){return this._table},p.prototype.createStringBinder=function(t,e,i,a,o,r){return new l(t,e,i,a,o,r)},t.exports=p},ohga:function(t,e,i){}}]); \ No newline at end of file diff --git a/public/charting_library/bundles/ef184b625728ec530a7958618e0a3a86.png b/public/charting_library/bundles/ef184b625728ec530a7958618e0a3a86.png new file mode 100644 index 00000000..18a303fa Binary files /dev/null and b/public/charting_library/bundles/ef184b625728ec530a7958618e0a3a86.png differ diff --git a/public/charting_library/bundles/export-data.c92e77ec9e6422664b84.js b/public/charting_library/bundles/export-data.c92e77ec9e6422664b84.js new file mode 100644 index 00000000..fb8dee75 --- /dev/null +++ b/public/charting_library/bundles/export-data.c92e77ec9e6422664b84.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([["export-data"],{SIoL:function(e,t,i){"use strict";i.r(t),i.d(t,"exportData",(function(){return o}));i("YFKU");var n=i("Eyy1"),r=i("ZJKN"),s=i("k9/m"),l=i("23IT"),a={includeTime:!0,includeSeries:!0,includedStudies:"all"};function o(e,t){var i;void 0===t&&(t={});var l=Object.assign({},a,t),o={schema:[],data:[]},u=e.timeScale().points(),h=e.mainSeries(),p=function(e,t){var i=e.allStudies().filter((function(e){return e.showInObjectTree()}));if("all"===t)return i;return i.filter((function(e){return t.includes(e.id())}))}(e,l.includedStudies),v=function(e,t,i,l){for(var a=Object(n.ensureNotNull)(void 0!==i?e.indexOf(i,!0):e.firstIndex()),o=Object(n.ensureNotNull)(void 0!==l?e.indexOf(l,!0):e.lastIndex()),c=o,u=a,d=0,f=t;du&&(u=v.index)}return Object(n.assert)(c<=u,"Range must contain at least 1 time point"),new r.BarsRange(c,u)}(u,[h.bars()],l.from,l.to),w=v.firstBar(),m=v.lastBar();l.includeTime&&o.schema.push({type:"time"});var b=o.schema.length;l.includeSeries&&(o.schema.push(d("open")),o.schema.push(d("high")),o.schema.push(d("low")),o.schema.push(d("close")));for(var g=o.schema.length,O=[],P=0,x=p;P':"")+'
    '+f+'
    ',x=function(){function t(e){this._widget=document.createElement("div"),this._isVertical=!1,this._hiddingTimeoutId=null,this._visibility=new p.a(!1),this._windowResizeListener=this._onWindowResize.bind(this),this._reorderedDelegate=new d.a,this._responsiveResizeFunction=null,t._toolbars.push(this),this._options=e,this._widget=n()(C).get(0),this._content=this._widget.getElementsByClassName("js-content").item(0),this._setZIndex(t._startZIndex+t._toolbars.length-1),this._options.addClass&&(this._widget.className+=" "+this._options.addClass),this._options.layout&&"auto"!==this._options.layout&&(this._isVertical="vertical"===this._options.layout,this._updateLayoutType(),this._updateAxisOption())}return t.prototype.destroy=function(){this.hide(!0),t._toolbars.splice(t._toolbars.indexOf(this),1),document.body.contains(this._widget)&&document.body.removeChild(this._widget),this._widget.innerHTML="",this._responsiveResizeFunction=null},t.prototype.setResponsiveResizeFunc=function(t){this._responsiveResizeFunction=t},t.prototype.isVisible=function(){return this._visibility.value()},t.prototype.visibility=function(){return this._visibility.readonly()},t.prototype.isVertical=function(){return this._isVertical},t.prototype.show=function(){var t=this;this.isVisible()||(document.body.contains(this._widget)||(this._init(),document.body.appendChild(this._widget)),this._setHiddingTimeout(null),window.addEventListener("resize",this._windowResizeListener),this.raise(),this._visibility.setValue(!0),this._widget.classList.contains("i-hidden")?(this._widget.classList.remove("i-hidden"),setTimeout((function(){t.isVisible()&&t._widget.classList.remove("i-closed") +}))):this._widget.classList.remove("i-closed"),this._onWindowResize())},t.prototype.hide=function(t){var e=this;if(void 0===t&&(t=!1),this.isVisible()){var o=this._widget.classList.contains("i-closed");if(this._widget.classList.add("i-closed"),this._visibility.setValue(!1),t||o)this._setHiddingTimeout(null),this._widget.classList.add("i-hidden");else{var i=setTimeout((function(){e._setHiddingTimeout(null),e._widget.classList.add("i-hidden")}),this.hideDuration());this._setHiddingTimeout(i)}window.removeEventListener("resize",this._windowResizeListener)}},t.prototype.raise=function(){t._toolbars.length+t._startZIndex!==this._zIndex()&&(t._toolbars.splice(t._toolbars.indexOf(this),1),t._toolbars.push(this),t._updateAllZIndexes())},t.prototype.hideDuration=function(){return.75*s.dur},t.prototype.addWidget=function(t,e){void 0===e&&(e={});var o=this.widgetsCount();if(void 0===e.index&&(e.index=o),e.index<0||e.index>o)throw new Error("Index must be in [0, "+o+"]");var i=document.createElement("div");i.className="tv-floating-toolbar__widget js-widget",i.appendChild(t);var n=e.index===o?null:this._content.childNodes.item(e.index);this._content.insertBefore(i,n),this._onWindowResize()},t.prototype.removeWidget=function(t){var e=this._findWrapperForWidget(t);e&&(this._content.removeChild(e),this._onWindowResize())},t.prototype.widgetsCount=function(){return this._content.childNodes.length},t.prototype.showWidget=function(t){var e=this._findWrapperForWidget(t);e&&e.classList.remove("i-hidden")},t.prototype.hideWidget=function(t){var e=this._findWrapperForWidget(t);e&&e.classList.add("i-hidden")},t.prototype.removeWidgets=function(){for(;this._content.firstChild;)this._content.removeChild(this._content.firstChild);this._onWindowResize()},t.prototype.onWidgetsReordered=function(){return this._reorderedDelegate},t.prototype.onContextMenu=function(t){var e=this;Modernizr.mobiletouch?(new g).load().then((function(o){var i=new o(e._widget);i.get("press").set({time:500}),i.on("press",(function(o){e._preventWidgetTouchEndEvent(),t(o.srcEvent)}))})):this._widget.addEventListener("contextmenu",t)},t.prototype._determineCurrentLayoutVertical=function(t){var e=this._isVertical?t.height:t.width;return w()w()&&(t.left=Math.max(0,w()-e.width)),t.top+e.height>m()&&(t.top=Math.max(0,m()-e.height)),t.left=Math.max(0,t.left),t.top=Math.max(0,t.top)},t.prototype._setZIndex=function(t){this._widget.style.zIndex=String(t)},t.prototype._zIndex=function(){return Number(this._widget.style.zIndex)},t.prototype._loadPosition=function(){var t;if("device"===this._options.positionStorageType){var e=_.TVLocalStorage.getItem(this._options.positionSettingsKey);t=null!==e?JSON.parse(e):this._options.defaultPosition}else t=Object(a.getJSON)(this._options.positionSettingsKey,this._options.defaultPosition);this._widget.style.left=Math.round(t.left)+"px",this._widget.style.top=Math.round(t.top)+"px",this._onWindowResize()},t.prototype._savePosition=function(){var t=this._widget.getBoundingClientRect();if("device"===this._options.positionStorageType)try{_.TVLocalStorage.setItem(this._options.positionSettingsKey,JSON.stringify({left:t.left,top:t.top}))}catch(e){}else Object(a.setJSON)(this._options.positionSettingsKey,{left:t.left,top:t.top})},t.prototype._init=function(){this._loadPosition(),Object(u.lazyJqueryUI)(n()(this._widget)).draggable({containment:"window",drag:this._onDragEvent.bind(this),handle:".js-drag",stop:this._savePosition.bind(this)}),this._options.allowSortable&&this._initSortable(),this._widget.addEventListener(Modernizr.mobiletouch?"touchstart":"mousedown",this.raise.bind(this))},t.prototype._onDragEvent=function(t,e){this._correctPosition(e.position)},t.prototype._initSortable=function(){var t=this,e=-1;Object(u.lazyJqueryUI)(n()(this._content)).sortable({start:function(t,o){e=o.item.index()},stop:function(o,i){var n=i.item.index();e!==n&&t._reorderedDelegate.fire(e,n)},tolerance:"pointer",distance:5,containment:!!this._options.dragOnlyInsideToolbar&&"parent",scroll:!1,placeholder:"sortable-placeholder",forcePlaceholderSize:!0}),this._updateAxisOption()},t.prototype._getCorrectedWidgetRect=function(){var t=this._widget.getBoundingClientRect() +;if(this._widget.classList.contains("i-closed")){var e=t.width*(1/.925-1),o=t.height*(1/.925-1);return{bottom:t.bottom+o/2,height:t.height+o,left:t.left-e/2,right:t.right+e/2,top:t.top-o/2,width:t.width+e}}return t},t._updateAllZIndexes=function(){t._toolbars.forEach((function(e,o){e._setZIndex(t._startZIndex+o)}))},t._startZIndex=20,t._toolbars=[],t}()},"2JFs":function(t,e){t.exports=''},"9On3":function(t,e){t.exports=''},ADFN:function(t,e,o){},BiGZ:function(t,e){t.exports=''},BsMi:function(t,e){t.exports=''},HKvk:function(t,e){t.exports=''},Kjbl:function(t,e){t.exports=''},NDCK:function(t,e){t.exports=''},Nz7V:function(t,e){t.exports=''},PwLo:function(t,e,o){},RRhU:function(t,e){t.exports=''},RsxI:function(t,e){ +t.exports=''},TXAa:function(t,e,o){},WRHa:function(t,e){t.exports=''},XqDt:function(t,e){t.exports=''},dhuF:function(t,e){t.exports=''},eHtW:function(t,e){t.exports=''},"fUH/":function(t,e){t.exports=''},gPdB:function(t,e){ +t.exports=''},gmn6:function(t,e,o){"use strict";o.r(e),function(t){o.d(e,"FavoriteDrawingToolbar",(function(){return h}));var i=o("mrSG"),n=(o("P5fv"),o("nbsC"),o("EsMY"),o("YFKU"),o("0ZwQ")),r=o("b2d7"),s=o("7KDR"),a=o("5VQP"),l=o("mMWL"),d=o("MP+M"),c=o("Vdly"),p=o("hY0g"),u=o.n(p),h=(o("TXAa"),function(e){function o(t){var o=e.call(this,{allowSortable:!Modernizr.mobiletouch,dragOnlyInsideToolbar:!0,defaultPosition:t,positionSettingsKey:"chart.favoriteDrawingsPosition",positionStorageType:"device"})||this;return o._linetoolsWidgets={},o._canBeShownValue=new u.a(!1),o._attachHandlers(),o._loadVisibilityState(),o}return Object(i.__extends)(o,e),o.prototype.show=function(){this._canBeShownValue.value()&&(c.setValue("ChartFavoriteDrawingToolbarWidget.visible",!0),this.isVisible()||this._renderAllLinetools(),e.prototype.show.call(this))},o.prototype.hide=function(){c.setValue("ChartFavoriteDrawingToolbarWidget.visible",!1),e.prototype.hide.call(this)},o.prototype.canBeShown=function(){return this._canBeShownValue.readonly()},o.prototype._onFavoriteAdded=function(t){this._canBeShownValue.setValue(!0),this.addWidget(this._createLinetoolWidget(t)),this.show()},o.prototype._onFavoriteRemoved=function(t){this.removeWidget(this._linetoolsWidgets[t]),delete this._linetoolsWidgets[t],0===r.a.favoritesCount()&&(this._canBeShownValue.setValue(!1),this.hide())},o.prototype._onFavoriteMoved=function(){this._renderAllLinetools()},o.prototype._onSelectedLinetoolChanged=function(t){var e=this;Object.keys(this._linetoolsWidgets).forEach((function(o){e._linetoolsWidgets[o].classList.toggle("i-active",t===o)}))},o.prototype._createLinetoolWidget=function(e){var o=$(t.render('{{{icon}}}',{icon:d.a[e].icon,isActive:e===l.tool.value(),title:d.a[e].localizedName}))[0];return o.addEventListener("click",(function(t){t.preventDefault(),l.tool.value()!==e&&l.tool.setValue(e)})),this._linetoolsWidgets[e]=o,o},o.prototype._renderAllLinetools=function(){var t=this;this._linetoolsWidgets={},this.removeWidgets(),r.a.favorites().filter((function(t){return d.a[t]})).forEach((function(e){t.addWidget(t._createLinetoolWidget(e))}))},o.prototype._attachHandlers=function(){var t=this;r.a.favoriteAdded.subscribe(this,this._onFavoriteAdded),r.a.favoriteRemoved.subscribe(this,this._onFavoriteRemoved),r.a.favoriteMoved.subscribe(this,this._onFavoriteMoved),r.a.favoritesSynced.subscribe(null,(function(){t._loadVisibilityState(),t._renderAllLinetools()})), +this.onWidgetsReordered().subscribe(this,(function(e,o){if(r.a.favoriteMoved.unsubscribe(t,t._onFavoriteMoved),!r.a.moveFavorite(r.a.favorite(e),o))throw new Error("Something went wrong");r.a.favoriteMoved.subscribe(t,t._onFavoriteMoved)})),this.onContextMenu((function(e){e.preventDefault();var o=new s.Action({label:window.t("Hide Favorite Drawing Tools Toolbar"),onExecute:function(){t.hide()}});a.ContextMenuManager.createMenu([o]).then((function(t){t.show(e)}))})),l.tool.subscribe(this._onSelectedLinetoolChanged.bind(this))},o.prototype._loadVisibilityState=function(){var t=r.a.favoritesCount()>0;this._canBeShownValue.setValue(t),c.getBool("ChartFavoriteDrawingToolbarWidget.visible",!0)&&t?this.show():this.hide()},o}(n.a))}.call(this,o("nbsC"))},jAh7:function(t,e,o){"use strict";o.r(e),o.d(e,"OverlapManager",(function(){return r})),o.d(e,"getRootOverlapManager",(function(){return a}));var i=o("Eyy1"),n=function(){function t(){this._storage=[]}return t.prototype.add=function(t){this._storage.push(t)},t.prototype.remove=function(t){this._storage=this._storage.filter((function(e){return t!==e}))},t.prototype.has=function(t){return this._storage.includes(t)},t.prototype.getItems=function(){return this._storage},t}(),r=function(){function t(t){void 0===t&&(t=document),this._storage=new n,this._windows=new Map,this._index=0,this._document=t,this._container=t.createDocumentFragment()}return t.prototype.setContainer=function(t){var e=this._container,o=null===t?this._document.createDocumentFragment():t;!function(t,e){Array.from(t.childNodes).forEach((function(t){t.nodeType===Node.ELEMENT_NODE&&e.appendChild(t)}))}(e,o),this._container=o},t.prototype.registerWindow=function(t){this._storage.has(t)||this._storage.add(t)},t.prototype.ensureWindow=function(t,e){void 0===e&&(e={position:"fixed",direction:"normal"});var o=this._windows.get(t);if(void 0!==o)return o;this.registerWindow(t);var i=this._document.createElement("div");if(i.style.position=e.position,i.style.zIndex=this._index.toString(),i.dataset.id=t,void 0!==e.index){var n=this._container.childNodes.length;if(e.index>=n)this._container.appendChild(i);else if(e.index<=0)this._container.insertBefore(i,this._container.firstChild);else{var r=this._container.childNodes[e.index];this._container.insertBefore(i,r)}}else"reverse"===e.direction?this._container.insertBefore(i,this._container.firstChild):this._container.appendChild(i);return this._windows.set(t,i),++this._index,i},t.prototype.unregisterWindow=function(t){this._storage.remove(t);var e=this._windows.get(t);void 0!==e&&(null!==e.parentElement&&e.parentElement.removeChild(e),this._windows.delete(t))},t.prototype.getZindex=function(t){var e=this.ensureWindow(t);return parseInt(e.style.zIndex||"0")},t.prototype.moveToTop=function(t){this.getZindex(t)!==this._index&&(this.ensureWindow(t).style.zIndex=(++this._index).toString())},t.prototype.removeWindow=function(t){this.unregisterWindow(t)},t}(),s=new WeakMap;function a(t){void 0===t&&(t=document);var e=t.getElementById("overlap-manager-root") +;if(null!==e)return Object(i.ensureDefined)(s.get(e));var o=new r(t),n=function(t){var e=t.createElement("div");return e.style.position="absolute",e.style.zIndex=150..toString(),e.style.top="0px",e.style.left="0px",e.id="overlap-manager-root",e}(t);return s.set(n,o),o.setContainer(n),t.body.appendChild(n),o}},"m/4m":function(t,e,o){},my99:function(t,e,o){"use strict";o.r(e),o.d(e,"GroupButtonFloatingToolbar",(function(){return l}));var i=o("mrSG"),n=o("Eyy1"),r=o("0ZwQ"),s=o("aIyQ"),a=o.n(s),l=(o("m/4m"),o("ADFN"),function(t){function e(o){var i=t.call(this,e._prepareOptions(o))||this;return i._onWidgetStateChangedDelegate=new a.a,i._statedWidgets=[],i._currentPopup=null,i._onWindowClickedListener=i._onWindowClicked.bind(i),i}return Object(i.__extends)(e,t),e.prototype.show=function(){t.prototype.show.call(this),document.addEventListener("mousedown",this._onWindowClickedListener)},e.prototype.hide=function(){t.prototype.hide.call(this),document.removeEventListener("mousedown",this._onWindowClickedListener)},e.prototype.destroy=function(){this._closePopup(),t.prototype.destroy.call(this)},e.prototype.addGroupedWidget=function(t,o){void 0===o&&(o={}),Object(n.assert)(t.states.length>0&&-1!==e._getStateIndexById(t,t.currentStateId),"Argument is invalid (count: "+t.states.length+", state: "+t.currentStateId+")");var i=document.createElement("div");i.className="tv-grouped-floating-toolbar__widget-wrapper apply-common-tooltip",t.widgetAddClass&&i.classList.add(t.widgetAddClass),i.setAttribute("title",t.tooltip);var r={isEnabled:!0,statedWidget:t,toolbarWidget:i},s=this._onWidgetClicked.bind(this,r);r.clickListener=s,i.addEventListener("click",s),this._updateWidgetPreview(r),this.addWidget(i,o),this._statedWidgets.push(r)},e.prototype.findGroupedWidget=function(t){for(var e=this._statedWidgets.length,o=0;owindow.innerWidth-e.right?r.classList.add("tv-grouped-floating-toolbar__popup--at-left"):r.classList.remove("tv-grouped-floating-toolbar__popup--at-left");else{r.classList.remove("tv-grouped-floating-toolbar__popup--at-left");var s=0;i.left+n.width>window.innerWidth?e.left+n.width>window.innerWidth&&(s=e.width-n.width):s=i.left-e.left+1,r.style.left=s+"px",e.bottom+n.height>window.innerHeight?r.classList.add("tv-grouped-floating-toolbar__popup--at-top"):(r.classList.remove("tv-grouped-floating-toolbar__popup--at-top"),r.style.top="")}}},e.prototype._isPopupCreatedForWidget=function(t){return Boolean(this._currentPopup&&this._currentPopup.stateWidgetId===t)},e.prototype._createSubWidget=function(t,e){var o=document.createElement("div");return o.className+="tv-grouped-floating-toolbar__sub-widget",t.statedWidget.stateWidgetAddClass&&o.classList.add(t.statedWidget.stateWidgetAddClass),o.appendChild(e.widget),o},e.prototype._onSubWidgetClicked=function(t,e){this._closePopup(),t.statedWidget.currentStateId!==e&&(this.setGroupedWidgetState(t.statedWidget.id,e),this._onWidgetStateChangedDelegate.fire(t.statedWidget.id,e))},e.prototype._onWindowClicked=function(t){if(this.isVisible()&&this._currentPopup&&!e._isEventInElement(t,this._currentPopup.element)){for(var o=0;o'},nApS:function(t,e){t.exports=''},nSyy:function(t,e,o){},noRL:function(t,e){t.exports=''},tPkB:function(t,e,o){"use strict" +;(function(e,i){var n=o("ogJP").notNull,r=o("DxCR"),s=r.PropertyPage,a=r.ColorBinding,l=o("mMWL"),d=o("bR4N").bindPopupMenu,c=o("Ocx9").DefaultProperty,p=o("my99").GroupButtonFloatingToolbar,u=o("a7Ha").LineEnd,h=o("VNzU").isMultipleLayout,g=o("yMne"),v=o("CW80"),_=v.createLineToolProperties,f=v.isLineTool,y=o("JWMC").trackEvent,b=o("ytGH").MultipleLineWidthsProperty;function w(t){this._chartWidgetCollection=t,this._bindings=[],this._hasAlertWathcedValue=null,this._$templatesButton=null,this._currentProperties=null,this._toolbarWidgets=[],this._clearPropertiesOnHideTimeoutId=null,this._init(),this.attachHandlers()}function m(t,e){t.push({id:e,widget:$('
    '+e+"
    ")[0]})}function C(t,e){t.push({id:e.value,widget:$(e.iconSvgCode)[0],readonly:e.readonly})}function x(t){return function(t,e){return $("
    ").addClass("tv-linetool-properties-toolbar__icon").addClass(e).append(t)[0]}(t,"tv-linetool-properties-toolbar__icon--line-props")}o("m/4m"),o("nSyy"),w.prototype.activeChartWidget=function(){return this._chartWidgetCollection.activeChartWidget.value()},w.prototype.selectedSources=function(){return this._chartWidgetCollection.selectedSources.value()},w.prototype._init=function(){this._floatingToolbar=new p({addClass:"tv-linetool-properties-toolbar",defaultPosition:{top:g.HEADER_TOOLBAR_HEIGHT_EXPANDED+15,left:window.innerWidth/2},positionSettingsKey:"properties_toolbar.position",positionStorageType:"server"}),this._floatingToolbar.onWidgetStateChanged().subscribe(this,this._onPropertyChangedInToolbar),this._sourceActions=this._createSourceActions(),this._sourceActions.forEach((function(t){this._floatingToolbar.addWidget(t.button)}),this)},w.prototype._bindPopupMenuDirection=function(){return this._floatingToolbar.isVertical()?"right":"down"},w.prototype._onPropertyChangedInToolbar=function(t,e){if(("linewidth"===t||t.endsWith(".linewidth"))&&this._lineWidthsProperty){var o=this.activeChartWidget().model(),i=1===this.selectedSources().length?window.t("Set line tool width"):window.t("Set line tool widths");return o.beginUndoMacro(i),this._lineWidthsProperty.setValue(e,{applyValue:function(t,e){o.setProperty(t,e)}}),void o.endUndoMacro()}this._currentProperties&&this.activeChartWidget().model().setProperty(this._currentProperties[t],e)},w.prototype._onPropertyChanged=function(t,e){"linewidth"===t&&e!==this._lineWidthsProperty||this._floatingToolbar.setGroupedWidgetState(t,e.value())},w.prototype._hideAllSourceActions=function(){this._sourceActions.forEach((function(t){this._floatingToolbar.hideWidget(t.button)}),this),this._sourceActionsVisible=!1},w.prototype._updateSourceActionsVisibility=function(t){this._sourceActionsVisible=!1,this._sourceActions.forEach((function(e){!e.isVisibleForSources||e.isVisibleForSources(t)?(this._floatingToolbar.showWidget(e.button),this._sourceActionsVisible=!0):this._floatingToolbar.hideWidget(e.button)}),this)},w.prototype.attachHandlers=function(){l.tool.subscribe(this.onToolChanged.bind(this),{callWithLast:!0}), +this._chartWidgetCollection.selectedSources.subscribe(this.onSourceChanged.bind(this)),this._chartWidgetCollection.layout.subscribe(this._updateCloneButtonTitle.bind(this))},w.prototype._updateCloneButtonTitle=function(){this._setButtonTitle(this._cloneButton,this._cloneButtonTitle())},w.prototype.onToolChanged=function(t,e){if(t&&-1!==t.toLowerCase().indexOf("linetool")){e=e instanceof c?e:_(t);this._hideAllSourceActions(),this.showPropertiesOf(t,e),this.showTemplatesOf({tool:t,properties:e}),this._updateVisibility()}else this.selectedSources()?this.onSourceChanged(this.selectedSources()):this.hide()},w.prototype.findSourceOnWidget=function(t){for(var e=0;e0}},{button:this._createLockButton()},{button:this._createHideButton()},{button:this._createRemoveButton()}),t},w.prototype._getCloneActions=function(){var t=this.activeChartWidget().model(),e=this.selectedSources(),o=[],i=e.filter((function(t){return t.cloneable()}));i.length>0&&o.push({name:"clone",title:window.t("Clone"),action:function(){t.cloneLineTools(i)}});var n=e.filter((function(t){return t.copiable()}));return n.length>0&&o.push({name:"copy",title:window.t("Copy"),shortcut:"Ctrl-C",action:function(){t.copySourcesToClip(n)}}),this._isSyncOperationAvailable()?(e.filter((function(t){return!!t.linkKey})).length?o.push({name:"stop-sync",title:$.t("Stop syncing"),action:function(){t.unlinkLines(e)}}):o.push({name:"sync",title:$.t("Sync to all charts"),action:function(){t.copyToOtherCharts(e)}}),o):o},w.prototype._getZOrderActions=function(){var t=[],e=this.selectedSources(),o=this.activeChartWidget().model(),i={name:"bring-to-front",title:$.t("Bring to Front"),action:function(){o.bringToFront(e)}},n={name:"send-to-back",title:$.t("Send to Back"),action:function(){o.sendToBack(e)}},r={name:"bring-forward",title:$.t("Bring Forward"),action:function(){o.bringForward(e)}},s={name:"send-backward",title:$.t("Send Backward"),action:function(){o.sendBackward(e)}},a=o.paneForSource(e[0]).getZOrderMinMax();return 1===e.length&&e[0].zorder()===a.minZOrder&&(n.disabled=!0,s.disabled=!0),1===e.length&&e[0].zorder()===a.maxZOrder&&(r.disabled=!0,i.disabled=!0),t.push(i,n,r,s),t},w.prototype._getPossibleProperty=function(t){for(var e=[],o=this._defaultToolProperties(),i=0;i=0;--n){for(var r=o[n],s=e,a=r.name.split("."),l=0;l'},wLZl:function(t,e){t.exports=''},yB98:function(t,e){t.exports=''},znEV:function(t,e){t.exports=''}}]); \ No newline at end of file diff --git a/public/charting_library/bundles/full-tooltips-popup.e9a401fa31f761dfda41.js b/public/charting_library/bundles/full-tooltips-popup.e9a401fa31f761dfda41.js new file mode 100644 index 00000000..625ac4fe --- /dev/null +++ b/public/charting_library/bundles/full-tooltips-popup.e9a401fa31f761dfda41.js @@ -0,0 +1,4 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([["full-tooltips-popup"],{"/KDZ":function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var o=n("mrSG"),r=n("q1tI"),i=function(e){function t(t){var n=e.call(this,t)||this;return n._handleChange=function(){n.forceUpdate()},n.state={query:window.matchMedia(n.props.rule)},n}return Object(o.__extends)(t,e),t.prototype.componentDidMount=function(){this._subscribe(this.state.query)},t.prototype.componentDidUpdate=function(e,t){this.state.query!==t.query&&(this._unsubscribe(t.query),this._subscribe(this.state.query))},t.prototype.componentWillUnmount=function(){this._unsubscribe(this.state.query)},t.prototype.render=function(){return this.props.children(this.state.query.matches)},t.getDerivedStateFromProps=function(e,t){return e.rule!==t.query.media?{query:window.matchMedia(e.rule)}:null},t.prototype._subscribe=function(e){e.addListener(this._handleChange)},t.prototype._unsubscribe=function(e){e.removeListener(this._handleChange)},t}(r.PureComponent)},"9dlw":function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var o=n("mrSG"),r=n("q1tI"),i=n.n(r),a=n("i8i4"),c=n.n(a),s=(n("EsMY"),n("AiMB")),u=n("DTHj"),l=n("X0gx"),d=n("8Rai");function f(e){var t=e.controller,n=e.children,a=e.isOpened,f=e.closeOnClickOutside,p=void 0===f||f,v=e.doNotCloseOn,m=e.onClickOutside,h=e.onClose,b=Object(o.__rest)(e,["controller","children","isOpened","closeOnClickOutside","doNotCloseOn","onClickOutside","onClose"]),w=Object(r.useContext)(l.a),g=Object(d.a)({handler:function(e){m&&m(e);if(!p)return;if(v&&e.target instanceof Node){var t=c.a.findDOMNode(v);if(t instanceof Node&&t.contains(e.target))return}h()},mouseDown:!0,touchStart:!0});return a?i.a.createElement(s.a,{top:"0",left:"0",right:"0",bottom:"0",pointerEvents:"none"},i.a.createElement("span",{ref:g,style:{pointerEvents:"auto"}},i.a.createElement(u.a,Object(o.__assign)({},b,{isOpened:a,onClose:h,onScroll:function(t){var n=e.onScroll;n&&n(t);t.stopPropagation()},customCloseDelegate:w,ref:t}),n))):null}},Iivm:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n("mrSG").__exportStar(n("swCq"),t)},Sn4D:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n("q1tI"),r=n.n(o),i=n("Eyy1"),a=n("TSYQ"),c=n("x0D+"),s=n("Nkvk"),u=n("AiMB"),l=n("mkWe"),d=n("qFKp"),f=n("X0gx"),p=n("sHQ4");function v(e){var t=e.position,n=e.onClose,v=e.children,m=e.className,h=Object(i.ensureNotNull)(Object(o.useContext)(l.a)),b=Object(o.useState)(0),w=b[0],g=b[1],y=Object(o.useRef)(null),E=Object(o.useContext)(f.a);return Object(o.useEffect)((function(){var e;return null===(e=y.current)||void 0===e||e.focus({preventScroll:!0}),E.subscribe(h,n),Object(s.setFixedBodyState)(!0),d.CheckMobile.iOS()&&Object(c.disableBodyScroll)(Object(i.ensureNotNull)(y.current)),g(h.addDrawer()),function(){E.unsubscribe(h,n);var e=h.removeDrawer();d.CheckMobile.iOS()&&Object(c.enableBodyScroll)(Object(i.ensureNotNull)(y.current)),0===e&&Object(s.setFixedBodyState)(!1)}}),[]),r.a.createElement(u.a,null,r.a.createElement("div",{ +className:a(p.wrap,p["position"+t])},w===h.currentDrawer&&r.a.createElement("div",{className:p.backdrop,onClick:n}),r.a.createElement("div",{className:a(p.drawer,p["position"+t],m),ref:function(e){y.current=e},tabIndex:-1,onScroll:function(e){e.stopPropagation()}},v)))}},mkWe:function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return c}));var o=n("mrSG"),r=n("q1tI"),i=n.n(r),a=function(e){function t(t){var n=e.call(this,t)||this;return n._addDrawer=function(){var e=n.state.currentDrawer+1;return n.setState({currentDrawer:e}),e},n._removeDrawer=function(){var e=n.state.currentDrawer-1;return n.setState({currentDrawer:e}),e},n.state={currentDrawer:0},n}return Object(o.__extends)(t,e),t.prototype.render=function(){return i.a.createElement(c.Provider,{value:{addDrawer:this._addDrawer,removeDrawer:this._removeDrawer,currentDrawer:this.state.currentDrawer}},this.props.children)},t}(i.a.PureComponent),c=i.a.createContext(null)},my4O:function(e,t,n){e.exports={"css-value-small-size":"18px","css-value-border-radius-small-size":"9px","css-value-large-size":"22px","css-value-border-radius-large-size":"11px",popupWidget:"popupWidget-2X0DYakn",desc:"desc-btEANXbj",icon:"icon-2jQlAvgr",small:"small-3UTqSQwC",large:"large-2BZlk4pO",title:"title-1Yt34zFi",text:"text-Md3DtcCM",action:"action-6Ezy2_v3"}},sHQ4:function(e,t,n){e.exports={wrap:"wrap-3vvdSnDX",backdrop:"backdrop-1knaw_yl",positionBottom:"positionBottom-3zJf6Byh",drawer:"drawer-1_nJUEiM",positionLeft:"positionLeft-2wxVhi9G"}},swCq:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Icon=void 0;var o=n("mrSG"),r=n("q1tI");t.Icon=r.forwardRef((function(e,t){var n=e.icon,i=void 0===n?"":n,a=o.__rest(e,["icon"]);return r.createElement("span",o.__assign({},a,{ref:t,dangerouslySetInnerHTML:{__html:i}}))}))},"vR7+":function(e,t,n){"use strict";n.r(t);var o=n("mrSG"),r=n("q1tI"),i=n.n(r),a=n("i8i4"),c=(n("YFKU"),n("9dlw")),s=n("/KDZ"),u=n("Sn4D"),l=n("mkWe"),d=n("e3/o"),f=n("TSYQ"),p=n("Iivm"),v=n("vqb8"),m=n("my4O"),h=new WeakMap;function b(e){var t=Object(v.a)({watchedValue:e.info});if(null===t)return null;var n=t.map((function(t){var n=t.title,o=t.titleColor,r=t.icon,a=t.iconClassName,c=t.html,s=t.action,u=t.size;h.has(t)||h.set(t,Object(d.randomHash)());return i.a.createElement("div",{key:h.get(t),className:m.popupWidget},i.a.createElement(p.Icon,{className:f(m.icon,a,m[u]),icon:r||void 0}),i.a.createElement("div",{className:m.desc},i.a.createElement("span",{style:{color:o||void 0},className:f(m.title,m[u])},n),c&&i.a.createElement("p",{className:f(m.text,m[u]),dangerouslySetInnerHTML:{__html:c.join(" ")}}),s&&i.a.createElement("span",{className:f(s.tooltip&&"apply-common-tooltip",m.action,m[u]),onClick:function(){e.onClose(),null==s||s.onClick()},title:s.tooltip},s.text)))}));return i.a.createElement(i.a.Fragment,null,n)}var w=new WeakMap;function g(e){var t=e.statusWidgetInfos.filter((function(e){return e.visible.value()})).map((function(t){return w.has(t)||w.set(t,Object(d.randomHash)()),i.a.createElement(b,{ +key:w.get(t),info:t.model.fullInfo(),onClose:e.onClose})}));return i.a.createElement(l.b,null,i.a.createElement(s.a,{rule:"screen and (max-width: 419px)"},(function(n){return n?i.a.createElement(u.a,{onClose:e.onClose,position:"Bottom"},t):i.a.createElement(c.a,{isOpened:!0,onClose:e.onClose,position:e.position,doNotCloseOn:e.rendererButton},t)})))}function y(e,t,n,i,c,s){var u={rendererButton:n,position:s,statusWidgetInfos:i,onClose:c};e?a.render(r.createElement(g,Object(o.__assign)({},u)),t):a.unmountComponentAtNode(t)}n.d(t,"render",(function(){return y}))},vqb8:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var o=n("q1tI"),r=function(e){var t="watchedValue"in e?e.watchedValue:void 0,n="defaultValue"in e?e.defaultValue:e.watchedValue.value(),r=Object(o.useState)(t?t.value():n),i=r[0],a=r[1];return Object(o.useEffect)((function(){if(t){a(t.value());var e=function(e){return a(e)};return t.subscribe(e),function(){return t.unsubscribe(e)}}return function(){}}),[t]),i}},"x0D+":function(e,t,n){var o,r,i;r=[t],void 0===(i="function"==typeof(o=function(e){"use strict";function t(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t'},"2x13":function(e,t,n){e.exports={wrapper:"wrapper-1S1BAxTC",container:"container-2mBp3oqG",tab:"tab-1EqAs-Lb",active:"active-3u5zV0YP",title:"title-1SrCEkqk",icon:"icon-2RKetbyG",titleText:"titleText-QNKMAlbN",nested:"nested-H6CeL6Wc",isTablet:"isTablet-2Pl3hVJ9",isMobile:"isMobile-2OnSZ08h"}},An2S:function(e,t,n){"use strict";n.d(t,"a",(function(){return d})),n.d(t,"c",(function(){return p})),n.d(t,"b",(function(){return h}));var o=n("mrSG"),i=n("q1tI"),a=n.n(i),l=n("TSYQ"),r=n.n(l),s=n("Iivm"),c=n("++0f"),m=n("2x13");function u(e){return{isMobile:"mobile"===e,isTablet:"tablet"===e}}function d(e){var t=e.mode,n=e.className,i=Object(o.__rest)(e,["mode","className"]),l=u(t),s=l.isMobile,c=l.isTablet,d=r()(m.container,c&&m.isTablet,s&&m.isMobile,n);return a.a.createElement("div",Object(o.__assign)({},i,{className:d,"data-role":"dialog-sidebar"}))}function p(e){return a.a.createElement("div",Object(o.__assign)({className:m.wrapper},e))}function h(e){var t=e.mode,n=e.title,i=e.icon,l=e.isActive,d=e.onClick,p=Object(o.__rest)(e,["mode","title","icon","isActive","onClick"]),h=u(t),b=h.isMobile,f=h.isTablet;return a.a.createElement("div",Object(o.__assign)({},p,{className:r()(m.tab,f&&m.isTablet,b&&m.isMobile,l&&m.active),onClick:d}),a.a.createElement(s.Icon,{className:m.icon,icon:i}),!f&&a.a.createElement("span",{className:m.title},a.a.createElement("span",{className:m.titleText},n),b&&a.a.createElement(s.Icon,{className:m.nested,icon:c})))}},Iivm:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n("mrSG").__exportStar(n("swCq"),t)},PI1I:function(e,t,n){"use strict";n.r(t);n("YFKU");var o=n("q1tI"),i=n("i8i4"),a=n("mrSG"),l=n("mwqF"),r=n("Iivm"),s=n("bvfV"),c=n("ycFu"),m=n("ybVX"),u=n("Q+1u"),d=n("Vdly"),p=n.n(d),h=n("VNzU"),b=n("/KDZ"),f=(n("bSeV"),n("H172")),_=n("N5tr"),y=n("KKsp"),v=n("EsvI"),g=(n("HbRj"),n("CLNU")),C=n("oNDq"),T=window.t("Do you really want to delete Color Theme '{0}' ?");var S=n("+EG+"),A=(n("EsMY"),n("i/MG")),k=n("JWMC"),w=n("8d0Q"),P=n("utEQ");function E(e){var t=e.themeName,n=e.chartWidgetCollection,i=e.onRemove,l=e.manager,r=Object(w.b)(),s=r[0],c=r[1],m=o.useCallback((function(){return function(e,t,n){if(window.is_authenticated){var o=Object(g.clean)(T.format(e));Object(C.createConfirmDialog)({type:"modal",content:o,manager:n||void 0}).then((function(n){n.on("action:yes",(function(n){Object(v.removeTheme)(e),t&&t(e),n.close()})),n.open()}))}}(t,i,l)}),[t,i,l]),u=o.useCallback((function(){Object(v.loadTheme)(t,!1,!1,n).then((function(){window.saver.saveChartSilently(),Object(k.trackEvent)("GUI","Switch to custom theme")}))}),[t,n]);return o.createElement("div",Object(a.__assign)({},c),o.createElement(_.b,{className:P.defaultsButtonItem,isActive:!1,label:t,onClick:u, +toolbox:o.createElement(A.a,{hidden:!Modernizr.mobiletouch&&!s,onClick:m})}))}var I=n("HWhk"),B=window.t("Template"),x=window.t("Apply Defaults"),M=(window.t("Save As..."),window.t("Apply to all")),N=function(e){function t(t){var n=e.call(this,t)||this;return n._manager=null,n._handleApplyDefaults=function(){var e=n.props,t=e.model,o=e.chartWidgetCollection;t.restorePreferences();var i=Object(v.getCurrentTheme)().name;Object(v.loadTheme)(i,!0,!0,o,void 0,void 0,!0)},n._handleSaveAs=function(){},n._handleRemoveTheme=function(e){n.setState({themes:n.state.themes.filter((function(t){return t!==e}))})},n._syncThemeList=function(){0},n._defaultDropdownItems=[{value:"apply",readonly:!0,content:o.createElement(_.b,{className:P.defaultsButtonItem,isActive:!1,label:x,onClick:n._handleApplyDefaults})}],n._applyToAllDropdownItem={value:"apply_to_all",readonly:!0,content:o.createElement(_.b,{className:P.defaultsButtonItem,isActive:!1,label:M,onClick:t.applyToAllCallback})},n.state={themes:[]},n._syncThemeList(),n}return Object(a.__extends)(t,e),t.prototype.render=function(){var e=this;return o.createElement(S.b.Consumer,null,(function(t){return e._manager=t,o.createElement(b.a,{rule:"screen and (max-width: 768px)"},(function(t){return o.createElement(f.a,{className:!t&&P.themesButtonText,items:e._getThemeItems(t),hideArrowButton:t,value:"defaults","data-name":"theme-select"})}))}))},t.prototype._getThemeItems=function(e){var t=this,n=this.props,i=n.isApplyToAllVisible,l=n.chartWidgetCollection,r=e&&i?Object(a.__spreadArrays)([this._applyToAllDropdownItem,this._getPlaceHolderItem(e)],this._defaultDropdownItems):Object(a.__spreadArrays)([this._getPlaceHolderItem(e)],this._defaultDropdownItems),s=this.state.themes;if(!s.length)return r;var c=s.map((function(e){return{value:e,readonly:!0,content:o.createElement(E,{themeName:e,onRemove:t._handleRemoveTheme,chartWidgetCollection:l,manager:t._manager})}}));return c.unshift({readonly:!0,content:o.createElement(y.a,null)}),r.concat(c)},t.prototype._getPlaceHolderItem=function(e){return{value:"defaults",readonly:!0,content:"",selectedContent:e?o.createElement(r.Icon,{className:P.themesButtonIcon,icon:I}):B}},t}(o.PureComponent),O=n("tWVy"),V=n("yqnI"),z=n("uhCe"),j=n("An2S"),D=n("tmL0"),L={areaSymbolMinTick:"normal",areaSymbolTimezone:"normal",barSymbolMinTick:"normal",barSymbolTimezone:"normal",baselineSymbolMinTick:"normal",baselineSymbolTimezone:"normal",candleSymbolMinTick:"normal",candleSymbolTimezone:"normal",dateFormat:"normal",haSymbolMinTick:"normal",haSymbolTimezone:"normal",hiloSymbolMinTick:"normal",hiloSymbolTimezone:"normal",hollowCandleSymbolMinTick:"normal",hollowCandleSymbolTimezone:"normal",kagiAtrLength:"normal",kagiReversalAmount:"normal",kagiStyle:"normal",kagiSymbolMinTick:"normal",kagiSymbolTimezone:"normal",lineSymbolMinTick:"normal",lineSymbolTimezone:"normal",lockScale:"normal",mainSeriesSymbolAreaPriceSource:"normal",mainSeriesSymbolBaseLevelPercentage:"normal",mainSeriesSymbolBaseLinePriceSource:"normal",mainSeriesSymbolLinePriceSource:"normal", +mainSeriesSymbolStyleType:"normal",navButtons:"big",paneButtons:"big",pbLb:"normal",pbSymbolMinTick:"normal",pbSymbolTimezone:"normal",pnfAtrLength:"normal",pnfBoxSize:"normal",pnfReversalAmount:"normal",pnfSources:"normal",pnfStyle:"normal",pnfSymbolMinTick:"normal",pnfSymbolTimezone:"normal",rangeSymbolMinTick:"normal",rangeSymbolTimezone:"normal",renkoAtrLength:"normal",renkoBoxSize:"normal",renkoStyle:"normal",renkoSymbolMinTick:"normal",renkoSymbolTimezone:"normal",scalesPlacement:"normal",symbolLastValueLabel:"big",symbolTextSource:"normal"},W=n("U0JK"),q=n("sXZi"),R=function(e){function t(t){var n=e.call(this,t)||this;n._renderChildren=function(e){var t=e.requestResize,i=e.isSmallWidth;return n._requestResize=t,o.createElement("div",{className:q.content},n._renderTabs(i),n._renderTabContent(i))},n._renderApplyToAllButton=function(){return o.createElement(b.a,{rule:z.a.TabletNormal},(function(e){return n._renderApplyToAll(e)}))},n._renderFooterLeft=function(){var e=n.props,t=e.model,i=e.chartWidgetCollection,a=n.state.isApplyToAllVisible;return o.createElement(N,{model:t,isApplyToAllVisible:a,applyToAllCallback:n._handleApplyToAll,chartWidgetCollection:i})},n._createTabClickHandler=function(e){return function(){return n._selectPage(e)}},n._selectPage=function(e){var t=n.state.activePage;e!==t&&(t&&t.definitions.unsubscribe(n._onChangeActivePageDefinitions),p.a.setValue("properties_dialog.last_page_id",e.id),e.definitions.subscribe(n._onChangeActivePageDefinitions),n.setState({activePage:e,tableKey:Date.now()},(function(){n._requestResize&&n._requestResize()})))},n._onChangeActivePageDefinitions=function(){V.a.logNormal("Definition collection was updated"),n.setState({tableKey:Date.now()},(function(){n._requestResize&&n._requestResize()}))},n._handleCancel=function(){n.props.onCancel(),n.props.onClose()},n._handleSubmit=function(){n.props.onSubmit(),n.props.onClose()},n._handleScroll=function(){O.a.fire()},n._handleApplyToAll=function(){var e=n.props,t=e.chartWidgetCollection,o=e.model;n.state.isApplyToAllVisible&&t.applyPreferencesToAllCharts(o)},n._syncApplyToAllVisibility=function(){var e=n.props.chartWidgetCollection;n.setState({isApplyToAllVisible:Object(h.isMultipleLayout)(e.layout.value())})},n._handleBackClick=function(){var e=n.state.activePage;e&&e.definitions.unsubscribe(n._onChangeActivePageDefinitions),n.setState({activePage:null})};var i=t.pages,a=t.activePageId,l=i.find((function(e){return e.id===a}));if(!l){var r=p.a.getValue("properties_dialog.last_page_id"),s=i.find((function(e){return e.id===r}));l=s||i[0]}return n.state={activePage:l,isApplyToAllVisible:Object(h.isMultipleLayout)(t.chartWidgetCollection.layout.value()),tableKey:Date.now()},n}return Object(a.__extends)(t,e),t.prototype.componentDidMount=function(){var e=this.props.chartWidgetCollection,t=this.state.activePage;e.layout.subscribe(this._syncApplyToAllVisibility),t&&t.definitions.subscribe(this._onChangeActivePageDefinitions)},t.prototype.componentWillUnmount=function(){ +var e=this.props.chartWidgetCollection,t=this.state.activePage;t&&t.definitions.unsubscribe(this._onChangeActivePageDefinitions),e.layout.unsubscribe(this._syncApplyToAllVisibility)},t.prototype.render=function(){var e=this,t=this.props,n=t.isOpened,i=t.onClose,a=this.state.activePage;return o.createElement(b.a,{rule:z.a.TabletSmall},(function(t){return o.createElement(c.a,{className:q.withSidebar,dataName:"series-properties-dialog",onClose:i,isOpened:n,title:null!==a&&t?a.title:window.t("Chart settings"),footerLeftRenderer:e._renderFooterLeft,additionalButtons:e._renderApplyToAllButton(),additionalHeaderElement:null!==a&&t?o.createElement(r.Icon,{className:q.backButton,icon:W,onClick:e._handleBackClick}):void 0,onSubmit:e._handleSubmit,onCancel:e._handleCancel,render:e._renderChildren,submitOnEnterKey:!1})}))},t.prototype._renderTabContent=function(e){var t=this.props.pages,n=this._getCurrentPage(e);if(n){var i=t.find((function(e){return e.id===n.id})),a=i?i.definitions.value():[];return o.createElement(D.a,{className:q.tabContent,onScroll:this._handleScroll},o.createElement(m.b.Provider,{value:L},o.createElement(u.a,{key:this.state.tableKey},a.map((function(e){return o.createElement(s.a,{key:e.id,definition:e})})))))}return null},t.prototype._renderTabs=function(e){var t=this,n=this.props.pages;if(this.state.activePage&&e)return null;var i=this._getCurrentPage(e);return o.createElement(b.a,{rule:z.a.TabletNormal},(function(e){return o.createElement(b.a,{rule:z.a.TabletSmall},(function(a){var l=a?"mobile":e?"tablet":void 0;return o.createElement(j.a,{mode:l,onScroll:t._handleScroll},n.map((function(e){return o.createElement(j.b,{key:e.id,mode:l,"data-name":e.id,title:e.title,icon:e.icon,onClick:t._createTabClickHandler(e),isActive:i?e.id===i.id:void 0})})))}))}))},t.prototype._renderApplyToAll=function(e){var t=this.state.isApplyToAllVisible;return!e&&t&&o.createElement("span",{className:q.applyToAllButton},o.createElement(l.Button,{appearance:"stroke",onClick:this._handleApplyToAll},window.t("Apply to all")))},t.prototype._getCurrentPage=function(e){var t=this.props.pages,n=this.state.activePage,o=null;return n?o=n:!e&&t.length&&(o=t[0]),o},t}(o.PureComponent),K=n("FQhm");n.d(t,"GeneralChartPropertiesDialogRenderer",(function(){return G}));var H=window.t("Chart settings"),G=function(){function e(e){var t=this;this._container=document.createElement("div"),this._isVisible=!1,this._handleClose=function(){i.unmountComponentAtNode(t._container),t._isVisible=!1,t._onClose&&t._onClose()},this._handleSubmit=function(){},this._handleCancel=function(){t._model.undoToCheckpoint(t._checkpoint)},this._propertyPages=e.propertyPages,this._model=e.model,this._activePageId=e.activePageId,this._onClose=e.onClose,this._chartWidgetCollection=e.chartWidgetCollection,this._checkpoint=this._ensureCheckpoint(e.undoCheckPoint)}return e.prototype.hide=function(e){e?this._handleCancel():this._handleSubmit(),this._handleClose()},e.prototype.isVisible=function(){return this._isVisible},e.prototype.focusOnText=function(){}, +e.prototype.show=function(){i.render(o.createElement(R,{title:H,isOpened:!0,onSubmit:this._handleSubmit,onClose:this._handleClose,onCancel:this._handleCancel,pages:this._propertyPages,model:this._model,activePageId:this._activePageId,chartWidgetCollection:this._chartWidgetCollection}),this._container),this._isVisible=!0,K.emit("edit_object_dialog",{objectType:"mainSeries",scriptTitle:this._model.mainSeries().title()})},e.prototype._ensureCheckpoint=function(e){return void 0===e&&(e=this._model.createUndoCheckpoint()),e},e}()},U0JK:function(e,t){e.exports=''},sXZi:function(e,t,n){e.exports={"tablet-normal-breakpoint":"screen and (max-width: 768px)","tablet-small-breakpoint":"screen and (max-width: 419px)",withSidebar:"withSidebar-1v16TX_2",content:"content-1KOxICHZ",tabContent:"tabContent-uYpWHhq0",backButton:"backButton-1BRkbiCz",applyToAllButton:"applyToAllButton-1mQDSNsO"}},swCq:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Icon=void 0;var o=n("mrSG"),i=n("q1tI");t.Icon=i.forwardRef((function(e,t){var n=e.icon,a=void 0===n?"":n,l=o.__rest(e,["icon"]);return i.createElement("span",o.__assign({},l,{ref:t,dangerouslySetInnerHTML:{__html:a}}))}))},utEQ:function(e,t,n){e.exports={themesButtonText:"themesButtonText-2QMmFP4s",themesButtonIcon:"themesButtonIcon-7BX3V6du",defaultsButtonText:"defaultsButtonText-ezA5ZCBQ",defaultsButtonItem:"defaultsButtonItem-3eSfgMfv"}}}]); \ No newline at end of file diff --git a/public/charting_library/bundles/general-property-page.f3628cb08d576a4c8374.js b/public/charting_library/bundles/general-property-page.f3628cb08d576a4c8374.js new file mode 100644 index 00000000..b5eba228 --- /dev/null +++ b/public/charting_library/bundles/general-property-page.f3628cb08d576a4c8374.js @@ -0,0 +1,6 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([["general-property-page"],{"+jnJ":function(e,t,i){"use strict";i.d(t,"a",(function(){return r})),i.d(t,"b",(function(){return s}));i("YFKU"),i("EsMY");var r,a=i("m/cY"),n=i("Vdly");function o(e){return e===r.AlwaysOn||e===r.AlwaysOff?e:r.VisibleOnMouseOver}function s(e,t){var i,s;function l(){if(!i){i=Object(a.a)();var r=n.getValue(e);void 0===r&&void 0!==t&&(r=n.getValue(t)),i.setValue(o(r)),i.subscribe(i,(function(t){n.setValue(e,o(t.value()))}))}return i}return{property:l,availableValues:function(){return[{value:r.VisibleOnMouseOver,title:window.t("Visible on Mouse Over")},{value:r.AlwaysOn,title:window.t("Always Visible")},{value:r.AlwaysOff,title:window.t("Always Invisible")}]},actualBehavior:function(){if(!s){s=Object(a.a)();var e=l(),t=function(){var t=e.value();t!==r.AlwaysOn&&t!==r.AlwaysOff&&(t=Modernizr.mobiletouch?r.AlwaysOn:r.VisibleOnMouseOver),s&&s.setValue(t)};e.subscribe(s,t),t()}return s}}}!function(e){e.AlwaysOn="alwaysOn",e.VisibleOnMouseOver="visibleOnMouseOver",e.AlwaysOff="alwaysOff"}(r||(r={}))},"1ANp":function(e,t,i){"use strict";i.d(t,"c",(function(){return n})),i.d(t,"d",(function(){return o})),i.d(t,"b",(function(){return s})),i.d(t,"a",(function(){return l}));var r,a=i("+jnJ"),n="NavigationButtons.visibility",o=(r=Object(a.b)(n)).property,s=r.availableValues,l=r.actualBehavior},"34BO":function(e,t){e.exports=''},"5lPo":function(e,t,i){"use strict";i.r(t);var r=i("mrSG"),a=i("Eyy1"),n=i("Kxc7"),o=(i("N22A"),i("hY0g")),s=i.n(o),l=i("HSjo"),c=i("1yQO"),u=i("1ANp"),h=i("RspR"),d=i("MWAT"),p=i("zqjM"),b=i("x2L+"),g=window.t("Show Buy/Sell Buttons");var w=i("qFKp"),y=window.t("Symbol"),v=window.t("OHLC Values"),O=window.t("Bar Change Values"),m=window.t("Indicator Titles"),P=window.t("Indicator Arguments"),f=window.t("Indicator Values"),j=window.t("Background"),C=(window.t("Wrap text"),window.t("Show Open market status"));w.CheckMobile.any();function S(e,t,i,r,a){var o=[],c=[],u=Object(l.j)({checked:Object(l.b)(e,t.showSeriesTitle,"Change Symbol Description Visibility"),option:Object(l.b)(e,i.property,"Change Symbol Legend Format")},{id:"symbolTextSource",title:y,options:new s.a(i.values)});if(c.push(u),null!==r){var h=Object(l.c)({checked:Object(l.b)(e,r,"Change show open market status")},{id:"showOpenMarketStatus",title:C});c.push(h)}var d=Object(l.c)({checked:Object(l.b)(e,t.showSeriesOHLC,"Change OHLC Values Visibility")},{id:"ohlcTitle",title:v});c.push(d);var p=Object(l.c)({checked:Object(l.b)(e,t.showBarChange,"Change Bar Change Visibility")},{id:"barChange",title:O});c.push(p),o.push(Object(l.k)(c,"seriesLegendVisibilityGroup"));var b=function(e,t){return null!==t&&n.enabled("buy_sell_buttons")?Object(l.c)({checked:Object(l.a)(e,t.showSellBuyButtons,"Change buy/sell buttons visibility")},{ +id:"tradingSellBuyPanel",title:g}):null}(e,a);null!==b&&o.push(Object(l.k)([b],"sellBuyButtonsLegendVisibilityGroup"));var w=[],S=Object(l.c)({checked:Object(l.b)(e,t.showStudyArguments,"Change Indicator Arguments Visibility")},{id:"studyArguments",title:P}),_=Object(l.d)({checked:Object(l.b)(e,t.showStudyTitles,"Change Indicator Titles Visibility")},{id:"studyTitles",title:m},[S]);w.push(_);var V=Object(l.c)({checked:Object(l.b)(e,t.showStudyValues,"Change Indicator Values Visibility")},{id:"studyValues",title:f});w.push(V),o.push(Object(l.k)(w,"studiesLegendVisibilityGroup"));var L=[],k=Object(l.q)({checked:Object(l.b)(e,t.showBackground,"Change Legend Background Visibility"),transparency:Object(l.b)(e,t.backgroundTransparency,"Change Legend Background Transparency")},{id:"legendBgTransparency",title:j});return L.push(k),o.push(Object(l.k)(L,"generalLegendGroup")),o}var _=i("oXaB"),V=i("Z5lT"),L=window.t("Symbol Name Label"),k=window.t("Symbol Last Price Label"),M=(window.t("Symbol Previous Day Close Price Label (Intraday Only)"),window.t("Indicator Name Label")),B=window.t("Indicator Last Value Label"),x=(window.t("Financials Name Label"),window.t("Financials Last Value Label"),window.t("Bid and Ask Labels"),window.t("Pre/Post Market Price Label"),window.t("Countdown To Bar Close")),A=window.t("Currency"),z=window.t("Scales Placement"),D=window.t("Date Format"),T=window.t("Lock Price to Bar Ratio"),R=window.t("No Overlapping Labels"),H=[{value:_.PriceAxisLastValueMode.LastPriceAndPercentageValue,title:window.t("Price and Percentage Value")},{value:_.PriceAxisLastValueMode.LastValueAccordingToScale,title:window.t("Value according to Scale")}];var G=window.t("Background"),N=window.t("Vert Grid Lines"),F=window.t("Horz Grid Lines"),I=window.t("Session Breaks"),W=window.t("Scales text"),E=window.t("Scales lines"),q=window.t("Crosshair"),J=window.t("Watermark"),K=window.t("Top Margin"),U=window.t("Navigation Buttons"),Y=window.t("Pane Buttons"),Z=window.t("Bottom Margin"),Q=window.t("Right Margin"),X=window.t("bars",{context:"unit"});var $,ee=i("e1ZQ"),te=i("ZZnO"),ie=i("gQ5K"),re=i("+6ja"),ae=i("34BO"),ne=i("ggCF"),oe=i("Iilx"),se=i("DyO1"),le=i("iUxq"),ce=i("WS5G"),ue=(($={}).symbol=ae,$.legend=ne,$.scales=oe,$.appearance=se,$.events=le,$.trading=ce,$);i.d(t,"ChartPropertyDefinitionsViewModel",(function(){return ye}));var he=window.t("Symbol"),de=window.t("Status line"),pe=window.t("Scales"),be=window.t("Appearance"),ge=(window.t("Events"),window.t("Trading"),null);var we=[{value:"description",title:window.t("Description")},{value:"ticker",title:window.t("Ticker")}],ye=function(){function e(e,t,i){this._propertyPages=null,this._maxRightOffsetPropertyObject=null,this._isDestroyed=!1,this._undoModel=e,this._model=this._undoModel.model(),this._series=this._model.mainSeries(),this._chartWidgetProperties=t,this._options=i,this._seriesPropertyDefinitionViewModel=this._createSeriesViewModel(),this._legendPropertyPage=this._createLegendPropertyPage(),this._scalesPropertyPage=this._createScalesPropertyPage(), +this._appearancePropertyPage=this._createAppearancePropertyPage(),this._tradingPropertyPage=this._createTradingPropertyPage(),this._eventsPropertyPage=this._createEventsPropertyPage(),this._series.onStyleChanged().subscribe(this,this._updateDefinitions),this._series.priceScaleChanged().subscribe(this,this._updateDefinitions)}return e.prototype.destroy=function(){null!==this._propertyPages&&this._propertyPages.filter((function(e,t){return 0!==t})).forEach((function(e){Object(l.t)(e.definitions.value())})),this._seriesPropertyDefinitionViewModel.destroy(),this._series.onStyleChanged().unsubscribe(this,this._updateDefinitions),this._series.priceScaleChanged().unsubscribe(this,this._updateDefinitions),Object(a.ensureNotNull)(this._model.timeScale()).maxRightOffsetChanged().unsubscribeAll(this),this._isDestroyed=!0},e.prototype.propertyPages=function(){var e=this;return null===this._propertyPages?this._seriesPropertyDefinitionViewModel.propertyPages().then((function(t){if(e._isDestroyed)throw new Error("ChartPropertyDefinitionsViewModel already destroyed");return null===e._propertyPages&&(e._propertyPages=Object(r.__spreadArrays)(t),e._propertyPages.push(e._legendPropertyPage,e._scalesPropertyPage,e._appearancePropertyPage),null!==e._tradingPropertyPage&&e._propertyPages.push(e._tradingPropertyPage),null!==e._eventsPropertyPage&&e._propertyPages.push(e._eventsPropertyPage)),e._propertyPages})):Promise.resolve(this._propertyPages)},e.prototype._updateDefinitions=function(){Object(l.t)(this._scalesPropertyPage.definitions.value());var e=this._createScalesDefinitions();this._scalesPropertyPage.definitions.setValue(e)},e.prototype._createSeriesViewModel=function(){var e={property:this._model.properties().timezone,values:re.availableTimezones.map((function(e){return{value:e.id,title:e.title}}))};return new p.a(this._series,this._undoModel,"symbol",he,ue.symbol,e)},e.prototype._createLegendPropertyPage=function(){var e=this._chartWidgetProperties.childs().paneProperties.childs().legendProperties.childs(),t={property:this._series.properties().childs().statusViewStyle.childs().symbolTextSource,values:we},i=S(this._undoModel,e,t,this._options.marketStatusWidgetEnabled?b.b:null,ge);return Object(c.a)(i,"legend",de,ue.legend)},e.prototype._createScalesPropertyPage=function(){var e=this._createScalesDefinitions();return Object(c.a)(e,"scales",pe,ue.scales)},e.prototype._createScalesDefinitions=function(){var e,t=this._chartWidgetProperties.childs().scalesProperties.childs(),i={property:this._model.properties().priceScaleSelectionStrategyName,values:Object(d.allPriceScaleSelectionStrategyInfo)().map((function(e){return{value:e.name,title:e.title}}))},r={property:te.dateFormatProperty,values:(e=new Date(Date.UTC(1997,8,29)),ee.a.map((function(t){return{value:t,title:new ie.DateFormatter(t).format(e)}})))},a=this._model.mainSeriesScaleRatioProperty();return function(e,t,i,r){var a=r.seriesPriceScale.properties().childs(),o=[],c=[];if(r.seriesHasClosePrice){var u=Object(l.c)({checked:Object(l.b)(e,i.showSymbolLabels,"Show Symbol Labels") +},{id:"symbolNameLabel",title:L}),h=Object(l.j)({checked:Object(l.b)(e,i.showSeriesLastValue,"Change Symbol Last Value Visibility"),option:Object(l.b)(e,i.seriesLastValueMode,"Change Symbol Last Value Mode")},{id:"symbolLastValueLabel",title:k,options:new s.a(H)});c.push(u,h)}var d=Object(l.c)({checked:Object(l.b)(e,i.showStudyPlotLabels,"Show Study Plots Labels")},{id:"studyNameLabel",title:M}),p=Object(l.c)({checked:Object(l.b)(e,i.showStudyLastValue,"Change Indicator Last Value Visibility")},{id:"studyLastValueLabel",title:B});c.push(d,p);var b=Object(l.c)({checked:Object(l.b)(e,a.alignLabels,"Change No Overlapping Labels")},{id:"noOverlappingLabels",title:R});if(c.push(b),n.enabled("countdown")){var g=Object(l.c)({checked:Object(l.b)(e,t.showCountdown,"Change Show Countdown")},{id:"countdown",title:x});c.push(g)}if(r.currencyLabelEnabled){var w=Object(l.c)({checked:Object(l.b)(e,i.showCurrency,"Change Currency Label Visibility")},{id:"scalesCurrency",title:A});c.push(w)}o.push(Object(l.k)(c,"generalScalesLabelsGroup"));var y=Object(l.i)({checked:Object(l.v)(e,a.lockScale,r.seriesPriceScale,"Change lock scale"),value:Object(l.x)(e,r.mainSeriesScaleRatioProperty,"Change Price to Bar Ratio",[Object(V.c)(7),function(e){return e}])},{id:"lockScale",title:T,min:new s.a(r.mainSeriesScaleRatioProperty.getMinValue()),max:new s.a(r.mainSeriesScaleRatioProperty.getMaxValue()),step:new s.a(r.mainSeriesScaleRatioProperty.getStepChangeValue())}),v=Object(l.j)({option:Object(l.w)(e,r.scalesPlacementPropertyObj.property)},{id:"scalesPlacement",title:z,options:new s.a(r.scalesPlacementPropertyObj.values)});if(o.push(y,v),n.enabled("scales_date_format")){var O=Object(l.j)({option:Object(l.b)(e,r.dateFormatPropertyObj.property,"Change Date Format")},{id:"dateFormat",title:D,options:new s.a(r.dateFormatPropertyObj.values)});o.push(O)}return o}(this._undoModel,this._series.properties().childs(),t,{disableSeriesPrevCloseValueProperty:this._series.isDWMProperty(),seriesHasClosePrice:this._series.hasClosePrice(),seriesPriceScale:this._series.priceScale(),mainSeriesScaleRatioProperty:a,scalesPlacementPropertyObj:i,dateFormatPropertyObj:r,currencyLabelEnabled:this._options.currencyLabelEnabled})},e.prototype._createMaxOffsetPropertyObject=function(){var e=Object(a.ensureNotNull)(this._model.timeScale()),t=new s.a(Math.floor(e.maxRightOffset()));e.maxRightOffsetChanged().subscribe(this,(function(e){t.setValue(Math.floor(e))})),this._maxRightOffsetPropertyObject={property:e.defaultRightOffsetProperty(),min:new s.a(0),max:t}},e.prototype._createAppearancePropertyPage=function(){var e=this._chartWidgetProperties.childs(),t=e.paneProperties.childs(),i=e.scalesProperties.childs(),r=this._model.watermarkSource(),o=null;null!==r&&(o=r.properties().childs());var d={property:u.d(),values:u.b()},p={property:h.c(),values:h.b()},b=this._model.sessions().properties().childs().graphics.childs().vertlines.childs().sessBreaks.childs();null===this._maxRightOffsetPropertyObject&&this._createMaxOffsetPropertyObject() +;var g=Object(a.ensureNotNull)(this._maxRightOffsetPropertyObject),w=function(e,t,i,r,a,o,c,u,h){var d=[],p=Object(l.e)({color:Object(l.u)(e,t.background,null,"Change Chart Background Color"),gradientColor1:Object(l.u)(e,t.backgroundGradientStartColor,null,"Change Chart Background Color"),gradientColor2:Object(l.u)(e,t.backgroundGradientEndColor,null,"Change Chart Background Color"),type:Object(l.b)(e,t.backgroundType,"Change Chart Background Type")},{id:"chartBackground",title:G,noAlpha:!0}),b=t.vertGridProperties.childs(),g=Object(l.h)({color:Object(l.u)(e,b.color,null,"Change Vert Grid Lines Color"),style:Object(l.b)(e,b.style,"Change Vert Grid Lines Style")},{id:"vertGridLine",title:N}),w=t.horzGridProperties.childs(),y=Object(l.h)({color:Object(l.u)(e,w.color,null,"Change Horz Grid Lines Color"),style:Object(l.b)(e,w.style,"Change Horz Grid Lines Style")},{id:"horizGridLine",title:F}),v=Object(l.h)({disabled:Object(l.b)(e,o,"Change Intraday Interval Property"),checked:Object(l.b)(e,a.visible,"Change Sessions Breaks Visibility"),color:Object(l.u)(e,a.color,null,"Change Sessions Breaks Color"),width:Object(l.b)(e,a.width,"Change Sessions Breaks Width"),style:Object(l.b)(e,a.style,"Change Sessions Breaks Style")},{id:"sessionBeaks",title:I}),O=Object(l.p)({color:Object(l.u)(e,r.textColor,null,"Change Scales Text Color"),size:Object(l.b)(e,r.fontSize,"Change Scales Font Size")},{id:"scalesText",title:W}),m=Object(l.h)({color:Object(l.u)(e,r.lineColor,null,"Change Scales Lines Color")},{id:"scalesLine",title:E}),P=t.crossHairProperties.childs(),f=Object(l.h)({color:Object(l.u)(e,P.color,P.transparency,"Change Crosshair Color"),width:Object(l.b)(e,P.width,"Change Crosshair Width"),style:Object(l.b)(e,P.style,"Change Crosshair Style")},{id:"crossHair",title:q});if(d.push(p,g,y,v,O,m,f),null!==i){var j=Object(l.e)({checked:Object(l.b)(e,i.visibility,"Change Symbol Watermark Visibility"),color:Object(l.u)(e,i.color,null,"Change Symbol Watermark Color")},{id:"watermark",title:J});d.push(j)}var C=Object(l.j)({option:Object(l.b)(e,u.property,"Change Navigation Buttons Visibility")},{id:"navButtons",title:U,options:new s.a(u.values)});d.push(C);var S=Object(l.j)({option:Object(l.b)(e,h.property,"Change Pane Buttons Visibility")},{id:"paneButtons",title:Y,options:new s.a(h.values)});d.push(S);var _=Object(l.i)({value:Object(l.b)(e,t.topMargin,"Change Top Margin",[V.b])},{type:0,id:"paneTopMargin",title:K,min:new s.a(0),max:new s.a(25),step:new s.a(1),unit:new s.a("%")}),L=Object(l.i)({value:Object(l.b)(e,t.bottomMargin,"Change Bottom Margin",[V.b])},{type:0,id:"paneBottomMargin",title:Z,min:new s.a(0),max:new s.a(25),step:new s.a(1),unit:new s.a("%")}),k=Object(l.i)({value:Object(l.b)(e,c.property,"Change Right Margin",[V.b])},{type:0,id:"paneRightMargin",title:Q,min:c.min,max:c.max,step:new s.a(1),unit:new s.a(X)}),M=[Object(l.k)(d,"generalAppearanceGroup"),_,L];return n.enabled("chart_property_page_right_margin_editor")&&M.push(k),M}(this._undoModel,t,o,i,b,this._series.isDWMProperty(),g,d,p) +;return Object(c.a)(w,"appearance",be,ue.appearance)},e.prototype._createTradingPropertyPage=function(){return null},e.prototype._createEventsPropertyPage=function(){return null},e}()},DyO1:function(e,t){e.exports=''},Iilx:function(e,t){e.exports=''},RspR:function(e,t,i){"use strict";i.d(t,"c",(function(){return o})),i.d(t,"b",(function(){return s})),i.d(t,"a",(function(){return l}));var r,a=i("+jnJ"),n=i("1ANp"),o=(r=Object(a.b)("PaneButtons.visibility",n.c)).property,s=r.availableValues,l=r.actualBehavior},WS5G:function(e,t){e.exports=''},ggCF:function(e,t){e.exports=''},iUxq:function(e,t){e.exports=''}}]); \ No newline at end of file diff --git a/public/charting_library/bundles/go-to-date-dialog-impl.8aeb12eec2b64d3ccf61.js b/public/charting_library/bundles/go-to-date-dialog-impl.8aeb12eec2b64d3ccf61.js new file mode 100644 index 00000000..898be8f7 --- /dev/null +++ b/public/charting_library/bundles/go-to-date-dialog-impl.8aeb12eec2b64d3ccf61.js @@ -0,0 +1,11 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([["go-to-date-dialog-impl"],{"2sPR":function(e,t,n){e.exports={calendar:"calendar-H-c9lyXG",header:"header-29jmPJB_",title:"title-3BLccpWI",titleDay:"titleDay-3Mp9czBi",switchBtn:"switchBtn-p718bDyp",prev:"prev-1vUszsRH",next:"next-Xxv3BCz0",month:"month-14xTSVpQ",weekdays:"weekdays-p5haX_xf",weeks:"weeks-1LCs6d3o",week:"week-49DNXkE3",day:"day-3x8ZipuB",disabled:"disabled-34cO1Z8u",selected:"selected-qmTqaBK3",currentDay:"currentDay-3sTNH-Yi",otherMonth:"otherMonth-1WMn4XfI"}},"77yN":function(e,t){e.exports=''},CjI0:function(e,t){e.exports=''},FoU0:function(e,t,n){e.exports={textInput:"textInput-3SndIvsX",inputWrapper:"inputWrapper-u_TvMxrq"}},Hrlb:function(e,t,n){e.exports={pickerInput:"pickerInput-3XGDmslV",inputIcon:"inputIcon-1N28V7pi",disabled:"disabled-aKY-xwhe","inputIcon--large":"inputIcon--large-91Ho2uuh","inputIcon--small":"inputIcon--small-93KX0qGd","inputIcon--xsmall":"inputIcon--xsmall-1GLk5pdh",picker:"picker-HQJc7fVy",fixed:"fixed-QBCsU0Gi",absolute:"absolute-2hW9cE-c",nativePicker:"nativePicker-1F6noucK"}},Oehf:function(e,t,n){e.exports={clock:"clock-3pqBsiNm",header:"header-pTWMGSpm",number:"number-9PC9lvyt",active:"active-1sonmMLV",body:"body-2Q-g3GDd",clockFace:"clockFace-eHYbqh-S",face:"face-2iCoBAOV",inner:"inner-1mVlhYbe",hand:"hand-2ZG8pJQb",knob:"knob-31dEppHa",centerDot:"centerDot-210Fo0oV"}},UX0N:function(e,t,n){e.exports={field:"field-3OP1xeZc",errorIcon:"errorIcon-AjhrEkSc",warningIcon:"warningIcon-309b7fMg"}},eFBE:function(e,t){e.exports=''},hn2c:function(e,t){e.exports=''},ilgf:function(e,t,n){e.exports={dialog:"dialog-1oXvxbfL",formRow:"formRow-28Ldm-ki",cell:"cell-m5Uv3CRU",input:"input-2rGFhmey",btn:"btn-1wL_hi5U",button:"button-1xrfeyEj"}},nPPD:function(e,t,n){"use strict";function o(e,t,n){void 0===n&&(n={});for(var o=Object.assign({},t),s=0,r=Object.keys(t);s=0)&&(!this.props.minDate||this.props.minDate.startOf("day").diff(e.startOf("day"),"days")<=0)},t}(s.PureComponent),m=n("Iivm"),f=n("pAWa"),v=n("hn2c"),_=function(e){function t(t){var n=e.call(this,t)||this;return n._prevMonth=function(){n.setState({viewDate:n.state.viewDate.clone().subtract(1,"months")})},n._nextMonth=function(){n.setState({viewDate:n.state.viewDate.clone().add(1,"months")})},n._onClickDay=function(e){var t=e.clone();n.setState({viewDate:t}),n.props.onSelect&&n.props.onSelect(t.clone())},n.state={viewDate:t.selectedDate},n}return Object(i.__extends)(t,e),t.prototype.render=function(){return s.createElement("div",{className:l(p.calendar,this.props.className)},s.createElement("div",{className:p.header},s.createElement(m.Icon,{icon:f,onClick:this._prevMonth,className:l(p.switchBtn,p.prev)}),s.createElement("div",{className:p.title},s.createElement("span",{className:p.titleDay},this.state.viewDate.format("DD"))," "+this.state.viewDate.format("MMM")+" '"+this.state.viewDate.format("YY")),s.createElement(m.Icon,{icon:v,onClick:this._nextMonth,className:l(p.switchBtn,p.next)})),s.createElement(d,{viewDate:this.state.viewDate,selectedDate:this.props.selectedDate,maxDate:this.props.maxDate,minDate:this.props.minDate,onClickDay:this._onClickDay,disableWeekends:this.props.disableWeekends}))},t}(s.PureComponent),g=n("77yN"),y=n("srFJ"),w=n("L0Sj"),E=n("pk/F"),M=n("kSQs"),b=n("CjI0"),D={bottom:{attachment:{horizontal:"left",vertical:"top"},targetAttachment:{horizontal:"left",vertical:"bottom"}},top:{attachment:{horizontal:"left",vertical:"bottom"},targetAttachment:{horizontal:"left",vertical:"top"}},topRight:{attachment:{horizontal:"right",vertical:"bottom"},targetAttachment:{horizontal:"right",vertical:"top"}},bottomRight:{attachment:{horizontal:"right",vertical:"top"},targetAttachment:{horizontal:"right",vertical:"bottom"}}};!function(e){e.Top="top",e.Bottom="bottom"}(o||(o={}));var k={top:{attachment:D.topRight.attachment,targetAttachment:D.topRight.targetAttachment,attachmentOffsetY:-4},bottom:{attachment:D.bottomRight.attachment,targetAttachment:D.bottomRight.targetAttachment,attachmentOffsetY:4}};var O,S,C,x=(O=w.a,S=!0,void 0===(C=!0)&&(C=!1),function(e){function t(t){var n=e.call(this,t)||this;return n._onMouseOverWarning=function(e){n.setState({showWarning:!0})},n._onMouseOutWarning=function(e){n.setState({showWarning:!1})},n._mouseOver=function(e){n.state.invalid&&n.setState({showError:!0}),n.props.onMouseOver&&n.props.onMouseOver(e)},n._mouseOut=function(e){n.setState({showError:!1}),n.props.onMouseOut&&n.props.onMouseOut(e)},n._focus=function(e){n.setState({focused:!0,mouseOut:void 0,mouseOver:void 0}),n.state.invalid&&n.setState({showError:!0}),n.props.onFocus&&n.props.onFocus(e)},n._blur=function(e){n.setState({focused:!1,mouseOut:n._mouseOut,mouseOver:n._mouseOver,showError:!1}),n.props.onBlur&&n.props.onBlur(e)},n.state={invalid:Boolean(n.props.errors&&n.props.errors.length), +hasWarning:Boolean(n.props.warnings&&n.props.warnings.length),mouseOut:n._mouseOut,mouseOver:n._mouseOver,showError:!1,showWarning:!1},n._fieldElem=s.createRef(),n}return Object(i.__extends)(t,e),t.prototype.componentWillReceiveProps=function(e){e.errors!==this.props.errors&&this.setState({invalid:Boolean(e.errors&&e.errors.length),showError:this.state.focused&&Boolean(e.errors&&e.errors.length),hasWarning:Boolean(e.warnings&&e.warnings.length)})},t.prototype.render=function(){var e,t=this.props.fieldTheme||E,n=l(t.field,((e={})[this.props.className]=Boolean(this.props.className),e)),o=l(t.errorIcon,this.props.fieldSize&&t["errorIcon--"+this.props.fieldSize]),r=l(t.warningIcon,this.props.fieldSize&&t["warningIcon--"+this.props.fieldSize]);return s.createElement(s.Fragment,null,s.createElement("div",{className:n,onMouseOver:this.state.mouseOver,onMouseOut:this.state.mouseOut,ref:this._fieldElem},this._createField(),this.state.invalid&&s.createElement(m.Icon,{className:o,icon:b}),!this.state.invalid&&this.state.hasWarning&&s.createElement("span",{onMouseOver:this._onMouseOverWarning,onMouseOut:this._onMouseOutWarning},s.createElement(m.Icon,{className:r,icon:b}))),S&&!this.props.noErrorMessages&&this._createErrorsBox(),C&&this._createWarningsBox())},t.prototype._createField=function(){var e=Object.assign({},this.props,{error:this.state.invalid,onBlur:this._blur,onFocus:this._focus}),t=(e.errors,e.children),n=(e.alwaysShowError,e.fieldSize,e.noErrorMessages,e.fieldTheme,e.errorAttachment,Object(i.__rest)(e,["errors","children","alwaysShowError","fieldSize","noErrorMessages","fieldTheme","errorAttachment"])),o=O;return s.createElement(o,Object(i.__assign)({},n),t)},t.prototype._createErrorsBox=function(){var e=this.props.errorAttachment,t=void 0===e?o.Top:e,n=k[t],r=n.attachment,i=n.targetAttachment,a=n.attachmentOffsetY;return s.createElement(M.a,{isOpened:this.state.showError||this.props.alwaysShowError,target:this._fieldElem.current,root:"parent",inheritWidthFromTarget:!1,attachment:r,targetAttachment:i,attachmentOffsetY:a,inheritMaxWidthFromTarget:!0,show:!0},this.props.errors)},t.prototype._createWarningsBox=function(){var e=this.props.errorAttachment,t=void 0===e?o.Top:e,n=k[t],r=n.attachment,i=n.targetAttachment,a=n.attachmentOffsetY;return s.createElement(M.a,{isOpened:this.state.showWarning,target:this._fieldElem.current,root:"parent",inheritWidthFromTarget:!1,attachment:r,targetAttachment:i,attachmentOffsetY:a,inheritMaxWidthFromTarget:!0,show:!0},this.props.warnings)},t}(s.PureComponent)),I=n("RgaO"),T=n("Eyy1"),P=n("nPPD"),N=n("D/i5"),H=n("FoU0"),z=n("UX0N"),j=n("Hrlb"),F=Object(i.__assign)(Object(i.__assign)({},N),Object(P.b)(N,H)),R=Object(i.__assign)(Object(i.__assign)({},E),Object(P.b)(E,z)),B=function(e){function t(t){var n=e.call(this,t)||this;return n._input=null,n._handleFocus=function(){n.props.showOnFocus&&n.props.onShowPicker()},n._handleInputRef=function(e){n._input=e,n.props.dateInputDOMReference&&n.props.dateInputDOMReference(n._input)},n._onShowPicker=function(e){if(e){ +var t=e.getBoundingClientRect();t.width&&t.right>window.innerWidth?e.style.right="0":e.style.right="auto"}},n._onChange=function(){var e=Object(T.ensureNotNull)(n._input).value;n.setState({value:e}),n.props.onType(e)},n._onKeyDown=function(e){n.props.onHidePicker()},n._onKeyPress=function(e){if(e.charCode){var t=String.fromCharCode(e.charCode);n.props.inputRegex.test(t)||e.preventDefault()}},n._onKeyUp=function(e){if(8!==e.keyCode){var t=Object(T.ensureNotNull)(n._input).value,o=n.props.fixValue(t);o!==t&&n.setState({value:o})}},n.state={value:t.value},n}return Object(i.__extends)(t,e),t.prototype.componentWillReceiveProps=function(e){e.value!==this.props.value&&this.setState({value:e.value})},t.prototype.render=function(){var e,t=this,n=this.props.position,o=void 0===n?"fixed":n,r=l(j.inputIcon,j["inputIcon--"+this.props.size],((e={})[j.disabled]=this.props.disabled,e));return s.createElement("div",{className:j.pickerInput},s.createElement(x,{value:this.state.value,onKeyDown:this._onKeyDown,onKeyPress:this._onKeyPress,onKeyUp:this._onKeyUp,onChange:this._onChange,onFocus:this._handleFocus,onClick:this.props.onShowPicker,reference:this._handleInputRef,rightComponent:this.props.errors&&this.props.errors.length?void 0:s.createElement(m.Icon,{icon:this.props.icon,className:r,onClick:this.props.disabled||this.props.readonly?void 0:this.props.onShowPicker}),theme:F,fieldTheme:R,sizeMode:this.props.size,disabled:this.props.disabled,errors:this.props.errors,noErrorMessages:!this.props.showErrorMessages,fieldSize:this.props.size,name:this.props.name,readOnly:this.props.readonly}),this.props.showPicker&&!this.props.readonly?s.createElement(I.a,{mouseDown:!0,handler:this.props.onHidePicker},(function(e){return s.createElement("span",{ref:e},s.createElement("div",{className:l(j.picker,j[o]),key:"0",ref:t._onShowPicker},t.props.children))})):null)},t.defaultProps={showOnFocus:!0},t}(s.PureComponent),W=Object(i.__assign)(Object(i.__assign)({},N),Object(P.b)(N,H)),A=Object(i.__assign)(Object(i.__assign)({},E),Object(P.b)(E,z)),V=function(e){function t(t){var n=e.call(this,t)||this;return n._onChange=function(e){n.setState({value:e.target.value}),n.props.onChange(e.target.value)},n.state={value:t.value},n}return Object(i.__extends)(t,e),t.prototype.render=function(){var e,t=l(j.inputIcon,this.props.size&&j["inputIcon--"+this.props.size],((e={})[j.disabled]=this.props.disabled,e)),n=!this.props.readonly&&!this.props.disabled;return s.createElement("div",{className:j.pickerInput},s.createElement(x,{value:this.state.value,readOnly:!0,rightComponent:this.props.errors&&this.props.errors.length?void 0:s.createElement(m.Icon,{icon:this.props.icon,className:t}),theme:W,fieldTheme:A,sizeMode:this.props.size,disabled:this.props.disabled,errors:this.props.errors,fieldSize:this.props.size,alwaysShowError:!0,noErrorMessages:!this.props.showErrorMessages,name:n?void 0:this.props.name}),n&&s.createElement("input",{type:this.props.type,className:j.nativePicker,onChange:this._onChange,onInput:this._onChange,value:this.props.value, +min:this.props.min,max:this.props.max,name:this.props.name}))},t}(s.PureComponent),Y=function(e){function t(t){var n=e.call(this,t)||this;return n._format="YYYY-MM-DD",n._fixValue=function(e){return e=(e=e.substr(0,10)).replace(/-+/g,"-"),(/^\d{4}$/.test(e)||/^\d{4}-\d{2}$/.test(e))&&(e+="-"),e},n._isValid=function(e){if(/^[0-9]{4}(-[0-9]{2}){2}/.test(e)){var t=h(e,n._format);return t.isValid()&&(n.props.noRangeValidation||n._isInRange(t))}return!1},n._onType=function(e){var t=n._isValid(e)?h(e,n._format):null;t?n.setState({date:t,isInvalid:!1}):n.setState({isInvalid:!0}),n.props.onPick(t)},n._onSelect=function(e){n.setState({date:e,showCalendar:!1,isInvalid:!1}),n.props.onPick(e)},n._showCalendar=function(){n.setState({showCalendar:!0})},n._hideCalendar=function(){n.setState({showCalendar:!1})},n._getErrors=function(){var e=n.props.errors?Object(i.__spreadArrays)(n.props.errors):[];return n.state.isInvalid&&e.push(window.t("Please enter the right date format yyyy-mm-dd")),e},n.state={date:t.initial,showCalendar:!1,isInvalid:!n._isValid(t.initial.format(n._format))},n}return Object(i.__extends)(t,e),t.prototype.render=function(){var e=this.props.position,t=void 0===e?"fixed":e;return Modernizr.mobiletouch?s.createElement(V,{value:this.state.date.format(this._format),type:"date",onChange:this._onType,icon:g,disabled:this.props.disabled,size:this.props.size,min:this.props.minDate&&this.props.minDate.format(this._format),max:this.props.maxDate&&this.props.maxDate.format(this._format),errors:this._getErrors(),showErrorMessages:this.props.showErrorMessages,name:this.props.name,readonly:this.props.readonly}):s.createElement(B,{value:this.state.date.format(this._format),inputRegex:/[0-9.]/,fixValue:this._fixValue,onType:this._onType,onShowPicker:this._showCalendar,onHidePicker:this._hideCalendar,showPicker:this.state.showCalendar,showOnFocus:this.props.showOnFocus,icon:g,disabled:this.props.disabled,size:this.props.size,errors:this._getErrors(),showErrorMessages:this.props.showErrorMessages,name:this.props.name,dateInputDOMReference:this.props.dateInputDOMReference,readonly:this.props.readonly,position:t},s.createElement(_,{selectedDate:this.state.date,maxDate:this.props.maxDate,minDate:this.props.minDate,onSelect:this._onSelect,className:y.calendar}))},t.prototype.componentWillReceiveProps=function(e){this.props.initial!==e.initial&&this.setState({date:e.initial})},t.prototype._isInRange=function(e){return(!this.props.maxDate||this.props.maxDate.startOf("day").diff(e.startOf("day"),"days")>=0)&&(!this.props.minDate||this.props.minDate.startOf("day").diff(e.startOf("day"),"days")<=0)},t}(s.PureComponent),L=n("Oehf"),G=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._renderNumber=function(e,n){var o,r=l(L.number,((o={})[L.active]=e===t.props.activeNumber,o[L.inner]=t.props.isInner,o)),i=t.props.format?t.props.format(e):e.toString();return s.createElement("span",{key:e,className:r,style:t._numberStyle(t.props.radius-t.props.spacing,n),"data-value":i},s.createElement("span",null,i))},t} +return Object(i.__extends)(t,e),t.prototype.render=function(){return s.createElement("div",{className:L.face,style:this._faceStyle(),onMouseDown:this.props.onMouseDown,onTouchStart:this.props.onTouchStart},this.props.numbers.map(this._renderNumber))},t.prototype._faceStyle=function(){return{height:2*this.props.radius,width:2*this.props.radius}},t.prototype._numberStyle=function(e,t){var n=Math.PI/180*360/12*t;return{left:e+e*Math.sin(n)+this.props.spacing,top:e-e*Math.cos(n)+this.props.spacing}},t}(s.PureComponent),U=function(e){function t(t){var n=e.call(this,t)||this;return n._onMouseMove=function(e){n._move(K(e))},n._onTouchMove=function(e){n._move(X(e))},n._onMouseUp=function(){document.removeEventListener("mousemove",n._onMouseMove),document.removeEventListener("mouseup",n._onMouseUp),n._endMove()},n._onTouchEnd=function(e){document.removeEventListener("touchmove",n._onTouchMove),document.removeEventListener("touchend",n._onTouchEnd),n._endMove(e)},n}return Object(i.__extends)(t,e),t.prototype.componentWillUnmount=function(){document.removeEventListener("mousemove",this._onMouseMove),document.removeEventListener("mouseup",this._onMouseUp),document.removeEventListener("touchmove",this._onTouchMove),document.removeEventListener("touchend",this._onTouchEnd)},t.prototype.render=function(){var e={height:this.props.length,transform:"rotate("+this.props.angle+"deg)"};return s.createElement("div",{className:L.hand,style:e},s.createElement("span",{className:L.knob}))},t.prototype.mouseStart=function(e){document.addEventListener("mousemove",this._onMouseMove),document.addEventListener("mouseup",this._onMouseUp),this._move(K(e.nativeEvent))},t.prototype.touchStart=function(e){document.addEventListener("touchmove",this._onTouchMove),document.addEventListener("touchend",this._onTouchEnd),this._move(X(e.nativeEvent)),e.stopPropagation()},t.prototype._endMove=function(e){this.props.onMoveEnd&&this.props.onMoveEnd(e)},t.prototype._move=function(e){var t=this._trimAngleToValue(this._positionToAngle(e)),n=this._getPositionRadius(e);!this.props.onMove||isNaN(t)||isNaN(n)||this.props.onMove(360===t?0:t,n)},t.prototype._trimAngleToValue=function(e){return this.props.step*Math.round(e/this.props.step)},t.prototype._positionToAngle=function(e){return t=this.props.center.x,n=this.props.center.y,o=e.x,s=e.y,(r=function(e,t,n,o){return 180*(Math.atan2(o-t,n-e)+Math.PI/2)/Math.PI}(t,n,o,s))<0?360+r:r;var t,n,o,s,r},t.prototype._getPositionRadius=function(e){var t=this.props.center.x-e.x,n=this.props.center.y-e.y;return Math.sqrt(t*t+n*n)},t}(s.PureComponent);function K(e){return{x:e.pageX-window.scrollX,y:e.pageY-window.scrollY}}function X(e){return{x:e.touches[0].pageX-window.scrollX,y:e.touches[0].pageY-window.scrollY}}function Q(e,t,n){void 0===n&&(n=1);for(var o=Math.max(Math.ceil((t-e)/n),0),s=Array(o),r=0;r0&&n.props.selected<=12},n}return Object(i.__extends)(t,e),t.prototype.render=function(){var e=this,t=this.props,n=t.center,o=t.radius,r=t.spacing,i=t.selected;return s.createElement("div",null,s.createElement(G,{radius:o,spacing:r,numbers:J,activeNumber:i,format:q,onMouseDown:this._onMouseDown,onTouchStart:this._onTouchStart}),this._renderInnerFace(.46*o),s.createElement(U,{ref:function(t){return e._hand=t},length:o-(this.state.isInner?.46*o:r)-this.props.numberRadius,angle:30*i,step:30,center:n,onMove:this._onHandMove,onMoveEnd:this._onHandMoveEnd}))},t.prototype._renderInnerFace=function(e){return s.createElement(G,{radius:this.props.radius,spacing:e,numbers:$,activeNumber:this.props.selected,onMouseDown:this._onMouseDown,onTouchStart:this._onTouchStart,isInner:!0})},t.prototype._valueFromDegrees=function(e){return this.state.isInner?$[e/30]:J[e/30]},t}(s.PureComponent),te=Q(0,60,5),ne=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._onMouseDown=function(e){t._hand.mouseStart(e)},t._onTouchStart=function(e){t._hand.touchStart(e)},t._onHandMove=function(e){t.props.onChange(e/6)},t._onHandMoveEnd=function(e){t.props.onSelect&&t.props.onSelect(e)},t}return Object(i.__extends)(t,e),t.prototype.render=function(){var e=this;return s.createElement("div",null,s.createElement(G,{radius:this.props.radius,spacing:this.props.spacing,numbers:te,activeNumber:this.props.selected,format:q,onMouseDown:this._onMouseDown,onTouchStart:this._onTouchStart}),s.createElement(U,{ref:function(t){return e._hand=t},length:this.props.radius-this.props.spacing-this.props.numberRadius,angle:6*this.props.selected,step:6,center:this.props.center,onMove:this._onHandMove,onMoveEnd:this._onHandMoveEnd}))},t}(s.PureComponent);!function(e){e[e.Hours=0]="Hours",e[e.Minutes=1]="Minutes"}(Z||(Z={}));var oe,se=function(e){function t(t){var n=e.call(this,t)||this;return n._clockFace=null,n._raf=null,n._recalculateTimeout=null,n._calculateShapeBinded=n._calculateShape.bind(n),n._onChangeHours=function(e){n.state.time.hours()!==e&&n._onChange(n.state.time.clone().hours(e))},n._onChangeMinutes=function(e){n.state.time.minutes()!==e&&n._onChange(n.state.time.clone().minutes(e))},n._onSelectHours=function(){n._displayMinutes()},n._onSelectMinutes=function(e){e&&e.target instanceof Node&&n._clockFace&&n._clockFace.contains(e.target)&&e.preventDefault(),n.props.onSelect&&n.props.onSelect(n.state.time.clone())},n._displayHours=function(){n.setState({faceType:Z.Hours})},n._displayMinutes=function(){n.setState({faceType:Z.Minutes})},n._setClockFace=function(e){n._clockFace=e},n.state={center:{x:0,y:0},radius:0, +time:n.props.selectedTime,faceType:Z.Hours},n}return Object(i.__extends)(t,e),t.prototype.render=function(){var e,t;return s.createElement("div",{className:l(L.clock,this.props.className)},s.createElement("div",{className:L.header},s.createElement("span",{className:l(L.number,(e={},e[L.active]=this.state.faceType===Z.Hours,e)),onClick:this._displayHours},this.state.time.format("HH")),s.createElement("span",null,":"),s.createElement("span",{className:l(L.number,(t={},t[L.active]=this.state.faceType===Z.Minutes,t)),onClick:this._displayMinutes},this.state.time.format("mm"))),s.createElement("div",{className:L.body},s.createElement("div",{className:L.clockFace,ref:this._setClockFace},this.state.faceType===Z.Hours?this._renderHours():null,this.state.faceType===Z.Minutes?this._renderMinutes():null,s.createElement("span",{className:L.centerDot}))))},t.prototype.componentDidMount=function(){this._calculateShape(),this._recalculateTimeout=setTimeout(this._calculateShapeBinded,1),window.addEventListener("resize",this._calculateShapeBinded),window.addEventListener("scroll",this._calculateShapeBinded,!0)},t.prototype.componentWillUnmount=function(){this._clearTimeout(),window.removeEventListener("resize",this._calculateShapeBinded),window.removeEventListener("scroll",this._calculateShapeBinded,!0),null!==this._raf&&(cancelAnimationFrame(this._raf),this._raf=null)},t.prototype._clearTimeout=function(){null!==this._recalculateTimeout&&(clearTimeout(this._recalculateTimeout),this._recalculateTimeout=null)},t.prototype._renderHours=function(){return s.createElement(ee,{center:this.state.center,radius:this.state.radius,spacing:.18*this.state.radius,selected:this.state.time.hours(),numberRadius:13,onChange:this._onChangeHours,onSelect:this._onSelectHours})},t.prototype._renderMinutes=function(){return s.createElement(ne,{center:this.state.center,radius:this.state.radius,spacing:.18*this.state.radius,selected:this.state.time.minutes(),numberRadius:13,onChange:this._onChangeMinutes,onSelect:this._onSelectMinutes})},t.prototype._onChange=function(e){this.setState({time:e}),this.props.onChange&&this.props.onChange(e.clone())},t.prototype._calculateShape=function(){var e=this;null===this._raf&&(this._raf=requestAnimationFrame((function(){var t=Object(T.ensureNotNull)(e._clockFace).getBoundingClientRect(),n=t.left,o=t.top,s=t.width;e.setState({center:{x:n+s/2,y:o+s/2},radius:s/2}),e._raf=null})))},t}(s.PureComponent),re=n("eFBE"),ie=function(e){function t(t){var n=e.call(this,t)||this;return n._format="HH:mm",n._fixValue=function(e){return(e=(e=e.substr(0,5)).replace(/:+/g,":")).endsWith(":")||2!==e.length||(e+=":"),e},n._isValid=function(e){return/^[0-9]{2}:[0-9]{2}/.test(e)&&h(e,n._format).isValid()},n._onType=function(e){var t=n._isValid(e)?h(e,n._format):null;t?n.setState({time:t,isInvalid:!1}):n.setState({isInvalid:!0}),n.props.onPick(t)},n._onSelect=function(e){n.setState({time:e,showClock:!1,isInvalid:!1}),n.props.onPick(e)},n._showClock=function(){n.setState({showClock:!0})},n._hideClock=function(){n.setState({showClock:!1})}, +n._getErrors=function(){var e=n.props.errors?Object(i.__spreadArrays)(n.props.errors):[];return n.state.isInvalid&&e.push(window.t("Please enter the right time format hh:mm")),e},n.state={time:t.initial,showClock:!1,isInvalid:!n._isValid(t.initial.format(n._format))},n}return Object(i.__extends)(t,e),t.prototype.render=function(){return Modernizr.mobiletouch?s.createElement(V,{value:this.state.time.format(this._format),type:"time",onChange:this._onType,icon:re,disabled:this.props.disabled,size:this.props.size,errors:this._getErrors(),showErrorMessages:this.props.showErrorMessages,name:this.props.name,readonly:this.props.readonly}):s.createElement(B,{value:this.state.time.format(this._format),inputRegex:/[0-9:]/,fixValue:this._fixValue,onType:this._onType,onShowPicker:this._showClock,onHidePicker:this._hideClock,showPicker:this.state.showClock,icon:re,disabled:this.props.disabled,size:this.props.size,errors:this._getErrors(),showErrorMessages:this.props.showErrorMessages,name:this.props.name,readonly:this.props.readonly},s.createElement(se,{selectedTime:this.state.time,onSelect:this._onSelect}))},t.prototype.componentWillReceiveProps=function(e){this.props.initial!==e.initial&&this.setState({time:e.initial,isInvalid:!this._isValid(e.initial.format(this._format))})},t}(s.PureComponent),ae=n("FQhm"),ce=n("ZjKI"),pe=n("oj21"),le=n("ycI/"),he=n("pBZQ"),ue=n("ilgf"),de=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._todayMidnight=h("00:00","HH:mm"),t._dateInputDOMElement=null,t._dateInputDOMReference=function(e){t._dateInputDOMElement=e},t}return Object(i.__extends)(t,e),t.prototype.componentDidMount=function(){var e=this;setTimeout((function(){null!==e._dateInputDOMElement&&e._dateInputDOMElement.focus()}),0)},t.prototype.render=function(){return s.createElement(s.Fragment,null,s.createElement(c.b,{onClose:this.props.onEscape},window.t("Go to")),s.createElement(c.a,null,s.createElement(le.a,{keyCode:27,handler:this.props.onEscape}),s.createElement(le.a,{keyCode:13,handler:this.props.onGoToDateHandler}),s.createElement("div",{className:ue.formRow},s.createElement("div",{className:l(ue.cell,ue.input)},s.createElement(Y,{initial:me.lastPickedDate,onPick:this.props.onDatePick,maxDate:this._todayMidnight,disabled:this.props.processing,dateInputDOMReference:this._dateInputDOMReference,showOnFocus:!1})),s.createElement("div",{className:l(ue.cell,ue.input)},s.createElement(ie,{initial:me.lastPickedTime,onPick:this.props.onTimePick,disabled:this.props.processing||this.props.dateOnly||!this.props.date})),s.createElement("div",{className:l(ue.cell,ue.btn)},s.createElement(pe.a,{type:"primary",disabled:!this.props.date||!this.props.time||this.props.processing,onClick:this.props.onGoToDateHandler,className:ue.button},s.createElement(m.Icon,{icon:he}))))))},t}(s.PureComponent),me=function(e){function t(n){var o=e.call(this,n)||this;return o._onDatePick=function(e){o.setState({date:e})},o._onTimePick=function(e){o.setState({time:e})},o._onGoToDate=function(){ +var e=o.props.onGoToDate,n=o.state,s=n.date,r=n.time;if(e&&s&&r){var i=s.clone();i.hours(r.hours()),i.minutes(r.minutes()),e(new Date(i.format("YYYY-MM-DD[T]HH:mm[:00Z]")).valueOf()),t.lastPickedDate=s,t.lastPickedTime=r}},o._handleDialogClose=function(){var e=o.props.onClose;e&&(e(),t._resetLastPickedDate())},o.state={date:t.lastPickedDate,time:t.lastPickedTime},o}return Object(i.__extends)(t,e),t.prototype.componentDidMount=function(){ae.subscribe(ce.CLOSE_POPUPS_AND_DIALOGS_COMMAND,this._handleDialogClose,null)},t.prototype.componentWillUnmount=function(){ae.unsubscribe(ce.CLOSE_POPUPS_AND_DIALOGS_COMMAND,this._handleDialogClose,null)},t.prototype.render=function(){return s.createElement(a.a,{isOpened:this.props.isOpened,onClickOutside:this._handleDialogClose,className:ue.dialog,"data-dialog-type":"go-to-date-dialog"},s.createElement(de,Object(i.__assign)({onDatePick:this._onDatePick,onTimePick:this._onTimePick,onGoToDateHandler:this._onGoToDate,onEscape:this._handleDialogClose},this.props,this.state)))},t._resetLastPickedDate=function(){t.lastPickedDate=h(),t.lastPickedTime=h("00:00","HH:mm")},t.lastPickedDate=h(),t.lastPickedTime=h("00:00","HH:mm"),t}(s.PureComponent);function fe(e){ve({isOpened:!1});var t={isOpened:!0,onClose:function(){ve({isOpened:!1}),oe=null},dateOnly:e.model().mainSeries().isDWM(),onGoToDate:function(t){!function(e,t){if(void 0===e.model().timeScale().tickMarks().minIndex)return;ve({isOpened:!0,processing:!0}),e.model().gotoTime(t).done((function(t){var n=e.model().mainSeries();void 0===t?n.clearGotoDateResult():n.setGotoDateResult(t)})).always((function(){ve({isOpened:!1,processing:!1})}))}(e,t)}};ve(t)}function ve(e){oe||(oe=document.createElement("div"),document.body.appendChild(oe)),r.render(s.createElement(me,e),oe)}n.d(t,"showGoToDateDialog",(function(){return fe}))}}]); \ No newline at end of file diff --git a/public/charting_library/bundles/hammerjs.301c6434a50c89e51f83.js b/public/charting_library/bundles/hammerjs.301c6434a50c89e51f83.js new file mode 100644 index 00000000..deb71721 --- /dev/null +++ b/public/charting_library/bundles/hammerjs.301c6434a50c89e51f83.js @@ -0,0 +1,7 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([["hammerjs"],{be1f:function(t,e,n){"use strict";n.r(e);var i=n("yLV6"),r=n.n(i);n.d(e,"HammerJS",(function(){return r.a}))},yLV6:function(t,e,n){var i;!function(r,s,o,a){"use strict";var h,u=["","webkit","Moz","MS","ms","o"],c=s.createElement("div"),l=Math.round,p=Math.abs,f=Date.now;function v(t,e,n){return setTimeout(I(t,n),e)}function d(t,e,n){return!!Array.isArray(t)&&(m(t,n[e],n),!0)}function m(t,e,n){var i;if(t)if(t.forEach)t.forEach(e,n);else if(void 0!==t.length)for(i=0;i\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",s=r.console&&(r.console.warn||r.console.log);return s&&s.call(r.console,i,n),t.apply(this,arguments)}}h="function"!=typeof Object.assign?function(t){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=1;n-1}function P(t){return t.trim().split(/\s+/g)}function x(t,e,n){if(t.indexOf&&!n)return t.indexOf(e);for(var i=0;in[e]})):i.sort()),i}function R(t,e){for(var n,i,r=e[0].toUpperCase()+e.slice(1),s=0;s1&&!n.firstMultiple?n.firstMultiple=L(e):1===r&&(n.firstMultiple=!1);var s=n.firstInput,o=n.firstMultiple,a=o?o.center:s.center,h=e.center=H(i);e.timeStamp=f(),e.deltaTime=e.timeStamp-s.timeStamp,e.angle=G(a,h),e.distance=j(a,h),function(t,e){var n=e.center,i=t.offsetDelta||{},r=t.prevDelta||{},s=t.prevInput||{};1!==e.eventType&&4!==s.eventType||(r=t.prevDelta={x:s.deltaX||0,y:s.deltaY||0},i=t.offsetDelta={x:n.x,y:n.y});e.deltaX=r.x+(n.x-i.x),e.deltaY=r.y+(n.y-i.y)}(n,e),e.offsetDirection=U(e.deltaX,e.deltaY);var u=V(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=u.x,e.overallVelocityY=u.y,e.overallVelocity=p(u.x)>p(u.y)?u.x:u.y,e.scale=o?(c=o.pointers,l=i,j(l[0],l[1],W)/j(c[0],c[1],W)):1,e.rotation=o?function(t,e){return G(e[1],e[0],W)+G(t[1],t[0],W)}(o.pointers,i):0,e.maxPointers=n.prevInput?e.pointers.length>n.prevInput.maxPointers?e.pointers.length:n.prevInput.maxPointers:e.pointers.length,function(t,e){var n,i,r,s,o=t.lastInterval||e,a=e.timeStamp-o.timeStamp;if(8!=e.eventType&&(a>25||void 0===o.velocity)){var h=e.deltaX-o.deltaX,u=e.deltaY-o.deltaY,c=V(a,h,u);i=c.x,r=c.y,n=p(c.x)>p(c.y)?c.x:c.y,s=U(h,u),t.lastInterval=e}else n=o.velocity,i=o.velocityX,r=o.velocityY,s=o.direction;e.velocity=n,e.velocityX=i,e.velocityY=r,e.direction=s}(n,e);var c,l;var v=t.element;C(e.srcEvent.target,v)&&(v=e.srcEvent.target);e.target=v}(t,n),t.emit("hammer.input",n),t.recognize(n),t.session.prevInput=n}function L(t){for(var e=[],n=0;n=p(e)?t<0?2:4:e<0?8:16}function j(t,e,n){n||(n=F);var i=e[n[0]]-t[n[0]],r=e[n[1]]-t[n[1]];return Math.sqrt(i*i+r*r)}function G(t,e,n){n||(n=F);var i=e[n[0]]-t[n[0]],r=e[n[1]]-t[n[1]];return 180*Math.atan2(r,i)/Math.PI}k.prototype={handler:function(){},init:function(){this.evEl&&S(this.element,this.evEl,this.domHandler),this.evTarget&&S(this.target,this.evTarget,this.domHandler),this.evWin&&S(z(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&_(this.element,this.evEl,this.domHandler),this.evTarget&&_(this.target,this.evTarget,this.domHandler),this.evWin&&_(z(this.element),this.evWin,this.domHandler)}};var J={mousedown:1,mousemove:2,mouseup:4};function Z(){this.evEl="mousedown",this.evWin="mousemove mouseup",this.pressed=!1,k.apply(this,arguments)}E(Z,k,{handler:function(t){var e=J[t.type];1&e&&0===t.button&&(this.pressed=!0),2&e&&1!==t.which&&(e=4),this.pressed&&(4&e&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t], +changedPointers:[t],pointerType:"mouse",srcEvent:t}))}});var B={pointerdown:1,pointermove:2,pointerup:4,pointercancel:8,pointerout:8},$={2:"touch",3:"pen",4:"mouse",5:"kinect"},K="pointerdown",Q="pointermove pointerup pointercancel";function tt(){this.evEl=K,this.evWin=Q,k.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}r.MSPointerEvent&&!r.PointerEvent&&(K="MSPointerDown",Q="MSPointerMove MSPointerUp MSPointerCancel"),E(tt,k,{handler:function(t){var e=this.store,n=!1,i=t.type.toLowerCase().replace("ms",""),r=B[i],s=$[t.pointerType]||t.pointerType,o="touch"==s,a=x(e,t.pointerId,"pointerId");1&r&&(0===t.button||o)?a<0&&(e.push(t),a=e.length-1):12&r&&(n=!0),a<0||(e[a]=t,this.callback(this.manager,r,{pointers:e,changedPointers:[t],pointerType:s,srcEvent:t}),n&&e.splice(a,1))}});var et={touchstart:1,touchmove:2,touchend:4,touchcancel:8};function nt(){this.evTarget="touchstart",this.evWin="touchstart touchmove touchend touchcancel",this.started=!1,k.apply(this,arguments)}function it(t,e){var n=D(t.touches),i=D(t.changedTouches);return 12&e&&(n=O(n.concat(i),"identifier",!0)),[n,i]}E(nt,k,{handler:function(t){var e=et[t.type];if(1===e&&(this.started=!0),this.started){var n=it.call(this,t,e);12&e&&n[0].length-n[1].length==0&&(this.started=!1),this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:"touch",srcEvent:t})}}});var rt={touchstart:1,touchmove:2,touchend:4,touchcancel:8};function st(){this.evTarget="touchstart touchmove touchend touchcancel",this.targetIds={},k.apply(this,arguments)}function ot(t,e){var n=D(t.touches),i=this.targetIds;if(3&e&&1===n.length)return i[n[0].identifier]=!0,[n,n];var r,s,o=D(t.changedTouches),a=[],h=this.target;if(s=n.filter((function(t){return C(t.target,h)})),1===e)for(r=0;r-1&&i.splice(t,1)}),2500)}}function ct(t){for(var e=t.srcEvent.clientX,n=t.srcEvent.clientY,i=0;i-1&&this.requireFail.splice(e,1),this},hasRequireFailures:function(){ +return this.requireFail.length>0},canRecognizeWith:function(t){return!!this.simultaneous[t.id]},emit:function(t){var e=this,n=this.state;function i(n){e.manager.emit(n,t)}n<8&&i(e.options.event+mt(n)),i(e.options.event),t.additionalEvent&&i(t.additionalEvent),n>=8&&i(e.options.event+mt(n))},tryEmit:function(t){if(this.canEmit())return this.emit(t);this.state=32},canEmit:function(){for(var t=0;te.threshold&&r&e.direction},attrTest:function(t){return Tt.prototype.attrTest.call(this,t)&&(2&this.state||!(2&this.state)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=gt(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),E(It,Tt,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return["none"]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||2&this.state)},emit:function(t){if(1!==t.scale){var e=t.scale<1?"in":"out";t.additionalEvent=this.options.event+e}this._super.emit.call(this,t)}}),E(At,dt,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return["auto"]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,i=t.distancee.time;if(this._input=t,!i||!n||12&t.eventType&&!r)this.reset();else if(1&t.eventType)this.reset(),this._timer=v((function(){this.state=8,this.tryEmit()}),e.time,this);else if(4&t.eventType)return 8;return 32},reset:function(){clearTimeout(this._timer)},emit:function(t){8===this.state&&(t&&4&t.eventType?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=f(),this.manager.emit(this.options.event,this._input)))}}),E(bt,Tt,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return["none"]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||2&this.state)}}),E(St,Tt,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:30,pointers:1}, +getTouchAction:function(){return Et.prototype.getTouchAction.call(this)},attrTest:function(t){var e,n=this.options.direction;return 30&n?e=t.overallVelocity:6&n?e=t.overallVelocityX:24&n&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&n&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&&p(e)>this.options.velocity&&4&t.eventType},emit:function(t){var e=gt(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),E(_t,dt,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return["manipulation"]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,i=t.distance'},"8d0Q":function(e,t,a){"use strict";a.d(t,"b",(function(){return i})),a.d(t,"a",(function(){return r}));var n=a("q1tI");function i(){var e=Object(n.useState)(!1),t=e[0],a=e[1];return[t,{onMouseOver:function(e){r(e)&&a(!0)},onMouseOut:function(e){r(e)&&a(!1)}}]}function r(e){return!e.currentTarget.contains(e.relatedTarget)}},KMbc:function(e,t,a){"use strict";a.r(t);var n=a("mrSG"),i=a("q1tI"),r=a("i8i4"),o=a("Eyy1"),s=(a("P5fv"),a("TSYQ")),l=a("4O8T"),c=a.n(l),d=a("Kxc7"),u=a("FQhm"),h=a("PoSe"),v=a.n(h),p=a("17x9"),m=a("cvc5"),f=(a("EsMY"),a("+GaQ")),y=a("+GxX"),b=a("KrBX");function _(e){var t,a=e.children,n=e.className,r=e.noLeftDecoration,o=e.noRightDecoration,l=e.noMinimalWidth,c=e.onClick;return i.createElement("div",{className:s(n,b.group,(t={},t[b.noMinimalWidth]=l,t[b.noLeftDecoration]=r,t[b.noRightDecoration]=o,t)),onClick:c},a)}var S=a("tO+E"),g=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._handleMeasure=function(e){var a=e.width;t.props.onWidthChange(a)},t}return Object(n.__extends)(t,e),t.prototype.render=function(){var e=this.props,t=e.children,a=e.shouldMeasure;return i.createElement(m,{shouldMeasure:a,onMeasure:this._handleMeasure,whitelist:["width"]},i.createElement("div",{className:S.wrap},t))},t}(i.PureComponent),E=a("tU7i"),C=a("Opoj");function w(e){return i.createElement(E.b,Object(n.__assign)({},e,{forceInteractive:!0,icon:C}))}a("YFKU");var M=a("Iivm"),O=a("a+Yp"),I=a("6oLA"),k={text:window.t("View Only Mode")};function F(e){return i.createElement("div",{className:O.wrap +},i.createElement(M.Icon,{className:O.icon,icon:I}),k.text)}var x,W=a("4Cm8"),R=a("XAms");!function(e){e.SymbolSearch="header-toolbar-symbol-search",e.Intervals="header-toolbar-intervals",e.ChartStyles="header-toolbar-chart-styles",e.Compare="header-toolbar-compare",e.Indicators="header-toolbar-indicators",e.StudyTemplates="header-toolbar-study-templates",e.Alerts="header-toolbar-alerts",e.Layouts="header-toolbar-layouts",e.SaveLoad="header-toolbar-save-load",e.UndoRedo="header-toolbar-undo-redo",e.Properties="header-toolbar-properties",e.PublishDesktop="header-toolbar-publish-desktop",e.PublishMobile="header-toolbar-publish-mobile",e.Fullscreen="header-toolbar-fullscreen",e.Screenshot="header-toolbar-screenshot",e.Replay="header-toolbar-replay",e.Financials="header-toolbar-financials",e.StartTrial="header-toolbar-start-trial"}(x||(x={}));var A=a("8d0Q"),N=a("1TxM"),T=a("a8bL"),B=Object(y.isFeatureEnabled)("hide-copy-readonly"),P=Object(N.b)(),V=function(e){function t(t,a){var r=e.call(this,t,a)||this;return r._handleMouseOver=function(e){Object(A.a)(e)&&r.setState({isHovered:!0})},r._handleMouseOut=function(e){Object(A.a)(e)&&r.setState({isHovered:!1})},r._activateSymbolSearchMode=function(){r._setMode(2)},r._activateNormalMode=function(){r._setMode(1)},r._handleInnerResize=function(e){var t=r.props.onWidthChange;t&&t(e)},r._handleMeasureAvailableSpace=function(e){var t=e.width,a=r.props.onAvailableSpaceChange;a&&a(t)},r._processCustoms=function(e){var t=r.props.isFake,a=r.state.mode,o=r.context.tools;return e.map((function(e){return i.createElement(_,{className:s(1!==a&&T.hidden)},i.createElement(o.Custom,Object(n.__assign)({},e,{isFake:t})))}))},r._fixLastGroup=function(e,t,a){if(t===a.length-1&&i.isValidElement(e)&&e.type===_){var n=void 0!==r.context.tools.Publish&&!r.props.readOnly;return i.cloneElement(e,{noRightDecoration:n})}return e},Object(N.c)(a,{tools:p.any.isRequired}),r.state={isHovered:!1,mode:1,isAuthenticated:void 0},r}return Object(n.__extends)(t,e),t.prototype.componentDidMount=function(){0},t.prototype.componentWillUnmount=function(){0},t.prototype.render=function(){var e,t,a=this.context.tools,r=this.props,o=r.features,l=r.displayMode,c=r.chartSaver,d=r.studyMarket,u=r.readOnly,h=r.saveLoadSyncEmitter,v=r.leftCustomButtons,p=r.rightCustomButtons,y=r.showScrollbarWhen,b=r.width,S=void 0===b?0:b,E=r.isFake,C=void 0!==E&&E,M=this.state,O=M.isHovered,I=M.mode,k=(M.isAuthenticated,this._processCustoms(v)),A=this._processCustoms(p),N=y.includes(l);return i.createElement("div",{className:s(T.inner,(e={},e[T.fake]=C,e)),onContextMenu:R.b},i.createElement(m,{onMeasure:this._handleMeasureAvailableSpace,whitelist:["width"],shouldMeasure:!C},i.createElement(W.a,{isVisibleFade:Modernizr.mobiletouch&&N,isVisibleButtons:!Modernizr.mobiletouch&&N&&O,isVisibleScrollbar:!1,shouldMeasure:N&&!C,onMouseOver:this._handleMouseOver,onMouseOut:this._handleMouseOut},i.createElement("div",{className:T.content},i.createElement(g,{onWidthChange:this._handleInnerResize,shouldMeasure:C},i.createElement(f.a,{ +map:this._fixLastGroup},!u&&i.Children.toArray(Object(n.__spreadArrays)([a.SymbolSearch&&i.createElement(_,{key:"symbol",className:2===I&&T.symbolSearch},i.createElement(a.SymbolSearch,{id:C?void 0:x.SymbolSearch,isActionsVisible:o.allowSymbolSearchSpread,isExpanded:2===I,onFocus:this._activateSymbolSearchMode,onBlur:this._activateNormalMode,maxWidth:S})),a.DateRange&&i.createElement(_,{key:"range"},i.createElement(a.DateRange,null)),a.Intervals&&1===I&&i.createElement(_,{key:"intervals"},i.createElement(a.Intervals,{id:C?void 0:x.Intervals,isShownQuicks:o.allowFavoriting,isFavoritingAllowed:o.allowFavoriting,displayMode:l,isFake:C})),a.Bars&&1===I&&i.createElement(_,{key:"styles"},i.createElement(a.Bars,{id:C?void 0:x.ChartStyles,isShownQuicks:o.allowFavoriting,isFavoritingAllowed:o.allowFavoriting,displayMode:l,isFake:C})),a.Compare&&1===I&&i.createElement(_,{key:"compare"},i.createElement(a.Compare,{id:C?void 0:x.Compare,className:T.button,displayMode:l})),a.Indicators&&1===I&&i.createElement(_,{key:"indicators"},i.createElement(a.Indicators,{id:C?void 0:x.Indicators,className:T.button,studyMarket:d,displayMode:l})),a.Financials&&1===I&&i.createElement(_,{key:"financials"},i.createElement(a.Financials,{id:C?void 0:x.Financials,className:T.button,displayMode:l})),a.Templates&&1===I&&i.createElement(_,{key:"templates"},i.createElement(a.Templates,{id:C?void 0:x.StudyTemplates,isShownQuicks:o.allowFavoriting,isFavoritingAllowed:o.allowFavoriting,displayMode:l})),1===I&&a.Alert&&i.createElement(_,{key:"alert"},i.createElement(a.Alert,{id:C?void 0:x.Alerts,className:T.button,displayMode:l})),1===I&&a.AlertReferral&&i.createElement(_,{key:"alert-referral"},i.createElement(a.AlertReferral,{className:T.button,displayMode:l})),a.Replay&&1===I&&i.createElement(_,{key:"replay"},i.createElement(a.Replay,{id:C?void 0:x.Replay,className:T.button,displayMode:l})),a.UndoRedo&&1===I&&i.createElement(_,{key:"undo-redo"},i.createElement(a.UndoRedo,{id:C?void 0:x.UndoRedo})),a.ScalePercentage&&i.createElement(_,{key:"percentage"},i.createElement(a.ScalePercentage,null)),a.ScaleLogarithm&&i.createElement(_,{key:"logarithm"},i.createElement(a.ScaleLogarithm,null))],k)),1===I?([(t=i.Children.toArray(Object(n.__spreadArrays)([u&&i.createElement(_,{key:"view-only-badge"},i.createElement(F,null)),i.createElement(_,{key:"gap",className:s(T.fill,C&&T.collapse)}),!u&&a.Layout&&i.createElement(_,{key:"layout"},i.createElement(a.Layout,{id:C?void 0:x.Layouts})),this._isSaveLoadVisible()&&a.SaveLoad&&i.createElement(_,{key:"save-load-right"},i.createElement(a.SaveLoad,{id:C?void 0:x.SaveLoad,chartSaver:c,isReadOnly:u,displayMode:l,isFake:C,stateSyncEmitter:h})),a.SaveLoadReferral&&i.createElement(_,{key:"save-load-referral"},i.createElement(a.SaveLoadReferral,{isReadOnly:u,displayMode:l})),o.showLaunchInPopupButton&&a.OpenPopup&&i.createElement(_,{key:"popup"},i.createElement(a.OpenPopup,null)),!u&&a.Properties&&i.createElement(_,{key:"properties"},i.createElement(a.Properties,{id:C?void 0:x.Properties,className:T.iconButton +})),!u&&a.Fullscreen&&i.createElement(_,{key:"fullscreen",onClick:this._trackFullscreenButtonClick},i.createElement(a.Fullscreen,{id:C?void 0:x.Fullscreen})),a.Screenshot&&i.createElement(_,{key:"screenshot"},i.createElement(a.Screenshot,{id:C?void 0:x.Screenshot,className:T.iconButton})),!u&&a.Publish&&i.createElement(_,{key:"publish",className:T.mobilePublish},i.createElement(a.Publish,{id:C?void 0:x.PublishMobile}))],A))).findIndex((function(e){return i.isValidElement(e)&&!!e.key&&-1!==e.key.toString().indexOf("view-only-badge")}))].filter((function(e){return e>=0})).forEach((function(e){t=i.Children.map(t,(function(t,a){if(i.isValidElement(t))switch([e-1,e,e+1].indexOf(a)){case 0:t=i.cloneElement(t,{noRightDecoration:!0});break;case 1:t=i.cloneElement(t,{noLeftDecoration:!0,noRightDecoration:!0});break;case 2:t=i.cloneElement(t,{noLeftDecoration:!0})}return t}))})),t):[i.createElement(_,{key:"gap",className:s(T.fill,2===I&&T.minimalPriority)}),i.createElement(_,{key:"symbol-search-close"},i.createElement(w,{className:s(T.iconButton,T.symbolSearchClose)}))]))))),a.Publish&&!u&&!C&&i.createElement(a.Publish,{id:x.PublishDesktop,className:T.desktopPublish}))},t.prototype._onLoginStateChange=function(){0},t.prototype._setMode=function(e){this.setState({mode:e})},t.prototype._trackFullscreenButtonClick=function(){0},t.prototype._isSaveLoadVisible=function(){return!(this.props.readOnly&&B)},t.contextType=P,t}(i.PureComponent);var j=a("hY0g"),D=a.n(j),L=a("ulZB"),H=function(e){function t(t,a,n){return void 0===n&&(n=[]),e.call(this,t,a,"FAVORITE_CHART_STYLES_CHANGED","StyleWidget.quicks",n)||this}return Object(n.__extends)(t,e),t}(L.b),z=a("pPtI"),G=a("IVMC"),Q=a.n(G),U=function(e){function t(t,a,n){return e.call(this,t,a,"FAVORITE_INTERVALS_CHANGED","IntervalWidget.quicks",n)||this}return Object(n.__extends)(t,e),t.prototype._serialize=function(e){return Q()(e.map(z.normalizeIntervalString))},t.prototype._deserialize=function(e){return Q()(Object(z.convertResolutionsFromSettings)(e).filter(z.isResolutionMultiplierValid).map(z.normalizeIntervalString))},t}(L.a),K=(a("bSeV"),function(e){function t(t,a,n){return void 0===n&&(n=[]),e.call(this,t,a,"CUSTOM_INTERVALS_CHANGED","IntervalWidget.intervals",n)||this}return Object(n.__extends)(t,e),t.prototype.set=function(t,a){t.length,this.get().length,e.prototype.set.call(this,t,a)},t.prototype._serialize=function(e){return Q()(e.map(z.normalizeIntervalString))},t.prototype._deserialize=function(e){return Q()(Object(z.convertResolutionsFromSettings)(e).filter(z.isResolutionMultiplierValid).map(z.normalizeIntervalString))},t}(L.a)),X=a("FBuY"),Y=a("Vdly"),q=a("yMne"),J=a("cBZt"),Z=a("TcSq"),ee=a("aIyQ"),te=a.n(ee),ae={},ne=null,ie=function(){function e(e){var t=this;void 0===e&&(e=Y),this._favorites=[],this._favoritesChanged=new te.a,this._settings=e,X.TVXWindowEvents.on("StudyFavoritesChanged",(function(e){var a=JSON.parse(e);t._loadFromState(a.favorites||[])})),this._settings.onSync.subscribe(this,this._loadFavs),this._loadFavs()}return e.prototype.isFav=function(e){ +var t=this.favId(e);return-1!==this._findFavIndex(t)},e.prototype.toggleFavorite=function(e){this.isFav(e)?this.removeFavorite(e):this.addFavorite(e)},e.prototype.addFavorite=function(e){var t=this.favId(e);this._favorites.push(oe(t)),this._favoritesChanged.fire(),this._saveFavs()},e.prototype.removeFavorite=function(e){var t=this.favId(e),a=this._findFavIndex(t);-1!==a&&(this._favorites.splice(a,1),this._favoritesChanged.fire()),this._saveFavs()},e.prototype.favId=function(e){return Object(Z.isPineIdString)(e)?e:Object(Z.extractPineId)(e)||Object(J.extractStudyId)(e)},e.prototype.favorites=function(){return this._favorites},e.prototype.favoritePineIds=function(){return this._favorites.filter((function(e){return"pine"===e.type})).map((function(e){return e.pineId}))},e.prototype.favoritesChanged=function(){return this._favoritesChanged},e.getInstance=function(){return null===ne&&(ne=new e),ne},e.create=function(t){return new e(t)},e.prototype._loadFavs=function(){var e=this._settings.getJSON("studyMarket.favorites",[]);this._loadFromState(e)},e.prototype._saveFavs=function(){var e=this._stateToSave();this._settings.setJSON("studyMarket.favorites",e),X.TVXWindowEvents.emit("StudyFavoritesChanged",JSON.stringify({favorites:e}))},e.prototype._stateToSave=function(){return this._favorites.map(re)},e.prototype._loadFromState=function(e){this._favorites=e.map((function(e){return oe(function(e){return e in ae?ae[e]:e}(e))})),this._favoritesChanged.fire()},e.prototype._findFavIndex=function(e){return this._favorites.findIndex((function(t){return e===re(t)}))},e}();function re(e){return"java"===e.type?e.studyId:e.pineId}function oe(e){return Object(Z.isPineIdString)(e)?{type:"pine",pineId:e}:{type:"java",studyId:e}}var se,le=a("LxhU"),ce=((se={})[le.ResolutionKind.Seconds]=!1,se[le.ResolutionKind.Minutes]=!1,se[le.SpecialResolutionKind.Hours]=!1,se[le.ResolutionKind.Days]=!1,se[le.ResolutionKind.Range]=!1,se),de=function(e){function t(t,a,n){return void 0===n&&(n=ce),e.call(this,t,a,"INTERVALS_MENU_VIEW_STATE_CHANGED","IntervalWidget.menu.viewState",n)||this}return Object(n.__extends)(t,e),t.prototype.isAllowed=function(e){return Object.keys(ce).includes(e)},t}(L.b),ue={defaultsCollapsed:!1},he=(L.b,{tools:p.any.isRequired,isFundamental:p.any,chartApiInstance:p.any,availableTimeFrames:p.any,chartWidgetCollection:p.any,windowMessageService:p.any,favoriteChartStylesService:p.any,favoriteIntervalsService:p.any,customIntervalsService:p.any,favoriteStudyTemplatesService:p.any,studyTemplates:p.any,chartChangesWatcher:p.any,saveChartService:p.any,sharingChartService:p.any,loadChartService:p.any,chartWidget:p.any,favoriteScriptsModel:p.any,intervalsMenuViewStateService:p.any,templatesMenuViewStateService:p.any,financialsDialogController:p.any}),ve=a("6aN0"),pe={Area:3,Bars:0,Candles:1,"Heiken Ashi":8,"Hollow Candles":9,Line:2},me=["1","30","60"];var fe=[],ye=["full","medium"],be=function(e){function t(t){var a,n=e.call(this,t)||this;n._saveLoadSyncEmitter=new c.a,n._handleFullWidthChange=function(e){n._fullWidth=e,n.setState({ +measureValid:!1})},n._handleFavoritesWidthChange=function(e){n._favoritesWidth=e,n.setState({measureValid:!1})},n._handleCollapseWidthChange=function(e){n._collapseWidth=e,n.setState({measureValid:!1})},n._handleMeasure=function(e){n.setState({availableWidth:e,measureValid:!1})};var i=t.tools,r=t.windowMessageService,s=t.chartWidgetCollection,l=t.chartApiInstance,u=t.availableTimeFrames,h=t.isFundamental,p=t.favoriteStudyTemplatesService,m=t.studyTemplates,f=t.saveChartService,y=t.sharingChartService,b=t.loadChartService,_=t.financialsDialogController;n._showScrollbarWhen=Object(o.ensureDefined)(t.allowedModes).slice(-1),n._panelWidthChangeHandlers=((a={}).full=n._handleFullWidthChange,a.medium=n._handleFavoritesWidthChange,a.small=n._handleCollapseWidthChange,a);var S=t.chartChangesWatcher;n._chartChangesWatcher=S;var g=function(e){void 0===e&&(e=[]);var t=e.map((function(e){return pe[e]}))||[1,4,5,6];return d.enabled("widget")&&(t=[0,1,3]),t}(n.props.defaultFavoriteStyles);n._favoriteChartStylesService=new H(X.TVXWindowEvents,Y,g);var E,C=(void 0===(E=n.props.defaultFavoriteIntervals)&&(E=[]),Object(z.mergeResolutions)(E,d.enabled("star_some_intervals_by_default")?me:[]));return n._favoriteIntervalsService=new U(X.TVXWindowEvents,Y,C),n._intervalsMenuViewStateService=new de(X.TVXWindowEvents,Y),n._customIntervalsService=new K(X.TVXWindowEvents,Y),n._registry={tools:i,isFundamental:h,chartWidgetCollection:s,windowMessageService:r,chartApiInstance:l,availableTimeFrames:u,favoriteStudyTemplatesService:p,studyTemplates:m,saveChartService:f,sharingChartService:y,loadChartService:b,intervalsMenuViewStateService:n._intervalsMenuViewStateService,favoriteChartStylesService:n._favoriteChartStylesService,favoriteIntervalsService:n._favoriteIntervalsService,customIntervalsService:n._customIntervalsService,chartChangesWatcher:n._chartChangesWatcher,chartWidget:s.activeChartWidget.value(),favoriteScriptsModel:ie.getInstance(),templatesMenuViewStateService:n._templatesMenuVuewStateService,financialsDialogController:_},n.state={isVisible:!0,availableWidth:0,displayMode:"full",measureValid:!1,leftCustomButtons:[],rightCustomButtons:[]},n._readOnly=s.readOnly(),n._features={allowFavoriting:d.enabled("items_favoriting"),showIdeasButton:Boolean(n.props.ideas),showLaunchInPopupButton:Boolean(n.props.popupButton),allowSymbolSearchSpread:d.enabled("header_symbol_search")&&!d.enabled("charting_library_base"),allowToolbarHiding:d.enabled("collapsible_header")},n._setDisplayMode=v()(n._setDisplayMode,100),n._negotiateResizer(),n}return Object(n.__extends)(t,e),t.prototype.componentDidUpdate=function(e,t){var a=this.state,n=a.isVisible,i=a.measureValid;n!==t.isVisible&&(u.emit("toggle_header",n),this._negotiateResizer()),i||this._setDisplayMode()},t.prototype.render=function(){var e,t=this,a=this.props,r=(a.resizerBridge,a.allowedModes),l=Object(n.__rest)(a,["resizerBridge","allowedModes"]),c=this.state,d=c.displayMode,u=c.availableWidth,h=c.isVisible,v=c.leftCustomButtons,p=c.rightCustomButtons,m=Object(n.__assign)({features:this._features, +readOnly:this._readOnly,isFake:!1,saveLoadSyncEmitter:this._saveLoadSyncEmitter,width:u,leftCustomButtons:v,rightCustomButtons:p},l),f=Object(n.__assign)(Object(n.__assign)({},m),{isFake:!0,showScrollbarWhen:fe}),y=Object(o.ensureDefined)(r),b=this.props.tools.PublishButtonManager||i.Fragment;return i.createElement(N.a,{value:this._registry,validation:he},i.createElement(b,null,i.createElement("div",{className:s(ve.toolbar,(e={},e[ve.isHidden]=!h,e)),onClick:this.props.onClick},i.createElement("div",{className:ve.overflowWrap},i.createElement(V,Object(n.__assign)({key:"live",showScrollbarWhen:this._showScrollbarWhen,displayMode:d,onAvailableSpaceChange:this._handleMeasure},m)),y.map((function(e){return i.createElement(V,Object(n.__assign)({key:e,displayMode:e,onWidthChange:t._panelWidthChangeHandlers[e]},f))}))))))},t.prototype.addButton=function(e){void 0===e&&(e="left");var t=new D.a(0),a=$('
    ')[0],i={key:Number(new Date),element:a,width:t},r=this.state,o=r.leftCustomButtons,s=r.rightCustomButtons;return"left"===e?this.setState({leftCustomButtons:Object(n.__spreadArrays)(o,[i])}):this.setState({rightCustomButtons:Object(n.__spreadArrays)(s,[i])}),a},t.prototype._negotiateResizer=function(){this.props.resizerBridge.negotiateHeight(this.state.isVisible?q.HEADER_TOOLBAR_HEIGHT_EXPANDED:q.HEADER_TOOLBAR_HEIGHT_COLLAPSED)},t.prototype._setDisplayMode=function(){var e,t=this.state.availableWidth,a=this.props.allowedModes,n=((e={}).full=this._fullWidth,e.medium=this._favoritesWidth,e.small=this._collapseWidth,e),i=Object(o.ensureDefined)(a),r=i.map((function(e){return n[e]})).findIndex((function(e){return t>=e}));-1===r&&(r=i.length-1);var s=i[r];this.setState({measureValid:!0,displayMode:s})},t.defaultProps={allowedModes:ye},t}(i.PureComponent);a.d(t,"HeaderToolbarRenderer",(function(){return _e}));var _e=function(){function e(e,t){var a=this;this._component=null,this._handleRef=function(e){a._component=e},this._container=e,r.render(i.createElement(be,Object(n.__assign)({},t,{ref:this._handleRef})),this._container)}return e.prototype.destroy=function(){r.unmountComponentAtNode(this._container)},e.prototype.getComponent=function(){return Object(o.ensureNotNull)(this._component)},e}()},KrBX:function(e,t,a){e.exports={group:"group-wWM3zP_M",noLeftDecoration:"noLeftDecoration-15F5a1TB",noRightDecoration:"noRightDecoration-2GcAAgVb",noMinimalWidth:"noMinimalWidth-1sbl_ff5"}},Opoj:function(e,t){e.exports=''},"a+Yp":function(e,t,a){e.exports={wrap:"wrap-3K4w_7te",icon:"icon-1dNdRXKB"}},a8bL:function(e,t,a){e.exports={"css-value-header-toolbar-height":"38px",inner:"inner-v8eiKwdM",fake:"fake-37paHC6T",fill:"fill-2axUON87",minimalPriority:"minimalPriority-1MGEuVHu",collapse:"collapse-17ig2Mxu",button:"button-3xrjDzA4",iconButton:"iconButton-3vyD3BPg",hidden:"hidden-2kSvETGo",symbolSearch:"symbolSearch-3I4QF1U_", +symbolSearchClose:"symbolSearchClose-3QSRPDvy",content:"content-3mgFz85m",desktopPublish:"desktopPublish-3xVralL7",mobilePublish:"mobilePublish-v3HVdbH2"}},bQ7Y:function(e,t,a){e.exports={button:"button-2ioYhFEY",hover:"hover-yHQNmTbI",isInteractive:"isInteractive-20uLObIc",isGrouped:"isGrouped-2BBXQnbO",isActive:"isActive-22S-lGpa",isOpened:"isOpened-p-Ume5l9",isDisabled:"isDisabled-1_tmrLfP",text:"text-1sK7vbvh",icon:"icon-beK_KS0k"}},"tO+E":function(e,t,a){e.exports={"css-value-header-toolbar-height":"38px",wrap:"wrap-3tiHesTk"}},tU7i:function(e,t,a){"use strict";a.d(t,"a",(function(){return l})),a.d(t,"b",(function(){return c}));var n=a("mrSG"),i=a("q1tI"),r=a("TSYQ"),o=a("Iivm"),s=a("bQ7Y"),l=s,c=i.forwardRef((function(e,t){var a,l=e.icon,c=e.isActive,d=e.isOpened,u=e.isDisabled,h=e.isGrouped,v=e.isHovered,p=e.onClick,m=e.text,f=e.textBeforeIcon,y=e.title,b=e.theme,_=void 0===b?s:b,S=e.className,g=e.forceInteractive,E=Object(n.__rest)(e,["icon","isActive","isOpened","isDisabled","isGrouped","isHovered","onClick","text","textBeforeIcon","title","theme","className","forceInteractive"]),C=r(S,_.button,y&&"apply-common-tooltip",((a={})[_.isActive]=c,a[_.isOpened]=d,a[_.isInteractive]=(g||Boolean(p))&&!u,a[_.isDisabled]=u,a[_.isGrouped]=h,a[_.hover]=v,a)),w=l&&("string"==typeof l?i.createElement(o.Icon,{className:_.icon,icon:l}):i.cloneElement(l,{className:r(_.icon,l.props.className)}));return i.createElement("div",Object(n.__assign)({},E,{ref:t,"data-role":"button",className:C,onClick:u?void 0:p,title:y}),f&&m&&i.createElement("div",{className:r("js-button-text",_.text)},m),w,!f&&m&&i.createElement("div",{className:r("js-button-text",_.text)},m))}))}}]); \ No newline at end of file diff --git a/public/charting_library/bundles/lazy-jquery-ui.249e13605f8c71ad218d.js b/public/charting_library/bundles/lazy-jquery-ui.249e13605f8c71ad218d.js new file mode 100644 index 00000000..4dd4b274 --- /dev/null +++ b/public/charting_library/bundles/lazy-jquery-ui.249e13605f8c71ad218d.js @@ -0,0 +1,34 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([["lazy-jquery-ui"],{"3G7n":function(t,e){!function(t){if(t.support.touch="ontouchend"in document,t.support.touch){var e,i=t.ui.mouse.prototype,s=i._mouseInit,n=i._mouseDestroy;i._touchStart=function(t){!e&&this._mouseCapture(t.originalEvent.changedTouches[0])&&(e=!0,this._touchMoved=!1,o(t,"mouseover"),o(t,"mousemove"),o(t,"mousedown"))},i._touchMove=function(t){e&&(this._touchMoved=!0,o(t,"mousemove"))},i._touchEnd=function(t){e&&(o(t,"mouseup"),o(t,"mouseout"),this._touchMoved||o(t,"click"),e=!1)},i._mouseInit=function(){this.element.bind({touchstart:t.proxy(this,"_touchStart"),touchmove:t.proxy(this,"_touchMove"),touchend:t.proxy(this,"_touchEnd")}),s.call(this)},i._mouseDestroy=function(){this.element.unbind({touchstart:t.proxy(this,"_touchStart"),touchmove:t.proxy(this,"_touchMove"),touchend:t.proxy(this,"_touchEnd")}),n.call(this)}}function o(t,e){if(!(t.originalEvent.touches.length>1)){t.preventDefault();var i=t.originalEvent.changedTouches[0],s=document.createEvent("MouseEvents");s.initMouseEvent(e,!0,!0,window,1,i.screenX,i.screenY,i.clientX,i.clientY,!1,!1,!1,!1,0,null),t.target.dispatchEvent(s)}}}(jQuery)},"7UVs":function(t,e,i){var s,n,o;n=[i("P5fv"),i("iGnl"),i("THJS"),i("alHQ"),i("Qwlt"),i("MIQu")],void 0===(o="function"==typeof(s=function(t){return t.widget("ui.resizable",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,classes:{"ui-resizable-se":"ui-icon ui-icon-gripsmall-diagonal-se"},containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(t){return parseFloat(t)||0},_isNumber:function(t){return!isNaN(parseFloat(t))},_hasScroll:function(e,i){if("hidden"===t(e).css("overflow"))return!1;var s,n=i&&"left"===i?"scrollLeft":"scrollTop";return e[n]>0||(e[n]=1,s=e[n]>0,e[n]=0,s)},_create:function(){var e,i=this.options,s=this;this._addClass("ui-resizable"),t.extend(this,{_aspectRatio:!!i.aspectRatio,aspectRatio:i.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:i.helper||i.ghost||i.animate?i.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(t("
    ").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,e={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(e),this.originalElement.css("margin",0),this.originalResizeStyle=this.originalElement.css("resize"), +this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css(e),this._proportionallyResize()),this._setupHandles(),i.autoHide&&t(this.element).on("mouseenter",(function(){i.disabled||(s._removeClass("ui-resizable-autohide"),s._handles.show())})).on("mouseleave",(function(){i.disabled||s.resizing||(s._addClass("ui-resizable-autohide"),s._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy();var e,i=function(e){t(e).removeData("resizable").removeData("ui-resizable").off(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(i(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_setOption:function(t,e){switch(this._super(t,e),t){case"handles":this._removeHandles(),this._setupHandles()}},_setupHandles:function(){var e,i,s,n,o,r=this.options,a=this;if(this.handles=r.handles||(t(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=t(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),s=this.handles.split(","),this.handles={},i=0;i"),this._addClass(o,"ui-resizable-handle "+n),o.css({zIndex:r.zIndex}),this.handles[e]=".ui-resizable-"+e,this.element.append(o);this._renderAxis=function(e){var i,s,n,o;for(i in e=e||this.element,this.handles)this.handles[i].constructor===String?this.handles[i]=this.element.children(this.handles[i]).first().show():(this.handles[i].jquery||this.handles[i].nodeType)&&(this.handles[i]=t(this.handles[i]),this._on(this.handles[i],{mousedown:a._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(s=t(this.handles[i],this.element),o=/sw|ne|nw|se|n|s/.test(i)?s.outerHeight():s.outerWidth(),n=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),e.css(n,o),this._proportionallyResize()),this._handles=this._handles.add(this.handles[i])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.on("mouseover",(function(){a.resizing||(this.className&&(o=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),a.axis=o&&o[1]?o[1]:"se")})),r.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._handles.remove()},_mouseCapture:function(e){var i,s,n=!1;for(i in this.handles)((s=t(this.handles[i])[0])===e.target||t.contains(s,e.target))&&(n=!0);return!this.options.disabled&&n}, +_mouseStart:function(e){var i,s,n,o=this.options,r=this.element;return this.resizing=!0,this._renderProxy(),i=this._num(this.helper.css("left")),s=this._num(this.helper.css("top")),o.containment&&(i+=t(o.containment).scrollLeft()||0,s+=t(o.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:i,top:s},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:r.width(),height:r.height()},this.originalSize=this._helper?{width:r.outerWidth(),height:r.outerHeight()}:{width:r.width(),height:r.height()},this.sizeDiff={width:r.outerWidth()-r.width(),height:r.outerHeight()-r.height()},this.originalPosition={left:i,top:s},this.originalMousePosition={left:e.pageX,top:e.pageY},this.aspectRatio="number"==typeof o.aspectRatio?o.aspectRatio:this.originalSize.width/this.originalSize.height||1,n=t(".ui-resizable-"+this.axis).css("cursor"),t("body").css("cursor","auto"===n?this.axis+"-resize":n),this._addClass("ui-resizable-resizing"),this._propagate("start",e),!0},_mouseDrag:function(e){var i,s,n=this.originalMousePosition,o=this.axis,r=e.pageX-n.left||0,a=e.pageY-n.top||0,h=this._change[o];return this._updatePrevProperties(),!!h&&(i=h.apply(this,[e,r,a]),this._updateVirtualBoundaries(e.shiftKey),(this._aspectRatio||e.shiftKey)&&(i=this._updateRatio(i,e)),i=this._respectSize(i,e),this._updateCache(i),this._propagate("resize",e),s=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),t.isEmptyObject(s)||(this._updatePrevProperties(),this._trigger("resize",e,this.ui()),this._applyChanges()),!1)},_mouseStop:function(e){this.resizing=!1;var i,s,n,o,r,a,h,l=this.options;return this._helper&&(n=(s=(i=this._proportionallyResizeElements).length&&/textarea/i.test(i[0].nodeName))&&this._hasScroll(i[0],"left")?0:this.sizeDiff.height,o=s?0:this.sizeDiff.width,r={width:this.helper.width()-o,height:this.helper.height()-n},a=parseFloat(this.element.css("left"))+(this.position.left-this.originalPosition.left)||null,h=parseFloat(this.element.css("top"))+(this.position.top-this.originalPosition.top)||null,l.animate||this.element.css(t.extend(r,{top:h,left:a})),this.helper.height(this.size.height),this.helper.width(this.size.width),this._helper&&!l.animate&&this._proportionallyResize()),t("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",e),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(t.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(t.height=this.size.height+"px"),this.helper.css(t),t},_updateVirtualBoundaries:function(t){var e,i,s,n,o,r=this.options;o={ +minWidth:this._isNumber(r.minWidth)?r.minWidth:0,maxWidth:this._isNumber(r.maxWidth)?r.maxWidth:1/0,minHeight:this._isNumber(r.minHeight)?r.minHeight:0,maxHeight:this._isNumber(r.maxHeight)?r.maxHeight:1/0},(this._aspectRatio||t)&&(e=o.minHeight*this.aspectRatio,s=o.minWidth/this.aspectRatio,i=o.maxHeight*this.aspectRatio,n=o.maxWidth/this.aspectRatio,e>o.minWidth&&(o.minWidth=e),s>o.minHeight&&(o.minHeight=s),it.width,r=this._isNumber(t.height)&&e.minHeight&&e.minHeight>t.height,a=this.originalPosition.left+this.originalSize.width,h=this.originalPosition.top+this.originalSize.height,l=/sw|nw|w/.test(i),c=/nw|ne|n/.test(i);return o&&(t.width=e.minWidth),r&&(t.height=e.minHeight),s&&(t.width=e.maxWidth),n&&(t.height=e.maxHeight),o&&l&&(t.left=a-e.minWidth),s&&l&&(t.left=a-e.maxWidth),r&&c&&(t.top=h-e.minHeight),n&&c&&(t.top=h-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_getPaddingPlusBorderDimensions:function(t){for(var e=0,i=[],s=[t.css("borderTopWidth"),t.css("borderRightWidth"),t.css("borderBottomWidth"),t.css("borderLeftWidth")],n=[t.css("paddingTop"),t.css("paddingRight"),t.css("paddingBottom"),t.css("paddingLeft")];e<4;e++)i[e]=parseFloat(s[e])||0,i[e]+=parseFloat(n[e])||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,e=0,i=this.helper||this.element;e
    "),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}), +this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize;return{left:this.originalPosition.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalSize;return{top:this.originalPosition.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},sw:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,i,s]))},ne:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},nw:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,i,s]))}},_propagate:function(e,i){t.ui.plugin.call(this,e,[i,this.ui()]),"resize"!==e&&this._trigger(e,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),t.ui.plugin.add("resizable","animate",{stop:function(e){var i=t(this).resizable("instance"),s=i.options,n=i._proportionallyResizeElements,o=n.length&&/textarea/i.test(n[0].nodeName),r=o&&i._hasScroll(n[0],"left")?0:i.sizeDiff.height,a=o?0:i.sizeDiff.width,h={width:i.size.width-a,height:i.size.height-r},l=parseFloat(i.element.css("left"))+(i.position.left-i.originalPosition.left)||null,c=parseFloat(i.element.css("top"))+(i.position.top-i.originalPosition.top)||null;i.element.animate(t.extend(h,c&&l?{top:c,left:l}:{}),{duration:s.animateDuration,easing:s.animateEasing,step:function(){var s={width:parseFloat(i.element.css("width")),height:parseFloat(i.element.css("height")),top:parseFloat(i.element.css("top")),left:parseFloat(i.element.css("left"))};n&&n.length&&t(n[0]).css({width:s.width,height:s.height}),i._updateCache(s),i._propagate("resize",e)}})}}),t.ui.plugin.add("resizable","containment",{start:function(){var e,i,s,n,o,r,a,h=t(this).resizable("instance"),l=h.options,c=h.element,p=l.containment,d=p instanceof t?p.get(0):/parent/.test(p)?c.parent().get(0):p;d&&(h.containerElement=t(d),/document/.test(p)||p===document?(h.containerOffset={left:0,top:0},h.containerPosition={left:0,top:0},h.parentData={element:t(document),left:0,top:0,width:t(document).width(),height:t(document).height()||document.body.parentNode.scrollHeight}):(e=t(d),i=[],t(["Top","Right","Left","Bottom"]).each((function(t,s){i[t]=h._num(e.css("padding"+s))})),h.containerOffset=e.offset(),h.containerPosition=e.position(),h.containerSize={height:e.innerHeight()-i[3],width:e.innerWidth()-i[1]},s=h.containerOffset,n=h.containerSize.height,o=h.containerSize.width,r=h._hasScroll(d,"left")?d.scrollWidth:o,a=h._hasScroll(d)?d.scrollHeight:n,h.parentData={element:d,left:s.left,top:s.top,width:r,height:a}))},resize:function(e){ +var i,s,n,o,r=t(this).resizable("instance"),a=r.options,h=r.containerOffset,l=r.position,c=r._aspectRatio||e.shiftKey,p={top:0,left:0},d=r.containerElement,u=!0;d[0]!==document&&/static/.test(d.css("position"))&&(p=h),l.left<(r._helper?h.left:0)&&(r.size.width=r.size.width+(r._helper?r.position.left-h.left:r.position.left-p.left),c&&(r.size.height=r.size.width/r.aspectRatio,u=!1),r.position.left=a.helper?h.left:0),l.top<(r._helper?h.top:0)&&(r.size.height=r.size.height+(r._helper?r.position.top-h.top:r.position.top),c&&(r.size.width=r.size.height*r.aspectRatio,u=!1),r.position.top=r._helper?h.top:0),n=r.containerElement.get(0)===r.element.parent().get(0),o=/relative|absolute/.test(r.containerElement.css("position")),n&&o?(r.offset.left=r.parentData.left+r.position.left,r.offset.top=r.parentData.top+r.position.top):(r.offset.left=r.element.offset().left,r.offset.top=r.element.offset().top),i=Math.abs(r.sizeDiff.width+(r._helper?r.offset.left-p.left:r.offset.left-h.left)),s=Math.abs(r.sizeDiff.height+(r._helper?r.offset.top-p.top:r.offset.top-h.top)),i+r.size.width>=r.parentData.width&&(r.size.width=r.parentData.width-i,c&&(r.size.height=r.size.width/r.aspectRatio,u=!1)),s+r.size.height>=r.parentData.height&&(r.size.height=r.parentData.height-s,c&&(r.size.width=r.size.height*r.aspectRatio,u=!1)),u||(r.position.left=r.prevPosition.left,r.position.top=r.prevPosition.top,r.size.width=r.prevSize.width,r.size.height=r.prevSize.height)},stop:function(){var e=t(this).resizable("instance"),i=e.options,s=e.containerOffset,n=e.containerPosition,o=e.containerElement,r=t(e.helper),a=r.offset(),h=r.outerWidth()-e.sizeDiff.width,l=r.outerHeight()-e.sizeDiff.height;e._helper&&!i.animate&&/relative/.test(o.css("position"))&&t(this).css({left:a.left-n.left-s.left,width:h,height:l}),e._helper&&!i.animate&&/static/.test(o.css("position"))&&t(this).css({left:a.left-n.left-s.left,width:h,height:l})}}),t.ui.plugin.add("resizable","alsoResize",{start:function(){var e=t(this).resizable("instance").options;t(e.alsoResize).each((function(){var e=t(this);e.data("ui-resizable-alsoresize",{width:parseFloat(e.width()),height:parseFloat(e.height()),left:parseFloat(e.css("left")),top:parseFloat(e.css("top"))})}))},resize:function(e,i){var s=t(this).resizable("instance"),n=s.options,o=s.originalSize,r=s.originalPosition,a={height:s.size.height-o.height||0,width:s.size.width-o.width||0,top:s.position.top-r.top||0,left:s.position.left-r.left||0};t(n.alsoResize).each((function(){var e=t(this),s=t(this).data("ui-resizable-alsoresize"),n={},o=e.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];t.each(o,(function(t,e){var i=(s[e]||0)+(a[e]||0);i&&i>=0&&(n[e]=i||null)})),e.css(n)}))},stop:function(){t(this).removeData("ui-resizable-alsoresize")}}),t.ui.plugin.add("resizable","ghost",{start:function(){var e=t(this).resizable("instance"),i=e.size;e.ghost=e.originalElement.clone(),e.ghost.css({opacity:.25,display:"block",position:"relative",height:i.height,width:i.width,margin:0,left:0,top:0}), +e._addClass(e.ghost,"ui-resizable-ghost"),!1!==t.uiBackCompat&&"string"==typeof e.options.ghost&&e.ghost.addClass(this.options.ghost),e.ghost.appendTo(e.helper)},resize:function(){var e=t(this).resizable("instance");e.ghost&&e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})},stop:function(){var e=t(this).resizable("instance");e.ghost&&e.helper&&e.helper.get(0).removeChild(e.ghost.get(0))}}),t.ui.plugin.add("resizable","grid",{resize:function(){var e,i=t(this).resizable("instance"),s=i.options,n=i.size,o=i.originalSize,r=i.originalPosition,a=i.axis,h="number"==typeof s.grid?[s.grid,s.grid]:s.grid,l=h[0]||1,c=h[1]||1,p=Math.round((n.width-o.width)/l)*l,d=Math.round((n.height-o.height)/c)*c,u=o.width+p,f=o.height+d,g=s.maxWidth&&s.maxWidthu,v=s.minHeight&&s.minHeight>f;s.grid=h,_&&(u+=l),v&&(f+=c),g&&(u-=l),m&&(f-=c),/^(se|s|e)$/.test(a)?(i.size.width=u,i.size.height=f):/^(ne)$/.test(a)?(i.size.width=u,i.size.height=f,i.position.top=r.top-d):/^(sw)$/.test(a)?(i.size.width=u,i.size.height=f,i.position.left=r.left-p):((f-c<=0||u-l<=0)&&(e=i._getPaddingPlusBorderDimensions(this)),f-c>0?(i.size.height=f,i.position.top=r.top-d):(f=c-e.height,i.size.height=f,i.position.top=r.top+o.height-f),u-l>0?(i.size.width=u,i.position.left=r.left-p):(u=l-e.width,i.size.width=u,i.position.left=r.left+o.width-u))}}),t.ui.resizable})?s.apply(e,n):s)||(t.exports=o)},"8Iik":function(t,e,i){var s,n,o;n=[i("P5fv"),i("Qwlt")],void 0===(o="function"==typeof(s=function(t){return t.fn.scrollParent=function(e){var i=this.css("position"),s="absolute"===i,n=e?/(auto|scroll|hidden)/:/(auto|scroll)/,o=this.parents().filter((function(){var e=t(this);return(!s||"static"!==e.css("position"))&&n.test(e.css("overflow")+e.css("overflow-y")+e.css("overflow-x"))})).eq(0);return"fixed"!==i&&o.length?o:t(this[0].ownerDocument||document)}})?s.apply(e,n):s)||(t.exports=o)},BvgM:function(t,e,i){"use strict";i.r(e);i("T58q"),i("chtW"),i("NvoQ"),i("Vn+K"),i("7UVs"),i("3G7n"),i("bLgU")},CumE:function(t,e,i){var s,n,o;n=[i("P5fv"),i("Qwlt")],void 0===(o="function"==typeof(s=function(t){return t.extend(t.expr[":"],{data:t.expr.createPseudo?t.expr.createPseudo((function(e){return function(i){return!!t.data(i,e)}})):function(e,i,s){return!!t.data(e,s[3])}})})?s.apply(e,n):s)||(t.exports=o)},NvoQ:function(t,e,i){var s,n,o;n=[i("P5fv"),i("iGnl"),i("CumE"),i("NHgk"),i("8Iik"),i("Qwlt"),i("MIQu")],void 0===(o="function"==typeof(s=function(t){return t.widget("ui.sortable",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null +},_isOverAxis:function(t,e,i){return t>=e&&t=0;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(e,i){var s=null,n=!1,o=this;return!(this.reverting||this.options.disabled||"static"===this.options.type||(this._refreshItems(e),t(e.target).parents().each((function(){if(t.data(this,o.widgetName+"-item")===o)return s=t(this),!1})),t.data(e.target,o.widgetName+"-item")===o&&(s=t(e.target)),!s||this.options.handle&&!i&&(t(this.options.handle,s).find("*").addBack().each((function(){this===e.target&&(n=!0)})),!n)||(this.currentItem=s,this._removeCurrentsFromItems(),0)))},_mouseStart:function(e,i,s){var n,o,r=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(e),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,r.cursorAt&&this._adjustOffsetFromHelper(r.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),r.containment&&this._setContainment(),r.cursor&&"auto"!==r.cursor&&(o=this.document.find("body"),this.storedCursor=o.css("cursor"),o.css("cursor",r.cursor),this.storedStylesheet=t("").appendTo(o)),r.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",r.opacity)),r.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",r.zIndex)),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",e,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(), +!s)for(n=this.containers.length-1;n>=0;n--)this.containers[n]._trigger("activate",e,this._uiHash(this));return t.ui.ddmanager&&(t.ui.ddmanager.current=this),t.ui.ddmanager&&!r.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this.dragging=!0,this._addClass(this.helper,"ui-sortable-helper"),this._mouseDrag(e),!0},_mouseDrag:function(e){var i,s,n,o,r=this.options,a=!1;for(this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-e.pageY=0;i--)if(n=(s=this.items[i]).item[0],(o=this._intersectsWithPointer(s))&&s.instance===this.currentContainer&&!(n===this.currentItem[0]||this.placeholder[1===o?"next":"prev"]()[0]===n||t.contains(this.placeholder[0],n)||"semi-dynamic"===this.options.type&&t.contains(this.element[0],n))){if(this.direction=1===o?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(s))break;this._rearrange(e,s),this._trigger("change",e,this._uiHash());break}return this._contactContainers(e),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),this._trigger("sort",e,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(e,i){if(e){if(t.ui.ddmanager&&!this.options.dropBehaviour&&t.ui.ddmanager.drop(this,e),this.options.revert){var s=this,n=this.placeholder.offset(),o=this.options.axis,r={} +;o&&"x"!==o||(r.left=n.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft)),o&&"y"!==o||(r.top=n.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,t(this.helper).animate(r,parseInt(this.options.revert,10)||500,(function(){s._clear(e)}))}else this._clear(e,i);return!1}},cancel:function(){if(this.dragging){this._mouseUp(new t.Event("mouseup",{target:null})),"original"===this.options.helper?(this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")):this.currentItem.show();for(var e=this.containers.length-1;e>=0;e--)this.containers[e]._trigger("deactivate",null,this._uiHash(this)),this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",null,this._uiHash(this)),this.containers[e].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),t.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?t(this.domPosition.prev).after(this.currentItem):t(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},t(i).each((function(){var i=(t(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[\-=_](.+)/);i&&s.push((e.key||i[1]+"[]")+"="+(e.key&&e.expression?i[1]:i[2]))})),!s.length&&e.key&&s.push(e.key+"="),s.join("&")},toArray:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},i.each((function(){s.push(t(e.item||this).attr(e.attribute||"id")||"")})),s},_intersectsWith:function(t){var e=this.positionAbs.left,i=e+this.helperProportions.width,s=this.positionAbs.top,n=s+this.helperProportions.height,o=t.left,r=o+t.width,a=t.top,h=a+t.height,l=this.offset.click.top,c=this.offset.click.left,p="x"===this.options.axis||s+l>a&&s+lo&&e+ct[this.floating?"width":"height"]?u:o0?"down":"up")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return 0!==t&&(t>0?"right":"left")},refresh:function(t){return this._refreshItems(t),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor===String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(e){var i,s,n,o,r=[],a=[],h=this._connectWith();if(h&&e)for(i=h.length-1;i>=0;i--)for(s=(n=t(h[i],this.document[0])).length-1;s>=0;s--)(o=t.data(n[s],this.widgetFullName))&&o!==this&&!o.options.disabled&&a.push([t.isFunction(o.options.items)?o.options.items.call(o.element):t(o.options.items,o.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),o]);function l(){r.push(this)}for(a.push([t.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):t(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),i=a.length-1;i>=0;i--)a[i][0].each(l);return t(r)},_removeCurrentsFromItems:function(){var e=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=t.grep(this.items,(function(t){for(var i=0;i=0;i--)for(s=(n=t(d[i],this.document[0])).length-1;s>=0;s--)(o=t.data(n[s],this.widgetFullName))&&o!==this&&!o.options.disabled&&(p.push([t.isFunction(o.options.items)?o.options.items.call(o.element[0],e,{item:this.currentItem}):t(o.options.items,o.element),o]),this.containers.push(o));for(i=p.length-1;i>=0;i--)for(r=p[i][1],s=0,l=(a=p[i][0]).length;s=0;i--)(s=this.items[i]).instance!==this.currentContainer&&this.currentContainer&&s.item[0]!==this.currentItem[0]||(n=this.options.toleranceElement?t(this.options.toleranceElement,s.item):s.item,e||(s.width=n.outerWidth(),s.height=n.outerHeight()),o=n.offset(),s.left=o.left,s.top=o.top) +;if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(i=this.containers.length-1;i>=0;i--)o=this.containers[i].element.offset(),this.containers[i].containerCache.left=o.left,this.containers[i].containerCache.top=o.top,this.containers[i].containerCache.width=this.containers[i].element.outerWidth(),this.containers[i].containerCache.height=this.containers[i].element.outerHeight();return this},_createPlaceholder:function(e){var i,s=(e=e||this).options;s.placeholder&&s.placeholder.constructor!==String||(i=s.placeholder,s.placeholder={element:function(){var s=e.currentItem[0].nodeName.toLowerCase(),n=t("<"+s+">",e.document[0]);return e._addClass(n,"ui-sortable-placeholder",i||e.currentItem[0].className)._removeClass(n,"ui-sortable-helper"),"tbody"===s?e._createTrPlaceholder(e.currentItem.find("tr").eq(0),t("
     
    ",M=p?"":"",w=0;w<7;w++)M+="";for(C+=M+"",S=this._getDaysInMonth(tt,Z),tt===t.selectedYear&&Z===t.selectedMonth&&(t.selectedDay=Math.min(t.selectedDay,S)),T=(this._getFirstDayOfMonth(tt,Z)-c+7)%7,H=Math.ceil((T+S)/7),N=J&&this.maxRows>H?this.maxRows:H,this.maxRows=N,A=this._daylightSavingAdjust(new Date(tt,Z,1-T)),F=0;F",Y=p?"":"",w=0;w<7;w++)E=m?m.apply(t.input?t.input[0]:null,[A]):[!0,""],O=(W=A.getMonth()!==Z)&&!v||!E[0]||G&&Aq,Y+="",A.setDate(A.getDate()+1),A=this._daylightSavingAdjust(A);C+=Y+""}++Z>11&&(Z=0,tt++),D+=C+="
    "+this._get(t,"weekHeader")+"=5?" class='ui-datepicker-week-end'":"")+">"+u[z]+"
    "+this._get(t,"calculateWeek")(A)+""+(W&&!_?" ":O?""+A.getDate()+"":""+A.getDate()+"")+"
    "+(J?""+(U[0]>0&&P===U[1]-1?"
    ":""):"")}k+=D}return k+=l,t._keyEvent=!1,k},_generateMonthYearHeader:function(t,e,i,s,n,o,r,a){var h,l,c,p,d,u,f,g,m=this._get(t,"changeMonth"),_=this._get(t,"changeYear"),v=this._get(t,"showMonthAfterYear"),y="
    ",k="";if(o||!m)k+=""+r[e]+"";else{for(h=s&&s.getFullYear()===i,l=n&&n.getFullYear()===i,k+=""}if(v||(y+=k+(!o&&m&&_?"":" ")),!t.yearshtml)if(t.yearshtml="",o||!_)y+=""+i+"";else{for(p=this._get(t,"yearRange").split(":"),d=(new Date).getFullYear(),f=(u=function(t){ +var e=t.match(/c[+\-].*/)?i+parseInt(t.substring(1),10):t.match(/[+\-].*/)?d+parseInt(t,10):parseInt(t,10);return isNaN(e)?d:e})(p[0]),g=Math.max(f,u(p[1]||"")),f=s?Math.max(f,s.getFullYear()):f,g=n?Math.min(g,n.getFullYear()):g,t.yearshtml+="",y+=t.yearshtml,t.yearshtml=null}return y+=this._get(t,"yearSuffix"),v&&(y+=(!o&&m&&_?"":" ")+k),y+="
    "},_adjustInstDate:function(t,e,i){var s=t.selectedYear+("Y"===i?e:0),n=t.selectedMonth+("M"===i?e:0),o=Math.min(t.selectedDay,this._getDaysInMonth(s,n))+("D"===i?e:0),r=this._restrictMinMax(t,this._daylightSavingAdjust(new Date(s,n,o)));t.selectedDay=r.getDate(),t.drawMonth=t.selectedMonth=r.getMonth(),t.drawYear=t.selectedYear=r.getFullYear(),"M"!==i&&"Y"!==i||this._notifyChange(t)},_restrictMinMax:function(t,e){var i=this._getMinMaxDate(t,"min"),s=this._getMinMaxDate(t,"max"),n=i&&es?s:n},_notifyChange:function(t){var e=this._get(t,"onChangeMonthYear");e&&e.apply(t.input?t.input[0]:null,[t.selectedYear,t.selectedMonth+1,t])},_getNumberOfMonths:function(t){var e=this._get(t,"numberOfMonths");return null==e?[1,1]:"number"==typeof e?[1,e]:e},_getMinMaxDate:function(t,e){return this._determineDate(t,this._get(t,e+"Date"),null)},_getDaysInMonth:function(t,e){return 32-this._daylightSavingAdjust(new Date(t,e,32)).getDate()},_getFirstDayOfMonth:function(t,e){return new Date(t,e,1).getDay()},_canAdjustMonth:function(t,e,i,s){var n=this._getNumberOfMonths(t),o=this._daylightSavingAdjust(new Date(i,s+(e<0?e:n[0]*n[1]),1));return e<0&&o.setDate(this._getDaysInMonth(o.getFullYear(),o.getMonth())),this._isInRange(t,o)},_isInRange:function(t,e){var i,s,n=this._getMinMaxDate(t,"min"),o=this._getMinMaxDate(t,"max"),r=null,a=null,h=this._get(t,"yearRange");return h&&(i=h.split(":"),s=(new Date).getFullYear(),r=parseInt(i[0],10),a=parseInt(i[1],10),i[0].match(/[+\-].*/)&&(r+=s),i[1].match(/[+\-].*/)&&(a+=s)),(!n||e.getTime()>=n.getTime())&&(!o||e.getTime()<=o.getTime())&&(!r||e.getFullYear()>=r)&&(!a||e.getFullYear()<=a)},_getFormatConfig:function(t){var e=this._get(t,"shortYearCutoff");return{shortYearCutoff:e="string"!=typeof e?e:(new Date).getFullYear()%100+parseInt(e,10),dayNamesShort:this._get(t,"dayNamesShort"),dayNames:this._get(t,"dayNames"),monthNamesShort:this._get(t,"monthNamesShort"),monthNames:this._get(t,"monthNames")}},_formatDate:function(t,e,i,s){e||(t.currentDay=t.selectedDay,t.currentMonth=t.selectedMonth,t.currentYear=t.selectedYear);var n=e?"object"==typeof e?e:this._daylightSavingAdjust(new Date(s,i,e)):this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return this.formatDate(this._get(t,"dateFormat"),n,this._getFormatConfig(t))}}),t.fn.datepicker=function(e){if(!this.length)return this;t.datepicker.initialized||(t(document).on("mousedown",t.datepicker._checkExternalClick),t.datepicker.initialized=!0), +0===t("#"+t.datepicker._mainDivId).length&&t("body").append(t.datepicker.dpDiv);var i=Array.prototype.slice.call(arguments,1);return"string"!=typeof e||"isDisabled"!==e&&"getDate"!==e&&"widget"!==e?"option"===e&&2===arguments.length&&"string"==typeof arguments[1]?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i)):this.each((function(){"string"==typeof e?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this].concat(i)):t.datepicker._attachDatepicker(this,e)})):t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i))},t.datepicker=new i,t.datepicker.initialized=!1,t.datepicker.uuid=(new Date).getTime(),t.datepicker.version="1.12.1",t.datepicker})?s.apply(e,n):s)||(t.exports=o)},alHQ:function(t,e,i){var s,n,o;n=[i("P5fv"),i("Qwlt")],void 0===(o="function"==typeof(s=function(t){return t.ui.plugin={add:function(e,i,s){var n,o=t.ui[e].prototype;for(n in s)o.plugins[n]=o.plugins[n]||[],o.plugins[n].push([i,s[n]])},call:function(t,e,i,s){var n,o=t.plugins[e];if(o&&(s||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(n=0;n0||(this.handle=this._getHandle(e),!this.handle||(this._blurActiveElement(e),this._blockFrames(!0===i.iframeFix?"iframe":i.iframeFix),0)))},_blockFrames:function(e){this.iframeBlocks=this.document.find(e).map((function(){var e=t(this);return t("
    ").css("position","absolute").appendTo(e.parent()).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).offset(e.offset())[0]}))}, +_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(e){var i=t.ui.safeActiveElement(this.document[0]);t(e.target).closest(i).length||t.ui.safeBlur(i)},_mouseStart:function(e){var i=this.options;return this.helper=this._createHelper(e),this._addClass(this.helper,"ui-draggable-dragging"),this._cacheHelperProportions(),t.ui.ddmanager&&(t.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=this.helper.parents().filter((function(){return"fixed"===t(this).css("position")})).length>0,this.positionAbs=this.element.offset(),this._refreshOffsets(e),this.originalPosition=this.position=this._generatePosition(e,!1),this.originalPageX=e.pageX,this.originalPageY=e.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this._setContainment(),!1===this._trigger("start",e)?(this._clear(),!1):(this._cacheHelperProportions(),t.ui.ddmanager&&!i.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this._mouseDrag(e,!0),t.ui.ddmanager&&t.ui.ddmanager.dragStart(this,e),!0)},_refreshOffsets:function(t){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:t.pageX-this.offset.left,top:t.pageY-this.offset.top}},_mouseDrag:function(e,i){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(e,!0),this.positionAbs=this._convertPositionTo("absolute"),!i){var s=this._uiHash();if(!1===this._trigger("drag",e,s))return this._mouseUp(new t.Event("mouseup",e)),!1;this.position=s.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),!1},_mouseStop:function(e){var i=this,s=!1;return t.ui.ddmanager&&!this.options.dropBehaviour&&(s=t.ui.ddmanager.drop(this,e)),this.dropped&&(s=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!s||"valid"===this.options.revert&&s||!0===this.options.revert||t.isFunction(this.options.revert)&&this.options.revert.call(this.element,s)?t(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),(function(){!1!==i._trigger("stop",e)&&i._clear()})):!1!==this._trigger("stop",e)&&this._clear(),!1},_mouseUp:function(e){return this._unblockFrames(),t.ui.ddmanager&&t.ui.ddmanager.dragStop(this,e),this.handleElement.is(e.target)&&this.element.trigger("focus"),t.ui.mouse.prototype._mouseUp.call(this,e)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp(new t.Event("mouseup",{target:this.element[0]})):this._clear(),this},_getHandle:function(e){return!this.options.handle||!!t(e.target).closest(this.element.find(this.options.handle)).length},_setHandleClassName:function(){ +this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this._addClass(this.handleElement,"ui-draggable-handle")},_removeHandleClassName:function(){this._removeClass(this.handleElement,"ui-draggable-handle")},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper),n=s?t(i.helper.apply(this.element[0],[e])):"clone"===i.helper?this.element.clone().removeAttr("id"):this.element;return n.parents("body").length||n.appendTo("parent"===i.appendTo?this.element[0].parentNode:i.appendTo),s&&n[0]===this.element[0]&&this._setPositionRelative(),n[0]===this.element[0]||/(fixed|absolute)/.test(n.css("position"))||n.css("position","absolute"),n},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_isRootNode:function(t){return/(html|body)/i.test(t.tagName)||t===this.document[0]},_getParentOffset:function(){var e=this.offsetParent.offset(),i=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==i&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),this._isRootNode(this.offsetParent[0])&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var t=this.element.position(),e=this._isRootNode(this.scrollParent[0]);return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+(e?0:this.scrollParent.scrollTop()),left:t.left-(parseInt(this.helper.css("left"),10)||0)+(e?0:this.scrollParent.scrollLeft())}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,s,n=this.options,o=this.document[0];this.relativeContainer=null,n.containment?"window"!==n.containment?"document"!==n.containment?n.containment.constructor!==Array?("parent"===n.containment&&(n.containment=this.helper[0].parentNode),(s=(i=t(n.containment))[0])&&(e=/(scroll|auto)/.test(i.css("overflow")), +this.containment=[(parseInt(i.css("borderLeftWidth"),10)||0)+(parseInt(i.css("paddingLeft"),10)||0),(parseInt(i.css("borderTopWidth"),10)||0)+(parseInt(i.css("paddingTop"),10)||0),(e?Math.max(s.scrollWidth,s.offsetWidth):s.offsetWidth)-(parseInt(i.css("borderRightWidth"),10)||0)-(parseInt(i.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(e?Math.max(s.scrollHeight,s.offsetHeight):s.offsetHeight)-(parseInt(i.css("borderBottomWidth"),10)||0)-(parseInt(i.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=i)):this.containment=n.containment:this.containment=[0,0,t(o).width()-this.helperProportions.width-this.margins.left,(t(o).height()||o.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]:this.containment=[t(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,t(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,t(window).scrollLeft()+t(window).width()-this.helperProportions.width-this.margins.left,t(window).scrollTop()+(t(window).height()||o.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]:this.containment=null},_convertPositionTo:function(t,e){e||(e=this.position);var i="absolute"===t?1:-1,s=this._isRootNode(this.scrollParent[0]);return{top:e.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssPosition?-this.offset.scroll.top:s?0:this.offset.scroll.top)*i,left:e.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.offset.scroll.left:s?0:this.offset.scroll.left)*i}},_generatePosition:function(t,e){var i,s,n,o,r=this.options,a=this._isRootNode(this.scrollParent[0]),h=t.pageX,l=t.pageY;return a&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),e&&(this.containment&&(this.relativeContainer?(s=this.relativeContainer.offset(),i=[this.containment[0]+s.left,this.containment[1]+s.top,this.containment[2]+s.left,this.containment[3]+s.top]):i=this.containment,t.pageX-this.offset.click.lefti[2]&&(h=i[2]+this.offset.click.left),t.pageY-this.offset.click.top>i[3]&&(l=i[3]+this.offset.click.top)),r.grid&&(n=r.grid[1]?this.originalPageY+Math.round((l-this.originalPageY)/r.grid[1])*r.grid[1]:this.originalPageY,l=i?n-this.offset.click.top>=i[1]||n-this.offset.click.top>i[3]?n:n-this.offset.click.top>=i[1]?n-r.grid[1]:n+r.grid[1]:n,o=r.grid[0]?this.originalPageX+Math.round((h-this.originalPageX)/r.grid[0])*r.grid[0]:this.originalPageX,h=i?o-this.offset.click.left>=i[0]||o-this.offset.click.left>i[2]?o:o-this.offset.click.left>=i[0]?o-r.grid[0]:o+r.grid[0]:o),"y"===r.axis&&(h=this.originalPageX),"x"===r.axis&&(l=this.originalPageY)),{ +top:l-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:a?0:this.offset.scroll.top),left:h-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:a?0:this.offset.scroll.left)}},_clear:function(){this._removeClass(this.helper,"ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_trigger:function(e,i,s){return s=s||this._uiHash(),t.ui.plugin.call(this,e,[i,s,this],!0),/^(drag|start|stop)/.test(e)&&(this.positionAbs=this._convertPositionTo("absolute"),s.offset=this.positionAbs),t.Widget.prototype._trigger.call(this,e,i,s)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),t.ui.plugin.add("draggable","connectToSortable",{start:function(e,i,s){var n=t.extend({},i,{item:s.element});s.sortables=[],t(s.options.connectToSortable).each((function(){var i=t(this).sortable("instance");i&&!i.options.disabled&&(s.sortables.push(i),i.refreshPositions(),i._trigger("activate",e,n))}))},stop:function(e,i,s){var n=t.extend({},i,{item:s.element});s.cancelHelperRemoval=!1,t.each(s.sortables,(function(){this.isOver?(this.isOver=0,s.cancelHelperRemoval=!0,this.cancelHelperRemoval=!1,this._storedCSS={position:this.placeholder.css("position"),top:this.placeholder.css("top"),left:this.placeholder.css("left")},this._mouseStop(e),this.options.helper=this.options._helper):(this.cancelHelperRemoval=!0,this._trigger("deactivate",e,n))}))},drag:function(e,i,s){t.each(s.sortables,(function(){var n=!1,o=this;o.positionAbs=s.positionAbs,o.helperProportions=s.helperProportions,o.offset.click=s.offset.click,o._intersectsWith(o.containerCache)&&(n=!0,t.each(s.sortables,(function(){return this.positionAbs=s.positionAbs,this.helperProportions=s.helperProportions,this.offset.click=s.offset.click,this!==o&&this._intersectsWith(this.containerCache)&&t.contains(o.element[0],this.element[0])&&(n=!1),n}))),n?(o.isOver||(o.isOver=1,s._parent=i.helper.parent(),o.currentItem=i.helper.appendTo(o.element).data("ui-sortable-item",!0),o.options._helper=o.options.helper,o.options.helper=function(){return i.helper[0]},e.target=o.currentItem[0],o._mouseCapture(e,!0),o._mouseStart(e,!0,!0),o.offset.click.top=s.offset.click.top,o.offset.click.left=s.offset.click.left,o.offset.parent.left-=s.offset.parent.left-o.offset.parent.left,o.offset.parent.top-=s.offset.parent.top-o.offset.parent.top,s._trigger("toSortable",e),s.dropped=o.element,t.each(s.sortables,(function(){this.refreshPositions()})),s.currentItem=s.element,o.fromOutside=s),o.currentItem&&(o._mouseDrag(e),i.position=o.position)):o.isOver&&(o.isOver=0,o.cancelHelperRemoval=!0,o.options._revert=o.options.revert,o.options.revert=!1,o._trigger("out",e,o._uiHash(o)),o._mouseStop(e,!0),o.options.revert=o.options._revert,o.options.helper=o.options._helper, +o.placeholder&&o.placeholder.remove(),i.helper.appendTo(s._parent),s._refreshOffsets(e),i.position=s._generatePosition(e,!0),s._trigger("fromSortable",e),s.dropped=!1,t.each(s.sortables,(function(){this.refreshPositions()})))}))}}),t.ui.plugin.add("draggable","cursor",{start:function(e,i,s){var n=t("body"),o=s.options;n.css("cursor")&&(o._cursor=n.css("cursor")),n.css("cursor",o.cursor)},stop:function(e,i,s){var n=s.options;n._cursor&&t("body").css("cursor",n._cursor)}}),t.ui.plugin.add("draggable","opacity",{start:function(e,i,s){var n=t(i.helper),o=s.options;n.css("opacity")&&(o._opacity=n.css("opacity")),n.css("opacity",o.opacity)},stop:function(e,i,s){var n=s.options;n._opacity&&t(i.helper).css("opacity",n._opacity)}}),t.ui.plugin.add("draggable","scroll",{start:function(t,e,i){i.scrollParentNotHidden||(i.scrollParentNotHidden=i.helper.scrollParent(!1)),i.scrollParentNotHidden[0]!==i.document[0]&&"HTML"!==i.scrollParentNotHidden[0].tagName&&(i.overflowOffset=i.scrollParentNotHidden.offset())},drag:function(e,i,s){var n=s.options,o=!1,r=s.scrollParentNotHidden[0],a=s.document[0];r!==a&&"HTML"!==r.tagName?(n.axis&&"x"===n.axis||(s.overflowOffset.top+r.offsetHeight-e.pageY=0;d--)l=(h=s.snapElements[d].left-s.margins.left)+s.snapElements[d].width,p=(c=s.snapElements[d].top-s.margins.top)+s.snapElements[d].height,_l+g||yp+g||!t.contains(s.snapElements[d].item.ownerDocument,s.snapElements[d].item)?(s.snapElements[d].snapping&&s.options.snap.release&&s.options.snap.release.call(s.element,e,t.extend(s._uiHash(),{snapItem:s.snapElements[d].item})), +s.snapElements[d].snapping=!1):("inner"!==f.snapMode&&(n=Math.abs(c-y)<=g,o=Math.abs(p-v)<=g,r=Math.abs(h-_)<=g,a=Math.abs(l-m)<=g,n&&(i.position.top=s._convertPositionTo("relative",{top:c-s.helperProportions.height,left:0}).top),o&&(i.position.top=s._convertPositionTo("relative",{top:p,left:0}).top),r&&(i.position.left=s._convertPositionTo("relative",{top:0,left:h-s.helperProportions.width}).left),a&&(i.position.left=s._convertPositionTo("relative",{top:0,left:l}).left)),u=n||o||r||a,"outer"!==f.snapMode&&(n=Math.abs(c-v)<=g,o=Math.abs(p-y)<=g,r=Math.abs(h-m)<=g,a=Math.abs(l-_)<=g,n&&(i.position.top=s._convertPositionTo("relative",{top:c,left:0}).top),o&&(i.position.top=s._convertPositionTo("relative",{top:p-s.helperProportions.height,left:0}).top),r&&(i.position.left=s._convertPositionTo("relative",{top:0,left:h}).left),a&&(i.position.left=s._convertPositionTo("relative",{top:0,left:l-s.helperProportions.width}).left)),!s.snapElements[d].snapping&&(n||o||r||a||u)&&s.options.snap.snap&&s.options.snap.snap.call(s.element,e,t.extend(s._uiHash(),{snapItem:s.snapElements[d].item})),s.snapElements[d].snapping=n||o||r||a||u)}}),t.ui.plugin.add("draggable","stack",{start:function(e,i,s){var n,o=s.options,r=t.makeArray(t(o.stack)).sort((function(e,i){return(parseInt(t(e).css("zIndex"),10)||0)-(parseInt(t(i).css("zIndex"),10)||0)}));r.length&&(n=parseInt(t(r[0]).css("zIndex"),10)||0,t(r).each((function(e){t(this).css("zIndex",n+e)})),this.css("zIndex",n+r.length))}}),t.ui.plugin.add("draggable","zIndex",{start:function(e,i,s){var n=t(i.helper),o=s.options;n.css("zIndex")&&(o._zIndex=n.css("zIndex")),n.css("zIndex",o.zIndex)},stop:function(e,i,s){var n=s.options;n._zIndex&&t(i.helper).css("zIndex",n._zIndex)}}),t.ui.draggable})?s.apply(e,n):s)||(t.exports=o)},vBzC:function(t,e,i){var s,n,o;n=[i("P5fv"),i("Qwlt")],void 0===(o="function"==typeof(s=function(t){return t.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}})?s.apply(e,n):s)||(t.exports=o)},"yM/z":function(t,e,i){var s,n,o;n=[i("P5fv"),i("Qwlt")],void 0===(o="function"==typeof(s=function(t){return t.ui.safeBlur=function(e){e&&"body"!==e.nodeName.toLowerCase()&&t(e).trigger("blur")}})?s.apply(e,n):s)||(t.exports=o)},yw1R:function(t,e,i){var s,n,o;n=[i("P5fv"),i("Qwlt")],void 0===(o="function"==typeof(s=function(t){return t.ui.safeActiveElement=function(t){var e;try{e=t.activeElement}catch(i){e=t.body}return e||(e=t.body),e.nodeName||(e=t.body),e}})?s.apply(e,n):s)||(t.exports=o)}}]); \ No newline at end of file diff --git a/public/charting_library/bundles/lazy-velocity.90ed6d5911c9f69dd4d3.js b/public/charting_library/bundles/lazy-velocity.90ed6d5911c9f69dd4d3.js new file mode 100644 index 00000000..ca953821 --- /dev/null +++ b/public/charting_library/bundles/lazy-velocity.90ed6d5911c9f69dd4d3.js @@ -0,0 +1,15 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([["lazy-velocity"],{WJ2Z:function(e,t,r){var a,i;!function(e){"use strict";if(!e.jQuery){var t=function(e,r){return new t.fn.init(e,r)};t.isWindow=function(e){return e&&e===e.window},t.type=function(e){return e?"object"==typeof e||"function"==typeof e?a[n.call(e)]||"object":typeof e:e+""},t.isArray=Array.isArray||function(e){return"array"===t.type(e)},t.isPlainObject=function(e){var r;if(!e||"object"!==t.type(e)||e.nodeType||t.isWindow(e))return!1;try{if(e.constructor&&!i.call(e,"constructor")&&!i.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(a){return!1}for(r in e);return void 0===r||i.call(e,r)},t.each=function(e,t,r){var a=0,i=e.length,n=l(e);if(r){if(n)for(;a0&&r-1 in e))}}(window),function(n){"use strict";"object"==typeof e.exports?e.exports=n():void 0===(i="function"==typeof(a=n)?a.call(t,r,t,e):a)||(e.exports=i)}((function(){"use strict";return function(e,t,r,a){var i,n=function(){if(r.documentMode)return r.documentMode;for(var e=7;e>4;e--){var t=r.createElement("div");if(t.innerHTML="\x3c!--[if IE "+e+"]>=0?t:Math.max(0,a+t),s=(r<0?a+r:Math.min(r,a))-o;if(s>0)if(n=new Array(s),this.charAt)for(i=0;i=0}:function(e,t){for(var r=0;r1e-4&&Math.abs(s.v)>1e-4;);return n?function(e){return u[e*(u.length-1)|0]}:c}}();g.Easings={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},spring:function(e){return 1-Math.cos(4.5*e*Math.PI)*Math.exp(6*-e)}}, +d.each([["ease",[.25,.1,.25,1]],["ease-in",[.42,0,1,1]],["ease-out",[0,0,.58,1]],["ease-in-out",[.42,0,.58,1]],["easeInSine",[.47,0,.745,.715]],["easeOutSine",[.39,.575,.565,1]],["easeInOutSine",[.445,.05,.55,.95]],["easeInQuad",[.55,.085,.68,.53]],["easeOutQuad",[.25,.46,.45,.94]],["easeInOutQuad",[.455,.03,.515,.955]],["easeInCubic",[.55,.055,.675,.19]],["easeOutCubic",[.215,.61,.355,1]],["easeInOutCubic",[.645,.045,.355,1]],["easeInQuart",[.895,.03,.685,.22]],["easeOutQuart",[.165,.84,.44,1]],["easeInOutQuart",[.77,0,.175,1]],["easeInQuint",[.755,.05,.855,.06]],["easeOutQuint",[.23,1,.32,1]],["easeInOutQuint",[.86,0,.07,1]],["easeInExpo",[.95,.05,.795,.035]],["easeOutExpo",[.19,1,.22,1]],["easeInOutExpo",[1,0,0,1]],["easeInCirc",[.6,.04,.98,.335]],["easeOutCirc",[.075,.82,.165,1]],["easeInOutCirc",[.785,.135,.15,.86]]],(function(e,t){g.Easings[t[0]]=k.apply(null,t[1])}));var h=g.CSS={RegEx:{isHex:/^#([A-f\d]{3}){1,2}$/i,valueUnwrap:/^[A-z]+\((.*)\)$/i,wrappedValueAlreadyExtracted:/[0-9.]+ [0-9.]+ [0-9.]+( [0-9.]+)?/,valueSplit:/([A-z]+\(.+\))|(([A-z0-9#-.]+?)(?=\s|$))/gi},Lists:{colors:["fill","stroke","stopColor","color","backgroundColor","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","outlineColor"],transformsBase:["translateX","translateY","scale","scaleX","scaleY","skewX","skewY","rotateZ"],transforms3D:["transformPerspective","translateZ","scaleZ","rotateX","rotateY"],units:["%","em","ex","ch","rem","vw","vh","vmin","vmax","cm","mm","Q","in","pc","pt","px","deg","grad","rad","turn","s","ms"],colorNames:{aliceblue:"240,248,255",antiquewhite:"250,235,215",aquamarine:"127,255,212",aqua:"0,255,255",azure:"240,255,255",beige:"245,245,220",bisque:"255,228,196",black:"0,0,0",blanchedalmond:"255,235,205",blueviolet:"138,43,226",blue:"0,0,255",brown:"165,42,42",burlywood:"222,184,135",cadetblue:"95,158,160",chartreuse:"127,255,0",chocolate:"210,105,30",coral:"255,127,80",cornflowerblue:"100,149,237",cornsilk:"255,248,220",crimson:"220,20,60",cyan:"0,255,255",darkblue:"0,0,139",darkcyan:"0,139,139",darkgoldenrod:"184,134,11",darkgray:"169,169,169",darkgrey:"169,169,169",darkgreen:"0,100,0",darkkhaki:"189,183,107",darkmagenta:"139,0,139",darkolivegreen:"85,107,47",darkorange:"255,140,0",darkorchid:"153,50,204",darkred:"139,0,0",darksalmon:"233,150,122",darkseagreen:"143,188,143",darkslateblue:"72,61,139",darkslategray:"47,79,79",darkturquoise:"0,206,209",darkviolet:"148,0,211",deeppink:"255,20,147",deepskyblue:"0,191,255",dimgray:"105,105,105",dimgrey:"105,105,105",dodgerblue:"30,144,255",firebrick:"178,34,34",floralwhite:"255,250,240",forestgreen:"34,139,34",fuchsia:"255,0,255",gainsboro:"220,220,220",ghostwhite:"248,248,255",gold:"255,215,0",goldenrod:"218,165,32",gray:"128,128,128",grey:"128,128,128",greenyellow:"173,255,47",green:"0,128,0",honeydew:"240,255,240",hotpink:"255,105,180",indianred:"205,92,92",indigo:"75,0,130",ivory:"255,255,240",khaki:"240,230,140",lavenderblush:"255,240,245",lavender:"230,230,250",lawngreen:"124,252,0",lemonchiffon:"255,250,205", +lightblue:"173,216,230",lightcoral:"240,128,128",lightcyan:"224,255,255",lightgoldenrodyellow:"250,250,210",lightgray:"211,211,211",lightgrey:"211,211,211",lightgreen:"144,238,144",lightpink:"255,182,193",lightsalmon:"255,160,122",lightseagreen:"32,178,170",lightskyblue:"135,206,250",lightslategray:"119,136,153",lightsteelblue:"176,196,222",lightyellow:"255,255,224",limegreen:"50,205,50",lime:"0,255,0",linen:"250,240,230",magenta:"255,0,255",maroon:"128,0,0",mediumaquamarine:"102,205,170",mediumblue:"0,0,205",mediumorchid:"186,85,211",mediumpurple:"147,112,219",mediumseagreen:"60,179,113",mediumslateblue:"123,104,238",mediumspringgreen:"0,250,154",mediumturquoise:"72,209,204",mediumvioletred:"199,21,133",midnightblue:"25,25,112",mintcream:"245,255,250",mistyrose:"255,228,225",moccasin:"255,228,181",navajowhite:"255,222,173",navy:"0,0,128",oldlace:"253,245,230",olivedrab:"107,142,35",olive:"128,128,0",orangered:"255,69,0",orange:"255,165,0",orchid:"218,112,214",palegoldenrod:"238,232,170",palegreen:"152,251,152",paleturquoise:"175,238,238",palevioletred:"219,112,147",papayawhip:"255,239,213",peachpuff:"255,218,185",peru:"205,133,63",pink:"255,192,203",plum:"221,160,221",powderblue:"176,224,230",purple:"128,0,128",red:"255,0,0",rosybrown:"188,143,143",royalblue:"65,105,225",saddlebrown:"139,69,19",salmon:"250,128,114",sandybrown:"244,164,96",seagreen:"46,139,87",seashell:"255,245,238",sienna:"160,82,45",silver:"192,192,192",skyblue:"135,206,235",slateblue:"106,90,205",slategray:"112,128,144",snow:"255,250,250",springgreen:"0,255,127",steelblue:"70,130,180",tan:"210,180,140",teal:"0,128,128",thistle:"216,191,216",tomato:"255,99,71",turquoise:"64,224,208",violet:"238,130,238",wheat:"245,222,179",whitesmoke:"245,245,245",white:"255,255,255",yellowgreen:"154,205,50",yellow:"255,255,0"}},Hooks:{templates:{textShadow:["Color X Y Blur","black 0px 0px 0px"],boxShadow:["Color X Y Blur Spread","black 0px 0px 0px 0px"],clip:["Top Right Bottom Left","0px 0px 0px 0px"],backgroundPosition:["X Y","0% 0%"],transformOrigin:["X Y Z","50% 50% 0px"],perspectiveOrigin:["X Y","50% 50%"]},registered:{},register:function(){for(var e=0;e=1?"":"alpha(opacity="+parseInt(100*parseFloat(r),10)+")"}else switch(e){case"name":return"opacity";case"extract":case"inject":return r}}},register:function(){n&&!(n>9)||g.State.isGingerbread||(h.Lists.transformsBase=h.Lists.transformsBase.concat(h.Lists.transforms3D));for(var e=0;e8)&&3===i.split(" ").length&&(i+=" 1"),i;case"inject": +return/^rgb/.test(a)?a:(n<=8?4===a.split(" ").length&&(a=a.split(/\s+/).slice(0,3).join(" ")):3===a.split(" ").length&&(a+=" 1"),(n<=8?"rgb":"rgba")+"("+a.replace(/\s+/g,",").replace(/\.(\d)+(?=,)/g,"")+")")}}}();function r(e,t,r){if("border-box"===h.getPropertyValue(t,"boxSizing").toString().toLowerCase()===(r||!1)){var a,i,n=0,o="width"===e?["Left","Right"]:["Top","Bottom"],s=["padding"+o[0],"padding"+o[1],"border"+o[0]+"Width","border"+o[1]+"Width"];for(a=0;a=2&&console.log("Get "+r+": "+s),s},setPropertyValue:function(e,r,a,i,o){var s=r;if("scroll"===r)o.container?o.container["scroll"+o.direction]=a:"Left"===o.direction?t.scrollTo(a,o.alternateValue):t.scrollTo(o.alternateValue,a);else if(h.Normalizations.registered[r]&&"transform"===h.Normalizations.registered[r]("name",e))h.Normalizations.registered[r]("inject",e,a),s="transform",a=x(e).transformCache[r];else{if(h.Hooks.registered[r]){var l=r,u=h.Hooks.getRoot(r);i=i||h.getPropertyValue(e,u),a=h.Hooks.injectValue(l,a,i),r=u}if(h.Normalizations.registered[r]&&(a=h.Normalizations.registered[r]("inject",e,a),r=h.Normalizations.registered[r]("name",e)),s=h.Names.prefixCheck(r)[0],n<=8)try{e.style[s]=a}catch(d){g.debug&&console.log("Browser does not support ["+a+"] for ["+s+"]")}else{var c=x(e);c&&c.isSVG&&h.Names.SVGAttribute(r)?e.setAttribute(r,a):e.style[s]=a} +g.debug>=2&&console.log("Set "+r+" ("+s+"): "+a)}return[s,a]},flushTransformCache:function(e){var t="",r=x(e);if((n||g.State.isAndroid&&!g.State.isChrome)&&r&&r.isSVG){var a=function(t){return parseFloat(h.getPropertyValue(e,t))},i={translate:[a("translateX"),a("translateY")],skewX:[a("skewX")],skewY:[a("skewY")],scale:1!==a("scale")?[a("scale"),a("scale")]:[a("scaleX"),a("scaleY")],rotate:[a("rotateZ"),0,0]};d.each(x(e).transformCache,(function(e){/^translate/i.test(e)?e="translate":/^scale/i.test(e)?e="scale":/^rotate/i.test(e)&&(e="rotate"),i[e]&&(t+=e+"("+i[e].join(" ")+") ",delete i[e])}))}else{var o,s;d.each(x(e).transformCache,(function(r){if(o=x(e).transformCache[r],"transformPerspective"===r)return s=o,!0;9===n&&"rotateZ"===r&&(r="rotate"),t+=r+o+" "})),s&&(t="perspective"+s+" "+t)}h.setPropertyValue(e,"transform",t)}};h.Hooks.register(),h.Normalizations.register(),g.hook=function(e,t,r){var a;return e=c(e),d.each(e,(function(e,i){if(void 0===x(i)&&g.init(i),void 0===r)void 0===a&&(a=h.getPropertyValue(i,t));else{var n=h.setPropertyValue(i,t,r);"transform"===n[0]&&g.CSS.flushTransformCache(i),a=n}})),a};var y=function(){var e;function a(){return i?v.promise||null:n}var i,n,o,s,l,f,m=arguments[0]&&(arguments[0].p||d.isPlainObject(arguments[0].properties)&&!arguments[0].properties.names||p.isString(arguments[0].properties));p.isWrapped(this)?(i=!1,o=0,s=this,n=this):(i=!0,o=1,s=m?arguments[0].elements||arguments[0].e:arguments[0]);var v={promise:null,resolver:null,rejecter:null};if(i&&g.Promise&&(v.promise=new g.Promise((function(e,t){v.resolver=e,v.rejecter=t}))),m?(l=arguments[0].properties||arguments[0].p,f=arguments[0].options||arguments[0].o):(l=arguments[o],f=arguments[o+1]),s=c(s)){var b,P=s.length,k=0;if(!/^(stop|finish|finishAll|pause|resume)$/i.test(l)&&!d.isPlainObject(f)){var A=o+1;f={};for(var F=A;F=4&&"("===H?F++:(F&&F<5||F>=4&&")"===H&&--F<5)&&(F=0),0===E&&"r"===H||1===E&&"g"===H||2===E&&"b"===H||3===E&&"a"===H||E>=3&&"("===H?(3===E&&"a"===H&&(N=1),E++):N&&","===H?++N>3&&(E=N=0):(N&&E<(N?5:4)||E>=(N?4:3)&&")"===H&&--E<(N?5:4))&&(E=N=0)}}V===b.length&&T===f.length||(g.debug&&console.error('Trying to pattern match mis-matched strings ["'+f+'", "'+b+'"]'),s=void 0),s&&(C.length?(g.debug&&console.log('Pattern found "'+s+'" -> ',C,A,"["+b+","+f+"]"),b=C,f=A,w=S=""):s=void 0)}s||(b=(x=k(a,b))[0],S=x[1],f=(x=k(a,f))[0].replace(/^([+-\/*])=/,(function(e,t){return P=t,""})),w=x[1],b=parseFloat(b)||0,f=parseFloat(f)||0,"%"===w&&(/^(fontSize|lineHeight)$/.test(a)?(f/=100,w="em"):/^scale/.test(a)?(f/=100,w=""):/(Red|Green|Blue)$/i.test(a)&&(f=f/100*255,w="")));if(/[\/*]/.test(P))w=S;else if(S!==w&&0!==b)if(0===f)w=S;else{i=i||function(){var a={myParent:e.parentNode||r.body,position:h.getPropertyValue(e,"position"),fontSize:h.getPropertyValue(e,"fontSize")},i=a.position===q.lastPosition&&a.myParent===q.lastParent,n=a.fontSize===q.lastFontSize;q.lastParent=a.myParent,q.lastPosition=a.position,q.lastFontSize=a.fontSize;var o={};if(n&&i)o.emToPx=q.lastEmToPx,o.percentToPxWidth=q.lastPercentToPxWidth,o.percentToPxHeight=q.lastPercentToPxHeight;else{var s=m&&m.isSVG?r.createElementNS("http://www.w3.org/2000/svg","rect"):r.createElement("div");g.init(s),a.myParent.appendChild(s),d.each(["overflow","overflowX","overflowY"],(function(e,t){g.CSS.setPropertyValue(s,t,"hidden")})),g.CSS.setPropertyValue(s,"position",a.position),g.CSS.setPropertyValue(s,"fontSize",a.fontSize),g.CSS.setPropertyValue(s,"boxSizing","content-box"),d.each(["minWidth","maxWidth","width","minHeight","maxHeight","height"],(function(e,t){g.CSS.setPropertyValue(s,t,"100%")})),g.CSS.setPropertyValue(s,"paddingLeft","100em"),o.percentToPxWidth=q.lastPercentToPxWidth=(parseFloat(h.getPropertyValue(s,"width",null,!0))||1)/100,o.percentToPxHeight=q.lastPercentToPxHeight=(parseFloat(h.getPropertyValue(s,"height",null,!0))||1)/100,o.emToPx=q.lastEmToPx=(parseFloat(h.getPropertyValue(s,"paddingLeft"))||1)/100,a.myParent.removeChild(s)}return null===q.remToPx&&(q.remToPx=parseFloat(h.getPropertyValue(r.body,"fontSize"))||16),null===q.vwToPx&&(q.vwToPx=parseFloat(t.innerWidth)/100,q.vhToPx=parseFloat(t.innerHeight)/100),o.remToPx=q.remToPx,o.vwToPx=q.vwToPx,o.vhToPx=q.vhToPx,g.debug>=1&&console.log("Unit ratios: "+JSON.stringify(o),e),o}();var I=/margin|padding|left|right|width|text|word|letter/i.test(a)||/X$/.test(a)||"x"===a?"x":"y";switch(S){case"%":b*="x"===I?i.percentToPxWidth:i.percentToPxHeight;break;case"px":break;default:b*=i[S+"ToPx"]}switch(w){case"%":b*=1/("x"===I?i.percentToPxWidth:i.percentToPxHeight);break;case"px":break;default:b*=1/i[w+"ToPx"]}}switch(P){case"+":f=b+f;break;case"-":f=b-f;break;case"*":f*=b;break;case"/":f=b/f}c[a]={rootPropertyValue:u,startValue:b,currentValue:b,endValue:f,unitType:w,easing:v},s&&(c[a].pattern=s), +g.debug&&console.log("tweensContainer ("+a+"): "+JSON.stringify(c[a]),e)}else g.debug&&console.log("Skipping ["+l+"] due to a lack of browser support.")};for(var j in l)if(l.hasOwnProperty(j)){var L=h.Names.camelCase(j),R=H(l[j]);if(u(h.Lists.colors)){var M=R[0],W=R[1],$=R[2];if(h.RegEx.isHex.test(M)){for(var B=["Red","Green","Blue"],I=h.Values.hexToRgb(M),D=$?h.Values.hexToRgb($):void 0,G=0;G0?i=o:r=o}while(Math.abs(n)>s&&++u=o?b(t,s):0===l?s:w(t,r,r+c)}var P=!1;function k(){P=!0,e===r&&a===i||x()}var V=function(t){return P||k(),e===r&&a===i?t:0===t?0:1===t?1:y(S(t),r,i)};V.getControlPoints=function(){return[{x:e,y:r},{x:a,y:i}]};var T="generateBezier("+[e,r,a,i]+")";return V.toString=function(){return T},V}function V(e,t){var r=e;return p.isString(e)?g.Easings[e]||(r=!1):r=p.isArray(e)&&1===e.length?P.apply(null,e):p.isArray(e)&&2===e.length?m.apply(null,e.concat([t])):!(!p.isArray(e)||4!==e.length)&&k.apply(null,e),!1===r&&(r=g.Easings[g.defaults.easing]?g.defaults.easing:"swing"),r}function T(e){if(e){var t=g.timestamp&&!0!==e?e:s.now(),r=g.State.calls.length;r>1e4&&(g.State.calls=function(e){for(var t=-1,r=e?e.length:0,a=[];++t'+e+""}));a.innerHTML=(t=l.text).format.apply(t,c).replace(/\s\+\s/g,'+'),n.classList.add(b["common-tooltip__body--with-hotkey"]),s&&a.classList.add(b["common-tooltip__hotkey-block--divider"]),n.appendChild(a)}return i.addEventListener("contextmenu",g.a),i}function P(e,t){var i=t.rect;if(i){!function(e,t){var i,n=_.includes(t)?p[t]:"";(i=e.classList).remove.apply(i,_.map((function(e){return p[e]})).filter((function(e){return!!e}))),n&&!e.classList.contains(n)&&e.classList.add(n)}(e,t.colorTheme||"default"),t.addClass&&e.classList.add(t.addClass);var n=A(e);n.classList.toggle(b["common-tooltip__body--width_wide"],Boolean(t.wide)),n.classList.toggle(b["common-tooltip__body--no-padding"],Boolean(t.noPadding)),n.classList.toggle(b["common-tooltip__body--width_narrow"],Boolean(t.narrow)),n.classList.toggle(b["common-tooltip__body--no-buttons"],!0),e.classList.toggle(b["common-tooltip--no-pointer-events"],!Modernizr.pointerevents),n.style.left=x(0),n.style.width=x(n.clientWidth+(Boolean(t.noPadding)?0:2));var r=document.body.clientWidth,o=window.innerHeight,s=t.vertical,a=t.extendMargin||s&&i.w<20||!s&&i.h<20;e.classList.toggle(b["common-tooltip--farther"],a),e.classList.toggle(b["common-tooltip--vertical"],s),e.classList.toggle(b["common-tooltip--horizontal"],!s);var l=e.querySelector("."+b["common-tooltip__ear-holder"]),c="";if(s){e.style.left=x(i.x+i.w),e.style.top=x(i.y-(e.offsetHeight-i.h)/2);var u=(e.querySelector(":last-child")||n).getBoundingClientRect().right+10>r;e.classList.toggle(b["common-tooltip--direction_reversed"],u),e.classList.toggle(b["common-tooltip--direction_normal"],!u),c=u?"after":"before",Object(y.isRtl)()?(c=t.otr?"after":c,c=t.otl?"before":c):(c=t.otr?"before":c,c=t.otl?"after":c), +l.classList.toggle(b["common-tooltip__ear-holder--before"],"before"===c),l.classList.toggle(b["common-tooltip__ear-holder--after"],"after"===c),"after"===c&&(e.style.left="auto",e.style.right=x(r-i.x))}else{var h=i.x-(n.offsetWidth-i.w)/2,d=r-10-e.offsetWidth,f=Math.max(10,Math.min(h,d));e.style.bottom=x(o-i.y),e.style.left=x(f);u=d\n\t\t
    \n\t\t\t
    \n\t\t
    \n\t\t
    \n\t
    \n',I='\n\t
    \n',M='\n\t
    \n',L=Object(v.b)(T),O=Object(v.b)(I),k=Object(v.b)(M);function A(e){return e.querySelector("."+b["common-tooltip__body"])}var E=i("lxNp");i.d(t,"showOnElement",(function(){return N})),i.d(t,"show",(function(){return F})),i.d(t,"updateTooltipText",(function(){return j})),i.d(t,"hide",(function(){return W}));var V=!1,D=null,B=null;Modernizr.mobiletouch||document.addEventListener("mouseover",(function(e){for(var t=e.target,i=e.currentTarget,n=function(e,t,i){var n=[];for(;e&&e!==t;)e.classList&&e.classList.contains(i)&&n.push(e),e=e.parentElement||(r=e.parentNode)&&(r.nodeType===Node.ELEMENT_NODE?r:null);var r;return n}(t,i,"apply-common-tooltip"),r=function(t){if("buttons"in e){if(1&e.buttons)return"continue"}else if(1===e.which)return"continue";var i=function(){return N(t)};if(i()){var n=function(){t.removeEventListener("common-tooltip-update",i),t.removeEventListener("mouseleave",n),t.removeEventListener("mousedown",n),document.removeEventListener("scroll",n),B&&(B.destroy(),B=null),W()};return t.addEventListener("common-tooltip-update",i),t.addEventListener("mouseleave",n),t.addEventListener("mousedown",n),document.addEventListener("scroll",n),null===B&&(B=Object(E.createGroup)({desc:"Tooltip"})).add({desc:"Hide",hotkey:27,handler:n}),"break"}},o=0,s=n;o'},"+hLl":function(e,t,i){"use strict";var n=i("Ss5c").LineDataSource,r=i("Ocx9").DefaultProperty,o=window.t("Brush");function s(e,t){this._constructor="LineToolBrush";var r=t||s.createProperties();n.call(this,e,r),this._finished=!1,i.e("lt-pane-views").then(function(e){var t=i("00XE").BrushPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}inherit(s,n),s.prototype.pointsCount=function(){return-1},s.prototype.finished=function(){return this._finished},s.prototype.finish=function(){this._finished=!0,this._lastPoint=null,this.normalizePoints(),this.createServerPoints()},s.prototype.translatedType=function(){return o},s.prototype.name=function(){return"Brush"},s.prototype.hasEditableCoordinates=function(){return!1},s.prototype.percentDistance=function(e,t){return Math.abs((t-e)/e)},s.prototype.addPoint=function(e){if(this._finished)return!0;if(this._lastPoint=null,this._points.length>0){var t=this._points[this._points.length-1],i=this.pointToScreenPoint(t)[1];if(this.pointToScreenPoint(e)[1].subtract(i).length()<2)return this._finished}return n.prototype.addPoint.call(this,e),this._finished},s.prototype.restorePoints=function(e,t,i){n.prototype.restorePoints.call(this,e,t,i),this._finished=!0},s.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("ZSes").BrushDefinitionsViewModel}.bind(null,i)).catch(i.oe)},s.createProperties=function(e){var t=new r("linetoolbrush",e);return s._configureProperties(t),t},s._configureProperties=function(e){n._configureProperties(e)},t.LineToolBrush=s},"+q2u":function(e,t,i){"use strict";i.r(t),i.d(t,"PaneRendererCrossShape",(function(){return s}));var n=i("mrSG"),r=i("2WC2"),o=i("aO4+"),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype._drawItemShape=function(e,t,i){var n=i.width,r=i.height,o=i.x-n/2,s=i.vertOffset,a=i.y-r/2+s,l=t.pixelRatio,c=this._lineWidth(t),u=c%2?.5:0,h=Math.round(o*l),d=Math.round((o+n)*l);(d-h)%2!=c%2&&(d+=1);var p=Math.floor((h+d)/2)+u,_=Math.round(a*l),f=Math.round((a+r)*l);(f-_)%2!=c%2&&(f+=1);var m=Math.floor((_+f)/2)+u;e.moveTo(p,_),e.lineTo(p,f),e.moveTo(h,m),e.lineTo(d,m)}, +t.prototype._calcBoundingBox=function(t){var i=t.width,n=t.height,r=t.x-i/2,s=t.vertOffset,a=t.y-n/2+s,l=r,c=r+i,u=a,h=a+n,d=new o.Point(l,u),p=new o.Point(c,h),_=Object(o.box)(d,p),f=e.prototype._calcBoundingBox.call(this,t);return f&&(_=this._unionBox(_,f)),_},t}(r.c)},"/+9u":function(e,t,i){"use strict";i.d(t,"a",(function(){return r}));var n=i("jCNj");function r(e,t){void 0===t&&(t=Date.now());var i=Object(n.get_timezone)(e).offset_utc(t),r="",o=i/1e3/60/60;o%1&&(r=":"+o%1*60);return{offset:i,string:"UTC"+(o>0?"+"+(o-o%1)+r:0===o?"":String(o-o%1+r))}}},"//lZ":function(e,t,i){"use strict";i.r(t),i.d(t,"doAnimate",(function(){return s}));var n=i("mrSG");var r={from:0,duration:250,easing:i("9uLv").easingFunc.easeOutCubic},o=function(){function e(e){var t=this;this._doing=!0,this._completed=!1,this._options=Object(n.__assign)(Object(n.__assign)({},r),e);var i=performance.now();window.requestAnimationFrame((function(e){t._animation(i,t._options.from,e)}))}return e.prototype.stop=function(){this._doing=!1},e.prototype.completed=function(){return this._completed},e.prototype._animation=function(e,t,i){var n=this;if(this._doing){var r,o,s,a=(i=!i||i<1e12?performance.now():i)-e,l=a>=this._options.duration||t===this._options.to,c=(r=this._options.from,o=this._options.to,s=this._options.easing(a/this._options.duration),r*(1-s)+o*s),u=l?this._options.to:c,h=u-t;this._options.onStep(h,u),l?this._finishAnimation():window.requestAnimationFrame((function(t){n._animation(e,u,t)}))}else this._finishAnimation()},e.prototype._finishAnimation=function(){this._options.onComplete&&this._options.onComplete(),this._completed=!0},e}();function s(e){return new o(e)}},"//lt":function(e,t,i){"use strict";var n;i.r(t),i.d(t,"PaneCursorType",(function(){return n})),function(e){e[e.Default=0]="Default",e[e.Pointer=1]="Pointer",e[e.Eraser=2]="Eraser",e[e.Dot=3]="Dot",e[e.Grabbing=4]="Grabbing",e[e.ZoomIn=5]="ZoomIn",e[e.VerticalResize=6]="VerticalResize",e[e.HorizontalResize=7]="HorizontalResize",e[e.DiagonalNeSwResize=8]="DiagonalNeSwResize",e[e.DiagonalNwSeResize=9]="DiagonalNwSeResize"}(n||(n={}))},"/3z9":function(e,t,i){"use strict";i.r(t),i.d(t,"isMacKeyboard",(function(){return o})),i.d(t,"Modifiers",(function(){return n})),i.d(t,"modifiersFromEvent",(function(){return s})),i.d(t,"hashFromEvent",(function(){return a})),i.d(t,"humanReadableModifiers",(function(){return l})),i.d(t,"humanReadableHash",(function(){return h}));var n,r=i("qFKp"),o=Object(r.isMac)()||r.CheckMobile.iOS();function s(e){var t=0;return e.shiftKey&&(t+=1024),e.altKey&&(t+=512),e.ctrlKey&&(t+=256),e.metaKey&&(t+=2048),t}function a(e){return s(e)|e.keyCode}function l(e){var t="";return 256&e&&(t+=o?"^":"Ctrl + "),512&e&&(t+=o?"⌥":"Alt + "),1024&e&&(t+=o?"⇧":"Shift + "),2048&e&&(t+=o?"⌘":"Win + "),t}!function(e){e[e.None=0]="None",e[e.Alt=512]="Alt",e[e.Shift=1024]="Shift",e[e.Mod=o?2048:256]="Mod",e[e.Control=256]="Control",e[e.Meta=2048]="Meta"}(n||(n={}));for(var c={9:"⇥",13:"↵",27:"Esc",8:o?"⌫":"Backspace",32:"Space",35:"End",36:"Home",37:"←",38:"↑",39:"→",40:"↓", +45:"Ins",46:"Del",191:"/"},u=1;u<=16;u++)c[u+111]="F"+u;function h(e){var t=l(e),i=255&e;return t+=i in c?c[i]:String.fromCharCode(i)}},"/5ju":function(e,t,i){"use strict";i.r(t);var n=i("mrSG"),r=i("UJLt"),o=i("hkLy"),s=i("zUrt"),a=i("Kxc7"),l=i("hY0g"),c=i.n(l),u=i("FQhm"),h=i("htUT"),d=i("/z0S"),p=i("BxxN");i("YFKU"),i("HbRj"),i("+GxX");i.d(t,"SaveChartService",(function(){return b}));var _={labelName:window.t("Chart layout name"),labelRename:window.t("Enter a new chart layout name"),error:window.t("Please enter chart layout name"),titleNew:window.t("Save New Chart Layout"),titleRename:window.t("Rename Chart Layout"),titleCopy:window.t("Copy Chart Layout"),valueCopy:window.t("{0} copy",{context:"ex: AAPL chart copy"})};function f(e,t,i,s){return Object(n.__awaiter)(this,void 0,void 0,(function(){var a;return Object(n.__generator)(this,(function(n){return a=new r.SaveRenameDialog({fields:[new o.InputField({name:"chart-title",label:e+":",error:t,maxLength:64})],title:i}),void 0!==s&&a.setField("chart-title",s),[2,a.show().then((function(e){return e["chart-title"]}))]}))}))}function m(e){return Object(n.__awaiter)(this,void 0,void 0,(function(){return Object(n.__generator)(this,(function(t){return[2,f(_.labelRename,_.error,_.titleRename,e)]}))}))}function v(e){return Object(n.__awaiter)(this,void 0,void 0,(function(){return Object(n.__generator)(this,(function(t){return[2,f(_.labelRename,_.error,_.titleCopy,_.valueCopy.format(e))]}))}))}function y(e){return Object(n.__awaiter)(this,void 0,void 0,(function(){return Object(n.__generator)(this,(function(t){return[2,f(_.labelRename,_.error,_.titleNew,e)]}))}))}function g(){return Object(n.__awaiter)(this,void 0,void 0,(function(){return Object(n.__generator)(this,(function(e){return[2,new Promise((function(e){a.enabled("saved_charts_count_restriction")&&window.is_authenticated&&!window.user.is_pro?s.backend.getChartsCount((function(t){e(t<5)})):e(!0)}))]}))}))}var b=function(){function e(e,t){this._autosaveTimer=null,this._watchedAutoSaveEnabled=new c.a,this._toggleAutoSaveEnabledHandler=this._toggleAutoSaveEnabled.bind(this),this._chartWidgetCollection=e,this._chartSaver=t,this._chartChangesWatcher=new h.ChartChangesWatcher(e.undoHistory,t,u),e.saveKeysPressed().subscribe(this,this.saveChartOrShowTitleDialog),this._chartChangesWatcher.getOnChange().subscribe(this,this._onStateChanged)}return e.prototype.autoSaveEnabled=function(){return this._watchedAutoSaveEnabled},e.prototype.destroy=function(){0},e.prototype.cloneChart=function(){return Object(n.__awaiter)(this,void 0,void 0,(function(){var e,t;return Object(n.__generator)(this,(function(i){switch(i.label){case 0:return e=this._chartWidgetCollection,[4,g()];case 1:return i.sent()?[4,v(e.metaInfo.name.value())]:[3,3];case 2:return t=i.sent(),this._saveCurrentChartAsNewWithTitle(t),[3,4];case 3:0,i.label=4;case 4:return[2]}}))}))},e.prototype.saveChartAs=function(){Object(d.a)(this.cloneChart.bind(this),{source:"Clone chart"})},e.prototype.renameChart=function(){var e=this;Object(d.a)((function(){ +return Object(n.__awaiter)(e,void 0,void 0,(function(){var e,t;return Object(n.__generator)(this,(function(i){switch(i.label){case 0:return e=this._chartWidgetCollection,[4,m(e.metaInfo.name.value())];case 1:return t=i.sent(),e.metaInfo.name.setValue(t),this._doSave(),[2]}}))}))}),{source:"Rename chart"})},e.prototype.saveNewChart=function(e,t,i){return Object(n.__awaiter)(this,void 0,void 0,(function(){var r,o,s;return Object(n.__generator)(this,(function(n){switch(n.label){case 0:return r=this._chartWidgetCollection,o=r.metaInfo.name.value(),[4,g()];case 1:return n.sent()?[4,y(o)]:[3,3];case 2:return s=n.sent(),r.metaInfo.name.setValue(s),this._doSave(e,t,i),[3,4];case 3:0,n.label=4;case 4:return[2]}}))}))},e.prototype.saveExistentChart=function(e,t,i){this._doSave(e,t,i)},e.prototype.saveChartOrShowTitleDialog=function(e,t,i){var n=this,r=window.saver.isSaveInProcess(),o=this._chartChangesWatcher.hasChanges(),s=!!this._chartWidgetCollection.metaInfo.id.value();window.is_authenticated&&(r||!o&&s)||Object(d.a)((function(){null!=n._chartWidgetCollection.metaInfo.id.value()?n.saveExistentChart(e,t,i):n.saveNewChart(e,t,i)}),{source:"Save chart",sourceMeta:"Chart"})},e.prototype.whenReadyToSave=function(e){this._chartSaver.whenReadyToSave(e)},e.prototype.saveToJSON=function(){return this._chartSaver.saveToJSON()},e.prototype.saveChartSilently=function(e,t,i){this._chartSaver.saveChartSilently(e,t,i)},e.prototype.setAutoSaveEnabled=function(e){var t=this;window.is_authenticated&&window.saver.isSaveInProcess()||Object(d.a)((function(){t._watchedAutoSaveEnabled.setValue(e)}),{source:"AutoSave chart"})},e.prototype._autoSaveEnabledSettingHandler=function(e){0},e.prototype._toggleAutoSaveEnabled=function(e){0},e.prototype._enableAutoSave=function(){0},e.prototype._disableAutoSave=function(){0},e.prototype._onStateChanged=function(e){e?this._startAutosave():this._stopAutosave()},e.prototype._saveCurrentChartAsNewWithTitle=function(e){var t=this._chartWidgetCollection;a.enabled("saveload_storage_customization")?(t.metaInfo.uid.deleteValue(),t.metaInfo.id.deleteValue(),t.metaInfo.name.setValue(e),this._doSave()):window.open(Object(p.a)({clone:t.metaInfo.uid.value(),name:e}),"_blank")},e.prototype._doSave=function(e,t,i,n){var r=this._chartWidgetCollection;void 0!==e&&e(),this._chartSaver.saveChartSilently((function(e){var i;i=r.metaInfo.uid.value(),"/chart/"===location.pathname&&(location.href="/chart/"+i),void 0!==t&&t(e)}),(function(){void 0!==i&&i()}),{autoSave:Boolean(n)})},e.prototype._startAutosave=function(){var e=this;a.enabled("charts_auto_save")&&null===this._autosaveTimer&&(this._autosaveTimer=setTimeout((function(){e._autosaveTimer=null,e._chartWidgetCollection.metaInfo.id.value()&&e._doSave(void 0,void 0,void 0,!0)}),6e4))},e.prototype._stopAutosave=function(){null!==this._autosaveTimer&&(clearInterval(this._autosaveTimer),this._autosaveTimer=null)},e}()},"/DW5":function(e,t,i){"use strict";i.d(t,"b",(function(){return r})),i.d(t,"a",(function(){return o}));var n=i("CLNU");function r(e){ +return Object(n.clean)(JSON.stringify(e))}function o(e){return JSON.parse(Object(n.clean)(e,!0))}},"/DxK":function(e,t,i){"use strict";var n=i("Ss5c").LineDataSource,r=i("p1SQ").LineToolHorzLinePriceAxisView,o=i("tc+8"),s=i("Ocx9").DefaultProperty,a=window.t("Horizontal Line");function l(e,t){var o=t||l.createProperties();this._priceAxisView=new r(this),n.call(this,e,o),i.e("lt-pane-views").then(function(e){var t=i("ckl+").HorzLinePaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}inherit(l,n),l.prototype.state=function(e){var t=n.prototype.state.call(this,e);return t.points&&0!==t.points.length&&(t.points[0].offset=0),t},l.prototype.pointsCount=function(){return 1},l.prototype.translatedType=function(){return a},l.prototype.name=function(){return"Horizontal Line"},l.prototype.priceAxisViews=function(e,t){return this.isSourceHidden()?null:t===this.priceScale()&&this.properties().showPrice.value()&&this._model.paneForSource(this)===e?[this._priceAxisView]:null},l.prototype.updateAllViews=function(){n.prototype.updateAllViews.call(this),this._priceAxisView.update()},l.prototype.canHasAlert=function(){return!0},l.prototype._getAlertPlots=function(){return[this.points()[0].price]},l.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("NEbb").HorizontalLineDefinitionsViewModel}.bind(null,i)).catch(i.oe)},l.prototype.template=function(){var e=n.prototype.template.call(this);return e.text=this.properties().childs().text.value(),e},l.prototype._applyTemplateImpl=function(e){n.prototype._applyTemplateImpl.call(this,e),this.properties().childs().text.setValue(e.text)},l.createProperties=function(e){var t=new s("linetoolhorzline",e);return l._configureProperties(t),t},l._configureProperties=function(e){n._configureProperties(e),e.hasChild("text")||e.addChild("text",new o("")),e.addExclusion("text")},t.LineToolHorzLine=l},"/G2Z":function(e,t,i){"use strict";(function(e){i("xdS3");var t=i("Eyy1").assert;i("fPdn"),i("wZIs"),i("WmDe"),JSON.parse(urlParams.disabledFeatures).forEach((function(t){e.setEnabled(t,!1)})),JSON.parse(urlParams.enabledFeatures).forEach((function(t){e.setEnabled(t,!0)}));var n=i("UlDV").RestrictedToolsetBootloader,r=i("I4UZ").HeaderToolbarBootloader,o=i("9zVu").DrawingToolbarBootloader,s=i("OiSa").isDrawingToolbarVisible,a=i("EsvI"),l=i("oiZD").setTheme,c=i("JcHK"),u=i("Ery9"),h=i("lxNp"),d=i("n0Bl").migrateShortcut,p=i("RXmj").ChartSaver,_=i("/5ju").SaveChartService,f=i("lA7n").LoadChartService,m=i("F58L").StudyTemplates,v=i("54XG").FavoriteStudyTemplateService,y=i("PT1i").linking,g=i("FQhm"),b=i("kcTO"),S=b.formatterOptions,w=b.customFormatters,P=i("JT5O").StudyMarket,C=i("FBuY").TVXWindowEvents,x=i("jofe").createDeferredPromise,T=i("FIi8").deepExtend,I=i("PoSe"),M=i("LxhU").Interval,L=i("lW/c").Root,O=i("NsVT").ChartPage,k=i("IWXC").destroyQuoteSessions,A=i("ULlu"),E=i("uDHo").TIMEFRAMETYPE,V=new O(new L(window).allocate()),D=V.allocate({areaName:"center"}) +;V.allocate({areaName:"tradingpanel"});i("Wh/T");var B=i("/Y2c"),R=i("g5Qf").createFavoriteDrawingToolbar,N=i("x5Tw").setupChartEventHint,F=i("EX27"),j=i("0YCj"),W=i("9nLJ");i("2cgs"),i("vIQA");var H=i("u5Q5").setSearchRequestDelay,z=i("dfhE"),U=i("ocLq"),G=i("qE4g").addBrandingSource,Y=window.parent[urlParams.uid].getCustomIndicators,q=x(),K=x(),Z=e.enabled("left_toolbar");if(Promise.all([q.promise,K.promise]).then((function(){window.ChartApiInstance.start()})),"function"==typeof Y){var J=Y(U);J&&J.then?J.then((function(e){if(!Array.isArray(e))return console.warn("custom_indicators_getter should be a function that returns a Promise object which result is an array of custom indicators"),void q.resolve();JSServer.studyLibrary.push.apply(JSServer.studyLibrary,e),q.resolve(),console.log("{0} custom indicators loaded.".format(e.length))})).catch((function(e){console.warn("Error loading custom indicators "+e),q.resolve()})):(console.warn("custom_indicators_getter should be a function that returns a Promise object"),q.resolve())}else q.resolve();window.widgetReady=function(e){g.subscribe("onChartReady",e)};var X=urlParams.theme&&urlParams.theme.toLowerCase();function Q(e){window.__defaultsOverrides=window.__defaultsOverrides||{},T(window.__defaultsOverrides,e),void 0!==TradingView.defaultProperties&&void 0!==TradingView.defaultProperties.chartproperties&&(window.applyDefaultsOverrides(TradingView.defaultProperties.chartproperties),window.applyDefaultOverridesToLinetools())}!function(e){a.themes[e]&&l(e)}(X),window.applyStudiesOverrides=function(e){e&&window.chartWidgetCollection.applyStudiesOverrides(e)},window.applyOverrides=function(e){Q(e),window.chartWidgetCollection.applyOverrides(e)},window.applyTradingCustomization=function(e){for(var t in e.order)TradingView.defaultProperties.linetoolorder[t]=e.order[t];for(var t in e.position)TradingView.defaultProperties.linetoolposition[t]=e.position[t]},window.changeTheme=function(e,t){var i=a.themes[e.toLowerCase()];i&&window.tradingViewApi.themes().setStdTheme(i.name,!0,t&&t.disableUndo)},window.getTheme=function(){return window.tradingViewApi.themes().getCurrentThemeName()},window.is_authenticated=!1;window.parent[urlParams.uid].brokerFactory,JSON.parse(window.urlParams.brokerConfig);window.t("charts by TradingView"),window.t("powered by TradingView"),window.t("by TradingView");var $=null,ee=x(),te=null,ie=function(){if(!Modernizr.canvas||!Modernizr.canvastext)throw Error("Charting library cannot be running under this browser");if(e.setEnabled("charting_library_debug_mode","true"===urlParams.debug),e.setEnabled("chart_property_page_trading",!1),e.enabled("remove_library_container_border")){var l=document.querySelector("#library-container");null!==l&&(l.style.border="0px",l.style.padding="1px")}e.enabled("no_min_chart_width")&&(window.document.body.style.minWidth="0px"),null!=urlParams.studiesOverrides&&j.setDefaultsOverrides(JSON.parse(urlParams.studiesOverrides)),t(void 0===TradingView.defaultProperties,"Default properties are inited before applying overrides"), +Q(JSON.parse(urlParams.overrides)),urlParams.numeric_formatting=urlParams.numeric_formatting&&JSON.parse(urlParams.numeric_formatting),urlParams.numeric_formatting&&"string"==typeof urlParams.numeric_formatting.decimal_sign&&(S.decimalSign=urlParams.numeric_formatting.decimal_sign[0]),window.ChartApiInstance=new F(window.parent[urlParams.uid].datafeed),window.parent[urlParams.uid].customFormatters&&(window.parent[urlParams.uid].customFormatters.timeFormatter&&(w.timeFormatter=window.parent[urlParams.uid].customFormatters.timeFormatter),window.parent[urlParams.uid].customFormatters.dateFormatter&&(w.dateFormatter=window.parent[urlParams.uid].customFormatters.dateFormatter)),window.ChartApiInstance.setStudiesAccessController(window.ChartApiInstance.createStudiesAccessController(urlParams.studiesAccess));var u=urlParams.chartContent?JSON.parse(urlParams.chartContent).json:void 0,h=urlParams.chartContentExtendedData?JSON.parse(urlParams.chartContentExtendedData):u?u.extendedData:void 0,d=urlParams.interval||"D",b=function(e){var t=/(\d+)(\w+)/;return e.map((function(e){var i=t.exec(e.text),n=i[2].toLowerCase(),r=parseInt(i[1]),o="y"===n?12*r+"M":r+n,s=U.Symbol.parsePeriod(e.resolution);return{text:window.t(e.title)||r+window.t(n,{context:"dates",count:r}),description:e.description||"",value:{value:o.toUpperCase(),type:E.PeriodBack},targetResolution:e.resolution,requiresIntraday:s.isIntraday}}))}(JSON.parse(urlParams.timeFrames));window.containerElement=window.parent.document.getElementById(urlParams.uid).parentElement;var x=Boolean(!1),T={resizerBridge:D,padding:e.enabled("border_around_the_chart")?2:0,content:u,widgetOptions:{hideIdeas:!0,addVolume:window.ChartApiInstance.studiesAccessController.isToolEnabled("Volume"),handleSessionErrors:!0,muteSessionErrors:!0,timezone:urlParams.timezone,defSymbol:urlParams.symbol,defInterval:d,compareSymbols:urlParams.compareSymbols&&JSON.parse(urlParams.compareSymbols),defTimeframe:urlParams.timeframe,paneContextMenuEnabled:e.enabled("pane_context_menu"),paneContextMenu:{mainSeriesTrade:x},priceScaleContextMenuEnabled:e.enabled("scales_context_menu"),currencyLabelEnabled:e.enabled("pricescale_currency"),legendWidgetEnabled:e.enabled("legend_widget"),legendWidget:{contextMenu:{settings:e.enabled("show_chart_property_page"),showOpenMarketStatus:e.enabled("display_market_status")}},sourceStatusesWidget:{errorSolution:!1},marketStatusWidgetEnabled:e.enabled("display_market_status"),marketStatusWidget:{preMarketSolution:!1,postMarketSolution:!1},chartWarningWidget:{subscriptionFullInfo:!1},timeScaleWidget:{contextMenuEnabled:e.enabled("scales_context_menu"),timezoneMenuEnabled:e.enabled("timezone_menu"),priceAxisLabelsOptions:{showLabels:e.enabled("main_series_scale_menu")}},timeScale:{preserveBarSpacing:!1,lockVisibleTimeRangeOnResize:e.enabled("lock_visible_time_range_on_resize"),rightBarStaysOnScroll:e.enabled("right_bar_stays_on_scroll")},goToDateEnabled:e.enabled("go_to_date"),crossHair:{menuEnabled:e.enabled("chart_crosshair_menu")},handleScale:{ +mouseWheel:e.enabled("mouse_wheel_scale"),pinch:e.enabled("pinch_scale"),axisPressedMouseMove:e.enabled("axis_pressed_mouse_move_scale")},handleScroll:{mouseWheel:e.enabled("mouse_wheel_scroll"),pressedMouseMove:e.enabled("pressed_mouse_move_scroll"),horzTouchDrag:e.enabled("horz_touch_drag_scroll"),vertTouchDrag:e.enabled("vert_touch_drag_scroll")},shiftVisibleRangeOnNewBar:e.enabled("shift_visible_range_on_new_bar"),croppedTickMarks:e.enabled("cropped_tick_marks")},seriesControlBarEnabled:e.enabled("timeframes_toolbar"),seriesControlBar:{timeFramesWidgetEnabled:!0,timeFramesWidget:{goToDateEnabled:e.enabled("go_to_date"),availableTimeFrames:function(e,t){return e?t!==z.STATUS_DELAYED&&t!==z.STATUS_DELAYED_STREAMING&&t!==z.STATUS_READY?[]:b.filter((function(t){return!(t.requiresIntraday&&!e.has_intraday)&&!(e.supported_resolutions&&e.supported_resolutions.indexOf(M.normalize(t.targetResolution))<0)})):[]}},timeWidgetEnabled:!0,timeWidget:{timezoneMenuEnabled:e.enabled("timezone_menu")},adjustForDividendsButtonEnabled:!1,extendedHoursButtonEnabled:!1,percentageScaleButtonEnabled:!0,logScaleButtonEnabled:!0,autoScaleButtonEnabled:!0,fullscreenButtonEnabled:!0,mobileChangeLayoutEnabled:!1},globalEvents:!0,snapshotUrl:urlParams.snapshotUrl,mobileForceChartMaximizeEnabled:!1,saveChartEnabled:e.enabled("save_shortcut")};Z&&(R(),T.widgetOptions.isDrawingToolbarVisible=s),h&&(T.metaInfo={id:h.uid,name:h.name,description:h.description,uid:h.uid,username:"",tags:""});var L=window.chartWidgetCollection=new B(T);G(L),window.studyMarket=new P(L),"undefined"!=typeof serviceLocator&&serviceLocator.registerService(CHART_WIDGET_COLLECTION_SERVICE,L),L.activeChartWidget.subscribe((function(e){g.emit("activeChartChanged",L.getAll().indexOf(e))})),window.saver=new p(L);var O=new _(L,window.saver),k=new f(L);window.chartWidget=L.activeChartWidget.value(),window.pro=new TradingView.Pro;var A=function(t){if(!e.enabled("header_widget"))return null;var o=V.allocate({areaName:"top"}),s=new(0,i("htUT").ChartChangesWatcher)(t.chartWidgetCollection.undoHistory,window.saver,g),a=JSON.parse(urlParams.favorites);a.intervals=a.intervals.map((function(e){var t=""+e;return t.match(/1[DWMYdwmy]/)&&(t=t.slice(1)),t}));var l,c=null;e.enabled("study_templates")&&(c=new v(C,TVSettings),te=new m({chartWidgetCollection:t.chartWidgetCollection,favoriteStudyTemplatesService:c}));l=Modernizr.mobiletouch?["full"]:e.enabled("caption_buttons_text_if_possible")?void 0:["medium"];return new r(new n,{chartSaver:window.saver,chartApiInstance:ChartApiInstance,chartWidgetCollection:t.chartWidgetCollection,defaultIntervals:Object.keys(ChartApiInstance.defaultResolutions()),defaultFavoriteStyles:a.chartTypes,defaultFavoriteIntervals:a.intervals,hideStudyTemplates:!0,resizerBridge:o,studyMarket:window.studyMarket,studyTemplates:te,favoriteStudyTemplatesService:c,allowedModes:l,saveChartService:t.saveChartService,loadChartService:t.loadChartService,chartChangesWatcher:s,onClick:ce})}({chartWidgetCollection:L,saveChartService:O,loadChartService:k}) +;null!==A?A.load().then((function(e){$=e.getComponent(),ee.resolve()})):(ee.promise.catch((function(){})),ee.reject("header widget is not loaded"));var Y=function(e){if(Z){var t=urlParams.toolbarbg&&/^[0-9a-f]+$/i.test(urlParams.toolbarbg)?String(urlParams.toolbarbg):void 0;if(t){var i=document.createElement("style");i.textContent="body,.chart-controls-bar,#footer-chart-panel{background-color:#"+t+" !important}",document.head.appendChild(i)}return new o({bgColor:t,chartWidgetCollection:e,drawingsAccess:urlParams.drawingsAccess?JSON.parse(urlParams.drawingsAccess):void 0,resizerBridge:V.allocate({areaName:"left"}),onClick:ce})}return null}(L),q=null;window.tradingViewApi=new W(L,window.ChartApiInstance,O,k);var J=null;y.bindToChartWidgetCollection(L),TradingView.isNaN(urlParams.studyCountLimit)||(TradingView.STUDY_COUNT_LIMIT=Math.max(2,+urlParams.studyCountLimit)),TradingView.isNaN(urlParams.ssreqdelay)||H(Math.max(0,+urlParams.ssreqdelay)),window.ChartApiInstance.connect(),Promise.all([i.e(32),i.e(39),i.e(63),i.e(77),i.e(15),i.e(30),i.e(35),i.e(47),i.e(57),i.e("floating-toolbars")]).then(function(e){var t=i("tPkB");window.lineToolPropertiesToolbar=new t(L)}.bind(null,i)).catch(i.oe);var ie=document.querySelector(".tv-content");function ne(){Y&&Y.load(),q&&q.load().then((function(e){window.footerWidget=e.getComponent()})),J&&J.load().then((function(e){window.widgetbar=e}))}null!==ie&&ie.addEventListener("contextmenu",(function(e){null!==e.target&&"input"!==e.target.tagName.toLowerCase()&&"textarea"!==e.target.tagName.toLowerCase()&&e.preventDefault()})),K.resolve(),L.undoHistory.undoStack().onChange().subscribe(null,I((function(){g.emit("onAutoSaveNeeded")}),1e3*(urlParams.autoSaveDelay||5),{leading:!1,trailing:!0})),chartWidget.withModel(null,(function(){if(ChartApiInstance.on("realtime_tick",(function(e){g.emit("onTick",e)})),!a.savedThemeName()&&X){var t=a.getStdTheme(X);t&&t.content&&void 0===u&&(L.applyTheme(t.content,!1,!1,X,!0,!0),window.applyOverrides(window.__defaultsOverrides))}e.enabled("charting_library_debug_mode")&&g.subscribeToAll((function(){var e=Array.prototype.slice.call(arguments);console.log('Event "{0}", arguments: {1}'.format(e[0],JSON.stringify(e.slice(1))))})),N&&(N(L),N=null)})),c.isAnyChartWidgetInitialized(L)?ne():c.waitAnyChartWidgetInitialized(L,ne),g.subscribe("chart_load_requested",(function(e){window.tradingViewApi.loadChart({json:JSON.parse(e.content),extendedData:e})}))};window.addEventListener("unload",(function(){window.chartWidgetCollection&&(window.chartWidgetCollection.destroy(),window.chartWidgetCollection=null),window.containerElement=null,k(),window.ChartApiInstance&&(window.ChartApiInstance.destroy(),window.ChartApiInstance=null)})), +e.enabled("saveload_storage_customization")&&(window.parent[urlParams.uid].saveLoadAdapter?u.setCustomAdapter(window.parent[urlParams.uid].saveLoadAdapter):void 0!==urlParams.chartsStorageUrl&&urlParams.chartsStorageUrl&&void 0!==urlParams.clientId&&urlParams.clientId?u.initialize(urlParams.clientId,urlParams.userId,urlParams.chartsStorageUrl,urlParams.chartsStorageVer||"1.0"):(e.setEnabled("saveload_storage_customization",!1),e.setEnabled("header_saveload",!1)));var ne,re=x();function oe(){re.resolve()}window.parent[urlParams.uid].loadLastChart&&e.enabled("saveload_storage_customization")?u.getCharts((function(e){if(0!==e.length){var t=e.sort((function(e,t){return t.modified_iso-e.modified_iso}))[0];u.getChartContent(t,(function(e){var t=JSON.parse(e.content);t.extendedData=e,urlParams.chartContent=JSON.stringify({json:t}),oe()}),oe)}else oe()}),oe):oe(),null!=(ne=window.parent[window.urlParams.uid].settingsAdapter)?(TVSettings.setSettingsAdapter(ne),TVSettings.sync()):e.enabled("use_localstorage_for_settings")&&TVSettings.sync();var se,ae,le=x();function ce(e){var t=TradingView.bottomWidgetBar;t&&t.turnOffMaximize()}Promise.all([le.promise,re.promise]).then((function(){A.trigger(window,"resize");var t,i,n,r,o,s,a=document.querySelector(".loading-indicator");if(a&&(a.style.display="none"),setTimeout(ie,0),e.enabled("14851")&&(Math.random()<=.02||e.enabled("cqg_terminal")||e.enabled("amp_terminal"))){t=window,i=document,n="script",r="ga",t.GoogleAnalyticsObject=r,t.ga=t.ga||function(){(t.ga.q=t.ga.q||[]).push(arguments)},t.ga.l=1*new Date,o=i.createElement(n),s=i.getElementsByTagName(n)[0],o.async=1,o.src="//www.google-analytics.com/analytics.js",s.parentNode.insertBefore(o,s);var l=document.URL.match(new RegExp("(:?.*://)([^/]+)/.*"))[2];ga("create","UA-112911840-1","auto"),ga("set","anonymizeIp",!0),ga("set",{hostname:l,page:l,referrer:l}),ga("send","pageview")}})),se=!0,window.parent[urlParams.uid].datafeed.onReady((function(e){se&&console.warn("`onReady` should return result asynchronously. Use `setTimeout` with 0 interval to execute the callback function."),window.configurationData=e,le.resolve()})),se=!1,window.getFunctionFromArguments=function(e){return window.parent[urlParams.uid][e]},window.createShortcutAction=(ae=h.createGroup({desc:"API"}),function(e,t){ae.add({hotkey:d(e),handler:t})}),window.initializationFinished=function(){window.chartWidgetCollection.undoHistory.clearStack()},window.headerReady=function(){return ee.promise},window.createButton=function(e){if(null===$)throw new Error("Cannot create button: header widget is not ready or is not loaded - use `headerReady` to wait until header is ready");var t=(e=e||{}).align||"left";return $.addButton(t)},window.getAllFeatures=function(){const t=e.getAllFeatures();return Object.keys(t).forEach((function(e){isNaN(parseFloat(e))||delete t[e]})),t}}).call(this,i("Kxc7"))},"/McG":function(e){ +e.exports=JSON.parse('{"content":{"chartProperties":{"scalesProperties":{"textColor":"#131722","lineColor":"#E0E3EB","backgroundColor":"#ffffff"},"paneProperties":{"vertGridProperties":{"color":"#F0F3FA"},"horzGridProperties":{"color":"#F0F3FA"},"background":"#ffffff","backgroundGradientStartColor":"#ffffff","backgroundGradientEndColor":"#ffffff"}},"sessions":{"graphics":{"backgrounds":{"outOfSession":{"color":"#2196F3","transparency":92},"preMarket":{"color":"#FF9800","transparency":92},"postMarket":{"color":"#2196F3","transparency":92}},"vertlines":{"sessBreaks":{"color":"#4985e7","style":2,"width":1}}}},"mainSourceProperties":{"baseLineColor":"#B2B5BE","candleStyle":{"borderColor":"#378658","upColor":"#26a69a","wickColor":"#737375","wickUpColor":"#26a69a","wickDownColor":"#ef5350","downColor":"#ef5350","borderUpColor":"#26a69a","borderDownColor":"#ef5350"},"haStyle":{"borderColor":"#378658","upColor":"#26a69a","wickColor":"#737375","wickUpColor":"#26a69a","wickDownColor":"#ef5350","downColor":"#ef5350","borderUpColor":"#26a69a","borderDownColor":"#ef5350"},"barStyle":{"downColor":"#ef5350","upColor":"#26a69a"},"pnfStyle":{"downColor":"#ef5350","upColor":"#26a69a","upColorProjection":"#a9dcc3","downColorProjection":"#f5a6ae"},"baselineStyle":{"baselineColor":"rgba( 117, 134, 150, 1)","topFillColor1":"rgba( 38, 166, 154, 0.28)","topFillColor2":"rgba( 38, 166, 154, 0.05)","bottomFillColor1":"rgba( 239, 83, 80, 0.05)","bottomFillColor2":"rgba( 239, 83, 80, 0.28)","topLineColor":"rgba( 38, 166, 154, 1)","bottomLineColor":"rgba( 239, 83, 80, 1)"},"areaStyle":{"transparency":100,"color1":"rgba(33, 150, 243, 0.28)","color2":"#2196f3","linecolor":"#2196f3","linewidth":2,"linestyle":0},"renkoStyle":{"upColor":"#26a69a","downColor":"#ef5350","borderUpColor":"#26a69a","borderDownColor":"#ef5350","upColorProjection":"#a9dcc3","downColorProjection":"#f5a6ae","borderUpColorProjection":"#a9dcc3","borderDownColorProjection":"#f5a6ae","wickUpColor":"#26a69a","wickDownColor":"#ef5350"},"lineStyle":{"color":"#2196f3","linewidth":2,"linestyle":0},"kagiStyle":{"downColor":"#ef5350","upColor":"#26a69a","upColorProjection":"#a9dcc3","downColorProjection":"#f5a6ae"},"pbStyle":{"upColor":"#26a69a","downColor":"#ef5350","borderUpColor":"#26a69a","borderDownColor":"#ef5350","upColorProjection":"#a9dcc3","downColorProjection":"#f5a6ae","borderUpColorProjection":"#a9dcc3","borderDownColorProjection":"#f5a6ae"},"rangeStyle":{"upColor":"#26a69a","downColor":"#ef5350","upColorProjection":"#a9dcc3","downColorProjection":"#f5a6ae"}}}}')},"/ToI":function(e,t,i){"use strict";i.d(t,"b",(function(){return s})),i.d(t,"a",(function(){return a}));var n=i("mrSG"),r=i("Eyy1"),o=function(e){function t(t,i,n,r){var o=e.call(this,t,i,r)||this;return o._sourcePaneRemoved=!1,o._targetPaneIndex=t.panes().indexOf(n),o}return Object(n.__extends)(t,e),t.prototype.redo=function(){ +for(var e=this._chartModel.panes()[this._initialPaneIndex],t=this._chartModel.panes()[this._targetPaneIndex],i=e!==t,n=this._targetPriceScale(t),o=Object(r.ensureNotNull)(this._chartModel.dataSourceForId(this._sourceId)),s=0,a=this._chartModel.children(o,!0);s1),u.fullscreen.setValue(le===u)}else u&&r(u)}Le(),Ne(),function(){for(var e=G.count,t=e,i=0;i1)}(),t(),W.forEach((function(e){e.chartWidget.onZoom().subscribe(this,(function(e){me.fire(e)}))})),U.value()<1&&l>0&&W[l-1].rdState.bridge().attach()}function Ne(){var e=Math.min(G.count,W.length)-1;if(e<0)F.deleteValue();else{var t=H;t<0&&(t=0),t>e&&(t=e),F.setValue(W[t].chartWidget)}}function Fe(){for(var e=W.length;e--;){var t=e===H;$(W[e].container.value()).toggleClass("active",t).toggleClass("inactive",!t)}}function je(e){}V.seriesControlBarEnabled&&(ye=R+N+"px",(ge=document.createElement("div")).style.left=ye,ge.style.right=ye,ge.style.bottom=ye,ge.classList.add("chart-toolbar","chart-controls-bar"),pe[0].appendChild(ge),Promise.all([i.e("react"),i.e(1),i.e(4),i.e(8),i.e(9),i.e(23),i.e(24),i.e(26),i.e(43),i.e(45),i.e(46),i.e(60),i.e(64),i.e(69),i.e(0),i.e(2),i.e(12),i.e(14),i.e(18),i.e(52),i.e("chart-bottom-toolbar")]).then(function(e){var n=i("MfqI").BottomToolbarRenderer,r=V.resizerBridge,o=[r.container.spawn(),r.width.spawn(),r.height.spawn()],s=r.container.value(),a=new t,l=function(){a.fire()};o.forEach((function(e){e.subscribe(l)})),be=new n(ge,a,(function(){var e=s.getBoundingClientRect(),t=Ce();return t.top=e.top+t.top,t.left=e.left+t.left,t}),O,ChartApiInstance,ce,V.seriesControlBar),Se=function(){null!==be&&(be.destroy(),be=null, +ge.remove(),ge=null),o.forEach((function(e){e.destroy()})),a.destroy()}}.bind(null,i)).catch(i.oe)),se.subscribe(Le),ae.subscribe(Le),this.updateLayout=Le;var We=new t,He=new y,ze=new y,Ue=null;function Ge(e){var t=e.mainSeries().properties();t.style.subscribe(null,Ye),Ye(t.style),e.model().onSelectedSourceChanged().subscribe(null,qe),qe(e.selection().sources())}function Ye(e){He.setValue(e.value())}function qe(){var e=Ue.model();ze.setValue(e.selection().sources())}function Ke(e){for(var t=!1,i=0;i=o[e].count)return e;return"s"}function it(e,t){if(J=!0,X=Boolean(t),K=[],e){e.charts||(e={layout:"s",charts:[e]});var i=new Set;e.charts.forEach((function(e){e.chartId&&i.add(e.chartId)})),e.charts.forEach((function(e){if(!e.chartId){var t=Be((function(e){return i.has(e)}));i.add(t),e.chartId=t}})),Y=tt(e.layout||"s");for(var n=0;n1},applyIndicatorToAllCharts:function(e,t,i,n){A(Pe(),e,t,i,n)},setActive:Qe,inlineChartsCount:U.readonly(),revertToInline:function(){Ve(null);for(var e=0;e0||e.status()===I.STATUS_INVALID_SYMBOL||e.status()===I.STATUS_NO_BARS)st();else{var i=e.dataEvents(),n=function(){st(),i.barReceived().unsubscribe(null,n),i.completed().unsubscribe(null,n),i.error().unsubscribe(null,n)};i.barReceived().subscribe(null,n),i.completed().subscribe(null,n),i.error().subscribe(null,n)}}))}})),a()){var at=h.tool.setValue;h.tool.setValue=function(){O.selectedSources.value()&&O.activeChartWidget.value().model().lineBeingCreated()&&O.activeChartWidget.value().model().cancelCreatingLine(),at.apply(h.tool,arguments)}}Promise.all(W.map((function(e){return b(e.chartWidget.modelCreated()).promise}))).then((function(){return Promise.all(W.map((function(e){ +return b(e.chartWidget.model().mainSeries().dataEvents().symbolResolved()).promise})))})).then((function(){window.saver&&window.is_authenticated&&V.widgetOptions.justCloned&&window.saver.saveChartSilently()})).catch(P.logError.bind(P))}}).call(this,i("aIyQ"))},"/YGI":function(e,t,i){"use strict";i.r(t);var n,r=i("mrSG"),o=i("0YCj"),s=i.n(o);!function(e){e.StudyCannotBeChild="cannot_be_child",e.StubWasRemoved="stub_was_removed",e.CannotGetMetainfo="cannot_get_metainfo",e.Cancelled="cancelled",e.Unknown="unknown"}(n||(n={}));var a=i("txPx");i.d(t,"StudyInserter",(function(){return c}));var l=Object(a.getLogger)("Chart.Studies.StudyInserter"),c=function(){function e(e,t,i){this._parentSource=void 0,this._propsState=void 0,this._preferredPriceScale=void 0,this._allowChangeCurrency=!1,this._paneSize=void 0,this._forceOverlay=!1,this._studyMetaInfoRepository=t,this._inserterImpl=i,this._studyDescriptor=e}return e.prototype.setParentSource=function(e){this._parentSource=e||void 0},e.prototype.setPaneSize=function(e){this._paneSize=e},e.prototype.setPreferredPriceScale=function(e){this._preferredPriceScale=e},e.prototype.setAllowChangeCurrency=function(e){this._allowChangeCurrency=e},e.prototype.setForceOverlay=function(e){this._forceOverlay=e},e.prototype.setPropertiesState=function(e){this._propsState=e},e.prototype.insert=function(e,t){return Object(r.__awaiter)(this,void 0,void 0,(function(){var i,o,s,a,c,u,h;return Object(r.__generator)(this,(function(d){switch(d.label){case 0:p=this._inserterImpl,i=void 0!==p.createStub&&void 0!==p.removeStub?this._inserterImpl.createStub():null,o=!0,d.label=1;case 1:return d.trys.push([1,3,4,5]),[4,this._studyMetaInfoRepository.findById(this._studyDescriptor)];case 2:return s=d.sent(),[3,5];case 3:return d.sent(),l.logWarn("Cannot get study "+JSON.stringify(this._studyDescriptor)),[2,Promise.reject(n.CannotGetMetainfo)];case 4:return null!==i&&(o=this._inserterImpl.removeStub(i)),[7];case 5:return o?void 0!==t&&t.cancelled?[2,Promise.reject(n.Cancelled)]:this._canApplyStudyToParent(s)?(a=Object(r.__assign)({},s.defaults.inputs),void 0===e?[3,7]:[4,e(a,s.inputs,s)]):[2,Promise.reject(n.StudyCannotBeChild)]:[2,Promise.reject(n.StubWasRemoved)];case 6:return u=d.sent(),[3,8];case 7:u={},d.label=8;case 8:return c=u,void 0!==t&&t.cancelled?[2,Promise.reject(n.Cancelled)]:null===(h=this._insertStudy(s,c))?[2,Promise.reject(n.Unknown)]:[2,h]}var p}))}))},e.prototype._insertStudy=function(e,t){return this._inserterImpl.createStudy(e,t,null,this._propsState,this._forceOverlay,this._parentSource,this._preferredPriceScale,this._allowChangeCurrency,this._paneSize)},e.prototype._canApplyStudyToParent=function(e){return void 0===this._parentSource||s.a.canBeChild(e)},e}()},"/b+7":function(e,t){ +e.exports=''},"/bs+":function(e,t,i){"use strict";i.r(t),i.d(t,"barTimeToEndOfPeriod",(function(){return r})),i.d(t,"endOfPeriodToBarTime",(function(){return o}));var n=i("E6p6");function r(e,t,i,r){if(r.isDays())return i;if(e.moveTo(1e3*i),r.isIntraday()){var o=e.indexOfBar(1e3*i);if(o<0)throw new Error(i+" is out of the instrument session ");return e.endOfBar(o)/1e3}return e.startOfBar(n.SessionStage.LASTBAR_SESSION)/1e3}function o(e,t,i,n){if(n.isDays())return i;var r=1e3*i-1;if(e.moveTo(r),n.isIntraday()){var o=e.indexOfBar(r);if(o<0)throw new Error(i+" is out of the instrument session ");return e.startOfBar(o)/1e3}return i=e.startOfBar(0)/1e3}},"/hKg":function(e,t,i){"use strict";i.r(t),i.d(t,"PaneRendererCandles",(function(){return a}));var n=i("Eyy1"),r=i("VdBB"),o=i("gAom"),s=i("Zp/P"),a=function(){function e(e){this._bars=[],this._barSpacing=1,this._barWidth=1,this._borderVisible=!1,this._barBorderWidth=1,this._wickVisible=!1,this._bodyVisible=!0,this._borderColor=void 0,this._wickColor=void 0,this._hittest=void 0,e&&this.setData(e)}return e.prototype.setData=function(e){this._bars=e.bars,this._barSpacing=e.barSpacing,this._borderVisible=e.borderVisible,this._bodyVisible=e.bodyVisible,this._wickVisible=e.wickVisible,this._borderColor=e.borderColor,this._wickColor=e.wickColor,this._hittest=e.hittest},e.prototype.hitTest=function(e){var t=this._bars,i=.5*this._barSpacing;if(0===t.length)return null;if(e.xt[t.length-1].time+i)return null;for(var n=null,o=0,a=t;o=2)Math.floor(i)%2!=this._barWidth%2&&this._barWidth--;this._wickVisible&&this._drawWicks(e,i),this._borderVisible&&this._drawBorder(e,i),this._bodyVisible&&this._drawCandles(e,i)}},e.prototype._drawWicks=function(e,t){var i=this._bars,r="",o=Math.min(Math.floor(t),Math.floor(this._barSpacing*t));o=Math.max(Math.floor(t),Math.min(o,this._barWidth));for(var s=Math.floor(.5*o),a=null,l=0,c=i;l2*r)Object(o.fillRectInnerBorder)(e,u,d,h-u+1,p-d+1,r);else{var _=h-u+1;e.fillRect(u,d,_,p-d+1)}s=h}}},e.prototype._drawCandles=function(e,t){for(var i="",n=this._calculateBorderWidth(t),r=0,s=this._bars;rc)continue;e.fillRect(u,l,h-u+1,c-l+1)}}}},e}()},"/jjs":function(e,t,i){"use strict";i.r(t),i.d(t,"Magnet",(function(){return s}));var n=i("Eyy1"),r=i("4o++"),o=i("zL3Q"),s=function(){function e(){}return e.prototype.align=function(e,t,i){var s=e;if(!Object(o.a)().value())return s;var a=i.mainDataSource();if(null===a)return s;var l=a.model().mainSeries();if(a!==l)return s;var c=l.priceScale(),u=l.bars();if(c.isEmpty()||!u.contains(t))return s;var h=u.valueAt(t);if(null===h)return s;var d=[h[1],h[2],h[3],h[4]],p=Object(n.ensure)(l.firstValue()),_=d.map((function(e){return{y:c.priceToCoordinate(e,p),price:e}})),f=c.priceToCoordinate(e,p);_.sort((function(e,t){return Math.abs(e.y-f)-Math.abs(t.y-f)}));var m=_[0];return(Object(o.b)().value()===r.MagnetMode.StrongMagnet||Math.abs(m.y-f)<50)&&(s=m.price),s},e}()},"/kal":function(e,t){e.exports=''},"/mDy":function(e,t,i){},"/tGj":function(e,t,i){"use strict";function n(e){return e.symbolSource()===e} +i.r(t),i.d(t,"isSymbolSource",(function(){return n}))},"/z0S":function(e,t,i){"use strict";i.d(t,"a",(function(){return r}));var n=i("Kxc7");function r(e,t){n.enabled("saveload_requires_authentication")?window.runOrSignIn(e,t):e()}},"08i5":function(e,t,i){"use strict";var n,r;i.r(t),i.d(t,"AlertStatus",(function(){return n})),i.d(t,"Direction",(function(){return r})),function(e){e[e.Waiting=0]="Waiting",e[e.Success=1]="Success",e[e.Failure=2]="Failure"}(n||(n={})),function(e){e[e.Up=1]="Up",e[e.Down=2]="Down"}(r||(r={}))},"0F0w":function(e,t,i){"use strict";i.r(t);var n=i("mrSG"),r=i("aIyQ"),o=i.n(r),s=i("Eyy1"),a=i("hY0g"),l=i.n(a),c=i("e3/o"),u=i("txPx"),h=Object(u.getLogger)("ChartApi.AbstractSession"),d=function(){function e(e,t,i){this._isConnected=new l.a(!1),this._state=0,this._isConnectForbidden=!1,this._sessionId="",this._sessionIdChanged=new o.a,this._chartApi=e,this._sessionPrefix=t,this._shouldReconnectAfterCriticalError=i}return e.prototype.destroy=function(){this._logNormal("Destroying session"),this._isConnected.unsubscribe(),this.disconnect(),this._sessionIdChanged.destroy(),delete this._chartApi,this._logNormal("Session has been destroyed")},e.prototype.isConnected=function(){return this._isConnected},e.prototype.sessionId=function(){return this._sessionId},e.prototype.onSessionIdChanged=function(){return this._sessionIdChanged},e.prototype.connect=function(){0===this._state&&(Object(s.assert)(!this._isConnectForbidden,"Cannot call connect because it is forbidden at this moment"),this._setSessionId(this._sessionPrefix+"_"+Object(c.randomHash)()),this._logNormal("Connecting session - wait until transport stay connected"),this._state=1,this._chartApi.createSession(this._sessionId,this))},e.prototype.disconnect=function(){var e=this;0!==this._state&&(Object(s.assert)(""!==this._sessionId,"sessionId must not be invalid"),this._logNormal("Disconnecting session..."),this._forbidConnectWhile((function(){e._chartApi.connected()&&e._sendRemoveSession(),e._processDestroyingOnServer()})))},e.prototype.onMessage=function(e){switch(e.method){case"connected":return void this._onChartApiConnected();case"disconnected":return void this._onChartApiDisconnected();case"critical_error":var t=String(e.params[0]),i=String(e.params[1]);return void this._onCriticalError(t,i)}this._onMessage(e)},e.prototype._getChartApi=function(){return this._chartApi},e.prototype._generateLogMessage=function(e){return"["+this._sessionId+"] "+e},e.prototype._onCriticalError=function(e,t){var i=this;this._logError("Critical error. Reason="+e+", info="+t+"."),this._forbidConnectWhile((function(){i._processDestroyingOnServer()})),this._shouldReconnectAfterCriticalError?(this._logNormal("Reconnecting after critical error..."),this.connect()):this._logNormal("Reconnecting after critical error skipped")},e.prototype._onChartApiConnected=function(){Object(s.assert)(1===this._state,"Session is not registered"),this._logNormal("Transport is connected. Creating session on the server"),this._sendCreateSession(),this._state=2, +this._isConnected.setValue(!0)},e.prototype._onChartApiDisconnected=function(){var e=this;this._logNormal("Transport is disconnected. Reconnecting..."),this._forbidConnectWhile((function(){e._processDestroyingOnServer()})),this.connect()},e.prototype._setSessionId=function(e){var t=this._sessionId;this._logNormal("Changing sessionId: old="+t+", new="+e),this._sessionId=e,this._sessionIdChanged.fire(e,t)},e.prototype._logNormal=function(e){h.logNormal(this._generateLogMessage(e))},e.prototype._logError=function(e){h.logError(this._generateLogMessage(e))},e.prototype._processDestroyingOnServer=function(){this._state=0,this._isConnected.setValue(!1),this._chartApi.removeSession(this._sessionId),this._setSessionId("")},e.prototype._forbidConnectWhile=function(e){this._isConnectForbidden=!0,e(),this._isConnectForbidden=!1},e}();i.d(t,"ChartSession",(function(){return p}));Object(u.getLogger)("ChartSession");var p=function(e){function t(t,i){void 0===i&&(i=!1);var n=e.call(this,t,"cs",!1)||this;return n._sessionDisabled=!1,n._handler=null,n._criticalError=new o.a,n._disableStatistics=i,n}return Object(n.__extends)(t,e),t.prototype.destroy=function(){this._criticalError.destroy(),this._handler=null,e.prototype.destroy.call(this)},t.prototype.serverTimeOffset=function(){return this._getChartApi().serverTimeOffset()},t.prototype.switchTimezone=function(e){return this._getChartApi().switchTimezone(this.sessionId(),e)},t.prototype.defaultResolutions=function(){return this._getChartApi().defaultResolutions()},t.prototype.availableCurrencies=function(){return this._getChartApi().availableCurrencies()},t.prototype.resolveSymbol=function(e,t,i){return this._getChartApi().resolveSymbol(this.sessionId(),e,t,i)},t.prototype.requestFirstBarTime=function(e,t,i){return this._getChartApi().requestFirstBarTime(this.sessionId(),e,t,i)},t.prototype.createSeries=function(e,t,i,n,r,o,s){return this._getChartApi().createSeries(this.sessionId(),e,t,i,n,r,o,s)},t.prototype.modifySeries=function(e,t,i,n,r,o){return this._getChartApi().modifySeries(this.sessionId(),e,t,i,n,r,o)},t.prototype.removeSeries=function(e,t){return!!this.isConnected().value()&&this._getChartApi().removeSeries(this.sessionId(),e,t)},t.prototype.requestMoreData=function(e,t,i){return this._getChartApi().requestMoreData(this.sessionId(),e,t,i)},t.prototype.requestMoreTickmarks=function(e,t,i){return this._getChartApi().requestMoreTickmarks(this.sessionId(),e,t,i)},t.prototype.requestMetadata=function(e,t){var i=this;i._getChartApi().requestMetadata(i.sessionId(),e,t)},t.prototype.isCanCreateStudy=function(e){return this._getChartApi().isCanCreateStudy(e)},t.prototype.createStudy=function(e,t,i,n,r,o,s){return this._getChartApi().createStudy(this.sessionId(),e,t,i,n,r,o,s)},t.prototype.rebindStudy=function(e,t,i,n,r,o,s){return this._getChartApi().rebindStudy(this.sessionId(),e,t,i,n,r,o,s)},t.prototype.modifyStudy=function(e,t,i,n){return this._getChartApi().modifyStudy(this.sessionId(),e,t,i,n)},t.prototype.removeStudy=function(e,t,i){ +return this._getChartApi().removeStudy(this.sessionId(),e,t,i)},t.prototype.createPointset=function(e,t,i,n,r,o){return this._getChartApi().createPointset(this.sessionId(),e,t,i,n,r,o)},t.prototype.modifyPointset=function(e,t,i,n){return this._getChartApi().modifyPointset(this.sessionId(),e,t,i,n)},t.prototype.removePointset=function(e){return this._getChartApi().removePointset(this.sessionId(),e)},t.prototype.setVisibleTimeRange=function(e,t,i,n,r){this._getChartApi().setVisibleTimeRange(e,this.sessionId(),t,i,n,r)},t.prototype.criticalError=function(){return this._criticalError},t.prototype.connect=function(t){void 0===t&&(t=null),null!==t&&(this._handler=t),e.prototype.connect.call(this)},t.prototype.setHandler=function(e){this._handler=e},t.prototype.connected=function(){return this.isConnected().value()&&!this._sessionDisabled},t.prototype.disable=function(){this._sessionDisabled=!0},t.prototype.chartApi=function(){return this._getChartApi()},t.prototype._sendCreateSession=function(){var e=this;Object.keys(this).forEach((function(t){/^(s|st|symbol_)\d+$/.test(t)&&delete e[t]})),this._getChartApi().chartCreateSession(this.sessionId(),this._disableStatistics)},t.prototype._sendRemoveSession=function(){this._getChartApi().chartDeleteSession(this.sessionId())},t.prototype._onMessage=function(e){this._handler&&this._handler(e)},t.prototype._onCriticalError=function(t,i){this._criticalError.fire(t,i),e.prototype._onCriticalError.call(this,t,i)},t}(d)},"0Pxc":function(e,t,i){"use strict";var n=i("aO4+").Point,r=i("GEp6").distanceToLine,o=i("hfHJ"),s=o.rotationMatrix,a=o.scalingMatrix,l=o.translationMatrix,c=o.transformPoint,u=i("Ss5c").LineDataSource,h=i("Ocx9").DefaultProperty,d=window.t("Arc");function p(e,t){var n=t||p.createProperties();u.call(this,e,n),this.version=p.version,i.e("lt-pane-views").then(function(e){var t=i("dKqZ").ArcPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}inherit(p,u),p.prototype.startChanging=function(e,t){if(u.prototype.startChanging.call(this,e,t),0===e||1===e){var i=this.pointToScreenPoint(this._points[0])[0],o=this.pointToScreenPoint(this._points[1])[0],s=this.pointToScreenPoint(this._points[2])[0];this._dist=r(i,o,s).distance;var a=o.subtract(i),l=new n(-a.y,a.x),c=i.add(o).scaled(.5);s.subtract(c).dotProduct(l)<0&&(this._dist=-this._dist)}},p.prototype.pointsCount=function(){return 3},p.prototype.translatedType=function(){return d},p.prototype.name=function(){return"Arc"},p.prototype.hasEditableCoordinates=function(){return!1},p.prototype.setPoint=function(e,t){var i=Object.assign({},t),o=this.pointToScreenPoint(this._points[0])[0],u=this.pointToScreenPoint(this._points[1])[0],h=this.pointToScreenPoint(this._points[2])[0];switch(e){case 0:o=this.pointToScreenPoint(i)[0];var d=u.subtract(o),p=o.add(u).scaled(.5);f=(f=new n(-d.y,d.x)).normalized(),h=p.add(f.scaled(this._dist)),h=this.screenPointToPoint(h),this._points[0]=i,this._points[2]=h;break;case 1:var _=r(o,u,h).distance;d=(u=this.pointToScreenPoint(i)[0]).subtract(o), +p=o.add(u).scaled(.5);f=(f=new n(-d.y,d.x)).normalized(),h=p.add(f.scaled(this._dist)),h=this.screenPointToPoint(h),this._points[1]=i,this._points[2]=h;break;case 2:i=this.pointToScreenPoint(i)[0];var f;_=r(o,u,i).distance,d=u.subtract(o),p=o.add(u).scaled(.5);f=(f=new n(-d.y,d.x)).normalized(),h=p.add(f.scaled(_));var m=p.add(f.scaled(-_)),v=d.length(),y=d.x/v,g=d.y/v,b=Math.acos(y);g<0&&(b=-b);var S=l(-p.x,-p.y);i=c(S,i);var w=c(S,h);S=s(-b),i=c(S,i),w=c(S,w),S=a(1,v/(2*_)),i=c(S,i),w=c(S,w);var P=i.y*w.y>=0?new n(h.x,h.y):new n(m.x,m.y);P=this.screenPointToPoint(P),this._points[2]=P}this.normalizePoints()},p.version=2,p.prototype.migrateVersion=function(e,t,i){if(1===e&&2===this._points.length){var n=(2*this._points[0].price+3*this._points[1].price)/5;this._points.append({price:n,index:this._points[1].index})}if(1===e&&2===this._timePoint.length){var r={price:n=(2*this._timePoint[0].price+3*this._timePoint[1].price)/5,offset:this._timePoint[1].offset,time_t:this._timePoint[1].time_t};this._timePoint.append(r)}},p.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("Zd1D").GeneralFiguresDefinitionsViewModel}.bind(null,i)).catch(i.oe)},p.createProperties=function(e){var t=new h("linetoolarc",e);return p._configureProperties(t),t},p._configureProperties=function(e){u._configureProperties(e)},t.LineToolArc=p},"0YCj":function(e,t,i){"use strict";(function(e,t){i("Eyy1").assert;var n=i("txPx").getLogger("Chart.Study.MetaInfo"),r=i("9iCb").applyOverridesToStudyDefaults,o=null;function s(e){TradingView.merge(this,{palettes:{},inputs:[],plots:[],graphics:{},defaults:{}}),TradingView.merge(this,e);var t=e.fullId||e.id;TradingView.merge(this,s.parseIdString(t)),this.name=this.id}s.VERSION_STUDY_ARG_SOURCE=41,s.METAINFO_FORMAT_VERSION_SOS_V2=42,s.VERSION_PINE_PROTECT_TV_4164=43,s.CURRENT_METAINFO_FORMAT_VERSION=51,s.VERSION_NEW_STUDY_PRECISION_FORMAT=46,s.CHILD_STUDY_ALLOWED_PLOT_TYPES=["line"],s.canPlotBeSourceOfChildStudy=function(e){return s.CHILD_STUDY_ALLOWED_PLOT_TYPES.includes(e)},s.CHILD_STUDY_EXCLUDE_IDS=["CorrelationCoefficient@tv-basicstudies","Correlation - Log@tv-basicstudies-1"],s.CHILD_STUDY_PARENT_EXCLUDE_IDS=[],s.FilledArea={},s.FilledArea.TYPE_PLOTS="plot_plot",s.FilledArea.TYPE_HLINES="hline_hline",s.versionOf=function(e){var t="_metainfoVersion"in e&&isNumber(e._metainfoVersion)?e._metainfoVersion:0;return t<0&&n.logError("Metainfo format version cannot be negative: "+t),t},s.parseIdString=function(e){var t={};if(-1===e.indexOf("@"))t.shortId=e,t.packageId="tv-basicstudies",t.id=e+"@"+t.packageId,t.version=1;else{var i=e.split("@");t.shortId=i[0];var n=i[1].split("-");if(3===n.length)t.packageId=n.slice(0,2).join("-"),t.id=t.shortId+"@"+t.packageId,t.version=n[2];else if(1===n.length&&"decisionbar"===n[0])t.packageId="les-"+n[0],t.id=t.shortId+"@"+t.packageId,t.version=1;else{if(1!==n.length)throw new Error("unexpected study id:"+e);t.packageId="tv-"+n[0],t.id=t.shortId+"@"+t.packageId,t.version=1}} +if(t.fullId=t.id+"-"+t.version,"tv-scripting"===t.packageId){var r=t.shortId;if(0===r.indexOf("Script$")||0===r.indexOf("StrategyScript$")){var o=r.indexOf("_");t.productId=o>=0?r.substring(0,o):t.packageId}else t.productId=t.packageId}else t.productId=t.packageId;return t},s.getPackageName=function(e){return(/^[^@]+@([^-]+-[^-]+)/.exec(e||"")||[0,"tv-basicstudies"])[1]},s.cutDollarHash=function(e){var t=e.indexOf("$"),i=e.indexOf("@");return-1===t?e:e.substr(0,t)+(i>=0?e.substr(i):"")},s.hasUserIdSuffix=function(e){return/^USER;[\d\w]+;\d+$/.test(e)},s.isStandardPine=function(e){return/^(Strategy)?Script\$STD;.*@tv-scripting$/.test(e)},s.getSourceIdByInputs=function(e,t){if(!Array.isArray(e)||!t)return null;for(var i=0;i0){var l=a.replace(/^[^\$]+/,i);n.inputs[o.id].setValue(l)}}}},s.patchChildStudyMetaInfoState=function(e){e.state&&function e(t){if("object"==typeof t)for(var i in t)"string"==typeof t[i]&&/^[^\$]+\$\d+$/.test(t[i])?t[i]=t[i].replace(/^[^\$]+/,"{pid}"):e(t[i])}(e.state.inputs),e.state.isChildStudy=!0},s.prototype.parseValue=function(e,t){return"bool"===e?TradingView.parseBool(t):t},s.prototype.defaultInputs=function(){for(var e=[],t=0;t0?e[0].id:null},s.prototype.createDefaults=function(){if(this.defaults){var e=TradingView.clone(this.defaults);e.precision="default";var t=s.getStudyPropertyRootName(this);defaults.create(t,e)}},s.prototype.removeDefaults=function(){defaults.remove(s.getStudyPropertyRootName(this))},s.findStudyMetaInfoByDescription=function(e,t){if(e){for(var i=0;ii&&(s=e,o=t)}for(var l=new n(e,t),c=this._pane.state(),u=r.length-1;u>=0;--u){var h=r[u],d=h.priceAxisViews(c,this._priceScale);if(d&&0!==d.length)for(var p=d.length-1;p>=0;--p){var _=d[p].renderer();if(null!==_&&void 0!==_.hitTest){var f=_.hitTest(l,this._size.w,this._isLeft?"left":"right");null!==f&&a(f,h)}}}return o},O.prototype._setCursorClassName=function(e){var t="";e&&(t="price-axis--cursor-"+e),this._currentCursorClassName!==t&&(this._currentCursorClassName&&this._cell.classList.remove(this._currentCursorClassName),t&&this._cell.classList.add(t),this._currentCursorClassName=t)},O.prototype._mouseClickOrTapEvent=function(e){var t=this.dataSourceAtPoint(e.localX,e.localY);t&&this._pane.chart().model().selectionMacro((function(e){e.selection().isSelected(t)||(e.clearSelection(),e.addSourceToSelection(t))}))},O.prototype.mouseClickEvent=function(e){this._mouseClickOrTapEvent(e)},O.prototype.tapEvent=function(e){this._mouseClickOrTapEvent(e)},O.prototype._mouseOrTouchMoveEvent=function(e){ +this._priceScale&&(this.dataSourceAtPoint(e.localX,e.localY)?this._setCursorClassName("pointer"):this._setResizeCursor())},O.prototype.mouseMoveEvent=function(e){this._mouseOrTouchMoveEvent(e)},O.prototype._zoomAvailable=function(){return!this.priceScale().isEmpty()&&this._pane.chart().model().model().zoomEnabled()&&this._options.pressedMouseMoveScale},O.prototype._mouseDownOrTouchStartEvent=function(e){if(this._zoomAvailable()){var t=this._pane.chart().model(),i=this._pane.state();this._mousedown=!0,t.startScalePrice(i,this.priceScale(),e.localY)}},O.prototype.mouseDownEvent=function(e){this._mouseDownOrTouchStartEvent(e)},O.prototype.touchStartEvent=function(e){this._mouseOrTouchMoveEvent(e),this._mouseEnterOrTouchStartEvent(e),this._mouseDownOrTouchStartEvent(e)},O.prototype._pressedMouseOrTouchMoveEvent=function(e){if(this._zoomAvailable()){var t=this._pane.chart().model(),i=this._pane.state(),n=this.priceScale();t.scalePriceTo(i,n,e.localY)}},O.prototype.pressedMouseMoveEvent=function(e){this._pressedMouseOrTouchMoveEvent(e)},O.prototype.touchMoveEvent=function(e){this._pressedMouseOrTouchMoveEvent(e)},O.prototype.mouseDownOutsideEvent=function(e){if(this._zoomAvailable()&&this._pane.hasState()){var t=this._pane.chart().model(),i=this._pane.state(),n=this.priceScale();this._mousedown&&(this._mousedown=!1,t.endScalePrice(i,n),this.restoreDefaultCursor())}},O.prototype._mouseUpOrTouchEndEvent=function(e){if(this._zoomAvailable()){var t=this._pane.chart().model(),i=this._pane.state(),n=this.priceScale();this._mousedown=!1,t.endScalePrice(i,n),this.restoreDefaultCursor()}},O.prototype.mouseUpEvent=function(e){this._mouseUpOrTouchEndEvent(e)},O.prototype.touchEndEvent=function(e){this._mouseLeaveOrTouchEndEvent(e),this._mouseUpOrTouchEndEvent(e)},O.prototype._mouseEnterOrTouchStartEvent=function(e){this._setResizeCursor()},O.prototype.mouseEnterEvent=function(e){this._mouseEnterOrTouchStartEvent(e)},O.prototype._mouseLeaveOrTouchEndEvent=function(e){this._setCursorClassName("")},O.prototype.mouseLeaveEvent=function(e){this._mouseLeaveOrTouchEndEvent(e)},O.prototype._setResizeCursor=function(){this._priceScale.isPercentage()||this._priceScale.isIndexedTo100()?this._setCursorClassName(""):this._pane.chart().model().model().zoomEnabled()&&this._setCursorClassName("ns-resize")},O.prototype._initActions=function(e){if(this._pane.hasState()&&null===this.actions){this.actions={};var t=this,n=this._pane.chart().model();this.actions.reset=new a({label:window.t("Reset Price Scale"),icon:i("LdoW"),shortcut:"Alt+R",shortcutHint:r.humanReadableHash(r.Modifiers.Alt+82),statName:"ResetScale",onExecute:O.prototype.reset.bind(this)}),this.actions.setAutoScale=new a({label:window.t("Auto (Fits Data To Screen)"),checkable:!0,checked:!0,statName:"ToggleAutoScale",onExecute:function(){n.togglePriceScaleAutoScaleMode(t.priceScale()),t._updateScalesActions()}}),this.actions.setPercentage=new a({label:window.t("Percent",{context:"scale_menu"}),checkable:!0,checked:this.priceScale().isPercentage(),statName:"TogglePercantage", +onExecute:function(){n.togglePriceScalePercentageScaleMode(t.priceScale()),t._updateScalesActions()}}),this.actions.setIndexedTo100=new a({label:window.t("Indexed to 100",{context:"scale_menu"}),checkable:!0,checked:this.priceScale().isIndexedTo100(),statName:"ToggleIndexedTo100",onExecute:function(){n.togglePriceScaleIndexedTo100ScaleMode(t.priceScale()),t._updateScalesActions()}}),this.actions.setLog=new a({label:window.t("Logarithmic",{context:"scale_menu"}),checkable:!0,checked:this.priceScale().isLog(),statName:"ToggleLogScale",onExecute:function(){n.togglePriceScaleLogScaleMode(t.priceScale()),t._updateScalesActions()}}),this.actions.setRegular=new a({label:window.t("Regular",{context:"scale_menu"}),checkable:!0,checked:this.priceScale().isRegular(),statName:"ToggleRegularScale",onExecute:function(){n.setPriceScaleRegularScaleMode(t.priceScale()),t._updateScalesActions()}}),this.actions.alignLabels=new a({label:window.t("No Overlapping Labels",{context:"scale_menu"}),checkable:!0,checked:!1,statName:"TogglePreciseLabels"}),this.actions.alignLabels.binding=new g(this.actions.alignLabels,this.priceScale().properties().alignLabels,this._pane.chart().model(),"No Overlapping Labels"),this.actions.invertScale=new a({label:window.t("Invert Scale",{context:"scale_menu"}),checkable:!0,checked:this.priceScale().isInverted(),statName:"Invert Scale",onExecute:function(){n.invertPriceScale(t.priceScale()),t._updateScalesActions()}}),this._updateScalesActions()}},O.prototype._logAction=function(){return this._isMainSeriesAxis()?this._pane.chart().actions().logSeriesScale:this.actions.setLog},O.prototype._percentageAction=function(){return this._isMainSeriesAxis()?this._pane.chart().actions().percentSeriesScale:this.actions.setPercentage},O.prototype._indexedTo100Action=function(){return this._isMainSeriesAxis()?this._pane.chart().actions().indexedTo100SeriesScale:this.actions.setIndexedTo100},O.prototype._autoScaleAction=function(){return this._isMainSeriesAxis()?this._pane.chart().actions().autoSeriesScale:this.actions.setAutoScale},O.prototype._regularScaleAction=function(){return this._isMainSeriesAxis()?this._pane.chart().actions().regularSeriesScale:this.actions.setRegular},O.prototype._lockScaleAction=function(){var e=this._pane.chart().actions().lockSeriesScale,t=A(this.priceScale(),this._pane.chart().model().model().mainSeriesScaleRatio());return e.update({hint:t}),e},O.prototype._invertAction=function(){return this._isMainSeriesAxis()?this._pane.chart().actions().invertSeriesScale:this.actions.invertScale},O.prototype._isMainSeriesAxis=function(){return this.priceScale().hasMainSeries()},O.prototype._updateMainSeriesScalesActions=function(){this._isMainSeriesAxis()&&null!==this.actions&&this._updateScalesActions()},O.prototype._updateScalesActions=function(){var e=this.priceScale(),t=this._isMainSeriesAxis(),i=e.mainSource().properties(),n=t&&e.isLockScale(),r=t&&i.style.value()===TradingView.Series.STYLE_PNF;this.actions.setRegular.update({checked:e.isRegular(),disabled:n||r}),this.actions.setPercentage.update({ +checked:e.isPercentage(),disabled:n||r}),this.actions.setIndexedTo100.update({checked:e.isIndexedTo100(),disabled:n||r}),this.actions.setLog.update({checked:e.isLog(),disabled:n||r}),this.actions.setAutoScale.update({checked:e.isAutoScale(),disabled:e.properties().autoScaleDisabled.value()})},O.prototype._mouseDoubleClickOrDoubleTapEvent=function(e){var t=this.dataSourceAtPoint(e.localX,e.localY);t?this._pane.processDoubleClickOnSource(t):(this.reset(),y("GUI","Double click price scale"))},O.prototype.mouseDoubleClickEvent=function(e){this._mouseDoubleClickOrDoubleTapEvent(e)},O.prototype.doubleTapEvent=function(e){this._mouseDoubleClickOrDoubleTapEvent(e)},O.prototype._contextMenuOrTouchContextMenuEvent=function(e){if(this._options.contextMenuEnabled){var t=this.dataSourceAtPoint(e.localX,e.localY);if(null!==t&&this._options.contextMenu.source)return void this._pane.chart().model().selectionMacro(function(i){i.selection().isSelected(t)||(i.clearSelection(),i.addSourceToSelection(t)),this._pane.showContextMenuForSelection(e)}.bind(this));this._options.contextMenu.general&&this._createContextMenu().then((function(t){t.show(e)}))}},O.prototype.contextMenuEvent=function(e){this._contextMenuOrTouchContextMenuEvent(e)},O.prototype.touchContextMenuEvent=function(e){this._contextMenuOrTouchContextMenuEvent(e)},O.prototype._createContextMenu=function(){return c.createMenu(this.getContextMenuActions(),{statName:"PriceScaleContextMenu"})},O.prototype._createMergeScalesAction=function(){var e=this._pane.chart().actions(),t=this._pane.chart().model().model().priceScaleSlotsCount();if(t.left+t.right===1)return 0===t.left?e.moveScaleToLeft:e.moveScaleToRight;var i=[];return i.push(e.mergeLeftScalesAction),i.push(e.mergeRightScalesAction),new a({label:L,subItems:i})},O.prototype.getContextMenuActions=function(){this._initActions();var e=this._pane.chart().actions(),t=[];if(t.push(this.actions.reset,new l,this._autoScaleAction()),this._isMainSeriesAxis()&&t.push(this._lockScaleAction()),t.push(e.scaleSeriesOnly,this._invertAction(),new l,this._regularScaleAction(),this._percentageAction(),this._indexedTo100Action(),this._logAction(),new l),o.any()||(t.push(this._createMergeScalesAction()),t.push(new l)),!M.enabled("fundamental_widget")){t.push(new a({label:window.t("Labels"),subItems:[e.showSymbolLabelsAction,e.showSeriesLastValue,null,null,null,e.showStudyPlotNamesAction,e.showStudyLastValue,null,null,this.actions.alignLabels].filter(Boolean)}))}return t.push(P(this._pane.chart())),M.enabled("countdown")&&t.push(e.showCountdown),this._options.currencyLabelEnabled&&t.push(e.showCurrency),!TradingView.onWidget()&&M.enabled("show_chart_property_page")&&M.enabled("chart_property_page_scales")&&e.scalesProperties&&t.push(new l,e.scalesProperties),t},O.prototype._sameSideSources=function(){var e=this._isLeft?"left":"right";return this._pane.state().orderedSources(e)},O.prototype._grouppedSources=function(){ +var e=this._pane,t=e.chart().model(),i=this._sameSideSources().slice(),n=e.state(),r=this.priceScale(),o=new Set,s=t.lineBeingEdited()||t.lineBeingCreated();if(s&&o.add(s),t.sourcesBeingMoved().forEach((function(e){o.add(e)})),t.selection().sources().forEach((function(e){o.add(e)})),t.hoveredSource()&&o.add(t.hoveredSource()),r===n.defaultPriceScale())for(var a=this._pane.state().dataSources(),l=0;l0&&this._hightlightBackground(e,l,this.priceScale().mainSource(),t);var c=s.model().crossHairSource();c.startMeasurePoint()&&this._hightlightBackground(e,c.measurePoints(),this.priceScale().mainSource(),t)},O.prototype.drawBorder=function(e,t){e.save(),e.fillStyle=this.lineColor();var i,n=Math.max(1,Math.floor(this.rendererOptions().borderSize*t));i=this._isLeft?Math.floor(this._size.w*t)-n:0,e.fillRect(i,0,n,Math.ceil(this._size.h*t)+1),e.restore()},O.prototype.drawTickMarks=function(e,t){var i=this.priceScale().marks() +;e.save(),e.setFont(this.baseFont());var n=this.rendererOptions(),r=this._isLeft?Math.floor((this._size.w-n.tickLength-n.borderSize)*t):Math.floor(n.borderSize*t),o=this._isLeft?Math.round(r-n.paddingInner*t):Math.round(r+(n.tickLength+n.paddingInner)*t),s=this._isLeft?"right":"left",a=Math.round(n.tickLength*t),l=Math.max(1,Math.floor(t)),c=Math.floor(.5*t),u=0!==i.length?this._tickmarksCache.getLabelHeight(e,i[0].label):0,h=this._isCurrencyLabelVisible()?this._currencyLabelLineHeight()+this._currencyLabel.labelTop():0,d=i.map((function(e){if(this._options.croppedTickMarks)return!0;var t=e.coord-u/2;return!(e.coord+u/2>this._size.h||t0&&(e=a[0].floatCoordinate())}}}u.forEach((function(e){h.add(e)})),d(n),d(this._pane.state().customSources());var p=t.filter((function(t){return t.floatCoordinate()<=e})),_=t.filter((function(t){return t.floatCoordinate()>e}));p.sort((function(e,t){return t.floatCoordinate()-e.floatCoordinate()})),p.length&&_.length&&_.push(p[0]),_.sort((function(e,t){return e.floatCoordinate()-t.floatCoordinate()}));var f=t.length;for(a=0;ab-y&&v.setFixedCoordinate(b-y)}for(var S=1;S<_.length;S++){var w;v=_[S],y=(w=_[S-1]).height(o,!0),g=v.coordinate(),b=w.getFixedCoordinate();(g||b)&&g=l)&&(o={value:l,view:a})}})),r.view&&n.push(r.view), +o.view&&n.push(o.view),n},O.prototype._isFromSameSide=function(e){return(this._isLeft?this._pane.state().leftPriceScales():this._pane.state().rightPriceScales()).includes(e)},O.prototype._addViewsOrMaxMin=function(e,t){var i=this._pane.state(),n=this.priceScale();if(n!==i.defaultPriceScale()&&(e=e.filter(function(e){return i.isOverlay(e)||this._isFromSameSide(e.priceScale())}.bind(this))),0!==e.length)if(1===e.length){var r=e[0].priceAxisViews(i,n);r&&r.length&&t.push(r)}else t.push(this._minMaxViews(e))},O.prototype.drawCrossHairLabel=function(e,t){e.save();var i=this._pane.chart().model().model(),n=this._pane.state(),r=this.priceScale(),o=[],s=this._pane.state(),a=this.priceScale()===n.defaultPriceScale(),l=i.lineBeingEdited()||i.lineBeingCreated();l&&(l.priceScale()===r||a&&n.isOverlay(l))&&((u=l.priceAxisViews(s,r))&&u.length&&o.push(u));this._addViewsOrMaxMin(i.sourcesBeingMoved(),o),this._addViewsOrMaxMin(i.selection().sources(),o);var c=i.hoveredSource();if(c){var u,h=n.customSources().includes(c)?r:c.priceScale();if(!i.selection().isSelected(c)&&(this._isFromSameSide(h)||a&&n.isOverlay(c)))(u=i.hoveredSource().priceAxisViews(s,r))&&u.length&&o.push(u)}(u=i.crossHairSource().priceAxisViews(s,r))&&u.length&&o.push(u);var d=this.rendererOptions(),p=this._isLeft?"right":"left";o.forEach((function(i){i.forEach((function(i){e.save(),i.renderer().draw(e,d,this._widthCache,this._size.w,p,t),e.restore()}),this)}),this),e.restore()},O.prototype.setAutoScale=function(e){var t=this._pane.state(),i=this.priceScale();this._pane.chart().model().setPriceAutoScale(t,i,e)},O.prototype.reset=function(){var e=this._pane.state(),t=this.priceScale();this._pane.chart().model().resetPriceScale(e,t)},O.prototype.hardResetCanvas=function(){null!==this._size&&(p(this._canvasBinding,this._size),p(this._topCanvasBinding,this._size))},O.prototype._isMainPane=function(){return this._pane.state().containsMainSeries()},O.prototype.paint=function(e){if(this._isVisible&&e!==u.None){if(e>u.Cursor){var t=d(this._canvasBinding.canvas);this._alignLabels(),this.drawBackground(t,this._canvasBinding.pixelRatio),this.drawBorder(t,this._canvasBinding.pixelRatio),this._pane.hasState()&&(this._updateCurrencyLabel(),this.drawTickMarks(t,this._canvasBinding.pixelRatio),this.drawBackLabels(t,this._canvasBinding.pixelRatio))}if(this._pane.hasState()){var i=d(this._topCanvasBinding.canvas),n=this._topCanvasBinding.pixelRatio;i.clearRect(0,0,Math.ceil(this._size.w*n)+1,Math.ceil(this._size.h*n)+1),this.drawCrossHairLabel(i,n)}}},O.prototype.restoreDefaultCursor=function(){this.setCursor("")},O.prototype.setCursor=function(e){var t="";"grabbing"!==e&&"ns-resize"!==e||(t="price-axis--cursor-"+e),this._currentCursorClassName!==t&&(this._currentCursorClassName&&this._cell.classList.remove(this._currentCursorClassName),t&&this._cell.classList.add(t),this._currentCursorClassName=t,this._cell.style.cursor)},O.prototype.axisInfo=function(){return this._axisInfo},O.prototype.setHighlighted=function(e){this._highlighted!==e&&(this._highlighted=e)};var A=k(4);e.exports={ +PriceAxisWidget:O,scaleRatioForContextMenuTransformer:k}},"1Wlv":function(e,t,i){"use strict";(function(e){var n=i("Yj6H").PriceScaleBase,r=i("Ss5c").LineDataSource,o=i("7ktv").PriceDataSource,s=i("qJq3").Series,a=i("kcTO").PriceFormatter,l=i("GH0z").PercentageFormatter,c=i("Qb4w").PriceRange,u=i("e3/o").randomHash,h=i("s1Gx").sortSources,d=i("3ClC").isStudy,p=i("lTLF").PriceTickMarkBuilder,_=i("TTFo"),f=_.fromPercent,m=_.toPercent,v=_.toPercentRange,y=_.fromIndexedTo100,g=_.toIndexedTo100,b=_.toIndexedTo100Range,S=_.fromLog,w=_.toLog,P=new l,C=new a(100,1);function x(t,i){n.call(this,i),this._scalesProperties=t,this.m_height=0,this._internalHeightCache=null,this._internalHeightChanged=new e,this.m_priceRange=null,this._priceRangeChanged=new e,this.m_topMargin=0,this.m_bottomMargin=0,this._topPixelMargin=0,this._bottomPixelMargin=0,this.m_scrollStartPoint=null,this.m_scaleStartPoint=null,this.m_maxPriceRange=null,this.m_minPriceRange=null,this.m_priceRangeSnapshot=null,this._invalidatedForRange={isValid:!0,visibleBars:null};var r=this;this._coordinateToLogicalFunc=function(e,t){return r._coordinateToLogical(e,t)},this._logicalToCoordinateFunc=function(e,t){return r._logicalToCoordinate(e,t)},this.m_markBuilder=new p(this,100,this._coordinateToLogicalFunc,this._logicalToCoordinateFunc),this._modeChanged=new e,this._properties.isInverted.listeners().subscribe(this,x.prototype._onIsInvertedChanged),this._properties.listeners().subscribe(null,(function(){if(r.mainSource()&&r.mainSource().model()){var e=r.mainSource().model().paneForSource(r.mainSource());r.mainSource().model().updatePane(e)}})),this._scalesProperties.listeners().subscribe(this,(function(){this._marksCache=null})),this.setId(u())}inherit(x,n),x.prototype.id=function(){return this._id},x.prototype.setId=function(e){this._id=e},x.prototype._convertPriceRangeFromLog=function(e){if(null===e)return null;var t=S(e.minValue()),i=S(e.maxValue());return new c(t,i)},x.prototype._convertPriceRangeToLog=function(e){if(null===e)return null;var t=w(e.minValue()),i=w(e.maxValue());return new c(t,i)},x.prototype._canConvertPriceRangeFromLog=function(e){if(null===e)return!1;var t=S(e.minValue()),i=S(e.maxValue());return isFinite(t)&&isFinite(i)},x.prototype.mode=function(){return{autoScale:this._properties.autoScale.value(),lockScale:this._properties.lockScale.value(),percentage:this._properties.percentage.value(),indexedTo100:this._properties.indexedTo100.value(),log:this._properties.log.value()}},x.prototype.setMode=function(e){var t={},i=this.mode(),n=this._properties.state(),r=null;void 0!==e.autoScale&&e.autoScale!==n.autoScale&&(t.autoScale=e.autoScale,this._setAutoScaleValueWithDependentProperties(e.autoScale)),void 0!==e.lockScale&&e.lockScale!==n.lockScale&&(t.lockScale=e.lockScale,this._setLockScaleValueWithDependentProperties(e.lockScale)),void 0!==e.percentage&&e.percentage!==n.percentage&&(t.percentage=e.percentage,this._setPercentageValueWithDependentProperties(e.percentage),this._invalidatedForRange.isValid=!1), +void 0!==e.indexedTo100&&e.indexedTo100!==n.indexedTo100&&(t.indexedTo100=e.indexedTo100,this._setIndexedTo100ValueWithDependentProperties(e.indexedTo100),this._invalidatedForRange.isValid=!1),void 0!==e.log&&e.log!==n.log&&(t.log=e.log,this._setLogValueWithDependentProperties(e.log)),n.log&&!this._properties.log.value()&&(this._canConvertPriceRangeFromLog(this.m_priceRange)?null!==(r=this._convertPriceRangeFromLog(this.m_priceRange))&&this.setPriceRange(r):this.properties().autoScale.setValue(!0)),!n.log&&this._properties.log.value()&&null!==(r=this._convertPriceRangeToLog(this.m_priceRange))&&this.setPriceRange(r),n.autoScale!==this._properties.autoScale.value()&&this._properties.autoScale.listeners().fire(this._properties.autoScale),n.autoScaleDisabled!==this._properties.autoScaleDisabled.value()&&this._properties.autoScaleDisabled.listeners().fire(this._properties.autoScaleDisabled),n.lockScale!==this._properties.lockScale.value()&&this._properties.lockScale.listeners().fire(this._properties.lockScale),n.percentage!==this._properties.percentage.value()&&(this._properties.percentage.listeners().fire(this._properties.percentage),this.updateFormatter()),n.indexedTo100!==this._properties.indexedTo100.value()&&(this._properties.indexedTo100.listeners().fire(this._properties.indexedTo100),this.updateFormatter()),n.percentageDisabled!==this._properties.percentageDisabled.value()&&this._properties.percentageDisabled.listeners().fire(this._properties.percentageDisabled),n.log!==this._properties.log.value()&&this._properties.log.listeners().fire(this._properties.log),n.logDisabled!==this._properties.logDisabled.value()&&this._properties.logDisabled.listeners().fire(this._properties.logDisabled),void 0===t.log&&void 0===t.percentage&&void 0===t.lockScale&&void 0===t.autoScale&&void 0===t.indexedTo100||this._modeChanged.fire(i,this.mode())},x.prototype.modeChanged=function(){return this._modeChanged},x.prototype.fontSize=function(){return this._scalesProperties.fontSize.value()},x.prototype.height=function(){return this.m_height},x.prototype.setHeight=function(e){this.m_height!==e&&(this.m_height=e,this._invalidateInternalHeightCache(),this._marksCache=null)},x.prototype.topPixelMargin=function(){return this.isInverted()?this.m_bottomMargin*this.height()+this._bottomPixelMargin:this.m_topMargin*this.height()+this._topPixelMargin},x.prototype.topMargin=function(){return this.m_topMargin},x.prototype.setTopMargin=function(e){if(!isNumber(e))throw new TypeError("invalid margin");if(e<0||e>30)throw new RangeError("invalid margin");this.m_topMargin!==e&&(this.m_topMargin=e,this._invalidateInternalHeightCache(),this._marksCache=null)},x.prototype.bottomPixelMargin=function(){return this.isInverted()?this.m_topMargin*this.height()+this._topPixelMargin:this.m_bottomMargin*this.height()+this._bottomPixelMargin},x.prototype.bottomMargin=function(){return this.m_bottomMargin},x.prototype.setBottomMargin=function(e){if(!isNumber(e))throw new TypeError("invalid margin");if(e<0||e>30)throw new RangeError("invalid margin") +;this.m_bottomMargin!==e&&(this.m_bottomMargin=e,this._invalidateInternalHeightCache(),this._marksCache=null)},x.prototype.internalHeight=function(){if(this._internalHeightCache)return this._internalHeightCache;var e=this.height()-this.topPixelMargin()-this.bottomPixelMargin();return this._internalHeightCache=e,e},x.prototype._invalidateInternalHeightCache=function(){this._internalHeightCache=null,this._internalHeightChanged.fire()},x.prototype.internalHeightChanged=function(){return this._internalHeightChanged},x.prototype.priceRange=function(){return this.makeSureItIsValid(),this.m_priceRange},x.prototype.priceRangeChanged=function(){return this._priceRangeChanged},x.prototype.setPriceRange=function(e,t,i){if(!(e instanceof c))throw new TypeError("incorrect price range");var n=this.m_priceRange;if(!t&&(null!==n||null===e)&&(null===n||n.equals(e)))return!1;var r=null!==this.m_maxPriceRange&&this.m_maxPriceRange.containsStrictly(e),o=null!==this.m_minPriceRange&&e.containsStrictly(this.m_minPriceRange);if(this.isLockScale()&&!t&&(r||o))return!1;this._marksCache=null,this.m_priceRange=e,i||this._priceRangeChanged.fire(n,e)},x.prototype.isEmpty=function(){return this.makeSureItIsValid(),0===this.m_height||!this.m_priceRange||this.m_priceRange.isEmpty()},x.prototype.invertedCoordinate=function(e){return this.isInverted()?e:this.height()-1-e},x.prototype.priceToLogical=function(e){return this.isLog()&&e?w(e):e},x.prototype.logicalToPrice=function(e){return this.isLog()?S(e):e},x.prototype._logicalToCoordinate=function(e,t){if(this.makeSureItIsValid(),this.isEmpty())return 0;e=this.priceToLogical(e);var i=this.bottomPixelMargin()+(this.internalHeight()-1)*(e-this.priceRange().minValue())/(this.priceRange().maxValue()-this.priceRange().minValue());return this.invertedCoordinate(i)},x.prototype.priceToCoordinate=function(e,t){return this.isPercentage()?e=m(e,t):this.isIndexedTo100()&&(e=g(e,t)),this._logicalToCoordinate(e,t)},x.prototype.pointsArrayToCoordinates=function(e,t){this.makeSureItIsValid();var i=this.bottomPixelMargin(),n=this.priceRange().minValue(),r=this.priceRange().maxValue(),o=this.internalHeight()-1,s=this.isInverted(),a=o/(r-n);if(this.isPercentage())for(var l=0;l0||Math.abs(s-this._bottomPixelMargin)>0)&&(this._bottomPixelMargin=s,this._topPixelMargin=o,this._marksCache=null,this._invalidateInternalHeightCache()),t?(t.minValue()===t.maxValue()&&(t=new c(t.minValue()-.5,t.maxValue()+.5)),this.setPriceRange(t)):this.m_priceRange||this.setPriceRange(new c(-.5,.5)),this._invalidatedForRange.isValid=!0}},x.prototype.sourcesToUpdateViews=function(){if(!this._sourcesToUpdateViews){this._sourcesToUpdateViews=[];for(var e=0;e'},"2+aH":function(e,t,i){"use strict";(function(e){var n=i("vdSZ").CrosshairDataWindowView,r=i("Hm6r").CrosshairTimeAxisView,o=i("zZ2k").CrosshairBase,s=i("mMWL"),a=i("ogJP").isNaN;function l(t,i,a){var l=this;o.call(this,t,a),this._properties=i,this._dataWindowView=new n(t) +;var c=function(){return this.appliedIndex()}.bind(this),u=function(){return this._startMeasurePoint.index}.bind(this),h=function(){return this._lastMeasurePoint().index}.bind(this);this._timeAxisView=new r(t,c,!1),this._startMeasureTimeAxisView=new r(t,u,!0),this._endMeasureTimeAxisView=new r(t,h,!0),this.visible=!0,t.readOnly()?this.areLinesVisible=!0:s.cursorTool.subscribe((function(e){l.areLinesVisible="arrow"!==e}),{callWithLast:!0}),this._movedDelegate=new e,this._subscribed=!1,this._barSelectedDelegate=new e}inherit(l,o),l.prototype.index=0,l.prototype.price=NaN,l.prototype.pane=null,l.prototype.color="white",l.prototype.style="",l.prototype.customization={disableSelection:!0},l.prototype.model=function(){return this._model},l.prototype.properties=function(){return this._properties},l.prototype.moved=function(){return this._movedDelegate},l.prototype.originX=function(){return this._originX},l.prototype.originY=function(){return this._originY},l.prototype.saveOriginCoord=function(e,t){this._originX=e,this._originY=t},l.prototype.originCoordX=function(){return this._originX},l.prototype.originCoordY=function(){return this._originY},l.prototype.clearOriginCoord=function(){this._originX=NaN,this._originY=NaN},l.prototype.setPosition=function(e,t,i){this._subscribed||(this._model.mainSeries().onRestarted().subscribe(this,l.prototype.clearMeasure),this._subscribed=!0),this.setLockedPosition(i),this.visible=!0,this._tryToUpdateViews(e,t,i)},l.prototype.selectionPane=function(){return this._selectionPane},l.prototype.update=function(){if(this.visible){var e=this._priceScaleByPane(this.pane),t=this._originX||this.x,i=this._originY||this.y,n=this._model.timeScale().coordinateToIndex(t),r=NaN;if(null!==e){var o=this.pane.mainDataSource().firstValue();r=e.coordinateToPrice(i,o)}this._tryToUpdateViews(n,r,this.pane)}else this._setIndexToLastSeriesBarIndex()},l.prototype._priceScaleByPane=function(e){return e&&!e.defaultPriceScale().isEmpty()?e.defaultPriceScale():null},l.prototype._tryToUpdateViews=function(e,t,i){this._tryToUpdateData(e,t,i)&&(this.updateAllViews(),this._movedDelegate.fire({time:this._model.timeScale().points().roughTime(this.index),price:this.price}))},l.prototype._tryToUpdateData=function(e,t,i){var n=this.x,r=this.y,o=this.price,s=this.index,l=this.pane,c=this._priceScaleByPane(i);if(this.index=e,this.x=a(e)?NaN:this._model.timeScale().indexToCoordinate(e),null!==c){this.pane=i,this.price=t;var u=i.mainDataSource().firstValue();this.y=c.priceToCoordinate(t,u)}else this.pane=null,this.price=NaN,this.y=NaN;return n!==this.x||r!==this.y||s!==this.index||o!==this.price||l!==this.pane},l.prototype.clearPosition=function(){this.visible=!1,this._setIndexToLastSeriesBarIndex(),this.price=NaN,this.x=NaN,this.y=NaN,this.pane=null,this.clearOriginCoord()},l.prototype._setIndexToLastSeriesBarIndex=function(){var e=this._model.mainSeries().bars().lastIndex();this.index=null!==e?e:NaN},l.prototype.dataWindowView=function(){return this._dataWindowView},l.prototype.appliedIndex=function(){ +return isFinite(this.lockedIndex)&&this.lockedIndex||this.index},l.prototype.appliedX=function(){return isFinite(this.lockedX)&&this.lockedX||this.x},l.prototype.selectBarMode=function(){return this._selectBarMode},l.prototype.toggleSelectBarMode=function(){this._setSelectBarModeState(!this._selectBarMode.value())},l.prototype.onBarSelected=function(){return this._barSelectedDelegate},l.prototype._setSelectBarModeState=function(e){this._selectBarMode.setValue(e),this._model.lightUpdate()},l.prototype.trySelectCurrentBar=function(){if(this._model.mainSeries().bars().contains(this.index)){var e=this._model.timeScale().indexToTimePoint(this.index);null!==e&&(this._setSelectBarModeState(!1),this._barSelectedDelegate.fire(e))}},l.prototype.handleContextMenuEvent=function(){this._selectBarMode.value()&&this._setSelectBarModeState(!1)},l.prototype.setOnHoveredChartWidget=function(e){this._isOnHoveredChartWidget=e},l.prototype.isOnHoveredChartWidget=function(){return this._isOnHoveredChartWidget},t.CrossHair=l}).call(this,i("aIyQ"))},"22xp":function(e,t,i){"use strict";i.r(t);var n=i("mrSG"),r=i("Eyy1"),o=(i("YFKU"),i("9uLv")),s=i("txPx"),a=i("//lZ"),l=i("aIyQ"),c=i.n(l),u=i("Kxc7"),h=i("Hr11"),d=i("ogJP"),p=i("ZJKN"),_=function(){function e(e,t){Object(r.assert)(e<=t,"The left value should be greater than or equal to the right value"),this._left=e,this._right=t}return e.prototype.left=function(){return this._left},e.prototype.right=function(){return this._right},e.prototype.length=function(){return this._right-this._left+1},e.prototype.contains=function(e){return this._left<=e&&e<=this._right},e.prototype.equals=function(e){return this._left===e.left()&&this._right===e.right()},e.compare=function(e,t){return null===e||null===t?e===t:e.equals(t)},e}(),f=Object(s.getLogger)("Chart.TimePoints"),m=function(){function e(){this._zoffset=0,this._items=[]}return e.prototype.clear=function(){this._zoffset=0,this._items=[]},e.prototype.size=function(){return this._items.length},e.prototype.firstIndex=function(){return this._offsetToIndex(0)},e.prototype.lastIndex=function(){return this._offsetToIndex(this._items.length-1)},e.prototype.merge=function(e,t,i){if(0===i.length)return f.logError("merge: 'values' does not contain any time points"),[];if(t>this._zoffset&&e+t>0)return f.logError("merge: when the first time point index is updated, we should fill the time points starting from the first one"),[];if(0===this._items.length)return this._items=i,this._zoffset=t,[{change:"rebuild",index:this._validOffsetToIndex(0)}];var n=e+this._zoffset;if(n<0){var r=Math.abs(n);if(i.lengththis._items.length){r=l-this._items.length;for(var c=a;cthis._items[this._items.length-1])return t?this._validOffsetToIndex(this._items.length-1):null;for(var i=0;is?(u=e-s)<500&&null!=t?t(l,u):l+u*c:null},e.prototype.roughIndex=function(e,t){void 0===t&&(t=null);var i=this._items;if(!i.length||i.length<2)return null;var n=i.length-1,r=this._validOffsetToIndex(0),o=this._validOffsetToIndex(n),s=i[0],a=i[n];if(e>=s&&e<=a)return this.closestIndexLeft(e);var l=(a-s)/(o-r);if(ea){var u;c=e-a;if((u=Math.trunc(c/l))<500&&null!==t){var h=t(a,e);h.success&&(u=h.result)}return o+u}return null},e.prototype.closestIndexLeft=function(e){var t=this._items;if(!t.length)return null;if(Number.isNaN(e))return null;var i=t.length-1;if(e>=t[i])return this._validOffsetToIndex(i);var n=0,r=t[n];if(en+1;){var o=n+i>>1,s=t[o];if(s>e)i=o;else{if(!(s0&&this._points.merge(e,t,i),this._tickMarks.merge(n),this._correctOffset()}, +e.prototype.addTail=function(e,t,i){this._tickMarks.removeTail(t);for(var n=e.params,o=Object(r.ensureDefined)(this._tickMarks.maxIndex)+(i?0:1),s=0;s0&&(i*=this._width/e.width)),this._tryToUpdateBarSpacing(this._barSpacing,i),this._correctOffset()}else k.logDebug("restoreState: invalid state");else k.logDebug("restoreState: invalid state")},e.prototype.marks=function(){if(this.isEmpty())return null;for(var e=this._barSpacing,t=5*((this._scalesProperties.childs().fontSize.value()||0)+4),i=Math.round(t/e),n=Object(r.ensureNotNull)(this.visibleBarsStrictRange()),o=Math.max(n.firstBar(),n.firstBar()-i),s=Math.max(n.lastBar(),n.lastBar()-i),a=[],l=0,c=this._tickMarks.build(e,t);l=P.DAY_SPAN})}}return a},e.prototype.visibleBarsStrictRange=function(){return this._visibleBarsInvalidated&&(this._visibleBarsInvalidated=!1,this._updateVisibleBars()),this._visibleBars.strictRange()},e.prototype.visibleBarsStrictRangeChanged=function(){return this._visibleBarsChanged},e.prototype.logicalRangeChanged=function(){return this._logicalRangeChanged},e.prototype.tickMarks=function(){return this._tickMarks},e.prototype.points=function(){return this._points},e.prototype.width=function(){return this._width},e.prototype.setWidth=function(e){if(!Number.isFinite(e)||e<=0)k.logWarn("setWidth: invalid argument: "+e);else if(this._width!==e){if(this._visibleBarsInvalidated=!0,this._options.lockVisibleTimeRangeOnResize&&this._width){var t=this._barSpacing*e/this._width;this._tryToUpdateBarSpacing(this._barSpacing,t)}if(null!==this._leftEdgeIndex)if(Object(r.ensureNotNull)(this.visibleBarsStrictRange()).firstBar()<=this._leftEdgeIndex){var i=this._width-e;this._rightOffset-=Math.round(i/this._barSpacing)+1}this._width=e,this._widthChanged.fire(e),this._correctOffset()}},e.prototype.setLeftEdgeFix=function(e){this._leftEdgeIndex=e;var t=this.visibleBarsStrictRange();if(null!==t){var i=t.firstBar()-e;if(i<0){var n=this._rightOffset-i-1;this.scrollToOffsetAnimated(n,500)}}},e.prototype.indexToCoordinate=function(e){if(this.isEmpty())return 0 +;if(!Object(d.isInteger)(e))return 0;var t=this.baseIndex()+this._rightOffset-e;return this._width-(t+.5)*this._barSpacing},e.prototype.indexToUserTime=function(e){return this._tickMarks.indexToTime(e)},e.prototype.timePointToIndex=function(e){return this._points.indexOf(e,!0)},e.prototype.indexToTimePoint=function(e){return this._points.valueAt(e)},e.prototype.timeToCoordinate=function(e){var t=this._points.closestIndexLeft(e);if(null===t)return null;var i=Object(r.ensureNotNull)(this._points.valueAt(t)),n=this.indexToCoordinate(t);if(n<=0||n>=this._width)return null;var o=this.barSpacing(),s=this.baseIndex(),a=n+(e-i)/(Object(r.ensureNotNull)(this._points.valueAt(s))-Object(r.ensureNotNull)(this._points.valueAt(s-1)))*o+1;return a<=0||a>=this._width?null:a},e.prototype.barIndexesToCoordinates=function(e){for(var t=this.baseIndex(),i=0,n=e;i0&&n>s&&(n=s);var l=this._model;Object(a.doAnimate)({from:r,to:n,duration:1e3,easing:o.easingFunc.easeInOutQuint,onComplete:t,onStep:function(e,t){i._visibleBarsInvalidated=!0,i._rightOffset=t,i._correctOffset(),l.recalculateAllPanes(),l.lightUpdate(),l.recalcVisibleRangeStudies()}})}else this._visibleBarsInvalidated=!0,this._rightOffset=n,this._correctOffset(),void 0!==t&&t()},e.prototype.scrollToOffsetAnimated=function(e,t){var i=this;if(!isFinite(e))throw new RangeError("offset is required and must be finite number");var n=void 0===t?400:t;if(!isFinite(n)||n<=0)throw new RangeError("animationDuration (optional) must be finite positive number");var r=this._rightOffset,o=Date.now(),s=function(){i._visibleBarsInvalidated=!0;var t=(Date.now()-o)/n;if(t>=1)return i._rightOffset=e,i._correctOffset(),i._visibleBarsInvalidated=!0,i._model.recalculateAllPanes(),void i._model.lightUpdate();i._rightOffset=r+(e-r)*t,i._correctOffset(),i._model.recalculateAllPanes(),setTimeout(s,20)};s()},e.prototype.defaultRightOffsetProperty=function(){return this._defaultRightOffsetProperty},e.prototype.rightOffsetDefaultValue=function(){return 10},e.prototype.barSpacing=function(){return this._barSpacing},e.prototype.setBarSpacing=function(e){Number.isFinite(e)?(e=this.getValidBarSpacing(e),this._tryToUpdateBarSpacing(this._barSpacing,e)&&(this._correctOffset(),this._options.preserveBarSpacing&&(Object(S.saveDefaultProperties)(!0),this._scalesProperties.childs().barSpacing.setValue(this._barSpacing), +Object(S.saveDefaultProperties)(!1)))):k.logWarn("setBarSpacing: invalid argument: "+e)},e.prototype.barSpacingChanged=function(){return this._barSpacingChanged},e.prototype.getValidBarSpacing=function(e){return null==e&&(e=this.barSpacing()),ethis.maxBarSpacing()?this.maxBarSpacing():e},e.prototype.isValidBarSpacing=function(e){return e>=this.minBarSpacing()&&e<=this.maxBarSpacing()},e.prototype.preserveBarSpacing=function(){return this._options.preserveBarSpacing},e.prototype.normalizeBarIndex=function(e){var t=0,i=0,n=this.baseIndex(),o=Object(r.ensureNotNull)(this._points.firstIndex());return en?(t=Object(r.ensureNotNull)(this._points.valueAt(n)),i=e-n):(t=Object(r.ensureNotNull)(this._points.valueAt(e)),i=0),{time_t:t,offset:i}},e.prototype.denormalizeTimePoint=function(e){var t=this._points.indexOf(e.time_t,!1);if(null!==t)return t+e.offset},e.prototype.rightOffset=function(){return this._rightOffset},e.prototype.minRightOffset=function(){var e=this.points().firstIndex(),t=this._baseIndex;if(null===e||null===t)return null;if(null!==this._leftEdgeIndex){var i=this.width()/this._barSpacing;return this._leftEdgeIndex-t+i-1}return e-t-1+O},e.prototype.maxRightOffset=function(){return this.width()/this._barSpacing-O},e.prototype.maxRightOffsetChanged=function(){return this._maxRightOffsetChanged},e.prototype.onReset=function(){return this._resetDelegate},e.prototype.scrollStartPoint=function(){return this._scrollStartPoint},e.prototype.baseIndex=function(){return this._baseIndex||0},e.prototype.zoom=function(e,t,i){if(Number.isFinite(e)&&Number.isFinite(t)){var n=this.coordinateToIndex(e),r=this.barSpacing(),o=r+t*(r/10);this.setBarSpacing(o),(void 0!==i?!i:this._options.rightBarStaysOnScroll)||this.setRightOffset(this.rightOffset()-.5+(n-this._coordinateToFloatIndex(e)))}else k.logWarn("zoom: invalid arguments: "+e+", "+t+", "+i)},e.prototype.zoomToBarsRange=function(e,t){if(!(t<=e)){var i=this.baseIndex();this._rightOffset=t-i;var n=A.get(this._model.mainSeries().style())||.6,r=Math.max(t-e+n,O);this.setBarSpacing(this.width()/r),this._visibleBarsInvalidated=!0}},e.prototype.coordinateToIndex=function(e){return Math.ceil(this._coordinateToFloatIndex(e))},e.prototype.canZoomIn=function(){return this.barSpacing()L},e.prototype.minBarSpacing=function(){return L},e.prototype.maxBarSpacing=function(){return M?this.width():50},e.prototype.resetRightOffset=function(){this.setRightOffset(this._defaultRightOffsetProperty.value())},e.prototype.reset=function(){this._visibleBarsInvalidated=!0,this._points=new m,this._scrollStartPoint=null,this._scaleStartPoint=null,this._clearCommonTransitionsStartState(),this._tickMarks.reset(),this._leftEdgeIndex=null,this._resetDelegate.fire()},e.prototype.setBaseIndex=function(e){Number.isFinite(e)?(this._visibleBarsInvalidated=!0,this._baseIndex=e, +this._correctOffset()):k.logDebug("setBaseIndex: invalid argument: "+e)},e.prototype.setRightOffset=function(e){Number.isFinite(e)?(this._visibleBarsInvalidated=!0,this._rightOffset=e,this._correctOffset()):k.logWarn("setRightOffset: invalid argument: "+e)},e.prototype.correctBarSpacing=function(){this.isEmpty()||this.points().size()e&&(this._rightOffset=e,this._visibleBarsInvalidated=!0);var t=this.minRightOffset();null!==t&&this._rightOffsett[t.length-1].time+i)return null;for(var o=null,s=0,a=t;s=2)&&(Math.max(1,Math.floor(i))%2!=this._barWidth%2&&this._barWidth--);this._barLineWidth=this._thinBars?Math.min(this._barWidth,Math.floor(i)):this._barWidth;for(var n=null,r=this._barLineWidth<=this._barWidth&&this._barSpacing>=Math.floor(1.5*t.pixelRatio),o=0,s=this._bars;of+v-1&&(b=(S=f+v-1)-h+1),e.fillRect(g,b,u-g,S-b+1)}var w=c+y,P=Math.max(f,Math.round(a.close*i)-l),C=P+h-1;C>f+v-1&&(P=(C=f+v-1)-h+1),e.fillRect(d+1,P,w-d,C-P+1)}}e.restore()},e.prototype._calcBarWidth=function(e){var t=Math.floor(e);return Math.max(t,Math.floor(Object(r.optimalBarWidth)(this._barSpacing,e)))},e}()},"2EnG":function(e,t,i){"use strict";i.r(t),i.d(t,"StandardPivotPointsImageCache",(function(){return o}));var n=i("ikwP"),r=i("Eyy1"),o=function(){function e(e,t,i,r){this._priceAxisFontSize=11,this._prices=[],this._labelWidth=0,this._paneRenderParams=e,this._recreateCanvasAndContext(new n.Size(0,0)),this.reset({font:t,fontSize:i,backColors:r})}return e.prototype.destroy=function(){delete this._canvas,delete this._cache},e.prototype.canvas=function(){return this._canvas},e.prototype.reset=function(e){var t=this;this._renderParams=e,this._prices=[],this._cache.font=e.fontSize+"px "+e.font,this._labelWidth=["P","S1","R1","S2","R2","S3","R3","S4","R4","S5","R5","/"].reduce((function(e,i){var n=t._cache.measureText(i).width;return Math.max(n,e)}),0)},e.prototype.rowHeight=function(){return this._priceAxisFontSize+4},e.prototype.labelRectByIndex=function(e){return{left:0,top:Math.round(this._topByIndex(e)),width:Math.round(this._labelWidth+4),height:Math.round(this._renderParams.fontSize+8)}},e.prototype.setPrices=function(e){var t,i,o,s,a=this,l=!1;if(e.length!==this._prices.length)l=!0;else for(var c=0;c0?(!function(e){return"index"===e.type&&h.includes(e.listed_exchange)}(e)?n.push("DelayToRealtime"):n.push("DelayNoRealtime"),n):function(e,t){return u.a.hasEodSymbols(e.full_name)||t===l.STATUS_EOD}(e,t)?(n.push("EOD"),n):n} +var v=function(){function e(e,t,i){this._dataUpdatedModeStatus=new s.a(null),this._symbolInfo=Object(a.a)(e.getter,e.onChange),this._status=Object(a.a)(t.getter,t.onChange),this._symbolInfo.subscribe(this._update.bind(this)),this._status.subscribe(this._update.bind(this)),this._resetSubscription=i,this._resetSubscription.subscribe(this,this._resetStatus)}return e.prototype.destroy=function(){this._symbolInfo.destroy(),this._status.destroy(),this._resetSubscription.unsubscribeAll(this)},e.prototype.status=function(){return this._dataUpdatedModeStatus.readonly()},e.prototype.symbolName=function(){var e=this._symbolInfo.value();return null!==e?e.name:""},e.prototype.time=function(){var e=this._symbolInfo.value(),t=null!==e&&e.delay&&e.delay>0?e.delay:900;return Math.round(t/60)},e.prototype.listedExchange=function(){var e=this._symbolInfo.value();return null!==e?e.listed_exchange:""},e.prototype.description=function(){return Object(n.__awaiter)(this,void 0,void 0,(function(){var e,t,i,o;return Object(n.__generator)(this,(function(n){switch(n.label){case 0:if(null===(e=this._symbolInfo.value()))return[2,""];t={},n.label=1;case 1:return n.trys.push([1,3,,4]),i=r.ensureNotNull,[4,d(e)];case 2:return t=i.apply(void 0,[n.sent()]),[3,4];case 3:return o=n.sent(),f.logWarn("Cannot get exchange "+Object(_.a)(o)),[3,4];case 4:return[2,t.description||e.listed_exchange]}}))}))},e.prototype.exchange=function(){var e=this._symbolInfo.value();return null!==e?e.exchange:""},e.prototype._resetStatus=function(){this._dataUpdatedModeStatus.setValue(null)},e.prototype._update=function(){var e=this._symbolInfo.value();if(null!==e){var t=this._status.value();if("string"!=typeof t){if(t!==l.STATUS_LOADING&&t!==l.STATUS_RESOLVING){var i=m(e,t);0!==i.length?this._dataUpdatedModeStatus.setValue(i):this._dataUpdatedModeStatus.setValue(null)}}else this._dataUpdatedModeStatus.setValue(null)}else this._dataUpdatedModeStatus.setValue(null)},e}()},"2WC2":function(e,t,i){"use strict";var n=i("mrSG"),r=i("Eyy1"),o=i("aO4+"),s=i("f6yo"),a=i("VdBB");function l(e,t,i){var n=e.get(t);return void 0!==n?n:(e.set(t,i),i)}function c(e,t,i,n){var r=l(e,t,new Map);return l(r,i,n)}function u(e,t,i,n,r){var o=l(e,t,new Map),s=l(o,i,new Map);return l(s,n,r)}var h=function(){function e(){this._map=new Map,this._size=0}return e.prototype.size=function(){return this._size},e.prototype.clear=function(){this._map.clear(),this._size=0},e}(),d=(function(e){function t(){return e.call(this)||this}Object(n.__extends)(t,e),t.prototype._add=function(e,t){l(this._map,e,[]).push(t),++this._size},t.prototype._get=function(e){return l(this._map,e,[])},t.prototype._forEach=function(e){this._map.forEach((function(t,i){e(i,t)}))}}(h),function(e){function t(){return e.call(this)||this}Object(n.__extends)(t,e),t.prototype._add=function(e,t,i){c(this._map,e,t,[]).push(i),++this._size},t.prototype._get=function(e,t){return c(this._map,e,t,[])},t.prototype._forEach=function(e){this._map.forEach((function(t,i){t.forEach((function(t,n){e(i,n,t)}))}))}}(h),function(e){function t(){ +return e.call(this)||this}Object(n.__extends)(t,e),t.prototype._add=function(e,t,i,n){u(this._map,e,t,i,[]).push(n),++this._size},t.prototype._get=function(e,t,i){return u(this._map,e,t,i,[])},t.prototype._forEach=function(e){this._map.forEach((function(t,i){t.forEach((function(t,n){t.forEach((function(t,r){e(i,n,r,t)}))}))}))}}(h),i("gBDZ")),p=function(e){function t(t){var i=e.call(this)||this;return i._maxSize=t,i._keysQueue=[],i}return Object(n.__extends)(t,e),t.prototype.get=function(e){if(!e.text||!e.fontSize||!e.align)return null;var t=e.fontSize,i=e.text,n=e.align,r=c(this._map,t,n,new Map),o=r.get(i);return void 0!==o||(this._size>=this._maxSize?this._deleteFirstKey():++this._size,this._keysQueue.push([t,i,n]),o=new d.b(e.text,e.bold,e.italic,e.font,e.fontSize,e.align),r.set(i,o)),o},t.prototype._deleteFirstKey=function(){var e=this._keysQueue.shift(),t=e[0],i=e[1],n=this._map.get(t);n.delete(i),0===n.size&&this._map.delete(t)},t}(h),_=i("zDbI"),f=i("ikwP");i.d(t,"b",(function(){return m})),i.d(t,"c",(function(){return v})),i.d(t,"a",(function(){return y}));var m=function(){function e(e,t){void 0===t&&(t={skipRenderingOptimizations:!1}),this._height=void 0!==e.height?e.height:e.width,this._width=void 0!==e.width?e.width:e.height,this._items=[],this._barSpacing=0,this._textCache=t.textCache||new p(5e3),this._drawOperation=t.skipRenderingOptimizations?this._drawWithoutOptimizations.bind(this):this._drawWithOptimizations.bind(this),this._color=e.color,this._borderColor=e.borderColor,this._vertOffset=e.vertOffset||0,e.text&&(this._text=e.text,this._fontSize=e.fontSize,this._textColor=e.textColor,this._textAlign=e.textAlign||"center"),void 0!==e.items&&void 0!==e.barSpacing&&this.setData(e.items,e.barSpacing)}return e.prototype.draw=function(e,t){this._preDrawInit(),this._drawOperation(e,t)},e.prototype.hitTest=function(e){for(var t=a.HitTestResult.REGULAR,i=null,n=0,r=this._items;n0?0:-r,c=t>0?r:0,u=new o.Point(e.x-s,a+l),h=new o.Point(e.x+s,a+c);return Object(o.box)(u,h)}},e.prototype._unionBox=function(e,t){var i=Math.min(e.min.x,t.min.x),n=Math.max(e.max.x,t.max.x),r=Math.min(e.min.y,t.min.y),s=Math.max(e.max.y,t.max.y),a=new o.Point(i,r),l=new o.Point(n,s);return Object(o.box)(a,l)},e.prototype._getTooltip=function(e,t){if(e.tooltip)return{content:{type:"text",data:e.tooltip},tooltipDelay:200,extendMargin:!0,rect:{x:t.min.x,y:t.min.y,w:Math.abs(t.max.x-t.min.x),h:Math.abs(t.max.y-t.min.y)}}},e.prototype._setBaseData=function(e,t){this._items.length=0,this._barSpacing=t;for(var i=0,o=e;i0?l:-l;this._items.push(Object(n.__assign)({width:a,height:l,vertOffset:c,textVertOffset:u,shapeWidth:0,shapeHeight:0,stepX:0,stepY:0},s))}},e.prototype._drawItemText=function(e,t,i){var n=this._getTextCache(i);if(null!==n){var r,o=i.x,s=i.vertOffset,a=i.y+s+i.textVertOffset;r=i.style&&void 0!==i.style.textColor?i.style.textColor:this._textColor,n.paintTo(e,t,r,o,a,d.a.Center,s>0?d.c.Top:d.c.Bottom)}},e.prototype._drawWithOptimizations=function(e,t){for(var i,n,r=null,o=!1,s=0,a=this._items;sthis.points()[1].index&&(this._points[0].price=this._points[1].price),this._pattern=[];for(var f=r;f<=_;f++){var m=this._model.mainSeries().data().valueAt(f);this._pattern.push(TradingView.clone(m))}if(this._pattern.length>0){var v=this.patternPriceDiff();this._points[1].price=this._points[0].price+v,this._points[1].index=this._points[0].index+(_-r),this.normalizePoints(),this.createServerPoints()}}return h},c.prototype.setPoint=function(e,t,i){1===e&&t.index<=this._points[0].index&&(t.index=this._points[0].index+1),0===e&&t.index>=this._points[1].index&&(t.index=this._points[1].index-1),n.prototype.setPoint.call(this,e,t,i)},c.prototype.migrateVersion=function(e,t,i){if(1===e&&this._pattern.length>0){var n=this.patternPriceDiff();2===this._timePoint.length&&(this._timePoint[1].price=this._timePoint[0].price+n),2===this._points.length&&(this._points[1].price=this._points[0].price+n)}},c.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("8ioM").BarsPatternDefinitionsViewModel}.bind(null,i)).catch(i.oe)},c.createProperties=function(e){var t=new o("linetoolbarspattern",e);return c._configureProperties(t),t}, +c._configureProperties=function(e){n._configureProperties(e),e.addExclusion("mirrored"),e.addExclusion("flipped")},t.LineToolBarsPattern=c},"2cgs":function(e,t,i){"use strict";var n=i("ocLq");JSServer.studyLibrary=[{name:"Accumulation/Distribution",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#808000"}},precision:4,inputs:{}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Accumulation/Distribution",shortDescription:"Accum/Dist",is_price_study:!1,inputs:[],id:"Accumulation/Distribution@tv-basicstudies-1",scriptIdPart:"",name:"Accumulation/Distribution"},constructor:function(){this.f_0=function(e,t,i,r){return n.Std.or(n.Std.and(n.Std.eq(e,t),n.Std.eq(e,i)),n.Std.eq(t,i))?0:(2*e-i-t)/(t-i)*r},this.main=function(e,t){this._context=e,this._input=t;var i=this.f_0(n.Std.close(this._context),n.Std.high(this._context),n.Std.low(this._context),n.Std.volume(this._context));return[n.Std.cum(i,this._context)]}}},{name:"Accumulative Swing Index",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#3C78D8"}},precision:4,inputs:{in_0:10}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"ASI",histogramBase:0,joinPoints:!1}},description:"Accumulative Swing Index",shortDescription:"ASI",is_price_study:!1,inputs:[{id:"in_0",name:"Limit Move Value",defval:10,type:"float",min:.1,max:1e5}],id:"Accumulative Swing Index@tv-basicstudies-1",scriptIdPart:"",name:"Accumulative Swing Index"},constructor:function(){this.f_0=function(e,t){var i=t.new_var(n.Std.open(t)),r=t.new_var(n.Std.high(t)),o=t.new_var(n.Std.low(t)),s=t.new_var(n.Std.close(t)),a=n.Std.abs(r-s.get(1)),l=n.Std.abs(o-s.get(1)),c=n.Std.abs(r-o),u=n.Std.abs(s.get(1)-i.get(1)),h=n.Std.max(a,l),d=n.Std.iff(a>=n.Std.max(l,c),a-.5*l+.25*u,n.Std.iff(l>=n.Std.max(a,c),l-.5*a+.25*u,c+.25*u));return n.Std.iff(0===d,0,(s-s.get(1)+.5*(s-i)+.25*(s.get(1)-i.get(1)))/d*h/e*50)},this.f_1=function(e,t){var i=this.f_0(e,t);return n.Std.cum(i,t)},this.main=function(e,t){this._context=e,this._input=t;var i=this._input(0);return[this.f_1(i,this._context)]}}},{name:"Advance/Decline",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0000"}},precision:4,inputs:{in_0:10}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Advance/Decline",shortDescription:"AD",is_price_study:!1,inputs:[{id:"in_0",name:"length",defval:10,type:"integer",min:1,max:2e3}],id:"Advance/Decline@tv-basicstudies-1",scriptIdPart:"",name:"Advance/Decline"},constructor:function(){this.f_0=function(e,t){return n.Std.gt(e,t)},this.f_1=function(e,t){return n.Std.lt(e,t)},this.f_2=function(e,t){ +return 0===t?e:e/t},this.main=function(e,t){this._context=e,this._input=t;var i=this._input(0),r=this.f_0(n.Std.close(this._context),n.Std.open(this._context)),o=this._context.new_var(r),s=n.Std.sum(o,i,this._context),a=this.f_1(n.Std.close(this._context),n.Std.open(this._context)),l=this._context.new_var(a),c=n.Std.sum(l,i,this._context);return[this.f_2(s,c)]}}},{name:"Arnaud Legoux Moving Average",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#000080"}},precision:4,inputs:{in_0:9,in_1:.85,in_2:6}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Arnaud Legoux Moving Average",shortDescription:"ALMA",is_price_study:!0,inputs:[{id:"in_0",name:"Window Size",defval:9,type:"integer",min:0,max:5e3},{id:"in_1",name:"Offset",defval:.85,type:"float",min:-1e12,max:1e12},{id:"in_2",name:"Sigma",defval:6,type:"float",min:-1e12,max:1e12}],id:"Arnaud Legoux Moving Average@tv-basicstudies-1",scriptIdPart:"",name:"Arnaud Legoux Moving Average"},constructor:function(){this.main=function(e,t){this._context=e,this._input=t;var i=n.Std.close(this._context),r=this._input(0),o=this._input(1),s=this._input(2),a=this._context.new_var(i);return[n.Std.alma(a,r,o,s)]}}},{name:"Aroon",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF6A00"},plot_1:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0094FF"}},precision:4,inputs:{in_0:14}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"}],styles:{plot_0:{title:"Upper",histogramBase:0,joinPoints:!1},plot_1:{title:"Lower",histogramBase:0,joinPoints:!1}},description:"Aroon",shortDescription:"Aroon",is_price_study:!1,inputs:[{id:"in_0",name:"length",defval:14,type:"integer",min:1,max:2e3}],id:"Aroon@tv-basicstudies-1",scriptIdPart:"",name:"Aroon"},constructor:function(){this.f_0=function(e,t){return 100*(e+t)/t},this.main=function(e,t){this._context=e,this._input=t;var i=this._input(0),r=n.Std.high(this._context),o=i+1,s=this._context.new_var(r),a=n.Std.highestbars(s,o,this._context),l=this.f_0(a,i),c=n.Std.low(this._context),u=this._context.new_var(c),h=n.Std.lowestbars(u,o,this._context);return[l,this.f_0(h,i)]}}},{name:"Average Price",metainfo:{_metainfoVersion:41,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,id:"AveragePrice@tv-basicstudies-1",scriptIdPart:"",name:"Average Price",description:"Average Price",shortDescription:"Average Price",is_price_study:!0,plots:[{id:"plot_0",type:"line"}],defaults:{styles:{plot_0:{linestyle:0,visible:!0,linewidth:1,plottype:0,trackPrice:!1,transparency:0,color:"#85200C"}},precision:4,inputs:{}},styles:{plot_0:{title:"Plot"}},inputs:[]},constructor:function(){this.main=function(e,t){return this._context=e,this._input=t,[n.Std.ohlc4(this._context)]}}},{ +name:"Average Directional Index",metainfo:{_metainfoVersion:41,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0000"}},precision:4,inputs:{in_0:14,in_1:14}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"ADX",histogramBase:0,joinPoints:!1,isHidden:!1}},description:"Average Directional Index",shortDescription:"ADX",is_price_study:!1,inputs:[{id:"in_0",name:"ADX Smoothing",defval:14,type:"integer",min:-1e12,max:1e12},{id:"in_1",name:"DI Length",defval:14,type:"integer",min:-1e12,max:1e12}],id:"average_directional_Index@tv-basicstudies-1",scriptIdPart:"",name:"Average Directional Index"},constructor:function(){this.f_0=function(e){var t=this._context.new_var(n.Std.high(this._context)),i=n.Std.change(t),r=this._context.new_var(n.Std.low(this._context)),o=-n.Std.change(r),s=this._context.new_var(n.Std.tr(void 0,this._context)),a=n.Std.rma(s,e,this._context),l=this._context.new_var(n.Std.and(n.Std.gt(i,o),n.Std.gt(i,0))?i:0),c=n.Std.fixnan(100*n.Std.rma(l,e,this._context)/a,this._context),u=this._context.new_var(n.Std.and(n.Std.gt(o,i),n.Std.gt(o,0))?o:0);return[c,n.Std.fixnan(100*n.Std.rma(u,e,this._context)/a,this._context)]},this.f_1=function(e,t){var i=this.f_0(e),r=i[0],o=i[1],s=r+o,a=this._context.new_var(n.Std.abs(r-o)/(n.Std.eq(s,0)?1:s));return[100*n.Std.rma(a,t,this._context)]},this.main=function(e,t){return this._context=e,this._input=t,this.f_1(this._input(0),this._input(1))}}},{name:"Average True Range",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0000"}},precision:4,inputs:{in_0:14}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Average True Range",shortDescription:"ATR",is_price_study:!1,inputs:[{id:"in_0",name:"length",defval:14,type:"integer",min:1,max:2e3}],id:"Average True Range@tv-basicstudies-1",scriptIdPart:"",name:"Average True Range"},constructor:function(){this.main=function(e,t){this._context=e,this._input=t;var i=this._input(0),r=n.Std.tr(this._context),o=this._context.new_var(r);return[n.Std.rma(o,i,this._context)]}}},{name:"Awesome Oscillator",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:1,trackPrice:!1,transparency:35,visible:!0,color:"#000080"}},precision:4,palettes:{palette_0:{colors:{0:{color:"#FF0000",width:1,style:0},1:{color:"#008000",width:1,style:0}}}},inputs:{}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",palette:"palette_0",target:"plot_0",type:"colorer"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Awesome Oscillator",shortDescription:"AO",is_price_study:!1,palettes:{palette_0:{colors:{0:{name:"Color 0"},1:{name:"Color 1"}}}},inputs:[],id:"Awesome Oscillator@tv-basicstudies-1",scriptIdPart:"",name:"Awesome Oscillator"}, +constructor:function(){this.f_0=function(e,t){return e-t},this.f_1=function(e){return n.Std.le(e,0)?0:1},this.main=function(e,t){this._context=e,this._input=t;var i=n.Std.hl2(this._context),r=this._context.new_var(i),o=n.Std.sma(r,5,this._context),s=this._context.new_var(i),a=n.Std.sma(s,34,this._context),l=this.f_0(o,a),c=l,u=this._context.new_var(l),h=n.Std.change(u);return[c,this.f_1(h)]}}},{name:"Balance of Power",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0000"}},precision:4,inputs:{}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Balance of Power",shortDescription:"Balance of Power",is_price_study:!1,inputs:[],id:"Balance of Power@tv-basicstudies-1",scriptIdPart:"",name:"Balance of Power"},constructor:function(){this.f_0=function(e,t,i,n){return(e-t)/(i-n)},this.main=function(e,t){return this._context=e,this._input=t,[this.f_0(n.Std.close(this._context),n.Std.open(this._context),n.Std.high(this._context),n.Std.low(this._context))]}}},{name:"Bollinger Bands",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0000"},plot_1:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"},plot_2:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"}},precision:4,filledAreasStyle:{fill_0:{color:"#000080",transparency:90,visible:!0}},inputs:{in_0:20,in_1:2}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"},{id:"plot_2",type:"line"}],styles:{plot_0:{title:"Median",histogramBase:0,joinPoints:!1},plot_1:{title:"Upper",histogramBase:0,joinPoints:!1},plot_2:{title:"Lower",histogramBase:0,joinPoints:!1}},description:"Bollinger Bands",shortDescription:"BB",is_price_study:!0,filledAreas:[{id:"fill_0",objAId:"plot_1",objBId:"plot_2",type:"plot_plot",title:"Plots Background"}],inputs:[{id:"in_0",name:"length",defval:20,type:"integer",min:1,max:1e4},{id:"in_1",name:"mult",defval:2,type:"float",min:.001,max:50}],id:"Bollinger Bands@tv-basicstudies-1",scriptIdPart:"",name:"Bollinger Bands"},constructor:function(){this.f_0=function(e,t){return e*t},this.f_1=function(e,t){return e+t},this.f_2=function(e,t){return e-t},this.main=function(e,t){this._context=e,this._input=t;var i=n.Std.close(this._context),r=this._input(0),o=this._input(1),s=this._context.new_var(i),a=n.Std.sma(s,r,this._context),l=this._context.new_var(i),c=n.Std.stdev(l,r,this._context),u=this.f_0(o,c);return[a,this.f_1(a,u),this.f_2(a,u)]}}},{name:"Bollinger Bands %B",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#008080"}},precision:4,bands:[{color:"#808080",linestyle:2,linewidth:1,visible:!0, +value:1},{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:0}],filledAreasStyle:{fill_0:{color:"#008080",transparency:90,visible:!0}},inputs:{in_0:20,in_1:2}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Bollinger Bands %B",shortDescription:"BB %B",is_price_study:!1,bands:[{id:"hline_0",name:"UpperLimit"},{id:"hline_1",name:"LowerLimit"}],filledAreas:[{id:"fill_0",objAId:"hline_0",objBId:"hline_1",type:"hline_hline",title:"Hlines Background"}],inputs:[{id:"in_0",name:"length",defval:20,type:"integer",min:1,max:1e4},{id:"in_1",name:"mult",defval:2,type:"float",min:.001,max:50}],id:"Bollinger Bands %B@tv-basicstudies-1",scriptIdPart:"",name:"Bollinger Bands %B"},constructor:function(){this.f_0=function(e,t){return e*t},this.f_1=function(e,t){return e+t},this.f_2=function(e,t){return e-t},this.f_3=function(e,t,i){return(e-t)/(i-t)},this.main=function(e,t){this._context=e,this._input=t;var i=n.Std.close(this._context),r=this._input(0),o=this._input(1),s=this._context.new_var(i),a=n.Std.sma(s,r,this._context),l=this._context.new_var(i),c=n.Std.stdev(l,r,this._context),u=this.f_0(o,c),h=this.f_1(a,u),d=this.f_2(a,u);return[this.f_3(i,d,h)]}}},{name:"Bollinger Bands Width",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"}},precision:4,inputs:{in_0:20,in_1:2}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Bollinger Bands Width",shortDescription:"BBW",is_price_study:!1,inputs:[{id:"in_0",name:"length",defval:20,type:"integer",min:1,max:1e4},{id:"in_1",name:"mult",defval:2,type:"float",min:.001,max:50}],id:"Bollinger Bands Width@tv-basicstudies-1",scriptIdPart:"",name:"Bollinger Bands Width"},constructor:function(){this.f_0=function(e,t){return e*t},this.f_1=function(e,t){return e+t},this.f_2=function(e,t){return e-t},this.f_3=function(e,t,i){return(e-t)/i},this.main=function(e,t){this._context=e,this._input=t;var i=n.Std.close(this._context),r=this._input(0),o=this._input(1),s=this._context.new_var(i),a=n.Std.sma(s,r,this._context),l=this._context.new_var(i),c=n.Std.stdev(l,r,this._context),u=this.f_0(o,c),h=this.f_1(a,u),d=this.f_2(a,u);return[this.f_3(h,d,a)]}}},{name:"Chaikin Money Flow",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#008000"}},precision:4,bands:[{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:0}],inputs:{in_0:20}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Chaikin Money Flow",shortDescription:"CMF",is_price_study:!1,bands:[{id:"hline_0",name:"Zero"}],inputs:[{id:"in_0",name:"length",defval:20,type:"integer",min:1,max:2e3}],id:"Chaikin Money Flow@tv-basicstudies-1",scriptIdPart:"",name:"Chaikin Money Flow"}, +constructor:function(){this.f_0=function(e,t,i,r){return n.Std.or(n.Std.and(n.Std.eq(e,t),n.Std.eq(e,i)),n.Std.eq(t,i))?0:(2*e-i-t)/(t-i)*r},this.f_1=function(e,t){return e/t},this.main=function(e,t){this._context=e,this._input=t;var i=this._input(0),r=this.f_0(n.Std.close(this._context),n.Std.high(this._context),n.Std.low(this._context),n.Std.volume(this._context)),o=this._context.new_var(r),s=n.Std.sum(o,i,this._context),a=n.Std.volume(this._context),l=this._context.new_var(a),c=n.Std.sum(l,i,this._context);return[this.f_1(s,c)]}}},{name:"Chaikin Oscillator",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0000"}},precision:4,bands:[{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:0}],inputs:{in_0:3,in_1:10}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Chaikin Oscillator",shortDescription:"Chaikin Osc",is_price_study:!1,bands:[{id:"hline_0",name:"Zero"}],inputs:[{id:"in_0",name:"short",defval:3,type:"integer",min:1,max:2e3},{id:"in_1",name:"long",defval:10,type:"integer",min:1,max:2e3}],id:"Chaikin Oscillator@tv-basicstudies-1",scriptIdPart:"",name:"Chaikin Oscillator"},constructor:function(){this.f_0=function(e,t){return e-t},this.main=function(e,t){this._context=e,this._input=t;var i=this._input(0),r=this._input(1),o=n.Std.accdist(this._context),s=this._context.new_var(o),a=n.Std.ema(s,i,this._context),l=this._context.new_var(o),c=n.Std.ema(l,r,this._context);return[this.f_0(a,c)]}}},{name:"Chaikin Volatility",metainfo:{_metainfoVersion:41,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,is_price_study:!1,id:"Chaikin Volatility@tv-basicstudies-1",scriptIdPart:"",name:"Chaikin Volatility",description:"Chaikin Volatility",shortDescription:"Chaikin Volatility",plots:[{id:"plot_0",type:"line"}],defaults:{styles:{plot_0:{linestyle:0,visible:!0,linewidth:1,plottype:0,trackPrice:!1,transparency:0,color:"#F00000"}},precision:4,bands:[{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:0}],inputs:{periods:10,rocLookback:10}},styles:{plot_0:{title:"Plot"}},bands:[{id:"hline_0",name:"Zero"}],inputs:[{id:"periods",type:"integer",name:"Periods"},{id:"rocLookback",type:"integer",name:"Rate of Change Lookback"}]},constructor:function(){this.init=function(e,t){this._context=e,this._input=t,this.period=this._input(0),this.rocLookback=this._input(1)},this.main=function(e,t){this._context=e,this._input=t;var i=this._context.new_var(n.Std.high(this._context)-n.Std.low(this._context)),r=this._context.new_var(n.Std.ema(i,this.period,this._context));return[n.Std.roc(r,this.rocLookback)]}}},{name:"Chande Kroll Stop",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#008000"},plot_1:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0000"}}, +precision:4,inputs:{in_0:10,in_1:1,in_2:9}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"}],styles:{plot_0:{title:"Long",histogramBase:0,joinPoints:!1},plot_1:{title:"Short",histogramBase:0,joinPoints:!1}},description:"Chande Kroll Stop",shortDescription:"Chande Kroll Stop",is_price_study:!0,inputs:[{id:"in_0",name:"p",defval:10,type:"integer",min:1,max:4999},{id:"in_1",name:"x",defval:1,type:"integer",min:1,max:1e12},{id:"in_2",name:"q",defval:9,type:"integer",min:1,max:1e12}],id:"Chande Kroll Stop@tv-basicstudies-1",scriptIdPart:"",name:"Chande Kroll Stop"},constructor:function(){this.f_0=function(e,t,i){return e-t*i},this.f_1=function(e,t,i){return e+t*i},this.main=function(e,t){this._context=e,this._input=t;var i=this._input(0),r=this._input(1),o=this._input(2),s=n.Std.high(this._context),a=this._context.new_var(s),l=n.Std.highest(a,i,this._context),c=n.Std.atr(i,this._context),u=this.f_0(l,r,c),h=this._context.new_var(s),d=n.Std.lowest(h,i,this._context),p=this.f_1(d,r,c),_=this._context.new_var(u),f=n.Std.highest(_,o,this._context),m=this._context.new_var(p);return[n.Std.lowest(m,o,this._context),f]}}},{name:"Chande Momentum Oscillator",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#008080"}},precision:4,inputs:{in_0:9}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Chande Momentum Oscillator",shortDescription:"ChandeMO",is_price_study:!1,inputs:[{id:"in_0",name:"length",defval:9,type:"integer",min:1,max:2e3}],id:"Chande Momentum Oscillator@tv-basicstudies-1",scriptIdPart:"",name:"Chande Momentum Oscillator"},constructor:function(){this.f_0=function(e){return n.Std.ge(e,0)?e:0},this.f_1=function(e){return n.Std.ge(e,0)?0:-e},this.f_2=function(e,t){return 100*e/t},this.f_3=function(e,t){return this.f_2(e-t,e+t)},this.main=function(e,t){this._context=e,this._input=t;var i=this._input(0),r=n.Std.close(this._context),o=this._context.new_var(r),s=n.Std.change(o),a=this.f_0(s),l=this.f_1(s),c=this._context.new_var(a),u=n.Std.sum(c,i,this._context),h=this._context.new_var(l),d=n.Std.sum(h,i,this._context);return[this.f_3(u,d)]}}},{name:"Chop Zone",metainfo:{_metainfoVersion:41,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:5,trackPrice:!1,transparency:35,visible:!0,color:"#000080"}},precision:4,palettes:{palette_0:{colors:{0:{color:"#34dddd",width:1,style:0},1:{color:"#006400",width:1,style:0},2:{color:"#98fb98",width:1,style:0},3:{color:"#00FF00",width:1,style:0},4:{color:"#8B0000",width:1,style:0},5:{color:"#FF0000",width:1,style:0},6:{color:"#FF7F00",width:1,style:0},7:{color:"#ffc04c",width:1,style:0},8:{color:"#FFFF00",width:1,style:0}}}},inputs:{}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",palette:"palette_0",target:"plot_0",type:"colorer"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1,isHidden:!1}}, +description:"Chop Zone",shortDescription:"Chop Zone",is_price_study:!1,palettes:{palette_0:{colors:{0:{name:"Color 0"},1:{name:"Color 1"},2:{name:"Color 2"},3:{name:"Color 3"},4:{name:"Color 4"},5:{name:"Color 5"},6:{name:"Color 6"},7:{name:"Color 7"},8:{name:"Color 8"}},valToIndex:{0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8}}},inputs:[],id:"chop_zone@tv-basicstudies-1",scriptIdPart:"",name:"Chop Zone"},constructor:function(){this.f_0=function(){var e=n.Std.close(this._context),t=n.Std.hlc3(this._context),i=this._context.new_var(n.Std.high(this._context)),r=n.Std.highest(i,30,this._context),o=n.Std.lowest(i,30,this._context),s=25/(r-o)*o,a=this._context.new_var(e),l=this._context.new_var(n.Std.ema(a,34,this._context)),c=(l.get(1)-l.get(0))/t*s,u=n.Std.sqrt(1+c*c),h=n.Std.round(180*n.Std.acos(1/u)/3.141592653589793),d=n.Std.iff(n.Std.gt(c,0),-h,h),p=n.Std.and(n.Std.gt(d,-2.14),n.Std.le(d,-.71))?7:8,_=n.Std.and(n.Std.gt(d,-3.57),n.Std.le(d,-2.14))?6:p,f=n.Std.and(n.Std.gt(d,-5),n.Std.le(d,-3.57))?5:_,m=n.Std.le(d,-5)?4:f,v=n.Std.and(n.Std.lt(d,2.14),n.Std.ge(d,.71))?3:m,y=n.Std.and(n.Std.lt(d,3.57),n.Std.ge(d,2.14))?2:v,g=n.Std.and(n.Std.lt(d,5),n.Std.ge(d,3.57))?1:y;return[1,n.Std.ge(d,5)?0:g]},this.main=function(e,t){return this._context=e,this._input=t,this.f_0()}}},{name:"Choppiness Index",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"}},precision:4,bands:[{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:61.8},{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:38.2}],filledAreasStyle:{fill_0:{color:"#008000",transparency:90,visible:!0}},inputs:{in_0:14}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Choppiness Index",shortDescription:"CHOP",is_price_study:!1,bands:[{id:"hline_0",name:"UpperLimit"},{id:"hline_1",name:"LowerLimit"}],filledAreas:[{id:"fill_0",objAId:"hline_0",objBId:"hline_1",type:"hline_hline",title:"Hlines Background"}],inputs:[{id:"in_0",name:"length",defval:14,type:"integer",min:1,max:2e3}],id:"Choppiness Index@tv-basicstudies-1",scriptIdPart:"",name:"Choppiness Index"},constructor:function(){this.f_0=function(e,t,i,r){return 100*n.Std.log10(e/(t-i))/r},this.main=function(e,t){this._context=e,this._input=t;var i=this._input(0),r=n.Std.atr(1,this._context),o=this._context.new_var(r),s=n.Std.sum(o,i,this._context),a=n.Std.high(this._context),l=this._context.new_var(a),c=n.Std.highest(l,i,this._context),u=n.Std.low(this._context),h=this._context.new_var(u),d=n.Std.lowest(h,i,this._context),p=n.Std.log10(i);return[this.f_0(s,c,d,p)]}}},{name:"Commodity Channel Index",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#808000"}},precision:4,bands:[{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:100},{color:"#808080",linestyle:2, +linewidth:1,visible:!0,value:-100}],filledAreasStyle:{fill_0:{color:"#808000",transparency:90,visible:!0}},inputs:{in_0:20}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Commodity Channel Index",shortDescription:"CCI",is_price_study:!1,bands:[{id:"hline_0",name:"UpperLimit"},{id:"hline_1",name:"LowerLimit"}],filledAreas:[{id:"fill_0",objAId:"hline_0",objBId:"hline_1",type:"hline_hline",title:"Hlines Background"}],inputs:[{id:"in_0",name:"length",defval:20,type:"integer",min:1,max:2e3}],id:"Commodity Channel Index@tv-basicstudies-1",scriptIdPart:"",name:"Commodity Channel Index"},constructor:function(){this.f_0=function(e,t,i){return(e-t)/(.015*i)},this.main=function(e,t){this._context=e,this._input=t;var i=n.Std.hlc3(this._context),r=this._input(0),o=this._context.new_var(i),s=n.Std.sma(o,r,this._context),a=this._context.new_var(i),l=n.Std.dev(a,r,this._context);return[this.f_0(i,s,l)]}}},{name:"Connors RSI",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#800080"}},precision:4,bands:[{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:70},{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:30}],filledAreasStyle:{fill_0:{color:"#800080",transparency:90,visible:!0}},inputs:{in_0:3,in_1:2,in_2:100}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"CRSI",histogramBase:0,joinPoints:!1}},description:"Connors RSI",shortDescription:"CRSI",is_price_study:!1,bands:[{id:"hline_0",name:"UpperLimit"},{id:"hline_1",name:"LowerLimit"}],filledAreas:[{id:"fill_0",objAId:"hline_0",objBId:"hline_1",type:"hline_hline",title:"Hlines Background"}],inputs:[{id:"in_0",name:"RSI Length",defval:3,type:"integer",min:1},{id:"in_1",name:"UpDown Length",defval:2,type:"integer",min:1},{id:"in_2",name:"ROC Length",defval:100,type:"integer",min:1}],id:"Connors RSI@tv-basicstudies-1",scriptIdPart:"",name:"Connors RSI"},constructor:function(){var e;this.f_1=function(e,t,i){var r=i.new_var(n.Std.max(n.Std.change(e),0));return n.Std.rma(r,t,i)},this.f_2=function(e,t,i){var r=i.new_var(-n.Std.min(n.Std.change(e),0));return n.Std.rma(r,t,i)},this.f_3=(e=0,function(t){var i=t.get(0),r=t.get(1);return e=i===r?0:i>r?n.Std.nz(e)<=0?1:n.Std.nz(e)+1:n.Std.nz(e)>=0?-1:n.Std.nz(e)-1,this._context.new_var(e)}),this.main=function(e,t){this._context=e,this._input=t;var i=n.Std.close(this._context),r=this._context.new_var(i),o=this._input(0),s=this._input(1),a=this._input(2),l=n.Std.rsi(this.f_1(r,o,this._context),this.f_2(r,o,this._context)),c=this.f_3(r),u=n.Std.rsi(this.f_1(c,s,this._context),this.f_2(c,s,this._context)),h=this._context.new_var(n.Std.roc(r,1)),d=n.Std.percentrank(h,a);return[n.Std.avg(l,u,d)]}}},{name:"Coppock Curve",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#000080"}}, +precision:4,inputs:{in_0:10,in_1:14,in_2:11}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Coppock Curve",shortDescription:"Coppock Curve",is_price_study:!1,inputs:[{id:"in_0",name:"WMA Length",defval:10,type:"integer",min:-1e12,max:5e3},{id:"in_1",name:"Long RoC Length",defval:14,type:"integer",min:1,max:4999},{id:"in_2",name:"Short RoC Length",defval:11,type:"integer",min:1,max:4999}],id:"Coppock Curve@tv-basicstudies-1",scriptIdPart:"",name:"Coppock Curve"},constructor:function(){this.f_0=function(e,t){return e+t},this.main=function(e,t){this._context=e,this._input=t;var i=this._input(0),r=this._input(1),o=this._input(2),s=n.Std.close(this._context),a=this._context.new_var(s),l=n.Std.roc(a,r),c=this._context.new_var(s),u=n.Std.roc(c,o),h=this.f_0(l,u),d=this._context.new_var(h);return[n.Std.wma(d,i,this._context)]}}},{name:"Correlation Coeff",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:4,trackPrice:!1,transparency:40,visible:!0,color:"#800080"}},precision:4,inputs:{in_0:"AAPL",in_1:20}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Correlation Coefficient",shortDescription:"CC",is_price_study:!1,inputs:[{id:"in_0",name:"sym",defval:"AAPL",type:"symbol"},{id:"in_1",name:"length",defval:20,type:"integer",min:1,max:2e3}],id:"Correlation Coeff@tv-basicstudies-1",scriptIdPart:"",name:"Correlation Coeff"},constructor:function(){this.init=function(e,t){this._context=e,this._input=t,this._context.new_sym(this._input(0),n.Std.period(this._context),n.Std.period(this._context))},this.main=function(e,t){this._context=e,this._input=t;var i=this._context.new_unlimited_var(this._context.symbol.time),r=(this._input(0),n.Std.period(this._context),n.Std.close(this._context)),o=this._input(1);this._context.select_sym(1);var s=this._context.new_unlimited_var(this._context.symbol.time),a=n.Std.close(this._context),l=this._context.new_unlimited_var(a);this._context.select_sym(0);var c=l.adopt(s,i,0),u=this._context.new_var(r),h=this._context.new_var(c);return[n.Std.correlation(u,h,o,this._context)]}}},{name:"Correlation - Log",metainfo:{_metainfoVersion:41,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,is_price_study:!1,id:"Correlation - Log@tv-basicstudies-1",scriptIdPart:"",name:"Correlation - Log",description:"Correlation - Log",shortDescription:"Correlation - Log",plots:[{id:"plot_0",type:"line"}],defaults:{styles:{plot_0:{linestyle:0,visible:!0,linewidth:1,plottype:0,trackPrice:!1,transparency:0,color:"#800080"}},precision:4,inputs:{instrument:"INTC",instrument2:"AMZN",periods:25}},styles:{plot_0:{title:"Plot"}},inputs:[{id:"instrument",name:"Instrument 1",type:"symbol",defval:"INTC"},{id:"instrument2",name:"Instrument 2",type:"symbol",defval:"AMZN"},{id:"periods",name:"Periods",type:"integer",defval:25}]},constructor:function(){this.init=function(e,t){this._context=e,this._input=t, +this._context.new_sym(this._input(0),n.Std.period(this._context),n.Std.period(this._context)),this._context.new_sym(this._input(1),n.Std.period(this._context),n.Std.period(this._context)),this.period=this._input(2)},this.correlationLog=function(e,t,i,r){var o=n.Std.sma(e,i,r),s=n.Std.sma(t,i,r),a=r.new_var(e.get()*t.get());return(n.Std.sma(a,i,r)-o*s)/Math.sqrt(n.Std.variance2(e,o,i)*n.Std.variance2(t,s,i))},this.main=function(e,t){this._context=e,this._input=t,this._context.select_sym(1);var i=this._context.new_var(this._context.symbol.time);this._context.select_sym(2);var r=this._context.new_var(n.Std.close(this._context)),o=this._context.new_var(n.Std.log(r.get()/r.get(1))),s=this._context.new_var(this._context.symbol.time);this._context.select_sym(1);var a=this._context.new_var(n.Std.close(this._context)),l=this._context.new_var(n.Std.log(a.get()/a.get(1))),c=this._context.new_var(o.adopt(s,i,0));return[this.correlationLog(l,c,this.period,this._context)]}}},{name:"Detrended Price Oscillator",metainfo:{_metainfoVersion:42,isTVScript:!1,isTVScriptStub:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#808000"}},precision:4,bands:[{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:0}],inputs:{in_0:21,in_1:!1}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"DPO",histogramBase:0,joinPoints:!1,isHidden:!1}},description:"Detrended Price Oscillator",shortDescription:"DPO",is_price_study:!1,is_hidden_study:!1,id:"detrended_price_oscillator@tv-basicstudies-1",bands:[{id:"hline_0",name:"Zero",isHidden:!1}],inputs:[{id:"in_0",name:"Period",defval:21,type:"integer",min:1,max:1e12},{id:"in_1",name:"isCentered",defval:!1,type:"bool"}],scriptIdPart:"",name:"Detrended Price Oscillator"},constructor:function(){this.f_0=function(){var e=this._input(0),t=this._input(1),i=Math.floor(e/2+1),r=this._context.new_var(n.Std.close(this._context)),o=this._context.new_var(n.Std.sma(r,e,this._context)),s=this._context.new_var(n.Std.close(this._context)).get(i)-o,a=n.Std.close(this._context)-o.get(i);return[t?s:a,t?-i:0]},this.main=function(e,t){this._context=e,this._input=t;var i=this.f_0();return[{value:i[0],offset:i[1]}]}}},{name:"Directional Movement Index",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"},plot_1:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF7F00"},plot_2:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0000"}},precision:4,inputs:{in_0:14,in_1:14}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"},{id:"plot_2",type:"line"}],styles:{plot_0:{title:"+DI",histogramBase:0,joinPoints:!1},plot_1:{title:"-DI",histogramBase:0,joinPoints:!1},plot_2:{title:"ADX",histogramBase:0,joinPoints:!1}},description:"Directional Movement",shortDescription:"DMI",is_price_study:!1,inputs:[{id:"in_0",name:"DI Length",defval:14, +type:"integer",min:1,max:2e3},{id:"in_1",name:"ADX Smoothing",defval:14,type:"integer",min:1,max:50}],id:"Directional Movement Index@tv-basicstudies-1",scriptIdPart:"",name:"Directional Movement Index"},constructor:function(){this.f_0=function(e){return-e},this.f_1=function(e,t){return n.Std.and(n.Std.gt(e,t),n.Std.gt(e,0))?e:0},this.f_2=function(e,t){return 100*e/t},this.f_3=function(e,t){return e+t},this.f_4=function(e,t,i){return n.Std.abs(e-t)/(n.Std.eq(i,0)?1:i)},this.f_5=function(e){return 100*e},this.main=function(e,t){this._context=e,this._input=t;var i=this._input(0),r=this._input(1),o=n.Std.high(this._context),s=this._context.new_var(o),a=n.Std.change(s),l=n.Std.low(this._context),c=this._context.new_var(l),u=n.Std.change(c),h=this.f_0(u),d=n.Std.tr(this._context),p=this._context.new_var(d),_=n.Std.rma(p,i,this._context),f=this.f_1(a,h),m=this._context.new_var(f),v=n.Std.rma(m,i,this._context),y=this.f_2(v,_),g=n.Std.fixnan(y,this._context),b=this.f_1(h,a),S=this._context.new_var(b),w=n.Std.rma(S,i,this._context),P=this.f_2(w,_),C=n.Std.fixnan(P,this._context),x=this.f_3(g,C),T=this.f_4(g,C,x),I=this._context.new_var(T),M=n.Std.rma(I,r,this._context);return[g,C,this.f_5(M)]}}},{name:"Donchian Channels",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"},plot_1:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"},plot_2:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF7F00"}},precision:4,filledAreasStyle:{fill_0:{color:"#0000FF",transparency:90,visible:!0}},inputs:{in_0:20}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"},{id:"plot_2",type:"line"}],styles:{plot_0:{title:"Lower",histogramBase:0,joinPoints:!1},plot_1:{title:"Upper",histogramBase:0,joinPoints:!1},plot_2:{title:"Basis",histogramBase:0,joinPoints:!1}},description:"Donchian Channels",shortDescription:"DC",is_price_study:!0,filledAreas:[{id:"fill_0",objAId:"plot_1",objBId:"plot_0",type:"plot_plot",title:"Plots Background"}],inputs:[{id:"in_0",name:"length",defval:20,type:"integer",min:1,max:2e3}],id:"Donchian Channels@tv-basicstudies-1",scriptIdPart:"",name:"Donchian Channels"},constructor:function(){this.main=function(e,t){this._context=e,this._input=t;var i=this._input(0),r=n.Std.low(this._context),o=this._context.new_var(r),s=n.Std.lowest(o,i,this._context),a=n.Std.high(this._context),l=this._context.new_var(a),c=n.Std.highest(l,i,this._context);return[s,c,n.Std.avg(c,s)]}}},{name:"Double Exponential Moving Average",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#008000"}},precision:4,inputs:{in_0:9}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Double EMA",shortDescription:"DEMA",is_price_study:!0,inputs:[{ +id:"in_0",name:"length",defval:9,type:"integer",min:1,max:1e4}],id:"Double Exponential Moving Average@tv-basicstudies-1",scriptIdPart:"",name:"Double Exponential Moving Average"},constructor:function(){this.f_0=function(e,t){return 2*e-t},this.main=function(e,t){this._context=e,this._input=t;var i=this._input(0),r=n.Std.close(this._context),o=this._context.new_var(r),s=n.Std.ema(o,i,this._context),a=this._context.new_var(s),l=n.Std.ema(a,i,this._context);return[this.f_0(s,l)]}}},{name:"Ease of Movement",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#808000"}},precision:4,inputs:{in_0:1e4,in_1:14}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Ease Of Movement",shortDescription:"EOM",is_price_study:!1,inputs:[{id:"in_0",name:"Divisor",defval:1e4,type:"integer",min:1,max:1e9},{id:"in_1",name:"length",defval:14,type:"integer",min:1,max:2e3}],id:"Ease of Movement@tv-basicstudies-1",scriptIdPart:"",name:"Ease of Movement"},constructor:function(){this.f_0=function(e,t,i,n,r){return e*t*(i-n)/r},this.main=function(e,t){this._context=e,this._input=t;var i=this._input(0),r=this._input(1),o=n.Std.hl2(this._context),s=this._context.new_var(o),a=n.Std.change(s),l=this.f_0(i,a,n.Std.high(this._context),n.Std.low(this._context),n.Std.volume(this._context)),c=this._context.new_var(l);return[n.Std.sma(c,r,this._context)]}}},{name:"Elders Force Index",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#800000"}},precision:4,bands:[{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:0}],inputs:{in_0:13}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Elder's Force Index",shortDescription:"EFI",is_price_study:!1,bands:[{id:"hline_0",name:"Zero"}],inputs:[{id:"in_0",name:"length",defval:13,type:"integer",min:1,max:2e3}],id:"Elders Force Index@tv-basicstudies-1",scriptIdPart:"",name:"Elders Force Index"},constructor:function(){this.f_0=function(e,t){return e*t},this.main=function(e,t){this._context=e,this._input=t;var i=this._input(0),r=n.Std.close(this._context),o=this._context.new_var(r),s=n.Std.change(o),a=this.f_0(s,n.Std.volume(this._context)),l=this._context.new_var(a);return[n.Std.ema(l,i,this._context)]}}},{name:"EMA Cross",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0000"},plot_1:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#008000"},plot_2:{linestyle:0,linewidth:4,plottype:3,trackPrice:!1,transparency:35,visible:!0,color:"#000080"}},precision:4,inputs:{in_0:9,in_1:26}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"},{ +id:"plot_2",type:"line"}],styles:{plot_0:{title:"Short",histogramBase:0,joinPoints:!1},plot_1:{title:"Long",histogramBase:0,joinPoints:!1},plot_2:{title:"Crosses",histogramBase:0,joinPoints:!1}},description:"EMA Cross",shortDescription:"EMA Cross",is_price_study:!0,inputs:[{id:"in_0",name:"Short",defval:9,type:"integer",min:1,max:2e3},{id:"in_1",name:"Long",defval:26,type:"integer",min:1,max:2e3}],id:"EMA Cross@tv-basicstudies-1",scriptIdPart:"",name:"EMA Cross"},constructor:function(){this.f_0=function(e,t){return e?t:n.Std.na()},this.main=function(e,t){this._context=e,this._input=t;var i=this._input(0),r=this._input(1),o=n.Std.close(this._context),s=this._context.new_var(o),a=n.Std.ema(s,i,this._context),l=this._context.new_var(o),c=n.Std.ema(l,r,this._context),u=a,h=c,d=n.Std.cross(a,c,this._context);return[u,h,this.f_0(d,a)]}}},{name:"Envelopes",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF7F00"},plot_1:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"},plot_2:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"}},precision:4,filledAreasStyle:{fill_0:{color:"#0000FF",transparency:90,visible:!0}},inputs:{in_0:20,in_1:10,in_2:10,in_3:"Simple",in_4:"close"}},plots:[{id:"plot_1",type:"line"},{id:"plot_0",type:"line"},{id:"plot_2",type:"line"}],styles:{plot_0:{title:"Average",histogramBase:0,joinPoints:!1},plot_1:{title:"Upper",histogramBase:0,joinPoints:!1},plot_2:{title:"Lower",histogramBase:0,joinPoints:!1}},description:"Envelopes",shortDescription:"Envelopes",is_price_study:!0,filledAreas:[{id:"fill_0",objAId:"plot_1",objBId:"plot_2",type:"plot_plot",title:"Plots Background"}],inputs:[{id:"in_0",name:"Length",defval:20,type:"integer",min:1,max:2e3},{id:"in_1",name:"Upper Percentage",defval:2,type:"float",min:0},{id:"in_2",name:"Lower Percentage",defval:2,type:"float",min:0},{id:"in_3",name:"Method",type:"text",defval:"Simple",options:["Simple","Exponential","Weighted"]},{id:"in_4",name:"Source",defval:"close",type:"source",options:["open","high","low","close","hl2","hlc3","ohlc4"]}],id:"Envelope@tv-basicstudies-1",scriptIdPart:"",name:"Envelopes"},constructor:function(){this.f_0=function(e,t){return e*(1+t)},this.f_1=function(e,t){return e*(1-t)},this.main=function(e,t){this._context=e,this._input=t;var i=this._context.new_var(n.Std[this._input(4)](this._context)),r=n.Std.sma(i,this._input(0),this._context);return"Exponential"===this._input(3)?r=n.Std.ema(i,this._input(0),this._context):"Weighted"===this._input(3)&&(r=n.Std.wma(i,this._input(0),this._context)),[this.f_0(r,this._input(1)/100),r,this.f_1(r,this._input(2)/100)]}}},{name:"Standard Error",metainfo:{_metainfoVersion:41,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,is_price_study:!1,id:"Standard Error@tv-basicstudies-1",scriptIdPart:"",name:"Standard Error",description:"Standard Error",shortDescription:"Standard Error", +plots:[{id:"plot_0",type:"line"}],defaults:{styles:{plot_0:{linestyle:0,visible:!0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,color:"#FF6D00"}},precision:4,inputs:{length:14}},styles:{plot_0:{title:"Plot"}},inputs:[{id:"length",type:"integer",name:"Length"}]},constructor:function(){this.init=function(e,t){this._context=e,this._input=t,this.period=this._input(0)},this.main=function(e,t){this._context=e,this._input=t;for(var i,r,o=this._context.new_var(n.Std.close(this._context)),s=0,a=0,l=0;lthis._context.new_var(r).get(1)?1:0,[100*n.Std.sma(this._context.new_var(i),this.rollingPeriod,this._context)]}}},{name:"Net Volume",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"}},precision:4,inputs:{}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Net Volume",shortDescription:"Net Volume",is_price_study:!1,inputs:[],id:"Net Volume@tv-basicstudies-1",scriptIdPart:"",name:"Net Volume"},constructor:function(){this.f_0=function(e,t,i){return n.Std.gt(e,0)?t:n.Std.lt(i,0)?-t:0*t},this.main=function(e,t){this._context=e,this._input=t;var i=n.Std.close(this._context),r=this._context.new_var(i),o=n.Std.change(r);return[this.f_0(o,n.Std.volume(this._context),o)]}}},{name:"On Balance Volume",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"}},precision:4,inputs:{}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"On Balance Volume",shortDescription:"OBV",is_price_study:!1,inputs:[],id:"On Balance Volume@tv-basicstudies-1",scriptIdPart:"",name:"On Balance Volume"},constructor:function(){this.f_0=function(e,t,i){return n.Std.gt(e,0)?t:n.Std.lt(i,0)?-t:0*t},this.main=function(e,t){this._context=e,this._input=t;var i=n.Std.close(this._context),r=this._context.new_var(i),o=n.Std.change(r),s=this.f_0(o,n.Std.volume(this._context),o);return[n.Std.cum(s,this._context)]}}},{name:"Parabolic SAR",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:3,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"}},precision:4,inputs:{in_0:.02,in_1:.02,in_2:.2}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Parabolic SAR",shortDescription:"SAR",is_price_study:!0,inputs:[{id:"in_0",name:"start",defval:.02,type:"float",min:-1e12,max:1e12},{id:"in_1",name:"increment",defval:.02,type:"float",min:-1e12,max:1e12},{id:"in_2",name:"maximum",defval:.2,type:"float",min:-1e12,max:1e12}],id:"Parabolic SAR@tv-basicstudies-1",scriptIdPart:"",name:"Parabolic SAR"},constructor:function(){this.main=function(e,t){this._context=e,this._input=t;var i=this._input(0),r=this._input(1),o=this._input(2);return[n.Std.sar(i,r,o,this._context)]}}},{name:"Price Channel",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0080"},plot_1:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0080"},plot_2:{ +linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0496FF"}},precision:4,inputs:{in_0:20,in_1:0}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"},{id:"plot_2",type:"line"}],styles:{plot_0:{title:"Highprice Line",histogramBase:0,joinPoints:!1},plot_1:{title:"Lowprice Line",histogramBase:0,joinPoints:!1},plot_2:{title:"Centerprice Line",histogramBase:0,joinPoints:!1}},description:"Price Channel",shortDescription:"PC",is_price_study:!1,inputs:[{id:"in_0",name:"Length",defval:20,type:"integer",min:1,max:2e3},{id:"in_1",name:"Offset Length",defval:0,type:"integer",min:1,max:2e3}],id:"Price Channel@tv-basicstudies-1",scriptIdPart:"",name:"Price Channel"},constructor:function(){this.main=function(e,t){this._context=e,this._input=t;var i=n.Std.high(this._context),r=this._context.new_var(i),o=n.Std.low(this._context),s=this._context.new_var(o),a=this._input(0),l=this._input(1),c=n.Std.highest(r,a,this._context),u=n.Std.lowest(s,a,this._context);return[{value:c,offset:l},{value:u,offset:l},{value:n.Std.avg(c,u),offset:l}]}}},{name:"Price Oscillator",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"}},precision:4,inputs:{in_0:10,in_1:21}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Price Oscillator",shortDescription:"PPO",is_price_study:!1,inputs:[{id:"in_0",name:"shortlen",defval:10,type:"integer",min:1,max:2e3},{id:"in_1",name:"longlen",defval:21,type:"integer",min:1,max:2e3}],id:"Price Oscillator@tv-basicstudies-1",scriptIdPart:"",name:"Price Oscillator"},constructor:function(){this.f_0=function(e,t){return(e-t)/t*100},this.main=function(e,t){this._context=e,this._input=t;var i=n.Std.close(this._context),r=this._input(0),o=this._input(1),s=this._context.new_var(i),a=n.Std.sma(s,r,this._context),l=this._context.new_var(i),c=n.Std.sma(l,o,this._context);return[this.f_0(a,c)]}}},{name:"Price Volume Trend",metainfo:{_metainfoVersion:42,isTVScript:!1,isTVScriptStub:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"}},precision:4,inputs:{}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"PVT",histogramBase:0,joinPoints:!1,isHidden:!1}},description:"Price Volume Trend",shortDescription:"PVT",is_price_study:!1,is_hidden_study:!1,id:"price_volume_trend@tv-basicstudies-1",inputs:[],scriptIdPart:"",name:"Price Volume Trend"},constructor:function(){this.f_0=function(){var e=this._context.new_var(n.Std.close(this._context));return[n.Std.cum(n.Std.change(e)/e.get(1)*n.Std.volume(this._context),this._context)]},this.main=function(e,t){return this._context=e,this._input=t,[this.f_0()[0]]}}},{name:"Rate Of Change",metainfo:{_metainfoVersion:41,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"}}, +precision:4,bands:[{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:0}],inputs:{in_0:9}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"ROC",histogramBase:0,joinPoints:!1,isHidden:!1}},description:"Rate Of Change",shortDescription:"ROC",is_price_study:!1,bands:[{id:"hline_0",name:"Zero Line",isHidden:!1}],inputs:[{id:"in_0",name:"length",defval:9,type:"integer",min:1,max:1e12}],id:"rate_of_change@tv-basicstudies-1",scriptIdPart:"",name:"Rate Of Change"},constructor:function(){this.main=function(e,t){this._context=e,this._input=t;var i=this._context.new_var(n.Std.close(this._context)),r=this._input(0);return[100*(i.get(0)-i.get(r))/i.get(r)]}}},{name:"Relative Strength Index",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#800080"}},precision:4,bands:[{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:70},{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:30}],filledAreasStyle:{fill_0:{color:"#800080",transparency:90,visible:!0}},inputs:{in_0:14}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Relative Strength Index",shortDescription:"RSI",is_price_study:!1,bands:[{id:"hline_0",name:"UpperLimit"},{id:"hline_1",name:"LowerLimit"}],filledAreas:[{id:"fill_0",objAId:"hline_0",objBId:"hline_1",type:"hline_hline",title:"Hlines Background"}],inputs:[{id:"in_0",name:"Length",defval:14,type:"integer",min:1,max:2e3}],id:"Relative Strength Index@tv-basicstudies-1",scriptIdPart:"",name:"Relative Strength Index"},constructor:function(){this.f_0=function(e){return n.Std.max(e,0)},this.f_1=function(e){return-n.Std.min(e,0)},this.f_2=function(e,t){return n.Std.eq(e,0)?100:n.Std.eq(t,0)?0:100-100/(1+t/e)},this.main=function(e,t){this._context=e,this._input=t;var i=n.Std.close(this._context),r=this._input(0),o=this._context.new_var(i),s=n.Std.change(o),a=this.f_0(s),l=this._context.new_var(a),c=n.Std.rma(l,r,this._context),u=this.f_1(s),h=this._context.new_var(u),d=n.Std.rma(h,r,this._context);return[this.f_2(d,c)]}}},{name:"Relative Vigor Index",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#008000"},plot_1:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0000"}},precision:4,inputs:{in_0:10}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"}],styles:{plot_0:{title:"RVGI",histogramBase:0,joinPoints:!1},plot_1:{title:"Signal",histogramBase:0,joinPoints:!1}},description:"Relative Vigor Index",shortDescription:"RVGI",is_price_study:!1,inputs:[{id:"in_0",name:"Length",defval:10,type:"integer",min:1,max:2e3}],id:"Relative Vigor Index@tv-basicstudies-1",scriptIdPart:"",name:"Relative Vigor Index"},constructor:function(){this.f_0=function(e,t){return e-t},this.f_1=function(e,t){return e/t},this.main=function(e,t){ +this._context=e,this._input=t;var i=this._input(0),r=this.f_0(n.Std.close(this._context),n.Std.open(this._context)),o=this._context.new_var(r),s=n.Std.swma(o,this._context),a=this._context.new_var(s),l=n.Std.sum(a,i,this._context),c=this.f_0(n.Std.high(this._context),n.Std.low(this._context)),u=this._context.new_var(c),h=n.Std.swma(u,this._context),d=this._context.new_var(h),p=n.Std.sum(d,i,this._context),_=this.f_1(l,p),f=this._context.new_var(_);return[_,n.Std.swma(f,this._context)]}}},{name:"Relative Volatility Index",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#800080"}},precision:4,bands:[{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:80},{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:20}],filledAreasStyle:{fill_0:{color:"#808000",transparency:90,visible:!0}},inputs:{in_0:10}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Relative Volatility Index",shortDescription:"RVI",is_price_study:!1,bands:[{id:"hline_0",name:"UpperLimit"},{id:"hline_1",name:"LowerLimit"}],filledAreas:[{id:"fill_0",objAId:"hline_0",objBId:"hline_1",type:"hline_hline",title:"Hlines Background"}],inputs:[{id:"in_0",name:"length",defval:10,type:"integer",min:1,max:2e3}],id:"Relative Volatility Index@tv-basicstudies-1",scriptIdPart:"",name:"Relative Volatility Index"},constructor:function(){this.f_0=function(e,t){return n.Std.le(e,0)?0:t},this.f_1=function(e,t){return n.Std.gt(e,0)?0:t},this.f_2=function(e,t){return e/(e+t)*100},this.main=function(e,t){this._context=e,this._input=t;var i=this._input(0),r=n.Std.close(this._context),o=this._context.new_var(r),s=n.Std.stdev(o,i,this._context),a=this._context.new_var(r),l=n.Std.change(a),c=this.f_0(l,s),u=this._context.new_var(c),h=n.Std.ema(u,14,this._context),d=this.f_1(l,s),p=this._context.new_var(d),_=n.Std.ema(p,14,this._context);return[this.f_2(h,_)]}}},{name:"SMI Ergodic Indicator/Oscillator",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"},plot_1:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF7F00"},plot_2:{linestyle:0,linewidth:1,plottype:1,trackPrice:!1,transparency:35,visible:!0,color:"#FF0000"}},precision:4,inputs:{in_0:5,in_1:20,in_2:5}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"},{id:"plot_2",type:"line"}],styles:{plot_0:{title:"Indicator",histogramBase:0,joinPoints:!1},plot_1:{title:"Signal",histogramBase:0,joinPoints:!1},plot_2:{title:"Oscillator",histogramBase:0,joinPoints:!1}},description:"SMI Ergodic Indicator/Oscillator",shortDescription:"SMIIO",is_price_study:!1,inputs:[{id:"in_0",name:"shortlen",defval:5,type:"integer",min:1,max:2e3},{id:"in_1",name:"longlen",defval:20,type:"integer",min:1,max:2e3},{id:"in_2",name:"siglen",defval:5,type:"integer", +min:1,max:2e3}],id:"SMI Ergodic Indicator/Oscillator@tv-basicstudies-1",scriptIdPart:"",name:"SMI Ergodic Indicator/Oscillator"},constructor:function(){this.f_0=function(e,t){return e-t},this.main=function(e,t){this._context=e,this._input=t;var i=this._input(0),r=this._input(1),o=this._input(2),s=n.Std.close(this._context),a=this._context.new_var(s),l=n.Std.tsi(a,i,r,this._context),c=this._context.new_var(l),u=n.Std.ema(c,o,this._context);return[l,u,this.f_0(l,u)]}}},{name:"Smoothed Moving Average",metainfo:{_metainfoVersion:41,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0000"}},precision:4,inputs:{in_0:7,in_1:"close"}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1,isHidden:!1}},description:"Smoothed Moving Average",shortDescription:"SMMA",is_price_study:!0,inputs:[{id:"in_0",name:"Length",defval:7,type:"integer",min:1,max:1e12},{id:"in_1",name:"Source",defval:"close",type:"source",options:["open","high","low","close","hl2","hlc3","ohlc4"]}],id:"smoothed_moving_average@tv-basicstudies-1",scriptIdPart:"",name:"Smoothed Moving Average"},constructor:function(){this.f_0=function(){var e=this._input(0),t=n.Std[this._input(1)](this._context),i=this._context.new_var(t),r=n.Std.sma(i,e,this._context),o=this._context.new_var(),s=(o.get(1)*(e-1)+t)/e;return o.set(n.Std.na(o.get(1))?r:s),[o.get(0)]},this.main=function(e,t){return this._context=e,this._input=t,this.f_0()}}},{name:"Standard Deviation",metainfo:{_metainfoVersion:41,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,id:"Standard Deviation@tv-basicstudies-1",scriptIdPart:"",name:"Standard Deviation",description:"Standard Deviation",shortDescription:"Standard Deviation",is_price_study:!1,plots:[{id:"plot_0",type:"line"}],defaults:{styles:{plot_0:{linestyle:0,visible:!0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,color:"#26A69A"}},precision:4,inputs:{periods:5,deviations:1}},styles:{plot_0:{title:"Plot"}},inputs:[{id:"periods",name:"Periods",type:"integer"},{id:"deviations",name:"Deviations",type:"float"}]},constructor:function(){this.main=function(e,t){this._context=e,this._input=t;var i=this._input(0),r=this._input(1),o=this._context.new_var(n.Std.close(this._context));return[n.Std.stdev(o,i,this._context)*r]}}},{name:"Stochastic",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"},plot_1:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0000"}},precision:4,bands:[{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:80},{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:20}],filledAreasStyle:{fill_0:{color:"#800080",transparency:75,visible:!0}},inputs:{in_0:14,in_1:1,in_2:3}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"}],styles:{plot_0:{title:"%K",histogramBase:0,joinPoints:!1},plot_1:{ +title:"%D",histogramBase:0,joinPoints:!1}},description:"Stochastic",shortDescription:"Stoch",is_price_study:!1,bands:[{id:"hline_0",name:"UpperLimit"},{id:"hline_1",name:"LowerLimit"}],filledAreas:[{id:"fill_0",objAId:"hline_0",objBId:"hline_1",type:"hline_hline",title:"Hlines Background"}],inputs:[{id:"in_0",name:"length",defval:14,type:"integer",min:1,max:1e4},{id:"in_1",name:"smoothK",defval:1,type:"integer",min:1,max:1e4},{id:"in_2",name:"smoothD",defval:3,type:"integer",min:1,max:1e4}],id:"Stochastic@tv-basicstudies-1",scriptIdPart:"",name:"Stochastic"},constructor:function(){this.main=function(e,t){this._context=e,this._input=t;var i=this._input(0),r=this._input(1),o=this._input(2),s=n.Std.close(this._context),a=n.Std.high(this._context),l=n.Std.low(this._context),c=this._context.new_var(s),u=this._context.new_var(a),h=this._context.new_var(l),d=n.Std.stoch(c,u,h,i,this._context),p=this._context.new_var(d),_=n.Std.sma(p,r,this._context),f=this._context.new_var(_);return[_,n.Std.sma(f,o,this._context)]}}},{name:"Stochastic RSI",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"},plot_1:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0000"}},precision:4,bands:[{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:80},{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:20}],filledAreasStyle:{fill_0:{color:"#800080",transparency:80,visible:!0}},inputs:{in_0:14,in_1:14,in_2:3,in_3:3}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"}],styles:{plot_0:{title:"%K",histogramBase:0,joinPoints:!1},plot_1:{title:"%D",histogramBase:0,joinPoints:!1}},description:"Stochastic RSI",shortDescription:"Stoch RSI",is_price_study:!1,bands:[{id:"hline_0",name:"UpperLimit"},{id:"hline_1",name:"LowerLimit"}],filledAreas:[{id:"fill_0",objAId:"hline_0",objBId:"hline_1",type:"hline_hline",title:"Hlines Background"}],inputs:[{id:"in_0",name:"lengthRSI",defval:14,type:"integer",min:1,max:1e4},{id:"in_1",name:"lengthStoch",defval:14,type:"integer",min:1,max:1e4},{id:"in_2",name:"smoothK",defval:3,type:"integer",min:1,max:1e4},{id:"in_3",name:"smoothD",defval:3,type:"integer",min:1,max:1e4}],id:"Stochastic RSI@tv-basicstudies-1",scriptIdPart:"",name:"Stochastic RSI"},constructor:function(){this.f_1=function(e,t,i){var r=i.new_var(n.Std.max(n.Std.change(e),0));return n.Std.rma(r,t,i)},this.f_2=function(e,t,i){var r=i.new_var(-n.Std.min(n.Std.change(e),0));return n.Std.rma(r,t,i)},this.main=function(e,t){this._context=e,this._input=t;var i=n.Std.close(this._context),r=this._input(0),o=this._input(1),s=this._input(2),a=this._input(3),l=this._context.new_var(i),c=n.Std.rsi(this.f_1(l,r,this._context),this.f_2(l,r,this._context)),u=this._context.new_var(c),h=this._context.new_var(c),d=this._context.new_var(c),p=n.Std.stoch(u,h,d,o,this._context),_=this._context.new_var(p),f=n.Std.sma(_,s,this._context),m=this._context.new_var(f) +;return[f,n.Std.sma(m,a,this._context)]}}},{name:"TRIX",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#800000"}},precision:4,bands:[{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:0}],inputs:{in_0:18}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"TRIX",histogramBase:0,joinPoints:!1}},description:"TRIX",shortDescription:"TRIX",is_price_study:!1,bands:[{id:"hline_0",name:"Zero"}],inputs:[{id:"in_0",name:"length",defval:18,type:"integer",min:1,max:2e3}],id:"TRIX@tv-basicstudies-1",scriptIdPart:"",name:"TRIX"},constructor:function(){this.f_0=function(e){return n.Std.log(e)},this.f_1=function(e){return 1e4*e},this.main=function(e,t){this._context=e,this._input=t;var i=this._input(0),r=this.f_0(n.Std.close(this._context)),o=this._context.new_var(r),s=n.Std.ema(o,i,this._context),a=this._context.new_var(s),l=n.Std.ema(a,i,this._context),c=this._context.new_var(l),u=n.Std.ema(c,i,this._context),h=this._context.new_var(u),d=n.Std.change(h);return[this.f_1(d)]}}},{name:"Triple EMA",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#008000"}},precision:4,inputs:{in_0:9}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Triple EMA",shortDescription:"TEMA",is_price_study:!0,inputs:[{id:"in_0",name:"length",defval:9,type:"integer",min:1,max:1e4}],id:"Triple EMA@tv-basicstudies-1",scriptIdPart:"",name:"Triple EMA"},constructor:function(){this.f_0=function(e,t,i){return 3*(e-t)+i},this.main=function(e,t){this._context=e,this._input=t;var i=this._input(0),r=n.Std.close(this._context),o=this._context.new_var(r),s=n.Std.ema(o,i,this._context),a=this._context.new_var(s),l=n.Std.ema(a,i,this._context),c=this._context.new_var(l),u=n.Std.ema(c,i,this._context);return[this.f_0(s,l,u)]}}},{name:"True Strength Indicator",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#000080"},plot_1:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0000"}},precision:4,bands:[{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:0}],inputs:{in_0:25,in_1:13,in_2:13}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1},plot_1:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"True Strength Indicator",shortDescription:"True Strength Indicator",is_price_study:!1,bands:[{id:"hline_0",name:"Zero"}],inputs:[{id:"in_0",name:"long",defval:25,type:"integer",min:1,max:4999},{id:"in_1",name:"short",defval:13,type:"integer",min:1,max:4999},{id:"in_2",name:"siglen",defval:13,type:"integer",min:1,max:4999}],id:"True Strength Indicator@tv-basicstudies-1", +scriptIdPart:"",name:"True Strength Indicator"},constructor:function(){this.main=function(e,t){this._context=e,this._input=t;var i=this._input(0),r=this._input(1),o=this._input(2),s=n.Std.close(this._context),a=this._context.new_var(s),l=n.Std.tsi(a,r,i,this._context),c=this._context.new_var(l);return[l,n.Std.ema(c,o,this._context)]}}},{name:"Trend Strength Index",metainfo:{_metainfoVersion:41,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,is_price_study:!1,id:"Trend Strength Index@tv-basicstudies-1",scriptIdPart:"",name:"Trend Strength Index",description:"Trend Strength Index",shortDescription:"Trend Strength Index",plots:[{id:"plot_0",type:"line"}],defaults:{styles:{plot_0:{linestyle:0,visible:!0,linewidth:1,plottype:0,trackPrice:!1,transparency:0,color:"#F00000"}},precision:4,inputs:{periods:14}},styles:{plot_0:{title:"Plot"}},inputs:[{id:"periods",type:"integer",name:"Periods"}]},constructor:function(){this.init=function(e,t){this._context=e,this._input=t,this.period=this._input(0),this.invertedPeriod=1/this.period,this.sumX=(this.period-1)*this.period/2,this.sumXX=(this.period-1)*this.period*(2*this.period-1)/6,this.invertedPeriodSumXSumX=this.invertedPeriod*this.sumX*this.sumX},this.trendStrengthIndex=function(){for(var e=this._context.new_var(n.Std.close(this._context)),t=n.Std.sum(e,this.period,this._context),i=0,r=0,o=0;o0?1:-1:a/(l=Math.sqrt(l))},this.main=function(e,t){return this._context=e,this._input=t,[this.trendStrengthIndex()]}}},{name:"Typical Price",metainfo:{_metainfoVersion:41,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,id:"TypicalPrice@tv-basicstudies-1",scriptIdPart:"",name:"Typical Price",description:"Typical Price",shortDescription:"Typical Price",is_price_study:!0,plots:[{id:"plot_0",type:"line"}],defaults:{styles:{plot_0:{linestyle:0,visible:!0,linewidth:1,plottype:0,trackPrice:!1,transparency:0,color:"#85200C"}},precision:3,inputs:{}},styles:{plot_0:{title:"Plot"}},inputs:[]},constructor:function(){this.main=function(e,t){return this._context=e,this._input=t,[n.Std.hlc3(this._context)]}}},{name:"Ultimate Oscillator",metainfo:{_metainfoVersion:41,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0000"}},precision:4,inputs:{in_0:7,in_1:14,in_2:28}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"UO",histogramBase:0,joinPoints:!1,isHidden:!1}},description:"Ultimate Oscillator",shortDescription:"UO",is_price_study:!1,inputs:[{id:"in_0",name:"length7",defval:7,type:"integer",min:1,max:1e12},{id:"in_1",name:"length14",defval:14,type:"integer",min:1,max:1e12},{id:"in_2",name:"length28",defval:28,type:"integer",min:1,max:1e12}],id:"ultimate_oscillator@tv-basicstudies-1",scriptIdPart:"",name:"Ultimate Oscillator"},constructor:function(){this.f_0=function(e,t,i){ +var r=this._context.new_var(e),o=this._context.new_var(t);return[n.Std.sum(r,i,this._context)/n.Std.sum(o,i,this._context)]},this.f_1=function(){var e=this._input(0),t=this._input(1),i=this._input(2),r=this._context.new_var(n.Std.close(this._context)),o=n.Std.max(n.Std.high(this._context),r.get(1)),s=this._context.new_var(n.Std.close(this._context)),a=n.Std.min(n.Std.low(this._context),s.get(1)),l=n.Std.close(this._context)-a,c=o-a,u=this.f_0(l,c,e),h=this.f_0(l,c,t),d=this.f_0(l,c,i);return[100*(4*u[0]+2*h[0]+d[0])/7]},this.main=function(e,t){return this._context=e,this._input=t,this.f_1()}}},{name:"Volatility Close-to-Close",metainfo:{_metainfoVersion:41,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,is_price_study:!1,id:"Volatility Close-to-Close@tv-basicstudies-1",scriptIdPart:"",name:"Volatility Close-to-Close",description:"Volatility Close-to-Close",shortDescription:"Volatility Close-to-Close",plots:[{id:"plot_0",type:"line"}],defaults:{styles:{plot_0:{linestyle:0,visible:!0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,color:"#0000FF"}},precision:4,inputs:{periods:10,daysPerYear:252}},styles:{plot_0:{title:"Plot"}},inputs:[{id:"periods",name:"Periods",type:"integer",defval:10},{id:"daysPerYear",name:"Days Per Year",type:"integer",defval:252}]},constructor:function(){this.init=function(e,t){this._context=e,this._input=t,this.period=this._input(0),this.daysPerYear=this._input(1)},this.stdev=function(e,t,i){var r=this.variance(e,t,i);return n.Std.sqrt(r)},this.variance=function(e,t,i){var r=n.Std.sma(e,t,i);return this.variance2(e,r,t)},this.variance2=function(e,t,i){var n,r,o=0;for(n=0;n0&&(a=.12*this.square(e.get()-r.get(1))/this.marketClosedPercentage+.88*a/(1-this.marketClosedPercentage)),a/=s,a*=this.secondsPerYear;var l=this._context.new_var(a);return 100*Math.sqrt(n.Std.sum(l,this.period,this._context)/this.period)},this.main=function(e,t){return this._context=e,this._input=t,[this.volatilityOHLC()]}}},{name:"Volatility Index",metainfo:{_metainfoVersion:41,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,is_price_study:!0,id:"Volatility Index@tv-basicstudies-1",scriptIdPart:"",name:"Volatility Index",description:"Volatility Index",shortDescription:"Volatility Index",plots:[{id:"plot_0",type:"line"}],defaults:{styles:{plot_0:{linestyle:0,visible:!0,linewidth:1,plottype:0,trackPrice:!1,transparency:0,color:"#F00000"}},precision:3,inputs:{periods:10,atrMult:3,method:"Wilder Smoothing"}},styles:{plot_0:{title:"Plot"}},inputs:[{id:"periods",name:"Periods",type:"integer"},{id:"atrMult",name:"ATR Mult",type:"float"},{id:"method",name:"Method",type:"text",defval:"Exponential",options:["Exponential","Wilder Smoothing"]}]},constructor:function(){this.init=function(e,t){this._context=e,this._input=t, +this.period=this._input(0),this.atrMult=this._input(1),this.maMethod=this._input(2),this.nextsar=null,this.position=null,this.sic=null,this.bars=[],this.count=0,this.lastSar=null},this.highest=function(e,t){for(var i=this.bars.length-this.period,n=this.bars[i],r=i+1;rn&&(n=this.bars[r]);return n},this.computeATR=function(){var e=n.Std.high(this._context)-n.Std.low(this._context),t=n.Std.high(this._context)-this.bars[this.bars.length-2],i=this.bars[this.bars.length-2]-n.Std.low(this._context);return this.tr=Math.max(e,t,i),"Exponential"===this.maMethod?this.atr=n.Std.ema(this._context.new_var(this.tr),this.period,this._context):this.atr=this.tr/this.period+(1-1/this.period)*this.atr,this.atr*this.atrMult},this.calculateVolatility=function(){if(n.Std.close(this._context)===this.bars[this.bars.length-1])return this.lastSar;if(this.bars.push(n.Std.close(this._context)),1===this.count)this.atr=n.Std.high(this._context)-n.Std.low(this._context),this.sic=n.Std.close(this._context);else if(this.countthis.sic&&(this.sic=n.Std.close(this._context))}else if(this.count===this.period){e=n.Std.high(this._context)-n.Std.low(this._context),t=n.Std.high(this._context)-this.bars[this.bars.length-2],i=this.bars[this.bars.length-2]-n.Std.low(this._context);this.atr+=Math.max(e,t,i),this.atr*=1/this.period,n.Std.close(this._context)>this.sic&&(this.sic=n.Std.close(this._context)),this.position="LONG",this.nextsar=this.sic-this.atr*this.atrMult}else{var r=this.nextsar;"LONG"===this.position?n.Std.close(this._context)r?(this.position="LONG",this.sic=n.Std.close(this._context),this.nextsar=this.sic-this.computeATR()):(this.position="SHORT",this.sic=Math.min(n.Std.close(this._context),this.sic),this.nextsar=this.sic+this.computeATR())),this.lastSar=r}return this.count++,r},this.main=function(e,t){return this._context=e,this._input=t,this._context.select_sym(0),[this.calculateVolatility()]}}},{name:"VWAP",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:0,transparency:0,visible:!0,color:"#3A6CA8"}},precision:4},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"VWAP",histogramBase:0,joinPoints:!1,isHidden:!1}},description:"VWAP",shortDescription:"VWAP",is_price_study:!0,inputs:[],id:"VWAP@tv-basicstudies-1",scriptIdPart:"",name:"VWAP"},constructor:function(){this.f_1=function(e){e.hist=null,e.add_hist()},this.init=function(e,t){this._isNewSession=null},this.main=function(e,t){this._context=e, +this._input=t;var i=e.new_var(),r=e.new_var(),o=this._context.symbol.time;return o&&(null===this._isNewSession&&(this._isNewSession=n.Std.createNewSessionCheck(e)),this._isNewSession(o)&&(this.f_1(i),this.f_1(r))),i.set(n.Std.nz(i.get(1))+n.Std.hlc3(this._context)*n.Std.volume(this._context)),r.set(n.Std.nz(r.get(1))+n.Std.volume(this._context)),[i.get(0)/r.get(0)]}}},{name:"VWMA",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"}},precision:4,inputs:{in_0:20}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"VWMA",shortDescription:"VWMA",is_price_study:!0,inputs:[{id:"in_0",name:"len",defval:20,type:"integer",min:1,max:1e4}],id:"VWMA@tv-basicstudies-1",scriptIdPart:"",name:"VWMA"},constructor:function(){this.main=function(e,t){this._context=e,this._input=t;var i=n.Std.close(this._context),r=this._input(0),o=this._context.new_var(i);return[n.Std.vwma(o,r,this._context)]}}},{name:"Volume Oscillator",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#000080"}},precision:4,bands:[{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:0}],inputs:{in_0:5,in_1:10}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Volume Oscillator",shortDescription:"Volume Osc",is_price_study:!1,bands:[{id:"hline_0",name:"Zero"}],inputs:[{id:"in_0",name:"shortlen",defval:5,type:"integer",min:1,max:4999},{id:"in_1",name:"longlen",defval:10,type:"integer",min:1,max:4999}],id:"Volume Oscillator@tv-basicstudies-1",scriptIdPart:"",name:"Volume Oscillator"},constructor:function(){this.f_0=function(e,t){return 100*(e-t)/t},this.main=function(e,t){this._context=e,this._input=t;var i=this._input(0),r=this._input(1),o=n.Std.volume(this._context),s=this._context.new_var(o),a=n.Std.ema(s,i,this._context),l=this._context.new_var(o),c=n.Std.ema(l,r,this._context);return[this.f_0(a,c)]}}},{name:"Vortex Indicator",metainfo:{_metainfoVersion:42,isTVScript:!1,isTVScriptStub:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"},plot_1:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0000"}},precision:4,inputs:{in_0:14}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"}],styles:{plot_0:{title:"VI +",histogramBase:0,joinPoints:!1,isHidden:!1},plot_1:{title:"VI -",histogramBase:0,joinPoints:!1,isHidden:!1}},description:"Vortex Indicator",shortDescription:"VI",is_price_study:!1,is_hidden_study:!1,id:"vortex_indicator@tv-basicstudies-1",inputs:[{id:"in_0",name:"Period",defval:14,type:"integer",min:2,max:1e12}],scriptIdPart:"",name:"Vortex Indicator"},constructor:function(){this.f_0=function(){ +var e=this._input(0),t=this._context.new_var(n.Std.low(this._context)),i=this._context.new_var(n.Std.abs(n.Std.high(this._context)-t.get(1))),r=n.Std.sum(i,e,this._context),o=this._context.new_var(n.Std.high(this._context)),s=this._context.new_var(n.Std.abs(n.Std.low(this._context)-o.get(1))),a=n.Std.sum(s,e,this._context),l=this._context.new_var(n.Std.atr(1,this._context)),c=n.Std.sum(l,e,this._context);return[r/c,a/c]},this.main=function(e,t){return this._context=e,this._input=t,this.f_0()}}},{name:"Willams %R",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#000080"}},precision:4,bands:[{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:-20},{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:-80}],filledAreasStyle:{fill_0:{color:"#000080",transparency:90,visible:!0}},inputs:{in_0:14}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Williams %R",shortDescription:"%R",is_price_study:!1,bands:[{id:"hline_0",name:"UpperLimit"},{id:"hline_1",name:"LowerLimit"}],filledAreas:[{id:"fill_0",objAId:"hline_0",objBId:"hline_1",type:"hline_hline",title:"Hlines Background"}],inputs:[{id:"in_0",name:"length",defval:14,type:"integer",min:1,max:2e3}],id:"Willams %R@tv-basicstudies-1",scriptIdPart:"",name:"Willams %R"},constructor:function(){this.f_0=function(e,t,i){return 100*(e-t)/(t-i)},this.main=function(e,t){this._context=e,this._input=t;var i=this._input(0),r=n.Std.high(this._context),o=this._context.new_var(r),s=n.Std.highest(o,i,this._context),a=n.Std.low(this._context),l=this._context.new_var(a),c=n.Std.lowest(l,i,this._context);return[this.f_0(n.Std.close(this._context),s,c)]}}},{name:"Williams Alligator",metainfo:{_metainfoVersion:27,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0000FF"},plot_1:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0000"},plot_2:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#008000"}},precision:4,inputs:{in_0:21,in_1:13,in_2:8}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"},{id:"plot_2",type:"line"}],styles:{plot_0:{title:"Jaw",histogramBase:0,joinPoints:!1},plot_1:{title:"Teeth",histogramBase:0,joinPoints:!1},plot_2:{title:"Lips",histogramBase:0,joinPoints:!1}},description:"Williams Alligator",shortDescription:"Alligator",is_price_study:!0,inputs:[{id:"in_0",name:"jawLength",defval:21,type:"integer",min:1,max:2e3},{id:"in_1",name:"teethLength",defval:13,type:"integer",min:1,max:2e3},{id:"in_2",name:"lipsLength",defval:8,type:"integer",min:1,max:2e3}],id:"Williams Alligator@tv-basicstudies-1",scriptIdPart:"",name:"Williams Alligator"},constructor:function(){this.main=function(e,t){this._context=e,this._input=t +;var i=this._input(0),r=this._input(1),o=this._input(2),s=n.Std.hl2(this._context),a=this._context.new_var(s),l=n.Std.ema(a,i,this._context),c=this._context.new_var(s),u=n.Std.ema(c,r,this._context),h=this._context.new_var(s);return[{value:l,offset:8},{value:u,offset:5},{value:n.Std.ema(h,o,this._context),offset:3}]}}},{name:"Williams Fractals",metainfo:{_metainfoVersion:42,isTVScript:!1,isTVScriptStub:!1,defaults:{styles:{plot_0:{plottype:"shape_triangle_down",visible:!0,location:"BelowBar",transparency:0,color:"#800000"},plot_1:{plottype:"shape_triangle_up",visible:!0,location:"AboveBar",transparency:0,color:"#808000"}},precision:4,inputs:{in_0:2}},plots:[{id:"plot_0",type:"shapes"},{id:"plot_1",type:"shapes"}],styles:{plot_0:{title:"Down fractals",isHidden:!1},plot_1:{title:"Up fractals",isHidden:!1}},description:"Williams Fractal",shortDescription:"Fractals",is_price_study:!0,is_hidden_study:!1,id:"Williams Fractals@tv-basicstudies-1",inputs:[{id:"in_0",name:"Periods",defval:2,type:"integer",min:2,max:1e12}],scriptIdPart:"",name:"Williams Fractals",isCustomIndicator:!0},constructor:function(){this.f_0=function(){var e=this._input(0),t=this._context.new_var(n.Std.high(this._context)),i=n.Std.or(n.Std.and(n.Std.and(n.Std.lt(t.get(e+2),t.get(e)),n.Std.lt(t.get(e+1),t.get(e))),n.Std.and(n.Std.lt(t.get(e-1),t.get(e)),n.Std.lt(t.get(e-2),t.get(e)))),n.Std.or(n.Std.or(n.Std.and(n.Std.lt(t.get(e+3),t.get(e)),n.Std.and(n.Std.and(n.Std.lt(t.get(e+2),t.get(e)),n.Std.eq(t.get(e+1),t.get(e))),n.Std.and(n.Std.lt(t.get(e-1),t.get(e)),n.Std.lt(t.get(e-2),t.get(e))))),n.Std.and(n.Std.and(n.Std.lt(t.get(e+4),t.get(e)),n.Std.lt(t.get(e+3),t.get(e))),n.Std.and(n.Std.and(n.Std.eq(t.get(e+2),t.get(e)),n.Std.le(t.get(e+1),t.get(e))),n.Std.and(n.Std.lt(t.get(e-1),t.get(e)),n.Std.lt(t.get(e-2),t.get(e)))))),n.Std.or(n.Std.and(n.Std.and(n.Std.lt(t.get(e+5),t.get(e)),n.Std.and(n.Std.lt(t.get(e+4),t.get(e)),n.Std.eq(t.get(e+3),t.get(e)))),n.Std.and(n.Std.and(n.Std.eq(t.get(e+2),t.get(e)),n.Std.le(t.get(e+1),t.get(e))),n.Std.and(n.Std.lt(t.get(e-1),t.get(e)),n.Std.lt(t.get(e-2),t.get(e))))),n.Std.and(n.Std.and(n.Std.and(n.Std.lt(t.get(e+6),t.get(e)),n.Std.lt(t.get(e+5),t.get(e))),n.Std.and(n.Std.eq(t.get(e+4),t.get(e)),n.Std.le(t.get(e+3),t.get(e)))),n.Std.and(n.Std.and(n.Std.eq(t.get(e+2),t.get(e)),n.Std.le(t.get(e+1),t.get(e))),n.Std.and(n.Std.lt(t.get(e-1),t.get(e)),n.Std.lt(t.get(e-2),t.get(e)))))))),r=this._context.new_var(n.Std.low(this._context)) +;return[n.Std.or(n.Std.and(n.Std.and(n.Std.gt(r.get(e+2),r.get(e)),n.Std.gt(r.get(e+1),r.get(e))),n.Std.and(n.Std.gt(r.get(e-1),r.get(e)),n.Std.gt(r.get(e-2),r.get(e)))),n.Std.or(n.Std.or(n.Std.and(n.Std.gt(r.get(e+3),r.get(e)),n.Std.and(n.Std.and(n.Std.gt(r.get(e+2),r.get(e)),n.Std.eq(r.get(e+1),r.get(e))),n.Std.and(n.Std.gt(r.get(e-1),r.get(e)),n.Std.gt(r.get(e-2),r.get(e))))),n.Std.and(n.Std.and(n.Std.gt(r.get(e+4),r.get(e)),n.Std.gt(r.get(e+3),r.get(e))),n.Std.and(n.Std.and(n.Std.eq(r.get(e+2),r.get(e)),n.Std.ge(r.get(e+1),r.get(e))),n.Std.and(n.Std.gt(r.get(e-1),r.get(e)),n.Std.gt(r.get(e-2),r.get(e)))))),n.Std.or(n.Std.and(n.Std.and(n.Std.gt(r.get(e+5),r.get(e)),n.Std.and(n.Std.gt(r.get(e+4),r.get(e)),n.Std.eq(r.get(e+3),r.get(e)))),n.Std.and(n.Std.and(n.Std.eq(r.get(e+2),r.get(e)),n.Std.ge(r.get(e+1),r.get(e))),n.Std.and(n.Std.gt(r.get(e-1),r.get(e)),n.Std.gt(r.get(e-2),r.get(e))))),n.Std.and(n.Std.and(n.Std.and(n.Std.gt(r.get(e+6),r.get(e)),n.Std.gt(r.get(e+5),r.get(e))),n.Std.and(n.Std.eq(r.get(e+4),r.get(e)),n.Std.ge(r.get(e+3),r.get(e)))),n.Std.and(n.Std.and(n.Std.eq(r.get(e+2),r.get(e)),n.Std.ge(r.get(e+1),r.get(e))),n.Std.and(n.Std.gt(r.get(e-1),r.get(e)),n.Std.gt(r.get(e-2),r.get(e)))))))),i]},this.main=function(e,t){this._context=e,this._input=t;var i=this.f_0();return[{value:i[0],offset:-2},{value:i[1],offset:-2}]}}}]},"2h0C":function(e,t,i){var n=i("txPx").getLogger("Chart.PropertyPage.Binding");function r(e,t,i,r,o,s){e?(this._control=e,this._property=t,this._applyOnFly=i,this._undoModel=r,this._undoText=o,this._doesNotAffectSave=!1,t&&(this._formatters=[],this._changed=!1,this.setValue(t.value()),t.listeners().subscribe(this,this.propertyChanged))):n.logDebug("Missing control")}r.prototype.addFormatter=function(e){this._formatters.push(e),this.setValue(this._property.value())},r.prototype._formatValue=function(e){return this._formatters.reduce((function(e,t){return t(e)}),e)},r.prototype._setValueToProperty=function(e){this._setter?this._setter.call(this,e):this.setValueToProperty(e)},r.prototype._attachToControl=function(e,t){var i=this;t?e.on("keyup change input",(function(e){var t=i.value();i._setValueToProperty(t),i.setValue(t)})):(e.keypress((function(e){if(i._changed=!0,13===e.which){var t=i.value();i._setValueToProperty(t),i.setValue(t)}})),e.focusout((function(e){var t=i.value();i.changed()&&(i._setValueToProperty(t),i.setValue(t))})),e.change((function(e){var t=i.value();$(e.target).is(".ticker")?(void 0!==i._changeTimerId&&clearTimeout(i._changeTimerId),i._changeTimerId=setTimeout((function(){i._setValueToProperty(t)}),250)):i._setValueToProperty(t),i.setValue(t)})))},r.prototype.control=function(){return this._control},r.prototype.changed=function(){return this._changed},r.prototype.setValueToProperty=function(e){this._undoModel.setProperty(this._property,e,this._undoText,this._doesNotAffectSave),this._changed=!1},r.prototype.property=function(){return this._property},r.prototype.propertyChanged=function(e){this.setValue(e.value())},r.prototype.destroy=function(){ +this._property&&this._property.listeners().unsubscribe(this,this.propertyChanged)},r.prototype.disableAffectingSave=function(){this._doesNotAffectSave=!0},t.Binding=r},"2ijp":function(e,t,i){"use strict";i.d(t,"a",(function(){return o}));var n=i("l4sv"),r=i("8Uy/"),o=function(){function e(){this._lineRendererData={y:0,color:"rgba(0, 0, 0, 0)",linewidth:1,linestyle:r.LINESTYLE_SOLID,visible:!1},this._lineRenderer=new n.HorizontalLineRenderer,this._invalidated=!0,this._lineRenderer.setData(this._lineRendererData)}return e.prototype.update=function(){this._invalidated=!0},e.prototype.renderer=function(){return this._invalidated&&(this._updateImpl(),this._invalidated=!1),this._lineRenderer},e}()},"2jXJ":function(e,t,i){"use strict";i.r(t),i.d(t,"supportedLineTools",(function(){return n}));var n={cursor:{name:"cursor",onlySelectable:!0},dot:{name:"dot",onlySelectable:!0},arrow_cursor:{name:"arrow",onlySelectable:!0},eraser:{name:"eraser",onlySelectable:!0},measure:{name:"measure",onlySelectable:!0},zoom:{name:"zoom",onlySelectable:!0},brush:{name:"LineToolBrush"},text:{name:"LineToolText"},anchored_text:{name:"LineToolTextAbsolute"},note:{name:"LineToolNote"},anchored_note:{name:"LineToolNoteAbsolute"},callout:{name:"LineToolCallout"},balloon:{name:"LineToolBalloon"},arrow_up:{name:"LineToolArrowMarkUp"},arrow_down:{name:"LineToolArrowMarkDown"},arrow_left:{name:"LineToolArrowMarkLeft"},arrow_right:{name:"LineToolArrowMarkRight"},price_label:{name:"LineToolPriceLabel"},arrow_marker:{name:"LineToolArrowMarker"},flag:{name:"LineToolFlagMark"},vertical_line:{name:"LineToolVertLine"},horizontal_line:{name:"LineToolHorzLine"},cross_line:{name:"LineToolCrossLine"},horizontal_ray:{name:"LineToolHorzRay"},trend_line:{name:"LineToolTrendLine"},info_line:{name:"LineToolInfoLine"},trend_angle:{name:"LineToolTrendAngle"},arrow:{name:"LineToolArrow"},ray:{name:"LineToolRay"},extended:{name:"LineToolExtended"},parallel_channel:{name:"LineToolParallelChannel"},disjoint_angle:{name:"LineToolDisjointAngle"},flat_bottom:{name:"LineToolFlatBottom"},pitchfork:{name:"LineToolPitchfork"},schiff_pitchfork_modified:{name:"LineToolSchiffPitchfork"},schiff_pitchfork:{name:"LineToolSchiffPitchfork2"},inside_pitchfork:{name:"LineToolInsidePitchfork"},pitchfan:{name:"LineToolPitchfan"},gannbox:{name:"LineToolGannSquare"},gannbox_square:{name:"LineToolGannComplex"},gannbox_fixed:{name:"LineToolGannFixed"},gannbox_fan:{name:"LineToolGannFan"},fib_retracement:{name:"LineToolFibRetracement"},fib_trend_ext:{name:"LineToolTrendBasedFibExtension"},fib_speed_resist_fan:{name:"LineToolFibSpeedResistanceFan"},fib_timezone:{name:"LineToolFibTimeZone"},fib_trend_time:{name:"LineToolTrendBasedFibTime"},fib_circles:{name:"LineToolFibCircles"},fib_spiral:{name:"LineToolFibSpiral"},fib_speed_resist_arcs:{name:"LineToolFibSpeedResistanceArcs"},fib_wedge:{name:"LineToolFibWedge"},fib_channel:{name:"LineToolFibChannel"},xabcd_pattern:{name:"LineTool5PointsPattern"},cypher_pattern:{name:"LineToolCypherPattern"},abcd_pattern:{name:"LineToolABCD"},triangle_pattern:{ +name:"LineToolTrianglePattern"},"3divers_pattern":{name:"LineToolThreeDrivers"},head_and_shoulders:{name:"LineToolHeadAndShoulders"},elliott_impulse_wave:{name:"LineToolElliottImpulse"},elliott_triangle_wave:{name:"LineToolElliottTriangle"},elliott_triple_combo:{name:"LineToolElliottTripleCombo"},elliott_correction:{name:"LineToolElliottCorrection"},elliott_double_combo:{name:"LineToolElliottDoubleCombo"},cyclic_lines:{name:"LineToolCircleLines"},time_cycles:{name:"LineToolTimeCycles"},sine_line:{name:"LineToolSineLine"},long_position:{name:"LineToolRiskRewardLong"},short_position:{name:"LineToolRiskRewardShort"},forecast:{name:"LineToolPrediction"},date_range:{name:"LineToolDateRange"},price_range:{name:"LineToolPriceRange"},date_and_price_range:{name:"LineToolDateAndPriceRange"},bars_pattern:{name:"LineToolBarsPattern"},ghost_feed:{name:"LineToolGhostFeed"},projection:{name:"LineToolProjection"},rectangle:{name:"LineToolRectangle"},rotated_rectangle:{name:"LineToolRotatedRectangle"},ellipse:{name:"LineToolEllipse"},triangle:{name:"LineToolTriangle"},polyline:{name:"LineToolPolyline"},path:{name:"LineToolPath"},curve:{name:"LineToolBezierQuadro"},double_curve:{name:"LineToolBezierCubic"},arc:{name:"LineToolArc"},icon:{name:"LineToolIcon"}}},"2kV1":function(e,t,i){"use strict";i.r(t),i.d(t,"StudyStatusView",(function(){return r}));var n=i("mrSG"),r=function(e){function t(t){return e.call(this,t.statusProvider({}))||this}return Object(n.__extends)(t,e),t.prototype.color=function(){return this._statusProvider.color()},t.prototype.getSplitTitle=function(){return this._statusProvider.getSplitTitle()},t.prototype.update=function(){this._text=this._statusProvider.text()},t}(i("nBJD").a)},"3/8U":function(e,t,i){"use strict";function n(e){return"dark"===e?"rgba(30,136,229,0.25)":"rgba(33,150,243,0.25)"}i.r(t),i.d(t,"axesHighlightColor",(function(){return n}))},"38az":function(e,t,i){"use strict";var n=i("k9/m").PlotRowSearchMode;function r(){this.backColorers=[]}function o(e){r.call(this),this._series=e}function s(e,t){r.call(this),this._study=e,this._plotIndex=t}r.prototype.barStyle=function(e,t,i){for(var n={},r=this.backColorers.length-1;r>=0;r--)this.backColorers[r].applyBarStyle(e,t,n,i);return this.applyBarStyle(e,t,n,i),n},r.prototype.pushBackBarColorer=function(e){this.backColorers.push(e)},r.prototype.applyBarStyle=function(e,t,i){throw new Error("This function is supposed to be reimplemented in a subclass")},inherit(o,r),o.upColor=function(e,t){switch(e.style.value()){case TradingView.Series.STYLE_LINE:return e.lineStyle.color.value();case TradingView.Series.STYLE_AREA:return e.areaStyle.linecolor.value();case TradingView.Series.STYLE_BARS:return e.barStyle.upColor.value();case TradingView.Series.STYLE_CANDLES:return e.candleStyle.upColor.value();case TradingView.Series.STYLE_HOLLOW_CANDLES:return e.hollowCandleStyle.upColor.value();case TradingView.Series.STYLE_HEIKEN_ASHI:return e.haStyle.upColor.value();case TradingView.Series.STYLE_BASELINE:return e.baselineStyle.topLineColor.value() +;case TradingView.Series.STYLE_HILO:return e.hiloStyle.color.value()}throw new Error("Unknown series style")},o.downColor=function(e,t){switch(e.style.value()){case TradingView.Series.STYLE_LINE:return e.lineStyle.color.value();case TradingView.Series.STYLE_AREA:return e.areaStyle.linecolor.value();case TradingView.Series.STYLE_BARS:return e.barStyle.downColor.value();case TradingView.Series.STYLE_CANDLES:return e.candleStyle.downColor.value();case TradingView.Series.STYLE_HOLLOW_CANDLES:return e.hollowCandleStyle.downColor.value();case TradingView.Series.STYLE_HEIKEN_ASHI:return e.haStyle.downColor.value();case TradingView.Series.STYLE_BASELINE:return e.baselineStyle.bottomLineColor.value();case TradingView.Series.STYLE_HILO:return e.hiloStyle.color.value()}throw new Error("Unknown series style")},o.prototype._applyLineStyle=function(e,t,i,n,r){i.barColor=o.upColor(r)},o.prototype._applyAreaStyle=function(e,t,i,n,r){i.barColor=o.upColor(r)},o.prototype._applyBarStyle=function(e,t,i,n,r){var s=o.upColor(r),a=o.downColor(r),l=this.findBar(e,!1,n);if(r.barStyle.barColorsOnPrevClose.value()){var c=this.findPrevBar(e,!1,n);i.barColor=c[TradingView.CLOSE_PLOT]<=l[TradingView.CLOSE_PLOT]?s:a,i.barBorderColor=c[TradingView.CLOSE_PLOT]<=l[TradingView.CLOSE_PLOT]?s:a}else i.barColor=l[TradingView.OPEN_PLOT]<=l[TradingView.CLOSE_PLOT]?s:a,i.barBorderColor=l[TradingView.OPEN_PLOT]<=l[TradingView.CLOSE_PLOT]?s:a},o.prototype._applyCandleStyle=function(e,t,i,n,r){var s,a=o.upColor(r,t),l=o.downColor(r,t),c=r.candleStyle.borderUpColor?r.candleStyle.borderUpColor.value():r.candleStyle.borderColor.value(),u=r.candleStyle.borderDownColor?r.candleStyle.borderDownColor.value():r.candleStyle.borderColor.value(),h=r.candleStyle.wickUpColor?r.candleStyle.wickUpColor.value():r.candleStyle.wickColor.value(),d=r.candleStyle.wickDownColor?r.candleStyle.wickDownColor.value():r.candleStyle.wickColor.value(),p=this.findBar(e,!1,n);r.candleStyle.barColorsOnPrevClose.value()?s=this.findPrevBar(e,!1,n)[TradingView.CLOSE_PLOT]<=p[TradingView.CLOSE_PLOT]:s=p[TradingView.OPEN_PLOT]<=p[TradingView.CLOSE_PLOT];i.barColor=s?a:l,i.barBorderColor=s?c:u,i.barWickColor=s?h:d},o.prototype._applyHollowCandleStyle=function(e,t,i,n,r){var s=o.upColor(r,t),a=o.downColor(r,t),l=r.hollowCandleStyle.borderUpColor?r.hollowCandleStyle.borderUpColor.value():r.hollowCandleStyle.borderColor.value(),c=r.hollowCandleStyle.borderDownColor?r.hollowCandleStyle.borderDownColor.value():r.hollowCandleStyle.borderColor.value(),u=r.hollowCandleStyle.wickUpColor?r.hollowCandleStyle.wickUpColor.value():r.hollowCandleStyle.wickColor.value(),h=r.hollowCandleStyle.wickDownColor?r.hollowCandleStyle.wickDownColor.value():r.hollowCandleStyle.wickColor.value(),d=this.findBar(e,!1,n);this.findPrevBar(e,!1,n)[TradingView.CLOSE_PLOT]<=d[TradingView.CLOSE_PLOT]?(i.barColor=s,i.barBorderColor=l,i.barWickColor=u):(i.barColor=a,i.barBorderColor=c,i.barWickColor=h),i.isBarHollow=d[TradingView.OPEN_PLOT]<=d[TradingView.CLOSE_PLOT]},o.prototype._applyHAStyle=function(e,t,i,n,r){ +var s,a=o.upColor(r,t),l=o.downColor(r,t),c=r.haStyle.borderUpColor.value(),u=r.haStyle.borderDownColor.value(),h=r.haStyle.wickUpColor.value(),d=r.haStyle.wickDownColor.value(),p=this.findBar(e,t,n);r.haStyle.barColorsOnPrevClose.value()?s=this.findPrevBar(e,t,n)[TradingView.CLOSE_PLOT]<=p[TradingView.CLOSE_PLOT]:s=p[TradingView.OPEN_PLOT]<=p[TradingView.CLOSE_PLOT];i.barColor=s?a:l,i.barBorderColor=s?c:u,i.barWickColor=s?h:d},o.prototype._applyBaseLineStyle=function(e,t,i,n,r){var s=this.findBar(e,t,n),a=r.baselineStyle,l=this._series.priceScale(),c=Math.round(l.height()*(Math.abs(100-a.baseLevelPercentage.value())/100)),u=this._series.firstValue(),h=l.coordinateToPrice(c,u);s[TradingView.CLOSE_PLOT]>h?i.barColor=o.upColor(r,t):i.barColor=o.downColor(r,t)},o.prototype._applyHiLoStyle=function(e,t,i,n,r){i.barColor=o.upColor(r,t),i.barBorderColor=r.hiloStyle.borderColor.value()},o.prototype.applyBarStyle=function(e,t,i,n){i||(i={}),i.barColor=null,i.barBorderColor=null,i.barWickColor=null,i.isBarHollow=null,i.isBarUp=null,i.upColor=null,i.downColor=null,i.isTwoColorBar=null,i.isMergedBar=null;var r=this._series.properties();switch(r.style.value()){case TradingView.Series.STYLE_LINE:this._applyLineStyle(e,t,i,n,r);break;case TradingView.Series.STYLE_AREA:this._applyAreaStyle(e,t,i,n,r);break;case TradingView.Series.STYLE_BARS:this._applyBarStyle(e,t,i,n,r);break;case TradingView.Series.STYLE_CANDLES:this._applyCandleStyle(e,t,i,n,r);break;case TradingView.Series.STYLE_HOLLOW_CANDLES:this._applyHollowCandleStyle(e,t,i,n,r);break;case TradingView.Series.STYLE_HEIKEN_ASHI:this._applyHAStyle(e,t,i,n,r);break;case TradingView.Series.STYLE_BASELINE:this._applyBaseLineStyle(e,t,i,n,r);break;case TradingView.Series.STYLE_HILO:this._applyHiLoStyle(e,t,i,n,r)}return i},o.prototype.getSeriesBars=function(e){return e?this._series.nsBars():this._series.bars()},o.prototype._findBarFieldValue=function(e,t,i){var n=this.getSeriesBars(i).valueAt(e);if(null!==n)return n[t]},o.prototype.findBar=function(e,t,i){return i?i.value:this.getSeriesBars(t).valueAt(e)||[]},o.prototype.findPrevBar=function(e,t,i){if(i&&i.previousValue)return i.previousValue;var r=this._series.bars()._search(e,n.Exact);return null!==r&&r>0?this._series.bars()._valueAt(r-1):[]},inherit(s,r),s.prototype.getBars=function(){return this._study.series().bars()},s.prototype.firstColoredBar=function(e){for(var t=e,i=0;ie+a)return i;var l=n.styles[s.id] +;if(l.visible&&!l.visible.value())return i;var c=o.valueAt(e-a);if(null===c)return i;var u=c[this._plotIndex+1];if(null==u)return i;u=Math.round(u);var h=r.plots[this._plotIndex].palette,d=n.palettes[h],p=r.palettes[h].valToIndex?r.palettes[h].valToIndex[u]:u,_=d.colors[p].color.value();return i.barColor=_,i.upColor=_.color,i.downColor=_.color,i},t.SeriesBarColorer=o,t.StudyBarColorer=s},"3ClC":function(e,t,i){"use strict";i.r(t);var n=i("0YCj"),r=i.n(n),o=i("GVHu"),s=i("PL0c"),a=i("cKqi"),l=i("0gbU"),c=i("TMWk"),u=i("8sOK"),h=i("mrSG"),d=function(e){function t(t,i,n,r){var o=e.call(this,t,i,n,r)||this;return o.properties().styles.vol_ma.visible.listeners().subscribe(o,(function(){return o.invalidateTitleCache()})),o}return Object(h.__extends)(t,e),t.prototype.base=function(){return 1},t.prototype.destroy=function(){this.properties().styles.vol_ma.visible.listeners().unsubscribeAll(this),e.prototype.destroy.call(this)},t.prototype._titleInputs=function(){var e={symbolsForDisplay:!0,skipHiddenInputs:!0,fakeInputsForDisplay:!0,asObject:!1};return this.properties().styles.vol_ma.visible.value()?this.inputs(e):this.inputs(Object(h.__assign)(Object(h.__assign)({},e),{skippedInputs:["length"]}))},t}(o.Study);function p(e,t){return void 0===t&&(t="shift"),{studyConstructor:e,colorRotationMode:t}}i.d(t,"isStudy",(function(){return m})),i.d(t,"isStudyStrategy",(function(){return v})),i.d(t,"isStudyStub",(function(){return y})),i.d(t,"isFundamentalStudy",(function(){return g})),i.d(t,"isESDStudy",(function(){return b})),i.d(t,"isFundamentalStudyMetaInfo",(function(){return S})),i.d(t,"createStudy",(function(){return P})),i.d(t,"studyColorRotationMode",(function(){return C}));var _={study_PivotPointsStandard:p(s.study_PivotPointsStandard),study_Overlay:p(a.study_Overlay,"loop"),study_Compare:p(l.study_Compare,"loop"),study_Volume:p(d),study_ScriptWithDataOffset:p(c.study_ScriptWithDataOffset)};for(var f in _)_.hasOwnProperty(f)&&(TradingView[f]=_[f].studyConstructor);function m(e){return e instanceof o.Study}function v(e){return!1}function y(e){return e instanceof u.StudyStub}function g(e){return e instanceof Fundamental}function b(e){return!1}function S(e){return"study_Internal$STD;Fund_"===w(e)}function w(e){var t="study_"+(e.classId||e.shortId);return t.startsWith("study_Internal$STD;Fund_")?"study_Internal$STD;Fund_":t}function P(e,t,i,n,r){var s=w(n),a=new(s in _?_[s].studyConstructor:o.Study)(e,t,i,n);return void 0!==r&&a.setId(r),a}function C(e){var t=w(e);return t in _?_[t].colorRotationMode:1!==e.plots.length?"shift":void 0===e.pine||r.a.isStandardPine(e.id)?"loop":"shift"}},"3UA0":function(e,t){e.exports.tzData={"America/New_York":{ +time:[-2717668562,-1633298400,-1615154400,-1601848800,-1583704800,-1570399200,-1551650400,-1536530400,-1523224800,-1504476e3,-1491775200,-1473026400,-1459720800,-1441576800,-1428271200,-1410127200,-1396821600,-1378677600,-1365372e3,-1347228e3,-1333922400,-1315173600,-1301868e3,-1283724e3,-1270418400,-1252274400,-1238968800,-1220824800,-1207519200,-1189375200,-1176069600,-1157320800,-114462e4,-1125871200,-1112565600,-1094421600,-1081116e3,-1062972e3,-1049666400,-1031522400,-1018216800,-1000072800,-986767200,-968018400,-955317600,-936568800,-923263200,-905119200,-891813600,-880236e3,-76941e4,-765410400,-747266400,-733960800,-715816800,-702511200,-684367200,-671061600,-652917600,-639612e3,-620863200,-608162400,-589413600,-576108e3,-557964e3,-544658400,-526514400,-513208800,-495064800,-481759200,-463615200,-447285600,-431560800,-415836e3,-400111200,-384386400,-368661600,-352936800,-337212e3,-321487200,-305762400,-289432800,-273708e3,-257983200,-242258400,-226533600,-210808800,-195084e3,-179359200,-163634400,-147909600,-13158e4,-11646e4,-100130400,-84405600,-68680800,-52956e3,-37231200,-21506400,-5781600,9943200,25668e3,41392800,57722400,73447200,89172e3,104896800,120621600,126669600,152071200,162352800,183520800,199245600,215575200,230695200,247024800,262749600,278474400,294199200,309924e3,325648800,341373600,357098400,372823200,388548e3,404877600,419997600,436327200,452052e3,467776800,483501600,499226400,514951200,530676e3,544586400,562125600,576036e3,59418e4,607485600,625629600,638935200,657079200,670989600,688528800,702439200,719978400,733888800,752032800,765338400,783482400,796788e3,814932e3,828842400,846381600,860292e3,877831200,891741600,909280800,923191200,941335200,954640800,972784800,986090400,1004234400,1018144800,1035684e3,1049594400,1067133600,1081044e3,1099188e3,1112493600,1130637600,1143943200,1162087200,1173578400,1194141600,1205028e3,1225591200,1236477600,1257040800,1268532e3,1289095200,1299981600,1320544800,1331431200,1351994400,1362880800,1383444e3,1394330400,1414893600,142578e4,1446343200,1457834400,1478397600,1489284e3,1509847200,1520733600,1541296800,1552183200,1572746400,1583632800,1604196e3,1615687200,1636250400,1647136800,16677e5,1678586400,1699149600,1710036e3,1730599200,1741485600,1762048800,1772935200,1793498400,1804989600,1825552800,1836439200,1857002400,1867888800,1888452e3,1899338400,1919901600,1930788e3], +offset:[-17762,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3]},"America/Los_Angeles":{ +time:[-2717668378,-1633298400,-1615154400,-1601848800,-1583704800,-880236e3,-769420800,-765410400,-687995940,-662680800,-620866800,-608162400,-589417200,-576108e3,-557967600,-544658400,-526518e3,-513208800,-495068400,-481759200,-463618800,-450309600,-431564400,-418255200,-400114800,-386805600,-368665200,-355356e3,-337215600,-323906400,-305766e3,-292456800,-273711600,-261007200,-242262e3,-226533600,-210812400,-195084e3,-179362800,-163634400,-147913200,-13158e4,-116463600,-100130400,-84405600,-68680800,-52956e3,-37231200,-21506400,-5781600,9943200,25668e3,41392800,57722400,73447200,89172e3,104896800,120621600,126669600,152071200,162352800,183520800,199245600,215575200,230695200,247024800,262749600,278474400,294199200,309924e3,325648800,341373600,357098400,372823200,388548e3,404877600,419997600,436327200,452052e3,467776800,483501600,499226400,514951200,530676e3,544586400,562125600,576036e3,59418e4,607485600,625629600,638935200,657079200,670989600,688528800,702439200,719978400,733888800,752032800,765338400,783482400,796788e3,814932e3,828842400,846381600,860292e3,877831200,891741600,909280800,923191200,941335200,954640800,972784800,986090400,1004234400,1018144800,1035684e3,1049594400,1067133600,1081044e3,1099188e3,1112493600,1130637600,1143943200,1162087200,1173578400,1194141600,1205028e3,1225591200,1236477600,1257040800,1268532e3,1289095200,1299981600,1320544800,1331431200,1351994400,1362880800,1383444e3,1394330400,1414893600,142578e4,1446343200,1457834400,1478397600,1489284e3,1509847200,1520733600,1541296800,1552183200,1572746400,1583632800,1604196e3,1615687200,1636250400,1647136800,16677e5,1678586400,1699149600,1710036e3,1730599200,1741485600,1762048800,1772935200,1793498400,1804989600,1825552800,1836439200,1857002400,1867888800,1888452e3,1899338400,1919901600,1930788e3],offset:[-28378,-28800,-25200,-28800,-25200,-28800,-25200,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800]},"America/Chicago":{ +time:[-2717668236,-1633298400,-1615154400,-1601848800,-1583704800,-1563746400,-1551650400,-1538949600,-1520200800,-1504476e3,-1491775200,-1473026400,-1459720800,-1441576800,-1428271200,-1410127200,-1396821600,-1378677600,-1365372e3,-1347228e3,-1333922400,-1315173600,-1301868e3,-1283724e3,-1270418400,-1252274400,-1238968800,-1220824800,-1207519200,-1189375200,-1176069600,-1157320800,-114462e4,-1125871200,-1112565600,-1094421600,-1081116e3,-1067810400,-1045432800,-1031522400,-1018216800,-1000072800,-986767200,-968018400,-955317600,-936568800,-923263200,-905119200,-891813600,-880236e3,-769413600,-765410400,-747266400,-733960800,-715816800,-702511200,-684367200,-671061600,-652917600,-639612e3,-620863200,-608162400,-589413600,-576108e3,-557964e3,-544658400,-526514400,-513208800,-495064800,-481759200,-463615200,-447285600,-431560800,-415836e3,-400111200,-384386400,-368661600,-352936800,-337212e3,-321487200,-305762400,-289432800,-273708e3,-257983200,-242258400,-226533600,-210808800,-195084e3,-179359200,-163634400,-147909600,-13158e4,-11646e4,-100130400,-84405600,-68680800,-52956e3,-37231200,-21506400,-5781600,9943200,25668e3,41392800,57722400,73447200,89172e3,104896800,120621600,126669600,152071200,162352800,183520800,199245600,215575200,230695200,247024800,262749600,278474400,294199200,309924e3,325648800,341373600,357098400,372823200,388548e3,404877600,419997600,436327200,452052e3,467776800,483501600,499226400,514951200,530676e3,544586400,562125600,576036e3,59418e4,607485600,625629600,638935200,657079200,670989600,688528800,702439200,719978400,733888800,752032800,765338400,783482400,796788e3,814932e3,828842400,846381600,860292e3,877831200,891741600,909280800,923191200,941335200,954640800,972784800,986090400,1004234400,1018144800,1035684e3,1049594400,1067133600,1081044e3,1099188e3,1112493600,1130637600,1143943200,1162087200,1173578400,1194141600,1205028e3,1225591200,1236477600,1257040800,1268532e3,1289095200,1299981600,1320544800,1331431200,1351994400,1362880800,1383444e3,1394330400,1414893600,142578e4,1446343200,1457834400,1478397600,1489284e3,1509847200,1520733600,1541296800,1552183200,1572746400,1583632800,1604196e3,1615687200,1636250400,1647136800,16677e5,1678586400,1699149600,1710036e3,1730599200,1741485600,1762048800,1772935200,1793498400,1804989600,1825552800,1836439200,1857002400,1867888800,1888452e3,1899338400,1919901600,1930788e3], +offset:[-21036,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600]},"America/Phoenix":{time:[-2717670498,-1633298400,-1615154400,-1601848800,-1583704800,-880236e3,-820540740,-812678340,-796867140,-84405600,-68680800,1924966800],offset:[-26898,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200]},"America/Toronto":{ +time:[-2366755200,-1632088800,-1615154400,-1601771400,-1583712e3,-1567375200,-1554681600,-1534716e3,-1524088800,-1503266400,-149238e4,-1471816800,-1460930400,-1440972e3,-1428876e3,-1409522400,-1397426400,-1378072800,-1365976800,-1346623200,-1333922400,-1315173600,-1301868e3,-1283724e3,-1270418400,-1252274400,-1238968800,-1220824800,-1207519200,-1188770400,-1176069600,-1157320800,-1144015200,-1125871200,-1112565600,-1094421600,-1081116e3,-1062972e3,-1049666400,-1031522400,-1018216800,-1000072800,-986767200,-968018400,-955317600,-936568800,-880232400,-76941e4,-765410400,-747266400,-733960800,-715824e3,-702518400,-684374400,-671068800,-652924800,-634176e3,-620863200,-602719200,-589413600,-576108e3,-557964e3,-544658400,-526514400,-513208800,-495064800,-481759200,-463615200,-450309600,-431560800,-418255200,-400111200,-384386400,-368661600,-352936800,-337212e3,-321487200,-305762400,-289432800,-273708e3,-257983200,-242258400,-226533600,-210808800,-195084e3,-179359200,-163634400,-147909600,-13158e4,-11646e4,-100130400,-84405600,-68680800,-52956e3,-37231200,-21506400,-5781600,9943200,25668e3,41392800,57722400,73447200,89172e3,104896800,120621600,136346400,152071200,167796e3,183520800,199245600,215575200,230695200,247024800,262749600,278474400,294199200,309924e3,325648800,341373600,357098400,372823200,388548e3,404877600,419997600,436327200,452052e3,467776800,483501600,499226400,514951200,530676e3,544586400,562125600,576036e3,59418e4,607485600,625629600,638935200,657079200,670989600,688528800,702439200,719978400,733888800,752032800,765338400,783482400,796788e3,814932e3,828842400,846381600,860292e3,877831200,891741600,909280800,923191200,941335200,954640800,972784800,986090400,1004234400,1018144800,1035684e3,1049594400,1067133600,1081044e3,1099188e3,1112493600,1130637600,1143943200,1162087200,1173578400,1194141600,1205028e3,1225591200,1236477600,1257040800,1268532e3,1289095200,1299981600,1320544800,1331431200,1351994400,1362880800,1383444e3,1394330400,1414893600,142578e4,1446343200,1457834400,1478397600,1489284e3,1509847200,1520733600,1541296800,1552183200,1572746400,1583632800,1604196e3,1615687200,1636250400,1647136800,16677e5,1678586400,1699149600,1710036e3,1730599200,1741485600,1762048800,1772935200,1793498400,1804989600,1825552800,1836439200,1857002400,1867888800,1888452e3,1899338400,1919901600,1930788e3], +offset:[-19052,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-14400,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3]},"America/Vancouver":{ +time:[-2713910400,-1632088800,-1615154400,-880236e3,-769420800,-765410400,-747266400,-733960800,-715816800,-702511200,-684367200,-671061600,-652917600,-639612e3,-620863200,-608162400,-589413600,-576108e3,-557964e3,-544658400,-526514400,-513208800,-495064800,-481759200,-463615200,-450309600,-431560800,-418255200,-400111200,-386805600,-368661600,-355356e3,-337212e3,-323906400,-305762400,-292456800,-273708e3,-261007200,-242258400,-226533600,-210808800,-195084e3,-179359200,-163634400,-147909600,-13158e4,-11646e4,-100130400,-84405600,-68680800,-52956e3,-37231200,-21506400,-5781600,9943200,25668e3,41392800,57722400,73447200,89172e3,104896800,120621600,136346400,152071200,167796e3,183520800,199245600,215575200,230695200,247024800,262749600,278474400,294199200,309924e3,325648800,341373600,357098400,372823200,388548e3,404877600,419997600,436327200,452052e3,467776800,483501600,499226400,514951200,530676e3,544586400,562125600,576036e3,59418e4,607485600,625629600,638935200,657079200,670989600,688528800,702439200,719978400,733888800,752032800,765338400,783482400,796788e3,814932e3,828842400,846381600,860292e3,877831200,891741600,909280800,923191200,941335200,954640800,972784800,986090400,1004234400,1018144800,1035684e3,1049594400,1067133600,1081044e3,1099188e3,1112493600,1130637600,1143943200,1162087200,1173578400,1194141600,1205028e3,1225591200,1236477600,1257040800,1268532e3,1289095200,1299981600,1320544800,1331431200,1351994400,1362880800,1383444e3,1394330400,1414893600,142578e4,1446343200,1457834400,1478397600,1489284e3,1509847200,1520733600,1541296800,1552183200,1572746400,1583632800,1604196e3,1615687200,1636250400,1647136800,16677e5,1678586400,1699149600,1710036e3,1730599200,1741485600,1762048800,1772935200,1793498400,1804989600,1825552800,1836439200,1857002400,1867888800,1888452e3,1899338400,1919901600,1930788e3], +offset:[-29548,-28800,-25200,-28800,-25200,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800]},"America/Argentina/Buenos_Aires":{time:[-2372112e3,-1567468800,-1233446400,-1222992e3,-1205971200,-1194048e3,-117288e4,-1162512e3,-1141344e3,-1130976e3,-1109808e3,-109944e4,-1078272e3,-1067817600,-1046649600,-1036281600,-1015113600,-1004745600,-983577600,-973209600,-952041600,-941587200,-931046400,-900892800,-890352e3,-83376e4,-82728e4,-752284800,-733795200,-197337600,-190857600,-184204800,-164505600,-152668800,-132969600,-121132800,-101433600,-86832e3,-71107200,-54777600,-39052800,-23328e3,-7603200,128131200,136598400,596937600,605059200,624412800,636508800,656467200,667958400,687916800,699408e3,719366400,731462400,938908800,952041600,1198972800,1205625600,1224374400,1237075200,1924981200],offset:[-14028,-15408,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-10800,-10800,-7200,-10800,-7200,-10800]},"America/El_Salvador":{time:[-1546300800,546998400,559699200,578448e3,591148800,1924970400],offset:[-21408,-21600,-18e3,-21600,-18e3,-21600]},"America/Sao_Paulo":{ +time:[-1767225600,-1206968400,-1191369600,-1175385600,-1159833600,-633830400,-622076400,-602294400,-59184e4,-570758400,-560217600,-539136e3,-53136e4,-195436800,-184204800,-155174400,-150076800,-128908800,-121132800,-99964800,-89596800,-68428800,-57974400,499737600,511228800,530582400,540259200,562118400,571190400,592963200,602035200,624412800,634694400,656467200,666748800,687916800,697593600,719971200,728438400,750816e3,761702400,782265600,793152e3,813715200,823996800,84456e4,856051200,876096e3,888710400,908064e3,919555200,938908800,951609600,970963200,982454400,1003017600,1013904e3,1036281600,1045353600,1066521600,1076803200,1099353600,1108857600,1129420800,1140307200,1162684800,1172361600,119232e4,1203206400,1224374400,1234656e3,1255824e3,1266710400,1287273600,129816e4,1318723200,1330214400,1350777600,1361059200,1382227200,1392508800,1413676800,1424563200,1445126400,1456012800,1476576e3,1487462400,1508025600,1518912e3,1541289600,1550361600,1924981200],offset:[-11188,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800]},"America/Bogota":{time:[-2707689600,-1739059200,704851200,733881600,1924974e3],offset:[-17776,-17776,-18e3,-14400,-18e3]},"America/Caracas":{time:[-2524521600,-1826755200,-157766400,1197169200,1462069800,1924977600],offset:[-16064,-16060,-16200,-14400,-16200,-14400]},"Europe/Moscow":{time:[-2840140800,-1688256e3,-165681e4,-1641340800,-1627956e3,-1618700400,-1596416400,-1593804521,-1589846400,-1542416400,-1539478800,-1525305600,-1522713600,-1491177600,-1247529600,354931200,370742400,386467200,402278400,418003200,433814400,449625600,465361200,481082400,496810800,512532e3,528260400,543981600,55971e4,575431200,591159600,606880800,622609200,638330400,654663600,670384800,686113200,695786400,701834400,717562800,733284e3,749012400,764733600,780462e3,796183200,811911600,828237600,846385200,859687200,877834800,891136800,909284400,922586400,941338800,954036e3,972788400,985485600,1004238e3,101754e4,1035687600,1048989600,1067137200,1080439200,1099191600,1111888800,1130641200,1143338400,1162090800,1174788e3,1193540400,1206842400,122499e4,1238292e3,1256439600,1269741600,1288494e3,1301191200,1414288800,1925002800], +offset:[9017,9017,9079,12679,9079,16279,12679,16279,14400,10800,14400,18e3,14400,10800,7200,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,10800,7200,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800]},"Europe/Athens":{time:[-2344636800,-1686095940,-1182988800,-1178150400,-906854400,-904867200,-85725e4,-844473600,-828230400,-812419200,-552355200,-541641600,166492800,186195600,198036e3,213764400,228880800,244090800,260330400,275457600,291805200,307418400,323395200,338947200,354682800,370411200,386132400,401860800,417582e3,433310400,449031600,465364800,481086e3,496814400,512535600,528264e3,543985200,559713600,575434800,591163200,606884400,622612800,638334e3,654667200,670388400,686116800,701838e3,717566400,733287600,749016e3,764737200,780465600,796186800,811915200,828241200,846388800,859690800,877838400,891140400,909288e3,92259e4,941342400,954039600,972792e3,985489200,1004241600,1017543600,1035691200,1048993200,1067140800,1080442800,1099195200,1111892400,1130644800,1143342e3,1162094400,1174791600,1193544e3,1206846e3,1224993600,1238295600,1256443200,1269745200,1288497600,1301194800,1319947200,1332644400,1351396800,1364698800,1382846400,1396148400,1414296e3,1427598e3,1445745600,1459047600,14778e5,1490497200,1509249600,1521946800,1540699200,1554001200,1572148800,1585450800,1603598400,1616900400,1635652800,164835e4,1667102400,1679799600,1698552e3,1711854e3,1730001600,1743303600,1761451200,1774753200,1792900800,1806202800,1824955200,1837652400,1856404800,1869102e3,1887854400,1901156400,1919304e3,1932606e3],offset:[5692,5692,7200,10800,7200,10800,7200,3600,7200,3600,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200]},"Europe/Belgrade":{ +time:[-2713910400,-905821200,-85725e4,-844552800,-828219600,-812498400,-79677e4,-777938400,-766616400,417578400,433306800,449028e3,465361200,481082400,496810800,512532e3,528260400,543981600,55971e4,575431200,591159600,606880800,622609200,638330400,654663600,670384800,686113200,701834400,717562800,733284e3,749012400,764733600,780462e3,796183200,811911600,828237600,846385200,859687200,877834800,891136800,909284400,922586400,941338800,954036e3,972788400,985485600,1004238e3,101754e4,1035687600,1048989600,1067137200,1080439200,1099191600,1111888800,1130641200,1143338400,1162090800,1174788e3,1193540400,1206842400,122499e4,1238292e3,1256439600,1269741600,1288494e3,1301191200,1319943600,1332640800,1351393200,1364695200,1382842800,1396144800,1414292400,1427594400,1445742e3,1459044e3,1477796400,1490493600,1509246e3,1521943200,1540695600,1553997600,1572145200,1585447200,1603594800,1616896800,1635649200,1648346400,1667098800,1679796e3,1698548400,1711850400,1729998e3,17433e5,1761447600,1774749600,1792897200,1806199200,1824951600,1837648800,1856401200,1869098400,1887850800,1901152800,1919300400,1932602400],offset:[4920,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600]},"Europe/Berlin":{time:[-2422051200,-1693702800,-1680476400,-1663452e3,-1650142800,-1632002400,-1618693200,-938901600,-85725e4,-844552800,-828219600,-812498400,-79677e4,-781048800,-776556e3,-765925200,-761173200,-748476e3,-733266e3,-717627600,-714603600,-71037e4,-701902800,-684972e3,-670453200,-654127200,-639003600,323834400,338958e3,354679200,370407600,386128800,401857200,417578400,433306800,449028e3,465361200,481082400,496810800,512532e3,528260400,543981600,55971e4,575431200,591159600,606880800,622609200,638330400,654663600,670384800,686113200,701834400,717562800,733284e3,749012400,764733600,780462e3,796183200,811911600,828237600,846385200,859687200,877834800,891136800,909284400,922586400,941338800,954036e3,972788400,985485600,1004238e3,101754e4,1035687600,1048989600,1067137200,1080439200,1099191600,1111888800,1130641200,1143338400,1162090800,1174788e3,1193540400,1206842400,122499e4,1238292e3,1256439600,1269741600,1288494e3,1301191200,1319943600,1332640800,1351393200,1364695200,1382842800,1396144800,1414292400,1427594400,1445742e3,1459044e3,1477796400,1490493600,1509246e3,1521943200,1540695600,1553997600,1572145200,1585447200,1603594800,1616896800,1635649200,1648346400,1667098800,1679796e3,1698548400,1711850400,1729998e3,17433e5,1761447600,1774749600,1792897200,1806199200,1824951600,1837648800,1856401200,1869098400,1887850800,1901152800,1919300400,1932602400], +offset:[3208,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,10800,7200,3600,7200,3600,7200,10800,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600]},"Europe/London":{ +time:[-3852662400,-1691964e3,-1680469200,-1664143200,-1650142800,-1633903200,-1617483600,-1601848800,-1586034e3,-1570399200,-1552165200,-1538344800,-152253e4,-15075e5,-1490562e3,-1473631200,-1460926800,-1442786400,-1428872400,-1410732e3,-1396213200,-1379282400,-1364763600,-1348437600,-1333314e3,-1315778400,-1301259600,-1284328800,-126981e4,-1253484e3,-1238360400,-1221429600,-1206910800,-118998e4,-1175461200,-1159135200,-1143406800,-1126476e3,-1111957200,-1095631200,-1080507600,-1063576800,-1049058e3,-1032127200,-1017608400,-1001282400,-986158800,-969228e3,-950475600,-942012e3,-904514400,-896043600,-875484e3,-864594e3,-844034400,-832539600,-812584800,-798066e3,-781048800,-772059600,-764802e3,-748476e3,-733352400,-719445600,-717026400,-706741200,-699483600,-687996e3,-668034e3,-654732e3,-636584400,-622072800,-605739600,-590623200,-57429e4,-558568800,-542235600,-527119200,-512600400,-496274400,-481150800,-46422e4,-449701200,-432165600,-417646800,-401320800,-386197200,-369266400,-354747600,-337816800,-323298e3,-306972e3,-291848400,-276732e3,-257979600,-245282400,-22653e4,-213228e3,-195080400,-182383200,-163630800,-150933600,-132181200,-119484e3,-100731600,-88034400,-68677200,-59004e3,-37238400,57726e3,69818400,89175600,101268e3,120625200,132717600,152074800,164167200,183524400,196221600,214974e3,227671200,246423600,259120800,278478e3,290570400,309927600,32202e4,341377200,354675600,372823200,386125200,404272800,417574800,435722400,449024400,467776800,481078800,499226400,512528400,530676e3,543978e3,562125600,575427600,593575200,606877200,625629600,638326800,657079200,670381200,688528800,701830800,719978400,733280400,751428e3,76473e4,782877600,796179600,814327200,828234e3,846381600,859683600,877831200,891133200,909280800,922582800,941335200,954032400,972784800,985482e3,1004234400,1017536400,1035684e3,1048986e3,1067133600,1080435600,1099188e3,1111885200,1130637600,1143334800,1162087200,1174784400,1193536800,1206838800,1224986400,1238288400,1256436e3,1269738e3,1288490400,1301187600,131994e4,1332637200,1351389600,1364691600,1382839200,1396141200,1414288800,1427590800,1445738400,1459040400,1477792800,149049e4,1509242400,1521939600,1540692e3,1553994e3,1572141600,1585443600,1603591200,1616893200,1635645600,1648342800,1667095200,1679792400,1698544800,1711846800,1729994400,1743296400,1761444e3,1774746e3,1792893600,1806195600,1824948e3,1837645200,1856397600,1869094800,1887847200,1901149200,1919296800,1932598800], +offset:[-75,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,0,3600,0,3600,7200,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0]},"Europe/Luxembourg":{time:[-2069712e3,-1692493200,-1680476400,-1662339600,-165015e4,-1632002400,-1618693200,-1612656e3,-1604278800,-1585515600,-1574038800,-1552255200,-1539997200,-1520546400,-1507510800,-1490569200,-1473642e3,-1459116e3,-1444006800,-142767e4,-1411866e3,-1396220400,-1379293200,-1364770800,-1348448400,-1333321200,-1316394e3,-1301266800,-1284339600,-126981e4,-1253484e3,-1238360400,-1221429600,-1206910800,-1191189600,-1175461200,-1160344800,-1143406800,-1127685600,-1111957200,-1096840800,-1080507600,-1063576800,-1049058e3,-1033336800,-1017608400,-1002492e3,-986158800,-969228e3,-950475600,-942012e3,-935182800,-85725e4,-844552800,-828219600,-812498400,-797979600,-781048800,-766616400,-745452e3,-733266e3,228880800,244004400,260330400,276058800,29178e4,307508400,323834400,338958e3,354679200,370407600,386128800,401857200,417578400,433306800,449028e3,465361200,481082400,496810800,512532e3,528260400,543981600,55971e4,575431200,591159600,606880800,622609200,638330400,654663600,670384800,686113200,701834400,717562800,733284e3,749012400,764733600,780462e3,796183200,811911600,828237600,846385200,859687200,877834800,891136800,909284400,922586400,941338800,954036e3,972788400,985485600,1004238e3,101754e4,1035687600,1048989600,1067137200,1080439200,1099191600,1111888800,1130641200,1143338400,1162090800,1174788e3,1193540400,1206842400,122499e4,1238292e3,1256439600,1269741600,1288494e3,1301191200,1319943600,1332640800,1351393200,1364695200,1382842800,1396144800,1414292400,1427594400,1445742e3,1459044e3,1477796400,1490493600,1509246e3,1521943200,1540695600,1553997600,1572145200,1585447200,1603594800,1616896800,1635649200,1648346400,1667098800,1679796e3,1698548400,1711850400,1729998e3,17433e5,1761447600,1774749600,1792897200,1806199200,1824951600,1837648800,1856401200,1869098400,1887850800,1901152800,1919300400,1932602400], +offset:[1476,3600,7200,3600,7200,3600,7200,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600]},"Europe/Madrid":{time:[-2177453684,-1631926800,-1616886e3,-1601168400,-158535e4,-1442451600,-142767e4,-1379293200,-1364770800,-1348448400,-1333321200,-1316390400,-1301266800,-1284339600,-1269817200,-1026954e3,-1017615600,-1001898e3,-999478800,-986083200,-951433200,-940208400,-873075600,-862614e3,-842835600,-828313200,-811386e3,-796863600,-779936400,-765414e3,-748486800,-733964400,-652323600,-639010800,135126e3,150253200,166575600,181702800,196815600,212547600,22887e4,243997200,260330400,276058800,29178e4,307508400,323834400,338958e3,354679200,370407600,386128800,401857200,417578400,433306800,449028e3,465361200,481082400,496810800,512532e3,528260400,543981600,55971e4,575431200,591159600,606880800,622609200,638330400,654663600,670384800,686113200,701834400,717562800,733284e3,749012400,764733600,780462e3,796183200,811911600,828237600,846385200,859687200,877834800,891136800,909284400,922586400,941338800,954036e3,972788400,985485600,1004238e3,101754e4,1035687600,1048989600,1067137200,1080439200,1099191600,1111888800,1130641200,1143338400,1162090800,1174788e3,1193540400,1206842400,122499e4,1238292e3,1256439600,1269741600,1288494e3,1301191200,1319943600,1332640800,1351393200,1364695200,1382842800,1396144800,1414292400,1427594400,1445742e3,1459044e3,1477796400,1490493600,1509246e3,1521943200,1540695600,1553997600,1572145200,1585447200,1603594800,1616896800,1635649200,1648346400,1667098800,1679796e3,1698548400,1711850400,1729998e3,17433e5,1761447600,1774749600,1792897200,1806199200,1824951600,1837648800,1856401200,1869098400,1887850800,1901152800,1919300400,1932602400], +offset:[-884,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,7200,3600,0,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600]},"Europe/Paris":{time:[-2486678340,-1855958340,-1689814800,-1680393600,-1665363600,-1648339200,-1635123600,-1616889600,-1604278800,-158544e4,-1574038800,-1552262400,-1539997200,-1520553600,-1507510800,-1490572800,-1470618e3,-1459123200,-1444006800,-1427673600,-1411952400,-1396224e3,-1379293200,-1364774400,-1348448400,-1333324800,-1316394e3,-1301270400,-1284339600,-1269820800,-1253494800,-1238371200,-1221440400,-1206921600,-1191200400,-1175472e3,-1160355600,-1143417600,-1127696400,-1111968e3,-1096851600,-1080518400,-1063587600,-1049068800,-1033347600,-1017619200,-1002502800,-986169600,-969238800,-950486400,-942012e3,-932432400,-85725e4,-844552800,-828219600,-812498400,-800064e3,-796258800,-781048800,-766616400,196822800,212547600,228880800,244004400,260330400,276058800,29178e4,307508400,323834400,338958e3,354679200,370407600,386128800,401857200,417578400,433306800,449028e3,465361200,481082400,496810800,512532e3,528260400,543981600,55971e4,575431200,591159600,606880800,622609200,638330400,654663600,670384800,686113200,701834400,717562800,733284e3,749012400,764733600,780462e3,796183200,811911600,828237600,846385200,859687200,877834800,891136800,909284400,922586400,941338800,954036e3,972788400,985485600,1004238e3,101754e4,1035687600,1048989600,1067137200,1080439200,1099191600,1111888800,1130641200,1143338400,1162090800,1174788e3,1193540400,1206842400,122499e4,1238292e3,1256439600,1269741600,1288494e3,1301191200,1319943600,1332640800,1351393200,1364695200,1382842800,1396144800,1414292400,1427594400,1445742e3,1459044e3,1477796400,1490493600,1509246e3,1521943200,1540695600,1553997600,1572145200,1585447200,1603594800,1616896800,1635649200,1648346400,1667098800,1679796e3,1698548400,1711850400,1729998e3,17433e5,1761447600,1774749600,1792897200,1806199200,1824951600,1837648800,1856401200,1869098400,1887850800,1901152800,1919300400,1932602400], +offset:[561,561,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,7200,3600,7200,3600,7200,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600]},"Europe/Rome":{time:[-3252096e3,-2403562204,-1690761600,-168048e4,-1664755200,-1648944e3,-163512e4,-1616889600,-1604275200,-1585526400,-1571011200,-1555286400,-932428800,-85725e4,-844552800,-828219600,-812498400,-798066e3,-781048800,-76671e4,-750895200,-733352400,-719452800,-70191e4,-689205600,-670453200,-114048e3,-103161600,-81993600,-71708400,-50544e3,-40258800,-18489600,-8204400,1296e4,23245200,43804800,54694800,75859200,86749200,107913600,118198800,138758400,149648400,170812800,181098e3,202262400,212547600,233107200,243997200,265161600,276051600,296611200,307501200,323834400,338958e3,354679200,370407600,386128800,401857200,417578400,433306800,449028e3,465361200,481082400,496810800,512532e3,528260400,543981600,55971e4,575431200,591159600,606880800,622609200,638330400,654663600,670384800,686113200,701834400,717562800,733284e3,749012400,764733600,780462e3,796183200,811911600,828237600,846385200,859687200,877834800,891136800,909284400,922586400,941338800,954036e3,972788400,985485600,1004238e3,101754e4,1035687600,1048989600,1067137200,1080439200,1099191600,1111888800,1130641200,1143338400,1162090800,1174788e3,1193540400,1206842400,122499e4,1238292e3,1256439600,1269741600,1288494e3,1301191200,1319943600,1332640800,1351393200,1364695200,1382842800,1396144800,1414292400,1427594400,1445742e3,1459044e3,1477796400,1490493600,1509246e3,1521943200,1540695600,1553997600,1572145200,1585447200,1603594800,1616896800,1635649200,1648346400,1667098800,1679796e3,1698548400,1711850400,1729998e3,17433e5,1761447600,1774749600,1792897200,1806199200,1824951600,1837648800,1856401200,1869098400,1887850800,1901152800,1919300400,1932602400], +offset:[2996,2996,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600]},"Europe/Warsaw":{time:[-2840140800,-1717027200,-1693702800,-1680476400,-1663452e3,-1650142800,-1632002400,-1618693200,-1600466400,-1587157200,-1501718400,-931730400,-85725e4,-844552800,-828219600,-812498400,-796600800,-778723200,-762652800,-748483200,-733266e3,-715212e3,-701902800,-684972e3,-670453200,-654127200,-639003600,-397090800,-386805600,-371084400,-355356e3,-334191600,-323301600,-307580400,-291852e3,-271292400,-260402400,-239842800,-228952800,-208393200,-197503200,-176338800,-166053600,228877200,244000800,260326800,276055200,291776400,307504800,323830800,338954400,354675600,370404e3,386125200,401853600,417574800,433303200,449024400,465357600,481078800,496807200,512528400,528256800,543978e3,559706400,575431200,591159600,606880800,622609200,638330400,654663600,670384800,686113200,701834400,717562800,733284e3,749012400,764733600,780462e3,796183200,811911600,828237600,846385200,859687200,877834800,891136800,909284400,922586400,941338800,954036e3,972788400,985485600,1004238e3,101754e4,1035687600,1048989600,1067137200,1080439200,1099191600,1111888800,1130641200,1143338400,1162090800,1174788e3,1193540400,1206842400,122499e4,1238292e3,1256439600,1269741600,1288494e3,1301191200,1319943600,1332640800,1351393200,1364695200,1382842800,1396144800,1414292400,1427594400,1445742e3,1459044e3,1477796400,1490493600,1509246e3,1521943200,1540695600,1553997600,1572145200,1585447200,1603594800,1616896800,1635649200,1648346400,1667098800,1679796e3,1698548400,1711850400,1729998e3,17433e5,1761447600,1774749600,1792897200,1806199200,1824951600,1837648800,1856401200,1869098400,1887850800,1901152800,1919300400,1932602400], +offset:[5040,5040,3600,7200,3600,7200,3600,7200,7200,10800,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600]},"Europe/Istanbul":{time:[-2840140800,-1869868800,-1693699200,-168048e4,-1570406400,-1552176e3,-1538352e3,-1522540800,-1507507200,-1490572800,-1440201600,-1428019200,-1409702400,-1396483200,-931046400,-922665600,-917827200,-892425600,-875836800,-764726400,-744336e3,-733795200,-716428800,-701913600,-684979200,-670464e3,-654134400,-639014400,-62208e4,-60696e4,-590025600,-575510400,-235612800,-194832e3,-177724800,-165715200,107917200,121226400,133927200,152676e3,164685600,184125600,196221600,215575200,228880800,245815200,260330400,267926400,428464800,433908e3,468122400,482806800,496720800,512528400,528256800,543978e3,559706400,575427600,591156e3,606877200,622605600,638326800,65466e4,670381200,686109600,701830800,717559200,733280400,749008800,764125200,780458400,796179600,811908e3,828234e3,846381600,859683600,877831200,891133200,909280800,922582800,941335200,954032400,972784800,985482e3,1004234400,1017536400,1035684e3,1048986e3,1067133600,1080435600,1099188e3,1111885200,1130637600,1143334800,1162087200,1174791600,1193544e3,1206846e3,1224993600,1238295600,1256443200,1269745200,1288497600,1301281200,1319947200,1332644400,1351396800,1364698800,1382846400,1396234800,1414296e3,1427598e3,1446955200,1459047600,1473206400,1925002800],offset:[6952,7016,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,10800,14400,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,10800]},"Europe/Zurich":{ +time:[-3675196800,-2385244800,-904431600,-891122400,-872982e3,-859672800,354679200,370407600,386128800,401857200,417578400,433306800,449028e3,465361200,481082400,496810800,512532e3,528260400,543981600,55971e4,575431200,591159600,606880800,622609200,638330400,654663600,670384800,686113200,701834400,717562800,733284e3,749012400,764733600,780462e3,796183200,811911600,828237600,846385200,859687200,877834800,891136800,909284400,922586400,941338800,954036e3,972788400,985485600,1004238e3,101754e4,1035687600,1048989600,1067137200,1080439200,1099191600,1111888800,1130641200,1143338400,1162090800,1174788e3,1193540400,1206842400,122499e4,1238292e3,1256439600,1269741600,1288494e3,1301191200,1319943600,1332640800,1351393200,1364695200,1382842800,1396144800,1414292400,1427594400,1445742e3,1459044e3,1477796400,1490493600,1509246e3,1521943200,1540695600,1553997600,1572145200,1585447200,1603594800,1616896800,1635649200,1648346400,1667098800,1679796e3,1698548400,1711850400,1729998e3,17433e5,1761447600,1774749600,1792897200,1806199200,1824951600,1837648800,1856401200,1869098400,1887850800,1901152800,1919300400,1932602400],offset:[2048,1786,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600]},"Australia/Sydney":{time:[-2364076800,-1672531140,-1665352800,-883605600,-876088800,-860364e3,-844639200,-828309600,-813189600,57722400,68007600,89172e3,100062e3,120621600,131511600,152071200,162961200,183520800,195015600,215575200,226465200,247024800,257914800,278474400,289364400,309924e3,320814e3,341373600,352263600,372823200,386737200,404877600,415767600,436327200,447217200,467776800,478666800,499226400,511326e3,530071200,542775600,562125600,57483e4,59418e4,606279600,625629600,636519600,657079200,667969200,688528800,699418800,719978400,731473200,752032800,762922800,783482400,794372400,814932e3,828241200,846381600,859690800,877831200,891140400,909280800,92259e4,941335200,954039600,967341600,985489200,1004234400,1017543600,1035684e3,1048993200,1067133600,1080442800,1099188e3,1111892400,1130637600,1143946800,1162087200,1174791600,1193536800,1207450800,1223172e3,1238900400,1254621600,127035e4,1286071200,1301799600,1317520800,1333249200,1349575200,1365303600,1381024800,1396753200,1412474400,1428202800,1443924e3,1459652400,1475373600,1491102e3,1506823200,1522551600,1538877600,1554606e3,1570327200,1586055600,1601776800,1617505200,1633226400,1648954800,1664676e3,1680404400,1696125600,1712458800,172818e4,1743908400,1759629600,1775358e3,1791079200,1806807600,1822528800,1838257200,1853978400,1869706800,1886032800,1901761200,1917482400,1933210800], +offset:[36292,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600]},"Australia/Brisbane":{time:[-2366755200,-1672531140,-1665352800,-883605600,-876088800,-860364e3,-844639200,-828309600,-813189600,57722400,68007600,625629600,636519600,657079200,667969200,688528800,699418800,1925028e3],offset:[36728,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3]},"Australia/Adelaide":{time:[-2364076800,-2230156800,-1672531140,-1665352800,-883605600,-876088800,-860364e3,-844639200,-828309600,-813189600,57722400,68007600,89172e3,100062e3,120621600,131511600,152071200,162961200,183520800,195015600,215575200,226465200,247024800,257914800,278474400,289364400,309924e3,320814e3,341373600,352263600,372823200,384318e3,404877600,415767600,436327200,447217200,467776800,478666800,499226400,511326e3,530071200,542775600,562125600,57483e4,59418e4,606279600,625629600,637729200,657079200,667969200,688528800,701233200,719978400,731473200,752032800,764132400,783482400,796186800,814932e3,828241200,846381600,859690800,877831200,891140400,909280800,92259e4,941335200,954039600,972784800,985489200,1004234400,1017543600,1035684e3,1048993200,1067133600,1080442800,1099188e3,1111892400,1130637600,1143946800,1162087200,1174791600,1193536800,1207450800,1223172e3,1238900400,1254621600,127035e4,1286071200,1301799600,1317520800,1333249200,1349575200,1365303600,1381024800,1396753200,1412474400,1428202800,1443924e3,1459652400,1475373600,1491102e3,1506823200,1522551600,1538877600,1554606e3,1570327200,1586055600,1601776800,1617505200,1633226400,1648954800,1664676e3,1680404400,1696125600,1712458800,172818e4,1743908400,1759629600,1775358e3,1791079200,1806807600,1822528800,1838257200,1853978400,1869706800,1886032800,1901761200,1917482400,1933210800], +offset:[33260,32400,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800]},"Australia/ACT":{time:[-2364076800,-1672531140,-1665352800,-883605600,-876088800,-860364e3,-844639200,-828309600,-813189600,57722400,68007600,89172e3,100062e3,120621600,131511600,152071200,162961200,183520800,195015600,215575200,226465200,247024800,257914800,278474400,289364400,309924e3,320814e3,341373600,352263600,372823200,386737200,404877600,415767600,436327200,447217200,467776800,478666800,499226400,511326e3,530071200,542775600,562125600,57483e4,59418e4,606279600,625629600,636519600,657079200,667969200,688528800,699418800,719978400,731473200,752032800,762922800,783482400,794372400,814932e3,828241200,846381600,859690800,877831200,891140400,909280800,92259e4,941335200,954039600,967341600,985489200,1004234400,1017543600,1035684e3,1048993200,1067133600,1080442800,1099188e3,1111892400,1130637600,1143946800,1162087200,1174791600,1193536800,1207450800,1223172e3,1238900400,1254621600,127035e4,1286071200,1301799600,1317520800,1333249200,1349575200,1365303600,1381024800,1396753200,1412474400,1428202800,1443924e3,1459652400,1475373600,1491102e3,1506823200,1522551600,1538877600,1554606e3,1570327200,1586055600,1601776800,1617505200,1633226400,1648954800,1664676e3,1680404400,1696125600,1712458800,172818e4,1743908400,1759629600,1775358e3,1791079200,1806807600,1822528800,1838257200,1853978400,1869706800,1886032800,1901761200,1917482400,1933210800],offset:[36292,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600]},"Asia/Almaty":{ +time:[-1441152e3,-1247529600,354931200,370742400,386467200,402278400,418003200,433814400,449625600,465361200,481082400,496810800,512532e3,528260400,543981600,55971e4,575431200,591159600,606880800,622609200,638330400,654663600,670384800,686113200,695786400,701834400,717562800,733284e3,749012400,764733600,780462e3,796183200,811911600,828237600,846385200,859687200,877834800,891136800,909284400,922586400,941338800,954036e3,972788400,985485600,1004238e3,101754e4,1035687600,1048989600,1067137200,1080439200,1099191600,1925013600],offset:[18468,18e3,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600,21600,18e3,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600]},"Asia/Ashkhabad":{time:[-1441152e3,-1247529600,354931200,370742400,386467200,402278400,418003200,433814400,449625600,465361200,481082400,496810800,512532e3,528260400,543981600,55971e4,575431200,591159600,606880800,622609200,638330400,654663600,670384800,686113200,695786400,192501e4],offset:[14012,14400,18e3,21600,18e3,21600,18e3,21600,18e3,21600,18e3,21600,18e3,21600,18e3,21600,18e3,21600,18e3,21600,18e3,21600,18e3,18e3,14400,18e3]},"Asia/Tokyo":{time:[-2587678861,-683769600,-672274800,-654739200,-640825200,-620265600,-609375600,-588816e3,-577926e3,1925024400],offset:[33539,32400,36e3,32400,36e3,32400,36e3,32400,36e3,32400]},"Asia/Taipei":{time:[-2335219200,-1017792e3,-766191600,-745804800,-733795200,-716860800,-699580800,-683856e3,-670636800,-65232e4,-639100800,-620784e3,-607564800,-589248e3,-576028800,-562896e3,-541728e3,-528681600,-510192e3,-497145600,-478656e3,-465609600,-449798400,-433987200,-418176e3,-402451200,-38664e4,-370915200,-355104e3,-339379200,-323568e3,-302486400,-291945600,-270950400,-260409600,134006400,149817600,165542400,181353600,299635200,307584e3,1925020800],offset:[29160,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800]},"Asia/Singapore":{time:[-2177452800,-2038176e3,-1167609600,-1073001600,-894153600,-879638400,-766972800,378691200,1925020800],offset:[24925,24925,25200,26400,26400,27e3,32400,27e3,28800]},"Asia/Shanghai":{time:[-2177452800,-1600646400,-1585872e3,-933638400,-922060800,-908841600,-888796800,-881020800,-767836800,-745804800,-733795200,-716860800,-699580800,-683856e3,-670636800,-65232e4,-649987200,515556e3,527047200,545191200,558496800,577245600,589946400,608695200,622000800,640144800,653450400,671594400,6849e5,1925020800],offset:[29143,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800]},"Asia/Seoul":{ +time:[-1948752e3,-1830384e3,-767318400,-681177600,-672192e3,-654739200,-640828800,-623376e3,-609379200,-588816e3,-577929600,-498096e3,-462672e3,-451699200,-429753600,-418262400,-399513600,-387417600,-368064e3,-355968e3,-336614400,-324518400,-305164800,-293068800,-264902400,547610400,560919600,57906e4,592369200,1925024400],offset:[30472,30600,32400,32400,36e3,32400,36e3,32400,36e3,32400,36e3,32400,30600,34200,30600,34200,30600,34200,30600,34200,30600,34200,30600,34200,30600,32400,36e3,32400,36e3,32400]},"Asia/Tehran":{time:[-1704153600,-757382400,247190400,259286400,277776e3,283996800,290822400,306547200,322444800,338515200,673228800,685497600,701222400,71712e4,732758400,748656e3,764294400,780192e3,795830400,811728e3,827366400,843264e3,858988800,874886400,890524800,906422400,922060800,937958400,953596800,969494400,985219200,1001116800,1016755200,1032652800,1048291200,1064188800,1079827200,1095724800,1111449600,1127347200,1206057600,1221955200,123768e4,1253577600,1269216e3,1285113600,1300752e3,1316649600,1332288e3,1348185600,1363910400,1379808e3,1395446400,1411344e3,1426982400,144288e4,1458518400,1474416e3,1490140800,1506038400,1521676800,1537574400,1553212800,1569110400,1584748800,1600646400,1616371200,1632268800,1647907200,1663804800,1679443200,1695340800,1710979200,1726876800,1742601600,1758499200,1774137600,1790035200,1805673600,1821571200,1837209600,1853107200,1868745600,1884643200,1900368e3,1916265600,1931904e3],offset:[12344,12344,12600,14400,18e3,14400,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600]},"Asia/Dubai":{time:[-1577923200,1925006400],offset:[13272,14400]},"Asia/Kolkata":{time:[-3645216e3,-3155673600,-2019686400,-891561600,-872035200,-862617600,-764121600,1925011800],offset:[21208,21200,19270,19800,23400,19800,23400,19800]},"Asia/Hong_Kong":{time:[-2056663398,-900882e3,-891547200,-884217600,-761176800,-747878400,-728508600,-717021e3,-697059e3,-683757e3,-668028600,-654726600,-636579e3,-623277e3,-605129400,-591827400,-573679800,-559773e3,-541625400,-528323400,-510179400,-498083400,-478729800,-466633800,-446675400,-435184200,-415225800,-403129800,-383776200,-371680200,-352326600,-340230600,-320877e3,-308781e3,-288822600,-277331400,-257373e3,-245881800,-225923400,-213827400,-194473800,-182377800,-163024200,-148509e3,-132784200,-117059400,-101334600,-85609800,-69280200,-53555400,-37830600,-22105800,-6381e3,9343800,25068600,40793400,56518200,72243e3,88572600,104297400,120022200,126070200,151471800,167196600,182921400,198646200,214371e3,295414200,309324600,1925020800], +offset:[27402,28800,32400,30600,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800]},"Asia/Bangkok":{time:[-2840140800,-1570060800,1925017200],offset:[24124,24124,25200]},"Asia/Chongqing":{time:[-2177452800,-1600646400,-1585872e3,-933638400,-922060800,-908841600,-888796800,-881020800,-767836800,-745804800,-733795200,-716860800,-699580800,-683856e3,-670636800,-65232e4,-649987200,515556e3,527047200,545191200,558496800,577245600,589946400,608695200,622000800,640144800,653450400,671594400,6849e5,1925020800],offset:[29143,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800]},"Asia/Jerusalem":{time:[-2840140800,-1640995200,-933638400,-857347200,-844293600,-825811200,-812678400,-794188800,-779846400,-762645600,-748303200,-731116800,-681955200,-673228800,-667951200,-65232e4,-636415200,-62208e4,-608936400,-59184e4,-572475600,-558568800,-542840400,-527724e3,-514414800,-490838400,-482976e3,-459468e3,-451526400,-428544e3,-418251600,-400024800,-387417600,142387200,150854400,167184e3,178675200,334022400,337654800,452563200,462243600,482284800,495590400,516758400,526435200,545443200,558489600,576633600,589334400,609897600,620784e3,638323200,651628800,669772800,683683200,701827200,715737600,733708800,747187200,765158400,778032e3,796608e3,810086400,826848e3,842832e3,858902400,874195200,890352e3,90504e4,923018400,936324e3,955677600,970794e3,986778e3,1001293200,1017363600,1033952400,1048813200,1065142800,1081299600,1095814800,1112320800,1128823200,1143770400,1159668e3,117522e4,1189908e3,1206669600,1223172e3,1238119200,1254016800,1269568800,1284256800,1301623200,1317520800,1333072800,1348365600,1364522400,1382839200,1395972e3,1414288800,1427421600,1445738400,1458871200,1477792800,1490320800,1509242400,1521770400,1540692e3,1553824800,1572141600,1585274400,1603591200,1616724e3,1635645600,1648173600,1667095200,1679623200,1698544800,1711677600,1729994400,1743127200,1761444e3,1774576800,1792893600,1806026400,1824948e3,1837476e3,1856397600,1868925600,1887847200,190098e4,1919296800,1932429600], +offset:[8454,8440,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,14400,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200]},"Asia/Kuwait":{time:[-719625600,1925002800],offset:[11212,10800]},"Asia/Muscat":{time:[-1577923200,1925006400],offset:[13272,14400]},"Asia/Qatar":{time:[-1577923200,76204800,1925002800],offset:[12368,14400,10800]},"Asia/Riyadh":{time:[-719625600,1925002800],offset:[11212,10800]},"Pacific/Auckland":{time:[-3192393600,-1330293600,-1320012e3,-1300658400,-1287352800,-1269208800,-1255903200,-1237759200,-1224453600,-1206309600,-1192399200,-117486e4,-1160949600,-1143410400,-1125871200,-1112565600,-1094421600,-1081116e3,-1062972e3,-1049666400,-1031522400,-1018216800,-1000072800,-986767200,-968018400,-955317600,-936568800,-923263200,-757382400,152676e3,162356400,183520800,195015600,215575200,226465200,247024800,257914800,278474400,289364400,309924e3,320814e3,341373600,352263600,372823200,384318e3,404877600,415767600,436327200,447217200,467776800,478666800,499226400,510116400,530676e3,541566e3,562125600,573620400,59418e4,60507e4,623815200,637729200,655264800,669178800,686714400,700628400,718164e3,732682800,749613600,764132400,781063200,795582e3,812512800,827031600,844567200,858481200,876016800,889930800,907466400,921985200,938916e3,953434800,970365600,984884400,100242e4,1016334e3,1033869600,1047783600,1065319200,1079838e3,1096768800,1111287600,1128218400,1142737200,1159668e3,1174186800,1191117600,1207450800,1222567200,1238900400,1254016800,127035e4,1285466400,1301799600,1316916e3,1333249200,1348970400,1365303600,138042e4,1396753200,1411869600,1428202800,1443319200,1459652400,1474768800,1491102e3,1506218400,1522551600,1538272800,1554606e3,1569722400,1586055600,1601172e3,1617505200,1632621600,1648954800,1664071200,1680404400,1695520800,1712458800,1727575200,1743908400,1759024800,1775358e3,1790474400,1806807600,1821924e3,1838257200,1853373600,1869706800,1885428e3,1901761200,1916877600,1933210800], +offset:[41944,41400,45e3,41400,43200,41400,43200,41400,43200,41400,43200,41400,43200,41400,43200,41400,43200,41400,43200,41400,43200,41400,43200,41400,43200,41400,43200,41400,43200,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800]},"Pacific/Chatham":{time:[-3192393600,-757382400,152678700,162359100,183523500,195018300,215577900,226467900,247027500,257917500,278477100,289367100,309926700,320816700,341376300,352266300,372825900,384320700,404880300,415770300,436329900,447219900,467779500,478669500,499229100,510119100,530678700,541568700,562128300,573623100,594182700,605072700,623817900,637731900,655267500,669181500,686717100,700631100,718166700,732685500,749616300,764135100,781065900,795584700,812515500,827034300,844569900,858483900,876019500,889933500,907469100,921987900,938918700,953437500,970368300,984887100,1002422700,1016336700,1033872300,1047786300,1065321900,1079840700,1096771500,1111290300,1128221100,1142739900,1159670700,1174189500,1191120300,1207453500,1222569900,1238903100,1254019500,1270352700,1285469100,1301802300,1316918700,1333251900,1348973100,1365306300,1380422700,1396755900,1411872300,1428205500,1443321900,1459655100,1474771500,1491104700,1506221100,1522554300,1538275500,1554608700,1569725100,1586058300,1601174700,1617507900,1632624300,1648957500,1664073900,1680407100,1695523500,1712461500,1727577900,1743911100,1759027500,1775360700,1790477100,1806810300,1821926700,1838259900,1853376300,1869709500,1885430700,1901763900,1916880300,1933213500],offset:[44028,44100,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500]},"Pacific/Fakaofo":{time:[-2177452800,1325203200,1925038800],offset:[-41096,-39600,46800]},"Pacific/Honolulu":{time:[-2334139200,-1157320800,-1155470400,-880236e3,-769429800,-765410400,-712188e3,1924956e3], +offset:[-37886,-37800,-34200,-37800,-34200,-34200,-37800,-36e3]},"America/Mexico_City":{time:[-1514763396,-1343091600,-1234828800,-1220317200,-1207180800,-1191369600,-975283200,-963187200,-917136e3,-907372800,-821923200,-810086400,-627523200,-613008e3,828842400,846381600,860292e3,877831200,891741600,909280800,923191200,941335200,954640800,972784800,989114400,1001815200,1018144800,1035684e3,1049594400,1067133600,1081044e3,1099188e3,1112493600,1130637600,1143943200,1162087200,1175392800,1193536800,1207447200,1224986400,1238896800,1256436e3,1270346400,1288490400,1301796e3,131994e4,1333245600,1351389600,13653e5,1382839200,1396749600,1414288800,1428199200,1445738400,1459648800,1477792800,1491098400,1509242400,1522548e3,1540692e3,1554602400,1572141600,1586052e3,1603591200,1617501600,1635645600,1648951200,1667095200,1680400800,1698544800,1712455200,1729994400,1743904800,1761444e3,1775354400,1792893600,1806804e3,1824948e3,1838253600,1856397600,1869703200,1887847200,1901757600,1919296800,1933207200],offset:[-23796,-25200,-21600,-25200,-21600,-25200,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600]},"Africa/Cairo":{time:[-2185401600,-929836800,-923097600,-906163200,-892857600,-875836800,-857779200,-844300800,-825811200,-812678400,-794188800,-779846400,-762652800,-399081600,-38664e4,-368323200,-355104e3,-336783600,-323643600,-305161200,-292021200,-273625200,-260485200,-242089200,-228949200,-210553200,-197413200,-178930800,-165790800,-147394800,-134254800,-115858800,-102632400,-84322800,-71096400,-52700400,-39474e3,-21164400,-7938e3,10371600,23598e3,41907600,55134e3,7353e4,86756400,105066e3,118292400,136602e3,149828400,168138e3,181364400,199760400,212986800,231296400,244522800,262832400,276058800,294368400,307594800,325990800,339217200,357526800,370753200,396406800,402289200,426819600,433825200,452221200,465447600,483757200,496983600,515293200,528519600,546829200,560055600,578451600,591678e3,610419600,623214e3,641523600,65475e4,673059600,686286e3,704682e3,717908400,736218e3,749444400,767754e3,780980400,799027200,812332800,830476800,843782400,861926400,875232e3,893376e3,906681600,925430400,938736e3,95688e4,970185600,988329600,1001635200,1019779200,1033084800,1051228800,1064534400,1083283200,1096588800,1114732800,1128038400,1146182400,1158883200,1177632e3,1189123200,1209081600,1219968e3,1240531200,1250812800,1272585600,1281484800,1284076800,1285891200,1400198400,1403827200,1406851200,1411689600,1924999200], +offset:[7509,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200]},"Africa/Johannesburg":{time:[-2458166400,-2109283200,-860968800,-845244e3,-829519200,-813794400,1924999200],offset:[6720,5400,7200,10800,7200,10800,7200]},"Asia/Kathmandu":{time:[-1577923200,504921600,1925012700],offset:[20476,19800,20700]},"US/Mountain":{time:[-2717668796,-1633298400,-1615154400,-1601848800,-1583704800,-1570399200,-1551650400,-1538949600,-1534111200,-880236e3,-769417200,-765410400,-147909600,-13158e4,-11646e4,-100130400,-84405600,-68680800,-52956e3,-37231200,-21506400,-5781600,9943200,25668e3,41392800,57722400,73447200,89172e3,104896800,120621600,126669600,152071200,162352800,183520800,199245600,215575200,230695200,247024800,262749600,278474400,294199200,309924e3,325648800,341373600,357098400,372823200,388548e3,404877600,419997600,436327200,452052e3,467776800,483501600,499226400,514951200,530676e3,544586400,562125600,576036e3,59418e4,607485600,625629600,638935200,657079200,670989600,688528800,702439200,719978400,733888800,752032800,765338400,783482400,796788e3,814932e3,828842400,846381600,860292e3,877831200,891741600,909280800,923191200,941335200,954640800,972784800,986090400,1004234400,1018144800,1035684e3,1049594400,1067133600,1081044e3,1099188e3,1112493600,1130637600,1143943200,1162087200,1173578400,1194141600,1205028e3,1225591200,1236477600,1257040800,1268532e3,1289095200,1299981600,1320544800,1331431200,1351994400,1362880800,1383444e3,1394330400,1414893600,142578e4,1446343200,1457834400,1478397600,1489284e3,1509847200,1520733600,1541296800,1552183200,1572746400,1583632800,1604196e3,1615687200,1636250400,1647136800,16677e5,1678586400,1699149600,1710036e3,1730599200,1741485600,1762048800,1772935200,1793498400,1804989600,1825552800,1836439200,1857002400,1867888800,1888452e3,1899338400,1919901600,1930788e3], +offset:[-25196,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200]},"Europe/Helsinki":{time:[-2890252800,-1535932800,-875664e3,-859762800,354679200,370407600,386128800,401857200,417582e3,433310400,449031600,465364800,481086e3,496814400,512535600,528264e3,543985200,559713600,575434800,591163200,606884400,622612800,638334e3,654667200,670388400,686116800,701838e3,717566400,733287600,749016e3,764737200,780465600,796186800,811915200,828241200,846388800,859690800,877838400,891140400,909288e3,92259e4,941342400,954039600,972792e3,985489200,1004241600,1017543600,1035691200,1048993200,1067140800,1080442800,1099195200,1111892400,1130644800,1143342e3,1162094400,1174791600,1193544e3,1206846e3,1224993600,1238295600,1256443200,1269745200,1288497600,1301194800,1319947200,1332644400,1351396800,1364698800,1382846400,1396148400,1414296e3,1427598e3,1445745600,1459047600,14778e5,1490497200,1509249600,1521946800,1540699200,1554001200,1572148800,1585450800,1603598400,1616900400,1635652800,164835e4,1667102400,1679799600,1698552e3,1711854e3,1730001600,1743303600,1761451200,1774753200,1792900800,1806202800,1824955200,1837652400,1856404800,1869102e3,1887854400,1901156400,1919304e3,1932606e3],offset:[5989,5989,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200]},"Europe/Stockholm":{ +time:[-2871676800,-2208988800,-1692493200,-1680476400,323834400,338958e3,354679200,370407600,386128800,401857200,417578400,433306800,449028e3,465361200,481082400,496810800,512532e3,528260400,543981600,55971e4,575431200,591159600,606880800,622609200,638330400,654663600,670384800,686113200,701834400,717562800,733284e3,749012400,764733600,780462e3,796183200,811911600,828237600,846385200,859687200,877834800,891136800,909284400,922586400,941338800,954036e3,972788400,985485600,1004238e3,101754e4,1035687600,1048989600,1067137200,1080439200,1099191600,1111888800,1130641200,1143338400,1162090800,1174788e3,1193540400,1206842400,122499e4,1238292e3,1256439600,1269741600,1288494e3,1301191200,1319943600,1332640800,1351393200,1364695200,1382842800,1396144800,1414292400,1427594400,1445742e3,1459044e3,1477796400,1490493600,1509246e3,1521943200,1540695600,1553997600,1572145200,1585447200,1603594800,1616896800,1635649200,1648346400,1667098800,1679796e3,1698548400,1711850400,1729998e3,17433e5,1761447600,1774749600,1792897200,1806199200,1824951600,1837648800,1856401200,1869098400,1887850800,1901152800,1919300400,1932602400],offset:[4332,3614,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600]},"Europe/Copenhagen":{time:[-2524521600,-2398291200,-1692493200,-1680483600,-935107200,-85725e4,-844552800,-828219600,-812498400,-79677e4,-781048800,-769381200,-747007200,-736376400,-715212e3,-706741200,-683157600,-675291600,323834400,338958e3,354679200,370407600,386128800,401857200,417578400,433306800,449028e3,465361200,481082400,496810800,512532e3,528260400,543981600,55971e4,575431200,591159600,606880800,622609200,638330400,654663600,670384800,686113200,701834400,717562800,733284e3,749012400,764733600,780462e3,796183200,811911600,828237600,846385200,859687200,877834800,891136800,909284400,922586400,941338800,954036e3,972788400,985485600,1004238e3,101754e4,1035687600,1048989600,1067137200,1080439200,1099191600,1111888800,1130641200,1143338400,1162090800,1174788e3,1193540400,1206842400,122499e4,1238292e3,1256439600,1269741600,1288494e3,1301191200,1319943600,1332640800,1351393200,1364695200,1382842800,1396144800,1414292400,1427594400,1445742e3,1459044e3,1477796400,1490493600,1509246e3,1521943200,1540695600,1553997600,1572145200,1585447200,1603594800,1616896800,1635649200,1648346400,1667098800,1679796e3,1698548400,1711850400,1729998e3,17433e5,1761447600,1774749600,1792897200,1806199200,1824951600,1837648800,1856401200,1869098400,1887850800,1901152800,1919300400,1932602400], +offset:[3020,3020,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600]},"Atlantic/Reykjavik":{time:[-1956614400,-1668214800,-1647212400,-1636678800,-161343e4,-1605142800,-1581894e3,-1539565200,-153135e4,-968029200,-952293600,-942012e3,-920239200,-909961200,-888789600,-877906800,-857944800,-846457200,-826495200,-815007600,-795045600,-783558e3,-762991200,-752108400,-731541600,-717634800,-700092e3,-686185200,-668642400,-654735600,-636588e3,-623286e3,-605743200,-591836400,-573688800,-559782e3,-542239200,-528332400,-510789600,-496882800,-47934e4,-465433200,-447890400,-433983600,-415836e3,-401929200,-384386400,-370479600,-352936800,-33903e4,-321487200,-307580400,-290037600,-276130800,-258588e3,-244681200,-226533600,-212626800,-195084e3,-181177200,-163634400,-149727600,-132184800,-118278e3,-100735200,-86828400,-68680800,-54774e3,1924992e3],offset:[-5280,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0,-3600,0]},"Europe/Tallinn":{time:[-2840140800,-1638316800,-1632002400,-1618693200,-1593820800,-1535932800,-927936e3,-892944e3,-85725e4,-844552800,-828219600,-812498400,-797644800,354931200,370742400,386467200,402278400,418003200,433814400,449625600,465361200,481082400,496810800,512532e3,528260400,543981600,55971e4,575431200,591159600,606880800,622609200,638330400,654663600,670384800,686113200,701834400,717562800,733284e3,749012400,764733600,780462e3,796183200,811911600,828237600,846385200,859687200,877834800,891136800,909288e3,92259e4,941342400,1017543600,1035691200,1048993200,1067140800,1080442800,1099195200,1111892400,1130644800,1143342e3,1162094400,1174791600,1193544e3,1206846e3,1224993600,1238295600,1256443200,1269745200,1288497600,1301194800,1319947200,1332644400,1351396800,1364698800,1382846400,1396148400,1414296e3,1427598e3,1445745600,1459047600,14778e5,1490497200,1509249600,1521946800,1540699200,1554001200,1572148800,1585450800,1603598400,1616900400,1635652800,164835e4,1667102400,1679799600,1698552e3,1711854e3,1730001600,1743303600,1761451200,1774753200,1792900800,1806202800,1824955200,1837652400,1856404800,1869102e3,1887854400,1901156400,1919304e3,1932606e3], +offset:[5940,5940,3600,7200,3600,5940,7200,10800,7200,3600,7200,3600,7200,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200]},"Europe/Riga":{time:[-2840140800,-1632002400,-1618693200,-1601676e3,-1597266e3,-1377302400,-928022400,-899510400,-85725e4,-844552800,-828219600,-812498400,-79677e4,-795830400,354931200,370742400,386467200,402278400,418003200,433814400,449625600,465361200,481082400,496810800,512532e3,528260400,543981600,55971e4,575431200,591159600,606880800,622609200,638330400,654663600,670384800,686113200,701834400,717562800,733284e3,749012400,764733600,780462e3,796183200,811911600,828237600,843966e3,859690800,877838400,891140400,909288e3,92259e4,941342400,985489200,1004241600,1017543600,1035691200,1048993200,1067140800,1080442800,1099195200,1111892400,1130644800,1143342e3,1162094400,1174791600,1193544e3,1206846e3,1224993600,1238295600,1256443200,1269745200,1288497600,1301194800,1319947200,1332644400,1351396800,1364698800,1382846400,1396148400,1414296e3,1427598e3,1445745600,1459047600,14778e5,1490497200,1509249600,1521946800,1540699200,1554001200,1572148800,1585450800,1603598400,1616900400,1635652800,164835e4,1667102400,1679799600,1698552e3,1711854e3,1730001600,1743303600,1761451200,1774753200,1792900800,1806202800,1824955200,1837652400,1856404800,1869102e3,1887854400,1901156400,1919304e3,1932606e3],offset:[5794,5794,9394,5794,9394,5794,7200,10800,7200,3600,7200,3600,7200,3600,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200]},"Europe/Vilnius":{ +time:[-2840140800,-1672531200,-1585094400,-1561248e3,-1553558400,-928195200,-900115200,-85725e4,-844552800,-828219600,-812498400,-802137600,354931200,370742400,386467200,402278400,418003200,433814400,449625600,465361200,481082400,496810800,512532e3,528260400,543981600,55971e4,575431200,591159600,606880800,622609200,638330400,654663600,670384800,686113200,701834400,717562800,733284e3,749012400,764733600,780462e3,796183200,811911600,828237600,846385200,859687200,877834800,891140400,909284400,922586400,941338800,1048993200,1067140800,1080442800,1099195200,1111892400,1130644800,1143342e3,1162094400,1174791600,1193544e3,1206846e3,1224993600,1238295600,1256443200,1269745200,1288497600,1301194800,1319947200,1332644400,1351396800,1364698800,1382846400,1396148400,1414296e3,1427598e3,1445745600,1459047600,14778e5,1490497200,1509249600,1521946800,1540699200,1554001200,1572148800,1585450800,1603598400,1616900400,1635652800,164835e4,1667102400,1679799600,1698552e3,1711854e3,1730001600,1743303600,1761451200,1774753200,1792900800,1806202800,1824955200,1837652400,1856404800,1869102e3,1887854400,1901156400,1919304e3,1932606e3],offset:[6076,5040,5736,3600,7200,3600,10800,7200,3600,7200,3600,7200,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,7200,3600,7200,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200]},"America/Lima":{time:[-2524521600,-1938556800,-1009843200,-1002067200,-986774400,-971049600,-955324800,-9396e5,504921600,512697600,536457600,544233600,631152e3,638928e3,757382400,765158400,1924974e3],offset:[-18492,-18516,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3]},"America/Santiago":{ +time:[-2524521600,-1892678400,-1688428800,-1619222400,-1593820800,-1336003200,-13176e5,-1304380800,-1286064e3,-1272844800,-1254528e3,-1241308800,-1222992e3,-1209772800,-1191369600,-1178150400,-870566400,-865296e3,-740534400,-736387200,-718070400,-713667600,-36633600,-23932800,-3369600,7516800,24451200,37756800,55900800,69206400,87955200,100656e3,118195200,132105600,150854400,163555200,182304e3,195609600,213753600,227059200,245203200,258508800,277257600,289958400,308707200,321408e3,340156800,353462400,371606400,384912e3,403056e3,416361600,434505600,447811200,46656e4,479260800,498009600,510710400,529459200,545184e3,560908800,574214400,592358400,605664e3,624412800,637113600,653443200,668563200,687312e3,700617600,718761600,732067200,750211200,763516800,781660800,794966400,813715200,826416e3,845164800,85968e4,876614400,88992e4,906854400,923184e3,939513600,952819200,971568e3,984268800,1003017600,1015718400,1034467200,1047168e3,1065916800,1079222400,1097366400,1110672e3,1128816e3,1142121600,1160870400,1173571200,119232e4,1206835200,1223769600,1237075200,1255219200,1270339200,1286668800,1304812800,1313884800,1335657600,1346544e3,1367107200,1378598400,1398556800,1410048e3,1463270400,1471132800,149472e4,1502582400,1526169600,1534032e3,1554595200,1567900800,1586044800,1599350400,1617494400,16308e5,1648944e3,1662249600,1680393600,1693699200,1712448e3,1725753600,1743897600,1757203200,1775347200,1788652800,1806796800,1820102400,1838246400,1851552e3,1870300800,1883001600,1901750400,1915056e3,19332e5],offset:[-16966,-16966,-18e3,-16966,-14400,-16966,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-10800,-14400,-18e3,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800]},"Asia/Bahrain":{time:[-1577923200,76204800,1925002800],offset:[12368,14400,10800]},"Asia/Jakarta":{time:[-3231273600,-1451693568,-117288e4,-876614400,-766022400,-683856e3,-620784e3,-189388800,1925017200],offset:[25632,25632,26400,27e3,32400,27e3,28800,27e3,25200]},"Africa/Lagos":{time:[-1588464e3,1924995600],offset:[816,3600]},"Pacific/Norfolk":{ +time:[-2177452800,-599616e3,152071200,162961200,1443924e3,1570327200,1586055600,1601776800,1617505200,1633226400,1648954800,1664676e3,1680404400,1696125600,1712458800,172818e4,1743908400,1759629600,1775358e3,1791079200,1806807600,1822528800,1838257200,1853978400,1869706800,1886032800,1901761200,1917482400,1933210800],offset:[40312,40320,41400,45e3,41400,39600,43200,39600,43200,39600,43200,39600,43200,39600,43200,39600,43200,39600,43200,39600,43200,39600,43200,39600,43200,39600,43200,39600,43200]},"America/Juneau":{time:[-3225169588,-2188987200,-880236e3,-769420800,-765410400,-21506400,-5781600,9943200,25668e3,41392800,57722400,73447200,89172e3,104896800,120621600,126669600,152071200,162352800,183520800,199245600,215575200,230695200,247024800,262749600,278474400,294199200,309924e3,325648800,341373600,357098400,372823200,388548e3,404877600,419997600,436327200,438998400,452052e3,467776800,483501600,499226400,514951200,530676e3,544586400,562125600,576036e3,59418e4,607485600,625629600,638935200,657079200,670989600,688528800,702439200,719978400,733888800,752032800,765338400,783482400,796788e3,814932e3,828842400,846381600,860292e3,877831200,891741600,909280800,923191200,941335200,954640800,972784800,986090400,1004234400,1018144800,1035684e3,1049594400,1067133600,1081044e3,1099188e3,1112493600,1130637600,1143943200,1162087200,1173578400,1194141600,1205028e3,1225591200,1236477600,1257040800,1268532e3,1289095200,1299981600,1320544800,1331431200,1351994400,1362880800,1383444e3,1394330400,1414893600,142578e4,1446343200,1457834400,1478397600,1489284e3,1509847200,1520733600,1541296800,1552183200,1572746400,1583632800,1604196e3,1615687200,1636250400,1647136800,16677e5,1678586400,1699149600,1710036e3,1730599200,1741485600,1762048800,1772935200,1793498400,1804989600,1825552800,1836439200,1857002400,1867888800,1888452e3,1899338400,1919901600,1930788e3],offset:[54139,-32261,-28800,-25200,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-28800,-28800,-25200,-28800,-25200,-28800,-25200,-32400,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400,-28800,-32400]},"Asia/Ho_Chi_Minh":{time:[-2004048e3,-1851552e3,-852080400,-782614800,-767836800,-718070400,-457747200,-315622800,171849600,1925017200],offset:[25600,25590,25200,28800,32400,25200,28800,25200,28800,25200]},"Australia/Perth":{ +time:[-2337897600,-1672531140,-1665352800,-883605600,-876088800,-860364e3,-844639200,152071200,162961200,436327200,447217200,690343200,699418800,1165111200,1174791600,1193536800,1206846e3,1224986400,1238295600,1925020800],offset:[27804,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800]},"Europe/Malta":{time:[-2403475200,-1690761600,-168048e4,-1664755200,-1648944e3,-163512e4,-1616889600,-1604275200,-1585526400,-1571011200,-1555286400,-932428800,-85725e4,-844552800,-828219600,-812584800,-798066e3,-781048800,-76671e4,-750895200,-733352400,-719452800,-70191e4,-689205600,-670453200,-114048e3,-103161600,-81993600,-71708400,-50544e3,-40258800,-18489600,-8204400,1296e4,23245200,43804800,54694800,75859200,86749200,102384e3,118112400,135734400,148525200,167191200,180496800,198640800,211946400,230090400,243396e3,26154e4,274845600,292989600,306295200,323316e3,338349600,354679200,370407600,386128800,401857200,417578400,433306800,449028e3,465361200,481082400,496810800,512532e3,528260400,543981600,55971e4,575431200,591159600,606880800,622609200,638330400,654663600,670384800,686113200,701834400,717562800,733284e3,749012400,764733600,780462e3,796183200,811911600,828237600,846385200,859687200,877834800,891136800,909284400,922586400,941338800,954036e3,972788400,985485600,1004238e3,101754e4,1035687600,1048989600,1067137200,1080439200,1099191600,1111888800,1130641200,1143338400,1162090800,1174788e3,1193540400,1206842400,122499e4,1238292e3,1256439600,1269741600,1288494e3,1301191200,1319943600,1332640800,1351393200,1364695200,1382842800,1396144800,1414292400,1427594400,1445742e3,1459044e3,1477796400,1490493600,1509246e3,1521943200,1540695600,1553997600,1572145200,1585447200,1603594800,1616896800,1635649200,1648346400,1667098800,1679796e3,1698548400,1711850400,1729998e3,17433e5,1761447600,1774749600,1792897200,1806199200,1824951600,1837648800,1856401200,1869098400,1887850800,1901152800,1919300400,1932602400],offset:[3484,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600]},"Europe/Amsterdam":{ +time:[-4260211200,-1693699200,-168048e4,-1663452e3,-1650142800,-1633212e3,-1617483600,-1601157600,-1586034e3,-1569708e3,-1554584400,-1538258400,-1523134800,-15075e5,-1490562e3,-1470175200,-1459112400,-1443996e3,-1427662800,-1406671200,-1396213200,-1376949600,-1364763600,-1345413600,-1333314e3,-1313791200,-1301259600,-1282255200,-126981e4,-1250719200,-1238360400,-1219183200,-1206910800,-1186956e3,-1175461200,-1156024800,-1143406800,-1124488800,-1111957200,-1092952800,-1080507600,-1061330400,-1049058e3,-1029189600,-1025740800,-1017608400,-998258400,-986158800,-966722400,-954104400,-935020800,-85725e4,-844552800,-828219600,-812498400,-79677e4,-781048800,-766616400,228880800,244004400,260330400,276058800,29178e4,307508400,323834400,338958e3,354679200,370407600,386128800,401857200,417578400,433306800,449028e3,465361200,481082400,496810800,512532e3,528260400,543981600,55971e4,575431200,591159600,606880800,622609200,638330400,654663600,670384800,686113200,701834400,717562800,733284e3,749012400,764733600,780462e3,796183200,811911600,828237600,846385200,859687200,877834800,891136800,909284400,922586400,941338800,954036e3,972788400,985485600,1004238e3,101754e4,1035687600,1048989600,1067137200,1080439200,1099191600,1111888800,1130641200,1143338400,1162090800,1174788e3,1193540400,1206842400,122499e4,1238292e3,1256439600,1269741600,1288494e3,1301191200,1319943600,1332640800,1351393200,1364695200,1382842800,1396144800,1414292400,1427594400,1445742e3,1459044e3,1477796400,1490493600,1509246e3,1521943200,1540695600,1553997600,1572145200,1585447200,1603594800,1616896800,1635649200,1648346400,1667098800,1679796e3,1698548400,1711850400,1729998e3,17433e5,1761447600,1774749600,1792897200,1806199200,1824951600,1837648800,1856401200,1869098400,1887850800,1901152800,1919300400,1932602400],offset:[1172,1172,4772,1172,4772,1172,4772,1172,4772,1172,4772,1172,4772,1172,4772,1172,4772,1172,4772,1172,4772,1172,4772,1172,4772,1172,4772,1172,4772,1172,4772,1172,4772,1172,4772,1172,4772,1172,4772,1172,4772,1172,4772,1172,4772,4800,1200,4800,1200,4800,1200,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600]},"Europe/Brussels":{ +time:[-2840140800,-2450994150,-1740355200,-1693699200,-1680476400,-1663452e3,-1650142800,-1632002400,-1618693200,-1613822400,-1604278800,-1585526400,-1574038800,-1552262400,-1539997200,-1520553600,-1507510800,-1490572800,-1473642e3,-1459123200,-1444006800,-1427673600,-1411952400,-1396224e3,-1379293200,-1364774400,-1348448400,-1333324800,-1316394e3,-1301259600,-1284328800,-126981e4,-1253484e3,-1238360400,-1221429600,-1206910800,-1191189600,-1175461200,-1160344800,-1143406800,-1127685600,-1111957200,-1096840800,-1080507600,-1063576800,-1049058e3,-1033336800,-1017608400,-1002492e3,-986158800,-969228e3,-950475600,-942012e3,-934664400,-85725e4,-844552800,-828219600,-812498400,-798066e3,-781048800,-766616400,-745452e3,-733266e3,228880800,244004400,260330400,276058800,29178e4,307508400,323834400,338958e3,354679200,370407600,386128800,401857200,417578400,433306800,449028e3,465361200,481082400,496810800,512532e3,528260400,543981600,55971e4,575431200,591159600,606880800,622609200,638330400,654663600,670384800,686113200,701834400,717562800,733284e3,749012400,764733600,780462e3,796183200,811911600,828237600,846385200,859687200,877834800,891136800,909284400,922586400,941338800,954036e3,972788400,985485600,1004238e3,101754e4,1035687600,1048989600,1067137200,1080439200,1099191600,1111888800,1130641200,1143338400,1162090800,1174788e3,1193540400,1206842400,122499e4,1238292e3,1256439600,1269741600,1288494e3,1301191200,1319943600,1332640800,1351393200,1364695200,1382842800,1396144800,1414292400,1427594400,1445742e3,1459044e3,1477796400,1490493600,1509246e3,1521943200,1540695600,1553997600,1572145200,1585447200,1603594800,1616896800,1635649200,1648346400,1667098800,1679796e3,1698548400,1711850400,1729998e3,17433e5,1761447600,1774749600,1792897200,1806199200,1824951600,1837648800,1856401200,1869098400,1887850800,1901152800,1919300400,1932602400],offset:[1050,1050,0,3600,7200,3600,7200,3600,7200,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600]},"Europe/Lisbon":{ +time:[-1830386205,-1689555600,-1677798e3,-1667437200,-1647734400,-1635814800,-1616198400,-1604365200,-1584662400,-1572742800,-155304e4,-1541206800,-1521504e3,-1442451600,-1426809600,-1379293200,-1364774400,-1348448400,-1333324800,-1316394e3,-1301270400,-1284339600,-1269820800,-1221440400,-1206921600,-1191200400,-1175472e3,-1127696400,-1111968e3,-1096851600,-1080518400,-1063587600,-1049068800,-1033347600,-1017619200,-1002502800,-986169600,-969238800,-950486400,-942022800,-922665600,-906944400,-891129600,-877309200,-873680400,-864e6,-857952e3,-845859600,-842835600,-831340800,-825897600,-81441e4,-810781200,-799891200,-794448e3,-782960400,-779331600,-768441600,-762998400,-749091600,-733363200,-717631200,-701902800,-686181600,-670453200,-654732e3,-639003600,-591832800,-575499600,-559778400,-54405e4,-528328800,-512600400,-496879200,-481150800,-465429600,-449701200,-43398e4,-417646800,-401925600,-386197200,-370476e3,-354747600,-339026400,-323298e3,-307576800,-291848400,-276127200,-260398800,-244677600,-228344400,-212623200,-196894800,-181173600,-165445200,-149724e3,-133995600,-118274400,212547600,228268800,243997200,260323200,276051600,291772800,307504800,323222400,338954400,354675600,370404e3,386125200,401853600,417578400,433303200,449024400,465357600,481078800,496807200,512528400,528256800,543978e3,559706400,575427600,591156e3,606877200,622605600,638326800,65466e4,670381200,686109600,701830800,717559200,733284e3,749012400,764733600,780462e3,796183200,811911600,828237600,846381600,859683600,877831200,891133200,909280800,922582800,941335200,954032400,972784800,985482e3,1004234400,1017536400,1035684e3,1048986e3,1067133600,1080435600,1099188e3,1111885200,1130637600,1143334800,1162087200,1174784400,1193536800,1206838800,1224986400,1238288400,1256436e3,1269738e3,1288490400,1301187600,131994e4,1332637200,1351389600,1364691600,1382839200,1396141200,1414288800,1427590800,1445738400,1459040400,1477792800,149049e4,1509242400,1521939600,1540692e3,1553994e3,1572141600,1585443600,1603591200,1616893200,1635645600,1648342800,1667095200,1679792400,1698544800,1711846800,1729994400,1743296400,1761444e3,1774746e3,1792893600,1806195600,1824948e3,1837645200,1856397600,1869094800,1887847200,1901149200,1919296800,1932598800],offset:[-2205,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,7200,3600,0,3600,7200,3600,0,3600,7200,3600,0,3600,7200,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,3600,7200,3600,7200,3600,7200,3600,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0]},"Europe/Dublin":{ +time:[-2821651200,-1691964e3,-1680469200,-1664143200,-1650142800,-1633903200,-1617483600,-1601848800,-1586034e3,-1570399200,-1552165200,-1538344800,-152253e4,-15075e5,-1490562e3,-1473631200,-1460926800,-1442786400,-1428872400,-1410732e3,-1396213200,-1379282400,-1364763600,-1348437600,-1333314e3,-1315778400,-1301259600,-1284328800,-126981e4,-1253484e3,-1238360400,-1221429600,-1206910800,-118998e4,-1175461200,-1159135200,-1143406800,-1126476e3,-1111957200,-1095631200,-1080507600,-1063576800,-1049058e3,-1032127200,-1017608400,-1001282400,-986158800,-969228e3,-950475600,-942012e3,-733352400,-719445600,-699483600,-684972e3,-668034e3,-654732e3,-636584400,-622072800,-605739600,-590623200,-57429e4,-558568800,-542235600,-527119200,-512600400,-496274400,-481150800,-46422e4,-449701200,-432165600,-417646800,-401320800,-386197200,-369266400,-354747600,-337816800,-323298e3,-306972e3,-291848400,-276732e3,-257979600,-245282400,-22653e4,-213228e3,-195080400,-182383200,-163630800,-150933600,-132181200,-119484e3,-100731600,-88034400,-68677200,-59004e3,57726e3,69818400,89175600,101268e3,120625200,132717600,152074800,164167200,183524400,196221600,214974e3,227671200,246423600,259120800,278478e3,290570400,309927600,32202e4,341377200,354675600,372823200,386125200,404272800,417574800,435722400,449024400,467776800,481078800,499226400,512528400,530676e3,543978e3,562125600,575427600,593575200,606877200,625629600,638326800,657079200,670381200,688528800,701830800,719978400,733280400,751428e3,76473e4,782877600,796179600,814327200,828234e3,846381600,859683600,877831200,891133200,909280800,922582800,941335200,954032400,972784800,985482e3,1004234400,1017536400,1035684e3,1048986e3,1067133600,1080435600,1099188e3,1111885200,1130637600,1143334800,1162087200,1174784400,1193536800,1206838800,1224986400,1238288400,1256436e3,1269738e3,1288490400,1301187600,131994e4,1332637200,1351389600,1364691600,1382839200,1396141200,1414288800,1427590800,1445738400,1459040400,1477792800,149049e4,1509242400,1521939600,1540692e3,1553994e3,1572141600,1585443600,1603591200,1616893200,1635645600,1648342800,1667095200,1679792400,1698544800,1711846800,1729994400,1743296400,1761444e3,1774746e3,1792893600,1806195600,1824948e3,1837645200,1856397600,1869094800,1887847200,1901149200,1919296800,1932598800],offset:[-1500,-1521,2079,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0,3600,0]},"Europe/Oslo":{ +time:[-2366755200,-1691881200,-1680566400,-927507600,-85725e4,-844552800,-828219600,-812498400,-79677e4,-781048800,-765320400,-340840800,-324507600,-308786400,-293058e3,-277336800,-261608400,-245887200,-230158800,-214437600,-198709200,-182988e3,-166654800,-147909600,-135205200,323834400,338958e3,354679200,370407600,386128800,401857200,417578400,433306800,449028e3,465361200,481082400,496810800,512532e3,528260400,543981600,55971e4,575431200,591159600,606880800,622609200,638330400,654663600,670384800,686113200,701834400,717562800,733284e3,749012400,764733600,780462e3,796183200,811911600,828237600,846385200,859687200,877834800,891136800,909284400,922586400,941338800,954036e3,972788400,985485600,1004238e3,101754e4,1035687600,1048989600,1067137200,1080439200,1099191600,1111888800,1130641200,1143338400,1162090800,1174788e3,1193540400,1206842400,122499e4,1238292e3,1256439600,1269741600,1288494e3,1301191200,1319943600,1332640800,1351393200,1364695200,1382842800,1396144800,1414292400,1427594400,1445742e3,1459044e3,1477796400,1490493600,1509246e3,1521943200,1540695600,1553997600,1572145200,1585447200,1603594800,1616896800,1635649200,1648346400,1667098800,1679796e3,1698548400,1711850400,1729998e3,17433e5,1761447600,1774749600,1792897200,1806199200,1824951600,1837648800,1856401200,1869098400,1887850800,1901152800,1919300400,1932602400],offset:[2580,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600]}}},"3u3j":function(e,t,i){"use strict";i.d(t,"a",(function(){return o}));var n=i("mrSG"),r=i("Eyy1"),o=function(e){function t(t,i,n){var o=e.call(this,n)||this;o._chartModel=t,o._sourceId=i.id();var s=Object(r.ensureNotNull)(i.priceScale());o._initialPriceScaleId=s.id();var a=Object(r.ensureNotNull)(t.paneForSource(i));return o._initialPriceScalePosition=a.priceScalePosition(s),o._initialPriceScaleIndex=a.priceScaleIndex(s,o._initialPriceScalePosition),o._initialPaneIndex=t.panes().indexOf(a),o}return Object(n.__extends)(t,e),t}(i("RDU5").UndoCommand)},"4TVt":function(e,t,i){"use strict";i.r(t),i.d(t,"LineToolPriceAxisView",(function(){return o}));var n=i("mrSG"),r=i("Eyy1"),o=function(e){function t(t,i){var n=e.call(this)||this;return n._active=!1,n._source=t,n._data=i,n}return Object(n.__extends)(t,e),t.prototype.setActive=function(e){this._active=e},t.prototype._updateRendererData=function(e,t,i){e.visible=!1;var n=this._source.model();if(n.timeScale()&&!n.timeScale().isEmpty()){var r=this._source.priceScale() +;if(null!==r&&!r.isEmpty())if(n.selection().isSelected(this._source)||this._source.isForcedDrawPriceAxisLabel())if(null!==n.timeScale().visibleBarsStrictRange()){var o=this._source.axisPoints(),s=this._data.pointIndex;if(!(o.length<=s)){var a=o[s];if(isFinite(a.price)){var l=this._source.ownerSource(),c=null!==l?l.firstValue():null;if(null!==c){var u=this._active?"#1565C0":n.isDark()?"#1E88E5":"#2196F3";this._data.backgroundProperty?u=this._data.backgroundProperty.value():this._data.backgroundPropertyGetter&&(u=this._data.backgroundPropertyGetter()),i.background=u,i.borderColor="#2E84A6",i.color=this.generateTextColor(u),i.coordinate=r.priceToCoordinate(a.price,c),e.text=this._formatPrice(a.price,c),e.visible=!0}}}}}},t.prototype._formatPrice=function(e,t){return Object(r.ensureNotNull)(this._source.priceScale()).formatPrice(e,t)},t}(i("KcY8").a)},"4bfY":function(e,t,i){"use strict";var n=i("Ss5c").LineDataSource,r=i("5rJj"),o=i("ytGH").LineToolWidthsProperty,s=window.t("Fib Circles");function a(e,t){var r=t||a.createProperties();n.call(this,e,r),i.e("lt-pane-views").then(function(e){var t=i("FzRY").FibCirclesPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe);for(var s=[this._properties.child("trendline").child("linewidth")],l=1;l<=a.LevelsCount;l++)s.push(this._properties.child("level"+l).child("linewidth"));this._widthsProperty=new o(s)}inherit(a,n),a.LevelsCount=11,a.prototype.levelsCount=function(){return a.LevelsCount},a.prototype.pointsCount=function(){return 2},a.prototype.translatedType=function(){return s},a.prototype.name=function(){return"Fib Circles"},a.prototype.processErase=function(e,t){var i="level"+t,n=this.properties()[i].visible;e.setProperty(n,!1,"Erase level line")},a.createProperties=function(e){var t=new r("linetoolfibcircles",e,!1,{range:[1,11]});return a._configureProperties(t),t},a.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("6U6r").FibCirclesDefinitionsViewModel}.bind(null,i)).catch(i.oe)},a._configureProperties=function(e){n._configureProperties(e)},t.LineToolFibCircles=a},"4kQX":function(e,t,i){"use strict";i.r(t),i.d(t,"TimeFormatter",(function(){return r}));var n=i("kcTO"),r=function(){function e(e){this._formatStr=e||"%h:%m:%s"}return e.prototype.format=function(e){return n.customFormatters.timeFormatter?n.customFormatters.timeFormatter.format(e):this._formatStr.replace("%h",Object(n.numberToStringWithLeadingZero)(e.getUTCHours(),2)).replace("%m",Object(n.numberToStringWithLeadingZero)(e.getUTCMinutes(),2)).replace("%s",Object(n.numberToStringWithLeadingZero)(e.getUTCSeconds(),2))},e.prototype.formatLocal=function(e){ +return n.customFormatters.timeFormatter?n.customFormatters.timeFormatter.formatLocal?n.customFormatters.timeFormatter.formatLocal(e):n.customFormatters.timeFormatter.format(e):this._formatStr.replace("%h",Object(n.numberToStringWithLeadingZero)(e.getHours(),2)).replace("%m",Object(n.numberToStringWithLeadingZero)(e.getMinutes(),2)).replace("%s",Object(n.numberToStringWithLeadingZero)(e.getSeconds(),2))},e}()},"4miz":function(e,t,i){"use strict";i.d(t,"a",(function(){return n})),i.d(t,"b",(function(){return r}));var n=function(){function e(e,t){this._visible=!0,this._title=e,this._value=t}return e.prototype.title=function(){return this._title},e.prototype.setTitle=function(e){this._title=e},e.prototype.text=function(){return this._value},e.prototype.value=function(){return this._value},e.prototype.setValue=function(e){this._value=e},e.prototype.visible=function(){return this._visible},e.prototype.setVisible=function(e){this._visible=e},e.prototype.color=function(){return this._color},e.prototype.setColor=function(e){this._color=e},e}(),r=function(){function e(){this._items=[],this._header="",this._title=""}return e.prototype.header=function(){return this._header},e.prototype.title=function(){return this._title},e.prototype.items=function(){return this._items},e.prototype.update=function(){},e}()},"4o++":function(e,t,i){"use strict";var n;i.r(t),i.d(t,"MagnetMode",(function(){return n})),function(e){e[e.WeakMagnet=0]="WeakMagnet",e[e.StrongMagnet=1]="StrongMagnet"}(n||(n={}))},"4u8j":function(e,t,i){"use strict";var n=i("Ss5c").LineDataSource,r=i("5rJj"),o=i("ytGH").LineToolWidthsProperty,s=window.t("Gann Fan");function a(e,t){var r=t||a.createProperties();n.call(this,e,r),i.e("lt-pane-views").then(function(e){var t=i("ZJWf").GannFanPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe);for(var s=[],l=1;l<=a.LevelsCount;l++)s.push(this._properties.child("level"+l).child("linewidth"));this._widthsProperty=new o(s)}inherit(a,n),a.LevelsCount=9,a.prototype.levelsCount=function(){return a.LevelsCount},a.prototype.pointsCount=function(){return 2},a.prototype.translatedType=function(){return s},a.prototype.name=function(){return"Gann Fan"},a.prototype.processErase=function(e,t){var i="level"+t,n=this.properties()[i].visible;e.setProperty(n,!1,"Erase level line")},a.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("ASG6").GannFanDefinitionsViewModel}.bind(null,i)).catch(i.oe)},a.createProperties=function(e){var t=new r("linetoolgannfan",e,!1,{range:[1,9]});return a._configureProperties(t),t},a._configureProperties=function(e){n._configureProperties(e)},t.LineToolGannFan=a},"4vW/":function(e,t,i){"use strict";var n;i.r(t),i.d(t,"ColorType",(function(){return n})),function(e){e.Solid="solid",e.Gradient="gradient"}(n||(n={}))},"54XG":function(e,t,i){"use strict";i.r(t),i.d(t,"FavoriteStudyTemplateService",(function(){return r}));var n=i("mrSG"),r=function(e){function t(t,i){ +return e.call(this,t,i,"FAVORITE_STUDY_TEMPLATES_CHANGED","StudyTemplates.quicks",[])||this}return Object(n.__extends)(t,e),t.prototype.remove=function(e){this.set(this.get().filter((function(t){return t!==e})))},t}(i("ulZB").b)},"55Xp":function(e,t,i){"use strict";function n(e){var t=e.toString(),i=t.split(".")[1],n=2;if(i){var r=i.match(/^([0]+)/);r&&(n=r[1].length+1)}return parseFloat(t).toFixed(n)}i.r(t),i.d(t,"roundToFirstValuable",(function(){return n}))},"5B3K":function(e,t,i){"use strict";i.r(t),i.d(t,"StudyError",(function(){return r}));var n=i("mrSG"),r=function(e){function t(t){var i=e.call(this,t)||this;return i.studyError=!0,i}return Object(n.__extends)(t,e),t}(Error)},"5C6T":function(e,t,i){"use strict";i.r(t),i.d(t,"PipFormatter",(function(){return r}));var n=i("mrSG"),r=function(e){function t(t,i,n,r){var o=this;return i||(i=1),"forex"!==n&&"cfd"!==n||!r?(o=e.call(this,1)||this)._isForex=!1:(o=e.call(this,r)||this)._isForex=!0,o._pipPriceScale=t,o._pipMinMove=i,o._pipMinMove2=r,o}return Object(n.__extends)(t,e),t.prototype.format=function(t,i,n){var r=this._isForex?this._pipMinMove2:this._pipMinMove;return void 0===r&&(r=NaN),e.prototype.format.call(this,t*this._pipPriceScale/r,i,n)},t}(i("kcTO").PriceFormatter)},"5JMW":function(e,t,i){"use strict";i.r(t),i.d(t,"isLineToolRiskReward",(function(){return l})),i.d(t,"LineDataSourceApi",(function(){return u}));var n=i("mrSG"),r=i("Eyy1"),o=i("ogJP"),s=new Map([["LineToolRiskRewardLong",2],["LineToolRiskRewardShort",2],["LineToolBezierQuadro",3],["LineToolBezierCubic",4]]);function a(e){var t=s.get(e.toolname);if(void 0!==t)return t;var i=e.pointsCount();return-1===i?e.points().length:i}function l(e){return"LineToolRiskRewardLong"===e||"LineToolRiskRewardShort"===e}var c=["alwaysShowStats","entryPrice","interval","lastUpdateTime","points","snapTo45Degrees","stopPrice","symbol","targetPrice"],u=function(){function e(e,t,i){this._source=e,this._model=t,this._pointsConverter=i}return e.prototype.isSelectionEnabled=function(){return this._source.isSelectionEnabled()},e.prototype.setSelectionEnabled=function(e){this._source.setSelectionEnabled(e)},e.prototype.isSavingEnabled=function(){return this._source.isSavedInChart()},e.prototype.setSavingEnabled=function(e){this._source.setSavingInChartEnabled(e)},e.prototype.isShowInObjectsTreeEnabled=function(){return this._source.showInObjectTree()},e.prototype.setShowInObjectsTreeEnabled=function(e){this._source.setShowInObjectsTreeEnabled(e)},e.prototype.isUserEditEnabled=function(){return this._source.userEditEnabled()},e.prototype.setUserEditEnabled=function(e){this._source.setUserEditEnabled(e)},e.prototype.bringToFront=function(){this._model.bringToFront([this._source])},e.prototype.sendToBack=function(){this._model.sendToBack([this._source])},e.prototype.getProperties=function(){return this._source.properties().state(c,!0)},e.prototype.setProperties=function(e){this._setProps(this._source.properties(),e,"")},e.prototype.getPoints=function(){var e=this._source.points(),t=a(this._source) +;return e.length>t&&(Object(r.assert)(l(this._source.toolname)),e=e.slice(0,t)),this._pointsConverter.dataSourcePointsToPriced(e)},e.prototype.setPoints=function(e){if(!this._source.isFixed()){var t=a(this._source);if(t!==e.length)throw new Error("Wrong points count. Required: "+t+", provided: "+e.length);var i=this._pointsConverter.apiPointsToDataSource(e);this._model.startChangingLinetool(this._source),this._model.changeLinePoints(this._source,i),this._model.endChangingLinetool(!1),this._source.createServerPoints()}},e.prototype.changePoint=function(e,t){if(!this._source.isFixed()){var i=this._pointsConverter.apiPointsToDataSource([e])[0];this._model.startChangingLinetool(this._source,Object(n.__assign)({},i),t),this._model.changeLinePoint(Object(n.__assign)({},i)),this._model.endChangingLinetool(!1),this._source.createServerPoints()}},e.prototype.isHidden=function(){return this._source.isSourceHidden()},e.prototype._setProps=function(e,t,i){for(var n in t)if(t.hasOwnProperty(n)){var r=0===i.length?n:i+"."+n;if(e.hasOwnProperty(n)){var s=t[n];Object(o.isHashObject)(s)?this._setProps(e[n],s,r):e[n].setValue(s)}else console.warn('Unknown property "'+r+'"')}},e}()},"5VQP":function(e,t,i){"use strict";i.r(t),i.d(t,"ContextMenuManager",(function(){return n}));var n,r=i("mrSG"),o=i("tWVy");!function(e){var t=[];function n(){Object(o.b)()}e.createMenu=function(e,o,s){return void 0===o&&(o={}),Object(r.__awaiter)(this,void 0,void 0,(function(){var a,l;return Object(r.__generator)(this,(function(r){switch(r.label){case 0:return[4,Promise.all([i.e("react"),i.e(4),i.e(23),i.e(24),i.e(27),i.e(60),i.e(78),i.e(0),i.e(2),i.e("context-menu-renderer")]).then(i.bind(null,"cbq4"))];case 1:return a=r.sent(),l=new a.ContextMenuRenderer(e,o,(function(){var e=t.indexOf(l);-1!==e&&t.splice(e,1),void 0!==s&&s()}),n),t.push(l),[2,l]}}))}))},e.hideAll=n,e.getShown=function(){for(var e=0;e=48&&e<=57}var c=function(){function e(){this.entries=[],this.firstDayOfWeek=n.MONDAY,this.weekEndsCount=-1}return e.prototype.parseSessions=function(t,i){if(this._clear(),this.timezone=t,"24x7"===(i=this._parseFirstDayOfWeek(i)).toLowerCase())for(var n=0,r=h;n2)return a.logError("Only one `first day` specification expected @ session "+e),e;if(1===t.length)return e;var i=1,r=t[0].indexOf("-")>=0?NaN:parseInt(t[0]);return isNaN(r)&&(i=0,r=parseInt(t[1])),rn.SATURDAY?(a.logError("Unexpected day index @ session: "+e+"; day index "+r),e):(this.firstDayOfWeek=r,t[i])},e._parseDay=function(e){var t=parseInt(e.substring(0,4)),i=parseInt(e.substring(4,6)),n=parseInt(e.substring(6,8));return new s.a(t,i,n)},e._parseSessionEntry=function(t,i){var n=i.split("-");2!==n.length&&(a.logError("Bad sessions entry: "+i),n=["0000","0000"]);var r=0,o=n[0];if(o.includes("F")){var s=o.split("F");o=s[0],r=""!==s[1]?parseInt(s[1]):1}var l=0,c=n[1];if(c.includes("F")){s=c.split("F");c=s[0],l=""!==s[1]?parseInt(s[1]):1}if(!this._isCorrectSession(o)||!this._isCorrectSession(c))throw new Error("Incorrect entry syntax: "+i);var u=o,h=c;return this._createSessionEntry(t,e._minutesFromHHMM(u),e._minutesFromHHMM(h),r,l)},e._isCorrectSession=function(e){return 4===e.length&&l(e.charCodeAt(0))&&l(e.charCodeAt(1))&&l(e.charCodeAt(2))&&l(e.charCodeAt(3))},e._parseWorkingDays=function(e){for(var t=[],i=0;i0&&(t-=r*n.minutesPerDay),o>0&&(i-=o*n.minutesPerDay),new _(e,t,i-t)},e}();i.d(t,"workingDays",(function(){return u})),i.d(t,"workingDaysAndWeekEnds",(function(){return h})),i.d(t,"compareSessionEntries",(function(){return p})),i.d(t,"SessionEntry",(function(){return _})),i.d(t,"EntryIndex",(function(){return f})),i.d(t,"SessionSpec",(function(){return v}));var u=[n.MONDAY,n.TUESDAY,n.WEDNESDAY,n.THURSDAY,n.FRIDAY],h=[n.SUNDAY,n.MONDAY,n.TUESDAY,n.WEDNESDAY,n.THURSDAY,n.FRIDAY,n.SATURDAY];function d(e,t){return e.compareTo(t)<0}function p(e,t){return e.compareTo(t)}var _=function(){function e(e,t,i){this._dayOfWeek=e,this._start=t,this._length=i}return e.prototype.start=function(){return this._start+n.minutesPerDay*this.sessionStartDaysOffset()},e.prototype.startOffset=function(){return this._start},e.prototype.sessionStartDaysOffset=function(){return this._start>=0?0:this._start%n.minutesPerDay==0?-Math.ceil(this._start/n.minutesPerDay):-Math.floor(this._start/n.minutesPerDay)},e.prototype.isOvernight=function(){return this._start<0},e.prototype.dayOfWeek=function(){return this._dayOfWeek},e.prototype.sessionStartDayOfWeek=function(){var e=this._dayOfWeek-this.sessionStartDaysOffset();return en?1:-1},e.prototype.contains=function(e){var t=60*n.get_hours(e)+n.get_minutes(e),i=n.get_day_of_week(e)-this._dayOfWeek;i>0&&(i-=7);var r=i*n.minutesPerDay+t;return r>=this._start&&r0&&(t-=r*n.minutesPerDay),o>0&&(i-=o*n.minutesPerDay);var s=i-t;this._entries.push(new _(e,t,s))},e.prototype.longestSessionLength=function(){for(var e=0,t=0,i=0,n=this._holidaySessions;ithis._entries.length-1||this._entries[t].dayOfWeek()!==e},e.prototype.isCalWeekEnd=function(e){var t=n.get_day_of_week(e);if(!this._isThereCorrections)return this.isWeekEnd(t);var i=s.a.fromCalendar(e),r=this._holidayAndCorrectionMap.get(i.toString());return void 0===r?this.isWeekEnd(t):0===r.length},e.prototype.hasWeekEnds=function(){return this.weekEndsCount()>0},e.prototype.weekEndsCount=function(){return this._weekEndsCount},e.prototype.holidaysFromYearStart=function(e){if(!this._isThereCorrections)return 0;for(var t=n.get_timezone(this._timezone),i=new s.a(n.get_year(e),n.JANUARY,1),r=s.a.fromCalendar(e),o=0,a=this._selectHolidays(i,r),l=0;l0?1:-1;;){var c=s+l;if(c<0||c>=o.length||o[c].dayOfWeek()!==a)break;s=c}return new f(r.weekIndex,s,o)},e.prototype.getWeekIndex=function(e){if(!this._isThereCorrections)return 0;var t=n.get_day_of_week(e)-n.SUNDAY,i=n.get_timezone("Etc/UTC"),r=n.get_cal(i,n.get_year(e),n.get_month(e),n.get_day_of_month(e)-t);return Math.floor((r.getTime()+621672192e5)/1e3/86400/7)},e.prototype.correctTradingDay=function(e){var t=n.get_day_of_week(e),i=60*n.get_hours(e)+n.get_minutes(e),r=this.getWeekIndex(e),o=this.findSession(r,t,i,0),s=o.getEntry().dayOfWeek()-t+7*(o.weekIndex-r);return 0!==s&&n.add_date(e,s),e},e.prototype.alignToSessionStart=function(e,t){void 0===t&&(t=0);var i=n.get_day_of_week(e),r=60*n.get_hours(e)+n.get_minutes(e),o=this.getWeekIndex(e),s=this.findSession(o,i,r,t),a=s.getEntry(),l=a.dayOfWeek()-i+7*(s.weekIndex-o);0!==l&&n.add_date(e,l);var c=a.startOffset();return n.set_hms(e,c/60,c%60,0,0,n.get_timezone(this._timezone)),a.length()}, +e.prototype.businessDaysToCalendarDays=function(e,t){for(var i=this.getWeekIndex(e),r=n.get_day_of_week(e),o=0,s=0;sc);)a[l].dayOfWeek()=t)return o}i++,r=n.SUNDAY}return o},e.prototype.calendarDaysToBusinessDays=function(e,t){for(var i=this.getWeekIndex(e),r=n.get_day_of_week(e),o=0,s=0;oc);)a[l].dayOfWeek()=t)return s}i++,r=n.SUNDAY}return s},e.prototype.alignToNearestSessionStart=function(e,t){return this._alignToNearestSessionValue(e,t,this._entrySessionStart.bind(this))},e.prototype.alignToNearestSessionEnd=function(e,t){return this._alignToNearestSessionValue(e,t,this._entrySessionEnd.bind(this))},e.prototype.leftBorderOfDailyBar=function(e){var t=this._getEntriesForDay(e);return 0===t.length?null:(t.sort(p),this._getLeftEntryBorder(e,t[0]))},e.prototype.bordersOfDailyBar=function(e){var t=this._getEntriesForDay(e);if(0===t.length)return null;t.sort(p);var i=this._getLeftEntryBorder(e,t[0]),r=t[t.length-1],o=n.clone(e),s=60*(r.startOffset()+r.length())-1,a=Math.floor(s/3600);return s-=3600*a,n.set_hms(o,a,s/60,s%60,0,n.get_timezone(this._timezone)),{from:i,to:o}},e.prototype._getEntriesForWeek=function(e){var t=this._entriesHash.get(e);if(void 0===t)return this._entries;if(null!==t)return t;var i=n.get_timezone(this._timezone);t=this._entries.slice();for(var r=this._weekIndexToCalendar(e),o=this._weekIndexToCalendar(e+1),a=s.a.fromCalendar(r),l=s.a.fromCalendar(o),c=function(e){var r=e.day.toCalendar(i),o=n.get_day_of_week(r);t=(t=t.filter((function(e){return e.dayOfWeek()!==o}))).concat(e.sessions)},u=0,h=this._selectHolidays(a,l);u0&&i>=0||c<0&&i<0)&&n.add_date(t,7*c),!s.contains(t)){var h=a-o;u&&i<0&&(h=-(7-a+o)),n.add_date(t,h),o=n.get_day_of_week(t)}s.isOvernight()&&o===s.dayOfWeek()&&n.add_date(t,-s.sessionStartDaysOffset());var d=r(s),p=Math.floor(d/3600);return d-=3600*p,n.set_hms(t,p,d/60,d%60,0,n.get_timezone(this._timezone)),t},e.prototype._getEntriesForDay=function(e){var t=n.get_day_of_week(e);return this._getEntriesForWeek(this.getWeekIndex(e)).filter((function(e){return e.dayOfWeek()===t}))},e.prototype._getLeftEntryBorder=function(e,t){var i=n.clone(e),r=t.startOffset();return n.set_hms(i,r/60,r%60,0,0,n.get_timezone(this._timezone)),i},e}()},"5rJj":function(e,t,i){"use strict";(function(t){var n=i("ogJP").isSameType,r=i("Ocx9").DefaultProperty,o=i("vADo");function s(e,t,i,n){this._map=Object.assign({},this._map,n),t&&(t=this.unpackLevels(t)),r.call(this,e,t,i),this.updateCollectibleProperty()}inherit(s,r),s.prototype.state=function(e,i){(e=e||[]).push("__collectibleLines");var n=t.prototype.state.call(this,e);return i?n:this.packLevels(n)},s.prototype.clone=function(){var e=this.state();this.__collectibleLines&&(e.__collectibleLines=this.__collectibleLines.state());for(var t=new s(this._defaultName,e),i=0;i=0?f.SeriesBarColorer.upColor(this._series.properties()):f.SeriesBarColorer.downColor(this._series.properties());else{var L=this._series.barColorer().barStyle(d,!1);M=w(_,null!=L.barBorderColor?L.barBorderColor:L.barColor)}M=Object(c.resetTransparency)(w(_,M));for(var O=0,k=t;O'},"6et/":function(e,t,i){"use strict";i.r(t),i.d(t,"listen",(function(){return l})),i.d(t,"registerListener",(function(){return c})),i.d(t,"removeListener",(function(){return u})),i.d(t,"pushBackListener",(function(){return h})),i.d(t,"disable",(function(){return d})),i.d(t,"enable",(function(){return p}));var n=i("e3/o"),r=[],o=null;function s(e){for(var t=0;t=0&&!0!==r[t].func(e);t--);}function l(e){e.addEventListener("keypress",a,!1)}function c(e,t){var i={name:e,func:t},n=s(i.name);n>-1?r[n]=i:r.push(i)}function u(e){r.forEach((function(t,i){t.name===e&&r.splice(i,1)}))}function h(e,t){var i={name:e,func:t},n=s(i.name);n>-1&&r.splice(n,1),r.unshift(i)}function d(){return o?null:o=Object(n.randomHashN)(4)}function p(e){if(e!==o)throw Error("Lock id is outdated");o=null}l(window)},"6ptY":function(e,t,i){"use strict";i.r(t),i.d(t,"PaneRendererSquare",(function(){return s}));var n=i("mrSG"),r=i("2WC2"),o=i("aO4+"),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype._drawItemShape=function(e,t,i){var n=t.pixelRatio,r=Math.max(1,Math.floor(n))%2?.5:0,o=this._lineWidth(t)%2?.5:0,s=Math.round(i.height/2*n);(r+s)%1!=o%1&&(s+=.5);var a=Math.round(i.x*n)+r,l=Math.round((i.y+i.vertOffset)*n)+r,c=a-s,u=l-s,h=a+s,d=l+s;e.rect(c,u,h-c,d-u)},t.prototype._calcBoundingBox=function(t){var i=t.height,n=Math.round(i/2),r=t.x-n,s=t.vertOffset,a=t.y+s-n,l=r,c=r+i,u=a,h=a+i,d=new o.Point(l,u),p=new o.Point(c,h),_=Object(o.box)(d,p),f=e.prototype._calcBoundingBox.call(this,t);return f&&(_=this._unionBox(_,f)),_},t}(r.a)},"6sst":function(e,t,i){"use strict";i.r(t),i.d(t,"OverlayStudyPriceLineAxisView",(function(){return r}));var n=i("mrSG"),r=function(e){function t(t){var i=e.call(this)||this;return i._study=t,i}return Object(n.__extends)(t,e),t.prototype._value=function(){return this._study.lastValueData("",!0)},t.prototype._priceLineColor=function(e){return e},t.prototype._lineWidth=function(){return 1},t.prototype._isVisible=function(){var e=this._study.model().properties().scalesProperties.showSeriesLastValue.value();return this._study.properties().childs().showPriceLine.value()&&e},t}(i("TmNs").PriceLineAxisView)}, +"6xeX":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Tooltip=void 0;var n=function(){function e(e,t){for(var i=0;i2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(e.hasOwnProperty("text")){var s=n&&(0,r.forceLTRStr)(e.text)||e.text;if(e.hasOwnProperty("color")&&i){var a=document.createElement("span");a.style.cssText="color: "+e.color,o.html(a,s),t.appendChild(a)}else o.html(t,s)}else{var l=n&&(0,r.forceLTRStr)(e)||e;o.html(t,l)}return t}function p(e,t){if(Array.isArray(e)&&2===e.length){var i=document.createElement("dl");i.appendChild(d(e[0],document.createElement("dt"))),i.appendChild(d(e[1],document.createElement("dd"),!0,!0)),t.appendChild(i)}else if(e.hasOwnProperty("br")&&e.br)t.appendChild(document.createElement("br"));else{var n=document.createElement("dl");n.appendChild(d(e,document.createElement("dt"))),t.appendChild(n),e.hasOwnProperty("listItem")&&n.classList.add("list-item")}}function _(e,t){var i=(0,r.forceLTRStr)(e.text);e.attr=e.attr||{};var n=document.createElement("a");o.attr(n,"href",e.href),o.addClass(n,e.class),o.attr(n,e.attr.name,e.attr.value),o.html(n,i),t.appendChild(n)}function f(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if("string"==typeof e){var n=(0,r.forceLTRStr)(e),s=document.createElement("h2");o.html(s,n),t.appendChild(s)}else if(e.hasOwnProperty("lines"))for(var a=0;a0&&void 0!==arguments[0]?arguments[0]:{},i=t.direction,n=void 0===i?"top":i,r=t.clickable,o=void 0!==r&&r,s=t.width;l(this,e),this._direction=n,this._tooltipShown=!1,this._tooltipX=void 0,this._tooltipY=void 0,this._tooltipItems=null,this._width=void 0!==s?s:200,this._tooltip=document.createElement("div"),this._tooltip.classList.add("tv-chart-events-source__tooltip"),this._tooltip.style.position="absolute",this._tooltip.style.width=this._width+"px",this._tooltipContent=document.createElement("div"),this._tooltipContent.classList.add("tv-chart-events-source__tooltip__content"),this._tooltip.appendChild(this._tooltipContent),o&&this._tooltip.classList.add("tv-chart-events-source__tooltip--clickable")}return n(e,[{key:"show",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.items,i=void 0===t?[]:t,n=e.x,r=void 0===n?0:n,s=e.y,a=void 0===s?0:s,l=e.wrapElement,c=void 0===l?null:l,u=e.timeOffset,d=void 0===u?"":u,p=e.leftBorderColor,_=void 0===p?null:p;if(c&&!h(i)){var m=o.contentWidth(c),v=o.contentHeight(c),y=!1,g=!1;if(this._tooltipShown||(c.appendChild(this._tooltip),this._tooltipShown=!0,y=!0,g=!0),r===this._tooltipX&&a===this._tooltipY||(y=!0),y){var b=Math.max(Math.min(r-this._width/2,m-this._width-10),0);this._tooltip.style.left=Math.round(b)+"px",this._tooltip.style.bottom=Math.round(v-a+10)+"px"}if(this._tooltipItems||(g=!0),!g)for(var S=i.length;S--;)if(this._tooltipItems[S]!==i[S]){g=!0;break}if(g){var w=void 0;if(i.length<=1)w=i;else{for(var P={},C=i.length;C--;){var x=i[C].importance;null==x&&(x=-1),P[x]||(P[x]=[]),P[x].push(i[C])}var T=Object.keys(P).sort((function(e,t){return e-t}));if(T.length<=1)w=P[T[0]];else{w=[];for(var I=T.length;I--;)for(var M=P[T[I]],L=M.length;L--;)w.push(M[L])}}this._tooltipContent.innerHTML="";for(var O=w.length;O--;){var k=w[O],A="";k.hasOwnProperty("importance")?("string"==typeof k.importance&&("earnings"===k.importance?A="--importance-earnings":"splits"===k.importance?A="--importance-splits":"dividends"===k.importance?A="--importance-dividends":"list"===k.importance&&(A="--importance-list")),0===k.importance?A="--importance-normal":k.importance>0&&(A="--importance-high")):_||(A="--importance-none") +;var E="tv-chart-events-source__tooltip__item";A&&(E+=" "+E+A);var V=document.createElement("div");o.attr(V,"class",E),_&&(V.style.borderLeftColor=_),f(k,V,d),this._tooltipContent.appendChild(V)}this._tooltipItems=i}"bottom"===this._direction&&(this._tooltip.style.bottom=Math.round(v-a-o.contentHeight(this._tooltipContent)+10)+"px")}}},{key:"hide",value:function(){this._tooltipShown&&(this._tooltip.parentElement&&this._tooltip.parentElement.removeChild(this._tooltip),this._tooltipShown=!1)}},{key:"isOpened",value:function(){return this._tooltipShown}},{key:"getElem",value:function(){return this._tooltip}}]),e}()},"704P":function(e,t,i){"use strict";(function(e){var n=i("Ss5c").LineDataSource,r=i("jkoZ"),o=i("Ocx9").DefaultProperty,s=i("k9/m").PlotRowSearchMode,a=i("s1Gx").sortSourcesPreOrdered.LineToolExecution;function l(e,t){this._pane=e,this._timeScale=t}function c(e){this._line=e}function u(e,t){this._adapter=new c(this);var r=t||u.createProperties();this.customization={forcePriceAxisLabel:!1,disableSelection:!0,disableErasing:!0},n.call(this,e,r),i.e("lt-pane-views").then(function(e){var t=i("tjxb").ExecutionPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}l.prototype._cachedByBarIndexOrderedExecutions={},l.recreateOrderedByBarsSourcesCache=function(e){l.clearOrderedByBarsSourcesCache();for(var t=l.prototype,i=e.orderedSources(),n=0;n_.lastBar()||i<_.firstBar())return{x:-1,y:-1};for(var f=this._cachedByBarIndexOrderedExecutions[i]||this._pane.orderedSources(),m=f.length-1;m>=0;--m){var v=f[m];if(v instanceof u&&v._adapter._index===i&&v._adapter.getDirection()===r){if(v===e._line)break;var y=v._adapter._height();n=o?n+y:n-y}}return{x:t.indexToCoordinate(i),y:n}},c.prototype._height=function(){var e=this.getArrowHeight(),t=this.getArrowSpacing();this.getText()&&r.fontHeight(this.getFont());return e+t+0+10},c.prototype.getIndex=function(){return this._line._model.timeScale().baseIndex()-this._line.points()[0].index},c.prototype.setIndex=function(e){var t=this._line._model.timeScale().baseIndex()-Math.abs(e);this._line.startMoving({logical:this._line.points()[0]});var i=TradingView.merge({},this._line.points()[0]);return i.index=t,this._line.move({logical:i}),this._line.endMoving(),this},c.prototype.getTime=function(){ +return this._unixtime},c.prototype.setTime=function(e){var t=this._line._model.mainSeries();return this._unixtime=ChartApiInstance.alignTimePoint?ChartApiInstance.alignTimePoint(e,t.interval(),t.symbolInfo()):e,this._line.restorePoints([{offset:0,price:this.getPrice(),time_t:this._unixtime}],[]),this._line.createServerPoints(),this},c.prototype.getPrice=function(){return this._line.points().length>0?this._line.points()[0].price:this._line._timePoint.length>0?this._line._timePoint[0].price:void 0},c.prototype.setPrice=function(e){return this._line.points().length>0&&(this._line.points()[0].price=e),this._line._timePoint.length>0&&(this._line._timePoint[0].price=e),this},c.prototype.getText=function(){return this._line.properties().text.value()},c.prototype.setText=function(e){return this._line.properties().text.setValue(e||""),this._line.updateAllViewsAndRedraw(),this},c.prototype.getArrowHeight=function(){return this._line.properties().arrowHeight.value()},c.prototype.setArrowHeight=function(e){return this._line.properties().arrowHeight.setValue(e||5),this},c.prototype.getArrowSpacing=function(){return this._line.properties().arrowSpacing.value()},c.prototype.setArrowSpacing=function(e){return this._line.properties().arrowSpacing.setValue(e||1),this},c.prototype.getDirection=function(){return this._line.properties().direction.value()},c.prototype.setDirection=function(e){return this._line.properties().direction.setValue(e||"buy"),this},c.prototype.getArrowColor=function(){var e=this._line.properties();return"buy"===this.getDirection()?e.arrowBuyColor.value():e.arrowSellColor.value()},c.prototype.setArrowColor=function(e){return"buy"===this.getDirection()?this.setArrowBuyColor(e):this.setArrowSellColor(e),this},c.prototype.setArrowBuyColor=function(e){return this._line.properties().arrowBuyColor.setValue(e),this},c.prototype.setArrowSellColor=function(e){return this._line.properties().arrowSellColor.setValue(e),this},c.prototype.getTextColor=function(){return r.getColorFromProperties(this._line.properties().textColor,this._line.properties().textTransparency)},c.prototype.setTextColor=function(e){return r.setColorToProperties(e,this._line.properties().textColor,this._line.properties().textTransparency),this},c.prototype.getFont=function(){return r.getFontFromProperties(this._line.properties().fontFamily,this._line.properties().fontSize,this._line.properties().fontBold,this._line.properties().fontItalic)},c.prototype.setFont=function(e){return r.setFontToProperties(e,this._line.properties().fontFamily,this._line.properties().fontSize,this._line.properties().fontBold,this._line.properties().fontItalic),this},c.prototype.setTooltip=function(e){return null==e?e="":e+="",this._line.properties().tooltip.setValue(e),this},c.prototype.getTooltip=function(){return this._line.properties().tooltip.value()},c.prototype.remove=function(){this._line._model.removeSource(this._line),delete this._line},c.prototype.getPoints=function(){return this._line.points()},inherit(u,n),u.prototype.zorder=function(){return a},u.POINTS_COUNT=1, +u.prototype.pointsCount=function(){return u.POINTS_COUNT},u.prototype.translatedType=function(){return"Execution"},u.prototype.name=function(){return"Execution"},u.prototype.hasContextMenu=function(){return!1},u.prototype.state=function(){return null},u.prototype.updateAllViews=function(){return this._isVisible()?n.prototype.updateAllViews.call(this):null},u.prototype.priceAxisViews=function(e,t){return this._isVisible()?n.prototype.priceAxisViews.call(this,e,t):null},u.prototype._isVisible=function(){return this._model.properties().tradingProperties.showExecutions.value()},u.prototype.paneViews=function(){return TradingView.printing&&!e.enabled("snapshot_trading_drawings")?null:this._model.properties().tradingProperties.showExecutions.value()?n.prototype.paneViews.call(this):null},u.prototype.userEditEnabled=function(){return!1},u.prototype.showInObjectTree=function(){return!1},u.prototype.cloneable=function(){return!1},u.prototype.copiable=function(){return!1},u.createProperties=function(e){var t=new o("linetoolexecution",e,!1,!1);return u._configureProperties(t),t},u._configureProperties=function(e){n._configureProperties(e)},t.ExecutionsPositionController=l,t.LineToolExecution=u}).call(this,i("Kxc7"))},"7Fue":function(e,t,i){"use strict";i.d(t,"a",(function(){return o})),i.d(t,"b",(function(){return s}));var n=i("mrSG"),r=["horizlines","vertlines","lines","hlines","textmarks","shapemarks","backgrounds","polygons","trendchannels","hhists","dwglabels","dwglines"];function o(e){return!r.some((function(t){return e[t]().size>0}))}function s(e){var t=new Map;return e.forEach((function(e,i){e.forEach((function(e){var r=Object(n.__assign)(Object(n.__assign)({},e),{styleId:i}),o=e.firstBarTime,s=t.get(o);void 0===s&&(s=new Set,t.set(o,s)),s.add(r)}))})),t}},"7KDR":function(e,t,i){"use strict";i.r(t),i.d(t,"Action",(function(){return c})),i.d(t,"ActionAsync",(function(){return u})),i.d(t,"Separator",(function(){return h}));var n=i("mrSG"),r=i("zRdu"),o=i("aIyQ"),s=i.n(o),a=i("/3z9"),l=i("e3/o"),c=function(){function e(e,t){void 0===t&&(t=l.guid()),this.type=r.a.Action,this._destroyed=!1,this._binding=null,this.id=t,this._onUpdate=new s.a,this._options=e,this.update(e)}return e.prototype.execute=function(){this._options.checkable&&this.update({checked:!this._options.checked}),this._options.onExecute&&this._options.onExecute(this)},e.prototype.getLabel=function(){return this._options.label||""},e.prototype.getSubItems=function(){return this._options.subItems||[]},e.prototype.isDisabled=function(){return!0===this._options.disabled},e.prototype.isActive=function(){return!0===this._options.active},e.prototype.isCheckable=function(){return!0===this._options.checkable},e.prototype.isChecked=function(){return!0===this._options.checked},e.prototype.getPayload=function(){return this._options.payload},e.prototype.update=function(e){this._destroyed||(this._unbindShortcut(),e.hotkeyHash&&(this._options.shortcutHint=Object(a.humanReadableHash)(e.hotkeyHash)),this._options=Object.assign(this._options,e),this._bindShortcut(), +this._onUpdate.fire(this))},e.prototype.onUpdate=function(){return this._onUpdate},e.prototype.getState=function(){return{label:this.getLabel(),disabled:this.isDisabled(),active:this.isActive(),subItems:this.getSubItems(),checkable:this.isCheckable(),checked:this.isChecked(),doNotCloseOnClick:this._options.doNotCloseOnClick||!1,shortcutHint:this._options.shortcutHint,hint:this._options.hint,icon:this._options.icon,iconChecked:this._options.iconChecked,toolbox:this._options.toolbox,showToolboxOnHover:this._options.showToolboxOnHover||!1,statName:this._options.statName,name:this._options.name,fullWidthLabel:this._options.fullWidthLabel}},e.prototype.getBinding=function(){return this._binding},e.prototype.setBinding=function(e){this._binding=e},e.prototype.destroy=function(){this._destroyed=!0,this._onUpdate.destroy(),null!==this._binding&&this._binding.destroy(),this._unbindShortcut()},e.prototype._bindShortcut=function(){var e=this;if(this._options.hotkeyGroup&&this._options.hotkeyHash){var t="string"==typeof this._options.label?this._options.label:this._options.name;this._hotkeyAction=this._options.hotkeyGroup.add({hotkey:this._options.hotkeyHash,desc:t,handler:function(){return e.execute()},isDisabled:function(){return e.isDisabled()}})}},e.prototype._unbindShortcut=function(){this._hotkeyAction&&(this._hotkeyAction.destroy(),delete this._hotkeyAction)},e}(),u=function(e){function t(t,i){var n=e.call(this,{},i)||this;return n.type=r.a.ActionAsync,n._loader=t,n._loaded=!1,n}return Object(n.__extends)(t,e),t.prototype.loadOptions=function(){var e=this;return this._loadingPromise||(this._loadingPromise=this._loader().then((function(t){e.update(t),e._loaded=!0}))),this._loadingPromise},t.prototype.isLoaded=function(){return this._loaded},t}(c),h=function(){function e(e,t){void 0===t&&(t=l.guid()),this.type=r.a.Separator,this.id=t,this._hint=e}return e.prototype.getHint=function(){return this._hint},e}()},"7MZv":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.showTooManyStudiesNotice=function(e){"number"!=typeof e&&(e=TradingView.STUDY_COUNT_LIMIT);(0,n.showNoticeDialog)({title:window.t("Warning"),content:window.t("Studies limit exceeded: {0} studies per layout.\nPlease, remove some studies.").format(e)})};var n=i("brCa")},"7RN7":function(e,t,i){"use strict";i.d(t,"b",(function(){return n})),i.d(t,"a",(function(){return r}));var n=52,r=5},"7dm8":function(e,t,i){"use strict";i.d(t,"a",(function(){return r})),i.d(t,"b",(function(){return o})),i.d(t,"c",(function(){return s})),i.d(t,"d",(function(){return a})),i.d(t,"e",(function(){return l}));var n=i("ocLq"),r=function(){function e(){}return e.prototype.init=function(e,t){e.new_sym(t(1),n.Std.period(e),n.Std.period(e)),this._source=t(0),this._scaleFactor1=1,this._scaleFactor2=1},e.prototype.main=function(e,t){var i=e.symbol.time,r=n.Std[this._source](e);e.select_sym(1);var o=n.Std[this._source](e),s=e.new_unlimited_var(o),a=e.new_unlimited_var(e.symbol.time);if(e.select_sym(0),isNaN(i))return null;var l=a.indexOf(i) +;-1!==l&&a.get(l)!==i&&(l=-1);var c=l<0?NaN:s.get(l);return[this._doCalculation(this._scaleFactor1,r,this._scaleFactor2,c)]},e}(),o={styles:{plot1:{linestyle:0,linewidth:2,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#800080"}},precision:2,inputs:{source:"close",symbol2:""}},s=[{defval:"close",id:"source",name:"Source",options:["open","high","low","close","hl2","hlc3","ohlc4"],type:"text"},{id:"symbol2",name:"Symbol",type:"symbol",confirm:!0}],a=[{id:"plot1",type:"line"}],l={plot1:{title:"Plot",histogramBase:0}}},"7ktv":function(e,t,i){"use strict";i.r(t),i.d(t,"PriceDataSource",(function(){return a}));var n=i("mrSG"),r=i("fgLi"),o=i("aIyQ"),s=i.n(o),a=function(e){function t(t){var i=e.call(this)||this;return i._formatterChanged=new s.a,i._priceStepChanged=new s.a,i._currencyChanged=new s.a,i._metaInfo=null,i._priceStep=null,i._model=t,i}return Object(n.__extends)(t,e),t.prototype.firstValue=function(){return null},t.prototype.barColorer=function(){return null},t.prototype.base=function(){return 0},t.prototype.model=function(){return this._model},t.prototype.currencyChanged=function(){return this._currencyChanged},t.prototype.isCurrencySource=function(){return!0},t.prototype.priceRange=function(e,t){return null},t.prototype.isDraggable=function(){return!this._metaInfo||!this._metaInfo.linkedToSeries},t.prototype.priceLineColor=function(e){return e},t.prototype.formatterChanged=function(){return this._formatterChanged},t.prototype.priceStep=function(e){return this._priceStep},t.prototype.priceStepChanged=function(){return this._priceStepChanged},t.prototype.hasStateForAlert=function(){return!1},t.prototype.isIncludedInAutoScale=function(){return!0},t}(r.DataSource)},"7nsU":function(e,t,i){"use strict";i.r(t),i.d(t,"showConfirmInputsDialog",(function(){return n}));i("YFKU");function n(e,t,n,r,o){void 0===o&&(o="default"),Promise.all([i.e("react"),i.e(1),i.e(3),i.e(4),i.e(6),i.e(7),i.e(8),i.e(9),i.e(10),i.e(13),i.e(16),i.e(19),i.e(22),i.e(25),i.e(29),i.e(56),i.e(93),i.e(0),i.e(2),i.e(5),i.e(11),i.e(17),i.e(20),i.e(28),i.e(49),i.e("new-confirm-inputs-dialog")]).then(i.bind(null,"iqv3")).then((function(i){var s=new i.ConfirmInputsDialogRenderer(function(e){if("symbol"===e)return window.t("Add Symbol");return window.t("Confirm Inputs")}(o),e,t,o,n,r);return s.show(),s}))}},"7qI1":function(e,t,i){"use strict";i.r(t),i.d(t,"LineToolRectangle",(function(){return h}));var n=i("mrSG"),r=i("YFKU"),o=i("aO4+"),s=i("Ocx9"),a=i("tc+8"),l=i.n(a),c=i("Ss5c"),u=Object(r.t)("Rectangle"),h=function(e){function t(n,r){var o=this,s=r||t.createProperties();return o=e.call(this,n,s)||this,i.e("lt-pane-views").then(function(e){var t=[new(0,i("GW0y").RectanglePaneView)(o,n)];o._setPaneViews(t)}.bind(null,i)).catch(void 0),o}return Object(n.__extends)(t,e),t.prototype.pointsCount=function(){return 2},t.prototype.properties=function(){return e.prototype.properties.call(this)},t.prototype.translatedType=function(){return u},t.prototype.name=function(){return"Rectangle"},t.prototype.setPoint=function(t,i,n){ +if(t<2)e.prototype.setPoint.call(this,t,i,n);else{if(n&&n.shift()&&this.properties().childs().snapTo45Degrees){var r=this._getAnchorPointForIndex(t);if(t>=4)return this._correctMiddlePoints(t,i,r),void this.normalizePoints();this._snapPoint45Degree(i,r)}switch(t){case 2:this._points[1].price=i.price,this._points[0].index=i.index;break;case 3:this._points[0].price=i.price,this._points[1].index=i.index;break;case 4:this._points[0].index=i.index;break;case 5:this._points[1].index=i.index;break;case 6:this._points[0].price=i.price;break;case 7:this._points[1].price=i.price}this.normalizePoints()}},t.prototype.template=function(){var t=e.prototype.template.call(this);return t.text=this.properties().childs().text.value(),t},t.createProperties=function(e){var i=new s.DefaultProperty("linetoolrectangle",e);return t._configureProperties(i),i},t.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(i.bind(null,"K4wI")).then((function(e){return e.RectangleDefinitionsViewModel}))},t.prototype._applyTemplateImpl=function(t){e.prototype._applyTemplateImpl.call(this,t),this.properties().childs().text.setValue(t.text)},t.prototype._snapPoint45Degree=function(e,t,i){var n=this.m_priceScale,r=this.ownerSource();if(null!==n&&null!==r){var o=r.firstValue();if(null!==o){var s=this._model.timeScale(),a=this.pointToScreenPoint(e)[0],l=this.pointToScreenPoint(t)[0],c=a.x-l.x,u=a.y-l.y,h=c<0?-1:1,d=u<0?-1:1,p=Math.max(Math.abs(c),Math.abs(u)),_=Math.round(s.coordinateToIndex(l.x+p*h)),f=Math.abs(s.indexToCoordinate(_)-l.x),m=n.coordinateToPrice(l.y+f*d,o);e.index=_,e.price=m}}},t.prototype._correctMiddlePoints=function(e,t,i){e<6?this._correctRightLeftMiddlePoint(e,t,i):this._correctTopBottomMiddlePoint(e,t,i)},t.prototype._correctRightLeftMiddlePoint=function(e,t,i){var n=this.pointToScreenPoint(t)[0],r=this.pointToScreenPoint(i)[0],s=this.pointToScreenPoint(this._points[0])[0],a=this.pointToScreenPoint(this._points[1])[0],l=n.x-r.x;if(0!==l){var c=s.x0)}},t.prototype._paneText=function(e){var t="",i=this._studyCompare.model().properties().scalesProperties;i.showSymbolLabels.value()&&(t+=this._studyCompare.symbol()+" ");var n=this._studyCompare.priceScale();return null!==n&&i.showSeriesLastValue.value()&&i.seriesLastValueMode.value()===r.PriceAxisLastValueMode.LastPriceAndPercentageValue&&(t+=n.isPercentage()?e.formattedPriceAbsolute:e.formattedPricePercentage),t.trim()},t.prototype._axisText=function(e){var t=this._studyCompare.model().properties().scalesProperties,i=this._studyCompare.priceScale();return t.seriesLastValueMode.value()!==r.PriceAxisLastValueMode.LastPriceAndPercentageValue||null===i?e.text:i.isPercentage()?e.formattedPricePercentage:e.formattedPriceAbsolute},t}(i("KcY8").a)},"8gnj":function(e,t,i){"use strict";(function(t){var n=i("ESp1").HeikenAshi,r=i("LxhU").Interval,o=function(){var e=i("ocLq"),o=i("IiTo"),s=e.Symbol,a=e.StudyEngine,l=e.BarBuilder,c=e.BarSet;function u(e){this.host=e,this.cache={}}function h(e){var t=e.indexOf(",");return-1===t?e:e.slice(0,t)}function d(e){return e.has_empty_bars||e.force_session_rebuild}function p(e){return"string"==typeof e&&"="===e[0]}function _(e){if(!p(e))return{symbol:e};var t;try{t=JSON.parse(e.slice(1))}catch(i){return{symbol:e}}return t.type&&(0===t.type.indexOf("BarSetHeikenAshi@tv-basicstudies-")?t.builder=new n:console.error("unknown builder type: "+t.type)),"string"!=typeof t.symbol&&(t.session=t.symbol.session||t.session,t.currencyCode=t.symbol.currencyCode||t.currencyCode,t.symbol=t.symbol.symbol),t}u.prototype.getCache=function(e){return this.cache[e]},u.prototype.putCache=function(e,t){this.cache[e]=t},u.prototype.subscribe=function(e,t,i,n,r,o,s,a,l,c,u){var h=function(e,t,i,n,r,o,s,a){var l=d(r)?"_":"";return o+e+i+(t||"")+n+l+s+"_"+a}(e,t,i,n,a,l,r,u),p=this.getCache(h);return p||(p=this.createItem(e,t,i,n,a,c,l,r,u),this.putCache(h,p)),p.listeners.addListener(o,s),{key:h,listener:o}},u.prototype.unsubscribe=function(e){var t=this.getCache(e.key);t&&t.listeners.removeListener(e.listener)},u.prototype.removeUnused=function(){var e=[];for(var t in this.cache){if(this.cache[t])0===this.cache[t].listeners.listenersCount()&&e.push(t)}if(0!==e.length){for(var i=0;i=0;l--){var c=+a[l];if(o%c==0)return c+(n.isSeconds?"S":"")}return""}return o+(n.isSeconds?"S":"")},u.prototype.createItem=function(e,t,i,n,o,s,a,c,u){var p=new v,y=_(e);if(t=y.currencyCode||t,y.builder)return new m(p,y.symbol,t,i,n,y.builder,o,s,a);var g=h(i),b=this.rebuildFrom(g,h(n),o),S=d(o);if(!r.isEqual(g,b)||S){var w=o.has_empty_bars,P=Object.assign({},o);return S&&(P.has_empty_bars=!1,P.force_session_rebuild=!1),new m(p,y.symbol,t,i,b,new l(i,w),P,s,a,c,u)}var C=y.session&&"extended"!==y.session,x={currency:t};return new f(p,y.symbol,x,i,n,C,this.host,o,s,c,u)};var f=function(e,t,i,n,r,o,s,a,l,c,u){this.listeners=e,this.host=s;var d=this;this.host.resolve(t,i,(function(e){o&&e.regular_session&&(e.session=e.regular_session);var i=d.calculateFromTo(e,c||r||n,t,l,u);d.subs=d.host.subscribe(e,h(n),i,(function(e){d.listeners.fire(e)}),(function(e){d.listeners.onError(e)}))}),(function(e){d.listeners.onError(e)}))};f.prototype.stop=function(){this.subs&&this.host.unsubscribe(this.subs)},f.prototype.calculateFromTo=function(e,i,n,r,a){var l,c,u,h=s.parsePeriod(i),d=(new Date).valueOf(),p=e.expired&&t.cal_to_utc(t.get_timezone(e.timezone),new Date(1e3*e.expiration_date))||d;if(""===h.resolution)c=h.interval,u="D";else if("S"===h.resolution)c=10*h.interval,u="";else{c=12*("D"===h.resolution?1:"W"===h.resolution?5:30)*h.interval,u="M"}if(h.range)c=h.range.interval,u=h.range.resolution;else if(this.host.calculateHistoryDepth){var _=this.host.calculateHistoryDepth(i,u,c);_&&(c=_.intervalBack||c,u=void 0===_.resolutionBack?u:_.resolutionBack)}var f=e.sessionString||e.session;if(l=o.alignPeriodsBack(f,e.holidays,e.corrections,u,c,1,p),r&&r.getRangeExtensionTime){var m=r.getRangeExtensionTime();m&&(l=Math.min(1e3*m,l))}var v=Math.ceil(1.5*a);return r&&r.getRangeExtensionCount&&(v+=r.getRangeExtensionCount()),v>0&&(l=o.alignPeriodsBack(f,e.holidays,e.corrections,h.resolution,h.interval,v,l)),{from:l,to:p+6e4}};var m=function(e,t,i,n,r,o,s,l,c,u,h){if(this.listeners=e,this.isRecalculated=!1,""===r)return console.error("unsupported resolution for rebuild: "+n),void this.listeners.onError("unsupported resolution for rebuild: "+n);this.symbolInfo=s;var d=this;this.engine=new a({tickerid:t,currencyCode:i,period:r,periodBase:n,body:o,sessionId:c,symbolInfo:s,rangeExtension:l,periodForInitialRange:u,additionalBarsCount:h,recalc:function(e,t){d._recalc(t)},out:function(e,t){d._out(e,t)},nonseriesOut:function(e,t){d._nonseriesOut(e,t)},setNoMoreData:function(){d.barset&&(d.barset.endOfData=!0)},onErrorCallback:function(e){d.listeners.onError(e)}})};m.prototype.stop=function(){this.engine?this.engine.stop():console.error("Internal library error 0x1")}, +m.prototype._recalc=function(e){this.isRecalculated&&console.error("recalc called twice!"),this.barset||(this.barset=new c(this.symbolInfo)),e&&(this.barset.nextTime=e.nextTime,this.barset.endOfData=e.endOfData),this.listeners.fire(this.barset),this.isRecalculated=!0},m.prototype._nonseriesOut=function(e,t){var i=Object.assign({},t);i.nonseries=!0,i.data=t.bars,delete i.bars,i.barsetSize=this.barset?this.barset.count():0,i.lastBar=this.barset?this.barset.bar(this.barset.count()-1):null,this.listeners.fire(i,!0)},m.prototype._out=function(e,t){var i=t[0];if(!isNaN(i)){var n={time:i,open:t[1],high:t[2],low:t[3],close:t[4],volume:t[5],updatetime:t[6]},r=t[7];this.barset||(this.barset=new c(e.info));var o=t[8];if(o instanceof Array)for(var s=0;s=1;--t){var n=this._ticker.slice(0,t);if(e(n)){this._root=n,this._contract=this._ticker.slice(t);break}}},m.prototype.exchange=function(e){if(this.hasOwnProperty("_ticker")||this.parse(),!(arguments.length>0))return this._exchange;null==e?delete this._exchange:this._exchange=e+""},m.prototype.ticker=function(e){if(this.hasOwnProperty("_ticker")||this.parse(),!(arguments.length>0))return this._ticker;null==e?delete this._ticker:this._ticker=e+"",delete this._root,delete this._contract},m.prototype.root=function(e){if(this.hasOwnProperty("_root")||this.parseAsFutures(),!(arguments.length>0))return this._root;null==e?delete this._root:(this._root=e+"",this._root&&(this._ticker=this._root+(this._contract||"")))},m.prototype.contract=function(e){if(this.hasOwnProperty("_contract")||this.parseAsFutures(),!(arguments.length>0))return this._root;null==e?delete this._contract:(this._contract=e+"",this._root&&(this._ticker=this._root+this._contract))},n(v,r),v.prototype.toString=function(){return this.hasOwnProperty("_normalizedValue")?this._normalizedValue:this.value},v.prototype.parse=function(){this._normalizedValue=this.value.replace(/^0+|\.0*$/g,"").replace(/(\.\d*?)0+$/,"$1").replace(/^(\.|$)/,"0$1")},y.prototype.toString=function(){return this.value},n(g,m),g.prototype.isIncomplete=!0, +g.prototype.incompleteSuggest=function(){if("'"!==this.value)return String("'")},n(b,v),b.prototype.isIncomplete=!0;var S=new RegExp(e.map((function(e){return"("+("string"==typeof e.pattern?e.pattern.replace(/[\^$()[\]{}*+?|\\]/g,"\\$&"):e.pattern.source)+")"})).concat(".").join("|"),"g");function w(t,i){var n,r=[];e:for(;n=S.exec(t);){for(var s=e.length;s--;)if(n[s+1]){if(e[s].ctor){var a=new e[s].ctor(n[s+1]);a._offset=n.index,r.push(a)}continue e}var l=new y(n[0]);l._offset=n.index,r.push(l)}if(i&&i.recover){var c;for(s=r.length;s--;){var u=r[s];if(u instanceof v||u instanceof m){if(void 0!==c){var h=new m(""),d=r.splice(s,c-s+1,h);h.value=d.map((function(e){return e.value})).join("")}c=s}else u instanceof o||(c=void 0)}}return r}function P(e){for(var t=[],i=0;io.precedence&&(n[n.length-1].minPrecedence=o.precedence);else if(o instanceof s)n.push(t={minPrecedence:1/0,openBraceIndex:r});else if(o instanceof a){var c=e[(t=n.pop()).openBraceIndex-1],u=e[r+1];u instanceof l&&!(u.precedence<=t.minPrecedence)||!(!(c instanceof l)||c.precedencet.minPrecedence&&(n[n.length-1].minPrecedence=t.minPrecedence))}}for(r=i.length;r--;)e.splice(i[r],1);return e}function x(e){if("string"!=typeof e)throw new TypeError("expression must be a string");return(e=w(e)).filter((function(e){return e instanceof m})).map((function(e){return e.exchange()})).filter((function(e){return e}))}function T(e){return 1!==(e=x(e)).length?null:e[0]}function I(e,t){return(e=x(e)).some((function(e){return t.includes((e||"").toUpperCase())}))}function M(e){return e.join("")}return{tokenize:w,validate:function(e){if(t.enabled("charting_library_base"))return{currentState:"var"};for(var i="init",n={warnings:[],errors:[],isEmpty:!0},r=[],c=0;ct[t.length-1].time+i)return null;var n=t[Object(a.lowerbound)(t,e.x-i,(function(e,t){return e.timen.time+i)return null;var r=Object(l.selectionTolerance)(this._barWidth),o=Math.min(n.high,n.low),s=Math.max(n.high,n.low),u=this._data.fontSize;return o-r-u<=e.y&&e.y<=o+r||s-r<=e.y&&e.y<=s+r+u?new c.HitTestResult(c.HitTestResult.REGULAR):null},t.prototype._drawImpl=function(e){if(null!==this._data&&null!==this._barWidth){e.save(),e.translate(.5,.5),e.textAlign="center",e.fillStyle=this._data.labelColor,e.font=Object(o.makeFont)(this._data.fontSize,this._data.font);for(var t=this._data.bars,i=this._data.inverted,n=0;n5},t.prototype._getLabelWidth=function(e){return this._widthsCache.measureText(this._context,e)},t}(s.SeriesBarCandlesPaneView)},"9QkW":function(e,t,i){"use strict";var n=i("Ss5c").LineDataSource,r=i("5rJj"),o=i("ytGH").LineToolWidthsProperty,s=window.t("Fib Wedge");function a(e,t){var r=t||a.createProperties();n.call(this,e,r),i.e("lt-pane-views").then(function(e){var t=i("1SUO").FibWedgePaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe);for(var s=[this._properties.child("trendline").child("linewidth")],l=1;l<=a.LevelsCount;l++)s.push(this._properties.child("level"+l).child("linewidth"));this._widthsProperty=new o(s)}inherit(a,n),a.LevelsCount=11,a.prototype.isSynchronizable=function(){return!1},a.prototype.levelsCount=function(){return a.LevelsCount},a.prototype.pointsCount=function(){return 3},a.prototype.translatedType=function(){return s},a.prototype.name=function(){return"Fib Wedge"},a.prototype.hasEditableCoordinates=function(){return!1},a.prototype.setPoint=function(e,t){if(n.prototype.setPoint.call(this,e,t),!this._recursiveGuard){if(this._recursiveGuard=!0,2===e){var i=this.pointToScreenPoint(this._points[0])[0],r=this.pointToScreenPoint(this._points[1])[0],o=(l=this.pointToScreenPoint(this._points[2])[0]).subtract(i).length(),s=r.subtract(i).normalized();r=i.add(s.scaled(o));var a=this.screenPointToPoint(r);this._properties.points[1].price.setValue(a.price),this._properties.points[1].bar.setValue(a.index)}else{i=this.pointToScreenPoint(this._points[0])[0],r=this.pointToScreenPoint(this._points[1])[0];var l=this.pointToScreenPoint(this._points[2])[0],c=r.subtract(i).length();s=l.subtract(i).normalized();l=i.add(s.scaled(c));a=this.screenPointToPoint(l);this._properties.points[2].price.setValue(a.price),this._properties.points[2].bar.setValue(a.index)}this._recursiveGuard=!1}},a.prototype.addPoint=function(e){if(2===this._points.length){var t=this.pointToScreenPoint(this._points[0])[0],i=this.pointToScreenPoint(this._points[1])[0],r=this.pointToScreenPoint(e)[0],o=i.subtract(t).length(),s=r.subtract(t).normalized();r=t.add(s.scaled(o)) +;var a=this.ownerSource().firstValue(),l=this.priceScale().coordinateToPrice(r.y,a);e={index:Math.round(this._model.timeScale().coordinateToIndex(r.x)),price:l}}return n.prototype.addPoint.call(this,e)},a.prototype.processErase=function(e,t){var i="level"+t,n=this.properties()[i].visible;e.setProperty(n,!1,"Erase level line")},a.createProperties=function(e){var t=new r("linetoolfibwedge",e,!1,{range:[1,11]});return a._configureProperties(t),t},a.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("6mGk").FibWedgeDefinitionsViewModel}.bind(null,i)).catch(i.oe)},a._configureProperties=function(e){n._configureProperties(e)},t.LineToolFibWedge=a},"9dnG":function(e,t){e.exports=''},"9iCb":function(e,t,i){"use strict";i.r(t),i.d(t,"applyOverridesToStudy",(function(){return u})),i.d(t,"applyOverridesToStudyDefaults",(function(){return h}));var n,r,o=i("Eyy1"),s=i("23IT"),a=i("txPx"),l=Object(a.getLogger)("Chart.Model.StudyPropertiesOverrider");function c(e,t,i,o){var s=i.split(".");if(0!==s.length&&0!==s[0].length){var a,c,u=(a=s[0],{name:(c=a.split(":"))[0],type:2===c.length?c[1]:null}),h=u.name,d=u.type,p=null!==d,_=!p||"band"===d,f=!p||"area"===d,m=!p||"input"===d,v=!p||"plot"===d?r.getPlotIdByTitle(e,h):null,y=_?r.getBandIndexByName(e,h):null,g=f?r.getFilledAreaIdByTitle(e,h):null,b=m?r.getInputByName(e,h):null,S=t.hasOwnProperty(h);if((null!==v?1:0)+(null!==y?1:0)+(null!==g?1:0)+(null!==b?1:0)+(S?1:0)>1)l.logWarn("Study '"+e.description+"' has ambiguous identifier '"+h+"'");else{var w=s[1];if(null!==v){if(1===s.length)return void l.logWarn("Path of sub-property of '"+h+"' plot for study '"+e.description+"' must be not empty");var P=s.slice(1);n.applyPlotProperty(e,t,v,P,o)}else if(null!==b)n.applyInputValue(t,b,o);else if(null!==y){if(void 0===w)return void l.logWarn("Property name of '"+h+"' band for study '"+e.description+"' must be set");n.applyBandProperty(t,y,w,o)}else if(null!==g){if(void 0===w)return void l.logWarn("Property name of '"+h+"' area for study '"+e.description+"' must be set");n.applyFilledAreaProperty(t,g,w,o)}else S?n.setRootProperty(t,s,o):l.logWarn("Study '"+e.description+"' has no plot or input '"+h+"'")}}}function u(e,t){var i=e.properties(),n=i.state();for(var r in t)t.hasOwnProperty(r)&&c(e.metaInfo(),n,r,t[r]);i.mergeAndFire(n)}function h(e,t,i){for(var n in e)if(e.hasOwnProperty(n)){var o=n.indexOf(".");if(-1!==o){var s=n.substr(0,o),a=r.getMetaInfoByDescription(t,s);if(null!==a){var u=i(a);null!==u?c(a,u,n.substr(o+1),e[n]):l.logWarn("Cannot apply overrides for study "+s)}else l.logWarn("There is no such study "+s)}}}!function(e){var t={line:s.LineStudyPlotStyle.Line,histogram:s.LineStudyPlotStyle.Histogram,cross:s.LineStudyPlotStyle.Cross,area:s.LineStudyPlotStyle.Area, +columns:s.LineStudyPlotStyle.Columns,circles:s.LineStudyPlotStyle.Circles,line_with_breaks:s.LineStudyPlotStyle.LineWithBreaks,area_with_breaks:s.LineStudyPlotStyle.AreaWithBreaks};e.applyPlotProperty=function(e,i,n,r,a){if(void 0!==i.styles){var c=r[0];if("color"!==c){var u=i.styles[n];if(void 0!==u&&u.hasOwnProperty(c)){if("plottype"===c){var h=t[String(a)];if(void 0===h)return void l.logWarn("Unsupported plot type for plot: "+a);a=h}u[c]=a}else l.logWarn("Study plot does not have property '"+c+"'")}else{!function(e,t,i,n,r){if(void 0!==e.styles)if(null===t&&!isNaN(n)&&n>0)l.logWarn("Study plot does not have color #"+n);else{if(0===n||isNaN(n))Object(o.ensureDefined)(e.styles[i]).color=String(r),n=0;null!==t&&(Object(o.ensureDefined)(t.colors[n]).color=String(r))}else l.logWarn("Study does not have styles")}(i,function(e,t,i){if(void 0===e.plots)return null;for(var n=0,r=e.plots;n1?parseInt(r[1]):NaN,a)}}else l.logWarn("Study does not have styles")},e.applyBandProperty=function(e,i,n,r){if(void 0!==e.bands){var o=e.bands[i];if(void 0!==o&&o.hasOwnProperty(n)){if("plottype"===n){var s=t[String(r)];if(void 0===s)return void l.logWarn("Unsupported plot type for band: "+r);r=s}o[n]=r}else l.logWarn("Study band does not have property '"+n+"'")}else l.logWarn("Study does not have bands")},e.applyFilledAreaProperty=function(e,t,i,n){if(void 0!==e.filledAreasStyle){var r=e.filledAreasStyle[t];void 0!==r&&r.hasOwnProperty(i)?r[i]=n:l.logWarn("Study area does not have property '"+i+"'")}else l.logWarn("Study does not have areas")},e.applyInputValue=function(e,t,i){void 0!==e.inputs&&e.inputs.hasOwnProperty(t)?e.inputs[t]=i:l.logWarn("Study does not have input '"+t+"'")},e.setRootProperty=function(e,t,i){if(0!==t.length){for(var n=e,r=0,o=t.slice(0,-1);r=this.chartsCount())throw Error("Incorrect index: "+e);return this._getChartWidgetApi(this._chartWidgetCollection.getAll()[e])},b.prototype.getSymbolInterval=function(e){var t={symbol:r.symbol.value(),interval:r.interval.value()};return e&&e(t),t},b.prototype.saveChart=function(e){var t=this;this._saveChartService.whenReadyToSave((function(){var i=t._saveChartService.saveToJSON();return e&&e(JSON.parse(i.content))}))},b.prototype.loadChart=function(e){this._chartApiInstance.disconnect(),this._chartWidgetCollection.loadContent(e.json),this._chartWidgetCollection.purgeUnusedWidgets(),e.extendedData&&(this._chartWidgetCollection.metaInfo.id.setValue(e.extendedData.uid),this._chartWidgetCollection.metaInfo.uid.setValue(e.extendedData.uid),this._chartWidgetCollection.metaInfo.name.setValue(e.extendedData.name)),this._chartApiInstance.connect(),r.symbol.setValue(this.activeChart().symbol()),a.emit("chart_loaded")},b.prototype.getStudiesList=function(){return this._chartApiInstance.allStudiesMetadata().filter((function(e){return!e.is_hidden_study})).map((function(e){return e.description}))},b.prototype.getSavedCharts=function(e){h.getCharts(e)},b.prototype.loadChartFromServer=function(e){h.loadChart(e)},b.prototype.saveChartToServer=function(e,t,i){this._saveChartService.saveChartSilently(e,t,i)},b.prototype.removeChartFromServer=function(e,t){h.removeChart(e,t)},b.prototype.getIntervals=function(){var e=[],t=u.getCustomResolutions();return null!==this._chartApiInstance&&(e=this._chartApiInstance.defaultResolutions()),u.mergeResolutions(e,t)},b.prototype.closePopupsAndDialogs=function(){for(var e=document.querySelectorAll("._tv-dialog-title-close"),t=0;t0?this._line.points()[0].price:this._line._timePoint.length>0?this._line._timePoint[0].price:void 0},c.prototype.setPrice=function(e){if(this._line.points().length>0){var t=this._line.points()[0];t.price=e,this._line._points[0]=t,this._line.normalizePoints(),this._line.updateAllViewsAndRedraw()}return this._line._timePoint.length>0&&(this._line._timePoint[0].price=e),this},c.prototype.getText=function(){return this._data.bodyText},c.prototype.setText=function(e){return this._data.bodyText=e||"",this._line.updateAllViewsAndRedraw(),this},c.prototype.setTooltip=function(e){return this._line.properties().tooltip.setValue(u(e)),this},c.prototype.getTooltip=function(){return this._line.properties().tooltip.value()},c.prototype.setModifyTooltip=function(e){return this._line.properties().modifyTooltip.setValue(u(e)),this},c.prototype.getModifyTooltip=function(){return this._line.properties().modifyTooltip.value()},c.prototype.setCancelTooltip=function(e){return this._line.properties().cancelTooltip.setValue(u(e)),this},c.prototype.getCancelTooltip=function(){return this._line.properties().cancelTooltip.value()},c.prototype.getQuantity=function(){return this._data.quantityText},c.prototype.setQuantity=function(e){return this._data.quantityText=e||"",this._line.updateAllViewsAndRedraw(),this},c.prototype.getExtendLeft=function(){var e=this._line.properties().extendLeft.value();return"inherit"===e?this._line._model.properties().tradingProperties.extendLeft.value():e},c.prototype.setExtendLeft=function(e){return this._line.properties().extendLeft.setValue(e),this},c.prototype.getLineLength=function(){var e=this._line.properties().lineLength.value();return"inherit"===e?this._line._model.properties().tradingProperties.lineLength.value():e},c.prototype.setLineLength=function(e){return this._line.properties().lineLength.setValue(Math.max(0,Math.min(e,100))),this},c.prototype.getLineColor=function(){var e=this._line.properties();return"buy"===this._direction?this._active?e.lineActiveBuyColor.value():e.lineInactiveBuyColor.value():this._active?e.lineActiveSellColor.value():e.lineInactiveSellColor.value()},c.prototype.setLineColor=function(e){return"buy"===this._direction?this._active?this.setLineActiveBuyColor(e):this.setLineInactiveBuyColor(e):this._active?this.setLineActiveSellColor(e):this.setLineInactiveSellColor(e),this}, +c.prototype.setLineActiveBuyColor=function(e){return this._line.properties().lineActiveBuyColor.setValue(e),this},c.prototype.setLineInactiveBuyColor=function(e){return this._line.properties().lineInactiveBuyColor.setValue(e),this},c.prototype.setLineActiveSellColor=function(e){return this._line.properties().lineActiveSellColor.setValue(e),this},c.prototype.setLineInactiveSellColor=function(e){return this._line.properties().lineInactiveSellColor.setValue(e),this},c.prototype.getLineStyle=function(){var e=this._line.properties().lineStyle.value();return"inherit"===e?this._line._model.properties().tradingProperties.lineStyle.value():e},c.prototype.setLineStyle=function(e){return this._line.properties().lineStyle.setValue(e),this},c.prototype.getLineWidth=function(){var e=this._line.properties().lineWidth.value();return"inherit"===e?this._line._model.properties().tradingProperties.lineWidth.value():e},c.prototype.setLineWidth=function(e){return this._line.properties().lineWidth.setValue(e),this},c.prototype.getBodyBorderColor=function(){var e=this._line.properties();return"buy"===this._direction?this._active?e.bodyBorderActiveBuyColor.value():e.bodyBorderInactiveBuyColor.value():this._active?e.bodyBorderActiveSellColor.value():e.bodyBorderInactiveSellColor.value()},c.prototype.setBodyBorderColor=function(e){return"buy"===this._direction?this._active?this.setBodyBorderActiveBuyColor(e):this.setBodyBorderInactiveBuyColor(e):this._active?this.setBodyBorderActiveSellColor(e):this.setBodyBorderInactiveSellColor(e),this},c.prototype.setBodyBorderActiveBuyColor=function(e){return this._line.properties().bodyBorderActiveBuyColor.setValue(e),this},c.prototype.setBodyBorderInactiveBuyColor=function(e){return this._line.properties().bodyBorderInactiveBuyColor.setValue(e),this},c.prototype.setBodyBorderActiveSellColor=function(e){return this._line.properties().bodyBorderActiveSellColor.setValue(e),this},c.prototype.setBodyBorderInactiveSellColor=function(e){return this._line.properties().bodyBorderInactiveSellColor.setValue(e),this},c.prototype.getBodyBackgroundColor=function(){return o.getColorFromProperties(this._line.properties().bodyBackgroundColor,this._line.properties().bodyBackgroundTransparency)},c.prototype.setBodyBackgroundColor=function(e){return o.setColorToProperties(e,this._line.properties().bodyBackgroundColor,this._line.properties().bodyBackgroundTransparency),this},c.prototype.getBodyTextColor=function(){var e=this._line.properties();return"limit"===this._mode?this._active?e.bodyTextActiveLimitColor.value():e.bodyTextInactiveLimitColor.value():"stop"===this._mode?this._active?e.bodyTextActiveStopColor.value():e.bodyTextInactiveStopColor.value():"buy"===this._direction?this._active?e.bodyTextActiveBuyColor.value():e.bodyTextInactiveBuyColor.value():this._active?e.bodyTextActiveSellColor.value():e.bodyTextInactiveSellColor.value()},c.prototype.setBodyTextColor=function(e){ +return"limit"===this._mode?this._active?this.setBodyTextActiveLimitColor(e):this.setBodyTextInactiveLimitColor(e):"stop"===this._mode?this._active?this.setBodyTextActiveStopColor(e):this.setBodyTextInactiveStopColor(e):"buy"===this._direction?this._active?this.setBodyTextActiveBuyColor(e):this.setBodyTextInactiveBuyColor(e):this._active?this.setBodyTextActiveSellColor(e):this.setBodyTextInactiveSellColor(e),this},c.prototype.setBodyTextInactiveLimitColor=function(e){return this._line.properties().bodyTextInactiveLimitColor.setValue(e),this},c.prototype.setBodyTextActiveLimitColor=function(e){return this._line.properties().bodyTextActiveLimitColor.setValue(e),this},c.prototype.setBodyTextInactiveStopColor=function(e){return this._line.properties().bodyTextInactiveStopColor.setValue(e),this},c.prototype.setBodyTextActiveStopColor=function(e){return this._line.properties().bodyTextActiveStopColor.setValue(e),this},c.prototype.setBodyTextInactiveBuyColor=function(e){return this._line.properties().bodyTextInactiveBuyColor.setValue(e),this},c.prototype.setBodyTextActiveBuyColor=function(e){return this._line.properties().bodyTextActiveBuyColor.setValue(e),this},c.prototype.setBodyTextInactiveSellColor=function(e){return this._line.properties().bodyTextInactiveSellColor.setValue(e),this},c.prototype.setBodyTextActiveSellColor=function(e){return this._line.properties().bodyTextActiveSellColor.setValue(e),this},c.prototype.getBodyFont=function(){return o.getFontFromProperties(this._line.properties().bodyFontFamily,this._line.properties().bodyFontSize,this._line.properties().bodyFontBold,this._line.properties().bodyFontItalic)},c.prototype.setBodyFont=function(e){return o.setFontToProperties(e,this._line.properties().bodyFontFamily,this._line.properties().bodyFontSize,this._line.properties().bodyFontBold,this._line.properties().bodyFontItalic),this},c.prototype.getQuantityBorderColor=function(){var e=this._line.properties();return"buy"===this._direction?this._active?e.quantityBorderActiveBuyColor.value():e.quantityBorderInactiveBuyColor.value():this._active?e.quantityBorderActiveSellColor.value():e.quantityBorderInactiveSellColor.value()},c.prototype.setQuantityBorderColor=function(e){return"buy"===this._direction?this._active?this.setQuantityBorderActiveBuyColor(e):this.setQuantityBorderInactiveBuyColor(e):this._active?this.setQuantityBorderActiveSellColor(e):this.setQuantityBorderInactiveSellColor(e),this},c.prototype.setQuantityBorderActiveBuyColor=function(e){return this._line.properties().quantityBorderActiveBuyColor.setValue(e),this},c.prototype.setQuantityBorderInactiveBuyColor=function(e){return this._line.properties().quantityBorderInactiveBuyColor.setValue(e),this},c.prototype.setQuantityBorderActiveSellColor=function(e){return this._line.properties().quantityBorderActiveSellColor.setValue(e),this},c.prototype.setQuantityBorderInactiveSellColor=function(e){return this._line.properties().quantityBorderInactiveSellColor.setValue(e),this},c.prototype.getQuantityBackgroundColor=function(){var e=this._line.properties() +;return"buy"===this._direction?this._active?e.quantityBackgroundActiveBuyColor.value():e.quantityBackgroundInactiveBuyColor.value():this._active?e.quantityBackgroundActiveSellColor.value():e.quantityBackgroundInactiveSellColor.value()},c.prototype.setQuantityBackgroundColor=function(e){return"buy"===this._direction?this._active?this.setQuantityBackgroundActiveBuyColor(e):this.setQuantityBackgroundInactiveBuyColor(e):this._active?this.setQuantityBackgroundActiveSellColor(e):this.setQuantityBackgroundInactiveSellColor(e),this},c.prototype.setQuantityBackgroundActiveBuyColor=function(e){return this._line.properties().quantityBackgroundActiveBuyColor.setValue(e),this},c.prototype.setQuantityBackgroundInactiveBuyColor=function(e){return this._line.properties().quantityBackgroundInactiveBuyColor.setValue(e),this},c.prototype.setQuantityBackgroundActiveSellColor=function(e){return this._line.properties().quantityBackgroundActiveSellColor.setValue(e),this},c.prototype.setQuantityBackgroundInactiveSellColor=function(e){return this._line.properties().quantityBackgroundInactiveSellColor.setValue(e),this},c.prototype.getQuantityTextColor=function(){return o.getColorFromProperties(this._line.properties().quantityTextColor,this._line.properties().quantityTextTransparency)},c.prototype.setQuantityTextColor=function(e){return o.setColorToProperties(e,this._line.properties().quantityTextColor,this._line.properties().quantityTextTransparency),this},c.prototype.getQuantityFont=function(){return o.getFontFromProperties(this._line.properties().quantityFontFamily,this._line.properties().quantityFontSize,this._line.properties().quantityFontBold,this._line.properties().quantityFontItalic)},c.prototype.setQuantityFont=function(e){return o.setFontToProperties(e,this._line.properties().quantityFontFamily,this._line.properties().quantityFontSize,this._line.properties().quantityFontBold,this._line.properties().quantityFontItalic),this},c.prototype.getCancelButtonBorderColor=function(){var e=this._line.properties();return"buy"===this._direction?this._active?e.cancelButtonBorderActiveBuyColor.value():e.cancelButtonBorderInactiveBuyColor.value():this._active?e.cancelButtonBorderActiveSellColor.value():e.cancelButtonBorderInactiveSellColor.value()},c.prototype.setCancelButtonBorderColor=function(e){return"buy"===this._direction?this._active?this.setCancelButtonBorderActiveBuyColor(e):this.setCancelButtonBorderInactiveBuyColor(e):this._active?this.setCancelButtonBorderActiveSellColor(e):this.setCancelButtonBorderInactiveSellColor(e),this},c.prototype.setCancelButtonBorderActiveBuyColor=function(e){return this._line.properties().cancelButtonBorderActiveBuyColor.setValue(e),this},c.prototype.setCancelButtonBorderInactiveBuyColor=function(e){return this._line.properties().cancelButtonBorderInactiveBuyColor.setValue(e),this},c.prototype.setCancelButtonBorderActiveSellColor=function(e){return this._line.properties().cancelButtonBorderActiveSellColor.setValue(e),this},c.prototype.setCancelButtonBorderInactiveSellColor=function(e){ +return this._line.properties().cancelButtonBorderInactiveSellColor.setValue(e),this},c.prototype.getCancelButtonBackgroundColor=function(){return o.getColorFromProperties(this._line.properties().cancelButtonBackgroundColor,this._line.properties().cancelButtonBackgroundTransparency)},c.prototype.setCancelButtonBackgroundColor=function(e){return o.setColorToProperties(e,this._line.properties().cancelButtonBackgroundColor,this._line.properties().cancelButtonBackgroundTransparency),this},c.prototype.getCancelButtonIconColor=function(){var e=this._line.properties();return"buy"===this._direction?this._active?e.cancelButtonIconActiveBuyColor.value():e.cancelButtonIconInactiveBuyColor.value():this._active?e.cancelButtonIconActiveSellColor.value():e.cancelButtonIconInactiveSellColor.value()},c.prototype.setCancelButtonIconColor=function(e){return"buy"===this._direction?this._active?this.setCancelButtonIconActiveBuyColor(e):this.setCancelButtonIconInactiveBuyColor(e):this._active?this.setCancelButtonIconActiveSellColor(e):this.setCancelButtonIconInactiveSellColor(e),this},c.prototype.setCancelButtonIconActiveBuyColor=function(e){return this._line.properties().cancelButtonIconActiveBuyColor.setValue(e),this},c.prototype.setCancelButtonIconInactiveBuyColor=function(e){return this._line.properties().cancelButtonIconInactiveBuyColor.setValue(e),this},c.prototype.setCancelButtonIconActiveSellColor=function(e){return this._line.properties().cancelButtonIconActiveSellColor.setValue(e),this},c.prototype.setCancelButtonIconInactiveSellColor=function(e){return this._line.properties().cancelButtonIconInactiveSellColor.setValue(e),this},c.prototype.block=function(){this._blocked=!0,this._line.updateAllViewsAndRedraw()},c.prototype.unblock=function(){this._blocked=!1,this._line.updateAllViewsAndRedraw()},c.prototype.isFunction=function(e){return"function"==typeof e},c.prototype.onCancel=function(e,t){return t?this.isFunction(t)&&(this._onCancelData=e,this._onCancelCallback=t):this.isFunction(e)&&(this._onCancelCallback=e),this},c.prototype.callOnCancel=function(){this.isFunction(this._onCancelCallback)&&this._onCancelCallback.call(this,this._onCancelData)},c.prototype.isOnCancelCallbackPresent=function(){return this.isFunction(this._onCancelCallback)},c.prototype.onModify=function(e,t){return t?this.isFunction(t)&&(this._onModifyData=e,this._onModifyCallback=t):this.isFunction(e)&&(this._onModifyCallback=e),this},c.prototype.callOnModify=function(){this.isFunction(this._onModifyCallback)&&this._onModifyCallback.call(this,this._onModifyData)},c.prototype.onMove=function(e,t){return t?this.isFunction(t)&&(this._onMoveData=e,this._onMoveCallback=t):this.isFunction(e)&&(this._onMoveCallback=e),this},c.prototype.callOnMove=function(){this.isFunction(this._onMoveCallback)&&this._onMoveCallback.call(this,this._onMoveData)},c.prototype.onContextMenu=function(e,t){return t?this.isFunction(t)&&(this._onContextMenuData=e,this._onContextMenuCallback=t):this.isFunction(e)&&(this._onContextMenuCallback=e),this}, +c.prototype.shouldShowContextMenu=function(){return this.isFunction(this._onContextMenuCallback)},c.prototype.callOnContextMenu=function(){if(this.isFunction(this._onContextMenuCallback))return this._onContextMenuCallback.call(this,this._onContextMenuData)},c.prototype.remove=function(){this._line._model.removeSource(this._line),delete this._line},inherit(h,n),h.prototype.zorder=function(){return l},h.prototype.setPoint=function(e,t,i){this._points[e]=t,this.normalizePoints()},h.prototype.addPoint=function(e,t){return this._points.push(e),this._lastPoint=null,this.normalizePoints(),this.createServerPoints(),!0},h.prototype.translatedType=function(){return"Order"},h.prototype.name=function(){return"Order"},h.prototype.endMoving=function(e){var t=this._startMovingPoint&&this._currentMovingPoint&&this._startMovingPoint.price!==this._currentMovingPoint.price;n.prototype.endMoving.call(this),!e&&t&&this._adapter.callOnMove()},h.prototype.createPriceAxisView=function(e){var t={pointIndex:e,backgroundPropertyGetter:this._adapter.getLineColor.bind(this._adapter)};return this._priceAxisView=new r(this,t),this._priceAxisView},h.prototype.paneViews=function(){return TradingView.printing&&!e.enabled("snapshot_trading_drawings")?null:this._model.properties().tradingProperties.showOrders.value()?s.prototype.paneViews.call(this):null},h.prototype.priceAxisViews=function(t,i){return TradingView.printing&&!e.enabled("snapshot_trading_drawings")?null:this._model.properties().tradingProperties.showOrders.value()?s.prototype.priceAxisViews.call(this,t,i):null},h.prototype.hasContextMenu=function(){return this._adapter.shouldShowContextMenu()},h.prototype.contextMenuItems=function(){return this._adapter.callOnContextMenu()},h.prototype.onlyYMoving=function(){return!0},h.prototype.movable=function(){return Boolean(this._adapter._onMoveCallback)},h.createProperties=function(e){var t=new a("linetoolorder",e,!1,!1);return h._configureProperties(t),t},h._configureProperties=function(e){n._configureProperties(e)},t.LineToolOrder=h}).call(this,i("Kxc7"))},B8p3:function(e,t,i){"use strict";i.r(t),i.d(t,"setHandler",(function(){return a}));var n=i("Eyy1"),r=null,o=-1/0,s="";function a(e){var t={capture:!0,passive:!0};null!==e?(null===r&&(document.addEventListener("keydown",c),document.addEventListener("mousedown",l,t),document.addEventListener("mouseup",l,t),document.addEventListener("mousewheel",l,t),document.addEventListener("wheel",l,t)),r=e):(r=null,document.removeEventListener("keydown",c),document.removeEventListener("mousedown",l,t),document.removeEventListener("mouseup",l,t),document.removeEventListener("mousewheel",l,t),document.removeEventListener("wheel",l,t))}function l(){s="",o=-1/0}function c(e){if(!e.defaultPrevented){var t=e.ctrlKey||e.metaKey||e.altKey;"Shift"!==e.key||t||e.repeat?l():e.timeStamp-o<350&&s===e.code?(e.preventDefault(),l(),Object(n.ensureNotNull)(r)()):(o=e.timeStamp,s=e.code)}}},BBCR:function(e,t){ +e.exports=''},BHQF:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fetch=function(e,t){return window.fetch(e,t)};(0,i("txPx").getLogger)("Fetch")},BOPY:function(e,t,i){"use strict";var n=i("aO4+").Point,r=i("f6yo").pointInCircle,o=i("VdBB").HitTestResult,s=i("zDbI").CHART_FONT_FAMILY,a=i("cPgM").ScaledPaneRenderer;function l(e,t){this.source=e,this._rendererFactory=t}function c(e,t){a.call(this),this._barWidth=e.barWidth,this._plates=e.plates,this._tooltip=e.tooltip,this._model=t}function u(){this._layout=[],this._currentId=void 0,this.tooltipHovered=!1}l.prototype.update=function(){},l.prototype.renderer=function(e,t){return this._rendererFactory(this.source)},inherit(c,a),c.prototype._drawImpl=function(e){e.save();for(var t=0;t6&&(e.textAlign="center",e.textBaseline="middle",e.font="bold "+t.labelFontSize+"px "+s,e.fillStyle=t.labelFontColor,e.fillText(t.label,t.x,t.y))},c.prototype.hitTest=function(e){for(var t,i=this._plates.length-1;i>=0;--i)if(t=this._hitTestDot(this._plates[i],e))return t;return null},c.prototype._hitTestDot=function(e,t){var i=this._dotTransform(e),s=new n(i.x,i.y);return r(t,s,Math.max(i.radius,8))?new o(o.REGULAR,e):null},u.prototype._createLayout=function(){throw new Error("Child class must override this member")},u.prototype._updatePlate=function(e){throw new Error("Child class must override this member")},u.prototype._getContainer=function(e){return this._container&&this._context===e||(this._context=e,this._container=$(e.canvas).parent()),this._container},u.prototype._plateArrowSize=14,u.prototype.showPlate=function(e,t){if(this._currentId!==e.id||!this._layout||0===this._layout.length||null==this._layout[0].parentNode){this._currentId=e.id,this._createLayout(),this._getContainer(t).append(this._layout);var i=this;this._layout.hover((function(){i.tooltipHovered=!0,$(this).stop(!0).fadeTo(0,1)}),(function(){i.tooltipHovered=!1}))}var n=Math.round(e.barWidth/2);n>15&&(n=15),n<10&&(n=10),this._updatePlate(e);var r=t.canvas.getBoundingClientRect(),o=e.x-this._layout.outerWidth()]+(>|$)/g,"")}function r(e){var t=/([^&=]+)=?([^&]*)/g,i={};if(!e)return i;for(var r=t.exec(e);r;)i[n(r[1])]=n(r[2]),r=t.exec(e);return i}i.d(t,"a",(function(){return a}));var o=["mobileapp","mobileapp_new"];function s(e){if(0===location.search.length)return e;var t=r(window.location.search.substring(1));return o.forEach((function(i){void 0!==t[i]&&(e[i]=t[i])})),e}function a(e,t,i){void 0===e&&(e={}),void 0===t&&(t=""),void 0===i&&(i=!0);var n="/chart/";e.chartId&&(n=""+n+e.chartId+"/",delete e.chartId),i&&(e=s(e));var r=function(e){var t=[];for(var i in e)e.hasOwnProperty(i)&&null!=e[i]&&t.push({key:i,pair:encodeURIComponent(i)+"="+encodeURIComponent(e[i])});return t.sort((function(e,t){return e.key>t.key?1:e.key]+)>)/gi,""):e},TradingView.encodeSpread=function(e){return encodeURIComponent(e)},TradingView.clean=function(e,t,i){var n=[["&","&"],["<","<"],[">",">"],['"',"""],["'","'"],["'","'"]],r=e;if(!e||!e.replace)return r;for(var o=0;o'},Daqx:function(e,t,i){"use strict";i.d(t,"a",(function(){return s}));var n=["Z","Y","X","W","V","U","T","S"],r=["A","B","C","D","E","F","G","H"],o=function(){function e(e){this.label=e}return e.prototype.equals=function(e){return null!==e&&this.label===e.label},e}();function s(e,t){var i="left"===e?n:r;return new o(t=0&&e.setLastBarClosed(!1)}n(e)}}(e,i,o),s)},unsubscribe:function(e){return t._cachedDatafeed.unsubscribe(e)},calculateHistoryDepth:this._externalDatafeed.calculateHistoryDepth?this._externalDatafeed.calculateHistoryDepth.bind(this._externalDatafeed):void 0})};function v(e,t){null!=e.graphicsCmds&&null!=e.graphicsCmds.create&&null!=e.graphicsCmds.create.vertlines&&e.graphicsCmds.create.vertlines.forEach((function(e){e.data.forEach(t)}))}function y(e,t){null!=e.graphicsCmds&&null!=e.graphicsCmds.create&&null!=e.graphicsCmds.create.horizlines&&e.graphicsCmds.create.horizlines.forEach((function(e){e.data.forEach(t)}))}function g(e,t){for(var i=e.length,n=t.length,r=0,o=0;o=n?e[o]=t[n-1].index:e[o]=t[r].index}}m.createDWMAligner=function(e,t){return c.isDWM(e)?l.createAligner(e,t,!0):null},m.prototype._barsCoefficients=function(e,t){if(void 0===o.parseSymbol(e).type)return{};var i=e+t;return this._barsCoefficientsCache[i]||(this._barsCoefficientsCache[i]={}),this._barsCoefficientsCache[i]},m.prototype.destroy=function(){this._cachedDatafeed.destroy(),this._externalDatafeed=null,this._pointsetsManager.pointsetsCreated().unsubscribeAll(this)},m.prototype.purgeCache=function(){this._endOfData={},this._resolveRequests={},this._sessionsLastDataCache={},this._studiesCache={}},m.prototype.purgeDataCache=function(){this._cachedDatafeed.purgeCache()},m.prototype._logMessage=function(e){t.enabled("charting_library_debug_mode")&&console.log(e)},m.prototype._extendRange=function(e,t){this._rangeExtensionData[e]||this.purgeRangeExtensionData(e),void 0===this._rangeExtensionData[e].summary&&(this._rangeExtensionData[e].summary=0),this._rangeExtensionData[e].summary+=t},m.prototype.on=function(e,t){return this._callbacks.hasOwnProperty(e)||(this._callbacks[e]=[]),this._callbacks[e].push(t),this},m.prototype._fireEvent=function(e,t,i){if(this._callbacks.hasOwnProperty(e)){for(var n=this._callbacks[e],r=0;rm[a].value[0];l?m.push({index:f(n),value:[n].concat(r)}):m[a].value=[n].concat(r),p||u([m[m.length-1]],l,m.length,v,i)}(e,t,l)},nonseriesOut:function(e,t){d(t,l)},setNoMoreData:function(){g=!0},recalc:function(e,i){p=!1,m.endOfData=g,t.error&&null!==t.error()||c(m,y>0?v:void 0,l,i)}});if(!b._studiesCache[e]||!b._studiesCache[e][o])throw Error("This should never happen");b._studiesCache[e][o].engine=_}catch(S){if(!S.studyError)throw S;h(S.message) +}else h("Unsupported resolution. Did you forget to set has_intraday to true?")},w=function(e){h(e)},P=function(){return b._studiesCache[e]&&b._studiesCache[e][o]&&b._studiesCache[e][o].activeResolve===_};b._studiesCache[e][o].activeResolve=_,this.resolveSymbol(i,(function(){P()&&S.apply(b,arguments)}),(function(){P()&&w.apply(b,arguments)}))},m.prototype._createStudy=function(e,t,i,n,r,o,s){var a=this;function l(i,s,l){i=f(i),TradingView.ChartapiMessagerInstances[n].onDataUpdate(r,o,a._convertBarsTimeToUnix(i),s,l,a._extendedRange(e,t)),TradingView.ChartapiMessagerInstances[n].onStudyCompleted(r,o)}s=function(e){if(Array.isArray(e))return e;for(var t=[],i=a._studiesCache[n][r].metainfo.inputs,o=0;o0?1e3*p[0].value[0]:void 0;if(c.nextTime&&(!_||c.nextTime<_/1e3))u.ensureExtendedTo(o,n,c.nextTime);else if(c.endOfData||0!==p.length){if(0!==p.length){var f=u._barsCoefficients(e,i);f.expectedBarsCount&&f.barsCount&&(f.barsCoefficient=Math.min(Math.max(f.barsCoefficient||1,parseInt(f.expectedBarsCount/(p.length-f.barsCount)+.5)),100)),f.barsCount=p.length;var m=p[p.length-1];h(l,p.length-1,1e3*m.value[0]),u.rebuildExtrapolatedData(n,e.name,i,l,1e3*m.value[0]),a&&TradingView.ChartapiMessagerInstances[n].onSeriesClearData(o,s),TradingView.ChartapiMessagerInstances[n].onTimescaleUpdate(o,s,p,l,0);var v=u._extrapolationManager.storage(n,l.full_name,i);Promise.resolve().then((function(){u._pointsetsManager.broadcastPointsetsUpdates(l.full_name,i,t,v,l,(function(e,t){TradingView.ChartapiMessagerInstances[n].onPointsetDataUpdate(e,s,t,l)}))}))}c.endOfData&&(u._logMessage("Series has no more data on server: {0}".format(l.full_name)),u._setEndOfData(n,o,s)),0===p.length&&TradingView.ChartapiMessagerInstances[n].onSeriesClearData(o,s),TradingView.ChartapiMessagerInstances[n].onSeriesCompleted(o,s,l.data_status)}else u._requestMoreData(o,n,100)}),(function(e,t,r,a,l){var c=u._convertBarsTimeToUnix(e),d=c[c.length-1];if(t){if(u._rangeExtensionData[n]||u.purgeRangeExtensionData(n),void 0===u._rangeExtensionData[n].realtimeBarsCount&&(u._rangeExtensionData[n].realtimeBarsCount=0),u._rangeExtensionData[n].realtimeBarsCount+=1,!u._studiesCache[n][o])throw Error("This should never happen");var p=r-1;u._logMessage("New bar arrived: symbol {0}, bar {1}".format(l.full_name,JSON.stringify(d))),TradingView.ChartapiMessagerInstances[n].onTimescaleUpdate(o,s,[d],l,p),h(l,p,1e3*d.value[0]),u.rebuildExtrapolatedData(n,l.full_name,i,l,1e3*d.value[0])}else u._logMessage("Last bar update: symbol {0}, bar {1}".format(l.full_name,JSON.stringify(d))),TradingView.ChartapiMessagerInstances[n].onDataUpdate(o,s,c,null,l);u._fireEvent("realtime_tick",e[e.length-1],!0)}),(function(e){u._logMessage("Series error: {0}".format(e)),TradingView.ChartapiMessagerInstances[n].onSeriesError(o,e), +t.enabled("clear_bars_on_series_error")&&TradingView.ChartapiMessagerInstances[n].onSeriesClearData(o,s)}),(function(e,t){if("projection"!==e.type)throw new Error("unexpected non-series data type for series "+e.type);var r=e.projectionTime/1e3,a=-1;(e.data||[]).forEach((function(e){a=Math.max(a,e[0]||0)})),a=Math.min(a,100);var l=e.barsetSize;if(r&&a>=0&&l&&e.lastBar){for(var c=[],d=0;d<=a;d++)c.push(r+.001*d);var p=e.lastBar.slice(0);p[0]=p[0]/1e3,TradingView.ChartapiMessagerInstances[n].onTimescaleUpdate(o,s,[{index:l-1,value:p}],t,l-1,c);var _=l+a,f=1e3*Math.trunc(c[a]);h(t,_,f),u.rebuildExtrapolatedData(n,t.full_name,i,t,f)}u._updateProjectionData(n,o,s,e)}))},m.prototype.onMoreTickmarksRequested=function(e,t,i,n,r){this._extrapolationManager.storage(e,i.full_name,n).onTickmarksNeeded(i,r)},m.prototype.removePointset=function(e){this._pointsetsManager.removePointset(e)},m.prototype.rebuildExtrapolatedData=function(e,t,i,n,r){this._extrapolationManager.storage(e,n.full_name,i).rebuild(r,n)},m.prototype.createPointset=function(e,t,i,n,r,o){var s=this._extrapolationManager.storage(e,n.full_name,r);this._pointsetsManager.createPointset(t,i,o,s,n,e)},m.prototype.studiesMetadata=function(){return 0===this._metainfoCache.length&&(this._metainfoCache=JSServer.studyLibrary.map((function(e){return e.metainfo})),this._metainfoCache.push({palettes:{},inputs:[],plots:[{id:"open",type:"line"},{id:"high",type:"line"},{id:"low",type:"line"},{id:"close",type:"line"},{id:"volume",type:"line"}],graphics:{},_metainfoVersion:48,description:"Unnamed Study",format:{type:"inherit"},is_hidden_study:!0,is_price_study:!1,shortDescription:"Unnamed Study",description_localized:"Unnamed Study",id:"BarSetHeikenAshi@tv-prostudies",shortId:"BarSetHeikenAshi",packageId:"tv-basicstudies",version:"13",fullId:"BarSetHeikenAshi@tv-basicstudies-13",productId:"tv-basicstudies",name:"BarSetHeikenAshi@tv-basicstudies"})),this._metainfoCache},m.prototype.searchSymbols=function(e,t,i,n){this._logMessage("Symbol search requested: search string `{0}`, exchange: `{1}`, type `{2}`".format(e,t,i));var r=this;this._externalDatafeed.searchSymbols(e,t,i,(function(e){r._logMessage("Symbol search response: {0}".format(JSON.stringify(e))),n(e)}))},m.prototype.resolveSymbol=function(e,t,i){o.isSymbolEncoded(e)||console.error("Expect to get symbol encoded string, but got the following instead: "+e);var n=o.parseSymbol(e),r={currency:n.currencyCode};this._resolveSymbolByName(n.symbol,r,t,i)},m.prototype._resolveSymbolByName=function(e,t,i,n){var r,o=t&&t.currency,s=e+(o?"_#_"+o:"");this._resolveRequests[s]?r=this._resolveRequests[s]:(r=this._resolveSymbolInternal(e,o||void 0),this._resolveRequests[s]=r),r.then(i).catch(n)},m.prototype._resolveSymbolInternal=function(e,i){var n=this;return new Promise(function(r,o){this._logMessage("Symbol resolve requested: `{0}` ".format(e));var s=!0;this._externalDatafeed.resolveSymbol(e,(function(i){ +s&&console.warn("`resolveSymbol` should return result asynchronously. Use `setTimeout` with 0 interval to execute the callback function."),n._logMessage("Symbol resolved: `{0}`, SymbolInfo in server response {1}".format(e,JSON.stringify(i))),function(e){if(e.base_name||(e.base_name=[e.name]),e.legs||(e.legs=[e.name]),e.exchange||(e.exchange=e["exchange-listed"]),e.full_name||(e.full_name=e.symbol||(e.exchange?e.exchange+":"+e.name:e.name)),e.pro_name||(e.pro_name=e.full_name),e.data_status||(e.data_status="streaming"),e.ticker||(e.ticker=e.symbol||e.name),!e.session&&e["session-regular"]&&(e.session=e["session-regular"]),!e.minmov&&e.minmovement&&(e.minmov=e.minmovement),e.supported_resolutions)for(var t=0;th)){var d=0,p=a.valueAt(h)[TradingView.TIME_PLOT];if(pM?c.PlotRowSearchMode.NearestLeft:c.PlotRowSearchMode.Exact,O=this._study.nearestIndex(I,L);if(void 0!==O){var k=b[C];if(void 0===k&&(k=this._study.getMinFirstBarIndexForPlot(C),Number.isFinite(k)&&(b[C]=k)),!(k>O)){var A=this._study.data().last(),E=this._study.data().valueAt(O)||(null!==A?A.value:null);if(null!==E){var V=E[T+1];if(Object(r.isNumber)(V)){P.value=g.format(V);var D=this._study.properties().styles[C].color.value();y=h[T];Object(d.isOhlcPlot)(y)&&(C=y.target||C,D=this._study.properties().ohlcPlots[C].color.value());var B=D;if(p[C]&&E.length>p[C].index+1){var R=E[p[C].index+1],N=p[C].palette;if(null!=R&&void 0!==N){var F=p[C].paletterProps,j=N.valToIndex?N.valToIndex[R]:R;B=F.colors[void 0!==j?j:R].color.value()}}B=Object(a.resetTransparency)(B),P.color=B}}}}}}return t},e.prototype._hideValues=function(){return p&&(null===this._model.crossHairSource().pane||Object(u.isLineToolName)(h.tool.value())||null!==this._model.lineBeingEdited())},e}()},Ecpn:function(e,t,i){"use strict";i.d(t,"a",(function(){return r}));var n={PivotPointsStandard:!0};function r(e){return e in n}},EqoR:function(e,t,i){"use strict";var n=i("5rJj"),r=i("aDyP").LineToolPitchfork,o=window.t("Inside Pitchfork");function s(e,t){var i=t||s.createProperties();r.call(this,e,i)}inherit(s,r),s.prototype.translatedType=function(){return o},s.prototype.name=function(){return"Inside Pitchfork"},s.createProperties=function(e){var t=new n("linetoolinsidepitchfork",e,!1,{range:[0,8]});return s._configureProperties(t),t},s._configureProperties=function(e){r._configureProperties(e)},t.LineToolInsidePitchfork=s},Ery9:function(e,t,i){"use strict";i.r(t),i.d(t,"setCustomAdapter",(function(){ +return m})),i.d(t,"initialize",(function(){return v})),i.d(t,"updateUser",(function(){return y})),i.d(t,"getChartsCount",(function(){return g})),i.d(t,"getCharts",(function(){return b})),i.d(t,"removeChart",(function(){return S})),i.d(t,"saveChart",(function(){return w})),i.d(t,"getChartContent",(function(){return P})),i.d(t,"loadChart",(function(){return C})),i.d(t,"removeStudyTemplate",(function(){return x})),i.d(t,"getStudyTemplateContent",(function(){return T})),i.d(t,"saveStudyTemplate",(function(){return I})),i.d(t,"getStudyTemplatesList",(function(){return M})),i.d(t,"invalidateStudyTemplatesList",(function(){return L})),i.d(t,"getStudyTemplateContentById",(function(){return O})),i.d(t,"getStandardStudyTemplateContentById",(function(){return k})),i.d(t,"removeStudyTemplateById",(function(){return A})),i.d(t,"renameStudyTemplate",(function(){return E})),i.d(t,"replaceStudyTemplate",(function(){return V})),i.d(t,"getDrawingTemplates",(function(){return D})),i.d(t,"loadDrawingTemplate",(function(){return B})),i.d(t,"removeDrawingTemplate",(function(){return R})),i.d(t,"saveDrawingTemplate",(function(){return N}));var n,r,o,s,a=i("mrSG"),l=i("FQhm"),c=i("ogJP"),u=i("txPx"),h=i("Cf1E"),d=Object(u.getLogger)("Chart.SaveloadAdapter.Library"),p=null,_=null;function f(e){return o+"/"+encodeURIComponent(s)+"/"+e+"?client="+encodeURIComponent(n)+"&user="+encodeURIComponent(r)}function m(e){p=e}function v(e,t,i,a){n=e,r=t,o=i,s=a}function y(e){r=e}function g(e,t){throw new Error("Not implemented")}function b(e,t){void 0===t&&(t=function(){});var i=function(t){e(t.map((function(e){return{id:e.id,name:e.name,image_url:String(e.id),modified_iso:e.timestamp,short_symbol:e.symbol,interval:e.resolution}})))};if(!p)return $.ajax({url:"{0}/{1}/charts?client={2}&user={3}".format(o,encodeURIComponent(s),encodeURIComponent(n),encodeURIComponent(r)),type:"GET",crossDomain:!0}).done((function(e){var n=Object(c.parseJSONorNot)(e);if("ok"!==n.status)return d.logWarn("Charts list request failed: "+n.message),void t();i(n.data)})).fail(t);p.getAllCharts().then(i).catch(t)}function S(e,t){p?p.removeChart(e).then(t):$.ajax({url:"{0}/{1}/charts?client={2}&user={3}&chart={4}".format(o,encodeURIComponent(s),encodeURIComponent(n),encodeURIComponent(r),encodeURIComponent(e)),type:"DELETE",crossDomain:!0}).done((function(e){var i=Object(c.parseJSONorNot)(e);"ok"!==i.status&&d.logWarn("Chart delete request failed: "+i.message),t()}))}function w(e,t,i,l,u,h,_){var f=u.id.value(),m={name:e,content:JSON.stringify(l),symbol:t,resolution:i};if(p)p.saveChart(Object(a.__assign)(Object(a.__assign)({},m),{id:f})).then(h).catch(_);else{var v="{0}/{1}/charts?client={2}&user={3}".format(o,encodeURIComponent(s),encodeURIComponent(n),encodeURIComponent(r));null!=f&&(v+="&chart="+encodeURIComponent(f)),$.ajax({url:v,data:m,type:"POST",crossDomain:!0}).done((function(e){var t=Object(c.parseJSONorNot)(e);if("ok"!==t.status)return d.logWarn("Chart save request failed: "+t.message),void _();h(t.id)})).fail((function(){_()}))}}function P(e,t,i){var a=function(t){ +var i=JSON.parse(t);return i.uid=e.id,i};p?p.getChartContent(e.id).then((function(e){var i=a(e);t(i)})).catch(i):$.ajax({url:"{0}/{1}/charts?client={2}&user={3}&chart={4}".format(o,encodeURIComponent(s),encodeURIComponent(n),encodeURIComponent(r),encodeURIComponent(e.id)),type:"GET",crossDomain:!0}).done((function(e){var i=Object(c.parseJSONorNot)(e);if("ok"===i.status){var n=a(i.data.content);t(n)}else d.logWarn("Chart load request failed: "+i.message)})).fail((function(){i&&i()}))}function C(e){P(e,(function(e){l.emit("chart_load_requested",e)}),(function(){d.logWarn("Error loading chart")}))}function x(e){return Object(a.__awaiter)(this,void 0,void 0,(function(){var t,i,n;return Object(a.__generator)(this,(function(r){switch(r.label){case 0:return r.trys.push([0,3,,4]),p?[2,p.removeStudyTemplate({name:e})]:[4,fetch(f("study_templates")+"&template="+encodeURIComponent(e),{method:"DELETE",credentials:"same-origin"})];case 1:if(!(t=r.sent()).ok)throw new Error("Remove study template response was not OK. Status: "+t.status+".");return[4,t.json()];case 2:if("ok"!==(i=r.sent()).status)throw new Error("Remove study template request failed: "+i.message);return[3,4];case 3:throw n=r.sent(),d.logWarn(Object(h.a)(n)),n;case 4:return[2]}}))}))}function T(e){return Object(a.__awaiter)(this,void 0,void 0,(function(){var t,i,n;return Object(a.__generator)(this,(function(r){switch(r.label){case 0:return r.trys.push([0,5,,6]),p?[4,p.getStudyTemplateContent({name:e})]:[3,2];case 1:return[2,{content:r.sent()}];case 2:return[4,fetch(f("study_templates")+"&template="+encodeURIComponent(e),{credentials:"same-origin"})];case 3:if(!(t=r.sent()).ok)throw new Error("Get study template response was not OK. Status: "+t.status+".");return[4,t.json()];case 4:if("ok"!==(i=r.sent()).status)throw new Error("Get study template request failed: "+i.message);return[2,i.data];case 5:throw n=r.sent(),d.logWarn(Object(h.a)(n)),n;case 6:return[2]}}))}))}function I(e){return Object(a.__awaiter)(this,void 0,void 0,(function(){var t,i,n,r;return Object(a.__generator)(this,(function(o){switch(o.label){case 0:return o.trys.push([0,3,,4]),p?[2,p.saveStudyTemplate(e).then((function(){return{error:""}})).catch((function(e){return{error:null!=e?Object(h.a)(e):"error"}}))]:((t=new FormData).append("name",e.name),t.append("content",e.content),[4,fetch(f("study_templates"),{method:"POST",body:t,credentials:"same-origin"})]);case 1:if(!(i=o.sent()).ok)throw new Error("Save study template response was not OK. Status: "+i.status+".");return[4,i.json()];case 2:return[2,{error:"ok"===(n=o.sent()).status?"":n.status}];case 3:throw r=o.sent(),d.logWarn(Object(h.a)(r)),r;case 4:return[2]}}))}))}function M(){return Object(a.__awaiter)(this,void 0,void 0,(function(){var e,t,i,n;return Object(a.__generator)(this,(function(r){switch(r.label){case 0:return r.trys.push([0,3,,4]),_?[2,_]:(_=[],e=function(e){return _=e.map((function(e){return{is_default:!1,name:e.name}}))},p?[2,p.getAllStudyTemplates().then(e)]:[4,fetch(f("study_templates"),{method:"GET",credentials:"same-origin" +})]);case 1:if(!(t=r.sent()).ok)throw new Error("Study templates list response was not OK. Status: "+t.status+".");return[4,t.json()];case 2:if("ok"!==(i=r.sent()).status)throw new Error("Study templates list request failed: "+i.message);return[2,e(i.data)];case 3:throw n=r.sent(),d.logWarn(Object(h.a)(n)),n;case 4:return[2]}}))}))}function L(){_=null}function O(e,t){throw new Error("Not implemented")}function k(e,t){throw new Error("Not implemented")}function A(e,t){throw new Error("Not implemented")}function E(e,t,i){throw new Error("Not implemented")}function V(e,t,i){throw new Error("Not implemented")}function D(e){return Object(a.__awaiter)(this,void 0,void 0,(function(){var t,i,n;return Object(a.__generator)(this,(function(r){switch(r.label){case 0:throw new Error("Not implemented");case 1:return r.trys.push([1,4,,5]),p?[2,p.getDrawingTemplates(e)]:[4,fetch(f("drawing_templates")+"&tool="+encodeURIComponent(e),{credentials:"same-origin"})];case 2:if(!(t=r.sent()).ok)throw new Error("Get drawing templates response was not OK. Status: "+t.status+".");return[4,t.json()];case 3:if("ok"!==(i=r.sent()).status)throw new Error("Drawing templates request failed: "+i.message);return[2,i.data];case 4:throw n=r.sent(),d.logWarn(Object(h.a)(n)),n;case 5:return[2]}}))}))}function B(e,t){return Object(a.__awaiter)(this,void 0,void 0,(function(){var i,n,r;return Object(a.__generator)(this,(function(o){switch(o.label){case 0:throw new Error("Not implemented");case 1:return o.trys.push([1,4,,5]),p?[2,p.loadDrawingTemplate(e,t).then((function(e){return JSON.parse(e)}))]:[4,fetch(f("drawing_templates")+"&tool="+encodeURIComponent(e)+"&name="+encodeURIComponent(t),{credentials:"same-origin"})];case 2:if(!(i=o.sent()).ok)throw new Error("Load drawing template response was not OK. Status: "+i.status+".");return[4,i.json()];case 3:if("ok"!==(n=o.sent()).status)throw new Error("Drawing template request failed: "+n.message);return[2,JSON.parse(n.data.content)];case 4:throw r=o.sent(),d.logWarn(Object(h.a)(r)),r;case 5:return[2]}}))}))}function R(e,t){return Object(a.__awaiter)(this,void 0,void 0,(function(){var i,n,r;return Object(a.__generator)(this,(function(o){switch(o.label){case 0:throw new Error("Not implemented");case 1:return o.trys.push([1,4,,5]),p?[2,p.removeDrawingTemplate(e,t)]:[4,fetch(f("drawing_templates")+"&tool="+encodeURIComponent(e)+"&name="+encodeURIComponent(t),{method:"DELETE",credentials:"same-origin"})];case 2:if(!(i=o.sent()).ok)throw new Error("Remove drawing template response was not OK. Status: "+i.status+".");return[4,i.json()];case 3:if("ok"!==(n=o.sent()).status)throw new Error("Remove drawing template request failed: "+n.message);return[3,5];case 4:throw r=o.sent(),d.logWarn(Object(h.a)(r)),r;case 5:return[2]}}))}))}function N(e,t,i){return Object(a.__awaiter)(this,void 0,void 0,(function(){var n,r,o,s;return Object(a.__generator)(this,(function(a){switch(a.label){case 0:throw new Error("Not implemented");case 1:return a.trys.push([1,4,,5]), +p?[2,p.saveDrawingTemplate(e,t,i)]:((n=new FormData).append("content",i),[4,fetch(f("drawing_templates")+"&tool="+encodeURIComponent(e)+"&name="+encodeURIComponent(t),{method:"POST",body:n,credentials:"same-origin"})]);case 2:if(!(r=a.sent()).ok)throw new Error("Save drawing template response was not OK. Status: "+r.status+".");return[4,r.json()];case 3:if("ok"!==(o=a.sent()).status)throw new Error("Save drawing template request failed: "+o.message);return[3,5];case 4:throw s=a.sent(),d.logWarn(Object(h.a)(s)),s;case 5:return[2]}}))}))}},EsvI:function(e,t,i){"use strict";i.r(t);i("bSeV");var n=i("eJTA"),r=i("wZIs"),o=i("Vdly"),s=i("BHQF"),a=i("txPx"),l=Object(a.getLogger)("Themes.Provider"),c=null;function u(e){return Object(s.fetch)("/theme/?themeName="+encodeURIComponent(e),{credentials:"include",method:"GET"}).then((function(e){return e.json()})).then((function(e){var t={};return e.content&&(t.content=JSON.parse(e.content)),t}))}var h,d=i("zM7N"),p=i("oiZD"),_=i("YFKU"),f=i("IMMp"),m=i("HGP3"),v=((h={})[d.a.Light]={name:d.a.Light,label:function(){return Object(_.t)("Light",{context:"colorThemeName"})},order:2,getThemedColor:function(e){return Object(m.getHexColorByName)(e)}},h[d.a.Dark]={name:d.a.Dark,label:function(){return Object(_.t)("Dark",{context:"colorThemeName"})},order:1,getThemedColor:function(e){var t=f[e]||e;return Object(m.getHexColorByName)(t)}},h);function y(e){return!e.isPrivate}function g(){return v[p.watchedTheme.value()]||v.light}function b(e){return g().getThemedColor(e)}function S(e,t,i,n,o,s,a){void 0===o&&(o=!0),void 0===s&&(s=!1),void 0===a&&(a=!1);var l=t?Promise.resolve(L(e)):x(e);return l.then((function(l){if(void 0!==l.content){var c=!t;a&&(void 0!==(u=l.content).chartProperties&&Object(r.applyDefaultsOverrides)(u.chartProperties),void 0!==u.mainSourceProperties&&Object(r.applyDefaultsOverrides)(u.mainSourceProperties,void 0,!0,"mainSeriesProperties")),n.applyTheme(l.content,c,i,e,t,o,s)}var u})),l}i.d(t,"isPublicTheme",(function(){return y})),i.d(t,"getCurrentTheme",(function(){return g})),i.d(t,"getThemedColor",(function(){return b})),i.d(t,"loadTheme",(function(){return S})),i.d(t,"restoreTheme",(function(){return w})),i.d(t,"savedThemeName",(function(){return P})),i.d(t,"syncTheme",(function(){return C})),i.d(t,"getTheme",(function(){return x})),i.d(t,"getThemeNames",(function(){return T})),i.d(t,"getStdThemeNames",(function(){return I})),i.d(t,"isStdThemeName",(function(){return M})),i.d(t,"getStdTheme",(function(){return L})),i.d(t,"getStdThemedValue",(function(){return O})),i.d(t,"isStdThemedDefaultValue",(function(){return k})),i.d(t,"saveTheme",(function(){return A})),i.d(t,"removeTheme",(function(){return E})),i.d(t,"isThemeExist",(function(){return V})),i.d(t,"translateStdThemeName",(function(){return D})),i.d(t,"isStdTheme",(function(){return B})),i.d(t,"extractThemeFromModel",(function(){return R})),i.d(t,"DEFAULT_THEME",(function(){return"light"})),i.d(t,"themes",(function(){return v}));function w(){Object(p.setTheme)(Object(o.getValue)("current_theme.name")||"light")} +function P(){return Object(o.getValue)("current_theme.name")||null}function C(){Object(o.setValue)("current_theme.name",g().name,{forceFlush:!0})}function x(e){return u(e)}function T(){return c||Object(s.fetch)("/themes/",{credentials:"include",method:"GET"}).then((function(e){return c=e.json()}))}function I(){return d.c()}function M(e){return I().includes(e)}function L(e){return d.b(e)||{content:void 0}}function O(e,t){var i=t||g().name,n=d.b(i),r=0!==e.length&&e.split(".");return n&&n.content&&r?r.reduce((function(e,t){return e[t]}),n.content):null}function k(e,t,i){var r=O(e,i);return null!==r&&Object(n.areEqualRgba)(Object(n.parseRgba)(r),Object(n.parseRgba)(String(t)))}function A(e,t){return function(e,t){var i=new FormData;return i.append("content",JSON.stringify(t)),i.append("name",e),c=null,Object(s.fetch)("/save-theme/",{credentials:"include",method:"POST",body:i}).then((function(e){return e.json()}),(function(e){return l.logError(e)}))}(e,t)}function E(e){return function(e){var t=new FormData;return t.append("name",e),c=null,Object(s.fetch)("/remove-theme/",{credentials:"include",method:"POST",body:t}).then((function(e){return e.json()}),(function(e){return l.logError(e)}))}(e)}function V(e){return function(e){return u(e).then((function(e){return Boolean(e.content)}))}(e)}function D(e){return d.e(e)}function B(e){return d.d(e)}function R(e){return{content:{chartProperties:{paneProperties:e.model().properties().paneProperties.state(),scalesProperties:e.model().properties().scalesProperties.state()},sessions:e.model().sessions().properties().state(),mainSourceProperties:e.model().mainSeries().properties().state()}}}},EyEd:function(e,t,i){"use strict";var n=i("lCO3").Version,r=i("txPx").getLogger("Chart.StudyMigration");function o(e){this._studyId=e,this._maxToVers=n.ZERO,this._maxFromVers=n.ZERO,this._migrs=[]}o.prototype.addMigration=function(e,t,i){var r=n.parse(e),o=n.parse(t);r.isGreater(this._maxFromVers)&&(this._maxFromVers=r),o.isGreater(this._maxToVers)&&(this._maxToVers=o),this._migrs.push({fromVers:r,toVers:o,rules:i})},o.prototype.updateInputs=function(e,t,i){if(!i)return i;for(var n=TradingView.clone(i),o=e;o.isLess(t);){var s=this._findMigration(o);if(null==s)break;if(r.logNormal("Migrating study inputs from "+s.fromVers+" to "+s.toVers+" version, studyId: "+this._studyId+", migration: "+JSON.stringify(s)+", inputs: "+JSON.stringify(i)),n=this._applyMigration(n,s),!o.isLess(s.toVers))throw new Error("Problems in study migration process... Possible infinite cycle has been detected and stopped.");o=s.toVers}return o>e&&r.logNormal("Study inputs migration is done, studyId: "+this._studyId+", inputs: "+JSON.stringify(n)),n},o.prototype._findMigration=function(e){for(var t=-1,i=this._maxFromVers,n=0;n=0||t.indexOf(e)>=0},o._applyInputChangedMinMaxRule=function(e,t){if("adjustValIfNeeded"!==t.action)throw new Error("Unknown action "+t.action+" for rule with type "+t.type);var i=e[t.inputId];return it.maxVal&&(e[t.inputId]=t.maxVal),r.logNormal("Input "+t.inputId+"="+i+" adjusted to value "+e[t.inputId]),e},o._applyInputChangedOptionsRule=function(e,t){if(!(["text"].indexOf(t.inputType)>=0&&"resetToDefValIfNeeded"===t.action))throw new Error("Unexpected rule.inputType="+t.inputType+" in rule.action="+t.action);var i=e[t.inputId];return t.options.indexOf(i)<0&&(e[t.inputId]=t.defVal,r.logNormal("Input "+t.inputId+"="+i+" reset to default value "+t.defVal)),e},e.exports=o},Eyy1:function(e,t,i){"use strict";function n(e){if(void 0===e)throw new Error("Value is undefined");return e}function r(e){if(null===e)throw new Error("Value is null");return e}Object.defineProperty(t,"__esModule",{value:!0}),t.assert=function(e,t){if(!e)throw new Error("Assertion failed"+(t?": "+t:""))},t.ensureDefined=n,t.ensureNotNull=r,t.ensure=function(e){return r(n(e))},t.ensureNever=function(e){}},F58L:function(e,t,i){"use strict";i.r(t),i.d(t,"StudyTemplates",(function(){return p}));var n=i("zUrt"),r=i("JWMC"),o=i("aIyQ"),s=i.n(o),a=i("hY0g"),l=i.n(a),c=i("oNDq"),u=i("txPx"),h=Object(u.getLogger)("Platform.StudyTemplates"),d={confirmDelete:window.t("Do you really want to delete Study Template '{0}' ?")},p=function(){function e(e){var t=this;this._chartWidgetCollection=e.chartWidgetCollection,this._favoriteStudyTemplatesService=e.favoriteStudyTemplatesService, +window.loginStateChange.subscribe(null,n.backend.invalidateStudyTemplatesList),this._list=new l.a([]),this._onChange=new s.a,this._list.subscribe((function(){return t._onChange.fire()}))}return e.prototype.findRecordByName=function(e){return this._list.value().find((function(t){return t.name===e}))||null},e.prototype.showSaveAsDialog=function(){var e=this,t=this._chartWidgetCollection.activeChartWidget.value().model();Promise.all([i.e("react"),i.e(1),i.e(3),i.e(6),i.e(7),i.e(8),i.e(10),i.e(13),i.e(16),i.e(22),i.e(41),i.e(46),i.e(81),i.e(0),i.e(5),i.e(11),i.e("study-template-dialog")]).then(i.bind(null,"IDfV")).then((function(i){new i.StudyTemplateSaver({controller:t,onSave:function(t){e._list.setValue(t)}}).show()}))},e.prototype.applyTemplate=function(e){var t=this,i=this.findRecordByName(e);null!==i?window.runOrSignIn((function(){var e=t._chartWidgetCollection.activeChartWidget.value(),o=function(t){Object(r.trackEvent)("GUI","Load Study Template"),e.model().applyStudyTemplate(JSON.parse(t.content),i.name)};void 0!==i.id?i.is_default?n.backend.getStandardStudyTemplateContentById(i.id,o):n.backend.getStudyTemplateContentById(i.id,o):n.backend.getStudyTemplateContent(i.name).then(o)}),{source:"Study templates apply"}):h.logNormal("Template "+name+" not found in cache")},e.prototype.deleteStudyTemplate=function(e){var t=this.findRecordByName(e);null!==t?this._removeTemplate(t):h.logNormal("Template "+e+" not found in cache")},e.prototype.list=function(){return this._list.value()},e.prototype.getOnChange=function(){return this._onChange},e.prototype.refreshStudyTemplateList=function(e){var t=this;n.backend.getStudyTemplatesList().then((function(i){t._list.setValue(i),void 0!==e&&e()}))},e.prototype.invalidate=function(){n.backend.invalidateStudyTemplatesList()},e.prototype._removeTemplate=function(e){var t=this;window.runOrSignIn((function(){Object(c.createConfirmDialog)({type:"modal",content:document.createTextNode(d.confirmDelete.format(e.name))}).then((function(i){i.on("action:yes",(function(i){var r=function(){t.refreshStudyTemplateList((function(){var n=t.list();t._list.setValue(n.filter((function(t){return t!==e}))),t._favoriteStudyTemplatesService&&t._favoriteStudyTemplatesService.remove(e.name),i.actionLoader("yes","stop"),i.close()}))};i.actionLoader("yes","start"),n.backend.invalidateStudyTemplatesList(),void 0!==e.id?n.backend.removeStudyTemplateById(e.id,r):n.backend.removeStudyTemplate(e.name).then(r)})),i.open()}))}),{source:"Study templates delete"})},e}()},FBsw:function(e,t,i){"use strict";i.r(t),i.d(t,"OverlayPriceAxisView",(function(){return s}));var n=i("mrSG"),r=i("KcY8"),o=i("oXaB"),s=function(e){function t(t){var i=e.call(this)||this;return i._source=t,i}return Object(n.__extends)(t,e),t.prototype._updateRendererData=function(e,t,i){e.visible=!1,t.visible=!1;var n=this._source.lastValueData("close",!1);if(!n.noData){var r=this._source.model(),s=this._source.priceScale();if(null!==s&&r.isPriceScaleVisible(s)){i.background=n.color,i.color=this.generateTextColor(n.color),i.coordinate=n.coordinate, +i.floatCoordinate=n.floatCoordinate;var a=this._source.model().properties().scalesProperties;a.showSeriesLastValue.value()&&(e.text=this._text(n),e.visible=!0),t.text="",(a.showSymbolLabels.value()||a.seriesLastValueMode.value()===o.PriceAxisLastValueMode.LastPriceAndPercentageValue)&&(t.text=this._paneText(n),t.visible=t.text.length>0)}}},t.prototype._paneText=function(e){var t="",i=this._source.model().properties().scalesProperties;i.showSymbolLabels.value()&&(t+=this._source.symbol()+" ");var n=this._source.priceScale();return null!==n&&i.showSeriesLastValue.value()&&i.seriesLastValueMode.value()===o.PriceAxisLastValueMode.LastPriceAndPercentageValue&&(t+=n.isPercentage()?e.formattedPriceAbsolute:e.formattedPricePercentage),t.trim()},t.prototype._text=function(e){var t=this._source.model().properties().scalesProperties,i=this._source.priceScale();return t.seriesLastValueMode.value()!==o.PriceAxisLastValueMode.LastPriceAndPercentageValue||null===i?e.text:i.isPercentage()?e.formattedPricePercentage:e.formattedPriceAbsolute},t}(r.a)},FBuY:function(e,t,i){"use strict";i.r(t),i.d(t,"TVXWindowEvents",(function(){return n}));i("HbRj");var n,r=i("txPx"),o=i("VVxS"),s=Object(r.getLogger)("XWindowEvents");!function(e){var t,i="tvxwevents.",n={};window.BroadcastChannel?((t=new BroadcastChannel("tvxwevents")).addEventListener("message",(function(e){var t=e.data,i=t.event,r=t.value;n[i]&&n[i].forEach((function(e){e(r)}))})),function(){for(var e=[],t=performance.now(),n=0;n0&&(a+=o(c+11)/2),a+=o(c)/2}e.restore()},e.prototype.hitTest=function(e){for(var t=0,i=this._drawRects;t=r.left&&e.x<=r.left+r.width&&e.y>=r.top&&e.y<=r.top+r.height)return new n.HitTestResult(n.HitTestResult.REGULAR)}return null},e}()},Fixu:function(e,t,i){ +"use strict";i.d(t,"c",(function(){return r})),i.d(t,"d",(function(){return o})),i.d(t,"b",(function(){return s})),i.d(t,"a",(function(){return a}));i("Eyy1"),i("dfhE");function n(e,t){0}function r(e){n()}function o(e){n()}function s(e){n()}function a(e){0}},FsE7:function(e,t,i){"use strict";var n=i("Ss5c").LineDataSource,r=i("5rJj"),o=i("ytGH").LineToolWidthsProperty,s=window.t("Fib Time Zone");function a(e,t){var r=t||a.createProperties();n.call(this,e,r),this.version=a.version,i.e("lt-pane-views").then(function(e){var t=i("wgWl").FibTimeZonePaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe);for(var s=[],l=1;l<=a.LevelsCount;l++)s.push(this._properties.child("level"+l).child("linewidth"));this._widthsProperty=new o(s)}inherit(a,n),a.version=2,a.LevelsCount=11,a.prototype.levelsCount=function(){return a.LevelsCount},a.prototype.migrateVersion=function(e,t,i){if(1===e){i.properties.level1.color.setValue(i.properties.baselinecolor.value());for(var n=2;n<=11;n++)i.properties["level"+n].color.setValue(i.properties.linecolor.value());for(n=1;n<=11;n++)i.properties["level"+n].linewidth.setValue(i.properties.linewidth.value()),i.properties["level"+n].linestyle.setValue(i.properties.linestyle.value())}},a.prototype.pointsCount=function(){return 2},a.prototype.translatedType=function(){return s},a.prototype.name=function(){return"Fib Time Zone"},a.prototype.processErase=function(e,t){var i="level"+t,n=this.properties()[i].visible;e.setProperty(n,!1,"Erase level line")},a.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("SMr9").FibTimezoneDefinitionsViewModel}.bind(null,i)).catch(i.oe)},a.createProperties=function(e){var t=new r("linetoolfibtimezone",e,!1,{range:[1,11]});return a._configureProperties(t),t},a._configureProperties=function(e){n._configureProperties(e)},t.LineToolFibTimeZone=a},G3Rl:function(e,t,i){"use strict";function n(e,t){var i=new Map;return function(){for(var n=[],r=0;r-1,I=T&&navigator.userAgent.toLowerCase().indexOf("windows")>-1,M=navigator.userAgent.toLowerCase().indexOf("chrome")>-1&&-1===navigator.userAgent.toLowerCase().indexOf("edge"),L=window.urlParams||{};window.initData;function O(e,t,i){var n=(0,p.createDisconnectedBoundCanvas)(document,new p.Size(t,i));return(0,p.getPrescaledContext2D)(n.canvas).drawImage(e,0,0,t,i),n}function k(e){return!g||e>500}L.no_referral_id&&enable(L.referral_id||"","aggressive");var A=function(){function e(t){var i=t.layout,n=void 0===i?"site_branding":i,r=t.symbol,o=void 0===r?"":r,s=t.model,l=t.onReadyCallback;f(this,e),this._model=s,this._image=null,this._imageReady=!1,this._needDisplayImage=!1,this._imageWidth=22,this._imageHeight=13,this._layout=n,this._symbol=o,this.showAnimatedBranding=a.enabled("show_animated_logo")||"widget_branding"===this._layout,this.show=!0,this.width=100,this.height=14,this._bottomShift=0,this._brandCircleSize=32,this._animatedWidth=this._brandCircleSize,this._animatedOpacity=0,this.width=this.showAnimatedBranding?this._brandCircleSize:100,this.height=14,this._fillColor=c.color.brandNew,this._colorOldBlue=c.color.brandNew2,this._colorOldGray=c.color.black30, +this._strokeColor=c.color.black255,this._brandCircleShadowColor=c.color.black0,this._strokeWidth=4,this._fontSize=this.showAnimatedBranding?11:14,this._font="px "+y,this._txt="TradingView",this._onReadyCallback=l,this._upscaleRatio=M?1:2,this._verticalTextShift=T?this.showAnimatedBranding?2:4:0,this._strokeCanv=null,this._fillCanv=null,this._init()}return r(e,[{key:"_init",value:function(){this._checkLayout(),this.show&&(this._updateStrokeColor(),this.showAnimatedBranding?(this._loadImage(v,"tvLogo"),this._createFillText()):this._loadImage(v,"tvLogo"),this._model.properties().paneProperties.background.subscribe(this,this._updateStrokeColor),this._model.onChartThemeLoaded().subscribe(this,this._updateStrokeColor))}},{key:"_updateStrokeColor",value:function(){var e=(0,u.getLuminance)(this._model.properties().paneProperties.background.value());this._strokeCanv=null,this._fillCanv=null,e>.2?(this._brandCircleColor=c.color.black255,this._animatedColorBg=c.color.black255,this._brandCircleShadowOpacity=.09,this._strokeOpacity=.8):(this._brandCircleColor=c.color.black27,this._animatedColorBg=c.color.black27,this._brandCircleShadowOpacity=.09,this._strokeOpacity=.1)}},{key:"_loadImage",value:function(e,t){var i=this;if(this._needDisplayImage){this._image={canvas:new Image},this.showAnimatedBranding&&(this._imageWhite={canvas:new Image});var n=e.replace(/fill="#[\da-f]{6}"/i,'fill="#FFFFFF"');this._image.canvas.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(e),this.showAnimatedBranding&&(this._imageWhite.canvas.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(n)),this._image.canvas.addEventListener("load",(function(){I&&(i._image=O(i._image.canvas,i._imageWidth,i._imageHeight)),i._imageReady=!0,"function"==typeof i._onReadyCallback&&i._onReadyCallback()}))}}},{key:"_checkLayout",value:function(){switch(this._layout){case"widget_branding":case"widget_referral_branding":case"widget_custom_branding":case"fundamental_branding":case"fundamental_custom_branding":case"library_custom_branding":case"library_branding":case"site_branding":this.show=!0;break;case"widget_custom_no_powered_branding":case"fundamental_custom_no_powered_branding":case"library_custom_no_powered_branding":this.show=!1}switch(this._layout){case"library_branding":this._needDisplayImage=!0,this._txt=window.t(w);break;case"library_custom_branding":this._txt=window.t(x)}}},{key:"_drawTextStroke",value:function(e){if(!this._strokeCanv){this._strokeCanv=(0,p.createDisconnectedBoundCanvas)(document,new p.Size(0,0));var t=(0,p.getPretransformedContext2D)(this._strokeCanv),i=Math.round(this._strokeWidth*this._upscaleRatio);t.font=this._fontSize*this._upscaleRatio+this._font,this._textWidth=t.measureText(this._txt).width+2;var n=this._textWidth+2*i,r=(this._fontSize+2*i)*this._upscaleRatio;n%2==0&&(n+=1,r+=1),this._strokeCanv.resizeCanvas({width:n,height:r}),(t=(0,p.getPretransformedContext2D)(this._strokeCanv)).textBaseline="top",t.textAlign="start",t.font=this._fontSize*this._upscaleRatio+this._font,t.strokeStyle=this._strokeColor, +t.lineWidth=this._strokeWidth*this._upscaleRatio,t.lineJoin="round",t.strokeText(this._txt,i,this._verticalTextShift)}e.save(),e.globalAlpha=this._strokeOpacity,e.drawImage(this._strokeCanv.canvas,0,0,this._strokeCanv.canvas.width,this._strokeCanv.canvas.height,0,0,this._strokeCanv.canvas.width/this._upscaleRatio/this._strokeCanv.pixelRatio,this._strokeCanv.canvas.height/this._upscaleRatio/this._strokeCanv.pixelRatio),e.restore()}},{key:"_drawTextFill",value:function(e){this._createFillText(),e.save(),e.drawImage(this._fillCanv.canvas,0,0,this._fillCanv.canvas.width,this._fillCanv.canvas.height,0,0,this._fillCanv.canvas.width/this._upscaleRatio/this._fillCanv.pixelRatio,this._fillCanv.canvas.height/this._upscaleRatio/this._fillCanv.pixelRatio),e.restore()}},{key:"_createFillText",value:function(){if(null===this._fillCanv){this._fillCanv=(0,p.createDisconnectedBoundCanvas)(document,new p.Size(0,0));var e=(0,p.getPretransformedContext2D)(this._fillCanv),t=Math.round(this._strokeWidth*this._upscaleRatio);e.font=this._fontSize*this._upscaleRatio+this._font,void 0===this._textWidth&&(this._textWidth=Math.round(e.measureText(this._txt).width)+2),this._setSizeFillTextCanvas(t),(e=(0,p.getPretransformedContext2D)(this._fillCanv)).textBaseline="top",e.textAlign="start",e.font=this._fontSize*this._upscaleRatio+this._font,e.fillStyle=this._fillColor,e.fillText(this._txt,t,this._verticalTextShift)}}},{key:"_updateFillTextWithColor",value:function(e){var t=Math.round(this._strokeWidth*this._upscaleRatio);this._setSizeFillTextCanvas(t);var i=(0,p.getPretransformedContext2D)(this._fillCanv);i.clearRect(0,0,this._fillCanv.canvas.width,this._fillCanv.canvas.height),i.textBaseline="top",i.textAlign="start",i.font=this._fontSize*this._upscaleRatio+this._font,i.fillStyle=e,i.fillText(this._txt,t,this._verticalTextShift)}},{key:"_setSizeFillTextCanvas",value:function(e){var t=this._textWidth+2*e,i=(this._fontSize+2*e)*this._upscaleRatio;t%2==0&&(t+=1,i+=1),this._fillCanv.resizeCanvas({width:t,height:i})}},{key:"_drawFillTextCropWidth",value:function(e,t,i){this._fillCanv?this._updateFillTextWithColor(i):this._createFillText(),e.save(),e.drawImage(this._fillCanv.canvas,0,0,t*this._upscaleRatio*this._fillCanv.pixelRatio,this._fillCanv.canvas.height,0,0,t,this._fillCanv.canvas.height/this._upscaleRatio/this._fillCanv.pixelRatio),e.restore()}},{key:"_drawBgCircle",value:function(e){e.save(),e.beginPath(),e.fillStyle=this._brandCircleShadowColor,e.globalAlpha=this._brandCircleShadowOpacity,e.arc(this._imageWidth/2,this._imageHeight/2,this._brandCircleSize/2+1,0,2*Math.PI),e.fill(),e.closePath(),e.restore(),e.save(),e.beginPath(),e.fillStyle=this._brandCircleColor,e.arc(this._imageWidth/2,this._imageHeight/2,this._brandCircleSize/2,0,2*Math.PI,!1),e.fill(),e.closePath(),e.restore()}},{key:"_drawFillRectWithRoundedCorner",value:function(e,t,i,n,r,o,s){e.save(),(0,d.drawRoundRect)(e,t-1,i-1,n+2,r+2,o),e.globalAlpha=this._brandCircleShadowOpacity,e.fillStyle=this._brandCircleShadowColor,e.fill(),e.closePath(),e.restore(),e.save(),(0, +d.drawRoundRect)(e,t,i,n,r,o),e.fillStyle=s,e.fill(),e.closePath(),e.restore()}},{key:"_drawImageWithColor",value:function(e){e.save(),e.globalAlpha=this._animatedOpacity,e.drawImage(this._imageWhite.canvas,0,-.5,this._imageWidth,this._imageHeight),e.restore(),e.save(),e.globalAlpha=1-this._animatedOpacity,e.drawImage(this._image.canvas,0,-.5,this._imageWidth,this._imageHeight),e.restore()}},{key:"destroy",value:function(){this._model.properties().paneProperties.background.unsubscribeAll(this),this._model.onChartThemeLoaded().unsubscribeAll(this)}},{key:"bottomShift",value:function(){return this._bottomShift}},{key:"hasAnimation",value:function(){return this.showAnimatedBranding}},{key:"minimizedAnimationWidth",value:function(){return this._brandCircleSize}},{key:"maximizedAnimationWidth",value:function(){return this._createFillText(),this._fillCanv.canvas.width/this._upscaleRatio/this._fillCanv.pixelRatio+this._brandCircleSize-3}},{key:"animatedDrawStep",value:function(e,t){this._animatedWidth=t;var i=this._animatedWidtho&&(e.translate(this._imageWidth/2+r,.5),this._drawFillTextCropWidth(e,this._animatedWidth-o,this._animatedColorText)),e.restore(),this.width=this._animatedWidth,this.height=this._brandCircleSize,this._bottomShift=this._brandCircleSize-this._imageHeight}}else if("widget_custom_branding"===this._layout||"fundamental_custom_branding"===this._layout){var s="12px "+y;e.font=s;var a=e.measureText(this._txt).width+2;this.width=a+e.measureText("TradingView").width+2,e.save(),e.globalAlpha=.7,e.fillStyle=this._colorOldGray,e.fillText(this._txt,0,12),e.fillStyle=this._colorOldBlue,e.fillText("TradingView",a,12),e.restore()}else if(function(e){return!b||e>480}(t))if(this._needDisplayImage&&this._imageReady){e.save();var l=(this._brandCircleSize-this._imageWidth)/2;e.translate(l,0),this._drawBgCircle(e),e.drawImage(this._image,0,-.5,this._imageWidth,this._imageHeight);var c=12+(M?-.5:0);e.translate(this._imageWidth+c,-.5);var u=k(t);u&&(this._drawTextStroke(e), +this._drawTextFill(e)),e.restore(),this.width=this._imageWidth+l,this.width+=u?c+this._strokeCanv.canvas.width/this._upscaleRatio/this._strokeCanv.pixelRatio:l,this.height=this._brandCircleSize,this._bottomShift=this._brandCircleSize-this._imageHeight}else{e.save(),e.translate(M?-.5:0,-.5);var h=k(t);h&&(this._drawTextStroke(e),this._drawTextFill(e)),e.restore(),h&&(this.width=this._strokeCanv.canvas.width/this._upscaleRatio/this._strokeCanv.pixelRatio)}}}]),e}(),E=function(){function e(t){var i=t.layout,n=void 0===i?"site_branding":i,r=t.src,o=t.onReadyCallback;f(this,e),this._img=new Image,this._ready=!1,this.show=!1,this.width=0,this.height=0,this._layout=n,this._src=r,this._onReadyCallback=o,this._init()}return r(e,[{key:"_init",value:function(){var e=this;this._checkLayout(),this.show&&(this._img.src=this._src,this._img.addEventListener("load",(function(){e.width=Math.round(e._img.width),e.height=Math.round(e._img.height),I&&(e._img=O(e._img,e.width,e.height).canvas),e._ready=!0,"function"==typeof e._onReadyCallback&&e._onReadyCallback()})))}},{key:"_checkLayout",value:function(){switch(this._layout){case"widget_custom_branding":case"widget_custom_no_powered_branding":case"fundamental_custom_branding":case"fundamental_custom_no_powered_branding":case"library_custom_branding":case"library_custom_no_powered_branding":this.show=!0;break;case"site_branding":case"widget_branding":case"widget_referral_branding":case"fundamental_branding":case"library_branding":this.show=!1}}},{key:"draw",value:function(e){this._ready&&e.drawImage(this._img,0,0,this.width,this.height)}}]),e}();t.Branding=function(){function e(t,i,n){var r=this;f(this,e),this._model=t,this._mainSeries=this._model.mainSeries(),this._canvasWidth=0,this._showAllowance=i,this._showForPro=n,this._paneHeight=0,this._left=13,this._bottom=16,this._layout="site_branding",this._needToShow=!0,this._customLogoSrc="",this._customLogoLink="",this._checkLayout(),"widget_custom_branding"!==this._layout&&"fundamental_custom_branding"!==this._layout||(this._left=8,this._bottom=5);var o=function(){r._needToShow?r._showBranding=!0:r._showBranding=!1};this._resizeHandlerDelayed=m(o,200),o(),window.addEventListener("resize",this._resizeHandlerDelayed),this._monitorCanvas=(0,p.createDisconnectedBoundCanvas)(document,new p.Size(0,0)),this._monitorCanvas.subscribeCanvasConfigured((function(){r._init()})),this._model.isSnapshot()?this._init():(this._mainSeries.dataEvents().symbolResolved().subscribe(this,this._init),null!==this._mainSeries.symbolInfo()&&this._init()),this._cubicBezier=new c.CubicBezier(.4,.01,.22,1)}return r(e,[{key:"destroy",value:function(){window.removeEventListener("resize",this._resizeHandlerDelayed),this._mainSeries.dataEvents().symbolResolved().unsubscribeAll(this),this._powBy&&this._powBy.destroy()}},{key:"_init",value:function(){var e=this,t=this._mainSeries.symbolInfo()||{};this._powBy&&this._powBy.destroy(),this._powBy=new A({layout:this._layout,symbol:t.name,model:this._model,onReadyCallback:function(){return e._model.fullUpdate()}}), +this._custom=new E({layout:this._layout,src:this._customLogoSrc,onReadyCallback:function(){return e._model.fullUpdate()}}),this._openAnimation=null,this._closeAnimation=null}},{key:"_checkLayout",value:function(){if(a.enabled("widget"));else if(a.enabled("charting_library")||a.enabled("amp_terminal")||a.enabled("cqg_terminal")||a.enabled("trading_terminal")){var e=JSON.parse(L.logo)||{};e.image?(this._customLogoSrc=e.image,this._customLogoLink=e.link,this._needToShow=a.enabled("widget_logo"),a.enabled("link_to_tradingview")?this._layout="library_custom_branding":this._layout="library_custom_no_powered_branding"):(this._layout="library_branding",this._needToShow=a.enabled("widget_logo"))}else this._layout="site_branding"}},{key:"_startOpenAnimation",value:function(){null===this._openAnimation&&(null!==this._closeAnimation&&(this._closeAnimation.stop(),this._closeAnimation=null),this._openAnimation=(0,h.doAnimate)({from:this._currentStateForAnimation(),to:this._openedStateForAnimation(),duration:200,easing:this._cubicBezier.easingFunc,onStep:this._animatedDrawStep.bind(this)}))}},{key:"_openLink",value:function(){return"site_branding"!==this._layout&&(window.open(this.tvUrl(),"_blank").opener=null,!0)}},{key:"_toggleOpenAnimatedOrOpenLink",value:function(){null!==this._openAnimation&&this._openAnimation.completed()?this._openLink()||this._startCloseAnimation():this._startOpenAnimation()}},{key:"_startCloseAnimation",value:function(){null===this._closeAnimation&&(null!==this._openAnimation&&(this._openAnimation.stop(),this._openAnimation=null),this._closeAnimation=(0,h.doAnimate)({from:this._currentStateForAnimation(),to:this._closedStateForAnimation(),duration:200,easing:this._cubicBezier.easingFunc,onStep:this._animatedDrawStep.bind(this)}))}},{key:"onClickOutside",value:function(){this._hasAnimation()&&this._startCloseAnimation()}},{key:"_currentStateForAnimation",value:function(){return this._powBy.width}},{key:"_closedStateForAnimation",value:function(){return this._powBy.minimizedAnimationWidth()}},{key:"_openedStateForAnimation",value:function(){return this._powBy.maximizedAnimationWidth()}},{key:"_animatedDrawStep",value:function(e,t){this._powBy.animatedDrawStep(e,t),this._model.lightUpdate()}},{key:"_hasAnimation",value:function(){return this._powBy.hasAnimation()}},{key:"updateAllViews",value:function(){}},{key:"priceScale",value:function(){return null}},{key:"priceAxisViews",value:function(){return[]}},{key:"hasContextMenu",value:function(){return!1}},{key:"hitTest",value:function(e){var t=this;return!this._showBranding||a.enabled("logo_without_link")?null:this._powBy&&"widget_custom_no_powered_branding"!==this._layout&&"fundamental_custom_no_powered_branding"!==this._layout&&(0,s.pointInBox)(e,(0,o.box)(new o.Point(this._left,this._paneHeight-Math.max(this._powBy.height,void 0!==this._custom?this._custom.height:0)-this._bottom),new o.Point(this._left+Math.max(this._powBy.width,void 0!==this._custom?this._custom.width:0),this._paneHeight-this._bottom)))?new l.HitTestResult(l.HitTestResult.CUSTOM,{ +clickHandler:function(){t._openLink()},tapHandler:function(){t._hasAnimation()?t._toggleOpenAnimatedOrOpenLink():t._openLink()},mouseEnterHandler:function(){t._hasAnimation()&&t._startOpenAnimation()},mouseLeaveHandler:function(){t._hasAnimation()&&t._startCloseAnimation()}}):null}},{key:"tvUrl",value:function(){var e="https://www.tradingview.com/";if(this._customLogoLink)return this._customLogoLink;if("library_branding"===this._layout||"library_custom_branding"===this._layout){var t=void 0;switch(!0){case a.enabled("charting_library"):t="library";break;case a.enabled("trading_terminal"):case a.enabled("amp_terminal"):case a.enabled("cqg_terminal"):t="trading-terminal"}return e+="/"===e[e.length-1]?"?":"&",e+="utm_source="+window.location.origin+"&utm_medium=library"+(t?"&utm_campaign="+t:"")}return e}},{key:"draw",value:function(e,t){var i=this;if(this._showBranding){var n=0;L.utm=!0,(0,p.drawScaled)(e,t.pixelRatio,(function(){e.translate(-.5,-.5),i._powBy&&i._powBy.show&&(n=i._powBy.height-i._powBy.bottomShift(),e.save(),e.translate(i._left,i._paneHeight-i._bottom-n),i._powBy.draw(e,t,i._canvasWidth),e.restore()),i._custom&&i._custom.show&&(e.save(),e.translate(i._left,i._paneHeight-i._bottom-n-i._custom.height),i._custom.draw(e,t),e.restore())}))}}},{key:"renderer",value:function(e,t){return this._paneHeight=e,this._canvasWidth=t,{draw:this.draw.bind(this),hitTest:this.hitTest.bind(this)}}},{key:"paneViews",value:function(e){if(TradingView.printing)return[];if(!this._showAllowance())return[];if("site_branding"===this._layout&&!this._showForPro&&window.user&&window.user.is_pro)return[];var t=a.enabled("move_logo_to_main_pane");return t&&e.isMainPane()||!t&&e.isLast()||e.isMaximized()?[{renderer:this.renderer.bind(this)}]:[]}},{key:"labelPaneViews",value:function(e){return[]}}]),e}()},GUQs:function(e,t,i){"use strict";i.d(t,"a",(function(){return r})),i.d(t,"c",(function(){return o})),i.d(t,"b",(function(){return s}));var n=i("qFKp");function r(e){e.cancelable&&e.preventDefault()}function o(e){return function(t){r(t),e()}}function s(e){n.isChrome&&e.addEventListener("mousedown",(function(e){if(1===e.button)return e.preventDefault(),!1}))}},GVHu:function(e,t,i){"use strict";(function(e,n,r){ +var o=i("Eyy1"),s=o.assert,a=o.ensureNotNull,l=i("hsV8").unpackNonSeriesData,c=i("38az").StudyBarColorer,u=i("bGI9").StudyTrackPricePaneView,h=i("AXy7"),d=h.BandPaneView,p=h.BandBackgroundPaneView,_=h.HlineFillPaneView,f=i("hezA").StudyPriceAxisView,m=i("KtbP").PanePriceAxisView,v=i("I9zs"),y=v.StudyPaneView,g=v.StudyBackgroundPaneView,b=v.StudyPlotShapesPaneView,S=v.StudyPlotCharsPaneView,w=v.StudyPlotArrowsPaneView,P=v.StudyPlotBarsPaneView,C=v.StudyPlotCandlesPaneView,x=i("x40+"),T=x.PlotFillPaneView,I=x.AreaBackgroundPaneView,M=i("it7y").StudyDataWindowView,L=i("8qoI").StudyLegendView,O=i("2kV1").StudyStatusView,k=i("jenN"),A=k.emptyStudyGraphics,E=k.loadStudyGraphics,V=k.saveStudyGraphics,D=k.LiveStudyGraphics,B=k.createGraphicsPaneViews,R=k.createGraphicsPriceAxisViews,N=i("XzZr").ChartApiInterface,F=i("Ocx9").DefaultProperty,j=i("kcTO").PriceFormatter,W=i("nEwK").VolumeFormatter,H=i("zXvd").NumericFormatter,z=i("GH0z").PercentageFormatter,U=i("k9/m"),G=U.PlotList,Y=U.PlotRowSearchMode,q=U.mergeMinMax,K=i("972a").MarkLocation,Z=i("0YCj"),J=(i("cBZt").extractStudyId,i("TcSq").extractPineId,i("FQhm")),X=i("23IT"),Q=X.LineStudyPlotStyle,$=i("hayr").propertyPages,ee=i("TmNs").StudyPriceLineAxisView,te=i("w4Ji").studyPlotFunctionMap,ie=i("w4Ji").studyEmptyPlotValuePredicate,ne=i("jy4L").makeNextStudyId,re=i("Kxc7"),oe=i("IcDj").StudyBase,se=i("txPx").getLogger("Chart.Study"),ae=(Number(window.TELEMETRY_SERVER_TIME_DIFF_THRESHOLD),re.enabled("datasource_copypaste")),le=window.t("loading...");function ce(e,t,i){var n=new F(t,i,!0);n.addExclusion("visible"),n.addExclusion("precision"),n.addExclusion("minTick");for(var r=0;rg+1){var x=m[g+1];if(null!=x){var T=b.valToIndex?b.valToIndex[x]:x;y.color=v.colors[T].color.value()}else y.color=C}else y.color=C;return y.floatCoordinate=this.priceScale().priceToCoordinate(w,P),y.coordinate=y.floatCoordinate,y.item=m,y},he.prototype.isFailed=function(){return this._failed},he.prototype.isLoading=function(){return this._loading},he.prototype.series=function(){return this._series},he.prototype.model=function(){return this._model},he.prototype.currency=function(){var e=this.metaInfo();return Boolean(e)&&e.is_price_study?this.parentSource().currency():null},he.prototype._invalidateLastNonEmptyPlotRowCache=function(){this._lastNonEmptyPlotRowCache={}},he.prototype.clearData=function(){this._invalidateLastNonEmptyPlotRowCache(),this.m_data.clear(),this._graphics.clear&&this._graphics.clear(),this._plotOffsets={}},he.prototype.onTagsChanged=function(){return this._tagsChanged},he.prototype.properties=function(){return this._properties},he.prototype.state=function(e,t){var i={type:TradingView.className(this.constructor),id:this.id(),state:this.properties().state(),zorder:this.zorder()};this.metaInfo()instanceof Z?i.metaInfo=TradingView.clone(this.metaInfo().state()):(i.metaInfo=TradingView.clone(this.metaInfo()),i.metaInfo.id=Z.parseIdString(i.metaInfo.id+(i.metaInfo.version?"-"+i.metaInfo.version:"")).fullId),e&&(i.data=this.data().state(),i.data.symbols=this._resolvedSymbols,i.data.graphics=V(this.graphics()),i.data.plotOffsets=this._plotOffsets),this.ownerSource()&&(i.ownerSource=this.ownerSource().id());for(var n=0;n=0?s:0}}return this._isChildStudy&&Z.patchChildStudyMetaInfoState(i),i},he.prototype._plotsForAlert=function(){var e=this,t=this._metaInfo,i=[X.isLinePlot,X.isShapesPlot,X.isCharsPlot,X.isArrowsPlot,X.isOhlcPlot,X.isAlertConditionPlot];return t.plots.map((function(e,t){return e.pinePlotIndex=t,e})).filter((function(e){return i.some((function(t){return t(e)}))})).map((function(i){var n={id:i.id,type:i.type,pinePlotIndex:i.pinePlotIndex,offset:e.offset(i.id)};return t.styles&&void 0!==t.styles[i.id]&&(n.title=t.styles[i.id].title||"",n.text=t.styles[i.id].text||""), +i.target&&t.ohlcPlots&&t.ohlcPlots[i.target]&&(n.ohlcTitle=t.ohlcPlots[i.target].title),n}))},he.prototype._collectDepsForAlert=function(){throw new Error("Not implemented")},he.prototype.idForAlert=function(){return oe.prototype.idForAlert.call(this)},he.prototype.dependenciesForAlerts=function(){throw new Error("Not implemented")},he.prototype._hasAvailableAlertPlots=function(){return!1},he.prototype._hasAlertablePlots=function(){return(this.metaInfo().plots||[]).some((function(e){return"line"===e.type}))},he.prototype._hasAlertConditions=function(){if(this.metaInfo().plots.some(X.isAlertConditionPlot))return!0;var e=this.stateForAlert();return!(!e.alerts||!e.alerts.conditions)},he.prototype._isAlertFeatureEnabled=function(){return!1},he.prototype.hasStateForAlert=function(){return this._isAlertFeatureEnabled()&&(this.metaInfo().isTVScript?this._hasAlertConditions()||this._hasAvailableAlertPlots()&&!this.isFailed():this._hasAlertablePlots()&&!this.isFailed())},he.prototype.stateForAlert=function(){throw new Error("Not implemented")},he.prototype.isSavedInStudyTemplates=function(){for(var e=0;e0)return!0;for(var e in this._metaInfo.graphics)for(var t in this._metaInfo.graphics[e]){var i=this.properties().graphics[e][t];if(!i.visible||i.visible.value())return!0}return!!this._metaInfo.isTVScriptStrategy},he.prototype.start=function(e,t){var i=this._model.mainSeries();if(i.isStarted()){this._isChildStudy&&this._source.isHibernated()&&this._source.start();var n=!this._isChildStudy&&!this.hasChildren()&&!this.isVisible();!this._chartApi||!this._chartApi.connected()||n&&!0!==t||this._allSymbolsAreResolved().then(function(){this._startAfterSymbolsResolved(e,t)}.bind(this)).catch(function(e){se.logError("ERROR: "+this._debugId()+" start failed, "+e),delete this._restarting}.bind(this))}else i.dataEvents().completed().subscribe(this,(function(){this.start(e,t)}),!0)},he.prototype._getStudyIdWithLatestVersion=function(){var e=Z.cutDollarHash(this._metaInfo.id),t=e;return e.indexOf("@tv-scripting")>=0?t+="-101!":t+="-"+this._metaInfo.version,t},he.prototype._startAfterSymbolsResolved=function(e,t){if(!this.isStarted()||this._restarting){if(this._isChildStudy){if(!this._source.isStarted()||this._source.isRestarting())return void this._source.onStart.subscribe(this,this._startAfterSymbolsResolved,!0);Z.setChildStudyMetaInfoPropertiesSourceId(this._metaInfo,this._source.sourceId(),this._properties)}if(this._studyId=ne(),delete this._restarting,this._allInputsAreValid()){this._inputs=this.inputs({keepOptionalSymbolsEmpty:!0});var i=this._getStudyIdWithLatestVersion();if(this._incrementTurnaround(),this._chartApi.createStudy(this._studyId,this._turnaround,this._isChildStudy?this._source.sourceId():this._series._seriesId,i,this._inputs,this._handler,this._isChildStudy),this._studyName=i,this._subscribeExtendedHours(),this.onStart.fire(),!0===e&&this._children)for(var n=0;n=e){var i=a(this._series.bars().lastIndex())-e;t=a(this._series.bars().valueAt(i))[TradingView.TIME_PLOT]}return t}, +he.prototype._titleInputs=function(e,t){return this.inputs({symbolsForDisplay:!0,skipHiddenInputs:!0,skipFakeInputs:!1,fakeInputsForDisplay:!0,asObject:!1,skippedGroups:[],noExchanges:e,noResolution:t})},he.prototype.inputsForAlert=function(){var e=this.offset(),t=this.inputs();return e&&t.push(e),t},he.prototype.inputs=function(e){var t={symbolsForDisplay:!1,symbolsForChartApi:!0,skipHiddenInputs:!1,skipFakeInputs:!1,skipBooleanInputs:re.enabled("dont_show_boolean_study_arguments"),asObject:!0,skippedGroups:[],skippedInputs:[],noExchanges:!1,noResolution:!1,keepOptionalSymbolsEmpty:!1};return TradingView.merge(t,e),this._buildInputs(t)},he.prototype.inputsForAlertState=function(){return this.inputs()},he.prototype._buildInputs=function(e){s(!!e,"options not set");var t={};try{t=this._prepareInputs(e)}catch(n){se.logWarn("Failed to prepare study inputs: "+n)}if(e.asObject){var i={};return Object.keys(t).forEach((function(e){null!=t[e]&&(i[e]=t[e])})),i}i=[];return Object.keys(t).forEach((function(e){null!=t[e]&&i.push(t[e])})),i},he.prototype._prepareInputs=function(e){s(!!e,"options not set");for(var t={},i=0;i=0?a:s}return s}return this._metaInfo.isTVScript||this._metaInfo.pine?"text"===i?this._metaInfo.defaults.inputs.text:"pineId"===i?this._metaInfo.scriptIdPart:"pineVersion"===i?this._metaInfo.pine?this._metaInfo.pine.version:"-1":this._properties.inputs[i].value():this._properties.inputs[i].value()},he.prototype._rebindToSource=function(e,t){var i=this.parentSource();if(this._isChildStudy){var n;this._source.unsetChild(this),delete this._nonPriceParent;var r=null;if(e===this._model.mainSeries())this._source.currencyChanged().unsubscribeAll(this),delete this._source,delete this._isChildStudy,delete this._ownerSource,n=this._series._seriesId,r=N.REBIND_STUDY_CHILD_TO_STANDALONE, +this._series.currencyChanged().subscribe(this,this._onSourceCurrencyChanged);else{if(!(e instanceof he))return se.logError("Unable to rebind study to source of this type"),!1;this._ownerSource=e,this._source.currencyChanged().unsubscribeAll(this),this._source=e,this._source.currencyChanged().subscribe(this,this._onSourceCurrencyChanged),n=this._source.sourceId(),this._source.setChild(this),this._source.isHibernated()&&this._source.start()}this._incrementTurnaround(),this._chartApi.rebindStudy(this._studyId,this._turnaround,n,this._studyName,t,this._handler,r)}else{if(!(e instanceof he))return se.logError("Unable to rebind study to source of this type"),!1;var o=e.isHibernated();o&&e.start();var s=!1;if(this._canCreateStudyWithRebindType(N.REBIND_STUDY_STANDALONE_TO_CHILD)&&(this._incrementTurnaround(),s=this._chartApi.rebindStudy(this._studyId,this._turnaround,e.sourceId(),this._studyName,t,this._handler,N.REBIND_STUDY_STANDALONE_TO_CHILD)),!s)return o&&e.stop(),!1;this._isChildStudy=!0,this._ownerSource=e,this._source=e,this._source.setChild(this),this._childStudyByRebind.fire(),this._series.currencyChanged().unsubscribeAll(this),this._source.currencyChanged().subscribe(this,this._onSourceCurrencyChanged)}var a=this.m_priceScale,l=e.priceScale();if(a!==l){var c=this._model.paneForSource(this),u=this._model.paneForSource(e);c===u&&u.move(this,l,!0)}return i.formatterChanged().unsubscribe(this,this._onSourceFormatterChanged),this.parentSource().formatterChanged().subscribe(this,this._onSourceFormatterChanged),i.priceStepChanged().unsubscribe(this,this._onSourcePriceStepChanged),this.parentSource().priceStepChanged().subscribe(this,this._onSourcePriceStepChanged),i.currencyChanged().unsubscribeAll(this),this._recreatePriceFormattingDependencies(),!0},he.prototype.childStudyByRebind=function(){return this._childStudyByRebind},he.prototype._changeInputsImpl=function(e,t){var i=this.source(),n=this._properties.inputs&&this._properties.inputs.state(),r=Z.getSourceIdByInputs(this._metaInfo.inputs,n),o=!0;if(r)if("high"===r||"open"===r||"low"===r||"close"===r||"hl2"===r||"ohl3"===r||"ohlc4"===r)i=this._model.mainSeries();else for(var s=this._model.dataSources(),a=0;a0?" ("+t+")":"")},he.prototype._titleInParts=function(e,t,i,n){var r="";r=e?this._metaInfo.shortDescription||this._properties.shortDescription&&this._properties.shortDescription.value()||"Study":this._metaInfo.description||this._properties.description&&this._properties.description.value()||"Study",t=t||{};var o=[window.t(r)],s=[];if(!i){var a=this._getMTFResolutionInputTitle();if(null!==a&&a.length>0&&o.push(a),(s=this._titleInputs(n,!0)||[]).length>0){var l={};if(this._isChildStudy)for(var c=0;c=0&&this._source){var p=this._source.metaInfo(),_=this._source.title(e,null,!0,n);if(1===p.plots.length)l[d]=_;else{var f=d.split("$")[1],m=p.plots[f].id,v=p.styles&&p.styles[m]&&p.styles[m].title||m;l[d]=_+": "+v}}break}}var y=this;s=s.map((function(e){var i=isNumber(e)?y._numericFormatter.format(e):l&&l[e]||e;return t[i]&&(i=t[i]),i}))}}return[o.join(" · "),s]},he.prototype._getMTFResolutionInputTitle=function(){for(var e=0;e0?window.t(t):""},he.prototype._handleStudyError=function(e){delete this._loadingStartTime,this._failed=!0,this._loading=!1,this.clearData();e.params[2];this._setStatus(this._getStatusTextOnStudyError(e.params[2])),this._statusView.update(),this._model.updateSource(this)},he.prototype.onData=function(e){switch(e.method){case"study_loading":this._failed=!1,this._loading=!0,this._setStatus(le),this._statusView.update(),this._model.updateSource(this),this._loadingStartTime=(new Date).getTime();break;case"study_error":this._handleStudyError(e);break;case"study_completed": +if(!this._checkTurnaround(e.params[1]))return;this._studyModified&&(this.clearData(),this._studyModified=!1);var t="chartSession:"+this._chartApi._sessionid,i=(new Date).getTime()-this._loadingStartTime;se.logDebug(t+", Study "+this._metaInfo.description+" loading took "+i+" ms"),delete this._loadingStartTime,this._loading=!1,this._setStatus(""),this._statusView.update();var n=this._model.paneForSource(this);this._model.recalculatePane(n),this._updateSources(),this._model.fullUpdate();break;case"study_deleted":break;case"data_update":if(e.params.customId!==this.sourceId()||!this._checkTurnaround(e.params.turnaround))return;s(!!e.params.nonseries,"data.params.nonseries is missing"),this._onDataUpdate(e.params.plots,e.params.nonseries)}},he.prototype._onDataUpdate=function(e,t){this._studyModified&&(this.clearData(),this._studyModified=!1);var i=l(t.d);return this._ongoingDataUpdate=this._ongoingDataUpdate.then((function(){return i}),(function(){return i})).then(this._onDataUnpacked.bind(this,e,t.indexes)),this._ongoingDataUpdate},he.prototype._onDataUnpacked=function(e,t,i){this._isDestroyed||("nochange"!==t&&this._processPlotOffsets(i),this.transformData(e),this._mergeData(e),null!==i&&(i.indexes_replace?(s("nochange"!==t),this._graphics.replaceIndexesTo(t)):("nochange"!==t&&this._graphics.replaceIndexesTo(t),void 0!==i.graphicsCmds&&this._graphics.processCommands(i.graphicsCmds,this._metaInfo.graphics))),this._onDataUpdated(e,i,t))},he.prototype._onDataUpdated=function(e,t,i){if(this.hasBarColorer()&&e.length>0){var n=this.barColorer().firstColoredBar(e[0].index);this._model.mainSeries().invalidateBarStylesCache(n)}null!==t&&this._postProcessGraphics();var r=this._model.paneForSource(this);this._model.recalculatePane(r),this._updateSources()},he.prototype.transformData=function(e){},he.prototype.moveData=function(e){this._ongoingDataUpdate=this._ongoingDataUpdate.then(function(){this._invalidateLastNonEmptyPlotRowCache(),this.m_data.move(e)}.bind(this))},he.prototype.replaceData=function(e,t,i){this._invalidateLastNonEmptyPlotRowCache(),this.m_data.remove(e+1),this.m_data.addTail(i,t)},he.prototype._updateSources=function(){this._model.updateSource(this),this.hasBarColorer()&&this._model.updateSource(this._model.mainSeries())},he.processPlotOffsets=function(e,t){t&&t.indexes_replace||(e._plotOffsets=t&&t.offsets||{})},he.prototype._processPlotOffsets=function(e){he.processPlotOffsets(this,e)},he.prototype._mergeData=function(e){this._invalidateLastNonEmptyPlotRowCache(),this.m_data.merge(e)},he.prototype._postProcessGraphics=function(){this._graphicsPriceAxisViews=R(this),this._concatPriceAxisViews()},he.prototype._getNonPriceParent=function(){if(this._nonPriceParent)return this._nonPriceParent;for(var e=this.source();e instanceof he;){var t=e.metaInfo();if(!t.is_price_study||"Compare@tv-basicstudies"===t.id)return this._nonPriceParent=e,e;e=e.source()}},he.prototype.firstValue=function(e){if(!this._isChildStudy&&"Compare@tv-basicstudies"===this._metaInfo.id||!this._metaInfo.is_price_study){ +var t=this._model.timeScale().visibleBarsStrictRange();if(null===t)return null;var i=t.firstBar(),n=t.lastBar(),r=null,o=this,s=o._metaInfo.plots;return null===r&&this.data().range(i,n).each((function(t,i){for(var n=0;n=0){var m=this.properties().styles[h].histogramBase.value(),v=this.m_data.minMaxOnRangeCached(e,t,[_]);isNumber(m)&&null!==v&&(l=q(l,{min:m,max:m}),l=q(l,v))}else a.push(_)}}}var y=this.m_data.minMaxOnRangeCached(e,t,a);if(y=q(l,y),i){a=[{name:"low",offset:0},{name:"high",offset:0}];var g=this.series().data().bars().minMaxOnRangeCached(e,t,a);y=q(y,g)}if(null!==y&&(o=new r(y.min,y.max)),s.bands)for(c=0;c=0&&(e="_v"+this._metaInfo.pine.version),{symbol:this.series().actualSymbol(),resolution:this.series().interval(),study:this._metaInfo.shortId+e}},he.prototype._sendTelemetryReport=function(e,t,i){void 0===i&&(i=this._getTelemetryAdditionalData());var n=Object.assign(t,{additional:i});telemetry.sendChartReport(e,n)},he.prototype._sendTelemetryCounter=function(e,t){this._sendTelemetryReport(e,{count:1},t)},he.prototype._sendTelemetryTiming=function(e,t,i){this._sendTelemetryReport(e,{value:t},i)},he.prototype.destroy=function(){this._isDestroyed=!0,this._legendView&&this._legendView.destroy(),null!==this._definitionsViewModel&&(this._definitionsViewModel.destroy(),this._definitionsViewModel=null),this.parentSource().formatterChanged().unsubscribe(this,this._onSourceFormatterChanged),this.parentSource().priceStepChanged().unsubscribe(this,this._onSourcePriceStepChanged),this._properties.listeners().unsubscribe(this,this.changeStyles),this._properties.visible.listeners().unsubscribe(this,this.visibleChanged),this._properties.visible.listeners().unsubscribe(this,this.processHibernate);for(var e=0;e= 1");var l=TradingView.clone(defaults("study"));ue(l,t);var c=Z.getStudyPropertyRootName(t),u=TradingView.clone(defaults(c,o));t.isTVScript&&t.TVScriptSourceCode!==u.TVScriptSourceCode&&(u=TradingView.clone(TradingView.factoryDefaults(c,o)));TradingView.merge(l,u),n&&(s(!(n instanceof e),"propsState should not be an instance of Property"),TradingView.merge(l,n));var h=TradingView.clone(t),d={};a.mergeInputsObjPart(d,h.defaults.inputs),a.mergeInputsObjPart(d,l.inputs),l.inputs=d,delete h.inputs,delete h.defaults.inputs;var p={};if(TradingView.merge(p,h.defaults),TradingView.merge(p,TradingView.factoryDefaults(c)),TradingView.merge(p,l),TradingView.merge(p,h),delete p.defaults,l=p,null!==r){var _=r.model().studiesColorRotatorFactory().getColorRotator(t);"Overlay@tv-basicstudies"===t.id?l.lineStyle.color=_.getColor(l.lineStyle.color,t):TradingView.merge(l,function(e,t){for(var i in e.styles){var n=e.styles[i].color;n&&(e.styles[i].color=t.getColor(n))}return e}(l,_))}n&&TradingView.merge(l.styles,n.styles);return l}(t,n,r,o),u=Z.getSourceInputIds(t);if(u.length>0){var h=u[0];l instanceof he?c.inputs[h]="{pid}$0":void 0!==c.inputs[h]&&-1!==c.inputs[h].indexOf("$")&&(c.inputs[h]="close")}return ce(t,a,c)}(t,n,r,o,Z.getStudyPropertyRootName(t),a)},t.prepareStudyPropertiesForLoadChart=function(e,t,n,r,o,s){return function(e,t,n,r,o,s,a){var l=function(e,t,n,r,o){var s=i("K4L1");e.version&&n.version&&e.version!==n.version&&se.logWarn("Serialized metaInfo version "+e.version+" is not equal to the saved state version "+n.version);var a=TradingView.clone(defaults("study"));TradingView.merge(a,TradingView.factoryDefaults(Z.getStudyPropertyRootName(e))),ue(a,e),TradingView.merge(a,n),a=o.updateStudyState(a,e,t);var l=TradingView.clone(t||e);if(l&&Z.versionOf(l)>=1){var c={};s.mergeInputsObjPart(c,(l.defaults||{}).inputs),s.mergeInputsObjPart(c,a.inputs),a.inputs=c,delete l.inputs,l.defaults&&delete l.defaults.inputs;var u={};TradingView.merge(u,l.defaults), +TradingView.merge(u,TradingView.factoryDefaults(Z.getStudyPropertyRootName(l))),TradingView.merge(u,a),delete l.defaults,TradingView.merge(u,l),a=u}return a}(e,t,n,0,o);return ce(t||e,s,l)}(e,t,n,0,o,Z.getStudyPropertyRootName(e))}}).call(this,i("tc+8"),i("aIyQ"),i("Qb4w").PriceRange)},GVQo:function(e,t,i){"use strict";i.r(t),i.d(t,"clipboardDataForSources",(function(){return l})),i.d(t,"get",(function(){return c})),i.d(t,"set",(function(){return u}));var n=i("mrSG"),r=i("Eyy1"),o=i("VVxS"),s=i("3ClC"),a=i("CW80");function l(e,t){if(1===t.length&&Object(s.isStudy)(t[0])){var i=t[0];return{title:i.title(),sources:[{source:Object(r.ensureNotNull)(i.state()),type:"study"}]}}var o={sources:[],title:""};return o.sources=t.filter((function(e){return e.copiable()&&Object(a.isLineTool)(e)})).filter(a.isLineTool).map((function(t){var i={type:"drawing",geometry:t.geometry(),source:Object(n.__assign)(Object(n.__assign)({},t.state(!1)),{points:t.normalizedPoints()}),modelId:e};return delete i.source.alertId,i})),0===o.sources.length?null:(o.sources.length&&(1===o.sources.length?o.title=t[0].title&&t[0].title():o.title="Drawings"),o)}function c(){try{return JSON.parse(o.TVLocalStorage.getItem("application-clipboard"))}catch(e){return null}}function u(e){try{o.TVLocalStorage.setItem("application-clipboard",JSON.stringify(e))}catch(t){}}},GhVi:function(e,t,i){"use strict";(function(t){function i(){this._marksByIndex={},this._marksBySpan=[],this.changed=new t}i.prototype.reset=function(){this._marksByIndex={},this._marksBySpan=[],delete this.minIndex,delete this.maxIndex,delete this._cache,this.changed.fire()},i.prototype.minIndex=void 0,i.prototype.maxIndex=void 0,i.prototype.merge=function(e){for(var t=this._marksBySpan,i={},n=0;n=o||(this.maxIndex=o),t[s]||(t[s]=[]),t[s].push(r),i[s]=!0}for(s=t.length;s--;)t[s]&&(t[s].length||delete t[s],i[s]&&t[s].sort(this._sortByIndexAsc));delete this._cache,this.changed.fire()},i.prototype._removeTickmark=function(e){var t=e.index;if(this._marksByIndex[t]===e){delete this._marksByIndex[t],t<=this.minIndex&&this.minIndex++,t>=this.maxIndex&&this.maxIndex--,this.maxIndex2;){if(1e3*this._marksByIndex[t].time===e)return t;if(1e3*this._marksByIndex[i].time===e)return i;var n=Math.round((t+i)/2);1e3*this._marksByIndex[n].time>e?i=n:t=n}return t},i.prototype.build=function(e,t){var i=Math.ceil(t/e);if(this._maxbar===i&&this._cache)return this._cache;this._maxbar=i;for(var n=[],r=this._marksBySpan.length;r--;)if(this._marksBySpan[r]){var o=n;n=[];for(var s=o.length,a=0,l=this._marksBySpan[r],c=l.length,u=1/0,h=-1/0,d=0;d=i&&_-h>=i&&(n.push(p),h=_)}for(;a0&&t.forEach((function(e){e>i&&(i=e)})),i},e.prototype.merge=function(e){var t=this;this._invalidationLevel=Math.max(this._invalidationLevel,e._invalidationLevel),this._paneInvalidationLevel=Math.max(this._paneInvalidationLevel,e._paneInvalidationLevel),e._leftPriceScalesInvalidationMap.forEach((function(e,i){var n=t._leftPriceScalesInvalidationMap.get(i)||a;t._leftPriceScalesInvalidationMap.set(i,Math.max(n,e))})),e._rightPriceScalesInvalidationMap.forEach((function(e,i){var n=t._rightPriceScalesInvalidationMap.get(i)||a;t._rightPriceScalesInvalidationMap.set(i,Math.max(n,e))}))},e}();i.d(t,"InvalidationLevel",(function(){return n})),i.d(t,"defaultInvalidationLevel",(function(){return a})),i.d(t,"InvalidationMask",(function(){return l})),function(e){e[e.None=0]="None",e[e.Cursor=1]="Cursor",e[e.Light=2]="Light",e[e.Full=3]="Full"}(n||(n={}));var a=n.None,l=function(){function e(e){void 0===e&&(e=a),this._panesOrderChanged=!1,this._timeAxisInvalidationLevel=a,this._invalidatedPanes=new Map,this._invalidationLevel=e}return e.prototype.invalidateAll=function(e){var t=this;this._invalidationLevel!==e&&(this._invalidationLevel=Math.max(this._invalidationLevel,e),this._invalidatedPanes.forEach((function(e){e.invalidateAll(t._invalidationLevel)})))},e.prototype.invalidateAllPane=function(e,t){this._invalidatedPanes.has(e)||this._invalidatedPanes.set(e,new s(this._invalidationLevel)),Object(o.ensureDefined)(this._invalidatedPanes.get(e)).invalidateAll(t)},e.prototype.invalidatePriceScale=function(e,t,i,n){this._invalidatedPanes.has(e)||this._invalidatedPanes.set(e,new s(this._invalidationLevel)),Object(o.ensureDefined)(this._invalidatedPanes.get(e)).invalidatePriceScale(t,i,n)},e.prototype.invalidateTimeScale=function(e){this._timeAxisInvalidationLevel=Math.max(this._timeAxisInvalidationLevel,e)},e.prototype.invalidatePanesOrder=function(){this._panesOrderChanged=!0},e.prototype.fullInvalidation=function(){return this._invalidationLevel},e.prototype.maxPaneInvalidation=function(){var e=[];return this._invalidatedPanes.forEach((function(t){e.push(t.fullInvalidation())})),Math.max.apply(Math,Object(r.__spreadArrays)(e,[this._invalidationLevel]))},e.prototype.invalidateForPane=function(e){return this._invalidatedPanes.get(e)||new s(this._invalidationLevel)},e.prototype.invalidateForTimeScale=function(){return Math.max(this._timeAxisInvalidationLevel,this._invalidationLevel)},e.prototype.merge=function(e){var t=this;this._invalidationLevel=Math.max(this._invalidationLevel,e._invalidationLevel),this._panesOrderChanged=this._panesOrderChanged||e._panesOrderChanged,this._invalidatedPanes.forEach((function(e){e.invalidateAll(t._invalidationLevel)})),e._invalidatedPanes.forEach((function(e,i){t._invalidatedPanes.has(i)||t._invalidatedPanes.set(i,new s(t._invalidationLevel)),Object(o.ensureDefined)(t._invalidatedPanes.get(i)).merge(e)})), +this._timeAxisInvalidationLevel=Math.max(this._timeAxisInvalidationLevel,e._timeAxisInvalidationLevel)},e.prototype.panesOrderInvalidated=function(){return this._panesOrderChanged},e.cursor=function(){return new e(n.Cursor)},e.light=function(){return new e(n.Light)},e.full=function(){return new e(n.Full)},e.panesOrder=function(){var t=e.full();return t.invalidatePanesOrder(),t},e}()},HGP3:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),i("mrSG").__exportStar(i("YTCC"),t)},HGup:function(e,t,i){"use strict";i.d(t,"a",(function(){return s})),i.d(t,"c",(function(){return a})),i.d(t,"b",(function(){return l}));var n=i("mrSG"),r=i("Eyy1"),o=function(e){function t(t,i,n){return e.call(this,t,i,n)||this}return Object(n.__extends)(t,e),t.prototype.redo=function(){var e=this,t=Object(r.ensureNotNull)(this._chartModel.dataSourceForId(this._sourceId)),i=this._chartModel.children(t,!0);i.forEach((function(t){return e._chartModel.detachSource(t)})),this._chartModel.detachSource(t);var n=this._chartModel.createPane(this.targetPaneIndex()),o=n.findSuitableScale(t);n.addDataSource(t,o,!1),i.forEach((function(e){return n.addDataSource(e,o,!1)})),this._chartModel.fullUpdate(),this._chartModel.setShouldBeSavedEvenIfHidden(!0)},t.prototype.undo=function(){var e=this,t=Object(r.ensureNotNull)(this._chartModel.dataSourceForId(this._sourceId)),i=this._chartModel.children(t,!0);i.forEach((function(t){return e._chartModel.detachSource(t)}));var n=this._chartModel.detachSource(t);Object(r.assert)(n,"Undo of detaching must remove pane");var o=this._chartModel.panes()[this._initialPaneIndex],s=o.getPriceScaleById(this._initialPriceScaleId);null===s&&(s=o.createPriceScaleAtPosition(this._initialPriceScalePosition,this._initialPriceScaleIndex)),o.addDataSource(t,s,!0),i.forEach((function(e){return o.addDataSource(e,s,!1)})),this._chartModel.fullUpdate()},t}(i("3u3j").a),s=function(e){function t(t,i,n){return e.call(this,t,i,n)||this}return Object(n.__extends)(t,e),t.prototype.targetPaneIndex=function(){return this._initialPaneIndex+1},t}(o),a=function(e){function t(t,i,n){return e.call(this,t,i,n)||this}return Object(n.__extends)(t,e),t.prototype.targetPaneIndex=function(){return this._initialPaneIndex},t}(o),l=function(e){function t(t,i,n){return e.call(this,t,i,n)||this}return Object(n.__extends)(t,e),t.prototype.targetPaneIndex=function(){return this._chartModel.panes().length},t}(o)},HLXm:function(e,t,i){"use strict";function n(e){"LineToolGannComplex"!==e.type||void 0!==e.version&&1!==e.version||(e.type="LineToolGannFixed")}i.r(t),i.d(t,"migrateState",(function(){return n}))},"HV/F":function(e,t,i){"use strict";function n(e){var t={};return{promise:new Promise((function(i,n){e.subscribe(t,i,!0)})),destroy:function(){e.unsubscribeAll(t)}}}i.r(t),i.d(t,"delegateToPromise",(function(){return n}))},HZKX:function(e,t,i){"use strict";i.r(t),i.d(t,"createActionAddAlert",(function(){return we})),i.d(t,"createActionTrade",(function(){return Pe})),i.d(t,"createActionOrder",(function(){return Ce})), +i.d(t,"createMTPredictorActions",(function(){return xe})),i.d(t,"createLinesAction",(function(){return Te})),i.d(t,"ActionsProvider",(function(){return Me}));var n=i("mrSG"),r=i("Eyy1"),o=i("txPx"),s=i("ogJP"),a=i("Kxc7"),l=i("7KDR"),c=i("YmeR"),u=i("Daqx"),h=i("3ClC"),d=i("QloM"),p=i("Qq0B"),_=i("z61+"),f=i("/3z9"),m=i("L/Ed"),v=i("cKqi"),y=i("0gbU"),g=i("pvsv"),b=i("GVQo"),S=i("CW80"),w=i("/tGj"),P=Object(o.getLogger)("Chart.ActionsProvider"),C=(window.t("Add Alert"),window.t("Add Alert on {series}"),window.t("Add Alert on {drawing}"),window.t("Edit {0} Alert...")),x=window.t("Extend Alert Lines"),T=window.t("Show alert label lines"),I=window.t("Hide alert label lines"),M=(window.t("Trade"),window.t("Create Limit Order..."),window.t("Show")),L=window.t("Hide"),O=(window.t("MTPredictor"),window.t("Apply Manual Risk/Reward"),window.t("Apply Manual Decision Point"),window.t("Analyze Trade Setup"),window.t("Apply Elliott Wave"),window.t("Apply Elliott Wave Intermediate"),window.t("Apply Elliott Wave Major"),window.t("Apply Elliott Wave Minor"),window.t("Apply WPT Up Wave"),window.t("Up Wave 1 or A"),window.t("Up Wave 2 or B"),window.t("Up Wave C"),window.t("Up Wave 3"),window.t("Up Wave 4"),window.t("Up Wave 5"),window.t("Apply WPT Down Wave"),window.t("Down Wave 1 or A"),window.t("Down Wave 2 or B"),window.t("Down Wave C"),window.t("Down Wave 3"),window.t("Down Wave 4"),window.t("Down Wave 5"),window.t("Pinned To Scale {label} (Hidden)")),k=window.t("Pinned To Right Scale (Hidden)"),A=window.t("Pin To Scale {label} (Hidden)"),E=window.t("Pin To Right Scale (Hidden)"),V=window.t("Pinned To Scale {label}"),D=window.t("Pinned To Right Scale"),B=window.t("Pin To Scale {label}"),R=window.t("Pin To Right Scale"),N=window.t("Pinned To Left Scale (Hidden)"),F=window.t("Pin To Left Scale (Hidden)"),j=window.t("Pinned To Left Scale"),W=window.t("Pin To Left Scale"),H=window.t("Pin To New Left Scale"),z=window.t("Pin To New Right Scale"),U=window.t("Pin To Scale (Now {label})"),G=window.t("Pin To Scale (Now No Scale)"),Y=window.t("Pin To Scale (Now Left)"),q=window.t("Pin To Scale (Now Right)"),K=window.t("No Scale (Fullscreen)"),Z=window.t("Move To"),J=window.t("Existing Pane Above"),X=window.t("New Pane Above"),Q=window.t("Existing Pane Below"),$=window.t("New Pane Below"),ee=window.t("Bring to Front"),te=window.t("Send to Back"),ie=window.t("Bring Forward"),ne=window.t("Send Backward"),re=window.t("Visual Order"),oe=window.t("Lines"),se=window.t("Add Indicator/Strategy on {studyTitle}..."),ae=(window.t("Add Financial metric for {instrumentName}..."),window.t("Settings...")),le=window.t("Apply Default"),ce=window.t("Save As..."),ue=window.t("Copy"),he=window.t("Clone"),de=window.t("Template"),pe=(window.t("Sync To All Charts"),window.t("Unlock")),_e=window.t("Lock"),fe=(window.t("Show Earnings"),window.t("Show Dividends"),window.t("Show Splits"), +window.t("Show All Ideas")),me=window.t("Show Ideas of Followed Users"),ve=window.t("Show My Ideas Only"),ye=window.t("Settings..."),ge=window.t("Hide Events on Chart"),be=window.t("Add this Symbol to Entire Layout"),Se=window.t("Add this Indicator to Entire Layout");window.t("Add this Strategy to Entire Layout"),window.t("Add this Financial Metric to Entire Layout");function we(e,t){return null}function Pe(e,t,i){return null}function Ce(e){throw new Error("not supported")}function xe(e,t,i,n){return null}function Te(e){var t=[e.actions().showPriceLine];return new l.Action({label:oe,statName:"Lines",subItems:t})}function Ie(e,t){return void 0===e||e[t]}var Me=function(){function e(e,t){this._chartWidget=e,this._options=t}return e.prototype.contextMenuActionsForSources=function(e){return Object(n.__awaiter)(this,void 0,void 0,(function(){var t,i,r;return Object(n.__generator)(this,(function(n){return t=e[0],i=this._options,t===this._chartWidget.model().mainSeries()&&Ie(i,"mainSeries")?[2,this._contextMenuActionsForSeries(t)]:Object(h.isStudy)(t)&&Ie(i,"studies")?[2,this._contextMenuActionsForStudy(t)]:Object(S.isLineTool)(t)&&Ie(i,"lineTools")?(r=e.filter(S.isLineTool),[2,this._contextMenuActionsForLineTool(r)]):[2,[]]}))}))},e.prototype._isReadOnly=function(){return this._chartWidget.readOnly()},e.prototype._createActionHide=function(e){return new l.Action({label:L,icon:i("DYI2"),statName:"HideSelectedObject",onExecute:this._chartWidget.hideDataSources.bind(this._chartWidget,[e])})},e.prototype._createActionShow=function(e){var t=new l.Action({checkable:!0,label:M,icon:i("6ctS"),statName:"ToggleShow"}),n=new c.ActionBinder(t,e.properties().visible,this._chartWidget.model(),M);return t.setBinding(n),n.setValue(e.properties().visible.value()),t},e.prototype._createActionScale=function(e){var t=Object(r.ensureNotNull)(e.priceScale()),n=this._chartWidget.model().model(),o=Object(r.ensureNotNull)(n.paneForSource(e)),s=o.priceScalePosition(t),a=("left"===s?o.leftPriceScales():o.rightPriceScales()).indexOf(t),c=n.priceScaleSlotsCount().totallySlots<2?"dontneedname":"needname",h="overlay"===s?"":Object(u.a)(s,a).label,d=U.format({label:h}),p={"left-needname":d,"left-dontneedname":Y,"right-needname":d,"right-dontneedname":q,"overlay-needname":G,"overlay-dontneedname":G}[s+"-"+c];return new l.Action({label:p,icon:i("/kal"),subItems:this._createActionScaleItems(e)})},e.prototype._createActionScaleDetach=function(e,t,i,n){var o=this._chartWidget.model().model(),s=Object(r.ensureNotNull)(o.paneForSource(e));if(!s.canCreateNewPriceScale())return null;var a=Object(r.ensureNotNull)(e.priceScale()),c=a.canDetachSource(e),h=s.priceScalePosition(a),d=c||h!==t;if(!d)return null;var p=o.priceScaleSlotsCount(),_={left:{labelled:B,sided:H},right:{labelled:B,sided:z}},f="left"===t?s.leftPriceScales().length:s.rightPriceScales().length,m=p[t]>f?"labelled":"sided",v=Object(u.a)(t,f).label,y=_[t][m].format({label:v});return new l.Action({checkable:!1,disabled:!d,label:y,statName:n,payload:e,onExecute:i})},e.prototype._onDetachLeft=function(e){ +var t=e.getPayload(),i=this._chartWidget.model().model(),n=Object(r.ensureNotNull)(i.paneForSource(t));this._chartWidget.model().detachToLeft(t,n)},e.prototype._onDetachRight=function(e){var t=e.getPayload(),i=this._chartWidget.model().model(),n=Object(r.ensureNotNull)(i.paneForSource(t));this._chartWidget.model().detachToRight(t,n)},e.prototype._createActionScaleDetachLeft=function(e){return this._createActionScaleDetach(e,"left",this._onDetachLeft.bind(this),"ToggleScaleLeft")},e.prototype._createActionScaleDetachRight=function(e){return this._createActionScaleDetach(e,"right",this._onDetachRight.bind(this),"ToggleScaleRight")},e.prototype._onMoveToScale=function(e){var t=e.getPayload();if(t.datasource.priceScale()!==t.priceScale){var i=this._chartWidget.model().model(),n=Object(r.ensureNotNull)(i.paneForSource(t.datasource));this._chartWidget.model().moveToScale(t.datasource,n,t.priceScale,t.undoText)}},e.prototype._createMoveToScaleAction=function(e,t,i,n){var r=e.priceScale()===t;return new l.Action({checkable:!0,checked:r,label:i,statName:"ToggleScale",payload:{datasource:e,priceScale:t,undoText:n},onExecute:this._onMoveToScale.bind(this)})},e.prototype._onNoScale=function(e){var t=e.getPayload().datasource,i=this._chartWidget.model().model(),n=Object(r.ensureNotNull)(i.paneForSource(t));n.isOverlay(t)||this._chartWidget.model().detachNoScale(t,n)},e.prototype._createActionNoScale=function(e){var t=this._chartWidget.model().model(),i=Object(r.ensureNotNull)(t.paneForSource(e)),n=i.actionNoScaleIsEnabled(e);return new l.Action({checkable:!0,checked:i.isOverlay(e),label:K,disabled:!n,statName:"ToggleNoScale",payload:{datasource:e},onExecute:this._onNoScale.bind(this)})},e.prototype._createActionScaleItems=function(e){var t=this,i=[],n=this._chartWidget.model().model(),o=Object(r.ensureNotNull)(n.paneForSource(e)),s=n.priceScaleSlotsCount().totallySlots>1,a=o.rightPriceScales(),c=o.leftPriceScales(),h=this._createActionScaleDetachRight(e),d=this._createActionScaleDetachLeft(e),p=a.length+c.length+(null===h?0:1)+(null===d?0:1)>2,_={right:{hidden:{checked:{labelled:O,sided:k},unchecked:{labelled:A,sided:E}},visible:{checked:{labelled:V,sided:D},unchecked:{labelled:B,sided:R}}},left:{hidden:{checked:{labelled:O,sided:N},unchecked:{labelled:A,sided:F}},visible:{checked:{labelled:V,sided:j},unchecked:{labelled:B,sided:W}}}},f={left:o.visibleLeftPriceScales(),right:o.visibleRightPriceScales()},m=function(t,i){var n=("right"===i?a:c)[t],r=f[i].includes(n)?"visible":"hidden",o=e.priceScale()===n?"checked":"unchecked",l=s?"labelled":"sided",h=_[i],d={labelled:h.visible.unchecked.labelled,sided:h.visible.unchecked.sided},p=Object(u.a)(i,t).label;return{actionText:h[r][o][l].format({label:p}),undoText:d[l].format({label:p})}};return i.push.apply(i,a.map((function(i,n){var r=m(n,"right");return t._createMoveToScaleAction(e,i,r.actionText,r.undoText)}))),null!==h&&i.push(h),p&&(a.length>0||null!==h)&&i.push(new l.Separator),i.push.apply(i,c.map((function(i,n){var r=m(n,"left") +;return t._createMoveToScaleAction(e,i,r.actionText,r.undoText)}))),null!==d&&i.push(d),p&&(c.length>0||null!==d)&&i.push(new l.Separator),i.push(this._createActionNoScale(e)),i},e.prototype._createVisualOrderAction=function(e){var t=this._chartWidget.model(),n=t.availableZOrderOperations(e),r=[new l.Action({label:ee,statName:"BringToFront",disabled:!n.bringToFrontEnabled,onExecute:function(){return t.bringToFront(e)}}),new l.Action({label:te,statName:"SendToBack",disabled:!n.sendToBackEnabled,onExecute:function(){return t.sendToBack(e)}}),new l.Action({label:ie,statName:"BringForward",disabled:!n.bringForwardEnabled,onExecute:function(){return t.bringForward(e)}}),new l.Action({label:ne,statName:"SendBackward",disabled:!n.sendBackwardEnabled,onExecute:function(){return t.sendBackward(e)}})];return new l.Action({label:re,icon:i("9dnG"),statName:"VisualOrder",subItems:r})},e.prototype._createActionMergeUp=function(e){var t=this._chartWidget.model();return t.model().isMergeUpAvailableForSource(e)?new l.Action({label:J,statName:"MergeUp",onExecute:function(){return t.mergeSourceUp(e)}}):null},e.prototype._createActionUnmergeUp=function(e){var t=this._chartWidget.model();return t.model().isUnmergeAvailableForSource(e)?new l.Action({label:X,statName:"UnmergeUp",onExecute:function(){return t.unmergeSourceUp(e)}}):null},e.prototype._createActionMergeDown=function(e){var t=this._chartWidget.model();return t.model().isMergeDownAvailableForSource(e)?new l.Action({label:Q,statName:"MergeDown",onExecute:function(){return t.mergeSourceDown(e)}}):null},e.prototype._createActionUnmergeDown=function(e){var t=this._chartWidget.model();return t.model().isUnmergeAvailableForSource(e)?new l.Action({label:$,statName:"UnmergeDown",onExecute:function(){return t.unmergeSourceDown(e)}}):null},e.prototype._mergeContentMenuItems=function(e){return[this._createActionMergeUp(e),this._createActionUnmergeUp(e),this._createActionMergeDown(e),this._createActionUnmergeDown(e)].filter(s.notNull)},e.prototype._createActionMove=function(e){var t=this._mergeContentMenuItems(e);return t.length>0?new l.Action({label:Z,icon:i("BBCR"),subItems:t}):null},e.prototype._contextMenuActionsForSeries=function(e){var t=[],i=e.properties().visible.value(),n=this._chartWidget.model().model(),o=(Object(r.ensureNotNull)(n.paneForSource(e)),this._chartWidget.actions());if(this._isReadOnly())t.push(i?this._createActionHide(e):this._createActionShow(e)),t.push(new l.Separator),t.push(this._createActionScale(e));else{0,t.length>0&&!(t[t.length-1]instanceof l.Separator)&&t.push(new l.Separator),a.enabled("symbol_info")&&t.push(o.showSymbolInfoDialog),t.length>0&&!(t[t.length-1]instanceof l.Separator)&&t.push(new l.Separator),t.push(this._createVisualOrderAction([e]));var s=this._createActionMove(e);null!==s&&t.push(s),t.push(this._createActionScale(e)),t.push(i?this._createActionHide(e):this._createActionShow(e)),t.push(new l.Separator),t.push(Te(this._chartWidget)),t.push(new l.Separator), +window.widgetbar&&(!window.widgetbar._customization||window.widgetbar._customization.watchlist)&&o.addToWatchlist&&t.push(o.addToWatchlist),a.enabled("text_notes")&&t.push(o.addToTextNotes),t[t.length-1]instanceof l.Separator||t.push(new l.Separator),t[t.length-1]instanceof l.Separator&&t.pop()}return t},e.prototype._createActionAddChildStudy=function(e){var t=this,n=this._chartWidget.model().model();return new l.Action({label:se.format({studyTitle:e.title(!0)}),icon:i("CwKc"),statName:"ApplyIndicator",onExecute:function(){var i=t._chartWidget.showIndicators(Object(h.isStudy)(e)?e:void 0);if(i&&Object(h.isStudy)(e)){var r=function(){trackEvent("SOS","Apply SOS","Apply by RC menu")},o=n.studyInserted();o.subscribe(t,r),i.visibilityChanged.subscribe(t,(function(e){e||o.unsubscribe(t,r)}),!0)}}})},e.prototype._createActionAddFundamentals=function(e){return null},e.prototype._createActionShowSymbolInfoDialog=function(e){return new l.Action({label:window.t("Symbol Info..."),icon:i("1pHB"),checkable:!1,statName:"SymbolInfo",onExecute:function(){var t=e.symbol(),i=e.symbolInfo();Object(g.showSymbolInfoDialog)(t,{symbolInfo:i})}})},e.prototype._createActionShowProperties=function(e){var t=this;return new l.Action({label:ae,icon:i("MXV9"),statName:"EditSelectedObject",onExecute:function(){return t._chartWidget.showSourceProperties(e)}})},e.prototype._contextMenuActionsForStudy=function(e){var t=this,i=this._chartWidget.actions(),n=e.properties().visible.value(),r=[];if(!e.userEditEnabled())return r;if(this._chartWidget.readOnly())r.push(n?this._createActionHide(e):this._createActionShow(e)),r.push(new l.Separator),e.constructor instanceof p.NonSeriesStudy||r.push(this._createActionScale(e));else{a.enabled("study_on_study")&&e.canHaveChildren()&&r.push(this._createActionAddChildStudy(e));var o=this._createApplyToEntireLayoutCommand(e);if(null!==o&&r.push(o),r.length>0&&!(r[r.length-1]instanceof l.Separator)&&r.push(new l.Separator),a.enabled("symbol_info")&&(e instanceof y.study_Compare||e instanceof v.study_Overlay)&&null!==e.symbolInfo()&&(r.push(this._createActionShowSymbolInfoDialog(e)),r.push(new l.Separator)),r.push(this._createVisualOrderAction([e])),!(e.constructor instanceof p.NonSeriesStudy)){var s=this._createActionMove(e);null!==s&&r.push(s),r.push(this._createActionScale(e))}r.push(new l.Separator);var c=e.metaInfo();if(r[r.length-1]instanceof l.Separator||r.push(new l.Separator),e.copiable()){var u=new l.Action({label:ue,shortcutHint:Object(f.humanReadableHash)(f.Modifiers.Mod+67),statName:"Copy",onExecute:function(){t._chartWidget.onAppClipboardCopy([e])}});r.push(u)}r.push(n?this._createActionHide(e):this._createActionShow(e)),r.push(i.studyRemove),r.push(new l.Separator),a.enabled("property_pages")&&new _.a(c).hasUserEditableOptions()&&r.push(this._createActionShowProperties(e)),r[r.length-1]instanceof l.Separator&&r.pop()}return r},e.prototype._createEditAlertDrawingAction=function(e){return new l.Action({label:C.format(e.title()),icon:TbbiEditAlertSvg,statName:"EditAlert",onExecute:function(){ +window.runOrSignIn((function(){e.editAlert("pane_context_menu_edit_alert")}),{source:"Alert edit from pane context menu"})}})},e.prototype._createLineToolTemplateAction=function(e){var t=this;if(!window.lineToolPropertiesToolbar)return null;var i=window.lineToolPropertiesToolbar.templatesList();return void 0===i?null:new l.ActionAsync((function(){var n=[],r=new l.Action({label:ce,statName:"SaveAs",onExecute:function(){i.showSaveDialog((function(t){var n=JSON.stringify(e.template());i.saveTemplate(t,n)}))}});n.push(r);var o=new l.Action({label:le,statName:"ApplyDefault",onExecute:function(){t._chartWidget.model().restorePropertiesForSource(e),window.lineToolPropertiesToolbar.onSourceChanged(e)}});return n.push(o),new Promise((function(e){i.templatesLoaded().then((function(){var e=i.getData();e.length>0&&n.push(new l.Separator),e.forEach((function(e,t){var r=new l.Action({label:e,statName:"ApplyTemplate",onExecute:function(){return i.loadTemplate(e)},toolbox:{type:m.ToolboxType.Delete,action:function(){i.deleteAction(e)}},showToolboxOnHover:!0});n.push(r)}))}),(function(e){P.logWarn(e)})).then((function(){e({label:de,statName:"Template",subItems:n})}))}))}))},e.prototype._createActionToggleLockObject=function(e){var t=this,n=e.properties().frozen.value();return new l.Action({label:n?pe:_e,statName:"ToggleLockSelectedObject",checkable:!0,icon:i(n?"fs3R":"qckB"),onExecute:function(){return t._chartWidget.toggleLockSelectedObject()}})},e.prototype._contextMenuActionsForLineTool=function(e){return Object(n.__awaiter)(this,void 0,void 0,(function(){var t,r,o,s,c,u,h,d,p,_,m,v=this;return Object(n.__generator)(this,(function(n){switch(n.label){case 0:return t=[],r=this._chartWidget.actions(),this._chartWidget.model().model(),o=function(){t.push(v._createVisualOrderAction(e))},s=function(){var n=e.filter((function(e){return e.cloneable()}));if(n.length>0){var r=new l.Action({label:he,icon:i("K8V9"),shortcutHint:Object(f.humanReadableModifiers)(f.Modifiers.Mod)+"Drag",doNotBindShortcut:!0,statName:"Clone",onExecute:function(){return v._chartWidget.model().cloneLineTools(n,!1)}},"Clone");t.push(r)}return!!n.length},c=function(){var i=e.filter((function(e){return e.copiable()}));if(i.length>0){var n=new l.Action({label:ue,shortcutHint:Object(f.humanReadableHash)(f.Modifiers.Mod+67),statName:"Copy",onExecute:function(){return v._chartWidget.onAppClipboardCopy(i)}},"Copy");t.push(n)}return!!i.length},u=function(){return!1},function(e){},1!==e.length?[3,4]:(h=e[0],this._chartWidget.readOnly()?(t.push(r.lineHide),[3,3]):[3,1]);case 1:return h.userEditEnabled()?(a.enabled("alerts")&&!this._chartWidget.onWidget()&&h.hasAlert&&h.hasAlert.value()&&(t.push(this._createEditAlertDrawingAction(h)),t.push(new l.Separator)),a.enabled("charting_library_base")||null!==(d=this._createLineToolTemplateAction(h))&&t.push(d),o(),Ie(this._options,"objectTree")&&r.paneObjectTree&&t.push(r.paneObjectTree),t.push(new l.Separator),p=s(),p=c()||p,(p=u()||p)&&t.push(new l.Separator),t.push(this._createActionToggleLockObject(h)),t.push(r.lineHide), +t.push(r.lineRemove),t.push(new l.Separator),[4,this._chartWidget.propertiesDefinitionsForSource(h)]):[3,3];case 2:_=n.sent(),a.enabled("property_pages")&&(null!==_||Object(S.isMTPredictionTool)(h))&&t.push(r.format),h.additionalActions&&(t.push(new l.Separator),m=h.additionalActions(this._chartWidget.model()),t.push.apply(t,m)),n.label=3;case 3:return[3,5];case 4:Ie(this._options,"objectTree")&&r.paneObjectTree&&t.push(r.paneObjectTree),o(),t.push(new l.Separator),s(),c(),u(),t.push(new l.Separator),t.push(r.lineHide),t.push(r.lineRemove),n.label=5;case 5:return[2,t]}}))}))},e.prototype._createEarningsShow=function(){return null},e.prototype._createDividendsShow=function(){return null},e.prototype._createSplitsShow=function(){return null},e.prototype._contextMenuActionsForESD=function(){return[]},e.prototype._contextMenuActionsForPublishedTimeline=function(e){var t=this,i=this._chartWidget.actions(),n=[];if(n.push(i.lineHide),window.is_authenticated){var r=e.properties().filter,o=new l.Action({checked:r.value()===PublishedChartsFilter.None,checkable:!0,label:fe,statName:"ToggleAllIdeas",onExecute:function(){return t._chartWidget.model().setProperty(r,PublishedChartsFilter.None,fe)}}),s=new l.Action({checked:r.value()===PublishedChartsFilter.Following,checkable:!0,label:me,statName:"ToggleIdeasOfPeopleAndUser",onExecute:function(){return t._chartWidget.model().setProperty(r,PublishedChartsFilter.Following,me)}}),a=new l.Action({checked:r.value()===PublishedChartsFilter.Private,checkable:!0,label:ve,statName:"ToggleUserIdeas",onExecute:function(){return t._chartWidget.model().setProperty(r,PublishedChartsFilter.Private,ve)}});n.push(new l.Separator,o,s,a)}return n},e.prototype._contextMenuActionsForTradingDrawings=function(e){return e.contextMenuItems()},e.prototype._createAlertToggleHorzLineLabelAction=function(e){var t=this,i=getGlobalAlertSettingsProperty().childs().line.childs().visible,n=i.value()?I:T;return new l.Action({checkable:!0,label:x,checked:i.value(),statName:"ToggleExtendAlertLine",onExecute:function(){return t._chartWidget.model().setProperty(i,!i.value(),n)}})},e.prototype._contextMenuActionsForAlertLabel=function(e){var t=e.alert(),i=[];return t.get("active")?i.push(AlertActionCreator.stopAlert(t)):i.push(AlertActionCreator.restartAlert(t,"alert_label_context_menu_restart")),i.push(AlertActionCreator.editAlert(t,"alert_label_context_menu_edit")),i.push(AlertActionCreator.deleteAlert(t)),i.push(new l.Separator),i.push(this._createAlertToggleHorzLineLabelAction(e)),i},e.prototype._contextMenuActionsForChartEvents=function(e){var t=this,i=[];if(a.enabled("property_pages")){var n=new l.Action({label:ye,statName:"Format",onExecute:function(){return t._chartWidget.showGeneralChartProperties(d.TabNames.eventsAndAlerts)}});i.push(n)}var r=new l.Action({label:ge,statName:"HideEvents",onExecute:function(){return t._chartWidget.model().setProperty(e.properties().visible,!1,ge)}});return i.push(r),i},e.prototype._createApplyToEntireLayoutCommand=function(e){var t=this +;if(!this._chartWidget.chartWidgetCollection().applyIndicatorsToAllChartsAvailable())return null;var i=this._chartWidget.model().model();if(e.parentSource()!==i.mainSeries())return null;var n=Object(r.ensureNotNull)(i.paneForSource(e)),o=i.paneForSource(i.mainSeries())===n,s=e instanceof y.study_Compare&&e.priceScale()===i.mainSeries().priceScale()&&Object(r.ensureNotNull)(e.priceScale()).isPercentage(),a=o?void 0:i.panes().indexOf(n),c=Se,u="AddStudyToEntireLayout";return Object(w.isSymbolSource)(e)&&(c=be,u="AddSymbolToEntireLayout"),new l.Action({label:c,statName:u,onExecute:function(){var n=Object(r.ensureNotNull)(Object(b.clipboardDataForSources)(i.id(),[e])),l=t._chartWidget.chartWidgetCollection(),u={isOnMainPane:o,asCompare:s,paneIndex:a};l.applyIndicatorToAllCharts(t._chartWidget,n,u,c)}},"applyStudyToEntireLayout")},e}()},Hm6r:function(e,t,i){"use strict";i.r(t),i.d(t,"CrosshairTimeAxisView",(function(){return o}));var n=i("mrSG"),r=i("cgFQ"),o=function(e){function t(t,i,n){void 0===n&&(n=!1);var r=e.call(this,t)||this;return r._indexProvider=i,r._highlighted=n,r}return Object(n.__extends)(t,e),t.prototype._getBgColor=function(){return this._highlighted?this._model.isDark()?"#1E88E5":"#2196F3":"#4c525e"},t.prototype._getIndex=function(){return this._model.crossHairSource().visible?this._indexProvider():null},t}(r.a)},Hr11:function(e,t,i){"use strict";function n(e,t){return e<=t}function r(e,t){return e>=t}function o(e,t,i){return Math.min(Math.max(e,t),i)}function s(e){return e<0?-1:e>0?1:0}function a(e){if(e<0)return!1;for(var t=e;t>1;t/=10)if(t%10!=0)return!1;return!0}function l(e,t,i){return t-e<=i}function c(e,t,i){return Math.abs(e-t)t?1:0}function d(e,t){if(void 0===t&&(t=h),e.length<1)throw Error("array is empty");for(var i=e[0],n=0;n0&&(i=e[n]);return i}function _(e){var t=Math.ceil(e);return t%2!=0?t-1:t}i.r(t),i.d(t,"lessThan",(function(){return n})),i.d(t,"greaterThan",(function(){return r})),i.d(t,"clamp",(function(){return o})),i.d(t,"sign",(function(){return s})),i.d(t,"isBaseDecimal",(function(){return a})),i.d(t,"greaterOrEqual",(function(){return l})),i.d(t,"equal",(function(){return c})),i.d(t,"log10",(function(){return u})),i.d(t,"defComparator",(function(){return h})),i.d(t,"min",(function(){return d})),i.d(t,"max",(function(){return p})),i.d(t,"ceiledEven",(function(){return _}))},HySD:function(e,t,i){"use strict";i.r(t),i.d(t,"ResizerDetacherState",(function(){return s}));var n=i("Eyy1"),r=i("hY0g"),o=i.n(r),s=function(){function e(e){var t=this;this._alive=new o.a,this._container=new o.a,this._width=new o.a,this._height=new o.a,this._fullscreen=new o.a,this._detachable=new o.a,this._fullscreenable=new o.a,this._visible=new o.a,this._availWidth=new o.a,this._availHeight=new o.a,this._owner=new o.a,this._ownersStack=[], +this.owner=this._owner.readonly(),this._bridge={alive:this._alive.readonly(),container:this._container.readonly(),width:this._width.readonly(),height:this._height.readonly(),fullscreen:this._fullscreen.readonly(),detachable:this._detachable.readonly(),fullscreenable:this._fullscreenable.readonly(),visible:this._visible.readonly(),availWidth:this._availWidth.readonly(),availHeight:this._availHeight.readonly(),remove:function(){var e=t._owner.value();e&&e.remove&&e.remove()},negotiateWidth:function(e){var i=t._owner.value();i&&i.negotiateWidth&&i.negotiateWidth(e)},negotiateHeight:function(e){var i=t._owner.value();i&&i.negotiateHeight&&i.negotiateHeight(e)},requestFullscreen:function(){var e=t._owner.value();e&&e.requestFullscreen&&e.requestFullscreen()},exitFullscreen:function(){var e=t._owner.value();e&&e.exitFullscreen&&e.exitFullscreen()},detach:function(e){var i=t._owner.value();i&&i.detach&&i.detach(e)},attach:function(){var e=t._owner.value();e&&e.attach&&e.attach()}},e&&this.pushOwner(e)}return e.prototype.bridge=function(){return this._bridge},e.prototype.pushOwner=function(e){if(e.alive.value()){for(var t=0,i=this._ownersStack;t=t;i--)this._unsubscribeOwner(this._ownersStack[i],!0);this._ownersStack.length=t,t>0?this._subscribeOwner(this._ownersStack[t-1]):(this._alive.setValue(!1),this._owner.deleteValue())},e}()},I4UZ:function(e,t,i){"use strict";i.r(t),i.d(t,"HeaderToolbarBootloader",(function(){return s}));var n=i("mrSG"),r=i("yMne"),o=i("YuHv"),s=function(e){function t(t,i){var n=e.call(this)||this;return n._toolsBootloader=t,n._headerProps=i,n._headerProps.resizerBridge.negotiateHeight(r.HEADER_TOOLBAR_HEIGHT_EXPANDED),n._headerProps.resizerBridge.container.value().appendChild(Object(o.a)()),n}return Object(n.__extends)(t,e),t.prototype._startLoading=function(){var e=this +;return Promise.all([this._toolsBootloader.load(),this._loadHeaderToolbar()]).then((function(t){var i=t[0];return new(0,t[1])(e._headerProps.resizerBridge.container.value(),Object(n.__assign)(Object(n.__assign)({},e._headerProps),{tools:i}))}))},t.prototype._loadHeaderToolbar=function(){return Promise.all([i.e("react"),i.e(43),i.e(44),i.e(75),i.e(12),i.e(14),i.e(38),i.e("header-toolbar")]).then(i.bind(null,"KMbc")).then((function(e){return e.HeaderToolbarRenderer}))},t}(i("cZRT").a)},I9zs:function(e,t,i){"use strict";var n=i("Eyy1").assert,r=i("aO4+").Point,o=i("eJTA"),s=o.rgbToHsl,a=o.hslToRgb,l=o.rgbToHexString,c=o.parseRgb,u=o.parseRgba,h=i("VdBB").HitTestResult,d=i("vq8G").SelectionRenderer,p=i("29fS").PaneRendererBars,_=i("cO0S").PaneRendererHistogram,f=i("Ndyb").PaneRendererColumns,m=i("gyZD").PaneRendererLine,v=i("u0yd").PaneRendererArea,y=i("/hKg").PaneRendererCandles,g=i("dBsn").PaneRendererCross,b=i("OYox").PaneRendererCircles,S=i("6Fc/").PaneRendererArrowsUpDownItem,w=i("6Fc/").PaneRendererArrowsUpDown,P=i("gTEF").SelectionRendererArrowsUpDown,C=i("f3xO").PaneRendererUnicodeChar,x=i("gVWb").PaneRendererBackground,T=i("Zp8I").PaneRendererStepLine,I=i("Zy3/").CompositeRenderer,M=i("ga+R"),L=i("Hr11").clamp,O=i("Nu4p"),k=i("23IT"),A=k.LineStudyPlotStyle,E=k.PlotSymbolSize,V=i("972a").MarkLocation,D=i("G3Rl").memoize,B=i("Tmoa"),R=i("k9/m").PlotRowSearchMode,N=i("Kxc7"),F=i("Zp/P"),j=i("Kmdw"),W=i("akof"),H=i("+q2u"),z=i("fxzW"),U=i("P+Pi"),G=i("IOzl"),Y=i("6ptY"),q=i("PF2b"),K=i("V0al");function Z(e,t,i,n){this.m_study=e,this.m_series=t,this.m_model=i,this._plotName=n,this.m_items=[],this._invalidated=!0,this._isMarkersEnabled=N.enabled("source_selection_markers");var r=this.m_study.metaInfo().plots;this._colorer=null,this._palette=null,this._paletterProps=null,this._plotIndex=0;for(var o=0;o=0&&e0?(t-=n,i+=n):(t+=n,i-=n);var o=this.m_study.getMinFirstBarIndexForPlot(this._plotName);if(!(o>i)){t=Math.max(o,t) +;var s=this.m_study.properties().styles[this._plotName],a=s.plottype.value(),l=[A.Line,A.Area,A.Circles,A.Cross].indexOf(a)>=0,c=this.m_study.data(),u=this.m_study.firstValue();if(l&&c._length()>0){for(var d=c._bsearch(t);Z.isIndexValid(d,c)&&void 0===c._valueAt(d)[this._plotIndex+1];)d-=1;t=Z.isIndexValid(d,c)?c._indexAt(d):t;for(var p=c._bsearch(i);Z.isIndexValid(p,c)&&void 0===c._valueAt(p)[this._plotIndex+1];)p+=1;i=Z.isIndexValid(p,c)?c._indexAt(p):i}var _=c.range(t,i),f=this.m_study.priceScale(),m=L(this._getTranspValue(),0,100),v={},y=function(e,t){var i=e+"@"+t;return v[i]||(this._plotName&&"vol"===this._plotName?v[i]=B.generateColor(e,t):v[i]=B.generateColor(e,t,!0)),v[i]}.bind(this);if(_.each(function(e,t){e+=n,e=Math.floor(e);var i=null==(h=t[this._plotIndex+1]);if(l&&i)return!1;var o=new r(e,h=i?NaN:h);o.timePointIndex=e;var a=void 0!==t[this._colorer+1]||this._palette&&this._palette.addDefaultColor;if(this._colorer&&a){var c,u,h=t[this._colorer+1];if(o.style={},null!=h){c=this._palette.valToIndex?this._palette.valToIndex[h]:h;var d=(u=this._paletterProps.colors[c]).color.value();o.style.color=B.isHexColor(d)?y(d,m):d}else{d=s.color.value();o.style.color=y(d,100)}var p=void 0!==c?u.width.value():s.linewidth.value(),_=void 0!==c?u.style.value():s.linestyle.value();o.style.width=p,o.style.style=_}return this.m_items.push(o),!1}.bind(this)),f.pointsArrayToCoordinates(this.m_items,u),this.m_model.timeScale().indexesToCoordinates(this.m_items),s.histogramBase&&(this._histogramBase=this.m_study.priceScale().priceToCoordinate(s.histogramBase.value(),u)),this.m_model.selection().isSelected(this.m_study)){var g=M(t,i);this._selectionData={points:[],bgColors:[],visible:!0};var b=this.m_model.paneForSource(this.m_study).height();this._selectionData.hittestResult=h.REGULAR;for(var S=0;S0?(a-=c,l+=c):(a+=c,l-=c);var u=this._study.getMinFirstBarIndexForPlot(this._plotName);if(!(u>l))a=Math.max(u,a),this._study.data().range(a,l).each(function(e,t){e+=c;var n=t[this._plotIndex+1],a=new r(Math.floor(e)-.5),l=isNumber(s)?s:50;l=Math.min(l,100),l=Math.max(l,0);if(null!=n){var u=o.valToIndex?o.valToIndex[n]:n;a.color=B.generateColor(i[u].color.value(),l)}else a.color=null;return this._items.push(a),!1}.bind(this)),this._model.timeScale().indexesToCoordinates(this._items)}},J.prototype.renderer=function(){if(this._study.properties().styles[this._plotName].visible&&this._study.properties().styles[this._plotName].visible.value()&&this._scalesReady()){this._invalidated&&(this._updateImpl(),this._invalidated=!1);var e={items:this._items,y:0,h:this._study.priceScale().height(),w:this._model.timeScale().barSpacing()},t=new I;return t.append(new x(e)),t}},X.prototype.items=function(){ +return this.m_items},X.prototype.update=function(){this.m_invalidated=!0},X.prototype._scalesReady=function(){var e=this.m_model.timeScale(),t=this.m_study.priceScale();return e&&t&&!e.isEmpty()&&!t.isEmpty()},X.prototype._updateImpl=function(){if(this.m_items=[],this._scalesReady()){var e=this.m_model.timeScale(),t=this.m_study.priceScale(),i=e.visibleBarsStrictRange();if(null!==i){var n=this.m_series.nearestIndex(i.firstBar(),R.NearestRight),r=this.m_series.nearestIndex(i.lastBar(),R.NearestLeft),o=this.m_study.offset(this.m_plotName);o>0?(n-=o,r+=o):(n+=o,r-=o);var s=this.m_study.getMinFirstBarIndexForPlot(this.m_plotName);if(!(s>r)){n=Math.max(s,n);var a=this.m_study.data(),l=this.m_study.firstValue(),c=a.range(n,r),u=this._getTranspValue(),d=M(n,r),p=this.m_model.selection().isSelected(this.m_study);this.m_selectionData=p?{points:[],hittestResult:h.REGULAR,vertOffset:0,isDark:this.m_model.isDark(),bgColors:[],visible:!0}:null;var _,f,m=this.m_series.properties().style.value(),v=m===TradingView.Series.STYLE_LINE?"lineStyle":m===TradingView.Series.STYLE_AREA?"areaStyle":null;v?(_=this.m_series.properties()[v].priceSource.value(),f=_):(_="high",f="low");var y=this.m_study.priceScale().isInverted(),g=t.coordinateToPrice(t.height()*t.topMargin(),l),b=t.coordinateToPrice(t.height()*(1-t.bottomMargin()),l);this._topCoord=y?b:g,this._bottomCoord=y?g:b;var S=this.m_model.paneForSource(this.m_study).height();c.each(function(e,t){var i=Math.floor(e+o);if(null==(l=t[this.m_plotIndex+1]))return!1;var n=this._createItem(i,l,_,f);if(null!=n){var r=void 0!==t[this._colorer+1]||this._palette&&this._palette.addDefaultColor;if(this._colorer&&r){var s,a,l=t[this._colorer+1];if(n.style={},null!=l){var c=this._palette.valToIndex?this._palette.valToIndex[l]:l;s=this._paletterProps.colors[c].color.value(),a=u>9?u-10:0,n.style.color=B.generateColor(s,u)}else s=this.m_study.properties().styles[this.m_plotName].color.value(),a=100,n.style.color=B.generateColor(s,100);n.style.borderColor=B.generateColor(s,a)}var h=void 0!==t[this._textColorer+1]||this._textPalette&&this._textPalette.addDefaultColor;if(this._textColorer&&h){var m;l=t[this._textColorer+1];if(n.style||(n.style={}),null!=l){c=this._textPalette.valToIndex?this._textPalette.valToIndex[l]:l;m=this._textPaletterProps.colors[c].color.value(),n.style.textColor=B.generateColor(m,u)}else m=this.m_study.properties().styles[this.m_plotName].textColor.value(),n.style.textColor=B.generateColor(m,100)}return p&&-1!==d.indexOf(e)&&(this.m_selectionData.points.push(n),this.m_selectionData.bgColors.push(this.m_model.backgroundColorAtYPercentFromTop(n.y/S))),this.m_items.push(n),!1}}.bind(this)),this._convertItemsToCoordinates()}}}},X.prototype._updateRenderer=function(){this._updateImpl();var e=this.m_model.timeScale(),t={},i=this._getTranspValue(),n=e.barSpacing(),r=this._calculateShapeHeight(n),o=this.m_study.properties().styles[this.m_plotName].location.value(),s=this._calculateVerticalOffset(o,r+r/2);t.barSpacing=n,t.items=this.m_items, +t.color=B.generateColor(this.m_study.properties().styles[this.m_plotName].color.value(),i),t.height=r,t.vertOffset=s;var a=this.m_study.properties().styles[this.m_plotName].plottype.value(),l=O.plotShapesData[a],c=new I;l&&c.append(new TradingView[l.paneRendererClass](t)),this.m_model.selection().isSelected(this.m_study)&&this._isMarkersEnabled&&null!==this.m_selectionData&&(this.m_selectionData.vertOffset=s,c.append(new d(this.m_selectionData))),this.m_renderer=c},X.prototype._getSeriesVal=function(e,t){e=e||"close";var i=null;try{i=this.m_series[e](t)}catch(n){}return i},X.prototype._getTranspValue=function(){var e=0;this.m_study.properties().transparency&&(e=this.m_study.properties().transparency.value(),e=isNumber(e)?e:50);var t=this.m_study.properties().styles[this.m_plotName];return t.transparency&&(e=t.transparency.value(),e=isNumber(e)?e:50),L(e,0,100)},X.prototype._createItem=function(e,t,i,n){var o=this.m_study.properties().styles[this.m_plotName].location.value();if(!t&&o!==V.Absolute)return null;switch(o){case V.AboveBar:var s=this._getSeriesVal(i,e);if(void 0===s||null==s)return null;var a=s;break;case V.BelowBar:var l=this._getSeriesVal(n,e);if(void 0===l||null==l)return null;a=l;break;case V.Top:a=this._topCoord;break;case V.Bottom:a=this._bottomCoord;break;case V.Absolute:a=t;break;default:throw new Error("Bad value: "+o)}return new r(e,a)},X.prototype._convertItemsToCoordinates=function(){var e=this.m_model.timeScale(),t=this.m_study.priceScale();e.indexesToCoordinates(this.m_items),t.pointsArrayToCoordinates(this.m_items,this.m_study.firstValue())},X.prototype._calculateVerticalOffset=function(e,t){var i=0;switch(e){case V.AboveBar:case V.Bottom:i=-t;break;case V.BelowBar:case V.Top:i=t}return this.m_study.priceScale().isInverted()&&(i*=-1),i},X.prototype._calculateShapeHeight=function(e,t){var i=e;switch(t){case E.Tiny:i=.3*e;break;case E.Small:i=.6*e;break;case E.Normal:i=e;break;case E.Large:i=1.5*e;break;case E.Huge:i=2*e}return i},X.prototype.renderer=function(){if(this.m_study.properties().styles[this.m_plotName].visible&&this.m_study.properties().styles[this.m_plotName].visible.value()&&this._scalesReady())return this.m_invalidated&&(this._updateRenderer(),this.m_invalidated=!1),this.m_renderer},inherit(Q,X),Q.prototype._updateRenderer=function(e){this._updateImpl();var t,i=this.m_model.timeScale(),n={},r=this._getTranspValue(),o=i.barSpacing();if(e.size){var s=e.size.value();t=this._calculateShapeHeight(25,s)}else t=Math.round(o/2);var a=e.location.value(),l=B.generateColor(e.color.value(),r),c=r>19?r-10:0,u=this._calculateVerticalOffset(a,Math.round(1.5*t));n.barSpacing=o,n.items=this.items(),n.color=l,n.borderColor=B.generateColor(e.color.value(),c),n.height=t,n.vertOffset=u;var h=e.plottype.value(),p=O.plotShapesData[h],_=new I,f=e.text?e.text.value():void 0;if(void 0!==f&&""!==f.trim()){var m=f.trim().replace(/\\n/gm,"\n");m=TradingView.cleanButAmpersand(m,!0),n.text=m,n.fontSize=12;var v=e.textColor?e.textColor.value():void 0;n.textColor=v?B.generateColor(v,r):l} +null!=p&&_.append(new TradingView[p.paneRendererClass](n)),this.m_model.selection().isSelected(this.m_study)&&this._isMarkersEnabled&&null!==this.m_selectionData&&(this.m_selectionData.vertOffset=u,_.append(new d(this.m_selectionData))),this.m_renderer=_},Q.prototype.renderer=function(){var e=this.m_study.properties().styles[this.m_plotName];if(e.visible&&e.visible.value()&&this._scalesReady())return this.m_invalidated&&(this._updateRenderer(e),this.m_invalidated=!1),this.m_renderer},inherit($,Q),$.prototype.renderer=function(){var e=this.m_study.properties().styles[this.m_plotName];if(e.visible&&e.visible.value()&&this._scalesReady()){var t=this.m_model.timeScale();this.m_invalidated&&(this._updateImpl(),this.m_invalidated=!1);var i,n={},r=this._getTranspValue(),o=t.barSpacing();if(e.size){var s=e.size.value();i=this._calculateShapeHeight(50,s)}else i=Math.round(o);var a=e.location.value(),l=B.generateColor(e.color.value(),r),c=this._calculateVerticalOffset(a,i);n.items=this.items(),n.barSpacing=o,n.char=e.char.value(),n.height=i,n.vertOffset=c,n.color=l;var u=new I,h=e.text?e.text.value():void 0;if(void 0!==h&&""!==h.trim()){var p=h.trim().replace(/\\n/gm,"\n");p=TradingView.cleanButAmpersand(p,!0),n.text=p,n.fontSize=12;var _=e.textColor?e.textColor.value():void 0;n.textColor=_?B.generateColor(_,r):l}return u.append(new C(n)),this.m_model.selection().isSelected(this.m_study)&&this._isMarkersEnabled&&null!==this.m_selectionData&&(this.m_selectionData.vertOffset=c,u.append(new d(this.m_selectionData))),u}},inherit(ee,X),ee.prototype.renderer=function(){if(this.m_study.properties().styles[this.m_plotName].visible&&this.m_study.properties().styles[this.m_plotName].visible.value()&&this._scalesReady()){this.m_invalidated&&(this._updateImpl(),this.m_invalidated=!1);var e={},t=L(this._getTranspValue(),0,100),i=this.m_model.timeScale().barSpacing();e.items=this.m_items,e.barSpacing=i,e.colorup=B.generateColor(this.m_study.properties().styles[this.m_plotName].colorup.value(),t),e.colordown=B.generateColor(this.m_study.properties().styles[this.m_plotName].colordown.value(),t);var n=u(e.colorup),r=n?100*(1-n[3]):0,o=u(e.colordown),s=o?100*(1-o[3]):0;e.colorBorderUp=B.generateColor("#000000",r),e.colorBorderDown=B.generateColor("#000000",s),e.minHeight=this.m_study.properties().styles[this.m_plotName].minHeight.value(),e.maxHeight=this.m_study.properties().styles[this.m_plotName].maxHeight.value();var a=new I;if(a.append(new w(e)),this.m_model.selection().isSelected(this.m_study)&&null!==this.m_selectionData){var l=this.m_selectionData;l.barSpacing=i,a.append(new P(l))}return a}},ee.prototype._createItem=function(e,t,i,n){if(0!==t){Math.abs(t)>this._maxAbsValue&&(this._maxAbsValue=Math.abs(t));var r,o=t>0;if(o){var s=this._getSeriesVal(n,e);if(void 0===s||null==s)return null;r=s}else{var a=this._getSeriesVal(i,e);if(void 0===a||null==a)return null;r=a}return new S(e,r,t,o)}},ee.prototype._convertItemsToCoordinates=function(){var e=this.m_model.timeScale(),t=this.m_study.priceScale();e.indexesToCoordinates(this.m_items), +t.pointsArrayToCoordinates(this.m_items,this.m_study.firstValue());var i=Math.abs(this.m_study.properties().styles[this.m_plotName].minHeight.value()),n=Math.abs(this.m_study.properties().styles[this.m_plotName].maxHeight.value());if(i>n){var r=i;i=n,n=r}for(var o=(n-i)/this._maxAbsValue,s=this.m_items,a=0;ai)){t=Math.max(n,t);var o=this.m_study.data(),s=this.m_study.firstValue(),a=o.range(t,i),l=this.m_study.properties().ohlcPlots[this.m_plotName],c={};if(a.each(function(e,t){e=Math.floor(e);for(var i=!0,n={},r=TradingView.OPEN_PLOT;r<=TradingView.CLOSE_PLOT;++r){var o=t[this._ohlcPlotIndexes[r]+1];if(null==o){i=!1;break}n[r]=o}if(!i)return!1;var s=n[TradingView.OPEN_PLOT],a=n[TradingView.CLOSE_PLOT],u=Math.max(s,n[TradingView.HIGH_PLOT],n[TradingView.LOW_PLOT],a),h=Math.min(s,n[TradingView.HIGH_PLOT],n[TradingView.LOW_PLOT],a),d={};d.time=Math.round(e),d.open=s,d.high=u,d.low=h,d.close=a;var p=this._colorer?null!=t[this._colorer+1]?this._plotValueToPaletteColor(t[this._colorer+1]):"rgba(0, 0, 0, 0)":l.color.value();return d.color=function(e,t){var i=e+"@"+t;return c[i]||(c[i]=B.generateColor(e,t)),c[i]}(p,0),d.hollow=null,this.m_bars.push(d),!1}.bind(this)),this.m_study.priceScale().barPricesToCoordinates(this.m_bars,s),this.m_model.timeScale().barIndexesToCoordinates(this.m_bars),this.m_model.selection().isSelected(this.m_study)){var u=M(t,i);this._selectionData={points:[],hittestResult:h.REGULAR,isDark:this.m_model.isDark(),bgColors:[],visible:!0};for(var d=this.m_model.paneForSource(this.m_study).height(),p=0;pi){var s=r(e,i,t,n,o);return s.count=-s.count,s}return a(e,t,1,(function(e,t){return t>i||0!==n&&e>n}),o)}function o(e,t,i,n){void 0===n&&(n=!1);var r=i<0?-1:1;return a(e,t,r,(function(e,t){return e>=i*r}),n)}function s(e,t,i){var n=i<0?-1:1;return a(e,t,n,(function(e,t){return e>=i*n}),!0).times}function a(e,t,i,r,o){var s=0,a=t;e.moveTo(a);for(var l=0,c=Number.MAX_VALUE,u=!1,h=t,d=[];!r(s,a);){if(l>15)throw new Error("Internal error 0x10 while extrapolating.");var p=e.indexOfBar(a);if(p===n.SessionStage.PRE_SESSION&&1===i)a=e.startOfBar(0),e.moveTo(a);else if(p===n.SessionStage.PRE_SESSION&&-1===i)a=e.startOfBar(n.SessionStage.PRE_SESSION)-1,e.moveTo(a);else if(p===n.SessionStage.POST_SESSION&&1===i)a=e.startOfBar(n.SessionStage.POST_SESSION),e.moveTo(a);else{if(p===n.SessionStage.POST_SESSION&&-1===i)throw new Error("Internal error 0x12 while extrapolating.");var _=e.startOfBar(p);if(_>t&&i>0||t>_&&i<0){if(u&&c===_)throw new Error("Internal error 0x11 while extrapolating.");u=!0,c=_,l=0,s++,h=_,o&&d.push(h)}if(0===p&&-1===i)a=_-1;else{a=e.startOfBar(p+i);var f=e.startOfBar(n.SessionStage.POST_SESSION);a>f&&(e.moveTo(f),a=e.startOfBar(0))}}l++}return{time:h,times:d,count:s}}},IMMp:function(e){ +e.exports=JSON.parse('{"color-bg-primary":"color-cold-gray-850","color-bg-primary-hover":"color-cold-gray-800","color-bg-secondary":"color-cold-gray-900","color-bg-highlight":"color-cold-gray-900","color-bg-scroll-buttons":"color-cold-gray-800","color-legacy-bg-scroll-buttons":"color-cold-gray-550","color-legacy-bg-widget":"color-cold-gray-900","color-text-primary":"color-cold-gray-200","color-text-secondary":"color-cold-gray-500","color-text-tertiary":"color-cold-gray-400","color-text-disabled":"color-cold-gray-650","color-divider":"color-cold-gray-700","color-divider-hover":"color-cold-gray-800","color-box-shadow":"color-black","color-active-hover-text":"color-gull-gray","color-alert-text":"color-loblolly","color-border":"color-bright-gray","color-border-chat-fields":"color-bright-gray","color-border-hover":"color-trout-1","color-border-table":"color-cold-gray-800","color-brand":"color-tv-blue-700","color-brand-active":"color-tv-blue-600","color-brand-hover":"color-tv-blue-600","color-button-hover-bg":"color-mirage-3","color-chart-page-bg":"color-cold-gray-800","color-common-tooltip-bg":"color-cold-gray-650","color-danger":"color-ripe-red-600","color-depthrenderer-fill-style":"color-catskill-white","color-depthrenderer-stroke-style":"color-trout-1","color-disabled-border-and-color":"color-ebony-clay","color-disabled-input":"color-bright-gray","color-empty-container-message":"color-slate-gray","color-highlight-new":"color-dark-slate-blue","color-icons":"color-slate-gray","color-input-bg":"color-charade","color-input-textarea-readonly":"color-trout-1","color-input-placeholder-text":"color-cold-gray-700","color-input-publish-bg":"color-mirage-1","color-item-active-blue":"color-blue-dianne","color-item-hover-active-bg":"color-charade","color-item-hover-bg":"color-ebony-clay","color-item-hover-blue":"color-blue-dianne","color-item-selected-blue":"color-blue-dianne","color-item-active-text":"color-cold-gray-200","color-item-active-bg":"color-tv-blue-700","color-link":"color-tv-blue-700","color-link-hover":"color-tv-blue-600","color-link-active":"color-tv-blue-600","color-list-item":"color-slate-gray","color-list-nth-child-bg":"color-mirage-3","color-news-highlight":"color-charade","color-pane-bg":"color-mirage-1","color-pane-secondary-bg":"color-cold-gray-850","color-placeholder":"color-trout-2","color-popup-menu-item-hover-bg":"color-cold-gray-800","color-popup-menu-separator":"color-cold-gray-700","color-row-hover-active-bg":"color-ebony-clay","color-sb-scrollbar-body-bg":"color-trout-2","color-screener-description":"color-loblolly","color-section-separator-border":"color-bright-gray","color-separator-table-chat":"color-bright-gray","color-success":"color-minty-green-700","color-success-hover":"color-minty-green-600","color-success-active":"color-minty-green-500","color-tag-active-bg":"color-bright-gray","color-tag-hover-bg":"color-charade","color-text-regular":"color-loblolly","color-toolbar-button-text":"color-cold-gray-500","color-toolbar-button-text-hover":"color-cold-gray-450","color-toolbar-button-text-active":"color-tv-blue-700","color-toolbar-button-text-active-hover":"color-tv-blue-600","color-toolbar-button-background-hover":"color-cold-gray-800","color-toolbar-button-background-secondary-hover":"color-cold-gray-750","color-toolbar-toggle-button-background-active":"color-tv-blue-700","color-toolbar-toggle-button-background-active-hover":"color-tv-blue-600","color-toolbar-interactive-element-text-normal":"color-cold-gray-300","color-toolbar-interactive-element-text-hover":"color-cold-gray-250","color-toolbar-opened-element-bg":"color-cold-gray-800","color-tooltip-bg":"color-bright-gray","color-tv-button-checked":"color-slate-gray","color-tv-dialog-caption":"color-athens-gray-2","color-tv-dropdown-item-hover-bg":"color-charade","color-underlined-text":"color-gull-gray","color-widget-pages-bg":"color-cold-gray-900","color-warning":"color-tan-orange-700","color-forex-icon":"color-white","color-list-item-active-bg":"color-medium-blue","color-list-item-hover-bg":"color-ebony-clay","color-list-item-text":"color-loblolly","color-price-axis-label-back":"color-cold-gray-800","color-price-axis-label-text":"color-cold-gray-500","color-price-axis-gear":"color-cold-gray-500","color-price-axis-gear-hover":"color-cold-gray-400","color-price-axis-highlight":"color-cold-gray-800","color-bid":"color-tv-blue-700","color-scroll-bg":"color-cold-gray-750","color-scroll-border":"color-cold-gray-850","color-widget-border":"color-cold-gray-800","color-scroll-buttons-arrow":"color-white","color-control-intent-default":"color-cold-gray-650","color-control-intent-success":"color-minty-green-600","color-control-intent-primary":"color-tv-blue-700","color-control-intent-warning":"color-tan-orange-500","color-control-intent-danger":"color-ripe-red-700","color-growing":"color-minty-green-600","color-falling":"color-ripe-red-600","color-pre-market":"color-tan-orange-600","color-pre-market-bg":"color-tan-orange-400","color-post-market":"color-tv-blue-500","color-post-market-bg":"color-tv-blue-400","color-market-open":"color-minty-green-500","color-market-open-bg":"color-minty-green-400","color-market-closed":"color-cold-gray-400","color-market-holiday":"color-cold-gray-400","color-invalid-symbol":"color-ripe-red-400","color-invalid-symbol-hover":"color-ripe-red-500","color-replay-mode":"color-tv-blue-700","color-replay-mode-icon":"color-tv-blue-50","color-replay-mode-hover":"color-tv-blue-600","color-notaccurate-mode":"color-berry-pink-600","color-notaccurate-mode-bg":"color-berry-pink-400","color-delay-mode":"color-tan-orange-600","color-delay-mode-bg":"color-tan-orange-400","color-eod-mode":"color-grapes-purple-400","color-eod-mode-bg":"color-grapes-purple-400","color-data-problem":"color-ripe-red-600","color-data-problem-bg":"color-ripe-red-400","color-data-problem-hover":"color-ripe-red-500","color-list-item-bg-highlighted":"color-tv-blue-a900","color-list-item-bg-selected":"color-tv-blue-a800","color-list-item-bg-highlighted-hover":"color-tv-blue-a800","color-list-item-bg-selected-hover":"color-tv-blue-a700","color-screener-header-bg":"color-cold-gray-850","color-screener-header-bg-hover":"color-cold-gray-800"}') +},IOzl:function(e,t,i){"use strict";i.r(t);var n,r=i("mrSG"),o=i("aO4+"),s=i("Eyy1"),a=i("2WC2"),l=i("gBDZ"),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(r.__extends)(t,e),t.prototype.setData=function(e,t){this._setBaseData(e,t);for(var i=0,n=this._items;i=0?e.vertOffset:e.vertOffset-e.shapeHeight},t}(c),d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(r.__extends)(t,e),t.prototype._calcBoundingBox=function(e){var t=e.x-e.shapeWidth/2,i=e.x+e.shapeWidth/2,n=e.y-e.shapeHeight+e.vertOffset,r=e.y+e.vertOffset,s=new o.Point(t,n),a=new o.Point(i,r);return Object(o.box)(s,a)},t.prototype._drawItemShape=function(e,t,i){var r=t.pixelRatio,o=this._lineWidth(t)%2?.5:0,s=Math.max(1,Math.floor(r))%2?.5:0,a=this._getArrowSize(i),l=Math.round(a*r);(s+l)%1!=o%1&&(l+=.5);var c=Math.round(i.shapeWidth/2*r);(s+c)%1!=o%1&&(c+=.5);var u=Math.round(i.x*r)+s,h=Math.round((i.y+i.vertOffset)*r)+o,d=u+l,p=Math.round((i.y+i.vertOffset-a)*r)+o,_=u-l,f=u+c,m=Math.round((i.y+i.vertOffset-i.shapeHeight)*r)+o,v=u-c;e.moveTo(d,p),e.lineTo(u,h),e.lineTo(_,p),i.shapeWidth<=2*a?(e.lineTo(v,p),this._drawCorner(e,v,m,n.leftUp,r),this._drawCorner(e,f,m,n.rightUp,r),e.lineTo(f,p)):(this._drawCorner(e,v,p,n.leftDown,r),this._drawCorner(e,v,m,n.leftUp,r),this._drawCorner(e,f,m,n.rightUp,r),this._drawCorner(e,f,p,n.rightDown,r)),e.lineTo(d,p)},t.prototype._getVerticalTextOffset=function(e){return-e.shapeHeight/2-this._getArrowSize(e)/2},t.prototype._calcVertOffset=function(e){return Math.sign(e.vertOffset)<=0?e.vertOffset:e.vertOffset+e.shapeHeight},t}(c),p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(r.__extends)(t,e),t.prototype._calcBoundingBox=function(e){var t=e.x,i=e.x+e.shapeWidth,n=e.y-e.shapeHeight/2+e.vertOffset,r=e.y+e.shapeHeight/2+e.vertOffset,s=new o.Point(t,n),a=new o.Point(i,r);return Object(o.box)(s,a)},t.prototype._drawItemShape=function(e,t,i){var r=t.pixelRatio,o=this._lineWidth(t)%2?.5:0,s=this._getArrowSize(i),a=this._hasText(i),l=a?i.shapeHeight/2:s,c=Math.round(i.x*r)+o,u=Math.round((i.y+i.vertOffset)*r)+o,h=Math.round((i.x+s)*r)+o,d=Math.round((i.y+i.vertOffset+s)*r)+o,p=Math.round((i.y+i.vertOffset-s)*r)+o,_=Math.round((i.y+i.vertOffset-l)*r)+o,f=Math.round((i.x+i.shapeWidth)*r)+o,m=Math.round((i.y+i.vertOffset+l)*r)+o;e.moveTo(h,d),e.lineTo(c,u),e.lineTo(h,p),a?this._drawCorner(e,h,_,n.leftUp,r):e.lineTo(h,_),this._drawCorner(e,f,_,n.rightUp,r),this._drawCorner(e,f,m,n.rightDown,r),a?this._drawCorner(e,h,m,n.leftDown,r):e.lineTo(h,m),e.lineTo(h,d)},t.prototype._getHorizontalTextOffset=function(e){return e.shapeWidth/2+this._getArrowSize(e)/2},t}(c),_=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(r.__extends)(t,e),t.prototype._calcBoundingBox=function(e){var t=e.x-e.shapeWidth,i=e.x,n=e.y-e.shapeHeight/2+e.vertOffset,r=e.y+e.shapeHeight/2+e.vertOffset,s=new o.Point(t,n),a=new o.Point(i,r);return Object(o.box)(s,a)},t.prototype._drawItemShape=function(e,t,i){ +var r=t.pixelRatio,o=this._lineWidth(t)%2?.5:0,s=this._getArrowSize(i),a=this._hasText(i),l=a?i.shapeHeight/2:s,c=Math.round(i.x*r)+o,u=Math.round((i.y+i.vertOffset)*r)+o,h=Math.round((i.x-s)*r)+o,d=Math.round((i.y+i.vertOffset-s)*r)+o,p=Math.round((i.y+i.vertOffset+s)*r)+o,_=Math.round((i.y+i.vertOffset-l)*r)+o,f=Math.round((i.x-i.shapeWidth)*r)+o,m=Math.round((i.y+i.vertOffset+l)*r)+o;e.moveTo(h,d),e.lineTo(c,u),e.lineTo(h,p),a?this._drawCorner(e,h,m,n.rightDown,r):e.lineTo(h,m),this._drawCorner(e,f,m,n.leftDown,r),this._drawCorner(e,f,_,n.leftUp,r),a?this._drawCorner(e,h,_,n.rightUp,r):e.lineTo(h,_),e.lineTo(h,d)},t.prototype._getHorizontalTextOffset=function(e){return-e.shapeWidth/2-this._getArrowSize(e)/2},t}(c),f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(r.__extends)(t,e),t.prototype._calcBoundingBox=function(e){var t=e.x-e.shapeWidth/2,i=e.x+e.shapeWidth/2,n=e.y-e.shapeHeight/2+e.vertOffset,r=e.y+e.shapeHeight/2+e.vertOffset,s=new o.Point(t,n),a=new o.Point(i,r);return Object(o.box)(s,a)},t.prototype._drawItemShape=function(e,t,i){var r=t.pixelRatio,o=this._lineWidth(t)%2?.5:0,s=i.shapeHeight/2,a=i.shapeWidth/2,l=Math.round(i.x*r)+o,c=Math.round((i.x-a)*r)+o,u=Math.round((i.x+a)*r)+o,h=Math.round((i.y+i.vertOffset-s)*r)+o,d=Math.round((i.y+i.vertOffset+s)*r)+o;e.moveTo(l,h),this._drawCorner(e,u,h,n.rightUp,r),this._drawCorner(e,u,d,n.rightDown,r),this._drawCorner(e,c,d,n.leftDown,r),this._drawCorner(e,c,h,n.leftUp,r),e.lineTo(l,h)},t}(c)},IVMC:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e.reduce((function(e,t,i){return~e.indexOf(t)||e.push(t),e}),[])},e.exports=t.default},IWXC:function(e,t,i){"use strict";i.r(t),i.d(t,"getQuoteSessionInstance",(function(){return s})),i.d(t,"setQuoteSessionInstance",(function(){return a})),i.d(t,"getQuoteSessionNoEnsure",(function(){return l})),i.d(t,"destroyQuoteSessions",(function(){return c}));var n=i("hGf4"),r=i.n(n),o={};function s(e){return void 0===e&&(e="full"),o[e]||a(e,new r.a(e)),o[e]}function a(e,t){void 0===e&&(e="full"),o[e]=t}function l(e){return void 0===e&&(e="full"),o[e]}function c(){for(var e in o)if(o.hasOwnProperty(e)){var t=o[e];void 0!==t&&t.destroy(),delete o[e]}}},Ialn:function(e,t,i){"use strict";i.r(t),i.d(t,"isRtl",(function(){return r})),i.d(t,"stripLTRMarks",(function(){return s})),i.d(t,"startWithLTR",(function(){return a})),i.d(t,"forceLTRStr",(function(){return l})),i.d(t,"forceLTRStrSsr",(function(){return c})),i.d(t,"forceRTLStr",(function(){return u})),i.d(t,"getLTRScrollLeft",(function(){return h})),i.d(t,"getLTRScrollLeftOffset",(function(){return d})),i.d(t,"detectAutoDirection",(function(){return f}));var n=i("oYVD"),r=function(){return"rtl"===window.document.dir},o=new RegExp("‎|‪|‫|‬","g");function s(e){return""!==e&&r()&&null!=e?e.replace(o,""):e}function a(e){return""!==e&&r()&&null!=e?"‎"+e:e}function l(e){return""!==e&&r()&&null!=e?"‪"+e+"‬":e}function c(e){return"‪"+e+"‬"}function u(e){return""!==e&&r()&&null!=e?"‫"+e+"‬":e} +function h(e){return Object(n.getNormalizedScrollLeft)(e,"rtl")}function d(e,t){var i=Object(n.detectScrollType)();if("indeterminate"===i)return 0;switch(i){case"negative":t=e.clientWidth-e.scrollWidth+t;break;case"reverse":t=e.scrollWidth-e.clientWidth-t}return t}var p=/[^\u0000-\u0040\u005B-\u0060\u007B-\u00BF\u00D7\u00F7\u02B9-\u02FF\u2000-\u200E\u2010-\u2029\u202C\u202F-\u2BFF]/,_=/[\u0590-\u07FF\u200F\u202B\u202E\uFB1D-\uFDFD\uFE70-\uFEFC]/;function f(e){var t=p.exec(e);return t?_.test(t[0])?"rtl":"ltr":""}},IcDj:function(e,t,i){"use strict";i.r(t),i.d(t,"StudyBase",(function(){return _}));var n=i("mrSG"),r=(i("Eyy1"),i("aIyQ")),o=i.n(r),s=i("7ktv"),a=i("5fI3"),l=i("jy4L"),c=i("YWnQ"),u=i("/tGj"),h=i("e1Hy"),d=i("W+6j"),p=window.t("Invalid Symbol"),_=function(e){function t(i,n,r,s){var a=e.call(this,i)||this;return a.onStart=new o.a,a._symbolsResolved=new o.a,a._statusChanged=new o.a,a._paneViews=[],a._resolvedSymbols={},a._isChildStudy=!1,a._loading=!0,a._failed=!1,a._status="",a._studyId=null,a._chartApi=i.chartApi(),a._properties=n,a._metaInfo=s,a._series=a._model.mainSeries(),r instanceof t?(a._source=r,a._isChildStudy=!0,a._source.setChild(a),a._source.currencyChanged().subscribe(a,a._onSourceCurrencyChanged)):a._series.currencyChanged().subscribe(a,a._onSourceCurrencyChanged),a}return Object(n.__extends)(t,e),t.prototype.destroy=function(){this._source&&this._source.currencyChanged().unsubscribeAll(this),this._series&&this._series.currencyChanged().unsubscribeAll(this)},t.prototype.isSymbolInvalid=function(){return this._status===p},t.prototype.getSymbolString=function(e){return Object(a.encodeExtendedSymbol)(this._getSymbolObject(e))},t.prototype.onStatusChanged=function(){return this._statusChanged},t.prototype.symbolsResolved=function(){return this._symbolsResolved},t.prototype.valuesProvider=function(){return new h.a(this,this.model())},t.prototype.statusProvider=function(e){return new d.a(this,this._model.properties().scalesProperties.textColor)},t.prototype._allSymbolsAreResolved=function(){for(var e=this,t=[],i=this.metaInfo(),n=0;n=this._sessionEndMs?u.SessionStage.POST_SESSION:d(n.time_seconds_diff(e,this._sessionStartMs)/this._periodSec)},t.prototype.startOfBar=function(e){if(e===u.SessionStage.PRE_SESSION){var t=n.get_cal_from_unix_timestamp_ms(this._session.timezone,this._sessionStartMs-1),i=this._session.spec.alignToNearestSessionEnd(t,-1);return n.cal_to_utc(this._session.timezone,i)}if(e===u.SessionStage.POST_SESSION)return this._sessionEndMs;if(e<0)throw new Error("Negative offset is not supported");return this._sessionStartMs+n.time_seconds(this._periodSec*e)},t.prototype.endOfBar=function(e){if(e<0)throw new Error("Index cannot be negative");var t=this.startOfBar(e)+1e3*this._periodSec +;return t>this._sessionEndMs?this._sessionEndMs:t},t.prototype.isLastBar=function(e,t){return t>=this._sessionStartMs+n.time_seconds(this._periodSec*(e+1)-1)},t.prototype.moveTo=function(e){var t=this._session.timezone,i=n.utc_to_cal(t,e),r=this._session.spec.alignToSessionStart(i);this._sessionStartMs=n.cal_to_utc(t,i),n.add_minutes(i,r),this._sessionEndMs=n.cal_to_utc(t,i)},t.prototype.moveNext=function(){this.moveTo(this._sessionEndMs)},t}(_),m=i("OBgQ");function v(e,t){var i=n.clone(t),r=e.businessDaysToCalendarDays(i,1);r>1&&n.add_date(i,r-1);var o=e.leftBorderOfDailyBar(i);if(null===o)throw new Error("Cannot calculate left border of daily bar");return n.cal_to_utc(n.get_timezone(e.timezone()),o)}var y=function(e){function t(t,i,n,r,o){void 0===o&&(o=!1);var s=e.call(this)||this;return s._periodStart=-Number.MAX_VALUE,s._periodEnd=-Number.MAX_VALUE,s._periodLastBarStart=-Number.MAX_VALUE,s._periodStartDay=new m.a(0,0,0),s._periodEndDay=new m.a(0,0,0),s._period=n,s._sessionTgt=t,s._builder=r,s._useBusinessDays=o,s._sessionSrc=o?new p("Etc/UTC","24x7"):i||t,s}return Object(c.__extends)(t,e),t.prototype.builder=function(){return this._builder},t.prototype.alignTimeIfPossible=function(e){return this.tradingDayToSessionStart(e)},t.prototype.tradingDayToSessionStart=function(e){return this.moveTo(e),this.startOfBar(0)},t.prototype.indexOfBar=function(e){if(this._useBusinessDays){var t=m.a.fromCalendar(n.get_cal_from_unix_timestamp_ms(this._sessionSrc.timezone,e));return t.before(this._periodStartDay)?u.SessionStage.PRE_SESSION:this._periodEndDay.before(t)?u.SessionStage.POST_SESSION:0}return e=this._periodEnd?u.SessionStage.POST_SESSION:0},t.prototype.startOfBar=function(e){if(e===u.SessionStage.PRE_SESSION){var t=n.get_cal_from_unix_timestamp_ms(this._sessionTgt.timezone,this._periodStart-1),i=this._sessionTgt.spec.alignToNearestSessionEnd(t,-1);return n.cal_to_utc(this._sessionTgt.timezone,i)-1}return e===u.SessionStage.POST_SESSION||e>0?this._periodEnd:e===u.SessionStage.LASTBAR_SESSION?this._periodLastBarStart:this._periodStart},t.prototype.moveTo=function(e){var t=n.get_cal_from_unix_timestamp_ms(this._sessionSrc.timezone,e);this._sessionSrc.spec.correctTradingDay(t);var i=n.get_year(t),r=this._indexOfPeriodInYear(t),o=r+this._period,s=this._sessionTgt.spec,a=this._sessionTgt.timezone,l=this._builder.startOfPeriod(a,r,i);this._periodStart=v(s,l);var c=n.clone(l),u=s.businessDaysToCalendarDays(c,1);u>1&&n.add_date(c,u-1),this._periodStartDay=m.a.fromCalendar(c);var h=this._builder.startOfPeriod(a,o,i);this._periodEnd=v(s,h);var d=n.clone(h);for(n.add_date(d,-1);s.isCalWeekEnd(d);)n.add_date(d,-1);this._periodEndDay=m.a.fromCalendar(d),n.add_date(h,-1),function(e,t){for(;e.isCalWeekEnd(t);)n.add_date(t,-1)}(this._sessionTgt.spec,h),this._periodLastBarStart=v(s,h),(this._periodLastBarStart=this._periodLastBarStart},t.prototype.currentRange=function(){return{from:this._periodStartDay,to:this._periodEndDay}},t.prototype.indexOfBarInYear=function(e){var t=n.get_cal_from_unix_timestamp_ms(this._sessionSrc.timezone,e),i=n.get_year(t),r=this._builder.indexOfPeriod(t),o=this._sessionTgt.timezone,s=this._builder.startOfPeriod(o,r,i),a=v(this._sessionTgt.spec,s);return s=n.get_cal_from_unix_timestamp_ms(n.get_timezone("Etc/UTC"),a),i=0&&(r-=7),d((r+i)/7))}var S=function(){function e(){}return e.prototype.indexOfPeriod=function(e){return n.get_day_of_year(e)-1},e.prototype.startOfPeriod=function(e,t,i){var r=n.days_per_year(i);return n.get_cal(n.get_timezone("Etc/UTC"),i,n.JANUARY,1+Math.min(t,r))},e}(),w=function(e){function t(t){var i=e.call(this)||this;return i._sessionsSpec=t,i}return Object(c.__extends)(t,e),t.prototype.indexOfPeriod=function(t){return e.prototype.indexOfPeriod.call(this,t)-function(e,t){var i=b(e,t),r=n.get_cal(n.get_timezone("Etc/UTC"),n.get_year(t),n.JANUARY,1);n.add_date(r,7*i);var o=i*e.weekEndsCount()+e.holidaysFromYearStart(r),s=n.get_day_of_year(t)-n.get_day_of_year(r);return o+s-e.calendarDaysToBusinessDays(r,s)}(this._sessionsSpec,t)},t.prototype.startOfPeriod=function(t,i,r){var o=7-this._sessionsSpec.weekEndsCount(),s=Math.max(0,d(i/o)-1),a=n.get_cal(n.get_timezone("Etc/UTC"),r,n.JANUARY,1),l=n.get_days_per_year(a);if(n.add_date(a,7*s),(i-=o*s-this._sessionsSpec.holidaysFromYearStart(a))>0){var c=this._sessionsSpec.businessDaysToCalendarDays(a,i);n.add_date(a,c)}var u=n.get_day_of_year(a)-1;return rn.get_days_per_year(r)?this.startOfPeriod(e,0,i+1):(n.add_date(r,s),r)},e}(),x=function(){function e(){}return e.prototype.indexOfPeriod=function(e){return n.get_month(e)},e.prototype.startOfPeriod=function(e,t,i){if(t<0){var r=d((11-t)/12);i-=r,t+=12*r}else t>n.DECEMBER&&(i++,t=n.JANUARY);return n.get_cal(n.get_timezone("Etc/UTC"),i,t,1)},e}();function T(e,t,i,n){void 0===n&&(n=!1);var r=o.Interval.parse(e),s=r.multiplier();return r.kind()===o.ResolutionKind.Minutes?new f(60*s,t):r.kind()===o.ResolutionKind.Seconds?new f(s,t):r.kind()===o.ResolutionKind.Range?new f(60*s,t):new y(t,i,s,function(e,t){switch(e){case o.ResolutionKind.Days:return new P(t);case o.ResolutionKind.Weeks:return new C(t);case o.ResolutionKind.Months:return new x}throw new Error("Unknown dwm resolution: "+e)}(r.kind(),t),n)}function I(e,t,i,n,r,a,l){var c,u,h=new p("Etc/UTC",e,t,i),d=o.Interval.parse(r+n),_=d.isDWM();_?(u=s(d,l),c=864e5):(u=d.inMilliseconds(),c=60*h.spec.findSession(0,0,0).getEntry().length()*1e3);var f=c/u,m=(_?7:7-h.spec.weekEndsCount())*f;return as.startOffset()+s.length()&&r===s.dayOfWeek()-1&&(r++,o-=1440),r===s.dayOfWeek()&&o>=s.startOffset()&&o0&&(e.lineCap="butt",e.strokeStyle=this._data.color,e.lineWidth=i,Object(c.setLineStyle)(e,u.LINESTYLE_SOLID),this._extendAndDrawLineSegment(e,s,l,t),this._extendAndDrawLineSegment(e,h,a,t),Object(c.drawLine)(e,s.x,s.y,h.x,h.y),Object(c.drawLine)(e,l.x,l.y,a.x,a.y)),e.restore()}},e.prototype._getPointsInPhysicalSpace=function(e,t){void 0===t&&(t=0);var i=Object(n.ensureNotNull)(this._data).points,o=i[0],s=i[1],a=e.pixelRatio,l=Math.round(o.x*a)+t,c=Math.round(s.x*a)+t,u=Math.round(o.y*a)+t,h=Math.round(s.y*a)+t;return[new r.Point(l,u),new r.Point(c,h)]},e.prototype._extendAndHitTestLineSegment=function(e,t,i,n){var r=this._extendAndClipLineSegment(t,i,n);if(null!==r&&Object(s.distanceToSegment)(r[0],r[1],e).distance<=3)return this._hitTestResult;return null},e.prototype._extendAndDrawLineSegment=function(e,t,i,n){var r=this._extendAndClipLineSegment(t,i,n);null!==r&&Object(c.drawLine)(e,r[0].x,r[0].y,r[1].x,r[1].y)},e.prototype._extendAndClipLineSegment=function(e,t,i){var o=Object(n.ensureNotNull)(this._data);if(Object(r.equalPoints)(e,t))return null;var s=i.physicalWidth,a=Math.min(e.x,t.x),l=Math.max(e.x,t.x),c=o.extendLeft?0:Math.max(a,0),u=o.extendRight?s:Math.min(l,s);return c>u||u<=0||c>=s?null:[new r.Point(c,e.y),new r.Point(u,t.y)]},e.prototype._drawBackground=function(e,t,i,n){if(!(n.cssWidth<=0||n.cssHeight<=0)){var r=this._extendAndClipLineSegment(t,i,n);if(null!==r){var o=r[0],s=r[1];e.beginPath(),e.moveTo(o.x,o.y),e.lineTo(s.x,o.y),e.lineTo(s.x,s.y),e.lineTo(o.x,s.y),e.lineTo(o.x,o.y),e.fillStyle=this.getColor(),e.fill()}}},e.prototype._hitTestBackground=function(e,t,i,n){var s=this._extendAndClipLineSegment(t,i,n);return null!==s&&Object(o.pointInBox)(e,Object(r.box)(s[0],s[1]))?this._backHitTestResult:null},e}()},InMJ:function(e,t,i){"use strict";var n=i("Ss5c").LineDataSource,r=i("Ocx9").DefaultProperty,o=window.t("Flat Bottom");function s(e,t){var r=t||s.createProperties();n.call(this,e,r),this.version=s.version, +i.e("lt-pane-views").then(function(e){var t=i("gr7S").FlatBottomPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}inherit(s,n),s.version=1,s.prototype.pointsCount=function(){return 3},s.prototype.translatedType=function(){return o},s.prototype.name=function(){return"Flat Bottom"},s.prototype.hasEditableCoordinates=function(){return!1},s.prototype.addPoint=function(e,t){return t&&t.shift()&&2===this.points().length&&this._snapPoint45Degree(e,this.points()[this.points().length-2]),n.prototype.addPoint.call(this,e)},s.prototype.setLastPoint=function(e,t){return t&&t.shift()&&2===this.points().length&&this._snapPoint45Degree(e,this.points()[this.points().length-2]),n.prototype.setLastPoint.call(this,e)},s.prototype.setPoint=function(e,t,i){if(i&&i.shift()&&1===e){this._snapPoint45Degree(t,this.points()[0])}if(2===e)this._points[1].index=t.index;else if(3===e)return this._points[0].index=t.index,this._points[2].price=t.price,void this.normalizePoints();n.prototype.setPoint.call(this,e,t)},s.prototype.canHasAlert=function(){return!0},s.prototype._getAlertPlots=function(){var e=this._points[0],t=this._points[1],i=[];e.index<=t.index?(i.push(e),i.push(t)):(i.push(t),i.push(e));var n=this._points[2];n.time=t.time,n.index=t.index;var r,o,s,a,l={price:n.price,time:e.time,index:e.index},c=[];n.index<=l.index?(c.push(n),c.push(l)):(c.push(l),c.push(n)),i[0].price>c[0].price?(r=i,o=c):c[0].price>i[0].price||c[1].price>i[1].price?(r=c,o=i):(r=i,o=c);var u=this.properties().extendLeft.value(),h=this.properties().extendRight.value();return e.index<=t.index?(s=u,a=h):(s=h,a=u),[this._linePointsToAlertPlot(r,"Upper",s,a),this._linePointsToAlertPlot(o,"Lower",u,a)]},s.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("vm8R").GeneralTrendFiguresDefinitionsViewModel}.bind(null,i)).catch(i.oe)},s.createProperties=function(e){var t=new r("linetoolflatbottom",e);return s._configureProperties(t),t},s._configureProperties=function(e){n._configureProperties(e)},t.LineToolFlatBottom=s},J2xC:function(e,t,i){e.exports={"css-value-header-toolbar-height":"38px"}},JOqt:function(e,t,i){"use strict";i.r(t),i.d(t,"debounce",(function(){return n}));var n=function(e,t){var i,n,r=0;function o(){e.apply(n,i)}return function(){n=this,i=arguments,clearTimeout(r),r=setTimeout(o,t)}}},JT5O:function(e,t,i){"use strict";i.r(t),i.d(t,"StudyMarket",(function(){return o}));var n=i("aIyQ"),r=i.n(n),o=function(){function e(e,t){this.visibilityChanged=new r.a,this._dialogPromise=null,this._dialog=null,this._chartWidgetCollection=e,this._options=t}return e.prototype.isVisible=function(){return null!==this._dialog&&this._dialog.isVisible()},e.prototype.show=function(e){var t;null===this._dialog&&this._requestDialog(e),null===(t=this._dialog)||void 0===t||t.open(e)},e.prototype.hide=function(){var e;null===(e=this._dialog)||void 0===e||e.hide()},e.prototype.onCustomScriptModified=function(){var e +;null===(e=this._dialog)||void 0===e||e.updateUserStudies()},e.prototype.resetAllPages=function(){var e;null===(e=this._dialog)||void 0===e||e.resetAllStudies()},e.prototype._requestDialog=function(e){var t=this;if(null===this._dialogPromise){var n=void 0;n=Promise.all([i.e("react"),i.e(1),i.e(3),i.e(6),i.e(7),i.e(8),i.e(10),i.e(13),i.e(33),i.e(65),i.e(66),i.e(74),i.e(0),i.e(5),i.e(11),i.e("study-market")]).then(i.bind(null,"zbLM")).then((function(e){return new e.IndicatorsLibraryContainer(t._chartWidgetCollection,t._options)})),this._dialogPromise=n.then((function(i){t._dialog=i,t._dialog.getVisibilityChanged().subscribe(null,(function(e){t.visibilityChanged.fire(e)})),t._dialog.open(e)}))}return this._dialogPromise},e}()},JWMC:function(e,t,i){"use strict";i.r(t),i.d(t,"trackEvent",(function(){return l}));i("bSeV");var n=i("FQhm"),r=i("Kxc7"),o=i("txPx"),s=Object(o.getLogger)("Common.TrackEvent"),a=[/Study_(Drawing)_(.*)/,/(Study)_(.*)@tv-basicstudies/,/(Study)_(.*)/,/(Chart Style) (.*)/],l=function(e,t,i){if(r.enabled("charting_library_base"))!function(e,t,i){t=t||e||i||"";for(var r="",o=0;o=22)return t;for(var i={},n=0,r=0;;){var o=t[r];if(void 0===o)break;var s=t[o.id];o.isFake&&(o.id="in_"+n++),i[r]=o,i[o.id]=s,r++}return i}]}u.prototype.updateMetaInfo=function(e){if(!e)return e;n(!e.isTVScript,"This method should update only built-in java indicators metaInfo. For Pine indicators use updateMetaInfoAsync");for(var t=null,i=this._studiesMetainfo,r=0;r=12&&l<=26){var c={};for(s=0;s=12&&c<=26){var h=r.columns;r.columns=[];for(var d=0;dt&&o.logWarn("Bad integer input max value in metaInfo id="+e.id+" title="+e.description))}},u._fixInputsMaxValue=function(e,t){if(!TradingView.isAbsent(t)){var i=u.INPUT_MAX_VALUE;if(t.inputs)for(var n=0;ni&&(a.max=i))}if(e&&e.inputs){var r=u.splitInputs(e.inputs),o=r.arr;for(var s in o){var a;"integer"===(a=o[s]).type&&(a.max&&a.max>i&&(a.max=i))}e.inputs=TradingView.merge(r.obj,r.arr)}}},u.prototype.patchPropsStateAndMetaInfo=function(e,t,i){"Script$BOOKER"!==t.productId||t.alerts||delete e.alerts,u._fixInputsOrder(e,t),u._fixInputsMaxValue(e,t);var n=u.splitInputs(e.inputs);e.inputs=n.obj;var r=a.versionOf(t);ri&&(i=r))}e[i+1]=t},u.splitInputs=function(e){var t={},i={};for(var n in e)isNumber(parseInt(n,10))?t[n]=e[n]:i[n]=e[n];return{arr:t,obj:i}},u.findInputKeyById=function(e,t){var i=null;for(var n in e)if(isNumber(parseInt(n,10))&&e[n].id===t){i=n;break}return i},u.getInputKeyById=function(e,t){var i=u.findInputKeyById(e,t);if(!i)throw new Error("Cannot find input with id: "+t);return i},e.exports=u},K8V9:function(e,t){e.exports=''},K9GE:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.color=t.CubicBezier=t.easingFunc=t.dur=void 0,t.dur=350,t.easingFunc={linear:function(e){return e},easeInQuad:function(e){return e*e},easeOutQuad:function(e){return e*(2-e)},easeInOutQuad:function(e){return e<.5?2*e*e:(4-2*e)*e-1},easeInCubic:function(e){return e*e*e},easeOutCubic:function(e){return--e*e*e+1},easeInOutCubic:function(e){return e<.5?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1},easeInQuart:function(e){return e*e*e*e},easeOutQuart:function(e){return 1- --e*e*e*e},easeInOutQuart:function(e){return e<.5?8*e*e*e*e:1-8*--e*e*e*e},easeInQuint:function(e){return e*e*e*e*e},easeOutQuint:function(e){return 1+--e*e*e*e*e},easeInOutQuint:function(e){return e<.5?16*e*e*e*e*e:1+16*--e*e*e*e*e}};var n=function(){function e(e,t,i,n){this._mX1=e,this._mY1=t,this._mX2=i,this._mY2=n}return e.prototype.easingFunc=function(e){ +return this._mX1===this._mY1&&this._mX2===this._mY2?e:this._calcBezier(this._getTForX(e))},e.prototype._a=function(e,t){return 1-3*t+3*e},e.prototype._b=function(e,t){return 3*t-6*e},e.prototype._c=function(e){return 3*e},e.prototype._calcBezier=function(e){return((this._a(this._mY1,this._mY2)*e+this._b(this._mY1,this._mY2))*e+this._c(this._mY1))*e},e.prototype._getSlope=function(e){return 3*this._a(this._mX1,this._mX2)*e*e+2*this._b(this._mX1,this._mX2)*e+this._c(this._mX1)},e.prototype._getTForX=function(e){for(var t=e,i=0;i<4;++i){var n=this._getSlope(t);if(0===n)return t;t-=(this._calcBezier(t)-e)/n}return t},e}();t.CubicBezier=n,t.color={black0:"#000",black20:"#2b2d36",black25:"#2b2e37",black27:"#2f3241",black30:"#212121",black70:"#4A4A4A",black80:"#535353",black100:"#646464",black110:"#757575",black140:"#8A8A8A",black170:"#ADAEB0",black180:"#b4b4b4",black200:"#C8C8C8",black220:"#DADDE0",black230:"#ECECEC",black240:"#F2F2F2",black248:"#F8F8F8",black255:"#FFF",brand:"#3BB3E4",brandHover:"#3BABD8",brandActive:"#3898C2",brandDown:"#049DDC",brand220:"#3BB3E0",brand255:"#3BB3FF",brandNew:"#37A6EF",brandNew2:"#2196F3",spinner:"#00A2E2",brandMedium80:"#3C4650",brandMedium90:"#465a6e",brandMedium100:"#627384",brandMedium120:"#758696",brandMedium150:"#94959C",brandMedium190:"#9DB2BD",brandMedium220:"#E9EFF2",brandMedium230:"#EAECEF",brandMedium240:"#F1F3F6",brandDark:"#2A2C39",brandDark50:"#252733",brandDark45:"#20222D",brandDarkText:"#6A6B74",danger:"#FF4A68",dangerHover:"#F24965",dangerDown:"#FF173E",success:"#3CBC98",success55:"#37BC9B",success250:"#00FFC0",successHover:"#38B395",successDown:"#00A97F",attention:"#FFC84A",attention50:"#F89E30",growing:"#37bc9b",falling:"#ff4a68"}},KUek:function(e,t,i){"use strict";i.r(t);var n,r,o=i("mrSG"),s=i("Eyy1"),a=i("aIyQ"),l=i.n(a),c=i("k9/m"),u=i("hsV8"),h=i("jy4L"),d=i("w4Ji"),p=i("jenN"),_=i("txPx"),f=Object(_.getLogger)("Chart.StudyDataSource");!function(e){e[e.Undefined=0]="Undefined",e[e.Loading=1]="Loading",e[e.Completed=2]="Completed",e[e.Error=3]="Error"}(n||(n={})),function(e){e[e.Idle=0]="Idle",e[e.AwaitingConnection=1]="AwaitingConnection",e[e.AwaitingParent=2]="AwaitingParent",e[e.AwaitingFirstDataUpdate=3]="AwaitingFirstDataUpdate",e[e.Active=4]="Active"}(r||(r={}));var m=function(){function e(e,t,i,o){this._inputs=null,this._status=r.Idle,this._studyId=null,this._turnaroundCounter=1,this._studyStatus={type:n.Undefined},this._studyStatusChanged=new l.a,this._graphics=new p.LiveStudyGraphics,this._dataCleared=new l.a,this._dataUpdated=new l.a,this._boundOnGatewayIsConnectedChanged=this._onGatewayIsConnectedChanged.bind(this),this._ongoingDataUpdate=Promise.resolve(),this._gateway=e,this._metaInfo=o,this._series=t,this._turnaroundPrefix=i,this._plots=new c.PlotList(Object(d.studyPlotFunctionMap)(o),d.studyEmptyPlotValuePredicate),this._gateway.isConnected().subscribe(this._boundOnGatewayIsConnectedChanged)}return e.prototype.destroy=function(){this.stop(),this._gateway.isConnected().unsubscribe(this._boundOnGatewayIsConnectedChanged),this._dataUpdated.destroy(), +this._dataCleared.destroy(),this._studyStatusChanged.destroy()},e.prototype.metaInfo=function(){return this._metaInfo},e.prototype.inputs=function(){return this._inputs},e.prototype.setInputs=function(e){this._inputs=e,null!==this._studyId&&(this._turnaroundCounter++,this._onStudyStatusChangedTo({type:n.Undefined}),this._gateway.modifyStudy(this._studyId,this._turnaround(),e,this._onMessage.bind(this)),this._status===r.Active&&this._changeStatusTo(r.AwaitingFirstDataUpdate))},e.prototype.isStarted=function(){return this._status!==r.Idle},e.prototype.isActive=function(){return this._status===r.Active},e.prototype.start=function(){this.isStarted()?f.logNormal("start: data source is already started, nothing to do"):(Object(s.assert)(null!==this._inputs,"Inputs should be defined when starting a study data source"),this._gateway.isConnected().value()?this._createStudy():this._changeStatusTo(r.AwaitingConnection))},e.prototype.stop=function(){this.isStarted()?(null!==this._studyId&&(this._gateway.removeStudy(this._studyId),this._studyId=null,this._onStudyStatusChangedTo({type:n.Undefined})),this._changeStatusTo(r.Idle)):f.logNormal("stop: data source is already stopped, nothing to do")},e.prototype.studyId=function(){return this._studyId},e.prototype.studyStatus=function(){return this._studyStatus},e.prototype.studyStatusChanged=function(){return this._studyStatusChanged},e.prototype.plots=function(){return this._plots},e.prototype.graphics=function(){return this._graphics},e.prototype.clearData=function(){this._plots.clear(),this._graphics.clear(),this._dataCleared.fire()},e.prototype.stopAndStealData=function(){Object(s.assert)(this._status===r.Active,"Couldn't steal data from non-active data source"),this.stop();var e=this._plots,t=this._graphics.extract();return this._plots=new c.PlotList(Object(d.studyPlotFunctionMap)(this._metaInfo),d.studyEmptyPlotValuePredicate),{plots:e,graphics:t}},e.prototype.dataCleared=function(){return this._dataCleared},e.prototype.dataUpdated=function(){return this._dataUpdated},e.prototype._changeStatusTo=function(e){Object(s.assert)(this._status!==e,"Source and destination status should be distinct"),f.logNormal("Status changed from "+r[this._status]+" to "+r[e]),this._status=e},e.prototype._createStudy=function(){var e=this._series.seriesId();null!=e?this._createStudyUsingParentId(e):(this._changeStatusTo(r.AwaitingParent),this._series.dataEvents().completed().subscribe(this,this._onSeriesCompleted,!0))},e.prototype._createStudyUsingParentId=function(e){Object(s.assert)(this._status!==r.Active,'Status should not be "Active" when creating a study'),Object(s.assert)(this._studyStatus.type===n.Undefined,'Study status should be "Undefined" when creating a study'),Object(s.assert)(null===this._studyId,"Study id should be empty when creating a study"),this._studyId=Object(h.makeNextStudyId)(),this._gateway.createStudy(this._studyId,this._turnaround(),e,this._metaInfo.fullId+"!",Object(s.ensureNotNull)(this._inputs),this._onMessage.bind(this)),this._changeStatusTo(r.AwaitingFirstDataUpdate)}, +e.prototype._onGatewayIsConnectedChanged=function(e){e?this._onGatewayConnected():this._onGatewayDisconnected()},e.prototype._onGatewayConnected=function(){this._status===r.AwaitingConnection&&this._createStudy()},e.prototype._onGatewayDisconnected=function(){this._status!==r.Idle&&this._status!==r.AwaitingConnection&&(this._studyId=null,this._changeStatusTo(r.AwaitingConnection),this._studyStatus.type!==n.Undefined&&this._onStudyStatusChangedTo({type:n.Undefined})),this._turnaroundCounter=1},e.prototype._onSeriesCompleted=function(){this._status===r.AwaitingParent&&this._createStudyUsingParentId(Object(s.ensure)(this._series.seriesId()))},e.prototype._onStudyStatusChangedTo=function(e){var t=this._studyStatus;this._studyStatus=e,f.logNormal("Study status type changed from "+n[t.type]+" to "+n[e.type]),this._studyStatusChanged.fire(t,e)},e.prototype._onMessage=function(e){if("data_update"===e.method){var t=e.params,i=t.customId,n=t.turnaround,r=t.plots,o=t.nonseries;i===this._studyId&&this._checkTurnaround(n)&&this._onDataUpdate(r,o)}else if("study_loading"===e.method){var s=e.params,a=(i=s[0],n=s[1],s[2]);i===this._studyId&&this._checkTurnaround(n)&&this._onStudyLoading(a)}else if("study_completed"===e.method){var l=e.params;i=l[0],n=l[1],a=l[2];i===this._studyId&&this._checkTurnaround(n)&&this._onStudyCompleted(a)}else if("study_error"===e.method){var c=e.params,u=(i=c[0],n=c[1],c[2]),h=c[3];a=c[4];i===this._studyId&&this._checkTurnaround(n)&&this._onStudyError(u,h,a)}},e.prototype._onDataUpdate=function(e,t){var i=Object(u.unpackNonSeriesData)(t.d);return this._ongoingDataUpdate=this._ongoingDataUpdate.then((function(){return i}),(function(){return i})).then(this._onDataUnpacked.bind(this,e,t.indexes)),this._ongoingDataUpdate},e.prototype._onDataUnpacked=function(e,t,i){this._status!==r.Idle&&(this._status===r.AwaitingFirstDataUpdate&&(this._changeStatusTo(r.Active),this.clearData()),this._mergePlots(e),null!==i&&(i.indexes_replace?(Object(s.assert)("nochange"!==t),this._graphics.replaceIndexesTo(t)):("nochange"!==t&&this._graphics.replaceIndexesTo(t),void 0!==i.graphicsCmds&&this._graphics.processCommands(i.graphicsCmds,this._metaInfo.graphics))),this._dataUpdated.fire(e,i,t))},e.prototype._onStudyLoading=function(e){this._onStudyStatusChangedTo({type:n.Loading,startTime:Date.now()})},e.prototype._onStudyError=function(e,t,i){this.clearData(),this._onStudyStatusChangedTo({type:n.Error,reason:e})},e.prototype._onStudyCompleted=function(e){this._onStudyStatusChangedTo({type:n.Completed})},e.prototype._mergePlots=function(e){this._plots.merge(e)},e.prototype._turnaround=function(){return""+this._turnaroundPrefix+this._turnaroundCounter},e.prototype._checkTurnaround=function(e){var t=this._turnaround();return e===t||e===this._series.turnaround()||e===this._series.turnaround()+"_"+t},e}(),v=i("kcTO"),y=i("Ocx9"),g=i("Kxc7");i.d(t,"sessionsPreferencesDefault",(function(){return S})),i.d(t,"Sessions",(function(){return w}));var b=new v.PriceFormatter,S={graphics:{backgrounds:{outOfSession:{color:"#2196F3", +transparency:92,visible:!1},preMarket:{color:"#FF9800",transparency:92,visible:!1},postMarket:{color:"#2196F3",transparency:92,visible:!1}},vertlines:{sessBreaks:{color:"#4985e7",style:2,visible:!1,width:1}}}},w=function(){function e(e,t){var i=this;this._studySource=null,this._paneViews=[],this._metaInfo=null,this._destroyed=!1,this._isStarted=!1,this._loadedGraphics=null,this._model=e,this._doubleClickHandler=t;var n=e.mainSeries();this._properties=new y.DefaultProperty("sessions"),this._removeDuplicateProperties(),this._properties.subscribe(this,this._onPropertiesChanged),e.studyMetaInfoRepository().findById({type:"java",studyId:"Sessions@tv-basicstudies"}).then((function(t){i._destroyed||null===i._loadedGraphics&&(i._setMetaInfo(t),null!==i._metaInfo&&(i._studySource=new m(e.chartApi(),n,"sessions_",i._metaInfo),i._createPaneViews(),i._studySource.dataCleared().subscribe(i,i.updateAllViews),i._studySource.dataUpdated().subscribe(i,i.updateAllViews),i._studySource.setInputs({}),i._processHibernate()))})),e.timeScale().onReset().subscribe(this,this._clearData),e.timeScale().logicalRangeChanged().subscribe(this,this.updateAllViews),e.mainSeries().properties().extendedHours.subscribe(this,this._updateVisibleOfPreAndPostMarketBackground),e.mainSeries().properties().interval.subscribe(this,this._processHibernate),this._updateVisibleOfPreAndPostMarketBackground(e.mainSeries().properties().extendedHours)}return e.prototype.start=function(){this._isStarted=!0,this._processHibernate()},e.prototype.restart=function(){this._clearData(),g.enabled("stop_study_on_restart")&&this.stop(),this.start()},e.prototype.isStarted=function(){return this._isStarted},e.prototype.stop=function(){this._isStarted=!1,null!==this._studySource&&this._studySource.stop()},e.prototype.paneViews=function(e){return this._paneViews},e.prototype.labelPaneViews=function(e){return[]},e.prototype.priceAxisViews=function(e,t){return[]},e.prototype.updateAllViews=function(){this._paneViews.forEach((function(e){return e.update()}))},e.prototype.destroy=function(){this._destroyed=!0,null!==this._studySource&&(this._studySource.dataCleared().unsubscribe(this,this.updateAllViews),this._studySource.dataUpdated().unsubscribe(this,this.updateAllViews),this._studySource.destroy(),this._studySource=null),this._model.timeScale().logicalRangeChanged().unsubscribe(this,this.updateAllViews),this._model.timeScale().onReset().unsubscribe(this,this._clearData),this._model.mainSeries().properties().extendedHours.unsubscribe(this,this._updateVisibleOfPreAndPostMarketBackground),this._model.mainSeries().properties().interval.unsubscribe(this,this._processHibernate),this._properties.unsubscribe(this,this._onPropertiesChanged)},e.prototype.series=function(){return this._model.mainSeries()},e.prototype.priceScale=function(){return this.series().priceScale()},e.prototype.graphics=function(){return this._loadedGraphics||Object(s.ensureNotNull)(this._studySource).graphics()},e.prototype.properties=function(){return this._properties},e.prototype.graphicsInfo=function(){ +return Object(s.ensureNotNull)(this._metaInfo).graphics},e.prototype.firstValue=function(e){return this._model.mainSeries().firstValue()},e.prototype.formatter=function(){return b},e.prototype.state=function(e){var t={properties:this._properties.state()};return e&&null!==this._metaInfo&&(t.data={graphics:Object(p.saveStudyGraphics)(this.graphics()),metaInfo:this._metaInfo}),t},e.prototype.restoreState=function(e,t){var i=e.properties;this._migrateOutOfSessionProperty(i),this._properties.mergeAndFire(i),this._removeDuplicateProperties(),this._updateVisibleOfPreAndPostMarketBackground(this._model.mainSeries().properties().extendedHours),void 0!==e.data&&t&&(this._loadStudyGraphics(e.data.graphics),this._setMetaInfo(e.data.metaInfo),this._createPaneViews())},e.prototype.restoreOldState=function(e,t){var i={properties:{graphics:e.state.graphics}};void 0!==e.data&&void 0!==e.metaInfo&&t&&(i.data={metaInfo:e.metaInfo,graphics:e.data.graphics}),this.restoreState(i,t)},e.prototype.applyPreferences=function(e){this._properties.mergePreferences(e)},e.prototype.metaInfo=function(){return Object(s.ensureNotNull)(this._metaInfo)},e.prototype._loadStudyGraphics=function(e){var t=e.backgrounds;if(void 0!==t){var i=t.findIndex((function(e){return"inSession"===e.styleId}));-1!==i&&t.splice(i,1)}this._loadedGraphics=Object(p.loadStudyGraphics)(e)},e.prototype._setMetaInfo=function(e){var t=e.graphics.backgrounds;void 0!==t&&void 0!==t.inSession&&delete t.inSession,this._metaInfo=e},e.prototype._updateVisibleOfPreAndPostMarketBackground=function(e){var t=e.value();this._outOfSessionVisibilityProperty().setValue(t),this._preMarketVisibilityProperty().setValue(t),this._postMarketVisibilityProperty().setValue(t)},e.prototype._clearData=function(){null!==this._studySource&&this._studySource.clearData()},e.prototype._createPaneViews=function(){var e=this,t={doubleClickHandler:this._doubleClickHandler};Object(p.createGraphicsPaneViews)(this,this._model,t).then((function(t){e._paneViews=t,e._model.lightUpdate()}))},e.prototype._onPropertiesChanged=function(){this._processHibernate(),this.updateAllViews()},e.prototype._processHibernate=function(){if(null!==this._studySource){var e=this._canBeHibernated(),t=this._isHibernated(),i=this._studySource.isStarted();!t&&e&&i?this._studySource.stop():!t||e||i||this._studySource.start()}},e.prototype._canBeHibernated=function(){var e=this._model.mainSeries(),t=this._preMarketVisibilityProperty().value()&&this._postMarketVisibilityProperty().value()&&this._outOfSessionVisibilityProperty().value();return e.isDWM()||!t&&!this._vertLinesVisibleProperty().value()},e.prototype._isHibernated=function(){return this._isStarted&&(null===this._studySource||!this._studySource.isStarted())},e.prototype._outOfSessionVisibilityProperty=function(){return this._properties.childs().graphics.childs().backgrounds.childs().outOfSession.childs().visible},e.prototype._preMarketVisibilityProperty=function(){return this._properties.childs().graphics.childs().backgrounds.childs().preMarket.childs().visible}, +e.prototype._postMarketVisibilityProperty=function(){return this._properties.childs().graphics.childs().backgrounds.childs().postMarket.childs().visible},e.prototype._vertLinesVisibleProperty=function(){return this._properties.childs().graphics.childs().vertlines.childs().sessBreaks.childs().visible},e.prototype._removeDuplicateProperties=function(){this._properties.hasChild("properties")&&(this._properties.removeProperty("properties"),Object(y.saveDefaultProperties)(!0),this._properties.childChanged("",null),Object(y.saveDefaultProperties)(!1))},e.prototype._migrateOutOfSessionProperty=function(e){var t=e.graphics.backgrounds,i=t.outOfSession;i.color===S.graphics.backgrounds.outOfSession.color||"postMarket"in t||(e.graphics.backgrounds=Object(o.__assign)(Object(o.__assign)({},t),{postMarket:{color:i.color,transparency:i.transparency,visible:i.visible},preMarket:{color:i.color,transparency:i.transparency,visible:i.visible}}))},e}()},KcY8:function(e,t,i){"use strict";var n=i("mrSG"),r=i("aO4+"),o=i("f6yo"),s=i("VaSN"),a=i("Tmoa"),l=i("Ialn"),c=i("8Uy/"),u=i("jFln"),h=i("ikwP"),d=i("VdBB"),p=function(){function e(e,t){this.setData(e,t)}return e.prototype.setData=function(e,t){this._data=Object(n.__assign)({},e),this._commonData=Object(n.__assign)({},t)},e.prototype.draw=function(e,t,i,n,r,o){if(this._data.visible){e.font=t.font;var s,d=Math.floor((this._data.tickVisible?t.tickLength:0)*o),p=Math.floor((this._data.borderVisible?t.borderSize:0)*o),_=Math.floor(t.paddingTop*o),f=Math.floor(t.paddingBottom*o),m=Math.floor(t.paddingInner*o),v=Math.floor(t.paddingOuter*o),y=this._data.text,g=Math.round(t.baselineOffset*o),b=void 0!==this._data.labelIcon,S=Math.max(1,Math.floor(o)),w=Math.floor(t.fontSize*o)+_+f;if(w%2!=S%2&&(w+=1),b)s=w;else{var P=Math.ceil(i.measureText(e,y));s=Math.round(P*o)+d+p+m+v}var C=this._commonData.coordinate;this._commonData.fixedCoordinate&&(C=this._commonData.fixedCoordinate);var x,T,I="right"===r,M=this._getOffsetScaled(I,n,o),L=Math.ceil(n*o),O=I?L:0,k=O;e.fillStyle=Object(a.resetTransparency)(this._commonData.background),e.lineWidth=1,Object(u.setLineStyle)(e,c.LINESTYLE_SOLID),e.lineCap="butt";var A=Math.round(C*o)-Math.floor(.5*o),E=Math.floor(A+S/2-w/2),V=E+w;if(y||b){if(I?(x=O-d,T=(k=O-s)+v):(k=O+s,x=O+d,T=O+p+d+m),O+=M,k+=M,x+=M,e.beginPath(),e.moveTo(O,E),e.lineTo(k,E),e.lineTo(k,V),e.lineTo(O,V),e.fill(),0!==M&&this._data.fillOffset){e.fillStyle=t.paneBackgroundColor;var D=I?Math.ceil(n*o)+1:0;e.beginPath(),e.moveTo(O,E),e.lineTo(D,E),e.lineTo(D,V),e.lineTo(O,V),e.fill()}if(b){switch(this._data.labelIcon){case 0:this._drawPlusIcon(e,O,k,E,A,V,S)}return}this._data.tickVisible&&(e.fillStyle=this._commonData.color,e.fillRect(O,A,x-O,S)),e.textAlign="left",e.fillStyle=this._commonData.color,Object(h.drawScaled)(e,o,(function(){e.fillText(y,(T+M)/o,(V-f-g)/o)}))}if(this._data.secondLine){var B=Math.ceil(i.measureText(e,this._data.secondLine)*o)+m+v;e.fillStyle=Object(a.resetTransparency)(this._commonData.background),this._data.text&&(E+=w+S,V+=w+S),I?(O=(k=Math.min(k,L-B))+B, +T=k+v):(k=(O=Math.max(k-B,p))+B,T=O+m),O+=M,k+=M,e.beginPath(),e.moveTo(O,E),e.lineTo(k,E),e.lineTo(k,V),e.lineTo(O,V),e.fill(),e.textAlign="left",e.fillStyle=this._commonData.color;var R=this._data.secondLine;Object(h.drawScaled)(e,o,(function(){e.fillText(Object(l.startWithLTR)(R),(T+M)/o,(V-f-g)/o)}))}}},e.prototype.height=function(e,t){if(!this._data.visible)return 0;var i=e.fontSize+e.paddingTop+e.paddingBottom;return this._data.secondLine&&t?2*i+1:i},e.prototype.hitTest=function(e){var t=this._data.hitTestData;if(void 0===t)return null;var i=this._data.offset,n=Object(s.lastEventIsTouch)()?10:0,a=Object(r.box)(new r.Point(t.xl+i-n,t.y-n),new r.Point(t.xl+i+t.containerWidth+n,t.y+t.containerHeight+n)),l=t.left&&Object(o.pointInBox)(e,a),c=Object(r.box)(new r.Point(t.xr-i-n,t.y-n),new r.Point(t.xr-i+t.containerWidth+n,t.y+t.containerHeight+n)),u=t.right&&Object(o.pointInBox)(e,c);if(l||u){var h=l?"left":"right";return new d.HitTestResult(d.HitTestResult.CUSTOM,{clickHandler:void 0===t.clickHandler?void 0:t.clickHandler.bind(this,e,h),tapHandler:void 0===t.clickHandler?void 0:t.clickHandler.bind(this,e,h),tooltip:t.tooltip})}return null},e.prototype._getOffsetScaled=function(e,t,i){var n=e?-1:1,r=0===this._data.offset?0:n*this._data.offset,o=0===r?0:n*Math.max(1,Math.round(Math.abs(r)*i));return e&&t*i%1!=0&&(o=n*(Math.abs(o)+1)),o},e.prototype._drawPlusIcon=function(e,t,i,n,r,o,s){e.fillStyle=this._commonData.color;var a=Math.abs(t-i),l=Math.round(.5*a);l%2!=s%2&&(l+=1);var c=Math.floor((a-l)/2),u=Math.min(t,i),h=u+Math.floor(a/2-s/2);e.fillRect(u+c,r,l,s),e.fillRect(h,n+c,s,l)},e}();i.d(t,"a",(function(){return _}));var _=function(){function e(e){this._commonRendererData={coordinate:0,color:"#FFF",background:"#000"},this._axisRendererData={text:"",visible:!1,tickVisible:!0,borderVisible:!0,offset:0},this._paneRendererData={text:"",visible:!1,tickVisible:!1,borderVisible:!1,offset:1,fillOffset:!0},this._invalidated=!0,this._axisRenderer=new(e||p)(this._axisRendererData,this._commonRendererData),this._paneRenderer=new(e||p)(this._paneRendererData,this._commonRendererData)}return e.prototype.text=function(){return this._axisRendererData.text},e.prototype.secondLineText=function(){return this._axisRendererData.secondLine},e.prototype.background=function(){return this._commonRendererData.background},e.prototype.color=function(){return this.generateTextColor(this.background())},e.prototype.generateTextColor=function(e){return Object(a.colorFromBackground)(e)},e.prototype.coordinate=function(){return this._updateRendererDataIfNeeded(),this._commonRendererData.coordinate},e.prototype.floatCoordinate=function(){return this._updateRendererDataIfNeeded(),this._commonRendererData.floatCoordinate||this._commonRendererData.coordinate},e.prototype.update=function(){this._invalidated=!0},e.prototype.height=function(e,t){return void 0===t&&(t=!1),Math.max(this._axisRenderer.height(e,t),this._paneRenderer.height(e,t))},e.prototype.getFixedCoordinate=function(){return this._commonRendererData.fixedCoordinate||0}, +e.prototype.setFixedCoordinate=function(e){this._commonRendererData.fixedCoordinate=e},e.prototype.isVisible=function(){return this._updateRendererDataIfNeeded(),this._axisRendererData.visible||this._paneRendererData.visible},e.prototype.isAxisLabelVisible=function(){return this._updateRendererDataIfNeeded(),this._axisRendererData.visible},e.prototype.isPaneLabelVisible=function(){return this._updateRendererDataIfNeeded(),this._paneRendererData.visible},e.prototype.renderer=function(){return this._updateRendererDataIfNeeded(),this._axisRenderer.setData(this._axisRendererData,this._commonRendererData),this._paneRenderer.setData(this._paneRendererData,this._commonRendererData),this._axisRenderer},e.prototype.paneRenderer=function(){return this._updateRendererDataIfNeeded(),this._axisRenderer.setData(this._axisRendererData,this._commonRendererData),this._paneRenderer.setData(this._paneRendererData,this._commonRendererData),this._paneRenderer},e.prototype.setPaneRendererLabelIcon=function(e){this._paneRendererData.labelIcon=e},e.prototype.setPaneLabelVisible=function(e){this._paneRendererData.visible=e,this._invalidated=!0},e.prototype._updateRendererDataIfNeeded=function(){this._invalidated&&(this._updateRendererData(this._axisRendererData,this._paneRendererData,this._commonRendererData),this._invalidated=!1)},e}()},Kmdw:function(e,t,i){"use strict";i.r(t),i.d(t,"PaneRendererArrowUp",(function(){return l})),i.d(t,"PaneRendererArrowDown",(function(){return c}));var n=i("mrSG"),r=i("2WC2"),o=i("aO4+"),s=i("Hr11"),a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._sign=0,t._thinArrow=!1,t._thinArrowLineWidth=0,t._headHeight=0,t._arrowWidth=0,t}return Object(n.__extends)(t,e),t.prototype.setData=function(e,t){this._setBaseData(e,t)},t.prototype._drawItemShape=function(e,t,i){var n=t.pixelRatio,r=this._lineWidth(t)%2?.5:0,o=this._sign,a=this._arrowWidth,l=this._headHeight,c=Math.abs(i.height),u=Math.round(i.x*n)+r,h=i.vertOffset,d=Math.round((i.y+h+o*c/2)*n)+r,p=Object(s.ceiledEven)(a*n),_=p/2,f=Math.round(c*n),m=Math.round(l*n);e.translate(u,d),this._thinArrow?(e.moveTo(0,0),e.lineTo(-_,-_*o),e.moveTo(0,0),e.lineTo(_,-_*o),e.moveTo(0,0),e.lineTo(0,-f*o),e.moveTo(-_,-f*o),e.lineTo(_,-f*o)):(e.moveTo(0,0),f0&&(this._kind=e,this._multiplier=t)}return e.prototype.kind=function(){return this._kind},e.prototype.multiplier=function(){return this._multiplier},e.prototype.isValid=function(){return this.kind()!==n.Invalid&&this.multiplier()>0},e.prototype.isDWM=function(){return this.isValid()&&!this.isRange()&&!this.isIntraday()},e.prototype.isIntraday=function(){var e=c.has(this.kind());return this.isValid()&&!this.isRange()&&e},e.prototype.isSeconds=function(){return this.kind()===n.Seconds},e.prototype.isMinutes=function(){return this.kind()===n.Minutes},e.prototype.isMinuteHours=function(){return this.kind()===n.Minutes&&d(this.multiplier())},e.prototype.isDays=function(){return this.kind()===n.Days},e.prototype.isWeeks=function(){return this.kind()===n.Weeks},e.prototype.isMonths=function(){return this.kind()===n.Months},e.prototype.isRange=function(){return this.kind()===n.Range},e.prototype.isTimeBased=function(){return!this.isRange()},e.prototype.letter=function(){return this.isValid()&&this.kind()!==n.Minutes?this.kind()[0].toUpperCase():""},e.prototype.value=function(){return this.isValid()?this.kind()===n.Minutes?this.multiplier()+"":this.multiplier()+this.letter():""},e.prototype.isEqualTo=function(t){if(!(t instanceof e))throw new Error("Argument is not an Interval");return!(!this.isValid()||!t.isValid())&&(this.kind()===t.kind()&&this.multiplier()===t.multiplier())},e.prototype.inMilliseconds=function(e){if(void 0===e&&(e=Date.now()),!this.isValid()||this.isRange())return NaN;if(this.isMonths()){var t=new Date(e);return t.setUTCMonth(t.getUTCMonth()+(this.multiplier()||1)),+t-e}var i=this.multiplier();return a[this.kind()]*i},e.isEqual=function(t,i){return e.parse(t).isEqualTo(e.parse(i))},e.parse=function(t){t=(t+"").toUpperCase().split(",")[0];var i=o.exec(t);return null!==i?"H"===i[2]?new e(n.Minutes,60*h(i[1])):new e(l[i[2]],h(i[1])):null!==(i=s.exec(t))?new e(n.Minutes,h(i[1])):new e(n.Invalid,0)},e.kind=function(t){return e.parse(t).kind()},e.isValid=function(t){return e.parse(t).isValid()},e.isDWM=function(t){return e.parse(t).isDWM()},e.isIntraday=function(t){return e.parse(t).isIntraday()},e.isSeconds=function(t){return e.parse(t).isSeconds()},e.isMinutes=function(t){return e.parse(t).isMinutes()},e.isMinuteHours=function(t){return e.parse(t).isMinuteHours()},e.isDays=function(t){return e.parse(t).isDays()},e.isWeeks=function(t){return e.parse(t).isWeeks()},e.isMonths=function(t){return e.parse(t).isMonths()},e.isRange=function(t){return e.parse(t).isRange()},e.isTimeBased=function(t){return e.parse(t).isTimeBased()},e.normalize=function(t){var i=e.parse(t);return i.isValid()?i.value():null},e}();function h(e){return 0===e.length?1:parseInt(e,10)}function d(e){return e>=60&&!(e%60)}},"M7/j":function(e,t,i){"use strict";i.r(t),i.d(t,"itemsRangeIsValid",(function(){return h})),i.d(t,"splitItems",(function(){return d})),i.d(t,"PaneRendererBaseline",(function(){return p})) +;var n=i("mrSG"),r=i("aO4+"),o=i("hBTJ"),s=i("GEp6"),a=i("Zp/P"),l=i("Y7w9"),c=i("cPgM"),u=i("VdBB");function h(e){if(0===e.length)return!1;var t=e.findIndex((function(e){return Object(a.coordinateIsValid)(e.y)}));if(-1===t)return!1;for(var i=e.length-1;i>t&&!Object(a.coordinateIsValid)(e[i].y);)i--;return!(t>=i)}function d(e,t){for(var i=[],n=[],s=null,l=0;l=t&&n.push(c),s=c;else{if(null===s)continue;c=s}if(Object(a.coordinateIsValid)(u.y)&&(c.y>t&&u.yt))if(Math.abs(c.x-u.x)<1){var h=new r.Point(c.x,t);i.push(h),n.push(h)}else{var d=Object(o.intersectLineSegments)(c,u,new r.Point(c.x,t),new r.Point(u.x,t));if(null!==d){h=c.add(u.subtract(c).scaled(d));i.push(h),n.push(h)}}}return{topItems:i,bottomItems:n}}var p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._data=null,t}return Object(n.__extends)(t,e),t.prototype.setData=function(e){this._data=e},t.prototype.hitTest=function(e){if(null===this._data)return null;for(var t=this._data,i=t.items,n=t.topLineWidth,o=t.bottomLineWidth,c=Object(a.selectionTolerance)((n+o)/2),h=Object(l.lowerbound)(i,e,(function(e,t){return e.x<=t.x})),d=Math.max(1,h-1),p=Math.min(i.length-1,h+1),_=d;_<=p;++_){var f=i[_-1],m=i[_];if(Object(s.distanceToSegment)(new r.Point(f.x,f.y),new r.Point(m.x,m.y),new r.Point(e.x,e.y)).distance<=c)return new u.HitTestResult(u.HitTestResult.REGULAR)}return null},t.prototype._drawImpl=function(e){if(null!==this._data){var t=this._data,i=t.items,n=t.baseLevelCoordinate,r=t.bottom,o=t.bottomFillColor1,s=t.bottomFillColor2,a=t.topFillColor1,l=t.topFillColor2,c=t.topLineColor,u=t.bottomLineColor,p=t.topLineWidth,_=t.bottomLineWidth;if(h(i)){var f=d(i,n),m=f.topItems,v=f.bottomItems;e.lineCap="round",e.lineJoin="round",e.translate(.5,.5),0!==m.length&&(e.beginPath(),e.moveTo(m[0].x,n),this._makeLine(e,m,!0,0),e.closePath(),e.fillStyle=this._makeLinearGradient(e,a,l,n-r,n),e.fill(),e.beginPath(),this._makeLine(e,m,!1,0),e.lineWidth=p,e.strokeStyle=c,e.stroke()),0!==v.length&&(e.beginPath(),e.moveTo(v[0].x,n),this._makeLine(e,v,!0,1),e.closePath(),e.fillStyle=this._makeLinearGradient(e,o,s,n,n+r),e.fill(),e.beginPath(),this._makeLine(e,v,!1,1),e.lineWidth=_,e.strokeStyle=u,e.stroke())}}},t.prototype._makeLine=function(e,t,i,n){if(null!==this._data){var r=t.findIndex((function(e){return Object(a.coordinateIsValid)(e.y)}));if(-1!==r)for(var o,s=this._data,l=s.barSpacing,c=s.baseLevelCoordinate,u=.25*l,h=t.length,d=r;d=c&&p.y>=c){e.moveTo(p.x,p.y);continue}}else if(o&&o.y<=c&&p.y<=c){e.moveTo(p.x,p.y);continue}if(o&&Object(a.coordinateIsValid)(o.y))e.lineTo(p.x,p.y),i&&!Object(a.coordinateIsValid)(_.y)&&e.lineTo(p.x,c);else if(_&&Object(a.coordinateIsValid)(_.y))i?(d!==r&&e.lineTo(p.x,c),e.lineTo(p.x,p.y)):e.moveTo(p.x,p.y);else if(i){if(0===d)continue;d!==r&&e.lineTo(p.x-u,c),e.lineTo(p.x-u,p.y),e.lineTo(p.x+u,p.y),e.lineTo(p.x+u,c) +}else e.moveTo(p.x-u,p.y),e.lineTo(p.x+u,p.y);o=p}}}},t.prototype._makeLinearGradient=function(e,t,i,n,r){var o=e.createLinearGradient(0,n,0,r);return o.addColorStop(0,t),o.addColorStop(1,i),o},t}(c.ScaledPaneRenderer)},MA5A:function(e,t,i){"use strict";i.r(t),i.d(t,"LineToolCrossLine",(function(){return c}));var n=i("mrSG"),r=i("Ocx9"),o=i("p1SQ"),s=i("GmZZ"),a=i("Ss5c"),l=window.t("Cross Line"),c=function(e){function t(n,r){var a=e.call(this,n,r||t.createProperties())||this;return a._priceAxisView=new o.LineToolHorzLinePriceAxisView(a),a._timeAxisView=new s.LineToolVertLineTimeAxisView(a),i.e("lt-pane-views").then(function(e){var t=i("amUF").CrossLinePaneView;a._setPaneViews([new t(a,a._model)])}.bind(null,i)).catch(void 0),a}return Object(n.__extends)(t,e),t.prototype.pointsCount=function(){return 1},t.prototype.translatedType=function(){return l},t.prototype.name=function(){return"Cross Line"},t.prototype.priceAxisViews=function(e,t){return this.isSourceHidden()?null:t===this.priceScale()&&this.properties().showPrice.value()&&this._model.paneForSource(this)===e?[this._priceAxisView]:null},t.prototype.timeAxisViews=function(){return this.isSourceHidden()?null:this.properties().showTime.value()?[this._timeAxisView]:null},t.prototype.updateAllViews=function(){e.prototype.updateAllViews.call(this),this._priceAxisView.update(),this._timeAxisView.update()},t.prototype.canHasAlert=function(){return!1},t.prototype.lineColor=function(){return this.properties().linecolor.value()},t.prototype.lineWidth=function(){return this.properties().linewidth.value()},t.prototype.lineStyle=function(){return this.properties().linestyle.value()},t.createProperties=function(e){var i=new r.DefaultProperty("linetoolcrossline",e);return t._configureProperties(i),i},t.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(i.bind(null,"xrdl")).then((function(e){return e.CrossLineDefinitionsViewModel}))},t._configureProperties=function(e){a.LineDataSource._configureProperties(e)},t}(a.LineDataSource)},MROS:function(e,t,i){"use strict";i.r(t),i.d(t,"ModelSelection",(function(){return o}));var n=i("Y7w9"),r=i("CW80"),o=function(){function e(){this._items=[],this._set=new Set}return e.prototype.isEmpty=function(){return 0===this._items.length},e.prototype.add=function(e){this._items.length>0&&!Object(r.isLineTool)(this._items[0])&&this.clear(),Object(r.isLineTool)(e)||this.clear();var t=Object(n.lowerbound)(this._items,e,(function(e,t){return e.zorder()i&&this._priceScaleIsPrice(e.rightPriceScales()[i],t))return e.rightPriceScales()[i];if(e.leftPriceScales().length>i&&this._priceScaleIsPrice(e.leftPriceScales()[i],t))return e.leftPriceScales()[i]}return null},e.prototype._targetPriceScaleIndex=function(e,t){if(e.mainSource()===t.mainSeries())return 0},e.prototype._tryToGetDesiredPriceScale=function(e,t,i,n){switch(i){case"left":return this.canCreateNewPriceScale(e)?e.createPriceScaleAtPosition("left"):e.createPriceScaleAtPosition("overlay");case"right":return this.canCreateNewPriceScale(e)?e.createPriceScaleAtPosition("right"):e.createPriceScaleAtPosition("overlay");case"as-series": +return void 0!==n?Object(r.ensureNotNull)(n.priceScale()):e.isMainPane()?Object(r.ensureNotNull)(Object(r.ensureNotNull)(e.mainDataSource()).priceScale()):this.createNewPriceScaleIfPossible(e);case"overlay":return e.createPriceScaleAtPosition("overlay")}},e}(),a=function(e){function t(t){return e.call(this,t)||this}return Object(n.__extends)(t,e),t.prototype.apply=function(e){if(e.containsMainSeries()){var t=Object(r.ensureNotNull)(Object(r.ensureNotNull)(e.mainDataSource()).priceScale());e.movePriceScale(t,"right",0)}for(var i=e.model();e.leftPriceScales().length>e.rightPriceScales().length;){t=e.leftPriceScales()[e.leftPriceScales().length-1];e.movePriceScale(t,"right",this._targetPriceScaleIndex(t,i))}for(;e.rightPriceScales().length-e.leftPriceScales().length>1;){t=e.rightPriceScales()[e.rightPriceScales().length-1];e.movePriceScale(t,"left",this._targetPriceScaleIndex(t,i))}},t.prototype.createNewPriceScaleIfPossible=function(e){if(!this.canCreateNewPriceScale(e))return e.createPriceScaleAtPosition("overlay");var t=e.leftPriceScales().length=0;--a)if(Math.floor(o/r[a].divisor)!==Math.floor(s/r[a].divisor))return r[a].span},TradingView.ChartapiMessagerInstances=[],e.exports=l}).call(this,i("jCNj"))},"N+BX":function(e,t,i){"use strict";var n=i("Ss5c").LineDataSource,r=i("Ocx9").DefaultProperty,o=window.t("Double Curve") +;function s(e,t){this._constructor="LineToolBezierCubic";var r=t||s.createProperties();n.call(this,e,r),i.e("lt-pane-views").then(function(e){var t=i("a6on").BezierCubicPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}inherit(s,n),s.prototype.pointsCount=function(){return 2},s.prototype.translatedType=function(){return o},s.prototype.name=function(){return"Double Curve"},s.prototype.controlPoints=function(){var e=this.pointToScreenPoint(this.points()[0])[0],t=this.pointToScreenPoint(this.points()[1])[0],i=t.subtract(e).scaled(.5).transposed().scaled(.3),n=e.add(t).scaled(.33),r=e.add(t).scaled(.67),o=n.add(i),s=r.subtract(i);return[this.screenPointToPoint(o),this.screenPointToPoint(s)]},s.prototype.setLastPoint=function(e,t){n.prototype.setLastPoint.call(this,e,t),this._controlPoints=this.controlPoints()},s.prototype.addPoint=function(e,t,i){var r=n.prototype.addPoint.call(this,e,t,!0);if(r){var o=this.controlPoints();delete this._controlPoints,this._points.push(o[0]),this._points.push(o[1]),i||(this.normalizePoints(),this.createServerPoints()),this._createPointProperty(2),this._createPointProperty(3)}return r},s.prototype.restorePoints=function(e,t,i){n.prototype.restorePoints.call(this,e,t,i),this._createPointProperty(2),this._createPointProperty(3)},s.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("b4fl").GeneralBezierDefinitionsViewModel}.bind(null,i)).catch(i.oe)},s.createProperties=function(e){var t=new r("linetoolbeziercubic",e);return s._configureProperties(t),t},s._configureProperties=function(e){n._configureProperties(e)},t.LineToolBezierCubic=s},N1UO:function(e,t,i){"use strict";i.r(t),i.d(t,"StudyApi",(function(){return d}));var n=i("mrSG"),r=(i("YFKU"),i("Eyy1")),o=i("9iCb"),s=i("xo8u"),a=i("gaBL"),l=i("HGup"),c=i("jRfx"),u=i("/ToI"),h=i("HZKX"),d=function(){function e(e,t){this._study=e,this._chartWidget=t,this._undoModel=this._chartWidget.model(),this._model=this._undoModel.model()}return e.prototype.isUserEditEnabled=function(){return this._study.userEditEnabled()},e.prototype.setUserEditEnabled=function(e){this._study.setUserEditEnabled(e)},e.prototype.getInputsInfo=function(){return this._study.metaInfo().inputs.map((function(e){return Object(n.__assign)(Object(n.__assign)({},e),{localizedName:void 0!==e.name?window.t(e.name,{context:"input"}):""})}))},e.prototype.getInputValues=function(){var e=this._study.inputs();return Object.keys(e).map((function(t){return{id:t,value:e[t]}}))},e.prototype.setInputValues=function(e){for(var t=this.getInputValues(),i=function(e){void 0!==t.find((function(t){return t.id===e.id}))?n._study.properties().inputs[e.id].setValue(e.value):console.warn('There is no such input: "'+e.id+'"')},n=this,r=0,o=e;r0&&(i.drawImage(a.leftAxis.canvas,l,n),l+=a.leftAxis.canvas.width),i.drawImage(a.canvas,l,n),l+=a.canvas.width,a.rightAxis.contentWidth>0&&i.drawImage(a.rightAxis.canvas,l,n),"pane"===a.type&&(i.fillStyle=e.colors.text,this._drawLegend(a,i,new r.Point(c,h),u)),n+=a.canvas.height}if(void 0!==e.timeAxis){l=0;e.timeAxis.lhsStub.contentWidth>0&&(i.drawImage(e.timeAxis.lhsStub.canvas,l,n),l+=e.timeAxis.lhsStub.canvas.width),i.drawImage(e.timeAxis.canvas,l,n),l+=e.timeAxis.canvas.width,e.timeAxis.rhsStub.contentWidth>0&&i.drawImage(e.timeAxis.rhsStub.canvas,l,n)}i.restore()},e.prototype._drawLegend=function(e,t,i,n){var o=!0,s=Math.ceil(1.4*this._options.fontSize*this._pixelRatio),a=i.x,l=i.y;if(e.mainSeriesText&&l+si}));return{text:(t=t.slice(0,l)).trim(),elided:!0}}(e,d,i-p,this._pixelRatio);if(_.elided&&!s)return null;for(var f=[],m=0,v=0,y=l;v_.text.length)break;f.push(P.text),m+=P.text.length}var b=f.join("").trim().length;m=0;for(var S=0,w=l;Sb)break;P.color&&(e.save(),e.fillStyle=P.color),p+=g(e,new r.Point(p,t.y),P.text,this._pixelRatio),P.color&&e.restore(),m+=P.text.length}return _.elided&&(p+=g(e,new r.Point(p,t.y),"...",this._pixelRatio)),p},e}();function w(e,t){return Object(n.__awaiter)(this,void 0,void 0,(function(){return Object(n.__generator)(this,(function(i){return[2,new S(e,t).getImage()]}))}))}},Ndyb:function(e,t,i){"use strict";i.r(t),i.d(t,"PaneRendererColumns",(function(){return r}));var n=i("VdBB"),r=function(){function e(e){this._data=null,this._precalculatedCache=[],this.setData(e)}return e.prototype.setData=function(e){this._data=e,this._precalculatedCache=[]},e.prototype.draw=function(e,t){if(null!==this._data&&0!==this._data.items.length){var i=t.pixelRatio;this._precalculatedCache.length||this._fillPrecalculatedCache(i);for(var n=Math.max(1,Math.floor(i)),r=Math.round(this._data.histogramBase*i)-Math.floor(n/2),o=r+n,s=this._data.lineColor,a=0;a=i&&l<=r){var c=a.y;if(e.y>=Math.min(c,this._data.histogramBase)&&e.y<=Math.max(c,this._data.histogramBase))return new n.HitTestResult(n.HitTestResult.REGULAR)}}return null},e.prototype._fillPrecalculatedCache=function(e){if(null!==this._data&&0!==this._data.items.length){var t=Math.ceil(this._data.barSpacing*e)<=1?0:Math.max(1,Math.floor(e)),i=Math.round(this._data.barSpacing*e)-t;this._precalculatedCache=new Array(this._data.items.length);for(var n=0;nu.center?u.right=c.left-t-1:c.left=u.right+t+1))}var h=Math.ceil(this._data.barSpacing*e);for(n=0;n0&&h<4)for(n=0;nh&&(c.roundedCenter>c.center?c.right-=1:c.left+=1)}}else this._precalculatedCache=[]},e}()},NhkU:function(e,t,i){"use strict";var n=i("Ss5c").LineDataSource,r=i("5rJj"),o=i("ytGH").LineToolWidthsProperty,s=window.t("Pitchfan");function a(e,t){var r=t||a.createProperties();n.call(this,e,r),i.e("lt-pane-views").then(function(e){var t=i("l5Au").PitchfanLinePaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe);for(var s=[this._properties.child("median").child("linewidth")],l=0;l<=a.LevelsCount;l++)s.push(this._properties.child("level"+l).child("linewidth"));this._widthsProperty=new o(s)}inherit(a,n),a.LevelsCount=8,a.prototype.levelsCount=function(){return a.LevelsCount},a.prototype.pointsCount=function(){return 3},a.prototype.translatedType=function(){return s},a.prototype.name=function(){return"Pitchfan"},a.prototype.processErase=function(e,t){var i="level"+t,n=this.properties()[i].visible;e.setProperty(n,!1,"Erase level line")},a.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("D+Nk").PitchBaseDefinitionsViewModel}.bind(null,i)).catch(i.oe)},a.createProperties=function(e){var t=new r("linetoolpitchfan",e,!1,{range:[0,8]});return a._configureProperties(t),t},a._configureProperties=function(e){n._configureProperties(e)},t.LineToolPitchfan=a},NsVT:function(e,t,i){"use strict";i.r(t);var n=i("hY0g"),r=i.n(n),o=i("HySD");function s(e,t){for(var i=0,n=0,r=t;n0&&t.push({min:o,max:s})}return t.sort((function(e,t){return e.min-t.min||e.max-t.max})),t}function l(e,t){if(e.length!==t.length)return!1;for(var i=e.length;i--;){if(e[i].min!==t[i].min)return!1;if(e[i].max!==t[i].max)return!1}return!0}var c=i("+GxX"),u=i("Kxc7");i.d(t,"ChartPage",(function(){return d}));var h=u.enabled("no_min_chart_width"),d=function(){function e(e){var t=this;this._processVisibility=function(e){var i=e.container.value() +;return t._affectsLayout(e.name)?(i&&i.classList.toggle("js-hidden",!1),!0):(i&&i.classList.toggle("js-hidden",!0),!1)},this._setWidth=function(e,i){var n=i;t._fullscreenArea!==e.name&&(e.availWidth.setValue(i),e.canNegotiate.width&&(n=s(i,e.negotiations.width)));var r=e.container.value();return r&&(r.style.width=n+"px"),e.width.setValue(n),n},this._setHeight=function(e,i){var n=i;t._fullscreenArea!==e.name&&(e.availHeight.setValue(i),e.canNegotiate.height&&(n=s(i,e.negotiations.height)));var r=e.container.value();return r&&(r.style.height=n+"px"),e.height.setValue(n),n};var i=e.container.value();if(!i)throw new Error("bridge.container.value() must be an element");this._container=i,this._availableAreas=["left","tradingpanel","right","top","bottom","center","topleft","extratop"],this._areas={},this._bridge=e,this._width=e.width,this._height=e.height,this._width.subscribe((function(){return t.recalculate()})),this._height.subscribe((function(){return t.recalculate()})),this._bridge.visible.subscribe((function(){return t._updateVisibility()})),this._bridge.fullscreen.subscribe((function(){return t._onParentFullscreenChange()})),this.recalculate()}return e.prototype.allocate=function(e){var t=this,i=e&&e.areaName;if(-1===this._availableAreas.indexOf(i))throw new Error("unknown options.areaName");this.free(i);var n=this._createDOM(i),s={name:i,canNegotiate:{width:"left"===i||"right"===i||"tradingpanel"===i||"topleft"===i,height:"top"===i||"bottom"===i||"topleft"===i||"extratop"===i},negotiations:{width:[],height:[]},remove:function(){for(var e in t._areas)t._areas[e]===s&&t.free(e)},negotiateWidth:function(e){if(s.canNegotiate.width){var i=a(e);l(s.negotiations.width,i)||(s.negotiations.width=i,t.recalculate())}},negotiateHeight:function(e){if(s.canNegotiate.height){var i=a(e);l(s.negotiations.height,i)||(s.negotiations.height=i,t.recalculate())}},requestFullscreen:function(){t._fullscreenArea||("right"!==i&&"center"!==i||(t._fullscreenArea=i),"center"===i&&t._bridge.requestFullscreen(),t._updateFullscreen())},exitFullscreen:function(){i===t._fullscreenArea&&(t._fullscreenArea=void 0,"center"===i&&t._bridge.exitFullscreen(),t._updateFullscreen())},width:new r.a,height:new r.a,availWidth:new r.a,availHeight:new r.a,alive:new r.a(!0),container:new r.a(n),visible:new r.a(!0),fullscreen:new r.a(!0),rdState:new o.ResizerDetacherState};return s.rdState.pushOwner(s),this._areas[i]=s,s.rdState.owner.subscribe((function(e){var n=s.container.value();if(e!==s)n&&(n.innerHTML="",n.parentElement&&n.parentElement.removeChild(n));else{for(var r=null,o=t._availableAreas.indexOf(i);o--;){var a=t._availableAreas[o];if(t._affectsLayout(a)){r=t._areas[a].container.value();break}}n&&(r&&n.parentElement?n.insertAdjacentElement("afterend",r):t._container.appendChild(n))}t.recalculate()}),{callWithLast:!0}),s.rdState.bridge()},e.prototype.free=function(e){var t=this._areas[e];if(t){this._areas[e]=void 0;var i=t.container.value();i&&i.parentElement&&i.parentElement.removeChild(i),t.alive.setValue(!1)}},e.prototype.recalculate=function(){var e={} +;this._recalcSingleRunToken=e;var t=this._areas.topleft,i=this._areas.left,n=this._areas.tradingpanel,r=this._areas.right,o=this._areas.top,s=this._areas.bottom,a=this._areas.center,l=this._areas.extratop,c=this._width.value(),u=this._height.value(),d=0,p=0,_=0,f=0,m=0,v=0,y=0,g=0;(e===this._recalcSingleRunToken&&l&&this._processVisibility(l)&&(g=this._setHeight(l,u),this._setWidth(l,c)),e===this._recalcSingleRunToken&&t&&this._processVisibility(t))&&(y=this._setHeight(t,u),(v=this._setWidth(t,c))&&(v+=4),(I=t.container.value())&&(I.style.top=g+"px"));e===this._recalcSingleRunToken&&i&&this._processVisibility(i)&&((I=i.container.value())&&(I.style.top=y+g+"px"),this._setHeight(i,u-y-g),(_=this._setWidth(i,c))&&(_+=4));if(e===this._recalcSingleRunToken&&n&&this._processVisibility(n)){this._setHeight(n,u);var b=c-_;h||(b-=300),m=this._setWidth(n,b)}if(e===this._recalcSingleRunToken&&r&&this._processVisibility(r)){this._setHeight(r,u-g);b=c-_-m;h||(b-=300),f=this._setWidth(r,b),(I=r.container.value())&&(I.style.top=g+"px")}var S=m+f,w=S?4:0;if(e===this._recalcSingleRunToken&&o&&this._processVisibility(o)){var P=Math.max(v,_);(I=o.container.value())&&(I.style.left=P+"px",I.style.top=g+"px");b=c-P-m-f-w;this._setWidth(o,b),d=this._setHeight(o,u)}var C=0,x=c-_-m-f-w;if(e===this._recalcSingleRunToken&&s&&this._processVisibility(s)){(I=s.container.value())&&(I.style.left=_+"px",I.classList.toggle("no-border-top-left-radius",!_),I.classList.toggle("no-border-top-right-radius",!S)),this._setWidth(s,x);var T=u-d-g;C=Math.min(300,T-0),p=this._setHeight(s,T)+4}if(e===this._recalcSingleRunToken&&a&&this._processVisibility(a)){var I;(I=a.container.value())&&(I.style.left=_+"px",I.style.top=d+g+"px",I.classList.toggle("no-border-bottom-left-radius",!p||!_),I.classList.toggle("no-border-bottom-right-radius",!S||!p)),this._setWidth(a,x);T=u-d-p-g;this._setHeight(a,Math.max(T,C))}e===this._recalcSingleRunToken&&n&&this._affectsLayout("tradingpanel")&&((I=n.container.value())&&(I.style.right=f+"px",I.style.top=g+"px"));e===this._recalcSingleRunToken&&this._updateVisibility()},e.prototype._affectsLayout=function(e){var t=this._areas[e];if(!t)return!1;if(t.rdState.owner.value()!==t)return!1;if(this._fullscreenArea&&this._fullscreenArea!==e)return p(e);if(this._width.value()<=567||this._height.value()<=445){var i=["center","top","left","topleft","extratop"];if(Object(c.isFeatureEnabled)("mobile_show_bottom_panel")&&i.push("bottom"),!i.includes(e))return!1}return!0},e.prototype._updateVisibility=function(){for(var e=this._bridge.visible.value(),t=0;te.year||this.year===e.year&&this.month>e.month||this.year===e.year&&this.month===e.month&&this.day>e.day?1:this.year===e.year&&this.month===e.month&&this.day===e.day?0:-1},e.prototype.before=function(e){return-1===this.compareTo(e)},e.prototype.toCalendar=function(e){ +return n.get_cal(n.get_timezone("Etc/UTC"),this.year,this.month-1,this.day)},e.prototype.addDays=function(t){var i=this.toCalendar(n.get_timezone("Etc/UTC"));return n.add_date(i,t),e.fromCalendar(i)},e.fromCalendar=function(t){return new e(n.get_year(t),n.get_month(t)+1,n.get_day_of_month(t))},e}()},OH2X:function(e,t,i){"use strict";t.LineToolFibRetracement=i("t2ex").LineToolFibRetracement,t.LineToolFibChannel=i("xnA2").LineToolFibChannel,t.LineToolFibSpeedResistanceArcs=i("Yjuu").LineToolFibSpeedResistanceArcs,t.LineToolProjection=i("68at").LineToolProjection,t.LineToolTrendBasedFibExtension=i("ZtA1").LineToolTrendBasedFibExtension,t.LineToolElliott=i("xz+e").LineToolElliott,t.LineToolFibCircles=i("4bfY").LineToolFibCircles,t.LineToolVertLine=i("n40Z").LineToolVertLine,t.LineToolCrossLine=i("MA5A").LineToolCrossLine,t.LineToolBarsPattern=i("2bPF").LineToolBarsPattern,t.LineToolTrendBasedFibTime=i("yUly").LineToolTrendBasedFibTime,t.LineToolFibTimeZone=i("FsE7").LineToolFibTimeZone,t.LineToolCircleLines=i("tG6Q").LineToolCircleLines,t.LineToolDateRange=i("WkYF").LineToolDateRange,t.LineToolPriceRange=i("RDDl").LineToolPriceRange,t.LineToolDateAndPriceRange=i("UCMi").LineToolDateAndPriceRange,t.LineToolParallelChannel=i("qcGP").LineToolParallelChannel,t.LineToolTrendAngle=i("nW7S").LineToolTrendAngle,t.LineToolTrendLine=i("WPQD").LineToolTrendLine,t.LineToolInfoLine=i("yi8X").LineToolInfoLine,t.LineToolArrowMark=i("TohL").LineToolArrowMark,t.LineToolExecution=i("704P").LineToolExecution,t.LineToolPitchfan=i("NhkU").LineToolPitchfan,t.LineToolGannSquare=i("Z0Sh").LineToolGannSquare,t.LineToolFibSpeedResistanceFan=i("zZ5f").LineToolFibSpeedResistanceFan,t.LineToolGannComplex=i("nd9+").LineToolGannComplex,t.LineToolGannFixed=i("TBaH").LineToolGannFixed,t.LineToolGannFan=i("4u8j").LineToolGannFan,t.LineToolFibWedge=i("9QkW").LineToolFibWedge,t.LineToolPitchfork=i("aDyP").LineToolPitchfork,t.LineToolDisjointAngle=i("oIoN").LineToolDisjointChannel,t.LineToolFlatBottom=i("InMJ").LineToolFlatBottom,t.LineToolIcon=i("icPo").LineToolIcon,t.LineToolRotatedRectangle=i("Az04").LineToolRotatedRectangle,t.LineToolFibSpiral=i("i80N").LineToolFibSpiral,t.LineToolHeadAndShoulders=i("aILO").LineToolHeadAndShoulders,t.LineToolTriangle=i("isVH").LineToolTriangle,t.LineToolTrianglePattern=i("lNN+").LineToolTrianglePattern,t.LineTool5PointsPattern=i("NJRZ").LineTool5PointsPattern,t.LineToolThreeDrivers=i("PYn8").LineToolThreeDrivers,t.LineToolABCD=i("pKDv").LineToolABCD,t.LineToolPolyline=i("hP9j").LineToolPolyline,t.LineToolPath=i("YdVo").LineToolPath,t.LineToolPrediction=i("Wh6B").LineToolPrediction,t.LineToolPriceLabel=i("zqZp").LineToolPriceLabel,t.LineToolArrowMarker=i("wiuq").LineToolArrowMarker,t.LineToolNote=i("gLxC").LineToolNote,t.LineToolNoteAbsolute=i("gLxC").LineToolNoteAbsolute,t.LineToolBrush=i("+hLl").LineToolBrush,t.LineToolArc=i("0Pxc").LineToolArc,t.LineToolCallout=i("odCa").LineToolCallout,t.LineToolBalloon=i("me8f").LineToolBalloon,t.LineToolText=i("V3Oj").LineToolText,t.LineToolHorzLine=i("/DxK").LineToolHorzLine, +t.LineToolHorzRay=i("CJIV").LineToolHorzRay,t.LineToolRectangle=i("7qI1").LineToolRectangle,t.LineToolEllipse=i("V086").LineToolEllipse,t.LineToolTimeCycles=i("kIXa").LineToolTimeCycles,t.LineToolSineLine=i("bv/X").LineToolSineLine,t.LineToolGhostFeed=i("XUCF").LineToolGhostFeed,t.LineToolBezierQuadro=i("Xyly").LineToolBezierQuadro,t.LineToolBezierCubic=i("N+BX").LineToolBezierCubic,t.LineToolArrow=i("QQu0").LineToolArrow,t.LineToolRay=i("5ZUI").LineToolRay,t.LineToolExtended=i("CHw2").LineToolExtended,t.LineToolSchiffPitchfork=i("v5F8").LineToolSchiffPitchfork,t.LineToolSchiffPitchfork2=i("XFad").LineToolSchiffPitchfork2,t.LineToolInsidePitchfork=i("EqoR").LineToolInsidePitchfork,t.LineToolTextAbsolute=i("V3Oj").LineToolTextAbsolute,t.LineToolArrowMarkLeft=i("TohL").LineToolArrowMarkLeft,t.LineToolArrowMarkRight=i("TohL").LineToolArrowMarkRight,t.LineToolArrowMarkUp=i("TohL").LineToolArrowMarkUp,t.LineToolArrowMarkDown=i("TohL").LineToolArrowMarkDown,t.LineToolFlagMark=i("aIha").LineToolFlagMark,t.LineToolCypherPattern=i("bTqm").LineToolCypherPattern,t.LineToolElliottImpulse=i("xz+e").LineToolElliottImpulse,t.LineToolElliottTriangle=i("xz+e").LineToolElliottTriangle,t.LineToolElliottTripleCombo=i("xz+e").LineToolElliottTripleCombo,t.LineToolElliottCorrection=i("xz+e").LineToolElliottCorrection,t.LineToolElliottDoubleCombo=i("xz+e").LineToolElliottDoubleCombo,t.LineToolRiskRewardLong=i("tDUI").LineToolRiskRewardLong,t.LineToolRiskRewardShort=i("tDUI").LineToolRiskRewardShort,t.LineToolPosition=i("ziJ5").LineToolPosition,t.LineToolOrder=i("B4/o").LineToolOrder},"OK+B":function(e,t,i){"use strict";var n=i("Eyy1").assert,r=i("eJTA"),o=r.rgba,s=r.rgbaToString,a=r.parseRgb,l=i("+GxX").isFeatureEnabled,c=i("cWHH"),u=i("1Wlv").PriceScale,h=i("8sOK").StudyStub,d=i("CW80"),p=d.createLineTool,_=d.createLineToolProperties,f=d.createStudyLineToolProperties,m=d.isLineToolName,v=d.isStudyLineToolName,y=i("Ss5c").LineDataSource,g=i("OH2X").LineToolBarsPattern,b=i("OH2X").LineToolCallout,S=i("HLXm"),w=i("GVHu"),P=w.Study,C=w.prepareStudyPropertiesForLoadChart,x=i("3ClC").createStudy,T=i("qJq3").Series,I=i("dfhE"),M=i("n5al"),L=i("0YCj"),O=i("Kxc7"),k=i("txPx").getLogger("Chart.Serialization"),A=i("OH2X").LineToolParallelChannel,E=i("OH2X").LineToolTrendAngle,V=i("OH2X").LineToolGhostFeed,D=i("OH2X").LineToolElliott,B=i("7ktv").PriceDataSource,R=i("iDOr").Pane,N=i("Tmoa"),F=i("jofe").createDeferredPromise,j=i("ApcL").preferencesByWhiteList,W=(k=i("txPx").getLogger("Chart.Serialization"),i("mPvX").LineToolsGroupModel);c.version=2,c.prototype.state=function(e,t,i){for(var n={panes:[]},r=0;r1&&r.push(l)),s=(s+1)%t.length}return r},c.prototype.restoreState=function(e,t,i){new H(this).reset();var n={};if(e.panes)if(Array.isArray(e.panes)){if(!(e.panes.length<1)){if(this._shouldBeSavedEvenIfHidden=void 0===e.shouldBeSavedEvenIfHidden||e.shouldBeSavedEvenIfHidden,e.chartProperties&&!e.chartProperties.timezone&&(e.chartProperties.timezone=e.timezone),e.chartProperties){var r=TradingView.factoryDefaults("chartproperties").scalesProperties;TradingView.merge(r,e.chartProperties.scalesProperties),!("showLastValue"in r)||"showSeriesLastValue"in r||"showStudyLastValue"in r||(r.showSeriesLastValueProperty=r.showLastValue,r.showStudyLastValueProperty=r.showLastValue),"showSeriesLastValue"in r&&(n.showSeriesLastValueProperty=!0),"showStudyLastValue"in r&&(n.showStudyLastValueProperty=!0),e.chartProperties.paneProperties.vertGridProperties=e.chartProperties.paneProperties.vertGridProperties||TradingView.clone(e.chartProperties.paneProperties.gridProperties),e.chartProperties.paneProperties.horzGridProperties=e.chartProperties.paneProperties.horzGridProperties||TradingView.clone(e.chartProperties.paneProperties.gridProperties),"backgroundType"in e.chartProperties.paneProperties||(e.chartProperties.paneProperties.backgroundType="solid"),this._properties.paneProperties.mergeAndFire(e.chartProperties.paneProperties),this._properties.scalesProperties.mergeAndFire(r),e.chartProperties.timezone&&this._properties.timezone.setValue(e.chartProperties.timezone),e.chartProperties.chartEventsSourceProperties&&this._properties.chartEventsSourceProperties&&this._properties.chartEventsSourceProperties.mergeAndFire(e.chartProperties.chartEventsSourceProperties),this._timeScale.restoreState(e.timeScale,t),this._updateDateTimeFormatter()}if(e.timeScale&&this._timeScale.restoreState(e.timeScale,t),!this.readOnly()){var o=this._getExceedingChildStudies(e.panes);if(o.length){ +for(var s=e.panes.length-1;s>=0;--s){for(var a=(h=e.panes[s]).sources.length-1;a>=0;--a){var l=h.sources[a];~o.indexOf(l)&&h.sources.splice(a,1)}h.sources.length||e.panes.splice(s,1)}0}}var c=e.panes;this.panes()[0].restoreState(c[0],t,e.version,n,i,!0);var u=1;for(s=1;sm&&_%100==0?{lines_limit_exceeded:!0,line_tools_count:_}:(this._dataSourceCollectionChanged.fire(),{})}k.logDebug("ChartModel.restoreState: invalid state")}else k.logDebug("ChartModel.restoreState: invalid state");else k.logDebug("ChartModel.restoreState: invalid state")},R.prototype.state=function(e,t,i,n,r){var o={},s=new Map;function a(e){if(s.has(e))return s.get(e);var o=null,a=i&&!e.isSavedInStudyTemplates()||!e.state||!(o=e.state(t,r))||!e.isSavedInChart(t)||n&&e.isActualSymbol&&!e.isActualSymbol()?null:o;return s.set(e,a),a}if(e){o.sources=[];for(var l=0;l1e200){var m=h-1;k.logWarn("Datasource zorder has bad value: "+_.zorder+" Resetting it to "+m),_.zorder=m}else if(!this.isZOrderAvailable(_.zorder)){l&&"MainSeries"===f&&this._model.mainSeries().zorder()===_.zorder||(_.zorder=d+1)}var v=_.id;null===this._model.dataSourceForId(_.id)||"MainSeries"===f?(s[v]=_.ownerSource,f&&("MainSeries"===f?this._restoreMainSeries(_,t,l,n,r,o):f.toLowerCase().startsWith("study")?this.restoreStudy(_,t,n,o):TradingView.isInherited(TradingView[f],y)?this.restoreLineTool(_,t,void 0,o):TradingView[f]&&TradingView[f].createFromState&&this._restoreSpecialSource(_,t,o)),h=Math.min(h,_.zorder),d=Math.max(d,_.zorder)):k.logError("Duplicate id while restoring pane: "+_.type+","+_.id)}}}var g,b,S=new Set,w=this;function C(e){var t=defaults("chartproperties").paneProperties.axisProperties,i=new u(w.model().properties().scalesProperties,t);return i.restoreState(e.state),e.sources.forEach((function(e){var n=w.dataSourceForId(e);n&&function(e,t,i){S.add(e),void 0!==i.m_showSymbolLabels&&e instanceof T&&w.model().properties().scalesProperties.showSymbolLabels.setValue(i.m_showSymbolLabels),e.setPriceScale(t),t.addDataSource(e)}(n,i,t)})),0===i.dataSources().length?null:i}if(e.leftAxisesState)g=e.leftAxisesState.map(C).filter((function(e){return null!==e}));else{var x=C({state:e.leftAxisState,sources:e.leftAxisSources});g=null!==x?[x]:[]} +if(this._leftPriceScales.slice().forEach(function(e){this.removePriceScale(e)}.bind(this)),this._leftPriceScales=[],g.forEach((function(e){w._placePriceScale(e,"left")})),e.rightAxisesState)b=e.rightAxisesState.map(C).filter((function(e){return null!==e}));else{var I=C({state:e.rightAxisState,sources:e.rightAxisSources});b=null!==I?[I]:[]}this._rightPriceScales.forEach(function(e){this.removePriceScale(e)}.bind(this)),this._rightPriceScales=[],b.forEach((function(e){w._placePriceScale(e,"right")})),this._currentPriceScaleRatio=e.priceScaleRatio||e.leftPriceScaleRatio||e.rightPriceScaleRatio||null;for(p=0;p=t||!i._shouldExtrapolateMore()?null:n(i.newBarBuilder(e),r,t,!0).times}))},s.prototype._ensureExtrapolatedToTime=function(e,t){var i=this;return this._extrapolateData(e,(function(n){if(n>=t||!i._shouldExtrapolateMore())return null;var o=r(i.newBarBuilder(e),n,t,2e3,!0);return o.times[o.length-1]e?this._extrapolatedBarsCache=[]:this._lastRealBarTime!==t&&this._extrapolatedBarsCache.shift(e-this._lastRealBarIndex)),this._lastRealBarIndex=e,this._lastRealBarTime=t;for(var i=0;i=a||f)){this._visiblePivots.add(l[d]), +this._prices=[];for(var m=0;ms)){var h={},d=this._source.properties().levelsStyle.visibility;d.P.value()&&this.mergeLabel(h,e[l].p,"P"),d["S1/R1"].value()&&(this.mergeLabel(h,e[l].s1,"S1"),this.mergeLabel(h,e[l].r1,"R1")),d["S2/R2"].value()&&(this.mergeLabel(h,e[l].s2,"S2"),this.mergeLabel(h,e[l].r2,"R2")),d["S3/R3"].value()&&(this.mergeLabel(h,e[l].s3,"S3"),this.mergeLabel(h,e[l].r3,"R3")),d["S4/R4"].value()&&(this.mergeLabel(h,e[l].s4,"S4"), +this.mergeLabel(h,e[l].r4,"R4")),d["S5/R5"].value()&&(this.mergeLabel(h,e[l].s5,"S5"),this.mergeLabel(h,e[l].r5,"R5"));var p=i.indexToCoordinate(c),_=i.indexToCoordinate(u);for(var f in h){var m=parseFloat(f),v=n.priceToCoordinate(m,a);this._pivots.push({x1:p,x2:_,y:v,label:h[f].text,labelIds:h[f].ids,src:e[l]})}}}}}},m.prototype.renderer=function(){this._invalidated&&(this._updateImpl(),this._invalidated=!1);for(var e=new u,t=this._source.properties().levelsStyle.colors,i=this._source.properties().levelsStyle.widths,r=this._source.visiblePivots(),o=0;oi)){var l=[],c=this._properties.levelsStyle.visibility;c.P.value()&&l.push(n[s].p),c["S1/R1"].value()&&l.push(n[s].s1,n[s].r1),c["S2/R2"].value()&&l.push(n[s].s2,n[s].r2),c["S3/R3"].value()&&l.push(n[s].s3,n[s].r3),c["S4/R4"].value()&&l.push(n[s].s4,n[s].r4),c["S5/R5"].value()&&l.push(n[s].s5,n[s].r5);for(var u=0;ut?(s&&(clearTimeout(s),s=null),a=c,o=e.apply(n,r),s||(n=r=null)):s||!1===i.trailing||(s=setTimeout(l,u)),o}},e.exports=t.default},Q19o:function(e,t,i){"use strict";(function(t,n){var r=i("Eyy1").ensureNotNull,o=i("jA0t"),s=i("9iCb").applyOverridesToStudy,a=i("0YCj"),l=i("5JMW"),c=l.LineDataSourceApi,u=l.isLineToolRiskReward,h=i("N1UO").StudyApi,d=i("ltKl").SeriesApi,p=i("QrSB").SelectionApi,_=i("mf9N").PaneApi,f=i("IiTo"),m=i("LxhU").Interval,v=i("jCNj"),y=i("2jXJ").supportedLineTools,g=i("7MZv").showTooManyStudiesNotice,b=i("ogJP").isNumber,S=i("ogJP").inherit,w=i("vu5c").onSeriesCompletedOrErrorReceived,P=i("CW80").createLineToolProperties,C=i("96Yh"),x=C.lineToolEntityInfo,T=C.studyEntityInfo,I=i("lReN").LineToolsGroupControllerApi,M=i("ocrj").RemoveSourcesCommand,L=i("FDyI").ChartWidgetApiBase,O=i("mMWL"),k=function(e,i){L.call(this,e),this._panes=new WeakMap,this._studies=new WeakMap,this._lineDataSources=new WeakMap,this._activateChart=i,this._selectionApi=null,this._visibleBarsChanged=new t,this._chartWidget.onAboutToBeDestroyed().subscribe(this,this._destroy,!0),this._chartWidget.withModel(this,(function(){this._chartWidget.model().timeScale().visibleBarsStrictRangeChanged().subscribe(this,this._onVisibleBarsChanged)}))};function A(e,t){return t.map((function(t){return e.dataSourceForId(t)}))}function E(e,t){var i=n.utc_to_cal(t.timezone,1e3*e),r=t.spec.correctTradingDay(i);return n.set_hms(r,0,0,0,0,v.get_timezone("Etc/UTC")),r.getTime()/1e3}S(k,L),k.prototype._getPaneApi=function(e){var t=this._panes.get(e);return void 0===t&&(t=new _(e,this._chartWidget),this._panes.set(e,t)),t},k.prototype._getStudyApi=function(e){var t=this._studies.get(e);return void 0===t&&(t=new h(e,this._chartWidget),this._studies.set(e,t)),t},k.prototype._getLineDataSourceApi=function(e){var t=this._lineDataSources.get(e);return void 0===t&&(t=new c(e,this._chartWidget.model().model(),{apiPointsToDataSource:this._convertUserPointsToDataSource.bind(this),dataSourcePointsToPriced:function(e){var t=this._chartWidget.model().mainSeries().syncModel(),i=this._chartWidget.model().timeScale();return e.map((function(e){var n=i.normalizeBarIndex(e.index);return{price:e.price,time:t.projectTime(n.time_t,n.offset)}}))}.bind(this)}),this._lineDataSources.set(e,t)),t},k.prototype._makeSubscriptionFromDelegate=function(e){return{subscribe:e.subscribe.bind(e), +unsubscribe:e.unsubscribe.bind(e),unsubscribeAll:e.unsubscribeAll.bind(e)}},k.prototype.executeActionById=function(e){this._chartWidget.executeActionById(e)},k.prototype.getCheckableActionState=function(e){return this._chartWidget.getCheckableActionState(e)},k.prototype.setZoomEnabled=function(e){this._chartWidget.model().model().setZoomEnabled(e)},k.prototype.setScrollEnabled=function(e){this._chartWidget.model().model().setScrollEnabled(e)},k.prototype.refreshMarks=function(){this._chartWidget.refreshMarks()},k.prototype.clearMarks=function(){this._chartWidget.clearMarks()},k.prototype.symbol=function(){return this._chartWidget.getSymbol()},k.prototype.symbolExt=function(){var e=this._chartWidget.model().mainSeries().symbolInfo();return e?{symbol:e.name,full_name:e.full_name,exchange:e.exchange,description:e.description,type:e.type,pro_name:e.pro_name}:null},k.prototype.resolution=function(){return this._chartWidget.model().mainSeries().properties().interval.value()},k.prototype.setSymbol=function(e,t){if(e!==this.symbol()){var i=this._chartWidget.model().mainSeries().dataEvents();t&&w(i,(function(e){e||t()})),this._activateChart(),this._chartWidget.setSymbol(e)}},k.prototype.resetData=function(){this._chartWidget.model().mainSeries().rerequestData()},k.prototype.setResolution=function(e,t){var i=m.normalize(e);if(null!==i&&i!==this.resolution()){var n=this._chartWidget.model().mainSeries().dataEvents();t&&w(n,(function(e){e||t()})),this._activateChart(),this._chartWidget.setResolution(i)}},k.prototype.setEntityVisibility=function(e,t){console.warn("`setEntityVisibility` is deprecated. Use shape/study API instead");var i=this._chartWidget.model().model().dataSourceForId(e);if(i){var n=i.properties();n&&n.visible&&n.visible.setValue(t)}},k.prototype.getAllStudies=function(){return this._chartWidget.model().model().allStudies().map(T)},k.prototype.availableZOrderOperations=function(e){var t=A(this._chartWidget.model().model(),e);return this._chartWidget.model().availableZOrderOperations(t)},k.prototype.sendToBack=function(e){var t=A(this._chartWidget.model().model(),e);this._chartWidget.model().sendToBack(t)},k.prototype.bringToFront=function(e){var t=A(this._chartWidget.model().model(),e);this._chartWidget.model().bringToFront(t)},k.prototype.insertAfter=function(e,t){var i=this._chartWidget.model().model(),n=A(i,e),r=i.dataSourceForId(t);this._chartWidget.model().insertAfter(n,r)},k.prototype.insertBefore=function(e,t){var i=this._chartWidget.model().model(),n=A(i,e),r=i.dataSourceForId(t);this._chartWidget.model().insertBefore(n,r)},k.prototype.bringForward=function(e){var t=A(this._chartWidget.model().model(),e);this._chartWidget.model().bringForward(t)},k.prototype.sendBackward=function(e){var t=A(this._chartWidget.model().model(),e);this._chartWidget.model().sendBackward(t)},k.prototype.showPropertiesDialog=function(e){var t=this._chartWidget.model().model().dataSourceForId(e);if(null===t)throw new Error("Study or shape "+e+" does not exist");this._chartWidget.showChartPropertiesForSource(t)}, +k.prototype.getAllShapes=function(){return this._chartWidget.model().model().allLineTools().map(x).filter((function(e){return null!==e.name}))},k.prototype.removeAllShapes=function(){this._chartWidget.removeAllDrawingTools()},k.prototype.removeAllStudies=function(){this._chartWidget.removeAllStudies()},k.prototype.removeEntity=function(e,t){var i=this._chartWidget.model().chartModel().dataSourceForId(e);i?t&&t.disableUndo?new M(this._chartWidget.model().chartModel(),[i],"").redo():this._chartWidget.model().removeSource(i,!0,!0):console.warn("Can't find a source with id: "+e)},k.prototype.removeEntityWithUndo=function(e){var t=this._chartWidget.model().chartModel().dataSourceForId(e);this._chartWidget.model().removeSource(t,!1)},k.prototype.selection=function(){return null===this._selectionApi&&(this._selectionApi=new p(this._chartWidget.model().model())),this._selectionApi},k.prototype.createStudyTemplate=function(e){return this._chartWidget.model().model().studyTemplate(e.saveSymbol,e.saveInterval)},k.prototype.drawOnAllCharts=function(e){O.drawOnAllCharts.setValue(e)},k.prototype.applyStudyTemplate=function(e){this._chartWidget.model().applyStudyTemplate(e,""+1e3*Math.random())},k.prototype.setVisibleRange=function(e,t){if(void 0!==e&&e.from&&e.to&&!isNaN(e.from)&&!isNaN(e.to)){var i=[parseInt(e.from),parseInt(e.to)],n=this._alignPoints(i),r=n[0],o=n[1],s=void 0!==t&&"function"==typeof t,a=new Promise(function(e){this._chartWidget.setVisibleTimeRange(r,o,s?{}:t,e)}.bind(this));return s&&(console.warn("setVisibleRange now returns a Promise object and don't accept callback as the last argument"),a.then(t)),a}console.warn("Wrong time range: "+JSON.stringify(e)+'. Expected an object with "from" and "to" numeric values.')},k.prototype._getSession=function(){var e=this._chartWidget.model().mainSeries().symbolInfo();return new f.SessionInfo(e.timezone,e.session,e.holidays,e.corrections)},k.prototype.getVisibleRange=function(){var e={from:0,to:0},t=this._chartWidget.model().timeScale(),i=t.visibleBarsStrictRange();if(null===i)return e;var n=this._chartWidget.model().mainSeries(),o=n.syncModel();if(null===o)return e;var s=r(n.data().last()),a=i.lastBar()-s.index,l=a<=0?t.indexToTimePoint(i.lastBar()):o.projectTime(s.value[TradingView.TIME_PLOT],a);if(e.from=+t.indexToTimePoint(Math.max(0,i.firstBar()))||0,e.to=+l||0,m.isDWM(n.interval())){var c=this._getSession();e.from=E(e.from,c),e.to=E(e.to,c)}return e},k.prototype.getTimeScaleLogicalRange=function(){return this._chartWidget.model().timeScale().logicalRange()},k.prototype.getVisiblePriceRange=function(){return console.warn("`getVisiblePriceRange` is deprecated. Use Price Scale API instead"),this._chartWidget.model().mainSeries()?this._chartWidget.model().mainSeries().priceScale().priceRangeInPrice():null},k.prototype.scrollPosition=function(){return this._chartWidget.model().timeScale().rightOffset()},k.prototype.defaultScrollPosition=function(){return this._chartWidget.model().timeScale().defaultRightOffsetProperty().value()}, +k.prototype._createTradingPrimitive=function(e,t){var i=this;var n,o,s=this._chartWidget.model().model(),a=s.paneForSource(s.mainSeries());return(t?s:this._chartWidget.model()).createLineTool(a,(n=TradingView.CLOSE_PLOT,{index:(o=r(i._chartWidget.model().mainSeries().bars().last())).index,price:o.value[n]}),e)._adapter},k.prototype.createOrderLine=function(e){e=e||{};return this._createTradingPrimitive("LineToolOrder",e.disableUndo)},k.prototype.createPositionLine=function(e){e=e||{};return this._createTradingPrimitive("LineToolPosition",e.disableUndo)},k.prototype.createExecutionShape=function(e){e=e||{};return this._createTradingPrimitive("LineToolExecution",e.disableUndo)},k.prototype.createShape=function(e,t){return this.createMultipointShape([e],t)},k.prototype._alignPoints=function(e){var t=this._chartWidget.model().model(),i=t.mainSeries(),n=i.interval();if(t.timeScale().isEmpty()||!m.isDWM(n))return e;var r=f.createAligner(n,i.symbolInfo(),!0);return null===r?e:e.map((function(e){return e?(r.moveTo(1e3*e),r.startOfBar(0)/1e3):e}))},k.prototype._convertUserPointsToDataSource=function(e){var t=this._chartWidget.model().model(),i=t.mainSeries(),n=t.timeScale().points(),r=i.data();if(t.timeScale().isEmpty())return null;var o=e.map((function(e){return e.time})),s=this._alignPoints(o);function a(e,t,o){var s=n.closestIndexLeft(e)||0,a={index:s},l=n.valueAt(s);if(e>l&&s===n.lastIndex()){var c=i.syncModel().distance(l,e);c.success&&(a.index=a.index+c.result)}if(b(t))a.price=t;else{var u=o?["open","high","low","close"].indexOf(o)+1:1;u<=0&&(u=1),a.price=r.valueAt(s)[u]}return a}for(var l=[],c=0;c2)throw new Error("Wrong points count for "+t.shape+". Required 1 or 2");2===l.length&&(p.startChanging(1,l[1]),p.setPoint(1,l[1]),p.endChanging())}else{var _=p.pointsCount() +;if(_!==l.length&&-1!==_)throw new Error("Wrong points count for "+t.shape+". Required "+_);for(var f="LineToolBrush"===c.name,m=1;mthis._minValue&&e.maxValue()1)n._touchMouseMoveWithDownInfo(u(e),n._tapPosition).manhattanDistance<30&&!n._cancelTap&&n._processTouchEvent(t,n._handler.doubleTapEvent),n._resetTapTimeout()}else{t=n._makeCompatEvent(e);if(++n._clickCount,n._clickTimeoutId&&n._clickCount>1)n._touchMouseMoveWithDownInfo(u(e),n._clickPosition).manhattanDistance<5&&!n._cancelClick&&n._processMouseEvent(t,n._handler.mouseDoubleClickEvent),n._resetClickTimeout()}},this._target=e,this._handler=t,this._options=i,this._init()}return e.prototype.destroy=function(){null!==this._unsubscribeOutsideMouseEvents&&(this._unsubscribeOutsideMouseEvents(),this._unsubscribeOutsideMouseEvents=null),null!==this._unsubscribeOutsideTouchEvents&&(this._unsubscribeOutsideTouchEvents(),this._unsubscribeOutsideTouchEvents=null),null!==this._unsubscribeMousemove&&(this._unsubscribeMousemove(),this._unsubscribeMousemove=null),null!==this._unsubscribeRootMouseEvents&&(this._unsubscribeRootMouseEvents(),this._unsubscribeRootMouseEvents=null),null!==this._unsubscribeRootTouchEvents&&(this._unsubscribeRootTouchEvents(),this._unsubscribeRootTouchEvents=null),null!==this._unsubscribeMobileSafariEvents&&(this._unsubscribeMobileSafariEvents(),this._unsubscribeMobileSafariEvents=null),this._clearLongTapTimeout(),this._resetClickTimeout()},e.prototype._mouseEnterHandler=function(e){var t=this;this._unsubscribeMousemove&&this._unsubscribeMousemove();var i=this._mouseMoveHandler.bind(this);if(this._unsubscribeMousemove=function(){t._target.removeEventListener("mousemove",i)},this._target.addEventListener("mousemove",i), +!this._firesTouchEvents(e)){var n=this._makeCompatEvent(e);this._processMouseEvent(n,this._handler.mouseEnterEvent)}},e.prototype._resetClickTimeout=function(){null!==this._clickTimeoutId&&clearTimeout(this._clickTimeoutId),this._clickCount=0,this._clickTimeoutId=null,this._clickPosition={x:Number.NEGATIVE_INFINITY,y:Number.POSITIVE_INFINITY}},e.prototype._resetTapTimeout=function(){null!==this._tapTimeoutId&&clearTimeout(this._tapTimeoutId),this._tapCount=0,this._tapTimeoutId=null,this._tapPosition={x:Number.NEGATIVE_INFINITY,y:Number.POSITIVE_INFINITY}},e.prototype._mouseMoveHandler=function(e){if(!this._mousePressed&&null===this._touchMoveStartPosition&&!this._firesTouchEvents(e)){var t=this._makeCompatEvent(e);this._processMouseEvent(t,this._handler.mouseMoveEvent)}},e.prototype._touchMoveHandler=function(e){if(this._lastTouchEventTimeStamp=d(e),null===this._startPinchMiddlePoint&&!this._preventTouchDragProcess){this._pinchPrevented=!0;var t=this._touchMouseMoveWithDownInfo(u(e),Object(r.ensureNotNull)(this._touchMoveStartPosition)),i=t.xOffset,n=t.yOffset,s=t.manhattanDistance;if(this._touchMoveExceededManhattanDistance||!(s<5)){if(!this._touchMoveExceededManhattanDistance){var a=.5*i,l=n>=a&&!this._options.treatVertTouchDragAsPageScroll,c=a>n&&!this._options.treatHorzTouchDragAsPageScroll;l||c||(this._preventTouchDragProcess=!0),this._touchMoveExceededManhattanDistance=!0,this._cancelTap=!0,this._clearLongTapTimeout(),this._resetTapTimeout()}if(!this._preventTouchDragProcess){var h=this._makeCompatEvent(e);this._processTouchEvent(h,this._handler.touchMoveEvent),Object(o.a)(e)}}}},e.prototype._mouseMoveWithDownHandler=function(e){if(0===e.button&&(this._touchMouseMoveWithDownInfo(e,Object(r.ensureNotNull)(this._mouseMoveStartPosition)).manhattanDistance>=5&&(this._cancelClick=!0,this._resetClickTimeout()),this._cancelClick)){var t=this._makeCompatEvent(e);this._processMouseEvent(t,this._handler.pressedMouseMoveEvent)}},e.prototype._touchMouseMoveWithDownInfo=function(e,t){var i=Math.abs(t.x-e.x),n=Math.abs(t.y-e.y);return{xOffset:i,yOffset:n,manhattanDistance:i+n}},e.prototype._touchEndHandler=function(e){this._lastTouchEventTimeStamp=d(e),this._clearLongTapTimeout(),this._touchMoveStartPosition=null,this._unsubscribeRootTouchEvents&&(this._unsubscribeRootTouchEvents(),this._unsubscribeRootTouchEvents=null);var t=this._makeCompatEvent(e);(this._processTouchEvent(t,this._handler.touchEndEvent),++this._tapCount,this._tapTimeoutId&&this._tapCount>1)?(this._touchMouseMoveWithDownInfo(u(e),this._tapPosition).manhattanDistance<30&&!this._cancelTap&&this._processTouchEvent(t,this._handler.doubleTapEvent),this._resetTapTimeout()):this._cancelTap||this._processTouchEvent(t,this._handler.tapEvent);0===this._tapCount&&Object(o.a)(e),0===e.touches.length&&this._longTapActive&&(this._longTapActive=!1,Object(o.a)(e))},e.prototype._mouseUpHandler=function(e){if(0===e.button){var t=this._makeCompatEvent(e);if(this._mouseMoveStartPosition=null,this._mousePressed=!1, +this._unsubscribeRootMouseEvents&&(this._unsubscribeRootMouseEvents(),this._unsubscribeRootMouseEvents=null),n.isFF)this._target.ownerDocument.documentElement.removeEventListener("mouseleave",this._onFirefoxOutsideMouseUp);if(!this._firesTouchEvents(e))if(this._processMouseEvent(t,this._handler.mouseUpEvent),++this._clickCount,this._clickTimeoutId&&this._clickCount>1)this._touchMouseMoveWithDownInfo(u(e),this._clickPosition).manhattanDistance<5&&!this._cancelClick&&this._processMouseEvent(t,this._handler.mouseDoubleClickEvent),this._resetClickTimeout();else this._cancelClick||this._processMouseEvent(t,this._handler.mouseClickEvent)}},e.prototype._clearLongTapTimeout=function(){null!==this._longTapTimeoutId&&(clearTimeout(this._longTapTimeoutId),this._longTapTimeoutId=null)},e.prototype._touchStartHandler=function(e){this._lastTouchEventTimeStamp=d(e);var t=this._target.ownerDocument.documentElement;this._cancelTap=!1,this._touchMoveExceededManhattanDistance=!1,this._preventTouchDragProcess=!1,this._touchMoveStartPosition=u(e),this._unsubscribeRootTouchEvents&&(this._unsubscribeRootTouchEvents(),this._unsubscribeRootTouchEvents=null);var i=this._touchMoveHandler.bind(this),n=this._touchEndHandler.bind(this);this._unsubscribeRootTouchEvents=function(){t.removeEventListener("touchmove",i),t.removeEventListener("touchend",n)},t.addEventListener("touchmove",i,{passive:!1}),t.addEventListener("touchend",n,{passive:!1}),this._clearLongTapTimeout(),this._longTapTimeoutId=setTimeout(this._longTapHandler.bind(this,e),240);var r=this._makeCompatEvent(e);this._processTouchEvent(r,this._handler.touchStartEvent),this._tapTimeoutId||(this._tapCount=0,this._tapTimeoutId=setTimeout(this._resetTapTimeout.bind(this),500),this._tapPosition=u(e))},e.prototype._wheelClickHandler=function(e){if(1===e.button&&!this._firesTouchEvents(e)){var t=this._makeCompatEvent(e);this._processMouseEvent(t,this._handler.wheelClickEvent)}},e.prototype._mouseDownHandler=function(e){if(0===e.button){var t=this._target.ownerDocument.documentElement;n.isFF&&t.addEventListener("mouseleave",this._onFirefoxOutsideMouseUp),this._cancelClick=!1,this._mouseMoveStartPosition=u(e),this._unsubscribeRootMouseEvents&&(this._unsubscribeRootMouseEvents(),this._unsubscribeRootMouseEvents=null);var i=this._mouseMoveWithDownHandler.bind(this),r=this._mouseUpHandler.bind(this);if(this._unsubscribeRootMouseEvents=function(){t.removeEventListener("mousemove",i),t.removeEventListener("mouseup",r)},t.addEventListener("mousemove",i),t.addEventListener("mouseup",r),this._mousePressed=!0,!this._firesTouchEvents(e)){var o=this._makeCompatEvent(e);this._processMouseEvent(o,this._handler.mouseDownEvent),this._clickTimeoutId||(this._clickCount=0,this._clickTimeoutId=setTimeout(this._resetClickTimeout.bind(this),500),this._clickPosition=u(e))}}},e.prototype._init=function(){var e=this;this._target.addEventListener("mouseenter",this._mouseEnterHandler.bind(this)),this._target.addEventListener("touchcancel",this._clearLongTapTimeout.bind(this)) +;var t=this._target.ownerDocument,i=function(t){e._handler.mouseDownOutsideEvent&&(t.target&&e._target.contains(t.target)||e._handler.mouseDownOutsideEvent())};this._unsubscribeOutsideTouchEvents=function(){t.removeEventListener("touchstart",i)},this._unsubscribeOutsideMouseEvents=function(){t.removeEventListener("mousedown",i)},t.addEventListener("mousedown",i),t.addEventListener("touchstart",i,{passive:!0}),n.CheckMobile.iOS()&&n.isSafari&&(this._unsubscribeMobileSafariEvents=function(){e._target.removeEventListener("dblclick",e._onMobileSafariDoubleClick)},this._target.addEventListener("dblclick",this._onMobileSafariDoubleClick)),this._target.addEventListener("mouseleave",this._mouseLeaveHandler.bind(this)),this._target.addEventListener("contextmenu",this._contextMenuHandler.bind(this)),this._target.addEventListener("touchstart",this._touchStartHandler.bind(this),{passive:!0}),Object(o.b)(this._target),this._target.addEventListener("mousedown",this._mouseDownHandler.bind(this)),this._target.addEventListener(a,this._wheelClickHandler.bind(this)),this._initPinch(),this._target.addEventListener("touchmove",(function(){}),{passive:!1})},e.prototype._initPinch=function(){var e=this;void 0===this._handler.pinchStartEvent&&void 0===this._handler.pinchEvent&&void 0===this._handler.pinchEndEvent||(this._target.addEventListener("touchstart",(function(t){return e._checkPinchState(t.touches)}),{passive:!0}),this._target.addEventListener("touchmove",(function(t){if(2===t.touches.length&&null!==e._startPinchMiddlePoint&&void 0!==e._handler.pinchEvent){var i=h(t.touches[0],t.touches[1])/e._startPinchDistance;e._handler.pinchEvent(e._startPinchMiddlePoint,i),Object(o.a)(t)}}),{passive:!1}),this._target.addEventListener("touchend",(function(t){e._checkPinchState(t.touches)})))},e.prototype._checkPinchState=function(e){1===e.length&&(this._pinchPrevented=!1),2!==e.length||this._pinchPrevented||this._longTapActive?this._stopPinch():this._startPinch(e)},e.prototype._startPinch=function(e){var t=this._target.getBoundingClientRect()||{left:0,top:0};this._startPinchMiddlePoint={x:(e[0].clientX-t.left+(e[1].clientX-t.left))/2,y:(e[0].clientY-t.top+(e[1].clientY-t.top))/2},this._startPinchDistance=h(e[0],e[1]),void 0!==this._handler.pinchStartEvent&&this._handler.pinchStartEvent(),this._clearLongTapTimeout()},e.prototype._stopPinch=function(){null!==this._startPinchMiddlePoint&&(this._startPinchMiddlePoint=null,void 0!==this._handler.pinchEndEvent&&this._handler.pinchEndEvent())},e.prototype._mouseLeaveHandler=function(e){if(this._unsubscribeMousemove&&this._unsubscribeMousemove(),!this._firesTouchEvents(e)){var t=this._makeCompatEvent(e);this._processMouseEvent(t,this._handler.mouseLeaveEvent)}},e.prototype._longTapHandler=function(e){var t=this._makeCompatEvent(e);this._processTouchEvent(t,this._handler.longTapEvent),this._processTouchEvent(t,this._handler.touchContextMenuEvent),this._cancelTap=!0,this._longTapActive=!0},e.prototype._contextMenuHandler=function(e){if(Object(o.a)(e), +null===this._touchMoveStartPosition&&!this._firesTouchEvents(e)){var t=this._makeCompatEvent(e);this._processMouseEvent(t,this._handler.contextMenuEvent),this._cancelClick=!0}},e.prototype._firesTouchEvents=function(e){return e.sourceCapabilities&&void 0!==e.sourceCapabilities.firesTouchEvents?e.sourceCapabilities.firesTouchEvents:d(e)=r.targetMetaInfoVersion()||(r.migrateMetaInfo(e),void 0!==t&&r.migratePropState(t),Object(n.assert)(e._metainfoVersion===r.targetMetaInfoVersion()))}))} +u.sort((function(e,t){return e.targetMetaInfoVersion()-t.targetMetaInfoVersion()}))},SqfW:function(e,t,i){"use strict";i.d(t,"b",(function(){return s})),i.d(t,"a",(function(){return a}));var n=i("mrSG"),r=i("tqok"),o=i("hsV8");function s(e,t){if(e.index>=t.length)return null;var i=t[e.index];return i===r.a?null:{startPrice:e.startPrice,endPrice:e.endPrice,index:i,extendTop:e.extendTop,extendBottom:e.extendBottom}}function a(e,t,i){var r=Object(o.ensureTimePointIndexIndex)(i.indexOf(e.index));return Object(n.__assign)(Object(n.__assign)({id:t},e),{index:r})}},Ss5c:function(e,t,i){"use strict";var n=i("Eyy1").ensureDefined,r=i("aO4+").Point,o=i("4TVt").LineToolPriceAxisView,s=i("fJhV").LineDataSourceTimeAxisView,a=i("mMWL"),l=i("LxhU"),c=l.Interval,u=l.ResolutionKind,h=i("pPtI").getServerInterval,d=i("txPx").getLogger("Chart.LineDataSource"),p=i("FQhm"),_=i("aIyQ"),f=i("tc+8"),m=i("hayr").propertyPages,v=i("WkOR").areEqualSymbols,y=i("Kxc7"),g=i("ytGH").LineToolWidthsProperty,b=y.enabled("datasource_copypaste"),S=i("ng+v").LineDataSourceBase;function w(e,t){S.call(this,e),this._properties=t,this._pointAdded=new _,this._pointChanged=new _,this._onTemplateApplying=new _,this._onTemplateApplied=new _,this._onIsActualIntervalChange=new _,this._paneViews=[],this._fixedPoints=[],this._currentPointsetId=null,this._properties.hasChild("symbol")||this._properties.addChild("symbol",new f(e.mainSeries().symbol())),this._properties.hasChild("interval")||this._properties.addChild("interval",new f(e.mainSeries().interval())),this._sourceHiddenPrevValue=!1,this._sourceHiddenChangedTimeoutId=null,this.calcIsActualSymbol(),this._properties.intervalsVisibilities.listeners().subscribe(this,w.prototype.calcIsActualSymbol);var i=this;if(this._properties.listeners().subscribe(this,(function(){i.propertiesChanged()})),this._createPointsProperties(),this.m_priceAxisViews=[],this.m_timeAxisViews=[],this.pointsCount()>0)for(var n=0;n=i.multiplier()&&(t=e.key)})),t},w.prototype.calcIsActualSymbol=function(){var e=this._properties.symbol,t=this._model.mainSeries(),i=e.value();if(this._isActualSymbol=t.symbolSameAsCurrent(i),this._isActualSymbol){var n=t.symbol();v(i,n)||(d.logWarn('Possible drawing "migrating" detected from "'+i+'" to "'+n+'"'),d.logWarn("Series symbolInfo: "+JSON.stringify(t.symbolInfo())),d.logWarn((new Error).stack)),e.setValue(n)}this.calcIsActualInterval(),this.calcIsActualCurrency(),this._onSourceHiddenMayChange()},w.prototype.calcIsActualCurrency=function(){if(this._model.currencyLabelEnabled()){var e=this.ownerSource();if(null===e)return void(this._isActualCurrency=!1);var t=this._properties.currencyId.value();if(null!==t)this._isActualCurrency=t===this.ownerSource().symbolSource().currency();else{var i=e.symbolSource().symbolInfo();this._isActualCurrency=null!==i&&i.currency_code===i.original_currency_code}}else this._isActualCurrency=!0;this._onSourceHiddenMayChange()},w.prototype.calcIsActualInterval=function(){var e=this._isActualInterval,t=this._properties,i=this._model.mainSeries(),n=c.parse(i.interval()),r=t.intervalsVisibilities;if(this._isActualInterval=!1,n.isSeconds()&&n.multiplier()<60){var o=r.seconds.value(),s=r.secondsFrom.value(),a=r.secondsTo.value();this._isActualInterval=o&&n.multiplier()>=s&&n.multiplier()<=a}if(n.isSeconds()&&n.multiplier()>=60){var l=Math.floor(n.multiplier()/60);o=r.minutes.value(),s=r.minutesFrom.value(),a=r.minutesTo.value();this._isActualInterval=o&&l>=s&&l<=a}if(n.isMinutes()&&n.multiplier()<60){o=r.minutes.value(),s=r.minutesFrom.value(),a=r.minutesTo.value();this._isActualInterval=o&&n.multiplier()>=s&&n.multiplier()<=a}if(n.isMinutes()&&n.multiplier()>=60){var u=Math.floor(n.multiplier()/60);o=r.hours.value(),s=r.hoursFrom.value(),a=r.hoursTo.value();this._isActualInterval=o&&u>=s&&u<=a}if(n.isDays()){o=r.days.value(),s=r.daysFrom.value(),a=r.daysTo.value();this._isActualInterval=o&&n.multiplier()>=s&&n.multiplier()<=a}if(n.isWeeks()&&(this._isActualInterval=r.weeks.value()),n.isMonths()&&(this._isActualInterval=r.months.value()),n.isRange()&&(this._isActualInterval=r.ranges.value()),!this._isActualInterval&&this._model.selection().isSelected(this)){var h=this;this._model.selectionMacro((function(e){ +e.removeSourceFromSelection(h)}))}this._isActualInterval!==e&&this._onIsActualIntervalChange.fire(),this._onSourceHiddenMayChange()},w.PointIndexProperty=function(e,t){f.call(this),this._lineSource=e,this._pointIndex=t},inherit(w.PointIndexProperty,f),w.PointIndexProperty.prototype.value=function(){return this._lineSource.points()[this._pointIndex].index},w.PointIndexProperty.prototype.setValue=function(e){var t=this._lineSource.points()[this._pointIndex];t.index=e,this._lineSource.setPoint(this._pointIndex,t),this._lineSource._model.updateSource(this._lineSource),this._listeners.fire(this),this._lineSource.endChanging(!0),this._lineSource._syncMultichartState(),this._lineSource._properties.lastUpdateTime.setValue((new Date).valueOf())},w.prototype._syncMultichartState=function(){var e={points:this._timePoint,interval:this._model.mainSeries().interval()};this.linkKey&&this.isSynchronizable()&&a.finishChangingLineTool({model:this._model,linkKey:this.linkKey,symbol:this._model.mainSeries().symbol(),finalState:e})},w.prototype._createPointProperty=function(e){var t=this._pointsProperty.points;t.addProperty(e);var i=t[e];i.addChild("price",new w.PointPriceProperty(this,e)),i.addChild("bar",new w.PointIndexProperty(this,e))},w.prototype._createPointsProperties=function(){this._pointsProperty=new f,this._pointsProperty.addChild("points",new f);for(var e=0;e0&&(this._points=e)},w.prototype.restorePoints=function(e,t,i){this._timePoint=e,this._points=t,i||this.denormalizeTimePoints()},w.prototype.restoreExternalPoints=function(e){this.properties().interval.setValue(e.interval),this._timePoint=e.points,this.isActualSymbol()?this.createServerPoints():this.clearServerPoints()},w.prototype.restoreExternalState=function(e){this.properties().merge(e)},w.prototype.restorePositionPercents=function(e){this._positionPercents=e},w.prototype.getLinkKey=function(){return this.linkKey||null},w.prototype.updateAllViewsAndRedraw=function(){this.updateAllViews(),this._model.updateSource(this)},w.prototype.propertiesChanged=function(e){this.calcIsActualInterval(),this.updateAllViewsAndRedraw(),e||this._syncLineStyleIfNeeded()},w.prototype._syncLineStyleIfNeeded=function(){if(!this._syncLineStyleMuted&&this.linkKey){var e=this.properties().state(this._syncStateExclusions);delete e.interval,a.changeLineStyle({linkKey:this.linkKey,state:e,model:this._model})}},w.prototype._muteSyncLineStyle=function(){this._syncLineStyleMuted=!0},w.prototype._unmuteSyncLineStyleWithoutApplyingChanges=function(){this.propertiesChanged(),this._syncLineStyleMuted=!1},w.prototype.points=function(){for(var e=[],t=0;t=2&&this._properties.snapTo45Degrees&&this._snapPoint45Degree(i,this.points()[this.points().length-2]),i},w.prototype.addPoint=function(e,t,i){var n=this._preparePoint(e,t);return this._addPointIntenal(n,t,i)},w.prototype._addPointIntenal=function(e,t,i){this._points.push(e);var n=this._points.length===this.pointsCount();return n?(this._lastPoint=null,i||(this.normalizePoints(), +this.createServerPoints())):this._lastPoint=e,this._pointAdded.fire(this._points.length-1),n},w.prototype.addFixedPoint=function(e){this._fixedPoints.push(e);var t=this._fixedPoints.length===this.pointsCount();return t&&this.calcPositionPercents(),t},w.prototype.calcPositionPercents=function(){if(!this.priceScale()||this.priceScale().isEmpty())return[];this._positionPercents=[];for(var e=0;e=0;--t)e.push(this._paneViews[t]);return e},w.prototype._setPaneViews=function(e){this._paneViews=e,this._model.lightUpdate()},w.prototype.dataWindowView=function(){return null},w.prototype.statusView=function(){return null},w.prototype.isSourceHidden=function(){return!this._properties.visible.value()||a.hideAllDrawings().value()&&this.canBeHidden()||!this._isActualInterval||!this._isActualSymbol||!this._isActualCurrency},w.prototype._onSourceHiddenMayChange=function(){var e=this.isSourceHidden();e!==this._sourceHiddenPrevValue&&null===this._sourceHiddenChangedTimeoutId?this._sourceHiddenChangedTimeoutId=setTimeout(this._processHibernate.bind(this),100):e===this._sourceHiddenPrevValue&&null!==this._sourceHiddenChangedTimeoutId&&(clearTimeout(this._sourceHiddenChangedTimeoutId),this._sourceHiddenChangedTimeoutId=null)},w.prototype._processHibernate=function(){var e=this.isSourceHidden();this._sourceHiddenChangedTimeoutId=null,this._sourceHiddenPrevValue=e,e?this.isStarted()&&this.stop():this.isStarted()||this.start()},w.prototype.isSynchronizable=function(){return this.priceScale()===this._model.mainSeries().priceScale()},w.prototype.priceAxisViews=function(e,t){if(t!==this.priceScale()||this.isSourceHidden())return null +;if(this._model.lineBeingEdited()===this){var i=this._model.linePointBeingEdited();if(null!==i&&i0&&(o=-o),o},t.prototype._reversePoints=function(){var e=this._points,t=e[0],i=e[1];this._points[0]=i,this._points[1]=t,this.normalizePoints(),this.restart()},t}(o.LineDataSource)},TMWk:function(e,t,i){"use strict";var n=i("Eyy1").assert,r=i("ogJP").clone,o=i("GVHu").Study,s=i("k9/m").PlotList,a=i("w4Ji").studyPlotFunctionMap,l=i("w4Ji").studyEmptyPlotValuePredicate;function c(e,t,i,n){o.call(this,e,t,i,n),this._underlyingData=new s(a(n),l)}inherit(c,o),c.prototype.clearData=function(){o.prototype.clearData.call(this),this._underlyingData.clear()},c.prototype._mergeData=function(e){this._invalidateLastNonEmptyPlotRowCache();var t=this._underlyingData.firstIndex();this._underlyingData.merge(e),t!==this._underlyingData.firstIndex()&&(this.m_data=new s(a(this._metaInfo),l));var i=this.m_data.lastIndex();this._underlyingData.range(i,this._underlyingData.lastIndex()).each(function(e,t){return this.m_data.add(e,r(t)),!1}.bind(this)),this._plotsForStrategyProcessing().forEach((function(e){this._createStrategy(e.strategy,e.strategyIndex,e.targetIndex,i).rebuildData(this.m_data)}),this)},c.prototype._plotsForStrategyProcessing=function(){var e=["dataoffset"],t=[];return this._metaInfo.plots.forEach((function(i,r){if(e.indexOf(i.type)>-1){var o=null;this._metaInfo.plots.forEach((function(e,t){e.id===i.target&&(o=t)})),n(o>=0,"target plot not found for strategy plot "+i.id);var s={strategy:i.type,strategyIndex:r,targetIndex:o};t.push(s)}}),this),t},c.prototype._createStrategy=function(e,t,i,n){return new c["Strategy_"+e](t,i,n)},c.Strategy_dataoffset=function(e,t,i){this._strategyPlotIndex=e,this._targetPlotIndex=t,this._startIndex=i},c.Strategy_dataoffset.prototype.rebuildData=function(e){ +var t=this._targetPlotIndex+1,i=this._strategyPlotIndex+1,n=null,r=null;e.range(this._startIndex||e.firstIndex(),e.lastIndex()).each((function(o,s){var a=s[t],l=s[i]?Math.round(s[i]):null;if(s[t]=null,s[i]=null,!l||l>0)return!1;var c=o+l,u={pointIndex:c,value:a};if(r){if(r.pointIndex!==u.pointIndex){c>=0&&(e.valueAt(c)[t]=a);var h=!1;n&&(h=n.value<=r.value&&r.value<=a||n.value>=r.value&&r.value>=a),h?r.pointIndex>=0&&(e.valueAt(r.pointIndex)[t]=null):n=r,r=u}}else r=u;return!1}))},t.study_ScriptWithDataOffset=c},TTFo:function(e,t,i){"use strict";i.r(t),i.d(t,"fromPercent",(function(){return o})),i.d(t,"toPercent",(function(){return s})),i.d(t,"toPercentRange",(function(){return a})),i.d(t,"fromIndexedTo100",(function(){return l})),i.d(t,"toIndexedTo100",(function(){return c})),i.d(t,"toIndexedTo100Range",(function(){return u})),i.d(t,"toLog",(function(){return h})),i.d(t,"fromLog",(function(){return d}));var n=i("Qb4w"),r=i("Hr11");function o(e,t){return t<0&&(e=-e),e/100*t+t}function s(e,t){var i=100*(e-t)/t;return t<0?-i:i}function a(e,t){var i=s(e.minValue(),t),r=s(e.maxValue(),t);return new n.PriceRange(i,r)}function l(e,t){return t<0&&(e=-e),(e-=100)/100*t+t}function c(e,t){var i=100*(e-t)/t+100;return t<0?-i:i}function u(e,t){var i=c(e.minValue(),t),r=c(e.maxValue(),t);return new n.PriceRange(i,r)}function h(e){var t=Math.abs(e);if(t<1e-8)return 0;var i=Object(r.log10)(t+1e-4)+4;return e<0?-i:i}function d(e){var t=Math.abs(e);if(t<1e-8)return 0;var i=Math.pow(10,t-4)-1e-4;return e<0?-i:i}},TcSq:function(e,t,i){"use strict";function n(e){return e===r(e)}function r(e){var t=e.indexOf("$"),i=e.indexOf("@");return t<0&&i>=0?null:e.substring(Math.max(t+1,0),i>=0?i:e.length)}function o(e){return e.startsWith("PUB;")}function s(e){return e.startsWith("USER;")}function a(e){return e.startsWith("STD;")}function l(e){return e.includes("Candlestick%1Pattern%1")}i.r(t),i.d(t,"isPineIdString",(function(){return n})),i.d(t,"extractPineId",(function(){return r})),i.d(t,"isPublishedPineId",(function(){return o})),i.d(t,"isCustomPineId",(function(){return s})),i.d(t,"isStandardPineId",(function(){return a})),i.d(t,"isCandleStickId",(function(){return l}))},TlGQ:function(e,t,i){"use strict";i.r(t),i.d(t,"visitObject",(function(){return o}));var n=i("ogJP");function r(e,t,i){return Object(n.isArray)(e)?function(e,t,i){return e.map((function(e){var n=r(e,t,i),o=t(n);return void 0!==o?o:n}))}(e,t,i):Object(n.isObject)(e)&&(Object(n.isHashObject)(e)||i&&i.visitInstances)?function(e,t,i){var n={};return Object.keys(e).forEach((function(o){var s=r(e[o],t,i),a=t(s);n[o]=void 0!==a?a:s})),n}(e,t,i):e}function o(e,t,i){var n=r(e,t,i),o=t(n);return void 0!==o?o:n}},TmNs:function(e,t,i){"use strict";i.r(t);var n=i("mrSG"),r=i("KcY8"),o=i("Eyy1"),s=i("jFln"),a=i("8Uy/"),l=i("gAom"),c=function(){function e(e,t){this.setData(e,t)}return e.prototype.setData=function(e,t){this._data=e,this._commonData=t},e.prototype.draw=function(e,t,i,n,r,c){if(this._data.visible){var u=this._commonData.coordinate +;void 0!==this._commonData.fixedCoordinate&&(u=this._commonData.fixedCoordinate),e.lineWidth=Math.max(1,Math.floor(Object(o.ensureDefined)(this._data.linewidth)*c)),e.lineCap="butt",Object(s.setLineStyle)(e,void 0===this._data.linestyle?a.LINESTYLE_DOTTED:this._data.linestyle),e.strokeStyle=this._commonData.color,Object(l.drawHorizontalLine)(e,Math.round(u*c),0,Math.ceil(n*c))}},e.prototype.height=function(e,t){return 0},e}();i.d(t,"PriceLineAxisView",(function(){return u})),i.d(t,"SeriesPriceLineAxisView",(function(){return h})),i.d(t,"StudyPriceLineAxisView",(function(){return d}));var u=function(e){function t(){return e.call(this,c)||this}return Object(n.__extends)(t,e),t.prototype._updateRendererData=function(e,t,i){if(t.visible=!1,e.visible=!1,this._isVisible()){var n=this._value();n.noData||(i.background="",i.color=this._priceLineColor(n.color),i.coordinate=n.coordinate,i.floatCoordinate=n.floatCoordinate,e.linewidth=this._lineWidth(),e.linestyle=this._lineStyle(),e.visible=!0)}},t.prototype._lineStyle=function(){return a.LINESTYLE_DOTTED},t}(r.a),h=function(e){function t(t){var i=e.call(this)||this;return i._series=t,i}return Object(n.__extends)(t,e),t.prototype._value=function(){return this._series.lastValueData(void 0,!0)},t.prototype._priceLineColor=function(e){return this._series.priceLineColor(e)},t.prototype._lineWidth=function(){return this._series.properties().priceLineWidth.value()},t.prototype._isVisible=function(){var e=this._series.model().properties().scalesProperties.showSeriesLastValue.value();return this._series.properties().showPriceLine.value()&&e},t}(u),d=function(e){function t(t,i){var n=e.call(this)||this;return n._study=t,n._plotname=i,n}return Object(n.__extends)(t,e),t.prototype._value=function(){return this._study.lastValueData(this._plotname,!0)},t.prototype._lineWidth=function(){return this._study.properties().styles[this._plotname].linewidth.value()},t.prototype._lineStyle=function(){return a.LINESTYLE_DOTTED},t.prototype._priceLineColor=function(e){return e},t.prototype._isVisible=function(){var e=this._study.model().properties().scalesProperties.showStudyLastValue.value();return this._study.properties().styles[this._plotname].trackPrice.value()&&e},t}(u)},Tmoa:function(e,t,i){"use strict";i.r(t),i.d(t,"generateColor",(function(){return r})),i.d(t,"alphaToTransparency",(function(){return o})),i.d(t,"transparencyToAlpha",(function(){return s})),i.d(t,"resetTransparency",(function(){return a})),i.d(t,"getLuminance",(function(){return l})),i.d(t,"isHexColor",(function(){return c})),i.d(t,"colorFromBackground",(function(){return u})),i.d(t,"gradientColorAtPercent",(function(){return h})),i.d(t,"isColorDark",(function(){return d}));var n=i("eJTA");function r(e,t,i){if(t=t||0,!c(e))return i?Object(n.rgbaToString)(Object(n.rgba)(Object(n.parseRgb)(e),Object(n.normalizeAlphaComponent)(s(t)))):e;var r=Object(n.parseRgb)(e),o=r[0],a=r[1],l=r[2],u=Object(n.normalizeAlphaComponent)(s(t));return Object(n.rgbaToString)([o,a,l,u])}function o(e){return 100*(1-e)}function s(e){ +if(e<0||e>100)throw new Error("invalid transparency");return 1-e/100}function a(e){return c(e)?e:Object(n.rgbaToString)(Object(n.rgba)(Object(n.parseRgb)(e),Object(n.normalizeAlphaComponent)(1)))}function l(e){var t=Object(n.parseRgb)(e).map((function(e){return(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)}));return Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function c(e){return 0===e.indexOf("#")}function u(e){return"black"===Object(n.rgbToBlackWhiteString)(Object(n.parseRgb)(e),150)?"white":"black"}function h(e,t,i){var r=Object(n.parseRgba)(e),o=r[0],s=r[1],a=r[2],l=r[3],c=Object(n.parseRgba)(t),u=c[0],h=c[1],d=c[2],p=c[3],_=Object(n.rgba)(Math.round(o+i*(u-o)),Math.round(s+i*(h-s)),Math.round(a+i*(d-a)),l+i*(p-l));return Object(n.rgbaToString)(_)}function d(e){return l(a(e))<.5}},TohL:function(e,t,i){"use strict";i.r(t),i.d(t,"LineToolArrowMark",(function(){return p})),i.d(t,"LineToolArrowMarkLeft",(function(){return _})),i.d(t,"LineToolArrowMarkUp",(function(){return f})),i.d(t,"LineToolArrowMarkRight",(function(){return m})),i.d(t,"LineToolArrowMarkDown",(function(){return v}));var n=i("mrSG"),r=i("YFKU"),o=i("Ocx9"),s=i("Ss5c"),a=i("tc+8"),l=i.n(a),c=Object(r.t)("Arrow Mark Left"),u=Object(r.t)("Arrow Mark Up"),h=Object(r.t)("Arrow Mark Right"),d=Object(r.t)("Arrow Mark Down"),p=function(e){function t(n,r,o){var s=this,a=r||t.createProperties(null,o);return(s=e.call(this,n,a)||this)._textPaneView=null,i.e("lt-pane-views").then(function(e){var t=[new(0,i("ct+2").ArrowMarkPaneView)(s,n)];s._setPaneViews(t)}.bind(null,i)).catch(void 0),s}return Object(n.__extends)(t,e),t.prototype.paneViews=function(){var t=e.prototype.paneViews.call(this);return null!==t&&this._textPaneView&&t.push(this._textPaneView),t},t.prototype.pointsCount=function(){return 1},t.prototype.properties=function(){return e.prototype.properties.call(this)},t.prototype.template=function(){var t=e.prototype.template.call(this);return t.text=this.properties().childs().text.value(),t},t.createProperties=function(e,i){var n=new o.DefaultProperty(i,e);return t._configureProperties(n),n},t.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(i.bind(null,"5sLb")).then((function(e){return e.ArrowMarkDefinitionsViewModel}))},t.prototype._applyTemplateImpl=function(t){e.prototype._applyTemplateImpl.call(this,t),this.properties().childs().text.setValue(t.text)},t._configureProperties=function(e){s.LineDataSource._configureProperties(e),e.hasChild("text")||e.addChild("text",new l.a("")),e.addExclusion("text")},t.version=2,t}(s.LineDataSource),_=function(e){function t(t,i){return e.call(this,t,i,"linetoolarrowmarkleft")||this}return Object(n.__extends)(t,e),t.prototype.direction=function(){return"left"},t.prototype.translatedType=function(){return c},t.prototype.name=function(){return"Arrow Mark Left"},t.prototype.textAlignParams=function(){return{horzAlign:"left",vertAlign:"middle",offsetX:22,offsetY:3}},t.createProperties=function(e){ +return p.createProperties(e,"linetoolarrowmarkleft")},t}(p),f=function(e){function t(t,i){return e.call(this,t,i,"linetoolarrowmarkup")||this}return Object(n.__extends)(t,e),t.prototype.direction=function(){return"up"},t.prototype.translatedType=function(){return u},t.prototype.name=function(){return"Arrow Mark Up"},t.prototype.textAlignParams=function(){return{horzAlign:"center",vertAlign:"top",offsetX:0,offsetY:20}},t.createProperties=function(e){return p.createProperties(e,"linetoolarrowmarkup")},t}(p),m=function(e){function t(t,i){return e.call(this,t,i,"linetoolarrowmarkright")||this}return Object(n.__extends)(t,e),t.prototype.direction=function(){return"right"},t.prototype.translatedType=function(){return h},t.prototype.name=function(){return"Arrow Mark Right"},t.prototype.textAlignParams=function(){return{horzAlign:"right",vertAlign:"middle",offsetX:22,offsetY:3,forceTextAlign:!0}},t.createProperties=function(e){return p.createProperties(e,"linetoolarrowmarkright")},t}(p),v=function(e){function t(t,i){return e.call(this,t,i,"linetoolarrowmarkdown")||this}return Object(n.__extends)(t,e),t.prototype.direction=function(){return"down"},t.prototype.translatedType=function(){return d},t.prototype.name=function(){return"Arrow Mark Down"},t.prototype.textAlignParams=function(){return{horzAlign:"center",vertAlign:"bottom",offsetX:0,offsetY:20}},t.createProperties=function(e){return p.createProperties(e,"linetoolarrowmarkdown")},t}(p)},TrvT:function(e,t,i){"use strict";i.r(t),i.d(t,"CompareDataWindowView",(function(){return h}));var n=i("mrSG"),r=i("it7y"),o=i("e92V"),s=i("mMWL"),a=i("qFKp"),l=i("ogJP"),c=i("vzYV"),u=a.CheckMobile.any(),h=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n._studyCompare=t,n}return Object(n.__extends)(t,e),t.prototype._hideValues=function(){return!1},t.prototype._createValuesProvider=function(e,t){return new c.CompareValuesProvider(e,t)},t.prototype._currentIndex=function(){var e,t=this._model.crossHairSource().lockedIndex;return u&&(null===this._model.crossHairSource().pane&&void 0===t||Object(o.a)(s.tool.value())||null!==this._model.lineBeingEdited())?e=this._study.data().lastIndex():(e=this._model.crossHairSource().appliedIndex(),Object(l.isNumber)(e)||(e=this._study.data().lastIndex())),e},t}(r.StudyDataWindowView)},"U0+/":function(e,t,i){"use strict";i.r(t),i.d(t,"StudyMetaInfoRepository",(function(){return u}));i("YFKU");var n=i("Eyy1"),r=i("0YCj"),o=i.n(r),s=i("Si3H"),a=i("lCO3"),l=i("txPx"),c=Object(l.getLogger)("Chart.Studies.StudyMetaInfoRepository",{color:"#606"}),u=function(){function e(e){this._nextRequestNumber=1,this._rawStudiesMetaInfo=[],this._isReady=!1,this._metaInfoQueryQueue=[],this._javaMetaInfoQueryQueue=[],this._javaStudiesMetaInfo=[],this._pineMetaInfoCache=[],this._studiesMigrations=[],this._gateway=e}return e.prototype.requestMetaInfo=function(){var e=this;this._requestStarted();var t=this._makeNextRequestId();return c.logNormal("Requesting metainfo #"+t),new Promise((function(i){c.logNormal("Requesting studies metadata #"+t), +e._gateway.requestMetadata(t,(function(n){c.logNormal("Requesting studies metadata #"+t+" finished");var r=n.params[1].metainfo.slice();e._processLibraryMetaInfo(r),e._requestFinished(),i()}))}))},e.prototype.findById=function(e){if(!this._isReady)return this._enqueueMetaInfoQuery(e);var t=this._findStudyMetaInfo(e);return null!==t?Promise.resolve(t):"pine"===e.type?this._compilePine(e):Promise.reject("unexpected study id="+e.studyId+" with type="+e.type)},e.prototype.findByIdSync=function(e){return this._findStudyMetaInfo(e)},e.prototype.isReady=function(){return this._isReady},e.prototype.findAllJavaStudies=function(){return this._isReady?Promise.resolve(this._javaStudiesMetaInfo):this._enqueueJavaMetaInfoQuery()},e.prototype.getInternalMetaInfoArray=function(){return this._javaStudiesMetaInfo},e.prototype.getMigrations=function(){return this._studiesMigrations},e.prototype.addPineMetaInfo=function(e){return d(this._pineMetaInfoCache,e)},e.prototype._processMigrations=function(e){throw new Error("not implemented")},e.prototype._processSiteMetaInfo=function(e,t){throw new Error("not implemented")},e.prototype._processLibraryMetaInfo=function(e){for(var t=0,i=e;tn?1:i50)){var i=0,n=C(this._position1,this._position2,this._maxSpeed),r=P(this._position1,this._position2),o=[n],s=[r];if(i+=r,null!==this._position3){var a=C(this._position2,this._position3,this._maxSpeed);if(Math.sign(a)===Math.sign(n)){var l=P(this._position2,this._position3);if(o.push(a),s.push(l),i+=l,null!==this._position4){var c=C(this._position3,this._position4,this._maxSpeed);if(Math.sign(c)===Math.sign(n)){var u=P(this._position3,this._position4);o.push(c),s.push(u),i+=u}}}}for(var h,d,p=0,_=0;_=0&&e.h>=0,"Try to set invalid size to PaneWidget "+JSON.stringify(e)),this._size.equals(e)||(this._size=e,this._canvasBinding.resizeCanvas({width:e.w,height:e.h}),this._topCanvasBinding.resizeCanvas({width:e.w,height:e.h}),this._paneCell.style.width=e.w+"px",this._paneCell.style.height=e.h+"px",this._div.style.width=e.w+"px",this._div.style.height=e.h+"px",this._rowElement.classList.toggle("js-hidden",0===e.h),null!==this._legendWidget&&this._legendWidget.updateWidgetModeBySize(e),null!==this._paneControls&&this._paneControls.updateWidgetModeByWidth(e.w))},e.prototype.width=function(){return this._size.w},e.prototype.height=function(){return this._size.h},e.prototype.backgroundColor=function(){return this._chartModel().backgroundColor().value()},e.prototype.processDoubleClickOnSource=function(e){e.id()!==this._lastFinishedToolId&&this._showEditDialogForSource(e)},e.prototype.setCursorForTool=function(e,t,i){var n=m.tool.value();if(t&&t.control()&&e)this._setCursorClassName("pointer");else if(void 0===i){if(Object(m.toolIsCursor)(n)){if(this._chart.draggingSource||this._isScrolling||this._chartUndoModel()&&this._chartUndoModel().model().sourcesBeingMoved().length)return void this._setCursorClassName("grabbing");if(e&&this._options.sourceSelectionEnabled)return void this._setCursorClassName("pointer")}if("eraser"!==n)if("zoom"!==n){var r=m.cursorTool.value();"dot"!==r?"arrow"!==r?this._setCursorClassName(""):this._setCursorClassName("default"):this._setCursorClassName("dot")}else this._setCursorClassName("zoom-in");else this._setCursorClassName("eraser")}else switch(i){case N.PaneCursorType.VerticalResize:this._setCursorClassName("ns-resize");break;case N.PaneCursorType.HorizontalResize:this._setCursorClassName("ew-resize");break;case N.PaneCursorType.DiagonalNeSwResize:this._setCursorClassName("nesw-resize");break;case N.PaneCursorType.DiagonalNwSeResize: +this._setCursorClassName("nwse-resize");break;case N.PaneCursorType.Default:this._setCursorClassName("default");break;case N.PaneCursorType.Pointer:this._setCursorClassName("pointer")}},e.prototype.showContextMenuForSelection=function(e){var t=this._chartUndoModel().selection();if(!t.isEmpty()){var i=t.sources().filter((function(e){return e.hasContextMenu()}));this.showContextMenuForSources(i,e)}},e.prototype.showContextMenuForSources=function(e,t,i){return Object(n.__awaiter)(this,void 0,void 0,(function(){var r,o,s,a;return Object(n.__generator)(this,(function(n){switch(n.label){case 0:return e.length?(r=e[0],o=Object(c.merge)(Object(c.clone)(this._options.contextMenu),i||{}),s=new k.ActionsProvider(this._chart,o),r!==this._chartUndoModel().crossHairSource()?[3,1]:(r.handleContextMenuEvent(t),[2,Promise.resolve(null)])):[2,Promise.resolve(null)];case 1:return[4,s.contextMenuActionsForSources(e)];case 2:return 0===(a=n.sent()).length?[2,Promise.resolve(null)]:[2,A.ContextMenuManager.createMenu(a).then((function(e){return e.show(t),e}))];case 3:return[2]}}))}))},e.prototype.leftPriceAxisesContainer=function(){return this._lhsPriceAxisesContainer},e.prototype.rightPriceAxisesContainer=function(){return this._rhsPriceAxisesContainer},e.prototype.state=function(){return Object(r.ensureNotNull)(this._state)},e.prototype.hasState=function(){return null!==this._state},e.prototype.setState=function(e){this._state!==e&&(this.hasState()&&(this.state().onDestroyed().unsubscribeAll(this),this.state().dataSourcesCollectionChanged().unsubscribeAll(this)),this._state=e,this.hasState()&&(this.state().onDestroyed().subscribe(this,this._onStateDestroyed,!0),this.state().dataSourcesCollectionChanged().subscribe(this,this._onDataSourcesCollectionChanged),this.updatePriceAxisWidgets()))},e.prototype.getScreenshotData=function(e){var t,i=[],n=[],r=[],o=this.state().orderedSources().slice().reverse(),s=this._chart.properties().childs().paneProperties.childs().legendProperties.childs();if(s.showLegend.value()||(null==e?void 0:e.showCollapsedLegend))for(var a=0,l=o;aU.InvalidationLevel.Cursor||e.priceScaleSideMaxLevel("right")>U.InvalidationLevel.Cursor)&&this.recalculatePriceScale(),this._lhsPriceAxisesContainer.paint(e.getterForPriceScaleInvalidationLevelBySide("left")),this._rhsPriceAxisesContainer.paint(e.getterForPriceScaleInvalidationLevelBySide("right"));var i=e.fullInvalidation();if(i!==U.InvalidationLevel.None){if(i>U.InvalidationLevel.Cursor){var n=Object(r.ensureNotNull)(this._canvasBinding.canvas.getContext("2d"));n.setTransform(1,0,0,1,0,0);var o=this._canvasRenderParams();this._drawBackground(n,o),this._state&&(this._drawSources(n,o),this._drawBarsMarks(n,o,t))}if(this._state){var s=Object(r.ensureNotNull)(this._topCanvasBinding.canvas.getContext("2d"));s.setTransform(1,0,0,1,0,0);o=this._topCanvasRenderParams();s.clearRect(0,0,Math.ceil(this._size.w*o.pixelRatio),Math.ceil(this._size.h*o.pixelRatio)),this._drawCrossHair(s,o),this._drawActiveLineTools(s,o)}}}},e.prototype.cancelCreatingLineTool=function(){var e=this._chartUndoModel(),t=this._chartUndoModel().lineBeingCreated();if(t)if(t.pointsCount()<=0){var i=t.points();if(i.length>2){var n=i[i.length-2];e.continueCreatingLine(n),this._finishTool(t)}else e.cancelCreatingLine()}else e.cancelCreatingLine();null!==this._firstZoomPoint&&this.cancelZoom(),this.setCursorForTool()},e.prototype.cancelMeasuring=function(){this._chartUndoModel().crossHairSource().clearMeasure(),this.setCursorForTool()},e.prototype._topCanvasRenderParams=function(){return{pixelRatio:this._topCanvasBinding.pixelRatio,physicalWidth:this._topCanvasBinding.canvas.width,physicalHeight:this._topCanvasBinding.canvas.height,cssWidth:this._chartModel().timeScale().width(),cssHeight:this.height()}},e.prototype._canvasRenderParams=function(){return{pixelRatio:this._canvasBinding.pixelRatio,physicalWidth:this._canvasBinding.canvas.width,physicalHeight:this._canvasBinding.canvas.height,cssWidth:this._chartModel().timeScale().width(),cssHeight:this.height()}},e.prototype._tryExitTrackingMode=function(){this._exitTrackingModeOnNextTry&&(this._startTrackPoint=null,this._clearCursorPosition())},e.prototype._tryStartMeasure=function(e,t,i,n,r){return!(!Object(m.toolIsMeasure)(m.tool.value())||t.startMeasurePoint())&&(e.isTouch||this._preventCrossHairMove()||this._setCursorPosition(e.localX,e.localY,i),n=this._chartModel().magnet().align(n,r,this.state()),t.startMeasuring({price:n,index:r},this.state()),!0)},e.prototype._tryFinishMeasure=function(e,t){if(t.startMeasurePoint()&&!t.endMeasurePoint()){var i=t.price,n=t.index;return i=this._chartModel().magnet().align(i,n,this.state()),t.finishMeasure({price:i,index:n}),Object(m.resetToCursor)(),this._preventCrossHairMove()&&this._clearCursorPosition(),!0}return!1},e.prototype._tryStartZoom=function(e,t,i,n){var r=this._chart.model().model().zoomEnabled();if("zoom"===m.tool.value()&&r){var o=this._chartUndoModel(),s=o.timeScale().indexToCoordinate(i)-.5*o.timeScale().barSpacing();return this._firstZoomPoint={price:t,index:i,x:s,y:e.localY}, +this._preventCrossHairMove()||this._setCursorPosition(e.localX,e.localY,n),this._chartModel().crossHairSource().startSelection(this.state()),!0}return!1},e.prototype._tryFinishZoom=function(e){return null!==this._firstZoomPoint&&(this._finishZoom(e),!0)},e.prototype._tryHandleEraserMouseDown=function(e,t){if(e.source&&"eraser"===m.tool.value()&&!e.isCustom&&(!(r=e.source)||!r.customization||!r.customization.disableErasing)){var i=this._chartUndoModel();if(null!==e.hittest&&(Object(f.isLineTool)(e.source)||Object(_.isStudy)(e.source))){var n=e.hittest.eraseMarker();return t.control()&&void 0!==n&&e.source.processErase?e.source.processErase(i,n):i.removeSource(e.source,!1),!0}}var r;return!1},e.prototype._tryStartChangingLineTool=function(e,t,i,n){var o,s;if(e.isTouch&&null!==this._startTrackPoint)return!1;if((!e.isTouch||!this._preventSourceChange)&&t.hittest&&Object(f.isLineTool)(t.source)&&t.hittest.result()===h.HitTestResult.CHANGEPOINT){var a=this._chartUndoModel(),l=Object(r.ensure)(null===(o=this.state().mainDataSource())||void 0===o?void 0:o.firstValue()),c=Object(r.ensureNotNull)(t.source.priceScale()).coordinateToPrice(e.localY,l);a.selectionMacro((function(e){e.clearSelection(),e.addSourceToSelection(t.source)}));var u=a.model().magnet().align(c,n,this.state()),d=null===(s=t.hittest.data())||void 0===s?void 0:s.pointIndex;return this._startChangeLineToolParams={source:t.source,startPoint:{index:n,price:u},screenPoint:{x:e.localX,y:e.localY},pointIndex:d,envState:i},!0}return this._startChangeLineToolParams=null,!1},e.prototype._tryStartCloning=function(e,t,i,n){if(i.control()){var r=this._chartUndoModel().selection().sources().filter((function(e){return e.cloneable()}));if(n&&n.cloneable()&&r.push(n),r.length>0)return this._clonningAtMoveLineTools=r.map((function(e){return e.id()})),this._startCloningPoint=new o.Point(e.localX,e.localY),!0}return!1},e.prototype._tryFinishClonning=function(e,t){var i=this._chartUndoModel(),n=this._chartModel();if(t.control()&&this._clonningAtMoveLineTools){for(var s=new o.Point(e.localX,e.localY),a=Object(r.ensureNotNull)(this._startCloningPoint).subtract(s).length(),l=[],c=0,u=this._clonningAtMoveLineTools;c8){var p=this.cloneLineTools(l,!0).map((function(e){return Object(r.ensureNotNull)(i.model().dataSourceForId(e))}));i.selectionMacro((function(e){e.clearSelection(),p.forEach((function(t){e.addSourceToSelection(t)}))}));var _=new o.Point(e.localX,e.localY),f=Object(r.ensureNotNull)(p[0].priceScale()),m=Object(r.ensureNotNull)(this.state().mainDataSource()).firstValue(),v={index:i.timeScale().coordinateToIndex(e.localX),price:f.coordinateToPrice(e.localY,Object(r.ensureNotNull)(m))};i.startMovingSources(p,{logical:v,screen:_},null,t),this._clonningAtMoveLineTools=null,this._startCloningPoint=null}return!0}return!1},e.prototype._mouseDownEventForLineTool=function(e,t,i,n){var s,a;if(this.hasState()){var l=this._chartUndoModel(),c=!1,u=null,h=m.tool.value() +;Object(m.hideAllDrawings)().setValue(!1),Object(m.lockDrawings)().setValue(!1),e.isTouch&&(Object(f.isLineToolName)(h)&&"LineToolBrush"!==h||l.lineBeingCreated())&&this._initToolCreationModeParams(e);var d=l.lineBeingCreated();if(d&&"LineToolBrush"!==d.toolname){var p=Object(r.ensure)(null===(s=d.ownerSource())||void 0===s?void 0:s.firstValue());if(e.isTouch){if(!this._startTouchPoint){this._startTouchPoint=new o.Point(e.pageX,e.pageY);var _=d.points(),v=_[_.length-1],y=l.timeScale().indexToCoordinate(v.index),g=Object(r.ensureNotNull)(d.priceScale()).priceToCoordinate(v.price,p);return void(this._initCrossHairPosition=new o.Point(y,g))}}else{u=d;var b=l.model().paneForSource(d);if(b!==this._state&&null!==b){var S=this._externalPaneXCoord(b,e.localX),w=this._externalPaneYCoord(b,e.localY);c=l.continueCreatingLine({index:Math.round(l.timeScale().coordinateToIndex(S)),price:Object(r.ensure)(null===(a=d.priceScale())||void 0===a?void 0:a.coordinateToPrice(w,p))},t)}else{var P=l.model().magnet().align(n,i,this.state());c=l.continueCreatingLine({index:i,price:P},t)}}}else if(!e.isTouch||"LineToolBrush"===h){var C={index:i,price:P=l.model().magnet().align(n,i,this.state())};u=l.createLineTool(this.state(),C,h),l.lineBeingCreated()||(c=!0)}u&&l.selectionMacro((function(e){return e.addSourceToSelection(Object(r.ensureNotNull)(u))})),c&&u&&(this._finishTool(u),e.preventDefault())}},e.prototype._handleSelectionMouseDownAndGetJustDeselectedSource=function(e,t,i){var n=this._chartUndoModel(),r=null;if(t&&!t.isCustom&&Z(t.source)){var o=t.hittest&&t.hittest.result()>h.HitTestResult.MOVEPOINT_BACKGROUND;e.isTouch&&t.hittest&&t.hittest.result()===h.HitTestResult.MOVEPOINT_BACKGROUND&&(o=!0),this._preventSourceChange&&(o=!1),n.selectionMacro((function(e){var n;o?(i.control()||!t.source||e.selection().isSelected(t.source)||e.clearSelection(),i.control()&&t.source&&e.selection().isSelected(t.source)?(r=t.source,e.removeSourceFromSelection(t.source)):t.source&&!t.isCustom&&e.addSourceToSelection(t.source,(null===(n=null==t?void 0:t.hittest)||void 0===n?void 0:n.data())||void 0),e.selection().sources().length>1&&Object(F.trackEvent)("GUI","Multiselect","Click Select")):i.control()||e.clearSelection()}))}return r},e.prototype._processMouseMoveWhileZoom=function(e,t){this._preventCrossHairMove()||this._setCursorPosition(e.localX,e.localY,t)},e.prototype._setCursorPositionOnExternalPane=function(e,t,i,n){t=this._externalPaneXCoord(e,t),i=this._externalPaneYCoord(e,i),this._chart.paneByState(e)._setCursorPosition(t,i,n)},e.prototype._setCursorPosition=function(e,t,i){this._chartModel().setAndSaveCurrentPosition(this._correctXCoord(e),this._correctYCoord(t),this.state(),i)},e.prototype._setCursorClassName=function(e){var t="";e&&(t="pane--cursor-"+e),this._currentCursorClassName!==t&&(this._currentCursorClassName&&this._paneCell.classList.remove(this._currentCursorClassName),t&&this._paneCell.classList.add(t),this._currentCursorClassName=t,this._paneCell.style.cursor)},e.prototype._processMouseUpForCustomHandler=function(e){ +var t=Object(r.ensureNotNull)(this._dataSourceAtPoint(e.localX,e.localY));if(t.hittest&&t.hittest.result()===h.HitTestResult.CUSTOM){var i=t.hittest.data();Object(h.tryCallCustomHandler)(e,null==i?void 0:i.mouseUpHandler,null==i?void 0:i.touchEndHandler)}},e.prototype._crossHairShouldBeVisible=function(){var e=this._chartModel().crossHairSource();return Object(f.isLineToolName)(m.tool.value())||Object(m.toolIsMeasure)(m.tool.value())||e.startMeasurePoint()&&!e.endMeasurePoint()||null!==this._firstZoomPoint||null!==this._chartModel().lineBeingEdited()||null!==this._chartModel().lineBeingCreated()},e.prototype._clearCursorPosition=function(){this._chartModel().clearCurrentPosition()},e.prototype._dataSourceAtPoint=function(e,t){var i=null,n=null,r=null;if(!this.hasState())return null;var s=this.state(),a=s.height(),l=s.width(),c=!1,u=function(e,t,o,s){var a=r?r.result():0;e.result()>a&&(r=e,i=t,n=o,c=s)},h=this._canvasRenderParams(),p=new o.Point(e,t);this._hitTestCustomSources(h,s.customSources(d.a.Foreground),p,u);for(var _=s.hitTestSources(),f=this._chartUndoModel(),m=_.length;0=0;--y){var S;if((x=b[y].renderer(a,l))&&x.hitTest)(S=x.hitTest(p,h))&&u(S,g,x,!1)}if(this.containsMainSeries()){var w=f.barsMarksSources();for(m=0;m=0;--l){var c=t[l],u=c.paneViews(o);if(0!==u.length)for(var h=u.length-1;h>=0;--h){var d=u[h].renderer(s,a);if(null!==d){var p=d.hitTest(i,e);null!==p&&n(p,c,d,!0)}}}},e.prototype._tryStartMovingLineTool=function(e,t,i,n){var s,a;if(null===t.source||!t.source.movable()||null!==this._startTrackPoint)return!1;if(!this._preventSourceChange){var l=this._chartUndoModel(),c=Object(r.ensureNotNull)(Object(r.ensureNotNull)(this._state).mainDataSource()).firstValue(),u=Object(r.ensureNotNull)(t.source.priceScale()).coordinateToPrice(e.localY,Object(r.ensureNotNull)(c)),h=Z(t.source)?l.selection().sources():[t.source],d=new o.Point(e.localX,e.localY),p={index:n,price:u},_=null===(a=null===(s=t.hittest)||void 0===s?void 0:s.data())||void 0===a?void 0:a.itemIndex;return this._startMoveLineToolParams={source:h,startPoint:{logical:p,screen:d},itemIndex:void 0===_?null:_,envState:i},!0}return this._startMoveLineToolParams=null,!1}, +e.prototype._chartModel=function(){return this._chart.model().model()},e.prototype._chartUndoModel=function(){return this._chart.model()},e.prototype._externalPaneXCoord=function(e,t){t+=this._div.getBoundingClientRect().left+document.body.scrollLeft;var i=Object(r.ensureNotNull)(this._chart.paneByState(e)),n=i._div.getBoundingClientRect().left+document.body.scrollLeft;return i._correctXCoord(t-n)},e.prototype._externalPaneYCoord=function(e,t){t+=this._div.getBoundingClientRect().top+document.body.scrollTop;var i=Object(r.ensureNotNull)(this._chart.paneByState(e)),n=i._div.getBoundingClientRect().top+document.body.scrollTop;return i._correctYCoord(t-n)},e.prototype._correctXCoord=function(e){return Math.max(0,Math.min(e,this._size.w-1))},e.prototype._correctYCoord=function(e){return Math.max(0,Math.min(e,this._size.h-1))},e.prototype._processScroll=function(e){if(this._chart.model().model().scrollEnabled()){var t=Date.now();this._startScrollingPos||this._preventScroll()||(this._startScrollingPos={x:e.clientX,y:e.clientY,timestamp:t,localX:e.localX,localY:e.localY}),null!==this._scrollXAnimation&&this._scrollXAnimation.addPosition(e.localX,t),null!==this._scrollYAnimation&&this._scrollYAnimation.addPosition(e.localY,t);var i=this._chartUndoModel(),n=this.state().defaultPriceScale();if(this._startScrollingPos&&!this._isScrolling&&(this._startScrollingPos.x!==e.clientX||this._startScrollingPos.y!==e.clientY))return i.beginUndoMacro("scroll").setCustomFlag("doesnt_affect_save",!0),null===this._scrollXAnimation&&ne&&(this._scrollXAnimation=new x(.2,3.2,-.0026,15),this._scrollXAnimation.addPosition(this._startScrollingPos.localX,this._startScrollingPos.timestamp),this._scrollXAnimation.addPosition(e.localX,t)),this._scrollYAnimation,i.selection().isEmpty()||(n=i.selection().sources()[0].priceScale()),null===n||n.isEmpty()||(this._scrollPriceScale=n,i.startScrollPrice(this.state(),n,e.localY)),i.startScrollTime(e.localX),this._isScrolling=!0,void this.setCursorForTool();this._isScrolling&&(null!==this._scrollPriceScale&&i.scrollPriceTo(this.state(),this._scrollPriceScale,e.localY),i.scrollTimeTo(e.localX))}},e.prototype._finishScroll=function(){var e=this._chartUndoModel();e.endScrollTime(),null!==this._scrollPriceScale&&e.endScrollPrice(this.state(),this._scrollPriceScale),e.endUndoMacro(),this._isScrolling=!1,this._startScrollingPos=null,this._scrollPriceScale=null,this.setCursorForTool()},e.prototype._endScroll=function(e){var t=this;if(!this._isScrolling)return!1;var i=this._isScrolling&&this._scrollUndoCommandInStack();if(this._isScrolling){var n=Date.now();null!==this._scrollXAnimation&&this._scrollXAnimation.start(e.localX,n),null!==this._scrollYAnimation&&this._scrollYAnimation.start(e.localY,n);var r=this._chartUndoModel();if((null===this._scrollXAnimation||this._scrollXAnimation.finished(n))&&(null===this._scrollYAnimation||this._scrollYAnimation.finished(n)))return this._finishScroll(),i;var o=this._scrollXAnimation,s=this._scrollYAnimation,a=function(){if(null!==o&&!o.terminated()||null!==s&&!s.terminated()){ +var e=Date.now(),i=null===o||o.finished(e),n=null===s||s.finished(e);null===o||o.terminated()||r.scrollTimeTo(o.getPosition(e)),null===s||s.terminated()||null===t._scrollPriceScale||r.scrollPriceTo(t.state(),t._scrollPriceScale,s.getPosition(e)),i&&n?t._finishScroll():requestAnimationFrame(a)}};requestAnimationFrame(a)}return i},e.prototype._terminateActiveAnimations=function(){var e=Date.now(),t=null===this._scrollXAnimation||this._scrollXAnimation.finished(e),i=null===this._scrollYAnimation||this._scrollYAnimation.finished(e);null===this._scrollXAnimation&&null===this._scrollYAnimation||t&&i||this._finishScroll(),null!==this._scrollXAnimation&&(this._scrollXAnimation.terminate(),this._scrollXAnimation=null),null!==this._scrollYAnimation&&(this._scrollYAnimation.terminate(),this._scrollYAnimation=null)},e.prototype._preventScroll=function(){return this._trackCrosshairOnlyAfterLongTap&&this._longTap||this._contextMenuOpenedOnLastTap||Object(f.isLineToolName)(m.tool.value())||Boolean(this._chartUndoModel().lineBeingCreated())||null!==this._startTrackPoint},e.prototype._isSelectBarModeEnabled=function(){return this._chartUndoModel().crossHairSource().selectBarMode().value()},e.prototype._preventCrossHairMove=function(){return!!this._trackCrosshairOnlyAfterLongTap&&(null===this._chart.trackingModePaneWidget()&&(!!this._contextMenuOpenedOnLastTap||!this._crossHairShouldBeVisible()&&null===this._startTrackPoint))},e.prototype._finishTool=function(e){var t=this._chartUndoModel(),i=m.tool.value();if(Object(m.resetToCursor)(),this._preventCrossHairMove()&&this._clearCursorPosition(),t.selectionMacro((function(t){t.addSourceToSelection(e)})),Object(D.c)(i)){var n=t.createUndoCheckpoint();this._chart.showChartPropertiesForSource(e,B.TabNames.text,void 0,n)}this._lastFinishedToolId=e.id(),Object(V.c)(e)},e.prototype._alignSourcesThatBeingMoved=function(e,t,i,n){var s=this,a=this._chartUndoModel(),l=a.timeScale().coordinateToIndex(t);a.model().sourcesBeingMoved().forEach((function(e){if(R.enabled("charting_library_base")&&a.model().sourcesBeingMoved().some((function(e){return!e.onlyYMoving()}))){var t=e.points();if(0!==t.length){var i=t.reduce((function(e,t){return t.index=0;l--)j[l].createDrawingsCaches();this._drawSourceImpl(r.gridSource(),e,t,$,Q),this._drawWatermark(e,t);for(var c=0,u=a;c=0;l--)j[l].clearDrawingCaches()},e.prototype._drawSourceImpl=function(e,t,i,n,r){var o=this.state(),s=o.height(),a=o.width(),l=n(e,this.state());if(l)for(var c=0,u=l;c=0)&&(n.shift()||i.selectionMacro((function(e){ +return e.clearSelection()})),this._mouseDownEventForLineTool(e,n,y,v)))}if(b.hittest&&b.hittest.result()===h.HitTestResult.CUSTOM){var S=b.hittest.data();Object(h.tryCallCustomHandler)(e,null==S?void 0:S.mouseDownHandler,null==S?void 0:S.touchStartHandler)}if(!this._chart.readOnly()){if(b.hittest&&b.source&&b.hittest.result()===h.HitTestResult.CUSTOM_MOVE){S=b.hittest.data();if(b.isCustom){if(Object(h.tryCallCustomHandler)(e,null==S?void 0:S.pressedMouseMoveHandler,null==S?void 0:S.touchMoveHandler))return}else{var w=null==S?void 0:S.itemIndex;if(void 0!==w)return void i.startCustomMoving(b.source,w,e)}}var P=this._handleSelectionMouseDownAndGetJustDeselectedSource(e,b,n);if(this._tryHandleEraserMouseDown(b,n))return;var C=b.source&&Object(f.isLineTool)(b.source)&&b.source.isLocked&&b.source.isLocked();if(!(Object(m.lockDrawings)().value()||C)&&!b.isCustom){if(b.source&&b.source.userEditEnabled&&!b.source.userEditEnabled())return;if(this._tryStartChangingLineTool(e,b,n,y))return;if(b.hittest&&((g=b.hittest.result())===h.HitTestResult.MOVEPOINT||g===h.HitTestResult.MOVEPOINT_BACKGROUND&&Object(a.lastEventIsTouch)())){if(this._tryStartCloning(e,b,n,P))return;if(this._tryStartMovingLineTool(e,b,n,y))return}}if(b.source&&b.source instanceof E.PriceDataSource&&b.source.isDraggable())return void(this._chart.draggingSource=b.source)}b&&b.hittest&&b.hittest.result()===h.HitTestResult.REGULAR||(this._processing=!0)}}}},e.prototype._mouseUpOrTouchEndEvent=function(e){var t,i,n,o=this;if(this.hasState()){var s=e.isTouch&&null!==this._startTrackPoint,c=e.isTouch&&this._wasPinched;e.isTouch&&(this._wasPinched=!1,this._longTap=!1),this._startMoveLineToolParams=null,this._startChangeLineToolParams=null,this._initialCrosshairPositionBeforeAlign=null,this._processMouseUpForCustomHandler(e),this._isSelecting=!1;var u=this._chartUndoModel(),d=u.model(),_=d.crossHairSource();if(_.selection()&&null===this._firstZoomPoint){var v=this.state().lineToolsForArea(_.selection());u.selectionMacro((function(e){v.forEach((function(t){e.addSourceToSelection(t)}))})),_.clearSelection(),Object(F.trackEvent)("GUI","Multiselect","Area Select")}Object(l.emit)("mouse_up",{clientX:e.clientX,clientY:e.clientY,pageX:e.pageX,pageY:e.pageY,screenX:e.screenX,screenY:e.screenY});var y=e.isTouch&&this._touchMove;e.isTouch&&(this._touchMove=!1);var g=new p.EnvironmentState(e),b=m.tool.value();if(e.isTouch&&!y&&(Object(m.toolIsMeasure)(b)||null!==_.measurePane())){if(this._tryStartMeasure(e,_,g,_.price,_.index))return;if(this._tryFinishMeasure(e,_))return}if(e.isTouch&&!y&&"LineToolBrush"!==b&&Object(f.isLineToolName)(b)&&!u.lineBeingCreated()){if(this._chart.justActivated())return;if(_.pane!==this._state)return void this._setCursorPosition(e.localX,e.localY,g);var S=_.currentPoint(),w=this.state().defaultPriceScale(),P=Object(r.ensure)(null===(t=this.state().mainDataSource())||void 0===t?void 0:t.firstValue()),C={index:Math.round(u.timeScale().coordinateToIndex(S.x)),price:w.coordinateToPrice(S.y,P)},x=Object(r.ensureNotNull)(u.createLineTool(this.state(),C,b)) +;return u.selectionMacro((function(e){e.addSourceToSelection(x)})),u.lineBeingCreated()||(this._finishTool(x),e.preventDefault()),void(this._startTouchPoint=null)}if(u.lineBeingCreated()&&"LineToolBrush"!==(null===(i=u.lineBeingCreated())||void 0===i?void 0:i.toolname)&&e.isTouch&&this._startTouchPoint){this._startTouchPoint=null;var T=null;if(!y){var I=(T=Object(r.ensureNotNull)(u.lineBeingCreated())).points()[T.points().length-1],M=u.continueCreatingLine({index:I.index,price:I.price},new p.EnvironmentState(e));this._initCrossHairPosition=null,M&&(this._finishTool(T),e.preventDefault())}}else if(null!==this._firstZoomPoint&&this._firstZoomPoint.draggingMode)this._finishZoom(e);else{if(this._processing=!1,u.customMoveBeingProcessed()&&u.endCustomMoving(),d.lineBeingEdited())return u.endChangingLinetool(!1),void(this._preventCrossHairMove()&&this._clearCursorPosition());if("LineToolBrush"!==b||this._isSelectBarModeEnabled()){if(d.sourcesBeingMoved().length)return u.endMovingSource(!1),d.sourcesBeingMoved().forEach((function(e){o.setCursorForTool(e)})),void d.invalidate(U.InvalidationMask.cursor());if(!this._chart.readOnly()){var L=this._dataSourceAtPoint(e.localX,e.localY),O=e.localX>=0&&e.localXh.HitTestResult.MOVEPOINT_BACKGROUND||Object(a.lastEventIsTouch)())&&u.selectionMacro((function(e){e.clearSelection(),e.addSourceToSelection(Object(r.ensureNotNull)(Y.source))}))}e.isTouch&&(this._touchMove=!1)}else{var q=u.lineBeingCreated();if(null!==q&&(Object(V.c)(q),q.finish()),(w=this.state().defaultPriceScale()).isEmpty())return;if(!q)return;var K=Object(r.ensure)(null===(n=q.ownerSource())||void 0===n?void 0:n.firstValue()),Z=w.coordinateToPrice(e.localY,K);C={index:Math.round(u.timeScale().coordinateToIndex(e.localX)),price:Z} +;u.continueCreatingLine(C)}}}},e.prototype._mouseOrTouchMoveEvent=function(e){if(this.hasState()){var t=Object(r.ensureNotNull)(this._dataSourceAtPoint(e.localX,e.localY));this._processMouseMoveForCustomHandler(t,e);var i=this._chartUndoModel();if(i){var n=i.crossHairSource();null!==this._initialCrosshairPositionBeforeAlign&&(this._initialCrosshairPositionBeforeAlign=new o.Point(n.originX(),n.originY()));var s=e.localX,a=e.localY,l=new p.EnvironmentState(e);if(null===this._firstZoomPoint){var c=!1;if(!(this._chart.readOnly()||this._editDialog&&this._editDialog.isVisible())){var u=m.tool.value(),d=null;if(!this._processing&&(Object(m.toolIsCursor)(u)||"eraser"===u||l.control()||!i.lineBeingCreated())){var _=t&&t.source,v=t&&t.hittest&&t.hittest.data();c=Boolean(v&&v.hideCrosshairLinesOnHover)||!!_&&Object(f.isLineTool)(_)&&-1!==K.indexOf(_.toolname),t.hittest&&!t.isCustom&&t.hittest.result()>h.HitTestResult.MOVEPOINT_BACKGROUND?(d=t.source,t.source&&Z(t.source)&&("eraser"!==u||t.source!==i.mainSeries())?i.model().setHoveredSource(t.source,t.hittest.data()):i.model().setHoveredSource(null,null)):i.model().setHoveredSource(null,null)}if(this._options.sourceSelectionEnabled)if(this._isSelectBarModeEnabled()||t.isCustom)this._setCursorClassName("pointer");else{var y,g=(y=t.hittest&&t.hittest.data())&&y.cursorType;this.setCursorForTool(d,l,null===g?void 0:g)}if(this._updateCommonTooltip(t),null!==t.hittest&&t.hittest.result()===h.HitTestResult.CUSTOM_MOVE)switch(g=(y=t.hittest.data()||{}).cursorType){case N.PaneCursorType.VerticalResize:this._setCursorClassName("ns-resize");break;case N.PaneCursorType.HorizontalResize:this._setCursorClassName("we-resize");break;case N.PaneCursorType.DiagonalNeSwResize:this._setCursorClassName("nesw-resize");break;case N.PaneCursorType.DiagonalNwSeResize:this._setCursorClassName("nwse-resize")}}if(this._preventCrossHairMove()&&this._clearCursorPosition(),n.setLinesShouldBeHidden(c),this._chart.readOnly()&&this._options.sourceSelectionEnabled&&(!t.isCustom&&null!==t.source&&Z(t.source)?i.model().setHoveredSource(t.source,t.hittest&&t.hittest.data()):i.model().setHoveredSource(null,null)),!e.isTouch&&i.lineBeingCreated()){var b=i.lineBeingCreated(),S=null===b?null:i.model().paneForSource(b);if(null!==S&&S!==this._state)return void this._setCursorPositionOnExternalPane(S,s,a,l)}e.isTouch||this._setCursorPosition(s,a,l)}else this._processMouseMoveWhileZoom(e,l)}}},e.prototype._pressedMouseOrTouchMoveEvent=function(e){var t,i;if(this.hasState()&&!this._pinching){this._startChangeOrMoveLineToolIfNeeded(),e.isTouch&&(this._touchMove=!0,this._preventSourceChange=!1);var n=new p.EnvironmentState(e),s=this._chartUndoModel(),a=s.crossHairSource(),l=e.localX,c=e.localY;if(null!==this._initialCrosshairPositionBeforeAlign&&(this._initialCrosshairPositionBeforeAlign=new o.Point(a.originX(),a.originY())),null!==this._firstZoomPoint)return this._processMouseMoveWhileZoom(e),void(this._firstZoomPoint.draggingMode=!0);var u=m.tool.value() +;if(e.isTouch&&this._startTouchPoint&&Object(f.isLineToolName)(u)&&"LineToolBrush"!==u&&!s.lineBeingCreated()&&!this._isSelectBarModeEnabled())this._updateCrosshairPositionInToolCreationMode(e,this.state());else{var h=a.measurePane();if(e.isTouch&&this._startTouchPoint&&(Object(m.toolIsMeasure)(u)||null!==h))this._updateCrosshairPositionInToolCreationMode(e,h||this.state());else if(e.isTouch&&s.lineBeingCreated()&&"LineToolBrush"!==(null===(t=s.lineBeingCreated())||void 0===t?void 0:t.toolname)){if(this._startTouchPoint){var d=Object(r.ensureNotNull)(s.lineBeingCreated()),_=Object(r.ensureNotNull)(s.model().paneForSource(d));this._updateCrosshairPositionInToolCreationMode(e,_)}}else{if(e.isTouch&&null!==this._startTrackPoint){this._exitTrackingModeOnNextTry=!1;var v=Object(r.ensureNotNull)(this._initCrossHairPosition),y=new o.Point(l,c).subtract(this._startTrackPoint),g=v.add(y);this._setCursorPosition(g.x,g.y,n)}else e.isTouch&&this._preventCrossHairMove()||this._setCursorPosition(l,c,n);var b=this._isSelectBarModeEnabled();if(!Object(f.isLineToolName)(u)||"LineToolBrush"===u||b||n.control()){if("LineToolBrush"===u&&!b){var S=this.state().defaultPriceScale();if(S.isEmpty())return;var w=s.lineBeingCreated();if(!w)return;var P=new o.Point(e.localX,e.localY),C=Object(r.ensure)(null===(i=w.ownerSource())||void 0===i?void 0:i.firstValue());return P.price=S.coordinateToPrice(e.localY,C),P.index=Math.round(s.timeScale().coordinateToIndex(e.localX)),void((!R.enabled("charting_library_base")||P.index>=0)&&s.continueCreatingLine(P))}if(this._chart.draggingSource){var x=e.target,T=this._chart.paneByCanvas(x);T&&(T!==this?T.setDragToAnotherPaneCursor():T.setCursorForTool());var I=this._chart.timeAxisByCanvas(x);I&&I.setCursor("grabbing")}if(!s.timeScale().isEmpty()){var M=this._options.handleScroll;if(M.pressedMouseMove&&!e.isTouch||(M.horzTouchDrag||M.vertTouchDrag)&&e.isTouch)if(s.customMoveBeingProcessed())s.processCustomMove(e);else{if(s.model().lineBeingEdited()){var L=Math.round(s.timeScale().coordinateToIndex(l));return(!R.enabled("charting_library_base")||L>=0)&&s.changeLinePoint(new o.Point(l,c),n),void this.setCursorForTool()}if(s.model().sourcesBeingMoved().length)this._alignSourcesThatBeingMoved(s.model().sourcesBeingMoved(),e.localX,e.localY,n);else if(!this._tryFinishClonning(e,new p.EnvironmentState(e))){var O=Object(m.toolIsMeasure)(u)||a.startMeasurePoint()&&a.endMeasurePoint();this._chart.readOnly()||!n.control()||Object(f.isLineToolName)(u)||O?(this._processScroll(e),this._preventScroll()&&!this._preventCrossHairMove()&&null===this._startTrackPoint&&this._setCursorPosition(e.localX,e.localY,new p.EnvironmentState(e))):this._isSelecting||(a.startSelection(this.state()),this._isSelecting=!0)}}}}}}}},e.prototype._mouseOrTouchLeaveEvent=function(e){if(this.hasState()){var t=this._chartUndoModel();if(t){if(e.isTouch||this._clearCursorPosition(),t.model().setHoveredSource(null,null),null!==this._prevHoveredHittest){var i=this._prevHoveredHittest.hittest&&this._prevHoveredHittest.hittest.data() +;Object(h.tryCallCustomHandler)(e,null==i?void 0:i.mouseLeaveHandler),this._prevHoveredHittest=null}this._updateCommonTooltip(null),this._chart.unsetActivePaneWidget()}}},e.prototype._mouseDoubleClickOrDoubleTapEvent=function(e){if(this.hasState()){var t=!this._chart.readOnly()&&!Object(f.isLineToolName)(m.tool.value())&&Object(r.ensureNotNull)(this._dataSourceAtPoint(e.localX,e.localY))||null,i=t&&t.hittest&&t.source||null;if(i&&t&&t.hittest&&t.hittest.result()<=h.HitTestResult.MOVEPOINT_BACKGROUND&&!e.isTouch&&(i=null),i&&t&&!t.isCustom&&!Z(i)&&(i=null),t&&t.isCustom){if(t.hittest&&t.hittest.result()===h.HitTestResult.CUSTOM){var n=t.hittest.data();Object(h.tryCallCustomHandler)(e,null==n?void 0:n.doubleClickHandler,null==n?void 0:n.doubleTapHandler)}}else i&&t&&!t.isCustom?this.processDoubleClickOnSource(i):this._chart.readOnly()||Object(f.isLineToolName)(m.tool.value())||this._chartUndoModel().lineBeingCreated()||!this._chartUndoModel().selection().isEmpty()||this._chart.toggleMaximizePane(this)}},e.prototype._contextMenuEvent=function(e){var t=this,i=this._chartUndoModel();if(!i.crossHairSource().startMeasurePoint()||this._trackCrosshairOnlyAfterLongTap){if(!this._pinching&&(null===this._firstZoomPoint||this._trackCrosshairOnlyAfterLongTap||this.cancelZoom(),!this.hideInplaceEditor())){if(!Object(m.toolIsCursor)(m.tool.value())&&!this._isSelectBarModeEnabled()){if(e.isTouch)return;return Object(m.resetToCursor)(!0),this.setCursorForTool(),void(i.lineBeingCreated()&&i.cancelCreatingLine())}if(this._options.contextMenuEnabled){var n=this._dataSourceAtPoint(e.localX,e.localY),r=n&&!n.isCustom?n.source:null;if(e.isTouch&&null!==this._startTrackPoint){if(this._preventSourceChange)return;this._clearCursorPosition()}e.isTouch&&(this._contextMenuOpenedOnLastTap=!0,this._startTrackPoint=null),this._contextMenuX=e.localX,this._contextMenuY=e.localY;var o=n&&n.hittest?n.hittest.result():0,s=o>=h.HitTestResult.REGULAR||o>=h.HitTestResult.MOVEPOINT_BACKGROUND&&e.isTouch;if(n&&n.isCustom){if(s&&n.hittest&&n.hittest.result()===h.HitTestResult.CUSTOM){var a=n.hittest.data();Object(h.tryCallCustomHandler)(e,null==a?void 0:a.contextMenuHandler,null==a?void 0:a.touchContextMenuHandler)}}else{this._chart.updateActions();var l=!1;i.selectionMacro((function(i){null!==r&&s?(i.selection().isSelected(r)||(i.clearSelection(),i.addSourceToSelection(r)),l=r.hasContextMenu()):(t._options.contextMenu.general&&t._contextMenu(e).then((function(t){t.show(e)})),i.clearSelection())})),l&&(r&&!Z(r)?this.showContextMenuForSources([r],e):this.showContextMenuForSelection(e))}}}}else i.crossHairSource().clearMeasure()},e.prototype._onMouseEvent=function(){this._preventSourceChange=!1,this._startTrackPoint=null,this._trackCrosshairOnlyAfterLongTap=!1},e.prototype._onTouchEvent=function(){this._trackCrosshairOnlyAfterLongTap=!0},e.prototype._switchTrackingModeFromAnotherPaneIfNeeded=function(e){var t=this._chart.trackingModePaneWidget();if(null!==t&&t!==this){var i=this._chartModel().crossHairSource().currentPoint();this._chart.exitTrackingMode(), +this.startTrackingMode(new o.Point(e.localX,e.localY),new o.Point(i.x,e.localY),new p.EnvironmentState(e))}},e.prototype._contextMenu=function(e){var t=function(e){return e instanceof j.Separator},i=this._customActions(),n=this._initActions(e).filter((function(e){return null!==e}));i.remove.forEach((function(e){for(var t=0;t0;o--)t(r[o])&&t(r[o-1])&&r.splice(o,1);return r.length&&t(r[0])&&r.splice(0,1),r.length&&t(r[r.length-1])&&r.splice(r.length-1,1),A.ContextMenuManager.createMenu(r,{statName:"ChartContextMenu"})},e.prototype._loadAndCreateLegendWidget=function(){var e=this;Promise.all([i.e(70),i.e(12),i.e("chart-widget-gui")]).then(i.bind(null,"sAH5")).then((function(t){if(!e._isDestroyed){var i=t.LegendWidget,n=Object(u.deepExtend)({},e._options.legendWidget);n.canShowSourceCode=!e._chart.onWidget()&&!s.CheckMobile.any(),n.readOnlyMode=n.readOnlyMode||e._chart.readOnly(),n.statusesWidgets={sourceStatusesEnabled:e._options.sourceStatusesWidgetEnabled,sourceStatuses:e._options.sourceStatusesWidget||{},marketStatusEnabled:e._options.marketStatusWidgetEnabled,marketStatus:e._options.marketStatusWidget||{},dataUpdateModeEnabled:e._options.chartWarningWidgetEnabled,dataUpdateMode:e._options.chartWarningWidget||{},dataProblemEnabled:e._options.dataProblemWidgetEnabled};var o=new I.a(e._getHideNotMainSourcesValue());e._hideNotMainSourcesInLegendSpawn=Object(M.a)((function(){return{}}),e._chart.chartWidgetCollection().activeChartWidget,e._chart.chartWidgetCollection().lock.crosshair),e._hideNotMainSourcesInLegendSpawn.subscribe((function(){o.setValue(e._getHideNotMainSourcesValue())})),e._legendWidget=new i(e._chartUndoModel(),e,e._chart.backgroundBasedTheme(),o,n,{showContextMenuForSelection:e.showContextMenuForSelection.bind(e),showContextMenuForSources:e.showContextMenuForSources.bind(e),updateActions:e._chart.updateActions.bind(e._chart),showChartPropertiesForSource:e._chart.showChartPropertiesForSource.bind(e._chart),showGeneralChartProperties:e._chart.showGeneralChartProperties.bind(e._chart),showObjectsTreeDialog:e._chart.showObjectsTreeDialog.bind(e._chart)}),e._div.appendChild(e._legendWidget.getElement()),e._legendWidget.updateLayout(),e._legendWidget.updateWidgetModeBySize(e._size),e._legendWidget.updateThemedColors(e._themedTopColor);for(var a=0,l=Array.from(e._customLegendWidgetsFactoryMap.keys());a0&&void 0!==arguments[0]?arguments[0]:{},i=t.fields,n=t.confirm,r=t.manager,s=t.title,a=void 0===s?"":s,l=t.destroyOnClose,c=void 0===l||l,u=t.modal,h=void 0!==u&&u;o(this,e),this._form=document.createElement("div"),this._fields=i,this._appendFieldsToForm(),this._title=a,this._destroyOnClose=c,this._modal=h,this._manager=r,this._isConfirmDialogOpened=!1,n&&(this._needCheckConfirm=!0,this._shouldShowConfirm=n.shouldShowDialog,this._getConfirmMessage=n.getMessage)}return n(e,[{key:"setField",value:function(e,t){this._fields.find((function(t){return t.name===e})).value=t}},{key:"show",value:function(){var e=this,t=this._createDialog();return new Promise((function(i){t.then((function(t){t.on("action:submit",(function(t){return e._onSubmit(t,i)})),t.open(),t.on("beforeClose",e._unmountFields.bind(e)),e._fields[0].select()}))}))}},{key:"_appendFieldsToForm",value:function(){var e=this;this._fields.forEach((function(t){t.appendTo(e._form)}))}},{key:"_createDialog", +value:function(){var e=this;return new Promise((function(t){Promise.all([i.e("dialogs-core"),i.e(55),i.e(0),i.e(15),i.e("create-dialog")]).then(function(n){var r=i("YDhE").createDialog;t(r({type:e._modal?"modal":"popup",title:e._title,content:$(e._form),actionsWrapTemplate:'
    ',width:470,destroyOnClose:e._destroyOnClose,manager:e._manager,isClickOutFn:function(){if(e._isConfirmDialogOpened)return!1},actions:[{name:"submit",type:"primary",text:window.t("Save"),key:13,addClass:"js-submit-button"},{name:"cancel",type:"default",text:window.t("Cancel"),method:"close",addClass:"js-cancel-button"}]}))}.bind(null,i)).catch(i.oe)}))}},{key:"_onSubmit",value:function(e,t){var i=this,n=this._validate();if(n)e.error(n.error),n.focus();else{if(!this._needCheckConfirm)return t(this._collectValues(),e),void e.close();Promise.resolve(this._shouldShowConfirm(this._collectValues())).then((function(n){if(!n)return t(i._collectValues(),e),void e.close();i._showConfirmDialog().then((function(n){n===a&&(e.focus(),i._fields[0].focus()),n===s&&(t(i._collectValues(),e),e.close())}))}))}}},{key:"_showConfirmDialog",value:function(){var e=this;return new Promise((function(t){Promise.resolve(e._getConfirmMessage(e._collectValues())).then((function(i){e._isConfirmDialogOpened=!0,(0,r.createConfirmDialog)({type:"modal",content:document.createTextNode(i),manager:e._manager}).then((function(i){i.on("action:yes",(function(e){t(s),e.close()})),i.on("afterClose",(function(){t(a),e._isConfirmDialogOpened=!1})),i.open()}))}))}))}},{key:"_validate",value:function(){return this._fields.find((function(e){return!e.valid}))}},{key:"_collectValues",value:function(){return this._fields.reduce((function(e,t){return e[t.name]=t.value,e}),{})}},{key:"_unmountFields",value:function(){this._fields.forEach((function(e){e.unmount&&e.unmount()}))}}]),e}()},ULlu:function(e,t,i){"use strict";function n(e){return e[0]}function r(e,t,i){return"string"!=typeof t?e:null==i?(e.removeAttribute(t),e):(e.setAttribute(t,String(i)),e)}function o(e,t){return"string"==typeof t&&e.classList.add(t),e}function s(e,t){return void 0===t||(null===t&&(e.innerHTML=""),"string"!=typeof t&&"number"!=typeof t||(e.innerHTML=String(t))),e}function a(e){var t=window.getComputedStyle(e);return[t.paddingLeft,t.paddingRight].reduce((function(e,t){return e-Number((t||"").replace("px",""))}),e.clientWidth)}function l(e){var t=window.getComputedStyle(e);return[t.paddingTop,t.paddingBottom].reduce((function(e,t){return e-Number((t||"").replace("px",""))}),e.clientHeight)}function c(e,t){var i;i=function(i){return i(e).trigger(t)},window.jQuery&&i(window.jQuery)}i.r(t),i.d(t,"unwrap",(function(){return n})),i.d(t,"attr",(function(){return r})),i.d(t,"addClass",(function(){return o})),i.d(t,"html",(function(){return s})),i.d(t,"contentWidth",(function(){return a})),i.d(t,"contentHeight",(function(){return l})),i.d(t,"trigger",(function(){return c}))},UlDV:function(e,t,i){"use strict";i.r(t), +i.d(t,"RestrictedToolsetBootloader",(function(){return r}));var n=i("mrSG"),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype._startLoading=function(){return Promise.all([i.e("react"),i.e(1),i.e(4),i.e(7),i.e(9),i.e(23),i.e(24),i.e(26),i.e(27),i.e(33),i.e(43),i.e(46),i.e(59),i.e(64),i.e(67),i.e(68),i.e(0),i.e(2),i.e(12),i.e(14),i.e(18),i.e(52),i.e("restricted-toolset")]).then(i.bind(null,"miV2")).then((function(e){return e.getRestrictedToolSet()}))},t}(i("cZRT").a)},UqOQ:function(e,t,i){"use strict";i.d(t,"a",(function(){return c}));var n=i("mrSG"),r=i("aIyQ"),o=i.n(r),s=i("e3/o");function a(e){return e.properties().visible.value()}function l(e){return!a(e)}var c=function(){function e(e,t,i){this._onChanged=new o.a,this._lineToolsSet=new Set,this._lineTools=Object(n.__spreadArrays)(e),this._lineToolsSet=new Set(this._lineTools),this._name=t,this.id=i||Object(s.randomHashN)(6)}return e.prototype.lineTools=function(){return this._lineTools},e.prototype.name=function(){return this._name},e.prototype.setName=function(e){var t=this;this._doAndFireOnChange((function(){t._name=e}))},e.prototype.isActualSymbol=function(){return this._lineTools.length>0&&this._lineTools[0].isActualSymbol()&&this._lineTools[0].isActualCurrency()},e.prototype.symbol=function(){return this._lineTools[0].symbol()},e.prototype.containsLineTool=function(e){return this._lineToolsSet.has(e)},e.prototype.addLineTools=function(e){var t=this;this._doAndFireOnChange((function(i){var n;e.forEach((function(n){t._lineToolsSet.add(n),i.push.apply(i,e.map((function(e){return e.id()})))})),(n=t._lineTools).push.apply(n,e)}))},e.prototype.excludeLineTool=function(e){var t=this;this._doAndFireOnChange((function(i){t._lineToolsSet.delete(e);var n=t._lineTools.indexOf(e);t._lineTools.splice(n,1),i.push(e.id())}))},e.prototype.excludeLineTools=function(e){var t=this;this._doAndFireOnChange((function(i){var n=new Set(e);e.forEach((function(e){return t._lineToolsSet.delete(e)})),t._lineTools=t._lineTools.filter((function(e){return!n.has(e)})),i.push.apply(i,e.map((function(e){return e.id()})))}))},e.prototype.state=function(){return{id:this.id,name:this._name,tools:this._lineTools.map((function(e){return e.id()}))}},e.prototype.visibility=function(){var e=this._lineTools.some(a),t=this._lineTools.some(l);return e&&!t?"Visible":t&&!e?"Invisible":"Partial"},e.prototype.locked=function(){var e=this._lineTools.some((function(e){return e.properties().frozen.value()})),t=this._lineTools.some((function(e){return!e.properties().frozen.value()}));return e&&!t?"Locked":t&&!e?"Unlocked":"Partial"},e.prototype.isActualInterval=function(){var e=this._lineTools.some((function(e){return e.isActualInterval()})),t=this._lineTools.some((function(e){return!e.isActualInterval()}));return e&&!t?"IsActualInterval":t&&!e?"IsNotActualInterval":"Partial"},e.prototype.onChanged=function(){return this._onChanged},e.fromState=function(t,i){for(var n=[],r=0,o=i.tools;r0?new e(n,i.name,i.id):null},e.prototype._doAndFireOnChange=function(e){var t=[],i=this.visibility(),n=this.locked(),r=this.name(),o=this.isActualInterval();e(t);var s={affectedLineTools:t,visibilityChanged:this.visibility()!==i,lockedChanged:n!==this.locked(),titleChanged:r!==this.name(),isActualIntervalChanged:o!==this.isActualInterval()};this._onChanged.fire(s)},e}()},V086:function(e,t,i){"use strict";var n=i("aO4+").Point,r=i("GEp6").distanceToLine,o=i("Ss5c").LineDataSource,s=i("Ocx9").DefaultProperty,a=window.t("Ellipse");function l(e,t){var n=t||l.createProperties();o.call(this,e,n),this.version=l.version,i.e("lt-pane-views").then(function(e){var t=i("obU/").EllipsePaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}inherit(l,o),l.prototype.startChanging=function(e,t){if(o.prototype.startChanging.call(this,e,t),0===e||1===e){var i=this.pointToScreenPoint(this._points[0])[0],n=this.pointToScreenPoint(this._points[1])[0],s=this.pointToScreenPoint(this._points[2])[0];this._dist=r(i,n,s).distance||0}},l.prototype._preparePoint=function(e,t){var i=this._preparePointInternal(e,t,!1);return t&&t.shift()&&this._points[0].index===this._points[1].index&&this._fixVerticalDiameterPoints(this._points[1],this._points[0],i),i},l.prototype._preparePointInternal=function(e,t,i){var r=Object.assign({},e);if(t&&t.shift()){var s=this.points().length;if(!this._fakePointAdded&&3===s&&!i)return r;if(this._fakePointAdded||2===s||i){this._snapPoint45Degree(e,this._points[0]),this._fakePointAdded?this._points[1]=e:i||(this._fakePointAdded=!0,o.prototype._addPointIntenal.call(this,e));var a=this.pointToScreenPoint(this._points[0])[0],l=this.pointToScreenPoint(this._points[1])[0],c=l.x-a.x,u=l.y-a.y,h=Math.sqrt(c*c+u*u)/2,d=l.subtract(a),p=a.add(l).scaled(.5),_=new n(-d.y,d.x);_=_.normalized();var f=p.add(_.scaled(h));r=this.screenPointToPoint(f),(TradingView.isNaN(r.price)||TradingView.isNaN(r.index))&&(r=this.screenPointToPoint(p))}}else this._fakePointAdded&&(this._points.splice(1,1),this._fakePointAdded=!1);return r},l.prototype._fixVerticalDiameterPoints=function(e,t,i){var n=this.pointToScreenPoint(e)[0],r=this.pointToScreenPoint(t)[0],o=this._model.timeScale(),s=o.indexToCoordinate(e.index),a=o.indexToCoordinate(i.index),l=2*Math.abs(s-a);l*=t.price>e.price?1:-1,e.price=this.screenPointToPoint({x:n.x,y:r.y+l}).price},l.prototype.addPoint=function(e,t,i){var n=o.prototype.addPoint.call(this,e,t,i);return n&&(this._fakePointAdded=!1),n},l.prototype.setPoint=function(e,t,i){var o=Object.assign({},t),s=this.pointToScreenPoint(this._points[0])[0],a=this.pointToScreenPoint(this._points[1])[0],l=this.pointToScreenPoint(this._points[2])[0];switch(e){case 0:if(i&&i.shift()){this._snapPoint45Degree(o,this._points[1]),this._points[0]=o,this._points[2]=this._preparePointInternal(this._points[2],i,!0),this._points[0].index===this._points[1].index&&this._fixVerticalDiameterPoints(this._points[0],this._points[1],this._points[2]);break}s=this.pointToScreenPoint(o)[0] +;var c=a.subtract(s),u=s.add(a).scaled(.5);d=(d=new n(-c.y,c.x)).normalized(),l=u.add(d.scaled(this._dist)),l=this.screenPointToPoint(l),this._points[0]=o,this._points[2]=l;break;case 1:if(i&&i.shift()){this._snapPoint45Degree(o,this._points[0]),this._points[1]=o,this._points[2]=this._preparePointInternal(this._points[2],i,!0),this._points[0].index===this._points[1].index&&this._fixVerticalDiameterPoints(this._points[1],this._points[0],this._points[2]);break}c=(a=this.pointToScreenPoint(o)[0]).subtract(s),u=s.add(a).scaled(.5);d=(d=new n(-c.y,c.x)).normalized(),l=u.add(d.scaled(this._dist)),l=this.screenPointToPoint(l),this._points[1]=o,this._points[2]=l;break;case 2:o=this.pointToScreenPoint(o)[0];var h=r(s,a,o).distance;c=a.subtract(s),u=s.add(a).scaled(.5);d=(d=new n(-c.y,c.x)).normalized(),l=u.add(d.scaled(h)),l=this.screenPointToPoint(l),this._points[2]=l;break;case 3:o=this.pointToScreenPoint(o)[0];var d;h=r(s,a,o).distance,c=a.subtract(s),u=s.add(a).scaled(.5);d=(d=new n(-c.y,c.x)).normalized(),l=u.add(d.scaled(h)),l=this.screenPointToPoint(l),this._points[2]=l}this.normalizePoints()},l.prototype.pointsCount=function(){return 3},l.prototype.translatedType=function(){return a},l.prototype.name=function(){return"Ellipse"},l.prototype.hasEditableCoordinates=function(){return!1},l.version=2,l.prototype.migrateVersion=function(e,t,i){if(1===e&&2===this._points.length){var n=this._points[0].price,r=.5*(this._points[0].price+this._points[1].price);this._points[0]={price:r,index:this._points[0].index},this._points[1]={price:r,index:this._points[1].index},this._points.push({price:n,index:this._points[0].index})}if(1===e&&2===this._timePoint.length){n=this._timePoint[0].price,r=.5*(this._timePoint[0].price+this._timePoint[1].price);this._timePoint[0].price=r,this._timePoint[1].price=r;var o={price:n,offset:this._timePoint[0].offset,time_t:this._timePoint[0].time_t};this._timePoint.push(o)}},l.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("Zd1D").GeneralFiguresDefinitionsViewModel}.bind(null,i)).catch(i.oe)},l.createProperties=function(e){var t=new s("linetoolellipse",e);return l._configureProperties(t),t},l._configureProperties=function(e){o._configureProperties(e)},t.LineToolEllipse=l},V0al:function(e,t,i){"use strict";i.r(t),i.d(t,"PaneRendererXCross",(function(){return s}));var n=i("mrSG"),r=i("2WC2"),o=i("aO4+"),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype._drawItemShapeUsingCSSPixels=function(e,t){var i=t.width,n=t.height,r=t.x-i/2,o=t.vertOffset,s=t.y-n/2+o;e.moveTo(r,s),e.lineTo(r+i,s+n),e.moveTo(r,s+n),e.lineTo(r+i,s)},t.prototype._calcBoundingBox=function(t){var i=t.width,n=t.height,r=t.x-i/2,s=t.vertOffset,a=t.y-n/2+s,l=r,c=r+i,u=a,h=a+n,d=new o.Point(l,u),p=new o.Point(c,h),_=Object(o.box)(d,p),f=e.prototype._calcBoundingBox.call(this,t);return f&&(_=this._unionBox(_,f)),_},t}(r.c)},V3Oj:function(e,t,i){"use strict";i.r(t), +i.d(t,"LineToolText",(function(){return d})),i.d(t,"LineToolTextAbsolute",(function(){return p}));var n=i("mrSG"),r=i("Eyy1"),o=i("YFKU"),s=i("Ss5c"),a=i("tc+8"),l=i.n(a),c=i("Ocx9"),u=Object(o.t)("Text",{context:"tool"}),h=Object(o.t)("Anchored Text"),d=function(e){function t(n,r){var o=this,s=r||t.createProperties();return(o=e.call(this,n,s)||this)._barSpacing=n.timeScale().barSpacing(),i.e("lt-pane-views").then(function(e){var t=i("mr3a").TextPaneView;o._setPaneViews([new t(o,n)])}.bind(null,i)).catch(void 0),o}return Object(n.__extends)(t,e),t.prototype.setPoint=function(e,t,i){var n,r=this.properties().childs();if(0===e&&r.wordWrapWidth.value()){var o=this.model().timeScale();n=this.isFixed()?this.fixedPoints()[0].x:o.indexToCoordinate(this.points()[0].index);var s=o.indexToCoordinate(t.index)-n-~~(r.fontsize.value()/6);if(!isFinite(s))return;r.wordWrapWidth.setValue(Math.max(100,s))}},t.prototype.pointsCount=function(){return 1},t.prototype.translatedType=function(){return u},t.prototype.name=function(){return"Text"},t.prototype.setPriceScale=function(t){e.prototype.setPriceScale.call(this,t),t&&t.priceRange()&&(this._priceDencity=t.height()/Object(r.ensureNotNull)(t.priceRange()).length(),this._isPriceDencityLog=t.isLog())},t.prototype.restoreSize=function(){var e=Object(r.ensureNotNull)(this.priceScale());this._barSpacing=this.model().timeScale().barSpacing(),this._priceDencity=e.height()/Object(r.ensureNotNull)(e.priceRange()).length(),this.updateAllViews(),this._model.updateSource(this)},t.prototype.properties=function(){return e.prototype.properties.call(this)},t.prototype.template=function(){var t=e.prototype.template.call(this);return t.text=this.properties().childs().text.value(),t},t.prototype.state=function(t){var i=e.prototype.state.call(this,t);return t&&(i.state.fixedSize=!1),i},t.prototype.barSpacing=function(){return this._barSpacing},t.prototype.priceDencity=function(){return this._priceDencity},t.prototype.isPriceDencityLog=function(){return this._isPriceDencityLog},t.prototype.hasEditableCoordinates=function(){return!1},t.createProperties=function(e){var i=new c.DefaultProperty("linetooltext",e);return t._configureProperties(i),i},t.prototype._applyTemplateImpl=function(t){e.prototype._applyTemplateImpl.call(this,t),this.properties().childs().text.setValue(t.text)},t.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(i.bind(null,"QWxu")).then((function(e){return e.TextDefinitionsViewModel}))},t._configureProperties=function(e){s.LineDataSource._configureProperties(e),e.hasChild("text")||e.addChild("text",new l.a(window.t("Text"))),e.addExclusion("text")},t}(s.LineDataSource),p=function(e){function t(i,n){var r=n||t.createProperties();return e.call(this,i,r)||this}return Object(n.__extends)(t,e),t.prototype.translatedType=function(){return h},t.prototype.name=function(){return"Anchored Text"},t.prototype.hasEditableCoordinates=function(){return!1},t.prototype.isFixed=function(){return!0}, +t.createProperties=function(e){var i=new c.DefaultProperty("linetooltextabsolute",e);return t._configureProperties(i),i},t._configureProperties=function(e){d._configureProperties(e)},t}(d)},VNzU:function(e,t,i){"use strict";i.r(t);var n=i("mrSG");i("Dq3s");i.d(t,"layouts",(function(){return s})),i.d(t,"isSingleLayout",(function(){return a})),i.d(t,"isMultipleLayout",(function(){return l}));var r,o={s:{title:"1 chart",count:1,sizer:function(e,t){if(0!==t)throw new RangeError("invalid index");return e}}};r={};var s=Object(n.__assign)(Object(n.__assign)({},o),r);function a(e){return"s"===e}function l(e){return!a(e)}},VVxS:function(e,t,i){"use strict";const{getLogger:n}=i("txPx"),r=n("TVLocalStorage");var o=function(){try{this.isAvailable=!0,this.localStorage=window.localStorage,this.localStorage.setItem("tvlocalstorage.available","true")}catch(e){delete this.isAvailable,delete this.localStorage}this._updateLength();try{this._report()}catch(e){}};o.prototype._report=function(){if(this.isAvailable){const t=10,i=[];for(let e=0;et.length-e.length);const n=i.slice(0,t);i.sort((e,t)=>t.key.length-e.key.length);const o=i.slice(0,t);r.logNormal("Total amount of keys in Local Storage: "+this.length),r.logNormal(`Top ${t} keys with longest values: ${JSON.stringify(n)}`),r.logNormal(`Top ${t} longest key names: ${JSON.stringify(o)}`);try{navigator.storage.estimate().then(e=>{r.logNormal("Storage estimate: "+JSON.stringify(e))})}catch(e){}}},o.prototype.length=0,o.prototype.isAvailable=!1,o.prototype.localStorage={"tvlocalstorage.available":"false"},o.prototype._updateLength=function(){if(this.isAvailable)this.length=this.localStorage.length;else{var e,t=0;for(e in this.localStorage)this.localStorage.hasOwnProperty(e)&&t++;this.length=t}},o.prototype.key=function(e){return this.isAvailable?this.localStorage.key(e):Object.keys(this.localStorage)[e]},o.prototype.getItem=function(e){return this.isAvailable?this.localStorage.getItem(e):void 0===this.localStorage[e]?null:this.localStorage[e]},o.prototype.setItem=function(e,t){this.isAvailable?this.localStorage.setItem(e,t):this.localStorage[e]=t,this._updateLength()},o.prototype.removeItem=function(e){this.isAvailable?this.localStorage.removeItem(e):delete this.localStorage[e],this._updateLength()},o.prototype.clear=function(){this.isAvailable?this.localStorage.clear():this.localStorage={},this._updateLength()};var s=function(e){this.storage=e};s.prototype.getItem=function(e){return Promise.resolve(this.storage.getItem(e))},s.prototype.setItem=function(e,t){return Promise.resolve(this.storage.setItem(e,t))},window.TVLocalStorage=new o,window.TVLocalStorageAsync=new s(window.TVLocalStorage),e.exports={TVLocalStorage:window.TVLocalStorage,TVLocalStorageAsync:window.TVLocalStorageAsync}},VaSN:function(e,t,i){"use strict";i.r(t),i.d(t,"lastEventIsTouch",(function(){return o})),i.d(t,"lastEventIsMouse",(function(){return s})),i.d(t,"setLastEventIsTouch",(function(){return a +}));var n=i("qFKp"),r=Object(n.supportTouch)();function o(){return r}function s(){return r}function a(e){r=e}},VdBB:function(e,t,i){"use strict";function n(e,t,i){if(e.isTouch){if(void 0!==i)return i(e),!0}else if(void 0!==t)return t(e),!0;return!1}i.r(t),i.d(t,"tryCallCustomHandler",(function(){return n})),i.d(t,"HitTestResult",(function(){return r}));var r=function(){function e(e,t,i){this._result=e,this._data=t||null,this._eraseMarker=i}return e.prototype.result=function(){return this._result},e.prototype.data=function(){return this._data},e.prototype.eraseMarker=function(){return this._eraseMarker},e.MOVEPOINT_BACKGROUND=1,e.REGULAR=2,e.MOVEPOINT=3,e.CHANGEPOINT=4,e.CUSTOM=5,e.CUSTOM_MOVE=6,e}()},Vdly:function(e,t,i){"use strict";(function(e){i("qFKp");i("BHQF").fetch;var t=i("dTSQ").regExpEscape,n=i("FBuY").TVXWindowEvents,r=i("VVxS").TVLocalStorage,o=i("aIyQ"),s=i("Kxc7"),a=["s.tradingview.com","betacdn.tradingview.com"],l=s.enabled("use_localstorage_for_settings"),c=window.TVSettings=function(){var e=!1,i=null;function u(){return!i&&l}try{e=!TradingView.onWidget()&&parent&&parent!==window&&!!parent.IS_DEMO_PAGE}catch(M){}if(e){var h={"widgetbar.layout-settings":{widgets:{},settings:{minimized:!0}},notShowMainWizard:!0},d=function(e,t,i){var n=h[e];return null==n?t:n},p=function(){};return{loaded:!1,loadedModel:!1,getValue:d,getJSON:d,getBool:d,getFloat:d,getInt:d,setValue:p,setJSON:p,remove:p,keys:function(){return Object.keys(h)},keysMask:function(){return[]},sync:p,onSync:{subscribe:function(){}}}}window.environment;var _,f=TradingView.onWidget()?"tradingview-widget":"tradingview",m={},v=[/^widgetbar\.widget\.watchlist.+/,/.+quicks$/,/^widgetbar\.layout-settings$/,/^ChartSideToolbarWidget\.visible$/,/^onwidget\.watchlist$/,/^domepanel.visible$/,/^orderpanel.visible$/,/^chart\.favoriteDrawings$/,/^chart\.favoriteDrawingsPosition$/,/^loadChartDialog.favorites$/,/^ChartFavoriteDrawingToolbarWidget\.visible/,/^trading\.chart\.proterty$/,/^trading_floating_toolbar\.position$/,/^trading\.orderWidgetMode\./,/^symbolWatermark$/,/^pinereference\.size$/,/^pinereference\.position$/,/^hint\.+/];function y(e){return f+"."+e}function g(e,t){var i=m[e];return null==i?t:i}function b(e,t,i){i=i||{};var n=""+t;return m[e]!==n&&(m[e]=n,w(e)),i.forceFlush&&!_&&(_=setTimeout((function(){_=void 0,P()}),10)),c}function S(e,t){return t=t||{},null!=m[e]&&(delete m[e],w(e)),t.forceFlush&&P(),c}function w(e){if(i)null==m[e]?i.removeValue(e):i.setValue(e,m[e]);else if(u())try{null==m[e]?r.removeItem(y(e)):r.setItem(y(e),m[e])}catch(M){}else 0;n.emit("settings",JSON.stringify({key:e,value:m[e]}))}function P(e){}function C(){return Object.keys(m)}function x(e){for(var t=0;t=0;o--)e.test(n[o])&&r.push(n[o]),e.lastIndex=0;return r},sync:function(e){i?T(i.initialSettings||{}):u()?(function(){if(TradingView.onWidget()&&a.includes(window.location.host))for(var e=r.length;e--;){var t=r.key(e);if(0===t.indexOf("tradingview.")){var i=t.replace("tradingview.",f+".");r.setItem(i,r.getItem(t)),r.removeItem(t)}}}(),function(){m={};for(var e=f+".",t=!s.enabled("save_chart_properties_to_local_storage"),i=r.length;i--;){var n=r.key(i);if(n&&n.substring(0,e.length)===e){var o=n.substring(e.length);t&&!x(o)||(m[o]=r.getItem(n))}}}()):T(e||{}),I.fire()},onSync:I,setSettingsAdapter:function(e){i=e}}}();e&&e.exports&&(e.exports=c)}).call(this,i("YuTi")(e))},VgjZ:function(e,t,i){"use strict";i.r(t),i.d(t,"PriceAxisRendererOptionsProvider",(function(){return o}));var n=i("XlJ7"),r=i("zDbI"),o=function(){function e(e){this._rendererOptions={borderSize:1,tickLength:4,offsetSize:1,fontSize:NaN,font:"",color:"",paneBackgroundColor:"",paddingBottom:0,paddingInner:0,paddingOuter:0,paddingTop:0,baselineOffset:0},this._chartModel=e}return e.prototype.options=function(){var e=this._rendererOptions,t=this._chartModel.properties(),i=t.scalesProperties.fontSize.value();return e.fontSize!==i&&(e.fontSize=i,e.font=Object(n.makeFont)(i,r.CHART_FONT_FAMILY,""),e.paddingTop=Math.floor(i/3.5),e.paddingBottom=e.paddingTop,e.paddingInner=Math.max(Math.ceil(i/2-e.tickLength/2),0),e.paddingOuter=Math.ceil(i/2+e.tickLength/2),e.baselineOffset=Math.round(i/5)),e.color=t.scalesProperties.textColor.value(),e.paneBackgroundColor=t.paneProperties.background.value(),this._rendererOptions},e}()},"W+6j":function(e,t,i){"use strict";i.d(t,"a",(function(){return o}));var n=i("mrSG"),r=i("ww0J"),o=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n._study=t,n}return Object(n.__extends)(t,e),t.prototype.color=function(){return this._study.isFailed()||this._study.metaInfo&&this._study.metaInfo().isTVScriptStub?"#ff0000":e.prototype.color.call(this)},t}(r.a)},W3MX:function(e){ +e.exports=JSON.parse('{"color-aqua-spring":"#ebf9f5","color-army-green":"#3d2c12","color-army-green-2":"#31230d","color-athens-gray-1":"#f2f3f5","color-athens-gray-2":"#f7f8fa","color-athens-gray-3":"#eceff2","color-black":"#000000","color-blue-dianne":"#21384d","color-bluish":"#2185cc","color-bright-gray":"#363c4e","color-brownish-grey":"#8d6e63","color-carnation":"#f04561","color-catskill-white":"#e1ecf2","color-charade":"#2f3241","color-charcoal-grey":"#323337","color-curious-blue":"#299dcd","color-dark-blue-grey":"#123440","color-darkness-blue-grey":"#12213b","color-dark-grey":"#292a2d","color-dark-grey-blue":"#28415a","color-dark-sky-blue":"#37a6ef","color-dark-slate-blue":"#194453","color-deep-sea-blue":"#016087","color-duck-egg-blue":"#e1eff9","color-ebony-clay":"#262b3e","color-foam":"#d7f0fb","color-gull-gray":"#9db2bd","color-humming-bird":"#d3eef9","color-keppel-1":"#37bc9b","color-keppel-2":"#34b293","color-lavender-blush":"#ffedf0","color-lightish-purple":"#a75ee8","color-loblolly":"#c5cbce","color-manatee":"#878ca8","color-mandy":"#eb4d5c","color-medium-blue":"#2e7bb2","color-milk-chocolate":"#6f2626","color-mirage-1":"#131722","color-mirage-2":"#171b29","color-mirage-3":"#1c2030","color-mischka":"#d6d8e0","color-morning-glory":"#9addcc","color-oslo-gray":"#8b8e95","color-pale":"#fff2cf","color-pale-grey-1":"#f9fafb","color-pale-grey-2":"#e7ebee","color-pale-sky":"#6b7988","color-picton-blue-1":"#3bb3e4","color-picton-blue-2":"#41bef1","color-puerto-rico":"#3bc2a1","color-purple-brown":"#4e2934","color-purple-brown-2":"#3d2028","color-radical-red":"#ff4a68","color-regent-gray":"#8797a5","color-scooter":"#38acdb","color-silver-tree":"#53b987","color-slate-gray":"#758696","color-sundown":"#ffa4b3","color-sunglow":"#ffca3b","color-tan-hide":"#ff9850","color-trout-1":"#4c525e","color-trout-2":"#4f5966","color-violet-1":"#332738","color-violet-2":"#271d2b","color-water-blue":"#1592e6","color-white":"#ffffff","color-white-ice":"#ebf7fc","color-wild-watermelon":"#ff5773","color-bg-primary":"color-white","color-bg-primary-hover":"color-cold-gray-100","color-bg-secondary":"color-white","color-bg-highlight":"color-cold-gray-50","color-bg-scroll-buttons":"color-cold-gray-100","color-legacy-bg-scroll-buttons":"color-cold-gray-850","color-legacy-bg-widget":"color-white","color-text-primary":"color-cold-gray-900","color-text-secondary":"color-cold-gray-500","color-text-tertiary":"color-cold-gray-400","color-text-disabled":"color-cold-gray-300","color-box-shadow":"color-cold-gray-300","color-divider":"color-cold-gray-150","color-divider-hover":"color-cold-gray-100","color-active-hover-text":"color-black","color-alert-text":"color-black","color-border-table":"color-cold-gray-100","color-brand":"color-tv-blue-500","color-brand-active":"color-tv-blue-600","color-brand-hover":"color-tv-blue-600","color-brand-light":"color-picton-blue-2","color-chart-page-bg":"color-cold-gray-150","color-common-tooltip-bg":"color-cold-gray-800","color-common-tooltip-text":"color-cold-gray-100","color-danger":"color-radical-red","color-depthrenderer-stroke-style":"color-athens-gray-1","color-highlight-new":"color-pale","color-input-bg":"color-white","color-input-publish-bg":"color-white","color-link":"color-tv-blue-500","color-link-hover":"color-tv-blue-600","color-link-active":"color-tv-blue-600","color-list-nth-child-bg":"color-athens-gray-2","color-pane-bg":"color-white","color-pane-secondary-bg":"color-cold-gray-100","color-popup-menu-item-hover-bg":"color-cold-gray-100","color-popup-menu-separator":"color-cold-gray-150","color-replay-data-mode":"color-radical-red","color-screener-description":"color-trout-2","color-legacy-success":"color-keppel-1","color-success":"color-minty-green-500","color-success-hover":"color-minty-green-600","color-success-active":"color-minty-green-700","color-toolbar-button-text":"color-cold-gray-900","color-toolbar-button-text-hover":"color-black","color-toolbar-button-text-active":"color-tv-blue-500","color-toolbar-button-text-active-hover":"color-tv-blue-600","color-toolbar-button-background-hover":"color-cold-gray-100","color-toolbar-button-background-secondary-hover":"color-cold-gray-150","color-toolbar-toggle-button-background-active":"color-tv-blue-500","color-toolbar-toggle-button-background-active-hover":"color-tv-blue-600","color-toolbar-interactive-element-text-normal":"color-cold-gray-900","color-toolbar-interactive-element-text-hover":"color-black","color-toolbar-opened-element-bg":"color-cold-gray-100","color-tooltip-bg":"color-ebony-clay","color-tv-dialog-caption":"color-trout-2","color-tv-dropdown-item-hover-bg":"color-athens-gray-1","color-underlined-text":"color-slate-gray","color-widget-pages-bg":"color-white","color-warning":"color-tan-orange-500","color-growing":"color-minty-green-400","color-falling":"color-ripe-red-400","color-collapse-tabs-border":"color-athens-gray-3","color-forex-icon":"color-bright-gray","color-list-item-active-bg":"color-dark-sky-blue","color-list-item-hover-bg":"color-white-ice","color-list-item-text":"color-ebony-clay","color-site-widget-hover":"color-athens-gray-1","color-attention":"color-sunglow","color-price-axis-label-back":"color-cold-gray-150","color-price-axis-label-text":"color-cold-gray-650","color-price-axis-gear":"color-cold-gray-900","color-price-axis-gear-hover":"#000000","color-price-axis-highlight":"color-cold-gray-150","color-marker-flagged":"color-ripe-red-400","color-marker-flagged-hovered":"color-ripe-red-600","color-bid":"color-tv-blue-500","color-ask":"color-ripe-red-400","color-sell":"color-ripe-red-400","color-buy":"color-tv-blue-500","color-neutral":"color-cold-gray-500","color-border":"#dadde0","color-border-chat-fields":"#c9cbcd","color-border-hover":"#c8c8c8","color-button-hover-bg":"#f2f2f2","color-depthrenderer-fill-style":"#555555","color-disabled-border-and-color":"#ececec","color-disabled-input":"#ececec","color-readonly-input":"#b4b4b4","color-empty-container-message":"#8a8a8a","color-icons":"#7d7d7d","color-input-textarea-readonly":"#555555","color-input-placeholder-text":"color-cold-gray-350","color-item-active-blue":"#eff9ff","color-item-hover-active-bg":"#f1f3f6","color-item-hover-bg":"#edf1f2","color-item-hover-blue":"#c6e9f8","color-item-selected-blue":"#eafafe","color-item-active-text":"color-white","color-item-active-bg":"color-tv-blue-500","color-list-item":"#888989","color-news-highlight":"#f2f5f8","color-placeholder":"#adaeb0","color-row-hover-active-bg":"#f1f3f6","color-sb-scrollbar-body-bg":"#d8d8d8","color-section-separator-border":"#b5b7b9","color-separator-table-chat":"#eaecef","color-tag-active-bg":"#cfdce3","color-tag-hover-bg":"#dce6ea","color-text-regular":"#4a4a4a","color-tv-button-checked":"#757575","color-brand-dark":"#2a2c39","color-scroll-bg":"color-cold-gray-400","color-scroll-border":"color-item-hover-active-bg","color-widget-border":"color-cold-gray-100","color-scroll-buttons-arrow":"color-white","color-control-intent-default":"color-cold-gray-200","color-control-intent-success":"color-minty-green-600","color-control-intent-primary":"color-tv-blue-500","color-control-intent-warning":"color-tan-orange-500","color-control-intent-danger":"color-ripe-red-500","color-seeking-alpha-brand":"#ff7200","color-pro":"color-minty-green-400","color-pro-hover":"color-minty-green-600","color-pro-plus":"color-tv-blue-500","color-pro-plus-hover":"color-tv-blue-600","color-pro-premium":"color-tan-orange-500","color-pro-premium-hover":"color-tan-orange-700","color-trial":"color-cold-gray-500","color-trial-hover":"color-cold-gray-600","color-mod":"color-ripe-red-400","color-mod-hover":"color-ripe-red-600","color-top":"color-banana-yellow-700","color-top-hover":"color-banana-yellow-800","color-ad":"color-banana-yellow-a700","color-broker-featured":"color-minty-green-400","color-broker-featured-hover":"color-minty-green-600","color-alert-status-active":"color-minty-green-400","color-alert-status-stopped":"color-ripe-red-500","color-alert-status-triggered":"color-tan-orange-500","color-covid19-confirmed":"color-ripe-red-500","color-covid19-recovered":"color-minty-green-500","color-covid19-deaths":"color-cold-gray-450","color-blue-gray-950":"#0C0E15","color-cold-gray-50":"#F8F9FD","color-cold-gray-100":"#F0F3FA","color-cold-gray-150":"#E0E3EB","color-cold-gray-200":"#D1D4DC","color-cold-gray-250":"#C1C4CD","color-cold-gray-300":"#B2B5BE","color-cold-gray-350":"#A3A6AF","color-cold-gray-400":"#9598A1","color-cold-gray-450":"#868993","color-cold-gray-500":"#787B86","color-cold-gray-550":"#6A6D78","color-cold-gray-600":"#5D606B","color-cold-gray-650":"#50535E","color-cold-gray-700":"#434651","color-cold-gray-750":"#363A45","color-cold-gray-800":"#2A2E39","color-cold-gray-850":"#1E222D","color-cold-gray-900":"#131722","color-cold-gray-950":"#0C0E15","color-ripe-red-50":"#FFEBEE","color-ripe-red-100":"#FFCDD2","color-ripe-red-200":"#ef9a9a","color-ripe-red-300":"#E57373","color-ripe-red-400":"#EF5350","color-ripe-red-500":"#F44336","color-ripe-red-600":"#E53935","color-ripe-red-700":"#D32F2F","color-ripe-red-800":"#C62828","color-ripe-red-900":"#B71C1C","color-ripe-red-a200":"#FF5252","color-ripe-red-a900":"#351E25","color-tan-orange-50":"#FFF3E0","color-tan-orange-100":"#FFE0B2","color-tan-orange-200":"#FFCC80","color-tan-orange-300":"#ffb74d","color-tan-orange-400":"#FFA726","color-tan-orange-500":"#FF9800","color-tan-orange-600":"#FB8C00","color-tan-orange-700":"#F57C00","color-tan-orange-800":"#EF6C00","color-tan-orange-900":"#e65100","color-tan-orange-a200":"#ffab40","color-tan-orange-a400":"#ff9100","color-tan-orange-a700":"#FF6D00","color-iguana-green-100":"#C8E6C9","color-iguana-green-200":"#A5D6A7","color-iguana-green-300":"#81c784","color-iguana-green-400":"#66BB6A","color-iguana-green-500":"#4caf50","color-iguana-green-600":"#43a047","color-iguana-green-700":"#388e3c","color-iguana-green-900":"#1B5E20","color-iguana-green-a700":"#00c853","color-banana-yellow-100":"#FFF9C4","color-banana-yellow-200":"#FFF59D","color-banana-yellow-300":"#FFF176","color-banana-yellow-400":"#ffee58","color-banana-yellow-500":"#ffeb3b","color-banana-yellow-600":"#fdd835","color-banana-yellow-700":"#fbc02d","color-banana-yellow-800":"#f9a825","color-banana-yellow-900":"#F57F17","color-banana-yellow-a400":"#ffea00","color-banana-yellow-a700":"#ffd600","color-tv-blue-50":"#E3F2FD","color-tv-blue-100":"#BBDEFB","color-tv-blue-200":"#90CAF9","color-tv-blue-300":"#64B5F6","color-tv-blue-400":"#42A5F5","color-tv-blue-500":"#2196F3","color-tv-blue-600":"#1E88E5","color-tv-blue-700":"#1976D2","color-tv-blue-800":"#1565C0","color-tv-blue-900":"#0d47a1","color-tv-blue-a100":"#82b1ff","color-tv-blue-a200":"#448aff","color-tv-blue-a400":"#2979ff","color-tv-blue-a600":"#2962FF","color-tv-blue-a700":"#144987","color-tv-blue-a800":"#143661","color-tv-blue-a900":"#132742","color-deep-blue-100":"#D1C4E9","color-deep-blue-200":"#B39DDB","color-deep-blue-300":"#9575cd","color-deep-blue-400":"#7e57c2","color-deep-blue-500":"#673ab7","color-deep-blue-700":"#512da8","color-deep-blue-800":"#4527A0","color-deep-blue-900":"#311B92","color-deep-blue-a100":"#b388ff","color-deep-blue-a700":"#6200EA","color-minty-green-100":"#B2DFDB","color-minty-green-200":"#80cbc4","color-minty-green-300":"#4db6ac","color-minty-green-400":"#26a69a","color-minty-green-500":"#009688","color-minty-green-600":"#00897b","color-minty-green-700":"#00796b","color-minty-green-900":"#004D40","color-minty-green-a400":"#1de9b6","color-minty-green-a700":"#00BFA5","color-grapes-purple-100":"#E1BEE7","color-grapes-purple-200":"#CE93D8","color-grapes-purple-300":"#ba68c8","color-grapes-purple-400":"#ab47bc","color-grapes-purple-500":"#9c27b0","color-grapes-purple-600":"#8e24aa","color-grapes-purple-700":"#7b1fa2","color-grapes-purple-800":"#6A1B9A","color-grapes-purple-900":"#4A148C","color-grapes-purple-a700":"#aa00ff","color-berry-pink-100":"#F8BBD0","color-berry-pink-200":"#f48fb1","color-berry-pink-300":"#f06292","color-berry-pink-400":"#ec407a","color-berry-pink-500":"#e91e63","color-berry-pink-600":"#D81B60","color-berry-pink-700":"#C2185B","color-berry-pink-800":"#AD1457","color-berry-pink-900":"#880E4F","color-berry-pink-a200":"#ff4081","color-sky-blue-100":"#B2EBF2","color-sky-blue-200":"#80DEEA","color-sky-blue-300":"#4dd0e1","color-sky-blue-400":"#26c6da","color-sky-blue-500":"#00bcd4","color-sky-blue-600":"#00acc1","color-sky-blue-700":"#0097A7","color-sky-blue-800":"#00838F","color-sky-blue-900":"#006064","color-sky-blue-a400":"#00e5ff","color-sky-blue-a700":"#00B8D4","color-deep-blue-600":"#5E35B1","color-facebook":"#1877F2","color-twitter":"#1DA1F2","color-pre-market":"color-tan-orange-600","color-pre-market-bg":"color-tan-orange-400","color-post-market":"color-tv-blue-500","color-post-market-bg":"color-tv-blue-400","color-market-open":"color-minty-green-500","color-market-open-bg":"color-minty-green-400","color-market-closed":"color-cold-gray-400","color-market-holiday":"color-cold-gray-400","color-invalid-symbol":"color-ripe-red-400","color-invalid-symbol-hover":"color-ripe-red-700","color-replay-mode":"color-tv-blue-500","color-replay-mode-icon":"color-white","color-replay-mode-hover":"color-tv-blue-600","color-notaccurate-mode":"color-berry-pink-600","color-notaccurate-mode-bg":"color-berry-pink-400","color-delay-mode":"color-tan-orange-600","color-delay-mode-bg":"color-tan-orange-400","color-eod-mode":"color-grapes-purple-400","color-eod-mode-bg":"color-grapes-purple-400","color-data-problem":"color-ripe-red-600","color-data-problem-bg":"color-ripe-red-400","color-data-problem-hover":"color-ripe-red-700","color-list-item-bg-highlighted":"color-tv-blue-50","color-list-item-bg-selected":"color-tv-blue-100","color-list-item-bg-highlighted-hover":"color-tv-blue-100","color-list-item-bg-selected-hover":"color-tv-blue-200","color-screener-header-bg":"color-white","color-screener-header-bg-hover":"color-cold-gray-100"}') +},W5mg:function(e,t,i){"use strict";i.d(t,"a",(function(){return r}));var n=["first_visible_bar_time","last_visible_bar_time"];function r(e){return!e.groupId&&"time"!==e.type&&!e.isHidden&&!n.includes(e.id)}},WIS0:function(e,t,i){"use strict";i.r(t),i.d(t,"DatafeedRequestsCachedProcessor",(function(){return d}));var n=i("mrSG"),r=i("Eyy1"),o=i("LxhU"),s=i("Y7w9"),a=i("ocLq"),l=i("Kxc7");i("HbRj");function c(e,t){return e.ticker+(e.currency_code?"_#_"+e.currency_code:"")+"_#_"+t}function u(e){return new Date(e).toISOString()}var h=function(){function e(e,t,i,n){this._cache={bars:[]},this._nextSubscriptionId=0,this._pendingSubscribers=[],this._subscribers=[],this._requesting=!1,this._leftDate=null,this._gaps=[],this._realtimeOn=!1,this._endOfData=!1,this._resetCacheTimeout=null,this._errorMessage=null,this._destroyed=!1,this._emptyResponsesCount=0,this._datafeed=e,this._symbolInfo=t,this._resolution=Object(r.ensureNotNull)(o.Interval.normalize(i)),this._dwmAligner=n}return e.prototype.destroy=function(){0!==this._subscribers.length&&console.warn("Destroying with not-empty state"),this._clearResetCacheTimeout(),this._unsubscribeRealtime(),this._purgeCache(),delete this._datafeed,this._destroyed=!0},e.prototype.addSubscription=function(e,t,i){var n=this,r=this._getNextSubscriptionId(),o=Math.floor(e.from/1e3),s=Math.floor(e.to/1e3);this._pendingSubscribers.push({key:r,range:{from:o,to:s},onHistoryCallback:t,onErrorCallback:i}),this._clearResetCacheTimeout();return setTimeout((function(){n._destroyed||n._processPendingSubscribers()}),0),r},e.prototype.removeSubscription=function(e){var t=this,i=this._pendingSubscribers.find((function(t){return t.key===e}));if(i)this._pendingSubscribers.splice(this._pendingSubscribers.indexOf(i),1);else{var n=this._subscribers.find((function(t){return t.key===e}));if(n)return this._subscribers.splice(this._subscribers.indexOf(n),1),void(this._subscribers.length||(this._symbolInfo.expired||this._symbolInfo.expiration_date?this._unsubscribeRealtime():this._resetCacheTimeout=setTimeout((function(){t._resetCacheTimeout=null,t._purgeCache(),t._unsubscribeRealtime()}))));console.warn("Unknown subscription symbol={0}, resolution={1}, key={2}".format(this._symbolInfo.name,this._resolution,e))}},e.prototype._logMessage=function(e,t){if(l.enabled("charting_library_debug_mode")||t){var i=this._symbolInfo.currency_code;console.log("FEED ["+this._symbolInfo.name+"|"+this._resolution+(i?"|"+i:"")+"]: "+e)}},e.prototype._clearResetCacheTimeout=function(){null!==this._resetCacheTimeout&&(clearTimeout(this._resetCacheTimeout),this._resetCacheTimeout=null)},e.prototype._purgeCache=function(){this._logMessage("Reset cache"),this._cache={bars:[]},this._gaps=[],this._errorMessage=null,this._leftDate=null,this._endOfData=!1},e.prototype._processPendingSubscribers=function(){var e=this,t=this._pendingSubscribers;if(t.length)if(this._requesting)this._logMessage("Processing is skipped due active request");else{if(this._logMessage("Processing pending subscribers, count="+t.length),this._errorMessage){ +var i=this._errorMessage;return this._logMessage("Return error: "+i),this._pendingSubscribers=[],void t.forEach((function(e){e.onErrorCallback(i)}))}var n=t.reduce((function(e,t){return Math.min(t.range.from,e)}),1/0);if(this._logMessage('Leftmost requested "from" is '+u(1e3*n)),!this._leftDate||n0?this._logMessage("Bars to return for request {0}: total {1} bars in [{2} ... {3}] ".format(e.key,n.count(),u(n.bars[0].time),u(n.bars[n.count()-1].time))):this._logMessage("Request {0}. Nothing to return.".format(e.key)),t.barset=n;var r=this._inGapNextTime(i.from);if(r)this._logMessage("Request {0} is in gap, nextTime = {1}".format(e.key,u(1e3*r))),n.nextTime=r;else if(0===n.count()){var o=this._cache.bars.length&&this._cache.bars[this._cache.bars.length-1].time/1e3;o&&i.from>o&&(this._logMessage("Request {0} is in gap, nextTime = {1}".format(e.key,u(1e3*o))),n.nextTime=o||void 0)}this._endOfData&&null!==this._leftDate&&e.range.from<=this._leftDate&&(n.endOfData=!0),e.onHistoryCallback(n)},e.prototype._createBarset=function(e){var t=Object(s.lowerbound)(this._cache.bars,1e3*e,(function(e,t){return e.time0){var n=" ["+u(e[0].time)+" ... "+u(e[e.length-1].time)+"]";i._logMessage("Receiving bars: total "+e.length+" bars in "+n+", requested range: "+s)}else i._logMessage("Receiving bars: barset is empty, requested range: "+s);i._requesting=!1,i._processBars(e,t)}}),(function(e){i._destroyed||(a?i._logMessage("getBars callback is already called before",!0):(a=!0,i._requesting=!1,i._errorMessage=e||null,i._processPendingSubscribers()))}),n)}},e.prototype._processBars=function(e,t){this._checkBars(e),this._alignBarsTime(e),e.length>0?(this._emptyResponsesCount=0,this._processFullBarset(e,t)):(this._emptyResponsesCount+=1,this._processEmptyBarset(t)),this._processPendingSubscribers()},e.prototype._processEmptyBarset=function(t){t&&t.nextTime?(this._logMessage("Next time received: `{0}`".format(u(1e3*t.nextTime))),this._addGap(t.nextTime),this._leftDate=Math.min(this._leftDate||e._now()/1e3,t.nextTime+1)):t&&t.noData?(this._logMessage("EOD received"),this._setEndOfData()):this._logMessage("nextTime or noData should present in metainfo when empty barset is returned"),50===this._emptyResponsesCount&&(this._logMessage("EOD detected due 50 empty responses in a row"),this._setEndOfData())},e.prototype._setEndOfData=function(){this._endOfData=!0,this._cache.bars.length&&(this._leftDate=this._cache.bars[0].time/1e3)},e.prototype._processFullBarset=function(e,t){var i=e[0].time;null!==this._leftDate&&i<1e3*this._leftDate&&this._logMessage("Returned more data than needed"),this._putToCache(e)?null!==this._leftDate&&this._cache.bars.length&&this._leftDate>this._cache.bars[0].time/1e3&&(this._leftDate=this._cache.bars[0].time/1e3):this._logMessage("Incremental update failed. Starting full update. Returned data should be in the requested range.",!0),t&&t.nextTime?console.warn("nextTime should be set when there is no data in the requested period only"):t&&t.noData&&console.warn("noData should be set when there is no data in the requested period and earlier only")},e.prototype._addGap=function(t){if(!this._gaps.find((function(e){return e.from===t}))){var i=(this._cache.bars.length?this._cache.bars[0].time:e._now())/1e3;this._gaps.push({from:t,to:i})}},e.prototype._inGapNextTime=function(e){var t=this._gaps.find((function(t){return t.frome}));return t?t.from:null},e.prototype._getNextSubscriptionId=function(){return this._nextSubscriptionId++},e.prototype._checkBars=function(e,t){if(void 0===t&&(t=!1),l.enabled("charting_library_debug_mode"))for(var i=function(i){if(e[i].time<=e[i-1].time){ +var r="Wrong bars time: time {0} of bar {1} should be more than time {2} of bar {3}".format(e[i].time,i,e[i-1].time,i-1);t&&n._dwmAligner&&(r+="\nCheck that you provide DWM bars without time part, i.e. 00:00 GMT"),console.error(r)}["high","low","open","close","time"].some((function(t){return"number"!=typeof e[i][t]||!isFinite(e[i][t])}))&&console.error("Wrong bars values: all OHLC values should be numbers")},n=this,r=1;r=this._cache.bars[0].time){var t=this._cache.bars[this._cache.bars.length-1].time===e[e.length-1].time;if(this._cache.bars=[],!t)return this._leftDate=null,!1;this._logMessage("Received history up to now instead of incremental update. Return exactly what is requested.")}return this._cache.bars=Object(n.__spreadArrays)(e,this._cache.bars),this._checkBars(this._cache.bars,!0),!0},e.prototype._putToCacheNewBar=function(e){var t=this._cache.bars.length,i=e.time,n=0===t?NaN:this._cache.bars[t-1].time;0===t||n=0&&!function(){try{return/^(192|172|10)\.[0-9][0-9][0-9]\.[0-9][0-9][0-9]\.[0-9][0-9][0-9]/.test(location.hostname)||/^.*((?:\.local)|localhost)$/.test(location.hostname)}catch(e){return!1}}()&&setTimeout((function(){try{var e=function(){var e=0;return JSON.parse(urlParams.logo).image&&(e="C",n.enabled("link_to_tradingview")||(e="D")),e}();window.ga&&(0!==e&&window.ga("send","event","s",e),urlParams.utm||window.ga("send","event","l"))}catch(t){}}),3e4)}},Wh6B:function(e,t,i){"use strict";var n=i("Eyy1").ensureNotNull,r=i("Ss5c").LineDataSource,o=i("Ocx9").DefaultProperty,s=i("08i5"),a=window.t("Forecast");function l(e,t){var n=t||l.createProperties();r.call(this,e,n),i.e("lt-pane-views").then(function(e){var t=i("Ay2m").PredictionPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}inherit(l,r),l.prototype.isSynchronizable=function(){return!1},l.prototype.status=function(){return this._properties.status.value()},l.prototype.setStatus=function(e){return this._properties.status.setValue(e)},l.prototype.pointsCount=function(){return 2},l.prototype.translatedType=function(){return a},l.prototype.name=function(){return"Forecast"},l.prototype.restorePoints=function(e,t,i){r.prototype.restorePoints.call(this,e,t,i),this.checkAlert()},l.prototype.checkAlert=function(){if(!(this._points.length<2||this._model.mainSeries().bars().isEmpty())){var e=this._points[1];if(this.status())e.index>this._model.timeScale().baseIndex()&&this.setStatus(s.AlertStatus.Waiting);else{var t=this._model.mainSeries().bars().valueAt(e.index);if(null!==t){var i=this.direction() +;if(i===s.Direction.Up&&t[TradingView.HIGH_PLOT]>=e.price)this.setStatus(s.AlertStatus.Success);else if(i===s.Direction.Down&&t[TradingView.LOW_PLOT]<=e.price)this.setStatus(s.AlertStatus.Success);else{var r=n(this._model.mainSeries().bars().lastIndex());e.index!==r&&this.setStatus(s.AlertStatus.Failure)}}}}},l.prototype.addPoint=function(e){var t=r.prototype.addPoint.call(this,e);return t&&this.checkAlert(),t},l.prototype.endChanging=function(){r.prototype.endChanging.call(this),this.setStatus(s.AlertStatus.Waiting),this.checkAlert()},l.prototype.onData=function(e){r.prototype.onData.call(this,e),this.checkAlert()},l.prototype.endMoving=function(){r.prototype.endMoving.call(this),this.setStatus(s.AlertStatus.Waiting),this.checkAlert()},l.prototype.direction=function(){if(this.points().length<2)return s.Direction.Up;var e=this.points()[0];return this.points()[1].price>e.price?s.Direction.Up:s.Direction.Down},l.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("Pwwq").PredictionDefinitionsViewModel}.bind(null,i)).catch(i.oe)},l.prototype.cloneable=function(){return!1},l.createProperties=function(e){var t=new o("linetoolprediction",e);return l._configureProperties(t),t},l._configureProperties=function(e){r._configureProperties(e),e.merge({status:s.AlertStatus.Waiting})},t.LineToolPrediction=l},WkOR:function(e,t,i){"use strict";i.r(t),i.d(t,"areEqualSymbols",(function(){return o})),i.d(t,"includesEqualSymbol",(function(){return s}));var n=i("Kxc7"),r=n.enabled("uppercase_instrument_names");function o(e,t){return void 0===e?void 0===t:void 0!==t&&(r?e.toUpperCase()===t.toUpperCase():e===t)}function s(e,t){return e.some((function(e){return o(t,e)}))}},WkYF:function(e,t,i){"use strict";var n=i("Ss5c").LineDataSource,r=i("Ocx9").DefaultProperty,o=window.t("Date Range");function s(e,t){var r=t||s.createProperties();n.call(this,e,r),i.e("lt-pane-views").then(function(e){var t=i("3xLB").DateRangePaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}inherit(s,n),s.prototype.pointsCount=function(){return 2},s.prototype.translatedType=function(){return o},s.prototype.name=function(){return"Date Range"},s.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("Ax76").GeneralDatePriceRangeDefinitionsViewModel}.bind(null,i)).catch(i.oe)},s.createProperties=function(e){var t=new r("linetooldaterange",e);return s._configureProperties(t),t},s._configureProperties=function(e){n._configureProperties(e)},t.LineToolDateRange=s},WmDe:function(e,t,i){"use strict";TradingView.PublishedChartsTimeline=function(){},TradingView.LinearRegressionPaneView=function(){},TradingView.study_PivotPointsStandard=function(){},TradingView.study_PivotPointsHighLow=function(){},TradingView.study_ZigZag=function(){},TradingView.study_LinearRegression=function(){},TradingView.study_ElliottWave=function(){}, +TradingView.ESDStudyBase=function(){},TradingView.Pro=function(){this.hasPackage=function(){return!1}},window.user={is_pro:!1,settings:{}},TradingView.Pro.prototype.isPaidPro=function(){return!1},TradingView.Pro.prototype.hasActivePackages=function(){return!1},TradingView.Pro.prototype.isSupportAvailable=function(){return!1},TradingView.Pro.prototype.getStudies=function(){return[]},TradingView.Pro.prototype.getProduct=function(){return{}},TradingView.Pro.prototype.getStudiesOrder=function(){return[]},TradingView.AlertLabel=function(){},TradingView.getDataVendorString=function(){},TradingView.study_VbPVisible=function(){},TradingView.study_VbPSessions=function(){},TradingView.study_ESD$TV_DIVIDENDS=function(){},TradingView.study_ESD$TV_SPLITS=function(){},TradingView.study_ESD$TV_EARNINGS=function(){},TradingView.MockupRequestedCache=function(e){e&&e([])},TradingView.MockupRequestedCache.invalidate=function(){},TradingView.LinetoolTemplatesList=function(){}},Wo0S:function(e,t,i){e.exports={"common-tooltip":"common-tooltip-s2GEoMlT","common-tooltip--hidden":"common-tooltip--hidden-Z0EAvXgv","common-tooltip--horizontal":"common-tooltip--horizontal-13imOC5w","common-tooltip--farther":"common-tooltip--farther-2yXMAkHF","common-tooltip--vertical":"common-tooltip--vertical-mcRoucek","common-tooltip-farther":"common-tooltip-farther-XoKytD99","common-tooltip--no-pointer-events":"common-tooltip--no-pointer-events-3nL0Vygu","common-tooltip--direction_normal":"common-tooltip--direction_normal-3u9ejKM2","common-tooltip__body":"common-tooltip__body-356XFpBj","common-tooltip__button-container":"common-tooltip__button-container-3EjyKV3s","common-tooltip__body--no-buttons":"common-tooltip__body--no-buttons-3quqi1Sv","common-tooltip__button":"common-tooltip__button-1rnQgujz","common-tooltip--direction_reversed":"common-tooltip--direction_reversed-XN-JUTdr","common-tooltip__ear-holder":"common-tooltip__ear-holder-yIJjpvgu","common-tooltip__ear-holder--below":"common-tooltip__ear-holder--below-1rmzWejA","common-tooltip__ear-holder--above":"common-tooltip__ear-holder--above-1D8FkNkw","common-tooltip__ear-holder--before":"common-tooltip__ear-holder--before-oXq5sFXr","common-tooltip__ear-holder--after":"common-tooltip__ear-holder--after-BnAcuW1N","common-tooltip__body--with-hotkey":"common-tooltip__body--with-hotkey-2wXRtgYZ","common-tooltip__body--width_wide":"common-tooltip__body--width_wide-3oG604Li","common-tooltip__body--width_narrow":"common-tooltip__body--width_narrow-34hrFTFo","common-tooltip__body--no-padding":"common-tooltip__body--no-padding-2vVe6Xco","common-tooltip__hotkey-block":"common-tooltip__hotkey-block-2gS_uAOl","common-tooltip__hotkey-block--divider":"common-tooltip__hotkey-block--divider-rQ38KmpQ","common-tooltip__hotkey-text":"common-tooltip__hotkey-text-1eb7dyCg","common-tooltip__hotkey-button":"common-tooltip__hotkey-button-1XJ40e4D","common-tooltip__plus-sign":"common-tooltip__plus-sign-3CKSupKp"}},Wt0y:function(e,t,i){"use strict";function n(e){void 0===e&&(e=location.host) +;return-1!==["i18n.tradingview.com","partial.tradingview.com","www.tradingview.com","wwwcn.tradingview.com"].indexOf(e)||-1!==["d33t3vvu2t2yu5.cloudfront.net","dwq4do82y8xi7.cloudfront.net","s.tradingview.com","s3.tradingview.com"].indexOf(e)||e.match(/^[a-z]{2}\.tradingview\.com/)||e.match(/prod-[^.]+.tradingview.com/)?"battle":-1!==e.indexOf("tradingview.com")?"staging":e.match(/webcharts/)?"staging_local":(e.match(/^localhost(:\d+)?$/),"local")}function r(){return"local"===n()}function o(){return"battle"===n()}function s(){return!o()}i.r(t),i.d(t,"environment",(function(){return n})),i.d(t,"isLocal",(function(){return r})),i.d(t,"isProd",(function(){return o})),i.d(t,"isDebug",(function(){return s}))},X0WL:function(e,t,i){"use strict";i.d(t,"a",(function(){return n}));var n=function(){function e(e){this._colorProperty=e}return e.prototype.size=function(){return"13px"},e.prototype.bold=function(){return!1},e.prototype.color=function(){return this._colorProperty.value()},e}()},XAms:function(e,t,i){"use strict";function n(e){e.preventDefault()}i.d(t,"a",(function(){return n})),i.d(t,"b",(function(){return o}));var r=["input:not([type])",'input[type="text"]','input[type="email"]','input[type="password"]','input[type="search"]','input[type="number"]','input[type="url"]',"textarea","a[href]",'*[contenteditable="true"]'];function o(e){var t=e.target;t&&!t.closest(r.join(", "))&&e.preventDefault()}},XFad:function(e,t,i){"use strict";var n=i("5rJj"),r=i("aDyP").LineToolPitchfork,o=window.t("Schiff Pitchfork");function s(e,t){var i=t||s.createProperties();r.call(this,e,i)}inherit(s,r),s.prototype.translatedType=function(){return o},s.prototype.name=function(){return"Schiff Pitchfork"},s.createProperties=function(e){var t=new n("linetoolschiffpitchfork2",e,!1,{range:[0,8]});return s._configureProperties(t),t},s._configureProperties=function(e){r._configureProperties(e)},t.LineToolSchiffPitchfork2=s},XPit:function(e,t,i){"use strict";i.r(t),i.d(t,"TimePointIndexSearchMode",(function(){return n})),i.d(t,"seriesPlotFunctionMap",(function(){return l})),i.d(t,"barFunction",(function(){return c})),i.d(t,"SeriesData",(function(){return u}));var n,r=i("Eyy1"),o=i("k9/m");!function(e){e[e.FromLeft=-1]="FromLeft",e[e.FromRight=1]="FromRight"}(n||(n={}));var s={open:function(e){return e[1]},high:function(e){return e[2]},low:function(e){return e[3]},close:function(e){return e[4]},hl2:function(e){return(e[2]+e[3])/2},hlc3:function(e){return(e[2]+e[3]+e[4])/3},ohlc4:function(e){return(e[1]+e[2]+e[3]+e[4])/4}},a=["open","high","low","close","hl2","hlc3","ohlc4"];function l(){var e=new Map;return a.forEach((function(t,i){e.set(t,c(t))})),e}function c(e){return s[e]}var u=function(){function e(){this.m_bars=new o.PlotList(l()),this.m_nsBars=new o.PlotList(l())}return e.prototype.bars=function(){return this.m_bars},e.prototype.nsBars=function(){return this.m_nsBars},e.prototype.size=function(){return this.m_bars.size()+this.m_nsBars.size()},e.prototype.each=function(e){this.m_bars.each(e),this.m_nsBars.each(e)},e.prototype.clear=function(){ +this.m_bars.clear(),this.m_nsBars.clear(),this.lastProjectionPrice=void 0},e.prototype.isEmpty=function(){return this.m_bars.isEmpty()&&this.m_nsBars.isEmpty()},e.prototype.first=function(){return this.m_bars.isEmpty()?this.m_nsBars.first():this.m_bars.first()},e.prototype.last=function(){return this.m_nsBars.isEmpty()?this.m_bars.last():this.m_nsBars.last()},e.prototype.search=function(e,t){return this.nsBars().isEmpty()?this.bars().search(e,t):this.bars().isEmpty()||Object(r.ensureNotNull)(this.nsBars().firstIndex())<=e?this.nsBars().search(e,t):this.bars().search(e,t)},e.prototype.valueAt=function(e){var t=this.search(e);return null!==t?t.value:null},e.prototype.plotValueToTimePointIndex=function(e,t,i){if(i===n.FromRight){var r=function(i,n){var r=n[t];return null!=r&&e>=r};return null!==(o=this.m_bars.findLast(r))?o.index:null!==(s=this.m_nsBars.findLast(r))?s.index:this.m_bars.firstIndex()}if(i===n.FromLeft){var o,s,a=function(i,n){var r=n[t];return null!=r&&e<=r};return null!==(o=this.m_bars.findFirst(a))?o.index:null!==(s=this.m_nsBars.findFirst(a))?s.index:this.m_bars.lastIndex()}throw new Error("plotValueToTimePointIndex: unsupported search mode")},e}()},XUCF:function(e,t,i){"use strict";var n=i("Hr11").sign,r=i("Ss5c").LineDataSource,o=i("Ocx9").DefaultProperty,s=window.t("Ghost Feed");function a(e,t,i){this._source=e,this._index=t,this._bars=i||[]}function l(e,t,n){var o=t||l.createProperties();if(o._source=this,!n){var s=Math.round(this.calculateATR(e));o.averageHL.setValue(s)}r.call(this,e,o),this._segments=[],o.averageHL.listeners().subscribe(this,l.prototype.regenerate),o.variance.listeners().subscribe(this,l.prototype.regenerate),o.points||o.addProperty("points"),this._currentAverageHL=this._properties.averageHL.value(),this._currentVariance=this._properties.variance.value(),this._currentInterval=e.mainSeries().interval(),this.properties().onRestoreFactoryDefaults().subscribe(this,this._handleRestoringFactoryDefaults),i.e("lt-pane-views").then(function(e){var t=i("dMkl").GhostFeedPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}a.prototype.setBars=function(e){this._bars=e||[]},a.prototype.clone=function(e){return new a(e,this._index,TradingView.clone(this._bars))},a.prototype.createBar=function(){var e=this._source.properties().averageHL.value(),t=this._source.properties().variance.value()/100,i=this._source._model.mainSeries().base(),n=Math.random(),r=e*(1-2*n)*t,o=e*(1+(.5-(n=Math.random()))*t),s=r-o/2,a=s+o;return{o:(s+Math.random()*o)/i,h:a/i,l:s/i,c:(s+Math.random()*o)/i}},a.prototype.generate=function(){this._bars=[];var e=this._source.points(),t=e[this._index],i=e[this._index+1];if(t&&i&&t.index!==i.index){this._avgHL=this._source.properties().averageHL.value(),this._variance=this._source.properties().variance.value()/100;for(var r=this._index?t.index+1:t.index,o=n(i.index-t.index),s=r;s!==i.index;s+=o)this._bars.push(this.createBar())}},a.prototype.bars=function(){return this._bars},a.prototype.setSize=function(e){ +if(e0&&this._points[this._points.length-1].index===e.index){this._lastPoint=null,this.normalizePoints(),this.createServerPoints();for(var t=0;t1&&this.generateBars(this._points.length-2),i||this._finished},l.prototype.finish=function(){this._finished=!0,this._lastPoint=null,this.normalizePoints(),this.createServerPoints()},l.prototype.setPoint=function(e,t,i){if(r.prototype.setPoint.call(this,e,t,i),e>0){var n=this.points()[e-1],o=t.index-n.index;this._segments[e-1].setSize(Math.abs(o))}if(e>1,a=n+s;i(e[a],t)?(n=a+1,o-=s+1):o=s}return n}function s(e,t,i,n){return void 0===i&&(i=0),void 0===n&&(n=e.length),o(e,t,r,i,n)}function a(e,t,i,n,r){void 0===n&&(n=0),void 0===r&&(r=e.length);for(var o=r-n;0>1,a=n+s;i(t,e[a])?o=s:(n=a+1,o-=s+1)}return n}function l(e,t,i,n){return void 0===i&&(i=0),void 0===n&&(n=e.length),a(e,t,r,i,n)}function c(e,t){return e.filter((function(e){return!t.includes(e)}))}function u(e,t){var i=e.indexOf(t);return i<0?e.slice():[t].concat(e.slice(0,i)).concat(e.slice(i+1))}function h(e,t,i){var r=new Set(t),o=[],a=[];return e.forEach((function(e,t){r.has(e)||(o.push(e),a.push(t))})),is?(console.warn("Too many variables-link in HEX-color search: "+i[0]),null):e(o,i)}(e);o[e]=r.ensureNotNull(t)})),t.colorsPalette=o,t.getHexColorByName=function(e){var i=t.colorsPalette[e];if(!i)throw new Error("No such color "+e);return i}},YWnQ:function(e,t,i){"use strict";var n;i.r(t),i.d(t,"SymbolErrorPermissionDeniedReason",(function(){return n})),i.d(t,"permissionDenied",(function(){return r})),function(e){e.Symbol="symbol",e.ExtendedHours="extended_hours",e.GroupPermission="group"}(n||(n={}));var r="permission denied"},YdVo:function(e,t,i){"use strict";i.r(t),i.d(t,"LineToolPath",(function(){return u}));var n=i("mrSG"),r=i("Eyy1"),o=i("aO4+"),s=i("YFKU"),a=i("Ocx9"),l=i("Ss5c"),c=Object(s.t)("Path"),u=function(e){function t(n,r){var o=this,s=r||t.createProperties();return o=e.call(this,n,s)||this,i.e("lt-pane-views").then(i.bind(null,"JeuX")).then((function(e){o._setPaneViews([new e.PathPaneView(o,n)])})),o}return Object(n.__extends)(t,e),t.prototype.pointsCount=function(){return-1},t.prototype.properties=function(){return e.prototype.properties.call(this)},t.prototype.translatedType=function(){return c},t.prototype.name=function(){return"Path"},t.prototype.hasEditableCoordinates=function(){return!1},t.prototype.addPoint=function(t,i,n){var s,a=Object(r.ensureNotNull)(this.priceScale()),l=this._model.timeScale().indexToCoordinate(t.index),c=t.price,u=Object(r.ensure)(null===(s=this.ownerSource())||void 0===s?void 0:s.firstValue()),h=a.priceToCoordinate(c,u);if(this._points.length>0){var d=this._points[this._points.length-1],p=this._model.timeScale().indexToCoordinate(d.index),_=d.price,f=a.priceToCoordinate(_,u);if(new o.Point(l,h).subtract(new o.Point(p,f)).length()<5)return this._lastPoint=null,this.normalizePoints(),this.createServerPoints(),!0}return e.prototype.addPoint.call(this,t,i,n)},t.createProperties=function(e){var i=new a.DefaultProperty("linetoolpath",e);return t._configureProperties(i),i},t.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(i.bind(null,"WW+G")).then((function(e){return e.PathDefinitionsViewModel}))},t._configureProperties=function(e){l.LineDataSource._configureProperties(e)},t}(l.LineDataSource)},"Ye2/":function(e,t,i){"use strict";var n;i.r(t),i.d(t,"LineToolBarsPatternMode",(function(){return n})),function(e){e[e.Bars=0]="Bars",e[e.Line=1]="Line",e[e.OpenClose=2]="OpenClose",e[e.LineOpen=3]="LineOpen",e[e.LineHigh=4]="LineHigh",e[e.LineLow=5]="LineLow",e[e.LineHL2=6]="LineHL2"}(n||(n={}))},Yj6H:function(e,t,i){"use strict";i.r(t),i.d(t,"PriceScaleBase",(function(){return f})) +;var n=i("Eyy1"),r=i("aIyQ"),o=i.n(r),s=i("Qb4w"),a=i("TTFo"),l=i("qJq3"),c=i("7ktv"),u=i("tc+8"),h=i.n(u),d=i("3ClC"),p=i("/tGj"),_={autoScale:!0,autoScaleDisabled:!1,lockScale:!1,percentage:!1,percentageDisabled:!1,log:!1,logDisabled:!1,alignLabels:!0,isInverted:!1,indexedTo100:!1},f=function(){function e(e){this._marksCache=null,this._onMarksChanged=new o.a,this._onCurrencyLabelContentChanged=new o.a,this.m_dataSources=[],this._sourcesForAutoscale=null,this._sourcesToUpdateViews=null,this._hasSeries=!1,this._seriesLikeSources=[],this._seriesLikeSourcesSet=new Set,this._priceDataSources=[],this._lastSourceRemoved=new o.a,this._scaleSeriesOnly=!1,this._currencyCache=null,e=Object.assign({},_,e),this._properties=new h.a(e)}return e.prototype.isLog=function(){return this._properties.childs().log.value()},e.prototype.isPercentage=function(){return this._properties.childs().percentage.value()},e.prototype.isInverted=function(){return this._properties.childs().isInverted.value()},e.prototype.isIndexedTo100=function(){return this._properties.childs().indexedTo100.value()},e.prototype.isAutoScale=function(){return this._properties.childs().autoScale.value()&&!this.isLockScale()},e.prototype.isLockScale=function(){return this._properties.childs().lockScale.value()},e.prototype.isRegular=function(){return!this.isPercentage()&&!this.isLog()&&!this.isIndexedTo100()},e.prototype.properties=function(){return this._properties},e.prototype.dataSources=function(){return this.m_dataSources},e.prototype.seriesLikeSources=function(){return this._seriesLikeSources},e.prototype.addDataSource=function(e,t){var i=this;if(t||-1===this.m_dataSources.indexOf(e)){if(e instanceof c.PriceDataSource&&(this._priceDataSources.push(e),e.currencyChanged().subscribe(this,(function(){return i._currencyCache=null})),Object(p.isSymbolSource)(e)&&(this._seriesLikeSources.push(e),this._seriesLikeSourcesSet.add(e),e.symbolResolved().subscribe(this,(function(){return i._currencyCache=null})),e instanceof l.Series))){var n=e.properties();this._hasSeries||(n.childs().lockScale&&(this.setMode({lockScale:n.childs().lockScale.value()}),n.removeProperty("lockScale")),n.childs().pnfStyle.childs().lockScale&&n.childs().pnfStyle.removeProperty("lockScale")),this._hasSeries=!0}e.properties().visible.listeners().subscribe(null,(function(){i._sourcesForAutoscale=null,i._currencyCache=null})),this.m_dataSources.push(e),this._mainSource=void 0,this._sourcesForAutoscale=null,this._sourcesToUpdateViews=null,this._currencyCache=null,this.updateFormatter(),this._initScaleProperties(),this.invalidateSourcesCache()}},e.prototype.removeDataSource=function(e){var t=this.m_dataSources.indexOf(e);if(Object(n.assert)(-1!==t,"Source is not attached to scale"),e.properties().visible.listeners().unsubscribeAll(this),this.m_dataSources.splice(t,1),e instanceof c.PriceDataSource){var i=this._priceDataSources.indexOf(e);if(Object(n.assert)(-1!==i,"Source is not found"),this._priceDataSources.splice(i,1),Object(p.isSymbolSource)(e)){var r=this._seriesLikeSources.indexOf(e) +;Object(n.assert)(-1!==r,"Source is not found"),this._seriesLikeSources.splice(r,1),this._seriesLikeSourcesSet.delete(e),e.symbolResolved().unsubscribeAll(this),e instanceof l.Series&&(this._hasSeries=!1)}e.currencyChanged().unsubscribeAll(this)}this.mainSource()||this.setMode({autoScale:!0}),this._mainSource=void 0,this._sourcesForAutoscale=null,this._sourcesToUpdateViews=null,this.updateFormatter(),this.invalidateSourcesCache(),0===this.m_dataSources.length&&this._lastSourceRemoved.fire(),this._currencyCache=null},e.prototype.currency=function(e){if(null!==this._currencyCache&&e.size===this._currencyCache.availableCurrenciesCount)return this._currencyCache.value;for(var t=void 0,i=new Set,r=new Set,o=0===this._seriesLikeSources.length,s=void 0,a=!0,l=0,c=0,u=0,h=this._seriesLikeSources;u0)s=null;else if(void 0===s)s=g;else if(null!==s&&s!==g){s=null;break}o=!0;break}}}}return void 0===t&&(t=0===l&&0===c?null:{readOnly:o,selectedCurrency:s||null,currencies:r,originalCurrencies:i,symbolSourceCount:l,allCurrenciesAreOriginal:a}),this._currencyCache={value:t,availableCurrenciesCount:e.size},t},e.prototype.onMarksChanged=function(){return this._onMarksChanged},e.prototype.priceRangeInPrice=function(){if(this.isEmpty())return null;var e=this.mainSource();if(null===e)return null;var t=Object(n.ensureNotNull)(e.firstValue()),i=this.height();return{from:this.coordinateToPrice(i-1,t),to:this.coordinateToPrice(0,t)}},e.prototype.setPriceRangeInPrice=function(e){if(!this.isPercentage()&&!this.isIndexedTo100()){var t=this.isInverted(),i=t?this.bottomMargin():this.topMargin(),n=t?this.topMargin():this.bottomMargin(),r=this.isLog(),o=r?Object(a.toLog)(e.from):e.from,l=r?Object(a.toLog)(e.to):e.to,c=l-o;o+=n*c,l-=i*c,this.setMode({autoScale:!1}),this.setPriceRange(new s.PriceRange(o,l)),this._marksCache=null,this._onMarksChanged.fire()}},e.prototype.hasMainSeries=function(){return this._hasSeries},e.prototype.getStudies=function(){return this.dataSources().filter(d.isStudy)},e.prototype.lastSourceRemoved=function(){return this._lastSourceRemoved},e.prototype._recalculateSourcesForAutoscale=function(){this._mainSource&&(this._scaleSeriesOnly=this._scalesProperties.childs().scaleSeriesOnly.value());var e=this._scaleSeriesOnly&&this._hasSeries +;this._sourcesForAutoscale=this.m_dataSources.filter((function(t){return!!(t.properties().visible.value()||t instanceof l.Series)&&(e?t instanceof l.Series:t.isIncludedInAutoScale())}))},e.prototype._updateAutoScaleDisabledProperty=function(e){var t=this._properties.childs(),i=t.indexedTo100.value()||t.percentage.value()||t.lockScale.value();e?t.autoScaleDisabled.setValueSilently(i):t.autoScaleDisabled.setValue(i)},e.prototype._setAutoScaleValueWithDependentProperties=function(e){var t=this._properties.childs();t.autoScale.setValueSilently(e),e&&(t.percentage.setValueSilently(!1),t.indexedTo100.setValueSilently(!1),t.lockScale.setValueSilently(!1),t.logDisabled.setValueSilently(!1)),this._updateAutoScaleDisabledProperty(!0)},e.prototype._setLockScaleValueWithDependentProperties=function(e){var t=this._properties.childs();t.lockScale.setValueSilently(e),e&&(t.autoScale.setValueSilently(!1),t.percentage.setValueSilently(!1),t.indexedTo100.setValueSilently(!1),t.log.setValueSilently(!1)),t.percentageDisabled.setValueSilently(e),t.logDisabled.setValueSilently(e),this._updateAutoScaleDisabledProperty(!0)},e.prototype._setPercentageValueWithDependentProperties=function(e){var t=this._properties.childs();t.percentage.setValueSilently(e),e&&(t.autoScale.setValueSilently(!0),t.log.setValueSilently(!1),t.lockScale.setValueSilently(!1),t.indexedTo100.setValueSilently(!1)),this._updateAutoScaleDisabledProperty(!0)},e.prototype._setIndexedTo100ValueWithDependentProperties=function(e){var t=this._properties.childs();t.indexedTo100.setValueSilently(e),e&&(t.autoScale.setValueSilently(!0),t.log.setValueSilently(!1),t.lockScale.setValueSilently(!1),t.percentage.setValueSilently(!1)),this._updateAutoScaleDisabledProperty(!0)},e.prototype._setLogValueWithDependentProperties=function(e){var t=this._properties.childs();t.log.setValueSilently(e),e&&(t.lockScale.setValueSilently(!1),t.percentage.setValueSilently(!1),t.indexedTo100.setValueSilently(!1)),this._updateAutoScaleDisabledProperty(!0)},e.prototype._initScaleProperties=function(){var e=this.isLockScale(),t=this.properties().childs();e&&(t.percentage.setValue(!1),t.indexedTo100.setValue(!1),t.log.setValue(!1),t.autoScale.setValue(!1)),t.percentageDisabled.setValue(e),t.logDisabled.setValue(e),this._updateAutoScaleDisabledProperty(!1),t.percentage.value()&&(t.log.setValue(!1),t.indexedTo100.setValue(!1)),t.indexedTo100.value()&&(t.log.setValue(!1),t.percentage.setValue(!1))},e}()},Yjuu:function(e,t,i){"use strict";var n=i("Ss5c").LineDataSource,r=i("5rJj"),o=i("ytGH").LineToolWidthsProperty,s=window.t("Fib Speed Resistance Arcs");function a(e,t){var r=t||a.createProperties();n.call(this,e,r),i.e("lt-pane-views").then(function(e){var t=i("bcXK").FibSpeedResistanceArcsPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe);for(var s=[this._properties.child("trendline").child("linewidth")],l=1;l<=a.LevelsCount;l++)s.push(this._properties.child("level"+l).child("linewidth"));this._widthsProperty=new o(s)}inherit(a,n),a.LevelsCount=11, +a.prototype.levelsCount=function(){return a.LevelsCount},a.prototype.pointsCount=function(){return 2},a.prototype.translatedType=function(){return s},a.prototype.name=function(){return"Fib Speed Resistance Arcs"},a.prototype.processErase=function(e,t){var i="level"+t,n=this.properties()[i].visible;e.setProperty(n,!1,"Erase level line")},a.createProperties=function(e){var t=new r("linetoolfibspeedresistancearcs",e,!1,{range:[1,11]});return a._configureProperties(t),t},a.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("pdv6").FibSpeedResistanceArcsDefinitionsViewModel}.bind(null,i)).catch(i.oe)},a._configureProperties=function(e){n._configureProperties(e)},t.LineToolFibSpeedResistanceArcs=a},YlKu:function(e,t,i){"use strict";i.r(t),i.d(t,"ApplyLineToolTemplateUndoCommand",(function(){return r}));var n=i("mrSG"),r=function(e){function t(t,i,n){var r=e.call(this,n)||this;return r._source=t,r._newState=i,r._oldState=t.properties().state(),r}return Object(n.__extends)(t,e),t.prototype.redo=function(){this._source.applyTemplate(this._newState)},t.prototype.undo=function(){this._source.applyTemplate(this._oldState)},t}(i("RDU5").UndoCommand)},YmeR:function(e,t,i){"use strict";i.r(t),i.d(t,"ActionBinder",(function(){return o}));var n=i("mrSG"),r=i("2h0C"),o=function(e){function t(t,i,n,r,o){void 0===o&&(o=null);var s=e.call(this,t,i,!0,n,r)||this;return null!==o?t.update({onExecute:o.bind(s)}):t.update({onExecute:s._onActionCallback.bind(s)}),s}return Object(n.__extends)(t,e),t.prototype.action=function(){return this.control()},t.prototype.value=function(){return this.action().isChecked()},t.prototype.setValue=function(e){this.action().update({checked:Boolean(e)})},t.prototype._onActionCallback=function(){this._undoModel.setProperty(this._property,this.value(),this._undoText)},t}(r.Binding)},YuHv:function(e,t,i){"use strict";i.d(t,"a",(function(){return r}));var n=i("AWC/");function r(e,t){void 0===e&&(e=[]),void 0===t&&(t=[]);var i=document.createElement("div"),r=document.createElement("div");return i.appendChild(r),i.classList.add(n.container),r.classList.add(n.inner),e.forEach((function(e){i.classList.add(n[e])})),t.forEach((function(e){i.classList.add(n[e])})),i}},Z0Sh:function(e,t,i){"use strict";var n=i("Ss5c").LineDataSource,r=i("5rJj"),o=window.t("Gann Box");function s(e,t){var r=t||s.createProperties();n.call(this,e,r),i.e("lt-pane-views").then(function(e){var t=i("eg8N").GannSquarePaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}inherit(s,n),s.HLevelsCount=7,s.VLevelsCount=7,s.prototype.hLevelsCount=function(){return s.HLevelsCount},s.prototype.vLevelsCount=function(){return s.VLevelsCount},s.prototype.pointsCount=function(){return 2},s.prototype.translatedType=function(){return o},s.prototype.name=function(){return"Gann Box"};var a=[4.5,9,11.25,18,22.5,36,45],l=function(){for(var e=[],t=a.length-1,i=1,n=0,r=0;r<1e10;)r=a[n]*i,e.push(Math.round(r)), +e.push(Math.ceil(-r)),n===t-1&&(i*=10),n=(n+1)%t;return e.sort((function(e,t){return et?1:0})),e}();s.prototype._alignPriceOnPattern=function(e,t){var i=Math.round(1e6*(e.price-t.price))/1e6;if(0===i)return t.price;for(var n=a[0],r=a[a.length-1],o=1,s=Math.abs(i);s=0&&!(a[c]*o=0?l:-l),e},s.prototype._alignTimeOnPattern=function(e,t){var i=e.index-t.index;if(0===i)return 0;for(var n=l.length-2;n>=0&&!(l[n]0?1:0,e.index=t.index+l[n],e},s.prototype._alignPointsFixedIncrement=function(e,t){return this._alignTimeOnPattern(e,t),this._alignPriceOnPattern(e,t),e},s.prototype._preparePoint=function(e,t){return t&&t.shift()&&0!==this._points.length&&this._alignPointsFixedIncrement(e,this._points[0]),n.prototype._preparePoint.call(this,e,t)},s.prototype.setPoint=function(e,t,i){if(i&&i.shift()){var r=0===e?this._points[1]:this._points[0];this._alignPointsFixedIncrement(t,r)}n.prototype.setPoint.call(this,e,t,i)},s.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("2liL").GannSquareDefinitionsViewModel}.bind(null,i)).catch(i.oe)},s.createProperties=function(e){var t=new r("linetoolgannsquare",e,!1,{range:[1,7],prefixes:["h","v"],names:["coeff","color","visible"]});return s._configureProperties(t),t},s._configureProperties=function(e){n._configureProperties(e)},t.LineToolGannSquare=s},Z8aO:function(e,t,i){"use strict";i.r(t),i.d(t,"SeriesPriceLinePaneView",(function(){return s}));var n=i("mrSG"),r=i("k4w6"),o=i("8Uy/"),s=function(e){function t(t){var i=e.call(this,t)||this;return i._lineRendererData.linestyle=o.LINESTYLE_DOTTED,i}return Object(n.__extends)(t,e),t.prototype._updateImpl=function(){if(this._lineRendererData.visible=!1,this._series.properties().showPriceLine.value()&&12!==this._series.properties().style.value()){var e=this._series.lastValueData(void 0,!0);e.noData||(this._lineRendererData.visible=!0,this._lineRendererData.y=e.coordinate,this._lineRendererData.color=this._series.priceLineColor(e.color),this._lineRendererData.linewidth=this._series.properties().priceLineWidth.value())}},t}(r.a)},ZAbA:function(e,t,i){"use strict";i.r(t),i.d(t,"SeriesDataEvents",(function(){return o}));var n=i("aIyQ"),r=i.n(n),o=function(){function e(){this._completed=new r.a,this._error=new r.a,this._symbolError=new r.a,this._symbolResolved=new r.a,this._seriesError=new r.a,this._symbolNotPermitted=new r.a,this._symbolGroupNotPermitted=new r.a,this._extendedHoursNotPermitted=new r.a,this._chartTypeNotPermitted=new r.a,this._intradaySpreadNotPermitted=new r.a,this._intradayExchangeNotPermitted=new r.a,this._customIntervalNotPermitted=new r.a,this._secondsIntervalNotPermitted=new r.a,this._tickMarksRangeChanged=new r.a,this._barReceived=new r.a,this._messageReceived=new r.a}return e.prototype.completed=function(){return this._completed},e.prototype.error=function(){return this._error}, +e.prototype.symbolError=function(){return this._symbolError},e.prototype.symbolResolved=function(){return this._symbolResolved},e.prototype.seriesError=function(){return this._seriesError},e.prototype.symbolNotPermitted=function(){return this._symbolNotPermitted},e.prototype.symbolGroupNotPermitted=function(){return this._symbolGroupNotPermitted},e.prototype.extendedHoursNotPermitted=function(){return this._extendedHoursNotPermitted},e.prototype.chartTypeNotPermitted=function(){return this._chartTypeNotPermitted},e.prototype.intradaySpreadNotPermitted=function(){return this._intradaySpreadNotPermitted},e.prototype.intradayExchangeNotPermitted=function(){return this._intradayExchangeNotPermitted},e.prototype.customIntervalNotPermitted=function(){return this._customIntervalNotPermitted},e.prototype.secondsIntervalNotPermitted=function(){return this._secondsIntervalNotPermitted},e.prototype.tickMarksRangeChanged=function(){return this._tickMarksRangeChanged},e.prototype.barReceived=function(){return this._barReceived},e.prototype.messageReceived=function(){return this._messageReceived},e.prototype.fireCompleted=function(){this._completed.fire()},e.prototype.fireError=function(){this._error.fire()},e.prototype.fireSymbolError=function(e){this._symbolError.fire(e),this.fireError()},e.prototype.fireSymbolResolved=function(e){this._symbolResolved.fire(e)},e.prototype.fireSeriesError=function(e){this._seriesError.fire(e),this.fireError()},e.prototype.fireSymbolNotPermitted=function(e){this._symbolNotPermitted.fire(e),this.fireError()},e.prototype.fireSymbolGroupNotPermitted=function(e){this._symbolGroupNotPermitted.fire(e),this.fireError()},e.prototype.fireExtendedHoursNotPermitted=function(){this._extendedHoursNotPermitted.fire(),this.fireError()},e.prototype.fireChartTypeNotPermitted=function(e){this._chartTypeNotPermitted.fire(e),this.fireError()},e.prototype.fireIntradaySpreadNotPermitted=function(){this._intradaySpreadNotPermitted.fire(),this.fireError()},e.prototype.fireIntradayExchangeNotPermitted=function(){this._intradayExchangeNotPermitted.fire(),this.fireError()},e.prototype.fireCustomIntervalNotPermitted=function(){this._customIntervalNotPermitted.fire(),this.fireError()},e.prototype.fireSecondsIntervalNotPermitted=function(){this._secondsIntervalNotPermitted.fire(),this.fireError()},e.prototype.fireTickMarksRangeChanged=function(e){this._tickMarksRangeChanged.fire(e)},e.prototype.fireBarReceived=function(e){this._barReceived.fire(e)},e.prototype.fireMessageReceived=function(e){this._messageReceived.fire(e)},e}()},ZBiT:function(e,t,i){e.exports={"css-value-pane-controls-padding-left":"1px","css-value-pane-controls-padding-right":"5px"}},ZJKN:function(e,t,i){"use strict";i.r(t),i.d(t,"BarsRange",(function(){return r}));var n=i("Eyy1"),r=function(){function e(e,t){Object(n.assert)(e<=t,"The last bar in the bars range should be greater than or equal to the first bar"),this._firstBar=e,this._lastBar=t}return e.prototype.firstBar=function(){return this._firstBar},e.prototype.lastBar=function(){return this._lastBar}, +e.prototype.count=function(){return this._lastBar-this._firstBar+1},e.prototype.contains=function(e){return this._firstBar<=e&&e<=this._lastBar},e.prototype.equals=function(e){return this._firstBar===e.firstBar()&&this._lastBar===e.lastBar()},e.compare=function(e,t){return null===e||null===t?e===t:e.equals(t)},e}()},ZZnO:function(e,t,i){"use strict";i.r(t),i.d(t,"dateFormatProperty",(function(){return a})),i.d(t,"removeSettingsValue",(function(){return l}));var n=i("Vdly"),r=i("m/cY"),o=i("e1ZQ");function s(){return n.getValue("date_format",Object(o.c)())}var a=Object(r.a)(s());function l(){a.setValue(Object(o.c)()),n.remove("date_format")}n.onSync.subscribe(null,(function(){return a.setValue(s())})),a.listeners().subscribe(null,(function(){return n.setValue("date_format",a.value())}))},ZjKI:function(e,t,i){"use strict";i.r(t),i.d(t,"CLOSE_POPUPS_AND_DIALOGS_COMMAND",(function(){return n}));var n="CLOSE_POPUPS_AND_DIALOGS_COMMAND"},"Zo2/":function(e,t,i){"use strict";(function(t){i("YCFM"),i("YFKU");var n=i("Eyy1").assert,r=i("Y7w9").moveToHead,o=i("mkn5").PaneWidget,s=i("fYB8").PaneSeparator,a=i("mNEU"),l=i("1IXQ").PriceAxisWidget,c=i("uPb3").TimeAxisWidget,u=i("fTGZ").BarsMarksContainer,h=i("qJq3").Series,d=i("Kxc7"),p=i("YmeR").ActionBinder,_=i("mKT+").resolveAndShowEditObjectDialog,f=i("Vdly").setValue,m=i("QloM").TabNames,v=i("cdbK").showGoToDateDialog,y=i("/3z9"),g=i("lxNp"),b=i("7nsU").showConfirmInputsDialog,S=i("GVHu").Study,w=i("8sOK").StudyStub,P=i("3ClC").isStudy,C=i("Ss5c").LineDataSource,x=i("CW80"),T=x.isLineTool,I=x.isStudyLineTool,M=i("7KDR"),L=M.Action,O=M.Separator,k=(i("L/Ed").ToolboxType,i("mMWL")),A=i("LxhU").Interval,E=i("pPtI"),V=E.setLastUsedResolution,D=E.getDefaultResolution,B=i("n5al"),R=B.isRangeStyle,N=B.getDefaultStyle,F=i("pvsv").showSymbolInfoDialog,j=i("H0vP").InvalidationMask,W=i("H0vP").InvalidationLevel,H=i("nqXy").MouseWheelHelper,z=i("PT1i").linking,U=i("mYjs").showChangeIntervalDialog,G=i("u5Q5").showDialog,Y=i("u5Q5").activateKeyPressHandler,q=i("Ocx9").DefaultProperty,K=i("+6ja"),Z=K.availableTimezones,J=K.timezoneIsAvailable,X=i("0F0w").ChartSession,Q=i("0YCj"),ee=i("c2JX").Spinner,te=i("JWMC").trackEvent,ie=i("VaSN").lastEventIsTouch,ne=i("ikwP").Size,re=i("wZIs"),oe=i("txPx").getLogger("ChartWidget",{color:"#606"}),se=i("U0+/").StudyMetaInfoRepository,ae=i("VNzU").isMultipleLayout,le=i("b1GK").addPerfMark,ce=i("KnF9").EnvironmentState,ue=i("FQhm"),he=i("wjVR").ChartWidgetBase,de=i("qFKp").CheckMobile.any(),pe=i("ikwP").getCanvasDevicePixelRatio,_e=i("B8p3").setHandler,fe=i("YWnQ").permissionDenied,me=i("uDHo").TIMEFRAMETYPE,ve=window.t("On The Left"),ye=window.t("On The Right"),ge=window.t("Move Scale To Left"),be=window.t("Move Scale To Right"),Se=d.enabled("chart_content_overrides_by_defaults");function we(e,i,n){he.call(this,e,i,n),this._options.timeScaleWidget&&(this._options.timeScaleWidget.pressedMouseMoveScale=this._options.handleScale.axisPressedMouseMove);var r=this;this._startSpinner(this._options.container.value()) +;var o=this._options.content,s=this._options.readOnly;this._removeMaximizeHotkey=null,r._hotkeys=g.createGroup({desc:"Chart actions",isDisabled:function(){return!r._isActive}});var a=this._options.containsData,l=this._options.onWidget,c=this._options.onCmeWidget;c&&oe.logWarn("[ChartWidget] 'onCmeWidget' option is depricated");var u=this._options.widgetCustomer,h=this._options.timezone,d=this._options.hideSymbolSearch,p=this._options.defSymbol,_=A.isValid(this._options.defInterval)?this._options.defInterval:void 0,f=parseInt(this._options.defStyle),m=B.isValidStyle(f)?f:void 0,v=this._options.defExtendedHours,y=void 0!==this._options.defTimeframe?{value:this._options.defTimeframe.toUpperCase(),type:me.PeriodBack}:void 0;this._chartWidgetCollection=this._options.chartWidgetCollection||null,this._content=o,this._initialLoading=this._options.initialLoading,this._readOnly=s,this._containsData=a,this._showChartEvents=!a&&this._options.chartEventsEnabled,this._defSymbol=p,this._defInterval=_,this._defTimeframe=y,this._defStyle=m,this._onWidget=!!l,this._compareSymbols=this._options.compareSymbols,this._onWidget&&(c?this._widgetCustomer="cme":u&&(this._widgetCustomer=u)),this._hideSymbolSearch=d,this._frameTime=30,this._model=null,this._metaInfo={},this._drawRafId=0,this._lhsAxesWidth=0,this._rhsAxesWidth=0;var b=this._contentSeriesProperties();b&&(p=b.symbol,_=b.interval),void 0===this._options.useUserChartPreferences&&(this._options.useUserChartPreferences=!0),this._properties=new q("chartproperties",void 0,void 0,this._options.useUserChartPreferences);var S=this._options.useUserChartPreferences?re.defaults("chartproperties.mainSeriesProperties"):re.factoryDefaults("chartproperties.mainSeriesProperties");this._properties.mainSeriesProperties.merge(S),_=_||S.interval||"D",B.isValidStyle(m)||(m=B.isValidStyle(S.style)?S.style:N(A.isRange(_))),this._properties.mainSeriesProperties.merge({visible:!0,symbol:p||DEFAULT_SYMBOL,shortName:"",timeframe:"",onWidget:this._onWidget,interval:_,style:m,extendedHours:v,lineStyle:{styleType:re.factoryDefaults("chartproperties.mainSeriesProperties.lineStyle.styleType")}}),this._containsData&&this._properties.mainSeriesProperties.merge({showCountdown:!1}),h&&J(h)&&this._properties.timezone.setValue(h),this._tagsChanged=new t,this._disconnected=new t,this._reconnectBailout=new t,this._connected=new t,this._redraw=new t,this._onScroll=new t,this.chartWidgetInitialized=new t,this._chartSession=new X(ChartApiInstance),this._metaInfoRepository=new se(this._chartSession),this.lhsPriceAxisWidthChanged=new t,this.rhsPriceAxisWidthChanged=new t,this._timingsMeter=null,this._isActive=this._options.isActive,this._options.container.subscribe((function(e){r._setElement($(e))}),{callWithLast:!0});var w=function(){r.resize()};this._options.width.subscribe(w),this._options.height.subscribe(w),this._options.visible.subscribe(this._updateTimingsMeterState.bind(this)),this._aboutToBeDestroyed=new t,this._actions=null,this._definitionsViewModel=null,this._backgroundTopColorSpawn=null, +this._backgroundBottomColorSpawn=null,this._onZoom=new t}inherit(we,he),we.prototype.onZoom=function(){return this._onZoom},we.prototype.isInitialized=function(){return Boolean(this._inited)},we.prototype.compareSymbols=function(){return this._compareSymbols},we.prototype._getChartPropertyDefinitionsViewModel=function(){if(null===this._definitionsViewModel){var e=this;return new Promise((function(t,n){Promise.all([i.e(21),i.e(54),i.e("general-property-page")]).then(function(r){if(e._isDestroyed)n("Chart widget already destroyed");else{var o=i("5lPo").ChartPropertyDefinitionsViewModel;e.withModel(e,(function(){null===e._definitionsViewModel&&(e._definitionsViewModel=new o(e.model(),e.properties(),e._options)),t(e._definitionsViewModel)}))}}.bind(null,i)).catch(i.oe)}))}return Promise.resolve(this._definitionsViewModel)},we.prototype._initMaximizeHotkey=function(e){var t=this;function i(e){e.defaultPrevented||y.modifiersFromEvent(e)===y.Modifiers.Alt&&e.stopPropagation()}function n(e){e.defaultPrevented||y.modifiersFromEvent(e)===y.Modifiers.Alt&&(e.preventDefault(),e.stopPropagation(),t.toggleFullscreen())}return e.addEventListener("mousedown",i,!0),e.addEventListener("click",n,!0),function(){e.removeEventListener("mousedown",i,!0),e.removeEventListener("click",n,!0)}},we.prototype.toggleFullscreen=function(){var e=this.getResizerDetacher();e.fullscreenable.value()&&(e.fullscreen.value()?e.exitFullscreen():e.requestFullscreen())},we.prototype._setElement=function(e){this._jqMainDiv&&(this._jqMainDiv.remove(),this._jqParent.empty()),this._controlBarNavigation&&(this._controlBarNavigation.destroy(),this._controlBarNavigation=null),null!==this._removeMaximizeHotkey&&this._removeMaximizeHotkey(),this._removeMaximizeHotkey=this._initMaximizeHotkey(e[0]);var t=e.prop("ownerDocument");this._jqParent=$(t.createElement("div")).addClass("chart-container-border").prependTo(e),this._jqMainDiv=$('
    ',t),this._elTooltipDiv=t.createElement("div"),this._elTooltipDiv.className="tooltip-wrapper",this._jqMainDiv.append(this._elTooltipDiv),this._elMainTable=t.createElement("table"),this._elMainTable.className="chart-markup-table",this._elMainTable.setAttribute("cellpading","0"),this._elMainTable.setAttribute("cellspacing","0"),this._jqMainDiv.append(this._elMainTable),(this._options.controlBarEnabled||d.enabled("control_bar"))&&Promise.all([i.e(70),i.e(12),i.e("chart-widget-gui")]).then(function(e){if(!this._isDestroyed){this._controlBarNavigation&&this._controlBarNavigation.destroy();var t=i("TGRH").ControlBarNavigation;this._controlBarNavigation=new t(this,this._jqMainDiv[0],this._options.controlBar),this._model&&this.adjustSize()}}.bind(this).bind(null,i)).catch(i.oe),(this._options.handleScale.mouseWheel||this._options.handleScroll.mouseWheel)&&(this._mouseWheelHelper=new H,this._onWheelBound=this._onMousewheel.bind(this),this._jqMainDiv[0].addEventListener("wheel",this._onWheelBound,{passive:!1})),this.resize(),this._justActivated=!1,this.withModel(this,(function(){this._jqParent.append(this._jqMainDiv), +this._jqMainDiv.on("mousedown",this._beginRequestActive.bind(this)),this._jqMainDiv.on("mouseup",this._endRequestActive.bind(this)),this._jqMainDiv.on("touchstart",this._beginRequestActive.bind(this)),this._jqMainDiv.on("touchmove",this._endRequestActive.bind(this)),this._jqMainDiv.on("touchend",this._endRequestActive.bind(this)),this._jqParent.on("click",this._requestActive.bind(this))})),this._inited&&(null!==this._timeAxisWidget&&(this._timeAxisWidget.destroy(),this._timeAxisWidget=null),this._paneWidgets.forEach((function(e){e.destroy()})),this._paneWidgets.length=0,this._paneSeparators.forEach((function(e){e.destroy()})),this._paneSeparators.length=0,this._update(j.full()))},we.prototype._beginRequestActive=function(){var e=!1;this._chartWidgetCollection&&(e=this._chartWidgetCollection.activeChartWidget.value()!==this,this._chartWidgetCollection.activeChartWidget.setValue(this)),e&&(ie()&&this._isLineToolModeExceptBrush()&&this.updateCrossHairPositionIfNeeded(),this._justActivated=!0)},we.prototype._endRequestActive=function(){var e=this;this._justActivated&&setTimeout((function(){e._justActivated=!1}),0)},we.prototype._requestActive=function(){this._beginRequestActive(),this._endRequestActive()},we.prototype.justActivated=function(){return this._justActivated},we.prototype._onMousewheel=function(e){if(this.model().model().zoomEnabled()&&(TradingView.onWidget()||!parent||parent===window||!parent.IS_DEMO_PAGE)&&this.model()&&!this.noScroll&&!this.model().timeScale().isEmpty()){var t=this._mouseWheelHelper.processWheel(e),i=t.deltaX/100,n=-t.deltaY/100;if(0!==i&&this._options.handleScroll.mouseWheel||0!==n&&this._options.handleScale.mouseWheel){switch(e.cancelable&&e.preventDefault(),e.deltaMode){case e.DOM_DELTA_PAGE:i*=120,n*=120;break;case e.DOM_DELTA_LINE:i*=32,n*=32}if(0!==n&&this._options.handleScale.mouseWheel){var r=Math.sign(n)*Math.min(1,Math.abs(n)),o=this._jqMainDiv[0].getBoundingClientRect(),s=e.clientX-this._lhsAxesWidth-o.left;if(!Number.isFinite(s)||!Number.isFinite(r))return void oe.logWarn("Incorrect mouse wheel processing: scrollPosition: "+s+", zoomScale: "+r);var a=new ce(e).control();this.model().model().zoomTime(s,r,!!a||void 0),this._onZoom.fire(a)}0!==i&&this._options.handleScroll.mouseWheel&&this.model().scrollChart(-80*i)}}},we.prototype.setTimezone=function(e){e&&J(e)?this._properties.timezone.setValue(e):console.warn("Incorrect timezone: "+JSON.stringify(e))},we.prototype.getTimezone=function(){return this._properties.timezone.value()},we.prototype.refreshMarks=function(){this.model().barsMarksSources().forEach((function(e){e.refreshData()}))},we.prototype.clearMarks=function(){this.model().barsMarksSources().forEach((function(e){e.clearMarks()}))},we.prototype.metaInfoRepository=function(){return this._metaInfoRepository},we.prototype._init=function(){var e=this;this.model()&&this.model().mainSeries().clearData(),this.initColors(),this._makeDefaultGui();var t=function(){e._checkObsoleteTimezone(),e._chartSession&&e._chartSession.connected()&&this._model.restart(), +this._content&&(this.initColors(),this._updateGui(),this.update()),this._resizeHandler=function(){this.adjustSize(),this._model&&this._model.mainSeries().requestMoreData(),this.paint()}.bind(this),this._resizeHandler(),this._jqParent.append(this._jqMainDiv),this._spinner&&(this._spinner.stop(),delete this._spinner),$(window).on("keydown:chart_"+this._id,(function(e){27===e.which&&e.preventDefault()})),this._initBarsMarksSources(),this._activateSymbolSearchHotkeys(),this.model().timeScale().onScroll().subscribe(this,(function(){this._onScroll.fire()})),this._inited=!0}.bind(this),i=this._makeDefaultModel();void 0===i?t():i.then(t)},we.prototype._activateSymbolSearchHotkeys=function(){this.readOnly()||this._hideSymbolSearch||Y()},we.prototype._checkObsoleteTimezone=function(){var e=this._properties.timezone.value();J(e)||this._properties.timezone.setValue({UTC:"Etc/UTC",EST:"America/New_York",CST:"America/Chicago",PST:"America/Los_Angeles"}[e]||"exchange")},we.prototype._initBarsMarksSources=function(){var e=this;this.withModel(this,(function(){this.model().barsMarksSources().forEach((function(t){t.onNeedRepaint.subscribe(e,(function(){e.model().model().lightUpdate()}))}))}))},we.prototype.initColors=function(){this._properties.scalesProperties.lineColor.listeners().subscribe(this,we.prototype.setScaleLineColor),this._properties.scalesProperties.textColor.listeners().subscribe(this,we.prototype.setScaleTextColor)},we.prototype._initBackgroundColor=function(){null===this._backgroundTopColorSpawn&&(this._backgroundTopColorSpawn=this._model.model().backgroundTopColor().spawn(),this._backgroundTopColorSpawn.subscribe(this._onBackgroundColorChanged.bind(this))),null===this._backgroundBottomColorSpawn&&(this._backgroundBottomColorSpawn=this._model.model().backgroundColor().spawn(),this._backgroundBottomColorSpawn.subscribe(this._onBackgroundColorChanged.bind(this)))},we.prototype.paneWidgets=function(){return this._paneWidgets},we.prototype.paneByCanvas=function(e){for(var t=0;tW.Cursor&&this._timeAxisWidget.update(),this._dataWindowWidget){var i=e.maxPaneInvalidation();i===W.Full?this._dataWindowWidget.fullUpdate():i>W.None&&this._dataWindowWidget.update()}for(var n=0;n'),this.$shield=$('
    ').appendTo(this.$element),this.$element.appendTo(t),this._showed=!1,this._cw.withModel(this,this._connectToModel)},we.LoadingScreen.prototype._connectToModel=function(){this._cw.model().mainSeries().dataEvents().messageReceived().subscribe(this,(function(e){ +switch(e.method){case"symbol_error":e.params[1]!==fe&&this.hide();break;case"series_error":d.enabled("hide_loading_screen_on_series_error")&&this.hide();break;case"series_completed":this.hide()}}))},we.LoadingScreen.prototype.show=function(){this._cw._inLoadingState=!0,this._showed||(this._showed=!0,this._show())},we.LoadingScreen.prototype._show=function(){var e=this._cw.properties().paneProperties.background.value();this.$shield.css("background",e),this.$element.addClass("fade")},we.LoadingScreen.prototype.hide=function(){delete this._cw._inLoadingState,this._showed&&this._hide()},we.LoadingScreen.prototype._hide=function(){this._showed=!1,this.$element.removeClass("fade")},we.LoadingScreen.prototype.$canvas=null,we.LoadingScreen.prototype.context=null,we.LoadingScreen.prototype.isShown=function(){return this._showed},we.prototype.unsetActivePaneWidget=function(){this.activePaneWidget=!1},we.prototype.setActivePaneWidget=function(e){this.activePaneWidget=e},we.prototype.toggleMaximizePane=function(e){if(!(this._paneWidgets.length<2)){this._maximizedPaneWidget?(this._maximizedPaneWidget.state().setMaximized(!1),this._maximizedPaneWidget=null,this._paneSeparators.forEach((function(e){e.show()}))):(this._maximizedPaneWidget=e,this._maximizedPaneWidget.state().setMaximized(!0),this._paneSeparators.forEach((function(e){e.hide()})));for(var t=this._paneWidgets.length;t--;)this._paneWidgets[t].updateControls(),this._paneWidgets[t].updatePriceAxisWidgets();this._timeAxisWidget.updatePriceAxisStubs(),this.adjustSize(),this.updateCrossHairPositionIfNeeded()}},we.prototype._makePaneWidgetsAndSeparators=function(){for(var e=this._model.panes(),t=e.length,i=this._paneWidgets.length,n=t;n0){var l=new s(this,n-1,n);this._paneSeparators.push(l),this._timeAxisWidget?$(l.getElement()).insertBefore(this._timeAxisWidget.getElement()):$(l.getElement()).appendTo(this._elMainTable)}this._timeAxisWidget?this._elMainTable.insertBefore(a.getElement(),this._timeAxisWidget.getElement()):this._elMainTable.appendChild(a.getElement())}null!==this._timeAxisSeparator&&this._timeAxisSeparator.destroy(),this._timeAxisSeparator=new s(this,this._paneWidgets.length-1,0,!0),$(this._timeAxisSeparator.getElement()).insertBefore(this._timeAxisWidget.getElement());for(n=0;n0;)for(var t=this._content.panes[e].sources,i=t.length;i-- >0;)if("MainSeries"===t[i].type)return t[i].state},we.prototype.updateUndoRedo=function(){this._model&&(this.actions().undo.update({disabled:this._model.undoHistory().undoStack().isEmpty()}),this.actions().redo.update({disabled:this._model.undoHistory().redoStack().isEmpty()}))},we.prototype.createSessionBreaksActions=function(e){var t=new L({label:window.t("Session Breaks"),checkable:!0,statName:"ToggleSessionBreaks"}) +;t.binder=new p(t,this._model.chartModel().sessions().properties().graphics.vertlines.sessBreaks.visible,this.model(),"Session Breaks"),this._actions.sessionBreaks=t},we.prototype.updateActionForIntradayOnly=function(e){e&&e instanceof L&&e.update({disabled:this.model().mainSeries().isDWM()})},we.prototype.containsVolume=function(){return this.model().dataSources().some((function(e){return e instanceof S&&"Volume"===e.metaInfo().shortId}))},we.prototype.containsStudyByPredicate=function(e){return!!this._model&&this._model.dataSources().some((function(t){if(!(t instanceof S))return!1;var i=t.metaInfo();return e(i)}))},we.prototype.containsStudy=function(e){return this.containsStudyByPredicate((function(t){return t.id===e||t.fullId===e}))},we.prototype.isSmall=function(){return this._width()<550||this._height()<300},we.prototype.onWidget=function(){return this._onWidget},we.prototype.onCmeWidget=function(){return"cme"===this.widgetCustomer()},we.prototype.widgetCustomer=function(){return this._widgetCustomer},we.prototype._width=function(){return this._options.width.value()},we.prototype._height=function(){return this._options.height.value()},we.prototype.resize=function(){var e={height:this._height()+"px",width:this._width()+"px"};this._jqMainDiv.css(e),this._elMainTable.style.height=e.height,this._elMainTable.style.width=e.width,this._resizeHandler&&this._jqMainDiv&&this._resizeHandler()},we.prototype.chartSession=function(){return this._chartSession},we.prototype.maxLhsPriceAxisWidth=0,we.prototype.maxRhsPriceAxisWidth=0,we.prototype.GUIResetScales=function(){te("GUI","Reset Scales");var e=this.model();e&&e.resetScales()},we.prototype.onLineCancelled=function(){k.resetToCursor()},we.prototype._startSpinner=function(e){this._spinner||e&&(this._spinner=(new ee).spin(e))},we.prototype.isJustClonedChart=function(){return!!(this._options||{}).justCloned},we.prototype.setDataWindowWidget=function(e){this._dataWindowWidget=e},we.prototype.removeDataWindowWidget=function(){this._dataWindowWidget=null},d.enabled("datasource_copypaste")&&(we.prototype.onAppClipboardPaste=function(e){oe.logDebug("[[paste]]"),this._model&&this._model.pasteSourceFromClip(e)},we.prototype.onAppClipboardCopy=function(e){e||(e=this._model.selection().sources()),e.filter((function(e){return e instanceof S&&e.isChildStudy()})).length?oe.logDebug("Can not copy child study"):(oe.logDebug("[[copy]]"),this._model&&this._model.copySourcesToClip(e))},we.prototype.onAppClipboardCut=function(e){oe.logDebug("[[cut]]"),this._model&&this._model.cutSourcesToClip(e||this._model.selection().sources())}),we.prototype.applyOverrides=function(e){var t={};for(var i in e)i.startsWith("mainSeriesProperties.priceAxisProperties")||(t[i]=e[i]);applyPropertiesOverrides(this.properties(),null,!1,t,null),this._model&&(applyPropertiesOverrides(this._model.model().properties(),null,!1,t),applyPropertiesOverrides(this._model.mainSeries().properties(),null,!1,t,"mainSeriesProperties"))},we.prototype.applyStudiesOverrides=function(e){Q.setDefaultsOverrides(e), +this._applyStudiesOverrides()},we.prototype.setActive=function(e){this._isActive=e,ie()&&(e&&this.selectBarMode().value()?this.startTrackingMode():this.exitTrackingMode()),this._paneWidgets.forEach((function(e){e.update()})),e||this.model().selectionMacro((function(e){e.clearSelection()}))},we.prototype.isActive=function(){return this._isActive},we.prototype.trackTime=function(){return this._chartWidgetCollection.lock.trackTime},we.prototype.crossHairSyncEnabled=function(){return this._chartWidgetCollection.lock.crosshair.value()},we.prototype.isMultipleLayout=function(){return ae(this._chartWidgetCollection.layout.value())},we.prototype.selectBarMode=function(){return this._model.model().selectBarMode()},we.prototype.toggleSelectBarMode=function(){this.selectBarMode().value()||(k.resetToCursor(!0),this._model.lineBeingCreated()&&this._model.cancelCreatingLine()),this._model.model().toggleSelectBarMode(),this.selectBarMode().value()&&this.startTrackingMode()},we.prototype.onBarSelected=function(){return this._model.model().onBarSelected()},we.prototype.trySetChartStyle=function(e){var t=this.model();return!!t&&(t.mainSeries().properties().style.value()===e||!!d.enabled("charting_library_base")&&(this._setChartStyle(e),!0))},we.prototype._setChartStyle=function(e){var t=this.model(),i=t.mainSeries().properties().style;t.setChartStyleProperty(i,e,"Change Series Style")},we.prototype.showReplayOrderConfirmationDialog=function(){if(!this.model().isInReplay())return Promise.resolve()},we.prototype._addPerfMark=function(e){le("ChartWidget."+this._id+"."+e)},we.prototype.requestFullscreen=function(){this._options.requestFullscreen()},we.prototype.getResizerDetacher=function(){return this._options},e.exports.ChartWidget=we,e.exports.trackingModeIsAvailable=de}).call(this,i("aIyQ"))},"Zp/P":function(e,t,i){"use strict";i.r(t),i.d(t,"extendAndClipLineSegment",(function(){return l})),i.d(t,"getArrowPoints",(function(){return c})),i.d(t,"optimalBarWidth",(function(){return u})),i.d(t,"optimalCandlestickWidth",(function(){return h})),i.d(t,"optimalHiLoWidth",(function(){return d})),i.d(t,"selectionTolerance",(function(){return p})),i.d(t,"coordinateIsValid",(function(){return _})),i.d(t,"setValidLineStyle",(function(){return f}));var n=i("aO4+"),r=i("hBTJ"),o=i("VaSN"),s=i("ogJP"),a=i("jFln");function l(e,t,i,o,s,a){if(Object(n.equalPoints)(e,t))return null;var l=new n.Point(0,0),c=new n.Point(i,o);if(s){if(a){var u=Object(r.intersectLineAndBox)(Object(n.lineThroughPoints)(e,t),Object(n.box)(l,c));return Array.isArray(u)?u:null}var h;return null===(h=Object(r.intersectRayAndBox)(t,e,Object(n.box)(l,c)))||Object(n.equalPoints)(t,h)?null:Object(n.lineSegment)(t,h)}if(a)return null===(h=Object(r.intersectRayAndBox)(e,t,Object(n.box)(l,c)))||Object(n.equalPoints)(e,h)?null:Object(n.lineSegment)(e,h);u=Object(r.intersectLineSegmentAndBox)(Object(n.lineSegment)(e,t),Object(n.box)(l,c));return Array.isArray(u)?u:null}function c(e,t,i,n){var r=.5*i,o=Math.sqrt(2),s=t.subtract(e),a=s.normalized(),l=5*i;n&&(l=Math.min(l,.35*s.length())) +;var c=1*r;if(l*o*.2<=c)return[];var u=a.scaled(l),h=t.subtract(u),d=a.transposed(),p=1*l,_=d.scaled(p),f=h.add(_),m=h.subtract(_),v=f.subtract(t).normalized().scaled(c),y=m.subtract(t).normalized().scaled(c),g=t.add(v),b=t.add(y),S=r*(o-1),w=d.scaled(S),P=Math.min(l-1*r/o,r*o*1),C=a.scaled(P),x=t.subtract(w),T=t.add(w),I=t.subtract(C);return[[f,g],[m,b],[x,I.subtract(w)],[T,I.add(w)]]}function u(e,t){return t=t||1,Math.floor(.3*e*t)}function h(e,t){if(e>=2.5&&e<=4)return Math.floor(3*t);var i=1-.2*Math.atan(Math.max(4,e)-4)/(.5*Math.PI),n=Math.floor(e*i*t),r=Math.floor(e*t),o=Math.min(n,r);return Math.max(Math.floor(t),o)}function d(e){return.4*e}function p(e){return(Object(o.lastEventIsTouch)()?12:2)+.5*e}function _(e){return null!=e&&!Object(s.isNaN)(e)}function f(e,t){void 0!==t&&Object(a.setLineStyle)(e,t)}},Zp8I:function(e,t,i){"use strict";i.r(t),i.d(t,"PaneRendererStepLine",(function(){return c}));var n=i("GEp6"),r=i("VdBB"),o=i("aO4+"),s=i("jFln"),a=i("Y7w9"),l=i("Zp/P"),c=function(){function e(){this._data=null}return e.prototype.setData=function(e){this._data=e},e.prototype.hitTest=function(e){if(null===this._data||0===this._data.items.length)return null;for(var t=this._data,i=t.items,s=t.lineWidth,c=Object(l.selectionTolerance)(s),u=Object(a.lowerbound)(i,e,(function(e,t){return e.x<=t.x})),h=Math.max(0,u-1),d=Math.min(i.length-1,u+1),p=h;p=0;n--){var r=this._renderers[n].hitTest(e,t);null!==r&&(null===i||r.result()>i.result())&&(i=r)}return i},e.prototype.doesIntersectWithBox=function(e){return this._renderers.some((function(t){ +return!!t.doesIntersectWithBox&&t.doesIntersectWithBox(e)}))},e}()},a7Ha:function(e,t,i){"use strict";var n;i.r(t),i.d(t,"LineEnd",(function(){return n})),function(e){e[e.Normal=0]="Normal",e[e.Arrow=1]="Arrow",e[e.Circle=2]="Circle"}(n||(n={}))},a9Kt:function(e,t){e.exports=''},aDyP:function(e,t,i){"use strict";var n=i("Ss5c").LineDataSource,r=i("5rJj"),o=i("7KDR").Action,s=i("rCHB").LineToolPitchforkStyle,a=null,l=i("ytGH").LineToolWidthsProperty,c=window.t("Pitchfork");function u(e,t){var i=t||u.createProperties();n.call(this,e,i),this._properties.style.listeners().subscribe(this,u.prototype._recreatePaneView),this._recreatePaneView();for(var r=[this._properties.child("median").child("linewidth")],o=0;o<=u.LevelsCount;o++)r.push(this._properties.child("level"+o).child("linewidth"));this._widthsProperty=new l(r)}inherit(u,n),u.LevelsCount=8,u.prototype.levelsCount=function(){return u.LevelsCount},u.prototype.additionalActions=function(){for(var e=[],t=["Original","Modified Schiff","Inside","Schiff"],i=0;i<4;i++){var n=new o({checked:this.properties().style.value()===i,checkable:!0,label:window.t(t[i]),payload:{target:this,value:i},onExecute:function(e){var t=e.getPayload(),i=t.target,n=t.value;i.properties().style.setValue(n),i.updateAllViews(),i._model.updateSource(i)}});e.push(n)}return[e[0],e[3],e[1],e[2]]},u.prototype._recreatePaneView=function(){if(null!==a){var e=[];this._properties.style.value()===s.Original?e=[new a.PitchforkLinePaneView(this,this._model)]:this._properties.style.value()===s.Schiff?e=[new a.SchiffPitchforkLinePaneView(this,this._model)]:this._properties.style.value()===s.Schiff2?e=[new a.SchiffPitchfork2LinePaneView(this,this._model)]:this._properties.style.value()===s.Inside&&(e=[new a.InsidePitchforkLinePaneView(this,this._model)]),this._setPaneViews(e)}else i.e("lt-pane-views").then(function(e){null===a&&(a=i("cT+B")),this._recreatePaneView()}.bind(this).bind(null,i)).catch(i.oe)},u.prototype.pointsCount=function(){return 3},u.prototype.translatedType=function(){return c},u.prototype.name=function(){return"Pitchfork"},u.prototype.processErase=function(e,t){var i="level"+t,n=this.properties()[i].visible;e.setProperty(n,!1,"Erase level line")},u.createProperties=function(e){var t=new r("linetoolpitchfork",e,!1,{range:[0,8]});return u._configureProperties(t),t},u.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("HCdA").PitchForkDefinitionsViewModel}.bind(null,i)).catch(i.oe)},u._configureProperties=function(e){n._configureProperties(e)},t.LineToolPitchfork=u},aILO:function(e,t,i){"use strict" +;var n=i("Ss5c").LineDataSource,r=i("Ocx9").DefaultProperty,o=window.t("Head and Shoulders");function s(e,t){this._constructor="LineToolHeadAndShoulders";var r=t||s.createProperties();n.call(this,e,r),i.e("lt-pane-views").then(function(e){var t=i("Fx2Q").LineToolHeadAndShouldersPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}inherit(s,n),s.prototype.pointsCount=function(){return 7},s.prototype.translatedType=function(){return o},s.prototype.name=function(){return"Head and Shoulders"},s.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("EFc4").Points5PatternDefinitionsViewModel}.bind(null,i)).catch(i.oe)},s.createProperties=function(e){var t=new r("linetoolheadandshoulders",e);return s._configureProperties(t),t},s._configureProperties=function(e){n._configureProperties(e)},t.LineToolHeadAndShoulders=s},aIha:function(e,t,i){"use strict";i.r(t),i.d(t,"LineToolFlagMark",(function(){return c}));var n=i("mrSG"),r=i("aO4+"),o=i("YFKU"),s=i("Ss5c"),a=i("Ocx9"),l=Object(o.t)("Flag Mark"),c=function(e){function t(n,o){var s=this,a=o||t.createProperties();return s=e.call(this,n,a)||this,i.e("lt-pane-views").then(function(e){var t=new(0,i("y/56").FlagMarkPaneView)(s,s.model());t.setAnchors(new r.Point(0,0)),s._setPaneViews([t])}.bind(null,i)).catch(void 0),s}return Object(n.__extends)(t,e),t.prototype.pointsCount=function(){return 1},t.prototype.translatedType=function(){return l},t.prototype.name=function(){return"Flag Mark"},t.prototype.properties=function(){return e.prototype.properties.call(this)},t.createProperties=function(e){e&&void 0===e.flagColor&&(e.flagColor="#318757");var i=new a.DefaultProperty("linetoolflagmark",e);return t._configureProperties(i),i},t.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(i.bind(null,"w/mY")).then((function(e){return e.FlagMarkDefinitionsViewModel}))},t.version=2,t}(s.LineDataSource)},aIyQ:function(e,t,i){"use strict";(function(e){var t=i("txPx").getLogger("Common.Delegate");function n(){this._listeners=[]}function r(e){return!e.singleshot}n.prototype.subscribe=function(e,t,i){var n={object:e,member:t,singleshot:!!i};this._listeners.push(n)},n.prototype.unsubscribe=function(e,t){for(var i=0;i=0;--t){this._listeners[t].object===e&&this._listeners.splice(t,1)}},n.prototype.destroy=function(){delete this._listeners},n.prototype.fire=function(){var e=this._listeners;this._listeners=this._listeners.filter(r);for(var i=e.length,n=0;n0)},t.box=function(e,t){return{min:r(Math.min(e.x,t.x),Math.min(e.y,t.y)),max:r(Math.max(e.x,t.x),Math.max(e.y,t.y))}},t.equalBoxes=function(e,t){return o(e.min,t.min)&&o(e.max,t.max)}},akof:function(e,t,i){"use strict";i.r(t),i.d(t,"PaneRendererCircleShape",(function(){return a}));var n=i("mrSG"),r=i("2WC2"),o=i("aO4+"),s=2*Math.PI,a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype._drawItemShapeUsingCSSPixels=function(e,t){var i=Math.max(t.width,t.height)/2,n=t.x,r=t.vertOffset,o=t.y+r;e.moveTo(n+i,o),e.arc(n,o,i,0,s,!1)},t.prototype._calcBoundingBox=function(t){ +var i=Math.max(t.width,t.height)/2,n=t.x,r=t.vertOffset,s=t.y+r,a=n-i,l=n+i,c=s-i,u=s+i,h=new o.Point(a,c),d=new o.Point(l,u),p=Object(o.box)(h,d),_=e.prototype._calcBoundingBox.call(this,t);return _&&(p=this._unionBox(p,_)),p},t}(r.a)},b1GK:function(e,t,i){"use strict";function n(){}i.r(t),i.d(t,"addPerfMark",(function(){return s}));var r=console.timeStamp?console.timeStamp.bind(console):n,o=window.performance&&performance.mark?performance.mark.bind(performance):n;function s(e){r(e),o(e)}},bGI9:function(e,t,i){"use strict";i.r(t),i.d(t,"StudyTrackPricePaneView",(function(){return s}));var n=i("mrSG"),r=i("2ijp"),o=i("8Uy/"),s=function(e){function t(t,i){var n=e.call(this)||this;return n._lineRendererData.linestyle=o.LINESTYLE_DOTTED,n._study=t,n._plotName=i,n}return Object(n.__extends)(t,e),t.prototype._updateImpl=function(){this._lineRendererData.visible=!1;var e=this._study.properties().styles[this._plotName];if(e.trackPrice.value()){var t=this._study.lastValueData(this._plotName,!0);t.noData||(this._lineRendererData.visible=!0,this._lineRendererData.y=t.coordinate,this._lineRendererData.color=t.color,this._lineRendererData.linewidth=e.linewidth.value())}},t}(r.a)},bJYc:function(e,t,i){"use strict";i.r(t),i.d(t,"SetPropertyUndoCommand",(function(){return s}));var n=i("mrSG"),r=i("RDU5"),o=i("Ocx9"),s=function(e){function t(t,i,n,r,o){var s=e.call(this,n)||this;return s._targetObj=t,s._newValue=i,s._oldValue=s._targetObj.value(),s._model=r,o&&s.setCustomFlag("doesnt_affect_save",!0),s}return Object(n.__extends)(t,e),t.prototype.redo=function(){Object(o.saveDefaultProperties)(!0),this._targetObj.setValue(this._newValue),Object(o.saveDefaultProperties)(!1),this._model.recalculateAllPanes(),this._model.lightUpdate()},t.prototype.undo=function(){Object(o.saveDefaultProperties)(!0),this._targetObj.setValue(this._oldValue),Object(o.saveDefaultProperties)(!1),this._model.recalculateAllPanes(),this._model.lightUpdate()},t}(r.UndoCommand)},bKFv:function(e,t,i){"use strict";var n;i.r(t),i.d(t,"StatsPosition",(function(){return n})),function(e){e[e.Left=0]="Left",e[e.Center=1]="Center",e[e.Right=2]="Right"}(n||(n={}))},bOGh:function(e,t,i){"use strict";i.d(t,"a",(function(){return r}));var n=i("mrSG"),r=function(e){function t(t){var i=e.call(this,t,!1)||this;return i._subcommands=[],i}return Object(n.__extends)(t,e),t.prototype.addCommand=function(e){this._subcommands.push(e)},t.prototype.isEmpty=function(){return 0===this._subcommands.length},t.prototype.redo=function(){for(var e=0;e=0;e--)this._subcommands[e].undo()},t.prototype.commands=function(){return this._subcommands},t}(i("RDU5").UndoCommand)},bSeV:function(e,t){},bTqm:function(e,t,i){"use strict";var n=i("Ss5c").LineDataSource,r=i("Ocx9").DefaultProperty,o=i("NJRZ").LineTool5PointsPattern,s=window.t("Cypher Pattern");function a(e,t){this._constructor="LineToolCypherPattern";var r=t||a.createProperties();n.call(this,e,r), +i.e("lt-pane-views").then(function(e){var t=i("mjK7").CypherPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}inherit(a,o),a.prototype.translatedType=function(){return s},a.prototype.name=function(){return"Cypher Pattern"},a.createProperties=function(e){var t=new r("linetoolcypherpattern",e);return a._configureProperties(t),t},a._configureProperties=function(e){o._configureProperties(e)},t.LineToolCypherPattern=a},bc0y:function(e,t,i){},biIa:function(e,t,i){"use strict";i.r(t),i.d(t,"SeriesWaterlinePaneView",(function(){return l}));var n=i("mrSG"),r=i("k4w6"),o=i("//lt"),s=i("VdBB"),a=i("8Uy/"),l=function(e){function t(t){var i=e.call(this,t)||this,n={cursorType:o.PaneCursorType.VerticalResize,itemIndex:0};return i._lineRenderer.setHitTest(new s.HitTestResult(s.HitTestResult.CUSTOM_MOVE,n)),i._lineRendererData.visible=!0,i._lineRendererData.linestyle=a.LINESTYLE_SPARSE_DOTTED,i}return Object(n.__extends)(t,e),t.prototype._updateImpl=function(){var e=this._series.properties().baselineStyle,t=Math.abs(100-e.baseLevelPercentage.value());this._lineRendererData.y=Math.round(this._series.priceScale().height()*(t/100)),this._lineRendererData.color=e.baselineColor.value()},t}(r.a)},brCa:function(e,t,i){"use strict";i.r(t),i.d(t,"createNoticeDialog",(function(){return o})),i.d(t,"showNoticeDialog",(function(){return s}));var n=i("mrSG"),r=(i("YFKU"),{width:400,destroyOnClose:!0,title:window.t("Notification"),content:window.t("You are notified"),contentWrapTemplate:'

    ',actionsWrapTemplate:'
    ',actions:[{name:"ok",type:"primary",text:window.t("Ok"),method:"close",key:[13,32]}]});function o(e){return new Promise((function(t){Promise.all([i.e("dialogs-core"),i.e(55),i.e(0),i.e(15),i.e("create-dialog")]).then(function(o){var s=i("YDhE").createDialog;t(s(Object(n.__assign)(Object(n.__assign)({},r),e)))}.bind(null,i)).catch(void 0)}))}function s(e){o(e).then((function(e){return e.open()}))}},"bv/X":function(e,t,i){"use strict";var n=i("Ss5c").LineDataSource,r=i("Ocx9").DefaultProperty,o=window.t("Sine Line");function s(e,t){var r=t||s.createProperties();n.call(this,e,r),i.e("lt-pane-views").then(function(e){var t=i("piZW").SineLinePaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}inherit(s,n),s.prototype.pointsCount=function(){return 2},s.prototype.translatedType=function(){return o},s.prototype.name=function(){return"Sine Line"},s.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("LX4V").CyclicAndSineLinesPatternDefinitionsViewModel}.bind(null,i)).catch(i.oe)},s.createProperties=function(e){var t=new r("linetoolsineline",e);return s._configureProperties(t),t},s._configureProperties=function(e){n._configureProperties(e)},t.LineToolSineLine=s}, +c2JX:function(e,t,i){"use strict";i.r(t),i.d(t,"renderSpinnerTemplate",(function(){return o})),i.d(t,"Spinner",(function(){return a}));i("SzKR");var n=i("gWrr"),r=i("Owlf");function o(e){return void 0===e&&(e=""),'\n\t\t
    \n\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t
    \x3c!--\n\t\t\t\t--\x3e
    \n\t\t\t
    \n\t\t
    \n\t'}var s=Object(n.b)(o()),a=function(){function e(e){this._shown=!1,this._el=s.cloneNode(!0),this.setSize(e||r.a)}return e.prototype.spin=function(e){return this._el.classList.add("tv-spinner--shown"),void 0===this._container&&(this._container=e,void 0!==e&&e.appendChild(this._el)),this._shown=!0,this},e.prototype.stop=function(e){return e&&void 0!==this._container&&this._container.removeChild(this._el),this._el.classList.remove("tv-spinner--shown"),this._shown=!1,this},e.prototype.setStyle=function(e){var t=this;return Object.keys(e).forEach((function(i){var n=e[i];void 0!==n&&t._el.style.setProperty(i,n)})),this},e.prototype.setSize=function(e){var t=void 0!==e?"tv-spinner--size_"+e:"";return this._el.className="tv-spinner "+t+" "+(this._shown?"tv-spinner--shown":""),this},e.prototype.getEl=function(){return this._el},e.prototype.destroy=function(){this.stop(),delete this._el,delete this._container},e}()},c44N:function(e,t,i){"use strict";function n(e,t){return e.pixelRatio===t.pixelRatio}i.r(t),i.d(t,"areEqualPaneRenderParams",(function(){return n}))},cBZt:function(e,t,i){"use strict";function n(e,t){return e+"@"+t}function r(e){return e.replace(/(@[^-]+-[^-]+).*$/,"$1")}i.r(t),i.d(t,"studyIdString",(function(){return n})),i.d(t,"extractStudyId",(function(){return r}))},cKqi:function(e,t,i){"use strict";(function(e){ +var n=i("aO4+").Point,r=i("qJq3").Series,o=i("GVHu").Study,s=i("k9/m").PlotRowSearchMode,a=i("FBsw").OverlayPriceAxisView,l=i("KtbP").PanePriceAxisView,c=i("x0JF"),u=c.SeriesAreaPaneView,h=c.SeriesLinePaneView,d=c.SeriesHollowCandlesPaneView,p=c.SeriesCandlesPaneView,_=c.SeriesBarsPaneView,f=c.SeriesBaselinePaneView,m=i("biIa").SeriesWaterlinePaneView,v=i("2kV1").StudyStatusView,y=i("JjUe").OverlayDataWindowView,g=i("z8/4").OverlayLegendView,b=i("qXYw").OverlayLegendValuesProvider,S=i("ZsYR").OverlayStatusProvider,w=i("38az").SeriesBarColorer,P=i("l4sv").HorizontalLineRenderer,C=i("Kxc7"),x=i("6sst").OverlayStudyPriceLineAxisView,T=i("Qb4w").PriceRange,I=i("XPit").barFunction,M=i("XPit").seriesPlotFunctionMap,L=i("k9/m").PlotList,O=i("n5al").createSeriesFormatter,k=i("n5al").seriesCurrency,A=i("n5al").extractSymbolNameFromSymbolInfo,E=i("wOSo").QuotesProvider,V=i("qFKp").CheckMobile.any()&&!1,D=!C.enabled("hide_study_overlay_legend_item"),B=C.enabled("uppercase_instrument_names"),R=i("txPx").getLogger("Chart.StudyOverlay"),N=C.enabled("study_overlay_compare_legend_option");function F(e,t){this._source=e,this._model=t,this._points=[new n(0,0)],this._lineRenderer=new P}function j(e,t){return null==e[t]}function W(t,i,n,r){this._waterlineView=null,i.hasChild("currencyId")||i.addChild("currencyId",new e(null)),o.call(this,t,i,n,r),this.m_data=new L(M(),j),this._formatter=null,this._paneView=null;var s=this;this.properties().minTick.listeners().subscribe(null,(function(){s._recreatePriceFormattingDependencies(),s.updateAllViews(),s._model.fullUpdate()})),this.properties().style.listeners().subscribe(this,this._updateBarFunction),this.properties().lineStyle.priceSource.listeners().subscribe(this,this._updateBarFunction),this.properties().areaStyle.priceSource.listeners().subscribe(this,this._updateBarFunction),this.properties().baselineStyle.priceSource.listeners().subscribe(this,this._updateBarFunction),this.properties().currencyId.subscribe(this,this._onCurrencyChanged),this._updateBarFunction(),this._quotesProvider=new E,V&&this._quotesProvider.quotesUpdate().subscribe(this,this._onQuotesUpdate)}F.prototype.update=function(){if(this._visible=!1,this._source.properties().showPriceLine.value()){var e=this._source.lastValueData(void 0,!0);e.noData||(this._visible=!0,this._points=[new n(0,e.coordinate)],this._color=e.color)}},F.prototype.renderer=function(){var e={};return e.width=this._model.timeScale().width(),e.height=this._source.priceScale().height(),e.y=this._points[0].y,e.color=this._color,e.linewidth=1,e.linestyle=CanvasEx.LINESTYLE_DOTTED,e.visible=this._visible,this._lineRenderer.setData(e),this._lineRenderer},inherit(W,o),W.prototype._showLastValueOnPriceScale=function(){return this._model.properties().scalesProperties.showSeriesLastValue.value()},W.prototype.symbol=function(){var e,t=this.properties().inputs.symbol.value(),i=this.symbolInfo();return e=i?i.name:t,B?e.toUpperCase():e},W.prototype.currency=function(){return this._properties.currencyId.value()||null},W.prototype.setCurrency=function(e){ +this._properties.currencyId.setValue(e)},W.prototype.symbolSource=function(){return this},W.prototype.lastValueData=function(e,t,i){var n={noData:!0};if(this._model.timeScale().isEmpty()||null==this.priceScale()||this.priceScale().isEmpty()||this.data().isEmpty())return n;var o=this._model.timeScale().visibleBarsStrictRange();if(null===o)return n;if(!this.properties().visible.value())return n;var a=this.nearestIndex(o.lastBar(),s.NearestLeft,TradingView.OPEN_PLOT);if(null==a)return n;var l=this._lastNonEmptyPlotRow(TradingView.CLOSE_PLOT),c=null!==l&&o.contains(l.index),u=null!==l?l.value:null,h=t||c?u:this.data().valueAt(a);if(null===h)return n;var d=this._barFunction(h);if(!isNumber(d))return n;var p={noData:!1};i&&(p.price=d);var _=this.firstValue();if(!isNumber(_))return n;p.text=this.priceScale().formatPrice(d,_),p.text=this.priceScale().formatPrice(d,_),p.formattedPriceAbsolute=this.priceScale().formatPriceAbsolute(d),p.formattedPricePercentage=this.priceScale().formatPricePercentage(d,_),p.floatCoordinate=this.priceScale().priceToCoordinate(d,_),p.coordinate=p.floatCoordinate,p.item=h;var f=this.properties();switch(f.style.value()){case r.STYLE_BARS:p.color=h[TradingView.OPEN_PLOT]<=h[TradingView.CLOSE_PLOT]?f.barStyle.upColor.value():f.barStyle.downColor.value();break;case r.STYLE_CANDLES:case r.STYLE_HOLLOW_CANDLES:p.color=h[TradingView.OPEN_PLOT]<=h[TradingView.CLOSE_PLOT]?f.candleStyle.upColor.value():f.candleStyle.downColor.value();break;case r.STYLE_LINE:p.color=f.lineStyle.color.value();break;case r.STYLE_AREA:p.color=f.areaStyle.color1.value();break;case r.STYLE_BASELINE:var m=f.baselineStyle,v=this.priceScale(),y=Math.round(v.height()*(Math.abs(100-m.baseLevelPercentage.value())/100));p.color=p.coordinate0),o?{left:0,right:1,totallySlots:i}:{left:1,right:0,totallySlots:i}}return{left:e,right:t,totallySlots:e+t}},re.prototype.startScalePrice=function(e,t,i){e.startScalePrice(t,i)},re.prototype.scalePriceTo=function(e,t,i){e.scalePriceTo(t,i),this.mainSeries().priceScale().isLockScale()?this.lightUpdate():this.invalidate(this._paneInvalidationMask(e,x.Light)),this._setScalesResetAvailable(!0)},re.prototype.endScalePrice=function(e,t){e.endScalePrice(t), +this.invalidate(this._paneInvalidationMask(e,x.Light))},re.prototype.startScrollPrice=function(e,t,i){e.startScrollPrice(t,i)},re.prototype.scrollPriceTo=function(e,t,i){e.scrollPriceTo(t,i),this.invalidate(this._paneInvalidationMask(e,x.Light))},re.prototype.endScrollPrice=function(e,t){e.endScrollPrice(t),this.invalidate(this._paneInvalidationMask(e,x.Light))},re.prototype.setPriceAutoScale=function(e,t,i){e.setPriceAutoScale(t,i),this.invalidate(this._paneInvalidationMask(e,x.Light))},re.prototype.restorePriceScaleState=function(e,t,i){e.restorePriceScaleState(t,i),this.invalidate(this._paneInvalidationMask(e,x.Light))},re.prototype.resetPriceScale=function(e,t){this._setScalesResetAvailable(!1),e.resetPriceScale(t),this.invalidate(this._paneInvalidationMask(e,x.Light))},re.prototype.updateScales=function(e,t){this._undoModel._chartWidget._updateScalesActions()},re.prototype.startScaleTime=function(e){this._timeScale.startScale(e)},re.prototype.mainSeriesScaleRatioProperty=function(){return this._mainSeriesScaleRatioProperty},re.prototype.mainSeriesScaleRatioPropertyOnChanged=function(){this._mainSeriesScaleRatioProperty.listeners().fire(this._mainSeriesScaleRatioProperty)},re.prototype.mainSeriesScaleRatio=function(){return z(this._timeScale,this.m_mainSeries.priceScale())},re.prototype.setMainSeriesScaleRatio=function(e){this.paneForSource(this.m_mainSeries).applyPriceScaleRatio(this.m_mainSeries.priceScale(),e)},re.prototype.scaleTimeTo=function(e){this._timeScale.scaleTo(e),this.recalculateAllPanes(),this.lightUpdate(),this._setScalesResetAvailable(!0)},re.prototype.endScaleTime=function(){this._timeScale.endScale(),this.lightUpdate(),this.mainSeries().requestMoreData(),this.recalcVisibleRangeStudies()},re.prototype.startScrollTime=function(e){this._timeScale.startScroll(e),this._isTimeScrolling=!0},re.prototype.scrollTimeTo=function(e){this._timeScale.scrollTo(e),this.recalculateAllPanes(),this.updateCrossHair(),this.lightUpdate(),this._setScalesResetAvailable(!0)},re.prototype.endScrollTime=function(){this._timeScale.endScroll(),this.lightUpdate(),this.mainSeries().requestMoreData(),this.recalcVisibleRangeStudies(),this._isTimeScrolling=!1},re.prototype.recalcStudyBasedLineTools=function(){this.dataSources().forEach((function(e){m(e)&&e.recalcStudyIfNeeded&&e.recalcStudyIfNeeded()}))},re.prototype.onResetScales=function(){return this._resetScales},re.prototype.resetTimeScale=function(){this._timeScale.restoreDefault(),this.recalculateAllPanes(),this.mainSeries().requestMoreData(),this.recalcVisibleRangeStudies(),this.updateCrossHair(),this.lightUpdate(),this._resetScales.fire(),this._setScalesResetAvailable(!1)},re.prototype.restoreTimeScaleState=function(e){this._timeScale.restoreState(e),this.recalculateAllPanes(),this.updateCrossHair(),this.lightUpdate(),this._setScalesResetAvailable(!0)},re.prototype.restoreFactoryDefaults=function(e){e.restoreFactoryDefaults(),this.recalcVisibleRangeStudies(!0)},re.prototype.selectionMacro=function(e){var t=this.selection().sources();e({ +removeSourceFromSelection:se.bind(this),addSourceToSelection:ae.bind(this),clearSelection:oe.bind(this),selection:this.selection.bind(this)});var i=G(t,this.selection().sources()),n=G(this.selection().sources(),t);n.concat(t).forEach((function(e){e.updateAllViews()})),i.forEach((function(e){var t=e.hasAlert&&e.hasAlert.value()&&e.getAlertSync();t&&t.set("selected",!1)})),n.forEach((function(e){var t=e.hasAlert&&e.hasAlert.value()&&e.getAlertSync();t&&t.set("selected",!0)})),this.lightUpdate(),this.setHoveredSource(null),(i.length>0||n.length>0)&&this._selectedSourceChanged.fire()},re.prototype.checkLineToolSelection=function(){this._selection.checkLineToolSelection()},re.prototype.onSelectedSourceChanged=function(){return this._selectedSourceChanged},re.prototype.selection=function(){return this._selection},re.prototype.invalidate=function(e){this._invalidateHandler&&this._invalidateHandler(e)},re.prototype.dataSources=function(){var e=[];e.push(this.m_crossHairSource);for(var t=0;t0)for(s=this.dataSources(),a=0;a0){var c=r-n,u=l?null:i.rightOffset()-c;if(!this._options.shiftVisibleRangeOnNewBar&&l){var h=i.width()/(a.length()+c);h>=i.minBarSpacing()?(i.setBarSpacing(h),u=i.rightOffset()+c):s.lastBar()!==n&&(u=i.rightOffset()-c)}null!==u&&i.setRightOffset(u)}}i.setBaseIndex(r)}},re.prototype.recalculatePane=function(e){e&&e.recalculate()},re.prototype.paneForSource=function(e){for(var t=this._panes.length-1;t>=0;t--)if(-1!==this._panes[t].dataSources().indexOf(e))return this._panes[t];return e instanceof w?this.paneForSource(this.m_mainSeries):null},re.prototype.recalculateAllPanes=function(){for(var e=0;e1},re.prototype.createLineTool=function(e,t,i,n,r,o){if(!_(i))return null;if("LineToolExecution"!==i&&Z("drawings","Study_Drawing_"+i),n){ +var a=n.state();n=p(i,a)}var l=d(i,this,n,null),c=!l.linkKey&&!r;B.drawOnAllCharts().value()?l.linkKey=r||j.randomHash():l.linkKey=r,o=o||e.mainDataSource(),n||l.properties().currencyId.setValue(o.symbolSource().currency()),l.setOwnerSource(o);var u,h=e.defaultPriceScale();if(e.addDataSource(l,h),l.isFixed()){var f=e.mainDataSource().firstValue(),m=this._timeScale.indexToCoordinate(t.index),v=h.priceToCoordinate(t.price,f);u=l.addFixedPoint(new s(m,v))}else u=l.addPoint(t);return u||(this._lineBeingCreated=l,this._paneBeingCreatedLineOn=e),c&&l.enableCurrentIntervalVisibility(),this.fullUpdate(),l},re.prototype.lineBeingCreated=function(){return this._lineBeingCreated},re.prototype.paneBeingCreatedLineOn=function(){return this._paneBeingCreatedLineOn},re.prototype.continueCreatingLine=function(e,t,i,n){var r=this._lineBeingCreated.addPoint(e,t,i);this._lineBeingCreated.updateAllViews();var o=new C(x.Light);return r&&(this._paneBeingCreatedLineOn=null,this._lineBeingCreated=null),this.invalidate(o),r},re.prototype.cancelCreatingLine=function(){if(this._lineBeingCreated){var e=this._lineBeingCreated;this.removeSource(this._lineBeingCreated),this._lineBeingCreated=null,this._lineCancelled.fire(),B.drawOnAllCharts().value()&&e.isSynchronizable()&&B.cancelLineTool({model:this})}},re.prototype.startChangingLinetool=function(e,t,i,n,r){if(this._lineBeingEdited=e,B.isToolEditingNow.setValue(!0),!r){this._linePointBeingEdited=i,void 0!==t&&void 0!==i&&(this._lineBeingEdited.startChanging(i,t),this._lineBeingEdited.setPoint(i,t,n)),this._lineBeingEdited.updateAllViews();var o=this.paneForSource(e),s=this._paneInvalidationMask(o,x.Light);s.force=!0,this.invalidate(s),e.linkKey&&e.isSynchronizable()&&B.startChangingLineTool({linkKey:e.linkKey,model:this,symbol:this.mainSeries().symbol()})}},re.prototype.lineBeingEdited=function(){return this._lineBeingEdited},re.prototype.linePointBeingEdited=function(){return this._linePointBeingEdited},re.prototype.changeLinePoint=function(e,t){var i=this.paneForSource(this._lineBeingEdited),n=e.price,r=e.index;if(void 0!==e.x&&void 0!==e.y){var o=this._lineBeingEdited.priceScale(),s=i.mainDataSource().firstValue();n=o.coordinateToPrice(e.y,s),r=Math.round(this.timeScale().coordinateToIndex(e.x)),n=this._magnet.align(n,r,i),this._lineBeingEdited.setPoint(this._linePointBeingEdited,{price:n,index:r},t)}else this._lineBeingEdited.setPoint(this._linePointBeingEdited,e,t);this._lineBeingEdited.updateAllViews(),this.lightUpdate(),this._lineBeingEdited.linkKey&&this._lineBeingEdited.isSynchronizable()&&B.changeLineTool({linkKey:this._lineBeingEdited.linkKey,model:this,symbol:this.mainSeries().symbol(),points:this._lineBeingEdited.normalizedPoints()})},re.prototype.endChangingLinetool=function(e,t){var i=this._lineBeingEdited;if(this._lineBeingEdited=null,B.isToolEditingNow.setValue(!1),t)i.updateAllViewsAndRedraw();else{this._linePointBeingEdited=null,i.endChanging(!1,e),this.lightUpdate();var n={points:i._timePoint,interval:this.mainSeries().interval()} +;i.linkKey&&i.isSynchronizable()&&B.finishChangingLineTool({model:this,linkKey:i.linkKey,symbol:this.mainSeries().symbol(),finalState:n})}},re.prototype.finishLineTool=function(e){B.drawOnAllCharts().value()&&e.linkKey&&e.isSynchronizable()&&B.finishLineTool({linkKey:e.linkKey,model:this})},re.prototype.calculateDefaultTags=function(){for(var e=[],t=this.dataSources(),i=0;i-1&&this._modelIntervals.splice(t,1)},re.prototype.clearIntervals=function(){ +for(var e=0;eu&&(h-=Math.abs(u-(d+l)),d=Math.floor(h-c)+.5);var p=d+l,_=0+t.borderSize+t.paddingTop+t.fontSize+t.paddingBottom;e.fillStyle=n.background;var f=Math.round(d*i),m=Math.round(0*i),v=Math.round(p*i),y=Math.round(_*i);e.fillRect(f,m,v-f,y-m);var g=Math.round(n.coordinate*i),b=m,S=Math.round((b+t.borderSize+t.tickLength)*i);e.fillStyle=n.color;var w=Math.max(1,Math.floor(i)),P=Math.floor(.5*i);e.fillRect(g-P,b,w,S-b);var C=_-t.baselineOffset-t.paddingBottom;e.textAlign="left",e.fillStyle=n.color,Object(r.drawScaled)(e,i,(function(){return e.fillText(n.text,d+a,C)})),e.restore()}}},e}();i.d(t,"a",(function(){return a}));var a=function(){function e(e){this._renderer=new s,this._rendererData={background:"",color:"",coordinate:0,text:"",visible:!1,width:0},this._invalidated=!0,this._model=e,this._renderer.setData(this._rendererData)}return e.prototype.update=function(){this._invalidated=!0},e.prototype.renderer=function(){return this._invalidated&&(this._updateImpl(),this._invalidated=!1),this._renderer},e.prototype.coordinate=function(){return this._rendererData.coordinate},e.prototype._updateImpl=function(){var e=this._rendererData;if(e.visible=!1,!this._model.timeScale().isEmpty()){var t=this._getIndex();if(null!==t){e.visible=!0,e.width=this._model.timeScale().width(),e.background=this._getBgColor(),e.color=Object(n.colorFromBackground)(e.background),e.coordinate=this._model.timeScale().indexToCoordinate(t);var i=this._model.timeScale().indexToUserTime(t);e.text=null!==i?this._model.dateTimeFormatter().format(i):"",this._invalidated=!1}}},e}()},d1Pk:function(e,t,i){"use strict";i.r(t),i.d(t,"fibLevelCoordinate",(function(){return r})),i.d(t,"fibLevelPrice",(function(){return o}));var n=i("Eyy1");function r(e,t,i,r,o,s){if(s)return Math.round(Object(n.ensureDefined)(e.coordinate)+Object(n.ensureDefined)(t.coordinate)*i);var a=e.price+t.price*i;return r.priceToCoordinate(a,o)}function o(e,t,i,r,o,s){if(!s)return e.price+t.price*i;var a=Object(n.ensureDefined)(e.coordinate)+Object(n.ensureDefined)(t.coordinate)*i;return r.coordinateToPrice(a,o)}},d700:function(e,t,i){"use strict" +;i.d(t,"b",(function(){return r})),i.d(t,"a",(function(){return o}));var n=i("/3z9");function r(e){if("INPUT"===e.tagName){var t=e.type;return"text"===t||"email"===t||"number"===t||"password"===t||"search"===t||"tel"===t||"url"===t}return"TEXTAREA"===e.tagName||e.isContentEditable}function o(e,t){if(!t)return!1;var i=255&e;if(27===i||i>>>4==7)return!1;switch(e^i){case n.Modifiers.Alt:return(38===i||40===i)&&"SELECT"===t.tagName||r(t);case n.Modifiers.Alt+n.Modifiers.Shift:return r(t);case n.Modifiers.Mod:if(67===i||!n.isMacKeyboard&&45===i){var o=t.ownerDocument&&t.ownerDocument.getSelection();if(o&&!o.isCollapsed)return!0}return r(t);case n.Modifiers.Mod+n.Modifiers.Shift:return i>=33&&i<=40&&r(t);case n.Modifiers.Shift:case 0:return!!(9!==i||t.ownerDocument&&t!==t.ownerDocument.body&&t!==t.ownerDocument.documentElement)&&((13===i||32===i||!function(e){if("BUTTON"===e.tagName)return!0;if("INPUT"===e.tagName){var t=e.type;if("submit"===t||"button"===t||"reset"===t||"checkbox"===t||"radio"===t)return!0}return!1}(t))&&("form"in t||t.isContentEditable))}return!1}},dBsn:function(e,t,i){"use strict";i.r(t),i.d(t,"PaneRendererCross",(function(){return l}));var n=i("aO4+"),r=i("GEp6"),o=i("ogJP"),s=i("Zp/P"),a=i("VdBB"),l=function(){function e(e){this._data=e}return e.prototype.draw=function(e,t){for(var i,n,r,s,a=t.pixelRatio,l="",c=!1,u=0,h=this._data.items;u0?"Forward":"Backward")),this._model=e,this._sourcesIds=t.map((function(e){return e.id()})),this._shift=i}function E(e,t,i,n,r,o){_.call(this,"Zoom"),this._model=e,this._startBar=t,this._endBar=i,this._startPrice=n,this._endPrice=r,this._pane=o}function V(e,t,i){_.call(this,"Zoom"),this._baseCmd=e,this._zoomStack=t,this._inOut=i}function D(e,t,i){_.call(this,"Apply Chart Theme"),this._model=e,this._newChartProps=TradingView.factoryDefaults("chartproperties"),this._newSeriesProps=TradingView.factoryDefaults("chartproperties.mainSeriesProperties"),this._newSessionProps=t.sessions||TradingView.factoryDefaults("sessions"),["candleStyle","hollowCandleStyle","haStyle"].forEach((function(e){t.mainSourceProperties[e].wickUpColor=t.mainSourceProperties[e].wickUpColor||t.mainSourceProperties[e].wickColor,t.mainSourceProperties[e].wickDownColor=t.mainSourceProperties[e].wickDownColor||t.mainSourceProperties[e].wickColor})),t.chartProperties.paneProperties.vertGridProperties=t.chartProperties.paneProperties.vertGridProperties||t.chartProperties.paneProperties.gridProperties, +t.chartProperties.paneProperties.horzGridProperties=t.chartProperties.paneProperties.horzGridProperties||t.chartProperties.paneProperties.gridProperties,t.chartProperties.paneProperties.legendProperties=this._model.properties().state().paneProperties.legendProperties,this._newChartProps=o({},this._newChartProps,t.chartProperties),delete this._newChartProps.scalesProperties.showLeftScale,delete this._newChartProps.scalesProperties.showRightScale,delete this._newChartProps.scalesProperties.scaleSeriesOnly,delete this._newChartProps.scalesProperties.showSeriesLastValue,delete this._newChartProps.scalesProperties.showStudyLastValue,delete this._newChartProps.scalesProperties.showSymbolLabels,delete this._newChartProps.scalesProperties.showBidAskLabels,delete this._newChartProps.scalesProperties.showPrePostMarketPriceLabel,delete this._newChartProps.scalesProperties.showStudyPlotLabels,delete this._newChartProps.scalesProperties.showFundamentalNameLabel,delete this._newChartProps.scalesProperties.showFundamentalLastValue,e.timeScale().preserveBarSpacing()&&delete this._newChartProps.scalesProperties.barSpacing,this._newSeriesProps=o({},this._newSeriesProps,t.mainSourceProperties),this._oldChartProps=e.properties().state(),delete this._oldChartProps.paneProperties.topMargin,delete this._oldChartProps.paneProperties.bottomMargin,this._oldSeriesProps=e.mainSeries().properties().state(),this._oldSessionsProps=this._model.sessions().properties().state(),i||(delete this._oldSeriesProps.style,delete this._oldSeriesProps.symbol,delete this._oldSeriesProps.interval,delete this._oldSeriesProps.extendedHours,delete this._newSeriesProps.style,delete this._newSeriesProps.symbol,delete this._newSeriesProps.interval,delete this._newSeriesProps.extendedHours,delete this._newSeriesProps.bidAsk.visible,delete this._newSeriesProps.prePostMarket.visible)}function B(e,t){_.call(this,"Stop Sincing Drawing"),this._model=e,this._sourceId=t.id(),this._linkKey=t.linkKey}inherit(I,l),I.prototype.version=function(){return this.m_model._version},I.prototype.onData=function(e){switch(e.method){case"timescale_update":var t=e.params;this.m_model.updateTimeScale(t.index,t.zoffset,t.changes,t.index_diff,t.marks,t.clear)}},I.prototype.paneForSource=function(e){return this.m_model.paneForSource(e)},I.prototype.createPane=function(e){return this.m_model.createPane(e)},I.prototype.readOnly=function(){return this.m_model.readOnly()},I.prototype.restart=function(){this.m_model.restart()},I.prototype.disconnect=function(){this.m_model.disconnect()},I.prototype.studiesMetaData=function(){return this.m_model.studiesMetaData()},I.prototype.studyVersioning=function(){return this.m_model.studyVersioning()},I.prototype.chartModel=function(){return this._model()},I.prototype._model=function(){return this.m_model},I.prototype.pushUndoCommand=function(e){this._pushUndoCommand(e)},I.prototype._pushUndoCommand=function(e){this._undoHistory.pushUndoCommand(e)},I.prototype.startScalePrice=function(e,t,i){this.pushUndoCommand(new O(this.m_model,e,t,t.state())), +this.chartModel().startScalePrice(e,t,i)},I.prototype.scalePriceTo=function(e,t,i){this.chartModel().scalePriceTo(e,t,i)},I.prototype.endScalePrice=function(e,t){this.chartModel().endScalePrice(e,t)},I.prototype.startScrollPrice=function(e,t,i){t.isAutoScale()||(this._initialPriceScrollState=t.state(),this._initialPriceScrollPos=i,this.chartModel().startScrollPrice(e,t,i))},I.prototype.scrollPriceTo=function(e,t,i){t.isAutoScale()||(this._initialPriceScrollPos&&Math.abs(this._initialPriceScrollPos-i)>20&&(this.pushUndoCommand(new O(this.m_model,e,t,this._initialPriceScrollState)),delete this._initialPriceScrollState,delete this._initialPriceScrollPos),this.chartModel().scrollPriceTo(e,t,i))},I.prototype.endScrollPrice=function(e,t){t.isAutoScale()||(delete this._initialPriceScrollState,delete this._initialPriceScrollPos,this.chartModel().endScrollPrice(e,t))},I.prototype.setPriceAutoScale=function(e,t,i){this.pushUndoCommand(new O(this.m_model,e,t,t.state())),this.chartModel().setPriceAutoScale(e,t,i)},I.prototype.resetPriceScale=function(e,t){this.pushUndoCommand(new O(this.m_model,e,t,t.state())),this.chartModel().resetPriceScale(e,t)},I.prototype.setWidth=function(e){this.m_model.setWidth(e)},I.prototype.setPaneHeight=function(e,t){this.m_model.setPaneHeight(e,t)},I.prototype.gridSource=function(){return this.m_model.gridSource()},I.prototype.watermarkSource=function(){return this.m_model.watermarkSource()},I.prototype.addAlertsSource=function(e){return this.m_model.addAlertsSource(e)},I.prototype.alertsSources=function(){return this.m_model.alertsSources()},I.prototype.publishedChartsTimelineSource=function(){return this.m_model.publishedChartsTimelineSource()},I.prototype.barsMarksSources=function(){return this.m_model.barsMarksSources()},I.prototype.crossHairSource=function(){return this.m_model.crossHairSource()},I.prototype.model=function(){return this.m_model},I.prototype.chartWidget=function(){return this._chartWidget},I.prototype.mainSeries=function(){return this.m_model.m_mainSeries},I.prototype.mainSeriesScaleRatioProperty=function(){return this.m_model.mainSeriesScaleRatioProperty()},I.prototype.panes=function(){return this.m_model.panes()},I.prototype.timeScale=function(){return this.m_model.timeScale()},I.prototype.selectionMacro=function(e){return this.m_model.selectionMacro(e)},I.prototype.setHoveredSource=function(e,t){this.m_model.setHoveredSource(e,t)},I.prototype.selection=function(){return this.m_model.selection()},I.prototype.onSelectedSourceChanged=function(){return this.m_model.onSelectedSourceChanged()},I.prototype.hoveredSource=function(){return this.m_model.hoveredSource()},I.prototype.activeStrategySource=function(){return this.m_model.activeStrategySource()},I.prototype.invalidate=function(e){this.m_model.invalidate(e)},I.prototype.setCurrentPosition=function(e,t,i,n){this.m_model.setCurrentPosition(e,t,i,n)},I.prototype.setAndSaveCurrentPosition=function(e,t,i,n){this.m_model.setAndSaveCurrentPosition(e,t,i,n)},I.prototype.modifySeries=function(e,t,i){var n=new k(this.m_model,e,t,i) +;this.pushUndoCommand(n)},I.prototype.canCreateStudy=function(e){return this.model().chartApi().chartApi().isCanCreateStudy(e)},I.prototype.checkIfFeatureAvailable=function(e,t){var i=this.canCreateStudy(),n=t&&t instanceof u;return!this.readOnly()&&n&&(i=this.canCreateStudy(!0)),!!i||(n||d(),!1)},I.prototype._insertStudy=function(e,t,i,n,r,o,s,a,l){var c=new g(this.m_model,e,t,i,n,r,o,s,a,l||null,"Insert "+e.description);return this.pushUndoCommand(c),c.insertedStudy()},I.prototype.insertStudyWithoutCheck=function(e){return this._insertStudy(e)},I.prototype.createStudyInserter=function(e,t,i){var n=this,r=null,o={createStudy:function(e,t,i,o,s,a,l,c,u){return n.checkIfFeatureAvailable(e,a)?(w("studies","Study_"+e.id),"Compare@tv-basicstudies"===e.id&&w("compare","symbol:"+t.symbol),n._insertStudy(e,t,o,s,a,l,c,u,r)):(P.logNormal("Cannot insert study "+e.id),null)}};void 0!==i&&(o.createStub=function(){var e=n.m_model.insertStudyStub(i);return r={targetPaneId:n.m_model.paneForSource(e).id(),targetZOrder:e.zorder()},e.id()},o.removeStub=function(e){return n.m_model.removeStudyStub(e)});var s=new S(e,this.m_model._studiesMetaInfoRepository,o);return s.setParentSource(t),s},I.prototype.setProperty=function(e,t,i,n){if(e&&e.value()!==t){var r=new x(e,t,i,this.m_model,n);this.pushUndoCommand(r),this.emitEvent("setProperty")}},I.prototype.setProperties=function(e,t,i){var n=this;this.beginUndoMacro(i),this.m_model.selectionMacro((function(){for(var r=0;r0&&t.reverse(),t.forEach((function(t){e._model.changeZOrder(t,e._shift)}))},I.prototype.removePane=function(e){var t=this.m_model.panes()[e].dataSources().slice();this.removeSources(t,!1,"Remove pane")},inherit(E,_),E.prototype.redo=function(){this._timeScaleState=this._model.timeScale().state(),this._priceScaleState=this._pane.defaultPriceScale().state(),this._model.zoomToViewport(this._startBar,this._endBar,this._startPrice,this._endPrice,this._pane)},E.prototype.undo=function(){this._model.timeScale().restoreState(this._timeScaleState),this._pane.defaultPriceScale().restoreState(this._priceScaleState),this._model.recalculateAllPanes(),this._model.lightUpdate()},inherit(V,_),V.prototype.undo=function(){if(this._inOut){if(this._baseCmd!==this._zoomStack.head())return void P.logDebug("zoom stack inconsistency");this._baseCmd.undo(),this._zoomStack.pop()}else this._baseCmd.redo(),this._zoomStack.push(this._baseCmd) +},V.prototype.redo=function(){if(this._inOut)this._baseCmd.redo(),this._zoomStack.push(this._baseCmd);else{if(this._baseCmd!==this._zoomStack.head())return void P.logDebug("zoom stack inconsistency");this._baseCmd.undo(),this._zoomStack.pop()}},inherit(D,_),D.prototype._merge=function(e,t,i){var n=this._model;c(!0),e&&(n.properties().paneProperties.mergeAndFire(e.paneProperties),n.properties().scalesProperties.mergeAndFire(e.scalesProperties)),n.mainSeries().priceScale().setMode({autoScale:t.priceAxisProperties.autoScale,percentage:t.priceAxisProperties.percentage,log:t.priceAxisProperties.log,lockScale:t.priceAxisProperties.lockScale}),n.mainSeries().properties().mergeAndFire(t),n.mainSeries().properties().saveDefaults(),n.mainSeries().createPaneView(),n.mainSeries().invalidateBarStylesCache(),n._version=t.version,n.recalculateAllPanes(),n.fullUpdate(),n.properties().saveDefaults(),n.sessions().restoreState({properties:i}),c(!1)},D.prototype.undo=function(){this._merge(this._oldChartProps,this._oldSeriesProps,this._oldSessionsProps),this._model.mainSeries().onChartStyleChanged(),this._model.updateScales(),this._model.chartThemeLoaded()},D.prototype.redo=function(){this._merge(this._newChartProps,this._newSeriesProps,this._newSessionProps),this._model.mainSeries().onChartStyleChanged(),this._model.updateScales(),this._model.chartThemeLoaded()},inherit(B,_),B.prototype.redo=function(){delete this._model.dataSourceForId(this._sourceId).linkKey},B.prototype.undo=function(){this._model.dataSourceForId(this._sourceId).linkKey=this._linkKey},t.ChartUndoModel=I,t.PriceScaleChangeUndoCommand=O}).call(this,i("aIyQ"))},dTSQ:function(e,t,i){"use strict";function n(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}i.r(t),i.d(t,"regExpEscape",(function(){return n}))},dfhE:function(e,t,i){"use strict";var n,r,o;i.r(t),i.d(t,"STATUS_OFFLINE",(function(){return s})),i.d(t,"STATUS_RESOLVING",(function(){return a})),i.d(t,"STATUS_LOADING",(function(){return l})),i.d(t,"STATUS_READY",(function(){return c})),i.d(t,"STATUS_INVALID_SYMBOL",(function(){return u})),i.d(t,"STATUS_SNAPSHOT",(function(){return h})),i.d(t,"STATUS_EOD",(function(){return d})),i.d(t,"STATUS_PULSE",(function(){return p})),i.d(t,"STATUS_DELAYED",(function(){return _})),i.d(t,"STATUS_DELAYED_STREAMING",(function(){return f})),i.d(t,"STATUS_NO_BARS",(function(){return m})),i.d(t,"STATUS_REPLAY",(function(){return v})),i.d(t,"SERIES_STATUS_TEXT",(function(){return y})),i.d(t,"STYLE_LINE_TYPE_MARKERS",(function(){return g})),i.d(t,"STYLE_LINE_TYPE_STEP",(function(){return b})),i.d(t,"STYLE_LINE_TYPE_SIMPLE",(function(){return S})),i.d(t,"STYLE_BARS",(function(){return w})),i.d(t,"STYLE_CANDLES",(function(){return P})),i.d(t,"STYLE_LINE",(function(){return C})),i.d(t,"STYLE_AREA",(function(){return x})),i.d(t,"STYLE_RENKO",(function(){return T})),i.d(t,"STYLE_KAGI",(function(){return I})),i.d(t,"STYLE_PNF",(function(){return M})),i.d(t,"STYLE_PB",(function(){return L})),i.d(t,"STYLE_HEIKEN_ASHI",(function(){return O})),i.d(t,"STYLE_HOLLOW_CANDLES",(function(){return k +})),i.d(t,"STYLE_BASELINE",(function(){return A})),i.d(t,"STYLE_RANGE",(function(){return E})),i.d(t,"STYLE_HILO",(function(){return V})),i.d(t,"STYLE_SHORT_NAMES",(function(){return D})),i.d(t,"SYMBOL_STRING_DATA",(function(){return B}));var s=0,a=1,l=2,c=3,u=4,h=5,d=6,p=7,_=8,f=9,m=10,v=11,y=((n={})[s]="connecting",n[a]="loading",n[l]="loading",n[c]="realtime",n[u]="invalid",n[h]="snapshot",n[d]="endofday",n[p]="endofday",n[_]="delayed",n[f]="delayed_streaming",n[m]="forbidden",n[v]="replay",n),g=0,b=1,S=2,w=0,P=1,C=2,x=3,T=4,I=5,M=6,L=7,O=8,k=9,A=10,E=11,V=12,D=((r={})[0]="bar",r[1]="candle",r[9]="hollowCandle",r[2]="line",r[3]="area",r[4]="renko",r[7]="pb",r[5]="kagi",r[6]="pnf",r[8]="ha",r[10]="baseline",r[11]="range",r[12]="hilo",r),B=((o={})[4]={type:"BarSetRenko@tv-prostudies",basicStudyVersion:40},o[7]={type:"BarSetPriceBreak@tv-prostudies",basicStudyVersion:34},o[5]={type:"BarSetKagi@tv-prostudies",basicStudyVersion:34},o[6]={type:"BarSetPnF@tv-prostudies",basicStudyVersion:34},o[8]={type:"BarSetHeikenAshi@tv-basicstudies",basicStudyVersion:60},o[11]={type:"BarSetRange@tv-basicstudies",basicStudyVersion:72},o)},di4O:function(e,t,i){"use strict";i.r(t),i.d(t,"watermarkProperty",(function(){return u})),i.d(t,"restoreWatermarkPropertyDefaults",(function(){return h}));var n=i("eJTA"),r=i("Vdly"),o=i("tc+8"),s=i.n(o),a={visibility:!1,color:"rgba(80, 83, 94, 0.25)"};function l(){var e=r.getJSON("symbolWatermark"),t=Object.assign({},a,e);if(void 0===e){if(void 0!==r.getJSON("chartproperties")){var i=r.getJSON("chartproperties").symbolWatermarkProperties;if(void 0!==i){var o=Object(n.tryParseRgba)(i.color);t=Object.assign(t,i),null!==o&&(0!==o[3]?t.visibility=!0:(o[3]=.25,t.color=Object(n.rgbaToString)(o)))}}delete t.transparency}return t}var c=null;function u(){return null===c&&(c=new s.a(l()),r.onSync.subscribe(null,(function(){null!==c&&c.mergeAndFire(l())})),c.listeners().subscribe(null,(function(){null!==c&&r.setJSON("symbolWatermark",c.state())}))),c}function h(){null!==c&&c.mergeAndFire(a)}},e1Hy:function(e,t,i){"use strict";i.d(t,"a",(function(){return r}));var n=i("mrSG"),r=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n._showStudyValues=i.properties().paneProperties.legendProperties.showStudyValues,n}return Object(n.__extends)(t,e),t.prototype.getValues=function(t){for(var i=e.prototype.getValues.call(this,t),n=this._showStudyValues.value(),r=0,o=i;ri?i:Math.round(t)}function o(e,t,i){return n.isNaN(t)||ti?i:Math.round(1e4*t)/1e4}function s(e){return r(0,e,255)}function a(e){return r(0,e,255)}function l(e){return r(0,e,255)}function c(e){return o(0,e,1)}function u(e){return o(0,e,1)}function h(e){return o(0,e,1)}function d(e){return o(0,e,1)}function p(e){return o(0,e,1)}function _(e){return o(0,e,1)}function f(e){var t=e[0]/255,i=e[1]/255,n=e[2]/255,r=Math.min(t,i,n),o=Math.max(t,i,n),s=0,a=0,l=(r+o)/2;if(r===o)s=0,a=0;else{var c=o-r;switch(a=l>.5?c/(2-o-r):c/(o+r),o){case t:s=((i-n)/c+(i1&&(i-=1),i<1/6?e+6*(t-e)*i:i<.5?t:i<2/3?e+(t-e)*(2/3-i)*6:e}function v(e){var t,i,n,r=e[0],o=e[1],c=e[2];if(0===o)t=i=n=c;else{var u=c<.5?c*(1+o):c+o-c*o,h=2*c-u;t=m(h,u,r+1/3),i=m(h,u,r), +n=m(h,u,r-1/3)}return[s(255*t),a(255*i),l(255*n)]}t.normalizeRedComponent=s,t.normalizeGreenComponent=a,t.normalizeBlueComponent=l,t.normalizeAlphaComponent=c,t.rgb=function(e,t,i){return[s(e),a(t),l(i)]},t.areEqualRgb=function(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]},t.rgba=function(e,t,i,n){if(Array.isArray(e)){var r=e;return n=t,[r[0],r[1],r[2],c(n)]}var o=t;return i=i||0,n=n||0,[s(e),a(o),l(i),c(n)]},t.areEqualRgba=function(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]},t.normalizeHue=u,t.normalizeHslSaturation=h,t.normalizeHsvSaturation=d,t.normalizeLightness=p,t.normalizeValue=_,t.hsl=function(e,t,i){return[u(e),h(t),p(i)]},t.areEqualHsl=function(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]},t.hsv=function(e,t,i){return[u(e),d(t),_(i)]},t.areEqualHsv=function(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]},t.rgbToHsl=f,t.hslToRgb=v,t.rgbToHsv=function(e){var t=e[0],i=e[1],n=e[2],r=t/255,o=i/255,s=n/255,a=Math.min(r,o,s),l=Math.max(r,o,s),c=l-a,u=0,h=0===l?0:c/l,d=l;if(l===a)u=0;else switch(l){case t:u=((o-s)/c+(o255)throw new Error("invalid threshold value, valid values are [0, 255]");return g(e)>=t?"white":"black"},t.tryParseRgb=E,t.parseRgb=function(e){var t=E(e);if(null!==t)return t;throw new Error("Passed color string does not match any of the known color representations")},t.tryParseRgba=V,t.parseRgba=D},ePL1:function(e,t,i){"use strict";i.r(t),i.d(t,"types",(function(){return n}));var n={ECONOMIC:"economic",QUANDL:"quandl"}},eqEH:function(e,t,i){"use strict";i.d(t,"b",(function(){return s})),i.d(t,"a",(function(){return a})),i.d(t,"c",(function(){return l})),i.d(t,"d",(function(){return c}));var n=i("jofe"),r={},o=new Map;function s(e,t){if(a(e))throw new Error("Service already registered");r[e.id]=t;var i=o.get(e.id);void 0!==i&&(o.delete(e.id),i.resolve(t))}function a(e){return void 0!==r[e.id]}function l(e){var t=r[e.id];if(void 0===t)throw new Error("ServiceLocator: Service "+e.id+" not found");return t}function c(e){if(a(e))return Promise.resolve(l(e));var t=o.get(e.id);return void 0===t&&(t=Object(n.createDeferredPromise)(),o.set(e.id,t)),t.promise}},"f+Sq":function(e,t,i){"use strict";function n(e){if(void 0===e)throw new Error("Value is undefined");return e}function r(e){if(null===e)throw new Error("Value is null");return e}Object.defineProperty(t,"__esModule",{value:!0}),t.assert=function(e,t){if(!e)throw new Error("Assertion failed"+(t?": "+t:""))},t.ensureDefined=n,t.ensureNotNull=r,t.ensure=function(e){return r(n(e))}},f3xO:function(e,t,i){"use strict";i.r(t),i.d(t,"PaneRendererUnicodeChar",(function(){return p}));var n=i("mrSG"),r=i("/SnT"),o=i.n(r),s=i("Eyy1"),a=i("aO4+"),l=i("2WC2"),c=i("VdBB"),u=i("Zp/P"),h=i("zDbI"),d=i("gBDZ"),p=function(e){function t(t,i){var n=e.call(this,t,i)||this;n._heightEnsured=Object(s.ensureDefined)(n._height);var r=t.char.slice(0,40);return n._ch=o()(r)[0]||" ", +n._fontFamily=t.fontFamily||h.CHART_FONT_FAMILY,n._charCache=new d.b(n._ch,!1,!1,n._fontFamily,n._heightEnsured),n}return Object(n.__extends)(t,e),t.prototype.hitTest=function(e){for(var t=Object(u.selectionTolerance)(this._heightEnsured),i=0,n=this._items;i0?1:-1,s=i.y+i.vertOffset-o*Math.round(this._heightEnsured/2);n=i.style&&void 0!==i.style.color?i.style.color:this._color,this._charCache.paintTo(e,t,n,r,s,d.a.Center,i.vertOffset>0?d.c.Top:d.c.Bottom)},t.prototype._startPath=function(e,t,i,n){},t.prototype._endPath=function(e){},t}(l.b)},f6yo:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i("hBTJ");t.pointInHalfplane=function(e,t){var i=t.edge;return i.A*e.x+i.B*e.y+i.C>0===t.isPositive},t.pointInTriangle=function(e,t,i,r){var o=t.add(i).scaled(.5).add(r).scaled(.5),s=n.intersectLineSegments(t,i,o,e);return null===s&&(null===(s=n.intersectLineSegments(i,r,o,e))&&null===(s=n.intersectLineSegments(r,t,o,e)))},t.pointInBox=function(e,t){return e.x>=t.min.x&&e.x<=t.max.x&&e.y>=t.min.y&&e.y<=t.max.y},t.pointInPolygon=function(e,t){for(var i=t.length-1,n=!1,r=e.x,o=e.y,s=0;s=o||l.y=o)&&a.x+(o-a.y)/(l.y-a.y)*(l.x-a.x)=t.length||e.endIndex>=t.length)return null;var i=t[e.startIndex],n=t[e.endIndex];return i===o.a||n===o.a?null:(Object(r.assert)(i<=n,"startIndex should not exceed endIndex"),{startIndex:i,endIndex:n,level:e.level,extendLeft:e.extendLeft,extendRight:e.extendRight})}function l(e,t,i){var r=Object(s.ensureTimePointIndexIndex)(i.indexOf(e.startIndex)),o=Object(s.ensureTimePointIndexIndex)(i.indexOf(e.endIndex));return Object(n.__assign)(Object(n.__assign)({id:t},e),{startIndex:r,endIndex:o})}},fJhV:function(e,t,i){"use strict";i.r(t),i.d(t,"LineDataSourceTimeAxisView",(function(){return r}));var n=i("mrSG"),r=function(e){function t(t,i){var n=e.call(this,t.model())||this;return n._active=!1,n._source=t,n._pointIndex=i,n}return Object(n.__extends)(t,e),t.prototype.setActive=function(e){this._active=e},t.prototype._getBgColor=function(){return this._active?"#1565C0":this._model.isDark()?"#1E88E5":"#2196F3"},t.prototype._getIndex=function(){if(!this._model.selection().isSelected(this._source))return null;var e=this._source.axisPoints();return e.length<=this._pointIndex?null:e[this._pointIndex].index},t}(i("cgFQ").a)},fPdn:function(e,t,i){"use strict";window.TradingView=window.TradingView||{},window.requireAll=function(e){return e.keys().map(e)},i("6jKD"),i("bZMm"),i("P5fv"),i("YFKU"),i("VUhU"),i("si6p"),i("EsMY"), +i("jjqu"),i("OV6q"),i("SpsL"),i("eqD+"),i("iA8Q"),i("32f0"),i("MApU"),i("w9cH").install(),i("QYoC"),i("oA7e"),i("qFKp"),i("1oAu"),i("ogJP"),i("jFln"),i("HbRj"),i("VVxS"),i("CLNU"),i("mZrn"),i("Vdly"),i("+GxX")},fTGZ:function(e,t,i){"use strict";(function(e,n,r){var o=i("Ss5c").LineDataSource,s=i("ogJP").isNumber,a=i("BOPY").BarsMarksContainerPaneView,l=i("BOPY").BarsMarksContainerRenderer,c=i("Bt3k").TooltipRenderer,u=i("LxhU").Interval,h=i("n5al").isPriceSourceStyle,d=i("txPx").getLogger("Chart.BarsMarksContainer");function p(t,i){this.toolname="Child class must override this member";var s=t._undoModel._chartWidget,a=s.onWidget(),l=!1;l=a?s._options&&!s._options.hideIdeas:!!e.enabled("bars_marks")&&TVSettings.getBool("BarsMarksContainer.visibile",!1),i?i.merge({visible:l,frozen:!1}):i=new n({visible:l,frozen:!1});var u=this;i.visible.listeners().subscribe(null,(function(t){a||s._containsData||!e.enabled("bars_marks")||TVSettings.setValue("BarsMarksContainer.visibile",!!t.value()),u._tooltip&&u._tooltip.removeAll()})),o._configureProperties(i),o.call(this,t,i),this.onNeedRepaint=new r,this._requests=[],this._marks={},this._loadedRange=null,this._getDataTimeout=null,this._collectedRange=null,this._model.mainSeries().onSymbolIntervalChanged().subscribe(this,this.clearMarks),this._model.mainSeries().dataEvents().symbolResolved().subscribe(this,this.clearMarks),this._model.mainSeries().dataEvents().tickMarksRangeChanged().subscribe(this,this.getData),this._initialize(),this.pinnedTooltips={},this._tooltip=new c(this._createTooltip.bind(this),this)}inherit(p,o),p.prototype._initialize=function(e){throw new Error("Child class must override this member")},p.prototype.onClicked=function(){throw new Error("Child class must override this member")},p.prototype._getData=function(e){throw new Error("Child class must override this member")},p.prototype._createTooltip=function(){throw new Error("Child class must override this member")},p.prototype.updateDotData=function(e,t){return t},p.prototype.updatePlateData=function(e,t){},p.prototype.isAvailableInFloatingWidget=function(){return!1},p.prototype._plateViewData=function(e){return{}},p.prototype.pinTooltip=function(e,t){this.pinnedTooltips[e]=t},p.prototype.timeScale=function(){return this._model.timeScale()},p.prototype.getIntervalInTicks=function(){var e=this._model.mainSeries().properties().interval.value(),t=u.parse(e);if(!t.isValid())throw new TypeError("Unexpected interval");return t.isRange()?60:t.inMilliseconds()/1e3},p.prototype._maxDate=Math.round(new Date(2037,0,1).getTime()/1e3),p.prototype.getVisibleTickMarksRange=function(){if(this.timeScale().isEmpty())return{start:0,end:0};var e,t=this.timeScale().visibleBarsStrictRange();return t.lastBar()>this.timeScale().points().firstIndex()&&t.firstBar()=t.start&&o<=t.end+i&&e.push(r)}),this),e},p.prototype.getPublishedPlates=function(){var e={},t=this;return is_authenticated?(this.getVisibleRangePlates().forEach((function(i){i.is_public&&(t.pinnedTooltips[i.id]||i.user__id===user.id)&&(e[i.id]=i)})),e):e},p.prototype._maxPlatesPerBar=10,p.prototype.filterDisplayedPlates=function(e){return e=e.reduce(function(e,t){var i=this._getIndex(t.tickmark);return e[i]=e[i]||[],e[i].push(t),e}.bind(this),{}),e=Object.keys(e).reduce(function(t,i){var n=e[i];return n=(n=n.sort((function(e,t){return t.views_count-e.views_count}))).slice(0,this._maxPlatesPerBar),t.concat(n)}.bind(this),[])},p.prototype._layout=function(e){switch(e){default:case 0:return"up";case 1:return"down";case 2:return"up";case 3:case 4:case 5:case 6:return"up"}},p.prototype._theme=function(e){switch(e){default:case 0:return"neutral";case 1:return"green";case 2:return"red";case 3:return"yellow";case 4:return"blue";case 5:return"green";case 6:return"red"}},p.prototype._offset=function(e,t,i){var n;switch(e){default:case"up":n=null===i?t[TradingView.HIGH_PLOT]:i(t);break;case"down":n=null===i?t[TradingView.LOW_PLOT]:i(t)}return this.priceScale().priceToCoordinate(n,this.ownerSource().firstValue())},p.prototype._getIndex=function(e){return this.timeScale().timePointToIndex(e)},p.prototype.getViewData=function(){return{barWidth:this.barWidth(),plates:this.getPlatesViewData(),tooltip:this._tooltip}},p.prototype.barWidth=function(){return this.timeScale().barSpacing()},p.prototype.getPlatesViewData=function(){var e=this._model.mainSeries();if(e.data().isEmpty())return[];for(var t=h(e.style())?e.barFunction():null,i=this.filterDisplayedPlates(this.getVisibleRangePlates()),n=this,r={},o=this._model.lastHittestData(),s=(i=(i=i.map(function(e){var i=this._getIndex(e.tickmark),s=this._getBar(i);if(null===s)return!1;var a,l=this._layout(e.direction),c=this._theme(e.direction),u=o&&o.id===e.id,h=this.timeScale().indexToCoordinate(i),d=this._offset(l,s,t),p=this.priceScale().isInverted();return i in r||(r[i]={up:0,down:0}),a=r[i][l]++,TradingView.merge({id:e.id,x:h,y:d,yInverted:p,order:a,direction:l,theme:c,hovered:u,pinned:!0===n.pinnedTooltips[e.id],user__id:e.user__id,label:e.label,labelFontColor:e.labelFontColor||"#444",minSize:e.minSize||5},this._plateViewData(e))}.bind(this))).filter((function(e){return!!e}))).filter((function(e){return!0===e.hovered})),a=0;athis._loadedRange.end&&(e.start=this._loadedRange.end)),e},p.prototype._rangeUnion=function(e,t){return e=Object.assign({},e),t&&(e.start=Math.min(t.start,e.start),e.end=Math.max(t.end,e.end)),e},p.prototype._pushGetDataStack=function(e){s(e.start)&&s(e.end)?(this._getDataTimeout&&clearTimeout(this._getDataTimeout),this._collectedRange=this._rangeUnion(e,this._collectedRange),this._getDataTimeout=setTimeout(function(){this._getData(this._collectedRange),this._getDataTimeout=this._collectedRange=null}.bind(this),300)):d.logError("Wrong tickmark range")},p.prototype.roundRange=function(e){return{start:Math.round(e.start),end:Math.round(e.end)}},p.prototype.refreshData=function(){this.getData(this._lastRange)},p.prototype.getData=function(e){s(e.start)&&s(e.end)?(this._lastRange=e,(e=Object.assign({},e)).end=this._maxDate,this._pushGetDataStack(e)):d.logError("Wrong range")},p.prototype._abortAllRequests=function(){this._requests.forEach((function(e){e.abort()})),this._requests=[],this._getDataTimeout&&clearTimeout(this._getDataTimeout),this._getDataTimeout=this._collectedRange=null},p.prototype.clearMarks=function(){this._abortAllRequests(),this._marks={},this._loadedRange=null},t.BarsMarksContainer=p}).call(this,i("Kxc7"),i("tc+8"),i("aIyQ"))},fYB8:function(e,t,i){"use strict";i.r(t),i.d(t,"PaneSeparator",(function(){return a}));var n=i("Eyy1"),r=i("Hr11"),o=i("S8xo"),s=i("ikwP"),a=(i("bc0y"),function(){function e(e,t,i,n){if(this._handleEl=null,this._startY=0,this._deltaY=0,this._totalHeight=0,this._totalStretch=0,this._prevStretchA=0,this._minPaneHeight=0,this._maxPaneHeight=0,this._pixelStretchFactor=0,this._mouseEventHandler=null,this._chart=e,this._paneA=e.paneWidgets()[t],this._paneB=e.paneWidgets()[i],this._row=document.createElement("tr"),this._row.style.height="1px",this._cell=document.createElement("td"),this._row.appendChild(this._cell),this._cell.classList.add("pane-separator"),this._cell.setAttribute("colspan","3"),this._cell.style.background=(this._chart.properties().childs().scalesProperties.childs().lineColor.value()||"").toString(),this._cell.addEventListener("click",(function(){})),n)this._mouseEventHandler=null;else{var r=document.createElement("div");r.classList.add("handle"),this._cell.appendChild(r),this._mouseEventHandler=new o.MouseEventHandler(r,this,{treatVertTouchDragAsPageScroll:!1,treatHorzTouchDragAsPageScroll:!0}),this._handleEl=r}}return e.prototype.destroy=function(){null!==this._mouseEventHandler&&this._mouseEventHandler.destroy(),this._row.parentElement&&this._row.parentElement.removeChild(this._row)},e.prototype.getElement=function(){ +return this._row},e.prototype.hide=function(){this._row.classList.add("js-hidden")},e.prototype.show=function(){this._row.classList.remove("js-hidden")},e.prototype.mouseDownEvent=function(e){this._mouseDownOrTouchStartEvent(e)},e.prototype.touchStartEvent=function(e){this._mouseDownOrTouchStartEvent(e)},e.prototype.pressedMouseMoveEvent=function(e){this._pressedMouseOrTouchMoveEvent(e)},e.prototype.touchMoveEvent=function(e){this._pressedMouseOrTouchMoveEvent(e)},e.prototype.mouseUpEvent=function(e){this._mouseUpOrTouchEndEvent(e)},e.prototype.touchEndEvent=function(e){this._mouseUpOrTouchEndEvent(e)},e.prototype.update=function(){this._cell.style.background=this._color().toString()},e.prototype.paint=function(){},e.prototype.image=function(){var e=this._paneA.leftPriceAxisesContainer().getWidth(),t=this._paneA.width(),i=this._paneA.rightPriceAxisesContainer().getWidth(),n=this._color(),r=Object(s.createDisconnectedCanvas)(document,new s.Size(e,1)),o=Object(s.getPrescaledContext2D)(r);o.fillStyle=n,o.fillRect(0,0,e,1);var a=Object(s.createDisconnectedCanvas)(document,new s.Size(t,1)),l=Object(s.getPrescaledContext2D)(a);l.fillStyle=n,l.fillRect(0,0,t,1);var c=Object(s.createDisconnectedCanvas)(document,new s.Size(i,1)),u=Object(s.getPrescaledContext2D)(c);return u.fillStyle=n,u.fillRect(0,0,i,1),{type:"separator",leftAxis:{content:r.toDataURL(),canvas:r,contentWidth:e,contentHeight:1},rightAxis:{content:c.toDataURL(),canvas:c,contentWidth:i,contentHeight:1},content:a.toDataURL(),canvas:a,contentWidth:t,contentHeight:1}},e.height=function(){return 1},e.prototype._mouseDownOrTouchStartEvent=function(e){this._startY=e.pageY,this._deltaY=0,this._totalHeight=this._paneA.height()+this._paneB.height(),this._totalStretch=this._paneA.state().stretchFactor()+this._paneB.state().stretchFactor(),this._prevStretchA=this._paneA.state().stretchFactor(),this._minPaneHeight=30,this._maxPaneHeight=this._totalHeight-this._minPaneHeight,this._pixelStretchFactor=this._totalStretch/this._totalHeight,Object(n.ensureNotNull)(this._handleEl).classList.add("i-active")},e.prototype._pressedMouseOrTouchMoveEvent=function(e){this._deltaY=e.pageY-this._startY;var t=this._paneA.height(),i=Object(r.clamp)(t+this._deltaY,this._minPaneHeight,this._maxPaneHeight)*this._pixelStretchFactor,n=this._totalStretch-i;this._paneA.state().setStretchFactor(i),this._paneB.state().setStretchFactor(n),this._chart.adjustSize(),this._paneA.height()!==t&&(this._startY=e.pageY),this._chart.model().model().fullUpdate()},e.prototype._mouseUpOrTouchEndEvent=function(e){this._chart.model().addPaneStretchFactorUndoCommand(this._paneA.state(),this._paneB.state(),this._prevStretchA,this._paneA.state().stretchFactor()),this._startY=0,this._deltaY=0,this._totalHeight=0,this._totalStretch=0,this._minPaneHeight=0,this._maxPaneHeight=0,this._pixelStretchFactor=0,Object(n.ensureNotNull)(this._handleEl).classList.remove("i-active")},e.prototype._color=function(){return this._chart.properties().childs().scalesProperties.childs().lineColor.value()||""},e}())},fgLi:function(e,t,i){ +"use strict";i.r(t),i.d(t,"DataSource",(function(){return l}));var n=i("hY0g"),r=i.n(n),o=i("e3/o"),s=i("aIyQ"),a=i.n(s),l=function(){function e(){this.hasAlert=new r.a(!1),this._zorder=0,this.m_priceScale=null,this._id=Object(o.randomHashN)(6),this._ownerSource=null,this._userEditEnabled=!0,this._onPriceScaleChanged=new a.a,this._ownerSourceChanged=new a.a}return e.prototype.id=function(){return this._id},e.prototype.preferNoScale=function(){return!1},e.prototype.idForAlert=function(){return this._id},e.prototype.setId=function(e){this._id=e},e.prototype.zorder=function(){return this._zorder},e.prototype.setZorder=function(e){"number"==typeof e&&this._zorder!==e&&(this._zorder=e)},e.prototype.title=function(){throw new Error("Implement this fun in a subclass")},e.prototype.priceScale=function(){return this.m_priceScale},e.prototype.setPriceScale=function(e){this.m_priceScale=e,this._onPriceScaleChanged.fire()},e.prototype.ownerSource=function(){return this._ownerSource},e.prototype.setOwnerSource=function(e){this._ownerSource=e,this._ownerSourceChanged.fire()},e.prototype.ownerSourceChanged=function(){return this._ownerSourceChanged},e.prototype.isSavedInChart=function(e){return!0},e.prototype.isSavedInStudyTemplates=function(){return!0},e.prototype.isRemovedByStudyTemplates=function(){return!0},e.prototype.hasContextMenu=function(){return!0},e.prototype.showInObjectTree=function(){return!0},e.prototype.setUserEditEnabled=function(e){this._userEditEnabled=e},e.prototype.userEditEnabled=function(){return this._userEditEnabled},e.prototype.canBeHidden=function(){return this.userEditEnabled()},e.prototype.isUserDeletable=function(){return this.userEditEnabled()},e.prototype.canHasAlert=function(){return!1},e.prototype.properties=function(){throw new Error("Implement this fun in a subclass")},e.prototype.isVisible=function(){return this.properties().visible.value()},e.prototype.statusView=function(){return null},e.prototype.dataWindowView=function(){return null},e.prototype.legendView=function(){return null},e.prototype.marketStatusModel=function(){return null},e.prototype.dataUpdatedModeModel=function(){return null},e.prototype.dataProblemModel=function(){return null},e.prototype.priceAxisViews=function(e,t){return null},e.prototype.updateAllViews=function(){},e.prototype.paneViews=function(){return null},e.prototype.labelPaneViews=function(){return null},e.prototype.isFailed=function(){return!1},e.prototype.isLoading=function(){return!1},e.prototype.isChildStudy=function(){return!1},e.prototype.hasChildren=function(){return!1},e.prototype.canHaveChildren=function(){return!1},e.prototype.onClickOutside=function(){},e.prototype.getInputsPropertyPage=function(){return null},e.prototype.getStylesPropertyPage=function(){return null},e.prototype.getDisplayPropertyPage=function(){return null},e.prototype.getVisibilitiesPropertyPage=function(){return null},e.prototype.getSourceIcon=function(){return null},e.prototype.state=function(e){throw new Error("Implement this fun in a subclass")}, +e.prototype.onPriceScaleChanged=function(){return this._onPriceScaleChanged},e.prototype.doesMovingAffectsUndo=function(){return!0},e.prototype.copiable=function(){return!1},e.prototype.cloneable=function(){return!1},e.prototype.movable=function(){return!1},e.prototype.isIncludedInAutoScale=function(){return!1},e.prototype.priceRange=function(e,t){return null},e.prototype.autoScaleInfo=function(e,t){return{range:this.priceRange(e,t)}},e}()},fs3R:function(e,t){e.exports=''},fxzW:function(e,t,i){"use strict";i.r(t),i.d(t,"PaneRendererDiamond",(function(){return s}));var n=i("mrSG"),r=i("2WC2"),o=i("aO4+"),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype._drawItemShapeUsingCSSPixels=function(e,t){var i=Math.round(t.height/2),n=t.x,r=t.vertOffset,o=t.y+r;e.moveTo(n,o-i),e.lineTo(n+i,o),e.lineTo(n,o+i),e.lineTo(n-i,o),e.lineTo(n,o-i)},t.prototype._calcBoundingBox=function(t){var i=Math.round(t.height/2),n=t.x,r=t.vertOffset,s=t.y+r,a=n-i,l=n+i,c=s-i,u=s+i,h=new o.Point(a,c),d=new o.Point(l,u),p=Object(o.box)(h,d),_=e.prototype._calcBoundingBox.call(this,t);return _&&(p=this._unionBox(p,_)),p},t}(r.a)},g5Qf:function(e,t,i){"use strict";i.r(t),i.d(t,"getFavoriteDrawingToolbarPromise",(function(){return s})),i.d(t,"createFavoriteDrawingToolbar",(function(){return a}));i("YFKU");var n=i("yMne"),r=null,o=null;function s(){return o}function a(){null===o&&(o=new Promise((function(e){Promise.all([i.e(32),i.e(39),i.e(63),i.e(77),i.e(15),i.e(30),i.e(35),i.e(47),i.e(57),i.e("floating-toolbars")]).then(function(t){if(null===r){var o=i("gmn6").FavoriteDrawingToolbar;r=new o({left:window.innerWidth/2,top:n.HEADER_TOOLBAR_HEIGHT_EXPANDED+61}),e(r)}}.bind(null,i)).catch(void 0)})))}},gAom:function(e,t,i){"use strict";function n(e,t,i,n,r,o,s){e.save(),e.globalCompositeOperation="copy";var a=e.createLinearGradient(0,0,0,r);a.addColorStop(0,o),a.addColorStop(1,s),e.fillStyle=a,e.fillRect(t,i,n,r),e.restore()}function r(e,t,i,n,r,o){e.fillRect(t+o,i,n-2*o,o),e.fillRect(t+o,i+r-o,n-2*o,o),e.fillRect(t,i,o,r),e.fillRect(t+n-o,i,o,r)}function o(e,t,i,n){e.beginPath();var r=e.lineWidth%2?.5:0;e.moveTo(i,t+r),e.lineTo(n,t+r),e.stroke()}function s(e,t,i,n){e.beginPath();var r=e.lineWidth%2?.5:0;e.moveTo(t+r,i),e.lineTo(t+r,n),e.stroke()}i.r(t),i.d(t,"clearRectWithGradient",(function(){return n})),i.d(t,"fillRectInnerBorder",(function(){return r})),i.d(t,"drawHorizontalLine",(function(){return o})),i.d(t,"drawVerticalLine",(function(){return s}))},gBDZ:function(e,t,i){"use strict";i.d(t,"a",(function(){return n})),i.d(t,"c",(function(){return r})),i.d(t,"b",(function(){return c}));var n,r,o=i("Eyy1"),s=i("XlJ7"),a=i("c44N"),l=i("ikwP");!function(e){e.Left="left", +e.Right="right",e.Center="center"}(n||(n={})),function(e){e.Top="top",e.Bottom="bottom",e.Middle="middle"}(r||(r={}));var c=function(){function e(e,t,i,n,r,a){void 0===a&&(a="center"),this._cacheRenderParams=null,this._canvasesMap={},this._lines=e.split(/[^\S\r\n]*(?:\r\n|\r|\n)/),this._font=function(e,t,i,n){return Object(s.makeFont)(n,i,(e?"bold ":"")+(t?"italic ":""))}(t,i,n,r),this._fontSize=r,this._verticalPadding=~~(r/6),this._textAlign=a;var c=Object(l.createDisconnectedCanvas)(document,new l.Size(0,0),1),u=Object(o.ensureNotNull)(c.getContext("2d"));u.font=this._font;for(var h=0,d=0,p=this._lines;d0){var i=this._strategySources[this._strategySources.length-1];this.setActiveStrategySource(i)}this._strategySourcesChange.fire()}},e.prototype.setActiveStrategySource=function(e){-1!==this._strategySources.indexOf(e)&&this._activeStrategySource.setValue(e)},e.prototype.unsetActiveStrategySource=function(){this._activeStrategySource.setValue(null)},e.prototype.activeStrategySource=function(){return this._activeStrategySource},e.prototype.strategySources=function(){return this._strategySources},e.prototype.strategySourcesChange=function(){return this._strategySourcesChange},e.prototype.setScrollEnabled=function(e){this._scrollEnabled=e},e.prototype.scrollEnabled=function(){return this._scrollEnabled},e.prototype.setZoomEnabled=function(e){this._zoomEnabled=e},e.prototype.zoomEnabled=function(){return this._zoomEnabled},e.prototype.onTagsChanged=function(){return this._tagsChanged},e.prototype.canZoomIn=function(){return this._timeScale.canZoomIn()&&this._zoomEnabled},e.prototype.canZoomOut=function(){return this._timeScale.canZoomOut()&&this._zoomEnabled},e.prototype.onPaneTagsChanged=function(){this._tagsChanged.fire()},e.prototype.panesCollectionChanged=function(){return this._panesCollectionChanged},e.prototype.dataSourceCollectionChanged=function(){return this._dataSourceCollectionChanged},e.prototype.sourceProperitesChanged=function(){return this._sourceProperitesChanged},e.prototype.updateCrosshair=function(){var e=this.crossHairSource(),t=e.pane;if(null!==t){var i=e.originCoordX(),n=e.originCoordY();this.setAndSaveCurrentPosition(i,n,t)}},e.prototype.zoomTime=function(e,t,i){if(this._zoomEnabled){var n=this.timeScale();if(!n.isEmpty()&&0!==t){var r=n.width();e=Math.max(1,Math.min(e,r-2)),n.zoom(e,t,i),this.updateCrosshair(),this.recalculateAllPanes(),this.lightUpdate(),this.mainSeries().requestMoreData(),this.recalcVisibleRangeStudies(),this._setScalesResetAvailable(!0)}}},e.prototype.lineToolsGroupModel=function(){return this._lineToolsGroupModel},e.prototype.restoreLineToolsGroups=function(e){this._lineToolsGroupModel=C.LineToolsGroupModel.fromState(this,e)},e.prototype.updateSource=function(e){var t=this._invalidationMaskForSource(e);null!==t&&this.invalidate(t)},e.prototype.updateSourcePriceScale=function(e){var t=this._invalidationMaskForSourcePriceScale(e);null!==t&&this.invalidate(t)},e.prototype.replaceStudyStub=function(e,t){var i=this.paneForSource(e);if(null===i)return!1;var n=e.priceScale(),r=e.zorder(),o=e.ownerSource();return this.paneForSource(e)===i?i.replaceSource(e,t,n):(i.insertDataSource(t,n,r),this.removeSource(e)), +t.setOwnerSource(o),this.dataSources().forEach((function(i){i.ownerSource()===e&&i.setOwnerSource(t)})),t.start(),this.recalculatePane(i),this.fullUpdate(),!0},e.prototype.insertStudyStub=function(e){var t=this.mainSeries(),i=Object(n.ensureNotNull)(this.paneForSource(t)),r=new a.StudyStub(this,null,e),o=i.createPriceScaleAtPosition("overlay");return i.addDataSource(r,o,!1),this.recalculatePane(i),this.fullUpdate(),r},e.prototype.removeStudyStub=function(e){var t=this.dataSourceForId(e);return null===t?(E.logNormal("StudyStub id="+e+" is not found in chart model"),!1):(this.removeSource(t),!0)},e.prototype.setHoveredSource=function(e,t){var i=this._hoveredSource!==e;if(i||this._lastHittestData!==t){this._lastHittestData=t;var n,r=null;if(this._hoveredSource)this._hoveredSource.updateAllViews(),r=new v.InvalidationMask(v.InvalidationLevel.Cursor),null!==(n=this._invalidationMaskForSource(this._hoveredSource,v.InvalidationLevel.Light))&&r.merge(n);if(this._hoveredSource=e,e)e.updateAllViews(),r||(r=new v.InvalidationMask(v.InvalidationLevel.Cursor)),null!==(n=this._invalidationMaskForSource(e,v.InvalidationLevel.Light))&&r.merge(n);r&&this.invalidate(r),i&&this._hoveredSourceChanged.fire(e)}},e.prototype.hoveredSource=function(){return this._hoveredSource},e.prototype.hoveredSourceChanged=function(){return this._hoveredSourceChanged},e.prototype.lastHittestData=function(){return this._lastHittestData},e.prototype.findNonOverlayStudyWithGroupingKey=function(e,t){for(var i=function(t){var i=t.dataSources().find((function(i){return Object(d.isStudy)(i)&&i.metaInfo().groupingKey===e&&!t.isOverlay(i)}));if(void 0!==i)return{value:{pane:t,study:i}}},n=0,r=void 0!==t?[t]:this._panes;n=0&&e1)return void t.setValue(!1)}t.setValue(!0)}},e.prototype._pointToPercentPosition=function(e,t){return{x:e.x/this._timeScale.width(),y:e.y/Object(n.ensureNotNull)(Object(n.ensureNotNull)(t.mainDataSource()).priceScale()).height()}},e.prototype._percentPositionToPoint=function(e,t){var i=e.x*this._timeScale.width(),o=e.y*Object(n.ensureNotNull)(Object(n.ensureNotNull)(t.mainDataSource()).priceScale()).height();return new r.Point(i,o)},e.prototype._recalcVisibleRangeStudiesImpl=function(){if(this._recalcVRStudiesParams.timerId=null,!this.timeScale().isEmpty()){var e=this.timeScale().visibleBarsStrictRange();if(null!==e){var t=this.mainSeries().nearestData(e.firstBar(),A.PlotRowSearchMode.NearestRight),i=this.mainSeries().nearestData(e.lastBar(),A.PlotRowSearchMode.NearestLeft),n=this.mainSeries().bars().lastIndex(),r=t?t.index:void 0,o=i?i.index:void 0,s=r===this._oldStartVisibleIndex,a=o===this._oldEndVisibleIndex;if(!s||!a||this._recalcVRStudiesParams.force){this._recalcVRStudiesParams.force=!1;var l={ +first_visible_bar_time:1e3*Math.floor(t&&t.value?t.value[0]:0),last_visible_bar_time:1e3*Math.floor(i&&i.value?i.value[0]:0),subscribeRealtime:i&&i.index===n},c=this._recalcVRStudiesParams.studies||this.dataSources();this._recalcVRStudiesParams.studies=void 0;for(var u=0,h=c;u0&&y.listeners().fire(y)}}}}}},e.prototype._getAvailableCurrencies=function(){var e=this;return this._options.currencyLabelEnabled?Object(L.isArray)(this._availableCurrencies)?this._availableCurrencies:(null!==this._availableCurrencies||(this._availableCurrencies=this.chartApi().availableCurrencies(),this._availableCurrencies.then((function(t){e._destroyed||(e._availableCurrencies=t,e.lightUpdate())})).catch((function(t){E.logWarn("An error occurred while getting available currencies: "+t),e._availableCurrencies=null}))),[]):[]},e.prototype._getBackgroundColor=function(e){var t=this._properties.childs().paneProperties.childs();return t.backgroundType.value()===k.ColorType.Gradient?e?t.backgroundGradientStartColor.value():t.backgroundGradientEndColor.value():t.background.value()},e.prototype._updateBackgroundColor=function(){this._backgroundColor.setValue(this._getBackgroundColor()),this._backgroundTopColor.setValue(this._getBackgroundColor(!0))},e}()},gQ5K:function(e,t,i){"use strict";i.r(t),i.d(t,"DateFormatter",(function(){return o}));var n=i("kcTO"),r=i("e1ZQ"),o=function(){function e(e){void 0===e&&(e="yyyy-MM-dd"),this._dateFormatFunc=r.b[e]}return e.prototype.format=function(e){return n.customFormatters&&n.customFormatters.dateFormatter?n.customFormatters.dateFormatter.format(e):this._dateFormatFunc(e,!1)},e.prototype.formatLocal=function(e){return n.customFormatters.dateFormatter?n.customFormatters.dateFormatter.formatLocal?n.customFormatters.dateFormatter.formatLocal(e):n.customFormatters.dateFormatter.format(e):this._dateFormatFunc(e,!0)},e}()},gTEF:function(e,t,i){"use strict";i.r(t),i.d(t,"SelectionRendererArrowsUpDown",(function(){return a}));var n=i("mrSG"),r=i("Eyy1"),o=i("vq8G"),s=i("6Fc/"),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype._drawMarker=function(e,t,i,n,o){var a=Object(r.ensureNotNull)(this._data),l=t.isUp?1:-1,c=i+l*Object(s.calculateVerticalOffset)(a.barSpacing)+l*Object(s.calculateMinHeight)(a.barSpacing),u=Math.round(3.5*o*2);u%2!=n%2&&(u+=1);var h=n%2/2,d=Math.round(t.x*o)+h,p=Math.round((t.y+c)*o)+h;e.beginPath(),e.arc(d,p,u/2,0,2*Math.PI,!0),e.closePath(),e.fill(),e.stroke()},t}(o.SelectionRenderer)},gVWb:function(e,t,i){"use strict";i.r(t),i.d(t,"PaneRendererBackground",(function(){return n}));var n=function(){function e(e){this._data=e}return e.prototype.draw=function(e,t){},e.prototype.drawBackground=function(e,t){e.save();for(var i=this._data,n=t.pixelRatio,r=0;r2;){var d=Math.round((h+u)/2);this.items[d].x<=e.x?u=d:h=d}u=Math.max(1,u-1),h=Math.min(this.items.length-1,h+1);for(var p=u;p<=h;++p)if(t=this.items[p-1],i=this.items[p],a=t.x,l=i.x,r(new n(a,t.y),new n(l,i.y),new n(e.x,e.y)).distance<=c)return this.hittest?this.hittest:new s(s.REGULAR);return null},t.PaneRendererLine=TradingView.PaneRendererLine=l},h24c:function(e,t,i){"use strict";i.r(t),i.d(t,"parseIntervalValue",(function(){return c})),i.d(t,"intervalIsSupported",(function(){return u})),i.d(t,"canShowSpreadActions",(function(){return h})),i.d(t,"globalKeypressMatches",(function(){return d})),i.d(t,"skipAccept",(function(){return p})),i.d(t,"syncSymbolSearch",(function(){return _})),i.d(t,"setLinkingResolution",(function(){return f}));var n=i("Kxc7"),r=i("pPtI"),o=i("PT1i"),s=i("LxhU"),a=i("ePL1"),l=new RegExp("^"+a.types.QUANDL,"i");function c(e){var t=/^[,\s]*(\d*)\s*([hdwms]?)\s*$/i.exec(e)||[],i=~~t[1],n=t[2]&&t[2].toUpperCase()||null,r={qty:!i&&n?1:i,unit:n};return r.error=!i&&!n,r.intraday=!(r.error||r.unit&&"H"!==r.unit),r}function u(e){if(n.enabled("allow_supported_resolutions_set_only")){var t=s.Interval.normalize(e);return null!==t&&Object(r.isAvailable)(t) +}var i=c(e);if(i.error)return!1;if(i.intraday)return o.linking.intraday.value();var a=o.linking.supportedResolutions.value();return!a||null!==i.unit&&!!~a.indexOf(i.unit)}function h(){return!1}function d(e){return!e.ctrlKey&&(!e.metaKey&&(!!e.charCode&&(!(!e.which||e.which<=32)&&(null===e.target||!/^(input|textarea)$/i.test(e.target.tagName)))))}function p(e,t){return!t&&(e===o.linking.symbol.value()||e===o.linking.seriesShortSymbol.value())}function _(e,t){var i=o.linking.symbol.value()||"";i=function(e,t){if(!t)return e;if(l.test(e)){var i=e.split(/\//);i.length&&(e=i[i.length-1])}else e=o.linking.seriesShortSymbol.value()||e;return e}(i,t),e.val(i)}function f(e){Object(r.setLastUsedResolution)(e),o.linking.interval.setValue(e)}},hBTJ:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i("Eyy1"),r=i("aO4+"),o=i("GEp6"),s=i("f6yo");function a(e,t){var i=e.A,n=t.A,o=e.B,s=t.B,a=e.C,l=t.C,c=i*s-n*o;if(Math.abs(c)<1e-6)return null;var u=(o*l-s*a)/c,h=(n*a-i*l)/c;return new r.Point(u,h)}function l(e,t,i,n){var r=function(e,t,i,n){var r=t.subtract(e),o=n.subtract(i),s=r.x*o.y-r.y*o.x;if(Math.abs(s)<1e-6)return null;var a=e.subtract(i);return(a.y*o.x-a.x*o.y)/s}(e,t,i,n);if(null===r)return null;var s=t.subtract(e).scaled(r).add(e),a=o.distanceToSegment(i,n,s);return Math.abs(a.distance)<1e-6?r:null}function c(e,t){for(var i=0,n=e;i0&&r.equalPoints(e[e.length-1],t))&&(e.push(t),!0)}function h(e,t){for(var i=[],n=0;n=3?i:null}t.intersectLineSegmentAndBox=function(e,t){var i=e[0].x,n=e[0].y,o=e[1].x,s=e[1].y,a=t.min.x,l=t.min.y,c=t.max.x,u=t.max.y;function h(e,t,i,n,r,o){var s=0;return er&&(s|=2),to&&(s|=8),s}for(var d=h(i,n,a,l,c,u),p=h(o,s,a,l,c,u),_=!1,f=0;;){if(f>1e3)throw new Error("Cohen - Sutherland algorithm: infinity loop");if(f++,!(d|p)){_=!0;break}if(d&p)break;var m=d||p,v=void 0,y=void 0;8&m?(v=i+(o-i)*(u-n)/(s-n),y=u):4&m?(v=i+(o-i)*(l-n)/(s-n),y=l):2&m?(y=n+(s-n)*(c-i)/(o-i),v=c):(y=n+(s-n)*(a-i)/(o-i),v=a),m===d?d=h(i=v,n=y,a,l,c,u):p=h(o=v,s=y,a,l,c,u)}return _?r.equalPoints(r.point(i,n),r.point(o,s))?r.point(i,n):r.lineSegment(r.point(i,n),r.point(o,s)):null},t.intersectLines=a,t.intersectLineSegments=l,t.intersectLineAndBox=function(e,t){var i=t.min.x,o=t.min.y,s=t.max.x,a=t.max.y;if(0===e.A){var l=-e.C/e.B;return o<=l&&l<=a?r.lineSegment(r.point(i,l),r.point(s,l)):null}if(0===e.B){var u=-e.C/e.A;return i<=u&&u<=s?r.lineSegment(r.point(u,o),r.point(u,a)):null}var h=[],d=function(t){var i=function(e,t){return-(e.C+e.A*t)/e.B}(e,t);o<=i&&i<=a&&c(h,new r.Point(t,i))},p=function(t){var n=function(e,t){return-(e.C+e.B*t)/e.A}(e,t);i<=n&&n<=s&&c(h,new r.Point(n,t))};switch(d(i),p(o),d(s),p(a),h.length){ +case 0:return null;case 1:return h[0];case 2:return r.equalPoints(h[0],h[1])?h[0]:r.lineSegment(h[0],h[1])}return n.assert(!1,"We should have at most two intersection points"),null},t.intersectRayAndBox=function(e,t,i){var n=l(e,t,i.min,new r.Point(i.max.x,i.min.y)),o=l(e,t,new r.Point(i.max.x,i.min.y),i.max),a=l(e,t,i.max,new r.Point(i.min.x,i.max.y)),c=l(e,t,new r.Point(i.min.x,i.max.y),i.min),u=[];if(null!==n&&n>=0&&u.push(n),null!==o&&o>=0&&u.push(o),null!==a&&a>=0&&u.push(a),null!==c&&c>=0&&u.push(c),0===u.length)return null;u.sort((function(e,t){return e-t}));var h=s.pointInBox(e,i)?u[0]:u[u.length-1];return e.addScaled(t.subtract(e),h)},t.intersectPolygonAndHalfplane=h,t.intersectPolygons=function(e,t){for(var i=e,n=0;n0){var d=this._points[this._points.length-1],p=this._model.timeScale().indexToCoordinate(d.index),_=d.price,f=a.priceToCoordinate(_,u);if(new o.Point(l,h).subtract(new o.Point(p,f)).length()<5)return this._lastPoint=null,this.normalizePoints(),this.createServerPoints(),!0;var m=this._points[0],v=this._model.timeScale().indexToCoordinate(m.index),y=m.price,g=a.priceToCoordinate(y,u);if(new o.Point(l,h).subtract(new o.Point(v,g)).length()<5)return this.properties().childs().filled.setValue(!0),this._lastPoint=null,this.normalizePoints(),this.createServerPoints(),!0}return e.prototype.addPoint.call(this,t,i,n)},t.prototype.setPoint=function(t,i,n){var s;e.prototype.setPoint.call(this,t,i,n);var a=this.priceScale();if(!(this._model.timeScale().isEmpty()||null===a||a.isEmpty()||t!==this._points.length-1&&0!==t)){ +var l=Object(r.ensure)(null===(s=this.ownerSource())||void 0===s?void 0:s.firstValue()),c=this._model.timeScale().indexToCoordinate(i.index),u=a.priceToCoordinate(i.price,l),h=t===this._points.length-1?this._points[0]:this._points[this._points.length-1],d=this._model.timeScale().indexToCoordinate(h.index),p=a.priceToCoordinate(h.price,l);new o.Point(c,u).subtract(new o.Point(d,p)).length()<5&&this.properties().childs().filled.setValue(!0)}},t.createProperties=function(e){var i=new a.DefaultProperty("linetoolpolyline",e);return t._configureProperties(i),i},t.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(i.bind(null,"91EF")).then((function(e){return e.PolylinesDefinitionsViewModel}))},t._configureProperties=function(e){l.LineDataSource._configureProperties(e),e.addExclusion("filled")},t}(l.LineDataSource)},hY0g:function(e,t,i){"use strict";(function(e){var t=i("txPx").getLogger("Common.WatchedValue");function n(){}function r(e){if(!(this instanceof r))return new r(e);arguments.length>0&&(this._value=e),this._listeners=[]}r.prototype.value=function(){return this._owner?this._owner._value:this._value},r.prototype.setValue=function(e,i){var n=this._owner?this._owner:this;if("function"==typeof n.hook&&(e=n.hook(e)),n.writeLock)return n._value;if(!i&&n._value===e&&n.hasOwnProperty("_value"))return e;n._value=e;for(var r=n._listeners.slice(),o=0,s=0;s=1&&t<=15?"1D":"1W"}throw new Error("Unexpected resolution type: "+e.symbol.resolution)}(e);case"Daily":return"1D";case"Weekly":return"1W";case"Monthly":return"1M";case"Yearly":return"12M";default:throw new Error("No such pivTimeFrame: "+t)}}var u={name:"Pivot Points Standard",metainfo:{_metainfoVersion:44,defaults:{inputs:{kind:"Traditional",lookBack:15,pivTimeFrame:"Auto",showHistoricalPivots:!0},precision:"4"},description:"Pivot Points Standard",id:"PivotPointsStandard@tv-basicstudies-80",inputs:[{defval:"Traditional",id:"kind",name:"Type",options:["Traditional","Fibonacci","Woodie","Classic","DeMark","Camarilla"],type:"text"},{defval:!0,id:"showHistoricalPivots",name:"Show historical pivots",type:"bool"},{defval:"Auto",id:"pivTimeFrame",name:"Pivots Timeframe",options:["Auto","Daily","Weekly","Monthly","Yearly"],type:"text"},{defval:15,id:"lookBack",max:5e3,min:2,name:"Number of Pivots Back",type:"integer"}],is_price_study:!0,linkedToSeries:!0,shortDescription:"Pivots"},constructor:function(){function e(){this._secondaryRes="1D",this._firstMainSeriesBarTime=NaN}return e.prototype.init=function(e,t){var i=t(0),r=t(1),o=t(2),a=t(3);this._data=new s,this._firstMainSeriesBarTime=NaN,this._kindPP=function(e){switch(e){case"Traditional":return 0;case"Fibonacci":return 1;case"Woodie":return 2;case"Classic":return 3;case"DeMark":return 4;case"Camarilla":return 5;default:throw new Error("Unknown kind "+e)}}(i),this._showHistoricalPivots=r,this._historicalPivotsToKeep=a,this._pivTimeFrame=o,this._isValidResolution=function(e,t){return(!n.Std.isdaily(e)||"Daily"!==t)&&((!n.Std.isweekly(e)||"Daily"!==t&&"Weekly"!==t)&&(!n.Std.ismonthly(e)||"Daily"!==t&&"Weekly"!==t&&"Monthly"!==t))}(e,this._pivTimeFrame),this._isValidResolution||n.Std.error("You cannot see this pivot timeframe on this resolution"),this._isValidResolution&&(this._secondaryRes=c(e,this._pivTimeFrame));var l=""===e.symbol.resolution?String(Math.max(30,2*e.symbol.interval)):e.symbol.period;e.new_sym(e.symbol.tickerid,this._secondaryRes,this._secondaryRes,l)},e.prototype.main=function(e){if(!this._isValidResolution)return null;if(e.symbol.time)return isNaN(this._firstMainSeriesBarTime)&&(this._firstMainSeriesBarTime=e.symbol.time,this._removeUnusedPivots()),e.symbol.isLastBar&&e.symbol.isNewBar?this._createResponse():null;e.select_sym(1);var t=e.new_var(n.Std.open(e)),i=e.new_var(n.Std.high(e)),r=e.new_var(n.Std.low(e)),s=e.new_var(n.Std.close(e)),a=e.new_var(n.Std.time(e)),c=this._data,u=t.get(0),h=a.get(0),d=t.get(1),p=i.get(1),_=r.get(1),f=s.get(1),m=e.symbol.isLastBar;if(0!==c.pivots.length&&e.symbol.isNewBar){var v=c.pivots[c.pivots.length-1];v.endIndex__t!==h&&(v.endIndex__t=h)}if(0===e.symbol.index||!e.symbol.isNewBar)return e.select_sym(0),null;var y=function(e,t,i,r,s,a,l,c){var u=new o,h=NaN,d=i-r;switch(c){case 0:h=(i+r+s)/3,u.p=h,u.r1=2*h-r,u.s1=2*h-i,u.r2=h+(i-r),u.s2=h-(i-r),u.r3=2*h+(i-2*r),u.s3=2*h-(2*i-r), +u.r4=3*h+(i-3*r),u.s4=3*h-(3*i-r),u.r5=4*h+(i-4*r),u.s5=4*h-(4*i-r);break;case 1:h=(i+r+s)/3,u.p=h,u.r1=h+.382*d,u.s1=h-.382*d,u.r2=h+.618*d,u.s2=h-.618*d,u.r3=h+d,u.s3=h-d;break;case 2:h=(i+r+2*e)/4,u.p=h,u.r1=2*h-r,u.s1=2*h-i,u.r2=h+d,u.s2=h-d,u.r3=i+2*(h-r),u.s3=r-2*(i-h),u.r4=u.r3+d,u.s4=u.s3-d;break;case 3:h=(i+r+s)/3,u.p=h,u.r1=2*h-r,u.s1=2*h-i,u.r2=h+d,u.s2=h-d,u.r3=h+2*d,u.s3=h-2*d,u.r4=h+3*d,u.s4=h-3*d;break;case 4:var p=NaN;h=(p=n.Std.equal(t,s)?i+r+2*s:n.Std.greater(s,t)?2*i+r+s:2*r+i+s)/4,u.p=h,u.r1=p/2-r,u.s1=p/2-i;break;case 5:h=(i+r+s)/3,u.p=h,u.r1=s+1.1*d/12,u.s1=s-1.1*d/12,u.r2=s+1.1*d/6,u.s2=s-1.1*d/6,u.r3=s+1.1*d/4,u.s3=s-1.1*d/4,u.r4=s+1.1*d/2,u.s4=s-1.1*d/2;break;default:throw new Error("Unknown kind")}return u.startIndex__t=a,u.endIndex__t=l,u}(u,d,p,_,f,h,l(e,h),this._kindPP);return e.select_sym(0),this._showHistoricalPivots||(c.pivots=[]),c.pivots.push(y),c.pivots.length>this._historicalPivotsToKeep&&c.pivots.shift(),m?this._createResponse():null},e.prototype._createResponse=function(){return 0===this._data.pivots.length?null:{nonseries:!0,type:"non_series_data",data:{data:this._data}}},e.prototype._removeUnusedPivots=function(){var e=this,t=Math.max(this._data.pivots.findIndex((function(t){return t.startIndex__t>e._firstMainSeriesBarTime}))-1,0);t>0&&this._data.pivots.splice(0,t)},e}()}},"i/Bj":function(e,t,i){"use strict";function n(e){if(void 0===e)return null;var t=e.match(/(delayed_streaming)_([\d]{1,4})/);return null===t?null:{mode:t[1],interval:parseInt(t[2])}}i.r(t),i.d(t,"parseUpdateMode",(function(){return n}))},i126:function(e,t,i){"use strict";i.r(t),i.d(t,"StudyColorRotatorFactory",(function(){return u}));var n=i("eJTA"),r=i("Tmoa"),o=i("HGP3"),s=i("3ClC"),a=["color-sky-blue-400","color-banana-yellow-700","color-deep-blue-500","color-grapes-purple-a700","color-iguana-green-500","color-minty-green-a700","color-ripe-red-a200","color-berry-pink-200","color-tv-blue-a100","color-tan-orange-a200","color-sky-blue-a400","color-deep-blue-a100","color-grapes-purple-400","color-iguana-green-a700","color-minty-green-200","color-ripe-red-200","color-berry-pink-a200","color-ripe-red-500","color-grapes-purple-500","color-deep-blue-400","color-tv-blue-a200","color-sky-blue-500","color-iguana-green-400","color-minty-green-400","color-banana-yellow-600","color-tan-orange-500","color-berry-pink-400","color-ripe-red-300","color-grapes-purple-300","color-deep-blue-300","color-tv-blue-300","color-sky-blue-300","color-iguana-green-300","color-minty-green-300","color-banana-yellow-400","color-tan-orange-300","color-berry-pink-300","color-tan-orange-a700"],l=function(){function e(e){this._offset=0,this._offset=e}return e.prototype.getColor=function(e){if(0===this._offset)return e;var t=a[(this._offset-1)%a.length],i=o.colorsPalette[t],s=Object(r.isHexColor)(e)?1:Object(n.parseRgba)(e)[3];return Object(r.generateColor)(i,Object(r.alphaToTransparency)(s))},e}(),c=function(){function e(e,t){this._offset=e,this._modelStartOffset=t}return e.prototype.getColor=function(e){if(Object(r.isHexColor)(e)){ +var t=Object(n.parseRgb)(e);return Object(n.rgbToHexString)(Object(n.shiftRgb)(t,this._offset,this._modelStartOffset))}var i=Object(n.parseRgba)(e);return Object(n.rgbaToString)(Object(n.shiftRgba)(i,this._offset,this._modelStartOffset))},e}();var u=function(){function e(e){this._chartModel=e}return e.prototype.getColorRotator=function(e){var t=Object(s.studyColorRotationMode)(e),i=this._calcDefaultColorsOffset(e);switch(t){case"loop":return new l(i);case"shift":var n=this._chartModel.getStudyShiftColorStartOffset();return new c(i,n)}},e.prototype._calcDefaultColorsOffset=function(e){var t=0;return this._chartModel.dataSources().filter(s.isStudy).forEach((function(i){var n,r,o=i.metaInfo().id===e.id,s=(n=i.metaInfo(),r=e,(n.pine?n.pine.version:void 0)===(r.pine?r.pine.version:void 0));o&&s&&t++})),t},e}()},i80N:function(e,t,i){"use strict";var n=i("Ss5c").LineDataSource,r=i("Ocx9").DefaultProperty,o=window.t("Fib Spiral");function s(e,t){var r=t||s.createProperties();n.call(this,e,r),i.e("lt-pane-views").then(function(e){var t=i("8MBc").FibSpiralPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}inherit(s,n),s.prototype.pointsCount=function(){return 2},s.prototype.translatedType=function(){return o},s.prototype.name=function(){return"Fib Spiral"},s.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("nBUU").FibSpiralDefinitionsViewModel}.bind(null,i)).catch(i.oe)},s.createProperties=function(e){var t=new r("linetoolfibspiral",e);return s._configureProperties(t),t},s._configureProperties=function(e){n._configureProperties(e)},t.LineToolFibSpiral=s},iDOr:function(e,t,i){"use strict";(function(e){var n=i("Eyy1").assert,r=i("Y7w9").moveToHead,o=i("704P").ExecutionsPositionController,s=i("Ss5c").LineDataSource,a=i("Qb4w").PriceRange,l=i("7ktv").PriceDataSource,c=i("txPx").getLogger("Chart.Pane"),u=i("CW80").isLineTool,h=i("s1Gx").isSpeciallyZOrderedSource,d=i("1Wlv").PriceScale,p=i("FaJS").scaleRatio,_=i("FaJS").priceRangeByScaleRatio,f=i("FaJS").barSpacingByScaleRatio,m=i("MWAT").createPriceScaleSelectionStrategy,v=i("yfAl").PaneBase,y=i("s1Gx").sortSources;function g(t,i,n){v.call(this,t,i,n),this.m_timeScale=t,this._rightPriceScales=[],this._leftPriceScales=[],this.m_height=0,this.m_width=0,this.m_mainDataSource=null,this._properties=i,this._model=n,this._destroyed=new e,this._priceScaleRatioChanged=new e,this._priceScaleRatioChanged.subscribe(this,this._mainSeriesPaneScaleRatioOnChange),n.properties().priceScaleSelectionStrategyName.listeners().subscribe(null,function(e){this._priceScaleSelectionStrategy=m(e.value()),this._priceScaleSelectionStrategy.apply(this)}.bind(this)),this.m_timeScale.barSpacingChanged().subscribe(this,function(){this.m_mainDataSource===this._model.mainSeries()&&this._recalculatePriceScaleByScaleRatio(this.m_mainDataSource.priceScale())}.bind(this)),this._lockedPriceScale=null,this._currentPriceScaleRatio=null, +i.topMargin.listeners().subscribe(this,g.prototype._updateMargins),i.bottomMargin.listeners().subscribe(this,g.prototype._updateMargins),this._updateMargins(),this._isInInsertManyDataSourcesState=!1,this._lastLineDataSourceZOrder=null,this._maximized=!1,this._isMainPane=!1,this._onPriceScalesChanged=new e}inherit(g,v),g.DEFAULT_STRETCH_FACTOR=1e3,g.PANE_ANIMATION_DURATION=500,g.prototype.destroy=function(){this._properties.topMargin.listeners().unsubscribe(this,g.prototype._updateMargins),this._properties.bottomMargin.listeners().unsubscribe(this,g.prototype._updateMargins),this._model.properties().priceScaleSelectionStrategyName.listeners().unsubscribeAll(this),this.m_timeScale.barSpacingChanged().unsubscribeAll(this),this._leftPriceScales.concat(this._rightPriceScales).forEach((function(e){e.modeChanged().unsubscribeAll(this),e.priceRangeChanged().unsubscribeAll(this),e.internalHeightChanged().unsubscribeAll(this)}),this),this._priceScaleRatioChanged.unsubscribeAll(this);for(var e=0;ee.left){var t=r(this._leftPriceScales,this.mainDataSource().priceScale());return t.splice(e.left),t}return this._leftPriceScales}, +g.prototype.visibleRightPriceScales=function(){var e=this._model.priceScaleSlotsCount();if(this._rightPriceScales.length>e.right){var t=r(this._rightPriceScales,this.mainDataSource().priceScale());return t.splice(e.right),t}return this._rightPriceScales},g.prototype.timeScale=function(){return this.m_timeScale},g.prototype.dataSources=function(){return this.m_dataSources},g.prototype.isOverlay=function(e){var t=e.priceScale();return"overlay"===this.priceScalePosition(t)},g.prototype._processMainSourceChange=function(){var e;if(null===this.m_mainDataSource)for(var t=0;te)&&(e=n)}}return null===e&&(e=this.getZOrderMinMax().minZOrder-1),this.m_dataSources.forEach((function(t){t.zorder()>e&&t.setZorder(t.zorder()+1)})),e+1},g.prototype.beginInsertManyLineDataSources=function(){this._isInInsertManyDataSourcesState=!0,this._lastLineDataSourceZOrder=null},g.prototype.endInsertManyLineDataSources=function(){this._isInInsertManyDataSourcesState=!1,this._lastLineDataSourceZOrder=null},g.prototype.addDataSource=function(e,t,i){var n;u(e)&&!i?(n=null!==this._lastLineDataSourceZOrder?this._lastLineDataSourceZOrder:this._newZOrderForLineTool(),this._isInInsertManyDataSourcesState&&(this._lastLineDataSourceZOrder=n)):n=this.getZOrderMinMax().minZOrder-1,this.insertDataSource(e,t,n)},g.prototype.insertDataSource=function(e,t,i){t||(t=this.findSuitableScale(e)),this._addSourceToCollections(e);var n=!1;(e===this._model.mainSeries()||null===this.m_mainDataSource)&&(this.m_mainDataSource=e,n=!0),t.addDataSource(e,this._isInInsertManyDataSourcesState),e.setPriceScale(t),e.onTagsChanged&&e.onTagsChanged().subscribe(this,g.prototype.onSourceTagsChanged),e.setZorder(i),n&&this._processMainSourceChange(),this._tagsChanged.fire(),TradingView.isInherited(e.constructor,l)&&this.recalculatePriceScale(t),this._invalidateSourcesCache()},g.prototype.priceScalePosition=function(e){return this._leftPriceScales.includes(e)?"left":this._rightPriceScales.includes(e)?"right":"overlay"},g.prototype.createPriceScaleAtPosition=function(e,t){ +var i=this._properties.axisProperties.state();i.autoScale=!0;var n=new d(this._model.properties().scalesProperties,i);return n.setHeight(this.height()),n.setTopMargin(this._defaultTopMargin()),n.setBottomMargin(this._defaultBottomMargin()),this._placePriceScale(n,e,t),n},g.prototype._placePriceScale=function(e,t,i){if("overlay"!==t){var r="left"===t?this._leftPriceScales:this._rightPriceScales,o=void 0===i?r.length:i;r.splice(o,0,e),e.modeChanged().subscribe(this,this._onPriceScaleModeChanged.bind(this,e)),e.internalHeightChanged().subscribe(this,this._recalculatePriceScaleByScaleRatio.bind(this,e)),e.priceRangeChanged().subscribe(this,this._recalculateTimeScaleByScaleRatio.bind(this,e)),e.priceRangeChanged().subscribe(this,this._onPriceScaleSetMinMaxPriceRange.bind(this,e)),e.isLockScale()&&(n(null===this._lockedPriceScale),this._lockedPriceScale=e,this._currentPriceScaleRatio=null),this._onPriceScalesChanged.fire()}},g.prototype.removePriceScale=function(e){e.modeChanged().unsubscribeAll(this),e.priceRangeChanged().unsubscribeAll(this),e.internalHeightChanged().unsubscribeAll(this),e===this._lockedPriceScale&&(this._lockedPriceScale=null,this._currentPriceScaleRatio=null);var t=this._leftPriceScales.indexOf(e);-1!==t&&this._leftPriceScales.splice(t,1);var i=this._rightPriceScales.indexOf(e);-1!==i&&this._rightPriceScales.splice(i,1),this._onPriceScalesChanged.fire()},g.prototype.removeDataSource=function(e,t,i){var n=this.m_dataSources.indexOf(e);if(-1!==n){0,this._removeSourceFromCollections(n,i),e!==this.m_mainDataSource||t||(this.m_mainDataSource=null);var r=e.priceScale();if(r&&r.dataSources().indexOf(e)>=0&&r.removeDataSource(e),r&&null===r.mainSource()){var o=r.dataSources().length;0!==o&&c.logError("Invalid priceScale state: empty mainSource but non-empty data sources="+o),this.removePriceScale(r)}e.onTagsChanged&&e.onTagsChanged().unsubscribe(this,g.prototype.onSourceTagsChanged),e instanceof l&&!t&&this._processMainSourceChange(),this._tagsChanged.fire(),r&&e instanceof l&&this.recalculatePriceScale(r),this._invalidateSourcesCache()}else c.logDebug("removeDataSource: invalid data source")},g.prototype.startScalePrice=function(e,t){e.startScale(t)},g.prototype.scalePriceTo=function(e,t){e.scaleTo(t),this.updateAllViews()},g.prototype.endScalePrice=function(e){e.endScale()},g.prototype.startScrollPrice=function(e,t){e.startScroll(t)},g.prototype.scrollPriceTo=function(e,t){e.scrollTo(t),this.updateAllViews()},g.prototype.endScrollPrice=function(e){e.endScroll()},g.prototype.setPriceAutoScale=function(e,t){e.setMode({autoScale:t}),this.timeScale().isEmpty()?e.setPriceRange(null):this.recalculatePriceScale(e)},g.prototype.restorePriceScaleState=function(e,t){e.restoreState(t),this.updateAllViews()},g.prototype._updateCustomSourceAllViews=function(e){e.paneViews(this).length>0&&e.updateAllViews()},g.prototype.updateAllViews=function(){for(var e=0;e0&&!this.timeScale().isEmpty()){var i=this.timeScale().visibleBarsStrictRange();e.recalculatePriceRange(i)}e.updatePaneViews()}},g.prototype.resetPriceScale=function(e){var t=this.timeScale().visibleBarsStrictRange();e.isLockScale()||e.setMode({autoScale:!0}),e.recalculatePriceRange(t),this.updateAllViews()},g.prototype.recalculate=function(){this.recalculatePriceScale(this.m_rightPriceScale),this.recalculatePriceScale(this.m_leftPriceScale);for(var e=0;ei&&(i=r.zorder())}return{minZOrder:t,maxZOrder:i}},g.prototype.isZOrderAvailable=function(e){for(var t=0;t0&&t<0){var s=i[n-1].zorder(),a=e.zorder();i[n-1].setZorder(a),e.setZorder(s)}else if(n0){var l=i[n+1].zorder();a=e.zorder();i[n+1].setZorder(a),e.setZorder(l)}this._invalidateSourcesCache(),this._dataSourcesCollectionChanged.fire()},g.prototype.onSourceTagsChanged=function(){this._tagsChanged.fire()},g.prototype.onDestroyed=function(){return this._destroyed},g.prototype.clearSeries=function(e){for(var t=this.m_dataSources.length-1;t>=0;t--)TradingView.isInherited(this.m_dataSources[t].constructor,TradingView.Series)&&this._removeSourceFromCollections(t,e)},g.prototype.nonOverlayPricesSourcesCount=function(){return this.m_dataSources.filter((function(e){return(!e.properties().linkedToSeries||!e.properties().linkedToSeries.value())&&(TradingView.isInherited(e.constructor,l)&&e.showInObjectTree()&&!this.isOverlay(e))}),this).length},g.prototype.canHaveMoreNoScaleSources=function(){return this.nonOverlayPricesSourcesCount()>1},g.prototype.actionNoScaleIsEnabled=function(e){return!(!this.isOverlay(e)&&TradingView.isInherited(e.constructor,l))||this.canHaveMoreNoScaleSources()},g.prototype.executionsPositionController=function(){return this._executionsPositionController||(this._executionsPositionController=new o(this,this._model.timeScale())),this._executionsPositionController},g.prototype.isLast=function(){var e=this._model.panes();return e[e.length-1]===this},g.prototype.setMaximized=function(e){this._maximized=e},g.prototype.isMaximized=function(){return this._maximized},g.prototype.isMainPane=function(){var e=this._model.mainSeries(),t=!1;return this.m_dataSources.forEach((function(i){t||(t=i===e)})),this._isMainPane=t,t},g.prototype.properties=function(){return this._properties},g.prototype._mainSourceVisiblePriceRange=function(e){var t=this.m_timeScale.visibleBarsStrictRange();return null!==t?e.mainSource().priceRange(t.firstBar(),t.lastBar()):new a(-.5,.5)},g.prototype.priceScaleRatio=function(){return this._currentPriceScaleRatio},g.prototype.applyPriceScaleRatio=function(e,t){ +null!==this._lockedPriceScale&&this._lockedPriceScale!==e||this._currentPriceScaleRatio===t||!this.isMainPane()||null===this._lockedPriceScale&&e!==this.mainDataSource().priceScale()||(this._setNewPriceRangeByScaleRatio(e,t,this._mainSourceVisiblePriceRange(e),!0,!0),null!==this._lockedPriceScale?this._tryToApplyNewPriceScaleRatio():e.isLog()||this._model.mainSeriesScaleRatioPropertyOnChanged())},g.prototype._mainSeriesPaneScaleRatioOnChange=function(){this.isMainPane()&&this._model.mainSeriesScaleRatioPropertyOnChanged()},g.prototype._applyOldScaleRatioToPriceScale=function(){if(this._isRecalculatingScales||null===this._currentPriceScaleRatio)return!1;this._isRecalculatingScales=!0,this._setNewPriceRangeByScaleRatio(this._lockedPriceScale,this._currentPriceScaleRatio,this._mainSourceVisiblePriceRange(this._lockedPriceScale)),this._isRecalculatingScales=!1},g.prototype._applyOldScaleRatioToTimeScale=function(){if(this._isRecalculatingScales||null===this._currentPriceScaleRatio)return!1;this._isRecalculatingScales=!0,this._setNewBarSpacingByScaleRatio(),this._isRecalculatingScales=!1},g.prototype._tryToApplyNewPriceScaleRatio=function(){var e=p(this.m_timeScale,this._lockedPriceScale);this._currentPriceScaleRatio===e||this._lockedPriceScale.isLog()||(this._priceScaleRatioChanged.fire(this._currentPriceScaleRatio,e),this._currentPriceScaleRatio=e)},g.prototype._recalculatePriceScaleByScaleRatio=function(e){this.isMainPane()&&e===this._lockedPriceScale&&(null!==this._currentPriceScaleRatio?this._applyOldScaleRatioToPriceScale():this._tryToApplyNewPriceScaleRatio())},g.prototype._recalculateTimeScaleByScaleRatio=function(e){e===this._lockedPriceScale&&(null!==this._currentPriceScaleRatio?this._applyOldScaleRatioToTimeScale():this._tryToApplyNewPriceScaleRatio())},g.prototype._setNewPriceRangeByScaleRatio=function(e,t,i,n,r){var o=_(e,this.m_timeScale.barSpacing(),t);e.setPriceRange(null!==o?o:i,n,r)},g.prototype._setMinMaxPriceRange=function(){var e=_(this._lockedPriceScale,this.m_timeScale.maxBarSpacing(),this._currentPriceScaleRatio),t=_(this._lockedPriceScale,this.m_timeScale.minBarSpacing(),this._currentPriceScaleRatio);null!==e&&this._lockedPriceScale.setMaxPriceRange(e),null!==t&&this._lockedPriceScale.setMinPriceRange(t)},g.prototype._onPriceScaleSetMinMaxPriceRange=function(e){e===this._lockedPriceScale&&this._setMinMaxPriceRange()},g.prototype._setNewBarSpacingByScaleRatio=function(){var e=this.m_timeScale.getValidBarSpacing(f(this._lockedPriceScale,this._currentPriceScaleRatio));this.m_timeScale.isValidBarSpacing(e)&&this.m_timeScale.setBarSpacing(e)},g.prototype._onPriceScaleModeChanged=function(e,t,i){if(i.lockScale&&(this._lockedPriceScale!==e&&null!==this._lockedPriceScale&&this._lockedPriceScale.setMode({lockScale:!1}),this._lockedPriceScale=e,this._currentPriceScaleRatio=p(this.m_timeScale,e)),t.lockScale&&!i.lockScale&&(this._lockedPriceScale=null,this._currentPriceScaleRatio=null),t.percentage!==i.percentage||t.indexedTo100!==i.indexedTo100){var n=this.timeScale().visibleBarsStrictRange() +;null!==n&&(e.recalculatePriceRange(n),e.updatePaneViews())}},g.prototype.lineToolsForArea=function(e){var t=this.m_height,i=this.m_width,n=this.logicalRectToPixels(e);return this.m_dataSources.filter((function(e){return u(e)})).filter((function(e){return(e.paneViews()||[]).some((function(e){var r=e.renderer(t,i,!0);return r&&r.doesIntersectWithBox&&r.doesIntersectWithBox(n)}))}))},g.prototype.getPriceScaleById=function(e){var t=this.m_dataSources.find((function(t){return null!==t.priceScale()&&t.priceScale().id()===e}));return void 0===t?null:t.priceScale()},g.prototype.setPriceScaleSelectionStrategy=function(e){this._priceScaleSelectionStrategy=e,e.apply(this)},g.prototype.movePriceScale=function(e,t,i){var n=this.priceScalePosition(e);if(n!==t)this.removePriceScale(e),this._placePriceScale(e,t,i),this._invalidateSourcesCache();else if(void 0!==i&&"overlay"!==n){var r="left"===n?this._leftPriceScales:this._rightPriceScales,o=r.indexOf(e);r.splice(o,1),r.splice(i,0,e)}},g.prototype.onPriceScalesChanged=function(){return this._onPriceScalesChanged},g.prototype.priceScaleIndex=function(e,t){switch(t){case"left":return this.leftPriceScales().indexOf(e);case"right":return this.rightPriceScales().indexOf(e)}},g.prototype.realignLineTools=function(){for(var e=0;e0&&(u=2*Math.PI-u),0===e&&(u+=Math.PI),this._properties.angle.setValue(u)}else{var h=this._startChangeWidth,d=o.subtract(r).length();if(this._origScale*h0)},t.fixComputationError=n,t.alignTo=function(e,t){var i=e/t,r=Math.floor(i),o=i-r;return o>2e-10?n(o>.5?(r+1)*t:r*t):e}},jA0t:function(e,t,i){"use strict";var n=function(){var e={};function t(e){return e.is_price_study}function i(e,t){var i=t.slice(0).toLowerCase();if(e){for(var n=0;nt){if((r=o-1)0&&e-t[n-1]<=r)return r;return 0},r.prototype.is_valid=function(){return!this._invalid},r._offset=function(e,t,i){var n=o(e,i);return-1===n?0:t[n]};var s=function(e){return 0|e},a=function(e){return 60*e*1e3};function l(e){return e%4==0&&(e%100!=0||e%400==0)}var c={0:0,1:31,2:59,3:90,4:120,5:151,6:181,7:212,8:243,9:273,10:304,11:334},u={SUNDAY:1,MONDAY:2,TUESDAY:3,WEDNESDAY:4,THURSDAY:5,FRIDAY:6,SATURDAY:7,JANUARY:0,FEBRUARY:1,MARCH:2,APRIL:3,MAY:4,JUNE:5,JULY:6,AUGUST:7,SEPTEMBER:8,OCTOBER:9,NOVEMBER:10,DECEMBER:11,YEAR:1,MONTH:2,WEEK_OF_YEAR:3,DAY_OF_MONTH:5,DAY_OF_YEAR:6,DAY_OF_WEEK:7,HOUR_OF_DAY:11,MINUTE:12,SECOND:13,minutesPerDay:1440,secondsPerDay:a(1440),get_minutes_from_hhmm:function(e){return-1!==e.indexOf(":")&&(e=e.split(":").join("")),e%100+60*s(e/100)},get_year:function(e){return e.getUTCFullYear()},get_month:function(e){return e.getUTCMonth()},get_hours:function(e){return e.getUTCHours()},get_minutes:function(e){return e.getUTCMinutes()},get_seconds:function(e){return e.getUTCSeconds()},get_day_of_month:function(e){return e.getUTCDate()},get_day_of_week:function(e){return e.getUTCDay()+1},get_day_of_year:function(e){var t=e.getUTCMonth(),i=c[t];return t>u.JANUARY+1&&l(e.getUTCFullYear())&&(i+=1),i+e.getUTCDate()},get_week_of_year:function(e){var t=new Date(Date.UTC(e.getUTCFullYear(),0,1)).getUTCDay(),i=0===t?1:8-t,n=u.get_day_of_year(e)-i;return Math.ceil(n/7)+1},get_minutes_from_midnight:function(e){return 60*u.get_hours(e)+u.get_minutes(e)},set_hms:function(e,t,i,n,r,o){e.setUTCHours(t),e.setUTCMinutes(i),e.setUTCSeconds(n),e.setUTCMilliseconds(r),u.correct_time(e,o)},correct_time:function(e,t){var i=e.getTime(),n=t.correction_loc(i);e.setTime(i+n)},add_days_considering_dst:function(e,t,i){var n=e.offset_utc(t),r=this.clone(t);this.add_date(r,i);var o=e.offset_utc(r);return r.setTime(r.getTime()+n-o),r},add_date:function(e,t){e.setTime(e.getTime()+t*u.secondsPerDay)},add_minutes:function(e,t){e.setTime(e.getTime()+a(t))},clone:function(e){return new Date(e.getTime())},get_days_per_year:function(e){var t=e.getUTCFullYear();return this.days_per_year(t)},days_per_year:function(e){return l(e)?366:365},get_part:function(e,t){switch(t){case u.YEAR:return u.get_year(e);case u.MONTH:return u.get_month(e);case u.DAY_OF_MONTH:return u.get_day_of_month(e);case u.WEEK_OF_YEAR:return u.get_week_of_year(e);case u.DAY_OF_WEEK:return u.get_day_of_week(e);case u.HOUR_OF_DAY:return u.get_hours(e);case u.MINUTE:return u.get_minutes(e);case u.DAY_OF_YEAR:return u.get_day_of_year(e);case u.SECOND:return u.get_seconds(e);default:return e.getTime()}},time_minutes:a,time_seconds:function(e){return 1e3*e},time_minutes_diff:function(e,t){return s((s(e/1e3)-s(t/1e3))/60)},time_seconds_diff:function(e,t){return s(s(e/1e3)-s(t/1e3))},utc_to_cal:function(e,t){var i=e.offset_utc(t);return new Date(t+i)},get_cal:function(e,t,i,n,r,o,s){var a=new Date(Date.UTC(t,i,n,r||0,o||0,s||0)),l=e.offset_utc(+a) +;return new Date(a.valueOf()-l)},get_cal_from_unix_timestamp_ms:function(e,t){return new Date(t+e.offset_utc(t))},get_cal_utc:function(e,t,i){return new Date(Date.UTC(e,t,i))},cal_to_utc:function(e,t){var i=t.getTime();return i-e.offset_loc(i)},get_timezone:function(e){return new r(e)},shift_day:function(e,t){var i=e-1;return(i+=t)>6?i%=7:i<0&&(i=(7+i%7)%7),i+1}};e.exports=u},jFln:function(e,t,i){"use strict";var n=i("Hr11"),r=n.greaterThan,o=n.lessThan,s=window.CanvasEx=i("8Uy/");s.computeDashPattern=function(e){return[[e.lineWidth,2*e.lineWidth],[5*e.lineWidth,6*e.lineWidth],[6*e.lineWidth,6*e.lineWidth],[e.lineWidth,4*e.lineWidth],[2*e.lineWidth,e.lineWidth]][e.lineStyle-1]},s.drawLine=function(e,t,i,n,r){isFinite(t)&&isFinite(n)&&isFinite(i)&&isFinite(r)&&(e.lineStyle!==s.LINESTYLE_SOLID?s.drawDashedLine(e,t,i,n,r):s.drawSolidLine(e,t,i,n,r))},s.drawArrow=function(e,t,i,n,r,o){if(o=void 0===o?2:o,isFinite(t)&&isFinite(n)&&isFinite(i)&&isFinite(r)){var s=Math.round(o/2);e.beginPath(),e.moveTo(n,r),e.lineTo(t,i),e.moveTo(t+o,i+o),e.lineTo(t-o,i+o),e.moveTo(t-s,i+s),e.lineTo(t+s,i+s),e.stroke()}},s.drawSolidLine=function(e,t,i,n,r){e.beginPath(),e.moveTo(t,i),e.lineTo(n,r),e.stroke()},s.setLineStyle=function(e,t){e.lineStyle=t;var i=[];t!==s.LINESTYLE_SOLID&&(i=s.computeDashPattern(e)),s.setLineDash(e,i)},s.setLineDash=function(e,t){"function"==typeof e.setLineDash?e.setLineDash(t):void 0!==e.mozDash?e.mozDash=t:void 0!==e.webkitLineDash&&(e.webkitLineDash=t)},s.drawPoly=function(e,t,i){e.beginPath(),e.moveTo(t[0].x,t[0].y);for(var n=0;n0&&(c.thereYet=o,c.cap=Math.max),t-n>0&&(l.thereYet=o,l.cap=Math.max),e.moveTo(t,i);for(var u=t,h=i,d=0,p=!0;!l.thereYet(u,n)||!c.thereYet(h,s);){var _=Math.atan2(s-i,n-t),f=a[d];u=l.cap(n,u+Math.cos(_)*f),h=c.cap(s,h+Math.sin(_)*f),p?e.lineTo(u,h):e.moveTo(u,h), +d=(d+1)%a.length,p=!p}},s.setFont=function(e,t){if(e.font!==t)try{e.font=t}catch(i){}},"undefined"!=typeof CanvasRenderingContext2D&&(CanvasRenderingContext2D.prototype.setFont=function(e){s.setFont(this,e)},CanvasRenderingContext2D.prototype.lineStyle=s.LINESTYLE_SOLID),e.exports=s},jJ9X:function(e,t,i){},jRfx:function(e,t,i){"use strict";i.d(t,"c",(function(){return s})),i.d(t,"a",(function(){return a})),i.d(t,"b",(function(){return l}));var n=i("mrSG"),r=i("Eyy1"),o=function(e){function t(t,i,n){var r=e.call(this,t,i,n)||this;return r._restorePane=!1,r}return Object(n.__extends)(t,e),t.prototype.redo=function(){var e=this,t=this._chartModel.panes().length,i=this._chartModel.panes()[this._targetPaneIndex()],n=Object(r.ensureNotNull)(this._chartModel.dataSourceForId(this._sourceId)),o=this._chartModel.children(n,!0);o.forEach((function(t){return e._chartModel.detachSource(t)})),this._restorePane=this._chartModel.detachSource(n);var s=i.findSuitableScale(n);if(i.addDataSource(n,s,!1),o.forEach((function(e){return i.addDataSource(e,s,!1)})),n===this._chartModel.mainSeries()){var a=i.priceScalePosition(s);i.movePriceScale(s,a,0)}this._chartModel.fullUpdate(),t!==this._chartModel.panes().length&&this._chartModel.setShouldBeSavedEvenIfHidden(!0)},t.prototype.undo=function(){var e,t=this;e=this._restorePane?this._chartModel.createPane(this._initialPaneIndex):this._chartModel.panes()[this._initialPaneIndex];var i=Object(r.ensureNotNull)(this._chartModel.dataSourceForId(this._sourceId)),n=this._chartModel.children(i,!0);n.forEach((function(e){return t._chartModel.detachSource(e)})),this._chartModel.detachSource(i);var o=e.getPriceScaleById(this._initialPriceScaleId);null===o&&(o=e.createPriceScaleAtPosition(this._initialPriceScalePosition,this._initialPriceScaleIndex)),e.addDataSource(i,o,!0),n.forEach((function(t){return e.addDataSource(t,o,!1)})),this._chartModel.fullUpdate()},t}(i("3u3j").a),s=function(e){function t(t,i,n){return e.call(this,t,i,n)||this}return Object(n.__extends)(t,e),t.prototype._targetPaneIndex=function(){return this._initialPaneIndex-1},t}(o),a=function(e){function t(t,i,n){return e.call(this,t,i,n)||this}return Object(n.__extends)(t,e),t.prototype._targetPaneIndex=function(){return this._initialPaneIndex+1},t}(o),l=function(e){function t(t,i,n,r){var o=e.call(this,t,i,r)||this;return o._targetPane=n,o}return Object(n.__extends)(t,e),t.prototype._targetPaneIndex=function(){return this._targetPane},t}(o)},jTis:function(e,t,i){"use strict";var n;i.r(t),i.d(t,"CalloutConsts",(function(){return n})),function(e){e[e.RoundRadius=8]="RoundRadius",e[e.TextMargins=2]="TextMargins",e[e.MinWidth=100]="MinWidth"}(n||(n={}))},jeZR:function(e,t,i){"use strict";i.r(t),i.d(t,"AppliedTimeFrame",(function(){return r}));var n=i("QfUd"),r=function(){function e(e){this._appliedTimeFrame=new n.a(null),this._appliedTimeFrameInfo=null,this._model=e,e.mainSeries().dataEvents().messageReceived().subscribe(this,this._onSeriesMessageReceived)}return e.prototype.destroy=function(){ +this._model.timeScale().logicalRangeChanged().unsubscribeAll(this),this._model.mainSeries().dataEvents().messageReceived().unsubscribeAll(this)},e.prototype.appliedTimeFrame=function(){return this._appliedTimeFrame},e.prototype._onSeriesMessageReceived=function(e){if("series_timeframe"===e.method){var t=this._model.timeScale();t.logicalRangeChanged().unsubscribe(this,this._invalidateAppliedTimeFrame),(null==e.params[5]||e.params[5])&&(this._appliedTimeFrameInfo={logicalRange:t.logicalRange(),baseIndex:t.baseIndex()},t.logicalRangeChanged().subscribe(this,this._invalidateAppliedTimeFrame))}},e.prototype._invalidateAppliedTimeFrame=function(){if(null!==this._appliedTimeFrameInfo){var e=this._model.timeScale(),t=e.logicalRange(),i=e.baseIndex(),n=this._appliedTimeFrameInfo.logicalRange,r=this._appliedTimeFrameInfo.baseIndex;null!==t&&null!==n&&i-t.left()==r-n.left()&&i-t.right()==r-n.right()||(this._appliedTimeFrame.setValue(null),e.logicalRangeChanged().unsubscribe(this,this._invalidateAppliedTimeFrame))}},e}()},jenN:function(e,t,i){"use strict";i.r(t);var n=i("txPx"),r=i("7Fue"),o=i("xWfy"),s=i("qySK"),a=i("mrSG"),l=function(e){function t(t,i){var n=e.call(this)||this;return n._source=t,n._data=i,n}return Object(a.__extends)(t,e),t.prototype._updateRendererData=function(e,t,i){e.visible=!1;var n=this._source.priceScale(),r=this._source.properties().visible.value();if(n&&!n.isEmpty()&&r){var o=this._source.properties().graphics[this._data.lineType][this._data.styleId];if(o.visible&&o.visible.value()&&o.showPrice&&o.showPrice.value()){var s=this._source.firstValue();if(null!==s){var a=this._data.line.level,l=o.color.value();i.background=l,i.color=this.generateTextColor(l),i.coordinate=n.priceToCoordinate(a,s),e.text=n.formatPrice(a,s),e.visible=!0}}}},t}(i("KcY8").a);i.d(t,"createGraphicsPaneViews",(function(){return u})),i.d(t,"createGraphicsPriceAxisViews",(function(){return d})),i.d(t,"isStudyGraphicsEmpty",(function(){return r.a})),i.d(t,"StaticStudyGraphics",(function(){return o.a})),i.d(t,"emptyStudyGraphics",(function(){return o.b})),i.d(t,"loadStudyGraphics",(function(){return o.c})),i.d(t,"saveStudyGraphics",(function(){return o.d})),i.d(t,"LiveStudyGraphics",(function(){return s.a}));var c=Object(n.getLogger)("Chart.StudyGraphics");function u(e,t,n){return new Promise((function(r){i.e("study-pane-views").then(function(o){var s=Object.keys(e.graphicsInfo());s.sort((function(e,t){return h(e)-h(t)})),r(s.map((function(r){var o=i("psYU").VertLinePaneView,s={backgrounds:null,hhists:null,horizlines:i("1sos").HorizLinePaneView,hlines:null,lines:null,polygons:null,shapemarks:null,textmarks:null,trendchannels:null,vertlines:o,dwglabels:null,dwglines:null}[r];return null===s?(c.logWarn(r+" is not supported by this build of graphics subsystem, skipping"),null):new s(e,t,n)})).filter((function(e){return null!==e})))}.bind(null,i)).catch(void 0)}))}function h(e){switch(e){case"polygons":return-100;case"trendchannels":return-90;default:return 0}}function d(e){for(var t=Object.keys(e.graphicsInfo()),i=[],n=function(t){ +switch(t){case"hlines":e.graphics().hlines().forEach((function(n,r){n.forEach((function(n){void 0!==n.level&&i.push(new l(e,{line:{level:n.level},styleId:r,lineType:t}))}))}));break;case"horizlines":e.graphics().horizlines().forEach((function(n,r){n.forEach((function(n){void 0!==n.level&&i.push(new l(e,{line:{level:n.level},styleId:r,lineType:t}))}))}))}},r=0,o=t;r0&&t.setValue(a.family),i.setValue(a.size),n.setValue(a.bold),s.setValue(a.italic)):o.logError("Invalid font: "+e)},fontHeight:function(e){if(!this._fontHeightCache[e]){var t=document.createElement("span");t.appendChild(document.createTextNode("height")),document.body.appendChild(t),t.style.cssText="font: "+e+"; white-space: nowrap; display: inline;";var i=t.offsetHeight;document.body.removeChild(t),this._fontHeightCache[e]=Math.ceil(i)}return this._fontHeightCache[e]},drawPolyHoverOrPress:function(e,t,i,n){n?(e.save(),e.fillStyle="rgba(0, 0, 0, 0.15)",CanvasEx.drawPoly(e,t,!0),e.restore()):i&&(e.save(),e.fillStyle="rgba(0, 0, 0, 0.1)",CanvasEx.drawPoly(e,t,!0),e.restore())},repaint:function(e){e.lightUpdate()},roundToMinTick:function(e,t){var i=1/e.mainSource().base();return i*Math.round(t/i)}};e.exports=s},jofe:function(e,t,i){"use strict";function n(){var e,t;return{promise:new Promise((function(i,n){e=i,t=n})),reject:t,resolve:e}}i.r(t),i.d(t,"createDeferredPromise",(function(){return n}))},jpZi:function(e,t,i){"use strict";i.d(t,"a",(function(){return a}));var n=i("mrSG"),r=i("Eyy1"),o=(i("YFKU"),i("HbRj"),i("RDU5")),s=window.t("Exclude line tools from group {group}"),a=function(e){function t(t,i,n){var r=e.call(this,s.format({group:i.name()}))||this;return r._model=t,r._groupId=i.id,r._groupName=i.name(),r._lineToolsIds=n.map((function(e){return e.id()})),r}return Object(n.__extends)(t,e),t.prototype.redo=function(){var e=this,t=Object(r.ensureNotNull)(this._model.lineToolsGroupModel().groupForId(this._groupId)),i=this._lineToolsIds.map((function(t){return e._model.dataSourceForId(t)})) +;t.excludeLineTools(i),0===t.lineTools().length&&this._model.lineToolsGroupModel().removeGroup(t)},t.prototype.undo=function(){var e=this,t=this._lineToolsIds.map((function(t){return e._model.dataSourceForId(t)})),i=this._model.lineToolsGroupModel().groupForId(this._groupId);null!==i?i.addLineTools(t):this._model.lineToolsGroupModel().createGroup(t,this._groupName,this._groupId)},t}(o.UndoCommand)},jy4L:function(e,t,i){"use strict";i.r(t),i.d(t,"makeNextSymbolId",(function(){return r})),i.d(t,"makeNextStudyId",(function(){return s}));var n=0;function r(){return"ss_"+ ++n}var o=0;function s(){return"st"+ ++o}},k4w6:function(e,t,i){"use strict";i.d(t,"a",(function(){return r}));var n=i("mrSG"),r=function(e){function t(t){var i=e.call(this)||this;return i._series=t,i._model=t.model(),i}return Object(n.__extends)(t,e),t}(i("2ijp").a)},"k9/m":function(e,t,i){"use strict";i.r(t),i.d(t,"PlotRowSearchMode",(function(){return n})),i.d(t,"PlotList",(function(){return c})),i.d(t,"mergeMinMax",(function(){return u})),i.d(t,"mergePlotRows",(function(){return h}));var n,r=i("Eyy1"),o=i("Y7w9"),s=i("tqok"),a=i("txPx"),l=Object(a.getLogger)("Chart.PlotList");!function(e){e[e.NearestLeft=-1]="NearestLeft",e[e.Exact=0]="Exact",e[e.NearestRight=1]="NearestRight"}(n||(n={}));var c=function(){function e(e,t){void 0===e&&(e=null),void 0===t&&(t=null),this._items=[],this._start=0,this._end=0,this._shareRead=!1,this._minMaxCache=new Map,this._rowSearchCache=new Map,this._rowSearchCacheWithoutEmptyValues=new Map,this._plotFunctions=e||new Map,this._emptyValuePredicate=t}return e.prototype.clear=function(){this._items=[],this._start=0,this._end=0,this._shareRead=!1,this._minMaxCache.clear(),this._rowSearchCache.clear(),this._rowSearchCacheWithoutEmptyValues.clear()},e.prototype.first=function(){return this.size()>0?this._items[this._start]:null},e.prototype.last=function(){return this.size()>0?this._items[this._end-1]:null},e.prototype.firstIndex=function(){return this.size()>0?this._indexAt(this._start):null},e.prototype.lastIndex=function(){return this.size()>0?this._indexAt(this._end-1):null},e.prototype.size=function(){return this._end-this._start},e.prototype.isEmpty=function(){return 0===this.size()},e.prototype.contains=function(e){return null!==this._search(e,n.Exact)},e.prototype.valueAt=function(e){var t=this.search(e);return null!==t?t.value:null},e.prototype.add=function(e,t){if(this._shareRead)return l.logDebug("add: readonly collection modification attempt"),!1;var i={index:e,value:t},r=this._search(e,n.Exact);return this._rowSearchCache.clear(),this._rowSearchCacheWithoutEmptyValues.clear(),null===r?(this._items.splice(this._lowerbound(e),0,i),this._start=0,this._end=this._items.length,!0):(this._items[r]=i,!1)},e.prototype.search=function(e,t,i){void 0===t&&(t=n.Exact);var r=void 0!==i?this._rowSearchCacheWithoutEmptyValues:this._rowSearchCache,o=void 0!==i?1e4*(t+1)+i:t,s=r.get(e);if(void 0!==s){var a=s.get(o);if(void 0!==a)return a}var l=this._search(e,t,i);if(null===l)return null;var c={index:this._indexAt(l), +value:this._valueAt(l)};return void 0===s&&(s=new Map,r.set(e,s)),s.set(o,c),c},e.prototype.fold=function(e,t){for(var i=t,n=this._start;n=i;--n){var r=this._indexAt(n),o=this._valueAt(n);if(e(r,o))return{index:r,value:o}}return null},e.prototype.each=function(e){for(var t=this._start;tthis._items[this._items.length-1].index?this._append(e):1===e.length&&e[0].index===this._items[this._items.length-1].index?(this._updateLast(e[0]),e[0]):this._merge(e)},e.prototype.addTail=function(e,t){void 0===t&&(t=!1);var i=0;t&&this._end-this._start>0&&(i=1,this._items[this._end-this._start-1].value=e[0].value);for(var n=i;n0?i[0]:null},e.prototype.state=function(){return{start:this._start,end:this._end,data:this._items,shareread:this._shareRead}},e.prototype.restoreState=function(e){e?(this._start=e.start,this._end=e.end,this._shareRead=e.shareread,this._items=e.data,this._minMaxCache.clear(),this._rowSearchCache.clear(),this._rowSearchCacheWithoutEmptyValues.clear()):this.clear()},e.prototype._indexAt=function(e){return this._items[e].index},e.prototype._valueAt=function(e){return this._items[e].value},e.prototype._length=function(){return this._items.length},e.prototype._search=function(e,t,i){var r=this._bsearch(e);if(null===r&&t!==n.Exact)switch(t){case n.NearestLeft:return this._searchNearestLeft(e,i);case n.NearestRight:return this._searchNearestRight(e,i);default:throw new TypeError("Unknown search mode")}if(void 0===i||null===r||t===n.Exact)return r;switch(t){case n.NearestLeft:return this._nonEmptyNearestLeft(r,i);case n.NearestRight:return this._nonEmptyNearestRight(r,i);default:throw new TypeError("Unknown search mode")}},e.prototype._nonEmptyNearestRight=function(e,t){for(var i=Object(r.ensure)(this._emptyValuePredicate),n=Object(r.ensure)(t);e=this._start&&i(this._valueAt(e),n);)e-=1;return ethis._start&&(i-=1);var n=i!==this._end&&this._indexAt(i)e}),this._start,this._end)},e.prototype._plotMinMax=function(e,t,i){var n=null,r=this._plotFunctions.get(i);if(void 0===r)throw new Error('Plot "'+i+'" is not registered');for(var o=e;on.max&&(n.max=s)))}return n},e.prototype._invalidateCacheForRow=function(e){var t=Math.floor(e.index/30);this._minMaxCache.forEach((function(e){return e.delete(t)}))},e.prototype._prepend=function(e){return Object(r.assert)(!this._shareRead,"collection should not be readonly"),Object(r.assert)(0!==e.length,"plotRows should not be empty"),this._rowSearchCache.clear(), +this._rowSearchCacheWithoutEmptyValues.clear(),this._minMaxCache.clear(),this._items=e.concat(this._items),this._start=0,this._end=this._items.length,e[0]},e.prototype._append=function(e){return Object(r.assert)(!this._shareRead,"collection should not be readonly"),Object(r.assert)(0!==e.length,"plotRows should not be empty"),this._rowSearchCache.clear(),this._rowSearchCacheWithoutEmptyValues.clear(),this._minMaxCache.clear(),this._items=this._items.concat(e),this._start=0,this._end=this._items.length,e[0]},e.prototype._updateLast=function(e){Object(r.assert)(!this.isEmpty(),"plot list should not be empty");var t=this._items[this._end-1];Object(r.assert)(t.index===e.index,"last row index should match new row index"),this._invalidateCacheForRow(e),this._rowSearchCache.delete(e.index),this._rowSearchCacheWithoutEmptyValues.delete(e.index),this._items[this._end-1]=e},e.prototype._merge=function(e){return Object(r.assert)(0!==e.length,"plot rows should not be empty"),this._rowSearchCache.clear(),this._rowSearchCacheWithoutEmptyValues.clear(),this._minMaxCache.clear(),this._items=h(this._items,e),this._start=0,this._end=this._items.length,e[0]},e.prototype._minMaxOnRangeCachedImpl=function(e,t,i){if(this.isEmpty())return null;var n=null,o=Object(r.ensureNotNull)(this.firstIndex()),s=Object(r.ensureNotNull)(this.lastIndex()),a=Math.max(e,o),l=Math.min(t,s),c=30*Math.ceil(a/30),h=Math.max(c,30*Math.floor(l/30));n=u(n,this._minMaxOnRange(a,Math.min(c,t,l),i));var d=this._minMaxCache.get(i);void 0===d&&(d=new Map,this._minMaxCache.set(i,d));for(var p=Math.max(c+1,a);pt[s].index?s++:(o++,s++,r--);return r}(e,t),n=new Array(i),r=0,o=0,s=e.length,a=t.length,l=0;rt[o].index?(n[l]=t[o],o++):(n[l]=t[o],r++,o++),l++;for(;r16)throw new TypeError("invalid length");if(0===t)return e.toString();return("0000000000000000"+e.toString()).slice(-t)}function h(e){return"hasForexAdditionalPrecision"in e}var d=function(){function e(e,t,i,o){if(this.type="price",this._formatterErrors={custom:Object(n.t)("Price format is invalid."),fraction:Object(n.t)("Fraction part is invalid."),secondFraction:Object(n.t)("Second fraction part is invalid.")},t||(t=1),Object(r.isNumber)(e)&&Object(r.isInteger)(e)||(e=100),e<0)throw new TypeError("invalid base");this._priceScale=e,this._minMove=t,this._minMove2=o,i&&void 0!==o&&o>0&&2!==o&&4!==o&&8!==o?a.logDebug("invalid minmove2"):(this._fractional=i,this.calculateDecimal())}return e.prototype.isFractional=function(){return!!this._fractional},e.prototype.state=function(){return{fractional:this._fractional,fractionalLength:this._fractionalLength,minMove:this._minMove,minMove2:this._minMove2,priceScale:this._priceScale}},e.prototype.calculateDecimal=function(){if(this._fractionalLength=0,this._priceScale>0&&this._minMove>0){var e=this._priceScale;for(this._fractional&&this._minMove2&&(e/=this._minMove2);e>1;)e/=10,this._fractionalLength++}},e.prototype.format=function(e,t,i,n,r){void 0===n&&(n=!0),void 0===r&&(r=!0);var s,a="";return e<0?(a=!1===n?"":"−",e=-e):e&&!0===t&&(a="+"),s=this._fractional?a+this._formatAsFractional(e,i):a+this._formatAsDecimal(e,i),r?Object(o.forceLTRStr)(s):s},e.prototype.parse=function(e){return e=(e=Object(o.stripLTRMarks)(e)).replace("−","-"),this._fractional?this._minMove2?this._parseAsDoubleFractional(e):this._parseAsSingleFractional(e):this._parseAsDecimal(e)},e.prototype.hasForexAdditionalPrecision=function(){return!this._fractional&&10===this._minMove2},e.serialize=function(e){return e.state()},e.deserialize=function(t){ +return new e(t.priceScale,t.minMove,t.fractional,t.minMove2)},e.prototype._formatAsDecimal=function(e,t){var i;t=t||0;var n,r=1/(i=this._fractional?Math.pow(10,this._fractionalLength||0):Math.pow(10,t)*this._priceScale/this._minMove);if(i>1)n=Math.floor(e);else{var o=Math.floor(Math.round(e/r)*r);n=0===Math.round((e-o)/r)?o:o+r}var s="";if(i>1){var a=+(Math.round(e*i)-n*i).toFixed(this._fractionalLength);a>=i&&(a-=i,n+=1);var l=void 0!==this._fractionalLength?this._fractionalLength:NaN;s=c.decimalSign+u(+a.toFixed(this._fractionalLength)*this._minMove,l+t),s=this._removeEndingZeros(s,t)}return n.toString()+s},e.prototype._getFractPart=function(e,t){var i=[0,5],n=[0,2,5,7];return 2===t?void 0===i[e]?-1:i[e]:4===t?void 0===n[e]?-1:n[e]:e},e.prototype._formatAsFractional=function(e,t){var i=this._priceScale/this._minMove,n=Math.floor(e),r=t?Math.floor(e*i)-n*i:Math.round(e*i)-n*i;r===i&&(r=0,n+=1);var o="";if(t){var s=(e-n-r/i)*i;o=u(s=Math.round(s*Math.pow(10,t)),t),o=this._removeEndingZeros(o,t)}if(!this._fractionalLength)throw new Error("_fractionalLength is not calculated");var a="";if(this._minMove2){var l=r%this._minMove2,h=u(r=(r-l)/this._minMove2,this._fractionalLength),d=this._getFractPart(l,this._minMove2);a=h+c.decimalSignFractional+d}else a=u((r=this._getFractPart(r,this._priceScale))*this._minMove,this._fractionalLength);return n.toString()+c.decimalSignFractional+a+o},e.prototype._removeEndingZeros=function(e,t){for(var i=0;i=r||o<0)return{error:this._formatterErrors.fraction,res:!1};var s=n+o/r;return i&&(s=-s),{value:s,res:!0,suggest:this.format(s)}}return{error:this._formatterErrors.custom,res:!1}},e.prototype._parseAsDoubleFractional=function(e){var t=new RegExp(/^(-?)[0-9]+$/).exec(e);if(t)return{value:u=parseFloat(e),res:!0,suggest:this.format(u)};if(t=new RegExp("^(-?)([0-9]+)\\"+c.decimalSignFractional+"([0-9]+)\\"+c.decimalSignFractional+"([0-9]+)$").exec(e)){var i=!!t[1],n=parseInt(t[2]),r=void 0!==this._minMove2?this._minMove2:NaN,o=this._priceScale/r,s=this._minMove2,a=this._patchFractPart(parseInt(t[3]),o),l=this._patchFractPart(parseInt(t[4]),s);if(a>=o||a<0)return{error:this._formatterErrors.fraction,res:!1} +;if(void 0!==s&&l>=s||l<0)return{error:this._formatterErrors.secondFraction,res:!1};var u=void 0!==s?n+a/o+l/(o*s):NaN;return i&&(u=-u),{value:u,res:!0,suggest:this.format(u)}}return{error:this._formatterErrors.custom,res:!1}},e}()},l4sv:function(e,t,i){"use strict";i.r(t),i.d(t,"HorizontalLineRenderer",(function(){return s}));var n=i("VdBB"),r=i("jFln"),o=i("gAom"),s=function(){function e(){this._data=null,this._hitTest=new n.HitTestResult(n.HitTestResult.REGULAR)}return e.prototype.setData=function(e){this._data=e},e.prototype.setHitTest=function(e){this._hitTest=e},e.prototype.hitTest=function(e){if(null===this._data||!1===this._data.visible)return null;var t=Math.abs(e.y-this._data.y)<=3+this._data.linewidth/2,i=void 0===this._data.left||this._data.left-e.x<=3,n=void 0===this._data.right||e.x-this._data.right<=3;return t&&i&&n?this._hitTest:null},e.prototype.draw=function(e,t){if(null!==this._data&&!1!==this._data.visible&&!(this._data.y<-this._data.linewidth/2||this._data.y>t.cssHeight+this._data.linewidth/2)){var i=t.pixelRatio;e.lineCap="butt",e.strokeStyle=this._data.color,e.lineWidth=Math.max(1,Math.floor(this._data.linewidth*i)),void 0!==this._data.linestyle&&Object(r.setLineStyle)(e,this._data.linestyle);var n=void 0!==this._data.left?Math.max(this._data.left,0):0,s=void 0!==this._data.right?Math.min(this._data.right,t.cssWidth):t.cssWidth,a=Math.round(this._data.y*i),l=Math.floor(n*i),c=Math.ceil(s*i);Object(o.drawHorizontalLine)(e,a,l,c)}},e}()},l7mP:function(e,t,i){"use strict";function n(e,t,n){void 0===t&&(t={}),Promise.all([i.e("react"),i.e(3),i.e(23),i.e(37),i.e(41),i.e(61),i.e(80),i.e(51),i.e("take-chart-image-dialog-impl")]).then(function(r){i("fMMV").getImageOfChart(e,t,n)}.bind(null,i)).catch(void 0)}function r(e,t,n){void 0===t&&(t={}),Promise.all([i.e("react"),i.e(3),i.e(23),i.e(37),i.e(41),i.e(61),i.e(80),i.e(51),i.e("take-chart-image-dialog-impl")]).then(function(r){i("fMMV").getImageOfChartSilently(e,t,n)}.bind(null,i)).catch(void 0)}i.r(t),i.d(t,"getImageOfChart",(function(){return n})),i.d(t,"getImageOfChartSilently",(function(){return r}))},lA7n:function(e,t,i){"use strict";i.r(t);var n=i("Kxc7"),r=i("mrSG"),o=function(e){function t(t,i){return e.call(this,t,i,"FAVORITE_CHARTS_CHANGED","loadChartDialog.favorites",{})||this}return Object(r.__extends)(t,e),t}(i("ulZB").b),s=i("zUrt"),a=i("FBuY"),l=i("Vdly"),c=i("/z0S");i.d(t,"LoadChartService",(function(){return u}));var u=function(){function e(e){var t=this;void 0===e&&(e=null),this._favoriteChartsService=new o(a.TVXWindowEvents,l),this._chartWidgetCollection=null,this._promise=null,this._getChartEntry=function(e){return{id:e.id,url:e.url,title:e.name,symbol:e.short_symbol,interval:e.interval,toolsCount:0,modified:e.modified_iso,active:function(){return t._isActiveChart(e.id)},openAction:function(){return s.backend.loadChart(e)},deleteAction:function(){return new Promise((function(i){s.backend.removeChart(e.image_url,(function(){t._deleteChart(e.id),i()}))}))},favoriteAction:t._updateFavorites}},this._updateFavorites=function(e){ +return t._favoriteChartsService.set(e)},this._isActiveChart=function(e){return null!==t._chartWidgetCollection&&e===t._chartWidgetCollection.metaInfo.id.value()},this._deleteChart=function(e){t._isActiveChart(e)&&(n.enabled("saveload_storage_customization")?null!==t._chartWidgetCollection&&t._chartWidgetCollection.clearChartMetaInfo():location.href="/chart/"+location.search)},this._chartWidgetCollection=e}return e.prototype.showLoadDialog=function(){Object(c.a)(this._showLoadDialog.bind(this),{source:"Load chart",sourceMeta:"Chart"})},e.prototype._showLoadDialog=function(){var e=this;(n.enabled("saveload_requires_authentication")&&!window.is_authenticated?Promise.resolve([]):new Promise((function(e){s.backend.getCharts((function(t){e(t)}))}))).then((function(t){return t.map(e._getChartEntry)})).then((function(t){var n=e._promise=Promise.all([i.e("react"),i.e(1),i.e(3),i.e(4),i.e(6),i.e(7),i.e(8),i.e(9),i.e(10),i.e(27),i.e(33),i.e(65),i.e(73),i.e(0),i.e(2),i.e(5),i.e(34),i.e("load-chart-dialog")]).then(i.bind(null,"AMW5")).then((function(i){e._promise===n&&i.showLoadChartDialog(t,e._favoriteChartsService,e._chartWidgetCollection)}))}))},e}()},lCO3:function(e,t,i){"use strict";i.r(t),i.d(t,"Version",(function(){return r}));var n=i("Eyy1"),r=function(){function e(e,t){this._major=e,this._minor=t}return e.prototype.major=function(){return this._major},e.prototype.minor=function(){return this._minor},e.prototype.isZero=function(){return 0===this._major&&0===this._minor},e.prototype.toString=function(){return this._major+"."+this._minor},e.prototype.compareTo=function(e){return this._majore._major?1:this._minore._minor?1:0},e.prototype.isLess=function(e){return this.compareTo(e)<0},e.prototype.isLessOrEqual=function(e){return this.compareTo(e)<=0},e.prototype.isEqual=function(e){return 0===this.compareTo(e)},e.prototype.isGreater=function(e){return this.compareTo(e)>0},e.prototype.isGreaterOrEqual=function(e){return this.compareTo(e)>=0},e.parse=function(t){if(t instanceof e)return new e(t.major(),t.minor());if("number"==typeof t)return Object(n.assert)(Math.floor(t)===t,"Version should not be a float number"),new e(t,0);if("string"==typeof t){var i=t.split(".");if(1===i.length){var r=parseInt(i[0],10);return Object(n.assert)(!isNaN(r),"Bad version string: "+t),new e(r,0)}if(2===i.length){r=parseInt(i[0],10);Object(n.assert)(!isNaN(r),"Bad version string: "+t);var o=parseInt(i[1],10);return Object(n.assert)(!isNaN(o),"Bad version string: "+t),new e(r,o)}throw new Error("Bad version string (one dot expected): "+t)}throw new Error("Bad version: "+t)},e.ZERO=new e(0,0),e}()},lJvs:function(e,t,i){"use strict";var n=i("aO4+").Point,r=i("vAx0").ESDPaneView,o=i("fTGZ").BarsMarksContainer,s=i("mMWL"),a=i("FQhm"),l=i("6xeX").Tooltip,c=i("zDbI").CHART_FONT_FAMILY;function u(e){o.call(this,e),this.toolname="UserDefinedTimescaleMarks";var t=this;s.hideMarksOnBars().subscribe(this,(function(){t._properties.visible.setValue(!s.hideMarksOnBars().value())})),this._paneView=new h(e,this), +this._requestedPointsets=new Set}function h(e,t){r.call(this,e,t,void 0,void 0),this.source=t,this.stylesCache={},this.templatesCache={},this._lollipops={},this._createLollipops()}inherit(u,o),u.prototype._initialize=function(e){this._properties.visible.setValue(!0)},u.prototype.userEditEnabled=function(){return!1},u.prototype._plateViewData=function(e){return{text:e.text}},u.prototype.onClicked=function(e){a.emit("onTimescaleMarkClick",e.id)},u.prototype.clearMarks=function(){var e=this._model.chartApi();if(e.connected()){var t=this;Object.keys(this._marks).forEach((function(i){var n=t._getPointsetId(i);e.removePointset(n)}))}this._requestedPointsets.clear(),o.prototype.clearMarks.call(this),this._paneView.clearCaches(),this.onNeedRepaint.fire()},u.prototype._getData=function(e){var t=this._model.mainSeries().symbolInfo();if(t){var i=this.roundRange(this._rangeDifference(e)),n=this,r=this._model.mainSeries(),o=r.symbolId(),s=r.properties().interval.value();ChartApiInstance.getTimescaleMarks(t,i.start,i.end,(function(t){var i=n._model.chartApi();t.forEach((function(e){e.index=null;var t=e.id,r=n._getPointsetId(t),a=n._marks[t];if(a&&null!==a.index&&(a.tickmark===e.tickmark?e.index=a.index:n._requestedPointsets.has(r)&&i.connected()&&(i.removePointset(r),n._requestedPointsets.delete(r))),n._marks[t]=e,null===e.index&&i.connected()){n._requestedPointsets.add(r);var l=[[e.tickmark,0]];i.createPointset(r,"turnaround",o,s,l,(function(e){n._onPointsetData(e)}))}}),n),n._loadedRange=n._rangeUnion(e,n._loadedRange),n.onNeedRepaint.fire()}),s)}},u.prototype._getPointsetId=function(e){return"pointsetMark_"+e},u.prototype._onPointsetData=function(e){var t=e.params.customId.split("_")[1],i=this._marks[t],n=e.params.plots;i&&1===n.length&&(i.index=n[0].value[0])},u.prototype.updatePlateData=function(e,t){return t.barWidth=this.barWidth(),t.text=e.text,t.tooltipMargin=-1*Math.max(e.minSize/2,.4*this.barWidth()),t},u.prototype.hasContextMenu=function(){return!1},u.prototype.paneViews=function(){return this._properties.visible.value()?[this._paneView]:[]},u.prototype.onClickOutside=function(){this._paneView.onClickOutside()},inherit(h,r),h.prototype._createLollipops=function(){var e=this.source._model.timeScale(),t=r.prototype._getY.call(this.source),i=this.source._model.lastHittestData(),o=this;Object.keys(this.source._marks).forEach((function(r){var s=this.source._marks[r],a=s.id,c=s.index;null!==c&&(o._lollipops[a]={id:a,basePoint:new n(e.indexToCoordinate(c)+1,t),hovered:i&&i.id===a||a===o.getLastClickedLollipopId(),barY:null,label:s.label,color:s.color,items:s.tooltip,tooltip:o._lollipops.hasOwnProperty(a)?o._lollipops[a].tooltip:new l,visible:!0})}),this)},h.prototype.clearCaches=function(){this.closeTooltips(),this.clearLastClicked(),this._lollipops={}},h.prototype.update=function(){this._createLollipops(),this._invalidated=!1},h.prototype.renderer=function(){return this.update(),r.prototype.renderer.call(this)},h.prototype._generateTemplateStyle=function(e,t,i){var n=e+t+i;if(!(n in this.stylesCache)){var r="default"!==e,o={ +strokeStyle:t,lineWidth:1,fillStyle:"white",barLine:{lineStyle:CanvasEx.LINESTYLE_DASHED},lollipop:{width:32,height:96,circleHeight:16,radius:12,lineWidth:1.5,fillStyle:r?t:"white",fillCircle:r,strokeStyle:"#E2745B",text:{label:i,strokeStyle:r?"white":t,font:"normal 12px "+c}}};this.stylesCache[n]=o}return this.stylesCache[n]},h.prototype.getTemplate=function(e,t){var i=e+t.color+t.label;return i in this.templatesCache||(this.templatesCache[i]=this.createTemplate(this._generateTemplateStyle(e,t.color,t.label))),this.templatesCache[i]},h.prototype.getStyle=function(e,t){return this._generateTemplateStyle(e,t.color,t.label)},h.prototype.createText=function(e,t){"string"==typeof e.items?t.addTextLine(e.items):Array.isArray(e.items)&&e.items.forEach((function(e){t.addTextLine(e)}))},h.prototype.hasTooltip=function(e){return!!e.tooltip&&e.tooltip.length},e.exports=u},"lNN+":function(e,t,i){"use strict";var n=i("Ss5c").LineDataSource,r=i("Ocx9").DefaultProperty,o=window.t("Triangle Pattern");function s(e,t){this._constructor="LineToolTrianglePattern";var r=t||s.createProperties();n.call(this,e,r),i.e("lt-pane-views").then(function(e){var t=i("Jej9").LineToolTrianglePatternPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}inherit(s,n),s.prototype.pointsCount=function(){return 4},s.prototype.translatedType=function(){return o},s.prototype.name=function(){return"Triangle Pattern"},s.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("EFc4").Points5PatternDefinitionsViewModel}.bind(null,i)).catch(i.oe)},s.createProperties=function(e){var t=new r("linetooltrianglepattern",e);return s._configureProperties(t),t},s._configureProperties=function(e){n._configureProperties(e)},t.LineToolTrianglePattern=s},lReN:function(e,t,i){"use strict";i.r(t),i.d(t,"LineToolsGroupControllerApi",(function(){return s}));var n=i("s1Gx"),r=i("Eyy1"),o=i("CW80"),s=function(){function e(e,t){this._controller=e,this._model=t}return e.prototype.createGroupFromSelection=function(){return this._controller.createGroupFromSelection().id},e.prototype.removeGroup=function(e){var t=Object(r.ensureDefined)(this._groupById(e));this._controller.removeGroup(t)},e.prototype.groups=function(){return this._controller.groups().map((function(e){return e.id}))},e.prototype.shapesInGroup=function(e){var t=Object(r.ensureDefined)(this._groupById(e));return Object(n.sortSources)(t.lineTools()).map((function(e){return e.id()}))},e.prototype.excludeShapeFromGroup=function(e,t){var i=Object(r.ensureDefined)(this._groupById(e)),n=Object(r.ensureNotNull)(this._model.dataSourceForId(t));Object(r.assert)(Object(o.isLineTool)(n),"Passed shapeId is not a line tool"),this._controller.excludeLineToolFromGroup(i,n)},e.prototype.availableZOrderOperations=function(e){var t=Object(r.ensureDefined)(this._groupById(e));return this._controller.availableZOrderOperations(t)},e.prototype.bringToFront=function(e){ +var t=Object(r.ensureDefined)(this._groupById(e));this._controller.bringToFront(t)},e.prototype.bringForward=function(e){var t=Object(r.ensureDefined)(this._groupById(e));this._controller.bringForward(t)},e.prototype.sendBackward=function(e){var t=Object(r.ensureDefined)(this._groupById(e));this._controller.sendBackward(t)},e.prototype.sendToBack=function(e){var t=Object(r.ensureDefined)(this._groupById(e));this._controller.sendToBack(t)},e.prototype.insertAfter=function(e,t){var i=Object(r.ensureDefined)(this._groupById(e)),n=Object(r.ensureNotNull)(this._groupById(t)||this._model.dataSourceForId(t));this._controller.insertAfter(i,n)},e.prototype.insertBefore=function(e,t){var i=Object(r.ensureDefined)(this._groupById(e)),n=Object(r.ensureNotNull)(this._groupById(t)||this._model.dataSourceForId(t));this._controller.insertBefore(i,n)},e.prototype.groupVisibility=function(e){return Object(r.ensureDefined)(this._groupById(e)).visibility()},e.prototype.setGroupVisibility=function(e,t){var i=Object(r.ensureDefined)(this._groupById(e));this._controller.setGroupVisibility(i,t)},e.prototype.groupLock=function(e){return Object(r.ensureDefined)(this._groupById(e)).locked()},e.prototype.setGroupLock=function(e,t){var i=Object(r.ensureDefined)(this._groupById(e));this._controller.setGroupLock(i,t)},e.prototype.getGroupName=function(e){return Object(r.ensureDefined)(this._groupById(e)).name()},e.prototype.setGroupName=function(e,t){var i=Object(r.ensureDefined)(this._groupById(e));this._controller.setGroupName(i,t)},e.prototype.canBeGroupped=function(e){var t=this,i=e.map((function(e){return Object(r.ensureNotNull)(t._model.dataSourceForId(e))}));return!i.some((function(e){return!Object(o.isLineTool)(e)}))&&this._controller.canBeGroupped(i)},e.prototype._groupById=function(e){return this._controller.groups().find((function(t){return t.id===e}))},e}()},lTLF:function(e,t,i){"use strict";i.r(t);var n=i("Hr11"),r=function(){function e(e,t){if(this._base=e,this._integralDividers=t,Object(n.isBaseDecimal)(this._base))this._fractionalDividers=[2,2.5,2];else{this._fractionalDividers=[];for(var i=this._base;1!==i;){if(i%2==0)this._fractionalDividers.push(2),i/=2;else{if(i%5!=0)throw new Error("unexpected base");this._fractionalDividers.push(2),this._fractionalDividers.push(2.5),i/=5}if(this._fractionalDividers.length>100)throw new Error("something wrong with base")}}}return e.prototype.tickSpan=function(e,t,i){for(var r=0===this._base?0:1/this._base,o=Math.pow(10,Math.max(0,Math.ceil(Object(n.log10)(e-t)))),s=0,a=this._integralDividers[0];;){var l=Object(n.greaterOrEqual)(o,r,1e-9)&&o>r+1e-9,c=Object(n.greaterOrEqual)(o,i*a,1e-9),u=Object(n.greaterOrEqual)(o,1,1e-9);if(!(l&&c&&u))break;o/=a,a=this._integralDividers[++s%this._integralDividers.length]}if(o<=r+1e-9&&(o=r),o=Math.max(1,o),this._fractionalDividers.length>0&&Object(n.equal)(o,1,1e-9))for(s=0,a=this._fractionalDividers[0];Object(n.greaterOrEqual)(o,i*a,1e-9)&&o>r+1e-9;)o/=a,a=this._fractionalDividers[++s%this._fractionalDividers.length];return o},e}() +;i.d(t,"PriceTickMarkBuilder",(function(){return o}));var o=function(){function e(e,t,i,n){this._marks=[],this._priceScale=e,this._base=t,this._coordinateToLogicalFunc=i,this._logicalToCoordinateFunc=n}return e.prototype.base=function(){return this._base},e.prototype.setBase=function(e){if(e<0)throw new Error("base < 0");this._base=e},e.prototype.tickSpan=function(e,t,i){if(void 0===i&&(i=0),ei&&(c=u);var h=a.tickSpan(e,t,o);h>i&&(c=Math.min(c,h));var d=l.tickSpan(e,t,o);return d>i&&(c=Math.min(c,d)),c>0?c:e-t},e.prototype.rebuildTickMarks=function(){var e=this._priceScale;if(this._marks=[],!e.isEmpty()){var t=e.mainSource();if(null!==t){var i=t.firstValue();null===i&&(i=0);var n=e.height(),r=this._coordinateToLogicalFunc(n-1,i),o=this._coordinateToLogicalFunc(0,i),s=Math.max(r,o),a=Math.min(r,o);if(s!==a){var l=this.tickSpan(s,a),c=s%l;c+=c<0?l:0;for(var u=s>=a?1:-1,h=null,d=e.formatter(),p=NaN,_=s-c;_>a;_-=l){_===p&&(l=this.tickSpan(s,a,l)),p=_;var f=this._logicalToCoordinateFunc(_,i);null!==h&&Math.abs(f-h)=3600&&(s=f(Math.floor(o/3600))),o%=3600;var a=f(Math.floor(o/60));o%=60;var l=f(Math.floor(o));return null!==s?s+":"+a+":"+l:a+":"+l}, +t.prototype._updateRendererData=function(e,t,i){e.visible=!1,t.visible=!1;var n=this._source.properties();if(12!==n.style.value()){if(this._options.visibleOnHistoryOnly){var r=this._model.timeScale().visibleBarsStrictRange(),o=this._source.data().last();if(null===r||null===o||r.contains(o.index))return}var s=this._model.properties().scalesProperties,a=s.showSeriesLastValue.value(),l=m&&this._options.showCountdown&&-1!==v.indexOf(n.style.value())&&n.showCountdown.value(),c=this._options.showSymbolLabel&&s.showSymbolLabels.value(),u=s.seriesLastValueMode.value()===_.PriceAxisLastValueMode.LastPriceAndPercentageValue,h=this._source.lastValueData(void 0,this._options.alwaysShowGlobalLast);if(!h.noData){var d=8===n.style.value();if((a||l||c)&&d&&n.haStyle.showRealLastPrice.value()){var p=this._source.lastValueData(void 0,!1),f=this._source.lastValueData(void 0,!0);p.noData||f.noData||p.index!==f.index||(a=!1,l=!1,c=!1)}if(a||l){var y=this._axisFirstLineText(h,a,u),g=l?this._countdownText():"";this._previousCountdown=g,0===y.length?(e.text=g,e.secondLine=""):(e.text=y,e.secondLine=g),0===y.length&&0===g.length||(e.visible=!0)}(c||u)&&(t.text=this._paneText(h,a,c,u),t.visible=t.text.length>0),i.background=this._source.priceLineColor(h.color),i.color=this.generateTextColor(i.background),i.coordinate=h.coordinate,i.floatCoordinate=h.floatCoordinate}}},t.prototype._paneText=function(e,t,i,n){var r="";if(y){var o=this._source.symbolInfo();r+=o?o.exchange+" ":""}else if(i){var s=this._source.getSymbolName();s.length>40&&(s=s.substr(0,37)+"..."),r+=s+" "}return t&&n&&(r+=this._source.priceScale().isPercentage()?e.formattedPriceAbsolute:e.formattedPricePercentage),r.trim()},t.prototype._axisFirstLineText=function(e,t,i){return t?i?this._source.priceScale().isPercentage()?e.formattedPricePercentage:e.formattedPriceAbsolute:e.text:""},t.prototype._currentTime=function(){return Date.now()+1e3*this._source.serverTimeOffset()},t}(d.a),S=i("TmNs"),w=i("k9/m"),P=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype.lastPrice=function(){return this._getSource().data().lastProjectionPrice},t.prototype._updateRendererData=function(e,t,i){e.visible=!1,t.visible=!1;var n=this._getModel(),r=this._getSource(),o=r.priceScale(),s=n.timeScale(),a=this.lastPrice();if(!s.isEmpty()&&!o.isEmpty()&&void 0!==a){var l=s.visibleBarsStrictRange();if(null!==l){var c=l.firstBar(),h=l.lastBar(),d=r.data(),p=d.search(h,w.PlotRowSearchMode.NearestLeft);if(null!==p){var f=r.nearestIndex(c,w.PlotRowSearchMode.NearestRight);if(void 0!==f){var m=r.model().properties().scalesProperties,v=Object(u.ensureNotNull)(d.valueAt(f))[TradingView.CLOSE_PLOT],y=i.background,g=m.showSeriesLastValue.value(),b=!1,S=!1,P=!1,C=r.lastValueData(TradingView.CLOSE_PLOT,!1),x=r.properties();if(8===x.style.value()&&x.haStyle.showRealLastPrice.value()){var T=r.lastValueData(TradingView.CLOSE_PLOT,!0);if(T.noData||T.color===i.background||(y=T.color),!T.noData&&!C.noData){var I=T.index===C.index;b=I&&m.showSymbolLabels.value(), +S=m.seriesLastValueMode.value()===_.PriceAxisLastValueMode.LastPriceAndPercentageValue,g=g&&I,P=I&&this._isCountdownEnabled()&&x.showCountdown.value()}}else{y=r.barColorer().barStyle(p.index,!0).barColor}i.background=y,i.color=this.generateTextColor(y),i.coordinate=o.priceToCoordinate(a,v),e.visible=g||P,C.noData||(C.text=o.formatPrice(a,v),C.formattedPriceAbsolute=o.formatPriceAbsolute(a),C.formattedPricePercentage=o.formatPricePercentage(a,v),e.text=this._axisFirstLineText(C,g,S),e.secondLine=P?this._countdownText():"",t.text=this._paneText(C,g,b,S)),t.visible=b||g&&S}}}}},t}(b),C=i("KtbP"),x=i("C2K+"),T=i("WPIy");i.d(t,"SeriesBase",(function(){return M}));var I=p.enabled("price_scale_always_last_bar_value"),M=function(e){function t(t){var i=e.call(this,t)||this;i.extendedHours=new s.a,i._paneView=null,i._priceStep=null,i._symbolInfo=null,i._isPrePostMarketPricesForbiddenProperty=new s.a(!0),i._prevClosePriceAxisView=null,i._base=100,i._pointValue=1,i._formatter=new l.PriceFormatter(i._base),i._ignoreMinMoveFormatter=new l.PriceFormatter(i._base),i._ignoreMinMovePriceStep=null,i._lastBarCloseTime=null,i._quotesProvider=new c.QuotesProvider,i._quotesProvider.quotesUpdate().subscribe(i,i._onQuotesUpdate);var n=new b(i,t,{alwaysShowGlobalLast:!0});i._priceAxisView=n;var r=null;I||(r=new b(i,t,{visibleOnHistoryOnly:!0,showSymbolLabel:!1,showCountdown:!1,alwaysShowGlobalLast:!1})),i._priceLinePriceAxisView=new S.SeriesPriceLineAxisView(i);var o=new P(i,t);return i._priceAxisViews=[n,o],null!==r&&i._priceAxisViews.push(r),i._panePriceAxisView=new C.PanePriceAxisView(n,i,t),i._historyPricePanePriceAxisView=null!==r?new C.PanePriceAxisView(r,i,t):null,i._projectionPriceAxisView=new C.PanePriceAxisView(o,i,t),i._labelPaneViews=[i._panePriceAxisView,i._projectionPriceAxisView],null!==i._historyPricePanePriceAxisView&&i._labelPaneViews.push(i._historyPricePanePriceAxisView),i}return Object(n.__extends)(t,e),t.prototype.destroy=function(){this._quotesProvider.quotesUpdate().unsubscribeAll(this)},t.prototype.quotesProvider=function(){return this._quotesProvider},t.prototype.labelPaneViews=function(){return this._labelPaneViews},t.prototype.symbolInfo=function(){return this._symbolInfo},t.prototype.symbolResolved=function(){return this.dataEvents().symbolResolved()},t.prototype.formatter=function(e){return void 0===e&&(e=!0),e?this._formatter:this._ignoreMinMoveFormatter},t.prototype.priceStep=function(e){return void 0===e&&(e=!0),e?this._priceStep:this._ignoreMinMovePriceStep},t.prototype.hasClosePrice=function(){return 12!==this.properties().style.value()},t.prototype.nearestValue=function(e,t,i){var n=this.nearestData(e,i);return n?n.value[t]:void 0},t.prototype.autoScaleInfo=function(e,t){var i=this.priceRange(e,t);if(null===this._paneView)return{range:i};var n=this._paneView;return{range:i,topPixelMargin:n.topPixelMargin?n.topPixelMargin():void 0,bottomPixelMargin:n.bottomPixelMargin?n.bottomPixelMargin():void 0}},t.prototype.isPrePostMarketPricesForbiddenProperty=function(){ +return this._isPrePostMarketPricesForbiddenProperty},t.prototype.base=function(){return this._base},t.prototype.pointValue=function(){return this._pointValue},t.prototype.barCloseTime=function(){return this._lastBarCloseTime},t.prototype.currency=function(){return this.properties().currencyId.value()||null},t.prototype.setCurrency=function(e){this.properties().currencyId.setValue(e)},t.prototype.symbolSource=function(){return this},t.prototype.valuesProvider=function(){return new x.a(this,this.model())},t.prototype.statusProvider=function(e){return new T.a(this,this._model.properties().scalesProperties.textColor,this.properties().statusViewStyle,e)},t.prototype.open=function(e){var t=this.data().valueAt(e);return t&&t[1]},t.prototype.high=function(e){var t=this.data().valueAt(e);return t&&t[2]},t.prototype.low=function(e){var t=this.data().valueAt(e);return t&&t[3]},t.prototype.close=function(e){var t=this.data().valueAt(e);return t&&t[4]},t.prototype.moveItem=function(e,t,i){if(10===this.style()&&0===t){var n=this.priceScale(),r=this.properties().baselineStyle,o=n.height(),s=100-e.y/o*100,a=s<0?0:Math.round(10*s)/10;r.baseLevelPercentage.setValue(Math.max(Math.min(a,100),0))}},t.prototype._isExtendedHoursAllowed=function(){return Boolean(this._symbolInfo&&-1!==["stock","index","futures"].indexOf(this._symbolInfo.type))},t.prototype._recreateFormatter=function(){this._formatter=Object(a.createSeriesFormatter)(this.symbolInfo(),this.properties().minTick.value()),this._ignoreMinMoveFormatter=Object(a.createSeriesFormatter)(this.symbolInfo(),this.properties().minTick.value(),!0),this.priceScale()&&this.priceScale().updateFormatter(),this._formatterChanged.fire()},t.prototype._recreatePriceStep=function(){var e=Object(a.getSeriesPriceFormattingState)(this.symbolInfo()),t=e.minMove,i=e.priceScale,n=t/i;this._ignoreMinMovePriceStep=1/i,this._priceStep!==n&&(this._priceStep=n,this._priceStepChanged.fire())},t.prototype._recreatePriceFormattingDependencies=function(){this._recreateFormatter(),this._recreatePriceStep()},t.prototype._updateIsPrePostMarketPricesForbiddenProperty=function(){var e=!this.isDWM()&&this.extendedHours.value()||!this._isExtendedHoursAllowed();this._isPrePostMarketPricesForbiddenProperty.setValue(e)},t}(r.PriceDataSource)},"lW/c":function(e,t,i){"use strict";i.r(t);i("YFKU");var n=i("hY0g"),r=i.n(n),o=i("HySD"),s=function(){function e(e){var t=this;this._document=e,this.isFullscreen=new r.a;var i=function(){for(var e=["fullscreenElement","webkitFullscreenElement","mozFullscreenElement","mozFullScreenElement","msFullscreenElement"],i=0;i0;){var s=e._groups[o];if(!s.isDisabled()){if(s.handleHotkey(i,t))return;if(s.modal)return}}}},this._keyUpListener=function(t){var i=Object(n.hashFromEvent)(t);e._pressedKeys.setValue(i)},this._blurEvent=function(){e._pressedKeys.setValue(0)},this._mouseEvent=function(t){var i=Object(n.modifiersFromEvent)(t),r=255&e._pressedKeys.value();e._pressedKeys.setValue(i|r)}}return e.prototype.listen=function(e){e.addEventListener("keydown",this._keyDownListener),e.addEventListener("keyup",this._keyUpListener),e.addEventListener("blur",this._blurEvent),e.addEventListener("mousemove",this._mouseEvent)},e.prototype.unlisten=function(e){e.removeEventListener("keydown",this._keyDownListener),e.removeEventListener("keyup",this._keyUpListener),e.removeEventListener("blur",this._blurEvent),e.removeEventListener("mousemove",this._mouseEvent)},e.prototype.registerGroup=function(e){this._groups.push(e)},e.prototype.unregisterGroup=function(e){for(var t=this._groups.length;t--;)this._groups[t]===e&&this._groups.splice(t,1)},e.prototype.promoteGroup=function(e){for(var t=this._groups.length-1,i=this._groups.length;i--;){if(this._groups[i]===e)return void(i!==t&&(this._groups.splice(i,1),this._groups.splice(t,0,e)));this._groups[i].modal&&(t=i-1)}},e.prototype.pressedKeys=function(){return this._pressedKeys},e}(),l=i("JWMC"),c=function(){function e(e,t){this._group=e,this.hotkey=t.hotkey,this.handler=t.handler,this.desc=t.desc,this.element=t.element||null,t.isDisabled?"function"==typeof t.isDisabled?this.isDisabled=t.isDisabled:this.isDisabled=function(){return!0}:this.isDisabled=function(){return!1}}return e.prototype.destroy=function(){this._group&&(this._group.remove(this),this._group=null)},e}(),u=function(){function e(e,t){this._actions=[],this._manager=e,this.modal=!(!t||!t.modal), +t&&(this.desc=t.desc),t&&t.isDisabled?"function"==typeof t.isDisabled?this.isDisabled=t.isDisabled:this.isDisabled=function(){return!0}:this.isDisabled=function(){return!1},this._manager.registerGroup(this)}return e.prototype.add=function(e){var t=new c(this,e);return this._actions.push(t),t},e.prototype.remove=function(e){for(var t=this._actions.length;t-- >0;)this._actions[t]===e&&this._actions.splice(t,1)},e.prototype.handleHotkey=function(e,t){for(var i=this._actions.length;i-- >0;){var r=this._actions[i];if(r.hotkey===e&&((!r.element||t.target&&r.element.contains(t.target))&&!r.isDisabled()))return r.handler(t),t.preventDefault(),Object(l.trackEvent)("Keyboard Shortcuts",Object(n.humanReadableHash)(e)),!0}return!1},e.prototype.promote=function(){this._manager.promoteGroup(this)},e.prototype.destroy=function(){this._actions.length=0,this._manager.unregisterGroup(this)},e}();i.d(t,"pressedKeys",(function(){return d})),i.d(t,"createGroup",(function(){return p})),i.d(t,"registerWindow",(function(){return _})),i.d(t,"unregisterWindow",(function(){return f})),i.d(t,"Modifiers",(function(){return n.Modifiers}));var h=new a,d=h.pressedKeys();function p(e){return new u(h,e)}function _(e){h.listen(e)}function f(e){h.unlisten(e)}_(window)},"m/cY":function(e,t,i){"use strict";i.d(t,"a",(function(){return o}));var n=i("tc+8"),r=i.n(n);function o(e){return new r.a(e)}},mE5r:function(e,t,i){"use strict";i.r(t);var n=i("mrSG"),r=i("Eyy1"),o=i("ikwP"),s=i("gAom"),a=i("H0vP"),l=i("aO4+"),c=i("XlJ7"),u=i("EsvI"),h=i("OsWk"),d=i("rL76"),p=i("zDbI"),_=parseInt(d.labelheight),f=parseInt(d.bottommargin);function m(e){return e/11}var v=function(){function e(){this._wrapper=document.createElement("div"),this._element=document.createElement("div"),this._labelElement=document.createElement("div"),this._gearElement=document.createElement("div"),this._currentScale=1,this._info=null,this._mode="auto",this._wrapper.appendChild(this._element),this._wrapper.classList.add(d.wrapper),this._element.classList.add(d.label),this._labelElement.className=d.symbol,this._element.appendChild(this._labelElement),this._gearElement.className=d.gear,this._gearElement.innerHTML=h,this._element.appendChild(this._gearElement)}return e.prototype.getElement=function(){return this._wrapper},e.prototype.setMode=function(e){this._mode!==e&&(this._mode=e)},e.prototype.align=function(e,t){var i=m(t);Math.abs(i-this._currentScale)>.1&&(this._currentScale=i,Math.abs(this._currentScale-1)>.1?this._element.style.transform="scale("+this._currentScale+")":(this._currentScale=1,this._element.style.transform=""))},e.prototype.drawLabelForScreenshot=function(e,t){if(null!==this._info&&"gear"!==this._mode){var i=Object(c.makeFont)(t.fontSize,p.CHART_FONT_FAMILY);e.fillStyle=u.themes[t.theme].getThemedColor("color-price-axis-label-back"),e.globalAlpha=.5,e.beginPath();var n=m(t.fontSize)*_/2,r=Object(l.point)(t.offset+t.width/2,t.height/2);e.arc(r.x,r.y,n,0,2*Math.PI,!0),e.fill(),e.globalAlpha=1,e.fillStyle=u.themes[t.theme].getThemedColor("color-price-axis-label-text"), +e.textAlign="center",e.font=i,e.textBaseline="middle",e.fillText(this._info.label,r.x,r.y)}},e.prototype.setAxisNameInfo=function(e){this._info=e,null!==e&&(this._labelElement.textContent=e.label)},e.height=function(e){return(_+f)*e},e}(),y=i("aIyQ"),g=i.n(y),b=i("S8xo"),S=i("5VQP"),w=i("CPmC"),P={enableTooltip:!0,showLabels:!0,enableMenu:!0,enableHighlight:!0},C=function(){function e(e,t,i,r,s){var a=this;this._invalidated=!0,this._size=new o.Size(0,0),this._offset=0,this._axisInfo=null,this._onLabelHovered=new g.a,this._highlighted=!1,this._labelMode="auto",this._fixedLabelMode=null,this._canvasConfiguredHandler=function(){return a.update()},this._isLeft="left"===e,this._rendererOptionsProvider=r.rendererOptionsProvider,this._sourcesTitlesProvider=r.sourcesTitlesProvider,this._contextMenuItemsProvider=r.contextMenuItemsProvider,this._backgroundBasedTheme=r.backgroundBasedTheme,this._getBackgroundTopColor=r.getBackgroundTopColor,this._getBackgroundBottomColor=r.getBackgroundBottomColor,this._properties=t,this._axisInfo=i,this._labelOptions=Object(n.__assign)(Object(n.__assign)({},P),s),this._properties.lineColor.subscribe(this,this._onPropertyChanged),this._cell=document.createElement("div"),this._cell.classList.add(d["price-axis-stub"]),this._labelOptions.enableTooltip&&this._cell.classList.add("apply-common-tooltip"),this._cell.style.width="25px",this._cell.style.height="100%",this._cell.style.position="absolute",this._cell.style.left="0",this._cell.style.overflow="hidden",this._labelOptions.showLabels?(this._label=new v,this._label.setAxisNameInfo(this._axisInfo),this._cell.appendChild(this._label.getElement()),this._labelOptions.enableTooltip&&Object(w.b)(this._cell,"text",(function(e){return a._tooltipContent()}))):this._label=null,this._mouseEventHandler=new b.MouseEventHandler(this._cell,this,{treatHorzTouchDragAsPageScroll:!0,treatVertTouchDragAsPageScroll:!0}),this._canvasBinding=Object(o.createBoundCanvas)(this._cell,new o.Size(16,16)),this._canvasBinding.subscribeCanvasConfigured(this._canvasConfiguredHandler);var l=this._canvasBinding.canvas;l.style.position="absolute",l.style.left="0",l.style.top="0"}return e.prototype.destroy=function(){this._canvasBinding.unsubscribeCanvasConfigured(this._canvasConfiguredHandler),this._canvasBinding.destroy(),this._properties.lineColor.unsubscribe(this,this._onPropertyChanged),this._mouseEventHandler.destroy(),$(this._cell).remove()},e.prototype.mouseEnterEvent=function(e){this._mouseOrTouchEnterEvent(e)},e.prototype.touchStartEvent=function(e){this._mouseOrTouchEnterEvent(e)},e.prototype.mouseLeaveEvent=function(e){this._mouseOrTouchLeaveEvent(e)},e.prototype.touchEndEvent=function(e){this._mouseOrTouchLeaveEvent(e)},e.prototype.mouseClickEvent=function(e){this._mouseClickOrTapEvent(e)},e.prototype.tapEvent=function(e){this._mouseClickOrTapEvent(e)},e.prototype.update=function(){this._invalidated=!0},e.prototype.getElement=function(){return this._cell},e.prototype.onLabelHovered=function(){return this._onLabelHovered},e.prototype.setSizeAndOffset=function(e,t){ +if(e.w<0||e.h<0)throw new Error("Try to set invalid size to PriceAxisStub "+JSON.stringify(e));this._size.equals(e)||(this._size=e,this._canvasBinding.resizeCanvas({width:e.w,height:e.h}),this._cell.style.width=e.w+"px",this._cell.style.minWidth=e.w+"px",this._cell.style.height=e.h+"px",this._invalidated=!0),this._offset!==t&&(this._offset=t,this._cell.style.left=t+"px")},e.prototype.paint=function(e){if((!(ethis._axises.length&&this._axises.lengthu;){var h=Object(r.ensureDefined)(this._stubs.pop());h.onLabelHovered().unsubscribeAll(this),this._cell.removeChild(h.getElement()),h.destroy()}for(var d=function(){var e=p._labelsOptions.showLabels?Object(x.a)(p._side,p._stubs.length):null,t=p._stubs.length,i=new C(p._side,p._stubProperties,e,p._stubParams(t),p._labelsOptions);i.onLabelHovered().subscribe(p,(function(t){o._labelsOptions.showLabels&&o._labelsOptions.enableHighlight&&o._onLabelHovered.fire(Object(r.ensureNotNull)(e),t)})),p._stubs.push(i),p._cell.appendChild(i.getElement())},p=this;this._stubs.length=t.scrollWidth||t.setAttribute("title",t.textContent||""))}),!0),document.addEventListener("mouseenter",(function(e){var t=e.target;if(t instanceof HTMLElement&&t.matches(".apply-overflow-tooltip")){if(t.matches(".apply-overflow-tooltip--check-children")){for(var i=!1,n=t.children,r=0;r1,"Unable to change pane's height if there is only one pane");var r=i.indexOf(this._pane);Object(n.assert)(-1!==r,"Invalid pane index");var o=new l(t,r,e);this._chartWidget.model().undoHistory().pushUndoCommand(o)},e.prototype.moveTo=function(e){var t=this.paneIndex();t!==e&&(Object(n.assert)(e>=0&&e1&&"-"===t.text[0]?e.remove.push(t.text.slice(1)):(i="-"===t.text?new m:new f({label:t.text,onExecute:t.click}),t.position&&"top"===t.position?e.top.push(i):e.bottom.push(i)))}))}}),e},P.prototype._timeAxisMenu=function(){if(this._chartUndoModel().timeScale().isEmpty())return null;var e=this._chart.getTimeScale();return new f({label:window.t("Time Scale"),subItems:e.getContextMenuActions(),statName:"TimeScale"})},P.prototype.toggleLockTimeAxis=function(e,t){if("boolean"!=typeof t&&(t=!y.lockTimeAxis().value()),t){var i=this._chartUndoModel().timeScale(),n=i.coordinateToIndex(e),r=i.points().roughTime(n);y.lockTimeAxisTime.setValue(r)}y.lockTimeAxis().setValue(t)},P.prototype._createLockTimeAxisAction=function(e){var t=y.lockTimeAxis().value();return new f({label:window.t("Lock Vertical Line On Time Axis"),statName:"ToggleLockCursorInTime",checkable:!0,checked:t,onExecute:this.toggleLockTimeAxis.bind(this,e.localX,!t)})},P.prototype._createHVLineAction=function(e,t){var i=this;return new f({label:"vertical"===(t="vertical"===t?"vertical":"horizontal")?window.t("Create Vertical Line"):window.t("Create Horizontal Line"),statName:"vertical"===t?"CreateVerticalLine":"CreateHorizontalLine",onExecute:function(){var n=u(i._state),r=n.mainDataSource().firstValue(),o=i._chartUndoModel().timeScale().coordinateToIndex(e.localX),s=n.defaultPriceScale().coordinateToPrice(e.localY,r),a=i._chartUndoModel().createLineTool(n,{index:o,price:s},"vertical"===t?"LineToolVertLine":"LineToolHorzLine");i._finishTool(a)}})},P.prototype.setPriceAxisSizes=function(e,t,i){this._priceAxisesContainer(e).setSizes(t,i)},P.prototype.update=function(){this._lhsPriceAxisesContainer.update(),this._rhsPriceAxisesContainer.update(),null!==this._legendWidget&&this._legendWidget.update(),this.updateControls()},P.prototype.updateControls=function(){null!==this._paneControls&&this._paneControls.update()},P.prototype.recalculatePriceScale=function(){var e=this.state();e.leftPriceScales().forEach((function(t){e.recalculatePriceScale(t)})),e.rightPriceScales().forEach((function(t){e.recalculatePriceScale(t)}));for(var t=e.dataSources(),i=0;i0,this._precision=e}return e.prototype.state=function(){return{precision:this._precision}},e.prototype.format=function(e){if(!Object(o.isNumber)(e))return a;var t="";return e<0&&(t="-",e=-e),e>=1e100?Object(n.t)("N/A"):(!this._fractionalValues||e>=995?e=Math.round(e):this._fractionalValues&&(e=+e.toFixed(this._precision)),e<995?t+this._formatNumber(e):e<999995?t+this._formatNumber(e/1e3)+"K":e<999999995?(e=1e3*Math.round(e/1e3),t+this._formatNumber(e/1e6)+"M"):(e=1e6*Math.round(e/1e6),t+this._formatNumber(e/1e9)+"B"))},e.prototype.parse=function(e){if("---"===e)return{error:"not a number",res:!1,value:NaN};var t={K:1e3,M:1e6,B:1e9},i=e.slice(-1);if(t.hasOwnProperty(i)){var n=this._numericFormatter.parse(e.slice(0,-1));return Object(o.isNumber)(n)?{res:!0,value:n*t[i]}:{error:"not a number",res:!1,value:NaN}}n=this._numericFormatter.parse(e);return Object(o.isNumber)(n)?{res:!0,value:n}:{error:"not a number",res:!1,value:NaN}},e.serialize=function(e){return e.state()},e.deserialize=function(t){return new e(t.precision)},e.prototype._formatNumber=function(e){return this._fractionalValues&&(e=Object(s.fixComputationError)(e)),this._numericFormatter.format(e).replace(/(\.[1-9]*)0+$/,(function(e,t){return t}))},e}()},nW7S:function(e,t,i){"use strict";(function(e){var n=i("aO4+").Point,r=i("Ss5c").LineDataSource,o=i("Ocx9").DefaultProperty,s=window.t("Trend Angle");function a(e,t){var n=t||a.createProperties();r.call(this,e,n),this._properties.addChild("angle",new a.AngleProperty(this)),i.e("lt-pane-views").then(function(e){var t=i("XHET").TrendAnglePaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}inherit(a,r),a.prototype.isSynchronizable=function(){return!1},a.AngleProperty=function(t){e.call(this),this._lineSource=t},inherit(a.AngleProperty,e),a.AngleProperty.prototype.value=function(){var e=180*this._lineSource._angle/Math.PI;return Math.round(e)},a.AngleProperty.prototype.setValue=function(e){var t=e*Math.PI/180;this._lineSource._angle=t;var i=this._lineSource.pointToScreenPoint(this._lineSource.points()[0])[0],r=Math.cos(this._lineSource._angle),o=-Math.sin(this._lineSource._angle),s=new n(r,o),a=i.addScaled(s,this._lineSource._distance),l=this._lineSource.screenPointToPoint(a);this._lineSource._points[1]=l,this._lineSource._model.updateSource(this._lineSource),this._lineSource.updateAllViews(),this._lineSource._model.updateSource(this._lineSource)},a.prototype.pointsCount=function(){return 2},a.prototype.translatedType=function(){return s},a.prototype.name=function(){return"Trend Angle"}, +a.prototype._calculateAngle=function(){var e=this.pointToScreenPoint(this.points()[0])[0],t=this.pointToScreenPoint(this.points()[1])[0],i=t.subtract(e);i.length()>0?(i=i.normalized(),this._angle=Math.acos(i.x),i.y>0&&(this._angle=-this._angle),this._distance=t.subtract(e).length()):delete this._angle,this.properties().hasOwnProperty("angle")&&this.properties().angle.listeners().fire(this.properties().angle)},a.prototype.addPoint=function(e,t){var i=r.prototype.addPoint.call(this,e,t);return i&&this._calculateAngle(),i},a.prototype.setLastPoint=function(e,t){r.prototype.setLastPoint.call(this,e,t),this.points().length>1&&this._calculateAngle()},a.prototype.axisPoints=function(){if(this.points().length<2)return[];var e=[this.points()[0]],t=this.pointToScreenPoint(this.points()[0])[1],i=Math.cos(this._angle)*this._distance,r=-Math.sin(this._angle)*this._distance,o=t.add(new n(i,r)),s=this.screenPointToPoint(o);return e.push(s),e},a.prototype.setPoint=function(e,t,i){r.prototype.setPoint.call(this,e,t,i),this.points().length>1&&1===e&&this._calculateAngle()},a.prototype.restoreData=function(e){this._angle=e.angle,this._distance=e.distance},a.prototype.state=function(e){var t=r.prototype.state.call(this,e);return t.angle=this._angle,t.distance=this._distance,t},a.prototype.cloneData=function(e){this._angle=e._angle,this._distance=e._distance},a.prototype.canHasAlert=function(){return!0},a.prototype._getAlertPlots=function(){return[this._linePointsToAlertPlot(this._points,null,this.properties().extendLeft.value(),this.properties().extendRight.value())]},a.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("o1gc").TrendAngleDefinitionsViewModel}.bind(null,i)).catch(i.oe)},a.createProperties=function(e){var t=new o("linetooltrendangle",e);return a._configureProperties(t),t},a._configureProperties=function(e){r._configureProperties(e)},t.LineToolTrendAngle=a}).call(this,i("tc+8"))},"nd9+":function(e,t,i){"use strict";i.r(t),i.d(t,"LineToolGannComplex",(function(){return d}));var n=i("mrSG"),r=i("aO4+"),o=i("Eyy1"),s=i("T6Of"),a=i("Ss5c"),l=i("FaJS"),c=i("LAp3"),u=i("ytGH"),h=window.t("Gann Square"),d=function(e){function t(n,r){var o=e.call(this,n,r||t.createProperties())||this;o.version=2,o._scaleRatioFormatter=new s.LimitedPrecisionNumericFormatter(7),i.e("lt-pane-views").then(function(e){var t=i("X4Cb").GannComplexPaneView;o._setPaneViews([new t(o,o.model())])}.bind(null,i)).catch(void 0);var a=o.properties();o._adjustScaleRatio(a),a.subscribe(o,o._adjustScaleRatio),a.childs().scaleRatio.subscribe(o,o._correctFirstPoint),o._syncStateExclusions=["scaleRatio"],a.addExclusion("scaleRatio"),o.properties().onRestoreFactoryDefaults().subscribe(o,o._handleRestoringFactoryDefaults),o._onTemplateApplying.subscribe(o,o._handleTemplateApplying),o._onTemplateApplied.subscribe(o,o._correctFirstPoint);for(var l=[],c=o.properties().childs(),h=c.levels.childCount(),d=0;d=this.pointsCount()?setTimeout((function(){return n._migratePoint()})):this._timePoint.length>=this.pointsCount()&&this._pointAdded.subscribe(this,this._migratePoint))},t.prototype.destroy=function(){var e=this.properties();e.unsubscribe(this,this._adjustScaleRatio),e.childs().scaleRatio.unsubscribe(this,this._correctFirstPoint),this.properties().onRestoreFactoryDefaults().unsubscribe(this,this._handleRestoringFactoryDefaults),this._onTemplateApplying.unsubscribe(this,this._handleTemplateApplying),this._onTemplateApplied.unsubscribe(this,this._correctFirstPoint)},t.prototype.pointsCount=function(){return 2},t.prototype.translatedType=function(){return h},t.prototype.name=function(){return"Gann Square"},t.prototype.addPoint=function(t,i,n){this._points.length>1&&this._points.pop();var r=e.prototype.addPoint.call(this,t,i,n),s=this.priceScale();return!Object(o.ensureNotNull)(s).isLog()&&r&&this._correctFirstPoint(),r},t.prototype.setPoint=function(t,i,n){e.prototype.setPoint.call(this,t,i,n),void 0!==n&&n.shift()?this._correctPoint(t):this._correctScaleRatio()},t.prototype.setLastPoint=function(t,i){var n=this.priceScale();Object(o.ensureNotNull)(n).isLog()||(this._points[1]=t,this._correctPoint(1)),e.prototype.setLastPoint.call(this,t,i)},t.prototype.isReversed=function(){return this.properties().childs().reverse.value()},t.prototype.levelsCount=function(){return this.properties().childs().levels.childCount()},t.prototype.levels=function(){for(var e=[],t=this.properties().childs(),i=t.levels.childCount(),n=0;n0,s=n.index-r.index>0,a=o&&!s||!o&&s?-1:1;0===e&&(a=-a),n.price=r.price+a*t*i,this._pointChanged.fire(e)}this.normalizePoints()}}},t.prototype._correctFirstPoint=function(){this._correctPoint(this.isReversed()?0:1)},t.prototype._handleRestoringFactoryDefaults=function(){this.properties().childs().scaleRatio.setValue(this._getAdjustedScaleRatio())},t.prototype._handleTemplateApplying=function(e){""===e.scaleRatio&&(e.scaleRatio=this._getAdjustedScaleRatio())},t.prototype._migratePoint=function(){if(!(this.points().length0){r=r.normalized();var o=Math.acos(r.x);return r.y>0&&(o=-o),o}return null},t}(a.LineDataSource)},nda6:function(e,t,i){"use strict";i.r(t),i.d(t,"TimeSpanFormatter",(function(){return n}));i("YFKU");var n=function(){function e(){}return e.prototype.format=function(e){var t=e<0;e=Math.abs(e);var i=Math.floor(e/86400);e-=86400*i;var n=Math.floor(e/3600);e-=3600*n;var r=Math.floor(e/60);e-=60*r;var o="";return i&&(o+=i+window.t("d",{context:"dates"})+" "),n&&(o+=n+window.t("h",{context:"dates"})+" "),r&&(o+=r+window.t("m",{context:"dates"})+" "),e&&(o+=e+window.t("s",{context:"dates"})+" "),t&&(o="-"+o),o.trim()},e}()},"ng+v":function(e,t,i){"use strict";i.r(t),i.d(t,"LineDataSourceBase",(function(){return a}));var n=i("mrSG"),r=i("fgLi"),o=i("aIyQ"),s=i.n(o),a=function(e){function t(t){var i=e.call(this)||this;return i._timePoint=[],i._points=[],i._normalizedPointsChanged=new s.a,i._model=t,i.localAndServerAlertsMismatch=!1,i}return Object(n.__extends)(t,e),t.prototype.normalizedPointsChanged=function(){return this._normalizedPointsChanged},t.prototype.pointsProperty=function(){return this._pointsProperty},t.prototype.setPoints=function(e){this._points=e},t.prototype.normalizePoint=function(e){return Object(n.__assign)(Object(n.__assign)({},this._model.timeScale().normalizeBarIndex(e.index)),{price:e.price})},t.prototype.normalizePoints=function(){this._timePoint=[];for(var e=0;e100&&this._reset(),this._totalDeltaX+=e.deltaX,this._totalDeltaY+=e.deltaY,this._prevWheelTime=e.timeStamp;var t={deltaX:e.deltaX,deltaY:e.deltaY};return 0===this._totalDeltaX||0===this._totalDeltaY||(Math.abs(this._totalDeltaX)>=Math.abs(3*this._totalDeltaY)&&(t.deltaY=0),Math.abs(this._totalDeltaY)>=Math.abs(3*this._totalDeltaX)&&(t.deltaX=0)),t},e.prototype._reset=function(){this._totalDeltaX=0,this._totalDeltaY=0},e}()},oIoN:function(e,t,i){"use strict";var n=i("Ss5c").LineDataSource,r=i("Ocx9").DefaultProperty,o=window.t("Disjoint Channel");function s(e,t){var r=t||s.createProperties();n.call(this,e,r),this.version=s.version,i.e("lt-pane-views").then(function(e){var t=i("pBAL").DisjointChannelPaneView;this._setPaneViews([new t(this,this._model)]) +}.bind(this).bind(null,i)).catch(i.oe)}inherit(s,n),s.version=1,s.prototype.pointsCount=function(){return 3},s.prototype.translatedType=function(){return o},s.prototype.name=function(){return"Disjoint Channel"},s.prototype.hasEditableCoordinates=function(){return!1},s.prototype.addPoint=function(e,t){return t&&t.shift()&&2===this.points().length&&this._snapPoint45Degree(e,this.points()[this.points().length-2]),n.prototype.addPoint.call(this,e)},s.prototype.setLastPoint=function(e,t){return t&&t.shift()&&2===this.points().length&&this._snapPoint45Degree(e,this.points()[this.points().length-2]),n.prototype.setLastPoint.call(this,e)},s.prototype.setPoint=function(e,t,i){var r=.5*(this._points[1].price+this._points[2].price);if(i&&i.shift()&&1===e){this._snapPoint45Degree(t,this.points()[0])}if(e<3&&n.prototype.setPoint.call(this,e,t),0!==e&&2!==e){if(1===e){var o=this._points[1].price-r;this._points[2].price=this._points[1].price-2*o}else if(3===e){o=t.price-this._points[2].price;this._points[0].price=this._points[1].price-o,this._points[0].index=t.index}this.normalizePoints()}},s.prototype.canHasAlert=function(){return!0},s.prototype._getAlertPlots=function(){var e=this._points[0],t=this._points[1],i=[];e.index<=t.index?(i.push(e),i.push(t)):(i.push(t),i.push(e));var n=this._points[2];n.time=t.time,n.index=t.index;var r,o,s,a,l={price:n.price+(t.price-e.price),time:e.time,index:e.index},c=[];n.index<=l.index?(c.push(n),c.push(l)):(c.push(l),c.push(n)),i[0].price>c[0].price?(r=i,o=c):c[0].price>i[0].price||c[1].price>i[1].price?(r=c,o=i):(r=i,o=c);var u=this.properties().extendLeft.value(),h=this.properties().extendRight.value();return e.index<=t.index?(s=u,a=h):(s=h,a=u),[this._linePointsToAlertPlot(r,"Upper",s,a),this._linePointsToAlertPlot(o,"Lower",s,a)]},s.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("vm8R").GeneralTrendFiguresDefinitionsViewModel}.bind(null,i)).catch(i.oe)},s.createProperties=function(e){var t=new r("linetooldisjointangle",e);return s._configureProperties(t),t},s._configureProperties=function(e){n._configureProperties(e)},t.LineToolDisjointChannel=s},oNDq:function(e,t,i){"use strict";i.r(t),i.d(t,"createConfirmDialog",(function(){return o}));var n=i("mrSG"),r=(i("YFKU"),{actions:[{key:13,name:"yes",text:window.t("Yes"),type:"success"},{method:"close",name:"no",text:window.t("No"),type:"default"}],actionsWrapTemplate:'
    ',content:window.t("Are you sure?"),contentWrapTemplate:'

    ',destroyOnClose:!0,title:window.t("Confirmation"),width:400,dataset:{"dialog-type":"confirm-dialog"}});function o(e){return new Promise((function(t){Promise.all([i.e("dialogs-core"),i.e(55),i.e(0),i.e(15),i.e("create-dialog")]).then(function(o){var s=i("YDhE").createDialog;t(s(Object(n.__assign)(Object(n.__assign)({},r),e))) +}.bind(null,i)).catch(void 0)}))}},oWyD:function(e,t,i){},oXaB:function(e,t,i){"use strict";var n;i.r(t),i.d(t,"PriceAxisLastValueMode",(function(){return n})),function(e){e[e.LastPriceAndPercentageValue=0]="LastPriceAndPercentageValue",e[e.LastValueAccordingToScale=1]="LastValueAccordingToScale"}(n||(n={}))},ocLq:function(e,t,i){"use strict";(function(t){var n=i("5B3K").StudyError,r=i("Y7w9"),o=i("ogJP").inherit,s=i("E6p6").SessionStage,a=function(){var e="undefined"!=typeof window?window:t,a=e.PineJsCalendar?e.PineJsCalendar:i("jCNj"),l=i("IiTo"),c=i("IDnv").extrapolateBarsFrontToTime,u={};function h(e,t,i,n,r){var o=r,s=0;if(isNaN(e.get(t-1)))return{index:NaN,value:NaN};for(var a=0;a1&&(this._currentIndex.set(o),this._currentValue.set(s),this._pivotIndex.set(a))}function p(e,t,i){this._deviation=e;var n=i.new_var(u.high(i)),r=i.new_var(u.low(i));n.get(2*t+1),r.get(2*t+1),this._pivotHigh=new d(t,t,d.HIGH,n,i),this._pivotLow=new d(t,t,d.LOW,r,i),this._lastVal=i.new_var(NaN),this._lastIndex=i.new_var(-1),this._lastType=i.new_var(),this._index=u.n(i),this._isNewBar=i.symbol.isNewBar,this._isBarClosed=i.symbol.isBarClosed;var o=this._lastIndex.get(1),s=this._lastVal.get(1),a=this._lastType.get(1);this._index>1&&this.addPivot(o,s,a),this.processPivot(this._pivotHigh),this.processPivot(this._pivotLow)}function _(e){this.symbol=e,this.vars=[],this.vars_index=0,this.ctx=[],this.ctx_index=0}function f(e){this.mindepth=0,this.original=NaN,this.modified=!1,this.symbol=e}function m(e){f.call(this,e),this.hist=new Float64Array(2e3),this.hist_pos=-1}function v(e,t,i,n,r,o,s){this.periodBase=n,this.tickerid=e,this.currencyCode=t,this.period=i,this.index=-1,this.time=NaN,this.open=NaN,this.high=NaN,this.low=NaN,this.close=NaN,this.volume=NaN,this.updatetime=NaN,this.isNewBar=!1,this.isBarClosed=!1,this.session=new l.SessionInfo("Etc/UTC","24x7"),this.other_sessions={},this.script=r,this.ticker=v.parseTicker(e);var a=v.parsePeriod(i);this.resolution=a.resolution,this.interval=a.interval,this.bb_cache={},this.minTick=o,this.periodForInitialRange=s}function y(e,t,i,n,r,o,s,a,l,c,u){this.body=s,this.symbols=[],this.runner=o,this.inputCallback=l,this.out=a,this.nonseriesOut=u,this.ctx=new _(this.add_sym(e,t,i,n,c,r)),this.init()}function g(e){this.symbols=[],this.barsets=[],this.subscription=[],this.host=e,this.isRecalculated=!1,this.start()}function b(e){this.runner=new g(e)}function S(e,t){this.info=e,this.bars=t||[],this.isBarClosed=!0}function w(e,t){this.period=e,this.generateEmptyBars=!!t}function P(){}return u.max_series_default_size=10001,u.n=function(e){return e.symbol.index+1},u.nz=function(e,t){return t=t||0,isFinite(e)?e:t}, +u.na=function(e){return 0===arguments.length?NaN:isNaN(e)?1:0},u.isZero=function(e){return Math.abs(e)<=1e-10},u.toBool=function(e){return isFinite(e)&&!u.isZero(e)},u.eq=function(e,t){return u.isZero(e-t)},u.neq=function(e,t){return!u.eq(e,t)},u.ge=function(e,t){return u.isZero(e-t)||e>t},u.gt=function(e,t){return!u.isZero(e-t)&&e>t},u.lt=function(e,t){return!u.isZero(e-t)&&e1e-10},u.less=function(e,t){return t-e>1e-10},u.max=Math.max,u.min=Math.min,u.pow=Math.pow,u.abs=Math.abs,u.log=Math.log,u.log10=function(e){return Math.log(e)/Math.LN10},u.sqrt=Math.sqrt,u.sign=function(e){return isNaN(e)?NaN:u.isZero(e)?0:e>0?1:-1},u.exp=Math.exp,u.sin=Math.sin,u.cos=Math.cos,u.tan=Math.tan,u.asin=Math.asin,u.acos=Math.acos,u.atan=Math.atan,u.floor=Math.floor,u.ceil=Math.ceil,u.round=Math.round,u.avg=function(e,t,i,n,r,o){if(2===arguments.length)return(e+t)/2;for(var s=0,a=0;a=0;--o){var s=t[o];if(!(s>=i.startOfBar(0))){i.moveTo(s);var a=t[o+1];n.push(a)}}n.reverse()}return n},u.iff=function(e,t,i){return u.not(e)?i:t},u.rising=function(e,t){for(var i=1;ie.get(0))return 0;return 1},u.falling=function(e,t){for(var i=1;i=0;r--){n+=(t-r)*e.get(r)}return 2*n/(t*(t+1))},u.vwma=function(e,t,i){var n=i.new_var(u.volume(i)),r=i.new_var(e.get(0)*u.volume(i));return u.sma(r,t,i)/u.sma(n,t,i)},u.swma=function(e,t){return(e.get(0)+2*e.get(1)+2*e.get(2)+e.get(3))/6},u.lowestbars=function(e,t,i){return-h(e,t,0,(function(e,t){return u.lt(e,t)}),Number.MAX_VALUE).index},u.lowest=function(e,t,i){return h(e,t,0,(function(e,t){return u.lt(e,t)}),Number.MAX_VALUE).value},u.highestbars=function(e,t,i){return-h(e,t,0,(function(e,t){return u.gt(e,t)}),Number.MIN_VALUE).index},u.highest=function(e,t,i){return h(e,t,0,(function(e,t){return u.gt(e,t)}),Number.MIN_VALUE).value},u.cum=function(e,t){var i=t.new_var(),n=u.nz(i.get(1))+e;return i.set(n),n},u.accdist=function(e){var t=u.high(e),i=u.low(e),n=u.close(e),r=u.volume(e);return u.cum(n===t&&n===i||t===i?0:r*(2*n-i-t)/(t-i),e)},u.correlation=function(e,t,i,n){var r=u.sma(e,i,n),o=u.sma(t,i,n),s=n.new_var(e.get()*t.get());return(u.sma(s,i,n)-r*o)/Math.sqrt(u.variance2(e,r,i)*u.variance2(t,o,i))},u.stoch=function(e,t,i,n,r){var o=u.highest(t,n),s=u.lowest(i,n);return u.fixnan(100*(e.get()-s)/(o-s),r)},u.tsi=function(e,t,i,n){var r=n.new_var(u.change(e)),o=n.new_var(u.abs(u.change(e))),s=n.new_var(u.ema(r,i,n)),a=n.new_var(u.ema(o,i,n));return u.ema(s,t,n)/u.ema(a,t,n)},u.cross=function(e,t,i){if(isNaN(e)||isNaN(t))return!1 +;var n,r=i.new_var((n=e-t)<0?-1:0===n?0:1);return!isNaN(r.get(1))&&r.get(1)!==r.get()},u.linreg=function(e,t,i){for(var n=0,r=0,o=0,s=0,a=0;athis._currentValue.get():ithis._areaRight},d.prototype.update=function(){if(this._isNewBar&&this.isPivotFound()&&this.reset(),this.processPoint(this._index),this.isRightSideOk(this._index)){if(-1===this._pivotIndex.get()){for(var e=!0,t=0;tthis._deviation&&this.addPivot(e,t,i);else(i===d.HIGH?t>n:t0&&i.set(e),i},_.prototype.new_unlimited_var=function(e){var t=this.vars;t.length<=this.vars_index&&t.push(new m(this.symbol));var i=t[this.vars_index++];return arguments.length>0&&i.set(e),i},_.prototype.new_ctx=function(){return this.ctx.length<=this.ctx_index&&this.ctx.push(new _(this.symbol)),this.ctx[this.ctx_index++]},_.prototype.prepare=function(e){this.ctx_index=0,this.vars_index=0;for(var t=0;te&&(e=i)}return e},_.prototype.stop=function(){this.symbol=null,this.vars=null},f.prototype.valueOf=function(){return this.get(0)},f.prototype.get=function(e){return isNaN(e)&&(e=0),e=e||0,this.hist?e>=this.hist.length?(console.error("not enough depth: "+this),NaN):this._get(e):(this.mindepth=u.max(this.mindepth,e),NaN)},f.prototype._get=function(e){var t=this.hist_pos-e;return t<0&&(t+=this.hist.length),this.hist[t]},f.prototype.set=function(e){this.hist&&(this.hist[this.hist_pos]=e,this.modified=!0)},f.prototype.prepare=function(e){e===this.symbol&&(e.isNewBar?(this.original=this.get(0),!this.modified&&this.hist||this.add_hist()):this.set(this.original), +this.modified=!1)},f.prototype.add_hist=function(){if(!this.hist){var e=u.na(this.mindepth)?u.max_series_default_size:u.max(this.mindepth+1,1);e=Math.round(e);for(var t=new Array(e),i=0;i=0){var n=i.split(",");t=v.parsePeriod(n[1]),i=n[0]}var r=!1,o=!1,s=i[i.length-1];-1==="DWM".indexOf(s)&&("S"===s?o=!0:(r=!0,s=""));var a=parseInt(r?i:i.length>1?i.slice(0,i.length-1):1);return{resolution:s,interval:a,pureResolution:[a,s].join(""),isIntraday:r,isSeconds:o,range:t}},v.newBarBuilder=function(e,t,i){var n=v.parsePeriod(e);return l.newBarBuilder(n.interval+n.resolution,t,i)},v.newSession=function(e){return new l.SessionInfo(e.timezone,e.session,e.holidays,e.corrections)},v.prototype.set_symbolinfo=function(e){for(var t in e||console.error("WARN: symbolinfo isn't defined for "+this.tickerid),this.info=e,this.timezone=a.get_timezone(e.timezone),this.session.init(e.timezone,e.session,e.holidays,e.corrections),this.other_sessions)this.other_sessions.hasOwnProperty(t)&&this.other_sessions[t].init(e.timezone,e.session,e.holidays,e.corrections)},v.prototype.get_session=function(e){if(!e)return this.session;var t=this.other_sessions[e];return t||(t=new l.SessionInfo("Etc/UTC","24x7"),this.other_sessions[e]=t),t},v.prototype.isdwm=function(){return""!==this.resolution&&"S"!==this.resolution},v.prototype.enable_dwm_aligning=function(e,t){this.dwm_aligner=v.newBarBuilder(this.period,e,t)},v.prototype.bartime=function(e,t){var i=this.time;if(e){var n=e;t&&(n+=t);var r=this.bb_cache[n];if(!r){var o=this.get_session(t);r=v.newBarBuilder(e,o),this.bb_cache[n]=r}i=r.alignTime(i)}if(!this.isdwm()||isNaN(i))return i;var s=a.utc_to_cal(this.timezone,i);return this.session.spec.correctTradingDay(s),a.cal_to_utc(this.timezone,s)},v.prototype.lastbar=function(e){if(!isNaN(e.time)){var t=e.time;this.dwm_aligner&&(this.dwm_aligner.moveTo(t),t=this.dwm_aligner.startOfBar(0));var i=this.time!==t;i&&this.index>=0&&!this.isBarClosed&&(this.isNewBar=!1,this.isBarClosed=!0,this.script.calc(this)),this.time=t,this.open=e.open,this.high=e.high,this.low=e.low, +this.close=e.close,this.volume=e.volume,this.updatetime=e.updatetime,this.isNewBar=i,this.isBarClosed=e.isBarClosed,this.isLastBar=e.isLastBar,this.isNewBar&&this.index++,this.script.calc(this)}},y.prototype.calc=function(e){var t=this.ctx,i=this.body;t.prepare(e);var n=i.main(t,this.inputCallback),r=this;this.out&&n&&(!isNaN(t.symbol.time)||n.nonseries)&&(n.nonseries?("projection"===n.type&&(n.projectionTime=t.symbol.time),this.nonseriesOut(t.symbol,n)):n.bars?n.bars.forEach((function(e){r.out(t.symbol,e)})):this.out(t.symbol,n))},y.prototype.init=function(){var e=this.ctx,t=this.body;t.init&&t.init(e,this.inputCallback),t.main(e,this.inputCallback)},y.prototype.add_sym=function(e,t,i,n,r,o){var s=this.runner.add_sym(e,t,i,n,this,r,o);return this.symbols.push(s),s.isdwm()&&this.symbols.length>1&&s.enable_dwm_aligning(this.symbols[0].session,s.session),s},y.prototype.maxAdditionalDepth=function(){return this.ctx.maxAdditionalDepth()},y.prototype.stop=function(){this.symbols=null,this.ctx.stop(),this.ctx=null},y.prototype.get_sym=function(e){return this.symbols[e]},g.prototype.add_sym=function(e,t,i,n,r,o,s){var a=new v(e,t,i,n,r,o,s);return this.symbols.push(a),a},g.prototype.get_sym=function(e){return this.symbols[e]},g.prototype.out=function(e,t){if(this.nonseriesUpdate){var i=Object.assign({},this.nonseriesUpdate);t.splice(0,0,e.time),i.lastBar=t,this.host.nonseriesOut(e,i)}else this.host.out(e,t)},g.prototype.start=function(){var e=this.host;this._script=new y(e.tickerid,e.currencyCode,e.period,e.periodBase||e.period,e.periodForInitialRange,this,e.body,this.out.bind(this),e.input,e.symbolInfo.minmov/e.symbolInfo.pricescale,e.nonseriesOut);var t=this,i=[],n=this.symbols,r=(e.additionalBarsCount||0)+t._script.maxAdditionalDepth();function o(n,o){var s=g.feed.subscribe(n.tickerid,n.currencyCode,n.period,n.periodBase,n.periodForInitialRange,(function(i){"series"===(i.nonseries?"nonseries":"series")?t.update(o,i):i.lastBar?(t.nonseriesUpdate=i,i.lastBar.isLastBar=!0,t.symbols[0].lastbar(i.lastBar),t.nonseriesUpdate=null):e.nonseriesOut(n,i)}),e.onErrorCallback,e.symbolInfo,e.sessionId,e.rangeExtension,r);i.push(s)}for(var s=0;s=0;i--)for(var n=e[i],r=this.barsets[i],o=r.count(),s=0;s=0;i--){var n=this._chartModel.restoreSource(this._restorePanes[i],this._paneIndexes[i],this._paneStates[i],this._sourceStates[i],this._priceScalePositionIds[i]);t.push(n)}t.some((function(i,n){return i.id()!==e._sourceIds[t.length-n-1]}))&&u.logError("Source was restored improperly - source ids does not match"),this._excludeLineToolsUndoCommands.forEach((function(e){return e.undo()}))},t}(o.UndoCommand)},odCa:function(e,t,i){"use strict";var n=i("Ss5c").LineDataSource,r=i("fgLi").DataSource,o=i("tc+8"),s=i("Ocx9").DefaultProperty,a=i("jTis").CalloutConsts,l=window.t("Callout");function c(e,t){var r=t||c.createProperties();n.call(this,e,r),this._barOffset=0,this._timeScale=e.timeScale(),i.e("lt-pane-views").then(function(e){var t=i("B4Hi").CalloutPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}inherit(c,n),c.prototype.pointsCount=function(){return 2},c.prototype.translatedType=function(){return l},c.prototype.name=function(){return"Callout"},c.prototype.correctPoints=function(e){var t=this._currentMovingPoint.index-this._startMovingPoint.index,i=this._currentMovingPoint.price-this._startMovingPoint.price,n=e[1];n.index+=t,n.price+=i,e[1]=n},c.prototype.addPoint=function(e){var t=n.prototype.addPoint.call(this,e);return t&&this._calculateBarOffset(),t},c.prototype._calculateBarOffset=function(){this.points().length>1&&(this._barOffset=this.points()[1].index-this.points()[0].index)},c.prototype.setLastPoint=function(e){n.prototype.setLastPoint.call(this,e),2===this.points().length&&this._calculateBarOffset()},c.prototype.setPoint=function(e,t){switch(e){case 0:n.prototype.setPoint.call(this,e,t),this._calculateBarOffset();break;case 1:var i=this.properties();if(!i.wordWrapWidth)return;var r=this._points,o=this._dragStartLeftEdgeIndex,s=Math.round((t.index-o)/2);if(isFinite(o)&&isFinite(s)){r[1]={index:o+s,price:r[1].price},this._calculateBarOffset(),this.normalizePoints() +;var l=this._timeScale.indexToCoordinate(o+2*s)-this._timeScale.indexToCoordinate(o)-a.RoundRadius-a.TextMargins;if(!isFinite(l))return;i.wordWrapWidth.setValue(Math.max(a.MinWidth,l));break}r[1]=t,this._calculateBarOffset(),this.normalizePoints()}},c.prototype.setPoints=function(e){n.prototype.setPoints.call(this,e);var t=this.properties();if(t.wordWrapWidth){var i=this._dragStartLeftEdgeIndex,r=Math.round((e[1].index-i)/2);if(this._calculateBarOffset(),this.normalizePoints(),isFinite(i)&&isFinite(r)){var o=this._timeScale.indexToCoordinate(i+2*r)-this._timeScale.indexToCoordinate(i)-a.RoundRadius-a.TextMargins;if(!isFinite(o))return;t.wordWrapWidth.setValue(Math.max(a.MinWidth,o))}}},c.prototype._onPointsetUpdated=function(e){n.prototype._onPointsetUpdated.call(this,e),0!==e.length&&(this._dragStartLeftEdgeIndex=this.points()[1].index)},c.prototype.move=function(e,t,i){n.prototype.move.call(this,e,t,i),this._calculateBarOffset()},c.prototype.state=function(e){var t=n.prototype.state.call(this,e);return t.barOffset=this._barOffset,t},c.prototype.restoreData=function(e){e.barOffset?this._barOffset=e.barOffset:this._calculateBarOffset(),this._calculatePoint2()},c.prototype.setPriceScale=function(e){r.prototype.setPriceScale.call(this,e),e&&e.priceRange()&&this._calculatePoint2()},c.prototype.template=function(){var e=n.prototype.template.call(this);return e.text=this.properties().childs().text.value(),e},c.prototype._applyTemplateImpl=function(e){n.prototype._applyTemplateImpl.call(this,e),this.properties().childs().text.setValue(e.text)},c.prototype._calculatePoint2=function(){if(!(this._model.lineBeingEdited()===this||this._model.sourcesBeingMoved().includes(this)||this._points.length<2)){var e=this.points()[0],t=this.points()[1];this._points[1]={price:t.price,index:e.index+this._barOffset}}},c.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("xhf0").CalloutDefinitionsViewModel}.bind(null,i)).catch(i.oe)},c.createProperties=function(e){var t=new s("linetoolcallout",e);return c._configureProperties(t),t},c._configureProperties=function(e){n._configureProperties(e),e.hasChild("text")||e.addChild("text",new o(window.t("Text"))),e.addExclusion("text")},t.LineToolCallout=c},oiZD:function(e,t,i){"use strict";i.r(t);var n=i("hY0g"),r=i.n(n);i.d(t,"watchedTheme",(function(){return o})),i.d(t,"setTheme",(function(){return s}));var o=new r.a;function s(e){o.setValue(e)}o.subscribe((function(e){!function(e,t){void 0===t&&(t=window);for(var i="theme-"+e,n=t.document.documentElement.classList,r=0,o=Array.from(n);rt)return{success:!1};if(e===t)return{success:!0,result:0};var i=this._extrapolatedData.length,n=0!==i?this._extrapolatedData[0]:null,o=null!==n?this._extrapolatedData[i-1]:null,s=eo){var a=Object(r.extrapolateBarsFrontToTime)(this._barBuilder(),o||1e3*e,1e3*t,2e3,!0);this._extrapolatedData=this._extrapolatedData.concat(a.times),i=this._extrapolatedData.length,this._cacheForFuture=s}if((o=this._extrapolatedData[i-1])<1e3*t)return{success:!1};var l=this._extrapolatedData.indexOf(1e3*t);return-1===l?{success:!1}:{success:!0,result:l}},e.prototype.projectTime=function(e,t){if(!this.isValid())return e;var i=this._extrapolatedData.length,n=i>0?this._extrapolatedData[0]:null,o=null!==n?this._extrapolatedData[i-1]:null,s=t>=0;1e3*e===n&&this._cacheForFuture===s||(this._extrapolatedData=[1e3*e],i=1,n=null,o=null);var a=Math.abs(t);if(null===n||a>=i){var l=Object(r.extrapolateBarsFrontByCount)(this._barBuilder(),o||1e3*e,Math.sign(t)*(a-i+1),!0);this._extrapolatedData=this._extrapolatedData.concat(l.times),i=this._extrapolatedData.length,this._cacheForFuture=s}return ii.zorder()}));if(0===n.length)throw new Error("Cannot bring forward source that alreadt on back");var r=n[0];if(Object(m.isLineTool)(r)){var o=e.model().lineToolsGroupModel().groupForLineTool(r);if(null!==o){var s=o.lineTools();r=s[s.length-1]}}return r}var B=function(e){function t(t,i,n){return e.call(this,t,n,D(i,n),"Send "+n[0].title()+" backward")||this}return Object(n.__extends)(t,e),t}(L);function R(e,t){return Object(r.ensureNotNull)(e.paneForSource(t.lineTools()[0]))}var N=function(e){function t(t,i){return e.call(this,t,i.lineTools(),E(R(t,i),i.lineTools()),"Send Group "+i.name()+" backward")||this}return Object(n.__extends)(t,e),t}(k),F=function(e){function t(t,i){return e.call(this,t,i.lineTools(),D(R(t,i),i.lineTools()),"Bring Group "+i.name()+" backward")||this}return Object(n.__extends)(t,e),t}(L),j=i("ogJP"),W=function(e){function t(t,i,n){var r=e.call(this,"Rearrange panes")||this;return r._chartModel=t,r._index=i,Object(j.isNumber)(n)?r._dstIndex=n:r._dstIndex="up"===n?i-1:i+1,r}return Object(n.__extends)(t,e),t.prototype.redo=function(){this._checkIndices()&&this._chartModel.movePane(this._index,this._dstIndex)}, +t.prototype.undo=function(){this._checkIndices()&&this._chartModel.movePane(this._dstIndex,this._index)},t.prototype._checkIndices=function(){var e=this._chartModel.panes().length;return this._index>=0&&this._index=0&&this._dstIndext.zorder()?e:t}),i[0]),o=n,s=t.lineToolsGroupModel().groupForLineTool(n);if(null!==s){var a=s.lineTools();o=a[a.length-1]}this._environment.beginUndoMacro(ae);var l=new Map,c=new Set;i.forEach((function(i){var n=e._groupForLineTool(i);if(null!==n){var o=l.get(n)||[];o.push(i),l.set(n,o);var s=Object(r.ensureNotNull)(t.paneForSource(i));c.add(s)}})),Object(r.assert)(c.size<=1,"All selected sources should be on the same pane"),l.forEach((function(i,n){var r=new g.a(t,n,i);e._environment.pushUndoCommand(r)}));var u=new te(t,Object(P.sortSources)(i));this._environment.pushUndoCommand(u);var h=new O(t,i,o);this._environment.pushUndoCommand(h),this._environment.endUndoMacro();var d=Object(r.ensureNotNull)(u.createdGroupId());return Object(r.ensureNotNull)(t.lineToolsGroupModel().groupForId(d))},e.prototype.removeGroup=function(e){var t=this._environment.model(),i=e.lineTools();this._environment.beginUndoMacro(le.format({name:e.name()}));var n=new $(t,e,"");this._environment.pushUndoCommand(n);var o=new y.RemoveSourcesCommand(t,i,"");this._environment.pushUndoCommand(o),i.forEach((function(e){null!==e.getLinkKey()&&Object(se.removeLineTool)({model:t,linkKey:Object(r.ensureNotNull)(e.getLinkKey())})})),this._environment.endUndoMacro()},e.prototype.groups=function(){return this._environment.model().lineToolsGroupModel().groups()},e.prototype.excludeLineToolFromGroup=function(e,t){var i=this._environment.model(),n=new g.a(i,e,[t]);this._environment.pushUndoCommand(n)},e.prototype.addLineToolToGroup=function(e,t){var i=this._environment.model(),n=i.lineToolsGroupModel().groupForLineTool(t);if(n!==e){var r=ce.format({lineTool:t.title(),name:e.name()});this._environment.beginUndoMacro(r),null!==n&&this._environment.pushUndoCommand(new g.a(i,n,[t])),this._environment.pushUndoCommand(new ne(i,e,[t])),this._environment.endUndoMacro()}},e.prototype.bringToFront=function(e){var t=this._environment.model(),i=new I(t,e.lineTools());this._environment.pushUndoCommand(i),this._environment.emitEvent("changeZOrder",[e.lineTools()])},e.prototype.sendToBack=function(e){var t=this._environment.model(),i=new M(t,e.lineTools());this._environment.pushUndoCommand(i),this._environment.emitEvent("changeZOrder",[e.lineTools()])}, +e.prototype.bringForward=function(e){var t=this._environment.model(),i=new F(t,e);this._environment.pushUndoCommand(i),this._environment.emitEvent("changeZOrder",[e.lineTools()])},e.prototype.sendBackward=function(e){var t=this._environment.model(),i=new N(t,e);this._environment.pushUndoCommand(i),this._environment.emitEvent("changeZOrder",[e.lineTools()])},e.prototype.insertAfter=function(e,t){var i,n=this._environment.model();if(t instanceof Q.a){var r=t.lineTools();i=r[r.length-1]}else i=t;var o=new O(n,e.lineTools(),i);this._environment.pushUndoCommand(o),this._environment.emitEvent("changeZOrder",[e.lineTools()])},e.prototype.insertBefore=function(e,t){var i,n=this._environment.model();t instanceof Q.a?i=t.lineTools()[0]:i=t;var r=new A(n,e.lineTools(),i);this._environment.pushUndoCommand(r),this._environment.emitEvent("changeZOrder",[e.lineTools()])},e.prototype.availableZOrderOperations=function(e){var t=this._environment.model(),i=e.lineTools(),n=i[0],o=i[i.length-1],s=Object(r.ensureNotNull)(t.paneForSource(i[0])).allOrderedSourcesWithoutSpecial(),a=s[0],l=s[s.length-1];return{bringForwardEnabled:o!==l,bringToFrontEnabled:o!==l,sendBackwardEnabled:n!==a,sendToBackEnabled:n!==a}},e.prototype.setGroupVisibility=function(e,t){var i=this,n=(t?ue:he).format({group:e.name()}),r=this._environment.model();this._environment.beginUndoMacro(n),e.lineTools().forEach((function(e){var n=e.properties().visible,o=new re.SetPropertyUndoCommand(n,t,"",r);i._environment.pushUndoCommand(o)})),this._environment.endUndoMacro()},e.prototype.setGroupLock=function(e,t){var i=this,n=(t?de:pe).format({group:e.name()}),r=this._environment.model();this._environment.beginUndoMacro(n),e.lineTools().forEach((function(e){var n=e.properties().frozen,o=new re.SetPropertyUndoCommand(n,t,"",r);i._environment.pushUndoCommand(o)})),this._environment.endUndoMacro()},e.prototype.setGroupName=function(e,t){var i=this._environment.model(),n=_e.format({group:e.name(),newName:t}),r=new oe(i,e,t,n);this._environment.pushUndoCommand(r)},e.prototype.canBeGroupped=function(e){var t=this._environment.model();return new Set(e.map((function(e){return t.paneForSource(e)}))).size<=1},e.prototype._groupForLineTool=function(e){return this._environment.model().lineToolsGroupModel().groups().find((function(t){return t.containsLineTool(e)}))||null},e}(),me=i("3ClC"),ve=i("pQ+n"),ye=window.t("Apply study template {template}"),ge=function(e){function t(t,i,n){var r=e.call(this,ye.format({template:n}))||this;return r._model=t,r._templateContent=i,r._initialState=t.studyTemplate(!0,!0),r._initialGroupsState=t.lineToolsGroupModel().state(),r}return Object(n.__extends)(t,e),t.prototype.redo=function(){var e=this._merge(this._templateContent).filter(m.isLineTool);this._model.lineToolsGroupModel().removeLineTools(e),this._model.mainSeries().onChartStyleChanged();var t=this._model.mainSeries().properties();Object(G.preparePriceAxisProperties)(t),this._model.recalcVisibleRangeStudies(!0),this._model.setShouldBeSavedEvenIfHidden(!0)},t.prototype.undo=function(){ +this._merge(this._initialState),this._model.mainSeries().onChartStyleChanged()},t.prototype._merge=function(e){var t=this._model,i=t.mainSeries();if(i.priceScale().properties().childs().lockScale.setValue(!1),this._initialState.symbol&&e.symbol&&i.properties().symbol.setValue(e.symbol),this._initialState.symbol&&e.interval){var n=Object(G.getChartStyleByResolution)(e.interval,i.properties().style.value());i.setChartStyleWithIntervalIfNeeded(n,e.interval)}for(var r=t.panes(),o=[],s=r.length;s--;)for(var a=(f=r[s]).containsMainSeries(),l=(g=f.dataSources()).length;l--;){var c=g[l];(!a||Object(me.isStudy)(c)&&c.isRemovedByStudyTemplates())&&o.push(c)}t.resetDeferredStudies();for(var u=Object(ve.a)(t,o),h=0;h1?"Remove drawings group":"Remove "+e[0].title();this.removeSources(e,!1,t)}},t.prototype.removeSources=function(e,t,i,n){var o=this;n||(e=e.filter((function(e){return e.isUserDeletable()})));var s=this._model(),a=s.lineToolsGroupModel();this.beginUndoMacro(i),s.selectionMacro((function(n){var l=new Map;e.forEach((function(e){if(Object(m.isLineTool)(e)){var t=a.groupForLineTool(e);if(null!==t){var i=l.get(t)||[];i.push(e),l.set(t,i)}null!==e.getLinkKey()&&Object(se.removeLineTool)({model:o.model(),linkKey:Object(r.ensureNotNull)(e.getLinkKey())})}})),l.forEach((function(e,t){var i=new g.a(s,t,e);o._pushUndoCommand(i)}));var c=new y.RemoveSourcesCommand(s,e,i),u=c.removedIds();o._pushUndoCommand(c),!t&&u.length>0&&(1===u.length?o.emitEvent("removeSource",[u[0]]):o.emitEvent("removeSources",[u]))})),this.endUndoMacro()},t.prototype.mergeSourceUp=function(e){var t=new w.c(this._model(),e,"Merge up");this._mergeUnmergeSource(e,t)},t.prototype.mergeSourceDown=function(e){var t=new w.a(this._model(),e,"Merge down");this._mergeUnmergeSource(e,t)},t.prototype.mergeToPane=function(e,t){var i=this._model().panes().indexOf(t),n=new w.b(this._model(),e,i,"Merge to pane");this._mergeUnmergeSource(e,n)},t.prototype.unmergeSourceUp=function(e){var t=new S.c(this._model(),e,"Unmerge up");this._mergeUnmergeSource(e,t)},t.prototype.unmergeSourceDown=function(e){var t=new S.a(this._model(),e,"Unmerge down");this._mergeUnmergeSource(e,t)},t.prototype.unmergeToNewBottomPane=function(e){var t=new S.b(this._model(),e,"Unmerge to new bottom pane");this._mergeUnmergeSource(e,t)},t.prototype.availableZOrderOperations=function(e){var t=this._model().lineToolsGroupModel(),i=e.filter(m.isLineTool),n=i.map((function(e){return t.groupForLineTool(e)}));Object(r.assert)(new Set(n).size<=1,"Cannot move line tools from different group");for(var o=0===n.length?null:n[0],s={bringForwardEnabled:!1,bringToFrontEnabled:!1,sendBackwardEnabled:!1,sendToBackEnabled:!1},a=new Set(i),l=function(e){if(Object(m.isLineTool)(e)&&null!==o){var t=Object(P.sortSources)(o.lineTools().filter((function(t){return!a.has(t)||t===e})));return s=je(s,{bringForwardEnabled:e!==t[t.length-1],bringToFrontEnabled:e!==t[t.length-1],sendBackwardEnabled:e!==t[0],sendToBackEnabled:e!==t[0]}),"continue"}var i=Object(r.ensureNotNull)(c._model().paneForSource(e)).allOrderedSourcesWithoutSpecial();if(0===i.length)return"continue";var n=e.zorder(),l=i[0].zorder(),u=i[i.length-1].zorder();s=je(s,{bringForwardEnabled:n!==u,bringToFrontEnabled:n!==u,sendBackwardEnabled:n!==l,sendToBackEnabled:n!==l})},c=this,u=0,h=Object(P.sortSources)(e);u20&&(this._pushUndoCommand(new H.a(this.model(),this._initialTimeScrollState,"Scroll Time")),this._initialTimeScrollPos=null,this._initialTimeScrollState=null,t=!0),this.model().scrollTimeTo(e),t},t.prototype.endScrollTime=function(){this.model().endScrollTime(),this._initialTimeScrollPos=null,this._initialTimeScrollState=null},t.prototype.startScaleTime=function(e){var t=this.timeScale(),i={rightOffset:t.rightOffset(),barSpacing:t.barSpacing()};this._pushUndoCommand(new H.a(this.model(),i,"Scale Time")),this.model().startScaleTime(e)},t.prototype.scaleTimeTo=function(e){this.model().scaleTimeTo(e)},t.prototype.endScaleTime=function(){this.model().endScaleTime()},t.prototype.resetTimeScale=function(){var e=this.timeScale(),t={rightOffset:e.rightOffset(),barSpacing:e.barSpacing()};this._pushUndoCommand(new H.a(this.model(),t,"Reset Time Scale")),this.model().resetTimeScale()},t.prototype.rearrangePanes=function(e,t){var i=new W(this._model(),e,t);this._pushUndoCommand(i)},t.prototype.movePane=function(e,t){var i=new W(this._model(),e,t);this._pushUndoCommand(i)},t.prototype.pasteSourceFromClip=function(e,t,i){var n=t||Object(x.get)();if(!n||0===n.sources.length)return null;var o=e||Object(r.ensureNotNull)(this.model().paneForSource(this.mainSeries()));if(!n.sources.some((function(e){return"drawing"!==e.type||null!==o.clipboardLineToolOwnerSource(e.source.id)})))return null;this.beginUndoMacro("Paste "+n.title);for(var s=0,a=[],l=0,u=n.sources;l'},p1SQ:function(e,t,i){"use strict";i.r(t),i.d(t,"LineToolHorzLinePriceAxisView",(function(){return r}));var n=i("mrSG"),r=function(e){function t(t){var i=e.call(this)||this;return i._source=t,i}return Object(n.__extends)(t,e),t.prototype._updateRendererData=function(e,t,i){e.visible=!1;var n=this._source.points(),r=this._source.priceScale();if(0!==n.length&&null!==r&&!r.isEmpty()){var o=n[0];if(isFinite(o.price)){var s=this._source.ownerSource(),a=null!==s?s.firstValue():null;if(null!==a){var l=this._source.properties().linecolor.value();i.background=l, +i.color=this.generateTextColor(l),i.coordinate=r.priceToCoordinate(o.price,a),e.text=r.formatPrice(o.price,a),e.visible=!0}}}},t}(i("KcY8").a)},pJOz:function(e,t,i){"use strict";i.r(t),i.d(t,"drawCircle",(function(){return h})),i.d(t,"drawArrow",(function(){return d})),i.d(t,"TrendLineRenderer",(function(){return p}));var n=i("Eyy1"),r=i("GEp6"),o=i("VaSN"),s=i("a7Ha"),a=i("VdBB"),l=i("jFln"),c=i("Zp/P"),u=i("gAom");function h(e,t,i,n,r){t.save(),t.fillStyle="#000000",t.beginPath(),t.arc(e.x*r,e.y*r,i*r,0,2*Math.PI,!1),t.fill(),n.strokeWidth&&(t.lineWidth=n.strokeWidth,t.stroke()),t.restore()}function d(e,t,i,n,r){if(!(t.subtract(e).length()<1))for(var o=Object(c.getArrowPoints)(e,t,n,!1),s=0;s0&&(c[0].x===c[1].x?Object(u.drawVerticalLine)(e,Math.round(c[0].x*n),c[0].y*n,c[1].y*n):c[0].y===c[1].y?Object(u.drawHorizontalLine)(e,Math.round(c[0].y*n),c[0].x*n,c[1].x*n):Object(l.drawLine)(e,c[0].x*n,c[0].y*n,c[1].x*n,c[1].y*n)),i.overlayLineEndings&&this._drawEnds(e,a,i.linewidth,n)}},e.prototype.hitTest=function(e,t){var i=this._data;if(null===i)return null;if("points"in i&&i.points.length<2)return null;if("floatPoints"in i&&i.floatPoints.length<2)return null;var n=Object(o.lastEventIsTouch)()?24:3,s="floatPoints"in i?i.floatPoints:i.points,a=s[0],l=s[1],c=this._extendAndClipLineSegment(a,l,t);if(null!==c&&Object(r.distanceToSegment)(c[0],c[1],e).distance<=n)return this._hittest;return null},e.prototype._extendAndClipLineSegment=function(e,t,i){var r=Object(n.ensureNotNull)(this._data);return Object(c.extendAndClipLineSegment)(e,t,i.cssWidth,i.cssHeight,r.extendleft,r.extendright)},e.prototype._drawEnds=function(e,t,i,r){var o=t[0],a=t[1],l=Object(n.ensureNotNull)(this._data);switch(l.leftend){case s.LineEnd.Arrow:d(a,o,e,i,r);break;case s.LineEnd.Circle:h(o,e,i,Object(n.ensureDefined)(l.endstyle),r)}switch(l.rightend){case s.LineEnd.Arrow:d(o,a,e,i,r);break;case s.LineEnd.Circle:h(a,e,i,Object(n.ensureDefined)(l.endstyle),r)}},e}()},pKDv:function(e,t,i){"use strict";var n=i("Ss5c").LineDataSource,r=i("Ocx9").DefaultProperty,o=window.t("ABCD Pattern");function s(e,t){this._constructor="LineToolABCD";var r=t||s.createProperties();n.call(this,e,r),i.e("lt-pane-views").then(function(e){var t=i("bFMU").ABCDPaneView +;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}inherit(s,n),s.prototype.pointsCount=function(){return 4},s.prototype.translatedType=function(){return o},s.prototype.name=function(){return"ABCD Pattern"},s.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("y4pE").AbcdPatternDefinitionsViewModel}.bind(null,i)).catch(i.oe)},s.createProperties=function(e){var t=new r("linetoolabcd",e);return s._configureProperties(t),t},s._configureProperties=function(e){n._configureProperties(e)},t.LineToolABCD=s},pPtI:function(e,t,i){"use strict";i.r(t),i.d(t,"normalizeIntervalString",(function(){return m})),i.d(t,"isAvailable",(function(){return v})),i.d(t,"setLastUsedResolution",(function(){return y})),i.d(t,"getRangeResolution",(function(){return g})),i.d(t,"getTimeBasedResolution",(function(){return b})),i.d(t,"getDefaultResolution",(function(){return S})),i.d(t,"getResolutionByChartStyle",(function(){return w})),i.d(t,"getServerInterval",(function(){return P})),i.d(t,"isResolutionMultiplierValid",(function(){return C})),i.d(t,"getMaxResolutionValue",(function(){return T})),i.d(t,"getResolutionsFromSettings",(function(){return I})),i.d(t,"convertResolutionsFromSettings",(function(){return M})),i.d(t,"mergeResolutions",(function(){return L})),i.d(t,"sortResolutions",(function(){return O})),i.d(t,"getCustomResolutions",(function(){return E})),i.d(t,"getTranslatedResolution",(function(){return V})),i.d(t,"getTranslatedResolutionModel",(function(){return D}));i("bSeV"),i("YFKU");var n,r,o,s=i("LxhU"),a=i("n5al"),l=i("Vdly"),c=i("PT1i"),u=i("IVMC"),h=i.n(u),d=i("ogJP"),p=((n={})[s.ResolutionKind.Seconds]=60,n[s.ResolutionKind.Minutes]=1440,n[s.SpecialResolutionKind.Hours]=24,n[s.ResolutionKind.Days]=365,n[s.ResolutionKind.Weeks]=52,n[s.ResolutionKind.Months]=12,n[s.ResolutionKind.Range]=1e5,n[s.ResolutionKind.Invalid]=NaN,n),_=((r={})[s.ResolutionKind.Seconds]=1,r[s.ResolutionKind.Minutes]=2,r[s.SpecialResolutionKind.Hours]=3,r[s.ResolutionKind.Days]=4,r[s.ResolutionKind.Weeks]=5,r[s.ResolutionKind.Months]=6,r[s.ResolutionKind.Range]=7,r[s.ResolutionKind.Invalid]=8,r),f=((o={})[s.ResolutionKind.Invalid]="",o[s.ResolutionKind.Seconds]=window.t("s",{context:"interval_short"}),o[s.ResolutionKind.Minutes]=window.t("m",{context:"interval_short"}),o[s.SpecialResolutionKind.Hours]=window.t("h",{context:"interval_short"}),o[s.ResolutionKind.Days]=window.t("D",{context:"interval_short"}),o[s.ResolutionKind.Weeks]=window.t("W",{context:"interval_short"}),o[s.ResolutionKind.Months]=window.t("M",{context:"interval_short"}),o[s.ResolutionKind.Range]=window.t("R",{context:"interval_short"}),o);function m(e){return s.Interval.parse(e).value()}function v(e){if(s.Interval.isRange(e))return!0;var t=m(e),i=c.linking.supportedResolutions.value(),n=!1;void 0!==i?n=-1!==i.map(m).indexOf(t):n=!0;return(c.linking.intraday.value()||s.Interval.isDWM(e))&&n}function y(e){ +s.Interval.isValid(e)&&(s.Interval.isRange(e)?l.setValue("chart.lastUsedRangeResolution",e):l.setValue("chart.lastUsedTimeBasedResolution",e))}function g(e){var t=l.getValue("chart.lastUsedRangeResolution");if(void 0!==t&&s.Interval.isRange(t))return t;for(var i="100R",n=0,r=e;n0},re.prototype.onTagsChanged=function(){return this._tagsChanged},re.prototype.onSymbolIntervalChanged=function(){return this._symbolIntervalChanged},re.prototype.onIntervalChanged=function(){return this._intervalChanged},re.prototype.onStatusChanged=function(){return this._onStatusChanged},re.prototype.onStyleChanged=function(){return this._onStyleChanged},re.prototype.onRestarted=function(){return this._onRestarted},re.prototype.onBoxSizeChanged=function(){return this._boxSizeChanged},re.prototype.status=function(){return this._status},re.prototype.isDWM=function(){ +if(null!==this._isDWMCached)return this._isDWMCached;var e=H.parse(this._properties.interval.value());if(e.isDWM())this._isDWMCached=!0;else{var t=e.isSeconds()?e.multiplier():60*e.multiplier();this._isDWMCached=!(t<216e3)}return this._isDWMCached},re.prototype.lastPriceLabelFixedCoordinate=function(){return this._priceAxisViews[0]._fixedCoordinate},re.prototype.createPaneView=function(){this._paneView=null,this._projectionBarsPaneView=null,this._waterlineView=null,this._priceLineView=this.hasClosePrice()?new Y(this):null;var e=this._properties.style.value();switch(e){case re.STYLE_BARS:this._paneView=new f(this,this.m_model);break;case re.STYLE_CANDLES:this._paneView=new _(this,this.m_model);break;case re.STYLE_LINE:this._paneView=new d(this,this.m_model);break;case re.STYLE_AREA:this._paneView=new h(this,this.m_model);break;case re.STYLE_HEIKEN_ASHI:this._paneView=new m(this,this.m_model);break;case re.STYLE_HOLLOW_CANDLES:this._paneView=new p(this,this.m_model);break;case re.STYLE_BASELINE:this._paneView=new v(this,this.m_model),this._waterlineView=new g(this);break;case re.STYLE_HILO:this._paneView=new y(this,this.m_model)}if(null===this._paneView)throw Error("Unknown chart style assigned: "+e)},re.prototype._clearStylePlot=function(e,t){if(0!==e.size()){var i=t||o(e.firstIndex()),n=o(e.lastIndex())+1;e.range(i,n).each((function(e,t){t[TradingView.STYLE_PLOT]=null}))}},re.prototype.invalidateBarStylesCache=function(e){D.logDebug("Invalidate style cache starting from "+e),this._clearStylePlot(this.m_data.m_bars,e),this._clearStylePlot(this.m_data.m_nsBars)},re.prototype.invalidateBarColorerCache=function(){delete this._barColorerCache,this.invalidateBarStylesCache()},re.prototype.barColorer=function(){if(this._barColorerCache)return this._barColorerCache;for(var e=null,t=this.m_model.dataSources().length-1;t>=0;t--){var i=this.m_model.dataSources()[t];if(i.metaInfo&&TradingView.isInherited(i.constructor,TradingView.Study)&&i.hasBarColorer()&&i.properties().visible.value()){var n=i.barColorer();null===e?e=n:e.pushBackBarColorer(n)}}return null===e?e=new w(this):e.pushBackBarColorer(new w(this)),this._barColorerCache=e,this._barColorerCache},re.prototype.properties=function(){return this._properties},re.prototype._barsState=function(e){var t=e.state();return t.data.forEach((function(e){e.value.splice(7,1)})),t},re.prototype.state=function(e){var t={type:this===this.m_model.mainSeries()?"MainSeries":TradingView.className(this.constructor),id:this.id(),state:this.properties().state(),zorder:this.zorder(),haStyle:this._haStyle,renkoStyle:this._renkoStyle,pbStyle:this._pbStyle,kagiStyle:this._kagiStyle,pnfStyle:this._pnfStyle,rangeStyle:this._rangeStyle};return this._symbolInfo&&this._symbolInfo.ticker&&(t.state.symbol=this._symbolInfo.ticker),e&&(t.bars=this._barsState(this.m_data.m_bars),t.nsBars=this._barsState(this.m_data.m_nsBars),t.symbolInfo=this._symbolInfo,t.rtPrice=this.data().lastProjectionPrice),t.boxSize=this.data().boxSize,t.reversalAmount=this.data().reversalAmount, +t.currencyId=this.properties().currencyId.value(),t},re.prototype.restoreState=function(e,t){t&&this._setStatus(re.STATUS_SNAPSHOT),this._properties.mergeAndFire(e.state),e.currencyId&&this.properties().currencyId.setValue(e.currencyId),this._prevChartStyle=this.properties().style.value(),this.createPaneView(),t&&this.restoreData(e.bars,e.nsBars,e.symbolInfo,e.rtPrice,e.boxSize,e.reversalAmount)},re.prototype.hasStateForAlert=function(){return!1},re.prototype.stateForAlert=function(){throw new Error("Not implemented")},re.prototype.idForAlert=function(){return s.prototype.idForAlert.call(this)},re.prototype.restoreData=function(e,t,i,n,r,o){this._status=re.STATUS_SNAPSHOT,this.m_data.m_bars.restoreState(e),this.m_data.m_nsBars.restoreState(t),this.updateSymbolInfo(i,!1),this.m_data.lastProjectionPrice=n,this.m_data.boxSize=r,r||(this.properties().style.value()===re.STYLE_PNF?this.m_data.boxSize=this.properties().pnfStyle.inputs.boxSize.value():this.properties().style.value()===re.STYLE_RENKO&&(this.m_data.boxSize=this.properties().renkoStyle.inputs.boxSize.value())),this.m_data.reversalAmount=o,o||this.properties().style.value()===re.STYLE_KAGI&&(this.m_data.reversalAmount=this.properties().kagiStyle.inputs.reversalAmount.value()),this._loading=!1},re.prototype.setProperties=function(e){e.timeframe||e.merge({timeframe:""}),e.shortName||e.merge({shortName:""}),e.currencyId||e.addChild("currencyId",new n(null)),this._properties=e,this._properties.symbol.listeners().subscribe(this,re.prototype.changeSymbol),this._properties.interval.listeners().subscribe(this,re.prototype.changeInterval),this._properties.currencyId.listeners().subscribe(this,re.prototype.changeCurrency),this._properties.timeframe.listeners().subscribe(this,re.prototype.changeTimeFrame),this._properties.listeners().subscribe(this,re.prototype.changeProperties)},re.prototype.changeSymbol=function(){this.setSymbolIntervalCurrencyDelayed(),this.m_model.checkLineToolSelection()},re.prototype.changeInterval=function(){this.setSymbolIntervalCurrencyDelayed()},re.prototype.changeCurrency=function(){this.setSymbolIntervalCurrencyDelayed(),this.m_model.checkLineToolSelection(),this._currencyChanged.fire()},re.prototype.changeTimeFrame=function(){A("GUI","Change timeframe")},re.prototype.title=function(){return this.properties().symbol.value()+", "+E(this.properties().interval.value())},re.prototype.changeProperties=function(e){e!==this._properties.symbol&&e!==this._properties.interval&&e!==this._properties.timeframe&&(this._tagsChanged.fire(),this.createPaneView(),this.updateAllViews(),this.m_model.updateSource(this),J.emit("series_properties_changed",this._id))},re.prototype._makeNextSymbolId=function(){return"symbol_"+this._nextSymbolId++},re.prototype._makeNextSeriesId=function(){return"s"+this._nextSeriesId++},re.prototype.onData=function(e){var t=this;switch(e.method){case"symbol_resolved":if(e.params[0]!==this._symbolId){D.logNormal("command for old symbol. Expected:"+this._symbolId+", actual"+e.params[0]);break}this.updateSymbolInfo(e.params[1],!1), +this.m_model.updateSource(this),this._dataEvents.fireSymbolResolved(this._symbolInfo),this.m_model.realignLineTools(),TradingView.onWidget()||(A("Symbol",e.params[1].listed_exchange,e.params[1].name),A("Symbol Type",e.params[1].type,e.params[1].listed_exchange));var i=this.symbolInfo().minmov/this.symbolInfo().pricescale,n=this.properties();n.style.value()===re.STYLE_RENKO&&n.renkoStyle.inputs.boxSize.value()=0?0:1,basedOnPrevClose:r.change>=0?0:1}}}else{var o=this._study.data().search(i-1,h.PlotRowSearchMode.NearestLeft,1),s=o&&o.value[4]||null;if(null!==s)return{values:{change:e-s,percentChange:Object(_.a)(s,e)},priceDirection:{basedOnCurrentBar:e>=t?0:1,basedOnPrevClose:e>=s?0:1}}}return{priceDirection:{basedOnCurrentBar:e>=t?0:1,basedOnPrevClose:e>=t?0:1}}},e.prototype._color=function(e,t,i){var n=Object(l.resetTransparency)(f.SeriesBarColorer.upColor(this._study.properties())),r=Object(l.resetTransparency)(f.SeriesBarColorer.downColor(this._study.properties()));if(i&&!v)return t.priceDirection?n:r;var o=this._study.properties().childs().style.value();if(10===o){var s=this._study.barColorer().barStyle(e,!1);return null!=s.barBorderColor?Object(l.resetTransparency)(s.barBorderColor):Object(l.resetTransparency)(s.barColor)}var a=!1;return 0===o?a=this._study.properties().childs().barStyle.childs().barColorsOnPrevClose.value():1===o?a=this._study.properties().childs().candleStyle.childs().barColorsOnPrevClose.value():9===o&&(a=!0),a?0===t.priceDirection.basedOnPrevClose?n:r:0===t.priceDirection.basedOnCurrentBar?n:r},e}();i.d(t,"OverlayLegendValuesProvider",(function(){return w}));var w=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n._showBarChange=i.properties().paneProperties.legendProperties.showBarChange,n._showSeriesOHLC=i.properties().paneProperties.legendProperties.showSeriesOHLC,n._seriesStyle=t.properties().childs().style,n}return Object(n.__extends)(t,e),t.prototype.getValues=function(t){var i=e.prototype.getValues.call(this,t);if(!this._showLastPriceAndChangeOnly()){var n=Object(r.isPriceSourceStyle)(this._seriesStyle.value()),o=this._showSeriesOHLC.value(),s=o&&!n,a=o&&n;i[0].visible=s,i[1].visible=s,i[2].visible=s,i[3].visible=s,i[6].visible=this._showBarChange.value(),i[4].visible=a}return i},t}(S)},qcGP:function(e,t,i){"use strict";var n=i("Ss5c").LineDataSource,r=i("Ocx9").DefaultProperty,o=window.t("Parallel Channel");function s(e,t){var r=t||s.createProperties();n.call(this,e,r),i.e("lt-pane-views").then(function(e){var t=i("9FRF").ParallelChannelPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}inherit(s,n),s.prototype.addPoint=function(e){ +var t=n.prototype.addPoint.call(this,e);if(t){var i=this.points()[0];this._points[2].index=i.index,this._points[2].price=i.price+this._priceOffset}return t},s.prototype.calculatePriceDiff=function(){if(3===this.points().length){var e=this.points()[0],t=this.points()[1],i=this.points()[2];if(e.index===t.index)return;var n=this.priceScale();if(null===n)return;if(n.isLog()){var r=this._model.timeScale();if(r.isEmpty())return;var o=this.ownerSource().firstValue(),s=r.indexToCoordinate(e.index),a=r.indexToCoordinate(t.index),l=n.priceToCoordinate(e.price,o),c=n.priceToCoordinate(t.price,o),u=l+(m=(c-l)/(a-s))*(r.indexToCoordinate(i.index)-s),h=n.priceToCoordinate(i.price,o)-u,d=(o=this.ownerSource().firstValue(),.5*(l+c)),p=n.coordinateToPrice(d,o),_=d+h,f=n.coordinateToPrice(_,o);this._priceOffset=f-p}else{var m=(t.price-e.price)/(t.index-e.index),v=e.price+m*(i.index-e.index);this._priceOffset=i.price-v}}},s.prototype.setLastPoint=function(e,t){t&&t.shift()&&2===this.points().length&&this._snapPoint45Degree(e,this.points()[0]),n.prototype.setLastPoint.call(this,e),this.calculatePriceDiff()},s.prototype.restorePoints=function(e,t,i){n.prototype.restorePoints.call(this,e,t,i),e&&e.length>=3&&(this._priceOffset=e[2].price-e[0].price)},s.prototype.setPoint=function(e,t,i){i&&i.shift()&&e<2&&this._snapPoint45Degree(t,this.points()[1-e]),n.prototype.setPoint.call(this,e,t,i),2===e&&this.calculatePriceDiff();var r=this.points()[0];this._points[2].index=r.index,this._points[2].price=r.price+this._priceOffset,this.normalizePoints()},s.prototype.setPoints=function(e){n.prototype.setPoints.call(this,e),this.calculatePriceDiff()},s.prototype.pointsCount=function(){return 3},s.prototype.translatedType=function(){return o},s.prototype.name=function(){return"Parallel Channel"},s.prototype.hasEditableCoordinates=function(){return!1},s.prototype.addPoint=function(e,t){return t&&t.shift()&&2===this.points().length&&this._snapPoint45Degree(e,this.points()[0]),n.prototype.addPoint.call(this,e,t)},s.prototype.fixAfterRestorePriceAxis=function(){this.priceScale().isLog()||delete this._priceOffset},s.prototype.cloneData=function(e){this._priceOffset=e._priceOffset},s.prototype.restoreData=function(e){e.priceOffset&&(this._priceOffset=e.priceOffset)},s.prototype.state=function(e){var t=n.prototype.state.call(this,e);return t.priceOffset=this._priceOffset,t},s.prototype.canHasAlert=function(){return!0},s.prototype._getAlertPlots=function(){var e=[].concat(this._points).splice(0,2);function t(e,t){return e.index<=t.index?[e,t]:[t,e]}var i,n,r,o,s=t((e=e.concat([{price:e[0].price+this._priceOffset,time:e[0].time,index:e[0].index},{price:e[1].price+this._priceOffset,time:e[1].time,index:e[1].index}]))[0],e[1]),a=t(e[2],e[3]);this._priceOffset<0?(n=a,i=s):(n=s,i=a);var l=this.properties().extendLeft.value(),c=this.properties().extendRight.value();return e[0].index<=e[1].index?(r=l,o=c):(r=c,o=l),[this._linePointsToAlertPlot(i,"Upper",r,o),this._linePointsToAlertPlot(n,"Lower",r,o)]},s.prototype._getPropertyDefinitionsViewModelClass=function(){ +return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("VkdP").ParallelChannelDefinitionsViewModel}.bind(null,i)).catch(i.oe)},s.createProperties=function(e){var t=new r("linetoolparallelchannel",e);return s._configureProperties(t),t},s._configureProperties=function(e){n._configureProperties(e)},t.LineToolParallelChannel=s},qckB:function(e,t){e.exports=''},qgcC:function(e,t,i){"use strict";i.r(t),i.d(t,"CompareStatusProvider",(function(){return r}));var n=i("mrSG"),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype.getSplitTitle=function(){return this._source.titleInParts(!0,void 0,!1,!1)},t.prototype.text=function(){return this._source.isFailed()?this._source.title(!0,void 0,!1,!1)+": "+this._source.status():this._source.title(!0,void 0,!1,!1)+" "+this._source.status()},t}(i("W+6j").a)},qgcf:function(e,t,i){"use strict";i.r(t),i.d(t,"calculateLabelPosition",(function(){return _})),i.d(t,"wordWrap",(function(){return m})),i.d(t,"TextRenderer",(function(){return M}));var n,r=i("aO4+"),o=i("GEp6"),s=i("Eyy1"),a=i("f6yo"),l=i("Ialn"),c=i("VdBB"),u=i("jFln"),h=i("ogJP"),d=i("ikwP"),p=i("8Uy/");function _(e,t,i,n,o){var s=.5*(t.x+i.x),a=i.y;return t.y>i.y?(a-=e.height/2+n.y,a=Math.max(e.height/2,a)):(a+=e.height/2+n.y,a=Math.min(o-e.height/2,a)),new r.Point(s,a)}function f(){var e=document.createElement("canvas");e.width=0,e.height=0,n=Object(s.ensureNotNull)(e.getContext("2d"))}function m(e,t,i){n||f(),i=Object(h.isString)(i)?parseInt(i):i;var r=(e+="").split(/[^\S\r\n]*(?:\r\n|\r|\n|$)/);if(r[r.length-1]||r.pop(),!Object(h.isNumber)(i)||!isFinite(i)||i<=0)return r;n.font=t;for(var o=[],s=0;s0&&n.measureText(c.slice(0,3*--d-1).join("")).width>i;);if(d>0)o.push(c.slice(0,3*d-1).join("")),c.splice(0,3*d);else{var p=c[0]+(c[1]||"");if(u=1===u?1:~~(i/n.measureText(p).width*p.length),n.measureText(p.substr(0,u)).width<=i)for(;n.measureText(p.substr(0,u+1)).width<=i;)u++;else for(;u>1&&n.measureText(p.substr(0,--u)).width>i;);u<1&&(u=1),o.push(p.substr(0,u)),c[0]=p.substr(u),c[1]=""}if(n.measureText(c.join("")).width<=i){o.push(c.join(""));break}}}return o}function v(e,t,i){if(0===i)return e.clone();var n=(e.x-t.x)*Math.cos(i)-(e.y-t.y)*Math.sin(i)+t.x,o=(e.x-t.x)*Math.sin(i)+(e.y-t.y)*Math.cos(i)+t.y;return new r.Point(n,o)}function y(e,t){return t+2*P(e)+2*S(e)}function g(e,t){return x(e)*t+C(e)*(t-1)+2*w(e)+2*b(e)} +function b(e){return void 0!==e.boxPaddingVert?e.boxPaddingVert*I(e):void 0!==e.boxPadding?e.boxPadding*I(e):x(e)/3}function S(e){return void 0!==e.boxPaddingHorz?e.boxPaddingHorz*I(e):void 0!==e.boxPadding?e.boxPadding*I(e):x(e)/3}function w(e){return(e.backgroundVertInflate||0)*I(e)}function P(e){return(e.backgroundHorzInflate||0)*I(e)}function C(e){return(e.padding||0)*I(e)}function x(e){return Math.ceil(T(e)*I(e))}function T(e){return e.fontsize||e.fontSize||30}function I(e){var t=Math.min(1,Math.max(.2,Math.min(e.scaleX||1,e.scaleY||1)));if(1===t)return t;var i=T(e);return Math.ceil(t*i)/i}var M=function(){function e(e,t){this._data=null,this._internalData=null,this._boxSize=null,this._linesInfo=null,this._fontInfo=null,this._hittest=t||new c.HitTestResult(c.HitTestResult.MOVEPOINT),void 0!==e&&this.setData(e)}return e.prototype.setData=function(e){!function(e,t){if(null===e||null===t)return null===e==(null===t);if(void 0===e.points!=(void 0===t.points))return!1;if(void 0!==e.points&&void 0!==t.points){if(e.points.length!==t.points.length)return!1;for(var i=0;ih?(t=new r.Point(l+h/2,c+h/2),i=new r.Point(l+u-h/2,c+h/2),n=h/2):(t=new r.Point(l+u/2,c+u/2),i=new r.Point(l+u/2,c+h-u/2),n=u/2);var p=v(t,d,s),_=v(i,d,s);return Object(o.distanceToSegment)(p,_,e).distance<=n?this._hittest:null},e.prototype.doesIntersectWithBox=function(e){return null!==this._data&&void 0!==this._data.points&&0!==this._data.points.length&&Object(a.pointInBox)(this._data.points[0],e)},e.prototype.measure=function(){if(null===this._data)return{width:0,height:0};var e=this._getBoxSize();return{width:e.boxWidth,height:e.boxHeight}},e.prototype.setPoints=function(e,t){Object(s.ensureNotNull)(this._data).points=e,this._hittest=t||new c.HitTestResult(c.HitTestResult.MOVEPOINT)},e.prototype.fontStyle=function(e){return null===this._data?"":this._getFontInfo().fontStyle}, +e.prototype.wordWrap=function(e,t,i){return m(e,i||this.fontStyle(),t)},e.prototype.draw=function(e,t){if(null!==this._data&&void 0!==this._data.points&&0!==this._data.points.length){var i=t.pixelRatio,n=this._getInternalData(),r=this._getRotationPoint().scaled(i);e.save(),e.translate(r.x,r.y),e.rotate(this._data.angle||0),e.translate(-r.x,-r.y);var o=this._getFontInfo().fontSize;e.textBaseline=n.textBaseLine,e.textAlign=n.textAlign,e.font=this.fontStyle();var s=function(e,t){var i=Math.round(e.boxLeft*t),n=Math.round(e.boxTop*t);return{scaledLeft:i,scaledRight:i+Math.round(e.boxWidth*t),scaledTop:n,scaledBottom:n+Math.round(e.boxHeight*t)}}(n,i),a=s.scaledLeft,l=s.scaledRight,c=s.scaledTop,h=s.scaledBottom;if(this._data.backgroundColor||this._data.borderColor||this._data.highlightBorder&&this._data.wordWrapWidth){var _=Math.round(Math.max(o/12,1)*i),f=_/2;if(this._data.backgroundRoundRect)this._data.backgroundColor&&(Object(u.drawRoundRect)(e,a,c,l-a,h-c,this._data.backgroundRoundRect*i),e.fillStyle=this._data.backgroundColor,e.fill()),this._data.borderColor&&(Object(u.drawRoundRect)(e,a-f,c-f,l-a+_,h-c+_,this._data.backgroundRoundRect*i),e.strokeStyle=this._data.borderColor,e.lineWidth=_,e.stroke());else if(this._data.backgroundColor&&(e.fillStyle=this._data.backgroundColor,e.fillRect(a,c,l-a,h-c)),this._data.borderColor||this._data.highlightBorder){var m=void 0;this._data.borderColor?(e.strokeStyle=this._data.borderColor,m=_):(e.strokeStyle=this._data.color,Object(u.setLineStyle)(e,p.LINESTYLE_DASHED),m=Math.max(1,Math.floor(i))),e.lineWidth=m,e.beginPath(),e.moveTo(a-m/2,c-m/2),e.lineTo(a-m/2,h+m/2),e.lineTo(l+m/2,h+m/2),e.lineTo(l+m/2,c-m/2),e.lineTo(a-m/2,c-m/2),e.stroke()}}e.fillStyle=this._data.color;for(var v=(a+Math.round(n.textStart*i))/i,y=.05*o,g=(c+Math.round((n.textTop+y)*i))/i,b=C(this._data),S=function(t){Object(d.drawScaled)(e,i,(function(){return e.fillText(t,v,g)})),g+=o+b},w=0,P=this._getLinesInfo().lines;wi&&(t=t.slice(0,i))}this._linesInfo={linesMaxWidth:this._getLinesMaxWidth(t),lines:t}}return this._linesInfo},e.prototype._getFontInfo=function(){if(null===this._fontInfo){var e=Object(s.ensureNotNull)(this._data),t=x(e),i=(e.bold?"bold ":"")+(e.italic?"italic ":"")+t+"px "+e.font;this._fontInfo={fontStyle:i,fontSize:t}}return this._fontInfo},e.prototype._getBoxSize=function(){if(null===this._boxSize){var e=this._getLinesInfo(),t=Object(s.ensureNotNull)(this._data);this._boxSize={boxWidth:y(t,e.linesMaxWidth),boxHeight:g(t,e.lines.length)}}return this._boxSize},e.prototype._getRotationPoint=function(){var e,t,i=this._getInternalData(),n=i.boxLeft,o=i.boxTop,a=i.boxWidth,l=i.boxHeight,c=Object(s.ensureNotNull)(this._data),u=c.horzAlign,h=c.vertAlign;switch(u){case"center":e=n+a/2;break;case"left":e=n;break;case"right":e=n+a}switch(h){case"middle":t=o+l/2;break;case"top":t=o;break;case"bottom":t=o+l}return new r.Point(e,t)},e}()},qocr:function(e,t,i){"use strict";function n(e,t){void 0===t&&(t=!1),("attachEvent"in document?"complete"===document.readyState:"loading"!==document.readyState)?t?setTimeout((function(){return e()}),1):e():document.addEventListener("DOMContentLoaded",(function(){return e()}))}i.d(t,"a",(function(){return n}));new Promise((function(e){n(e)}))},qySK:function(e,t,i){"use strict";i.d(t,"b",(function(){return c})),i.d(t,"a",(function(){return u}));var n=i("Eyy1"),r=i("JmuD"),o=i("fFKx"),s=i("SqfW"),a=i("7Fue"),l=i("xWfy");function c(e){if(!Object(r.isObject)(e))throw new Error("Graphics commands should be wrapped in an object");if(Object(r.hasProperty)(e,"create"),Object(r.hasProperty)(e,"erase")){var t=e.erase;Object(n.assert)(Array.isArray(t),"Collection of erase commands should be array");for(var i=0,o=t;ii?i/m:1,_+=y.lineHeight*y.zoom}}var v=Math.max((e-_)/2,0);for(f=0;f=r}},s9sR:function(e,t,i){"use strict";i.r(t),i.d(t,"SetResolutionUndoCommand",(function(){return a}));var n=i("mrSG"),r=i("RDU5"),o=i("LxhU"),s=i("n5al"),a=function(e){function t(t,i,n,r){var o=e.call(this,r)||this;return o._property=t,o._value=i,o._prevValue=t.value(),o._chartWidget=n,o}return Object(n.__extends)(t,e),t.prototype.redo=function(){this._chartWidget.screen.show(),this._property.setValue(this._value),this._handleResolution(this._value)},t.prototype.undo=function(){ +this._chartWidget.screen.show(),this._property.setValue(this._prevValue),this._handleResolution(this._prevValue)},t.prototype._handleResolution=function(e){var t=this._chartWidget.model().mainSeries().properties(),i=t.style.value(),n=Object(s.isRangeStyle)(i),r=o.Interval.isRange(e);!n&&r?t.style.setValue(11):n&&!r&&t.style.setValue(Object(s.getLastUsedStyle)())},t}(r.UndoCommand)},sEk5:function(e,t,i){"use strict";var n=i("fTGZ").BarsMarksContainer,r=i("BOPY").BarMarkTooltip,o=i("mMWL");function s(e){n.call(this,e),this.toolname="UserDefinedBarsMarks";var t=this;o.hideMarksOnBars().subscribe(this,(function(){t._properties.visible.setValue(!o.hideMarksOnBars().value())}))}function a(e){r.call(this)}inherit(s,n),s.prototype._initialize=function(e){this._properties.visible.setValue(!0)},s.prototype.userEditEnabled=function(){return!1},s.prototype._plateViewData=function(e){var t={text:e.text};return"object"==typeof e.color&&(t.theme="user_defined_theme",t.overridedTheme={},t.overridedTheme.border=e.color.border,t.overridedTheme.background=e.color.background),t},s.prototype.onClicked=function(e){var t=e.id;this._marks[t].onClicked()},s.prototype.clearMarks=function(){n.prototype.clearMarks.call(this),this.onNeedRepaint.fire()},s.prototype._getData=function(e){var t=this._model.mainSeries().symbolInfo();if(t){var i=this.roundRange(this._rangeDifference(e)),n=this,r=this._model.mainSeries().properties().interval.value();ChartApiInstance.getMarks(t,i.start,i.end,(function(t){t.forEach((function(e){n._marks[e.id]=e}),n),n._loadedRange=n._rangeUnion(e,n._loadedRange),n.onNeedRepaint.fire()}),r)}},s.prototype._createTooltip=function(){return new a},s.prototype.updatePlateData=function(e,t){return t.barWidth=this.barWidth(),t.text=e.text,t.tooltipMargin=-1*Math.max(e.minSize/2,.4*this.barWidth()),t},s.prototype.hasContextMenu=function(){return!1},s.prototype.calcIsActualCurrency=function(){this._isActualCurrency=!0},inherit(a,r),a.prototype._createLayout=function(){this._layout=$('
    '),this._layout_text=$('
    ').appendTo(this._layout)},a.prototype._updatePlate=function(e){this._currentId=e.id,this._layout.css("border-color",e.theme.border),this._layout.css("margin-top",e.tooltipMargin+"px"),this._layout_text.html(e.text),this._layout.append(this._layout_text)},e.exports=s},sJA2:function(e,t,i){"use strict";i.r(t);var n=i("EsvI"),r=i("oiZD");i.d(t,"ThemesApi",(function(){return o}));var o=function(){function e(e){this._opts=e}return e.prototype.isStdTheme=function(){var e=this._opts.chartWidgetCollection.getAll().every((function(e){return Object(n.isStdTheme)(Object(n.extractThemeFromModel)(e.model()))}));return Promise.resolve(e)},e.prototype.setStdTheme=function(e,t,i){return void 0===t&&(t=!0),Object(n.loadTheme)(e,!0,!1,this._opts.chartWidgetCollection,t,i).then((function(){}))},e.prototype.setStdThemeForLayout=function(e,t){void 0===t&&(t=!0),Object(r.setTheme)(e),t&&Object(n.syncTheme)()},e.prototype.getCurrentThemeName=function(){ +return Object(n.getCurrentTheme)().name},e}()},t2ex:function(e,t,i){"use strict";var n=i("5rJj"),r=i("Ss5c").LineDataSource,o=i("ytGH").LineToolWidthsProperty,s=window.t("Fib Retracement");function a(e,t){var n=t||a.createProperties();r.call(this,e,n),this.version=a.version,this._properties._stateVersion=1,i.e("lt-pane-views").then(function(e){var t=i("R7Bt").FibRetracementPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe);var s=[this._properties.child("trendline").child("linewidth"),this._properties.child("levelsStyle").child("linewidth")];this._widthsProperty=new o(s)}inherit(a,r),a.version=2,a.LevelsCount=24,a.prototype.levelsCount=function(){return a.LevelsCount},a.prototype.pointsCount=function(){return 2},a.prototype.translatedType=function(){return s},a.prototype.name=function(){return"Fib Retracement"},a.prototype.migrateVersion=function(e,t,i){1===e&&this.properties().extendLines.setValue(!0)},a.prototype.processErase=function(e,t){var i="level"+t,n=this.properties()[i].visible;e.setProperty(n,!1,"Erase level line")},a.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("17v9").FibDrawingsWith24LevelsDefinitionsViewModel}.bind(null,i)).catch(i.oe)},a.createProperties=function(e){var t=new n("linetoolfibretracement",e,!1,{range:[1,24],names:["coeff","color","visible"]});return a._configureProperties(t),t},a._configureProperties=function(e){r._configureProperties(e)},a.prototype.fibLevelsBasedOnLogScale=function(){return this.properties().fibLevelsBasedOnLogScale.value()&&this.priceScale().isLog()},t.LineToolFibRetracement=a},tBG4:function(e,t,i){"use strict";i.r(t),i.d(t,"SeriesStatusView",(function(){return s}));var n=i("mrSG"),r=i("nBJD"),o=i("WPIy"),s=function(e){function t(t,i,n){var r=e.call(this,new o.a(t,i,n))||this;return r._invalidated=!0,r._series=t,r._series.onRestarted().subscribe(r,r.update),r._series.dataEvents().symbolResolved().subscribe(r,r.update),r._series.dataEvents().completed().subscribe(r,r.update),r._series.onBoxSizeChanged().subscribe(r,r.update),n.childs().symbolTextSource.listeners().subscribe(r,r.update),r}return Object(n.__extends)(t,e),t.prototype.getSeriesPrecision=function(){var e=4,t=this._series.symbolInfo();return t&&t.pricescale&&(e=Math.round(Math.log(t.pricescale)/Math.log(10))),e},t.prototype.round=function(e){var t=this.getSeriesPrecision(),i=Math.round(e*Math.pow(10,t))/Math.pow(10,t);return i?i.toString():""},t.prototype.update=function(){this._invalidated=!0},t.prototype.text=function(){return this._updateImpl(),e.prototype.text.call(this)},t.prototype.color=function(){return this._updateImpl(),e.prototype.color.call(this)},t.prototype.bold=function(){return this._updateImpl(),e.prototype.bold.call(this)},t.prototype.size=function(){return this._updateImpl(),e.prototype.size.call(this)},t.prototype.getSplitTitle=function(){return this._updateImpl(),this._statusProvider.getSplitTitle()},t.prototype._updateImpl=function(){ +this._invalidated&&(this._bold=this._statusProvider.bold(),this._size=this._statusProvider.size(),this._text=this._statusProvider.text(),this._invalidated=!1)},t}(r.a)},tDUI:function(e,t,i){"use strict";(function(e){var n=i("Eyy1").ensureNotNull,r=i("Ss5c").LineDataSource,o=i("gMtF").LineToolRiskRewardPriceAxisView,s=i("mMWL"),a=i("Ocx9").DefaultProperty,l=i("zXvd").NumericFormatter,c=i("wGNx").RiskRewardPointIndex,u=i("ogJP").isNumber,h=window.t("Risk/Reward"),d=window.t("Risk/Reward short");function p(t,n){var s=n;if(r.call(this,t,s),!n.stopLevel&&!n.profitLevel){var a=t.timeScale().visibleBarsStrictRange(),c=a.firstBar(),u=a.lastBar(),h=t.mainSeries().priceRange(c,u),d=t.mainSeries().priceScale();if(d.isLog()){var _=d.logicalToPrice(h.minValue()),f=d.logicalToPrice(h.maxValue());h=new e(_,f)}if(h&&!h.isEmpty()){var m=Math.round(.2*h.length()*t.mainSeries().base());s.merge({stopLevel:m,profitLevel:m})}}var v=this;s.stopLevel.listeners().subscribe(this,this.recalculate),s.stopLevel.listeners().subscribe(null,(function(){v.properties().stopPrice._listeners.fire(v.properties().stopPrice)})),s.profitLevel.listeners().subscribe(this,this.recalculate),s.profitLevel.listeners().subscribe(null,(function(){v.properties().targetPrice._listeners.fire(v.properties().targetPrice)})),s.addChild("entryPrice",new p.PriceProperty(this,0)),s.addChild("stopPrice",new p.StopPriceProperty(this)),s.addChild("targetPrice",new p.TargetPriceProperty(this)),s.addProperty("riskSize",250),s.addProperty("qty",0),s.addProperty("amountTarget",s.accountSize.value()),s.addProperty("amountStop",s.accountSize.value()),this._riskInPercentsFormatter=new l(2),this._riskInMoneyFormatter=new l,s.risk.subscribe(this,this._recalculateRiskSize),s.accountSize.subscribe(this,this._recalculateRiskSize),s.riskDisplayMode.subscribe(this,this._recalculateRisk),s.riskDisplayMode.subscribe(this,this._recalculateRiskSize),s.entryPrice.subscribe(this,this._recalculateRiskSize),s.stopPrice.subscribe(this,this._recalculateRiskSize),s.profitLevel.subscribe(this,this._recalculateRiskSize),s.profitLevel.subscribe(this,this._syncPriceLevels.bind(this)),s.stopLevel.subscribe(this,this._recalculateRiskSize),s.stopLevel.subscribe(this,this._syncPriceLevels.bind(this)),s.qty.subscribe(this,this._recalculateRiskSize),"percents"===s.riskDisplayMode.value()&&s.risk.value()>100&&s.riskDisplayMode.setValueSilently("money"),this._syncStateExclusions=["points","entryPrice","stopPrice","targetPrice","stopLevel","profitLevel","riskSize","qty","amountTarget","amountStop","risk","accountSize"],this.version=p.version,this._entryPriceAxisView=new o(this,{colorProperty:s.linecolor,priceProperty:s.entryPrice}),this._stopPriceAxisView=new o(this,{colorProperty:s.stopBackground,priceProperty:s.stopPrice}),this._profitPriceAxisView=new o(this,{colorProperty:s.profitBackground,priceProperty:s.targetPrice}),i.e("lt-pane-views").then(function(e){var t=i("u+oH").RiskRewardPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}function _(e,t){ +var i=t||_.createProperties();p.call(this,e,i);var n=this.properties();n.entryPrice.subscribe(this,this._recalculateQty),n.stopPrice.subscribe(this,this._recalculateQty),n.riskSize.subscribe(this,this._recalculateQty),n.entryPrice.subscribe(this,this._recalculateAmount),n.profitLevel.subscribe(this,this._recalculateAmount),n.stopLevel.subscribe(this,this._recalculateAmount),n.accountSize.subscribe(this,this._recalculateAmount),n.riskSize.subscribe(this,this._recalculateAmount),n.qty.subscribe(this,this._recalculateAmount)}function f(e,t){var i=t||f.createProperties();p.call(this,e,i);var n=this.properties();n.entryPrice.subscribe(this,this._recalculateQty),n.stopPrice.subscribe(this,this._recalculateQty),n.riskSize.subscribe(this,this._recalculateQty),n.entryPrice.subscribe(this,this._recalculateAmount),n.profitLevel.subscribe(this,this._recalculateAmount),n.stopLevel.subscribe(this,this._recalculateAmount),n.accountSize.subscribe(this,this._recalculateAmount),n.riskSize.subscribe(this,this._recalculateAmount),n.qty.subscribe(this,this._recalculateAmount)}inherit(p,r),p.prototype.riskFormatter=function(e){return"percents"===e?this._riskInPercentsFormatter:this._riskInMoneyFormatter},p.prototype.getRiskStep=function(e){return"percents"===e?.01:1},p.prototype._roundValue=function(e){return parseFloat(e.toFixed(2))},p.prototype.hasEditableCoordinates=function(){return!1},p.prototype._recalculateRisk=function(){var e=this.properties(),t=e.riskDisplayMode.value(),i=e.riskSize.value(),n=e.accountSize.value(),r=e.risk.value();r="percents"===t?this._roundValue(i/n*100):this._roundValue(n/100*r),this._riskInChange=!0,e.risk.setValue(this.riskFormatter(t).format(r)),this._riskInChange=!1},p.prototype._recalculateRiskSize=function(){if(!this._riskInChange){var e=this.properties(),t=e.risk.value(),i=e.riskDisplayMode.value(),n=e.accountSize.value();"percents"===i?e.riskSize.setValue(t/100*n):t>n?(e.risk.setValue(n),e.riskSize.setValue(n)):e.riskSize.setValue(t)}},p.version=2,p.prototype.lastBarData=function(){var e=this._model.mainSeries().bars().firstIndex(),t=this._model.mainSeries().bars().lastIndex();if(null===e||null===t||isNaN(e)||isNaN(t))return null;var i=this.points();if(4===i.length){var r=i[c.ActualClose];return r.index=1){var n=[];if(n.push(this._points[0]),o={price:(o=this._points[0]).price,index:o.index+50},n.push(o),this._points[1]&&n.push(this._points[1]),this._points[2]&&n.push(this._points[2]),this._points=n,this._timePoint.length>=1){var r=[],o=this._timePoint[0];r.push(o);var s={price:o.price,time_t:o.time_t,offset:o.offset+50};r.push(s),this._timePoint[1]&&n.push(this._points[1]),this._timePoint[2]&&n.push(this._points[2]),this._timePoint=r}}},p.prototype.checkAlert=function(){this.recalculate()}, +p.prototype.priceAxisViews=function(e,t){return this.isSourceHidden()||t!==this.priceScale()||this._model.paneForSource(this)!==e?null:[this._entryPriceAxisView,this._stopPriceAxisView,this._profitPriceAxisView]},p.prototype.updateAllViews=function(){this.isActualSymbol()&&this._properties.visible.value()&&(s.hideAllDrawings().value()&&this.userEditEnabled()||(r.prototype.updateAllViews.call(this),this._entryPriceAxisView.update(),this._stopPriceAxisView.update(),this._profitPriceAxisView.update()))},p.prototype.restoreExternalState=function(e){(e=Object.assign({},e),this.isActualSymbol())||u(e.entryPrice)&&(this._timePoint[0].price=e.entryPrice,delete e.entryPrice);this.properties().merge(e)},p.prototype._changeEntryPoint=function(e){var t=this.properties().stopPrice.value(),i=this.properties().targetPrice.value(),n=1/this._model.mainSeries().base(),o=Math.min(t,i)+n,s=Math.max(t,i)-n;e.price=Math.max(o,Math.min(s,this._roundPrice(e.price))),r.prototype.setPoint.call(this,0,e),this.properties().stopPrice.setValue(t),this.properties().targetPrice.setValue(i)},p.prototype.setPoint=function(e,t,i){if(this.isActualSymbol()){switch(this._muteSyncLineStyle(),e){case 0:this._changeEntryPoint(t);break;case 2:this.properties().stopPrice.setValue(this.preparseStopPrice(t.price));break;case 3:this.properties().targetPrice.setValue(this.preparseProfitPrice(t.price));break;case 1:t.price=this._roundPrice(t.price),r.prototype.setPoint.call(this,1,t),this.recalculate()}this._unmuteSyncLineStyleWithoutApplyingChanges(),this._syncPriceLevels()}},p.prototype.setPoints=function(e){this._muteSyncLineStyle(),r.prototype.setPoints.call(this,e),this.recalculate(),this._unmuteSyncLineStyleWithoutApplyingChanges(),this._syncPriceLevels()},p.prototype._syncPriceLevels=function(){if(this.linkKey){var e=this.properties(),t={entryPrice:e.entryPrice.value(),stopLevel:e.stopLevel.value(),profitLevel:e.profitLevel.value()};s.changeLineStyle({linkKey:this.linkKey,state:t,model:this._model})}},p.PriceProperty=function(e,t){r.PointPriceProperty.call(this,e,t)},inherit(p.PriceProperty,r.PointPriceProperty),p.PriceProperty.prototype.setValue=function(e){var t=this._lineSource.points()[this._pointIndex];t.price=parseFloat(e),this._lineSource.setPoint(this._pointIndex,t),this._lineSource.recalculate(),this._lineSource._model.updateSource(this._lineSource),this._listeners.fire(this),this._lineSource.endChanging(),this._lineSource._syncPriceLevels()},p.PriceProperty.prototype.state=function(){return this.value()},p.PriceProperty.prototype.merge=function(e,t){return this.setValue(e),t?[]:null},p.StopPriceProperty=function(e){p.PriceProperty.call(this,e,1)},inherit(p.StopPriceProperty,p.PriceProperty),p.StopPriceProperty.prototype.value=function(){var e=this._lineSource.stopPrice(),t=this._lineSource.ownerSource().formatter();return t.parse(t.format(e)).value},p.StopPriceProperty.prototype.setValue=function(e){var t=Math.round(Math.abs(e-this._lineSource.entryPrice())*this._lineSource._model.mainSeries().base()) +;this._lineSource.properties().stopLevel.setValue(t),this._lineSource._syncPriceLevels()},p.TargetPriceProperty=function(e){p.PriceProperty.call(this,e,2)},inherit(p.TargetPriceProperty,p.PriceProperty),p.TargetPriceProperty.prototype.value=function(){var e=this._lineSource.profitPrice(),t=this._lineSource.ownerSource().formatter();return t.parse(t.format(e)).value},p.TargetPriceProperty.prototype.setValue=function(e){var t=Math.round(Math.abs(e-this._lineSource.entryPrice())*this._lineSource._model.mainSeries().base());this._lineSource.properties().profitLevel.setValue(t),this._lineSource._syncPriceLevels()},p.prototype.pointsCount=function(){return 1},p.prototype.translatedType=function(){return""},p.prototype.name=function(){return"Risk/Reward"},p.prototype.addPoint=function(e){e.price=this._roundPrice(e.price),r.prototype.addPoint.call(this,e,null,!0);var t={price:e.price,index:e.index+50};r.prototype._addPointIntenal.call(this,t,null,!0);var i=this.calculateActualEntry(e,t);i&&(r.prototype._addPointIntenal.call(this,i,null,!0),(t=this.findClosePoint(i,t))&&r.prototype._addPointIntenal.call(this,t,null,!0));return this._lastPoint=null,this.normalizePoints(),this.createServerPoints(),!0},p.prototype.setOwnerSource=function(e){r.prototype.setOwnerSource.call(this,e),this._model.mainSeries().symbolInfo()&&(this._recalculateAmount(),this._recalculateQty())},p.prototype._roundPrice=function(e){var t=this._model.mainSeries().base();return Math.round(e*t)/t},p.prototype.recalculate=function(){if(0!==this.points().length){var e=this.properties().targetPrice.value(),t=this.properties().stopPrice.value(),i=[this._points[0],this._points[1]],n=this.calculateActualEntry(this.points()[0],this.points()[1]);if(n){i.push(n);var r=this.findClosePoint(n,this.points()[1]);r&&i.push(r)}this._points=i,e!==this.properties().targetPrice.value()&&this.properties().targetPrice._listeners.fire(this.properties().targetPrice),t!==this.properties().stopPrice.value()&&this.properties().stopPrice._listeners.fire(this.properties().stopPrice)}},p.prototype.start=function(){r.prototype.start.call(this),this.recalculate()},p.prototype.startMoving=function(e,t,i){e.logical.price=this._roundPrice(e.logical.price),r.prototype.startMoving.call(this,e,t,i)},p.prototype.move=function(e,t,i){e.logical.price=this._roundPrice(e.logical.price),r.prototype.move.call(this,e,t,i),this.recalculate(),this._entryPriceAxisView.update()},p.prototype.correctPoints=function(e){return!!this.isActualSymbol()&&r.prototype.correctPoints.call(this,[e[0],e[1]])},p.prototype.entryPrice=function(){return this.points()[0].price},p.prototype.findClosePoint=function(e,t){for(var i=this._model.mainSeries().bars(),r=n(i.firstIndex()),o=Math.max(e.index,r),s=n(i.lastIndex()),a=Math.min(s,t.index),l=o;l<=a;l++){var c=n(i.valueAt(l)),u=this.checkStopPrice(c);if(null!=u)return{index:l,price:u}}return null},p.prototype.calculateActualEntry=function(e,t){ +for(var i=this._model.mainSeries().bars(),r=n(i.firstIndex()),o=Math.max(e.index,r),s=e.price,a=n(i.lastIndex()),l=Math.min(a,t.index),c=o;c<=l;c++){var u=n(i.valueAt(c));if(u[TradingView.HIGH_PLOT]>=s&&u[TradingView.LOW_PLOT]<=s)return{index:c,price:s}}return null},p.prototype.axisPoints=function(){if(!this._points[c.ActualEntry])return[];var e=this._points[c.ActualEntry],t=null;if(4===this._points.length)t=this._points[c.ActualClose];else{var i=this.lastBarData();if(!i)return[];t={index:i.index,price:i.closePrice}}return[e,t]},p.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("RYNR").RiskRewardDefinitionsViewModel}.bind(null,i)).catch(i.oe)},p.prototype.template=function(){var e=this.properties(),t=r.prototype.template.call(this);return t.stopLevel=e.stopLevel.value(),t.profitLevel=e.profitLevel.value(),t},p.prototype._applyTemplateImpl=function(e){delete e.targetPrice,delete e.stopPrice,delete e.entryPrice,r.prototype._applyTemplateImpl.call(this,e);var t=this.properties();void 0!==e.stopLevel&&t.stopLevel.setValue(e.stopLevel),void 0!==e.profitLevel&&t.profitLevel.setValue(e.profitLevel)},p.prototype.getOrderTemplate=function(){return null},p.prototype._propertiesStateExclusions=function(){return["entryPrice","stopPrice","targetPrice"]},p._configureProperties=function(e){r._configureProperties(e),e.addExclusion("stopLevel"),e.addExclusion("profitLevel"),e.addExclusion("stopPrice"),e.addExclusion("targetPrice"),e.addExclusion("entryPrice")},p.prototype._roundQty=function(e){var t=this._model.mainSeries().symbolInfo();return"bitcoin"===t.type||"crypto"===t.type?Math.round(1e3*e)/1e3:Math.floor(e)},inherit(_,p),_.prototype._recalculateQty=function(){if(0!==this.points().length){var e=this.properties(),t=e.entryPrice.value(),i=e.stopPrice.value(),n=e.riskSize.value(),r=this._model.mainSeries().pointValue(),o=this._roundQty(n/(Math.abs(i-t)*r));e.qty.setValue(o)}},_.prototype._recalculateAmount=function(){if(0!==this.points().length){var e=this.properties(),t=e.accountSize.value(),i=e.entryPrice.value(),n=e.qty.value(),r=e.stopPrice.value(),o=e.targetPrice.value(),s=this._model.mainSeries().pointValue(),a=this._roundValue(t+(i-o)*n*s),l=this._roundValue(t-(r-i)*n*s);e.amountTarget.setValue(a),e.amountStop.setValue(l)}},_.prototype.translatedType=function(){return d},_.prototype.name=function(){return"Risk/Reward short"},_.prototype.stopPrice=function(){return this.entryPrice()+this.properties().stopLevel.value()/this._model.mainSeries().base()},_.prototype.profitPrice=function(){return this.entryPrice()-this.properties().profitLevel.value()/this._model.mainSeries().base()},_.prototype.calculatePL=function(e){return this.entryPrice()-e},_.prototype.preparseStopPrice=function(e){e=this._roundPrice(e);var t=this.entryPrice()+1/this._model.mainSeries().base();return Math.max(e,t)},_.prototype.preparseProfitPrice=function(e){e=this._roundPrice(e);var t=this.entryPrice()-1/this._model.mainSeries().base() +;return Math.min(e,t)},_.prototype.checkStopPrice=function(e){var t=this.stopPrice(),i=this.profitPrice();return e[TradingView.HIGH_PLOT]>=t?this.stopPrice():e[TradingView.LOW_PLOT]<=i?this.profitPrice():null},_.prototype._orderSide=function(){throw new Error("not supported")},_.createProperties=function(e){var t=new a("linetoolriskrewardshort",e);return _._configureProperties(t),t},_._configureProperties=function(e){p._configureProperties(e)},inherit(f,p),f.prototype._recalculateQty=function(){if(0!==this.points().length){var e=this.properties(),t=e.entryPrice.value(),i=e.stopPrice.value(),n=e.riskSize.value(),r=this._model.mainSeries().pointValue(),o=this._roundQty(n/(Math.abs(t-i)*r));e.qty.setValue(o)}},f.prototype._recalculateAmount=function(){if(0!==this.points().length){var e=this.properties(),t=e.accountSize.value(),i=e.entryPrice.value(),n=e.qty.value(),r=e.stopPrice.value(),o=e.targetPrice.value(),s=this._model.mainSeries().pointValue(),a=this._roundValue(t+(o-i)*n*s),l=this._roundValue(t-(i-r)*n*s);e.amountTarget.setValue(a),e.amountStop.setValue(l)}},f.prototype.stopPrice=function(){return this.entryPrice()-this.properties().stopLevel.value()/this._model.mainSeries().base()},f.prototype.profitPrice=function(){return this.entryPrice()+this.properties().profitLevel.value()/this._model.mainSeries().base()},f.prototype.calculatePL=function(e){return e-this.entryPrice()},f.prototype.preparseStopPrice=function(e){e=this._roundPrice(e);var t=this.entryPrice()-1/this._model.mainSeries().base();return Math.min(e,t)},f.prototype.preparseProfitPrice=function(e){e=this._roundPrice(e);var t=this.entryPrice()+1/this._model.mainSeries().base();return Math.max(e,t)},f.prototype.checkStopPrice=function(e){var t=this.stopPrice(),i=this.profitPrice();return e[TradingView.LOW_PLOT]<=t?this.stopPrice():e[TradingView.HIGH_PLOT]>=i?this.profitPrice():null},f.prototype.translatedType=function(){return h},f.prototype.name=function(){return"Risk/Reward long"},f.prototype._orderSide=function(){throw new Error("not supported")},f.createProperties=function(e){var t=new a("linetoolriskrewardlong",e);return f._configureProperties(t),t},f._configureProperties=function(e){p._configureProperties(e)},t.LineToolRiskRewardLong=f,t.LineToolRiskRewardShort=_}).call(this,i("Qb4w").PriceRange)},tG6Q:function(e,t,i){"use strict";var n=i("Ss5c").LineDataSource,r=i("Ocx9").DefaultProperty,o=window.t("Cyclic Lines");function s(e,t){var r=t||s.createProperties();n.call(this,e,r),i.e("lt-pane-views").then(function(e){var t=i("GS+0").LineToolCircleLinesPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}inherit(s,n),s.prototype.pointsCount=function(){return 2},s.prototype.translatedType=function(){return o},s.prototype.name=function(){return"Cyclic Lines"},s.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("LX4V").CyclicAndSineLinesPatternDefinitionsViewModel}.bind(null,i)).catch(i.oe)}, +s.createProperties=function(e){var t=new r("linetoolcirclelines",e);return s._configureProperties(t),t},s._configureProperties=function(e){n._configureProperties(e)},t.LineToolCircleLines=s},tWVy:function(e,t,i){"use strict";i.d(t,"a",(function(){return r})),i.d(t,"b",(function(){return o}));var n=i("aIyQ"),r=new(i.n(n).a);function o(){r.fire()}},"tc+8":function(e,t,i){"use strict";(function(t){var n=i("ogJP").isFunction;function r(e){if(this._listeners=new t,this._childs=[],this._muteChildChanges=!1,void 0!==e)if(this.isPrimitiveType(e))this._value=e;else for(var i in e)this.addProperty(i,e[i])}r.prototype.merge=function(e,t){var i=null;if(t)var n=(i=[]).length;if(null==e)return i;if(this.isPrimitiveType(e))return t&&this._value!==e&&i.push(this),this._value=e,i;if(Array.isArray(e))for(var r=0;rn&&i.push(this),i},r.prototype.mergeAndFire=function(e){var t=this.merge(e,!0);this._muteChildChanges=!0,t.forEach((function(e){e._muteChildChanges=!0})),t.forEach((function(e){e._muteChildChanges=!1,e.listeners().fire(e)})),this._muteChildChanges=!1,t.length>0&&this.listeners().fire(this)},r.prototype.state=function(e){var t=n(this.value)?this.value():void 0;void 0===t&&(t={});for(var i=0;i=0},r.prototype.addChild=function(e,t){this[e]=t,-1===this._childs.indexOf(e)&&this._childs.push(e),t.listeners().subscribe(this,r.prototype.childChanged)},r.prototype.childChanged=function(e,t){this._muteChildChanges||this.listeners().fire(this)},r.prototype.subscribe=function(e,t){this.listeners().subscribe(e,t,!1)}, +r.prototype.unsubscribe=function(e,t){this.listeners().unsubscribe(e,t)},r.prototype.unsubscribeAll=function(e){this.listeners().unsubscribeAll(e)},r.prototype.childs=function(){return this},e.exports=r}).call(this,i("aIyQ"))},teHb:function(e,t,i){"use strict";i.r(t),i.d(t,"ratioStudyItem",(function(){return s}));var n=i("mrSG"),r=i("7dm8"),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype._doCalculation=function(e,t,i,n){return e*t/(i*n)},t}(r.a),s={name:"Ratio",metainfo:{_metainfoVersion:15,defaults:r.b,plots:r.d,styles:r.e,description:"Ratio",shortDescription:"Ratio",is_price_study:!1,inputs:r.c,id:"Ratio@tv-basicstudies-1"},constructor:o}},tqok:function(e,t,i){"use strict";i.d(t,"a",(function(){return n}));var n=-2e6},txPx:function(e,t,i){"use strict";i.r(t),i.d(t,"LOGLEVEL",(function(){return n})),i.d(t,"getLogLevel",(function(){return _})),i.d(t,"isHighRateEnabled",(function(){return f})),i.d(t,"setLogLevel",(function(){return m})),i.d(t,"getRawLogHistory",(function(){return v})),i.d(t,"serializeLogHistoryEntry",(function(){return y})),i.d(t,"getLogHistory",(function(){return g})),i.d(t,"getLogger",(function(){return S})),i.d(t,"loggingOn",(function(){return P})),i.d(t,"loggingOff",(function(){return C}));var n,r="undefined"!=typeof window?window:{},o=!1;try{localStorage.getItem(""),o=!0}catch(T){}!function(e){e[e.ERROR=1]="ERROR",e[e.WARNING=2]="WARNING",e[e.INFO=3]="INFO",e[e.NORMAL=4]="NORMAL",e[e.DEBUG=5]="DEBUG"}(n||(n={}));var s=0,a=[],l=null,c=null,u=null,h=NaN,d=n.WARNING,p=!1;function _(){return d}function f(){return p}function m(e){e=Math.max(n.ERROR,Math.min(n.DEBUG,e)),d=e,x()}function v(e,t){var i=a.reduce((function(e,t){return e.concat(t)}),[]);return i.sort((function(e,t){return e.id-t.id})),void 0!==t&&(i=i.filter((function(e){return e.subSystemId===t}))),"number"==typeof e&&(i=i.slice(-e)),i}function y(e){return new Date(e.timestamp).toISOString()+":"+e.subSystemId+":"+e.message.replace(/"/g,"'")}function g(e,t){return function(e,t){var i,n=0;for(i=e.length-1;i>=1&&(n+=8*(1+encodeURIComponent(e[i]).length),!(i-1>0&&n+8*(1+encodeURIComponent(e[i-1]).length)>t));i--);return e.slice(i)}(v(e,t).map(y),75497472)}function b(e,t,i,r){if(t!==c||r.id!==u){var o=new Date;if(e<=n.NORMAL&&function(e,t,i,n,r){var o={id:s,message:String(t),subSystemId:n,timestamp:Number(e)};s+=1,i.push(o),void 0!==r&&i.length>r&&i.splice(0,1)}(o,t,i,r.id,r.maxCount),e<=d&&(!r.highRate||f())&&(!l||r.id.match(l))){var a=o.toISOString()+":"+r.id+":"+t;switch(e){case n.DEBUG:console.debug(a);break;case n.INFO:case n.NORMAL:r.color?console.log("%c"+a,"color: "+r.color):console.log(a);break;case n.WARNING:console.warn(a);break;case n.ERROR:console.error(a)}c=t,u=r.id,h&&clearTimeout(h),h=setTimeout((function(){c=null,u=null,h=NaN}),1e3)}}}function S(e,t){void 0===t&&(t={});var i=[];a.push(i);var r=Object.assign(t,{id:e});function o(e){return function(t){return b(e,t,i,r)}}return{logDebug:o(n.DEBUG),logError:o(n.ERROR),logInfo:o(n.INFO),logNormal:o(n.NORMAL), +logWarn:o(n.WARNING)}}var w=S("logger"),P=r.lon=function(e,t){m(n.DEBUG),w.logNormal("Debug logging enabled"),p=Boolean(e),l=t||null,x()},C=r.loff=function(){m(n.INFO),w.logInfo("Debug logging disabled")};function x(){try{o&&(localStorage.setItem("tv.logger.logHighRate",String(p)),localStorage.setItem("tv.logger.loglevel",String(d)))}catch(e){w.logWarn("Cannot save logger state (level: "+d+", high-rate: "+p+") to localStorage: "+e.message)}}!function(){p=!!o&&"true"===localStorage.getItem("tv.logger.logHighRate");var e=parseInt(o&&localStorage.getItem("tv.logger.loglevel")||"");Number.isNaN(e)&&(e=n.WARNING),m(e),w.logNormal("Init with settings - level: "+d+", high-rate: "+p)}(),r.performance&&r.performance.now?w.logNormal("Sync logger and perf times, now is "+r.performance.now()):w.logWarn("Perf time is not available")},tzRX:function(e,t){e.exports=''},"u+0B":function(e,t,i){"use strict";i.r(t),i.d(t,"TextWidthCache",(function(){return r}));var n=/[2-9]/g,r=function(){function e(e){void 0===e&&(e=50),this._actualSize=0,this._usageTick=1,this._oldestTick=1,this._tick2Labels={},this._cache={},this._maxSize=e}return e.prototype.reset=function(){this._actualSize=0,this._cache={},this._usageTick=1,this._oldestTick=1,this._tick2Labels={}},e.prototype.measureText=function(e,t,i){var r=i||n,o=String(t).replace(r,"0");if(this._cache[o])return this._cache[o].width;if(this._actualSize===this._maxSize){var s=this._tick2Labels[this._oldestTick];delete this._tick2Labels[this._oldestTick],delete this._cache[s],this._oldestTick++,this._actualSize--}var a=e.measureText(o).width;return 0===a&&t.length?0:(this._cache[o]={width:a,tick:this._usageTick},this._tick2Labels[this._usageTick]=o,this._actualSize++,this._usageTick++,a)},e}()},u0yd:function(e,t,i){"use strict";var n=i("Zp/P").coordinateIsValid,r=i("gyZD").PaneRendererLine;function o(e){e.forceLineColor=!1,r.call(this,e),this.color1=e.color1,this.color2=e.color2,this.bottom=e.bottom,this.isSeries=!!e.isSeries,this._simpleMode=e.simpleMode}inherit(o,r),o.prototype._drawImpl=function(e){if(0!==this.items.length){e.lineCap="square",e.strokeStyle=this.lineColor,e.lineWidth=this.lineWidth,e.lineStyle=this.lineStyle,e.lineWidth=1;for(var t=0;t=0&&!n(this.items[i].y);)i--;if(!(t>=i)){e.translate(.5,.5);for(var o={},s=this.items,a=t;a<=i;a++){var l=s[a];if(h=l.style?l.style.color:this.lineColor,a0;){if(t[i]<=e)return i;i--}return i},T.prototype._spanOffset=function(e,t){if(t0&&this._hightlightBackground(e,n,t)}var r=i.model().crossHairSource();r.startMeasurePoint()&&this._hightlightBackground(e,r.measurePoints(),t)}},T.prototype.drawTickMarks=function(e,t){var i=this.chart.model().timeScale().marks();if(i&&0!==i.length){var n=i.reduce((function(e,t){ +return e.span>t.span?e:t}),i[0]).span;n>30&&n<40&&(n=30),e.save(),e.strokeStyle=this.lineColor();var r=this.rendererOptions(),o=r.borderSize+r.tickLength+r.paddingTop+r.fontSize-r.baselineOffset;e.textAlign="center",e.fillStyle=this.lineColor();var s=Math.max(1,Math.floor(t)),a=Math.floor(.5*t),l=Math.round(r.tickLength*t);e.beginPath();for(var c=i.length;c--;){var u=Math.round(i[c].coord*t);e.rect(u-a,0,s,l)}e.fill(),e.fillStyle=this.textColor();var d=this;h(e,t,(function(){e.font=d.baseFont();for(var t=0;t=n&&e.fillText(r.label,r.coord,o)}})),e.restore()}},T.prototype.drawBackLabels=function(e,t){e.save();var i=new Set,n=this.chart.model(),r=n.dataSources();n.selection().sources().forEach((function(e){i.add(e)})),n.hoveredSource()&&i.add(n.hoveredSource()),n.sourcesBeingMoved().forEach((function(e){i.add(e)}));var o=n.lineBeingEdited()||n.lineBeingCreated();o&&i.add(o),i.add(this.chart.model().crossHairSource()),r=r.concat(n.model().customSources());for(var s=this.rendererOptions(),a=0;a=s)&&(n={value:s,view:o})}}})),i.view&&t.push(i.view),n.view&&t.push(n.view),t},T.prototype._addViewsOrMaxMin=function(e,t){e.length<=1?e.forEach((function(e){if(e.timeAxisViews){var i=e.timeAxisViews();i&&i.length&&t.push(i)}})):t.push(this._minMaxViews(e))},T.prototype.drawCrossHairLabel=function(e,t){e.save(),e.clearRect(0,0,Math.ceil(this.size.w*t)+1,Math.ceil(this.size.h*t)+1);var i,n=this.chart.model(),r=[],o=n.lineBeingEdited()||n.lineBeingCreated();o&&o.timeAxisViews&&((i=o.timeAxisViews())&&i.length&&r.push(i));(this._addViewsOrMaxMin(n.sourcesBeingMoved(),r),this._addViewsOrMaxMin(n.selection().sources(),r),n.hoveredSource()&&!n.selection().isSelected(n.hoveredSource()))&&(n.hoveredSource().timeAxisViews&&(i=n.hoveredSource().timeAxisViews())&&i.length&&r.push(i));(i=n.crossHairSource().timeAxisViews())&&i.length&&r.push(i);var s=this.rendererOptions();r.forEach((function(i){i.forEach((function(i){e.save(),i.renderer().draw(e,s,t),e.restore()}))})),e.restore()},T.prototype.hardResetCanvas=function(){this.size&&(d(this._canvasBinding,this.size),d(this._topCanvasBinding,this.size))},T.prototype.paint=function(e){if(e!==a.None){var t=u(this._topCanvasBinding.canvas);if(e>a.Cursor){var i=u(this._canvasBinding.canvas),n=this._canvasBinding.pixelRatio;this.drawBackground(i,n),this.chart.model()&&(this.drawTickMarks(i,n),this.drawBackLabels(i,n),this.chart.model().crossHairSource().updateAllViews(),this.drawCrossHairLabel(t,n)), +this._lhsStubContainer.paintStubs(e),this._rhsStubContainer.paintStubs(e)}this.drawCrossHairLabel(t,this._topCanvasBinding.pixelRatio)}},T.prototype.restoreDefaultCursor=function(){this.setCursor("")},T.prototype.setCursor=function(e){var t="";"grabbing"!==e&&"ew-resize"!==e||(t="time-axis--cursor-"+e),this._currentCursorClassName!==t&&(this._currentCursorClassName&&this._cell.classList.remove(this._currentCursorClassName),t&&this._cell.classList.add(t),this._currentCursorClassName=t,this._cell.style.cursor)},T.prototype.updatePriceAxisStubs=function(){var e=this.chart.model().model(),t=this.chart.isMaximizedPane()?this.chart.maximizedPaneWidget().state():e.paneForSource(e.mainSeries());if(t){var i=e.priceScaleSlotsCount();this._lhsStubContainer.setScales([],i.left,t.leftPriceScales().length,i.left+i.right),this._rhsStubContainer.setScales([],i.right,t.rightPriceScales().length,i.left+i.right)}},T.prototype.getScreenshotData=function(){var e={};return e.content=this._canvasBinding.canvas.toDataURL(),e.canvas=this._canvasBinding.canvas,e.contentWidth=this.size.w,e.contentHeight=this.size.h,e.lhsStub=this._lhsStubContainer.getScreenshotData(),e.rhsStub=this._rhsStubContainer.getScreenshotData(),e},t.TimeAxisWidget=T}).call(this,i("aIyQ"),i("Kxc7"))},"uXw/":function(e,t,i){"use strict";(function(t){var n=i("IiTo"),r=i("LxhU").Interval,o=i("Y7w9").lowerbound,s=i("aIyQ"),a=function(){var e={},a=new Map,l=null,c=new s,u="undefined"!=typeof window?window:t,h=u.PineJsCalendar?u.PineJsCalendar:i("jCNj");function d(){a.forEach((function(t,i){var n=t.symbol,r=t.symbolInfo,o=t.pointsets,s=n;e.hasOwnProperty(s)||(e[s]=[]);var a=function(e,t,i){for(var n=0,r=null,o=0;o0){var c=t.getOffsetSinceLastRealBar(e,l[0],l[1]);c>n&&(n=c,r=l)}}return r}(r,i,o);null!==a&&i.ready()&&i.ensureExtrapolatedTo(r,a[0],a[1]);for(var l=0;l=o)return 0;var c=new n.SessionInfo(e.timezone,e.session,e.holidays,e.corrections),u=f(e,a,c,i,o);if(u>=1e3)return u;return s.findDistanceInBars(i,o,e)}(s,a,t,e[0].value[0]/1e3,i);var l=o(e,1e3*t,(function(e,t){return e.value[0]4*(7-i.spec.weekEndsCount())){d=f/7*(7-i.spec.weekEndsCount())}else{for(var m=0,v={},y=p;y.valueOf()<=_.valueOf();y=h.add_days_considering_dst(i.timezone,y,1)){void 0===v[b=h.get_day_of_week(y)]&&(v[b]=i.spec.isWeekEnd(b)),v[b]&&m++}d=f-m}if(t.isDays())o=Math.ceil(d/t.multiplier());else{var g=t.isSeconds()?t.multiplier():60*t.multiplier();if(f<1)if(i.spec.findSession(i.spec.getWeekIndex(p),h.get_day_of_week(p),h.get_minutes_from_midnight(p)).getEntry()===i.spec.findSession(i.spec.getWeekIndex(_),h.get_day_of_week(_),h.get_minutes_from_midnight(_)).getEntry())return Math.ceil((r-n)/g);var b=i.spec.entries()[0].dayOfWeek(),S=60*i.spec.entries().reduce((function(e,t){return e+(t.dayOfWeek()===b?t.length():0)}),0);o=Math.ceil(d*S/g)}}return o}function m(e,t,i){var r=n.createAligner(t,i);return null!==r&&(e=e.map((function(e){return r.alignTimeIfPossible(1e3*e)/1e3}))),e}return{createPointset:function(e,t,i,n,r,o){var s={guid:e,points:i},c=a.get(n);void 0===c&&(c={symbol:t,symbolInfo:r,session:o,pointsets:[]},a.set(n,c)),c.pointsets.push(s),null===l&&(l=setTimeout(d,0))},removePointset:function(t){var i=[];a.forEach((function(e,n){for(var r=e.pointsets,o=0;o0;)this.removeProperty(this._childs[0]);this._initValues=[];for(var t=0;tl&&t")+", line "+e.lineno+", col "+e.colno+".\nError: "+n(e.error))}),!1),window.addEventListener("unhandledrejection",(function(e){var t=(new Date).toISOString();window.__tv_js_errors.push(t+" Unhandled rejection.\nReason: "+n(e.reason))}),!1),document.addEventListener("securitypolicyviolation",(function(e){var t,i,r=(new Date).toISOString(),o="report"===e.disposition?"CSP report-only":"CSP violation";window.__tv_js_errors.push(r+" "+o+": "+(e.violatedDirective||e.effectiveDirective)+". "+(e.sourceFile||"")+", line "+(null!==(t=e.lineno)&&void 0!==t?t:e.lineNumber)+", col "+(null!==(i=e.colno)&&void 0!==i?i:e.columnNumber)+".\nBlocked URI: "+(e.blockedURL||e.blockedURI)+"\nSample: "+e.sample+"\nTarget: "+n(e.target))}),!1)}i.r(t),i.d(t,"install",(function(){return r}))},wGNx:function(e,t,i){"use strict";var n;i.r(t),i.d(t,"RiskRewardPointIndex",(function(){return n})),function(e){e[e.Entry=0]="Entry",e[e.Close=1]="Close", +e[e.ActualEntry=2]="ActualEntry",e[e.ActualClose=3]="ActualClose"}(n||(n={}))},wOSo:function(e,t,i){"use strict";i.r(t),i.d(t,"QuotesProvider",(function(){return a}));var n=i("IWXC"),r=i("aIyQ"),o=i.n(r),s=i("e3/o"),a=function(){function e(){this._quotes=null,this._quoteSessionSymbol=null,this._quoteSessionClientId="",this._quotesUpdate=new o.a}return e.prototype.setQuotesSessionSymbol=function(e){this._quoteSessionSymbol!==e&&(this._quoteSessionClientId||(this._quoteSessionClientId="series-"+Object(s.guid)()),this._unsubscribeQuoteSession(),e&&(this._quoteSessionSymbol=e,Object(n.getQuoteSessionInstance)("full").subscribe(this._quoteSessionClientId,this._quoteSessionSymbol,this._onUpdate.bind(this))))},e.prototype.quotesUpdate=function(){return this._quotesUpdate},e.prototype.quotes=function(){return this._quotes},e.prototype.destroy=function(){this._unsubscribeQuoteSession()},e.prototype._onUpdate=function(e,t){this._quotes=e&&e.values||null,t&&t.values&&this._quotesUpdate.fire(e,t)},e.prototype._unsubscribeQuoteSession=function(){this._quoteSessionSymbol&&(Object(n.getQuoteSessionInstance)("full").unsubscribe(this._quoteSessionClientId,this._quoteSessionSymbol),this._quoteSessionSymbol=null,this._quotes=null)},e}()},wZIs:function(e,t,i){"use strict";var n=i("dfhE"),r=i("rCHB").LineToolPitchforkStyle,o=i("Ye2/").LineToolBarsPatternMode,s=i("23IT").LineStudyPlotStyle,a=i("8OdW"),l=i("oXaB").PriceAxisLastValueMode,c=i("4o++").MagnetMode,u=i("a7Ha").LineEnd,h=i("4vW/").ColorType,d=i("bKFv").StatsPosition,p=i("KUek").sessionsPreferencesDefault,_=i("txPx").getLogger("Chart.Defaults"),f=i("zDbI").CHART_FONT_FAMILY,m=function(e){var t=function(e,t){return{color:e,visible:t}},i=function(e,t,i){return{coeff:e,color:t,visible:i}},_=function(e,t,i,n,r){return{coeff:e,color:t,visible:i,linestyle:void 0===n?CanvasEx.LINESTYLE_SOLID:n,linewidth:void 0===r?1:r}},m=function(e,t,i){return{color:e,width:i,visible:t}},v=function(e,t,i,n,r){return{color:e,visible:t,width:i,x:n,y:r}},b=function(e,t,i,n,r,o){return{coeff1:e,coeff2:t,color:i,visible:n,linestyle:void 0===r?CanvasEx.LINESTYLE_SOLID:r,linewidth:void 0===o?1:o}};if(void 0===TradingView.defaultProperties){var S;switch(window.locale){case"ar_AE":S="Asia/Dubai";break;case"au":S="Australia/Sydney";break;case"br":S="America/Sao_Paulo";break;case"ca":S="America/Toronto";break;case"de_DE":case"it":S="Europe/Berlin";break;case"es":S="Europe/Madrid";break;case"fa_IR":S="Asia/Tehran";break;case"fr":case"sv_SE":S="Europe/Paris";break;case"he_IL":case"tr":S="Europe/Athens";break;case"hu_HU":case"pl":S="Europe/Warsaw";break;case"id":case"th_TH":case"vi_VN":S="Asia/Bangkok";break;case"in":S="Asia/Kolkata";break;case"ja":case"kr":S="Asia/Tokyo";break;case"ms_MY":S="Asia/Singapore";break;case"ru":S="Europe/Moscow";break;case"uk":S="Europe/London";break;case"zh_CN":case"zh_TW":S="Asia/Shanghai";break;default:S="Etc/UTC"}TradingView.defaultProperties={chartproperties:{timezone:S,priceScaleSelectionStrategyName:"auto",dataWindowProperties:{background:"rgba( 255, 254, 206, 0.2)", +border:"rgba( 96, 96, 144, 1)",font:"Verdana",fontBold:!1,fontItalic:!1,fontSize:10,transparency:80,visible:!0},paneProperties:{backgroundType:h.Solid,background:"#ffffff",backgroundGradientStartColor:"#ffffff",backgroundGradientEndColor:"#ffffff",vertGridProperties:{color:"#F0F3FA",style:CanvasEx.LINESTYLE_SOLID},horzGridProperties:{color:"#F0F3FA",style:CanvasEx.LINESTYLE_SOLID},crossHairProperties:{color:"#758696",style:CanvasEx.LINESTYLE_DASHED,transparency:0,width:1},topMargin:10,bottomMargin:8,axisProperties:{autoScale:!0,autoScaleDisabled:!1,lockScale:!1,percentage:!1,percentageDisabled:!1,indexedTo100:!1,log:!1,logDisabled:!1,alignLabels:!0,isInverted:!1},legendProperties:{showStudyArguments:!0,showStudyTitles:!0,showStudyValues:!0,showSeriesTitle:!0,showSeriesOHLC:!0,showLegend:!0,showBarChange:!0,showBackground:!0,backgroundTransparency:50,wrapText:!1}},scalesProperties:{backgroundColor:"#ffffff",lineColor:"#E0E3EB",textColor:"#131722",fontSize:12,scaleSeriesOnly:!1,showSeriesLastValue:!0,seriesLastValueMode:l.LastValueAccordingToScale,showSeriesPrevCloseValue:!1,showStudyLastValue:!1,showSymbolLabels:!1,showStudyPlotLabels:!1,showBidAskLabels:!1,showPrePostMarketPriceLabel:!0,showFundamentalNameLabel:!1,showFundamentalLastValue:!1,barSpacing:a.DEFAULT_BAR_SPACING,showCurrency:!0},mainSeriesProperties:{style:n.STYLE_CANDLES,esdShowDividends:!0,esdShowSplits:!0,esdShowEarnings:!0,esdShowBreaks:!1,esdBreaksStyle:{color:"rgba( 235, 77, 92, 1)",style:CanvasEx.LINESTYLE_DASHED,width:1},esdFlagSize:2,showCountdown:!0,bidAsk:{visible:!1,lineStyle:CanvasEx.LINESTYLE_DOTTED,lineWidth:1,bidLineColor:"#2196F3",askLineColor:"#EF5350"},prePostMarket:{visible:!0,lineStyle:CanvasEx.LINESTYLE_DOTTED,lineWidth:1,preMarketColor:"#fb8c00",postMarketColor:"#2196f3"},showInDataWindow:!0,visible:!0,showPriceLine:!0,priceLineWidth:1,priceLineColor:"",baseLineColor:"#B2B5BE",showPrevClosePriceLine:!1,prevClosePriceLineWidth:1,prevClosePriceLineColor:"rgba( 85, 85, 85, 1)",minTick:"default",extendedHours:!1,dividendsAdjustment:void 0,sessVis:!1,statusViewStyle:{fontSize:16,showExchange:!0,showInterval:!0,symbolTextSource:"description"},candleStyle:{upColor:"#26a69a",downColor:"#ef5350",drawWick:!0,drawBorder:!0,borderColor:"#378658",borderUpColor:"#26a69a",borderDownColor:"#ef5350",wickColor:"#737375",wickUpColor:"#26a69a",wickDownColor:"#ef5350",barColorsOnPrevClose:!1,drawBody:!0},hollowCandleStyle:{upColor:"#26a69a",downColor:"#ef5350",drawWick:!0,drawBorder:!0,borderColor:"rgba( 55, 134, 88, 1)",borderUpColor:"#26a69a",borderDownColor:"#ef5350",wickColor:"rgba( 115, 115, 117, 1)",wickUpColor:"#26a69a",wickDownColor:"#ef5350",drawBody:!0},haStyle:{upColor:"#26a69a",downColor:"#ef5350",drawWick:!0,drawBorder:!0,borderColor:"rgba( 55, 134, 88, 1)",borderUpColor:"#26a69a",borderDownColor:"#ef5350",wickColor:"rgba( 115, 115, 117, 1)",wickUpColor:"#26a69a",wickDownColor:"#ef5350",showRealLastPrice:!1,barColorsOnPrevClose:!1,inputs:{},inputInfo:{},drawBody:!0},barStyle:{upColor:"#26a69a",downColor:"#ef5350",barColorsOnPrevClose:!1, +dontDrawOpen:!1,thinBars:!0},hiloStyle:{color:"#2196f3",showBorders:!0,borderColor:"#2196f3",showLabels:!0,labelColor:"#2196f3",fontSize:7,drawBody:!0},lineStyle:{color:"#2196f3",linestyle:CanvasEx.LINESTYLE_SOLID,linewidth:2,priceSource:"close",styleType:n.STYLE_LINE_TYPE_SIMPLE},areaStyle:{color1:"rgba(33, 150, 243, 0.28)",color2:"#2196f3",linecolor:"#2196f3",linestyle:CanvasEx.LINESTYLE_SOLID,linewidth:2,priceSource:"close",transparency:100},priceAxisProperties:{autoScale:!0,autoScaleDisabled:!1,lockScale:!1,percentage:!1,percentageDisabled:!1,indexedTo100:!1,log:!1,logDisabled:!1,isInverted:!1,alignLabels:!0},renkoStyle:{upColor:"#26a69a",downColor:"#ef5350",borderUpColor:"#26a69a",borderDownColor:"#ef5350",upColorProjection:"rgba( 169, 220, 195, 1)",downColorProjection:"rgba( 245, 166, 174, 1)",borderUpColorProjection:"rgba( 169, 220, 195, 1)",borderDownColorProjection:"rgba( 245, 166, 174, 1)",wickUpColor:"#26a69a",wickDownColor:"#ef5350",inputs:{source:"close",sources:"Close",boxSize:3,style:"ATR",atrLength:14,wicks:!0},inputInfo:{source:{name:"source"},sources:{name:"Source"},boxSize:{name:"Box size"},style:{name:"Style"},atrLength:{name:"ATR length"},wicks:{name:"Wicks"}}},pbStyle:{upColor:"#26a69a",downColor:"#ef5350",borderUpColor:"#26a69a",borderDownColor:"#ef5350",upColorProjection:"rgba( 169, 220, 195, 1)",downColorProjection:"rgba( 245, 166, 174, 1)",borderUpColorProjection:"rgba( 169, 220, 195, 1)",borderDownColorProjection:"rgba( 245, 166, 174, 1)",inputs:{source:"close",lb:3},inputInfo:{source:{name:"Source"},lb:{name:"Number of line"}}},kagiStyle:{upColor:"#26a69a",downColor:"#ef5350",upColorProjection:"rgba( 169, 220, 195, 1)",downColorProjection:"rgba( 245, 166, 174, 1)",inputs:{source:"close",style:"ATR",atrLength:14,reversalAmount:1},inputInfo:{source:{name:"Source"},style:{name:"Style"},atrLength:{name:"ATR length"},reversalAmount:{name:"Reversal amount"}}},pnfStyle:{upColor:"#26a69a",downColor:"#ef5350",upColorProjection:"rgba( 169, 220, 195, 1)",downColorProjection:"rgba( 245, 166, 174, 1)",inputs:{sources:"Close",reversalAmount:3,boxSize:1,style:"ATR",atrLength:14,oneStepBackBuilding:!1},inputInfo:{sources:{name:"Source"},boxSize:{name:"Box size"},reversalAmount:{name:"Reversal amount"},style:{name:"Style"},atrLength:{name:"ATR length"},oneStepBackBuilding:{name:"One step back building"}}},baselineStyle:{baselineColor:"rgba( 117, 134, 150, 1)",topFillColor1:"rgba( 38, 166, 154, 0.28)",topFillColor2:"rgba( 38, 166, 154, 0.05)",bottomFillColor1:"rgba( 239, 83, 80, 0.05)",bottomFillColor2:"rgba( 239, 83, 80, 0.28)",topLineColor:"rgba( 38, 166, 154, 1)",bottomLineColor:"rgba( 239, 83, 80, 1)",topLineWidth:2,bottomLineWidth:2,priceSource:"close",transparency:50,baseLevelPercentage:50},rangeStyle:{upColor:"#26a69a",downColor:"#ef5350",thinBars:!0,upColorProjection:"rgba( 169, 220, 195, 1)",downColorProjection:"rgba( 245, 166, 174, 1)",inputs:{range:10,phantomBars:!1},inputInfo:{range:{name:"Range"},phantomBars:{name:"Phantom bars"}}}},chartEventsSourceProperties:{visible:!0,futureOnly:!0,breaks:{ +color:"rgba(85, 85, 85, 1)",visible:!1,style:CanvasEx.LINESTYLE_DASHED,width:1}},tradingProperties:{showPositions:!0,showOrders:!0,showExecutions:!0,extendLeft:!0,lineLength:5,lineWidth:1,lineStyle:CanvasEx.LINESTYLE_DOTTED},editorFontsList:["Verdana","Courier New","Times New Roman","Arial"],volumePaneSize:"large"},sessions:p,drawings:{magnet:!1,magnetMode:c.WeakMagnet,stayInDrawingMode:!1,drawOnAllCharts:!0},linetoolorder:{extendLeft:"inherit",lineLength:"inherit",lineColor:"rgba( 255, 0, 0, 1)",lineActiveBuyColor:"rgb(64,148,232)",lineInactiveBuyColor:"rgba(64,148,232,.5)",lineActiveSellColor:"rgb(231,86,86)",lineInactiveSellColor:"rgba(231,86,86,.5)",lineStyle:"inherit",lineWidth:"inherit",bodyBorderActiveBuyColor:"rgb(64,148,232)",bodyBorderInactiveBuyColor:"rgba(64,148,232,.5)",bodyBorderActiveSellColor:"rgb(231,86,86)",bodyBorderInactiveSellColor:"rgba(231,86,86,.5)",bodyBackgroundColor:"rgba( 255, 255, 255, 0.75)",bodyBackgroundTransparency:25,bodyTextInactiveLimitColor:"rgba(38,140,2,.5)",bodyTextActiveLimitColor:"rgb(38,140,2)",bodyTextInactiveStopColor:"rgba(231,86,86,.5)",bodyTextActiveStopColor:"rgb(231,86,86)",bodyTextInactiveBuyColor:"rgba(64,148,232,.5)",bodyTextActiveBuyColor:"rgb(64,148,232)",bodyTextInactiveSellColor:"rgba(231,86,86,.5)",bodyTextActiveSellColor:"rgb(231,86,86)",bodyFontFamily:"Verdana",bodyFontSize:9,bodyFontBold:!0,bodyFontItalic:!1,quantityBorderActiveBuyColor:"rgb(64,148,232)",quantityBorderInactiveBuyColor:"rgba(64,148,232,.5)",quantityBorderActiveSellColor:"rgb(231,86,86)",quantityBorderInactiveSellColor:"rgba(231,86,86,.5)",quantityBackgroundInactiveBuyColor:"rgba(64,148,232,.5)",quantityBackgroundActiveBuyColor:"rgb(64,148,232)",quantityBackgroundInactiveSellColor:"rgba(231,86,86,.5)",quantityBackgroundActiveSellColor:"rgb(231,86,86)",quantityTextColor:"rgba( 255, 255, 255, 1)",quantityTextTransparency:0,quantityFontFamily:"Verdana",quantityFontSize:9,quantityFontBold:!0,quantityFontItalic:!1,cancelButtonBorderActiveBuyColor:"rgb(64,148,232)",cancelButtonBorderInactiveBuyColor:"rgba(64,148,232,.5)",cancelButtonBorderActiveSellColor:"rgb(231,86,86)",cancelButtonBorderInactiveSellColor:"rgba(231,86,86,.5)",cancelButtonBackgroundColor:"rgba( 255, 255, 255, 0.75)",cancelButtonBackgroundTransparency:25,cancelButtonIconActiveBuyColor:"rgb(64,148,232)",cancelButtonIconInactiveBuyColor:"rgba(64,148,232,.5)",cancelButtonIconActiveSellColor:"rgb(231,86,86)",cancelButtonIconInactiveSellColor:"rgba(231,86,86,.5)",tooltip:"",modifyTooltip:"",cancelTooltip:""},linetoolposition:{extendLeft:"inherit",lineLength:"inherit",lineBuyColor:"rgb(64,148,232)",lineSellColor:"rgb(231,86,86)",lineStyle:"inherit",lineWidth:"inherit",bodyBorderBuyColor:"rgb(64,148,232)",bodyBorderSellColor:"rgb(231,86,86)",bodyBackgroundColor:"rgba( 255, 255, 255, 0.75)",bodyBackgroundTransparency:25,bodyTextPositiveColor:"rgb(38,140,2)",bodyTextNeutralColor:"rgb(100,100,100)",bodyTextNegativeColor:"rgb(231,86,86)",bodyFontFamily:"Verdana",bodyFontSize:9,bodyFontBold:!0,bodyFontItalic:!1, +quantityBorderBuyColor:"rgb(64,148,232)",quantityBorderSellColor:"rgb(231,86,86)",quantityBackgroundBuyColor:"rgb(64,148,232)",quantityBackgroundSellColor:"rgb(231,86,86)",quantityTextColor:"rgba( 255, 255, 255, 1)",quantityTextTransparency:0,quantityFontFamily:"Verdana",quantityFontSize:9,quantityFontBold:!0,quantityFontItalic:!1,reverseButtonBorderBuyColor:"rgb(64,148,232)",reverseButtonBorderSellColor:"rgb(231,86,86)",reverseButtonBackgroundColor:"rgba( 255, 255, 255, 0.75)",reverseButtonBackgroundTransparency:25,reverseButtonIconBuyColor:"rgb(64,148,232)",reverseButtonIconSellColor:"rgb(231,86,86)",closeButtonBorderBuyColor:"rgb(64,148,232)",closeButtonBorderSellColor:"rgb(231,86,86)",closeButtonBackgroundColor:"rgba( 255, 255, 255, 0.75)",closeButtonBackgroundTransparency:25,closeButtonIconBuyColor:"rgb(64,148,232)",closeButtonIconSellColor:"rgb(231,86,86)",tooltip:"",protectTooltip:"",closeTooltip:"",reverseTooltip:""},linetoolexecution:{direction:"buy",arrowHeight:8,arrowSpacing:1,arrowBuyColor:"#4094e8",arrowSellColor:"#e75656",text:"",textColor:"rgba( 0, 0, 0, 1)",textTransparency:0,fontFamily:"Verdana",fontSize:10,fontBold:!1,fontItalic:!1,tooltip:""},linetoolicon:{color:"rgba( 61, 133, 198, 1)",size:40,icon:61720,angle:.5*Math.PI,scale:1},linetoolbezierquadro:{linecolor:"#2196f3",linewidth:1,fillBackground:!1,backgroundColor:"rgba(33, 150, 243, 0.2)",transparency:50,linestyle:CanvasEx.LINESTYLE_SOLID,extendLeft:!1,extendRight:!1,leftEnd:u.Normal,rightEnd:u.Normal},linetoolbeziercubic:{linecolor:"#00bcd4",linewidth:1,fillBackground:!1,backgroundColor:"rgba(0, 188, 212, 0.2)",transparency:50,linestyle:CanvasEx.LINESTYLE_SOLID,extendLeft:!1,extendRight:!1,leftEnd:u.Normal,rightEnd:u.Normal},linetooltrendline:{linecolor:"rgba(33, 150, 243, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID,extendLeft:!1,extendRight:!1,leftEnd:u.Normal,rightEnd:u.Normal,showLabel:!1,horzLabelsAlign:"center",vertLabelsAlign:"bottom",font:"Verdana",textcolor:"#2196f3",fontsize:14,bold:!1,italic:!1,snapTo45Degrees:!0,alwaysShowStats:!1,showMiddlePoint:!1,showPriceRange:!1,showBarsRange:!1,showDateTimeRange:!1,showDistance:!1,showAngle:!1,statsPosition:d.Right},linetoolinfoline:{linecolor:"rgba(33, 150, 243, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID,extendLeft:!1,extendRight:!1,leftEnd:u.Normal,rightEnd:u.Normal,font:"Verdana",showLabel:!1,horzLabelsAlign:"center",vertLabelsAlign:"bottom",textcolor:"#2196f3",fontsize:14,bold:!1,italic:!1,snapTo45Degrees:!0,alwaysShowStats:!0,showMiddlePoint:!1,showPriceRange:!0,showBarsRange:!0,showDateTimeRange:!0,showDistance:!0,showAngle:!0,statsPosition:d.Center},linetooltimecycles:{linecolor:"rgba(21, 153, 128, 1)",linewidth:1,fillBackground:!0,backgroundColor:"rgba(106, 168, 79, 0.5)",transparency:50,linestyle:CanvasEx.LINESTYLE_SOLID},linetoolsineline:{linecolor:"rgba( 21, 153, 128, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID},linetooltrendangle:{linecolor:"rgba(33, 150, 243, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID,snapTo45Degrees:!0,font:"Verdana", +textcolor:"rgba(33, 150, 243, 1)",fontsize:12,bold:!1,italic:!1,alwaysShowStats:!1,showMiddlePoint:!1,showPriceRange:!1,showBarsRange:!1,extendRight:!1,extendLeft:!1,statsPosition:d.Right},linetooldisjointangle:{linecolor:"rgba(0, 150, 136, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID,fillBackground:!0,backgroundColor:"rgba(0, 150, 136, 0.2)",transparency:20,extendLeft:!1,extendRight:!1,leftEnd:u.Normal,rightEnd:u.Normal,font:"Verdana",textcolor:"rgba(0, 150, 136, 1)",fontsize:12,bold:!1,italic:!1,showPrices:!1,showPriceRange:!1,showDateTimeRange:!1,showBarsRange:!1},linetoolflatbottom:{linecolor:"rgba(171, 71, 188, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID,fillBackground:!0,backgroundColor:"rgba(171, 71, 188, 0.2)",transparency:20,extendLeft:!1,extendRight:!1,leftEnd:u.Normal,rightEnd:u.Normal,font:"Verdana",textcolor:"rgba(171, 71, 188, 1)",fontsize:12,bold:!1,italic:!1,showPrices:!1,showPriceRange:!1,showDateTimeRange:!1,showBarsRange:!1},linetoolfibspiral:{counterclockwise:!1,linecolor:"rgba(0, 150, 136, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID},linetooldaterange:{linecolor:"rgba(30,136,229,1)",linewidth:1,font:f,textcolor:"rgba( 255, 255, 255, 1)",fontsize:12,fillLabelBackground:!0,labelBackgroundColor:"rgba(30,136,229,0.9)",fillBackground:!0,backgroundColor:"rgba(30,136,229,0.2)",backgroundTransparency:60,drawBorder:!1,borderColor:"rgba(30,136,229,0.9)",extendTop:!1,extendBottom:!1},linetoolpricerange:{linecolor:"rgba(30,136,229,1)",linewidth:1,font:f,textcolor:"rgba( 255, 255, 255, 1)",fontsize:12,fillLabelBackground:!0,labelBackgroundColor:"rgba(30,136,229,0.9)",fillBackground:!0,backgroundColor:"rgba(30,136,229,0.2)",backgroundTransparency:60,drawBorder:!1,borderColor:"rgba(30,136,229,0.9)",extendLeft:!1,extendRight:!1},linetooldateandpricerange:{linecolor:"rgba(30,136,229,1)",linewidth:1,font:f,textcolor:"rgba( 255, 255, 255, 1)",fontsize:12,fillLabelBackground:!0,labelBackgroundColor:"rgba(30,136,229,0.9)",fillBackground:!0,backgroundColor:"rgba(30,136,229,0.2)",backgroundTransparency:60,borderWidth:1,drawBorder:!1,borderColor:"rgba(30,136,229,1)"},linetoolriskrewardshort:{linecolor:"rgba(120, 123, 134, 1)",linewidth:1,font:"Verdana",textcolor:"rgba(255, 255, 255, 1)",fontsize:12,fillLabelBackground:!0,labelBackgroundColor:"rgba( 88, 88, 88, 1)",fillBackground:!0,stopBackground:"rgba(244, 67, 54, 0.2)",profitBackground:"rgba(0, 150, 136, 0.2)",stopBackgroundTransparency:80,profitBackgroundTransparency:80,drawBorder:!1,borderColor:"rgba( 102, 123, 139, 1)",compact:!1,riskDisplayMode:"percents",accountSize:1e3,risk:25,alwaysShowStats:!1,showPriceLabels:!0},linetoolriskrewardlong:{linecolor:"rgba(120, 123, 134, 1)",linewidth:1,font:"Verdana",textcolor:"rgba(255, 255, 255, 1)",fontsize:12,fillLabelBackground:!0,labelBackgroundColor:"rgba( 88, 88, 88, 1)",fillBackground:!0,stopBackground:"rgba(244, 67, 54, 0.2)",profitBackground:"rgba(0, 150, 136, 0.2)",stopBackgroundTransparency:80,profitBackgroundTransparency:80,drawBorder:!1,borderColor:"rgba( 102, 123, 139, 1)",compact:!1, +riskDisplayMode:"percents",accountSize:1e3,risk:25,alwaysShowStats:!1,showPriceLabels:!0},linetoolarrow:{linecolor:"rgba(33, 150, 243, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID,extendLeft:!1,extendRight:!1,leftEnd:u.Normal,rightEnd:u.Arrow,font:"Verdana",showLabel:!1,horzLabelsAlign:"center",vertLabelsAlign:"bottom",textcolor:"#2196f3",fontsize:14,bold:!1,italic:!1,alwaysShowStats:!1,showMiddlePoint:!1,showPriceRange:!1,showBarsRange:!1,showDateTimeRange:!1,showDistance:!1,showAngle:!1,statsPosition:d.Right},linetoolray:{linecolor:"rgba(33, 150, 243, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID,extendLeft:!1,extendRight:!0,leftEnd:u.Normal,rightEnd:u.Normal,font:"Verdana",showLabel:!1,horzLabelsAlign:"center",vertLabelsAlign:"bottom",textcolor:"#2196f3",fontsize:14,bold:!1,italic:!1,alwaysShowStats:!1,showMiddlePoint:!1,showPriceRange:!1,showBarsRange:!1,showDateTimeRange:!1,showDistance:!1,showAngle:!1,statsPosition:d.Right},linetoolextended:{linecolor:"rgba(33, 150, 243, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID,extendLeft:!0,extendRight:!0,leftEnd:u.Normal,rightEnd:u.Normal,font:"Verdana",showLabel:!1,horzLabelsAlign:"center",vertLabelsAlign:"bottom",textcolor:"#2196f3",fontsize:14,bold:!1,italic:!1,alwaysShowStats:!1,showMiddlePoint:!1,showPriceRange:!1,showBarsRange:!1,showDateTimeRange:!1,showDistance:!1,showAngle:!1,statsPosition:d.Right},linetoolhorzline:{linecolor:"rgba(33, 150, 243, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID,showPrice:!0,showLabel:!1,font:"Verdana",textcolor:"rgba(33, 150, 243, 1)",fontsize:12,bold:!1,italic:!1,horzLabelsAlign:"center",vertLabelsAlign:"top"},linetoolhorzray:{linecolor:"rgba(33, 150, 243, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID,showPrice:!0,showLabel:!1,font:"Verdana",textcolor:"rgba(33, 150, 243, 1)",fontsize:12,bold:!1,italic:!1,horzLabelsAlign:"center",vertLabelsAlign:"top"},linetoolvertline:{linecolor:"rgba(33, 150, 243, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID,showTime:!0,showLabel:!1,horzLabelsAlign:"right",vertLabelsAlign:"top",font:"Verdana",textcolor:"#2196f3",textOrientation:"vertical",fontsize:14,bold:!1,italic:!1},linetoolcrossline:{linecolor:"rgba(33, 150, 243, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID,showPrice:!0,showTime:!0},linetoolcirclelines:{trendline:{visible:!0,color:"rgba( 128, 128, 128, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_DASHED},linecolor:"rgba( 128, 204, 219, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID},linetoolfibtimezone:{horzLabelsAlign:"right",vertLabelsAlign:"bottom",baselinecolor:"rgba( 128, 128, 128, 1)",linecolor:"rgba( 0, 85, 219, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID,showLabels:!0,font:f,fillBackground:!1,transparency:80,trendline:{visible:!0,color:"rgba( 128, 128, 128, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_DASHED},level1:_(0,"rgba(120, 123, 134, 1)",!0),level2:_(1,"rgba(33, 150, 243, 1)",!0),level3:_(2,"rgba(33, 150, 243, 1)",!0),level4:_(3,"rgba(33, 150, 243, 1)",!0),level5:_(5,"rgba(33, 150, 243, 1)",!0), +level6:_(8,"rgba(33, 150, 243, 1)",!0),level7:_(13,"rgba(33, 150, 243, 1)",!0),level8:_(21,"rgba(33, 150, 243, 1)",!0),level9:_(34,"rgba(33, 150, 243, 1)",!0),level10:_(55,"rgba(33, 150, 243, 1)",!0),level11:_(89,"rgba(33, 150, 243, 1)",!0),__collectibleLines:["trendline","level1","level2","level3","level4","level5","level6","level7","level8","level9","level10","level11"]},linetooltext:{color:"#2196f3",font:"Verdana",fontsize:14,fillBackground:!1,backgroundColor:"rgba( 91, 133, 191, 0.3)",backgroundTransparency:70,drawBorder:!1,borderColor:"rgba( 102, 123, 139, 1)",bold:!1,italic:!1,fixedSize:!0,wordWrap:!1,wordWrapWidth:200},linetooltextabsolute:{color:"#2196f3",font:"Verdana",fontsize:14,fillBackground:!1,backgroundColor:"rgba( 155, 190, 213, 0.3)",backgroundTransparency:70,drawBorder:!1,borderColor:"rgba( 102, 123, 139, 1)",bold:!1,italic:!1,fixedSize:!1,wordWrap:!1,wordWrapWidth:200},linetoolballoon:{color:"#ffffff",backgroundColor:"rgba(156, 39, 176, 0.7)",borderColor:"rgba(156, 39, 176, 0.0)",fontsize:16,fontWeight:"normal",font:"Arial",transparency:30},linetoolbrush:{linecolor:"#00bcd4",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID,smooth:5,fillBackground:!1,backgroundColor:"rgba(0, 188, 212, 0.5)",transparency:50,leftEnd:u.Normal,rightEnd:u.Normal},linetoolpolyline:{linecolor:"#7e57c2",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID,fillBackground:!0,backgroundColor:"rgba(126, 87, 194, 0.2)",transparency:50,filled:!1},linetoolpath:{lineColor:"#2196f3",lineWidth:2,lineStyle:CanvasEx.LINESTYLE_SOLID,leftEnd:u.Normal,rightEnd:u.Arrow},linetoolarrowmarkleft:{color:"rgba( 120, 120, 120, 1)",arrowColor:"#2196F3",fontsize:20,font:"Verdana"},linetoolarrowmarkup:{color:"rgba( 120, 120, 120, 1)",arrowColor:"#009688",fontsize:20,font:"Verdana"},linetoolarrowmarkright:{color:"rgba( 120, 120, 120, 1)",arrowColor:"#2196F3",fontsize:20,font:"Verdana"},linetoolarrowmarkdown:{color:"rgba( 120, 120, 120, 1)",arrowColor:"#E53935",fontsize:20,font:"Verdana"},linetoolflagmark:{flagColor:"#2196F3"},linetoolnote:{markerColor:"#2196f3",textColor:"#ffffff",backgroundColor:"rgba(33, 150, 243, 0.7)",backgroundTransparency:0,borderColor:"#2196f3",font:"Arial",fontSize:20,bold:!1,italic:!1,fixedSize:!0},linetoolnoteabsolute:{markerColor:"#2196f3",textColor:"#ffffff",backgroundColor:"rgba(33, 150, 243, 0.7)",backgroundTransparency:0,borderColor:"#2196f3",font:"Arial",fontSize:20,bold:!1,italic:!1,fixedSize:!0},linetoolpricelabel:{color:"#ffffff",backgroundColor:"#2196f3",borderColor:"#2196f3",fontWeight:"bold",fontsize:14,font:f,transparency:0},linetoolarrowmarker:{backgroundColor:"#1E88E5",textColor:"#1E88E5",font:f,bold:!0,italic:!1,fontsize:16,showLabel:!0},linetoolrectangle:{color:"#9c27b0",fillBackground:!0,backgroundColor:"rgba(156, 39, 176, 0.2)",linewidth:1,snapTo45Degrees:!0,transparency:50,showLabel:!1,horzLabelsAlign:"left",vertLabelsAlign:"bottom",textColor:"#9c27b0",fontSize:14,bold:!1,italic:!1,extendLeft:!1,extendRight:!1},linetoolrotatedrectangle:{color:"#4caf50",fillBackground:!0,backgroundColor:"rgba(76, 175, 80, 0.2)", +transparency:50,linewidth:1,snapTo45Degrees:!0},linetoolellipse:{color:"#e91e63",fillBackground:!0,backgroundColor:"rgba(233, 30, 99, 0.2)",transparency:50,linewidth:1},linetoolarc:{color:"#ab47bc",fillBackground:!0,backgroundColor:"rgba(171, 71, 188, 0.2)",transparency:50,linewidth:1},linetoolprediction:{linecolor:"rgba(33, 150, 243, 1)",linewidth:1,sourceBackColor:"rgba(33, 150, 243, 1)",sourceTextColor:"rgba(255, 255, 255, 1)",sourceStrokeColor:"rgba(33, 150, 243, 1)",targetStrokeColor:"rgba(33, 150, 243, 1)",targetBackColor:"rgba(33, 150, 243, 1)",targetTextColor:"rgba(255, 255, 255, 1)",successBackground:"rgba(76, 175, 80, 1)",successTextColor:"rgba(255, 255, 255, 1)",failureBackground:"rgba(244, 67, 54, 1)",failureTextColor:"rgba(255, 255, 255, 1)",intermediateBackColor:"rgba(234, 210, 137, 1)",intermediateTextColor:"rgba(109, 77, 34, 1)",transparency:10,centersColor:"rgba( 32, 32, 32, 1)"},linetooltriangle:{color:"#f57c00",fillBackground:!0,backgroundColor:"rgba(245, 124, 0, 0.2)",transparency:50,linewidth:1},linetoolcallout:{color:"#ffffff",backgroundColor:"rgba(0, 151, 167, 0.7)",transparency:50,linewidth:1,fontsize:16,font:"Verdana",bordercolor:"rgba(0, 151, 167, 1)",bold:!1,italic:!1,wordWrap:!1,wordWrapWidth:200},linetoolparallelchannel:{linecolor:"rgba(33, 150, 243, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID,extendLeft:!1,extendRight:!1,fillBackground:!0,backgroundColor:"rgba(33, 150, 243, 0.2)",transparency:20,showMidline:!0,midlinecolor:"rgba(33, 150, 243, 1)",midlinewidth:1,midlinestyle:CanvasEx.LINESTYLE_DASHED},linetoolelliottimpulse:{degree:7,showWave:!0,color:"rgba( 61, 133, 198, 1)",linewidth:1},linetoolelliotttriangle:{degree:7,showWave:!0,color:"rgba( 255, 152, 0, 1)",linewidth:1},linetoolelliotttriplecombo:{degree:7,showWave:!0,color:"rgba( 106, 168, 79, 1)",linewidth:1},linetoolelliottcorrection:{degree:7,showWave:!0,color:"rgba( 61, 133, 198, 1)",linewidth:1},linetoolelliottdoublecombo:{degree:7,showWave:!0,color:"rgba( 106, 168, 79, 1)",linewidth:1},linetoolbarspattern:{color:"rgba(33, 150, 243, 1)",mode:o.Bars,mirrored:!1,flipped:!1},linetoolghostfeed:{averageHL:20,variance:50,candleStyle:{upColor:"rgba(178, 223, 219, 1)",downColor:"rgba(239, 154, 154, 1)",drawWick:!0,drawBorder:!0,borderColor:"#378658",borderUpColor:"rgba(0, 150, 136, 1)",borderDownColor:"rgba(244, 67, 54, 1)",wickColor:"rgba(120, 123, 134, 1)"},transparency:50},study:{inputs:{},styles:{},palettes:{},bands:{},area:{},graphics:{},showInDataWindow:!0,visible:!0,showStudyArguments:!0,precision:"default"},linetoolpitchfork:{fillBackground:!0,transparency:80,style:r.Original,median:{visible:!0,color:"rgba(244, 67, 54, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID},extendLines:!1,level0:_(.25,"rgba(255, 183, 77, 1)",!1),level1:_(.382,"rgba(129, 199, 132, 1)",!1),level2:_(.5,"rgba(76, 175, 80, 1)",!0),level3:_(.618,"rgba(0, 150, 136, 1)",!1),level4:_(.75,"rgba(100, 181, 246, 1)",!1),level5:_(1,"rgba(33, 150, 243, 1)",!0),level6:_(1.5,"rgba(156, 39, 176, 1)",!1),level7:_(1.75,"rgba(233, 30, 99, 1)",!1), +level8:_(2,"rgba(229, 115, 115, 1)",!1),__collectibleLines:["median","level0","level1","level2","level3","level4","level5","level6","level7","level8"]},linetoolpitchfan:{fillBackground:!0,transparency:80,median:{visible:!0,color:"rgba(244, 67, 54, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID},level0:_(.25,"rgba(255, 183, 77, 1)",!1),level1:_(.382,"rgba(129, 199, 132, 1)",!1),level2:_(.5,"rgba(76, 175, 80, 1)",!0),level3:_(.618,"rgba(0, 150, 136, 1)",!1),level4:_(.75,"rgba(100, 181, 246, 1)",!1),level5:_(1,"rgba(33, 150, 243, 1)",!0),level6:_(1.5,"rgba(156, 39, 176, 1)",!1),level7:_(1.75,"rgba(233, 30, 99, 1)",!1),level8:_(2,"rgba(229, 115, 115, 1)",!1),__collectibleLines:["median","level0","level1","level2","level3","level4","level5","level6","level7","level8"]},linetoolgannfan:{showLabels:!0,font:"Verdana",fillBackground:!0,transparency:80,level1:b(1,8,"rgba(255, 183, 77, 1)",!0),level2:b(1,4,"rgba(129, 199, 132, 1)",!0),level3:b(1,3,"rgba(76, 175, 80, 1)",!0),level4:b(1,2,"rgba(0, 150, 136, 1)",!0),level5:b(1,1,"rgba(100, 181, 246, 1)",!0),level6:b(2,1,"rgba(33, 150, 243, 1)",!0),level7:b(3,1,"rgba(156, 39, 176, 1)",!0),level8:b(4,1,"rgba(233, 30, 99, 1)",!0),level9:b(8,1,"rgba(229, 115, 115, 1)",!0),__collectibleLines:["level1","level2","level3","level4","level5","level6","level7","level8","level9","level10","level11"]},linetoolganncomplex:{fillBackground:!1,arcsBackground:{fillBackground:!0,transparency:80},reverse:!1,scaleRatio:"",showLabels:!0,labelsStyle:{font:f,fontSize:12,bold:!1,italic:!1},levels:[m("rgba(120, 123, 134, 1)",!0,1),m("rgba(255, 152, 0, 1)",!0,1),m("rgba(129, 199, 132, 1)",!0,1),m("rgba(76, 175, 80, 1)",!0,1),m("rgba(0, 150, 136, 1)",!0,1),m("rgba(120, 123, 134, 1)",!0,1)],fanlines:[v("rgba(179, 157, 219, 1)",!1,1,8,1),v("rgba(244, 67, 54, 1)",!1,1,5,1),v("rgba(120, 123, 134, 1)",!1,1,4,1),v("rgba(255, 152, 0, 1)",!1,1,3,1),v("rgba(129, 199, 132, 1)",!0,1,2,1),v("rgba(76, 175, 80, 1)",!0,1,1,1),v("rgba(0, 150, 136, 1)",!0,1,1,2),v("rgba(0, 150, 136, 1)",!1,1,1,3),v("rgba(33, 150, 243, 1)",!1,1,1,4),v("rgba(149, 117, 205, 1)",!1,1,1,5),v("rgba(179, 157, 219, 1)",!1,1,1,8)],arcs:[v("rgba(255, 152, 0, 1)",!0,1,1,0),v("rgba(255, 152, 0, 1)",!0,1,1,1),v("rgba(255, 152, 0, 1)",!0,1,1.5,0),v("rgba(129, 199, 132, 1)",!0,1,2,0),v("rgba(129, 199, 132, 1)",!0,1,2,1),v("rgba(76, 175, 80, 1)",!0,1,3,0),v("rgba(76, 175, 80, 1)",!0,1,3,1),v("rgba(0, 150, 136, 1)",!0,1,4,0),v("rgba(0, 150, 136, 1)",!0,1,4,1),v("rgba(33, 150, 243, 1)",!0,1,5,0),v("rgba(33, 150, 243, 1)",!0,1,5,1)],__collectibleLines:["trendline","levels.0","levels.1","levels.2","levels.3","levels.4","levels.5","fanlines.0","fanlines.1","fanlines.2","fanlines.3","fanlines.4","fanlines.5","fanlines.6","fanlines.7","fanlines.8","fanlines.9","fanlines.10","arcs.0","arcs.1","arcs.2","arcs.3","arcs.4","arcs.5","arcs.6","arcs.7","arcs.8","arcs.9","arcs.10"]},linetoolgannfixed:{fillBackground:!1,arcsBackground:{fillBackground:!0,transparency:80},reverse:!1, +levels:[m("rgba(120, 123, 134, 1)",!0,1),m("rgba(255, 152, 0, 1)",!0,1),m("rgba(129, 199, 132, 1)",!0,1),m("rgba(76, 175, 80, 1)",!0,1),m("rgba(0, 150, 136, 1)",!0,1),m("rgba(120, 123, 134, 1)",!0,1)],fanlines:[v("rgba(179, 157, 219, 1)",!1,1,8,1),v("rgba(244, 67, 54, 1)",!1,1,5,1),v("rgba(120, 123, 134, 1)",!1,1,4,1),v("rgba(255, 152, 0, 1)",!1,1,3,1),v("rgba(129, 199, 132, 1)",!0,1,2,1),v("rgba(76, 175, 80, 1)",!0,1,1,1),v("rgba(0, 150, 136, 1)",!0,1,1,2),v("rgba(0, 150, 136, 1)",!1,1,1,3),v("rgba(33, 150, 243, 1)",!1,1,1,4),v("rgba(149, 117, 205, 1)",!1,1,1,5),v("rgba(179, 157, 219, 1)",!1,1,1,8)],arcs:[v("rgba(255, 152, 0, 1)",!0,1,1,0),v("rgba(255, 152, 0, 1)",!0,1,1,1),v("rgba(255, 152, 0, 1)",!0,1,1.5,0),v("rgba(129, 199, 132, 1)",!0,1,2,0),v("rgba(129, 199, 132, 1)",!0,1,2,1),v("rgba(76, 175, 80, 1)",!0,1,3,0),v("rgba(76, 175, 80, 1)",!0,1,3,1),v("rgba(0, 150, 136, 1)",!0,1,4,0),v("rgba(0, 150, 136, 1)",!0,1,4,1),v("rgba(33, 150, 243, 1)",!0,1,5,0),v("rgba(33, 150, 243, 1)",!0,1,5,1)],__collectibleLines:["trendline","levels.0","levels.1","levels.2","levels.3","levels.4","levels.5","fanlines.0","fanlines.1","fanlines.2","fanlines.3","fanlines.4","fanlines.5","fanlines.6","fanlines.7","fanlines.8","fanlines.9","fanlines.10","arcs.0","arcs.1","arcs.2","arcs.3","arcs.4","arcs.5","arcs.6","arcs.7","arcs.8","arcs.9","arcs.10"]},linetoolgannsquare:{color:"rgba( 21, 56, 153, 0.8)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID,font:f,showTopLabels:!0,showBottomLabels:!0,showLeftLabels:!0,showRightLabels:!0,fillHorzBackground:!0,horzTransparency:80,fillVertBackground:!0,vertTransparency:80,reverse:!1,fans:t("rgba(149, 152, 161, 1)",!1),hlevel1:i(0,"rgba(120, 123, 134, 1)",!0),hlevel2:i(.25,"rgba(245, 124, 0, 1)",!0),hlevel3:i(.382,"rgba(129, 199, 132, 1)",!0),hlevel4:i(.5,"rgba(76, 175, 80, 1)",!0),hlevel5:i(.618,"rgba(0, 150, 136, 1)",!0),hlevel6:i(.75,"rgba(33, 150, 243, 1)",!0),hlevel7:i(1,"rgba(120, 123, 134, 1)",!0),vlevel1:i(0,"rgba(120, 123, 134, 1)",!0),vlevel2:i(.25,"rgba(245, 124, 0, 1)",!0),vlevel3:i(.382,"rgba(129, 199, 132, 1)",!0),vlevel4:i(.5,"rgba(76, 175, 80, 1)",!0),vlevel5:i(.618,"rgba(0, 150, 136, 1)",!0),vlevel6:i(.75,"rgba(33, 150, 243, 1)",!0),vlevel7:i(1,"rgba(120, 123, 134, 1)",!0),__collectibleLines:["fans","hlevel1","hlevel2","hlevel3","hlevel4","hlevel5","hlevel6","hlevel7","vlevel1","vlevel2","vlevel3","vlevel4","vlevel5","vlevel6","vlevel7"]},linetoolfibspeedresistancefan:{fillBackground:!0,transparency:80,grid:{color:"rgba( 21, 56, 153, 0.8)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID,visible:!0},linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID,font:f,showTopLabels:!0,showBottomLabels:!0,showLeftLabels:!0,showRightLabels:!0,snapTo45Degrees:!0,reverse:!1,hlevel1:i(0,"rgba(120, 123, 134, 1)",!0),hlevel2:i(.25,"rgba(245, 124, 0, 1)",!0),hlevel3:i(.382,"rgba(129, 199, 132, 1)",!0),hlevel4:i(.5,"rgba(76, 175, 80, 1)",!0),hlevel5:i(.618,"rgba(0, 150, 136, 1)",!0),hlevel6:i(.75,"rgba(33, 150, 243, 1)",!0),hlevel7:i(1,"rgba(120, 123, 134, 1)",!0),vlevel1:i(0,"rgba(120, 123, 134, 1)",!0), +vlevel2:i(.25,"rgba(245, 124, 0, 1)",!0),vlevel3:i(.382,"rgba(129, 199, 132, 1)",!0),vlevel4:i(.5,"rgba(76, 175, 80, 1)",!0),vlevel5:i(.618,"rgba(0, 150, 136, 1)",!0),vlevel6:i(.75,"rgba(33, 150, 243, 1)",!0),vlevel7:i(1,"rgba(120, 123, 134, 1)",!0),__collectibleLines:["trendline","hlevel1","hlevel2","hlevel3","hlevel4","hlevel5","hlevel6","hlevel7","vlevel1","vlevel2","vlevel3","vlevel4","vlevel5","vlevel6","vlevel7"]},linetoolfibretracement:{showCoeffs:!0,showPrices:!0,font:f,fillBackground:!0,transparency:80,extendLines:!1,extendLinesLeft:!1,horzLabelsAlign:"left",vertLabelsAlign:"bottom",reverse:!1,coeffsAsPercents:!1,fibLevelsBasedOnLogScale:!1,trendline:{visible:!0,color:"rgba(120, 123, 134, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_DASHED},levelsStyle:{linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID},level1:i(0,"rgba(120, 123, 134, 1)",!0),level2:i(.236,"rgba(244, 67, 54, 1)",!0),level3:i(.382,"rgba(129, 199, 132, 1)",!0),level4:i(.5,"rgba(76, 175, 80, 1)",!0),level5:i(.618,"rgba(0, 150, 136, 1)",!0),level6:i(.786,"rgba(100, 181, 246, 1)",!0),level7:i(1,"rgba(120, 123, 134, 1)",!0),level8:i(1.618,"rgba(33, 150, 243, 1)",!0),level9:i(2.618,"rgba(244, 67, 54, 1)",!0),level10:i(3.618,"rgba(156, 39, 176, 1)",!0),level11:i(4.236,"rgba(233, 30, 99, 1)",!0),level12:i(1.272,"rgba(129, 199, 132, 1)",!1),level13:i(1.414,"rgba(244, 67, 54, 1)",!1),level16:i(2,"rgba(0, 150, 136, 1)",!1),level14:i(2.272,"rgba(129, 199, 132, 1)",!1),level15:i(2.414,"rgba(76, 175, 80, 1)",!1),level17:i(3,"rgba(100, 181, 246, 1)",!1),level18:i(3.272,"rgba(120, 123, 134, 1)",!1),level19:i(3.414,"rgba(33, 150, 243, 1)",!1),level20:i(4,"rgba( 204, 40, 40, 1)",!1),level21:i(4.272,"rgba(156, 39, 176, 1)",!1),level22:i(4.414,"rgba(233, 30, 99, 1)",!1),level23:i(4.618,"rgba(129, 199, 132, 1)",!1),level24:i(4.764,"rgba(0, 150, 136, 1)",!1),__collectibleLines:["trendline","level1","level2","level3","level4","level5","level6","level7","level8","level9","level10","level11","level12","level13","level14","level15","level16","level17","level18","level19","level20","level21","level22","level23","level24"]},linetoolfibchannel:{showCoeffs:!0,showPrices:!0,font:f,fillBackground:!0,transparency:80,extendLeft:!1,extendRight:!1,horzLabelsAlign:"left",vertLabelsAlign:"middle",coeffsAsPercents:!1,levelsStyle:{linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID},level1:i(0,"rgba(120, 123, 134, 1)",!0),level2:i(.236,"rgba(244, 67, 54, 1)",!0),level3:i(.382,"rgba(129, 199, 132, 1)",!0),level4:i(.5,"rgba(76, 175, 80, 1)",!0),level5:i(.618,"rgba(0, 150, 136, 1)",!0),level6:i(.786,"rgba(100, 181, 246, 1)",!0),level7:i(1,"rgba(120, 123, 134, 1)",!0),level8:i(1.618,"rgba(33, 150, 243, 1)",!0),level9:i(2.618,"rgba(244, 67, 54, 1)",!0),level10:i(3.618,"rgba(156, 39, 176, 1)",!0),level11:i(4.236,"rgba(233, 30, 99, 1)",!0),level12:i(1.272,"rgba(129, 199, 132, 1)",!1),level13:i(1.414,"rgba(244, 67, 54, 1)",!1),level16:i(2,"rgba(0, 150, 136, 1)",!1),level14:i(2.272,"rgba(129, 199, 132, 1)",!1),level15:i(2.414,"rgba(76, 175, 80, 1)",!1),level17:i(3,"rgba(100, 181, 246, 1)",!1), +level18:i(3.272,"rgba(120, 123, 134, 1)",!1),level19:i(3.414,"rgba(33, 150, 243, 1)",!1),level20:i(4,"rgba( 204, 40, 40, 1)",!1),level21:i(4.272,"rgba(156, 39, 176, 1)",!1),level22:i(4.414,"rgba(233, 30, 99, 1)",!1),level23:i(4.618,"rgba(129, 199, 132, 1)",!1),level24:i(4.764,"rgba(0, 150, 136, 1)",!1),__collectibleLines:["level1","level2","level3","level4","level5","level6","level7","level8","level9","level10","level11","level12","level13","level14","level15","level16","level17","level18","level19","level20","level21","level22","level23","level24"]},linetoolprojection:{showCoeffs:!0,font:"Verdana",fillBackground:!0,transparency:80,color1:"rgba(33, 150, 243, 0.2)",color2:"rgba(156, 39, 176, 0.2)",linewidth:1,trendline:{visible:!0,color:"rgba(149, 152, 161, 1)",linestyle:CanvasEx.LINESTYLE_SOLID},level1:_(1,"rgba( 128, 128, 128, 1)",!0)},linetool5pointspattern:{color:"rgba( 204, 40, 149, 1)",textcolor:"rgba( 255, 255, 255, 1)",fillBackground:!0,backgroundColor:"rgba( 204, 40, 149, 0.5)",font:"Verdana",fontsize:12,bold:!1,italic:!1,transparency:50,linewidth:1},linetoolcypherpattern:{color:"#CC2895",textcolor:"#FFFFFF",fillBackground:!0,backgroundColor:"#CC2895",font:"Verdana",fontsize:12,bold:!1,italic:!1,transparency:50,linewidth:1},linetooltrianglepattern:{color:"rgba( 149, 40, 255, 1)",textcolor:"rgba( 255, 255, 255, 1)",fillBackground:!0,backgroundColor:"rgba( 149, 40, 204, 0.5)",font:"Verdana",fontsize:12,bold:!1,italic:!1,transparency:50,linewidth:1},linetoolabcd:{color:"rgba( 0, 155, 0, 1)",textcolor:"rgba( 255, 255, 255, 1)",font:"Verdana",fontsize:12,bold:!1,italic:!1,linewidth:1},linetoolthreedrivers:{color:"rgba( 149, 40, 255, 1)",textcolor:"rgba( 255, 255, 255, 1)",fillBackground:!0,backgroundColor:"rgba( 149, 40, 204, 0.5)",font:"Verdana",fontsize:12,bold:!1,italic:!1,transparency:50,linewidth:1},linetoolheadandshoulders:{color:"rgba( 69, 104, 47, 1)",textcolor:"rgba( 255, 255, 255, 1)",fillBackground:!0,backgroundColor:"rgba( 69, 168, 47, 0.5)",font:"Verdana",fontsize:12,bold:!1,italic:!1,transparency:50,linewidth:1},linetoolfibwedge:{showCoeffs:!0,font:f,fillBackground:!0,transparency:80,trendline:{visible:!0,color:"rgba( 128, 128, 128, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID},level1:_(.236,"rgba(244, 67, 54, 1)",!0),level2:_(.382,"rgba(129, 199, 132, 1)",!0),level3:_(.5,"rgba(76, 175, 80, 1)",!0),level4:_(.618,"rgba(0, 150, 136, 1)",!0),level5:_(.786,"rgba(100, 181, 246, 1)",!0),level6:_(1,"rgba(120, 123, 134, 1)",!0),level7:_(1.618,"rgba(33, 150, 243, 1)",!1),level8:_(2.618,"rgba(244, 67, 54, 1)",!1),level9:_(3.618,"rgba(103, 58, 183, 1)",!1),level10:_(4.236,"rgba(233, 30, 99, 1)",!1),level11:_(4.618,"rgba(233, 30, 99, 1)",!1),__collectibleLines:["trendline","level1","level2","level3","level4","level5","level6","level7","level8","level9","level10","level11"]},linetoolfibcircles:{showCoeffs:!0,font:f,fillBackground:!0,transparency:80,snapTo45Degrees:!0,coeffsAsPercents:!1,trendline:{visible:!0,color:"rgba(120, 123, 134, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_DASHED}, +level1:_(.236,"rgba(244, 67, 54, 1)",!0),level2:_(.382,"rgba(129, 199, 132, 1)",!0),level3:_(.5,"rgba(76, 175, 80, 1)",!0),level4:_(.618,"rgba(0, 150, 136, 1)",!0),level5:_(.786,"rgba(100, 181, 246, 1)",!0),level6:_(1,"rgba(120, 123, 134, 1)",!0),level7:_(1.618,"rgba(33, 150, 243, 1)",!0),level8:_(2.618,"rgba(244, 67, 54, 1)",!0),level9:_(3.618,"rgba(103, 58, 183, 1)",!0),level10:_(4.236,"rgba(233, 30, 99, 1)",!0),level11:_(4.618,"rgba(233, 30, 99, 1)",!0),__collectibleLines:["trendline","level1","level2","level3","level4","level5","level6","level7","level8","level9","level10","level11"]},linetoolfibspeedresistancearcs:{showCoeffs:!0,font:f,fillBackground:!0,transparency:80,fullCircles:!1,trendline:{visible:!0,color:"rgba(120, 123, 134, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_DASHED},level1:_(.236,"rgba(244, 67, 54, 1)",!0),level2:_(.382,"rgba(129, 199, 132, 1)",!0),level3:_(.5,"rgba(76, 175, 80, 1)",!0),level4:_(.618,"rgba(0, 150, 136, 1)",!0),level5:_(.786,"rgba(100, 181, 246, 1)",!0),level6:_(1,"rgba(120, 123, 134, 1)",!0),level7:_(1.618,"rgba(33, 150, 243, 1)",!0),level8:_(2.618,"rgba(244, 67, 54, 1)",!0),level9:_(3.618,"rgba(103, 58, 183, 1)",!0),level10:_(4.236,"rgba(233, 30, 99, 1)",!0),level11:_(4.618,"rgba(233, 30, 99, 1)",!0),__collectibleLines:["trendline","level1","level2","level3","level4","level5","level6","level7","level8","level9","level10","level11"]},linetooltrendbasedfibextension:{showCoeffs:!0,showPrices:!0,font:f,fillBackground:!0,transparency:80,extendLines:!1,extendLinesLeft:!1,horzLabelsAlign:"left",vertLabelsAlign:"bottom",reverse:!1,coeffsAsPercents:!1,fibLevelsBasedOnLogScale:!1,trendline:{visible:!0,color:"rgba(120, 123, 134, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_DASHED},levelsStyle:{linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID},level1:i(0,"rgba(120, 123, 134, 1)",!0),level2:i(.236,"rgba(244, 67, 54, 1)",!0),level3:i(.382,"rgba(129, 199, 132, 1)",!0),level4:i(.5,"rgba(76, 175, 80, 1)",!0),level5:i(.618,"rgba(0, 150, 136, 1)",!0),level6:i(.786,"rgba(100, 181, 246, 1)",!0),level7:i(1,"rgba(120, 123, 134, 1)",!0),level8:i(1.618,"rgba(33, 150, 243, 1)",!0),level9:i(2.618,"rgba(244, 67, 54, 1)",!0),level10:i(3.618,"rgba(156, 39, 176, 1)",!0),level11:i(4.236,"rgba(233, 30, 99, 1)",!0),level12:i(1.272,"rgba(129, 199, 132, 1)",!1),level13:i(1.414,"rgba(244, 67, 54, 1)",!1),level16:i(2,"rgba(0, 150, 136, 1)",!1),level14:i(2.272,"rgba(129, 199, 132, 1)",!1),level15:i(2.414,"rgba(76, 175, 80, 1)",!1),level17:i(3,"rgba(100, 181, 246, 1)",!1),level18:i(3.272,"rgba(120, 123, 134, 1)",!1),level19:i(3.414,"rgba(33, 150, 243, 1)",!1),level20:i(4,"rgba( 204, 40, 40, 1)",!1),level21:i(4.272,"rgba(156, 39, 176, 1)",!1),level22:i(4.414,"rgba(233, 30, 99, 1)",!1),level23:i(4.618,"rgba(129, 199, 132, 1)",!1),level24:i(4.764,"rgba(0, 150, 136, 1)",!1), +__collectibleLines:["trendline","level1","level2","level3","level4","level5","level6","level7","level8","level9","level10","level11","level12","level13","level14","level15","level16","level17","level18","level19","level20","level21","level22","level23","level24"]},linetooltrendbasedfibtime:{showCoeffs:!0,font:"Verdana",fillBackground:!0,transparency:80,horzLabelsAlign:"right",vertLabelsAlign:"bottom",trendline:{visible:!0,color:"rgba(120, 123, 134, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_DASHED},level1:_(0,"rgba(120, 123, 134, 1)",!0),level2:_(.382,"rgba(244, 67, 54, 1)",!0),level3:_(.5,"rgba(129, 199, 132, 1)",!1),level4:_(.618,"rgba(76, 175, 80, 1)",!0),level5:_(1,"rgba(0, 150, 136, 1)",!0),level6:_(1.382,"rgba(100, 181, 246, 1)",!0),level7:_(1.618,"rgba(120, 123, 134, 1)",!0),level8:_(2,"rgba(33, 150, 243, 1)",!0),level9:_(2.382,"rgba(244, 67, 54, 1)",!0),level10:_(2.618,"rgba(156, 39, 176, 1)",!0),level11:_(3,"rgba(233, 30, 99, 1)",!0),__collectibleLines:["trendline","level1","level2","level3","level4","level5","level6","level7","level8","level9","level10","level11"]},linetoolschiffpitchfork:{fillBackground:!0,transparency:80,style:r.Schiff,median:{visible:!0,color:"rgba(244, 67, 54, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID},extendLines:!1,level0:_(.25,"rgba(255, 183, 77, 1)",!1),level1:_(.382,"rgba(129, 199, 132, 1)",!1),level2:_(.5,"rgba(76, 175, 80, 1)",!0),level3:_(.618,"rgba(0, 150, 136, 1)",!1),level4:_(.75,"rgba(100, 181, 246, 1)",!1),level5:_(1,"rgba(33, 150, 243, 1)",!0),level6:_(1.5,"rgba(156, 39, 176, 1)",!1),level7:_(1.75,"rgba(233, 30, 99, 1)",!1),level8:_(2,"rgba(229, 115, 115, 1)",!1),__collectibleLines:["median","level0","level1","level2","level3","level4","level5","level6","level7","level8"]},linetoolschiffpitchfork2:{fillBackground:!0,transparency:80,style:r.Schiff2,median:{visible:!0,color:"rgba(244, 67, 54, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID},extendLines:!1,level0:_(.25,"rgba(255, 183, 77, 1)",!1),level1:_(.382,"rgba(129, 199, 132, 1)",!1),level2:_(.5,"rgba(76, 175, 80, 1)",!0),level3:_(.618,"rgba(0, 150, 136, 1)",!1),level4:_(.75,"rgba(100, 181, 246, 1)",!1),level5:_(1,"rgba(33, 150, 243, 1)",!0),level6:_(1.5,"rgba(156, 39, 176, 1)",!1),level7:_(1.75,"rgba(233, 30, 99, 1)",!1),level8:_(2,"rgba(229, 115, 115, 1)",!1),__collectibleLines:["median","level0","level1","level2","level3","level4","level5","level6","level7","level8"]},linetoolinsidepitchfork:{fillBackground:!0,transparency:80,style:r.Inside,median:{visible:!0,color:"rgba(244, 67, 54, 1)",linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID},extendLines:!1,level0:_(.25,"rgba(255, 183, 77, 1)",!1),level1:_(.382,"rgba(129, 199, 132, 1)",!1),level2:_(.5,"rgba(76, 175, 80, 1)",!0),level3:_(.618,"rgba(0, 150, 136, 1)",!1),level4:_(.75,"rgba(100, 181, 246, 1)",!1),level5:_(1,"rgba(33, 150, 243, 1)",!0),level6:_(1.5,"rgba(156, 39, 176, 1)",!1),level7:_(1.75,"rgba(233, 30, 99, 1)",!1),level8:_(2,"rgba(229, 115, 115, 1)",!1), +__collectibleLines:["median","level0","level1","level2","level3","level4","level5","level6","level7","level8"]},linetoolregressiontrend:{linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID,styles:{upLine:{visible:!0,color:"rgba(33, 150, 243, 0.3)",linestyle:CanvasEx.LINESTYLE_SOLID,linewidth:1},downLine:{visible:!0,color:"rgba(33, 150, 243, 0.3)",linestyle:CanvasEx.LINESTYLE_SOLID,linewidth:1},baseLine:{visible:!0,color:"rgba(244, 67, 54, 0.3)",linestyle:CanvasEx.LINESTYLE_SOLID,linewidth:1},extendLines:!1,showPearsons:!0,transparency:70}}},y(TradingView.defaultProperties.chartproperties),g()}if(void 0===TradingView.defaultProperties["study_MA@tv-basicstudies"]&&(TradingView.defaultProperties["study_MA@tv-basicstudies"]={description:"Moving Average",shortDescription:"MA",inputs:{length:9,source:"close"},styles:{MovAvg:{visible:!0,color:"rgba( 4, 150, 255, 1)",linestyle:CanvasEx.LINESTYLE_SOLID,linewidth:1,plottype:s.Line,histogramBase:0,title:"MA"}}}),void 0===TradingView.defaultProperties["study_PivotPointsHighLow@tv-basicstudies"]&&(TradingView.defaultProperties["study_PivotPointsHighLow@tv-basicstudies"]={font:"Arial",fontsize:10,borderColor:"rgba( 83, 143, 31, 1)",backColor:"rgba( 240, 255, 204, 1)",textColor:"rgba( 0, 0, 0, 1)"}),void 0===TradingView.defaultProperties["study_PivotPointsStandard@tv-basicstudies"]){var w="rgba( 212, 121, 40, 1)";TradingView.defaultProperties["study_PivotPointsStandard@tv-basicstudies"]={_hardCodedDefaultsVersion:1,font:"Arial",fontsize:11,levelsStyle:{showLabels:!0,visibility:{P:!0,"S1/R1":!0,"S2/R2":!0,"S3/R3":!0,"S4/R4":!0,"S5/R5":!0},colors:{P:w,"S1/R1":w,"S2/R2":w,"S3/R3":w,"S4/R4":w,"S5/R5":w},widths:{P:1,"S1/R1":1,"S2/R2":1,"S3/R3":1,"S4/R4":1,"S5/R5":1}}}}if(void 0===TradingView.defaultProperties["study_ZigZag@tv-basicstudies"]&&(TradingView.defaultProperties["study_ZigZag@tv-basicstudies"]={color:"rgba( 86, 135, 29, 1)",linewidth:2}),void 0===TradingView.defaultProperties["study_ElliottWave@tv-basicstudies"]&&(TradingView.defaultProperties["study_ElliottWave@tv-basicstudies"]={inputs:{},level0:t("rgba( 255, 0, 0, 1)",!1),level1:t("rgba( 0, 128, 0, 1)",!1),level2:t("rgba( 0, 0, 255, 1)",!1),level3:t("rgba( 255, 0, 255, 1)",!1),level4:t("rgba( 0, 128, 255, 1)",!0),level5:t("rgba( 255, 0, 0, 1)",!0),level6:t("rgba( 0, 128, 0, 1)",!0),level7:t("rgba( 0, 0, 255, 1)",!0),level8:t("rgba( 255, 0, 255, 1)",!0)}),void 0===TradingView.defaultProperties["study_LinearRegression@tv-basicstudies"]&&(TradingView.defaultProperties["study_LinearRegression@tv-basicstudies"]={styles:{upLine:{visible:!0,color:"rgba( 0, 0, 255, 0.3)",linestyle:CanvasEx.LINESTYLE_SOLID,linewidth:1},downLine:{visible:!0,color:"rgba( 0, 0, 255, 0.3)",linestyle:CanvasEx.LINESTYLE_SOLID,linewidth:1},baseLine:{visible:!0,color:"rgba( 255, 0, 0, 0.3)",linestyle:CanvasEx.LINESTYLE_SOLID,linewidth:1},extendLines:!0,showPearsons:!0,backgroundColor:"rgba( 153, 21, 21, 0.3)",transparency:70}}), +void 0===TradingView.defaultProperties["study_Compare@tv-basicstudies"]&&(TradingView.defaultProperties["study_Compare@tv-basicstudies"]={minTick:"default"}),void 0===TradingView.defaultProperties["study_Overlay@tv-basicstudies"]){TradingView.defaultProperties["study_Overlay@tv-basicstudies"]={style:n.STYLE_LINE,showPriceLine:!1,minTick:"default",candleStyle:{upColor:"rgba( 107, 165, 131, 1)",downColor:"rgba( 215, 84, 66, 1)",drawWick:!0,drawBorder:!0,drawBody:!0,borderColor:"rgba( 55, 134, 88, 1)",borderUpColor:"rgba( 34, 84, 55, 1)",borderDownColor:"rgba( 91, 26, 19, 1)",wickColor:"rgba( 115, 115, 117, 1)",wickUpColor:"rgba( 115, 115, 117, 1)",wickDownColor:"rgba( 115, 115, 117, 1)",barColorsOnPrevClose:!1},hollowCandleStyle:{upColor:"rgba( 107, 165, 131, 1)",downColor:"rgba( 215, 84, 66, 1)",drawWick:!0,drawBorder:!0,drawBody:!0,borderColor:"rgba( 55, 134, 88, 1)",borderUpColor:"rgba( 34, 84, 55, 1)",borderDownColor:"rgba( 91, 26, 19, 1)",wickColor:"rgba( 115, 115, 117, 1)",wickUpColor:"rgba( 115, 115, 117, 1)",wickDownColor:"rgba( 115, 115, 117, 1)",barColorsOnPrevClose:!1},barStyle:{upColor:"rgba( 107, 165, 131, 1)",downColor:"rgba( 215, 84, 66, 1)",barColorsOnPrevClose:!1,dontDrawOpen:!1,thinBars:!0},lineStyle:{color:"#FF6D00",linestyle:CanvasEx.LINESTYLE_SOLID,linewidth:2,priceSource:"close",styleType:n.STYLE_LINE_TYPE_SIMPLE},areaStyle:{color1:"#2196f3",color2:"#2196f3",linecolor:"#2196f3",linestyle:CanvasEx.LINESTYLE_SOLID,linewidth:2,priceSource:"close",transparency:95},baselineStyle:{baselineColor:"rgba( 117, 134, 150, 1)",topFillColor1:"rgba( 83, 185, 135, 0.05)",topFillColor2:"rgba( 83, 185, 135, 0.05)",bottomFillColor1:"rgba( 235, 77, 92, 0.05)",bottomFillColor2:"rgba( 235, 77, 92, 0.05)",topLineColor:"rgba( 83, 185, 135, 1)",bottomLineColor:"rgba( 235, 77, 92, 1)",topLineWidth:2,bottomLineWidth:2,priceSource:"close",transparency:50,baseLevelPercentage:50},styles:{open:{visible:!0,color:"rgba( 255, 0, 0, 1)",linestyle:CanvasEx.LINESTYLE_SOLID,linewidth:1,plottype:s.Line,histogramBase:0},high:{visible:!0,color:"rgba( 255, 0, 0, 1)",linestyle:CanvasEx.LINESTYLE_SOLID,linewidth:1,plottype:s.Line,histogramBase:0},low:{visible:!0,color:"rgba( 255, 0, 0, 1)",linestyle:CanvasEx.LINESTYLE_SOLID,linewidth:1,plottype:s.Line,histogramBase:0},close:{visible:!0,color:"rgba( 255, 0, 0, 1)",linestyle:CanvasEx.LINESTYLE_SOLID,linewidth:1,plottype:s.Line,histogramBase:0}}}}for(var P=e.split("."),C=TradingView.defaultProperties,x=0;x1?u(e[r],t.slice(1),i):(e[r]&&e[r].setValue?e[r].setValue(i):e[r]=i,!0))}function h(e){i||_.logWarn("Path `"+e+"` does not exist.")}}function y(e,t,i,n){window.__defaultsOverrides&&v(e,t,i,window.__defaultsOverrides,n)} +function g(){var e=/^linetool.+/;Object.keys(TradingView.defaultProperties).forEach((function(t){e.test(t)&&y(TradingView.defaultProperties[t],null,!1,t)}))}function b(e,t){return t?function(e,t){var i=m(e);if(!window._UNIT_TESTS){var n=TradingView.clone(TVSettings.getJSON(e,null));if(function(e){var t=new Set(["linetoolregressiontrend"]);return e.startsWith("study_")||t.has(e)}(e)&&n&&function(e){if(!e)return!1;e=e.toString();var t=new RegExp("\\d+").exec(e);return null!==t&&t[0]===e}(n.version)){var r=n.inputs,o=t.updateStudyInputs(n.id,n.version,"last",r,null);n.inputs=o;var s=t.updateStudyState(n,n);n=s}TradingView.merge(i,n)}return i}(e,t):function(e){var t=m(e);if(!window._UNIT_TESTS){var i=TradingView.clone(TVSettings.getJSON(e,null));i&&TradingView.merge(t,i)}return t}(e)}b.create=function(e,t){if(t){var i=m(e);TradingView.defaultProperties[e]=Object.assign(t,i)}},b.remove=function(e){TradingView.defaultProperties[e]=void 0},TradingView.saveDefaults=function(e,t){TVSettings.setJSON(e,t)},TradingView.factoryDefaults=m,window.applyDefaultOverridesToLinetools=g,window.applyDefaultsOverrides=y,window.applyPropertiesOverrides=v,window.defaults=b,t.applyDefaultOverridesToLinetools=g,t.applyDefaultsOverrides=y,t.applyPropertiesOverrides=v,t.defaults=b,t.factoryDefaults=m,t.saveDefaults=TradingView.saveDefaults},wamh:function(e,t,i){"use strict";i.r(t),i.d(t,"ChangeToolBarsThemeUndoCommand",(function(){return s}));var n=i("mrSG"),r=i("EsvI"),o=i("oiZD"),s=function(e){function t(t,i,n){void 0===n&&(n=!0);var r=e.call(this,"Apply Toolbars Theme")||this;return r._prevThemeName=t,r._themeName=i,r._syncState=n,r}return Object(n.__extends)(t,e),t.prototype.undo=function(){Object(r.isStdThemeName)(this._prevThemeName)&&(Object(o.setTheme)(this._prevThemeName),this._syncState&&Object(r.syncTheme)())},t.prototype.redo=function(){Object(r.isStdThemeName)(this._themeName.toLowerCase())&&(Object(o.setTheme)(this._themeName.toLowerCase()),this._syncState&&Object(r.syncTheme)())},t}(i("RDU5").UndoCommand)},wi9r:function(e,t,i){"use strict";(function(e){var t=i("e3/o").randomHash;function n(e){this._chartApi=e,this._sessionid="qs_"+t(),this._sessionstarted=!1}n.prototype.destroy=function(){this._sessionstarted&&(this._chartApi.quoteDeleteSession(this._sessionid),this._sessionid=null,this._sessionstarted=!1)},n.prototype.connected=function(){return this._chartApi.connected()},n.prototype.connect=function(e){this._globalHandler=e,this._chartApi.createSession(this._sessionid,this),this._chartApi.connect()},n.prototype.disconnect=function(){this._chartApi.disconnect()},n.prototype.quoteAddSymbols=function(e,t){e=[].concat(e),t&&t.forcePermission&&(e=e.concat({flags:["force_permission"]})),this._chartApi.quoteAddSymbols(this._sessionid,e)},n.prototype.quoteRemoveSymbols=function(e){this._chartApi.quoteRemoveSymbols(this._sessionid,e)},n.prototype.quoteFastSymbols=function(e){this._chartApi.quoteFastSymbols(this._sessionid,e)},n.prototype.quoteSetFields=function(e){this._chartApi.quoteSetFields(this._sessionid,e)}, +n.prototype.onMessage=function(e){switch(e.method){case"connected":this._sessionstarted||(this._chartApi.quoteCreateSession(this._sessionid),this._sessionstarted=!0);break;case"disconnected":this._sessionstarted=!1}this._globalHandler(e)},n.prototype.quoteHibernateAll=function(e){this._chartApi.quoteHibernateAll(this._sessionid)},TradingView.QuoteSession=n,e&&e.exports&&(e.exports=n)}).call(this,i("YuTi")(e))},wiuq:function(e,t,i){"use strict";i.r(t),i.d(t,"LineToolArrowMarker",(function(){return c}));var n=i("mrSG"),r=i("Ss5c"),o=i("Ocx9"),s=i("tc+8"),a=i.n(s),l=window.t("Arrow Marker"),c=function(e){function t(n,r){var o=e.call(this,n,r||t.createProperties())||this;return i.e("lt-pane-views").then(function(e){var t=i("Qa6j").ArrowMarkerPaneView;o._setPaneViews([new t(o,o.model())])}.bind(null,i)).catch(void 0),o}return Object(n.__extends)(t,e),t.prototype.pointsCount=function(){return 2},t.prototype.name=function(){return"Trend Line"},t.prototype.translatedType=function(){return l},t.createProperties=function(e){var i=new o.DefaultProperty("linetoolarrowmarker",e);return t._configureProperties(i),i},t.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(i.bind(null,"FxV7")).then((function(e){return e.ArrowMarkerDefinitionsViewModel}))},t._configureProperties=function(e){r.LineDataSource._configureProperties(e),e.hasChild("text")||e.addChild("text",new a.a("")),e.addExclusion("text")},t}(r.LineDataSource)},wjVR:function(e,t,i){"use strict";i.r(t),i.d(t,"ChartWidgetBase",(function(){return b}));var n=i("mrSG"),r=i("Eyy1"),o=i("ogJP"),s=i("CW80"),a=i("3ClC"),l=i("H0vP"),c=i("mMWL"),u=i("KnF9"),h=i("VaSN"),d=i("aIyQ"),p=i.n(d),_=i("hY0g"),f=i.n(_),m=i("Tmoa"),v=i("EsvI"),y={addToWatchlistEnabled:!0,sourceSelectionEnabled:!0,propertyPagesEnabled:!0,paneContextMenuEnabled:!0,priceScaleContextMenuEnabled:!0,currencyLabelEnabled:!1,goToDateEnabled:!1,marketStatusWidgetEnabled:!0,chartWarningWidgetEnabled:!0,dataProblemWidgetEnabled:!0,paneControlsEnabled:!0,isSymbolAvailable:function(e){return Promise.resolve(!0)},legendWidgetEnabled:!0,chartEventsEnabled:!0,esdEnabled:!1,croppedTickMarks:!0,handleScale:{mouseWheel:!0,pinch:!0,axisPressedMouseMove:!0},handleScroll:{mouseWheel:!0,pressedMouseMove:!0,horzTouchDrag:!0,vertTouchDrag:!0}};function g(e,t,i,n){void 0===n&&(n=0);var r=t.mainSeries().syncModel(),o=e.mainSeries().syncModel(),s=i;if(null!==r&&null!==o){var a=e.createSyncPoint(r,o);0!==n&&(i=r.projectTime(i,n)),s=a.sourceTimeToTargetTime(i)}return e.timeScale().points().roughIndex(s,o&&o.distance.bind(o))}var b=function(){function e(e,t,i){var n=this;this.activePaneWidget=null,this._model=null,this._paneWidgets=[],this._maximizedPaneWidget=null,this._timeAxisWidget=null,this._paneSeparators=[],this._timeAxisSeparator=null,this._lineToolsSynchronizer=null,this._modelCreated=new p.a,this._isDestroyed=!1,this._customLegendWidgetsFactoryMap=new Map,this._backgroundBasedTheme=new f.a("light"), +this._updateThemedColorBound=this._updateThemedColor.bind(this),this._id=t,this._options=Object(o.merge)(Object(o.clone)(y),e),this._options.customLegendWidgetFactories&&(this._customLegendWidgetsFactoryMap=this._options.customLegendWidgetFactories),this._subscribeToDrawingState(),this.withModel(this,(function(){var e=n.model().model();e.backgroundTopColor().subscribe(n._updateThemedColorBound),e.backgroundColor().subscribe(n._updateThemedColorBound)}))}return e.prototype.destroy=function(){null!==this._model&&(this._model.model().backgroundTopColor().unsubscribe(this._updateThemedColorBound),this._model.model().backgroundColor().unsubscribe(this._updateThemedColorBound),this._model.destroy()),this._customLegendWidgetsFactoryMap.clear(),this._isDestroyed=!0},e.prototype.id=function(){return this._id},e.prototype.timeAxisHeight=function(){return null!==this._timeAxisWidget?this._timeAxisWidget.size.h:0},e.prototype.withModel=function(e,t){this.model()?t.call(e):this.modelCreated().subscribe(e,t,!0)},e.prototype.images=function(e){var t=this;window.TradingView.printing=!0;var i=this.model().selection().sources();this.model().selectionMacro((function(e){return e.clearSelection()}));var n,o=function(i,n){i.paint(n,t.onWidget());var r={showCollapsedLegend:Boolean(null==e?void 0:e.showCollapsedLegend),status:null==e?void 0:e.status};return i.getScreenshotData(r)},s=[];if(null!==this._maximizedPaneWidget){var a=this._paneWidgets.indexOf(this._maximizedPaneWidget);s.push(o(this._maximizedPaneWidget,l.InvalidationMask.light().invalidateForPane(a)))}else for(var c=0;cr)){var s,a=this.m_series.bars().range(i,r),l=this.m_series.priceScale(),c=this.m_series.barColorer(),u={};if(a.each((function(i,n){var r,o={};(o.time=Math.round(i), +e(n,o))&&(u.value=n,r=n[TradingView.STYLE_PLOT]?n[TradingView.STYLE_PLOT]:c.barStyle(i,!1,u),n[TradingView.STYLE_PLOT]=r,u.previousValue=n,o.color=r.barColor,o.borderColor=r.barBorderColor,o.wickColor=r.barWickColor,o.hollow=r.isBarHollow,t.m_bars.push(o))}),this),0!==this.m_bars.length&&(s=this.m_series.firstValue(),l.barPricesToCoordinates(this.m_bars,s)),this.m_model.timeScale().barIndexesToCoordinates(this.m_bars),this.m_model.selection().isSelected(this.m_series)){var h=p(i,r);this._selectionData={points:[],bgColors:[],visible:!0};var d=this.m_model.paneForSource(this.m_series).height();this._selectionData.hittestResult=o.REGULAR;for(var _=0;_=t&&e.y<=i||e.y<=t&&e.y>=i))return new r(r.REGULAR);return null},h.prototype._drawImpl=function(e){if(null!==this._data){var t=this._data.isHlineFill;if(t||0!==this._data.points1.length&&0!==this._data.points2.length){var i=this._data.timePoints,n=this._data.points1,r=this._data.points2,s=this._data.colors,l=isNumber(this._data.transparency)?this._data.transparency:50;l=Math.min(l,100),l=Math.max(l,0);for(var c,u={},h=[],d=.25*this._data.getBarSpacing(),p=0;p0&&null!==c){var m=u[c]||[];m.push(h),u[c]=m}h=f?[_]:[]}}for(var v in u){var y=u[v];e.beginPath();for(var g=0;g=0;P--)e.lineTo(b[P].timePoint,b[P].point2)}else{var C=b[0].point2;e.lineTo(S+d,w),e.lineTo(S+d,C),e.lineTo(S-d,C),e.lineTo(S-d,w)}}e.closePath(),e.fillStyle=a.generateColor(v,l),e.fill()}}}},d.prototype.update=function(){this._invalidated=!0},d.prototype._plotNames=function(){return this._source.metaInfo().plots.map((function(e){return e.id}))},d.prototype._plotIndex1=function(){return null===this._plIndex1&&(this._plIndex1=this._plotNames().indexOf(this._plotAId())+1),this._plIndex1},d.prototype._plotIndex2=function(){return null===this._plIndex2&&(this._plIndex2=this._plotNames().indexOf(this._plotBId())+1),this._plIndex2},d.prototype._updateImpl=function(){if(this._points1=[],this._points2=[],this._colorsMap&&(this._colors=[]),this._timePoints=[],this._visible()){ +var e=this._source.priceScale(),t=this._source._model.timeScale();if(e&&!e.isEmpty()&&!this._source._model.timeScale().isEmpty()&&!this._source._series.bars().isEmpty()){if(this._isHlineFill){var i=this._source.firstValue(),n=this._source.properties().bands[this._bandAKey],r=this._source.properties().bands[this._bandBKey];this._level1=e.priceToCoordinate(n.value.value(),i),this._level2=e.priceToCoordinate(r.value.value(),i)}var o=this._source._model.timeScale().visibleBarsStrictRange();if(null!==o){var s=this._source._series.nearestIndex(o.firstBar(),c.NearestRight),a=this._source._series.nearestIndex(o.lastBar(),c.NearestLeft);if(!((s=this._correctStartBarIndex(s))>a)){var l=this._source.data().range(s,a);if(l.size()>0){var u=l.firstIndex(),h=l.lastIndex(),d=this._source.offset(this._plotAId()),p=this._source.offset(this._plotBId()),_=Math.max(d,p),f=Math.min(d,p),m=u+_,v=this._source.data().firstIndex();u>v&&(m=u<_+v?_+v:u);var y=h+f,g=this._source.data().lastIndex();h>g+f&&hh?u+_:m,S=m;S<=y;++S){if(this._timePoints.push(t.indexToCoordinate(b++)),this._colors){var w=this._source.data().valueAt(S-f);if(null!==w){var P=w[this._colorPlotOffset+1];null==P?this._colors.push(null):this._colors.push(this._colorValues[this._colorsMap[P]].color.value())}}if(!this._isHlineFill){var C=this._source.data().valueAt(S-d),x=this._source.data().valueAt(S-p);if(null!==C&&null!==x){var T=C[this._plotIndex1()],I=x[this._plotIndex2()];this._points1.push(T),this._points2.push(I)}}}}i=this._source.firstValue();e.pricesArrayToCoordinates(this._points1,i),e.pricesArrayToCoordinates(this._points2,i)}}}}},d.prototype.renderer=function(){this._invalidated&&(this._updateImpl(),this._invalidated=!1);var e={};return e.points1=this._points1,e.points2=this._points2,e.timePoints=this._timePoints,e.getBarSpacing=this._getBarSpacing,e.backcolor=this._color(),e.transparency=this._transparency(),e.isHlineFill=this._isHlineFill,e.level1=this._level1,e.level2=this._level2,this._colors&&(e.colors=this._colors),this._areaRenderer.setData(e),this._areaRenderer},d.prototype._plotAId=function(){n(!1,"Pure virtual call!")},d.prototype._plotBId=function(){n(!1,"Pure virtual call!")},d.prototype._color=function(){n(!1,"Pure virtual call!")},d.prototype._transparency=function(){n(!1,"Pure virtual call!")},d.prototype._visible=function(){n(!1,"Pure virtual call!")},d.prototype._correctStartBarIndex=function(e){return e},inherit(p,d),p.prototype._plotAId=function(){return this._source.properties().area[0].name.value()},p.prototype._plotBId=function(){return this._source.properties().area[1].name.value()},p.prototype._color=function(){return this._source.properties().areaBackground.backgroundColor.value()},p.prototype._transparency=function(){var e=this._source.properties().areaBackground.transparency.value();return l(e,0,100)},p.prototype._visible=function(){return this._source.properties().areaBackground.fillBackground.value()},inherit(_,d),_.prototype._initBandIndexes=function(e,t){this._bandAKey=null, +this._bandBKey=null;for(var i=0;i0)e[e.length-1].addCommand(n);else{i.clear();var r=t.head(),o=r&&r.text();r&&r.canMerge(n)?r.merge(n):t.push(n);var a=n.text();""!==a&&a!==o&&h.logNormal("DO: "+a)}n.executeOnPush()&&n.redo(),e.length||s.fire(c())}function c(){var e=t.head(),n=i.head();return{enableUndo:!t.isEmpty(),undoText:void 0===e?void 0:e.text(),enableRedo:!i.isEmpty(),redoText:void 0===n?void 0:n.text()}}return{beginUndoMacro:function(t){var i=new o.a(t);return e.push(i),i},clearStack:function(){t.clear(),i.clear(),s.fire(c())},createUndoCheckpoint:function(){return{lastActualCommand:t.isEmpty()?null:t.head()}},endUndoMacro:function(){var t=Object(n.ensureDefined)(e.pop());t.isEmpty()||l(t)},pushUndoCommand:l,redo:function(){if(i.isEmpty())return!1;var e=i.pop();return!!e&&(e.redo(),t.push(e),h.logNormal("REDO: "+e.text()),s.fire(c()),!0)},redoStack:function(){return i},setWatchedValue:function(e,t,i){if(e.value()!==t){var n=new a(e,t,i);l(n),n.redo()}},undo:function(){if(t.isEmpty())return!1;var e=t.pop();return!!e&&(e.undo(),i.push(e),h.logNormal("UNDO: "+e.text()),s.fire(c()),!0)},undoStack:function(){return t},undoToCheckpoint:function(e){for(;!t.isEmpty()&&e.lastActualCommand!==t.head();)t.pop().undo();i.clear(),s.fire(c())},state:c,onChange:function(){return s}}}},xDuj:function(e,t,i){"use strict";i.r(t),i.d(t,"translatedIntervalString",(function(){return r}));i("YFKU");var n=i("pPtI");function r(e){var t=Object(n.getTranslatedResolutionModel)(e,!0);return null===t?e:t.multiplier+(t.mayOmitShortKind?"":t.shortKind)}},xUGI:function(e,t,i){"use strict";var n=i("GH0z").PercentageFormatter,r=i("zXvd").NumericFormatter,o=i("zDbI").CHART_FONT_FAMILY,s=i("d1Pk").fibLevelPrice,a=i("ikwP").drawScaled;function l(e,t,i){this._fibLevelsBasedOnLogScaleProperty=e,this._sourcesToRow={},this._rowsToSources={},this._currentSymbol="",this._actualCapacity=1,this._actualWidth=1,this._numericFormatter=new r,this._percentageFormatter=new n,this._pixelRatio=i.pixelRatio,this._recreateCanvas(this._actualWidth,l.ROW_HEIGHT*this._actualCapacity),this._levelsCount=t}l.prototype.destroy=function(){this._canvas=null,this._cache=null},l.prototype.topByRow=function(e){return e*l.ROW_HEIGHT},l.prototype.rowHeight=function(e){return l.ROW_HEIGHT},l.prototype.devicePixelRatio=function(){return this._canvas&&this._canvas.pixelRatio||0},l.prototype._recreateCanvas=function(e,t){this._canvas=document.createElement("canvas"),this._canvas.width=Math.ceil(e*this._pixelRatio),this._canvas.height=Math.ceil(t*this._actualCapacity*this._pixelRatio), +this._cache=this._canvas.getContext("2d"),this._cache.font="12px "+o},l.prototype.canvas=function(){return this._canvas},l.ROW_HEIGHT=14,l.prototype.points=function(e){return[e.points()[0],e.points()[1]]},l.prototype._selectStartPrice=function(e,t){return t?e.points()[0].price:e.points()[1].price},l.prototype.startPoint=function(e,t){var i=this._selectStartPrice(e,t);if(!this._calculateLogLevels(e))return{price:i};var n=e.ownerSource().firstValue();return{price:i,coordinate:e.priceScale().priceToCoordinate(i,n)}},l.prototype._calculatePriceRange=function(e,t,i){return i?t.price-e.price:e.price-t.price},l.prototype.priceRange=function(e,t){var i=this.points(e),n=i[0],r=i[1],o=this._calculatePriceRange(n,r,t);if(!this._calculateLogLevels(e))return{price:o};var s=e.priceScale(),a=e.ownerSource().firstValue(),l=s.priceToCoordinate(n.price,a),c=s.priceToCoordinate(r.price,a);return{price:o,coordinate:t?c-l:l-c}},l.prototype.sourceIsReady=function(e){return e.points().length>=2},l.prototype._calculateLogLevels=function(e){return e.fibLevelsBasedOnLogScale&&e.fibLevelsBasedOnLogScale()},l.prototype._calculateWidth=function(e){if(!this.sourceIsReady(e))return null;var t=this._canvas.getContext("2d");t.font="12px "+o;var i=!!e.properties().showPrices&&e.properties().showPrices.value(),n=!!e.properties().coeffsAsPercents&&e.properties().coeffsAsPercents.value(),r=e.properties().showCoeffs.value(),a=this.points(e),l=a[0],c=a[1];if(!l||!c)return null;var u=e.ownerSource().firstValue();if(null===u)return 0;var h=!1,d=e.properties();d.reverse&&d.reverse.value()&&(h=d.reverse.value());for(var p=this.startPoint(e,h),_=this.priceRange(e,h),f=this._calculateLogLevels(e),m=0,v=[],y=1;y<=this._levelsCount;y++){var g=d["level"+y].coeff.value(),b="";if(r&&(b+=n?this._percentageFormatter.format(Math.round(1e4*g)/100):this._numericFormatter.format(g)),i){var S=e.priceScale(),w=s(p,_,g,S,u,f);b+="("+S.formatPrice(w,u)+")"}var P={text:b,left:m,width:t.measureText(b).width+4};v.push(P),m+=P.width}return{totalWidth:m,cells:v}},l.prototype._effectiveState=function(e){var t={},i=e.properties();i.showPrices&&(t.showPrices=i.showPrices.value()),i.coeffsAsPercents&&(t.coeffsAsPercents=i.coeffsAsPercents.value()),t.showCoeffs=i.showCoeffs.value();var n=e.priceScale();n&&(n.formatter().state&&(t.formatter=e.priceScale().formatter().state()),t.logLevels=this._calculateLogLevels(e)),i.reverse&&(t.reverse=i.reverse.value()),t.p1=e.points()[0],t.p2=e.points()[1],3===e.points().length&&(t.p3=e.points()[2]),t.items=[];for(var r=1;r<=this._levelsCount;r++){var o=i["level"+r],s={coeff:o.coeff.value(),color:o.color.value()};t.items.push(s)}return t},l.prototype._findEmptyRow=function(e){for(var t=0;this._rowsToSources[t];)t++;return this._rowsToSources[t]=e,t>=this._actualCapacity&&(this._actualCapacity++,this._recreateCanvas(this._actualWidth,l.ROW_HEIGHT*this._actualCapacity)),t},l.prototype._repaintSource=function(e,t,i){var n=l.ROW_HEIGHT*i.row;a(this._cache,this._pixelRatio,function(){this._cache.clearRect(0,n,this._actualWidth,l.ROW_HEIGHT), +this._cache.textBaseline="bottom",this._cache.font="12px "+o,n+=l.ROW_HEIGHT;for(var i=0;ithis._actualWidth&&(this._recreateCanvas(o.totalWidth,l.ROW_HEIGHT*this._actualCapacity),this._actualWidth=o.totalWidth);i=this._sourcesToRow[e.id()];this._repaintSource(o,r,i),this._sourcesToRow[e.id()].effectiveState=r,this._sourcesToRow[e.id()].preparedCells=o}else this._sourcesToRow[e.id()].effectiveState=null}return this._sourcesToRow[e.id()]},e.exports=l},xWfy:function(e,t,i){"use strict";i.d(t,"a",(function(){return a})),i.d(t,"b",(function(){return h})),i.d(t,"c",(function(){return d})),i.d(t,"d",(function(){return p}));var n=i("tqok"),r=i("fFKx"),o=i("SqfW"),s=i("7Fue"),a=function(){function e(e,t){if(this._indexes=[],this._horizlines=new Map,this._vertlines=new Map,this._lines=new Map,this._hlines=new Map,this._textmarks=new Map,this._shapemarks=new Map,this._backgrounds=new Map,this._polygons=new Map,this._trendchannels=new Map,this._hhists=new Map,this._dwglabels=new Map,this._dwglines=new Map,"data"===e){var i=t;this._indexes=i.indexes,this._vertlines=l(i.vertlines,this._indexes,o.b),this._horizlines=l(i.horizlines,this._indexes,r.b)}else if("state"===e){var n=t;this._indexes=n.indexes||[],this._vertlines=c(n.vertlines,this._indexes,o.b),this._horizlines=c(n.horizlines,this._indexes,r.b)} +this._hhistsByTimePointIndex=Object(s.b)(this._hhists)}return e.prototype.horizlines=function(){return this._horizlines},e.prototype.vertlines=function(){return this._vertlines},e.prototype.lines=function(){return this._lines},e.prototype.hlines=function(){return this._hlines},e.prototype.textmarks=function(){return this._textmarks},e.prototype.shapemarks=function(){return this._shapemarks},e.prototype.backgrounds=function(){return this._backgrounds},e.prototype.polygons=function(){return this._polygons},e.prototype.trendchannels=function(){return this._trendchannels},e.prototype.hhists=function(){return this._hhists},e.prototype.dwglabels=function(){return this._dwglabels},e.prototype.dwglines=function(){return this._dwglines},e.prototype.hhistsByTimePointIndex=function(){return this._hhistsByTimePointIndex},e}();function l(e,t,i){var n=new Map;return e.forEach((function(e,r){var o=n.get(r)||new Set;e.forEach((function(e){var n=i(e,t);null!==n&&o.add(n)})),n.set(r,o)})),n}function c(e,t,i){var n=new Map;if(void 0===e)return n;for(var r=function(e){var r=e.styleId,o=n.get(r)||new Set;e.data.forEach((function(e){var n=i(e,t);null!==n&&o.add(n)})),n.set(r,o)},o=0,s=e;o0?r:void 0}function h(){return new a}function d(e){return new a("state",e)}function p(e){var t=function(e){var t=new Set;e.horizlines().forEach((function(e,i){e.forEach((function(e){t.add(e.startIndex),t.add(e.endIndex)}))})),e.vertlines().forEach((function(e,i){e.forEach((function(e){t.add(e.index)}))})),e.lines().forEach((function(e,i){e.forEach((function(e){t.add(e.startIndex),t.add(e.endIndex)}))})),e.textmarks().forEach((function(e,i){e.forEach((function(e){t.add(e.time)}))})),e.shapemarks().forEach((function(e,i){e.forEach((function(e){t.add(e.time)}))})),e.backgrounds().forEach((function(e,i){e.forEach((function(e){t.add(null!==e.start?e.start:n.a),t.add(e.stop)}))})),e.polygons().forEach((function(e,i){e.forEach((function(e){e.points.forEach((function(e){t.add(e.index)}))}))})),e.trendchannels().forEach((function(e,i){e.forEach((function(e){t.add(e.startIndex),t.add(e.endIndex)}))})),e.hhists().forEach((function(e,i){e.forEach((function(e){t.add(e.firstBarTime),t.add(e.lastBarTime)}))})),e.dwglabels().forEach((function(e,i){e.forEach((function(e){t.add(e.x)}))})),e.dwglines().forEach((function(e,i){e.forEach((function(e){t.add(e.x1),t.add(e.x2)}))}));var i=Array.from(t);return i.sort((function(e,t){return e-t})),i}(e),i={indexes:t},s={currentId:0};return i.vertlines=u(e.vertlines(),s,t,o.a),i.horizlines=u(e.horizlines(),s,t,r.a),i}},xdS3:function(e,t,i){},xnA2:function(e,t,i){"use strict";var n=i("Ss5c").LineDataSource,r=i("5rJj"),o=window.t("Fib Channel");function s(e,t){var r=t||s.createProperties();n.call(this,e,r),this.version=s.version, +i.e("lt-pane-views").then(function(e){var t=i("CR3a").FibChannelPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}inherit(s,n),s.LevelsCount=24,s.version=2,s.prototype.levelsCount=function(){return s.LevelsCount},s.prototype.migrateVersion=function(e,t,i){i.properties.removeProperty("reverse")},s.prototype.pointsCount=function(){return 3},s.prototype.translatedType=function(){return o},s.prototype.name=function(){return"Fib Channel"},s.prototype.processErase=function(e,t){var i="level"+t,n=this.properties()[i].visible;e.setProperty(n,!1,"Erase level line")},s.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("17v9").FibDrawingsWith24LevelsDefinitionsViewModel}.bind(null,i)).catch(i.oe)},s.createProperties=function(e){var t=new r("linetoolfibchannel",e,!1,{range:[1,24],names:["coeff","color","visible"]});return s._configureProperties(t),t},s._configureProperties=function(e){n._configureProperties(e)},t.LineToolFibChannel=s},xo8u:function(e,t,i){"use strict";i.d(t,"a",(function(){return o}));var n=i("mrSG"),r=i("Eyy1"),o=function(e){function t(t,i,n,o){var s=e.call(this,o)||this;s._newSourcesCurrencies=new Map,s._oldSourcesCurrencies=new Map,s._showFade=!1,s._chartWidget=n;for(var a=n.model().mainSeries(),l=0,c=t.seriesLikeSources();l0&&(n=Object.assign({},this._points[0]),this._points.unshift(n))}},p.prototype.applyTemplate=function(e){delete e.background,delete e.backgroundColor,delete e.showBackground,n.prototype.applyTemplate.call(this,e)},p.prototype.translatedType=function(){return"Elliott Labels"},p.prototype.name=function(){return"Elliott Labels"},p.prototype.additionalActions=function(e){var t=this;return[new r({label:window.t("Degree"),subItems:s.map((function(i){var n=d.filter((function(e){return e.value===i}))[0];return new r({label:n.title,checkable:!0,checked:t.properties().degree.value()===i,onExecute:function(){e.setProperty(t.properties().degree,i,"Change Elliott Degree")}})}))})]},p.prototype.label=function(e){var t=s.length-this.properties().degree.value()-1,i=Math.floor(t/3);return{group:i,bold:!!(i%2),decoration:["","brackets","circle"][t%3],label:this.labelsGroup()[i][e]}},p.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("UHSU").ElliottPatternDefinitionsViewModel}.bind(null,i)).catch(i.oe)},p.prototype.availableDegreesValues=function(){return d},p.createProperties=function(e){ +var t=new o("linetoolelliott",e);return p._configureProperties(t),t},p._configureProperties=function(e){n._configureProperties(e)},inherit(_,p),_.prototype.pointsCount=function(){return 6},_._configureProperties=function(e){p._configureProperties(e)},inherit(f,_),f._labelsGroups=[["0","1","2","3","4","5"],["0","i","ii","iii","iv","v"],["0","1","2","3","4","5"],["0","I","II","III","IV","V"],["0","1","2","3","4","5"]],f.prototype.translatedType=function(){return a},f.prototype.name=function(){return"Elliott Impulse Wave (12345)"},f.prototype.labelsGroup=function(){return f._labelsGroups},f.createProperties=function(e){var t=new o("linetoolelliottimpulse",e);return f._configureProperties(t),t},f._configureProperties=function(e){_._configureProperties(e)},inherit(m,_),m._labelsGroups=[["0","A","B","C","D","E"],["0","a","b","c","d","e"],["0","A","B","C","D","E"],["0","a","b","c","d","e"],["0","A","B","C","D","E"]],m.prototype.translatedType=function(){return l},m.prototype.name=function(){return"Elliott Triangle Wave (ABCDE)"},m.prototype.labelsGroup=function(){return m._labelsGroups},m.createProperties=function(e){var t=new o("linetoolelliotttriangle",e);return m._configureProperties(t),t},m._configureProperties=function(e){_._configureProperties(e)},inherit(v,_),v._labelsGroups=[["0","W","X","Y","X","Z"],["0","w","x","y","x","z"],["0","W","X","Y","X","Z"],["0","w","x","y","x","z"],["0","W","X","Y","X","Z"]],v.prototype.translatedType=function(){return c},v.prototype.name=function(){return"Elliott Triple Combo Wave (WXYXZ)"},v.prototype.labelsGroup=function(){return v._labelsGroups},v.createProperties=function(e){var t=new o("linetoolelliotttriplecombo",e);return v._configureProperties(t),t},v._configureProperties=function(e){_._configureProperties(e)},inherit(y,p),y.prototype.pointsCount=function(){return 4},y._configureProperties=function(e){p._configureProperties(e)},inherit(g,y),g._labelsGroups=[["0","A","B","C"],["0","a","b","c"],["0","A","B","C"],["0","a","b","c"],["0","A","B","C"]],g.prototype.translatedType=function(){return u},g.prototype.name=function(){return"Elliott Correction Wave (ABC)"},g.prototype.labelsGroup=function(){return g._labelsGroups},g.createProperties=function(e){var t=new o("linetoolelliottcorrection",e);return g._configureProperties(t),t},g._configureProperties=function(e){y._configureProperties(e)},inherit(b,y),b._labelsGroups=[["0","W","X","Y"],["0","w","x","y"],["0","W","X","Y"],["0","w","x","y"],["0","W","X","Y"]],b.prototype.translatedType=function(){return h},b.prototype.name=function(){return"Elliott Double Combo Wave (WXY)"},b.prototype.labelsGroup=function(){return b._labelsGroups},b.createProperties=function(e){var t=new o("linetoolelliottdoublecombo",e);return b._configureProperties(t),t},b._configureProperties=function(e){y._configureProperties(e)},t.LineToolElliott=p,t.LineToolElliottImpulse=f,t.LineToolElliottTriangle=m,t.LineToolElliottTripleCombo=v,t.LineToolElliottCorrection=g,t.LineToolElliottDoubleCombo=b},xzdg:function(e,t,i){"use strict";i.r(t) +;var n=i("Eyy1"),r=i("YFKU"),o=i("7KDR"),s=i("ikwP"),a=i("ogJP"),l=i("jFln"),c=i("u+0B"),u=i("XlJ7"),h=i("JWMC"),d=i("zDbI"),p=i("Hr11"),_=i("Kxc7").enabled("charting_library_debug_mode"),f=function(){function e(e,t,i,n){this._textWidthCache=new c.TextWidthCache(200),this._fontSize=0,this._color="",this._font="",this._keys=[],this._hash=new Map,this._fontSize=e,this._color=t,this._font=Object(u.makeFont)(e,i,n)}return e.prototype.destroy=function(){delete this._textWidthCache,this._keys=[],this._hash.clear()},e.prototype.paintTo=function(e,t,i,n,r){var o=this._getLabelImage(e,t);if("left"!==r){var a=Object(s.getCanvasDevicePixelRatio)(e.canvas);i-=Math.floor(o.textWidth*a)}n-=Math.ceil(o.height/2),e.drawImage(o.canvas,i,n,o.width,o.height)},e.prototype.getLabelHeight=function(e,t){return this._getLabelImage(e,t).height},e.prototype._getLabelImage=function(e,t){var i,r=this;if(this._hash.has(t))i=Object(n.ensureDefined)(this._hash.get(t));else{if(this._keys.length>=200){var o=Object(n.ensureDefined)(this._keys.shift());this._hash.delete(o)}var a=Object(s.getCanvasDevicePixelRatio)(e.canvas),l=Math.ceil(this._fontSize/4.5),c=Math.round(this._fontSize/10),u=Math.ceil(this._textWidthCache.measureText(e,t)),h=Object(p.ceiledEven)(Math.round(u+2*l)),d=Object(p.ceiledEven)(this._fontSize+2*l),f=Object(s.createDisconnectedCanvas)(document,new s.Size(h,d),a);i={text:t,textWidth:Math.round(Math.max(1,u)),width:Math.floor(h*a),height:Math.floor(d*a),canvas:f},0!==u?(this._keys.push(i.text),this._hash.set(i.text,i)):_&&console.log('Canvas 2d context measureText return zero width for "'+t+'" text'),e=Object(s.getContext2D)(i.canvas),Object(s.drawScaled)(e,a,(function(){e.font=r._font,e.fillStyle=r._color,e.fillText(t,0,d-l-c)}))}return i},e}(),m=i("CPmC"),v=i("+cnz"),y=i("CxTi"),g=function(){function e(){var e=this;this._width=null,this._currencyInfo=null,this._fontSize=0,this._currencyLabelWrapper=document.createElement("div"),this._currencyLabelWrapper.className=y["price-axis-currency-label-wrapper"],this._currencyLabel=document.createElement("span"),this._currencyLabel.className=y["price-axis-currency-label"],this._currencyLabel.classList.add("apply-common-tooltip"),Object(m.b)(this._currencyLabel,"text",(function(t){return e._tooltipContent()})),this._currencyText=document.createElement("span"),this._currencyText.className=y["price-axis-currency-label-text"],this._currencyLabel.appendChild(this._currencyText),this._arrowDown=document.createElement("span"),this._arrowDown.className=y["price-axis-currency-label-arrow-down"],this._arrowDown.innerHTML=v,this._currencyLabel.appendChild(this._arrowDown),this._currencyLabelWrapper.appendChild(this._currencyLabel)}return e.prototype.element=function(){return this._currencyLabelWrapper},e.prototype.labelElement=function(){return this._currencyLabel},e.prototype.isVisible=function(){return!this._currencyLabel.classList.contains("js-hidden")},e.prototype.width=function(){if(null!==this._width)return this._width;var e=this._currencyLabel.getBoundingClientRect() +;return this._width=e.right-e.left+1+8,this._width},e.prototype.drawLabel=function(e,t,i,n){var r=this._currencyText.textContent;if(null!==r){var o=Math.round(t/2*i),a=this._currencyLabel.getBoundingClientRect(),c=Object(p.ceiledEven)(a.width*i/2),h=this._currencyLabel.style,_=Math.round(this.labelTop()*i),f=Math.round(a.height*i),m=Math.round(Number(y.css_value_currency_label_radius)*i);Object(l.drawRoundRect)(e,o-c,_,2*c,f,m),e.fillStyle=h.backgroundColor,e.fill();var v=Math.max(1,Math.floor(i));e.lineWidth=v,e.strokeStyle=n?y.css_value_border_color_dark:y.css_value_border_color_light,Object(l.drawRoundRect)(e,o-c+v/2,_+v/2,2*c-v,f-v,m),e.stroke(),e.fillStyle=h.color,e.font=Object(u.makeFont)(this._fontSize,d.CHART_FONT_FAMILY),e.textBaseline="middle",e.textAlign="center",Object(s.drawScaled)(e,i,(function(){return e.fillText(r,o/i,(_+f/2)/i)}))}},e.prototype.show=function(){this._currencyLabel.classList.remove("js-hidden"),this._width=null},e.prototype.hide=function(){this._currencyLabel.classList.add("js-hidden")},e.prototype.setCurrencyInfo=function(e){if(null!==this._currencyInfo&&this._currencyInfo.selectedCurrency===e.selectedCurrency&&this._currencyInfo.readOnly===e.readOnly&&this._currencyInfo.originalCurrencies.size===e.originalCurrencies.size)return this._currencyInfo=e,!1;this._currencyInfo=e;var t=null===e.selectedCurrency?Object(r.t)("Mixed"):e.selectedCurrency;return this._currencyText.textContent!==t&&(this._currencyText.textContent=t,this._width=null),this._arrowDown.classList.contains("js-hidden")!==e.readOnly&&(this._arrowDown.classList.toggle("js-hidden",e.readOnly),this._currencyLabel.classList.toggle(y.readonly,e.readOnly),this._width=null),!0},e.prototype.updateColors=function(e,t){var i=this._currencyLabel.style;i.background=e,i.color=t},e.prototype.currencyInfo=function(){return this._currencyInfo},e.prototype.setFontSize=function(e){this._fontSize=e,this._currencyLabel.style.fontSize=e+"px",this._width=null},e.prototype.setLineHeight=function(e){this._currencyLabel.style.lineHeight=e+"px"},e.prototype.labelTop=function(){return Number(y.css_value_currency_label_top)},e.prototype._tooltipContent=function(){return null===this._currencyInfo?"":null===this._currencyInfo.selectedCurrency?Array.from(this._currencyInfo.currencies).join(", "):""},e}(),b=i("mrSG");i.d(t,"PriceAxisWidgetBase",(function(){return w}));var S={contextMenuEnabled:!0,currencyLabelEnabled:!1,contextMenu:{general:!0,source:!0},pressedMouseMoveScale:!0,croppedTickMarks:!0},w=function(){function e(e,t,i,n,r){var o=this;this._priceScale=null,this._widthCache=new c.TextWidthCache(50),this._tickmarksCache=new f(12,"#000",d.CHART_FONT_FAMILY,""),this._color=null,this._fontSize=null,this._currencyFontSize=0,this._currencyLabelWidth=null,this._isVisible=!0,this._updateTimeout=null,this._currencyMenu=null,this._prevOptimalWidth=0,this._size=null,this._destroyed=!1,this._pane=e,this._undoModel=t,this._properties=i,this._options=Object(a.merge)(Object(a.clone)(S),n),this._rendererOptionsProvider=r, +this._cell=document.createElement("div"),this._cell.className="price-axis",this._cell.style.width="25px",this._cell.style.left="0",this._canvasConfiguredHandler=function(){o._recreateTickMarksCache(o._rendererOptionsProvider.options()),o._undoModel.model().lightUpdate()},this._canvasBinding=Object(s.createBoundCanvas)(this._cell,new s.Size(16,16)),this._canvasBinding.subscribeCanvasConfigured(this._canvasConfiguredHandler);var l=this._canvasBinding.canvas;l.style.position="absolute",l.style.zIndex="1",l.style.left="0",l.style.top="0",this._topCanvasConfiguredHandler=function(){return o._undoModel.model().lightUpdate()},this._topCanvasBinding=Object(s.createBoundCanvas)(this._cell,new s.Size(16,16)),this._topCanvasBinding.subscribeCanvasConfigured(this._topCanvasConfiguredHandler);var u=this._topCanvasBinding.canvas;u.style.position="absolute",u.style.zIndex="2",u.style.left="0",u.style.top="0",this._options.currencyLabelEnabled?(this._currencyLabel=new g,this._cell.appendChild(this._currencyLabel.element()),this._currencyLabel.labelElement().addEventListener("click",(function(e){return o._showCurrenciesContextMenu(e)}))):this._currencyLabel=null,this._properties.childs().fontSize.subscribe(this,this._onFontSizeChanged)}return e.prototype.getElement=function(){return this._cell},e.prototype.onOptimalWidthNeedToBeRecalculated=function(){var e=this,t=this.optimalWidth();this._prevOptimalWidth0&&(e=Math.max(this._widthCache.measureText(i,r[0].label),this._widthCache.measureText(i,r[r.length-1].label)));for(var o=this.backLabels(!0),a=o.length;a--;){var c=this._widthCache.measureText(i,o[a].text());e=Math.max(e,c);var u=o[a].secondLineText();u&&(e=Math.max(e,this._widthCache.measureText(i,u)))}}var h=0;this._isCurrencyLabelVisible()&&(null===this._currencyLabelWidth&&(this._currencyLabelWidth=Object(n.ensureNotNull)(this._currencyLabel).width()),h=this._currencyLabelWidth);var d=Math.max(h,Math.ceil(t.borderSize+t.tickLength+t.paddingInner+t.paddingOuter+e));return d+=d%2},e.prototype.getImage=function(){var e=Object(n.ensureNotNull)(this._size),t=Object(s.createDisconnectedCanvas)(document,e);if(Object(s.getPrescaledContext2D)(t).drawImage(this._canvasBinding.canvas,0,0,e.w,e.h),null!==this._currencyLabel&&this._currencyLabel.isVisible()){var i=this._undoModel.model().isDark();this._currencyLabel.drawLabel(Object(s.getContext2D)(t),e.w,Object(s.getCanvasDevicePixelRatio)(t),i)}return t},e.prototype.priceScale=function(){return Object(n.ensureNotNull)(this._priceScale)},e.prototype.setPriceScale=function(e){ +this._priceScale!==e&&(null!==this._priceScale&&this._priceScale.onMarksChanged().unsubscribe(this,this.onOptimalWidthNeedToBeRecalculated),this._priceScale=e,null!==e&&e.onMarksChanged().subscribe(this,this.onOptimalWidthNeedToBeRecalculated))},e.prototype.isVisible=function(){return this._isVisible},e.prototype.setVisible=function(e){(e=!!e)!==this._isVisible&&(this._cell.style.display=e?"table-cell":"none",this._isVisible=e)},e.prototype.destroy=function(){null!==this._currencyMenu&&(this._currencyMenu.close(),this._currencyMenu=null),this._topCanvasBinding.unsubscribeCanvasConfigured(this._topCanvasConfiguredHandler),this._topCanvasBinding.destroy(),this._canvasBinding.unsubscribeCanvasConfigured(this._canvasConfiguredHandler),this._canvasBinding.destroy(),null!==this._priceScale&&this._priceScale.onMarksChanged().unsubscribe(this,this.onOptimalWidthNeedToBeRecalculated),this._priceScale=null,this._updateTimeout&&(clearTimeout(this._updateTimeout),this._updateTimeout=null),this._properties.childs().fontSize.unsubscribe(this,this._onFontSizeChanged),this._destroyed=!0},e.prototype.backgroundColor=function(){return this._pane.state().model().backgroundColor().value()},e.prototype.backgroundTopColor=function(){return this._pane.state().model().backgroundTopColor().value()},e.prototype.lineColor=function(){return this._properties.childs().lineColor.value()},e.prototype.textColor=function(){return this._properties.childs().textColor.value()},e.prototype.fontSize=function(){return this._properties.childs().fontSize.value()},e.prototype.baseFont=function(){return Object(u.makeFont)(this.fontSize(),d.CHART_FONT_FAMILY,"")},e.prototype.rendererOptions=function(){var e=this._rendererOptionsProvider.options();return this._color===e.color&&this._fontSize===e.fontSize||(this._recreateTickMarksCache(e),this._color=e.color),this._fontSize!==e.fontSize&&(this._widthCache.reset(),this._fontSize=e.fontSize,this._currencyLabelWidth=null,this._currencyFontSize=0,this.onOptimalWidthNeedToBeRecalculated()),e},e.prototype._isCurrencyLabelVisible=function(){return null!==this._currencyLabel&&this._currencyLabel.isVisible()},e.prototype._updateCurrencyLabel=function(){if(null!==this._currencyLabel){var e=this.priceScale().currency(this._undoModel.model().availableCurrenciesSet());null!==e&&this._properties.childs().showCurrency.value()?(this._currencyLabel.show(),this._currencyLabel.updateColors(this.backgroundTopColor(),this.textColor()),this._currencyLabel.setCurrencyInfo(e)&&(this._currencyLabelWidth=null,this.onOptimalWidthNeedToBeRecalculated())):this._currencyLabel.hide(),this._updateCurrencyLabelFont()}},e.prototype._currencyLabelLineHeight=function(){var e=this.rendererOptions();return Math.floor(this.fontSize()+e.paddingTop+e.paddingBottom)},e.prototype._updateCurrencyLabelFont=function(){if(null!==this._currencyLabel){var e=this.fontSize();e!==this._currencyFontSize&&(this._currencyLabel.setFontSize(e),this._currencyLabel.setLineHeight(this._currencyLabelLineHeight()),this._currencyFontSize=e,this._currencyLabelWidth=null, +this.onOptimalWidthNeedToBeRecalculated())}},e.prototype._recreateTickMarksCache=function(e){this._tickmarksCache.destroy(),this._tickmarksCache=new f(e.fontSize,e.color,d.CHART_FONT_FAMILY,"")},e.prototype._hasAlertLabel=function(){return!1},e.prototype._currenciesActions=function(){var e=this,t=Object(n.ensureNotNull)(this._currencyLabel).currencyInfo();if(null===t||t.readOnly)return[];var i=[],s=function(e,t,i,n){return new o.Action({label:e,checkable:!0,checked:t,onExecute:i,statName:n})},a=t.selectedCurrency,l=t.originalCurrencies;if(l.size>1){var c=s(Object(r.t)("Mixed"),null===t.selectedCurrency,(function(){return e._undoModel.setPriceScaleCurrency(e.priceScale(),null)}),"Mixed");i.push(c)}if(null!==a){var u=s(a,!0,(function(){return e._undoModel.setPriceScaleCurrency(e.priceScale(),a)}),a);i.push(u)}var h=Array.from(this._pane.state().model().availableCurrenciesSet()),d=h.filter((function(e){return e!==a&&l.has(e)}));d.sort();for(var p=function(n){i.push(s(n,t.selectedCurrency===n,(function(){return e._undoModel.setPriceScaleCurrency(e.priceScale(),n)}),n))},_=0,f=d;_0)&&i.push(new o.Separator);var m=h.filter((function(e){return e!==a&&!l.has(e)}));m.sort();for(var v=function(n){i.push(s(n,t.selectedCurrency===n,(function(){return e._undoModel.setPriceScaleCurrency(e.priceScale(),n)}),n))},y=0,g=m;yt.cssWidth+this._data.linewidth/2)){var i=t.pixelRatio;e.lineCap="butt",e.strokeStyle=this._data.color,e.lineWidth=Math.max(1,Math.floor(this._data.linewidth*i)),void 0!==this._data.linestyle&&Object(r.setLineStyle)(e,this._data.linestyle);var n=void 0!==this._data.top?Math.max(this._data.top,0):0,s=void 0!==this._data.bottom?Math.min(this._data.bottom,t.cssHeight):t.cssHeight,a=Math.round(this._data.x*i),l=Math.floor(n*i),c=Math.ceil(s*i);Object(o.drawVerticalLine)(e,a,l,c)}},e}()},"z61+":function(e,t,i){"use strict";i.d(t,"a",(function(){return _}));var n,r=i("mrSG"),o=i("Eyy1"),s=i("0YCj"),a=i.n(s),l=i("23IT"),c=i("ogJP"),u=i("txPx"),h=i("W5mg"),d=i("Ecpn"),p=Object(u.getLogger)("Platform.GUI.PropertyDialog.Indicators.MetaInfo"),_=function(){function e(e){this._metaInfo=e}return e.prototype.hasUserEditableInputs=function(){return this._metaInfo.inputs.some(h.a)},e.prototype.getUserEditableInputs=function(){return this._metaInfo.inputs.filter(h.a)},e.prototype.hasUserEditableProperties=function(){return a.a.isScriptStrategy(this._metaInfo)},e.prototype.hasUserEditableStyles=function(){var e=this._metaInfo;return this.getUserEditablePlots().length>0||void 0!==e.bands||void 0!==e.filledAreas||Object(d.a)(e.shortId)||a.a.isScriptStrategy(this._metaInfo)||Object.values(e.graphics).some((function(e){return void 0!==e}))},e.prototype.getUserEditablePlots=function(){var e=new Set,t=this._metaInfo;return t.plots.filter((function(i){if(Object(l.isColorerPlot)(i)||Object(l.isTextColorerPlot)(i)||Object(l.isDataOffsetPlot)(i)||Object(l.isOhlcColorerPlot)(i)||Object(l.isAlertConditionPlot)(i))return!1;if(Object(l.isOhlcPlot)(i)){var n=i.target;if(e.has(n))return!1;e.add(n);var r=Object(o.ensureDefined)(t.ohlcPlots);return!Object(o.ensureDefined)(r[n]).isHidden}var s=t.styles?t.styles[i.id]:void 0;return void 0===s||!s.isHidden}))},e.prototype.hasUserEditableOptions=function(){return this.hasUserEditableInputs()||this.hasUserEditableProperties()||this.hasUserEditableStyles()},e.prototype.getStrategyProperties=function(){for(var e,t=this._metaInfo,i=t.inputs.filter(m),n=Object(r.__assign)({},f),s=0,a=i;s=1e-15&&e<1?e.toFixed(15).replace(/\.?0+$/,""):String(e)},e}()},zZ2k:function(e,t,i){"use strict";i.r(t);var n=i("mrSG"),r=i("Eyy1"),o=i("aO4+"),s=i("fgLi"),a=i("hY0g"),l=i.n(a),c=i("KcY8"),u=function(e){function t(t,i,n){var r=e.call(this)||this;return r._source=t,r._priceScale=i,r._priceProvider=n,r}return Object(n.__extends)(t,e),t.prototype.setHitTestData=function(e){this._hitTestData=e},t.prototype._updateRendererData=function(e,t,i){e.visible=!1,t.visible=!1;var n=this._priceScale.mainSource(),r=null!==n?n.firstValue():null;if(this._isVisible()&&!this._priceScale.isEmpty()&&null!==r){var o=this._priceProvider(this._priceScale);null!==o&&(i.background=this._bgColor(),i.color=this.generateTextColor(i.background),i.coordinate=this._priceScale.priceToCoordinate(o,r),e.text=this._priceScale.formatPrice(o,r),e.visible=!0,t.visible=!0,t.hitTestData=this._hitTestData)}},t}(c.a),h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype._isVisible=function(){return this._source.visible&&null!==this._source.pane},t.prototype._bgColor=function(){return"#4c525e"},t.prototype._updateRendererData=function(t,i,n){var r=i.visible;e.prototype._updateRendererData.call(this,t,i,n),r||(i.visible=r)},t}(u),d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype._isVisible=function(){return null!==this._source.measurePane()},t.prototype._bgColor=function(){ +return this._source.model().isDark()?"#1E88E5":"#2196F3"},t}(u),p=i("mMWL"),_=(i("YFKU"),i("FQhm")),f=i("KtbP"),m=i("JWMC"),v=(i("7KDR"),i("5VQP")),y=(i("Kxc7"),i("/tGj")),g=function(e){function t(t,i,n,r,o){var s=e.call(this,t,i,r)||this;return s._currMainDataSourceId=null,s._hasActions=!1,s._tooltipText=null,s._gaOrigin="CH menu",s._crosshairPriceAxisView=t,t.setPaneRendererLabelIcon(0),s._crosshair=i,s._scale=n,s._options=o,s}return Object(n.__extends)(t,e),t.prototype._updateImpl=function(t,i){e.prototype._updateImpl.call(this,t,i);var n=this._crosshair.y,r=this._chartModel.properties().scalesProperties.fontSize.value(),o=this._chartModel.timeScale().width(),s=r+2*Math.floor(r/3.5),a=s,l=n-s/2,c=o-a,u=this._crosshair.pane,h=this._mainDataSourceOnPane();null!==h&&h.idForAlert()!==this._currMainDataSourceId&&(this._currMainDataSourceId=h.idForAlert(),this._hasActions=this._hasAvailableActions(h),this._tooltipText=this._getTooltipText(h));var d=null!==h&&Object(y.isSymbolSource)(h)?h.symbol():null,p=Boolean(d)||!1;this._crosshairPriceAxisView.setPaneLabelVisible(p);var _=null!==u&&0!==u.leftPriceScales().length&&p,f=null!==u&&0!==u.rightPriceScales().length&&p,m=o-a/2,v=this._tooltipText?{text:this._tooltipText,rect:{x:m,y:l,w:0,h:0}}:void 0;this._data={left:_,right:f,xl:0,xr:c,y:l,containerWidth:a,containerHeight:s,clickHandler:this._handleClick.bind(this),tooltip:v},this._crosshairPriceAxisView.setHitTestData(this._data)},t.prototype._priceScale=function(){return this._scale},t.prototype._hasAvailableActions=function(e){return this._canCreateAlert(e)||this._canTrade(e)},t.prototype._getTooltipText=function(e){return this._canCreateAlert(e)&&!this._canTrade(e)?window.t("Add Alert"):null},t.prototype._canCreateAlert=function(e){return!1},t.prototype._canTrade=function(e){return!1},t.prototype._handleClick=function(e,t,i){Object(m.trackEvent)(this._gaOrigin,"click");var n=this._mainDataSourceOnPane(),r=null!==n&&Object(y.isSymbolSource)(n)?n.symbol():null,o={pageX:i.pageX,pageY:i.pageY,clientX:i.clientX,clientY:i.clientY,screenX:i.screenX,screenY:i.screenY,price:this._crosshair.price,symbol:r};_.emit("onPlusClick",o)},t.prototype._getMenuItems=function(e){return Promise.resolve([])},t.prototype._createAlertMenuItems=function(e){return Promise.resolve([])},t.prototype._createTradingMenuItems=function(){return Promise.resolve([])},t.prototype._getActionAddAlert=function(e){return null},t.prototype._getValue=function(e,t){return null},t.prototype._formatValue=function(e,t){return""},t.prototype._addAlert=function(e,t){},t.prototype._showContextMenu=function(e,t,i,n){var o=this,s="left"===n;setTimeout((function(){v.ContextMenuManager.createMenu(e).then((function(e){e.show((function(e,t){var n=Object(r.ensureDefined)(o._data),a=Object(r.ensureNotNull)(i.view).innerHeight,l=s?n.xl:n.xr,c=i.localX-l,u={left:i.clientX-c,right:i.clientX-c+n.containerWidth,top:i.clientY-n.containerHeight/2,bottom:i.clientY+n.containerHeight/2};return{clientX:s?u.left:u.right-e,clientY:a=0&&Object(x.drawVerticalLine)(e,o,0,l),r&&s>=0&&Object(x.drawHorizontalLine)(e,s,0,a),this._data.drawCenter&&(e.beginPath(),e.arc(o,s,Math.round(3*i),0,2*Math.PI,!0),e.fillStyle=this._data.color,e.fill()),e.restore()}},e}(),I=i("CW80"),M=function(){function e(e,t,i){this._rendererData={},this._renderer=new T(this._rendererData),this._source=e,this._pane=t,this._horzVisible=i}return e.prototype.update=function(){},e.prototype.renderer=function(e,t){var i=this._source.visible&&this._source.areLinesVisible,n=Object(p.lockTimeAxis)().value(),r=this._rendererData;if(!i||null===this._pane)return null;r.horzLinesVisible=i&&this._horzVisible,r.vertLinesVisible=i||n;var o,s=this._source.model(),a=this._source.properties(),l=this._source.selectBarMode().value()&&this._source.isOnHoveredChartWidget(),c=s.currentTool(),u=Object(w.lastEventIsTouch)()&&(Object(I.isLineToolName)(c)||Object(p.toolIsMeasure)(c))&&!l;o=u?s.isDark()?"#1E88E5":"#2196F3":a.childs().color.value();var h=a.childs().transparency.value();return!u&&h>0&&(o=Object(b.generateColor)(o,h)),r.color=o,r.lineWidth=a.childs().width.value(),r.lineStyle=a.childs().style.value(),r.drawCenter=u&&this._pane===this._source.pane,r.w=this._pane.width(),r.h=this._pane.height(),r.x=void 0!==this._source.lockedX&&isFinite(this._source.lockedX)&&this._source.lockedX||this._source.x,r.y=this._source.y,l&&(r.vertLinesVisible=!0,r.lineStyle=S.LINESTYLE_SOLID,r.lineWidth=2,r.color="#ff0000"),this._renderer},e}(),L=i("IjC5"),O=function(){function e(e){this._renderer=new L.RectangleRenderer,this._rectangle=null,this._crosshair=e}return e.prototype.update=function(){var e=this._crosshair.selection();null!==e&&null!==this._crosshair.pane?this._rectangle=this._crosshair.pane.logicalRectToPixels(e):this._rectangle=null},e.prototype.renderer=function(e,t){if(!this._rectangle)return null;var i=this._crosshair.model().isDark(),n={backcolor:i?"rgba(21, 101, 192, 0.3)":"rgba(33, 150, 243, 0.3)",color:i?"rgba(21, 101, 192, 0.8)":"rgba(33, 150, 243, 0.8)",fillBackground:!0,linewidth:1,points:[this._rectangle.min,this._rectangle.max],extendLeft:!1,extendRight:!1};return this._renderer.setData(n),this._renderer},e +}(),k=i("Ialn"),A=i("GH0z"),E=i("5C6T"),V=i("nda6"),D=i("pJOz"),B=i("qgcf"),R=i("Zy3/"),N=i("a7Ha"),F=i("zDbI"),j=window.t("{0} bars"),W=new V.TimeSpanFormatter,H=function(){function e(e,t){this._pipFormatter=null,this._lastSymbolInfo=null,this._horzTrenRenderer=new D.TrendLineRenderer,this._vertTrenRenderer=new D.TrendLineRenderer,this._bgRenderer=new L.RectangleRenderer,this._labelRenderer=new B.TextRenderer,this._p1=null,this._p2=null,this._label=null,this._source=e,this._pane=t}return e.prototype.update=function(){var e=this._source.measurePoints(),t=e[0],i=e[1];if(void 0===i)return this._p1=null,void(this._p2=null);var n=Object(r.ensureNotNull)(this._source.measurePane()),s=t.price,a=i.price,l=i.price-s,c=i.index-t.index,u=Object(k.forceLTRStr)(""+c),h=Object(r.ensureNotNull)(n.mainDataSource()),d=Object(r.ensureNotNull)(h.formatter()).format(l);if(Math.abs(s)>1e-8){var p=l/Math.abs(s);d+=" ("+(new A.PercentageFormatter).format(100*p)+")"}var _=Object(k.forceLTRStr)(d);this._label=_+"\n"+j.format(u);var f=Object(r.ensureNotNull)(h.firstValue()),m=this._source.model().timeScale().indexToCoordinate(t.index),v=this._source.model().timeScale().indexToCoordinate(i.index),y=n.defaultPriceScale().priceToCoordinate(s,f),g=n.defaultPriceScale().priceToCoordinate(a,f);this._p1=new o.Point(m,y),this._p2=new o.Point(v,g);var b=this._source.model().timeScale().indexToUserTime(t.index),w=this._source.model().timeScale().indexToUserTime(i.index),P=null;if(null!==b&&null!==w){var C=this._pane.model().mainSeries().symbolInfo();null!==C&&C!==this._lastSymbolInfo&&(this._pipFormatter=new E.PipFormatter(C.pricescale,C.minmov,C.type,C.minmove2),this._lastSymbolInfo=C),P=(w.valueOf()-b.valueOf())/1e3}var x=this._pipFormatter?this._pipFormatter.format(l):null,T=null!==x?" , "+x:"",I=null!==P?W.format(P):null,M=null!==I?", "+Object(k.startWithLTR)(I):"";this._label=Object(k.forceLTRStr)(_+T)+"\n"+j.format(u)+M;var L=a=50?N.LineEnd.Arrow:N.LineEnd.Normal};this._horzTrenRenderer.setData(z);var U,G,Y=Math.round(R.x);z={points:[U=new o.Point(Y,this._p1.y),G=new o.Point(Y,this._p2.y)],color:O,linewidth:1,linestyle:S.LINESTYLE_SOLID,extendleft:!1,extendright:!1,leftend:N.LineEnd.Normal,rightend:Math.abs(U.y-G.y)>=50?N.LineEnd.Arrow:N.LineEnd.Normal};this._vertTrenRenderer.setData(z);var q,K={x:0,y:10},Z=.5*(this._p1.x+this._p2.x),J=this._p2.y,X=new o.Point(Z,J),Q=(q=Object(r.ensureNotNull)(this._label),{points:[X],text:q,color:"#FFFFFF",horzAlign:"center",vertAlign:"middle",font:F.CHART_FONT_FAMILY,offsetX:K.x,offsetY:K.y,bold:!1,italic:!1,fontsize:12, +padding:8,highlightBorder:!1,backgroundColor:V,backgroundTransparency:10,backgroundVertInflate:5,backgroundHorzInflate:5,backgroundRoundRect:4});this._labelRenderer.setData(Q);var $=this._labelRenderer.measure(),ee=Object(B.calculateLabelPosition)($,this._p1,this._p2,K,this._pane.height());this._labelRenderer.setPoints([ee])},e.prototype.renderer=function(){if(null===this._p1||null===this._p2)return null;var e=new R.CompositeRenderer;return e.append(this._bgRenderer),e.append(this._horzTrenRenderer),e.append(this._vertTrenRenderer),e.append(this._labelRenderer),e},e}(),z=function(e){function t(t){var i=e.call(this)||this;return i._data=t,i}return Object(n.__extends)(t,e),t.prototype.hitTest=function(e){return null},t.prototype._drawImpl=function(e){e.translate(this._data.x-this._data.width/2,this._data.y-this._data.height/2),e.strokeStyle="rgba(153,153,153,.3)",e.lineWidth=2,e.beginPath(),this._drawShackle(e),e.stroke(),e.closePath(),e.strokeStyle="rgba(153,153,153,.7)",e.lineWidth=1,e.beginPath(),e.rect(0,this._data.height-this._data.bodyHeight+.5,this._data.width,this._data.bodyHeight),e.closePath(),e.stroke(),e.translate(0,-1),e.strokeStyle="#777",e.beginPath(),this._drawShackle(e),e.stroke(),e.closePath(),e.fillStyle="rgba(255,255,255,.7)",e.beginPath(),e.rect(1,this._data.height-this._data.bodyHeight+1.5,this._data.width-2,this._data.bodyHeight-2),e.fill(),e.beginPath(),e.rect(.5,this._data.height-this._data.bodyHeight+1,this._data.width-1,this._data.bodyHeight-1),e.stroke(),e.closePath(),e.fillStyle="#777",e.fillRect(this._data.width/2-.5,this._data.height-this._data.bodyHeight/2,1,2)},t.prototype._drawShackle=function(e){var t=(this._data.width-3)/2,i=this._data.height-this._data.bodyHeight;e.moveTo(1.5,t),e.arc(this._data.width/2,t,t,Math.PI,2*Math.PI),i>t&&(e.moveTo(1.5,t),e.lineTo(1.5,i),e.moveTo(this._data.width-1.5,t),e.lineTo(this._data.width-1.5,i))},t}(i("cPgM").ScaledPaneRenderer),U=function(){function e(e,t,i){this._horzVisible=!1,this._source=e,this._pane=t,this._axis=i||"x"}return e.prototype.update=function(){},e.prototype.renderer=function(e,t){var i=this._source.visible&&this._source.areLinesVisible,n=Object(p.lockTimeAxis)().value(),o=i&&this._horzVisible,s=i||n;if("y"===this._axis&&!o||!s)return null;var a="y"===this._axis?this._pane.width()-4.5:Object(r.ensureDefined)(this._source.lockedX)+1,l="y"===this._axis?this._source.y:this._pane.height()-5.5-1;return new z({x:a,y:l,width:9,height:11,bodyHeight:7})},e}(),G=i("qFKp"),Y=i("aIyQ"),q=i.n(Y);i.d(t,"CrosshairBase",(function(){return Z}));var K={menuEnabled:!1,menuForMainSourceOnly:!1,disableTradingMenuActions:!1},Z=function(e){function t(t,i){var n=e.call(this)||this;n._measuringStarted=new q.a,n._measurePane=null,n._startMeasurePoint=null,n._endMeasurePoint=null,n._lastValidMeasurePoint=null,n._isOnHoveredChartWidget=!1,n._selectBarMode=new l.a(!1),n._selectionPane=null,n._selectionView=new O(n),n._selectionStartPoint=null,n._measurePaneView=null,n._timeLockPaneView=null,n._priceAxisViews=new Map,n._panePriceAxisViews=new Map, +n._startMeasurePriceAxisViews=new Map,n._endMeasurePriceAxisViews=new Map,n._model=t,n._options=Object.assign({},K,i||{}),n._linesShouldBeHidden=n._model.readOnly();var o=function(e){return function(t){return t===Object(r.ensureNotNull)(n._measurePane).defaultPriceScale()?e():null}};return n._currentPosPriceProvider=function(e){var t=Object(r.ensureNotNull)(n.pane);if(e===t.defaultPriceScale())return n.price;var i=Object(r.ensureNotNull)(t.defaultPriceScale().mainSource()).firstValue();if(null===i)return null;var o=t.defaultPriceScale().priceToCoordinate(n.price,i),s=Object(r.ensureNotNull)(e.mainSource()).firstValue();return null===s?null:e.coordinateToPrice(o,s)},n._startMeasurePriceProvider=o((function(){return Object(r.ensureNotNull)(n._startMeasurePoint).price})),n._endMeasurePriceProvider=o((function(){return Object(r.ensureNotNull)(n._lastMeasurePoint()).price})),n}return Object(n.__extends)(t,e),t.prototype.currentPoint=function(){return new o.Point(this.x,this.y)},t.prototype.startMeasurePoint=function(){return this._startMeasurePoint||null},t.prototype.endMeasurePoint=function(){return this._endMeasurePoint||null},t.prototype.measurePane=function(){return this._measurePane||null},t.prototype.startMeasuring=function(e,t){this._startMeasurePoint=e,this._measurePane=t,this._measuringStarted.fire()},t.prototype.finishMeasure=function(e){this._endMeasurePoint=e},t.prototype.clearMeasure=function(){delete this._measurePane,delete this._startMeasurePoint,delete this._endMeasurePoint,delete this._lastValidMeasurePoint,this._model.lightUpdate()},t.prototype.measuringStarted=function(){return this._measuringStarted},t.prototype.measurePoints=function(){this.updateAllViews();var e=[Object(r.ensureNotNull)(this._startMeasurePoint)],t=this._lastMeasurePoint();return null!==t&&e.push(t),e},t.prototype.startSelection=function(e){this._selectionStartPoint=this.currentLogicalPoint(),this._selectionPane=e},t.prototype.clearSelection=function(){this._selectionStartPoint=null,this._selectionPane=null},t.prototype.selection=function(){return this._selectionStartPoint?{p1:this._selectionStartPoint,p2:this.currentLogicalPoint()}:null},t.prototype.currentLogicalPoint=function(){return{index:this.appliedIndex(),price:this.price}},t.prototype.setLinesShouldBeHidden=function(e){this._linesShouldBeHidden=e},t.prototype.linesShouldBeHidden=function(){return this._linesShouldBeHidden},t.prototype.priceAxisViews=function(e,t){var i=[];return this._selectBarMode.value()&&this._isOnHoveredChartWidget||this.pane!==e||i.push(this._createPriceAxisViewOnDemand(this._priceAxisViews,this._panePriceAxisViews,e,t,this._currentPosPriceProvider,h,!0)),this._startMeasurePoint&&i.push(this._createPriceAxisViewOnDemand(this._startMeasurePriceAxisViews,null,e,t,this._startMeasurePriceProvider,d)),this._lastMeasurePoint()&&i.push(this._createPriceAxisViewOnDemand(this._endMeasurePriceAxisViews,null,e,t,this._endMeasurePriceProvider,d)),i},t.prototype.timeAxisViews=function(){var e=[] +;return this._linesShouldBeHidden||!this.visible&&!Object(p.lockTimeAxis)().value()||e.push(this._timeAxisView),this._startMeasurePoint&&e.push(this._startMeasureTimeAxisView),this._lastMeasurePoint()&&e.push(this._endMeasureTimeAxisView),e},t.prototype.paneViews=function(e){if(void 0===e)return null;var t=this._selectBarMode.value()&&this._isOnHoveredChartWidget,i=e===this.pane&&!t,n=[new M(this,e,i)];e===this._selectionPane&&n.push(this._selectionView),e===this._measurePane&&(null===this._measurePaneView&&(this._measurePaneView=new H(this,e)),this._measurePaneView.update(),n.push(this._measurePaneView));var r=e===this.pane,o=!G.CheckMobile.any()||window.screen.width>=320,s=p.tool.value(),a=Object(I.isLineToolName)(s),l=null!==this._model.lineBeingEdited()||null!==this._model.lineBeingCreated()||this._model.sourcesBeingMoved().length>0;if(r&&this._isOnHoveredChartWidget&&!t&&o&&!a&&!l){var c=this._panePriceAxisViews.get(e);void 0!==c&&c.forEach((function(e){return n.push(e)}))}return Object(p.lockTimeAxis)().value()&&(null===this._timeLockPaneView&&(this._timeLockPaneView=new U(this,e)),n.push(this._timeLockPaneView)),n},t.prototype.updateAllViews=function(){this._priceAxisViews.forEach((function(e){e.forEach((function(e){return e.update()}))})),this._panePriceAxisViews.forEach((function(e){e.forEach((function(e){return e.update()}))})),this._startMeasurePoint&&(this._startMeasurePriceAxisViews.forEach((function(e){e.forEach((function(e){return e.update()}))})),this._startMeasureTimeAxisView.update()),this._lastMeasurePoint()&&(this._endMeasurePriceAxisViews.forEach((function(e){e.forEach((function(e){return e.update()}))})),this._endMeasureTimeAxisView.update()),this._timeAxisView.update(),this._selectionView.update(),this._dataWindowView.update()},t.prototype.setLockedPosition=function(e){delete this.lockedIndex,delete this.lockedX,e!==this._measurePane&&Object(p.lockTimeAxis)().value()&&(this.lockedIndex=this._model.timeScale().points().roughIndex(p.lockTimeAxisTime.value()),null!==this.lockedIndex&&(this.lockedX=this._model.timeScale().indexToCoordinate(this.lockedIndex)))},t.prototype._lastMeasurePoint=function(){return this._endMeasurePoint?this._endMeasurePoint:(null!==this.pane&&this._measurePane===this.pane&&(this._lastValidMeasurePoint={price:this._model.magnet().align(this.price,this.index,this.pane),index:this.index}),this._lastValidMeasurePoint||null)},t.prototype._createPriceAxisViewOnDemand=function(e,t,i,n,r,o,s){var a=this;void 0===s&&(s=!1);var l=e.get(i),c=null!==t?t.get(i):void 0;void 0===l&&(l=new Map,e.set(i,l),this._options.menuEnabled&&null!==t&&(c=new Map,t.set(i,c)),s&&i.onDestroyed().subscribe(this,(function(){return a._onPaneDestroyed(i)})));var u=l.get(n);if(void 0===u){if(u=new o(this,n,r),l.set(n,u),void 0!==c){var h=new g(u,this,n,this._model,{menuForMainSourceOnly:this._options.menuForMainSourceOnly});c.set(n,h)}s&&n.lastSourceRemoved().subscribe(this,(function(){return a._onPriceScaleCleared(n)}))}return u},t.prototype._onPaneDestroyed=function(e){ +e.onDestroyed().unsubscribeAll(this),this._priceAxisViews.delete(e),this._panePriceAxisViews.delete(e),this._startMeasurePriceAxisViews.delete(e),this._endMeasurePriceAxisViews.delete(e)},t.prototype._onPriceScaleCleared=function(e){e.lastSourceRemoved().unsubscribeAll(this),this._priceAxisViews.forEach((function(t){return t.delete(e)})),this._panePriceAxisViews.forEach((function(t){return t.delete(e)})),this._startMeasurePriceAxisViews.forEach((function(t){return t.delete(e)})),this._endMeasurePriceAxisViews.forEach((function(t){return t.delete(e)}))},t}(s.DataSource)},zZ5f:function(e,t,i){"use strict";var n=i("Ss5c").LineDataSource,r=i("5rJj"),o=window.t("Fib Speed Resistance Fan");function s(e,t){var r=t||s.createProperties();n.call(this,e,r),i.e("lt-pane-views").then(function(e){var t=i("xp9B").FibSpeedResistanceFanPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}inherit(s,n),s.HLevelsCount=7,s.VLevelsCount=7,s.prototype.hLevelsCount=function(){return s.HLevelsCount},s.prototype.vLevelsCount=function(){return s.VLevelsCount},s.prototype.pointsCount=function(){return 2},s.prototype.translatedType=function(){return o},s.prototype.name=function(){return"Fib Speed Resistance Fan"},s.prototype.processErase=function(e,t){var i="h"===t.type?"hlevel"+t.index:"vlevel"+t.index,n=this.properties()[i].visible;e.setProperty(n,!1,"Erase level line")},s.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("2PB4").FibSpeedResistanceFanDefinitionsViewModel}.bind(null,i)).catch(i.oe)},s.createProperties=function(e){void 0!==e&&void 0===e.reverse&&(e.reverse=!0);var t=new r("linetoolfibspeedresistancefan",e,!1,{range:[1,7],prefixes:["h","v"],names:["coeff","color","visible"]});return s._configureProperties(t),t},s._configureProperties=function(e){n._configureProperties(e)},t.LineToolFibSpeedResistanceFan=s},ziJ5:function(e,t,i){"use strict";(function(e){var n=i("QIuV"),r=i("Ss5c").LineDataSource,o=i("RTYN").PositionAveragePriceAxisView,s=i("jkoZ"),a=i("Ocx9").DefaultProperty,l=i("kcTO").PriceFormatter,c=i("s1Gx").sortSourcesPreOrdered.LineToolPosition;function u(e){this._line=e,this._data={bodyText:"position",quantityText:"0"},this._closeEnabled=!0,this._direction="buy",this._profitState="neutral"}function h(e){return null==e?e="":e+="",e}function d(e,t){this._adapter=new u(this);var r=t||d.createProperties();n.call(this,e,r),i.e("lt-pane-views").then(function(e){var t=i("GzSs").PositionPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe);var o=e.mainSeries().symbolInfo(),s=null!==o?o.pricescale:100,a=null!==o&&o.fractional?o.minmov:1,c=null!==o&&o.fractional,h=null!==o?o.minmove2:void 0;this._formatter=new l(s,a,c,h)}u.prototype.setDirection=function(e){return this._direction=e,this._line.updateAllViewsAndRedraw(),this},u.prototype.setProfitState=function(e){return this._profitState=e,this._line.updateAllViewsAndRedraw(),this}, +u.prototype.getPrice=function(){return this._line.points().length>0?this._line.points()[0].price:this._line._timePoint.length>0?this._line._timePoint[0].price:void 0},u.prototype.setPrice=function(e){if(this._line.points().length>0){var t=this._line.points()[0];t.price=e,this._line._points[0]=t,this._line.normalizePoints(),this._line.updateAllViewsAndRedraw()}return this._line._timePoint.length>0&&(this._line._timePoint[0].price=e),this},u.prototype.getText=function(){return this._data.bodyText},u.prototype.setText=function(e){return this._data.bodyText=e||"",this._line.updateAllViewsAndRedraw(),this},u.prototype.setTooltip=function(e){return this._line.properties().tooltip.setValue(h(e)),this},u.prototype.getTooltip=function(){return this._line.properties().tooltip.value()},u.prototype.setProtectTooltip=function(e){return this._line.properties().protectTooltip.setValue(h(e)),this},u.prototype.getProtectTooltip=function(){return this._line.properties().protectTooltip.value()},u.prototype.setCloseTooltip=function(e){return this._line.properties().closeTooltip.setValue(h(e)),this},u.prototype.getCloseTooltip=function(){return this._line.properties().closeTooltip.value()},u.prototype.setReverseTooltip=function(e){return this._line.properties().reverseTooltip.setValue(h(e)),this},u.prototype.getReverseTooltip=function(){return this._line.properties().reverseTooltip.value()},u.prototype.getQuantity=function(){return this._data.quantityText},u.prototype.setQuantity=function(e){return this._data.quantityText=e||"",this._line.updateAllViewsAndRedraw(),this},u.prototype.getExtendLeft=function(){var e=this._line.properties().extendLeft.value();return"inherit"===e?this._line._model.properties().tradingProperties.extendLeft.value():e},u.prototype.setExtendLeft=function(e){return this._line.properties().extendLeft.setValue(e),this},u.prototype.getLineLength=function(){var e=this._line.properties().lineLength.value();return"inherit"===e?this._line._model.properties().tradingProperties.lineLength.value():e},u.prototype.setLineLength=function(e){return this._line.properties().lineLength.setValue(Math.max(0,Math.min(e,100))),this},u.prototype.getLineColor=function(){var e=this._line.properties();return("buy"===this._direction?e.lineBuyColor:e.lineSellColor).value()},u.prototype.setLineColor=function(e){return"buy"===this._direction?this.setLineBuyColor(e):this.setLineSellColor(e),this},u.prototype.setLineBuyColor=function(e){return this._line.properties().lineBuyColor.setValue(e),this},u.prototype.setLineSellColor=function(e){return this._line.properties().lineSellColor.setValue(e),this},u.prototype.getLineStyle=function(){var e=this._line.properties().lineStyle.value();return"inherit"===e?this._line._model.properties().tradingProperties.lineStyle.value():e},u.prototype.setLineStyle=function(e){return this._line.properties().lineStyle.setValue(e),this},u.prototype.getLineWidth=function(){var e=this._line.properties().lineWidth.value();return"inherit"===e?this._line._model.properties().tradingProperties.lineWidth.value():e}, +u.prototype.setLineWidth=function(e){return this._line.properties().lineWidth.setValue(e),this},u.prototype.getBodyBorderColor=function(){var e=this._line.properties();return("buy"===this._direction?e.bodyBorderBuyColor:e.bodyBorderSellColor).value()},u.prototype.setBodyBorderColor=function(e){return"buy"===this._direction?this.setBodyBorderBuyColor(e):this.setBodyBorderSellColor(e),this},u.prototype.setBodyBorderBuyColor=function(e){return this._line.properties().bodyBorderBuyColor.setValue(e),this},u.prototype.setBodyBorderSellColor=function(e){return this._line.properties().bodyBorderSellColor.setValue(e),this},u.prototype.getBodyBackgroundColor=function(){return s.getColorFromProperties(this._line.properties().bodyBackgroundColor,this._line.properties().bodyBackgroundTransparency)},u.prototype.setBodyBackgroundColor=function(e){return s.setColorToProperties(e,this._line.properties().bodyBackgroundColor,this._line.properties().bodyBackgroundTransparency),this},u.prototype.getBodyTextColor=function(){var e=this._line.properties();return("positive"===this._profitState?e.bodyTextPositiveColor:"negative"===this._profitState?e.bodyTextNegativeColor:e.bodyTextNeutralColor).value()},u.prototype.setBodyTextColor=function(e){return"positive"===this._profitState?this.setBodyTextPositiveColor(e):"negative"===this._profitState?this.setBodyTextNegativeColor(e):this.setBodyTextNeutralColor(e),this},u.prototype.setBodyTextPositiveColor=function(e){return this._line.properties().bodyTextPositiveColor.setValue(e),this},u.prototype.setBodyTextNegativeColor=function(e){return this._line.properties().bodyTextNegativeColor.setValue(e),this},u.prototype.setBodyTextNeutralColor=function(e){return this._line.properties().bodyTextNeutralColor.setValue(e),this},u.prototype.getBodyFont=function(){return s.getFontFromProperties(this._line.properties().bodyFontFamily,this._line.properties().bodyFontSize,this._line.properties().bodyFontBold,this._line.properties().bodyFontItalic)},u.prototype.setBodyFont=function(e){return s.setFontToProperties(e,this._line.properties().bodyFontFamily,this._line.properties().bodyFontSize,this._line.properties().bodyFontBold,this._line.properties().bodyFontItalic),this},u.prototype.getQuantityBorderColor=function(){var e=this._line.properties();return("buy"===this._direction?e.quantityBorderBuyColor:e.quantityBorderSellColor).value()},u.prototype.setQuantityBorderColor=function(e){return"buy"===this._direction?this.setQuantityBorderBuyColor(e):this.setQuantityBorderSellColor(e),this},u.prototype.setQuantityBorderBuyColor=function(e){return this._line.properties().quantityBorderBuyColor.setValue(e),this},u.prototype.setQuantityBorderSellColor=function(e){return this._line.properties().quantityBorderSellColor.setValue(e),this},u.prototype.getQuantityBackgroundColor=function(){var e=this._line.properties();return("buy"===this._direction?e.quantityBackgroundBuyColor:e.quantityBackgroundSellColor).value()},u.prototype.setQuantityBackgroundColor=function(e){ +return"buy"===this._direction?this.setQuantityBackgroundBuyColor(e):this.setQuantityBackgroundSellColor(e),this},u.prototype.setQuantityBackgroundBuyColor=function(e){return this._line.properties().quantityBackgroundBuyColor.setValue(e),this},u.prototype.setQuantityBackgroundSellColor=function(e){return this._line.properties().quantityBackgroundSellColor.setValue(e),this},u.prototype.getQuantityTextColor=function(){return s.getColorFromProperties(this._line.properties().quantityTextColor,this._line.properties().quantityTextTransparency)},u.prototype.setQuantityTextColor=function(e){return s.setColorToProperties(e,this._line.properties().quantityTextColor,this._line.properties().quantityTextTransparency),this},u.prototype.getQuantityFont=function(){return s.getFontFromProperties(this._line.properties().quantityFontFamily,this._line.properties().quantityFontSize,this._line.properties().quantityFontBold,this._line.properties().quantityFontItalic)},u.prototype.setQuantityFont=function(e){return s.setFontToProperties(e,this._line.properties().quantityFontFamily,this._line.properties().quantityFontSize,this._line.properties().quantityFontBold,this._line.properties().quantityFontItalic),this},u.prototype.getReverseButtonBorderColor=function(){var e=this._line.properties();return("buy"===this._direction?e.reverseButtonBorderBuyColor:e.reverseButtonBorderSellColor).value()},u.prototype.setReverseButtonBorderColor=function(e){return"buy"===this._direction?this.setReverseButtonBorderBuyColor(e):this.setReverseButtonBorderSellColor(e),this},u.prototype.setReverseButtonBorderBuyColor=function(e){return this._line.properties().reverseButtonBorderBuyColor.setValue(e),this},u.prototype.setReverseButtonBorderSellColor=function(e){return this._line.properties().reverseButtonBorderSellColor.setValue(e),this},u.prototype.getReverseButtonBackgroundColor=function(){return s.getColorFromProperties(this._line.properties().reverseButtonBackgroundColor,this._line.properties().reverseButtonBackgroundTransparency)},u.prototype.setReverseButtonBackgroundColor=function(e){return s.setColorToProperties(e,this._line.properties().reverseButtonBackgroundColor,this._line.properties().reverseButtonBackgroundTransparency),this},u.prototype.getReverseButtonIconColor=function(){var e=this._line.properties();return("buy"===this._direction?e.reverseButtonIconBuyColor:e.reverseButtonIconSellColor).value()},u.prototype.setReverseButtonIconColor=function(e){return"buy"===this._direction?this.setReverseButtonIconBuyColor(e):this.setReverseButtonIconSellColor(e),this},u.prototype.setReverseButtonIconBuyColor=function(e){return this._line.properties().reverseButtonIconBuyColor.setValue(e),this},u.prototype.setReverseButtonIconSellColor=function(e){return this._line.properties().reverseButtonIconSellColor.setValue(e),this},u.prototype.getCloseButtonBorderColor=function(){var e=this._line.properties();return("buy"===this._direction?e.closeButtonBorderBuyColor:e.closeButtonBorderSellColor).value()},u.prototype.setCloseButtonBorderColor=function(e){ +return"buy"===this._direction?this.setCloseButtonBorderBuyColor(e):this.setCloseButtonBorderSellColor(e),this},u.prototype.setCloseButtonBorderBuyColor=function(e){return this._line.properties().closeButtonBorderBuyColor.setValue(e),this},u.prototype.setCloseButtonBorderSellColor=function(e){return this._line.properties().closeButtonBorderSellColor.setValue(e),this},u.prototype.getCloseButtonBackgroundColor=function(){return s.getColorFromProperties(this._line.properties().closeButtonBackgroundColor,this._line.properties().closeButtonBackgroundTransparency)},u.prototype.setCloseButtonBackgroundColor=function(e){return s.setColorToProperties(e,this._line.properties().closeButtonBackgroundColor,this._line.properties().closeButtonBackgroundTransparency),this},u.prototype.getCloseButtonIconColor=function(){var e=this._line.properties();return("buy"===this._direction?e.closeButtonIconBuyColor:e.closeButtonIconSellColor).value()},u.prototype.setCloseButtonIconColor=function(e){return"buy"===this._direction?this.setCloseButtonIconBuyColor(e):this.setCloseButtonIconSellColor(e),this},u.prototype.setCloseButtonIconBuyColor=function(e){return this._line.properties().closeButtonIconBuyColor.setValue(e),this},u.prototype.setCloseButtonIconSellColor=function(e){return this._line.properties().closeButtonIconSellColor.setValue(e),this},u.prototype.block=function(){this._blocked=!0,this._line.updateAllViewsAndRedraw()},u.prototype.unblock=function(){this._blocked=!1,this._line.updateAllViewsAndRedraw()},u.prototype.isFunction=function(e){return"function"==typeof e},u.prototype.onReverse=function(e,t){return t?this.isFunction(t)&&(this._onReverseData=e,this._onReverseCallback=t):this.isFunction(e)&&(this._onReverseCallback=e),this},u.prototype.callOnReverse=function(){this.isFunction(this._onReverseCallback)&&this._onReverseCallback.call(this,this._onReverseData)},u.prototype.isOnReverseCallbackPresent=function(){return this.isFunction(this._onReverseCallback)},u.prototype.onClose=function(e,t){return t?this.isFunction(t)&&(this._onCloseData=e,this._onCloseCallback=t):this.isFunction(e)&&(this._onCloseCallback=e),this},u.prototype.setCloseEnabled=function(e){return this._closeEnabled===e||(this._closeEnabled=e,this._onCloseCallback&&this._line.updateAllViewsAndRedraw()),this},u.prototype.isCloseEnabled=function(){return this._closeEnabled},u.prototype.callOnClose=function(){this.isFunction(this._onCloseCallback)&&this._closeEnabled&&this._onCloseCallback.call(this,this._onCloseData)},u.prototype.isOnCloseCallbackPresent=function(){return this._closeEnabled&&this.isFunction(this._onCloseCallback)},u.prototype.onModify=function(e,t){return t?this.isFunction(t)&&(this._onModifyData=e,this._onModifyCallback=t):this.isFunction(e)&&(this._onModifyCallback=e),this},u.prototype.callOnModify=function(){this.isFunction(this._onModifyCallback)&&this._onModifyCallback.call(this,this._onModifyData)},u.prototype.onContextMenu=function(e,t){return t?this.isFunction(t)&&(this._onContextMenuData=e, +this._onContextMenuCallback=t):this.isFunction(e)&&(this._onContextMenuCallback=e),this},u.prototype.shouldShowContextMenu=function(){return this.isFunction(this._onContextMenuCallback)},u.prototype.callOnContextMenu=function(){if(this.isFunction(this._onContextMenuCallback))return this._onContextMenuCallback.call(this,this._onContextMenuData)},u.prototype.remove=function(){this._line._model.removeSource(this._line),delete this._line},inherit(d,n),d.prototype.zorder=function(){return c},d.prototype.setPoint=function(e,t,i){this._points[e]=t,this.normalizePoints()},d.prototype.addPoint=function(e,t){return this._points.push(e),this._lastPoint=null,this.normalizePoints(),this.createServerPoints(),!0},d.prototype.translatedType=function(){return"Position"},d.prototype.name=function(){return"Position"},d.prototype.createPriceAxisView=function(e){return this._priceAxisView=new o(this,{pointIndex:e,backgroundPropertyGetter:this._adapter.getLineColor.bind(this._adapter)}),this._priceAxisView},d.prototype.paneViews=function(){return TradingView.printing&&!e.enabled("snapshot_trading_drawings")?null:this._model.properties().tradingProperties.showPositions.value()?r.prototype.paneViews.call(this):null},d.prototype.priceAxisViews=function(t,i){return TradingView.printing&&!e.enabled("snapshot_trading_drawings")?null:this._model.properties().tradingProperties.showPositions.value()?r.prototype.priceAxisViews.call(this,t,i):null},d.prototype.hasContextMenu=function(){return this._adapter.shouldShowContextMenu()},d.prototype.contextMenuItems=function(){return this._adapter.callOnContextMenu()},d.prototype.formatter=function(){return this._formatter},d.createProperties=function(e){var t=new a("linetoolposition",e,!1,!1);return d._configureProperties(t),t},d._configureProperties=function(e){n._configureProperties(e)},t.LineToolPosition=d}).call(this,i("Kxc7"))},zqZp:function(e,t,i){"use strict";var n=i("Ss5c").LineDataSource,r=i("Ocx9").DefaultProperty,o=window.t("Price Label");function s(e,t){var r=t||s.createProperties();n.call(this,e,r),i.e("lt-pane-views").then(function(e){var t=i("Ni7V").PriceLabelPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}inherit(s,n),s.prototype.pointsCount=function(){return 1},s.prototype.translatedType=function(){return o},s.prototype.name=function(){return"Price Label"},s.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("hQgR").PriceLabelDefinitionsViewModel}.bind(null,i)).catch(i.oe)},s.createProperties=function(e){var t=new r("linetoolpricelabel",e);return s._configureProperties(t),t},s._configureProperties=function(e){n._configureProperties(e)},t.LineToolPriceLabel=s}},[["/G2Z","runtime","vendors"]]]); \ No newline at end of file diff --git a/public/charting_library/bundles/library.c9ed08366453322ce64f.css b/public/charting_library/bundles/library.c9ed08366453322ce64f.css new file mode 100644 index 00000000..ee0b04db --- /dev/null +++ b/public/charting_library/bundles/library.c9ed08366453322ce64f.css @@ -0,0 +1 @@ +html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body,dir,h1,h2,h3,h4,h5,h6,html,li,menu,ol,p,ul{margin:0;padding:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent;text-decoration:none}a:active{outline:0}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){a:hover{outline:0}}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{font-size:2em}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.25em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}svg use{pointer-events:none}figure{margin:0}hr{box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:none;margin:0;padding:0}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}.tv-text ol,.tv-text p,.tv-text ul{font-size:14px;margin-bottom:12px;line-height:1.6;color:#131722}html.theme-dark .tv-text ol,html.theme-dark .tv-text p,html.theme-dark .tv-text ul{color:#d1d4dc}.tv-text ol.tv-text__color_bright,.tv-text p.tv-text__color_bright,.tv-text ul.tv-text__color_bright{color:#fff}.tv-text ol.tv-text__color_silver,.tv-text p.tv-text__color_silver,.tv-text ul.tv-text__color_silver{color:silver}.tv-text ol.tv-text__color_silver_30,.tv-text p.tv-text__color_silver_30,.tv-text ul.tv-text__color_silver_30{color:#9b9b9b}.tv-text ol.tv-text__paragraph--additional-top-margin,.tv-text p.tv-text__paragraph--additional-top-margin,.tv-text ul.tv-text__paragraph--additional-top-margin{margin-top:24px}.tv-text ol.tv-text__paragraph--additional-top-margin_double,.tv-text p.tv-text__paragraph--additional-top-margin_double,.tv-text ul.tv-text__paragraph--additional-top-margin_double{margin-top:48px}.tv-text ol.tv-text__paragraph--additional-bottom-margin,.tv-text p.tv-text__paragraph--additional-bottom-margin,.tv-text ul.tv-text__paragraph--additional-bottom-margin{margin-bottom:24px}.tv-text ol.tv-text__paragraph--additional-bottom-margin_double,.tv-text p.tv-text__paragraph--additional-bottom-margin_double,.tv-text ul.tv-text__paragraph--additional-bottom-margin_double{margin-bottom:48px}.tv-text ol .tv-text--highlight-important,.tv-text p .tv-text--highlight-important,.tv-text ul .tv-text--highlight-important{box-shadow:0 0 0 .37em #fff2cf;background:#fff2cf}html.theme-dark .tv-text ol .tv-text--highlight-important,html.theme-dark .tv-text p .tv-text--highlight-important,html.theme-dark .tv-text ul .tv-text--highlight-important{background:#194453;box-shadow:0 0 0 .37em #194453}.tv-text ol .tv-text--highlight-important:empty,.tv-text p .tv-text--highlight-important:empty,.tv-text ul .tv-text--highlight-important:empty{background:transparent;box-shadow:none}.tv-text h1{font-size:45px;margin-bottom:30px;margin-top:30px}@media screen and (max-width:1019px){.tv-text h1{font-size:38px}}@media screen and (max-width:767px){.tv-text h1{font-size:32px}}@media screen and (max-width:479px){.tv-text h1{font-size:28px}}.tv-text h2{font-size:31px}@media screen and (max-width:1019px){.tv-text h2{font-size:26px}}@media screen and (max-width:479px){.tv-text h2{font-size:24px}}.tv-text h3{font-size:17px}@media screen and (max-width:1019px){.tv-text h3{font-size:16px}}.tv-text h4{font-size:15px}.tv-text h2,.tv-text h3,.tv-text h4{margin-bottom:20px;margin-top:20px}.tv-text h1:first-child,.tv-text h2:first-child,.tv-text h3:first-child,.tv-text h4:first-child{margin-top:0}.tv-text ol,.tv-text ul{list-style-position:inside}.tv-text--position-outside ol,.tv-text--position-outside ul{list-style-position:outside;padding-left:17px}.tv-text a:not(.tv-badge):not(.tv-button){color:#2196f3;transition:color .35s ease}html.theme-dark .tv-text a:not(.tv-badge):not(.tv-button){color:#1976d2}.tv-text a:not(.tv-badge):not(.tv-button):visited{color:#2196f3;fill:#2196f3}html.theme-dark .tv-text a:not(.tv-badge):not(.tv-button):visited{fill:#1976d2;color:#1976d2}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-text a:not(.tv-badge):not(.tv-button):hover{color:#1e88e5;fill:#1e88e5;transition-duration:.06s}}.tv-text a:not(.tv-badge):not(.tv-button):focus{outline:auto}.tv-text a:not(.tv-badge):not(.tv-button):focus:not(:-moz-focusring){outline:none}.tv-text a:not(.tv-badge):not(.tv-button):-moz-focusring{outline:auto}.tv-text a:not(.tv-badge):not(.tv-button):active{color:#1e88e5;fill:#1e88e5;transition-duration:.06s}.tv-text__font.tv-text__font--size_semilarge{font-size:15px}@media screen and (max-width:767px){.tv-text__font.tv-text__font--size_semilarge{font-size:14px}}.tv-text__font.tv-text__font--size_large{font-size:17px}@media screen and (max-width:767px){.tv-text__font.tv-text__font--size_large{font-size:16px}}.tv-text__font.tv-text__font--size_xlarge{font-size:19px}@media screen and (max-width:767px){.tv-text__font.tv-text__font--size_xlarge{font-size:18px}}.tv-text__font--bold{font-weight:700}.tv-text__font--italic{font-style:italic}.tv-text--darkbg,.tv-text--darkbg ol,.tv-text--darkbg p,.tv-text--darkbg ul{color:#fff}.tv-text--highlight-important{box-shadow:0 0 0 .07em #fff2cf;background:#fff2cf}html.theme-dark .tv-text--highlight-important{background:#194453;box-shadow:0 0 0 .07em #194453}.tv-text--highlight-important:empty{background:transparent;box-shadow:none}.symbol-change-direction.up{color:#3cbc98}.symbol-change-direction.down{color:#ff4a68}.js-hidden{display:none!important}.js-no-pointer-events{pointer-events:none!important}body{min-width:320px;box-sizing:border-box;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-tap-highlight-color:transparent}body.i-no-scroll{overflow:hidden!important}body.i-no-padding{padding:0!important}::selection{background:rgba(216,240,250,.6)}html.theme-dark ::selection{background:rgba(117,134,150,.6)}.i-hidden{display:none!important}.i-invisible{visibility:hidden!important}.i-clearfix:after{clear:both;display:table;content:""}.i-align_left{text-align:left!important}.i-align_right{text-align:right!important}.i-align_center{text-align:center!important}.i-float_left{float:left!important}.i-float_right{float:right!important}.i-float_none{float:none!important}@media screen and (min-width:1020px){.i-device-only{display:none!important}}@media screen and (max-width:1019px){.i-desktop-only{display:none!important}}@media screen and (min-width:479px){.i-phones-only{display:none!important}}@media screen and (max-width:479px){.i-except-phones-only{display:none!important}}.i-no-break{white-space:nowrap}body.fullscreen-mode{overflow:hidden}.tv-layout-width{width:1020px;margin:0 auto;padding:0 20px;box-sizing:border-box}.tv-layout-width--no-padding{padding:0;width:980px}.tv-layout-width--simple{padding:0}.tv-dialog .tv-layout-width{max-width:100%}.chart-page .tv-layout-width{width:100%}@media screen and (max-width:1019px){.tv-layout-width{width:auto}.tv-layout-width .tv-feed{margin-left:-20px;margin-right:-20px}.tv-layout-width .tv-feed--tablet-top-indent{margin-top:48px}}.tv-layout-padding{padding:0 20px}body.page-wide .tv-layout-width,body.popup-wide .fancybox-overlay .tv-layout-width{width:1520px}.tv-main,body.page-fullwidth .tv-layout-width{width:100%}.tv-main{display:flex;flex-direction:column;min-height:100%}.tv-side-toolbar{float:left;position:static;height:100%;overflow-x:visible;overflow-y:hidden}.tv-main-panel{position:relative;background-color:#f1f3f6;overflow:hidden}.tv-side-panel{float:right;position:relative;z-index:15;height:100%}.tv-panels{height:100%}.chart-page .tv-content{padding:0}.clear{clear:both}.clearfix:after{clear:both;display:block;content:""}.hide{display:none!important}.show{display:block!important}.tv-right{float:right!important}.tv-left{float:left!important}#_atssh{position:absolute;margin-top:-20px}.js-right-boundary{margin-right:0}.icon{display:inline-block;background:url(1df47f578aeef40dd1f2328338a133be.png) 0 0 no-repeat;position:relative;vertical-align:middle}.ticker-text{background:#f2f5f8;width:30px!important;text-align:center}textarea.tv-textarea{color:#5a5a5a;margin:0;border:1px solid #c9cbcd;padding:0 5px}.selectable,body,html,input,textarea{font-family:Trebuchet MS,roboto,ubuntu,sans-serif}body,html{color:#4a4a4a;font-size:14px;height:100%!important}html.theme-dark body,html.theme-dark html{color:#c5cbce}body.font-VI-lang-safe,html.font-VI-lang-safe body{font-family:Arial,sans-serif}body{background-color:#fff;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}html.theme-dark body{background-color:#131722}body.tv-body--bg_superdark,html.theme-dark body.tv-body--bg_superdark{background:#131722}body.tv-body--bg_contrast{background-color:#fff}html.theme-dark body.tv-body--bg_contrast{background-color:#1e222d}body.extension{min-width:0;overflow:hidden}img{border:none}textarea{resize:none}:focus{outline:none}input::-ms-clear{display:none}input,textarea{border-radius:0}.tv-profile .tags,.unselectable{-webkit-user-select:none;user-select:none}.selectable,input,textarea{-webkit-user-select:text;user-select:text}.font-VI-lang-safe .selectable,.font-VI-lang-safe input,.font-VI-lang-safe textarea{font-family:Arial,sans-serif}.text-center{text-align:center}#footer{background:#dbdbdb;color:#626262;border-top:1px solid #999;height:24px;font-size:small}#chart-area{background:transparent}#chart-area,.chart-container{position:relative}#chart-area.fullscreen{position:fixed;z-index:15;left:0;top:0;width:100%!important;height:100%!important}.chart-page{background-color:var(--tv-color-platform-background,#e0e3eb)}html.theme-dark .chart-page{background-color:var(--tv-color-platform-background,#2a2e39)}.chart-page .chart-container{position:relative;contain:strict}.chart-page .chart-container-border{position:relative;height:100%;width:100%;overflow:hidden;border:none;background-color:#fff;z-index:0}html.theme-dark .chart-page .chart-container-border{background-color:#131722}.chart-page .chart-container.multiple.active:after{content:"";display:block;position:absolute;pointer-events:none;box-sizing:border-box;top:0;bottom:0;left:0;right:0;border:2px solid;border-color:#2196f3}html.theme-dark .chart-page .chart-container.multiple.active:after{border-color:#1976d2}.chart-page .chart-container.inactive .back-to-present{display:none}.chart-page .chart-container.no-header-toolbar .chart-container-border{border-top-left-radius:4px;border-top-right-radius:4px}.chart-page .chart-container.no-bottom-toolbar .chart-container-border{border-bottom-left-radius:4px;border-bottom-right-radius:4px}.ui-tabs .ui-tabs-nav li a{font-size:x-small}.input-reset{width:16px;height:16px;position:absolute;top:7px;right:7px;cursor:pointer;display:none;border-radius:50%}.input-reset:before{content:" ";display:block;width:10px;height:10px;background:url(1df47f578aeef40dd1f2328338a133be.png) no-repeat -103px -340px;position:absolute;top:50%;left:50%;margin:-5px 0 0 -5px}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.input-reset:hover{background-color:#f2f5f8}}.input-reset:active{opacity:.6}.loading-indicator{width:100%;height:100%;position:absolute;top:0;left:0;z-index:150;background:#fff}html.theme-dark .loading-indicator{background:#131722}.loading-indicator img{position:absolute;top:50%;left:50%;margin:-58px 0 0 -58px}.loading-indicator img.small{margin:-12px 0 0 -12px}.ui-slider-horizontal{margin:7px 0 0;background-color:#f4f7f9;border:1px solid!important;border-color:#c9cbcd!important;height:5px!important;box-shadow:inset 0 1px 2px rgba(0,0,0,.15)}html.theme-dark .ui-slider-horizontal{border-color:#2f3241!important;background-color:#171b29}.ui-slider-handle{width:15px!important;height:15px!important;background:url(1df47f578aeef40dd1f2328338a133be.png) -20px -80px!important;border:none!important;top:-5px!important;margin-left:-7px!important}.ui-slider-horizontal.linewidth-slider{width:101px;margin:7px 10px;background:url(4a9abefd31dab7c8239e02e925aacd78.png) 0 0 no-repeat!important;height:12px!important;border:none!important;box-shadow:none;display:inline-block;vertical-align:middle}.ui-slider-horizontal.linewidth-slider:after,.ui-slider-horizontal.linewidth-slider:before{content:none}.ui-slider-horizontal.transparency-slider{width:99px;height:8px!important;margin:7px 10px;background:url(7e0cc5f7d7f5151500dd60b8d6ca60a1.png)!important}.ui-slider-horizontal.transparency-slider.wide-slider{width:176px;margin:7px 1px}.slider-range{width:155px;height:5px!important;background:#fafafa;position:relative;top:1px;left:0!important;margin-left:15px;margin-right:15px;margin-top:0!important}.slider-range .ui-slider-range{top:0!important;height:5px!important}.slider-range .ui-slider-handle,.slider-range .ui-slider-horizontal.transparency-slider .ui-slider-handle{width:20px!important;height:20px!important;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAABvElEQVR42r1U2U7CUBD1D9V36oP4R/AHrmFRChFsQSExKihtFB804oOJLAXKcllEifU6pwkEuYVQH2hykpuZOZNZTmdtZV+11vDk8gWfnEgrh+GEBsjxtHJ9e++rGA1p6USs29tQzq9294OnL4QWYUj4BvCGDT7EMNbbWJisVm9uByJKlggsJCctrfDMS4bJO70P3uoO7Dds8CEGscTxzqtsPXCi3KCKi8s73mJ9PhqNHAEfYij2kzhZ4oqVpjJZtNmhwB+QlsA4KUP7MwswPZhLUFatRZWJlQ44OOD+WVROe/Rh2PmHJwS6gkYc4rZJEf5JwihJA/MoVU2B8PpW5uFoioeiSbwF/3u1wcENykl1khAaI6OFbc4QkAwEG+FYSvC3afvgHh0ndLcJUaXg7/SHdsKDUFyfblm1Wzbmtgw4tlwmji2fiKpOL8WPpUC0bpcCjrAUo2ZKY9k0/yebIslmy0nYDGJ1KewuCXvP8SjgN8I8XPx6X8TJEXdz3nHwjo8D6cqC0KFNbB/AG7aZ47Cz7PkqYtiomGABeMMGH9pErJsDK2FzMkmKdKpTa3rsLKPSgfVXjLq0skv/C1tGuRhzjqXzAAAAAElFTkSuQmCC) 0 0 no-repeat!important;top:50%!important;margin:-10px 0 0 -10px!important}.ui-slider-horizontal.transparency-slider .gradient{width:92%;height:100%;position:absolute;top:0;left:0;background:linear-gradient(90deg,transparent 0,#7db9e8)}.ui-slider-horizontal.linewidth-slider .ui-slider-handle,.ui-slider-horizontal.transparency-slider .ui-slider-handle{width:20px!important;height:20px!important;background:url(40566afd832a155e5e370a8bd423de4b.svg) 0 0 no-repeat!important;top:50%!important;margin:-10px 0 0 -10px!important}.ui-slider-horizontal.linewidth-slider .ui-slider-handle.without-shift-handle-left,.ui-slider-horizontal.transparency-slider .ui-slider-handle.without-shift-handle-left{margin:-10px 3px 0 -3px!important}.falling,.growing,.search-results .symbol-last.falling,.search-results .symbol-last.growing{color:#fff}.growing{background:#3cbc98}.falling{background:#ff4a68}.font-awesome{font-weight:700;font-family:FontAwesome}#chart-area .chart-promo,#chart-container .chart-promo,.tv-chart-view__chart-inner .chart-promo{display:none;position:absolute;z-index:5;bottom:55px;left:10px;width:0;height:80px;background:#fff;transition:width .5s ease-in-out}#chart-area .chart-promo.expanded,#chart-container .chart-promo.expanded,.tv-chart-view__chart-inner .chart-promo.expanded{display:block;width:330px;opacity:1}#chart-area .chart-promo a.chart-promo-link,#chart-container .chart-promo a.chart-promo-link,.tv-chart-view__chart-inner .chart-promo a.chart-promo-link{display:block;width:330px;height:80px;border:1px solid #dadee1;border-radius:4px;box-shadow:0 0 30px 0 rgba(0,0,0,.15);color:#000}#chart-area .chart-promo a.chart-promo-link .image-promo,#chart-container .chart-promo a.chart-promo-link .image-promo,.tv-chart-view__chart-inner .chart-promo a.chart-promo-link .image-promo{width:330px;height:80px}#chart-area .chart-promo a.chart-promo-link .comment,#chart-container .chart-promo a.chart-promo-link .comment,.tv-chart-view__chart-inner .chart-promo a.chart-promo-link .comment{margin-top:-2px;padding:10px 128px 10px 22px;font-size:12px;color:#555;display:block;line-height:60px}#chart-area .chart-promo a.chart-promo-link .comment .comment-alignment,#chart-container .chart-promo a.chart-promo-link .comment .comment-alignment,.tv-chart-view__chart-inner .chart-promo a.chart-promo-link .comment .comment-alignment{display:inline-block;max-height:60px;overflow:hidden;line-height:15px;white-space:pre-wrap;vertical-align:middle}#chart-area .chart-promo a.chart-promo-link .logo,#chart-container .chart-promo a.chart-promo-link .logo,.tv-chart-view__chart-inner .chart-promo a.chart-promo-link .logo{width:128px;height:80px;float:right;text-align:center;line-height:80px}#chart-area .chart-promo a.chart-promo-link .logo img,#chart-container .chart-promo a.chart-promo-link .logo img,.tv-chart-view__chart-inner .chart-promo a.chart-promo-link .logo img{max-width:85px;max-height:100%;vertical-align:middle}#chart-area .chart-promo a.remove-ad,#chart-container .chart-promo a.remove-ad,.tv-chart-view__chart-inner .chart-promo a.remove-ad{background:#ecf1f4;position:absolute;right:0;top:-18px;height:18px;line-height:18px;padding:0 11px;color:#5cbfe7;font-size:11px;border-top-right-radius:5px;border-top-left-radius:5px;opacity:.8}#chart-container .chart-promo,.tv-chart-view__chart-inner .chart-promo{bottom:30px}#myswf{position:fixed;top:0;left:0}.tv-button{position:relative;display:inline-block;vertical-align:middle;min-width:40px;margin:0;padding:1px 22px;-webkit-user-select:none;user-select:none;line-height:32px;text-align:center;white-space:nowrap;text-decoration:none;font-size:14px;color:#757575;fill:currentColor;border:none;border-radius:4px;outline:0;background-color:transparent;cursor:pointer;overflow:hidden;box-sizing:border-box;-webkit-tap-highlight-color:transparent;transition:background-color .35s ease,border-color .35s ease,color .35s ease}.tv-button.tv-button--danger_ghost,.tv-button.tv-button--default,.tv-button.tv-button--default_ghost,.tv-button.tv-button--primary_ghost,.tv-button.tv-button--secondary_ghost,.tv-button.tv-button--state,.tv-button.tv-button--success_ghost,.tv-button.tv-button--warning_ghost{padding:0 21px}.tv-button.i-active,.tv-button.i-hover,.tv-button:active{transition-duration:.06s}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button:hover{transition-duration:.06s}}.tv-button svg{vertical-align:middle}.tv-button--block{display:block;width:100%;text-align:center}.tv-button+.tv-button{margin-left:15px}.tv-button.tv-button--no-left-margin{margin-left:0}.tv-button__text{position:relative;display:inline-block}.tv-button__text--full-height{display:flex;align-items:center;justify-content:center;height:100%;width:100%;white-space:normal;word-wrap:break-word;line-height:1.2em;margin:11px 5px}.tv-button--default,.tv-button--default_ghost{color:#fff;border-color:#fff;background-color:#fff}html.theme-dark .tv-button--default,html.theme-dark .tv-button--default_ghost{background-color:#1e222d;border-color:#1e222d}.tv-button--default_ghost{color:#fff}html.theme-dark .tv-button--default_ghost{color:#1e222d}.tv-button--default_ghost.i-checked{color:#fff;border-color:#fff;background-color:#fff}html.theme-dark .tv-button--default_ghost.i-checked{background-color:#1e222d;border-color:#1e222d}.tv-button--default.i-active,.tv-button--default:active,.tv-button--default_ghost.i-active,.tv-button--default_ghost:active{color:#fff;border-color:#ececec;background-color:#ececec;transform:translateY(1px)}html.theme-dark .tv-button--default.i-active,html.theme-dark .tv-button--default:active,html.theme-dark .tv-button--default_ghost.i-active,html.theme-dark .tv-button--default_ghost:active{background-color:#1c2030;border-color:#1c2030}.tv-button--default.i-hover,.tv-button--default_ghost.i-hover{color:#fff;border-color:#f2f2f2;background-color:#f2f2f2}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--default:hover,.tv-button--default_ghost:hover{color:#fff;border-color:#f2f2f2;background-color:#f2f2f2}}html.theme-dark .tv-button--default.i-hover,html.theme-dark .tv-button--default_ghost.i-hover{background-color:#1c2030}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button--default:hover,html.theme-dark .tv-button--default_ghost:hover{background-color:#1c2030}}html.theme-dark .tv-button--default.i-hover,html.theme-dark .tv-button--default_ghost.i-hover{border-color:#1c2030}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button--default:hover,html.theme-dark .tv-button--default_ghost:hover{border-color:#1c2030}}.tv-button--default_ghost .tv-button__loader-item{background-color:#f2f2f2}html.theme-dark .tv-button--default_ghost .tv-button__loader-item{background-color:#1c2030}.tv-button--default_ghost.i-hover .tv-button__loader-item{background-color:#fff}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--default_ghost:hover .tv-button__loader-item{background-color:#fff}}.tv-button--default,.tv-button--default.i-checked,.tv-button--default_ghost,.tv-button--default_ghost.i-checked{color:#757575;border:1px solid;border-color:#b5b7b9}html.theme-dark .tv-button--default,html.theme-dark .tv-button--default.i-checked,html.theme-dark .tv-button--default_ghost,html.theme-dark .tv-button--default_ghost.i-checked{border-color:#363c4e;color:#758696}.tv-button--default.i-hover,.tv-button--default_ghost.i-hover{color:#757575;border-color:#b5b7b9}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--default:hover,.tv-button--default_ghost:hover{color:#757575;border-color:#b5b7b9}}html.theme-dark .tv-button--default.i-hover,html.theme-dark .tv-button--default_ghost.i-hover{border-color:#363c4e}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button--default:hover,html.theme-dark .tv-button--default_ghost:hover{border-color:#363c4e}}html.theme-dark .tv-button--default.i-hover,html.theme-dark .tv-button--default_ghost.i-hover{color:#758696}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button--default:hover,html.theme-dark .tv-button--default_ghost:hover{color:#758696}}.tv-button--default.i-active,.tv-button--default:active,.tv-button--default_ghost.i-active,.tv-button--default_ghost:active{color:#757575;border-color:#b5b7b9}html.theme-dark .tv-button--default.i-active,html.theme-dark .tv-button--default:active,html.theme-dark .tv-button--default_ghost.i-active,html.theme-dark .tv-button--default_ghost:active{border-color:#363c4e;color:#758696}.tv-button--primary,.tv-button--primary_ghost{color:#fff;border-color:#2196f3;background-color:#2196f3}html.theme-dark .tv-button--primary,html.theme-dark .tv-button--primary_ghost{background-color:#1976d2;border-color:#1976d2;color:#fff}.tv-button--primary_ghost{color:#2196f3}html.theme-dark .tv-button--primary_ghost{color:#1976d2}.tv-button--primary_ghost.i-checked{color:#fff;border-color:#2196f3;background-color:#2196f3}html.theme-dark .tv-button--primary_ghost.i-checked{background-color:#1976d2;border-color:#1976d2;color:#fff}.tv-button--primary.i-active,.tv-button--primary:active,.tv-button--primary_ghost.i-active,.tv-button--primary_ghost:active{color:#fff;border-color:#1e88e5;background-color:#1e88e5;transform:translateY(1px)}.tv-button--primary.i-hover,.tv-button--primary_ghost.i-hover,html.theme-dark .tv-button--primary.i-active,html.theme-dark .tv-button--primary:active,html.theme-dark .tv-button--primary_ghost.i-active,html.theme-dark .tv-button--primary_ghost:active{background-color:#1e88e5;border-color:#1e88e5;color:#fff}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--primary:hover,.tv-button--primary_ghost:hover{color:#fff;border-color:#1e88e5;background-color:#1e88e5}}html.theme-dark .tv-button--primary.i-hover,html.theme-dark .tv-button--primary_ghost.i-hover{background-color:#1e88e5}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button--primary:hover,html.theme-dark .tv-button--primary_ghost:hover{background-color:#1e88e5}}html.theme-dark .tv-button--primary.i-hover,html.theme-dark .tv-button--primary_ghost.i-hover{border-color:#1e88e5}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button--primary:hover,html.theme-dark .tv-button--primary_ghost:hover{border-color:#1e88e5}}html.theme-dark .tv-button--primary.i-hover,html.theme-dark .tv-button--primary_ghost.i-hover{color:#fff}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button--primary:hover,html.theme-dark .tv-button--primary_ghost:hover{color:#fff}}.tv-button--primary_ghost .tv-button__loader-item,html.theme-dark .tv-button--primary_ghost .tv-button__loader-item{background-color:#1e88e5}.tv-button--primary_ghost.i-hover .tv-button__loader-item{background-color:#fff}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--primary_ghost:hover .tv-button__loader-item{background-color:#fff}}html.theme-dark .tv-button--primary_ghost.i-hover .tv-button__loader-item{background-color:#fff}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button--primary_ghost:hover .tv-button__loader-item{background-color:#fff}}.tv-button--secondary,.tv-button--secondary_ghost{color:#757575;border-color:#e9eff2;background-color:#e9eff2}.tv-button--secondary_ghost{color:#757575}.tv-button--secondary_ghost.i-checked{color:#757575;border-color:#e9eff2;background-color:#e9eff2}.tv-button--secondary.i-active,.tv-button--secondary:active,.tv-button--secondary_ghost.i-active,.tv-button--secondary_ghost:active{color:#757575;border-color:#cfdce3;background-color:#cfdce3;transform:translateY(1px)}.tv-button--secondary.i-hover,.tv-button--secondary_ghost.i-hover{color:#757575;border-color:#dce6ea;background-color:#dce6ea}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--secondary:hover,.tv-button--secondary_ghost:hover{color:#757575;border-color:#dce6ea;background-color:#dce6ea}}.tv-button--secondary_ghost .tv-button__loader-item{background-color:#dce6ea}.tv-button--secondary_ghost.i-hover .tv-button__loader-item{background-color:#757575}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--secondary_ghost:hover .tv-button__loader-item{background-color:#757575}}.tv-button--success,.tv-button--success_ghost{color:#fff;border-color:#009688;background-color:#009688}html.theme-dark .tv-button--success,html.theme-dark .tv-button--success_ghost{background-color:#00796b;border-color:#00796b;color:#fff}.tv-button--success_ghost{color:#009688}html.theme-dark .tv-button--success_ghost{color:#00796b}.tv-button--success_ghost.i-checked{color:#fff;border-color:#009688;background-color:#009688}html.theme-dark .tv-button--success_ghost.i-checked{background-color:#00796b;border-color:#00796b;color:#fff}.tv-button--success.i-active,.tv-button--success:active,.tv-button--success_ghost.i-active,.tv-button--success_ghost:active{color:#fff;border-color:#00796b;background-color:#00796b;transform:translateY(1px)}html.theme-dark .tv-button--success.i-active,html.theme-dark .tv-button--success:active,html.theme-dark .tv-button--success_ghost.i-active,html.theme-dark .tv-button--success_ghost:active{background-color:#009688;border-color:#009688;color:#fff}.tv-button--success.i-hover,.tv-button--success_ghost.i-hover{color:#fff;border-color:#00897b;background-color:#00897b}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--success:hover,.tv-button--success_ghost:hover{color:#fff;border-color:#00897b;background-color:#00897b}}html.theme-dark .tv-button--success.i-hover,html.theme-dark .tv-button--success_ghost.i-hover{background-color:#00897b}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button--success:hover,html.theme-dark .tv-button--success_ghost:hover{background-color:#00897b}}html.theme-dark .tv-button--success.i-hover,html.theme-dark .tv-button--success_ghost.i-hover{border-color:#00897b}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button--success:hover,html.theme-dark .tv-button--success_ghost:hover{border-color:#00897b}}html.theme-dark .tv-button--success.i-hover,html.theme-dark .tv-button--success_ghost.i-hover{color:#fff}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button--success:hover,html.theme-dark .tv-button--success_ghost:hover{color:#fff}}.tv-button--success_ghost .tv-button__loader-item,html.theme-dark .tv-button--success_ghost .tv-button__loader-item{background-color:#00897b}.tv-button--success_ghost.i-hover .tv-button__loader-item{background-color:#fff}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--success_ghost:hover .tv-button__loader-item{background-color:#fff}}html.theme-dark .tv-button--success_ghost.i-hover .tv-button__loader-item{background-color:#fff}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button--success_ghost:hover .tv-button__loader-item{background-color:#fff}}.tv-button--danger,.tv-button--danger_ghost{color:#fff;border-color:#ef5350;background-color:#ef5350}html.theme-dark .tv-button--danger,html.theme-dark .tv-button--danger_ghost{background-color:#d32f2f;border-color:#d32f2f;color:#fff}.tv-button--danger_ghost{color:#ef5350}html.theme-dark .tv-button--danger_ghost{color:#d32f2f}.tv-button--danger_ghost.i-checked{color:#fff;border-color:#ef5350;background-color:#ef5350}html.theme-dark .tv-button--danger_ghost.i-checked{background-color:#d32f2f;border-color:#d32f2f;color:#fff}.tv-button--danger.i-active,.tv-button--danger:active,.tv-button--danger_ghost.i-active,.tv-button--danger_ghost:active{color:#fff;border-color:#d32f2f;background-color:#d32f2f;transform:translateY(1px)}html.theme-dark .tv-button--danger.i-active,html.theme-dark .tv-button--danger:active,html.theme-dark .tv-button--danger_ghost.i-active,html.theme-dark .tv-button--danger_ghost:active{background-color:#f44336;border-color:#f44336;color:#fff}.tv-button--danger.i-hover,.tv-button--danger_ghost.i-hover{color:#fff;border-color:#e53935;background-color:#e53935}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--danger:hover,.tv-button--danger_ghost:hover{color:#fff;border-color:#e53935;background-color:#e53935}}html.theme-dark .tv-button--danger.i-hover,html.theme-dark .tv-button--danger_ghost.i-hover{background-color:#e53935}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button--danger:hover,html.theme-dark .tv-button--danger_ghost:hover{background-color:#e53935}}html.theme-dark .tv-button--danger.i-hover,html.theme-dark .tv-button--danger_ghost.i-hover{border-color:#e53935}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button--danger:hover,html.theme-dark .tv-button--danger_ghost:hover{border-color:#e53935}}html.theme-dark .tv-button--danger.i-hover,html.theme-dark .tv-button--danger_ghost.i-hover{color:#fff}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button--danger:hover,html.theme-dark .tv-button--danger_ghost:hover{color:#fff}}.tv-button--danger_ghost .tv-button__loader-item,html.theme-dark .tv-button--danger_ghost .tv-button__loader-item{background-color:#e53935}.tv-button--danger_ghost.i-hover .tv-button__loader-item{background-color:#fff}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--danger_ghost:hover .tv-button__loader-item{background-color:#fff}}html.theme-dark .tv-button--danger_ghost.i-hover .tv-button__loader-item{background-color:#fff}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button--danger_ghost:hover .tv-button__loader-item{background-color:#fff}}.tv-button--warning,.tv-button--warning_ghost{color:#fff;border-color:#f89e30;background-color:#f89e30}.tv-button--warning_ghost{color:#f89e30}.tv-button--warning_ghost.i-checked{color:#fff;border-color:#f89e30;background-color:#f89e30}.tv-button--warning.i-active,.tv-button--warning:active,.tv-button--warning_ghost.i-active,.tv-button--warning_ghost:active{color:#fff;border-color:#d47807;background-color:#d47807;transform:translateY(1px)}.tv-button--warning.i-hover,.tv-button--warning_ghost.i-hover{color:#fff;border-color:#f79217;background-color:#f79217}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--warning:hover,.tv-button--warning_ghost:hover{color:#fff;border-color:#f79217;background-color:#f79217}}.tv-button--warning_ghost .tv-button__loader-item{background-color:#f79217}.tv-button--warning_ghost.i-hover .tv-button__loader-item{background-color:#fff}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--warning_ghost:hover .tv-button__loader-item{background-color:#fff}}.tv-button--link{color:#2196f3;transition:color .35s ease}html.theme-dark .tv-button--link{color:#1976d2}.tv-button--link:visited{color:#2196f3;fill:#2196f3}html.theme-dark .tv-button--link:visited{fill:#1976d2;color:#1976d2}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--link:hover{color:#1e88e5;fill:#1e88e5;transition-duration:.06s}}.tv-button--link:focus{outline:auto}.tv-button--link:focus:not(:-moz-focusring){outline:none}.tv-button--link:-moz-focusring{outline:auto}.tv-button--link:active{color:#1e88e5;fill:#1e88e5;transition-duration:.06s}.tv-button--danger_ghost,.tv-button--default_ghost,.tv-button--primary_ghost,.tv-button--secondary_ghost,.tv-button--success_ghost,.tv-button--warning_ghost{border-width:1px;border-style:solid;background-color:transparent}html.theme-dark .tv-button--danger_ghost,html.theme-dark .tv-button--default_ghost,html.theme-dark .tv-button--primary_ghost,html.theme-dark .tv-button--secondary_ghost,html.theme-dark .tv-button--success_ghost,html.theme-dark .tv-button--warning_ghost{background-color:transparent}.tv-button--danger_ghost.tv-button--size_large,.tv-button--default_ghost.tv-button--size_large,.tv-button--primary_ghost.tv-button--size_large,.tv-button--secondary_ghost.tv-button--size_large,.tv-button--success_ghost.tv-button--size_large,.tv-button--warning_ghost.tv-button--size_large{border-width:2px}.tv-button--danger_ghost.tv-button--size_large.tv-button--thin-border,.tv-button--default_ghost.tv-button--size_large.tv-button--thin-border,.tv-button--primary_ghost.tv-button--size_large.tv-button--thin-border,.tv-button--secondary_ghost.tv-button--size_large.tv-button--thin-border,.tv-button--success_ghost.tv-button--size_large.tv-button--thin-border,.tv-button--warning_ghost.tv-button--size_large.tv-button--thin-border{border-width:1px}.tv-button .tv-ripple{background-color:hsla(0,0%,100%,.25)}.tv-button--default .tv-ripple,.tv-button--default_ghost .tv-ripple{background-color:rgba(117,134,150,.25)}.tv-button.i-disabled .tv-ripple{background-color:transparent}.tv-button.i-disabled,.tv-button.i-disabled:active,.tv-button:disabled,.tv-button:disabled:active{cursor:default;color:#b2b5be;border-color:#e0e3eb;background-color:#e0e3eb}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button.i-disabled:hover,.tv-button:disabled:hover{cursor:default;color:#b2b5be;border-color:#e0e3eb;background-color:#e0e3eb}}html.theme-dark .tv-button.i-disabled,html.theme-dark .tv-button.i-disabled:active,html.theme-dark .tv-button:disabled,html.theme-dark .tv-button:disabled:active{background-color:#363a45}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button.i-disabled:hover,html.theme-dark .tv-button:disabled:hover{background-color:#363a45}}html.theme-dark .tv-button.i-disabled,html.theme-dark .tv-button.i-disabled:active,html.theme-dark .tv-button:disabled,html.theme-dark .tv-button:disabled:active{border-color:#363a45}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button.i-disabled:hover,html.theme-dark .tv-button:disabled:hover{border-color:#363a45}}html.theme-dark .tv-button.i-disabled,html.theme-dark .tv-button.i-disabled:active,html.theme-dark .tv-button:disabled,html.theme-dark .tv-button:disabled:active{color:#50535e}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button.i-disabled:hover,html.theme-dark .tv-button:disabled:hover{color:#50535e}}.tv-button.i-disabled:active,.tv-button:disabled:active{transform:translateY(0)}.tv-button--size_xsmall{padding:2px 7px;line-height:15px;border-radius:1px;font-size:11px;font-weight:400}.tv-button--size_xsmall.tv-button--danger_ghost,.tv-button--size_xsmall.tv-button--default,.tv-button--size_xsmall.tv-button--default_ghost,.tv-button--size_xsmall.tv-button--primary_ghost,.tv-button--size_xsmall.tv-button--secondary_ghost,.tv-button--size_xsmall.tv-button--state,.tv-button--size_xsmall.tv-button--success_ghost,.tv-button--size_xsmall.tv-button--warning_ghost{padding:1px 6px}.tv-button--size_xsmall+.tv-button--size_xsmall{margin-left:10px}.tv-button--size_small{padding:1px 12px;line-height:25px;font-size:13px}.tv-button--size_small.tv-button--danger_ghost,.tv-button--size_small.tv-button--default,.tv-button--size_small.tv-button--default_ghost,.tv-button--size_small.tv-button--primary_ghost,.tv-button--size_small.tv-button--secondary_ghost,.tv-button--size_small.tv-button--state,.tv-button--size_small.tv-button--success_ghost,.tv-button--size_small.tv-button--warning_ghost{padding:0 11px}.tv-button--size_small+.tv-button--size_small{margin-left:10px}.tv-button--size_large{padding:1px 30px;font-size:17px;letter-spacing:1px;line-height:44px}.tv-button--size_large.tv-button--danger_ghost,.tv-button--size_large.tv-button--default,.tv-button--size_large.tv-button--default_ghost,.tv-button--size_large.tv-button--primary_ghost,.tv-button--size_large.tv-button--secondary_ghost,.tv-button--size_large.tv-button--state,.tv-button--size_large.tv-button--success_ghost,.tv-button--size_large.tv-button--warning_ghost{padding:0 29px}.tv-button--no-padding{padding:1px}.tv-button--no-padding.tv-button--danger_ghost,.tv-button--no-padding.tv-button--default,.tv-button--no-padding.tv-button--default_ghost,.tv-button--no-padding.tv-button--primary_ghost,.tv-button--no-padding.tv-button--secondary_ghost,.tv-button--no-padding.tv-button--state,.tv-button--no-padding.tv-button--success_ghost,.tv-button--no-padding.tv-button--warning_ghost{padding:0}.tv-button--state{text-align:center;border-width:1px;border-style:solid}.tv-button--state,html.theme-dark .tv-button--state{background:transparent}.tv-button--state:after{content:"";display:inline-block}.tv-button--state__checked,.tv-button--state__uncheck-hint,.tv-button--state__unchecked{display:block;height:0;transition:opacity .2625s ease,transform .2625s ease}.tv-button--state__ellipsis-text{display:block;white-space:nowrap;text-overflow:ellipsis;overflow-x:hidden}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--state.i-checked:hover .tv-button--state__checked,.tv-button--state.i-checked:hover .tv-button--state__uncheck-hint,.tv-button--state.i-checked:hover .tv-button--state__unchecked{will-change:opacity,transform}}.tv-button--state.i-checked .tv-button--state__unchecked,.tv-button--state__checked,.tv-button--state__uncheck-hint{opacity:0}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--state.i-checked:hover .tv-button--state__checked{opacity:0}}.tv-button--state.i-checked .tv-button--state__checked,.tv-button--state__unchecked{opacity:1}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--state.i-checked:hover .tv-button--state__uncheck-hint{opacity:1}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--state.i-checked:hover .tv-button--state__checked{transform:translateY(-5px)}}.tv-button--state.i-checked .tv-button--state__unchecked,.tv-button--state__checked,.tv-button--state__uncheck-hint{transform:translateY(5px)}.tv-button--state.i-checked .tv-button--state__checked{transform:translateY(0)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--state.i-checked:hover .tv-button--state__uncheck-hint{transform:translateY(0)}}.tv-button--state.tv-button--success{color:#009688;background-color:transparent}html.theme-dark .tv-button--state.tv-button--success{background-color:transparent;color:#00796b}.tv-button--state.tv-button--success.i-checked{color:#fff;background-color:#009688}html.theme-dark .tv-button--state.tv-button--success.i-checked{background-color:#00796b;color:#fff}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--state.tv-button--success:hover{color:#fff;background-color:#00897b}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button--state.tv-button--success:hover{background-color:#00897b;color:#fff}}.tv-button--state.tv-button--success:active{color:#fff;background-color:#00796b}html.theme-dark .tv-button--state.tv-button--success:active{background-color:#009688;color:#fff}.tv-button--state.tv-button--danger{color:#ef5350;background-color:transparent}html.theme-dark .tv-button--state.tv-button--danger{background-color:transparent;color:#d32f2f}.tv-button--state.tv-button--danger.i-checked{color:#fff;background-color:#ff4a68}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--state.tv-button--danger:hover{color:#fff;background-color:#f24965}}.tv-button--state.tv-button--danger:active{color:#fff;background-color:#ff173e}.tv-button--state.tv-button--primary{color:#2196f3;background-color:transparent}html.theme-dark .tv-button--state.tv-button--primary{background-color:transparent;color:#1976d2}.tv-button--state.tv-button--primary.i-checked{color:#fff;background-color:#2196f3}html.theme-dark .tv-button--state.tv-button--primary.i-checked{background-color:#1976d2;color:#fff}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--state.tv-button--primary:hover{color:#fff;background-color:#1e88e5}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button--state.tv-button--primary:hover{background-color:#1e88e5;color:#fff}}.tv-button--state.tv-button--primary:active{color:#fff;background-color:#1e88e5}html.theme-dark .tv-button--state.tv-button--primary:active{background-color:#1e88e5;color:#fff}.tv-button--state.tv-button--primary_ghost-hover.i-checked{color:#2196f3;background-color:transparent}html.theme-dark .tv-button--state.tv-button--primary_ghost-hover.i-checked{background-color:transparent;color:#1976d2}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--state.tv-button--primary_ghost-hover:hover{color:#fff;background-color:#1e88e5}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button--state.tv-button--primary_ghost-hover:hover{background-color:#1e88e5;color:#fff}}.tv-button--state.tv-button--primary_ghost-hover:active{color:#fff;background-color:#1e88e5}html.theme-dark .tv-button--state.tv-button--primary_ghost-hover:active{background-color:#1e88e5;color:#fff}.tv-button--state.tv-button--secondary{color:#757575;background-color:transparent}.tv-button--state.tv-button--secondary.i-checked{color:#757575;background-color:#e9eff2}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--state.tv-button--secondary:hover{color:#757575;background-color:#dce6ea}}.tv-button--state.tv-button--secondary:active{color:#757575;background-color:#cfdce3}.tv-button--state.tv-button--warning{color:#f89e30;background-color:transparent}.tv-button--state.tv-button--warning.i-checked{color:#fff;background-color:#f89e30}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--state.tv-button--warning:hover{color:#fff;background-color:#f79217}}.tv-button--state.tv-button--warning:active{color:#fff;background-color:#d47807}.tv-button--state.tv-button--icon-with-text svg{margin-right:8px;margin-bottom:-8px;vertical-align:unset}.tv-button--icon{display:inline-flex;align-items:center;justify-content:center;padding:0!important;min-width:auto;width:34px;height:34px}.tv-button--icon.tv-button--size_xsmall{width:19px;height:19px}.tv-button--icon.tv-button--size_small{width:27px;height:27px}.tv-button--icon.tv-button--size_large{width:46px;height:46px}.tv-button--loader .tv-button__text{transition:opacity .175s ease,transform .175s ease}.tv-button--loader.i-start-load .tv-button__text{opacity:0;transform:translateY(-5px)}.tv-button--loader.i-loading .tv-button__text{opacity:0;transform:translateY(5px)}.tv-button--loader.i-stop-load .tv-button__text{opacity:1;transform:translateY(0);transition-delay:.175s}.tv-button__loader{position:absolute;top:0;left:0;right:0;bottom:0;height:100%;margin:0 auto;text-align:center;font-size:0;opacity:0;transition:opacity .35s ease}.tv-button__loader:after{content:"";display:inline-block;height:100%;vertical-align:middle}.tv-button--loader.i-loading .tv-button__loader,.tv-button--loader.i-start-load .tv-button__loader{opacity:1}.tv-button--loader.i-stop-load .tv-button__loader{opacity:0}.tv-button__loader-item{margin-right:2px;margin-left:2px;display:inline-block;vertical-align:middle;width:10px;height:10px;opacity:0;border-radius:100%;background-color:#fff;transform:translateY(12px) scale(.6);transition:transform .35s cubic-bezier(.68,-.55,.265,1.55),opacity .35s ease}.tv-button__loader-item:nth-child(2){transition-delay:.11666667s}.tv-button__loader-item:nth-child(3){transition-delay:.23333333s}.tv-button--default .tv-button__loader-item{background-color:#757575}.tv-button--loader.i-loading .tv-button__loader-item,.tv-button--loader.i-start-load .tv-button__loader-item{opacity:1}.tv-button--loader.i-stop-load .tv-button__loader-item{opacity:0}.tv-button--loader.i-loading .tv-button__loader-item,.tv-button--loader.i-start-load .tv-button__loader-item,.tv-button--loader.i-stop-load .tv-button__loader-item{transform:translateY(0) scale(.6)}.tv-button--loader.i-loading .tv-button__loader-item,.tv-button--loader.i-stop-load .tv-button__loader-item{animation:tv-button-loader .96s infinite ease-in-out both}.tv-button--loader.i-loading .tv-button__loader-item:nth-child(2),.tv-button--loader.i-stop-load .tv-button__loader-item:nth-child(2){animation-delay:.151s}.tv-button--loader.i-loading .tv-button__loader-item:nth-child(3),.tv-button--loader.i-stop-load .tv-button__loader-item:nth-child(3){animation-delay:.32s}.tv-button--no-border-radius{border-radius:0}.tv-button--no-border{border:none}.tv-button--connect{border-radius:0}.tv-button--connect_left{border-top-left-radius:0;border-bottom-left-radius:0}.tv-button--connect_right{border-top-right-radius:0;border-bottom-right-radius:0}@keyframes tv-button-loader{0%,to{transform:scale(.6)}50%{transform:scale(.9)}}.tv-control-input{display:block;padding:0 12px;width:100%;height:34px;font-size:13px;color:#4a4a4a;border:1px solid #dadde0;background-color:#fff;border-radius:2px;box-sizing:border-box;-webkit-tap-highlight-color:transparent;transition:border-color .35s ease,background-color .35s ease;-webkit-appearance:none;-moz-appearance:none;appearance:none}html.theme-dark .tv-control-input{background-color:#1e222d;border-color:#363c4e;color:#c5cbce}.tv-control-input::placeholder{color:#adaeb0;opacity:1}html.theme-dark .tv-control-input::placeholder{color:#4f5966}.tv-control-input:-webkit-autofill{-webkit-text-fill-color:#535353!important;box-shadow:inset 0 0 0 1000px #fff!important}.tv-control-input--size_xsmall{height:19px}.tv-control-input--size_small{height:27px}.tv-control-input--size_large{height:48px;font-size:16px}.tv-control-input--connect{border-left:0;border-right:0;border-radius:0}.tv-control-input--connect_left{border-left:none;border-top-left-radius:0;border-bottom-left-radius:0}.tv-control-input--connect_right{border-right:none;border-top-right-radius:0;border-bottom-right-radius:0}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-control-input:hover{border-color:#c8c8c8;transition-duration:.06s}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-control-input:hover{border-color:#4c525e}}.tv-control-input:focus{border-color:#2196f3!important;transition-duration:.06s}.tv-control-input[readonly]{color:#8a8a8a;border-color:#dadde0}.tv-control-input[readonly]:focus{border-color:#ececec!important}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-control-input[readonly]:hover{border-color:#ececec!important}}html.theme-dark .tv-control-input[readonly]:focus{border-color:#262b3e!important}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-control-input[readonly]:hover{border-color:#262b3e!important}}.tv-control-input--readonly_dark,.tv-control-input--readonly_dark[readonly]{color:#555}html.theme-dark .tv-control-input--readonly_dark,html.theme-dark .tv-control-input--readonly_dark[readonly]{color:#4c525e}.tv-control-input.i-disabled,.tv-control-input[disabled]{color:#ececec!important;border-color:#ececec!important}html.theme-dark .tv-control-input.i-disabled,html.theme-dark .tv-control-input[disabled]{border-color:#262b3e!important;color:#262b3e!important}.tv-control-input.i-disabled::placeholder,.tv-control-input[disabled]::placeholder{color:#ececec!important}html.theme-dark .tv-control-input.i-disabled::placeholder,html.theme-dark .tv-control-input[disabled]::placeholder{color:#262b3e!important}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-control-input.i-disabled:hover,.tv-control-input[disabled]:hover{border-color:#ececec!important}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-control-input.i-disabled:hover,html.theme-dark .tv-control-input[disabled]:hover{border-color:#262b3e!important}}.tv-control-input.i-error{border-color:#ff4a68!important}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-control-input.i-error:hover{border-color:#f24965!important}}.tv-control-input.i-error:focus{border-color:#ff173e!important}.tv-control-input.i-success{border-color:#009688!important}html.theme-dark .tv-control-input.i-success{border-color:#00796b!important}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-control-input.i-success:hover,html.theme-dark .tv-control-input.i-success:hover{border-color:#00897b!important}}.tv-control-input.i-success:active,.tv-control-input.i-success:focus{border-color:#00796b!important}html.theme-dark .tv-control-input.i-success:active,html.theme-dark .tv-control-input.i-success:focus{border-color:#009688!important}.tv-control-input--phone{direction:ltr;text-align:left}.tv-control-input--file{display:none}body,html{background:none;overflow:hidden;height:100%;width:100%}body{min-width:240px}#library-container{border:1px solid #d9dadb;background:#fff}#library-container #showExtendedHoursLink{display:none}.on-widget .open-popup{margin-left:4px;padding:7px;border-width:0!important;border:none;background:#6798bb}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.on-widget .open-popup:hover{background:#69a3cc}}.on-widget .open-popup:active{background:#71acd6}.on-widget .open-popup svg{display:block;width:16px;height:14px;fill:#fff}.on-widget .widgetbar-widget-hotlist .widgetbar-widgetheader .widgetbar-headerspace{display:none}.text .logo-highlighted{font-weight:700;text-decoration:underline}.on-cme-widget .symbol-edit-popup .filter,.on-cme-widget .symbol-search-dialog .filter{display:none}.on-cme-widget .symbol-search-dialog .results{height:450px}.load-chart .chart-search,.load-chart .chart-search input{width:100%}.properties-tabs-label{margin-right:30px}@media only screen and (max-width:750px){.charts-popup-list .item.save-load-chart-title{display:block}}.charts-popup-list .item .title,.charts-popup-list .item .title-expanded{width:auto}.common-tooltip-s2GEoMlT{display:inline-flex;position:fixed;color:#f0f3fa;font-size:12px;line-height:18px;opacity:1;transition:opacity .15s linear;z-index:1000;pointer-events:none}.common-tooltip--hidden-Z0EAvXgv{opacity:0}.common-tooltip--horizontal-13imOC5w{margin:4px 0}.common-tooltip--horizontal-13imOC5w.common-tooltip--farther-2yXMAkHF{margin:8px 0}.common-tooltip--vertical-mcRoucek{margin:0 4px}.common-tooltip--vertical-mcRoucek.common-tooltip-farther-XoKytD99{margin:0 8px}.common-tooltip--no-pointer-events-3nL0Vygu{pointer-events:none}.common-tooltip--no-pointer-events-3nL0Vygu.common-tooltip--horizontal-13imOC5w{margin:8px 0}.common-tooltip--no-pointer-events-3nL0Vygu.common-tooltip--vertical-mcRoucek{margin:0 8px}.common-tooltip--no-pointer-events-3nL0Vygu.common-tooltip--horizontal-13imOC5w.common-tooltip--farther-2yXMAkHF{margin:14px 0}.common-tooltip--no-pointer-events-3nL0Vygu.common-tooltip--vertical-mcRoucek.common-tooltip--farther-2yXMAkHF{margin:0 14px}.common-tooltip--direction_normal-3u9ejKM2{flex-direction:row}.common-tooltip--direction_normal-3u9ejKM2 .common-tooltip__body-356XFpBj{border-top-left-radius:2px;border-bottom-left-radius:2px}.common-tooltip--direction_normal-3u9ejKM2 .common-tooltip__body--no-buttons-3quqi1Sv,.common-tooltip--direction_normal-3u9ejKM2 .common-tooltip__button-container-3EjyKV3s{border-top-right-radius:2px;border-bottom-right-radius:2px}.common-tooltip--direction_normal-3u9ejKM2 .common-tooltip__button-1rnQgujz:not(:last-child){margin-right:1px}.common-tooltip--direction_reversed-XN-JUTdr{flex-direction:row-reverse}.common-tooltip--direction_reversed-XN-JUTdr .common-tooltip__body-356XFpBj{border-top-right-radius:2px;border-bottom-right-radius:2px}.common-tooltip--direction_reversed-XN-JUTdr .common-tooltip__body--no-buttons-3quqi1Sv,.common-tooltip--direction_reversed-XN-JUTdr .common-tooltip__button-container-3EjyKV3s{border-top-left-radius:2px;border-bottom-left-radius:2px}.common-tooltip--direction_reversed-XN-JUTdr .common-tooltip__button-1rnQgujz:not(:first-child){margin-left:1px}.common-tooltip__ear-holder-yIJjpvgu{position:relative}.common-tooltip__ear-holder-yIJjpvgu:after{content:"";display:block;position:absolute;box-sizing:border-box;width:0;height:0;border:0 solid;border-color:#2a2e39}html.theme-dark .common-tooltip__ear-holder-yIJjpvgu:after{border-color:#50535e}.common-tooltip__ear-holder--above-1D8FkNkw:after,.common-tooltip__ear-holder--below-1rmzWejA:after{left:50%;margin-left:-6px;border-left:6px solid;border-left-color:transparent;border-right:6px solid;border-right-color:transparent}html.theme-dark .common-tooltip__ear-holder--above-1D8FkNkw:after,html.theme-dark .common-tooltip__ear-holder--below-1rmzWejA:after{border-right-color:transparent;border-left-color:transparent}.common-tooltip__ear-holder--below-1rmzWejA:after{bottom:100%;border-bottom-width:4px}.common-tooltip__ear-holder--above-1D8FkNkw:after{top:100%;border-top-width:4px}.common-tooltip__ear-holder--after-BnAcuW1N:after,.common-tooltip__ear-holder--before-oXq5sFXr:after{top:50%;margin-top:-6px;border-top:6px solid;border-top-color:transparent;border-bottom:6px solid;border-bottom-color:transparent}html.theme-dark .common-tooltip__ear-holder--after-BnAcuW1N:after,html.theme-dark .common-tooltip__ear-holder--before-oXq5sFXr:after{border-bottom-color:transparent;border-top-color:transparent}.common-tooltip__ear-holder--before-oXq5sFXr:after{right:100%;border-right-width:4px}.common-tooltip__ear-holder--after-BnAcuW1N:after{left:100%;border-left-width:4px}.common-tooltip__body-356XFpBj{display:block;position:relative;box-sizing:border-box;padding:3px 8px;max-width:320px;background-color:#2a2e39;white-space:pre-wrap;word-wrap:break-word;text-align:left;overflow:hidden}html.theme-dark .common-tooltip__body-356XFpBj{background-color:#50535e}.common-tooltip__body--with-hotkey-2wXRtgYZ{display:flex;max-width:420px;padding:0}.common-tooltip__body--width_wide-3oG604Li{max-width:640px}.common-tooltip__body--width_narrow-34hrFTFo{max-width:200px}.common-tooltip__body--no-padding-2vVe6Xco{padding:0}.common-tooltip__hotkey-block-2gS_uAOl{display:inline-flex;flex:1 0 auto;padding:4px 8px 5px;line-height:12px;align-items:center;justify-content:center;color:#ff9800}.common-tooltip__hotkey-block--divider-rQ38KmpQ{border-left:1px solid #5d606b;margin-left:8px}html.theme-dark .common-tooltip__hotkey-block--divider-rQ38KmpQ{border-left:1px solid #363a45}.common-tooltip__hotkey-text-1eb7dyCg{display:inline-flex;align-items:center;margin:3px 0 3px 8px}.common-tooltip__hotkey-button-1XJ40e4D{display:inline-flex;justify-content:center;align-items:center;height:13px;min-width:7px;padding:0 3px;border:1px solid;border-radius:2px}.common-tooltip__plus-sign-3CKSupKp{width:13px;height:15px;line-height:16px;text-align:center}.common-tooltip__button-container-3EjyKV3s{display:flex;position:relative;overflow:hidden}.common-tooltip__button-1rnQgujz{display:flex;color:#fff;background-color:#2196f3;padding:0 10px;align-items:center}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.common-tooltip__button-1rnQgujz:hover{background-color:#1592e6}}.common-tooltip-s2GEoMlT.theme-white{color:#131722}html.theme-dark .common-tooltip-s2GEoMlT.theme-white{color:#d1d4dc}.common-tooltip-s2GEoMlT.theme-white .common-tooltip__body-356XFpBj{background-color:#fff;border-radius:0}html.theme-dark .common-tooltip-s2GEoMlT.theme-white .common-tooltip__body-356XFpBj{background-color:#1e222d}.common-tooltip-s2GEoMlT.theme-white .common-tooltip__ear-holder-yIJjpvgu{border:1px solid #dadde0}html.theme-dark .common-tooltip-s2GEoMlT.theme-white .common-tooltip__ear-holder-yIJjpvgu{border:1px solid #363c4e}.common-tooltip-s2GEoMlT.theme-white .common-tooltip__ear-holder-yIJjpvgu:after{border-color:#fff}html.theme-dark .common-tooltip-s2GEoMlT.theme-white .common-tooltip__ear-holder-yIJjpvgu:after{border-color:#1e222d}.common-tooltip-s2GEoMlT.theme-white .common-tooltip__ear-holder--above-1D8FkNkw:after,.common-tooltip-s2GEoMlT.theme-white .common-tooltip__ear-holder--below-1rmzWejA:after{border-left:6px solid;border-left-color:transparent;border-right:6px solid;border-right-color:transparent}html.theme-dark .common-tooltip-s2GEoMlT.theme-white .common-tooltip__ear-holder--above-1D8FkNkw:after,html.theme-dark .common-tooltip-s2GEoMlT.theme-white .common-tooltip__ear-holder--below-1rmzWejA:after{border-right-color:transparent;border-left-color:transparent}.common-tooltip-s2GEoMlT.theme-white .common-tooltip__ear-holder--after-BnAcuW1N:after,.common-tooltip-s2GEoMlT.theme-white .common-tooltip__ear-holder--before-oXq5sFXr:after{border-top:6px solid;border-top-color:transparent;border-bottom:6px solid;border-bottom-color:transparent}html.theme-dark .common-tooltip-s2GEoMlT.theme-white .common-tooltip__ear-holder--after-BnAcuW1N:after,html.theme-dark .common-tooltip-s2GEoMlT.theme-white .common-tooltip__ear-holder--before-oXq5sFXr:after{border-bottom-color:transparent;border-top-color:transparent}.common-tooltip-s2GEoMlT.theme-white .common-tooltip__ear-holder-yIJjpvgu:before{content:"";display:block;position:absolute;z-index:1000;width:0;height:0;border:0 solid;border-color:#dadde0}html.theme-dark .common-tooltip-s2GEoMlT.theme-white .common-tooltip__ear-holder-yIJjpvgu:before{border-color:#363c4e}.common-tooltip-s2GEoMlT.theme-white .common-tooltip__ear-holder--above-1D8FkNkw:before,.common-tooltip-s2GEoMlT.theme-white .common-tooltip__ear-holder--below-1rmzWejA:before{left:50%;margin-left:-7px;border-left:7px solid;border-left-color:transparent;border-right:7px solid;border-right-color:transparent}html.theme-dark .common-tooltip-s2GEoMlT.theme-white .common-tooltip__ear-holder--above-1D8FkNkw:before,html.theme-dark .common-tooltip-s2GEoMlT.theme-white .common-tooltip__ear-holder--below-1rmzWejA:before{border-right-color:transparent;border-left-color:transparent}.common-tooltip-s2GEoMlT.theme-white .common-tooltip__ear-holder--below-1rmzWejA:before{top:-6px;border-bottom-width:6px}.common-tooltip-s2GEoMlT.theme-white .common-tooltip__ear-holder--above-1D8FkNkw:before{bottom:-6px;border-top-width:6px}.common-tooltip-s2GEoMlT.theme-white .common-tooltip__ear-holder--after-BnAcuW1N:before,.common-tooltip-s2GEoMlT.theme-white .common-tooltip__ear-holder--before-oXq5sFXr:before{top:50%;margin-top:-7px;border-top:7px solid;border-top-color:transparent;border-bottom:7px solid;border-bottom-color:transparent}html.theme-dark .common-tooltip-s2GEoMlT.theme-white .common-tooltip__ear-holder--after-BnAcuW1N:before,html.theme-dark .common-tooltip-s2GEoMlT.theme-white .common-tooltip__ear-holder--before-oXq5sFXr:before{border-bottom-color:transparent;border-top-color:transparent}.common-tooltip-s2GEoMlT.theme-white .common-tooltip__ear-holder--before-oXq5sFXr:before{left:-6px;border-right-width:6px}.common-tooltip-s2GEoMlT.theme-white .common-tooltip__ear-holder--after-BnAcuW1N:before{right:-6px;border-left-width:6px}.common-tooltip-s2GEoMlT.theme-round-shadow{color:#131722;box-shadow:0 1px 3px 0 rgba(42,44,57,.29)}html.theme-dark .common-tooltip-s2GEoMlT.theme-round-shadow{color:#d1d4dc}.common-tooltip-s2GEoMlT.theme-round-shadow .common-tooltip__body-356XFpBj{background-color:#fff}html.theme-dark .common-tooltip-s2GEoMlT.theme-round-shadow .common-tooltip__body-356XFpBj{background-color:#1e222d}.common-tooltip-s2GEoMlT.theme-round-shadow .common-tooltip__ear-holder-yIJjpvgu:after{border-color:#fff}html.theme-dark .common-tooltip-s2GEoMlT.theme-round-shadow .common-tooltip__ear-holder-yIJjpvgu:after{border-color:#1e222d}.common-tooltip-s2GEoMlT.theme-round-shadow .common-tooltip__ear-holder--above-1D8FkNkw:after,.common-tooltip-s2GEoMlT.theme-round-shadow .common-tooltip__ear-holder--below-1rmzWejA:after{border-left:6px solid;border-left-color:transparent;border-right:6px solid;border-right-color:transparent}html.theme-dark .common-tooltip-s2GEoMlT.theme-round-shadow .common-tooltip__ear-holder--above-1D8FkNkw:after,html.theme-dark .common-tooltip-s2GEoMlT.theme-round-shadow .common-tooltip__ear-holder--below-1rmzWejA:after{border-right-color:transparent;border-left-color:transparent}.common-tooltip-s2GEoMlT.theme-round-shadow .common-tooltip__ear-holder--after-BnAcuW1N:after,.common-tooltip-s2GEoMlT.theme-round-shadow .common-tooltip__ear-holder--before-oXq5sFXr:after{border-top:6px solid;border-top-color:transparent;border-bottom:6px solid;border-bottom-color:transparent}html.theme-dark .common-tooltip-s2GEoMlT.theme-round-shadow .common-tooltip__ear-holder--after-BnAcuW1N:after,html.theme-dark .common-tooltip-s2GEoMlT.theme-round-shadow .common-tooltip__ear-holder--before-oXq5sFXr:after{border-bottom-color:transparent;border-top-color:transparent}.container-2BvS3Fpg{width:100%;height:100%;box-sizing:border-box;background-color:#e0e3eb}html.theme-dark .container-2BvS3Fpg{background-color:#2a2e39}.container-2BvS3Fpg .inner-3YzQuyJx{width:100%;height:100%;background-color:#fff}html.theme-dark .container-2BvS3Fpg .inner-3YzQuyJx{background-color:#131722}.container-2BvS3Fpg.border-left-LYAXTdyL{padding-left:4px}.container-2BvS3Fpg.border-right-OzIcepiV{padding-right:4px}.container-2BvS3Fpg.border-top-193CSDqN{padding-top:4px}.container-2BvS3Fpg.border-bottom-2lZASSTD{padding-bottom:4px}.container-2BvS3Fpg.top-right-radius-FE25nrPp .inner-3YzQuyJx{border-top-right-radius:0}.container-2BvS3Fpg.top-left-radius-1ELOZlIb .inner-3YzQuyJx{border-top-left-radius:0}.container-2BvS3Fpg.bottom-right-radius-7zqIiaLN .inner-3YzQuyJx{border-bottom-right-radius:0}.container-2BvS3Fpg.bottom-left-radius-xCxQ998i .inner-3YzQuyJx{border-bottom-left-radius:0}.tv-rename-chart-dialog__field{font-size:13px;display:block}.tv-rename-chart-dialog__field:not(:last-child){margin-bottom:13px}.tv-rename-chart-dialog__label{display:inline-block;margin-bottom:10px}.tv-rename-chart-dialog__label a{color:#2196f3;transition:color .35s ease}html.theme-dark .tv-rename-chart-dialog__label a{color:#1976d2}.tv-rename-chart-dialog__label a:visited{color:#2196f3;fill:#2196f3}html.theme-dark .tv-rename-chart-dialog__label a:visited{fill:#1976d2;color:#1976d2}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-rename-chart-dialog__label a:hover{color:#1e88e5;fill:#1e88e5;transition-duration:.06s}}.tv-rename-chart-dialog__label a:focus{outline:auto}.tv-rename-chart-dialog__label a:focus:not(:-moz-focusring){outline:none}.tv-rename-chart-dialog__label a:-moz-focusring{outline:auto}.tv-rename-chart-dialog__label a:active{color:#1e88e5;fill:#1e88e5;transition-duration:.06s}.tv-rename-chart-dialog__hint{width:16px;height:16px;vertical-align:middle;display:inline-block;margin-left:5px}.tv-rename-chart-dialog__hint:before{filter:invert(50%);content:url(70464b308617ebaa2bc504b4a50c3463.svg)}.tv-exit-fullscreen-button{z-index:16;position:fixed;top:-1px;left:50%;opacity:.6;background:#fff;color:#848487;border-radius:0 0 3px 3px;border:1px solid #c9cbcd;font-size:11px;width:116px;font-weight:700;padding:2px 4px;cursor:default;margin:0 0 0 -59px}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-exit-fullscreen-button:hover{opacity:1}}button,html input[type=button],input[type=reset],input[type=submit]{cursor:default}.chart-widget{position:absolute;border-style:none;left:0;top:0;width:512px;height:256px;margin:0;padding:0;box-sizing:border-box;overflow:hidden}.chart-header{background-color:#fff;border-bottom:1px solid gray;color:#fff}table.chart-markup-table{border:none;border-collapse:collapse;border-spacing:0;line-height:0;margin:0;padding:0}.chart-markup-table tr{margin:0;padding:0}td.chart-markup-table{border:none;text-align:left;vertical-align:top;line-height:0;margin:0;padding:0}.chart-gui-wrapper{width:100%;height:100%;max-width:100%;max-height:100%;position:relative;overflow:hidden;display:flex;align-items:flex-start;direction:ltr}.chart-data-window{position:absolute;width:100%;box-sizing:border-box;border-collapse:collapse;margin:0;padding:0;background-color:#fff;text-align:left;color:#4a4a4a}html.theme-dark .chart-data-window{color:#c5cbce;background-color:#131722}.chart-data-window .box{margin:3px}.chart-data-window .box.with-actions{cursor:pointer}.chart-data-window .box:first-child .chart-data-window-header:first-child{margin-top:0}.chart-data-window .hover .chart-data-window-header .hover-source-icon{display:block}.chart-data-window .active{border-left:2px solid #528cde}.chart-data-window .active .chart-data-window-header{background:#e9f8ff}.chart-data-window .active .chart-data-window-header,.chart-data-window .active .chart-data-window-item .chart-data-window-item-title{padding-left:8px}.chart-data-window .active .chart-data-window-item{font-weight:700}.chart-data-window .hidden{opacity:.3}.chart-data-window .hidden .chart-data-window-item{display:none}.chart-data-window .chart-data-window-header,.chart-data-window .chart-data-window-item{margin-bottom:3px;position:relative}.chart-data-window .chart-data-window-header{padding:9px 10px;background:#f1f3f6;font-weight:700;font-size:12px}html.theme-dark .chart-data-window .chart-data-window-header{background:#262b3e}.chart-data-window .chart-data-window-header .toggle-source-icon{display:block;position:absolute;right:14px;top:11px;width:16px;height:10px}.chart-data-window .chart-data-window-header .toggle-source-icon svg{display:block;width:16px;height:10px;fill:#7d7d7d}html.theme-dark .chart-data-window .chart-data-window-header .toggle-source-icon svg{fill:#758696}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.chart-data-window .chart-data-window-header .toggle-source-icon:hover svg{fill:#2196f3!important}}.chart-data-window .chart-data-window-header .hover-source-icon{display:none;position:absolute;right:40px;top:11px;width:10px;height:10px;border-radius:10px;background:#2196f3}.chart-data-window .chart-data-window-item:last-child{margin-bottom:0}.chart-data-window .chart-data-window-item .chart-data-window-item-title,.chart-data-window .chart-data-window-item .chart-data-window-item-value{width:50%;box-sizing:border-box;padding:4px 10px;display:inline-block;white-space:nowrap}.chart-data-window .chart-data-window-item .chart-data-window-item-title .real-color,.chart-data-window .chart-data-window-item .chart-data-window-item-value .real-color{display:inline-block;width:15px;height:8px;margin-right:15px;border:1px dotted #ccc;cursor:help}.chart-data-window .chart-data-window-item .chart-data-window-item-value{text-align:right}.property-page{color:#4a4a4a;position:relative}html.theme-dark .property-page{color:#c5cbce}.property-page td{white-space:nowrap;padding:3px 4px;height:27px}.property-page td:empty{padding:0}.property-page td:first-child{padding-left:0}.property-page td:last-child{padding-right:0}.property-page.study-properties,.property-page.study-strategy-properties{margin-top:10px}.property-page.study-strategy-properties tr.disabled label{color:#999}.property-page input[type=checkbox]{margin:3px .5ex}.property-page-bandwidth{margin-left:8px;width:55px;vertical-align:middle}.property-page input[type=checkbox]{vertical-align:middle}.property-page td:first-child input[type=checkbox]{margin-left:0}.property-page .tv-text-input{height:25px}.propertypage-name-label{text-transform:capitalize}.properties-tabs{padding:0 25px}.properties-tabs a.properties-tabs-label{padding:0;margin-left:45px;display:inline-block;position:relative;color:#4f5966}html.theme-dark .properties-tabs a.properties-tabs-label{color:#f7f8fa}.properties-tabs a.properties-tabs-label.active{font-weight:700}.properties-tabs a.properties-tabs-label.active:after{content:" ";position:absolute;display:block;bottom:-1px;width:100%;height:3px;background-color:#5cb888}.properties-tabs a.properties-tabs-label.with-filter{padding-bottom:16px}.properties-tabs a.properties-tabs-label:first-child{margin-left:0}.properties-tabs a.properties-tabs-label:last-child{margin-right:40px}.chart-loading-screen{position:absolute;top:0;left:0;width:0;height:0;z-index:4}.chart-loading-screen .chart-loading-screen-shield{width:100%;height:100%;opacity:0;background:red}.chart-loading-screen.fade{width:100%;height:100%}.chart-loading-screen.fade .chart-loading-screen-shield{opacity:.5;transition:opacity .3s ease}.properties-tabs .help{width:15px;height:15px;background:url(180acc64d47073cae241f54fe1659797.png);float:right;margin:1px 10px 0 0}.bar-mark-tooltip{display:none;position:absolute;z-index:14;padding:8px 10px 8px 8px;background:hsla(0,0%,100%,.9);min-height:18px;border:1px solid;border-color:gray}html.theme-dark .bar-mark-tooltip{background:rgba(19,23,34,.9)}.bar-mark-tooltip .text{padding-left:4px;padding-top:2px;max-width:250px;overflow:hidden;text-overflow:ellipsis;display:inline-block;font-size:13px;line-height:13px}.published-charts-tooltip{display:none;position:absolute;z-index:7;padding:8px 30px 8px 8px;background:hsla(0,0%,100%,.9);border:1px solid;height:32px;cursor:default;margin-top:-25px}html.theme-dark .published-charts-tooltip{background:rgba(19,23,34,.9)}.published-charts-tooltip .avatar{position:absolute;top:8px;left:8px;width:32px;height:32px}.published-charts-tooltip .avatar img{width:32px;height:32px}.published-charts-tooltip .pin{background-image:url(7393f661fc7d4389ea6d4dabd2a5aeea.png);width:16px;height:16px;vertical-align:top;position:absolute;top:9px;right:9px;cursor:pointer}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.published-charts-tooltip .pin:hover{background-position:32px 0}}.published-charts-tooltip .pin.pinned{background-position:16px 0}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.published-charts-tooltip .pin.pinned:hover{background-position:16px 0}}.published-charts-tooltip .text{padding-left:39px;max-width:250px;cursor:pointer;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:inline-block;font-size:13px;line-height:15px;color:#4a4a4a;font-weight:700}html.theme-dark .published-charts-tooltip .text{color:#8b8f95}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.published-charts-tooltip .text:hover{text-decoration:underline}}.published-charts-tooltip .username{font-size:11px;color:#8f8f8f;font-weight:400;padding-top:2px;padding-left:39px;white-space:nowrap;line-height:13px}.published-charts-tooltip:after,.published-charts-tooltip:before{left:100%;border:solid transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none}.published-charts-tooltip:after{border-width:1em;top:50%;margin-top:-1em}.published-charts-tooltip:before{border-width:1.1em;top:50%;margin-top:-1.1em}.published-charts-tooltip:not(.right):after{border-color:hsla(0,0%,100%,0);border-left-color:#fff}html.theme-dark .published-charts-tooltip:not(.right):after{border-left-color:#131722}.published-charts-tooltip.right:after{border-color:hsla(0,0%,100%,0);border-right-color:#fff}html.theme-dark .published-charts-tooltip.right:after{border-right-color:#131722}.published-charts-tooltip.right:before{left:-2.2em}.published-charts-tooltip.right:after{left:-2em}.published-charts-tooltip.green{border-color:#78c143}.published-charts-tooltip.red{border-color:#cc4545}.published-charts-tooltip.neutral{border-color:#eac300}.published-charts-tooltip.green:before{border-color:rgba(120,193,67,0);border-left-color:#78c143}.published-charts-tooltip.red:before{border-color:rgba(204,69,69,0);border-left-color:#cc4545}.published-charts-tooltip.neutral:before{border-color:rgba(234,195,0,0);border-left-color:#eac300}.published-charts-tooltip.green.right:before{border-color:rgba(120,193,67,0);border-right-color:#78c143}.published-charts-tooltip.red.right:before{border-color:rgba(204,69,69,0);border-right-color:#cc4545}.published-charts-tooltip.neutral.right:before{border-color:rgba(234,195,0,0);border-right-color:#eac300}.chart-controls-bar{position:absolute;contain:strict;height:39px;box-sizing:border-box;overflow:hidden;border-top:1px solid;border-color:var(--tv-color-platform-background,#e0e3eb);border-radius:0 0 4px 4px;background-color:var(--tv-color-pane-background,#fff)}html.theme-dark .chart-controls-bar{background-color:var(--tv-color-pane-background,#131722);border-color:var(--tv-color-platform-background,#2a2e39)}.no-border-bottom-left-radius .chart-controls-bar{border-bottom-left-radius:0}.no-border-bottom-right-radius .chart-controls-bar{border-bottom-right-radius:0}.charts-popup-list.date-range-popupmenu{margin-left:1px}.charts-popup-list.date-range-popupmenu .item{padding-left:10px;padding-right:10px}@font-face{font-family:FontAwesome;src:url(40f9a03d174178efb12303caa9bc7cd8.woff2) format("woff2"),url(3293616ec0c605c7c2db25829a0a509e.woff) format("woff");font-weight:400;font-style:normal}.ui-draggable{touch-action:none}.chart-gui-button-pseudo-border{content:"";display:block;position:absolute;top:-1px;left:-1px;width:100%;height:100%;border:1px solid;border-color:#b5b7b9;background:transparent;z-index:1}html.theme-dark .chart-gui-button-pseudo-border{border-color:#4c525e}._tv-dialog .button,._tv-dialog .submenu,.bottom-widgetbar-content.backtesting .button,.bottom-widgetbar-content.backtesting .submenu,.properties-toolbar .button,.properties-toolbar .submenu,.widgetbar-widgetheader .button,.widgetbar-widgetheader .submenu{position:relative}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){._tv-dialog .button:not(.disabled):not(.selected):hover:before,._tv-dialog .submenu:not(.disabled):not(.selected):hover:before,.bottom-widgetbar-content.backtesting .button:not(.disabled):not(.selected):hover:before,.bottom-widgetbar-content.backtesting .submenu:not(.disabled):not(.selected):hover:before,.properties-toolbar .button:not(.disabled):not(.selected):hover:before,.properties-toolbar .submenu:not(.disabled):not(.selected):hover:before,.widgetbar-widgetheader .button:not(.disabled):not(.selected):hover:before,.widgetbar-widgetheader .submenu:not(.disabled):not(.selected):hover:before{content:"";display:block;position:absolute;top:-1px;left:-1px;width:100%;height:100%;border:1px solid;border-color:#b5b7b9;background:transparent;z-index:1}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark ._tv-dialog .button:not(.disabled):not(.selected):hover:before,html.theme-dark ._tv-dialog .submenu:not(.disabled):not(.selected):hover:before,html.theme-dark .bottom-widgetbar-content.backtesting .button:not(.disabled):not(.selected):hover:before,html.theme-dark .bottom-widgetbar-content.backtesting .submenu:not(.disabled):not(.selected):hover:before,html.theme-dark .properties-toolbar .button:not(.disabled):not(.selected):hover:before,html.theme-dark .properties-toolbar .submenu:not(.disabled):not(.selected):hover:before,html.theme-dark .widgetbar-widgetheader .button:not(.disabled):not(.selected):hover:before,html.theme-dark .widgetbar-widgetheader .submenu:not(.disabled):not(.selected):hover:before{border-color:#4c525e}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){._tv-dialog .tv-select-container:not(.sbHolderDisabled):hover,.bottom-widgetbar-content.backtesting .tv-select-container:not(.sbHolderDisabled):hover,.properties-toolbar .tv-select-container:not(.sbHolderDisabled):hover,.widgetbar-widgetheader .tv-select-container:not(.sbHolderDisabled):hover{border:1px solid;border-color:#b5b7b9}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark ._tv-dialog .tv-select-container:not(.sbHolderDisabled):hover,html.theme-dark .bottom-widgetbar-content.backtesting .tv-select-container:not(.sbHolderDisabled):hover,html.theme-dark .properties-toolbar .tv-select-container:not(.sbHolderDisabled):hover,html.theme-dark .widgetbar-widgetheader .tv-select-container:not(.sbHolderDisabled):hover{border-color:#4c525e}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.widgetbar-widgetheader .button:hover{border:1px solid;border-color:#f7f8fa}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .widgetbar-widgetheader .button:hover{border-color:#4c525e}}.pane{overflow:hidden;cursor:crosshair}.pane--cursor-pointer{cursor:pointer}.pane--cursor-eraser{cursor:url(0579d40b812fa2c3ffe72e5803a6e14c.cur),default}.pane--cursor-dot{cursor:url(ed68e83c16f77203e73dbc4c3a7c7fa1.cur),default}.pane--cursor-default{cursor:default}.pane--cursor-grabbing{cursor:grabbing}.pane--cursor-zoom-in{cursor:zoom-in}.pane--cursor-ew-resize{cursor:ew-resize}.pane--cursor-ns-resize{cursor:ns-resize}.pane--cursor-nwse-resize{cursor:nwse-resize}.pane--cursor-nesw-resize{cursor:nesw-resize}.price-axis-stub-3MoqVLRB .wrapper-1tN_aWXZ{position:absolute;width:100%;height:100%;display:flex;align-items:center;justify-content:center}.price-axis-stub-3MoqVLRB .wrapper-1tN_aWXZ .label-NpaJWak6{display:inline-block;position:relative;width:19px;height:19px;border-radius:50%;background-color:rgba(224,227,235,.5);transform-origin:bottom;z-index:2}.price-axis-stub-3MoqVLRB .wrapper-1tN_aWXZ .label-NpaJWak6 .symbol-2JyFiLZ_{position:absolute;pointer-events:false;opacity:1;z-index:2;color:#50535e;top:50%;bottom:50%;width:100%;text-align:center;font-size:11px}html.theme-dark .price-axis-stub-3MoqVLRB .wrapper-1tN_aWXZ .label-NpaJWak6 .symbol-2JyFiLZ_{color:#50535e}.price-axis-stub-3MoqVLRB .wrapper-1tN_aWXZ .label-NpaJWak6 .gear-3B_8TAjc{position:absolute;pointer-events:false;opacity:0;z-index:3;height:15px;top:2px;left:2px}.price-axis-stub-3MoqVLRB .wrapper-1tN_aWXZ .label-NpaJWak6 .gear-3B_8TAjc svg,html.theme-dark .price-axis-stub-3MoqVLRB .wrapper-1tN_aWXZ .label-NpaJWak6 .gear-3B_8TAjc svg{fill:#131722}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.price-axis-stub-3MoqVLRB:hover .wrapper-1tN_aWXZ .label-NpaJWak6{background-color:rgba(224,227,235,0)}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.price-axis-stub-3MoqVLRB:hover .wrapper-1tN_aWXZ .label-NpaJWak6 .gear-3B_8TAjc{opacity:1}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.price-axis-stub-3MoqVLRB:hover .wrapper-1tN_aWXZ .label-NpaJWak6 .gear-3B_8TAjc svg,html.theme-dark .price-axis-stub-3MoqVLRB:hover .wrapper-1tN_aWXZ .label-NpaJWak6 .gear-3B_8TAjc svg{fill:#000}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.price-axis-stub-3MoqVLRB:hover .wrapper-1tN_aWXZ .label-NpaJWak6 .symbol-2JyFiLZ_{opacity:0}}.price-axis-stub-3MoqVLRB.fixed-gear-IiZPkpoQ .wrapper-1tN_aWXZ .label-NpaJWak6{background-color:transparent}.price-axis-stub-3MoqVLRB.fixed-gear-IiZPkpoQ .wrapper-1tN_aWXZ .label-NpaJWak6 .symbol-2JyFiLZ_{opacity:0}.price-axis-stub-3MoqVLRB.fixed-gear-IiZPkpoQ .wrapper-1tN_aWXZ .label-NpaJWak6 .gear-3B_8TAjc{opacity:1}.price-axis-stub-3MoqVLRB.fixed-symbol-2A_FZK26 .wrapper-1tN_aWXZ .label-NpaJWak6{background-color:rgba(224,227,235,.5)}.price-axis-stub-3MoqVLRB.fixed-symbol-2A_FZK26 .wrapper-1tN_aWXZ .label-NpaJWak6 .gear-3B_8TAjc{opacity:0}.price-axis-stub-3MoqVLRB.fixed-symbol-2A_FZK26 .wrapper-1tN_aWXZ .label-NpaJWak6 .symbol-2JyFiLZ_{opacity:1}.chart-widget__bottom--themed-dark .price-axis-stub-3MoqVLRB .wrapper-1tN_aWXZ .label-NpaJWak6{background-color:rgba(42,46,57,.5)}.chart-widget__bottom--themed-dark .price-axis-stub-3MoqVLRB .wrapper-1tN_aWXZ .label-NpaJWak6 .symbol-2JyFiLZ_,html.theme-dark .chart-widget__bottom--themed-dark .price-axis-stub-3MoqVLRB .wrapper-1tN_aWXZ .label-NpaJWak6 .symbol-2JyFiLZ_{color:#787b86}.chart-widget__bottom--themed-dark .price-axis-stub-3MoqVLRB .wrapper-1tN_aWXZ .label-NpaJWak6 .gear-3B_8TAjc svg,html.theme-dark .chart-widget__bottom--themed-dark .price-axis-stub-3MoqVLRB .wrapper-1tN_aWXZ .label-NpaJWak6 .gear-3B_8TAjc svg{fill:#787b86}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.chart-widget__bottom--themed-dark .price-axis-stub-3MoqVLRB:hover .wrapper-1tN_aWXZ .label-NpaJWak6{background-color:rgba(42,46,57,0)}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.chart-widget__bottom--themed-dark .price-axis-stub-3MoqVLRB:hover .wrapper-1tN_aWXZ .label-NpaJWak6 .gear-3B_8TAjc svg,html.theme-dark .chart-widget__bottom--themed-dark .price-axis-stub-3MoqVLRB:hover .wrapper-1tN_aWXZ .label-NpaJWak6 .gear-3B_8TAjc svg{fill:#9598a1}}.chart-widget__bottom--themed-dark .price-axis-stub-3MoqVLRB.fixed-symbol-2A_FZK26 .wrapper-1tN_aWXZ .label-NpaJWak6{background-color:rgba(42,46,57,.5)}.chart-widget__bottom--themed-dark .price-axis-stub-3MoqVLRB.fixed-gear-IiZPkpoQ .wrapper-1tN_aWXZ .label-NpaJWak6{background-color:transparent}.price-axis{position:absolute;cursor:default;height:100%;overflow:hidden}.price-axis--cursor-grabbing{cursor:grabbing}.price-axis--cursor-pointer{cursor:pointer}.price-axis--cursor-ns-resize{cursor:ns-resize}.price-axis-currency-label-wrapper-opoVZ91E{position:absolute;-webkit-user-select:none;user-select:none;width:100%;text-align:center;z-index:3;left:0;top:6px}.price-axis-currency-label-1aGvtcW9{display:inline-block;padding:0 2px 0 4px;border-radius:4px;white-space:nowrap;border:1px solid #d1d4dc}.price-axis-currency-label-1aGvtcW9.readonly-OYsh-rpT{padding:0 4px}.price-axis-currency-label-arrow-down-243KKK5C svg{vertical-align:middle;margin-bottom:2px;margin-left:2px}.chart-widget__top--themed-dark .price-axis-currency-label-1aGvtcW9{border-color:#363a45}.pane-separator{position:relative;padding:0;margin:0}.pane-separator .handle{position:absolute;z-index:50;top:-4px;height:9px;left:0;width:100%;cursor:row-resize}.pane-separator .handle.i-active{background:hsla(225,8%,72%,.2)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.pane-separator .handle:hover{background:hsla(225,8%,72%,.2)}}.chart-widget--themed-dark .pane-separator .handle.i-active{background:hsla(225,8%,72%,.12)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.chart-widget--themed-dark .pane-separator .handle:hover{background:hsla(225,8%,72%,.12)}}.pane-separator .handle.i-active:before{content:"";position:fixed;top:0;left:0;width:100%;height:100%;background:hsla(225,8%,72%,.01);opacity:0}.time-axis{cursor:default}.time-axis--cursor-grabbing{cursor:grabbing}.time-axis--cursor-ew-resize{cursor:ew-resize}.tv-spinner{display:none;position:absolute;width:1em;height:1em;top:calc(50% - .5em);left:calc(50% - .5em);margin:0 auto;color:#37a6ef;animation:tv-spinner__container-rotate .9s linear infinite;will-change:transform;direction:ltr}.tv-spinner--size_mini{font-size:16px}.tv-spinner--size_medium{font-size:32px}.tv-spinner--size_large{font-size:56px}.tv-spinner--size_mini .tv-spinner__width_element:after{border-width:2px}.tv-spinner--size_medium .tv-spinner__width_element:after{border-width:3px}.tv-spinner--size_large .tv-spinner__width_element:after{border-width:4px}.tv-spinner--shown{display:block}.tv-spinner__spinner-layer{position:absolute;width:100%;height:100%;white-space:nowrap;color:currentColor;transform:rotate(90deg)}.tv-spinner__spinner-layer:after{content:"";position:absolute;box-sizing:border-box;top:0;border-width:.07em;border-radius:50%;left:45%;width:10%;border-top-style:solid}.tv-spinner__background{display:inline-block;position:absolute;width:100%;height:100%;overflow:hidden}.tv-spinner__background:after{content:"";position:absolute;box-sizing:border-box;top:0;left:0;border-radius:50%;bottom:0;width:100%;border-color:rgba(135,151,165,.2);border-style:solid}.tv-spinner__circle-clipper{display:inline-block;position:relative;width:50%;height:100%;overflow:hidden}.tv-spinner__circle-clipper:after{content:"";position:absolute;box-sizing:border-box;top:0;border-radius:50%;bottom:0;width:200%;border-style:solid;border-bottom-color:transparent;animation-duration:1.4s;animation-timing-function:cubic-bezier(.36,0,.37,.99);animation-iteration-count:1;will-change:transform}.tv-spinner__circle-clipper--left:after{left:0;border-right-color:transparent;transform:rotate(0deg);animation-name:tv-spinner__left-spin}.tv-spinner__circle-clipper--right:after{left:-100%;border-left-color:transparent;transform:rotate(-124deg);animation-name:tv-spinner__right-spin}@keyframes tv-spinner__container-rotate{to{transform:rotate(1turn)}}@keyframes tv-spinner__left-spin{0%{transform:rotate(130deg)}to{transform:rotate(0deg)}}@keyframes tv-spinner__right-spin{0%{transform:rotate(-130deg)}to{transform:rotate(-124deg)}}.tv-chart-events-source__tooltip{z-index:7;pointer-events:none}.tv-chart-events-source__tooltip--clickable{pointer-events:all}.tv-chart-events-source__tooltip__content{font-size:9pt;line-height:normal;cursor:default}.tv-chart-events-source__tooltip__item{margin-top:6pt;border:0;border-left:6px solid #ffc84a;border-radius:2px;background:#fff;padding:15px 20px;box-shadow:0 2px 7px rgba(0,0,0,.25);color:#131722}html.theme-dark .tv-chart-events-source__tooltip__item{color:#d1d4dc;box-shadow:0 2px 7px rgba(107,121,136,.25);background:#131722}.tv-chart-events-source__tooltip__item.tv-chart-events-source__tooltip__item--importance-normal{background:#fff;border-left-color:#f89e30}.tv-chart-events-source__tooltip__item.tv-chart-events-source__tooltip__item--importance-high{background:#fff;border-left-color:#ff4a68}.tv-chart-events-source__tooltip__item.tv-chart-events-source__tooltip__item--importance-earnings{background:#fff;border-left-color:#ff4d6a}.tv-chart-events-source__tooltip__item.tv-chart-events-source__tooltip__item--importance-splits{background:#fff;border-left-color:#007f0e}.tv-chart-events-source__tooltip__item.tv-chart-events-source__tooltip__item--importance-dividends{background:#fff;border-left-color:#0496ff}.tv-chart-events-source__tooltip__item.tv-chart-events-source__tooltip__item--importance-none{border-left-width:1px;border-left-color:#dadde0}html.theme-dark .tv-chart-events-source__tooltip__item.tv-chart-events-source__tooltip__item--importance-none{border-left-color:#363c4e}.tv-chart-events-source__tooltip__item.tv-chart-events-source__tooltip__item--importance-list{border-left-width:1px;border-left-color:#dadde0;padding:15px 20px 15px 25px;font-size:10pt}html.theme-dark .tv-chart-events-source__tooltip__item.tv-chart-events-source__tooltip__item--importance-list{border-left-color:#363c4e}.tv-chart-events-source__tooltip__item.tv-chart-events-source__tooltip__item--importance-list dl:before{margin-right:5px;position:absolute;left:15px}.tv-chart-events-source__tooltip__item.tv-chart-events-source__tooltip__item--importance-list dl.list-item:not(:first-child){margin-top:12px}.tv-chart-events-source__tooltip__item.tv-chart-events-source__tooltip__item--importance-list dl.list-item:before{content:"\2022"}.tv-chart-events-source__tooltip__item.tv-chart-events-source__tooltip__item--importance-list h2{font-size:10pt}.tv-chart-events-source__tooltip__item dl{margin:0;line-height:1.5}.tv-chart-events-source__tooltip__item dl.actual{color:#000}html.theme-dark .tv-chart-events-source__tooltip__item dl.actual{color:#9db2bd}.tv-chart-events-source__tooltip__item dd,.tv-chart-events-source__tooltip__item dt{margin:0;display:inline}.tv-chart-events-source__tooltip__item h2{font-size:10pt;margin:0 0 4pt}.tv-chart-events-source__tooltip__item a,.tv-chart-events-source__tooltip__item a:active,.tv-chart-events-source__tooltip__item a:visited{color:#2196f3;cursor:pointer}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-chart-events-source__tooltip__item a:hover{color:#2196f3;cursor:pointer}}table.tv-chart-events-table{margin-top:4pt}table.tv-chart-events-table td,table.tv-chart-events-table th{width:33%;line-height:1.5}table.tv-chart-events-table th{color:#5d606b;font-weight:400}html.theme-dark table.tv-chart-events-table th{color:#9598a1}table.tv-chart-events-table td{font-weight:700}table.tv-chart-events-table td:not(:last-child),table.tv-chart-events-table th:not(:last-child){padding-right:7pt}.tv-chart-events-tooltip-date{line-height:1!important} \ No newline at end of file diff --git a/public/charting_library/bundles/library.c9ed08366453322ce64f.rtl.css b/public/charting_library/bundles/library.c9ed08366453322ce64f.rtl.css new file mode 100644 index 00000000..03bbff45 --- /dev/null +++ b/public/charting_library/bundles/library.c9ed08366453322ce64f.rtl.css @@ -0,0 +1 @@ +html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body,dir,h1,h2,h3,h4,h5,h6,html,li,menu,ol,p,ul{margin:0;padding:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent;text-decoration:none}a:active{outline:0}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){a:hover{outline:0}}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{font-size:2em}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.25em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}svg use{pointer-events:none}figure{margin:0}hr{box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:none;margin:0;padding:0}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}.tv-text ol,.tv-text p,.tv-text ul{font-size:14px;margin-bottom:12px;line-height:1.6;color:#131722}html.theme-dark .tv-text ol,html.theme-dark .tv-text p,html.theme-dark .tv-text ul{color:#d1d4dc}.tv-text ol.tv-text__color_bright,.tv-text p.tv-text__color_bright,.tv-text ul.tv-text__color_bright{color:#fff}.tv-text ol.tv-text__color_silver,.tv-text p.tv-text__color_silver,.tv-text ul.tv-text__color_silver{color:silver}.tv-text ol.tv-text__color_silver_30,.tv-text p.tv-text__color_silver_30,.tv-text ul.tv-text__color_silver_30{color:#9b9b9b}.tv-text ol.tv-text__paragraph--additional-top-margin,.tv-text p.tv-text__paragraph--additional-top-margin,.tv-text ul.tv-text__paragraph--additional-top-margin{margin-top:24px}.tv-text ol.tv-text__paragraph--additional-top-margin_double,.tv-text p.tv-text__paragraph--additional-top-margin_double,.tv-text ul.tv-text__paragraph--additional-top-margin_double{margin-top:48px}.tv-text ol.tv-text__paragraph--additional-bottom-margin,.tv-text p.tv-text__paragraph--additional-bottom-margin,.tv-text ul.tv-text__paragraph--additional-bottom-margin{margin-bottom:24px}.tv-text ol.tv-text__paragraph--additional-bottom-margin_double,.tv-text p.tv-text__paragraph--additional-bottom-margin_double,.tv-text ul.tv-text__paragraph--additional-bottom-margin_double{margin-bottom:48px}.tv-text ol .tv-text--highlight-important,.tv-text p .tv-text--highlight-important,.tv-text ul .tv-text--highlight-important{box-shadow:0 0 0 .37em #fff2cf;background:#fff2cf}html.theme-dark .tv-text ol .tv-text--highlight-important,html.theme-dark .tv-text p .tv-text--highlight-important,html.theme-dark .tv-text ul .tv-text--highlight-important{background:#194453;box-shadow:0 0 0 .37em #194453}.tv-text ol .tv-text--highlight-important:empty,.tv-text p .tv-text--highlight-important:empty,.tv-text ul .tv-text--highlight-important:empty{background:transparent;box-shadow:none}.tv-text h1{font-size:45px;margin-bottom:30px;margin-top:30px}@media screen and (max-width:1019px){.tv-text h1{font-size:38px}}@media screen and (max-width:767px){.tv-text h1{font-size:32px}}@media screen and (max-width:479px){.tv-text h1{font-size:28px}}.tv-text h2{font-size:31px}@media screen and (max-width:1019px){.tv-text h2{font-size:26px}}@media screen and (max-width:479px){.tv-text h2{font-size:24px}}.tv-text h3{font-size:17px}@media screen and (max-width:1019px){.tv-text h3{font-size:16px}}.tv-text h4{font-size:15px}.tv-text h2,.tv-text h3,.tv-text h4{margin-bottom:20px;margin-top:20px}.tv-text h1:first-child,.tv-text h2:first-child,.tv-text h3:first-child,.tv-text h4:first-child{margin-top:0}.tv-text ol,.tv-text ul{list-style-position:inside}.tv-text--position-outside ol,.tv-text--position-outside ul{list-style-position:outside;padding-right:17px}.tv-text a:not(.tv-badge):not(.tv-button){color:#2196f3;transition:color .35s ease}html.theme-dark .tv-text a:not(.tv-badge):not(.tv-button){color:#1976d2}.tv-text a:not(.tv-badge):not(.tv-button):visited{color:#2196f3;fill:#2196f3}html.theme-dark .tv-text a:not(.tv-badge):not(.tv-button):visited{fill:#1976d2;color:#1976d2}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-text a:not(.tv-badge):not(.tv-button):hover{color:#1e88e5;fill:#1e88e5;transition-duration:.06s}}.tv-text a:not(.tv-badge):not(.tv-button):focus{outline:auto}.tv-text a:not(.tv-badge):not(.tv-button):focus:not(:-moz-focusring){outline:none}.tv-text a:not(.tv-badge):not(.tv-button):-moz-focusring{outline:auto}.tv-text a:not(.tv-badge):not(.tv-button):active{color:#1e88e5;fill:#1e88e5;transition-duration:.06s}.tv-text__font.tv-text__font--size_semilarge{font-size:15px}@media screen and (max-width:767px){.tv-text__font.tv-text__font--size_semilarge{font-size:14px}}.tv-text__font.tv-text__font--size_large{font-size:17px}@media screen and (max-width:767px){.tv-text__font.tv-text__font--size_large{font-size:16px}}.tv-text__font.tv-text__font--size_xlarge{font-size:19px}@media screen and (max-width:767px){.tv-text__font.tv-text__font--size_xlarge{font-size:18px}}.tv-text__font--bold{font-weight:700}.tv-text__font--italic{font-style:italic}.tv-text--darkbg,.tv-text--darkbg ol,.tv-text--darkbg p,.tv-text--darkbg ul{color:#fff}.tv-text--highlight-important{box-shadow:0 0 0 .07em #fff2cf;background:#fff2cf}html.theme-dark .tv-text--highlight-important{background:#194453;box-shadow:0 0 0 .07em #194453}.tv-text--highlight-important:empty{background:transparent;box-shadow:none}.symbol-change-direction.up{color:#3cbc98}.symbol-change-direction.down{color:#ff4a68}.js-hidden{display:none!important}.js-no-pointer-events{pointer-events:none!important}body{min-width:320px;box-sizing:border-box;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-tap-highlight-color:transparent}body.i-no-scroll{overflow:hidden!important}body.i-no-padding{padding:0!important}::selection{background:rgba(216,240,250,.6)}html.theme-dark ::selection{background:rgba(117,134,150,.6)}.i-hidden{display:none!important}.i-invisible{visibility:hidden!important}.i-clearfix:after{clear:both;display:table;content:""}.i-align_left{text-align:right!important}.i-align_right{text-align:left!important}.i-align_center{text-align:center!important}.i-float_left{float:right!important}.i-float_right{float:left!important}.i-float_none{float:none!important}@media screen and (min-width:1020px){.i-device-only{display:none!important}}@media screen and (max-width:1019px){.i-desktop-only{display:none!important}}@media screen and (min-width:479px){.i-phones-only{display:none!important}}@media screen and (max-width:479px){.i-except-phones-only{display:none!important}}.i-no-break{white-space:nowrap}body.fullscreen-mode{overflow:hidden}.tv-layout-width{width:1020px;margin:0 auto;padding:0 20px;box-sizing:border-box}.tv-layout-width--no-padding{padding:0;width:980px}.tv-layout-width--simple{padding:0}.tv-dialog .tv-layout-width{max-width:100%}.chart-page .tv-layout-width{width:100%}@media screen and (max-width:1019px){.tv-layout-width{width:auto}.tv-layout-width .tv-feed{margin-right:-20px;margin-left:-20px}.tv-layout-width .tv-feed--tablet-top-indent{margin-top:48px}}.tv-layout-padding{padding:0 20px}body.page-wide .tv-layout-width,body.popup-wide .fancybox-overlay .tv-layout-width{width:1520px}.tv-main,body.page-fullwidth .tv-layout-width{width:100%}.tv-main{display:flex;flex-direction:column;min-height:100%}.tv-side-toolbar{float:right;position:static;height:100%;overflow-x:visible;overflow-y:hidden}.tv-main-panel{position:relative;background-color:#f1f3f6;overflow:hidden}.tv-side-panel{float:left;position:relative;z-index:15;height:100%}.tv-panels{height:100%}.chart-page .tv-content{padding:0}.clear{clear:both}.clearfix:after{clear:both;display:block;content:""}.hide{display:none!important}.show{display:block!important}.tv-right{float:left!important}.tv-left{float:right!important}#_atssh{position:absolute;margin-top:-20px}.js-right-boundary{margin-left:0}.icon{display:inline-block;background:url(1df47f578aeef40dd1f2328338a133be.png) 100% 0 no-repeat;position:relative;vertical-align:middle}.ticker-text{background:#f2f5f8;width:30px!important;text-align:center}textarea.tv-textarea{color:#5a5a5a;margin:0;border:1px solid #c9cbcd;padding:0 5px}.selectable,body,html,input,textarea{font-family:Trebuchet MS,roboto,ubuntu,sans-serif}body,html{color:#4a4a4a;font-size:14px;height:100%!important}html.theme-dark body,html.theme-dark html{color:#c5cbce}body.font-VI-lang-safe,html.font-VI-lang-safe body{font-family:Arial,sans-serif}body{background-color:#fff;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}html.theme-dark body{background-color:#131722}body.tv-body--bg_superdark,html.theme-dark body.tv-body--bg_superdark{background:#131722}body.tv-body--bg_contrast{background-color:#fff}html.theme-dark body.tv-body--bg_contrast{background-color:#1e222d}body.extension{min-width:0;overflow:hidden}img{border:none}textarea{resize:none}:focus{outline:none}input::-ms-clear{display:none}input,textarea{border-radius:0}.tv-profile .tags,.unselectable{-webkit-user-select:none;user-select:none}.selectable,input,textarea{-webkit-user-select:text;user-select:text}.font-VI-lang-safe .selectable,.font-VI-lang-safe input,.font-VI-lang-safe textarea{font-family:Arial,sans-serif}.text-center{text-align:center}#footer{background:#dbdbdb;color:#626262;border-top:1px solid #999;height:24px;font-size:small}#chart-area{background:transparent}#chart-area,.chart-container{position:relative}#chart-area.fullscreen{position:fixed;z-index:15;right:0;top:0;width:100%!important;height:100%!important}.chart-page{background-color:var(--tv-color-platform-background,#e0e3eb)}html.theme-dark .chart-page{background-color:var(--tv-color-platform-background,#2a2e39)}.chart-page .chart-container{position:relative;contain:strict}.chart-page .chart-container-border{position:relative;height:100%;width:100%;overflow:hidden;border:none;background-color:#fff;z-index:0}html.theme-dark .chart-page .chart-container-border{background-color:#131722}.chart-page .chart-container.multiple.active:after{content:"";display:block;position:absolute;pointer-events:none;box-sizing:border-box;top:0;bottom:0;right:0;left:0;border:2px solid;border-color:#2196f3}html.theme-dark .chart-page .chart-container.multiple.active:after{border-color:#1976d2}.chart-page .chart-container.inactive .back-to-present{display:none}.chart-page .chart-container.no-header-toolbar .chart-container-border{border-top-right-radius:4px;border-top-left-radius:4px}.chart-page .chart-container.no-bottom-toolbar .chart-container-border{border-bottom-right-radius:4px;border-bottom-left-radius:4px}.ui-tabs .ui-tabs-nav li a{font-size:x-small}.input-reset{width:16px;height:16px;position:absolute;top:7px;left:7px;cursor:pointer;display:none;border-radius:50%}.input-reset:before{content:" ";display:block;width:10px;height:10px;background:url(1df47f578aeef40dd1f2328338a133be.png) no-repeat -103px -340px;position:absolute;top:50%;right:50%;margin:-5px -5px 0 0}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.input-reset:hover{background-color:#f2f5f8}}.input-reset:active{opacity:.6}.loading-indicator{width:100%;height:100%;position:absolute;top:0;right:0;z-index:150;background:#fff}html.theme-dark .loading-indicator{background:#131722}.loading-indicator img{position:absolute;top:50%;right:50%;margin:-58px -58px 0 0}.loading-indicator img.small{margin:-12px -12px 0 0}.ui-slider-horizontal{margin:7px 0 0;background-color:#f4f7f9;border:1px solid!important;border-color:#c9cbcd!important;height:5px!important;box-shadow:inset 0 1px 2px rgba(0,0,0,.15)}html.theme-dark .ui-slider-horizontal{border-color:#2f3241!important;background-color:#171b29}.ui-slider-handle{width:15px!important;height:15px!important;background:url(1df47f578aeef40dd1f2328338a133be.png) -20px -80px!important;border:none!important;top:-5px!important;margin-right:-7px!important}.ui-slider-horizontal.linewidth-slider{width:101px;margin:7px 10px;background:url(4a9abefd31dab7c8239e02e925aacd78.png) 100% 0 no-repeat!important;height:12px!important;border:none!important;box-shadow:none;display:inline-block;vertical-align:middle}.ui-slider-horizontal.linewidth-slider:after,.ui-slider-horizontal.linewidth-slider:before{content:none}.ui-slider-horizontal.transparency-slider{width:99px;height:8px!important;margin:7px 10px;background:url(7e0cc5f7d7f5151500dd60b8d6ca60a1.png)!important}.ui-slider-horizontal.transparency-slider.wide-slider{width:176px;margin:7px 1px}.slider-range{width:155px;height:5px!important;background:#fafafa;position:relative;top:1px;right:0!important;margin-right:15px;margin-left:15px;margin-top:0!important}.slider-range .ui-slider-range{top:0!important;height:5px!important}.slider-range .ui-slider-handle,.slider-range .ui-slider-horizontal.transparency-slider .ui-slider-handle{width:20px!important;height:20px!important;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAABvElEQVR42r1U2U7CUBD1D9V36oP4R/AHrmFRChFsQSExKihtFB804oOJLAXKcllEifU6pwkEuYVQH2hykpuZOZNZTmdtZV+11vDk8gWfnEgrh+GEBsjxtHJ9e++rGA1p6USs29tQzq9294OnL4QWYUj4BvCGDT7EMNbbWJisVm9uByJKlggsJCctrfDMS4bJO70P3uoO7Dds8CEGscTxzqtsPXCi3KCKi8s73mJ9PhqNHAEfYij2kzhZ4oqVpjJZtNmhwB+QlsA4KUP7MwswPZhLUFatRZWJlQ44OOD+WVROe/Rh2PmHJwS6gkYc4rZJEf5JwihJA/MoVU2B8PpW5uFoioeiSbwF/3u1wcENykl1khAaI6OFbc4QkAwEG+FYSvC3afvgHh0ndLcJUaXg7/SHdsKDUFyfblm1Wzbmtgw4tlwmji2fiKpOL8WPpUC0bpcCjrAUo2ZKY9k0/yebIslmy0nYDGJ1KewuCXvP8SjgN8I8XPx6X8TJEXdz3nHwjo8D6cqC0KFNbB/AG7aZ47Cz7PkqYtiomGABeMMGH9pErJsDK2FzMkmKdKpTa3rsLKPSgfVXjLq0skv/C1tGuRhzjqXzAAAAAElFTkSuQmCC) 100% 0 no-repeat!important;top:50%!important;margin:-10px -10px 0 0!important}.ui-slider-horizontal.transparency-slider .gradient{width:92%;height:100%;position:absolute;top:0;left:0;background:linear-gradient(270deg,transparent 0,#7db9e8)}.ui-slider-horizontal.linewidth-slider .ui-slider-handle,.ui-slider-horizontal.transparency-slider .ui-slider-handle{width:20px!important;height:20px!important;background:url(40566afd832a155e5e370a8bd423de4b.svg) 100% 0 no-repeat!important;top:50%!important;margin:-10px 0 0 -10px!important}.ui-slider-horizontal.linewidth-slider .ui-slider-handle.without-shift-handle-left,.ui-slider-horizontal.transparency-slider .ui-slider-handle.without-shift-handle-left{margin:-10px 3px 0 -3px!important}.falling,.growing,.search-results .symbol-last.falling,.search-results .symbol-last.growing{color:#fff}.growing{background:#3cbc98}.falling{background:#ff4a68}.font-awesome{font-weight:700;font-family:FontAwesome}#chart-area .chart-promo,#chart-container .chart-promo,.tv-chart-view__chart-inner .chart-promo{display:none;position:absolute;z-index:5;bottom:55px;right:10px;width:0;height:80px;background:#fff;transition:width .5s ease-in-out}#chart-area .chart-promo.expanded,#chart-container .chart-promo.expanded,.tv-chart-view__chart-inner .chart-promo.expanded{display:block;width:330px;opacity:1}#chart-area .chart-promo a.chart-promo-link,#chart-container .chart-promo a.chart-promo-link,.tv-chart-view__chart-inner .chart-promo a.chart-promo-link{display:block;width:330px;height:80px;border:1px solid #dadee1;border-radius:4px;box-shadow:0 0 30px 0 rgba(0,0,0,.15);color:#000}#chart-area .chart-promo a.chart-promo-link .image-promo,#chart-container .chart-promo a.chart-promo-link .image-promo,.tv-chart-view__chart-inner .chart-promo a.chart-promo-link .image-promo{width:330px;height:80px}#chart-area .chart-promo a.chart-promo-link .comment,#chart-container .chart-promo a.chart-promo-link .comment,.tv-chart-view__chart-inner .chart-promo a.chart-promo-link .comment{margin-top:-2px;padding:10px 22px 10px 128px;font-size:12px;color:#555;display:block;line-height:60px}#chart-area .chart-promo a.chart-promo-link .comment .comment-alignment,#chart-container .chart-promo a.chart-promo-link .comment .comment-alignment,.tv-chart-view__chart-inner .chart-promo a.chart-promo-link .comment .comment-alignment{display:inline-block;max-height:60px;overflow:hidden;line-height:15px;white-space:pre-wrap;vertical-align:middle}#chart-area .chart-promo a.chart-promo-link .logo,#chart-container .chart-promo a.chart-promo-link .logo,.tv-chart-view__chart-inner .chart-promo a.chart-promo-link .logo{width:128px;height:80px;float:left;text-align:center;line-height:80px}#chart-area .chart-promo a.chart-promo-link .logo img,#chart-container .chart-promo a.chart-promo-link .logo img,.tv-chart-view__chart-inner .chart-promo a.chart-promo-link .logo img{max-width:85px;max-height:100%;vertical-align:middle}#chart-area .chart-promo a.remove-ad,#chart-container .chart-promo a.remove-ad,.tv-chart-view__chart-inner .chart-promo a.remove-ad{background:#ecf1f4;position:absolute;left:0;top:-18px;height:18px;line-height:18px;padding:0 11px;color:#5cbfe7;font-size:11px;border-top-left-radius:5px;border-top-right-radius:5px;opacity:.8}#chart-container .chart-promo,.tv-chart-view__chart-inner .chart-promo{bottom:30px}#myswf{position:fixed;top:0;right:0}.tv-button{position:relative;display:inline-block;vertical-align:middle;min-width:40px;margin:0;padding:1px 22px;-webkit-user-select:none;user-select:none;line-height:32px;text-align:center;white-space:nowrap;text-decoration:none;font-size:14px;color:#757575;fill:currentColor;border:none;border-radius:4px;outline:0;background-color:transparent;cursor:pointer;overflow:hidden;box-sizing:border-box;-webkit-tap-highlight-color:transparent;transition:background-color .35s ease,border-color .35s ease,color .35s ease}.tv-button.tv-button--danger_ghost,.tv-button.tv-button--default,.tv-button.tv-button--default_ghost,.tv-button.tv-button--primary_ghost,.tv-button.tv-button--secondary_ghost,.tv-button.tv-button--state,.tv-button.tv-button--success_ghost,.tv-button.tv-button--warning_ghost{padding:0 21px}.tv-button.i-active,.tv-button.i-hover,.tv-button:active{transition-duration:.06s}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button:hover{transition-duration:.06s}}.tv-button svg{vertical-align:middle}.tv-button--block{display:block;width:100%;text-align:center}.tv-button+.tv-button{margin-right:15px}.tv-button.tv-button--no-left-margin{margin-right:0}.tv-button__text{position:relative;display:inline-block}.tv-button__text--full-height{display:flex;align-items:center;justify-content:center;height:100%;width:100%;white-space:normal;word-wrap:break-word;line-height:1.2em;margin:11px 5px}.tv-button--default,.tv-button--default_ghost{color:#fff;border-color:#fff;background-color:#fff}html.theme-dark .tv-button--default,html.theme-dark .tv-button--default_ghost{background-color:#1e222d;border-color:#1e222d}.tv-button--default_ghost{color:#fff}html.theme-dark .tv-button--default_ghost{color:#1e222d}.tv-button--default_ghost.i-checked{color:#fff;border-color:#fff;background-color:#fff}html.theme-dark .tv-button--default_ghost.i-checked{background-color:#1e222d;border-color:#1e222d}.tv-button--default.i-active,.tv-button--default:active,.tv-button--default_ghost.i-active,.tv-button--default_ghost:active{color:#fff;border-color:#ececec;background-color:#ececec;transform:translateY(1px)}html.theme-dark .tv-button--default.i-active,html.theme-dark .tv-button--default:active,html.theme-dark .tv-button--default_ghost.i-active,html.theme-dark .tv-button--default_ghost:active{background-color:#1c2030;border-color:#1c2030}.tv-button--default.i-hover,.tv-button--default_ghost.i-hover{color:#fff;border-color:#f2f2f2;background-color:#f2f2f2}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--default:hover,.tv-button--default_ghost:hover{color:#fff;border-color:#f2f2f2;background-color:#f2f2f2}}html.theme-dark .tv-button--default.i-hover,html.theme-dark .tv-button--default_ghost.i-hover{background-color:#1c2030}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button--default:hover,html.theme-dark .tv-button--default_ghost:hover{background-color:#1c2030}}html.theme-dark .tv-button--default.i-hover,html.theme-dark .tv-button--default_ghost.i-hover{border-color:#1c2030}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button--default:hover,html.theme-dark .tv-button--default_ghost:hover{border-color:#1c2030}}.tv-button--default_ghost .tv-button__loader-item{background-color:#f2f2f2}html.theme-dark .tv-button--default_ghost .tv-button__loader-item{background-color:#1c2030}.tv-button--default_ghost.i-hover .tv-button__loader-item{background-color:#fff}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--default_ghost:hover .tv-button__loader-item{background-color:#fff}}.tv-button--default,.tv-button--default.i-checked,.tv-button--default_ghost,.tv-button--default_ghost.i-checked{color:#757575;border:1px solid;border-color:#b5b7b9}html.theme-dark .tv-button--default,html.theme-dark .tv-button--default.i-checked,html.theme-dark .tv-button--default_ghost,html.theme-dark .tv-button--default_ghost.i-checked{border-color:#363c4e;color:#758696}.tv-button--default.i-hover,.tv-button--default_ghost.i-hover{color:#757575;border-color:#b5b7b9}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--default:hover,.tv-button--default_ghost:hover{color:#757575;border-color:#b5b7b9}}html.theme-dark .tv-button--default.i-hover,html.theme-dark .tv-button--default_ghost.i-hover{border-color:#363c4e}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button--default:hover,html.theme-dark .tv-button--default_ghost:hover{border-color:#363c4e}}html.theme-dark .tv-button--default.i-hover,html.theme-dark .tv-button--default_ghost.i-hover{color:#758696}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button--default:hover,html.theme-dark .tv-button--default_ghost:hover{color:#758696}}.tv-button--default.i-active,.tv-button--default:active,.tv-button--default_ghost.i-active,.tv-button--default_ghost:active{color:#757575;border-color:#b5b7b9}html.theme-dark .tv-button--default.i-active,html.theme-dark .tv-button--default:active,html.theme-dark .tv-button--default_ghost.i-active,html.theme-dark .tv-button--default_ghost:active{border-color:#363c4e;color:#758696}.tv-button--primary,.tv-button--primary_ghost{color:#fff;border-color:#2196f3;background-color:#2196f3}html.theme-dark .tv-button--primary,html.theme-dark .tv-button--primary_ghost{background-color:#1976d2;border-color:#1976d2;color:#fff}.tv-button--primary_ghost{color:#2196f3}html.theme-dark .tv-button--primary_ghost{color:#1976d2}.tv-button--primary_ghost.i-checked{color:#fff;border-color:#2196f3;background-color:#2196f3}html.theme-dark .tv-button--primary_ghost.i-checked{background-color:#1976d2;border-color:#1976d2;color:#fff}.tv-button--primary.i-active,.tv-button--primary:active,.tv-button--primary_ghost.i-active,.tv-button--primary_ghost:active{color:#fff;border-color:#1e88e5;background-color:#1e88e5;transform:translateY(1px)}.tv-button--primary.i-hover,.tv-button--primary_ghost.i-hover,html.theme-dark .tv-button--primary.i-active,html.theme-dark .tv-button--primary:active,html.theme-dark .tv-button--primary_ghost.i-active,html.theme-dark .tv-button--primary_ghost:active{background-color:#1e88e5;border-color:#1e88e5;color:#fff}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--primary:hover,.tv-button--primary_ghost:hover{color:#fff;border-color:#1e88e5;background-color:#1e88e5}}html.theme-dark .tv-button--primary.i-hover,html.theme-dark .tv-button--primary_ghost.i-hover{background-color:#1e88e5}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button--primary:hover,html.theme-dark .tv-button--primary_ghost:hover{background-color:#1e88e5}}html.theme-dark .tv-button--primary.i-hover,html.theme-dark .tv-button--primary_ghost.i-hover{border-color:#1e88e5}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button--primary:hover,html.theme-dark .tv-button--primary_ghost:hover{border-color:#1e88e5}}html.theme-dark .tv-button--primary.i-hover,html.theme-dark .tv-button--primary_ghost.i-hover{color:#fff}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button--primary:hover,html.theme-dark .tv-button--primary_ghost:hover{color:#fff}}.tv-button--primary_ghost .tv-button__loader-item,html.theme-dark .tv-button--primary_ghost .tv-button__loader-item{background-color:#1e88e5}.tv-button--primary_ghost.i-hover .tv-button__loader-item{background-color:#fff}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--primary_ghost:hover .tv-button__loader-item{background-color:#fff}}html.theme-dark .tv-button--primary_ghost.i-hover .tv-button__loader-item{background-color:#fff}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button--primary_ghost:hover .tv-button__loader-item{background-color:#fff}}.tv-button--secondary,.tv-button--secondary_ghost{color:#757575;border-color:#e9eff2;background-color:#e9eff2}.tv-button--secondary_ghost{color:#757575}.tv-button--secondary_ghost.i-checked{color:#757575;border-color:#e9eff2;background-color:#e9eff2}.tv-button--secondary.i-active,.tv-button--secondary:active,.tv-button--secondary_ghost.i-active,.tv-button--secondary_ghost:active{color:#757575;border-color:#cfdce3;background-color:#cfdce3;transform:translateY(1px)}.tv-button--secondary.i-hover,.tv-button--secondary_ghost.i-hover{color:#757575;border-color:#dce6ea;background-color:#dce6ea}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--secondary:hover,.tv-button--secondary_ghost:hover{color:#757575;border-color:#dce6ea;background-color:#dce6ea}}.tv-button--secondary_ghost .tv-button__loader-item{background-color:#dce6ea}.tv-button--secondary_ghost.i-hover .tv-button__loader-item{background-color:#757575}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--secondary_ghost:hover .tv-button__loader-item{background-color:#757575}}.tv-button--success,.tv-button--success_ghost{color:#fff;border-color:#009688;background-color:#009688}html.theme-dark .tv-button--success,html.theme-dark .tv-button--success_ghost{background-color:#00796b;border-color:#00796b;color:#fff}.tv-button--success_ghost{color:#009688}html.theme-dark .tv-button--success_ghost{color:#00796b}.tv-button--success_ghost.i-checked{color:#fff;border-color:#009688;background-color:#009688}html.theme-dark .tv-button--success_ghost.i-checked{background-color:#00796b;border-color:#00796b;color:#fff}.tv-button--success.i-active,.tv-button--success:active,.tv-button--success_ghost.i-active,.tv-button--success_ghost:active{color:#fff;border-color:#00796b;background-color:#00796b;transform:translateY(1px)}html.theme-dark .tv-button--success.i-active,html.theme-dark .tv-button--success:active,html.theme-dark .tv-button--success_ghost.i-active,html.theme-dark .tv-button--success_ghost:active{background-color:#009688;border-color:#009688;color:#fff}.tv-button--success.i-hover,.tv-button--success_ghost.i-hover{color:#fff;border-color:#00897b;background-color:#00897b}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--success:hover,.tv-button--success_ghost:hover{color:#fff;border-color:#00897b;background-color:#00897b}}html.theme-dark .tv-button--success.i-hover,html.theme-dark .tv-button--success_ghost.i-hover{background-color:#00897b}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button--success:hover,html.theme-dark .tv-button--success_ghost:hover{background-color:#00897b}}html.theme-dark .tv-button--success.i-hover,html.theme-dark .tv-button--success_ghost.i-hover{border-color:#00897b}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button--success:hover,html.theme-dark .tv-button--success_ghost:hover{border-color:#00897b}}html.theme-dark .tv-button--success.i-hover,html.theme-dark .tv-button--success_ghost.i-hover{color:#fff}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button--success:hover,html.theme-dark .tv-button--success_ghost:hover{color:#fff}}.tv-button--success_ghost .tv-button__loader-item,html.theme-dark .tv-button--success_ghost .tv-button__loader-item{background-color:#00897b}.tv-button--success_ghost.i-hover .tv-button__loader-item{background-color:#fff}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--success_ghost:hover .tv-button__loader-item{background-color:#fff}}html.theme-dark .tv-button--success_ghost.i-hover .tv-button__loader-item{background-color:#fff}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button--success_ghost:hover .tv-button__loader-item{background-color:#fff}}.tv-button--danger,.tv-button--danger_ghost{color:#fff;border-color:#ef5350;background-color:#ef5350}html.theme-dark .tv-button--danger,html.theme-dark .tv-button--danger_ghost{background-color:#d32f2f;border-color:#d32f2f;color:#fff}.tv-button--danger_ghost{color:#ef5350}html.theme-dark .tv-button--danger_ghost{color:#d32f2f}.tv-button--danger_ghost.i-checked{color:#fff;border-color:#ef5350;background-color:#ef5350}html.theme-dark .tv-button--danger_ghost.i-checked{background-color:#d32f2f;border-color:#d32f2f;color:#fff}.tv-button--danger.i-active,.tv-button--danger:active,.tv-button--danger_ghost.i-active,.tv-button--danger_ghost:active{color:#fff;border-color:#d32f2f;background-color:#d32f2f;transform:translateY(1px)}html.theme-dark .tv-button--danger.i-active,html.theme-dark .tv-button--danger:active,html.theme-dark .tv-button--danger_ghost.i-active,html.theme-dark .tv-button--danger_ghost:active{background-color:#f44336;border-color:#f44336;color:#fff}.tv-button--danger.i-hover,.tv-button--danger_ghost.i-hover{color:#fff;border-color:#e53935;background-color:#e53935}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--danger:hover,.tv-button--danger_ghost:hover{color:#fff;border-color:#e53935;background-color:#e53935}}html.theme-dark .tv-button--danger.i-hover,html.theme-dark .tv-button--danger_ghost.i-hover{background-color:#e53935}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button--danger:hover,html.theme-dark .tv-button--danger_ghost:hover{background-color:#e53935}}html.theme-dark .tv-button--danger.i-hover,html.theme-dark .tv-button--danger_ghost.i-hover{border-color:#e53935}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button--danger:hover,html.theme-dark .tv-button--danger_ghost:hover{border-color:#e53935}}html.theme-dark .tv-button--danger.i-hover,html.theme-dark .tv-button--danger_ghost.i-hover{color:#fff}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button--danger:hover,html.theme-dark .tv-button--danger_ghost:hover{color:#fff}}.tv-button--danger_ghost .tv-button__loader-item,html.theme-dark .tv-button--danger_ghost .tv-button__loader-item{background-color:#e53935}.tv-button--danger_ghost.i-hover .tv-button__loader-item{background-color:#fff}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--danger_ghost:hover .tv-button__loader-item{background-color:#fff}}html.theme-dark .tv-button--danger_ghost.i-hover .tv-button__loader-item{background-color:#fff}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button--danger_ghost:hover .tv-button__loader-item{background-color:#fff}}.tv-button--warning,.tv-button--warning_ghost{color:#fff;border-color:#f89e30;background-color:#f89e30}.tv-button--warning_ghost{color:#f89e30}.tv-button--warning_ghost.i-checked{color:#fff;border-color:#f89e30;background-color:#f89e30}.tv-button--warning.i-active,.tv-button--warning:active,.tv-button--warning_ghost.i-active,.tv-button--warning_ghost:active{color:#fff;border-color:#d47807;background-color:#d47807;transform:translateY(1px)}.tv-button--warning.i-hover,.tv-button--warning_ghost.i-hover{color:#fff;border-color:#f79217;background-color:#f79217}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--warning:hover,.tv-button--warning_ghost:hover{color:#fff;border-color:#f79217;background-color:#f79217}}.tv-button--warning_ghost .tv-button__loader-item{background-color:#f79217}.tv-button--warning_ghost.i-hover .tv-button__loader-item{background-color:#fff}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--warning_ghost:hover .tv-button__loader-item{background-color:#fff}}.tv-button--link{color:#2196f3;transition:color .35s ease}html.theme-dark .tv-button--link{color:#1976d2}.tv-button--link:visited{color:#2196f3;fill:#2196f3}html.theme-dark .tv-button--link:visited{fill:#1976d2;color:#1976d2}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--link:hover{color:#1e88e5;fill:#1e88e5;transition-duration:.06s}}.tv-button--link:focus{outline:auto}.tv-button--link:focus:not(:-moz-focusring){outline:none}.tv-button--link:-moz-focusring{outline:auto}.tv-button--link:active{color:#1e88e5;fill:#1e88e5;transition-duration:.06s}.tv-button--danger_ghost,.tv-button--default_ghost,.tv-button--primary_ghost,.tv-button--secondary_ghost,.tv-button--success_ghost,.tv-button--warning_ghost{border-width:1px;border-style:solid;background-color:transparent}html.theme-dark .tv-button--danger_ghost,html.theme-dark .tv-button--default_ghost,html.theme-dark .tv-button--primary_ghost,html.theme-dark .tv-button--secondary_ghost,html.theme-dark .tv-button--success_ghost,html.theme-dark .tv-button--warning_ghost{background-color:transparent}.tv-button--danger_ghost.tv-button--size_large,.tv-button--default_ghost.tv-button--size_large,.tv-button--primary_ghost.tv-button--size_large,.tv-button--secondary_ghost.tv-button--size_large,.tv-button--success_ghost.tv-button--size_large,.tv-button--warning_ghost.tv-button--size_large{border-width:2px}.tv-button--danger_ghost.tv-button--size_large.tv-button--thin-border,.tv-button--default_ghost.tv-button--size_large.tv-button--thin-border,.tv-button--primary_ghost.tv-button--size_large.tv-button--thin-border,.tv-button--secondary_ghost.tv-button--size_large.tv-button--thin-border,.tv-button--success_ghost.tv-button--size_large.tv-button--thin-border,.tv-button--warning_ghost.tv-button--size_large.tv-button--thin-border{border-width:1px}.tv-button .tv-ripple{background-color:hsla(0,0%,100%,.25)}.tv-button--default .tv-ripple,.tv-button--default_ghost .tv-ripple{background-color:rgba(117,134,150,.25)}.tv-button.i-disabled .tv-ripple{background-color:transparent}.tv-button.i-disabled,.tv-button.i-disabled:active,.tv-button:disabled,.tv-button:disabled:active{cursor:default;color:#b2b5be;border-color:#e0e3eb;background-color:#e0e3eb}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button.i-disabled:hover,.tv-button:disabled:hover{cursor:default;color:#b2b5be;border-color:#e0e3eb;background-color:#e0e3eb}}html.theme-dark .tv-button.i-disabled,html.theme-dark .tv-button.i-disabled:active,html.theme-dark .tv-button:disabled,html.theme-dark .tv-button:disabled:active{background-color:#363a45}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button.i-disabled:hover,html.theme-dark .tv-button:disabled:hover{background-color:#363a45}}html.theme-dark .tv-button.i-disabled,html.theme-dark .tv-button.i-disabled:active,html.theme-dark .tv-button:disabled,html.theme-dark .tv-button:disabled:active{border-color:#363a45}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button.i-disabled:hover,html.theme-dark .tv-button:disabled:hover{border-color:#363a45}}html.theme-dark .tv-button.i-disabled,html.theme-dark .tv-button.i-disabled:active,html.theme-dark .tv-button:disabled,html.theme-dark .tv-button:disabled:active{color:#50535e}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button.i-disabled:hover,html.theme-dark .tv-button:disabled:hover{color:#50535e}}.tv-button.i-disabled:active,.tv-button:disabled:active{transform:translateY(0)}.tv-button--size_xsmall{padding:2px 7px;line-height:15px;border-radius:1px;font-size:11px;font-weight:400}.tv-button--size_xsmall.tv-button--danger_ghost,.tv-button--size_xsmall.tv-button--default,.tv-button--size_xsmall.tv-button--default_ghost,.tv-button--size_xsmall.tv-button--primary_ghost,.tv-button--size_xsmall.tv-button--secondary_ghost,.tv-button--size_xsmall.tv-button--state,.tv-button--size_xsmall.tv-button--success_ghost,.tv-button--size_xsmall.tv-button--warning_ghost{padding:1px 6px}.tv-button--size_xsmall+.tv-button--size_xsmall{margin-right:10px}.tv-button--size_small{padding:1px 12px;line-height:25px;font-size:13px}.tv-button--size_small.tv-button--danger_ghost,.tv-button--size_small.tv-button--default,.tv-button--size_small.tv-button--default_ghost,.tv-button--size_small.tv-button--primary_ghost,.tv-button--size_small.tv-button--secondary_ghost,.tv-button--size_small.tv-button--state,.tv-button--size_small.tv-button--success_ghost,.tv-button--size_small.tv-button--warning_ghost{padding:0 11px}.tv-button--size_small+.tv-button--size_small{margin-right:10px}.tv-button--size_large{padding:1px 30px;font-size:17px;letter-spacing:1px;line-height:44px}.tv-button--size_large.tv-button--danger_ghost,.tv-button--size_large.tv-button--default,.tv-button--size_large.tv-button--default_ghost,.tv-button--size_large.tv-button--primary_ghost,.tv-button--size_large.tv-button--secondary_ghost,.tv-button--size_large.tv-button--state,.tv-button--size_large.tv-button--success_ghost,.tv-button--size_large.tv-button--warning_ghost{padding:0 29px}.tv-button--no-padding{padding:1px}.tv-button--no-padding.tv-button--danger_ghost,.tv-button--no-padding.tv-button--default,.tv-button--no-padding.tv-button--default_ghost,.tv-button--no-padding.tv-button--primary_ghost,.tv-button--no-padding.tv-button--secondary_ghost,.tv-button--no-padding.tv-button--state,.tv-button--no-padding.tv-button--success_ghost,.tv-button--no-padding.tv-button--warning_ghost{padding:0}.tv-button--state{text-align:center;border-width:1px;border-style:solid}.tv-button--state,html.theme-dark .tv-button--state{background:transparent}.tv-button--state:after{content:"";display:inline-block}.tv-button--state__checked,.tv-button--state__uncheck-hint,.tv-button--state__unchecked{display:block;height:0;transition:opacity .2625s ease,transform .2625s ease}.tv-button--state__ellipsis-text{display:block;white-space:nowrap;text-overflow:ellipsis;overflow-x:hidden}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--state.i-checked:hover .tv-button--state__checked,.tv-button--state.i-checked:hover .tv-button--state__uncheck-hint,.tv-button--state.i-checked:hover .tv-button--state__unchecked{will-change:opacity,transform}}.tv-button--state.i-checked .tv-button--state__unchecked,.tv-button--state__checked,.tv-button--state__uncheck-hint{opacity:0}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--state.i-checked:hover .tv-button--state__checked{opacity:0}}.tv-button--state.i-checked .tv-button--state__checked,.tv-button--state__unchecked{opacity:1}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--state.i-checked:hover .tv-button--state__uncheck-hint{opacity:1}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--state.i-checked:hover .tv-button--state__checked{transform:translateY(-5px)}}.tv-button--state.i-checked .tv-button--state__unchecked,.tv-button--state__checked,.tv-button--state__uncheck-hint{transform:translateY(5px)}.tv-button--state.i-checked .tv-button--state__checked{transform:translateY(0)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--state.i-checked:hover .tv-button--state__uncheck-hint{transform:translateY(0)}}.tv-button--state.tv-button--success{color:#009688;background-color:transparent}html.theme-dark .tv-button--state.tv-button--success{background-color:transparent;color:#00796b}.tv-button--state.tv-button--success.i-checked{color:#fff;background-color:#009688}html.theme-dark .tv-button--state.tv-button--success.i-checked{background-color:#00796b;color:#fff}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--state.tv-button--success:hover{color:#fff;background-color:#00897b}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button--state.tv-button--success:hover{background-color:#00897b;color:#fff}}.tv-button--state.tv-button--success:active{color:#fff;background-color:#00796b}html.theme-dark .tv-button--state.tv-button--success:active{background-color:#009688;color:#fff}.tv-button--state.tv-button--danger{color:#ef5350;background-color:transparent}html.theme-dark .tv-button--state.tv-button--danger{background-color:transparent;color:#d32f2f}.tv-button--state.tv-button--danger.i-checked{color:#fff;background-color:#ff4a68}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--state.tv-button--danger:hover{color:#fff;background-color:#f24965}}.tv-button--state.tv-button--danger:active{color:#fff;background-color:#ff173e}.tv-button--state.tv-button--primary{color:#2196f3;background-color:transparent}html.theme-dark .tv-button--state.tv-button--primary{background-color:transparent;color:#1976d2}.tv-button--state.tv-button--primary.i-checked{color:#fff;background-color:#2196f3}html.theme-dark .tv-button--state.tv-button--primary.i-checked{background-color:#1976d2;color:#fff}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--state.tv-button--primary:hover{color:#fff;background-color:#1e88e5}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button--state.tv-button--primary:hover{background-color:#1e88e5;color:#fff}}.tv-button--state.tv-button--primary:active{color:#fff;background-color:#1e88e5}html.theme-dark .tv-button--state.tv-button--primary:active{background-color:#1e88e5;color:#fff}.tv-button--state.tv-button--primary_ghost-hover.i-checked{color:#2196f3;background-color:transparent}html.theme-dark .tv-button--state.tv-button--primary_ghost-hover.i-checked{background-color:transparent;color:#1976d2}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--state.tv-button--primary_ghost-hover:hover{color:#fff;background-color:#1e88e5}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-button--state.tv-button--primary_ghost-hover:hover{background-color:#1e88e5;color:#fff}}.tv-button--state.tv-button--primary_ghost-hover:active{color:#fff;background-color:#1e88e5}html.theme-dark .tv-button--state.tv-button--primary_ghost-hover:active{background-color:#1e88e5;color:#fff}.tv-button--state.tv-button--secondary{color:#757575;background-color:transparent}.tv-button--state.tv-button--secondary.i-checked{color:#757575;background-color:#e9eff2}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--state.tv-button--secondary:hover{color:#757575;background-color:#dce6ea}}.tv-button--state.tv-button--secondary:active{color:#757575;background-color:#cfdce3}.tv-button--state.tv-button--warning{color:#f89e30;background-color:transparent}.tv-button--state.tv-button--warning.i-checked{color:#fff;background-color:#f89e30}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-button--state.tv-button--warning:hover{color:#fff;background-color:#f79217}}.tv-button--state.tv-button--warning:active{color:#fff;background-color:#d47807}.tv-button--state.tv-button--icon-with-text svg{margin-left:8px;margin-bottom:-8px;vertical-align:unset}.tv-button--icon{display:inline-flex;align-items:center;justify-content:center;padding:0!important;min-width:auto;width:34px;height:34px}.tv-button--icon.tv-button--size_xsmall{width:19px;height:19px}.tv-button--icon.tv-button--size_small{width:27px;height:27px}.tv-button--icon.tv-button--size_large{width:46px;height:46px}.tv-button--loader .tv-button__text{transition:opacity .175s ease,transform .175s ease}.tv-button--loader.i-start-load .tv-button__text{opacity:0;transform:translateY(-5px)}.tv-button--loader.i-loading .tv-button__text{opacity:0;transform:translateY(5px)}.tv-button--loader.i-stop-load .tv-button__text{opacity:1;transform:translateY(0);transition-delay:.175s}.tv-button__loader{position:absolute;top:0;right:0;left:0;bottom:0;height:100%;margin:0 auto;text-align:center;font-size:0;opacity:0;transition:opacity .35s ease}.tv-button__loader:after{content:"";display:inline-block;height:100%;vertical-align:middle}.tv-button--loader.i-loading .tv-button__loader,.tv-button--loader.i-start-load .tv-button__loader{opacity:1}.tv-button--loader.i-stop-load .tv-button__loader{opacity:0}.tv-button__loader-item{margin-left:2px;margin-right:2px;display:inline-block;vertical-align:middle;width:10px;height:10px;opacity:0;border-radius:100%;background-color:#fff;transform:translateY(12px) scale(.6);transition:transform .35s cubic-bezier(.68,-.55,.265,1.55),opacity .35s ease}.tv-button__loader-item:nth-child(2){transition-delay:.11666667s}.tv-button__loader-item:nth-child(3){transition-delay:.23333333s}.tv-button--default .tv-button__loader-item{background-color:#757575}.tv-button--loader.i-loading .tv-button__loader-item,.tv-button--loader.i-start-load .tv-button__loader-item{opacity:1}.tv-button--loader.i-stop-load .tv-button__loader-item{opacity:0}.tv-button--loader.i-loading .tv-button__loader-item,.tv-button--loader.i-start-load .tv-button__loader-item,.tv-button--loader.i-stop-load .tv-button__loader-item{transform:translateY(0) scale(.6)}.tv-button--loader.i-loading .tv-button__loader-item,.tv-button--loader.i-stop-load .tv-button__loader-item{animation:tv-button-loader .96s infinite ease-in-out both}.tv-button--loader.i-loading .tv-button__loader-item:nth-child(2),.tv-button--loader.i-stop-load .tv-button__loader-item:nth-child(2){animation-delay:.151s}.tv-button--loader.i-loading .tv-button__loader-item:nth-child(3),.tv-button--loader.i-stop-load .tv-button__loader-item:nth-child(3){animation-delay:.32s}.tv-button--no-border-radius{border-radius:0}.tv-button--no-border{border:none}.tv-button--connect{border-radius:0}.tv-button--connect_left{border-top-right-radius:0;border-bottom-right-radius:0}.tv-button--connect_right{border-top-left-radius:0;border-bottom-left-radius:0}@keyframes tv-button-loader{0%,to{transform:scale(.6)}50%{transform:scale(.9)}}.tv-control-input{display:block;padding:0 12px;width:100%;height:34px;font-size:13px;color:#4a4a4a;border:1px solid #dadde0;background-color:#fff;border-radius:2px;box-sizing:border-box;-webkit-tap-highlight-color:transparent;transition:border-color .35s ease,background-color .35s ease;-webkit-appearance:none;-moz-appearance:none;appearance:none}html.theme-dark .tv-control-input{background-color:#1e222d;border-color:#363c4e;color:#c5cbce}.tv-control-input::placeholder{color:#adaeb0;opacity:1}html.theme-dark .tv-control-input::placeholder{color:#4f5966}.tv-control-input:-webkit-autofill{-webkit-text-fill-color:#535353!important;box-shadow:inset 0 0 0 1000px #fff!important}.tv-control-input--size_xsmall{height:19px}.tv-control-input--size_small{height:27px}.tv-control-input--size_large{height:48px;font-size:16px}.tv-control-input--connect{border-right:0;border-left:0;border-radius:0}.tv-control-input--connect_left{border-right:none;border-top-right-radius:0;border-bottom-right-radius:0}.tv-control-input--connect_right{border-left:none;border-top-left-radius:0;border-bottom-left-radius:0}.tv-control-input--connect_right#id_username{direction:ltr;text-align:right}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-control-input:hover{border-color:#c8c8c8;transition-duration:.06s}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-control-input:hover{border-color:#4c525e}}.tv-control-input:focus{border-color:#2196f3!important;transition-duration:.06s}.tv-control-input[readonly]{color:#8a8a8a;border-color:#dadde0}.tv-control-input[readonly]:focus{border-color:#ececec!important}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-control-input[readonly]:hover{border-color:#ececec!important}}html.theme-dark .tv-control-input[readonly]:focus{border-color:#262b3e!important}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-control-input[readonly]:hover{border-color:#262b3e!important}}.tv-control-input--readonly_dark,.tv-control-input--readonly_dark[readonly]{color:#555}html.theme-dark .tv-control-input--readonly_dark,html.theme-dark .tv-control-input--readonly_dark[readonly]{color:#4c525e}.tv-control-input.i-disabled,.tv-control-input[disabled]{color:#ececec!important;border-color:#ececec!important}html.theme-dark .tv-control-input.i-disabled,html.theme-dark .tv-control-input[disabled]{border-color:#262b3e!important;color:#262b3e!important}.tv-control-input.i-disabled::placeholder,.tv-control-input[disabled]::placeholder{color:#ececec!important}html.theme-dark .tv-control-input.i-disabled::placeholder,html.theme-dark .tv-control-input[disabled]::placeholder{color:#262b3e!important}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-control-input.i-disabled:hover,.tv-control-input[disabled]:hover{border-color:#ececec!important}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .tv-control-input.i-disabled:hover,html.theme-dark .tv-control-input[disabled]:hover{border-color:#262b3e!important}}.tv-control-input.i-error{border-color:#ff4a68!important}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-control-input.i-error:hover{border-color:#f24965!important}}.tv-control-input.i-error:focus{border-color:#ff173e!important}.tv-control-input.i-success{border-color:#009688!important}html.theme-dark .tv-control-input.i-success{border-color:#00796b!important}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-control-input.i-success:hover,html.theme-dark .tv-control-input.i-success:hover{border-color:#00897b!important}}.tv-control-input.i-success:active,.tv-control-input.i-success:focus{border-color:#00796b!important}html.theme-dark .tv-control-input.i-success:active,html.theme-dark .tv-control-input.i-success:focus{border-color:#009688!important}.tv-control-input--phone{direction:ltr;text-align:right}.tv-control-input--file{display:none}body,html{background:none;overflow:hidden;height:100%;width:100%}body{min-width:240px}#library-container{border:1px solid #d9dadb;background:#fff}#library-container #showExtendedHoursLink{display:none}.on-widget .open-popup{margin-right:4px;padding:7px;border-width:0!important;border:none;background:#6798bb}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.on-widget .open-popup:hover{background:#69a3cc}}.on-widget .open-popup:active{background:#71acd6}.on-widget .open-popup svg{display:block;width:16px;height:14px;fill:#fff}.on-widget .widgetbar-widget-hotlist .widgetbar-widgetheader .widgetbar-headerspace{display:none}.text .logo-highlighted{font-weight:700;text-decoration:underline}.on-cme-widget .symbol-edit-popup .filter,.on-cme-widget .symbol-search-dialog .filter{display:none}.on-cme-widget .symbol-search-dialog .results{height:450px}.load-chart .chart-search,.load-chart .chart-search input{width:100%}.properties-tabs-label{margin-left:30px}@media only screen and (max-width:750px){.charts-popup-list .item.save-load-chart-title{display:block}}.charts-popup-list .item .title,.charts-popup-list .item .title-expanded{width:auto}.common-tooltip-s2GEoMlT{display:inline-flex;position:fixed;color:#f0f3fa;font-size:12px;line-height:18px;opacity:1;transition:opacity .15s linear;z-index:1000;pointer-events:none}.common-tooltip--hidden-Z0EAvXgv{opacity:0}.common-tooltip--horizontal-13imOC5w{margin:4px 0}.common-tooltip--horizontal-13imOC5w.common-tooltip--farther-2yXMAkHF{margin:8px 0}.common-tooltip--vertical-mcRoucek{margin:0 4px}.common-tooltip--vertical-mcRoucek.common-tooltip-farther-XoKytD99{margin:0 8px}.common-tooltip--no-pointer-events-3nL0Vygu{pointer-events:none}.common-tooltip--no-pointer-events-3nL0Vygu.common-tooltip--horizontal-13imOC5w{margin:8px 0}.common-tooltip--no-pointer-events-3nL0Vygu.common-tooltip--vertical-mcRoucek{margin:0 8px}.common-tooltip--no-pointer-events-3nL0Vygu.common-tooltip--horizontal-13imOC5w.common-tooltip--farther-2yXMAkHF{margin:14px 0}.common-tooltip--no-pointer-events-3nL0Vygu.common-tooltip--vertical-mcRoucek.common-tooltip--farther-2yXMAkHF{margin:0 14px}.common-tooltip--direction_normal-3u9ejKM2{flex-direction:row}.common-tooltip--direction_normal-3u9ejKM2 .common-tooltip__body-356XFpBj{border-top-right-radius:2px;border-bottom-right-radius:2px}.common-tooltip--direction_normal-3u9ejKM2 .common-tooltip__body--no-buttons-3quqi1Sv,.common-tooltip--direction_normal-3u9ejKM2 .common-tooltip__button-container-3EjyKV3s{border-top-left-radius:2px;border-bottom-left-radius:2px}.common-tooltip--direction_normal-3u9ejKM2 .common-tooltip__button-1rnQgujz:not(:last-child){margin-left:1px}.common-tooltip--direction_reversed-XN-JUTdr{flex-direction:row-reverse}.common-tooltip--direction_reversed-XN-JUTdr .common-tooltip__body-356XFpBj{border-top-left-radius:2px;border-bottom-left-radius:2px}.common-tooltip--direction_reversed-XN-JUTdr .common-tooltip__body--no-buttons-3quqi1Sv,.common-tooltip--direction_reversed-XN-JUTdr .common-tooltip__button-container-3EjyKV3s{border-top-right-radius:2px;border-bottom-right-radius:2px}.common-tooltip--direction_reversed-XN-JUTdr .common-tooltip__button-1rnQgujz:not(:first-child){margin-right:1px}.common-tooltip__ear-holder-yIJjpvgu{position:relative}.common-tooltip__ear-holder-yIJjpvgu:after{content:"";display:block;position:absolute;box-sizing:border-box;width:0;height:0;border:0 solid;border-color:#2a2e39}html.theme-dark .common-tooltip__ear-holder-yIJjpvgu:after{border-color:#50535e}.common-tooltip__ear-holder--above-1D8FkNkw:after,.common-tooltip__ear-holder--below-1rmzWejA:after{left:50%;margin-left:-6px;border-left:6px solid;border-left-color:transparent;border-right:6px solid;border-right-color:transparent}html.theme-dark .common-tooltip__ear-holder--above-1D8FkNkw:after,html.theme-dark .common-tooltip__ear-holder--below-1rmzWejA:after{border-left-color:transparent;border-right-color:transparent}.common-tooltip__ear-holder--below-1rmzWejA:after{bottom:100%;border-bottom-width:4px}.common-tooltip__ear-holder--above-1D8FkNkw:after{top:100%;border-top-width:4px}.common-tooltip__ear-holder--after-BnAcuW1N:after,.common-tooltip__ear-holder--before-oXq5sFXr:after{top:50%;margin-top:-6px;border-top:6px solid;border-top-color:transparent;border-bottom:6px solid;border-bottom-color:transparent}html.theme-dark .common-tooltip__ear-holder--after-BnAcuW1N:after,html.theme-dark .common-tooltip__ear-holder--before-oXq5sFXr:after{border-bottom-color:transparent;border-top-color:transparent}.common-tooltip__ear-holder--before-oXq5sFXr:after{right:100%;border-right-width:4px}.common-tooltip__ear-holder--after-BnAcuW1N:after{left:100%;border-left-width:4px}.common-tooltip__body-356XFpBj{display:block;position:relative;box-sizing:border-box;padding:3px 8px;max-width:320px;background-color:#2a2e39;white-space:pre-wrap;word-wrap:break-word;text-align:right;overflow:hidden}html.theme-dark .common-tooltip__body-356XFpBj{background-color:#50535e}.common-tooltip__body--with-hotkey-2wXRtgYZ{display:flex;max-width:420px;padding:0}.common-tooltip__body--width_wide-3oG604Li{max-width:640px}.common-tooltip__body--width_narrow-34hrFTFo{max-width:200px}.common-tooltip__body--no-padding-2vVe6Xco{padding:0}.common-tooltip__hotkey-block-2gS_uAOl{display:inline-flex;flex:1 0 auto;padding:4px 8px 5px;line-height:12px;align-items:center;justify-content:center;color:#ff9800}.common-tooltip__hotkey-block--divider-rQ38KmpQ{border-right:1px solid #5d606b;margin-right:8px}html.theme-dark .common-tooltip__hotkey-block--divider-rQ38KmpQ{border-right:1px solid #363a45}.common-tooltip__hotkey-text-1eb7dyCg{display:inline-flex;align-items:center;margin:3px 8px 3px 0}.common-tooltip__hotkey-button-1XJ40e4D{display:inline-flex;justify-content:center;align-items:center;height:13px;min-width:7px;padding:0 3px;border:1px solid;border-radius:2px}.common-tooltip__plus-sign-3CKSupKp{width:13px;height:15px;line-height:16px;text-align:center}.common-tooltip__button-container-3EjyKV3s{display:flex;position:relative;overflow:hidden}.common-tooltip__button-1rnQgujz{display:flex;color:#fff;background-color:#2196f3;padding:0 10px;align-items:center}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.common-tooltip__button-1rnQgujz:hover{background-color:#1592e6}}.common-tooltip-s2GEoMlT.theme-white{color:#131722}html.theme-dark .common-tooltip-s2GEoMlT.theme-white{color:#d1d4dc}.common-tooltip-s2GEoMlT.theme-white .common-tooltip__body-356XFpBj{background-color:#fff;border-radius:0}html.theme-dark .common-tooltip-s2GEoMlT.theme-white .common-tooltip__body-356XFpBj{background-color:#1e222d}.common-tooltip-s2GEoMlT.theme-white .common-tooltip__ear-holder-yIJjpvgu{border:1px solid #dadde0}html.theme-dark .common-tooltip-s2GEoMlT.theme-white .common-tooltip__ear-holder-yIJjpvgu{border:1px solid #363c4e}.common-tooltip-s2GEoMlT.theme-white .common-tooltip__ear-holder-yIJjpvgu:after{border-color:#fff}html.theme-dark .common-tooltip-s2GEoMlT.theme-white .common-tooltip__ear-holder-yIJjpvgu:after{border-color:#1e222d}.common-tooltip-s2GEoMlT.theme-white .common-tooltip__ear-holder--above-1D8FkNkw:after,.common-tooltip-s2GEoMlT.theme-white .common-tooltip__ear-holder--below-1rmzWejA:after{border-right:6px solid;border-right-color:transparent;border-left:6px solid;border-left-color:transparent}html.theme-dark .common-tooltip-s2GEoMlT.theme-white .common-tooltip__ear-holder--above-1D8FkNkw:after,html.theme-dark .common-tooltip-s2GEoMlT.theme-white .common-tooltip__ear-holder--below-1rmzWejA:after{border-left-color:transparent;border-right-color:transparent}.common-tooltip-s2GEoMlT.theme-white .common-tooltip__ear-holder--after-BnAcuW1N:after,.common-tooltip-s2GEoMlT.theme-white .common-tooltip__ear-holder--before-oXq5sFXr:after{border-top:6px solid;border-top-color:transparent;border-bottom:6px solid;border-bottom-color:transparent}html.theme-dark .common-tooltip-s2GEoMlT.theme-white .common-tooltip__ear-holder--after-BnAcuW1N:after,html.theme-dark .common-tooltip-s2GEoMlT.theme-white .common-tooltip__ear-holder--before-oXq5sFXr:after{border-bottom-color:transparent;border-top-color:transparent}.common-tooltip-s2GEoMlT.theme-white .common-tooltip__ear-holder-yIJjpvgu:before{content:"";display:block;position:absolute;z-index:1000;width:0;height:0;border:0 solid;border-color:#dadde0}html.theme-dark .common-tooltip-s2GEoMlT.theme-white .common-tooltip__ear-holder-yIJjpvgu:before{border-color:#363c4e}.common-tooltip-s2GEoMlT.theme-white .common-tooltip__ear-holder--above-1D8FkNkw:before,.common-tooltip-s2GEoMlT.theme-white .common-tooltip__ear-holder--below-1rmzWejA:before{right:50%;margin-right:-7px;border-right:7px solid;border-right-color:transparent;border-left:7px solid;border-left-color:transparent}html.theme-dark .common-tooltip-s2GEoMlT.theme-white .common-tooltip__ear-holder--above-1D8FkNkw:before,html.theme-dark .common-tooltip-s2GEoMlT.theme-white .common-tooltip__ear-holder--below-1rmzWejA:before{border-left-color:transparent;border-right-color:transparent}.common-tooltip-s2GEoMlT.theme-white .common-tooltip__ear-holder--below-1rmzWejA:before{top:-6px;border-bottom-width:6px}.common-tooltip-s2GEoMlT.theme-white .common-tooltip__ear-holder--above-1D8FkNkw:before{bottom:-6px;border-top-width:6px}.common-tooltip-s2GEoMlT.theme-white .common-tooltip__ear-holder--after-BnAcuW1N:before,.common-tooltip-s2GEoMlT.theme-white .common-tooltip__ear-holder--before-oXq5sFXr:before{top:50%;margin-top:-7px;border-top:7px solid;border-top-color:transparent;border-bottom:7px solid;border-bottom-color:transparent}html.theme-dark .common-tooltip-s2GEoMlT.theme-white .common-tooltip__ear-holder--after-BnAcuW1N:before,html.theme-dark .common-tooltip-s2GEoMlT.theme-white .common-tooltip__ear-holder--before-oXq5sFXr:before{border-bottom-color:transparent;border-top-color:transparent}.common-tooltip-s2GEoMlT.theme-white .common-tooltip__ear-holder--before-oXq5sFXr:before{right:-6px;border-left-width:6px}.common-tooltip-s2GEoMlT.theme-white .common-tooltip__ear-holder--after-BnAcuW1N:before{left:-6px;border-right-width:6px}.common-tooltip-s2GEoMlT.theme-round-shadow{color:#131722;box-shadow:0 1px 3px 0 rgba(42,44,57,.29)}html.theme-dark .common-tooltip-s2GEoMlT.theme-round-shadow{color:#d1d4dc}.common-tooltip-s2GEoMlT.theme-round-shadow .common-tooltip__body-356XFpBj{background-color:#fff}html.theme-dark .common-tooltip-s2GEoMlT.theme-round-shadow .common-tooltip__body-356XFpBj{background-color:#1e222d}.common-tooltip-s2GEoMlT.theme-round-shadow .common-tooltip__ear-holder-yIJjpvgu:after{border-color:#fff}html.theme-dark .common-tooltip-s2GEoMlT.theme-round-shadow .common-tooltip__ear-holder-yIJjpvgu:after{border-color:#1e222d}.common-tooltip-s2GEoMlT.theme-round-shadow .common-tooltip__ear-holder--above-1D8FkNkw:after,.common-tooltip-s2GEoMlT.theme-round-shadow .common-tooltip__ear-holder--below-1rmzWejA:after{border-right:6px solid;border-right-color:transparent;border-left:6px solid;border-left-color:transparent}html.theme-dark .common-tooltip-s2GEoMlT.theme-round-shadow .common-tooltip__ear-holder--above-1D8FkNkw:after,html.theme-dark .common-tooltip-s2GEoMlT.theme-round-shadow .common-tooltip__ear-holder--below-1rmzWejA:after{border-left-color:transparent;border-right-color:transparent}.common-tooltip-s2GEoMlT.theme-round-shadow .common-tooltip__ear-holder--after-BnAcuW1N:after,.common-tooltip-s2GEoMlT.theme-round-shadow .common-tooltip__ear-holder--before-oXq5sFXr:after{border-top:6px solid;border-top-color:transparent;border-bottom:6px solid;border-bottom-color:transparent}html.theme-dark .common-tooltip-s2GEoMlT.theme-round-shadow .common-tooltip__ear-holder--after-BnAcuW1N:after,html.theme-dark .common-tooltip-s2GEoMlT.theme-round-shadow .common-tooltip__ear-holder--before-oXq5sFXr:after{border-bottom-color:transparent;border-top-color:transparent}.container-2BvS3Fpg{width:100%;height:100%;box-sizing:border-box;background-color:#e0e3eb}html.theme-dark .container-2BvS3Fpg{background-color:#2a2e39}.container-2BvS3Fpg .inner-3YzQuyJx{width:100%;height:100%;background-color:#fff}html.theme-dark .container-2BvS3Fpg .inner-3YzQuyJx{background-color:#131722}.container-2BvS3Fpg.border-left-LYAXTdyL{padding-right:4px}.container-2BvS3Fpg.border-right-OzIcepiV{padding-left:4px}.container-2BvS3Fpg.border-top-193CSDqN{padding-top:4px}.container-2BvS3Fpg.border-bottom-2lZASSTD{padding-bottom:4px}.container-2BvS3Fpg.top-right-radius-FE25nrPp .inner-3YzQuyJx{border-top-left-radius:0}.container-2BvS3Fpg.top-left-radius-1ELOZlIb .inner-3YzQuyJx{border-top-right-radius:0}.container-2BvS3Fpg.bottom-right-radius-7zqIiaLN .inner-3YzQuyJx{border-bottom-left-radius:0}.container-2BvS3Fpg.bottom-left-radius-xCxQ998i .inner-3YzQuyJx{border-bottom-right-radius:0}.tv-rename-chart-dialog__field{font-size:13px;display:block}.tv-rename-chart-dialog__field:not(:last-child){margin-bottom:13px}.tv-rename-chart-dialog__label{display:inline-block;margin-bottom:10px}.tv-rename-chart-dialog__label a{color:#2196f3;transition:color .35s ease}html.theme-dark .tv-rename-chart-dialog__label a{color:#1976d2}.tv-rename-chart-dialog__label a:visited{color:#2196f3;fill:#2196f3}html.theme-dark .tv-rename-chart-dialog__label a:visited{fill:#1976d2;color:#1976d2}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-rename-chart-dialog__label a:hover{color:#1e88e5;fill:#1e88e5;transition-duration:.06s}}.tv-rename-chart-dialog__label a:focus{outline:auto}.tv-rename-chart-dialog__label a:focus:not(:-moz-focusring){outline:none}.tv-rename-chart-dialog__label a:-moz-focusring{outline:auto}.tv-rename-chart-dialog__label a:active{color:#1e88e5;fill:#1e88e5;transition-duration:.06s}.tv-rename-chart-dialog__hint{width:16px;height:16px;vertical-align:middle;display:inline-block;margin-right:5px}.tv-rename-chart-dialog__hint:before{filter:invert(50%);content:url(70464b308617ebaa2bc504b4a50c3463.svg)}.tv-exit-fullscreen-button{z-index:16;position:fixed;top:-1px;right:50%;opacity:.6;background:#fff;color:#848487;border-radius:0 0 3px 3px;border:1px solid #c9cbcd;font-size:11px;width:116px;font-weight:700;padding:2px 4px;cursor:default;margin:0 -59px 0 0}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-exit-fullscreen-button:hover{opacity:1}}button,html input[type=button],input[type=reset],input[type=submit]{cursor:default}.chart-widget{position:absolute;border-style:none;right:0;top:0;width:512px;height:256px;margin:0;padding:0;box-sizing:border-box;overflow:hidden}.chart-header{background-color:#fff;border-bottom:1px solid gray;color:#fff}table.chart-markup-table{border:none;border-collapse:collapse;border-spacing:0;line-height:0;margin:0;padding:0;direction:ltr}.chart-markup-table tr{margin:0;padding:0}td.chart-markup-table{border:none;text-align:right;vertical-align:top;line-height:0;margin:0;padding:0;direction:rtl}.chart-gui-wrapper{width:100%;height:100%;max-width:100%;max-height:100%;position:relative;overflow:hidden;display:flex;align-items:flex-start;direction:ltr}.chart-data-window{position:absolute;width:100%;box-sizing:border-box;border-collapse:collapse;margin:0;padding:0;background-color:#fff;text-align:right;color:#4a4a4a}html.theme-dark .chart-data-window{color:#c5cbce;background-color:#131722}.chart-data-window .box{margin:3px}.chart-data-window .box.with-actions{cursor:pointer}.chart-data-window .box:first-child .chart-data-window-header:first-child{margin-top:0}.chart-data-window .hover .chart-data-window-header .hover-source-icon{display:block}.chart-data-window .active{border-right:2px solid #528cde}.chart-data-window .active .chart-data-window-header{background:#e9f8ff}.chart-data-window .active .chart-data-window-header,.chart-data-window .active .chart-data-window-item .chart-data-window-item-title{padding-right:8px}.chart-data-window .active .chart-data-window-item{font-weight:700}.chart-data-window .hidden{opacity:.3}.chart-data-window .hidden .chart-data-window-item{display:none}.chart-data-window .chart-data-window-header,.chart-data-window .chart-data-window-item{margin-bottom:3px;position:relative}.chart-data-window .chart-data-window-header{padding:9px 10px;background:#f1f3f6;font-weight:700;font-size:12px}html.theme-dark .chart-data-window .chart-data-window-header{background:#262b3e}.chart-data-window .chart-data-window-header .toggle-source-icon{display:block;position:absolute;left:14px;top:11px;width:16px;height:10px}.chart-data-window .chart-data-window-header .toggle-source-icon svg{display:block;width:16px;height:10px;fill:#7d7d7d}html.theme-dark .chart-data-window .chart-data-window-header .toggle-source-icon svg{fill:#758696}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.chart-data-window .chart-data-window-header .toggle-source-icon:hover svg{fill:#2196f3!important}}.chart-data-window .chart-data-window-header .hover-source-icon{display:none;position:absolute;left:40px;top:11px;width:10px;height:10px;border-radius:10px;background:#2196f3}.chart-data-window .chart-data-window-item:last-child{margin-bottom:0}.chart-data-window .chart-data-window-item .chart-data-window-item-title,.chart-data-window .chart-data-window-item .chart-data-window-item-value{width:50%;box-sizing:border-box;padding:4px 10px;display:inline-block;white-space:nowrap}.chart-data-window .chart-data-window-item .chart-data-window-item-title .real-color,.chart-data-window .chart-data-window-item .chart-data-window-item-value .real-color{display:inline-block;width:15px;height:8px;margin-left:15px;border:1px dotted #ccc;cursor:help}.chart-data-window .chart-data-window-item .chart-data-window-item-value{text-align:left}.property-page{color:#4a4a4a;position:relative}html.theme-dark .property-page{color:#c5cbce}.property-page td{white-space:nowrap;padding:3px 4px;height:27px}.property-page td:empty{padding:0}.property-page td:first-child{padding-right:0}.property-page td:last-child{padding-left:0}.property-page.study-properties,.property-page.study-strategy-properties{margin-top:10px}.property-page.study-strategy-properties tr.disabled label{color:#999}.property-page input[type=checkbox]{margin:3px .5ex}.property-page-bandwidth{margin-right:8px;width:55px;vertical-align:middle}.property-page input[type=checkbox]{vertical-align:middle}.property-page td:first-child input[type=checkbox]{margin-right:0}.property-page .tv-text-input{height:25px}.propertypage-name-label{text-transform:capitalize}.properties-tabs{padding:0 25px}.properties-tabs a.properties-tabs-label{padding:0;margin-right:45px;display:inline-block;position:relative;color:#4f5966}html.theme-dark .properties-tabs a.properties-tabs-label{color:#f7f8fa}.properties-tabs a.properties-tabs-label.active{font-weight:700}.properties-tabs a.properties-tabs-label.active:after{content:" ";position:absolute;display:block;bottom:-1px;width:100%;height:3px;background-color:#5cb888}.properties-tabs a.properties-tabs-label.with-filter{padding-bottom:16px}.properties-tabs a.properties-tabs-label:first-child{margin-right:0}.properties-tabs a.properties-tabs-label:last-child{margin-left:40px}.chart-loading-screen{position:absolute;top:0;right:0;width:0;height:0;z-index:4}.chart-loading-screen .chart-loading-screen-shield{width:100%;height:100%;opacity:0;background:red}.chart-loading-screen.fade{width:100%;height:100%}.chart-loading-screen.fade .chart-loading-screen-shield{opacity:.5;transition:opacity .3s ease}.properties-tabs .help{width:15px;height:15px;background:url(180acc64d47073cae241f54fe1659797.png);float:left;margin:1px 0 0 10px}.bar-mark-tooltip{display:none;position:absolute;z-index:14;padding:8px 8px 8px 10px;background:hsla(0,0%,100%,.9);min-height:18px;border:1px solid;border-color:gray}html.theme-dark .bar-mark-tooltip{background:rgba(19,23,34,.9)}.bar-mark-tooltip .text{padding-right:4px;padding-top:2px;max-width:250px;overflow:hidden;text-overflow:ellipsis;display:inline-block;font-size:13px;line-height:13px}.published-charts-tooltip{display:none;position:absolute;z-index:7;padding:8px 8px 8px 30px;background:hsla(0,0%,100%,.9);border:1px solid;height:32px;cursor:default;margin-top:-25px}html.theme-dark .published-charts-tooltip{background:rgba(19,23,34,.9)}.published-charts-tooltip .avatar{position:absolute;top:8px;right:8px;width:32px;height:32px}.published-charts-tooltip .avatar img{width:32px;height:32px}.published-charts-tooltip .pin{background-image:url(7393f661fc7d4389ea6d4dabd2a5aeea.png);width:16px;height:16px;vertical-align:top;position:absolute;top:9px;left:9px;cursor:pointer}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.published-charts-tooltip .pin:hover{background-position:32px 0}}.published-charts-tooltip .pin.pinned{background-position:16px 0}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.published-charts-tooltip .pin.pinned:hover{background-position:16px 0}}.published-charts-tooltip .text{padding-right:39px;max-width:250px;cursor:pointer;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:inline-block;font-size:13px;line-height:15px;color:#4a4a4a;font-weight:700}html.theme-dark .published-charts-tooltip .text{color:#8b8f95}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.published-charts-tooltip .text:hover{text-decoration:underline}}.published-charts-tooltip .username{font-size:11px;color:#8f8f8f;font-weight:400;padding-top:2px;padding-right:39px;white-space:nowrap;line-height:13px}.published-charts-tooltip:after,.published-charts-tooltip:before{right:100%;border:solid transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none}.published-charts-tooltip:after{border-width:1em;top:50%;margin-top:-1em}.published-charts-tooltip:before{border-width:1.1em;top:50%;margin-top:-1.1em}.published-charts-tooltip:not(.right):after{border-color:hsla(0,0%,100%,0);border-right-color:#fff}html.theme-dark .published-charts-tooltip:not(.right):after{border-right-color:#131722}.published-charts-tooltip.right:after{border-color:hsla(0,0%,100%,0);border-left-color:#fff}html.theme-dark .published-charts-tooltip.right:after{border-left-color:#131722}.published-charts-tooltip.right:before{right:-2.2em}.published-charts-tooltip.right:after{right:-2em}.published-charts-tooltip.green{border-color:#78c143}.published-charts-tooltip.red{border-color:#cc4545}.published-charts-tooltip.neutral{border-color:#eac300}.published-charts-tooltip.green:before{border-color:rgba(120,193,67,0);border-right-color:#78c143}.published-charts-tooltip.red:before{border-color:rgba(204,69,69,0);border-right-color:#cc4545}.published-charts-tooltip.neutral:before{border-color:rgba(234,195,0,0);border-right-color:#eac300}.published-charts-tooltip.green.right:before{border-color:rgba(120,193,67,0);border-left-color:#78c143}.published-charts-tooltip.red.right:before{border-color:rgba(204,69,69,0);border-left-color:#cc4545}.published-charts-tooltip.neutral.right:before{border-color:rgba(234,195,0,0);border-left-color:#eac300}.chart-controls-bar{position:absolute;contain:strict;height:39px;box-sizing:border-box;overflow:hidden;border-top:1px solid;border-color:var(--tv-color-platform-background,#e0e3eb);border-radius:0 0 4px 4px;background-color:var(--tv-color-pane-background,#fff)}html.theme-dark .chart-controls-bar{background-color:var(--tv-color-pane-background,#131722);border-color:var(--tv-color-platform-background,#2a2e39)}.no-border-bottom-left-radius .chart-controls-bar{border-bottom-right-radius:0}.no-border-bottom-right-radius .chart-controls-bar{border-bottom-left-radius:0}.charts-popup-list.date-range-popupmenu{margin-right:1px}.charts-popup-list.date-range-popupmenu .item{padding-right:10px;padding-left:10px}@font-face{font-family:FontAwesome;src:url(40f9a03d174178efb12303caa9bc7cd8.woff2) format("woff2"),url(3293616ec0c605c7c2db25829a0a509e.woff) format("woff");font-weight:400;font-style:normal}.ui-draggable{touch-action:none}.chart-gui-button-pseudo-border{content:"";display:block;position:absolute;top:-1px;right:-1px;width:100%;height:100%;border:1px solid;border-color:#b5b7b9;background:transparent;z-index:1}html.theme-dark .chart-gui-button-pseudo-border{border-color:#4c525e}._tv-dialog .button,._tv-dialog .submenu,.bottom-widgetbar-content.backtesting .button,.bottom-widgetbar-content.backtesting .submenu,.properties-toolbar .button,.properties-toolbar .submenu,.widgetbar-widgetheader .button,.widgetbar-widgetheader .submenu{position:relative}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){._tv-dialog .button:not(.disabled):not(.selected):hover:before,._tv-dialog .submenu:not(.disabled):not(.selected):hover:before,.bottom-widgetbar-content.backtesting .button:not(.disabled):not(.selected):hover:before,.bottom-widgetbar-content.backtesting .submenu:not(.disabled):not(.selected):hover:before,.properties-toolbar .button:not(.disabled):not(.selected):hover:before,.properties-toolbar .submenu:not(.disabled):not(.selected):hover:before,.widgetbar-widgetheader .button:not(.disabled):not(.selected):hover:before,.widgetbar-widgetheader .submenu:not(.disabled):not(.selected):hover:before{content:"";display:block;position:absolute;top:-1px;right:-1px;width:100%;height:100%;border:1px solid;border-color:#b5b7b9;background:transparent;z-index:1}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark ._tv-dialog .button:not(.disabled):not(.selected):hover:before,html.theme-dark ._tv-dialog .submenu:not(.disabled):not(.selected):hover:before,html.theme-dark .bottom-widgetbar-content.backtesting .button:not(.disabled):not(.selected):hover:before,html.theme-dark .bottom-widgetbar-content.backtesting .submenu:not(.disabled):not(.selected):hover:before,html.theme-dark .properties-toolbar .button:not(.disabled):not(.selected):hover:before,html.theme-dark .properties-toolbar .submenu:not(.disabled):not(.selected):hover:before,html.theme-dark .widgetbar-widgetheader .button:not(.disabled):not(.selected):hover:before,html.theme-dark .widgetbar-widgetheader .submenu:not(.disabled):not(.selected):hover:before{border-color:#4c525e}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){._tv-dialog .tv-select-container:not(.sbHolderDisabled):hover,.bottom-widgetbar-content.backtesting .tv-select-container:not(.sbHolderDisabled):hover,.properties-toolbar .tv-select-container:not(.sbHolderDisabled):hover,.widgetbar-widgetheader .tv-select-container:not(.sbHolderDisabled):hover{border:1px solid;border-color:#b5b7b9}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark ._tv-dialog .tv-select-container:not(.sbHolderDisabled):hover,html.theme-dark .bottom-widgetbar-content.backtesting .tv-select-container:not(.sbHolderDisabled):hover,html.theme-dark .properties-toolbar .tv-select-container:not(.sbHolderDisabled):hover,html.theme-dark .widgetbar-widgetheader .tv-select-container:not(.sbHolderDisabled):hover{border-color:#4c525e}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.widgetbar-widgetheader .button:hover{border:1px solid;border-color:#f7f8fa}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){html.theme-dark .widgetbar-widgetheader .button:hover{border-color:#4c525e}}.pane{overflow:hidden;cursor:crosshair}.pane--cursor-pointer{cursor:pointer}.pane--cursor-eraser{cursor:url(0579d40b812fa2c3ffe72e5803a6e14c.cur),default}.pane--cursor-dot{cursor:url(ed68e83c16f77203e73dbc4c3a7c7fa1.cur),default}.pane--cursor-default{cursor:default}.pane--cursor-grabbing{cursor:grabbing}.pane--cursor-zoom-in{cursor:zoom-in}.pane--cursor-ew-resize{cursor:ew-resize}.pane--cursor-ns-resize{cursor:ns-resize}.pane--cursor-nwse-resize{cursor:nesw-resize}.pane--cursor-nesw-resize{cursor:nwse-resize}.price-axis-stub-3MoqVLRB .wrapper-1tN_aWXZ{position:absolute;width:100%;height:100%;display:flex;align-items:center;justify-content:center}.price-axis-stub-3MoqVLRB .wrapper-1tN_aWXZ .label-NpaJWak6{display:inline-block;position:relative;width:19px;height:19px;border-radius:50%;background-color:rgba(224,227,235,.5);transform-origin:bottom;z-index:2}.price-axis-stub-3MoqVLRB .wrapper-1tN_aWXZ .label-NpaJWak6 .symbol-2JyFiLZ_{position:absolute;pointer-events:false;opacity:1;z-index:2;color:#50535e;top:50%;bottom:50%;width:100%;text-align:center;font-size:11px}html.theme-dark .price-axis-stub-3MoqVLRB .wrapper-1tN_aWXZ .label-NpaJWak6 .symbol-2JyFiLZ_{color:#50535e}.price-axis-stub-3MoqVLRB .wrapper-1tN_aWXZ .label-NpaJWak6 .gear-3B_8TAjc{position:absolute;pointer-events:false;opacity:0;z-index:3;height:15px;top:2px;right:2px}.price-axis-stub-3MoqVLRB .wrapper-1tN_aWXZ .label-NpaJWak6 .gear-3B_8TAjc svg,html.theme-dark .price-axis-stub-3MoqVLRB .wrapper-1tN_aWXZ .label-NpaJWak6 .gear-3B_8TAjc svg{fill:#131722}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.price-axis-stub-3MoqVLRB:hover .wrapper-1tN_aWXZ .label-NpaJWak6{background-color:rgba(224,227,235,0)}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.price-axis-stub-3MoqVLRB:hover .wrapper-1tN_aWXZ .label-NpaJWak6 .gear-3B_8TAjc{opacity:1}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.price-axis-stub-3MoqVLRB:hover .wrapper-1tN_aWXZ .label-NpaJWak6 .gear-3B_8TAjc svg,html.theme-dark .price-axis-stub-3MoqVLRB:hover .wrapper-1tN_aWXZ .label-NpaJWak6 .gear-3B_8TAjc svg{fill:#000}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.price-axis-stub-3MoqVLRB:hover .wrapper-1tN_aWXZ .label-NpaJWak6 .symbol-2JyFiLZ_{opacity:0}}.price-axis-stub-3MoqVLRB.fixed-gear-IiZPkpoQ .wrapper-1tN_aWXZ .label-NpaJWak6{background-color:transparent}.price-axis-stub-3MoqVLRB.fixed-gear-IiZPkpoQ .wrapper-1tN_aWXZ .label-NpaJWak6 .symbol-2JyFiLZ_{opacity:0}.price-axis-stub-3MoqVLRB.fixed-gear-IiZPkpoQ .wrapper-1tN_aWXZ .label-NpaJWak6 .gear-3B_8TAjc{opacity:1}.price-axis-stub-3MoqVLRB.fixed-symbol-2A_FZK26 .wrapper-1tN_aWXZ .label-NpaJWak6{background-color:rgba(224,227,235,.5)}.price-axis-stub-3MoqVLRB.fixed-symbol-2A_FZK26 .wrapper-1tN_aWXZ .label-NpaJWak6 .gear-3B_8TAjc{opacity:0}.price-axis-stub-3MoqVLRB.fixed-symbol-2A_FZK26 .wrapper-1tN_aWXZ .label-NpaJWak6 .symbol-2JyFiLZ_{opacity:1}.chart-widget__bottom--themed-dark .price-axis-stub-3MoqVLRB .wrapper-1tN_aWXZ .label-NpaJWak6{background-color:rgba(42,46,57,.5)}.chart-widget__bottom--themed-dark .price-axis-stub-3MoqVLRB .wrapper-1tN_aWXZ .label-NpaJWak6 .symbol-2JyFiLZ_,html.theme-dark .chart-widget__bottom--themed-dark .price-axis-stub-3MoqVLRB .wrapper-1tN_aWXZ .label-NpaJWak6 .symbol-2JyFiLZ_{color:#787b86}.chart-widget__bottom--themed-dark .price-axis-stub-3MoqVLRB .wrapper-1tN_aWXZ .label-NpaJWak6 .gear-3B_8TAjc svg,html.theme-dark .chart-widget__bottom--themed-dark .price-axis-stub-3MoqVLRB .wrapper-1tN_aWXZ .label-NpaJWak6 .gear-3B_8TAjc svg{fill:#787b86}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.chart-widget__bottom--themed-dark .price-axis-stub-3MoqVLRB:hover .wrapper-1tN_aWXZ .label-NpaJWak6{background-color:rgba(42,46,57,0)}}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.chart-widget__bottom--themed-dark .price-axis-stub-3MoqVLRB:hover .wrapper-1tN_aWXZ .label-NpaJWak6 .gear-3B_8TAjc svg,html.theme-dark .chart-widget__bottom--themed-dark .price-axis-stub-3MoqVLRB:hover .wrapper-1tN_aWXZ .label-NpaJWak6 .gear-3B_8TAjc svg{fill:#9598a1}}.chart-widget__bottom--themed-dark .price-axis-stub-3MoqVLRB.fixed-symbol-2A_FZK26 .wrapper-1tN_aWXZ .label-NpaJWak6{background-color:rgba(42,46,57,.5)}.chart-widget__bottom--themed-dark .price-axis-stub-3MoqVLRB.fixed-gear-IiZPkpoQ .wrapper-1tN_aWXZ .label-NpaJWak6{background-color:transparent}.price-axis{position:absolute;cursor:default;height:100%;overflow:hidden}.price-axis--cursor-grabbing{cursor:grabbing}.price-axis--cursor-pointer{cursor:pointer}.price-axis--cursor-ns-resize{cursor:ns-resize}.price-axis-currency-label-wrapper-opoVZ91E{position:absolute;-webkit-user-select:none;user-select:none;width:100%;text-align:center;z-index:3;right:0;top:6px}.price-axis-currency-label-1aGvtcW9{display:inline-block;padding:0 4px 0 2px;border-radius:4px;white-space:nowrap;border:1px solid #d1d4dc}.price-axis-currency-label-1aGvtcW9.readonly-OYsh-rpT{padding:0 4px}.price-axis-currency-label-arrow-down-243KKK5C svg{vertical-align:middle;margin-bottom:2px;margin-right:2px}.chart-widget__top--themed-dark .price-axis-currency-label-1aGvtcW9{border-color:#363a45}.pane-separator{position:relative;padding:0;margin:0}.pane-separator .handle{position:absolute;z-index:50;top:-4px;height:9px;right:0;width:100%;cursor:row-resize}.pane-separator .handle.i-active{background:hsla(225,8%,72%,.2)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.pane-separator .handle:hover{background:hsla(225,8%,72%,.2)}}.chart-widget--themed-dark .pane-separator .handle.i-active{background:hsla(225,8%,72%,.12)}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.chart-widget--themed-dark .pane-separator .handle:hover{background:hsla(225,8%,72%,.12)}}.pane-separator .handle.i-active:before{content:"";position:fixed;top:0;right:0;width:100%;height:100%;background:hsla(225,8%,72%,.01);opacity:0}.time-axis{cursor:default}.time-axis--cursor-grabbing{cursor:grabbing}.time-axis--cursor-ew-resize{cursor:ew-resize}.tv-spinner{display:none;position:absolute;width:1em;height:1em;top:calc(50% - .5em);right:calc(50% - .5em);margin:0 auto;color:#37a6ef;animation:tv-spinner__container-rotate .9s linear infinite;will-change:transform;direction:rtl}.tv-spinner--size_mini{font-size:16px}.tv-spinner--size_medium{font-size:32px}.tv-spinner--size_large{font-size:56px}.tv-spinner--size_mini .tv-spinner__width_element:after{border-width:2px}.tv-spinner--size_medium .tv-spinner__width_element:after{border-width:3px}.tv-spinner--size_large .tv-spinner__width_element:after{border-width:4px}.tv-spinner--shown{display:block}.tv-spinner__spinner-layer{position:absolute;width:100%;height:100%;white-space:nowrap;color:currentColor;transform:rotate(-90deg)}.tv-spinner__spinner-layer:after{content:"";position:absolute;box-sizing:border-box;top:0;border-width:.07em;border-radius:50%;right:45%;width:10%;border-top-style:solid}.tv-spinner__background{display:inline-block;position:absolute;width:100%;height:100%;overflow:hidden}.tv-spinner__background:after{content:"";position:absolute;box-sizing:border-box;top:0;right:0;border-radius:50%;bottom:0;width:100%;border-color:rgba(135,151,165,.2);border-style:solid}.tv-spinner__circle-clipper{display:inline-block;position:relative;width:50%;height:100%;overflow:hidden}.tv-spinner__circle-clipper:after{content:"";position:absolute;box-sizing:border-box;top:0;border-radius:50%;bottom:0;width:200%;border-style:solid;border-bottom-color:transparent;animation-duration:1.4s;animation-timing-function:cubic-bezier(.36,0,.37,.99);animation-iteration-count:1;will-change:transform}.tv-spinner__circle-clipper--left:after{right:0;border-left-color:transparent;transform:rotate(0deg);animation-name:tv-spinner__left-spin}.tv-spinner__circle-clipper--right:after{right:-100%;border-right-color:transparent;transform:rotate(124deg);animation-name:tv-spinner__right-spin}@keyframes tv-spinner__container-rotate{to{transform:rotate(-1turn)}}@keyframes tv-spinner__left-spin{0%{transform:rotate(-130deg)}to{transform:rotate(0deg)}}@keyframes tv-spinner__right-spin{0%{transform:rotate(130deg)}to{transform:rotate(124deg)}}.tv-chart-events-source__tooltip{z-index:7;pointer-events:none}.tv-chart-events-source__tooltip--clickable{pointer-events:all}.tv-chart-events-source__tooltip__content{font-size:9pt;line-height:normal;cursor:default}.tv-chart-events-source__tooltip__item{margin-top:6pt;border:0;border-right:6px solid #ffc84a;border-radius:2px;background:#fff;padding:15px 20px;box-shadow:0 2px 7px rgba(0,0,0,.25);color:#131722}html.theme-dark .tv-chart-events-source__tooltip__item{color:#d1d4dc;box-shadow:0 2px 7px rgba(107,121,136,.25);background:#131722}.tv-chart-events-source__tooltip__item.tv-chart-events-source__tooltip__item--importance-normal{background:#fff;border-right-color:#f89e30}.tv-chart-events-source__tooltip__item.tv-chart-events-source__tooltip__item--importance-high{background:#fff;border-right-color:#ff4a68}.tv-chart-events-source__tooltip__item.tv-chart-events-source__tooltip__item--importance-earnings{background:#fff;border-right-color:#ff4d6a}.tv-chart-events-source__tooltip__item.tv-chart-events-source__tooltip__item--importance-splits{background:#fff;border-right-color:#007f0e}.tv-chart-events-source__tooltip__item.tv-chart-events-source__tooltip__item--importance-dividends{background:#fff;border-right-color:#0496ff}.tv-chart-events-source__tooltip__item.tv-chart-events-source__tooltip__item--importance-none{border-right-width:1px;border-right-color:#dadde0}html.theme-dark .tv-chart-events-source__tooltip__item.tv-chart-events-source__tooltip__item--importance-none{border-right-color:#363c4e}.tv-chart-events-source__tooltip__item.tv-chart-events-source__tooltip__item--importance-list{border-right-width:1px;border-right-color:#dadde0;padding:15px 25px 15px 20px;font-size:10pt}html.theme-dark .tv-chart-events-source__tooltip__item.tv-chart-events-source__tooltip__item--importance-list{border-right-color:#363c4e}.tv-chart-events-source__tooltip__item.tv-chart-events-source__tooltip__item--importance-list dl:before{margin-left:5px;position:absolute;right:15px}.tv-chart-events-source__tooltip__item.tv-chart-events-source__tooltip__item--importance-list dl.list-item:not(:first-child){margin-top:12px}.tv-chart-events-source__tooltip__item.tv-chart-events-source__tooltip__item--importance-list dl.list-item:before{content:"\2022"}.tv-chart-events-source__tooltip__item.tv-chart-events-source__tooltip__item--importance-list h2{font-size:10pt}.tv-chart-events-source__tooltip__item dl{margin:0;line-height:1.5}.tv-chart-events-source__tooltip__item dl.actual{color:#000}html.theme-dark .tv-chart-events-source__tooltip__item dl.actual{color:#9db2bd}.tv-chart-events-source__tooltip__item dd,.tv-chart-events-source__tooltip__item dt{margin:0;display:inline}.tv-chart-events-source__tooltip__item h2{font-size:10pt;margin:0 0 4pt}.tv-chart-events-source__tooltip__item a,.tv-chart-events-source__tooltip__item a:active,.tv-chart-events-source__tooltip__item a:visited{color:#2196f3;cursor:pointer}@media (any-hover:hover),(min--moz-device-pixel-ratio:0){.tv-chart-events-source__tooltip__item a:hover{color:#2196f3;cursor:pointer}}table.tv-chart-events-table{margin-top:4pt}table.tv-chart-events-table td,table.tv-chart-events-table th{width:33%;line-height:1.5}table.tv-chart-events-table th{color:#5d606b;font-weight:400}html.theme-dark table.tv-chart-events-table th{color:#9598a1}table.tv-chart-events-table td{font-weight:700}table.tv-chart-events-table td:not(:last-child),table.tv-chart-events-table th:not(:last-child){padding-left:7pt}.tv-chart-events-tooltip-date{line-height:1!important} \ No newline at end of file diff --git a/public/charting_library/bundles/load-chart-dialog.e16c8b92ef347143d8d1.js b/public/charting_library/bundles/load-chart-dialog.e16c8b92ef347143d8d1.js new file mode 100644 index 00000000..707f4f74 --- /dev/null +++ b/public/charting_library/bundles/load-chart-dialog.e16c8b92ef347143d8d1.js @@ -0,0 +1,12 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([["load-chart-dialog"],{"/KDZ":function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var o=n("mrSG"),r=n("q1tI"),i=function(e){function t(t){var n=e.call(this,t)||this;return n._handleChange=function(){n.forceUpdate()},n.state={query:window.matchMedia(n.props.rule)},n}return Object(o.__extends)(t,e),t.prototype.componentDidMount=function(){this._subscribe(this.state.query)},t.prototype.componentDidUpdate=function(e,t){this.state.query!==t.query&&(this._unsubscribe(t.query),this._subscribe(this.state.query))},t.prototype.componentWillUnmount=function(){this._unsubscribe(this.state.query)},t.prototype.render=function(){return this.props.children(this.state.query.matches)},t.getDerivedStateFromProps=function(e,t){return e.rule!==t.query.media?{query:window.matchMedia(e.rule)}:null},t.prototype._subscribe=function(e){e.addListener(this._handleChange)},t.prototype._unsubscribe=function(e){e.removeListener(this._handleChange)},t}(r.PureComponent)},"02pg":function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var o=n("q1tI"),r=n("TSYQ"),i=n("XiJV");function a(e){return o.createElement("div",{className:r(i.separator,e.className)})}},"0lTl":function(e,t,n){e.exports={wrap:"wrap-ghxWUnOu","wrap--horizontal":"wrap--horizontal-1sVOJLqZ",bar:"bar-2ZGFe1r-",barInner:"barInner-2f6z58Ci","barInner--horizontal":"barInner--horizontal-35zIxXob","bar--horizontal":"bar--horizontal-2ofOPj8L"}},"25b6":function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return a})),n.d(t,"a",(function(){return c}));var o=/[<"'&>]/g,r=function(e){return"&#"+e.charCodeAt(0)+";"};function i(e){return e.replace(o,r)}function a(e){return void 0===e&&(e=""),e.replace(/\s+/g,"")}function c(e){return void 0===e&&(e=""),e.replace(/\b\w/g,(function(e){return e.toUpperCase()}))}},"8d0Q":function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return i}));var o=n("q1tI");function r(){var e=Object(o.useState)(!1),t=e[0],n=e[1];return[t,{onMouseOver:function(e){i(e)&&n(!0)},onMouseOut:function(e){i(e)&&n(!1)}}]}function i(e){return!e.currentTarget.contains(e.relatedTarget)}},"9dlw":function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var o=n("mrSG"),r=n("q1tI"),i=n.n(r),a=n("i8i4"),c=n.n(a),l=(n("EsMY"),n("AiMB")),s=n("DTHj"),u=n("X0gx"),d=n("8Rai");function f(e){var t=e.controller,n=e.children,a=e.isOpened,f=e.closeOnClickOutside,m=void 0===f||f,v=e.doNotCloseOn,h=e.onClickOutside,b=e.onClose,p=Object(o.__rest)(e,["controller","children","isOpened","closeOnClickOutside","doNotCloseOn","onClickOutside","onClose"]),g=Object(r.useContext)(u.a),O=Object(d.a)({handler:function(e){h&&h(e);if(!m)return;if(v&&e.target instanceof Node){var t=c.a.findDOMNode(v);if(t instanceof Node&&t.contains(e.target))return}b()},mouseDown:!0,touchStart:!0});return a?i.a.createElement(l.a,{top:"0",left:"0",right:"0",bottom:"0",pointerEvents:"none"},i.a.createElement("span",{ref:O,style:{pointerEvents:"auto"}},i.a.createElement(s.a,Object(o.__assign)({},p,{ +isOpened:a,onClose:b,onScroll:function(t){var n=e.onScroll;n&&n(t);t.stopPropagation()},customCloseDelegate:g,ref:t}),n))):null}},AMW5:function(e,t,n){"use strict";n.r(t);var o=n("q1tI"),r=n.n(o),i=n("i8i4"),a=n("mrSG"),c=n("Eyy1"),l=n("YFKU"),s=n("Vdly"),u=n("qFKp"),d=n("g89m"),f=n("TSYQ"),m=n.n(f),v=n("9dlw"),h=n("Iksw"),b=n("Iivm"),p=n("e5nO"),g=n("UjII"),O=n("HjiN");function w(e){var t=e.sortDirection,n=e.children,i=Object(a.__rest)(e,["sortDirection","children"]),c=Object(o.useRef)(null),l=Object(o.useState)(!1),s=l[0],u=l[1];return r.a.createElement("div",Object(a.__assign)({},i,{ref:c,className:f(O.sortButton,"apply-common-tooltip","common-tooltip-vertical"),onClick:function(){u(!s)}}),r.a.createElement(b.Icon,{className:O.icon,icon:0===t?p:g}),r.a.createElement(v.a,{doNotCloseOn:c.current,isOpened:s,onClose:function(){u(!1)},position:Object(h.c)(c.current,{verticalMargin:-35,verticalAttachEdge:0})},n))}var C=n("N5tr"),E=n("H2qI");function j(e){var t=e.label,n=e.listSortField,r=e.itemSortField,i=e.listSortDirection,c=e.itemSortDirection,l=e.onClick,s=e.className,u=Object(a.__rest)(e,["label","listSortField","itemSortField","listSortDirection","itemSortDirection","onClick","className"]),d=r===n&&c===i;return o.createElement(C.b,Object(a.__assign)({},u,{className:f(E.container,s),label:o.createElement("div",{className:E.labelWrap},o.createElement(b.Icon,{className:E.icon,icon:0===c?p:g}),o.createElement("span",{className:E.text},t)),isActive:d,onClick:function(){l(r,c)},"data-active":d.toString(),"data-sort-field":r,"data-sort-direction":0===c?"asc":"desc"}))}var _=n("QHWU"),y=n("IePd");function N(e){var t=e.children,n=e.className;return r.a.createElement("div",{className:m()(y.container,n)},t)}function S(e){var t=e.title;return r.a.createElement("div",{className:y.title},t)}var k=n("Hr11"),D=n("Ialn"),x=n("0lTl");function T(e){var t,n,i=e.size,a=e.scrollSize,l=e.clientSize,s=e.scrollProgress,u=e.onScrollProgressChange,d=e.horizontal,f=e.theme,v=void 0===f?x:f,h=e.onDragStart,b=e.onDragEnd,p=e.minBarSize,g=void 0===p?40:p,O=Object(o.useRef)(null),w=Object(o.useRef)(null),C=Object(o.useState)(!1),E=C[0],j=C[1],_=Object(o.useRef)(0);Object(o.useEffect)((function(){if(E){h&&h();var e=Object(c.ensureNotNull)(O.current).ownerDocument;e&&(e.addEventListener("mousemove",M),e.addEventListener("mouseup",I))}else b&&b();return function(){var e=Object(c.ensureNotNull)(O.current).ownerDocument;e&&(e.removeEventListener("mousemove",M),e.removeEventListener("mouseup",I))}}),[E]);var y=i/a||0,N=l*y||0,S=Math.max(N,g),T=(i-S)/(i-N),F=function(e){if(Object(D.isRtl)()&&d)return e-a+l;return e}(Object(k.clamp)(s,0,a-i));return r.a.createElement("div",{ref:O,className:m()(v.wrap,d&&v["wrap--horizontal"]),style:(t={},t[d?"width":"height"]=i,t),onMouseDown:function(e){if(e.isDefaultPrevented())return;e.preventDefault();var t=Object(c.ensureNotNull)(w.current).getBoundingClientRect();_.current=(d?t.width:t.height)/2;var n=a-i,o=A(e.nativeEvent,Object(c.ensureNotNull)(O.current))-_.current;o<0?(o=0, +_.current=A(e.nativeEvent,Object(c.ensureNotNull)(O.current))):o>n*y*T&&(o=n*y*T,_.current=A(e.nativeEvent,Object(c.ensureNotNull)(O.current))-o);u(o/y/T),j(!0)}},r.a.createElement("div",{ref:w,className:m()(v.bar,d&&v["bar--horizontal"]),style:(n={},n[d?"minWidth":"minHeight"]=g,n[d?"width":"height"]=S,n.transform="translate"+(d?"X":"Y")+"("+(F*y*T||0)+"px)",n),onMouseDown:function(e){e.preventDefault(),_.current=A(e.nativeEvent,Object(c.ensureNotNull)(w.current)),j(!0)}},r.a.createElement("div",{className:m()(v.barInner,d&&v["barInner--horizontal"])})));function M(e){var t=A(e,Object(c.ensureNotNull)(O.current))-_.current;u(t/y/T)}function I(e){j(!1)}function A(e,t){var n=t.getBoundingClientRect();return d?e.clientX-n.left:e.clientY-n.top}}var F=n("8d0Q"),M=n("ya27");function I(e){var t=e.reference,n=e.className,i=e.containerHeight,c=void 0===i?0:i,l=e.containerWidth,s=void 0===l?0:l,u=e.contentHeight,d=void 0===u?0:u,m=e.contentWidth,v=void 0===m?0:m,h=e.scrollPosTop,b=void 0===h?0:h,p=e.scrollPosLeft,g=void 0===p?0:p,O=e.onVerticalChange,w=e.onHorizontalChange,C=e.visible,E=Object(F.b)(),j=E[0],_=E[1],y=Object(o.useState)(!1),N=y[0],S=y[1],k=c0;)m+=i,d((function(e){return e+i}));a=t.length-m>0?n(r,{timeout:500}):null,f.current&&f.current()},a=n(r,{timeout:500});return function(){null!==a&&o(a)}}),[t.length]),r.a.createElement(r.a.Fragment,null,t.slice(0,u))}var L=n("tmL0"),B={onMouseOver:function(){},onMouseOut:function(){}};var R=n("ntBy");function z(e){var t=e.className,n=e.listKey,i=e.data,l=e.renderItem,s=e.onScroll,d=e.onTouchStart,f=function(e){var t=Object(o.useRef)(null),n=e||Object(o.useRef)(null),r=Object(F.b)(),i=r[0],l=r[1],s=Object(o.useState)({reference:t,containerHeight:0,containerWidth:0,contentHeight:0,contentWidth:0,scrollPosTop:0,scrollPosLeft:0,onVerticalChange:function(e){f((function(t){return Object(a.__assign)(Object(a.__assign)({},t),{scrollPosTop:e})})),Object(c.ensureNotNull)(n.current).scrollTop=e}, +onHorizontalChange:function(e){f((function(t){return Object(a.__assign)(Object(a.__assign)({},t),{scrollPosLeft:e})})),Object(c.ensureNotNull)(n.current).scrollLeft=e},visible:i}),d=s[0],f=s[1],m=Object(o.useCallback)((function(){if(n.current){var e=n.current,o=e.clientHeight,r=e.scrollHeight,i=e.scrollTop,c=e.clientWidth,l=e.scrollWidth,s=e.scrollLeft,u=t.current?t.current.offsetTop:0;f((function(e){return Object(a.__assign)(Object(a.__assign)({},e),{containerHeight:o-u,contentHeight:r-u,scrollPosTop:i,containerWidth:c,contentWidth:l,scrollPosLeft:s})}))}}),[]);function v(){f((function(e){return Object(a.__assign)(Object(a.__assign)({},e),{scrollPosTop:Object(c.ensureNotNull)(n.current).scrollTop,scrollPosLeft:Object(c.ensureNotNull)(n.current).scrollLeft})}))}return Object(o.useEffect)((function(){i&&m(),f((function(e){return Object(a.__assign)(Object(a.__assign)({},e),{visible:i})}))}),[i]),Object(o.useEffect)((function(){return n.current&&n.current.addEventListener("scroll",v),function(){n.current&&n.current.removeEventListener("scroll",v)}}),[n]),[d,u.CheckMobile.any()?B:l,n,m]}(e.reference),v=f[0],h=f[1],b=f[2],p=f[3],g=Object(o.useMemo)((function(){return i.map(l)}),[i,l]);return r.a.createElement(L.a,Object(a.__assign)({},h,{reference:b,className:m()(R.scrollContainer,t),onScroll:s,onTouchStart:d}),r.a.createElement("div",{className:R.overlapScrollWrap},r.a.createElement(I,Object(a.__assign)({},v))),r.a.createElement(A,{key:n,initCount:10,items:g,onUpdate:p}))}var P=n("ldgD"),W=n.n(P),q=n("BxxN"),H=n("dTSQ"),Q=n("pr86"),U=n("i/MG"),Y=n("xp8i");function K(e){var t=e.searchString,n=e.text,i=e.isActive;if(!t)return r.a.createElement(r.a.Fragment,null,n);var a=Object(o.useMemo)((function(){return n.split(new RegExp("("+Object(H.regExpEscape)(t)+")","i"))}),[t]);return r.a.createElement(r.a.Fragment,null,a.map((function(e,t){return t%2?r.a.createElement("span",{key:t,className:m()(Y.highlight,i&&Y.active)},e):r.a.createElement(r.a.Fragment,{key:t},e)})))}function G(e){var t=e.url,n=e.title,o=e.renderTitle,i=e.subtitle,c=e.removeBtnLabel,l=e.onClick,s=e.onClickFavorite,d=e.onClickRemove,f=e.isActive,v=e.isFavorite,h=e.isMobile,b=void 0!==h&&h,p=e.showFavorite,g=void 0===p||p,O=Object(a.__rest)(e,["url","title","renderTitle","subtitle","removeBtnLabel","onClick","onClickFavorite","onClickRemove","isActive","isFavorite","isMobile","showFavorite"]);return r.a.createElement("a",Object(a.__assign)({},O,{className:m()(Y.itemRow,f&&Y.active,b&&Y.mobile),onClick:X.bind(null,l),href:t,"data-role":"list-item","data-active":f}),g&&s&&r.a.createElement(Q.a,{className:m()(Y.favoriteButton,v&&Y.favorite,u.CheckMobile.any()&&Y.mobile),isActive:f,isFilled:v,onClick:X.bind(null,s),"data-name":"list-item-favorite-button","data-favorite":v}),r.a.createElement("div",{className:m()(Y.itemInfo,!g&&Y.itemInfoWithPadding)},r.a.createElement("div",{className:m()(Y.title,f&&Y.active,b&&Y.mobile),"data-name":"list-item-title"},o||n),r.a.createElement("div",{className:m()(Y.details,f&&Y.active,b&&Y.mobile)},i)),r.a.createElement(U.a,{ +className:Y.removeButton,isActive:f,onClick:X.bind(null,d),"data-name":"list-item-remove-button",title:c}))}function X(e,t){t.defaultPrevented||(t.preventDefault(),e(t))}var J=n("pPtI"),Z=n("+EG+"),V=n("oNDq"),$=n("25b6");var ee=Object(l.t)("Do you really want to delete Chart Layout '{0}' ?");function te(e){var t;try{t=Object(J.getTranslatedResolution)(e)}catch(n){t=e}return t}function ne(e){var t=e.chart,n=e.chartWidgetCollection,i=(e.trackEvent,e.localFavorites),c=(e.onClose,e.searchString),l=e.onClickRemove,s=e.onRemoveCanceled,u=Object(o.useState)((function(){return t.active()})),d=u[0],f=u[1],m=Object(q.a)({chartId:t.url}),v=Object(o.useContext)(Z.b);return Object(o.useEffect)((function(){return n&&n.metaInfo.id.subscribe(b),function(){n&&n.metaInfo.id.unsubscribe(b)}}),[]),r.a.createElement(G,{url:m,title:r.a.createElement(K,{searchString:c,isActive:d,text:t.title}),subtitle:r.a.createElement(r.a.Fragment,null,r.a.createElement(K,{searchString:c,isActive:d,text:t.symbol}),", ",r.a.createElement(K,{searchString:c,isActive:d,text:te(t.interval)})," ","(",W.a.unix(t.modified).format("DD.MM.YYYY HH:mm"),")"),onClick:function(e){0;t.openAction(),!1},onClickFavorite:function(){0;var e=Object(a.__assign)({},i);e[t.id]?delete e[t.id]:e[t.id]=!0;t.favoriteAction(e)},onClickRemove:function(){!function(e,t,n,o){Object(V.createConfirmDialog)({content:Object($.b)(e),manager:o||void 0}).then((function(e){e.on("action:yes",(function(){t(),e.close()})),e.on("afterClose",(function(){return n()})),e.open()}))}(ee.format(t.title),h,s,v)},isFavorite:Boolean(i[t.id]),isActive:d,"data-name":"load-chart-dialog-item"});function h(){t.deleteAction().then((function(){return l(t.id)}))}function b(e){f(t.id===e)}}var oe=n("tWVy"),re=n("YCUu"),ie={sortField:"modified",sortDirection:1};function ae(e){var t=e.charts,n=e.onClose,i=e.favoriteChartsService,l=e.chartWidgetCollection,f=Object(o.useState)(""),m=f[0],v=f[1],h=Object(o.useState)(m),b=h[0],p=h[1],g=Object(o.useState)([]),O=g[0],C=g[1],E=Object(o.useRef)(null),y=Object(o.useState)((function(){return i.get()})),k=y[0],D=y[1],x=Object(o.useState)((function(){return s.getJSON("loadChartDialog.viewState",ie)})),T=x[0],F=x[1],M=Object(o.useRef)(null);Object(o.useEffect)((function(){u.CheckMobile.any()||Object(c.ensureNotNull)(M.current).focus()}),[]);var I=null;Object(o.useEffect)((function(){I&&I()}),[m,O]);var A=Object(o.useRef)();Object(o.useEffect)((function(){return A.current=setTimeout((function(){v(b)}),300),function(){clearTimeout(A.current)}}),[b]),Object(o.useEffect)((function(){return i.getOnChange().subscribe(null,q),function(){i.getOnChange().unsubscribe(null,q)}}),[]);var L=Object(o.useMemo)((function(){return Object(a.__spreadArrays)(t).sort((e=T.sortDirection,function(t,n){if(k[t.id]&&!k[n.id])return-1;if(!k[t.id]&&k[n.id])return 1;var o=0===e?1:-1;return"modified"===T.sortField?o*(t.modified-n.modified):o*t.title.localeCompare(n.title)})).filter((function(e){return!O.includes(e.id)&&(Q(e.title)||Q(e.symbol)||Q(te(e.interval)))}));var e}),[m,T,O,k]) +;return r.a.createElement(d.a,{ref:E,onClose:n,onClickOutside:n,isOpened:!0,title:window.t("Load layout"),dataName:"load-layout-dialog",render:function(e){var t=e.requestResize;return I=t,r.a.createElement(r.a.Fragment,null,r.a.createElement(_.a,{reference:M,onChange:R,placeholder:window.t("Search")}),r.a.createElement(N,null,r.a.createElement(S,{title:window.t("Layout name")}),r.a.createElement(w,{sortDirection:T.sortDirection,title:window.t("Sort by layout name, date changed"),"data-name":"load-chart-dialog-sort-button"},r.a.createElement(j,{label:window.t("Layout name (A to Z)"),listSortField:T.sortField,itemSortField:"title",listSortDirection:T.sortDirection,itemSortDirection:0,onClick:U,"data-name":"load-chart-dialog-sort-menu-item"}),r.a.createElement(j,{label:window.t("Layout name (Z to A)"),listSortField:T.sortField,itemSortField:"title",listSortDirection:T.sortDirection,itemSortDirection:1,onClick:U,"data-name":"load-chart-dialog-sort-menu-item"}),r.a.createElement(j,{label:window.t("Date modified (oldest first)"),listSortField:T.sortField,itemSortField:"modified",listSortDirection:T.sortDirection,itemSortDirection:0,onClick:U,"data-name":"load-chart-dialog-sort-menu-item"}),r.a.createElement(j,{label:window.t("Date modified (newest first)"),listSortField:T.sortField,itemSortField:"modified",listSortDirection:T.sortDirection,itemSortDirection:1,onClick:U,"data-name":"load-chart-dialog-sort-menu-item"}))),r.a.createElement(z,{listKey:[m,T.sortField,T.sortDirection].join("_"),className:re.contentList,data:L,onScroll:B,renderItem:function(e){return r.a.createElement(ne,{key:(k[e.id]?"f_":"")+e.id,chart:e,onClose:n,chartWidgetCollection:l,trackEvent:P,onRemoveCanceled:H,localFavorites:k,searchString:m,onClickRemove:W})}}))}});function B(){oe.a.fire()}function R(e){var t=e.currentTarget.value;p(t)}function P(e){0}function W(e){C(Object(a.__spreadArrays)([e],O))}function q(e){D(e)}function H(){Object(c.ensureNotNull)(E.current).focus()}function Q(e){return e.toLowerCase().includes(m.toLowerCase())}function U(e,t){var n={sortField:e,sortDirection:t};F(n),s.setValue("loadChartDialog.viewState",JSON.stringify(n),{forceFlush:!0}),P()}}function ce(e,t,n){var r=document.createElement("div");i.render(o.createElement(ae,{charts:e,favoriteChartsService:t,chartWidgetCollection:n,onClose:function(){i.unmountComponentAtNode(r)}}),r)}n.d(t,"showLoadChartDialog",(function(){return ce}))},ASyk:function(e,t,n){e.exports={"tablet-normal-breakpoint":"screen and (max-width: 768px)","small-height-breakpoint":"screen and (max-height: 360px)","tablet-small-breakpoint":"screen and (max-width: 419px)"}},H2qI:function(e,t,n){e.exports={container:"container-3Qk84Vpk",labelWrap:"labelWrap-1kffAsJL",icon:"icon-3s9Fy0WO",text:"text-1ie73mtL"}},HjiN:function(e,t,n){e.exports={sortButton:"sortButton-16hjqEoU",icon:"icon-2nbSQjFT"}},IePd:function(e,t,n){e.exports={container:"container-1oGzHiUj",title:"title-2FsC4R5h"}},Iksw:function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){ +return s}));var o,r,i,a,c=n("Eyy1");!function(e){e[e.Top=0]="Top",e[e.Bottom=1]="Bottom"}(o||(o={})),function(e){e[e.Left=0]="Left",e[e.Right=1]="Right"}(r||(r={})),function(e){e[e.FromTopToBottom=0]="FromTopToBottom",e[e.FromBottomToTop=1]="FromBottomToTop"}(i||(i={})),function(e){e[e.FromLeftToRight=0]="FromLeftToRight",e[e.FromRightToLeft=1]="FromRightToLeft"}(a||(a={}));var l={verticalAttachEdge:o.Bottom,horizontalAttachEdge:r.Left,verticalDropDirection:i.FromTopToBottom,horizontalDropDirection:a.FromLeftToRight,verticalMargin:0,horizontalMargin:0};function s(e,t){return function(n,s){var u=Object(c.ensureNotNull)(e).getBoundingClientRect(),d=t.verticalAttachEdge,f=void 0===d?l.verticalAttachEdge:d,m=t.verticalDropDirection,v=void 0===m?l.verticalDropDirection:m,h=t.horizontalAttachEdge,b=void 0===h?l.horizontalAttachEdge:h,p=t.horizontalDropDirection,g=void 0===p?l.horizontalDropDirection:p,O=t.horizontalMargin,w=void 0===O?l.horizontalMargin:O,C=t.verticalMargin,E=void 0===C?l.verticalMargin:C,j=f===o.Top?-1*E:E,_=b===r.Right?u.right:u.left,y=f===o.Top?u.top:u.bottom;return{x:_-(g===a.FromRightToLeft?n:0)+w,y:y-(v===i.FromBottomToTop?s:0)+j}}}},ItnF:function(e,t,n){e.exports={dialog:"dialog-2QwUBM-N",wrapper:"wrapper-3ePvQMAQ",separator:"separator-1L40XQyb"}},MyWJ:function(e,t,n){e.exports={container:"container-jKs34Xgq",inputContainer:"inputContainer-1KMWEbBN",withCancel:"withCancel-2WUzxNv9",input:"input-2pz7DtzH",icon:"icon-3SNZP2-_",cancel:"cancel-CnoMjYid"}},N5tr:function(e,t,n){"use strict";n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return v}));var o=n("mrSG"),r=n("q1tI"),i=n.n(r),a=n("TSYQ"),c=n("tWVy"),l=n("JWMC"),s=n("QpNh"),u=n("v1bN"),d=u;function f(e){var t=e.reference,n=Object(o.__rest)(e,["reference"]),r=Object(o.__assign)(Object(o.__assign)({},n),{ref:t});return i.a.createElement(e.href?"a":"div",r)}function m(e){e.stopPropagation()}function v(e){var t,n,d,v=e.className,h=e.title,b=e.labelRowClassName,p=e.shortcut,g=e.forceShowShortcuts,O=e.icon,w=e.isActive,C=e.isDisabled,E=e.isHovered,j=e.appearAsDisabled,_=e.label,y=e.link,N=e.showToolboxOnHover,S=e.target,k=e.toolbox,D=e.reference,x=e.onMouseOut,T=e.onMouseOver,F=e.theme,M=void 0===F?u:F,I=Object(s.a)(e),A=Object(r.useRef)(null);return i.a.createElement(f,Object(o.__assign)({},I,{className:a(v,M.item,O&&M.withIcon,(t={},t[M.isActive]=w,t[M.isDisabled]=C||j,t[M.hovered]=E,t)),title:h,href:y,target:S,reference:function(e){A.current=e,D&&D(e)},onClick:function(t){var n=e.dontClosePopup,o=e.onClick,r=e.onClickArg,i=e.trackEventObject;if(C)return;i&&Object(l.trackEvent)(i.category,i.event,i.label);o&&o(r,t);n||Object(c.b)()},onContextMenu:function(t){var n=e.trackEventObject,o=e.trackRightClick;n&&o&&Object(l.trackEvent)(n.category,n.event,n.label+"_rightClick")},onMouseUp:function(t){var n=e.trackEventObject,o=e.trackMouseWheelClick;if(1===t.button&&y&&n){var r=n.label;o&&(r+="_mouseWheelClick"),Object(l.trackEvent)(n.category,n.event,r)}},onMouseOver:T,onMouseOut:x}),void 0!==O&&i.a.createElement("div",{className:M.icon, +dangerouslySetInnerHTML:{__html:O}}),i.a.createElement("div",{className:a(M.labelRow,b)},i.a.createElement("div",{className:M.label},_)),(void 0!==p||g)&&i.a.createElement("div",{className:M.shortcut},(d=p)&&d.split("+").join(" + ")),void 0!==k&&i.a.createElement("div",{onClick:m,className:a(M.toolbox,(n={},n[M.showOnHover]=N,n))},k))}},QHWU:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var o=n("mrSG"),r=n("q1tI"),i=n.n(r),a=n("TSYQ"),c=n.n(a),l=n("YFKU"),s=n("Iivm"),u=n("hYdZ"),d=n("MyWJ");function f(e){var t=e.children,n=e.renderInput,r=e.onCancel,a=Object(o.__rest)(e,["children","renderInput","onCancel"]);return i.a.createElement("div",{className:d.container},i.a.createElement("div",{className:c()(d.inputContainer,r&&d.withCancel)},n||i.a.createElement(m,Object(o.__assign)({},a))),t,i.a.createElement(s.Icon,{className:d.icon,icon:u}),r&&i.a.createElement("div",{className:d.cancel,onClick:r},Object(l.t)("Cancel")))}function m(e){var t=e.className,n=e.reference,r=e.value,a=e.onChange,l=e.onFocus,s=e.onBlur,u=e.onKeyDown,f=e.onSelect,m=e.placeholder,v=Object(o.__rest)(e,["className","reference","value","onChange","onFocus","onBlur","onKeyDown","onSelect","placeholder"]);return i.a.createElement("input",Object(o.__assign)({},v,{ref:n,type:"text",className:c()(t,d.input),autoComplete:"off","data-role":"search",placeholder:m,value:r,onChange:a,onFocus:l,onBlur:s,onSelect:f,onKeyDown:u}))}},To8B:function(e,t){e.exports=''},UjII:function(e,t){e.exports=''},XfUw:function(e,t){e.exports=''},XiJV:function(e,t,n){e.exports={separator:"separator-1TZB5HZ-"}},YCUu:function(e,t,n){e.exports={contentList:"contentList-VpXJB1aY"}},e5nO:function(e,t){e.exports=''},fEjm:function(e,t,n){e.exports={favorite:"favorite-2V8VHwKe",disabled:"disabled-3ebwimbb",active:"active-3pQAvYvT",checked:"checked-2bhy04CF"}},g89m:function(e,t,n){"use strict" +;var o=n("mrSG"),r=n("q1tI"),i=n.n(r),a=n("Eyy1"),c=n("TSYQ"),l=n.n(c),s=n("/3z9"),u=n("d700"),d=n("WXjp"),f=n("02pg"),m=n("uhCe"),v=n("/KDZ"),h=n("pafz"),b=n("ZjKI"),p=n("FQhm"),g=n("Iivm"),O=n("zztK"),w=n("px1m");function C(e){var t=e.title,n=e.subtitle,o=e.onClose,r=e.renderBefore,a=e.renderAfter,c=e.draggable;return i.a.createElement("div",{className:l()(w.container,n&&w.unsetAlign)},r,i.a.createElement("div",{"data-dragg-area":c,className:w.title},i.a.createElement("div",{className:w.ellipsis},t),n&&i.a.createElement("div",{className:l()(w.ellipsis,w.subtitle)},n)),a,i.a.createElement(g.Icon,{className:w.close,icon:O,onClick:o,"data-name":"close","data-role":"button"}))}var E=n("ItnF");n.d(t,"a",(function(){return y}));var j={vertical:20},_={vertical:0},y=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._controller=null,t._reference=null,t._renderChildren=function(e,n){return t._controller=e,t.props.render({requestResize:t._requestResize,centerAndFit:t._centerAndFit,isSmallWidth:n})},t._handleReference=function(e){return t._reference=e},t._handleClose=function(){t.props.onClose()},t._handleKeyDown=function(e){if(!e.defaultPrevented)switch(t.props.onKeyDown&&t.props.onKeyDown(e),Object(s.hashFromEvent)(e)){case 27:if(e.defaultPrevented)return;if(t.props.forceCloseOnEsc&&t.props.forceCloseOnEsc())return void t._handleClose();var n=document.activeElement,o=Object(a.ensureNotNull)(t._reference);if(null!==n){if(e.preventDefault(),N(n))return void t._handleClose();if(Object(u.b)(n))return void o.focus();if(o.contains(n))return void t._handleClose()}}},t._requestResize=function(){null!==t._controller&&t._controller.recalculateBounds()},t._centerAndFit=function(){null!==t._controller&&t._controller.centerAndFit()},t}return Object(o.__extends)(t,e),t.prototype.componentDidMount=function(){p.subscribe(b.CLOSE_POPUPS_AND_DIALOGS_COMMAND,this._handleClose,null)},t.prototype.componentWillUnmount=function(){p.unsubscribe(b.CLOSE_POPUPS_AND_DIALOGS_COMMAND,this._handleClose,null)},t.prototype.focus=function(){Object(a.ensureNotNull)(this._reference).focus()},t.prototype.getElement=function(){return this._reference},t.prototype.render=function(){var e=this,t=this.props,n=t.className,o=t.isOpened,r=t.title,a=t.dataName,c=t.onClickOutside,s=t.additionalElementPos,u=t.additionalHeaderElement,b=t.backdrop,p=t.shouldForceFocus,g=void 0===p||p,O=t.showSeparator,w=t.subtitle,y=t.draggable,N=void 0===y||y,S=t.fullScreen,k=void 0!==S&&S,D=t.isAnimationEnabled,x=t.growPoint,T=t.dialogTooltip,F="after"!==s?u:void 0,M="after"===s?u:void 0;return i.a.createElement(v.a,{rule:m.a.SmallHeight},(function(t){return i.a.createElement(v.a,{rule:m.a.TabletSmall},(function(s){return i.a.createElement(d.a,{className:l()(E.dialog,n),isOpened:o,reference:e._handleReference,onKeyDown:e._handleKeyDown,onClickOutside:c,onClickBackdrop:c,fullscreen:s||k,guard:t?_:j,boundByScreen:s||k,shouldForceFocus:g,backdrop:b,draggable:N,isAnimationEnabled:D,growPoint:x,name:e.props.dataName,dialogTooltip:T},i.a.createElement("div",{ +className:E.wrapper,"data-name":a,"data-dialog-name":r},i.a.createElement(C,{draggable:N&&!(s||k),onClose:e._handleClose,renderAfter:M,renderBefore:F,subtitle:w,title:r}),O&&i.a.createElement(f.a,{className:E.separator}),i.a.createElement(h.a.Consumer,null,(function(t){return e._renderChildren(t,s||k)}))))}))}))},t}(i.a.PureComponent);function N(e){return"true"===e.getAttribute("data-haspopup")&&"true"!==e.getAttribute("data-expanded")}},hYdZ:function(e,t){e.exports=''},"i/MG":function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var o=n("mrSG"),r=(n("YFKU"),n("q1tI")),i=n("TSYQ"),a=n("Iivm"),c=n("To8B"),l=n("kXJy"),s={remove:window.t("Remove")};function u(e){var t=e.className,n=e.isActive,u=e.onClick,d=e.title,f=e.hidden,m=e["data-name"],v=void 0===m?"remove-button":m,h=Object(o.__rest)(e,["className","isActive","onClick","title","hidden","data-name"]);return r.createElement(a.Icon,Object(o.__assign)({},h,{"data-name":v,className:i(l.button,"apply-common-tooltip",n&&l.active,f&&l.hidden,t),icon:c,onClick:u,title:d||s.remove}))}},kXJy:function(e,t,n){e.exports={button:"button-1scLo53s",disabled:"disabled-2eJ5fvUz",active:"active-2T0ofIIp",hidden:"hidden-2GRQzIQ1"}},ntBy:function(e,t,n){e.exports={overlapScrollWrap:"overlapScrollWrap-236iNA0w",scrollContainer:"scrollContainer-1OsLRrZC"}},pr86:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var o=n("mrSG"),r=(n("YFKU"),n("q1tI")),i=n("TSYQ"),a=n("Iivm"),c=n("sg5d"),l=n("XfUw"),s=n("fEjm"),u={add:window.t("Add to favorites"),remove:window.t("Remove from favorites")};function d(e){var t=e.className,n=e.isFilled,d=e.isActive,f=e.onClick,m=Object(o.__rest)(e,["className","isFilled","isActive","onClick"]);return r.createElement(a.Icon,Object(o.__assign)({},m,{className:i(s.favorite,"apply-common-tooltip",n&&s.checked,d&&s.active,t),icon:n?c:l,onClick:f,title:n?u.remove:u.add}))}},px1m:function(e,t,n){e.exports={"small-height-breakpoint":"screen and (max-height: 360px)",container:"container-12F9cTKw",unsetAlign:"unsetAlign-39w7dDTj",title:"title-TQFObfxW",subtitle:"subtitle-EM1kLgFz",ellipsis:"ellipsis-1PT8QOxq",close:"close-3NTwKnT_"}},sg5d:function(e,t){e.exports=''},tmL0:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var o=n("mrSG"),r=n("q1tI"),i=n.n(r),a=n("x0D+"),c=n("Eyy1"),l=n("qFKp");function s(e){var t=e.reference,n=e.children,c=Object(o.__rest)(e,["reference","children"]),s=Object(r.useRef)(null),d=Object(r.useCallback)((function(e){t&&(t.current=e),l.CheckMobile.iOS()&&(null!==s.current&&Object(a.enableBodyScroll)(s.current),s.current=e,null!==s.current&&Object(a.disableBodyScroll)(s.current,{allowTouchMove:u(s)}))}),[t]) +;return i.a.createElement("div",Object(o.__assign)({ref:d},c),n)}function u(e){return function(t){var n=Object(c.ensureNotNull)(e.current),o=document.activeElement;return!n.contains(t)||null!==o&&n.contains(o)&&o.contains(t)}}},uhCe:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var o=n("ASyk"),r={SmallHeight:o["small-height-breakpoint"],TabletSmall:o["tablet-small-breakpoint"],TabletNormal:o["tablet-normal-breakpoint"]}},v1bN:function(e,t,n){e.exports={"tablet-small-breakpoint":"screen and (max-width: 419px)",item:"item-2xPVYue0",hovered:"hovered-1uf45E05",isDisabled:"isDisabled-1wLqKupj",isActive:"isActive-2j-GhQs_",shortcut:"shortcut-30pveiCO",toolbox:"toolbox-3ulPxfe-",withIcon:"withIcon-1xBjf-oB",icon:"icon-2Qm7YIcz",labelRow:"labelRow-3Q0rdE8-",label:"label-3Xqxy756",showOnHover:"showOnHover-1q6ySzZc"}},"x0D+":function(e,t,n){var o,r,i;r=[t],void 0===(i="function"==typeof(o=function(e){"use strict";function t(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t'}}]); \ No newline at end of file diff --git a/public/charting_library/bundles/lt-pane-views.76c625b2832b40301126.js b/public/charting_library/bundles/lt-pane-views.76c625b2832b40301126.js new file mode 100644 index 00000000..e8498d97 --- /dev/null +++ b/public/charting_library/bundles/lt-pane-views.76c625b2832b40301126.js @@ -0,0 +1,96 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([["lt-pane-views"],{"/S7V":function(e,t,i){"use strict";i.r(t),i.d(t,"TriangleRenderer",(function(){return c}));var r=i("mrSG"),n=i("GEp6"),a=i("f6yo"),s=i("VaSN"),o=i("cPgM"),l=i("VdBB"),h=i("Tmoa"),d=i("jFln"),c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._data=null,t}return Object(r.__extends)(t,e),t.prototype.setData=function(e){this._data=e},t.prototype.hitTest=function(e){if(null===this._data||this._data.points.length<2)return null;var t=this._data.points,i=t[0],r=t[1],o=Object(n.distanceToSegment)(i,r,e),h=Object(s.lastEventIsTouch)()?24:3;if(o.distance<=h)return new l.HitTestResult(l.HitTestResult.MOVEPOINT);if(3!==this._data.points.length)return null;var d=this._data.points[2];return(o=Object(n.distanceToSegment)(r,d,e)).distance<=h||(o=Object(n.distanceToSegment)(d,i,e)).distance<=h?new l.HitTestResult(l.HitTestResult.MOVEPOINT):this._data.fillBackground&&Object(a.pointInTriangle)(i,r,d,e)?new l.HitTestResult(l.HitTestResult.MOVEPOINT_BACKGROUND):null},t.prototype._drawImpl=function(e){if(!(null===this._data||this._data.points.length<2)){e.lineCap="butt",e.strokeStyle=this._data.color,e.lineWidth=this._data.linewidth,void 0!==this._data.linestyle&&Object(d.setLineStyle)(e,this._data.linestyle);var t=this._data.points,i=t[0],r=t[1],n=2===this._data.points.length?r:this._data.points[2];e.beginPath(),e.moveTo(i.x,i.y),e.lineTo(r.x,r.y),e.lineTo(n.x,n.y),e.lineTo(i.x,i.y),this._data.fillBackground&&(e.fillStyle=Object(h.generateColor)(this._data.backcolor,this._data.transparency),e.fill()),e.stroke()}},t}(o.ScaledPaneRenderer)},"00XE":function(e,t,i){"use strict";var r=i("aO4+").Point,n=i("aB9a").LineSourcePaneView,a=i("BCbF").PolygonRenderer,s=i("vq8G").SelectionRenderer,o=i("Zy3/").CompositeRenderer,l=i("VdBB").HitTestResult;function h(e,t){n.call(this,e,t),this._model=t,this._source=e,this._poligonRenderer=new a,this._renderer=null}inherit(h,n),h.prototype._smoothArray=function(e,t){for(var i=new Array(e.length),n=0;n0){var v=[u.points[0],u.points[u.points.length-1]];f.append(new s({points:v,bgColors:this._lineAnchorColors(v),visible:this.areAnchorsVisible(),hittestResult:l.REGULAR}))}this._renderer=f}else this._renderer=this._poligonRenderer}},h.prototype.renderer=function(e,t){return this._invalidated&&this._updateInternal(),this._renderer},t.BrushPaneView=h},"1SUO":function(e,t,i){"use strict";var r=i("aO4+").Point,n=i("pJOz").TrendLineRenderer,a=i("cjIn").PaneRendererCachedImage,s=i("VdBB").HitTestResult,o=i("Zy3/").CompositeRenderer,l=i("isd9").ArcWedgeRenderer,h=i("a7Ha").LineEnd,d=i("NCfL").LineToolPaneViewWithLevelledTextCache;function c(e,t){d.call(this,e,t),this._levels=[],this._baseTrendRenderer=new n,this._edgeTrendRenderer=new n,this._renderer=null}inherit(c,d),c.prototype.getCacheRects=function(e,t){d.prototype.getCacheRects.call(this,e,t);var i=this._cacheState.preparedCells.cells[this._levels[t].index-1];if(i){var r=this._levels[t],n={left:i.left,top:this._cache.topByRow(this._cacheState.row),width:i.width,height:this._cache.rowHeight(this._cacheState.row)};return{cacheRect:n,targetRect:{left:Math.round(r.labelPoint.x-n.width),top:Math.round(r.labelPoint.y-n.height/2),width:i.width,height:n.height}}}},c.prototype._updateImpl=function(){if(d.prototype._updateImpl.call(this),this._renderer=null,this._levels=[],this._points.length<3)this._updateRenderer();else{var e=this._points,t=e[0],i=e[1],n=e[2],a=i.subtract(t).normalized(),s=n.subtract(t).normalized(),o=new r(1,0),l=new r(0,1),h=Math.acos(a.dotProduct(o));a.dotProduct(l)<0&&(h=2*Math.PI-h),this._edge1=h;var c=Math.acos(s.dotProduct(o));s.dotProduct(l)<0&&(c=2*Math.PI-c),this._edge2=c,hMath.PI&&(this._edge1=Math.min(h,c),this._edge2=Math.max(h,c)-2*Math.PI);for(var p=this._source.properties(),u=1;u<=this._source.levelsCount();u++){var _=p["level"+u];if(_.visible.value()){var f=_.coeff.value(),v=_.color.value(),g=i.subtract(t).length()*f,y=a.add(s).scaled(.5).normalized().scaled(g),w=t.add(y);this._levels.push({coeff:f,color:v,radius:g,labelPoint:w,p1:t.add(a.scaled(g)),p2:t.add(s.scaled(g)),linewidth:_.linewidth.value(),linestyle:_.linestyle.value(),index:u})}}this._points.length<2||this._updateRenderer()}},c.prototype._updateRenderer=function(){if(!((w=this._points).length<2)){var e=new o,t=this._source.properties(),i=w[0],r=w[1],n={points:[i,r],width:this._model.timeScale().width(),height:this._source.priceScale().height(),color:t.trendline.color.value(),linewidth:t.trendline.visible.value()?t.trendline.linewidth.value():0,linestyle:t.trendline.linestyle.value(),extendleft:!1,extendright:!1,leftend:h.Normal,rightend:h.Normal};if(this._baseTrendRenderer.setData(n),e.append(this._baseTrendRenderer),w.length<3)return this.addAnchors(e),void(this._renderer=e) +;var d=w[2],c=d.data,p=r.subtract(i).length(),u=d.subtract(i).normalized();(d=i.add(u.scaled(p))).data=c,n={points:[i,d],width:this._model.timeScale().width(),height:this._source.priceScale().height(),color:t.trendline.color.value(),linewidth:t.trendline.visible.value()?t.trendline.linewidth.value():0,linestyle:t.trendline.linestyle.value(),extendleft:!1,extendright:!1,leftend:h.Normal,rightend:h.Normal},this._edgeTrendRenderer.setData(n),e.append(this._edgeTrendRenderer);for(var _=this._levels.length-1;_>=0;_--){var f=this._levels[_],v={};v.center=this._points[0],v.radius=f.radius,v.prevRadius=_>0?this._levels[_-1].radius:0,v.edge=this._edge,v.color=f.color,v.linewidth=f.linewidth,v.edge1=this._edge1,v.edge2=this._edge2,v.p1=f.p1,v.p2=f.p2,v.fillBackground=t.fillBackground.value(),v.transparency=t.transparency.value();var g=new l;if(g.setData(v),g.setHitTest(new s(s.MOVEPOINT,null,f.index)),e.append(g),t.showCoeffs.value()){var y=new a(this,_);e.append(y)}}var w=[i,r];this._model.lineBeingCreated()!==this._source&&w.push(d),e.append(this.createLineAnchor({points:w})),this._renderer=e}},c.prototype.renderer=function(e,t){return this._invalidated&&this._updateImpl(),this._renderer},t.FibWedgePaneView=c},"1oDZ":function(e,t,i){"use strict";var r=i("aB9a").LineSourcePaneView,n=i("qgcf").TextRenderer,a=i("VdBB").HitTestResult,s=i("Zy3/").CompositeRenderer,o=i("gAom").drawHorizontalLine,l=i("jFln").setLineStyle;function h(){this._data=null}function d(e,t){r.call(this,e,t),this._horzRayRenderer=new h,this._labelRenderer=new n,this._renderer=null}h.prototype.setData=function(e){this._data=e},h.prototype.draw=function(e,t){if(null===this._data||0===this._data.points.length)return null;var i=t.pixelRatio,r=e.canvas.width,n=this._data.points[0].y,a=Math.max(0,this._data.points[0].x),s=Math.max(r,this._data.points[0].x);e.lineCap="butt",e.strokeStyle=this._data.color,e.lineWidth=Math.max(1,Math.floor(this._data.linewidth*i)),void 0!==this._data.linestyle&&l(e,this._data.linestyle),o(e,Math.round(n*i),Math.round(a*i),Math.round(s*i))},h.prototype.hitTest=function(e){if(null===this._data||0===this._data.points.length)return null;if(e.x=v?l.x+=f+3:(l.x=v,h=3)}else"center"===o&&(l.x=(l.x+this._model.timeScale().width())/2);var g={points:[l],text:d,color:e.textcolor.value(),vertAlign:n,horzAlign:o,font:u,offsetX:h,offsetY:0,bold:c,italic:p,fontsize:_,forceTextAlign:!0};this._labelRenderer.setData(g),t.append(this._labelRenderer)}this.addAnchors(t),this._renderer=t},t.HorzRayPaneView=d},"2hKl":function(e,t,i){"use strict";function r(e,t,i,r){for(var n=3/(i.subtract(e).length()+i.subtract(t).length()),a=0;a<=1;a+=n){var s=e.scaled((1-a)*(1-a)),o=i.scaled(2*a*(1-a)),l=t.scaled(a*a);if(s.add(o).add(l).subtract(r).length()<5)return!0}return!1}function n(e,t,i,r,n){for(var a=3/(i.subtract(e).length()+r.subtract(i).length()+t.subtract(r).length()),s=0;s<=1;s+=a){var o=e.scaled((1-s)*(1-s)*(1-s)),l=i.scaled(3*(1-s)*(1-s)*s),h=r.scaled(3*(1-s)*s*s),d=t.scaled(s*s*s);if(o.add(l).add(h).add(d).subtract(n).length()<5)return!0}return!1}function a(e,t,i,r,n){var a=i.subtract(e).length()+i.subtract(t).length();if(!a)return[];var l=function(e,t,i,r,n){for(var a=[],l=s(e.y,t.y,i.y,0).concat(s(e.y,t.y,i.y,n)),h=0;h=0&&d<=r&&a.push(l[h])}var c=s(e.x,t.x,i.x,0).concat(s(e.x,t.x,i.x,r));for(h=0;h=0&&p<=n&&a.push(c[h])}return a}(e,t,i,r,n).filter((function(e){return e>1})).sort((function(e,t){return e-t}));t.x>=0&&t.x<=r&&t.y>=0&&t.y<=n&&l.unshift(1);for(var h=3/a,d=[],c=0;c0)f[f.length-1].subtract(w).length()<2&&(_+=p,p*=2);f.push(w),u+=p}f.length>0&&d.push(f)}return d}function s(e,t,i,r){var n=[],a=e-2*i+t,s=2*i-2*e,o=e-r;if(Math.abs(a)>1e-8){var l=s*s-4*a*o;l>=0&&(n.push((-s+Math.sqrt(l))/(2*a)),n.push((-s-Math.sqrt(l))/(2*a)))}else n.push(-o/s);return n}function o(e,t,i,r){return(1-r)*(1-r)*e+2*(1-r)*r*i+r*r*t}i.r(t),i.d(t,"quadroBezierHitTest",(function(){return r})),i.d(t,"cubicBezierHitTest",(function(){return n})),i.d(t,"extendQuadroBezier",(function(){return a}))},"2trc":function(e,t,i){"use strict";i.r(t),i.d(t,"ChannelRenderer",(function(){return c}));var r=i("mrSG"),n=i("Eyy1"),a=i("aO4+"),s=i("f6yo"),o=i("GEp6"),l=i("hBTJ"),h=i("VdBB"),d=i("Tmoa"),c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._data=null,t}return Object(r.__extends)(t,e),t.prototype.setData=function(e){this._data=e},t.prototype.hitTest=function(e,t){if(null===this._data||!this._data.hittestOnBackground)return null;var i=this._visiblePolygon(t);return null!==i&&Object(s.pointInPolygon)(e,i)?new h.HitTestResult(h.HitTestResult.MOVEPOINT_BACKGROUND):null},t.prototype._drawImpl=function(e,t){if(null!==this._data){var i=this._visiblePolygon(t);if(null!==i){e.beginPath(),e.moveTo(i[0].x,i[0].y);for(var r=1;r=15*C.linewidth?c.Arrow:c.Normal,this._distancePriceRenderer.setData(C),e.append(this._distancePriceRenderer) +;var m=this._source.points()[0].index,b=this._source.points()[1].index,R=b-m,T=this._model.timeScale().indexToUserTime(m),S=this._model.timeScale().indexToUserTime(b),P="";if(T&&S){var L=(S.valueOf()-T.valueOf())/1e3;P=", "+_((new d).format(L))}var C,M=window.t("{0} bars").format(u(R))+P,I={x:0,y:10};(C={}).text=M,C.color=t.textcolor.value(),C.height=v._source.priceScale().height(),C.font=t.font.value(),C.offsetX=I.x,C.offsetY=I.y,C.vertAlign="middle",C.horzAlign="center",C.fontsize=t.fontsize.value(),C.backgroundRoundRect=4,C.backgroundHorzInflate=.4*t.fontsize.value(),C.backgroundVertInflate=.2*t.fontsize.value(),t.fillLabelBackground&&t.fillLabelBackground.value()&&(C.backgroundColor=t.labelBackgroundColor.value()),t.drawBorder&&t.drawBorder.value()&&(C.borderColor=t.borderColor.value()),this._textRenderer.setData(C);var O=this._textRenderer.measure(),D=s(O,o,l,I,v._source.priceScale().height());this._textRenderer.setPoints([D]),e.append(this._textRenderer),e.append(this._textRenderer),this.addAnchors(e),this._renderer=e}},t.DateRangePaneView=f},"4Ptp":function(e,t,i){"use strict";var r=i("GEp6").distanceToSegment,n=i("aB9a").LineSourcePaneView,a=i("pJOz").drawArrow,s=i("VdBB").HitTestResult,o=i("Zy3/").CompositeRenderer,l=i("Tmoa"),h=i("a7Ha").LineEnd,d=i("2hKl"),c=i("cPgM").ScaledPaneRenderer;function p(){c.call(this),this._data=null}function u(e,t){for(var i=0;i2&&(e.fillStyle=l.generateColor(this._data.backcolor,this._data.transparency),e.beginPath(),e.moveTo(i.x,i.y),e.quadraticCurveTo(o.x,o.y,n.x,n.y),e.quadraticCurveTo(d.x,d.y,r.x,r.y),e.fill()),e.beginPath(),u(e,this._data.extendLeftSegments),e.moveTo(i.x,i.y),e.quadraticCurveTo(o.x,o.y,n.x,n.y),e.quadraticCurveTo(d.x,d.y,r.x,r.y),u(e,this._data.extendRightSegments),e.stroke(),this._data.leftend===h.Arrow&&a(o,i,e,e.lineWidth,t.pixelRatio),this._data.rightend===h.Arrow&&a(d,r,e,e.lineWidth,t.pixelRatio)}}},p.prototype.hitTest=function(e){if(null!==this._data&&3===this._data.points.length){var t=this._data.points[0],i=this._data.points[1],r=this._data.points[2],n=i.subtract(t),a=r.subtract(n.scaled(.25)),o=r.add(n.scaled(.25)) +;if(d.quadroBezierHitTest(r,t,a,e)||d.quadroBezierHitTest(r,i,o,e))return new s(s.MOVEPOINT);var l=_(e,3,this._data.extendLeftSegments);return null===l&&(l=_(e,3,this._data.extendRightSegments)),l}return null},inherit(f,n),f.prototype._updateImpl=function(){if(n.prototype._updateImpl.call(this),this._renderer=null,this._extendLeftSegments=[],this._extendRightSegments=[],3===this._source.points().length){var e=this._source.pointToScreenPoint(this._source.points()[0])[1],t=this._source.pointToScreenPoint(this._source.points()[1])[1],i=this._source.pointToScreenPoint(this._source.points()[2])[1],r=t.subtract(e),a=i.subtract(r.scaled(.25)),s=i.add(r.scaled(.25)),l=this._model.timeScale().width(),h=this._source.priceScale().height();this._source.properties().extendLeft.value()&&(this._extendLeftSegments=d.extendQuadroBezier(i,e,a,l,h)),this._source.properties().extendRight.value()&&(this._extendRightSegments=d.extendQuadroBezier(i,t,s,l,h))}if(!(this._points.length<2)){var c=[].concat(this._points);this._source._controlPoint&&c.push(this._source.pointToScreenPoint(this._source._controlPoint)[0]);var p={},u=this._source.properties();p.points=c,p.color=u.linecolor.value(),p.linewidth=u.linewidth.value(),p.linestyle=u.linestyle.value(),p.leftend=u.leftEnd.value(),p.rightend=u.rightEnd.value(),p.fillBack=u.fillBackground.value(),p.backcolor=u.backgroundColor.value(),p.transparency=u.transparency.value(),p.extendLeftSegments=this._extendLeftSegments,p.extendRightSegments=this._extendRightSegments,this._bezierQuadroRenderer.setData(p);var _=new o;_.append(this._bezierQuadroRenderer),this.addAnchors(_),this._renderer=_}},f.prototype.renderer=function(e,t){return this._invalidated&&this._updateImpl(),this._renderer},t.BezierQuadroPaneView=f},"5/lF":function(e,t,i){"use strict";i.r(t),i.d(t,"iconsContainer",(function(){return v})),i.d(t,"TrendLineStatsRenderer",(function(){return w}));var r=i("aO4+"),n=i("f6yo"),a=i("Eyy1"),s=i("qFKp"),o=i("qgcf"),l=i("VdBB"),h=i("jFln"),d=i("ogJP"),c=i("ikwP"),p=i("aIyQ"),u=i.n(p),_=null;var f=function(){function e(e,t){var i=this;this._ready=!1,this._img=function(e,t){var i=new Image;return i.width=g,i.height=g,i.onload=t,i.src=e,i}(e,(function(){i._ready=!0,t()}))}return e.prototype.ready=function(){return this._ready},e.prototype.image=function(){return this._img},e}(),v=new(function(){function e(e){var t=this;this._icons=new Map,this._onAllIconsLoaded=new u.a,this._pendingLoading=e.length;var i=function(){--t._pendingLoading&&t._onAllIconsLoaded.fire()};e.forEach((function(e){var r=t._icons.get(e.name)||new Map;r.set(e.theme,new f(e.imageData,i)),t._icons.set(e.name,r)}))}return e.prototype.getIcon=function(e,t){return Object(a.ensureDefined)(Object(a.ensureDefined)(this._icons.get(e)).get(t))},e.prototype.onAllIconsReady=function(){return this._onAllIconsLoaded},e}())([{name:"angle",theme:"dark", +imageData:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAxOCAxOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0zLjQ5OTk5IDE1SDIuNjU3NzFMMy4wNjEwNCAxNC4yNjA2TDkuMDYxMDQgMy4yNjA1N0w5LjMwMDQ2IDIuODIxNjJMMTAuMTc4NCAzLjMwMDQ4TDkuOTM4OTMgMy43Mzk0Mkw3LjUxMzg1IDguMTg1NDJDMTAuNTYyMSA5LjY3MjA1IDEwLjk0NTEgMTIuNjI2MSAxMC45OTMxIDE0SDE0LjVIMTVWMTVIMTQuNUgzLjQ5OTk5Wk05Ljk5MTk3IDE0QzkuOTQyMzYgMTIuNzI1OSA5LjU4NjI5IDEwLjI4OCA3LjAzNDM1IDkuMDY0NDlMNC4zNDIyNiAxNEg5Ljk5MTk3WiIgZmlsbD0iI0Y4RjlGRCIvPgo8L3N2Zz4K"},{name:"angle",theme:"light",imageData:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAxOCAxOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMy40OTk5OSAxNUgyLjY1NzcxTDMuMDYxMDQgMTQuMjYwNkw5LjA2MTA0IDMuMjYwNTdMOS4zMDA0NiAyLjgyMTYyTDEwLjE3ODQgMy4zMDA0OEw5LjkzODkzIDMuNzM5NDJMNy41MTM4NSA4LjE4NTQyQzEwLjU2MjEgOS42NzIwNSAxMC45NDUxIDEyLjYyNjEgMTAuOTkzMSAxNEgxNC41SDE1VjE1SDE0LjVIMy40OTk5OVpNOS45OTE5NyAxNEM5Ljk0MjM2IDEyLjcyNTkgOS41ODYyOSAxMC4yODggNy4wMzQzNSA5LjA2NDQ5TDQuMzQyMjYgMTRIOS45OTE5N1oiIGZpbGw9IiMyQTJFMzkiLz4NCjwvc3ZnPg0K"},{name:"barsRange",theme:"dark",imageData:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAxOCAxOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMiAzVjMuNVY1SDFWNlYxM1YxNEgyVjE1LjVWMTZIM1YxNS41VjE0SDRWMTNWNlY1SDNWMy41VjNIMlpNOC4yMDcxMSA3LjVMNy44NTM1NSA3Ljg1MzU1TDYuNzA3MTEgOUgxMS4yOTI5TDEwLjE0NjQgNy44NTM1NUw5Ljc5Mjg5IDcuNUwxMC41IDYuNzkyODlMMTAuODUzNiA3LjE0NjQ1TDEyLjg1MzYgOS4xNDY0NUwxMy4yMDcxIDkuNUwxMi44NTM2IDkuODUzNTVMMTAuODUzNiAxMS44NTM2TDEwLjUgMTIuMjA3MUw5Ljc5Mjg5IDExLjVMMTAuMTQ2NCAxMS4xNDY0TDExLjI5MjkgMTBINi43MDcxMUw3Ljg1MzU1IDExLjE0NjRMOC4yMDcxMSAxMS41TDcuNSAxMi4yMDcxTDcuMTQ2NDUgMTEuODUzNkw1LjE0NjQ1IDkuODUzNTVMNC43OTI4OSA5LjVMNS4xNDY0NSA5LjE0NjQ1TDcuMTQ2NDUgNy4xNDY0NUw3LjUgNi43OTI4OUw4LjIwNzExIDcuNVpNMyA2SDJWMTNIM1Y2Wk0xNSAzLjVWM0gxNlYzLjVWNUgxN1Y2VjEzVjE0SDE2VjE1LjVWMTZIMTVWMTUuNVYxNEgxNFYxM1Y2VjVIMTVWMy41Wk0xNSA2SDE2VjEzSDE1VjZaIiBmaWxsPSIjRjhGOUZEIi8+DQo8L3N2Zz4NCg=="},{name:"barsRange",theme:"light", +imageData:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAxOCAxOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMiAzVjMuNVY1SDFWNlYxM1YxNEgyVjE1LjVWMTZIM1YxNS41VjE0SDRWMTNWNlY1SDNWMy41VjNIMlpNOC4yMDcxMSA3LjVMNy44NTM1NSA3Ljg1MzU1TDYuNzA3MTEgOUgxMS4yOTI5TDEwLjE0NjQgNy44NTM1NUw5Ljc5Mjg5IDcuNUwxMC41IDYuNzkyODlMMTAuODUzNiA3LjE0NjQ1TDEyLjg1MzYgOS4xNDY0NUwxMy4yMDcxIDkuNUwxMi44NTM2IDkuODUzNTVMMTAuODUzNiAxMS44NTM2TDEwLjUgMTIuMjA3MUw5Ljc5Mjg5IDExLjVMMTAuMTQ2NCAxMS4xNDY0TDExLjI5MjkgMTBINi43MDcxMUw3Ljg1MzU1IDExLjE0NjRMOC4yMDcxMSAxMS41TDcuNSAxMi4yMDcxTDcuMTQ2NDUgMTEuODUzNkw1LjE0NjQ1IDkuODUzNTVMNC43OTI4OSA5LjVMNS4xNDY0NSA5LjE0NjQ1TDcuMTQ2NDUgNy4xNDY0NUw3LjUgNi43OTI4OUw4LjIwNzExIDcuNVpNMyA2SDJWMTNIM1Y2Wk0xNSAzLjVWM0gxNlYzLjVWNUgxN1Y2VjEzVjE0SDE2VjE1LjVWMTZIMTVWMTUuNVYxNEgxNFYxM1Y2VjVIMTVWMy41Wk0xNSA2SDE2VjEzSDE1VjZaIiBmaWxsPSIjMkEyRTM5Ii8+DQo8L3N2Zz4NCg=="},{name:"priceRange",theme:"dark",imageData:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAxOCAxOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMyAySDMuNUgxMy41SDE0VjNIMTMuNUgzLjVIM1YyWk04LjUgMy43OTI4OUw4Ljg1MzU1IDQuMTQ2NDVMMTAuODUzNiA2LjE0NjQ1TDExLjIwNzEgNi41TDEwLjUgNy4yMDcxMUwxMC4xNDY0IDYuODUzNTVMOSA1LjcwNzExVjEyLjI5MjlMMTAuMTQ2NCAxMS4xNDY0TDEwLjUgMTAuNzkyOUwxMS4yMDcxIDExLjVMMTAuODUzNiAxMS44NTM2TDguODUzNTUgMTMuODUzNkw4LjUgMTQuMjA3MUw4LjE0NjQ1IDEzLjg1MzZMNi4xNDY0NSAxMS44NTM2TDUuNzkyODkgMTEuNUw2LjUgMTAuNzkyOUw2Ljg1MzU1IDExLjE0NjRMOCAxMi4yOTI5VjUuNzA3MTFMNi44NTM1NSA2Ljg1MzU1TDYuNSA3LjIwNzExTDUuNzkyODkgNi41TDYuMTQ2NDUgNi4xNDY0NUw4LjE0NjQ1IDQuMTQ2NDVMOC41IDMuNzkyODlaTTMuNSAxNkgzVjE1SDMuNUgxMy41SDE0VjE2SDEzLjVIMy41WiIgZmlsbD0iI0Y4RjlGRCIvPg0KPC9zdmc+DQo="},{name:"priceRange",theme:"light",imageData:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAxOCAxOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMyAySDMuNUgxMy41SDE0VjNIMTMuNUgzLjVIM1YyWk04LjUgMy43OTI4OUw4Ljg1MzU1IDQuMTQ2NDVMMTAuODUzNiA2LjE0NjQ1TDExLjIwNzEgNi41TDEwLjUgNy4yMDcxMUwxMC4xNDY0IDYuODUzNTVMOSA1LjcwNzExVjEyLjI5MjlMMTAuMTQ2NCAxMS4xNDY0TDEwLjUgMTAuNzkyOUwxMS4yMDcxIDExLjVMMTAuODUzNiAxMS44NTM2TDguODUzNTUgMTMuODUzNkw4LjUgMTQuMjA3MUw4LjE0NjQ1IDEzLjg1MzZMNi4xNDY0NSAxMS44NTM2TDUuNzkyODkgMTEuNUw2LjUgMTAuNzkyOUw2Ljg1MzU1IDExLjE0NjRMOCAxMi4yOTI5VjUuNzA3MTFMNi44NTM1NSA2Ljg1MzU1TDYuNSA3LjIwNzExTDUuNzkyODkgNi41TDYuMTQ2NDUgNi4xNDY0NUw4LjE0NjQ1IDQuMTQ2NDVMOC41IDMuNzkyODlaTTMuNSAxNkgzVjE1SDMuNUgxMy41SDE0VjE2SDEzLjVIMy41WiIgZmlsbD0iIzJBMkUzOSIvPg0KPC9zdmc+DQo="}]),g=18,y=new Map,w=function(){function e(e,t,i){this._fontSize=0,this._preRendered=!1,this._boundingBox=null,this._rect=null,this._padding=null,this._textPoint=null,this._textSizeCache=t,this._data=e,this._fontSize=e.fontSize?e.fontSize:12, +this._lineSpacing=Object(d.isNumber)(this._data.lineSpacing)&&this._data.lineSpacing?this._data.lineSpacing:0,e.lines=this._lines=null===e.text?[]:Object(o.wordWrap)(e.text,this.fontStyle(),e.wordWrapWidth),this._hittest=i||new l.HitTestResult(l.HitTestResult.MOVEPOINT)}return e.prototype.fontStyle=function(){return(this._data.bold?"bold ":"")+(this._data.italic?"italic ":"")+this._fontSize+"px "+this._data.font},e.prototype.draw=function(e,t){if(0===this._data.points.length||null===this._data.text)return{width:0};this._preRender();var i=this._fontSize+this._lineSpacing;e.textBaseline="top",e.font=this.fontStyle();var r=Object(a.ensureNotNull)(this._rect);if(this._rect){if("right"!==this._data.horzAlign&&"center"!==this._data.horzAlign||!0!==this._data.doNotAlignText&&(e.textAlign="right"===this._data.horzAlign?"end":"center"),this._data.backgroundRoundRect?(Object(h.drawRoundRect)(e,r.x,r.y,r.w,r.h,this._data.backgroundRoundRect),e.fillStyle=this._data.backgroundColor,e.fill(),e.globalAlpha=1):(e.fillStyle=this._data.backgroundColor,e.fillRect(r.x,r.y,r.w,r.h),e.globalAlpha=1),!s.isIE&&this._data.icons)for(var n=0,o=Math.ceil((g-this._fontSize)/2),l=Object(a.ensureNotNull)(this._padding),d=0,c=this._data.icons;d=3&&(e=this._source.points()[0],t=this._source.points()[1],i=this._source.points()[2],this._ABRetracement=Math.round(1e3*Math.abs((i.price-t.price)/(t.price-e.price)))/1e3),this._source.points().length>=4&&(r=this._source.points()[3],this._BCRetracement=Math.round(1e3*Math.abs((r.price-i.price)/(i.price-t.price)))/1e3),this._source.points().length>=5&&(n=this._source.points()[4],this._CDRetracement=Math.round(1e3*Math.abs((n.price-r.price)/(r.price-i.price)))/1e3,this._XDRetracement=Math.round(1e3*Math.abs((n.price-t.price)/(t.price-e.price)))/1e3)},d.prototype._updateImpl=function(){if(r.prototype._updateImpl.call(this),this._updateBaseData(),this._renderer=null,!(this._points.length<2)){var e=this._source.properties(),t=new o,i=[this._points[0],this._points[1],this._points.length<3?this._points[1]:this._points[2]],n=this,a=function(t,i){return{points:[t],text:i,color:e.textcolor.value(),vertAlign:"middle",horzAlign:"center",font:e.font.value(),offsetX:0,offsetY:0,bold:e.bold&&e.bold.value(),italic:e.italic&&e.italic.value(),fontsize:e.fontsize.value(),backgroundColor:n._source.properties().color.value(),backgroundRoundRect:4}},s=function(e,t){return{ +points:[e,t],width:n._model.timeScale().width(),height:n._source.priceScale().height(),color:n._source.properties().color.value(),linewidth:1,linestyle:CanvasEx.LINESTYLE_SOLID,extendleft:!1,extendright:!1,leftend:h.Normal,rightend:h.Normal}};if((l={}).points=i,l.color=e.color.value(),l.linewidth=e.linewidth.value(),l.backcolor=e.backgroundColor.value(),l.fillBackground=e.fillBackground.value(),l.transparency=e.transparency.value(),this._mainTriangleRenderer.setData(l),t.append(this._mainTriangleRenderer),this._points.length>3){var l;i=[this._points[2],this._points[3],5===this._points.length?this._points[4]:this._points[3]];(l={}).points=i,l.color=e.color.value(),l.linewidth=e.linewidth.value(),l.backcolor=e.backgroundColor.value(),l.fillBackground=e.fillBackground.value(),l.transparency=e.transparency.value(),this._triangleRendererPoints234.setData(l),t.append(this._triangleRendererPoints234)}if(this._points.length>=3){var d=a(c=this._points[0].add(this._points[2]).scaled(.5),this._numericFormatter.format(this._ABRetracement));this._abLabelRenderer.setData(d),t.append(this._abLabelRenderer)}if(this._points.length>=4){var c=this._points[1].add(this._points[3]).scaled(.5),p=s(this._points[1],this._points[3]);this._bcRetracementTrend.setData(p),t.append(this._bcRetracementTrend);d=a(c,this._numericFormatter.format(this._BCRetracement));this._bcLabelRenderer.setData(d),t.append(this._bcLabelRenderer)}if(this._points.length>=5){d=a(c=this._points[2].add(this._points[4]).scaled(.5),this._numericFormatter.format(this._CDRetracement));this._cdLabelRenderer.setData(d),t.append(this._cdLabelRenderer);p=s(this._points[0],this._points[4]);this._xdRetracementTrend.setData(p),t.append(this._xdRetracementTrend);d=a(c=this._points[0].add(this._points[4]).scaled(.5),this._numericFormatter.format(this._XDRetracement));this._xdLabelRenderer.setData(d),t.append(this._xdLabelRenderer)}d=a(this._points[0],"X");this._points[1].y>this._points[0].y?(d.vertAlign="bottom",d.offsetY=5):(d.vertAlign="top",d.offsetY=5),this._textRendererXLabel.setData(d),t.append(this._textRendererXLabel);d=a(this._points[1],"A");if(this._points[1].y2){d=a(this._points[2],"B");this._points[2].y3){d=a(this._points[3],"C");this._points[3].y4){d=a(this._points[4],"D");this._points[4].y0&&B){var E=this._levels[T-1],V=(i=new r(D,this._levels[T].y),p=new r(k,E.y),{});V.points=[i,p],V.color=this._levels[T].color,V.linewidth=0,V.backcolor=this._levels[T].color,V.fillBackground=!0,V.transparency=N,V.extendLeft=A,V.extendRight=z;var j=new n(void 0,void 0,!0);j.setData(V),I.append(j)}var H=D,W=k;H===W&&(A&&(H-=1),z&&(W+=1));for(T=0;T=t.length)return null;var n=e-i;n=Math.pow(n,1.15);var a=t[r]-t[i];return t[i]+a*n},h.prototype.hitTest=function(e){if(null===this._data)return null;var t=this._data.points[0],i=this._data.points[1].subtract(t),r=e.subtract(t),n=i.normalized(),s=n.transposed(),o=r.normalized(),l=Math.acos(n.dotProduct(o));Math.asin(s.dotProduct(o))<0&&(l=2*Math.PI-l);for(var h=this._data.counterclockwise?-1:1,d=r.length(),c=0;c<4;c++){var p=h*l/(.5*Math.PI),u=this._continiusFib(p+4*c) +;if(null!==(u=u*i.length()/5)&&Math.abs(u-d)<5)return new a(a.MOVEPOINT)}return null},h.prototype._drawImpl=function(e){if(null!==this._data){e.lineCap="round",e.strokeStyle=this._data.color;var t=this._data.points[0],i=this._data.points[1];e.translate(t.x,t.y);var r=i.subtract(t),n=r.length();r=r.normalized();var a=Math.acos(r.x);Math.asin(r.y)<0&&(a=2*Math.PI-a),e.rotate(a),e.scale(n/5,n/5),e.lineWidth=this._data.linewidth,CanvasEx.setLineStyle(e,this._data.linestyle);var s=Math.PI/100;e.moveTo(0,0);for(var o=this._data.counterclockwise?-1:1,l=0;l<50*(this._fibNumbers().length-1);l++){var h=o*l*s,d=this._continiusFib(l/50),c=Math.cos(h)*d,p=Math.sin(h)*d;e.lineTo(c,p)}e.scale(5/n,5/n),e.rotate(-a),e.stroke()}},inherit(d,r),d.prototype.renderer=function(e,t){return this._invalidated&&this._updateImpl(),this._renderer},d.prototype._updateImpl=function(){if(r.prototype._updateImpl.call(this),this._renderer=null,!(this._floatPoints.length<2)){var e,t=new s;(e={}).points=this._floatPoints,e.width=this._model.timeScale().width(),e.height=this._source.priceScale().height(),e.color=this._source.properties().linecolor.value(),e.linewidth=this._source.properties().linewidth.value(),e.linestyle=this._source.properties().linestyle.value(),e.extendleft=!1,e.extendright=!0,e.leftend=o.Normal,e.rightend=o.Normal,this._trendLineRenderer.setData(e),t.append(this._trendLineRenderer),(e={}).points=this._floatPoints,e.width=this._model.timeScale().width(),e.height=this._source.priceScale().height(),e.color=this._source.properties().linecolor.value(),e.linewidth=this._source.properties().linewidth.value(),e.linestyle=this._source.properties().linestyle.value(),e.counterclockwise=this._source.properties().counterclockwise.value(),this._spiralRenderer.setData(e),t.append(this._spiralRenderer),this.addAnchors(t),this._renderer=t}},t.FibSpiralPaneView=d},"8xAY":function(e,t,i){"use strict";var r;i.r(t),i.d(t,"LabelSettings",(function(){return r})),function(e){e.offset=8,e.fontSize=12,e.lineSpacing=16,e.rectRadius=4,e.bgColorLight="rgba(227,242,253,0.9)",e.bgColorDark="rgba(67,70,81,0.9)",e.textColorLight="#2A2E39",e.textColorDark="#F8F9FD",e.textPadding=10,e.paddingTopBottom=13,e.paddingLeftRight=10}(r||(r={}))},"9FRF":function(e,t,i){"use strict";var r=i("aB9a").LineSourcePaneView,n=i("NN6M").ParallelChannelRenderer,a=i("Zy3/").CompositeRenderer,s=i("//lt").PaneCursorType,o=[s.Default,s.Default,s.VerticalResize];function l(e,t){r.call(this,e,t),this._channelRenderer=new n,this._renderer=null,this._p3=null,this._p4=null}inherit(l,r),l.prototype._updateImpl=function(){if(r.prototype._updateImpl.call(this),this._renderer=null,this._source.priceScale()&&!this._source.priceScale().isEmpty()&&0!==this._source.points().length){if(this._source._priceOffset||this._source.calculatePriceDiff(),3===this._points.length&&this._source._priceOffset){var e=this._points[0],t=this._points[1],i=this._source._priceOffset+this._source.points()[0].price,n=this._source._priceOffset+this._source.points()[1].price;this._p3=e.clone(),this._p4=t.clone() +;var s=this._source.priceScale(),l=this._source.ownerSource().firstValue();if(s.isLog()){var h=.5*(i+n)-this._source._priceOffset,d=.5*(i+n),c=this._source.priceScale().priceToCoordinate(h,l),p=this._source.priceScale().priceToCoordinate(d,l)-c;this._p3.y+=p,this._p4.y+=p}else this._p3.y=this._source.priceScale().priceToCoordinate(i,l),this._p4.y=this._source.priceScale().priceToCoordinate(n,l)}var u={points:[]};this._points.length>1&&(u.points.push(this._points[0]),u.points.push(this._points[1])),this._points.length>2&&null!==this._p3&&null!==this._p4&&(u.points.push(this._p3),u.points.push(this._p4)),u.color=this._source.properties().linecolor.value(),u.width=this._model.timeScale().width(),u.height=this._source.priceScale().height();var _=this._source.properties();u.linewidth=_.linewidth.value(),u.linestyle=_.linestyle.value(),u.extendleft=_.extendLeft.value(),u.extendright=_.extendRight.value(),u.fillBackground=_.fillBackground.value(),u.backcolor=_.backgroundColor.value(),u.transparency=_.transparency.value(),u.showMidline=_.showMidline.value(),u.midlinewidth=_.midlinewidth.value(),u.midlinestyle=_.midlinestyle.value(),u.midcolor=_.midlinecolor.value(),u.fillBackground=_.fillBackground.value(),u.hittestOnBackground=!0,this._channelRenderer.setData(u);var f=new a;f.append(this._channelRenderer);var v=[];if(this._points[0]&&v.push(this._points[0]),this._points[1]&&v.push(this._points[1]),this._p3){var g=this._p3.add(this._p4).scaled(.5);g.data=v.length,g.square=!0,v.push(g)}var y=3===this._points.length&&!this._p3;this._model.lineBeingCreated()!==this._source||y||v.pop(),f.append(this.createLineAnchor({points:v,pointsCursorType:o})),this._renderer=f}},l.prototype.renderer=function(e,t){return this._invalidated&&this._updateImpl(),this._renderer},t.ParallelChannelPaneView=l},"9XXR":function(e,t,i){"use strict";i.r(t),i.d(t,"splitThousands",(function(){return n}));var r=i("ivNn");function n(e,t){void 0===t&&(t=" ");var i=e+"";-1!==i.indexOf("e")&&(i=function(e){return Object(r.fixComputationError)(e).toFixed(10).replace(/\.?0+$/,"")}(Number(e)));var n=i.split(".");return n[0].replace(/\B(?=(\d{3})+(?!\d))/g,t)+(n[1]?"."+n[1]:"")}},Ay2m:function(e,t,i){"use strict";var r=i("aO4+").Point,n=i("aB9a").LineSourcePaneView,a=i("LxhU").Interval,s=i("VdBB").HitTestResult,o=i("Zy3/").CompositeRenderer,l=i("UfPO"),h=i("Hr11"),d=i("GH0z").PercentageFormatter,c=i("gQ5K").DateFormatter,p=i("4kQX").TimeFormatter,u=i("nda6").TimeSpanFormatter,_=i("Tmoa"),f=i("08i5"),v=i("ikwP").calcTextHorizontalShift,g=i("Ialn").isRtl,y=i("jFln").drawRoundRect,w=i("XlJ7").makeFont,x=i("cPgM").ScaledPaneRenderer,m=i("Ialn"),b=m.forceLTRStr,R=m.startWithLTR,T=i("zDbI").CHART_FONT_FAMILY;function S(){x.call(this),this._data=null,this._font=T,this._targetFontSize1=14,this._targetFontSize2=11,this._sourceFontSize1=12,this._sourceFontSize2=10,this._arrowOffset=6,this._arrowWidth=5,this._arrowHeight=5,this._radius=3,this._sourceWidth=void 0,this._sourceHeight=void 0,this._sourceRectLeftOffset=void 0,this._targetWidth=void 0, +this._targetHeight=void 0,this._targetRectLeftOffset=void 0}function P(e,t){n.call(this,e,t),this._clockWhite=l("prediction-clock-white",i("qjB4")),this._clockBlack=l("prediction-clock-black",i("ukvZ")),this._successIcon=l("prediction-success-white",i("mJB8")),this._failureIcon=l("prediction-failure-white",i("V8bI")),this._percentageFormatter=new d,this._predictionRenderer=new S,this._renderer=null}inherit(S,x),S.prototype.setData=function(e){this._data=e},S.prototype.drawBalloon=function(e,t,i,n,a,s){var o=s||20;if(e.beginPath(),"down"===a){var l=new r(t.x-o,t.y-this._arrowOffset-this._arrowHeight-n);return e.moveTo(l.x+this._radius,l.y),e.lineTo(l.x+i-this._radius,l.y),e.arcTo(l.x+i,l.y,l.x+i,l.y+this._radius,this._radius),e.lineTo(l.x+i,l.y+n-this._radius),e.arcTo(l.x+i,l.y+n,l.x+i-this._radius,l.y+n,this._radius),e.lineTo(l.x+o+this._arrowWidth,l.y+n),e.lineTo(l.x+o,l.y+n+this._arrowHeight),e.lineTo(l.x+o-this._arrowWidth,l.y+n),e.lineTo(l.x+this._radius,l.y+n),e.arcTo(l.x,l.y+n,l.x,l.y+n-this._radius,this._radius),e.lineTo(l.x,l.y+this._radius),e.arcTo(l.x,l.y,l.x+this._radius,l.y,this._radius),l}var h=new r(t.x-o,t.y+this._arrowOffset+this._arrowHeight+n);return e.moveTo(h.x+this._radius,h.y),e.lineTo(h.x+i-this._radius,h.y),e.arcTo(h.x+i,h.y,h.x+i,h.y-this._radius,this._radius),e.lineTo(h.x+i,h.y-n+this._radius),e.arcTo(h.x+i,h.y-n,h.x+i-this._radius,h.y-n,this._radius),e.lineTo(h.x+o+this._arrowWidth,h.y-n),e.lineTo(h.x+o,h.y-n-this._arrowHeight),e.lineTo(h.x+o-this._arrowWidth,h.y-n),e.lineTo(h.x+this._radius,h.y-n),e.arcTo(h.x,h.y-n,h.x,h.y-n+this._radius,this._radius),e.lineTo(h.x,h.y-this._radius),e.arcTo(h.x,h.y,h.x+this._radius,h.y,this._radius),new r(h.x,h.y-n)},S.prototype.drawTargetLabel=function(e){e.save(),e.translate(.5,.5);var t=w(this._targetFontSize1,this._font,"normal"),i=w(this._targetFontSize2,this._font,"normal"),r=this._data.targetLine1,n=this._data.targetLine2,a=this._data.targetLine3,s=this._data.targetLine4;e.font=t;var o=e.measureText(r).width,l=e.measureText(n).width,h=e.measureText(" ").width;e.font=i;var d=e.measureText(a).width,c=e.measureText(s).width,p=e.measureText(" ").width,u=this._data.clockWhite.width;this._targetWidth=Math.max(o+l+h,d+c+u+2*p)+8+4,this._targetHeight=this._targetFontSize1+this._targetFontSize2+9+4;var x=this._data.points[1],m=x.x+this._targetWidth-e.canvas.width+5;this._targetRectLeftOffset=Math.max(20,Math.min(this._targetWidth-15,m));var b="up"===this._data.direction?"down":"up",R=this.drawBalloon(e,x,this._targetWidth,this._targetHeight,b,this._targetRectLeftOffset);e.fillStyle=_.generateColor(this._data.targetBackColor,this._data.transparency),e.fill(),e.lineWidth=2,e.strokeStyle=_.generateColor(this._data.targetStrokeColor,this._data.transparency),e.stroke();e.beginPath(),e.arc(x.x,x.y,3,0,2*Math.PI,!1),e.fillStyle=this._data.centersColor,e.fill(),e.textBaseline="top",e.fillStyle=this._data.targetTextColor;var T=2+R.x+4,S=2+R.y+3,P=this._targetWidth-8-4;e.font=t,e.textAlign=g()?"right":"left";var L=v(e,P-l-h);e.fillText(r,T+L,S);var C=v(e,P-o) +;e.fillText(n,T+o+h+C,S),e.font=i;var M=S+this._targetFontSize1+3,I=v(e,P-c-u-p);e.fillText(a,T+I,M);var O=v(e,P-d-p-u-c);e.drawImage(this._data.clockWhite,T+d+p+O,M+1);var D=v(e,P-d-u);if(e.fillText(s,T+d+u+2*p+D,M),this._data.status){var k,B,N,A;switch(e.font=w(this._targetFontSize1,this._font,"bold"),this._data.status){case f.AlertStatus.Success:k=$.t("SUCCESS"),B=_.generateColor(this._data.successBackground,this._data.transparency),N=this._data.successTextColor,A=this._data.successIcon;break;case f.AlertStatus.Failure:k=$.t("FAILURE"),B=_.generateColor(this._data.failureBackground,this._data.transparency),N=this._data.failureTextColor,A=this._data.failureIcon}var z=this._targetFontSize1+4,E=e.measureText(k).width,V=Math.round((this._targetWidth-E)/2),j=v(e,E);e.fillStyle=B,"up"===this._data.direction?(y(e,R.x-1,R.y-z-2,this._targetWidth+2,z,5),e.fill(),e.fillStyle=N,e.fillText(k,R.x+V+j,R.y-z+1),e.drawImage(A,R.x+V-A.width-4,R.y-z-2+Math.abs(z-A.height)/2)):(y(e,R.x-1,R.y+this._targetHeight+2,this._targetWidth+2,z,5),e.fill(),e.fillStyle=N,e.fillText(k,R.x+V+j,R.y+this._targetHeight+5),e.drawImage(A,R.x+V-A.width-4,R.y+this._targetHeight+10-Math.abs(z-A.height)/2)),e.restore()}else e.restore()},S.prototype.drawStartLabel=function(e){e.save(),e.translate(.5,.5);var t=w(this._sourceFontSize1,this._font,"normal"),i=w(this._sourceFontSize2,this._font,"normal");e.font=t;var r=e.measureText(this._data.sourceLine1).width;e.font=i;var n=e.measureText(this._data.sourceLine2).width;this._sourceWidth=Math.max(r,n)+6+4,this._sourceHeight=this._sourceFontSize1+this._sourceFontSize2+6+4;var a=this._data.points[0],s=a.x+this._sourceWidth-e.canvas.width+5;this._sourceRectLeftOffset=Math.max(20,Math.min(this._sourceWidth-15,s));var o=this.drawBalloon(e,a,this._sourceWidth,this._sourceHeight,this._data.direction,this._sourceRectLeftOffset);e.fillStyle=_.generateColor(this._data.sourceBackColor,this._data.transparency),e.fill(),e.lineWidth=2,e.strokeStyle=_.generateColor(this._data.sourceStrokeColor,this._data.transparency),e.stroke(),e.textAlign=g()?"right":"left",e.textBaseline="top",e.fillStyle=this._data.sourceTextColor;var l=v(e,this._sourceWidth-6-4),h=2+o.x+3+l,d=2+o.y+2;e.font=t,e.fillText(this._data.sourceLine1,h,d),e.font=i,e.fillText(this._data.sourceLine2,h,d+this._sourceFontSize1+2);e.beginPath(),e.arc(a.x,a.y,3,0,2*Math.PI,!1),e.fillStyle=this._data.centersColor,e.fill(),e.restore()},S.prototype._drawImpl=function(e){if(!(null===this._data||this._data.points.length<2)){e.lineCap="butt",e.strokeStyle=this._data.color,e.lineWidth=this._data.linewidth,e.lineStyle=this._data.linestyle;var t=this._data.points[0],i=this._data.points[1],r=i.subtract(t);Math.abs(r.x)<1||Math.abs(r.y)<1?(e.beginPath(),e.moveTo(t.x,t.y),e.lineTo(i.x,i.y),e.stroke()):(e.save(),e.beginPath(),e.translate(t.x,t.y),e.scale(1,r.y/r.x),e.moveTo(0,0),e.arcTo(r.x,0,r.x,r.x,Math.abs(r.x)),e.lineTo(r.x,r.x),e.restore(),e.stroke()),this.drawTargetLabel(e),this.drawStartLabel(e);var n=Math.max(8,4*this._data.linewidth);e.fillStyle=this._data.color +;var a=r.y<0?1:-1;if(Math.abs(r.x)<1||Math.abs(r.y)<1)var s=Math.atan(r.x/r.y);else{var o,l,h=Math.abs(r.x),d=Math.abs(r.y),c=0,p=Math.PI/2,u=(c+p)/2;if(r.length()>n)for(;;){o=h*Math.sin(u),l=d*(1-Math.cos(u));var _=Math.sqrt((o-h)*(o-h)+(l-d)*(l-d));if(Math.abs(_-n)<1)break;_>n?c=u:p=u,u=(c+p)/2}s=Math.atan((h-o)/(d-l)),r.x*r.y<0&&(s=-s)}e.save(),e.beginPath(),e.translate(i.x,i.y),e.rotate(-s),e.moveTo(0,0),e.lineTo(-n/2,a*n),e.lineTo(n/2,a*n),e.lineTo(0,0),e.restore(),e.fill()}},S.prototype.targetLabelHitTest=function(e){if(void 0===this._targetWidth||void 0===this._targetHeight||void 0===this._targetRectLeftOffset)return null;var t=this._targetHeight+this._arrowHeight;this._data.status&&(t+=this._targetFontSize1+10);var i="up"===this._data.direction?-1:1,r=this._radius,n=this._data.points[1],a=n.x-this._targetRectLeftOffset,o=n.y+i*r,l=n.y+i*(t+r),h=Math.min(o,l),d=Math.max(o,l);return e.x>=a&&e.x<=a+this._targetWidth&&e.y>=h&&e.y<=d?new s(s.MOVEPOINT):null},S.prototype.sourceLabelHitTest=function(e){if(void 0===this._sourceHeight||void 0===this._sourceWidth||void 0===this._sourceRectLeftOffset)return null;var t="up"===this._data.direction?1:-1,i=this._radius,r=this._data.points[0],n=r.x-this._sourceRectLeftOffset,a=r.y+i*t,o=r.y+(i+this._sourceHeight+this._arrowHeight)*t,l=Math.min(a,o),h=Math.max(a,o);return e.x>=n&&e.x<=n+this._sourceWidth&&e.y>=l&&e.y<=h?new s(s.MOVEPOINT):null},S.prototype.hitTest=function(e){if(null===this._data||this._data.points.length<2)return null;var t=this._data.points[0],i=this._data.points[1],r=i.subtract(t),n=(r=i.subtract(t),e.subtract(t)),a=Math.abs(r.x),o=Math.abs(r.y),l=h.sign(r.y)*(o-o*Math.sqrt(1-n.x*n.x/(a*a)));if(Math.abs(l-n.y)<3)return new s(s.MOVEPOINT);var d=this.targetLabelHitTest(e);return d||this.sourceLabelHitTest(e)},inherit(P,n),P.prototype.renderer=function(e,t){return this._invalidated&&this._updateImpl(),this._renderer},P.prototype._updateImpl=function(){if((n.prototype._updateImpl.call(this),this._renderer=null,this._targetLine1="",this._targetLine2="",this._targetLine3="",this._targetLine4="",!(this._source.points().length<2))&&this._source.priceScale()){var e=this._source.ownerSource().formatter(),t=this._source.points()[1],i=this._source.points()[0];this._targetLine3=b(e.format(t.price));var r=t.price-i.price,s=r/Math.abs(i.price)*100;this._targetLine1=b(e.format(r)+" ("+this._percentageFormatter.format(s)+")");var l=this._model.timeScale().indexToUserTime(i.index),h=this._model.timeScale().indexToUserTime(t.index);i.time&&t.time&&(l=TradingView.isString(i.time)?new Date(Date.parse(i.time)):i.time,h=TradingView.isString(t.time)?new Date(Date.parse(t.time)):t.time);var d=this._model.mainSeries().isDWM(),_=a.isSeconds(this._model.mainSeries().interval());if(h&&l){this._targetLine4=(new c).format(h),d||(this._targetLine4=this._targetLine4+" "+new p(_?"%h:%m:%s":"%h:%m").format(h));var v=(h.valueOf()-l.valueOf())/1e3;this._targetLine2=$.t("in",{context:"dates"})+" "+R((new u).format(v))}this._sourceLine1=e.format(i.price),this._sourceLine2="" +;var g=this._model.timeScale().indexToUserTime(i.index);g&&(this._sourceLine2=(new c).format(g),d||(this._sourceLine2=this._sourceLine2+" "+new p(_?"%h:%m:%s":"%h:%m").format(g))),this._direction=this._source.direction()===f.Direction.Up?"up":"down",this._finished=this._model.lineBeingCreated()!==this._source&&this._model.lineBeingEdited()!==this._source&&!this._model.sourcesBeingMoved().includes(this._source);var y={};y.points=this._points,y.color=this._source.properties().linecolor.value(),y.linewidth=this._source.properties().linewidth.value(),y.targetLine1=this._targetLine1,y.targetLine2=this._targetLine2,y.targetLine3=this._targetLine3,y.targetLine4=this._targetLine4,y.status=this._source.properties().status.value(),y.transparency=this._source.properties().transparency.value(),y.targetBackColor=this._source.properties().targetBackColor.value(),y.targetStrokeColor=this._source.properties().targetStrokeColor.value(),y.targetTextColor=this._source.properties().targetTextColor.value(),y.sourceBackColor=this._source.properties().sourceBackColor.value(),y.sourceStrokeColor=this._source.properties().sourceStrokeColor.value(),y.sourceTextColor=this._source.properties().sourceTextColor.value(),y.successBackground=this._source.properties().successBackground.value(),y.successTextColor=this._source.properties().successTextColor.value(),y.failureBackground=this._source.properties().failureBackground.value(),y.failureTextColor=this._source.properties().failureTextColor.value(),y.intermediateBackColor=this._source.properties().intermediateBackColor.value(),y.intermediateTextColor=this._source.properties().intermediateTextColor.value(),y.sourceLine1=this._sourceLine1,y.sourceLine2=this._sourceLine2,y.direction=this._direction,y.clockWhite=this._clockWhite,y.clockBlack=this._clockBlack,y.successIcon=this._successIcon,y.failureIcon=this._failureIcon,y.finished=this._finished,y.centersColor=this._model.backgroundCounterColor(),this._predictionRenderer.setData(y);var w=new o;w.append(this._predictionRenderer),this.addAnchors(w),this._renderer=w}},t.PredictionPaneView=P},B4Hi:function(e,t,i){"use strict";var r,n=i("aO4+").Point,a=i("aB9a").LineSourcePaneView,s=i("VdBB").HitTestResult,o=i("Zy3/").CompositeRenderer,l=i("Tmoa"),h=i("jTis").CalloutConsts,d=i("ikwP").calcTextHorizontalShift,c=i("Ialn").isRtl,p=i("cPgM").ScaledPaneRenderer;function u(e){p.call(this),this._data=null,this._textSizeCache=e}function _(e,t){a.call(this,e,t),this._textSizeCache={},this._calloutRenderer=new u(this._textSizeCache),this._renderer=null}inherit(u,p),u.prototype.wordWrap=function(e,t){var i;r||((i=document.createElement("canvas")).width=0,i.height=0,r=i.getContext("2d"),i=null),t=+t;var n=(e+="").split(/[^\S\r\n]*(?:\r\n|\r|\n|$)/);if(n[n.length-1]||n.pop(),!isFinite(t)||t<=0)return n;r.font=this.fontStyle();for(var a=[],s=0;s0&&r.measureText(l.slice(0,3*--d-1).join("")).width>t;);if(d>0)a.push(l.slice(0,3*d-1).join("")),l.splice(0,3*d);else{var c=l[0]+(l[1]||""),p=1===p?1:~~(t/r.measureText(c)*c.length);if(r.measureText(c.substr(0,p)).width<=t)for(;r.measureText(c.substr(0,p+1)).width<=t;)p++;else for(;p>1&&r.measureText(c.substr(0,--p)).width>t;);p<1&&(p=1),a.push(c.substr(0,p)),l[0]=c.substr(p),l[1]=""}if((h=r.measureText(l.join("")).width)<=t){a.push(l.join(""));break}}}return a},u.prototype.setData=function(e){this._data=e,this._data.lines=this.wordWrap(e.text,e.wordWrapWidth)},u.prototype.hitTest=function(e){if(null===this._data||this._data.points.length<2)return null;var t=this._data.points[0],i=this._data.points[1];if(t.subtract(e).length()<3)return new s(s.CHANGEPOINT,0);var r=i.x-this._textSizeCache.totalWidth/2,n=i.y-this._textSizeCache.totalHeight/2;return e.x>=r&&e.x<=r+this._textSizeCache.totalWidth&&e.y>=n&&e.y<=n+this._textSizeCache.totalHeight?new s(s.MOVEPOINT):null},u.prototype.fontStyle=function(){return(this._data.bold?"bold ":"")+(this._data.italic?"italic ":"")+this._data.fontSize+"px "+this._data.font},u.prototype._drawImpl=function(e){if(!(null===this._data||this._data.points.length<2)){var t=this._data.points[0].clone(),i=this._data.points[1].clone();e.lineCap="butt",e.strokeStyle=this._data.bordercolor,e.lineWidth=this._data.linewidth,e.textBaseline="bottom",e.font=this.fontStyle();var r=this._data.fontSize*this._data.lines.length,n=this._data.wordWrapWidth||this._data.lines.reduce((function(t,i){return Math.max(t,e.measureText(i).width)}),0);this._textSizeCache.textHeight=r,this._textSizeCache.textHeight=n;var a=h.RoundRadius,s=h.TextMargins,o=n+2*s+2*a,p=r+2*s+2*a;this._textSizeCache.totalWidth=o,this._textSizeCache.totalHeight=p;var u=i.x-o/2,_=i.y-p/2,f=0,v=n+2*s>2*a,g=r+2*s>2*a;e.textAlign=c()?"right":"left";var y=d(e,n);t.x>u+o?f=20:t.x>u&&(f=10),t.y>_+p?f+=2:t.y>_&&(f+=1),e.save(),e.translate(u,_),t.x-=u,t.y-=_,i.x-=u,i.y-=_,e.beginPath(),e.moveTo(a,0),10===f?v?(e.lineTo(i.x-a,0),e.lineTo(t.x,t.y),e.lineTo(i.x+a,0),e.lineTo(o-a,0)):(e.lineTo(t.x,t.y),e.lineTo(o-a,0)):e.lineTo(o-a,0),20===f?(e.lineTo(t.x,t.y),e.lineTo(o,a)):e.arcTo(o,0,o,a,a),21===f?g?(e.lineTo(o,i.y-a),e.lineTo(t.x,t.y),e.lineTo(o,i.y+a),e.lineTo(o,p-a)):(e.lineTo(t.x,t.y),e.lineTo(o,p-a)):e.lineTo(o,p-a),22===f?(e.lineTo(t.x,t.y),e.lineTo(o-a,p)):e.arcTo(o,p,o-a,p,a),12===f?v?(e.lineTo(i.x+a,p),e.lineTo(t.x,t.y),e.lineTo(i.x-a,p),e.lineTo(a,p)):(e.lineTo(t.x,t.y),e.lineTo(a,p)):e.lineTo(a,p),2===f?(e.lineTo(t.x,t.y),e.lineTo(0,p-a)):e.arcTo(0,p,0,p-a,a),1===f?g?(e.lineTo(0,i.y+a),e.lineTo(t.x,t.y),e.lineTo(0,i.y-a),e.lineTo(0,a)):(e.lineTo(t.x,t.y),e.lineTo(0,a)):e.lineTo(0,a),0===f?(e.lineTo(t.x,t.y),e.lineTo(a,0)):e.arcTo(0,0,a,0,a),e.stroke(),e.fillStyle=l.generateColor(this._data.backcolor,this._data.transparency),e.fill(),e.fillStyle=this._data.color,_=a+s+this._data.fontSize,u=a+s+y +;for(var w=0;w>1)+h.RoundRadius+h.TextMargins,s.y);d.data=1,r.append(this.createLineAnchor({points:[d]}))}this._renderer=r}},_.prototype.renderer=function(e,t){return this._invalidated&&this._updateImpl(),this._renderer},t.CalloutPaneView=_},BCbF:function(e,t,i){"use strict";i.r(t),i.d(t,"PolygonRenderer",(function(){return p}));var r=i("mrSG"),n=i("f6yo"),a=i("GEp6"),s=i("jFln"),o=i("VaSN"),l=i("pJOz"),h=i("a7Ha"),d=i("VdBB"),c=i("Tmoa"),p=function(e){function t(t){var i=e.call(this)||this;return i._data=null,i._backHittest=new d.HitTestResult(d.HitTestResult.MOVEPOINT_BACKGROUND),i._points=[],i._hittest=t||new d.HitTestResult(d.HitTestResult.MOVEPOINT),i}return Object(r.__extends)(t,e),t.prototype.setData=function(e){this._data=e,this._points=e.points},t.prototype.hitTest=function(e){if(null===this._data||void 0!==this._data.mouseTouchable&&!this._data.mouseTouchable)return null;for(var t=Object(o.lastEventIsTouch)()?24:3,i=1;i0){r=this._points[0],s=this._points[this._points.length-1];if(Object(a.distanceToSegment)(r,s,e).distance<=t)return this._hittest}return this._data.filled&&this._data.fillBackground&&Object(n.pointInPolygon)(e,this._data.points)?this._backHittest:null},t.prototype._drawImpl=function(e,t){if(null!==this._data&&0!==this._points.length){e.beginPath(),e.lineCap="butt",e.strokeStyle=this._data.color,e.lineWidth=this._data.linewidth,Object(s.setLineStyle)(e,this._data.linestyle);var i=this._points[0];e.moveTo(i.x,i.y);for(var r=0,n=this._points;r0&&e.stroke(),this._points.length>1&&(this._data.leftend===h.LineEnd.Arrow&&Object(l.drawArrow)(this._points[1],this._points[0],e,e.lineWidth,t.pixelRatio),this._data.rightend===h.LineEnd.Arrow&&Object(l.drawArrow)(this._points[this._points.length-2],this._points[this._points.length-1],e,e.lineWidth,t.pixelRatio))}},t}(i("cPgM").ScaledPaneRenderer)},BSCN:function(e,t,i){"use strict";var r=i("aO4+").Point,n=i("aB9a").LineSourcePaneView,a=i("Zy3/").CompositeRenderer,s=i("z+cS").VerticalLineRenderer,o=i("qgcf").TextRenderer,l=[i("//lt").PaneCursorType.HorizontalResize];function h(e,t){n.call(this,e,t),this._lineRenderer=new s,this._labelRenderer=new o,this._renderer=null}inherit(h,n),h.prototype.renderer=function(e,t){return this._invalidated&&this._updateImpl(),this._renderer},h.prototype._updateImpl=function(){if(n.prototype._updateImpl.call(this),this._renderer=null,0!==this._points.length){var e=this._source.properties(),t={};t.width=this._model.timeScale().width(),t.height=this._source.priceScale().height(),t.x=this._points[0].x,t.color=e.linecolor.value(),t.linewidth=e.linewidth.value(),t.linestyle=e.linestyle.value(),this._lineRenderer.setData(t);var i=new a;if(i.append(this._lineRenderer),e.showLabel.value()){var s,o,h,d=0,c=5,p=this._points[0].x;switch(e.vertLabelsAlign.value()){case"top":h=t.height;break;case"middle":h=t.height/2;break;case"bottom":h=0}if("horizontal"===e.textOrientation.value()){switch(e.horzLabelsAlign.value()){case"left":s="right";break;case"right":s="left";break;case"center":s="center"}switch(e.vertLabelsAlign.value()){case"top":o="bottom";break;case"middle":o="middle";break;case"bottom":o="top"}}else{switch(d=-Math.PI/2,c=0,e.horzLabelsAlign.value()){case"left":o="bottom";break;case"right":o="top";break;case"center":o="middle"}switch(e.vertLabelsAlign.value()){case"top":s="left";break;case"middle":s="center";break;case"bottom":s="right"}}var u={points:[new r(p,h)],text:e.text.value(),color:e.textcolor.value(),vertAlign:o,horzAlign:s,font:e.font.value(),offsetX:c,offsetY:0,bold:e.bold.value(),italic:e.italic.value(),fontsize:e.fontsize.value(),forceTextAlign:!0,angle:d};this._labelRenderer.setData(u),i.append(this._labelRenderer)}if(1===this._points.length){var _=new r(this._points[0].x,t.height/2);_.data=0,_.square=!0,i.append(this.createLineAnchor({points:[_],pointsCursorType:l}))}this._renderer=i}},t.VertLinePaneView=h},C2CE:function(e,t,i){"use strict";i.r(t),i.d(t,"PolylinePaneView",(function(){return s}));var r=i("mrSG"),n=i("BCbF"),a=i("Zy3/"),s=function(e){function t(t,i){var r=e.call(this,t,i)||this;return r._polygonRenderer=new n.PolygonRenderer(null),r._renderer=new a.CompositeRenderer,r}return Object(r.__extends)(t,e),t.prototype.renderer=function(e,t){return this._invalidated&&this._updateImpl(),this._renderer},t.prototype._updateImpl=function(){e.prototype._updateImpl.call(this),this._renderer.clear();var t=this._source.properties().childs(),i={points:this._points,color:t.linecolor.value(),linewidth:t.linewidth.value(),linestyle:t.linestyle.value(), +filled:t.filled.value(),backcolor:t.backgroundColor.value(),fillBackground:t.fillBackground.value(),transparency:t.transparency.value()};this._polygonRenderer.setData(i),this._renderer.append(this._polygonRenderer),this.addAnchors(this._renderer)},t}(i("aB9a").LineSourcePaneView)},CR3a:function(e,t,i){"use strict";var r=i("NN6M").ParallelChannelRenderer,n=i("pJOz").TrendLineRenderer,a=i("cjIn").PaneRendererCachedImage,s=i("Zy3/").CompositeRenderer,o=i("Tmoa"),l=i("a7Ha").LineEnd,h=i("NCfL").LineToolPaneViewWithLevelledTextCache,d=i("xUGI");function c(e,t,i){d.call(this,e,t,i)}function p(e,t){r.call(this,e,t)}function u(e,t){h.call(this,e,t),this._rendererCache={},this._baseLineRenderer=new n,this._lastLevelTrendRenderer=new n,this._renderer=null}inherit(c,d),c.prototype._selectStartPrice=function(e){return e.points()[0].price},c.prototype.priceRange=function(e,t){var i=e.points()[2],r=e.points()[0],n=this._calculatePriceRange(i,r,t);if(!this._calculateLogLevels(e))return{price:n};var a=e.priceScale(),s=e.ownerSource().firstValue(),o=a.priceToCoordinate(i.price,s),l=a.priceToCoordinate(r.price,s);return{price:n,coordinate:t?l-o:o-l}},inherit(p,r),p.prototype._getColor=function(){return o.generateColor(this._data.backcolor,this._data.transparency,!0)},inherit(u,h),u.prototype.getCacheRects=function(e,t){h.prototype.getCacheRects.call(this,e,t);var i,r=this._source.properties(),n=r["level"+t],a=this._cacheState.preparedCells.cells[t-1],s=this._floatPoints[0],o=this._floatPoints[1],l=this.norm.scaled(n.coeff.value()),d=s.add(l),c=o.add(l);switch(r.horzLabelsAlign.value()){case"left":i=d;break;case"center":(i=d.add(c).scaled(.5)).x+=a.width/2,i.x=Math.round(i.x);break;case"right":(i=c.clone()).x+=a.width,i.x=Math.round(i.x)}var p={left:a.left,top:this._cache.topByRow(this._cacheState.row),width:a.width,height:this._cache.rowHeight(this._cacheState.row)},u={left:Math.round(i.x-p.width),top:Math.round(i.y),width:a.width,height:p.height},_=r.vertLabelsAlign.value();return"middle"===_&&(u.top-=u.height/2),"bottom"===_&&(u.top-=u.height),{cacheRect:p,targetRect:u}},u.prototype._createCache=function(e){return new c(this._source.properties().fibLevelsBasedOnLogScale,this._source.levelsCount(),e)},u.prototype._updateImpl=function(){h.prototype._updateImpl.call(this),this._renderer=null,3===this._floatPoints.length&&3===this._source.points().length&&(this.norm=this._floatPoints[2].subtract(this._floatPoints[0]));var e=new s;if(this._floatPoints.length<2)return this.addAnchors(e),void(this._renderer=e);var t=this._source.properties(),i=this._floatPoints[0],r=this._floatPoints[1];if(this._floatPoints.length<3){var n={points:[i,r],width:this._model.timeScale().width(),height:this._source.priceScale().height(),color:t.level1.color.value(),linewidth:t.levelsStyle.linewidth.value(),linestyle:t.levelsStyle.linestyle.value(),extendleft:t.extendLeft.value(),extendright:t.extendRight.value(),leftend:l.Normal,rightend:l.Normal};return this._baseLineRenderer.setData(n),e.append(this._baseLineRenderer),this.addAnchors(e),void(this._renderer=e) +}for(var o=function(t,i,r){var n=new a(this,c);e.append(n)}.bind(this),d=this._source.levelsCount(),c=1;c=1;c--){var S;if((S=t["level"+c]).visible.value()){T=c;break}}if(null!=T&&(S=t["level"+T]).visible.value()){v=this.norm.scaled(S.coeff.value()),n={points:[g=i.add(v),y=r.add(v)],width:this._model.timeScale().width(),height:this._source.priceScale().height(),color:S.color.value(),linewidth:t.levelsStyle.linewidth.value(),linestyle:t.levelsStyle.linestyle.value(),extendleft:t.extendLeft.value(),extendright:t.extendRight.value(),leftend:l.Normal,rightend:l.Normal};this._lastLevelTrendRenderer.setData(n),e.append(this._lastLevelTrendRenderer),(t.showCoeffs.value()||t.showPrices.value())&&o(g,y,T-1)}this.addAnchors(e),this._renderer=e},u.prototype.renderer=function(e,t){return this._invalidated&&this._updateImpl(),this._renderer},t.FibChannelPaneView=u},D4q4:function(e,t,i){"use strict";var r=i("aB9a").LineSourcePaneView,n=i("Zy3/").CompositeRenderer,a=i("/S7V").TriangleRenderer;function s(e,t){r.call(this,e,t),this._triangleRenderer=new a,this._renderer=null}inherit(s,r),s.prototype.renderer=function(e,t){return this._invalidated&&this._updateImpl(),this._renderer},s.prototype._updateImpl=function(){r.prototype._updateImpl.call(this),this._renderer=null;var e={};e.points=this._points,e.color=this._source.properties().color.value(),e.linewidth=this._source.properties().linewidth.value(),e.backcolor=this._source.properties().backgroundColor.value(),e.fillBackground=this._source.properties().fillBackground.value(),e.transparency=this._source.properties().transparency.value(),this._triangleRenderer.setData(e);var t=new n;t.append(this._triangleRenderer),this.addAnchors(t),this._renderer=t},t.TrianglePaneView=s},"Dz+H":function(e,t,i){"use strict";i.r(t);var r=i("mrSG"),n=i("aB9a"),a=i("Zy3/"),s=i("vq8G"),o=i("VdBB"),l=i("Eyy1"),h=i("qgcf"),d=i("Tmoa"),c=i("Ialn"),p=i("ikwP"),u=i("c44N"),_=i("aO4+"),f=i("f6yo");var v=function(){function e(e){this._data=null,this._sourceCanvas=null,this._translate=new _.Point(0,0),this._renderParams=e}return e.prototype.destroy=function(){var e;null===(e=this._sourceCanvas)||void 0===e||e.remove()},e.prototype.renderParams=function(){return this._renderParams},e.prototype.update=function(e){ +var t,i;t=this._data,i=e,(null===t||t.markerColor!==i.markerColor||t.borderColor!==i.borderColor||t.width!==i.width||t.height!==i.height)&&this._createSource(e.width,e.height,e.markerColor),this._data=e},e.prototype.drawOn=function(e){var t=Object(l.ensureNotNull)(this._data),i=new _.Point(Math.round(t.point.x),Math.round(t.point.y)).add(this._translate);e.drawImage(Object(l.ensureNotNull)(this._sourceCanvas),Math.round(i.x*this._renderParams.pixelRatio),Math.round(i.y*this._renderParams.pixelRatio),Math.round(t.width*this._renderParams.pixelRatio),Math.round(t.height*this._renderParams.pixelRatio))},e.prototype.hasPoint=function(e){var t=Object(l.ensureNotNull)(this._data),i=t.point.add(this._translate),r=new _.Point(t.point.x-this._translate.x,t.point.y);return Object(f.pointInBox)(e,Object(_.box)(i,r))},e.prototype._createSource=function(e,t,i){this._sourceCanvas=Object(p.createDisconnectedCanvas)(document,new p.Size(e,t),this._renderParams.pixelRatio),this._translate=new _.Point(-e/2,.5-t),this._translate.x%1==0&&(this._translate=new _.Point(this._translate.x+.5,this._translate.y));var r=Object(l.ensureNotNull)(this._sourceCanvas.getContext("2d"));Object(p.drawScaled)(r,this._renderParams.pixelRatio,(function(){var n=.6*e;r.fillStyle=i,r.beginPath(),r.moveTo(e/2,t),r.quadraticCurveTo(e,e/1.15,e,e/2),r.arc(e/2,e/2,e/2,0,Math.PI,!0),r.quadraticCurveTo(0,e/1.15,e/2,t),r.fill(),r.globalCompositeOperation="destination-out",r.beginPath(),r.moveTo((e-n)/2,e/2),r.arc(e/2,e/2,n/2,0,2*Math.PI),r.fill()}))},e}(),g=function(){function e(){this._source=null,this._data=null}return e.prototype.setData=function(e){this._data=e,this._source&&this._source.update(e)},e.prototype.draw=function(e,t){var i;null!==this._data&&(null!==this._source&&Object(u.areEqualPaneRenderParams)(this._source.renderParams(),t)||(null===(i=this._source)||void 0===i||i.destroy(),this._source=new v(t),this._source.update(this._data)),this._source.drawOn(e),this._data.tooltipVisible&&this._drawTooltipOn(e,t))},e.prototype.hitTest=function(e){return null!==this._data&&null!==this._source&&this._source.hasPoint(e)?new o.HitTestResult(o.HitTestResult.MOVEPOINT):null},e.prototype._drawTooltipOn=function(e,t){e.save(),e.translate(.5,.5);var i=Object(l.ensureNotNull)(this._data),r=String(i.text).replace(/^\s+|\s+$/g,"").replace(/[\r\n]+/g,"\n");e.font=(i.bold?"bold ":"")+(i.italic?"italic ":"")+i.fontSize+"px "+i.font;var n=i.tooltipWidth-2*i.tooltipPadding,a=Object(h.wordWrap)(r,e.font,n),s=i.point,o=i.tooltipLineSpacing,u=i.tooltipWidth,_=a.length*i.fontSize+2*i.tooltipPadding;a.length>1&&(_+=(a.length-1)*o);var f=Math.round(s.x-u/2),v=Math.round(s.y-i.height-_-8),g=s.x<20||s.x+20>i.vpWidth,y=g?null:"top",w=g?0:Math.round(s.x);v<10?v=s.y+13:y="bottom",f<10?f+=Math.abs(f-10):f+u+10>i.vpWidth&&(f-=f+u+10-i.vpWidth),e.fillStyle=Object(d.generateColor)(i.backgroundColor,i.backgroundTransparency),e.strokeStyle=i.borderColor,e.lineWidth=1,e.beginPath();var x=Math.round(f*t.pixelRatio),m=Math.round(v*t.pixelRatio);w=Math.round(w*t.pixelRatio), +_=Math.round(_*t.pixelRatio),u=Math.round(u*t.pixelRatio);var b=Math.round(7*t.pixelRatio);e.moveTo(x,m),g||"top"!==y||(e.lineTo(w-b,m),e.lineTo(w,m-b),e.lineTo(w+b,m)),e.lineTo(x+u,m),e.lineTo(x+u,m+_),g||"bottom"!==y||(e.lineTo(w+b,m+_),e.lineTo(w,m+_+b),e.lineTo(w-b,m+_)),e.lineTo(x,m+_),e.closePath(),e.fill(),e.stroke(),e.textBaseline="middle",e.fillStyle=i.textColor,e.textAlign=Object(c.isRtl)()?"right":"left";var R=Object(p.calcTextHorizontalShift)(e,n),T=f+i.tooltipPadding+R,S=v+i.tooltipPadding+i.fontSize/2;Object(p.drawScaled)(e,t.pixelRatio,(function(){for(var t=0;t=this._actualCapacity&&(this._actualCapacity++,this._recreateCanvas()),t},e.prototype._effectiveState=function(e){var t=e.properties(),i={p1:Object.assign({},e.points()[0]),p2:Object.assign({},e.points()[1]),props:e.properties(),showBars:t.showBarsRange.value(),showTimeRange:t.showDateTimeRange.value(),showDistance:t.showDistance.value(),showPriceRange:t.showPriceRange.value(),showAngle:t.showAngle.value(),dark:e.model().isDark(),priceRange:void 0,barSpacing:void 0};return!0===i.showAngle&&(i.priceRange=Object(r.ensureNotNull)(Object(r.ensureNotNull)(e.priceScale()).priceRange()).state(),i.barSpacing=e.model().timeScale().barSpacing()),i},e.prototype._effectiveStatesEquals=function(e,t){if(null!==e&&null===t)return!1;if(null===e&&null!==t)return!1;var i=Object(r.ensureNotNull)(e),n=Object(r.ensureNotNull)(t);if(_(i.p1,n.p1))return!1;if(_(i.p2,n.p2))return!1;if(i.dark!==n.dark)return!1;if(i.showBars!==n.showBars)return!1;if(i.showTimeRange!==n.showTimeRange)return!1;if(i.showDistance!==n.showDistance)return!1;if(i.showPriceRange!==n.showPriceRange)return!1;if(i.showAngle!==n.showAngle)return!1;if(i.showAngle&&n.showAngle){if(i.priceRange.min!==n.priceRange.min)return!1;if(i.priceRange.max!==n.priceRange.max)return!1;if(i.barSpacing!==n.barSpacing)return!1}return!0},e.prototype._repaintSource=function(e,t,i){var a=this;i.points[0]=new n.Point(0,0),i.offsetX=0,i.offsetY=0,delete i.horzAlign,delete i.vertAlign,Object(h.drawScaled)(this._ctx,this._params.pixelRatio,(function(){a._ctx.translate(.5,a.topByRow(t)+.5),a._ctx.clearRect(0,0,a._currentWidth,a.rowHeight(t));var n=new s.TrendLineStatsRenderer(i,{widths:[]}).draw(a._ctx,a._params);Object(r.ensureDefined)(a._sourcesToRow.get(e)).width=n.width}))},e.prototype._recreateCanvas=function(){this._canvas=Object(r.ensureNotNull)(document.createElement("canvas")),this._canvas.width=this._currentWidth*this._params.pixelRatio,this._canvas.height=this._rowHeight*this._actualCapacity*this._params.pixelRatio,this._ctx=Object(r.ensureNotNull)(this._canvas.getContext("2d")),this._ctx.font=d+"px "+o.CHART_FONT_FAMILY, +this._sourcesToRow.clear(),this._rowsToSources.clear()},e}()},Fx2Q:function(e,t,i){"use strict";var r=i("hBTJ").intersectLineSegments,n=i("aB9a").LineSourcePaneView,a=i("pJOz").TrendLineRenderer,s=i("/S7V").TriangleRenderer,o=i("qgcf").TextRenderer,l=i("Zy3/").CompositeRenderer,h=i("Tmoa"),d=i("a7Ha").LineEnd;function c(e,t){n.call(this,e,t),this._trendLineRenderer=new a,this._triangleRendererPoints234=new s,this._intersect1Renderer=new s,this._intersect2Renderer=new s,this._leftShoulderLabelRenderer=new o,this._headLabelRenderer=new o,this._rightShoulderLabelRenderer=new o,this._renderer=null}inherit(c,n),c.prototype._i18nCache=function(){return{leftShoulder:$.t("Left Shoulder"),rightShoulder:$.t("Right Shoulder"),head:$.t("Head")}},c.prototype.renderer=function(e,t){return this._invalidated&&this._updateImpl(),this._renderer},c.prototype._updateImpl=function(){if(n.prototype._updateImpl.call(this),this._renderer=null,delete this._intersect1,delete this._intersect2,this._points.length>=5){var e=this._points[0],t=this._points[1],i=this._points[2],s=this._points[4];if(null!==(c=r(i,s,e,t))){var o=s.subtract(i);this._intersect1=i.add(o.scaled(c))}if(7===this._points.length){var c,p=this._points[5],u=this._points[6];if(null!==(c=r(i,s,p,u))){o=s.subtract(i);this._intersect2=i.add(o.scaled(c))}}}if(!(this._points.length<2)){for(var _=this._source.properties(),f=new l,v=this,g=function(e,t){return{points:[e],text:$.t(t),color:_.textcolor.value(),horzAlign:"center",font:_.font.value(),offsetX:0,offsetY:0,bold:_.bold&&_.bold.value(),italic:_.italic&&_.italic.value(),fontsize:_.fontsize.value(),backgroundColor:v._source.properties().color.value(),backgroundRoundRect:4}},y=function(e,t,i,r){return{points:[e,t],width:v._model.timeScale().width(),height:v._source.priceScale().height(),color:h.generateColor(v._source.properties().color.value(),i),linewidth:r||_.linewidth.value(),linestyle:CanvasEx.LINESTYLE_SOLID,extendleft:!1,extendright:!1,leftend:d.Normal,rightend:d.Normal}},w=function(e,t,i){var r=[e,t,i],n={};return n.points=r,n.color=_.color.value(),n.linewidth=0,n.backcolor=_.backgroundColor.value(),n.fillBackground=_.fillBackground.value(),n.transparency=_.transparency.value(),n},x=1;x=5){var R,T,S=!1,P=!1;this._intersect1?R=this._intersect1:(R=this._points[2],S=!0),this._intersect2?T=this._intersect2:(T=this._points[4],P=!0),(m=y(R,T,0)).extendleft=S,m.extendright=P,this._trendLineRenderer.setData(m),f.append(this._trendLineRenderer);var L=w(this._points[2],this._points[3],this._points[4]);this._triangleRendererPoints234.setData(L),f.append(this._triangleRendererPoints234)}if(this._intersect1){L=w(this._intersect1,this._points[1],this._points[2]);this._intersect1Renderer.setData(L),f.append(this._intersect1Renderer)}if(this._intersect2){L=w(this._points[4],this._points[5],this._intersect2);this._intersect2Renderer.setData(L),f.append(this._intersect2Renderer)}var C=this._i18nCache() +;if(this._points.length>=2){var M=g(this._points[1],C.leftShoulder);this._points[1].y=4){M=g(this._points[3],C.head);this._points[3].y=6){M=g(this._points[5],C.rightShoulder);this._points[5].y0&&(R.wholePoints=this._levels[u-1].points),R.fillBackground=x,R.transparency=m;var T=new s(s.MOVEPOINT,null,b.index);if(w.append(new h(R,T)),l.showCoeffs.value()){var S=new a(this,u);w.append(S)}}if(l.trendline.visible.value()){var P={points:[this._points[0],this._points[1]], +width:this._model.timeScale().width(),height:this._source.priceScale().height(),color:l.trendline.color.value(),linewidth:l.trendline.linewidth.value(),linestyle:l.trendline.linestyle.value(),extendleft:!1,extendright:!1,leftend:d.Normal,rightend:d.Normal};this._trendLineRenderer.setData(P),w.append(this._trendLineRenderer)}this.addAnchors(w),this._renderer=w}}},p.prototype.renderer=function(e,t){return this._invalidated&&this._updateImpl(),this._renderer},t.FibCirclesPaneView=p},"GS+0":function(e,t,i){"use strict";var r=i("aO4+").Point,n=i("aB9a").LineSourcePaneView,a=i("z+cS").VerticalLineRenderer,s=i("pJOz").TrendLineRenderer,o=i("VdBB").HitTestResult,l=i("Zy3/").CompositeRenderer,h=i("a7Ha").LineEnd;function d(e,t){n.call(this,e,t),this._lines=[],this._trendRenderer=new s,this._renderer=null}inherit(d,n),d.prototype._updateImpl=function(){if(n.prototype._updateImpl.call(this),this._renderer=null,!(this._source.points().length<2)){var e=this._model.timeScale();if(this._source.priceScale()&&!this._source.priceScale().isEmpty()&&!e.isEmpty()){var t=this._source.points()[0],i=this._source.points()[1],s=i?i.index-t.index:1;if(this._lines=[],0!==s){var d=e.visibleBarsStrictRange();if(s>0)for(var c=t.index;c<=d.lastBar();c+=s)this._lines.push({x:e.indexToCoordinate(c)});else for(c=t.index;c>=d.firstBar();c+=s)this._lines.push({x:e.indexToCoordinate(c)});if(!(this._points.length<2)){var p=new l,u=this._source.properties(),_={points:[t,i],width:this._model.timeScale().width(),height:this._source.priceScale().height(),color:u.trendline.color.value(),linewidth:u.trendline.linewidth.value(),linestyle:u.trendline.linestyle.value(),extendleft:!1,extendright:!1,leftend:h.Normal,rightend:h.Normal};this._trendRenderer.setData(_),p.append(this._trendRenderer);var f=this._model.timeScale().width(),v=this._source.priceScale().height();for(c=0;c0?d.PaneCursorType.DiagonalNeSwResize:d.PaneCursorType.DiagonalNwSeResize,u>0?d.PaneCursorType.DiagonalNeSwResize:d.PaneCursorType.DiagonalNwSeResize,d.PaneCursorType.HorizontalResize,d.PaneCursorType.HorizontalResize,d.PaneCursorType.VerticalResize,d.PaneCursorType.VerticalResize];i.append(this.createLineAnchor({points:[e,t,r,a,s,o,l,h],pointsCursorType:_}))},t}(h.LineSourcePaneView)},GzSs:function(e,t,i){"use strict";var r=i("aB9a").LineSourcePaneView,n=i("jkoZ"),a=i("VdBB").HitTestResult,s=i("9XXR").splitThousands,o=i("Ialn"),l=i("cPgM").ScaledPaneRenderer;function h(e,t){l.call(this),this._data=null,this._cache=e,this._adapter=t}function d(e,t){r.call(this,e,t),this._rendererCache={},this._renderer=new h(this._rendererCache,e._adapter)}inherit(h,l),h.prototype.setData=function(e){this._data=e},h.prototype._height=function(){return Math.max(20,1+Math.max(n.fontHeight(this._adapter.getBodyFont()),n.fontHeight(this._adapter.getQuantityFont())))},h.prototype._bodyWidth=function(e){if(0===this._adapter.getText().length)return 0;e.save(),e.font=this._adapter.getBodyFont();var t=e.measureText(this._adapter.getText()).width;return e.restore(),Math.round(10+t)}, +h.prototype._getQuantity=function(){var e=this._adapter.getQuantity();return isNaN(e)?e:s(this._adapter.getQuantity()," ")},h.prototype._quantityWidth=function(e){if(0===this._getQuantity().length)return 0;e.save(),e.font=this._adapter.getQuantityFont();var t=e.measureText(this._getQuantity()).width;return e.restore(),Math.round(Math.max(this._height(),10+t))},h.prototype._reverseButtonWidth=function(){return this._adapter.isOnReverseCallbackPresent()?this._height():0},h.prototype._closeButtonWidth=function(){return this._adapter.isOnCloseCallbackPresent()?this._height():0},h.prototype._drawLines=function(e,t,i,r,n){e.save(),e.strokeStyle=this._adapter.getLineColor(),e.lineStyle=this._adapter.getLineStyle(),e.lineWidth=this._adapter.getLineWidth(),CanvasEx.drawLine(e,i,r,n,r),this._adapter.getExtendLeft()&&CanvasEx.drawLine(e,0,r,t,r),e.restore()},h.prototype._drawBody=function(e,t,i){e.strokeStyle=this._adapter.getBodyBorderColor(),e.fillStyle=this._adapter.getBodyBackgroundColor();var r=this._bodyWidth(e),n=this._height();e.fillRect(t+.5,i+.5,r-1,n-1),e.strokeRect(t,i,r,n)},h.prototype._drawBodyText=function(e,t,i){e.save(),e.textAlign="center",e.textBaseline="middle",e.font=this._adapter.getBodyFont(),e.fillStyle=this._adapter.getBodyTextColor();var r=t+this._bodyWidth(e)/2,n=i+this._height()/2;e.fillText(this._adapter.getText(),r,n),e.restore()},h.prototype._drawQuantity=function(e,t,i){e.strokeStyle=this._adapter.getQuantityBorderColor(),e.fillStyle=this._adapter.getQuantityBackgroundColor();var r=this._quantityWidth(e),n=this._height();e.fillRect(t+.5,i+.5,r-1,n-1),e.strokeRect(t,i,r,n)},h.prototype._drawQuantityText=function(e,t,i){e.save(),e.textAlign="center",e.textBaseline="middle",e.font=this._adapter.getQuantityFont(),e.fillStyle=this._adapter.getQuantityTextColor();var r=t+this._quantityWidth(e)/2,n=i+this._height()/2;e.fillText(o.startWithLTR(this._getQuantity()+""),r,n),e.restore()},h.prototype._drawReverseButton=function(e,t,i){e.save(),e.strokeStyle=this._adapter.getReverseButtonBorderColor(),e.fillStyle=this._adapter.getReverseButtonBackgroundColor();var r=this._reverseButtonWidth(),n=this._height();e.fillRect(t+.5,i+.5,r-1,n-1),e.strokeRect(t,i,r,n),e.strokeStyle=this._adapter.getReverseButtonIconColor();var a=function(e,t){CanvasEx.setLineStyle(e,CanvasEx.LINESTYLE_SOLID),CanvasEx.drawLine(e,0,0,0,t),CanvasEx.drawLine(e,-1,1,1,1),CanvasEx.drawLine(e,-2,2,2,2)},s=t+Math.round((this._reverseButtonWidth()-6)/2),o=i+5;e.save(),e.translate(s,o),a(e,10),e.translate(6,10),e.rotate(Math.PI),a(e,10),e.restore(),this._adapter._blocked&&(e.fillStyle="rgba(140, 140, 140, 0.75)",e.fillRect(t+.5,i+.5,r-1,n-1)),e.restore()},h.prototype._drawCloseButton=function(e,t,i){e.save(),e.strokeStyle=this._adapter.getCloseButtonBorderColor(),e.fillStyle=this._adapter.getCloseButtonBackgroundColor();var r=this._closeButtonWidth(),n=this._height();e.fillRect(t+.5,i+.5,r-1,n-1),e.strokeRect(t,i,r,n);var a=t+r,s=i+n;e.strokeStyle=this._adapter.getCloseButtonIconColor() +;var o=(this._closeButtonWidth()-8)/2,l=(this._height()-8)/2;CanvasEx.drawPoly(e,[{x:t+o,y:i+l},{x:a-o,y:s-l}],!0),CanvasEx.drawPoly(e,[{x:a-o,y:i+l},{x:t+o,y:s-l}],!0),this._adapter._blocked&&(e.fillStyle="rgba(140, 140, 140, 0.75)",e.fillRect(t+.5,i+.5,r-1,n-1)),e.restore()},h.prototype._drawImpl=function(e){if(null!==this._data&&this._data.points&&!(this._data.points.length<1)){var t=this._data.width,i=this._bodyWidth(e),r=this._quantityWidth(e),n=this._reverseButtonWidth(e),a=i+r+n+this._closeButtonWidth(),s=t-a,o=Math.max(this._adapter.getLineLength()/100*t,1),l=Math.round(t-Math.min(s,o)),h=l-a,d=Math.round(this._data.points[0].y),c=Math.round(d-(this._height()+1)/2);this._cache.bodyRight=h+i,this._cache.quantityRight=this._cache.bodyRight+r,this._cache.reverseButtonRight=this._cache.quantityRight+n,this._cache.top=c,this._cache.bottom=c+this._height(),this._cache.left=h,this._cache.right=l,this._drawLines(e,h,l,d,t),0!==i&&(this._drawBody(e,h,c),this._drawBodyText(e,h,c)),0!==r&&(this._drawQuantity(e,this._cache.bodyRight,c),this._drawQuantityText(e,this._cache.bodyRight,c)),0!==n&&this._drawReverseButton(e,this._cache.quantityRight,c),0!==this._closeButtonWidth()&&this._drawCloseButton(e,this._cache.reverseButtonRight,c)}},h.prototype.hitTest=function(e){return null===this._data||0===this._data.points.length||e.ythis._cache.bottom||e.x=this._cache.bodyRight&&e.x=this._cache.quantityRight&&e.x=this._cache.reverseButtonRight&&e.x2){y=this._points[2],w=this._points[1];I=l.sign(y.y-w.y)}var O=0;this._model.lineBeingCreated()===this._source&&(O=1);for(_=p(e.color.value()),g=0;g=3){m=x(this._points[1],this._points[2]);this._trendLineRendererPoints12.setData(m),g.append(this._trendLineRendererPoints12)}if(4===this._points.length){m=x(this._points[2],this._points[3]);if(this._trendLineRendererPoints23.setData(m),g.append(this._trendLineRendererPoints23),this._intersectPoint){var b=[this._startPoint1,this._startPoint2,this._intersectPoint];(R={}).points=b,R.color=v.color.value(),R.linewidth=v.linewidth.value(),R.backcolor=v.backgroundColor.value(),R.fillBackground=v.fillBackground.value(),R.transparency=v.transparency.value(),this._intersectionRenderer.setData(R),g.append(this._intersectionRenderer)}else if(this._intersectPoint1&&this._intersectPoint2){var R;b=[this._startPoint1,this._startPoint2,this._intersectPoint2,this._intersectPoint1];(R={filled:!0,fillBackground:!0}).points=b,R.color=v.color.value(),R.linewidth=v.linewidth.value(),R.backcolor=v.backgroundColor.value(),R.transparency=v.transparency.value(),this._poligonRenderer.setData(R),g.append(this._poligonRenderer)}}var T=w(this._points[0],"A");this._points[1].y>this._points[0].y?(T.vertAlign="bottom",T.offsetY=5):(T.vertAlign="top",T.offsetY=5),this._aLabelRenderer.setData(T),g.append(this._aLabelRenderer);T=w(this._points[1],"B");if(this._points[1].y2){T=w(this._points[2],"C");this._points[2].y3){T=w(this._points[3],"D");this._points[3].ythis._cache.bottom)return null;if(this._adapter._blocked&&e.x>=this._cache.left&&e.x=this._cache.left&&e.x=this._cache.bodyRight&&e.x=this._cache.quantityRight&&e.x0){var t=this._points[0].y,i=e-l.RADIUS-1,n=this._adapter.hasMoveCallback()?s.MOVEPOINT:s.REGULAR,o=[new r(i,t)];this._selectionData={points:o,bgColors:this._lineAnchorColors(o),hittestResult:n,visible:!0}}this._orderRenderer.setData({points:this._points,width:this._model.timeScale().width()}),this._selectionRenderer.setData(this._selectionData)},t.OrderPaneView=p},NCfL:function(e,t,i){"use strict";i.r(t),i.d(t,"LineToolPaneViewWithLevelledTextCache",(function(){return h}));var r=i("mrSG"),n=i("Eyy1"),a=i("aB9a"),s=i("xUGI"),o=i.n(s),l=i("c44N"),h=function(e){function t(t,i){var r=e.call(this,t,i)||this;return r._cache=null,r._cacheDrawParams=null,r._cacheInvalidated=!0,r}return Object(r.__extends)(t,e),t.prototype.getCacheCanvas=function(e){return this._createCacheIfRequired(e),Object(n.ensureNotNull)(this._cache).canvas()},t.prototype.getCacheRects=function(e,t){return this._createCacheIfRequired(e),null},t.prototype.destroy=function(){var e;null===(e=this._cache)||void 0===e||e.destroy()},t.prototype._updateImpl=function(){e.prototype._updateImpl.call(this),this._cacheInvalidated=!0},t.prototype._createCache=function(e){ +return new o.a(this._source.properties().fibLevelsBasedOnLogScale,this._source.levelsCount(),e)},t.prototype._createCacheIfRequired=function(e){var t;null!==this._cache&&null!==this._cacheDrawParams&&Object(l.areEqualPaneRenderParams)(e,this._cacheDrawParams)||(null===(t=this._cache)||void 0===t||t.destroy(),this._cache=this._createCache(e),this._cacheState=this._cache.updateSource(this._source),this._cacheDrawParams=e,this._cacheInvalidated=!1),this._cacheInvalidated&&(this._cacheState=this._cache.updateSource(this._source),this._cacheInvalidated=!1)},t}(a.LineSourcePaneView)},NN6M:function(e,t,i){"use strict";i.r(t),i.d(t,"ParallelChannelRenderer",(function(){return p}));var r=i("mrSG"),n=i("Eyy1"),a=i("aO4+"),s=i("GEp6"),o=i("hBTJ"),l=i("jFln"),h=i("VdBB"),d=i("Zp/P"),c=i("Tmoa"),p=function(e){function t(t,i){var r=e.call(this)||this;return r._data=null,r._hittestResult=t||new h.HitTestResult(h.HitTestResult.MOVEPOINT),r._backHittestResult=i||new h.HitTestResult(h.HitTestResult.MOVEPOINT_BACKGROUND),r}return Object(r.__extends)(t,e),t.prototype.setData=function(e){this._data=e},t.prototype.hitTest=function(e,t){if(null===this._data||this._data.points.length<2)return null;var i=this._data.points,r=i[0],n=i[1],a=this._extendAndHitTestLineSegment(e,r,n,t);if(null!==a)return a;if(4===this._data.points.length&&!this._data.skipTopLine){var s=this._data.points,o=s[2],l=s[3],h=this._extendAndHitTestLineSegment(e,o,l,t);if(null!==h)return h;if(this._data.showMidline&&!this._data.skipLines){var d=r.add(o).scaled(.5),c=n.add(l).scaled(.5),p=this._extendAndHitTestLineSegment(e,d,c,t);if(null!==p)return p}}return this._data.hittestOnBackground&&this._data.fillBackground?this._hitTestBackground(e):null},t.prototype._drawImpl=function(e,t){if(!(null===this._data||this._data.points.length<2)){e.lineCap="butt",e.strokeStyle=this._data.color,e.lineWidth=this._data.linewidth,Object(l.setLineStyle)(e,this._data.linestyle);var i=this._data.points,r=i[0],n=i[1];if(this._data.skipLines||this._extendAndDrawLineSegment(e,r,n,t),4===this._data.points.length){var a=this._data.points,s=a[2],o=a[3];if(this._data.skipLines||this._data.skipTopLine||this._extendAndDrawLineSegment(e,s,o,t),this._data.fillBackground&&this._drawBackground(e,this._data.points,t),this._data.showMidline&&!this._data.skipLines){e.strokeStyle=this._data.midcolor,e.lineWidth=this._data.midlinewidth,Object(l.setLineStyle)(e,this._data.midlinestyle);var h=r.add(s).scaled(.5),d=n.add(o).scaled(.5);this._extendAndDrawLineSegment(e,h,d,t)}}}},t.prototype._getColor=function(){var e=Object(n.ensureNotNull)(this._data);return Object(c.generateColor)(e.backcolor,e.transparency)},t.prototype._extendAndDrawLineSegment=function(e,t,i,r){var n=this._extendAndClipLineSegment(t,i,r);null!==n&&Object(l.drawLine)(e,n[0].x,n[0].y,n[1].x,n[1].y)},t.prototype._extendAndHitTestLineSegment=function(e,t,i,r){var n=this._extendAndClipLineSegment(t,i,r);if(null!==n&&Object(s.distanceToSegment)(n[0],n[1],e).distance<=3)return this._hittestResult;return null}, +t.prototype._extendAndClipLineSegment=function(e,t,i){var r=Object(n.ensureNotNull)(this._data);return Object(d.extendAndClipLineSegment)(e,t,i.cssWidth,i.cssHeight,r.extendleft,r.extendright)},t.prototype._drawBackground=function(e,t,i){var r=Object(n.ensureNotNull)(this._data),o=t[0],l=t[1],h=t[2],d=t[3];if(!(Object(a.equalPoints)(o,l)||Object(a.equalPoints)(h,d)||Object(s.distanceToLine)(o,l,h).distance<1e-6||Object(s.distanceToLine)(o,l,d).distance<1e-6||i.cssWidth<=0||i.cssHeight<=0)){var c=[new a.Point(0,0),new a.Point(i.cssWidth,0),new a.Point(i.cssWidth,i.cssHeight),new a.Point(0,i.cssHeight)];if(c=u(c,o,l,d),r.extendright||(c=u(c,l,d,h)),c=u(c,d,h,o),r.extendleft||(c=u(c,h,o,l)),null!==c){e.beginPath(),e.moveTo(c[0].x,c[0].y);for(var p=1;pu?null:e.y>=c&&e.y<=d?this._backHittestResult:null},t}(i("cPgM").ScaledPaneRenderer);function u(e,t,i,r){return null!==e?Object(o.intersectPolygonAndHalfplane)(e,Object(a.halfplaneThroughPoint)(Object(a.lineThroughPoints)(t,i),r)):null}},Ni7V:function(e,t,i){"use strict";var r=i("aO4+"),n=r.Point,a=r.box,s=i("f6yo").pointInBox,o=i("aB9a").LineSourcePaneView,l=i("vq8G").SelectionRenderer,h=i("VdBB").HitTestResult,d=i("Zy3/").CompositeRenderer,c=i("UfPO"),p=i("Tmoa"),u=i("ikwP").calcTextHorizontalShift,_=i("Ialn").isRtl,f=i("cPgM").ScaledPaneRenderer;function v(e,t){f.call(this),this._data=null,this._measureCache=e,this._chartModel=t,this._points=null}function g(e,t,r){o.call(this,e,t),this._image=c("price_label",i("Pyj3")),this._rendererCache={},this._priceLabelRenderer=new v(this._rendererCache,t),this._renderer=null}inherit(v,f),v.prototype.setData=function(e){this._data=e,this._points=e.points},v.prototype._drawImpl=function(e){if(null!==this._data&&null!==this._points&&0!==this._points.length){e.font=[this._data.fontWeight,this._data.fontSize+"px",this._data.fontFamily].join(" ");var t=e.measureText(this._data.label);t.height=this._data.fontSize;var i=10,r=5,n=t.width+2*i,a=t.height+2*r,s=this._points[0].x- -9,o=this._points[0].y-(a+15);e.textAlign=_()?"right":"left";var l=u(e,t.width);this._measureCache&&Object.assign(this._measureCache,{innerWidth:n,innerHeight:a,tailLeft:-9,tailHeight:15}),e.translate(.5+s,.5+o),e.beginPath(),e.moveTo(12,a),e.lineTo(-9,a+15),e.lineTo(-10,a+15-1),e.lineTo(5,a),e.lineTo(3,a),e.arcTo(0,a,0,0,3),e.lineTo(0,3),e.arcTo(0,0,n,0,3),e.lineTo(n-3,0),e.arcTo(n,0,n,a,3),e.lineTo(n,a-3),e.arcTo(n,a,0,a,3),e.lineTo(12,a),e.fillStyle=p.generateColor(this._data.backgroundColor,this._data.transparency),e.fill(),e.strokeStyle=this._data.borderColor,e.lineWidth=2,e.stroke(),e.closePath(),e.textBaseline="alphabetic",e.fillStyle=this._data.color, +e.fillText(this._data.label,i+l,a/2+Math.floor(.35*this._data.fontSize)),e.translate(-.5,-.5),e.beginPath(),e.arc(-9,a+15,2.5,0,2*Math.PI,!1),e.fillStyle=p.generateColor(this._data.borderColor,this._data.transparency),e.fill(),e.strokeStyle=this._chartModel.backgroundColor().value(),e.lineWidth=1,e.stroke(),e.closePath()}},v.prototype.hitTest=function(e){if(null===this._data||null===this._points||0===this._points.length)return null;var t=this._points[0].x-this._measureCache.tailLeft,i=this._points[0].y-(this._measureCache.innerHeight+this._measureCache.tailHeight),r=a(new n(t,i),new n(t+this._measureCache.innerWidth,i+this._measureCache.innerHeight));return s(e,r)?new h(h.MOVEPOINT):null},inherit(g,o),g.prototype._updateImpl=function(){if(o.prototype._updateImpl.call(this),this._renderer=null,this._source.points().length>0){var e=this._source.points()[0].price,t=this._source.priceScale();if(!t||t.isEmpty())return;var i=this._source.ownerSource().firstValue();this._priceLabel=t.formatPrice(e,i)}var r={};if(r.points=this._points,r.borderColor=this._source.properties().borderColor.value(),r.backgroundColor=this._source.properties().backgroundColor.value(),r.color=this._source.properties().color.value(),r.fontWeight=this._source.properties().fontWeight.value(),r.fontSize=this._source.properties().fontsize.value(),r.fontFamily=this._source.properties().font.value(),r.transparency=this._source.properties().transparency.value(),r.label=this._priceLabel,r.image=this._image,this._priceLabelRenderer.setData(r),1===r.points.length){var n=new d;return n.append(this._priceLabelRenderer),n.append(new l({points:r.points,bgColors:this._lineAnchorColors(r.points),visible:this.areAnchorsVisible()})),void(this._renderer=n)}this._renderer=this._priceLabelRenderer},g.prototype.renderer=function(e,t){return this._invalidated&&this._updateImpl(),this._renderer},t.PriceLabelPaneView=g},Pyj3:function(e,t,i){e.exports=i.p+"6bbe99469a47c58a056f32085bbdfc26.png"},QA6D:function(e,t,i){"use strict";i.r(t),i.d(t,"EllipseRendererSimple",(function(){return h}));var r=i("mrSG"),n=i("VdBB"),a=i("Hr11"),s=i("aO4+"),o=i("Tmoa"),l=i("jFln"),h=function(e){function t(t,i,r){var a=e.call(this)||this;return a._data=t,a._hitTest=i||new n.HitTestResult(n.HitTestResult.MOVEPOINT),a._backgroundHitTest=r||new n.HitTestResult(n.HitTestResult.MOVEPOINT_BACKGROUND),a}return Object(r.__extends)(t,e),t.prototype.hitTest=function(e){if(this._data.points.length<2)return null;var t=this._data.points[0],i=this._data.points[1],r=.5*Math.abs(t.x-i.x),n=Math.abs(t.x-i.x),o=Math.abs(t.y-i.y),l=t.add(i).scaled(.5),h=e.subtract(l);if(n<1||o<1)return null;var d=(i.y-t.y)/(i.x-t.x),c=(h=new s.Point(h.x,h.y/d)).x*h.x+h.y*h.y-r*r;return c=Object(a.sign)(c)*Math.sqrt(Math.abs(c/r)),Math.abs(c)<3?this._hitTest:this._data.fillBackground&&!this._data.noHitTestOnBackground&&c<3?this._backgroundHitTest:null},t.prototype._drawImpl=function(e){e.lineCap="butt",e.strokeStyle=this._data.color,e.lineWidth=this._data.linewidth, +void 0!==this._data.linestyle&&Object(l.setLineStyle)(e,this._data.linestyle);var t=this._data.points[0],i=this._data.points[1],r=Math.abs(t.x-i.x),n=Math.abs(t.y-i.y),a=t.add(i).scaled(.5);if(!(r<1||n<1)){var s=0;if(this._data.wholePoints){var h=this._data.wholePoints[0],d=this._data.wholePoints[1];s=Math.abs(h.x-d.x)}e.save(),e.translate(a.x,a.y),e.scale(1,n/r),e.beginPath(),e.arc(0,0,r/2,0,2*Math.PI,!1),e.restore(),e.stroke(),this._data.fillBackground&&(this._data.wholePoints&&(e.translate(a.x,a.y),e.scale(1,n/r),e.arc(0,0,s/2,0,2*Math.PI,!0)),e.fillStyle=Object(o.generateColor)(this._data.backcolor,this._data.transparency,!0),e.fill())}},t}(i("cPgM").ScaledPaneRenderer)},QPcX:function(e,t,i){"use strict";i.r(t),i.d(t,"LetterInCircleRenderer",(function(){return o}));var r=i("aO4+"),n=i("f6yo"),a=i("ikwP"),s=i("XlJ7"),o=function(){function e(e,t){this._data=e,this._hitTestResult=t}return e.prototype.hitTest=function(e){var t=this._center(),i=this._data.circleRadius,a={min:new r.Point(t.x-i,t.y-i),max:new r.Point(t.x+i,t.y+i)};return Object(n.pointInBox)(e,a)?this._hitTestResult:null},e.prototype.draw=function(e,t){var i=this;e.save();var r=t.pixelRatio,n=Math.max(1,Math.floor(r))%2/2,o=this._center(),l=Math.round(o.x*r)+n,h=Math.round(o.y*r)+n;if(this._data.showCircle){var d=Math.round(l+this._data.circleRadius*r)-l-this._data.circleBorderWidth*r/2;e.strokeStyle=this._data.color,e.lineWidth=this._data.circleBorderWidth*r,e.beginPath(),e.moveTo(l+d,h),e.arc(l,h,d,0,2*Math.PI,!1),e.stroke()}e.font=Object(s.makeFont)(this._data.fontSize,this._data.font,this._data.bold?"bold":void 0),e.textBaseline="middle",e.textAlign="center",e.fillStyle=this._data.color,Object(a.drawScaled)(e,r,(function(){e.fillText(i._data.letter,l/r,h/r+.05*i._data.fontSize)})),e.restore()},e.prototype._center=function(){var e="bottom"===this._data.vertAlign?-1:1,t=this._data.point.y+e*this._data.yOffset+e*this._data.circleRadius,i=this._data.point.x;return new r.Point(i,t)},e}()},Qa6j:function(e,t,i){"use strict";i.r(t);var r=i("mrSG"),n=i("aB9a"),a=i("Zy3/"),s=i("qgcf"),o=i("aO4+"),l=i("VaSN"),h=i("cPgM"),d=i("VdBB");function c(e){if(e<92)return 18;var t=.25*e;return t=Math.min(t,106),t=Math.max(t,18),t=Math.min(t,.9*e)}var p=function(e){function t(t){var i=e.call(this)||this;return i._data=t,i}return Object(r.__extends)(t,e),t.prototype.setData=function(e){this._data=e},t.prototype.hitTest=function(e){if(this._data.points.length<2)return null;var t=this._data.points[0],i=this._data.points[1].subtract(t),r=i.length();(i=this._data.points[1].subtract(this._data.points[0])).length()<22&&(t=this._data.points[1].addScaled(i.normalized(),-22),i=this._data.points[1].subtract(t));var n=e.subtract(t),a=i.dotProduct(n)/r;if(a<0||a>r)return null;for(var s=i.scaled(1/r),o=t.addScaled(s,a),h=e.subtract(o),c=Object(l.lastEventIsTouch)()?24:3,p=this._hittestGeometry(r),u=p.length-2;u>=0;u--){var _=p[u];if(a>=_.x){var f=p[u+1],v=f.x-_.x,g=f.y-_.y,y=(a-_.x)/v,w=_.y+g*y;return h.length()<=w+c?new d.HitTestResult(d.HitTestResult.MOVEPOINT):null}} +return h.length()<3?new d.HitTestResult(d.HitTestResult.MOVEPOINT):null},t.prototype._drawImpl=function(e){if(!(this._data.points.length<2)){e.fillStyle=this._data.color,e.strokeStyle=this._data.color,e.lineJoin="round",e.lineCap="round";var t=this._data.points[1].subtract(this._data.points[0]),i=t.length(),r=this._data.points[0];i<22&&(r=this._data.points[1].addScaled(t.normalized(),-22),t=this._data.points[1].subtract(r));var n,a,s=new o.Point(t.y,-t.x).normalized(),l=this._arrowGeometry(t.length()),h=t.normalized();e.lineWidth=(n=t.length(),a=Math.round(.02*n),a=Math.min(a,5),a=Math.max(a,2)),e.beginPath(),e.moveTo(r.x,r.y);for(var d=0;d=0;d--){c=l[d],p=r.addScaled(h,c.x).addScaled(s,-c.y);e.lineTo(p.x,p.y)}e.lineTo(r.x,r.y),e.stroke(),e.fill()}},t.prototype._arrowGeometry=function(e){var t=c(e),i=[],r=e>=35?.1:0;return i.push(new o.Point(0,0)),i.push(new o.Point(e-t+t*r,1.22*t/4)),i.push(new o.Point(e-t,1.22*t/2)),i.push(new o.Point(e,0)),i},t.prototype._hittestGeometry=function(e){var t=c(e),i=[];return i.push(new o.Point(0,0)),i.push(new o.Point(e-t,1.22*t/4)),i.push(new o.Point(e-t,1.22*t/2)),i.push(new o.Point(e,0)),i},t}(h.ScaledPaneRenderer),u=i("QA6D");i.d(t,"ArrowMarkerPaneView",(function(){return _}));var _=function(e){function t(t,i){var r=e.call(this,t,i)||this;return r._textRendererData={text:"",color:"",vertAlign:"middle",horzAlign:"center",font:"",offsetX:10,offsetY:10,points:[],forceTextAlign:!0},r._arrowRendererData={points:[],color:""},r._ellipseRendererData={color:"",linewidth:0,points:[],fillBackground:!0,backcolor:"",noHitTestOnBackground:!0},r._drawAsCircle=!1,r._textRenderer=new s.TextRenderer(r._textRendererData),r._arrowRenderer=new p(r._arrowRendererData),r._ellipseRenderer=new u.EllipseRendererSimple(r._ellipseRendererData),r}return Object(r.__extends)(t,e),t.prototype.renderer=function(e,t){this._invalidated&&this._updateImpl();var i=new a.CompositeRenderer;this._drawAsCircle?i.append(this._ellipseRenderer):i.append(this._arrowRenderer);var n=this._getSource().properties();return this._textRendererData.points&&this._textRendererData.points.length>0&&n.showLabel.value()&&(this._textRenderer.setData(Object(r.__assign)({},this._textRendererData)),i.append(this._textRenderer)),this.addAnchors(i),i},t.prototype._updateImpl=function(){e.prototype._updateImpl.call(this);var t=this._getPoints(),i=this._getSource().properties();if(this._arrowRendererData.color=i.backgroundColor.value(),this._arrowRendererData.points=t,this._textRendererData.text=i.text.value(),this._textRendererData.color=i.textColor.value(),this._textRendererData.font=i.font.value(),this._textRendererData.bold=i.bold.value(),this._textRendererData.italic=i.italic.value(),this._textRendererData.fontsize=i.fontsize.value(),t.length>=2){var r=this._getSource().points(),n=r[0].index-r[1].index,a=r[0].price-r[1].price;if(this._drawAsCircle=0===n&&Math.abs(a)<1e-8, +this._textRendererData.points=[t[0]],this._drawAsCircle){this._textRendererData.horzAlign="left",this._textRendererData.vertAlign="middle";var s=new o.Point(t[0].x-9,t[0].y-9),l=new o.Point(t[0].x+9,t[0].y+9);this._ellipseRendererData.points=[s,l],this._ellipseRendererData.backcolor=i.backgroundColor.value(),this._ellipseRendererData.color=i.backgroundColor.value()}else{var h=t[1].subtract(t[0]);Math.abs(h.x)>=Math.abs(h.y)?(t[1].x>t[0].x?this._textRendererData.horzAlign="right":this._textRendererData.horzAlign="left",this._textRendererData.vertAlign="middle"):(t[1].y>t[0].y?this._textRendererData.vertAlign="bottom":this._textRendererData.vertAlign="top",this._textRendererData.horzAlign="center")}}},t}(n.LineSourcePaneView)},R7Bt:function(e,t,i){"use strict";var r=i("Eyy1").ensureNotNull,n=i("aO4+").Point,a=i("IjC5").RectangleRenderer,s=i("pJOz").TrendLineRenderer,o=i("cjIn").PaneRendererCachedImage,l=i("VdBB").HitTestResult,h=i("Zy3/").CompositeRenderer,d=i("a7Ha").LineEnd,c=i("d1Pk").fibLevelCoordinate,p=i("NCfL").LineToolPaneViewWithLevelledTextCache;function u(e,t){p.call(this,e,t),this._rendererCache={},this._trendLineRenderer=new s,this._renderer=null}inherit(u,p),u.prototype.getCacheRects=function(e,t){if(p.prototype.getCacheRects.call(this,e,i),!this._cacheState.preparedCells)return null;var i=this._levels[t].index-1,a=this._cacheState.preparedCells.cells[i];if(!a)return null;var s=this._points[0],o=this._points[1],l=Math.min(s.x,o.x),h=Math.max(s.x,o.x);s=new n(l,this._levels[t].y),o=new n(h,this._levels[t].y);var d,c=this._source.properties(),u=c.extendLines.value()?this._model.timeScale().width():h,_=r(this._cache);switch(c.horzLabelsAlign.value()){case"left":d=s;break;case"center":(d=s.add(o).scaled(.5)).x+=a.width/2,d.x=Math.round(d.x);break;case"right":c.extendLines.value()?d=new n(u-4,this._levels[t].y):((d=new n(u+4,this._levels[t].y)).x+=a.width,d.x=Math.round(d.x))}var f={left:a.left,top:_.topByRow(this._cacheState.row),width:a.width,height:_.rowHeight(this._cacheState.row)},v={left:d.x-f.width,top:d.y,width:a.width,height:f.height},g=c.vertLabelsAlign.value();return"middle"===g&&(v.top-=v.height/2),"bottom"===g&&(v.top-=v.height),{cacheRect:f,targetRect:v}},u.prototype._updateImpl=function(){if(p.prototype._updateImpl.call(this),this._renderer=null,!(this._source.points().length<2)){var e=this._source.priceScale();if(e&&!e.isEmpty()&&!this._model.timeScale().isEmpty()){var t=this._source.ownerSource().firstValue();if(null!=t){var i=this._source.points()[0],r=this._source.points()[1],u=!1;(C=this._source.properties()).reverse&&C.reverse.value()&&(u=C.reverse.value()),this._levels=[];var _,f,v=u?i.price:r.price,g=u?r.price:i.price,y=g-v,w=e.isLog()&&C.fibLevelsBasedOnLogScale.value();if(w)_=e.priceToCoordinate(v,t),f=e.priceToCoordinate(g,t)-_;for(var x={price:v,coordinate:_},m={price:y,coordinate:f},b=this._source.levelsCount(),R=1;R<=b;R++){var T=C["level"+R];if(T.visible.value()){var S=T.coeff.value(),P=T.color.value(),L=c(x,m,S,e,t,w);this._levels.push({color:P,y:L, +linewidth:C.levelsStyle.linewidth.value(),linestyle:C.levelsStyle.linestyle.value(),index:R})}}if(!(this._points.length<2)){var C,M=new h,I=(i=this._points[0],r=this._points[1],Math.min(i.x,r.x)),O=Math.max(i.x,r.x),D=(C=this._source.properties()).fillBackground.value(),k=C.transparency.value(),B=C.extendLinesLeft.value(),N=C.extendLines.value();if(D)for(R=0;R0&&D){var A=this._levels[R-1],z=(i=new n(I,this._levels[R].y),r=new n(O,A.y),{});z.points=[i,r],z.color=this._levels[R].color,z.linewidth=0,z.backcolor=this._levels[R].color,z.fillBackground=!0,z.transparency=k,z.extendLeft=B,z.extendRight=N,(j=new a(void 0,void 0,!0)).setData(z),M.append(j)}var E=I,V=O;E===V&&(B&&(E-=1),N&&(V+=1));for(R=0;R=4){var e=this._source.points()[1],t=this._source.points()[2],i=this._source.points()[3];this._retrace1=Math.round(100*Math.abs((i.price-t.price)/(t.price-e.price)))/100}if(this._source.points().length>=6){i=this._source.points()[3];var a=this._source.points()[4],o=this._source.points()[5];this._retrace2=Math.round(100*Math.abs((o.price-a.price)/(a.price-i.price)))/100}if(!(this._points.length<2)){for(var d=this._source.properties(),c=new s,p=this,u=function(e,t){return{points:[e],text:t,color:d.textcolor.value(),vertAlign:"middle",horzAlign:"center",font:d.font.value(),offsetX:0,offsetY:0, +bold:d.bold&&d.bold.value(),italic:d.italic&&d.italic.value(),fontsize:d.fontsize.value(),backgroundColor:p._source.properties().color.value(),backgroundRoundRect:4}},_=function(e,t,i,r){return{points:[e,t],width:p._model.timeScale().width(),height:p._source.priceScale().height(),color:l.generateColor(p._source.properties().color.value(),i),linewidth:r||d.linewidth.value(),linestyle:CanvasEx.LINESTYLE_SOLID,extendleft:!1,extendright:!1,leftend:h.Normal,rightend:h.Normal}},f=1;f=25*k.linewidth?u.Arrow:u.Normal,this._distanceLineRenderer.setData(k),e.append(this._distanceLineRenderer);i=this._points[0],a=this._points[1];var g=Math.round((i.x+a.x)/2);d=new r(g,i.y+Math.sign(a.y-i.y)*o),_=new r(g,a.y+Math.sign(i.y-a.y)*o);(k={}).points=[d,_],k.width=this._model.timeScale().width(),k.height=this._source.priceScale().height(),k.color=this._source.properties().linecolor.value(),k.linewidth=this._source.properties().linewidth.value(),k.linestyle=CanvasEx.LINESTYLE_SOLID,k.extendleft=!1,k.extendright=!1,k.leftend=u.Normal,k.rightend=Math.abs(d.y-_.y)>=25*k.linewidth?u.Arrow:u.Normal,this._distancePriceRenderer.setData(k),e.append(this._distancePriceRenderer);var y=this._source.points()[0].price,w=this._source.points()[1].price,x=w-y,m=100*x/Math.abs(y),b=this._source.points()[0].index,R=this._source.points()[1].index,T=f(R-b+""),S=this._model.timeScale().indexToUserTime(b),P=this._model.timeScale().indexToUserTime(R),L="";if(S&&P){var C=(P.valueOf()-S.valueOf())/1e3;L=", "+v((new c).format(C))}var M=this._model.mainSeries().symbolInfo();M&&M!==this._lastSymbolInfo&&(this._pipFormatter=new p(M.pricescale,M.minmov,M.type,M.minmove2),this._lastSymbolInfo=M);var I,O=this._source.ownerSource().formatter().format(x)+" ("+this._percentageFormatter.format(Math.round(100*m)/100)+") "+(this._pipFormatter?this._pipFormatter.format(x):""),D=f(O)+"\n"+$.t("{0} bars").format(T)+L,k={};if(w>y)(I=a.clone()).y-=2*t.fontsize.value(),I.x=.5*(i.x+a.x),k.points=[I];else(I=a.clone()).x=.5*(i.x+a.x),I.y+=.7*t.fontsize.value(),k.points=[I];var B={x:0,y:10};k.text=D,k.color=t.textcolor.value(),k.height=this._source.priceScale().height(),k.font=t.font.value(),k.offsetX=B.x,k.offsetY=B.y,k.padding=8,k.vertAlign="middle",k.horzAlign="center",k.fontsize=t.fontsize.value(),k.backgroundRoundRect=4,k.backgroundHorzInflate=.4*t.fontsize.value(),k.backgroundVertInflate=.2*t.fontsize.value(),t.fillLabelBackground&&t.fillLabelBackground.value()&&(k.backgroundColor=t.labelBackgroundColor.value()),this._textRenderer.setData(k);var N=this._textRenderer.measure(),A=s(N,i,a,B,this._source.priceScale().height());this._textRenderer.setPoints([A]),e.append(this._textRenderer),this.addAnchors(e),this._renderer=e}}, +t.DateAndPriceRangePaneView=g},UfPO:function(e,t,i){"use strict";e.exports=function(e,t){var i=document.body,r=i[e];return r||((r=document.createElement("img")).src=t,i[e]=r),r}},V8bI:function(e,t,i){e.exports=i.p+"898929f1acdb622689e0fc0c95c8fcd0.png"},VghZ:function(e,t,i){"use strict";var r=i("aO4+").Point,n=i("aB9a").LineSourcePaneView,a=i("qgcf").TextRenderer,s=i("qgcf").calculateLabelPosition,o=i("IjC5").RectangleRenderer,l=i("pJOz").TrendLineRenderer,h=i("Zy3/").CompositeRenderer,d=i("GH0z").PercentageFormatter,c=i("5C6T").PipFormatter,p=i("a7Ha").LineEnd,u=i("Ialn").forceLTRStr;function _(e,t){n.call(this,e,t),this._percentageFormatter=new d,this._pipFormatter=null,this._lastSymbolInfo=null,this._topBorderRenderer=new l,this._bottomBorderRenderer=new l,this._distanceRenderer=new l,this._backgroundRenderer=new o,this._labelRenderer=new a,this._renderer=null}inherit(_,n),_.prototype.renderer=function(e,t){return this._invalidated&&this._updateImpl(),this._renderer},_.prototype._updateImpl=function(){if(n.prototype._updateImpl.call(this),this._renderer=null,!(this._points.length<2||this._source.points().length<2)){var e=new h,t=this._source.properties(),i=t.extendLeft.value(),a=t.extendRight.value(),o=this._points[0],l=this._points[1],d=Math.min(o.x,l.x),_=Math.max(o.x,l.x);if(t.fillBackground&&t.fillBackground.value())(M={}).points=[new r(d,o.y),new r(_,l.y)],M.color="white",M.linewidth=0,M.backcolor=t.backgroundColor.value(),M.fillBackground=!0,M.transparency=t.backgroundTransparency.value(),M.extendLeft=i,M.extendRight=a,this._backgroundRenderer.setData(M),e.append(this._backgroundRenderer);var f=this,v=function(t,r,n){var s={};s.points=[r,n],s.width=f._model.timeScale().width(),s.height=f._source.priceScale().height(),s.color=f._source.properties().linecolor.value(),s.linewidth=f._source.properties().linewidth.value(),s.linestyle=CanvasEx.LINESTYLE_SOLID,s.extendleft=i,s.extendright=a,s.leftend=p.Normal,s.rightend=p.Normal,t.setData(s),e.append(t)},g=d,y=_;g===y&&(i&&(g-=1),a&&(y+=1)),v(this._topBorderRenderer,new r(g,o.y),new r(y,o.y)),v(this._bottomBorderRenderer,new r(g,l.y),new r(y,l.y));o=this._points[0],l=this._points[1];var w=Math.round((o.x+l.x)/2),x=new r(w,o.y),m=new r(w,l.y);(M={}).points=[x,m],M.width=f._model.timeScale().width(),M.height=f._source.priceScale().height(),M.color=f._source.properties().linecolor.value(),M.linewidth=f._source.properties().linewidth.value(),M.linestyle=CanvasEx.LINESTYLE_SOLID,M.extendleft=!1,M.extendright=!1,M.leftend=p.Normal,M.rightend=Math.abs(x.y-m.y)>=15*M.linewidth?p.Arrow:p.Normal,this._distanceRenderer.setData(M),e.append(this._distanceRenderer);var b=this._source.points()[0].price,R=this._source.points()[1].price,T=R-b,S=100*T/Math.abs(b),P=this._model.mainSeries().symbolInfo();P&&P!==this._lastSymbolInfo&&(this._pipFormatter=new c(P.pricescale,P.minmov,P.type,P.minmove2),this._lastSymbolInfo=P);var L,C=u(this._source.ownerSource().formatter().format(T)+" ("+this._percentageFormatter.format(S)+") "+(this._pipFormatter?this._pipFormatter.format(T):"")),M={} +;if(R>b)(L=l.clone()).y-=2*t.fontsize.value(),L.x=.5*(o.x+l.x),M.points=[L];else(L=l.clone()).x=.5*(o.x+l.x),L.y+=.7*t.fontsize.value(),M.points=[L];var I={x:0,y:10};M.text=C,M.color=t.textcolor.value(),M.height=f._source.priceScale().height(),M.font=t.font.value(),M.offsetX=I.x,M.offsetY=I.y,M.vertAlign="middle",M.horzAlign="center",M.fontsize=t.fontsize.value(),M.backgroundRoundRect=4,M.backgroundHorzInflate=.4*t.fontsize.value(),M.backgroundVertInflate=.2*t.fontsize.value(),t.fillLabelBackground&&t.fillLabelBackground.value()&&(M.backgroundColor=t.labelBackgroundColor.value()),t.drawBorder&&t.drawBorder.value()&&(M.borderColor=t.borderColor.value()),this._labelRenderer.setData(M);var O=this._labelRenderer.measure(),D=s(O,o,l,I,f._source.priceScale().height());this._labelRenderer.setPoints([D]),e.append(this._labelRenderer),this.addAnchors(e),this._renderer=e}},t.PriceRangePaneView=_},X4Cb:function(e,t,i){"use strict";i.r(t),i.d(t,"GannComplexPaneView",(function(){return u}));var r=i("mrSG"),n=i("aO4+"),a=i("aB9a"),s=i("pJOz"),o=i("qgcf"),l=i("Zy3/"),h=i("a7Ha"),d=i("8Uy/"),c=i("amvX"),p=i("Ialn"),u=function(e){function t(t,i){var r=e.call(this,t,i)||this;return r._verticalLevelsRenderers=[],r._horizontalLevelsRenderers=[],r._fanRenderers=[],r._arcRenderers=[],r._priceDiffTextRenderer=new o.TextRenderer,r._indexDiffTextRenderer=new o.TextRenderer,r._ratioTextRenderer=new o.TextRenderer,r._renderer=null,r._initRenderers(),r}return Object(r.__extends)(t,e),t.prototype.renderer=function(e,t){return this._invalidated&&this._updateImpl(),this._renderer},t.prototype._updateImpl=function(){e.prototype._updateImpl.call(this),this._renderer=null;var t=new l.CompositeRenderer,i=this._getPoints();if(i.length<2)return this.addAnchors(t),void(this._renderer=t);var r=i[0],n=i[1],a=this._getSource(),s=a.isReversed();s&&(n=i[0],r=i[1]);var o=n.x-r.x,h=n.y-r.y,d=r,c=n,p=this._getModel(),u={barsCoordsRange:o,priceCoordsRange:h,startPoint:d,endPoint:c,p1:r,p2:n,isLabelsVisible:a.isLabelsVisible(),reversed:s};this._prepareLevels(t,u),this._prepareFanLines(t,u),this._prepareArcs(t,u),this._prepareLabels(t,u);var _=[r,n];p.lineBeingCreated()===a&&_.pop(),t.append(this.createLineAnchor({points:_})),this._renderer=t},t.prototype._initRenderers=function(){for(var e=this._getSource(),t=e.levelsCount(),i=0;i_){f=a.x;var g=_/u;v=r.y+g*o}else{v=a.y;g=u/_;f=r.x+g*s}var y={points:[i,new n.Point(f,v)],color:p.color,linewidth:p.width,linestyle:d.LINESTYLE_SOLID,extendleft:!1,extendright:!1,leftend:h.LineEnd.Normal,rightend:h.LineEnd.Normal},w=this._fanRenderers[p.index];w.setData(y),e.append(w)}}},t.prototype._prepareArcs=function(e,t){for(var i=t.p1,r=t.startPoint,a=t.endPoint,s=t.barsCoordsRange,o=t.priceCoordsRange,l=i,h=this._getSource(),d=h.isArcsBackgroundFilled(),c=h.arcsBackgroundTransparency(),p=0,u=h.arcs();p0?"right":"left",_.vertAlign=h>0?"bottom":"top",_.offsetX=10,_.offsetY=h>0?8:10,_.forceTextAlign=!0,this._priceDiffTextRenderer.setData(_),e.append(this._priceDiffTextRenderer);var f=new n.Point(r.x,i.y),v=Object(p.forceLTRStr)(d.toString()),g=this._getLabelData(f,v);g.horzAlign=d>0?"left":"right",g.vertAlign=h>0?"top":"bottom",g.offsetX=10,g.offsetY=h>0?10:8,g.forceTextAlign=!0,this._indexDiffTextRenderer.setData(g),e.append(this._indexDiffTextRenderer);var y=o.getScaleRatio();if(null!==y){var w=o.getScaleRatioFormatter(),x=Object(p.forceLTRStr)(w.format(y)),m=this._getLabelData(r,x);m.horzAlign=d>0?"left":"right",m.vertAlign=h>0?"bottom":"top",m.offsetX=10,m.offsetY=h>0?8:10,m.forceTextAlign=!0,this._ratioTextRenderer.setData(m),e.append(this._ratioTextRenderer)}}}},t.prototype._getLabelData=function(e,t){var i=this._getSource().getLabelsStyle(),r=i.textColor,n=i.font,a=i.fontSize;return{points:[e],backgroundColor:"transparent",text:t,font:n,bold:i.bold,italic:i.italic,fontsize:a,color:r,vertAlign:"top",horzAlign:"center",offsetX:0,offsetY:0,backgroundRoundRect:4}},t}(a.LineSourcePaneView)},XHET:function(e,t,i){"use strict" +;var r=i("aO4+").Point,n=i("aB9a").LineSourcePaneView,a=i("5/lF").TrendLineStatsRenderer,s=i("qgcf").TextRenderer,o=i("pJOz").TrendLineRenderer,l=i("Zy3/").CompositeRenderer,h=i("GH0z").PercentageFormatter,d=i("vq8G").SelectionRenderer,c=i("5C6T").PipFormatter,p=i("a7Ha").LineEnd,u=i("8xAY").LabelSettings,_=i("zDbI").CHART_FONT_FAMILY,f=i("VdBB").HitTestResult,v=i("cPgM").ScaledPaneRenderer,g=i("cPgM").ScaledPaneRendererWrapper,y=i("Ialn").forceLTRStr;function w(){v.call(this),this._data=null}function x(e,t){n.call(this,e,t),this._label=null,this._rendererCache={},this._pipFormatter=null,this._lastSymbolInfo=null,this._trendLineRenderer=new o,this._angleRenderer=new w,this._angleLabelRenderer=new s,this._renderer=null}inherit(w,v),w.prototype.setData=function(e){this._data=e},w.prototype.hitTest=function(){return null},w.prototype._drawImpl=function(e){if(null!==this._data){e.save(),e.translate(this._data.point.x,this._data.point.y),e.strokeStyle=this._data.color;var t=[1,2];"function"==typeof e.setLineDash?e.setLineDash(t):void 0!==e.mozDash?e.mozDash=t:void 0!==e.webkitLineDash&&(e.webkitLineDash=t);var i=this._data.size;e.beginPath(),e.moveTo(0,0),e.lineTo(i,0),e.arc(0,0,i,0,-this._data.angle,this._data.angle>0),e.stroke(),e.restore()}},inherit(x,n),x.prototype._updateImpl=function(){if(n.prototype._updateImpl.call(this),this._renderer=null,this._points.length>0&&void 0!==this._source._angle){var e=this._points[0],t=Math.cos(this._source._angle),i=-Math.sin(this._source._angle),s=new r(t,i);this._secondPoint=e.addScaled(s,this._source._distance),this._secondPoint.data=1,this._middlePoint=this._source.calcMiddlePoint(this._points[0],this._secondPoint)}if(this._label=null,!(this._source.points().length<2)){e=this._source.points()[0];var o,v,w=this._source.points()[1],x=[];if(this._source.properties().showPriceRange.value()&&this._source.priceScale()){var m=w.price-e.price,b=m/Math.abs(e.price);o=this._source.ownerSource().formatter().format(m)+" ("+(new h).format(100*b)+") ";var R=this._model.mainSeries().symbolInfo();R&&R!==this._lastSymbolInfo&&(this._pipFormatter=new c(R.pricescale,R.minmov,R.type,R.minmove2),this._lastSymbolInfo=R),o+=this._pipFormatter?", "+this._pipFormatter.format(m):"",x.push("priceRange")}if(this._source.properties().showBarsRange.value()){v="";var T=w.index-e.index;v+=$.t("{0} bars").format(y(T)),x.push("barsRange")}this._label=[y(o),v].filter((function(e){return e})).join("\n")||null,this._icons=x;var S=new l,P={},L=this.isHoveredSource()||this.isSelectedSource()||this._source.properties().alwaysShowStats.value(),C=(this.isHoveredSource()||this.isSelectedSource())&&this._source.properties().showMiddlePoint.value();if(this._secondPoint&&this._points.length>0){var M=this._source.properties().linecolor.value();if(P.points=[this._points[0],this._secondPoint],P.width=this._model.timeScale().width(),P.height=this._source.priceScale().height(),P.color=M,P.linewidth=this._source.properties().linewidth.value(),P.linestyle=this._source.properties().linestyle.value(), +P.extendleft=this._source.properties().extendLeft.value(),P.extendright=this._source.properties().extendRight.value(),P.leftend=p.Normal,P.rightend=p.Normal,this._trendLineRenderer.setData(P),S.append(this._trendLineRenderer),L&&this._label&&2===this._points.length){var I=this._source.properties().statsPosition.value(),O=this._source.getPointByPosition(I,P.points[0],this._middlePoint,P.points[1]),D=this._model.isDark(),k=D?u.bgColorDark:u.bgColorLight,B=D?u.textColorDark:u.textColorLight,N={points:[O],text:this._label,color:B,isDark:D,font:_,fontSize:u.fontSize,lineSpacing:u.lineSpacing,backgroundColor:k,backgroundRoundRect:u.rectRadius,paddingLeft:u.paddingLeftRight,paddingRight:u.paddingLeftRight,paddingTop:u.paddingTopBottom,paddingBottom:u.paddingTopBottom,textPadding:u.textPadding,doNotAlignText:!0,icons:this._icons},A=u.offset;N.offsetX=A,N.offsetY=A,(this._points[1].ythis._points[0].y&&this._points[1].x>this._points[0].x)&&(N.vertAlign="bottom"),S.append(new g(new a(N,this._rendererCache)))}this._middlePoint&&S.append(new d({points:[this._middlePoint],bgColors:this._lineAnchorColors([this._middlePoint]),color:M,visible:C&&this.areAnchorsVisible(),hittestResult:f.REGULAR}));var z={};z.point=this._points[0],z.angle=this._source._angle,z.color=this._source.properties().linecolor.value(),z.size=50,this._angleRenderer.setData(z),S.append(this._angleRenderer);var E=Math.round(180*z.angle/Math.PI)+"º";(O=this._points[0].clone()).x=O.x+50;var V={points:[O],text:y(E),color:this._source.properties().textcolor.value(),horzAlign:"left",font:this._source.properties().font.value(),offsetX:5,offsetY:0,bold:this._source.properties().bold.value(),italic:this._source.properties().italic.value(),fontsize:this._source.properties().fontsize.value(),vertAlign:"middle"};this._angleLabelRenderer.setData(V),S.append(this._angleLabelRenderer)}0,this._secondPoint&&this._points.length>0&&S.append(this.createLineAnchor({points:[this._points[0],this._secondPoint]})),this._renderer=S}},x.prototype.renderer=function(e,t){return this._invalidated&&this._updateImpl(),this._renderer},t.TrendAnglePaneView=x},ZJWf:function(e,t,i){"use strict";var r=i("aO4+").Point,n=i("aB9a").LineSourcePaneView,a=i("2trc").ChannelRenderer,s=i("qgcf").TextRenderer,o=i("pJOz").TrendLineRenderer,l=i("VdBB").HitTestResult,h=i("Zy3/").CompositeRenderer,d=i("a7Ha").LineEnd;function c(e,t){n.call(this,e,t),this._renderer=null}inherit(c,n),c.prototype._updateImpl=function(){if(n.prototype._updateImpl.call(this),this._renderer=null,!(this._source.points().length<2)&&this._source.priceScale()&&!this._source.priceScale().isEmpty()&&!this._model.timeScale().isEmpty()){var e=this._floatPoints[0],t=this._floatPoints[1];this._fans=[];for(var i=t.x-e.x,c=t.y-e.y,p=1;p<=9;p++){var u="level"+p,_=this._source.properties()[u];if(_.visible.value()){var f,v,g=_.coeff1.value(),y=_.coeff2.value(),w=g/y,x=_.color.value(),m=g+"/"+y;g>y?(f=t.x,v=e.y+c/w):(f=e.x+i*w,v=t.y),this._fans.push({label:m,color:x,x:f,y:v, +linewidth:_.linewidth.value(),linestyle:_.linestyle.value(),index:p})}}if(!(this._floatPoints.length<2)){var b=new h,R=(e=this._floatPoints[0],this._source.properties()),T=this._source.properties().fillBackground.value(),S=this._source.properties().transparency.value();for(p=0;p4&&p>0){var C;L=new r(this._fans[p-1].x,this._fans[p-1].y);(C={}).width=this._model.timeScale().width(),C.height=this._source.priceScale().height(),C.p1=e,C.p2=P,C.p3=e,C.p4=L,C.color=this._fans[p].color,C.transparency=S,C.hittestOnBackground=!0,(M=new a).setData(C),b.append(M)}var M,I={points:[e,P],width:this._model.timeScale().width(),height:this._source.priceScale().height(),color:this._fans[p].color,linewidth:this._fans[p].linewidth,linestyle:this._fans[p].linestyle,extendleft:!1,extendright:!0,leftend:d.Normal,rightend:d.Normal};if((M=new o).setData(I),M.setHitTest(new l(l.MOVEPOINT,null,this._fans[p].index)),b.append(M),R.showLabels.value()){var O={points:[P],text:this._fans[p].label,color:this._fans[p].color,vertAlign:"middle",horzAlign:"left",font:R.font.value(),offsetX:0,offsetY:5,fontsize:12};b.append(new s(O))}}this.addAnchors(b),this._renderer=b}}},c.prototype.renderer=function(e,t){return this._invalidated&&this._updateImpl(),this._renderer},t.GannFanPaneView=c},a6on:function(e,t,i){"use strict";var r=i("GEp6").distanceToSegment,n=i("aB9a").LineSourcePaneView,a=i("pJOz").drawArrow,s=i("VdBB").HitTestResult,o=i("Zy3/").CompositeRenderer,l=i("Tmoa"),h=i("a7Ha").LineEnd,d=i("2hKl"),c=i("cPgM").ScaledPaneRenderer;function p(){c.call(this),this._data=null}function u(e,t){n.call(this,e,t),this._bezierCubicrenderer=new p,this._renderer=null}inherit(p,c),p.prototype.setData=function(e){this._data=e},p.prototype._drawImpl=function(e,t){if(null!==this._data){e.lineCap="butt",e.strokeStyle=this._data.color,e.lineWidth=this._data.linewidth,CanvasEx.setLineStyle(e,this._data.linestyle);var i=this._data.points[0],r=this._data.points[1];if(2===this._data.points.length)e.beginPath(),e.moveTo(i.x,i.y),e.lineTo(r.x,r.y),e.stroke(),this._data.leftend===h.Arrow&&a(r,i,e,e.lineWidth,t.pixelRatio),this._data.rightend===h.Arrow&&a(i,r,e,e.lineWidth,t.pixelRatio);else{var n=this._data.points[2],s=this._data.points[3],o=s.subtract(i),d=n.subtract(o.scaled(.25)),c=n.add(o.scaled(.25)),p=r.subtract(n),u=s.subtract(p.scaled(.25)),_=s.add(p.scaled(.25));if(this._data.fillBack&&this._data.points.length>2&&(e.fillStyle=l.generateColor(this._data.backcolor,this._data.transparency),e.beginPath(),e.moveTo(i.x,i.y),e.quadraticCurveTo(d.x,d.y,n.x,n.y),e.bezierCurveTo(c.x,c.y,u.x,u.y,s.x,s.y),e.quadraticCurveTo(_.x,_.y,r.x,r.y),e.fill()),e.beginPath(), +this._data.extendLeftPoints.length>0){var f=this._data.extendLeftPoints[this._data.extendLeftPoints.length-1];e.moveTo(f.x,f.y);for(var v=this._data.extendLeftPoints.length-2;v>=0;v--){var g=this._data.extendLeftPoints[v];e.lineTo(g.x,g.y)}}e.moveTo(i.x,i.y),e.quadraticCurveTo(d.x,d.y,n.x,n.y),e.bezierCurveTo(c.x,c.y,u.x,u.y,s.x,s.y),e.quadraticCurveTo(_.x,_.y,r.x,r.y);for(v=0;vMath.PI/4&&n<3*Math.PI/4?c.PaneCursorType.VerticalResize:c.PaneCursorType.HorizontalResize}i.d(t,"thirdPointCursorType",(function(){return m})),i.d(t,"LineSourcePaneView",(function(){return b}));var b=function(){function e(e,t){this._invalidated=!0,this._points=[],this._floatPoints=[],this._middlePoint=null,this._source=e,this._model=t}return e.prototype.priceToCoordinate=function(e){var t=this._source.priceScale();if(null===t)return null +;var i=this._source.ownerSource(),r=null!==i?i.firstValue():null;return null===r?null:t.priceToCoordinate(e,r)},e.prototype.currentPoint=function(){var e=this._model.crossHairSource();return new n.Point(e.originX(),e.originY())},e.prototype.anchorColor=function(){return"#1E88E5"},e.prototype.isHoveredSource=function(){return this._source===this._model.hoveredSource()},e.prototype.isSelectedSource=function(){return this._model.selection().isSelected(this._source)},e.prototype.isBeingEdited=function(){return this._model.lineBeingEdited()===this._source},e.prototype.isEditMode=function(){return!this._model.isSnapshot()},e.prototype.areAnchorsVisible=function(){return(this.isHoveredSource()&&!this.isLocked()||this.isSelectedSource())&&this.isEditMode()},e.prototype.update=function(){this._invalidated=!0},e.prototype.isLocked=function(){return Boolean(this._source.isLocked&&this._source.isLocked())},e.prototype.addAnchors=function(e){var t=this._points;this._model.lineBeingCreated()===this._source&&(t=t.slice(0,-1)),e.append(this.createLineAnchor({points:t}))},e.prototype.createLineAnchor=function(e){if(this.isLocked())return new o.SelectionRenderer({bgColors:this._lineAnchorColors(e.points),points:e.points,visible:this.areAnchorsVisible(),hittestResult:s.HitTestResult.REGULAR,barSpacing:this._model.timeScale().barSpacing()});var t=Object(a.lastEventIsTouch)();return new w(Object(r.__assign)(Object(r.__assign)({},e),{color:this.anchorColor(),backgroundColors:this._lineAnchorColors(e.points),currentPoint:this.currentPoint(),linePointBeingEdited:this.isBeingEdited()?this._model.linePointBeingEdited():null,hittestResult:s.HitTestResult.CHANGEPOINT,radius:t?13:6,strokeWidth:t?2:1,selected:this.isSelectedSource(),selectedStrokeWidth:t?0:3,visible:this.areAnchorsVisible()}))},e.prototype._lineAnchorColors=function(e){var t=this,i=Object(x.ensureNotNull)(this._model.paneForSource(this._source)).height();return e.map((function(e){return t._model.backgroundColorAtYPercentFromTop(e.y/i)}))},e.prototype._updateImpl=function(){this._points=[],this._floatPoints=[];var e=this._source.priceScale(),t=this._model.timeScale();if(e&&!e.isEmpty()&&!t.isEmpty()){for(var i=this._source.points(),r=0;rthis._data.point.y)return null;if(e.xthis._data.point.x+this._data.width)return null;var t=new r(this._data.point.x+this._data.width/2,this._data.point.y),i=e.subtract(t),n=this._data.height/this._data.width;i.y/=n;var s=i.length();return Math.abs(s-this._data.width/2)<3?new a(a.MOVEPOINT):null},inherit(d,n),d.prototype.renderer=function(e,t){return this._invalidated&&this._updateImpl(),this._renderer},d.prototype._updateImpl=function(){if(n.prototype._updateImpl.call(this),this._renderer=null,!(this._points.length<2)){var e=this._source.points(),t=e[0],i=e[1],a=Math.min(t.index,i.index),o=Math.max(t.index,i.index),l=o-a,d=this._points[0],c=this._points[1],p=Math.abs(d.x-c.x),u=new s,_=this._source.properties(),f=this._model.timeScale();if(0!==l){for(var v=Math.min(d.x,c.x),g=[],y=a;v>-p;y-=l)v=f.indexToCoordinate(y),g.push(v);v=Math.max(d.x,c.x);for(y=o;v=0&&t.y*e.y>=0?new s.HitTestResult(s.HitTestResult.MOVEPOINT):this._data.fillBack&&o>=h&&o<=a&&t.x*e.x>=0&&t.y*e.y>=0?new s.HitTestResult(s.HitTestResult.MOVEPOINT_BACKGROUND):null},t.prototype._drawImpl=function(e){if(null!==this._data){e.lineCap="butt",e.strokeStyle=this._data.color,e.lineWidth=this._data.linewidth,e.translate(this._data.center.x,this._data.center.y);var t=this._data.edge.subtract(this._data.center),i=t.y/t.x,r=this._data.point.subtract(this._data.center),s=(r=new n.Point(r.x,r.y/i)).length(),o=this._data.prevPoint.subtract(this._data.center),l=(o=new n.Point(o.x,o.y/i)).length();e.scale(1,i),this._data.fillBack&&(this._data.point.xthis._data.center.x?e.arc(0,0,Math.abs(s),0,Math.PI/2,!1):e.arc(0,0,Math.abs(s),-Math.PI/2,-Math.PI,!0),e.scale(1,1/i),e.stroke()}},t}(i("cPgM").ScaledPaneRenderer)},bFMU:function(e,t,i){"use strict";var r=i("aB9a").LineSourcePaneView,n=i("pJOz").TrendLineRenderer,a=i("qgcf").TextRenderer,s=i("Zy3/").CompositeRenderer,o=i("zXvd").NumericFormatter,l=i("Tmoa"),h=i("a7Ha").LineEnd;function d(e,t){r.call(this,e,t),this._numericFormatter=new o,this._lineRendererPoints01=new n,this._lineRendererPoints12=new n,this._lineRendererPoints23=new n,this._abRetracementTrend=new n,this._cdRetracementTrend=new n,this._abLabelRenderer=new a,this._cdLabelRenderer=new a,this._textRendererALabel=new a,this._textRendererBLabel=new a,this._textRendererCLabel=new a,this._textRendererDLabel=new a,this._renderer=null}inherit(d,r),d.prototype.renderer=function(e,t){return this._invalidated&&this._updateImpl(),this._renderer},d.prototype._updateImpl=function(){var e,t,i;if(r.prototype._updateImpl.call(this),this._source.points().length>=3&&(e=this._source.points()[0],t=this._source.points()[1],i=this._source.points()[2],this._ABRetracement=Math.round(1e3*Math.abs((i.price-t.price)/(t.price-e.price)))/1e3),4===this._source.points().length){var n=this._source.points()[3];this._CDRetracement=Math.round(1e3*Math.abs((n.price-i.price)/(i.price-t.price)))/1e3}if(this._points.length<2)this._renderer=null;else{ +var a=this._source.properties(),o=new s,d=this._points,c=this,p=function(e,t){return{points:[e],text:t,color:a.textcolor.value(),vertAlign:"middle",horzAlign:"center",font:a.font.value(),offsetX:0,offsetY:0,bold:a.bold&&a.bold.value(),italic:a.italic&&a.italic.value(),fontsize:a.fontsize.value(),backgroundColor:c._source.properties().color.value(),backgroundRoundRect:4}},u=function(e,t,i,r){return{points:[e,t],width:c._model.timeScale().width(),height:c._source.priceScale().height(),color:l.generateColor(c._source.properties().color.value(),i),linewidth:r||a.linewidth.value(),linestyle:CanvasEx.LINESTYLE_SOLID,extendleft:!1,extendright:!1,leftend:h.Normal,rightend:h.Normal}},_=u(d[0],d[1],0);if(this._lineRendererPoints01.setData(_),o.append(this._lineRendererPoints01),d.length>=3){_=u(d[1],d[2],0);this._lineRendererPoints12.setData(_),o.append(this._lineRendererPoints12)}if(4===d.length){_=u(d[2],d[3],0);this._lineRendererPoints23.setData(_),o.append(this._lineRendererPoints23)}var f=p(this._points[0],"A");this._points[1].y>this._points[0].y?(f.vertAlign="bottom",f.offsetY=5):(f.vertAlign="top",f.offsetY=5),this._textRendererALabel.setData(f),o.append(this._textRendererALabel);f=p(this._points[1],"B");if(this._points[1].y2){f=p(this._points[2],"C");this._points[2].y3){f=p(this._points[3],"D");this._points[3].y=3){var v=this._points[0].add(this._points[2]).scaled(.5);_=u(this._points[0],this._points[2],70,1);this._abRetracementTrend.setData(_),o.append(this._abRetracementTrend);f=p(v,this._numericFormatter.format(this._ABRetracement));this._abLabelRenderer.setData(f),o.append(this._abLabelRenderer)}if(this._points.length>=4){v=this._points[1].add(this._points[3]).scaled(.5),_=u(this._points[1],this._points[3],70,1);this._cdRetracementTrend.setData(_),o.append(this._cdRetracementTrend);f=p(v,this._numericFormatter.format(this._CDRetracement));this._cdLabelRenderer.setData(f),o.append(this._cdLabelRenderer)}this.addAnchors(o),this._renderer=o}},t.ABCDPaneView=d},bcXK:function(e,t,i){"use strict";var r=i("aO4+").Point,n=i("Hr11"),a=i("pJOz").TrendLineRenderer,s=i("cjIn").PaneRendererCachedImage,o=i("VdBB").HitTestResult,l=i("Zy3/").CompositeRenderer,h=i("Tmoa"),d=i("a7Ha").LineEnd,c=i("cPgM").ScaledPaneRenderer,p=i("NCfL").LineToolPaneViewWithLevelledTextCache;function u(e,t,i){c.call(this),this._data=e,this._hittest=t||new o(o.MOVEPOINT),this._backHittest=i||new o(o.MOVEPOINT_BACKGROUND)}function _(e,t){p.call(this,e,t),this._rendererCache={},this._trendLineRenderer=new a,this._renderer=null} +inherit(u,c),u.prototype._drawImpl=function(e){e.lineCap="butt",e.strokeStyle=this._data.color,e.lineWidth=this._data.linewidth,e.translate(this._data.center.x,this._data.center.y),e.beginPath(),this._data.fullCircles?e.arc(0,0,this._data.radius,2*Math.PI,0,!1):this._data.dir>0?e.arc(0,0,this._data.radius,0,Math.PI,!1):e.arc(0,0,this._data.radius,Math.PI,0,!1),e.stroke(),this._data.fillBackground&&(this._data.radius2&&(this._data.fullCircles?e.arc(0,0,this._data.radius2,2*Math.PI,0,!0):this._data.dir>0?e.arc(0,0,this._data.radius2,Math.PI,0,!0):e.arc(0,0,this._data.radius2,0,Math.PI,!0)),e.fillStyle=h.generateColor(this._data.color,this._data.transparency,!0),e.fill())},u.prototype.hitTest=function(e){if(n.sign(e.y-this._data.center.y)!==this._data.dir&&!this._data.fullCircles)return null;var t=e.subtract(this._data.center).length();return Math.abs(t-this._data.radius)<3?this._hittest:this._data.hittestOnBackground&&Math.abs(t)<=this._data.radius+3?this._backHittest:null},inherit(_,p),_.prototype.getCacheRects=function(e,t){p.prototype.getCacheRects.call(this,e,t);var i=this._cacheState.preparedCells.cells[this._levels[t].index-1];if(i){var r=this._levels[t],n={left:i.left,top:this._cache.topByRow(this._cacheState.row),width:i.width,height:this._cache.rowHeight(this._cacheState.row)};return{cacheRect:n,targetRect:{left:Math.round(r.labelPoint.x-n.width),top:Math.round(r.labelPoint.y-n.height/2),width:i.width,height:n.height}}}},_.prototype._updateImpl=function(){if(p.prototype._updateImpl.call(this),this._renderer=null,!(this._floatPoints.length<2)&&this._source.priceScale()&&!this._source.priceScale().isEmpty()&&!this._model.timeScale().isEmpty()){var e=this._floatPoints[0],t=this._floatPoints[1],i=e.subtract(t).length();this._levels=[];for(var a=this._source.properties(),h=this._source.levelsCount(),c=1;c<=h;c++){var _=a["level"+c];if(_.visible.value()){var f=_.coeff.value(),v=_.color.value(),g=t.subtract(e).length()*f,y=n.sign(t.y-e.y),w=new r(e.x,e.y+y*i*f);this._levels.push({color:v,radius:g,dir:y,labelPoint:w,linewidth:_.linewidth.value(),linestyle:_.linestyle.value(),index:c})}}if(!(this._floatPoints.length<2)){var x=new l,m=(e=this._floatPoints[0],(a=this._source.properties()).fillBackground.value()),b=a.transparency.value();for(c=0;c0&&(T.radius2=this._levels[c-1].radius);var S=new o(o.MOVEPOINT,null,R.index);if(x.append(new u(T,S)),a.showCoeffs.value()){var P=new s(this,c);x.append(P)}}if(a.trendline.visible.value()){var L={points:[this._floatPoints[0],this._floatPoints[1]],width:this._model.timeScale().width(),height:this._source.priceScale().height(),color:a.trendline.color.value(),linewidth:a.trendline.linewidth.value(),linestyle:a.trendline.linestyle.value(),extendleft:!1,extendright:!1,leftend:d.Normal,rightend:d.Normal};this._trendLineRenderer.setData(L), +x.append(this._trendLineRenderer)}this.addAnchors(x),this._renderer=x}}},_.prototype.renderer=function(e,t){return this._invalidated&&this._updateImpl(),this._renderer},t.FibSpeedResistanceArcsPaneView=_},c6sA:function(e,t,i){"use strict";var r=i("aO4+").Point,n=i("aB9a").LineSourcePaneView,a=i("z+cS").VerticalLineRenderer,s=i("IjC5").RectangleRenderer,o=i("pJOz").TrendLineRenderer,l=i("VdBB").HitTestResult,h=i("gyZD").PaneRendererLine,d=i("Zy3/").CompositeRenderer,c=i("Tmoa"),p=i("Ye2/").LineToolBarsPatternMode,u=i("a7Ha").LineEnd;function _(e,t){n.call(this,e,t),this._vertLineRenderer1=new a,this._vertLineRenderer2=new a,this._medianRenderer=new o,this._renderer=null}inherit(_,n),_.prototype.renderer=function(e,t){return this._invalidated&&this._updateImpl(),this._renderer},_.prototype._updateImpl=function(){if(n.prototype._updateImpl.call(this),this._renderer=null,!(!this._source.priceScale()||this._source.priceScale().isEmpty()||this._points.length<2)){if(this._source._pattern&&this._source._pattern.length>0&&2===this._source.points().length){var e=this._source.priceScale(),t=this._source.firstPatternPrice(),i=this._source.pressCoeff(),a=this._source.ownerSource().firstValue(),o=e.priceToCoordinate(t,a),_=function(r){var n=(r-t)*i+t;return e.priceToCoordinate(n,a)-o},f=parseInt(this._source.properties().mode.value()),v=this._source.points()[0].index>this._source.points()[1].index?1:0,g=this._points[v],y=g.x,w=Math.abs((this._points[0].x-this._points[1].x)/(this._source._pattern.length-1)),x={0:function(e){return{high:_(e[TradingView.HIGH_PLOT]),low:_(e[TradingView.LOW_PLOT])}},1:function(e,t){return new r(y+t*w,_(e[TradingView.CLOSE_PLOT])+g.y)},2:function(e){return{open:_(e[TradingView.OPEN_PLOT]),close:_(e[TradingView.CLOSE_PLOT])}},3:function(e,t){return new r(y+t*w,_(e[TradingView.OPEN_PLOT])+g.y)},4:function(e,t){return new r(y+t*w,_(e[TradingView.HIGH_PLOT])+g.y)},5:function(e,t){return new r(y+t*w,_(e[TradingView.LOW_PLOT])+g.y)},6:function(e,t){return new r(y+t*w,_((e[TradingView.HIGH_PLOT]+e[TradingView.LOW_PLOT])/2)+g.y)}};this._pattern=this._source._pattern.map(x[f])}else delete this._pattern;if(this._pattern&&2===this._source.points().length){var m=this._source.points()[0].index1&&(this._modifiedBase=this._floatPoints[0].add(this._floatPoints[1]).scaled(.5))},inherit(p,c),p.prototype._calcMofifiedBase=function(){if(this._floatPoints.length>2){var e=this._floatPoints[0].x,t=.5*(this._floatPoints[0].y+this._floatPoints[1].y),i=new r(e,t);this._modifiedBase=i}},inherit(u,d),u.prototype._updateRenderer=function(){if(this._floatPoints.length>1&&(this._modifiedBase=this._floatPoints[0].add(this._floatPoints[1]).scaled(.5)),!(this._floatPoints.length<2)){var e=new l;if(this._medianPoint&&this._modifiedBase){var t=this._source.properties();if(3===this._floatPoints.length){var i={points:[this._modifiedBase,this._floatPoints[2]],width:this._model.timeScale().width(),height:this._source.priceScale().height(),color:t.median.color.value(),linewidth:t.median.linewidth.value(),linestyle:t.median.linestyle.value(),extendleft:!1,extendright:!1,leftend:h.Normal,rightend:h.Normal};this._medianRenderer.setData(i), +e.append(this._medianRenderer)}var r={points:[this._floatPoints[0],this._floatPoints[1]],width:this._model.timeScale().width(),height:this._source.priceScale().height(),color:t.median.color.value(),linewidth:t.median.linewidth.value(),linestyle:t.median.linestyle.value(),extendleft:!1,extendright:!1,leftend:h.Normal,rightend:h.Normal};if(this._backSideRenderer.setData(r),e.append(this._backSideRenderer),this._floatPoints.length<3)return this.addAnchors(e),void(this._renderer=e);var n={points:[this._floatPoints[1],this._floatPoints[2]],width:this._model.timeScale().width(),height:this._source.priceScale().height(),color:t.median.color.value(),linewidth:t.median.linewidth.value(),linestyle:t.median.linestyle.value(),extendleft:!1,extendright:!1,leftend:h.Normal,rightend:h.Normal};this._sideRenderer.setData(n),e.append(this._sideRenderer);var d=this._floatPoints[2].subtract(this._floatPoints[1]).scaled(.5),c=this._floatPoints[2].subtract(this._modifiedBase),p=0,u=t.fillBackground.value(),_=t.transparency.value(),f={points:[this._medianPoint,this._medianPoint.add(c)],width:this._model.timeScale().width(),height:this._source.priceScale().height(),color:t.median.color.value(),linewidth:t.median.linewidth.value(),linestyle:t.median.linestyle.value(),extendleft:t.extendLines.value(),extendright:!0,leftend:h.Normal,rightend:h.Normal};this._centerRenderer.setData(f),e.append(this._centerRenderer);for(var v=0;v<=8;v++){var g=t["level"+v];if(g.visible.value()){var y=this._medianPoint.addScaled(d,g.coeff.value()),w=y.add(c),x=this._medianPoint.addScaled(d,-g.coeff.value()),m=x.add(c);if(u)(r={}).p1=y,r.p2=w,r.p3=this._medianPoint.addScaled(d,p),r.p4=r.p3.add(c),r.color=g.color.value(),r.width=this._model.timeScale().width(),r.height=this._source.priceScale().height(),r.transparency=_,r.hittestOnBackground=!0,r.extendLeft=t.extendLines.value(),(T=new s).setData(r),e.append(T),(r={}).p1=x,r.p2=m,r.p3=this._medianPoint.addScaled(d,-p),r.p4=r.p3.add(c),r.color=g.color.value(),r.width=this._model.timeScale().width(),r.height=this._source.priceScale().height(),r.transparency=_,r.hittestOnBackground=!0,r.extendLeft=t.extendLines.value(),(T=new s).setData(r),e.append(T);p=g.coeff.value();var b={points:[y,w],width:this._model.timeScale().width(),height:this._source.priceScale().height(),color:g.color.value(),linewidth:g.linewidth.value(),linestyle:g.linestyle.value(),extendleft:t.extendLines.value(),extendright:!0,leftend:h.Normal,rightend:h.Normal},R=new a;R.setData(b),R.setHitTest(new o(o.MOVEPOINT,null,v)),e.append(R);var T,S={points:[x,m],width:this._model.timeScale().width(),height:this._source.priceScale().height(),color:g.color.value(),linewidth:g.linewidth.value(),linestyle:g.linestyle.value(),extendleft:t.extendLines.value(),extendright:!0,leftend:h.Normal,rightend:h.Normal};(T=new a).setData(S),T.setHitTest(new o(o.MOVEPOINT,null,v)),e.append(T)}}this.addAnchors(e),this._renderer=e}else this.addAnchors(e)}},u.prototype._updateImpl=function(){d.prototype._updateImpl.call(this)},u.prototype.renderer=function(e,t){ +return this._invalidated&&this._updateImpl(),this._renderer},t.PitchforkLinePaneView=d,t.SchiffPitchforkLinePaneView=c,t.SchiffPitchfork2LinePaneView=p,t.InsidePitchforkLinePaneView=u},cjIn:function(e,t,i){"use strict";i.r(t),i.d(t,"PaneRendererCachedImage",(function(){return s}));var r=i("aO4+"),n=i("f6yo"),a=i("VdBB"),s=function(){function e(e,t){this._cacheRect=null,this._targetRect=null,this._cacheProvider=e,this._index=t}return e.prototype.draw=function(e,t){var i=this._cacheProvider.getCacheRects(t,this._index);if(null===i)return this._cacheRect=null,void(this._targetRect=null);if(this._cacheRect=i.cacheRect,this._targetRect=i.targetRect,0!==this._cacheRect.width&&0!==this._cacheRect.height&&0!==this._targetRect.width&&0!==this._targetRect.height){e.save(),e.setTransform(1,0,0,1,0,0);var r=t.pixelRatio,n=this._cacheProvider.getCacheCanvas(t);e.drawImage(n,Math.round(this._cacheRect.left*r),Math.round(this._cacheRect.top*r),this._cacheRect.width*r,this._cacheRect.height*r,Math.round(this._targetRect.left*r),Math.round(this._targetRect.top*r),this._targetRect.width*r,this._targetRect.height*r),e.restore()}},e.prototype.hitTest=function(e){if(null===this._targetRect)return null;var t=new r.Point(this._targetRect.left,this._targetRect.top),i=t.add(new r.Point(this._targetRect.width,this._targetRect.height));return Object(n.pointInBox)(e,Object(r.box)(t,i))?new a.HitTestResult(a.HitTestResult.REGULAR):null},e}()},"ckl+":function(e,t,i){"use strict";var r=i("aO4+").Point,n=i("aB9a").LineSourcePaneView,a=i("qgcf").TextRenderer,s=i("VdBB").HitTestResult,o=i("Zy3/").CompositeRenderer,l=i("l4sv").HorizontalLineRenderer,h=[i("//lt").PaneCursorType.VerticalResize];function d(e,t){n.call(this,e,t),this._rendererCache={},this._labelRenderer=new a,this._lineRenderer=new l,this._lineRenderer.setHitTest(new s(s.MOVEPOINT)),this._renderer=null}inherit(d,n),d.prototype.renderer=function(e,t){return this._invalidated&&this._updateImpl(),this._renderer},d.prototype._updateImpl=function(){if(n.prototype._updateImpl.call(this),this._renderer=null,0!==this._points.length){var e=new o,t={};t.width=this._model.timeScale().width(),t.height=this._source.priceScale().height(),t.y=this._points[0].y,t.color=this._source.properties().linecolor.value(),t.linewidth=this._source.properties().linewidth.value(),t.linestyle=this._source.properties().linestyle.value(),this._lineRenderer.setData(t);var i=this._source.properties();if(e.append(this._lineRenderer),this._source.properties().showLabel.value()&&1===this._points.length){var a=i.vertLabelsAlign.value(),s=i.horzLabelsAlign.value(),l=this._points[0],d=0;"left"===s?l.x=3:"right"===s?(l.x=this._model.timeScale().width(),d=3):l.x=this._model.timeScale().width()/2;var c={points:[l],text:i.text.value(),color:i.textcolor.value(),vertAlign:a,horzAlign:s,font:i.font.value(),offsetX:d,offsetY:0,bold:this._source.properties().bold.value(),italic:this._source.properties().italic.value(),fontsize:this._source.properties().fontsize.value(),forceTextAlign:!0};this._labelRenderer.setData(c), +e.append(this._labelRenderer)}if(1===this._points.length){var p=new r(this._model.timeScale().width()/2,this._points[0].y);p.data=0,p.square=!0,e.append(this.createLineAnchor({points:[p],pointsCursorType:h}))}this._renderer=e}},t.HorzLinePaneView=d},"ct+2":function(e,t,i){"use strict";i.r(t);var r=i("mrSG"),n=i("zDbI"),a=i("aB9a"),s=i("Zy3/"),o=i("vq8G"),l=i("qgcf"),h=i("VdBB"),d=i("f6yo"),c=i("Hr11");var p=function(){function e(){this._data=null}return e.prototype.setData=function(e){this._data=e},e.prototype.draw=function(e,t){if(null!==this._data){switch(e.save(),e.fillStyle=this._data.color,this._data.direction){case"up":case"down":!function(e,t,i,r){var n=Math.max(1,Math.floor(r))%2?.5:0,a="up"===i?1:-1,s=a*Math.round(12*r),o=Object(c.ceiledEven)(19.5*r)/2+n,l=a*Math.round(10*r),h=Object(c.ceiledEven)(10*r)/2+n,d=Math.round(t.x*r)+n,p=Math.round(t.y*r);e.beginPath(),e.moveTo(d,p),e.lineTo(d+o,p+s),e.lineTo(d+h,p+s),e.lineTo(d+h,p+s+l),e.lineTo(d-h,p+s+l),e.lineTo(d-h,p+s),e.lineTo(d-o,p+s),e.moveTo(d,p),e.fill()}(e,this._data.point,this._data.direction,t.pixelRatio);break;case"left":case"right":!function(e,t,i,r){var n=Math.max(1,Math.floor(r))%2?.5:0,a="left"===i?1:-1,s=a*Math.round(12*r)+n,o=Object(c.ceiledEven)(19.5*r)/2+n,l=a*Math.round(22*r)+n,h=Object(c.ceiledEven)(10*r)/2+n,d=Math.round(t.x*r)+n,p=Math.round(t.y*r)+n;e.beginPath(),e.moveTo(d,p),e.lineTo(d+s,p+o),e.lineTo(d+s,p+h),e.lineTo(d+l,p+h),e.lineTo(d+l,p-h),e.lineTo(d+s,p-h),e.lineTo(d+s,p-o),e.moveTo(d,p),e.fill()}(e,this._data.point,this._data.direction,t.pixelRatio)}e.restore()}},e.prototype.hitTest=function(e){if(null===this._data)return null;var t,i,r,n;switch(this._data.direction){case"up":r=(t=this._data.point.x-9.75)+19.5,n=(i=this._data.point.y)+12+10;break;case"down":r=(t=this._data.point.x-9.75)+19.5,i=(n=this._data.point.y)-12-10;break;case"left":r=(t=this._data.point.x)+12+10,n=(i=this._data.point.y-9.75)+19.5;break;case"right":t=(r=this._data.point.x)-12-10,n=(i=this._data.point.y-9.75)+19.5}return e.xr||e.yn?null:new h.HitTestResult(h.HitTestResult.MOVEPOINT)},e.prototype.doesIntersectWithBox=function(e){return null!==this._data&&Object(d.pointInBox)(this._data.point,e)},e}();i.d(t,"ArrowMarkPaneView",(function(){return u}));var u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._arrowMarkRenderer=new p,t._textRenderer=new l.TextRenderer,t._renderer=null,t._anchorsOffset=null,t}return Object(r.__extends)(t,e),t.prototype.renderer=function(e,t){return this._invalidated&&this._updateImpl(),this._renderer},t.prototype._updateImpl=function(){if(e.prototype._updateImpl.call(this),this._renderer=null,1===this._points.length){var t=this._getSource(),i=t.properties().childs(),a=this._getModel();this._arrowMarkRenderer.setData({point:this._points[0],direction:t.direction(),color:i.arrowColor.value()}),this._renderer=new s.CompositeRenderer,this._renderer.append(this._arrowMarkRenderer),""!==i.text.value()&&(this._textRenderer.setData(Object(r.__assign)({points:this._points, +font:n.CHART_FONT_FAMILY,fontSize:i.fontsize.value(),text:i.text.value(),color:i.color.value()},t.textAlignParams())),this._renderer.append(this._textRenderer));var l=[this._anchorsOffset?this._points[0].add(this._anchorsOffset):this._points[0].clone()];this._renderer.append(new o.SelectionRenderer({points:l,bgColors:this._lineAnchorColors(l),visible:this.areAnchorsVisible(),barSpacing:a.timeScale().barSpacing(),hittestResult:h.HitTestResult.MOVEPOINT}))}},t}(a.LineSourcePaneView)},dKqZ:function(e,t,i){"use strict";var r=i("aO4+").Point,n=i("GEp6").distanceToLine,a=i("hfHJ"),s=a.rotationMatrix,o=a.scalingMatrix,l=a.translationMatrix,h=a.transformPoint,d=i("aB9a").LineSourcePaneView,c=i("aB9a").thirdPointCursorType,p=i("VdBB").HitTestResult,u=i("Zy3/").CompositeRenderer,_=i("Tmoa"),f=i("cPgM").ScaledPaneRenderer,v=i("//lt").PaneCursorType;function g(){f.call(this),this._data=null}function y(e,t){d.call(this,e,t),this._arcRenderer=new g,this._renderer=null}inherit(g,f),g.prototype.setData=function(e){this._data=e,this._data.angleFrom=0,this._data.angleTo=Math.PI,this._data.clockwise=!1},g.prototype._drawImpl=function(e){if(!(null===this._data||this._data.points.length<2)){var t=this._data.points[0],i=this._data.points[1];if(this._data.points.length<3)return e.strokeStyle=this._data.color,e.lineWidth=this._data.linewidth,e.beginPath(),e.moveTo(t.x,t.y),e.lineTo(i.x,i.y),void e.stroke();var a=this._data.points[2],d=n(t,i,a).distance;if(d<1)return e.strokeStyle=this._data.color,e.lineWidth=this._data.linewidth,e.beginPath(),e.moveTo(t.x,t.y),e.lineTo(i.x,i.y),void e.stroke();var c=i.subtract(t),p=t.add(i).scaled(.5),u=new r(-c.y,c.x);u=u.normalized(),a=p.add(u.scaled(d)),e.strokeStyle=this._data.color,e.lineWidth=this._data.linewidth;var f=c.length(),v=c.x/f,g=c.y/f,y=Math.acos(v);g<0&&(y=-y);var w=this._data.points[2],x=l(-p.x,-p.y);w=h(x,w),x=s(-y),w=h(x,w),x=o(1,f/(2*d)),(w=h(x,w)).y<0?this._data.clockwise=!0:this._data.clockwise=!1,e.save(),e.beginPath(),e.translate(t.x,t.y),e.rotate(y);var m=1-Math.sqrt(3)/2;e.scale(1,d/(f*m)),this._data.clockwise?e.arc(.5*f,f*Math.sqrt(3)/2,f,-2*Math.PI/3,-Math.PI/3,!1):e.arc(.5*f,-f*Math.sqrt(3)/2,f,Math.PI/3,2*Math.PI/3,!1),e.restore(),e.stroke(),this._data.fillBackground&&(e.fillStyle=_.generateColor(this._data.backcolor,this._data.transparency),e.fill())}},g.prototype.hitTest=function(e){if(null===this._data||this._data.points.length<3)return null;var t=this._data.points[0],i=this._data.points[1],a=this._data.points[2],d=n(t,i,a).distance;if(d<1)return(d=n(t,i,e).distance)<5?new p(p.MOVEPOINT):null;var c=i.subtract(t),u=c.length(),_=t.add(i).scaled(.5),f=a.subtract(_);f=f.normalized(),a=_.add(f.scaled(d));var v=c.x/u,g=c.y/u,y=Math.acos(v);g<0&&(y=-y);var w=l(-t.x,-t.y);e=h(w,e),w=s(-y),e=h(w,e),f=h(w,f);var x,m=1-Math.sqrt(3)/2;if(w=o(1,u*m/d),e=h(w,e),f=h(w,f),e.y*f.y<0)return null;x=e.y<0?new r(.5*u,u*Math.sqrt(3)/2):new r(.5*u,-u*Math.sqrt(3)/2);var b=e.subtract(x).length();return Math.abs(b-u)<=5?new p(p.MOVEPOINT):null},inherit(y,d),y.prototype.renderer=function(e,t){ +return this._invalidated&&this._updateImpl(),this._renderer},y.prototype._updateImpl=function(){if(d.prototype._updateImpl.call(this),this._renderer=null,0!==this._points.length){var e={};e.points=this._points,e.color=this._source.properties().color.value(),e.linewidth=this._source.properties().linewidth.value(),e.backcolor=this._source.properties().backgroundColor.value(),e.fillBackground=this._source.properties().fillBackground.value(),e.transparency=this._source.properties().transparency.value(),this._arcRenderer.setData(e);var t=new u;this._renderer=t,t.append(this._arcRenderer);var i=[],a=e.points[0],p=new r(a.x,a.y);if(p.data=0,i.push(p),1!==e.points.length){var _=e.points[1],f=new r(_.x,_.y);if(f.data=1,2!==e.points.length){i.push(f);var g=e.points[2],y=n(a,_,g).distance,w=_.subtract(a),x=a.add(_).scaled(.5),m=new r(-w.y,w.x);m=m.normalized(),g=x.add(m.scaled(y));var b=x.add(m.scaled(-y)),R=w.length(),T=w.x/R,S=w.y/R,P=Math.acos(T);S<0&&(P=-P);var L=e.points[2],C=l(-x.x,-x.y);L=h(C,L),C=s(-P),L=h(C,L),C=o(1,R/(2*y));var M=(L=h(C,L)).y>=0?new r(g.x,g.y):new r(b.x,b.y);M.data=2,i.push(M);var I=[v.Default,v.Default,c(a,_)];t.append(this.createLineAnchor({points:i,pointsCursorType:I}))}else this.addAnchors(t)}}},t.ArcPaneView=y},dMkl:function(e,t,i){"use strict";var r=i("Hr11"),n=i("aB9a").LineSourcePaneView,a=i("pJOz").TrendLineRenderer,s=i("VdBB").HitTestResult,o=i("/hKg").PaneRendererCandles,l=i("Zy3/").CompositeRenderer,h=i("a7Ha").LineEnd,d=i("Zp/P");function c(e,t){n.call(this,e,t),this._renderer=null}inherit(c,n),c.prototype._udpateImpl=function(){n.prototype._updateImpl.call(this),this._renderer=null;var e=this;if(this._segments=[],!(e._points.length<2)){this._segments=this._source.segments().map((function(t,i){var n=e._source.points();if(i>=e._points.length-1)return null;var a=e._points[i].x,s=n[i].price,o=n[i+1].price,l=n[i+1].index-n[i].index,h=e._model.timeScale().barSpacing()*r.sign(l),d=(o-s)/(t.bars().length-1),c=e._source.properties(),p=c.candleStyle.upColor.value(),u=c.candleStyle.downColor.value(),_=c.candleStyle.borderUpColor.value(),f=c.candleStyle.borderDownColor.value();return{bars:t.bars().map((function(t,i){var r=t.c>=t.o;return{time:a+i*h,open:e.priceToCoordinate(t.o+s+i*d),high:e.priceToCoordinate(t.h+s+i*d),low:e.priceToCoordinate(t.l+s+i*d),close:e.priceToCoordinate(t.c+s+i*d),color:r?p:u,borderColor:r?_:f,hollow:!1}}))}})).filter((function(e){return!!e}));for(var t=new l,i=1;i0&&M){var k=this._hlevels[u-1];e=new r(T,this._hlevels[u].y),t=new r(P,k.y);(z={}).points=[e,t],z.color=this._hlevels[u].color,z.linewidth=0,z.backcolor=this._hlevels[u].color,z.fillBackground=!0,z.transparency=I,z.extendLeft=!1,z.extendRight=!1,(V=new s(void 0,void 0,!0)).setData(z),R.append(V)}var B={points:[e=new r(T,this._hlevels[u].y),t=new r(P,this._hlevels[u].y)],width:this._model.timeScale().width(), +height:this._source.priceScale().height(),color:this._hlevels[u].color,linewidth:C.linewidth.value(),linestyle:C.linestyle.value(),extendleft:!1,extendright:!1,leftend:d.Normal,rightend:d.Normal};if((V=new o).setData(B),R.append(V),C.showLeftLabels.value()){var N={points:[e],text:this._numericFormatter.format(this._hlevels[u].coeff),color:this._hlevels[u].color,vertAlign:"middle",horzAlign:"right",font:C.font.value(),offsetX:5,offsetY:0,fontsize:12,forceTextAlign:!0};R.append(new a(N))}if(C.showRightLabels.value()){var A={points:[t],text:this._numericFormatter.format(this._hlevels[u].coeff),color:this._hlevels[u].color,vertAlign:"middle",horzAlign:"left",font:C.font.value(),offsetX:5,offsetY:0,fontsize:12};R.append(new a(A))}}for(u=0;u0&&O){k=this._vlevels[u-1];var z,E=new r(k.x,S);(z={}).points=[E,t],z.color=this._vlevels[u].color,z.linewidth=0,z.backcolor=this._vlevels[u].color,z.fillBackground=!0,z.transparency=D,z.extendLeft=!1,z.extendRight=!1,(V=new s(void 0,void 0,!0)).setData(z),R.append(V)}var V;B={points:[e,t],width:this._model.timeScale().width(),height:this._source.priceScale().height(),color:this._vlevels[u].color,linewidth:C.linewidth.value(),linestyle:C.linestyle.value(),extendleft:!1,extendright:!1,leftend:d.Normal,rightend:d.Normal};if((V=new o).setData(B),R.append(V),C.showTopLabels.value()){var j={points:[e],text:this._numericFormatter.format(this._vlevels[u].coeff),color:this._vlevels[u].color,vertAlign:"bottom",horzAlign:"center",font:C.font.value(),offsetX:0,offsetY:3,fontsize:12};R.append(new a(j))}if(C.showBottomLabels.value()){var H={points:[t],text:this._numericFormatter.format(this._vlevels[u].coeff),color:this._vlevels[u].color,vertAlign:"top",horzAlign:"center",font:C.font.value(),offsetX:0,offsetY:5,fontsize:12};R.append(new a(H))}}var W=this;F(R,this._hfans,!0),F(R,this._vfans,!1),this.addAnchors(R),this._renderer=R}function F(e,t,i){var n=new r(T,S),a=new r(P,S),s=new r(T,L),l=new r(P,L),h={width:W._model.timeScale().width(),height:W._source.priceScale().height(),color:C.fans.color.value(),linewidth:C.linewidth.value(),linestyle:C.linestyle.value(),extendleft:!1,extendright:!1,leftend:d.Normal,rightend:d.Normal};function c(t){var i=new o;i.setData(Object.assign({},h,{points:t})),e.append(i)}for(var p=0;pr.x?"left":"right",vertAlign:"middle",font:v._source.properties().font.value(),offsetX:6,offsetY:0,boxPadding:0,bold:v._source.properties().bold.value(),italic:v._source.properties().italic.value(),fontsize:v._source.properties().fontsize.value(),forceTextAlign:!0};e.setData(o),s.append(e);o={points:[r],text:a,color:v._source.properties().textcolor.value(),horzAlign:i.x=l&&d>=l)return this._backHitTest}return null},t.prototype._drawImpl=function(e){if(null!==this._data&&(e.strokeStyle=this._data.color,e.lineWidth=this._data.linewidth,e.beginPath(),e.arc(this._data.center.x,this._data.center.y,this._data.radius,this._data.edge1,this._data.edge2,!0),e.stroke(),this._data.fillBackground)){if(e.arc(this._data.center.x,this._data.center.y,this._data.prevRadius,this._data.edge2,this._data.edge1,!1),this._data.gradient){var t=e.createRadialGradient(this._data.center.x,this._data.center.y,this._data.prevRadius,this._data.center.x,this._data.center.y,this._data.radius);t.addColorStop(0,Object(a.generateColor)(this._data.color1,this._data.transparency)),t.addColorStop(1,Object(a.generateColor)(this._data.color2,this._data.transparency)),e.fillStyle=t}else e.fillStyle=Object(a.generateColor)(this._data.color,this._data.transparency,!0);e.fill()}},t}(i("cPgM").ScaledPaneRenderer)},jlk4:function(e,t,i){"use strict";var r=i("isd9").ArcWedgeRenderer,n=i("1SUO").FibWedgePaneView,a=i("pJOz").TrendLineRenderer,s=i("Zy3/").CompositeRenderer,o=i("a7Ha").LineEnd;function l(e,t){n.call(this,e,t),this._baseTrendRenderer=new a,this._edgeTrendRenderer=new a,this._arcWedgeRenderer=new r}inherit(l,n),l.prototype.renderer=function(e,t){return this._invalidated&&this._updateImpl(),this._renderer},l.prototype._updateRenderer=function(){if(!(this._points.length<2)){var e=new s,t=this._source.properties(),i=this._points,r=i[0],n=i[1],a={points:[r,n],width:this._model.timeScale().width(),height:this._source.priceScale().height(),color:t.trendline.color.value(),linewidth:t.linewidth.value(),linestyle:t.trendline.linestyle.value(),extendleft:!1,extendright:!1,leftend:o.Normal,rightend:o.Normal};if(this._baseTrendRenderer.setData(a),e.append(this._baseTrendRenderer),this._points.length<3)return this.addAnchors(e),void(this._renderer=e);var l=i[2],h=l.data,d=n.subtract(r).length(),c=l.subtract(r).normalized();(l=r.add(c.scaled(d))).data=h,a={points:[r,l],width:this._model.timeScale().width(),height:this._source.priceScale().height(),color:t.trendline.color.value(), +linewidth:t.linewidth.value(),linestyle:t.trendline.linestyle.value(),extendleft:!1,extendright:!1,leftend:o.Normal,rightend:o.Normal},this._edgeTrendRenderer.setData(a),e.append(this._edgeTrendRenderer);var p=this._levels[0],u={};u.center=this._points[0],u.radius=p.radius,u.prevRadius=0,u.edge=this._edge,u.color=t.trendline.color.value(),u.color1=t.color1.value(),u.color2=t.color2.value(),u.linewidth=t.linewidth.value(),u.edge1=this._edge1,u.edge2=this._edge2,u.p1=p.p1,u.p2=p.p2,u.fillBackground=t.fillBackground.value(),u.transparency=t.transparency.value(),u.gradient=!0,this._arcWedgeRenderer.setData(u),e.append(this._arcWedgeRenderer),this.addAnchors(e),this._renderer=e}},t.ProjectionLinePaneView=l},l5Au:function(e,t,i){"use strict";var r=i("aB9a").LineSourcePaneView,n=i("2trc").ChannelRenderer,a=i("pJOz").TrendLineRenderer,s=i("VdBB").HitTestResult,o=i("Zy3/").CompositeRenderer,l=i("a7Ha").LineEnd;function h(e,t){r.call(this,e,t),this._medianRenderer=new a,this._sideRenderer=new a,this._renderer=null}inherit(h,r),h.prototype._updateImpl=function(){if(r.prototype._updateImpl.call(this),this._renderer=null,0!==this._floatPoints.length&&(3===this._floatPoints.length?(this._medianPoint=this._floatPoints[1].add(this._floatPoints[2]).scaled(.5),this._medianPoint.data=3):2===this._floatPoints.length?(this._medianPoint=this._floatPoints[1],this._medianPoint.data=3):(this._medianPoint=this._floatPoints[0],this._medianPoint.data=3),!(this._floatPoints.length<2)&&this._medianPoint)){var e=new o,t={points:[this._floatPoints[0],this._medianPoint],width:this._model.timeScale().width(),height:this._source.priceScale().height(),color:this._source.properties().median.color.value(),linewidth:this._source.properties().median.linewidth.value(),linestyle:this._source.properties().median.linestyle.value(),extendleft:!1,extendright:!0,leftend:l.Normal,rightend:l.Normal};if(this._medianRenderer.setData(t),e.append(this._medianRenderer),this._floatPoints.length<3)return this.addAnchors(e),void(this._renderer=e);var i={points:[this._floatPoints[1],this._floatPoints[2]],width:this._model.timeScale().width(),height:this._source.priceScale().height(),color:this._source.properties().median.color.value(),linewidth:this._source.properties().median.linewidth.value(),linestyle:this._source.properties().median.linestyle.value(),extendleft:!1,extendright:!1,leftend:l.Normal,rightend:l.Normal};this._sideRenderer.setData(i),e.append(this._sideRenderer);for(var h=0,d=this._floatPoints[2].subtract(this._floatPoints[1]).scaled(.5),c=this._source.properties().fillBackground.value(),p=this._source.properties().transparency.value(),u=0;u<=8;u++){var _="level"+u,f=this._source.properties()[_];if(f.visible.value()){var v,g=this._medianPoint.addScaled(d,f.coeff.value()),y=this._medianPoint.addScaled(d,-f.coeff.value());if(c)(v={}).width=this._model.timeScale().width(),v.height=this._source.priceScale().height(),v.p1=this._floatPoints[0],v.p2=g,v.p3=this._floatPoints[0],v.p4=this._medianPoint.addScaled(d,h),v.color=f.color.value(),v.transparency=p, +v.hittestOnBackground=!0,(x=new n).setData(v),e.append(x),(v={}).width=this._model.timeScale().width(),v.height=this._source.priceScale().height(),v.p1=this._floatPoints[0],v.p2=y,v.p3=this._floatPoints[0],v.p4=this._medianPoint.addScaled(d,-h),v.color=f.color.value(),v.transparency=p,v.hittestOnBackground=!0,(x=new n).setData(v),e.append(x);h=f.coeff.value();var w={points:[this._floatPoints[0],g],width:this._model.timeScale().width(),height:this._source.priceScale().height(),color:f.color.value(),linewidth:f.linewidth.value(),linestyle:f.linestyle.value(),extendleft:!1,extendright:!0,leftend:l.Normal,rightend:l.Normal};(x=new a).setData(w),x.setHitTest(new s(s.MOVEPOINT,null,u)),e.append(x);var x,m={points:[this._floatPoints[0],y],width:this._model.timeScale().width(),height:this._source.priceScale().height(),color:f.color.value(),linewidth:f.linewidth.value(),linestyle:f.linestyle.value(),extendleft:!1,extendright:!0,leftend:l.Normal,rightend:l.Normal};(x=new a).setData(m),x.setHitTest(new s(s.MOVEPOINT,null,u)),e.append(x)}}this.addAnchors(e),this._renderer=e}},h.prototype.renderer=function(e,t){return this._invalidated&&this._updateImpl(),this._renderer},t.PitchfanLinePaneView=h},lZ9F:function(e,t,i){"use strict";var r=i("aO4+").Point,n=i("GEp6").distanceToLine,a=i("aB9a").LineSourcePaneView,s=i("aB9a").thirdPointCursorType,o=i("pJOz").TrendLineRenderer,l=i("BCbF").PolygonRenderer,h=i("Zy3/").CompositeRenderer,d=i("a7Ha").LineEnd,c=i("//lt").PaneCursorType;function p(e,t){a.call(this,e,t),this._poligonRenderer=new l,this._renderer=null}inherit(p,a),p.prototype._updateImpl=function(){if(a.prototype._updateImpl.call(this),this._renderer=null,this._distance=0,3===this._points.length&&(this._distance=n(this._points[0],this._points[1],this._points[2]).distance),0!==this._points.length){var e,t,i,l,p=new h,u=this._source.properties(),_=this._points[0],f=this._points[1];if(2===this._points.length){(g={}).points=this._points,g.floatPoints=this._floatPoints,g.width=this._model.timeScale().width(),g.height=this._source.priceScale().height(),g.color=u.color.value(),g.linewidth=1,g.linestyle=CanvasEx.LINESTYLE_SOLID,g.extendleft=!1,g.extendright=!1,g.leftend=d.Normal,g.rightend=d.Normal;var v=new o;v.setData(g),p.append(v)}else if(3===this._points.length){var g,y=f.subtract(_),w=new r(y.y,-y.x).normalized().scaled(this._distance),x=w.scaled(-1);e=_.add(w),t=f.add(w),i=_.add(x),l=f.add(x),(g={}).points=[e,t,l,i],g.color=u.color.value(),g.linewidth=this._source.properties().linewidth.value(),g.linestyle=CanvasEx.LINESTYLE_SOLID,g.filled=!0,g.backcolor=u.backgroundColor.value(),g.fillBackground=u.fillBackground.value(),g.transparency=u.transparency.value(),this._poligonRenderer.setData(g),p.append(this._poligonRenderer)}var m=[];m.push(_),this._points.length>=2&&m.push(f);var b=[c.Default,c.Default];if(3===this._points.length){e.data=2,i.data=2,t.data=2,l.data=2,m.push(e,i,t,l);var R=s(_,f);b.push(R,R,R,R)}p.append(this.createLineAnchor({points:m,pointsCursorType:b})),this._renderer=p}},p.prototype.renderer=function(e,t){ +return this._invalidated&&this._updateImpl(),this._renderer},t.RotatedRectanglePaneView=p},mJB8:function(e,t,i){e.exports=i.p+"4fafff07d8914dc11f6d335f606ff47c.png"},mjK7:function(e,t,i){"use strict";var r=i("6MfG").Pattern5PaneView;function n(e,t){r.call(this,e,t)}inherit(n,r),n.prototype._updateBaseData=function(){var e,t,i,r,n;this._source.points().length>=3&&(e=this._source.points()[0],t=this._source.points()[1],i=this._source.points()[2],this._ABRetracement=Math.round(1e3*Math.abs((i.price-t.price)/(t.price-e.price)))/1e3),this._source.points().length>=4&&(r=this._source.points()[3],this._BCRetracement=Math.round(1e3*Math.abs((r.price-e.price)/(t.price-e.price)))/1e3),this._source.points().length>=5&&(n=this._source.points()[4],this._CDRetracement=Math.round(1e3*Math.abs((n.price-r.price)/(r.price-i.price)))/1e3,this._XDRetracement=Math.round(1e3*Math.abs((n.price-r.price)/(e.price-r.price)))/1e3)},t.CypherPaneView=n},mr3a:function(e,t,i){"use strict";i.r(t),i.d(t,"TextPaneView",(function(){return f}));var r=i("mrSG"),n=i("Eyy1"),a=i("aO4+"),s=i("zDbI"),o=i("//lt"),l=i("qgcf"),h=i("Zy3/"),d=i("vq8G"),c=i("TTFo"),p=i("VdBB"),u=i("aB9a"),_=[o.PaneCursorType.HorizontalResize],f=function(e){function t(t,i,r,n,a,s,o){var h=e.call(this,t,i)||this;return h._textRenderer=new l.TextRenderer,h._noSelection=!1,h._renderer=null,h._offsetX=r,h._offsetY=n,h._vertAlign=a,h._horzAlign=s,h._forceTextAlign=Boolean(o),h._noSelection=!1,h._renderer=null,h}return Object(r.__extends)(t,e),t.prototype.renderer=function(e,t){return this._invalidated&&this._updateImpl(),this._renderer},t.prototype.disableSelection=function(){this._noSelection=!0},t.prototype.isEditMode=function(){return!this._getModel().readOnly()},t.prototype._updateImpl=function(){e.prototype._updateImpl.call(this),this._renderer=null;var t=this._getSource(),i=t.priceScale();if(i&&!i.isEmpty()){var r=t.properties().childs(),o=this._getModel(),l={text:r.text.value(),color:r.color.value(),fontSize:r.fontsize.value(),boxPadding:r.fontsize.value()/6,font:s.CHART_FONT_FAMILY,vertAlign:this._vertAlign||"top",horzAlign:this._horzAlign||"left",offsetX:this._offsetX||0,offsetY:this._offsetY||0,forceTextAlign:this._forceTextAlign};if(l.points=t.isFixed()?t.fixedPoints():this._points,r.fillBackground&&r.fillBackground.value()&&(l.backgroundColor=r.backgroundColor.value()),r.drawBorder&&r.drawBorder.value()&&(l.borderColor=r.borderColor.value()),r.wordWrap&&r.wordWrap.value()&&(l.wordWrapWidth=r.wordWrapWidth.value()),l.bold=r.bold&&r.bold.value(),l.italic=r.italic&&r.italic.value(),l.highlightBorder=o.selection().isSelected(t),!t.isFixed()&&r.fixedSize&&!r.fixedSize.value()){l.scaleX=o.timeScale().barSpacing()/t.barSpacing();var u=Object(n.ensureNotNull)(i.priceRange()),f=i.height()/u.length();t.isPriceDencityLog()&&!i.isLog()&&(f=i.height()/(Object(c.toLog)(u.maxValue())-Object(c.toLog)(u.minValue()))),!t.isPriceDencityLog()&&i.isLog()&&(f=i.height()/(Object(c.fromLog)(u.maxValue())-Object(c.fromLog)(u.minValue())));var v=t.priceDencity();void 0!==v&&(l.scaleY=f/v), +(void 0===v||void 0===l.scaleY||l.scaleY<=0)&&delete l.scaleY}if(this._textRenderer.setData(l),1===l.points.length&&!this._noSelection){var g=new h.CompositeRenderer;g.append(this._textRenderer);var y=l.points[0].clone(),w=this._textRenderer.measure(),x=w.width,m=w.height;if(l.wordWrapWidth){var b=new a.Point(y.x+x,y.y+m/2);b.data=0,g.append(this.createLineAnchor({points:[b],pointsCursorType:_}))}var R=new a.Point(y.x+x/2,y.y+m);return R.data=0,g.append(new d.SelectionRenderer({points:[R],bgColors:this._lineAnchorColors([R]),visible:this.areAnchorsVisible(),hittestResult:p.HitTestResult.MOVEPOINT,barSpacing:o.timeScale().barSpacing()})),void(this._renderer=g)}this._renderer=this._textRenderer}},t}(u.LineSourcePaneView)},"obU/":function(e,t,i){"use strict";var r=i("aO4+").Point,n=i("GEp6").distanceToLine,a=i("hfHJ"),s=a.rotationMatrix,o=a.scalingMatrix,l=a.translationMatrix,h=a.transformPoint,d=i("aB9a").LineSourcePaneView,c=i("VdBB").HitTestResult,p=i("Zy3/").CompositeRenderer,u=i("Tmoa"),_=i("aB9a").thirdPointCursorType,f=i("//lt").PaneCursorType,v=i("cPgM").ScaledPaneRenderer;function g(){v.call(this),this._data=null}function y(e,t){d.call(this,e,t),this._ellipseRenderer=new g,this._renderer=null}inherit(g,v),g.prototype.setData=function(e){this._data=e,this._data.angleFrom=0,this._data.angleTo=2*Math.PI,this._data.clockwise=!1},g.prototype._drawImpl=function(e){if(!(null===this._data||this._data.points.length<2)){var t=this._data.points[0],i=this._data.points[1];if(this._data.points.length<3)return e.strokeStyle=this._data.color,e.lineWidth=this._data.linewidth,e.beginPath(),e.moveTo(t.x,t.y),e.lineTo(i.x,i.y),void e.stroke();var a=this._data.points[2],d=n(t,i,a).distance;if(d<1)return e.strokeStyle=this._data.color,e.lineWidth=this._data.linewidth,e.beginPath(),e.moveTo(t.x,t.y),e.lineTo(i.x,i.y),void e.stroke();var c=i.subtract(t),p=t.add(i).scaled(.5),_=new r(-c.y,c.x);_=_.normalized(),a=p.add(_.scaled(d)),e.strokeStyle=this._data.color,e.lineWidth=this._data.linewidth;var f=c.length(),v=c.x/f,g=c.y/f,y=Math.acos(v);g<0&&(y=-y);var w=this._data.points[2],x=l(-p.x,-p.y);w=h(x,w),x=s(-y),w=h(x,w),x=o(1,f/(2*d)),(w=h(x,w)).y<0?this._data.clockwise=!0:this._data.clockwise=!1,e.save(),e.beginPath(),e.translate(p.x,p.y),e.rotate(y),e.scale(1,2*d/f),e.arc(0,0,.5*f,this._data.angleFrom,this._data.angleTo,this._data.clockwise),e.restore(),e.stroke(),this._data.fillBackground&&(e.fillStyle=u.generateColor(this._data.backcolor,this._data.transparency),e.fill())}},g.prototype._additionalPointTest=function(e,t){return!0},g.prototype.hitTest=function(e){if(null===this._data||this._data.points.length<3)return null;var t=this._data.points[0],i=this._data.points[1],a=this._data.points[2],d=n(t,i,a).distance,p=i.subtract(t),u=t.add(i).scaled(.5),_=new r(-p.y,p.x);_=_.normalized(),a=u.add(_.scaled(d));var f=p.length(),v=p.x/f,g=p.y/f,y=Math.acos(v);g<0&&(y=-y);var w=l(-u.x,-u.y);e=h(w,e);var x=h(w,this._data.points[2]);w=s(-y),e=h(w,e),x=h(w,x),w=o(1,f/(2*d)),e=h(w,e),x=h(w,x);var m=e.length() +;return this._additionalPointTest(e,x)?Math.abs(m-.5*f)<=3?new c(c.MOVEPOINT):this._data.fillBackground&&!this._data.noHitTestOnBackground&&m<=.5*f?new c(c.MOVEPOINT_BACKGROUND):null:null},inherit(y,d),y.prototype.renderer=function(e,t){return this._invalidated&&this._updateImpl(),this._renderer},y.prototype._updateImpl=function(){if(d.prototype._updateImpl.call(this),this._renderer=null,!(this._points.length<2)){var e={};e.points=this._points,e.color=this._source.properties().color.value(),e.linewidth=this._source.properties().linewidth.value(),e.backcolor=this._source.properties().backgroundColor.value(),e.fillBackground=this._source.properties().fillBackground.value(),e.transparency=this._source.properties().transparency.value(),this._ellipseRenderer.setData(e);var t=new p;t.append(this._ellipseRenderer);var i=e.points[0],a=e.points[1];if(2===this._points.length)return this.addAnchors(t),void(this._renderer=t);var s=e.points[2],o=n(i,a,s).distance,l=a.subtract(i),h=i.add(a).scaled(.5),c=new r(-l.y,l.x);c=c.normalized(),s=h.add(c.scaled(o));var u=h.add(c.scaled(-o)),v=new r(i.x,i.y);v.data=0;var g=new r(a.x,a.y);g.data=1;var y=new r(s.x,s.y);y.data=2;var w=new r(u.x,u.y);w.data=3;var x=_(v,g),m=[f.Default,f.Default,x,x];t.append(this.createLineAnchor({points:[v,g,y,w],pointsCursorType:m})),this._renderer=t}},t.EllipsePaneView=y},ocVb:function(e,t,i){"use strict";var r=i("Eyy1").ensureNotNull,n=i("aO4+").Point,a=i("aB9a").LineSourcePaneView,s=i("cjIn").PaneRendererCachedImage,o=i("Zy3/").CompositeRenderer,l=i("GH0z").PercentageFormatter,h=i("zXvd").NumericFormatter,d=i("nda6").TimeSpanFormatter,c=i("5C6T").PipFormatter,p=i("vq8G").SelectionRenderer,u=i("pJOz").TrendLineRenderer,_=i("qgcf").TextRenderer,f=i("8xAY").LabelSettings,v=i("zDbI").CHART_FONT_FAMILY,g=i("VdBB").HitTestResult,y=i("FVHe").TrendLineStatsCache,w=i("c44N").areEqualPaneRenderParams,x=i("5/lF").iconsContainer,m=i("Ialn"),b=m.forceLTRStr,R=m.startWithLTR;function T(e,t){a.call(this,e,t),this._label=null,this._rendererCache={},this._cacheInvalidated=!0,this._percentageFormatter=new l,this._numericFormatter=new h,this._pipFormatter=null,this._lastSymbolInfo=null,this._trendRenderer=new u,this._labelRenderer=new _,this._renderer=null,this._cache=null,this._cacheDrawParams=null,x.onAllIconsReady().subscribe(this,(function(){this._cache&&(this._cache.destroy(),this._cache=null),t.lightUpdate()}))}inherit(T,a),T.prototype.update=function(){a.prototype.update.call(this),this._cacheInvalidated=!0},T.prototype.getCacheCanvas=function(e){return this._createCacheIfRequired(e),r(this._cache).canvas()},T.prototype.getCacheRects=function(e,t){this._createCacheIfRequired(e);var i=this._source.properties().statsPosition.value(),r=this._source.getPointByPosition(i,this._points[0],this._middlePoint,this._points[1]),n={left:0,top:this._cache.topByRow(this._statCache.rowIndex),width:this._cache.rowWidth(this._statCache.rowIndex),height:this._cache.rowHeight(this._statCache.rowIndex)},a={left:Math.floor(r.x),top:Math.floor(r.y),width:n.width,height:n.height} +;return a.left+=f.paddingLeftRight,this._points[1].ythis._points[0].y&&this._points[1].x>this._points[0].x?a.top-=f.paddingLeftRight+a.height:a.top+=f.paddingLeftRight,{cacheRect:n,targetRect:a}},T.prototype._createCacheIfRequired=function(e){null!=this._cache&&null!=this._cacheDrawParams&&w(e,this._cacheDrawParams)||(this._cache&&this._cache.destroy(),this._cache=new y(e),this._statCache=this._cache.updateSource(this._source,function(){return this._statLabelData()}.bind(this)),this._cacheDrawParams=e,this._cacheInvalidated=!1),this._cacheInvalidated&&(this._cacheState=this._cache.updateSource(this._source,function(){return this._statLabelData()}.bind(this)),this._cacheInvalidated=!1)},T.prototype.destroy=function(){this._cache&&(this._cache.destroy(),this._cache=null),x.onAllIconsReady().unsubscribeAll(this)},T.prototype._updateImpl=function(){this._renderer=null,this._invalidated=!1;var e=this._source.priceScale(),t=this._model.timeScale();if(e&&!e.isEmpty()&&!t.isEmpty()){var i=this._model.timeScale().visibleBarsStrictRange();if(null!==i){var r=this._source.points();if(!(r.length<2)){var l=r[0],h=r[1],d=this._source.properties();if((!(l.index0&&(I=I.normalized(),L=Math.acos(I.x),I.y>0&&(L=-L))}"number"!=typeof L||TradingView.isNaN(L)||(i=Math.round(180*L/Math.PI)+"º",p.push("angle"))}this._label=[b(e),t,i].filter((function(e){return e})).join("\n")||null,this._icons=p;var O=this._model.isDark(),D=O?f.bgColorDark:f.bgColorLight,k=O?f.textColorDark:f.textColorLight,B={points:[this._points[1]],text:this._label,color:k,isDark:O,font:v,fontSize:f.fontSize,lineSpacing:f.lineSpacing,backgroundColor:D,backgroundRoundRect:f.rectRadius,paddingLeft:f.paddingLeftRight,paddingRight:f.paddingLeftRight,paddingTop:f.paddingTopBottom,paddingBottom:f.paddingTopBottom,textPadding:f.textPadding,doNotAlignText:!0,icons:this._icons};return this._points[1].y=3){(n=this._points[2]).x=t.x,n.square=!0;var u=t.y-e.y;if((s=e.clone()).y=n.y+u,s.data=3,d.fillBackground.value()){var _=c.timeScale().width(),f=p.priceScale().height(),v=d.extendLeft.value(),g=d.extendRight.value();this._disjointChannelRenderer.setData({width:_,height:f,extendleft:v,extendright:g,points:[e,t,n,s],backcolor:d.backgroundColor.value(),transparency:d.transparency.value(),hittestOnBackground:TradingView.isMobile.any()}),l.append(this._disjointChannelRenderer)}}var y=function(e,t){return{points:[e,t],width:c.timeScale().width(),height:p.priceScale().height(),color:d.linecolor.value(),linewidth:d.linewidth.value(),linestyle:d.linestyle.value(),extendleft:d.extendLeft.value(),extendright:d.extendRight.value(),leftend:d.leftEnd.value(),rightend:d.rightEnd.value()}},w=this,x=function(e,t,i,r,n,a){if(w._source.properties().showPrices.value()){var s={points:[i],text:n,color:w._source.properties().textcolor.value(),horzAlign:i.x>r.x?"left":"right",vertAlign:"middle",font:w._source.properties().font.value(),offsetX:6,offsetY:0,boxPadding:0,bold:w._source.properties().bold.value(),italic:w._source.properties().italic.value(),fontsize:w._source.properties().fontsize.value(),forceTextAlign:!0};e.setData(s),l.append(e);s={points:[r],text:a,color:w._source.properties().textcolor.value(),horzAlign:i.xthis._data.point.x+2*this._data.width)return null;var t=(e.x-this._data.point.x)*Math.PI/this._data.width,i=Math.sin(t-Math.PI/2)*this._data.height/2;i=this._data.point.y+i+this._data.height/2;return Math.abs(i-e.y)<=3?new a(a.MOVEPOINT):null},inherit(h,n),h.prototype.renderer=function(e,t){return this._invalidated&&this._updateImpl(),this._renderer},h.prototype._updateImpl=function(){if(n.prototype._updateImpl.call(this),this._renderer=null,!(this._points.length<2)){var e=this._source.points(),t=e[0],i=e[1],a=Math.min(t.index,i.index),o=2*(Math.max(t.index,i.index)-a),h=this._points[0],d=this._points[1],c=Math.abs(h.x-d.x),p=d.y-h.y,u=new s,_=this._source.properties(),f=this._model.timeScale();if(0!==o){for(var v=f.indexToCoordinate(a),g=[],y=a;v>-c;y-=o)v=f.indexToCoordinate(y),g.push(v);v=v=f.indexToCoordinate(a+o);for(y=a+o;v=r-2&&e.x<=r+2&&e.y>=t&&e.y<=i){var o=this._adapter.getTooltip();const e=()=>{TradingView.TradingWidget&&TradingView.TradingWidget.journalDialog()};return new s(s.CUSTOM,{clickHandler:e,tapHandler:e,tooltip:""!==o?{text:o,rect:{x:r,y:t,w:2,h:i-t}}:null})}return null},inherit(h,n),h.prototype._renderer=null,h.prototype._rendererCached=!1,h.prototype._updateImpl=function(){n.prototype._updateImpl.call(this),this._renderer=null,this._rendererCached=!1},h.prototype.renderer=function(e,t){if(this._invalidated&&this._updateImpl(),this._rendererCached)return this._renderer;this._rendererCached=!0;var i=this._source,n=i.points();if(0===n.length)return null;var a=i._adapter,s=i._model.timeScale(),o=this._source._model.paneForSource(this._source).executionsPositionController().getXYCoordinate(a,s,n[0].index);if(!isFinite(o.y)||o.y<0||o.y>e||o.x<0)return this._renderer=null,null;var h={points:[new r(o.x,o.y)]};return this._renderer=new l(h,a),this._renderer},t.ExecutionPaneView=h},"u+oH":function(e,t,i){"use strict";var r=i("aO4+").Point,n=i("aB9a").LineSourcePaneView,a=i("pJOz").TrendLineRenderer,s=i("qgcf").TextRenderer,o=i("IjC5").RectangleRenderer,l=i("VdBB").HitTestResult,h=i("Zy3/").CompositeRenderer,d=i("GH0z").PercentageFormatter,c=i("zXvd").NumericFormatter,p=i("5C6T").PipFormatter,u=i("Tmoa"),_=i("a7Ha").LineEnd,f=i("wGNx").RiskRewardPointIndex,v=i("Ialn").forceLTRStr,g=i("//lt").PaneCursorType,y=[g.Default,g.HorizontalResize,g.VerticalResize,g.VerticalResize];function w(e,t){n.call(this,e,t),this._percentageFormatter=new d,this._numericFormatter=new c,this._pipFormatter=null,this._lastSymbolInfo=null,this._entryLineRenderer=new a,this._stopLineRenderer=new a,this._targetLineRenderer=new a,this._positionLineRenderer=new a,this._fullStopBgRenderer=new o(new l(l.MOVEPOINT),new l(l.MOVEPOINT)),this._stopBgRenderer=new o(new l(l.MOVEPOINT),new l(l.MOVEPOINT)),this._fullTargetBgRenderer=new o(new l(l.MOVEPOINT),new l(l.MOVEPOINT)),this._targetBgRenderer=new o(new l(l.MOVEPOINT),new l(l.MOVEPOINT)),this._stopLabelRenderer=new s,this._middleLabelRenderer=new s,this._profitLabelRenderer=new s,this._renderer=null}inherit(w,n),w.prototype.i18nCache={pnl:$.t("{0} P&L: {1}"),open:$.t("Open",{context:"line_tool_position"}),closed:$.t("Closed",{context:"line_tool_position"}),ratio:$.t("Risk/Reward Ratio: {0}"),stop:$.t("Stop: {0} ({1}) {2}, Amount: {3}"),target:$.t("Target: {0} ({1}) {2}, Amount: {3}"),qty:$.t("Qty: {0}")},w.prototype._formatInTicks=function(e){ +var t=this._model.mainSeries().base();return Math.round(e*t)},w.prototype.isLabelVisible=function(){return this.isHoveredSource()||this.isSelectedSource()||this._source.properties().alwaysShowStats.value()},w.prototype._updateImpl=function(){n.prototype._updateImpl.call(this),this._renderer=null,this._stopLevel=null,this._profitLevel=null;var e=this._model.timeScale(),t=this._source.priceScale();if(t&&!t.isEmpty()&&!e.isEmpty()&&0!==this._source.points().length&&0!==this._points.length&&null!==this._model.mainSeries().bars().last()&&!(this._source.points().length<2)&&0!==this._model.mainSeries().bars().length){this._isClosed=4===this._source.points().length;var i=this._source.lastBarData();if(i){var a=this._source.stopPrice(),s=this._source.profitPrice();this._pl=this._source.points().length>1?this._source.calculatePL(i.closePrice):0;var o=this._source.ownerSource().firstValue();if(this._entryLevel=this._points[f.Entry].y,this._stopLevel=t.priceToCoordinate(a,o),this._profitLevel=t.priceToCoordinate(s,o),this._closeLevel=t.priceToCoordinate(i.closePrice,o),this._closeBar=this._source._model.timeScale().indexToCoordinate(i.index),!(this._points.length<2||this._source.points().length<2)){var l=new h,d=this,c=this._source.properties(),g=this._points[f.Entry].x,w=this._points[f.ActualEntry]?this._points[f.ActualEntry].x:this._points[f.Close].x,x=this._points[f.ActualClose]?this._points[f.ActualClose].x:this._points[f.Close].x,m=this._points[f.Close].x,b=new r(g,this._entryLevel),R=new r(m,this._stopLevel);if((C={}).points=[b,R],C.color="white",C.linewidth=0,C.backcolor=c.stopBackground.value(),C.fillBackground=!0,C.transparency=c.stopBackgroundTransparency.value(),C.extendLeft=!1,C.extendRight=!1,this._fullStopBgRenderer.setData(C),l.append(this._fullStopBgRenderer),this._pl<0){b=new r(w,this._entryLevel),R=new r(x,this._closeLevel);(C={}).points=[b,R],C.color="white",C.linewidth=0,C.backcolor=c.stopBackground.value(),C.fillBackground=!0;var T=100-100*(1-(S=.01*c.stopBackgroundTransparency.value())*S*S);C.transparency=T,C.extendLeft=!1,C.extendRight=!1,this._stopBgRenderer.setData(C),l.append(this._stopBgRenderer)}b=new r(g,this._entryLevel),R=new r(m,this._profitLevel);if((C={}).points=[b,R],C.color="white",C.linewidth=0,C.backcolor=c.profitBackground.value(),C.fillBackground=!0,C.transparency=c.profitBackgroundTransparency.value(),C.extendLeft=!1,C.extendRight=!1,this._fullTargetBgRenderer.setData(C),l.append(this._fullTargetBgRenderer),this._pl>0){b=new r(w,this._entryLevel),R=new r(x,this._closeLevel);(C={}).points=[b,R],C.color="white",C.linewidth=0,C.backcolor=c.profitBackground.value(),C.fillBackground=!0;var S,P=100-100*(1-(S=.01*c.profitBackgroundTransparency.value())*S*S);C.transparency=P,C.extendLeft=!1,C.extendRight=!1,this._targetBgRenderer.setData(C),l.append(this._targetBgRenderer)}var L=function(e,t,i,r){var n={};n.points=[t,i],n.width=d._model.timeScale().width(),n.height=d._source.priceScale().height(),n.color=r||d._source.properties().linecolor.value(), +n.linewidth=d._source.properties().linewidth.value(),n.linestyle=CanvasEx.LINESTYLE_SOLID,n.extendleft=!1,n.extendright=!1,n.leftend=_.Normal,n.rightend=_.Normal,e.setData(n),l.append(e)};if(this._points[f.ActualEntry]){var C;b=this._points[f.ActualEntry],R=this._isClosed?this._points[f.ActualClose]:new r(this._closeBar,this._closeLevel);(C={}).points=[b,R],C.width=d._model.timeScale().width(),C.height=d._source.priceScale().height(),C.color=d._source.properties().linecolor.value(),C.linewidth=1,C.linestyle=CanvasEx.LINESTYLE_DASHED,C.extendleft=!1,C.extendright=!1,C.leftend=_.Normal,C.rightend=_.Arrow,this._positionLineRenderer.setData(C),l.append(this._positionLineRenderer)}d=this;var M=function(e,t,i,r,n,a,s){if(d.isLabelVisible()){var o={};o.points=[t],o.text=i,o.color=c.textcolor.value(),o.font=c.font.value(),o.offsetX=3,o.offsetY=a,o.vertAlign=n,o.horzAlign="center",o.backgroundRoundRect=4,o.backgroundColor=u.resetTransparency(r),o.fontsize=c.fontsize.value(),o.backgroundHorzInflate=4,s&&(o.borderColor=s),e.setData(o),l.append(e)}},I=this._source.entryPrice(),O=this._source.stopPrice(),D=this._source.profitPrice(),k=Math.abs(O-I),B=Math.round(1e4*k/I)/100,N=Math.abs(D-I),A=Math.round(1e4*N/I)/100,z=Math.abs(I-D)/Math.abs(I-O);b=new r(g,this._points[f.Entry].y),R=new r(m,this._points[f.Entry].y);L(this._entryLineRenderer,b,R);var E=new r((g+m)/2,Math.round(this._points[0].y)+.5),V="",j="",H=this._numericFormatter.format(Math.round(100*z)/100);if(this._points[1]&&void 0!==this._pl&&(j=this._source.ownerSource().formatter().format(this._pl)),c.compact.value())V+=j?j+" ~ ":"",V+=c.qty.value()+"\n",V+=H;else{var W=this._isClosed?this.i18nCache.closed:this.i18nCache.open;V+=j?this.i18nCache.pnl.format(W,j)+", ":"",V+=this.i18nCache.qty.format(c.qty.value())+"\n",V+=this.i18nCache.ratio.format(H)+" "}var F=c.linecolor.value();this._pl<0?F=c.stopBackground.value():this._pl>0&&(F=c.profitBackground.value()),M(this._middleLabelRenderer,E,V,F,"middle",0,"white");b=new r(g,this._stopLevel),R=new r(m,this._stopLevel);L(this._stopLineRenderer,b,R,c.stopBackground.value());var Y=this._model.mainSeries().symbolInfo();Y&&Y!==this._lastSymbolInfo&&(this._pipFormatter=new p(Y.pricescale,Y.minmov,Y.type,Y.minmove2),this._lastSymbolInfo=Y);E=new r((g+m)/2,this._stopLevel),V="";var U=this._source.ownerSource().formatter().format(k),Z=this._percentageFormatter.format(B);V=c.compact.value()?U+" ("+Z+") "+c.amountStop.value():this.i18nCache.stop.format(v(this._source.ownerSource().formatter().format(k)),v(this._percentageFormatter.format(B)),this._pipFormatter?v(this._pipFormatter.format(k)):"",v(c.amountStop.value())),M(this._stopLabelRenderer,E,V,c.stopBackground.value(),I_){f=a.x;var g=_/u;v=r.y+g*o}else{v=a.y;g=u/_;f=r.x+g*s}var y={points:[i,new n.Point(f,v)],color:p.color,linewidth:p.width,linestyle:h.LINESTYLE_SOLID,extendleft:!1,extendright:!1,leftend:l.LineEnd.Normal,rightend:l.LineEnd.Normal},w=this._fanRenderers[p.index];w.setData(y),e.append(w)}}},t.prototype._prepareArcs=function(e,t){for(var i=t.p1,r=t.startPoint,a=t.endPoint,s=t.barsCoordsRange,o=t.priceCoordsRange,l=i,h=this._getSource(),d=h.isArcsBackgroundFilled(),c=h.arcsBackgroundTransparency(),p=0,u=h.arcs();p0&&y.append(this.createLineAnchor({points:[new r(this._points[0].x,this._source.priceScale().height()/2)],hittestResult:h.MOVEPOINT})),this._renderer=y}}},p.prototype.renderer=function(e,t){return this._invalidated&&this._updateImpl(),this._renderer},t.FibTimeZonePaneView=p},xp9B:function(e,t,i){"use strict";var r=i("aO4+").Point,n=i("aB9a").LineSourcePaneView,a=i("2trc").ChannelRenderer,s=i("qgcf").TextRenderer,o=i("pJOz").TrendLineRenderer,l=i("VdBB").HitTestResult,h=i("Zy3/").CompositeRenderer,d=i("zXvd").NumericFormatter,c=i("a7Ha").LineEnd;function p(e,t){n.call(this,e,t),this._numericFormatter=new d,this._renderer=null}inherit(p,n),p.prototype._updateImpl=function(){if(n.prototype._updateImpl.call(this),this._renderer=null,!(this._source.points().length<2)&&this._source.priceScale()&&!this._source.priceScale().isEmpty()&&!this._model.timeScale().isEmpty()){var e=this._source.points()[0],t=this._source.points()[1],i=this._source.properties(),d=i.reverse.value();this._hlevels=[];for(var p=d?t.price-e.price:e.price-t.price,u=d?e.price:t.price,_=this._source.ownerSource().firstValue(),f=1;f<=7;f++){if((b=i["hlevel"+f]).visible.value()){var v=b.coeff.value(),g=b.color.value(),y=u+v*p,w=this._source.priceScale().priceToCoordinate(y,_);this._hlevels.push({coeff:v,color:g,y:w,index:f})}}this._vlevels=[];var x=d?t.index-e.index:e.index-t.index,m=d?e.index:t.index;for(f=1;f<=7;f++){var b;if((b=i["vlevel"+f]).visible.value()){v=b.coeff.value(),g=b.color.value() +;var R=Math.round(m+v*x),T=this._model.timeScale().indexToCoordinate(R,!0);this._vlevels.push({coeff:v,color:g,x:T,index:f})}}if(!(this._floatPoints.length<2)){var S=new h,P=(e=this._floatPoints[0],t=this._floatPoints[1],Math.min(e.x,t.x)),L=Math.min(e.y,t.y),C=Math.max(e.x,t.x),M=Math.max(e.y,t.y),I=i.grid.color.value(),O=i.grid.linewidth.value(),D=i.grid.linestyle.value();for(f=0;f0&&E){var H=new r(t.x,this._hlevels[f-1].y);(F={}).width=this._model.timeScale().width(),F.height=this._source.priceScale().height(),F.p1=e,F.p2=j,F.p3=e,F.p4=H,F.color=this._hlevels[f].color,F.transparency=V,F.hittestOnBackground=!0,(Y=new a).setData(F),S.append(Y)}k={points:[e,j],width:this._model.timeScale().width(),height:this._source.priceScale().height(),color:this._hlevels[f].color,linewidth:i.linewidth.value(),linestyle:i.linestyle.value(),extendleft:!1,extendright:!0,leftend:c.Normal,rightend:c.Normal};(Y=new o).setData(k),Y.setHitTest(new l(l.MOVEPOINT,null,{type:"h",index:this._hlevels[f].index})),S.append(Y)}for(f=0;f0&&E){var F;H=new r(this._vlevels[f-1].x,t.y);(F={}).width=this._model.timeScale().width(), +F.height=this._source.priceScale().height(),F.p1=e,F.p2=W,F.p3=e,F.p4=H,F.color=this._vlevels[f].color,F.transparency=V,F.hittestOnBackground=!0,(Y=new a).setData(F),S.append(Y)}var Y;k={points:[e,W],width:this._model.timeScale().width(),height:this._source.priceScale().height(),color:this._vlevels[f].color,linewidth:i.linewidth.value(),linestyle:i.linestyle.value(),extendleft:!1,extendright:!0,leftend:c.Normal,rightend:c.Normal};(Y=new o).setData(k),Y.setHitTest(new l(l.MOVEPOINT,null,{type:"v",index:this._vlevels[f].index})),S.append(Y)}this.addAnchors(S),this._renderer=S}}},p.prototype.renderer=function(e,t){return this._invalidated&&this._updateImpl(),this._renderer},t.FibSpeedResistanceFanPaneView=p},"y/56":function(e,t,i){"use strict";i.r(t);var r=i("mrSG"),n=i("aB9a"),a=i("Zy3/"),s=i("vq8G"),o=i("VdBB"),l=i("f6yo"),h=i("jFln"),d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._data=null,t}return Object(r.__extends)(t,e),t.prototype.setData=function(e){this._data=e},t.prototype.hitTest=function(e){if(null===this._data)return null;var t=this._data.point,i=t.x,r=t.y;return e.xi+20||e.yr?null:new o.HitTestResult(o.HitTestResult.MOVEPOINT)},t.prototype.doesIntersectWithBox=function(e){return null!==this._data&&Object(l.pointInBox)(this._data.point,e)},t.prototype._drawImpl=function(e){null!==this._data&&(e.save(),e.translate(Math.round(this._data.point.x)-.5,Math.round(this._data.point.y-22)-.5),e.fillStyle="#434651",Object(h.drawRoundRect)(e,0,0,2,22,1),e.fill(),e.fillStyle=this._data.color,e.beginPath(),e.moveTo(6.87,0),e.bezierCurveTo(5.62,0,4.46,.23,3.32,.69),e.bezierCurveTo(3.26,.71,3.2,.75,3.15,.8),e.bezierCurveTo(3.06,.89,3,1.02,3,1.16),e.lineTo(3,1.19),e.lineTo(3,12.5),e.bezierCurveTo(3,12.8,3.3,13.02,3.59,12.93),e.bezierCurveTo(4.61,12.64,5.94,12.44,6.87,12.44),e.bezierCurveTo(8.5,12.44,10.09,12.83,11.63,13.21),e.bezierCurveTo(13.19,13.6,14.79,14,16.45,14),e.bezierCurveTo(17.59,14,18.65,13.81,19.69,13.43),e.bezierCurveTo(19.88,13.36,20,13.18,20,12.98),e.lineTo(20,1.19),e.bezierCurveTo(20,1.06,19.83,.93,19.66,.99),e.bezierCurveTo(18.63,1.38,17.58,1.56,16.45,1.56),e.bezierCurveTo(14.82,1.56,13.23,1.17,11.69,.79),e.bezierCurveTo(10.14,.4,8.53,0,6.87,0),e.closePath(),e.fill(),e.restore())},t}(i("cPgM").ScaledPaneRenderer);i.d(t,"FlagMarkPaneView",(function(){return c}));var c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._flagMarkRenderer=new d,t._renderer=null,t._anchorsOffset=null,t}return Object(r.__extends)(t,e),t.prototype.setAnchors=function(e){this._anchorsOffset=e},t.prototype.renderer=function(e,t){return this._invalidated&&this._updateImpl(),this._renderer},t.prototype._updateImpl=function(){if(e.prototype._updateImpl.call(this),this._renderer=null,1===this._points.length){this._flagMarkRenderer.setData({point:this._points[0],color:this._getSource().properties().childs().flagColor.value()});var t=this._getModel();this._renderer=new a.CompositeRenderer,this._renderer.append(this._flagMarkRenderer) +;var i=[this._anchorsOffset?this._points[0].add(this._anchorsOffset):this._points[0].clone()];this._renderer.append(new s.SelectionRenderer({points:i,bgColors:this._lineAnchorColors(i),visible:this.areAnchorsVisible(),barSpacing:t.timeScale().barSpacing(),hittestResult:o.HitTestResult.MOVEPOINT}))}},t}(n.LineSourcePaneView)}}]); \ No newline at end of file diff --git a/public/charting_library/bundles/lt-property-pages-with-definitions.4cb1aaea174e8dca633f.js b/public/charting_library/bundles/lt-property-pages-with-definitions.4cb1aaea174e8dca633f.js new file mode 100644 index 00000000..db44c154 --- /dev/null +++ b/public/charting_library/bundles/lt-property-pages-with-definitions.4cb1aaea174e8dca633f.js @@ -0,0 +1,26 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([["lt-property-pages-with-definitions"],{"17v9":function(e,t,i){"use strict";i.r(t),i.d(t,"FibDrawingsWith24LevelsDefinitionsViewModel",(function(){return k}));var n=i("mrSG"),o=i("wm7x"),r=i("HSjo"),l=i("Cn8r"),s=i("SMr9"),c=i("hY0g"),d=i.n(c),u=i("25b6"),a=window.t("Trend Line"),h=window.t("Levels Line"),b=window.t("Extend Right"),p=window.t("Extend Left"),w=window.t("Extend Lines Right"),f=window.t("Extend Lines Left"),g=window.t("Reverse"),_=window.t("Prices"),j=window.t("Levels"),O=window.t("Labels"),C=window.t("Use one color"),v=window.t("Background"),y=window.t("Fib levels based on log scale"),L=[{value:!1,title:window.t("Values")},{value:!0,title:window.t("Percents")}],M=[{value:"bottom",title:window.t("Top")},{value:"middle",title:window.t("Middle")},{value:"top",title:window.t("Bottom")}],k=function(e){function t(t,i){var n=e.call(this,t,i)||this;if(n._disabledBasedOnLog=null,"fibLevelsBasedOnLogScale"in n._source.properties().childs()){var o=n._source.priceScale();null!==o&&(n._disabledBasedOnLog=new d.a(Boolean(!o.mode().log)),n._createPropertyRages(),o.modeChanged().subscribe(n,(function(e,t){null!==n._disabledBasedOnLog&&n._disabledBasedOnLog.setValue(Boolean(!t.log))})))}return n}return Object(n.__extends)(t,e),t.prototype.destroy=function(){e.prototype.destroy.call(this);var t=this._source.priceScale();null!==t&&t.modeChanged().unsubscribeAll(this)},t.prototype._stylePropertyDefinitions=function(){var e=[],t=this._source.properties(),i=t.childs(),n=this._source.name(),l=Object(u.c)(n);if("trendline"in i){var c=i.trendline.childs(),k=Object(o.a)(this._undoModel,{showLine:c.visible,lineColor:c.color,lineStyle:c.linestyle,lineWidth:c.linewidth},n,"TrendLine",{line:a});e.push(k)}var x=i.levelsStyle.childs(),m={lineStyle:x.linestyle,lineWidth:x.linewidth},S={line:h};"extendLines"in i&&(m.extendRight=i.extendLines,S.extendRightTitle=w),"extendLinesLeft"in i&&(m.extendLeft=i.extendLinesLeft,S.extendLeftTitle=f),"extendRight"in i&&(m.extendRight=i.extendRight,S.extendRightTitle=b),"extendLeft"in i&&(m.extendLeft=i.extendLeft,S.extendLeftTitle=p);var P=Object(o.a)(this._undoModel,m,n,"LevelsStyleLine",S);e.push(P);for(var T=[],V=this._source.levelsCount(),B=1;B<=V;B++){var D=i["level"+B].childs(),A=Object(r.g)({checked:Object(r.b)(this._undoModel,D.visible,"Change "+n+" Level "+B+" Line Visibility"),color:Object(r.u)(this._undoModel,D.color,null,"Change "+n+" Level "+B+" Line Color"),level:Object(r.b)(this._undoModel,D.coeff,"Change "+n+" Level "+B+" Coeff")},{id:l+"LineLevel"+B});T.push(A)}var R=Object(r.l)(T,l+"LeveledLinesGroup");e.push(Object(r.k)([R],l+"Group"));var W=Object(r.e)({color:Object(r.u)(this._undoModel,t.collectibleColors,null,"Change "+n+" All Lines Color")},{id:l+"AllLineColor",title:C});e.push(W);var G=Object(r.q)({checked:Object(r.b)(this._undoModel,i.fillBackground,"Change "+n+" Background Visibility"),transparency:Object(r.b)(this._undoModel,i.transparency,"Change "+n+" Background Transparency")},{id:l+"Background",title:v});e.push(G) +;var E=i;if("reverse"in E){var H=Object(r.c)({checked:Object(r.b)(this._undoModel,E.reverse,"Change "+n+" Reverse")},{id:l+"Reverse",title:g});e.push(H)}var F=Object(r.c)({checked:Object(r.b)(this._undoModel,i.showPrices,"Change "+n+" Prices Visibility")},{id:l+"Prices",title:_});e.push(F);var z=Object(r.j)({checked:Object(r.b)(this._undoModel,i.showCoeffs,"Change "+n+" Style"),option:Object(r.b)(this._undoModel,i.coeffsAsPercents,"Change "+n+" Style")},{id:n+"PitchStyle",title:j,options:new d.a(L)});e.push(z);var I=Object(r.s)({option1:Object(r.b)(this._undoModel,i.horzLabelsAlign,"Change "+n+" Labels Alignment"),option2:Object(r.b)(this._undoModel,i.vertLabelsAlign,"Change "+n+" Labels Alignment")},{id:l+"Alignment",title:O,optionsItems1:new d.a(s.availableAlignmentHorizontalItems),optionsItems2:new d.a(M)});if(e.push(I),"fibLevelsBasedOnLogScale"in i&&null!==this._disabledBasedOnLog){var U=Object(r.c)({disabled:Object(r.a)(this._undoModel,this._disabledBasedOnLog,"Change "+n+" Fib levels based on log scale disabled"),checked:Object(r.b)(this._undoModel,i.fibLevelsBasedOnLogScale,"Change "+n+" Fib levels based on log scale")},{id:l+"BasedOnLog",title:y});e.push(U)}return e},t}(l.a)},"1yQO":function(e,t,i){"use strict";i.d(t,"a",(function(){return r}));var n=i("hY0g"),o=i.n(n);function r(e,t,i,n){void 0===n&&(n=null);var r={id:t,title:i,definitions:new o.a(e)};return null!==n&&(r.icon=n),r}},"25b6":function(e,t,i){"use strict";i.d(t,"b",(function(){return r})),i.d(t,"c",(function(){return l})),i.d(t,"a",(function(){return s}));var n=/[<"'&>]/g,o=function(e){return"&#"+e.charCodeAt(0)+";"};function r(e){return e.replace(n,o)}function l(e){return void 0===e&&(e=""),e.replace(/\s+/g,"")}function s(e){return void 0===e&&(e=""),e.replace(/\b\w/g,(function(e){return e.toUpperCase()}))}},"2PB4":function(e,t,i){"use strict";i.r(t),i.d(t,"FibSpeedResistanceFanDefinitionsViewModel",(function(){return g}));var n=i("mrSG"),o=i("HSjo"),r=i("Cn8r"),l=i("25b6"),s=window.t("Use one color"),c=window.t("Background"),d=window.t("Price Levels"),u=window.t("Time Levels"),a=window.t("Left Labels"),h=window.t("Right Labels"),b=window.t("Top Labels"),p=window.t("Bottom Labels"),w=window.t("Grid"),f=window.t("Reverse"),g=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype._stylePropertyDefinitions=function(){for(var e=[],t=this._source.properties(),i=t.childs(),n=this._source.name(),r=Object(l.c)(n),g=[],_=this._source.hLevelsCount(),j=1;j<=_;j++){var O=i["hlevel"+j].childs(),C=Object(o.g)({checked:Object(o.b)(this._undoModel,O.visible,"Change "+n+" Level "+j+" Line Visibility"),color:Object(o.u)(this._undoModel,O.color,null,"Change "+n+" Level "+j+" Line Color"),level:Object(o.b)(this._undoModel,O.coeff,"Change "+n+" Level "+j+" Coeff")},{id:r+"HLineLevel"+j});g.push(C)}var v=Object(o.l)(g,r+"HLeveledLinesGroup"),y=Object(o.c)({checked:Object(o.b)(this._undoModel,i.showLeftLabels,"Change "+n+" Left Labels Visibility")},{id:r+"LeftLabels",title:a}),L=Object(o.c)({ +checked:Object(o.b)(this._undoModel,i.showRightLabels,"Change "+n+" Right Labels Visibility")},{id:r+"RightLabels",title:h}),M=Object(o.k)([v,y,L],r+"HLevelGroup",d);e.push(M);var k=[],x=this._source.vLevelsCount();for(j=1;j<=x;j++){O=i["vlevel"+j].childs(),C=Object(o.g)({checked:Object(o.b)(this._undoModel,O.visible,"Change "+n+" Level "+j+" Line Visibility"),color:Object(o.u)(this._undoModel,O.color,null,"Change "+n+" Level "+j+" Line Color"),level:Object(o.b)(this._undoModel,O.coeff,"Change "+n+" Level "+j+" Coeff")},{id:r+"VLineLevel"+j});k.push(C)}var m=Object(o.l)(k,r+"VLeveledLinesGroup"),S=Object(o.c)({checked:Object(o.b)(this._undoModel,i.showTopLabels,"Change "+n+" Top Labels Visibility")},{id:r+"TopLabels",title:b}),P=Object(o.c)({checked:Object(o.b)(this._undoModel,i.showBottomLabels,"Change "+n+" Bottom Labels Visibility")},{id:r+"BottomLabels",title:p}),T=Object(o.k)([m,S,P],r+"VLevelGroup",u);e.push(T);var V=Object(o.e)({color:Object(o.u)(this._undoModel,t.collectibleColors,null,"Change "+n+" All Lines Color")},{id:r+"AllLineColor",title:s});e.push(V);var B=Object(o.q)({checked:Object(o.b)(this._undoModel,i.fillBackground,"Change "+n+" Background Visibility"),transparency:Object(o.b)(this._undoModel,i.transparency,"Change "+n+" Background Transparency")},{id:r+"Background",title:c});e.push(B);var D=i.grid.childs(),A=Object(o.h)({checked:Object(o.b)(this._undoModel,D.visible,"Change "+n+" Grid Visibility"),color:Object(o.u)(this._undoModel,D.color,null,"Change "+n+" Grid Line Color"),width:Object(o.b)(this._undoModel,D.linewidth,"Change "+n+" Grid Line Width"),style:Object(o.b)(this._undoModel,D.linestyle,"Change "+n+" Grid Line Style")},{id:r+"GridLine",title:w});e.push(A);var R=Object(o.c)({checked:Object(o.b)(this._undoModel,i.reverse,"Change "+n+" Reverse Mode")},{id:r+"Reverse",title:f});return e.push(R),e},t}(r.a)},"2liL":function(e,t,i){"use strict";i.r(t),i.d(t,"GannSquareDefinitionsViewModel",(function(){return g}));var n=i("mrSG"),o=i("HSjo"),r=i("Cn8r"),l=i("25b6"),s=window.t("Use one color"),c=window.t("Background"),d=window.t("Price Levels"),u=window.t("Time Levels"),a=window.t("Left Labels"),h=window.t("Right Labels"),b=window.t("Top Labels"),p=window.t("Bottom Labels"),w=window.t("Angles"),f=window.t("Reverse"),g=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype._stylePropertyDefinitions=function(){for(var e=[],t=this._source.properties(),i=t.childs(),n=this._source.name(),r=Object(l.c)(n),g=[],_=this._source.hLevelsCount(),j=1;j<=_;j++){var O=i["hlevel"+j].childs(),C=Object(o.g)({checked:Object(o.b)(this._undoModel,O.visible,"Change "+n+" Level "+j+" Line Visibility"),color:Object(o.u)(this._undoModel,O.color,null,"Change "+n+" Level "+j+" Line Color"),level:Object(o.b)(this._undoModel,O.coeff,"Change "+n+" Level "+j+" Coeff")},{id:r+"HLineLevel"+j});g.push(C)}var v=Object(o.l)(g,r+"HLeveledLinesGroup"),y=Object(o.c)({checked:Object(o.b)(this._undoModel,i.showLeftLabels,"Change "+n+" Left Labels Visibility")},{ +id:r+"LeftLabels",title:a}),L=Object(o.c)({checked:Object(o.b)(this._undoModel,i.showRightLabels,"Change "+n+" Right Labels Visibility")},{id:r+"RightLabels",title:h}),M=Object(o.q)({checked:Object(o.b)(this._undoModel,i.fillHorzBackground,"Change "+n+" Background Visibility"),transparency:Object(o.b)(this._undoModel,i.horzTransparency,"Change "+n+" Background Transparency")},{id:r+"BackgroundH",title:c}),k=Object(o.k)([v,y,L,M],r+"HLevelGroup",d);e.push(k);var x=[],m=this._source.vLevelsCount();for(j=1;j<=m;j++){O=i["vlevel"+j].childs(),C=Object(o.g)({checked:Object(o.b)(this._undoModel,O.visible,"Change "+n+" Level "+j+" Line Visibility"),color:Object(o.u)(this._undoModel,O.color,null,"Change "+n+" Level "+j+" Line Color"),level:Object(o.b)(this._undoModel,O.coeff,"Change "+n+" Level "+j+" Coeff")},{id:r+"VLineLevel"+j});x.push(C)}var S=Object(o.l)(x,r+"VLeveledLinesGroup"),P=Object(o.c)({checked:Object(o.b)(this._undoModel,i.showTopLabels,"Change "+n+" Top Labels Visibility")},{id:r+"TopLabels",title:b}),T=Object(o.c)({checked:Object(o.b)(this._undoModel,i.showBottomLabels,"Change "+n+" Bottom Labels Visibility")},{id:r+"BottomLabels",title:p}),V=Object(o.q)({checked:Object(o.b)(this._undoModel,i.fillVertBackground,"Change "+n+" Background Visibility"),transparency:Object(o.b)(this._undoModel,i.vertTransparency,"Change "+n+" Background Transparency")},{id:r+"BackgroundV",title:c}),B=Object(o.k)([S,P,T,V],r+"VLevelGroup",u);e.push(B);var D=Object(o.e)({color:Object(o.u)(this._undoModel,t.collectibleColors,null,"Change "+n+" All Lines Color")},{id:r+"AllLineColor",title:s});e.push(D);var A=i.fans.childs(),R=Object(o.e)({checked:Object(o.b)(this._undoModel,A.visible,"Change "+n+" Fans Visibility"),color:Object(o.u)(this._undoModel,A.color,null,"Change "+n+" Fans Line Color")},{id:r+"FansLines",title:w});e.push(R);var W=Object(o.c)({checked:Object(o.b)(this._undoModel,i.reverse,"Change "+n+" Reverse")},{id:r+"Reverse",title:f});return e.push(W),e},t}(r.a)},"5sLb":function(e,t,i){"use strict";i.r(t),i.d(t,"ArrowMarkDefinitionsViewModel",(function(){return d}));var n=i("mrSG"),o=i("DSp8"),r=i("Cn8r"),l=i("HSjo"),s=window.t("Text"),c=window.t("Arrow"),d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype._textPropertyDefinitions=function(){var e=this._source.properties().childs();return[Object(o.a)(this._undoModel,{textColor:e.color,text:e.text},this._source.name(),{isEditable:!0,isMultiLine:!0,customTitles:{text:s}})]},t.prototype._stylePropertyDefinitions=function(){var e=this._source.properties().childs();return[Object(l.e)({color:Object(l.u)(this._undoModel,e.arrowColor,null,"Change Arrow Color")},{id:"ArrowColor",title:c})]},t}(r.a)},"6U6r":function(e,t,i){"use strict";i.r(t),i.d(t,"FibCirclesDefinitionsViewModel",(function(){return b}));var n=i("mrSG"),o=i("wm7x"),r=i("HSjo"),l=i("Cn8r"),s=i("25b6"),c=window.t("Trend Line"),d=window.t("Use one color"),u=window.t("Background"),a=window.t("Levels"),h=window.t("Coeffs As Percents"),b=function(e){ +function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype._stylePropertyDefinitions=function(){var e=[],t=this._source.properties(),i=t.childs(),n=this._source.name(),l=Object(s.c)(n),b=i.trendline.childs(),p=Object(o.a)(this._undoModel,{showLine:b.visible,lineColor:b.color,lineStyle:b.linestyle,lineWidth:b.linewidth},n,"TrendLine",{line:c});e.push(p);for(var w=this._source.levelsCount(),f=1;f<=w;f++){var g=i["level"+f].childs(),_=Object(r.g)({checked:Object(r.b)(this._undoModel,g.visible,"Change "+n+" Level "+f+" Line Visibility"),color:Object(r.u)(this._undoModel,g.color,null,"Change "+n+" Level "+f+" Line Color"),width:Object(r.b)(this._undoModel,g.linewidth,"Change "+n+" Level "+f+" Line Width"),level:Object(r.b)(this._undoModel,g.coeff,"Change "+n+" Level "+f+" Coeff")},{id:l+"LineLevel"+f});e.push(_)}var j=Object(r.e)({color:Object(r.u)(this._undoModel,t.collectibleColors,null,"Change "+n+" All Lines Color")},{id:l+"AllLineColor",title:d});e.push(j);var O=Object(r.q)({checked:Object(r.b)(this._undoModel,i.fillBackground,"Change "+n+" Background Visibility"),transparency:Object(r.b)(this._undoModel,i.transparency,"Change "+n+" Background Transparency")},{id:l+"Background",title:u});e.push(O);var C=Object(r.c)({checked:Object(r.b)(this._undoModel,i.showCoeffs,"Change "+n+" Levels Visibility")},{id:l+"Levels",title:a});e.push(C);var v=Object(r.c)({checked:Object(r.b)(this._undoModel,i.coeffsAsPercents,"Change "+n+" Coeffs As Percents Visibility")},{id:l+"Percentage",title:h});return e.push(v),e},t}(l.a)},"6mGk":function(e,t,i){"use strict";i.r(t),i.d(t,"FibWedgeDefinitionsViewModel",(function(){return h}));var n=i("mrSG"),o=i("wm7x"),r=i("HSjo"),l=i("Cn8r"),s=i("25b6"),c=window.t("Trend Line"),d=window.t("Use one color"),u=window.t("Background"),a=window.t("Levels"),h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype._stylePropertyDefinitions=function(){var e=[],t=this._source.properties(),i=t.childs(),n=this._source.name(),l=Object(s.c)(n),h=i.trendline.childs(),b=Object(o.a)(this._undoModel,{showLine:h.visible,lineColor:h.color,lineWidth:h.linewidth},n,"TrendLine",{line:c});e.push(b);for(var p=this._source.levelsCount(),w=1;w<=p;w++){var f=i["level"+w].childs(),g=Object(r.g)({checked:Object(r.b)(this._undoModel,f.visible,"Change "+n+" Level "+w+" Line Visibility"),color:Object(r.u)(this._undoModel,f.color,null,"Change "+n+" Level "+w+" Line Color"),width:Object(r.b)(this._undoModel,f.linewidth,"Change "+n+" Level "+w+" Line Width"),level:Object(r.b)(this._undoModel,f.coeff,"Change "+n+" Level "+w+" Coeff")},{id:l+"LineLevel"+w});e.push(g)}var _=Object(r.e)({color:Object(r.u)(this._undoModel,t.collectibleColors,null,"Change "+n+" All Lines Color")},{id:l+"AllLineColor",title:d});e.push(_);var j=Object(r.q)({checked:Object(r.b)(this._undoModel,i.fillBackground,"Change "+n+" Background Visibility"),transparency:Object(r.b)(this._undoModel,i.transparency,"Change "+n+" Background Transparency")},{ +id:l+"Background",title:u});e.push(j);var O=Object(r.c)({checked:Object(r.b)(this._undoModel,i.showCoeffs,"Change "+n+" Levels Visibility")},{id:l+"Levels",title:a});return e.push(O),e},t}(l.a)},"74nv":function(e,t,i){"use strict";i.r(t),i.d(t,"NoteDefinitionsViewModel",(function(){return d}));var n=i("mrSG"),o=i("DSp8"),r=i("Cn8r"),l=i("HSjo"),s=i("25b6"),c=window.t("Label"),d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype._stylePropertyDefinitions=function(){var e=this._source.properties().childs(),t=this._source.name();return[Object(l.e)({color:Object(l.u)(this._undoModel,e.markerColor,null,"Change "+t+" background color")},{id:Object(s.c)(t+"LabelColor"),title:c})]},t.prototype._textPropertyDefinitions=function(){var e=this._source.properties().childs(),t=this._source.name();return[Object(o.a)(this._undoModel,{textColor:e.textColor,fontSize:e.fontSize,bold:e.bold,italic:e.italic,text:e.text,backgroundColor:e.backgroundColor,backgroundTransparency:e.backgroundTransparency,borderColor:e.borderColor},t,{isEditable:!0,isMultiLine:!0})]},t}(r.a)},"78yF":function(e,t,i){"use strict";i.d(t,"a",(function(){return j}));var n=i("mrSG"),o=i("wm7x"),r=i("HSjo"),l=i("hY0g"),s=i.n(l),c=i("bKFv"),d=i("25b6"),u=[{value:c.StatsPosition.Left,title:window.t("Left")},{value:c.StatsPosition.Center,title:window.t("Center")},{value:c.StatsPosition.Right,title:window.t("Right")}],a=window.t("Show Middle Point"),h=window.t("Stats Position"),b=window.t("Show Price Range"),p=window.t("Show Bars Range"),w=window.t("Show Date/Time Range"),f=window.t("Show Distance"),g=window.t("Show Angle"),_=window.t("Always Show Stats");function j(e,t,i,l){var c=Object(d.c)(i),j=[],O=t,C=Object(o.a)(e,Object(n.__assign)(Object(n.__assign)({},O),{lineColor:t.linecolor,lineWidth:t.linewidth,lineStyle:t.linestyle}),c,"Line");j.push(C);var v=Object(r.c)({checked:Object(r.b)(e,t.showMiddlePoint,"Change "+i+" Show Middle Point")},{id:c+"MiddlePoint",title:l&&l.middlePoint||a});j.push(v);var y=Object(r.c)({checked:Object(r.b)(e,t.showPriceRange,"Change "+i+" Show Price Range")},{id:c+"PriceRange",title:l&&l.priceRange||b});j.push(y);var L=Object(r.c)({checked:Object(r.b)(e,t.showBarsRange,"Change "+i+" Show Bars Range")},{id:c+"BarsRange",title:l&&l.barRange||p});if(j.push(L),"showDateTimeRange"in t){var M=Object(r.c)({checked:Object(r.b)(e,t.showDateTimeRange,"Change "+i+" Show Date/Time Range")},{id:c+"DateTimeRange",title:l&&l.dateTimeRange||w});j.push(M)}if("showDistance"in t){var k=Object(r.c)({checked:Object(r.b)(e,t.showDistance,"Change "+i+" Show Distance")},{id:c+"Distance",title:l&&l.distance||f});j.push(k)}if("showAngle"in t){var x=Object(r.c)({checked:Object(r.b)(e,t.showAngle,"Change "+i+" Show Angle")},{id:c+"Angle",title:l&&l.angle||g});j.push(x)}var m=Object(r.c)({checked:Object(r.b)(e,t.alwaysShowStats,"Change "+i+" Always Show Stats")},{id:c+"ShowStats",title:l&&l.showStats||_});j.push(m);var S=Object(r.j)({option:Object(r.b)(e,t.statsPosition,"Change "+i+" Stats Position")},{ +id:c+"StatsPosition",title:l&&l.statsPosition||h,options:new s.a(u)});return j.push(S),j}},"8ioM":function(e,t,i){"use strict";i.r(t),i.d(t,"BarsPatternDefinitionsViewModel",(function(){return f}));var n=i("mrSG"),o=i("Cn8r"),r=i("HSjo"),l=i("hY0g"),s=i.n(l),c=i("Ye2/"),d=i("Z5lT"),u=i("25b6"),a=window.t("Color"),h=window.t("Mode"),b=window.t("Mirrored"),p=window.t("Flipped"),w=[{value:c.LineToolBarsPatternMode.Bars,title:window.t("HL Bars")},{value:c.LineToolBarsPatternMode.OpenClose,title:window.t("OC Bars")},{value:c.LineToolBarsPatternMode.Line,title:window.t("Line - Close")},{value:c.LineToolBarsPatternMode.LineOpen,title:window.t("Line - Open")},{value:c.LineToolBarsPatternMode.LineHigh,title:window.t("Line - High")},{value:c.LineToolBarsPatternMode.LineLow,title:window.t("Line - Low")},{value:c.LineToolBarsPatternMode.LineHL2,title:window.t("Line - HL/2")}],f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype._stylePropertyDefinitions=function(){var e=this._source.properties().childs(),t=this._source.name(),i=Object(u.c)(t);return[Object(r.e)({color:Object(r.u)(this._undoModel,e.color,null,"Change "+t+" color")},{id:i+"Color",title:a}),Object(r.j)({option:Object(r.b)(this._undoModel,e.mode,"Change "+t+" mode",[d.a])},{id:i+"Mode",title:h,options:new s.a(w)}),Object(r.c)({checked:Object(r.b)(this._undoModel,e.mirrored,"Change "+t+" Mirrored")},{id:i+"Mirrored",title:b}),Object(r.c)({checked:Object(r.b)(this._undoModel,e.flipped,"Change "+t+" Flipped")},{id:i+"Flipped",title:p})]},t}(o.a)},"91EF":function(e,t,i){"use strict";i.r(t),i.d(t,"PolylinesDefinitionsViewModel",(function(){return u}));var n=i("mrSG"),o=i("wm7x"),r=i("Cn8r"),l=i("HSjo"),s=i("25b6"),c=window.t("Border"),d=window.t("Background"),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype._stylePropertyDefinitions=function(){var e=this._source.properties().childs(),t=this._source.name();return[Object(o.a)(this._undoModel,{lineColor:e.linecolor,lineWidth:e.linewidth},t,"Line",{line:c}),Object(l.e)({checked:Object(l.b)(this._undoModel,e.fillBackground,"Change "+t+" background visibility"),color:Object(l.u)(this._undoModel,e.backgroundColor,e.transparency,"Change "+t+" background color")},{id:Object(s.c)(t+"BackgroundColor"),title:d})]},t}(r.a)},ASG6:function(e,t,i){"use strict";i.r(t),i.d(t,"GannFanDefinitionsViewModel",(function(){return u}));var n=i("mrSG"),o=i("HSjo"),r=i("Cn8r"),l=i("25b6"),s=window.t("Use one color"),c=window.t("Background"),d=window.t("Labels"),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype._stylePropertyDefinitions=function(){for(var e=[],t=this._source.properties(),i=t.childs(),n=this._source.name(),r=Object(l.c)(n),u=this._source.levelsCount(),a=1;a<=u;a++){var h=i["level"+a].childs(),b=Object(o.g)({checked:Object(o.b)(this._undoModel,h.visible,"Change "+n+" Level "+a+" Line Visibility"), +color:Object(o.u)(this._undoModel,h.color,null,"Change "+n+" Level "+a+" Line Color"),width:Object(o.b)(this._undoModel,h.linewidth,"Change "+n+" Level "+a+" Line Width"),style:Object(o.b)(this._undoModel,h.linestyle,"Change "+n+" Level "+a+" Line Style")},{id:r+"LineLevel"+a,title:h.coeff1.value()+"/"+h.coeff2.value()});e.push(b)}var p=Object(o.e)({color:Object(o.u)(this._undoModel,t.collectibleColors,null,"Change "+n+" All Lines Color")},{id:r+"AllLineColor",title:s});e.push(p);var w=Object(o.q)({checked:Object(o.b)(this._undoModel,i.fillBackground,"Change "+n+" Background Visibility"),transparency:Object(o.b)(this._undoModel,i.transparency,"Change "+n+" Background Transparency")},{id:r+"Background",title:c});e.push(w);var f=Object(o.c)({checked:Object(o.b)(this._undoModel,i.showLabels,"Change "+n+" Labels Visibility")},{id:r+"Labels",title:d});return e.push(f),e},t}(r.a)},Ax76:function(e,t,i){"use strict";i.r(t),i.d(t,"GeneralDatePriceRangeDefinitionsViewModel",(function(){return _}));var n=i("mrSG"),o=i("wm7x"),r=i("DSp8"),l=i("Cn8r"),s=i("HSjo"),c=i("25b6"),d=window.t("Line"),u=window.t("Border"),a=window.t("Background"),h=window.t("Extend top"),b=window.t("Extend bottom"),p=window.t("Extend left"),w=window.t("Extend right"),f=window.t("Label"),g=window.t("Label background");var _=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype._stylePropertyDefinitions=function(){var e=[],t=this._source.properties().childs(),i=this._source.name(),n=Object(c.c)(i),l=Object(o.a)(this._undoModel,{lineColor:t.linecolor,lineWidth:t.linewidth},i,"Line",{line:d});if(e.push(l),t.hasOwnProperty("borderWidth")){var _=Object(o.a)(this._undoModel,{showLine:t.drawBorder,lineColor:t.borderColor,lineWidth:t.borderWidth},i,"Border",{line:u});e.push(_)}var j=Object(s.e)({checked:Object(s.b)(this._undoModel,t.fillBackground,"Change "+i+" background visibility"),color:Object(s.u)(this._undoModel,t.backgroundColor,t.backgroundTransparency,"Change "+i+" background color")},{id:n+"BackgroundColor",title:a});if(e.push(j),function(e){return e.hasOwnProperty("extendTop")}(t)){var O=Object(s.c)({checked:Object(s.b)(this._undoModel,t.extendTop,"Change "+i+" Extend top")},{id:n+"ExtendTop",title:h}),C=Object(s.c)({checked:Object(s.b)(this._undoModel,t.extendBottom,"Change "+i+" Extend bottom")},{id:n+"ExtendBottom",title:b});e.push(O,C)}if(function(e){return e.hasOwnProperty("extendLeft")}(t)){var v=Object(s.c)({checked:Object(s.b)(this._undoModel,t.extendLeft,"Change "+i+" Extend left")},{id:n+"extendLeft",title:p}),y=Object(s.c)({checked:Object(s.b)(this._undoModel,t.extendRight,"Change "+i+" Extend bottom")},{id:n+"ExtendBottom",title:w});e.push(v,y)}var L=Object(r.a)(this._undoModel,{textColor:t.textcolor,fontSize:t.fontsize,backgroundVisible:t.fillLabelBackground,backgroundColor:t.labelBackgroundColor,backgroundTransparency:t.backgroundTransparency},i,{isEditable:!0,isMultiLine:!0,customTitles:{text:f,backgroundTitle:g}});return e.push(L),e},t}(l.a)},BABJ:function(e,t,i){"use strict" +;i.r(t),i.d(t,"TimeCyclesPatternDefinitionsViewModel",(function(){return u}));var n=i("mrSG"),o=i("wm7x"),r=i("Cn8r"),l=i("HSjo"),s=i("25b6"),c=window.t("Line"),d=window.t("Background"),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype._stylePropertyDefinitions=function(){var e=this._source.properties().childs(),t=this._source.name();return[Object(o.a)(this._undoModel,{lineColor:e.linecolor,lineWidth:e.linewidth,lineStyle:e.linestyle},t,"Line",{line:c}),Object(l.e)({checked:Object(l.b)(this._undoModel,e.fillBackground,"Change "+t+" background visibility"),color:Object(l.u)(this._undoModel,e.backgroundColor,e.transparency,"Change "+t+" background color")},{id:Object(s.c)(t+"BackgroundColor"),title:d})]},t}(r.a)},BDhr:function(e,t,i){"use strict";i.d(t,"a",(function(){return c}));var n=i("wm7x"),o=i("HSjo"),r=i("25b6"),l=window.t("Show Price"),s=window.t("Show Time");function c(e,t,i){var c=Object(r.c)(i),d=[],u=Object(n.a)(e,{lineColor:t.linecolor,lineWidth:t.linewidth,lineStyle:t.linestyle},c,"Line");if(d.push(u),"showPrice"in t){var a=Object(o.c)({checked:Object(o.b)(e,t.showPrice,"Change "+i+" Price Label Visibility")},{id:c+"ShowPrice",title:l});d.push(a)}if("showTime"in t){var h=Object(o.c)({checked:Object(o.b)(e,t.showTime,"Change "+i+" Time Label Visibility")},{id:c+"ShowTime",title:s});d.push(h)}return d}},CA9d:function(e,t,i){"use strict";i.d(t,"b",(function(){return u})),i.d(t,"a",(function(){return a})),i.d(t,"c",(function(){return h}));var n=i("mrSG"),o=i("HSjo"),r=i("hY0g"),l=i.n(r),s=i("25b6"),c=window.t("Price"),d=window.t("Bar#");function u(e,t,i){return{property:Object(o.b)(e,t.price,"Change "+c+" Y coordinate"),info:{typeY:1,stepY:i}}}function a(e,t){return{property:Object(o.b)(e,t.bar,"Change "+d+" X coordinate"),info:{typeX:0,minX:new l.a(-5e4),maxX:new l.a(15e3),stepX:new l.a(1)}}}function h(e,t,i,r,l,c){var d=a(e,t),h=u(e,t,r);return Object(o.f)({x:d.property,y:h.property},Object(n.__assign)(Object(n.__assign)({id:Object(s.c)(c+"Coordinates"+l),title:l},d.info),h.info))}},Cn8r:function(e,t,i){"use strict";i("YFKU"),i("HbRj");var n=i("Eyy1"),o=i("HSjo"),r=i("1yQO"),l=i("hY0g"),s=i.n(l),c=i("Kxc7"),d=window.t("Seconds"),u=window.t("Minutes"),a=window.t("Hours"),h=window.t("Days"),b=window.t("Weeks"),p=window.t("Months"),w=(window.t("Ranges"),[1,59]),f=[1,59],g=[1,24],_=[1,366];var j=i("CA9d");i.d(t,"a",(function(){return M}));var O=window.t("Visibility"),C=window.t("Coordinates"),v=window.t("Style"),y=window.t("Text"),L=window.t("Inputs");var M=function(){function e(e,t){this._yCoordinateStepWV=null,this._propertyPages=[],this._source=t,this._undoModel=e,this._ownerSource=Object(n.ensureNotNull)(this._source.ownerSource()),this._createPropertyRages()}return e.prototype.destroy=function(){null!==this._yCoordinateStepWV&&(this._source.ownerSourceChanged().unsubscribeAll(this),this._ownerSource.priceStepChanged().unsubscribeAll(this)),this._propertyPages.forEach((function(e){Object(o.t)(e.definitions.value())}))}, +e.prototype.propertyPages=function(){return Promise.resolve(this._propertyPages)},e.prototype._createPropertyRages=function(){this._propertyPages=[];var e=this._createInputsPropertyPage();null!==e&&this._propertyPages.push(e);var t=this._createStylePropertyPage();null!==t&&this._propertyPages.push(t);var i=this._createTextPropertyPage();if(null!==i&&this._propertyPages.push(i),this._source.hasEditableCoordinates()){var n=this._createCoordinatesPropertyPage();null!==n&&this._propertyPages.push(n)}var o=this._createVisibilitiesPropertyPage();this._propertyPages.push(o)},e.prototype._createVisibilitiesPropertyPage=function(){var e=this._source.properties().childs().intervalsVisibilities.childs();return Object(r.a)(function(e,t){var i=[];if(c.enabled("seconds_resolution")){var n=Object(o.m)({checked:Object(o.b)(e,t.seconds,"Change Line Tool Visibility On Seconds"),from:Object(o.b)(e,t.secondsFrom,"Change Line Tool Seconds From"),to:Object(o.b)(e,t.secondsTo,"Change Line Tool Seconds To")},{id:"IntervalsVisibilitiesSecond",title:d,min:new s.a(w[0]),max:new s.a(w[1])});i.push(n)}var r=Object(o.m)({checked:Object(o.b)(e,t.minutes,"Change Line Tool Visibility On Minutes"),from:Object(o.b)(e,t.minutesFrom,"Change Line Tool Minutes From"),to:Object(o.b)(e,t.minutesTo,"Change Line Tool Minutes To")},{id:"IntervalsVisibilitiesMinutes",title:u,min:new s.a(f[0]),max:new s.a(f[1])}),l=Object(o.m)({checked:Object(o.b)(e,t.hours,"Change Line Tool Visibility On Hours"),from:Object(o.b)(e,t.hoursFrom,"Change Line Tool Hours From"),to:Object(o.b)(e,t.hoursTo,"Change Line Tool Hours To")},{id:"IntervalsVisibilitiesHours",title:a,min:new s.a(g[0]),max:new s.a(g[1])}),j=Object(o.m)({checked:Object(o.b)(e,t.days,"Change Line Tool Visibility On Days"),from:Object(o.b)(e,t.daysFrom,"Change Line Tool Days From"),to:Object(o.b)(e,t.daysTo,"Change Line Tool Days To")},{id:"IntervalsVisibilitiesDays",title:h,min:new s.a(_[0]),max:new s.a(_[1])});i.push(r,l,j);var O=Object(o.c)({checked:Object(o.b)(e,t.weeks,"Change Line Tool Visibility On Weeks")},{id:"IntervalsVisibilitiesWeeks",title:b}),C=Object(o.c)({checked:Object(o.b)(e,t.months,"Change Line Tool Visibility On Months")},{id:"IntervalsVisibilitiesMonths",title:p});return i.push(O,C),i}(this._undoModel,e),"visibility",O)},e.prototype._createCoordinatesPropertyPage=function(){var e=this._coordinatesPropertyDefinitions();return null!==e?Object(r.a)(e,"coordinates",C):null},e.prototype._getYCoordinateStepWV=function(){var e=this;return null===this._yCoordinateStepWV&&(this._yCoordinateStepWV=new s.a(function(e){if(null!==e){var t=e.priceStep();if(null!==t)return t}return 1}(this._source.ownerSource())),this._ownerSource.priceStepChanged().subscribe(this,(function(){return e._updateYCoordinateStep()})),this._source.ownerSourceChanged().subscribe(this,(function(){e._ownerSource.priceStepChanged().unsubscribeAll(e),e._ownerSource=Object(n.ensureNotNull)(e._source.ownerSource()),e._ownerSource.priceStepChanged().subscribe(e,(function(){return e._updateYCoordinateStep()}))}))),this._yCoordinateStepWV +},e.prototype._coordinatesPropertyDefinitions=function(){var e=this,t=this._source.points(),i=this._source.pointsProperty().childs().points,n=[],o=this._getYCoordinateStepWV();return t.forEach((function(t,r){var l=i[r].childs();l&&n.push(Object(j.c)(e._undoModel,l,t,o,window.t("#{0} (price, bar)",{context:"linetool point"}).format(r+1),e._source.name()))})),n},e.prototype._createStylePropertyPage=function(){var e=this._stylePropertyDefinitions();return null!==e?Object(r.a)(e,"style",v):null},e.prototype._stylePropertyDefinitions=function(){return null},e.prototype._createTextPropertyPage=function(){var e=this._textPropertyDefinitions();return null!==e?Object(r.a)(e,"text",y):null},e.prototype._textPropertyDefinitions=function(){return null},e.prototype._createInputsPropertyPage=function(){var e=this._inputsPropertyDefinitions();return null!==e?Object(r.a)(e,"inputs",L):null},e.prototype._inputsPropertyDefinitions=function(){return null},e.prototype._updateYCoordinateStep=function(){var e=this._ownerSource.priceStep();this._getYCoordinateStepWV().setValue(e||1)},e}()},"D+Nk":function(e,t,i){"use strict";i.r(t),i.d(t,"PitchBaseDefinitionsViewModel",(function(){return h}));var n=i("mrSG"),o=i("wm7x"),r=i("Cn8r"),l=i("HSjo"),s=i("25b6"),c=window.t("Median"),d=window.t("Use one color"),u=window.t("Background"),a=window.t("Extend Lines"),h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype._stylePropertyDefinitions=function(){var e=[],t=this._source.properties(),i=t.childs(),n=this._source.name(),r=Object(s.c)(n);t.hasChild("extendLines")&&e.push(Object(l.c)({checked:Object(l.b)(this._undoModel,i.extendLines,"Toggle "+n+" Extend Lines")},{id:r+"ExtendLines",title:a}));var h=i.median.childs(),b=Object(o.a)(this._undoModel,{lineColor:h.color,lineStyle:h.linestyle,lineWidth:h.linewidth},n,"Median",{line:c});e.push(b);for(var p=this._source.levelsCount(),w=0;w<=p;w++){var f=i["level"+w].childs(),g=Object(l.g)({checked:Object(l.b)(this._undoModel,f.visible,"Change "+n+" Level "+(w+1)+" Line Visibility"),color:Object(l.u)(this._undoModel,f.color,null,"Change "+n+" Level "+(w+1)+" Line Color"),width:Object(l.b)(this._undoModel,f.linewidth,"Change "+n+" Level "+(w+1)+" Line Width"),style:Object(l.b)(this._undoModel,f.linestyle,"Change "+n+" Level "+(w+1)+" Line Style"),level:Object(l.b)(this._undoModel,f.coeff,"Change "+n+" Level "+(w+1)+" Line Coeff")},{id:r+"LineLevel"+(w+1)});e.push(g)}var _=Object(l.e)({color:Object(l.u)(this._undoModel,t.collectibleColors,null,"Change "+n+" All Lines Color")},{id:r+"AllLineColor",title:d});e.push(_);var j=Object(l.q)({checked:Object(l.b)(this._undoModel,i.fillBackground,"Change "+n+" Background Visibility"),transparency:Object(l.b)(this._undoModel,i.transparency,"Change "+n+" Background Transparency")},{id:r+"Background",title:u});return e.push(j),e},t}(r.a)},DSp8:function(e,t,i){"use strict";i.d(t,"a",(function(){return c}));var n=i("HSjo"),o=i("25b6"),r=window.t("Background"),l=window.t("Border"),s=window.t("Text Wrap") +;function c(e,t,i,c){var d={},u={id:Object(o.c)(i)+"Text",title:c.customTitles&&c.customTitles.text||""};if(void 0!==t.showText&&(d.checked=Object(n.b)(e,t.showText,"Change "+i+" Text Visibility")),void 0!==t.textColor&&(d.color=Object(n.u)(e,t.textColor,t.transparency||null,"Change "+i+" Text Color")),void 0!==t.fontSize&&(d.size=Object(n.b)(e,t.fontSize,"Change "+i+" Text Font Size")),void 0!==t.bold&&(d.bold=Object(n.b)(e,t.bold,"Change "+i+" Text Font Bold")),void 0!==t.italic&&(d.italic=Object(n.b)(e,t.italic,"Change "+i+" Text Font Italic")),void 0!==t.text&&(d.text=Object(n.b)(e,t.text,"Change "+i+" Text"),u.isEditable=Boolean(c.isEditable),u.isMultiLine=Boolean(c.isMultiLine)),void 0!==t.vertLabelsAlign&&(d.alignmentVertical=Object(n.b)(e,t.vertLabelsAlign,"Change "+i+" Labels Alignment Vertical"),u.alignmentVerticalItems=c.alignmentVerticalItems),void 0!==t.horzLabelsAlign&&(d.alignmentHorizontal=Object(n.b)(e,t.horzLabelsAlign,"Change "+i+" Labels Alignment Horizontal"),u.alignmentHorizontalItems=c.alignmentHorizontalItems),void 0!==t.textOrientation&&(d.orientation=Object(n.b)(e,t.textOrientation,"Change "+i+" Labels Direction")),void 0!==t.backgroundVisible&&(d.backgroundVisible=Object(n.b)(e,t.backgroundVisible,"Change "+i+" Text Background Visibility")),void 0!==t.backgroundColor){var a=null;void 0!==t.backgroundTransparency&&(a=t.backgroundTransparency),d.backgroundColor=Object(n.u)(e,t.backgroundColor,a,"Change "+i+" Text Background Color")}return void 0===t.backgroundVisible&&void 0===t.backgroundColor||(u.backgroundTitle=c.customTitles&&c.customTitles.backgroundTitle||r),void 0!==t.borderVisible&&(d.borderVisible=Object(n.b)(e,t.borderVisible,"Change "+i+" Text Border Visibility")),void 0!==t.borderWidth&&(d.borderWidth=Object(n.b)(e,t.borderWidth,"Change "+i+" Text Border Width")),void 0!==t.borderColor&&(d.borderColor=Object(n.u)(e,t.borderColor,null,"Change "+i+" Text Border Color")),void 0===t.borderVisible&&void 0===t.borderColor&&void 0===t.borderWidth||(u.borderTitle=c.customTitles&&c.customTitles.borderTitle||l),void 0!==t.wrap&&(d.wrap=Object(n.b)(e,t.wrap,"Change "+i+" Text Wrap"),u.wrapTitle=c.customTitles&&c.customTitles.wrapTitle||s),Object(n.p)(d,u)}},EFc4:function(e,t,i){"use strict";i.r(t),i.d(t,"Points5PatternDefinitionsViewModel",(function(){return h}));var n=i("mrSG"),o=i("wm7x"),r=i("DSp8"),l=i("Cn8r"),s=i("HSjo"),c=i("25b6"),d=window.t("Label"),u=window.t("Border"),a=window.t("Background"),h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype._stylePropertyDefinitions=function(){var e=this._source.properties().childs(),t=this._source.name();return[Object(r.a)(this._undoModel,{textColor:e.textcolor,fontSize:e.fontsize,bold:e.bold,italic:e.italic},this._source.name(),{isEditable:!0,isMultiLine:!0,customTitles:{text:d}}),Object(o.a)(this._undoModel,{lineColor:e.color,lineWidth:e.linewidth},t,"Line",{line:u}),Object(s.e)({checked:Object(s.b)(this._undoModel,e.fillBackground,"Change "+t+" background visibility"), +color:Object(s.u)(this._undoModel,e.backgroundColor,e.transparency,"Change "+t+" background color")},{id:Object(c.c)(t+"BackgroundColor"),title:a})]},t}(l.a)},FkpW:function(e,t,i){"use strict";i.r(t),i.d(t,"VerticalLineDefinitionsViewModel",(function(){return a}));var n=i("mrSG"),o=i("HSjo"),r=i("CA9d"),l=i("BDhr"),s=i("25b6"),c=i("Cn8r"),d=i("DSp8"),u=window.t("Show text"),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype._stylePropertyDefinitions=function(){var e=this._source.properties().childs();return Object(l.a)(this._undoModel,e,this._source.name())},t.prototype._coordinatesPropertyDefinitions=function(){var e=this._source.pointsProperty().childs().points[0].childs(),t=Object(r.a)(this._undoModel,e);return[Object(o.f)({x:t.property},Object(n.__assign)({id:Object(s.c)(this._source.name()+"Point1"),title:window.t("#1 (bar)",{context:"linetool point"})},t.info))]},t.prototype._textPropertyDefinitions=function(){var e=this._source.properties().childs();return[Object(d.a)(this._undoModel,Object(n.__assign)(Object(n.__assign)({},e),{showText:e.showLabel,textColor:e.textcolor,fontSize:e.fontsize,textOrientation:e.textOrientation}),this._source.name(),{isEditable:!0,isMultiLine:!0,customTitles:{text:u}})]},t}(c.a)},FxV7:function(e,t,i){"use strict";i.r(t),i.d(t,"ArrowMarkerDefinitionsViewModel",(function(){return u}));var n=i("mrSG"),o=i("HSjo"),r=i("Cn8r"),l=i("25b6"),s=i("DSp8"),c=window.t("Color"),d=window.t("Show text"),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype._stylePropertyDefinitions=function(){var e=this._source.properties().childs(),t=this._source.name();return[Object(o.e)({color:Object(o.u)(this._undoModel,e.backgroundColor,null,"Change "+t+" color")},{id:Object(l.c)(t+"Color"),title:c})]},t.prototype._textPropertyDefinitions=function(){var e=this._source.properties().childs();return[Object(s.a)(this._undoModel,{text:e.text,showText:e.showLabel,textColor:e.textColor,fontSize:e.fontsize,bold:e.bold,italic:e.italic},this._source.name(),{isEditable:!0,isMultiLine:!0,customTitles:{text:d}})]},t}(r.a)},HCdA:function(e,t,i){"use strict";i.r(t),i.d(t,"PitchForkDefinitionsViewModel",(function(){return a}));var n=i("mrSG"),o=i("HSjo"),r=i("D+Nk"),l=i("rCHB"),s=i("hY0g"),c=i.n(s),d=window.t("Style"),u=[{value:l.LineToolPitchforkStyle.Original,title:window.t("Original")},{value:l.LineToolPitchforkStyle.Schiff2,title:window.t("Schiff")},{value:l.LineToolPitchforkStyle.Schiff,title:window.t("Modified Schiff")},{value:l.LineToolPitchforkStyle.Inside,title:window.t("Inside")}],a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype._stylePropertyDefinitions=function(){var t=e.prototype._stylePropertyDefinitions.call(this),i=this._source.properties().childs(),n=this._source.name(),r=Object(o.j)({option:Object(o.b)(this._undoModel,i.style,"Change "+n+" Style")},{id:n+"PitchStyle",title:d,options:new c.a(u)}) +;return t.push(r),t},t}(r.PitchBaseDefinitionsViewModel)},K4wI:function(e,t,i){"use strict";i.r(t),i.d(t,"RectangleDefinitionsViewModel",(function(){return h}));var n=i("mrSG"),o=i("YFKU"),r=i("HSjo"),l=i("Zd1D"),s=i("DSp8"),c=Object(o.t)("Text"),d=window.t("Extend left"),u=window.t("Extend right"),a=[{value:"bottom",title:window.t("Top")},{value:"middle",title:window.t("Inside")},{value:"top",title:window.t("Bottom")}],h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype._stylePropertyDefinitions=function(){var t=this._source.properties().childs(),i=this._source.name(),n=e.prototype._stylePropertyDefinitions.call(this),o=Object(r.c)({checked:Object(r.b)(this._undoModel,t.extendRight,"Change "+i+" Extending Right")},{id:i+"ExtendRight",title:u});n.push(o);var l=Object(r.c)({checked:Object(r.b)(this._undoModel,t.extendLeft,"Change "+i+" Extending Left")},{id:i+"ExtendLeft",title:d});return n.push(l),n},t.prototype._textPropertyDefinitions=function(){var e=this._source.properties().childs();return[Object(s.a)(this._undoModel,{textColor:e.textColor,text:e.text,bold:e.bold,italic:e.italic,fontSize:e.fontSize,horzLabelsAlign:e.horzLabelsAlign,vertLabelsAlign:e.vertLabelsAlign,showText:e.showLabel},this._source.name(),{isEditable:!0,isMultiLine:!0,alignmentVerticalItems:a,customTitles:{text:c}})]},t}(l.GeneralFiguresDefinitionsViewModelBase)},LX4V:function(e,t,i){"use strict";i.r(t),i.d(t,"CyclicAndSineLinesPatternDefinitionsViewModel",(function(){return s}));var n=i("mrSG"),o=i("wm7x"),r=i("Cn8r"),l=window.t("Lines"),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype._stylePropertyDefinitions=function(){var e=this._source.properties().childs();return[Object(o.a)(this._undoModel,{lineColor:e.linecolor,lineWidth:e.linewidth,lineStyle:e.linestyle},this._source.name(),"Line",{line:l})]},t}(r.a)},LzAw:function(e,t,i){"use strict";i.r(t),i.d(t,"ProjectionDefinitionsViewModel",(function(){return u}));var n=i("mrSG"),o=i("wm7x"),r=i("Cn8r"),l=i("HSjo"),s=i("25b6"),c=window.t("Border"),d=window.t("Background"),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype._stylePropertyDefinitions=function(){var e=this._source.properties().childs(),t=this._source.name();return[Object(l.r)({color1:Object(l.u)(this._undoModel,e.color1,e.transparency,"Change "+t+" background color 1"),color2:Object(l.u)(this._undoModel,e.color2,e.transparency,"Change "+t+" background color 2")},{id:Object(s.c)(t+"Background2Color"),title:d}),Object(o.a)(this._undoModel,{lineColor:e.trendline.childs().color,lineWidth:e.linewidth},t,"Line",{line:c})]},t}(r.a)},NEbb:function(e,t,i){"use strict";i.r(t),i.d(t,"HorizontalLineDefinitionsViewModel",(function(){return c}));var n=i("mrSG"),o=i("HSjo"),r=i("xrdl"),l=i("CA9d"),s=i("25b6"),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e), +t.prototype._coordinatesPropertyDefinitions=function(){var e=this._source.pointsProperty().childs().points[0].childs(),t=this._getYCoordinateStepWV(),i=Object(l.b)(this._undoModel,e,t);return[Object(o.f)({y:i.property},Object(n.__assign)({id:Object(s.c)(this._source.name()+"Point"),title:window.t("#1 (price)",{context:"linetool point"})},i.info))]},t}(r.CrossLineDefinitionsViewModel)},Pwwq:function(e,t,i){"use strict";i.r(t),i.d(t,"PredictionDefinitionsViewModel",(function(){return _}));var n=i("mrSG"),o=i("wm7x"),r=i("Cn8r"),l=i("HSjo"),s=i("25b6"),c=window.t("Source text"),d=window.t("Source background"),u=window.t("Source border"),a=window.t("Target text"),h=window.t("Target background"),b=window.t("Target border"),p=window.t("Success text"),w=window.t("Success background"),f=window.t("Failure text"),g=window.t("Failure background"),_=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype._stylePropertyDefinitions=function(){var e=this._source.properties().childs(),t=this._source.name(),i=Object(s.c)(t);return[Object(o.a)(this._undoModel,{lineColor:e.linecolor,lineWidth:e.linewidth},t,"Line"),Object(l.e)({color:Object(l.u)(this._undoModel,e.sourceTextColor,null,"Change "+t+" source text color")},{id:i+"SourceTextColor",title:c}),Object(l.e)({color:Object(l.u)(this._undoModel,e.sourceBackColor,e.transparency,"Change "+t+" source background color")},{id:i+"SourceBackgroundColor",title:d}),Object(l.e)({color:Object(l.u)(this._undoModel,e.sourceStrokeColor,null,"Change "+t+" source border color")},{id:i+"SourceBorderColor",title:u}),Object(l.e)({color:Object(l.u)(this._undoModel,e.targetTextColor,null,"Change "+t+" target text color")},{id:i+"TargetTextColor",title:a}),Object(l.e)({color:Object(l.u)(this._undoModel,e.targetBackColor,null,"Change "+t+" target background color")},{id:i+"TargetBackgroundColor",title:h}),Object(l.e)({color:Object(l.u)(this._undoModel,e.targetStrokeColor,null,"Change "+t+" target border color")},{id:i+"TargetBorderColor",title:b}),Object(l.e)({color:Object(l.u)(this._undoModel,e.successTextColor,null,"Change "+t+" success text color")},{id:i+"SuccessTextColor",title:p}),Object(l.e)({color:Object(l.u)(this._undoModel,e.successBackground,null,"Change "+t+" success background color")},{id:i+"SuccessBackgroundColor",title:w}),Object(l.e)({color:Object(l.u)(this._undoModel,e.failureTextColor,null,"Change "+t+" failure text color")},{id:i+"FailureTextColor",title:f}),Object(l.e)({color:Object(l.u)(this._undoModel,e.failureBackground,null,"Change "+t+" failure background color")},{id:i+"FailureBackgroundColor",title:g})]},t}(r.a)},QWxu:function(e,t,i){"use strict";i.r(t),i.d(t,"TextDefinitionsViewModel",(function(){return r}));var n=i("mrSG"),o=i("DSp8"),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype._textPropertyDefinitions=function(){var e=this._source.properties().childs();return[Object(o.a)(this._undoModel,{textColor:e.color,fontSize:e.fontsize,bold:e.bold, +italic:e.italic,text:e.text,backgroundVisible:e.fillBackground,backgroundColor:e.backgroundColor,backgroundTransparency:e.backgroundTransparency,borderVisible:e.drawBorder,borderColor:e.borderColor,wrap:e.wordWrap},this._source.name(),{isEditable:!0,isMultiLine:!0})]},t}(i("Cn8r").a)},RYNR:function(e,t,i){"use strict";i.r(t),i.d(t,"RiskRewardDefinitionsViewModel",(function(){return m}));var n=i("mrSG"),o=i("wm7x"),r=i("DSp8"),l=i("Cn8r"),s=i("HSjo"),c=i("hY0g"),d=i.n(c),u=i("25b6"),a=window.t("Lines"),h=window.t("Stop color"),b=window.t("Target color"),p=window.t("Text"),w=window.t("Compact stats mode"),f=window.t("Ticks"),g=window.t("Price"),_=window.t("Entry price"),j=window.t("Profit level"),O=window.t("Stop level"),C=window.t("Account size"),v=window.t("Risk"),y=window.t("Always show stats"),L=window.t("Show price labels"),M=window.t("%"),k=window.t("Cash");function x(e){return[{value:"percents",title:M},{value:"money",title:e||k}]}var m=function(e){function t(t,i){var n=e.call(this,t,i)||this,o=n._source.properties().childs(),r=o.riskDisplayMode.value();return n._riskMaxWV=new d.a(n._getRiskMax(r)),n._riskStepWV=new d.a(n._getRiskStep(r)),n._riskPrecisionWV=new d.a(n._getRiskPrecision(r)),n._riskUnitWV=new d.a(n._getRiskUnit()),n._riskUnitOptionsWV=new d.a(n._getRiskUnitOptions()),n._createPropertyRages(),o.riskDisplayMode.subscribe(n,(function(e){return n._onRiskDisplayChanged(e)})),o.accountSize.subscribe(n,(function(){return n._onAccountSizeChanged()})),n._undoModel.model().mainSeries().dataEvents().symbolResolved().subscribe(n,n._onSymbolInfoChanged),n}return Object(n.__extends)(t,e),t.prototype.destroy=function(){e.prototype.destroy.call(this);var t=this._source.properties().childs();t.riskDisplayMode.unsubscribeAll(this),t.accountSize.unsubscribeAll(this),this._undoModel.model().mainSeries().dataEvents().symbolResolved().unsubscribeAll(this)},t.prototype._stylePropertyDefinitions=function(){var e=this._source.properties().childs(),t=this._source.name(),i=Object(u.c)(t);return[Object(o.a)(this._undoModel,{lineColor:e.linecolor,lineWidth:e.linewidth},t,"Line",{line:a}),Object(s.e)({color:Object(s.u)(this._undoModel,e.stopBackground,e.stopBackgroundTransparency,"Change "+t+" stop color")},{id:i+"StopColor",title:h}),Object(s.e)({color:Object(s.u)(this._undoModel,e.profitBackground,e.profitBackgroundTransparency,"Change "+t+" stop color")},{id:i+"ProfitColor",title:b}),Object(r.a)(this._undoModel,{textColor:e.textcolor,fontSize:e.fontsize},t,{isEditable:!0,isMultiLine:!0,customTitles:{text:p}}),Object(s.c)({checked:Object(s.b)(this._undoModel,e.showPriceLabels,"Change "+t+" Show price labels")},{id:i+"ShowPriceLabels",title:L}),Object(s.c)({checked:Object(s.b)(this._undoModel,e.compact,"Change "+t+" Compact stats mode")},{id:i+"CompactMode",title:w}),Object(s.c)({checked:Object(s.b)(this._undoModel,e.alwaysShowStats,"Change "+t+" Always show stats")},{id:i+"AlwaysShowStats",title:y})]},t.prototype._inputsPropertyDefinitions=function(){ +var e=this,t=this._source.properties().childs(),i=this._source.name(),n=Object(u.c)(i),o=this._getYCoordinateStepWV(),r=Object(s.i)({value:Object(s.b)(this._undoModel,t.accountSize,"Change "+i+" Account Size")},{id:n+"AccountSize",title:C,type:1,min:new d.a(1e-9),max:new d.a(1e9),step:new d.a(1),unit:this._riskUnitWV}),l=Object(s.i)({value:Object(s.b)(this._undoModel,t.risk,"Change "+i+" Risk",[function(e){return parseFloat(e)}]),unitOptionsValue:Object(s.b)(this._undoModel,t.riskDisplayMode,"Change "+i+" Risk Display Mode")},{id:n+"Risk",title:v,type:1,min:new d.a(1e-9),max:this._riskMaxWV,precision:this._riskPrecisionWV,step:this._riskStepWV,unitOptions:this._riskUnitOptionsWV}),c=Object(s.i)({value:Object(s.b)(this._undoModel,t.entryPrice,"Change "+i+" entry price")},{id:n+"EntryPrice",title:_,type:1,step:o}),a=Object(s.k)([r,l,c],n+"AccountRisk"),h=Object(s.i)({value:Object(s.b)(this._undoModel,t.profitLevel,"Change "+i+" profit level")},{id:n+"ProfitLevelTicks",title:f,type:0,min:new d.a(0),max:new d.a(1e9),step:new d.a(1)}),b=Object(s.i)({value:Object(s.b)(this._undoModel,t.targetPrice,"Change "+i+" profit price",[function(e){return e},function(t){return e._source.preparseProfitPrice(t)}])},{id:n+"ProfitLevelPrice",title:g,type:1,step:o}),p=Object(s.k)([h,b],n+"ProfitLevel",j),w=Object(s.i)({value:Object(s.b)(this._undoModel,t.stopLevel,"Change "+i+" stop level")},{id:n+"StopLevelTicks",title:f,type:0,min:new d.a(0),max:new d.a(1e9),step:new d.a(1)}),y=Object(s.i)({value:Object(s.b)(this._undoModel,t.stopPrice,"Change "+i+" stop price",[function(e){return e},function(t){return e._source.preparseStopPrice(t)}])},{id:n+"StopLevelPrice",title:g,type:1,step:o});return[a,p,Object(s.k)([w,y],n+"StopLevel",O)]},t.prototype._onRiskDisplayChanged=function(e){var t=e.value();this._riskMaxWV.setValue(this._getRiskMax(t)),this._riskStepWV.setValue(this._getRiskStep(t)),this._riskPrecisionWV.setValue(this._getRiskPrecision(t))},t.prototype._onAccountSizeChanged=function(){this._riskMaxWV.setValue(this._getRiskMax(this._source.properties().childs().riskDisplayMode.value()))},t.prototype._onSymbolInfoChanged=function(){this._riskUnitWV.setValue(this._getRiskUnit()),this._riskUnitOptionsWV.setValue(this._getRiskUnitOptions())},t.prototype._getRiskMax=function(e){return"percents"===e?100:this._source.properties().childs().accountSize.value()},t.prototype._getRiskStep=function(e){return"percents"===e?.01:1},t.prototype._getRiskPrecision=function(e){if("percents"===e)return 2},t.prototype._getRiskUnit=function(){var e=this._undoModel.model().mainSeries().symbolInfo();return null!==e&&e.currency_code||""},t.prototype._getRiskUnitOptions=function(){var e=this._undoModel.model().mainSeries().symbolInfo();return null!==e?x(e.currency_code):x()},t}(l.a)},RhWr:function(e,t,i){"use strict";i.r(t),i.d(t,"BalloonDefinitionsViewModel",(function(){return s}));var n=i("mrSG"),o=i("DSp8"),r=i("Cn8r"),l=window.t("Text"),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e), +t.prototype._textPropertyDefinitions=function(){var e=this._source.properties().childs();return[Object(o.a)(this._undoModel,{textColor:e.color,fontSize:e.fontsize,text:e.text,backgroundColor:e.backgroundColor,backgroundTransparency:e.transparency,borderColor:e.borderColor},this._source.name(),{isEditable:!0,isMultiLine:!0,customTitles:{text:l}})]},t}(r.a)},SMr9:function(e,t,i){"use strict";i.r(t),i.d(t,"availableAlignmentVerticalItems",(function(){return h})),i.d(t,"availableAlignmentHorizontalItems",(function(){return b})),i.d(t,"FibTimezoneDefinitionsViewModel",(function(){return p}));var n=i("mrSG"),o=i("HSjo"),r=i("Cn8r"),l=i("hY0g"),s=i.n(l),c=i("25b6"),d=window.t("Use one color"),u=window.t("Background"),a=window.t("Labels"),h=[{value:"top",title:window.t("Top")},{value:"middle",title:window.t("Middle")},{value:"bottom",title:window.t("Bottom")}],b=[{value:"left",title:window.t("Left")},{value:"center",title:window.t("Center")},{value:"right",title:window.t("Right")}],p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype._stylePropertyDefinitions=function(){for(var e=[],t=this._source.properties(),i=t.childs(),n=this._source.name(),r=Object(c.c)(n),l=this._source.levelsCount(),p=1;p<=l;p++){var w=i["level"+p].childs(),f=Object(o.g)({checked:Object(o.b)(this._undoModel,w.visible,"Change "+n+" Level "+p+" Line Visibility"),color:Object(o.u)(this._undoModel,w.color,null,"Change "+n+" Level "+p+" Line Color"),width:Object(o.b)(this._undoModel,w.linewidth,"Change "+n+" Level "+p+" Line Width"),style:Object(o.b)(this._undoModel,w.linestyle,"Change "+n+" Level "+p+" Line Style"),level:Object(o.b)(this._undoModel,w.coeff,"Change "+n+" Level "+p+" Coeff")},{id:r+"LineLevel"+p});e.push(f)}var g=Object(o.e)({color:Object(o.u)(this._undoModel,t.collectibleColors,null,"Change "+n+" All Lines Color")},{id:r+"AllLineColor",title:d});e.push(g);var _=Object(o.q)({checked:Object(o.b)(this._undoModel,i.fillBackground,"Change "+n+" Background Visibility"),transparency:Object(o.b)(this._undoModel,i.transparency,"Change "+n+" Background Transparency")},{id:r+"Background",title:u});e.push(_);var j=Object(o.s)({checked:Object(o.b)(this._undoModel,i.showLabels,"Change "+n+" Labels Visibility"),option1:Object(o.b)(this._undoModel,i.horzLabelsAlign,"Change "+n+" Labels Alignment"),option2:Object(o.b)(this._undoModel,i.vertLabelsAlign,"Change "+n+" Labels Alignment")},{id:r+"Labels",title:a,optionsItems1:new s.a(b),optionsItems2:new s.a(h)});return e.push(j),e},t}(r.a)},UHSU:function(e,t,i){"use strict";i.r(t),i.d(t,"ElliottPatternDefinitionsViewModel",(function(){return b}));var n=i("mrSG"),o=i("wm7x"),r=i("Cn8r"),l=i("HSjo"),s=i("hY0g"),c=i.n(s),d=i("25b6"),u=window.t("Color"),a=window.t("Wave"),h=window.t("Degree"),b=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype._stylePropertyDefinitions=function(){var e=this._source.properties().childs(),t=this._source.name();return[Object(l.e)({ +color:Object(l.u)(this._undoModel,e.color,null,"Change "+t+" color")},{id:Object(d.c)(t+"BackgroundColor"),title:u}),Object(o.a)(this._undoModel,{showLine:e.showWave,lineWidth:e.linewidth},t,"Line",{line:a}),Object(l.j)({option:Object(l.b)(this._undoModel,e.degree,"Change "+t+" degree")},{id:t+"Degree",title:h,options:new c.a(this._source.availableDegreesValues())})]},t}(r.a)},VkdP:function(e,t,i){"use strict";i.r(t),i.d(t,"ParallelChannelDefinitionsViewModel",(function(){return b}));var n=i("mrSG"),o=i("HSjo"),r=i("Cn8r"),l=i("wm7x"),s=i("25b6"),c=window.t("Background"),d=window.t("Extend left line"),u=window.t("Extend right line"),a=window.t("Channel"),h=window.t("Middle"),b=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype._stylePropertyDefinitions=function(){var e=this._source.properties().childs(),t=this._source.name(),i=Object(s.c)(t);return[Object(l.a)(this._undoModel,{lineColor:e.linecolor,lineStyle:e.linestyle,lineWidth:e.linewidth},t,"ChannelLine",{line:a}),Object(l.a)(this._undoModel,{showLine:e.showMidline,lineColor:e.midlinecolor,lineStyle:e.midlinestyle,lineWidth:e.midlinewidth},"MiddleLine",t,{line:h}),Object(o.c)({checked:Object(o.b)(this._undoModel,e.extendLeft,"Change "+t+" Extending Left")},{id:i+"ExtendLeft",title:d}),Object(o.c)({checked:Object(o.b)(this._undoModel,e.extendRight,"Change "+t+" Extending Right")},{id:i+"ExtendRight",title:u}),Object(o.e)({checked:Object(o.b)(this._undoModel,e.fillBackground,"Change "+t+" background visibility"),color:Object(o.u)(this._undoModel,e.backgroundColor,e.transparency,"Change "+t+" background visibility color")},{id:i+"Background",title:c})]},t}(r.a)},"WW+G":function(e,t,i){"use strict";i.r(t),i.d(t,"PathDefinitionsViewModel",(function(){return s}));var n=i("mrSG"),o=i("wm7x"),r=i("Cn8r"),l=window.t("Line"),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype._stylePropertyDefinitions=function(){var e=this._source.properties().childs(),t=this._source.name();return[Object(o.a)(this._undoModel,{lineColor:e.lineColor,lineWidth:e.lineWidth,lineStyle:e.lineStyle,leftEnd:e.leftEnd,rightEnd:e.rightEnd},t,"Line",{line:l})]},t}(r.a)},WfUZ:function(e,t,i){"use strict";i.r(t),i.d(t,"isGannComplexLineTool",(function(){return O})),i.d(t,"GannComplexAndFixedDefinitionsViewModel",(function(){return C}));var n=i("mrSG"),o=i("DSp8"),r=i("HSjo"),l=i("Cn8r"),s=i("nd9+"),c=i("hY0g"),d=i.n(c),u=i("Z5lT"),a=i("25b6"),h=window.t("Reverse"),b=window.t("Use one color"),p=window.t("Background"),w=window.t("Price/Bar Ratio"),f=window.t("Ranges and ratio"),g=window.t("Levels"),_=window.t("Fans"),j=window.t("Arcs");function O(e){return e instanceof s.LineToolGannComplex}var C=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype._stylePropertyDefinitions=function(){ +for(var e=[],t=this._source.properties(),i=t.childs(),n=this._source.name(),l=Object(a.c)(n),s=[],c=i.levels.childCount(),C=0;Cr.timeStamp)){var i=r.target;void 0!==n&&null!==t&&null!==i&&i.ownerDocument===o&&(t.contains(i)||n(r))}}return r.click&&o.addEventListener("click",i,!1),r.mouseDown&&o.addEventListener("mousedown",i,!1),r.touchEnd&&o.addEventListener("touchend",i,!1),r.touchStart&&o.addEventListener("touchstart",i,!1),function(){o.removeEventListener("click",i,!1),o.removeEventListener("mousedown",i,!1),o.removeEventListener("touchend",i,!1),o.removeEventListener("touchstart",i,!1)}}n.d(t,"a",(function(){return o}))},iqv3:function(e,t,n){"use strict";n.r(t);var o=n("i8i4"),r=n("q1tI"),i=n.n(r),c=(n("bSeV"),n("YFKU"),n("ycFu")),s=n("tWVy"),a=n("tmL0"),u=n("5Ssy"),l=n("tc+8"),d=n.n(l),f=n("aIyQ"),v=n.n(f),m=n("qFKp"),p=n("jOdQ");function h(e){var t=e.title,n=e.studyMetaInfo,o=e.model,l=e.confirmInputsType,f=e.onCancel,h=e.onSubmit,b=e.onClose,y=Object(r.useState)(!0),g=y[0],w=y[1],O=Object(r.useMemo)((function(){var e=Object.assign({},n.defaults.inputs);return new d.a({inputs:e})}),[]),_=Object(r.useMemo)((function(){var e=new v.a;return{isInputsStudy:!0,symbolsResolved:function(){return e},resolvedSymbolInfoBySymbol:function(){return null},tempProperties:O}}),[]),E=Object(r.useRef)(null);return Object(r.useEffect)((function(){if(!m.CheckMobile.any()&&g&&"symbol"===l&&E.current){var e=E.current.querySelector("input");e&&e.focus()}}),[g]),i.a.createElement(c.a,{dataName:"confirm-inputs-dialog",title:t,isOpened:g,onSubmit:function(){h(O.state().inputs),S()},onCancel:f,onClickOutside:S,onClose:S,render:function(){return i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{className:p.separator}),i.a.createElement(a.a,{className:p.scrollable,onScroll:C},i.a.createElement(u.a,{reference:E,property:O,model:o,study:_, +inputs:j()})))},defaultActionOnClose:c.b.None,submitButtonText:window.t("Apply"),submitOnEnterKey:!1});function C(){s.a.fire()}function S(){w(!1),b()}function j(){return"symbol"===l?n.inputs.filter((function(e){return e.id===n.symbolInputId()})):n.inputs.filter((function(e){return e.confirm}))}}n.d(t,"ConfirmInputsDialogRenderer",(function(){return b}));var b=function(){function e(e,t,n,r,i,c){var s=this;this._container=document.createElement("div"),this._handleClose=function(){o.unmountComponentAtNode(s._container),s._onClose()},this._title=e,this._studyMetaInfo=t,this._model=n,this._confirmInputsType=r,this._onSubmit=i,this._onClose=c}return e.prototype.show=function(){o.render(r.createElement(h,{title:this._title,studyMetaInfo:this._studyMetaInfo,model:this._model,confirmInputsType:this._confirmInputsType,onSubmit:this._onSubmit,onCancel:function(){},onClose:this._handleClose}),this._container)},e}()},jOdQ:function(e,t,n){e.exports={separator:"separator-1fBbiGH4",scrollable:"scrollable-1was6mON"}},swCq:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Icon=void 0;var o=n("mrSG"),r=n("q1tI");t.Icon=r.forwardRef((function(e,t){var n=e.icon,i=void 0===n?"":n,c=o.__rest(e,["icon"]);return r.createElement("span",o.__assign({},c,{ref:t,dangerouslySetInnerHTML:{__html:i}}))}))},v1bN:function(e,t,n){e.exports={"tablet-small-breakpoint":"screen and (max-width: 419px)",item:"item-2xPVYue0",hovered:"hovered-1uf45E05",isDisabled:"isDisabled-1wLqKupj",isActive:"isActive-2j-GhQs_",shortcut:"shortcut-30pveiCO",toolbox:"toolbox-3ulPxfe-",withIcon:"withIcon-1xBjf-oB",icon:"icon-2Qm7YIcz",labelRow:"labelRow-3Q0rdE8-",label:"label-3Xqxy756",showOnHover:"showOnHover-1q6ySzZc"}},"x0D+":function(e,t,n){var o,r,i;r=[t],void 0===(i="function"==typeof(o=function(e){"use strict";function t(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t'},"01Ho":function(e,t){e.exports=''},"4Njr":function(e,t){e.exports=''},"4ZyK":function(e,t){e.exports=''},"4pMH":function(e,t,n){},"5ijr":function(e){e.exports=JSON.parse('{"switcherWrapper":"switcherWrapper-1wFH-_jm","size-small":"size-small-1gT-kZYO","size-large":"size-large-MOSirnj_","intent-select":"intent-select-2kut8F29","switcherThumbWrapper":"switcherThumbWrapper-2u191lDO","input":"input-J7QIcTTo","switcherTrack":"switcherTrack-2XruDVTa","intent-default":"intent-default-3soo5rvS","switcherThumb":"switcherThumb-2yuEucci","focus":"focus-uZMRkCO0"}')},"9FXF":function(e,t){e.exports=''},CHgb:function(e,t,n){"use strict";n.d(t,"c",(function(){return u})),n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return h}));var r=n("mrSG"),a=n("q1tI"),o=n.n(a),l=n("TSYQ"),i=n.n(l),s=n("H172"),c=n("Iivm"),p=n("+ByK");function u(e){var t=e.menuItemClassName,n=Object(r.__rest)(e,["menuItemClassName"]);return o.a.createElement(s.a,Object(r.__assign)({},n,{menuItemClassName:i()(t,p.itemWrap)}))}function d(e){return o.a.createElement("div",{className:i()(p.item,p.selected)},o.a.createElement(c.Icon,{className:p.icon,icon:e.icon}))}function h(e){return o.a.createElement("div",{className:p.item},o.a.createElement(c.Icon,{className:i()(p.icon,e.iconClassName),icon:e.icon}),o.a.createElement("div",{className:p.label},e.label))}},D2im:function(e,t){e.exports=''},Dj0x:function(e,t){e.exports=''}, +FzLb:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n("mrSG").__exportStar(n("j3s+"),t)},HWhk:function(e,t){e.exports=''},J4oI:function(e,t,n){e.exports={lineStyleSelect:"lineStyleSelect-1s1ap44b"}},KacW:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var r=n("mrSG"),a=(n("YFKU"),n("q1tI")),o=n.n(a),l=n("TSYQ"),i=n.n(l),s=n("8Uy/"),c=n("CHgb"),p=n("bQEj"),u=n("UXdH"),d=n("ZSM+"),h=n("J4oI"),m=[{type:s.LINESTYLE_SOLID,icon:p,label:window.t("Line")},{type:s.LINESTYLE_DASHED,icon:u,label:window.t("Dashed Line")},{type:s.LINESTYLE_DOTTED,icon:d,label:window.t("Dotted Line")}];var v=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(r.__extends)(t,e),t.prototype.render=function(){var e,t,n=this.props,a=n.lineStyle,l=n.className,s=n.lineStyleChange,p=n.disabled,u=n.additionalItems,d=n.allowedLineStyles,v=(e=d,t=Object(r.__spreadArrays)(m),void 0!==e&&(t=t.filter((function(t){return e.includes(t.type)}))),t.map((function(e){return{value:e.type,selectedContent:o.a.createElement(c.a,{icon:e.icon}),content:o.a.createElement(c.b,{icon:e.icon,label:e.label})}})));return u&&(v=Object(r.__spreadArrays)([{readonly:!0,content:u}],v)),o.a.createElement(c.c,{disabled:p,className:i()(h.lineStyleSelect,l),hideArrowButton:!0,items:v,value:a,onChange:s,"data-name":"line-style-select"})},t}(o.a.PureComponent)},Ly1u:function(e,t){e.exports=''},MB0Y:function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return d}));var r=n("mrSG"),a=n("q1tI"),o=n.n(a),l=n("TSYQ"),i=n.n(l),s=n("FzLb"),c=n("QpNh"),p=n("OP2o"),u=p;function d(e){var t=e.className,n=e.checked,a=e.id,l=e.label,u=e.labelDescription,d=e.value,h=e.preventLabelHighlight,m=e.reference,v=e.switchReference,y=e.theme,f=void 0===y?p:y,b=i()(f.label,n&&!h&&f.labelOn),g=i()(t,f.wrapper,n&&f.wrapperWithOnLabel);return o.a.createElement("label",{className:g,htmlFor:a,ref:m},o.a.createElement("div",{className:f.labelRow},o.a.createElement("div",{className:b},l),u&&o.a.createElement("div",{className:f.labelHint},u)),o.a.createElement(s.Switch,Object(r.__assign)({className:f.switch,reference:v,checked:n,onChange:function(t){var n=t.target.checked;void 0!==e.onChange&&e.onChange(n)},value:d,tabIndex:-1,id:a},Object(c.a)(e))))}},OP2o:function(e,t,n){e.exports={wrapper:"wrapper-3Sj-FzgR",hovered:"hovered-1G0yygIe",labelRow:"labelRow-3h7cSJ_L",label:"label-3iLxp29M",labelHint:"labelHint-3qxeiVfa",labelOn:"labelOn-10QGwv2n"}},UXdH:function(e,t){ +e.exports=''},UXjO:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n("mrSG"),a=n("q1tI"),o=n.n(a),l=n("TSYQ"),i=n.n(l),s=n("H172"),c=n("QpNh"),p=n("z1Uu");function u(e){var t,n=e.fontSize,a=e.fontSizes,l=void 0===a?[]:a,u=e.className,d=e.disabled,h=e.fontSizeChange;return o.a.createElement(s.a,Object(r.__assign)({disabled:d,className:i()(u,p.defaultSelect),menuClassName:p.defaultSelect,items:(t=l,t.map((function(e){return{value:e.value,content:e.title}}))),value:n,onChange:h},Object(c.a)(e)))}},V1YL:function(e,t,n){e.exports={recalculateCheckbox:"recalculateCheckbox-1Xa1TR7D",descriptionCell:"descriptionCell-3oIbGAm4"}},W7Dn:function(e,t,n){e.exports={scrollable:"scrollable-mKj9lAM_"}},Y5hB:function(e,t,n){"use strict";n.r(t);var r=n("mrSG"),a=(n("YFKU"),n("i8i4")),o=n("q1tI"),l=n.n(o),i=n("Eyy1"),s=(n("bSeV"),n("CLNU")),c=n("Vdly"),p=n("Kxc7"),u=n("FQhm"),d=n("JWMC"),h=n("aDg1"),m=n("vHME"),v=n("ycFu"),y=n("tWVy"),f=n("tmL0"),b=n("3ClC"),g=n("W7Dn"),w=function(e){function t(t){var n=e.call(this,t)||this;n._renderFooterLeft=function(e){var t=n.props,r=t.source,a=t.model;if(Object(b.isStudy)(r))return o.createElement(m.a,{model:a,source:r,mode:e?"compact":"normal"});throw new TypeError("Unsupported source type.")},n._handleSelect=function(e){n.setState({activeTabId:e},(function(){n._requestResize&&n._requestResize()})),n.props.onActiveTabChanged&&n.props.onActiveTabChanged(e)},n._handleScroll=function(){y.a.fire()},n._handleSubmit=function(){n.props.onSubmit(),n.props.onClose()};var r=n.props,a=r.pages,l=r.initialActiveTab;return n.state={activeTabId:a.allIds.includes(l)?l:a.allIds[0]},n}return Object(r.__extends)(t,e),t.prototype.render=function(){var e=this.props,t=e.title,n=e.onCancel,r=e.onClose,a=this.state.activeTabId;return o.createElement(v.a,{dataName:"indicator-properties-dialog",title:t,isOpened:!0,onSubmit:this._handleSubmit,onCancel:n,onClickOutside:r,onClose:r,footerLeftRenderer:this._renderFooterLeft,render:this._renderChildren(a),submitOnEnterKey:!1})},t.prototype._renderChildren=function(e){var t=this;return function(n){var r=n.requestResize;t._requestResize=r;var a=t.props,l=a.pages,i=a.source,s=a.model,c=l.byId[e];"Component"in c||c.page;return o.createElement(o.Fragment,null,o.createElement(h.a,{activeTabId:e,onSelect:t._handleSelect,tabs:l}),o.createElement(f.a,{className:g.scrollable,onScroll:t._handleScroll},"Component"in c&&o.createElement(c.Component,{source:i,model:s})))}},t}(o.PureComponent),_=n("PjdP"),C=n("HfwS"),S=n("HGyE"),E=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(r.__extends)(t,e),t.prototype.render=function(){var e=this.props,t=e.input,n=e.value,a=e.onChange,l=e.onBlur,i=e.onKeyDown,s=t.options.reduce((function(e,t){return e[t]="NONE"===t?window.t("Default"):t,e}),{}),c=Object(r.__assign)(Object(r.__assign)({},t),{optionsTitles:s});return o.createElement(S.b,{input:c, +value:n,onChange:a,onBlur:l,onKeyDown:i})},t}(o.PureComponent),x=Object(C.a)(E),P=n("h5Dg"),O=n("rJEJ"),j=n("XDrA"),k=n("+8gn"),L=n("Q+1u"),T=(n("HbRj"),o.createContext(null)),M=window.t("{currency} per order"),N=window.t("{currency} per contract"),I=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(r.__extends)(t,e),t.prototype.render=function(){var e,t=this.props.input,n=Object(i.ensureNotNull)(this.context),a=((e={}).percent="%",e.cash_per_order=M.format({currency:n}),e.cash_per_contract=N.format({currency:n}),e),l=Object(r.__assign)(Object(r.__assign)({},t),{optionsTitles:a});return o.createElement(S.a,{input:l})},t.contextType=T,t}(o.PureComponent),z=window.t("Contracts"),D=window.t("% of equity"),V=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(r.__extends)(t,e),t.prototype.render=function(){var e,t=this.props.input,n=Object(i.ensureNotNull)(this.context),a=((e={}).fixed=z,e.cash_per_order=n,e.percent_of_equity=D,e),l=Object(r.__assign)(Object(r.__assign)({},t),{optionsTitles:a});return o.createElement(S.a,{input:l})},t.contextType=T,t}(o.PureComponent),R=n("V1YL"),B=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(r.__extends)(t,e),t.prototype.render=function(){var e=this.props.inputs;return o.createElement(L.a,null,o.createElement(O.a,{label:window.t("Initial capital")},o.createElement(_.a,{input:e.initial_capital})),o.createElement(O.a,{label:window.t("Base currency")},o.createElement(x,{input:e.currency})),o.createElement(O.a,{label:window.t("Order size"),labelAlign:"adaptive"},o.createElement(j.a,null,o.createElement(_.a,{input:e.default_qty_value}),o.createElement(V,{input:e.default_qty_type}))),o.createElement(O.a,{label:window.t("Pyramiding")},o.createElement("span",null,o.createElement(_.a,{input:e.pyramiding})),o.createElement("span",{className:R.descriptionCell},window.t("orders",{context:"Pyramiding: count orders"}))),o.createElement(L.a.Separator,null),o.createElement(O.a,{label:window.t("Commission"),labelAlign:"adaptive"},o.createElement(j.a,null,o.createElement(_.a,{input:e.commission_value}),o.createElement(I,{input:e.commission_type}))),o.createElement(O.a,{label:window.t("Verify Price for Limit Orders")},o.createElement("span",null,o.createElement(_.a,{input:e.backtest_fill_limits_assumption})),o.createElement("span",{className:R.descriptionCell},window.t("ticks",{context:"slippage ... ticks"}))),o.createElement(O.a,{label:window.t("Slippage")},o.createElement("span",null,o.createElement(_.a,{input:e.slippage})),o.createElement("span",{className:R.descriptionCell},window.t("ticks",{context:"slippage ... ticks"}))),o.createElement(L.a.Separator,null),o.createElement(O.a,{label:window.t("Recalculate"),labelAlign:"top"},o.createElement("div",null,o.createElement("div",{className:R.recalculateCheckbox},o.createElement(P.a,{label:window.t("After Order is Filled"),input:e.calc_on_order_fills})),o.createElement("div",{className:R.recalculateCheckbox},o.createElement(P.a,{ +label:window.t("On Every Tick"),input:e.calc_on_every_tick})))))},t.contextType=k.b,t}(o.PureComponent);function H(e){var t=e.property,n=e.model,r=e.inputs,a=e.study;return o.createElement(k.a,{property:t.inputs,model:n,study:a},o.createElement(B,{inputs:r}))}var A,F=n("z61+"),W=n("txPx"),G=Object(W.getLogger)("Platform.GUI.PropertyDialog.Indicators.StrategyPage"),U=function(e){function t(t){var n=e.call(this,t)||this;n._handleWatchedDataChange=function(){n.setState({currency:n._getCurrency()})};var r=n.props.source;if(n._source=r,!Object(b.isStudy)(n._source))throw new TypeError("Strategy page works only for study.");n._properties=r.properties();var a=r.metaInfo(),o=new F.a(a);return n._inputs=o.getStrategyProperties(),n.state={currency:n._getCurrency()},n}return Object(r.__extends)(t,e),t.prototype.componentDidMount=function(){this._source.watchedData.subscribe(this._handleWatchedDataChange)},t.prototype.componentWillUnmount=function(){this._source.watchedData.unsubscribe(this._handleWatchedDataChange)},t.prototype.render=function(){return o.createElement(T.Provider,{value:this.state.currency},o.createElement(H,{inputs:this._inputs,property:this._properties,model:this.props.model,study:this.props.source}))},t.prototype._getCurrency=function(){var e=this._source.reportData();return null===e||void 0===e.currency?(void 0!==this.state&&null===this.state.currency||G.logWarn("Can't obtain currency from strategy report"),null):e.currency},t}(o.PureComponent),Y=n("5Ssy"),q=function(e){function t(t){var n=e.call(this,t)||this;return n._properties=n.props.source.properties(),n._inputs=new F.a(n.props.source.metaInfo()).getUserEditableInputs(),n}return Object(r.__extends)(t,e),t.prototype.render=function(){return o.createElement(Y.a,{property:this._properties,model:this.props.model,study:this.props.source,inputs:this._inputs})},t}(o.PureComponent),Q=n("23IT"),K=n("0YCj"),J=n.n(K),X=n("Z1Tk"),Z=n("S0KV"),$=window.t("Change Visibility"),ee=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._onChange=function(e){var n=t.context.setValue,r=t.props.visible;r&&Object(Z.b)(r,(function(t){return n(t,e,$)}))},t}return Object(r.__extends)(t,e),t.prototype.render=function(){var e=this.props,t=e.id,n=e.title,r=e.visible,a=e.disabled,l=Object(s.clean)(window.t(n,{context:"input"}),!0);return o.createElement(P.b,{label:l,disabled:a,input:{id:t,type:"bool",defval:!0,name:"visible"},value:!r||Object(Z.a)(r),onChange:this._onChange})},t.contextType=X.b,t}(o.PureComponent),te=n("KKsp"),ne=n("MB0Y"),re=n("CHgb"),ae=n("xHjM"),oe=n("/YRR"),le=n("rlj/"),ie=n("ZtdB"),se=n("D2im"),ce=n("tH7p"),pe=n("tQCG"),ue=n("9FXF"),de=n("sPU+"),he=((A={})[Q.LineStudyPlotStyle.Line]={type:Q.LineStudyPlotStyle.Line,order:0,icon:ae,label:window.t("Line")},A[Q.LineStudyPlotStyle.LineWithBreaks]={type:Q.LineStudyPlotStyle.LineWithBreaks,order:1,icon:oe,label:window.t("Line With Breaks")},A[Q.LineStudyPlotStyle.StepLine]={type:Q.LineStudyPlotStyle.StepLine,order:2,icon:le,label:window.t("Step Line")},A[Q.LineStudyPlotStyle.Histogram]={ +type:Q.LineStudyPlotStyle.Histogram,order:3,icon:ie,label:window.t("Histogram")},A[Q.LineStudyPlotStyle.Cross]={type:Q.LineStudyPlotStyle.Cross,order:4,icon:se,label:window.t("Cross",{context:"chart_type"})},A[Q.LineStudyPlotStyle.Area]={type:Q.LineStudyPlotStyle.Area,order:5,icon:ce,label:window.t("Area")},A[Q.LineStudyPlotStyle.AreaWithBreaks]={type:Q.LineStudyPlotStyle.AreaWithBreaks,order:6,icon:pe,label:window.t("Area With Breaks")},A[Q.LineStudyPlotStyle.Columns]={type:Q.LineStudyPlotStyle.Columns,order:7,icon:ue,label:window.t("Columns")},A[Q.LineStudyPlotStyle.Circles]={type:Q.LineStudyPlotStyle.Circles,order:8,icon:de,label:window.t("Circles")},A),me=Object.values(he).sort((function(e,t){return e.order-t.order})).map((function(e){return{value:e.type,selectedContent:l.a.createElement(re.a,{icon:e.icon}),content:l.a.createElement(re.b,{icon:e.icon,label:e.label})}})),ve=window.t("Price Line"),ye=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(r.__extends)(t,e),t.prototype.render=function(){var e=this.props,t=e.plotType,n=e.className,a=e.priceLine,o=e.plotTypeChange,i=e.priceLineChange,s=e.disabled,c={readonly:!0,content:l.a.createElement(l.a.Fragment,null,l.a.createElement(ne.b,{id:"PlotTypePriceLineSwitch",checked:a,label:ve,preventLabelHighlight:!0,value:"priceLineSwitcher",onChange:i}),l.a.createElement(te.a,null))};return l.a.createElement(re.c,{disabled:s,className:n,hideArrowButton:!0,items:Object(r.__spreadArrays)([c],me),value:t,onChange:o})},t}(l.a.PureComponent),fe=n("lkVX"),be=n("wwEg"),ge=window.t("Change Plot Type"),we=window.t("Change Price Line"),_e=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._onPlotTypeChange=function(e){var n=t.context.setValue,r=t.props.styleProp.plottype;r&&n(r,e,ge)},t._onPriceLineChange=function(e){var n=t.context.setValue,r=t.props.styleProp.trackPrice;r&&n(r,e,we)},t}return Object(r.__extends)(t,e),t.prototype.render=function(){var e=this.props,t=e.paletteColor,n=e.paletteColorProps,r=e.styleProp,a=e.isLine,l=e.hasPlotTypeSelect,i=e.grouped,s=n.childs();return o.createElement(O.a,{grouped:i,label:o.createElement("div",{className:be.childRowContainer},window.t(t.name,{context:"input"}))},o.createElement(fe.a,{disabled:!r.visible.value(),color:s.color,transparency:r.transparency,thickness:a?s.width:void 0,isPaletteColor:!0}),a&&l&&r.plottype&&r.trackPrice?o.createElement(ye,{disabled:!r.visible.value(),className:be.smallStyleControl,plotType:r.plottype.value(),priceLine:r.trackPrice.value(),plotTypeChange:this._onPlotTypeChange,priceLineChange:this._onPriceLineChange}):null)},t.contextType=X.b,t}(o.PureComponent);var Ce=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(r.__extends)(t,e),t.prototype.render=function(){var e=this.props,t=e.plot,n=e.area,r=e.palette,a=e.paletteProps,l=e.hideVisibilitySwitch,s=e.styleProp,c=t?t.id:Object(i.ensureDefined)(n).id,p=!c.startsWith("fill")&&t&&Object(Q.isLinePlot)(t) +;return o.createElement(o.Fragment,null,!l&&o.createElement(L.a.Row,null,o.createElement(L.a.Cell,{placement:"first",colSpan:2,grouped:!0},o.createElement(ee,{id:c,title:n?n.title:s.title.value(),visible:s.visible}))),function(e,t,n,r){var a=e.colors,l=t.colors;return Object.keys(a).map((function(e,t){return o.createElement(_e,{key:e,grouped:!0,paletteColor:Object(i.ensureDefined)(a[e]),paletteColorProps:Object(i.ensureDefined)(l[e]),styleProp:n,isLine:r,hasPlotTypeSelect:0===t})}))}(r,a,s,p),o.createElement(L.a.GroupSeparator,null))},t.contextType=X.b,t}(o.PureComponent),Se=window.t("Change Plot Type"),Ee=window.t("Change Price Line"),xe=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._onPlotTypeChange=function(e){var n=t.context.setValue,r=t.props.property.plottype;r&&n(r,e,Se)},t._onPriceLineChange=function(e){var n=t.context.setValue,r=t.props.property.trackPrice;r&&n(r,e,Ee)},t}return Object(r.__extends)(t,e),t.prototype.render=function(){var e=this.props,t=e.id,n=e.property,r=n.title,a=n.color,l=n.plottype,i=n.linewidth,s=n.transparency,c=n.trackPrice,p=n.visible;return o.createElement(O.a,{label:o.createElement(ee,{id:t,title:r.value(),visible:p})},o.createElement(fe.a,{disabled:!p.value(),color:a,transparency:s,thickness:i}),o.createElement(ye,{disabled:!p.value(),className:be.smallStyleControl,plotType:l.value(),priceLine:c.value(),plotTypeChange:this._onPlotTypeChange,priceLineChange:this._onPriceLineChange}))},t.contextType=X.b,t}(o.PureComponent),Pe=o.createContext(null),Oe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(r.__extends)(t,e),t.prototype.render=function(){var e=this.props,t=e.id,n=e.property,r=n.colorup,a=n.colordown,l=n.transparency,s=n.visible;return o.createElement(Pe.Consumer,null,(function(e){return o.createElement(O.a,{label:o.createElement(ee,{id:t,title:je(Object(i.ensureNotNull)(e),t),visible:s})},o.createElement(fe.a,{disabled:!s.value(),color:r,transparency:l}),o.createElement("span",{className:be.additionalSelect},o.createElement(fe.a,{disabled:!s.value(),color:a,transparency:l})))}))},t.contextType=X.b,t}(o.PureComponent);function je(e,t){var n=Object(i.ensureDefined)(e.metaInfo().styles),r=Object(i.ensureDefined)(n[t]).title;return Object(i.ensureDefined)(r)}var ke,Le,Te=n("/SnT"),Me=n.n(Te),Ne=n("TSYQ"),Ie=n.n(Ne),ze=n("3G1X"),De=n("H172"),Ve=n("972a"),Re=((ke={})[Ve.MarkLocation.AboveBar]={value:Ve.MarkLocation.AboveBar,content:window.t("Above Bar"),order:0},ke[Ve.MarkLocation.BelowBar]={value:Ve.MarkLocation.BelowBar,content:window.t("Below Bar"),order:1},ke[Ve.MarkLocation.Top]={value:Ve.MarkLocation.Top,content:window.t("Top"),order:2},ke[Ve.MarkLocation.Bottom]={value:Ve.MarkLocation.Bottom,content:window.t("Bottom"),order:3},ke[Ve.MarkLocation.Absolute]={value:Ve.MarkLocation.Absolute,content:window.t("Absolute"),order:4},ke),Be=Object.values(Re).sort((function(e,t){return e.order-t.order})),He=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(r.__extends)(t,e), +t.prototype.render=function(){var e=this.props,t=e.shapeLocation,n=e.className,r=e.menuItemClassName,a=e.shapeLocationChange,l=e.disabled;return o.createElement(De.a,{disabled:l,className:n,menuItemClassName:r,items:Be,value:t,onChange:a})},t}(o.PureComponent),Ae=window.t("Change Char"),Fe=window.t("Change Location"),We=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._onCharChange=function(e){var n=t.context.setValue,r=e.currentTarget.value.trim(),a=Me()(r),o=0===a.length?"":a[a.length-1];n(t.props.property.char,o,Ae)},t._onLocationChange=function(e){(0,t.context.setValue)(t.props.property.location,e,Fe)},t}return Object(r.__extends)(t,e),t.prototype.render=function(){var e=this.props,t=e.id,n=e.property,r=n.title,a=n.color,l=n.transparency,i=n.char,s=n.location,c=n.visible,p=e.hasPalette;return o.createElement(O.a,{grouped:p,label:o.createElement(ee,{id:t,title:r.value(),visible:c})},!p&&o.createElement(fe.a,{disabled:!c.value(),color:a,transparency:l}),o.createElement(ze.a,{disabled:!c.value(),className:be.smallStyleControl,value:i.value(),onChange:this._onCharChange}),o.createElement(He,{disabled:!c.value(),className:Ne(be.defaultSelect,be.additionalSelect),menuItemClassName:be.defaultSelectItem,shapeLocation:s.value(),shapeLocationChange:this._onLocationChange}))},t.contextType=X.b,t}(o.PureComponent),Ge=n("Nu4p"),Ue=n("4Njr"),Ye=n("lOpG"),qe=n("br6c"),Qe=n("m+Gx"),Ke=n("01Ho"),Je=n("4ZyK"),Xe=n("kMtk"),Ze=n("Dj0x"),$e=n("Ly1u"),et=n("leq5"),tt=n("flzi"),nt=n("iB0j"),rt=((Le={}).arrow_down=Ue,Le.arrow_up=Ye,Le.circle=qe,Le.cross=Qe,Le.diamond=Ke,Le.flag=Je,Le.label_down=Xe,Le.label_up=Ze,Le.square=$e,Le.triangle_down=et,Le.triangle_up=tt,Le.x_cross=nt,Le);function at(e){return rt[e]}var ot=[];Object.keys(Ge.plotShapesData).forEach((function(e){var t=Ge.plotShapesData[e];ot.push({value:t.id,selectedContent:l.a.createElement(re.a,{icon:at(t.icon)}),content:l.a.createElement(re.b,{icon:at(t.icon),label:t.guiName})})}));var lt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(r.__extends)(t,e),t.prototype.render=function(){var e=this.props,t=e.shapeStyleId,n=e.className,r=e.shapeStyleChange,a=e.disabled;return l.a.createElement(re.c,{disabled:a,className:n,hideArrowButton:!0,items:ot,value:t,onChange:r})},t}(l.a.PureComponent),it=window.t("Change Shape"),st=window.t("Change Location"),ct=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._onPlotTypeChange=function(e){(0,t.context.setValue)(t.props.property.plottype,e,it)},t._onLocationChange=function(e){(0,t.context.setValue)(t.props.property.location,e,st)},t}return Object(r.__extends)(t,e),t.prototype.render=function(){var e=this.props,t=e.id,n=e.hasPalette,r=e.property,a=r.title,l=r.color,i=r.transparency,s=r.plottype,c=r.location,p=r.visible;return o.createElement(O.a,{grouped:n,label:o.createElement(ee,{id:t,title:a.value(),visible:p})},!n&&o.createElement(fe.a,{disabled:!p.value(),color:l,transparency:i}),o.createElement(lt,{disabled:!p.value(), +className:be.smallStyleControl,shapeStyleId:s.value(),shapeStyleChange:this._onPlotTypeChange}),o.createElement(He,{disabled:!p.value(),className:Ne(be.defaultSelect,be.additionalSelect),menuItemClassName:be.defaultSelectItem,shapeLocation:c.value(),shapeLocationChange:this._onLocationChange}))},t.contextType=X.b,t}(o.PureComponent),pt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(r.__extends)(t,e),t.prototype.render=function(){var e=this.props,t=e.id,n=e.title,r=e.visible,a=e.color,l=e.transparency,i=e.thickness,s=e.children,c=e.switchable,p=void 0===c||c;return o.createElement(O.a,{label:p?o.createElement(ee,{id:t,title:n,visible:r}):n},o.createElement(fe.a,{disabled:r&&!(Array.isArray(r)?r[0].value():r.value()),color:a,transparency:l,thickness:i}),s)},t.contextType=X.b,t}(o.PureComponent),ut=Object(W.getLogger)("Chart.Study.PropertyPage"),dt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(r.__extends)(t,e),t.prototype.render=function(){var e=this.props,t=e.plot,n=e.palette,r=e.paletteProps,a=e.study,l=t.id,s=a.properties().styles[l],c=t.type;if("line"===c||"bar_colorer"===c||"bg_colorer"===c)return n&&r?o.createElement(Ce,{plot:t,palette:n,paletteProps:r,styleProp:s}):o.createElement(xe,{id:l,property:s});if("arrows"===c)return o.createElement(Oe,{id:l,property:s});if("chars"===c||"shapes"===c)return o.createElement(o.Fragment,null,"chars"===c?o.createElement(We,{id:l,property:s,hasPalette:Boolean(n)}):o.createElement(ct,{id:l,property:s,hasPalette:Boolean(n)}),n&&r&&o.createElement(Ce,{plot:t,palette:n,paletteProps:r,hideVisibilitySwitch:!0,styleProp:s}));if(Object(Q.isOhlcPlot)(t)){var p=t.target,u=Object(i.ensureDefined)(a.metaInfo().defaults.ohlcPlots)[p],d=a.properties().ohlcPlots[p],h=void 0;h=n&&r?o.createElement(Ce,{plot:t,palette:n,paletteProps:r,styleProp:d}):o.createElement(pt,{id:p,title:d.title.value(),color:d.color,visible:d.visible,transparency:d.transparency});var m=void 0;return void 0!==u&&Object(Q.isOhlcPlotStyleCandles)(u)&&(m=o.createElement(o.Fragment,null,o.createElement(pt,{id:p,title:window.t("Wick"),visible:d.drawWick,color:d.wickColor,transparency:d.transparency}),o.createElement(pt,{id:p,title:window.t("Border"),visible:d.drawBorder,color:d.borderColor,transparency:d.transparency}))),o.createElement(o.Fragment,null,h,m)}return ut.logError("Unknown plot type: "+c),null},t}(o.PureComponent),ht=n("YS4w"),mt=n("KacW"),vt=window.t("Change Line Style"),yt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._onLineStyleChange=function(e){(0,t.context.setValue)(t.props.lineStyle,e,vt)},t}return Object(r.__extends)(t,e),t.prototype.render=function(){var e=this.props,t=e.lineStyle,n=Object(r.__rest)(e,["lineStyle"]);return l.a.createElement(mt.a,Object(r.__assign)({},n,{lineStyle:t.value(),lineStyleChange:this._onLineStyleChange}))},t.contextType=X.b,t}(l.a.PureComponent),ft=window.t("Change Value"),bt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this +;return t._onValueChange=function(e){(0,t.context.setValue)(t.props.property.value,e,ft)},t}return Object(r.__extends)(t,e),t.prototype.render=function(){var e=this.props,t=e.id,n=e.property,r=n.name,a=n.color,l=n.linestyle,i=n.linewidth,s=n.transparency,c=n.value,p=n.visible;return o.createElement(O.a,{labelAlign:"adaptive",label:o.createElement(ee,{id:t,title:r.value(),visible:p})},o.createElement("div",{className:be.block},o.createElement("div",{className:be.group},o.createElement(fe.a,{disabled:!p.value(),color:a,transparency:s,thickness:i}),o.createElement(yt,{disabled:!p.value(),className:be.smallStyleControl,lineStyle:l})),o.createElement("div",{className:Ne(be.wrapGroup,be.defaultSelect,be.additionalSelect)},o.createElement(ht.b,{input:{id:"",name:"",type:"float",defval:0},value:c.value(),disabled:!p.value(),onChange:this._onValueChange}))))},t.contextType=X.b,t}(o.PureComponent),gt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(r.__extends)(t,e),t.prototype.render=function(){var e=this.props.orders,t=e.visible,n=e.showLabels,r=e.showQty;return o.createElement(o.Fragment,null,o.createElement(L.a.Row,null,o.createElement(L.a.Cell,{placement:"first",colSpan:2},o.createElement(ee,{id:"chart-orders-switch",title:window.t("Trades on Chart"),visible:t}))),o.createElement(L.a.Row,null,o.createElement(L.a.Cell,{placement:"first",colSpan:2},o.createElement(ee,{id:"chart-orders-labels-switch",title:window.t("Signal Labels"),visible:n}))),o.createElement(L.a.Row,null,o.createElement(L.a.Cell,{placement:"first",colSpan:2},o.createElement(ee,{id:"chart-orders-qty-switch",title:window.t("Quantity"),visible:r}))))},t.contextType=X.b,t}(o.PureComponent),wt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(r.__extends)(t,e),t.prototype.render=function(){var e=this.props.title,t=this.props.property.childs(),n=t.color,r=t.transparency,a=t.width,l=t.style,i=t.visible;return o.createElement(O.a,{label:o.createElement(ee,{id:e.value(),title:e.value(),visible:i})},o.createElement(fe.a,{disabled:!i.value(),color:n,transparency:r,thickness:a}),o.createElement(yt,{disabled:!i.value(),className:be.smallStyleControl,lineStyle:l}))},t.contextType=X.b,t}(o.PureComponent),_t=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(r.__extends)(t,e),t.prototype.render=function(){var e=this.props,t=e.graphicType,n=e.study,r=n.metaInfo().graphics,a=n.properties().graphics,l=Object(i.ensureDefined)(r[t]);return Object.keys(l).map((function(e,n){var r=a[t][e];return"horizlines"===t||"vertlines"===t||"lines"===t?o.createElement(wt,{key:e,title:"lines"===t?r.title:r.name,property:r}):null}))},t}(o.PureComponent),Ct=window.t("Change Font"),St=["Verdana","Courier New","Times New Roman","Arial"].map((function(e){return{value:e,content:e}})),Et=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._onFontFamilyChange=function(e){(0,t.context.setValue)(t.props.fontFamily,e,Ct)},t}return Object(r.__extends)(t,e), +t.prototype.render=function(){var e=this.props,t=e.fontFamily,n=e.className,r=e.disabled;return o.createElement(De.a,{disabled:r,className:Ie()(n,be.defaultSelect),menuItemClassName:be.defaultSelectItem,items:St,value:t.value(),onChange:this._onFontFamilyChange})},t.contextType=X.b,t}(o.PureComponent),xt=n("UXjO"),Pt=window.t("Change Font Size"),Ot=[10,11,12,14,16,20,24,28,32,40].map((function(e){return{value:e,title:e.toString()}})),jt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._onFontSizeChange=function(e){(0,t.context.setValue)(t.props.fontSize,e,Pt)},t}return Object(r.__extends)(t,e),t.prototype.render=function(){var e=this.props,t=e.fontSize,n=Object(r.__rest)(e,["fontSize"]);return o.createElement(xt.a,Object(r.__assign)({},n,{fontSizes:Ot,fontSize:t.value(),fontSizeChange:this._onFontSizeChange}))},t.contextType=X.b,t}(o.PureComponent),kt=window.t("Change Visibility"),Lt=window.t("Labels Font"),Tt=window.t("Show Labels"),Mt={Traditional:new Set(["S5/R5","S4/R4","S3/R3","S2/R2","S1/R1","P"]),Fibonacci:new Set(["S3/R3","S2/R2","S1/R1","P"]),Woodie:new Set(["S4/R4","S3/R3","S2/R2","S1/R1","P"]),Classic:new Set(["S4/R4","S3/R3","S2/R2","S1/R1","P"]),DM:new Set(["S1/R1","P"]),DeMark:new Set(["S1/R1","P"]),Camarilla:new Set(["S4/R4","S3/R3","S2/R2","S1/R1","P"])},Nt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._onChange=function(e){(0,t.context.setValue)(t.props.property.childs().levelsStyle.childs().showLabels,e,kt)},t}return Object(r.__extends)(t,e),t.prototype.render=function(){var e=this.props.property.childs(),t=e.font,n=e.fontsize,r=e.levelsStyle;return l.a.createElement(l.a.Fragment,null,l.a.createElement(O.a,{labelAlign:"adaptive",label:l.a.createElement("span",null,Lt)},l.a.createElement("div",{className:be.block},l.a.createElement("div",{className:be.group},l.a.createElement(Et,{fontFamily:t})),l.a.createElement("div",{className:Ne(be.wrapGroup,be.additionalSelect)},l.a.createElement(jt,{fontSize:n})))),l.a.createElement(L.a.Row,null,l.a.createElement(L.a.Cell,{placement:"first",colSpan:2},l.a.createElement(P.b,{label:Tt,input:{id:"ShowLabels",type:"bool",defval:!0,name:"visible"},value:r.childs().showLabels.value(),onChange:this._onChange}))),this._renderColors())},t.prototype._renderColors=function(){var e=this.props.property.childs(),t=e.levelsStyle,n=e.inputs,r=t.childs(),a=r.colors,o=r.widths,s=r.visibility,c=n.childs().kind,p=Object(i.ensureDefined)(Mt[c.value()]);return a.childNames().filter((function(e){return p.has(e)})).map((function(e){return l.a.createElement(pt,{key:e,id:e,title:e,color:a.childs()[e],visible:s.childs()[e],thickness:o.childs()[e]})}))},t.contextType=X.b,t}(l.a.PureComponent);for(var It=n("KJt4"),zt={PivotPointsStandard:function(){var e=Object(i.ensureNotNull)(Object(o.useContext)(Pe)).properties();return l.a.createElement(Nt,{property:e})}},Dt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(r.__extends)(t,e),t.prototype.render=function(){ +var e=this,t=Object(i.ensureNotNull)(this.context);return o.createElement(Pe.Consumer,null,(function(n){return o.createElement(X.a,{property:Object(i.ensureNotNull)(n).properties(),model:t},o.createElement(L.a,null,e._renderCustomContent(Object(i.ensureNotNull)(n).metaInfo().shortId)))}))},t.prototype._renderCustomContent=function(e){if(e in zt){var t=zt[e];return o.createElement(t,null)}return null},t.contextType=It.a,t}(o.PureComponent),Vt=n("Ecpn"),Rt=window.t("Default"),Bt=window.t("Precision"),Ht=window.t("Change Precision"),At=[{value:"default",content:Rt}],Ft=0;Ft<=8;Ft++)At.push({value:Ft,content:Ft.toString()});for(var Wt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._onChange=function(e){(0,t.context.setValue)(t.props.precision,e,Ht)},t}return Object(r.__extends)(t,e),t.prototype.render=function(){var e=this.props.precision;return o.createElement(O.a,{label:Bt},o.createElement(De.a,{className:be.defaultSelect,menuItemClassName:be.defaultSelectItem,items:At,value:e.value(),onChange:this._onChange}))},t.contextType=X.b,t}(o.PureComponent),Gt=window.t("Default"),Ut=window.t("Override Min Tick"),Yt=window.t("Change Min Tick"),qt=[{priceScale:1,minMove:1,frac:!1},{priceScale:10,minMove:1,frac:!1},{priceScale:100,minMove:1,frac:!1},{priceScale:1e3,minMove:1,frac:!1},{priceScale:1e4,minMove:1,frac:!1},{priceScale:1e5,minMove:1,frac:!1},{priceScale:1e6,minMove:1,frac:!1},{priceScale:1e7,minMove:1,frac:!1},{priceScale:1e8,minMove:1,frac:!1},{priceScale:2,minMove:1,frac:!0},{priceScale:4,minMove:1,frac:!0},{priceScale:8,minMove:1,frac:!0},{priceScale:16,minMove:1,frac:!0},{priceScale:32,minMove:1,frac:!0},{priceScale:64,minMove:1,frac:!0},{priceScale:128,minMove:1,frac:!0},{priceScale:320,minMove:1,frac:!0}],Qt=[{value:"default",content:Gt}],Kt=0;Kt0,f=Object(Zt.a)(t).canOverrideMinTick();return o.createElement(L.a,null,a.map((function(n){var a=Object(Q.isOhlcPlot)(n)?Object(r.__assign)(Object(r.__assign)({},n),{id:n.target}):n,l=e._findPlotPalette(a),i=l.palette,s=l.paletteProps;return o.createElement(dt,{key:n.id,plot:n,palette:i,paletteProps:s,study:t})})),s&&s.childNames().map((function(e,t){var n=s.child(e);if(!n.isHidden||!n.isHidden.value())return o.createElement(bt,{key:t,id:n.name.value(),property:n})})),c&&o.createElement(pt,{id:"bandsBackground",title:"Background",visible:c.fillBackground,color:c.backgroundColor,transparency:c.transparency}),p&&o.createElement(pt,{id:"areaBackground",title:"Background",visible:p.fillBackground,color:p.backgroundColor,transparency:p.transparency}),m&&m.map((function(n){if(!n.isHidden){var r=t.properties().filledAreasStyle[n.id],a=n.title||"Background";if(n.palette){var l=e._findPaletteByTargetId(n.id);return o.createElement(Ce,{key:n.id,area:n,palette:Object(i.ensureDefined)(l.palette),paletteProps:Object(i.ensureDefined)(l.paletteProps),styleProp:r})}return o.createElement(pt,{key:n.id,id:n.id,title:a,color:r.color,visible:r.visible,transparency:r.transparency})}})),v&&Object.keys(v).map((function(e,n){return o.createElement(_t,{key:e,graphicType:e,study:t})})),y&&o.createElement(Wt,{precision:u}),f&&o.createElement(Xt,{minTick:h}),J.a.isScriptStrategy(n)&&o.createElement(gt,{orders:d.orders}))},t.prototype._findPaletteByTargetId=function(e){for(var t=this.props.study,n=t.metaInfo(),r=n.plots,a=Object(i.ensureDefined)(n.palettes),o=0,l=r;o'},ZtdB:function(e,t){e.exports=''}, +bQEj:function(e,t){e.exports=''},br6c:function(e,t){e.exports=''},flzi:function(e,t){e.exports=''},iB0j:function(e,t){e.exports=''},"j3s+":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Switch=void 0;var r=n("mrSG"),a=n("q1tI"),o=n("TSYQ"),l=n("5ijr");function i(e){var t=e.className,n=void 0===t?"":t,r=e.intent,a=void 0===r?"default":r,i=e.size,s=void 0===i?"small":i,c=e.disabled;return o(n,l.switcherWrapper,l["size-"+s],!c&&l["intent-"+a])}n("4pMH");var s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.prototype.render=function(){var e=this.props,t=e.reference,n=(e.size,e.intent,r.__rest(e,["reference","size","intent"])),s=o(l.input,-1!==this.props.tabIndex&&l.focus);return a.createElement("div",{className:i(this.props)},a.createElement("input",r.__assign({},n,{type:"checkbox",className:s,ref:t})),a.createElement("div",{className:l.switcherThumbWrapper},a.createElement("div",{className:l.switcherTrack}),a.createElement("div",{className:l.switcherThumb})))},t}(a.PureComponent);t.Switch=s},kMtk:function(e,t){e.exports=''},lOpG:function(e,t){e.exports=''},leq5:function(e,t){e.exports=''},"m+Gx":function(e,t){e.exports=''},"rlj/":function(e,t){e.exports=''},"sPU+":function(e,t){e.exports=''},tH7p:function(e,t){ +e.exports=''},tQCG:function(e,t){e.exports=''},wwEg:function(e,t,n){e.exports={smallStyleControl:"smallStyleControl-1XGqoHgA",additionalSelect:"additionalSelect-1RoWzlTA",childRowContainer:"childRowContainer-_iCnmDPI",defaultSelect:"defaultSelect-DeTJWnAh",defaultSelectItem:"defaultSelectItem-1jN74NCa",block:"block-3Tp_jRog",group:"group-2HQIdqE5",wrapGroup:"wrapGroup-3gHGJIrr",textMarkGraphicBlock:"textMarkGraphicBlock-1nDopgxR",textMarkGraphicWrapGroup:"textMarkGraphicWrapGroup-3QaIoY03"}},xHjM:function(e,t){e.exports=''},z1Uu:function(e,t,n){e.exports={defaultSelect:"defaultSelect-2RDyqwu4"}}}]); \ No newline at end of file diff --git a/public/charting_library/bundles/react.5c26d836993909a1b0b6.js b/public/charting_library/bundles/react.5c26d836993909a1b0b6.js new file mode 100644 index 00000000..992945b8 --- /dev/null +++ b/public/charting_library/bundles/react.5c26d836993909a1b0b6.js @@ -0,0 +1,40 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([["react"],{"+wdc":function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n=null,r=!1,l=3,i=-1,o=-1,a=!1,u=!1;function c(){if(!a){var e=n.expirationTime;u?T():u=!0,w(d,e)}}function s(){var e=n,t=n.next;if(n===t)n=null;else{var r=n.previous;n=r.next=t,t.previous=r}e.next=e.previous=null,r=e.callback,t=e.expirationTime,e=e.priorityLevel;var i=l,a=o;l=e,o=t;try{var u=r()}finally{l=i,o=a}if("function"==typeof u)if(u={callback:u,priorityLevel:e,expirationTime:t,next:null,previous:null},null===n)n=u.next=u.previous=u;else{r=null,e=n;do{if(e.expirationTime>=t){r=e;break}e=e.next}while(e!==n);null===r?r=n:r===n&&(n=u,c()),(t=r.previous).next=r.previous=u,u.next=r,u.previous=t}}function f(){if(-1===i&&null!==n&&1===n.priorityLevel){a=!0;try{do{s()}while(null!==n&&1===n.priorityLevel)}finally{a=!1,null!==n?c():u=!1}}}function d(e){a=!0;var l=r;r=e;try{if(e)for(;null!==n;){var i=t.unstable_now();if(!(n.expirationTime<=i))break;do{s()}while(null!==n&&n.expirationTime<=i)}else if(null!==n)do{s()}while(null!==n&&!S())}finally{a=!1,r=l,null!==n?c():u=!1,f()}}var p,m,h=Date,y="function"==typeof setTimeout?setTimeout:void 0,v="function"==typeof clearTimeout?clearTimeout:void 0,g="function"==typeof requestAnimationFrame?requestAnimationFrame:void 0,b="function"==typeof cancelAnimationFrame?cancelAnimationFrame:void 0;function k(e){p=g((function(t){v(m),e(t)})),m=y((function(){b(p),e(t.unstable_now())}),100)}if("object"==typeof performance&&"function"==typeof performance.now){var x=performance;t.unstable_now=function(){return x.now()}}else t.unstable_now=function(){return h.now()};var w,T,S,_=null;if("undefined"!=typeof window?_=window:void 0!==e&&(_=e),_&&_._schedMock){var C=_._schedMock;w=C[0],T=C[1],S=C[2],t.unstable_now=C[3]}else if("undefined"==typeof window||"function"!=typeof MessageChannel){var E=null,P=function(e){if(null!==E)try{E(e)}finally{E=null}};w=function(e){null!==E?setTimeout(w,0,e):(E=e,setTimeout(P,0,!1))},T=function(){E=null},S=function(){return!1}}else{"undefined"!=typeof console&&("function"!=typeof g&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!=typeof b&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"));var N=null,O=!1,R=-1,z=!1,M=!1,I=0,U=33,D=33;S=function(){return I<=t.unstable_now()};var F=new MessageChannel,L=F.port2;F.port1.onmessage=function(){O=!1;var e=N,n=R;N=null,R=-1;var r=t.unstable_now(),l=!1;if(0>=I-r){if(!(-1!==n&&n<=r))return z||(z=!0,k(A)),N=e,void(R=n);l=!0}if(null!==e){M=!0;try{e(l)}finally{M=!1}}};var A=function(e){if(null!==N){k(A);var t=e-I+D;tt&&(t=8),D=tt?L.postMessage(void 0):z||(z=!0,k(A))},T=function(){N=null,O=!1,R=-1}}t.unstable_ImmediatePriority=1, +t.unstable_UserBlockingPriority=2,t.unstable_NormalPriority=3,t.unstable_IdlePriority=5,t.unstable_LowPriority=4,t.unstable_runWithPriority=function(e,n){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var r=l,o=i;l=e,i=t.unstable_now();try{return n()}finally{l=r,i=o,f()}},t.unstable_next=function(e){switch(l){case 1:case 2:case 3:var n=3;break;default:n=l}var r=l,o=i;l=n,i=t.unstable_now();try{return e()}finally{l=r,i=o,f()}},t.unstable_scheduleCallback=function(e,r){var o=-1!==i?i:t.unstable_now();if("object"==typeof r&&null!==r&&"number"==typeof r.timeout)r=o+r.timeout;else switch(l){case 1:r=o+-1;break;case 2:r=o+250;break;case 5:r=o+1073741823;break;case 4:r=o+1e4;break;default:r=o+5e3}if(e={callback:e,priorityLevel:l,expirationTime:r,next:null,previous:null},null===n)n=e.next=e.previous=e,c();else{o=null;var a=n;do{if(a.expirationTime>r){o=a;break}a=a.next}while(a!==n);null===o?o=n:o===n&&(n=e,c()),(r=o.previous).next=o.previous=e,e.next=o,e.previous=r}return e},t.unstable_cancelCallback=function(e){var t=e.next;if(null!==t){if(t===e)n=null;else{e===n&&(n=t);var r=e.previous;r.next=t,t.previous=r}e.next=e.previous=null}},t.unstable_wrapCallback=function(e){var n=l;return function(){var r=l,o=i;l=n,i=t.unstable_now();try{return e.apply(this,arguments)}finally{l=r,i=o,f()}}},t.unstable_getCurrentPriorityLevel=function(){return l},t.unstable_shouldYield=function(){return!r&&(null!==n&&n.expirationTimeM.length&&M.push(e)}function D(e,t,n){return null==e?0:function e(t,n,r,l){var a=typeof t;"undefined"!==a&&"boolean"!==a||(t=null);var u=!1;if(null===t)u=!0;else switch(a){case"string":case"number":u=!0;break;case"object":switch(t.$$typeof){case i:case o:u=!0}}if(u)return r(l,t,""===n?"."+F(t,0):n),1;if(u=0,n=""===n?".":n+":",Array.isArray(t))for(var c=0;cthis.eventPool.length&&this.eventPool.push(e)}function pe(e){e.eventPool=[],e.getPooled=fe,e.release=de}l(se.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=ue)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=ue)},persist:function(){this.isPersistent=ue},isPersistent:ce,destructor:function(){var e,t=this.constructor.Interface;for(e in t)this[e]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null,this.isPropagationStopped=this.isDefaultPrevented=ce,this._dispatchInstances=this._dispatchListeners=null}}),se.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null},se.extend=function(e){function t(){}function n(){return r.apply(this,arguments)}var r=this;t.prototype=r.prototype;var i=new t;return l(i,n.prototype),n.prototype=i,n.prototype.constructor=n,n.Interface=l({},r.Interface,e),n.extend=r.extend,pe(n),n},pe(se);var me=se.extend({data:null}),he=se.extend({data:null}),ye=[9,13,27,32],ve=q&&"CompositionEvent"in window,ge=null;q&&"documentMode"in document&&(ge=document.documentMode);var be=q&&"TextEvent"in window&&!ge,ke=q&&(!ve||ge&&8=ge),xe=String.fromCharCode(32),we={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},Te=!1;function Se(e,t){switch(e){case"keyup":return-1!==ye.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode +;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function _e(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Ce=!1;var Ee={eventTypes:we,extractEvents:function(e,t,n,r){var l=void 0,i=void 0;if(ve)e:{switch(e){case"compositionstart":l=we.compositionStart;break e;case"compositionend":l=we.compositionEnd;break e;case"compositionupdate":l=we.compositionUpdate;break e}l=void 0}else Ce?Se(e,n)&&(l=we.compositionEnd):"keydown"===e&&229===n.keyCode&&(l=we.compositionStart);return l?(ke&&"ko"!==n.locale&&(Ce||l!==we.compositionStart?l===we.compositionEnd&&Ce&&(i=ae()):(ie="value"in(le=r)?le.value:le.textContent,Ce=!0)),l=me.getPooled(l,t,n,r),i?l.data=i:null!==(i=_e(n))&&(l.data=i),Q(l),i=l):i=null,(e=be?function(e,t){switch(e){case"compositionend":return _e(t);case"keypress":return 32!==t.which?null:(Te=!0,xe);case"textInput":return(e=t.data)===xe&&Te?null:e;default:return null}}(e,n):function(e,t){if(Ce)return"compositionend"===e||!ve&&Se(e,t)?(e=ae(),oe=ie=le=null,Ce=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1
    ","
    "],tr:[2,"","
    "],td:[3,"","
    "],col:[2,"","
    "],area:[1,"",""],_default:[0,"",""]},se=U(n);function ae(e,t){return i.nodeName(e,"table")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function ue(e,t){if(1===t.nodeType&&i.hasData(e)){var n,r,o,s=i._data(e),a=i._data(t,s),u=s.events;if(u)for(n in delete a.handle,a.events={},u)for(r=0,o=u[n].length;r",""]),i.fn.extend({text:function(e){return i.access(this,(function(e){ +return void 0===e?i.text(this):this.empty().append((this[0]&&this[0].ownerDocument||n).createTextNode(e))}),null,e,arguments.length)},wrapAll:function(e){if(i.isFunction(e))return this.each((function(t){i(this).wrapAll(e.call(this,t))}));if(this[0]){var t=i(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map((function(){for(var e=this;e.firstChild&&1===e.firstChild.nodeType;)e=e.firstChild;return e})).append(this)}return this},wrapInner:function(e){return i.isFunction(e)?this.each((function(t){i(this).wrapInner(e.call(this,t))})):this.each((function(){var t=i(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)}))},wrap:function(e){var t=i.isFunction(e);return this.each((function(n){i(this).wrapAll(t?e.call(this,n):e)}))},unwrap:function(){return this.parent().each((function(){i.nodeName(this,"body")||i(this).replaceWith(this.childNodes)})).end()},append:function(){return this.domManip(arguments,!0,(function(e){1===this.nodeType&&this.appendChild(e)}))},prepend:function(){return this.domManip(arguments,!0,(function(e){1===this.nodeType&&this.insertBefore(e,this.firstChild)}))},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,(function(e){this.parentNode.insertBefore(e,this)}));if(arguments.length){var e=i.clean(arguments);return e.push.apply(e,this.toArray()),this.pushStack(e,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,(function(e){this.parentNode.insertBefore(e,this.nextSibling)}));if(arguments.length){var e=this.pushStack(this,"after",arguments);return e.push.apply(e,i.clean(arguments)),e}},remove:function(e,t){for(var n,r=0;null!=(n=this[r]);r++)e&&!i.filter(e,[n]).length||(t||1!==n.nodeType||(i.cleanData(n.getElementsByTagName("*")),i.cleanData([n])),n.parentNode&&n.parentNode.removeChild(n));return this},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)for(1===e.nodeType&&i.cleanData(e.getElementsByTagName("*"));e.firstChild;)e.removeChild(e.firstChild);return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map((function(){return i.clone(this,e,t)}))},html:function(e){return i.access(this,(function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e)return 1===t.nodeType?t.innerHTML.replace(Q,""):null;if("string"==typeof e&&!Z.test(e)&&(i.support.leadingWhitespace||!X.test(e))&&!ie[(Y.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(K,"<$1>");try{for(;n1&&c0?this.clone(!0):this).get();i(o[a])[t](l),r=r.concat(l)}return this.pushStack(r,e,o.selector)}})),i.extend({clone:function(e,t,r){var o,s,a,u=i.support.html5Clone||i.isXMLDoc(e)||!te.test("<"+e.nodeName+">")?e.cloneNode(!0):function(e){var t=n.createElement("div");return se.appendChild(t),t.innerHTML=e.outerHTML,t.firstChild}(e);if(!(i.support.noCloneEvent&&i.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||i.isXMLDoc(e)))for(le(e,u),o=ce(e),s=ce(u),a=0;o[a];++a)s[a]&&le(o[a],s[a]);if(t&&(ue(e,u),r))for(o=ce(e),s=ce(u),a=0;o[a];++a)ue(o[a],s[a]);return o=s=null,u},clean:function(e,t,r,o){var s,a,u,l=[];void 0===(t=t||n).createElement&&(t=t.ownerDocument||t[0]&&t[0].ownerDocument||n);for(var c,f=0;null!=(c=e[f]);f++)if("number"==typeof c&&(c+=""),c){if("string"==typeof c)if(G.test(c)){c=c.replace(K,"<$1>");var d,p=(Y.exec(c)||["",""])[1].toLowerCase(),h=ie[p]||ie._default,g=h[0],v=t.createElement("div"),m=se.childNodes;for(t===n?se.appendChild(v):U(t).appendChild(v),v.innerHTML=h[1]+c+h[2];g--;)v=v.lastChild;if(!i.support.tbody){var y=J.test(c),_="table"!==p||y?""!==h[1]||y?[]:v.childNodes:v.firstChild&&v.firstChild.childNodes;for(u=_.length-1;u>=0;--u)i.nodeName(_[u],"tbody")&&!_[u].childNodes.length&&_[u].parentNode.removeChild(_[u])}!i.support.leadingWhitespace&&X.test(c)&&v.insertBefore(t.createTextNode(X.exec(c)[0]),v.firstChild), +c=v.childNodes,v&&(v.parentNode.removeChild(v),m.length>0&&(d=m[m.length-1])&&d.parentNode&&d.parentNode.removeChild(d))}else c=t.createTextNode(c);var b;if(!i.support.appendChecked)if(c[0]&&"number"==typeof(b=c.length))for(u=0;u0){if("border"!==n)for(;o<4;o+=2)n||(r-=parseFloat(i.css(e,"padding"+Se[o]))||0),"margin"===n?r+=parseFloat(i.css(e,n+Se[o]))||0:r-=parseFloat(i.css(e,"border"+Se[o]+"Width"))||0;return r+"px"}if(((r=pe(e,t))<0||null==r)&&(r=e.style[t]),be.test(r))return r;if(r=parseFloat(r)||0,n)for(;o<4;o+=2)r+=parseFloat(i.css(e,"padding"+Se[o]))||0,"padding"!==n&&(r+=parseFloat(i.css(e,"border"+Se[o]+"Width"))||0),"margin"===n&&(r+=parseFloat(i.css(e,n+Se[o]))||0);return r+"px"}i.fn.css=function(e,t){return i.access(this,(function(e,t,n){return void 0!==n?i.style(e,t,n):i.css(e,t)}),e,t,arguments.length>1)},i.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=pe(e,"opacity");return""===n?"1":n}return e.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:i.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,s,a=i.camelCase(t),u=e.style,l=i.cssHooks[a];if(t=i.cssProps[a]||a,void 0===n)return l&&"get"in l&&void 0!==(o=l.get(e,!1,r))?o:u[t];if(!("string"===(s=typeof n)&&(o=we.exec(n))&&(n=+(o[1]+1)*+o[2]+parseFloat(i.css(e,t)),s="number"),null==n||"number"===s&&isNaN(n)||("number"!==s||i.cssNumber[a]||(n+="px"),l&&"set"in l&&void 0===(n=l.set(e,n)))))try{u[t]=n}catch(c){}}},css:function(e,t,n){var r,o;return t=i.camelCase(t),o=i.cssHooks[t],"cssFloat"===(t=i.cssProps[t]||t)&&(t="float"),o&&"get"in o&&void 0!==(r=o.get(e,!0,n))?r:pe?pe(e,t):void 0},swap:function(e,t,n){var r,o,i={};for(o in t)i[o]=e.style[o],e.style[o]=t[o];for(o in r=n.call(e),t)e.style[o]=i[o];return r}}),i.curCSS=i.css, +n.defaultView&&n.defaultView.getComputedStyle&&(he=function(e,t){var n,r,o,s,a=e.style;return t=t.replace(ye,"-$1").toLowerCase(),(r=e.ownerDocument.defaultView)&&(o=r.getComputedStyle(e,null))&&(""!==(n=o.getPropertyValue(t))||i.contains(e.ownerDocument.documentElement,e)||(n=i.style(e,t))),!i.support.pixelMargin&&o&&xe.test(t)&&be.test(n)&&(s=a.width,a.width=n,n=o.width,a.width=s),n}),n.documentElement.currentStyle&&(ge=function(e,t){var n,r,o,i=e.currentStyle&&e.currentStyle[t],s=e.style;return null==i&&s&&(o=s[t])&&(i=o),be.test(i)&&(n=s.left,(r=e.runtimeStyle&&e.runtimeStyle.left)&&(e.runtimeStyle.left=e.currentStyle.left),s.left="fontSize"===t?"1em":i,i=s.pixelLeft+"px",s.left=n,r&&(e.runtimeStyle.left=r)),""===i?"auto":i}),pe=he||ge,i.each(["height","width"],(function(e,t){i.cssHooks[t]={get:function(e,n,r){if(n)return 0!==e.offsetWidth?Ee(e,t,r):i.swap(e,ke,(function(){return Ee(e,t,r)}))},set:function(e,t){return _e.test(t)?t+"px":t}}})),i.support.opacity||(i.cssHooks.opacity={get:function(e,t){return me.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?parseFloat(RegExp.$1)/100+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,o=i.isNumeric(t)?"alpha(opacity="+100*t+")":"",s=r&&r.filter||n.filter||"";n.zoom=1,t>=1&&""===i.trim(s.replace(ve,""))&&(n.removeAttribute("filter"),r&&!r.filter)||(n.filter=ve.test(s)?s.replace(ve,o):s+" "+o)}}),i((function(){i.support.reliableMarginRight||(i.cssHooks.marginRight={get:function(e,t){return i.swap(e,{display:"inline-block"},(function(){return t?pe(e,"margin-right"):e.style.marginRight}))}})})),i.expr&&i.expr.filters&&(i.expr.filters.hidden=function(e){var t=e.offsetWidth,n=e.offsetHeight;return 0===t&&0===n||!i.support.reliableHiddenOffsets&&"none"===(e.style&&e.style.display||i.css(e,"display"))},i.expr.filters.visible=function(e){return!i.expr.filters.hidden(e)}),i.each({margin:"",padding:"",border:"Width"},(function(e,t){i.cssHooks[e+t]={expand:function(n){var r,o="string"==typeof n?n.split(" "):[n],i={};for(r=0;r<4;r++)i[e+Se[r]+t]=o[r]||o[r-2]||o[0];return i}}}));var Te,Ce,Ne=/%20/g,Oe=/\[\]$/,je=/\r?\n/g,Le=/#.*$/,Ae=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Pe=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,Fe=/^(?:GET|HEAD)$/,Re=/^\/\//,De=/\?/,Me=/)<[^<]*)*<\/script>/gi,Ie=/^(?:select|textarea)/i,He=/\s+/,Be=/([?&])_=[^&]*/,We=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,qe=i.fn.load,Ve={},ze={},Ue=["*/"]+["*"];try{Te=o.href}catch(_t){(Te=n.createElement("a")).href="",Te=Te.href}function $e(e){return function(t,n){if("string"!=typeof t&&(n=t,t="*"),i.isFunction(n))for(var r,o,s=t.toLowerCase().split(He),a=0,u=s.length;a=0){var o=e.slice(r,e.length);e=e.slice(0,r)}var s="GET";t&&(i.isFunction(t)?(n=t,t=void 0):"object"==typeof t&&(t=i.param(t,i.ajaxSettings.traditional),s="POST"));var a=this;return i.ajax({url:e,type:s,dataType:"html",data:t,complete:function(e,t,r){r=e.responseText,e.isResolved()&&(e.done((function(e){r=e})),a.html(o?i("
    ").append(r.replace(Me,"")).find(o):r)),n&&a.each(n,[r,t,e])}}),this},serialize:function(){return i.param(this.serializeArray())},serializeArray:function(){return this.map((function(){return this.elements?i.makeArray(this.elements):this})).filter((function(){return this.name&&!this.disabled&&(this.checked||Ie.test(this.nodeName)||Pe.test(this.type))})).map((function(e,t){var n=i(this).val();return null==n?null:i.isArray(n)?i.map(n,(function(e,n){return{name:t.name,value:e.replace(je,"\r\n")}})):{name:t.name,value:n.replace(je,"\r\n")}})).get()}}),i.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),(function(e,t){i.fn[t]=function(e){return this.on(t,e)}})),i.each(["get","post"],(function(e,t){i[t]=function(e,n,r,o){return i.isFunction(n)&&(o=o||r,r=n,n=void 0),i.ajax({type:t,url:e,data:n,success:r,dataType:o})}})),i.extend({getScript:function(e,t){return i.get(e,void 0,t,"script")},getJSON:function(e,t,n){return i.get(e,t,n,"json")},ajaxSetup:function(e,t){return t?Xe(e,i.ajaxSettings):(t=e,e=i.ajaxSettings),Xe(e,t),e},ajaxSettings:{url:Te,isLocal:/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/.test(Ce[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":Ue},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":window.String,"text html":!0,"text json":i.parseJSON,"text xml":i.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:$e(Ve),ajaxTransport:$e(ze),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var n,r,o,s,a,u,l,c,f=i.ajaxSetup({},t),d=f.context||f,p=d!==f&&(d.nodeType||d instanceof i)?i(d):i.event,h=i.Deferred(),g=i.Callbacks("once memory"),v=f.statusCode||{},m={},y={},_=0,b={readyState:0,setRequestHeader:function(e,t){if(!_){var n=e.toLowerCase();e=y[n]=y[n]||e,m[e]=t}return this},getAllResponseHeaders:function(){return 2===_?r:null},getResponseHeader:function(e){var t;if(2===_){ +if(!o)for(o={};t=Ae.exec(r);)o[t[1].toLowerCase()]=t[2];t=o[e.toLowerCase()]}return void 0===t?null:t},overrideMimeType:function(e){return _||(f.mimeType=e),this},abort:function(e){return e=e||"abort",s&&s.abort(e),w(0,e),this}};function w(e,t,o,u){if(2!==_){_=2,a&&clearTimeout(a),s=void 0,r=u||"",b.readyState=e>0?4:0;var c,m,y,w,x,k=t,S=o?function(e,t,n){var r,o,i,s,a=e.contents,u=e.dataTypes,l=e.responseFields;for(o in l)o in n&&(t[l[o]]=n[o]);for(;"*"===u[0];)u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("content-type"));if(r)for(o in a)if(a[o]&&a[o].test(r)){u.unshift(o);break}if(u[0]in n)i=u[0];else{for(o in n){if(!u[0]||e.converters[o+" "+u[0]]){i=o;break}s||(s=o)}i=i||s}if(i)return i!==u[0]&&u.unshift(i),n[i]}(f,b,o):void 0;if(e>=200&&e<300||304===e)if(f.ifModified&&((w=b.getResponseHeader("Last-Modified"))&&(i.lastModified[n]=w),(x=b.getResponseHeader("Etag"))&&(i.etag[n]=x)),304===e)k="notmodified",c=!0;else try{m=function(e,t){e.dataFilter&&(t=e.dataFilter(t,e.dataType));var n,r,o,s,a,u,l,c,f=e.dataTypes,d={},p=f.length,h=f[0];for(n=1;n0&&(a=setTimeout((function(){b.abort("timeout")}),f.timeout));try{_=1,s.send(m,w)}catch(_t){if(!(_<2))throw _t;w(-1,_t)}}else w(-1,"No Transport");return b},param:function(e,t){var n=[],r=function(e,t){t=i.isFunction(t)?t():t,n[n.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(void 0===t&&(t=i.ajaxSettings.traditional),i.isArray(e)||e.jquery&&!i.isPlainObject(e))i.each(e,(function(){r(this.name,this.value)}));else for(var o in e)Ke(o,e[o],t,r);return n.join("&").replace(Ne,"+")}}),i.extend({active:0,lastModified:{},etag:{}});var Ye=i.now(),Je=/(\=)\?(&|$)|\?\?/i;i.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return i.expando+"_"+Ye++}}),i.ajaxPrefilter("json jsonp",(function(e,t,n){var r="string"==typeof e.data&&/^application\/x\-www\-form\-urlencoded/.test(e.contentType);if("jsonp"===e.dataTypes[0]||!1!==e.jsonp&&(Je.test(e.url)||r&&Je.test(e.data))){var o,s=e.jsonpCallback=i.isFunction(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a=window[s],u=e.url,l=e.data,c="$1"+s+"$2";return!1!==e.jsonp&&(u=u.replace(Je,c),e.url===u&&(r&&(l=l.replace(Je,c)),e.data===l&&(u+=(/\?/.test(u)?"&":"?")+e.jsonp+"="+s))),e.url=u,e.data=l,window[s]=function(e){o=[e]},n.always((function(){window[s]=a,o&&i.isFunction(a)&&window[s](o[0])})),e.converters["script json"]=function(){return o||i.error(s+" was not called"),o[0]},e.dataTypes[0]="json","script"}})),i.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(e){return i.globalEval(e),e}}}),i.ajaxPrefilter("script",(function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)})),i.ajaxTransport("script",(function(e){if(e.crossDomain){var t,r=n.head||n.getElementsByTagName("head")[0]||n.documentElement;return{send:function(o,i){(t=n.createElement("script")).async="async",e.scriptCharset&&(t.charset=e.scriptCharset),t.src=e.url,t.onload=t.onreadystatechange=function(e,n){(n||!t.readyState||/loaded|complete/.test(t.readyState))&&(t.onload=t.onreadystatechange=null,r&&t.parentNode&&r.removeChild(t),t=void 0,n||i(200,"success"))},r.insertBefore(t,r.firstChild)},abort:function(){t&&t.onload(0,1)}}}}));var Ge,Ze,et=!!window.ActiveXObject&&function(){for(var e in Ge)Ge[e](0,1)},tt=0;function nt(){try{return new window.XMLHttpRequest}catch(_t){}}i.ajaxSettings.xhr=window.ActiveXObject?function(){return!this.isLocal&&nt()||function(){try{return new window.ActiveXObject("Microsoft.XMLHTTP")}catch(_t){}}()}:nt,Ze=i.ajaxSettings.xhr(),i.extend(i.support,{ajax:!!Ze,cors:!!Ze&&"withCredentials"in Ze}), +i.support.ajax&&i.ajaxTransport((function(e){var t;if(!e.crossDomain||i.support.cors)return{send:function(n,r){var o,s,a=e.xhr();if(e.username?a.open(e.type,e.url,e.async,e.username,e.password):a.open(e.type,e.url,e.async),e.xhrFields)for(s in e.xhrFields)a[s]=e.xhrFields[s];e.mimeType&&a.overrideMimeType&&a.overrideMimeType(e.mimeType),e.crossDomain||n["X-Requested-With"]||(n["X-Requested-With"]="XMLHttpRequest");try{for(s in n)a.setRequestHeader(s,n[s])}catch(u){}a.send(e.hasContent&&e.data||null),t=function(n,s){var u,l,c,f,d;try{if(t&&(s||4===a.readyState))if(t=void 0,o&&(a.onreadystatechange=i.noop,et&&delete Ge[o]),s)4!==a.readyState&&a.abort();else{u=a.status,c=a.getAllResponseHeaders(),f={},(d=a.responseXML)&&d.documentElement&&(f.xml=d);try{f.text=a.responseText}catch(n){}try{l=a.statusText}catch(_t){l=""}u||!e.isLocal||e.crossDomain?1223===u&&(u=204):u=f.text?200:404}}catch(p){s||r(-1,p)}f&&r(u,l,f,c)},e.async&&4!==a.readyState?(o=++tt,et&&(Ge||(Ge={},i(window).unload(et)),Ge[o]=t),a.onreadystatechange=t):t()},abort:function(){t&&t(0,1)}}}));var rt,ot,it,st,at={},ut=/^(?:toggle|show|hide)$/,lt=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,ct=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function ft(){return setTimeout(dt,0),st=i.now()}function dt(){st=void 0}function pt(e,t){var n={};return i.each(ct.concat.apply([],ct.slice(0,t)),(function(){n[this]=e})),n}function ht(e){if(!at[e]){var t=n.body,r=i("<"+e+">").appendTo(t),o=r.css("display");r.remove(),"none"!==o&&""!==o||(rt||((rt=n.createElement("iframe")).frameBorder=rt.width=rt.height=0),t.appendChild(rt),ot&&rt.createElement||((ot=(rt.contentWindow||rt.contentDocument).document).write((i.support.boxModel?"":"")+""),ot.close()),r=ot.createElement(e),ot.body.appendChild(r),o=i.css(r,"display"),t.removeChild(rt)),at[e]=o}return at[e]}i.fn.extend({show:function(e,t,n){var r,o;if(e||0===e)return this.animate(pt("show",3),e,t,n);for(var s=0,a=this.length;s=u.duration+this.startTime){for(t in this.now=this.end,this.pos=this.state=1,this.update(),u.animatedProperties[this.prop]=!0,u.animatedProperties)!0!==u.animatedProperties[t]&&(s=!1);if(s){if(null==u.overflow||i.support.shrinkWrapBlocks||i.each(["","X","Y"],(function(e,t){a.style["overflow"+t]=u.overflow[e]})),u.hide&&i(a).hide(),u.hide||u.show)for(t in u.animatedProperties)i.style(a,t,u.orig[t]),i.removeData(a,"fxshow"+t,!0),i.removeData(a,"toggle"+t,!0);(r=u.complete)&&(u.complete=!1,r.call(a))}return!1}return u.duration==1/0?this.now=o:(n=o-this.startTime,this.state=n/u.duration,this.pos=i.easing[u.animatedProperties[this.prop]](this.state,n,0,1,u.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update(),!0}},i.extend(i.fx,{tick:function(){for(var e,t=i.timers,n=0;n-1?(o=(d=a.position()).top,s=d.left):(o=parseFloat(l)||0,s=parseFloat(c)||0),i.isFunction(t)&&(t=t.call(e,n,u)),null!=t.top&&(f.top=t.top-u.top+o),null!=t.left&&(f.left=t.left-u.left+s),"using"in t?t.using.call(e,f):a.css(f)}},i.fn.extend({position:function(){if(!this[0])return null;var e=this[0],t=this.offsetParent(),n=this.offset(),r=mt.test(t[0].nodeName)?{top:0,left:0}:t.offset();return n.top-=parseFloat(i.css(e,"marginTop"))||0,n.left-=parseFloat(i.css(e,"marginLeft"))||0,r.top+=parseFloat(i.css(t[0],"borderTopWidth"))||0,r.left+=parseFloat(i.css(t[0],"borderLeftWidth"))||0,{top:n.top-r.top,left:n.left-r.left}},offsetParent:function(){return this.map((function(){for(var e=this.offsetParent||n.body;e&&!mt.test(e.nodeName)&&"static"===i.css(e,"position");)e=e.offsetParent;return e}))}}),i.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(e,t){var n=/Y/.test(t);i.fn[e]=function(r){return i.access(this,(function(e,r,o){var s=yt(e);if(void 0===o)return s?t in s?s[t]:i.support.boxModel&&s.document.documentElement[r]||s.document.body[r]:e[r];s?s.scrollTo(n?i(s).scrollLeft():o,n?o:i(s).scrollTop()):e[r]=o}),e,r,arguments.length,null)}})),i.each({Height:"height",Width:"width"},(function(e,t){ +var n="client"+e,r="scroll"+e,o="offset"+e;i.fn["inner"+e]=function(){var e=this[0];return e?e.style?parseFloat(i.css(e,t,"padding")):this[t]():null},i.fn["outer"+e]=function(e){var n=this[0];return n?n.style?parseFloat(i.css(n,t,e?"margin":"border")):this[t]():null},i.fn[t]=function(e){return i.access(this,(function(e,t,s){var a,u,l,c;return i.isWindow(e)?(u=(a=e.document).documentElement[n],i.support.boxModel&&u||a.body&&a.body[n]||u):9===e.nodeType?(a=e.documentElement)[n]>=a[r]?a[n]:Math.max(e.body[r],a[r],e.body[o],a[o]):void 0===s?(l=i.css(e,t),c=parseFloat(l),i.isNumeric(c)?c:l):void i(e).css(t,s)}),t,e,arguments.length,null)}})),e.exports=window.jQuery=window.$=i},PAQY:function(e,t,n){var r=n("QqfT")("meta"),o=n("zY5Q"),i=n("isQe"),s=n("gPPl").f,a=0,u=Object.isExtensible||function(){return!0},l=!n("u52/")((function(){return u(Object.preventExtensions({}))})),c=function(e){s(e,r,{value:{i:"O"+ ++a,w:{}}})},f=e.exports={KEY:r,NEED:!1,fastKey:function(e,t){if(!o(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!i(e,r)){if(!u(e))return"F";if(!t)return"E";c(e)}return e[r].i},getWeak:function(e,t){if(!i(e,r)){if(!u(e))return!0;if(!t)return!1;c(e)}return e[r].w},onFreeze:function(e){return l&&f.NEED&&u(e)&&!i(e,r)&&c(e),e}}},PPId:function(e,t){t.f=Object.getOwnPropertySymbols},QYoC:function(e,t,n){"use strict";var r;(r=jQuery).fn.contextMenu=function(e){r(this).bind("contextmenu",(function(t){return e(t),!1}))}},QqfT:function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},Qwlt:function(e,t,n){var r,o,i;o=[n("P5fv")],void 0===(i="function"==typeof(r=function(e){return e.ui=e.ui||{},e.ui.version="1.12.1"})?r.apply(t,o):r)||(e.exports=i)},R99l:function(e,t,n){"use strict";var r=n("Vrag"),o=n("yUtn"),i=n("AuAe"),s={};n("khJW")(s,n("IXQl")("iterator"),(function(){return this})),e.exports=function(e,t,n){e.prototype=r(s,{next:o(1,n)}),i(e,t+" Iterator")}},SYQx:function(e,t,n){var r=n("gPPl"),o=n("9TFj"),i=n("xjCr");e.exports=n("nULH")?Object.defineProperties:function(e,t){o(e);for(var n,s=i(t),a=s.length,u=0;a>u;)r.f(e,n=s[u++],t[n]);return e}},SpsL:function(e,t){!function(){function e(e){if(!Uint32Array.prototype.hasOwnProperty(e)){var t=Array.prototype[e];Int8Array.prototype[e]=t,Uint8Array.prototype[e]=t,Uint8ClampedArray.prototype[e]=t,Int16Array.prototype[e]=t,Uint16Array.prototype[e]=t,Int32Array.prototype[e]=t,Uint32Array.prototype[e]=t,Float32Array.prototype[e]=t,Float64Array.prototype[e]=t}}e("reduce"),e("reduceRight"),e("fill"),e("join")}()},SwRI:function(e,t){e.exports=!1},T0pI:function(e,t,n){var r=n("KGgr").parseInt,o=n("W+In").trim,i=n("YqzG"),s=/^[-+]?0[xX]/;e.exports=8!==r(i+"08")||22!==r(i+"0x16")?function(e,t){var n=o(String(e),3);return r(n,t>>>0||(s.test(n)?16:10))}:r},TnYX:function(e,t){e.exports=function(e){try{return{e:!1,v:e()}}catch(t){return{e:!0,v:t}}}},UyYM:function(e,t,n){"use strict";var r=n("1Vm/");function o(e){var t,n;this.promise=new e((function(e,r){ +if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r})),this.resolve=r(t),this.reject=r(n)}e.exports.f=function(e){return new o(e)}},V3uq:function(e,t){e.exports={}},VUhU:function(e,t){"undefined"!=typeof window&&(Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector||Element.prototype.mozMatchesSelector),Element.prototype.closest||(Element.prototype.closest=function(e){for(var t=this;t&&1===t.nodeType;t=t.parentNode)if(t.matches(e))return t;return null}))},VgLE:function(e,t,n){var r=n("/B3w"),o=Math.max,i=Math.min;e.exports=function(e,t){return(e=r(e))<0?o(e+t,0):i(e,t)}},Vrag:function(e,t,n){var r=n("9TFj"),o=n("SYQx"),i=n("IbiK"),s=n("pND+")("IE_PROTO"),a=function(){},u=function(){var e,t=n("9S7S")("iframe"),r=i.length;for(t.style.display="none",n("OpLF").appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("
    \ No newline at end of file diff --git a/public/charting_library/da_DK-tv-chart.b555c6a4.html b/public/charting_library/da_DK-tv-chart.b555c6a4.html new file mode 100644 index 00000000..6308f5b4 --- /dev/null +++ b/public/charting_library/da_DK-tv-chart.b555c6a4.html @@ -0,0 +1 @@ +
    \ No newline at end of file diff --git a/public/charting_library/datafeed-api.d.ts b/public/charting_library/datafeed-api.d.ts new file mode 100644 index 00000000..c8f93800 --- /dev/null +++ b/public/charting_library/datafeed-api.d.ts @@ -0,0 +1,259 @@ +// Generated by dts-bundle-generator v5.3.0 + +export declare type DomeCallback = (data: DOMData) => void; +export declare type ErrorCallback = (reason: string) => void; +export declare type GetMarksCallback = (marks: T[]) => void; +export declare type HistoryCallback = (bars: Bar[], meta: HistoryMetadata) => void; +export declare type MarkConstColors = "red" | "green" | "blue" | "yellow"; +/** + * This is the generic type useful for declaring a nominal type, + * which does not structurally matches with the base type and + * the other types declared over the same base type + * + * Usage: + * @example + * type Index = Nominal; + * // let i: Index = 42; // this fails to compile + * let i: Index = 42 as Index; // OK + * @example + * type TagName = Nominal; + */ +export declare type Nominal = T & { + [Symbol.species]: Name; +}; +export declare type OnReadyCallback = (configuration: DatafeedConfiguration) => void; +export declare type QuoteData = QuoteOkData | QuoteErrorData; +export declare type QuotesCallback = (data: QuoteData[]) => void; +export declare type ResolutionBackValues = "D" | "M"; +export declare type ResolutionString = Nominal; +export declare type ResolveCallback = (symbolInfo: LibrarySymbolInfo) => void; +export declare type SearchSymbolsCallback = (items: SearchSymbolResultItem[]) => void; +export declare type SeriesFormat = "price" | "volume"; +export declare type ServerTimeCallback = (serverTime: number) => void; +export declare type SubscribeBarsCallback = (bar: Bar) => void; +export declare type Timezone = "Etc/UTC" | CustomTimezones; +export interface Bar { + time: number; + open: number; + high: number; + low: number; + close: number; + volume?: number; +} +export interface DOMData { + snapshot: boolean; + asks: DOMLevel[]; + bids: DOMLevel[]; +} +export interface DOMLevel { + price: number; + volume: number; +} +export interface DatafeedConfiguration { + exchanges?: Exchange[]; + supported_resolutions?: ResolutionString[]; + currency_codes?: string[]; + supports_marks?: boolean; + supports_time?: boolean; + supports_timescale_marks?: boolean; + symbols_types?: DatafeedSymbolType[]; +} +export interface DatafeedQuoteValues { + ch?: number; + chp?: number; + short_name?: string; + exchange?: string; + description?: string; + lp?: number; + ask?: number; + bid?: number; + spread?: number; + open_price?: number; + high_price?: number; + low_price?: number; + prev_close_price?: number; + volume?: number; + original_name?: string; + [valueName: string]: string | number | undefined; +} +export interface DatafeedSymbolType { + name: string; + value: string; +} +export interface Exchange { + value: string; + name: string; + desc: string; +} +export interface HistoryDepth { + resolutionBack: ResolutionBackValues; + intervalBack: number; +} +export interface HistoryMetadata { + noData: boolean; + nextTime?: number | null; +} +export interface IDatafeedChartApi { + calculateHistoryDepth?(resolution: ResolutionString, resolutionBack: ResolutionBackValues, intervalBack: number): HistoryDepth | undefined; + getMarks?(symbolInfo: LibrarySymbolInfo, from: number, to: number, onDataCallback: GetMarksCallback, resolution: ResolutionString): void; + getTimescaleMarks?(symbolInfo: LibrarySymbolInfo, from: number, to: number, onDataCallback: GetMarksCallback, resolution: ResolutionString): void; + /** + * This function is called if configuration flag supports_time is set to true when chart needs to know the server time. + * The charting library expects callback to be called once. + * The time is provided without milliseconds. Example: 1445324591. It is used to display Countdown on the price scale. + */ + getServerTime?(callback: ServerTimeCallback): void; + searchSymbols(userInput: string, exchange: string, symbolType: string, onResult: SearchSymbolsCallback): void; + resolveSymbol(symbolName: string, onResolve: ResolveCallback, onError: ErrorCallback): void; + getBars(symbolInfo: LibrarySymbolInfo, resolution: ResolutionString, rangeStartDate: number, rangeEndDate: number, onResult: HistoryCallback, onError: ErrorCallback, isFirstCall: boolean): void; + subscribeBars(symbolInfo: LibrarySymbolInfo, resolution: ResolutionString, onTick: SubscribeBarsCallback, listenerGuid: string, onResetCacheNeededCallback: () => void): void; + unsubscribeBars(listenerGuid: string): void; + subscribeDepth?(symbol: string, callback: DomeCallback): string; + unsubscribeDepth?(subscriberUID: string): void; +} +export interface IDatafeedQuotesApi { + getQuotes(symbols: string[], onDataCallback: QuotesCallback, onErrorCallback: (msg: string) => void): void; + subscribeQuotes(symbols: string[], fastSymbols: string[], onRealtimeCallback: QuotesCallback, listenerGUID: string): void; + unsubscribeQuotes(listenerGUID: string): void; +} +export interface IExternalDatafeed { + onReady(callback: OnReadyCallback): void; +} +export interface LibrarySymbolInfo { + /** + * Symbol Name + */ + name: string; + full_name: string; + base_name?: [string]; + /** + * Unique symbol id + */ + ticker?: string; + description: string; + type: string; + /** + * @example "1700-0200" + */ + session: string; + session_display?: string; + /** + * @example "20181105,20181107,20181112" + */ + holidays?: string; + /** + * @example "1900F4-2350F4,1000-1845:20181113;1000-1400:20181114" + */ + corrections?: string; + /** + * Traded exchange + * @example "NYSE" + */ + exchange: string; + listed_exchange: string; + timezone: Timezone; + /** + * Prices format: "price" or "volume" + */ + format: SeriesFormat; + /** + * Code (Tick) + * @example 8/16/.../256 (1/8/100 1/16/100 ... 1/256/100) or 1/10/.../10000000 (1 0.1 ... 0.0000001) + */ + pricescale: number; + /** + * The number of units that make up one tick. + * @example For example, U.S. equities are quotes in decimals, and tick in decimals, and can go up +/- .01. So the tick increment is 1. But the e-mini S&P futures contract, though quoted in decimals, goes up in .25 increments, so the tick increment is 25. (see also Tick Size) + */ + minmov: number; + fractional?: boolean; + /** + * @example Quarters of 1/32: pricescale=128, minmovement=1, minmovement2=4 + */ + minmove2?: number; + /** + * false if DWM only + */ + has_intraday?: boolean; + /** + * An array of resolutions which should be enabled in resolutions picker for this symbol. + */ + supported_resolutions: ResolutionString[]; + /** + * @example (for ex.: "1,5,60") - only these resolutions will be requested, all others will be built using them if possible + */ + intraday_multipliers?: string[]; + has_seconds?: boolean; + /** + * It is an array containing seconds resolutions (in seconds without a postfix) the datafeed builds by itself. + */ + seconds_multipliers?: string[]; + has_daily?: boolean; + has_weekly_and_monthly?: boolean; + has_empty_bars?: boolean; + force_session_rebuild?: boolean; + has_no_volume?: boolean; + /** + * Integer showing typical volume value decimal places for this symbol + */ + volume_precision?: number; + data_status?: "streaming" | "endofday" | "pulsed" | "delayed_streaming"; + /** + * Boolean showing whether this symbol is expired futures contract or not. + */ + expired?: boolean; + /** + * Unix timestamp of expiration date. + */ + expiration_date?: number; + sector?: string; + industry?: string; + currency_code?: string; + original_currency_code?: string; +} +export interface Mark { + id: string | number; + time: number; + color: MarkConstColors | MarkCustomColor; + text: string; + label: string; + labelFontColor: string; + minSize: number; +} +export interface MarkCustomColor { + color: string; + background: string; +} +export interface QuoteErrorData { + s: "error"; + n: string; + v: object; +} +export interface QuoteOkData { + s: "ok"; + n: string; + v: DatafeedQuoteValues; +} +export interface SearchSymbolResultItem { + symbol: string; + full_name: string; + description: string; + exchange: string; + ticker: string; + type: string; +} +export interface SymbolResolveExtension { + currencyCode?: string; +} +export interface TimescaleMark { + id: string | number; + time: number; + color: MarkConstColors | string; + label: string; + tooltip: string[]; +} +export type CustomTimezones = "Africa/Cairo" | "Africa/Johannesburg" | "Africa/Lagos" | "America/Argentina/Buenos_Aires" | "America/Bogota" | "America/Caracas" | "America/Chicago" | "America/El_Salvador" | "America/Juneau" | "America/Lima" | "America/Los_Angeles" | "America/Mexico_City" | "America/New_York" | "America/Phoenix" | "America/Santiago" | "America/Sao_Paulo" | "America/Toronto" | "America/Vancouver" | "Asia/Almaty" | "Asia/Ashkhabad" | "Asia/Bahrain" | "Asia/Bangkok" | "Asia/Chongqing" | "Asia/Dubai" | "Asia/Ho_Chi_Minh" | "Asia/Hong_Kong" | "Asia/Jakarta" | "Asia/Jerusalem" | "Asia/Kathmandu" | "Asia/Kolkata" | "Asia/Kuwait" | "Asia/Muscat" | "Asia/Qatar" | "Asia/Riyadh" | "Asia/Seoul" | "Asia/Shanghai" | "Asia/Singapore" | "Asia/Taipei" | "Asia/Tehran" | "Asia/Tokyo" | "Atlantic/Reykjavik" | "Australia/ACT" | "Australia/Adelaide" | "Australia/Brisbane" | "Australia/Perth" | "Australia/Sydney" | "Europe/Amsterdam" | "Europe/Athens" | "Europe/Belgrade" | "Europe/Berlin" | "Europe/Brussels" | "Europe/Copenhagen" | "Europe/Dublin" | "Europe/Helsinki" | "Europe/Istanbul" | "Europe/Lisbon" | "Europe/London" | "Europe/Luxembourg" | "Europe/Madrid" | "Europe/Malta" | "Europe/Moscow" | "Europe/Oslo" | "Europe/Paris" | "Europe/Riga" | "Europe/Rome" | "Europe/Stockholm" | "Europe/Tallinn" | "Europe/Vilnius" | "Europe/Warsaw" | "Europe/Zurich" | "Pacific/Auckland" | "Pacific/Chatham" | "Pacific/Fakaofo" | "Pacific/Honolulu" | "Pacific/Norfolk" | "US/Mountain"; + +export as namespace TradingView; + +export {}; diff --git a/public/charting_library/de-tv-chart.b555c6a4.html b/public/charting_library/de-tv-chart.b555c6a4.html new file mode 100644 index 00000000..467b5cf9 --- /dev/null +++ b/public/charting_library/de-tv-chart.b555c6a4.html @@ -0,0 +1 @@ +
    \ No newline at end of file diff --git a/public/charting_library/el-tv-chart.b555c6a4.html b/public/charting_library/el-tv-chart.b555c6a4.html new file mode 100644 index 00000000..8b366d0e --- /dev/null +++ b/public/charting_library/el-tv-chart.b555c6a4.html @@ -0,0 +1 @@ +
    \ No newline at end of file diff --git a/public/charting_library/en-tv-chart.b555c6a4.html b/public/charting_library/en-tv-chart.b555c6a4.html new file mode 100644 index 00000000..df108873 --- /dev/null +++ b/public/charting_library/en-tv-chart.b555c6a4.html @@ -0,0 +1 @@ +
    \ No newline at end of file diff --git a/public/charting_library/es-tv-chart.b555c6a4.html b/public/charting_library/es-tv-chart.b555c6a4.html new file mode 100644 index 00000000..932300cf --- /dev/null +++ b/public/charting_library/es-tv-chart.b555c6a4.html @@ -0,0 +1 @@ +
    \ No newline at end of file diff --git a/public/charting_library/et_EE-tv-chart.b555c6a4.html b/public/charting_library/et_EE-tv-chart.b555c6a4.html new file mode 100644 index 00000000..4a8f0bb9 --- /dev/null +++ b/public/charting_library/et_EE-tv-chart.b555c6a4.html @@ -0,0 +1 @@ +
    \ No newline at end of file diff --git a/public/charting_library/fa-tv-chart.b555c6a4.html b/public/charting_library/fa-tv-chart.b555c6a4.html new file mode 100644 index 00000000..805fadbe --- /dev/null +++ b/public/charting_library/fa-tv-chart.b555c6a4.html @@ -0,0 +1 @@ +
    \ No newline at end of file diff --git a/public/charting_library/fr-tv-chart.b555c6a4.html b/public/charting_library/fr-tv-chart.b555c6a4.html new file mode 100644 index 00000000..8810c904 --- /dev/null +++ b/public/charting_library/fr-tv-chart.b555c6a4.html @@ -0,0 +1 @@ +
    \ No newline at end of file diff --git a/public/charting_library/he_IL-tv-chart.b555c6a4.html b/public/charting_library/he_IL-tv-chart.b555c6a4.html new file mode 100644 index 00000000..ebeb7b66 --- /dev/null +++ b/public/charting_library/he_IL-tv-chart.b555c6a4.html @@ -0,0 +1 @@ +
    \ No newline at end of file diff --git a/public/charting_library/hu_HU-tv-chart.b555c6a4.html b/public/charting_library/hu_HU-tv-chart.b555c6a4.html new file mode 100644 index 00000000..ac0578f3 --- /dev/null +++ b/public/charting_library/hu_HU-tv-chart.b555c6a4.html @@ -0,0 +1 @@ +
    \ No newline at end of file diff --git a/public/charting_library/id_ID-tv-chart.b555c6a4.html b/public/charting_library/id_ID-tv-chart.b555c6a4.html new file mode 100644 index 00000000..bf5638df --- /dev/null +++ b/public/charting_library/id_ID-tv-chart.b555c6a4.html @@ -0,0 +1 @@ +
    \ No newline at end of file diff --git a/public/charting_library/it-tv-chart.b555c6a4.html b/public/charting_library/it-tv-chart.b555c6a4.html new file mode 100644 index 00000000..18726417 --- /dev/null +++ b/public/charting_library/it-tv-chart.b555c6a4.html @@ -0,0 +1 @@ +
    \ No newline at end of file diff --git a/public/charting_library/ja-tv-chart.b555c6a4.html b/public/charting_library/ja-tv-chart.b555c6a4.html new file mode 100644 index 00000000..b985020c --- /dev/null +++ b/public/charting_library/ja-tv-chart.b555c6a4.html @@ -0,0 +1 @@ +
    \ No newline at end of file diff --git a/public/charting_library/ko-tv-chart.b555c6a4.html b/public/charting_library/ko-tv-chart.b555c6a4.html new file mode 100644 index 00000000..f66389a8 --- /dev/null +++ b/public/charting_library/ko-tv-chart.b555c6a4.html @@ -0,0 +1 @@ +
    \ No newline at end of file diff --git a/public/charting_library/ms_MY-tv-chart.b555c6a4.html b/public/charting_library/ms_MY-tv-chart.b555c6a4.html new file mode 100644 index 00000000..96a859c5 --- /dev/null +++ b/public/charting_library/ms_MY-tv-chart.b555c6a4.html @@ -0,0 +1 @@ +
    \ No newline at end of file diff --git a/public/charting_library/nl_NL-tv-chart.b555c6a4.html b/public/charting_library/nl_NL-tv-chart.b555c6a4.html new file mode 100644 index 00000000..50795356 --- /dev/null +++ b/public/charting_library/nl_NL-tv-chart.b555c6a4.html @@ -0,0 +1 @@ +
    \ No newline at end of file diff --git a/public/charting_library/no-tv-chart.b555c6a4.html b/public/charting_library/no-tv-chart.b555c6a4.html new file mode 100644 index 00000000..1a10b00d --- /dev/null +++ b/public/charting_library/no-tv-chart.b555c6a4.html @@ -0,0 +1 @@ +
    \ No newline at end of file diff --git a/public/charting_library/package.json b/public/charting_library/package.json new file mode 100644 index 00000000..60edf751 --- /dev/null +++ b/public/charting_library/package.json @@ -0,0 +1,8 @@ +{ + "private": true, + "description": "CL v18.043 (internal id b555c6a4 @ 2021-02-18T09:41:15.150Z)", + "type": "module", + "main": "charting_library.cjs.js", + "module": "charting_library.esm.js", + "types": "charting_library.d.ts" +} diff --git a/public/charting_library/pl-tv-chart.b555c6a4.html b/public/charting_library/pl-tv-chart.b555c6a4.html new file mode 100644 index 00000000..1dec3712 --- /dev/null +++ b/public/charting_library/pl-tv-chart.b555c6a4.html @@ -0,0 +1 @@ +
    \ No newline at end of file diff --git a/public/charting_library/pt-tv-chart.b555c6a4.html b/public/charting_library/pt-tv-chart.b555c6a4.html new file mode 100644 index 00000000..99962055 --- /dev/null +++ b/public/charting_library/pt-tv-chart.b555c6a4.html @@ -0,0 +1 @@ +
    \ No newline at end of file diff --git a/public/charting_library/ro-tv-chart.b555c6a4.html b/public/charting_library/ro-tv-chart.b555c6a4.html new file mode 100644 index 00000000..f5390e8f --- /dev/null +++ b/public/charting_library/ro-tv-chart.b555c6a4.html @@ -0,0 +1 @@ +
    \ No newline at end of file diff --git a/public/charting_library/ru-tv-chart.b555c6a4.html b/public/charting_library/ru-tv-chart.b555c6a4.html new file mode 100644 index 00000000..c66790f5 --- /dev/null +++ b/public/charting_library/ru-tv-chart.b555c6a4.html @@ -0,0 +1 @@ +
    \ No newline at end of file diff --git a/public/charting_library/sk_SK-tv-chart.b555c6a4.html b/public/charting_library/sk_SK-tv-chart.b555c6a4.html new file mode 100644 index 00000000..1d4c78d3 --- /dev/null +++ b/public/charting_library/sk_SK-tv-chart.b555c6a4.html @@ -0,0 +1 @@ +
    \ No newline at end of file diff --git a/public/charting_library/sv-tv-chart.b555c6a4.html b/public/charting_library/sv-tv-chart.b555c6a4.html new file mode 100644 index 00000000..19afed7b --- /dev/null +++ b/public/charting_library/sv-tv-chart.b555c6a4.html @@ -0,0 +1 @@ +
    \ No newline at end of file diff --git a/public/charting_library/th-tv-chart.b555c6a4.html b/public/charting_library/th-tv-chart.b555c6a4.html new file mode 100644 index 00000000..339869dd --- /dev/null +++ b/public/charting_library/th-tv-chart.b555c6a4.html @@ -0,0 +1 @@ +
    \ No newline at end of file diff --git a/public/charting_library/tr-tv-chart.b555c6a4.html b/public/charting_library/tr-tv-chart.b555c6a4.html new file mode 100644 index 00000000..a7283fd1 --- /dev/null +++ b/public/charting_library/tr-tv-chart.b555c6a4.html @@ -0,0 +1 @@ +
    \ No newline at end of file diff --git a/public/charting_library/vi-tv-chart.b555c6a4.html b/public/charting_library/vi-tv-chart.b555c6a4.html new file mode 100644 index 00000000..04690020 --- /dev/null +++ b/public/charting_library/vi-tv-chart.b555c6a4.html @@ -0,0 +1 @@ +
    \ No newline at end of file diff --git a/public/charting_library/zh-tv-chart.b555c6a4.html b/public/charting_library/zh-tv-chart.b555c6a4.html new file mode 100644 index 00000000..afc3db73 --- /dev/null +++ b/public/charting_library/zh-tv-chart.b555c6a4.html @@ -0,0 +1 @@ +
    \ No newline at end of file diff --git a/public/charting_library/zh_TW-tv-chart.b555c6a4.html b/public/charting_library/zh_TW-tv-chart.b555c6a4.html new file mode 100644 index 00000000..da9cae2d --- /dev/null +++ b/public/charting_library/zh_TW-tv-chart.b555c6a4.html @@ -0,0 +1 @@ +
    \ No newline at end of file diff --git a/public/datafeeds/README.md b/public/datafeeds/README.md new file mode 100644 index 00000000..cc8ed3f2 --- /dev/null +++ b/public/datafeeds/README.md @@ -0,0 +1,3 @@ +# Charting Library Datafeeds + +This folder contains implementation of Charting Library Datafeeds. diff --git a/public/datafeeds/udf/.npmrc b/public/datafeeds/udf/.npmrc new file mode 100644 index 00000000..dda497a1 --- /dev/null +++ b/public/datafeeds/udf/.npmrc @@ -0,0 +1,2 @@ +package-lock=false +audit=false diff --git a/public/datafeeds/udf/README.md b/public/datafeeds/udf/README.md new file mode 100644 index 00000000..34cfdb12 --- /dev/null +++ b/public/datafeeds/udf/README.md @@ -0,0 +1,46 @@ +# UDF Compatible Datafeed + +This folder contains [UDF](https://github.com/tradingview/charting_library/wiki/UDF) datafeed adapter. It implements [JS API](https://github.com/tradingview/charting_library/wiki/JS%20API) and makes HTTP requests using [UDF](https://github.com/tradingview/charting_library/wiki/UDF) protocol. + +You can use this datafeed adapter to plug your data if you implement [UDF](https://github.com/tradingview/charting_library/wiki/UDF) on your server. You can also scrutinize how it works before writing your own adapter. + +This datafeed is implemented in [TypeScript](https://github.com/Microsoft/TypeScript/). + +## Folders content + +- `./src` folder contains the source code in TypeScript. + +- `./lib` folder contains transpiled in es5 code. So, if you do not know how to use TypeScript - you can modify these files to change the result bundle later. + +- `./dist` folder contains bundled JavaScript files which can be inlined into a page and used in the Widget Constructor. + +## Build & bundle + +Before building or bundling your code you need to run `npm install` to install dependencies. + +`package.json` contains some handy scripts to build or generate the bundle: + +- `npm run compile` to compile TypeScript source code into JavaScript files (output will be in `./lib` folder) +- `npm run bundle-js` to bundle multiple JavaScript files into one bundle (it also bundle polyfills) +- `npm run build` to compile and bundle (it is a combination of all above commands) + +NOTE: if you want to minify the bundle code, you need to set `ENV` environment variable to a value different from `development`. + +For example: + +```bash +export ENV=prod +npm run bundle-js # or npm run build +``` + +or + +```bash +ENV=prod npm run bundle-js +``` + +or + +```bash +ENV=prod npm run build +``` diff --git a/public/datafeeds/udf/lib/data-pulse-provider.js b/public/datafeeds/udf/lib/data-pulse-provider.js new file mode 100644 index 00000000..9a4945cb --- /dev/null +++ b/public/datafeeds/udf/lib/data-pulse-provider.js @@ -0,0 +1,107 @@ +import { getErrorMessage, logMessage, } from './helpers'; +var DataPulseProvider = /** @class */ (function () { + function DataPulseProvider(historyProvider, updateFrequency) { + this._subscribers = {}; + this._requestsPending = 0; + this._historyProvider = historyProvider; + setInterval(this._updateData.bind(this), updateFrequency); + } + DataPulseProvider.prototype.subscribeBars = function (symbolInfo, resolution, newDataCallback, listenerGuid) { + if (this._subscribers.hasOwnProperty(listenerGuid)) { + logMessage("DataPulseProvider: already has subscriber with id=" + listenerGuid); + return; + } + this._subscribers[listenerGuid] = { + lastBarTime: null, + listener: newDataCallback, + resolution: resolution, + symbolInfo: symbolInfo, + }; + logMessage("DataPulseProvider: subscribed for #" + listenerGuid + " - {" + symbolInfo.name + ", " + resolution + "}"); + }; + DataPulseProvider.prototype.unsubscribeBars = function (listenerGuid) { + delete this._subscribers[listenerGuid]; + logMessage("DataPulseProvider: unsubscribed for #" + listenerGuid); + }; + DataPulseProvider.prototype._updateData = function () { + var _this = this; + if (this._requestsPending > 0) { + return; + } + this._requestsPending = 0; + var _loop_1 = function (listenerGuid) { + this_1._requestsPending += 1; + this_1._updateDataForSubscriber(listenerGuid) + .then(function () { + _this._requestsPending -= 1; + logMessage("DataPulseProvider: data for #" + listenerGuid + " updated successfully, pending=" + _this._requestsPending); + }) + .catch(function (reason) { + _this._requestsPending -= 1; + logMessage("DataPulseProvider: data for #" + listenerGuid + " updated with error=" + getErrorMessage(reason) + ", pending=" + _this._requestsPending); + }); + }; + var this_1 = this; + for (var listenerGuid in this._subscribers) { + _loop_1(listenerGuid); + } + }; + DataPulseProvider.prototype._updateDataForSubscriber = function (listenerGuid) { + var _this = this; + var subscriptionRecord = this._subscribers[listenerGuid]; + var rangeEndTime = parseInt((Date.now() / 1000).toString()); + // BEWARE: please note we really need 2 bars, not the only last one + // see the explanation below. `10` is the `large enough` value to work around holidays + var rangeStartTime = rangeEndTime - periodLengthSeconds(subscriptionRecord.resolution, 10); + return this._historyProvider.getBars(subscriptionRecord.symbolInfo, subscriptionRecord.resolution, rangeStartTime, rangeEndTime) + .then(function (result) { + _this._onSubscriberDataReceived(listenerGuid, result); + }); + }; + DataPulseProvider.prototype._onSubscriberDataReceived = function (listenerGuid, result) { + // means the subscription was cancelled while waiting for data + if (!this._subscribers.hasOwnProperty(listenerGuid)) { + logMessage("DataPulseProvider: Data comes for already unsubscribed subscription #" + listenerGuid); + return; + } + var bars = result.bars; + if (bars.length === 0) { + return; + } + var lastBar = bars[bars.length - 1]; + var subscriptionRecord = this._subscribers[listenerGuid]; + if (subscriptionRecord.lastBarTime !== null && lastBar.time < subscriptionRecord.lastBarTime) { + return; + } + var isNewBar = subscriptionRecord.lastBarTime !== null && lastBar.time > subscriptionRecord.lastBarTime; + // Pulse updating may miss some trades data (ie, if pulse period = 10 secods and new bar is started 5 seconds later after the last update, the + // old bar's last 5 seconds trades will be lost). Thus, at fist we should broadcast old bar updates when it's ready. + if (isNewBar) { + if (bars.length < 2) { + throw new Error('Not enough bars in history for proper pulse update. Need at least 2.'); + } + var previousBar = bars[bars.length - 2]; + subscriptionRecord.listener(previousBar); + } + subscriptionRecord.lastBarTime = lastBar.time; + subscriptionRecord.listener(lastBar); + }; + return DataPulseProvider; +}()); +export { DataPulseProvider }; +function periodLengthSeconds(resolution, requiredPeriodsCount) { + var daysCount = 0; + if (resolution === 'D' || resolution === '1D') { + daysCount = requiredPeriodsCount; + } + else if (resolution === 'M' || resolution === '1M') { + daysCount = 31 * requiredPeriodsCount; + } + else if (resolution === 'W' || resolution === '1W') { + daysCount = 7 * requiredPeriodsCount; + } + else { + daysCount = requiredPeriodsCount * parseInt(resolution) / (24 * 60); + } + return daysCount * 24 * 60 * 60; +} diff --git a/public/datafeeds/udf/lib/helpers.js b/public/datafeeds/udf/lib/helpers.js new file mode 100644 index 00000000..77040691 --- /dev/null +++ b/public/datafeeds/udf/lib/helpers.js @@ -0,0 +1,20 @@ +/** + * If you want to enable logs from datafeed set it to `true` + */ +var isLoggingEnabled = false; +export function logMessage(message) { + if (isLoggingEnabled) { + var now = new Date(); + // tslint:disable-next-line:no-console + console.log(now.toLocaleTimeString() + "." + now.getMilliseconds() + "> " + message); + } +} +export function getErrorMessage(error) { + if (error === undefined) { + return ''; + } + else if (typeof error === 'string') { + return error; + } + return error.message; +} diff --git a/public/datafeeds/udf/lib/history-provider.js b/public/datafeeds/udf/lib/history-provider.js new file mode 100644 index 00000000..e1d326ee --- /dev/null +++ b/public/datafeeds/udf/lib/history-provider.js @@ -0,0 +1,70 @@ +import { getErrorMessage, } from './helpers'; +var HistoryProvider = /** @class */ (function () { + function HistoryProvider(datafeedUrl, requester) { + this._datafeedUrl = datafeedUrl; + this._requester = requester; + } + HistoryProvider.prototype.getBars = function (symbolInfo, resolution, rangeStartDate, rangeEndDate) { + var _this = this; + var requestParams = { + symbol: symbolInfo.ticker || '', + resolution: resolution, + from: rangeStartDate, + to: rangeEndDate, + }; + if (symbolInfo.currency_code !== undefined) { + requestParams.currencyCode = symbolInfo.currency_code; + } + return new Promise(function (resolve, reject) { + _this._requester.sendRequest(_this._datafeedUrl, 'history', requestParams) + .then(function (response) { + if (response.s !== 'ok' && response.s !== 'no_data') { + reject(response.errmsg); + return; + } + var bars = []; + var meta = { + noData: false, + }; + if (response.s === 'no_data') { + meta.noData = true; + meta.nextTime = response.nextTime; + } + else { + var volumePresent = response.v !== undefined; + var ohlPresent = response.o !== undefined; + for (var i = 0; i < response.t.length; ++i) { + var barValue = { + time: response.t[i] * 1000, + close: parseFloat(response.c[i]), + open: parseFloat(response.c[i]), + high: parseFloat(response.c[i]), + low: parseFloat(response.c[i]), + }; + if (ohlPresent) { + barValue.open = parseFloat(response.o[i]); + barValue.high = parseFloat(response.h[i]); + barValue.low = parseFloat(response.l[i]); + } + if (volumePresent) { + barValue.volume = parseFloat(response.v[i]); + } + bars.push(barValue); + } + } + resolve({ + bars: bars, + meta: meta, + }); + }) + .catch(function (reason) { + var reasonString = getErrorMessage(reason); + // tslint:disable-next-line:no-console + console.warn("HistoryProvider: getBars() failed, error=" + reasonString); + reject(reasonString); + }); + }); + }; + return HistoryProvider; +}()); +export { HistoryProvider }; diff --git a/public/datafeeds/udf/lib/iquotes-provider.js b/public/datafeeds/udf/lib/iquotes-provider.js new file mode 100644 index 00000000..e69de29b diff --git a/public/datafeeds/udf/lib/quotes-provider.js b/public/datafeeds/udf/lib/quotes-provider.js new file mode 100644 index 00000000..1cdde2ca --- /dev/null +++ b/public/datafeeds/udf/lib/quotes-provider.js @@ -0,0 +1,28 @@ +import { getErrorMessage, logMessage, } from './helpers'; +var QuotesProvider = /** @class */ (function () { + function QuotesProvider(datafeedUrl, requester) { + this._datafeedUrl = datafeedUrl; + this._requester = requester; + } + QuotesProvider.prototype.getQuotes = function (symbols) { + var _this = this; + return new Promise(function (resolve, reject) { + _this._requester.sendRequest(_this._datafeedUrl, 'quotes', { symbols: symbols }) + .then(function (response) { + if (response.s === 'ok') { + resolve(response.d); + } + else { + reject(response.errmsg); + } + }) + .catch(function (error) { + var errorMessage = getErrorMessage(error); + logMessage("QuotesProvider: getQuotes failed, error=" + errorMessage); + reject("network error: " + errorMessage); + }); + }); + }; + return QuotesProvider; +}()); +export { QuotesProvider }; diff --git a/public/datafeeds/udf/lib/quotes-pulse-provider.js b/public/datafeeds/udf/lib/quotes-pulse-provider.js new file mode 100644 index 00000000..25ab79d7 --- /dev/null +++ b/public/datafeeds/udf/lib/quotes-pulse-provider.js @@ -0,0 +1,51 @@ +import { getErrorMessage, logMessage, } from './helpers'; +var QuotesPulseProvider = /** @class */ (function () { + function QuotesPulseProvider(quotesProvider) { + this._subscribers = {}; + this._requestsPending = 0; + this._quotesProvider = quotesProvider; + setInterval(this._updateQuotes.bind(this, 1 /* Fast */), 10000 /* Fast */); + setInterval(this._updateQuotes.bind(this, 0 /* General */), 60000 /* General */); + } + QuotesPulseProvider.prototype.subscribeQuotes = function (symbols, fastSymbols, onRealtimeCallback, listenerGuid) { + this._subscribers[listenerGuid] = { + symbols: symbols, + fastSymbols: fastSymbols, + listener: onRealtimeCallback, + }; + logMessage("QuotesPulseProvider: subscribed quotes with #" + listenerGuid); + }; + QuotesPulseProvider.prototype.unsubscribeQuotes = function (listenerGuid) { + delete this._subscribers[listenerGuid]; + logMessage("QuotesPulseProvider: unsubscribed quotes with #" + listenerGuid); + }; + QuotesPulseProvider.prototype._updateQuotes = function (updateType) { + var _this = this; + if (this._requestsPending > 0) { + return; + } + var _loop_1 = function (listenerGuid) { + this_1._requestsPending++; + var subscriptionRecord = this_1._subscribers[listenerGuid]; + this_1._quotesProvider.getQuotes(updateType === 1 /* Fast */ ? subscriptionRecord.fastSymbols : subscriptionRecord.symbols) + .then(function (data) { + _this._requestsPending--; + if (!_this._subscribers.hasOwnProperty(listenerGuid)) { + return; + } + subscriptionRecord.listener(data); + logMessage("QuotesPulseProvider: data for #" + listenerGuid + " (" + updateType + ") updated successfully, pending=" + _this._requestsPending); + }) + .catch(function (reason) { + _this._requestsPending--; + logMessage("QuotesPulseProvider: data for #" + listenerGuid + " (" + updateType + ") updated with error=" + getErrorMessage(reason) + ", pending=" + _this._requestsPending); + }); + }; + var this_1 = this; + for (var listenerGuid in this._subscribers) { + _loop_1(listenerGuid); + } + }; + return QuotesPulseProvider; +}()); +export { QuotesPulseProvider }; diff --git a/public/datafeeds/udf/lib/requester.js b/public/datafeeds/udf/lib/requester.js new file mode 100644 index 00000000..891adc16 --- /dev/null +++ b/public/datafeeds/udf/lib/requester.js @@ -0,0 +1,30 @@ +import { logMessage } from './helpers'; +var Requester = /** @class */ (function () { + function Requester(headers) { + if (headers) { + this._headers = headers; + } + } + Requester.prototype.sendRequest = function (datafeedUrl, urlPath, params) { + if (params !== undefined) { + var paramKeys = Object.keys(params); + if (paramKeys.length !== 0) { + urlPath += '?'; + } + urlPath += paramKeys.map(function (key) { + return encodeURIComponent(key) + "=" + encodeURIComponent(params[key].toString()); + }).join('&'); + } + logMessage('New request: ' + urlPath); + // Send user cookies if the URL is on the same origin as the calling script. + var options = { credentials: 'same-origin' }; + if (this._headers !== undefined) { + options.headers = this._headers; + } + return fetch(datafeedUrl + "/" + urlPath, options) + .then(function (response) { return response.text(); }) + .then(function (responseTest) { return JSON.parse(responseTest); }); + }; + return Requester; +}()); +export { Requester }; diff --git a/public/datafeeds/udf/lib/symbols-storage.js b/public/datafeeds/udf/lib/symbols-storage.js new file mode 100644 index 00000000..5c164c5b --- /dev/null +++ b/public/datafeeds/udf/lib/symbols-storage.js @@ -0,0 +1,186 @@ +import { getErrorMessage, logMessage, } from './helpers'; +function extractField(data, field, arrayIndex, valueIsArray) { + var value = data[field]; + if (Array.isArray(value) && (!valueIsArray || Array.isArray(value[0]))) { + return value[arrayIndex]; + } + return value; +} +function symbolWithCurrencyKey(symbol, currency) { + // here we're using a separator that quite possible shouldn't be in a real symbol name + return symbol + (currency !== undefined ? '_%|#|%_' + currency : ''); +} +var SymbolsStorage = /** @class */ (function () { + function SymbolsStorage(datafeedUrl, datafeedSupportedResolutions, requester) { + this._exchangesList = ['NYSE', 'FOREX', 'AMEX']; + this._symbolsInfo = {}; + this._symbolsList = []; + this._datafeedUrl = datafeedUrl; + this._datafeedSupportedResolutions = datafeedSupportedResolutions; + this._requester = requester; + this._readyPromise = this._init(); + this._readyPromise.catch(function (error) { + // seems it is impossible + // tslint:disable-next-line:no-console + console.error("SymbolsStorage: Cannot init, error=" + error.toString()); + }); + } + // BEWARE: this function does not consider symbol's exchange + SymbolsStorage.prototype.resolveSymbol = function (symbolName, currencyCode) { + var _this = this; + return this._readyPromise.then(function () { + var symbolInfo = _this._symbolsInfo[symbolWithCurrencyKey(symbolName, currencyCode)]; + if (symbolInfo === undefined) { + return Promise.reject('invalid symbol'); + } + return Promise.resolve(symbolInfo); + }); + }; + SymbolsStorage.prototype.searchSymbols = function (searchString, exchange, symbolType, maxSearchResults) { + var _this = this; + return this._readyPromise.then(function () { + var weightedResult = []; + var queryIsEmpty = searchString.length === 0; + searchString = searchString.toUpperCase(); + var _loop_1 = function (symbolName) { + var symbolInfo = _this._symbolsInfo[symbolName]; + if (symbolInfo === undefined) { + return "continue"; + } + if (symbolType.length > 0 && symbolInfo.type !== symbolType) { + return "continue"; + } + if (exchange && exchange.length > 0 && symbolInfo.exchange !== exchange) { + return "continue"; + } + var positionInName = symbolInfo.name.toUpperCase().indexOf(searchString); + var positionInDescription = symbolInfo.description.toUpperCase().indexOf(searchString); + if (queryIsEmpty || positionInName >= 0 || positionInDescription >= 0) { + var alreadyExists = weightedResult.some(function (item) { return item.symbolInfo === symbolInfo; }); + if (!alreadyExists) { + var weight = positionInName >= 0 ? positionInName : 8000 + positionInDescription; + weightedResult.push({ symbolInfo: symbolInfo, weight: weight }); + } + } + }; + for (var _i = 0, _a = _this._symbolsList; _i < _a.length; _i++) { + var symbolName = _a[_i]; + _loop_1(symbolName); + } + var result = weightedResult + .sort(function (item1, item2) { return item1.weight - item2.weight; }) + .slice(0, maxSearchResults) + .map(function (item) { + var symbolInfo = item.symbolInfo; + return { + symbol: symbolInfo.name, + full_name: symbolInfo.full_name, + description: symbolInfo.description, + exchange: symbolInfo.exchange, + params: [], + type: symbolInfo.type, + ticker: symbolInfo.name, + }; + }); + return Promise.resolve(result); + }); + }; + SymbolsStorage.prototype._init = function () { + var _this = this; + var promises = []; + var alreadyRequestedExchanges = {}; + for (var _i = 0, _a = this._exchangesList; _i < _a.length; _i++) { + var exchange = _a[_i]; + if (alreadyRequestedExchanges[exchange]) { + continue; + } + alreadyRequestedExchanges[exchange] = true; + promises.push(this._requestExchangeData(exchange)); + } + return Promise.all(promises) + .then(function () { + _this._symbolsList.sort(); + logMessage('SymbolsStorage: All exchanges data loaded'); + }); + }; + SymbolsStorage.prototype._requestExchangeData = function (exchange) { + var _this = this; + return new Promise(function (resolve, reject) { + _this._requester.sendRequest(_this._datafeedUrl, 'symbol_info', { group: exchange }) + .then(function (response) { + try { + _this._onExchangeDataReceived(exchange, response); + } + catch (error) { + reject(error); + return; + } + resolve(); + }) + .catch(function (reason) { + logMessage("SymbolsStorage: Request data for exchange '" + exchange + "' failed, reason=" + getErrorMessage(reason)); + resolve(); + }); + }); + }; + SymbolsStorage.prototype._onExchangeDataReceived = function (exchange, data) { + var symbolIndex = 0; + try { + var symbolsCount = data.symbol.length; + var tickerPresent = data.ticker !== undefined; + for (; symbolIndex < symbolsCount; ++symbolIndex) { + var symbolName = data.symbol[symbolIndex]; + var listedExchange = extractField(data, 'exchange-listed', symbolIndex); + var tradedExchange = extractField(data, 'exchange-traded', symbolIndex); + var fullName = tradedExchange + ':' + symbolName; + var currencyCode = extractField(data, 'currency-code', symbolIndex); + var ticker = tickerPresent ? extractField(data, 'ticker', symbolIndex) : symbolName; + var symbolInfo = { + ticker: ticker, + name: symbolName, + base_name: [listedExchange + ':' + symbolName], + full_name: fullName, + listed_exchange: listedExchange, + exchange: tradedExchange, + currency_code: currencyCode, + original_currency_code: extractField(data, 'original-currency-code', symbolIndex), + description: extractField(data, 'description', symbolIndex), + has_intraday: definedValueOrDefault(extractField(data, 'has-intraday', symbolIndex), false), + has_no_volume: definedValueOrDefault(extractField(data, 'has-no-volume', symbolIndex), false), + minmov: extractField(data, 'minmovement', symbolIndex) || extractField(data, 'minmov', symbolIndex) || 0, + minmove2: extractField(data, 'minmove2', symbolIndex) || extractField(data, 'minmov2', symbolIndex), + fractional: extractField(data, 'fractional', symbolIndex), + pricescale: extractField(data, 'pricescale', symbolIndex), + type: extractField(data, 'type', symbolIndex), + session: extractField(data, 'session-regular', symbolIndex), + timezone: extractField(data, 'timezone', symbolIndex), + supported_resolutions: definedValueOrDefault(extractField(data, 'supported-resolutions', symbolIndex, true), this._datafeedSupportedResolutions), + force_session_rebuild: extractField(data, 'force-session-rebuild', symbolIndex), + has_daily: definedValueOrDefault(extractField(data, 'has-daily', symbolIndex), true), + intraday_multipliers: definedValueOrDefault(extractField(data, 'intraday-multipliers', symbolIndex, true), ['1', '5', '15', '30', '60']), + has_weekly_and_monthly: extractField(data, 'has-weekly-and-monthly', symbolIndex), + has_empty_bars: extractField(data, 'has-empty-bars', symbolIndex), + volume_precision: definedValueOrDefault(extractField(data, 'volume-precision', symbolIndex), 0), + format: 'price', + }; + this._symbolsInfo[ticker] = symbolInfo; + this._symbolsInfo[symbolName] = symbolInfo; + this._symbolsInfo[fullName] = symbolInfo; + if (currencyCode !== undefined) { + this._symbolsInfo[symbolWithCurrencyKey(ticker, currencyCode)] = symbolInfo; + this._symbolsInfo[symbolWithCurrencyKey(symbolName, currencyCode)] = symbolInfo; + this._symbolsInfo[symbolWithCurrencyKey(fullName, currencyCode)] = symbolInfo; + } + this._symbolsList.push(symbolName); + } + } + catch (error) { + throw new Error("SymbolsStorage: API error when processing exchange " + exchange + " symbol #" + symbolIndex + " (" + data.symbol[symbolIndex] + "): " + error.message); + } + }; + return SymbolsStorage; +}()); +export { SymbolsStorage }; +function definedValueOrDefault(value, defaultValue) { + return value !== undefined ? value : defaultValue; +} diff --git a/public/datafeeds/udf/lib/udf-compatible-datafeed-base.js b/public/datafeeds/udf/lib/udf-compatible-datafeed-base.js new file mode 100644 index 00000000..b5ac9fb1 --- /dev/null +++ b/public/datafeeds/udf/lib/udf-compatible-datafeed-base.js @@ -0,0 +1,256 @@ +import { getErrorMessage, logMessage, } from './helpers'; +import { HistoryProvider, } from './history-provider'; +import { DataPulseProvider } from './data-pulse-provider'; +import { QuotesPulseProvider } from './quotes-pulse-provider'; +import { SymbolsStorage } from './symbols-storage'; +function extractField(data, field, arrayIndex) { + var value = data[field]; + return Array.isArray(value) ? value[arrayIndex] : value; +} +/** + * This class implements interaction with UDF-compatible datafeed. + * See UDF protocol reference at https://github.com/tradingview/charting_library/wiki/UDF + */ +var UDFCompatibleDatafeedBase = /** @class */ (function () { + function UDFCompatibleDatafeedBase(datafeedURL, quotesProvider, requester, updateFrequency) { + var _this = this; + if (updateFrequency === void 0) { updateFrequency = 10 * 1000; } + this._configuration = defaultConfiguration(); + this._symbolsStorage = null; + this._datafeedURL = datafeedURL; + this._requester = requester; + this._historyProvider = new HistoryProvider(datafeedURL, this._requester); + this._quotesProvider = quotesProvider; + this._dataPulseProvider = new DataPulseProvider(this._historyProvider, updateFrequency); + this._quotesPulseProvider = new QuotesPulseProvider(this._quotesProvider); + this._configurationReadyPromise = this._requestConfiguration() + .then(function (configuration) { + if (configuration === null) { + configuration = defaultConfiguration(); + } + _this._setupWithConfiguration(configuration); + }); + } + UDFCompatibleDatafeedBase.prototype.onReady = function (callback) { + var _this = this; + this._configurationReadyPromise.then(function () { + callback(_this._configuration); + }); + }; + UDFCompatibleDatafeedBase.prototype.getQuotes = function (symbols, onDataCallback, onErrorCallback) { + this._quotesProvider.getQuotes(symbols).then(onDataCallback).catch(onErrorCallback); + }; + UDFCompatibleDatafeedBase.prototype.subscribeQuotes = function (symbols, fastSymbols, onRealtimeCallback, listenerGuid) { + this._quotesPulseProvider.subscribeQuotes(symbols, fastSymbols, onRealtimeCallback, listenerGuid); + }; + UDFCompatibleDatafeedBase.prototype.unsubscribeQuotes = function (listenerGuid) { + this._quotesPulseProvider.unsubscribeQuotes(listenerGuid); + }; + UDFCompatibleDatafeedBase.prototype.calculateHistoryDepth = function (resolution, resolutionBack, intervalBack) { + return undefined; + }; + UDFCompatibleDatafeedBase.prototype.getMarks = function (symbolInfo, from, to, onDataCallback, resolution) { + if (!this._configuration.supports_marks) { + return; + } + var requestParams = { + symbol: symbolInfo.ticker || '', + from: from, + to: to, + resolution: resolution, + }; + this._send('marks', requestParams) + .then(function (response) { + if (!Array.isArray(response)) { + var result = []; + for (var i = 0; i < response.id.length; ++i) { + result.push({ + id: extractField(response, 'id', i), + time: extractField(response, 'time', i), + color: extractField(response, 'color', i), + text: extractField(response, 'text', i), + label: extractField(response, 'label', i), + labelFontColor: extractField(response, 'labelFontColor', i), + minSize: extractField(response, 'minSize', i), + }); + } + response = result; + } + onDataCallback(response); + }) + .catch(function (error) { + logMessage("UdfCompatibleDatafeed: Request marks failed: " + getErrorMessage(error)); + onDataCallback([]); + }); + }; + UDFCompatibleDatafeedBase.prototype.getTimescaleMarks = function (symbolInfo, from, to, onDataCallback, resolution) { + if (!this._configuration.supports_timescale_marks) { + return; + } + var requestParams = { + symbol: symbolInfo.ticker || '', + from: from, + to: to, + resolution: resolution, + }; + this._send('timescale_marks', requestParams) + .then(function (response) { + if (!Array.isArray(response)) { + var result = []; + for (var i = 0; i < response.id.length; ++i) { + result.push({ + id: extractField(response, 'id', i), + time: extractField(response, 'time', i), + color: extractField(response, 'color', i), + label: extractField(response, 'label', i), + tooltip: extractField(response, 'tooltip', i), + }); + } + response = result; + } + onDataCallback(response); + }) + .catch(function (error) { + logMessage("UdfCompatibleDatafeed: Request timescale marks failed: " + getErrorMessage(error)); + onDataCallback([]); + }); + }; + UDFCompatibleDatafeedBase.prototype.getServerTime = function (callback) { + if (!this._configuration.supports_time) { + return; + } + this._send('time') + .then(function (response) { + var time = parseInt(response); + if (!isNaN(time)) { + callback(time); + } + }) + .catch(function (error) { + logMessage("UdfCompatibleDatafeed: Fail to load server time, error=" + getErrorMessage(error)); + }); + }; + UDFCompatibleDatafeedBase.prototype.searchSymbols = function (userInput, exchange, symbolType, onResult) { + if (this._configuration.supports_search) { + var params = { + limit: 30 /* SearchItemsLimit */, + query: userInput.toUpperCase(), + type: symbolType, + exchange: exchange, + }; + this._send('search', params) + .then(function (response) { + if (response.s !== undefined) { + logMessage("UdfCompatibleDatafeed: search symbols error=" + response.errmsg); + onResult([]); + return; + } + onResult(response); + }) + .catch(function (reason) { + logMessage("UdfCompatibleDatafeed: Search symbols for '" + userInput + "' failed. Error=" + getErrorMessage(reason)); + onResult([]); + }); + } + else { + if (this._symbolsStorage === null) { + throw new Error('UdfCompatibleDatafeed: inconsistent configuration (symbols storage)'); + } + this._symbolsStorage.searchSymbols(userInput, exchange, symbolType, 30 /* SearchItemsLimit */) + .then(onResult) + .catch(onResult.bind(null, [])); + } + }; + UDFCompatibleDatafeedBase.prototype.resolveSymbol = function (symbolName, onResolve, onError, extension) { + logMessage('Resolve requested'); + var currencyCode = extension && extension.currencyCode; + var resolveRequestStartTime = Date.now(); + function onResultReady(symbolInfo) { + logMessage("Symbol resolved: " + (Date.now() - resolveRequestStartTime) + "ms"); + onResolve(symbolInfo); + } + if (!this._configuration.supports_group_request) { + var params = { + symbol: symbolName, + }; + if (currencyCode !== undefined) { + params.currencyCode = currencyCode; + } + this._send('symbols', params) + .then(function (response) { + if (response.s !== undefined) { + onError('unknown_symbol'); + } + else { + onResultReady(response); + } + }) + .catch(function (reason) { + logMessage("UdfCompatibleDatafeed: Error resolving symbol: " + getErrorMessage(reason)); + onError('unknown_symbol'); + }); + } + else { + if (this._symbolsStorage === null) { + throw new Error('UdfCompatibleDatafeed: inconsistent configuration (symbols storage)'); + } + this._symbolsStorage.resolveSymbol(symbolName, currencyCode).then(onResultReady).catch(onError); + } + }; + UDFCompatibleDatafeedBase.prototype.getBars = function (symbolInfo, resolution, rangeStartDate, rangeEndDate, onResult, onError) { + this._historyProvider.getBars(symbolInfo, resolution, rangeStartDate, rangeEndDate) + .then(function (result) { + onResult(result.bars, result.meta); + }) + .catch(onError); + }; + UDFCompatibleDatafeedBase.prototype.subscribeBars = function (symbolInfo, resolution, onTick, listenerGuid, onResetCacheNeededCallback) { + this._dataPulseProvider.subscribeBars(symbolInfo, resolution, onTick, listenerGuid); + }; + UDFCompatibleDatafeedBase.prototype.unsubscribeBars = function (listenerGuid) { + this._dataPulseProvider.unsubscribeBars(listenerGuid); + }; + UDFCompatibleDatafeedBase.prototype._requestConfiguration = function () { + return this._send('config') + .catch(function (reason) { + logMessage("UdfCompatibleDatafeed: Cannot get datafeed configuration - use default, error=" + getErrorMessage(reason)); + return null; + }); + }; + UDFCompatibleDatafeedBase.prototype._send = function (urlPath, params) { + return this._requester.sendRequest(this._datafeedURL, urlPath, params); + }; + UDFCompatibleDatafeedBase.prototype._setupWithConfiguration = function (configurationData) { + this._configuration = configurationData; + if (configurationData.exchanges === undefined) { + configurationData.exchanges = []; + } + if (!configurationData.supports_search && !configurationData.supports_group_request) { + throw new Error('Unsupported datafeed configuration. Must either support search, or support group request'); + } + if (configurationData.supports_group_request || !configurationData.supports_search) { + this._symbolsStorage = new SymbolsStorage(this._datafeedURL, configurationData.supported_resolutions || [], this._requester); + } + logMessage("UdfCompatibleDatafeed: Initialized with " + JSON.stringify(configurationData)); + }; + return UDFCompatibleDatafeedBase; +}()); +export { UDFCompatibleDatafeedBase }; +function defaultConfiguration() { + return { + supports_search: false, + supports_group_request: true, + supported_resolutions: [ + '1', + '5', + '15', + '30', + '60', + '1D', + '1W', + '1M', + ], + supports_marks: false, + supports_timescale_marks: false, + }; +} diff --git a/public/datafeeds/udf/lib/udf-compatible-datafeed.js b/public/datafeeds/udf/lib/udf-compatible-datafeed.js new file mode 100644 index 00000000..9c247d07 --- /dev/null +++ b/public/datafeeds/udf/lib/udf-compatible-datafeed.js @@ -0,0 +1,17 @@ +import { __extends } from "tslib"; +import { UDFCompatibleDatafeedBase } from './udf-compatible-datafeed-base'; +import { QuotesProvider } from './quotes-provider'; +import { Requester } from './requester'; +var UDFCompatibleDatafeed = /** @class */ (function (_super) { + __extends(UDFCompatibleDatafeed, _super); + function UDFCompatibleDatafeed(datafeedURL, updateFrequency) { + if (updateFrequency === void 0) { updateFrequency = 10 * 1000; } + var _this = this; + var requester = new Requester(); + var quotesProvider = new QuotesProvider(datafeedURL, requester); + _this = _super.call(this, datafeedURL, quotesProvider, requester, updateFrequency) || this; + return _this; + } + return UDFCompatibleDatafeed; +}(UDFCompatibleDatafeedBase)); +export { UDFCompatibleDatafeed }; diff --git a/public/datafeeds/udf/package.json b/public/datafeeds/udf/package.json new file mode 100644 index 00000000..05584832 --- /dev/null +++ b/public/datafeeds/udf/package.json @@ -0,0 +1,20 @@ +{ + "private": true, + "dependencies": { + "promise-polyfill": "6.0.2", + "tslib": "1.11.1", + "whatwg-fetch": "2.0.3" + }, + "devDependencies": { + "rollup": "0.49.2", + "rollup-plugin-buble": "0.15.0", + "rollup-plugin-node-resolve": "3.0.0", + "rollup-plugin-uglify": "2.0.1", + "typescript": "3.9.6" + }, + "scripts": { + "compile": "tsc", + "bundle-js": "rollup -c rollup.config.js", + "build": "npm run compile && npm run bundle-js" + } +} diff --git a/public/datafeeds/udf/rollup.config.js b/public/datafeeds/udf/rollup.config.js new file mode 100644 index 00000000..4b958ddf --- /dev/null +++ b/public/datafeeds/udf/rollup.config.js @@ -0,0 +1,39 @@ +/* globals process */ + +var buble = require('rollup-plugin-buble'); +var uglify = require('rollup-plugin-uglify'); +var nodeResolve = require('rollup-plugin-node-resolve'); + +var environment = process.env.ENV || 'development'; +var isDevelopmentEnv = (environment === 'development'); + +module.exports = [ + { + input: 'lib/udf-compatible-datafeed.js', + name: 'Datafeeds', + sourceMap: false, + output: { + format: 'umd', + file: 'dist/bundle.js', + }, + plugins: [ + nodeResolve({ jsnext: true, main: true }), + buble(), + !isDevelopmentEnv && uglify({ output: { inline_script: true } }), + ], + }, + { + input: 'src/polyfills.es6', + sourceMap: false, + context: 'window', + output: { + format: 'iife', + file: 'dist/polyfills.js', + }, + plugins: [ + nodeResolve({ jsnext: true, main: true }), + buble(), + uglify({ output: { inline_script: true } }), + ], + }, +]; diff --git a/public/datafeeds/udf/src/data-pulse-provider.ts b/public/datafeeds/udf/src/data-pulse-provider.ts new file mode 100644 index 00000000..73ea4b4e --- /dev/null +++ b/public/datafeeds/udf/src/data-pulse-provider.ts @@ -0,0 +1,144 @@ +import { + LibrarySymbolInfo, + SubscribeBarsCallback, +} from '../../../charting_library/datafeed-api'; + +import { + GetBarsResult, + HistoryProvider, +} from './history-provider'; + +import { + getErrorMessage, + logMessage, +} from './helpers'; + +interface DataSubscriber { + symbolInfo: LibrarySymbolInfo; + resolution: string; + lastBarTime: number | null; + listener: SubscribeBarsCallback; +} + +interface DataSubscribers { + [guid: string]: DataSubscriber; +} + +export class DataPulseProvider { + private readonly _subscribers: DataSubscribers = {}; + private _requestsPending: number = 0; + private readonly _historyProvider: HistoryProvider; + + public constructor(historyProvider: HistoryProvider, updateFrequency: number) { + this._historyProvider = historyProvider; + setInterval(this._updateData.bind(this), updateFrequency); + } + + public subscribeBars(symbolInfo: LibrarySymbolInfo, resolution: string, newDataCallback: SubscribeBarsCallback, listenerGuid: string): void { + if (this._subscribers.hasOwnProperty(listenerGuid)) { + logMessage(`DataPulseProvider: already has subscriber with id=${listenerGuid}`); + return; + } + + this._subscribers[listenerGuid] = { + lastBarTime: null, + listener: newDataCallback, + resolution: resolution, + symbolInfo: symbolInfo, + }; + + logMessage(`DataPulseProvider: subscribed for #${listenerGuid} - {${symbolInfo.name}, ${resolution}}`); + } + + public unsubscribeBars(listenerGuid: string): void { + delete this._subscribers[listenerGuid]; + logMessage(`DataPulseProvider: unsubscribed for #${listenerGuid}`); + } + + private _updateData(): void { + if (this._requestsPending > 0) { + return; + } + + this._requestsPending = 0; + for (const listenerGuid in this._subscribers) { // tslint:disable-line:forin + this._requestsPending += 1; + this._updateDataForSubscriber(listenerGuid) + .then(() => { + this._requestsPending -= 1; + logMessage(`DataPulseProvider: data for #${listenerGuid} updated successfully, pending=${this._requestsPending}`); + }) + .catch((reason?: string | Error) => { + this._requestsPending -= 1; + logMessage(`DataPulseProvider: data for #${listenerGuid} updated with error=${getErrorMessage(reason)}, pending=${this._requestsPending}`); + }); + } + } + + private _updateDataForSubscriber(listenerGuid: string): Promise { + const subscriptionRecord = this._subscribers[listenerGuid]; + + const rangeEndTime = parseInt((Date.now() / 1000).toString()); + + // BEWARE: please note we really need 2 bars, not the only last one + // see the explanation below. `10` is the `large enough` value to work around holidays + const rangeStartTime = rangeEndTime - periodLengthSeconds(subscriptionRecord.resolution, 10); + + return this._historyProvider.getBars(subscriptionRecord.symbolInfo, subscriptionRecord.resolution, rangeStartTime, rangeEndTime) + .then((result: GetBarsResult) => { + this._onSubscriberDataReceived(listenerGuid, result); + }); + } + + private _onSubscriberDataReceived(listenerGuid: string, result: GetBarsResult): void { + // means the subscription was cancelled while waiting for data + if (!this._subscribers.hasOwnProperty(listenerGuid)) { + logMessage(`DataPulseProvider: Data comes for already unsubscribed subscription #${listenerGuid}`); + return; + } + + const bars = result.bars; + if (bars.length === 0) { + return; + } + + const lastBar = bars[bars.length - 1]; + const subscriptionRecord = this._subscribers[listenerGuid]; + + if (subscriptionRecord.lastBarTime !== null && lastBar.time < subscriptionRecord.lastBarTime) { + return; + } + + const isNewBar = subscriptionRecord.lastBarTime !== null && lastBar.time > subscriptionRecord.lastBarTime; + + // Pulse updating may miss some trades data (ie, if pulse period = 10 secods and new bar is started 5 seconds later after the last update, the + // old bar's last 5 seconds trades will be lost). Thus, at fist we should broadcast old bar updates when it's ready. + if (isNewBar) { + if (bars.length < 2) { + throw new Error('Not enough bars in history for proper pulse update. Need at least 2.'); + } + + const previousBar = bars[bars.length - 2]; + subscriptionRecord.listener(previousBar); + } + + subscriptionRecord.lastBarTime = lastBar.time; + subscriptionRecord.listener(lastBar); + } +} + +function periodLengthSeconds(resolution: string, requiredPeriodsCount: number): number { + let daysCount = 0; + + if (resolution === 'D' || resolution === '1D') { + daysCount = requiredPeriodsCount; + } else if (resolution === 'M' || resolution === '1M') { + daysCount = 31 * requiredPeriodsCount; + } else if (resolution === 'W' || resolution === '1W') { + daysCount = 7 * requiredPeriodsCount; + } else { + daysCount = requiredPeriodsCount * parseInt(resolution) / (24 * 60); + } + + return daysCount * 24 * 60 * 60; +} diff --git a/public/datafeeds/udf/src/helpers.ts b/public/datafeeds/udf/src/helpers.ts new file mode 100644 index 00000000..5bcc60bb --- /dev/null +++ b/public/datafeeds/udf/src/helpers.ts @@ -0,0 +1,38 @@ +export interface RequestParams { + [paramName: string]: string | string[] | number; +} + +export interface UdfResponse { + s: string; +} + +export interface UdfOkResponse extends UdfResponse { + s: 'ok'; +} + +export interface UdfErrorResponse { + s: 'error'; + errmsg: string; +} + +/** + * If you want to enable logs from datafeed set it to `true` + */ +const isLoggingEnabled = false; +export function logMessage(message: string): void { + if (isLoggingEnabled) { + const now = new Date(); + // tslint:disable-next-line:no-console + console.log(`${now.toLocaleTimeString()}.${now.getMilliseconds()}> ${message}`); + } +} + +export function getErrorMessage(error: string | Error | undefined): string { + if (error === undefined) { + return ''; + } else if (typeof error === 'string') { + return error; + } + + return error.message; +} diff --git a/public/datafeeds/udf/src/history-provider.ts b/public/datafeeds/udf/src/history-provider.ts new file mode 100644 index 00000000..b4f723fb --- /dev/null +++ b/public/datafeeds/udf/src/history-provider.ts @@ -0,0 +1,124 @@ +import { + Bar, + HistoryMetadata, + LibrarySymbolInfo, +} from '../../../charting_library/datafeed-api'; + +import { + getErrorMessage, + RequestParams, + UdfErrorResponse, + UdfOkResponse, + UdfResponse, +} from './helpers'; + +import { Requester } from './requester'; +// tslint:disable: no-any +interface HistoryPartialDataResponse extends UdfOkResponse { + t: any; + c: any; + o?: never; + h?: never; + l?: never; + v?: never; +} + +interface HistoryFullDataResponse extends UdfOkResponse { + t: any; + c: any; + o: any; + h: any; + l: any; + v: any; +} +// tslint:enable: no-any +interface HistoryNoDataResponse extends UdfResponse { + s: 'no_data'; + nextTime?: number; +} + +type HistoryResponse = HistoryFullDataResponse | HistoryPartialDataResponse | HistoryNoDataResponse; + +export interface GetBarsResult { + bars: Bar[]; + meta: HistoryMetadata; +} + +export class HistoryProvider { + private _datafeedUrl: string; + private readonly _requester: Requester; + + public constructor(datafeedUrl: string, requester: Requester) { + this._datafeedUrl = datafeedUrl; + this._requester = requester; + } + + public getBars(symbolInfo: LibrarySymbolInfo, resolution: string, rangeStartDate: number, rangeEndDate: number): Promise { + const requestParams: RequestParams = { + symbol: symbolInfo.ticker || '', + resolution: resolution, + from: rangeStartDate, + to: rangeEndDate, + }; + + if (symbolInfo.currency_code !== undefined) { + requestParams.currencyCode = symbolInfo.currency_code; + } + + return new Promise((resolve: (result: GetBarsResult) => void, reject: (reason: string) => void) => { + this._requester.sendRequest(this._datafeedUrl, 'history', requestParams) + .then((response: HistoryResponse | UdfErrorResponse) => { + if (response.s !== 'ok' && response.s !== 'no_data') { + reject(response.errmsg); + return; + } + + const bars: Bar[] = []; + const meta: HistoryMetadata = { + noData: false, + }; + + if (response.s === 'no_data') { + meta.noData = true; + meta.nextTime = response.nextTime; + } else { + const volumePresent = response.v !== undefined; + const ohlPresent = response.o !== undefined; + + for (let i = 0; i < response.t.length; ++i) { + const barValue: Bar = { + time: response.t[i] * 1000, + close: parseFloat(response.c[i]), + open: parseFloat(response.c[i]), + high: parseFloat(response.c[i]), + low: parseFloat(response.c[i]), + }; + + if (ohlPresent) { + barValue.open = parseFloat((response as HistoryFullDataResponse).o[i]); + barValue.high = parseFloat((response as HistoryFullDataResponse).h[i]); + barValue.low = parseFloat((response as HistoryFullDataResponse).l[i]); + } + + if (volumePresent) { + barValue.volume = parseFloat((response as HistoryFullDataResponse).v[i]); + } + + bars.push(barValue); + } + } + + resolve({ + bars: bars, + meta: meta, + }); + }) + .catch((reason?: string | Error) => { + const reasonString = getErrorMessage(reason); + // tslint:disable-next-line:no-console + console.warn(`HistoryProvider: getBars() failed, error=${reasonString}`); + reject(reasonString); + }); + }); + } +} diff --git a/public/datafeeds/udf/src/iquotes-provider.ts b/public/datafeeds/udf/src/iquotes-provider.ts new file mode 100644 index 00000000..23702f19 --- /dev/null +++ b/public/datafeeds/udf/src/iquotes-provider.ts @@ -0,0 +1,14 @@ +import { QuoteData } from '../../../charting_library/datafeed-api'; + +import { + UdfOkResponse, +} from './helpers'; + +export interface UdfQuotesResponse extends UdfOkResponse { + d: QuoteData[]; +} + +export interface IQuotesProvider { + // tslint:disable-next-line:variable-name tv-variable-name + getQuotes(symbols: string[]): Promise; +} diff --git a/public/datafeeds/udf/src/polyfills.es6 b/public/datafeeds/udf/src/polyfills.es6 new file mode 100644 index 00000000..471a1563 --- /dev/null +++ b/public/datafeeds/udf/src/polyfills.es6 @@ -0,0 +1,2 @@ +import 'promise-polyfill'; +import 'whatwg-fetch'; diff --git a/public/datafeeds/udf/src/quotes-provider.ts b/public/datafeeds/udf/src/quotes-provider.ts new file mode 100644 index 00000000..6e07070f --- /dev/null +++ b/public/datafeeds/udf/src/quotes-provider.ts @@ -0,0 +1,37 @@ +import { UdfQuotesResponse, IQuotesProvider } from './iquotes-provider'; +import { QuoteData } from '../../../charting_library/datafeed-api'; + +import { + getErrorMessage, + logMessage, + UdfErrorResponse, +} from './helpers'; +import { Requester } from './requester'; + +export class QuotesProvider implements IQuotesProvider { + private readonly _datafeedUrl: string; + private readonly _requester: Requester; + + public constructor(datafeedUrl: string, requester: Requester) { + this._datafeedUrl = datafeedUrl; + this._requester = requester; + } + + public getQuotes(symbols: string[]): Promise { + return new Promise((resolve: (data: QuoteData[]) => void, reject: (reason: string) => void) => { + this._requester.sendRequest(this._datafeedUrl, 'quotes', { symbols: symbols }) + .then((response: UdfQuotesResponse | UdfErrorResponse) => { + if (response.s === 'ok') { + resolve(response.d); + } else { + reject(response.errmsg); + } + }) + .catch((error?: string | Error) => { + const errorMessage = getErrorMessage(error); + logMessage(`QuotesProvider: getQuotes failed, error=${errorMessage}`); + reject(`network error: ${errorMessage}`); + }); + }); + } +} diff --git a/public/datafeeds/udf/src/quotes-pulse-provider.ts b/public/datafeeds/udf/src/quotes-pulse-provider.ts new file mode 100644 index 00000000..2f5581ac --- /dev/null +++ b/public/datafeeds/udf/src/quotes-pulse-provider.ts @@ -0,0 +1,85 @@ +import { + QuoteData, + QuotesCallback, +} from '../../../charting_library/datafeed-api'; + +import { + getErrorMessage, + logMessage, +} from './helpers'; + +import { IQuotesProvider } from './iquotes-provider'; + +interface QuoteSubscriber { + symbols: string[]; + fastSymbols: string[]; + listener: QuotesCallback; +} + +interface QuoteSubscribers { + [listenerId: string]: QuoteSubscriber; +} + +const enum SymbolsType { + General, + Fast, +} + +const enum UpdateTimeouts { + Fast = 10 * 1000, + General = 60 * 1000, +} + +export class QuotesPulseProvider { + private readonly _quotesProvider: IQuotesProvider; + private readonly _subscribers: QuoteSubscribers = {}; + private _requestsPending: number = 0; + + public constructor(quotesProvider: IQuotesProvider) { + this._quotesProvider = quotesProvider; + + setInterval(this._updateQuotes.bind(this, SymbolsType.Fast), UpdateTimeouts.Fast); + setInterval(this._updateQuotes.bind(this, SymbolsType.General), UpdateTimeouts.General); + } + + public subscribeQuotes(symbols: string[], fastSymbols: string[], onRealtimeCallback: QuotesCallback, listenerGuid: string): void { + this._subscribers[listenerGuid] = { + symbols: symbols, + fastSymbols: fastSymbols, + listener: onRealtimeCallback, + }; + + logMessage(`QuotesPulseProvider: subscribed quotes with #${listenerGuid}`); + } + + public unsubscribeQuotes(listenerGuid: string): void { + delete this._subscribers[listenerGuid]; + logMessage(`QuotesPulseProvider: unsubscribed quotes with #${listenerGuid}`); + } + + private _updateQuotes(updateType: SymbolsType): void { + if (this._requestsPending > 0) { + return; + } + + for (const listenerGuid in this._subscribers) { // tslint:disable-line:forin + this._requestsPending++; + + const subscriptionRecord = this._subscribers[listenerGuid]; + this._quotesProvider.getQuotes(updateType === SymbolsType.Fast ? subscriptionRecord.fastSymbols : subscriptionRecord.symbols) + .then((data: QuoteData[]) => { + this._requestsPending--; + if (!this._subscribers.hasOwnProperty(listenerGuid)) { + return; + } + + subscriptionRecord.listener(data); + logMessage(`QuotesPulseProvider: data for #${listenerGuid} (${updateType}) updated successfully, pending=${this._requestsPending}`); + }) + .catch((reason?: string | Error) => { + this._requestsPending--; + logMessage(`QuotesPulseProvider: data for #${listenerGuid} (${updateType}) updated with error=${getErrorMessage(reason)}, pending=${this._requestsPending}`); + }); + } + } +} diff --git a/public/datafeeds/udf/src/requester.ts b/public/datafeeds/udf/src/requester.ts new file mode 100644 index 00000000..f6fc7378 --- /dev/null +++ b/public/datafeeds/udf/src/requester.ts @@ -0,0 +1,39 @@ +import { RequestParams, UdfResponse, UdfErrorResponse, logMessage } from './helpers'; + +export class Requester { + private _headers: HeadersInit | undefined; + + public constructor(headers?: HeadersInit) { + if (headers) { + this._headers = headers; + } + } + + public sendRequest(datafeedUrl: string, urlPath: string, params?: RequestParams): Promise; + public sendRequest(datafeedUrl: string, urlPath: string, params?: RequestParams): Promise; + public sendRequest(datafeedUrl: string, urlPath: string, params?: RequestParams): Promise { + if (params !== undefined) { + const paramKeys = Object.keys(params); + if (paramKeys.length !== 0) { + urlPath += '?'; + } + + urlPath += paramKeys.map((key: string) => { + return `${encodeURIComponent(key)}=${encodeURIComponent(params[key].toString())}`; + }).join('&'); + } + + logMessage('New request: ' + urlPath); + + // Send user cookies if the URL is on the same origin as the calling script. + const options: RequestInit = { credentials: 'same-origin' }; + + if (this._headers !== undefined) { + options.headers = this._headers; + } + + return fetch(`${datafeedUrl}/${urlPath}`, options) + .then((response: Response) => response.text()) + .then((responseTest: string) => JSON.parse(responseTest)); + } +} diff --git a/public/datafeeds/udf/src/symbols-storage.ts b/public/datafeeds/udf/src/symbols-storage.ts new file mode 100644 index 00000000..6b53e525 --- /dev/null +++ b/public/datafeeds/udf/src/symbols-storage.ts @@ -0,0 +1,290 @@ +import { + LibrarySymbolInfo, + SearchSymbolResultItem, + ResolutionString, +} from '../../../charting_library/datafeed-api'; + +import { + getErrorMessage, + logMessage, +} from './helpers'; + +import { Requester } from './requester'; + +interface SymbolInfoMap { + [symbol: string]: LibrarySymbolInfo | undefined; +} + +interface ExchangeDataResponseSymbolData { + 'type': string; + 'timezone': LibrarySymbolInfo['timezone']; + 'description': string; + + 'exchange-listed': string; + 'exchange-traded': string; + + 'session-regular': string; + + 'fractional': boolean; + + 'pricescale': number; + + 'ticker'?: string; + + 'minmov2'?: number; + 'minmove2'?: number; + + 'minmov'?: number; + 'minmovement'?: number; + + 'force-session-rebuild'?: boolean; + + 'supported-resolutions'?: ResolutionString[]; + 'intraday-multipliers'?: string[]; + + 'has-intraday'?: boolean; + 'has-daily'?: boolean; + 'has-weekly-and-monthly'?: boolean; + 'has-empty-bars'?: boolean; + 'has-no-volume'?: boolean; + 'currency-code'?: string; + 'original-currency-code'?: string; + + 'volume-precision'?: number; +} + +// Here is some black magic with types to get compile-time checks of names and types +type PickArrayedObjectFields = Pick extends any[] ? K : never; +}[keyof T]>; + +type ExchangeDataResponseArrayedSymbolData = PickArrayedObjectFields; +type ExchangeDataResponseNonArrayedSymbolData = Pick>; + +type ExchangeDataResponse = + { + symbol: string[]; + } & + { + [K in keyof ExchangeDataResponseSymbolData]: ExchangeDataResponseSymbolData[K] | NonNullable[]; + }; + +function extractField(data: ExchangeDataResponse, field: Field, arrayIndex: number): ExchangeDataResponseNonArrayedSymbolData[Field]; +function extractField(data: ExchangeDataResponse, field: Field, arrayIndex: number, valueIsArray: true): ExchangeDataResponseArrayedSymbolData[Field]; +function extractField(data: ExchangeDataResponse, field: Field, arrayIndex: number, valueIsArray?: boolean): ExchangeDataResponseSymbolData[Field] { + const value: ExchangeDataResponse[keyof ExchangeDataResponseSymbolData] = data[field]; + + if (Array.isArray(value) && (!valueIsArray || Array.isArray(value[0]))) { + return value[arrayIndex] as ExchangeDataResponseSymbolData[Field]; + } + + return value as ExchangeDataResponseSymbolData[Field]; +} + +function symbolWithCurrencyKey(symbol: string, currency?: string): string { + // here we're using a separator that quite possible shouldn't be in a real symbol name + return symbol + (currency !== undefined ? '_%|#|%_' + currency : ''); +} + +export class SymbolsStorage { + private readonly _exchangesList: string[] = ['NYSE', 'FOREX', 'AMEX']; + private readonly _symbolsInfo: SymbolInfoMap = {}; + private readonly _symbolsList: string[] = []; + private readonly _datafeedUrl: string; + private readonly _readyPromise: Promise; + private readonly _datafeedSupportedResolutions: ResolutionString[]; + private readonly _requester: Requester; + + public constructor(datafeedUrl: string, datafeedSupportedResolutions: ResolutionString[], requester: Requester) { + this._datafeedUrl = datafeedUrl; + this._datafeedSupportedResolutions = datafeedSupportedResolutions; + this._requester = requester; + this._readyPromise = this._init(); + this._readyPromise.catch((error: Error) => { + // seems it is impossible + // tslint:disable-next-line:no-console + console.error(`SymbolsStorage: Cannot init, error=${error.toString()}`); + }); + } + + // BEWARE: this function does not consider symbol's exchange + public resolveSymbol(symbolName: string, currencyCode?: string): Promise { + return this._readyPromise.then(() => { + const symbolInfo = this._symbolsInfo[symbolWithCurrencyKey(symbolName, currencyCode)]; + if (symbolInfo === undefined) { + return Promise.reject('invalid symbol'); + } + + return Promise.resolve(symbolInfo); + }); + } + + public searchSymbols(searchString: string, exchange: string, symbolType: string, maxSearchResults: number): Promise { + interface WeightedItem { + symbolInfo: LibrarySymbolInfo; + weight: number; + } + + return this._readyPromise.then(() => { + const weightedResult: WeightedItem[] = []; + const queryIsEmpty = searchString.length === 0; + + searchString = searchString.toUpperCase(); + + for (const symbolName of this._symbolsList) { + const symbolInfo = this._symbolsInfo[symbolName]; + + if (symbolInfo === undefined) { + continue; + } + + if (symbolType.length > 0 && symbolInfo.type !== symbolType) { + continue; + } + + if (exchange && exchange.length > 0 && symbolInfo.exchange !== exchange) { + continue; + } + + const positionInName = symbolInfo.name.toUpperCase().indexOf(searchString); + const positionInDescription = symbolInfo.description.toUpperCase().indexOf(searchString); + + if (queryIsEmpty || positionInName >= 0 || positionInDescription >= 0) { + const alreadyExists = weightedResult.some((item: WeightedItem) => item.symbolInfo === symbolInfo); + if (!alreadyExists) { + const weight = positionInName >= 0 ? positionInName : 8000 + positionInDescription; + weightedResult.push({ symbolInfo: symbolInfo, weight: weight }); + } + } + } + + const result = weightedResult + .sort((item1: WeightedItem, item2: WeightedItem) => item1.weight - item2.weight) + .slice(0, maxSearchResults) + .map((item: WeightedItem) => { + const symbolInfo = item.symbolInfo; + return { + symbol: symbolInfo.name, + full_name: symbolInfo.full_name, + description: symbolInfo.description, + exchange: symbolInfo.exchange, + params: [], + type: symbolInfo.type, + ticker: symbolInfo.name, + }; + }); + + return Promise.resolve(result); + }); + } + + private _init(): Promise { + interface BooleanMap { + [key: string]: boolean | undefined; + } + + const promises: Promise[] = []; + const alreadyRequestedExchanges: BooleanMap = {}; + + for (const exchange of this._exchangesList) { + if (alreadyRequestedExchanges[exchange]) { + continue; + } + + alreadyRequestedExchanges[exchange] = true; + promises.push(this._requestExchangeData(exchange)); + } + + return Promise.all(promises) + .then(() => { + this._symbolsList.sort(); + logMessage('SymbolsStorage: All exchanges data loaded'); + }); + } + + private _requestExchangeData(exchange: string): Promise { + return new Promise((resolve: () => void, reject: (error: Error) => void) => { + this._requester.sendRequest(this._datafeedUrl, 'symbol_info', { group: exchange }) + .then((response: ExchangeDataResponse) => { + try { + this._onExchangeDataReceived(exchange, response); + } catch (error) { + reject(error); + return; + } + + resolve(); + }) + .catch((reason?: string | Error) => { + logMessage(`SymbolsStorage: Request data for exchange '${exchange}' failed, reason=${getErrorMessage(reason)}`); + resolve(); + }); + }); + } + + private _onExchangeDataReceived(exchange: string, data: ExchangeDataResponse): void { + let symbolIndex = 0; + + try { + const symbolsCount = data.symbol.length; + const tickerPresent = data.ticker !== undefined; + + for (; symbolIndex < symbolsCount; ++symbolIndex) { + const symbolName = data.symbol[symbolIndex]; + const listedExchange = extractField(data, 'exchange-listed', symbolIndex); + const tradedExchange = extractField(data, 'exchange-traded', symbolIndex); + const fullName = tradedExchange + ':' + symbolName; + const currencyCode = extractField(data, 'currency-code', symbolIndex); + + const ticker = tickerPresent ? (extractField(data, 'ticker', symbolIndex) as string) : symbolName; + + const symbolInfo: LibrarySymbolInfo = { + ticker: ticker, + name: symbolName, + base_name: [listedExchange + ':' + symbolName], + full_name: fullName, + listed_exchange: listedExchange, + exchange: tradedExchange, + currency_code: currencyCode, + original_currency_code: extractField(data, 'original-currency-code', symbolIndex), + description: extractField(data, 'description', symbolIndex), + has_intraday: definedValueOrDefault(extractField(data, 'has-intraday', symbolIndex), false), + has_no_volume: definedValueOrDefault(extractField(data, 'has-no-volume', symbolIndex), false), + minmov: extractField(data, 'minmovement', symbolIndex) || extractField(data, 'minmov', symbolIndex) || 0, + minmove2: extractField(data, 'minmove2', symbolIndex) || extractField(data, 'minmov2', symbolIndex), + fractional: extractField(data, 'fractional', symbolIndex), + pricescale: extractField(data, 'pricescale', symbolIndex), + type: extractField(data, 'type', symbolIndex), + session: extractField(data, 'session-regular', symbolIndex), + timezone: extractField(data, 'timezone', symbolIndex), + supported_resolutions: definedValueOrDefault(extractField(data, 'supported-resolutions', symbolIndex, true), this._datafeedSupportedResolutions), + force_session_rebuild: extractField(data, 'force-session-rebuild', symbolIndex), + has_daily: definedValueOrDefault(extractField(data, 'has-daily', symbolIndex), true), + intraday_multipliers: definedValueOrDefault(extractField(data, 'intraday-multipliers', symbolIndex, true), ['1', '5', '15', '30', '60']), + has_weekly_and_monthly: extractField(data, 'has-weekly-and-monthly', symbolIndex), + has_empty_bars: extractField(data, 'has-empty-bars', symbolIndex), + volume_precision: definedValueOrDefault(extractField(data, 'volume-precision', symbolIndex), 0), + format: 'price', + }; + + this._symbolsInfo[ticker] = symbolInfo; + this._symbolsInfo[symbolName] = symbolInfo; + this._symbolsInfo[fullName] = symbolInfo; + if (currencyCode !== undefined) { + this._symbolsInfo[symbolWithCurrencyKey(ticker, currencyCode)] = symbolInfo; + this._symbolsInfo[symbolWithCurrencyKey(symbolName, currencyCode)] = symbolInfo; + this._symbolsInfo[symbolWithCurrencyKey(fullName, currencyCode)] = symbolInfo; + } + + this._symbolsList.push(symbolName); + } + } catch (error) { + throw new Error(`SymbolsStorage: API error when processing exchange ${exchange} symbol #${symbolIndex} (${data.symbol[symbolIndex]}): ${error.message}`); + } + } +} + +function definedValueOrDefault(value: T | undefined, defaultValue: T): T { + return value !== undefined ? value : defaultValue; +} diff --git a/public/datafeeds/udf/src/udf-compatible-datafeed-base.ts b/public/datafeeds/udf/src/udf-compatible-datafeed-base.ts new file mode 100644 index 00000000..56ebfb5f --- /dev/null +++ b/public/datafeeds/udf/src/udf-compatible-datafeed-base.ts @@ -0,0 +1,370 @@ +import { + DatafeedConfiguration, + ErrorCallback, + GetMarksCallback, + HistoryCallback, + HistoryDepth, + IDatafeedChartApi, + IDatafeedQuotesApi, + IExternalDatafeed, + LibrarySymbolInfo, + Mark, + OnReadyCallback, + QuotesCallback, + ResolutionBackValues, + ResolutionString, + ResolveCallback, + SearchSymbolResultItem, + SearchSymbolsCallback, + ServerTimeCallback, + SubscribeBarsCallback, + TimescaleMark, + SymbolResolveExtension, +} from '../../../charting_library/datafeed-api'; + +import { + getErrorMessage, + logMessage, + RequestParams, + UdfErrorResponse, +} from './helpers'; + +import { + GetBarsResult, + HistoryProvider, +} from './history-provider'; + +import { IQuotesProvider } from './iquotes-provider'; +import { DataPulseProvider } from './data-pulse-provider'; +import { QuotesPulseProvider } from './quotes-pulse-provider'; +import { SymbolsStorage } from './symbols-storage'; +import { Requester } from './requester'; + +export interface UdfCompatibleConfiguration extends DatafeedConfiguration { + // tslint:disable:tv-variable-name + supports_search?: boolean; + supports_group_request?: boolean; + // tslint:enable:tv-variable-name +} + +export interface ResolveSymbolResponse extends LibrarySymbolInfo { + s: undefined; +} + +// it is hack to let's TypeScript make code flow analysis +export interface UdfSearchSymbolsResponse extends Array { + s?: undefined; +} + +export const enum Constants { + SearchItemsLimit = 30, +} + +type UdfDatafeedMarkType = { + [K in keyof T]: T[K] | T[K][]; +} & { + id: (string | number)[]; +}; + +type UdfDatafeedMark = UdfDatafeedMarkType; +type UdfDatafeedTimescaleMark = UdfDatafeedMarkType; + +function extractField(data: UdfDatafeedMark, field: Field, arrayIndex: number): Mark[Field]; +function extractField(data: UdfDatafeedTimescaleMark, field: Field, arrayIndex: number): TimescaleMark[Field]; +function extractField(data: UdfDatafeedMark | UdfDatafeedTimescaleMark, field: Field, arrayIndex: number): (TimescaleMark | Mark)[Field] { + const value = data[field]; + return Array.isArray(value) ? value[arrayIndex] : value; +} + +/** + * This class implements interaction with UDF-compatible datafeed. + * See UDF protocol reference at https://github.com/tradingview/charting_library/wiki/UDF + */ +export class UDFCompatibleDatafeedBase implements IExternalDatafeed, IDatafeedQuotesApi, IDatafeedChartApi { + protected _configuration: UdfCompatibleConfiguration = defaultConfiguration(); + private readonly _datafeedURL: string; + private readonly _configurationReadyPromise: Promise; + + private _symbolsStorage: SymbolsStorage | null = null; + + private readonly _historyProvider: HistoryProvider; + private readonly _dataPulseProvider: DataPulseProvider; + + private readonly _quotesProvider: IQuotesProvider; + private readonly _quotesPulseProvider: QuotesPulseProvider; + + private readonly _requester: Requester; + + protected constructor(datafeedURL: string, quotesProvider: IQuotesProvider, requester: Requester, updateFrequency: number = 10 * 1000) { + this._datafeedURL = datafeedURL; + this._requester = requester; + this._historyProvider = new HistoryProvider(datafeedURL, this._requester); + this._quotesProvider = quotesProvider; + + this._dataPulseProvider = new DataPulseProvider(this._historyProvider, updateFrequency); + this._quotesPulseProvider = new QuotesPulseProvider(this._quotesProvider); + + this._configurationReadyPromise = this._requestConfiguration() + .then((configuration: UdfCompatibleConfiguration | null) => { + if (configuration === null) { + configuration = defaultConfiguration(); + } + + this._setupWithConfiguration(configuration); + }); + } + + public onReady(callback: OnReadyCallback): void { + this._configurationReadyPromise.then(() => { + callback(this._configuration); + }); + } + + public getQuotes(symbols: string[], onDataCallback: QuotesCallback, onErrorCallback: (msg: string) => void): void { + this._quotesProvider.getQuotes(symbols).then(onDataCallback).catch(onErrorCallback); + } + + public subscribeQuotes(symbols: string[], fastSymbols: string[], onRealtimeCallback: QuotesCallback, listenerGuid: string): void { + this._quotesPulseProvider.subscribeQuotes(symbols, fastSymbols, onRealtimeCallback, listenerGuid); + } + + public unsubscribeQuotes(listenerGuid: string): void { + this._quotesPulseProvider.unsubscribeQuotes(listenerGuid); + } + + public calculateHistoryDepth(resolution: ResolutionString, resolutionBack: ResolutionBackValues, intervalBack: number): HistoryDepth | undefined { + return undefined; + } + + public getMarks(symbolInfo: LibrarySymbolInfo, from: number, to: number, onDataCallback: GetMarksCallback, resolution: ResolutionString): void { + if (!this._configuration.supports_marks) { + return; + } + + const requestParams: RequestParams = { + symbol: symbolInfo.ticker || '', + from: from, + to: to, + resolution: resolution, + }; + + this._send('marks', requestParams) + .then((response: Mark[] | UdfDatafeedMark) => { + if (!Array.isArray(response)) { + const result: Mark[] = []; + for (let i = 0; i < response.id.length; ++i) { + result.push({ + id: extractField(response, 'id', i), + time: extractField(response, 'time', i), + color: extractField(response, 'color', i), + text: extractField(response, 'text', i), + label: extractField(response, 'label', i), + labelFontColor: extractField(response, 'labelFontColor', i), + minSize: extractField(response, 'minSize', i), + }); + } + + response = result; + } + + onDataCallback(response); + }) + .catch((error?: string | Error) => { + logMessage(`UdfCompatibleDatafeed: Request marks failed: ${getErrorMessage(error)}`); + onDataCallback([]); + }); + } + + public getTimescaleMarks(symbolInfo: LibrarySymbolInfo, from: number, to: number, onDataCallback: GetMarksCallback, resolution: ResolutionString): void { + if (!this._configuration.supports_timescale_marks) { + return; + } + + const requestParams: RequestParams = { + symbol: symbolInfo.ticker || '', + from: from, + to: to, + resolution: resolution, + }; + + this._send('timescale_marks', requestParams) + .then((response: TimescaleMark[] | UdfDatafeedTimescaleMark) => { + if (!Array.isArray(response)) { + const result: TimescaleMark[] = []; + for (let i = 0; i < response.id.length; ++i) { + result.push({ + id: extractField(response, 'id', i), + time: extractField(response, 'time', i), + color: extractField(response, 'color', i), + label: extractField(response, 'label', i), + tooltip: extractField(response, 'tooltip', i), + }); + } + + response = result; + } + + onDataCallback(response); + }) + .catch((error?: string | Error) => { + logMessage(`UdfCompatibleDatafeed: Request timescale marks failed: ${getErrorMessage(error)}`); + onDataCallback([]); + }); + } + + public getServerTime(callback: ServerTimeCallback): void { + if (!this._configuration.supports_time) { + return; + } + + this._send('time') + .then((response: string) => { + const time = parseInt(response); + if (!isNaN(time)) { + callback(time); + } + }) + .catch((error?: string | Error) => { + logMessage(`UdfCompatibleDatafeed: Fail to load server time, error=${getErrorMessage(error)}`); + }); + } + + public searchSymbols(userInput: string, exchange: string, symbolType: string, onResult: SearchSymbolsCallback): void { + if (this._configuration.supports_search) { + const params: RequestParams = { + limit: Constants.SearchItemsLimit, + query: userInput.toUpperCase(), + type: symbolType, + exchange: exchange, + }; + + this._send('search', params) + .then((response: UdfSearchSymbolsResponse | UdfErrorResponse) => { + if (response.s !== undefined) { + logMessage(`UdfCompatibleDatafeed: search symbols error=${response.errmsg}`); + onResult([]); + return; + } + + onResult(response); + }) + .catch((reason?: string | Error) => { + logMessage(`UdfCompatibleDatafeed: Search symbols for '${userInput}' failed. Error=${getErrorMessage(reason)}`); + onResult([]); + }); + } else { + if (this._symbolsStorage === null) { + throw new Error('UdfCompatibleDatafeed: inconsistent configuration (symbols storage)'); + } + + this._symbolsStorage.searchSymbols(userInput, exchange, symbolType, Constants.SearchItemsLimit) + .then(onResult) + .catch(onResult.bind(null, [])); + } + } + + public resolveSymbol(symbolName: string, onResolve: ResolveCallback, onError: ErrorCallback, extension?: SymbolResolveExtension): void { + logMessage('Resolve requested'); + + const currencyCode = extension && extension.currencyCode; + + const resolveRequestStartTime = Date.now(); + function onResultReady(symbolInfo: LibrarySymbolInfo): void { + logMessage(`Symbol resolved: ${Date.now() - resolveRequestStartTime}ms`); + onResolve(symbolInfo); + } + + if (!this._configuration.supports_group_request) { + const params: RequestParams = { + symbol: symbolName, + }; + if (currencyCode !== undefined) { + params.currencyCode = currencyCode; + } + + this._send('symbols', params) + .then((response: ResolveSymbolResponse | UdfErrorResponse) => { + if (response.s !== undefined) { + onError('unknown_symbol'); + } else { + onResultReady(response); + } + }) + .catch((reason?: string | Error) => { + logMessage(`UdfCompatibleDatafeed: Error resolving symbol: ${getErrorMessage(reason)}`); + onError('unknown_symbol'); + }); + } else { + if (this._symbolsStorage === null) { + throw new Error('UdfCompatibleDatafeed: inconsistent configuration (symbols storage)'); + } + + this._symbolsStorage.resolveSymbol(symbolName, currencyCode).then(onResultReady).catch(onError); + } + } + + public getBars(symbolInfo: LibrarySymbolInfo, resolution: ResolutionString, rangeStartDate: number, rangeEndDate: number, onResult: HistoryCallback, onError: ErrorCallback): void { + this._historyProvider.getBars(symbolInfo, resolution, rangeStartDate, rangeEndDate) + .then((result: GetBarsResult) => { + onResult(result.bars, result.meta); + }) + .catch(onError); + } + + public subscribeBars(symbolInfo: LibrarySymbolInfo, resolution: ResolutionString, onTick: SubscribeBarsCallback, listenerGuid: string, onResetCacheNeededCallback: () => void): void { + this._dataPulseProvider.subscribeBars(symbolInfo, resolution, onTick, listenerGuid); + } + + public unsubscribeBars(listenerGuid: string): void { + this._dataPulseProvider.unsubscribeBars(listenerGuid); + } + + protected _requestConfiguration(): Promise { + return this._send('config') + .catch((reason?: string | Error) => { + logMessage(`UdfCompatibleDatafeed: Cannot get datafeed configuration - use default, error=${getErrorMessage(reason)}`); + return null; + }); + } + + private _send(urlPath: string, params?: RequestParams): Promise { + return this._requester.sendRequest(this._datafeedURL, urlPath, params); + } + + private _setupWithConfiguration(configurationData: UdfCompatibleConfiguration): void { + this._configuration = configurationData; + + if (configurationData.exchanges === undefined) { + configurationData.exchanges = []; + } + + if (!configurationData.supports_search && !configurationData.supports_group_request) { + throw new Error('Unsupported datafeed configuration. Must either support search, or support group request'); + } + + if (configurationData.supports_group_request || !configurationData.supports_search) { + this._symbolsStorage = new SymbolsStorage(this._datafeedURL, configurationData.supported_resolutions || [], this._requester); + } + + logMessage(`UdfCompatibleDatafeed: Initialized with ${JSON.stringify(configurationData)}`); + } +} + +function defaultConfiguration(): UdfCompatibleConfiguration { + return { + supports_search: false, + supports_group_request: true, + supported_resolutions: [ + '1' as ResolutionString, + '5' as ResolutionString, + '15' as ResolutionString, + '30' as ResolutionString, + '60' as ResolutionString, + '1D' as ResolutionString, + '1W' as ResolutionString, + '1M' as ResolutionString, + ], + supports_marks: false, + supports_timescale_marks: false, + }; +} diff --git a/public/datafeeds/udf/src/udf-compatible-datafeed.ts b/public/datafeeds/udf/src/udf-compatible-datafeed.ts new file mode 100644 index 00000000..f13c589e --- /dev/null +++ b/public/datafeeds/udf/src/udf-compatible-datafeed.ts @@ -0,0 +1,11 @@ +import { UDFCompatibleDatafeedBase } from './udf-compatible-datafeed-base'; +import { QuotesProvider } from './quotes-provider'; +import { Requester } from './requester'; + +export class UDFCompatibleDatafeed extends UDFCompatibleDatafeedBase { + public constructor(datafeedURL: string, updateFrequency: number = 10 * 1000) { + const requester = new Requester(); + const quotesProvider = new QuotesProvider(datafeedURL, requester); + super(datafeedURL, quotesProvider, requester, updateFrequency); + } +} diff --git a/public/datafeeds/udf/tsconfig.json b/public/datafeeds/udf/tsconfig.json new file mode 100644 index 00000000..6b99a658 --- /dev/null +++ b/public/datafeeds/udf/tsconfig.json @@ -0,0 +1,28 @@ +{ + "compilerOptions": { + "allowSyntheticDefaultImports": true, + "importHelpers": true, + "lib": [ + "dom", + "es2015.promise", + "es2015.iterable", + "es2015.symbol.wellknown", + "es5" + ], + "module": "es6", + "moduleResolution": "node", + "noEmitOnError": true, + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "noUnusedLocals": true, + "outDir": "./lib/", + "rootDir": "src", + "sourceMap": false, + "strict": true, + "target": "es5", + "types": [] + }, + "include": [ + "./src/**/*.ts" + ] +} diff --git a/src/lang/locales/en.json b/src/lang/locales/en.json index 83138473..9fb9904c 100644 --- a/src/lang/locales/en.json +++ b/src/lang/locales/en.json @@ -35,6 +35,7 @@ "blocks": "Blocks", "blockchains": "Blockchains", "uptime": "Uptime", + "trade": "Trade", "gravity": "Gravity(WIP)", "pools": "Pools(WIP)", diff --git a/src/layouts/components/Navbar.vue b/src/layouts/components/Navbar.vue index d8f94b5d..65fe9c7a 100644 --- a/src/layouts/components/Navbar.vue +++ b/src/layouts/components/Navbar.vue @@ -173,7 +173,7 @@ export default { }, computed: { walletName() { - const key = this.$store.state.chains.defaultWallet + const key = this.$store?.state?.chains?.defaultWallet return key || 'Wallet' }, selected_chain() { @@ -185,7 +185,7 @@ export default { }, }, mounted() { - const accounts = Object.keys(getLocalAccounts()) + const accounts = Object.keys(getLocalAccounts() || {}) if (!this.$store.state.chains.defaultWallet && accounts.length > 0) { this.$store.commit('setDefaultWallet', accounts[0]) } diff --git a/src/libs/all.js b/src/libs/all.js new file mode 100644 index 00000000..241b937a --- /dev/null +++ b/src/libs/all.js @@ -0,0 +1,53878 @@ +/* eslint-disable */ +"use strict"; + +var $protobuf = require("protobufjs-dbx/minimal"); + +// Common aliases +var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; + +// Exported root namespace +var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {}); + +/** + * Namespace cosmos. + * @exports cosmos + * @namespace + */ + +$root.cosmos = (function(cosmos) { + + /** + * Namespace base. + * @memberof cosmos + * @namespace + */ + + cosmos.base = (function(base) { + + /** + * Namespace v1beta1. + * @memberof cosmos.base + * @namespace + */ + + base.v1beta1 = (function(v1beta1) { + + v1beta1.Coin = (function(Coin) { + + /** + * Properties of a Coin. + * @memberof cosmos.base.v1beta1 + * @interface ICoin + * @property {string|null} [denom] Coin denom + * @property {string|null} [amount] Coin amount + */ + + /** + * Constructs a new Coin. + * @memberof cosmos.base.v1beta1 + * @classdesc Represents a Coin. + * @implements ICoin + * @constructor + * @param {cosmos.base.v1beta1.ICoin=} [properties] Properties to set + */ + function Coin(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Coin denom. + * @member {string} denom + * @memberof cosmos.base.v1beta1.Coin + * @instance + */ + Coin.prototype.denom = ""; + + /** + * Coin amount. + * @member {string} amount + * @memberof cosmos.base.v1beta1.Coin + * @instance + */ + Coin.prototype.amount = ""; + + /** + * Creates a new Coin instance using the specified properties. + * @function create + * @memberof cosmos.base.v1beta1.Coin + * @static + * @param {cosmos.base.v1beta1.ICoin=} [properties] Properties to set + * @returns {cosmos.base.v1beta1.Coin} Coin instance + */ + Coin.create = function create(properties) { + return new Coin(properties); + }; + + /** + * Encodes the specified Coin message. Does not implicitly {@link cosmos.base.v1beta1.Coin.verify|verify} messages. + * @function encode + * @memberof cosmos.base.v1beta1.Coin + * @static + * @param {cosmos.base.v1beta1.ICoin} message Coin message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Coin.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.denom != null && Object.hasOwnProperty.call(message, "denom")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.denom); + if (message.amount != null && Object.hasOwnProperty.call(message, "amount")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.amount); + return writer; + }; + + /** + * Encodes the specified Coin message, length delimited. Does not implicitly {@link cosmos.base.v1beta1.Coin.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.base.v1beta1.Coin + * @static + * @param {cosmos.base.v1beta1.ICoin} message Coin message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Coin.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Coin message from the specified reader or buffer. + * @function decode + * @memberof cosmos.base.v1beta1.Coin + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.base.v1beta1.Coin} Coin + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Coin.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.v1beta1.Coin(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.denom = reader.string(); + break; + case 2: + message.amount = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Coin message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.base.v1beta1.Coin + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.base.v1beta1.Coin} Coin + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Coin.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Coin message. + * @function verify + * @memberof cosmos.base.v1beta1.Coin + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Coin.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.denom != null && message.hasOwnProperty("denom")) + if (!$util.isString(message.denom)) + return "denom: string expected"; + if (message.amount != null && message.hasOwnProperty("amount")) + if (!$util.isString(message.amount)) + return "amount: string expected"; + return null; + }; + + /** + * Creates a Coin message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.base.v1beta1.Coin + * @static + * @param {Object.} object Plain object + * @returns {cosmos.base.v1beta1.Coin} Coin + */ + Coin.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.base.v1beta1.Coin) + return object; + var message = new $root.cosmos.base.v1beta1.Coin(); + if (object.denom != null) + message.denom = String(object.denom); + if (object.amount != null) + message.amount = String(object.amount); + return message; + }; + + /** + * Creates a plain object from a Coin message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.base.v1beta1.Coin + * @static + * @param {cosmos.base.v1beta1.Coin} message Coin + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Coin.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.denom = ""; + object.amount = ""; + } + if (message.denom != null && message.hasOwnProperty("denom")) + object.denom = message.denom; + if (message.amount != null && message.hasOwnProperty("amount")) + object.amount = message.amount; + return object; + }; + + /** + * Converts this Coin to JSON. + * @function toJSON + * @memberof cosmos.base.v1beta1.Coin + * @instance + * @returns {Object.} JSON object + */ + Coin.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Coin; + })(v1beta1.Coin || {}); + + v1beta1.DecCoin = (function(DecCoin) { + + /** + * Properties of a DecCoin. + * @memberof cosmos.base.v1beta1 + * @interface IDecCoin + * @property {string|null} [denom] DecCoin denom + * @property {string|null} [amount] DecCoin amount + */ + + /** + * Constructs a new DecCoin. + * @memberof cosmos.base.v1beta1 + * @classdesc Represents a DecCoin. + * @implements IDecCoin + * @constructor + * @param {cosmos.base.v1beta1.IDecCoin=} [properties] Properties to set + */ + function DecCoin(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DecCoin denom. + * @member {string} denom + * @memberof cosmos.base.v1beta1.DecCoin + * @instance + */ + DecCoin.prototype.denom = ""; + + /** + * DecCoin amount. + * @member {string} amount + * @memberof cosmos.base.v1beta1.DecCoin + * @instance + */ + DecCoin.prototype.amount = ""; + + /** + * Creates a new DecCoin instance using the specified properties. + * @function create + * @memberof cosmos.base.v1beta1.DecCoin + * @static + * @param {cosmos.base.v1beta1.IDecCoin=} [properties] Properties to set + * @returns {cosmos.base.v1beta1.DecCoin} DecCoin instance + */ + DecCoin.create = function create(properties) { + return new DecCoin(properties); + }; + + /** + * Encodes the specified DecCoin message. Does not implicitly {@link cosmos.base.v1beta1.DecCoin.verify|verify} messages. + * @function encode + * @memberof cosmos.base.v1beta1.DecCoin + * @static + * @param {cosmos.base.v1beta1.IDecCoin} message DecCoin message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DecCoin.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.denom != null && Object.hasOwnProperty.call(message, "denom")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.denom); + if (message.amount != null && Object.hasOwnProperty.call(message, "amount")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.amount); + return writer; + }; + + /** + * Encodes the specified DecCoin message, length delimited. Does not implicitly {@link cosmos.base.v1beta1.DecCoin.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.base.v1beta1.DecCoin + * @static + * @param {cosmos.base.v1beta1.IDecCoin} message DecCoin message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DecCoin.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DecCoin message from the specified reader or buffer. + * @function decode + * @memberof cosmos.base.v1beta1.DecCoin + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.base.v1beta1.DecCoin} DecCoin + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DecCoin.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.v1beta1.DecCoin(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.denom = reader.string(); + break; + case 2: + message.amount = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DecCoin message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.base.v1beta1.DecCoin + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.base.v1beta1.DecCoin} DecCoin + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DecCoin.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DecCoin message. + * @function verify + * @memberof cosmos.base.v1beta1.DecCoin + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DecCoin.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.denom != null && message.hasOwnProperty("denom")) + if (!$util.isString(message.denom)) + return "denom: string expected"; + if (message.amount != null && message.hasOwnProperty("amount")) + if (!$util.isString(message.amount)) + return "amount: string expected"; + return null; + }; + + /** + * Creates a DecCoin message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.base.v1beta1.DecCoin + * @static + * @param {Object.} object Plain object + * @returns {cosmos.base.v1beta1.DecCoin} DecCoin + */ + DecCoin.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.base.v1beta1.DecCoin) + return object; + var message = new $root.cosmos.base.v1beta1.DecCoin(); + if (object.denom != null) + message.denom = String(object.denom); + if (object.amount != null) + message.amount = String(object.amount); + return message; + }; + + /** + * Creates a plain object from a DecCoin message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.base.v1beta1.DecCoin + * @static + * @param {cosmos.base.v1beta1.DecCoin} message DecCoin + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DecCoin.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.denom = ""; + object.amount = ""; + } + if (message.denom != null && message.hasOwnProperty("denom")) + object.denom = message.denom; + if (message.amount != null && message.hasOwnProperty("amount")) + object.amount = message.amount; + return object; + }; + + /** + * Converts this DecCoin to JSON. + * @function toJSON + * @memberof cosmos.base.v1beta1.DecCoin + * @instance + * @returns {Object.} JSON object + */ + DecCoin.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DecCoin; + })(v1beta1.DecCoin || {}); + + v1beta1.IntProto = (function(IntProto) { + + /** + * Properties of an IntProto. + * @memberof cosmos.base.v1beta1 + * @interface IIntProto + * @property {string|null} [int] IntProto int + */ + + /** + * Constructs a new IntProto. + * @memberof cosmos.base.v1beta1 + * @classdesc Represents an IntProto. + * @implements IIntProto + * @constructor + * @param {cosmos.base.v1beta1.IIntProto=} [properties] Properties to set + */ + function IntProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * IntProto int. + * @member {string} int + * @memberof cosmos.base.v1beta1.IntProto + * @instance + */ + IntProto.prototype.int = ""; + + /** + * Creates a new IntProto instance using the specified properties. + * @function create + * @memberof cosmos.base.v1beta1.IntProto + * @static + * @param {cosmos.base.v1beta1.IIntProto=} [properties] Properties to set + * @returns {cosmos.base.v1beta1.IntProto} IntProto instance + */ + IntProto.create = function create(properties) { + return new IntProto(properties); + }; + + /** + * Encodes the specified IntProto message. Does not implicitly {@link cosmos.base.v1beta1.IntProto.verify|verify} messages. + * @function encode + * @memberof cosmos.base.v1beta1.IntProto + * @static + * @param {cosmos.base.v1beta1.IIntProto} message IntProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IntProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.int != null && Object.hasOwnProperty.call(message, "int")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.int); + return writer; + }; + + /** + * Encodes the specified IntProto message, length delimited. Does not implicitly {@link cosmos.base.v1beta1.IntProto.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.base.v1beta1.IntProto + * @static + * @param {cosmos.base.v1beta1.IIntProto} message IntProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IntProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IntProto message from the specified reader or buffer. + * @function decode + * @memberof cosmos.base.v1beta1.IntProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.base.v1beta1.IntProto} IntProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IntProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.v1beta1.IntProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.int = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IntProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.base.v1beta1.IntProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.base.v1beta1.IntProto} IntProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IntProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IntProto message. + * @function verify + * @memberof cosmos.base.v1beta1.IntProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IntProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.int != null && message.hasOwnProperty("int")) + if (!$util.isString(message.int)) + return "int: string expected"; + return null; + }; + + /** + * Creates an IntProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.base.v1beta1.IntProto + * @static + * @param {Object.} object Plain object + * @returns {cosmos.base.v1beta1.IntProto} IntProto + */ + IntProto.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.base.v1beta1.IntProto) + return object; + var message = new $root.cosmos.base.v1beta1.IntProto(); + if (object.int != null) + message.int = String(object.int); + return message; + }; + + /** + * Creates a plain object from an IntProto message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.base.v1beta1.IntProto + * @static + * @param {cosmos.base.v1beta1.IntProto} message IntProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IntProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.int = ""; + if (message.int != null && message.hasOwnProperty("int")) + object.int = message.int; + return object; + }; + + /** + * Converts this IntProto to JSON. + * @function toJSON + * @memberof cosmos.base.v1beta1.IntProto + * @instance + * @returns {Object.} JSON object + */ + IntProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return IntProto; + })(v1beta1.IntProto || {}); + + v1beta1.DecProto = (function(DecProto) { + + /** + * Properties of a DecProto. + * @memberof cosmos.base.v1beta1 + * @interface IDecProto + * @property {string|null} [dec] DecProto dec + */ + + /** + * Constructs a new DecProto. + * @memberof cosmos.base.v1beta1 + * @classdesc Represents a DecProto. + * @implements IDecProto + * @constructor + * @param {cosmos.base.v1beta1.IDecProto=} [properties] Properties to set + */ + function DecProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DecProto dec. + * @member {string} dec + * @memberof cosmos.base.v1beta1.DecProto + * @instance + */ + DecProto.prototype.dec = ""; + + /** + * Creates a new DecProto instance using the specified properties. + * @function create + * @memberof cosmos.base.v1beta1.DecProto + * @static + * @param {cosmos.base.v1beta1.IDecProto=} [properties] Properties to set + * @returns {cosmos.base.v1beta1.DecProto} DecProto instance + */ + DecProto.create = function create(properties) { + return new DecProto(properties); + }; + + /** + * Encodes the specified DecProto message. Does not implicitly {@link cosmos.base.v1beta1.DecProto.verify|verify} messages. + * @function encode + * @memberof cosmos.base.v1beta1.DecProto + * @static + * @param {cosmos.base.v1beta1.IDecProto} message DecProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DecProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dec != null && Object.hasOwnProperty.call(message, "dec")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.dec); + return writer; + }; + + /** + * Encodes the specified DecProto message, length delimited. Does not implicitly {@link cosmos.base.v1beta1.DecProto.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.base.v1beta1.DecProto + * @static + * @param {cosmos.base.v1beta1.IDecProto} message DecProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DecProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DecProto message from the specified reader or buffer. + * @function decode + * @memberof cosmos.base.v1beta1.DecProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.base.v1beta1.DecProto} DecProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DecProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.v1beta1.DecProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.dec = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DecProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.base.v1beta1.DecProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.base.v1beta1.DecProto} DecProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DecProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DecProto message. + * @function verify + * @memberof cosmos.base.v1beta1.DecProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DecProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dec != null && message.hasOwnProperty("dec")) + if (!$util.isString(message.dec)) + return "dec: string expected"; + return null; + }; + + /** + * Creates a DecProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.base.v1beta1.DecProto + * @static + * @param {Object.} object Plain object + * @returns {cosmos.base.v1beta1.DecProto} DecProto + */ + DecProto.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.base.v1beta1.DecProto) + return object; + var message = new $root.cosmos.base.v1beta1.DecProto(); + if (object.dec != null) + message.dec = String(object.dec); + return message; + }; + + /** + * Creates a plain object from a DecProto message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.base.v1beta1.DecProto + * @static + * @param {cosmos.base.v1beta1.DecProto} message DecProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DecProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.dec = ""; + if (message.dec != null && message.hasOwnProperty("dec")) + object.dec = message.dec; + return object; + }; + + /** + * Converts this DecProto to JSON. + * @function toJSON + * @memberof cosmos.base.v1beta1.DecProto + * @instance + * @returns {Object.} JSON object + */ + DecProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DecProto; + })(v1beta1.DecProto || {}); + + return v1beta1; + })(base.v1beta1 || {}); + + /** + * Namespace query. + * @memberof cosmos.base + * @namespace + */ + + base.query = (function(query) { + + /** + * Namespace v1beta1. + * @memberof cosmos.base.query + * @namespace + */ + + query.v1beta1 = (function(v1beta1) { + + v1beta1.PageRequest = (function(PageRequest) { + + /** + * Properties of a PageRequest. + * @memberof cosmos.base.query.v1beta1 + * @interface IPageRequest + * @property {Uint8Array|null} [key] PageRequest key + * @property {number|Long|null} [offset] PageRequest offset + * @property {number|Long|null} [limit] PageRequest limit + * @property {boolean|null} [countTotal] PageRequest countTotal + */ + + /** + * Constructs a new PageRequest. + * @memberof cosmos.base.query.v1beta1 + * @classdesc Represents a PageRequest. + * @implements IPageRequest + * @constructor + * @param {cosmos.base.query.v1beta1.IPageRequest=} [properties] Properties to set + */ + function PageRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PageRequest key. + * @member {Uint8Array} key + * @memberof cosmos.base.query.v1beta1.PageRequest + * @instance + */ + PageRequest.prototype.key = $util.newBuffer([]); + + /** + * PageRequest offset. + * @member {number|Long} offset + * @memberof cosmos.base.query.v1beta1.PageRequest + * @instance + */ + PageRequest.prototype.offset = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * PageRequest limit. + * @member {number|Long} limit + * @memberof cosmos.base.query.v1beta1.PageRequest + * @instance + */ + PageRequest.prototype.limit = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * PageRequest countTotal. + * @member {boolean} countTotal + * @memberof cosmos.base.query.v1beta1.PageRequest + * @instance + */ + PageRequest.prototype.countTotal = false; + + /** + * Creates a new PageRequest instance using the specified properties. + * @function create + * @memberof cosmos.base.query.v1beta1.PageRequest + * @static + * @param {cosmos.base.query.v1beta1.IPageRequest=} [properties] Properties to set + * @returns {cosmos.base.query.v1beta1.PageRequest} PageRequest instance + */ + PageRequest.create = function create(properties) { + return new PageRequest(properties); + }; + + /** + * Encodes the specified PageRequest message. Does not implicitly {@link cosmos.base.query.v1beta1.PageRequest.verify|verify} messages. + * @function encode + * @memberof cosmos.base.query.v1beta1.PageRequest + * @static + * @param {cosmos.base.query.v1beta1.IPageRequest} message PageRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PageRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.key); + if (message.offset != null && Object.hasOwnProperty.call(message, "offset")) + writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.offset); + if (message.limit != null && Object.hasOwnProperty.call(message, "limit")) + writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.limit); + if (message.countTotal != null && Object.hasOwnProperty.call(message, "countTotal")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.countTotal); + return writer; + }; + + /** + * Encodes the specified PageRequest message, length delimited. Does not implicitly {@link cosmos.base.query.v1beta1.PageRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.base.query.v1beta1.PageRequest + * @static + * @param {cosmos.base.query.v1beta1.IPageRequest} message PageRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PageRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PageRequest message from the specified reader or buffer. + * @function decode + * @memberof cosmos.base.query.v1beta1.PageRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.base.query.v1beta1.PageRequest} PageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PageRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.query.v1beta1.PageRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.key = reader.bytes(); + break; + case 2: + message.offset = reader.uint64(); + break; + case 3: + message.limit = reader.uint64(); + break; + case 4: + message.countTotal = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PageRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.base.query.v1beta1.PageRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.base.query.v1beta1.PageRequest} PageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PageRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PageRequest message. + * @function verify + * @memberof cosmos.base.query.v1beta1.PageRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PageRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.key != null && message.hasOwnProperty("key")) + if (!(message.key && typeof message.key.length === "number" || $util.isString(message.key))) + return "key: buffer expected"; + if (message.offset != null && message.hasOwnProperty("offset")) + if (!$util.isInteger(message.offset) && !(message.offset && $util.isInteger(message.offset.low) && $util.isInteger(message.offset.high))) + return "offset: integer|Long expected"; + if (message.limit != null && message.hasOwnProperty("limit")) + if (!$util.isInteger(message.limit) && !(message.limit && $util.isInteger(message.limit.low) && $util.isInteger(message.limit.high))) + return "limit: integer|Long expected"; + if (message.countTotal != null && message.hasOwnProperty("countTotal")) + if (typeof message.countTotal !== "boolean") + return "countTotal: boolean expected"; + return null; + }; + + /** + * Creates a PageRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.base.query.v1beta1.PageRequest + * @static + * @param {Object.} object Plain object + * @returns {cosmos.base.query.v1beta1.PageRequest} PageRequest + */ + PageRequest.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.base.query.v1beta1.PageRequest) + return object; + var message = new $root.cosmos.base.query.v1beta1.PageRequest(); + if (object.key != null) + if (typeof object.key === "string") + $util.base64.decode(object.key, message.key = $util.newBuffer($util.base64.length(object.key)), 0); + else if (object.key.length) + message.key = object.key; + if (object.offset != null) + if ($util.Long) + (message.offset = $util.Long.fromValue(object.offset)).unsigned = true; + else if (typeof object.offset === "string") + message.offset = parseInt(object.offset, 10); + else if (typeof object.offset === "number") + message.offset = object.offset; + else if (typeof object.offset === "object") + message.offset = new $util.LongBits(object.offset.low >>> 0, object.offset.high >>> 0).toNumber(true); + if (object.limit != null) + if ($util.Long) + (message.limit = $util.Long.fromValue(object.limit)).unsigned = true; + else if (typeof object.limit === "string") + message.limit = parseInt(object.limit, 10); + else if (typeof object.limit === "number") + message.limit = object.limit; + else if (typeof object.limit === "object") + message.limit = new $util.LongBits(object.limit.low >>> 0, object.limit.high >>> 0).toNumber(true); + if (object.countTotal != null) + message.countTotal = Boolean(object.countTotal); + return message; + }; + + /** + * Creates a plain object from a PageRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.base.query.v1beta1.PageRequest + * @static + * @param {cosmos.base.query.v1beta1.PageRequest} message PageRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PageRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.key = ""; + else { + object.key = []; + if (options.bytes !== Array) + object.key = $util.newBuffer(object.key); + } + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.offset = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.offset = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.limit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.limit = options.longs === String ? "0" : 0; + object.countTotal = false; + } + if (message.key != null && message.hasOwnProperty("key")) + object.key = options.bytes === String ? $util.base64.encode(message.key, 0, message.key.length) : options.bytes === Array ? Array.prototype.slice.call(message.key) : message.key; + if (message.offset != null && message.hasOwnProperty("offset")) + if (typeof message.offset === "number") + object.offset = options.longs === String ? String(message.offset) : message.offset; + else + object.offset = options.longs === String ? $util.Long.prototype.toString.call(message.offset) : options.longs === Number ? new $util.LongBits(message.offset.low >>> 0, message.offset.high >>> 0).toNumber(true) : message.offset; + if (message.limit != null && message.hasOwnProperty("limit")) + if (typeof message.limit === "number") + object.limit = options.longs === String ? String(message.limit) : message.limit; + else + object.limit = options.longs === String ? $util.Long.prototype.toString.call(message.limit) : options.longs === Number ? new $util.LongBits(message.limit.low >>> 0, message.limit.high >>> 0).toNumber(true) : message.limit; + if (message.countTotal != null && message.hasOwnProperty("countTotal")) + object.countTotal = message.countTotal; + return object; + }; + + /** + * Converts this PageRequest to JSON. + * @function toJSON + * @memberof cosmos.base.query.v1beta1.PageRequest + * @instance + * @returns {Object.} JSON object + */ + PageRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PageRequest; + })(v1beta1.PageRequest || {}); + + v1beta1.PageResponse = (function(PageResponse) { + + /** + * Properties of a PageResponse. + * @memberof cosmos.base.query.v1beta1 + * @interface IPageResponse + * @property {Uint8Array|null} [nextKey] PageResponse nextKey + * @property {number|Long|null} [total] PageResponse total + */ + + /** + * Constructs a new PageResponse. + * @memberof cosmos.base.query.v1beta1 + * @classdesc Represents a PageResponse. + * @implements IPageResponse + * @constructor + * @param {cosmos.base.query.v1beta1.IPageResponse=} [properties] Properties to set + */ + function PageResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PageResponse nextKey. + * @member {Uint8Array} nextKey + * @memberof cosmos.base.query.v1beta1.PageResponse + * @instance + */ + PageResponse.prototype.nextKey = $util.newBuffer([]); + + /** + * PageResponse total. + * @member {number|Long} total + * @memberof cosmos.base.query.v1beta1.PageResponse + * @instance + */ + PageResponse.prototype.total = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new PageResponse instance using the specified properties. + * @function create + * @memberof cosmos.base.query.v1beta1.PageResponse + * @static + * @param {cosmos.base.query.v1beta1.IPageResponse=} [properties] Properties to set + * @returns {cosmos.base.query.v1beta1.PageResponse} PageResponse instance + */ + PageResponse.create = function create(properties) { + return new PageResponse(properties); + }; + + /** + * Encodes the specified PageResponse message. Does not implicitly {@link cosmos.base.query.v1beta1.PageResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.base.query.v1beta1.PageResponse + * @static + * @param {cosmos.base.query.v1beta1.IPageResponse} message PageResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PageResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.nextKey != null && Object.hasOwnProperty.call(message, "nextKey")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.nextKey); + if (message.total != null && Object.hasOwnProperty.call(message, "total")) + writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.total); + return writer; + }; + + /** + * Encodes the specified PageResponse message, length delimited. Does not implicitly {@link cosmos.base.query.v1beta1.PageResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.base.query.v1beta1.PageResponse + * @static + * @param {cosmos.base.query.v1beta1.IPageResponse} message PageResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PageResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PageResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.base.query.v1beta1.PageResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.base.query.v1beta1.PageResponse} PageResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PageResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.query.v1beta1.PageResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.nextKey = reader.bytes(); + break; + case 2: + message.total = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PageResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.base.query.v1beta1.PageResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.base.query.v1beta1.PageResponse} PageResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PageResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PageResponse message. + * @function verify + * @memberof cosmos.base.query.v1beta1.PageResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PageResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.nextKey != null && message.hasOwnProperty("nextKey")) + if (!(message.nextKey && typeof message.nextKey.length === "number" || $util.isString(message.nextKey))) + return "nextKey: buffer expected"; + if (message.total != null && message.hasOwnProperty("total")) + if (!$util.isInteger(message.total) && !(message.total && $util.isInteger(message.total.low) && $util.isInteger(message.total.high))) + return "total: integer|Long expected"; + return null; + }; + + /** + * Creates a PageResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.base.query.v1beta1.PageResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.base.query.v1beta1.PageResponse} PageResponse + */ + PageResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.base.query.v1beta1.PageResponse) + return object; + var message = new $root.cosmos.base.query.v1beta1.PageResponse(); + if (object.nextKey != null) + if (typeof object.nextKey === "string") + $util.base64.decode(object.nextKey, message.nextKey = $util.newBuffer($util.base64.length(object.nextKey)), 0); + else if (object.nextKey.length) + message.nextKey = object.nextKey; + if (object.total != null) + if ($util.Long) + (message.total = $util.Long.fromValue(object.total)).unsigned = true; + else if (typeof object.total === "string") + message.total = parseInt(object.total, 10); + else if (typeof object.total === "number") + message.total = object.total; + else if (typeof object.total === "object") + message.total = new $util.LongBits(object.total.low >>> 0, object.total.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a PageResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.base.query.v1beta1.PageResponse + * @static + * @param {cosmos.base.query.v1beta1.PageResponse} message PageResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PageResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.nextKey = ""; + else { + object.nextKey = []; + if (options.bytes !== Array) + object.nextKey = $util.newBuffer(object.nextKey); + } + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.total = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.total = options.longs === String ? "0" : 0; + } + if (message.nextKey != null && message.hasOwnProperty("nextKey")) + object.nextKey = options.bytes === String ? $util.base64.encode(message.nextKey, 0, message.nextKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.nextKey) : message.nextKey; + if (message.total != null && message.hasOwnProperty("total")) + if (typeof message.total === "number") + object.total = options.longs === String ? String(message.total) : message.total; + else + object.total = options.longs === String ? $util.Long.prototype.toString.call(message.total) : options.longs === Number ? new $util.LongBits(message.total.low >>> 0, message.total.high >>> 0).toNumber(true) : message.total; + return object; + }; + + /** + * Converts this PageResponse to JSON. + * @function toJSON + * @memberof cosmos.base.query.v1beta1.PageResponse + * @instance + * @returns {Object.} JSON object + */ + PageResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PageResponse; + })(v1beta1.PageResponse || {}); + + return v1beta1; + })(query.v1beta1 || {}); + + return query; + })(base.query || {}); + + return base; + })(cosmos.base || {}); + + /** + * Namespace bank. + * @memberof cosmos + * @namespace + */ + + cosmos.bank = (function(bank) { + + /** + * Namespace v1beta1. + * @memberof cosmos.bank + * @namespace + */ + + bank.v1beta1 = (function(v1beta1) { + + v1beta1.Params = (function(Params) { + + /** + * Properties of a Params. + * @memberof cosmos.bank.v1beta1 + * @interface IParams + * @property {Array.|null} [sendEnabled] Params sendEnabled + * @property {boolean|null} [defaultSendEnabled] Params defaultSendEnabled + */ + + /** + * Constructs a new Params. + * @memberof cosmos.bank.v1beta1 + * @classdesc Represents a Params. + * @implements IParams + * @constructor + * @param {cosmos.bank.v1beta1.IParams=} [properties] Properties to set + */ + function Params(properties) { + this.sendEnabled = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Params sendEnabled. + * @member {Array.} sendEnabled + * @memberof cosmos.bank.v1beta1.Params + * @instance + */ + Params.prototype.sendEnabled = $util.emptyArray; + + /** + * Params defaultSendEnabled. + * @member {boolean} defaultSendEnabled + * @memberof cosmos.bank.v1beta1.Params + * @instance + */ + Params.prototype.defaultSendEnabled = false; + + /** + * Creates a new Params instance using the specified properties. + * @function create + * @memberof cosmos.bank.v1beta1.Params + * @static + * @param {cosmos.bank.v1beta1.IParams=} [properties] Properties to set + * @returns {cosmos.bank.v1beta1.Params} Params instance + */ + Params.create = function create(properties) { + return new Params(properties); + }; + + /** + * Encodes the specified Params message. Does not implicitly {@link cosmos.bank.v1beta1.Params.verify|verify} messages. + * @function encode + * @memberof cosmos.bank.v1beta1.Params + * @static + * @param {cosmos.bank.v1beta1.IParams} message Params message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Params.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sendEnabled != null && message.sendEnabled.length) + for (var i = 0; i < message.sendEnabled.length; ++i) + $root.cosmos.bank.v1beta1.SendEnabled.encode(message.sendEnabled[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.defaultSendEnabled != null && Object.hasOwnProperty.call(message, "defaultSendEnabled")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.defaultSendEnabled); + return writer; + }; + + /** + * Encodes the specified Params message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.Params.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.bank.v1beta1.Params + * @static + * @param {cosmos.bank.v1beta1.IParams} message Params message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Params.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Params message from the specified reader or buffer. + * @function decode + * @memberof cosmos.bank.v1beta1.Params + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.bank.v1beta1.Params} Params + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Params.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.bank.v1beta1.Params(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.sendEnabled && message.sendEnabled.length)) + message.sendEnabled = []; + message.sendEnabled.push($root.cosmos.bank.v1beta1.SendEnabled.decode(reader, reader.uint32())); + break; + case 2: + message.defaultSendEnabled = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Params message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.bank.v1beta1.Params + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.bank.v1beta1.Params} Params + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Params.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Params message. + * @function verify + * @memberof cosmos.bank.v1beta1.Params + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Params.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sendEnabled != null && message.hasOwnProperty("sendEnabled")) { + if (!Array.isArray(message.sendEnabled)) + return "sendEnabled: array expected"; + for (var i = 0; i < message.sendEnabled.length; ++i) { + var error = $root.cosmos.bank.v1beta1.SendEnabled.verify(message.sendEnabled[i]); + if (error) + return "sendEnabled." + error; + } + } + if (message.defaultSendEnabled != null && message.hasOwnProperty("defaultSendEnabled")) + if (typeof message.defaultSendEnabled !== "boolean") + return "defaultSendEnabled: boolean expected"; + return null; + }; + + /** + * Creates a Params message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.bank.v1beta1.Params + * @static + * @param {Object.} object Plain object + * @returns {cosmos.bank.v1beta1.Params} Params + */ + Params.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.bank.v1beta1.Params) + return object; + var message = new $root.cosmos.bank.v1beta1.Params(); + if (object.sendEnabled) { + if (!Array.isArray(object.sendEnabled)) + throw TypeError(".cosmos.bank.v1beta1.Params.sendEnabled: array expected"); + message.sendEnabled = []; + for (var i = 0; i < object.sendEnabled.length; ++i) { + if (typeof object.sendEnabled[i] !== "object") + throw TypeError(".cosmos.bank.v1beta1.Params.sendEnabled: object expected"); + message.sendEnabled[i] = $root.cosmos.bank.v1beta1.SendEnabled.fromObject(object.sendEnabled[i]); + } + } + if (object.defaultSendEnabled != null) + message.defaultSendEnabled = Boolean(object.defaultSendEnabled); + return message; + }; + + /** + * Creates a plain object from a Params message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.bank.v1beta1.Params + * @static + * @param {cosmos.bank.v1beta1.Params} message Params + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Params.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.sendEnabled = []; + if (options.defaults) + object.defaultSendEnabled = false; + if (message.sendEnabled && message.sendEnabled.length) { + object.sendEnabled = []; + for (var j = 0; j < message.sendEnabled.length; ++j) + object.sendEnabled[j] = $root.cosmos.bank.v1beta1.SendEnabled.toObject(message.sendEnabled[j], options); + } + if (message.defaultSendEnabled != null && message.hasOwnProperty("defaultSendEnabled")) + object.defaultSendEnabled = message.defaultSendEnabled; + return object; + }; + + /** + * Converts this Params to JSON. + * @function toJSON + * @memberof cosmos.bank.v1beta1.Params + * @instance + * @returns {Object.} JSON object + */ + Params.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Params; + })(v1beta1.Params || {}); + + v1beta1.SendEnabled = (function(SendEnabled) { + + /** + * Properties of a SendEnabled. + * @memberof cosmos.bank.v1beta1 + * @interface ISendEnabled + * @property {string|null} [denom] SendEnabled denom + * @property {boolean|null} [enabled] SendEnabled enabled + */ + + /** + * Constructs a new SendEnabled. + * @memberof cosmos.bank.v1beta1 + * @classdesc Represents a SendEnabled. + * @implements ISendEnabled + * @constructor + * @param {cosmos.bank.v1beta1.ISendEnabled=} [properties] Properties to set + */ + function SendEnabled(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SendEnabled denom. + * @member {string} denom + * @memberof cosmos.bank.v1beta1.SendEnabled + * @instance + */ + SendEnabled.prototype.denom = ""; + + /** + * SendEnabled enabled. + * @member {boolean} enabled + * @memberof cosmos.bank.v1beta1.SendEnabled + * @instance + */ + SendEnabled.prototype.enabled = false; + + /** + * Creates a new SendEnabled instance using the specified properties. + * @function create + * @memberof cosmos.bank.v1beta1.SendEnabled + * @static + * @param {cosmos.bank.v1beta1.ISendEnabled=} [properties] Properties to set + * @returns {cosmos.bank.v1beta1.SendEnabled} SendEnabled instance + */ + SendEnabled.create = function create(properties) { + return new SendEnabled(properties); + }; + + /** + * Encodes the specified SendEnabled message. Does not implicitly {@link cosmos.bank.v1beta1.SendEnabled.verify|verify} messages. + * @function encode + * @memberof cosmos.bank.v1beta1.SendEnabled + * @static + * @param {cosmos.bank.v1beta1.ISendEnabled} message SendEnabled message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SendEnabled.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.denom != null && Object.hasOwnProperty.call(message, "denom")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.denom); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.enabled); + return writer; + }; + + /** + * Encodes the specified SendEnabled message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.SendEnabled.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.bank.v1beta1.SendEnabled + * @static + * @param {cosmos.bank.v1beta1.ISendEnabled} message SendEnabled message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SendEnabled.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SendEnabled message from the specified reader or buffer. + * @function decode + * @memberof cosmos.bank.v1beta1.SendEnabled + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.bank.v1beta1.SendEnabled} SendEnabled + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SendEnabled.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.bank.v1beta1.SendEnabled(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.denom = reader.string(); + break; + case 2: + message.enabled = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SendEnabled message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.bank.v1beta1.SendEnabled + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.bank.v1beta1.SendEnabled} SendEnabled + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SendEnabled.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SendEnabled message. + * @function verify + * @memberof cosmos.bank.v1beta1.SendEnabled + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SendEnabled.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.denom != null && message.hasOwnProperty("denom")) + if (!$util.isString(message.denom)) + return "denom: string expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + return null; + }; + + /** + * Creates a SendEnabled message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.bank.v1beta1.SendEnabled + * @static + * @param {Object.} object Plain object + * @returns {cosmos.bank.v1beta1.SendEnabled} SendEnabled + */ + SendEnabled.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.bank.v1beta1.SendEnabled) + return object; + var message = new $root.cosmos.bank.v1beta1.SendEnabled(); + if (object.denom != null) + message.denom = String(object.denom); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + return message; + }; + + /** + * Creates a plain object from a SendEnabled message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.bank.v1beta1.SendEnabled + * @static + * @param {cosmos.bank.v1beta1.SendEnabled} message SendEnabled + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SendEnabled.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.denom = ""; + object.enabled = false; + } + if (message.denom != null && message.hasOwnProperty("denom")) + object.denom = message.denom; + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + return object; + }; + + /** + * Converts this SendEnabled to JSON. + * @function toJSON + * @memberof cosmos.bank.v1beta1.SendEnabled + * @instance + * @returns {Object.} JSON object + */ + SendEnabled.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SendEnabled; + })(v1beta1.SendEnabled || {}); + + v1beta1.Input = (function(Input) { + + /** + * Properties of an Input. + * @memberof cosmos.bank.v1beta1 + * @interface IInput + * @property {string|null} [address] Input address + * @property {Array.|null} [coins] Input coins + */ + + /** + * Constructs a new Input. + * @memberof cosmos.bank.v1beta1 + * @classdesc Represents an Input. + * @implements IInput + * @constructor + * @param {cosmos.bank.v1beta1.IInput=} [properties] Properties to set + */ + function Input(properties) { + this.coins = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Input address. + * @member {string} address + * @memberof cosmos.bank.v1beta1.Input + * @instance + */ + Input.prototype.address = ""; + + /** + * Input coins. + * @member {Array.} coins + * @memberof cosmos.bank.v1beta1.Input + * @instance + */ + Input.prototype.coins = $util.emptyArray; + + /** + * Creates a new Input instance using the specified properties. + * @function create + * @memberof cosmos.bank.v1beta1.Input + * @static + * @param {cosmos.bank.v1beta1.IInput=} [properties] Properties to set + * @returns {cosmos.bank.v1beta1.Input} Input instance + */ + Input.create = function create(properties) { + return new Input(properties); + }; + + /** + * Encodes the specified Input message. Does not implicitly {@link cosmos.bank.v1beta1.Input.verify|verify} messages. + * @function encode + * @memberof cosmos.bank.v1beta1.Input + * @static + * @param {cosmos.bank.v1beta1.IInput} message Input message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Input.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.address != null && Object.hasOwnProperty.call(message, "address")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.address); + if (message.coins != null && message.coins.length) + for (var i = 0; i < message.coins.length; ++i) + $root.cosmos.base.v1beta1.Coin.encode(message.coins[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Input message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.Input.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.bank.v1beta1.Input + * @static + * @param {cosmos.bank.v1beta1.IInput} message Input message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Input.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Input message from the specified reader or buffer. + * @function decode + * @memberof cosmos.bank.v1beta1.Input + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.bank.v1beta1.Input} Input + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Input.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.bank.v1beta1.Input(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.address = reader.string(); + break; + case 2: + if (!(message.coins && message.coins.length)) + message.coins = []; + message.coins.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Input message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.bank.v1beta1.Input + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.bank.v1beta1.Input} Input + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Input.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Input message. + * @function verify + * @memberof cosmos.bank.v1beta1.Input + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Input.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.address != null && message.hasOwnProperty("address")) + if (!$util.isString(message.address)) + return "address: string expected"; + if (message.coins != null && message.hasOwnProperty("coins")) { + if (!Array.isArray(message.coins)) + return "coins: array expected"; + for (var i = 0; i < message.coins.length; ++i) { + var error = $root.cosmos.base.v1beta1.Coin.verify(message.coins[i]); + if (error) + return "coins." + error; + } + } + return null; + }; + + /** + * Creates an Input message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.bank.v1beta1.Input + * @static + * @param {Object.} object Plain object + * @returns {cosmos.bank.v1beta1.Input} Input + */ + Input.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.bank.v1beta1.Input) + return object; + var message = new $root.cosmos.bank.v1beta1.Input(); + if (object.address != null) + message.address = String(object.address); + if (object.coins) { + if (!Array.isArray(object.coins)) + throw TypeError(".cosmos.bank.v1beta1.Input.coins: array expected"); + message.coins = []; + for (var i = 0; i < object.coins.length; ++i) { + if (typeof object.coins[i] !== "object") + throw TypeError(".cosmos.bank.v1beta1.Input.coins: object expected"); + message.coins[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.coins[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an Input message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.bank.v1beta1.Input + * @static + * @param {cosmos.bank.v1beta1.Input} message Input + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Input.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.coins = []; + if (options.defaults) + object.address = ""; + if (message.address != null && message.hasOwnProperty("address")) + object.address = message.address; + if (message.coins && message.coins.length) { + object.coins = []; + for (var j = 0; j < message.coins.length; ++j) + object.coins[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.coins[j], options); + } + return object; + }; + + /** + * Converts this Input to JSON. + * @function toJSON + * @memberof cosmos.bank.v1beta1.Input + * @instance + * @returns {Object.} JSON object + */ + Input.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Input; + })(v1beta1.Input || {}); + + v1beta1.Output = (function(Output) { + + /** + * Properties of an Output. + * @memberof cosmos.bank.v1beta1 + * @interface IOutput + * @property {string|null} [address] Output address + * @property {Array.|null} [coins] Output coins + */ + + /** + * Constructs a new Output. + * @memberof cosmos.bank.v1beta1 + * @classdesc Represents an Output. + * @implements IOutput + * @constructor + * @param {cosmos.bank.v1beta1.IOutput=} [properties] Properties to set + */ + function Output(properties) { + this.coins = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Output address. + * @member {string} address + * @memberof cosmos.bank.v1beta1.Output + * @instance + */ + Output.prototype.address = ""; + + /** + * Output coins. + * @member {Array.} coins + * @memberof cosmos.bank.v1beta1.Output + * @instance + */ + Output.prototype.coins = $util.emptyArray; + + /** + * Creates a new Output instance using the specified properties. + * @function create + * @memberof cosmos.bank.v1beta1.Output + * @static + * @param {cosmos.bank.v1beta1.IOutput=} [properties] Properties to set + * @returns {cosmos.bank.v1beta1.Output} Output instance + */ + Output.create = function create(properties) { + return new Output(properties); + }; + + /** + * Encodes the specified Output message. Does not implicitly {@link cosmos.bank.v1beta1.Output.verify|verify} messages. + * @function encode + * @memberof cosmos.bank.v1beta1.Output + * @static + * @param {cosmos.bank.v1beta1.IOutput} message Output message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Output.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.address != null && Object.hasOwnProperty.call(message, "address")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.address); + if (message.coins != null && message.coins.length) + for (var i = 0; i < message.coins.length; ++i) + $root.cosmos.base.v1beta1.Coin.encode(message.coins[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Output message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.Output.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.bank.v1beta1.Output + * @static + * @param {cosmos.bank.v1beta1.IOutput} message Output message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Output.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Output message from the specified reader or buffer. + * @function decode + * @memberof cosmos.bank.v1beta1.Output + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.bank.v1beta1.Output} Output + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Output.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.bank.v1beta1.Output(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.address = reader.string(); + break; + case 2: + if (!(message.coins && message.coins.length)) + message.coins = []; + message.coins.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Output message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.bank.v1beta1.Output + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.bank.v1beta1.Output} Output + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Output.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Output message. + * @function verify + * @memberof cosmos.bank.v1beta1.Output + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Output.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.address != null && message.hasOwnProperty("address")) + if (!$util.isString(message.address)) + return "address: string expected"; + if (message.coins != null && message.hasOwnProperty("coins")) { + if (!Array.isArray(message.coins)) + return "coins: array expected"; + for (var i = 0; i < message.coins.length; ++i) { + var error = $root.cosmos.base.v1beta1.Coin.verify(message.coins[i]); + if (error) + return "coins." + error; + } + } + return null; + }; + + /** + * Creates an Output message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.bank.v1beta1.Output + * @static + * @param {Object.} object Plain object + * @returns {cosmos.bank.v1beta1.Output} Output + */ + Output.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.bank.v1beta1.Output) + return object; + var message = new $root.cosmos.bank.v1beta1.Output(); + if (object.address != null) + message.address = String(object.address); + if (object.coins) { + if (!Array.isArray(object.coins)) + throw TypeError(".cosmos.bank.v1beta1.Output.coins: array expected"); + message.coins = []; + for (var i = 0; i < object.coins.length; ++i) { + if (typeof object.coins[i] !== "object") + throw TypeError(".cosmos.bank.v1beta1.Output.coins: object expected"); + message.coins[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.coins[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an Output message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.bank.v1beta1.Output + * @static + * @param {cosmos.bank.v1beta1.Output} message Output + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Output.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.coins = []; + if (options.defaults) + object.address = ""; + if (message.address != null && message.hasOwnProperty("address")) + object.address = message.address; + if (message.coins && message.coins.length) { + object.coins = []; + for (var j = 0; j < message.coins.length; ++j) + object.coins[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.coins[j], options); + } + return object; + }; + + /** + * Converts this Output to JSON. + * @function toJSON + * @memberof cosmos.bank.v1beta1.Output + * @instance + * @returns {Object.} JSON object + */ + Output.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Output; + })(v1beta1.Output || {}); + + v1beta1.Supply = (function(Supply) { + + /** + * Properties of a Supply. + * @memberof cosmos.bank.v1beta1 + * @interface ISupply + * @property {Array.|null} [total] Supply total + */ + + /** + * Constructs a new Supply. + * @memberof cosmos.bank.v1beta1 + * @classdesc Represents a Supply. + * @implements ISupply + * @constructor + * @param {cosmos.bank.v1beta1.ISupply=} [properties] Properties to set + */ + function Supply(properties) { + this.total = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Supply total. + * @member {Array.} total + * @memberof cosmos.bank.v1beta1.Supply + * @instance + */ + Supply.prototype.total = $util.emptyArray; + + /** + * Creates a new Supply instance using the specified properties. + * @function create + * @memberof cosmos.bank.v1beta1.Supply + * @static + * @param {cosmos.bank.v1beta1.ISupply=} [properties] Properties to set + * @returns {cosmos.bank.v1beta1.Supply} Supply instance + */ + Supply.create = function create(properties) { + return new Supply(properties); + }; + + /** + * Encodes the specified Supply message. Does not implicitly {@link cosmos.bank.v1beta1.Supply.verify|verify} messages. + * @function encode + * @memberof cosmos.bank.v1beta1.Supply + * @static + * @param {cosmos.bank.v1beta1.ISupply} message Supply message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Supply.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.total != null && message.total.length) + for (var i = 0; i < message.total.length; ++i) + $root.cosmos.base.v1beta1.Coin.encode(message.total[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Supply message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.Supply.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.bank.v1beta1.Supply + * @static + * @param {cosmos.bank.v1beta1.ISupply} message Supply message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Supply.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Supply message from the specified reader or buffer. + * @function decode + * @memberof cosmos.bank.v1beta1.Supply + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.bank.v1beta1.Supply} Supply + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Supply.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.bank.v1beta1.Supply(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.total && message.total.length)) + message.total = []; + message.total.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Supply message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.bank.v1beta1.Supply + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.bank.v1beta1.Supply} Supply + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Supply.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Supply message. + * @function verify + * @memberof cosmos.bank.v1beta1.Supply + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Supply.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.total != null && message.hasOwnProperty("total")) { + if (!Array.isArray(message.total)) + return "total: array expected"; + for (var i = 0; i < message.total.length; ++i) { + var error = $root.cosmos.base.v1beta1.Coin.verify(message.total[i]); + if (error) + return "total." + error; + } + } + return null; + }; + + /** + * Creates a Supply message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.bank.v1beta1.Supply + * @static + * @param {Object.} object Plain object + * @returns {cosmos.bank.v1beta1.Supply} Supply + */ + Supply.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.bank.v1beta1.Supply) + return object; + var message = new $root.cosmos.bank.v1beta1.Supply(); + if (object.total) { + if (!Array.isArray(object.total)) + throw TypeError(".cosmos.bank.v1beta1.Supply.total: array expected"); + message.total = []; + for (var i = 0; i < object.total.length; ++i) { + if (typeof object.total[i] !== "object") + throw TypeError(".cosmos.bank.v1beta1.Supply.total: object expected"); + message.total[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.total[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Supply message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.bank.v1beta1.Supply + * @static + * @param {cosmos.bank.v1beta1.Supply} message Supply + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Supply.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.total = []; + if (message.total && message.total.length) { + object.total = []; + for (var j = 0; j < message.total.length; ++j) + object.total[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.total[j], options); + } + return object; + }; + + /** + * Converts this Supply to JSON. + * @function toJSON + * @memberof cosmos.bank.v1beta1.Supply + * @instance + * @returns {Object.} JSON object + */ + Supply.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Supply; + })(v1beta1.Supply || {}); + + v1beta1.DenomUnit = (function(DenomUnit) { + + /** + * Properties of a DenomUnit. + * @memberof cosmos.bank.v1beta1 + * @interface IDenomUnit + * @property {string|null} [denom] DenomUnit denom + * @property {number|null} [exponent] DenomUnit exponent + * @property {Array.|null} [aliases] DenomUnit aliases + */ + + /** + * Constructs a new DenomUnit. + * @memberof cosmos.bank.v1beta1 + * @classdesc Represents a DenomUnit. + * @implements IDenomUnit + * @constructor + * @param {cosmos.bank.v1beta1.IDenomUnit=} [properties] Properties to set + */ + function DenomUnit(properties) { + this.aliases = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DenomUnit denom. + * @member {string} denom + * @memberof cosmos.bank.v1beta1.DenomUnit + * @instance + */ + DenomUnit.prototype.denom = ""; + + /** + * DenomUnit exponent. + * @member {number} exponent + * @memberof cosmos.bank.v1beta1.DenomUnit + * @instance + */ + DenomUnit.prototype.exponent = 0; + + /** + * DenomUnit aliases. + * @member {Array.} aliases + * @memberof cosmos.bank.v1beta1.DenomUnit + * @instance + */ + DenomUnit.prototype.aliases = $util.emptyArray; + + /** + * Creates a new DenomUnit instance using the specified properties. + * @function create + * @memberof cosmos.bank.v1beta1.DenomUnit + * @static + * @param {cosmos.bank.v1beta1.IDenomUnit=} [properties] Properties to set + * @returns {cosmos.bank.v1beta1.DenomUnit} DenomUnit instance + */ + DenomUnit.create = function create(properties) { + return new DenomUnit(properties); + }; + + /** + * Encodes the specified DenomUnit message. Does not implicitly {@link cosmos.bank.v1beta1.DenomUnit.verify|verify} messages. + * @function encode + * @memberof cosmos.bank.v1beta1.DenomUnit + * @static + * @param {cosmos.bank.v1beta1.IDenomUnit} message DenomUnit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DenomUnit.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.denom != null && Object.hasOwnProperty.call(message, "denom")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.denom); + if (message.exponent != null && Object.hasOwnProperty.call(message, "exponent")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.exponent); + if (message.aliases != null && message.aliases.length) + for (var i = 0; i < message.aliases.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.aliases[i]); + return writer; + }; + + /** + * Encodes the specified DenomUnit message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.DenomUnit.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.bank.v1beta1.DenomUnit + * @static + * @param {cosmos.bank.v1beta1.IDenomUnit} message DenomUnit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DenomUnit.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DenomUnit message from the specified reader or buffer. + * @function decode + * @memberof cosmos.bank.v1beta1.DenomUnit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.bank.v1beta1.DenomUnit} DenomUnit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DenomUnit.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.bank.v1beta1.DenomUnit(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.denom = reader.string(); + break; + case 2: + message.exponent = reader.uint32(); + break; + case 3: + if (!(message.aliases && message.aliases.length)) + message.aliases = []; + message.aliases.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DenomUnit message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.bank.v1beta1.DenomUnit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.bank.v1beta1.DenomUnit} DenomUnit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DenomUnit.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DenomUnit message. + * @function verify + * @memberof cosmos.bank.v1beta1.DenomUnit + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DenomUnit.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.denom != null && message.hasOwnProperty("denom")) + if (!$util.isString(message.denom)) + return "denom: string expected"; + if (message.exponent != null && message.hasOwnProperty("exponent")) + if (!$util.isInteger(message.exponent)) + return "exponent: integer expected"; + if (message.aliases != null && message.hasOwnProperty("aliases")) { + if (!Array.isArray(message.aliases)) + return "aliases: array expected"; + for (var i = 0; i < message.aliases.length; ++i) + if (!$util.isString(message.aliases[i])) + return "aliases: string[] expected"; + } + return null; + }; + + /** + * Creates a DenomUnit message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.bank.v1beta1.DenomUnit + * @static + * @param {Object.} object Plain object + * @returns {cosmos.bank.v1beta1.DenomUnit} DenomUnit + */ + DenomUnit.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.bank.v1beta1.DenomUnit) + return object; + var message = new $root.cosmos.bank.v1beta1.DenomUnit(); + if (object.denom != null) + message.denom = String(object.denom); + if (object.exponent != null) + message.exponent = object.exponent >>> 0; + if (object.aliases) { + if (!Array.isArray(object.aliases)) + throw TypeError(".cosmos.bank.v1beta1.DenomUnit.aliases: array expected"); + message.aliases = []; + for (var i = 0; i < object.aliases.length; ++i) + message.aliases[i] = String(object.aliases[i]); + } + return message; + }; + + /** + * Creates a plain object from a DenomUnit message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.bank.v1beta1.DenomUnit + * @static + * @param {cosmos.bank.v1beta1.DenomUnit} message DenomUnit + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DenomUnit.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.aliases = []; + if (options.defaults) { + object.denom = ""; + object.exponent = 0; + } + if (message.denom != null && message.hasOwnProperty("denom")) + object.denom = message.denom; + if (message.exponent != null && message.hasOwnProperty("exponent")) + object.exponent = message.exponent; + if (message.aliases && message.aliases.length) { + object.aliases = []; + for (var j = 0; j < message.aliases.length; ++j) + object.aliases[j] = message.aliases[j]; + } + return object; + }; + + /** + * Converts this DenomUnit to JSON. + * @function toJSON + * @memberof cosmos.bank.v1beta1.DenomUnit + * @instance + * @returns {Object.} JSON object + */ + DenomUnit.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DenomUnit; + })(v1beta1.DenomUnit || {}); + + v1beta1.Metadata = (function(Metadata) { + + /** + * Properties of a Metadata. + * @memberof cosmos.bank.v1beta1 + * @interface IMetadata + * @property {string|null} [description] Metadata description + * @property {Array.|null} [denomUnits] Metadata denomUnits + * @property {string|null} [base] Metadata base + * @property {string|null} [display] Metadata display + */ + + /** + * Constructs a new Metadata. + * @memberof cosmos.bank.v1beta1 + * @classdesc Represents a Metadata. + * @implements IMetadata + * @constructor + * @param {cosmos.bank.v1beta1.IMetadata=} [properties] Properties to set + */ + function Metadata(properties) { + this.denomUnits = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Metadata description. + * @member {string} description + * @memberof cosmos.bank.v1beta1.Metadata + * @instance + */ + Metadata.prototype.description = ""; + + /** + * Metadata denomUnits. + * @member {Array.} denomUnits + * @memberof cosmos.bank.v1beta1.Metadata + * @instance + */ + Metadata.prototype.denomUnits = $util.emptyArray; + + /** + * Metadata base. + * @member {string} base + * @memberof cosmos.bank.v1beta1.Metadata + * @instance + */ + Metadata.prototype.base = ""; + + /** + * Metadata display. + * @member {string} display + * @memberof cosmos.bank.v1beta1.Metadata + * @instance + */ + Metadata.prototype.display = ""; + + /** + * Creates a new Metadata instance using the specified properties. + * @function create + * @memberof cosmos.bank.v1beta1.Metadata + * @static + * @param {cosmos.bank.v1beta1.IMetadata=} [properties] Properties to set + * @returns {cosmos.bank.v1beta1.Metadata} Metadata instance + */ + Metadata.create = function create(properties) { + return new Metadata(properties); + }; + + /** + * Encodes the specified Metadata message. Does not implicitly {@link cosmos.bank.v1beta1.Metadata.verify|verify} messages. + * @function encode + * @memberof cosmos.bank.v1beta1.Metadata + * @static + * @param {cosmos.bank.v1beta1.IMetadata} message Metadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Metadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.description); + if (message.denomUnits != null && message.denomUnits.length) + for (var i = 0; i < message.denomUnits.length; ++i) + $root.cosmos.bank.v1beta1.DenomUnit.encode(message.denomUnits[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.base != null && Object.hasOwnProperty.call(message, "base")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.base); + if (message.display != null && Object.hasOwnProperty.call(message, "display")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.display); + return writer; + }; + + /** + * Encodes the specified Metadata message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.Metadata.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.bank.v1beta1.Metadata + * @static + * @param {cosmos.bank.v1beta1.IMetadata} message Metadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Metadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Metadata message from the specified reader or buffer. + * @function decode + * @memberof cosmos.bank.v1beta1.Metadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.bank.v1beta1.Metadata} Metadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Metadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.bank.v1beta1.Metadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.description = reader.string(); + break; + case 2: + if (!(message.denomUnits && message.denomUnits.length)) + message.denomUnits = []; + message.denomUnits.push($root.cosmos.bank.v1beta1.DenomUnit.decode(reader, reader.uint32())); + break; + case 3: + message.base = reader.string(); + break; + case 4: + message.display = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Metadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.bank.v1beta1.Metadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.bank.v1beta1.Metadata} Metadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Metadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Metadata message. + * @function verify + * @memberof cosmos.bank.v1beta1.Metadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Metadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.denomUnits != null && message.hasOwnProperty("denomUnits")) { + if (!Array.isArray(message.denomUnits)) + return "denomUnits: array expected"; + for (var i = 0; i < message.denomUnits.length; ++i) { + var error = $root.cosmos.bank.v1beta1.DenomUnit.verify(message.denomUnits[i]); + if (error) + return "denomUnits." + error; + } + } + if (message.base != null && message.hasOwnProperty("base")) + if (!$util.isString(message.base)) + return "base: string expected"; + if (message.display != null && message.hasOwnProperty("display")) + if (!$util.isString(message.display)) + return "display: string expected"; + return null; + }; + + /** + * Creates a Metadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.bank.v1beta1.Metadata + * @static + * @param {Object.} object Plain object + * @returns {cosmos.bank.v1beta1.Metadata} Metadata + */ + Metadata.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.bank.v1beta1.Metadata) + return object; + var message = new $root.cosmos.bank.v1beta1.Metadata(); + if (object.description != null) + message.description = String(object.description); + if (object.denomUnits) { + if (!Array.isArray(object.denomUnits)) + throw TypeError(".cosmos.bank.v1beta1.Metadata.denomUnits: array expected"); + message.denomUnits = []; + for (var i = 0; i < object.denomUnits.length; ++i) { + if (typeof object.denomUnits[i] !== "object") + throw TypeError(".cosmos.bank.v1beta1.Metadata.denomUnits: object expected"); + message.denomUnits[i] = $root.cosmos.bank.v1beta1.DenomUnit.fromObject(object.denomUnits[i]); + } + } + if (object.base != null) + message.base = String(object.base); + if (object.display != null) + message.display = String(object.display); + return message; + }; + + /** + * Creates a plain object from a Metadata message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.bank.v1beta1.Metadata + * @static + * @param {cosmos.bank.v1beta1.Metadata} message Metadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Metadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.denomUnits = []; + if (options.defaults) { + object.description = ""; + object.base = ""; + object.display = ""; + } + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.denomUnits && message.denomUnits.length) { + object.denomUnits = []; + for (var j = 0; j < message.denomUnits.length; ++j) + object.denomUnits[j] = $root.cosmos.bank.v1beta1.DenomUnit.toObject(message.denomUnits[j], options); + } + if (message.base != null && message.hasOwnProperty("base")) + object.base = message.base; + if (message.display != null && message.hasOwnProperty("display")) + object.display = message.display; + return object; + }; + + /** + * Converts this Metadata to JSON. + * @function toJSON + * @memberof cosmos.bank.v1beta1.Metadata + * @instance + * @returns {Object.} JSON object + */ + Metadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Metadata; + })(v1beta1.Metadata || {}); + + v1beta1.Msg = (function(Msg) { + + /** + * Constructs a new Msg service. + * @memberof cosmos.bank.v1beta1 + * @classdesc Represents a Msg + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Msg(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Msg.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Msg; + + /** + * Creates new Msg service using the specified rpc implementation. + * @function create + * @memberof cosmos.bank.v1beta1.Msg + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Msg} RPC service. Useful where requests and/or responses are streamed. + */ + Msg.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link cosmos.bank.v1beta1.Msg#send}. + * @memberof cosmos.bank.v1beta1.Msg + * @typedef SendCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.bank.v1beta1.IMsgSendResponse} [response] MsgSendResponse + */ + + /** + * Calls Send. + * @function send + * @memberof cosmos.bank.v1beta1.Msg + * @instance + * @param {cosmos.bank.v1beta1.IMsgSend} request MsgSend message or plain object + * @param {cosmos.bank.v1beta1.Msg.SendCallback} callback Node-style callback called with the error, if any, and MsgSendResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Msg.prototype.send = function send(request, callback) { + return this.rpcCall(send, $root.cosmos.bank.v1beta1.MsgSend, $root.cosmos.bank.v1beta1.MsgSendResponse, request, callback); + }, "name", { value: "Send" }); + + /** + * Calls Send. + * @function send + * @memberof cosmos.bank.v1beta1.Msg + * @instance + * @param {cosmos.bank.v1beta1.IMsgSend} request MsgSend message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link cosmos.bank.v1beta1.Msg#multiSend}. + * @memberof cosmos.bank.v1beta1.Msg + * @typedef MultiSendCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.bank.v1beta1.IMsgMultiSendResponse} [response] MsgMultiSendResponse + */ + + /** + * Calls MultiSend. + * @function multiSend + * @memberof cosmos.bank.v1beta1.Msg + * @instance + * @param {cosmos.bank.v1beta1.IMsgMultiSend} request MsgMultiSend message or plain object + * @param {cosmos.bank.v1beta1.Msg.MultiSendCallback} callback Node-style callback called with the error, if any, and MsgMultiSendResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Msg.prototype.multiSend = function multiSend(request, callback) { + return this.rpcCall(multiSend, $root.cosmos.bank.v1beta1.MsgMultiSend, $root.cosmos.bank.v1beta1.MsgMultiSendResponse, request, callback); + }, "name", { value: "MultiSend" }); + + /** + * Calls MultiSend. + * @function multiSend + * @memberof cosmos.bank.v1beta1.Msg + * @instance + * @param {cosmos.bank.v1beta1.IMsgMultiSend} request MsgMultiSend message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Msg; + })(v1beta1.Msg || {}); + + v1beta1.MsgSend = (function(MsgSend) { + + /** + * Properties of a MsgSend. + * @memberof cosmos.bank.v1beta1 + * @interface IMsgSend + * @property {string|null} [fromAddress] MsgSend fromAddress + * @property {string|null} [toAddress] MsgSend toAddress + * @property {Array.|null} [amount] MsgSend amount + */ + + /** + * Constructs a new MsgSend. + * @memberof cosmos.bank.v1beta1 + * @classdesc Represents a MsgSend. + * @implements IMsgSend + * @constructor + * @param {cosmos.bank.v1beta1.IMsgSend=} [properties] Properties to set + */ + function MsgSend(properties) { + this.amount = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgSend fromAddress. + * @member {string} fromAddress + * @memberof cosmos.bank.v1beta1.MsgSend + * @instance + */ + MsgSend.prototype.fromAddress = ""; + + /** + * MsgSend toAddress. + * @member {string} toAddress + * @memberof cosmos.bank.v1beta1.MsgSend + * @instance + */ + MsgSend.prototype.toAddress = ""; + + /** + * MsgSend amount. + * @member {Array.} amount + * @memberof cosmos.bank.v1beta1.MsgSend + * @instance + */ + MsgSend.prototype.amount = $util.emptyArray; + + /** + * Creates a new MsgSend instance using the specified properties. + * @function create + * @memberof cosmos.bank.v1beta1.MsgSend + * @static + * @param {cosmos.bank.v1beta1.IMsgSend=} [properties] Properties to set + * @returns {cosmos.bank.v1beta1.MsgSend} MsgSend instance + */ + MsgSend.create = function create(properties) { + return new MsgSend(properties); + }; + + /** + * Encodes the specified MsgSend message. Does not implicitly {@link cosmos.bank.v1beta1.MsgSend.verify|verify} messages. + * @function encode + * @memberof cosmos.bank.v1beta1.MsgSend + * @static + * @param {cosmos.bank.v1beta1.IMsgSend} message MsgSend message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgSend.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fromAddress != null && Object.hasOwnProperty.call(message, "fromAddress")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.fromAddress); + if (message.toAddress != null && Object.hasOwnProperty.call(message, "toAddress")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.toAddress); + if (message.amount != null && message.amount.length) + for (var i = 0; i < message.amount.length; ++i) + $root.cosmos.base.v1beta1.Coin.encode(message.amount[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MsgSend message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.MsgSend.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.bank.v1beta1.MsgSend + * @static + * @param {cosmos.bank.v1beta1.IMsgSend} message MsgSend message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgSend.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgSend message from the specified reader or buffer. + * @function decode + * @memberof cosmos.bank.v1beta1.MsgSend + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.bank.v1beta1.MsgSend} MsgSend + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgSend.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.bank.v1beta1.MsgSend(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.fromAddress = reader.string(); + break; + case 2: + message.toAddress = reader.string(); + break; + case 3: + if (!(message.amount && message.amount.length)) + message.amount = []; + message.amount.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgSend message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.bank.v1beta1.MsgSend + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.bank.v1beta1.MsgSend} MsgSend + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgSend.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgSend message. + * @function verify + * @memberof cosmos.bank.v1beta1.MsgSend + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgSend.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fromAddress != null && message.hasOwnProperty("fromAddress")) + if (!$util.isString(message.fromAddress)) + return "fromAddress: string expected"; + if (message.toAddress != null && message.hasOwnProperty("toAddress")) + if (!$util.isString(message.toAddress)) + return "toAddress: string expected"; + if (message.amount != null && message.hasOwnProperty("amount")) { + if (!Array.isArray(message.amount)) + return "amount: array expected"; + for (var i = 0; i < message.amount.length; ++i) { + var error = $root.cosmos.base.v1beta1.Coin.verify(message.amount[i]); + if (error) + return "amount." + error; + } + } + return null; + }; + + /** + * Creates a MsgSend message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.bank.v1beta1.MsgSend + * @static + * @param {Object.} object Plain object + * @returns {cosmos.bank.v1beta1.MsgSend} MsgSend + */ + MsgSend.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.bank.v1beta1.MsgSend) + return object; + var message = new $root.cosmos.bank.v1beta1.MsgSend(); + if (object.fromAddress != null) + message.fromAddress = String(object.fromAddress); + if (object.toAddress != null) + message.toAddress = String(object.toAddress); + if (object.amount) { + if (!Array.isArray(object.amount)) + throw TypeError(".cosmos.bank.v1beta1.MsgSend.amount: array expected"); + message.amount = []; + for (var i = 0; i < object.amount.length; ++i) { + if (typeof object.amount[i] !== "object") + throw TypeError(".cosmos.bank.v1beta1.MsgSend.amount: object expected"); + message.amount[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.amount[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a MsgSend message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.bank.v1beta1.MsgSend + * @static + * @param {cosmos.bank.v1beta1.MsgSend} message MsgSend + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgSend.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.amount = []; + if (options.defaults) { + object.fromAddress = ""; + object.toAddress = ""; + } + if (message.fromAddress != null && message.hasOwnProperty("fromAddress")) + object.fromAddress = message.fromAddress; + if (message.toAddress != null && message.hasOwnProperty("toAddress")) + object.toAddress = message.toAddress; + if (message.amount && message.amount.length) { + object.amount = []; + for (var j = 0; j < message.amount.length; ++j) + object.amount[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.amount[j], options); + } + return object; + }; + + /** + * Converts this MsgSend to JSON. + * @function toJSON + * @memberof cosmos.bank.v1beta1.MsgSend + * @instance + * @returns {Object.} JSON object + */ + MsgSend.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgSend; + })(v1beta1.MsgSend || {}); + + v1beta1.MsgSendResponse = (function(MsgSendResponse) { + + /** + * Properties of a MsgSendResponse. + * @memberof cosmos.bank.v1beta1 + * @interface IMsgSendResponse + */ + + /** + * Constructs a new MsgSendResponse. + * @memberof cosmos.bank.v1beta1 + * @classdesc Represents a MsgSendResponse. + * @implements IMsgSendResponse + * @constructor + * @param {cosmos.bank.v1beta1.IMsgSendResponse=} [properties] Properties to set + */ + function MsgSendResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new MsgSendResponse instance using the specified properties. + * @function create + * @memberof cosmos.bank.v1beta1.MsgSendResponse + * @static + * @param {cosmos.bank.v1beta1.IMsgSendResponse=} [properties] Properties to set + * @returns {cosmos.bank.v1beta1.MsgSendResponse} MsgSendResponse instance + */ + MsgSendResponse.create = function create(properties) { + return new MsgSendResponse(properties); + }; + + /** + * Encodes the specified MsgSendResponse message. Does not implicitly {@link cosmos.bank.v1beta1.MsgSendResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.bank.v1beta1.MsgSendResponse + * @static + * @param {cosmos.bank.v1beta1.IMsgSendResponse} message MsgSendResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgSendResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MsgSendResponse message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.MsgSendResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.bank.v1beta1.MsgSendResponse + * @static + * @param {cosmos.bank.v1beta1.IMsgSendResponse} message MsgSendResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgSendResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgSendResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.bank.v1beta1.MsgSendResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.bank.v1beta1.MsgSendResponse} MsgSendResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgSendResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.bank.v1beta1.MsgSendResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgSendResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.bank.v1beta1.MsgSendResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.bank.v1beta1.MsgSendResponse} MsgSendResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgSendResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgSendResponse message. + * @function verify + * @memberof cosmos.bank.v1beta1.MsgSendResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgSendResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MsgSendResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.bank.v1beta1.MsgSendResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.bank.v1beta1.MsgSendResponse} MsgSendResponse + */ + MsgSendResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.bank.v1beta1.MsgSendResponse) + return object; + return new $root.cosmos.bank.v1beta1.MsgSendResponse(); + }; + + /** + * Creates a plain object from a MsgSendResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.bank.v1beta1.MsgSendResponse + * @static + * @param {cosmos.bank.v1beta1.MsgSendResponse} message MsgSendResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgSendResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MsgSendResponse to JSON. + * @function toJSON + * @memberof cosmos.bank.v1beta1.MsgSendResponse + * @instance + * @returns {Object.} JSON object + */ + MsgSendResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgSendResponse; + })(v1beta1.MsgSendResponse || {}); + + v1beta1.MsgMultiSend = (function(MsgMultiSend) { + + /** + * Properties of a MsgMultiSend. + * @memberof cosmos.bank.v1beta1 + * @interface IMsgMultiSend + * @property {Array.|null} [inputs] MsgMultiSend inputs + * @property {Array.|null} [outputs] MsgMultiSend outputs + */ + + /** + * Constructs a new MsgMultiSend. + * @memberof cosmos.bank.v1beta1 + * @classdesc Represents a MsgMultiSend. + * @implements IMsgMultiSend + * @constructor + * @param {cosmos.bank.v1beta1.IMsgMultiSend=} [properties] Properties to set + */ + function MsgMultiSend(properties) { + this.inputs = []; + this.outputs = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgMultiSend inputs. + * @member {Array.} inputs + * @memberof cosmos.bank.v1beta1.MsgMultiSend + * @instance + */ + MsgMultiSend.prototype.inputs = $util.emptyArray; + + /** + * MsgMultiSend outputs. + * @member {Array.} outputs + * @memberof cosmos.bank.v1beta1.MsgMultiSend + * @instance + */ + MsgMultiSend.prototype.outputs = $util.emptyArray; + + /** + * Creates a new MsgMultiSend instance using the specified properties. + * @function create + * @memberof cosmos.bank.v1beta1.MsgMultiSend + * @static + * @param {cosmos.bank.v1beta1.IMsgMultiSend=} [properties] Properties to set + * @returns {cosmos.bank.v1beta1.MsgMultiSend} MsgMultiSend instance + */ + MsgMultiSend.create = function create(properties) { + return new MsgMultiSend(properties); + }; + + /** + * Encodes the specified MsgMultiSend message. Does not implicitly {@link cosmos.bank.v1beta1.MsgMultiSend.verify|verify} messages. + * @function encode + * @memberof cosmos.bank.v1beta1.MsgMultiSend + * @static + * @param {cosmos.bank.v1beta1.IMsgMultiSend} message MsgMultiSend message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgMultiSend.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.inputs != null && message.inputs.length) + for (var i = 0; i < message.inputs.length; ++i) + $root.cosmos.bank.v1beta1.Input.encode(message.inputs[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.outputs != null && message.outputs.length) + for (var i = 0; i < message.outputs.length; ++i) + $root.cosmos.bank.v1beta1.Output.encode(message.outputs[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MsgMultiSend message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.MsgMultiSend.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.bank.v1beta1.MsgMultiSend + * @static + * @param {cosmos.bank.v1beta1.IMsgMultiSend} message MsgMultiSend message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgMultiSend.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgMultiSend message from the specified reader or buffer. + * @function decode + * @memberof cosmos.bank.v1beta1.MsgMultiSend + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.bank.v1beta1.MsgMultiSend} MsgMultiSend + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgMultiSend.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.bank.v1beta1.MsgMultiSend(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.inputs && message.inputs.length)) + message.inputs = []; + message.inputs.push($root.cosmos.bank.v1beta1.Input.decode(reader, reader.uint32())); + break; + case 2: + if (!(message.outputs && message.outputs.length)) + message.outputs = []; + message.outputs.push($root.cosmos.bank.v1beta1.Output.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgMultiSend message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.bank.v1beta1.MsgMultiSend + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.bank.v1beta1.MsgMultiSend} MsgMultiSend + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgMultiSend.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgMultiSend message. + * @function verify + * @memberof cosmos.bank.v1beta1.MsgMultiSend + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgMultiSend.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.inputs != null && message.hasOwnProperty("inputs")) { + if (!Array.isArray(message.inputs)) + return "inputs: array expected"; + for (var i = 0; i < message.inputs.length; ++i) { + var error = $root.cosmos.bank.v1beta1.Input.verify(message.inputs[i]); + if (error) + return "inputs." + error; + } + } + if (message.outputs != null && message.hasOwnProperty("outputs")) { + if (!Array.isArray(message.outputs)) + return "outputs: array expected"; + for (var i = 0; i < message.outputs.length; ++i) { + var error = $root.cosmos.bank.v1beta1.Output.verify(message.outputs[i]); + if (error) + return "outputs." + error; + } + } + return null; + }; + + /** + * Creates a MsgMultiSend message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.bank.v1beta1.MsgMultiSend + * @static + * @param {Object.} object Plain object + * @returns {cosmos.bank.v1beta1.MsgMultiSend} MsgMultiSend + */ + MsgMultiSend.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.bank.v1beta1.MsgMultiSend) + return object; + var message = new $root.cosmos.bank.v1beta1.MsgMultiSend(); + if (object.inputs) { + if (!Array.isArray(object.inputs)) + throw TypeError(".cosmos.bank.v1beta1.MsgMultiSend.inputs: array expected"); + message.inputs = []; + for (var i = 0; i < object.inputs.length; ++i) { + if (typeof object.inputs[i] !== "object") + throw TypeError(".cosmos.bank.v1beta1.MsgMultiSend.inputs: object expected"); + message.inputs[i] = $root.cosmos.bank.v1beta1.Input.fromObject(object.inputs[i]); + } + } + if (object.outputs) { + if (!Array.isArray(object.outputs)) + throw TypeError(".cosmos.bank.v1beta1.MsgMultiSend.outputs: array expected"); + message.outputs = []; + for (var i = 0; i < object.outputs.length; ++i) { + if (typeof object.outputs[i] !== "object") + throw TypeError(".cosmos.bank.v1beta1.MsgMultiSend.outputs: object expected"); + message.outputs[i] = $root.cosmos.bank.v1beta1.Output.fromObject(object.outputs[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a MsgMultiSend message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.bank.v1beta1.MsgMultiSend + * @static + * @param {cosmos.bank.v1beta1.MsgMultiSend} message MsgMultiSend + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgMultiSend.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.inputs = []; + object.outputs = []; + } + if (message.inputs && message.inputs.length) { + object.inputs = []; + for (var j = 0; j < message.inputs.length; ++j) + object.inputs[j] = $root.cosmos.bank.v1beta1.Input.toObject(message.inputs[j], options); + } + if (message.outputs && message.outputs.length) { + object.outputs = []; + for (var j = 0; j < message.outputs.length; ++j) + object.outputs[j] = $root.cosmos.bank.v1beta1.Output.toObject(message.outputs[j], options); + } + return object; + }; + + /** + * Converts this MsgMultiSend to JSON. + * @function toJSON + * @memberof cosmos.bank.v1beta1.MsgMultiSend + * @instance + * @returns {Object.} JSON object + */ + MsgMultiSend.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgMultiSend; + })(v1beta1.MsgMultiSend || {}); + + v1beta1.MsgMultiSendResponse = (function(MsgMultiSendResponse) { + + /** + * Properties of a MsgMultiSendResponse. + * @memberof cosmos.bank.v1beta1 + * @interface IMsgMultiSendResponse + */ + + /** + * Constructs a new MsgMultiSendResponse. + * @memberof cosmos.bank.v1beta1 + * @classdesc Represents a MsgMultiSendResponse. + * @implements IMsgMultiSendResponse + * @constructor + * @param {cosmos.bank.v1beta1.IMsgMultiSendResponse=} [properties] Properties to set + */ + function MsgMultiSendResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new MsgMultiSendResponse instance using the specified properties. + * @function create + * @memberof cosmos.bank.v1beta1.MsgMultiSendResponse + * @static + * @param {cosmos.bank.v1beta1.IMsgMultiSendResponse=} [properties] Properties to set + * @returns {cosmos.bank.v1beta1.MsgMultiSendResponse} MsgMultiSendResponse instance + */ + MsgMultiSendResponse.create = function create(properties) { + return new MsgMultiSendResponse(properties); + }; + + /** + * Encodes the specified MsgMultiSendResponse message. Does not implicitly {@link cosmos.bank.v1beta1.MsgMultiSendResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.bank.v1beta1.MsgMultiSendResponse + * @static + * @param {cosmos.bank.v1beta1.IMsgMultiSendResponse} message MsgMultiSendResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgMultiSendResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MsgMultiSendResponse message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.MsgMultiSendResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.bank.v1beta1.MsgMultiSendResponse + * @static + * @param {cosmos.bank.v1beta1.IMsgMultiSendResponse} message MsgMultiSendResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgMultiSendResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgMultiSendResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.bank.v1beta1.MsgMultiSendResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.bank.v1beta1.MsgMultiSendResponse} MsgMultiSendResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgMultiSendResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.bank.v1beta1.MsgMultiSendResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgMultiSendResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.bank.v1beta1.MsgMultiSendResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.bank.v1beta1.MsgMultiSendResponse} MsgMultiSendResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgMultiSendResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgMultiSendResponse message. + * @function verify + * @memberof cosmos.bank.v1beta1.MsgMultiSendResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgMultiSendResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MsgMultiSendResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.bank.v1beta1.MsgMultiSendResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.bank.v1beta1.MsgMultiSendResponse} MsgMultiSendResponse + */ + MsgMultiSendResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.bank.v1beta1.MsgMultiSendResponse) + return object; + return new $root.cosmos.bank.v1beta1.MsgMultiSendResponse(); + }; + + /** + * Creates a plain object from a MsgMultiSendResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.bank.v1beta1.MsgMultiSendResponse + * @static + * @param {cosmos.bank.v1beta1.MsgMultiSendResponse} message MsgMultiSendResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgMultiSendResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MsgMultiSendResponse to JSON. + * @function toJSON + * @memberof cosmos.bank.v1beta1.MsgMultiSendResponse + * @instance + * @returns {Object.} JSON object + */ + MsgMultiSendResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgMultiSendResponse; + })(v1beta1.MsgMultiSendResponse || {}); + + return v1beta1; + })(bank.v1beta1 || {}); + + return bank; + })(cosmos.bank || {}); + + /** + * Namespace gov. + * @memberof cosmos + * @namespace + */ + + cosmos.gov = (function(gov) { + + /** + * Namespace v1beta1. + * @memberof cosmos.gov + * @namespace + */ + + gov.v1beta1 = (function(v1beta1) { + + /** + * VoteOption enum. + * @name cosmos.gov.v1beta1.VoteOption + * @enum {string} + * @property {number} VOTE_OPTION_UNSPECIFIED=0 VOTE_OPTION_UNSPECIFIED value + * @property {number} VOTE_OPTION_YES=1 VOTE_OPTION_YES value + * @property {number} VOTE_OPTION_ABSTAIN=2 VOTE_OPTION_ABSTAIN value + * @property {number} VOTE_OPTION_NO=3 VOTE_OPTION_NO value + * @property {number} VOTE_OPTION_NO_WITH_VETO=4 VOTE_OPTION_NO_WITH_VETO value + */ + v1beta1.VoteOption = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "VOTE_OPTION_UNSPECIFIED"] = 0; + values[valuesById[1] = "VOTE_OPTION_YES"] = 1; + values[valuesById[2] = "VOTE_OPTION_ABSTAIN"] = 2; + values[valuesById[3] = "VOTE_OPTION_NO"] = 3; + values[valuesById[4] = "VOTE_OPTION_NO_WITH_VETO"] = 4; + return values; + })(); + + v1beta1.TextProposal = (function(TextProposal) { + + /** + * Properties of a TextProposal. + * @memberof cosmos.gov.v1beta1 + * @interface ITextProposal + * @property {string|null} [title] TextProposal title + * @property {string|null} [description] TextProposal description + */ + + /** + * Constructs a new TextProposal. + * @memberof cosmos.gov.v1beta1 + * @classdesc Represents a TextProposal. + * @implements ITextProposal + * @constructor + * @param {cosmos.gov.v1beta1.ITextProposal=} [properties] Properties to set + */ + function TextProposal(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TextProposal title. + * @member {string} title + * @memberof cosmos.gov.v1beta1.TextProposal + * @instance + */ + TextProposal.prototype.title = ""; + + /** + * TextProposal description. + * @member {string} description + * @memberof cosmos.gov.v1beta1.TextProposal + * @instance + */ + TextProposal.prototype.description = ""; + + /** + * Creates a new TextProposal instance using the specified properties. + * @function create + * @memberof cosmos.gov.v1beta1.TextProposal + * @static + * @param {cosmos.gov.v1beta1.ITextProposal=} [properties] Properties to set + * @returns {cosmos.gov.v1beta1.TextProposal} TextProposal instance + */ + TextProposal.create = function create(properties) { + return new TextProposal(properties); + }; + + /** + * Encodes the specified TextProposal message. Does not implicitly {@link cosmos.gov.v1beta1.TextProposal.verify|verify} messages. + * @function encode + * @memberof cosmos.gov.v1beta1.TextProposal + * @static + * @param {cosmos.gov.v1beta1.ITextProposal} message TextProposal message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TextProposal.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.title != null && Object.hasOwnProperty.call(message, "title")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.title); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + return writer; + }; + + /** + * Encodes the specified TextProposal message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.TextProposal.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.gov.v1beta1.TextProposal + * @static + * @param {cosmos.gov.v1beta1.ITextProposal} message TextProposal message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TextProposal.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TextProposal message from the specified reader or buffer. + * @function decode + * @memberof cosmos.gov.v1beta1.TextProposal + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.gov.v1beta1.TextProposal} TextProposal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TextProposal.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1beta1.TextProposal(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.title = reader.string(); + break; + case 2: + message.description = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TextProposal message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.gov.v1beta1.TextProposal + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.gov.v1beta1.TextProposal} TextProposal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TextProposal.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TextProposal message. + * @function verify + * @memberof cosmos.gov.v1beta1.TextProposal + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TextProposal.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.title != null && message.hasOwnProperty("title")) + if (!$util.isString(message.title)) + return "title: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + return null; + }; + + /** + * Creates a TextProposal message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.gov.v1beta1.TextProposal + * @static + * @param {Object.} object Plain object + * @returns {cosmos.gov.v1beta1.TextProposal} TextProposal + */ + TextProposal.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.gov.v1beta1.TextProposal) + return object; + var message = new $root.cosmos.gov.v1beta1.TextProposal(); + if (object.title != null) + message.title = String(object.title); + if (object.description != null) + message.description = String(object.description); + return message; + }; + + /** + * Creates a plain object from a TextProposal message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.gov.v1beta1.TextProposal + * @static + * @param {cosmos.gov.v1beta1.TextProposal} message TextProposal + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TextProposal.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.title = ""; + object.description = ""; + } + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + return object; + }; + + /** + * Converts this TextProposal to JSON. + * @function toJSON + * @memberof cosmos.gov.v1beta1.TextProposal + * @instance + * @returns {Object.} JSON object + */ + TextProposal.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TextProposal; + })(v1beta1.TextProposal || {}); + + v1beta1.Deposit = (function(Deposit) { + + /** + * Properties of a Deposit. + * @memberof cosmos.gov.v1beta1 + * @interface IDeposit + * @property {number|Long|null} [proposalId] Deposit proposalId + * @property {string|null} [depositor] Deposit depositor + * @property {Array.|null} [amount] Deposit amount + */ + + /** + * Constructs a new Deposit. + * @memberof cosmos.gov.v1beta1 + * @classdesc Represents a Deposit. + * @implements IDeposit + * @constructor + * @param {cosmos.gov.v1beta1.IDeposit=} [properties] Properties to set + */ + function Deposit(properties) { + this.amount = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Deposit proposalId. + * @member {number|Long} proposalId + * @memberof cosmos.gov.v1beta1.Deposit + * @instance + */ + Deposit.prototype.proposalId = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Deposit depositor. + * @member {string} depositor + * @memberof cosmos.gov.v1beta1.Deposit + * @instance + */ + Deposit.prototype.depositor = ""; + + /** + * Deposit amount. + * @member {Array.} amount + * @memberof cosmos.gov.v1beta1.Deposit + * @instance + */ + Deposit.prototype.amount = $util.emptyArray; + + /** + * Creates a new Deposit instance using the specified properties. + * @function create + * @memberof cosmos.gov.v1beta1.Deposit + * @static + * @param {cosmos.gov.v1beta1.IDeposit=} [properties] Properties to set + * @returns {cosmos.gov.v1beta1.Deposit} Deposit instance + */ + Deposit.create = function create(properties) { + return new Deposit(properties); + }; + + /** + * Encodes the specified Deposit message. Does not implicitly {@link cosmos.gov.v1beta1.Deposit.verify|verify} messages. + * @function encode + * @memberof cosmos.gov.v1beta1.Deposit + * @static + * @param {cosmos.gov.v1beta1.IDeposit} message Deposit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Deposit.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.proposalId != null && Object.hasOwnProperty.call(message, "proposalId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.proposalId); + if (message.depositor != null && Object.hasOwnProperty.call(message, "depositor")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.depositor); + if (message.amount != null && message.amount.length) + for (var i = 0; i < message.amount.length; ++i) + $root.cosmos.base.v1beta1.Coin.encode(message.amount[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Deposit message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.Deposit.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.gov.v1beta1.Deposit + * @static + * @param {cosmos.gov.v1beta1.IDeposit} message Deposit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Deposit.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Deposit message from the specified reader or buffer. + * @function decode + * @memberof cosmos.gov.v1beta1.Deposit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.gov.v1beta1.Deposit} Deposit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Deposit.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1beta1.Deposit(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.proposalId = reader.uint64(); + break; + case 2: + message.depositor = reader.string(); + break; + case 3: + if (!(message.amount && message.amount.length)) + message.amount = []; + message.amount.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Deposit message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.gov.v1beta1.Deposit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.gov.v1beta1.Deposit} Deposit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Deposit.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Deposit message. + * @function verify + * @memberof cosmos.gov.v1beta1.Deposit + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Deposit.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.proposalId != null && message.hasOwnProperty("proposalId")) + if (!$util.isInteger(message.proposalId) && !(message.proposalId && $util.isInteger(message.proposalId.low) && $util.isInteger(message.proposalId.high))) + return "proposalId: integer|Long expected"; + if (message.depositor != null && message.hasOwnProperty("depositor")) + if (!$util.isString(message.depositor)) + return "depositor: string expected"; + if (message.amount != null && message.hasOwnProperty("amount")) { + if (!Array.isArray(message.amount)) + return "amount: array expected"; + for (var i = 0; i < message.amount.length; ++i) { + var error = $root.cosmos.base.v1beta1.Coin.verify(message.amount[i]); + if (error) + return "amount." + error; + } + } + return null; + }; + + /** + * Creates a Deposit message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.gov.v1beta1.Deposit + * @static + * @param {Object.} object Plain object + * @returns {cosmos.gov.v1beta1.Deposit} Deposit + */ + Deposit.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.gov.v1beta1.Deposit) + return object; + var message = new $root.cosmos.gov.v1beta1.Deposit(); + if (object.proposalId != null) + if ($util.Long) + (message.proposalId = $util.Long.fromValue(object.proposalId)).unsigned = true; + else if (typeof object.proposalId === "string") + message.proposalId = parseInt(object.proposalId, 10); + else if (typeof object.proposalId === "number") + message.proposalId = object.proposalId; + else if (typeof object.proposalId === "object") + message.proposalId = new $util.LongBits(object.proposalId.low >>> 0, object.proposalId.high >>> 0).toNumber(true); + if (object.depositor != null) + message.depositor = String(object.depositor); + if (object.amount) { + if (!Array.isArray(object.amount)) + throw TypeError(".cosmos.gov.v1beta1.Deposit.amount: array expected"); + message.amount = []; + for (var i = 0; i < object.amount.length; ++i) { + if (typeof object.amount[i] !== "object") + throw TypeError(".cosmos.gov.v1beta1.Deposit.amount: object expected"); + message.amount[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.amount[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Deposit message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.gov.v1beta1.Deposit + * @static + * @param {cosmos.gov.v1beta1.Deposit} message Deposit + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Deposit.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.amount = []; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.proposalId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.proposalId = options.longs === String ? "0" : 0; + object.depositor = ""; + } + if (message.proposalId != null && message.hasOwnProperty("proposalId")) + if (typeof message.proposalId === "number") + object.proposalId = options.longs === String ? String(message.proposalId) : message.proposalId; + else + object.proposalId = options.longs === String ? $util.Long.prototype.toString.call(message.proposalId) : options.longs === Number ? new $util.LongBits(message.proposalId.low >>> 0, message.proposalId.high >>> 0).toNumber(true) : message.proposalId; + if (message.depositor != null && message.hasOwnProperty("depositor")) + object.depositor = message.depositor; + if (message.amount && message.amount.length) { + object.amount = []; + for (var j = 0; j < message.amount.length; ++j) + object.amount[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.amount[j], options); + } + return object; + }; + + /** + * Converts this Deposit to JSON. + * @function toJSON + * @memberof cosmos.gov.v1beta1.Deposit + * @instance + * @returns {Object.} JSON object + */ + Deposit.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Deposit; + })(v1beta1.Deposit || {}); + + v1beta1.Proposal = (function(Proposal) { + + /** + * Properties of a Proposal. + * @memberof cosmos.gov.v1beta1 + * @interface IProposal + * @property {number|Long|null} [proposalId] Proposal proposalId + * @property {google.protobuf.IAny|null} [content] Proposal content + * @property {cosmos.gov.v1beta1.ProposalStatus|null} [status] Proposal status + * @property {cosmos.gov.v1beta1.ITallyResult|null} [finalTallyResult] Proposal finalTallyResult + * @property {google.protobuf.ITimestamp|null} [submitTime] Proposal submitTime + * @property {google.protobuf.ITimestamp|null} [depositEndTime] Proposal depositEndTime + * @property {Array.|null} [totalDeposit] Proposal totalDeposit + * @property {google.protobuf.ITimestamp|null} [votingStartTime] Proposal votingStartTime + * @property {google.protobuf.ITimestamp|null} [votingEndTime] Proposal votingEndTime + */ + + /** + * Constructs a new Proposal. + * @memberof cosmos.gov.v1beta1 + * @classdesc Represents a Proposal. + * @implements IProposal + * @constructor + * @param {cosmos.gov.v1beta1.IProposal=} [properties] Properties to set + */ + function Proposal(properties) { + this.totalDeposit = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Proposal proposalId. + * @member {number|Long} proposalId + * @memberof cosmos.gov.v1beta1.Proposal + * @instance + */ + Proposal.prototype.proposalId = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Proposal content. + * @member {google.protobuf.IAny|null|undefined} content + * @memberof cosmos.gov.v1beta1.Proposal + * @instance + */ + Proposal.prototype.content = null; + + /** + * Proposal status. + * @member {cosmos.gov.v1beta1.ProposalStatus} status + * @memberof cosmos.gov.v1beta1.Proposal + * @instance + */ + Proposal.prototype.status = 0; + + /** + * Proposal finalTallyResult. + * @member {cosmos.gov.v1beta1.ITallyResult|null|undefined} finalTallyResult + * @memberof cosmos.gov.v1beta1.Proposal + * @instance + */ + Proposal.prototype.finalTallyResult = null; + + /** + * Proposal submitTime. + * @member {google.protobuf.ITimestamp|null|undefined} submitTime + * @memberof cosmos.gov.v1beta1.Proposal + * @instance + */ + Proposal.prototype.submitTime = null; + + /** + * Proposal depositEndTime. + * @member {google.protobuf.ITimestamp|null|undefined} depositEndTime + * @memberof cosmos.gov.v1beta1.Proposal + * @instance + */ + Proposal.prototype.depositEndTime = null; + + /** + * Proposal totalDeposit. + * @member {Array.} totalDeposit + * @memberof cosmos.gov.v1beta1.Proposal + * @instance + */ + Proposal.prototype.totalDeposit = $util.emptyArray; + + /** + * Proposal votingStartTime. + * @member {google.protobuf.ITimestamp|null|undefined} votingStartTime + * @memberof cosmos.gov.v1beta1.Proposal + * @instance + */ + Proposal.prototype.votingStartTime = null; + + /** + * Proposal votingEndTime. + * @member {google.protobuf.ITimestamp|null|undefined} votingEndTime + * @memberof cosmos.gov.v1beta1.Proposal + * @instance + */ + Proposal.prototype.votingEndTime = null; + + /** + * Creates a new Proposal instance using the specified properties. + * @function create + * @memberof cosmos.gov.v1beta1.Proposal + * @static + * @param {cosmos.gov.v1beta1.IProposal=} [properties] Properties to set + * @returns {cosmos.gov.v1beta1.Proposal} Proposal instance + */ + Proposal.create = function create(properties) { + return new Proposal(properties); + }; + + /** + * Encodes the specified Proposal message. Does not implicitly {@link cosmos.gov.v1beta1.Proposal.verify|verify} messages. + * @function encode + * @memberof cosmos.gov.v1beta1.Proposal + * @static + * @param {cosmos.gov.v1beta1.IProposal} message Proposal message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Proposal.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.proposalId != null && Object.hasOwnProperty.call(message, "proposalId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.proposalId); + if (message.content != null && Object.hasOwnProperty.call(message, "content")) + $root.google.protobuf.Any.encode(message.content, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.status); + if (message.finalTallyResult != null && Object.hasOwnProperty.call(message, "finalTallyResult")) + $root.cosmos.gov.v1beta1.TallyResult.encode(message.finalTallyResult, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.submitTime != null && Object.hasOwnProperty.call(message, "submitTime")) + $root.google.protobuf.Timestamp.encode(message.submitTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.depositEndTime != null && Object.hasOwnProperty.call(message, "depositEndTime")) + $root.google.protobuf.Timestamp.encode(message.depositEndTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.totalDeposit != null && message.totalDeposit.length) + for (var i = 0; i < message.totalDeposit.length; ++i) + $root.cosmos.base.v1beta1.Coin.encode(message.totalDeposit[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.votingStartTime != null && Object.hasOwnProperty.call(message, "votingStartTime")) + $root.google.protobuf.Timestamp.encode(message.votingStartTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.votingEndTime != null && Object.hasOwnProperty.call(message, "votingEndTime")) + $root.google.protobuf.Timestamp.encode(message.votingEndTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Proposal message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.Proposal.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.gov.v1beta1.Proposal + * @static + * @param {cosmos.gov.v1beta1.IProposal} message Proposal message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Proposal.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Proposal message from the specified reader or buffer. + * @function decode + * @memberof cosmos.gov.v1beta1.Proposal + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.gov.v1beta1.Proposal} Proposal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Proposal.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1beta1.Proposal(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.proposalId = reader.uint64(); + break; + case 2: + message.content = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + case 3: + message.status = reader.int32(); + break; + case 4: + message.finalTallyResult = $root.cosmos.gov.v1beta1.TallyResult.decode(reader, reader.uint32()); + break; + case 5: + message.submitTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 6: + message.depositEndTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 7: + if (!(message.totalDeposit && message.totalDeposit.length)) + message.totalDeposit = []; + message.totalDeposit.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); + break; + case 8: + message.votingStartTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 9: + message.votingEndTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Proposal message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.gov.v1beta1.Proposal + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.gov.v1beta1.Proposal} Proposal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Proposal.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Proposal message. + * @function verify + * @memberof cosmos.gov.v1beta1.Proposal + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Proposal.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.proposalId != null && message.hasOwnProperty("proposalId")) + if (!$util.isInteger(message.proposalId) && !(message.proposalId && $util.isInteger(message.proposalId.low) && $util.isInteger(message.proposalId.high))) + return "proposalId: integer|Long expected"; + if (message.content != null && message.hasOwnProperty("content")) { + var error = $root.google.protobuf.Any.verify(message.content); + if (error) + return "content." + error; + } + if (message.status != null && message.hasOwnProperty("status")) + switch (message.status) { + default: + return "status: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.finalTallyResult != null && message.hasOwnProperty("finalTallyResult")) { + var error = $root.cosmos.gov.v1beta1.TallyResult.verify(message.finalTallyResult); + if (error) + return "finalTallyResult." + error; + } + if (message.submitTime != null && message.hasOwnProperty("submitTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.submitTime); + if (error) + return "submitTime." + error; + } + if (message.depositEndTime != null && message.hasOwnProperty("depositEndTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.depositEndTime); + if (error) + return "depositEndTime." + error; + } + if (message.totalDeposit != null && message.hasOwnProperty("totalDeposit")) { + if (!Array.isArray(message.totalDeposit)) + return "totalDeposit: array expected"; + for (var i = 0; i < message.totalDeposit.length; ++i) { + var error = $root.cosmos.base.v1beta1.Coin.verify(message.totalDeposit[i]); + if (error) + return "totalDeposit." + error; + } + } + if (message.votingStartTime != null && message.hasOwnProperty("votingStartTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.votingStartTime); + if (error) + return "votingStartTime." + error; + } + if (message.votingEndTime != null && message.hasOwnProperty("votingEndTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.votingEndTime); + if (error) + return "votingEndTime." + error; + } + return null; + }; + + /** + * Creates a Proposal message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.gov.v1beta1.Proposal + * @static + * @param {Object.} object Plain object + * @returns {cosmos.gov.v1beta1.Proposal} Proposal + */ + Proposal.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.gov.v1beta1.Proposal) + return object; + var message = new $root.cosmos.gov.v1beta1.Proposal(); + if (object.proposalId != null) + if ($util.Long) + (message.proposalId = $util.Long.fromValue(object.proposalId)).unsigned = true; + else if (typeof object.proposalId === "string") + message.proposalId = parseInt(object.proposalId, 10); + else if (typeof object.proposalId === "number") + message.proposalId = object.proposalId; + else if (typeof object.proposalId === "object") + message.proposalId = new $util.LongBits(object.proposalId.low >>> 0, object.proposalId.high >>> 0).toNumber(true); + if (object.content != null) { + if (typeof object.content !== "object") + throw TypeError(".cosmos.gov.v1beta1.Proposal.content: object expected"); + message.content = $root.google.protobuf.Any.fromObject(object.content); + } + switch (object.status) { + case "PROPOSAL_STATUS_UNSPECIFIED": + case 0: + message.status = 0; + break; + case "PROPOSAL_STATUS_DEPOSIT_PERIOD": + case 1: + message.status = 1; + break; + case "PROPOSAL_STATUS_VOTING_PERIOD": + case 2: + message.status = 2; + break; + case "PROPOSAL_STATUS_PASSED": + case 3: + message.status = 3; + break; + case "PROPOSAL_STATUS_REJECTED": + case 4: + message.status = 4; + break; + case "PROPOSAL_STATUS_FAILED": + case 5: + message.status = 5; + break; + } + if (object.finalTallyResult != null) { + if (typeof object.finalTallyResult !== "object") + throw TypeError(".cosmos.gov.v1beta1.Proposal.finalTallyResult: object expected"); + message.finalTallyResult = $root.cosmos.gov.v1beta1.TallyResult.fromObject(object.finalTallyResult); + } + if (object.submitTime != null) { + if (typeof object.submitTime !== "object") + throw TypeError(".cosmos.gov.v1beta1.Proposal.submitTime: object expected"); + message.submitTime = $root.google.protobuf.Timestamp.fromObject(object.submitTime); + } + if (object.depositEndTime != null) { + if (typeof object.depositEndTime !== "object") + throw TypeError(".cosmos.gov.v1beta1.Proposal.depositEndTime: object expected"); + message.depositEndTime = $root.google.protobuf.Timestamp.fromObject(object.depositEndTime); + } + if (object.totalDeposit) { + if (!Array.isArray(object.totalDeposit)) + throw TypeError(".cosmos.gov.v1beta1.Proposal.totalDeposit: array expected"); + message.totalDeposit = []; + for (var i = 0; i < object.totalDeposit.length; ++i) { + if (typeof object.totalDeposit[i] !== "object") + throw TypeError(".cosmos.gov.v1beta1.Proposal.totalDeposit: object expected"); + message.totalDeposit[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.totalDeposit[i]); + } + } + if (object.votingStartTime != null) { + if (typeof object.votingStartTime !== "object") + throw TypeError(".cosmos.gov.v1beta1.Proposal.votingStartTime: object expected"); + message.votingStartTime = $root.google.protobuf.Timestamp.fromObject(object.votingStartTime); + } + if (object.votingEndTime != null) { + if (typeof object.votingEndTime !== "object") + throw TypeError(".cosmos.gov.v1beta1.Proposal.votingEndTime: object expected"); + message.votingEndTime = $root.google.protobuf.Timestamp.fromObject(object.votingEndTime); + } + return message; + }; + + /** + * Creates a plain object from a Proposal message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.gov.v1beta1.Proposal + * @static + * @param {cosmos.gov.v1beta1.Proposal} message Proposal + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Proposal.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.totalDeposit = []; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.proposalId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.proposalId = options.longs === String ? "0" : 0; + object.content = null; + object.status = options.enums === String ? "PROPOSAL_STATUS_UNSPECIFIED" : 0; + object.finalTallyResult = null; + object.submitTime = null; + object.depositEndTime = null; + object.votingStartTime = null; + object.votingEndTime = null; + } + if (message.proposalId != null && message.hasOwnProperty("proposalId")) + if (typeof message.proposalId === "number") + object.proposalId = options.longs === String ? String(message.proposalId) : message.proposalId; + else + object.proposalId = options.longs === String ? $util.Long.prototype.toString.call(message.proposalId) : options.longs === Number ? new $util.LongBits(message.proposalId.low >>> 0, message.proposalId.high >>> 0).toNumber(true) : message.proposalId; + if (message.content != null && message.hasOwnProperty("content")) + object.content = $root.google.protobuf.Any.toObject(message.content, options); + if (message.status != null && message.hasOwnProperty("status")) + object.status = options.enums === String ? $root.cosmos.gov.v1beta1.ProposalStatus[message.status] : message.status; + if (message.finalTallyResult != null && message.hasOwnProperty("finalTallyResult")) + object.finalTallyResult = $root.cosmos.gov.v1beta1.TallyResult.toObject(message.finalTallyResult, options); + if (message.submitTime != null && message.hasOwnProperty("submitTime")) + object.submitTime = $root.google.protobuf.Timestamp.toObject(message.submitTime, options); + if (message.depositEndTime != null && message.hasOwnProperty("depositEndTime")) + object.depositEndTime = $root.google.protobuf.Timestamp.toObject(message.depositEndTime, options); + if (message.totalDeposit && message.totalDeposit.length) { + object.totalDeposit = []; + for (var j = 0; j < message.totalDeposit.length; ++j) + object.totalDeposit[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.totalDeposit[j], options); + } + if (message.votingStartTime != null && message.hasOwnProperty("votingStartTime")) + object.votingStartTime = $root.google.protobuf.Timestamp.toObject(message.votingStartTime, options); + if (message.votingEndTime != null && message.hasOwnProperty("votingEndTime")) + object.votingEndTime = $root.google.protobuf.Timestamp.toObject(message.votingEndTime, options); + return object; + }; + + /** + * Converts this Proposal to JSON. + * @function toJSON + * @memberof cosmos.gov.v1beta1.Proposal + * @instance + * @returns {Object.} JSON object + */ + Proposal.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Proposal; + })(v1beta1.Proposal || {}); + + /** + * ProposalStatus enum. + * @name cosmos.gov.v1beta1.ProposalStatus + * @enum {string} + * @property {number} PROPOSAL_STATUS_UNSPECIFIED=0 PROPOSAL_STATUS_UNSPECIFIED value + * @property {number} PROPOSAL_STATUS_DEPOSIT_PERIOD=1 PROPOSAL_STATUS_DEPOSIT_PERIOD value + * @property {number} PROPOSAL_STATUS_VOTING_PERIOD=2 PROPOSAL_STATUS_VOTING_PERIOD value + * @property {number} PROPOSAL_STATUS_PASSED=3 PROPOSAL_STATUS_PASSED value + * @property {number} PROPOSAL_STATUS_REJECTED=4 PROPOSAL_STATUS_REJECTED value + * @property {number} PROPOSAL_STATUS_FAILED=5 PROPOSAL_STATUS_FAILED value + */ + v1beta1.ProposalStatus = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PROPOSAL_STATUS_UNSPECIFIED"] = 0; + values[valuesById[1] = "PROPOSAL_STATUS_DEPOSIT_PERIOD"] = 1; + values[valuesById[2] = "PROPOSAL_STATUS_VOTING_PERIOD"] = 2; + values[valuesById[3] = "PROPOSAL_STATUS_PASSED"] = 3; + values[valuesById[4] = "PROPOSAL_STATUS_REJECTED"] = 4; + values[valuesById[5] = "PROPOSAL_STATUS_FAILED"] = 5; + return values; + })(); + + v1beta1.TallyResult = (function(TallyResult) { + + /** + * Properties of a TallyResult. + * @memberof cosmos.gov.v1beta1 + * @interface ITallyResult + * @property {string|null} [yes] TallyResult yes + * @property {string|null} [abstain] TallyResult abstain + * @property {string|null} [no] TallyResult no + * @property {string|null} [noWithVeto] TallyResult noWithVeto + */ + + /** + * Constructs a new TallyResult. + * @memberof cosmos.gov.v1beta1 + * @classdesc Represents a TallyResult. + * @implements ITallyResult + * @constructor + * @param {cosmos.gov.v1beta1.ITallyResult=} [properties] Properties to set + */ + function TallyResult(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TallyResult yes. + * @member {string} yes + * @memberof cosmos.gov.v1beta1.TallyResult + * @instance + */ + TallyResult.prototype.yes = ""; + + /** + * TallyResult abstain. + * @member {string} abstain + * @memberof cosmos.gov.v1beta1.TallyResult + * @instance + */ + TallyResult.prototype.abstain = ""; + + /** + * TallyResult no. + * @member {string} no + * @memberof cosmos.gov.v1beta1.TallyResult + * @instance + */ + TallyResult.prototype.no = ""; + + /** + * TallyResult noWithVeto. + * @member {string} noWithVeto + * @memberof cosmos.gov.v1beta1.TallyResult + * @instance + */ + TallyResult.prototype.noWithVeto = ""; + + /** + * Creates a new TallyResult instance using the specified properties. + * @function create + * @memberof cosmos.gov.v1beta1.TallyResult + * @static + * @param {cosmos.gov.v1beta1.ITallyResult=} [properties] Properties to set + * @returns {cosmos.gov.v1beta1.TallyResult} TallyResult instance + */ + TallyResult.create = function create(properties) { + return new TallyResult(properties); + }; + + /** + * Encodes the specified TallyResult message. Does not implicitly {@link cosmos.gov.v1beta1.TallyResult.verify|verify} messages. + * @function encode + * @memberof cosmos.gov.v1beta1.TallyResult + * @static + * @param {cosmos.gov.v1beta1.ITallyResult} message TallyResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TallyResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.yes != null && Object.hasOwnProperty.call(message, "yes")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.yes); + if (message.abstain != null && Object.hasOwnProperty.call(message, "abstain")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.abstain); + if (message.no != null && Object.hasOwnProperty.call(message, "no")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.no); + if (message.noWithVeto != null && Object.hasOwnProperty.call(message, "noWithVeto")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.noWithVeto); + return writer; + }; + + /** + * Encodes the specified TallyResult message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.TallyResult.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.gov.v1beta1.TallyResult + * @static + * @param {cosmos.gov.v1beta1.ITallyResult} message TallyResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TallyResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TallyResult message from the specified reader or buffer. + * @function decode + * @memberof cosmos.gov.v1beta1.TallyResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.gov.v1beta1.TallyResult} TallyResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TallyResult.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1beta1.TallyResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.yes = reader.string(); + break; + case 2: + message.abstain = reader.string(); + break; + case 3: + message.no = reader.string(); + break; + case 4: + message.noWithVeto = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TallyResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.gov.v1beta1.TallyResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.gov.v1beta1.TallyResult} TallyResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TallyResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TallyResult message. + * @function verify + * @memberof cosmos.gov.v1beta1.TallyResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TallyResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.yes != null && message.hasOwnProperty("yes")) + if (!$util.isString(message.yes)) + return "yes: string expected"; + if (message.abstain != null && message.hasOwnProperty("abstain")) + if (!$util.isString(message.abstain)) + return "abstain: string expected"; + if (message.no != null && message.hasOwnProperty("no")) + if (!$util.isString(message.no)) + return "no: string expected"; + if (message.noWithVeto != null && message.hasOwnProperty("noWithVeto")) + if (!$util.isString(message.noWithVeto)) + return "noWithVeto: string expected"; + return null; + }; + + /** + * Creates a TallyResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.gov.v1beta1.TallyResult + * @static + * @param {Object.} object Plain object + * @returns {cosmos.gov.v1beta1.TallyResult} TallyResult + */ + TallyResult.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.gov.v1beta1.TallyResult) + return object; + var message = new $root.cosmos.gov.v1beta1.TallyResult(); + if (object.yes != null) + message.yes = String(object.yes); + if (object.abstain != null) + message.abstain = String(object.abstain); + if (object.no != null) + message.no = String(object.no); + if (object.noWithVeto != null) + message.noWithVeto = String(object.noWithVeto); + return message; + }; + + /** + * Creates a plain object from a TallyResult message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.gov.v1beta1.TallyResult + * @static + * @param {cosmos.gov.v1beta1.TallyResult} message TallyResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TallyResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.yes = ""; + object.abstain = ""; + object.no = ""; + object.noWithVeto = ""; + } + if (message.yes != null && message.hasOwnProperty("yes")) + object.yes = message.yes; + if (message.abstain != null && message.hasOwnProperty("abstain")) + object.abstain = message.abstain; + if (message.no != null && message.hasOwnProperty("no")) + object.no = message.no; + if (message.noWithVeto != null && message.hasOwnProperty("noWithVeto")) + object.noWithVeto = message.noWithVeto; + return object; + }; + + /** + * Converts this TallyResult to JSON. + * @function toJSON + * @memberof cosmos.gov.v1beta1.TallyResult + * @instance + * @returns {Object.} JSON object + */ + TallyResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TallyResult; + })(v1beta1.TallyResult || {}); + + v1beta1.Vote = (function(Vote) { + + /** + * Properties of a Vote. + * @memberof cosmos.gov.v1beta1 + * @interface IVote + * @property {number|Long|null} [proposalId] Vote proposalId + * @property {string|null} [voter] Vote voter + * @property {cosmos.gov.v1beta1.VoteOption|null} [option] Vote option + */ + + /** + * Constructs a new Vote. + * @memberof cosmos.gov.v1beta1 + * @classdesc Represents a Vote. + * @implements IVote + * @constructor + * @param {cosmos.gov.v1beta1.IVote=} [properties] Properties to set + */ + function Vote(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Vote proposalId. + * @member {number|Long} proposalId + * @memberof cosmos.gov.v1beta1.Vote + * @instance + */ + Vote.prototype.proposalId = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Vote voter. + * @member {string} voter + * @memberof cosmos.gov.v1beta1.Vote + * @instance + */ + Vote.prototype.voter = ""; + + /** + * Vote option. + * @member {cosmos.gov.v1beta1.VoteOption} option + * @memberof cosmos.gov.v1beta1.Vote + * @instance + */ + Vote.prototype.option = 0; + + /** + * Creates a new Vote instance using the specified properties. + * @function create + * @memberof cosmos.gov.v1beta1.Vote + * @static + * @param {cosmos.gov.v1beta1.IVote=} [properties] Properties to set + * @returns {cosmos.gov.v1beta1.Vote} Vote instance + */ + Vote.create = function create(properties) { + return new Vote(properties); + }; + + /** + * Encodes the specified Vote message. Does not implicitly {@link cosmos.gov.v1beta1.Vote.verify|verify} messages. + * @function encode + * @memberof cosmos.gov.v1beta1.Vote + * @static + * @param {cosmos.gov.v1beta1.IVote} message Vote message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Vote.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.proposalId != null && Object.hasOwnProperty.call(message, "proposalId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.proposalId); + if (message.voter != null && Object.hasOwnProperty.call(message, "voter")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.voter); + if (message.option != null && Object.hasOwnProperty.call(message, "option")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.option); + return writer; + }; + + /** + * Encodes the specified Vote message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.Vote.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.gov.v1beta1.Vote + * @static + * @param {cosmos.gov.v1beta1.IVote} message Vote message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Vote.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Vote message from the specified reader or buffer. + * @function decode + * @memberof cosmos.gov.v1beta1.Vote + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.gov.v1beta1.Vote} Vote + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Vote.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1beta1.Vote(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.proposalId = reader.uint64(); + break; + case 2: + message.voter = reader.string(); + break; + case 3: + message.option = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Vote message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.gov.v1beta1.Vote + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.gov.v1beta1.Vote} Vote + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Vote.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Vote message. + * @function verify + * @memberof cosmos.gov.v1beta1.Vote + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Vote.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.proposalId != null && message.hasOwnProperty("proposalId")) + if (!$util.isInteger(message.proposalId) && !(message.proposalId && $util.isInteger(message.proposalId.low) && $util.isInteger(message.proposalId.high))) + return "proposalId: integer|Long expected"; + if (message.voter != null && message.hasOwnProperty("voter")) + if (!$util.isString(message.voter)) + return "voter: string expected"; + if (message.option != null && message.hasOwnProperty("option")) + switch (message.option) { + default: + return "option: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + return null; + }; + + /** + * Creates a Vote message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.gov.v1beta1.Vote + * @static + * @param {Object.} object Plain object + * @returns {cosmos.gov.v1beta1.Vote} Vote + */ + Vote.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.gov.v1beta1.Vote) + return object; + var message = new $root.cosmos.gov.v1beta1.Vote(); + if (object.proposalId != null) + if ($util.Long) + (message.proposalId = $util.Long.fromValue(object.proposalId)).unsigned = true; + else if (typeof object.proposalId === "string") + message.proposalId = parseInt(object.proposalId, 10); + else if (typeof object.proposalId === "number") + message.proposalId = object.proposalId; + else if (typeof object.proposalId === "object") + message.proposalId = new $util.LongBits(object.proposalId.low >>> 0, object.proposalId.high >>> 0).toNumber(true); + if (object.voter != null) + message.voter = String(object.voter); + switch (object.option) { + case "VOTE_OPTION_UNSPECIFIED": + case 0: + message.option = 0; + break; + case "VOTE_OPTION_YES": + case 1: + message.option = 1; + break; + case "VOTE_OPTION_ABSTAIN": + case 2: + message.option = 2; + break; + case "VOTE_OPTION_NO": + case 3: + message.option = 3; + break; + case "VOTE_OPTION_NO_WITH_VETO": + case 4: + message.option = 4; + break; + } + return message; + }; + + /** + * Creates a plain object from a Vote message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.gov.v1beta1.Vote + * @static + * @param {cosmos.gov.v1beta1.Vote} message Vote + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Vote.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.proposalId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.proposalId = options.longs === String ? "0" : 0; + object.voter = ""; + object.option = options.enums === String ? "VOTE_OPTION_UNSPECIFIED" : 0; + } + if (message.proposalId != null && message.hasOwnProperty("proposalId")) + if (typeof message.proposalId === "number") + object.proposalId = options.longs === String ? String(message.proposalId) : message.proposalId; + else + object.proposalId = options.longs === String ? $util.Long.prototype.toString.call(message.proposalId) : options.longs === Number ? new $util.LongBits(message.proposalId.low >>> 0, message.proposalId.high >>> 0).toNumber(true) : message.proposalId; + if (message.voter != null && message.hasOwnProperty("voter")) + object.voter = message.voter; + if (message.option != null && message.hasOwnProperty("option")) + object.option = options.enums === String ? $root.cosmos.gov.v1beta1.VoteOption[message.option] : message.option; + return object; + }; + + /** + * Converts this Vote to JSON. + * @function toJSON + * @memberof cosmos.gov.v1beta1.Vote + * @instance + * @returns {Object.} JSON object + */ + Vote.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Vote; + })(v1beta1.Vote || {}); + + v1beta1.DepositParams = (function(DepositParams) { + + /** + * Properties of a DepositParams. + * @memberof cosmos.gov.v1beta1 + * @interface IDepositParams + * @property {Array.|null} [minDeposit] DepositParams minDeposit + * @property {google.protobuf.IDuration|null} [maxDepositPeriod] DepositParams maxDepositPeriod + */ + + /** + * Constructs a new DepositParams. + * @memberof cosmos.gov.v1beta1 + * @classdesc Represents a DepositParams. + * @implements IDepositParams + * @constructor + * @param {cosmos.gov.v1beta1.IDepositParams=} [properties] Properties to set + */ + function DepositParams(properties) { + this.minDeposit = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DepositParams minDeposit. + * @member {Array.} minDeposit + * @memberof cosmos.gov.v1beta1.DepositParams + * @instance + */ + DepositParams.prototype.minDeposit = $util.emptyArray; + + /** + * DepositParams maxDepositPeriod. + * @member {google.protobuf.IDuration|null|undefined} maxDepositPeriod + * @memberof cosmos.gov.v1beta1.DepositParams + * @instance + */ + DepositParams.prototype.maxDepositPeriod = null; + + /** + * Creates a new DepositParams instance using the specified properties. + * @function create + * @memberof cosmos.gov.v1beta1.DepositParams + * @static + * @param {cosmos.gov.v1beta1.IDepositParams=} [properties] Properties to set + * @returns {cosmos.gov.v1beta1.DepositParams} DepositParams instance + */ + DepositParams.create = function create(properties) { + return new DepositParams(properties); + }; + + /** + * Encodes the specified DepositParams message. Does not implicitly {@link cosmos.gov.v1beta1.DepositParams.verify|verify} messages. + * @function encode + * @memberof cosmos.gov.v1beta1.DepositParams + * @static + * @param {cosmos.gov.v1beta1.IDepositParams} message DepositParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DepositParams.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.minDeposit != null && message.minDeposit.length) + for (var i = 0; i < message.minDeposit.length; ++i) + $root.cosmos.base.v1beta1.Coin.encode(message.minDeposit[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.maxDepositPeriod != null && Object.hasOwnProperty.call(message, "maxDepositPeriod")) + $root.google.protobuf.Duration.encode(message.maxDepositPeriod, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DepositParams message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.DepositParams.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.gov.v1beta1.DepositParams + * @static + * @param {cosmos.gov.v1beta1.IDepositParams} message DepositParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DepositParams.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DepositParams message from the specified reader or buffer. + * @function decode + * @memberof cosmos.gov.v1beta1.DepositParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.gov.v1beta1.DepositParams} DepositParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DepositParams.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1beta1.DepositParams(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.minDeposit && message.minDeposit.length)) + message.minDeposit = []; + message.minDeposit.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); + break; + case 2: + message.maxDepositPeriod = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DepositParams message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.gov.v1beta1.DepositParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.gov.v1beta1.DepositParams} DepositParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DepositParams.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DepositParams message. + * @function verify + * @memberof cosmos.gov.v1beta1.DepositParams + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DepositParams.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.minDeposit != null && message.hasOwnProperty("minDeposit")) { + if (!Array.isArray(message.minDeposit)) + return "minDeposit: array expected"; + for (var i = 0; i < message.minDeposit.length; ++i) { + var error = $root.cosmos.base.v1beta1.Coin.verify(message.minDeposit[i]); + if (error) + return "minDeposit." + error; + } + } + if (message.maxDepositPeriod != null && message.hasOwnProperty("maxDepositPeriod")) { + var error = $root.google.protobuf.Duration.verify(message.maxDepositPeriod); + if (error) + return "maxDepositPeriod." + error; + } + return null; + }; + + /** + * Creates a DepositParams message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.gov.v1beta1.DepositParams + * @static + * @param {Object.} object Plain object + * @returns {cosmos.gov.v1beta1.DepositParams} DepositParams + */ + DepositParams.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.gov.v1beta1.DepositParams) + return object; + var message = new $root.cosmos.gov.v1beta1.DepositParams(); + if (object.minDeposit) { + if (!Array.isArray(object.minDeposit)) + throw TypeError(".cosmos.gov.v1beta1.DepositParams.minDeposit: array expected"); + message.minDeposit = []; + for (var i = 0; i < object.minDeposit.length; ++i) { + if (typeof object.minDeposit[i] !== "object") + throw TypeError(".cosmos.gov.v1beta1.DepositParams.minDeposit: object expected"); + message.minDeposit[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.minDeposit[i]); + } + } + if (object.maxDepositPeriod != null) { + if (typeof object.maxDepositPeriod !== "object") + throw TypeError(".cosmos.gov.v1beta1.DepositParams.maxDepositPeriod: object expected"); + message.maxDepositPeriod = $root.google.protobuf.Duration.fromObject(object.maxDepositPeriod); + } + return message; + }; + + /** + * Creates a plain object from a DepositParams message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.gov.v1beta1.DepositParams + * @static + * @param {cosmos.gov.v1beta1.DepositParams} message DepositParams + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DepositParams.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.minDeposit = []; + if (options.defaults) + object.maxDepositPeriod = null; + if (message.minDeposit && message.minDeposit.length) { + object.minDeposit = []; + for (var j = 0; j < message.minDeposit.length; ++j) + object.minDeposit[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.minDeposit[j], options); + } + if (message.maxDepositPeriod != null && message.hasOwnProperty("maxDepositPeriod")) + object.maxDepositPeriod = $root.google.protobuf.Duration.toObject(message.maxDepositPeriod, options); + return object; + }; + + /** + * Converts this DepositParams to JSON. + * @function toJSON + * @memberof cosmos.gov.v1beta1.DepositParams + * @instance + * @returns {Object.} JSON object + */ + DepositParams.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DepositParams; + })(v1beta1.DepositParams || {}); + + v1beta1.VotingParams = (function(VotingParams) { + + /** + * Properties of a VotingParams. + * @memberof cosmos.gov.v1beta1 + * @interface IVotingParams + * @property {google.protobuf.IDuration|null} [votingPeriod] VotingParams votingPeriod + */ + + /** + * Constructs a new VotingParams. + * @memberof cosmos.gov.v1beta1 + * @classdesc Represents a VotingParams. + * @implements IVotingParams + * @constructor + * @param {cosmos.gov.v1beta1.IVotingParams=} [properties] Properties to set + */ + function VotingParams(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * VotingParams votingPeriod. + * @member {google.protobuf.IDuration|null|undefined} votingPeriod + * @memberof cosmos.gov.v1beta1.VotingParams + * @instance + */ + VotingParams.prototype.votingPeriod = null; + + /** + * Creates a new VotingParams instance using the specified properties. + * @function create + * @memberof cosmos.gov.v1beta1.VotingParams + * @static + * @param {cosmos.gov.v1beta1.IVotingParams=} [properties] Properties to set + * @returns {cosmos.gov.v1beta1.VotingParams} VotingParams instance + */ + VotingParams.create = function create(properties) { + return new VotingParams(properties); + }; + + /** + * Encodes the specified VotingParams message. Does not implicitly {@link cosmos.gov.v1beta1.VotingParams.verify|verify} messages. + * @function encode + * @memberof cosmos.gov.v1beta1.VotingParams + * @static + * @param {cosmos.gov.v1beta1.IVotingParams} message VotingParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VotingParams.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.votingPeriod != null && Object.hasOwnProperty.call(message, "votingPeriod")) + $root.google.protobuf.Duration.encode(message.votingPeriod, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified VotingParams message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.VotingParams.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.gov.v1beta1.VotingParams + * @static + * @param {cosmos.gov.v1beta1.IVotingParams} message VotingParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VotingParams.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VotingParams message from the specified reader or buffer. + * @function decode + * @memberof cosmos.gov.v1beta1.VotingParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.gov.v1beta1.VotingParams} VotingParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VotingParams.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1beta1.VotingParams(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.votingPeriod = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VotingParams message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.gov.v1beta1.VotingParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.gov.v1beta1.VotingParams} VotingParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VotingParams.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VotingParams message. + * @function verify + * @memberof cosmos.gov.v1beta1.VotingParams + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VotingParams.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.votingPeriod != null && message.hasOwnProperty("votingPeriod")) { + var error = $root.google.protobuf.Duration.verify(message.votingPeriod); + if (error) + return "votingPeriod." + error; + } + return null; + }; + + /** + * Creates a VotingParams message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.gov.v1beta1.VotingParams + * @static + * @param {Object.} object Plain object + * @returns {cosmos.gov.v1beta1.VotingParams} VotingParams + */ + VotingParams.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.gov.v1beta1.VotingParams) + return object; + var message = new $root.cosmos.gov.v1beta1.VotingParams(); + if (object.votingPeriod != null) { + if (typeof object.votingPeriod !== "object") + throw TypeError(".cosmos.gov.v1beta1.VotingParams.votingPeriod: object expected"); + message.votingPeriod = $root.google.protobuf.Duration.fromObject(object.votingPeriod); + } + return message; + }; + + /** + * Creates a plain object from a VotingParams message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.gov.v1beta1.VotingParams + * @static + * @param {cosmos.gov.v1beta1.VotingParams} message VotingParams + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VotingParams.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.votingPeriod = null; + if (message.votingPeriod != null && message.hasOwnProperty("votingPeriod")) + object.votingPeriod = $root.google.protobuf.Duration.toObject(message.votingPeriod, options); + return object; + }; + + /** + * Converts this VotingParams to JSON. + * @function toJSON + * @memberof cosmos.gov.v1beta1.VotingParams + * @instance + * @returns {Object.} JSON object + */ + VotingParams.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return VotingParams; + })(v1beta1.VotingParams || {}); + + v1beta1.TallyParams = (function(TallyParams) { + + /** + * Properties of a TallyParams. + * @memberof cosmos.gov.v1beta1 + * @interface ITallyParams + * @property {Uint8Array|null} [quorum] TallyParams quorum + * @property {Uint8Array|null} [threshold] TallyParams threshold + * @property {Uint8Array|null} [vetoThreshold] TallyParams vetoThreshold + */ + + /** + * Constructs a new TallyParams. + * @memberof cosmos.gov.v1beta1 + * @classdesc Represents a TallyParams. + * @implements ITallyParams + * @constructor + * @param {cosmos.gov.v1beta1.ITallyParams=} [properties] Properties to set + */ + function TallyParams(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TallyParams quorum. + * @member {Uint8Array} quorum + * @memberof cosmos.gov.v1beta1.TallyParams + * @instance + */ + TallyParams.prototype.quorum = $util.newBuffer([]); + + /** + * TallyParams threshold. + * @member {Uint8Array} threshold + * @memberof cosmos.gov.v1beta1.TallyParams + * @instance + */ + TallyParams.prototype.threshold = $util.newBuffer([]); + + /** + * TallyParams vetoThreshold. + * @member {Uint8Array} vetoThreshold + * @memberof cosmos.gov.v1beta1.TallyParams + * @instance + */ + TallyParams.prototype.vetoThreshold = $util.newBuffer([]); + + /** + * Creates a new TallyParams instance using the specified properties. + * @function create + * @memberof cosmos.gov.v1beta1.TallyParams + * @static + * @param {cosmos.gov.v1beta1.ITallyParams=} [properties] Properties to set + * @returns {cosmos.gov.v1beta1.TallyParams} TallyParams instance + */ + TallyParams.create = function create(properties) { + return new TallyParams(properties); + }; + + /** + * Encodes the specified TallyParams message. Does not implicitly {@link cosmos.gov.v1beta1.TallyParams.verify|verify} messages. + * @function encode + * @memberof cosmos.gov.v1beta1.TallyParams + * @static + * @param {cosmos.gov.v1beta1.ITallyParams} message TallyParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TallyParams.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.quorum != null && Object.hasOwnProperty.call(message, "quorum")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.quorum); + if (message.threshold != null && Object.hasOwnProperty.call(message, "threshold")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.threshold); + if (message.vetoThreshold != null && Object.hasOwnProperty.call(message, "vetoThreshold")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.vetoThreshold); + return writer; + }; + + /** + * Encodes the specified TallyParams message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.TallyParams.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.gov.v1beta1.TallyParams + * @static + * @param {cosmos.gov.v1beta1.ITallyParams} message TallyParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TallyParams.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TallyParams message from the specified reader or buffer. + * @function decode + * @memberof cosmos.gov.v1beta1.TallyParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.gov.v1beta1.TallyParams} TallyParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TallyParams.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1beta1.TallyParams(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.quorum = reader.bytes(); + break; + case 2: + message.threshold = reader.bytes(); + break; + case 3: + message.vetoThreshold = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TallyParams message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.gov.v1beta1.TallyParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.gov.v1beta1.TallyParams} TallyParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TallyParams.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TallyParams message. + * @function verify + * @memberof cosmos.gov.v1beta1.TallyParams + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TallyParams.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.quorum != null && message.hasOwnProperty("quorum")) + if (!(message.quorum && typeof message.quorum.length === "number" || $util.isString(message.quorum))) + return "quorum: buffer expected"; + if (message.threshold != null && message.hasOwnProperty("threshold")) + if (!(message.threshold && typeof message.threshold.length === "number" || $util.isString(message.threshold))) + return "threshold: buffer expected"; + if (message.vetoThreshold != null && message.hasOwnProperty("vetoThreshold")) + if (!(message.vetoThreshold && typeof message.vetoThreshold.length === "number" || $util.isString(message.vetoThreshold))) + return "vetoThreshold: buffer expected"; + return null; + }; + + /** + * Creates a TallyParams message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.gov.v1beta1.TallyParams + * @static + * @param {Object.} object Plain object + * @returns {cosmos.gov.v1beta1.TallyParams} TallyParams + */ + TallyParams.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.gov.v1beta1.TallyParams) + return object; + var message = new $root.cosmos.gov.v1beta1.TallyParams(); + if (object.quorum != null) + if (typeof object.quorum === "string") + $util.base64.decode(object.quorum, message.quorum = $util.newBuffer($util.base64.length(object.quorum)), 0); + else if (object.quorum.length) + message.quorum = object.quorum; + if (object.threshold != null) + if (typeof object.threshold === "string") + $util.base64.decode(object.threshold, message.threshold = $util.newBuffer($util.base64.length(object.threshold)), 0); + else if (object.threshold.length) + message.threshold = object.threshold; + if (object.vetoThreshold != null) + if (typeof object.vetoThreshold === "string") + $util.base64.decode(object.vetoThreshold, message.vetoThreshold = $util.newBuffer($util.base64.length(object.vetoThreshold)), 0); + else if (object.vetoThreshold.length) + message.vetoThreshold = object.vetoThreshold; + return message; + }; + + /** + * Creates a plain object from a TallyParams message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.gov.v1beta1.TallyParams + * @static + * @param {cosmos.gov.v1beta1.TallyParams} message TallyParams + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TallyParams.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.quorum = ""; + else { + object.quorum = []; + if (options.bytes !== Array) + object.quorum = $util.newBuffer(object.quorum); + } + if (options.bytes === String) + object.threshold = ""; + else { + object.threshold = []; + if (options.bytes !== Array) + object.threshold = $util.newBuffer(object.threshold); + } + if (options.bytes === String) + object.vetoThreshold = ""; + else { + object.vetoThreshold = []; + if (options.bytes !== Array) + object.vetoThreshold = $util.newBuffer(object.vetoThreshold); + } + } + if (message.quorum != null && message.hasOwnProperty("quorum")) + object.quorum = options.bytes === String ? $util.base64.encode(message.quorum, 0, message.quorum.length) : options.bytes === Array ? Array.prototype.slice.call(message.quorum) : message.quorum; + if (message.threshold != null && message.hasOwnProperty("threshold")) + object.threshold = options.bytes === String ? $util.base64.encode(message.threshold, 0, message.threshold.length) : options.bytes === Array ? Array.prototype.slice.call(message.threshold) : message.threshold; + if (message.vetoThreshold != null && message.hasOwnProperty("vetoThreshold")) + object.vetoThreshold = options.bytes === String ? $util.base64.encode(message.vetoThreshold, 0, message.vetoThreshold.length) : options.bytes === Array ? Array.prototype.slice.call(message.vetoThreshold) : message.vetoThreshold; + return object; + }; + + /** + * Converts this TallyParams to JSON. + * @function toJSON + * @memberof cosmos.gov.v1beta1.TallyParams + * @instance + * @returns {Object.} JSON object + */ + TallyParams.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TallyParams; + })(v1beta1.TallyParams || {}); + + v1beta1.Msg = (function(Msg) { + + /** + * Constructs a new Msg service. + * @memberof cosmos.gov.v1beta1 + * @classdesc Represents a Msg + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Msg(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Msg.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Msg; + + /** + * Creates new Msg service using the specified rpc implementation. + * @function create + * @memberof cosmos.gov.v1beta1.Msg + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Msg} RPC service. Useful where requests and/or responses are streamed. + */ + Msg.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link cosmos.gov.v1beta1.Msg#submitProposal}. + * @memberof cosmos.gov.v1beta1.Msg + * @typedef SubmitProposalCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.gov.v1beta1.IMsgSubmitProposalResponse} [response] MsgSubmitProposalResponse + */ + + /** + * Calls SubmitProposal. + * @function submitProposal + * @memberof cosmos.gov.v1beta1.Msg + * @instance + * @param {cosmos.gov.v1beta1.IMsgSubmitProposal} request MsgSubmitProposal message or plain object + * @param {cosmos.gov.v1beta1.Msg.SubmitProposalCallback} callback Node-style callback called with the error, if any, and MsgSubmitProposalResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Msg.prototype.submitProposal = function submitProposal(request, callback) { + return this.rpcCall(submitProposal, $root.cosmos.gov.v1beta1.MsgSubmitProposal, $root.cosmos.gov.v1beta1.MsgSubmitProposalResponse, request, callback); + }, "name", { value: "SubmitProposal" }); + + /** + * Calls SubmitProposal. + * @function submitProposal + * @memberof cosmos.gov.v1beta1.Msg + * @instance + * @param {cosmos.gov.v1beta1.IMsgSubmitProposal} request MsgSubmitProposal message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link cosmos.gov.v1beta1.Msg#vote}. + * @memberof cosmos.gov.v1beta1.Msg + * @typedef VoteCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.gov.v1beta1.IMsgVoteResponse} [response] MsgVoteResponse + */ + + /** + * Calls Vote. + * @function vote + * @memberof cosmos.gov.v1beta1.Msg + * @instance + * @param {cosmos.gov.v1beta1.IMsgVote} request MsgVote message or plain object + * @param {cosmos.gov.v1beta1.Msg.VoteCallback} callback Node-style callback called with the error, if any, and MsgVoteResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Msg.prototype.vote = function vote(request, callback) { + return this.rpcCall(vote, $root.cosmos.gov.v1beta1.MsgVote, $root.cosmos.gov.v1beta1.MsgVoteResponse, request, callback); + }, "name", { value: "Vote" }); + + /** + * Calls Vote. + * @function vote + * @memberof cosmos.gov.v1beta1.Msg + * @instance + * @param {cosmos.gov.v1beta1.IMsgVote} request MsgVote message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link cosmos.gov.v1beta1.Msg#deposit}. + * @memberof cosmos.gov.v1beta1.Msg + * @typedef DepositCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.gov.v1beta1.IMsgDepositResponse} [response] MsgDepositResponse + */ + + /** + * Calls Deposit. + * @function deposit + * @memberof cosmos.gov.v1beta1.Msg + * @instance + * @param {cosmos.gov.v1beta1.IMsgDeposit} request MsgDeposit message or plain object + * @param {cosmos.gov.v1beta1.Msg.DepositCallback} callback Node-style callback called with the error, if any, and MsgDepositResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Msg.prototype.deposit = function deposit(request, callback) { + return this.rpcCall(deposit, $root.cosmos.gov.v1beta1.MsgDeposit, $root.cosmos.gov.v1beta1.MsgDepositResponse, request, callback); + }, "name", { value: "Deposit" }); + + /** + * Calls Deposit. + * @function deposit + * @memberof cosmos.gov.v1beta1.Msg + * @instance + * @param {cosmos.gov.v1beta1.IMsgDeposit} request MsgDeposit message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Msg; + })(v1beta1.Msg || {}); + + v1beta1.MsgSubmitProposal = (function(MsgSubmitProposal) { + + /** + * Properties of a MsgSubmitProposal. + * @memberof cosmos.gov.v1beta1 + * @interface IMsgSubmitProposal + * @property {google.protobuf.IAny|null} [content] MsgSubmitProposal content + * @property {Array.|null} [initialDeposit] MsgSubmitProposal initialDeposit + * @property {string|null} [proposer] MsgSubmitProposal proposer + */ + + /** + * Constructs a new MsgSubmitProposal. + * @memberof cosmos.gov.v1beta1 + * @classdesc Represents a MsgSubmitProposal. + * @implements IMsgSubmitProposal + * @constructor + * @param {cosmos.gov.v1beta1.IMsgSubmitProposal=} [properties] Properties to set + */ + function MsgSubmitProposal(properties) { + this.initialDeposit = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgSubmitProposal content. + * @member {google.protobuf.IAny|null|undefined} content + * @memberof cosmos.gov.v1beta1.MsgSubmitProposal + * @instance + */ + MsgSubmitProposal.prototype.content = null; + + /** + * MsgSubmitProposal initialDeposit. + * @member {Array.} initialDeposit + * @memberof cosmos.gov.v1beta1.MsgSubmitProposal + * @instance + */ + MsgSubmitProposal.prototype.initialDeposit = $util.emptyArray; + + /** + * MsgSubmitProposal proposer. + * @member {string} proposer + * @memberof cosmos.gov.v1beta1.MsgSubmitProposal + * @instance + */ + MsgSubmitProposal.prototype.proposer = ""; + + /** + * Creates a new MsgSubmitProposal instance using the specified properties. + * @function create + * @memberof cosmos.gov.v1beta1.MsgSubmitProposal + * @static + * @param {cosmos.gov.v1beta1.IMsgSubmitProposal=} [properties] Properties to set + * @returns {cosmos.gov.v1beta1.MsgSubmitProposal} MsgSubmitProposal instance + */ + MsgSubmitProposal.create = function create(properties) { + return new MsgSubmitProposal(properties); + }; + + /** + * Encodes the specified MsgSubmitProposal message. Does not implicitly {@link cosmos.gov.v1beta1.MsgSubmitProposal.verify|verify} messages. + * @function encode + * @memberof cosmos.gov.v1beta1.MsgSubmitProposal + * @static + * @param {cosmos.gov.v1beta1.IMsgSubmitProposal} message MsgSubmitProposal message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgSubmitProposal.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.content != null && Object.hasOwnProperty.call(message, "content")) + $root.google.protobuf.Any.encode(message.content, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.initialDeposit != null && message.initialDeposit.length) + for (var i = 0; i < message.initialDeposit.length; ++i) + $root.cosmos.base.v1beta1.Coin.encode(message.initialDeposit[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.proposer != null && Object.hasOwnProperty.call(message, "proposer")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.proposer); + return writer; + }; + + /** + * Encodes the specified MsgSubmitProposal message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.MsgSubmitProposal.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.gov.v1beta1.MsgSubmitProposal + * @static + * @param {cosmos.gov.v1beta1.IMsgSubmitProposal} message MsgSubmitProposal message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgSubmitProposal.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgSubmitProposal message from the specified reader or buffer. + * @function decode + * @memberof cosmos.gov.v1beta1.MsgSubmitProposal + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.gov.v1beta1.MsgSubmitProposal} MsgSubmitProposal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgSubmitProposal.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1beta1.MsgSubmitProposal(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.content = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + case 2: + if (!(message.initialDeposit && message.initialDeposit.length)) + message.initialDeposit = []; + message.initialDeposit.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); + break; + case 3: + message.proposer = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgSubmitProposal message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.gov.v1beta1.MsgSubmitProposal + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.gov.v1beta1.MsgSubmitProposal} MsgSubmitProposal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgSubmitProposal.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgSubmitProposal message. + * @function verify + * @memberof cosmos.gov.v1beta1.MsgSubmitProposal + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgSubmitProposal.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.content != null && message.hasOwnProperty("content")) { + var error = $root.google.protobuf.Any.verify(message.content); + if (error) + return "content." + error; + } + if (message.initialDeposit != null && message.hasOwnProperty("initialDeposit")) { + if (!Array.isArray(message.initialDeposit)) + return "initialDeposit: array expected"; + for (var i = 0; i < message.initialDeposit.length; ++i) { + var error = $root.cosmos.base.v1beta1.Coin.verify(message.initialDeposit[i]); + if (error) + return "initialDeposit." + error; + } + } + if (message.proposer != null && message.hasOwnProperty("proposer")) + if (!$util.isString(message.proposer)) + return "proposer: string expected"; + return null; + }; + + /** + * Creates a MsgSubmitProposal message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.gov.v1beta1.MsgSubmitProposal + * @static + * @param {Object.} object Plain object + * @returns {cosmos.gov.v1beta1.MsgSubmitProposal} MsgSubmitProposal + */ + MsgSubmitProposal.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.gov.v1beta1.MsgSubmitProposal) + return object; + var message = new $root.cosmos.gov.v1beta1.MsgSubmitProposal(); + if (object.content != null) { + if (typeof object.content !== "object") + throw TypeError(".cosmos.gov.v1beta1.MsgSubmitProposal.content: object expected"); + message.content = $root.google.protobuf.Any.fromObject(object.content); + } + if (object.initialDeposit) { + if (!Array.isArray(object.initialDeposit)) + throw TypeError(".cosmos.gov.v1beta1.MsgSubmitProposal.initialDeposit: array expected"); + message.initialDeposit = []; + for (var i = 0; i < object.initialDeposit.length; ++i) { + if (typeof object.initialDeposit[i] !== "object") + throw TypeError(".cosmos.gov.v1beta1.MsgSubmitProposal.initialDeposit: object expected"); + message.initialDeposit[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.initialDeposit[i]); + } + } + if (object.proposer != null) + message.proposer = String(object.proposer); + return message; + }; + + /** + * Creates a plain object from a MsgSubmitProposal message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.gov.v1beta1.MsgSubmitProposal + * @static + * @param {cosmos.gov.v1beta1.MsgSubmitProposal} message MsgSubmitProposal + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgSubmitProposal.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.initialDeposit = []; + if (options.defaults) { + object.content = null; + object.proposer = ""; + } + if (message.content != null && message.hasOwnProperty("content")) + object.content = $root.google.protobuf.Any.toObject(message.content, options); + if (message.initialDeposit && message.initialDeposit.length) { + object.initialDeposit = []; + for (var j = 0; j < message.initialDeposit.length; ++j) + object.initialDeposit[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.initialDeposit[j], options); + } + if (message.proposer != null && message.hasOwnProperty("proposer")) + object.proposer = message.proposer; + return object; + }; + + /** + * Converts this MsgSubmitProposal to JSON. + * @function toJSON + * @memberof cosmos.gov.v1beta1.MsgSubmitProposal + * @instance + * @returns {Object.} JSON object + */ + MsgSubmitProposal.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgSubmitProposal; + })(v1beta1.MsgSubmitProposal || {}); + + v1beta1.MsgSubmitProposalResponse = (function(MsgSubmitProposalResponse) { + + /** + * Properties of a MsgSubmitProposalResponse. + * @memberof cosmos.gov.v1beta1 + * @interface IMsgSubmitProposalResponse + * @property {number|Long|null} [proposalId] MsgSubmitProposalResponse proposalId + */ + + /** + * Constructs a new MsgSubmitProposalResponse. + * @memberof cosmos.gov.v1beta1 + * @classdesc Represents a MsgSubmitProposalResponse. + * @implements IMsgSubmitProposalResponse + * @constructor + * @param {cosmos.gov.v1beta1.IMsgSubmitProposalResponse=} [properties] Properties to set + */ + function MsgSubmitProposalResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgSubmitProposalResponse proposalId. + * @member {number|Long} proposalId + * @memberof cosmos.gov.v1beta1.MsgSubmitProposalResponse + * @instance + */ + MsgSubmitProposalResponse.prototype.proposalId = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new MsgSubmitProposalResponse instance using the specified properties. + * @function create + * @memberof cosmos.gov.v1beta1.MsgSubmitProposalResponse + * @static + * @param {cosmos.gov.v1beta1.IMsgSubmitProposalResponse=} [properties] Properties to set + * @returns {cosmos.gov.v1beta1.MsgSubmitProposalResponse} MsgSubmitProposalResponse instance + */ + MsgSubmitProposalResponse.create = function create(properties) { + return new MsgSubmitProposalResponse(properties); + }; + + /** + * Encodes the specified MsgSubmitProposalResponse message. Does not implicitly {@link cosmos.gov.v1beta1.MsgSubmitProposalResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.gov.v1beta1.MsgSubmitProposalResponse + * @static + * @param {cosmos.gov.v1beta1.IMsgSubmitProposalResponse} message MsgSubmitProposalResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgSubmitProposalResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.proposalId != null && Object.hasOwnProperty.call(message, "proposalId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.proposalId); + return writer; + }; + + /** + * Encodes the specified MsgSubmitProposalResponse message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.MsgSubmitProposalResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.gov.v1beta1.MsgSubmitProposalResponse + * @static + * @param {cosmos.gov.v1beta1.IMsgSubmitProposalResponse} message MsgSubmitProposalResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgSubmitProposalResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgSubmitProposalResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.gov.v1beta1.MsgSubmitProposalResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.gov.v1beta1.MsgSubmitProposalResponse} MsgSubmitProposalResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgSubmitProposalResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1beta1.MsgSubmitProposalResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.proposalId = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgSubmitProposalResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.gov.v1beta1.MsgSubmitProposalResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.gov.v1beta1.MsgSubmitProposalResponse} MsgSubmitProposalResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgSubmitProposalResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgSubmitProposalResponse message. + * @function verify + * @memberof cosmos.gov.v1beta1.MsgSubmitProposalResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgSubmitProposalResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.proposalId != null && message.hasOwnProperty("proposalId")) + if (!$util.isInteger(message.proposalId) && !(message.proposalId && $util.isInteger(message.proposalId.low) && $util.isInteger(message.proposalId.high))) + return "proposalId: integer|Long expected"; + return null; + }; + + /** + * Creates a MsgSubmitProposalResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.gov.v1beta1.MsgSubmitProposalResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.gov.v1beta1.MsgSubmitProposalResponse} MsgSubmitProposalResponse + */ + MsgSubmitProposalResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.gov.v1beta1.MsgSubmitProposalResponse) + return object; + var message = new $root.cosmos.gov.v1beta1.MsgSubmitProposalResponse(); + if (object.proposalId != null) + if ($util.Long) + (message.proposalId = $util.Long.fromValue(object.proposalId)).unsigned = true; + else if (typeof object.proposalId === "string") + message.proposalId = parseInt(object.proposalId, 10); + else if (typeof object.proposalId === "number") + message.proposalId = object.proposalId; + else if (typeof object.proposalId === "object") + message.proposalId = new $util.LongBits(object.proposalId.low >>> 0, object.proposalId.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a MsgSubmitProposalResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.gov.v1beta1.MsgSubmitProposalResponse + * @static + * @param {cosmos.gov.v1beta1.MsgSubmitProposalResponse} message MsgSubmitProposalResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgSubmitProposalResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.proposalId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.proposalId = options.longs === String ? "0" : 0; + if (message.proposalId != null && message.hasOwnProperty("proposalId")) + if (typeof message.proposalId === "number") + object.proposalId = options.longs === String ? String(message.proposalId) : message.proposalId; + else + object.proposalId = options.longs === String ? $util.Long.prototype.toString.call(message.proposalId) : options.longs === Number ? new $util.LongBits(message.proposalId.low >>> 0, message.proposalId.high >>> 0).toNumber(true) : message.proposalId; + return object; + }; + + /** + * Converts this MsgSubmitProposalResponse to JSON. + * @function toJSON + * @memberof cosmos.gov.v1beta1.MsgSubmitProposalResponse + * @instance + * @returns {Object.} JSON object + */ + MsgSubmitProposalResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgSubmitProposalResponse; + })(v1beta1.MsgSubmitProposalResponse || {}); + + v1beta1.MsgVote = (function(MsgVote) { + + /** + * Properties of a MsgVote. + * @memberof cosmos.gov.v1beta1 + * @interface IMsgVote + * @property {number|Long|null} [proposalId] MsgVote proposalId + * @property {string|null} [voter] MsgVote voter + * @property {cosmos.gov.v1beta1.VoteOption|null} [option] MsgVote option + */ + + /** + * Constructs a new MsgVote. + * @memberof cosmos.gov.v1beta1 + * @classdesc Represents a MsgVote. + * @implements IMsgVote + * @constructor + * @param {cosmos.gov.v1beta1.IMsgVote=} [properties] Properties to set + */ + function MsgVote(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgVote proposalId. + * @member {number|Long} proposalId + * @memberof cosmos.gov.v1beta1.MsgVote + * @instance + */ + MsgVote.prototype.proposalId = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * MsgVote voter. + * @member {string} voter + * @memberof cosmos.gov.v1beta1.MsgVote + * @instance + */ + MsgVote.prototype.voter = ""; + + /** + * MsgVote option. + * @member {cosmos.gov.v1beta1.VoteOption} option + * @memberof cosmos.gov.v1beta1.MsgVote + * @instance + */ + MsgVote.prototype.option = 0; + + /** + * Creates a new MsgVote instance using the specified properties. + * @function create + * @memberof cosmos.gov.v1beta1.MsgVote + * @static + * @param {cosmos.gov.v1beta1.IMsgVote=} [properties] Properties to set + * @returns {cosmos.gov.v1beta1.MsgVote} MsgVote instance + */ + MsgVote.create = function create(properties) { + return new MsgVote(properties); + }; + + /** + * Encodes the specified MsgVote message. Does not implicitly {@link cosmos.gov.v1beta1.MsgVote.verify|verify} messages. + * @function encode + * @memberof cosmos.gov.v1beta1.MsgVote + * @static + * @param {cosmos.gov.v1beta1.IMsgVote} message MsgVote message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgVote.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.proposalId != null && Object.hasOwnProperty.call(message, "proposalId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.proposalId); + if (message.voter != null && Object.hasOwnProperty.call(message, "voter")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.voter); + if (message.option != null && Object.hasOwnProperty.call(message, "option")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.option); + return writer; + }; + + /** + * Encodes the specified MsgVote message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.MsgVote.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.gov.v1beta1.MsgVote + * @static + * @param {cosmos.gov.v1beta1.IMsgVote} message MsgVote message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgVote.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgVote message from the specified reader or buffer. + * @function decode + * @memberof cosmos.gov.v1beta1.MsgVote + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.gov.v1beta1.MsgVote} MsgVote + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgVote.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1beta1.MsgVote(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.proposalId = reader.uint64(); + break; + case 2: + message.voter = reader.string(); + break; + case 3: + message.option = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgVote message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.gov.v1beta1.MsgVote + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.gov.v1beta1.MsgVote} MsgVote + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgVote.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgVote message. + * @function verify + * @memberof cosmos.gov.v1beta1.MsgVote + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgVote.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.proposalId != null && message.hasOwnProperty("proposalId")) + if (!$util.isInteger(message.proposalId) && !(message.proposalId && $util.isInteger(message.proposalId.low) && $util.isInteger(message.proposalId.high))) + return "proposalId: integer|Long expected"; + if (message.voter != null && message.hasOwnProperty("voter")) + if (!$util.isString(message.voter)) + return "voter: string expected"; + if (message.option != null && message.hasOwnProperty("option")) + switch (message.option) { + default: + return "option: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + return null; + }; + + /** + * Creates a MsgVote message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.gov.v1beta1.MsgVote + * @static + * @param {Object.} object Plain object + * @returns {cosmos.gov.v1beta1.MsgVote} MsgVote + */ + MsgVote.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.gov.v1beta1.MsgVote) + return object; + var message = new $root.cosmos.gov.v1beta1.MsgVote(); + if (object.proposalId != null) + if ($util.Long) + (message.proposalId = $util.Long.fromValue(object.proposalId)).unsigned = true; + else if (typeof object.proposalId === "string") + message.proposalId = parseInt(object.proposalId, 10); + else if (typeof object.proposalId === "number") + message.proposalId = object.proposalId; + else if (typeof object.proposalId === "object") + message.proposalId = new $util.LongBits(object.proposalId.low >>> 0, object.proposalId.high >>> 0).toNumber(true); + if (object.voter != null) + message.voter = String(object.voter); + switch (object.option) { + case "VOTE_OPTION_UNSPECIFIED": + case 0: + message.option = 0; + break; + case "VOTE_OPTION_YES": + case 1: + message.option = 1; + break; + case "VOTE_OPTION_ABSTAIN": + case 2: + message.option = 2; + break; + case "VOTE_OPTION_NO": + case 3: + message.option = 3; + break; + case "VOTE_OPTION_NO_WITH_VETO": + case 4: + message.option = 4; + break; + } + return message; + }; + + /** + * Creates a plain object from a MsgVote message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.gov.v1beta1.MsgVote + * @static + * @param {cosmos.gov.v1beta1.MsgVote} message MsgVote + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgVote.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.proposalId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.proposalId = options.longs === String ? "0" : 0; + object.voter = ""; + object.option = options.enums === String ? "VOTE_OPTION_UNSPECIFIED" : 0; + } + if (message.proposalId != null && message.hasOwnProperty("proposalId")) + if (typeof message.proposalId === "number") + object.proposalId = options.longs === String ? String(message.proposalId) : message.proposalId; + else + object.proposalId = options.longs === String ? $util.Long.prototype.toString.call(message.proposalId) : options.longs === Number ? new $util.LongBits(message.proposalId.low >>> 0, message.proposalId.high >>> 0).toNumber(true) : message.proposalId; + if (message.voter != null && message.hasOwnProperty("voter")) + object.voter = message.voter; + if (message.option != null && message.hasOwnProperty("option")) + object.option = options.enums === String ? $root.cosmos.gov.v1beta1.VoteOption[message.option] : message.option; + return object; + }; + + /** + * Converts this MsgVote to JSON. + * @function toJSON + * @memberof cosmos.gov.v1beta1.MsgVote + * @instance + * @returns {Object.} JSON object + */ + MsgVote.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgVote; + })(v1beta1.MsgVote || {}); + + v1beta1.MsgVoteResponse = (function(MsgVoteResponse) { + + /** + * Properties of a MsgVoteResponse. + * @memberof cosmos.gov.v1beta1 + * @interface IMsgVoteResponse + */ + + /** + * Constructs a new MsgVoteResponse. + * @memberof cosmos.gov.v1beta1 + * @classdesc Represents a MsgVoteResponse. + * @implements IMsgVoteResponse + * @constructor + * @param {cosmos.gov.v1beta1.IMsgVoteResponse=} [properties] Properties to set + */ + function MsgVoteResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new MsgVoteResponse instance using the specified properties. + * @function create + * @memberof cosmos.gov.v1beta1.MsgVoteResponse + * @static + * @param {cosmos.gov.v1beta1.IMsgVoteResponse=} [properties] Properties to set + * @returns {cosmos.gov.v1beta1.MsgVoteResponse} MsgVoteResponse instance + */ + MsgVoteResponse.create = function create(properties) { + return new MsgVoteResponse(properties); + }; + + /** + * Encodes the specified MsgVoteResponse message. Does not implicitly {@link cosmos.gov.v1beta1.MsgVoteResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.gov.v1beta1.MsgVoteResponse + * @static + * @param {cosmos.gov.v1beta1.IMsgVoteResponse} message MsgVoteResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgVoteResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MsgVoteResponse message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.MsgVoteResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.gov.v1beta1.MsgVoteResponse + * @static + * @param {cosmos.gov.v1beta1.IMsgVoteResponse} message MsgVoteResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgVoteResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgVoteResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.gov.v1beta1.MsgVoteResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.gov.v1beta1.MsgVoteResponse} MsgVoteResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgVoteResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1beta1.MsgVoteResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgVoteResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.gov.v1beta1.MsgVoteResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.gov.v1beta1.MsgVoteResponse} MsgVoteResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgVoteResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgVoteResponse message. + * @function verify + * @memberof cosmos.gov.v1beta1.MsgVoteResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgVoteResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MsgVoteResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.gov.v1beta1.MsgVoteResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.gov.v1beta1.MsgVoteResponse} MsgVoteResponse + */ + MsgVoteResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.gov.v1beta1.MsgVoteResponse) + return object; + return new $root.cosmos.gov.v1beta1.MsgVoteResponse(); + }; + + /** + * Creates a plain object from a MsgVoteResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.gov.v1beta1.MsgVoteResponse + * @static + * @param {cosmos.gov.v1beta1.MsgVoteResponse} message MsgVoteResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgVoteResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MsgVoteResponse to JSON. + * @function toJSON + * @memberof cosmos.gov.v1beta1.MsgVoteResponse + * @instance + * @returns {Object.} JSON object + */ + MsgVoteResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgVoteResponse; + })(v1beta1.MsgVoteResponse || {}); + + v1beta1.MsgDeposit = (function(MsgDeposit) { + + /** + * Properties of a MsgDeposit. + * @memberof cosmos.gov.v1beta1 + * @interface IMsgDeposit + * @property {number|Long|null} [proposalId] MsgDeposit proposalId + * @property {string|null} [depositor] MsgDeposit depositor + * @property {Array.|null} [amount] MsgDeposit amount + */ + + /** + * Constructs a new MsgDeposit. + * @memberof cosmos.gov.v1beta1 + * @classdesc Represents a MsgDeposit. + * @implements IMsgDeposit + * @constructor + * @param {cosmos.gov.v1beta1.IMsgDeposit=} [properties] Properties to set + */ + function MsgDeposit(properties) { + this.amount = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgDeposit proposalId. + * @member {number|Long} proposalId + * @memberof cosmos.gov.v1beta1.MsgDeposit + * @instance + */ + MsgDeposit.prototype.proposalId = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * MsgDeposit depositor. + * @member {string} depositor + * @memberof cosmos.gov.v1beta1.MsgDeposit + * @instance + */ + MsgDeposit.prototype.depositor = ""; + + /** + * MsgDeposit amount. + * @member {Array.} amount + * @memberof cosmos.gov.v1beta1.MsgDeposit + * @instance + */ + MsgDeposit.prototype.amount = $util.emptyArray; + + /** + * Creates a new MsgDeposit instance using the specified properties. + * @function create + * @memberof cosmos.gov.v1beta1.MsgDeposit + * @static + * @param {cosmos.gov.v1beta1.IMsgDeposit=} [properties] Properties to set + * @returns {cosmos.gov.v1beta1.MsgDeposit} MsgDeposit instance + */ + MsgDeposit.create = function create(properties) { + return new MsgDeposit(properties); + }; + + /** + * Encodes the specified MsgDeposit message. Does not implicitly {@link cosmos.gov.v1beta1.MsgDeposit.verify|verify} messages. + * @function encode + * @memberof cosmos.gov.v1beta1.MsgDeposit + * @static + * @param {cosmos.gov.v1beta1.IMsgDeposit} message MsgDeposit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgDeposit.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.proposalId != null && Object.hasOwnProperty.call(message, "proposalId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.proposalId); + if (message.depositor != null && Object.hasOwnProperty.call(message, "depositor")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.depositor); + if (message.amount != null && message.amount.length) + for (var i = 0; i < message.amount.length; ++i) + $root.cosmos.base.v1beta1.Coin.encode(message.amount[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MsgDeposit message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.MsgDeposit.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.gov.v1beta1.MsgDeposit + * @static + * @param {cosmos.gov.v1beta1.IMsgDeposit} message MsgDeposit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgDeposit.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgDeposit message from the specified reader or buffer. + * @function decode + * @memberof cosmos.gov.v1beta1.MsgDeposit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.gov.v1beta1.MsgDeposit} MsgDeposit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgDeposit.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1beta1.MsgDeposit(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.proposalId = reader.uint64(); + break; + case 2: + message.depositor = reader.string(); + break; + case 3: + if (!(message.amount && message.amount.length)) + message.amount = []; + message.amount.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgDeposit message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.gov.v1beta1.MsgDeposit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.gov.v1beta1.MsgDeposit} MsgDeposit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgDeposit.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgDeposit message. + * @function verify + * @memberof cosmos.gov.v1beta1.MsgDeposit + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgDeposit.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.proposalId != null && message.hasOwnProperty("proposalId")) + if (!$util.isInteger(message.proposalId) && !(message.proposalId && $util.isInteger(message.proposalId.low) && $util.isInteger(message.proposalId.high))) + return "proposalId: integer|Long expected"; + if (message.depositor != null && message.hasOwnProperty("depositor")) + if (!$util.isString(message.depositor)) + return "depositor: string expected"; + if (message.amount != null && message.hasOwnProperty("amount")) { + if (!Array.isArray(message.amount)) + return "amount: array expected"; + for (var i = 0; i < message.amount.length; ++i) { + var error = $root.cosmos.base.v1beta1.Coin.verify(message.amount[i]); + if (error) + return "amount." + error; + } + } + return null; + }; + + /** + * Creates a MsgDeposit message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.gov.v1beta1.MsgDeposit + * @static + * @param {Object.} object Plain object + * @returns {cosmos.gov.v1beta1.MsgDeposit} MsgDeposit + */ + MsgDeposit.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.gov.v1beta1.MsgDeposit) + return object; + var message = new $root.cosmos.gov.v1beta1.MsgDeposit(); + if (object.proposalId != null) + if ($util.Long) + (message.proposalId = $util.Long.fromValue(object.proposalId)).unsigned = true; + else if (typeof object.proposalId === "string") + message.proposalId = parseInt(object.proposalId, 10); + else if (typeof object.proposalId === "number") + message.proposalId = object.proposalId; + else if (typeof object.proposalId === "object") + message.proposalId = new $util.LongBits(object.proposalId.low >>> 0, object.proposalId.high >>> 0).toNumber(true); + if (object.depositor != null) + message.depositor = String(object.depositor); + if (object.amount) { + if (!Array.isArray(object.amount)) + throw TypeError(".cosmos.gov.v1beta1.MsgDeposit.amount: array expected"); + message.amount = []; + for (var i = 0; i < object.amount.length; ++i) { + if (typeof object.amount[i] !== "object") + throw TypeError(".cosmos.gov.v1beta1.MsgDeposit.amount: object expected"); + message.amount[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.amount[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a MsgDeposit message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.gov.v1beta1.MsgDeposit + * @static + * @param {cosmos.gov.v1beta1.MsgDeposit} message MsgDeposit + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgDeposit.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.amount = []; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.proposalId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.proposalId = options.longs === String ? "0" : 0; + object.depositor = ""; + } + if (message.proposalId != null && message.hasOwnProperty("proposalId")) + if (typeof message.proposalId === "number") + object.proposalId = options.longs === String ? String(message.proposalId) : message.proposalId; + else + object.proposalId = options.longs === String ? $util.Long.prototype.toString.call(message.proposalId) : options.longs === Number ? new $util.LongBits(message.proposalId.low >>> 0, message.proposalId.high >>> 0).toNumber(true) : message.proposalId; + if (message.depositor != null && message.hasOwnProperty("depositor")) + object.depositor = message.depositor; + if (message.amount && message.amount.length) { + object.amount = []; + for (var j = 0; j < message.amount.length; ++j) + object.amount[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.amount[j], options); + } + return object; + }; + + /** + * Converts this MsgDeposit to JSON. + * @function toJSON + * @memberof cosmos.gov.v1beta1.MsgDeposit + * @instance + * @returns {Object.} JSON object + */ + MsgDeposit.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgDeposit; + })(v1beta1.MsgDeposit || {}); + + v1beta1.MsgDepositResponse = (function(MsgDepositResponse) { + + /** + * Properties of a MsgDepositResponse. + * @memberof cosmos.gov.v1beta1 + * @interface IMsgDepositResponse + */ + + /** + * Constructs a new MsgDepositResponse. + * @memberof cosmos.gov.v1beta1 + * @classdesc Represents a MsgDepositResponse. + * @implements IMsgDepositResponse + * @constructor + * @param {cosmos.gov.v1beta1.IMsgDepositResponse=} [properties] Properties to set + */ + function MsgDepositResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new MsgDepositResponse instance using the specified properties. + * @function create + * @memberof cosmos.gov.v1beta1.MsgDepositResponse + * @static + * @param {cosmos.gov.v1beta1.IMsgDepositResponse=} [properties] Properties to set + * @returns {cosmos.gov.v1beta1.MsgDepositResponse} MsgDepositResponse instance + */ + MsgDepositResponse.create = function create(properties) { + return new MsgDepositResponse(properties); + }; + + /** + * Encodes the specified MsgDepositResponse message. Does not implicitly {@link cosmos.gov.v1beta1.MsgDepositResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.gov.v1beta1.MsgDepositResponse + * @static + * @param {cosmos.gov.v1beta1.IMsgDepositResponse} message MsgDepositResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgDepositResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MsgDepositResponse message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.MsgDepositResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.gov.v1beta1.MsgDepositResponse + * @static + * @param {cosmos.gov.v1beta1.IMsgDepositResponse} message MsgDepositResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgDepositResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgDepositResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.gov.v1beta1.MsgDepositResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.gov.v1beta1.MsgDepositResponse} MsgDepositResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgDepositResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1beta1.MsgDepositResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgDepositResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.gov.v1beta1.MsgDepositResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.gov.v1beta1.MsgDepositResponse} MsgDepositResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgDepositResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgDepositResponse message. + * @function verify + * @memberof cosmos.gov.v1beta1.MsgDepositResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgDepositResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MsgDepositResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.gov.v1beta1.MsgDepositResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.gov.v1beta1.MsgDepositResponse} MsgDepositResponse + */ + MsgDepositResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.gov.v1beta1.MsgDepositResponse) + return object; + return new $root.cosmos.gov.v1beta1.MsgDepositResponse(); + }; + + /** + * Creates a plain object from a MsgDepositResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.gov.v1beta1.MsgDepositResponse + * @static + * @param {cosmos.gov.v1beta1.MsgDepositResponse} message MsgDepositResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgDepositResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MsgDepositResponse to JSON. + * @function toJSON + * @memberof cosmos.gov.v1beta1.MsgDepositResponse + * @instance + * @returns {Object.} JSON object + */ + MsgDepositResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgDepositResponse; + })(v1beta1.MsgDepositResponse || {}); + + return v1beta1; + })(gov.v1beta1 || {}); + + return gov; + })(cosmos.gov || {}); + + /** + * Namespace staking. + * @memberof cosmos + * @namespace + */ + + cosmos.staking = (function(staking) { + + /** + * Namespace v1beta1. + * @memberof cosmos.staking + * @namespace + */ + + staking.v1beta1 = (function(v1beta1) { + + v1beta1.HistoricalInfo = (function(HistoricalInfo) { + + /** + * Properties of a HistoricalInfo. + * @memberof cosmos.staking.v1beta1 + * @interface IHistoricalInfo + * @property {tendermint.types.IHeader|null} [header] HistoricalInfo header + * @property {Array.|null} [valset] HistoricalInfo valset + */ + + /** + * Constructs a new HistoricalInfo. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a HistoricalInfo. + * @implements IHistoricalInfo + * @constructor + * @param {cosmos.staking.v1beta1.IHistoricalInfo=} [properties] Properties to set + */ + function HistoricalInfo(properties) { + this.valset = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HistoricalInfo header. + * @member {tendermint.types.IHeader|null|undefined} header + * @memberof cosmos.staking.v1beta1.HistoricalInfo + * @instance + */ + HistoricalInfo.prototype.header = null; + + /** + * HistoricalInfo valset. + * @member {Array.} valset + * @memberof cosmos.staking.v1beta1.HistoricalInfo + * @instance + */ + HistoricalInfo.prototype.valset = $util.emptyArray; + + /** + * Creates a new HistoricalInfo instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.HistoricalInfo + * @static + * @param {cosmos.staking.v1beta1.IHistoricalInfo=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.HistoricalInfo} HistoricalInfo instance + */ + HistoricalInfo.create = function create(properties) { + return new HistoricalInfo(properties); + }; + + /** + * Encodes the specified HistoricalInfo message. Does not implicitly {@link cosmos.staking.v1beta1.HistoricalInfo.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.HistoricalInfo + * @static + * @param {cosmos.staking.v1beta1.IHistoricalInfo} message HistoricalInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HistoricalInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.header != null && Object.hasOwnProperty.call(message, "header")) + $root.tendermint.types.Header.encode(message.header, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.valset != null && message.valset.length) + for (var i = 0; i < message.valset.length; ++i) + $root.cosmos.staking.v1beta1.Validator.encode(message.valset[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified HistoricalInfo message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.HistoricalInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.HistoricalInfo + * @static + * @param {cosmos.staking.v1beta1.IHistoricalInfo} message HistoricalInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HistoricalInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HistoricalInfo message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.HistoricalInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.HistoricalInfo} HistoricalInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HistoricalInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.HistoricalInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.header = $root.tendermint.types.Header.decode(reader, reader.uint32()); + break; + case 2: + if (!(message.valset && message.valset.length)) + message.valset = []; + message.valset.push($root.cosmos.staking.v1beta1.Validator.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HistoricalInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.HistoricalInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.HistoricalInfo} HistoricalInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HistoricalInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HistoricalInfo message. + * @function verify + * @memberof cosmos.staking.v1beta1.HistoricalInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HistoricalInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.header != null && message.hasOwnProperty("header")) { + var error = $root.tendermint.types.Header.verify(message.header); + if (error) + return "header." + error; + } + if (message.valset != null && message.hasOwnProperty("valset")) { + if (!Array.isArray(message.valset)) + return "valset: array expected"; + for (var i = 0; i < message.valset.length; ++i) { + var error = $root.cosmos.staking.v1beta1.Validator.verify(message.valset[i]); + if (error) + return "valset." + error; + } + } + return null; + }; + + /** + * Creates a HistoricalInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.HistoricalInfo + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.HistoricalInfo} HistoricalInfo + */ + HistoricalInfo.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.HistoricalInfo) + return object; + var message = new $root.cosmos.staking.v1beta1.HistoricalInfo(); + if (object.header != null) { + if (typeof object.header !== "object") + throw TypeError(".cosmos.staking.v1beta1.HistoricalInfo.header: object expected"); + message.header = $root.tendermint.types.Header.fromObject(object.header); + } + if (object.valset) { + if (!Array.isArray(object.valset)) + throw TypeError(".cosmos.staking.v1beta1.HistoricalInfo.valset: array expected"); + message.valset = []; + for (var i = 0; i < object.valset.length; ++i) { + if (typeof object.valset[i] !== "object") + throw TypeError(".cosmos.staking.v1beta1.HistoricalInfo.valset: object expected"); + message.valset[i] = $root.cosmos.staking.v1beta1.Validator.fromObject(object.valset[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a HistoricalInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.HistoricalInfo + * @static + * @param {cosmos.staking.v1beta1.HistoricalInfo} message HistoricalInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HistoricalInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.valset = []; + if (options.defaults) + object.header = null; + if (message.header != null && message.hasOwnProperty("header")) + object.header = $root.tendermint.types.Header.toObject(message.header, options); + if (message.valset && message.valset.length) { + object.valset = []; + for (var j = 0; j < message.valset.length; ++j) + object.valset[j] = $root.cosmos.staking.v1beta1.Validator.toObject(message.valset[j], options); + } + return object; + }; + + /** + * Converts this HistoricalInfo to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.HistoricalInfo + * @instance + * @returns {Object.} JSON object + */ + HistoricalInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return HistoricalInfo; + })(v1beta1.HistoricalInfo || {}); + + v1beta1.CommissionRates = (function(CommissionRates) { + + /** + * Properties of a CommissionRates. + * @memberof cosmos.staking.v1beta1 + * @interface ICommissionRates + * @property {string|null} [rate] CommissionRates rate + * @property {string|null} [maxRate] CommissionRates maxRate + * @property {string|null} [maxChangeRate] CommissionRates maxChangeRate + */ + + /** + * Constructs a new CommissionRates. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a CommissionRates. + * @implements ICommissionRates + * @constructor + * @param {cosmos.staking.v1beta1.ICommissionRates=} [properties] Properties to set + */ + function CommissionRates(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CommissionRates rate. + * @member {string} rate + * @memberof cosmos.staking.v1beta1.CommissionRates + * @instance + */ + CommissionRates.prototype.rate = ""; + + /** + * CommissionRates maxRate. + * @member {string} maxRate + * @memberof cosmos.staking.v1beta1.CommissionRates + * @instance + */ + CommissionRates.prototype.maxRate = ""; + + /** + * CommissionRates maxChangeRate. + * @member {string} maxChangeRate + * @memberof cosmos.staking.v1beta1.CommissionRates + * @instance + */ + CommissionRates.prototype.maxChangeRate = ""; + + /** + * Creates a new CommissionRates instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.CommissionRates + * @static + * @param {cosmos.staking.v1beta1.ICommissionRates=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.CommissionRates} CommissionRates instance + */ + CommissionRates.create = function create(properties) { + return new CommissionRates(properties); + }; + + /** + * Encodes the specified CommissionRates message. Does not implicitly {@link cosmos.staking.v1beta1.CommissionRates.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.CommissionRates + * @static + * @param {cosmos.staking.v1beta1.ICommissionRates} message CommissionRates message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommissionRates.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rate != null && Object.hasOwnProperty.call(message, "rate")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.rate); + if (message.maxRate != null && Object.hasOwnProperty.call(message, "maxRate")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.maxRate); + if (message.maxChangeRate != null && Object.hasOwnProperty.call(message, "maxChangeRate")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.maxChangeRate); + return writer; + }; + + /** + * Encodes the specified CommissionRates message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.CommissionRates.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.CommissionRates + * @static + * @param {cosmos.staking.v1beta1.ICommissionRates} message CommissionRates message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommissionRates.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CommissionRates message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.CommissionRates + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.CommissionRates} CommissionRates + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommissionRates.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.CommissionRates(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.rate = reader.string(); + break; + case 2: + message.maxRate = reader.string(); + break; + case 3: + message.maxChangeRate = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CommissionRates message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.CommissionRates + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.CommissionRates} CommissionRates + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommissionRates.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CommissionRates message. + * @function verify + * @memberof cosmos.staking.v1beta1.CommissionRates + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CommissionRates.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rate != null && message.hasOwnProperty("rate")) + if (!$util.isString(message.rate)) + return "rate: string expected"; + if (message.maxRate != null && message.hasOwnProperty("maxRate")) + if (!$util.isString(message.maxRate)) + return "maxRate: string expected"; + if (message.maxChangeRate != null && message.hasOwnProperty("maxChangeRate")) + if (!$util.isString(message.maxChangeRate)) + return "maxChangeRate: string expected"; + return null; + }; + + /** + * Creates a CommissionRates message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.CommissionRates + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.CommissionRates} CommissionRates + */ + CommissionRates.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.CommissionRates) + return object; + var message = new $root.cosmos.staking.v1beta1.CommissionRates(); + if (object.rate != null) + message.rate = String(object.rate); + if (object.maxRate != null) + message.maxRate = String(object.maxRate); + if (object.maxChangeRate != null) + message.maxChangeRate = String(object.maxChangeRate); + return message; + }; + + /** + * Creates a plain object from a CommissionRates message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.CommissionRates + * @static + * @param {cosmos.staking.v1beta1.CommissionRates} message CommissionRates + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CommissionRates.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.rate = ""; + object.maxRate = ""; + object.maxChangeRate = ""; + } + if (message.rate != null && message.hasOwnProperty("rate")) + object.rate = message.rate; + if (message.maxRate != null && message.hasOwnProperty("maxRate")) + object.maxRate = message.maxRate; + if (message.maxChangeRate != null && message.hasOwnProperty("maxChangeRate")) + object.maxChangeRate = message.maxChangeRate; + return object; + }; + + /** + * Converts this CommissionRates to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.CommissionRates + * @instance + * @returns {Object.} JSON object + */ + CommissionRates.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CommissionRates; + })(v1beta1.CommissionRates || {}); + + v1beta1.Commission = (function(Commission) { + + /** + * Properties of a Commission. + * @memberof cosmos.staking.v1beta1 + * @interface ICommission + * @property {cosmos.staking.v1beta1.ICommissionRates|null} [commissionRates] Commission commissionRates + * @property {google.protobuf.ITimestamp|null} [updateTime] Commission updateTime + */ + + /** + * Constructs a new Commission. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a Commission. + * @implements ICommission + * @constructor + * @param {cosmos.staking.v1beta1.ICommission=} [properties] Properties to set + */ + function Commission(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Commission commissionRates. + * @member {cosmos.staking.v1beta1.ICommissionRates|null|undefined} commissionRates + * @memberof cosmos.staking.v1beta1.Commission + * @instance + */ + Commission.prototype.commissionRates = null; + + /** + * Commission updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof cosmos.staking.v1beta1.Commission + * @instance + */ + Commission.prototype.updateTime = null; + + /** + * Creates a new Commission instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.Commission + * @static + * @param {cosmos.staking.v1beta1.ICommission=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.Commission} Commission instance + */ + Commission.create = function create(properties) { + return new Commission(properties); + }; + + /** + * Encodes the specified Commission message. Does not implicitly {@link cosmos.staking.v1beta1.Commission.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.Commission + * @static + * @param {cosmos.staking.v1beta1.ICommission} message Commission message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Commission.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.commissionRates != null && Object.hasOwnProperty.call(message, "commissionRates")) + $root.cosmos.staking.v1beta1.CommissionRates.encode(message.commissionRates, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Commission message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.Commission.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.Commission + * @static + * @param {cosmos.staking.v1beta1.ICommission} message Commission message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Commission.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Commission message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.Commission + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.Commission} Commission + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Commission.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.Commission(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.commissionRates = $root.cosmos.staking.v1beta1.CommissionRates.decode(reader, reader.uint32()); + break; + case 2: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Commission message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.Commission + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.Commission} Commission + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Commission.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Commission message. + * @function verify + * @memberof cosmos.staking.v1beta1.Commission + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Commission.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.commissionRates != null && message.hasOwnProperty("commissionRates")) { + var error = $root.cosmos.staking.v1beta1.CommissionRates.verify(message.commissionRates); + if (error) + return "commissionRates." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + return null; + }; + + /** + * Creates a Commission message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.Commission + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.Commission} Commission + */ + Commission.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.Commission) + return object; + var message = new $root.cosmos.staking.v1beta1.Commission(); + if (object.commissionRates != null) { + if (typeof object.commissionRates !== "object") + throw TypeError(".cosmos.staking.v1beta1.Commission.commissionRates: object expected"); + message.commissionRates = $root.cosmos.staking.v1beta1.CommissionRates.fromObject(object.commissionRates); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".cosmos.staking.v1beta1.Commission.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + return message; + }; + + /** + * Creates a plain object from a Commission message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.Commission + * @static + * @param {cosmos.staking.v1beta1.Commission} message Commission + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Commission.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.commissionRates = null; + object.updateTime = null; + } + if (message.commissionRates != null && message.hasOwnProperty("commissionRates")) + object.commissionRates = $root.cosmos.staking.v1beta1.CommissionRates.toObject(message.commissionRates, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + return object; + }; + + /** + * Converts this Commission to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.Commission + * @instance + * @returns {Object.} JSON object + */ + Commission.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Commission; + })(v1beta1.Commission || {}); + + v1beta1.Description = (function(Description) { + + /** + * Properties of a Description. + * @memberof cosmos.staking.v1beta1 + * @interface IDescription + * @property {string|null} [moniker] Description moniker + * @property {string|null} [identity] Description identity + * @property {string|null} [website] Description website + * @property {string|null} [securityContact] Description securityContact + * @property {string|null} [details] Description details + */ + + /** + * Constructs a new Description. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a Description. + * @implements IDescription + * @constructor + * @param {cosmos.staking.v1beta1.IDescription=} [properties] Properties to set + */ + function Description(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Description moniker. + * @member {string} moniker + * @memberof cosmos.staking.v1beta1.Description + * @instance + */ + Description.prototype.moniker = ""; + + /** + * Description identity. + * @member {string} identity + * @memberof cosmos.staking.v1beta1.Description + * @instance + */ + Description.prototype.identity = ""; + + /** + * Description website. + * @member {string} website + * @memberof cosmos.staking.v1beta1.Description + * @instance + */ + Description.prototype.website = ""; + + /** + * Description securityContact. + * @member {string} securityContact + * @memberof cosmos.staking.v1beta1.Description + * @instance + */ + Description.prototype.securityContact = ""; + + /** + * Description details. + * @member {string} details + * @memberof cosmos.staking.v1beta1.Description + * @instance + */ + Description.prototype.details = ""; + + /** + * Creates a new Description instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.Description + * @static + * @param {cosmos.staking.v1beta1.IDescription=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.Description} Description instance + */ + Description.create = function create(properties) { + return new Description(properties); + }; + + /** + * Encodes the specified Description message. Does not implicitly {@link cosmos.staking.v1beta1.Description.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.Description + * @static + * @param {cosmos.staking.v1beta1.IDescription} message Description message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Description.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.moniker != null && Object.hasOwnProperty.call(message, "moniker")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.moniker); + if (message.identity != null && Object.hasOwnProperty.call(message, "identity")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.identity); + if (message.website != null && Object.hasOwnProperty.call(message, "website")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.website); + if (message.securityContact != null && Object.hasOwnProperty.call(message, "securityContact")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.securityContact); + if (message.details != null && Object.hasOwnProperty.call(message, "details")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.details); + return writer; + }; + + /** + * Encodes the specified Description message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.Description.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.Description + * @static + * @param {cosmos.staking.v1beta1.IDescription} message Description message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Description.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Description message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.Description + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.Description} Description + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Description.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.Description(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.moniker = reader.string(); + break; + case 2: + message.identity = reader.string(); + break; + case 3: + message.website = reader.string(); + break; + case 4: + message.securityContact = reader.string(); + break; + case 5: + message.details = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Description message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.Description + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.Description} Description + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Description.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Description message. + * @function verify + * @memberof cosmos.staking.v1beta1.Description + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Description.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.moniker != null && message.hasOwnProperty("moniker")) + if (!$util.isString(message.moniker)) + return "moniker: string expected"; + if (message.identity != null && message.hasOwnProperty("identity")) + if (!$util.isString(message.identity)) + return "identity: string expected"; + if (message.website != null && message.hasOwnProperty("website")) + if (!$util.isString(message.website)) + return "website: string expected"; + if (message.securityContact != null && message.hasOwnProperty("securityContact")) + if (!$util.isString(message.securityContact)) + return "securityContact: string expected"; + if (message.details != null && message.hasOwnProperty("details")) + if (!$util.isString(message.details)) + return "details: string expected"; + return null; + }; + + /** + * Creates a Description message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.Description + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.Description} Description + */ + Description.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.Description) + return object; + var message = new $root.cosmos.staking.v1beta1.Description(); + if (object.moniker != null) + message.moniker = String(object.moniker); + if (object.identity != null) + message.identity = String(object.identity); + if (object.website != null) + message.website = String(object.website); + if (object.securityContact != null) + message.securityContact = String(object.securityContact); + if (object.details != null) + message.details = String(object.details); + return message; + }; + + /** + * Creates a plain object from a Description message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.Description + * @static + * @param {cosmos.staking.v1beta1.Description} message Description + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Description.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.moniker = ""; + object.identity = ""; + object.website = ""; + object.securityContact = ""; + object.details = ""; + } + if (message.moniker != null && message.hasOwnProperty("moniker")) + object.moniker = message.moniker; + if (message.identity != null && message.hasOwnProperty("identity")) + object.identity = message.identity; + if (message.website != null && message.hasOwnProperty("website")) + object.website = message.website; + if (message.securityContact != null && message.hasOwnProperty("securityContact")) + object.securityContact = message.securityContact; + if (message.details != null && message.hasOwnProperty("details")) + object.details = message.details; + return object; + }; + + /** + * Converts this Description to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.Description + * @instance + * @returns {Object.} JSON object + */ + Description.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Description; + })(v1beta1.Description || {}); + + v1beta1.Validator = (function(Validator) { + + /** + * Properties of a Validator. + * @memberof cosmos.staking.v1beta1 + * @interface IValidator + * @property {string|null} [operatorAddress] Validator operatorAddress + * @property {google.protobuf.IAny|null} [consensusPubkey] Validator consensusPubkey + * @property {boolean|null} [jailed] Validator jailed + * @property {cosmos.staking.v1beta1.BondStatus|null} [status] Validator status + * @property {string|null} [tokens] Validator tokens + * @property {string|null} [delegatorShares] Validator delegatorShares + * @property {cosmos.staking.v1beta1.IDescription|null} [description] Validator description + * @property {number|Long|null} [unbondingHeight] Validator unbondingHeight + * @property {google.protobuf.ITimestamp|null} [unbondingTime] Validator unbondingTime + * @property {cosmos.staking.v1beta1.ICommission|null} [commission] Validator commission + * @property {string|null} [minSelfDelegation] Validator minSelfDelegation + */ + + /** + * Constructs a new Validator. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a Validator. + * @implements IValidator + * @constructor + * @param {cosmos.staking.v1beta1.IValidator=} [properties] Properties to set + */ + function Validator(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Validator operatorAddress. + * @member {string} operatorAddress + * @memberof cosmos.staking.v1beta1.Validator + * @instance + */ + Validator.prototype.operatorAddress = ""; + + /** + * Validator consensusPubkey. + * @member {google.protobuf.IAny|null|undefined} consensusPubkey + * @memberof cosmos.staking.v1beta1.Validator + * @instance + */ + Validator.prototype.consensusPubkey = null; + + /** + * Validator jailed. + * @member {boolean} jailed + * @memberof cosmos.staking.v1beta1.Validator + * @instance + */ + Validator.prototype.jailed = false; + + /** + * Validator status. + * @member {cosmos.staking.v1beta1.BondStatus} status + * @memberof cosmos.staking.v1beta1.Validator + * @instance + */ + Validator.prototype.status = 0; + + /** + * Validator tokens. + * @member {string} tokens + * @memberof cosmos.staking.v1beta1.Validator + * @instance + */ + Validator.prototype.tokens = ""; + + /** + * Validator delegatorShares. + * @member {string} delegatorShares + * @memberof cosmos.staking.v1beta1.Validator + * @instance + */ + Validator.prototype.delegatorShares = ""; + + /** + * Validator description. + * @member {cosmos.staking.v1beta1.IDescription|null|undefined} description + * @memberof cosmos.staking.v1beta1.Validator + * @instance + */ + Validator.prototype.description = null; + + /** + * Validator unbondingHeight. + * @member {number|Long} unbondingHeight + * @memberof cosmos.staking.v1beta1.Validator + * @instance + */ + Validator.prototype.unbondingHeight = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Validator unbondingTime. + * @member {google.protobuf.ITimestamp|null|undefined} unbondingTime + * @memberof cosmos.staking.v1beta1.Validator + * @instance + */ + Validator.prototype.unbondingTime = null; + + /** + * Validator commission. + * @member {cosmos.staking.v1beta1.ICommission|null|undefined} commission + * @memberof cosmos.staking.v1beta1.Validator + * @instance + */ + Validator.prototype.commission = null; + + /** + * Validator minSelfDelegation. + * @member {string} minSelfDelegation + * @memberof cosmos.staking.v1beta1.Validator + * @instance + */ + Validator.prototype.minSelfDelegation = ""; + + /** + * Creates a new Validator instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.Validator + * @static + * @param {cosmos.staking.v1beta1.IValidator=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.Validator} Validator instance + */ + Validator.create = function create(properties) { + return new Validator(properties); + }; + + /** + * Encodes the specified Validator message. Does not implicitly {@link cosmos.staking.v1beta1.Validator.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.Validator + * @static + * @param {cosmos.staking.v1beta1.IValidator} message Validator message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Validator.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.operatorAddress != null && Object.hasOwnProperty.call(message, "operatorAddress")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.operatorAddress); + if (message.consensusPubkey != null && Object.hasOwnProperty.call(message, "consensusPubkey")) + $root.google.protobuf.Any.encode(message.consensusPubkey, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.jailed != null && Object.hasOwnProperty.call(message, "jailed")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.jailed); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.status); + if (message.tokens != null && Object.hasOwnProperty.call(message, "tokens")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.tokens); + if (message.delegatorShares != null && Object.hasOwnProperty.call(message, "delegatorShares")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.delegatorShares); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + $root.cosmos.staking.v1beta1.Description.encode(message.description, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.unbondingHeight != null && Object.hasOwnProperty.call(message, "unbondingHeight")) + writer.uint32(/* id 8, wireType 0 =*/64).int64(message.unbondingHeight); + if (message.unbondingTime != null && Object.hasOwnProperty.call(message, "unbondingTime")) + $root.google.protobuf.Timestamp.encode(message.unbondingTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.commission != null && Object.hasOwnProperty.call(message, "commission")) + $root.cosmos.staking.v1beta1.Commission.encode(message.commission, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.minSelfDelegation != null && Object.hasOwnProperty.call(message, "minSelfDelegation")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.minSelfDelegation); + return writer; + }; + + /** + * Encodes the specified Validator message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.Validator.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.Validator + * @static + * @param {cosmos.staking.v1beta1.IValidator} message Validator message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Validator.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Validator message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.Validator + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.Validator} Validator + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Validator.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.Validator(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.operatorAddress = reader.string(); + break; + case 2: + message.consensusPubkey = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + case 3: + message.jailed = reader.bool(); + break; + case 4: + message.status = reader.int32(); + break; + case 5: + message.tokens = reader.string(); + break; + case 6: + message.delegatorShares = reader.string(); + break; + case 7: + message.description = $root.cosmos.staking.v1beta1.Description.decode(reader, reader.uint32()); + break; + case 8: + message.unbondingHeight = reader.int64(); + break; + case 9: + message.unbondingTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 10: + message.commission = $root.cosmos.staking.v1beta1.Commission.decode(reader, reader.uint32()); + break; + case 11: + message.minSelfDelegation = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Validator message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.Validator + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.Validator} Validator + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Validator.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Validator message. + * @function verify + * @memberof cosmos.staking.v1beta1.Validator + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Validator.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.operatorAddress != null && message.hasOwnProperty("operatorAddress")) + if (!$util.isString(message.operatorAddress)) + return "operatorAddress: string expected"; + if (message.consensusPubkey != null && message.hasOwnProperty("consensusPubkey")) { + var error = $root.google.protobuf.Any.verify(message.consensusPubkey); + if (error) + return "consensusPubkey." + error; + } + if (message.jailed != null && message.hasOwnProperty("jailed")) + if (typeof message.jailed !== "boolean") + return "jailed: boolean expected"; + if (message.status != null && message.hasOwnProperty("status")) + switch (message.status) { + default: + return "status: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.tokens != null && message.hasOwnProperty("tokens")) + if (!$util.isString(message.tokens)) + return "tokens: string expected"; + if (message.delegatorShares != null && message.hasOwnProperty("delegatorShares")) + if (!$util.isString(message.delegatorShares)) + return "delegatorShares: string expected"; + if (message.description != null && message.hasOwnProperty("description")) { + var error = $root.cosmos.staking.v1beta1.Description.verify(message.description); + if (error) + return "description." + error; + } + if (message.unbondingHeight != null && message.hasOwnProperty("unbondingHeight")) + if (!$util.isInteger(message.unbondingHeight) && !(message.unbondingHeight && $util.isInteger(message.unbondingHeight.low) && $util.isInteger(message.unbondingHeight.high))) + return "unbondingHeight: integer|Long expected"; + if (message.unbondingTime != null && message.hasOwnProperty("unbondingTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.unbondingTime); + if (error) + return "unbondingTime." + error; + } + if (message.commission != null && message.hasOwnProperty("commission")) { + var error = $root.cosmos.staking.v1beta1.Commission.verify(message.commission); + if (error) + return "commission." + error; + } + if (message.minSelfDelegation != null && message.hasOwnProperty("minSelfDelegation")) + if (!$util.isString(message.minSelfDelegation)) + return "minSelfDelegation: string expected"; + return null; + }; + + /** + * Creates a Validator message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.Validator + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.Validator} Validator + */ + Validator.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.Validator) + return object; + var message = new $root.cosmos.staking.v1beta1.Validator(); + if (object.operatorAddress != null) + message.operatorAddress = String(object.operatorAddress); + if (object.consensusPubkey != null) { + if (typeof object.consensusPubkey !== "object") + throw TypeError(".cosmos.staking.v1beta1.Validator.consensusPubkey: object expected"); + message.consensusPubkey = $root.google.protobuf.Any.fromObject(object.consensusPubkey); + } + if (object.jailed != null) + message.jailed = Boolean(object.jailed); + switch (object.status) { + case "BOND_STATUS_UNSPECIFIED": + case 0: + message.status = 0; + break; + case "BOND_STATUS_UNBONDED": + case 1: + message.status = 1; + break; + case "BOND_STATUS_UNBONDING": + case 2: + message.status = 2; + break; + case "BOND_STATUS_BONDED": + case 3: + message.status = 3; + break; + } + if (object.tokens != null) + message.tokens = String(object.tokens); + if (object.delegatorShares != null) + message.delegatorShares = String(object.delegatorShares); + if (object.description != null) { + if (typeof object.description !== "object") + throw TypeError(".cosmos.staking.v1beta1.Validator.description: object expected"); + message.description = $root.cosmos.staking.v1beta1.Description.fromObject(object.description); + } + if (object.unbondingHeight != null) + if ($util.Long) + (message.unbondingHeight = $util.Long.fromValue(object.unbondingHeight)).unsigned = false; + else if (typeof object.unbondingHeight === "string") + message.unbondingHeight = parseInt(object.unbondingHeight, 10); + else if (typeof object.unbondingHeight === "number") + message.unbondingHeight = object.unbondingHeight; + else if (typeof object.unbondingHeight === "object") + message.unbondingHeight = new $util.LongBits(object.unbondingHeight.low >>> 0, object.unbondingHeight.high >>> 0).toNumber(); + if (object.unbondingTime != null) { + if (typeof object.unbondingTime !== "object") + throw TypeError(".cosmos.staking.v1beta1.Validator.unbondingTime: object expected"); + message.unbondingTime = $root.google.protobuf.Timestamp.fromObject(object.unbondingTime); + } + if (object.commission != null) { + if (typeof object.commission !== "object") + throw TypeError(".cosmos.staking.v1beta1.Validator.commission: object expected"); + message.commission = $root.cosmos.staking.v1beta1.Commission.fromObject(object.commission); + } + if (object.minSelfDelegation != null) + message.minSelfDelegation = String(object.minSelfDelegation); + return message; + }; + + /** + * Creates a plain object from a Validator message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.Validator + * @static + * @param {cosmos.staking.v1beta1.Validator} message Validator + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Validator.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.operatorAddress = ""; + object.consensusPubkey = null; + object.jailed = false; + object.status = options.enums === String ? "BOND_STATUS_UNSPECIFIED" : 0; + object.tokens = ""; + object.delegatorShares = ""; + object.description = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.unbondingHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.unbondingHeight = options.longs === String ? "0" : 0; + object.unbondingTime = null; + object.commission = null; + object.minSelfDelegation = ""; + } + if (message.operatorAddress != null && message.hasOwnProperty("operatorAddress")) + object.operatorAddress = message.operatorAddress; + if (message.consensusPubkey != null && message.hasOwnProperty("consensusPubkey")) + object.consensusPubkey = $root.google.protobuf.Any.toObject(message.consensusPubkey, options); + if (message.jailed != null && message.hasOwnProperty("jailed")) + object.jailed = message.jailed; + if (message.status != null && message.hasOwnProperty("status")) + object.status = options.enums === String ? $root.cosmos.staking.v1beta1.BondStatus[message.status] : message.status; + if (message.tokens != null && message.hasOwnProperty("tokens")) + object.tokens = message.tokens; + if (message.delegatorShares != null && message.hasOwnProperty("delegatorShares")) + object.delegatorShares = message.delegatorShares; + if (message.description != null && message.hasOwnProperty("description")) + object.description = $root.cosmos.staking.v1beta1.Description.toObject(message.description, options); + if (message.unbondingHeight != null && message.hasOwnProperty("unbondingHeight")) + if (typeof message.unbondingHeight === "number") + object.unbondingHeight = options.longs === String ? String(message.unbondingHeight) : message.unbondingHeight; + else + object.unbondingHeight = options.longs === String ? $util.Long.prototype.toString.call(message.unbondingHeight) : options.longs === Number ? new $util.LongBits(message.unbondingHeight.low >>> 0, message.unbondingHeight.high >>> 0).toNumber() : message.unbondingHeight; + if (message.unbondingTime != null && message.hasOwnProperty("unbondingTime")) + object.unbondingTime = $root.google.protobuf.Timestamp.toObject(message.unbondingTime, options); + if (message.commission != null && message.hasOwnProperty("commission")) + object.commission = $root.cosmos.staking.v1beta1.Commission.toObject(message.commission, options); + if (message.minSelfDelegation != null && message.hasOwnProperty("minSelfDelegation")) + object.minSelfDelegation = message.minSelfDelegation; + return object; + }; + + /** + * Converts this Validator to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.Validator + * @instance + * @returns {Object.} JSON object + */ + Validator.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Validator; + })(v1beta1.Validator || {}); + + /** + * BondStatus enum. + * @name cosmos.staking.v1beta1.BondStatus + * @enum {string} + * @property {number} BOND_STATUS_UNSPECIFIED=0 BOND_STATUS_UNSPECIFIED value + * @property {number} BOND_STATUS_UNBONDED=1 BOND_STATUS_UNBONDED value + * @property {number} BOND_STATUS_UNBONDING=2 BOND_STATUS_UNBONDING value + * @property {number} BOND_STATUS_BONDED=3 BOND_STATUS_BONDED value + */ + v1beta1.BondStatus = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "BOND_STATUS_UNSPECIFIED"] = 0; + values[valuesById[1] = "BOND_STATUS_UNBONDED"] = 1; + values[valuesById[2] = "BOND_STATUS_UNBONDING"] = 2; + values[valuesById[3] = "BOND_STATUS_BONDED"] = 3; + return values; + })(); + + v1beta1.ValAddresses = (function(ValAddresses) { + + /** + * Properties of a ValAddresses. + * @memberof cosmos.staking.v1beta1 + * @interface IValAddresses + * @property {Array.|null} [addresses] ValAddresses addresses + */ + + /** + * Constructs a new ValAddresses. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a ValAddresses. + * @implements IValAddresses + * @constructor + * @param {cosmos.staking.v1beta1.IValAddresses=} [properties] Properties to set + */ + function ValAddresses(properties) { + this.addresses = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ValAddresses addresses. + * @member {Array.} addresses + * @memberof cosmos.staking.v1beta1.ValAddresses + * @instance + */ + ValAddresses.prototype.addresses = $util.emptyArray; + + /** + * Creates a new ValAddresses instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.ValAddresses + * @static + * @param {cosmos.staking.v1beta1.IValAddresses=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.ValAddresses} ValAddresses instance + */ + ValAddresses.create = function create(properties) { + return new ValAddresses(properties); + }; + + /** + * Encodes the specified ValAddresses message. Does not implicitly {@link cosmos.staking.v1beta1.ValAddresses.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.ValAddresses + * @static + * @param {cosmos.staking.v1beta1.IValAddresses} message ValAddresses message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValAddresses.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.addresses != null && message.addresses.length) + for (var i = 0; i < message.addresses.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.addresses[i]); + return writer; + }; + + /** + * Encodes the specified ValAddresses message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.ValAddresses.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.ValAddresses + * @static + * @param {cosmos.staking.v1beta1.IValAddresses} message ValAddresses message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValAddresses.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ValAddresses message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.ValAddresses + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.ValAddresses} ValAddresses + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValAddresses.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.ValAddresses(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.addresses && message.addresses.length)) + message.addresses = []; + message.addresses.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ValAddresses message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.ValAddresses + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.ValAddresses} ValAddresses + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValAddresses.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ValAddresses message. + * @function verify + * @memberof cosmos.staking.v1beta1.ValAddresses + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ValAddresses.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.addresses != null && message.hasOwnProperty("addresses")) { + if (!Array.isArray(message.addresses)) + return "addresses: array expected"; + for (var i = 0; i < message.addresses.length; ++i) + if (!$util.isString(message.addresses[i])) + return "addresses: string[] expected"; + } + return null; + }; + + /** + * Creates a ValAddresses message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.ValAddresses + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.ValAddresses} ValAddresses + */ + ValAddresses.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.ValAddresses) + return object; + var message = new $root.cosmos.staking.v1beta1.ValAddresses(); + if (object.addresses) { + if (!Array.isArray(object.addresses)) + throw TypeError(".cosmos.staking.v1beta1.ValAddresses.addresses: array expected"); + message.addresses = []; + for (var i = 0; i < object.addresses.length; ++i) + message.addresses[i] = String(object.addresses[i]); + } + return message; + }; + + /** + * Creates a plain object from a ValAddresses message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.ValAddresses + * @static + * @param {cosmos.staking.v1beta1.ValAddresses} message ValAddresses + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ValAddresses.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.addresses = []; + if (message.addresses && message.addresses.length) { + object.addresses = []; + for (var j = 0; j < message.addresses.length; ++j) + object.addresses[j] = message.addresses[j]; + } + return object; + }; + + /** + * Converts this ValAddresses to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.ValAddresses + * @instance + * @returns {Object.} JSON object + */ + ValAddresses.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ValAddresses; + })(v1beta1.ValAddresses || {}); + + v1beta1.DVPair = (function(DVPair) { + + /** + * Properties of a DVPair. + * @memberof cosmos.staking.v1beta1 + * @interface IDVPair + * @property {string|null} [delegatorAddress] DVPair delegatorAddress + * @property {string|null} [validatorAddress] DVPair validatorAddress + */ + + /** + * Constructs a new DVPair. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a DVPair. + * @implements IDVPair + * @constructor + * @param {cosmos.staking.v1beta1.IDVPair=} [properties] Properties to set + */ + function DVPair(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DVPair delegatorAddress. + * @member {string} delegatorAddress + * @memberof cosmos.staking.v1beta1.DVPair + * @instance + */ + DVPair.prototype.delegatorAddress = ""; + + /** + * DVPair validatorAddress. + * @member {string} validatorAddress + * @memberof cosmos.staking.v1beta1.DVPair + * @instance + */ + DVPair.prototype.validatorAddress = ""; + + /** + * Creates a new DVPair instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.DVPair + * @static + * @param {cosmos.staking.v1beta1.IDVPair=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.DVPair} DVPair instance + */ + DVPair.create = function create(properties) { + return new DVPair(properties); + }; + + /** + * Encodes the specified DVPair message. Does not implicitly {@link cosmos.staking.v1beta1.DVPair.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.DVPair + * @static + * @param {cosmos.staking.v1beta1.IDVPair} message DVPair message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DVPair.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.delegatorAddress != null && Object.hasOwnProperty.call(message, "delegatorAddress")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.delegatorAddress); + if (message.validatorAddress != null && Object.hasOwnProperty.call(message, "validatorAddress")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.validatorAddress); + return writer; + }; + + /** + * Encodes the specified DVPair message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.DVPair.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.DVPair + * @static + * @param {cosmos.staking.v1beta1.IDVPair} message DVPair message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DVPair.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DVPair message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.DVPair + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.DVPair} DVPair + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DVPair.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.DVPair(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.delegatorAddress = reader.string(); + break; + case 2: + message.validatorAddress = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DVPair message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.DVPair + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.DVPair} DVPair + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DVPair.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DVPair message. + * @function verify + * @memberof cosmos.staking.v1beta1.DVPair + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DVPair.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + if (!$util.isString(message.delegatorAddress)) + return "delegatorAddress: string expected"; + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + if (!$util.isString(message.validatorAddress)) + return "validatorAddress: string expected"; + return null; + }; + + /** + * Creates a DVPair message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.DVPair + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.DVPair} DVPair + */ + DVPair.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.DVPair) + return object; + var message = new $root.cosmos.staking.v1beta1.DVPair(); + if (object.delegatorAddress != null) + message.delegatorAddress = String(object.delegatorAddress); + if (object.validatorAddress != null) + message.validatorAddress = String(object.validatorAddress); + return message; + }; + + /** + * Creates a plain object from a DVPair message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.DVPair + * @static + * @param {cosmos.staking.v1beta1.DVPair} message DVPair + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DVPair.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.delegatorAddress = ""; + object.validatorAddress = ""; + } + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + object.delegatorAddress = message.delegatorAddress; + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + object.validatorAddress = message.validatorAddress; + return object; + }; + + /** + * Converts this DVPair to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.DVPair + * @instance + * @returns {Object.} JSON object + */ + DVPair.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DVPair; + })(v1beta1.DVPair || {}); + + v1beta1.DVPairs = (function(DVPairs) { + + /** + * Properties of a DVPairs. + * @memberof cosmos.staking.v1beta1 + * @interface IDVPairs + * @property {Array.|null} [pairs] DVPairs pairs + */ + + /** + * Constructs a new DVPairs. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a DVPairs. + * @implements IDVPairs + * @constructor + * @param {cosmos.staking.v1beta1.IDVPairs=} [properties] Properties to set + */ + function DVPairs(properties) { + this.pairs = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DVPairs pairs. + * @member {Array.} pairs + * @memberof cosmos.staking.v1beta1.DVPairs + * @instance + */ + DVPairs.prototype.pairs = $util.emptyArray; + + /** + * Creates a new DVPairs instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.DVPairs + * @static + * @param {cosmos.staking.v1beta1.IDVPairs=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.DVPairs} DVPairs instance + */ + DVPairs.create = function create(properties) { + return new DVPairs(properties); + }; + + /** + * Encodes the specified DVPairs message. Does not implicitly {@link cosmos.staking.v1beta1.DVPairs.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.DVPairs + * @static + * @param {cosmos.staking.v1beta1.IDVPairs} message DVPairs message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DVPairs.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pairs != null && message.pairs.length) + for (var i = 0; i < message.pairs.length; ++i) + $root.cosmos.staking.v1beta1.DVPair.encode(message.pairs[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DVPairs message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.DVPairs.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.DVPairs + * @static + * @param {cosmos.staking.v1beta1.IDVPairs} message DVPairs message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DVPairs.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DVPairs message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.DVPairs + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.DVPairs} DVPairs + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DVPairs.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.DVPairs(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.pairs && message.pairs.length)) + message.pairs = []; + message.pairs.push($root.cosmos.staking.v1beta1.DVPair.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DVPairs message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.DVPairs + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.DVPairs} DVPairs + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DVPairs.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DVPairs message. + * @function verify + * @memberof cosmos.staking.v1beta1.DVPairs + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DVPairs.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.pairs != null && message.hasOwnProperty("pairs")) { + if (!Array.isArray(message.pairs)) + return "pairs: array expected"; + for (var i = 0; i < message.pairs.length; ++i) { + var error = $root.cosmos.staking.v1beta1.DVPair.verify(message.pairs[i]); + if (error) + return "pairs." + error; + } + } + return null; + }; + + /** + * Creates a DVPairs message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.DVPairs + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.DVPairs} DVPairs + */ + DVPairs.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.DVPairs) + return object; + var message = new $root.cosmos.staking.v1beta1.DVPairs(); + if (object.pairs) { + if (!Array.isArray(object.pairs)) + throw TypeError(".cosmos.staking.v1beta1.DVPairs.pairs: array expected"); + message.pairs = []; + for (var i = 0; i < object.pairs.length; ++i) { + if (typeof object.pairs[i] !== "object") + throw TypeError(".cosmos.staking.v1beta1.DVPairs.pairs: object expected"); + message.pairs[i] = $root.cosmos.staking.v1beta1.DVPair.fromObject(object.pairs[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a DVPairs message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.DVPairs + * @static + * @param {cosmos.staking.v1beta1.DVPairs} message DVPairs + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DVPairs.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.pairs = []; + if (message.pairs && message.pairs.length) { + object.pairs = []; + for (var j = 0; j < message.pairs.length; ++j) + object.pairs[j] = $root.cosmos.staking.v1beta1.DVPair.toObject(message.pairs[j], options); + } + return object; + }; + + /** + * Converts this DVPairs to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.DVPairs + * @instance + * @returns {Object.} JSON object + */ + DVPairs.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DVPairs; + })(v1beta1.DVPairs || {}); + + v1beta1.DVVTriplet = (function(DVVTriplet) { + + /** + * Properties of a DVVTriplet. + * @memberof cosmos.staking.v1beta1 + * @interface IDVVTriplet + * @property {string|null} [delegatorAddress] DVVTriplet delegatorAddress + * @property {string|null} [validatorSrcAddress] DVVTriplet validatorSrcAddress + * @property {string|null} [validatorDstAddress] DVVTriplet validatorDstAddress + */ + + /** + * Constructs a new DVVTriplet. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a DVVTriplet. + * @implements IDVVTriplet + * @constructor + * @param {cosmos.staking.v1beta1.IDVVTriplet=} [properties] Properties to set + */ + function DVVTriplet(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DVVTriplet delegatorAddress. + * @member {string} delegatorAddress + * @memberof cosmos.staking.v1beta1.DVVTriplet + * @instance + */ + DVVTriplet.prototype.delegatorAddress = ""; + + /** + * DVVTriplet validatorSrcAddress. + * @member {string} validatorSrcAddress + * @memberof cosmos.staking.v1beta1.DVVTriplet + * @instance + */ + DVVTriplet.prototype.validatorSrcAddress = ""; + + /** + * DVVTriplet validatorDstAddress. + * @member {string} validatorDstAddress + * @memberof cosmos.staking.v1beta1.DVVTriplet + * @instance + */ + DVVTriplet.prototype.validatorDstAddress = ""; + + /** + * Creates a new DVVTriplet instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.DVVTriplet + * @static + * @param {cosmos.staking.v1beta1.IDVVTriplet=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.DVVTriplet} DVVTriplet instance + */ + DVVTriplet.create = function create(properties) { + return new DVVTriplet(properties); + }; + + /** + * Encodes the specified DVVTriplet message. Does not implicitly {@link cosmos.staking.v1beta1.DVVTriplet.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.DVVTriplet + * @static + * @param {cosmos.staking.v1beta1.IDVVTriplet} message DVVTriplet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DVVTriplet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.delegatorAddress != null && Object.hasOwnProperty.call(message, "delegatorAddress")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.delegatorAddress); + if (message.validatorSrcAddress != null && Object.hasOwnProperty.call(message, "validatorSrcAddress")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.validatorSrcAddress); + if (message.validatorDstAddress != null && Object.hasOwnProperty.call(message, "validatorDstAddress")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.validatorDstAddress); + return writer; + }; + + /** + * Encodes the specified DVVTriplet message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.DVVTriplet.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.DVVTriplet + * @static + * @param {cosmos.staking.v1beta1.IDVVTriplet} message DVVTriplet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DVVTriplet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DVVTriplet message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.DVVTriplet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.DVVTriplet} DVVTriplet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DVVTriplet.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.DVVTriplet(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.delegatorAddress = reader.string(); + break; + case 2: + message.validatorSrcAddress = reader.string(); + break; + case 3: + message.validatorDstAddress = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DVVTriplet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.DVVTriplet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.DVVTriplet} DVVTriplet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DVVTriplet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DVVTriplet message. + * @function verify + * @memberof cosmos.staking.v1beta1.DVVTriplet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DVVTriplet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + if (!$util.isString(message.delegatorAddress)) + return "delegatorAddress: string expected"; + if (message.validatorSrcAddress != null && message.hasOwnProperty("validatorSrcAddress")) + if (!$util.isString(message.validatorSrcAddress)) + return "validatorSrcAddress: string expected"; + if (message.validatorDstAddress != null && message.hasOwnProperty("validatorDstAddress")) + if (!$util.isString(message.validatorDstAddress)) + return "validatorDstAddress: string expected"; + return null; + }; + + /** + * Creates a DVVTriplet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.DVVTriplet + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.DVVTriplet} DVVTriplet + */ + DVVTriplet.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.DVVTriplet) + return object; + var message = new $root.cosmos.staking.v1beta1.DVVTriplet(); + if (object.delegatorAddress != null) + message.delegatorAddress = String(object.delegatorAddress); + if (object.validatorSrcAddress != null) + message.validatorSrcAddress = String(object.validatorSrcAddress); + if (object.validatorDstAddress != null) + message.validatorDstAddress = String(object.validatorDstAddress); + return message; + }; + + /** + * Creates a plain object from a DVVTriplet message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.DVVTriplet + * @static + * @param {cosmos.staking.v1beta1.DVVTriplet} message DVVTriplet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DVVTriplet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.delegatorAddress = ""; + object.validatorSrcAddress = ""; + object.validatorDstAddress = ""; + } + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + object.delegatorAddress = message.delegatorAddress; + if (message.validatorSrcAddress != null && message.hasOwnProperty("validatorSrcAddress")) + object.validatorSrcAddress = message.validatorSrcAddress; + if (message.validatorDstAddress != null && message.hasOwnProperty("validatorDstAddress")) + object.validatorDstAddress = message.validatorDstAddress; + return object; + }; + + /** + * Converts this DVVTriplet to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.DVVTriplet + * @instance + * @returns {Object.} JSON object + */ + DVVTriplet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DVVTriplet; + })(v1beta1.DVVTriplet || {}); + + v1beta1.DVVTriplets = (function(DVVTriplets) { + + /** + * Properties of a DVVTriplets. + * @memberof cosmos.staking.v1beta1 + * @interface IDVVTriplets + * @property {Array.|null} [triplets] DVVTriplets triplets + */ + + /** + * Constructs a new DVVTriplets. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a DVVTriplets. + * @implements IDVVTriplets + * @constructor + * @param {cosmos.staking.v1beta1.IDVVTriplets=} [properties] Properties to set + */ + function DVVTriplets(properties) { + this.triplets = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DVVTriplets triplets. + * @member {Array.} triplets + * @memberof cosmos.staking.v1beta1.DVVTriplets + * @instance + */ + DVVTriplets.prototype.triplets = $util.emptyArray; + + /** + * Creates a new DVVTriplets instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.DVVTriplets + * @static + * @param {cosmos.staking.v1beta1.IDVVTriplets=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.DVVTriplets} DVVTriplets instance + */ + DVVTriplets.create = function create(properties) { + return new DVVTriplets(properties); + }; + + /** + * Encodes the specified DVVTriplets message. Does not implicitly {@link cosmos.staking.v1beta1.DVVTriplets.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.DVVTriplets + * @static + * @param {cosmos.staking.v1beta1.IDVVTriplets} message DVVTriplets message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DVVTriplets.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.triplets != null && message.triplets.length) + for (var i = 0; i < message.triplets.length; ++i) + $root.cosmos.staking.v1beta1.DVVTriplet.encode(message.triplets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DVVTriplets message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.DVVTriplets.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.DVVTriplets + * @static + * @param {cosmos.staking.v1beta1.IDVVTriplets} message DVVTriplets message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DVVTriplets.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DVVTriplets message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.DVVTriplets + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.DVVTriplets} DVVTriplets + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DVVTriplets.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.DVVTriplets(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.triplets && message.triplets.length)) + message.triplets = []; + message.triplets.push($root.cosmos.staking.v1beta1.DVVTriplet.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DVVTriplets message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.DVVTriplets + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.DVVTriplets} DVVTriplets + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DVVTriplets.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DVVTriplets message. + * @function verify + * @memberof cosmos.staking.v1beta1.DVVTriplets + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DVVTriplets.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.triplets != null && message.hasOwnProperty("triplets")) { + if (!Array.isArray(message.triplets)) + return "triplets: array expected"; + for (var i = 0; i < message.triplets.length; ++i) { + var error = $root.cosmos.staking.v1beta1.DVVTriplet.verify(message.triplets[i]); + if (error) + return "triplets." + error; + } + } + return null; + }; + + /** + * Creates a DVVTriplets message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.DVVTriplets + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.DVVTriplets} DVVTriplets + */ + DVVTriplets.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.DVVTriplets) + return object; + var message = new $root.cosmos.staking.v1beta1.DVVTriplets(); + if (object.triplets) { + if (!Array.isArray(object.triplets)) + throw TypeError(".cosmos.staking.v1beta1.DVVTriplets.triplets: array expected"); + message.triplets = []; + for (var i = 0; i < object.triplets.length; ++i) { + if (typeof object.triplets[i] !== "object") + throw TypeError(".cosmos.staking.v1beta1.DVVTriplets.triplets: object expected"); + message.triplets[i] = $root.cosmos.staking.v1beta1.DVVTriplet.fromObject(object.triplets[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a DVVTriplets message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.DVVTriplets + * @static + * @param {cosmos.staking.v1beta1.DVVTriplets} message DVVTriplets + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DVVTriplets.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.triplets = []; + if (message.triplets && message.triplets.length) { + object.triplets = []; + for (var j = 0; j < message.triplets.length; ++j) + object.triplets[j] = $root.cosmos.staking.v1beta1.DVVTriplet.toObject(message.triplets[j], options); + } + return object; + }; + + /** + * Converts this DVVTriplets to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.DVVTriplets + * @instance + * @returns {Object.} JSON object + */ + DVVTriplets.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DVVTriplets; + })(v1beta1.DVVTriplets || {}); + + v1beta1.Delegation = (function(Delegation) { + + /** + * Properties of a Delegation. + * @memberof cosmos.staking.v1beta1 + * @interface IDelegation + * @property {string|null} [delegatorAddress] Delegation delegatorAddress + * @property {string|null} [validatorAddress] Delegation validatorAddress + * @property {string|null} [shares] Delegation shares + */ + + /** + * Constructs a new Delegation. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a Delegation. + * @implements IDelegation + * @constructor + * @param {cosmos.staking.v1beta1.IDelegation=} [properties] Properties to set + */ + function Delegation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Delegation delegatorAddress. + * @member {string} delegatorAddress + * @memberof cosmos.staking.v1beta1.Delegation + * @instance + */ + Delegation.prototype.delegatorAddress = ""; + + /** + * Delegation validatorAddress. + * @member {string} validatorAddress + * @memberof cosmos.staking.v1beta1.Delegation + * @instance + */ + Delegation.prototype.validatorAddress = ""; + + /** + * Delegation shares. + * @member {string} shares + * @memberof cosmos.staking.v1beta1.Delegation + * @instance + */ + Delegation.prototype.shares = ""; + + /** + * Creates a new Delegation instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.Delegation + * @static + * @param {cosmos.staking.v1beta1.IDelegation=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.Delegation} Delegation instance + */ + Delegation.create = function create(properties) { + return new Delegation(properties); + }; + + /** + * Encodes the specified Delegation message. Does not implicitly {@link cosmos.staking.v1beta1.Delegation.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.Delegation + * @static + * @param {cosmos.staking.v1beta1.IDelegation} message Delegation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Delegation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.delegatorAddress != null && Object.hasOwnProperty.call(message, "delegatorAddress")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.delegatorAddress); + if (message.validatorAddress != null && Object.hasOwnProperty.call(message, "validatorAddress")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.validatorAddress); + if (message.shares != null && Object.hasOwnProperty.call(message, "shares")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.shares); + return writer; + }; + + /** + * Encodes the specified Delegation message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.Delegation.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.Delegation + * @static + * @param {cosmos.staking.v1beta1.IDelegation} message Delegation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Delegation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Delegation message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.Delegation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.Delegation} Delegation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Delegation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.Delegation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.delegatorAddress = reader.string(); + break; + case 2: + message.validatorAddress = reader.string(); + break; + case 3: + message.shares = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Delegation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.Delegation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.Delegation} Delegation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Delegation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Delegation message. + * @function verify + * @memberof cosmos.staking.v1beta1.Delegation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Delegation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + if (!$util.isString(message.delegatorAddress)) + return "delegatorAddress: string expected"; + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + if (!$util.isString(message.validatorAddress)) + return "validatorAddress: string expected"; + if (message.shares != null && message.hasOwnProperty("shares")) + if (!$util.isString(message.shares)) + return "shares: string expected"; + return null; + }; + + /** + * Creates a Delegation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.Delegation + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.Delegation} Delegation + */ + Delegation.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.Delegation) + return object; + var message = new $root.cosmos.staking.v1beta1.Delegation(); + if (object.delegatorAddress != null) + message.delegatorAddress = String(object.delegatorAddress); + if (object.validatorAddress != null) + message.validatorAddress = String(object.validatorAddress); + if (object.shares != null) + message.shares = String(object.shares); + return message; + }; + + /** + * Creates a plain object from a Delegation message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.Delegation + * @static + * @param {cosmos.staking.v1beta1.Delegation} message Delegation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Delegation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.delegatorAddress = ""; + object.validatorAddress = ""; + object.shares = ""; + } + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + object.delegatorAddress = message.delegatorAddress; + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + object.validatorAddress = message.validatorAddress; + if (message.shares != null && message.hasOwnProperty("shares")) + object.shares = message.shares; + return object; + }; + + /** + * Converts this Delegation to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.Delegation + * @instance + * @returns {Object.} JSON object + */ + Delegation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Delegation; + })(v1beta1.Delegation || {}); + + v1beta1.UnbondingDelegation = (function(UnbondingDelegation) { + + /** + * Properties of an UnbondingDelegation. + * @memberof cosmos.staking.v1beta1 + * @interface IUnbondingDelegation + * @property {string|null} [delegatorAddress] UnbondingDelegation delegatorAddress + * @property {string|null} [validatorAddress] UnbondingDelegation validatorAddress + * @property {Array.|null} [entries] UnbondingDelegation entries + */ + + /** + * Constructs a new UnbondingDelegation. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents an UnbondingDelegation. + * @implements IUnbondingDelegation + * @constructor + * @param {cosmos.staking.v1beta1.IUnbondingDelegation=} [properties] Properties to set + */ + function UnbondingDelegation(properties) { + this.entries = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UnbondingDelegation delegatorAddress. + * @member {string} delegatorAddress + * @memberof cosmos.staking.v1beta1.UnbondingDelegation + * @instance + */ + UnbondingDelegation.prototype.delegatorAddress = ""; + + /** + * UnbondingDelegation validatorAddress. + * @member {string} validatorAddress + * @memberof cosmos.staking.v1beta1.UnbondingDelegation + * @instance + */ + UnbondingDelegation.prototype.validatorAddress = ""; + + /** + * UnbondingDelegation entries. + * @member {Array.} entries + * @memberof cosmos.staking.v1beta1.UnbondingDelegation + * @instance + */ + UnbondingDelegation.prototype.entries = $util.emptyArray; + + /** + * Creates a new UnbondingDelegation instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.UnbondingDelegation + * @static + * @param {cosmos.staking.v1beta1.IUnbondingDelegation=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.UnbondingDelegation} UnbondingDelegation instance + */ + UnbondingDelegation.create = function create(properties) { + return new UnbondingDelegation(properties); + }; + + /** + * Encodes the specified UnbondingDelegation message. Does not implicitly {@link cosmos.staking.v1beta1.UnbondingDelegation.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.UnbondingDelegation + * @static + * @param {cosmos.staking.v1beta1.IUnbondingDelegation} message UnbondingDelegation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UnbondingDelegation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.delegatorAddress != null && Object.hasOwnProperty.call(message, "delegatorAddress")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.delegatorAddress); + if (message.validatorAddress != null && Object.hasOwnProperty.call(message, "validatorAddress")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.validatorAddress); + if (message.entries != null && message.entries.length) + for (var i = 0; i < message.entries.length; ++i) + $root.cosmos.staking.v1beta1.UnbondingDelegationEntry.encode(message.entries[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UnbondingDelegation message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.UnbondingDelegation.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.UnbondingDelegation + * @static + * @param {cosmos.staking.v1beta1.IUnbondingDelegation} message UnbondingDelegation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UnbondingDelegation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UnbondingDelegation message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.UnbondingDelegation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.UnbondingDelegation} UnbondingDelegation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UnbondingDelegation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.UnbondingDelegation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.delegatorAddress = reader.string(); + break; + case 2: + message.validatorAddress = reader.string(); + break; + case 3: + if (!(message.entries && message.entries.length)) + message.entries = []; + message.entries.push($root.cosmos.staking.v1beta1.UnbondingDelegationEntry.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UnbondingDelegation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.UnbondingDelegation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.UnbondingDelegation} UnbondingDelegation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UnbondingDelegation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UnbondingDelegation message. + * @function verify + * @memberof cosmos.staking.v1beta1.UnbondingDelegation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UnbondingDelegation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + if (!$util.isString(message.delegatorAddress)) + return "delegatorAddress: string expected"; + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + if (!$util.isString(message.validatorAddress)) + return "validatorAddress: string expected"; + if (message.entries != null && message.hasOwnProperty("entries")) { + if (!Array.isArray(message.entries)) + return "entries: array expected"; + for (var i = 0; i < message.entries.length; ++i) { + var error = $root.cosmos.staking.v1beta1.UnbondingDelegationEntry.verify(message.entries[i]); + if (error) + return "entries." + error; + } + } + return null; + }; + + /** + * Creates an UnbondingDelegation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.UnbondingDelegation + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.UnbondingDelegation} UnbondingDelegation + */ + UnbondingDelegation.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.UnbondingDelegation) + return object; + var message = new $root.cosmos.staking.v1beta1.UnbondingDelegation(); + if (object.delegatorAddress != null) + message.delegatorAddress = String(object.delegatorAddress); + if (object.validatorAddress != null) + message.validatorAddress = String(object.validatorAddress); + if (object.entries) { + if (!Array.isArray(object.entries)) + throw TypeError(".cosmos.staking.v1beta1.UnbondingDelegation.entries: array expected"); + message.entries = []; + for (var i = 0; i < object.entries.length; ++i) { + if (typeof object.entries[i] !== "object") + throw TypeError(".cosmos.staking.v1beta1.UnbondingDelegation.entries: object expected"); + message.entries[i] = $root.cosmos.staking.v1beta1.UnbondingDelegationEntry.fromObject(object.entries[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an UnbondingDelegation message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.UnbondingDelegation + * @static + * @param {cosmos.staking.v1beta1.UnbondingDelegation} message UnbondingDelegation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UnbondingDelegation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.entries = []; + if (options.defaults) { + object.delegatorAddress = ""; + object.validatorAddress = ""; + } + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + object.delegatorAddress = message.delegatorAddress; + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + object.validatorAddress = message.validatorAddress; + if (message.entries && message.entries.length) { + object.entries = []; + for (var j = 0; j < message.entries.length; ++j) + object.entries[j] = $root.cosmos.staking.v1beta1.UnbondingDelegationEntry.toObject(message.entries[j], options); + } + return object; + }; + + /** + * Converts this UnbondingDelegation to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.UnbondingDelegation + * @instance + * @returns {Object.} JSON object + */ + UnbondingDelegation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UnbondingDelegation; + })(v1beta1.UnbondingDelegation || {}); + + v1beta1.UnbondingDelegationEntry = (function(UnbondingDelegationEntry) { + + /** + * Properties of an UnbondingDelegationEntry. + * @memberof cosmos.staking.v1beta1 + * @interface IUnbondingDelegationEntry + * @property {number|Long|null} [creationHeight] UnbondingDelegationEntry creationHeight + * @property {google.protobuf.ITimestamp|null} [completionTime] UnbondingDelegationEntry completionTime + * @property {string|null} [initialBalance] UnbondingDelegationEntry initialBalance + * @property {string|null} [balance] UnbondingDelegationEntry balance + */ + + /** + * Constructs a new UnbondingDelegationEntry. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents an UnbondingDelegationEntry. + * @implements IUnbondingDelegationEntry + * @constructor + * @param {cosmos.staking.v1beta1.IUnbondingDelegationEntry=} [properties] Properties to set + */ + function UnbondingDelegationEntry(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UnbondingDelegationEntry creationHeight. + * @member {number|Long} creationHeight + * @memberof cosmos.staking.v1beta1.UnbondingDelegationEntry + * @instance + */ + UnbondingDelegationEntry.prototype.creationHeight = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * UnbondingDelegationEntry completionTime. + * @member {google.protobuf.ITimestamp|null|undefined} completionTime + * @memberof cosmos.staking.v1beta1.UnbondingDelegationEntry + * @instance + */ + UnbondingDelegationEntry.prototype.completionTime = null; + + /** + * UnbondingDelegationEntry initialBalance. + * @member {string} initialBalance + * @memberof cosmos.staking.v1beta1.UnbondingDelegationEntry + * @instance + */ + UnbondingDelegationEntry.prototype.initialBalance = ""; + + /** + * UnbondingDelegationEntry balance. + * @member {string} balance + * @memberof cosmos.staking.v1beta1.UnbondingDelegationEntry + * @instance + */ + UnbondingDelegationEntry.prototype.balance = ""; + + /** + * Creates a new UnbondingDelegationEntry instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.UnbondingDelegationEntry + * @static + * @param {cosmos.staking.v1beta1.IUnbondingDelegationEntry=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.UnbondingDelegationEntry} UnbondingDelegationEntry instance + */ + UnbondingDelegationEntry.create = function create(properties) { + return new UnbondingDelegationEntry(properties); + }; + + /** + * Encodes the specified UnbondingDelegationEntry message. Does not implicitly {@link cosmos.staking.v1beta1.UnbondingDelegationEntry.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.UnbondingDelegationEntry + * @static + * @param {cosmos.staking.v1beta1.IUnbondingDelegationEntry} message UnbondingDelegationEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UnbondingDelegationEntry.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.creationHeight != null && Object.hasOwnProperty.call(message, "creationHeight")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.creationHeight); + if (message.completionTime != null && Object.hasOwnProperty.call(message, "completionTime")) + $root.google.protobuf.Timestamp.encode(message.completionTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.initialBalance != null && Object.hasOwnProperty.call(message, "initialBalance")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.initialBalance); + if (message.balance != null && Object.hasOwnProperty.call(message, "balance")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.balance); + return writer; + }; + + /** + * Encodes the specified UnbondingDelegationEntry message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.UnbondingDelegationEntry.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.UnbondingDelegationEntry + * @static + * @param {cosmos.staking.v1beta1.IUnbondingDelegationEntry} message UnbondingDelegationEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UnbondingDelegationEntry.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UnbondingDelegationEntry message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.UnbondingDelegationEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.UnbondingDelegationEntry} UnbondingDelegationEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UnbondingDelegationEntry.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.UnbondingDelegationEntry(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.creationHeight = reader.int64(); + break; + case 2: + message.completionTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 3: + message.initialBalance = reader.string(); + break; + case 4: + message.balance = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UnbondingDelegationEntry message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.UnbondingDelegationEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.UnbondingDelegationEntry} UnbondingDelegationEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UnbondingDelegationEntry.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UnbondingDelegationEntry message. + * @function verify + * @memberof cosmos.staking.v1beta1.UnbondingDelegationEntry + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UnbondingDelegationEntry.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.creationHeight != null && message.hasOwnProperty("creationHeight")) + if (!$util.isInteger(message.creationHeight) && !(message.creationHeight && $util.isInteger(message.creationHeight.low) && $util.isInteger(message.creationHeight.high))) + return "creationHeight: integer|Long expected"; + if (message.completionTime != null && message.hasOwnProperty("completionTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.completionTime); + if (error) + return "completionTime." + error; + } + if (message.initialBalance != null && message.hasOwnProperty("initialBalance")) + if (!$util.isString(message.initialBalance)) + return "initialBalance: string expected"; + if (message.balance != null && message.hasOwnProperty("balance")) + if (!$util.isString(message.balance)) + return "balance: string expected"; + return null; + }; + + /** + * Creates an UnbondingDelegationEntry message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.UnbondingDelegationEntry + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.UnbondingDelegationEntry} UnbondingDelegationEntry + */ + UnbondingDelegationEntry.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.UnbondingDelegationEntry) + return object; + var message = new $root.cosmos.staking.v1beta1.UnbondingDelegationEntry(); + if (object.creationHeight != null) + if ($util.Long) + (message.creationHeight = $util.Long.fromValue(object.creationHeight)).unsigned = false; + else if (typeof object.creationHeight === "string") + message.creationHeight = parseInt(object.creationHeight, 10); + else if (typeof object.creationHeight === "number") + message.creationHeight = object.creationHeight; + else if (typeof object.creationHeight === "object") + message.creationHeight = new $util.LongBits(object.creationHeight.low >>> 0, object.creationHeight.high >>> 0).toNumber(); + if (object.completionTime != null) { + if (typeof object.completionTime !== "object") + throw TypeError(".cosmos.staking.v1beta1.UnbondingDelegationEntry.completionTime: object expected"); + message.completionTime = $root.google.protobuf.Timestamp.fromObject(object.completionTime); + } + if (object.initialBalance != null) + message.initialBalance = String(object.initialBalance); + if (object.balance != null) + message.balance = String(object.balance); + return message; + }; + + /** + * Creates a plain object from an UnbondingDelegationEntry message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.UnbondingDelegationEntry + * @static + * @param {cosmos.staking.v1beta1.UnbondingDelegationEntry} message UnbondingDelegationEntry + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UnbondingDelegationEntry.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.creationHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.creationHeight = options.longs === String ? "0" : 0; + object.completionTime = null; + object.initialBalance = ""; + object.balance = ""; + } + if (message.creationHeight != null && message.hasOwnProperty("creationHeight")) + if (typeof message.creationHeight === "number") + object.creationHeight = options.longs === String ? String(message.creationHeight) : message.creationHeight; + else + object.creationHeight = options.longs === String ? $util.Long.prototype.toString.call(message.creationHeight) : options.longs === Number ? new $util.LongBits(message.creationHeight.low >>> 0, message.creationHeight.high >>> 0).toNumber() : message.creationHeight; + if (message.completionTime != null && message.hasOwnProperty("completionTime")) + object.completionTime = $root.google.protobuf.Timestamp.toObject(message.completionTime, options); + if (message.initialBalance != null && message.hasOwnProperty("initialBalance")) + object.initialBalance = message.initialBalance; + if (message.balance != null && message.hasOwnProperty("balance")) + object.balance = message.balance; + return object; + }; + + /** + * Converts this UnbondingDelegationEntry to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.UnbondingDelegationEntry + * @instance + * @returns {Object.} JSON object + */ + UnbondingDelegationEntry.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UnbondingDelegationEntry; + })(v1beta1.UnbondingDelegationEntry || {}); + + v1beta1.RedelegationEntry = (function(RedelegationEntry) { + + /** + * Properties of a RedelegationEntry. + * @memberof cosmos.staking.v1beta1 + * @interface IRedelegationEntry + * @property {number|Long|null} [creationHeight] RedelegationEntry creationHeight + * @property {google.protobuf.ITimestamp|null} [completionTime] RedelegationEntry completionTime + * @property {string|null} [initialBalance] RedelegationEntry initialBalance + * @property {string|null} [sharesDst] RedelegationEntry sharesDst + */ + + /** + * Constructs a new RedelegationEntry. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a RedelegationEntry. + * @implements IRedelegationEntry + * @constructor + * @param {cosmos.staking.v1beta1.IRedelegationEntry=} [properties] Properties to set + */ + function RedelegationEntry(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RedelegationEntry creationHeight. + * @member {number|Long} creationHeight + * @memberof cosmos.staking.v1beta1.RedelegationEntry + * @instance + */ + RedelegationEntry.prototype.creationHeight = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * RedelegationEntry completionTime. + * @member {google.protobuf.ITimestamp|null|undefined} completionTime + * @memberof cosmos.staking.v1beta1.RedelegationEntry + * @instance + */ + RedelegationEntry.prototype.completionTime = null; + + /** + * RedelegationEntry initialBalance. + * @member {string} initialBalance + * @memberof cosmos.staking.v1beta1.RedelegationEntry + * @instance + */ + RedelegationEntry.prototype.initialBalance = ""; + + /** + * RedelegationEntry sharesDst. + * @member {string} sharesDst + * @memberof cosmos.staking.v1beta1.RedelegationEntry + * @instance + */ + RedelegationEntry.prototype.sharesDst = ""; + + /** + * Creates a new RedelegationEntry instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.RedelegationEntry + * @static + * @param {cosmos.staking.v1beta1.IRedelegationEntry=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.RedelegationEntry} RedelegationEntry instance + */ + RedelegationEntry.create = function create(properties) { + return new RedelegationEntry(properties); + }; + + /** + * Encodes the specified RedelegationEntry message. Does not implicitly {@link cosmos.staking.v1beta1.RedelegationEntry.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.RedelegationEntry + * @static + * @param {cosmos.staking.v1beta1.IRedelegationEntry} message RedelegationEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RedelegationEntry.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.creationHeight != null && Object.hasOwnProperty.call(message, "creationHeight")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.creationHeight); + if (message.completionTime != null && Object.hasOwnProperty.call(message, "completionTime")) + $root.google.protobuf.Timestamp.encode(message.completionTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.initialBalance != null && Object.hasOwnProperty.call(message, "initialBalance")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.initialBalance); + if (message.sharesDst != null && Object.hasOwnProperty.call(message, "sharesDst")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.sharesDst); + return writer; + }; + + /** + * Encodes the specified RedelegationEntry message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.RedelegationEntry.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.RedelegationEntry + * @static + * @param {cosmos.staking.v1beta1.IRedelegationEntry} message RedelegationEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RedelegationEntry.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RedelegationEntry message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.RedelegationEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.RedelegationEntry} RedelegationEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RedelegationEntry.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.RedelegationEntry(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.creationHeight = reader.int64(); + break; + case 2: + message.completionTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 3: + message.initialBalance = reader.string(); + break; + case 4: + message.sharesDst = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RedelegationEntry message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.RedelegationEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.RedelegationEntry} RedelegationEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RedelegationEntry.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RedelegationEntry message. + * @function verify + * @memberof cosmos.staking.v1beta1.RedelegationEntry + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RedelegationEntry.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.creationHeight != null && message.hasOwnProperty("creationHeight")) + if (!$util.isInteger(message.creationHeight) && !(message.creationHeight && $util.isInteger(message.creationHeight.low) && $util.isInteger(message.creationHeight.high))) + return "creationHeight: integer|Long expected"; + if (message.completionTime != null && message.hasOwnProperty("completionTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.completionTime); + if (error) + return "completionTime." + error; + } + if (message.initialBalance != null && message.hasOwnProperty("initialBalance")) + if (!$util.isString(message.initialBalance)) + return "initialBalance: string expected"; + if (message.sharesDst != null && message.hasOwnProperty("sharesDst")) + if (!$util.isString(message.sharesDst)) + return "sharesDst: string expected"; + return null; + }; + + /** + * Creates a RedelegationEntry message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.RedelegationEntry + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.RedelegationEntry} RedelegationEntry + */ + RedelegationEntry.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.RedelegationEntry) + return object; + var message = new $root.cosmos.staking.v1beta1.RedelegationEntry(); + if (object.creationHeight != null) + if ($util.Long) + (message.creationHeight = $util.Long.fromValue(object.creationHeight)).unsigned = false; + else if (typeof object.creationHeight === "string") + message.creationHeight = parseInt(object.creationHeight, 10); + else if (typeof object.creationHeight === "number") + message.creationHeight = object.creationHeight; + else if (typeof object.creationHeight === "object") + message.creationHeight = new $util.LongBits(object.creationHeight.low >>> 0, object.creationHeight.high >>> 0).toNumber(); + if (object.completionTime != null) { + if (typeof object.completionTime !== "object") + throw TypeError(".cosmos.staking.v1beta1.RedelegationEntry.completionTime: object expected"); + message.completionTime = $root.google.protobuf.Timestamp.fromObject(object.completionTime); + } + if (object.initialBalance != null) + message.initialBalance = String(object.initialBalance); + if (object.sharesDst != null) + message.sharesDst = String(object.sharesDst); + return message; + }; + + /** + * Creates a plain object from a RedelegationEntry message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.RedelegationEntry + * @static + * @param {cosmos.staking.v1beta1.RedelegationEntry} message RedelegationEntry + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RedelegationEntry.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.creationHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.creationHeight = options.longs === String ? "0" : 0; + object.completionTime = null; + object.initialBalance = ""; + object.sharesDst = ""; + } + if (message.creationHeight != null && message.hasOwnProperty("creationHeight")) + if (typeof message.creationHeight === "number") + object.creationHeight = options.longs === String ? String(message.creationHeight) : message.creationHeight; + else + object.creationHeight = options.longs === String ? $util.Long.prototype.toString.call(message.creationHeight) : options.longs === Number ? new $util.LongBits(message.creationHeight.low >>> 0, message.creationHeight.high >>> 0).toNumber() : message.creationHeight; + if (message.completionTime != null && message.hasOwnProperty("completionTime")) + object.completionTime = $root.google.protobuf.Timestamp.toObject(message.completionTime, options); + if (message.initialBalance != null && message.hasOwnProperty("initialBalance")) + object.initialBalance = message.initialBalance; + if (message.sharesDst != null && message.hasOwnProperty("sharesDst")) + object.sharesDst = message.sharesDst; + return object; + }; + + /** + * Converts this RedelegationEntry to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.RedelegationEntry + * @instance + * @returns {Object.} JSON object + */ + RedelegationEntry.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RedelegationEntry; + })(v1beta1.RedelegationEntry || {}); + + v1beta1.Redelegation = (function(Redelegation) { + + /** + * Properties of a Redelegation. + * @memberof cosmos.staking.v1beta1 + * @interface IRedelegation + * @property {string|null} [delegatorAddress] Redelegation delegatorAddress + * @property {string|null} [validatorSrcAddress] Redelegation validatorSrcAddress + * @property {string|null} [validatorDstAddress] Redelegation validatorDstAddress + * @property {Array.|null} [entries] Redelegation entries + */ + + /** + * Constructs a new Redelegation. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a Redelegation. + * @implements IRedelegation + * @constructor + * @param {cosmos.staking.v1beta1.IRedelegation=} [properties] Properties to set + */ + function Redelegation(properties) { + this.entries = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Redelegation delegatorAddress. + * @member {string} delegatorAddress + * @memberof cosmos.staking.v1beta1.Redelegation + * @instance + */ + Redelegation.prototype.delegatorAddress = ""; + + /** + * Redelegation validatorSrcAddress. + * @member {string} validatorSrcAddress + * @memberof cosmos.staking.v1beta1.Redelegation + * @instance + */ + Redelegation.prototype.validatorSrcAddress = ""; + + /** + * Redelegation validatorDstAddress. + * @member {string} validatorDstAddress + * @memberof cosmos.staking.v1beta1.Redelegation + * @instance + */ + Redelegation.prototype.validatorDstAddress = ""; + + /** + * Redelegation entries. + * @member {Array.} entries + * @memberof cosmos.staking.v1beta1.Redelegation + * @instance + */ + Redelegation.prototype.entries = $util.emptyArray; + + /** + * Creates a new Redelegation instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.Redelegation + * @static + * @param {cosmos.staking.v1beta1.IRedelegation=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.Redelegation} Redelegation instance + */ + Redelegation.create = function create(properties) { + return new Redelegation(properties); + }; + + /** + * Encodes the specified Redelegation message. Does not implicitly {@link cosmos.staking.v1beta1.Redelegation.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.Redelegation + * @static + * @param {cosmos.staking.v1beta1.IRedelegation} message Redelegation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Redelegation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.delegatorAddress != null && Object.hasOwnProperty.call(message, "delegatorAddress")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.delegatorAddress); + if (message.validatorSrcAddress != null && Object.hasOwnProperty.call(message, "validatorSrcAddress")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.validatorSrcAddress); + if (message.validatorDstAddress != null && Object.hasOwnProperty.call(message, "validatorDstAddress")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.validatorDstAddress); + if (message.entries != null && message.entries.length) + for (var i = 0; i < message.entries.length; ++i) + $root.cosmos.staking.v1beta1.RedelegationEntry.encode(message.entries[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Redelegation message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.Redelegation.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.Redelegation + * @static + * @param {cosmos.staking.v1beta1.IRedelegation} message Redelegation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Redelegation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Redelegation message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.Redelegation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.Redelegation} Redelegation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Redelegation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.Redelegation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.delegatorAddress = reader.string(); + break; + case 2: + message.validatorSrcAddress = reader.string(); + break; + case 3: + message.validatorDstAddress = reader.string(); + break; + case 4: + if (!(message.entries && message.entries.length)) + message.entries = []; + message.entries.push($root.cosmos.staking.v1beta1.RedelegationEntry.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Redelegation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.Redelegation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.Redelegation} Redelegation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Redelegation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Redelegation message. + * @function verify + * @memberof cosmos.staking.v1beta1.Redelegation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Redelegation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + if (!$util.isString(message.delegatorAddress)) + return "delegatorAddress: string expected"; + if (message.validatorSrcAddress != null && message.hasOwnProperty("validatorSrcAddress")) + if (!$util.isString(message.validatorSrcAddress)) + return "validatorSrcAddress: string expected"; + if (message.validatorDstAddress != null && message.hasOwnProperty("validatorDstAddress")) + if (!$util.isString(message.validatorDstAddress)) + return "validatorDstAddress: string expected"; + if (message.entries != null && message.hasOwnProperty("entries")) { + if (!Array.isArray(message.entries)) + return "entries: array expected"; + for (var i = 0; i < message.entries.length; ++i) { + var error = $root.cosmos.staking.v1beta1.RedelegationEntry.verify(message.entries[i]); + if (error) + return "entries." + error; + } + } + return null; + }; + + /** + * Creates a Redelegation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.Redelegation + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.Redelegation} Redelegation + */ + Redelegation.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.Redelegation) + return object; + var message = new $root.cosmos.staking.v1beta1.Redelegation(); + if (object.delegatorAddress != null) + message.delegatorAddress = String(object.delegatorAddress); + if (object.validatorSrcAddress != null) + message.validatorSrcAddress = String(object.validatorSrcAddress); + if (object.validatorDstAddress != null) + message.validatorDstAddress = String(object.validatorDstAddress); + if (object.entries) { + if (!Array.isArray(object.entries)) + throw TypeError(".cosmos.staking.v1beta1.Redelegation.entries: array expected"); + message.entries = []; + for (var i = 0; i < object.entries.length; ++i) { + if (typeof object.entries[i] !== "object") + throw TypeError(".cosmos.staking.v1beta1.Redelegation.entries: object expected"); + message.entries[i] = $root.cosmos.staking.v1beta1.RedelegationEntry.fromObject(object.entries[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Redelegation message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.Redelegation + * @static + * @param {cosmos.staking.v1beta1.Redelegation} message Redelegation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Redelegation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.entries = []; + if (options.defaults) { + object.delegatorAddress = ""; + object.validatorSrcAddress = ""; + object.validatorDstAddress = ""; + } + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + object.delegatorAddress = message.delegatorAddress; + if (message.validatorSrcAddress != null && message.hasOwnProperty("validatorSrcAddress")) + object.validatorSrcAddress = message.validatorSrcAddress; + if (message.validatorDstAddress != null && message.hasOwnProperty("validatorDstAddress")) + object.validatorDstAddress = message.validatorDstAddress; + if (message.entries && message.entries.length) { + object.entries = []; + for (var j = 0; j < message.entries.length; ++j) + object.entries[j] = $root.cosmos.staking.v1beta1.RedelegationEntry.toObject(message.entries[j], options); + } + return object; + }; + + /** + * Converts this Redelegation to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.Redelegation + * @instance + * @returns {Object.} JSON object + */ + Redelegation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Redelegation; + })(v1beta1.Redelegation || {}); + + v1beta1.Params = (function(Params) { + + /** + * Properties of a Params. + * @memberof cosmos.staking.v1beta1 + * @interface IParams + * @property {google.protobuf.IDuration|null} [unbondingTime] Params unbondingTime + * @property {number|null} [maxValidators] Params maxValidators + * @property {number|null} [maxEntries] Params maxEntries + * @property {number|null} [historicalEntries] Params historicalEntries + * @property {string|null} [bondDenom] Params bondDenom + */ + + /** + * Constructs a new Params. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a Params. + * @implements IParams + * @constructor + * @param {cosmos.staking.v1beta1.IParams=} [properties] Properties to set + */ + function Params(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Params unbondingTime. + * @member {google.protobuf.IDuration|null|undefined} unbondingTime + * @memberof cosmos.staking.v1beta1.Params + * @instance + */ + Params.prototype.unbondingTime = null; + + /** + * Params maxValidators. + * @member {number} maxValidators + * @memberof cosmos.staking.v1beta1.Params + * @instance + */ + Params.prototype.maxValidators = 0; + + /** + * Params maxEntries. + * @member {number} maxEntries + * @memberof cosmos.staking.v1beta1.Params + * @instance + */ + Params.prototype.maxEntries = 0; + + /** + * Params historicalEntries. + * @member {number} historicalEntries + * @memberof cosmos.staking.v1beta1.Params + * @instance + */ + Params.prototype.historicalEntries = 0; + + /** + * Params bondDenom. + * @member {string} bondDenom + * @memberof cosmos.staking.v1beta1.Params + * @instance + */ + Params.prototype.bondDenom = ""; + + /** + * Creates a new Params instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.Params + * @static + * @param {cosmos.staking.v1beta1.IParams=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.Params} Params instance + */ + Params.create = function create(properties) { + return new Params(properties); + }; + + /** + * Encodes the specified Params message. Does not implicitly {@link cosmos.staking.v1beta1.Params.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.Params + * @static + * @param {cosmos.staking.v1beta1.IParams} message Params message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Params.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.unbondingTime != null && Object.hasOwnProperty.call(message, "unbondingTime")) + $root.google.protobuf.Duration.encode(message.unbondingTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.maxValidators != null && Object.hasOwnProperty.call(message, "maxValidators")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.maxValidators); + if (message.maxEntries != null && Object.hasOwnProperty.call(message, "maxEntries")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.maxEntries); + if (message.historicalEntries != null && Object.hasOwnProperty.call(message, "historicalEntries")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.historicalEntries); + if (message.bondDenom != null && Object.hasOwnProperty.call(message, "bondDenom")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.bondDenom); + return writer; + }; + + /** + * Encodes the specified Params message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.Params.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.Params + * @static + * @param {cosmos.staking.v1beta1.IParams} message Params message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Params.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Params message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.Params + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.Params} Params + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Params.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.Params(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.unbondingTime = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + case 2: + message.maxValidators = reader.uint32(); + break; + case 3: + message.maxEntries = reader.uint32(); + break; + case 4: + message.historicalEntries = reader.uint32(); + break; + case 5: + message.bondDenom = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Params message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.Params + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.Params} Params + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Params.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Params message. + * @function verify + * @memberof cosmos.staking.v1beta1.Params + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Params.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.unbondingTime != null && message.hasOwnProperty("unbondingTime")) { + var error = $root.google.protobuf.Duration.verify(message.unbondingTime); + if (error) + return "unbondingTime." + error; + } + if (message.maxValidators != null && message.hasOwnProperty("maxValidators")) + if (!$util.isInteger(message.maxValidators)) + return "maxValidators: integer expected"; + if (message.maxEntries != null && message.hasOwnProperty("maxEntries")) + if (!$util.isInteger(message.maxEntries)) + return "maxEntries: integer expected"; + if (message.historicalEntries != null && message.hasOwnProperty("historicalEntries")) + if (!$util.isInteger(message.historicalEntries)) + return "historicalEntries: integer expected"; + if (message.bondDenom != null && message.hasOwnProperty("bondDenom")) + if (!$util.isString(message.bondDenom)) + return "bondDenom: string expected"; + return null; + }; + + /** + * Creates a Params message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.Params + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.Params} Params + */ + Params.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.Params) + return object; + var message = new $root.cosmos.staking.v1beta1.Params(); + if (object.unbondingTime != null) { + if (typeof object.unbondingTime !== "object") + throw TypeError(".cosmos.staking.v1beta1.Params.unbondingTime: object expected"); + message.unbondingTime = $root.google.protobuf.Duration.fromObject(object.unbondingTime); + } + if (object.maxValidators != null) + message.maxValidators = object.maxValidators >>> 0; + if (object.maxEntries != null) + message.maxEntries = object.maxEntries >>> 0; + if (object.historicalEntries != null) + message.historicalEntries = object.historicalEntries >>> 0; + if (object.bondDenom != null) + message.bondDenom = String(object.bondDenom); + return message; + }; + + /** + * Creates a plain object from a Params message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.Params + * @static + * @param {cosmos.staking.v1beta1.Params} message Params + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Params.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.unbondingTime = null; + object.maxValidators = 0; + object.maxEntries = 0; + object.historicalEntries = 0; + object.bondDenom = ""; + } + if (message.unbondingTime != null && message.hasOwnProperty("unbondingTime")) + object.unbondingTime = $root.google.protobuf.Duration.toObject(message.unbondingTime, options); + if (message.maxValidators != null && message.hasOwnProperty("maxValidators")) + object.maxValidators = message.maxValidators; + if (message.maxEntries != null && message.hasOwnProperty("maxEntries")) + object.maxEntries = message.maxEntries; + if (message.historicalEntries != null && message.hasOwnProperty("historicalEntries")) + object.historicalEntries = message.historicalEntries; + if (message.bondDenom != null && message.hasOwnProperty("bondDenom")) + object.bondDenom = message.bondDenom; + return object; + }; + + /** + * Converts this Params to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.Params + * @instance + * @returns {Object.} JSON object + */ + Params.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Params; + })(v1beta1.Params || {}); + + v1beta1.DelegationResponse = (function(DelegationResponse) { + + /** + * Properties of a DelegationResponse. + * @memberof cosmos.staking.v1beta1 + * @interface IDelegationResponse + * @property {cosmos.staking.v1beta1.IDelegation|null} [delegation] DelegationResponse delegation + * @property {cosmos.base.v1beta1.ICoin|null} [balance] DelegationResponse balance + */ + + /** + * Constructs a new DelegationResponse. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a DelegationResponse. + * @implements IDelegationResponse + * @constructor + * @param {cosmos.staking.v1beta1.IDelegationResponse=} [properties] Properties to set + */ + function DelegationResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DelegationResponse delegation. + * @member {cosmos.staking.v1beta1.IDelegation|null|undefined} delegation + * @memberof cosmos.staking.v1beta1.DelegationResponse + * @instance + */ + DelegationResponse.prototype.delegation = null; + + /** + * DelegationResponse balance. + * @member {cosmos.base.v1beta1.ICoin|null|undefined} balance + * @memberof cosmos.staking.v1beta1.DelegationResponse + * @instance + */ + DelegationResponse.prototype.balance = null; + + /** + * Creates a new DelegationResponse instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.DelegationResponse + * @static + * @param {cosmos.staking.v1beta1.IDelegationResponse=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.DelegationResponse} DelegationResponse instance + */ + DelegationResponse.create = function create(properties) { + return new DelegationResponse(properties); + }; + + /** + * Encodes the specified DelegationResponse message. Does not implicitly {@link cosmos.staking.v1beta1.DelegationResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.DelegationResponse + * @static + * @param {cosmos.staking.v1beta1.IDelegationResponse} message DelegationResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DelegationResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.delegation != null && Object.hasOwnProperty.call(message, "delegation")) + $root.cosmos.staking.v1beta1.Delegation.encode(message.delegation, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.balance != null && Object.hasOwnProperty.call(message, "balance")) + $root.cosmos.base.v1beta1.Coin.encode(message.balance, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DelegationResponse message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.DelegationResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.DelegationResponse + * @static + * @param {cosmos.staking.v1beta1.IDelegationResponse} message DelegationResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DelegationResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DelegationResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.DelegationResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.DelegationResponse} DelegationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DelegationResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.DelegationResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.delegation = $root.cosmos.staking.v1beta1.Delegation.decode(reader, reader.uint32()); + break; + case 2: + message.balance = $root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DelegationResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.DelegationResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.DelegationResponse} DelegationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DelegationResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DelegationResponse message. + * @function verify + * @memberof cosmos.staking.v1beta1.DelegationResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DelegationResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.delegation != null && message.hasOwnProperty("delegation")) { + var error = $root.cosmos.staking.v1beta1.Delegation.verify(message.delegation); + if (error) + return "delegation." + error; + } + if (message.balance != null && message.hasOwnProperty("balance")) { + var error = $root.cosmos.base.v1beta1.Coin.verify(message.balance); + if (error) + return "balance." + error; + } + return null; + }; + + /** + * Creates a DelegationResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.DelegationResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.DelegationResponse} DelegationResponse + */ + DelegationResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.DelegationResponse) + return object; + var message = new $root.cosmos.staking.v1beta1.DelegationResponse(); + if (object.delegation != null) { + if (typeof object.delegation !== "object") + throw TypeError(".cosmos.staking.v1beta1.DelegationResponse.delegation: object expected"); + message.delegation = $root.cosmos.staking.v1beta1.Delegation.fromObject(object.delegation); + } + if (object.balance != null) { + if (typeof object.balance !== "object") + throw TypeError(".cosmos.staking.v1beta1.DelegationResponse.balance: object expected"); + message.balance = $root.cosmos.base.v1beta1.Coin.fromObject(object.balance); + } + return message; + }; + + /** + * Creates a plain object from a DelegationResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.DelegationResponse + * @static + * @param {cosmos.staking.v1beta1.DelegationResponse} message DelegationResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DelegationResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.delegation = null; + object.balance = null; + } + if (message.delegation != null && message.hasOwnProperty("delegation")) + object.delegation = $root.cosmos.staking.v1beta1.Delegation.toObject(message.delegation, options); + if (message.balance != null && message.hasOwnProperty("balance")) + object.balance = $root.cosmos.base.v1beta1.Coin.toObject(message.balance, options); + return object; + }; + + /** + * Converts this DelegationResponse to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.DelegationResponse + * @instance + * @returns {Object.} JSON object + */ + DelegationResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DelegationResponse; + })(v1beta1.DelegationResponse || {}); + + v1beta1.RedelegationEntryResponse = (function(RedelegationEntryResponse) { + + /** + * Properties of a RedelegationEntryResponse. + * @memberof cosmos.staking.v1beta1 + * @interface IRedelegationEntryResponse + * @property {cosmos.staking.v1beta1.IRedelegationEntry|null} [redelegationEntry] RedelegationEntryResponse redelegationEntry + * @property {string|null} [balance] RedelegationEntryResponse balance + */ + + /** + * Constructs a new RedelegationEntryResponse. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a RedelegationEntryResponse. + * @implements IRedelegationEntryResponse + * @constructor + * @param {cosmos.staking.v1beta1.IRedelegationEntryResponse=} [properties] Properties to set + */ + function RedelegationEntryResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RedelegationEntryResponse redelegationEntry. + * @member {cosmos.staking.v1beta1.IRedelegationEntry|null|undefined} redelegationEntry + * @memberof cosmos.staking.v1beta1.RedelegationEntryResponse + * @instance + */ + RedelegationEntryResponse.prototype.redelegationEntry = null; + + /** + * RedelegationEntryResponse balance. + * @member {string} balance + * @memberof cosmos.staking.v1beta1.RedelegationEntryResponse + * @instance + */ + RedelegationEntryResponse.prototype.balance = ""; + + /** + * Creates a new RedelegationEntryResponse instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.RedelegationEntryResponse + * @static + * @param {cosmos.staking.v1beta1.IRedelegationEntryResponse=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.RedelegationEntryResponse} RedelegationEntryResponse instance + */ + RedelegationEntryResponse.create = function create(properties) { + return new RedelegationEntryResponse(properties); + }; + + /** + * Encodes the specified RedelegationEntryResponse message. Does not implicitly {@link cosmos.staking.v1beta1.RedelegationEntryResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.RedelegationEntryResponse + * @static + * @param {cosmos.staking.v1beta1.IRedelegationEntryResponse} message RedelegationEntryResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RedelegationEntryResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.redelegationEntry != null && Object.hasOwnProperty.call(message, "redelegationEntry")) + $root.cosmos.staking.v1beta1.RedelegationEntry.encode(message.redelegationEntry, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.balance != null && Object.hasOwnProperty.call(message, "balance")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.balance); + return writer; + }; + + /** + * Encodes the specified RedelegationEntryResponse message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.RedelegationEntryResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.RedelegationEntryResponse + * @static + * @param {cosmos.staking.v1beta1.IRedelegationEntryResponse} message RedelegationEntryResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RedelegationEntryResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RedelegationEntryResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.RedelegationEntryResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.RedelegationEntryResponse} RedelegationEntryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RedelegationEntryResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.RedelegationEntryResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.redelegationEntry = $root.cosmos.staking.v1beta1.RedelegationEntry.decode(reader, reader.uint32()); + break; + case 4: + message.balance = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RedelegationEntryResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.RedelegationEntryResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.RedelegationEntryResponse} RedelegationEntryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RedelegationEntryResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RedelegationEntryResponse message. + * @function verify + * @memberof cosmos.staking.v1beta1.RedelegationEntryResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RedelegationEntryResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.redelegationEntry != null && message.hasOwnProperty("redelegationEntry")) { + var error = $root.cosmos.staking.v1beta1.RedelegationEntry.verify(message.redelegationEntry); + if (error) + return "redelegationEntry." + error; + } + if (message.balance != null && message.hasOwnProperty("balance")) + if (!$util.isString(message.balance)) + return "balance: string expected"; + return null; + }; + + /** + * Creates a RedelegationEntryResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.RedelegationEntryResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.RedelegationEntryResponse} RedelegationEntryResponse + */ + RedelegationEntryResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.RedelegationEntryResponse) + return object; + var message = new $root.cosmos.staking.v1beta1.RedelegationEntryResponse(); + if (object.redelegationEntry != null) { + if (typeof object.redelegationEntry !== "object") + throw TypeError(".cosmos.staking.v1beta1.RedelegationEntryResponse.redelegationEntry: object expected"); + message.redelegationEntry = $root.cosmos.staking.v1beta1.RedelegationEntry.fromObject(object.redelegationEntry); + } + if (object.balance != null) + message.balance = String(object.balance); + return message; + }; + + /** + * Creates a plain object from a RedelegationEntryResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.RedelegationEntryResponse + * @static + * @param {cosmos.staking.v1beta1.RedelegationEntryResponse} message RedelegationEntryResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RedelegationEntryResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.redelegationEntry = null; + object.balance = ""; + } + if (message.redelegationEntry != null && message.hasOwnProperty("redelegationEntry")) + object.redelegationEntry = $root.cosmos.staking.v1beta1.RedelegationEntry.toObject(message.redelegationEntry, options); + if (message.balance != null && message.hasOwnProperty("balance")) + object.balance = message.balance; + return object; + }; + + /** + * Converts this RedelegationEntryResponse to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.RedelegationEntryResponse + * @instance + * @returns {Object.} JSON object + */ + RedelegationEntryResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RedelegationEntryResponse; + })(v1beta1.RedelegationEntryResponse || {}); + + v1beta1.RedelegationResponse = (function(RedelegationResponse) { + + /** + * Properties of a RedelegationResponse. + * @memberof cosmos.staking.v1beta1 + * @interface IRedelegationResponse + * @property {cosmos.staking.v1beta1.IRedelegation|null} [redelegation] RedelegationResponse redelegation + * @property {Array.|null} [entries] RedelegationResponse entries + */ + + /** + * Constructs a new RedelegationResponse. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a RedelegationResponse. + * @implements IRedelegationResponse + * @constructor + * @param {cosmos.staking.v1beta1.IRedelegationResponse=} [properties] Properties to set + */ + function RedelegationResponse(properties) { + this.entries = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RedelegationResponse redelegation. + * @member {cosmos.staking.v1beta1.IRedelegation|null|undefined} redelegation + * @memberof cosmos.staking.v1beta1.RedelegationResponse + * @instance + */ + RedelegationResponse.prototype.redelegation = null; + + /** + * RedelegationResponse entries. + * @member {Array.} entries + * @memberof cosmos.staking.v1beta1.RedelegationResponse + * @instance + */ + RedelegationResponse.prototype.entries = $util.emptyArray; + + /** + * Creates a new RedelegationResponse instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.RedelegationResponse + * @static + * @param {cosmos.staking.v1beta1.IRedelegationResponse=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.RedelegationResponse} RedelegationResponse instance + */ + RedelegationResponse.create = function create(properties) { + return new RedelegationResponse(properties); + }; + + /** + * Encodes the specified RedelegationResponse message. Does not implicitly {@link cosmos.staking.v1beta1.RedelegationResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.RedelegationResponse + * @static + * @param {cosmos.staking.v1beta1.IRedelegationResponse} message RedelegationResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RedelegationResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.redelegation != null && Object.hasOwnProperty.call(message, "redelegation")) + $root.cosmos.staking.v1beta1.Redelegation.encode(message.redelegation, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.entries != null && message.entries.length) + for (var i = 0; i < message.entries.length; ++i) + $root.cosmos.staking.v1beta1.RedelegationEntryResponse.encode(message.entries[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RedelegationResponse message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.RedelegationResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.RedelegationResponse + * @static + * @param {cosmos.staking.v1beta1.IRedelegationResponse} message RedelegationResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RedelegationResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RedelegationResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.RedelegationResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.RedelegationResponse} RedelegationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RedelegationResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.RedelegationResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.redelegation = $root.cosmos.staking.v1beta1.Redelegation.decode(reader, reader.uint32()); + break; + case 2: + if (!(message.entries && message.entries.length)) + message.entries = []; + message.entries.push($root.cosmos.staking.v1beta1.RedelegationEntryResponse.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RedelegationResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.RedelegationResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.RedelegationResponse} RedelegationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RedelegationResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RedelegationResponse message. + * @function verify + * @memberof cosmos.staking.v1beta1.RedelegationResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RedelegationResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.redelegation != null && message.hasOwnProperty("redelegation")) { + var error = $root.cosmos.staking.v1beta1.Redelegation.verify(message.redelegation); + if (error) + return "redelegation." + error; + } + if (message.entries != null && message.hasOwnProperty("entries")) { + if (!Array.isArray(message.entries)) + return "entries: array expected"; + for (var i = 0; i < message.entries.length; ++i) { + var error = $root.cosmos.staking.v1beta1.RedelegationEntryResponse.verify(message.entries[i]); + if (error) + return "entries." + error; + } + } + return null; + }; + + /** + * Creates a RedelegationResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.RedelegationResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.RedelegationResponse} RedelegationResponse + */ + RedelegationResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.RedelegationResponse) + return object; + var message = new $root.cosmos.staking.v1beta1.RedelegationResponse(); + if (object.redelegation != null) { + if (typeof object.redelegation !== "object") + throw TypeError(".cosmos.staking.v1beta1.RedelegationResponse.redelegation: object expected"); + message.redelegation = $root.cosmos.staking.v1beta1.Redelegation.fromObject(object.redelegation); + } + if (object.entries) { + if (!Array.isArray(object.entries)) + throw TypeError(".cosmos.staking.v1beta1.RedelegationResponse.entries: array expected"); + message.entries = []; + for (var i = 0; i < object.entries.length; ++i) { + if (typeof object.entries[i] !== "object") + throw TypeError(".cosmos.staking.v1beta1.RedelegationResponse.entries: object expected"); + message.entries[i] = $root.cosmos.staking.v1beta1.RedelegationEntryResponse.fromObject(object.entries[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a RedelegationResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.RedelegationResponse + * @static + * @param {cosmos.staking.v1beta1.RedelegationResponse} message RedelegationResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RedelegationResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.entries = []; + if (options.defaults) + object.redelegation = null; + if (message.redelegation != null && message.hasOwnProperty("redelegation")) + object.redelegation = $root.cosmos.staking.v1beta1.Redelegation.toObject(message.redelegation, options); + if (message.entries && message.entries.length) { + object.entries = []; + for (var j = 0; j < message.entries.length; ++j) + object.entries[j] = $root.cosmos.staking.v1beta1.RedelegationEntryResponse.toObject(message.entries[j], options); + } + return object; + }; + + /** + * Converts this RedelegationResponse to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.RedelegationResponse + * @instance + * @returns {Object.} JSON object + */ + RedelegationResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RedelegationResponse; + })(v1beta1.RedelegationResponse || {}); + + v1beta1.Pool = (function(Pool) { + + /** + * Properties of a Pool. + * @memberof cosmos.staking.v1beta1 + * @interface IPool + * @property {string|null} [notBondedTokens] Pool notBondedTokens + * @property {string|null} [bondedTokens] Pool bondedTokens + */ + + /** + * Constructs a new Pool. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a Pool. + * @implements IPool + * @constructor + * @param {cosmos.staking.v1beta1.IPool=} [properties] Properties to set + */ + function Pool(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Pool notBondedTokens. + * @member {string} notBondedTokens + * @memberof cosmos.staking.v1beta1.Pool + * @instance + */ + Pool.prototype.notBondedTokens = ""; + + /** + * Pool bondedTokens. + * @member {string} bondedTokens + * @memberof cosmos.staking.v1beta1.Pool + * @instance + */ + Pool.prototype.bondedTokens = ""; + + /** + * Creates a new Pool instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.Pool + * @static + * @param {cosmos.staking.v1beta1.IPool=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.Pool} Pool instance + */ + Pool.create = function create(properties) { + return new Pool(properties); + }; + + /** + * Encodes the specified Pool message. Does not implicitly {@link cosmos.staking.v1beta1.Pool.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.Pool + * @static + * @param {cosmos.staking.v1beta1.IPool} message Pool message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Pool.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.notBondedTokens != null && Object.hasOwnProperty.call(message, "notBondedTokens")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.notBondedTokens); + if (message.bondedTokens != null && Object.hasOwnProperty.call(message, "bondedTokens")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.bondedTokens); + return writer; + }; + + /** + * Encodes the specified Pool message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.Pool.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.Pool + * @static + * @param {cosmos.staking.v1beta1.IPool} message Pool message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Pool.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Pool message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.Pool + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.Pool} Pool + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Pool.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.Pool(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.notBondedTokens = reader.string(); + break; + case 2: + message.bondedTokens = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Pool message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.Pool + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.Pool} Pool + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Pool.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Pool message. + * @function verify + * @memberof cosmos.staking.v1beta1.Pool + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Pool.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.notBondedTokens != null && message.hasOwnProperty("notBondedTokens")) + if (!$util.isString(message.notBondedTokens)) + return "notBondedTokens: string expected"; + if (message.bondedTokens != null && message.hasOwnProperty("bondedTokens")) + if (!$util.isString(message.bondedTokens)) + return "bondedTokens: string expected"; + return null; + }; + + /** + * Creates a Pool message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.Pool + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.Pool} Pool + */ + Pool.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.Pool) + return object; + var message = new $root.cosmos.staking.v1beta1.Pool(); + if (object.notBondedTokens != null) + message.notBondedTokens = String(object.notBondedTokens); + if (object.bondedTokens != null) + message.bondedTokens = String(object.bondedTokens); + return message; + }; + + /** + * Creates a plain object from a Pool message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.Pool + * @static + * @param {cosmos.staking.v1beta1.Pool} message Pool + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Pool.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.notBondedTokens = ""; + object.bondedTokens = ""; + } + if (message.notBondedTokens != null && message.hasOwnProperty("notBondedTokens")) + object.notBondedTokens = message.notBondedTokens; + if (message.bondedTokens != null && message.hasOwnProperty("bondedTokens")) + object.bondedTokens = message.bondedTokens; + return object; + }; + + /** + * Converts this Pool to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.Pool + * @instance + * @returns {Object.} JSON object + */ + Pool.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Pool; + })(v1beta1.Pool || {}); + + v1beta1.Msg = (function(Msg) { + + /** + * Constructs a new Msg service. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a Msg + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Msg(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Msg.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Msg; + + /** + * Creates new Msg service using the specified rpc implementation. + * @function create + * @memberof cosmos.staking.v1beta1.Msg + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Msg} RPC service. Useful where requests and/or responses are streamed. + */ + Msg.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link cosmos.staking.v1beta1.Msg#createValidator}. + * @memberof cosmos.staking.v1beta1.Msg + * @typedef CreateValidatorCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.staking.v1beta1.IMsgCreateValidatorResponse} [response] MsgCreateValidatorResponse + */ + + /** + * Calls CreateValidator. + * @function createValidator + * @memberof cosmos.staking.v1beta1.Msg + * @instance + * @param {cosmos.staking.v1beta1.IMsgCreateValidator} request MsgCreateValidator message or plain object + * @param {cosmos.staking.v1beta1.Msg.CreateValidatorCallback} callback Node-style callback called with the error, if any, and MsgCreateValidatorResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Msg.prototype.createValidator = function createValidator(request, callback) { + return this.rpcCall(createValidator, $root.cosmos.staking.v1beta1.MsgCreateValidator, $root.cosmos.staking.v1beta1.MsgCreateValidatorResponse, request, callback); + }, "name", { value: "CreateValidator" }); + + /** + * Calls CreateValidator. + * @function createValidator + * @memberof cosmos.staking.v1beta1.Msg + * @instance + * @param {cosmos.staking.v1beta1.IMsgCreateValidator} request MsgCreateValidator message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link cosmos.staking.v1beta1.Msg#editValidator}. + * @memberof cosmos.staking.v1beta1.Msg + * @typedef EditValidatorCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.staking.v1beta1.IMsgEditValidatorResponse} [response] MsgEditValidatorResponse + */ + + /** + * Calls EditValidator. + * @function editValidator + * @memberof cosmos.staking.v1beta1.Msg + * @instance + * @param {cosmos.staking.v1beta1.IMsgEditValidator} request MsgEditValidator message or plain object + * @param {cosmos.staking.v1beta1.Msg.EditValidatorCallback} callback Node-style callback called with the error, if any, and MsgEditValidatorResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Msg.prototype.editValidator = function editValidator(request, callback) { + return this.rpcCall(editValidator, $root.cosmos.staking.v1beta1.MsgEditValidator, $root.cosmos.staking.v1beta1.MsgEditValidatorResponse, request, callback); + }, "name", { value: "EditValidator" }); + + /** + * Calls EditValidator. + * @function editValidator + * @memberof cosmos.staking.v1beta1.Msg + * @instance + * @param {cosmos.staking.v1beta1.IMsgEditValidator} request MsgEditValidator message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link cosmos.staking.v1beta1.Msg#delegate}. + * @memberof cosmos.staking.v1beta1.Msg + * @typedef DelegateCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.staking.v1beta1.IMsgDelegateResponse} [response] MsgDelegateResponse + */ + + /** + * Calls Delegate. + * @function delegate + * @memberof cosmos.staking.v1beta1.Msg + * @instance + * @param {cosmos.staking.v1beta1.IMsgDelegate} request MsgDelegate message or plain object + * @param {cosmos.staking.v1beta1.Msg.DelegateCallback} callback Node-style callback called with the error, if any, and MsgDelegateResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Msg.prototype.delegate = function delegate(request, callback) { + return this.rpcCall(delegate, $root.cosmos.staking.v1beta1.MsgDelegate, $root.cosmos.staking.v1beta1.MsgDelegateResponse, request, callback); + }, "name", { value: "Delegate" }); + + /** + * Calls Delegate. + * @function delegate + * @memberof cosmos.staking.v1beta1.Msg + * @instance + * @param {cosmos.staking.v1beta1.IMsgDelegate} request MsgDelegate message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link cosmos.staking.v1beta1.Msg#beginRedelegate}. + * @memberof cosmos.staking.v1beta1.Msg + * @typedef BeginRedelegateCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.staking.v1beta1.IMsgBeginRedelegateResponse} [response] MsgBeginRedelegateResponse + */ + + /** + * Calls BeginRedelegate. + * @function beginRedelegate + * @memberof cosmos.staking.v1beta1.Msg + * @instance + * @param {cosmos.staking.v1beta1.IMsgBeginRedelegate} request MsgBeginRedelegate message or plain object + * @param {cosmos.staking.v1beta1.Msg.BeginRedelegateCallback} callback Node-style callback called with the error, if any, and MsgBeginRedelegateResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Msg.prototype.beginRedelegate = function beginRedelegate(request, callback) { + return this.rpcCall(beginRedelegate, $root.cosmos.staking.v1beta1.MsgBeginRedelegate, $root.cosmos.staking.v1beta1.MsgBeginRedelegateResponse, request, callback); + }, "name", { value: "BeginRedelegate" }); + + /** + * Calls BeginRedelegate. + * @function beginRedelegate + * @memberof cosmos.staking.v1beta1.Msg + * @instance + * @param {cosmos.staking.v1beta1.IMsgBeginRedelegate} request MsgBeginRedelegate message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link cosmos.staking.v1beta1.Msg#undelegate}. + * @memberof cosmos.staking.v1beta1.Msg + * @typedef UndelegateCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.staking.v1beta1.IMsgUndelegateResponse} [response] MsgUndelegateResponse + */ + + /** + * Calls Undelegate. + * @function undelegate + * @memberof cosmos.staking.v1beta1.Msg + * @instance + * @param {cosmos.staking.v1beta1.IMsgUndelegate} request MsgUndelegate message or plain object + * @param {cosmos.staking.v1beta1.Msg.UndelegateCallback} callback Node-style callback called with the error, if any, and MsgUndelegateResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Msg.prototype.undelegate = function undelegate(request, callback) { + return this.rpcCall(undelegate, $root.cosmos.staking.v1beta1.MsgUndelegate, $root.cosmos.staking.v1beta1.MsgUndelegateResponse, request, callback); + }, "name", { value: "Undelegate" }); + + /** + * Calls Undelegate. + * @function undelegate + * @memberof cosmos.staking.v1beta1.Msg + * @instance + * @param {cosmos.staking.v1beta1.IMsgUndelegate} request MsgUndelegate message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Msg; + })(v1beta1.Msg || {}); + + v1beta1.MsgCreateValidator = (function(MsgCreateValidator) { + + /** + * Properties of a MsgCreateValidator. + * @memberof cosmos.staking.v1beta1 + * @interface IMsgCreateValidator + * @property {cosmos.staking.v1beta1.IDescription|null} [description] MsgCreateValidator description + * @property {cosmos.staking.v1beta1.ICommissionRates|null} [commission] MsgCreateValidator commission + * @property {string|null} [minSelfDelegation] MsgCreateValidator minSelfDelegation + * @property {string|null} [delegatorAddress] MsgCreateValidator delegatorAddress + * @property {string|null} [validatorAddress] MsgCreateValidator validatorAddress + * @property {google.protobuf.IAny|null} [pubkey] MsgCreateValidator pubkey + * @property {cosmos.base.v1beta1.ICoin|null} [value] MsgCreateValidator value + */ + + /** + * Constructs a new MsgCreateValidator. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a MsgCreateValidator. + * @implements IMsgCreateValidator + * @constructor + * @param {cosmos.staking.v1beta1.IMsgCreateValidator=} [properties] Properties to set + */ + function MsgCreateValidator(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgCreateValidator description. + * @member {cosmos.staking.v1beta1.IDescription|null|undefined} description + * @memberof cosmos.staking.v1beta1.MsgCreateValidator + * @instance + */ + MsgCreateValidator.prototype.description = null; + + /** + * MsgCreateValidator commission. + * @member {cosmos.staking.v1beta1.ICommissionRates|null|undefined} commission + * @memberof cosmos.staking.v1beta1.MsgCreateValidator + * @instance + */ + MsgCreateValidator.prototype.commission = null; + + /** + * MsgCreateValidator minSelfDelegation. + * @member {string} minSelfDelegation + * @memberof cosmos.staking.v1beta1.MsgCreateValidator + * @instance + */ + MsgCreateValidator.prototype.minSelfDelegation = ""; + + /** + * MsgCreateValidator delegatorAddress. + * @member {string} delegatorAddress + * @memberof cosmos.staking.v1beta1.MsgCreateValidator + * @instance + */ + MsgCreateValidator.prototype.delegatorAddress = ""; + + /** + * MsgCreateValidator validatorAddress. + * @member {string} validatorAddress + * @memberof cosmos.staking.v1beta1.MsgCreateValidator + * @instance + */ + MsgCreateValidator.prototype.validatorAddress = ""; + + /** + * MsgCreateValidator pubkey. + * @member {google.protobuf.IAny|null|undefined} pubkey + * @memberof cosmos.staking.v1beta1.MsgCreateValidator + * @instance + */ + MsgCreateValidator.prototype.pubkey = null; + + /** + * MsgCreateValidator value. + * @member {cosmos.base.v1beta1.ICoin|null|undefined} value + * @memberof cosmos.staking.v1beta1.MsgCreateValidator + * @instance + */ + MsgCreateValidator.prototype.value = null; + + /** + * Creates a new MsgCreateValidator instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.MsgCreateValidator + * @static + * @param {cosmos.staking.v1beta1.IMsgCreateValidator=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.MsgCreateValidator} MsgCreateValidator instance + */ + MsgCreateValidator.create = function create(properties) { + return new MsgCreateValidator(properties); + }; + + /** + * Encodes the specified MsgCreateValidator message. Does not implicitly {@link cosmos.staking.v1beta1.MsgCreateValidator.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.MsgCreateValidator + * @static + * @param {cosmos.staking.v1beta1.IMsgCreateValidator} message MsgCreateValidator message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgCreateValidator.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + $root.cosmos.staking.v1beta1.Description.encode(message.description, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.commission != null && Object.hasOwnProperty.call(message, "commission")) + $root.cosmos.staking.v1beta1.CommissionRates.encode(message.commission, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.minSelfDelegation != null && Object.hasOwnProperty.call(message, "minSelfDelegation")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.minSelfDelegation); + if (message.delegatorAddress != null && Object.hasOwnProperty.call(message, "delegatorAddress")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.delegatorAddress); + if (message.validatorAddress != null && Object.hasOwnProperty.call(message, "validatorAddress")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.validatorAddress); + if (message.pubkey != null && Object.hasOwnProperty.call(message, "pubkey")) + $root.google.protobuf.Any.encode(message.pubkey, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + $root.cosmos.base.v1beta1.Coin.encode(message.value, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MsgCreateValidator message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.MsgCreateValidator.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.MsgCreateValidator + * @static + * @param {cosmos.staking.v1beta1.IMsgCreateValidator} message MsgCreateValidator message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgCreateValidator.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgCreateValidator message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.MsgCreateValidator + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.MsgCreateValidator} MsgCreateValidator + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgCreateValidator.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.MsgCreateValidator(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.description = $root.cosmos.staking.v1beta1.Description.decode(reader, reader.uint32()); + break; + case 2: + message.commission = $root.cosmos.staking.v1beta1.CommissionRates.decode(reader, reader.uint32()); + break; + case 3: + message.minSelfDelegation = reader.string(); + break; + case 4: + message.delegatorAddress = reader.string(); + break; + case 5: + message.validatorAddress = reader.string(); + break; + case 6: + message.pubkey = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + case 7: + message.value = $root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgCreateValidator message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.MsgCreateValidator + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.MsgCreateValidator} MsgCreateValidator + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgCreateValidator.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgCreateValidator message. + * @function verify + * @memberof cosmos.staking.v1beta1.MsgCreateValidator + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgCreateValidator.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.description != null && message.hasOwnProperty("description")) { + var error = $root.cosmos.staking.v1beta1.Description.verify(message.description); + if (error) + return "description." + error; + } + if (message.commission != null && message.hasOwnProperty("commission")) { + var error = $root.cosmos.staking.v1beta1.CommissionRates.verify(message.commission); + if (error) + return "commission." + error; + } + if (message.minSelfDelegation != null && message.hasOwnProperty("minSelfDelegation")) + if (!$util.isString(message.minSelfDelegation)) + return "minSelfDelegation: string expected"; + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + if (!$util.isString(message.delegatorAddress)) + return "delegatorAddress: string expected"; + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + if (!$util.isString(message.validatorAddress)) + return "validatorAddress: string expected"; + if (message.pubkey != null && message.hasOwnProperty("pubkey")) { + var error = $root.google.protobuf.Any.verify(message.pubkey); + if (error) + return "pubkey." + error; + } + if (message.value != null && message.hasOwnProperty("value")) { + var error = $root.cosmos.base.v1beta1.Coin.verify(message.value); + if (error) + return "value." + error; + } + return null; + }; + + /** + * Creates a MsgCreateValidator message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.MsgCreateValidator + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.MsgCreateValidator} MsgCreateValidator + */ + MsgCreateValidator.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.MsgCreateValidator) + return object; + var message = new $root.cosmos.staking.v1beta1.MsgCreateValidator(); + if (object.description != null) { + if (typeof object.description !== "object") + throw TypeError(".cosmos.staking.v1beta1.MsgCreateValidator.description: object expected"); + message.description = $root.cosmos.staking.v1beta1.Description.fromObject(object.description); + } + if (object.commission != null) { + if (typeof object.commission !== "object") + throw TypeError(".cosmos.staking.v1beta1.MsgCreateValidator.commission: object expected"); + message.commission = $root.cosmos.staking.v1beta1.CommissionRates.fromObject(object.commission); + } + if (object.minSelfDelegation != null) + message.minSelfDelegation = String(object.minSelfDelegation); + if (object.delegatorAddress != null) + message.delegatorAddress = String(object.delegatorAddress); + if (object.validatorAddress != null) + message.validatorAddress = String(object.validatorAddress); + if (object.pubkey != null) { + if (typeof object.pubkey !== "object") + throw TypeError(".cosmos.staking.v1beta1.MsgCreateValidator.pubkey: object expected"); + message.pubkey = $root.google.protobuf.Any.fromObject(object.pubkey); + } + if (object.value != null) { + if (typeof object.value !== "object") + throw TypeError(".cosmos.staking.v1beta1.MsgCreateValidator.value: object expected"); + message.value = $root.cosmos.base.v1beta1.Coin.fromObject(object.value); + } + return message; + }; + + /** + * Creates a plain object from a MsgCreateValidator message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.MsgCreateValidator + * @static + * @param {cosmos.staking.v1beta1.MsgCreateValidator} message MsgCreateValidator + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgCreateValidator.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.description = null; + object.commission = null; + object.minSelfDelegation = ""; + object.delegatorAddress = ""; + object.validatorAddress = ""; + object.pubkey = null; + object.value = null; + } + if (message.description != null && message.hasOwnProperty("description")) + object.description = $root.cosmos.staking.v1beta1.Description.toObject(message.description, options); + if (message.commission != null && message.hasOwnProperty("commission")) + object.commission = $root.cosmos.staking.v1beta1.CommissionRates.toObject(message.commission, options); + if (message.minSelfDelegation != null && message.hasOwnProperty("minSelfDelegation")) + object.minSelfDelegation = message.minSelfDelegation; + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + object.delegatorAddress = message.delegatorAddress; + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + object.validatorAddress = message.validatorAddress; + if (message.pubkey != null && message.hasOwnProperty("pubkey")) + object.pubkey = $root.google.protobuf.Any.toObject(message.pubkey, options); + if (message.value != null && message.hasOwnProperty("value")) + object.value = $root.cosmos.base.v1beta1.Coin.toObject(message.value, options); + return object; + }; + + /** + * Converts this MsgCreateValidator to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.MsgCreateValidator + * @instance + * @returns {Object.} JSON object + */ + MsgCreateValidator.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgCreateValidator; + })(v1beta1.MsgCreateValidator || {}); + + v1beta1.MsgCreateValidatorResponse = (function(MsgCreateValidatorResponse) { + + /** + * Properties of a MsgCreateValidatorResponse. + * @memberof cosmos.staking.v1beta1 + * @interface IMsgCreateValidatorResponse + */ + + /** + * Constructs a new MsgCreateValidatorResponse. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a MsgCreateValidatorResponse. + * @implements IMsgCreateValidatorResponse + * @constructor + * @param {cosmos.staking.v1beta1.IMsgCreateValidatorResponse=} [properties] Properties to set + */ + function MsgCreateValidatorResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new MsgCreateValidatorResponse instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.MsgCreateValidatorResponse + * @static + * @param {cosmos.staking.v1beta1.IMsgCreateValidatorResponse=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.MsgCreateValidatorResponse} MsgCreateValidatorResponse instance + */ + MsgCreateValidatorResponse.create = function create(properties) { + return new MsgCreateValidatorResponse(properties); + }; + + /** + * Encodes the specified MsgCreateValidatorResponse message. Does not implicitly {@link cosmos.staking.v1beta1.MsgCreateValidatorResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.MsgCreateValidatorResponse + * @static + * @param {cosmos.staking.v1beta1.IMsgCreateValidatorResponse} message MsgCreateValidatorResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgCreateValidatorResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MsgCreateValidatorResponse message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.MsgCreateValidatorResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.MsgCreateValidatorResponse + * @static + * @param {cosmos.staking.v1beta1.IMsgCreateValidatorResponse} message MsgCreateValidatorResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgCreateValidatorResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgCreateValidatorResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.MsgCreateValidatorResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.MsgCreateValidatorResponse} MsgCreateValidatorResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgCreateValidatorResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.MsgCreateValidatorResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgCreateValidatorResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.MsgCreateValidatorResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.MsgCreateValidatorResponse} MsgCreateValidatorResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgCreateValidatorResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgCreateValidatorResponse message. + * @function verify + * @memberof cosmos.staking.v1beta1.MsgCreateValidatorResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgCreateValidatorResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MsgCreateValidatorResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.MsgCreateValidatorResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.MsgCreateValidatorResponse} MsgCreateValidatorResponse + */ + MsgCreateValidatorResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.MsgCreateValidatorResponse) + return object; + return new $root.cosmos.staking.v1beta1.MsgCreateValidatorResponse(); + }; + + /** + * Creates a plain object from a MsgCreateValidatorResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.MsgCreateValidatorResponse + * @static + * @param {cosmos.staking.v1beta1.MsgCreateValidatorResponse} message MsgCreateValidatorResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgCreateValidatorResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MsgCreateValidatorResponse to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.MsgCreateValidatorResponse + * @instance + * @returns {Object.} JSON object + */ + MsgCreateValidatorResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgCreateValidatorResponse; + })(v1beta1.MsgCreateValidatorResponse || {}); + + v1beta1.MsgEditValidator = (function(MsgEditValidator) { + + /** + * Properties of a MsgEditValidator. + * @memberof cosmos.staking.v1beta1 + * @interface IMsgEditValidator + * @property {cosmos.staking.v1beta1.IDescription|null} [description] MsgEditValidator description + * @property {string|null} [validatorAddress] MsgEditValidator validatorAddress + * @property {string|null} [commissionRate] MsgEditValidator commissionRate + * @property {string|null} [minSelfDelegation] MsgEditValidator minSelfDelegation + */ + + /** + * Constructs a new MsgEditValidator. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a MsgEditValidator. + * @implements IMsgEditValidator + * @constructor + * @param {cosmos.staking.v1beta1.IMsgEditValidator=} [properties] Properties to set + */ + function MsgEditValidator(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgEditValidator description. + * @member {cosmos.staking.v1beta1.IDescription|null|undefined} description + * @memberof cosmos.staking.v1beta1.MsgEditValidator + * @instance + */ + MsgEditValidator.prototype.description = null; + + /** + * MsgEditValidator validatorAddress. + * @member {string} validatorAddress + * @memberof cosmos.staking.v1beta1.MsgEditValidator + * @instance + */ + MsgEditValidator.prototype.validatorAddress = ""; + + /** + * MsgEditValidator commissionRate. + * @member {string} commissionRate + * @memberof cosmos.staking.v1beta1.MsgEditValidator + * @instance + */ + MsgEditValidator.prototype.commissionRate = ""; + + /** + * MsgEditValidator minSelfDelegation. + * @member {string} minSelfDelegation + * @memberof cosmos.staking.v1beta1.MsgEditValidator + * @instance + */ + MsgEditValidator.prototype.minSelfDelegation = ""; + + /** + * Creates a new MsgEditValidator instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.MsgEditValidator + * @static + * @param {cosmos.staking.v1beta1.IMsgEditValidator=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.MsgEditValidator} MsgEditValidator instance + */ + MsgEditValidator.create = function create(properties) { + return new MsgEditValidator(properties); + }; + + /** + * Encodes the specified MsgEditValidator message. Does not implicitly {@link cosmos.staking.v1beta1.MsgEditValidator.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.MsgEditValidator + * @static + * @param {cosmos.staking.v1beta1.IMsgEditValidator} message MsgEditValidator message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgEditValidator.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + $root.cosmos.staking.v1beta1.Description.encode(message.description, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.validatorAddress != null && Object.hasOwnProperty.call(message, "validatorAddress")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.validatorAddress); + if (message.commissionRate != null && Object.hasOwnProperty.call(message, "commissionRate")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.commissionRate); + if (message.minSelfDelegation != null && Object.hasOwnProperty.call(message, "minSelfDelegation")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.minSelfDelegation); + return writer; + }; + + /** + * Encodes the specified MsgEditValidator message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.MsgEditValidator.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.MsgEditValidator + * @static + * @param {cosmos.staking.v1beta1.IMsgEditValidator} message MsgEditValidator message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgEditValidator.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgEditValidator message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.MsgEditValidator + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.MsgEditValidator} MsgEditValidator + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgEditValidator.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.MsgEditValidator(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.description = $root.cosmos.staking.v1beta1.Description.decode(reader, reader.uint32()); + break; + case 2: + message.validatorAddress = reader.string(); + break; + case 3: + message.commissionRate = reader.string(); + break; + case 4: + message.minSelfDelegation = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgEditValidator message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.MsgEditValidator + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.MsgEditValidator} MsgEditValidator + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgEditValidator.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgEditValidator message. + * @function verify + * @memberof cosmos.staking.v1beta1.MsgEditValidator + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgEditValidator.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.description != null && message.hasOwnProperty("description")) { + var error = $root.cosmos.staking.v1beta1.Description.verify(message.description); + if (error) + return "description." + error; + } + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + if (!$util.isString(message.validatorAddress)) + return "validatorAddress: string expected"; + if (message.commissionRate != null && message.hasOwnProperty("commissionRate")) + if (!$util.isString(message.commissionRate)) + return "commissionRate: string expected"; + if (message.minSelfDelegation != null && message.hasOwnProperty("minSelfDelegation")) + if (!$util.isString(message.minSelfDelegation)) + return "minSelfDelegation: string expected"; + return null; + }; + + /** + * Creates a MsgEditValidator message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.MsgEditValidator + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.MsgEditValidator} MsgEditValidator + */ + MsgEditValidator.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.MsgEditValidator) + return object; + var message = new $root.cosmos.staking.v1beta1.MsgEditValidator(); + if (object.description != null) { + if (typeof object.description !== "object") + throw TypeError(".cosmos.staking.v1beta1.MsgEditValidator.description: object expected"); + message.description = $root.cosmos.staking.v1beta1.Description.fromObject(object.description); + } + if (object.validatorAddress != null) + message.validatorAddress = String(object.validatorAddress); + if (object.commissionRate != null) + message.commissionRate = String(object.commissionRate); + if (object.minSelfDelegation != null) + message.minSelfDelegation = String(object.minSelfDelegation); + return message; + }; + + /** + * Creates a plain object from a MsgEditValidator message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.MsgEditValidator + * @static + * @param {cosmos.staking.v1beta1.MsgEditValidator} message MsgEditValidator + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgEditValidator.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.description = null; + object.validatorAddress = ""; + object.commissionRate = ""; + object.minSelfDelegation = ""; + } + if (message.description != null && message.hasOwnProperty("description")) + object.description = $root.cosmos.staking.v1beta1.Description.toObject(message.description, options); + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + object.validatorAddress = message.validatorAddress; + if (message.commissionRate != null && message.hasOwnProperty("commissionRate")) + object.commissionRate = message.commissionRate; + if (message.minSelfDelegation != null && message.hasOwnProperty("minSelfDelegation")) + object.minSelfDelegation = message.minSelfDelegation; + return object; + }; + + /** + * Converts this MsgEditValidator to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.MsgEditValidator + * @instance + * @returns {Object.} JSON object + */ + MsgEditValidator.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgEditValidator; + })(v1beta1.MsgEditValidator || {}); + + v1beta1.MsgEditValidatorResponse = (function(MsgEditValidatorResponse) { + + /** + * Properties of a MsgEditValidatorResponse. + * @memberof cosmos.staking.v1beta1 + * @interface IMsgEditValidatorResponse + */ + + /** + * Constructs a new MsgEditValidatorResponse. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a MsgEditValidatorResponse. + * @implements IMsgEditValidatorResponse + * @constructor + * @param {cosmos.staking.v1beta1.IMsgEditValidatorResponse=} [properties] Properties to set + */ + function MsgEditValidatorResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new MsgEditValidatorResponse instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.MsgEditValidatorResponse + * @static + * @param {cosmos.staking.v1beta1.IMsgEditValidatorResponse=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.MsgEditValidatorResponse} MsgEditValidatorResponse instance + */ + MsgEditValidatorResponse.create = function create(properties) { + return new MsgEditValidatorResponse(properties); + }; + + /** + * Encodes the specified MsgEditValidatorResponse message. Does not implicitly {@link cosmos.staking.v1beta1.MsgEditValidatorResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.MsgEditValidatorResponse + * @static + * @param {cosmos.staking.v1beta1.IMsgEditValidatorResponse} message MsgEditValidatorResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgEditValidatorResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MsgEditValidatorResponse message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.MsgEditValidatorResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.MsgEditValidatorResponse + * @static + * @param {cosmos.staking.v1beta1.IMsgEditValidatorResponse} message MsgEditValidatorResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgEditValidatorResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgEditValidatorResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.MsgEditValidatorResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.MsgEditValidatorResponse} MsgEditValidatorResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgEditValidatorResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.MsgEditValidatorResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgEditValidatorResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.MsgEditValidatorResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.MsgEditValidatorResponse} MsgEditValidatorResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgEditValidatorResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgEditValidatorResponse message. + * @function verify + * @memberof cosmos.staking.v1beta1.MsgEditValidatorResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgEditValidatorResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MsgEditValidatorResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.MsgEditValidatorResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.MsgEditValidatorResponse} MsgEditValidatorResponse + */ + MsgEditValidatorResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.MsgEditValidatorResponse) + return object; + return new $root.cosmos.staking.v1beta1.MsgEditValidatorResponse(); + }; + + /** + * Creates a plain object from a MsgEditValidatorResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.MsgEditValidatorResponse + * @static + * @param {cosmos.staking.v1beta1.MsgEditValidatorResponse} message MsgEditValidatorResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgEditValidatorResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MsgEditValidatorResponse to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.MsgEditValidatorResponse + * @instance + * @returns {Object.} JSON object + */ + MsgEditValidatorResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgEditValidatorResponse; + })(v1beta1.MsgEditValidatorResponse || {}); + + v1beta1.MsgDelegate = (function(MsgDelegate) { + + /** + * Properties of a MsgDelegate. + * @memberof cosmos.staking.v1beta1 + * @interface IMsgDelegate + * @property {string|null} [delegatorAddress] MsgDelegate delegatorAddress + * @property {string|null} [validatorAddress] MsgDelegate validatorAddress + * @property {cosmos.base.v1beta1.ICoin|null} [amount] MsgDelegate amount + */ + + /** + * Constructs a new MsgDelegate. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a MsgDelegate. + * @implements IMsgDelegate + * @constructor + * @param {cosmos.staking.v1beta1.IMsgDelegate=} [properties] Properties to set + */ + function MsgDelegate(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgDelegate delegatorAddress. + * @member {string} delegatorAddress + * @memberof cosmos.staking.v1beta1.MsgDelegate + * @instance + */ + MsgDelegate.prototype.delegatorAddress = ""; + + /** + * MsgDelegate validatorAddress. + * @member {string} validatorAddress + * @memberof cosmos.staking.v1beta1.MsgDelegate + * @instance + */ + MsgDelegate.prototype.validatorAddress = ""; + + /** + * MsgDelegate amount. + * @member {cosmos.base.v1beta1.ICoin|null|undefined} amount + * @memberof cosmos.staking.v1beta1.MsgDelegate + * @instance + */ + MsgDelegate.prototype.amount = null; + + /** + * Creates a new MsgDelegate instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.MsgDelegate + * @static + * @param {cosmos.staking.v1beta1.IMsgDelegate=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.MsgDelegate} MsgDelegate instance + */ + MsgDelegate.create = function create(properties) { + return new MsgDelegate(properties); + }; + + /** + * Encodes the specified MsgDelegate message. Does not implicitly {@link cosmos.staking.v1beta1.MsgDelegate.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.MsgDelegate + * @static + * @param {cosmos.staking.v1beta1.IMsgDelegate} message MsgDelegate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgDelegate.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.delegatorAddress != null && Object.hasOwnProperty.call(message, "delegatorAddress")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.delegatorAddress); + if (message.validatorAddress != null && Object.hasOwnProperty.call(message, "validatorAddress")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.validatorAddress); + if (message.amount != null && Object.hasOwnProperty.call(message, "amount")) + $root.cosmos.base.v1beta1.Coin.encode(message.amount, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MsgDelegate message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.MsgDelegate.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.MsgDelegate + * @static + * @param {cosmos.staking.v1beta1.IMsgDelegate} message MsgDelegate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgDelegate.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgDelegate message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.MsgDelegate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.MsgDelegate} MsgDelegate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgDelegate.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.MsgDelegate(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.delegatorAddress = reader.string(); + break; + case 2: + message.validatorAddress = reader.string(); + break; + case 3: + message.amount = $root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgDelegate message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.MsgDelegate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.MsgDelegate} MsgDelegate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgDelegate.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgDelegate message. + * @function verify + * @memberof cosmos.staking.v1beta1.MsgDelegate + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgDelegate.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + if (!$util.isString(message.delegatorAddress)) + return "delegatorAddress: string expected"; + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + if (!$util.isString(message.validatorAddress)) + return "validatorAddress: string expected"; + if (message.amount != null && message.hasOwnProperty("amount")) { + var error = $root.cosmos.base.v1beta1.Coin.verify(message.amount); + if (error) + return "amount." + error; + } + return null; + }; + + /** + * Creates a MsgDelegate message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.MsgDelegate + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.MsgDelegate} MsgDelegate + */ + MsgDelegate.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.MsgDelegate) + return object; + var message = new $root.cosmos.staking.v1beta1.MsgDelegate(); + if (object.delegatorAddress != null) + message.delegatorAddress = String(object.delegatorAddress); + if (object.validatorAddress != null) + message.validatorAddress = String(object.validatorAddress); + if (object.amount != null) { + if (typeof object.amount !== "object") + throw TypeError(".cosmos.staking.v1beta1.MsgDelegate.amount: object expected"); + message.amount = $root.cosmos.base.v1beta1.Coin.fromObject(object.amount); + } + return message; + }; + + /** + * Creates a plain object from a MsgDelegate message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.MsgDelegate + * @static + * @param {cosmos.staking.v1beta1.MsgDelegate} message MsgDelegate + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgDelegate.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.delegatorAddress = ""; + object.validatorAddress = ""; + object.amount = null; + } + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + object.delegatorAddress = message.delegatorAddress; + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + object.validatorAddress = message.validatorAddress; + if (message.amount != null && message.hasOwnProperty("amount")) + object.amount = $root.cosmos.base.v1beta1.Coin.toObject(message.amount, options); + return object; + }; + + /** + * Converts this MsgDelegate to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.MsgDelegate + * @instance + * @returns {Object.} JSON object + */ + MsgDelegate.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgDelegate; + })(v1beta1.MsgDelegate || {}); + + v1beta1.MsgDelegateResponse = (function(MsgDelegateResponse) { + + /** + * Properties of a MsgDelegateResponse. + * @memberof cosmos.staking.v1beta1 + * @interface IMsgDelegateResponse + */ + + /** + * Constructs a new MsgDelegateResponse. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a MsgDelegateResponse. + * @implements IMsgDelegateResponse + * @constructor + * @param {cosmos.staking.v1beta1.IMsgDelegateResponse=} [properties] Properties to set + */ + function MsgDelegateResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new MsgDelegateResponse instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.MsgDelegateResponse + * @static + * @param {cosmos.staking.v1beta1.IMsgDelegateResponse=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.MsgDelegateResponse} MsgDelegateResponse instance + */ + MsgDelegateResponse.create = function create(properties) { + return new MsgDelegateResponse(properties); + }; + + /** + * Encodes the specified MsgDelegateResponse message. Does not implicitly {@link cosmos.staking.v1beta1.MsgDelegateResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.MsgDelegateResponse + * @static + * @param {cosmos.staking.v1beta1.IMsgDelegateResponse} message MsgDelegateResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgDelegateResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MsgDelegateResponse message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.MsgDelegateResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.MsgDelegateResponse + * @static + * @param {cosmos.staking.v1beta1.IMsgDelegateResponse} message MsgDelegateResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgDelegateResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgDelegateResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.MsgDelegateResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.MsgDelegateResponse} MsgDelegateResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgDelegateResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.MsgDelegateResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgDelegateResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.MsgDelegateResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.MsgDelegateResponse} MsgDelegateResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgDelegateResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgDelegateResponse message. + * @function verify + * @memberof cosmos.staking.v1beta1.MsgDelegateResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgDelegateResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MsgDelegateResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.MsgDelegateResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.MsgDelegateResponse} MsgDelegateResponse + */ + MsgDelegateResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.MsgDelegateResponse) + return object; + return new $root.cosmos.staking.v1beta1.MsgDelegateResponse(); + }; + + /** + * Creates a plain object from a MsgDelegateResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.MsgDelegateResponse + * @static + * @param {cosmos.staking.v1beta1.MsgDelegateResponse} message MsgDelegateResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgDelegateResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MsgDelegateResponse to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.MsgDelegateResponse + * @instance + * @returns {Object.} JSON object + */ + MsgDelegateResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgDelegateResponse; + })(v1beta1.MsgDelegateResponse || {}); + + v1beta1.MsgBeginRedelegate = (function(MsgBeginRedelegate) { + + /** + * Properties of a MsgBeginRedelegate. + * @memberof cosmos.staking.v1beta1 + * @interface IMsgBeginRedelegate + * @property {string|null} [delegatorAddress] MsgBeginRedelegate delegatorAddress + * @property {string|null} [validatorSrcAddress] MsgBeginRedelegate validatorSrcAddress + * @property {string|null} [validatorDstAddress] MsgBeginRedelegate validatorDstAddress + * @property {cosmos.base.v1beta1.ICoin|null} [amount] MsgBeginRedelegate amount + */ + + /** + * Constructs a new MsgBeginRedelegate. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a MsgBeginRedelegate. + * @implements IMsgBeginRedelegate + * @constructor + * @param {cosmos.staking.v1beta1.IMsgBeginRedelegate=} [properties] Properties to set + */ + function MsgBeginRedelegate(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgBeginRedelegate delegatorAddress. + * @member {string} delegatorAddress + * @memberof cosmos.staking.v1beta1.MsgBeginRedelegate + * @instance + */ + MsgBeginRedelegate.prototype.delegatorAddress = ""; + + /** + * MsgBeginRedelegate validatorSrcAddress. + * @member {string} validatorSrcAddress + * @memberof cosmos.staking.v1beta1.MsgBeginRedelegate + * @instance + */ + MsgBeginRedelegate.prototype.validatorSrcAddress = ""; + + /** + * MsgBeginRedelegate validatorDstAddress. + * @member {string} validatorDstAddress + * @memberof cosmos.staking.v1beta1.MsgBeginRedelegate + * @instance + */ + MsgBeginRedelegate.prototype.validatorDstAddress = ""; + + /** + * MsgBeginRedelegate amount. + * @member {cosmos.base.v1beta1.ICoin|null|undefined} amount + * @memberof cosmos.staking.v1beta1.MsgBeginRedelegate + * @instance + */ + MsgBeginRedelegate.prototype.amount = null; + + /** + * Creates a new MsgBeginRedelegate instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.MsgBeginRedelegate + * @static + * @param {cosmos.staking.v1beta1.IMsgBeginRedelegate=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.MsgBeginRedelegate} MsgBeginRedelegate instance + */ + MsgBeginRedelegate.create = function create(properties) { + return new MsgBeginRedelegate(properties); + }; + + /** + * Encodes the specified MsgBeginRedelegate message. Does not implicitly {@link cosmos.staking.v1beta1.MsgBeginRedelegate.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.MsgBeginRedelegate + * @static + * @param {cosmos.staking.v1beta1.IMsgBeginRedelegate} message MsgBeginRedelegate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgBeginRedelegate.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.delegatorAddress != null && Object.hasOwnProperty.call(message, "delegatorAddress")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.delegatorAddress); + if (message.validatorSrcAddress != null && Object.hasOwnProperty.call(message, "validatorSrcAddress")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.validatorSrcAddress); + if (message.validatorDstAddress != null && Object.hasOwnProperty.call(message, "validatorDstAddress")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.validatorDstAddress); + if (message.amount != null && Object.hasOwnProperty.call(message, "amount")) + $root.cosmos.base.v1beta1.Coin.encode(message.amount, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MsgBeginRedelegate message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.MsgBeginRedelegate.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.MsgBeginRedelegate + * @static + * @param {cosmos.staking.v1beta1.IMsgBeginRedelegate} message MsgBeginRedelegate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgBeginRedelegate.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgBeginRedelegate message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.MsgBeginRedelegate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.MsgBeginRedelegate} MsgBeginRedelegate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgBeginRedelegate.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.MsgBeginRedelegate(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.delegatorAddress = reader.string(); + break; + case 2: + message.validatorSrcAddress = reader.string(); + break; + case 3: + message.validatorDstAddress = reader.string(); + break; + case 4: + message.amount = $root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgBeginRedelegate message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.MsgBeginRedelegate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.MsgBeginRedelegate} MsgBeginRedelegate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgBeginRedelegate.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgBeginRedelegate message. + * @function verify + * @memberof cosmos.staking.v1beta1.MsgBeginRedelegate + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgBeginRedelegate.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + if (!$util.isString(message.delegatorAddress)) + return "delegatorAddress: string expected"; + if (message.validatorSrcAddress != null && message.hasOwnProperty("validatorSrcAddress")) + if (!$util.isString(message.validatorSrcAddress)) + return "validatorSrcAddress: string expected"; + if (message.validatorDstAddress != null && message.hasOwnProperty("validatorDstAddress")) + if (!$util.isString(message.validatorDstAddress)) + return "validatorDstAddress: string expected"; + if (message.amount != null && message.hasOwnProperty("amount")) { + var error = $root.cosmos.base.v1beta1.Coin.verify(message.amount); + if (error) + return "amount." + error; + } + return null; + }; + + /** + * Creates a MsgBeginRedelegate message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.MsgBeginRedelegate + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.MsgBeginRedelegate} MsgBeginRedelegate + */ + MsgBeginRedelegate.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.MsgBeginRedelegate) + return object; + var message = new $root.cosmos.staking.v1beta1.MsgBeginRedelegate(); + if (object.delegatorAddress != null) + message.delegatorAddress = String(object.delegatorAddress); + if (object.validatorSrcAddress != null) + message.validatorSrcAddress = String(object.validatorSrcAddress); + if (object.validatorDstAddress != null) + message.validatorDstAddress = String(object.validatorDstAddress); + if (object.amount != null) { + if (typeof object.amount !== "object") + throw TypeError(".cosmos.staking.v1beta1.MsgBeginRedelegate.amount: object expected"); + message.amount = $root.cosmos.base.v1beta1.Coin.fromObject(object.amount); + } + return message; + }; + + /** + * Creates a plain object from a MsgBeginRedelegate message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.MsgBeginRedelegate + * @static + * @param {cosmos.staking.v1beta1.MsgBeginRedelegate} message MsgBeginRedelegate + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgBeginRedelegate.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.delegatorAddress = ""; + object.validatorSrcAddress = ""; + object.validatorDstAddress = ""; + object.amount = null; + } + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + object.delegatorAddress = message.delegatorAddress; + if (message.validatorSrcAddress != null && message.hasOwnProperty("validatorSrcAddress")) + object.validatorSrcAddress = message.validatorSrcAddress; + if (message.validatorDstAddress != null && message.hasOwnProperty("validatorDstAddress")) + object.validatorDstAddress = message.validatorDstAddress; + if (message.amount != null && message.hasOwnProperty("amount")) + object.amount = $root.cosmos.base.v1beta1.Coin.toObject(message.amount, options); + return object; + }; + + /** + * Converts this MsgBeginRedelegate to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.MsgBeginRedelegate + * @instance + * @returns {Object.} JSON object + */ + MsgBeginRedelegate.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgBeginRedelegate; + })(v1beta1.MsgBeginRedelegate || {}); + + v1beta1.MsgBeginRedelegateResponse = (function(MsgBeginRedelegateResponse) { + + /** + * Properties of a MsgBeginRedelegateResponse. + * @memberof cosmos.staking.v1beta1 + * @interface IMsgBeginRedelegateResponse + * @property {google.protobuf.ITimestamp|null} [completionTime] MsgBeginRedelegateResponse completionTime + */ + + /** + * Constructs a new MsgBeginRedelegateResponse. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a MsgBeginRedelegateResponse. + * @implements IMsgBeginRedelegateResponse + * @constructor + * @param {cosmos.staking.v1beta1.IMsgBeginRedelegateResponse=} [properties] Properties to set + */ + function MsgBeginRedelegateResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgBeginRedelegateResponse completionTime. + * @member {google.protobuf.ITimestamp|null|undefined} completionTime + * @memberof cosmos.staking.v1beta1.MsgBeginRedelegateResponse + * @instance + */ + MsgBeginRedelegateResponse.prototype.completionTime = null; + + /** + * Creates a new MsgBeginRedelegateResponse instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.MsgBeginRedelegateResponse + * @static + * @param {cosmos.staking.v1beta1.IMsgBeginRedelegateResponse=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.MsgBeginRedelegateResponse} MsgBeginRedelegateResponse instance + */ + MsgBeginRedelegateResponse.create = function create(properties) { + return new MsgBeginRedelegateResponse(properties); + }; + + /** + * Encodes the specified MsgBeginRedelegateResponse message. Does not implicitly {@link cosmos.staking.v1beta1.MsgBeginRedelegateResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.MsgBeginRedelegateResponse + * @static + * @param {cosmos.staking.v1beta1.IMsgBeginRedelegateResponse} message MsgBeginRedelegateResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgBeginRedelegateResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.completionTime != null && Object.hasOwnProperty.call(message, "completionTime")) + $root.google.protobuf.Timestamp.encode(message.completionTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MsgBeginRedelegateResponse message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.MsgBeginRedelegateResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.MsgBeginRedelegateResponse + * @static + * @param {cosmos.staking.v1beta1.IMsgBeginRedelegateResponse} message MsgBeginRedelegateResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgBeginRedelegateResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgBeginRedelegateResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.MsgBeginRedelegateResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.MsgBeginRedelegateResponse} MsgBeginRedelegateResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgBeginRedelegateResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.MsgBeginRedelegateResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.completionTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgBeginRedelegateResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.MsgBeginRedelegateResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.MsgBeginRedelegateResponse} MsgBeginRedelegateResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgBeginRedelegateResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgBeginRedelegateResponse message. + * @function verify + * @memberof cosmos.staking.v1beta1.MsgBeginRedelegateResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgBeginRedelegateResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.completionTime != null && message.hasOwnProperty("completionTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.completionTime); + if (error) + return "completionTime." + error; + } + return null; + }; + + /** + * Creates a MsgBeginRedelegateResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.MsgBeginRedelegateResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.MsgBeginRedelegateResponse} MsgBeginRedelegateResponse + */ + MsgBeginRedelegateResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.MsgBeginRedelegateResponse) + return object; + var message = new $root.cosmos.staking.v1beta1.MsgBeginRedelegateResponse(); + if (object.completionTime != null) { + if (typeof object.completionTime !== "object") + throw TypeError(".cosmos.staking.v1beta1.MsgBeginRedelegateResponse.completionTime: object expected"); + message.completionTime = $root.google.protobuf.Timestamp.fromObject(object.completionTime); + } + return message; + }; + + /** + * Creates a plain object from a MsgBeginRedelegateResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.MsgBeginRedelegateResponse + * @static + * @param {cosmos.staking.v1beta1.MsgBeginRedelegateResponse} message MsgBeginRedelegateResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgBeginRedelegateResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.completionTime = null; + if (message.completionTime != null && message.hasOwnProperty("completionTime")) + object.completionTime = $root.google.protobuf.Timestamp.toObject(message.completionTime, options); + return object; + }; + + /** + * Converts this MsgBeginRedelegateResponse to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.MsgBeginRedelegateResponse + * @instance + * @returns {Object.} JSON object + */ + MsgBeginRedelegateResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgBeginRedelegateResponse; + })(v1beta1.MsgBeginRedelegateResponse || {}); + + v1beta1.MsgUndelegate = (function(MsgUndelegate) { + + /** + * Properties of a MsgUndelegate. + * @memberof cosmos.staking.v1beta1 + * @interface IMsgUndelegate + * @property {string|null} [delegatorAddress] MsgUndelegate delegatorAddress + * @property {string|null} [validatorAddress] MsgUndelegate validatorAddress + * @property {cosmos.base.v1beta1.ICoin|null} [amount] MsgUndelegate amount + */ + + /** + * Constructs a new MsgUndelegate. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a MsgUndelegate. + * @implements IMsgUndelegate + * @constructor + * @param {cosmos.staking.v1beta1.IMsgUndelegate=} [properties] Properties to set + */ + function MsgUndelegate(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgUndelegate delegatorAddress. + * @member {string} delegatorAddress + * @memberof cosmos.staking.v1beta1.MsgUndelegate + * @instance + */ + MsgUndelegate.prototype.delegatorAddress = ""; + + /** + * MsgUndelegate validatorAddress. + * @member {string} validatorAddress + * @memberof cosmos.staking.v1beta1.MsgUndelegate + * @instance + */ + MsgUndelegate.prototype.validatorAddress = ""; + + /** + * MsgUndelegate amount. + * @member {cosmos.base.v1beta1.ICoin|null|undefined} amount + * @memberof cosmos.staking.v1beta1.MsgUndelegate + * @instance + */ + MsgUndelegate.prototype.amount = null; + + /** + * Creates a new MsgUndelegate instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.MsgUndelegate + * @static + * @param {cosmos.staking.v1beta1.IMsgUndelegate=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.MsgUndelegate} MsgUndelegate instance + */ + MsgUndelegate.create = function create(properties) { + return new MsgUndelegate(properties); + }; + + /** + * Encodes the specified MsgUndelegate message. Does not implicitly {@link cosmos.staking.v1beta1.MsgUndelegate.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.MsgUndelegate + * @static + * @param {cosmos.staking.v1beta1.IMsgUndelegate} message MsgUndelegate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgUndelegate.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.delegatorAddress != null && Object.hasOwnProperty.call(message, "delegatorAddress")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.delegatorAddress); + if (message.validatorAddress != null && Object.hasOwnProperty.call(message, "validatorAddress")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.validatorAddress); + if (message.amount != null && Object.hasOwnProperty.call(message, "amount")) + $root.cosmos.base.v1beta1.Coin.encode(message.amount, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MsgUndelegate message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.MsgUndelegate.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.MsgUndelegate + * @static + * @param {cosmos.staking.v1beta1.IMsgUndelegate} message MsgUndelegate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgUndelegate.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgUndelegate message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.MsgUndelegate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.MsgUndelegate} MsgUndelegate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgUndelegate.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.MsgUndelegate(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.delegatorAddress = reader.string(); + break; + case 2: + message.validatorAddress = reader.string(); + break; + case 3: + message.amount = $root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgUndelegate message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.MsgUndelegate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.MsgUndelegate} MsgUndelegate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgUndelegate.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgUndelegate message. + * @function verify + * @memberof cosmos.staking.v1beta1.MsgUndelegate + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgUndelegate.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + if (!$util.isString(message.delegatorAddress)) + return "delegatorAddress: string expected"; + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + if (!$util.isString(message.validatorAddress)) + return "validatorAddress: string expected"; + if (message.amount != null && message.hasOwnProperty("amount")) { + var error = $root.cosmos.base.v1beta1.Coin.verify(message.amount); + if (error) + return "amount." + error; + } + return null; + }; + + /** + * Creates a MsgUndelegate message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.MsgUndelegate + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.MsgUndelegate} MsgUndelegate + */ + MsgUndelegate.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.MsgUndelegate) + return object; + var message = new $root.cosmos.staking.v1beta1.MsgUndelegate(); + if (object.delegatorAddress != null) + message.delegatorAddress = String(object.delegatorAddress); + if (object.validatorAddress != null) + message.validatorAddress = String(object.validatorAddress); + if (object.amount != null) { + if (typeof object.amount !== "object") + throw TypeError(".cosmos.staking.v1beta1.MsgUndelegate.amount: object expected"); + message.amount = $root.cosmos.base.v1beta1.Coin.fromObject(object.amount); + } + return message; + }; + + /** + * Creates a plain object from a MsgUndelegate message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.MsgUndelegate + * @static + * @param {cosmos.staking.v1beta1.MsgUndelegate} message MsgUndelegate + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgUndelegate.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.delegatorAddress = ""; + object.validatorAddress = ""; + object.amount = null; + } + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + object.delegatorAddress = message.delegatorAddress; + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + object.validatorAddress = message.validatorAddress; + if (message.amount != null && message.hasOwnProperty("amount")) + object.amount = $root.cosmos.base.v1beta1.Coin.toObject(message.amount, options); + return object; + }; + + /** + * Converts this MsgUndelegate to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.MsgUndelegate + * @instance + * @returns {Object.} JSON object + */ + MsgUndelegate.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgUndelegate; + })(v1beta1.MsgUndelegate || {}); + + v1beta1.MsgUndelegateResponse = (function(MsgUndelegateResponse) { + + /** + * Properties of a MsgUndelegateResponse. + * @memberof cosmos.staking.v1beta1 + * @interface IMsgUndelegateResponse + * @property {google.protobuf.ITimestamp|null} [completionTime] MsgUndelegateResponse completionTime + */ + + /** + * Constructs a new MsgUndelegateResponse. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a MsgUndelegateResponse. + * @implements IMsgUndelegateResponse + * @constructor + * @param {cosmos.staking.v1beta1.IMsgUndelegateResponse=} [properties] Properties to set + */ + function MsgUndelegateResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgUndelegateResponse completionTime. + * @member {google.protobuf.ITimestamp|null|undefined} completionTime + * @memberof cosmos.staking.v1beta1.MsgUndelegateResponse + * @instance + */ + MsgUndelegateResponse.prototype.completionTime = null; + + /** + * Creates a new MsgUndelegateResponse instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.MsgUndelegateResponse + * @static + * @param {cosmos.staking.v1beta1.IMsgUndelegateResponse=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.MsgUndelegateResponse} MsgUndelegateResponse instance + */ + MsgUndelegateResponse.create = function create(properties) { + return new MsgUndelegateResponse(properties); + }; + + /** + * Encodes the specified MsgUndelegateResponse message. Does not implicitly {@link cosmos.staking.v1beta1.MsgUndelegateResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.MsgUndelegateResponse + * @static + * @param {cosmos.staking.v1beta1.IMsgUndelegateResponse} message MsgUndelegateResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgUndelegateResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.completionTime != null && Object.hasOwnProperty.call(message, "completionTime")) + $root.google.protobuf.Timestamp.encode(message.completionTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MsgUndelegateResponse message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.MsgUndelegateResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.MsgUndelegateResponse + * @static + * @param {cosmos.staking.v1beta1.IMsgUndelegateResponse} message MsgUndelegateResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgUndelegateResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgUndelegateResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.MsgUndelegateResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.MsgUndelegateResponse} MsgUndelegateResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgUndelegateResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.MsgUndelegateResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.completionTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgUndelegateResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.MsgUndelegateResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.MsgUndelegateResponse} MsgUndelegateResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgUndelegateResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgUndelegateResponse message. + * @function verify + * @memberof cosmos.staking.v1beta1.MsgUndelegateResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgUndelegateResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.completionTime != null && message.hasOwnProperty("completionTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.completionTime); + if (error) + return "completionTime." + error; + } + return null; + }; + + /** + * Creates a MsgUndelegateResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.MsgUndelegateResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.MsgUndelegateResponse} MsgUndelegateResponse + */ + MsgUndelegateResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.MsgUndelegateResponse) + return object; + var message = new $root.cosmos.staking.v1beta1.MsgUndelegateResponse(); + if (object.completionTime != null) { + if (typeof object.completionTime !== "object") + throw TypeError(".cosmos.staking.v1beta1.MsgUndelegateResponse.completionTime: object expected"); + message.completionTime = $root.google.protobuf.Timestamp.fromObject(object.completionTime); + } + return message; + }; + + /** + * Creates a plain object from a MsgUndelegateResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.MsgUndelegateResponse + * @static + * @param {cosmos.staking.v1beta1.MsgUndelegateResponse} message MsgUndelegateResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgUndelegateResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.completionTime = null; + if (message.completionTime != null && message.hasOwnProperty("completionTime")) + object.completionTime = $root.google.protobuf.Timestamp.toObject(message.completionTime, options); + return object; + }; + + /** + * Converts this MsgUndelegateResponse to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.MsgUndelegateResponse + * @instance + * @returns {Object.} JSON object + */ + MsgUndelegateResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgUndelegateResponse; + })(v1beta1.MsgUndelegateResponse || {}); + + return v1beta1; + })(staking.v1beta1 || {}); + + return staking; + })(cosmos.staking || {}); + + /** + * Namespace crypto. + * @memberof cosmos + * @namespace + */ + + cosmos.crypto = (function(crypto) { + + /** + * Namespace multisig. + * @memberof cosmos.crypto + * @namespace + */ + + crypto.multisig = (function(multisig) { + + /** + * Namespace v1beta1. + * @memberof cosmos.crypto.multisig + * @namespace + */ + + multisig.v1beta1 = (function(v1beta1) { + + v1beta1.MultiSignature = (function(MultiSignature) { + + /** + * Properties of a MultiSignature. + * @memberof cosmos.crypto.multisig.v1beta1 + * @interface IMultiSignature + * @property {Array.|null} [signatures] MultiSignature signatures + */ + + /** + * Constructs a new MultiSignature. + * @memberof cosmos.crypto.multisig.v1beta1 + * @classdesc Represents a MultiSignature. + * @implements IMultiSignature + * @constructor + * @param {cosmos.crypto.multisig.v1beta1.IMultiSignature=} [properties] Properties to set + */ + function MultiSignature(properties) { + this.signatures = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MultiSignature signatures. + * @member {Array.} signatures + * @memberof cosmos.crypto.multisig.v1beta1.MultiSignature + * @instance + */ + MultiSignature.prototype.signatures = $util.emptyArray; + + /** + * Creates a new MultiSignature instance using the specified properties. + * @function create + * @memberof cosmos.crypto.multisig.v1beta1.MultiSignature + * @static + * @param {cosmos.crypto.multisig.v1beta1.IMultiSignature=} [properties] Properties to set + * @returns {cosmos.crypto.multisig.v1beta1.MultiSignature} MultiSignature instance + */ + MultiSignature.create = function create(properties) { + return new MultiSignature(properties); + }; + + /** + * Encodes the specified MultiSignature message. Does not implicitly {@link cosmos.crypto.multisig.v1beta1.MultiSignature.verify|verify} messages. + * @function encode + * @memberof cosmos.crypto.multisig.v1beta1.MultiSignature + * @static + * @param {cosmos.crypto.multisig.v1beta1.IMultiSignature} message MultiSignature message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MultiSignature.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.signatures != null && message.signatures.length) + for (var i = 0; i < message.signatures.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.signatures[i]); + return writer; + }; + + /** + * Encodes the specified MultiSignature message, length delimited. Does not implicitly {@link cosmos.crypto.multisig.v1beta1.MultiSignature.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.crypto.multisig.v1beta1.MultiSignature + * @static + * @param {cosmos.crypto.multisig.v1beta1.IMultiSignature} message MultiSignature message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MultiSignature.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MultiSignature message from the specified reader or buffer. + * @function decode + * @memberof cosmos.crypto.multisig.v1beta1.MultiSignature + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.crypto.multisig.v1beta1.MultiSignature} MultiSignature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MultiSignature.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.crypto.multisig.v1beta1.MultiSignature(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.signatures && message.signatures.length)) + message.signatures = []; + message.signatures.push(reader.bytes()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MultiSignature message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.crypto.multisig.v1beta1.MultiSignature + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.crypto.multisig.v1beta1.MultiSignature} MultiSignature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MultiSignature.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MultiSignature message. + * @function verify + * @memberof cosmos.crypto.multisig.v1beta1.MultiSignature + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MultiSignature.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.signatures != null && message.hasOwnProperty("signatures")) { + if (!Array.isArray(message.signatures)) + return "signatures: array expected"; + for (var i = 0; i < message.signatures.length; ++i) + if (!(message.signatures[i] && typeof message.signatures[i].length === "number" || $util.isString(message.signatures[i]))) + return "signatures: buffer[] expected"; + } + return null; + }; + + /** + * Creates a MultiSignature message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.crypto.multisig.v1beta1.MultiSignature + * @static + * @param {Object.} object Plain object + * @returns {cosmos.crypto.multisig.v1beta1.MultiSignature} MultiSignature + */ + MultiSignature.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.crypto.multisig.v1beta1.MultiSignature) + return object; + var message = new $root.cosmos.crypto.multisig.v1beta1.MultiSignature(); + if (object.signatures) { + if (!Array.isArray(object.signatures)) + throw TypeError(".cosmos.crypto.multisig.v1beta1.MultiSignature.signatures: array expected"); + message.signatures = []; + for (var i = 0; i < object.signatures.length; ++i) + if (typeof object.signatures[i] === "string") + $util.base64.decode(object.signatures[i], message.signatures[i] = $util.newBuffer($util.base64.length(object.signatures[i])), 0); + else if (object.signatures[i].length) + message.signatures[i] = object.signatures[i]; + } + return message; + }; + + /** + * Creates a plain object from a MultiSignature message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.crypto.multisig.v1beta1.MultiSignature + * @static + * @param {cosmos.crypto.multisig.v1beta1.MultiSignature} message MultiSignature + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MultiSignature.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.signatures = []; + if (message.signatures && message.signatures.length) { + object.signatures = []; + for (var j = 0; j < message.signatures.length; ++j) + object.signatures[j] = options.bytes === String ? $util.base64.encode(message.signatures[j], 0, message.signatures[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.signatures[j]) : message.signatures[j]; + } + return object; + }; + + /** + * Converts this MultiSignature to JSON. + * @function toJSON + * @memberof cosmos.crypto.multisig.v1beta1.MultiSignature + * @instance + * @returns {Object.} JSON object + */ + MultiSignature.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MultiSignature; + })(v1beta1.MultiSignature || {}); + + v1beta1.CompactBitArray = (function(CompactBitArray) { + + /** + * Properties of a CompactBitArray. + * @memberof cosmos.crypto.multisig.v1beta1 + * @interface ICompactBitArray + * @property {number|null} [extraBitsStored] CompactBitArray extraBitsStored + * @property {Uint8Array|null} [elems] CompactBitArray elems + */ + + /** + * Constructs a new CompactBitArray. + * @memberof cosmos.crypto.multisig.v1beta1 + * @classdesc Represents a CompactBitArray. + * @implements ICompactBitArray + * @constructor + * @param {cosmos.crypto.multisig.v1beta1.ICompactBitArray=} [properties] Properties to set + */ + function CompactBitArray(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CompactBitArray extraBitsStored. + * @member {number} extraBitsStored + * @memberof cosmos.crypto.multisig.v1beta1.CompactBitArray + * @instance + */ + CompactBitArray.prototype.extraBitsStored = 0; + + /** + * CompactBitArray elems. + * @member {Uint8Array} elems + * @memberof cosmos.crypto.multisig.v1beta1.CompactBitArray + * @instance + */ + CompactBitArray.prototype.elems = $util.newBuffer([]); + + /** + * Creates a new CompactBitArray instance using the specified properties. + * @function create + * @memberof cosmos.crypto.multisig.v1beta1.CompactBitArray + * @static + * @param {cosmos.crypto.multisig.v1beta1.ICompactBitArray=} [properties] Properties to set + * @returns {cosmos.crypto.multisig.v1beta1.CompactBitArray} CompactBitArray instance + */ + CompactBitArray.create = function create(properties) { + return new CompactBitArray(properties); + }; + + /** + * Encodes the specified CompactBitArray message. Does not implicitly {@link cosmos.crypto.multisig.v1beta1.CompactBitArray.verify|verify} messages. + * @function encode + * @memberof cosmos.crypto.multisig.v1beta1.CompactBitArray + * @static + * @param {cosmos.crypto.multisig.v1beta1.ICompactBitArray} message CompactBitArray message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompactBitArray.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.extraBitsStored != null && Object.hasOwnProperty.call(message, "extraBitsStored")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.extraBitsStored); + if (message.elems != null && Object.hasOwnProperty.call(message, "elems")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.elems); + return writer; + }; + + /** + * Encodes the specified CompactBitArray message, length delimited. Does not implicitly {@link cosmos.crypto.multisig.v1beta1.CompactBitArray.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.crypto.multisig.v1beta1.CompactBitArray + * @static + * @param {cosmos.crypto.multisig.v1beta1.ICompactBitArray} message CompactBitArray message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompactBitArray.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CompactBitArray message from the specified reader or buffer. + * @function decode + * @memberof cosmos.crypto.multisig.v1beta1.CompactBitArray + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.crypto.multisig.v1beta1.CompactBitArray} CompactBitArray + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompactBitArray.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.crypto.multisig.v1beta1.CompactBitArray(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.extraBitsStored = reader.uint32(); + break; + case 2: + message.elems = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CompactBitArray message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.crypto.multisig.v1beta1.CompactBitArray + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.crypto.multisig.v1beta1.CompactBitArray} CompactBitArray + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompactBitArray.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CompactBitArray message. + * @function verify + * @memberof cosmos.crypto.multisig.v1beta1.CompactBitArray + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CompactBitArray.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.extraBitsStored != null && message.hasOwnProperty("extraBitsStored")) + if (!$util.isInteger(message.extraBitsStored)) + return "extraBitsStored: integer expected"; + if (message.elems != null && message.hasOwnProperty("elems")) + if (!(message.elems && typeof message.elems.length === "number" || $util.isString(message.elems))) + return "elems: buffer expected"; + return null; + }; + + /** + * Creates a CompactBitArray message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.crypto.multisig.v1beta1.CompactBitArray + * @static + * @param {Object.} object Plain object + * @returns {cosmos.crypto.multisig.v1beta1.CompactBitArray} CompactBitArray + */ + CompactBitArray.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.crypto.multisig.v1beta1.CompactBitArray) + return object; + var message = new $root.cosmos.crypto.multisig.v1beta1.CompactBitArray(); + if (object.extraBitsStored != null) + message.extraBitsStored = object.extraBitsStored >>> 0; + if (object.elems != null) + if (typeof object.elems === "string") + $util.base64.decode(object.elems, message.elems = $util.newBuffer($util.base64.length(object.elems)), 0); + else if (object.elems.length) + message.elems = object.elems; + return message; + }; + + /** + * Creates a plain object from a CompactBitArray message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.crypto.multisig.v1beta1.CompactBitArray + * @static + * @param {cosmos.crypto.multisig.v1beta1.CompactBitArray} message CompactBitArray + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CompactBitArray.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.extraBitsStored = 0; + if (options.bytes === String) + object.elems = ""; + else { + object.elems = []; + if (options.bytes !== Array) + object.elems = $util.newBuffer(object.elems); + } + } + if (message.extraBitsStored != null && message.hasOwnProperty("extraBitsStored")) + object.extraBitsStored = message.extraBitsStored; + if (message.elems != null && message.hasOwnProperty("elems")) + object.elems = options.bytes === String ? $util.base64.encode(message.elems, 0, message.elems.length) : options.bytes === Array ? Array.prototype.slice.call(message.elems) : message.elems; + return object; + }; + + /** + * Converts this CompactBitArray to JSON. + * @function toJSON + * @memberof cosmos.crypto.multisig.v1beta1.CompactBitArray + * @instance + * @returns {Object.} JSON object + */ + CompactBitArray.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CompactBitArray; + })(v1beta1.CompactBitArray || {}); + + return v1beta1; + })(multisig.v1beta1 || {}); + + return multisig; + })(crypto.multisig || {}); + + return crypto; + })(cosmos.crypto || {}); + + /** + * Namespace tx. + * @memberof cosmos + * @namespace + */ + + cosmos.tx = (function(tx) { + + /** + * Namespace signing. + * @memberof cosmos.tx + * @namespace + */ + + tx.signing = (function(signing) { + + /** + * Namespace v1beta1. + * @memberof cosmos.tx.signing + * @namespace + */ + + signing.v1beta1 = (function(v1beta1) { + + /** + * SignMode enum. + * @name cosmos.tx.signing.v1beta1.SignMode + * @enum {string} + * @property {number} SIGN_MODE_UNSPECIFIED=0 SIGN_MODE_UNSPECIFIED value + * @property {number} SIGN_MODE_DIRECT=1 SIGN_MODE_DIRECT value + * @property {number} SIGN_MODE_TEXTUAL=2 SIGN_MODE_TEXTUAL value + * @property {number} SIGN_MODE_LEGACY_AMINO_JSON=127 SIGN_MODE_LEGACY_AMINO_JSON value + */ + v1beta1.SignMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SIGN_MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SIGN_MODE_DIRECT"] = 1; + values[valuesById[2] = "SIGN_MODE_TEXTUAL"] = 2; + values[valuesById[127] = "SIGN_MODE_LEGACY_AMINO_JSON"] = 127; + return values; + })(); + + v1beta1.SignatureDescriptors = (function(SignatureDescriptors) { + + /** + * Properties of a SignatureDescriptors. + * @memberof cosmos.tx.signing.v1beta1 + * @interface ISignatureDescriptors + * @property {Array.|null} [signatures] SignatureDescriptors signatures + */ + + /** + * Constructs a new SignatureDescriptors. + * @memberof cosmos.tx.signing.v1beta1 + * @classdesc Represents a SignatureDescriptors. + * @implements ISignatureDescriptors + * @constructor + * @param {cosmos.tx.signing.v1beta1.ISignatureDescriptors=} [properties] Properties to set + */ + function SignatureDescriptors(properties) { + this.signatures = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SignatureDescriptors signatures. + * @member {Array.} signatures + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptors + * @instance + */ + SignatureDescriptors.prototype.signatures = $util.emptyArray; + + /** + * Creates a new SignatureDescriptors instance using the specified properties. + * @function create + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptors + * @static + * @param {cosmos.tx.signing.v1beta1.ISignatureDescriptors=} [properties] Properties to set + * @returns {cosmos.tx.signing.v1beta1.SignatureDescriptors} SignatureDescriptors instance + */ + SignatureDescriptors.create = function create(properties) { + return new SignatureDescriptors(properties); + }; + + /** + * Encodes the specified SignatureDescriptors message. Does not implicitly {@link cosmos.tx.signing.v1beta1.SignatureDescriptors.verify|verify} messages. + * @function encode + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptors + * @static + * @param {cosmos.tx.signing.v1beta1.ISignatureDescriptors} message SignatureDescriptors message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SignatureDescriptors.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.signatures != null && message.signatures.length) + for (var i = 0; i < message.signatures.length; ++i) + $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.encode(message.signatures[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SignatureDescriptors message, length delimited. Does not implicitly {@link cosmos.tx.signing.v1beta1.SignatureDescriptors.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptors + * @static + * @param {cosmos.tx.signing.v1beta1.ISignatureDescriptors} message SignatureDescriptors message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SignatureDescriptors.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SignatureDescriptors message from the specified reader or buffer. + * @function decode + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptors + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.tx.signing.v1beta1.SignatureDescriptors} SignatureDescriptors + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SignatureDescriptors.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.tx.signing.v1beta1.SignatureDescriptors(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.signatures && message.signatures.length)) + message.signatures = []; + message.signatures.push($root.cosmos.tx.signing.v1beta1.SignatureDescriptor.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SignatureDescriptors message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptors + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.tx.signing.v1beta1.SignatureDescriptors} SignatureDescriptors + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SignatureDescriptors.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SignatureDescriptors message. + * @function verify + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptors + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SignatureDescriptors.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.signatures != null && message.hasOwnProperty("signatures")) { + if (!Array.isArray(message.signatures)) + return "signatures: array expected"; + for (var i = 0; i < message.signatures.length; ++i) { + var error = $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.verify(message.signatures[i]); + if (error) + return "signatures." + error; + } + } + return null; + }; + + /** + * Creates a SignatureDescriptors message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptors + * @static + * @param {Object.} object Plain object + * @returns {cosmos.tx.signing.v1beta1.SignatureDescriptors} SignatureDescriptors + */ + SignatureDescriptors.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.tx.signing.v1beta1.SignatureDescriptors) + return object; + var message = new $root.cosmos.tx.signing.v1beta1.SignatureDescriptors(); + if (object.signatures) { + if (!Array.isArray(object.signatures)) + throw TypeError(".cosmos.tx.signing.v1beta1.SignatureDescriptors.signatures: array expected"); + message.signatures = []; + for (var i = 0; i < object.signatures.length; ++i) { + if (typeof object.signatures[i] !== "object") + throw TypeError(".cosmos.tx.signing.v1beta1.SignatureDescriptors.signatures: object expected"); + message.signatures[i] = $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.fromObject(object.signatures[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SignatureDescriptors message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptors + * @static + * @param {cosmos.tx.signing.v1beta1.SignatureDescriptors} message SignatureDescriptors + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SignatureDescriptors.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.signatures = []; + if (message.signatures && message.signatures.length) { + object.signatures = []; + for (var j = 0; j < message.signatures.length; ++j) + object.signatures[j] = $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.toObject(message.signatures[j], options); + } + return object; + }; + + /** + * Converts this SignatureDescriptors to JSON. + * @function toJSON + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptors + * @instance + * @returns {Object.} JSON object + */ + SignatureDescriptors.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SignatureDescriptors; + })(v1beta1.SignatureDescriptors || {}); + + v1beta1.SignatureDescriptor = (function(SignatureDescriptor) { + + /** + * Properties of a SignatureDescriptor. + * @memberof cosmos.tx.signing.v1beta1 + * @interface ISignatureDescriptor + * @property {google.protobuf.IAny|null} [publicKey] SignatureDescriptor publicKey + * @property {cosmos.tx.signing.v1beta1.SignatureDescriptor.IData|null} [data] SignatureDescriptor data + * @property {number|Long|null} [sequence] SignatureDescriptor sequence + */ + + /** + * Constructs a new SignatureDescriptor. + * @memberof cosmos.tx.signing.v1beta1 + * @classdesc Represents a SignatureDescriptor. + * @implements ISignatureDescriptor + * @constructor + * @param {cosmos.tx.signing.v1beta1.ISignatureDescriptor=} [properties] Properties to set + */ + function SignatureDescriptor(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SignatureDescriptor publicKey. + * @member {google.protobuf.IAny|null|undefined} publicKey + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor + * @instance + */ + SignatureDescriptor.prototype.publicKey = null; + + /** + * SignatureDescriptor data. + * @member {cosmos.tx.signing.v1beta1.SignatureDescriptor.IData|null|undefined} data + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor + * @instance + */ + SignatureDescriptor.prototype.data = null; + + /** + * SignatureDescriptor sequence. + * @member {number|Long} sequence + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor + * @instance + */ + SignatureDescriptor.prototype.sequence = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new SignatureDescriptor instance using the specified properties. + * @function create + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor + * @static + * @param {cosmos.tx.signing.v1beta1.ISignatureDescriptor=} [properties] Properties to set + * @returns {cosmos.tx.signing.v1beta1.SignatureDescriptor} SignatureDescriptor instance + */ + SignatureDescriptor.create = function create(properties) { + return new SignatureDescriptor(properties); + }; + + /** + * Encodes the specified SignatureDescriptor message. Does not implicitly {@link cosmos.tx.signing.v1beta1.SignatureDescriptor.verify|verify} messages. + * @function encode + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor + * @static + * @param {cosmos.tx.signing.v1beta1.ISignatureDescriptor} message SignatureDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SignatureDescriptor.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.publicKey != null && Object.hasOwnProperty.call(message, "publicKey")) + $root.google.protobuf.Any.encode(message.publicKey, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.data != null && Object.hasOwnProperty.call(message, "data")) + $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.encode(message.data, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.sequence != null && Object.hasOwnProperty.call(message, "sequence")) + writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.sequence); + return writer; + }; + + /** + * Encodes the specified SignatureDescriptor message, length delimited. Does not implicitly {@link cosmos.tx.signing.v1beta1.SignatureDescriptor.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor + * @static + * @param {cosmos.tx.signing.v1beta1.ISignatureDescriptor} message SignatureDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SignatureDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SignatureDescriptor message from the specified reader or buffer. + * @function decode + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.tx.signing.v1beta1.SignatureDescriptor} SignatureDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SignatureDescriptor.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.tx.signing.v1beta1.SignatureDescriptor(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.publicKey = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + case 2: + message.data = $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.decode(reader, reader.uint32()); + break; + case 3: + message.sequence = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SignatureDescriptor message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.tx.signing.v1beta1.SignatureDescriptor} SignatureDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SignatureDescriptor.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SignatureDescriptor message. + * @function verify + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SignatureDescriptor.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.publicKey != null && message.hasOwnProperty("publicKey")) { + var error = $root.google.protobuf.Any.verify(message.publicKey); + if (error) + return "publicKey." + error; + } + if (message.data != null && message.hasOwnProperty("data")) { + var error = $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.verify(message.data); + if (error) + return "data." + error; + } + if (message.sequence != null && message.hasOwnProperty("sequence")) + if (!$util.isInteger(message.sequence) && !(message.sequence && $util.isInteger(message.sequence.low) && $util.isInteger(message.sequence.high))) + return "sequence: integer|Long expected"; + return null; + }; + + /** + * Creates a SignatureDescriptor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor + * @static + * @param {Object.} object Plain object + * @returns {cosmos.tx.signing.v1beta1.SignatureDescriptor} SignatureDescriptor + */ + SignatureDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.tx.signing.v1beta1.SignatureDescriptor) + return object; + var message = new $root.cosmos.tx.signing.v1beta1.SignatureDescriptor(); + if (object.publicKey != null) { + if (typeof object.publicKey !== "object") + throw TypeError(".cosmos.tx.signing.v1beta1.SignatureDescriptor.publicKey: object expected"); + message.publicKey = $root.google.protobuf.Any.fromObject(object.publicKey); + } + if (object.data != null) { + if (typeof object.data !== "object") + throw TypeError(".cosmos.tx.signing.v1beta1.SignatureDescriptor.data: object expected"); + message.data = $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.fromObject(object.data); + } + if (object.sequence != null) + if ($util.Long) + (message.sequence = $util.Long.fromValue(object.sequence)).unsigned = true; + else if (typeof object.sequence === "string") + message.sequence = parseInt(object.sequence, 10); + else if (typeof object.sequence === "number") + message.sequence = object.sequence; + else if (typeof object.sequence === "object") + message.sequence = new $util.LongBits(object.sequence.low >>> 0, object.sequence.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a SignatureDescriptor message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor + * @static + * @param {cosmos.tx.signing.v1beta1.SignatureDescriptor} message SignatureDescriptor + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SignatureDescriptor.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.publicKey = null; + object.data = null; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.sequence = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.sequence = options.longs === String ? "0" : 0; + } + if (message.publicKey != null && message.hasOwnProperty("publicKey")) + object.publicKey = $root.google.protobuf.Any.toObject(message.publicKey, options); + if (message.data != null && message.hasOwnProperty("data")) + object.data = $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.toObject(message.data, options); + if (message.sequence != null && message.hasOwnProperty("sequence")) + if (typeof message.sequence === "number") + object.sequence = options.longs === String ? String(message.sequence) : message.sequence; + else + object.sequence = options.longs === String ? $util.Long.prototype.toString.call(message.sequence) : options.longs === Number ? new $util.LongBits(message.sequence.low >>> 0, message.sequence.high >>> 0).toNumber(true) : message.sequence; + return object; + }; + + /** + * Converts this SignatureDescriptor to JSON. + * @function toJSON + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor + * @instance + * @returns {Object.} JSON object + */ + SignatureDescriptor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + SignatureDescriptor.Data = (function(Data) { + + /** + * Properties of a Data. + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor + * @interface IData + * @property {cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.ISingle|null} [single] Data single + * @property {cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.IMulti|null} [multi] Data multi + */ + + /** + * Constructs a new Data. + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor + * @classdesc Represents a Data. + * @implements IData + * @constructor + * @param {cosmos.tx.signing.v1beta1.SignatureDescriptor.IData=} [properties] Properties to set + */ + function Data(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Data single. + * @member {cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.ISingle|null|undefined} single + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data + * @instance + */ + Data.prototype.single = null; + + /** + * Data multi. + * @member {cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.IMulti|null|undefined} multi + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data + * @instance + */ + Data.prototype.multi = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Data sum. + * @member {"single"|"multi"|undefined} sum + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data + * @instance + */ + Object.defineProperty(Data.prototype, "sum", { + get: $util.oneOfGetter($oneOfFields = ["single", "multi"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Data instance using the specified properties. + * @function create + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data + * @static + * @param {cosmos.tx.signing.v1beta1.SignatureDescriptor.IData=} [properties] Properties to set + * @returns {cosmos.tx.signing.v1beta1.SignatureDescriptor.Data} Data instance + */ + Data.create = function create(properties) { + return new Data(properties); + }; + + /** + * Encodes the specified Data message. Does not implicitly {@link cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.verify|verify} messages. + * @function encode + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data + * @static + * @param {cosmos.tx.signing.v1beta1.SignatureDescriptor.IData} message Data message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Data.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.single != null && Object.hasOwnProperty.call(message, "single")) + $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single.encode(message.single, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.multi != null && Object.hasOwnProperty.call(message, "multi")) + $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.encode(message.multi, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Data message, length delimited. Does not implicitly {@link cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data + * @static + * @param {cosmos.tx.signing.v1beta1.SignatureDescriptor.IData} message Data message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Data.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Data message from the specified reader or buffer. + * @function decode + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.tx.signing.v1beta1.SignatureDescriptor.Data} Data + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Data.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.single = $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single.decode(reader, reader.uint32()); + break; + case 2: + message.multi = $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Data message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.tx.signing.v1beta1.SignatureDescriptor.Data} Data + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Data.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Data message. + * @function verify + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Data.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.single != null && message.hasOwnProperty("single")) { + properties.sum = 1; + { + var error = $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single.verify(message.single); + if (error) + return "single." + error; + } + } + if (message.multi != null && message.hasOwnProperty("multi")) { + if (properties.sum === 1) + return "sum: multiple values"; + properties.sum = 1; + { + var error = $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.verify(message.multi); + if (error) + return "multi." + error; + } + } + return null; + }; + + /** + * Creates a Data message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data + * @static + * @param {Object.} object Plain object + * @returns {cosmos.tx.signing.v1beta1.SignatureDescriptor.Data} Data + */ + Data.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data) + return object; + var message = new $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data(); + if (object.single != null) { + if (typeof object.single !== "object") + throw TypeError(".cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.single: object expected"); + message.single = $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single.fromObject(object.single); + } + if (object.multi != null) { + if (typeof object.multi !== "object") + throw TypeError(".cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.multi: object expected"); + message.multi = $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.fromObject(object.multi); + } + return message; + }; + + /** + * Creates a plain object from a Data message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data + * @static + * @param {cosmos.tx.signing.v1beta1.SignatureDescriptor.Data} message Data + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Data.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.single != null && message.hasOwnProperty("single")) { + object.single = $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single.toObject(message.single, options); + if (options.oneofs) + object.sum = "single"; + } + if (message.multi != null && message.hasOwnProperty("multi")) { + object.multi = $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.toObject(message.multi, options); + if (options.oneofs) + object.sum = "multi"; + } + return object; + }; + + /** + * Converts this Data to JSON. + * @function toJSON + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data + * @instance + * @returns {Object.} JSON object + */ + Data.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + Data.Single = (function(Single) { + + /** + * Properties of a Single. + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data + * @interface ISingle + * @property {cosmos.tx.signing.v1beta1.SignMode|null} [mode] Single mode + * @property {Uint8Array|null} [signature] Single signature + */ + + /** + * Constructs a new Single. + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data + * @classdesc Represents a Single. + * @implements ISingle + * @constructor + * @param {cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.ISingle=} [properties] Properties to set + */ + function Single(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Single mode. + * @member {cosmos.tx.signing.v1beta1.SignMode} mode + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single + * @instance + */ + Single.prototype.mode = 0; + + /** + * Single signature. + * @member {Uint8Array} signature + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single + * @instance + */ + Single.prototype.signature = $util.newBuffer([]); + + /** + * Creates a new Single instance using the specified properties. + * @function create + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single + * @static + * @param {cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.ISingle=} [properties] Properties to set + * @returns {cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single} Single instance + */ + Single.create = function create(properties) { + return new Single(properties); + }; + + /** + * Encodes the specified Single message. Does not implicitly {@link cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single.verify|verify} messages. + * @function encode + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single + * @static + * @param {cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.ISingle} message Single message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Single.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.mode != null && Object.hasOwnProperty.call(message, "mode")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.mode); + if (message.signature != null && Object.hasOwnProperty.call(message, "signature")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.signature); + return writer; + }; + + /** + * Encodes the specified Single message, length delimited. Does not implicitly {@link cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single + * @static + * @param {cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.ISingle} message Single message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Single.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Single message from the specified reader or buffer. + * @function decode + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single} Single + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Single.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.mode = reader.int32(); + break; + case 2: + message.signature = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Single message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single} Single + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Single.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Single message. + * @function verify + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Single.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.mode != null && message.hasOwnProperty("mode")) + switch (message.mode) { + default: + return "mode: enum value expected"; + case 0: + case 1: + case 2: + case 127: + break; + } + if (message.signature != null && message.hasOwnProperty("signature")) + if (!(message.signature && typeof message.signature.length === "number" || $util.isString(message.signature))) + return "signature: buffer expected"; + return null; + }; + + /** + * Creates a Single message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single + * @static + * @param {Object.} object Plain object + * @returns {cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single} Single + */ + Single.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single) + return object; + var message = new $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single(); + switch (object.mode) { + case "SIGN_MODE_UNSPECIFIED": + case 0: + message.mode = 0; + break; + case "SIGN_MODE_DIRECT": + case 1: + message.mode = 1; + break; + case "SIGN_MODE_TEXTUAL": + case 2: + message.mode = 2; + break; + case "SIGN_MODE_LEGACY_AMINO_JSON": + case 127: + message.mode = 127; + break; + } + if (object.signature != null) + if (typeof object.signature === "string") + $util.base64.decode(object.signature, message.signature = $util.newBuffer($util.base64.length(object.signature)), 0); + else if (object.signature.length) + message.signature = object.signature; + return message; + }; + + /** + * Creates a plain object from a Single message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single + * @static + * @param {cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single} message Single + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Single.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.mode = options.enums === String ? "SIGN_MODE_UNSPECIFIED" : 0; + if (options.bytes === String) + object.signature = ""; + else { + object.signature = []; + if (options.bytes !== Array) + object.signature = $util.newBuffer(object.signature); + } + } + if (message.mode != null && message.hasOwnProperty("mode")) + object.mode = options.enums === String ? $root.cosmos.tx.signing.v1beta1.SignMode[message.mode] : message.mode; + if (message.signature != null && message.hasOwnProperty("signature")) + object.signature = options.bytes === String ? $util.base64.encode(message.signature, 0, message.signature.length) : options.bytes === Array ? Array.prototype.slice.call(message.signature) : message.signature; + return object; + }; + + /** + * Converts this Single to JSON. + * @function toJSON + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single + * @instance + * @returns {Object.} JSON object + */ + Single.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Single; + })(Data.Single || {}); + + Data.Multi = (function(Multi) { + + /** + * Properties of a Multi. + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data + * @interface IMulti + * @property {cosmos.crypto.multisig.v1beta1.ICompactBitArray|null} [bitarray] Multi bitarray + * @property {Array.|null} [signatures] Multi signatures + */ + + /** + * Constructs a new Multi. + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data + * @classdesc Represents a Multi. + * @implements IMulti + * @constructor + * @param {cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.IMulti=} [properties] Properties to set + */ + function Multi(properties) { + this.signatures = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Multi bitarray. + * @member {cosmos.crypto.multisig.v1beta1.ICompactBitArray|null|undefined} bitarray + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi + * @instance + */ + Multi.prototype.bitarray = null; + + /** + * Multi signatures. + * @member {Array.} signatures + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi + * @instance + */ + Multi.prototype.signatures = $util.emptyArray; + + /** + * Creates a new Multi instance using the specified properties. + * @function create + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi + * @static + * @param {cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.IMulti=} [properties] Properties to set + * @returns {cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi} Multi instance + */ + Multi.create = function create(properties) { + return new Multi(properties); + }; + + /** + * Encodes the specified Multi message. Does not implicitly {@link cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.verify|verify} messages. + * @function encode + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi + * @static + * @param {cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.IMulti} message Multi message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Multi.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.bitarray != null && Object.hasOwnProperty.call(message, "bitarray")) + $root.cosmos.crypto.multisig.v1beta1.CompactBitArray.encode(message.bitarray, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.signatures != null && message.signatures.length) + for (var i = 0; i < message.signatures.length; ++i) + $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.encode(message.signatures[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Multi message, length delimited. Does not implicitly {@link cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi + * @static + * @param {cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.IMulti} message Multi message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Multi.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Multi message from the specified reader or buffer. + * @function decode + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi} Multi + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Multi.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.bitarray = $root.cosmos.crypto.multisig.v1beta1.CompactBitArray.decode(reader, reader.uint32()); + break; + case 2: + if (!(message.signatures && message.signatures.length)) + message.signatures = []; + message.signatures.push($root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Multi message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi} Multi + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Multi.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Multi message. + * @function verify + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Multi.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.bitarray != null && message.hasOwnProperty("bitarray")) { + var error = $root.cosmos.crypto.multisig.v1beta1.CompactBitArray.verify(message.bitarray); + if (error) + return "bitarray." + error; + } + if (message.signatures != null && message.hasOwnProperty("signatures")) { + if (!Array.isArray(message.signatures)) + return "signatures: array expected"; + for (var i = 0; i < message.signatures.length; ++i) { + var error = $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.verify(message.signatures[i]); + if (error) + return "signatures." + error; + } + } + return null; + }; + + /** + * Creates a Multi message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi + * @static + * @param {Object.} object Plain object + * @returns {cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi} Multi + */ + Multi.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi) + return object; + var message = new $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi(); + if (object.bitarray != null) { + if (typeof object.bitarray !== "object") + throw TypeError(".cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.bitarray: object expected"); + message.bitarray = $root.cosmos.crypto.multisig.v1beta1.CompactBitArray.fromObject(object.bitarray); + } + if (object.signatures) { + if (!Array.isArray(object.signatures)) + throw TypeError(".cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.signatures: array expected"); + message.signatures = []; + for (var i = 0; i < object.signatures.length; ++i) { + if (typeof object.signatures[i] !== "object") + throw TypeError(".cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.signatures: object expected"); + message.signatures[i] = $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.fromObject(object.signatures[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Multi message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi + * @static + * @param {cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi} message Multi + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Multi.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.signatures = []; + if (options.defaults) + object.bitarray = null; + if (message.bitarray != null && message.hasOwnProperty("bitarray")) + object.bitarray = $root.cosmos.crypto.multisig.v1beta1.CompactBitArray.toObject(message.bitarray, options); + if (message.signatures && message.signatures.length) { + object.signatures = []; + for (var j = 0; j < message.signatures.length; ++j) + object.signatures[j] = $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.toObject(message.signatures[j], options); + } + return object; + }; + + /** + * Converts this Multi to JSON. + * @function toJSON + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi + * @instance + * @returns {Object.} JSON object + */ + Multi.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Multi; + })(Data.Multi || {}); + + return Data; + })(SignatureDescriptor.Data || {}); + + return SignatureDescriptor; + })(v1beta1.SignatureDescriptor || {}); + + return v1beta1; + })(signing.v1beta1 || {}); + + return signing; + })(tx.signing || {}); + + /** + * Namespace v1beta1. + * @memberof cosmos.tx + * @namespace + */ + + tx.v1beta1 = (function(v1beta1) { + + v1beta1.Tx = (function(Tx) { + + /** + * Properties of a Tx. + * @memberof cosmos.tx.v1beta1 + * @interface ITx + * @property {cosmos.tx.v1beta1.ITxBody|null} [body] Tx body + * @property {cosmos.tx.v1beta1.IAuthInfo|null} [authInfo] Tx authInfo + * @property {Array.|null} [signatures] Tx signatures + */ + + /** + * Constructs a new Tx. + * @memberof cosmos.tx.v1beta1 + * @classdesc Represents a Tx. + * @implements ITx + * @constructor + * @param {cosmos.tx.v1beta1.ITx=} [properties] Properties to set + */ + function Tx(properties) { + this.signatures = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Tx body. + * @member {cosmos.tx.v1beta1.ITxBody|null|undefined} body + * @memberof cosmos.tx.v1beta1.Tx + * @instance + */ + Tx.prototype.body = null; + + /** + * Tx authInfo. + * @member {cosmos.tx.v1beta1.IAuthInfo|null|undefined} authInfo + * @memberof cosmos.tx.v1beta1.Tx + * @instance + */ + Tx.prototype.authInfo = null; + + /** + * Tx signatures. + * @member {Array.} signatures + * @memberof cosmos.tx.v1beta1.Tx + * @instance + */ + Tx.prototype.signatures = $util.emptyArray; + + /** + * Creates a new Tx instance using the specified properties. + * @function create + * @memberof cosmos.tx.v1beta1.Tx + * @static + * @param {cosmos.tx.v1beta1.ITx=} [properties] Properties to set + * @returns {cosmos.tx.v1beta1.Tx} Tx instance + */ + Tx.create = function create(properties) { + return new Tx(properties); + }; + + /** + * Encodes the specified Tx message. Does not implicitly {@link cosmos.tx.v1beta1.Tx.verify|verify} messages. + * @function encode + * @memberof cosmos.tx.v1beta1.Tx + * @static + * @param {cosmos.tx.v1beta1.ITx} message Tx message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Tx.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.body != null && Object.hasOwnProperty.call(message, "body")) + $root.cosmos.tx.v1beta1.TxBody.encode(message.body, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.authInfo != null && Object.hasOwnProperty.call(message, "authInfo")) + $root.cosmos.tx.v1beta1.AuthInfo.encode(message.authInfo, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.signatures != null && message.signatures.length) + for (var i = 0; i < message.signatures.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.signatures[i]); + return writer; + }; + + /** + * Encodes the specified Tx message, length delimited. Does not implicitly {@link cosmos.tx.v1beta1.Tx.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.tx.v1beta1.Tx + * @static + * @param {cosmos.tx.v1beta1.ITx} message Tx message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Tx.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Tx message from the specified reader or buffer. + * @function decode + * @memberof cosmos.tx.v1beta1.Tx + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.tx.v1beta1.Tx} Tx + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Tx.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.tx.v1beta1.Tx(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.body = $root.cosmos.tx.v1beta1.TxBody.decode(reader, reader.uint32()); + break; + case 2: + message.authInfo = $root.cosmos.tx.v1beta1.AuthInfo.decode(reader, reader.uint32()); + break; + case 3: + if (!(message.signatures && message.signatures.length)) + message.signatures = []; + message.signatures.push(reader.bytes()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Tx message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.tx.v1beta1.Tx + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.tx.v1beta1.Tx} Tx + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Tx.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Tx message. + * @function verify + * @memberof cosmos.tx.v1beta1.Tx + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Tx.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.body != null && message.hasOwnProperty("body")) { + var error = $root.cosmos.tx.v1beta1.TxBody.verify(message.body); + if (error) + return "body." + error; + } + if (message.authInfo != null && message.hasOwnProperty("authInfo")) { + var error = $root.cosmos.tx.v1beta1.AuthInfo.verify(message.authInfo); + if (error) + return "authInfo." + error; + } + if (message.signatures != null && message.hasOwnProperty("signatures")) { + if (!Array.isArray(message.signatures)) + return "signatures: array expected"; + for (var i = 0; i < message.signatures.length; ++i) + if (!(message.signatures[i] && typeof message.signatures[i].length === "number" || $util.isString(message.signatures[i]))) + return "signatures: buffer[] expected"; + } + return null; + }; + + /** + * Creates a Tx message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.tx.v1beta1.Tx + * @static + * @param {Object.} object Plain object + * @returns {cosmos.tx.v1beta1.Tx} Tx + */ + Tx.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.tx.v1beta1.Tx) + return object; + var message = new $root.cosmos.tx.v1beta1.Tx(); + if (object.body != null) { + if (typeof object.body !== "object") + throw TypeError(".cosmos.tx.v1beta1.Tx.body: object expected"); + message.body = $root.cosmos.tx.v1beta1.TxBody.fromObject(object.body); + } + if (object.authInfo != null) { + if (typeof object.authInfo !== "object") + throw TypeError(".cosmos.tx.v1beta1.Tx.authInfo: object expected"); + message.authInfo = $root.cosmos.tx.v1beta1.AuthInfo.fromObject(object.authInfo); + } + if (object.signatures) { + if (!Array.isArray(object.signatures)) + throw TypeError(".cosmos.tx.v1beta1.Tx.signatures: array expected"); + message.signatures = []; + for (var i = 0; i < object.signatures.length; ++i) + if (typeof object.signatures[i] === "string") + $util.base64.decode(object.signatures[i], message.signatures[i] = $util.newBuffer($util.base64.length(object.signatures[i])), 0); + else if (object.signatures[i].length) + message.signatures[i] = object.signatures[i]; + } + return message; + }; + + /** + * Creates a plain object from a Tx message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.tx.v1beta1.Tx + * @static + * @param {cosmos.tx.v1beta1.Tx} message Tx + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Tx.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.signatures = []; + if (options.defaults) { + object.body = null; + object.authInfo = null; + } + if (message.body != null && message.hasOwnProperty("body")) + object.body = $root.cosmos.tx.v1beta1.TxBody.toObject(message.body, options); + if (message.authInfo != null && message.hasOwnProperty("authInfo")) + object.authInfo = $root.cosmos.tx.v1beta1.AuthInfo.toObject(message.authInfo, options); + if (message.signatures && message.signatures.length) { + object.signatures = []; + for (var j = 0; j < message.signatures.length; ++j) + object.signatures[j] = options.bytes === String ? $util.base64.encode(message.signatures[j], 0, message.signatures[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.signatures[j]) : message.signatures[j]; + } + return object; + }; + + /** + * Converts this Tx to JSON. + * @function toJSON + * @memberof cosmos.tx.v1beta1.Tx + * @instance + * @returns {Object.} JSON object + */ + Tx.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Tx; + })(v1beta1.Tx || {}); + + v1beta1.TxRaw = (function(TxRaw) { + + /** + * Properties of a TxRaw. + * @memberof cosmos.tx.v1beta1 + * @interface ITxRaw + * @property {Uint8Array|null} [bodyBytes] TxRaw bodyBytes + * @property {Uint8Array|null} [authInfoBytes] TxRaw authInfoBytes + * @property {Array.|null} [signatures] TxRaw signatures + */ + + /** + * Constructs a new TxRaw. + * @memberof cosmos.tx.v1beta1 + * @classdesc Represents a TxRaw. + * @implements ITxRaw + * @constructor + * @param {cosmos.tx.v1beta1.ITxRaw=} [properties] Properties to set + */ + function TxRaw(properties) { + this.signatures = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TxRaw bodyBytes. + * @member {Uint8Array} bodyBytes + * @memberof cosmos.tx.v1beta1.TxRaw + * @instance + */ + TxRaw.prototype.bodyBytes = $util.newBuffer([]); + + /** + * TxRaw authInfoBytes. + * @member {Uint8Array} authInfoBytes + * @memberof cosmos.tx.v1beta1.TxRaw + * @instance + */ + TxRaw.prototype.authInfoBytes = $util.newBuffer([]); + + /** + * TxRaw signatures. + * @member {Array.} signatures + * @memberof cosmos.tx.v1beta1.TxRaw + * @instance + */ + TxRaw.prototype.signatures = $util.emptyArray; + + /** + * Creates a new TxRaw instance using the specified properties. + * @function create + * @memberof cosmos.tx.v1beta1.TxRaw + * @static + * @param {cosmos.tx.v1beta1.ITxRaw=} [properties] Properties to set + * @returns {cosmos.tx.v1beta1.TxRaw} TxRaw instance + */ + TxRaw.create = function create(properties) { + return new TxRaw(properties); + }; + + /** + * Encodes the specified TxRaw message. Does not implicitly {@link cosmos.tx.v1beta1.TxRaw.verify|verify} messages. + * @function encode + * @memberof cosmos.tx.v1beta1.TxRaw + * @static + * @param {cosmos.tx.v1beta1.ITxRaw} message TxRaw message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TxRaw.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.bodyBytes != null && Object.hasOwnProperty.call(message, "bodyBytes")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.bodyBytes); + if (message.authInfoBytes != null && Object.hasOwnProperty.call(message, "authInfoBytes")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.authInfoBytes); + if (message.signatures != null && message.signatures.length) + for (var i = 0; i < message.signatures.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.signatures[i]); + return writer; + }; + + /** + * Encodes the specified TxRaw message, length delimited. Does not implicitly {@link cosmos.tx.v1beta1.TxRaw.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.tx.v1beta1.TxRaw + * @static + * @param {cosmos.tx.v1beta1.ITxRaw} message TxRaw message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TxRaw.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TxRaw message from the specified reader or buffer. + * @function decode + * @memberof cosmos.tx.v1beta1.TxRaw + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.tx.v1beta1.TxRaw} TxRaw + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TxRaw.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.tx.v1beta1.TxRaw(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.bodyBytes = reader.bytes(); + break; + case 2: + message.authInfoBytes = reader.bytes(); + break; + case 3: + if (!(message.signatures && message.signatures.length)) + message.signatures = []; + message.signatures.push(reader.bytes()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TxRaw message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.tx.v1beta1.TxRaw + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.tx.v1beta1.TxRaw} TxRaw + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TxRaw.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TxRaw message. + * @function verify + * @memberof cosmos.tx.v1beta1.TxRaw + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TxRaw.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.bodyBytes != null && message.hasOwnProperty("bodyBytes")) + if (!(message.bodyBytes && typeof message.bodyBytes.length === "number" || $util.isString(message.bodyBytes))) + return "bodyBytes: buffer expected"; + if (message.authInfoBytes != null && message.hasOwnProperty("authInfoBytes")) + if (!(message.authInfoBytes && typeof message.authInfoBytes.length === "number" || $util.isString(message.authInfoBytes))) + return "authInfoBytes: buffer expected"; + if (message.signatures != null && message.hasOwnProperty("signatures")) { + if (!Array.isArray(message.signatures)) + return "signatures: array expected"; + for (var i = 0; i < message.signatures.length; ++i) + if (!(message.signatures[i] && typeof message.signatures[i].length === "number" || $util.isString(message.signatures[i]))) + return "signatures: buffer[] expected"; + } + return null; + }; + + /** + * Creates a TxRaw message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.tx.v1beta1.TxRaw + * @static + * @param {Object.} object Plain object + * @returns {cosmos.tx.v1beta1.TxRaw} TxRaw + */ + TxRaw.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.tx.v1beta1.TxRaw) + return object; + var message = new $root.cosmos.tx.v1beta1.TxRaw(); + if (object.bodyBytes != null) + if (typeof object.bodyBytes === "string") + $util.base64.decode(object.bodyBytes, message.bodyBytes = $util.newBuffer($util.base64.length(object.bodyBytes)), 0); + else if (object.bodyBytes.length) + message.bodyBytes = object.bodyBytes; + if (object.authInfoBytes != null) + if (typeof object.authInfoBytes === "string") + $util.base64.decode(object.authInfoBytes, message.authInfoBytes = $util.newBuffer($util.base64.length(object.authInfoBytes)), 0); + else if (object.authInfoBytes.length) + message.authInfoBytes = object.authInfoBytes; + if (object.signatures) { + if (!Array.isArray(object.signatures)) + throw TypeError(".cosmos.tx.v1beta1.TxRaw.signatures: array expected"); + message.signatures = []; + for (var i = 0; i < object.signatures.length; ++i) + if (typeof object.signatures[i] === "string") + $util.base64.decode(object.signatures[i], message.signatures[i] = $util.newBuffer($util.base64.length(object.signatures[i])), 0); + else if (object.signatures[i].length) + message.signatures[i] = object.signatures[i]; + } + return message; + }; + + /** + * Creates a plain object from a TxRaw message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.tx.v1beta1.TxRaw + * @static + * @param {cosmos.tx.v1beta1.TxRaw} message TxRaw + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TxRaw.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.signatures = []; + if (options.defaults) { + if (options.bytes === String) + object.bodyBytes = ""; + else { + object.bodyBytes = []; + if (options.bytes !== Array) + object.bodyBytes = $util.newBuffer(object.bodyBytes); + } + if (options.bytes === String) + object.authInfoBytes = ""; + else { + object.authInfoBytes = []; + if (options.bytes !== Array) + object.authInfoBytes = $util.newBuffer(object.authInfoBytes); + } + } + if (message.bodyBytes != null && message.hasOwnProperty("bodyBytes")) + object.bodyBytes = options.bytes === String ? $util.base64.encode(message.bodyBytes, 0, message.bodyBytes.length) : options.bytes === Array ? Array.prototype.slice.call(message.bodyBytes) : message.bodyBytes; + if (message.authInfoBytes != null && message.hasOwnProperty("authInfoBytes")) + object.authInfoBytes = options.bytes === String ? $util.base64.encode(message.authInfoBytes, 0, message.authInfoBytes.length) : options.bytes === Array ? Array.prototype.slice.call(message.authInfoBytes) : message.authInfoBytes; + if (message.signatures && message.signatures.length) { + object.signatures = []; + for (var j = 0; j < message.signatures.length; ++j) + object.signatures[j] = options.bytes === String ? $util.base64.encode(message.signatures[j], 0, message.signatures[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.signatures[j]) : message.signatures[j]; + } + return object; + }; + + /** + * Converts this TxRaw to JSON. + * @function toJSON + * @memberof cosmos.tx.v1beta1.TxRaw + * @instance + * @returns {Object.} JSON object + */ + TxRaw.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TxRaw; + })(v1beta1.TxRaw || {}); + + v1beta1.SignDoc = (function(SignDoc) { + + /** + * Properties of a SignDoc. + * @memberof cosmos.tx.v1beta1 + * @interface ISignDoc + * @property {Uint8Array|null} [bodyBytes] SignDoc bodyBytes + * @property {Uint8Array|null} [authInfoBytes] SignDoc authInfoBytes + * @property {string|null} [chainId] SignDoc chainId + * @property {number|Long|null} [accountNumber] SignDoc accountNumber + */ + + /** + * Constructs a new SignDoc. + * @memberof cosmos.tx.v1beta1 + * @classdesc Represents a SignDoc. + * @implements ISignDoc + * @constructor + * @param {cosmos.tx.v1beta1.ISignDoc=} [properties] Properties to set + */ + function SignDoc(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SignDoc bodyBytes. + * @member {Uint8Array} bodyBytes + * @memberof cosmos.tx.v1beta1.SignDoc + * @instance + */ + SignDoc.prototype.bodyBytes = $util.newBuffer([]); + + /** + * SignDoc authInfoBytes. + * @member {Uint8Array} authInfoBytes + * @memberof cosmos.tx.v1beta1.SignDoc + * @instance + */ + SignDoc.prototype.authInfoBytes = $util.newBuffer([]); + + /** + * SignDoc chainId. + * @member {string} chainId + * @memberof cosmos.tx.v1beta1.SignDoc + * @instance + */ + SignDoc.prototype.chainId = ""; + + /** + * SignDoc accountNumber. + * @member {number|Long} accountNumber + * @memberof cosmos.tx.v1beta1.SignDoc + * @instance + */ + SignDoc.prototype.accountNumber = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new SignDoc instance using the specified properties. + * @function create + * @memberof cosmos.tx.v1beta1.SignDoc + * @static + * @param {cosmos.tx.v1beta1.ISignDoc=} [properties] Properties to set + * @returns {cosmos.tx.v1beta1.SignDoc} SignDoc instance + */ + SignDoc.create = function create(properties) { + return new SignDoc(properties); + }; + + /** + * Encodes the specified SignDoc message. Does not implicitly {@link cosmos.tx.v1beta1.SignDoc.verify|verify} messages. + * @function encode + * @memberof cosmos.tx.v1beta1.SignDoc + * @static + * @param {cosmos.tx.v1beta1.ISignDoc} message SignDoc message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SignDoc.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.bodyBytes != null && Object.hasOwnProperty.call(message, "bodyBytes")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.bodyBytes); + if (message.authInfoBytes != null && Object.hasOwnProperty.call(message, "authInfoBytes")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.authInfoBytes); + if (message.chainId != null && Object.hasOwnProperty.call(message, "chainId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.chainId); + if (message.accountNumber != null && Object.hasOwnProperty.call(message, "accountNumber")) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.accountNumber); + return writer; + }; + + /** + * Encodes the specified SignDoc message, length delimited. Does not implicitly {@link cosmos.tx.v1beta1.SignDoc.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.tx.v1beta1.SignDoc + * @static + * @param {cosmos.tx.v1beta1.ISignDoc} message SignDoc message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SignDoc.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SignDoc message from the specified reader or buffer. + * @function decode + * @memberof cosmos.tx.v1beta1.SignDoc + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.tx.v1beta1.SignDoc} SignDoc + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SignDoc.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.tx.v1beta1.SignDoc(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.bodyBytes = reader.bytes(); + break; + case 2: + message.authInfoBytes = reader.bytes(); + break; + case 3: + message.chainId = reader.string(); + break; + case 4: + message.accountNumber = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SignDoc message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.tx.v1beta1.SignDoc + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.tx.v1beta1.SignDoc} SignDoc + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SignDoc.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SignDoc message. + * @function verify + * @memberof cosmos.tx.v1beta1.SignDoc + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SignDoc.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.bodyBytes != null && message.hasOwnProperty("bodyBytes")) + if (!(message.bodyBytes && typeof message.bodyBytes.length === "number" || $util.isString(message.bodyBytes))) + return "bodyBytes: buffer expected"; + if (message.authInfoBytes != null && message.hasOwnProperty("authInfoBytes")) + if (!(message.authInfoBytes && typeof message.authInfoBytes.length === "number" || $util.isString(message.authInfoBytes))) + return "authInfoBytes: buffer expected"; + if (message.chainId != null && message.hasOwnProperty("chainId")) + if (!$util.isString(message.chainId)) + return "chainId: string expected"; + if (message.accountNumber != null && message.hasOwnProperty("accountNumber")) + if (!$util.isInteger(message.accountNumber) && !(message.accountNumber && $util.isInteger(message.accountNumber.low) && $util.isInteger(message.accountNumber.high))) + return "accountNumber: integer|Long expected"; + return null; + }; + + /** + * Creates a SignDoc message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.tx.v1beta1.SignDoc + * @static + * @param {Object.} object Plain object + * @returns {cosmos.tx.v1beta1.SignDoc} SignDoc + */ + SignDoc.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.tx.v1beta1.SignDoc) + return object; + var message = new $root.cosmos.tx.v1beta1.SignDoc(); + if (object.bodyBytes != null) + if (typeof object.bodyBytes === "string") + $util.base64.decode(object.bodyBytes, message.bodyBytes = $util.newBuffer($util.base64.length(object.bodyBytes)), 0); + else if (object.bodyBytes.length) + message.bodyBytes = object.bodyBytes; + if (object.authInfoBytes != null) + if (typeof object.authInfoBytes === "string") + $util.base64.decode(object.authInfoBytes, message.authInfoBytes = $util.newBuffer($util.base64.length(object.authInfoBytes)), 0); + else if (object.authInfoBytes.length) + message.authInfoBytes = object.authInfoBytes; + if (object.chainId != null) + message.chainId = String(object.chainId); + if (object.accountNumber != null) + if ($util.Long) + (message.accountNumber = $util.Long.fromValue(object.accountNumber)).unsigned = true; + else if (typeof object.accountNumber === "string") + message.accountNumber = parseInt(object.accountNumber, 10); + else if (typeof object.accountNumber === "number") + message.accountNumber = object.accountNumber; + else if (typeof object.accountNumber === "object") + message.accountNumber = new $util.LongBits(object.accountNumber.low >>> 0, object.accountNumber.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a SignDoc message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.tx.v1beta1.SignDoc + * @static + * @param {cosmos.tx.v1beta1.SignDoc} message SignDoc + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SignDoc.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.bodyBytes = ""; + else { + object.bodyBytes = []; + if (options.bytes !== Array) + object.bodyBytes = $util.newBuffer(object.bodyBytes); + } + if (options.bytes === String) + object.authInfoBytes = ""; + else { + object.authInfoBytes = []; + if (options.bytes !== Array) + object.authInfoBytes = $util.newBuffer(object.authInfoBytes); + } + object.chainId = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.accountNumber = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.accountNumber = options.longs === String ? "0" : 0; + } + if (message.bodyBytes != null && message.hasOwnProperty("bodyBytes")) + object.bodyBytes = options.bytes === String ? $util.base64.encode(message.bodyBytes, 0, message.bodyBytes.length) : options.bytes === Array ? Array.prototype.slice.call(message.bodyBytes) : message.bodyBytes; + if (message.authInfoBytes != null && message.hasOwnProperty("authInfoBytes")) + object.authInfoBytes = options.bytes === String ? $util.base64.encode(message.authInfoBytes, 0, message.authInfoBytes.length) : options.bytes === Array ? Array.prototype.slice.call(message.authInfoBytes) : message.authInfoBytes; + if (message.chainId != null && message.hasOwnProperty("chainId")) + object.chainId = message.chainId; + if (message.accountNumber != null && message.hasOwnProperty("accountNumber")) + if (typeof message.accountNumber === "number") + object.accountNumber = options.longs === String ? String(message.accountNumber) : message.accountNumber; + else + object.accountNumber = options.longs === String ? $util.Long.prototype.toString.call(message.accountNumber) : options.longs === Number ? new $util.LongBits(message.accountNumber.low >>> 0, message.accountNumber.high >>> 0).toNumber(true) : message.accountNumber; + return object; + }; + + /** + * Converts this SignDoc to JSON. + * @function toJSON + * @memberof cosmos.tx.v1beta1.SignDoc + * @instance + * @returns {Object.} JSON object + */ + SignDoc.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SignDoc; + })(v1beta1.SignDoc || {}); + + v1beta1.TxBody = (function(TxBody) { + + /** + * Properties of a TxBody. + * @memberof cosmos.tx.v1beta1 + * @interface ITxBody + * @property {Array.|null} [messages] TxBody messages + * @property {string|null} [memo] TxBody memo + * @property {number|Long|null} [timeoutHeight] TxBody timeoutHeight + * @property {Array.|null} [extensionOptions] TxBody extensionOptions + * @property {Array.|null} [nonCriticalExtensionOptions] TxBody nonCriticalExtensionOptions + */ + + /** + * Constructs a new TxBody. + * @memberof cosmos.tx.v1beta1 + * @classdesc Represents a TxBody. + * @implements ITxBody + * @constructor + * @param {cosmos.tx.v1beta1.ITxBody=} [properties] Properties to set + */ + function TxBody(properties) { + this.messages = []; + this.extensionOptions = []; + this.nonCriticalExtensionOptions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TxBody messages. + * @member {Array.} messages + * @memberof cosmos.tx.v1beta1.TxBody + * @instance + */ + TxBody.prototype.messages = $util.emptyArray; + + /** + * TxBody memo. + * @member {string} memo + * @memberof cosmos.tx.v1beta1.TxBody + * @instance + */ + TxBody.prototype.memo = ""; + + /** + * TxBody timeoutHeight. + * @member {number|Long} timeoutHeight + * @memberof cosmos.tx.v1beta1.TxBody + * @instance + */ + TxBody.prototype.timeoutHeight = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * TxBody extensionOptions. + * @member {Array.} extensionOptions + * @memberof cosmos.tx.v1beta1.TxBody + * @instance + */ + TxBody.prototype.extensionOptions = $util.emptyArray; + + /** + * TxBody nonCriticalExtensionOptions. + * @member {Array.} nonCriticalExtensionOptions + * @memberof cosmos.tx.v1beta1.TxBody + * @instance + */ + TxBody.prototype.nonCriticalExtensionOptions = $util.emptyArray; + + /** + * Creates a new TxBody instance using the specified properties. + * @function create + * @memberof cosmos.tx.v1beta1.TxBody + * @static + * @param {cosmos.tx.v1beta1.ITxBody=} [properties] Properties to set + * @returns {cosmos.tx.v1beta1.TxBody} TxBody instance + */ + TxBody.create = function create(properties) { + return new TxBody(properties); + }; + + /** + * Encodes the specified TxBody message. Does not implicitly {@link cosmos.tx.v1beta1.TxBody.verify|verify} messages. + * @function encode + * @memberof cosmos.tx.v1beta1.TxBody + * @static + * @param {cosmos.tx.v1beta1.ITxBody} message TxBody message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TxBody.encode = function encode(message, writer) { + console.log('encoding: ', message) + if (!writer) + writer = $Writer.create(); + if (message.messages != null && message.messages.length) + for (var i = 0; i < message.messages.length; ++i) + message.messages[i].constructor.encode(message.messages[i].value, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim() + // $root.google.protobuf.Any.encode(message.messages[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.memo != null && Object.hasOwnProperty.call(message, "memo")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.memo); + if (message.timeoutHeight != null && Object.hasOwnProperty.call(message, "timeoutHeight")) + writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.timeoutHeight); + if (message.extensionOptions != null && message.extensionOptions.length) + for (var i = 0; i < message.extensionOptions.length; ++i) + $root.google.protobuf.Any.encode(message.extensionOptions[i], writer.uint32(/* id 1023, wireType 2 =*/8186).fork()).ldelim(); + if (message.nonCriticalExtensionOptions != null && message.nonCriticalExtensionOptions.length) + for (var i = 0; i < message.nonCriticalExtensionOptions.length; ++i) + $root.google.protobuf.Any.encode(message.nonCriticalExtensionOptions[i], writer.uint32(/* id 2047, wireType 2 =*/16378).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TxBody message, length delimited. Does not implicitly {@link cosmos.tx.v1beta1.TxBody.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.tx.v1beta1.TxBody + * @static + * @param {cosmos.tx.v1beta1.ITxBody} message TxBody message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TxBody.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TxBody message from the specified reader or buffer. + * @function decode + * @memberof cosmos.tx.v1beta1.TxBody + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.tx.v1beta1.TxBody} TxBody + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TxBody.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.tx.v1beta1.TxBody(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.messages && message.messages.length)) + message.messages = []; + message.messages.push($root.google.protobuf.Any.decode(reader, reader.uint32())); + break; + case 2: + message.memo = reader.string(); + break; + case 3: + message.timeoutHeight = reader.uint64(); + break; + case 1023: + if (!(message.extensionOptions && message.extensionOptions.length)) + message.extensionOptions = []; + message.extensionOptions.push($root.google.protobuf.Any.decode(reader, reader.uint32())); + break; + case 2047: + if (!(message.nonCriticalExtensionOptions && message.nonCriticalExtensionOptions.length)) + message.nonCriticalExtensionOptions = []; + message.nonCriticalExtensionOptions.push($root.google.protobuf.Any.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TxBody message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.tx.v1beta1.TxBody + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.tx.v1beta1.TxBody} TxBody + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TxBody.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TxBody message. + * @function verify + * @memberof cosmos.tx.v1beta1.TxBody + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TxBody.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.messages != null && message.hasOwnProperty("messages")) { + if (!Array.isArray(message.messages)) + return "messages: array expected"; + for (var i = 0; i < message.messages.length; ++i) { + var error = $root.google.protobuf.Any.verify(message.messages[i]); + if (error) + return "messages." + error; + } + } + if (message.memo != null && message.hasOwnProperty("memo")) + if (!$util.isString(message.memo)) + return "memo: string expected"; + if (message.timeoutHeight != null && message.hasOwnProperty("timeoutHeight")) + if (!$util.isInteger(message.timeoutHeight) && !(message.timeoutHeight && $util.isInteger(message.timeoutHeight.low) && $util.isInteger(message.timeoutHeight.high))) + return "timeoutHeight: integer|Long expected"; + if (message.extensionOptions != null && message.hasOwnProperty("extensionOptions")) { + if (!Array.isArray(message.extensionOptions)) + return "extensionOptions: array expected"; + for (var i = 0; i < message.extensionOptions.length; ++i) { + var error = $root.google.protobuf.Any.verify(message.extensionOptions[i]); + if (error) + return "extensionOptions." + error; + } + } + if (message.nonCriticalExtensionOptions != null && message.hasOwnProperty("nonCriticalExtensionOptions")) { + if (!Array.isArray(message.nonCriticalExtensionOptions)) + return "nonCriticalExtensionOptions: array expected"; + for (var i = 0; i < message.nonCriticalExtensionOptions.length; ++i) { + var error = $root.google.protobuf.Any.verify(message.nonCriticalExtensionOptions[i]); + if (error) + return "nonCriticalExtensionOptions." + error; + } + } + return null; + }; + + /** + * Creates a TxBody message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.tx.v1beta1.TxBody + * @static + * @param {Object.} object Plain object + * @returns {cosmos.tx.v1beta1.TxBody} TxBody + */ + TxBody.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.tx.v1beta1.TxBody) + return object; + var message = new $root.cosmos.tx.v1beta1.TxBody(); + if (object.messages) { + if (!Array.isArray(object.messages)) + throw TypeError(".cosmos.tx.v1beta1.TxBody.messages: array expected"); + message.messages = []; + for (var i = 0; i < object.messages.length; ++i) { + if (typeof object.messages[i] !== "object") + throw TypeError(".cosmos.tx.v1beta1.TxBody.messages: object expected"); + message.messages[i] = $root.google.protobuf.Any.fromObject(object.messages[i]); + } + } + if (object.memo != null) + message.memo = String(object.memo); + if (object.timeoutHeight != null) + if ($util.Long) + (message.timeoutHeight = $util.Long.fromValue(object.timeoutHeight)).unsigned = true; + else if (typeof object.timeoutHeight === "string") + message.timeoutHeight = parseInt(object.timeoutHeight, 10); + else if (typeof object.timeoutHeight === "number") + message.timeoutHeight = object.timeoutHeight; + else if (typeof object.timeoutHeight === "object") + message.timeoutHeight = new $util.LongBits(object.timeoutHeight.low >>> 0, object.timeoutHeight.high >>> 0).toNumber(true); + if (object.extensionOptions) { + if (!Array.isArray(object.extensionOptions)) + throw TypeError(".cosmos.tx.v1beta1.TxBody.extensionOptions: array expected"); + message.extensionOptions = []; + for (var i = 0; i < object.extensionOptions.length; ++i) { + if (typeof object.extensionOptions[i] !== "object") + throw TypeError(".cosmos.tx.v1beta1.TxBody.extensionOptions: object expected"); + message.extensionOptions[i] = $root.google.protobuf.Any.fromObject(object.extensionOptions[i]); + } + } + if (object.nonCriticalExtensionOptions) { + if (!Array.isArray(object.nonCriticalExtensionOptions)) + throw TypeError(".cosmos.tx.v1beta1.TxBody.nonCriticalExtensionOptions: array expected"); + message.nonCriticalExtensionOptions = []; + for (var i = 0; i < object.nonCriticalExtensionOptions.length; ++i) { + if (typeof object.nonCriticalExtensionOptions[i] !== "object") + throw TypeError(".cosmos.tx.v1beta1.TxBody.nonCriticalExtensionOptions: object expected"); + message.nonCriticalExtensionOptions[i] = $root.google.protobuf.Any.fromObject(object.nonCriticalExtensionOptions[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a TxBody message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.tx.v1beta1.TxBody + * @static + * @param {cosmos.tx.v1beta1.TxBody} message TxBody + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TxBody.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.messages = []; + object.extensionOptions = []; + object.nonCriticalExtensionOptions = []; + } + if (options.defaults) { + object.memo = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.timeoutHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.timeoutHeight = options.longs === String ? "0" : 0; + } + if (message.messages && message.messages.length) { + object.messages = []; + for (var j = 0; j < message.messages.length; ++j) + object.messages[j] = $root.google.protobuf.Any.toObject(message.messages[j], options); + } + if (message.memo != null && message.hasOwnProperty("memo")) + object.memo = message.memo; + if (message.timeoutHeight != null && message.hasOwnProperty("timeoutHeight")) + if (typeof message.timeoutHeight === "number") + object.timeoutHeight = options.longs === String ? String(message.timeoutHeight) : message.timeoutHeight; + else + object.timeoutHeight = options.longs === String ? $util.Long.prototype.toString.call(message.timeoutHeight) : options.longs === Number ? new $util.LongBits(message.timeoutHeight.low >>> 0, message.timeoutHeight.high >>> 0).toNumber(true) : message.timeoutHeight; + if (message.extensionOptions && message.extensionOptions.length) { + object.extensionOptions = []; + for (var j = 0; j < message.extensionOptions.length; ++j) + object.extensionOptions[j] = $root.google.protobuf.Any.toObject(message.extensionOptions[j], options); + } + if (message.nonCriticalExtensionOptions && message.nonCriticalExtensionOptions.length) { + object.nonCriticalExtensionOptions = []; + for (var j = 0; j < message.nonCriticalExtensionOptions.length; ++j) + object.nonCriticalExtensionOptions[j] = $root.google.protobuf.Any.toObject(message.nonCriticalExtensionOptions[j], options); + } + return object; + }; + + /** + * Converts this TxBody to JSON. + * @function toJSON + * @memberof cosmos.tx.v1beta1.TxBody + * @instance + * @returns {Object.} JSON object + */ + TxBody.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TxBody; + })(v1beta1.TxBody || {}); + + v1beta1.AuthInfo = (function(AuthInfo) { + + /** + * Properties of an AuthInfo. + * @memberof cosmos.tx.v1beta1 + * @interface IAuthInfo + * @property {Array.|null} [signerInfos] AuthInfo signerInfos + * @property {cosmos.tx.v1beta1.IFee|null} [fee] AuthInfo fee + */ + + /** + * Constructs a new AuthInfo. + * @memberof cosmos.tx.v1beta1 + * @classdesc Represents an AuthInfo. + * @implements IAuthInfo + * @constructor + * @param {cosmos.tx.v1beta1.IAuthInfo=} [properties] Properties to set + */ + function AuthInfo(properties) { + this.signerInfos = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AuthInfo signerInfos. + * @member {Array.} signerInfos + * @memberof cosmos.tx.v1beta1.AuthInfo + * @instance + */ + AuthInfo.prototype.signerInfos = $util.emptyArray; + + /** + * AuthInfo fee. + * @member {cosmos.tx.v1beta1.IFee|null|undefined} fee + * @memberof cosmos.tx.v1beta1.AuthInfo + * @instance + */ + AuthInfo.prototype.fee = null; + + /** + * Creates a new AuthInfo instance using the specified properties. + * @function create + * @memberof cosmos.tx.v1beta1.AuthInfo + * @static + * @param {cosmos.tx.v1beta1.IAuthInfo=} [properties] Properties to set + * @returns {cosmos.tx.v1beta1.AuthInfo} AuthInfo instance + */ + AuthInfo.create = function create(properties) { + return new AuthInfo(properties); + }; + + /** + * Encodes the specified AuthInfo message. Does not implicitly {@link cosmos.tx.v1beta1.AuthInfo.verify|verify} messages. + * @function encode + * @memberof cosmos.tx.v1beta1.AuthInfo + * @static + * @param {cosmos.tx.v1beta1.IAuthInfo} message AuthInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuthInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.signerInfos != null && message.signerInfos.length) + for (var i = 0; i < message.signerInfos.length; ++i) + $root.cosmos.tx.v1beta1.SignerInfo.encode(message.signerInfos[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.fee != null && Object.hasOwnProperty.call(message, "fee")) + $root.cosmos.tx.v1beta1.Fee.encode(message.fee, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AuthInfo message, length delimited. Does not implicitly {@link cosmos.tx.v1beta1.AuthInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.tx.v1beta1.AuthInfo + * @static + * @param {cosmos.tx.v1beta1.IAuthInfo} message AuthInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuthInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AuthInfo message from the specified reader or buffer. + * @function decode + * @memberof cosmos.tx.v1beta1.AuthInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.tx.v1beta1.AuthInfo} AuthInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuthInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.tx.v1beta1.AuthInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.signerInfos && message.signerInfos.length)) + message.signerInfos = []; + message.signerInfos.push($root.cosmos.tx.v1beta1.SignerInfo.decode(reader, reader.uint32())); + break; + case 2: + message.fee = $root.cosmos.tx.v1beta1.Fee.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AuthInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.tx.v1beta1.AuthInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.tx.v1beta1.AuthInfo} AuthInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuthInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AuthInfo message. + * @function verify + * @memberof cosmos.tx.v1beta1.AuthInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AuthInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.signerInfos != null && message.hasOwnProperty("signerInfos")) { + if (!Array.isArray(message.signerInfos)) + return "signerInfos: array expected"; + for (var i = 0; i < message.signerInfos.length; ++i) { + var error = $root.cosmos.tx.v1beta1.SignerInfo.verify(message.signerInfos[i]); + if (error) + return "signerInfos." + error; + } + } + if (message.fee != null && message.hasOwnProperty("fee")) { + var error = $root.cosmos.tx.v1beta1.Fee.verify(message.fee); + if (error) + return "fee." + error; + } + return null; + }; + + /** + * Creates an AuthInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.tx.v1beta1.AuthInfo + * @static + * @param {Object.} object Plain object + * @returns {cosmos.tx.v1beta1.AuthInfo} AuthInfo + */ + AuthInfo.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.tx.v1beta1.AuthInfo) + return object; + var message = new $root.cosmos.tx.v1beta1.AuthInfo(); + if (object.signerInfos) { + if (!Array.isArray(object.signerInfos)) + throw TypeError(".cosmos.tx.v1beta1.AuthInfo.signerInfos: array expected"); + message.signerInfos = []; + for (var i = 0; i < object.signerInfos.length; ++i) { + if (typeof object.signerInfos[i] !== "object") + throw TypeError(".cosmos.tx.v1beta1.AuthInfo.signerInfos: object expected"); + message.signerInfos[i] = $root.cosmos.tx.v1beta1.SignerInfo.fromObject(object.signerInfos[i]); + } + } + if (object.fee != null) { + if (typeof object.fee !== "object") + throw TypeError(".cosmos.tx.v1beta1.AuthInfo.fee: object expected"); + message.fee = $root.cosmos.tx.v1beta1.Fee.fromObject(object.fee); + } + return message; + }; + + /** + * Creates a plain object from an AuthInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.tx.v1beta1.AuthInfo + * @static + * @param {cosmos.tx.v1beta1.AuthInfo} message AuthInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AuthInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.signerInfos = []; + if (options.defaults) + object.fee = null; + if (message.signerInfos && message.signerInfos.length) { + object.signerInfos = []; + for (var j = 0; j < message.signerInfos.length; ++j) + object.signerInfos[j] = $root.cosmos.tx.v1beta1.SignerInfo.toObject(message.signerInfos[j], options); + } + if (message.fee != null && message.hasOwnProperty("fee")) + object.fee = $root.cosmos.tx.v1beta1.Fee.toObject(message.fee, options); + return object; + }; + + /** + * Converts this AuthInfo to JSON. + * @function toJSON + * @memberof cosmos.tx.v1beta1.AuthInfo + * @instance + * @returns {Object.} JSON object + */ + AuthInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return AuthInfo; + })(v1beta1.AuthInfo || {}); + + v1beta1.SignerInfo = (function(SignerInfo) { + + /** + * Properties of a SignerInfo. + * @memberof cosmos.tx.v1beta1 + * @interface ISignerInfo + * @property {google.protobuf.IAny|null} [publicKey] SignerInfo publicKey + * @property {cosmos.tx.v1beta1.IModeInfo|null} [modeInfo] SignerInfo modeInfo + * @property {number|Long|null} [sequence] SignerInfo sequence + */ + + /** + * Constructs a new SignerInfo. + * @memberof cosmos.tx.v1beta1 + * @classdesc Represents a SignerInfo. + * @implements ISignerInfo + * @constructor + * @param {cosmos.tx.v1beta1.ISignerInfo=} [properties] Properties to set + */ + function SignerInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SignerInfo publicKey. + * @member {google.protobuf.IAny|null|undefined} publicKey + * @memberof cosmos.tx.v1beta1.SignerInfo + * @instance + */ + SignerInfo.prototype.publicKey = null; + + /** + * SignerInfo modeInfo. + * @member {cosmos.tx.v1beta1.IModeInfo|null|undefined} modeInfo + * @memberof cosmos.tx.v1beta1.SignerInfo + * @instance + */ + SignerInfo.prototype.modeInfo = null; + + /** + * SignerInfo sequence. + * @member {number|Long} sequence + * @memberof cosmos.tx.v1beta1.SignerInfo + * @instance + */ + SignerInfo.prototype.sequence = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new SignerInfo instance using the specified properties. + * @function create + * @memberof cosmos.tx.v1beta1.SignerInfo + * @static + * @param {cosmos.tx.v1beta1.ISignerInfo=} [properties] Properties to set + * @returns {cosmos.tx.v1beta1.SignerInfo} SignerInfo instance + */ + SignerInfo.create = function create(properties) { + return new SignerInfo(properties); + }; + + /** + * Encodes the specified SignerInfo message. Does not implicitly {@link cosmos.tx.v1beta1.SignerInfo.verify|verify} messages. + * @function encode + * @memberof cosmos.tx.v1beta1.SignerInfo + * @static + * @param {cosmos.tx.v1beta1.ISignerInfo} message SignerInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SignerInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.publicKey != null && Object.hasOwnProperty.call(message, "publicKey")) + $root.google.protobuf.Any.encode(message.publicKey, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.modeInfo != null && Object.hasOwnProperty.call(message, "modeInfo")) + $root.cosmos.tx.v1beta1.ModeInfo.encode(message.modeInfo, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.sequence != null && Object.hasOwnProperty.call(message, "sequence")) + writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.sequence); + return writer; + }; + + /** + * Encodes the specified SignerInfo message, length delimited. Does not implicitly {@link cosmos.tx.v1beta1.SignerInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.tx.v1beta1.SignerInfo + * @static + * @param {cosmos.tx.v1beta1.ISignerInfo} message SignerInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SignerInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SignerInfo message from the specified reader or buffer. + * @function decode + * @memberof cosmos.tx.v1beta1.SignerInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.tx.v1beta1.SignerInfo} SignerInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SignerInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.tx.v1beta1.SignerInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.publicKey = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + case 2: + message.modeInfo = $root.cosmos.tx.v1beta1.ModeInfo.decode(reader, reader.uint32()); + break; + case 3: + message.sequence = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SignerInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.tx.v1beta1.SignerInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.tx.v1beta1.SignerInfo} SignerInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SignerInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SignerInfo message. + * @function verify + * @memberof cosmos.tx.v1beta1.SignerInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SignerInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.publicKey != null && message.hasOwnProperty("publicKey")) { + var error = $root.google.protobuf.Any.verify(message.publicKey); + if (error) + return "publicKey." + error; + } + if (message.modeInfo != null && message.hasOwnProperty("modeInfo")) { + var error = $root.cosmos.tx.v1beta1.ModeInfo.verify(message.modeInfo); + if (error) + return "modeInfo." + error; + } + if (message.sequence != null && message.hasOwnProperty("sequence")) + if (!$util.isInteger(message.sequence) && !(message.sequence && $util.isInteger(message.sequence.low) && $util.isInteger(message.sequence.high))) + return "sequence: integer|Long expected"; + return null; + }; + + /** + * Creates a SignerInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.tx.v1beta1.SignerInfo + * @static + * @param {Object.} object Plain object + * @returns {cosmos.tx.v1beta1.SignerInfo} SignerInfo + */ + SignerInfo.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.tx.v1beta1.SignerInfo) + return object; + var message = new $root.cosmos.tx.v1beta1.SignerInfo(); + if (object.publicKey != null) { + if (typeof object.publicKey !== "object") + throw TypeError(".cosmos.tx.v1beta1.SignerInfo.publicKey: object expected"); + message.publicKey = $root.google.protobuf.Any.fromObject(object.publicKey); + } + if (object.modeInfo != null) { + if (typeof object.modeInfo !== "object") + throw TypeError(".cosmos.tx.v1beta1.SignerInfo.modeInfo: object expected"); + message.modeInfo = $root.cosmos.tx.v1beta1.ModeInfo.fromObject(object.modeInfo); + } + if (object.sequence != null) + if ($util.Long) + (message.sequence = $util.Long.fromValue(object.sequence)).unsigned = true; + else if (typeof object.sequence === "string") + message.sequence = parseInt(object.sequence, 10); + else if (typeof object.sequence === "number") + message.sequence = object.sequence; + else if (typeof object.sequence === "object") + message.sequence = new $util.LongBits(object.sequence.low >>> 0, object.sequence.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a SignerInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.tx.v1beta1.SignerInfo + * @static + * @param {cosmos.tx.v1beta1.SignerInfo} message SignerInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SignerInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.publicKey = null; + object.modeInfo = null; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.sequence = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.sequence = options.longs === String ? "0" : 0; + } + if (message.publicKey != null && message.hasOwnProperty("publicKey")) + object.publicKey = $root.google.protobuf.Any.toObject(message.publicKey, options); + if (message.modeInfo != null && message.hasOwnProperty("modeInfo")) + object.modeInfo = $root.cosmos.tx.v1beta1.ModeInfo.toObject(message.modeInfo, options); + if (message.sequence != null && message.hasOwnProperty("sequence")) + if (typeof message.sequence === "number") + object.sequence = options.longs === String ? String(message.sequence) : message.sequence; + else + object.sequence = options.longs === String ? $util.Long.prototype.toString.call(message.sequence) : options.longs === Number ? new $util.LongBits(message.sequence.low >>> 0, message.sequence.high >>> 0).toNumber(true) : message.sequence; + return object; + }; + + /** + * Converts this SignerInfo to JSON. + * @function toJSON + * @memberof cosmos.tx.v1beta1.SignerInfo + * @instance + * @returns {Object.} JSON object + */ + SignerInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SignerInfo; + })(v1beta1.SignerInfo || {}); + + v1beta1.ModeInfo = (function(ModeInfo) { + + /** + * Properties of a ModeInfo. + * @memberof cosmos.tx.v1beta1 + * @interface IModeInfo + * @property {cosmos.tx.v1beta1.ModeInfo.ISingle|null} [single] ModeInfo single + * @property {cosmos.tx.v1beta1.ModeInfo.IMulti|null} [multi] ModeInfo multi + */ + + /** + * Constructs a new ModeInfo. + * @memberof cosmos.tx.v1beta1 + * @classdesc Represents a ModeInfo. + * @implements IModeInfo + * @constructor + * @param {cosmos.tx.v1beta1.IModeInfo=} [properties] Properties to set + */ + function ModeInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ModeInfo single. + * @member {cosmos.tx.v1beta1.ModeInfo.ISingle|null|undefined} single + * @memberof cosmos.tx.v1beta1.ModeInfo + * @instance + */ + ModeInfo.prototype.single = null; + + /** + * ModeInfo multi. + * @member {cosmos.tx.v1beta1.ModeInfo.IMulti|null|undefined} multi + * @memberof cosmos.tx.v1beta1.ModeInfo + * @instance + */ + ModeInfo.prototype.multi = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ModeInfo sum. + * @member {"single"|"multi"|undefined} sum + * @memberof cosmos.tx.v1beta1.ModeInfo + * @instance + */ + Object.defineProperty(ModeInfo.prototype, "sum", { + get: $util.oneOfGetter($oneOfFields = ["single", "multi"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ModeInfo instance using the specified properties. + * @function create + * @memberof cosmos.tx.v1beta1.ModeInfo + * @static + * @param {cosmos.tx.v1beta1.IModeInfo=} [properties] Properties to set + * @returns {cosmos.tx.v1beta1.ModeInfo} ModeInfo instance + */ + ModeInfo.create = function create(properties) { + return new ModeInfo(properties); + }; + + /** + * Encodes the specified ModeInfo message. Does not implicitly {@link cosmos.tx.v1beta1.ModeInfo.verify|verify} messages. + * @function encode + * @memberof cosmos.tx.v1beta1.ModeInfo + * @static + * @param {cosmos.tx.v1beta1.IModeInfo} message ModeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ModeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.single != null && Object.hasOwnProperty.call(message, "single")) + $root.cosmos.tx.v1beta1.ModeInfo.Single.encode(message.single, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.multi != null && Object.hasOwnProperty.call(message, "multi")) + $root.cosmos.tx.v1beta1.ModeInfo.Multi.encode(message.multi, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ModeInfo message, length delimited. Does not implicitly {@link cosmos.tx.v1beta1.ModeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.tx.v1beta1.ModeInfo + * @static + * @param {cosmos.tx.v1beta1.IModeInfo} message ModeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ModeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ModeInfo message from the specified reader or buffer. + * @function decode + * @memberof cosmos.tx.v1beta1.ModeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.tx.v1beta1.ModeInfo} ModeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ModeInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.tx.v1beta1.ModeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.single = $root.cosmos.tx.v1beta1.ModeInfo.Single.decode(reader, reader.uint32()); + break; + case 2: + message.multi = $root.cosmos.tx.v1beta1.ModeInfo.Multi.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ModeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.tx.v1beta1.ModeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.tx.v1beta1.ModeInfo} ModeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ModeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ModeInfo message. + * @function verify + * @memberof cosmos.tx.v1beta1.ModeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ModeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.single != null && message.hasOwnProperty("single")) { + properties.sum = 1; + { + var error = $root.cosmos.tx.v1beta1.ModeInfo.Single.verify(message.single); + if (error) + return "single." + error; + } + } + if (message.multi != null && message.hasOwnProperty("multi")) { + if (properties.sum === 1) + return "sum: multiple values"; + properties.sum = 1; + { + var error = $root.cosmos.tx.v1beta1.ModeInfo.Multi.verify(message.multi); + if (error) + return "multi." + error; + } + } + return null; + }; + + /** + * Creates a ModeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.tx.v1beta1.ModeInfo + * @static + * @param {Object.} object Plain object + * @returns {cosmos.tx.v1beta1.ModeInfo} ModeInfo + */ + ModeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.tx.v1beta1.ModeInfo) + return object; + var message = new $root.cosmos.tx.v1beta1.ModeInfo(); + if (object.single != null) { + if (typeof object.single !== "object") + throw TypeError(".cosmos.tx.v1beta1.ModeInfo.single: object expected"); + message.single = $root.cosmos.tx.v1beta1.ModeInfo.Single.fromObject(object.single); + } + if (object.multi != null) { + if (typeof object.multi !== "object") + throw TypeError(".cosmos.tx.v1beta1.ModeInfo.multi: object expected"); + message.multi = $root.cosmos.tx.v1beta1.ModeInfo.Multi.fromObject(object.multi); + } + return message; + }; + + /** + * Creates a plain object from a ModeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.tx.v1beta1.ModeInfo + * @static + * @param {cosmos.tx.v1beta1.ModeInfo} message ModeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ModeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.single != null && message.hasOwnProperty("single")) { + object.single = $root.cosmos.tx.v1beta1.ModeInfo.Single.toObject(message.single, options); + if (options.oneofs) + object.sum = "single"; + } + if (message.multi != null && message.hasOwnProperty("multi")) { + object.multi = $root.cosmos.tx.v1beta1.ModeInfo.Multi.toObject(message.multi, options); + if (options.oneofs) + object.sum = "multi"; + } + return object; + }; + + /** + * Converts this ModeInfo to JSON. + * @function toJSON + * @memberof cosmos.tx.v1beta1.ModeInfo + * @instance + * @returns {Object.} JSON object + */ + ModeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + ModeInfo.Single = (function(Single) { + + /** + * Properties of a Single. + * @memberof cosmos.tx.v1beta1.ModeInfo + * @interface ISingle + * @property {cosmos.tx.signing.v1beta1.SignMode|null} [mode] Single mode + */ + + /** + * Constructs a new Single. + * @memberof cosmos.tx.v1beta1.ModeInfo + * @classdesc Represents a Single. + * @implements ISingle + * @constructor + * @param {cosmos.tx.v1beta1.ModeInfo.ISingle=} [properties] Properties to set + */ + function Single(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Single mode. + * @member {cosmos.tx.signing.v1beta1.SignMode} mode + * @memberof cosmos.tx.v1beta1.ModeInfo.Single + * @instance + */ + Single.prototype.mode = 0; + + /** + * Creates a new Single instance using the specified properties. + * @function create + * @memberof cosmos.tx.v1beta1.ModeInfo.Single + * @static + * @param {cosmos.tx.v1beta1.ModeInfo.ISingle=} [properties] Properties to set + * @returns {cosmos.tx.v1beta1.ModeInfo.Single} Single instance + */ + Single.create = function create(properties) { + return new Single(properties); + }; + + /** + * Encodes the specified Single message. Does not implicitly {@link cosmos.tx.v1beta1.ModeInfo.Single.verify|verify} messages. + * @function encode + * @memberof cosmos.tx.v1beta1.ModeInfo.Single + * @static + * @param {cosmos.tx.v1beta1.ModeInfo.ISingle} message Single message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Single.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.mode != null && Object.hasOwnProperty.call(message, "mode")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.mode); + return writer; + }; + + /** + * Encodes the specified Single message, length delimited. Does not implicitly {@link cosmos.tx.v1beta1.ModeInfo.Single.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.tx.v1beta1.ModeInfo.Single + * @static + * @param {cosmos.tx.v1beta1.ModeInfo.ISingle} message Single message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Single.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Single message from the specified reader or buffer. + * @function decode + * @memberof cosmos.tx.v1beta1.ModeInfo.Single + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.tx.v1beta1.ModeInfo.Single} Single + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Single.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.tx.v1beta1.ModeInfo.Single(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.mode = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Single message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.tx.v1beta1.ModeInfo.Single + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.tx.v1beta1.ModeInfo.Single} Single + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Single.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Single message. + * @function verify + * @memberof cosmos.tx.v1beta1.ModeInfo.Single + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Single.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.mode != null && message.hasOwnProperty("mode")) + switch (message.mode) { + default: + return "mode: enum value expected"; + case 0: + case 1: + case 2: + case 127: + break; + } + return null; + }; + + /** + * Creates a Single message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.tx.v1beta1.ModeInfo.Single + * @static + * @param {Object.} object Plain object + * @returns {cosmos.tx.v1beta1.ModeInfo.Single} Single + */ + Single.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.tx.v1beta1.ModeInfo.Single) + return object; + var message = new $root.cosmos.tx.v1beta1.ModeInfo.Single(); + switch (object.mode) { + case "SIGN_MODE_UNSPECIFIED": + case 0: + message.mode = 0; + break; + case "SIGN_MODE_DIRECT": + case 1: + message.mode = 1; + break; + case "SIGN_MODE_TEXTUAL": + case 2: + message.mode = 2; + break; + case "SIGN_MODE_LEGACY_AMINO_JSON": + case 127: + message.mode = 127; + break; + } + return message; + }; + + /** + * Creates a plain object from a Single message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.tx.v1beta1.ModeInfo.Single + * @static + * @param {cosmos.tx.v1beta1.ModeInfo.Single} message Single + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Single.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.mode = options.enums === String ? "SIGN_MODE_UNSPECIFIED" : 0; + if (message.mode != null && message.hasOwnProperty("mode")) + object.mode = options.enums === String ? $root.cosmos.tx.signing.v1beta1.SignMode[message.mode] : message.mode; + return object; + }; + + /** + * Converts this Single to JSON. + * @function toJSON + * @memberof cosmos.tx.v1beta1.ModeInfo.Single + * @instance + * @returns {Object.} JSON object + */ + Single.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Single; + })(ModeInfo.Single || {}); + + ModeInfo.Multi = (function(Multi) { + + /** + * Properties of a Multi. + * @memberof cosmos.tx.v1beta1.ModeInfo + * @interface IMulti + * @property {cosmos.crypto.multisig.v1beta1.ICompactBitArray|null} [bitarray] Multi bitarray + * @property {Array.|null} [modeInfos] Multi modeInfos + */ + + /** + * Constructs a new Multi. + * @memberof cosmos.tx.v1beta1.ModeInfo + * @classdesc Represents a Multi. + * @implements IMulti + * @constructor + * @param {cosmos.tx.v1beta1.ModeInfo.IMulti=} [properties] Properties to set + */ + function Multi(properties) { + this.modeInfos = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Multi bitarray. + * @member {cosmos.crypto.multisig.v1beta1.ICompactBitArray|null|undefined} bitarray + * @memberof cosmos.tx.v1beta1.ModeInfo.Multi + * @instance + */ + Multi.prototype.bitarray = null; + + /** + * Multi modeInfos. + * @member {Array.} modeInfos + * @memberof cosmos.tx.v1beta1.ModeInfo.Multi + * @instance + */ + Multi.prototype.modeInfos = $util.emptyArray; + + /** + * Creates a new Multi instance using the specified properties. + * @function create + * @memberof cosmos.tx.v1beta1.ModeInfo.Multi + * @static + * @param {cosmos.tx.v1beta1.ModeInfo.IMulti=} [properties] Properties to set + * @returns {cosmos.tx.v1beta1.ModeInfo.Multi} Multi instance + */ + Multi.create = function create(properties) { + return new Multi(properties); + }; + + /** + * Encodes the specified Multi message. Does not implicitly {@link cosmos.tx.v1beta1.ModeInfo.Multi.verify|verify} messages. + * @function encode + * @memberof cosmos.tx.v1beta1.ModeInfo.Multi + * @static + * @param {cosmos.tx.v1beta1.ModeInfo.IMulti} message Multi message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Multi.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.bitarray != null && Object.hasOwnProperty.call(message, "bitarray")) + $root.cosmos.crypto.multisig.v1beta1.CompactBitArray.encode(message.bitarray, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.modeInfos != null && message.modeInfos.length) + for (var i = 0; i < message.modeInfos.length; ++i) + $root.cosmos.tx.v1beta1.ModeInfo.encode(message.modeInfos[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Multi message, length delimited. Does not implicitly {@link cosmos.tx.v1beta1.ModeInfo.Multi.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.tx.v1beta1.ModeInfo.Multi + * @static + * @param {cosmos.tx.v1beta1.ModeInfo.IMulti} message Multi message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Multi.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Multi message from the specified reader or buffer. + * @function decode + * @memberof cosmos.tx.v1beta1.ModeInfo.Multi + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.tx.v1beta1.ModeInfo.Multi} Multi + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Multi.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.tx.v1beta1.ModeInfo.Multi(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.bitarray = $root.cosmos.crypto.multisig.v1beta1.CompactBitArray.decode(reader, reader.uint32()); + break; + case 2: + if (!(message.modeInfos && message.modeInfos.length)) + message.modeInfos = []; + message.modeInfos.push($root.cosmos.tx.v1beta1.ModeInfo.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Multi message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.tx.v1beta1.ModeInfo.Multi + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.tx.v1beta1.ModeInfo.Multi} Multi + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Multi.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Multi message. + * @function verify + * @memberof cosmos.tx.v1beta1.ModeInfo.Multi + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Multi.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.bitarray != null && message.hasOwnProperty("bitarray")) { + var error = $root.cosmos.crypto.multisig.v1beta1.CompactBitArray.verify(message.bitarray); + if (error) + return "bitarray." + error; + } + if (message.modeInfos != null && message.hasOwnProperty("modeInfos")) { + if (!Array.isArray(message.modeInfos)) + return "modeInfos: array expected"; + for (var i = 0; i < message.modeInfos.length; ++i) { + var error = $root.cosmos.tx.v1beta1.ModeInfo.verify(message.modeInfos[i]); + if (error) + return "modeInfos." + error; + } + } + return null; + }; + + /** + * Creates a Multi message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.tx.v1beta1.ModeInfo.Multi + * @static + * @param {Object.} object Plain object + * @returns {cosmos.tx.v1beta1.ModeInfo.Multi} Multi + */ + Multi.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.tx.v1beta1.ModeInfo.Multi) + return object; + var message = new $root.cosmos.tx.v1beta1.ModeInfo.Multi(); + if (object.bitarray != null) { + if (typeof object.bitarray !== "object") + throw TypeError(".cosmos.tx.v1beta1.ModeInfo.Multi.bitarray: object expected"); + message.bitarray = $root.cosmos.crypto.multisig.v1beta1.CompactBitArray.fromObject(object.bitarray); + } + if (object.modeInfos) { + if (!Array.isArray(object.modeInfos)) + throw TypeError(".cosmos.tx.v1beta1.ModeInfo.Multi.modeInfos: array expected"); + message.modeInfos = []; + for (var i = 0; i < object.modeInfos.length; ++i) { + if (typeof object.modeInfos[i] !== "object") + throw TypeError(".cosmos.tx.v1beta1.ModeInfo.Multi.modeInfos: object expected"); + message.modeInfos[i] = $root.cosmos.tx.v1beta1.ModeInfo.fromObject(object.modeInfos[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Multi message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.tx.v1beta1.ModeInfo.Multi + * @static + * @param {cosmos.tx.v1beta1.ModeInfo.Multi} message Multi + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Multi.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.modeInfos = []; + if (options.defaults) + object.bitarray = null; + if (message.bitarray != null && message.hasOwnProperty("bitarray")) + object.bitarray = $root.cosmos.crypto.multisig.v1beta1.CompactBitArray.toObject(message.bitarray, options); + if (message.modeInfos && message.modeInfos.length) { + object.modeInfos = []; + for (var j = 0; j < message.modeInfos.length; ++j) + object.modeInfos[j] = $root.cosmos.tx.v1beta1.ModeInfo.toObject(message.modeInfos[j], options); + } + return object; + }; + + /** + * Converts this Multi to JSON. + * @function toJSON + * @memberof cosmos.tx.v1beta1.ModeInfo.Multi + * @instance + * @returns {Object.} JSON object + */ + Multi.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Multi; + })(ModeInfo.Multi || {}); + + return ModeInfo; + })(v1beta1.ModeInfo || {}); + + v1beta1.Fee = (function(Fee) { + + /** + * Properties of a Fee. + * @memberof cosmos.tx.v1beta1 + * @interface IFee + * @property {Array.|null} [amount] Fee amount + * @property {number|Long|null} [gasLimit] Fee gasLimit + * @property {string|null} [payer] Fee payer + * @property {string|null} [granter] Fee granter + */ + + /** + * Constructs a new Fee. + * @memberof cosmos.tx.v1beta1 + * @classdesc Represents a Fee. + * @implements IFee + * @constructor + * @param {cosmos.tx.v1beta1.IFee=} [properties] Properties to set + */ + function Fee(properties) { + this.amount = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Fee amount. + * @member {Array.} amount + * @memberof cosmos.tx.v1beta1.Fee + * @instance + */ + Fee.prototype.amount = $util.emptyArray; + + /** + * Fee gasLimit. + * @member {number|Long} gasLimit + * @memberof cosmos.tx.v1beta1.Fee + * @instance + */ + Fee.prototype.gasLimit = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Fee payer. + * @member {string} payer + * @memberof cosmos.tx.v1beta1.Fee + * @instance + */ + Fee.prototype.payer = ""; + + /** + * Fee granter. + * @member {string} granter + * @memberof cosmos.tx.v1beta1.Fee + * @instance + */ + Fee.prototype.granter = ""; + + /** + * Creates a new Fee instance using the specified properties. + * @function create + * @memberof cosmos.tx.v1beta1.Fee + * @static + * @param {cosmos.tx.v1beta1.IFee=} [properties] Properties to set + * @returns {cosmos.tx.v1beta1.Fee} Fee instance + */ + Fee.create = function create(properties) { + return new Fee(properties); + }; + + /** + * Encodes the specified Fee message. Does not implicitly {@link cosmos.tx.v1beta1.Fee.verify|verify} messages. + * @function encode + * @memberof cosmos.tx.v1beta1.Fee + * @static + * @param {cosmos.tx.v1beta1.IFee} message Fee message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Fee.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.amount != null && message.amount.length) + for (var i = 0; i < message.amount.length; ++i) + $root.cosmos.base.v1beta1.Coin.encode(message.amount[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.gasLimit != null && Object.hasOwnProperty.call(message, "gasLimit")) + writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.gasLimit); + if (message.payer != null && Object.hasOwnProperty.call(message, "payer")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.payer); + if (message.granter != null && Object.hasOwnProperty.call(message, "granter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.granter); + return writer; + }; + + /** + * Encodes the specified Fee message, length delimited. Does not implicitly {@link cosmos.tx.v1beta1.Fee.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.tx.v1beta1.Fee + * @static + * @param {cosmos.tx.v1beta1.IFee} message Fee message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Fee.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Fee message from the specified reader or buffer. + * @function decode + * @memberof cosmos.tx.v1beta1.Fee + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.tx.v1beta1.Fee} Fee + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Fee.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.tx.v1beta1.Fee(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.amount && message.amount.length)) + message.amount = []; + message.amount.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); + break; + case 2: + message.gasLimit = reader.uint64(); + break; + case 3: + message.payer = reader.string(); + break; + case 4: + message.granter = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Fee message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.tx.v1beta1.Fee + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.tx.v1beta1.Fee} Fee + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Fee.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Fee message. + * @function verify + * @memberof cosmos.tx.v1beta1.Fee + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Fee.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.amount != null && message.hasOwnProperty("amount")) { + if (!Array.isArray(message.amount)) + return "amount: array expected"; + for (var i = 0; i < message.amount.length; ++i) { + var error = $root.cosmos.base.v1beta1.Coin.verify(message.amount[i]); + if (error) + return "amount." + error; + } + } + if (message.gasLimit != null && message.hasOwnProperty("gasLimit")) + if (!$util.isInteger(message.gasLimit) && !(message.gasLimit && $util.isInteger(message.gasLimit.low) && $util.isInteger(message.gasLimit.high))) + return "gasLimit: integer|Long expected"; + if (message.payer != null && message.hasOwnProperty("payer")) + if (!$util.isString(message.payer)) + return "payer: string expected"; + if (message.granter != null && message.hasOwnProperty("granter")) + if (!$util.isString(message.granter)) + return "granter: string expected"; + return null; + }; + + /** + * Creates a Fee message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.tx.v1beta1.Fee + * @static + * @param {Object.} object Plain object + * @returns {cosmos.tx.v1beta1.Fee} Fee + */ + Fee.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.tx.v1beta1.Fee) + return object; + var message = new $root.cosmos.tx.v1beta1.Fee(); + if (object.amount) { + if (!Array.isArray(object.amount)) + throw TypeError(".cosmos.tx.v1beta1.Fee.amount: array expected"); + message.amount = []; + for (var i = 0; i < object.amount.length; ++i) { + if (typeof object.amount[i] !== "object") + throw TypeError(".cosmos.tx.v1beta1.Fee.amount: object expected"); + message.amount[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.amount[i]); + } + } + if (object.gasLimit != null) + if ($util.Long) + (message.gasLimit = $util.Long.fromValue(object.gasLimit)).unsigned = true; + else if (typeof object.gasLimit === "string") + message.gasLimit = parseInt(object.gasLimit, 10); + else if (typeof object.gasLimit === "number") + message.gasLimit = object.gasLimit; + else if (typeof object.gasLimit === "object") + message.gasLimit = new $util.LongBits(object.gasLimit.low >>> 0, object.gasLimit.high >>> 0).toNumber(true); + if (object.payer != null) + message.payer = String(object.payer); + if (object.granter != null) + message.granter = String(object.granter); + return message; + }; + + /** + * Creates a plain object from a Fee message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.tx.v1beta1.Fee + * @static + * @param {cosmos.tx.v1beta1.Fee} message Fee + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Fee.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.amount = []; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.gasLimit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.gasLimit = options.longs === String ? "0" : 0; + object.payer = ""; + object.granter = ""; + } + if (message.amount && message.amount.length) { + object.amount = []; + for (var j = 0; j < message.amount.length; ++j) + object.amount[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.amount[j], options); + } + if (message.gasLimit != null && message.hasOwnProperty("gasLimit")) + if (typeof message.gasLimit === "number") + object.gasLimit = options.longs === String ? String(message.gasLimit) : message.gasLimit; + else + object.gasLimit = options.longs === String ? $util.Long.prototype.toString.call(message.gasLimit) : options.longs === Number ? new $util.LongBits(message.gasLimit.low >>> 0, message.gasLimit.high >>> 0).toNumber(true) : message.gasLimit; + if (message.payer != null && message.hasOwnProperty("payer")) + object.payer = message.payer; + if (message.granter != null && message.hasOwnProperty("granter")) + object.granter = message.granter; + return object; + }; + + /** + * Converts this Fee to JSON. + * @function toJSON + * @memberof cosmos.tx.v1beta1.Fee + * @instance + * @returns {Object.} JSON object + */ + Fee.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Fee; + })(v1beta1.Fee || {}); + + return v1beta1; + })(tx.v1beta1 || {}); + + return tx; + })(cosmos.tx || {}); + + /** + * Namespace crisis. + * @memberof cosmos + * @namespace + */ + + cosmos.crisis = (function(crisis) { + + /** + * Namespace v1beta1. + * @memberof cosmos.crisis + * @namespace + */ + + crisis.v1beta1 = (function(v1beta1) { + + v1beta1.Msg = (function(Msg) { + + /** + * Constructs a new Msg service. + * @memberof cosmos.crisis.v1beta1 + * @classdesc Represents a Msg + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Msg(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Msg.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Msg; + + /** + * Creates new Msg service using the specified rpc implementation. + * @function create + * @memberof cosmos.crisis.v1beta1.Msg + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Msg} RPC service. Useful where requests and/or responses are streamed. + */ + Msg.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link cosmos.crisis.v1beta1.Msg#verifyInvariant}. + * @memberof cosmos.crisis.v1beta1.Msg + * @typedef VerifyInvariantCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.crisis.v1beta1.IMsgVerifyInvariantResponse} [response] MsgVerifyInvariantResponse + */ + + /** + * Calls VerifyInvariant. + * @function verifyInvariant + * @memberof cosmos.crisis.v1beta1.Msg + * @instance + * @param {cosmos.crisis.v1beta1.IMsgVerifyInvariant} request MsgVerifyInvariant message or plain object + * @param {cosmos.crisis.v1beta1.Msg.VerifyInvariantCallback} callback Node-style callback called with the error, if any, and MsgVerifyInvariantResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Msg.prototype.verifyInvariant = function verifyInvariant(request, callback) { + return this.rpcCall(verifyInvariant, $root.cosmos.crisis.v1beta1.MsgVerifyInvariant, $root.cosmos.crisis.v1beta1.MsgVerifyInvariantResponse, request, callback); + }, "name", { value: "VerifyInvariant" }); + + /** + * Calls VerifyInvariant. + * @function verifyInvariant + * @memberof cosmos.crisis.v1beta1.Msg + * @instance + * @param {cosmos.crisis.v1beta1.IMsgVerifyInvariant} request MsgVerifyInvariant message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Msg; + })(v1beta1.Msg || {}); + + v1beta1.MsgVerifyInvariant = (function(MsgVerifyInvariant) { + + /** + * Properties of a MsgVerifyInvariant. + * @memberof cosmos.crisis.v1beta1 + * @interface IMsgVerifyInvariant + * @property {string|null} [sender] MsgVerifyInvariant sender + * @property {string|null} [invariantModuleName] MsgVerifyInvariant invariantModuleName + * @property {string|null} [invariantRoute] MsgVerifyInvariant invariantRoute + */ + + /** + * Constructs a new MsgVerifyInvariant. + * @memberof cosmos.crisis.v1beta1 + * @classdesc Represents a MsgVerifyInvariant. + * @implements IMsgVerifyInvariant + * @constructor + * @param {cosmos.crisis.v1beta1.IMsgVerifyInvariant=} [properties] Properties to set + */ + function MsgVerifyInvariant(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgVerifyInvariant sender. + * @member {string} sender + * @memberof cosmos.crisis.v1beta1.MsgVerifyInvariant + * @instance + */ + MsgVerifyInvariant.prototype.sender = ""; + + /** + * MsgVerifyInvariant invariantModuleName. + * @member {string} invariantModuleName + * @memberof cosmos.crisis.v1beta1.MsgVerifyInvariant + * @instance + */ + MsgVerifyInvariant.prototype.invariantModuleName = ""; + + /** + * MsgVerifyInvariant invariantRoute. + * @member {string} invariantRoute + * @memberof cosmos.crisis.v1beta1.MsgVerifyInvariant + * @instance + */ + MsgVerifyInvariant.prototype.invariantRoute = ""; + + /** + * Creates a new MsgVerifyInvariant instance using the specified properties. + * @function create + * @memberof cosmos.crisis.v1beta1.MsgVerifyInvariant + * @static + * @param {cosmos.crisis.v1beta1.IMsgVerifyInvariant=} [properties] Properties to set + * @returns {cosmos.crisis.v1beta1.MsgVerifyInvariant} MsgVerifyInvariant instance + */ + MsgVerifyInvariant.create = function create(properties) { + return new MsgVerifyInvariant(properties); + }; + + /** + * Encodes the specified MsgVerifyInvariant message. Does not implicitly {@link cosmos.crisis.v1beta1.MsgVerifyInvariant.verify|verify} messages. + * @function encode + * @memberof cosmos.crisis.v1beta1.MsgVerifyInvariant + * @static + * @param {cosmos.crisis.v1beta1.IMsgVerifyInvariant} message MsgVerifyInvariant message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgVerifyInvariant.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sender != null && Object.hasOwnProperty.call(message, "sender")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.sender); + if (message.invariantModuleName != null && Object.hasOwnProperty.call(message, "invariantModuleName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.invariantModuleName); + if (message.invariantRoute != null && Object.hasOwnProperty.call(message, "invariantRoute")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.invariantRoute); + return writer; + }; + + /** + * Encodes the specified MsgVerifyInvariant message, length delimited. Does not implicitly {@link cosmos.crisis.v1beta1.MsgVerifyInvariant.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.crisis.v1beta1.MsgVerifyInvariant + * @static + * @param {cosmos.crisis.v1beta1.IMsgVerifyInvariant} message MsgVerifyInvariant message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgVerifyInvariant.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgVerifyInvariant message from the specified reader or buffer. + * @function decode + * @memberof cosmos.crisis.v1beta1.MsgVerifyInvariant + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.crisis.v1beta1.MsgVerifyInvariant} MsgVerifyInvariant + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgVerifyInvariant.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.crisis.v1beta1.MsgVerifyInvariant(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.sender = reader.string(); + break; + case 2: + message.invariantModuleName = reader.string(); + break; + case 3: + message.invariantRoute = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgVerifyInvariant message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.crisis.v1beta1.MsgVerifyInvariant + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.crisis.v1beta1.MsgVerifyInvariant} MsgVerifyInvariant + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgVerifyInvariant.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgVerifyInvariant message. + * @function verify + * @memberof cosmos.crisis.v1beta1.MsgVerifyInvariant + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgVerifyInvariant.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sender != null && message.hasOwnProperty("sender")) + if (!$util.isString(message.sender)) + return "sender: string expected"; + if (message.invariantModuleName != null && message.hasOwnProperty("invariantModuleName")) + if (!$util.isString(message.invariantModuleName)) + return "invariantModuleName: string expected"; + if (message.invariantRoute != null && message.hasOwnProperty("invariantRoute")) + if (!$util.isString(message.invariantRoute)) + return "invariantRoute: string expected"; + return null; + }; + + /** + * Creates a MsgVerifyInvariant message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.crisis.v1beta1.MsgVerifyInvariant + * @static + * @param {Object.} object Plain object + * @returns {cosmos.crisis.v1beta1.MsgVerifyInvariant} MsgVerifyInvariant + */ + MsgVerifyInvariant.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.crisis.v1beta1.MsgVerifyInvariant) + return object; + var message = new $root.cosmos.crisis.v1beta1.MsgVerifyInvariant(); + if (object.sender != null) + message.sender = String(object.sender); + if (object.invariantModuleName != null) + message.invariantModuleName = String(object.invariantModuleName); + if (object.invariantRoute != null) + message.invariantRoute = String(object.invariantRoute); + return message; + }; + + /** + * Creates a plain object from a MsgVerifyInvariant message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.crisis.v1beta1.MsgVerifyInvariant + * @static + * @param {cosmos.crisis.v1beta1.MsgVerifyInvariant} message MsgVerifyInvariant + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgVerifyInvariant.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.sender = ""; + object.invariantModuleName = ""; + object.invariantRoute = ""; + } + if (message.sender != null && message.hasOwnProperty("sender")) + object.sender = message.sender; + if (message.invariantModuleName != null && message.hasOwnProperty("invariantModuleName")) + object.invariantModuleName = message.invariantModuleName; + if (message.invariantRoute != null && message.hasOwnProperty("invariantRoute")) + object.invariantRoute = message.invariantRoute; + return object; + }; + + /** + * Converts this MsgVerifyInvariant to JSON. + * @function toJSON + * @memberof cosmos.crisis.v1beta1.MsgVerifyInvariant + * @instance + * @returns {Object.} JSON object + */ + MsgVerifyInvariant.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgVerifyInvariant; + })(v1beta1.MsgVerifyInvariant || {}); + + v1beta1.MsgVerifyInvariantResponse = (function(MsgVerifyInvariantResponse) { + + /** + * Properties of a MsgVerifyInvariantResponse. + * @memberof cosmos.crisis.v1beta1 + * @interface IMsgVerifyInvariantResponse + */ + + /** + * Constructs a new MsgVerifyInvariantResponse. + * @memberof cosmos.crisis.v1beta1 + * @classdesc Represents a MsgVerifyInvariantResponse. + * @implements IMsgVerifyInvariantResponse + * @constructor + * @param {cosmos.crisis.v1beta1.IMsgVerifyInvariantResponse=} [properties] Properties to set + */ + function MsgVerifyInvariantResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new MsgVerifyInvariantResponse instance using the specified properties. + * @function create + * @memberof cosmos.crisis.v1beta1.MsgVerifyInvariantResponse + * @static + * @param {cosmos.crisis.v1beta1.IMsgVerifyInvariantResponse=} [properties] Properties to set + * @returns {cosmos.crisis.v1beta1.MsgVerifyInvariantResponse} MsgVerifyInvariantResponse instance + */ + MsgVerifyInvariantResponse.create = function create(properties) { + return new MsgVerifyInvariantResponse(properties); + }; + + /** + * Encodes the specified MsgVerifyInvariantResponse message. Does not implicitly {@link cosmos.crisis.v1beta1.MsgVerifyInvariantResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.crisis.v1beta1.MsgVerifyInvariantResponse + * @static + * @param {cosmos.crisis.v1beta1.IMsgVerifyInvariantResponse} message MsgVerifyInvariantResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgVerifyInvariantResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MsgVerifyInvariantResponse message, length delimited. Does not implicitly {@link cosmos.crisis.v1beta1.MsgVerifyInvariantResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.crisis.v1beta1.MsgVerifyInvariantResponse + * @static + * @param {cosmos.crisis.v1beta1.IMsgVerifyInvariantResponse} message MsgVerifyInvariantResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgVerifyInvariantResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgVerifyInvariantResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.crisis.v1beta1.MsgVerifyInvariantResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.crisis.v1beta1.MsgVerifyInvariantResponse} MsgVerifyInvariantResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgVerifyInvariantResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.crisis.v1beta1.MsgVerifyInvariantResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgVerifyInvariantResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.crisis.v1beta1.MsgVerifyInvariantResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.crisis.v1beta1.MsgVerifyInvariantResponse} MsgVerifyInvariantResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgVerifyInvariantResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgVerifyInvariantResponse message. + * @function verify + * @memberof cosmos.crisis.v1beta1.MsgVerifyInvariantResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgVerifyInvariantResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MsgVerifyInvariantResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.crisis.v1beta1.MsgVerifyInvariantResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.crisis.v1beta1.MsgVerifyInvariantResponse} MsgVerifyInvariantResponse + */ + MsgVerifyInvariantResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.crisis.v1beta1.MsgVerifyInvariantResponse) + return object; + return new $root.cosmos.crisis.v1beta1.MsgVerifyInvariantResponse(); + }; + + /** + * Creates a plain object from a MsgVerifyInvariantResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.crisis.v1beta1.MsgVerifyInvariantResponse + * @static + * @param {cosmos.crisis.v1beta1.MsgVerifyInvariantResponse} message MsgVerifyInvariantResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgVerifyInvariantResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MsgVerifyInvariantResponse to JSON. + * @function toJSON + * @memberof cosmos.crisis.v1beta1.MsgVerifyInvariantResponse + * @instance + * @returns {Object.} JSON object + */ + MsgVerifyInvariantResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgVerifyInvariantResponse; + })(v1beta1.MsgVerifyInvariantResponse || {}); + + return v1beta1; + })(crisis.v1beta1 || {}); + + return crisis; + })(cosmos.crisis || {}); + + /** + * Namespace distribution. + * @memberof cosmos + * @namespace + */ + + cosmos.distribution = (function(distribution) { + + /** + * Namespace v1beta1. + * @memberof cosmos.distribution + * @namespace + */ + + distribution.v1beta1 = (function(v1beta1) { + + v1beta1.Msg = (function(Msg) { + + /** + * Constructs a new Msg service. + * @memberof cosmos.distribution.v1beta1 + * @classdesc Represents a Msg + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Msg(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Msg.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Msg; + + /** + * Creates new Msg service using the specified rpc implementation. + * @function create + * @memberof cosmos.distribution.v1beta1.Msg + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Msg} RPC service. Useful where requests and/or responses are streamed. + */ + Msg.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link cosmos.distribution.v1beta1.Msg#setWithdrawAddress}. + * @memberof cosmos.distribution.v1beta1.Msg + * @typedef SetWithdrawAddressCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.distribution.v1beta1.IMsgSetWithdrawAddressResponse} [response] MsgSetWithdrawAddressResponse + */ + + /** + * Calls SetWithdrawAddress. + * @function setWithdrawAddress + * @memberof cosmos.distribution.v1beta1.Msg + * @instance + * @param {cosmos.distribution.v1beta1.IMsgSetWithdrawAddress} request MsgSetWithdrawAddress message or plain object + * @param {cosmos.distribution.v1beta1.Msg.SetWithdrawAddressCallback} callback Node-style callback called with the error, if any, and MsgSetWithdrawAddressResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Msg.prototype.setWithdrawAddress = function setWithdrawAddress(request, callback) { + return this.rpcCall(setWithdrawAddress, $root.cosmos.distribution.v1beta1.MsgSetWithdrawAddress, $root.cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse, request, callback); + }, "name", { value: "SetWithdrawAddress" }); + + /** + * Calls SetWithdrawAddress. + * @function setWithdrawAddress + * @memberof cosmos.distribution.v1beta1.Msg + * @instance + * @param {cosmos.distribution.v1beta1.IMsgSetWithdrawAddress} request MsgSetWithdrawAddress message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link cosmos.distribution.v1beta1.Msg#withdrawDelegatorReward}. + * @memberof cosmos.distribution.v1beta1.Msg + * @typedef WithdrawDelegatorRewardCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.distribution.v1beta1.IMsgWithdrawDelegatorRewardResponse} [response] MsgWithdrawDelegatorRewardResponse + */ + + /** + * Calls WithdrawDelegatorReward. + * @function withdrawDelegatorReward + * @memberof cosmos.distribution.v1beta1.Msg + * @instance + * @param {cosmos.distribution.v1beta1.IMsgWithdrawDelegatorReward} request MsgWithdrawDelegatorReward message or plain object + * @param {cosmos.distribution.v1beta1.Msg.WithdrawDelegatorRewardCallback} callback Node-style callback called with the error, if any, and MsgWithdrawDelegatorRewardResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Msg.prototype.withdrawDelegatorReward = function withdrawDelegatorReward(request, callback) { + return this.rpcCall(withdrawDelegatorReward, $root.cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward, $root.cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse, request, callback); + }, "name", { value: "WithdrawDelegatorReward" }); + + /** + * Calls WithdrawDelegatorReward. + * @function withdrawDelegatorReward + * @memberof cosmos.distribution.v1beta1.Msg + * @instance + * @param {cosmos.distribution.v1beta1.IMsgWithdrawDelegatorReward} request MsgWithdrawDelegatorReward message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link cosmos.distribution.v1beta1.Msg#withdrawValidatorCommission}. + * @memberof cosmos.distribution.v1beta1.Msg + * @typedef WithdrawValidatorCommissionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.distribution.v1beta1.IMsgWithdrawValidatorCommissionResponse} [response] MsgWithdrawValidatorCommissionResponse + */ + + /** + * Calls WithdrawValidatorCommission. + * @function withdrawValidatorCommission + * @memberof cosmos.distribution.v1beta1.Msg + * @instance + * @param {cosmos.distribution.v1beta1.IMsgWithdrawValidatorCommission} request MsgWithdrawValidatorCommission message or plain object + * @param {cosmos.distribution.v1beta1.Msg.WithdrawValidatorCommissionCallback} callback Node-style callback called with the error, if any, and MsgWithdrawValidatorCommissionResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Msg.prototype.withdrawValidatorCommission = function withdrawValidatorCommission(request, callback) { + return this.rpcCall(withdrawValidatorCommission, $root.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission, $root.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse, request, callback); + }, "name", { value: "WithdrawValidatorCommission" }); + + /** + * Calls WithdrawValidatorCommission. + * @function withdrawValidatorCommission + * @memberof cosmos.distribution.v1beta1.Msg + * @instance + * @param {cosmos.distribution.v1beta1.IMsgWithdrawValidatorCommission} request MsgWithdrawValidatorCommission message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link cosmos.distribution.v1beta1.Msg#fundCommunityPool}. + * @memberof cosmos.distribution.v1beta1.Msg + * @typedef FundCommunityPoolCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.distribution.v1beta1.IMsgFundCommunityPoolResponse} [response] MsgFundCommunityPoolResponse + */ + + /** + * Calls FundCommunityPool. + * @function fundCommunityPool + * @memberof cosmos.distribution.v1beta1.Msg + * @instance + * @param {cosmos.distribution.v1beta1.IMsgFundCommunityPool} request MsgFundCommunityPool message or plain object + * @param {cosmos.distribution.v1beta1.Msg.FundCommunityPoolCallback} callback Node-style callback called with the error, if any, and MsgFundCommunityPoolResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Msg.prototype.fundCommunityPool = function fundCommunityPool(request, callback) { + return this.rpcCall(fundCommunityPool, $root.cosmos.distribution.v1beta1.MsgFundCommunityPool, $root.cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse, request, callback); + }, "name", { value: "FundCommunityPool" }); + + /** + * Calls FundCommunityPool. + * @function fundCommunityPool + * @memberof cosmos.distribution.v1beta1.Msg + * @instance + * @param {cosmos.distribution.v1beta1.IMsgFundCommunityPool} request MsgFundCommunityPool message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Msg; + })(v1beta1.Msg || {}); + + v1beta1.MsgSetWithdrawAddress = (function(MsgSetWithdrawAddress) { + + /** + * Properties of a MsgSetWithdrawAddress. + * @memberof cosmos.distribution.v1beta1 + * @interface IMsgSetWithdrawAddress + * @property {string|null} [delegatorAddress] MsgSetWithdrawAddress delegatorAddress + * @property {string|null} [withdrawAddress] MsgSetWithdrawAddress withdrawAddress + */ + + /** + * Constructs a new MsgSetWithdrawAddress. + * @memberof cosmos.distribution.v1beta1 + * @classdesc Represents a MsgSetWithdrawAddress. + * @implements IMsgSetWithdrawAddress + * @constructor + * @param {cosmos.distribution.v1beta1.IMsgSetWithdrawAddress=} [properties] Properties to set + */ + function MsgSetWithdrawAddress(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgSetWithdrawAddress delegatorAddress. + * @member {string} delegatorAddress + * @memberof cosmos.distribution.v1beta1.MsgSetWithdrawAddress + * @instance + */ + MsgSetWithdrawAddress.prototype.delegatorAddress = ""; + + /** + * MsgSetWithdrawAddress withdrawAddress. + * @member {string} withdrawAddress + * @memberof cosmos.distribution.v1beta1.MsgSetWithdrawAddress + * @instance + */ + MsgSetWithdrawAddress.prototype.withdrawAddress = ""; + + /** + * Creates a new MsgSetWithdrawAddress instance using the specified properties. + * @function create + * @memberof cosmos.distribution.v1beta1.MsgSetWithdrawAddress + * @static + * @param {cosmos.distribution.v1beta1.IMsgSetWithdrawAddress=} [properties] Properties to set + * @returns {cosmos.distribution.v1beta1.MsgSetWithdrawAddress} MsgSetWithdrawAddress instance + */ + MsgSetWithdrawAddress.create = function create(properties) { + return new MsgSetWithdrawAddress(properties); + }; + + /** + * Encodes the specified MsgSetWithdrawAddress message. Does not implicitly {@link cosmos.distribution.v1beta1.MsgSetWithdrawAddress.verify|verify} messages. + * @function encode + * @memberof cosmos.distribution.v1beta1.MsgSetWithdrawAddress + * @static + * @param {cosmos.distribution.v1beta1.IMsgSetWithdrawAddress} message MsgSetWithdrawAddress message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgSetWithdrawAddress.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.delegatorAddress != null && Object.hasOwnProperty.call(message, "delegatorAddress")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.delegatorAddress); + if (message.withdrawAddress != null && Object.hasOwnProperty.call(message, "withdrawAddress")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.withdrawAddress); + return writer; + }; + + /** + * Encodes the specified MsgSetWithdrawAddress message, length delimited. Does not implicitly {@link cosmos.distribution.v1beta1.MsgSetWithdrawAddress.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.distribution.v1beta1.MsgSetWithdrawAddress + * @static + * @param {cosmos.distribution.v1beta1.IMsgSetWithdrawAddress} message MsgSetWithdrawAddress message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgSetWithdrawAddress.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgSetWithdrawAddress message from the specified reader or buffer. + * @function decode + * @memberof cosmos.distribution.v1beta1.MsgSetWithdrawAddress + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.distribution.v1beta1.MsgSetWithdrawAddress} MsgSetWithdrawAddress + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgSetWithdrawAddress.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.distribution.v1beta1.MsgSetWithdrawAddress(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.delegatorAddress = reader.string(); + break; + case 2: + message.withdrawAddress = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgSetWithdrawAddress message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.distribution.v1beta1.MsgSetWithdrawAddress + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.distribution.v1beta1.MsgSetWithdrawAddress} MsgSetWithdrawAddress + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgSetWithdrawAddress.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgSetWithdrawAddress message. + * @function verify + * @memberof cosmos.distribution.v1beta1.MsgSetWithdrawAddress + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgSetWithdrawAddress.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + if (!$util.isString(message.delegatorAddress)) + return "delegatorAddress: string expected"; + if (message.withdrawAddress != null && message.hasOwnProperty("withdrawAddress")) + if (!$util.isString(message.withdrawAddress)) + return "withdrawAddress: string expected"; + return null; + }; + + /** + * Creates a MsgSetWithdrawAddress message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.distribution.v1beta1.MsgSetWithdrawAddress + * @static + * @param {Object.} object Plain object + * @returns {cosmos.distribution.v1beta1.MsgSetWithdrawAddress} MsgSetWithdrawAddress + */ + MsgSetWithdrawAddress.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.distribution.v1beta1.MsgSetWithdrawAddress) + return object; + var message = new $root.cosmos.distribution.v1beta1.MsgSetWithdrawAddress(); + if (object.delegatorAddress != null) + message.delegatorAddress = String(object.delegatorAddress); + if (object.withdrawAddress != null) + message.withdrawAddress = String(object.withdrawAddress); + return message; + }; + + /** + * Creates a plain object from a MsgSetWithdrawAddress message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.distribution.v1beta1.MsgSetWithdrawAddress + * @static + * @param {cosmos.distribution.v1beta1.MsgSetWithdrawAddress} message MsgSetWithdrawAddress + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgSetWithdrawAddress.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.delegatorAddress = ""; + object.withdrawAddress = ""; + } + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + object.delegatorAddress = message.delegatorAddress; + if (message.withdrawAddress != null && message.hasOwnProperty("withdrawAddress")) + object.withdrawAddress = message.withdrawAddress; + return object; + }; + + /** + * Converts this MsgSetWithdrawAddress to JSON. + * @function toJSON + * @memberof cosmos.distribution.v1beta1.MsgSetWithdrawAddress + * @instance + * @returns {Object.} JSON object + */ + MsgSetWithdrawAddress.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgSetWithdrawAddress; + })(v1beta1.MsgSetWithdrawAddress || {}); + + v1beta1.MsgSetWithdrawAddressResponse = (function(MsgSetWithdrawAddressResponse) { + + /** + * Properties of a MsgSetWithdrawAddressResponse. + * @memberof cosmos.distribution.v1beta1 + * @interface IMsgSetWithdrawAddressResponse + */ + + /** + * Constructs a new MsgSetWithdrawAddressResponse. + * @memberof cosmos.distribution.v1beta1 + * @classdesc Represents a MsgSetWithdrawAddressResponse. + * @implements IMsgSetWithdrawAddressResponse + * @constructor + * @param {cosmos.distribution.v1beta1.IMsgSetWithdrawAddressResponse=} [properties] Properties to set + */ + function MsgSetWithdrawAddressResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new MsgSetWithdrawAddressResponse instance using the specified properties. + * @function create + * @memberof cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse + * @static + * @param {cosmos.distribution.v1beta1.IMsgSetWithdrawAddressResponse=} [properties] Properties to set + * @returns {cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse} MsgSetWithdrawAddressResponse instance + */ + MsgSetWithdrawAddressResponse.create = function create(properties) { + return new MsgSetWithdrawAddressResponse(properties); + }; + + /** + * Encodes the specified MsgSetWithdrawAddressResponse message. Does not implicitly {@link cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse + * @static + * @param {cosmos.distribution.v1beta1.IMsgSetWithdrawAddressResponse} message MsgSetWithdrawAddressResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgSetWithdrawAddressResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MsgSetWithdrawAddressResponse message, length delimited. Does not implicitly {@link cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse + * @static + * @param {cosmos.distribution.v1beta1.IMsgSetWithdrawAddressResponse} message MsgSetWithdrawAddressResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgSetWithdrawAddressResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgSetWithdrawAddressResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse} MsgSetWithdrawAddressResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgSetWithdrawAddressResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgSetWithdrawAddressResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse} MsgSetWithdrawAddressResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgSetWithdrawAddressResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgSetWithdrawAddressResponse message. + * @function verify + * @memberof cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgSetWithdrawAddressResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MsgSetWithdrawAddressResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse} MsgSetWithdrawAddressResponse + */ + MsgSetWithdrawAddressResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse) + return object; + return new $root.cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse(); + }; + + /** + * Creates a plain object from a MsgSetWithdrawAddressResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse + * @static + * @param {cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse} message MsgSetWithdrawAddressResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgSetWithdrawAddressResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MsgSetWithdrawAddressResponse to JSON. + * @function toJSON + * @memberof cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse + * @instance + * @returns {Object.} JSON object + */ + MsgSetWithdrawAddressResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgSetWithdrawAddressResponse; + })(v1beta1.MsgSetWithdrawAddressResponse || {}); + + v1beta1.MsgWithdrawDelegatorReward = (function(MsgWithdrawDelegatorReward) { + + /** + * Properties of a MsgWithdrawDelegatorReward. + * @memberof cosmos.distribution.v1beta1 + * @interface IMsgWithdrawDelegatorReward + * @property {string|null} [delegatorAddress] MsgWithdrawDelegatorReward delegatorAddress + * @property {string|null} [validatorAddress] MsgWithdrawDelegatorReward validatorAddress + */ + + /** + * Constructs a new MsgWithdrawDelegatorReward. + * @memberof cosmos.distribution.v1beta1 + * @classdesc Represents a MsgWithdrawDelegatorReward. + * @implements IMsgWithdrawDelegatorReward + * @constructor + * @param {cosmos.distribution.v1beta1.IMsgWithdrawDelegatorReward=} [properties] Properties to set + */ + function MsgWithdrawDelegatorReward(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgWithdrawDelegatorReward delegatorAddress. + * @member {string} delegatorAddress + * @memberof cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward + * @instance + */ + MsgWithdrawDelegatorReward.prototype.delegatorAddress = ""; + + /** + * MsgWithdrawDelegatorReward validatorAddress. + * @member {string} validatorAddress + * @memberof cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward + * @instance + */ + MsgWithdrawDelegatorReward.prototype.validatorAddress = ""; + + /** + * Creates a new MsgWithdrawDelegatorReward instance using the specified properties. + * @function create + * @memberof cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward + * @static + * @param {cosmos.distribution.v1beta1.IMsgWithdrawDelegatorReward=} [properties] Properties to set + * @returns {cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward} MsgWithdrawDelegatorReward instance + */ + MsgWithdrawDelegatorReward.create = function create(properties) { + return new MsgWithdrawDelegatorReward(properties); + }; + + /** + * Encodes the specified MsgWithdrawDelegatorReward message. Does not implicitly {@link cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward.verify|verify} messages. + * @function encode + * @memberof cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward + * @static + * @param {cosmos.distribution.v1beta1.IMsgWithdrawDelegatorReward} message MsgWithdrawDelegatorReward message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgWithdrawDelegatorReward.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.delegatorAddress != null && Object.hasOwnProperty.call(message, "delegatorAddress")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.delegatorAddress); + if (message.validatorAddress != null && Object.hasOwnProperty.call(message, "validatorAddress")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.validatorAddress); + return writer; + }; + + /** + * Encodes the specified MsgWithdrawDelegatorReward message, length delimited. Does not implicitly {@link cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward + * @static + * @param {cosmos.distribution.v1beta1.IMsgWithdrawDelegatorReward} message MsgWithdrawDelegatorReward message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgWithdrawDelegatorReward.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgWithdrawDelegatorReward message from the specified reader or buffer. + * @function decode + * @memberof cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward} MsgWithdrawDelegatorReward + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgWithdrawDelegatorReward.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.delegatorAddress = reader.string(); + break; + case 2: + message.validatorAddress = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgWithdrawDelegatorReward message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward} MsgWithdrawDelegatorReward + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgWithdrawDelegatorReward.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgWithdrawDelegatorReward message. + * @function verify + * @memberof cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgWithdrawDelegatorReward.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + if (!$util.isString(message.delegatorAddress)) + return "delegatorAddress: string expected"; + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + if (!$util.isString(message.validatorAddress)) + return "validatorAddress: string expected"; + return null; + }; + + /** + * Creates a MsgWithdrawDelegatorReward message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward + * @static + * @param {Object.} object Plain object + * @returns {cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward} MsgWithdrawDelegatorReward + */ + MsgWithdrawDelegatorReward.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward) + return object; + var message = new $root.cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward(); + if (object.delegatorAddress != null) + message.delegatorAddress = String(object.delegatorAddress); + if (object.validatorAddress != null) + message.validatorAddress = String(object.validatorAddress); + return message; + }; + + /** + * Creates a plain object from a MsgWithdrawDelegatorReward message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward + * @static + * @param {cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward} message MsgWithdrawDelegatorReward + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgWithdrawDelegatorReward.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.delegatorAddress = ""; + object.validatorAddress = ""; + } + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + object.delegatorAddress = message.delegatorAddress; + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + object.validatorAddress = message.validatorAddress; + return object; + }; + + /** + * Converts this MsgWithdrawDelegatorReward to JSON. + * @function toJSON + * @memberof cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward + * @instance + * @returns {Object.} JSON object + */ + MsgWithdrawDelegatorReward.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgWithdrawDelegatorReward; + })(v1beta1.MsgWithdrawDelegatorReward || {}); + + v1beta1.MsgWithdrawDelegatorRewardResponse = (function(MsgWithdrawDelegatorRewardResponse) { + + /** + * Properties of a MsgWithdrawDelegatorRewardResponse. + * @memberof cosmos.distribution.v1beta1 + * @interface IMsgWithdrawDelegatorRewardResponse + */ + + /** + * Constructs a new MsgWithdrawDelegatorRewardResponse. + * @memberof cosmos.distribution.v1beta1 + * @classdesc Represents a MsgWithdrawDelegatorRewardResponse. + * @implements IMsgWithdrawDelegatorRewardResponse + * @constructor + * @param {cosmos.distribution.v1beta1.IMsgWithdrawDelegatorRewardResponse=} [properties] Properties to set + */ + function MsgWithdrawDelegatorRewardResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new MsgWithdrawDelegatorRewardResponse instance using the specified properties. + * @function create + * @memberof cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse + * @static + * @param {cosmos.distribution.v1beta1.IMsgWithdrawDelegatorRewardResponse=} [properties] Properties to set + * @returns {cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse} MsgWithdrawDelegatorRewardResponse instance + */ + MsgWithdrawDelegatorRewardResponse.create = function create(properties) { + return new MsgWithdrawDelegatorRewardResponse(properties); + }; + + /** + * Encodes the specified MsgWithdrawDelegatorRewardResponse message. Does not implicitly {@link cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse + * @static + * @param {cosmos.distribution.v1beta1.IMsgWithdrawDelegatorRewardResponse} message MsgWithdrawDelegatorRewardResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgWithdrawDelegatorRewardResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MsgWithdrawDelegatorRewardResponse message, length delimited. Does not implicitly {@link cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse + * @static + * @param {cosmos.distribution.v1beta1.IMsgWithdrawDelegatorRewardResponse} message MsgWithdrawDelegatorRewardResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgWithdrawDelegatorRewardResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgWithdrawDelegatorRewardResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse} MsgWithdrawDelegatorRewardResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgWithdrawDelegatorRewardResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgWithdrawDelegatorRewardResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse} MsgWithdrawDelegatorRewardResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgWithdrawDelegatorRewardResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgWithdrawDelegatorRewardResponse message. + * @function verify + * @memberof cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgWithdrawDelegatorRewardResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MsgWithdrawDelegatorRewardResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse} MsgWithdrawDelegatorRewardResponse + */ + MsgWithdrawDelegatorRewardResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse) + return object; + return new $root.cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse(); + }; + + /** + * Creates a plain object from a MsgWithdrawDelegatorRewardResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse + * @static + * @param {cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse} message MsgWithdrawDelegatorRewardResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgWithdrawDelegatorRewardResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MsgWithdrawDelegatorRewardResponse to JSON. + * @function toJSON + * @memberof cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse + * @instance + * @returns {Object.} JSON object + */ + MsgWithdrawDelegatorRewardResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgWithdrawDelegatorRewardResponse; + })(v1beta1.MsgWithdrawDelegatorRewardResponse || {}); + + v1beta1.MsgWithdrawValidatorCommission = (function(MsgWithdrawValidatorCommission) { + + /** + * Properties of a MsgWithdrawValidatorCommission. + * @memberof cosmos.distribution.v1beta1 + * @interface IMsgWithdrawValidatorCommission + * @property {string|null} [validatorAddress] MsgWithdrawValidatorCommission validatorAddress + */ + + /** + * Constructs a new MsgWithdrawValidatorCommission. + * @memberof cosmos.distribution.v1beta1 + * @classdesc Represents a MsgWithdrawValidatorCommission. + * @implements IMsgWithdrawValidatorCommission + * @constructor + * @param {cosmos.distribution.v1beta1.IMsgWithdrawValidatorCommission=} [properties] Properties to set + */ + function MsgWithdrawValidatorCommission(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgWithdrawValidatorCommission validatorAddress. + * @member {string} validatorAddress + * @memberof cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission + * @instance + */ + MsgWithdrawValidatorCommission.prototype.validatorAddress = ""; + + /** + * Creates a new MsgWithdrawValidatorCommission instance using the specified properties. + * @function create + * @memberof cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission + * @static + * @param {cosmos.distribution.v1beta1.IMsgWithdrawValidatorCommission=} [properties] Properties to set + * @returns {cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission} MsgWithdrawValidatorCommission instance + */ + MsgWithdrawValidatorCommission.create = function create(properties) { + return new MsgWithdrawValidatorCommission(properties); + }; + + /** + * Encodes the specified MsgWithdrawValidatorCommission message. Does not implicitly {@link cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission.verify|verify} messages. + * @function encode + * @memberof cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission + * @static + * @param {cosmos.distribution.v1beta1.IMsgWithdrawValidatorCommission} message MsgWithdrawValidatorCommission message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgWithdrawValidatorCommission.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.validatorAddress != null && Object.hasOwnProperty.call(message, "validatorAddress")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.validatorAddress); + return writer; + }; + + /** + * Encodes the specified MsgWithdrawValidatorCommission message, length delimited. Does not implicitly {@link cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission + * @static + * @param {cosmos.distribution.v1beta1.IMsgWithdrawValidatorCommission} message MsgWithdrawValidatorCommission message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgWithdrawValidatorCommission.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgWithdrawValidatorCommission message from the specified reader or buffer. + * @function decode + * @memberof cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission} MsgWithdrawValidatorCommission + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgWithdrawValidatorCommission.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.validatorAddress = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgWithdrawValidatorCommission message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission} MsgWithdrawValidatorCommission + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgWithdrawValidatorCommission.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgWithdrawValidatorCommission message. + * @function verify + * @memberof cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgWithdrawValidatorCommission.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + if (!$util.isString(message.validatorAddress)) + return "validatorAddress: string expected"; + return null; + }; + + /** + * Creates a MsgWithdrawValidatorCommission message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission + * @static + * @param {Object.} object Plain object + * @returns {cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission} MsgWithdrawValidatorCommission + */ + MsgWithdrawValidatorCommission.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission) + return object; + var message = new $root.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission(); + if (object.validatorAddress != null) + message.validatorAddress = String(object.validatorAddress); + return message; + }; + + /** + * Creates a plain object from a MsgWithdrawValidatorCommission message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission + * @static + * @param {cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission} message MsgWithdrawValidatorCommission + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgWithdrawValidatorCommission.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.validatorAddress = ""; + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + object.validatorAddress = message.validatorAddress; + return object; + }; + + /** + * Converts this MsgWithdrawValidatorCommission to JSON. + * @function toJSON + * @memberof cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission + * @instance + * @returns {Object.} JSON object + */ + MsgWithdrawValidatorCommission.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgWithdrawValidatorCommission; + })(v1beta1.MsgWithdrawValidatorCommission || {}); + + v1beta1.MsgWithdrawValidatorCommissionResponse = (function(MsgWithdrawValidatorCommissionResponse) { + + /** + * Properties of a MsgWithdrawValidatorCommissionResponse. + * @memberof cosmos.distribution.v1beta1 + * @interface IMsgWithdrawValidatorCommissionResponse + */ + + /** + * Constructs a new MsgWithdrawValidatorCommissionResponse. + * @memberof cosmos.distribution.v1beta1 + * @classdesc Represents a MsgWithdrawValidatorCommissionResponse. + * @implements IMsgWithdrawValidatorCommissionResponse + * @constructor + * @param {cosmos.distribution.v1beta1.IMsgWithdrawValidatorCommissionResponse=} [properties] Properties to set + */ + function MsgWithdrawValidatorCommissionResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new MsgWithdrawValidatorCommissionResponse instance using the specified properties. + * @function create + * @memberof cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse + * @static + * @param {cosmos.distribution.v1beta1.IMsgWithdrawValidatorCommissionResponse=} [properties] Properties to set + * @returns {cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse} MsgWithdrawValidatorCommissionResponse instance + */ + MsgWithdrawValidatorCommissionResponse.create = function create(properties) { + return new MsgWithdrawValidatorCommissionResponse(properties); + }; + + /** + * Encodes the specified MsgWithdrawValidatorCommissionResponse message. Does not implicitly {@link cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse + * @static + * @param {cosmos.distribution.v1beta1.IMsgWithdrawValidatorCommissionResponse} message MsgWithdrawValidatorCommissionResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgWithdrawValidatorCommissionResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MsgWithdrawValidatorCommissionResponse message, length delimited. Does not implicitly {@link cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse + * @static + * @param {cosmos.distribution.v1beta1.IMsgWithdrawValidatorCommissionResponse} message MsgWithdrawValidatorCommissionResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgWithdrawValidatorCommissionResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgWithdrawValidatorCommissionResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse} MsgWithdrawValidatorCommissionResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgWithdrawValidatorCommissionResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgWithdrawValidatorCommissionResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse} MsgWithdrawValidatorCommissionResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgWithdrawValidatorCommissionResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgWithdrawValidatorCommissionResponse message. + * @function verify + * @memberof cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgWithdrawValidatorCommissionResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MsgWithdrawValidatorCommissionResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse} MsgWithdrawValidatorCommissionResponse + */ + MsgWithdrawValidatorCommissionResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse) + return object; + return new $root.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse(); + }; + + /** + * Creates a plain object from a MsgWithdrawValidatorCommissionResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse + * @static + * @param {cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse} message MsgWithdrawValidatorCommissionResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgWithdrawValidatorCommissionResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MsgWithdrawValidatorCommissionResponse to JSON. + * @function toJSON + * @memberof cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse + * @instance + * @returns {Object.} JSON object + */ + MsgWithdrawValidatorCommissionResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgWithdrawValidatorCommissionResponse; + })(v1beta1.MsgWithdrawValidatorCommissionResponse || {}); + + v1beta1.MsgFundCommunityPool = (function(MsgFundCommunityPool) { + + /** + * Properties of a MsgFundCommunityPool. + * @memberof cosmos.distribution.v1beta1 + * @interface IMsgFundCommunityPool + * @property {Array.|null} [amount] MsgFundCommunityPool amount + * @property {string|null} [depositor] MsgFundCommunityPool depositor + */ + + /** + * Constructs a new MsgFundCommunityPool. + * @memberof cosmos.distribution.v1beta1 + * @classdesc Represents a MsgFundCommunityPool. + * @implements IMsgFundCommunityPool + * @constructor + * @param {cosmos.distribution.v1beta1.IMsgFundCommunityPool=} [properties] Properties to set + */ + function MsgFundCommunityPool(properties) { + this.amount = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgFundCommunityPool amount. + * @member {Array.} amount + * @memberof cosmos.distribution.v1beta1.MsgFundCommunityPool + * @instance + */ + MsgFundCommunityPool.prototype.amount = $util.emptyArray; + + /** + * MsgFundCommunityPool depositor. + * @member {string} depositor + * @memberof cosmos.distribution.v1beta1.MsgFundCommunityPool + * @instance + */ + MsgFundCommunityPool.prototype.depositor = ""; + + /** + * Creates a new MsgFundCommunityPool instance using the specified properties. + * @function create + * @memberof cosmos.distribution.v1beta1.MsgFundCommunityPool + * @static + * @param {cosmos.distribution.v1beta1.IMsgFundCommunityPool=} [properties] Properties to set + * @returns {cosmos.distribution.v1beta1.MsgFundCommunityPool} MsgFundCommunityPool instance + */ + MsgFundCommunityPool.create = function create(properties) { + return new MsgFundCommunityPool(properties); + }; + + /** + * Encodes the specified MsgFundCommunityPool message. Does not implicitly {@link cosmos.distribution.v1beta1.MsgFundCommunityPool.verify|verify} messages. + * @function encode + * @memberof cosmos.distribution.v1beta1.MsgFundCommunityPool + * @static + * @param {cosmos.distribution.v1beta1.IMsgFundCommunityPool} message MsgFundCommunityPool message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgFundCommunityPool.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.amount != null && message.amount.length) + for (var i = 0; i < message.amount.length; ++i) + $root.cosmos.base.v1beta1.Coin.encode(message.amount[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.depositor != null && Object.hasOwnProperty.call(message, "depositor")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.depositor); + return writer; + }; + + /** + * Encodes the specified MsgFundCommunityPool message, length delimited. Does not implicitly {@link cosmos.distribution.v1beta1.MsgFundCommunityPool.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.distribution.v1beta1.MsgFundCommunityPool + * @static + * @param {cosmos.distribution.v1beta1.IMsgFundCommunityPool} message MsgFundCommunityPool message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgFundCommunityPool.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgFundCommunityPool message from the specified reader or buffer. + * @function decode + * @memberof cosmos.distribution.v1beta1.MsgFundCommunityPool + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.distribution.v1beta1.MsgFundCommunityPool} MsgFundCommunityPool + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgFundCommunityPool.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.distribution.v1beta1.MsgFundCommunityPool(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.amount && message.amount.length)) + message.amount = []; + message.amount.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); + break; + case 2: + message.depositor = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgFundCommunityPool message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.distribution.v1beta1.MsgFundCommunityPool + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.distribution.v1beta1.MsgFundCommunityPool} MsgFundCommunityPool + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgFundCommunityPool.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgFundCommunityPool message. + * @function verify + * @memberof cosmos.distribution.v1beta1.MsgFundCommunityPool + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgFundCommunityPool.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.amount != null && message.hasOwnProperty("amount")) { + if (!Array.isArray(message.amount)) + return "amount: array expected"; + for (var i = 0; i < message.amount.length; ++i) { + var error = $root.cosmos.base.v1beta1.Coin.verify(message.amount[i]); + if (error) + return "amount." + error; + } + } + if (message.depositor != null && message.hasOwnProperty("depositor")) + if (!$util.isString(message.depositor)) + return "depositor: string expected"; + return null; + }; + + /** + * Creates a MsgFundCommunityPool message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.distribution.v1beta1.MsgFundCommunityPool + * @static + * @param {Object.} object Plain object + * @returns {cosmos.distribution.v1beta1.MsgFundCommunityPool} MsgFundCommunityPool + */ + MsgFundCommunityPool.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.distribution.v1beta1.MsgFundCommunityPool) + return object; + var message = new $root.cosmos.distribution.v1beta1.MsgFundCommunityPool(); + if (object.amount) { + if (!Array.isArray(object.amount)) + throw TypeError(".cosmos.distribution.v1beta1.MsgFundCommunityPool.amount: array expected"); + message.amount = []; + for (var i = 0; i < object.amount.length; ++i) { + if (typeof object.amount[i] !== "object") + throw TypeError(".cosmos.distribution.v1beta1.MsgFundCommunityPool.amount: object expected"); + message.amount[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.amount[i]); + } + } + if (object.depositor != null) + message.depositor = String(object.depositor); + return message; + }; + + /** + * Creates a plain object from a MsgFundCommunityPool message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.distribution.v1beta1.MsgFundCommunityPool + * @static + * @param {cosmos.distribution.v1beta1.MsgFundCommunityPool} message MsgFundCommunityPool + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgFundCommunityPool.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.amount = []; + if (options.defaults) + object.depositor = ""; + if (message.amount && message.amount.length) { + object.amount = []; + for (var j = 0; j < message.amount.length; ++j) + object.amount[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.amount[j], options); + } + if (message.depositor != null && message.hasOwnProperty("depositor")) + object.depositor = message.depositor; + return object; + }; + + /** + * Converts this MsgFundCommunityPool to JSON. + * @function toJSON + * @memberof cosmos.distribution.v1beta1.MsgFundCommunityPool + * @instance + * @returns {Object.} JSON object + */ + MsgFundCommunityPool.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgFundCommunityPool; + })(v1beta1.MsgFundCommunityPool || {}); + + v1beta1.MsgFundCommunityPoolResponse = (function(MsgFundCommunityPoolResponse) { + + /** + * Properties of a MsgFundCommunityPoolResponse. + * @memberof cosmos.distribution.v1beta1 + * @interface IMsgFundCommunityPoolResponse + */ + + /** + * Constructs a new MsgFundCommunityPoolResponse. + * @memberof cosmos.distribution.v1beta1 + * @classdesc Represents a MsgFundCommunityPoolResponse. + * @implements IMsgFundCommunityPoolResponse + * @constructor + * @param {cosmos.distribution.v1beta1.IMsgFundCommunityPoolResponse=} [properties] Properties to set + */ + function MsgFundCommunityPoolResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new MsgFundCommunityPoolResponse instance using the specified properties. + * @function create + * @memberof cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse + * @static + * @param {cosmos.distribution.v1beta1.IMsgFundCommunityPoolResponse=} [properties] Properties to set + * @returns {cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse} MsgFundCommunityPoolResponse instance + */ + MsgFundCommunityPoolResponse.create = function create(properties) { + return new MsgFundCommunityPoolResponse(properties); + }; + + /** + * Encodes the specified MsgFundCommunityPoolResponse message. Does not implicitly {@link cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse + * @static + * @param {cosmos.distribution.v1beta1.IMsgFundCommunityPoolResponse} message MsgFundCommunityPoolResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgFundCommunityPoolResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MsgFundCommunityPoolResponse message, length delimited. Does not implicitly {@link cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse + * @static + * @param {cosmos.distribution.v1beta1.IMsgFundCommunityPoolResponse} message MsgFundCommunityPoolResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgFundCommunityPoolResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgFundCommunityPoolResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse} MsgFundCommunityPoolResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgFundCommunityPoolResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgFundCommunityPoolResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse} MsgFundCommunityPoolResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgFundCommunityPoolResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgFundCommunityPoolResponse message. + * @function verify + * @memberof cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgFundCommunityPoolResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MsgFundCommunityPoolResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse} MsgFundCommunityPoolResponse + */ + MsgFundCommunityPoolResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse) + return object; + return new $root.cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse(); + }; + + /** + * Creates a plain object from a MsgFundCommunityPoolResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse + * @static + * @param {cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse} message MsgFundCommunityPoolResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgFundCommunityPoolResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MsgFundCommunityPoolResponse to JSON. + * @function toJSON + * @memberof cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse + * @instance + * @returns {Object.} JSON object + */ + MsgFundCommunityPoolResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgFundCommunityPoolResponse; + })(v1beta1.MsgFundCommunityPoolResponse || {}); + + return v1beta1; + })(distribution.v1beta1 || {}); + + return distribution; + })(cosmos.distribution || {}); + + /** + * Namespace evidence. + * @memberof cosmos + * @namespace + */ + + cosmos.evidence = (function(evidence) { + + /** + * Namespace v1beta1. + * @memberof cosmos.evidence + * @namespace + */ + + evidence.v1beta1 = (function(v1beta1) { + + v1beta1.Msg = (function(Msg) { + + /** + * Constructs a new Msg service. + * @memberof cosmos.evidence.v1beta1 + * @classdesc Represents a Msg + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Msg(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Msg.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Msg; + + /** + * Creates new Msg service using the specified rpc implementation. + * @function create + * @memberof cosmos.evidence.v1beta1.Msg + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Msg} RPC service. Useful where requests and/or responses are streamed. + */ + Msg.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link cosmos.evidence.v1beta1.Msg#submitEvidence}. + * @memberof cosmos.evidence.v1beta1.Msg + * @typedef SubmitEvidenceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.evidence.v1beta1.IMsgSubmitEvidenceResponse} [response] MsgSubmitEvidenceResponse + */ + + /** + * Calls SubmitEvidence. + * @function submitEvidence + * @memberof cosmos.evidence.v1beta1.Msg + * @instance + * @param {cosmos.evidence.v1beta1.IMsgSubmitEvidence} request MsgSubmitEvidence message or plain object + * @param {cosmos.evidence.v1beta1.Msg.SubmitEvidenceCallback} callback Node-style callback called with the error, if any, and MsgSubmitEvidenceResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Msg.prototype.submitEvidence = function submitEvidence(request, callback) { + return this.rpcCall(submitEvidence, $root.cosmos.evidence.v1beta1.MsgSubmitEvidence, $root.cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse, request, callback); + }, "name", { value: "SubmitEvidence" }); + + /** + * Calls SubmitEvidence. + * @function submitEvidence + * @memberof cosmos.evidence.v1beta1.Msg + * @instance + * @param {cosmos.evidence.v1beta1.IMsgSubmitEvidence} request MsgSubmitEvidence message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Msg; + })(v1beta1.Msg || {}); + + v1beta1.MsgSubmitEvidence = (function(MsgSubmitEvidence) { + + /** + * Properties of a MsgSubmitEvidence. + * @memberof cosmos.evidence.v1beta1 + * @interface IMsgSubmitEvidence + * @property {string|null} [submitter] MsgSubmitEvidence submitter + * @property {google.protobuf.IAny|null} [evidence] MsgSubmitEvidence evidence + */ + + /** + * Constructs a new MsgSubmitEvidence. + * @memberof cosmos.evidence.v1beta1 + * @classdesc Represents a MsgSubmitEvidence. + * @implements IMsgSubmitEvidence + * @constructor + * @param {cosmos.evidence.v1beta1.IMsgSubmitEvidence=} [properties] Properties to set + */ + function MsgSubmitEvidence(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgSubmitEvidence submitter. + * @member {string} submitter + * @memberof cosmos.evidence.v1beta1.MsgSubmitEvidence + * @instance + */ + MsgSubmitEvidence.prototype.submitter = ""; + + /** + * MsgSubmitEvidence evidence. + * @member {google.protobuf.IAny|null|undefined} evidence + * @memberof cosmos.evidence.v1beta1.MsgSubmitEvidence + * @instance + */ + MsgSubmitEvidence.prototype.evidence = null; + + /** + * Creates a new MsgSubmitEvidence instance using the specified properties. + * @function create + * @memberof cosmos.evidence.v1beta1.MsgSubmitEvidence + * @static + * @param {cosmos.evidence.v1beta1.IMsgSubmitEvidence=} [properties] Properties to set + * @returns {cosmos.evidence.v1beta1.MsgSubmitEvidence} MsgSubmitEvidence instance + */ + MsgSubmitEvidence.create = function create(properties) { + return new MsgSubmitEvidence(properties); + }; + + /** + * Encodes the specified MsgSubmitEvidence message. Does not implicitly {@link cosmos.evidence.v1beta1.MsgSubmitEvidence.verify|verify} messages. + * @function encode + * @memberof cosmos.evidence.v1beta1.MsgSubmitEvidence + * @static + * @param {cosmos.evidence.v1beta1.IMsgSubmitEvidence} message MsgSubmitEvidence message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgSubmitEvidence.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.submitter != null && Object.hasOwnProperty.call(message, "submitter")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.submitter); + if (message.evidence != null && Object.hasOwnProperty.call(message, "evidence")) + $root.google.protobuf.Any.encode(message.evidence, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MsgSubmitEvidence message, length delimited. Does not implicitly {@link cosmos.evidence.v1beta1.MsgSubmitEvidence.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.evidence.v1beta1.MsgSubmitEvidence + * @static + * @param {cosmos.evidence.v1beta1.IMsgSubmitEvidence} message MsgSubmitEvidence message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgSubmitEvidence.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgSubmitEvidence message from the specified reader or buffer. + * @function decode + * @memberof cosmos.evidence.v1beta1.MsgSubmitEvidence + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.evidence.v1beta1.MsgSubmitEvidence} MsgSubmitEvidence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgSubmitEvidence.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.evidence.v1beta1.MsgSubmitEvidence(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.submitter = reader.string(); + break; + case 2: + message.evidence = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgSubmitEvidence message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.evidence.v1beta1.MsgSubmitEvidence + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.evidence.v1beta1.MsgSubmitEvidence} MsgSubmitEvidence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgSubmitEvidence.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgSubmitEvidence message. + * @function verify + * @memberof cosmos.evidence.v1beta1.MsgSubmitEvidence + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgSubmitEvidence.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.submitter != null && message.hasOwnProperty("submitter")) + if (!$util.isString(message.submitter)) + return "submitter: string expected"; + if (message.evidence != null && message.hasOwnProperty("evidence")) { + var error = $root.google.protobuf.Any.verify(message.evidence); + if (error) + return "evidence." + error; + } + return null; + }; + + /** + * Creates a MsgSubmitEvidence message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.evidence.v1beta1.MsgSubmitEvidence + * @static + * @param {Object.} object Plain object + * @returns {cosmos.evidence.v1beta1.MsgSubmitEvidence} MsgSubmitEvidence + */ + MsgSubmitEvidence.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.evidence.v1beta1.MsgSubmitEvidence) + return object; + var message = new $root.cosmos.evidence.v1beta1.MsgSubmitEvidence(); + if (object.submitter != null) + message.submitter = String(object.submitter); + if (object.evidence != null) { + if (typeof object.evidence !== "object") + throw TypeError(".cosmos.evidence.v1beta1.MsgSubmitEvidence.evidence: object expected"); + message.evidence = $root.google.protobuf.Any.fromObject(object.evidence); + } + return message; + }; + + /** + * Creates a plain object from a MsgSubmitEvidence message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.evidence.v1beta1.MsgSubmitEvidence + * @static + * @param {cosmos.evidence.v1beta1.MsgSubmitEvidence} message MsgSubmitEvidence + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgSubmitEvidence.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.submitter = ""; + object.evidence = null; + } + if (message.submitter != null && message.hasOwnProperty("submitter")) + object.submitter = message.submitter; + if (message.evidence != null && message.hasOwnProperty("evidence")) + object.evidence = $root.google.protobuf.Any.toObject(message.evidence, options); + return object; + }; + + /** + * Converts this MsgSubmitEvidence to JSON. + * @function toJSON + * @memberof cosmos.evidence.v1beta1.MsgSubmitEvidence + * @instance + * @returns {Object.} JSON object + */ + MsgSubmitEvidence.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgSubmitEvidence; + })(v1beta1.MsgSubmitEvidence || {}); + + v1beta1.MsgSubmitEvidenceResponse = (function(MsgSubmitEvidenceResponse) { + + /** + * Properties of a MsgSubmitEvidenceResponse. + * @memberof cosmos.evidence.v1beta1 + * @interface IMsgSubmitEvidenceResponse + * @property {Uint8Array|null} [hash] MsgSubmitEvidenceResponse hash + */ + + /** + * Constructs a new MsgSubmitEvidenceResponse. + * @memberof cosmos.evidence.v1beta1 + * @classdesc Represents a MsgSubmitEvidenceResponse. + * @implements IMsgSubmitEvidenceResponse + * @constructor + * @param {cosmos.evidence.v1beta1.IMsgSubmitEvidenceResponse=} [properties] Properties to set + */ + function MsgSubmitEvidenceResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgSubmitEvidenceResponse hash. + * @member {Uint8Array} hash + * @memberof cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse + * @instance + */ + MsgSubmitEvidenceResponse.prototype.hash = $util.newBuffer([]); + + /** + * Creates a new MsgSubmitEvidenceResponse instance using the specified properties. + * @function create + * @memberof cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse + * @static + * @param {cosmos.evidence.v1beta1.IMsgSubmitEvidenceResponse=} [properties] Properties to set + * @returns {cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse} MsgSubmitEvidenceResponse instance + */ + MsgSubmitEvidenceResponse.create = function create(properties) { + return new MsgSubmitEvidenceResponse(properties); + }; + + /** + * Encodes the specified MsgSubmitEvidenceResponse message. Does not implicitly {@link cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse + * @static + * @param {cosmos.evidence.v1beta1.IMsgSubmitEvidenceResponse} message MsgSubmitEvidenceResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgSubmitEvidenceResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.hash != null && Object.hasOwnProperty.call(message, "hash")) + writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.hash); + return writer; + }; + + /** + * Encodes the specified MsgSubmitEvidenceResponse message, length delimited. Does not implicitly {@link cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse + * @static + * @param {cosmos.evidence.v1beta1.IMsgSubmitEvidenceResponse} message MsgSubmitEvidenceResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgSubmitEvidenceResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgSubmitEvidenceResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse} MsgSubmitEvidenceResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgSubmitEvidenceResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 4: + message.hash = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgSubmitEvidenceResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse} MsgSubmitEvidenceResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgSubmitEvidenceResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgSubmitEvidenceResponse message. + * @function verify + * @memberof cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgSubmitEvidenceResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.hash != null && message.hasOwnProperty("hash")) + if (!(message.hash && typeof message.hash.length === "number" || $util.isString(message.hash))) + return "hash: buffer expected"; + return null; + }; + + /** + * Creates a MsgSubmitEvidenceResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse} MsgSubmitEvidenceResponse + */ + MsgSubmitEvidenceResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse) + return object; + var message = new $root.cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse(); + if (object.hash != null) + if (typeof object.hash === "string") + $util.base64.decode(object.hash, message.hash = $util.newBuffer($util.base64.length(object.hash)), 0); + else if (object.hash.length) + message.hash = object.hash; + return message; + }; + + /** + * Creates a plain object from a MsgSubmitEvidenceResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse + * @static + * @param {cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse} message MsgSubmitEvidenceResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgSubmitEvidenceResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if (options.bytes === String) + object.hash = ""; + else { + object.hash = []; + if (options.bytes !== Array) + object.hash = $util.newBuffer(object.hash); + } + if (message.hash != null && message.hasOwnProperty("hash")) + object.hash = options.bytes === String ? $util.base64.encode(message.hash, 0, message.hash.length) : options.bytes === Array ? Array.prototype.slice.call(message.hash) : message.hash; + return object; + }; + + /** + * Converts this MsgSubmitEvidenceResponse to JSON. + * @function toJSON + * @memberof cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse + * @instance + * @returns {Object.} JSON object + */ + MsgSubmitEvidenceResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgSubmitEvidenceResponse; + })(v1beta1.MsgSubmitEvidenceResponse || {}); + + return v1beta1; + })(evidence.v1beta1 || {}); + + return evidence; + })(cosmos.evidence || {}); + + /** + * Namespace slashing. + * @memberof cosmos + * @namespace + */ + + cosmos.slashing = (function(slashing) { + + /** + * Namespace v1beta1. + * @memberof cosmos.slashing + * @namespace + */ + + slashing.v1beta1 = (function(v1beta1) { + + v1beta1.Msg = (function(Msg) { + + /** + * Constructs a new Msg service. + * @memberof cosmos.slashing.v1beta1 + * @classdesc Represents a Msg + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Msg(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Msg.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Msg; + + /** + * Creates new Msg service using the specified rpc implementation. + * @function create + * @memberof cosmos.slashing.v1beta1.Msg + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Msg} RPC service. Useful where requests and/or responses are streamed. + */ + Msg.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link cosmos.slashing.v1beta1.Msg#unjail}. + * @memberof cosmos.slashing.v1beta1.Msg + * @typedef UnjailCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.slashing.v1beta1.IMsgUnjailResponse} [response] MsgUnjailResponse + */ + + /** + * Calls Unjail. + * @function unjail + * @memberof cosmos.slashing.v1beta1.Msg + * @instance + * @param {cosmos.slashing.v1beta1.IMsgUnjail} request MsgUnjail message or plain object + * @param {cosmos.slashing.v1beta1.Msg.UnjailCallback} callback Node-style callback called with the error, if any, and MsgUnjailResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Msg.prototype.unjail = function unjail(request, callback) { + return this.rpcCall(unjail, $root.cosmos.slashing.v1beta1.MsgUnjail, $root.cosmos.slashing.v1beta1.MsgUnjailResponse, request, callback); + }, "name", { value: "Unjail" }); + + /** + * Calls Unjail. + * @function unjail + * @memberof cosmos.slashing.v1beta1.Msg + * @instance + * @param {cosmos.slashing.v1beta1.IMsgUnjail} request MsgUnjail message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Msg; + })(v1beta1.Msg || {}); + + v1beta1.MsgUnjail = (function(MsgUnjail) { + + /** + * Properties of a MsgUnjail. + * @memberof cosmos.slashing.v1beta1 + * @interface IMsgUnjail + * @property {string|null} [validatorAddr] MsgUnjail validatorAddr + */ + + /** + * Constructs a new MsgUnjail. + * @memberof cosmos.slashing.v1beta1 + * @classdesc Represents a MsgUnjail. + * @implements IMsgUnjail + * @constructor + * @param {cosmos.slashing.v1beta1.IMsgUnjail=} [properties] Properties to set + */ + function MsgUnjail(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgUnjail validatorAddr. + * @member {string} validatorAddr + * @memberof cosmos.slashing.v1beta1.MsgUnjail + * @instance + */ + MsgUnjail.prototype.validatorAddr = ""; + + /** + * Creates a new MsgUnjail instance using the specified properties. + * @function create + * @memberof cosmos.slashing.v1beta1.MsgUnjail + * @static + * @param {cosmos.slashing.v1beta1.IMsgUnjail=} [properties] Properties to set + * @returns {cosmos.slashing.v1beta1.MsgUnjail} MsgUnjail instance + */ + MsgUnjail.create = function create(properties) { + return new MsgUnjail(properties); + }; + + /** + * Encodes the specified MsgUnjail message. Does not implicitly {@link cosmos.slashing.v1beta1.MsgUnjail.verify|verify} messages. + * @function encode + * @memberof cosmos.slashing.v1beta1.MsgUnjail + * @static + * @param {cosmos.slashing.v1beta1.IMsgUnjail} message MsgUnjail message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgUnjail.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.validatorAddr != null && Object.hasOwnProperty.call(message, "validatorAddr")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.validatorAddr); + return writer; + }; + + /** + * Encodes the specified MsgUnjail message, length delimited. Does not implicitly {@link cosmos.slashing.v1beta1.MsgUnjail.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.slashing.v1beta1.MsgUnjail + * @static + * @param {cosmos.slashing.v1beta1.IMsgUnjail} message MsgUnjail message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgUnjail.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgUnjail message from the specified reader or buffer. + * @function decode + * @memberof cosmos.slashing.v1beta1.MsgUnjail + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.slashing.v1beta1.MsgUnjail} MsgUnjail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgUnjail.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.slashing.v1beta1.MsgUnjail(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.validatorAddr = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgUnjail message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.slashing.v1beta1.MsgUnjail + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.slashing.v1beta1.MsgUnjail} MsgUnjail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgUnjail.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgUnjail message. + * @function verify + * @memberof cosmos.slashing.v1beta1.MsgUnjail + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgUnjail.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.validatorAddr != null && message.hasOwnProperty("validatorAddr")) + if (!$util.isString(message.validatorAddr)) + return "validatorAddr: string expected"; + return null; + }; + + /** + * Creates a MsgUnjail message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.slashing.v1beta1.MsgUnjail + * @static + * @param {Object.} object Plain object + * @returns {cosmos.slashing.v1beta1.MsgUnjail} MsgUnjail + */ + MsgUnjail.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.slashing.v1beta1.MsgUnjail) + return object; + var message = new $root.cosmos.slashing.v1beta1.MsgUnjail(); + if (object.validatorAddr != null) + message.validatorAddr = String(object.validatorAddr); + return message; + }; + + /** + * Creates a plain object from a MsgUnjail message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.slashing.v1beta1.MsgUnjail + * @static + * @param {cosmos.slashing.v1beta1.MsgUnjail} message MsgUnjail + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgUnjail.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.validatorAddr = ""; + if (message.validatorAddr != null && message.hasOwnProperty("validatorAddr")) + object.validatorAddr = message.validatorAddr; + return object; + }; + + /** + * Converts this MsgUnjail to JSON. + * @function toJSON + * @memberof cosmos.slashing.v1beta1.MsgUnjail + * @instance + * @returns {Object.} JSON object + */ + MsgUnjail.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgUnjail; + })(v1beta1.MsgUnjail || {}); + + v1beta1.MsgUnjailResponse = (function(MsgUnjailResponse) { + + /** + * Properties of a MsgUnjailResponse. + * @memberof cosmos.slashing.v1beta1 + * @interface IMsgUnjailResponse + */ + + /** + * Constructs a new MsgUnjailResponse. + * @memberof cosmos.slashing.v1beta1 + * @classdesc Represents a MsgUnjailResponse. + * @implements IMsgUnjailResponse + * @constructor + * @param {cosmos.slashing.v1beta1.IMsgUnjailResponse=} [properties] Properties to set + */ + function MsgUnjailResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new MsgUnjailResponse instance using the specified properties. + * @function create + * @memberof cosmos.slashing.v1beta1.MsgUnjailResponse + * @static + * @param {cosmos.slashing.v1beta1.IMsgUnjailResponse=} [properties] Properties to set + * @returns {cosmos.slashing.v1beta1.MsgUnjailResponse} MsgUnjailResponse instance + */ + MsgUnjailResponse.create = function create(properties) { + return new MsgUnjailResponse(properties); + }; + + /** + * Encodes the specified MsgUnjailResponse message. Does not implicitly {@link cosmos.slashing.v1beta1.MsgUnjailResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.slashing.v1beta1.MsgUnjailResponse + * @static + * @param {cosmos.slashing.v1beta1.IMsgUnjailResponse} message MsgUnjailResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgUnjailResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MsgUnjailResponse message, length delimited. Does not implicitly {@link cosmos.slashing.v1beta1.MsgUnjailResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.slashing.v1beta1.MsgUnjailResponse + * @static + * @param {cosmos.slashing.v1beta1.IMsgUnjailResponse} message MsgUnjailResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgUnjailResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgUnjailResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.slashing.v1beta1.MsgUnjailResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.slashing.v1beta1.MsgUnjailResponse} MsgUnjailResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgUnjailResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.slashing.v1beta1.MsgUnjailResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgUnjailResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.slashing.v1beta1.MsgUnjailResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.slashing.v1beta1.MsgUnjailResponse} MsgUnjailResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgUnjailResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgUnjailResponse message. + * @function verify + * @memberof cosmos.slashing.v1beta1.MsgUnjailResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgUnjailResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MsgUnjailResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.slashing.v1beta1.MsgUnjailResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.slashing.v1beta1.MsgUnjailResponse} MsgUnjailResponse + */ + MsgUnjailResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.slashing.v1beta1.MsgUnjailResponse) + return object; + return new $root.cosmos.slashing.v1beta1.MsgUnjailResponse(); + }; + + /** + * Creates a plain object from a MsgUnjailResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.slashing.v1beta1.MsgUnjailResponse + * @static + * @param {cosmos.slashing.v1beta1.MsgUnjailResponse} message MsgUnjailResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgUnjailResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MsgUnjailResponse to JSON. + * @function toJSON + * @memberof cosmos.slashing.v1beta1.MsgUnjailResponse + * @instance + * @returns {Object.} JSON object + */ + MsgUnjailResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgUnjailResponse; + })(v1beta1.MsgUnjailResponse || {}); + + return v1beta1; + })(slashing.v1beta1 || {}); + + return slashing; + })(cosmos.slashing || {}); + + /** + * Namespace vesting. + * @memberof cosmos + * @namespace + */ + + cosmos.vesting = (function(vesting) { + + /** + * Namespace v1beta1. + * @memberof cosmos.vesting + * @namespace + */ + + vesting.v1beta1 = (function(v1beta1) { + + v1beta1.Msg = (function(Msg) { + + /** + * Constructs a new Msg service. + * @memberof cosmos.vesting.v1beta1 + * @classdesc Represents a Msg + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Msg(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Msg.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Msg; + + /** + * Creates new Msg service using the specified rpc implementation. + * @function create + * @memberof cosmos.vesting.v1beta1.Msg + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Msg} RPC service. Useful where requests and/or responses are streamed. + */ + Msg.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link cosmos.vesting.v1beta1.Msg#createVestingAccount}. + * @memberof cosmos.vesting.v1beta1.Msg + * @typedef CreateVestingAccountCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.vesting.v1beta1.IMsgCreateVestingAccountResponse} [response] MsgCreateVestingAccountResponse + */ + + /** + * Calls CreateVestingAccount. + * @function createVestingAccount + * @memberof cosmos.vesting.v1beta1.Msg + * @instance + * @param {cosmos.vesting.v1beta1.IMsgCreateVestingAccount} request MsgCreateVestingAccount message or plain object + * @param {cosmos.vesting.v1beta1.Msg.CreateVestingAccountCallback} callback Node-style callback called with the error, if any, and MsgCreateVestingAccountResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Msg.prototype.createVestingAccount = function createVestingAccount(request, callback) { + return this.rpcCall(createVestingAccount, $root.cosmos.vesting.v1beta1.MsgCreateVestingAccount, $root.cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse, request, callback); + }, "name", { value: "CreateVestingAccount" }); + + /** + * Calls CreateVestingAccount. + * @function createVestingAccount + * @memberof cosmos.vesting.v1beta1.Msg + * @instance + * @param {cosmos.vesting.v1beta1.IMsgCreateVestingAccount} request MsgCreateVestingAccount message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Msg; + })(v1beta1.Msg || {}); + + v1beta1.MsgCreateVestingAccount = (function(MsgCreateVestingAccount) { + + /** + * Properties of a MsgCreateVestingAccount. + * @memberof cosmos.vesting.v1beta1 + * @interface IMsgCreateVestingAccount + * @property {string|null} [fromAddress] MsgCreateVestingAccount fromAddress + * @property {string|null} [toAddress] MsgCreateVestingAccount toAddress + * @property {Array.|null} [amount] MsgCreateVestingAccount amount + * @property {number|Long|null} [endTime] MsgCreateVestingAccount endTime + * @property {boolean|null} [delayed] MsgCreateVestingAccount delayed + */ + + /** + * Constructs a new MsgCreateVestingAccount. + * @memberof cosmos.vesting.v1beta1 + * @classdesc Represents a MsgCreateVestingAccount. + * @implements IMsgCreateVestingAccount + * @constructor + * @param {cosmos.vesting.v1beta1.IMsgCreateVestingAccount=} [properties] Properties to set + */ + function MsgCreateVestingAccount(properties) { + this.amount = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgCreateVestingAccount fromAddress. + * @member {string} fromAddress + * @memberof cosmos.vesting.v1beta1.MsgCreateVestingAccount + * @instance + */ + MsgCreateVestingAccount.prototype.fromAddress = ""; + + /** + * MsgCreateVestingAccount toAddress. + * @member {string} toAddress + * @memberof cosmos.vesting.v1beta1.MsgCreateVestingAccount + * @instance + */ + MsgCreateVestingAccount.prototype.toAddress = ""; + + /** + * MsgCreateVestingAccount amount. + * @member {Array.} amount + * @memberof cosmos.vesting.v1beta1.MsgCreateVestingAccount + * @instance + */ + MsgCreateVestingAccount.prototype.amount = $util.emptyArray; + + /** + * MsgCreateVestingAccount endTime. + * @member {number|Long} endTime + * @memberof cosmos.vesting.v1beta1.MsgCreateVestingAccount + * @instance + */ + MsgCreateVestingAccount.prototype.endTime = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * MsgCreateVestingAccount delayed. + * @member {boolean} delayed + * @memberof cosmos.vesting.v1beta1.MsgCreateVestingAccount + * @instance + */ + MsgCreateVestingAccount.prototype.delayed = false; + + /** + * Creates a new MsgCreateVestingAccount instance using the specified properties. + * @function create + * @memberof cosmos.vesting.v1beta1.MsgCreateVestingAccount + * @static + * @param {cosmos.vesting.v1beta1.IMsgCreateVestingAccount=} [properties] Properties to set + * @returns {cosmos.vesting.v1beta1.MsgCreateVestingAccount} MsgCreateVestingAccount instance + */ + MsgCreateVestingAccount.create = function create(properties) { + return new MsgCreateVestingAccount(properties); + }; + + /** + * Encodes the specified MsgCreateVestingAccount message. Does not implicitly {@link cosmos.vesting.v1beta1.MsgCreateVestingAccount.verify|verify} messages. + * @function encode + * @memberof cosmos.vesting.v1beta1.MsgCreateVestingAccount + * @static + * @param {cosmos.vesting.v1beta1.IMsgCreateVestingAccount} message MsgCreateVestingAccount message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgCreateVestingAccount.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fromAddress != null && Object.hasOwnProperty.call(message, "fromAddress")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.fromAddress); + if (message.toAddress != null && Object.hasOwnProperty.call(message, "toAddress")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.toAddress); + if (message.amount != null && message.amount.length) + for (var i = 0; i < message.amount.length; ++i) + $root.cosmos.base.v1beta1.Coin.encode(message.amount[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.endTime); + if (message.delayed != null && Object.hasOwnProperty.call(message, "delayed")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.delayed); + return writer; + }; + + /** + * Encodes the specified MsgCreateVestingAccount message, length delimited. Does not implicitly {@link cosmos.vesting.v1beta1.MsgCreateVestingAccount.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.vesting.v1beta1.MsgCreateVestingAccount + * @static + * @param {cosmos.vesting.v1beta1.IMsgCreateVestingAccount} message MsgCreateVestingAccount message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgCreateVestingAccount.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgCreateVestingAccount message from the specified reader or buffer. + * @function decode + * @memberof cosmos.vesting.v1beta1.MsgCreateVestingAccount + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.vesting.v1beta1.MsgCreateVestingAccount} MsgCreateVestingAccount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgCreateVestingAccount.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.vesting.v1beta1.MsgCreateVestingAccount(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.fromAddress = reader.string(); + break; + case 2: + message.toAddress = reader.string(); + break; + case 3: + if (!(message.amount && message.amount.length)) + message.amount = []; + message.amount.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); + break; + case 4: + message.endTime = reader.int64(); + break; + case 5: + message.delayed = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgCreateVestingAccount message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.vesting.v1beta1.MsgCreateVestingAccount + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.vesting.v1beta1.MsgCreateVestingAccount} MsgCreateVestingAccount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgCreateVestingAccount.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgCreateVestingAccount message. + * @function verify + * @memberof cosmos.vesting.v1beta1.MsgCreateVestingAccount + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgCreateVestingAccount.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fromAddress != null && message.hasOwnProperty("fromAddress")) + if (!$util.isString(message.fromAddress)) + return "fromAddress: string expected"; + if (message.toAddress != null && message.hasOwnProperty("toAddress")) + if (!$util.isString(message.toAddress)) + return "toAddress: string expected"; + if (message.amount != null && message.hasOwnProperty("amount")) { + if (!Array.isArray(message.amount)) + return "amount: array expected"; + for (var i = 0; i < message.amount.length; ++i) { + var error = $root.cosmos.base.v1beta1.Coin.verify(message.amount[i]); + if (error) + return "amount." + error; + } + } + if (message.endTime != null && message.hasOwnProperty("endTime")) + if (!$util.isInteger(message.endTime) && !(message.endTime && $util.isInteger(message.endTime.low) && $util.isInteger(message.endTime.high))) + return "endTime: integer|Long expected"; + if (message.delayed != null && message.hasOwnProperty("delayed")) + if (typeof message.delayed !== "boolean") + return "delayed: boolean expected"; + return null; + }; + + /** + * Creates a MsgCreateVestingAccount message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.vesting.v1beta1.MsgCreateVestingAccount + * @static + * @param {Object.} object Plain object + * @returns {cosmos.vesting.v1beta1.MsgCreateVestingAccount} MsgCreateVestingAccount + */ + MsgCreateVestingAccount.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.vesting.v1beta1.MsgCreateVestingAccount) + return object; + var message = new $root.cosmos.vesting.v1beta1.MsgCreateVestingAccount(); + if (object.fromAddress != null) + message.fromAddress = String(object.fromAddress); + if (object.toAddress != null) + message.toAddress = String(object.toAddress); + if (object.amount) { + if (!Array.isArray(object.amount)) + throw TypeError(".cosmos.vesting.v1beta1.MsgCreateVestingAccount.amount: array expected"); + message.amount = []; + for (var i = 0; i < object.amount.length; ++i) { + if (typeof object.amount[i] !== "object") + throw TypeError(".cosmos.vesting.v1beta1.MsgCreateVestingAccount.amount: object expected"); + message.amount[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.amount[i]); + } + } + if (object.endTime != null) + if ($util.Long) + (message.endTime = $util.Long.fromValue(object.endTime)).unsigned = false; + else if (typeof object.endTime === "string") + message.endTime = parseInt(object.endTime, 10); + else if (typeof object.endTime === "number") + message.endTime = object.endTime; + else if (typeof object.endTime === "object") + message.endTime = new $util.LongBits(object.endTime.low >>> 0, object.endTime.high >>> 0).toNumber(); + if (object.delayed != null) + message.delayed = Boolean(object.delayed); + return message; + }; + + /** + * Creates a plain object from a MsgCreateVestingAccount message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.vesting.v1beta1.MsgCreateVestingAccount + * @static + * @param {cosmos.vesting.v1beta1.MsgCreateVestingAccount} message MsgCreateVestingAccount + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgCreateVestingAccount.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.amount = []; + if (options.defaults) { + object.fromAddress = ""; + object.toAddress = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.endTime = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.endTime = options.longs === String ? "0" : 0; + object.delayed = false; + } + if (message.fromAddress != null && message.hasOwnProperty("fromAddress")) + object.fromAddress = message.fromAddress; + if (message.toAddress != null && message.hasOwnProperty("toAddress")) + object.toAddress = message.toAddress; + if (message.amount && message.amount.length) { + object.amount = []; + for (var j = 0; j < message.amount.length; ++j) + object.amount[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.amount[j], options); + } + if (message.endTime != null && message.hasOwnProperty("endTime")) + if (typeof message.endTime === "number") + object.endTime = options.longs === String ? String(message.endTime) : message.endTime; + else + object.endTime = options.longs === String ? $util.Long.prototype.toString.call(message.endTime) : options.longs === Number ? new $util.LongBits(message.endTime.low >>> 0, message.endTime.high >>> 0).toNumber() : message.endTime; + if (message.delayed != null && message.hasOwnProperty("delayed")) + object.delayed = message.delayed; + return object; + }; + + /** + * Converts this MsgCreateVestingAccount to JSON. + * @function toJSON + * @memberof cosmos.vesting.v1beta1.MsgCreateVestingAccount + * @instance + * @returns {Object.} JSON object + */ + MsgCreateVestingAccount.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgCreateVestingAccount; + })(v1beta1.MsgCreateVestingAccount || {}); + + v1beta1.MsgCreateVestingAccountResponse = (function(MsgCreateVestingAccountResponse) { + + /** + * Properties of a MsgCreateVestingAccountResponse. + * @memberof cosmos.vesting.v1beta1 + * @interface IMsgCreateVestingAccountResponse + */ + + /** + * Constructs a new MsgCreateVestingAccountResponse. + * @memberof cosmos.vesting.v1beta1 + * @classdesc Represents a MsgCreateVestingAccountResponse. + * @implements IMsgCreateVestingAccountResponse + * @constructor + * @param {cosmos.vesting.v1beta1.IMsgCreateVestingAccountResponse=} [properties] Properties to set + */ + function MsgCreateVestingAccountResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new MsgCreateVestingAccountResponse instance using the specified properties. + * @function create + * @memberof cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse + * @static + * @param {cosmos.vesting.v1beta1.IMsgCreateVestingAccountResponse=} [properties] Properties to set + * @returns {cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse} MsgCreateVestingAccountResponse instance + */ + MsgCreateVestingAccountResponse.create = function create(properties) { + return new MsgCreateVestingAccountResponse(properties); + }; + + /** + * Encodes the specified MsgCreateVestingAccountResponse message. Does not implicitly {@link cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse + * @static + * @param {cosmos.vesting.v1beta1.IMsgCreateVestingAccountResponse} message MsgCreateVestingAccountResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgCreateVestingAccountResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MsgCreateVestingAccountResponse message, length delimited. Does not implicitly {@link cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse + * @static + * @param {cosmos.vesting.v1beta1.IMsgCreateVestingAccountResponse} message MsgCreateVestingAccountResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgCreateVestingAccountResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgCreateVestingAccountResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse} MsgCreateVestingAccountResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgCreateVestingAccountResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgCreateVestingAccountResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse} MsgCreateVestingAccountResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgCreateVestingAccountResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgCreateVestingAccountResponse message. + * @function verify + * @memberof cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgCreateVestingAccountResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MsgCreateVestingAccountResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse} MsgCreateVestingAccountResponse + */ + MsgCreateVestingAccountResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse) + return object; + return new $root.cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse(); + }; + + /** + * Creates a plain object from a MsgCreateVestingAccountResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse + * @static + * @param {cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse} message MsgCreateVestingAccountResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgCreateVestingAccountResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MsgCreateVestingAccountResponse to JSON. + * @function toJSON + * @memberof cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse + * @instance + * @returns {Object.} JSON object + */ + MsgCreateVestingAccountResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgCreateVestingAccountResponse; + })(v1beta1.MsgCreateVestingAccountResponse || {}); + + return v1beta1; + })(vesting.v1beta1 || {}); + + return vesting; + })(cosmos.vesting || {}); + + return cosmos; +})($root.cosmos || {}); + +/** + * Namespace google. + * @exports google + * @namespace + */ + +$root.google = (function(google) { + + /** + * Namespace protobuf. + * @memberof google + * @namespace + */ + + google.protobuf = (function(protobuf) { + + protobuf.Timestamp = (function(Timestamp) { + + /** + * Properties of a Timestamp. + * @memberof google.protobuf + * @interface ITimestamp + * @property {number|Long|null} [seconds] Timestamp seconds + * @property {number|null} [nanos] Timestamp nanos + */ + + /** + * Constructs a new Timestamp. + * @memberof google.protobuf + * @classdesc Represents a Timestamp. + * @implements ITimestamp + * @constructor + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + */ + function Timestamp(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Timestamp seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Timestamp nanos. + * @member {number} nanos + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.nanos = 0; + + /** + * Creates a new Timestamp instance using the specified properties. + * @function create + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + * @returns {google.protobuf.Timestamp} Timestamp instance + */ + Timestamp.create = function create(properties) { + return new Timestamp(properties); + }; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.seconds = reader.int64(); + break; + case 2: + message.nanos = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Timestamp message. + * @function verify + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Timestamp.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Timestamp} Timestamp + */ + Timestamp.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Timestamp) + return object; + var message = new $root.google.protobuf.Timestamp(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.Timestamp} message Timestamp + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Timestamp.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Timestamp to JSON. + * @function toJSON + * @memberof google.protobuf.Timestamp + * @instance + * @returns {Object.} JSON object + */ + Timestamp.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Timestamp; + })(protobuf.Timestamp || {}); + + protobuf.Any = (function(Any) { + + /** + * Properties of an Any. + * @memberof google.protobuf + * @interface IAny + * @property {string|null} [type_url] Any type_url + * @property {Uint8Array|null} [value] Any value + */ + + /** + * Constructs a new Any. + * @memberof google.protobuf + * @classdesc Represents an Any. + * @implements IAny + * @constructor + * @param {google.protobuf.IAny=} [properties] Properties to set + */ + function Any(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Any type_url. + * @member {string} type_url + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.type_url = ""; + + /** + * Any value. + * @member {Uint8Array} value + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.value = $util.newBuffer([]); + + /** + * Creates a new Any instance using the specified properties. + * @function create + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny=} [properties] Properties to set + * @returns {google.protobuf.Any} Any instance + */ + Any.create = function create(properties) { + return new Any(properties); + }; + + /** + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Any.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type_url != null && Object.hasOwnProperty.call(message, "type_url")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type_url); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); + return writer; + }; + + /** + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Any.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Any message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Any + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Any} Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Any.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Any(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type_url = reader.string(); + break; + case 2: + message.value = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Any message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Any + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Any} Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Any.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Any message. + * @function verify + * @memberof google.protobuf.Any + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Any.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type_url != null && message.hasOwnProperty("type_url")) + if (!$util.isString(message.type_url)) + return "type_url: string expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; + return null; + }; + + /** + * Creates an Any message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Any + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Any} Any + */ + Any.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Any) + return object; + var message = new $root.google.protobuf.Any(); + if (object.type_url != null) + message.type_url = String(object.type_url); + if (object.value != null) + if (typeof object.value === "string") + $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); + else if (object.value.length) + message.value = object.value; + return message; + }; + + /** + * Creates a plain object from an Any message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.Any} message Any + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Any.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type_url = ""; + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + } + if (message.type_url != null && message.hasOwnProperty("type_url")) + object.type_url = message.type_url; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + return object; + }; + + /** + * Converts this Any to JSON. + * @function toJSON + * @memberof google.protobuf.Any + * @instance + * @returns {Object.} JSON object + */ + Any.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Any; + })(protobuf.Any || {}); + + protobuf.Duration = (function(Duration) { + + /** + * Properties of a Duration. + * @memberof google.protobuf + * @interface IDuration + * @property {number|Long|null} [seconds] Duration seconds + * @property {number|null} [nanos] Duration nanos + */ + + /** + * Constructs a new Duration. + * @memberof google.protobuf + * @classdesc Represents a Duration. + * @implements IDuration + * @constructor + * @param {google.protobuf.IDuration=} [properties] Properties to set + */ + function Duration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Duration seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Duration nanos. + * @member {number} nanos + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.nanos = 0; + + /** + * Creates a new Duration instance using the specified properties. + * @function create + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration=} [properties] Properties to set + * @returns {google.protobuf.Duration} Duration instance + */ + Duration.create = function create(properties) { + return new Duration(properties); + }; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.seconds = reader.int64(); + break; + case 2: + message.nanos = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Duration message. + * @function verify + * @memberof google.protobuf.Duration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Duration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Duration + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Duration} Duration + */ + Duration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Duration) + return object; + var message = new $root.google.protobuf.Duration(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.Duration} message Duration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Duration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Duration to JSON. + * @function toJSON + * @memberof google.protobuf.Duration + * @instance + * @returns {Object.} JSON object + */ + Duration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Duration; + })(protobuf.Duration || {}); + + return protobuf; + })(google.protobuf || {}); + + return google; +})($root.google || {}); + +/** + * Namespace tendermint. + * @exports tendermint + * @namespace + */ + +$root.tendermint = (function(tendermint) { + + /** + * Namespace abci. + * @memberof tendermint + * @namespace + */ + + tendermint.abci = (function(abci) { + + abci.Request = (function(Request) { + + /** + * Properties of a Request. + * @memberof tendermint.abci + * @interface IRequest + * @property {tendermint.abci.IRequestEcho|null} [echo] Request echo + * @property {tendermint.abci.IRequestFlush|null} [flush] Request flush + * @property {tendermint.abci.IRequestInfo|null} [info] Request info + * @property {tendermint.abci.IRequestSetOption|null} [setOption] Request setOption + * @property {tendermint.abci.IRequestInitChain|null} [initChain] Request initChain + * @property {tendermint.abci.IRequestQuery|null} [query] Request query + * @property {tendermint.abci.IRequestBeginBlock|null} [beginBlock] Request beginBlock + * @property {tendermint.abci.IRequestCheckTx|null} [checkTx] Request checkTx + * @property {tendermint.abci.IRequestDeliverTx|null} [deliverTx] Request deliverTx + * @property {tendermint.abci.IRequestEndBlock|null} [endBlock] Request endBlock + * @property {tendermint.abci.IRequestCommit|null} [commit] Request commit + * @property {tendermint.abci.IRequestListSnapshots|null} [listSnapshots] Request listSnapshots + * @property {tendermint.abci.IRequestOfferSnapshot|null} [offerSnapshot] Request offerSnapshot + * @property {tendermint.abci.IRequestLoadSnapshotChunk|null} [loadSnapshotChunk] Request loadSnapshotChunk + * @property {tendermint.abci.IRequestApplySnapshotChunk|null} [applySnapshotChunk] Request applySnapshotChunk + */ + + /** + * Constructs a new Request. + * @memberof tendermint.abci + * @classdesc Represents a Request. + * @implements IRequest + * @constructor + * @param {tendermint.abci.IRequest=} [properties] Properties to set + */ + function Request(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Request echo. + * @member {tendermint.abci.IRequestEcho|null|undefined} echo + * @memberof tendermint.abci.Request + * @instance + */ + Request.prototype.echo = null; + + /** + * Request flush. + * @member {tendermint.abci.IRequestFlush|null|undefined} flush + * @memberof tendermint.abci.Request + * @instance + */ + Request.prototype.flush = null; + + /** + * Request info. + * @member {tendermint.abci.IRequestInfo|null|undefined} info + * @memberof tendermint.abci.Request + * @instance + */ + Request.prototype.info = null; + + /** + * Request setOption. + * @member {tendermint.abci.IRequestSetOption|null|undefined} setOption + * @memberof tendermint.abci.Request + * @instance + */ + Request.prototype.setOption = null; + + /** + * Request initChain. + * @member {tendermint.abci.IRequestInitChain|null|undefined} initChain + * @memberof tendermint.abci.Request + * @instance + */ + Request.prototype.initChain = null; + + /** + * Request query. + * @member {tendermint.abci.IRequestQuery|null|undefined} query + * @memberof tendermint.abci.Request + * @instance + */ + Request.prototype.query = null; + + /** + * Request beginBlock. + * @member {tendermint.abci.IRequestBeginBlock|null|undefined} beginBlock + * @memberof tendermint.abci.Request + * @instance + */ + Request.prototype.beginBlock = null; + + /** + * Request checkTx. + * @member {tendermint.abci.IRequestCheckTx|null|undefined} checkTx + * @memberof tendermint.abci.Request + * @instance + */ + Request.prototype.checkTx = null; + + /** + * Request deliverTx. + * @member {tendermint.abci.IRequestDeliverTx|null|undefined} deliverTx + * @memberof tendermint.abci.Request + * @instance + */ + Request.prototype.deliverTx = null; + + /** + * Request endBlock. + * @member {tendermint.abci.IRequestEndBlock|null|undefined} endBlock + * @memberof tendermint.abci.Request + * @instance + */ + Request.prototype.endBlock = null; + + /** + * Request commit. + * @member {tendermint.abci.IRequestCommit|null|undefined} commit + * @memberof tendermint.abci.Request + * @instance + */ + Request.prototype.commit = null; + + /** + * Request listSnapshots. + * @member {tendermint.abci.IRequestListSnapshots|null|undefined} listSnapshots + * @memberof tendermint.abci.Request + * @instance + */ + Request.prototype.listSnapshots = null; + + /** + * Request offerSnapshot. + * @member {tendermint.abci.IRequestOfferSnapshot|null|undefined} offerSnapshot + * @memberof tendermint.abci.Request + * @instance + */ + Request.prototype.offerSnapshot = null; + + /** + * Request loadSnapshotChunk. + * @member {tendermint.abci.IRequestLoadSnapshotChunk|null|undefined} loadSnapshotChunk + * @memberof tendermint.abci.Request + * @instance + */ + Request.prototype.loadSnapshotChunk = null; + + /** + * Request applySnapshotChunk. + * @member {tendermint.abci.IRequestApplySnapshotChunk|null|undefined} applySnapshotChunk + * @memberof tendermint.abci.Request + * @instance + */ + Request.prototype.applySnapshotChunk = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Request value. + * @member {"echo"|"flush"|"info"|"setOption"|"initChain"|"query"|"beginBlock"|"checkTx"|"deliverTx"|"endBlock"|"commit"|"listSnapshots"|"offerSnapshot"|"loadSnapshotChunk"|"applySnapshotChunk"|undefined} value + * @memberof tendermint.abci.Request + * @instance + */ + Object.defineProperty(Request.prototype, "value", { + get: $util.oneOfGetter($oneOfFields = ["echo", "flush", "info", "setOption", "initChain", "query", "beginBlock", "checkTx", "deliverTx", "endBlock", "commit", "listSnapshots", "offerSnapshot", "loadSnapshotChunk", "applySnapshotChunk"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Request instance using the specified properties. + * @function create + * @memberof tendermint.abci.Request + * @static + * @param {tendermint.abci.IRequest=} [properties] Properties to set + * @returns {tendermint.abci.Request} Request instance + */ + Request.create = function create(properties) { + return new Request(properties); + }; + + /** + * Encodes the specified Request message. Does not implicitly {@link tendermint.abci.Request.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.Request + * @static + * @param {tendermint.abci.IRequest} message Request message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Request.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.echo != null && Object.hasOwnProperty.call(message, "echo")) + $root.tendermint.abci.RequestEcho.encode(message.echo, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.flush != null && Object.hasOwnProperty.call(message, "flush")) + $root.tendermint.abci.RequestFlush.encode(message.flush, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.info != null && Object.hasOwnProperty.call(message, "info")) + $root.tendermint.abci.RequestInfo.encode(message.info, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.setOption != null && Object.hasOwnProperty.call(message, "setOption")) + $root.tendermint.abci.RequestSetOption.encode(message.setOption, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.initChain != null && Object.hasOwnProperty.call(message, "initChain")) + $root.tendermint.abci.RequestInitChain.encode(message.initChain, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.query != null && Object.hasOwnProperty.call(message, "query")) + $root.tendermint.abci.RequestQuery.encode(message.query, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.beginBlock != null && Object.hasOwnProperty.call(message, "beginBlock")) + $root.tendermint.abci.RequestBeginBlock.encode(message.beginBlock, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.checkTx != null && Object.hasOwnProperty.call(message, "checkTx")) + $root.tendermint.abci.RequestCheckTx.encode(message.checkTx, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.deliverTx != null && Object.hasOwnProperty.call(message, "deliverTx")) + $root.tendermint.abci.RequestDeliverTx.encode(message.deliverTx, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.endBlock != null && Object.hasOwnProperty.call(message, "endBlock")) + $root.tendermint.abci.RequestEndBlock.encode(message.endBlock, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.commit != null && Object.hasOwnProperty.call(message, "commit")) + $root.tendermint.abci.RequestCommit.encode(message.commit, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.listSnapshots != null && Object.hasOwnProperty.call(message, "listSnapshots")) + $root.tendermint.abci.RequestListSnapshots.encode(message.listSnapshots, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.offerSnapshot != null && Object.hasOwnProperty.call(message, "offerSnapshot")) + $root.tendermint.abci.RequestOfferSnapshot.encode(message.offerSnapshot, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.loadSnapshotChunk != null && Object.hasOwnProperty.call(message, "loadSnapshotChunk")) + $root.tendermint.abci.RequestLoadSnapshotChunk.encode(message.loadSnapshotChunk, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.applySnapshotChunk != null && Object.hasOwnProperty.call(message, "applySnapshotChunk")) + $root.tendermint.abci.RequestApplySnapshotChunk.encode(message.applySnapshotChunk, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Request message, length delimited. Does not implicitly {@link tendermint.abci.Request.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.Request + * @static + * @param {tendermint.abci.IRequest} message Request message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Request.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Request message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.Request + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.Request} Request + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Request.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.Request(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.echo = $root.tendermint.abci.RequestEcho.decode(reader, reader.uint32()); + break; + case 2: + message.flush = $root.tendermint.abci.RequestFlush.decode(reader, reader.uint32()); + break; + case 3: + message.info = $root.tendermint.abci.RequestInfo.decode(reader, reader.uint32()); + break; + case 4: + message.setOption = $root.tendermint.abci.RequestSetOption.decode(reader, reader.uint32()); + break; + case 5: + message.initChain = $root.tendermint.abci.RequestInitChain.decode(reader, reader.uint32()); + break; + case 6: + message.query = $root.tendermint.abci.RequestQuery.decode(reader, reader.uint32()); + break; + case 7: + message.beginBlock = $root.tendermint.abci.RequestBeginBlock.decode(reader, reader.uint32()); + break; + case 8: + message.checkTx = $root.tendermint.abci.RequestCheckTx.decode(reader, reader.uint32()); + break; + case 9: + message.deliverTx = $root.tendermint.abci.RequestDeliverTx.decode(reader, reader.uint32()); + break; + case 10: + message.endBlock = $root.tendermint.abci.RequestEndBlock.decode(reader, reader.uint32()); + break; + case 11: + message.commit = $root.tendermint.abci.RequestCommit.decode(reader, reader.uint32()); + break; + case 12: + message.listSnapshots = $root.tendermint.abci.RequestListSnapshots.decode(reader, reader.uint32()); + break; + case 13: + message.offerSnapshot = $root.tendermint.abci.RequestOfferSnapshot.decode(reader, reader.uint32()); + break; + case 14: + message.loadSnapshotChunk = $root.tendermint.abci.RequestLoadSnapshotChunk.decode(reader, reader.uint32()); + break; + case 15: + message.applySnapshotChunk = $root.tendermint.abci.RequestApplySnapshotChunk.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Request message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.Request + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.Request} Request + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Request.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Request message. + * @function verify + * @memberof tendermint.abci.Request + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Request.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.echo != null && message.hasOwnProperty("echo")) { + properties.value = 1; + { + var error = $root.tendermint.abci.RequestEcho.verify(message.echo); + if (error) + return "echo." + error; + } + } + if (message.flush != null && message.hasOwnProperty("flush")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.tendermint.abci.RequestFlush.verify(message.flush); + if (error) + return "flush." + error; + } + } + if (message.info != null && message.hasOwnProperty("info")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.tendermint.abci.RequestInfo.verify(message.info); + if (error) + return "info." + error; + } + } + if (message.setOption != null && message.hasOwnProperty("setOption")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.tendermint.abci.RequestSetOption.verify(message.setOption); + if (error) + return "setOption." + error; + } + } + if (message.initChain != null && message.hasOwnProperty("initChain")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.tendermint.abci.RequestInitChain.verify(message.initChain); + if (error) + return "initChain." + error; + } + } + if (message.query != null && message.hasOwnProperty("query")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.tendermint.abci.RequestQuery.verify(message.query); + if (error) + return "query." + error; + } + } + if (message.beginBlock != null && message.hasOwnProperty("beginBlock")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.tendermint.abci.RequestBeginBlock.verify(message.beginBlock); + if (error) + return "beginBlock." + error; + } + } + if (message.checkTx != null && message.hasOwnProperty("checkTx")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.tendermint.abci.RequestCheckTx.verify(message.checkTx); + if (error) + return "checkTx." + error; + } + } + if (message.deliverTx != null && message.hasOwnProperty("deliverTx")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.tendermint.abci.RequestDeliverTx.verify(message.deliverTx); + if (error) + return "deliverTx." + error; + } + } + if (message.endBlock != null && message.hasOwnProperty("endBlock")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.tendermint.abci.RequestEndBlock.verify(message.endBlock); + if (error) + return "endBlock." + error; + } + } + if (message.commit != null && message.hasOwnProperty("commit")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.tendermint.abci.RequestCommit.verify(message.commit); + if (error) + return "commit." + error; + } + } + if (message.listSnapshots != null && message.hasOwnProperty("listSnapshots")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.tendermint.abci.RequestListSnapshots.verify(message.listSnapshots); + if (error) + return "listSnapshots." + error; + } + } + if (message.offerSnapshot != null && message.hasOwnProperty("offerSnapshot")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.tendermint.abci.RequestOfferSnapshot.verify(message.offerSnapshot); + if (error) + return "offerSnapshot." + error; + } + } + if (message.loadSnapshotChunk != null && message.hasOwnProperty("loadSnapshotChunk")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.tendermint.abci.RequestLoadSnapshotChunk.verify(message.loadSnapshotChunk); + if (error) + return "loadSnapshotChunk." + error; + } + } + if (message.applySnapshotChunk != null && message.hasOwnProperty("applySnapshotChunk")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.tendermint.abci.RequestApplySnapshotChunk.verify(message.applySnapshotChunk); + if (error) + return "applySnapshotChunk." + error; + } + } + return null; + }; + + /** + * Creates a Request message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.Request + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.Request} Request + */ + Request.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.Request) + return object; + var message = new $root.tendermint.abci.Request(); + if (object.echo != null) { + if (typeof object.echo !== "object") + throw TypeError(".tendermint.abci.Request.echo: object expected"); + message.echo = $root.tendermint.abci.RequestEcho.fromObject(object.echo); + } + if (object.flush != null) { + if (typeof object.flush !== "object") + throw TypeError(".tendermint.abci.Request.flush: object expected"); + message.flush = $root.tendermint.abci.RequestFlush.fromObject(object.flush); + } + if (object.info != null) { + if (typeof object.info !== "object") + throw TypeError(".tendermint.abci.Request.info: object expected"); + message.info = $root.tendermint.abci.RequestInfo.fromObject(object.info); + } + if (object.setOption != null) { + if (typeof object.setOption !== "object") + throw TypeError(".tendermint.abci.Request.setOption: object expected"); + message.setOption = $root.tendermint.abci.RequestSetOption.fromObject(object.setOption); + } + if (object.initChain != null) { + if (typeof object.initChain !== "object") + throw TypeError(".tendermint.abci.Request.initChain: object expected"); + message.initChain = $root.tendermint.abci.RequestInitChain.fromObject(object.initChain); + } + if (object.query != null) { + if (typeof object.query !== "object") + throw TypeError(".tendermint.abci.Request.query: object expected"); + message.query = $root.tendermint.abci.RequestQuery.fromObject(object.query); + } + if (object.beginBlock != null) { + if (typeof object.beginBlock !== "object") + throw TypeError(".tendermint.abci.Request.beginBlock: object expected"); + message.beginBlock = $root.tendermint.abci.RequestBeginBlock.fromObject(object.beginBlock); + } + if (object.checkTx != null) { + if (typeof object.checkTx !== "object") + throw TypeError(".tendermint.abci.Request.checkTx: object expected"); + message.checkTx = $root.tendermint.abci.RequestCheckTx.fromObject(object.checkTx); + } + if (object.deliverTx != null) { + if (typeof object.deliverTx !== "object") + throw TypeError(".tendermint.abci.Request.deliverTx: object expected"); + message.deliverTx = $root.tendermint.abci.RequestDeliverTx.fromObject(object.deliverTx); + } + if (object.endBlock != null) { + if (typeof object.endBlock !== "object") + throw TypeError(".tendermint.abci.Request.endBlock: object expected"); + message.endBlock = $root.tendermint.abci.RequestEndBlock.fromObject(object.endBlock); + } + if (object.commit != null) { + if (typeof object.commit !== "object") + throw TypeError(".tendermint.abci.Request.commit: object expected"); + message.commit = $root.tendermint.abci.RequestCommit.fromObject(object.commit); + } + if (object.listSnapshots != null) { + if (typeof object.listSnapshots !== "object") + throw TypeError(".tendermint.abci.Request.listSnapshots: object expected"); + message.listSnapshots = $root.tendermint.abci.RequestListSnapshots.fromObject(object.listSnapshots); + } + if (object.offerSnapshot != null) { + if (typeof object.offerSnapshot !== "object") + throw TypeError(".tendermint.abci.Request.offerSnapshot: object expected"); + message.offerSnapshot = $root.tendermint.abci.RequestOfferSnapshot.fromObject(object.offerSnapshot); + } + if (object.loadSnapshotChunk != null) { + if (typeof object.loadSnapshotChunk !== "object") + throw TypeError(".tendermint.abci.Request.loadSnapshotChunk: object expected"); + message.loadSnapshotChunk = $root.tendermint.abci.RequestLoadSnapshotChunk.fromObject(object.loadSnapshotChunk); + } + if (object.applySnapshotChunk != null) { + if (typeof object.applySnapshotChunk !== "object") + throw TypeError(".tendermint.abci.Request.applySnapshotChunk: object expected"); + message.applySnapshotChunk = $root.tendermint.abci.RequestApplySnapshotChunk.fromObject(object.applySnapshotChunk); + } + return message; + }; + + /** + * Creates a plain object from a Request message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.Request + * @static + * @param {tendermint.abci.Request} message Request + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Request.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.echo != null && message.hasOwnProperty("echo")) { + object.echo = $root.tendermint.abci.RequestEcho.toObject(message.echo, options); + if (options.oneofs) + object.value = "echo"; + } + if (message.flush != null && message.hasOwnProperty("flush")) { + object.flush = $root.tendermint.abci.RequestFlush.toObject(message.flush, options); + if (options.oneofs) + object.value = "flush"; + } + if (message.info != null && message.hasOwnProperty("info")) { + object.info = $root.tendermint.abci.RequestInfo.toObject(message.info, options); + if (options.oneofs) + object.value = "info"; + } + if (message.setOption != null && message.hasOwnProperty("setOption")) { + object.setOption = $root.tendermint.abci.RequestSetOption.toObject(message.setOption, options); + if (options.oneofs) + object.value = "setOption"; + } + if (message.initChain != null && message.hasOwnProperty("initChain")) { + object.initChain = $root.tendermint.abci.RequestInitChain.toObject(message.initChain, options); + if (options.oneofs) + object.value = "initChain"; + } + if (message.query != null && message.hasOwnProperty("query")) { + object.query = $root.tendermint.abci.RequestQuery.toObject(message.query, options); + if (options.oneofs) + object.value = "query"; + } + if (message.beginBlock != null && message.hasOwnProperty("beginBlock")) { + object.beginBlock = $root.tendermint.abci.RequestBeginBlock.toObject(message.beginBlock, options); + if (options.oneofs) + object.value = "beginBlock"; + } + if (message.checkTx != null && message.hasOwnProperty("checkTx")) { + object.checkTx = $root.tendermint.abci.RequestCheckTx.toObject(message.checkTx, options); + if (options.oneofs) + object.value = "checkTx"; + } + if (message.deliverTx != null && message.hasOwnProperty("deliverTx")) { + object.deliverTx = $root.tendermint.abci.RequestDeliverTx.toObject(message.deliverTx, options); + if (options.oneofs) + object.value = "deliverTx"; + } + if (message.endBlock != null && message.hasOwnProperty("endBlock")) { + object.endBlock = $root.tendermint.abci.RequestEndBlock.toObject(message.endBlock, options); + if (options.oneofs) + object.value = "endBlock"; + } + if (message.commit != null && message.hasOwnProperty("commit")) { + object.commit = $root.tendermint.abci.RequestCommit.toObject(message.commit, options); + if (options.oneofs) + object.value = "commit"; + } + if (message.listSnapshots != null && message.hasOwnProperty("listSnapshots")) { + object.listSnapshots = $root.tendermint.abci.RequestListSnapshots.toObject(message.listSnapshots, options); + if (options.oneofs) + object.value = "listSnapshots"; + } + if (message.offerSnapshot != null && message.hasOwnProperty("offerSnapshot")) { + object.offerSnapshot = $root.tendermint.abci.RequestOfferSnapshot.toObject(message.offerSnapshot, options); + if (options.oneofs) + object.value = "offerSnapshot"; + } + if (message.loadSnapshotChunk != null && message.hasOwnProperty("loadSnapshotChunk")) { + object.loadSnapshotChunk = $root.tendermint.abci.RequestLoadSnapshotChunk.toObject(message.loadSnapshotChunk, options); + if (options.oneofs) + object.value = "loadSnapshotChunk"; + } + if (message.applySnapshotChunk != null && message.hasOwnProperty("applySnapshotChunk")) { + object.applySnapshotChunk = $root.tendermint.abci.RequestApplySnapshotChunk.toObject(message.applySnapshotChunk, options); + if (options.oneofs) + object.value = "applySnapshotChunk"; + } + return object; + }; + + /** + * Converts this Request to JSON. + * @function toJSON + * @memberof tendermint.abci.Request + * @instance + * @returns {Object.} JSON object + */ + Request.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Request; + })(abci.Request || {}); + + abci.RequestEcho = (function(RequestEcho) { + + /** + * Properties of a RequestEcho. + * @memberof tendermint.abci + * @interface IRequestEcho + * @property {string|null} [message] RequestEcho message + */ + + /** + * Constructs a new RequestEcho. + * @memberof tendermint.abci + * @classdesc Represents a RequestEcho. + * @implements IRequestEcho + * @constructor + * @param {tendermint.abci.IRequestEcho=} [properties] Properties to set + */ + function RequestEcho(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RequestEcho message. + * @member {string} message + * @memberof tendermint.abci.RequestEcho + * @instance + */ + RequestEcho.prototype.message = ""; + + /** + * Creates a new RequestEcho instance using the specified properties. + * @function create + * @memberof tendermint.abci.RequestEcho + * @static + * @param {tendermint.abci.IRequestEcho=} [properties] Properties to set + * @returns {tendermint.abci.RequestEcho} RequestEcho instance + */ + RequestEcho.create = function create(properties) { + return new RequestEcho(properties); + }; + + /** + * Encodes the specified RequestEcho message. Does not implicitly {@link tendermint.abci.RequestEcho.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.RequestEcho + * @static + * @param {tendermint.abci.IRequestEcho} message RequestEcho message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestEcho.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.message); + return writer; + }; + + /** + * Encodes the specified RequestEcho message, length delimited. Does not implicitly {@link tendermint.abci.RequestEcho.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.RequestEcho + * @static + * @param {tendermint.abci.IRequestEcho} message RequestEcho message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestEcho.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RequestEcho message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.RequestEcho + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.RequestEcho} RequestEcho + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestEcho.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.RequestEcho(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.message = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RequestEcho message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.RequestEcho + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.RequestEcho} RequestEcho + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestEcho.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RequestEcho message. + * @function verify + * @memberof tendermint.abci.RequestEcho + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RequestEcho.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + return null; + }; + + /** + * Creates a RequestEcho message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.RequestEcho + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.RequestEcho} RequestEcho + */ + RequestEcho.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.RequestEcho) + return object; + var message = new $root.tendermint.abci.RequestEcho(); + if (object.message != null) + message.message = String(object.message); + return message; + }; + + /** + * Creates a plain object from a RequestEcho message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.RequestEcho + * @static + * @param {tendermint.abci.RequestEcho} message RequestEcho + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RequestEcho.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.message = ""; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + return object; + }; + + /** + * Converts this RequestEcho to JSON. + * @function toJSON + * @memberof tendermint.abci.RequestEcho + * @instance + * @returns {Object.} JSON object + */ + RequestEcho.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RequestEcho; + })(abci.RequestEcho || {}); + + abci.RequestFlush = (function(RequestFlush) { + + /** + * Properties of a RequestFlush. + * @memberof tendermint.abci + * @interface IRequestFlush + */ + + /** + * Constructs a new RequestFlush. + * @memberof tendermint.abci + * @classdesc Represents a RequestFlush. + * @implements IRequestFlush + * @constructor + * @param {tendermint.abci.IRequestFlush=} [properties] Properties to set + */ + function RequestFlush(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new RequestFlush instance using the specified properties. + * @function create + * @memberof tendermint.abci.RequestFlush + * @static + * @param {tendermint.abci.IRequestFlush=} [properties] Properties to set + * @returns {tendermint.abci.RequestFlush} RequestFlush instance + */ + RequestFlush.create = function create(properties) { + return new RequestFlush(properties); + }; + + /** + * Encodes the specified RequestFlush message. Does not implicitly {@link tendermint.abci.RequestFlush.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.RequestFlush + * @static + * @param {tendermint.abci.IRequestFlush} message RequestFlush message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestFlush.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified RequestFlush message, length delimited. Does not implicitly {@link tendermint.abci.RequestFlush.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.RequestFlush + * @static + * @param {tendermint.abci.IRequestFlush} message RequestFlush message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestFlush.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RequestFlush message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.RequestFlush + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.RequestFlush} RequestFlush + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestFlush.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.RequestFlush(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RequestFlush message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.RequestFlush + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.RequestFlush} RequestFlush + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestFlush.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RequestFlush message. + * @function verify + * @memberof tendermint.abci.RequestFlush + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RequestFlush.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a RequestFlush message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.RequestFlush + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.RequestFlush} RequestFlush + */ + RequestFlush.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.RequestFlush) + return object; + return new $root.tendermint.abci.RequestFlush(); + }; + + /** + * Creates a plain object from a RequestFlush message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.RequestFlush + * @static + * @param {tendermint.abci.RequestFlush} message RequestFlush + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RequestFlush.toObject = function toObject() { + return {}; + }; + + /** + * Converts this RequestFlush to JSON. + * @function toJSON + * @memberof tendermint.abci.RequestFlush + * @instance + * @returns {Object.} JSON object + */ + RequestFlush.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RequestFlush; + })(abci.RequestFlush || {}); + + abci.RequestInfo = (function(RequestInfo) { + + /** + * Properties of a RequestInfo. + * @memberof tendermint.abci + * @interface IRequestInfo + * @property {string|null} [version] RequestInfo version + * @property {number|Long|null} [blockVersion] RequestInfo blockVersion + * @property {number|Long|null} [p2pVersion] RequestInfo p2pVersion + */ + + /** + * Constructs a new RequestInfo. + * @memberof tendermint.abci + * @classdesc Represents a RequestInfo. + * @implements IRequestInfo + * @constructor + * @param {tendermint.abci.IRequestInfo=} [properties] Properties to set + */ + function RequestInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RequestInfo version. + * @member {string} version + * @memberof tendermint.abci.RequestInfo + * @instance + */ + RequestInfo.prototype.version = ""; + + /** + * RequestInfo blockVersion. + * @member {number|Long} blockVersion + * @memberof tendermint.abci.RequestInfo + * @instance + */ + RequestInfo.prototype.blockVersion = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * RequestInfo p2pVersion. + * @member {number|Long} p2pVersion + * @memberof tendermint.abci.RequestInfo + * @instance + */ + RequestInfo.prototype.p2pVersion = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new RequestInfo instance using the specified properties. + * @function create + * @memberof tendermint.abci.RequestInfo + * @static + * @param {tendermint.abci.IRequestInfo=} [properties] Properties to set + * @returns {tendermint.abci.RequestInfo} RequestInfo instance + */ + RequestInfo.create = function create(properties) { + return new RequestInfo(properties); + }; + + /** + * Encodes the specified RequestInfo message. Does not implicitly {@link tendermint.abci.RequestInfo.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.RequestInfo + * @static + * @param {tendermint.abci.IRequestInfo} message RequestInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); + if (message.blockVersion != null && Object.hasOwnProperty.call(message, "blockVersion")) + writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.blockVersion); + if (message.p2pVersion != null && Object.hasOwnProperty.call(message, "p2pVersion")) + writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.p2pVersion); + return writer; + }; + + /** + * Encodes the specified RequestInfo message, length delimited. Does not implicitly {@link tendermint.abci.RequestInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.RequestInfo + * @static + * @param {tendermint.abci.IRequestInfo} message RequestInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RequestInfo message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.RequestInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.RequestInfo} RequestInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.RequestInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.version = reader.string(); + break; + case 2: + message.blockVersion = reader.uint64(); + break; + case 3: + message.p2pVersion = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RequestInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.RequestInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.RequestInfo} RequestInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RequestInfo message. + * @function verify + * @memberof tendermint.abci.RequestInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RequestInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.blockVersion != null && message.hasOwnProperty("blockVersion")) + if (!$util.isInteger(message.blockVersion) && !(message.blockVersion && $util.isInteger(message.blockVersion.low) && $util.isInteger(message.blockVersion.high))) + return "blockVersion: integer|Long expected"; + if (message.p2pVersion != null && message.hasOwnProperty("p2pVersion")) + if (!$util.isInteger(message.p2pVersion) && !(message.p2pVersion && $util.isInteger(message.p2pVersion.low) && $util.isInteger(message.p2pVersion.high))) + return "p2pVersion: integer|Long expected"; + return null; + }; + + /** + * Creates a RequestInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.RequestInfo + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.RequestInfo} RequestInfo + */ + RequestInfo.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.RequestInfo) + return object; + var message = new $root.tendermint.abci.RequestInfo(); + if (object.version != null) + message.version = String(object.version); + if (object.blockVersion != null) + if ($util.Long) + (message.blockVersion = $util.Long.fromValue(object.blockVersion)).unsigned = true; + else if (typeof object.blockVersion === "string") + message.blockVersion = parseInt(object.blockVersion, 10); + else if (typeof object.blockVersion === "number") + message.blockVersion = object.blockVersion; + else if (typeof object.blockVersion === "object") + message.blockVersion = new $util.LongBits(object.blockVersion.low >>> 0, object.blockVersion.high >>> 0).toNumber(true); + if (object.p2pVersion != null) + if ($util.Long) + (message.p2pVersion = $util.Long.fromValue(object.p2pVersion)).unsigned = true; + else if (typeof object.p2pVersion === "string") + message.p2pVersion = parseInt(object.p2pVersion, 10); + else if (typeof object.p2pVersion === "number") + message.p2pVersion = object.p2pVersion; + else if (typeof object.p2pVersion === "object") + message.p2pVersion = new $util.LongBits(object.p2pVersion.low >>> 0, object.p2pVersion.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a RequestInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.RequestInfo + * @static + * @param {tendermint.abci.RequestInfo} message RequestInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RequestInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.version = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.blockVersion = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.blockVersion = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.p2pVersion = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.p2pVersion = options.longs === String ? "0" : 0; + } + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.blockVersion != null && message.hasOwnProperty("blockVersion")) + if (typeof message.blockVersion === "number") + object.blockVersion = options.longs === String ? String(message.blockVersion) : message.blockVersion; + else + object.blockVersion = options.longs === String ? $util.Long.prototype.toString.call(message.blockVersion) : options.longs === Number ? new $util.LongBits(message.blockVersion.low >>> 0, message.blockVersion.high >>> 0).toNumber(true) : message.blockVersion; + if (message.p2pVersion != null && message.hasOwnProperty("p2pVersion")) + if (typeof message.p2pVersion === "number") + object.p2pVersion = options.longs === String ? String(message.p2pVersion) : message.p2pVersion; + else + object.p2pVersion = options.longs === String ? $util.Long.prototype.toString.call(message.p2pVersion) : options.longs === Number ? new $util.LongBits(message.p2pVersion.low >>> 0, message.p2pVersion.high >>> 0).toNumber(true) : message.p2pVersion; + return object; + }; + + /** + * Converts this RequestInfo to JSON. + * @function toJSON + * @memberof tendermint.abci.RequestInfo + * @instance + * @returns {Object.} JSON object + */ + RequestInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RequestInfo; + })(abci.RequestInfo || {}); + + abci.RequestSetOption = (function(RequestSetOption) { + + /** + * Properties of a RequestSetOption. + * @memberof tendermint.abci + * @interface IRequestSetOption + * @property {string|null} [key] RequestSetOption key + * @property {string|null} [value] RequestSetOption value + */ + + /** + * Constructs a new RequestSetOption. + * @memberof tendermint.abci + * @classdesc Represents a RequestSetOption. + * @implements IRequestSetOption + * @constructor + * @param {tendermint.abci.IRequestSetOption=} [properties] Properties to set + */ + function RequestSetOption(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RequestSetOption key. + * @member {string} key + * @memberof tendermint.abci.RequestSetOption + * @instance + */ + RequestSetOption.prototype.key = ""; + + /** + * RequestSetOption value. + * @member {string} value + * @memberof tendermint.abci.RequestSetOption + * @instance + */ + RequestSetOption.prototype.value = ""; + + /** + * Creates a new RequestSetOption instance using the specified properties. + * @function create + * @memberof tendermint.abci.RequestSetOption + * @static + * @param {tendermint.abci.IRequestSetOption=} [properties] Properties to set + * @returns {tendermint.abci.RequestSetOption} RequestSetOption instance + */ + RequestSetOption.create = function create(properties) { + return new RequestSetOption(properties); + }; + + /** + * Encodes the specified RequestSetOption message. Does not implicitly {@link tendermint.abci.RequestSetOption.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.RequestSetOption + * @static + * @param {tendermint.abci.IRequestSetOption} message RequestSetOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestSetOption.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + return writer; + }; + + /** + * Encodes the specified RequestSetOption message, length delimited. Does not implicitly {@link tendermint.abci.RequestSetOption.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.RequestSetOption + * @static + * @param {tendermint.abci.IRequestSetOption} message RequestSetOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestSetOption.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RequestSetOption message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.RequestSetOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.RequestSetOption} RequestSetOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestSetOption.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.RequestSetOption(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.key = reader.string(); + break; + case 2: + message.value = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RequestSetOption message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.RequestSetOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.RequestSetOption} RequestSetOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestSetOption.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RequestSetOption message. + * @function verify + * @memberof tendermint.abci.RequestSetOption + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RequestSetOption.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.key != null && message.hasOwnProperty("key")) + if (!$util.isString(message.key)) + return "key: string expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + return null; + }; + + /** + * Creates a RequestSetOption message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.RequestSetOption + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.RequestSetOption} RequestSetOption + */ + RequestSetOption.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.RequestSetOption) + return object; + var message = new $root.tendermint.abci.RequestSetOption(); + if (object.key != null) + message.key = String(object.key); + if (object.value != null) + message.value = String(object.value); + return message; + }; + + /** + * Creates a plain object from a RequestSetOption message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.RequestSetOption + * @static + * @param {tendermint.abci.RequestSetOption} message RequestSetOption + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RequestSetOption.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.key = ""; + object.value = ""; + } + if (message.key != null && message.hasOwnProperty("key")) + object.key = message.key; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + return object; + }; + + /** + * Converts this RequestSetOption to JSON. + * @function toJSON + * @memberof tendermint.abci.RequestSetOption + * @instance + * @returns {Object.} JSON object + */ + RequestSetOption.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RequestSetOption; + })(abci.RequestSetOption || {}); + + abci.RequestInitChain = (function(RequestInitChain) { + + /** + * Properties of a RequestInitChain. + * @memberof tendermint.abci + * @interface IRequestInitChain + * @property {google.protobuf.ITimestamp|null} [time] RequestInitChain time + * @property {string|null} [chainId] RequestInitChain chainId + * @property {tendermint.abci.IConsensusParams|null} [consensusParams] RequestInitChain consensusParams + * @property {Array.|null} [validators] RequestInitChain validators + * @property {Uint8Array|null} [appStateBytes] RequestInitChain appStateBytes + * @property {number|Long|null} [initialHeight] RequestInitChain initialHeight + */ + + /** + * Constructs a new RequestInitChain. + * @memberof tendermint.abci + * @classdesc Represents a RequestInitChain. + * @implements IRequestInitChain + * @constructor + * @param {tendermint.abci.IRequestInitChain=} [properties] Properties to set + */ + function RequestInitChain(properties) { + this.validators = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RequestInitChain time. + * @member {google.protobuf.ITimestamp|null|undefined} time + * @memberof tendermint.abci.RequestInitChain + * @instance + */ + RequestInitChain.prototype.time = null; + + /** + * RequestInitChain chainId. + * @member {string} chainId + * @memberof tendermint.abci.RequestInitChain + * @instance + */ + RequestInitChain.prototype.chainId = ""; + + /** + * RequestInitChain consensusParams. + * @member {tendermint.abci.IConsensusParams|null|undefined} consensusParams + * @memberof tendermint.abci.RequestInitChain + * @instance + */ + RequestInitChain.prototype.consensusParams = null; + + /** + * RequestInitChain validators. + * @member {Array.} validators + * @memberof tendermint.abci.RequestInitChain + * @instance + */ + RequestInitChain.prototype.validators = $util.emptyArray; + + /** + * RequestInitChain appStateBytes. + * @member {Uint8Array} appStateBytes + * @memberof tendermint.abci.RequestInitChain + * @instance + */ + RequestInitChain.prototype.appStateBytes = $util.newBuffer([]); + + /** + * RequestInitChain initialHeight. + * @member {number|Long} initialHeight + * @memberof tendermint.abci.RequestInitChain + * @instance + */ + RequestInitChain.prototype.initialHeight = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new RequestInitChain instance using the specified properties. + * @function create + * @memberof tendermint.abci.RequestInitChain + * @static + * @param {tendermint.abci.IRequestInitChain=} [properties] Properties to set + * @returns {tendermint.abci.RequestInitChain} RequestInitChain instance + */ + RequestInitChain.create = function create(properties) { + return new RequestInitChain(properties); + }; + + /** + * Encodes the specified RequestInitChain message. Does not implicitly {@link tendermint.abci.RequestInitChain.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.RequestInitChain + * @static + * @param {tendermint.abci.IRequestInitChain} message RequestInitChain message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestInitChain.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.time != null && Object.hasOwnProperty.call(message, "time")) + $root.google.protobuf.Timestamp.encode(message.time, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.chainId != null && Object.hasOwnProperty.call(message, "chainId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.chainId); + if (message.consensusParams != null && Object.hasOwnProperty.call(message, "consensusParams")) + $root.tendermint.abci.ConsensusParams.encode(message.consensusParams, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.validators != null && message.validators.length) + for (var i = 0; i < message.validators.length; ++i) + $root.tendermint.abci.ValidatorUpdate.encode(message.validators[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.appStateBytes != null && Object.hasOwnProperty.call(message, "appStateBytes")) + writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.appStateBytes); + if (message.initialHeight != null && Object.hasOwnProperty.call(message, "initialHeight")) + writer.uint32(/* id 6, wireType 0 =*/48).int64(message.initialHeight); + return writer; + }; + + /** + * Encodes the specified RequestInitChain message, length delimited. Does not implicitly {@link tendermint.abci.RequestInitChain.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.RequestInitChain + * @static + * @param {tendermint.abci.IRequestInitChain} message RequestInitChain message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestInitChain.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RequestInitChain message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.RequestInitChain + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.RequestInitChain} RequestInitChain + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestInitChain.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.RequestInitChain(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.time = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 2: + message.chainId = reader.string(); + break; + case 3: + message.consensusParams = $root.tendermint.abci.ConsensusParams.decode(reader, reader.uint32()); + break; + case 4: + if (!(message.validators && message.validators.length)) + message.validators = []; + message.validators.push($root.tendermint.abci.ValidatorUpdate.decode(reader, reader.uint32())); + break; + case 5: + message.appStateBytes = reader.bytes(); + break; + case 6: + message.initialHeight = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RequestInitChain message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.RequestInitChain + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.RequestInitChain} RequestInitChain + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestInitChain.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RequestInitChain message. + * @function verify + * @memberof tendermint.abci.RequestInitChain + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RequestInitChain.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.time != null && message.hasOwnProperty("time")) { + var error = $root.google.protobuf.Timestamp.verify(message.time); + if (error) + return "time." + error; + } + if (message.chainId != null && message.hasOwnProperty("chainId")) + if (!$util.isString(message.chainId)) + return "chainId: string expected"; + if (message.consensusParams != null && message.hasOwnProperty("consensusParams")) { + var error = $root.tendermint.abci.ConsensusParams.verify(message.consensusParams); + if (error) + return "consensusParams." + error; + } + if (message.validators != null && message.hasOwnProperty("validators")) { + if (!Array.isArray(message.validators)) + return "validators: array expected"; + for (var i = 0; i < message.validators.length; ++i) { + var error = $root.tendermint.abci.ValidatorUpdate.verify(message.validators[i]); + if (error) + return "validators." + error; + } + } + if (message.appStateBytes != null && message.hasOwnProperty("appStateBytes")) + if (!(message.appStateBytes && typeof message.appStateBytes.length === "number" || $util.isString(message.appStateBytes))) + return "appStateBytes: buffer expected"; + if (message.initialHeight != null && message.hasOwnProperty("initialHeight")) + if (!$util.isInteger(message.initialHeight) && !(message.initialHeight && $util.isInteger(message.initialHeight.low) && $util.isInteger(message.initialHeight.high))) + return "initialHeight: integer|Long expected"; + return null; + }; + + /** + * Creates a RequestInitChain message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.RequestInitChain + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.RequestInitChain} RequestInitChain + */ + RequestInitChain.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.RequestInitChain) + return object; + var message = new $root.tendermint.abci.RequestInitChain(); + if (object.time != null) { + if (typeof object.time !== "object") + throw TypeError(".tendermint.abci.RequestInitChain.time: object expected"); + message.time = $root.google.protobuf.Timestamp.fromObject(object.time); + } + if (object.chainId != null) + message.chainId = String(object.chainId); + if (object.consensusParams != null) { + if (typeof object.consensusParams !== "object") + throw TypeError(".tendermint.abci.RequestInitChain.consensusParams: object expected"); + message.consensusParams = $root.tendermint.abci.ConsensusParams.fromObject(object.consensusParams); + } + if (object.validators) { + if (!Array.isArray(object.validators)) + throw TypeError(".tendermint.abci.RequestInitChain.validators: array expected"); + message.validators = []; + for (var i = 0; i < object.validators.length; ++i) { + if (typeof object.validators[i] !== "object") + throw TypeError(".tendermint.abci.RequestInitChain.validators: object expected"); + message.validators[i] = $root.tendermint.abci.ValidatorUpdate.fromObject(object.validators[i]); + } + } + if (object.appStateBytes != null) + if (typeof object.appStateBytes === "string") + $util.base64.decode(object.appStateBytes, message.appStateBytes = $util.newBuffer($util.base64.length(object.appStateBytes)), 0); + else if (object.appStateBytes.length) + message.appStateBytes = object.appStateBytes; + if (object.initialHeight != null) + if ($util.Long) + (message.initialHeight = $util.Long.fromValue(object.initialHeight)).unsigned = false; + else if (typeof object.initialHeight === "string") + message.initialHeight = parseInt(object.initialHeight, 10); + else if (typeof object.initialHeight === "number") + message.initialHeight = object.initialHeight; + else if (typeof object.initialHeight === "object") + message.initialHeight = new $util.LongBits(object.initialHeight.low >>> 0, object.initialHeight.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a RequestInitChain message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.RequestInitChain + * @static + * @param {tendermint.abci.RequestInitChain} message RequestInitChain + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RequestInitChain.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.validators = []; + if (options.defaults) { + object.time = null; + object.chainId = ""; + object.consensusParams = null; + if (options.bytes === String) + object.appStateBytes = ""; + else { + object.appStateBytes = []; + if (options.bytes !== Array) + object.appStateBytes = $util.newBuffer(object.appStateBytes); + } + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.initialHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.initialHeight = options.longs === String ? "0" : 0; + } + if (message.time != null && message.hasOwnProperty("time")) + object.time = $root.google.protobuf.Timestamp.toObject(message.time, options); + if (message.chainId != null && message.hasOwnProperty("chainId")) + object.chainId = message.chainId; + if (message.consensusParams != null && message.hasOwnProperty("consensusParams")) + object.consensusParams = $root.tendermint.abci.ConsensusParams.toObject(message.consensusParams, options); + if (message.validators && message.validators.length) { + object.validators = []; + for (var j = 0; j < message.validators.length; ++j) + object.validators[j] = $root.tendermint.abci.ValidatorUpdate.toObject(message.validators[j], options); + } + if (message.appStateBytes != null && message.hasOwnProperty("appStateBytes")) + object.appStateBytes = options.bytes === String ? $util.base64.encode(message.appStateBytes, 0, message.appStateBytes.length) : options.bytes === Array ? Array.prototype.slice.call(message.appStateBytes) : message.appStateBytes; + if (message.initialHeight != null && message.hasOwnProperty("initialHeight")) + if (typeof message.initialHeight === "number") + object.initialHeight = options.longs === String ? String(message.initialHeight) : message.initialHeight; + else + object.initialHeight = options.longs === String ? $util.Long.prototype.toString.call(message.initialHeight) : options.longs === Number ? new $util.LongBits(message.initialHeight.low >>> 0, message.initialHeight.high >>> 0).toNumber() : message.initialHeight; + return object; + }; + + /** + * Converts this RequestInitChain to JSON. + * @function toJSON + * @memberof tendermint.abci.RequestInitChain + * @instance + * @returns {Object.} JSON object + */ + RequestInitChain.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RequestInitChain; + })(abci.RequestInitChain || {}); + + abci.RequestQuery = (function(RequestQuery) { + + /** + * Properties of a RequestQuery. + * @memberof tendermint.abci + * @interface IRequestQuery + * @property {Uint8Array|null} [data] RequestQuery data + * @property {string|null} [path] RequestQuery path + * @property {number|Long|null} [height] RequestQuery height + * @property {boolean|null} [prove] RequestQuery prove + */ + + /** + * Constructs a new RequestQuery. + * @memberof tendermint.abci + * @classdesc Represents a RequestQuery. + * @implements IRequestQuery + * @constructor + * @param {tendermint.abci.IRequestQuery=} [properties] Properties to set + */ + function RequestQuery(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RequestQuery data. + * @member {Uint8Array} data + * @memberof tendermint.abci.RequestQuery + * @instance + */ + RequestQuery.prototype.data = $util.newBuffer([]); + + /** + * RequestQuery path. + * @member {string} path + * @memberof tendermint.abci.RequestQuery + * @instance + */ + RequestQuery.prototype.path = ""; + + /** + * RequestQuery height. + * @member {number|Long} height + * @memberof tendermint.abci.RequestQuery + * @instance + */ + RequestQuery.prototype.height = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * RequestQuery prove. + * @member {boolean} prove + * @memberof tendermint.abci.RequestQuery + * @instance + */ + RequestQuery.prototype.prove = false; + + /** + * Creates a new RequestQuery instance using the specified properties. + * @function create + * @memberof tendermint.abci.RequestQuery + * @static + * @param {tendermint.abci.IRequestQuery=} [properties] Properties to set + * @returns {tendermint.abci.RequestQuery} RequestQuery instance + */ + RequestQuery.create = function create(properties) { + return new RequestQuery(properties); + }; + + /** + * Encodes the specified RequestQuery message. Does not implicitly {@link tendermint.abci.RequestQuery.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.RequestQuery + * @static + * @param {tendermint.abci.IRequestQuery} message RequestQuery message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestQuery.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.data != null && Object.hasOwnProperty.call(message, "data")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.data); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + if (message.height != null && Object.hasOwnProperty.call(message, "height")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.height); + if (message.prove != null && Object.hasOwnProperty.call(message, "prove")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.prove); + return writer; + }; + + /** + * Encodes the specified RequestQuery message, length delimited. Does not implicitly {@link tendermint.abci.RequestQuery.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.RequestQuery + * @static + * @param {tendermint.abci.IRequestQuery} message RequestQuery message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestQuery.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RequestQuery message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.RequestQuery + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.RequestQuery} RequestQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestQuery.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.RequestQuery(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.data = reader.bytes(); + break; + case 2: + message.path = reader.string(); + break; + case 3: + message.height = reader.int64(); + break; + case 4: + message.prove = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RequestQuery message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.RequestQuery + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.RequestQuery} RequestQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestQuery.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RequestQuery message. + * @function verify + * @memberof tendermint.abci.RequestQuery + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RequestQuery.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.data != null && message.hasOwnProperty("data")) + if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) + return "data: buffer expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + if (message.height != null && message.hasOwnProperty("height")) + if (!$util.isInteger(message.height) && !(message.height && $util.isInteger(message.height.low) && $util.isInteger(message.height.high))) + return "height: integer|Long expected"; + if (message.prove != null && message.hasOwnProperty("prove")) + if (typeof message.prove !== "boolean") + return "prove: boolean expected"; + return null; + }; + + /** + * Creates a RequestQuery message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.RequestQuery + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.RequestQuery} RequestQuery + */ + RequestQuery.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.RequestQuery) + return object; + var message = new $root.tendermint.abci.RequestQuery(); + if (object.data != null) + if (typeof object.data === "string") + $util.base64.decode(object.data, message.data = $util.newBuffer($util.base64.length(object.data)), 0); + else if (object.data.length) + message.data = object.data; + if (object.path != null) + message.path = String(object.path); + if (object.height != null) + if ($util.Long) + (message.height = $util.Long.fromValue(object.height)).unsigned = false; + else if (typeof object.height === "string") + message.height = parseInt(object.height, 10); + else if (typeof object.height === "number") + message.height = object.height; + else if (typeof object.height === "object") + message.height = new $util.LongBits(object.height.low >>> 0, object.height.high >>> 0).toNumber(); + if (object.prove != null) + message.prove = Boolean(object.prove); + return message; + }; + + /** + * Creates a plain object from a RequestQuery message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.RequestQuery + * @static + * @param {tendermint.abci.RequestQuery} message RequestQuery + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RequestQuery.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.data = ""; + else { + object.data = []; + if (options.bytes !== Array) + object.data = $util.newBuffer(object.data); + } + object.path = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.height = options.longs === String ? "0" : 0; + object.prove = false; + } + if (message.data != null && message.hasOwnProperty("data")) + object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + if (message.height != null && message.hasOwnProperty("height")) + if (typeof message.height === "number") + object.height = options.longs === String ? String(message.height) : message.height; + else + object.height = options.longs === String ? $util.Long.prototype.toString.call(message.height) : options.longs === Number ? new $util.LongBits(message.height.low >>> 0, message.height.high >>> 0).toNumber() : message.height; + if (message.prove != null && message.hasOwnProperty("prove")) + object.prove = message.prove; + return object; + }; + + /** + * Converts this RequestQuery to JSON. + * @function toJSON + * @memberof tendermint.abci.RequestQuery + * @instance + * @returns {Object.} JSON object + */ + RequestQuery.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RequestQuery; + })(abci.RequestQuery || {}); + + abci.RequestBeginBlock = (function(RequestBeginBlock) { + + /** + * Properties of a RequestBeginBlock. + * @memberof tendermint.abci + * @interface IRequestBeginBlock + * @property {Uint8Array|null} [hash] RequestBeginBlock hash + * @property {tendermint.types.IHeader|null} [header] RequestBeginBlock header + * @property {tendermint.abci.ILastCommitInfo|null} [lastCommitInfo] RequestBeginBlock lastCommitInfo + * @property {Array.|null} [byzantineValidators] RequestBeginBlock byzantineValidators + */ + + /** + * Constructs a new RequestBeginBlock. + * @memberof tendermint.abci + * @classdesc Represents a RequestBeginBlock. + * @implements IRequestBeginBlock + * @constructor + * @param {tendermint.abci.IRequestBeginBlock=} [properties] Properties to set + */ + function RequestBeginBlock(properties) { + this.byzantineValidators = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RequestBeginBlock hash. + * @member {Uint8Array} hash + * @memberof tendermint.abci.RequestBeginBlock + * @instance + */ + RequestBeginBlock.prototype.hash = $util.newBuffer([]); + + /** + * RequestBeginBlock header. + * @member {tendermint.types.IHeader|null|undefined} header + * @memberof tendermint.abci.RequestBeginBlock + * @instance + */ + RequestBeginBlock.prototype.header = null; + + /** + * RequestBeginBlock lastCommitInfo. + * @member {tendermint.abci.ILastCommitInfo|null|undefined} lastCommitInfo + * @memberof tendermint.abci.RequestBeginBlock + * @instance + */ + RequestBeginBlock.prototype.lastCommitInfo = null; + + /** + * RequestBeginBlock byzantineValidators. + * @member {Array.} byzantineValidators + * @memberof tendermint.abci.RequestBeginBlock + * @instance + */ + RequestBeginBlock.prototype.byzantineValidators = $util.emptyArray; + + /** + * Creates a new RequestBeginBlock instance using the specified properties. + * @function create + * @memberof tendermint.abci.RequestBeginBlock + * @static + * @param {tendermint.abci.IRequestBeginBlock=} [properties] Properties to set + * @returns {tendermint.abci.RequestBeginBlock} RequestBeginBlock instance + */ + RequestBeginBlock.create = function create(properties) { + return new RequestBeginBlock(properties); + }; + + /** + * Encodes the specified RequestBeginBlock message. Does not implicitly {@link tendermint.abci.RequestBeginBlock.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.RequestBeginBlock + * @static + * @param {tendermint.abci.IRequestBeginBlock} message RequestBeginBlock message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestBeginBlock.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.hash != null && Object.hasOwnProperty.call(message, "hash")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.hash); + if (message.header != null && Object.hasOwnProperty.call(message, "header")) + $root.tendermint.types.Header.encode(message.header, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.lastCommitInfo != null && Object.hasOwnProperty.call(message, "lastCommitInfo")) + $root.tendermint.abci.LastCommitInfo.encode(message.lastCommitInfo, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.byzantineValidators != null && message.byzantineValidators.length) + for (var i = 0; i < message.byzantineValidators.length; ++i) + $root.tendermint.abci.Evidence.encode(message.byzantineValidators[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RequestBeginBlock message, length delimited. Does not implicitly {@link tendermint.abci.RequestBeginBlock.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.RequestBeginBlock + * @static + * @param {tendermint.abci.IRequestBeginBlock} message RequestBeginBlock message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestBeginBlock.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RequestBeginBlock message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.RequestBeginBlock + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.RequestBeginBlock} RequestBeginBlock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestBeginBlock.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.RequestBeginBlock(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.hash = reader.bytes(); + break; + case 2: + message.header = $root.tendermint.types.Header.decode(reader, reader.uint32()); + break; + case 3: + message.lastCommitInfo = $root.tendermint.abci.LastCommitInfo.decode(reader, reader.uint32()); + break; + case 4: + if (!(message.byzantineValidators && message.byzantineValidators.length)) + message.byzantineValidators = []; + message.byzantineValidators.push($root.tendermint.abci.Evidence.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RequestBeginBlock message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.RequestBeginBlock + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.RequestBeginBlock} RequestBeginBlock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestBeginBlock.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RequestBeginBlock message. + * @function verify + * @memberof tendermint.abci.RequestBeginBlock + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RequestBeginBlock.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.hash != null && message.hasOwnProperty("hash")) + if (!(message.hash && typeof message.hash.length === "number" || $util.isString(message.hash))) + return "hash: buffer expected"; + if (message.header != null && message.hasOwnProperty("header")) { + var error = $root.tendermint.types.Header.verify(message.header); + if (error) + return "header." + error; + } + if (message.lastCommitInfo != null && message.hasOwnProperty("lastCommitInfo")) { + var error = $root.tendermint.abci.LastCommitInfo.verify(message.lastCommitInfo); + if (error) + return "lastCommitInfo." + error; + } + if (message.byzantineValidators != null && message.hasOwnProperty("byzantineValidators")) { + if (!Array.isArray(message.byzantineValidators)) + return "byzantineValidators: array expected"; + for (var i = 0; i < message.byzantineValidators.length; ++i) { + var error = $root.tendermint.abci.Evidence.verify(message.byzantineValidators[i]); + if (error) + return "byzantineValidators." + error; + } + } + return null; + }; + + /** + * Creates a RequestBeginBlock message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.RequestBeginBlock + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.RequestBeginBlock} RequestBeginBlock + */ + RequestBeginBlock.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.RequestBeginBlock) + return object; + var message = new $root.tendermint.abci.RequestBeginBlock(); + if (object.hash != null) + if (typeof object.hash === "string") + $util.base64.decode(object.hash, message.hash = $util.newBuffer($util.base64.length(object.hash)), 0); + else if (object.hash.length) + message.hash = object.hash; + if (object.header != null) { + if (typeof object.header !== "object") + throw TypeError(".tendermint.abci.RequestBeginBlock.header: object expected"); + message.header = $root.tendermint.types.Header.fromObject(object.header); + } + if (object.lastCommitInfo != null) { + if (typeof object.lastCommitInfo !== "object") + throw TypeError(".tendermint.abci.RequestBeginBlock.lastCommitInfo: object expected"); + message.lastCommitInfo = $root.tendermint.abci.LastCommitInfo.fromObject(object.lastCommitInfo); + } + if (object.byzantineValidators) { + if (!Array.isArray(object.byzantineValidators)) + throw TypeError(".tendermint.abci.RequestBeginBlock.byzantineValidators: array expected"); + message.byzantineValidators = []; + for (var i = 0; i < object.byzantineValidators.length; ++i) { + if (typeof object.byzantineValidators[i] !== "object") + throw TypeError(".tendermint.abci.RequestBeginBlock.byzantineValidators: object expected"); + message.byzantineValidators[i] = $root.tendermint.abci.Evidence.fromObject(object.byzantineValidators[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a RequestBeginBlock message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.RequestBeginBlock + * @static + * @param {tendermint.abci.RequestBeginBlock} message RequestBeginBlock + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RequestBeginBlock.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.byzantineValidators = []; + if (options.defaults) { + if (options.bytes === String) + object.hash = ""; + else { + object.hash = []; + if (options.bytes !== Array) + object.hash = $util.newBuffer(object.hash); + } + object.header = null; + object.lastCommitInfo = null; + } + if (message.hash != null && message.hasOwnProperty("hash")) + object.hash = options.bytes === String ? $util.base64.encode(message.hash, 0, message.hash.length) : options.bytes === Array ? Array.prototype.slice.call(message.hash) : message.hash; + if (message.header != null && message.hasOwnProperty("header")) + object.header = $root.tendermint.types.Header.toObject(message.header, options); + if (message.lastCommitInfo != null && message.hasOwnProperty("lastCommitInfo")) + object.lastCommitInfo = $root.tendermint.abci.LastCommitInfo.toObject(message.lastCommitInfo, options); + if (message.byzantineValidators && message.byzantineValidators.length) { + object.byzantineValidators = []; + for (var j = 0; j < message.byzantineValidators.length; ++j) + object.byzantineValidators[j] = $root.tendermint.abci.Evidence.toObject(message.byzantineValidators[j], options); + } + return object; + }; + + /** + * Converts this RequestBeginBlock to JSON. + * @function toJSON + * @memberof tendermint.abci.RequestBeginBlock + * @instance + * @returns {Object.} JSON object + */ + RequestBeginBlock.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RequestBeginBlock; + })(abci.RequestBeginBlock || {}); + + /** + * CheckTxType enum. + * @name tendermint.abci.CheckTxType + * @enum {string} + * @property {number} NEW=0 NEW value + * @property {number} RECHECK=1 RECHECK value + */ + abci.CheckTxType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NEW"] = 0; + values[valuesById[1] = "RECHECK"] = 1; + return values; + })(); + + abci.RequestCheckTx = (function(RequestCheckTx) { + + /** + * Properties of a RequestCheckTx. + * @memberof tendermint.abci + * @interface IRequestCheckTx + * @property {Uint8Array|null} [tx] RequestCheckTx tx + * @property {tendermint.abci.CheckTxType|null} [type] RequestCheckTx type + */ + + /** + * Constructs a new RequestCheckTx. + * @memberof tendermint.abci + * @classdesc Represents a RequestCheckTx. + * @implements IRequestCheckTx + * @constructor + * @param {tendermint.abci.IRequestCheckTx=} [properties] Properties to set + */ + function RequestCheckTx(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RequestCheckTx tx. + * @member {Uint8Array} tx + * @memberof tendermint.abci.RequestCheckTx + * @instance + */ + RequestCheckTx.prototype.tx = $util.newBuffer([]); + + /** + * RequestCheckTx type. + * @member {tendermint.abci.CheckTxType} type + * @memberof tendermint.abci.RequestCheckTx + * @instance + */ + RequestCheckTx.prototype.type = 0; + + /** + * Creates a new RequestCheckTx instance using the specified properties. + * @function create + * @memberof tendermint.abci.RequestCheckTx + * @static + * @param {tendermint.abci.IRequestCheckTx=} [properties] Properties to set + * @returns {tendermint.abci.RequestCheckTx} RequestCheckTx instance + */ + RequestCheckTx.create = function create(properties) { + return new RequestCheckTx(properties); + }; + + /** + * Encodes the specified RequestCheckTx message. Does not implicitly {@link tendermint.abci.RequestCheckTx.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.RequestCheckTx + * @static + * @param {tendermint.abci.IRequestCheckTx} message RequestCheckTx message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestCheckTx.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tx != null && Object.hasOwnProperty.call(message, "tx")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.tx); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); + return writer; + }; + + /** + * Encodes the specified RequestCheckTx message, length delimited. Does not implicitly {@link tendermint.abci.RequestCheckTx.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.RequestCheckTx + * @static + * @param {tendermint.abci.IRequestCheckTx} message RequestCheckTx message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestCheckTx.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RequestCheckTx message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.RequestCheckTx + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.RequestCheckTx} RequestCheckTx + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestCheckTx.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.RequestCheckTx(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.tx = reader.bytes(); + break; + case 2: + message.type = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RequestCheckTx message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.RequestCheckTx + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.RequestCheckTx} RequestCheckTx + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestCheckTx.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RequestCheckTx message. + * @function verify + * @memberof tendermint.abci.RequestCheckTx + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RequestCheckTx.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tx != null && message.hasOwnProperty("tx")) + if (!(message.tx && typeof message.tx.length === "number" || $util.isString(message.tx))) + return "tx: buffer expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + break; + } + return null; + }; + + /** + * Creates a RequestCheckTx message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.RequestCheckTx + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.RequestCheckTx} RequestCheckTx + */ + RequestCheckTx.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.RequestCheckTx) + return object; + var message = new $root.tendermint.abci.RequestCheckTx(); + if (object.tx != null) + if (typeof object.tx === "string") + $util.base64.decode(object.tx, message.tx = $util.newBuffer($util.base64.length(object.tx)), 0); + else if (object.tx.length) + message.tx = object.tx; + switch (object.type) { + case "NEW": + case 0: + message.type = 0; + break; + case "RECHECK": + case 1: + message.type = 1; + break; + } + return message; + }; + + /** + * Creates a plain object from a RequestCheckTx message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.RequestCheckTx + * @static + * @param {tendermint.abci.RequestCheckTx} message RequestCheckTx + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RequestCheckTx.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.tx = ""; + else { + object.tx = []; + if (options.bytes !== Array) + object.tx = $util.newBuffer(object.tx); + } + object.type = options.enums === String ? "NEW" : 0; + } + if (message.tx != null && message.hasOwnProperty("tx")) + object.tx = options.bytes === String ? $util.base64.encode(message.tx, 0, message.tx.length) : options.bytes === Array ? Array.prototype.slice.call(message.tx) : message.tx; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.tendermint.abci.CheckTxType[message.type] : message.type; + return object; + }; + + /** + * Converts this RequestCheckTx to JSON. + * @function toJSON + * @memberof tendermint.abci.RequestCheckTx + * @instance + * @returns {Object.} JSON object + */ + RequestCheckTx.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RequestCheckTx; + })(abci.RequestCheckTx || {}); + + abci.RequestDeliverTx = (function(RequestDeliverTx) { + + /** + * Properties of a RequestDeliverTx. + * @memberof tendermint.abci + * @interface IRequestDeliverTx + * @property {Uint8Array|null} [tx] RequestDeliverTx tx + */ + + /** + * Constructs a new RequestDeliverTx. + * @memberof tendermint.abci + * @classdesc Represents a RequestDeliverTx. + * @implements IRequestDeliverTx + * @constructor + * @param {tendermint.abci.IRequestDeliverTx=} [properties] Properties to set + */ + function RequestDeliverTx(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RequestDeliverTx tx. + * @member {Uint8Array} tx + * @memberof tendermint.abci.RequestDeliverTx + * @instance + */ + RequestDeliverTx.prototype.tx = $util.newBuffer([]); + + /** + * Creates a new RequestDeliverTx instance using the specified properties. + * @function create + * @memberof tendermint.abci.RequestDeliverTx + * @static + * @param {tendermint.abci.IRequestDeliverTx=} [properties] Properties to set + * @returns {tendermint.abci.RequestDeliverTx} RequestDeliverTx instance + */ + RequestDeliverTx.create = function create(properties) { + return new RequestDeliverTx(properties); + }; + + /** + * Encodes the specified RequestDeliverTx message. Does not implicitly {@link tendermint.abci.RequestDeliverTx.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.RequestDeliverTx + * @static + * @param {tendermint.abci.IRequestDeliverTx} message RequestDeliverTx message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestDeliverTx.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tx != null && Object.hasOwnProperty.call(message, "tx")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.tx); + return writer; + }; + + /** + * Encodes the specified RequestDeliverTx message, length delimited. Does not implicitly {@link tendermint.abci.RequestDeliverTx.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.RequestDeliverTx + * @static + * @param {tendermint.abci.IRequestDeliverTx} message RequestDeliverTx message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestDeliverTx.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RequestDeliverTx message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.RequestDeliverTx + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.RequestDeliverTx} RequestDeliverTx + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestDeliverTx.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.RequestDeliverTx(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.tx = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RequestDeliverTx message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.RequestDeliverTx + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.RequestDeliverTx} RequestDeliverTx + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestDeliverTx.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RequestDeliverTx message. + * @function verify + * @memberof tendermint.abci.RequestDeliverTx + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RequestDeliverTx.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tx != null && message.hasOwnProperty("tx")) + if (!(message.tx && typeof message.tx.length === "number" || $util.isString(message.tx))) + return "tx: buffer expected"; + return null; + }; + + /** + * Creates a RequestDeliverTx message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.RequestDeliverTx + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.RequestDeliverTx} RequestDeliverTx + */ + RequestDeliverTx.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.RequestDeliverTx) + return object; + var message = new $root.tendermint.abci.RequestDeliverTx(); + if (object.tx != null) + if (typeof object.tx === "string") + $util.base64.decode(object.tx, message.tx = $util.newBuffer($util.base64.length(object.tx)), 0); + else if (object.tx.length) + message.tx = object.tx; + return message; + }; + + /** + * Creates a plain object from a RequestDeliverTx message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.RequestDeliverTx + * @static + * @param {tendermint.abci.RequestDeliverTx} message RequestDeliverTx + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RequestDeliverTx.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if (options.bytes === String) + object.tx = ""; + else { + object.tx = []; + if (options.bytes !== Array) + object.tx = $util.newBuffer(object.tx); + } + if (message.tx != null && message.hasOwnProperty("tx")) + object.tx = options.bytes === String ? $util.base64.encode(message.tx, 0, message.tx.length) : options.bytes === Array ? Array.prototype.slice.call(message.tx) : message.tx; + return object; + }; + + /** + * Converts this RequestDeliverTx to JSON. + * @function toJSON + * @memberof tendermint.abci.RequestDeliverTx + * @instance + * @returns {Object.} JSON object + */ + RequestDeliverTx.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RequestDeliverTx; + })(abci.RequestDeliverTx || {}); + + abci.RequestEndBlock = (function(RequestEndBlock) { + + /** + * Properties of a RequestEndBlock. + * @memberof tendermint.abci + * @interface IRequestEndBlock + * @property {number|Long|null} [height] RequestEndBlock height + */ + + /** + * Constructs a new RequestEndBlock. + * @memberof tendermint.abci + * @classdesc Represents a RequestEndBlock. + * @implements IRequestEndBlock + * @constructor + * @param {tendermint.abci.IRequestEndBlock=} [properties] Properties to set + */ + function RequestEndBlock(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RequestEndBlock height. + * @member {number|Long} height + * @memberof tendermint.abci.RequestEndBlock + * @instance + */ + RequestEndBlock.prototype.height = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new RequestEndBlock instance using the specified properties. + * @function create + * @memberof tendermint.abci.RequestEndBlock + * @static + * @param {tendermint.abci.IRequestEndBlock=} [properties] Properties to set + * @returns {tendermint.abci.RequestEndBlock} RequestEndBlock instance + */ + RequestEndBlock.create = function create(properties) { + return new RequestEndBlock(properties); + }; + + /** + * Encodes the specified RequestEndBlock message. Does not implicitly {@link tendermint.abci.RequestEndBlock.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.RequestEndBlock + * @static + * @param {tendermint.abci.IRequestEndBlock} message RequestEndBlock message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestEndBlock.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.height != null && Object.hasOwnProperty.call(message, "height")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.height); + return writer; + }; + + /** + * Encodes the specified RequestEndBlock message, length delimited. Does not implicitly {@link tendermint.abci.RequestEndBlock.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.RequestEndBlock + * @static + * @param {tendermint.abci.IRequestEndBlock} message RequestEndBlock message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestEndBlock.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RequestEndBlock message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.RequestEndBlock + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.RequestEndBlock} RequestEndBlock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestEndBlock.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.RequestEndBlock(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.height = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RequestEndBlock message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.RequestEndBlock + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.RequestEndBlock} RequestEndBlock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestEndBlock.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RequestEndBlock message. + * @function verify + * @memberof tendermint.abci.RequestEndBlock + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RequestEndBlock.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.height != null && message.hasOwnProperty("height")) + if (!$util.isInteger(message.height) && !(message.height && $util.isInteger(message.height.low) && $util.isInteger(message.height.high))) + return "height: integer|Long expected"; + return null; + }; + + /** + * Creates a RequestEndBlock message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.RequestEndBlock + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.RequestEndBlock} RequestEndBlock + */ + RequestEndBlock.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.RequestEndBlock) + return object; + var message = new $root.tendermint.abci.RequestEndBlock(); + if (object.height != null) + if ($util.Long) + (message.height = $util.Long.fromValue(object.height)).unsigned = false; + else if (typeof object.height === "string") + message.height = parseInt(object.height, 10); + else if (typeof object.height === "number") + message.height = object.height; + else if (typeof object.height === "object") + message.height = new $util.LongBits(object.height.low >>> 0, object.height.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a RequestEndBlock message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.RequestEndBlock + * @static + * @param {tendermint.abci.RequestEndBlock} message RequestEndBlock + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RequestEndBlock.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.height = options.longs === String ? "0" : 0; + if (message.height != null && message.hasOwnProperty("height")) + if (typeof message.height === "number") + object.height = options.longs === String ? String(message.height) : message.height; + else + object.height = options.longs === String ? $util.Long.prototype.toString.call(message.height) : options.longs === Number ? new $util.LongBits(message.height.low >>> 0, message.height.high >>> 0).toNumber() : message.height; + return object; + }; + + /** + * Converts this RequestEndBlock to JSON. + * @function toJSON + * @memberof tendermint.abci.RequestEndBlock + * @instance + * @returns {Object.} JSON object + */ + RequestEndBlock.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RequestEndBlock; + })(abci.RequestEndBlock || {}); + + abci.RequestCommit = (function(RequestCommit) { + + /** + * Properties of a RequestCommit. + * @memberof tendermint.abci + * @interface IRequestCommit + */ + + /** + * Constructs a new RequestCommit. + * @memberof tendermint.abci + * @classdesc Represents a RequestCommit. + * @implements IRequestCommit + * @constructor + * @param {tendermint.abci.IRequestCommit=} [properties] Properties to set + */ + function RequestCommit(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new RequestCommit instance using the specified properties. + * @function create + * @memberof tendermint.abci.RequestCommit + * @static + * @param {tendermint.abci.IRequestCommit=} [properties] Properties to set + * @returns {tendermint.abci.RequestCommit} RequestCommit instance + */ + RequestCommit.create = function create(properties) { + return new RequestCommit(properties); + }; + + /** + * Encodes the specified RequestCommit message. Does not implicitly {@link tendermint.abci.RequestCommit.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.RequestCommit + * @static + * @param {tendermint.abci.IRequestCommit} message RequestCommit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestCommit.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified RequestCommit message, length delimited. Does not implicitly {@link tendermint.abci.RequestCommit.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.RequestCommit + * @static + * @param {tendermint.abci.IRequestCommit} message RequestCommit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestCommit.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RequestCommit message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.RequestCommit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.RequestCommit} RequestCommit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestCommit.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.RequestCommit(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RequestCommit message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.RequestCommit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.RequestCommit} RequestCommit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestCommit.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RequestCommit message. + * @function verify + * @memberof tendermint.abci.RequestCommit + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RequestCommit.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a RequestCommit message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.RequestCommit + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.RequestCommit} RequestCommit + */ + RequestCommit.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.RequestCommit) + return object; + return new $root.tendermint.abci.RequestCommit(); + }; + + /** + * Creates a plain object from a RequestCommit message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.RequestCommit + * @static + * @param {tendermint.abci.RequestCommit} message RequestCommit + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RequestCommit.toObject = function toObject() { + return {}; + }; + + /** + * Converts this RequestCommit to JSON. + * @function toJSON + * @memberof tendermint.abci.RequestCommit + * @instance + * @returns {Object.} JSON object + */ + RequestCommit.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RequestCommit; + })(abci.RequestCommit || {}); + + abci.RequestListSnapshots = (function(RequestListSnapshots) { + + /** + * Properties of a RequestListSnapshots. + * @memberof tendermint.abci + * @interface IRequestListSnapshots + */ + + /** + * Constructs a new RequestListSnapshots. + * @memberof tendermint.abci + * @classdesc Represents a RequestListSnapshots. + * @implements IRequestListSnapshots + * @constructor + * @param {tendermint.abci.IRequestListSnapshots=} [properties] Properties to set + */ + function RequestListSnapshots(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new RequestListSnapshots instance using the specified properties. + * @function create + * @memberof tendermint.abci.RequestListSnapshots + * @static + * @param {tendermint.abci.IRequestListSnapshots=} [properties] Properties to set + * @returns {tendermint.abci.RequestListSnapshots} RequestListSnapshots instance + */ + RequestListSnapshots.create = function create(properties) { + return new RequestListSnapshots(properties); + }; + + /** + * Encodes the specified RequestListSnapshots message. Does not implicitly {@link tendermint.abci.RequestListSnapshots.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.RequestListSnapshots + * @static + * @param {tendermint.abci.IRequestListSnapshots} message RequestListSnapshots message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestListSnapshots.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified RequestListSnapshots message, length delimited. Does not implicitly {@link tendermint.abci.RequestListSnapshots.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.RequestListSnapshots + * @static + * @param {tendermint.abci.IRequestListSnapshots} message RequestListSnapshots message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestListSnapshots.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RequestListSnapshots message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.RequestListSnapshots + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.RequestListSnapshots} RequestListSnapshots + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestListSnapshots.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.RequestListSnapshots(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RequestListSnapshots message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.RequestListSnapshots + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.RequestListSnapshots} RequestListSnapshots + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestListSnapshots.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RequestListSnapshots message. + * @function verify + * @memberof tendermint.abci.RequestListSnapshots + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RequestListSnapshots.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a RequestListSnapshots message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.RequestListSnapshots + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.RequestListSnapshots} RequestListSnapshots + */ + RequestListSnapshots.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.RequestListSnapshots) + return object; + return new $root.tendermint.abci.RequestListSnapshots(); + }; + + /** + * Creates a plain object from a RequestListSnapshots message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.RequestListSnapshots + * @static + * @param {tendermint.abci.RequestListSnapshots} message RequestListSnapshots + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RequestListSnapshots.toObject = function toObject() { + return {}; + }; + + /** + * Converts this RequestListSnapshots to JSON. + * @function toJSON + * @memberof tendermint.abci.RequestListSnapshots + * @instance + * @returns {Object.} JSON object + */ + RequestListSnapshots.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RequestListSnapshots; + })(abci.RequestListSnapshots || {}); + + abci.RequestOfferSnapshot = (function(RequestOfferSnapshot) { + + /** + * Properties of a RequestOfferSnapshot. + * @memberof tendermint.abci + * @interface IRequestOfferSnapshot + * @property {tendermint.abci.ISnapshot|null} [snapshot] RequestOfferSnapshot snapshot + * @property {Uint8Array|null} [appHash] RequestOfferSnapshot appHash + */ + + /** + * Constructs a new RequestOfferSnapshot. + * @memberof tendermint.abci + * @classdesc Represents a RequestOfferSnapshot. + * @implements IRequestOfferSnapshot + * @constructor + * @param {tendermint.abci.IRequestOfferSnapshot=} [properties] Properties to set + */ + function RequestOfferSnapshot(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RequestOfferSnapshot snapshot. + * @member {tendermint.abci.ISnapshot|null|undefined} snapshot + * @memberof tendermint.abci.RequestOfferSnapshot + * @instance + */ + RequestOfferSnapshot.prototype.snapshot = null; + + /** + * RequestOfferSnapshot appHash. + * @member {Uint8Array} appHash + * @memberof tendermint.abci.RequestOfferSnapshot + * @instance + */ + RequestOfferSnapshot.prototype.appHash = $util.newBuffer([]); + + /** + * Creates a new RequestOfferSnapshot instance using the specified properties. + * @function create + * @memberof tendermint.abci.RequestOfferSnapshot + * @static + * @param {tendermint.abci.IRequestOfferSnapshot=} [properties] Properties to set + * @returns {tendermint.abci.RequestOfferSnapshot} RequestOfferSnapshot instance + */ + RequestOfferSnapshot.create = function create(properties) { + return new RequestOfferSnapshot(properties); + }; + + /** + * Encodes the specified RequestOfferSnapshot message. Does not implicitly {@link tendermint.abci.RequestOfferSnapshot.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.RequestOfferSnapshot + * @static + * @param {tendermint.abci.IRequestOfferSnapshot} message RequestOfferSnapshot message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestOfferSnapshot.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.snapshot != null && Object.hasOwnProperty.call(message, "snapshot")) + $root.tendermint.abci.Snapshot.encode(message.snapshot, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.appHash != null && Object.hasOwnProperty.call(message, "appHash")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.appHash); + return writer; + }; + + /** + * Encodes the specified RequestOfferSnapshot message, length delimited. Does not implicitly {@link tendermint.abci.RequestOfferSnapshot.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.RequestOfferSnapshot + * @static + * @param {tendermint.abci.IRequestOfferSnapshot} message RequestOfferSnapshot message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestOfferSnapshot.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RequestOfferSnapshot message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.RequestOfferSnapshot + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.RequestOfferSnapshot} RequestOfferSnapshot + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestOfferSnapshot.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.RequestOfferSnapshot(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.snapshot = $root.tendermint.abci.Snapshot.decode(reader, reader.uint32()); + break; + case 2: + message.appHash = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RequestOfferSnapshot message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.RequestOfferSnapshot + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.RequestOfferSnapshot} RequestOfferSnapshot + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestOfferSnapshot.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RequestOfferSnapshot message. + * @function verify + * @memberof tendermint.abci.RequestOfferSnapshot + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RequestOfferSnapshot.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.snapshot != null && message.hasOwnProperty("snapshot")) { + var error = $root.tendermint.abci.Snapshot.verify(message.snapshot); + if (error) + return "snapshot." + error; + } + if (message.appHash != null && message.hasOwnProperty("appHash")) + if (!(message.appHash && typeof message.appHash.length === "number" || $util.isString(message.appHash))) + return "appHash: buffer expected"; + return null; + }; + + /** + * Creates a RequestOfferSnapshot message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.RequestOfferSnapshot + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.RequestOfferSnapshot} RequestOfferSnapshot + */ + RequestOfferSnapshot.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.RequestOfferSnapshot) + return object; + var message = new $root.tendermint.abci.RequestOfferSnapshot(); + if (object.snapshot != null) { + if (typeof object.snapshot !== "object") + throw TypeError(".tendermint.abci.RequestOfferSnapshot.snapshot: object expected"); + message.snapshot = $root.tendermint.abci.Snapshot.fromObject(object.snapshot); + } + if (object.appHash != null) + if (typeof object.appHash === "string") + $util.base64.decode(object.appHash, message.appHash = $util.newBuffer($util.base64.length(object.appHash)), 0); + else if (object.appHash.length) + message.appHash = object.appHash; + return message; + }; + + /** + * Creates a plain object from a RequestOfferSnapshot message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.RequestOfferSnapshot + * @static + * @param {tendermint.abci.RequestOfferSnapshot} message RequestOfferSnapshot + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RequestOfferSnapshot.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.snapshot = null; + if (options.bytes === String) + object.appHash = ""; + else { + object.appHash = []; + if (options.bytes !== Array) + object.appHash = $util.newBuffer(object.appHash); + } + } + if (message.snapshot != null && message.hasOwnProperty("snapshot")) + object.snapshot = $root.tendermint.abci.Snapshot.toObject(message.snapshot, options); + if (message.appHash != null && message.hasOwnProperty("appHash")) + object.appHash = options.bytes === String ? $util.base64.encode(message.appHash, 0, message.appHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.appHash) : message.appHash; + return object; + }; + + /** + * Converts this RequestOfferSnapshot to JSON. + * @function toJSON + * @memberof tendermint.abci.RequestOfferSnapshot + * @instance + * @returns {Object.} JSON object + */ + RequestOfferSnapshot.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RequestOfferSnapshot; + })(abci.RequestOfferSnapshot || {}); + + abci.RequestLoadSnapshotChunk = (function(RequestLoadSnapshotChunk) { + + /** + * Properties of a RequestLoadSnapshotChunk. + * @memberof tendermint.abci + * @interface IRequestLoadSnapshotChunk + * @property {number|Long|null} [height] RequestLoadSnapshotChunk height + * @property {number|null} [format] RequestLoadSnapshotChunk format + * @property {number|null} [chunk] RequestLoadSnapshotChunk chunk + */ + + /** + * Constructs a new RequestLoadSnapshotChunk. + * @memberof tendermint.abci + * @classdesc Represents a RequestLoadSnapshotChunk. + * @implements IRequestLoadSnapshotChunk + * @constructor + * @param {tendermint.abci.IRequestLoadSnapshotChunk=} [properties] Properties to set + */ + function RequestLoadSnapshotChunk(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RequestLoadSnapshotChunk height. + * @member {number|Long} height + * @memberof tendermint.abci.RequestLoadSnapshotChunk + * @instance + */ + RequestLoadSnapshotChunk.prototype.height = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * RequestLoadSnapshotChunk format. + * @member {number} format + * @memberof tendermint.abci.RequestLoadSnapshotChunk + * @instance + */ + RequestLoadSnapshotChunk.prototype.format = 0; + + /** + * RequestLoadSnapshotChunk chunk. + * @member {number} chunk + * @memberof tendermint.abci.RequestLoadSnapshotChunk + * @instance + */ + RequestLoadSnapshotChunk.prototype.chunk = 0; + + /** + * Creates a new RequestLoadSnapshotChunk instance using the specified properties. + * @function create + * @memberof tendermint.abci.RequestLoadSnapshotChunk + * @static + * @param {tendermint.abci.IRequestLoadSnapshotChunk=} [properties] Properties to set + * @returns {tendermint.abci.RequestLoadSnapshotChunk} RequestLoadSnapshotChunk instance + */ + RequestLoadSnapshotChunk.create = function create(properties) { + return new RequestLoadSnapshotChunk(properties); + }; + + /** + * Encodes the specified RequestLoadSnapshotChunk message. Does not implicitly {@link tendermint.abci.RequestLoadSnapshotChunk.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.RequestLoadSnapshotChunk + * @static + * @param {tendermint.abci.IRequestLoadSnapshotChunk} message RequestLoadSnapshotChunk message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestLoadSnapshotChunk.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.height != null && Object.hasOwnProperty.call(message, "height")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.height); + if (message.format != null && Object.hasOwnProperty.call(message, "format")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.format); + if (message.chunk != null && Object.hasOwnProperty.call(message, "chunk")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.chunk); + return writer; + }; + + /** + * Encodes the specified RequestLoadSnapshotChunk message, length delimited. Does not implicitly {@link tendermint.abci.RequestLoadSnapshotChunk.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.RequestLoadSnapshotChunk + * @static + * @param {tendermint.abci.IRequestLoadSnapshotChunk} message RequestLoadSnapshotChunk message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestLoadSnapshotChunk.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RequestLoadSnapshotChunk message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.RequestLoadSnapshotChunk + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.RequestLoadSnapshotChunk} RequestLoadSnapshotChunk + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestLoadSnapshotChunk.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.RequestLoadSnapshotChunk(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.height = reader.uint64(); + break; + case 2: + message.format = reader.uint32(); + break; + case 3: + message.chunk = reader.uint32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RequestLoadSnapshotChunk message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.RequestLoadSnapshotChunk + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.RequestLoadSnapshotChunk} RequestLoadSnapshotChunk + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestLoadSnapshotChunk.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RequestLoadSnapshotChunk message. + * @function verify + * @memberof tendermint.abci.RequestLoadSnapshotChunk + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RequestLoadSnapshotChunk.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.height != null && message.hasOwnProperty("height")) + if (!$util.isInteger(message.height) && !(message.height && $util.isInteger(message.height.low) && $util.isInteger(message.height.high))) + return "height: integer|Long expected"; + if (message.format != null && message.hasOwnProperty("format")) + if (!$util.isInteger(message.format)) + return "format: integer expected"; + if (message.chunk != null && message.hasOwnProperty("chunk")) + if (!$util.isInteger(message.chunk)) + return "chunk: integer expected"; + return null; + }; + + /** + * Creates a RequestLoadSnapshotChunk message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.RequestLoadSnapshotChunk + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.RequestLoadSnapshotChunk} RequestLoadSnapshotChunk + */ + RequestLoadSnapshotChunk.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.RequestLoadSnapshotChunk) + return object; + var message = new $root.tendermint.abci.RequestLoadSnapshotChunk(); + if (object.height != null) + if ($util.Long) + (message.height = $util.Long.fromValue(object.height)).unsigned = true; + else if (typeof object.height === "string") + message.height = parseInt(object.height, 10); + else if (typeof object.height === "number") + message.height = object.height; + else if (typeof object.height === "object") + message.height = new $util.LongBits(object.height.low >>> 0, object.height.high >>> 0).toNumber(true); + if (object.format != null) + message.format = object.format >>> 0; + if (object.chunk != null) + message.chunk = object.chunk >>> 0; + return message; + }; + + /** + * Creates a plain object from a RequestLoadSnapshotChunk message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.RequestLoadSnapshotChunk + * @static + * @param {tendermint.abci.RequestLoadSnapshotChunk} message RequestLoadSnapshotChunk + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RequestLoadSnapshotChunk.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.height = options.longs === String ? "0" : 0; + object.format = 0; + object.chunk = 0; + } + if (message.height != null && message.hasOwnProperty("height")) + if (typeof message.height === "number") + object.height = options.longs === String ? String(message.height) : message.height; + else + object.height = options.longs === String ? $util.Long.prototype.toString.call(message.height) : options.longs === Number ? new $util.LongBits(message.height.low >>> 0, message.height.high >>> 0).toNumber(true) : message.height; + if (message.format != null && message.hasOwnProperty("format")) + object.format = message.format; + if (message.chunk != null && message.hasOwnProperty("chunk")) + object.chunk = message.chunk; + return object; + }; + + /** + * Converts this RequestLoadSnapshotChunk to JSON. + * @function toJSON + * @memberof tendermint.abci.RequestLoadSnapshotChunk + * @instance + * @returns {Object.} JSON object + */ + RequestLoadSnapshotChunk.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RequestLoadSnapshotChunk; + })(abci.RequestLoadSnapshotChunk || {}); + + abci.RequestApplySnapshotChunk = (function(RequestApplySnapshotChunk) { + + /** + * Properties of a RequestApplySnapshotChunk. + * @memberof tendermint.abci + * @interface IRequestApplySnapshotChunk + * @property {number|null} [index] RequestApplySnapshotChunk index + * @property {Uint8Array|null} [chunk] RequestApplySnapshotChunk chunk + * @property {string|null} [sender] RequestApplySnapshotChunk sender + */ + + /** + * Constructs a new RequestApplySnapshotChunk. + * @memberof tendermint.abci + * @classdesc Represents a RequestApplySnapshotChunk. + * @implements IRequestApplySnapshotChunk + * @constructor + * @param {tendermint.abci.IRequestApplySnapshotChunk=} [properties] Properties to set + */ + function RequestApplySnapshotChunk(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RequestApplySnapshotChunk index. + * @member {number} index + * @memberof tendermint.abci.RequestApplySnapshotChunk + * @instance + */ + RequestApplySnapshotChunk.prototype.index = 0; + + /** + * RequestApplySnapshotChunk chunk. + * @member {Uint8Array} chunk + * @memberof tendermint.abci.RequestApplySnapshotChunk + * @instance + */ + RequestApplySnapshotChunk.prototype.chunk = $util.newBuffer([]); + + /** + * RequestApplySnapshotChunk sender. + * @member {string} sender + * @memberof tendermint.abci.RequestApplySnapshotChunk + * @instance + */ + RequestApplySnapshotChunk.prototype.sender = ""; + + /** + * Creates a new RequestApplySnapshotChunk instance using the specified properties. + * @function create + * @memberof tendermint.abci.RequestApplySnapshotChunk + * @static + * @param {tendermint.abci.IRequestApplySnapshotChunk=} [properties] Properties to set + * @returns {tendermint.abci.RequestApplySnapshotChunk} RequestApplySnapshotChunk instance + */ + RequestApplySnapshotChunk.create = function create(properties) { + return new RequestApplySnapshotChunk(properties); + }; + + /** + * Encodes the specified RequestApplySnapshotChunk message. Does not implicitly {@link tendermint.abci.RequestApplySnapshotChunk.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.RequestApplySnapshotChunk + * @static + * @param {tendermint.abci.IRequestApplySnapshotChunk} message RequestApplySnapshotChunk message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestApplySnapshotChunk.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.index != null && Object.hasOwnProperty.call(message, "index")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.index); + if (message.chunk != null && Object.hasOwnProperty.call(message, "chunk")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.chunk); + if (message.sender != null && Object.hasOwnProperty.call(message, "sender")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.sender); + return writer; + }; + + /** + * Encodes the specified RequestApplySnapshotChunk message, length delimited. Does not implicitly {@link tendermint.abci.RequestApplySnapshotChunk.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.RequestApplySnapshotChunk + * @static + * @param {tendermint.abci.IRequestApplySnapshotChunk} message RequestApplySnapshotChunk message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestApplySnapshotChunk.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RequestApplySnapshotChunk message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.RequestApplySnapshotChunk + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.RequestApplySnapshotChunk} RequestApplySnapshotChunk + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestApplySnapshotChunk.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.RequestApplySnapshotChunk(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.index = reader.uint32(); + break; + case 2: + message.chunk = reader.bytes(); + break; + case 3: + message.sender = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RequestApplySnapshotChunk message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.RequestApplySnapshotChunk + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.RequestApplySnapshotChunk} RequestApplySnapshotChunk + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestApplySnapshotChunk.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RequestApplySnapshotChunk message. + * @function verify + * @memberof tendermint.abci.RequestApplySnapshotChunk + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RequestApplySnapshotChunk.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.index != null && message.hasOwnProperty("index")) + if (!$util.isInteger(message.index)) + return "index: integer expected"; + if (message.chunk != null && message.hasOwnProperty("chunk")) + if (!(message.chunk && typeof message.chunk.length === "number" || $util.isString(message.chunk))) + return "chunk: buffer expected"; + if (message.sender != null && message.hasOwnProperty("sender")) + if (!$util.isString(message.sender)) + return "sender: string expected"; + return null; + }; + + /** + * Creates a RequestApplySnapshotChunk message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.RequestApplySnapshotChunk + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.RequestApplySnapshotChunk} RequestApplySnapshotChunk + */ + RequestApplySnapshotChunk.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.RequestApplySnapshotChunk) + return object; + var message = new $root.tendermint.abci.RequestApplySnapshotChunk(); + if (object.index != null) + message.index = object.index >>> 0; + if (object.chunk != null) + if (typeof object.chunk === "string") + $util.base64.decode(object.chunk, message.chunk = $util.newBuffer($util.base64.length(object.chunk)), 0); + else if (object.chunk.length) + message.chunk = object.chunk; + if (object.sender != null) + message.sender = String(object.sender); + return message; + }; + + /** + * Creates a plain object from a RequestApplySnapshotChunk message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.RequestApplySnapshotChunk + * @static + * @param {tendermint.abci.RequestApplySnapshotChunk} message RequestApplySnapshotChunk + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RequestApplySnapshotChunk.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.index = 0; + if (options.bytes === String) + object.chunk = ""; + else { + object.chunk = []; + if (options.bytes !== Array) + object.chunk = $util.newBuffer(object.chunk); + } + object.sender = ""; + } + if (message.index != null && message.hasOwnProperty("index")) + object.index = message.index; + if (message.chunk != null && message.hasOwnProperty("chunk")) + object.chunk = options.bytes === String ? $util.base64.encode(message.chunk, 0, message.chunk.length) : options.bytes === Array ? Array.prototype.slice.call(message.chunk) : message.chunk; + if (message.sender != null && message.hasOwnProperty("sender")) + object.sender = message.sender; + return object; + }; + + /** + * Converts this RequestApplySnapshotChunk to JSON. + * @function toJSON + * @memberof tendermint.abci.RequestApplySnapshotChunk + * @instance + * @returns {Object.} JSON object + */ + RequestApplySnapshotChunk.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RequestApplySnapshotChunk; + })(abci.RequestApplySnapshotChunk || {}); + + abci.Response = (function(Response) { + + /** + * Properties of a Response. + * @memberof tendermint.abci + * @interface IResponse + * @property {tendermint.abci.IResponseException|null} [exception] Response exception + * @property {tendermint.abci.IResponseEcho|null} [echo] Response echo + * @property {tendermint.abci.IResponseFlush|null} [flush] Response flush + * @property {tendermint.abci.IResponseInfo|null} [info] Response info + * @property {tendermint.abci.IResponseSetOption|null} [setOption] Response setOption + * @property {tendermint.abci.IResponseInitChain|null} [initChain] Response initChain + * @property {tendermint.abci.IResponseQuery|null} [query] Response query + * @property {tendermint.abci.IResponseBeginBlock|null} [beginBlock] Response beginBlock + * @property {tendermint.abci.IResponseCheckTx|null} [checkTx] Response checkTx + * @property {tendermint.abci.IResponseDeliverTx|null} [deliverTx] Response deliverTx + * @property {tendermint.abci.IResponseEndBlock|null} [endBlock] Response endBlock + * @property {tendermint.abci.IResponseCommit|null} [commit] Response commit + * @property {tendermint.abci.IResponseListSnapshots|null} [listSnapshots] Response listSnapshots + * @property {tendermint.abci.IResponseOfferSnapshot|null} [offerSnapshot] Response offerSnapshot + * @property {tendermint.abci.IResponseLoadSnapshotChunk|null} [loadSnapshotChunk] Response loadSnapshotChunk + * @property {tendermint.abci.IResponseApplySnapshotChunk|null} [applySnapshotChunk] Response applySnapshotChunk + */ + + /** + * Constructs a new Response. + * @memberof tendermint.abci + * @classdesc Represents a Response. + * @implements IResponse + * @constructor + * @param {tendermint.abci.IResponse=} [properties] Properties to set + */ + function Response(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Response exception. + * @member {tendermint.abci.IResponseException|null|undefined} exception + * @memberof tendermint.abci.Response + * @instance + */ + Response.prototype.exception = null; + + /** + * Response echo. + * @member {tendermint.abci.IResponseEcho|null|undefined} echo + * @memberof tendermint.abci.Response + * @instance + */ + Response.prototype.echo = null; + + /** + * Response flush. + * @member {tendermint.abci.IResponseFlush|null|undefined} flush + * @memberof tendermint.abci.Response + * @instance + */ + Response.prototype.flush = null; + + /** + * Response info. + * @member {tendermint.abci.IResponseInfo|null|undefined} info + * @memberof tendermint.abci.Response + * @instance + */ + Response.prototype.info = null; + + /** + * Response setOption. + * @member {tendermint.abci.IResponseSetOption|null|undefined} setOption + * @memberof tendermint.abci.Response + * @instance + */ + Response.prototype.setOption = null; + + /** + * Response initChain. + * @member {tendermint.abci.IResponseInitChain|null|undefined} initChain + * @memberof tendermint.abci.Response + * @instance + */ + Response.prototype.initChain = null; + + /** + * Response query. + * @member {tendermint.abci.IResponseQuery|null|undefined} query + * @memberof tendermint.abci.Response + * @instance + */ + Response.prototype.query = null; + + /** + * Response beginBlock. + * @member {tendermint.abci.IResponseBeginBlock|null|undefined} beginBlock + * @memberof tendermint.abci.Response + * @instance + */ + Response.prototype.beginBlock = null; + + /** + * Response checkTx. + * @member {tendermint.abci.IResponseCheckTx|null|undefined} checkTx + * @memberof tendermint.abci.Response + * @instance + */ + Response.prototype.checkTx = null; + + /** + * Response deliverTx. + * @member {tendermint.abci.IResponseDeliverTx|null|undefined} deliverTx + * @memberof tendermint.abci.Response + * @instance + */ + Response.prototype.deliverTx = null; + + /** + * Response endBlock. + * @member {tendermint.abci.IResponseEndBlock|null|undefined} endBlock + * @memberof tendermint.abci.Response + * @instance + */ + Response.prototype.endBlock = null; + + /** + * Response commit. + * @member {tendermint.abci.IResponseCommit|null|undefined} commit + * @memberof tendermint.abci.Response + * @instance + */ + Response.prototype.commit = null; + + /** + * Response listSnapshots. + * @member {tendermint.abci.IResponseListSnapshots|null|undefined} listSnapshots + * @memberof tendermint.abci.Response + * @instance + */ + Response.prototype.listSnapshots = null; + + /** + * Response offerSnapshot. + * @member {tendermint.abci.IResponseOfferSnapshot|null|undefined} offerSnapshot + * @memberof tendermint.abci.Response + * @instance + */ + Response.prototype.offerSnapshot = null; + + /** + * Response loadSnapshotChunk. + * @member {tendermint.abci.IResponseLoadSnapshotChunk|null|undefined} loadSnapshotChunk + * @memberof tendermint.abci.Response + * @instance + */ + Response.prototype.loadSnapshotChunk = null; + + /** + * Response applySnapshotChunk. + * @member {tendermint.abci.IResponseApplySnapshotChunk|null|undefined} applySnapshotChunk + * @memberof tendermint.abci.Response + * @instance + */ + Response.prototype.applySnapshotChunk = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Response value. + * @member {"exception"|"echo"|"flush"|"info"|"setOption"|"initChain"|"query"|"beginBlock"|"checkTx"|"deliverTx"|"endBlock"|"commit"|"listSnapshots"|"offerSnapshot"|"loadSnapshotChunk"|"applySnapshotChunk"|undefined} value + * @memberof tendermint.abci.Response + * @instance + */ + Object.defineProperty(Response.prototype, "value", { + get: $util.oneOfGetter($oneOfFields = ["exception", "echo", "flush", "info", "setOption", "initChain", "query", "beginBlock", "checkTx", "deliverTx", "endBlock", "commit", "listSnapshots", "offerSnapshot", "loadSnapshotChunk", "applySnapshotChunk"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Response instance using the specified properties. + * @function create + * @memberof tendermint.abci.Response + * @static + * @param {tendermint.abci.IResponse=} [properties] Properties to set + * @returns {tendermint.abci.Response} Response instance + */ + Response.create = function create(properties) { + return new Response(properties); + }; + + /** + * Encodes the specified Response message. Does not implicitly {@link tendermint.abci.Response.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.Response + * @static + * @param {tendermint.abci.IResponse} message Response message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Response.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.exception != null && Object.hasOwnProperty.call(message, "exception")) + $root.tendermint.abci.ResponseException.encode(message.exception, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.echo != null && Object.hasOwnProperty.call(message, "echo")) + $root.tendermint.abci.ResponseEcho.encode(message.echo, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.flush != null && Object.hasOwnProperty.call(message, "flush")) + $root.tendermint.abci.ResponseFlush.encode(message.flush, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.info != null && Object.hasOwnProperty.call(message, "info")) + $root.tendermint.abci.ResponseInfo.encode(message.info, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.setOption != null && Object.hasOwnProperty.call(message, "setOption")) + $root.tendermint.abci.ResponseSetOption.encode(message.setOption, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.initChain != null && Object.hasOwnProperty.call(message, "initChain")) + $root.tendermint.abci.ResponseInitChain.encode(message.initChain, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.query != null && Object.hasOwnProperty.call(message, "query")) + $root.tendermint.abci.ResponseQuery.encode(message.query, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.beginBlock != null && Object.hasOwnProperty.call(message, "beginBlock")) + $root.tendermint.abci.ResponseBeginBlock.encode(message.beginBlock, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.checkTx != null && Object.hasOwnProperty.call(message, "checkTx")) + $root.tendermint.abci.ResponseCheckTx.encode(message.checkTx, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.deliverTx != null && Object.hasOwnProperty.call(message, "deliverTx")) + $root.tendermint.abci.ResponseDeliverTx.encode(message.deliverTx, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.endBlock != null && Object.hasOwnProperty.call(message, "endBlock")) + $root.tendermint.abci.ResponseEndBlock.encode(message.endBlock, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.commit != null && Object.hasOwnProperty.call(message, "commit")) + $root.tendermint.abci.ResponseCommit.encode(message.commit, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.listSnapshots != null && Object.hasOwnProperty.call(message, "listSnapshots")) + $root.tendermint.abci.ResponseListSnapshots.encode(message.listSnapshots, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.offerSnapshot != null && Object.hasOwnProperty.call(message, "offerSnapshot")) + $root.tendermint.abci.ResponseOfferSnapshot.encode(message.offerSnapshot, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.loadSnapshotChunk != null && Object.hasOwnProperty.call(message, "loadSnapshotChunk")) + $root.tendermint.abci.ResponseLoadSnapshotChunk.encode(message.loadSnapshotChunk, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.applySnapshotChunk != null && Object.hasOwnProperty.call(message, "applySnapshotChunk")) + $root.tendermint.abci.ResponseApplySnapshotChunk.encode(message.applySnapshotChunk, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Response message, length delimited. Does not implicitly {@link tendermint.abci.Response.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.Response + * @static + * @param {tendermint.abci.IResponse} message Response message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Response.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Response message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.Response + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.Response} Response + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Response.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.Response(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.exception = $root.tendermint.abci.ResponseException.decode(reader, reader.uint32()); + break; + case 2: + message.echo = $root.tendermint.abci.ResponseEcho.decode(reader, reader.uint32()); + break; + case 3: + message.flush = $root.tendermint.abci.ResponseFlush.decode(reader, reader.uint32()); + break; + case 4: + message.info = $root.tendermint.abci.ResponseInfo.decode(reader, reader.uint32()); + break; + case 5: + message.setOption = $root.tendermint.abci.ResponseSetOption.decode(reader, reader.uint32()); + break; + case 6: + message.initChain = $root.tendermint.abci.ResponseInitChain.decode(reader, reader.uint32()); + break; + case 7: + message.query = $root.tendermint.abci.ResponseQuery.decode(reader, reader.uint32()); + break; + case 8: + message.beginBlock = $root.tendermint.abci.ResponseBeginBlock.decode(reader, reader.uint32()); + break; + case 9: + message.checkTx = $root.tendermint.abci.ResponseCheckTx.decode(reader, reader.uint32()); + break; + case 10: + message.deliverTx = $root.tendermint.abci.ResponseDeliverTx.decode(reader, reader.uint32()); + break; + case 11: + message.endBlock = $root.tendermint.abci.ResponseEndBlock.decode(reader, reader.uint32()); + break; + case 12: + message.commit = $root.tendermint.abci.ResponseCommit.decode(reader, reader.uint32()); + break; + case 13: + message.listSnapshots = $root.tendermint.abci.ResponseListSnapshots.decode(reader, reader.uint32()); + break; + case 14: + message.offerSnapshot = $root.tendermint.abci.ResponseOfferSnapshot.decode(reader, reader.uint32()); + break; + case 15: + message.loadSnapshotChunk = $root.tendermint.abci.ResponseLoadSnapshotChunk.decode(reader, reader.uint32()); + break; + case 16: + message.applySnapshotChunk = $root.tendermint.abci.ResponseApplySnapshotChunk.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Response message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.Response + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.Response} Response + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Response.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Response message. + * @function verify + * @memberof tendermint.abci.Response + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Response.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.exception != null && message.hasOwnProperty("exception")) { + properties.value = 1; + { + var error = $root.tendermint.abci.ResponseException.verify(message.exception); + if (error) + return "exception." + error; + } + } + if (message.echo != null && message.hasOwnProperty("echo")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.tendermint.abci.ResponseEcho.verify(message.echo); + if (error) + return "echo." + error; + } + } + if (message.flush != null && message.hasOwnProperty("flush")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.tendermint.abci.ResponseFlush.verify(message.flush); + if (error) + return "flush." + error; + } + } + if (message.info != null && message.hasOwnProperty("info")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.tendermint.abci.ResponseInfo.verify(message.info); + if (error) + return "info." + error; + } + } + if (message.setOption != null && message.hasOwnProperty("setOption")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.tendermint.abci.ResponseSetOption.verify(message.setOption); + if (error) + return "setOption." + error; + } + } + if (message.initChain != null && message.hasOwnProperty("initChain")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.tendermint.abci.ResponseInitChain.verify(message.initChain); + if (error) + return "initChain." + error; + } + } + if (message.query != null && message.hasOwnProperty("query")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.tendermint.abci.ResponseQuery.verify(message.query); + if (error) + return "query." + error; + } + } + if (message.beginBlock != null && message.hasOwnProperty("beginBlock")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.tendermint.abci.ResponseBeginBlock.verify(message.beginBlock); + if (error) + return "beginBlock." + error; + } + } + if (message.checkTx != null && message.hasOwnProperty("checkTx")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.tendermint.abci.ResponseCheckTx.verify(message.checkTx); + if (error) + return "checkTx." + error; + } + } + if (message.deliverTx != null && message.hasOwnProperty("deliverTx")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.tendermint.abci.ResponseDeliverTx.verify(message.deliverTx); + if (error) + return "deliverTx." + error; + } + } + if (message.endBlock != null && message.hasOwnProperty("endBlock")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.tendermint.abci.ResponseEndBlock.verify(message.endBlock); + if (error) + return "endBlock." + error; + } + } + if (message.commit != null && message.hasOwnProperty("commit")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.tendermint.abci.ResponseCommit.verify(message.commit); + if (error) + return "commit." + error; + } + } + if (message.listSnapshots != null && message.hasOwnProperty("listSnapshots")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.tendermint.abci.ResponseListSnapshots.verify(message.listSnapshots); + if (error) + return "listSnapshots." + error; + } + } + if (message.offerSnapshot != null && message.hasOwnProperty("offerSnapshot")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.tendermint.abci.ResponseOfferSnapshot.verify(message.offerSnapshot); + if (error) + return "offerSnapshot." + error; + } + } + if (message.loadSnapshotChunk != null && message.hasOwnProperty("loadSnapshotChunk")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.tendermint.abci.ResponseLoadSnapshotChunk.verify(message.loadSnapshotChunk); + if (error) + return "loadSnapshotChunk." + error; + } + } + if (message.applySnapshotChunk != null && message.hasOwnProperty("applySnapshotChunk")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.tendermint.abci.ResponseApplySnapshotChunk.verify(message.applySnapshotChunk); + if (error) + return "applySnapshotChunk." + error; + } + } + return null; + }; + + /** + * Creates a Response message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.Response + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.Response} Response + */ + Response.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.Response) + return object; + var message = new $root.tendermint.abci.Response(); + if (object.exception != null) { + if (typeof object.exception !== "object") + throw TypeError(".tendermint.abci.Response.exception: object expected"); + message.exception = $root.tendermint.abci.ResponseException.fromObject(object.exception); + } + if (object.echo != null) { + if (typeof object.echo !== "object") + throw TypeError(".tendermint.abci.Response.echo: object expected"); + message.echo = $root.tendermint.abci.ResponseEcho.fromObject(object.echo); + } + if (object.flush != null) { + if (typeof object.flush !== "object") + throw TypeError(".tendermint.abci.Response.flush: object expected"); + message.flush = $root.tendermint.abci.ResponseFlush.fromObject(object.flush); + } + if (object.info != null) { + if (typeof object.info !== "object") + throw TypeError(".tendermint.abci.Response.info: object expected"); + message.info = $root.tendermint.abci.ResponseInfo.fromObject(object.info); + } + if (object.setOption != null) { + if (typeof object.setOption !== "object") + throw TypeError(".tendermint.abci.Response.setOption: object expected"); + message.setOption = $root.tendermint.abci.ResponseSetOption.fromObject(object.setOption); + } + if (object.initChain != null) { + if (typeof object.initChain !== "object") + throw TypeError(".tendermint.abci.Response.initChain: object expected"); + message.initChain = $root.tendermint.abci.ResponseInitChain.fromObject(object.initChain); + } + if (object.query != null) { + if (typeof object.query !== "object") + throw TypeError(".tendermint.abci.Response.query: object expected"); + message.query = $root.tendermint.abci.ResponseQuery.fromObject(object.query); + } + if (object.beginBlock != null) { + if (typeof object.beginBlock !== "object") + throw TypeError(".tendermint.abci.Response.beginBlock: object expected"); + message.beginBlock = $root.tendermint.abci.ResponseBeginBlock.fromObject(object.beginBlock); + } + if (object.checkTx != null) { + if (typeof object.checkTx !== "object") + throw TypeError(".tendermint.abci.Response.checkTx: object expected"); + message.checkTx = $root.tendermint.abci.ResponseCheckTx.fromObject(object.checkTx); + } + if (object.deliverTx != null) { + if (typeof object.deliverTx !== "object") + throw TypeError(".tendermint.abci.Response.deliverTx: object expected"); + message.deliverTx = $root.tendermint.abci.ResponseDeliverTx.fromObject(object.deliverTx); + } + if (object.endBlock != null) { + if (typeof object.endBlock !== "object") + throw TypeError(".tendermint.abci.Response.endBlock: object expected"); + message.endBlock = $root.tendermint.abci.ResponseEndBlock.fromObject(object.endBlock); + } + if (object.commit != null) { + if (typeof object.commit !== "object") + throw TypeError(".tendermint.abci.Response.commit: object expected"); + message.commit = $root.tendermint.abci.ResponseCommit.fromObject(object.commit); + } + if (object.listSnapshots != null) { + if (typeof object.listSnapshots !== "object") + throw TypeError(".tendermint.abci.Response.listSnapshots: object expected"); + message.listSnapshots = $root.tendermint.abci.ResponseListSnapshots.fromObject(object.listSnapshots); + } + if (object.offerSnapshot != null) { + if (typeof object.offerSnapshot !== "object") + throw TypeError(".tendermint.abci.Response.offerSnapshot: object expected"); + message.offerSnapshot = $root.tendermint.abci.ResponseOfferSnapshot.fromObject(object.offerSnapshot); + } + if (object.loadSnapshotChunk != null) { + if (typeof object.loadSnapshotChunk !== "object") + throw TypeError(".tendermint.abci.Response.loadSnapshotChunk: object expected"); + message.loadSnapshotChunk = $root.tendermint.abci.ResponseLoadSnapshotChunk.fromObject(object.loadSnapshotChunk); + } + if (object.applySnapshotChunk != null) { + if (typeof object.applySnapshotChunk !== "object") + throw TypeError(".tendermint.abci.Response.applySnapshotChunk: object expected"); + message.applySnapshotChunk = $root.tendermint.abci.ResponseApplySnapshotChunk.fromObject(object.applySnapshotChunk); + } + return message; + }; + + /** + * Creates a plain object from a Response message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.Response + * @static + * @param {tendermint.abci.Response} message Response + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Response.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.exception != null && message.hasOwnProperty("exception")) { + object.exception = $root.tendermint.abci.ResponseException.toObject(message.exception, options); + if (options.oneofs) + object.value = "exception"; + } + if (message.echo != null && message.hasOwnProperty("echo")) { + object.echo = $root.tendermint.abci.ResponseEcho.toObject(message.echo, options); + if (options.oneofs) + object.value = "echo"; + } + if (message.flush != null && message.hasOwnProperty("flush")) { + object.flush = $root.tendermint.abci.ResponseFlush.toObject(message.flush, options); + if (options.oneofs) + object.value = "flush"; + } + if (message.info != null && message.hasOwnProperty("info")) { + object.info = $root.tendermint.abci.ResponseInfo.toObject(message.info, options); + if (options.oneofs) + object.value = "info"; + } + if (message.setOption != null && message.hasOwnProperty("setOption")) { + object.setOption = $root.tendermint.abci.ResponseSetOption.toObject(message.setOption, options); + if (options.oneofs) + object.value = "setOption"; + } + if (message.initChain != null && message.hasOwnProperty("initChain")) { + object.initChain = $root.tendermint.abci.ResponseInitChain.toObject(message.initChain, options); + if (options.oneofs) + object.value = "initChain"; + } + if (message.query != null && message.hasOwnProperty("query")) { + object.query = $root.tendermint.abci.ResponseQuery.toObject(message.query, options); + if (options.oneofs) + object.value = "query"; + } + if (message.beginBlock != null && message.hasOwnProperty("beginBlock")) { + object.beginBlock = $root.tendermint.abci.ResponseBeginBlock.toObject(message.beginBlock, options); + if (options.oneofs) + object.value = "beginBlock"; + } + if (message.checkTx != null && message.hasOwnProperty("checkTx")) { + object.checkTx = $root.tendermint.abci.ResponseCheckTx.toObject(message.checkTx, options); + if (options.oneofs) + object.value = "checkTx"; + } + if (message.deliverTx != null && message.hasOwnProperty("deliverTx")) { + object.deliverTx = $root.tendermint.abci.ResponseDeliverTx.toObject(message.deliverTx, options); + if (options.oneofs) + object.value = "deliverTx"; + } + if (message.endBlock != null && message.hasOwnProperty("endBlock")) { + object.endBlock = $root.tendermint.abci.ResponseEndBlock.toObject(message.endBlock, options); + if (options.oneofs) + object.value = "endBlock"; + } + if (message.commit != null && message.hasOwnProperty("commit")) { + object.commit = $root.tendermint.abci.ResponseCommit.toObject(message.commit, options); + if (options.oneofs) + object.value = "commit"; + } + if (message.listSnapshots != null && message.hasOwnProperty("listSnapshots")) { + object.listSnapshots = $root.tendermint.abci.ResponseListSnapshots.toObject(message.listSnapshots, options); + if (options.oneofs) + object.value = "listSnapshots"; + } + if (message.offerSnapshot != null && message.hasOwnProperty("offerSnapshot")) { + object.offerSnapshot = $root.tendermint.abci.ResponseOfferSnapshot.toObject(message.offerSnapshot, options); + if (options.oneofs) + object.value = "offerSnapshot"; + } + if (message.loadSnapshotChunk != null && message.hasOwnProperty("loadSnapshotChunk")) { + object.loadSnapshotChunk = $root.tendermint.abci.ResponseLoadSnapshotChunk.toObject(message.loadSnapshotChunk, options); + if (options.oneofs) + object.value = "loadSnapshotChunk"; + } + if (message.applySnapshotChunk != null && message.hasOwnProperty("applySnapshotChunk")) { + object.applySnapshotChunk = $root.tendermint.abci.ResponseApplySnapshotChunk.toObject(message.applySnapshotChunk, options); + if (options.oneofs) + object.value = "applySnapshotChunk"; + } + return object; + }; + + /** + * Converts this Response to JSON. + * @function toJSON + * @memberof tendermint.abci.Response + * @instance + * @returns {Object.} JSON object + */ + Response.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Response; + })(abci.Response || {}); + + abci.ResponseException = (function(ResponseException) { + + /** + * Properties of a ResponseException. + * @memberof tendermint.abci + * @interface IResponseException + * @property {string|null} [error] ResponseException error + */ + + /** + * Constructs a new ResponseException. + * @memberof tendermint.abci + * @classdesc Represents a ResponseException. + * @implements IResponseException + * @constructor + * @param {tendermint.abci.IResponseException=} [properties] Properties to set + */ + function ResponseException(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResponseException error. + * @member {string} error + * @memberof tendermint.abci.ResponseException + * @instance + */ + ResponseException.prototype.error = ""; + + /** + * Creates a new ResponseException instance using the specified properties. + * @function create + * @memberof tendermint.abci.ResponseException + * @static + * @param {tendermint.abci.IResponseException=} [properties] Properties to set + * @returns {tendermint.abci.ResponseException} ResponseException instance + */ + ResponseException.create = function create(properties) { + return new ResponseException(properties); + }; + + /** + * Encodes the specified ResponseException message. Does not implicitly {@link tendermint.abci.ResponseException.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.ResponseException + * @static + * @param {tendermint.abci.IResponseException} message ResponseException message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseException.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.error != null && Object.hasOwnProperty.call(message, "error")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.error); + return writer; + }; + + /** + * Encodes the specified ResponseException message, length delimited. Does not implicitly {@link tendermint.abci.ResponseException.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.ResponseException + * @static + * @param {tendermint.abci.IResponseException} message ResponseException message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseException.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResponseException message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.ResponseException + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.ResponseException} ResponseException + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseException.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.ResponseException(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.error = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResponseException message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.ResponseException + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.ResponseException} ResponseException + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseException.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResponseException message. + * @function verify + * @memberof tendermint.abci.ResponseException + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResponseException.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.error != null && message.hasOwnProperty("error")) + if (!$util.isString(message.error)) + return "error: string expected"; + return null; + }; + + /** + * Creates a ResponseException message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.ResponseException + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.ResponseException} ResponseException + */ + ResponseException.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.ResponseException) + return object; + var message = new $root.tendermint.abci.ResponseException(); + if (object.error != null) + message.error = String(object.error); + return message; + }; + + /** + * Creates a plain object from a ResponseException message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.ResponseException + * @static + * @param {tendermint.abci.ResponseException} message ResponseException + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResponseException.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.error = ""; + if (message.error != null && message.hasOwnProperty("error")) + object.error = message.error; + return object; + }; + + /** + * Converts this ResponseException to JSON. + * @function toJSON + * @memberof tendermint.abci.ResponseException + * @instance + * @returns {Object.} JSON object + */ + ResponseException.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ResponseException; + })(abci.ResponseException || {}); + + abci.ResponseEcho = (function(ResponseEcho) { + + /** + * Properties of a ResponseEcho. + * @memberof tendermint.abci + * @interface IResponseEcho + * @property {string|null} [message] ResponseEcho message + */ + + /** + * Constructs a new ResponseEcho. + * @memberof tendermint.abci + * @classdesc Represents a ResponseEcho. + * @implements IResponseEcho + * @constructor + * @param {tendermint.abci.IResponseEcho=} [properties] Properties to set + */ + function ResponseEcho(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResponseEcho message. + * @member {string} message + * @memberof tendermint.abci.ResponseEcho + * @instance + */ + ResponseEcho.prototype.message = ""; + + /** + * Creates a new ResponseEcho instance using the specified properties. + * @function create + * @memberof tendermint.abci.ResponseEcho + * @static + * @param {tendermint.abci.IResponseEcho=} [properties] Properties to set + * @returns {tendermint.abci.ResponseEcho} ResponseEcho instance + */ + ResponseEcho.create = function create(properties) { + return new ResponseEcho(properties); + }; + + /** + * Encodes the specified ResponseEcho message. Does not implicitly {@link tendermint.abci.ResponseEcho.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.ResponseEcho + * @static + * @param {tendermint.abci.IResponseEcho} message ResponseEcho message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseEcho.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.message); + return writer; + }; + + /** + * Encodes the specified ResponseEcho message, length delimited. Does not implicitly {@link tendermint.abci.ResponseEcho.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.ResponseEcho + * @static + * @param {tendermint.abci.IResponseEcho} message ResponseEcho message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseEcho.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResponseEcho message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.ResponseEcho + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.ResponseEcho} ResponseEcho + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseEcho.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.ResponseEcho(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.message = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResponseEcho message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.ResponseEcho + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.ResponseEcho} ResponseEcho + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseEcho.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResponseEcho message. + * @function verify + * @memberof tendermint.abci.ResponseEcho + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResponseEcho.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + return null; + }; + + /** + * Creates a ResponseEcho message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.ResponseEcho + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.ResponseEcho} ResponseEcho + */ + ResponseEcho.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.ResponseEcho) + return object; + var message = new $root.tendermint.abci.ResponseEcho(); + if (object.message != null) + message.message = String(object.message); + return message; + }; + + /** + * Creates a plain object from a ResponseEcho message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.ResponseEcho + * @static + * @param {tendermint.abci.ResponseEcho} message ResponseEcho + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResponseEcho.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.message = ""; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + return object; + }; + + /** + * Converts this ResponseEcho to JSON. + * @function toJSON + * @memberof tendermint.abci.ResponseEcho + * @instance + * @returns {Object.} JSON object + */ + ResponseEcho.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ResponseEcho; + })(abci.ResponseEcho || {}); + + abci.ResponseFlush = (function(ResponseFlush) { + + /** + * Properties of a ResponseFlush. + * @memberof tendermint.abci + * @interface IResponseFlush + */ + + /** + * Constructs a new ResponseFlush. + * @memberof tendermint.abci + * @classdesc Represents a ResponseFlush. + * @implements IResponseFlush + * @constructor + * @param {tendermint.abci.IResponseFlush=} [properties] Properties to set + */ + function ResponseFlush(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new ResponseFlush instance using the specified properties. + * @function create + * @memberof tendermint.abci.ResponseFlush + * @static + * @param {tendermint.abci.IResponseFlush=} [properties] Properties to set + * @returns {tendermint.abci.ResponseFlush} ResponseFlush instance + */ + ResponseFlush.create = function create(properties) { + return new ResponseFlush(properties); + }; + + /** + * Encodes the specified ResponseFlush message. Does not implicitly {@link tendermint.abci.ResponseFlush.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.ResponseFlush + * @static + * @param {tendermint.abci.IResponseFlush} message ResponseFlush message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseFlush.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified ResponseFlush message, length delimited. Does not implicitly {@link tendermint.abci.ResponseFlush.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.ResponseFlush + * @static + * @param {tendermint.abci.IResponseFlush} message ResponseFlush message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseFlush.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResponseFlush message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.ResponseFlush + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.ResponseFlush} ResponseFlush + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseFlush.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.ResponseFlush(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResponseFlush message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.ResponseFlush + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.ResponseFlush} ResponseFlush + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseFlush.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResponseFlush message. + * @function verify + * @memberof tendermint.abci.ResponseFlush + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResponseFlush.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a ResponseFlush message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.ResponseFlush + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.ResponseFlush} ResponseFlush + */ + ResponseFlush.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.ResponseFlush) + return object; + return new $root.tendermint.abci.ResponseFlush(); + }; + + /** + * Creates a plain object from a ResponseFlush message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.ResponseFlush + * @static + * @param {tendermint.abci.ResponseFlush} message ResponseFlush + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResponseFlush.toObject = function toObject() { + return {}; + }; + + /** + * Converts this ResponseFlush to JSON. + * @function toJSON + * @memberof tendermint.abci.ResponseFlush + * @instance + * @returns {Object.} JSON object + */ + ResponseFlush.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ResponseFlush; + })(abci.ResponseFlush || {}); + + abci.ResponseInfo = (function(ResponseInfo) { + + /** + * Properties of a ResponseInfo. + * @memberof tendermint.abci + * @interface IResponseInfo + * @property {string|null} [data] ResponseInfo data + * @property {string|null} [version] ResponseInfo version + * @property {number|Long|null} [appVersion] ResponseInfo appVersion + * @property {number|Long|null} [lastBlockHeight] ResponseInfo lastBlockHeight + * @property {Uint8Array|null} [lastBlockAppHash] ResponseInfo lastBlockAppHash + */ + + /** + * Constructs a new ResponseInfo. + * @memberof tendermint.abci + * @classdesc Represents a ResponseInfo. + * @implements IResponseInfo + * @constructor + * @param {tendermint.abci.IResponseInfo=} [properties] Properties to set + */ + function ResponseInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResponseInfo data. + * @member {string} data + * @memberof tendermint.abci.ResponseInfo + * @instance + */ + ResponseInfo.prototype.data = ""; + + /** + * ResponseInfo version. + * @member {string} version + * @memberof tendermint.abci.ResponseInfo + * @instance + */ + ResponseInfo.prototype.version = ""; + + /** + * ResponseInfo appVersion. + * @member {number|Long} appVersion + * @memberof tendermint.abci.ResponseInfo + * @instance + */ + ResponseInfo.prototype.appVersion = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * ResponseInfo lastBlockHeight. + * @member {number|Long} lastBlockHeight + * @memberof tendermint.abci.ResponseInfo + * @instance + */ + ResponseInfo.prototype.lastBlockHeight = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ResponseInfo lastBlockAppHash. + * @member {Uint8Array} lastBlockAppHash + * @memberof tendermint.abci.ResponseInfo + * @instance + */ + ResponseInfo.prototype.lastBlockAppHash = $util.newBuffer([]); + + /** + * Creates a new ResponseInfo instance using the specified properties. + * @function create + * @memberof tendermint.abci.ResponseInfo + * @static + * @param {tendermint.abci.IResponseInfo=} [properties] Properties to set + * @returns {tendermint.abci.ResponseInfo} ResponseInfo instance + */ + ResponseInfo.create = function create(properties) { + return new ResponseInfo(properties); + }; + + /** + * Encodes the specified ResponseInfo message. Does not implicitly {@link tendermint.abci.ResponseInfo.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.ResponseInfo + * @static + * @param {tendermint.abci.IResponseInfo} message ResponseInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.data != null && Object.hasOwnProperty.call(message, "data")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.data); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.version); + if (message.appVersion != null && Object.hasOwnProperty.call(message, "appVersion")) + writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.appVersion); + if (message.lastBlockHeight != null && Object.hasOwnProperty.call(message, "lastBlockHeight")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.lastBlockHeight); + if (message.lastBlockAppHash != null && Object.hasOwnProperty.call(message, "lastBlockAppHash")) + writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.lastBlockAppHash); + return writer; + }; + + /** + * Encodes the specified ResponseInfo message, length delimited. Does not implicitly {@link tendermint.abci.ResponseInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.ResponseInfo + * @static + * @param {tendermint.abci.IResponseInfo} message ResponseInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResponseInfo message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.ResponseInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.ResponseInfo} ResponseInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.ResponseInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.data = reader.string(); + break; + case 2: + message.version = reader.string(); + break; + case 3: + message.appVersion = reader.uint64(); + break; + case 4: + message.lastBlockHeight = reader.int64(); + break; + case 5: + message.lastBlockAppHash = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResponseInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.ResponseInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.ResponseInfo} ResponseInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResponseInfo message. + * @function verify + * @memberof tendermint.abci.ResponseInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResponseInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.data != null && message.hasOwnProperty("data")) + if (!$util.isString(message.data)) + return "data: string expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.appVersion != null && message.hasOwnProperty("appVersion")) + if (!$util.isInteger(message.appVersion) && !(message.appVersion && $util.isInteger(message.appVersion.low) && $util.isInteger(message.appVersion.high))) + return "appVersion: integer|Long expected"; + if (message.lastBlockHeight != null && message.hasOwnProperty("lastBlockHeight")) + if (!$util.isInteger(message.lastBlockHeight) && !(message.lastBlockHeight && $util.isInteger(message.lastBlockHeight.low) && $util.isInteger(message.lastBlockHeight.high))) + return "lastBlockHeight: integer|Long expected"; + if (message.lastBlockAppHash != null && message.hasOwnProperty("lastBlockAppHash")) + if (!(message.lastBlockAppHash && typeof message.lastBlockAppHash.length === "number" || $util.isString(message.lastBlockAppHash))) + return "lastBlockAppHash: buffer expected"; + return null; + }; + + /** + * Creates a ResponseInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.ResponseInfo + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.ResponseInfo} ResponseInfo + */ + ResponseInfo.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.ResponseInfo) + return object; + var message = new $root.tendermint.abci.ResponseInfo(); + if (object.data != null) + message.data = String(object.data); + if (object.version != null) + message.version = String(object.version); + if (object.appVersion != null) + if ($util.Long) + (message.appVersion = $util.Long.fromValue(object.appVersion)).unsigned = true; + else if (typeof object.appVersion === "string") + message.appVersion = parseInt(object.appVersion, 10); + else if (typeof object.appVersion === "number") + message.appVersion = object.appVersion; + else if (typeof object.appVersion === "object") + message.appVersion = new $util.LongBits(object.appVersion.low >>> 0, object.appVersion.high >>> 0).toNumber(true); + if (object.lastBlockHeight != null) + if ($util.Long) + (message.lastBlockHeight = $util.Long.fromValue(object.lastBlockHeight)).unsigned = false; + else if (typeof object.lastBlockHeight === "string") + message.lastBlockHeight = parseInt(object.lastBlockHeight, 10); + else if (typeof object.lastBlockHeight === "number") + message.lastBlockHeight = object.lastBlockHeight; + else if (typeof object.lastBlockHeight === "object") + message.lastBlockHeight = new $util.LongBits(object.lastBlockHeight.low >>> 0, object.lastBlockHeight.high >>> 0).toNumber(); + if (object.lastBlockAppHash != null) + if (typeof object.lastBlockAppHash === "string") + $util.base64.decode(object.lastBlockAppHash, message.lastBlockAppHash = $util.newBuffer($util.base64.length(object.lastBlockAppHash)), 0); + else if (object.lastBlockAppHash.length) + message.lastBlockAppHash = object.lastBlockAppHash; + return message; + }; + + /** + * Creates a plain object from a ResponseInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.ResponseInfo + * @static + * @param {tendermint.abci.ResponseInfo} message ResponseInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResponseInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.data = ""; + object.version = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.appVersion = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.appVersion = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.lastBlockHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.lastBlockHeight = options.longs === String ? "0" : 0; + if (options.bytes === String) + object.lastBlockAppHash = ""; + else { + object.lastBlockAppHash = []; + if (options.bytes !== Array) + object.lastBlockAppHash = $util.newBuffer(object.lastBlockAppHash); + } + } + if (message.data != null && message.hasOwnProperty("data")) + object.data = message.data; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.appVersion != null && message.hasOwnProperty("appVersion")) + if (typeof message.appVersion === "number") + object.appVersion = options.longs === String ? String(message.appVersion) : message.appVersion; + else + object.appVersion = options.longs === String ? $util.Long.prototype.toString.call(message.appVersion) : options.longs === Number ? new $util.LongBits(message.appVersion.low >>> 0, message.appVersion.high >>> 0).toNumber(true) : message.appVersion; + if (message.lastBlockHeight != null && message.hasOwnProperty("lastBlockHeight")) + if (typeof message.lastBlockHeight === "number") + object.lastBlockHeight = options.longs === String ? String(message.lastBlockHeight) : message.lastBlockHeight; + else + object.lastBlockHeight = options.longs === String ? $util.Long.prototype.toString.call(message.lastBlockHeight) : options.longs === Number ? new $util.LongBits(message.lastBlockHeight.low >>> 0, message.lastBlockHeight.high >>> 0).toNumber() : message.lastBlockHeight; + if (message.lastBlockAppHash != null && message.hasOwnProperty("lastBlockAppHash")) + object.lastBlockAppHash = options.bytes === String ? $util.base64.encode(message.lastBlockAppHash, 0, message.lastBlockAppHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.lastBlockAppHash) : message.lastBlockAppHash; + return object; + }; + + /** + * Converts this ResponseInfo to JSON. + * @function toJSON + * @memberof tendermint.abci.ResponseInfo + * @instance + * @returns {Object.} JSON object + */ + ResponseInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ResponseInfo; + })(abci.ResponseInfo || {}); + + abci.ResponseSetOption = (function(ResponseSetOption) { + + /** + * Properties of a ResponseSetOption. + * @memberof tendermint.abci + * @interface IResponseSetOption + * @property {number|null} [code] ResponseSetOption code + * @property {string|null} [log] ResponseSetOption log + * @property {string|null} [info] ResponseSetOption info + */ + + /** + * Constructs a new ResponseSetOption. + * @memberof tendermint.abci + * @classdesc Represents a ResponseSetOption. + * @implements IResponseSetOption + * @constructor + * @param {tendermint.abci.IResponseSetOption=} [properties] Properties to set + */ + function ResponseSetOption(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResponseSetOption code. + * @member {number} code + * @memberof tendermint.abci.ResponseSetOption + * @instance + */ + ResponseSetOption.prototype.code = 0; + + /** + * ResponseSetOption log. + * @member {string} log + * @memberof tendermint.abci.ResponseSetOption + * @instance + */ + ResponseSetOption.prototype.log = ""; + + /** + * ResponseSetOption info. + * @member {string} info + * @memberof tendermint.abci.ResponseSetOption + * @instance + */ + ResponseSetOption.prototype.info = ""; + + /** + * Creates a new ResponseSetOption instance using the specified properties. + * @function create + * @memberof tendermint.abci.ResponseSetOption + * @static + * @param {tendermint.abci.IResponseSetOption=} [properties] Properties to set + * @returns {tendermint.abci.ResponseSetOption} ResponseSetOption instance + */ + ResponseSetOption.create = function create(properties) { + return new ResponseSetOption(properties); + }; + + /** + * Encodes the specified ResponseSetOption message. Does not implicitly {@link tendermint.abci.ResponseSetOption.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.ResponseSetOption + * @static + * @param {tendermint.abci.IResponseSetOption} message ResponseSetOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseSetOption.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.code != null && Object.hasOwnProperty.call(message, "code")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.code); + if (message.log != null && Object.hasOwnProperty.call(message, "log")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.log); + if (message.info != null && Object.hasOwnProperty.call(message, "info")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.info); + return writer; + }; + + /** + * Encodes the specified ResponseSetOption message, length delimited. Does not implicitly {@link tendermint.abci.ResponseSetOption.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.ResponseSetOption + * @static + * @param {tendermint.abci.IResponseSetOption} message ResponseSetOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseSetOption.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResponseSetOption message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.ResponseSetOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.ResponseSetOption} ResponseSetOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseSetOption.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.ResponseSetOption(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.code = reader.uint32(); + break; + case 3: + message.log = reader.string(); + break; + case 4: + message.info = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResponseSetOption message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.ResponseSetOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.ResponseSetOption} ResponseSetOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseSetOption.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResponseSetOption message. + * @function verify + * @memberof tendermint.abci.ResponseSetOption + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResponseSetOption.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.code != null && message.hasOwnProperty("code")) + if (!$util.isInteger(message.code)) + return "code: integer expected"; + if (message.log != null && message.hasOwnProperty("log")) + if (!$util.isString(message.log)) + return "log: string expected"; + if (message.info != null && message.hasOwnProperty("info")) + if (!$util.isString(message.info)) + return "info: string expected"; + return null; + }; + + /** + * Creates a ResponseSetOption message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.ResponseSetOption + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.ResponseSetOption} ResponseSetOption + */ + ResponseSetOption.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.ResponseSetOption) + return object; + var message = new $root.tendermint.abci.ResponseSetOption(); + if (object.code != null) + message.code = object.code >>> 0; + if (object.log != null) + message.log = String(object.log); + if (object.info != null) + message.info = String(object.info); + return message; + }; + + /** + * Creates a plain object from a ResponseSetOption message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.ResponseSetOption + * @static + * @param {tendermint.abci.ResponseSetOption} message ResponseSetOption + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResponseSetOption.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.code = 0; + object.log = ""; + object.info = ""; + } + if (message.code != null && message.hasOwnProperty("code")) + object.code = message.code; + if (message.log != null && message.hasOwnProperty("log")) + object.log = message.log; + if (message.info != null && message.hasOwnProperty("info")) + object.info = message.info; + return object; + }; + + /** + * Converts this ResponseSetOption to JSON. + * @function toJSON + * @memberof tendermint.abci.ResponseSetOption + * @instance + * @returns {Object.} JSON object + */ + ResponseSetOption.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ResponseSetOption; + })(abci.ResponseSetOption || {}); + + abci.ResponseInitChain = (function(ResponseInitChain) { + + /** + * Properties of a ResponseInitChain. + * @memberof tendermint.abci + * @interface IResponseInitChain + * @property {tendermint.abci.IConsensusParams|null} [consensusParams] ResponseInitChain consensusParams + * @property {Array.|null} [validators] ResponseInitChain validators + * @property {Uint8Array|null} [appHash] ResponseInitChain appHash + */ + + /** + * Constructs a new ResponseInitChain. + * @memberof tendermint.abci + * @classdesc Represents a ResponseInitChain. + * @implements IResponseInitChain + * @constructor + * @param {tendermint.abci.IResponseInitChain=} [properties] Properties to set + */ + function ResponseInitChain(properties) { + this.validators = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResponseInitChain consensusParams. + * @member {tendermint.abci.IConsensusParams|null|undefined} consensusParams + * @memberof tendermint.abci.ResponseInitChain + * @instance + */ + ResponseInitChain.prototype.consensusParams = null; + + /** + * ResponseInitChain validators. + * @member {Array.} validators + * @memberof tendermint.abci.ResponseInitChain + * @instance + */ + ResponseInitChain.prototype.validators = $util.emptyArray; + + /** + * ResponseInitChain appHash. + * @member {Uint8Array} appHash + * @memberof tendermint.abci.ResponseInitChain + * @instance + */ + ResponseInitChain.prototype.appHash = $util.newBuffer([]); + + /** + * Creates a new ResponseInitChain instance using the specified properties. + * @function create + * @memberof tendermint.abci.ResponseInitChain + * @static + * @param {tendermint.abci.IResponseInitChain=} [properties] Properties to set + * @returns {tendermint.abci.ResponseInitChain} ResponseInitChain instance + */ + ResponseInitChain.create = function create(properties) { + return new ResponseInitChain(properties); + }; + + /** + * Encodes the specified ResponseInitChain message. Does not implicitly {@link tendermint.abci.ResponseInitChain.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.ResponseInitChain + * @static + * @param {tendermint.abci.IResponseInitChain} message ResponseInitChain message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseInitChain.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.consensusParams != null && Object.hasOwnProperty.call(message, "consensusParams")) + $root.tendermint.abci.ConsensusParams.encode(message.consensusParams, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.validators != null && message.validators.length) + for (var i = 0; i < message.validators.length; ++i) + $root.tendermint.abci.ValidatorUpdate.encode(message.validators[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.appHash != null && Object.hasOwnProperty.call(message, "appHash")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.appHash); + return writer; + }; + + /** + * Encodes the specified ResponseInitChain message, length delimited. Does not implicitly {@link tendermint.abci.ResponseInitChain.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.ResponseInitChain + * @static + * @param {tendermint.abci.IResponseInitChain} message ResponseInitChain message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseInitChain.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResponseInitChain message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.ResponseInitChain + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.ResponseInitChain} ResponseInitChain + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseInitChain.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.ResponseInitChain(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.consensusParams = $root.tendermint.abci.ConsensusParams.decode(reader, reader.uint32()); + break; + case 2: + if (!(message.validators && message.validators.length)) + message.validators = []; + message.validators.push($root.tendermint.abci.ValidatorUpdate.decode(reader, reader.uint32())); + break; + case 3: + message.appHash = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResponseInitChain message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.ResponseInitChain + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.ResponseInitChain} ResponseInitChain + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseInitChain.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResponseInitChain message. + * @function verify + * @memberof tendermint.abci.ResponseInitChain + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResponseInitChain.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.consensusParams != null && message.hasOwnProperty("consensusParams")) { + var error = $root.tendermint.abci.ConsensusParams.verify(message.consensusParams); + if (error) + return "consensusParams." + error; + } + if (message.validators != null && message.hasOwnProperty("validators")) { + if (!Array.isArray(message.validators)) + return "validators: array expected"; + for (var i = 0; i < message.validators.length; ++i) { + var error = $root.tendermint.abci.ValidatorUpdate.verify(message.validators[i]); + if (error) + return "validators." + error; + } + } + if (message.appHash != null && message.hasOwnProperty("appHash")) + if (!(message.appHash && typeof message.appHash.length === "number" || $util.isString(message.appHash))) + return "appHash: buffer expected"; + return null; + }; + + /** + * Creates a ResponseInitChain message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.ResponseInitChain + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.ResponseInitChain} ResponseInitChain + */ + ResponseInitChain.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.ResponseInitChain) + return object; + var message = new $root.tendermint.abci.ResponseInitChain(); + if (object.consensusParams != null) { + if (typeof object.consensusParams !== "object") + throw TypeError(".tendermint.abci.ResponseInitChain.consensusParams: object expected"); + message.consensusParams = $root.tendermint.abci.ConsensusParams.fromObject(object.consensusParams); + } + if (object.validators) { + if (!Array.isArray(object.validators)) + throw TypeError(".tendermint.abci.ResponseInitChain.validators: array expected"); + message.validators = []; + for (var i = 0; i < object.validators.length; ++i) { + if (typeof object.validators[i] !== "object") + throw TypeError(".tendermint.abci.ResponseInitChain.validators: object expected"); + message.validators[i] = $root.tendermint.abci.ValidatorUpdate.fromObject(object.validators[i]); + } + } + if (object.appHash != null) + if (typeof object.appHash === "string") + $util.base64.decode(object.appHash, message.appHash = $util.newBuffer($util.base64.length(object.appHash)), 0); + else if (object.appHash.length) + message.appHash = object.appHash; + return message; + }; + + /** + * Creates a plain object from a ResponseInitChain message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.ResponseInitChain + * @static + * @param {tendermint.abci.ResponseInitChain} message ResponseInitChain + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResponseInitChain.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.validators = []; + if (options.defaults) { + object.consensusParams = null; + if (options.bytes === String) + object.appHash = ""; + else { + object.appHash = []; + if (options.bytes !== Array) + object.appHash = $util.newBuffer(object.appHash); + } + } + if (message.consensusParams != null && message.hasOwnProperty("consensusParams")) + object.consensusParams = $root.tendermint.abci.ConsensusParams.toObject(message.consensusParams, options); + if (message.validators && message.validators.length) { + object.validators = []; + for (var j = 0; j < message.validators.length; ++j) + object.validators[j] = $root.tendermint.abci.ValidatorUpdate.toObject(message.validators[j], options); + } + if (message.appHash != null && message.hasOwnProperty("appHash")) + object.appHash = options.bytes === String ? $util.base64.encode(message.appHash, 0, message.appHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.appHash) : message.appHash; + return object; + }; + + /** + * Converts this ResponseInitChain to JSON. + * @function toJSON + * @memberof tendermint.abci.ResponseInitChain + * @instance + * @returns {Object.} JSON object + */ + ResponseInitChain.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ResponseInitChain; + })(abci.ResponseInitChain || {}); + + abci.ResponseQuery = (function(ResponseQuery) { + + /** + * Properties of a ResponseQuery. + * @memberof tendermint.abci + * @interface IResponseQuery + * @property {number|null} [code] ResponseQuery code + * @property {string|null} [log] ResponseQuery log + * @property {string|null} [info] ResponseQuery info + * @property {number|Long|null} [index] ResponseQuery index + * @property {Uint8Array|null} [key] ResponseQuery key + * @property {Uint8Array|null} [value] ResponseQuery value + * @property {tendermint.crypto.IProofOps|null} [proofOps] ResponseQuery proofOps + * @property {number|Long|null} [height] ResponseQuery height + * @property {string|null} [codespace] ResponseQuery codespace + */ + + /** + * Constructs a new ResponseQuery. + * @memberof tendermint.abci + * @classdesc Represents a ResponseQuery. + * @implements IResponseQuery + * @constructor + * @param {tendermint.abci.IResponseQuery=} [properties] Properties to set + */ + function ResponseQuery(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResponseQuery code. + * @member {number} code + * @memberof tendermint.abci.ResponseQuery + * @instance + */ + ResponseQuery.prototype.code = 0; + + /** + * ResponseQuery log. + * @member {string} log + * @memberof tendermint.abci.ResponseQuery + * @instance + */ + ResponseQuery.prototype.log = ""; + + /** + * ResponseQuery info. + * @member {string} info + * @memberof tendermint.abci.ResponseQuery + * @instance + */ + ResponseQuery.prototype.info = ""; + + /** + * ResponseQuery index. + * @member {number|Long} index + * @memberof tendermint.abci.ResponseQuery + * @instance + */ + ResponseQuery.prototype.index = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ResponseQuery key. + * @member {Uint8Array} key + * @memberof tendermint.abci.ResponseQuery + * @instance + */ + ResponseQuery.prototype.key = $util.newBuffer([]); + + /** + * ResponseQuery value. + * @member {Uint8Array} value + * @memberof tendermint.abci.ResponseQuery + * @instance + */ + ResponseQuery.prototype.value = $util.newBuffer([]); + + /** + * ResponseQuery proofOps. + * @member {tendermint.crypto.IProofOps|null|undefined} proofOps + * @memberof tendermint.abci.ResponseQuery + * @instance + */ + ResponseQuery.prototype.proofOps = null; + + /** + * ResponseQuery height. + * @member {number|Long} height + * @memberof tendermint.abci.ResponseQuery + * @instance + */ + ResponseQuery.prototype.height = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ResponseQuery codespace. + * @member {string} codespace + * @memberof tendermint.abci.ResponseQuery + * @instance + */ + ResponseQuery.prototype.codespace = ""; + + /** + * Creates a new ResponseQuery instance using the specified properties. + * @function create + * @memberof tendermint.abci.ResponseQuery + * @static + * @param {tendermint.abci.IResponseQuery=} [properties] Properties to set + * @returns {tendermint.abci.ResponseQuery} ResponseQuery instance + */ + ResponseQuery.create = function create(properties) { + return new ResponseQuery(properties); + }; + + /** + * Encodes the specified ResponseQuery message. Does not implicitly {@link tendermint.abci.ResponseQuery.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.ResponseQuery + * @static + * @param {tendermint.abci.IResponseQuery} message ResponseQuery message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseQuery.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.code != null && Object.hasOwnProperty.call(message, "code")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.code); + if (message.log != null && Object.hasOwnProperty.call(message, "log")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.log); + if (message.info != null && Object.hasOwnProperty.call(message, "info")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.info); + if (message.index != null && Object.hasOwnProperty.call(message, "index")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.index); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.key); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.value); + if (message.proofOps != null && Object.hasOwnProperty.call(message, "proofOps")) + $root.tendermint.crypto.ProofOps.encode(message.proofOps, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.height != null && Object.hasOwnProperty.call(message, "height")) + writer.uint32(/* id 9, wireType 0 =*/72).int64(message.height); + if (message.codespace != null && Object.hasOwnProperty.call(message, "codespace")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.codespace); + return writer; + }; + + /** + * Encodes the specified ResponseQuery message, length delimited. Does not implicitly {@link tendermint.abci.ResponseQuery.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.ResponseQuery + * @static + * @param {tendermint.abci.IResponseQuery} message ResponseQuery message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseQuery.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResponseQuery message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.ResponseQuery + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.ResponseQuery} ResponseQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseQuery.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.ResponseQuery(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.code = reader.uint32(); + break; + case 3: + message.log = reader.string(); + break; + case 4: + message.info = reader.string(); + break; + case 5: + message.index = reader.int64(); + break; + case 6: + message.key = reader.bytes(); + break; + case 7: + message.value = reader.bytes(); + break; + case 8: + message.proofOps = $root.tendermint.crypto.ProofOps.decode(reader, reader.uint32()); + break; + case 9: + message.height = reader.int64(); + break; + case 10: + message.codespace = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResponseQuery message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.ResponseQuery + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.ResponseQuery} ResponseQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseQuery.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResponseQuery message. + * @function verify + * @memberof tendermint.abci.ResponseQuery + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResponseQuery.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.code != null && message.hasOwnProperty("code")) + if (!$util.isInteger(message.code)) + return "code: integer expected"; + if (message.log != null && message.hasOwnProperty("log")) + if (!$util.isString(message.log)) + return "log: string expected"; + if (message.info != null && message.hasOwnProperty("info")) + if (!$util.isString(message.info)) + return "info: string expected"; + if (message.index != null && message.hasOwnProperty("index")) + if (!$util.isInteger(message.index) && !(message.index && $util.isInteger(message.index.low) && $util.isInteger(message.index.high))) + return "index: integer|Long expected"; + if (message.key != null && message.hasOwnProperty("key")) + if (!(message.key && typeof message.key.length === "number" || $util.isString(message.key))) + return "key: buffer expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; + if (message.proofOps != null && message.hasOwnProperty("proofOps")) { + var error = $root.tendermint.crypto.ProofOps.verify(message.proofOps); + if (error) + return "proofOps." + error; + } + if (message.height != null && message.hasOwnProperty("height")) + if (!$util.isInteger(message.height) && !(message.height && $util.isInteger(message.height.low) && $util.isInteger(message.height.high))) + return "height: integer|Long expected"; + if (message.codespace != null && message.hasOwnProperty("codespace")) + if (!$util.isString(message.codespace)) + return "codespace: string expected"; + return null; + }; + + /** + * Creates a ResponseQuery message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.ResponseQuery + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.ResponseQuery} ResponseQuery + */ + ResponseQuery.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.ResponseQuery) + return object; + var message = new $root.tendermint.abci.ResponseQuery(); + if (object.code != null) + message.code = object.code >>> 0; + if (object.log != null) + message.log = String(object.log); + if (object.info != null) + message.info = String(object.info); + if (object.index != null) + if ($util.Long) + (message.index = $util.Long.fromValue(object.index)).unsigned = false; + else if (typeof object.index === "string") + message.index = parseInt(object.index, 10); + else if (typeof object.index === "number") + message.index = object.index; + else if (typeof object.index === "object") + message.index = new $util.LongBits(object.index.low >>> 0, object.index.high >>> 0).toNumber(); + if (object.key != null) + if (typeof object.key === "string") + $util.base64.decode(object.key, message.key = $util.newBuffer($util.base64.length(object.key)), 0); + else if (object.key.length) + message.key = object.key; + if (object.value != null) + if (typeof object.value === "string") + $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); + else if (object.value.length) + message.value = object.value; + if (object.proofOps != null) { + if (typeof object.proofOps !== "object") + throw TypeError(".tendermint.abci.ResponseQuery.proofOps: object expected"); + message.proofOps = $root.tendermint.crypto.ProofOps.fromObject(object.proofOps); + } + if (object.height != null) + if ($util.Long) + (message.height = $util.Long.fromValue(object.height)).unsigned = false; + else if (typeof object.height === "string") + message.height = parseInt(object.height, 10); + else if (typeof object.height === "number") + message.height = object.height; + else if (typeof object.height === "object") + message.height = new $util.LongBits(object.height.low >>> 0, object.height.high >>> 0).toNumber(); + if (object.codespace != null) + message.codespace = String(object.codespace); + return message; + }; + + /** + * Creates a plain object from a ResponseQuery message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.ResponseQuery + * @static + * @param {tendermint.abci.ResponseQuery} message ResponseQuery + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResponseQuery.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.code = 0; + object.log = ""; + object.info = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.index = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.index = options.longs === String ? "0" : 0; + if (options.bytes === String) + object.key = ""; + else { + object.key = []; + if (options.bytes !== Array) + object.key = $util.newBuffer(object.key); + } + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + object.proofOps = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.height = options.longs === String ? "0" : 0; + object.codespace = ""; + } + if (message.code != null && message.hasOwnProperty("code")) + object.code = message.code; + if (message.log != null && message.hasOwnProperty("log")) + object.log = message.log; + if (message.info != null && message.hasOwnProperty("info")) + object.info = message.info; + if (message.index != null && message.hasOwnProperty("index")) + if (typeof message.index === "number") + object.index = options.longs === String ? String(message.index) : message.index; + else + object.index = options.longs === String ? $util.Long.prototype.toString.call(message.index) : options.longs === Number ? new $util.LongBits(message.index.low >>> 0, message.index.high >>> 0).toNumber() : message.index; + if (message.key != null && message.hasOwnProperty("key")) + object.key = options.bytes === String ? $util.base64.encode(message.key, 0, message.key.length) : options.bytes === Array ? Array.prototype.slice.call(message.key) : message.key; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + if (message.proofOps != null && message.hasOwnProperty("proofOps")) + object.proofOps = $root.tendermint.crypto.ProofOps.toObject(message.proofOps, options); + if (message.height != null && message.hasOwnProperty("height")) + if (typeof message.height === "number") + object.height = options.longs === String ? String(message.height) : message.height; + else + object.height = options.longs === String ? $util.Long.prototype.toString.call(message.height) : options.longs === Number ? new $util.LongBits(message.height.low >>> 0, message.height.high >>> 0).toNumber() : message.height; + if (message.codespace != null && message.hasOwnProperty("codespace")) + object.codespace = message.codespace; + return object; + }; + + /** + * Converts this ResponseQuery to JSON. + * @function toJSON + * @memberof tendermint.abci.ResponseQuery + * @instance + * @returns {Object.} JSON object + */ + ResponseQuery.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ResponseQuery; + })(abci.ResponseQuery || {}); + + abci.ResponseBeginBlock = (function(ResponseBeginBlock) { + + /** + * Properties of a ResponseBeginBlock. + * @memberof tendermint.abci + * @interface IResponseBeginBlock + * @property {Array.|null} [events] ResponseBeginBlock events + */ + + /** + * Constructs a new ResponseBeginBlock. + * @memberof tendermint.abci + * @classdesc Represents a ResponseBeginBlock. + * @implements IResponseBeginBlock + * @constructor + * @param {tendermint.abci.IResponseBeginBlock=} [properties] Properties to set + */ + function ResponseBeginBlock(properties) { + this.events = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResponseBeginBlock events. + * @member {Array.} events + * @memberof tendermint.abci.ResponseBeginBlock + * @instance + */ + ResponseBeginBlock.prototype.events = $util.emptyArray; + + /** + * Creates a new ResponseBeginBlock instance using the specified properties. + * @function create + * @memberof tendermint.abci.ResponseBeginBlock + * @static + * @param {tendermint.abci.IResponseBeginBlock=} [properties] Properties to set + * @returns {tendermint.abci.ResponseBeginBlock} ResponseBeginBlock instance + */ + ResponseBeginBlock.create = function create(properties) { + return new ResponseBeginBlock(properties); + }; + + /** + * Encodes the specified ResponseBeginBlock message. Does not implicitly {@link tendermint.abci.ResponseBeginBlock.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.ResponseBeginBlock + * @static + * @param {tendermint.abci.IResponseBeginBlock} message ResponseBeginBlock message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseBeginBlock.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.events != null && message.events.length) + for (var i = 0; i < message.events.length; ++i) + $root.tendermint.abci.Event.encode(message.events[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ResponseBeginBlock message, length delimited. Does not implicitly {@link tendermint.abci.ResponseBeginBlock.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.ResponseBeginBlock + * @static + * @param {tendermint.abci.IResponseBeginBlock} message ResponseBeginBlock message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseBeginBlock.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResponseBeginBlock message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.ResponseBeginBlock + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.ResponseBeginBlock} ResponseBeginBlock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseBeginBlock.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.ResponseBeginBlock(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.events && message.events.length)) + message.events = []; + message.events.push($root.tendermint.abci.Event.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResponseBeginBlock message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.ResponseBeginBlock + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.ResponseBeginBlock} ResponseBeginBlock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseBeginBlock.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResponseBeginBlock message. + * @function verify + * @memberof tendermint.abci.ResponseBeginBlock + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResponseBeginBlock.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.events != null && message.hasOwnProperty("events")) { + if (!Array.isArray(message.events)) + return "events: array expected"; + for (var i = 0; i < message.events.length; ++i) { + var error = $root.tendermint.abci.Event.verify(message.events[i]); + if (error) + return "events." + error; + } + } + return null; + }; + + /** + * Creates a ResponseBeginBlock message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.ResponseBeginBlock + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.ResponseBeginBlock} ResponseBeginBlock + */ + ResponseBeginBlock.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.ResponseBeginBlock) + return object; + var message = new $root.tendermint.abci.ResponseBeginBlock(); + if (object.events) { + if (!Array.isArray(object.events)) + throw TypeError(".tendermint.abci.ResponseBeginBlock.events: array expected"); + message.events = []; + for (var i = 0; i < object.events.length; ++i) { + if (typeof object.events[i] !== "object") + throw TypeError(".tendermint.abci.ResponseBeginBlock.events: object expected"); + message.events[i] = $root.tendermint.abci.Event.fromObject(object.events[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ResponseBeginBlock message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.ResponseBeginBlock + * @static + * @param {tendermint.abci.ResponseBeginBlock} message ResponseBeginBlock + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResponseBeginBlock.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.events = []; + if (message.events && message.events.length) { + object.events = []; + for (var j = 0; j < message.events.length; ++j) + object.events[j] = $root.tendermint.abci.Event.toObject(message.events[j], options); + } + return object; + }; + + /** + * Converts this ResponseBeginBlock to JSON. + * @function toJSON + * @memberof tendermint.abci.ResponseBeginBlock + * @instance + * @returns {Object.} JSON object + */ + ResponseBeginBlock.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ResponseBeginBlock; + })(abci.ResponseBeginBlock || {}); + + abci.ResponseCheckTx = (function(ResponseCheckTx) { + + /** + * Properties of a ResponseCheckTx. + * @memberof tendermint.abci + * @interface IResponseCheckTx + * @property {number|null} [code] ResponseCheckTx code + * @property {Uint8Array|null} [data] ResponseCheckTx data + * @property {string|null} [log] ResponseCheckTx log + * @property {string|null} [info] ResponseCheckTx info + * @property {number|Long|null} [gasWanted] ResponseCheckTx gasWanted + * @property {number|Long|null} [gasUsed] ResponseCheckTx gasUsed + * @property {Array.|null} [events] ResponseCheckTx events + * @property {string|null} [codespace] ResponseCheckTx codespace + */ + + /** + * Constructs a new ResponseCheckTx. + * @memberof tendermint.abci + * @classdesc Represents a ResponseCheckTx. + * @implements IResponseCheckTx + * @constructor + * @param {tendermint.abci.IResponseCheckTx=} [properties] Properties to set + */ + function ResponseCheckTx(properties) { + this.events = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResponseCheckTx code. + * @member {number} code + * @memberof tendermint.abci.ResponseCheckTx + * @instance + */ + ResponseCheckTx.prototype.code = 0; + + /** + * ResponseCheckTx data. + * @member {Uint8Array} data + * @memberof tendermint.abci.ResponseCheckTx + * @instance + */ + ResponseCheckTx.prototype.data = $util.newBuffer([]); + + /** + * ResponseCheckTx log. + * @member {string} log + * @memberof tendermint.abci.ResponseCheckTx + * @instance + */ + ResponseCheckTx.prototype.log = ""; + + /** + * ResponseCheckTx info. + * @member {string} info + * @memberof tendermint.abci.ResponseCheckTx + * @instance + */ + ResponseCheckTx.prototype.info = ""; + + /** + * ResponseCheckTx gasWanted. + * @member {number|Long} gasWanted + * @memberof tendermint.abci.ResponseCheckTx + * @instance + */ + ResponseCheckTx.prototype.gasWanted = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ResponseCheckTx gasUsed. + * @member {number|Long} gasUsed + * @memberof tendermint.abci.ResponseCheckTx + * @instance + */ + ResponseCheckTx.prototype.gasUsed = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ResponseCheckTx events. + * @member {Array.} events + * @memberof tendermint.abci.ResponseCheckTx + * @instance + */ + ResponseCheckTx.prototype.events = $util.emptyArray; + + /** + * ResponseCheckTx codespace. + * @member {string} codespace + * @memberof tendermint.abci.ResponseCheckTx + * @instance + */ + ResponseCheckTx.prototype.codespace = ""; + + /** + * Creates a new ResponseCheckTx instance using the specified properties. + * @function create + * @memberof tendermint.abci.ResponseCheckTx + * @static + * @param {tendermint.abci.IResponseCheckTx=} [properties] Properties to set + * @returns {tendermint.abci.ResponseCheckTx} ResponseCheckTx instance + */ + ResponseCheckTx.create = function create(properties) { + return new ResponseCheckTx(properties); + }; + + /** + * Encodes the specified ResponseCheckTx message. Does not implicitly {@link tendermint.abci.ResponseCheckTx.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.ResponseCheckTx + * @static + * @param {tendermint.abci.IResponseCheckTx} message ResponseCheckTx message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseCheckTx.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.code != null && Object.hasOwnProperty.call(message, "code")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.code); + if (message.data != null && Object.hasOwnProperty.call(message, "data")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.data); + if (message.log != null && Object.hasOwnProperty.call(message, "log")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.log); + if (message.info != null && Object.hasOwnProperty.call(message, "info")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.info); + if (message.gasWanted != null && Object.hasOwnProperty.call(message, "gasWanted")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.gasWanted); + if (message.gasUsed != null && Object.hasOwnProperty.call(message, "gasUsed")) + writer.uint32(/* id 6, wireType 0 =*/48).int64(message.gasUsed); + if (message.events != null && message.events.length) + for (var i = 0; i < message.events.length; ++i) + $root.tendermint.abci.Event.encode(message.events[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.codespace != null && Object.hasOwnProperty.call(message, "codespace")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.codespace); + return writer; + }; + + /** + * Encodes the specified ResponseCheckTx message, length delimited. Does not implicitly {@link tendermint.abci.ResponseCheckTx.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.ResponseCheckTx + * @static + * @param {tendermint.abci.IResponseCheckTx} message ResponseCheckTx message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseCheckTx.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResponseCheckTx message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.ResponseCheckTx + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.ResponseCheckTx} ResponseCheckTx + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseCheckTx.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.ResponseCheckTx(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.code = reader.uint32(); + break; + case 2: + message.data = reader.bytes(); + break; + case 3: + message.log = reader.string(); + break; + case 4: + message.info = reader.string(); + break; + case 5: + message.gasWanted = reader.int64(); + break; + case 6: + message.gasUsed = reader.int64(); + break; + case 7: + if (!(message.events && message.events.length)) + message.events = []; + message.events.push($root.tendermint.abci.Event.decode(reader, reader.uint32())); + break; + case 8: + message.codespace = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResponseCheckTx message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.ResponseCheckTx + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.ResponseCheckTx} ResponseCheckTx + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseCheckTx.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResponseCheckTx message. + * @function verify + * @memberof tendermint.abci.ResponseCheckTx + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResponseCheckTx.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.code != null && message.hasOwnProperty("code")) + if (!$util.isInteger(message.code)) + return "code: integer expected"; + if (message.data != null && message.hasOwnProperty("data")) + if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) + return "data: buffer expected"; + if (message.log != null && message.hasOwnProperty("log")) + if (!$util.isString(message.log)) + return "log: string expected"; + if (message.info != null && message.hasOwnProperty("info")) + if (!$util.isString(message.info)) + return "info: string expected"; + if (message.gasWanted != null && message.hasOwnProperty("gasWanted")) + if (!$util.isInteger(message.gasWanted) && !(message.gasWanted && $util.isInteger(message.gasWanted.low) && $util.isInteger(message.gasWanted.high))) + return "gasWanted: integer|Long expected"; + if (message.gasUsed != null && message.hasOwnProperty("gasUsed")) + if (!$util.isInteger(message.gasUsed) && !(message.gasUsed && $util.isInteger(message.gasUsed.low) && $util.isInteger(message.gasUsed.high))) + return "gasUsed: integer|Long expected"; + if (message.events != null && message.hasOwnProperty("events")) { + if (!Array.isArray(message.events)) + return "events: array expected"; + for (var i = 0; i < message.events.length; ++i) { + var error = $root.tendermint.abci.Event.verify(message.events[i]); + if (error) + return "events." + error; + } + } + if (message.codespace != null && message.hasOwnProperty("codespace")) + if (!$util.isString(message.codespace)) + return "codespace: string expected"; + return null; + }; + + /** + * Creates a ResponseCheckTx message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.ResponseCheckTx + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.ResponseCheckTx} ResponseCheckTx + */ + ResponseCheckTx.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.ResponseCheckTx) + return object; + var message = new $root.tendermint.abci.ResponseCheckTx(); + if (object.code != null) + message.code = object.code >>> 0; + if (object.data != null) + if (typeof object.data === "string") + $util.base64.decode(object.data, message.data = $util.newBuffer($util.base64.length(object.data)), 0); + else if (object.data.length) + message.data = object.data; + if (object.log != null) + message.log = String(object.log); + if (object.info != null) + message.info = String(object.info); + if (object.gasWanted != null) + if ($util.Long) + (message.gasWanted = $util.Long.fromValue(object.gasWanted)).unsigned = false; + else if (typeof object.gasWanted === "string") + message.gasWanted = parseInt(object.gasWanted, 10); + else if (typeof object.gasWanted === "number") + message.gasWanted = object.gasWanted; + else if (typeof object.gasWanted === "object") + message.gasWanted = new $util.LongBits(object.gasWanted.low >>> 0, object.gasWanted.high >>> 0).toNumber(); + if (object.gasUsed != null) + if ($util.Long) + (message.gasUsed = $util.Long.fromValue(object.gasUsed)).unsigned = false; + else if (typeof object.gasUsed === "string") + message.gasUsed = parseInt(object.gasUsed, 10); + else if (typeof object.gasUsed === "number") + message.gasUsed = object.gasUsed; + else if (typeof object.gasUsed === "object") + message.gasUsed = new $util.LongBits(object.gasUsed.low >>> 0, object.gasUsed.high >>> 0).toNumber(); + if (object.events) { + if (!Array.isArray(object.events)) + throw TypeError(".tendermint.abci.ResponseCheckTx.events: array expected"); + message.events = []; + for (var i = 0; i < object.events.length; ++i) { + if (typeof object.events[i] !== "object") + throw TypeError(".tendermint.abci.ResponseCheckTx.events: object expected"); + message.events[i] = $root.tendermint.abci.Event.fromObject(object.events[i]); + } + } + if (object.codespace != null) + message.codespace = String(object.codespace); + return message; + }; + + /** + * Creates a plain object from a ResponseCheckTx message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.ResponseCheckTx + * @static + * @param {tendermint.abci.ResponseCheckTx} message ResponseCheckTx + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResponseCheckTx.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.events = []; + if (options.defaults) { + object.code = 0; + if (options.bytes === String) + object.data = ""; + else { + object.data = []; + if (options.bytes !== Array) + object.data = $util.newBuffer(object.data); + } + object.log = ""; + object.info = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.gasWanted = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.gasWanted = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.gasUsed = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.gasUsed = options.longs === String ? "0" : 0; + object.codespace = ""; + } + if (message.code != null && message.hasOwnProperty("code")) + object.code = message.code; + if (message.data != null && message.hasOwnProperty("data")) + object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; + if (message.log != null && message.hasOwnProperty("log")) + object.log = message.log; + if (message.info != null && message.hasOwnProperty("info")) + object.info = message.info; + if (message.gasWanted != null && message.hasOwnProperty("gasWanted")) + if (typeof message.gasWanted === "number") + object.gasWanted = options.longs === String ? String(message.gasWanted) : message.gasWanted; + else + object.gasWanted = options.longs === String ? $util.Long.prototype.toString.call(message.gasWanted) : options.longs === Number ? new $util.LongBits(message.gasWanted.low >>> 0, message.gasWanted.high >>> 0).toNumber() : message.gasWanted; + if (message.gasUsed != null && message.hasOwnProperty("gasUsed")) + if (typeof message.gasUsed === "number") + object.gasUsed = options.longs === String ? String(message.gasUsed) : message.gasUsed; + else + object.gasUsed = options.longs === String ? $util.Long.prototype.toString.call(message.gasUsed) : options.longs === Number ? new $util.LongBits(message.gasUsed.low >>> 0, message.gasUsed.high >>> 0).toNumber() : message.gasUsed; + if (message.events && message.events.length) { + object.events = []; + for (var j = 0; j < message.events.length; ++j) + object.events[j] = $root.tendermint.abci.Event.toObject(message.events[j], options); + } + if (message.codespace != null && message.hasOwnProperty("codespace")) + object.codespace = message.codespace; + return object; + }; + + /** + * Converts this ResponseCheckTx to JSON. + * @function toJSON + * @memberof tendermint.abci.ResponseCheckTx + * @instance + * @returns {Object.} JSON object + */ + ResponseCheckTx.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ResponseCheckTx; + })(abci.ResponseCheckTx || {}); + + abci.ResponseDeliverTx = (function(ResponseDeliverTx) { + + /** + * Properties of a ResponseDeliverTx. + * @memberof tendermint.abci + * @interface IResponseDeliverTx + * @property {number|null} [code] ResponseDeliverTx code + * @property {Uint8Array|null} [data] ResponseDeliverTx data + * @property {string|null} [log] ResponseDeliverTx log + * @property {string|null} [info] ResponseDeliverTx info + * @property {number|Long|null} [gasWanted] ResponseDeliverTx gasWanted + * @property {number|Long|null} [gasUsed] ResponseDeliverTx gasUsed + * @property {Array.|null} [events] ResponseDeliverTx events + * @property {string|null} [codespace] ResponseDeliverTx codespace + */ + + /** + * Constructs a new ResponseDeliverTx. + * @memberof tendermint.abci + * @classdesc Represents a ResponseDeliverTx. + * @implements IResponseDeliverTx + * @constructor + * @param {tendermint.abci.IResponseDeliverTx=} [properties] Properties to set + */ + function ResponseDeliverTx(properties) { + this.events = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResponseDeliverTx code. + * @member {number} code + * @memberof tendermint.abci.ResponseDeliverTx + * @instance + */ + ResponseDeliverTx.prototype.code = 0; + + /** + * ResponseDeliverTx data. + * @member {Uint8Array} data + * @memberof tendermint.abci.ResponseDeliverTx + * @instance + */ + ResponseDeliverTx.prototype.data = $util.newBuffer([]); + + /** + * ResponseDeliverTx log. + * @member {string} log + * @memberof tendermint.abci.ResponseDeliverTx + * @instance + */ + ResponseDeliverTx.prototype.log = ""; + + /** + * ResponseDeliverTx info. + * @member {string} info + * @memberof tendermint.abci.ResponseDeliverTx + * @instance + */ + ResponseDeliverTx.prototype.info = ""; + + /** + * ResponseDeliverTx gasWanted. + * @member {number|Long} gasWanted + * @memberof tendermint.abci.ResponseDeliverTx + * @instance + */ + ResponseDeliverTx.prototype.gasWanted = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ResponseDeliverTx gasUsed. + * @member {number|Long} gasUsed + * @memberof tendermint.abci.ResponseDeliverTx + * @instance + */ + ResponseDeliverTx.prototype.gasUsed = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ResponseDeliverTx events. + * @member {Array.} events + * @memberof tendermint.abci.ResponseDeliverTx + * @instance + */ + ResponseDeliverTx.prototype.events = $util.emptyArray; + + /** + * ResponseDeliverTx codespace. + * @member {string} codespace + * @memberof tendermint.abci.ResponseDeliverTx + * @instance + */ + ResponseDeliverTx.prototype.codespace = ""; + + /** + * Creates a new ResponseDeliverTx instance using the specified properties. + * @function create + * @memberof tendermint.abci.ResponseDeliverTx + * @static + * @param {tendermint.abci.IResponseDeliverTx=} [properties] Properties to set + * @returns {tendermint.abci.ResponseDeliverTx} ResponseDeliverTx instance + */ + ResponseDeliverTx.create = function create(properties) { + return new ResponseDeliverTx(properties); + }; + + /** + * Encodes the specified ResponseDeliverTx message. Does not implicitly {@link tendermint.abci.ResponseDeliverTx.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.ResponseDeliverTx + * @static + * @param {tendermint.abci.IResponseDeliverTx} message ResponseDeliverTx message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseDeliverTx.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.code != null && Object.hasOwnProperty.call(message, "code")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.code); + if (message.data != null && Object.hasOwnProperty.call(message, "data")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.data); + if (message.log != null && Object.hasOwnProperty.call(message, "log")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.log); + if (message.info != null && Object.hasOwnProperty.call(message, "info")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.info); + if (message.gasWanted != null && Object.hasOwnProperty.call(message, "gasWanted")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.gasWanted); + if (message.gasUsed != null && Object.hasOwnProperty.call(message, "gasUsed")) + writer.uint32(/* id 6, wireType 0 =*/48).int64(message.gasUsed); + if (message.events != null && message.events.length) + for (var i = 0; i < message.events.length; ++i) + $root.tendermint.abci.Event.encode(message.events[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.codespace != null && Object.hasOwnProperty.call(message, "codespace")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.codespace); + return writer; + }; + + /** + * Encodes the specified ResponseDeliverTx message, length delimited. Does not implicitly {@link tendermint.abci.ResponseDeliverTx.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.ResponseDeliverTx + * @static + * @param {tendermint.abci.IResponseDeliverTx} message ResponseDeliverTx message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseDeliverTx.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResponseDeliverTx message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.ResponseDeliverTx + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.ResponseDeliverTx} ResponseDeliverTx + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseDeliverTx.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.ResponseDeliverTx(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.code = reader.uint32(); + break; + case 2: + message.data = reader.bytes(); + break; + case 3: + message.log = reader.string(); + break; + case 4: + message.info = reader.string(); + break; + case 5: + message.gasWanted = reader.int64(); + break; + case 6: + message.gasUsed = reader.int64(); + break; + case 7: + if (!(message.events && message.events.length)) + message.events = []; + message.events.push($root.tendermint.abci.Event.decode(reader, reader.uint32())); + break; + case 8: + message.codespace = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResponseDeliverTx message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.ResponseDeliverTx + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.ResponseDeliverTx} ResponseDeliverTx + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseDeliverTx.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResponseDeliverTx message. + * @function verify + * @memberof tendermint.abci.ResponseDeliverTx + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResponseDeliverTx.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.code != null && message.hasOwnProperty("code")) + if (!$util.isInteger(message.code)) + return "code: integer expected"; + if (message.data != null && message.hasOwnProperty("data")) + if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) + return "data: buffer expected"; + if (message.log != null && message.hasOwnProperty("log")) + if (!$util.isString(message.log)) + return "log: string expected"; + if (message.info != null && message.hasOwnProperty("info")) + if (!$util.isString(message.info)) + return "info: string expected"; + if (message.gasWanted != null && message.hasOwnProperty("gasWanted")) + if (!$util.isInteger(message.gasWanted) && !(message.gasWanted && $util.isInteger(message.gasWanted.low) && $util.isInteger(message.gasWanted.high))) + return "gasWanted: integer|Long expected"; + if (message.gasUsed != null && message.hasOwnProperty("gasUsed")) + if (!$util.isInteger(message.gasUsed) && !(message.gasUsed && $util.isInteger(message.gasUsed.low) && $util.isInteger(message.gasUsed.high))) + return "gasUsed: integer|Long expected"; + if (message.events != null && message.hasOwnProperty("events")) { + if (!Array.isArray(message.events)) + return "events: array expected"; + for (var i = 0; i < message.events.length; ++i) { + var error = $root.tendermint.abci.Event.verify(message.events[i]); + if (error) + return "events." + error; + } + } + if (message.codespace != null && message.hasOwnProperty("codespace")) + if (!$util.isString(message.codespace)) + return "codespace: string expected"; + return null; + }; + + /** + * Creates a ResponseDeliverTx message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.ResponseDeliverTx + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.ResponseDeliverTx} ResponseDeliverTx + */ + ResponseDeliverTx.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.ResponseDeliverTx) + return object; + var message = new $root.tendermint.abci.ResponseDeliverTx(); + if (object.code != null) + message.code = object.code >>> 0; + if (object.data != null) + if (typeof object.data === "string") + $util.base64.decode(object.data, message.data = $util.newBuffer($util.base64.length(object.data)), 0); + else if (object.data.length) + message.data = object.data; + if (object.log != null) + message.log = String(object.log); + if (object.info != null) + message.info = String(object.info); + if (object.gasWanted != null) + if ($util.Long) + (message.gasWanted = $util.Long.fromValue(object.gasWanted)).unsigned = false; + else if (typeof object.gasWanted === "string") + message.gasWanted = parseInt(object.gasWanted, 10); + else if (typeof object.gasWanted === "number") + message.gasWanted = object.gasWanted; + else if (typeof object.gasWanted === "object") + message.gasWanted = new $util.LongBits(object.gasWanted.low >>> 0, object.gasWanted.high >>> 0).toNumber(); + if (object.gasUsed != null) + if ($util.Long) + (message.gasUsed = $util.Long.fromValue(object.gasUsed)).unsigned = false; + else if (typeof object.gasUsed === "string") + message.gasUsed = parseInt(object.gasUsed, 10); + else if (typeof object.gasUsed === "number") + message.gasUsed = object.gasUsed; + else if (typeof object.gasUsed === "object") + message.gasUsed = new $util.LongBits(object.gasUsed.low >>> 0, object.gasUsed.high >>> 0).toNumber(); + if (object.events) { + if (!Array.isArray(object.events)) + throw TypeError(".tendermint.abci.ResponseDeliverTx.events: array expected"); + message.events = []; + for (var i = 0; i < object.events.length; ++i) { + if (typeof object.events[i] !== "object") + throw TypeError(".tendermint.abci.ResponseDeliverTx.events: object expected"); + message.events[i] = $root.tendermint.abci.Event.fromObject(object.events[i]); + } + } + if (object.codespace != null) + message.codespace = String(object.codespace); + return message; + }; + + /** + * Creates a plain object from a ResponseDeliverTx message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.ResponseDeliverTx + * @static + * @param {tendermint.abci.ResponseDeliverTx} message ResponseDeliverTx + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResponseDeliverTx.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.events = []; + if (options.defaults) { + object.code = 0; + if (options.bytes === String) + object.data = ""; + else { + object.data = []; + if (options.bytes !== Array) + object.data = $util.newBuffer(object.data); + } + object.log = ""; + object.info = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.gasWanted = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.gasWanted = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.gasUsed = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.gasUsed = options.longs === String ? "0" : 0; + object.codespace = ""; + } + if (message.code != null && message.hasOwnProperty("code")) + object.code = message.code; + if (message.data != null && message.hasOwnProperty("data")) + object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; + if (message.log != null && message.hasOwnProperty("log")) + object.log = message.log; + if (message.info != null && message.hasOwnProperty("info")) + object.info = message.info; + if (message.gasWanted != null && message.hasOwnProperty("gasWanted")) + if (typeof message.gasWanted === "number") + object.gasWanted = options.longs === String ? String(message.gasWanted) : message.gasWanted; + else + object.gasWanted = options.longs === String ? $util.Long.prototype.toString.call(message.gasWanted) : options.longs === Number ? new $util.LongBits(message.gasWanted.low >>> 0, message.gasWanted.high >>> 0).toNumber() : message.gasWanted; + if (message.gasUsed != null && message.hasOwnProperty("gasUsed")) + if (typeof message.gasUsed === "number") + object.gasUsed = options.longs === String ? String(message.gasUsed) : message.gasUsed; + else + object.gasUsed = options.longs === String ? $util.Long.prototype.toString.call(message.gasUsed) : options.longs === Number ? new $util.LongBits(message.gasUsed.low >>> 0, message.gasUsed.high >>> 0).toNumber() : message.gasUsed; + if (message.events && message.events.length) { + object.events = []; + for (var j = 0; j < message.events.length; ++j) + object.events[j] = $root.tendermint.abci.Event.toObject(message.events[j], options); + } + if (message.codespace != null && message.hasOwnProperty("codespace")) + object.codespace = message.codespace; + return object; + }; + + /** + * Converts this ResponseDeliverTx to JSON. + * @function toJSON + * @memberof tendermint.abci.ResponseDeliverTx + * @instance + * @returns {Object.} JSON object + */ + ResponseDeliverTx.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ResponseDeliverTx; + })(abci.ResponseDeliverTx || {}); + + abci.ResponseEndBlock = (function(ResponseEndBlock) { + + /** + * Properties of a ResponseEndBlock. + * @memberof tendermint.abci + * @interface IResponseEndBlock + * @property {Array.|null} [validatorUpdates] ResponseEndBlock validatorUpdates + * @property {tendermint.abci.IConsensusParams|null} [consensusParamUpdates] ResponseEndBlock consensusParamUpdates + * @property {Array.|null} [events] ResponseEndBlock events + */ + + /** + * Constructs a new ResponseEndBlock. + * @memberof tendermint.abci + * @classdesc Represents a ResponseEndBlock. + * @implements IResponseEndBlock + * @constructor + * @param {tendermint.abci.IResponseEndBlock=} [properties] Properties to set + */ + function ResponseEndBlock(properties) { + this.validatorUpdates = []; + this.events = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResponseEndBlock validatorUpdates. + * @member {Array.} validatorUpdates + * @memberof tendermint.abci.ResponseEndBlock + * @instance + */ + ResponseEndBlock.prototype.validatorUpdates = $util.emptyArray; + + /** + * ResponseEndBlock consensusParamUpdates. + * @member {tendermint.abci.IConsensusParams|null|undefined} consensusParamUpdates + * @memberof tendermint.abci.ResponseEndBlock + * @instance + */ + ResponseEndBlock.prototype.consensusParamUpdates = null; + + /** + * ResponseEndBlock events. + * @member {Array.} events + * @memberof tendermint.abci.ResponseEndBlock + * @instance + */ + ResponseEndBlock.prototype.events = $util.emptyArray; + + /** + * Creates a new ResponseEndBlock instance using the specified properties. + * @function create + * @memberof tendermint.abci.ResponseEndBlock + * @static + * @param {tendermint.abci.IResponseEndBlock=} [properties] Properties to set + * @returns {tendermint.abci.ResponseEndBlock} ResponseEndBlock instance + */ + ResponseEndBlock.create = function create(properties) { + return new ResponseEndBlock(properties); + }; + + /** + * Encodes the specified ResponseEndBlock message. Does not implicitly {@link tendermint.abci.ResponseEndBlock.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.ResponseEndBlock + * @static + * @param {tendermint.abci.IResponseEndBlock} message ResponseEndBlock message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseEndBlock.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.validatorUpdates != null && message.validatorUpdates.length) + for (var i = 0; i < message.validatorUpdates.length; ++i) + $root.tendermint.abci.ValidatorUpdate.encode(message.validatorUpdates[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.consensusParamUpdates != null && Object.hasOwnProperty.call(message, "consensusParamUpdates")) + $root.tendermint.abci.ConsensusParams.encode(message.consensusParamUpdates, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.events != null && message.events.length) + for (var i = 0; i < message.events.length; ++i) + $root.tendermint.abci.Event.encode(message.events[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ResponseEndBlock message, length delimited. Does not implicitly {@link tendermint.abci.ResponseEndBlock.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.ResponseEndBlock + * @static + * @param {tendermint.abci.IResponseEndBlock} message ResponseEndBlock message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseEndBlock.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResponseEndBlock message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.ResponseEndBlock + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.ResponseEndBlock} ResponseEndBlock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseEndBlock.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.ResponseEndBlock(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.validatorUpdates && message.validatorUpdates.length)) + message.validatorUpdates = []; + message.validatorUpdates.push($root.tendermint.abci.ValidatorUpdate.decode(reader, reader.uint32())); + break; + case 2: + message.consensusParamUpdates = $root.tendermint.abci.ConsensusParams.decode(reader, reader.uint32()); + break; + case 3: + if (!(message.events && message.events.length)) + message.events = []; + message.events.push($root.tendermint.abci.Event.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResponseEndBlock message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.ResponseEndBlock + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.ResponseEndBlock} ResponseEndBlock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseEndBlock.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResponseEndBlock message. + * @function verify + * @memberof tendermint.abci.ResponseEndBlock + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResponseEndBlock.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.validatorUpdates != null && message.hasOwnProperty("validatorUpdates")) { + if (!Array.isArray(message.validatorUpdates)) + return "validatorUpdates: array expected"; + for (var i = 0; i < message.validatorUpdates.length; ++i) { + var error = $root.tendermint.abci.ValidatorUpdate.verify(message.validatorUpdates[i]); + if (error) + return "validatorUpdates." + error; + } + } + if (message.consensusParamUpdates != null && message.hasOwnProperty("consensusParamUpdates")) { + var error = $root.tendermint.abci.ConsensusParams.verify(message.consensusParamUpdates); + if (error) + return "consensusParamUpdates." + error; + } + if (message.events != null && message.hasOwnProperty("events")) { + if (!Array.isArray(message.events)) + return "events: array expected"; + for (var i = 0; i < message.events.length; ++i) { + var error = $root.tendermint.abci.Event.verify(message.events[i]); + if (error) + return "events." + error; + } + } + return null; + }; + + /** + * Creates a ResponseEndBlock message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.ResponseEndBlock + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.ResponseEndBlock} ResponseEndBlock + */ + ResponseEndBlock.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.ResponseEndBlock) + return object; + var message = new $root.tendermint.abci.ResponseEndBlock(); + if (object.validatorUpdates) { + if (!Array.isArray(object.validatorUpdates)) + throw TypeError(".tendermint.abci.ResponseEndBlock.validatorUpdates: array expected"); + message.validatorUpdates = []; + for (var i = 0; i < object.validatorUpdates.length; ++i) { + if (typeof object.validatorUpdates[i] !== "object") + throw TypeError(".tendermint.abci.ResponseEndBlock.validatorUpdates: object expected"); + message.validatorUpdates[i] = $root.tendermint.abci.ValidatorUpdate.fromObject(object.validatorUpdates[i]); + } + } + if (object.consensusParamUpdates != null) { + if (typeof object.consensusParamUpdates !== "object") + throw TypeError(".tendermint.abci.ResponseEndBlock.consensusParamUpdates: object expected"); + message.consensusParamUpdates = $root.tendermint.abci.ConsensusParams.fromObject(object.consensusParamUpdates); + } + if (object.events) { + if (!Array.isArray(object.events)) + throw TypeError(".tendermint.abci.ResponseEndBlock.events: array expected"); + message.events = []; + for (var i = 0; i < object.events.length; ++i) { + if (typeof object.events[i] !== "object") + throw TypeError(".tendermint.abci.ResponseEndBlock.events: object expected"); + message.events[i] = $root.tendermint.abci.Event.fromObject(object.events[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ResponseEndBlock message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.ResponseEndBlock + * @static + * @param {tendermint.abci.ResponseEndBlock} message ResponseEndBlock + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResponseEndBlock.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.validatorUpdates = []; + object.events = []; + } + if (options.defaults) + object.consensusParamUpdates = null; + if (message.validatorUpdates && message.validatorUpdates.length) { + object.validatorUpdates = []; + for (var j = 0; j < message.validatorUpdates.length; ++j) + object.validatorUpdates[j] = $root.tendermint.abci.ValidatorUpdate.toObject(message.validatorUpdates[j], options); + } + if (message.consensusParamUpdates != null && message.hasOwnProperty("consensusParamUpdates")) + object.consensusParamUpdates = $root.tendermint.abci.ConsensusParams.toObject(message.consensusParamUpdates, options); + if (message.events && message.events.length) { + object.events = []; + for (var j = 0; j < message.events.length; ++j) + object.events[j] = $root.tendermint.abci.Event.toObject(message.events[j], options); + } + return object; + }; + + /** + * Converts this ResponseEndBlock to JSON. + * @function toJSON + * @memberof tendermint.abci.ResponseEndBlock + * @instance + * @returns {Object.} JSON object + */ + ResponseEndBlock.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ResponseEndBlock; + })(abci.ResponseEndBlock || {}); + + abci.ResponseCommit = (function(ResponseCommit) { + + /** + * Properties of a ResponseCommit. + * @memberof tendermint.abci + * @interface IResponseCommit + * @property {Uint8Array|null} [data] ResponseCommit data + * @property {number|Long|null} [retainHeight] ResponseCommit retainHeight + */ + + /** + * Constructs a new ResponseCommit. + * @memberof tendermint.abci + * @classdesc Represents a ResponseCommit. + * @implements IResponseCommit + * @constructor + * @param {tendermint.abci.IResponseCommit=} [properties] Properties to set + */ + function ResponseCommit(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResponseCommit data. + * @member {Uint8Array} data + * @memberof tendermint.abci.ResponseCommit + * @instance + */ + ResponseCommit.prototype.data = $util.newBuffer([]); + + /** + * ResponseCommit retainHeight. + * @member {number|Long} retainHeight + * @memberof tendermint.abci.ResponseCommit + * @instance + */ + ResponseCommit.prototype.retainHeight = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new ResponseCommit instance using the specified properties. + * @function create + * @memberof tendermint.abci.ResponseCommit + * @static + * @param {tendermint.abci.IResponseCommit=} [properties] Properties to set + * @returns {tendermint.abci.ResponseCommit} ResponseCommit instance + */ + ResponseCommit.create = function create(properties) { + return new ResponseCommit(properties); + }; + + /** + * Encodes the specified ResponseCommit message. Does not implicitly {@link tendermint.abci.ResponseCommit.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.ResponseCommit + * @static + * @param {tendermint.abci.IResponseCommit} message ResponseCommit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseCommit.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.data != null && Object.hasOwnProperty.call(message, "data")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.data); + if (message.retainHeight != null && Object.hasOwnProperty.call(message, "retainHeight")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.retainHeight); + return writer; + }; + + /** + * Encodes the specified ResponseCommit message, length delimited. Does not implicitly {@link tendermint.abci.ResponseCommit.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.ResponseCommit + * @static + * @param {tendermint.abci.IResponseCommit} message ResponseCommit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseCommit.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResponseCommit message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.ResponseCommit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.ResponseCommit} ResponseCommit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseCommit.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.ResponseCommit(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + message.data = reader.bytes(); + break; + case 3: + message.retainHeight = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResponseCommit message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.ResponseCommit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.ResponseCommit} ResponseCommit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseCommit.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResponseCommit message. + * @function verify + * @memberof tendermint.abci.ResponseCommit + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResponseCommit.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.data != null && message.hasOwnProperty("data")) + if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) + return "data: buffer expected"; + if (message.retainHeight != null && message.hasOwnProperty("retainHeight")) + if (!$util.isInteger(message.retainHeight) && !(message.retainHeight && $util.isInteger(message.retainHeight.low) && $util.isInteger(message.retainHeight.high))) + return "retainHeight: integer|Long expected"; + return null; + }; + + /** + * Creates a ResponseCommit message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.ResponseCommit + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.ResponseCommit} ResponseCommit + */ + ResponseCommit.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.ResponseCommit) + return object; + var message = new $root.tendermint.abci.ResponseCommit(); + if (object.data != null) + if (typeof object.data === "string") + $util.base64.decode(object.data, message.data = $util.newBuffer($util.base64.length(object.data)), 0); + else if (object.data.length) + message.data = object.data; + if (object.retainHeight != null) + if ($util.Long) + (message.retainHeight = $util.Long.fromValue(object.retainHeight)).unsigned = false; + else if (typeof object.retainHeight === "string") + message.retainHeight = parseInt(object.retainHeight, 10); + else if (typeof object.retainHeight === "number") + message.retainHeight = object.retainHeight; + else if (typeof object.retainHeight === "object") + message.retainHeight = new $util.LongBits(object.retainHeight.low >>> 0, object.retainHeight.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a ResponseCommit message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.ResponseCommit + * @static + * @param {tendermint.abci.ResponseCommit} message ResponseCommit + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResponseCommit.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.data = ""; + else { + object.data = []; + if (options.bytes !== Array) + object.data = $util.newBuffer(object.data); + } + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.retainHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.retainHeight = options.longs === String ? "0" : 0; + } + if (message.data != null && message.hasOwnProperty("data")) + object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; + if (message.retainHeight != null && message.hasOwnProperty("retainHeight")) + if (typeof message.retainHeight === "number") + object.retainHeight = options.longs === String ? String(message.retainHeight) : message.retainHeight; + else + object.retainHeight = options.longs === String ? $util.Long.prototype.toString.call(message.retainHeight) : options.longs === Number ? new $util.LongBits(message.retainHeight.low >>> 0, message.retainHeight.high >>> 0).toNumber() : message.retainHeight; + return object; + }; + + /** + * Converts this ResponseCommit to JSON. + * @function toJSON + * @memberof tendermint.abci.ResponseCommit + * @instance + * @returns {Object.} JSON object + */ + ResponseCommit.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ResponseCommit; + })(abci.ResponseCommit || {}); + + abci.ResponseListSnapshots = (function(ResponseListSnapshots) { + + /** + * Properties of a ResponseListSnapshots. + * @memberof tendermint.abci + * @interface IResponseListSnapshots + * @property {Array.|null} [snapshots] ResponseListSnapshots snapshots + */ + + /** + * Constructs a new ResponseListSnapshots. + * @memberof tendermint.abci + * @classdesc Represents a ResponseListSnapshots. + * @implements IResponseListSnapshots + * @constructor + * @param {tendermint.abci.IResponseListSnapshots=} [properties] Properties to set + */ + function ResponseListSnapshots(properties) { + this.snapshots = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResponseListSnapshots snapshots. + * @member {Array.} snapshots + * @memberof tendermint.abci.ResponseListSnapshots + * @instance + */ + ResponseListSnapshots.prototype.snapshots = $util.emptyArray; + + /** + * Creates a new ResponseListSnapshots instance using the specified properties. + * @function create + * @memberof tendermint.abci.ResponseListSnapshots + * @static + * @param {tendermint.abci.IResponseListSnapshots=} [properties] Properties to set + * @returns {tendermint.abci.ResponseListSnapshots} ResponseListSnapshots instance + */ + ResponseListSnapshots.create = function create(properties) { + return new ResponseListSnapshots(properties); + }; + + /** + * Encodes the specified ResponseListSnapshots message. Does not implicitly {@link tendermint.abci.ResponseListSnapshots.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.ResponseListSnapshots + * @static + * @param {tendermint.abci.IResponseListSnapshots} message ResponseListSnapshots message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseListSnapshots.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.snapshots != null && message.snapshots.length) + for (var i = 0; i < message.snapshots.length; ++i) + $root.tendermint.abci.Snapshot.encode(message.snapshots[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ResponseListSnapshots message, length delimited. Does not implicitly {@link tendermint.abci.ResponseListSnapshots.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.ResponseListSnapshots + * @static + * @param {tendermint.abci.IResponseListSnapshots} message ResponseListSnapshots message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseListSnapshots.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResponseListSnapshots message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.ResponseListSnapshots + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.ResponseListSnapshots} ResponseListSnapshots + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseListSnapshots.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.ResponseListSnapshots(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.snapshots && message.snapshots.length)) + message.snapshots = []; + message.snapshots.push($root.tendermint.abci.Snapshot.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResponseListSnapshots message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.ResponseListSnapshots + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.ResponseListSnapshots} ResponseListSnapshots + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseListSnapshots.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResponseListSnapshots message. + * @function verify + * @memberof tendermint.abci.ResponseListSnapshots + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResponseListSnapshots.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.snapshots != null && message.hasOwnProperty("snapshots")) { + if (!Array.isArray(message.snapshots)) + return "snapshots: array expected"; + for (var i = 0; i < message.snapshots.length; ++i) { + var error = $root.tendermint.abci.Snapshot.verify(message.snapshots[i]); + if (error) + return "snapshots." + error; + } + } + return null; + }; + + /** + * Creates a ResponseListSnapshots message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.ResponseListSnapshots + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.ResponseListSnapshots} ResponseListSnapshots + */ + ResponseListSnapshots.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.ResponseListSnapshots) + return object; + var message = new $root.tendermint.abci.ResponseListSnapshots(); + if (object.snapshots) { + if (!Array.isArray(object.snapshots)) + throw TypeError(".tendermint.abci.ResponseListSnapshots.snapshots: array expected"); + message.snapshots = []; + for (var i = 0; i < object.snapshots.length; ++i) { + if (typeof object.snapshots[i] !== "object") + throw TypeError(".tendermint.abci.ResponseListSnapshots.snapshots: object expected"); + message.snapshots[i] = $root.tendermint.abci.Snapshot.fromObject(object.snapshots[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ResponseListSnapshots message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.ResponseListSnapshots + * @static + * @param {tendermint.abci.ResponseListSnapshots} message ResponseListSnapshots + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResponseListSnapshots.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.snapshots = []; + if (message.snapshots && message.snapshots.length) { + object.snapshots = []; + for (var j = 0; j < message.snapshots.length; ++j) + object.snapshots[j] = $root.tendermint.abci.Snapshot.toObject(message.snapshots[j], options); + } + return object; + }; + + /** + * Converts this ResponseListSnapshots to JSON. + * @function toJSON + * @memberof tendermint.abci.ResponseListSnapshots + * @instance + * @returns {Object.} JSON object + */ + ResponseListSnapshots.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ResponseListSnapshots; + })(abci.ResponseListSnapshots || {}); + + abci.ResponseOfferSnapshot = (function(ResponseOfferSnapshot) { + + /** + * Properties of a ResponseOfferSnapshot. + * @memberof tendermint.abci + * @interface IResponseOfferSnapshot + * @property {tendermint.abci.ResponseOfferSnapshot.Result|null} [result] ResponseOfferSnapshot result + */ + + /** + * Constructs a new ResponseOfferSnapshot. + * @memberof tendermint.abci + * @classdesc Represents a ResponseOfferSnapshot. + * @implements IResponseOfferSnapshot + * @constructor + * @param {tendermint.abci.IResponseOfferSnapshot=} [properties] Properties to set + */ + function ResponseOfferSnapshot(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResponseOfferSnapshot result. + * @member {tendermint.abci.ResponseOfferSnapshot.Result} result + * @memberof tendermint.abci.ResponseOfferSnapshot + * @instance + */ + ResponseOfferSnapshot.prototype.result = 0; + + /** + * Creates a new ResponseOfferSnapshot instance using the specified properties. + * @function create + * @memberof tendermint.abci.ResponseOfferSnapshot + * @static + * @param {tendermint.abci.IResponseOfferSnapshot=} [properties] Properties to set + * @returns {tendermint.abci.ResponseOfferSnapshot} ResponseOfferSnapshot instance + */ + ResponseOfferSnapshot.create = function create(properties) { + return new ResponseOfferSnapshot(properties); + }; + + /** + * Encodes the specified ResponseOfferSnapshot message. Does not implicitly {@link tendermint.abci.ResponseOfferSnapshot.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.ResponseOfferSnapshot + * @static + * @param {tendermint.abci.IResponseOfferSnapshot} message ResponseOfferSnapshot message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseOfferSnapshot.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.result != null && Object.hasOwnProperty.call(message, "result")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.result); + return writer; + }; + + /** + * Encodes the specified ResponseOfferSnapshot message, length delimited. Does not implicitly {@link tendermint.abci.ResponseOfferSnapshot.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.ResponseOfferSnapshot + * @static + * @param {tendermint.abci.IResponseOfferSnapshot} message ResponseOfferSnapshot message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseOfferSnapshot.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResponseOfferSnapshot message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.ResponseOfferSnapshot + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.ResponseOfferSnapshot} ResponseOfferSnapshot + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseOfferSnapshot.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.ResponseOfferSnapshot(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.result = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResponseOfferSnapshot message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.ResponseOfferSnapshot + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.ResponseOfferSnapshot} ResponseOfferSnapshot + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseOfferSnapshot.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResponseOfferSnapshot message. + * @function verify + * @memberof tendermint.abci.ResponseOfferSnapshot + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResponseOfferSnapshot.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.result != null && message.hasOwnProperty("result")) + switch (message.result) { + default: + return "result: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + return null; + }; + + /** + * Creates a ResponseOfferSnapshot message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.ResponseOfferSnapshot + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.ResponseOfferSnapshot} ResponseOfferSnapshot + */ + ResponseOfferSnapshot.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.ResponseOfferSnapshot) + return object; + var message = new $root.tendermint.abci.ResponseOfferSnapshot(); + switch (object.result) { + case "UNKNOWN": + case 0: + message.result = 0; + break; + case "ACCEPT": + case 1: + message.result = 1; + break; + case "ABORT": + case 2: + message.result = 2; + break; + case "REJECT": + case 3: + message.result = 3; + break; + case "REJECT_FORMAT": + case 4: + message.result = 4; + break; + case "REJECT_SENDER": + case 5: + message.result = 5; + break; + } + return message; + }; + + /** + * Creates a plain object from a ResponseOfferSnapshot message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.ResponseOfferSnapshot + * @static + * @param {tendermint.abci.ResponseOfferSnapshot} message ResponseOfferSnapshot + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResponseOfferSnapshot.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.result = options.enums === String ? "UNKNOWN" : 0; + if (message.result != null && message.hasOwnProperty("result")) + object.result = options.enums === String ? $root.tendermint.abci.ResponseOfferSnapshot.Result[message.result] : message.result; + return object; + }; + + /** + * Converts this ResponseOfferSnapshot to JSON. + * @function toJSON + * @memberof tendermint.abci.ResponseOfferSnapshot + * @instance + * @returns {Object.} JSON object + */ + ResponseOfferSnapshot.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Result enum. + * @name tendermint.abci.ResponseOfferSnapshot.Result + * @enum {string} + * @property {number} UNKNOWN=0 UNKNOWN value + * @property {number} ACCEPT=1 ACCEPT value + * @property {number} ABORT=2 ABORT value + * @property {number} REJECT=3 REJECT value + * @property {number} REJECT_FORMAT=4 REJECT_FORMAT value + * @property {number} REJECT_SENDER=5 REJECT_SENDER value + */ + ResponseOfferSnapshot.Result = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNKNOWN"] = 0; + values[valuesById[1] = "ACCEPT"] = 1; + values[valuesById[2] = "ABORT"] = 2; + values[valuesById[3] = "REJECT"] = 3; + values[valuesById[4] = "REJECT_FORMAT"] = 4; + values[valuesById[5] = "REJECT_SENDER"] = 5; + return values; + })(); + + return ResponseOfferSnapshot; + })(abci.ResponseOfferSnapshot || {}); + + abci.ResponseLoadSnapshotChunk = (function(ResponseLoadSnapshotChunk) { + + /** + * Properties of a ResponseLoadSnapshotChunk. + * @memberof tendermint.abci + * @interface IResponseLoadSnapshotChunk + * @property {Uint8Array|null} [chunk] ResponseLoadSnapshotChunk chunk + */ + + /** + * Constructs a new ResponseLoadSnapshotChunk. + * @memberof tendermint.abci + * @classdesc Represents a ResponseLoadSnapshotChunk. + * @implements IResponseLoadSnapshotChunk + * @constructor + * @param {tendermint.abci.IResponseLoadSnapshotChunk=} [properties] Properties to set + */ + function ResponseLoadSnapshotChunk(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResponseLoadSnapshotChunk chunk. + * @member {Uint8Array} chunk + * @memberof tendermint.abci.ResponseLoadSnapshotChunk + * @instance + */ + ResponseLoadSnapshotChunk.prototype.chunk = $util.newBuffer([]); + + /** + * Creates a new ResponseLoadSnapshotChunk instance using the specified properties. + * @function create + * @memberof tendermint.abci.ResponseLoadSnapshotChunk + * @static + * @param {tendermint.abci.IResponseLoadSnapshotChunk=} [properties] Properties to set + * @returns {tendermint.abci.ResponseLoadSnapshotChunk} ResponseLoadSnapshotChunk instance + */ + ResponseLoadSnapshotChunk.create = function create(properties) { + return new ResponseLoadSnapshotChunk(properties); + }; + + /** + * Encodes the specified ResponseLoadSnapshotChunk message. Does not implicitly {@link tendermint.abci.ResponseLoadSnapshotChunk.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.ResponseLoadSnapshotChunk + * @static + * @param {tendermint.abci.IResponseLoadSnapshotChunk} message ResponseLoadSnapshotChunk message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseLoadSnapshotChunk.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.chunk != null && Object.hasOwnProperty.call(message, "chunk")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.chunk); + return writer; + }; + + /** + * Encodes the specified ResponseLoadSnapshotChunk message, length delimited. Does not implicitly {@link tendermint.abci.ResponseLoadSnapshotChunk.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.ResponseLoadSnapshotChunk + * @static + * @param {tendermint.abci.IResponseLoadSnapshotChunk} message ResponseLoadSnapshotChunk message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseLoadSnapshotChunk.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResponseLoadSnapshotChunk message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.ResponseLoadSnapshotChunk + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.ResponseLoadSnapshotChunk} ResponseLoadSnapshotChunk + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseLoadSnapshotChunk.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.ResponseLoadSnapshotChunk(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.chunk = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResponseLoadSnapshotChunk message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.ResponseLoadSnapshotChunk + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.ResponseLoadSnapshotChunk} ResponseLoadSnapshotChunk + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseLoadSnapshotChunk.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResponseLoadSnapshotChunk message. + * @function verify + * @memberof tendermint.abci.ResponseLoadSnapshotChunk + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResponseLoadSnapshotChunk.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.chunk != null && message.hasOwnProperty("chunk")) + if (!(message.chunk && typeof message.chunk.length === "number" || $util.isString(message.chunk))) + return "chunk: buffer expected"; + return null; + }; + + /** + * Creates a ResponseLoadSnapshotChunk message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.ResponseLoadSnapshotChunk + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.ResponseLoadSnapshotChunk} ResponseLoadSnapshotChunk + */ + ResponseLoadSnapshotChunk.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.ResponseLoadSnapshotChunk) + return object; + var message = new $root.tendermint.abci.ResponseLoadSnapshotChunk(); + if (object.chunk != null) + if (typeof object.chunk === "string") + $util.base64.decode(object.chunk, message.chunk = $util.newBuffer($util.base64.length(object.chunk)), 0); + else if (object.chunk.length) + message.chunk = object.chunk; + return message; + }; + + /** + * Creates a plain object from a ResponseLoadSnapshotChunk message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.ResponseLoadSnapshotChunk + * @static + * @param {tendermint.abci.ResponseLoadSnapshotChunk} message ResponseLoadSnapshotChunk + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResponseLoadSnapshotChunk.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if (options.bytes === String) + object.chunk = ""; + else { + object.chunk = []; + if (options.bytes !== Array) + object.chunk = $util.newBuffer(object.chunk); + } + if (message.chunk != null && message.hasOwnProperty("chunk")) + object.chunk = options.bytes === String ? $util.base64.encode(message.chunk, 0, message.chunk.length) : options.bytes === Array ? Array.prototype.slice.call(message.chunk) : message.chunk; + return object; + }; + + /** + * Converts this ResponseLoadSnapshotChunk to JSON. + * @function toJSON + * @memberof tendermint.abci.ResponseLoadSnapshotChunk + * @instance + * @returns {Object.} JSON object + */ + ResponseLoadSnapshotChunk.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ResponseLoadSnapshotChunk; + })(abci.ResponseLoadSnapshotChunk || {}); + + abci.ResponseApplySnapshotChunk = (function(ResponseApplySnapshotChunk) { + + /** + * Properties of a ResponseApplySnapshotChunk. + * @memberof tendermint.abci + * @interface IResponseApplySnapshotChunk + * @property {tendermint.abci.ResponseApplySnapshotChunk.Result|null} [result] ResponseApplySnapshotChunk result + * @property {Array.|null} [refetchChunks] ResponseApplySnapshotChunk refetchChunks + * @property {Array.|null} [rejectSenders] ResponseApplySnapshotChunk rejectSenders + */ + + /** + * Constructs a new ResponseApplySnapshotChunk. + * @memberof tendermint.abci + * @classdesc Represents a ResponseApplySnapshotChunk. + * @implements IResponseApplySnapshotChunk + * @constructor + * @param {tendermint.abci.IResponseApplySnapshotChunk=} [properties] Properties to set + */ + function ResponseApplySnapshotChunk(properties) { + this.refetchChunks = []; + this.rejectSenders = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResponseApplySnapshotChunk result. + * @member {tendermint.abci.ResponseApplySnapshotChunk.Result} result + * @memberof tendermint.abci.ResponseApplySnapshotChunk + * @instance + */ + ResponseApplySnapshotChunk.prototype.result = 0; + + /** + * ResponseApplySnapshotChunk refetchChunks. + * @member {Array.} refetchChunks + * @memberof tendermint.abci.ResponseApplySnapshotChunk + * @instance + */ + ResponseApplySnapshotChunk.prototype.refetchChunks = $util.emptyArray; + + /** + * ResponseApplySnapshotChunk rejectSenders. + * @member {Array.} rejectSenders + * @memberof tendermint.abci.ResponseApplySnapshotChunk + * @instance + */ + ResponseApplySnapshotChunk.prototype.rejectSenders = $util.emptyArray; + + /** + * Creates a new ResponseApplySnapshotChunk instance using the specified properties. + * @function create + * @memberof tendermint.abci.ResponseApplySnapshotChunk + * @static + * @param {tendermint.abci.IResponseApplySnapshotChunk=} [properties] Properties to set + * @returns {tendermint.abci.ResponseApplySnapshotChunk} ResponseApplySnapshotChunk instance + */ + ResponseApplySnapshotChunk.create = function create(properties) { + return new ResponseApplySnapshotChunk(properties); + }; + + /** + * Encodes the specified ResponseApplySnapshotChunk message. Does not implicitly {@link tendermint.abci.ResponseApplySnapshotChunk.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.ResponseApplySnapshotChunk + * @static + * @param {tendermint.abci.IResponseApplySnapshotChunk} message ResponseApplySnapshotChunk message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseApplySnapshotChunk.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.result != null && Object.hasOwnProperty.call(message, "result")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.result); + if (message.refetchChunks != null && message.refetchChunks.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.refetchChunks.length; ++i) + writer.uint32(message.refetchChunks[i]); + writer.ldelim(); + } + if (message.rejectSenders != null && message.rejectSenders.length) + for (var i = 0; i < message.rejectSenders.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.rejectSenders[i]); + return writer; + }; + + /** + * Encodes the specified ResponseApplySnapshotChunk message, length delimited. Does not implicitly {@link tendermint.abci.ResponseApplySnapshotChunk.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.ResponseApplySnapshotChunk + * @static + * @param {tendermint.abci.IResponseApplySnapshotChunk} message ResponseApplySnapshotChunk message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseApplySnapshotChunk.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResponseApplySnapshotChunk message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.ResponseApplySnapshotChunk + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.ResponseApplySnapshotChunk} ResponseApplySnapshotChunk + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseApplySnapshotChunk.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.ResponseApplySnapshotChunk(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.result = reader.int32(); + break; + case 2: + if (!(message.refetchChunks && message.refetchChunks.length)) + message.refetchChunks = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.refetchChunks.push(reader.uint32()); + } else + message.refetchChunks.push(reader.uint32()); + break; + case 3: + if (!(message.rejectSenders && message.rejectSenders.length)) + message.rejectSenders = []; + message.rejectSenders.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResponseApplySnapshotChunk message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.ResponseApplySnapshotChunk + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.ResponseApplySnapshotChunk} ResponseApplySnapshotChunk + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseApplySnapshotChunk.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResponseApplySnapshotChunk message. + * @function verify + * @memberof tendermint.abci.ResponseApplySnapshotChunk + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResponseApplySnapshotChunk.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.result != null && message.hasOwnProperty("result")) + switch (message.result) { + default: + return "result: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.refetchChunks != null && message.hasOwnProperty("refetchChunks")) { + if (!Array.isArray(message.refetchChunks)) + return "refetchChunks: array expected"; + for (var i = 0; i < message.refetchChunks.length; ++i) + if (!$util.isInteger(message.refetchChunks[i])) + return "refetchChunks: integer[] expected"; + } + if (message.rejectSenders != null && message.hasOwnProperty("rejectSenders")) { + if (!Array.isArray(message.rejectSenders)) + return "rejectSenders: array expected"; + for (var i = 0; i < message.rejectSenders.length; ++i) + if (!$util.isString(message.rejectSenders[i])) + return "rejectSenders: string[] expected"; + } + return null; + }; + + /** + * Creates a ResponseApplySnapshotChunk message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.ResponseApplySnapshotChunk + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.ResponseApplySnapshotChunk} ResponseApplySnapshotChunk + */ + ResponseApplySnapshotChunk.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.ResponseApplySnapshotChunk) + return object; + var message = new $root.tendermint.abci.ResponseApplySnapshotChunk(); + switch (object.result) { + case "UNKNOWN": + case 0: + message.result = 0; + break; + case "ACCEPT": + case 1: + message.result = 1; + break; + case "ABORT": + case 2: + message.result = 2; + break; + case "RETRY": + case 3: + message.result = 3; + break; + case "RETRY_SNAPSHOT": + case 4: + message.result = 4; + break; + case "REJECT_SNAPSHOT": + case 5: + message.result = 5; + break; + } + if (object.refetchChunks) { + if (!Array.isArray(object.refetchChunks)) + throw TypeError(".tendermint.abci.ResponseApplySnapshotChunk.refetchChunks: array expected"); + message.refetchChunks = []; + for (var i = 0; i < object.refetchChunks.length; ++i) + message.refetchChunks[i] = object.refetchChunks[i] >>> 0; + } + if (object.rejectSenders) { + if (!Array.isArray(object.rejectSenders)) + throw TypeError(".tendermint.abci.ResponseApplySnapshotChunk.rejectSenders: array expected"); + message.rejectSenders = []; + for (var i = 0; i < object.rejectSenders.length; ++i) + message.rejectSenders[i] = String(object.rejectSenders[i]); + } + return message; + }; + + /** + * Creates a plain object from a ResponseApplySnapshotChunk message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.ResponseApplySnapshotChunk + * @static + * @param {tendermint.abci.ResponseApplySnapshotChunk} message ResponseApplySnapshotChunk + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResponseApplySnapshotChunk.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.refetchChunks = []; + object.rejectSenders = []; + } + if (options.defaults) + object.result = options.enums === String ? "UNKNOWN" : 0; + if (message.result != null && message.hasOwnProperty("result")) + object.result = options.enums === String ? $root.tendermint.abci.ResponseApplySnapshotChunk.Result[message.result] : message.result; + if (message.refetchChunks && message.refetchChunks.length) { + object.refetchChunks = []; + for (var j = 0; j < message.refetchChunks.length; ++j) + object.refetchChunks[j] = message.refetchChunks[j]; + } + if (message.rejectSenders && message.rejectSenders.length) { + object.rejectSenders = []; + for (var j = 0; j < message.rejectSenders.length; ++j) + object.rejectSenders[j] = message.rejectSenders[j]; + } + return object; + }; + + /** + * Converts this ResponseApplySnapshotChunk to JSON. + * @function toJSON + * @memberof tendermint.abci.ResponseApplySnapshotChunk + * @instance + * @returns {Object.} JSON object + */ + ResponseApplySnapshotChunk.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Result enum. + * @name tendermint.abci.ResponseApplySnapshotChunk.Result + * @enum {string} + * @property {number} UNKNOWN=0 UNKNOWN value + * @property {number} ACCEPT=1 ACCEPT value + * @property {number} ABORT=2 ABORT value + * @property {number} RETRY=3 RETRY value + * @property {number} RETRY_SNAPSHOT=4 RETRY_SNAPSHOT value + * @property {number} REJECT_SNAPSHOT=5 REJECT_SNAPSHOT value + */ + ResponseApplySnapshotChunk.Result = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNKNOWN"] = 0; + values[valuesById[1] = "ACCEPT"] = 1; + values[valuesById[2] = "ABORT"] = 2; + values[valuesById[3] = "RETRY"] = 3; + values[valuesById[4] = "RETRY_SNAPSHOT"] = 4; + values[valuesById[5] = "REJECT_SNAPSHOT"] = 5; + return values; + })(); + + return ResponseApplySnapshotChunk; + })(abci.ResponseApplySnapshotChunk || {}); + + abci.ConsensusParams = (function(ConsensusParams) { + + /** + * Properties of a ConsensusParams. + * @memberof tendermint.abci + * @interface IConsensusParams + * @property {tendermint.abci.IBlockParams|null} [block] ConsensusParams block + * @property {tendermint.types.IEvidenceParams|null} [evidence] ConsensusParams evidence + * @property {tendermint.types.IValidatorParams|null} [validator] ConsensusParams validator + * @property {tendermint.types.IVersionParams|null} [version] ConsensusParams version + */ + + /** + * Constructs a new ConsensusParams. + * @memberof tendermint.abci + * @classdesc Represents a ConsensusParams. + * @implements IConsensusParams + * @constructor + * @param {tendermint.abci.IConsensusParams=} [properties] Properties to set + */ + function ConsensusParams(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ConsensusParams block. + * @member {tendermint.abci.IBlockParams|null|undefined} block + * @memberof tendermint.abci.ConsensusParams + * @instance + */ + ConsensusParams.prototype.block = null; + + /** + * ConsensusParams evidence. + * @member {tendermint.types.IEvidenceParams|null|undefined} evidence + * @memberof tendermint.abci.ConsensusParams + * @instance + */ + ConsensusParams.prototype.evidence = null; + + /** + * ConsensusParams validator. + * @member {tendermint.types.IValidatorParams|null|undefined} validator + * @memberof tendermint.abci.ConsensusParams + * @instance + */ + ConsensusParams.prototype.validator = null; + + /** + * ConsensusParams version. + * @member {tendermint.types.IVersionParams|null|undefined} version + * @memberof tendermint.abci.ConsensusParams + * @instance + */ + ConsensusParams.prototype.version = null; + + /** + * Creates a new ConsensusParams instance using the specified properties. + * @function create + * @memberof tendermint.abci.ConsensusParams + * @static + * @param {tendermint.abci.IConsensusParams=} [properties] Properties to set + * @returns {tendermint.abci.ConsensusParams} ConsensusParams instance + */ + ConsensusParams.create = function create(properties) { + return new ConsensusParams(properties); + }; + + /** + * Encodes the specified ConsensusParams message. Does not implicitly {@link tendermint.abci.ConsensusParams.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.ConsensusParams + * @static + * @param {tendermint.abci.IConsensusParams} message ConsensusParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConsensusParams.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.block != null && Object.hasOwnProperty.call(message, "block")) + $root.tendermint.abci.BlockParams.encode(message.block, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.evidence != null && Object.hasOwnProperty.call(message, "evidence")) + $root.tendermint.types.EvidenceParams.encode(message.evidence, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.validator != null && Object.hasOwnProperty.call(message, "validator")) + $root.tendermint.types.ValidatorParams.encode(message.validator, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + $root.tendermint.types.VersionParams.encode(message.version, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ConsensusParams message, length delimited. Does not implicitly {@link tendermint.abci.ConsensusParams.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.ConsensusParams + * @static + * @param {tendermint.abci.IConsensusParams} message ConsensusParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConsensusParams.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConsensusParams message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.ConsensusParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.ConsensusParams} ConsensusParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConsensusParams.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.ConsensusParams(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.block = $root.tendermint.abci.BlockParams.decode(reader, reader.uint32()); + break; + case 2: + message.evidence = $root.tendermint.types.EvidenceParams.decode(reader, reader.uint32()); + break; + case 3: + message.validator = $root.tendermint.types.ValidatorParams.decode(reader, reader.uint32()); + break; + case 4: + message.version = $root.tendermint.types.VersionParams.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ConsensusParams message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.ConsensusParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.ConsensusParams} ConsensusParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConsensusParams.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConsensusParams message. + * @function verify + * @memberof tendermint.abci.ConsensusParams + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConsensusParams.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.block != null && message.hasOwnProperty("block")) { + var error = $root.tendermint.abci.BlockParams.verify(message.block); + if (error) + return "block." + error; + } + if (message.evidence != null && message.hasOwnProperty("evidence")) { + var error = $root.tendermint.types.EvidenceParams.verify(message.evidence); + if (error) + return "evidence." + error; + } + if (message.validator != null && message.hasOwnProperty("validator")) { + var error = $root.tendermint.types.ValidatorParams.verify(message.validator); + if (error) + return "validator." + error; + } + if (message.version != null && message.hasOwnProperty("version")) { + var error = $root.tendermint.types.VersionParams.verify(message.version); + if (error) + return "version." + error; + } + return null; + }; + + /** + * Creates a ConsensusParams message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.ConsensusParams + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.ConsensusParams} ConsensusParams + */ + ConsensusParams.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.ConsensusParams) + return object; + var message = new $root.tendermint.abci.ConsensusParams(); + if (object.block != null) { + if (typeof object.block !== "object") + throw TypeError(".tendermint.abci.ConsensusParams.block: object expected"); + message.block = $root.tendermint.abci.BlockParams.fromObject(object.block); + } + if (object.evidence != null) { + if (typeof object.evidence !== "object") + throw TypeError(".tendermint.abci.ConsensusParams.evidence: object expected"); + message.evidence = $root.tendermint.types.EvidenceParams.fromObject(object.evidence); + } + if (object.validator != null) { + if (typeof object.validator !== "object") + throw TypeError(".tendermint.abci.ConsensusParams.validator: object expected"); + message.validator = $root.tendermint.types.ValidatorParams.fromObject(object.validator); + } + if (object.version != null) { + if (typeof object.version !== "object") + throw TypeError(".tendermint.abci.ConsensusParams.version: object expected"); + message.version = $root.tendermint.types.VersionParams.fromObject(object.version); + } + return message; + }; + + /** + * Creates a plain object from a ConsensusParams message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.ConsensusParams + * @static + * @param {tendermint.abci.ConsensusParams} message ConsensusParams + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConsensusParams.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.block = null; + object.evidence = null; + object.validator = null; + object.version = null; + } + if (message.block != null && message.hasOwnProperty("block")) + object.block = $root.tendermint.abci.BlockParams.toObject(message.block, options); + if (message.evidence != null && message.hasOwnProperty("evidence")) + object.evidence = $root.tendermint.types.EvidenceParams.toObject(message.evidence, options); + if (message.validator != null && message.hasOwnProperty("validator")) + object.validator = $root.tendermint.types.ValidatorParams.toObject(message.validator, options); + if (message.version != null && message.hasOwnProperty("version")) + object.version = $root.tendermint.types.VersionParams.toObject(message.version, options); + return object; + }; + + /** + * Converts this ConsensusParams to JSON. + * @function toJSON + * @memberof tendermint.abci.ConsensusParams + * @instance + * @returns {Object.} JSON object + */ + ConsensusParams.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ConsensusParams; + })(abci.ConsensusParams || {}); + + abci.BlockParams = (function(BlockParams) { + + /** + * Properties of a BlockParams. + * @memberof tendermint.abci + * @interface IBlockParams + * @property {number|Long|null} [maxBytes] BlockParams maxBytes + * @property {number|Long|null} [maxGas] BlockParams maxGas + */ + + /** + * Constructs a new BlockParams. + * @memberof tendermint.abci + * @classdesc Represents a BlockParams. + * @implements IBlockParams + * @constructor + * @param {tendermint.abci.IBlockParams=} [properties] Properties to set + */ + function BlockParams(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BlockParams maxBytes. + * @member {number|Long} maxBytes + * @memberof tendermint.abci.BlockParams + * @instance + */ + BlockParams.prototype.maxBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * BlockParams maxGas. + * @member {number|Long} maxGas + * @memberof tendermint.abci.BlockParams + * @instance + */ + BlockParams.prototype.maxGas = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new BlockParams instance using the specified properties. + * @function create + * @memberof tendermint.abci.BlockParams + * @static + * @param {tendermint.abci.IBlockParams=} [properties] Properties to set + * @returns {tendermint.abci.BlockParams} BlockParams instance + */ + BlockParams.create = function create(properties) { + return new BlockParams(properties); + }; + + /** + * Encodes the specified BlockParams message. Does not implicitly {@link tendermint.abci.BlockParams.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.BlockParams + * @static + * @param {tendermint.abci.IBlockParams} message BlockParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BlockParams.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.maxBytes != null && Object.hasOwnProperty.call(message, "maxBytes")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.maxBytes); + if (message.maxGas != null && Object.hasOwnProperty.call(message, "maxGas")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.maxGas); + return writer; + }; + + /** + * Encodes the specified BlockParams message, length delimited. Does not implicitly {@link tendermint.abci.BlockParams.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.BlockParams + * @static + * @param {tendermint.abci.IBlockParams} message BlockParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BlockParams.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BlockParams message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.BlockParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.BlockParams} BlockParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BlockParams.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.BlockParams(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.maxBytes = reader.int64(); + break; + case 2: + message.maxGas = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BlockParams message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.BlockParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.BlockParams} BlockParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BlockParams.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BlockParams message. + * @function verify + * @memberof tendermint.abci.BlockParams + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BlockParams.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.maxBytes != null && message.hasOwnProperty("maxBytes")) + if (!$util.isInteger(message.maxBytes) && !(message.maxBytes && $util.isInteger(message.maxBytes.low) && $util.isInteger(message.maxBytes.high))) + return "maxBytes: integer|Long expected"; + if (message.maxGas != null && message.hasOwnProperty("maxGas")) + if (!$util.isInteger(message.maxGas) && !(message.maxGas && $util.isInteger(message.maxGas.low) && $util.isInteger(message.maxGas.high))) + return "maxGas: integer|Long expected"; + return null; + }; + + /** + * Creates a BlockParams message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.BlockParams + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.BlockParams} BlockParams + */ + BlockParams.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.BlockParams) + return object; + var message = new $root.tendermint.abci.BlockParams(); + if (object.maxBytes != null) + if ($util.Long) + (message.maxBytes = $util.Long.fromValue(object.maxBytes)).unsigned = false; + else if (typeof object.maxBytes === "string") + message.maxBytes = parseInt(object.maxBytes, 10); + else if (typeof object.maxBytes === "number") + message.maxBytes = object.maxBytes; + else if (typeof object.maxBytes === "object") + message.maxBytes = new $util.LongBits(object.maxBytes.low >>> 0, object.maxBytes.high >>> 0).toNumber(); + if (object.maxGas != null) + if ($util.Long) + (message.maxGas = $util.Long.fromValue(object.maxGas)).unsigned = false; + else if (typeof object.maxGas === "string") + message.maxGas = parseInt(object.maxGas, 10); + else if (typeof object.maxGas === "number") + message.maxGas = object.maxGas; + else if (typeof object.maxGas === "object") + message.maxGas = new $util.LongBits(object.maxGas.low >>> 0, object.maxGas.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a BlockParams message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.BlockParams + * @static + * @param {tendermint.abci.BlockParams} message BlockParams + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BlockParams.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.maxBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.maxBytes = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.maxGas = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.maxGas = options.longs === String ? "0" : 0; + } + if (message.maxBytes != null && message.hasOwnProperty("maxBytes")) + if (typeof message.maxBytes === "number") + object.maxBytes = options.longs === String ? String(message.maxBytes) : message.maxBytes; + else + object.maxBytes = options.longs === String ? $util.Long.prototype.toString.call(message.maxBytes) : options.longs === Number ? new $util.LongBits(message.maxBytes.low >>> 0, message.maxBytes.high >>> 0).toNumber() : message.maxBytes; + if (message.maxGas != null && message.hasOwnProperty("maxGas")) + if (typeof message.maxGas === "number") + object.maxGas = options.longs === String ? String(message.maxGas) : message.maxGas; + else + object.maxGas = options.longs === String ? $util.Long.prototype.toString.call(message.maxGas) : options.longs === Number ? new $util.LongBits(message.maxGas.low >>> 0, message.maxGas.high >>> 0).toNumber() : message.maxGas; + return object; + }; + + /** + * Converts this BlockParams to JSON. + * @function toJSON + * @memberof tendermint.abci.BlockParams + * @instance + * @returns {Object.} JSON object + */ + BlockParams.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return BlockParams; + })(abci.BlockParams || {}); + + abci.LastCommitInfo = (function(LastCommitInfo) { + + /** + * Properties of a LastCommitInfo. + * @memberof tendermint.abci + * @interface ILastCommitInfo + * @property {number|null} [round] LastCommitInfo round + * @property {Array.|null} [votes] LastCommitInfo votes + */ + + /** + * Constructs a new LastCommitInfo. + * @memberof tendermint.abci + * @classdesc Represents a LastCommitInfo. + * @implements ILastCommitInfo + * @constructor + * @param {tendermint.abci.ILastCommitInfo=} [properties] Properties to set + */ + function LastCommitInfo(properties) { + this.votes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LastCommitInfo round. + * @member {number} round + * @memberof tendermint.abci.LastCommitInfo + * @instance + */ + LastCommitInfo.prototype.round = 0; + + /** + * LastCommitInfo votes. + * @member {Array.} votes + * @memberof tendermint.abci.LastCommitInfo + * @instance + */ + LastCommitInfo.prototype.votes = $util.emptyArray; + + /** + * Creates a new LastCommitInfo instance using the specified properties. + * @function create + * @memberof tendermint.abci.LastCommitInfo + * @static + * @param {tendermint.abci.ILastCommitInfo=} [properties] Properties to set + * @returns {tendermint.abci.LastCommitInfo} LastCommitInfo instance + */ + LastCommitInfo.create = function create(properties) { + return new LastCommitInfo(properties); + }; + + /** + * Encodes the specified LastCommitInfo message. Does not implicitly {@link tendermint.abci.LastCommitInfo.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.LastCommitInfo + * @static + * @param {tendermint.abci.ILastCommitInfo} message LastCommitInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LastCommitInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.round != null && Object.hasOwnProperty.call(message, "round")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.round); + if (message.votes != null && message.votes.length) + for (var i = 0; i < message.votes.length; ++i) + $root.tendermint.abci.VoteInfo.encode(message.votes[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LastCommitInfo message, length delimited. Does not implicitly {@link tendermint.abci.LastCommitInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.LastCommitInfo + * @static + * @param {tendermint.abci.ILastCommitInfo} message LastCommitInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LastCommitInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LastCommitInfo message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.LastCommitInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.LastCommitInfo} LastCommitInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LastCommitInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.LastCommitInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.round = reader.int32(); + break; + case 2: + if (!(message.votes && message.votes.length)) + message.votes = []; + message.votes.push($root.tendermint.abci.VoteInfo.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LastCommitInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.LastCommitInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.LastCommitInfo} LastCommitInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LastCommitInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LastCommitInfo message. + * @function verify + * @memberof tendermint.abci.LastCommitInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LastCommitInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.round != null && message.hasOwnProperty("round")) + if (!$util.isInteger(message.round)) + return "round: integer expected"; + if (message.votes != null && message.hasOwnProperty("votes")) { + if (!Array.isArray(message.votes)) + return "votes: array expected"; + for (var i = 0; i < message.votes.length; ++i) { + var error = $root.tendermint.abci.VoteInfo.verify(message.votes[i]); + if (error) + return "votes." + error; + } + } + return null; + }; + + /** + * Creates a LastCommitInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.LastCommitInfo + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.LastCommitInfo} LastCommitInfo + */ + LastCommitInfo.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.LastCommitInfo) + return object; + var message = new $root.tendermint.abci.LastCommitInfo(); + if (object.round != null) + message.round = object.round | 0; + if (object.votes) { + if (!Array.isArray(object.votes)) + throw TypeError(".tendermint.abci.LastCommitInfo.votes: array expected"); + message.votes = []; + for (var i = 0; i < object.votes.length; ++i) { + if (typeof object.votes[i] !== "object") + throw TypeError(".tendermint.abci.LastCommitInfo.votes: object expected"); + message.votes[i] = $root.tendermint.abci.VoteInfo.fromObject(object.votes[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a LastCommitInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.LastCommitInfo + * @static + * @param {tendermint.abci.LastCommitInfo} message LastCommitInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LastCommitInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.votes = []; + if (options.defaults) + object.round = 0; + if (message.round != null && message.hasOwnProperty("round")) + object.round = message.round; + if (message.votes && message.votes.length) { + object.votes = []; + for (var j = 0; j < message.votes.length; ++j) + object.votes[j] = $root.tendermint.abci.VoteInfo.toObject(message.votes[j], options); + } + return object; + }; + + /** + * Converts this LastCommitInfo to JSON. + * @function toJSON + * @memberof tendermint.abci.LastCommitInfo + * @instance + * @returns {Object.} JSON object + */ + LastCommitInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return LastCommitInfo; + })(abci.LastCommitInfo || {}); + + abci.Event = (function(Event) { + + /** + * Properties of an Event. + * @memberof tendermint.abci + * @interface IEvent + * @property {string|null} [type] Event type + * @property {Array.|null} [attributes] Event attributes + */ + + /** + * Constructs a new Event. + * @memberof tendermint.abci + * @classdesc Represents an Event. + * @implements IEvent + * @constructor + * @param {tendermint.abci.IEvent=} [properties] Properties to set + */ + function Event(properties) { + this.attributes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Event type. + * @member {string} type + * @memberof tendermint.abci.Event + * @instance + */ + Event.prototype.type = ""; + + /** + * Event attributes. + * @member {Array.} attributes + * @memberof tendermint.abci.Event + * @instance + */ + Event.prototype.attributes = $util.emptyArray; + + /** + * Creates a new Event instance using the specified properties. + * @function create + * @memberof tendermint.abci.Event + * @static + * @param {tendermint.abci.IEvent=} [properties] Properties to set + * @returns {tendermint.abci.Event} Event instance + */ + Event.create = function create(properties) { + return new Event(properties); + }; + + /** + * Encodes the specified Event message. Does not implicitly {@link tendermint.abci.Event.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.Event + * @static + * @param {tendermint.abci.IEvent} message Event message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Event.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.attributes != null && message.attributes.length) + for (var i = 0; i < message.attributes.length; ++i) + $root.tendermint.abci.EventAttribute.encode(message.attributes[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Event message, length delimited. Does not implicitly {@link tendermint.abci.Event.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.Event + * @static + * @param {tendermint.abci.IEvent} message Event message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Event.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Event message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.Event + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.Event} Event + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Event.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.Event(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type = reader.string(); + break; + case 2: + if (!(message.attributes && message.attributes.length)) + message.attributes = []; + message.attributes.push($root.tendermint.abci.EventAttribute.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Event message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.Event + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.Event} Event + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Event.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Event message. + * @function verify + * @memberof tendermint.abci.Event + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Event.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.attributes != null && message.hasOwnProperty("attributes")) { + if (!Array.isArray(message.attributes)) + return "attributes: array expected"; + for (var i = 0; i < message.attributes.length; ++i) { + var error = $root.tendermint.abci.EventAttribute.verify(message.attributes[i]); + if (error) + return "attributes." + error; + } + } + return null; + }; + + /** + * Creates an Event message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.Event + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.Event} Event + */ + Event.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.Event) + return object; + var message = new $root.tendermint.abci.Event(); + if (object.type != null) + message.type = String(object.type); + if (object.attributes) { + if (!Array.isArray(object.attributes)) + throw TypeError(".tendermint.abci.Event.attributes: array expected"); + message.attributes = []; + for (var i = 0; i < object.attributes.length; ++i) { + if (typeof object.attributes[i] !== "object") + throw TypeError(".tendermint.abci.Event.attributes: object expected"); + message.attributes[i] = $root.tendermint.abci.EventAttribute.fromObject(object.attributes[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an Event message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.Event + * @static + * @param {tendermint.abci.Event} message Event + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Event.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.attributes = []; + if (options.defaults) + object.type = ""; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.attributes && message.attributes.length) { + object.attributes = []; + for (var j = 0; j < message.attributes.length; ++j) + object.attributes[j] = $root.tendermint.abci.EventAttribute.toObject(message.attributes[j], options); + } + return object; + }; + + /** + * Converts this Event to JSON. + * @function toJSON + * @memberof tendermint.abci.Event + * @instance + * @returns {Object.} JSON object + */ + Event.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Event; + })(abci.Event || {}); + + abci.EventAttribute = (function(EventAttribute) { + + /** + * Properties of an EventAttribute. + * @memberof tendermint.abci + * @interface IEventAttribute + * @property {Uint8Array|null} [key] EventAttribute key + * @property {Uint8Array|null} [value] EventAttribute value + * @property {boolean|null} [index] EventAttribute index + */ + + /** + * Constructs a new EventAttribute. + * @memberof tendermint.abci + * @classdesc Represents an EventAttribute. + * @implements IEventAttribute + * @constructor + * @param {tendermint.abci.IEventAttribute=} [properties] Properties to set + */ + function EventAttribute(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EventAttribute key. + * @member {Uint8Array} key + * @memberof tendermint.abci.EventAttribute + * @instance + */ + EventAttribute.prototype.key = $util.newBuffer([]); + + /** + * EventAttribute value. + * @member {Uint8Array} value + * @memberof tendermint.abci.EventAttribute + * @instance + */ + EventAttribute.prototype.value = $util.newBuffer([]); + + /** + * EventAttribute index. + * @member {boolean} index + * @memberof tendermint.abci.EventAttribute + * @instance + */ + EventAttribute.prototype.index = false; + + /** + * Creates a new EventAttribute instance using the specified properties. + * @function create + * @memberof tendermint.abci.EventAttribute + * @static + * @param {tendermint.abci.IEventAttribute=} [properties] Properties to set + * @returns {tendermint.abci.EventAttribute} EventAttribute instance + */ + EventAttribute.create = function create(properties) { + return new EventAttribute(properties); + }; + + /** + * Encodes the specified EventAttribute message. Does not implicitly {@link tendermint.abci.EventAttribute.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.EventAttribute + * @static + * @param {tendermint.abci.IEventAttribute} message EventAttribute message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EventAttribute.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.key); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); + if (message.index != null && Object.hasOwnProperty.call(message, "index")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.index); + return writer; + }; + + /** + * Encodes the specified EventAttribute message, length delimited. Does not implicitly {@link tendermint.abci.EventAttribute.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.EventAttribute + * @static + * @param {tendermint.abci.IEventAttribute} message EventAttribute message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EventAttribute.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EventAttribute message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.EventAttribute + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.EventAttribute} EventAttribute + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EventAttribute.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.EventAttribute(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.key = reader.bytes(); + break; + case 2: + message.value = reader.bytes(); + break; + case 3: + message.index = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EventAttribute message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.EventAttribute + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.EventAttribute} EventAttribute + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EventAttribute.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EventAttribute message. + * @function verify + * @memberof tendermint.abci.EventAttribute + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EventAttribute.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.key != null && message.hasOwnProperty("key")) + if (!(message.key && typeof message.key.length === "number" || $util.isString(message.key))) + return "key: buffer expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; + if (message.index != null && message.hasOwnProperty("index")) + if (typeof message.index !== "boolean") + return "index: boolean expected"; + return null; + }; + + /** + * Creates an EventAttribute message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.EventAttribute + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.EventAttribute} EventAttribute + */ + EventAttribute.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.EventAttribute) + return object; + var message = new $root.tendermint.abci.EventAttribute(); + if (object.key != null) + if (typeof object.key === "string") + $util.base64.decode(object.key, message.key = $util.newBuffer($util.base64.length(object.key)), 0); + else if (object.key.length) + message.key = object.key; + if (object.value != null) + if (typeof object.value === "string") + $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); + else if (object.value.length) + message.value = object.value; + if (object.index != null) + message.index = Boolean(object.index); + return message; + }; + + /** + * Creates a plain object from an EventAttribute message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.EventAttribute + * @static + * @param {tendermint.abci.EventAttribute} message EventAttribute + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EventAttribute.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.key = ""; + else { + object.key = []; + if (options.bytes !== Array) + object.key = $util.newBuffer(object.key); + } + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + object.index = false; + } + if (message.key != null && message.hasOwnProperty("key")) + object.key = options.bytes === String ? $util.base64.encode(message.key, 0, message.key.length) : options.bytes === Array ? Array.prototype.slice.call(message.key) : message.key; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + if (message.index != null && message.hasOwnProperty("index")) + object.index = message.index; + return object; + }; + + /** + * Converts this EventAttribute to JSON. + * @function toJSON + * @memberof tendermint.abci.EventAttribute + * @instance + * @returns {Object.} JSON object + */ + EventAttribute.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EventAttribute; + })(abci.EventAttribute || {}); + + abci.TxResult = (function(TxResult) { + + /** + * Properties of a TxResult. + * @memberof tendermint.abci + * @interface ITxResult + * @property {number|Long|null} [height] TxResult height + * @property {number|null} [index] TxResult index + * @property {Uint8Array|null} [tx] TxResult tx + * @property {tendermint.abci.IResponseDeliverTx|null} [result] TxResult result + */ + + /** + * Constructs a new TxResult. + * @memberof tendermint.abci + * @classdesc Represents a TxResult. + * @implements ITxResult + * @constructor + * @param {tendermint.abci.ITxResult=} [properties] Properties to set + */ + function TxResult(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TxResult height. + * @member {number|Long} height + * @memberof tendermint.abci.TxResult + * @instance + */ + TxResult.prototype.height = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * TxResult index. + * @member {number} index + * @memberof tendermint.abci.TxResult + * @instance + */ + TxResult.prototype.index = 0; + + /** + * TxResult tx. + * @member {Uint8Array} tx + * @memberof tendermint.abci.TxResult + * @instance + */ + TxResult.prototype.tx = $util.newBuffer([]); + + /** + * TxResult result. + * @member {tendermint.abci.IResponseDeliverTx|null|undefined} result + * @memberof tendermint.abci.TxResult + * @instance + */ + TxResult.prototype.result = null; + + /** + * Creates a new TxResult instance using the specified properties. + * @function create + * @memberof tendermint.abci.TxResult + * @static + * @param {tendermint.abci.ITxResult=} [properties] Properties to set + * @returns {tendermint.abci.TxResult} TxResult instance + */ + TxResult.create = function create(properties) { + return new TxResult(properties); + }; + + /** + * Encodes the specified TxResult message. Does not implicitly {@link tendermint.abci.TxResult.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.TxResult + * @static + * @param {tendermint.abci.ITxResult} message TxResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TxResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.height != null && Object.hasOwnProperty.call(message, "height")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.height); + if (message.index != null && Object.hasOwnProperty.call(message, "index")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.index); + if (message.tx != null && Object.hasOwnProperty.call(message, "tx")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.tx); + if (message.result != null && Object.hasOwnProperty.call(message, "result")) + $root.tendermint.abci.ResponseDeliverTx.encode(message.result, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TxResult message, length delimited. Does not implicitly {@link tendermint.abci.TxResult.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.TxResult + * @static + * @param {tendermint.abci.ITxResult} message TxResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TxResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TxResult message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.TxResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.TxResult} TxResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TxResult.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.TxResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.height = reader.int64(); + break; + case 2: + message.index = reader.uint32(); + break; + case 3: + message.tx = reader.bytes(); + break; + case 4: + message.result = $root.tendermint.abci.ResponseDeliverTx.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TxResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.TxResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.TxResult} TxResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TxResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TxResult message. + * @function verify + * @memberof tendermint.abci.TxResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TxResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.height != null && message.hasOwnProperty("height")) + if (!$util.isInteger(message.height) && !(message.height && $util.isInteger(message.height.low) && $util.isInteger(message.height.high))) + return "height: integer|Long expected"; + if (message.index != null && message.hasOwnProperty("index")) + if (!$util.isInteger(message.index)) + return "index: integer expected"; + if (message.tx != null && message.hasOwnProperty("tx")) + if (!(message.tx && typeof message.tx.length === "number" || $util.isString(message.tx))) + return "tx: buffer expected"; + if (message.result != null && message.hasOwnProperty("result")) { + var error = $root.tendermint.abci.ResponseDeliverTx.verify(message.result); + if (error) + return "result." + error; + } + return null; + }; + + /** + * Creates a TxResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.TxResult + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.TxResult} TxResult + */ + TxResult.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.TxResult) + return object; + var message = new $root.tendermint.abci.TxResult(); + if (object.height != null) + if ($util.Long) + (message.height = $util.Long.fromValue(object.height)).unsigned = false; + else if (typeof object.height === "string") + message.height = parseInt(object.height, 10); + else if (typeof object.height === "number") + message.height = object.height; + else if (typeof object.height === "object") + message.height = new $util.LongBits(object.height.low >>> 0, object.height.high >>> 0).toNumber(); + if (object.index != null) + message.index = object.index >>> 0; + if (object.tx != null) + if (typeof object.tx === "string") + $util.base64.decode(object.tx, message.tx = $util.newBuffer($util.base64.length(object.tx)), 0); + else if (object.tx.length) + message.tx = object.tx; + if (object.result != null) { + if (typeof object.result !== "object") + throw TypeError(".tendermint.abci.TxResult.result: object expected"); + message.result = $root.tendermint.abci.ResponseDeliverTx.fromObject(object.result); + } + return message; + }; + + /** + * Creates a plain object from a TxResult message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.TxResult + * @static + * @param {tendermint.abci.TxResult} message TxResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TxResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.height = options.longs === String ? "0" : 0; + object.index = 0; + if (options.bytes === String) + object.tx = ""; + else { + object.tx = []; + if (options.bytes !== Array) + object.tx = $util.newBuffer(object.tx); + } + object.result = null; + } + if (message.height != null && message.hasOwnProperty("height")) + if (typeof message.height === "number") + object.height = options.longs === String ? String(message.height) : message.height; + else + object.height = options.longs === String ? $util.Long.prototype.toString.call(message.height) : options.longs === Number ? new $util.LongBits(message.height.low >>> 0, message.height.high >>> 0).toNumber() : message.height; + if (message.index != null && message.hasOwnProperty("index")) + object.index = message.index; + if (message.tx != null && message.hasOwnProperty("tx")) + object.tx = options.bytes === String ? $util.base64.encode(message.tx, 0, message.tx.length) : options.bytes === Array ? Array.prototype.slice.call(message.tx) : message.tx; + if (message.result != null && message.hasOwnProperty("result")) + object.result = $root.tendermint.abci.ResponseDeliverTx.toObject(message.result, options); + return object; + }; + + /** + * Converts this TxResult to JSON. + * @function toJSON + * @memberof tendermint.abci.TxResult + * @instance + * @returns {Object.} JSON object + */ + TxResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TxResult; + })(abci.TxResult || {}); + + abci.Validator = (function(Validator) { + + /** + * Properties of a Validator. + * @memberof tendermint.abci + * @interface IValidator + * @property {Uint8Array|null} [address] Validator address + * @property {number|Long|null} [power] Validator power + */ + + /** + * Constructs a new Validator. + * @memberof tendermint.abci + * @classdesc Represents a Validator. + * @implements IValidator + * @constructor + * @param {tendermint.abci.IValidator=} [properties] Properties to set + */ + function Validator(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Validator address. + * @member {Uint8Array} address + * @memberof tendermint.abci.Validator + * @instance + */ + Validator.prototype.address = $util.newBuffer([]); + + /** + * Validator power. + * @member {number|Long} power + * @memberof tendermint.abci.Validator + * @instance + */ + Validator.prototype.power = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new Validator instance using the specified properties. + * @function create + * @memberof tendermint.abci.Validator + * @static + * @param {tendermint.abci.IValidator=} [properties] Properties to set + * @returns {tendermint.abci.Validator} Validator instance + */ + Validator.create = function create(properties) { + return new Validator(properties); + }; + + /** + * Encodes the specified Validator message. Does not implicitly {@link tendermint.abci.Validator.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.Validator + * @static + * @param {tendermint.abci.IValidator} message Validator message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Validator.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.address != null && Object.hasOwnProperty.call(message, "address")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.address); + if (message.power != null && Object.hasOwnProperty.call(message, "power")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.power); + return writer; + }; + + /** + * Encodes the specified Validator message, length delimited. Does not implicitly {@link tendermint.abci.Validator.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.Validator + * @static + * @param {tendermint.abci.IValidator} message Validator message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Validator.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Validator message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.Validator + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.Validator} Validator + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Validator.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.Validator(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.address = reader.bytes(); + break; + case 3: + message.power = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Validator message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.Validator + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.Validator} Validator + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Validator.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Validator message. + * @function verify + * @memberof tendermint.abci.Validator + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Validator.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.address != null && message.hasOwnProperty("address")) + if (!(message.address && typeof message.address.length === "number" || $util.isString(message.address))) + return "address: buffer expected"; + if (message.power != null && message.hasOwnProperty("power")) + if (!$util.isInteger(message.power) && !(message.power && $util.isInteger(message.power.low) && $util.isInteger(message.power.high))) + return "power: integer|Long expected"; + return null; + }; + + /** + * Creates a Validator message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.Validator + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.Validator} Validator + */ + Validator.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.Validator) + return object; + var message = new $root.tendermint.abci.Validator(); + if (object.address != null) + if (typeof object.address === "string") + $util.base64.decode(object.address, message.address = $util.newBuffer($util.base64.length(object.address)), 0); + else if (object.address.length) + message.address = object.address; + if (object.power != null) + if ($util.Long) + (message.power = $util.Long.fromValue(object.power)).unsigned = false; + else if (typeof object.power === "string") + message.power = parseInt(object.power, 10); + else if (typeof object.power === "number") + message.power = object.power; + else if (typeof object.power === "object") + message.power = new $util.LongBits(object.power.low >>> 0, object.power.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a Validator message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.Validator + * @static + * @param {tendermint.abci.Validator} message Validator + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Validator.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.address = ""; + else { + object.address = []; + if (options.bytes !== Array) + object.address = $util.newBuffer(object.address); + } + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.power = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.power = options.longs === String ? "0" : 0; + } + if (message.address != null && message.hasOwnProperty("address")) + object.address = options.bytes === String ? $util.base64.encode(message.address, 0, message.address.length) : options.bytes === Array ? Array.prototype.slice.call(message.address) : message.address; + if (message.power != null && message.hasOwnProperty("power")) + if (typeof message.power === "number") + object.power = options.longs === String ? String(message.power) : message.power; + else + object.power = options.longs === String ? $util.Long.prototype.toString.call(message.power) : options.longs === Number ? new $util.LongBits(message.power.low >>> 0, message.power.high >>> 0).toNumber() : message.power; + return object; + }; + + /** + * Converts this Validator to JSON. + * @function toJSON + * @memberof tendermint.abci.Validator + * @instance + * @returns {Object.} JSON object + */ + Validator.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Validator; + })(abci.Validator || {}); + + abci.ValidatorUpdate = (function(ValidatorUpdate) { + + /** + * Properties of a ValidatorUpdate. + * @memberof tendermint.abci + * @interface IValidatorUpdate + * @property {tendermint.crypto.IPublicKey|null} [pubKey] ValidatorUpdate pubKey + * @property {number|Long|null} [power] ValidatorUpdate power + */ + + /** + * Constructs a new ValidatorUpdate. + * @memberof tendermint.abci + * @classdesc Represents a ValidatorUpdate. + * @implements IValidatorUpdate + * @constructor + * @param {tendermint.abci.IValidatorUpdate=} [properties] Properties to set + */ + function ValidatorUpdate(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ValidatorUpdate pubKey. + * @member {tendermint.crypto.IPublicKey|null|undefined} pubKey + * @memberof tendermint.abci.ValidatorUpdate + * @instance + */ + ValidatorUpdate.prototype.pubKey = null; + + /** + * ValidatorUpdate power. + * @member {number|Long} power + * @memberof tendermint.abci.ValidatorUpdate + * @instance + */ + ValidatorUpdate.prototype.power = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new ValidatorUpdate instance using the specified properties. + * @function create + * @memberof tendermint.abci.ValidatorUpdate + * @static + * @param {tendermint.abci.IValidatorUpdate=} [properties] Properties to set + * @returns {tendermint.abci.ValidatorUpdate} ValidatorUpdate instance + */ + ValidatorUpdate.create = function create(properties) { + return new ValidatorUpdate(properties); + }; + + /** + * Encodes the specified ValidatorUpdate message. Does not implicitly {@link tendermint.abci.ValidatorUpdate.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.ValidatorUpdate + * @static + * @param {tendermint.abci.IValidatorUpdate} message ValidatorUpdate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValidatorUpdate.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pubKey != null && Object.hasOwnProperty.call(message, "pubKey")) + $root.tendermint.crypto.PublicKey.encode(message.pubKey, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.power != null && Object.hasOwnProperty.call(message, "power")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.power); + return writer; + }; + + /** + * Encodes the specified ValidatorUpdate message, length delimited. Does not implicitly {@link tendermint.abci.ValidatorUpdate.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.ValidatorUpdate + * @static + * @param {tendermint.abci.IValidatorUpdate} message ValidatorUpdate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValidatorUpdate.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ValidatorUpdate message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.ValidatorUpdate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.ValidatorUpdate} ValidatorUpdate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValidatorUpdate.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.ValidatorUpdate(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.pubKey = $root.tendermint.crypto.PublicKey.decode(reader, reader.uint32()); + break; + case 2: + message.power = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ValidatorUpdate message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.ValidatorUpdate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.ValidatorUpdate} ValidatorUpdate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValidatorUpdate.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ValidatorUpdate message. + * @function verify + * @memberof tendermint.abci.ValidatorUpdate + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ValidatorUpdate.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.pubKey != null && message.hasOwnProperty("pubKey")) { + var error = $root.tendermint.crypto.PublicKey.verify(message.pubKey); + if (error) + return "pubKey." + error; + } + if (message.power != null && message.hasOwnProperty("power")) + if (!$util.isInteger(message.power) && !(message.power && $util.isInteger(message.power.low) && $util.isInteger(message.power.high))) + return "power: integer|Long expected"; + return null; + }; + + /** + * Creates a ValidatorUpdate message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.ValidatorUpdate + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.ValidatorUpdate} ValidatorUpdate + */ + ValidatorUpdate.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.ValidatorUpdate) + return object; + var message = new $root.tendermint.abci.ValidatorUpdate(); + if (object.pubKey != null) { + if (typeof object.pubKey !== "object") + throw TypeError(".tendermint.abci.ValidatorUpdate.pubKey: object expected"); + message.pubKey = $root.tendermint.crypto.PublicKey.fromObject(object.pubKey); + } + if (object.power != null) + if ($util.Long) + (message.power = $util.Long.fromValue(object.power)).unsigned = false; + else if (typeof object.power === "string") + message.power = parseInt(object.power, 10); + else if (typeof object.power === "number") + message.power = object.power; + else if (typeof object.power === "object") + message.power = new $util.LongBits(object.power.low >>> 0, object.power.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a ValidatorUpdate message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.ValidatorUpdate + * @static + * @param {tendermint.abci.ValidatorUpdate} message ValidatorUpdate + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ValidatorUpdate.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.pubKey = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.power = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.power = options.longs === String ? "0" : 0; + } + if (message.pubKey != null && message.hasOwnProperty("pubKey")) + object.pubKey = $root.tendermint.crypto.PublicKey.toObject(message.pubKey, options); + if (message.power != null && message.hasOwnProperty("power")) + if (typeof message.power === "number") + object.power = options.longs === String ? String(message.power) : message.power; + else + object.power = options.longs === String ? $util.Long.prototype.toString.call(message.power) : options.longs === Number ? new $util.LongBits(message.power.low >>> 0, message.power.high >>> 0).toNumber() : message.power; + return object; + }; + + /** + * Converts this ValidatorUpdate to JSON. + * @function toJSON + * @memberof tendermint.abci.ValidatorUpdate + * @instance + * @returns {Object.} JSON object + */ + ValidatorUpdate.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ValidatorUpdate; + })(abci.ValidatorUpdate || {}); + + abci.VoteInfo = (function(VoteInfo) { + + /** + * Properties of a VoteInfo. + * @memberof tendermint.abci + * @interface IVoteInfo + * @property {tendermint.abci.IValidator|null} [validator] VoteInfo validator + * @property {boolean|null} [signedLastBlock] VoteInfo signedLastBlock + */ + + /** + * Constructs a new VoteInfo. + * @memberof tendermint.abci + * @classdesc Represents a VoteInfo. + * @implements IVoteInfo + * @constructor + * @param {tendermint.abci.IVoteInfo=} [properties] Properties to set + */ + function VoteInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * VoteInfo validator. + * @member {tendermint.abci.IValidator|null|undefined} validator + * @memberof tendermint.abci.VoteInfo + * @instance + */ + VoteInfo.prototype.validator = null; + + /** + * VoteInfo signedLastBlock. + * @member {boolean} signedLastBlock + * @memberof tendermint.abci.VoteInfo + * @instance + */ + VoteInfo.prototype.signedLastBlock = false; + + /** + * Creates a new VoteInfo instance using the specified properties. + * @function create + * @memberof tendermint.abci.VoteInfo + * @static + * @param {tendermint.abci.IVoteInfo=} [properties] Properties to set + * @returns {tendermint.abci.VoteInfo} VoteInfo instance + */ + VoteInfo.create = function create(properties) { + return new VoteInfo(properties); + }; + + /** + * Encodes the specified VoteInfo message. Does not implicitly {@link tendermint.abci.VoteInfo.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.VoteInfo + * @static + * @param {tendermint.abci.IVoteInfo} message VoteInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VoteInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.validator != null && Object.hasOwnProperty.call(message, "validator")) + $root.tendermint.abci.Validator.encode(message.validator, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.signedLastBlock != null && Object.hasOwnProperty.call(message, "signedLastBlock")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.signedLastBlock); + return writer; + }; + + /** + * Encodes the specified VoteInfo message, length delimited. Does not implicitly {@link tendermint.abci.VoteInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.VoteInfo + * @static + * @param {tendermint.abci.IVoteInfo} message VoteInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VoteInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VoteInfo message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.VoteInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.VoteInfo} VoteInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VoteInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.VoteInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.validator = $root.tendermint.abci.Validator.decode(reader, reader.uint32()); + break; + case 2: + message.signedLastBlock = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VoteInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.VoteInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.VoteInfo} VoteInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VoteInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VoteInfo message. + * @function verify + * @memberof tendermint.abci.VoteInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VoteInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.validator != null && message.hasOwnProperty("validator")) { + var error = $root.tendermint.abci.Validator.verify(message.validator); + if (error) + return "validator." + error; + } + if (message.signedLastBlock != null && message.hasOwnProperty("signedLastBlock")) + if (typeof message.signedLastBlock !== "boolean") + return "signedLastBlock: boolean expected"; + return null; + }; + + /** + * Creates a VoteInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.VoteInfo + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.VoteInfo} VoteInfo + */ + VoteInfo.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.VoteInfo) + return object; + var message = new $root.tendermint.abci.VoteInfo(); + if (object.validator != null) { + if (typeof object.validator !== "object") + throw TypeError(".tendermint.abci.VoteInfo.validator: object expected"); + message.validator = $root.tendermint.abci.Validator.fromObject(object.validator); + } + if (object.signedLastBlock != null) + message.signedLastBlock = Boolean(object.signedLastBlock); + return message; + }; + + /** + * Creates a plain object from a VoteInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.VoteInfo + * @static + * @param {tendermint.abci.VoteInfo} message VoteInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VoteInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.validator = null; + object.signedLastBlock = false; + } + if (message.validator != null && message.hasOwnProperty("validator")) + object.validator = $root.tendermint.abci.Validator.toObject(message.validator, options); + if (message.signedLastBlock != null && message.hasOwnProperty("signedLastBlock")) + object.signedLastBlock = message.signedLastBlock; + return object; + }; + + /** + * Converts this VoteInfo to JSON. + * @function toJSON + * @memberof tendermint.abci.VoteInfo + * @instance + * @returns {Object.} JSON object + */ + VoteInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return VoteInfo; + })(abci.VoteInfo || {}); + + /** + * EvidenceType enum. + * @name tendermint.abci.EvidenceType + * @enum {string} + * @property {number} UNKNOWN=0 UNKNOWN value + * @property {number} DUPLICATE_VOTE=1 DUPLICATE_VOTE value + * @property {number} LIGHT_CLIENT_ATTACK=2 LIGHT_CLIENT_ATTACK value + */ + abci.EvidenceType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNKNOWN"] = 0; + values[valuesById[1] = "DUPLICATE_VOTE"] = 1; + values[valuesById[2] = "LIGHT_CLIENT_ATTACK"] = 2; + return values; + })(); + + abci.Evidence = (function(Evidence) { + + /** + * Properties of an Evidence. + * @memberof tendermint.abci + * @interface IEvidence + * @property {tendermint.abci.EvidenceType|null} [type] Evidence type + * @property {tendermint.abci.IValidator|null} [validator] Evidence validator + * @property {number|Long|null} [height] Evidence height + * @property {google.protobuf.ITimestamp|null} [time] Evidence time + * @property {number|Long|null} [totalVotingPower] Evidence totalVotingPower + */ + + /** + * Constructs a new Evidence. + * @memberof tendermint.abci + * @classdesc Represents an Evidence. + * @implements IEvidence + * @constructor + * @param {tendermint.abci.IEvidence=} [properties] Properties to set + */ + function Evidence(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Evidence type. + * @member {tendermint.abci.EvidenceType} type + * @memberof tendermint.abci.Evidence + * @instance + */ + Evidence.prototype.type = 0; + + /** + * Evidence validator. + * @member {tendermint.abci.IValidator|null|undefined} validator + * @memberof tendermint.abci.Evidence + * @instance + */ + Evidence.prototype.validator = null; + + /** + * Evidence height. + * @member {number|Long} height + * @memberof tendermint.abci.Evidence + * @instance + */ + Evidence.prototype.height = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Evidence time. + * @member {google.protobuf.ITimestamp|null|undefined} time + * @memberof tendermint.abci.Evidence + * @instance + */ + Evidence.prototype.time = null; + + /** + * Evidence totalVotingPower. + * @member {number|Long} totalVotingPower + * @memberof tendermint.abci.Evidence + * @instance + */ + Evidence.prototype.totalVotingPower = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new Evidence instance using the specified properties. + * @function create + * @memberof tendermint.abci.Evidence + * @static + * @param {tendermint.abci.IEvidence=} [properties] Properties to set + * @returns {tendermint.abci.Evidence} Evidence instance + */ + Evidence.create = function create(properties) { + return new Evidence(properties); + }; + + /** + * Encodes the specified Evidence message. Does not implicitly {@link tendermint.abci.Evidence.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.Evidence + * @static + * @param {tendermint.abci.IEvidence} message Evidence message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Evidence.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); + if (message.validator != null && Object.hasOwnProperty.call(message, "validator")) + $root.tendermint.abci.Validator.encode(message.validator, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.height != null && Object.hasOwnProperty.call(message, "height")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.height); + if (message.time != null && Object.hasOwnProperty.call(message, "time")) + $root.google.protobuf.Timestamp.encode(message.time, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.totalVotingPower != null && Object.hasOwnProperty.call(message, "totalVotingPower")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.totalVotingPower); + return writer; + }; + + /** + * Encodes the specified Evidence message, length delimited. Does not implicitly {@link tendermint.abci.Evidence.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.Evidence + * @static + * @param {tendermint.abci.IEvidence} message Evidence message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Evidence.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Evidence message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.Evidence + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.Evidence} Evidence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Evidence.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.Evidence(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type = reader.int32(); + break; + case 2: + message.validator = $root.tendermint.abci.Validator.decode(reader, reader.uint32()); + break; + case 3: + message.height = reader.int64(); + break; + case 4: + message.time = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 5: + message.totalVotingPower = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Evidence message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.Evidence + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.Evidence} Evidence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Evidence.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Evidence message. + * @function verify + * @memberof tendermint.abci.Evidence + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Evidence.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.validator != null && message.hasOwnProperty("validator")) { + var error = $root.tendermint.abci.Validator.verify(message.validator); + if (error) + return "validator." + error; + } + if (message.height != null && message.hasOwnProperty("height")) + if (!$util.isInteger(message.height) && !(message.height && $util.isInteger(message.height.low) && $util.isInteger(message.height.high))) + return "height: integer|Long expected"; + if (message.time != null && message.hasOwnProperty("time")) { + var error = $root.google.protobuf.Timestamp.verify(message.time); + if (error) + return "time." + error; + } + if (message.totalVotingPower != null && message.hasOwnProperty("totalVotingPower")) + if (!$util.isInteger(message.totalVotingPower) && !(message.totalVotingPower && $util.isInteger(message.totalVotingPower.low) && $util.isInteger(message.totalVotingPower.high))) + return "totalVotingPower: integer|Long expected"; + return null; + }; + + /** + * Creates an Evidence message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.Evidence + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.Evidence} Evidence + */ + Evidence.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.Evidence) + return object; + var message = new $root.tendermint.abci.Evidence(); + switch (object.type) { + case "UNKNOWN": + case 0: + message.type = 0; + break; + case "DUPLICATE_VOTE": + case 1: + message.type = 1; + break; + case "LIGHT_CLIENT_ATTACK": + case 2: + message.type = 2; + break; + } + if (object.validator != null) { + if (typeof object.validator !== "object") + throw TypeError(".tendermint.abci.Evidence.validator: object expected"); + message.validator = $root.tendermint.abci.Validator.fromObject(object.validator); + } + if (object.height != null) + if ($util.Long) + (message.height = $util.Long.fromValue(object.height)).unsigned = false; + else if (typeof object.height === "string") + message.height = parseInt(object.height, 10); + else if (typeof object.height === "number") + message.height = object.height; + else if (typeof object.height === "object") + message.height = new $util.LongBits(object.height.low >>> 0, object.height.high >>> 0).toNumber(); + if (object.time != null) { + if (typeof object.time !== "object") + throw TypeError(".tendermint.abci.Evidence.time: object expected"); + message.time = $root.google.protobuf.Timestamp.fromObject(object.time); + } + if (object.totalVotingPower != null) + if ($util.Long) + (message.totalVotingPower = $util.Long.fromValue(object.totalVotingPower)).unsigned = false; + else if (typeof object.totalVotingPower === "string") + message.totalVotingPower = parseInt(object.totalVotingPower, 10); + else if (typeof object.totalVotingPower === "number") + message.totalVotingPower = object.totalVotingPower; + else if (typeof object.totalVotingPower === "object") + message.totalVotingPower = new $util.LongBits(object.totalVotingPower.low >>> 0, object.totalVotingPower.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from an Evidence message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.Evidence + * @static + * @param {tendermint.abci.Evidence} message Evidence + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Evidence.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = options.enums === String ? "UNKNOWN" : 0; + object.validator = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.height = options.longs === String ? "0" : 0; + object.time = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.totalVotingPower = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.totalVotingPower = options.longs === String ? "0" : 0; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.tendermint.abci.EvidenceType[message.type] : message.type; + if (message.validator != null && message.hasOwnProperty("validator")) + object.validator = $root.tendermint.abci.Validator.toObject(message.validator, options); + if (message.height != null && message.hasOwnProperty("height")) + if (typeof message.height === "number") + object.height = options.longs === String ? String(message.height) : message.height; + else + object.height = options.longs === String ? $util.Long.prototype.toString.call(message.height) : options.longs === Number ? new $util.LongBits(message.height.low >>> 0, message.height.high >>> 0).toNumber() : message.height; + if (message.time != null && message.hasOwnProperty("time")) + object.time = $root.google.protobuf.Timestamp.toObject(message.time, options); + if (message.totalVotingPower != null && message.hasOwnProperty("totalVotingPower")) + if (typeof message.totalVotingPower === "number") + object.totalVotingPower = options.longs === String ? String(message.totalVotingPower) : message.totalVotingPower; + else + object.totalVotingPower = options.longs === String ? $util.Long.prototype.toString.call(message.totalVotingPower) : options.longs === Number ? new $util.LongBits(message.totalVotingPower.low >>> 0, message.totalVotingPower.high >>> 0).toNumber() : message.totalVotingPower; + return object; + }; + + /** + * Converts this Evidence to JSON. + * @function toJSON + * @memberof tendermint.abci.Evidence + * @instance + * @returns {Object.} JSON object + */ + Evidence.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Evidence; + })(abci.Evidence || {}); + + abci.Snapshot = (function(Snapshot) { + + /** + * Properties of a Snapshot. + * @memberof tendermint.abci + * @interface ISnapshot + * @property {number|Long|null} [height] Snapshot height + * @property {number|null} [format] Snapshot format + * @property {number|null} [chunks] Snapshot chunks + * @property {Uint8Array|null} [hash] Snapshot hash + * @property {Uint8Array|null} [metadata] Snapshot metadata + */ + + /** + * Constructs a new Snapshot. + * @memberof tendermint.abci + * @classdesc Represents a Snapshot. + * @implements ISnapshot + * @constructor + * @param {tendermint.abci.ISnapshot=} [properties] Properties to set + */ + function Snapshot(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Snapshot height. + * @member {number|Long} height + * @memberof tendermint.abci.Snapshot + * @instance + */ + Snapshot.prototype.height = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Snapshot format. + * @member {number} format + * @memberof tendermint.abci.Snapshot + * @instance + */ + Snapshot.prototype.format = 0; + + /** + * Snapshot chunks. + * @member {number} chunks + * @memberof tendermint.abci.Snapshot + * @instance + */ + Snapshot.prototype.chunks = 0; + + /** + * Snapshot hash. + * @member {Uint8Array} hash + * @memberof tendermint.abci.Snapshot + * @instance + */ + Snapshot.prototype.hash = $util.newBuffer([]); + + /** + * Snapshot metadata. + * @member {Uint8Array} metadata + * @memberof tendermint.abci.Snapshot + * @instance + */ + Snapshot.prototype.metadata = $util.newBuffer([]); + + /** + * Creates a new Snapshot instance using the specified properties. + * @function create + * @memberof tendermint.abci.Snapshot + * @static + * @param {tendermint.abci.ISnapshot=} [properties] Properties to set + * @returns {tendermint.abci.Snapshot} Snapshot instance + */ + Snapshot.create = function create(properties) { + return new Snapshot(properties); + }; + + /** + * Encodes the specified Snapshot message. Does not implicitly {@link tendermint.abci.Snapshot.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.Snapshot + * @static + * @param {tendermint.abci.ISnapshot} message Snapshot message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Snapshot.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.height != null && Object.hasOwnProperty.call(message, "height")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.height); + if (message.format != null && Object.hasOwnProperty.call(message, "format")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.format); + if (message.chunks != null && Object.hasOwnProperty.call(message, "chunks")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.chunks); + if (message.hash != null && Object.hasOwnProperty.call(message, "hash")) + writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.hash); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.metadata); + return writer; + }; + + /** + * Encodes the specified Snapshot message, length delimited. Does not implicitly {@link tendermint.abci.Snapshot.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.Snapshot + * @static + * @param {tendermint.abci.ISnapshot} message Snapshot message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Snapshot.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Snapshot message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.Snapshot + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.Snapshot} Snapshot + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Snapshot.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.Snapshot(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.height = reader.uint64(); + break; + case 2: + message.format = reader.uint32(); + break; + case 3: + message.chunks = reader.uint32(); + break; + case 4: + message.hash = reader.bytes(); + break; + case 5: + message.metadata = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Snapshot message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.Snapshot + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.Snapshot} Snapshot + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Snapshot.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Snapshot message. + * @function verify + * @memberof tendermint.abci.Snapshot + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Snapshot.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.height != null && message.hasOwnProperty("height")) + if (!$util.isInteger(message.height) && !(message.height && $util.isInteger(message.height.low) && $util.isInteger(message.height.high))) + return "height: integer|Long expected"; + if (message.format != null && message.hasOwnProperty("format")) + if (!$util.isInteger(message.format)) + return "format: integer expected"; + if (message.chunks != null && message.hasOwnProperty("chunks")) + if (!$util.isInteger(message.chunks)) + return "chunks: integer expected"; + if (message.hash != null && message.hasOwnProperty("hash")) + if (!(message.hash && typeof message.hash.length === "number" || $util.isString(message.hash))) + return "hash: buffer expected"; + if (message.metadata != null && message.hasOwnProperty("metadata")) + if (!(message.metadata && typeof message.metadata.length === "number" || $util.isString(message.metadata))) + return "metadata: buffer expected"; + return null; + }; + + /** + * Creates a Snapshot message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.Snapshot + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.Snapshot} Snapshot + */ + Snapshot.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.Snapshot) + return object; + var message = new $root.tendermint.abci.Snapshot(); + if (object.height != null) + if ($util.Long) + (message.height = $util.Long.fromValue(object.height)).unsigned = true; + else if (typeof object.height === "string") + message.height = parseInt(object.height, 10); + else if (typeof object.height === "number") + message.height = object.height; + else if (typeof object.height === "object") + message.height = new $util.LongBits(object.height.low >>> 0, object.height.high >>> 0).toNumber(true); + if (object.format != null) + message.format = object.format >>> 0; + if (object.chunks != null) + message.chunks = object.chunks >>> 0; + if (object.hash != null) + if (typeof object.hash === "string") + $util.base64.decode(object.hash, message.hash = $util.newBuffer($util.base64.length(object.hash)), 0); + else if (object.hash.length) + message.hash = object.hash; + if (object.metadata != null) + if (typeof object.metadata === "string") + $util.base64.decode(object.metadata, message.metadata = $util.newBuffer($util.base64.length(object.metadata)), 0); + else if (object.metadata.length) + message.metadata = object.metadata; + return message; + }; + + /** + * Creates a plain object from a Snapshot message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.Snapshot + * @static + * @param {tendermint.abci.Snapshot} message Snapshot + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Snapshot.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.height = options.longs === String ? "0" : 0; + object.format = 0; + object.chunks = 0; + if (options.bytes === String) + object.hash = ""; + else { + object.hash = []; + if (options.bytes !== Array) + object.hash = $util.newBuffer(object.hash); + } + if (options.bytes === String) + object.metadata = ""; + else { + object.metadata = []; + if (options.bytes !== Array) + object.metadata = $util.newBuffer(object.metadata); + } + } + if (message.height != null && message.hasOwnProperty("height")) + if (typeof message.height === "number") + object.height = options.longs === String ? String(message.height) : message.height; + else + object.height = options.longs === String ? $util.Long.prototype.toString.call(message.height) : options.longs === Number ? new $util.LongBits(message.height.low >>> 0, message.height.high >>> 0).toNumber(true) : message.height; + if (message.format != null && message.hasOwnProperty("format")) + object.format = message.format; + if (message.chunks != null && message.hasOwnProperty("chunks")) + object.chunks = message.chunks; + if (message.hash != null && message.hasOwnProperty("hash")) + object.hash = options.bytes === String ? $util.base64.encode(message.hash, 0, message.hash.length) : options.bytes === Array ? Array.prototype.slice.call(message.hash) : message.hash; + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = options.bytes === String ? $util.base64.encode(message.metadata, 0, message.metadata.length) : options.bytes === Array ? Array.prototype.slice.call(message.metadata) : message.metadata; + return object; + }; + + /** + * Converts this Snapshot to JSON. + * @function toJSON + * @memberof tendermint.abci.Snapshot + * @instance + * @returns {Object.} JSON object + */ + Snapshot.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Snapshot; + })(abci.Snapshot || {}); + + abci.ABCIApplication = (function(ABCIApplication) { + + /** + * Constructs a new ABCIApplication service. + * @memberof tendermint.abci + * @classdesc Represents a ABCIApplication + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function ABCIApplication(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (ABCIApplication.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ABCIApplication; + + /** + * Creates new ABCIApplication service using the specified rpc implementation. + * @function create + * @memberof tendermint.abci.ABCIApplication + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {ABCIApplication} RPC service. Useful where requests and/or responses are streamed. + */ + ABCIApplication.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link tendermint.abci.ABCIApplication#echo}. + * @memberof tendermint.abci.ABCIApplication + * @typedef EchoCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {tendermint.abci.IResponseEcho} [response] ResponseEcho + */ + + /** + * Calls Echo. + * @function echo + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestEcho} request RequestEcho message or plain object + * @param {tendermint.abci.ABCIApplication.EchoCallback} callback Node-style callback called with the error, if any, and ResponseEcho + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ABCIApplication.prototype.echo = function echo(request, callback) { + return this.rpcCall(echo, $root.tendermint.abci.RequestEcho, $root.tendermint.abci.ResponseEcho, request, callback); + }, "name", { value: "Echo" }); + + /** + * Calls Echo. + * @function echo + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestEcho} request RequestEcho message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link tendermint.abci.ABCIApplication#flush}. + * @memberof tendermint.abci.ABCIApplication + * @typedef FlushCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {tendermint.abci.IResponseFlush} [response] ResponseFlush + */ + + /** + * Calls Flush. + * @function flush + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestFlush} request RequestFlush message or plain object + * @param {tendermint.abci.ABCIApplication.FlushCallback} callback Node-style callback called with the error, if any, and ResponseFlush + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ABCIApplication.prototype.flush = function flush(request, callback) { + return this.rpcCall(flush, $root.tendermint.abci.RequestFlush, $root.tendermint.abci.ResponseFlush, request, callback); + }, "name", { value: "Flush" }); + + /** + * Calls Flush. + * @function flush + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestFlush} request RequestFlush message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link tendermint.abci.ABCIApplication#info}. + * @memberof tendermint.abci.ABCIApplication + * @typedef InfoCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {tendermint.abci.IResponseInfo} [response] ResponseInfo + */ + + /** + * Calls Info. + * @function info + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestInfo} request RequestInfo message or plain object + * @param {tendermint.abci.ABCIApplication.InfoCallback} callback Node-style callback called with the error, if any, and ResponseInfo + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ABCIApplication.prototype.info = function info(request, callback) { + return this.rpcCall(info, $root.tendermint.abci.RequestInfo, $root.tendermint.abci.ResponseInfo, request, callback); + }, "name", { value: "Info" }); + + /** + * Calls Info. + * @function info + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestInfo} request RequestInfo message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link tendermint.abci.ABCIApplication#setOption}. + * @memberof tendermint.abci.ABCIApplication + * @typedef SetOptionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {tendermint.abci.IResponseSetOption} [response] ResponseSetOption + */ + + /** + * Calls SetOption. + * @function setOption + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestSetOption} request RequestSetOption message or plain object + * @param {tendermint.abci.ABCIApplication.SetOptionCallback} callback Node-style callback called with the error, if any, and ResponseSetOption + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ABCIApplication.prototype.setOption = function setOption(request, callback) { + return this.rpcCall(setOption, $root.tendermint.abci.RequestSetOption, $root.tendermint.abci.ResponseSetOption, request, callback); + }, "name", { value: "SetOption" }); + + /** + * Calls SetOption. + * @function setOption + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestSetOption} request RequestSetOption message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link tendermint.abci.ABCIApplication#deliverTx}. + * @memberof tendermint.abci.ABCIApplication + * @typedef DeliverTxCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {tendermint.abci.IResponseDeliverTx} [response] ResponseDeliverTx + */ + + /** + * Calls DeliverTx. + * @function deliverTx + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestDeliverTx} request RequestDeliverTx message or plain object + * @param {tendermint.abci.ABCIApplication.DeliverTxCallback} callback Node-style callback called with the error, if any, and ResponseDeliverTx + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ABCIApplication.prototype.deliverTx = function deliverTx(request, callback) { + return this.rpcCall(deliverTx, $root.tendermint.abci.RequestDeliverTx, $root.tendermint.abci.ResponseDeliverTx, request, callback); + }, "name", { value: "DeliverTx" }); + + /** + * Calls DeliverTx. + * @function deliverTx + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestDeliverTx} request RequestDeliverTx message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link tendermint.abci.ABCIApplication#checkTx}. + * @memberof tendermint.abci.ABCIApplication + * @typedef CheckTxCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {tendermint.abci.IResponseCheckTx} [response] ResponseCheckTx + */ + + /** + * Calls CheckTx. + * @function checkTx + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestCheckTx} request RequestCheckTx message or plain object + * @param {tendermint.abci.ABCIApplication.CheckTxCallback} callback Node-style callback called with the error, if any, and ResponseCheckTx + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ABCIApplication.prototype.checkTx = function checkTx(request, callback) { + return this.rpcCall(checkTx, $root.tendermint.abci.RequestCheckTx, $root.tendermint.abci.ResponseCheckTx, request, callback); + }, "name", { value: "CheckTx" }); + + /** + * Calls CheckTx. + * @function checkTx + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestCheckTx} request RequestCheckTx message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link tendermint.abci.ABCIApplication#query}. + * @memberof tendermint.abci.ABCIApplication + * @typedef QueryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {tendermint.abci.IResponseQuery} [response] ResponseQuery + */ + + /** + * Calls Query. + * @function query + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestQuery} request RequestQuery message or plain object + * @param {tendermint.abci.ABCIApplication.QueryCallback} callback Node-style callback called with the error, if any, and ResponseQuery + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ABCIApplication.prototype.query = function query(request, callback) { + return this.rpcCall(query, $root.tendermint.abci.RequestQuery, $root.tendermint.abci.ResponseQuery, request, callback); + }, "name", { value: "Query" }); + + /** + * Calls Query. + * @function query + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestQuery} request RequestQuery message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link tendermint.abci.ABCIApplication#commit}. + * @memberof tendermint.abci.ABCIApplication + * @typedef CommitCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {tendermint.abci.IResponseCommit} [response] ResponseCommit + */ + + /** + * Calls Commit. + * @function commit + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestCommit} request RequestCommit message or plain object + * @param {tendermint.abci.ABCIApplication.CommitCallback} callback Node-style callback called with the error, if any, and ResponseCommit + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ABCIApplication.prototype.commit = function commit(request, callback) { + return this.rpcCall(commit, $root.tendermint.abci.RequestCommit, $root.tendermint.abci.ResponseCommit, request, callback); + }, "name", { value: "Commit" }); + + /** + * Calls Commit. + * @function commit + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestCommit} request RequestCommit message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link tendermint.abci.ABCIApplication#initChain}. + * @memberof tendermint.abci.ABCIApplication + * @typedef InitChainCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {tendermint.abci.IResponseInitChain} [response] ResponseInitChain + */ + + /** + * Calls InitChain. + * @function initChain + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestInitChain} request RequestInitChain message or plain object + * @param {tendermint.abci.ABCIApplication.InitChainCallback} callback Node-style callback called with the error, if any, and ResponseInitChain + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ABCIApplication.prototype.initChain = function initChain(request, callback) { + return this.rpcCall(initChain, $root.tendermint.abci.RequestInitChain, $root.tendermint.abci.ResponseInitChain, request, callback); + }, "name", { value: "InitChain" }); + + /** + * Calls InitChain. + * @function initChain + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestInitChain} request RequestInitChain message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link tendermint.abci.ABCIApplication#beginBlock}. + * @memberof tendermint.abci.ABCIApplication + * @typedef BeginBlockCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {tendermint.abci.IResponseBeginBlock} [response] ResponseBeginBlock + */ + + /** + * Calls BeginBlock. + * @function beginBlock + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestBeginBlock} request RequestBeginBlock message or plain object + * @param {tendermint.abci.ABCIApplication.BeginBlockCallback} callback Node-style callback called with the error, if any, and ResponseBeginBlock + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ABCIApplication.prototype.beginBlock = function beginBlock(request, callback) { + return this.rpcCall(beginBlock, $root.tendermint.abci.RequestBeginBlock, $root.tendermint.abci.ResponseBeginBlock, request, callback); + }, "name", { value: "BeginBlock" }); + + /** + * Calls BeginBlock. + * @function beginBlock + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestBeginBlock} request RequestBeginBlock message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link tendermint.abci.ABCIApplication#endBlock}. + * @memberof tendermint.abci.ABCIApplication + * @typedef EndBlockCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {tendermint.abci.IResponseEndBlock} [response] ResponseEndBlock + */ + + /** + * Calls EndBlock. + * @function endBlock + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestEndBlock} request RequestEndBlock message or plain object + * @param {tendermint.abci.ABCIApplication.EndBlockCallback} callback Node-style callback called with the error, if any, and ResponseEndBlock + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ABCIApplication.prototype.endBlock = function endBlock(request, callback) { + return this.rpcCall(endBlock, $root.tendermint.abci.RequestEndBlock, $root.tendermint.abci.ResponseEndBlock, request, callback); + }, "name", { value: "EndBlock" }); + + /** + * Calls EndBlock. + * @function endBlock + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestEndBlock} request RequestEndBlock message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link tendermint.abci.ABCIApplication#listSnapshots}. + * @memberof tendermint.abci.ABCIApplication + * @typedef ListSnapshotsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {tendermint.abci.IResponseListSnapshots} [response] ResponseListSnapshots + */ + + /** + * Calls ListSnapshots. + * @function listSnapshots + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestListSnapshots} request RequestListSnapshots message or plain object + * @param {tendermint.abci.ABCIApplication.ListSnapshotsCallback} callback Node-style callback called with the error, if any, and ResponseListSnapshots + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ABCIApplication.prototype.listSnapshots = function listSnapshots(request, callback) { + return this.rpcCall(listSnapshots, $root.tendermint.abci.RequestListSnapshots, $root.tendermint.abci.ResponseListSnapshots, request, callback); + }, "name", { value: "ListSnapshots" }); + + /** + * Calls ListSnapshots. + * @function listSnapshots + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestListSnapshots} request RequestListSnapshots message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link tendermint.abci.ABCIApplication#offerSnapshot}. + * @memberof tendermint.abci.ABCIApplication + * @typedef OfferSnapshotCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {tendermint.abci.IResponseOfferSnapshot} [response] ResponseOfferSnapshot + */ + + /** + * Calls OfferSnapshot. + * @function offerSnapshot + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestOfferSnapshot} request RequestOfferSnapshot message or plain object + * @param {tendermint.abci.ABCIApplication.OfferSnapshotCallback} callback Node-style callback called with the error, if any, and ResponseOfferSnapshot + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ABCIApplication.prototype.offerSnapshot = function offerSnapshot(request, callback) { + return this.rpcCall(offerSnapshot, $root.tendermint.abci.RequestOfferSnapshot, $root.tendermint.abci.ResponseOfferSnapshot, request, callback); + }, "name", { value: "OfferSnapshot" }); + + /** + * Calls OfferSnapshot. + * @function offerSnapshot + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestOfferSnapshot} request RequestOfferSnapshot message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link tendermint.abci.ABCIApplication#loadSnapshotChunk}. + * @memberof tendermint.abci.ABCIApplication + * @typedef LoadSnapshotChunkCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {tendermint.abci.IResponseLoadSnapshotChunk} [response] ResponseLoadSnapshotChunk + */ + + /** + * Calls LoadSnapshotChunk. + * @function loadSnapshotChunk + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestLoadSnapshotChunk} request RequestLoadSnapshotChunk message or plain object + * @param {tendermint.abci.ABCIApplication.LoadSnapshotChunkCallback} callback Node-style callback called with the error, if any, and ResponseLoadSnapshotChunk + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ABCIApplication.prototype.loadSnapshotChunk = function loadSnapshotChunk(request, callback) { + return this.rpcCall(loadSnapshotChunk, $root.tendermint.abci.RequestLoadSnapshotChunk, $root.tendermint.abci.ResponseLoadSnapshotChunk, request, callback); + }, "name", { value: "LoadSnapshotChunk" }); + + /** + * Calls LoadSnapshotChunk. + * @function loadSnapshotChunk + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestLoadSnapshotChunk} request RequestLoadSnapshotChunk message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link tendermint.abci.ABCIApplication#applySnapshotChunk}. + * @memberof tendermint.abci.ABCIApplication + * @typedef ApplySnapshotChunkCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {tendermint.abci.IResponseApplySnapshotChunk} [response] ResponseApplySnapshotChunk + */ + + /** + * Calls ApplySnapshotChunk. + * @function applySnapshotChunk + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestApplySnapshotChunk} request RequestApplySnapshotChunk message or plain object + * @param {tendermint.abci.ABCIApplication.ApplySnapshotChunkCallback} callback Node-style callback called with the error, if any, and ResponseApplySnapshotChunk + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ABCIApplication.prototype.applySnapshotChunk = function applySnapshotChunk(request, callback) { + return this.rpcCall(applySnapshotChunk, $root.tendermint.abci.RequestApplySnapshotChunk, $root.tendermint.abci.ResponseApplySnapshotChunk, request, callback); + }, "name", { value: "ApplySnapshotChunk" }); + + /** + * Calls ApplySnapshotChunk. + * @function applySnapshotChunk + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestApplySnapshotChunk} request RequestApplySnapshotChunk message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return ABCIApplication; + })(abci.ABCIApplication || {}); + + return abci; + })(tendermint.abci || {}); + + /** + * Namespace crypto. + * @memberof tendermint + * @namespace + */ + + tendermint.crypto = (function(crypto) { + + crypto.PublicKey = (function(PublicKey) { + + /** + * Properties of a PublicKey. + * @memberof tendermint.crypto + * @interface IPublicKey + * @property {Uint8Array|null} [ed25519] PublicKey ed25519 + * @property {Uint8Array|null} [secp256k1] PublicKey secp256k1 + */ + + /** + * Constructs a new PublicKey. + * @memberof tendermint.crypto + * @classdesc Represents a PublicKey. + * @implements IPublicKey + * @constructor + * @param {tendermint.crypto.IPublicKey=} [properties] Properties to set + */ + function PublicKey(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PublicKey ed25519. + * @member {Uint8Array} ed25519 + * @memberof tendermint.crypto.PublicKey + * @instance + */ + PublicKey.prototype.ed25519 = $util.newBuffer([]); + + /** + * PublicKey secp256k1. + * @member {Uint8Array} secp256k1 + * @memberof tendermint.crypto.PublicKey + * @instance + */ + PublicKey.prototype.secp256k1 = $util.newBuffer([]); + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * PublicKey sum. + * @member {"ed25519"|"secp256k1"|undefined} sum + * @memberof tendermint.crypto.PublicKey + * @instance + */ + Object.defineProperty(PublicKey.prototype, "sum", { + get: $util.oneOfGetter($oneOfFields = ["ed25519", "secp256k1"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new PublicKey instance using the specified properties. + * @function create + * @memberof tendermint.crypto.PublicKey + * @static + * @param {tendermint.crypto.IPublicKey=} [properties] Properties to set + * @returns {tendermint.crypto.PublicKey} PublicKey instance + */ + PublicKey.create = function create(properties) { + return new PublicKey(properties); + }; + + /** + * Encodes the specified PublicKey message. Does not implicitly {@link tendermint.crypto.PublicKey.verify|verify} messages. + * @function encode + * @memberof tendermint.crypto.PublicKey + * @static + * @param {tendermint.crypto.IPublicKey} message PublicKey message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PublicKey.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ed25519 != null && Object.hasOwnProperty.call(message, "ed25519")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.ed25519); + if (message.secp256k1 != null && Object.hasOwnProperty.call(message, "secp256k1")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.secp256k1); + return writer; + }; + + /** + * Encodes the specified PublicKey message, length delimited. Does not implicitly {@link tendermint.crypto.PublicKey.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.crypto.PublicKey + * @static + * @param {tendermint.crypto.IPublicKey} message PublicKey message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PublicKey.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PublicKey message from the specified reader or buffer. + * @function decode + * @memberof tendermint.crypto.PublicKey + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.crypto.PublicKey} PublicKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PublicKey.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.crypto.PublicKey(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.ed25519 = reader.bytes(); + break; + case 2: + message.secp256k1 = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PublicKey message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.crypto.PublicKey + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.crypto.PublicKey} PublicKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PublicKey.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PublicKey message. + * @function verify + * @memberof tendermint.crypto.PublicKey + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PublicKey.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.ed25519 != null && message.hasOwnProperty("ed25519")) { + properties.sum = 1; + if (!(message.ed25519 && typeof message.ed25519.length === "number" || $util.isString(message.ed25519))) + return "ed25519: buffer expected"; + } + if (message.secp256k1 != null && message.hasOwnProperty("secp256k1")) { + if (properties.sum === 1) + return "sum: multiple values"; + properties.sum = 1; + if (!(message.secp256k1 && typeof message.secp256k1.length === "number" || $util.isString(message.secp256k1))) + return "secp256k1: buffer expected"; + } + return null; + }; + + /** + * Creates a PublicKey message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.crypto.PublicKey + * @static + * @param {Object.} object Plain object + * @returns {tendermint.crypto.PublicKey} PublicKey + */ + PublicKey.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.crypto.PublicKey) + return object; + var message = new $root.tendermint.crypto.PublicKey(); + if (object.ed25519 != null) + if (typeof object.ed25519 === "string") + $util.base64.decode(object.ed25519, message.ed25519 = $util.newBuffer($util.base64.length(object.ed25519)), 0); + else if (object.ed25519.length) + message.ed25519 = object.ed25519; + if (object.secp256k1 != null) + if (typeof object.secp256k1 === "string") + $util.base64.decode(object.secp256k1, message.secp256k1 = $util.newBuffer($util.base64.length(object.secp256k1)), 0); + else if (object.secp256k1.length) + message.secp256k1 = object.secp256k1; + return message; + }; + + /** + * Creates a plain object from a PublicKey message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.crypto.PublicKey + * @static + * @param {tendermint.crypto.PublicKey} message PublicKey + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PublicKey.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.ed25519 != null && message.hasOwnProperty("ed25519")) { + object.ed25519 = options.bytes === String ? $util.base64.encode(message.ed25519, 0, message.ed25519.length) : options.bytes === Array ? Array.prototype.slice.call(message.ed25519) : message.ed25519; + if (options.oneofs) + object.sum = "ed25519"; + } + if (message.secp256k1 != null && message.hasOwnProperty("secp256k1")) { + object.secp256k1 = options.bytes === String ? $util.base64.encode(message.secp256k1, 0, message.secp256k1.length) : options.bytes === Array ? Array.prototype.slice.call(message.secp256k1) : message.secp256k1; + if (options.oneofs) + object.sum = "secp256k1"; + } + return object; + }; + + /** + * Converts this PublicKey to JSON. + * @function toJSON + * @memberof tendermint.crypto.PublicKey + * @instance + * @returns {Object.} JSON object + */ + PublicKey.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PublicKey; + })(crypto.PublicKey || {}); + + crypto.Proof = (function(Proof) { + + /** + * Properties of a Proof. + * @memberof tendermint.crypto + * @interface IProof + * @property {number|Long|null} [total] Proof total + * @property {number|Long|null} [index] Proof index + * @property {Uint8Array|null} [leafHash] Proof leafHash + * @property {Array.|null} [aunts] Proof aunts + */ + + /** + * Constructs a new Proof. + * @memberof tendermint.crypto + * @classdesc Represents a Proof. + * @implements IProof + * @constructor + * @param {tendermint.crypto.IProof=} [properties] Properties to set + */ + function Proof(properties) { + this.aunts = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Proof total. + * @member {number|Long} total + * @memberof tendermint.crypto.Proof + * @instance + */ + Proof.prototype.total = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Proof index. + * @member {number|Long} index + * @memberof tendermint.crypto.Proof + * @instance + */ + Proof.prototype.index = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Proof leafHash. + * @member {Uint8Array} leafHash + * @memberof tendermint.crypto.Proof + * @instance + */ + Proof.prototype.leafHash = $util.newBuffer([]); + + /** + * Proof aunts. + * @member {Array.} aunts + * @memberof tendermint.crypto.Proof + * @instance + */ + Proof.prototype.aunts = $util.emptyArray; + + /** + * Creates a new Proof instance using the specified properties. + * @function create + * @memberof tendermint.crypto.Proof + * @static + * @param {tendermint.crypto.IProof=} [properties] Properties to set + * @returns {tendermint.crypto.Proof} Proof instance + */ + Proof.create = function create(properties) { + return new Proof(properties); + }; + + /** + * Encodes the specified Proof message. Does not implicitly {@link tendermint.crypto.Proof.verify|verify} messages. + * @function encode + * @memberof tendermint.crypto.Proof + * @static + * @param {tendermint.crypto.IProof} message Proof message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Proof.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.total != null && Object.hasOwnProperty.call(message, "total")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.total); + if (message.index != null && Object.hasOwnProperty.call(message, "index")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.index); + if (message.leafHash != null && Object.hasOwnProperty.call(message, "leafHash")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.leafHash); + if (message.aunts != null && message.aunts.length) + for (var i = 0; i < message.aunts.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.aunts[i]); + return writer; + }; + + /** + * Encodes the specified Proof message, length delimited. Does not implicitly {@link tendermint.crypto.Proof.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.crypto.Proof + * @static + * @param {tendermint.crypto.IProof} message Proof message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Proof.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Proof message from the specified reader or buffer. + * @function decode + * @memberof tendermint.crypto.Proof + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.crypto.Proof} Proof + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Proof.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.crypto.Proof(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.total = reader.int64(); + break; + case 2: + message.index = reader.int64(); + break; + case 3: + message.leafHash = reader.bytes(); + break; + case 4: + if (!(message.aunts && message.aunts.length)) + message.aunts = []; + message.aunts.push(reader.bytes()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Proof message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.crypto.Proof + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.crypto.Proof} Proof + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Proof.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Proof message. + * @function verify + * @memberof tendermint.crypto.Proof + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Proof.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.total != null && message.hasOwnProperty("total")) + if (!$util.isInteger(message.total) && !(message.total && $util.isInteger(message.total.low) && $util.isInteger(message.total.high))) + return "total: integer|Long expected"; + if (message.index != null && message.hasOwnProperty("index")) + if (!$util.isInteger(message.index) && !(message.index && $util.isInteger(message.index.low) && $util.isInteger(message.index.high))) + return "index: integer|Long expected"; + if (message.leafHash != null && message.hasOwnProperty("leafHash")) + if (!(message.leafHash && typeof message.leafHash.length === "number" || $util.isString(message.leafHash))) + return "leafHash: buffer expected"; + if (message.aunts != null && message.hasOwnProperty("aunts")) { + if (!Array.isArray(message.aunts)) + return "aunts: array expected"; + for (var i = 0; i < message.aunts.length; ++i) + if (!(message.aunts[i] && typeof message.aunts[i].length === "number" || $util.isString(message.aunts[i]))) + return "aunts: buffer[] expected"; + } + return null; + }; + + /** + * Creates a Proof message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.crypto.Proof + * @static + * @param {Object.} object Plain object + * @returns {tendermint.crypto.Proof} Proof + */ + Proof.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.crypto.Proof) + return object; + var message = new $root.tendermint.crypto.Proof(); + if (object.total != null) + if ($util.Long) + (message.total = $util.Long.fromValue(object.total)).unsigned = false; + else if (typeof object.total === "string") + message.total = parseInt(object.total, 10); + else if (typeof object.total === "number") + message.total = object.total; + else if (typeof object.total === "object") + message.total = new $util.LongBits(object.total.low >>> 0, object.total.high >>> 0).toNumber(); + if (object.index != null) + if ($util.Long) + (message.index = $util.Long.fromValue(object.index)).unsigned = false; + else if (typeof object.index === "string") + message.index = parseInt(object.index, 10); + else if (typeof object.index === "number") + message.index = object.index; + else if (typeof object.index === "object") + message.index = new $util.LongBits(object.index.low >>> 0, object.index.high >>> 0).toNumber(); + if (object.leafHash != null) + if (typeof object.leafHash === "string") + $util.base64.decode(object.leafHash, message.leafHash = $util.newBuffer($util.base64.length(object.leafHash)), 0); + else if (object.leafHash.length) + message.leafHash = object.leafHash; + if (object.aunts) { + if (!Array.isArray(object.aunts)) + throw TypeError(".tendermint.crypto.Proof.aunts: array expected"); + message.aunts = []; + for (var i = 0; i < object.aunts.length; ++i) + if (typeof object.aunts[i] === "string") + $util.base64.decode(object.aunts[i], message.aunts[i] = $util.newBuffer($util.base64.length(object.aunts[i])), 0); + else if (object.aunts[i].length) + message.aunts[i] = object.aunts[i]; + } + return message; + }; + + /** + * Creates a plain object from a Proof message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.crypto.Proof + * @static + * @param {tendermint.crypto.Proof} message Proof + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Proof.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.aunts = []; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.total = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.total = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.index = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.index = options.longs === String ? "0" : 0; + if (options.bytes === String) + object.leafHash = ""; + else { + object.leafHash = []; + if (options.bytes !== Array) + object.leafHash = $util.newBuffer(object.leafHash); + } + } + if (message.total != null && message.hasOwnProperty("total")) + if (typeof message.total === "number") + object.total = options.longs === String ? String(message.total) : message.total; + else + object.total = options.longs === String ? $util.Long.prototype.toString.call(message.total) : options.longs === Number ? new $util.LongBits(message.total.low >>> 0, message.total.high >>> 0).toNumber() : message.total; + if (message.index != null && message.hasOwnProperty("index")) + if (typeof message.index === "number") + object.index = options.longs === String ? String(message.index) : message.index; + else + object.index = options.longs === String ? $util.Long.prototype.toString.call(message.index) : options.longs === Number ? new $util.LongBits(message.index.low >>> 0, message.index.high >>> 0).toNumber() : message.index; + if (message.leafHash != null && message.hasOwnProperty("leafHash")) + object.leafHash = options.bytes === String ? $util.base64.encode(message.leafHash, 0, message.leafHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.leafHash) : message.leafHash; + if (message.aunts && message.aunts.length) { + object.aunts = []; + for (var j = 0; j < message.aunts.length; ++j) + object.aunts[j] = options.bytes === String ? $util.base64.encode(message.aunts[j], 0, message.aunts[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.aunts[j]) : message.aunts[j]; + } + return object; + }; + + /** + * Converts this Proof to JSON. + * @function toJSON + * @memberof tendermint.crypto.Proof + * @instance + * @returns {Object.} JSON object + */ + Proof.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Proof; + })(crypto.Proof || {}); + + crypto.ValueOp = (function(ValueOp) { + + /** + * Properties of a ValueOp. + * @memberof tendermint.crypto + * @interface IValueOp + * @property {Uint8Array|null} [key] ValueOp key + * @property {tendermint.crypto.IProof|null} [proof] ValueOp proof + */ + + /** + * Constructs a new ValueOp. + * @memberof tendermint.crypto + * @classdesc Represents a ValueOp. + * @implements IValueOp + * @constructor + * @param {tendermint.crypto.IValueOp=} [properties] Properties to set + */ + function ValueOp(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ValueOp key. + * @member {Uint8Array} key + * @memberof tendermint.crypto.ValueOp + * @instance + */ + ValueOp.prototype.key = $util.newBuffer([]); + + /** + * ValueOp proof. + * @member {tendermint.crypto.IProof|null|undefined} proof + * @memberof tendermint.crypto.ValueOp + * @instance + */ + ValueOp.prototype.proof = null; + + /** + * Creates a new ValueOp instance using the specified properties. + * @function create + * @memberof tendermint.crypto.ValueOp + * @static + * @param {tendermint.crypto.IValueOp=} [properties] Properties to set + * @returns {tendermint.crypto.ValueOp} ValueOp instance + */ + ValueOp.create = function create(properties) { + return new ValueOp(properties); + }; + + /** + * Encodes the specified ValueOp message. Does not implicitly {@link tendermint.crypto.ValueOp.verify|verify} messages. + * @function encode + * @memberof tendermint.crypto.ValueOp + * @static + * @param {tendermint.crypto.IValueOp} message ValueOp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValueOp.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.key); + if (message.proof != null && Object.hasOwnProperty.call(message, "proof")) + $root.tendermint.crypto.Proof.encode(message.proof, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ValueOp message, length delimited. Does not implicitly {@link tendermint.crypto.ValueOp.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.crypto.ValueOp + * @static + * @param {tendermint.crypto.IValueOp} message ValueOp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValueOp.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ValueOp message from the specified reader or buffer. + * @function decode + * @memberof tendermint.crypto.ValueOp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.crypto.ValueOp} ValueOp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValueOp.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.crypto.ValueOp(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.key = reader.bytes(); + break; + case 2: + message.proof = $root.tendermint.crypto.Proof.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ValueOp message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.crypto.ValueOp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.crypto.ValueOp} ValueOp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValueOp.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ValueOp message. + * @function verify + * @memberof tendermint.crypto.ValueOp + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ValueOp.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.key != null && message.hasOwnProperty("key")) + if (!(message.key && typeof message.key.length === "number" || $util.isString(message.key))) + return "key: buffer expected"; + if (message.proof != null && message.hasOwnProperty("proof")) { + var error = $root.tendermint.crypto.Proof.verify(message.proof); + if (error) + return "proof." + error; + } + return null; + }; + + /** + * Creates a ValueOp message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.crypto.ValueOp + * @static + * @param {Object.} object Plain object + * @returns {tendermint.crypto.ValueOp} ValueOp + */ + ValueOp.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.crypto.ValueOp) + return object; + var message = new $root.tendermint.crypto.ValueOp(); + if (object.key != null) + if (typeof object.key === "string") + $util.base64.decode(object.key, message.key = $util.newBuffer($util.base64.length(object.key)), 0); + else if (object.key.length) + message.key = object.key; + if (object.proof != null) { + if (typeof object.proof !== "object") + throw TypeError(".tendermint.crypto.ValueOp.proof: object expected"); + message.proof = $root.tendermint.crypto.Proof.fromObject(object.proof); + } + return message; + }; + + /** + * Creates a plain object from a ValueOp message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.crypto.ValueOp + * @static + * @param {tendermint.crypto.ValueOp} message ValueOp + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ValueOp.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.key = ""; + else { + object.key = []; + if (options.bytes !== Array) + object.key = $util.newBuffer(object.key); + } + object.proof = null; + } + if (message.key != null && message.hasOwnProperty("key")) + object.key = options.bytes === String ? $util.base64.encode(message.key, 0, message.key.length) : options.bytes === Array ? Array.prototype.slice.call(message.key) : message.key; + if (message.proof != null && message.hasOwnProperty("proof")) + object.proof = $root.tendermint.crypto.Proof.toObject(message.proof, options); + return object; + }; + + /** + * Converts this ValueOp to JSON. + * @function toJSON + * @memberof tendermint.crypto.ValueOp + * @instance + * @returns {Object.} JSON object + */ + ValueOp.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ValueOp; + })(crypto.ValueOp || {}); + + crypto.DominoOp = (function(DominoOp) { + + /** + * Properties of a DominoOp. + * @memberof tendermint.crypto + * @interface IDominoOp + * @property {string|null} [key] DominoOp key + * @property {string|null} [input] DominoOp input + * @property {string|null} [output] DominoOp output + */ + + /** + * Constructs a new DominoOp. + * @memberof tendermint.crypto + * @classdesc Represents a DominoOp. + * @implements IDominoOp + * @constructor + * @param {tendermint.crypto.IDominoOp=} [properties] Properties to set + */ + function DominoOp(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DominoOp key. + * @member {string} key + * @memberof tendermint.crypto.DominoOp + * @instance + */ + DominoOp.prototype.key = ""; + + /** + * DominoOp input. + * @member {string} input + * @memberof tendermint.crypto.DominoOp + * @instance + */ + DominoOp.prototype.input = ""; + + /** + * DominoOp output. + * @member {string} output + * @memberof tendermint.crypto.DominoOp + * @instance + */ + DominoOp.prototype.output = ""; + + /** + * Creates a new DominoOp instance using the specified properties. + * @function create + * @memberof tendermint.crypto.DominoOp + * @static + * @param {tendermint.crypto.IDominoOp=} [properties] Properties to set + * @returns {tendermint.crypto.DominoOp} DominoOp instance + */ + DominoOp.create = function create(properties) { + return new DominoOp(properties); + }; + + /** + * Encodes the specified DominoOp message. Does not implicitly {@link tendermint.crypto.DominoOp.verify|verify} messages. + * @function encode + * @memberof tendermint.crypto.DominoOp + * @static + * @param {tendermint.crypto.IDominoOp} message DominoOp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DominoOp.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); + if (message.input != null && Object.hasOwnProperty.call(message, "input")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.input); + if (message.output != null && Object.hasOwnProperty.call(message, "output")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.output); + return writer; + }; + + /** + * Encodes the specified DominoOp message, length delimited. Does not implicitly {@link tendermint.crypto.DominoOp.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.crypto.DominoOp + * @static + * @param {tendermint.crypto.IDominoOp} message DominoOp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DominoOp.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DominoOp message from the specified reader or buffer. + * @function decode + * @memberof tendermint.crypto.DominoOp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.crypto.DominoOp} DominoOp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DominoOp.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.crypto.DominoOp(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.key = reader.string(); + break; + case 2: + message.input = reader.string(); + break; + case 3: + message.output = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DominoOp message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.crypto.DominoOp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.crypto.DominoOp} DominoOp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DominoOp.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DominoOp message. + * @function verify + * @memberof tendermint.crypto.DominoOp + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DominoOp.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.key != null && message.hasOwnProperty("key")) + if (!$util.isString(message.key)) + return "key: string expected"; + if (message.input != null && message.hasOwnProperty("input")) + if (!$util.isString(message.input)) + return "input: string expected"; + if (message.output != null && message.hasOwnProperty("output")) + if (!$util.isString(message.output)) + return "output: string expected"; + return null; + }; + + /** + * Creates a DominoOp message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.crypto.DominoOp + * @static + * @param {Object.} object Plain object + * @returns {tendermint.crypto.DominoOp} DominoOp + */ + DominoOp.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.crypto.DominoOp) + return object; + var message = new $root.tendermint.crypto.DominoOp(); + if (object.key != null) + message.key = String(object.key); + if (object.input != null) + message.input = String(object.input); + if (object.output != null) + message.output = String(object.output); + return message; + }; + + /** + * Creates a plain object from a DominoOp message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.crypto.DominoOp + * @static + * @param {tendermint.crypto.DominoOp} message DominoOp + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DominoOp.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.key = ""; + object.input = ""; + object.output = ""; + } + if (message.key != null && message.hasOwnProperty("key")) + object.key = message.key; + if (message.input != null && message.hasOwnProperty("input")) + object.input = message.input; + if (message.output != null && message.hasOwnProperty("output")) + object.output = message.output; + return object; + }; + + /** + * Converts this DominoOp to JSON. + * @function toJSON + * @memberof tendermint.crypto.DominoOp + * @instance + * @returns {Object.} JSON object + */ + DominoOp.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DominoOp; + })(crypto.DominoOp || {}); + + crypto.ProofOp = (function(ProofOp) { + + /** + * Properties of a ProofOp. + * @memberof tendermint.crypto + * @interface IProofOp + * @property {string|null} [type] ProofOp type + * @property {Uint8Array|null} [key] ProofOp key + * @property {Uint8Array|null} [data] ProofOp data + */ + + /** + * Constructs a new ProofOp. + * @memberof tendermint.crypto + * @classdesc Represents a ProofOp. + * @implements IProofOp + * @constructor + * @param {tendermint.crypto.IProofOp=} [properties] Properties to set + */ + function ProofOp(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ProofOp type. + * @member {string} type + * @memberof tendermint.crypto.ProofOp + * @instance + */ + ProofOp.prototype.type = ""; + + /** + * ProofOp key. + * @member {Uint8Array} key + * @memberof tendermint.crypto.ProofOp + * @instance + */ + ProofOp.prototype.key = $util.newBuffer([]); + + /** + * ProofOp data. + * @member {Uint8Array} data + * @memberof tendermint.crypto.ProofOp + * @instance + */ + ProofOp.prototype.data = $util.newBuffer([]); + + /** + * Creates a new ProofOp instance using the specified properties. + * @function create + * @memberof tendermint.crypto.ProofOp + * @static + * @param {tendermint.crypto.IProofOp=} [properties] Properties to set + * @returns {tendermint.crypto.ProofOp} ProofOp instance + */ + ProofOp.create = function create(properties) { + return new ProofOp(properties); + }; + + /** + * Encodes the specified ProofOp message. Does not implicitly {@link tendermint.crypto.ProofOp.verify|verify} messages. + * @function encode + * @memberof tendermint.crypto.ProofOp + * @static + * @param {tendermint.crypto.IProofOp} message ProofOp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProofOp.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.key); + if (message.data != null && Object.hasOwnProperty.call(message, "data")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.data); + return writer; + }; + + /** + * Encodes the specified ProofOp message, length delimited. Does not implicitly {@link tendermint.crypto.ProofOp.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.crypto.ProofOp + * @static + * @param {tendermint.crypto.IProofOp} message ProofOp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProofOp.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ProofOp message from the specified reader or buffer. + * @function decode + * @memberof tendermint.crypto.ProofOp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.crypto.ProofOp} ProofOp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProofOp.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.crypto.ProofOp(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type = reader.string(); + break; + case 2: + message.key = reader.bytes(); + break; + case 3: + message.data = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ProofOp message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.crypto.ProofOp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.crypto.ProofOp} ProofOp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProofOp.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ProofOp message. + * @function verify + * @memberof tendermint.crypto.ProofOp + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ProofOp.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.key != null && message.hasOwnProperty("key")) + if (!(message.key && typeof message.key.length === "number" || $util.isString(message.key))) + return "key: buffer expected"; + if (message.data != null && message.hasOwnProperty("data")) + if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) + return "data: buffer expected"; + return null; + }; + + /** + * Creates a ProofOp message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.crypto.ProofOp + * @static + * @param {Object.} object Plain object + * @returns {tendermint.crypto.ProofOp} ProofOp + */ + ProofOp.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.crypto.ProofOp) + return object; + var message = new $root.tendermint.crypto.ProofOp(); + if (object.type != null) + message.type = String(object.type); + if (object.key != null) + if (typeof object.key === "string") + $util.base64.decode(object.key, message.key = $util.newBuffer($util.base64.length(object.key)), 0); + else if (object.key.length) + message.key = object.key; + if (object.data != null) + if (typeof object.data === "string") + $util.base64.decode(object.data, message.data = $util.newBuffer($util.base64.length(object.data)), 0); + else if (object.data.length) + message.data = object.data; + return message; + }; + + /** + * Creates a plain object from a ProofOp message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.crypto.ProofOp + * @static + * @param {tendermint.crypto.ProofOp} message ProofOp + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ProofOp.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = ""; + if (options.bytes === String) + object.key = ""; + else { + object.key = []; + if (options.bytes !== Array) + object.key = $util.newBuffer(object.key); + } + if (options.bytes === String) + object.data = ""; + else { + object.data = []; + if (options.bytes !== Array) + object.data = $util.newBuffer(object.data); + } + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.key != null && message.hasOwnProperty("key")) + object.key = options.bytes === String ? $util.base64.encode(message.key, 0, message.key.length) : options.bytes === Array ? Array.prototype.slice.call(message.key) : message.key; + if (message.data != null && message.hasOwnProperty("data")) + object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; + return object; + }; + + /** + * Converts this ProofOp to JSON. + * @function toJSON + * @memberof tendermint.crypto.ProofOp + * @instance + * @returns {Object.} JSON object + */ + ProofOp.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ProofOp; + })(crypto.ProofOp || {}); + + crypto.ProofOps = (function(ProofOps) { + + /** + * Properties of a ProofOps. + * @memberof tendermint.crypto + * @interface IProofOps + * @property {Array.|null} [ops] ProofOps ops + */ + + /** + * Constructs a new ProofOps. + * @memberof tendermint.crypto + * @classdesc Represents a ProofOps. + * @implements IProofOps + * @constructor + * @param {tendermint.crypto.IProofOps=} [properties] Properties to set + */ + function ProofOps(properties) { + this.ops = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ProofOps ops. + * @member {Array.} ops + * @memberof tendermint.crypto.ProofOps + * @instance + */ + ProofOps.prototype.ops = $util.emptyArray; + + /** + * Creates a new ProofOps instance using the specified properties. + * @function create + * @memberof tendermint.crypto.ProofOps + * @static + * @param {tendermint.crypto.IProofOps=} [properties] Properties to set + * @returns {tendermint.crypto.ProofOps} ProofOps instance + */ + ProofOps.create = function create(properties) { + return new ProofOps(properties); + }; + + /** + * Encodes the specified ProofOps message. Does not implicitly {@link tendermint.crypto.ProofOps.verify|verify} messages. + * @function encode + * @memberof tendermint.crypto.ProofOps + * @static + * @param {tendermint.crypto.IProofOps} message ProofOps message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProofOps.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ops != null && message.ops.length) + for (var i = 0; i < message.ops.length; ++i) + $root.tendermint.crypto.ProofOp.encode(message.ops[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ProofOps message, length delimited. Does not implicitly {@link tendermint.crypto.ProofOps.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.crypto.ProofOps + * @static + * @param {tendermint.crypto.IProofOps} message ProofOps message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProofOps.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ProofOps message from the specified reader or buffer. + * @function decode + * @memberof tendermint.crypto.ProofOps + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.crypto.ProofOps} ProofOps + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProofOps.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.crypto.ProofOps(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.ops && message.ops.length)) + message.ops = []; + message.ops.push($root.tendermint.crypto.ProofOp.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ProofOps message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.crypto.ProofOps + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.crypto.ProofOps} ProofOps + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProofOps.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ProofOps message. + * @function verify + * @memberof tendermint.crypto.ProofOps + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ProofOps.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.ops != null && message.hasOwnProperty("ops")) { + if (!Array.isArray(message.ops)) + return "ops: array expected"; + for (var i = 0; i < message.ops.length; ++i) { + var error = $root.tendermint.crypto.ProofOp.verify(message.ops[i]); + if (error) + return "ops." + error; + } + } + return null; + }; + + /** + * Creates a ProofOps message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.crypto.ProofOps + * @static + * @param {Object.} object Plain object + * @returns {tendermint.crypto.ProofOps} ProofOps + */ + ProofOps.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.crypto.ProofOps) + return object; + var message = new $root.tendermint.crypto.ProofOps(); + if (object.ops) { + if (!Array.isArray(object.ops)) + throw TypeError(".tendermint.crypto.ProofOps.ops: array expected"); + message.ops = []; + for (var i = 0; i < object.ops.length; ++i) { + if (typeof object.ops[i] !== "object") + throw TypeError(".tendermint.crypto.ProofOps.ops: object expected"); + message.ops[i] = $root.tendermint.crypto.ProofOp.fromObject(object.ops[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ProofOps message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.crypto.ProofOps + * @static + * @param {tendermint.crypto.ProofOps} message ProofOps + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ProofOps.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.ops = []; + if (message.ops && message.ops.length) { + object.ops = []; + for (var j = 0; j < message.ops.length; ++j) + object.ops[j] = $root.tendermint.crypto.ProofOp.toObject(message.ops[j], options); + } + return object; + }; + + /** + * Converts this ProofOps to JSON. + * @function toJSON + * @memberof tendermint.crypto.ProofOps + * @instance + * @returns {Object.} JSON object + */ + ProofOps.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ProofOps; + })(crypto.ProofOps || {}); + + return crypto; + })(tendermint.crypto || {}); + + /** + * Namespace p2p. + * @memberof tendermint + * @namespace + */ + + tendermint.p2p = (function(p2p) { + + p2p.NetAddress = (function(NetAddress) { + + /** + * Properties of a NetAddress. + * @memberof tendermint.p2p + * @interface INetAddress + * @property {string|null} [id] NetAddress id + * @property {string|null} [ip] NetAddress ip + * @property {number|null} [port] NetAddress port + */ + + /** + * Constructs a new NetAddress. + * @memberof tendermint.p2p + * @classdesc Represents a NetAddress. + * @implements INetAddress + * @constructor + * @param {tendermint.p2p.INetAddress=} [properties] Properties to set + */ + function NetAddress(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NetAddress id. + * @member {string} id + * @memberof tendermint.p2p.NetAddress + * @instance + */ + NetAddress.prototype.id = ""; + + /** + * NetAddress ip. + * @member {string} ip + * @memberof tendermint.p2p.NetAddress + * @instance + */ + NetAddress.prototype.ip = ""; + + /** + * NetAddress port. + * @member {number} port + * @memberof tendermint.p2p.NetAddress + * @instance + */ + NetAddress.prototype.port = 0; + + /** + * Creates a new NetAddress instance using the specified properties. + * @function create + * @memberof tendermint.p2p.NetAddress + * @static + * @param {tendermint.p2p.INetAddress=} [properties] Properties to set + * @returns {tendermint.p2p.NetAddress} NetAddress instance + */ + NetAddress.create = function create(properties) { + return new NetAddress(properties); + }; + + /** + * Encodes the specified NetAddress message. Does not implicitly {@link tendermint.p2p.NetAddress.verify|verify} messages. + * @function encode + * @memberof tendermint.p2p.NetAddress + * @static + * @param {tendermint.p2p.INetAddress} message NetAddress message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NetAddress.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.ip != null && Object.hasOwnProperty.call(message, "ip")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.ip); + if (message.port != null && Object.hasOwnProperty.call(message, "port")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.port); + return writer; + }; + + /** + * Encodes the specified NetAddress message, length delimited. Does not implicitly {@link tendermint.p2p.NetAddress.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.p2p.NetAddress + * @static + * @param {tendermint.p2p.INetAddress} message NetAddress message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NetAddress.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NetAddress message from the specified reader or buffer. + * @function decode + * @memberof tendermint.p2p.NetAddress + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.p2p.NetAddress} NetAddress + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NetAddress.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.p2p.NetAddress(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.id = reader.string(); + break; + case 2: + message.ip = reader.string(); + break; + case 3: + message.port = reader.uint32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NetAddress message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.p2p.NetAddress + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.p2p.NetAddress} NetAddress + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NetAddress.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NetAddress message. + * @function verify + * @memberof tendermint.p2p.NetAddress + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NetAddress.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.ip != null && message.hasOwnProperty("ip")) + if (!$util.isString(message.ip)) + return "ip: string expected"; + if (message.port != null && message.hasOwnProperty("port")) + if (!$util.isInteger(message.port)) + return "port: integer expected"; + return null; + }; + + /** + * Creates a NetAddress message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.p2p.NetAddress + * @static + * @param {Object.} object Plain object + * @returns {tendermint.p2p.NetAddress} NetAddress + */ + NetAddress.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.p2p.NetAddress) + return object; + var message = new $root.tendermint.p2p.NetAddress(); + if (object.id != null) + message.id = String(object.id); + if (object.ip != null) + message.ip = String(object.ip); + if (object.port != null) + message.port = object.port >>> 0; + return message; + }; + + /** + * Creates a plain object from a NetAddress message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.p2p.NetAddress + * @static + * @param {tendermint.p2p.NetAddress} message NetAddress + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NetAddress.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.id = ""; + object.ip = ""; + object.port = 0; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.ip != null && message.hasOwnProperty("ip")) + object.ip = message.ip; + if (message.port != null && message.hasOwnProperty("port")) + object.port = message.port; + return object; + }; + + /** + * Converts this NetAddress to JSON. + * @function toJSON + * @memberof tendermint.p2p.NetAddress + * @instance + * @returns {Object.} JSON object + */ + NetAddress.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return NetAddress; + })(p2p.NetAddress || {}); + + p2p.ProtocolVersion = (function(ProtocolVersion) { + + /** + * Properties of a ProtocolVersion. + * @memberof tendermint.p2p + * @interface IProtocolVersion + * @property {number|Long|null} [p2p] ProtocolVersion p2p + * @property {number|Long|null} [block] ProtocolVersion block + * @property {number|Long|null} [app] ProtocolVersion app + */ + + /** + * Constructs a new ProtocolVersion. + * @memberof tendermint.p2p + * @classdesc Represents a ProtocolVersion. + * @implements IProtocolVersion + * @constructor + * @param {tendermint.p2p.IProtocolVersion=} [properties] Properties to set + */ + function ProtocolVersion(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ProtocolVersion p2p. + * @member {number|Long} p2p + * @memberof tendermint.p2p.ProtocolVersion + * @instance + */ + ProtocolVersion.prototype.p2p = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * ProtocolVersion block. + * @member {number|Long} block + * @memberof tendermint.p2p.ProtocolVersion + * @instance + */ + ProtocolVersion.prototype.block = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * ProtocolVersion app. + * @member {number|Long} app + * @memberof tendermint.p2p.ProtocolVersion + * @instance + */ + ProtocolVersion.prototype.app = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new ProtocolVersion instance using the specified properties. + * @function create + * @memberof tendermint.p2p.ProtocolVersion + * @static + * @param {tendermint.p2p.IProtocolVersion=} [properties] Properties to set + * @returns {tendermint.p2p.ProtocolVersion} ProtocolVersion instance + */ + ProtocolVersion.create = function create(properties) { + return new ProtocolVersion(properties); + }; + + /** + * Encodes the specified ProtocolVersion message. Does not implicitly {@link tendermint.p2p.ProtocolVersion.verify|verify} messages. + * @function encode + * @memberof tendermint.p2p.ProtocolVersion + * @static + * @param {tendermint.p2p.IProtocolVersion} message ProtocolVersion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProtocolVersion.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.p2p != null && Object.hasOwnProperty.call(message, "p2p")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.p2p); + if (message.block != null && Object.hasOwnProperty.call(message, "block")) + writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.block); + if (message.app != null && Object.hasOwnProperty.call(message, "app")) + writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.app); + return writer; + }; + + /** + * Encodes the specified ProtocolVersion message, length delimited. Does not implicitly {@link tendermint.p2p.ProtocolVersion.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.p2p.ProtocolVersion + * @static + * @param {tendermint.p2p.IProtocolVersion} message ProtocolVersion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProtocolVersion.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ProtocolVersion message from the specified reader or buffer. + * @function decode + * @memberof tendermint.p2p.ProtocolVersion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.p2p.ProtocolVersion} ProtocolVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProtocolVersion.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.p2p.ProtocolVersion(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.p2p = reader.uint64(); + break; + case 2: + message.block = reader.uint64(); + break; + case 3: + message.app = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ProtocolVersion message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.p2p.ProtocolVersion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.p2p.ProtocolVersion} ProtocolVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProtocolVersion.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ProtocolVersion message. + * @function verify + * @memberof tendermint.p2p.ProtocolVersion + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ProtocolVersion.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.p2p != null && message.hasOwnProperty("p2p")) + if (!$util.isInteger(message.p2p) && !(message.p2p && $util.isInteger(message.p2p.low) && $util.isInteger(message.p2p.high))) + return "p2p: integer|Long expected"; + if (message.block != null && message.hasOwnProperty("block")) + if (!$util.isInteger(message.block) && !(message.block && $util.isInteger(message.block.low) && $util.isInteger(message.block.high))) + return "block: integer|Long expected"; + if (message.app != null && message.hasOwnProperty("app")) + if (!$util.isInteger(message.app) && !(message.app && $util.isInteger(message.app.low) && $util.isInteger(message.app.high))) + return "app: integer|Long expected"; + return null; + }; + + /** + * Creates a ProtocolVersion message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.p2p.ProtocolVersion + * @static + * @param {Object.} object Plain object + * @returns {tendermint.p2p.ProtocolVersion} ProtocolVersion + */ + ProtocolVersion.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.p2p.ProtocolVersion) + return object; + var message = new $root.tendermint.p2p.ProtocolVersion(); + if (object.p2p != null) + if ($util.Long) + (message.p2p = $util.Long.fromValue(object.p2p)).unsigned = true; + else if (typeof object.p2p === "string") + message.p2p = parseInt(object.p2p, 10); + else if (typeof object.p2p === "number") + message.p2p = object.p2p; + else if (typeof object.p2p === "object") + message.p2p = new $util.LongBits(object.p2p.low >>> 0, object.p2p.high >>> 0).toNumber(true); + if (object.block != null) + if ($util.Long) + (message.block = $util.Long.fromValue(object.block)).unsigned = true; + else if (typeof object.block === "string") + message.block = parseInt(object.block, 10); + else if (typeof object.block === "number") + message.block = object.block; + else if (typeof object.block === "object") + message.block = new $util.LongBits(object.block.low >>> 0, object.block.high >>> 0).toNumber(true); + if (object.app != null) + if ($util.Long) + (message.app = $util.Long.fromValue(object.app)).unsigned = true; + else if (typeof object.app === "string") + message.app = parseInt(object.app, 10); + else if (typeof object.app === "number") + message.app = object.app; + else if (typeof object.app === "object") + message.app = new $util.LongBits(object.app.low >>> 0, object.app.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a ProtocolVersion message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.p2p.ProtocolVersion + * @static + * @param {tendermint.p2p.ProtocolVersion} message ProtocolVersion + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ProtocolVersion.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.p2p = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.p2p = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.block = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.block = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.app = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.app = options.longs === String ? "0" : 0; + } + if (message.p2p != null && message.hasOwnProperty("p2p")) + if (typeof message.p2p === "number") + object.p2p = options.longs === String ? String(message.p2p) : message.p2p; + else + object.p2p = options.longs === String ? $util.Long.prototype.toString.call(message.p2p) : options.longs === Number ? new $util.LongBits(message.p2p.low >>> 0, message.p2p.high >>> 0).toNumber(true) : message.p2p; + if (message.block != null && message.hasOwnProperty("block")) + if (typeof message.block === "number") + object.block = options.longs === String ? String(message.block) : message.block; + else + object.block = options.longs === String ? $util.Long.prototype.toString.call(message.block) : options.longs === Number ? new $util.LongBits(message.block.low >>> 0, message.block.high >>> 0).toNumber(true) : message.block; + if (message.app != null && message.hasOwnProperty("app")) + if (typeof message.app === "number") + object.app = options.longs === String ? String(message.app) : message.app; + else + object.app = options.longs === String ? $util.Long.prototype.toString.call(message.app) : options.longs === Number ? new $util.LongBits(message.app.low >>> 0, message.app.high >>> 0).toNumber(true) : message.app; + return object; + }; + + /** + * Converts this ProtocolVersion to JSON. + * @function toJSON + * @memberof tendermint.p2p.ProtocolVersion + * @instance + * @returns {Object.} JSON object + */ + ProtocolVersion.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ProtocolVersion; + })(p2p.ProtocolVersion || {}); + + p2p.DefaultNodeInfo = (function(DefaultNodeInfo) { + + /** + * Properties of a DefaultNodeInfo. + * @memberof tendermint.p2p + * @interface IDefaultNodeInfo + * @property {tendermint.p2p.IProtocolVersion|null} [protocolVersion] DefaultNodeInfo protocolVersion + * @property {string|null} [defaultNodeId] DefaultNodeInfo defaultNodeId + * @property {string|null} [listenAddr] DefaultNodeInfo listenAddr + * @property {string|null} [network] DefaultNodeInfo network + * @property {string|null} [version] DefaultNodeInfo version + * @property {Uint8Array|null} [channels] DefaultNodeInfo channels + * @property {string|null} [moniker] DefaultNodeInfo moniker + * @property {tendermint.p2p.IDefaultNodeInfoOther|null} [other] DefaultNodeInfo other + */ + + /** + * Constructs a new DefaultNodeInfo. + * @memberof tendermint.p2p + * @classdesc Represents a DefaultNodeInfo. + * @implements IDefaultNodeInfo + * @constructor + * @param {tendermint.p2p.IDefaultNodeInfo=} [properties] Properties to set + */ + function DefaultNodeInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DefaultNodeInfo protocolVersion. + * @member {tendermint.p2p.IProtocolVersion|null|undefined} protocolVersion + * @memberof tendermint.p2p.DefaultNodeInfo + * @instance + */ + DefaultNodeInfo.prototype.protocolVersion = null; + + /** + * DefaultNodeInfo defaultNodeId. + * @member {string} defaultNodeId + * @memberof tendermint.p2p.DefaultNodeInfo + * @instance + */ + DefaultNodeInfo.prototype.defaultNodeId = ""; + + /** + * DefaultNodeInfo listenAddr. + * @member {string} listenAddr + * @memberof tendermint.p2p.DefaultNodeInfo + * @instance + */ + DefaultNodeInfo.prototype.listenAddr = ""; + + /** + * DefaultNodeInfo network. + * @member {string} network + * @memberof tendermint.p2p.DefaultNodeInfo + * @instance + */ + DefaultNodeInfo.prototype.network = ""; + + /** + * DefaultNodeInfo version. + * @member {string} version + * @memberof tendermint.p2p.DefaultNodeInfo + * @instance + */ + DefaultNodeInfo.prototype.version = ""; + + /** + * DefaultNodeInfo channels. + * @member {Uint8Array} channels + * @memberof tendermint.p2p.DefaultNodeInfo + * @instance + */ + DefaultNodeInfo.prototype.channels = $util.newBuffer([]); + + /** + * DefaultNodeInfo moniker. + * @member {string} moniker + * @memberof tendermint.p2p.DefaultNodeInfo + * @instance + */ + DefaultNodeInfo.prototype.moniker = ""; + + /** + * DefaultNodeInfo other. + * @member {tendermint.p2p.IDefaultNodeInfoOther|null|undefined} other + * @memberof tendermint.p2p.DefaultNodeInfo + * @instance + */ + DefaultNodeInfo.prototype.other = null; + + /** + * Creates a new DefaultNodeInfo instance using the specified properties. + * @function create + * @memberof tendermint.p2p.DefaultNodeInfo + * @static + * @param {tendermint.p2p.IDefaultNodeInfo=} [properties] Properties to set + * @returns {tendermint.p2p.DefaultNodeInfo} DefaultNodeInfo instance + */ + DefaultNodeInfo.create = function create(properties) { + return new DefaultNodeInfo(properties); + }; + + /** + * Encodes the specified DefaultNodeInfo message. Does not implicitly {@link tendermint.p2p.DefaultNodeInfo.verify|verify} messages. + * @function encode + * @memberof tendermint.p2p.DefaultNodeInfo + * @static + * @param {tendermint.p2p.IDefaultNodeInfo} message DefaultNodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DefaultNodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.protocolVersion != null && Object.hasOwnProperty.call(message, "protocolVersion")) + $root.tendermint.p2p.ProtocolVersion.encode(message.protocolVersion, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.defaultNodeId != null && Object.hasOwnProperty.call(message, "defaultNodeId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.defaultNodeId); + if (message.listenAddr != null && Object.hasOwnProperty.call(message, "listenAddr")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.listenAddr); + if (message.network != null && Object.hasOwnProperty.call(message, "network")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.network); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.version); + if (message.channels != null && Object.hasOwnProperty.call(message, "channels")) + writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.channels); + if (message.moniker != null && Object.hasOwnProperty.call(message, "moniker")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.moniker); + if (message.other != null && Object.hasOwnProperty.call(message, "other")) + $root.tendermint.p2p.DefaultNodeInfoOther.encode(message.other, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DefaultNodeInfo message, length delimited. Does not implicitly {@link tendermint.p2p.DefaultNodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.p2p.DefaultNodeInfo + * @static + * @param {tendermint.p2p.IDefaultNodeInfo} message DefaultNodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DefaultNodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DefaultNodeInfo message from the specified reader or buffer. + * @function decode + * @memberof tendermint.p2p.DefaultNodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.p2p.DefaultNodeInfo} DefaultNodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DefaultNodeInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.p2p.DefaultNodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.protocolVersion = $root.tendermint.p2p.ProtocolVersion.decode(reader, reader.uint32()); + break; + case 2: + message.defaultNodeId = reader.string(); + break; + case 3: + message.listenAddr = reader.string(); + break; + case 4: + message.network = reader.string(); + break; + case 5: + message.version = reader.string(); + break; + case 6: + message.channels = reader.bytes(); + break; + case 7: + message.moniker = reader.string(); + break; + case 8: + message.other = $root.tendermint.p2p.DefaultNodeInfoOther.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DefaultNodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.p2p.DefaultNodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.p2p.DefaultNodeInfo} DefaultNodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DefaultNodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DefaultNodeInfo message. + * @function verify + * @memberof tendermint.p2p.DefaultNodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DefaultNodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.protocolVersion != null && message.hasOwnProperty("protocolVersion")) { + var error = $root.tendermint.p2p.ProtocolVersion.verify(message.protocolVersion); + if (error) + return "protocolVersion." + error; + } + if (message.defaultNodeId != null && message.hasOwnProperty("defaultNodeId")) + if (!$util.isString(message.defaultNodeId)) + return "defaultNodeId: string expected"; + if (message.listenAddr != null && message.hasOwnProperty("listenAddr")) + if (!$util.isString(message.listenAddr)) + return "listenAddr: string expected"; + if (message.network != null && message.hasOwnProperty("network")) + if (!$util.isString(message.network)) + return "network: string expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.channels != null && message.hasOwnProperty("channels")) + if (!(message.channels && typeof message.channels.length === "number" || $util.isString(message.channels))) + return "channels: buffer expected"; + if (message.moniker != null && message.hasOwnProperty("moniker")) + if (!$util.isString(message.moniker)) + return "moniker: string expected"; + if (message.other != null && message.hasOwnProperty("other")) { + var error = $root.tendermint.p2p.DefaultNodeInfoOther.verify(message.other); + if (error) + return "other." + error; + } + return null; + }; + + /** + * Creates a DefaultNodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.p2p.DefaultNodeInfo + * @static + * @param {Object.} object Plain object + * @returns {tendermint.p2p.DefaultNodeInfo} DefaultNodeInfo + */ + DefaultNodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.p2p.DefaultNodeInfo) + return object; + var message = new $root.tendermint.p2p.DefaultNodeInfo(); + if (object.protocolVersion != null) { + if (typeof object.protocolVersion !== "object") + throw TypeError(".tendermint.p2p.DefaultNodeInfo.protocolVersion: object expected"); + message.protocolVersion = $root.tendermint.p2p.ProtocolVersion.fromObject(object.protocolVersion); + } + if (object.defaultNodeId != null) + message.defaultNodeId = String(object.defaultNodeId); + if (object.listenAddr != null) + message.listenAddr = String(object.listenAddr); + if (object.network != null) + message.network = String(object.network); + if (object.version != null) + message.version = String(object.version); + if (object.channels != null) + if (typeof object.channels === "string") + $util.base64.decode(object.channels, message.channels = $util.newBuffer($util.base64.length(object.channels)), 0); + else if (object.channels.length) + message.channels = object.channels; + if (object.moniker != null) + message.moniker = String(object.moniker); + if (object.other != null) { + if (typeof object.other !== "object") + throw TypeError(".tendermint.p2p.DefaultNodeInfo.other: object expected"); + message.other = $root.tendermint.p2p.DefaultNodeInfoOther.fromObject(object.other); + } + return message; + }; + + /** + * Creates a plain object from a DefaultNodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.p2p.DefaultNodeInfo + * @static + * @param {tendermint.p2p.DefaultNodeInfo} message DefaultNodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DefaultNodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.protocolVersion = null; + object.defaultNodeId = ""; + object.listenAddr = ""; + object.network = ""; + object.version = ""; + if (options.bytes === String) + object.channels = ""; + else { + object.channels = []; + if (options.bytes !== Array) + object.channels = $util.newBuffer(object.channels); + } + object.moniker = ""; + object.other = null; + } + if (message.protocolVersion != null && message.hasOwnProperty("protocolVersion")) + object.protocolVersion = $root.tendermint.p2p.ProtocolVersion.toObject(message.protocolVersion, options); + if (message.defaultNodeId != null && message.hasOwnProperty("defaultNodeId")) + object.defaultNodeId = message.defaultNodeId; + if (message.listenAddr != null && message.hasOwnProperty("listenAddr")) + object.listenAddr = message.listenAddr; + if (message.network != null && message.hasOwnProperty("network")) + object.network = message.network; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.channels != null && message.hasOwnProperty("channels")) + object.channels = options.bytes === String ? $util.base64.encode(message.channels, 0, message.channels.length) : options.bytes === Array ? Array.prototype.slice.call(message.channels) : message.channels; + if (message.moniker != null && message.hasOwnProperty("moniker")) + object.moniker = message.moniker; + if (message.other != null && message.hasOwnProperty("other")) + object.other = $root.tendermint.p2p.DefaultNodeInfoOther.toObject(message.other, options); + return object; + }; + + /** + * Converts this DefaultNodeInfo to JSON. + * @function toJSON + * @memberof tendermint.p2p.DefaultNodeInfo + * @instance + * @returns {Object.} JSON object + */ + DefaultNodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DefaultNodeInfo; + })(p2p.DefaultNodeInfo || {}); + + p2p.DefaultNodeInfoOther = (function(DefaultNodeInfoOther) { + + /** + * Properties of a DefaultNodeInfoOther. + * @memberof tendermint.p2p + * @interface IDefaultNodeInfoOther + * @property {string|null} [txIndex] DefaultNodeInfoOther txIndex + * @property {string|null} [rpcAddress] DefaultNodeInfoOther rpcAddress + */ + + /** + * Constructs a new DefaultNodeInfoOther. + * @memberof tendermint.p2p + * @classdesc Represents a DefaultNodeInfoOther. + * @implements IDefaultNodeInfoOther + * @constructor + * @param {tendermint.p2p.IDefaultNodeInfoOther=} [properties] Properties to set + */ + function DefaultNodeInfoOther(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DefaultNodeInfoOther txIndex. + * @member {string} txIndex + * @memberof tendermint.p2p.DefaultNodeInfoOther + * @instance + */ + DefaultNodeInfoOther.prototype.txIndex = ""; + + /** + * DefaultNodeInfoOther rpcAddress. + * @member {string} rpcAddress + * @memberof tendermint.p2p.DefaultNodeInfoOther + * @instance + */ + DefaultNodeInfoOther.prototype.rpcAddress = ""; + + /** + * Creates a new DefaultNodeInfoOther instance using the specified properties. + * @function create + * @memberof tendermint.p2p.DefaultNodeInfoOther + * @static + * @param {tendermint.p2p.IDefaultNodeInfoOther=} [properties] Properties to set + * @returns {tendermint.p2p.DefaultNodeInfoOther} DefaultNodeInfoOther instance + */ + DefaultNodeInfoOther.create = function create(properties) { + return new DefaultNodeInfoOther(properties); + }; + + /** + * Encodes the specified DefaultNodeInfoOther message. Does not implicitly {@link tendermint.p2p.DefaultNodeInfoOther.verify|verify} messages. + * @function encode + * @memberof tendermint.p2p.DefaultNodeInfoOther + * @static + * @param {tendermint.p2p.IDefaultNodeInfoOther} message DefaultNodeInfoOther message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DefaultNodeInfoOther.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.txIndex != null && Object.hasOwnProperty.call(message, "txIndex")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.txIndex); + if (message.rpcAddress != null && Object.hasOwnProperty.call(message, "rpcAddress")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.rpcAddress); + return writer; + }; + + /** + * Encodes the specified DefaultNodeInfoOther message, length delimited. Does not implicitly {@link tendermint.p2p.DefaultNodeInfoOther.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.p2p.DefaultNodeInfoOther + * @static + * @param {tendermint.p2p.IDefaultNodeInfoOther} message DefaultNodeInfoOther message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DefaultNodeInfoOther.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DefaultNodeInfoOther message from the specified reader or buffer. + * @function decode + * @memberof tendermint.p2p.DefaultNodeInfoOther + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.p2p.DefaultNodeInfoOther} DefaultNodeInfoOther + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DefaultNodeInfoOther.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.p2p.DefaultNodeInfoOther(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.txIndex = reader.string(); + break; + case 2: + message.rpcAddress = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DefaultNodeInfoOther message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.p2p.DefaultNodeInfoOther + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.p2p.DefaultNodeInfoOther} DefaultNodeInfoOther + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DefaultNodeInfoOther.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DefaultNodeInfoOther message. + * @function verify + * @memberof tendermint.p2p.DefaultNodeInfoOther + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DefaultNodeInfoOther.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.txIndex != null && message.hasOwnProperty("txIndex")) + if (!$util.isString(message.txIndex)) + return "txIndex: string expected"; + if (message.rpcAddress != null && message.hasOwnProperty("rpcAddress")) + if (!$util.isString(message.rpcAddress)) + return "rpcAddress: string expected"; + return null; + }; + + /** + * Creates a DefaultNodeInfoOther message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.p2p.DefaultNodeInfoOther + * @static + * @param {Object.} object Plain object + * @returns {tendermint.p2p.DefaultNodeInfoOther} DefaultNodeInfoOther + */ + DefaultNodeInfoOther.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.p2p.DefaultNodeInfoOther) + return object; + var message = new $root.tendermint.p2p.DefaultNodeInfoOther(); + if (object.txIndex != null) + message.txIndex = String(object.txIndex); + if (object.rpcAddress != null) + message.rpcAddress = String(object.rpcAddress); + return message; + }; + + /** + * Creates a plain object from a DefaultNodeInfoOther message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.p2p.DefaultNodeInfoOther + * @static + * @param {tendermint.p2p.DefaultNodeInfoOther} message DefaultNodeInfoOther + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DefaultNodeInfoOther.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.txIndex = ""; + object.rpcAddress = ""; + } + if (message.txIndex != null && message.hasOwnProperty("txIndex")) + object.txIndex = message.txIndex; + if (message.rpcAddress != null && message.hasOwnProperty("rpcAddress")) + object.rpcAddress = message.rpcAddress; + return object; + }; + + /** + * Converts this DefaultNodeInfoOther to JSON. + * @function toJSON + * @memberof tendermint.p2p.DefaultNodeInfoOther + * @instance + * @returns {Object.} JSON object + */ + DefaultNodeInfoOther.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DefaultNodeInfoOther; + })(p2p.DefaultNodeInfoOther || {}); + + return p2p; + })(tendermint.p2p || {}); + + /** + * Namespace types. + * @memberof tendermint + * @namespace + */ + + tendermint.types = (function(types) { + + types.Block = (function(Block) { + + /** + * Properties of a Block. + * @memberof tendermint.types + * @interface IBlock + * @property {tendermint.types.IHeader|null} [header] Block header + * @property {tendermint.types.IData|null} [data] Block data + * @property {tendermint.types.IEvidenceList|null} [evidence] Block evidence + * @property {tendermint.types.ICommit|null} [lastCommit] Block lastCommit + */ + + /** + * Constructs a new Block. + * @memberof tendermint.types + * @classdesc Represents a Block. + * @implements IBlock + * @constructor + * @param {tendermint.types.IBlock=} [properties] Properties to set + */ + function Block(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Block header. + * @member {tendermint.types.IHeader|null|undefined} header + * @memberof tendermint.types.Block + * @instance + */ + Block.prototype.header = null; + + /** + * Block data. + * @member {tendermint.types.IData|null|undefined} data + * @memberof tendermint.types.Block + * @instance + */ + Block.prototype.data = null; + + /** + * Block evidence. + * @member {tendermint.types.IEvidenceList|null|undefined} evidence + * @memberof tendermint.types.Block + * @instance + */ + Block.prototype.evidence = null; + + /** + * Block lastCommit. + * @member {tendermint.types.ICommit|null|undefined} lastCommit + * @memberof tendermint.types.Block + * @instance + */ + Block.prototype.lastCommit = null; + + /** + * Creates a new Block instance using the specified properties. + * @function create + * @memberof tendermint.types.Block + * @static + * @param {tendermint.types.IBlock=} [properties] Properties to set + * @returns {tendermint.types.Block} Block instance + */ + Block.create = function create(properties) { + return new Block(properties); + }; + + /** + * Encodes the specified Block message. Does not implicitly {@link tendermint.types.Block.verify|verify} messages. + * @function encode + * @memberof tendermint.types.Block + * @static + * @param {tendermint.types.IBlock} message Block message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Block.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.header != null && Object.hasOwnProperty.call(message, "header")) + $root.tendermint.types.Header.encode(message.header, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.data != null && Object.hasOwnProperty.call(message, "data")) + $root.tendermint.types.Data.encode(message.data, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.evidence != null && Object.hasOwnProperty.call(message, "evidence")) + $root.tendermint.types.EvidenceList.encode(message.evidence, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.lastCommit != null && Object.hasOwnProperty.call(message, "lastCommit")) + $root.tendermint.types.Commit.encode(message.lastCommit, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Block message, length delimited. Does not implicitly {@link tendermint.types.Block.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.types.Block + * @static + * @param {tendermint.types.IBlock} message Block message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Block.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Block message from the specified reader or buffer. + * @function decode + * @memberof tendermint.types.Block + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.types.Block} Block + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Block.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.Block(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.header = $root.tendermint.types.Header.decode(reader, reader.uint32()); + break; + case 2: + message.data = $root.tendermint.types.Data.decode(reader, reader.uint32()); + break; + case 3: + message.evidence = $root.tendermint.types.EvidenceList.decode(reader, reader.uint32()); + break; + case 4: + message.lastCommit = $root.tendermint.types.Commit.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Block message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.types.Block + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.types.Block} Block + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Block.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Block message. + * @function verify + * @memberof tendermint.types.Block + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Block.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.header != null && message.hasOwnProperty("header")) { + var error = $root.tendermint.types.Header.verify(message.header); + if (error) + return "header." + error; + } + if (message.data != null && message.hasOwnProperty("data")) { + var error = $root.tendermint.types.Data.verify(message.data); + if (error) + return "data." + error; + } + if (message.evidence != null && message.hasOwnProperty("evidence")) { + var error = $root.tendermint.types.EvidenceList.verify(message.evidence); + if (error) + return "evidence." + error; + } + if (message.lastCommit != null && message.hasOwnProperty("lastCommit")) { + var error = $root.tendermint.types.Commit.verify(message.lastCommit); + if (error) + return "lastCommit." + error; + } + return null; + }; + + /** + * Creates a Block message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.types.Block + * @static + * @param {Object.} object Plain object + * @returns {tendermint.types.Block} Block + */ + Block.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.types.Block) + return object; + var message = new $root.tendermint.types.Block(); + if (object.header != null) { + if (typeof object.header !== "object") + throw TypeError(".tendermint.types.Block.header: object expected"); + message.header = $root.tendermint.types.Header.fromObject(object.header); + } + if (object.data != null) { + if (typeof object.data !== "object") + throw TypeError(".tendermint.types.Block.data: object expected"); + message.data = $root.tendermint.types.Data.fromObject(object.data); + } + if (object.evidence != null) { + if (typeof object.evidence !== "object") + throw TypeError(".tendermint.types.Block.evidence: object expected"); + message.evidence = $root.tendermint.types.EvidenceList.fromObject(object.evidence); + } + if (object.lastCommit != null) { + if (typeof object.lastCommit !== "object") + throw TypeError(".tendermint.types.Block.lastCommit: object expected"); + message.lastCommit = $root.tendermint.types.Commit.fromObject(object.lastCommit); + } + return message; + }; + + /** + * Creates a plain object from a Block message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.types.Block + * @static + * @param {tendermint.types.Block} message Block + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Block.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.header = null; + object.data = null; + object.evidence = null; + object.lastCommit = null; + } + if (message.header != null && message.hasOwnProperty("header")) + object.header = $root.tendermint.types.Header.toObject(message.header, options); + if (message.data != null && message.hasOwnProperty("data")) + object.data = $root.tendermint.types.Data.toObject(message.data, options); + if (message.evidence != null && message.hasOwnProperty("evidence")) + object.evidence = $root.tendermint.types.EvidenceList.toObject(message.evidence, options); + if (message.lastCommit != null && message.hasOwnProperty("lastCommit")) + object.lastCommit = $root.tendermint.types.Commit.toObject(message.lastCommit, options); + return object; + }; + + /** + * Converts this Block to JSON. + * @function toJSON + * @memberof tendermint.types.Block + * @instance + * @returns {Object.} JSON object + */ + Block.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Block; + })(types.Block || {}); + + types.Evidence = (function(Evidence) { + + /** + * Properties of an Evidence. + * @memberof tendermint.types + * @interface IEvidence + * @property {tendermint.types.IDuplicateVoteEvidence|null} [duplicateVoteEvidence] Evidence duplicateVoteEvidence + * @property {tendermint.types.ILightClientAttackEvidence|null} [lightClientAttackEvidence] Evidence lightClientAttackEvidence + */ + + /** + * Constructs a new Evidence. + * @memberof tendermint.types + * @classdesc Represents an Evidence. + * @implements IEvidence + * @constructor + * @param {tendermint.types.IEvidence=} [properties] Properties to set + */ + function Evidence(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Evidence duplicateVoteEvidence. + * @member {tendermint.types.IDuplicateVoteEvidence|null|undefined} duplicateVoteEvidence + * @memberof tendermint.types.Evidence + * @instance + */ + Evidence.prototype.duplicateVoteEvidence = null; + + /** + * Evidence lightClientAttackEvidence. + * @member {tendermint.types.ILightClientAttackEvidence|null|undefined} lightClientAttackEvidence + * @memberof tendermint.types.Evidence + * @instance + */ + Evidence.prototype.lightClientAttackEvidence = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Evidence sum. + * @member {"duplicateVoteEvidence"|"lightClientAttackEvidence"|undefined} sum + * @memberof tendermint.types.Evidence + * @instance + */ + Object.defineProperty(Evidence.prototype, "sum", { + get: $util.oneOfGetter($oneOfFields = ["duplicateVoteEvidence", "lightClientAttackEvidence"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Evidence instance using the specified properties. + * @function create + * @memberof tendermint.types.Evidence + * @static + * @param {tendermint.types.IEvidence=} [properties] Properties to set + * @returns {tendermint.types.Evidence} Evidence instance + */ + Evidence.create = function create(properties) { + return new Evidence(properties); + }; + + /** + * Encodes the specified Evidence message. Does not implicitly {@link tendermint.types.Evidence.verify|verify} messages. + * @function encode + * @memberof tendermint.types.Evidence + * @static + * @param {tendermint.types.IEvidence} message Evidence message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Evidence.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.duplicateVoteEvidence != null && Object.hasOwnProperty.call(message, "duplicateVoteEvidence")) + $root.tendermint.types.DuplicateVoteEvidence.encode(message.duplicateVoteEvidence, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.lightClientAttackEvidence != null && Object.hasOwnProperty.call(message, "lightClientAttackEvidence")) + $root.tendermint.types.LightClientAttackEvidence.encode(message.lightClientAttackEvidence, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Evidence message, length delimited. Does not implicitly {@link tendermint.types.Evidence.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.types.Evidence + * @static + * @param {tendermint.types.IEvidence} message Evidence message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Evidence.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Evidence message from the specified reader or buffer. + * @function decode + * @memberof tendermint.types.Evidence + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.types.Evidence} Evidence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Evidence.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.Evidence(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.duplicateVoteEvidence = $root.tendermint.types.DuplicateVoteEvidence.decode(reader, reader.uint32()); + break; + case 2: + message.lightClientAttackEvidence = $root.tendermint.types.LightClientAttackEvidence.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Evidence message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.types.Evidence + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.types.Evidence} Evidence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Evidence.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Evidence message. + * @function verify + * @memberof tendermint.types.Evidence + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Evidence.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.duplicateVoteEvidence != null && message.hasOwnProperty("duplicateVoteEvidence")) { + properties.sum = 1; + { + var error = $root.tendermint.types.DuplicateVoteEvidence.verify(message.duplicateVoteEvidence); + if (error) + return "duplicateVoteEvidence." + error; + } + } + if (message.lightClientAttackEvidence != null && message.hasOwnProperty("lightClientAttackEvidence")) { + if (properties.sum === 1) + return "sum: multiple values"; + properties.sum = 1; + { + var error = $root.tendermint.types.LightClientAttackEvidence.verify(message.lightClientAttackEvidence); + if (error) + return "lightClientAttackEvidence." + error; + } + } + return null; + }; + + /** + * Creates an Evidence message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.types.Evidence + * @static + * @param {Object.} object Plain object + * @returns {tendermint.types.Evidence} Evidence + */ + Evidence.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.types.Evidence) + return object; + var message = new $root.tendermint.types.Evidence(); + if (object.duplicateVoteEvidence != null) { + if (typeof object.duplicateVoteEvidence !== "object") + throw TypeError(".tendermint.types.Evidence.duplicateVoteEvidence: object expected"); + message.duplicateVoteEvidence = $root.tendermint.types.DuplicateVoteEvidence.fromObject(object.duplicateVoteEvidence); + } + if (object.lightClientAttackEvidence != null) { + if (typeof object.lightClientAttackEvidence !== "object") + throw TypeError(".tendermint.types.Evidence.lightClientAttackEvidence: object expected"); + message.lightClientAttackEvidence = $root.tendermint.types.LightClientAttackEvidence.fromObject(object.lightClientAttackEvidence); + } + return message; + }; + + /** + * Creates a plain object from an Evidence message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.types.Evidence + * @static + * @param {tendermint.types.Evidence} message Evidence + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Evidence.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.duplicateVoteEvidence != null && message.hasOwnProperty("duplicateVoteEvidence")) { + object.duplicateVoteEvidence = $root.tendermint.types.DuplicateVoteEvidence.toObject(message.duplicateVoteEvidence, options); + if (options.oneofs) + object.sum = "duplicateVoteEvidence"; + } + if (message.lightClientAttackEvidence != null && message.hasOwnProperty("lightClientAttackEvidence")) { + object.lightClientAttackEvidence = $root.tendermint.types.LightClientAttackEvidence.toObject(message.lightClientAttackEvidence, options); + if (options.oneofs) + object.sum = "lightClientAttackEvidence"; + } + return object; + }; + + /** + * Converts this Evidence to JSON. + * @function toJSON + * @memberof tendermint.types.Evidence + * @instance + * @returns {Object.} JSON object + */ + Evidence.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Evidence; + })(types.Evidence || {}); + + types.DuplicateVoteEvidence = (function(DuplicateVoteEvidence) { + + /** + * Properties of a DuplicateVoteEvidence. + * @memberof tendermint.types + * @interface IDuplicateVoteEvidence + * @property {tendermint.types.IVote|null} [voteA] DuplicateVoteEvidence voteA + * @property {tendermint.types.IVote|null} [voteB] DuplicateVoteEvidence voteB + * @property {number|Long|null} [totalVotingPower] DuplicateVoteEvidence totalVotingPower + * @property {number|Long|null} [validatorPower] DuplicateVoteEvidence validatorPower + * @property {google.protobuf.ITimestamp|null} [timestamp] DuplicateVoteEvidence timestamp + */ + + /** + * Constructs a new DuplicateVoteEvidence. + * @memberof tendermint.types + * @classdesc Represents a DuplicateVoteEvidence. + * @implements IDuplicateVoteEvidence + * @constructor + * @param {tendermint.types.IDuplicateVoteEvidence=} [properties] Properties to set + */ + function DuplicateVoteEvidence(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DuplicateVoteEvidence voteA. + * @member {tendermint.types.IVote|null|undefined} voteA + * @memberof tendermint.types.DuplicateVoteEvidence + * @instance + */ + DuplicateVoteEvidence.prototype.voteA = null; + + /** + * DuplicateVoteEvidence voteB. + * @member {tendermint.types.IVote|null|undefined} voteB + * @memberof tendermint.types.DuplicateVoteEvidence + * @instance + */ + DuplicateVoteEvidence.prototype.voteB = null; + + /** + * DuplicateVoteEvidence totalVotingPower. + * @member {number|Long} totalVotingPower + * @memberof tendermint.types.DuplicateVoteEvidence + * @instance + */ + DuplicateVoteEvidence.prototype.totalVotingPower = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * DuplicateVoteEvidence validatorPower. + * @member {number|Long} validatorPower + * @memberof tendermint.types.DuplicateVoteEvidence + * @instance + */ + DuplicateVoteEvidence.prototype.validatorPower = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * DuplicateVoteEvidence timestamp. + * @member {google.protobuf.ITimestamp|null|undefined} timestamp + * @memberof tendermint.types.DuplicateVoteEvidence + * @instance + */ + DuplicateVoteEvidence.prototype.timestamp = null; + + /** + * Creates a new DuplicateVoteEvidence instance using the specified properties. + * @function create + * @memberof tendermint.types.DuplicateVoteEvidence + * @static + * @param {tendermint.types.IDuplicateVoteEvidence=} [properties] Properties to set + * @returns {tendermint.types.DuplicateVoteEvidence} DuplicateVoteEvidence instance + */ + DuplicateVoteEvidence.create = function create(properties) { + return new DuplicateVoteEvidence(properties); + }; + + /** + * Encodes the specified DuplicateVoteEvidence message. Does not implicitly {@link tendermint.types.DuplicateVoteEvidence.verify|verify} messages. + * @function encode + * @memberof tendermint.types.DuplicateVoteEvidence + * @static + * @param {tendermint.types.IDuplicateVoteEvidence} message DuplicateVoteEvidence message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DuplicateVoteEvidence.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.voteA != null && Object.hasOwnProperty.call(message, "voteA")) + $root.tendermint.types.Vote.encode(message.voteA, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.voteB != null && Object.hasOwnProperty.call(message, "voteB")) + $root.tendermint.types.Vote.encode(message.voteB, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.totalVotingPower != null && Object.hasOwnProperty.call(message, "totalVotingPower")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.totalVotingPower); + if (message.validatorPower != null && Object.hasOwnProperty.call(message, "validatorPower")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.validatorPower); + if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) + $root.google.protobuf.Timestamp.encode(message.timestamp, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DuplicateVoteEvidence message, length delimited. Does not implicitly {@link tendermint.types.DuplicateVoteEvidence.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.types.DuplicateVoteEvidence + * @static + * @param {tendermint.types.IDuplicateVoteEvidence} message DuplicateVoteEvidence message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DuplicateVoteEvidence.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DuplicateVoteEvidence message from the specified reader or buffer. + * @function decode + * @memberof tendermint.types.DuplicateVoteEvidence + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.types.DuplicateVoteEvidence} DuplicateVoteEvidence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DuplicateVoteEvidence.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.DuplicateVoteEvidence(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.voteA = $root.tendermint.types.Vote.decode(reader, reader.uint32()); + break; + case 2: + message.voteB = $root.tendermint.types.Vote.decode(reader, reader.uint32()); + break; + case 3: + message.totalVotingPower = reader.int64(); + break; + case 4: + message.validatorPower = reader.int64(); + break; + case 5: + message.timestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DuplicateVoteEvidence message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.types.DuplicateVoteEvidence + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.types.DuplicateVoteEvidence} DuplicateVoteEvidence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DuplicateVoteEvidence.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DuplicateVoteEvidence message. + * @function verify + * @memberof tendermint.types.DuplicateVoteEvidence + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DuplicateVoteEvidence.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.voteA != null && message.hasOwnProperty("voteA")) { + var error = $root.tendermint.types.Vote.verify(message.voteA); + if (error) + return "voteA." + error; + } + if (message.voteB != null && message.hasOwnProperty("voteB")) { + var error = $root.tendermint.types.Vote.verify(message.voteB); + if (error) + return "voteB." + error; + } + if (message.totalVotingPower != null && message.hasOwnProperty("totalVotingPower")) + if (!$util.isInteger(message.totalVotingPower) && !(message.totalVotingPower && $util.isInteger(message.totalVotingPower.low) && $util.isInteger(message.totalVotingPower.high))) + return "totalVotingPower: integer|Long expected"; + if (message.validatorPower != null && message.hasOwnProperty("validatorPower")) + if (!$util.isInteger(message.validatorPower) && !(message.validatorPower && $util.isInteger(message.validatorPower.low) && $util.isInteger(message.validatorPower.high))) + return "validatorPower: integer|Long expected"; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) { + var error = $root.google.protobuf.Timestamp.verify(message.timestamp); + if (error) + return "timestamp." + error; + } + return null; + }; + + /** + * Creates a DuplicateVoteEvidence message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.types.DuplicateVoteEvidence + * @static + * @param {Object.} object Plain object + * @returns {tendermint.types.DuplicateVoteEvidence} DuplicateVoteEvidence + */ + DuplicateVoteEvidence.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.types.DuplicateVoteEvidence) + return object; + var message = new $root.tendermint.types.DuplicateVoteEvidence(); + if (object.voteA != null) { + if (typeof object.voteA !== "object") + throw TypeError(".tendermint.types.DuplicateVoteEvidence.voteA: object expected"); + message.voteA = $root.tendermint.types.Vote.fromObject(object.voteA); + } + if (object.voteB != null) { + if (typeof object.voteB !== "object") + throw TypeError(".tendermint.types.DuplicateVoteEvidence.voteB: object expected"); + message.voteB = $root.tendermint.types.Vote.fromObject(object.voteB); + } + if (object.totalVotingPower != null) + if ($util.Long) + (message.totalVotingPower = $util.Long.fromValue(object.totalVotingPower)).unsigned = false; + else if (typeof object.totalVotingPower === "string") + message.totalVotingPower = parseInt(object.totalVotingPower, 10); + else if (typeof object.totalVotingPower === "number") + message.totalVotingPower = object.totalVotingPower; + else if (typeof object.totalVotingPower === "object") + message.totalVotingPower = new $util.LongBits(object.totalVotingPower.low >>> 0, object.totalVotingPower.high >>> 0).toNumber(); + if (object.validatorPower != null) + if ($util.Long) + (message.validatorPower = $util.Long.fromValue(object.validatorPower)).unsigned = false; + else if (typeof object.validatorPower === "string") + message.validatorPower = parseInt(object.validatorPower, 10); + else if (typeof object.validatorPower === "number") + message.validatorPower = object.validatorPower; + else if (typeof object.validatorPower === "object") + message.validatorPower = new $util.LongBits(object.validatorPower.low >>> 0, object.validatorPower.high >>> 0).toNumber(); + if (object.timestamp != null) { + if (typeof object.timestamp !== "object") + throw TypeError(".tendermint.types.DuplicateVoteEvidence.timestamp: object expected"); + message.timestamp = $root.google.protobuf.Timestamp.fromObject(object.timestamp); + } + return message; + }; + + /** + * Creates a plain object from a DuplicateVoteEvidence message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.types.DuplicateVoteEvidence + * @static + * @param {tendermint.types.DuplicateVoteEvidence} message DuplicateVoteEvidence + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DuplicateVoteEvidence.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.voteA = null; + object.voteB = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.totalVotingPower = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.totalVotingPower = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.validatorPower = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.validatorPower = options.longs === String ? "0" : 0; + object.timestamp = null; + } + if (message.voteA != null && message.hasOwnProperty("voteA")) + object.voteA = $root.tendermint.types.Vote.toObject(message.voteA, options); + if (message.voteB != null && message.hasOwnProperty("voteB")) + object.voteB = $root.tendermint.types.Vote.toObject(message.voteB, options); + if (message.totalVotingPower != null && message.hasOwnProperty("totalVotingPower")) + if (typeof message.totalVotingPower === "number") + object.totalVotingPower = options.longs === String ? String(message.totalVotingPower) : message.totalVotingPower; + else + object.totalVotingPower = options.longs === String ? $util.Long.prototype.toString.call(message.totalVotingPower) : options.longs === Number ? new $util.LongBits(message.totalVotingPower.low >>> 0, message.totalVotingPower.high >>> 0).toNumber() : message.totalVotingPower; + if (message.validatorPower != null && message.hasOwnProperty("validatorPower")) + if (typeof message.validatorPower === "number") + object.validatorPower = options.longs === String ? String(message.validatorPower) : message.validatorPower; + else + object.validatorPower = options.longs === String ? $util.Long.prototype.toString.call(message.validatorPower) : options.longs === Number ? new $util.LongBits(message.validatorPower.low >>> 0, message.validatorPower.high >>> 0).toNumber() : message.validatorPower; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + object.timestamp = $root.google.protobuf.Timestamp.toObject(message.timestamp, options); + return object; + }; + + /** + * Converts this DuplicateVoteEvidence to JSON. + * @function toJSON + * @memberof tendermint.types.DuplicateVoteEvidence + * @instance + * @returns {Object.} JSON object + */ + DuplicateVoteEvidence.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DuplicateVoteEvidence; + })(types.DuplicateVoteEvidence || {}); + + types.LightClientAttackEvidence = (function(LightClientAttackEvidence) { + + /** + * Properties of a LightClientAttackEvidence. + * @memberof tendermint.types + * @interface ILightClientAttackEvidence + * @property {tendermint.types.ILightBlock|null} [conflictingBlock] LightClientAttackEvidence conflictingBlock + * @property {number|Long|null} [commonHeight] LightClientAttackEvidence commonHeight + * @property {Array.|null} [byzantineValidators] LightClientAttackEvidence byzantineValidators + * @property {number|Long|null} [totalVotingPower] LightClientAttackEvidence totalVotingPower + * @property {google.protobuf.ITimestamp|null} [timestamp] LightClientAttackEvidence timestamp + */ + + /** + * Constructs a new LightClientAttackEvidence. + * @memberof tendermint.types + * @classdesc Represents a LightClientAttackEvidence. + * @implements ILightClientAttackEvidence + * @constructor + * @param {tendermint.types.ILightClientAttackEvidence=} [properties] Properties to set + */ + function LightClientAttackEvidence(properties) { + this.byzantineValidators = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LightClientAttackEvidence conflictingBlock. + * @member {tendermint.types.ILightBlock|null|undefined} conflictingBlock + * @memberof tendermint.types.LightClientAttackEvidence + * @instance + */ + LightClientAttackEvidence.prototype.conflictingBlock = null; + + /** + * LightClientAttackEvidence commonHeight. + * @member {number|Long} commonHeight + * @memberof tendermint.types.LightClientAttackEvidence + * @instance + */ + LightClientAttackEvidence.prototype.commonHeight = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * LightClientAttackEvidence byzantineValidators. + * @member {Array.} byzantineValidators + * @memberof tendermint.types.LightClientAttackEvidence + * @instance + */ + LightClientAttackEvidence.prototype.byzantineValidators = $util.emptyArray; + + /** + * LightClientAttackEvidence totalVotingPower. + * @member {number|Long} totalVotingPower + * @memberof tendermint.types.LightClientAttackEvidence + * @instance + */ + LightClientAttackEvidence.prototype.totalVotingPower = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * LightClientAttackEvidence timestamp. + * @member {google.protobuf.ITimestamp|null|undefined} timestamp + * @memberof tendermint.types.LightClientAttackEvidence + * @instance + */ + LightClientAttackEvidence.prototype.timestamp = null; + + /** + * Creates a new LightClientAttackEvidence instance using the specified properties. + * @function create + * @memberof tendermint.types.LightClientAttackEvidence + * @static + * @param {tendermint.types.ILightClientAttackEvidence=} [properties] Properties to set + * @returns {tendermint.types.LightClientAttackEvidence} LightClientAttackEvidence instance + */ + LightClientAttackEvidence.create = function create(properties) { + return new LightClientAttackEvidence(properties); + }; + + /** + * Encodes the specified LightClientAttackEvidence message. Does not implicitly {@link tendermint.types.LightClientAttackEvidence.verify|verify} messages. + * @function encode + * @memberof tendermint.types.LightClientAttackEvidence + * @static + * @param {tendermint.types.ILightClientAttackEvidence} message LightClientAttackEvidence message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LightClientAttackEvidence.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.conflictingBlock != null && Object.hasOwnProperty.call(message, "conflictingBlock")) + $root.tendermint.types.LightBlock.encode(message.conflictingBlock, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.commonHeight != null && Object.hasOwnProperty.call(message, "commonHeight")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.commonHeight); + if (message.byzantineValidators != null && message.byzantineValidators.length) + for (var i = 0; i < message.byzantineValidators.length; ++i) + $root.tendermint.types.Validator.encode(message.byzantineValidators[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.totalVotingPower != null && Object.hasOwnProperty.call(message, "totalVotingPower")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.totalVotingPower); + if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) + $root.google.protobuf.Timestamp.encode(message.timestamp, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LightClientAttackEvidence message, length delimited. Does not implicitly {@link tendermint.types.LightClientAttackEvidence.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.types.LightClientAttackEvidence + * @static + * @param {tendermint.types.ILightClientAttackEvidence} message LightClientAttackEvidence message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LightClientAttackEvidence.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LightClientAttackEvidence message from the specified reader or buffer. + * @function decode + * @memberof tendermint.types.LightClientAttackEvidence + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.types.LightClientAttackEvidence} LightClientAttackEvidence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LightClientAttackEvidence.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.LightClientAttackEvidence(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.conflictingBlock = $root.tendermint.types.LightBlock.decode(reader, reader.uint32()); + break; + case 2: + message.commonHeight = reader.int64(); + break; + case 3: + if (!(message.byzantineValidators && message.byzantineValidators.length)) + message.byzantineValidators = []; + message.byzantineValidators.push($root.tendermint.types.Validator.decode(reader, reader.uint32())); + break; + case 4: + message.totalVotingPower = reader.int64(); + break; + case 5: + message.timestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LightClientAttackEvidence message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.types.LightClientAttackEvidence + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.types.LightClientAttackEvidence} LightClientAttackEvidence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LightClientAttackEvidence.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LightClientAttackEvidence message. + * @function verify + * @memberof tendermint.types.LightClientAttackEvidence + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LightClientAttackEvidence.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.conflictingBlock != null && message.hasOwnProperty("conflictingBlock")) { + var error = $root.tendermint.types.LightBlock.verify(message.conflictingBlock); + if (error) + return "conflictingBlock." + error; + } + if (message.commonHeight != null && message.hasOwnProperty("commonHeight")) + if (!$util.isInteger(message.commonHeight) && !(message.commonHeight && $util.isInteger(message.commonHeight.low) && $util.isInteger(message.commonHeight.high))) + return "commonHeight: integer|Long expected"; + if (message.byzantineValidators != null && message.hasOwnProperty("byzantineValidators")) { + if (!Array.isArray(message.byzantineValidators)) + return "byzantineValidators: array expected"; + for (var i = 0; i < message.byzantineValidators.length; ++i) { + var error = $root.tendermint.types.Validator.verify(message.byzantineValidators[i]); + if (error) + return "byzantineValidators." + error; + } + } + if (message.totalVotingPower != null && message.hasOwnProperty("totalVotingPower")) + if (!$util.isInteger(message.totalVotingPower) && !(message.totalVotingPower && $util.isInteger(message.totalVotingPower.low) && $util.isInteger(message.totalVotingPower.high))) + return "totalVotingPower: integer|Long expected"; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) { + var error = $root.google.protobuf.Timestamp.verify(message.timestamp); + if (error) + return "timestamp." + error; + } + return null; + }; + + /** + * Creates a LightClientAttackEvidence message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.types.LightClientAttackEvidence + * @static + * @param {Object.} object Plain object + * @returns {tendermint.types.LightClientAttackEvidence} LightClientAttackEvidence + */ + LightClientAttackEvidence.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.types.LightClientAttackEvidence) + return object; + var message = new $root.tendermint.types.LightClientAttackEvidence(); + if (object.conflictingBlock != null) { + if (typeof object.conflictingBlock !== "object") + throw TypeError(".tendermint.types.LightClientAttackEvidence.conflictingBlock: object expected"); + message.conflictingBlock = $root.tendermint.types.LightBlock.fromObject(object.conflictingBlock); + } + if (object.commonHeight != null) + if ($util.Long) + (message.commonHeight = $util.Long.fromValue(object.commonHeight)).unsigned = false; + else if (typeof object.commonHeight === "string") + message.commonHeight = parseInt(object.commonHeight, 10); + else if (typeof object.commonHeight === "number") + message.commonHeight = object.commonHeight; + else if (typeof object.commonHeight === "object") + message.commonHeight = new $util.LongBits(object.commonHeight.low >>> 0, object.commonHeight.high >>> 0).toNumber(); + if (object.byzantineValidators) { + if (!Array.isArray(object.byzantineValidators)) + throw TypeError(".tendermint.types.LightClientAttackEvidence.byzantineValidators: array expected"); + message.byzantineValidators = []; + for (var i = 0; i < object.byzantineValidators.length; ++i) { + if (typeof object.byzantineValidators[i] !== "object") + throw TypeError(".tendermint.types.LightClientAttackEvidence.byzantineValidators: object expected"); + message.byzantineValidators[i] = $root.tendermint.types.Validator.fromObject(object.byzantineValidators[i]); + } + } + if (object.totalVotingPower != null) + if ($util.Long) + (message.totalVotingPower = $util.Long.fromValue(object.totalVotingPower)).unsigned = false; + else if (typeof object.totalVotingPower === "string") + message.totalVotingPower = parseInt(object.totalVotingPower, 10); + else if (typeof object.totalVotingPower === "number") + message.totalVotingPower = object.totalVotingPower; + else if (typeof object.totalVotingPower === "object") + message.totalVotingPower = new $util.LongBits(object.totalVotingPower.low >>> 0, object.totalVotingPower.high >>> 0).toNumber(); + if (object.timestamp != null) { + if (typeof object.timestamp !== "object") + throw TypeError(".tendermint.types.LightClientAttackEvidence.timestamp: object expected"); + message.timestamp = $root.google.protobuf.Timestamp.fromObject(object.timestamp); + } + return message; + }; + + /** + * Creates a plain object from a LightClientAttackEvidence message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.types.LightClientAttackEvidence + * @static + * @param {tendermint.types.LightClientAttackEvidence} message LightClientAttackEvidence + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LightClientAttackEvidence.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.byzantineValidators = []; + if (options.defaults) { + object.conflictingBlock = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.commonHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.commonHeight = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.totalVotingPower = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.totalVotingPower = options.longs === String ? "0" : 0; + object.timestamp = null; + } + if (message.conflictingBlock != null && message.hasOwnProperty("conflictingBlock")) + object.conflictingBlock = $root.tendermint.types.LightBlock.toObject(message.conflictingBlock, options); + if (message.commonHeight != null && message.hasOwnProperty("commonHeight")) + if (typeof message.commonHeight === "number") + object.commonHeight = options.longs === String ? String(message.commonHeight) : message.commonHeight; + else + object.commonHeight = options.longs === String ? $util.Long.prototype.toString.call(message.commonHeight) : options.longs === Number ? new $util.LongBits(message.commonHeight.low >>> 0, message.commonHeight.high >>> 0).toNumber() : message.commonHeight; + if (message.byzantineValidators && message.byzantineValidators.length) { + object.byzantineValidators = []; + for (var j = 0; j < message.byzantineValidators.length; ++j) + object.byzantineValidators[j] = $root.tendermint.types.Validator.toObject(message.byzantineValidators[j], options); + } + if (message.totalVotingPower != null && message.hasOwnProperty("totalVotingPower")) + if (typeof message.totalVotingPower === "number") + object.totalVotingPower = options.longs === String ? String(message.totalVotingPower) : message.totalVotingPower; + else + object.totalVotingPower = options.longs === String ? $util.Long.prototype.toString.call(message.totalVotingPower) : options.longs === Number ? new $util.LongBits(message.totalVotingPower.low >>> 0, message.totalVotingPower.high >>> 0).toNumber() : message.totalVotingPower; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + object.timestamp = $root.google.protobuf.Timestamp.toObject(message.timestamp, options); + return object; + }; + + /** + * Converts this LightClientAttackEvidence to JSON. + * @function toJSON + * @memberof tendermint.types.LightClientAttackEvidence + * @instance + * @returns {Object.} JSON object + */ + LightClientAttackEvidence.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return LightClientAttackEvidence; + })(types.LightClientAttackEvidence || {}); + + types.EvidenceList = (function(EvidenceList) { + + /** + * Properties of an EvidenceList. + * @memberof tendermint.types + * @interface IEvidenceList + * @property {Array.|null} [evidence] EvidenceList evidence + */ + + /** + * Constructs a new EvidenceList. + * @memberof tendermint.types + * @classdesc Represents an EvidenceList. + * @implements IEvidenceList + * @constructor + * @param {tendermint.types.IEvidenceList=} [properties] Properties to set + */ + function EvidenceList(properties) { + this.evidence = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EvidenceList evidence. + * @member {Array.} evidence + * @memberof tendermint.types.EvidenceList + * @instance + */ + EvidenceList.prototype.evidence = $util.emptyArray; + + /** + * Creates a new EvidenceList instance using the specified properties. + * @function create + * @memberof tendermint.types.EvidenceList + * @static + * @param {tendermint.types.IEvidenceList=} [properties] Properties to set + * @returns {tendermint.types.EvidenceList} EvidenceList instance + */ + EvidenceList.create = function create(properties) { + return new EvidenceList(properties); + }; + + /** + * Encodes the specified EvidenceList message. Does not implicitly {@link tendermint.types.EvidenceList.verify|verify} messages. + * @function encode + * @memberof tendermint.types.EvidenceList + * @static + * @param {tendermint.types.IEvidenceList} message EvidenceList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EvidenceList.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.evidence != null && message.evidence.length) + for (var i = 0; i < message.evidence.length; ++i) + $root.tendermint.types.Evidence.encode(message.evidence[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EvidenceList message, length delimited. Does not implicitly {@link tendermint.types.EvidenceList.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.types.EvidenceList + * @static + * @param {tendermint.types.IEvidenceList} message EvidenceList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EvidenceList.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EvidenceList message from the specified reader or buffer. + * @function decode + * @memberof tendermint.types.EvidenceList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.types.EvidenceList} EvidenceList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EvidenceList.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.EvidenceList(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.evidence && message.evidence.length)) + message.evidence = []; + message.evidence.push($root.tendermint.types.Evidence.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EvidenceList message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.types.EvidenceList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.types.EvidenceList} EvidenceList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EvidenceList.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EvidenceList message. + * @function verify + * @memberof tendermint.types.EvidenceList + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EvidenceList.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.evidence != null && message.hasOwnProperty("evidence")) { + if (!Array.isArray(message.evidence)) + return "evidence: array expected"; + for (var i = 0; i < message.evidence.length; ++i) { + var error = $root.tendermint.types.Evidence.verify(message.evidence[i]); + if (error) + return "evidence." + error; + } + } + return null; + }; + + /** + * Creates an EvidenceList message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.types.EvidenceList + * @static + * @param {Object.} object Plain object + * @returns {tendermint.types.EvidenceList} EvidenceList + */ + EvidenceList.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.types.EvidenceList) + return object; + var message = new $root.tendermint.types.EvidenceList(); + if (object.evidence) { + if (!Array.isArray(object.evidence)) + throw TypeError(".tendermint.types.EvidenceList.evidence: array expected"); + message.evidence = []; + for (var i = 0; i < object.evidence.length; ++i) { + if (typeof object.evidence[i] !== "object") + throw TypeError(".tendermint.types.EvidenceList.evidence: object expected"); + message.evidence[i] = $root.tendermint.types.Evidence.fromObject(object.evidence[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EvidenceList message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.types.EvidenceList + * @static + * @param {tendermint.types.EvidenceList} message EvidenceList + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EvidenceList.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.evidence = []; + if (message.evidence && message.evidence.length) { + object.evidence = []; + for (var j = 0; j < message.evidence.length; ++j) + object.evidence[j] = $root.tendermint.types.Evidence.toObject(message.evidence[j], options); + } + return object; + }; + + /** + * Converts this EvidenceList to JSON. + * @function toJSON + * @memberof tendermint.types.EvidenceList + * @instance + * @returns {Object.} JSON object + */ + EvidenceList.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EvidenceList; + })(types.EvidenceList || {}); + + types.ConsensusParams = (function(ConsensusParams) { + + /** + * Properties of a ConsensusParams. + * @memberof tendermint.types + * @interface IConsensusParams + * @property {tendermint.types.IBlockParams|null} [block] ConsensusParams block + * @property {tendermint.types.IEvidenceParams|null} [evidence] ConsensusParams evidence + * @property {tendermint.types.IValidatorParams|null} [validator] ConsensusParams validator + * @property {tendermint.types.IVersionParams|null} [version] ConsensusParams version + */ + + /** + * Constructs a new ConsensusParams. + * @memberof tendermint.types + * @classdesc Represents a ConsensusParams. + * @implements IConsensusParams + * @constructor + * @param {tendermint.types.IConsensusParams=} [properties] Properties to set + */ + function ConsensusParams(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ConsensusParams block. + * @member {tendermint.types.IBlockParams|null|undefined} block + * @memberof tendermint.types.ConsensusParams + * @instance + */ + ConsensusParams.prototype.block = null; + + /** + * ConsensusParams evidence. + * @member {tendermint.types.IEvidenceParams|null|undefined} evidence + * @memberof tendermint.types.ConsensusParams + * @instance + */ + ConsensusParams.prototype.evidence = null; + + /** + * ConsensusParams validator. + * @member {tendermint.types.IValidatorParams|null|undefined} validator + * @memberof tendermint.types.ConsensusParams + * @instance + */ + ConsensusParams.prototype.validator = null; + + /** + * ConsensusParams version. + * @member {tendermint.types.IVersionParams|null|undefined} version + * @memberof tendermint.types.ConsensusParams + * @instance + */ + ConsensusParams.prototype.version = null; + + /** + * Creates a new ConsensusParams instance using the specified properties. + * @function create + * @memberof tendermint.types.ConsensusParams + * @static + * @param {tendermint.types.IConsensusParams=} [properties] Properties to set + * @returns {tendermint.types.ConsensusParams} ConsensusParams instance + */ + ConsensusParams.create = function create(properties) { + return new ConsensusParams(properties); + }; + + /** + * Encodes the specified ConsensusParams message. Does not implicitly {@link tendermint.types.ConsensusParams.verify|verify} messages. + * @function encode + * @memberof tendermint.types.ConsensusParams + * @static + * @param {tendermint.types.IConsensusParams} message ConsensusParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConsensusParams.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.block != null && Object.hasOwnProperty.call(message, "block")) + $root.tendermint.types.BlockParams.encode(message.block, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.evidence != null && Object.hasOwnProperty.call(message, "evidence")) + $root.tendermint.types.EvidenceParams.encode(message.evidence, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.validator != null && Object.hasOwnProperty.call(message, "validator")) + $root.tendermint.types.ValidatorParams.encode(message.validator, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + $root.tendermint.types.VersionParams.encode(message.version, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ConsensusParams message, length delimited. Does not implicitly {@link tendermint.types.ConsensusParams.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.types.ConsensusParams + * @static + * @param {tendermint.types.IConsensusParams} message ConsensusParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConsensusParams.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConsensusParams message from the specified reader or buffer. + * @function decode + * @memberof tendermint.types.ConsensusParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.types.ConsensusParams} ConsensusParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConsensusParams.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.ConsensusParams(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.block = $root.tendermint.types.BlockParams.decode(reader, reader.uint32()); + break; + case 2: + message.evidence = $root.tendermint.types.EvidenceParams.decode(reader, reader.uint32()); + break; + case 3: + message.validator = $root.tendermint.types.ValidatorParams.decode(reader, reader.uint32()); + break; + case 4: + message.version = $root.tendermint.types.VersionParams.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ConsensusParams message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.types.ConsensusParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.types.ConsensusParams} ConsensusParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConsensusParams.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConsensusParams message. + * @function verify + * @memberof tendermint.types.ConsensusParams + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConsensusParams.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.block != null && message.hasOwnProperty("block")) { + var error = $root.tendermint.types.BlockParams.verify(message.block); + if (error) + return "block." + error; + } + if (message.evidence != null && message.hasOwnProperty("evidence")) { + var error = $root.tendermint.types.EvidenceParams.verify(message.evidence); + if (error) + return "evidence." + error; + } + if (message.validator != null && message.hasOwnProperty("validator")) { + var error = $root.tendermint.types.ValidatorParams.verify(message.validator); + if (error) + return "validator." + error; + } + if (message.version != null && message.hasOwnProperty("version")) { + var error = $root.tendermint.types.VersionParams.verify(message.version); + if (error) + return "version." + error; + } + return null; + }; + + /** + * Creates a ConsensusParams message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.types.ConsensusParams + * @static + * @param {Object.} object Plain object + * @returns {tendermint.types.ConsensusParams} ConsensusParams + */ + ConsensusParams.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.types.ConsensusParams) + return object; + var message = new $root.tendermint.types.ConsensusParams(); + if (object.block != null) { + if (typeof object.block !== "object") + throw TypeError(".tendermint.types.ConsensusParams.block: object expected"); + message.block = $root.tendermint.types.BlockParams.fromObject(object.block); + } + if (object.evidence != null) { + if (typeof object.evidence !== "object") + throw TypeError(".tendermint.types.ConsensusParams.evidence: object expected"); + message.evidence = $root.tendermint.types.EvidenceParams.fromObject(object.evidence); + } + if (object.validator != null) { + if (typeof object.validator !== "object") + throw TypeError(".tendermint.types.ConsensusParams.validator: object expected"); + message.validator = $root.tendermint.types.ValidatorParams.fromObject(object.validator); + } + if (object.version != null) { + if (typeof object.version !== "object") + throw TypeError(".tendermint.types.ConsensusParams.version: object expected"); + message.version = $root.tendermint.types.VersionParams.fromObject(object.version); + } + return message; + }; + + /** + * Creates a plain object from a ConsensusParams message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.types.ConsensusParams + * @static + * @param {tendermint.types.ConsensusParams} message ConsensusParams + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConsensusParams.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.block = null; + object.evidence = null; + object.validator = null; + object.version = null; + } + if (message.block != null && message.hasOwnProperty("block")) + object.block = $root.tendermint.types.BlockParams.toObject(message.block, options); + if (message.evidence != null && message.hasOwnProperty("evidence")) + object.evidence = $root.tendermint.types.EvidenceParams.toObject(message.evidence, options); + if (message.validator != null && message.hasOwnProperty("validator")) + object.validator = $root.tendermint.types.ValidatorParams.toObject(message.validator, options); + if (message.version != null && message.hasOwnProperty("version")) + object.version = $root.tendermint.types.VersionParams.toObject(message.version, options); + return object; + }; + + /** + * Converts this ConsensusParams to JSON. + * @function toJSON + * @memberof tendermint.types.ConsensusParams + * @instance + * @returns {Object.} JSON object + */ + ConsensusParams.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ConsensusParams; + })(types.ConsensusParams || {}); + + types.BlockParams = (function(BlockParams) { + + /** + * Properties of a BlockParams. + * @memberof tendermint.types + * @interface IBlockParams + * @property {number|Long|null} [maxBytes] BlockParams maxBytes + * @property {number|Long|null} [maxGas] BlockParams maxGas + * @property {number|Long|null} [timeIotaMs] BlockParams timeIotaMs + */ + + /** + * Constructs a new BlockParams. + * @memberof tendermint.types + * @classdesc Represents a BlockParams. + * @implements IBlockParams + * @constructor + * @param {tendermint.types.IBlockParams=} [properties] Properties to set + */ + function BlockParams(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BlockParams maxBytes. + * @member {number|Long} maxBytes + * @memberof tendermint.types.BlockParams + * @instance + */ + BlockParams.prototype.maxBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * BlockParams maxGas. + * @member {number|Long} maxGas + * @memberof tendermint.types.BlockParams + * @instance + */ + BlockParams.prototype.maxGas = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * BlockParams timeIotaMs. + * @member {number|Long} timeIotaMs + * @memberof tendermint.types.BlockParams + * @instance + */ + BlockParams.prototype.timeIotaMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new BlockParams instance using the specified properties. + * @function create + * @memberof tendermint.types.BlockParams + * @static + * @param {tendermint.types.IBlockParams=} [properties] Properties to set + * @returns {tendermint.types.BlockParams} BlockParams instance + */ + BlockParams.create = function create(properties) { + return new BlockParams(properties); + }; + + /** + * Encodes the specified BlockParams message. Does not implicitly {@link tendermint.types.BlockParams.verify|verify} messages. + * @function encode + * @memberof tendermint.types.BlockParams + * @static + * @param {tendermint.types.IBlockParams} message BlockParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BlockParams.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.maxBytes != null && Object.hasOwnProperty.call(message, "maxBytes")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.maxBytes); + if (message.maxGas != null && Object.hasOwnProperty.call(message, "maxGas")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.maxGas); + if (message.timeIotaMs != null && Object.hasOwnProperty.call(message, "timeIotaMs")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.timeIotaMs); + return writer; + }; + + /** + * Encodes the specified BlockParams message, length delimited. Does not implicitly {@link tendermint.types.BlockParams.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.types.BlockParams + * @static + * @param {tendermint.types.IBlockParams} message BlockParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BlockParams.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BlockParams message from the specified reader or buffer. + * @function decode + * @memberof tendermint.types.BlockParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.types.BlockParams} BlockParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BlockParams.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.BlockParams(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.maxBytes = reader.int64(); + break; + case 2: + message.maxGas = reader.int64(); + break; + case 3: + message.timeIotaMs = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BlockParams message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.types.BlockParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.types.BlockParams} BlockParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BlockParams.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BlockParams message. + * @function verify + * @memberof tendermint.types.BlockParams + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BlockParams.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.maxBytes != null && message.hasOwnProperty("maxBytes")) + if (!$util.isInteger(message.maxBytes) && !(message.maxBytes && $util.isInteger(message.maxBytes.low) && $util.isInteger(message.maxBytes.high))) + return "maxBytes: integer|Long expected"; + if (message.maxGas != null && message.hasOwnProperty("maxGas")) + if (!$util.isInteger(message.maxGas) && !(message.maxGas && $util.isInteger(message.maxGas.low) && $util.isInteger(message.maxGas.high))) + return "maxGas: integer|Long expected"; + if (message.timeIotaMs != null && message.hasOwnProperty("timeIotaMs")) + if (!$util.isInteger(message.timeIotaMs) && !(message.timeIotaMs && $util.isInteger(message.timeIotaMs.low) && $util.isInteger(message.timeIotaMs.high))) + return "timeIotaMs: integer|Long expected"; + return null; + }; + + /** + * Creates a BlockParams message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.types.BlockParams + * @static + * @param {Object.} object Plain object + * @returns {tendermint.types.BlockParams} BlockParams + */ + BlockParams.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.types.BlockParams) + return object; + var message = new $root.tendermint.types.BlockParams(); + if (object.maxBytes != null) + if ($util.Long) + (message.maxBytes = $util.Long.fromValue(object.maxBytes)).unsigned = false; + else if (typeof object.maxBytes === "string") + message.maxBytes = parseInt(object.maxBytes, 10); + else if (typeof object.maxBytes === "number") + message.maxBytes = object.maxBytes; + else if (typeof object.maxBytes === "object") + message.maxBytes = new $util.LongBits(object.maxBytes.low >>> 0, object.maxBytes.high >>> 0).toNumber(); + if (object.maxGas != null) + if ($util.Long) + (message.maxGas = $util.Long.fromValue(object.maxGas)).unsigned = false; + else if (typeof object.maxGas === "string") + message.maxGas = parseInt(object.maxGas, 10); + else if (typeof object.maxGas === "number") + message.maxGas = object.maxGas; + else if (typeof object.maxGas === "object") + message.maxGas = new $util.LongBits(object.maxGas.low >>> 0, object.maxGas.high >>> 0).toNumber(); + if (object.timeIotaMs != null) + if ($util.Long) + (message.timeIotaMs = $util.Long.fromValue(object.timeIotaMs)).unsigned = false; + else if (typeof object.timeIotaMs === "string") + message.timeIotaMs = parseInt(object.timeIotaMs, 10); + else if (typeof object.timeIotaMs === "number") + message.timeIotaMs = object.timeIotaMs; + else if (typeof object.timeIotaMs === "object") + message.timeIotaMs = new $util.LongBits(object.timeIotaMs.low >>> 0, object.timeIotaMs.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a BlockParams message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.types.BlockParams + * @static + * @param {tendermint.types.BlockParams} message BlockParams + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BlockParams.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.maxBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.maxBytes = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.maxGas = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.maxGas = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.timeIotaMs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.timeIotaMs = options.longs === String ? "0" : 0; + } + if (message.maxBytes != null && message.hasOwnProperty("maxBytes")) + if (typeof message.maxBytes === "number") + object.maxBytes = options.longs === String ? String(message.maxBytes) : message.maxBytes; + else + object.maxBytes = options.longs === String ? $util.Long.prototype.toString.call(message.maxBytes) : options.longs === Number ? new $util.LongBits(message.maxBytes.low >>> 0, message.maxBytes.high >>> 0).toNumber() : message.maxBytes; + if (message.maxGas != null && message.hasOwnProperty("maxGas")) + if (typeof message.maxGas === "number") + object.maxGas = options.longs === String ? String(message.maxGas) : message.maxGas; + else + object.maxGas = options.longs === String ? $util.Long.prototype.toString.call(message.maxGas) : options.longs === Number ? new $util.LongBits(message.maxGas.low >>> 0, message.maxGas.high >>> 0).toNumber() : message.maxGas; + if (message.timeIotaMs != null && message.hasOwnProperty("timeIotaMs")) + if (typeof message.timeIotaMs === "number") + object.timeIotaMs = options.longs === String ? String(message.timeIotaMs) : message.timeIotaMs; + else + object.timeIotaMs = options.longs === String ? $util.Long.prototype.toString.call(message.timeIotaMs) : options.longs === Number ? new $util.LongBits(message.timeIotaMs.low >>> 0, message.timeIotaMs.high >>> 0).toNumber() : message.timeIotaMs; + return object; + }; + + /** + * Converts this BlockParams to JSON. + * @function toJSON + * @memberof tendermint.types.BlockParams + * @instance + * @returns {Object.} JSON object + */ + BlockParams.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return BlockParams; + })(types.BlockParams || {}); + + types.EvidenceParams = (function(EvidenceParams) { + + /** + * Properties of an EvidenceParams. + * @memberof tendermint.types + * @interface IEvidenceParams + * @property {number|Long|null} [maxAgeNumBlocks] EvidenceParams maxAgeNumBlocks + * @property {google.protobuf.IDuration|null} [maxAgeDuration] EvidenceParams maxAgeDuration + * @property {number|Long|null} [maxBytes] EvidenceParams maxBytes + */ + + /** + * Constructs a new EvidenceParams. + * @memberof tendermint.types + * @classdesc Represents an EvidenceParams. + * @implements IEvidenceParams + * @constructor + * @param {tendermint.types.IEvidenceParams=} [properties] Properties to set + */ + function EvidenceParams(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EvidenceParams maxAgeNumBlocks. + * @member {number|Long} maxAgeNumBlocks + * @memberof tendermint.types.EvidenceParams + * @instance + */ + EvidenceParams.prototype.maxAgeNumBlocks = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * EvidenceParams maxAgeDuration. + * @member {google.protobuf.IDuration|null|undefined} maxAgeDuration + * @memberof tendermint.types.EvidenceParams + * @instance + */ + EvidenceParams.prototype.maxAgeDuration = null; + + /** + * EvidenceParams maxBytes. + * @member {number|Long} maxBytes + * @memberof tendermint.types.EvidenceParams + * @instance + */ + EvidenceParams.prototype.maxBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new EvidenceParams instance using the specified properties. + * @function create + * @memberof tendermint.types.EvidenceParams + * @static + * @param {tendermint.types.IEvidenceParams=} [properties] Properties to set + * @returns {tendermint.types.EvidenceParams} EvidenceParams instance + */ + EvidenceParams.create = function create(properties) { + return new EvidenceParams(properties); + }; + + /** + * Encodes the specified EvidenceParams message. Does not implicitly {@link tendermint.types.EvidenceParams.verify|verify} messages. + * @function encode + * @memberof tendermint.types.EvidenceParams + * @static + * @param {tendermint.types.IEvidenceParams} message EvidenceParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EvidenceParams.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.maxAgeNumBlocks != null && Object.hasOwnProperty.call(message, "maxAgeNumBlocks")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.maxAgeNumBlocks); + if (message.maxAgeDuration != null && Object.hasOwnProperty.call(message, "maxAgeDuration")) + $root.google.protobuf.Duration.encode(message.maxAgeDuration, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.maxBytes != null && Object.hasOwnProperty.call(message, "maxBytes")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.maxBytes); + return writer; + }; + + /** + * Encodes the specified EvidenceParams message, length delimited. Does not implicitly {@link tendermint.types.EvidenceParams.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.types.EvidenceParams + * @static + * @param {tendermint.types.IEvidenceParams} message EvidenceParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EvidenceParams.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EvidenceParams message from the specified reader or buffer. + * @function decode + * @memberof tendermint.types.EvidenceParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.types.EvidenceParams} EvidenceParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EvidenceParams.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.EvidenceParams(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.maxAgeNumBlocks = reader.int64(); + break; + case 2: + message.maxAgeDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + case 3: + message.maxBytes = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EvidenceParams message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.types.EvidenceParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.types.EvidenceParams} EvidenceParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EvidenceParams.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EvidenceParams message. + * @function verify + * @memberof tendermint.types.EvidenceParams + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EvidenceParams.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.maxAgeNumBlocks != null && message.hasOwnProperty("maxAgeNumBlocks")) + if (!$util.isInteger(message.maxAgeNumBlocks) && !(message.maxAgeNumBlocks && $util.isInteger(message.maxAgeNumBlocks.low) && $util.isInteger(message.maxAgeNumBlocks.high))) + return "maxAgeNumBlocks: integer|Long expected"; + if (message.maxAgeDuration != null && message.hasOwnProperty("maxAgeDuration")) { + var error = $root.google.protobuf.Duration.verify(message.maxAgeDuration); + if (error) + return "maxAgeDuration." + error; + } + if (message.maxBytes != null && message.hasOwnProperty("maxBytes")) + if (!$util.isInteger(message.maxBytes) && !(message.maxBytes && $util.isInteger(message.maxBytes.low) && $util.isInteger(message.maxBytes.high))) + return "maxBytes: integer|Long expected"; + return null; + }; + + /** + * Creates an EvidenceParams message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.types.EvidenceParams + * @static + * @param {Object.} object Plain object + * @returns {tendermint.types.EvidenceParams} EvidenceParams + */ + EvidenceParams.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.types.EvidenceParams) + return object; + var message = new $root.tendermint.types.EvidenceParams(); + if (object.maxAgeNumBlocks != null) + if ($util.Long) + (message.maxAgeNumBlocks = $util.Long.fromValue(object.maxAgeNumBlocks)).unsigned = false; + else if (typeof object.maxAgeNumBlocks === "string") + message.maxAgeNumBlocks = parseInt(object.maxAgeNumBlocks, 10); + else if (typeof object.maxAgeNumBlocks === "number") + message.maxAgeNumBlocks = object.maxAgeNumBlocks; + else if (typeof object.maxAgeNumBlocks === "object") + message.maxAgeNumBlocks = new $util.LongBits(object.maxAgeNumBlocks.low >>> 0, object.maxAgeNumBlocks.high >>> 0).toNumber(); + if (object.maxAgeDuration != null) { + if (typeof object.maxAgeDuration !== "object") + throw TypeError(".tendermint.types.EvidenceParams.maxAgeDuration: object expected"); + message.maxAgeDuration = $root.google.protobuf.Duration.fromObject(object.maxAgeDuration); + } + if (object.maxBytes != null) + if ($util.Long) + (message.maxBytes = $util.Long.fromValue(object.maxBytes)).unsigned = false; + else if (typeof object.maxBytes === "string") + message.maxBytes = parseInt(object.maxBytes, 10); + else if (typeof object.maxBytes === "number") + message.maxBytes = object.maxBytes; + else if (typeof object.maxBytes === "object") + message.maxBytes = new $util.LongBits(object.maxBytes.low >>> 0, object.maxBytes.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from an EvidenceParams message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.types.EvidenceParams + * @static + * @param {tendermint.types.EvidenceParams} message EvidenceParams + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EvidenceParams.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.maxAgeNumBlocks = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.maxAgeNumBlocks = options.longs === String ? "0" : 0; + object.maxAgeDuration = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.maxBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.maxBytes = options.longs === String ? "0" : 0; + } + if (message.maxAgeNumBlocks != null && message.hasOwnProperty("maxAgeNumBlocks")) + if (typeof message.maxAgeNumBlocks === "number") + object.maxAgeNumBlocks = options.longs === String ? String(message.maxAgeNumBlocks) : message.maxAgeNumBlocks; + else + object.maxAgeNumBlocks = options.longs === String ? $util.Long.prototype.toString.call(message.maxAgeNumBlocks) : options.longs === Number ? new $util.LongBits(message.maxAgeNumBlocks.low >>> 0, message.maxAgeNumBlocks.high >>> 0).toNumber() : message.maxAgeNumBlocks; + if (message.maxAgeDuration != null && message.hasOwnProperty("maxAgeDuration")) + object.maxAgeDuration = $root.google.protobuf.Duration.toObject(message.maxAgeDuration, options); + if (message.maxBytes != null && message.hasOwnProperty("maxBytes")) + if (typeof message.maxBytes === "number") + object.maxBytes = options.longs === String ? String(message.maxBytes) : message.maxBytes; + else + object.maxBytes = options.longs === String ? $util.Long.prototype.toString.call(message.maxBytes) : options.longs === Number ? new $util.LongBits(message.maxBytes.low >>> 0, message.maxBytes.high >>> 0).toNumber() : message.maxBytes; + return object; + }; + + /** + * Converts this EvidenceParams to JSON. + * @function toJSON + * @memberof tendermint.types.EvidenceParams + * @instance + * @returns {Object.} JSON object + */ + EvidenceParams.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EvidenceParams; + })(types.EvidenceParams || {}); + + types.ValidatorParams = (function(ValidatorParams) { + + /** + * Properties of a ValidatorParams. + * @memberof tendermint.types + * @interface IValidatorParams + * @property {Array.|null} [pubKeyTypes] ValidatorParams pubKeyTypes + */ + + /** + * Constructs a new ValidatorParams. + * @memberof tendermint.types + * @classdesc Represents a ValidatorParams. + * @implements IValidatorParams + * @constructor + * @param {tendermint.types.IValidatorParams=} [properties] Properties to set + */ + function ValidatorParams(properties) { + this.pubKeyTypes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ValidatorParams pubKeyTypes. + * @member {Array.} pubKeyTypes + * @memberof tendermint.types.ValidatorParams + * @instance + */ + ValidatorParams.prototype.pubKeyTypes = $util.emptyArray; + + /** + * Creates a new ValidatorParams instance using the specified properties. + * @function create + * @memberof tendermint.types.ValidatorParams + * @static + * @param {tendermint.types.IValidatorParams=} [properties] Properties to set + * @returns {tendermint.types.ValidatorParams} ValidatorParams instance + */ + ValidatorParams.create = function create(properties) { + return new ValidatorParams(properties); + }; + + /** + * Encodes the specified ValidatorParams message. Does not implicitly {@link tendermint.types.ValidatorParams.verify|verify} messages. + * @function encode + * @memberof tendermint.types.ValidatorParams + * @static + * @param {tendermint.types.IValidatorParams} message ValidatorParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValidatorParams.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pubKeyTypes != null && message.pubKeyTypes.length) + for (var i = 0; i < message.pubKeyTypes.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.pubKeyTypes[i]); + return writer; + }; + + /** + * Encodes the specified ValidatorParams message, length delimited. Does not implicitly {@link tendermint.types.ValidatorParams.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.types.ValidatorParams + * @static + * @param {tendermint.types.IValidatorParams} message ValidatorParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValidatorParams.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ValidatorParams message from the specified reader or buffer. + * @function decode + * @memberof tendermint.types.ValidatorParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.types.ValidatorParams} ValidatorParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValidatorParams.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.ValidatorParams(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.pubKeyTypes && message.pubKeyTypes.length)) + message.pubKeyTypes = []; + message.pubKeyTypes.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ValidatorParams message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.types.ValidatorParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.types.ValidatorParams} ValidatorParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValidatorParams.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ValidatorParams message. + * @function verify + * @memberof tendermint.types.ValidatorParams + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ValidatorParams.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.pubKeyTypes != null && message.hasOwnProperty("pubKeyTypes")) { + if (!Array.isArray(message.pubKeyTypes)) + return "pubKeyTypes: array expected"; + for (var i = 0; i < message.pubKeyTypes.length; ++i) + if (!$util.isString(message.pubKeyTypes[i])) + return "pubKeyTypes: string[] expected"; + } + return null; + }; + + /** + * Creates a ValidatorParams message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.types.ValidatorParams + * @static + * @param {Object.} object Plain object + * @returns {tendermint.types.ValidatorParams} ValidatorParams + */ + ValidatorParams.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.types.ValidatorParams) + return object; + var message = new $root.tendermint.types.ValidatorParams(); + if (object.pubKeyTypes) { + if (!Array.isArray(object.pubKeyTypes)) + throw TypeError(".tendermint.types.ValidatorParams.pubKeyTypes: array expected"); + message.pubKeyTypes = []; + for (var i = 0; i < object.pubKeyTypes.length; ++i) + message.pubKeyTypes[i] = String(object.pubKeyTypes[i]); + } + return message; + }; + + /** + * Creates a plain object from a ValidatorParams message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.types.ValidatorParams + * @static + * @param {tendermint.types.ValidatorParams} message ValidatorParams + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ValidatorParams.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.pubKeyTypes = []; + if (message.pubKeyTypes && message.pubKeyTypes.length) { + object.pubKeyTypes = []; + for (var j = 0; j < message.pubKeyTypes.length; ++j) + object.pubKeyTypes[j] = message.pubKeyTypes[j]; + } + return object; + }; + + /** + * Converts this ValidatorParams to JSON. + * @function toJSON + * @memberof tendermint.types.ValidatorParams + * @instance + * @returns {Object.} JSON object + */ + ValidatorParams.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ValidatorParams; + })(types.ValidatorParams || {}); + + types.VersionParams = (function(VersionParams) { + + /** + * Properties of a VersionParams. + * @memberof tendermint.types + * @interface IVersionParams + * @property {number|Long|null} [appVersion] VersionParams appVersion + */ + + /** + * Constructs a new VersionParams. + * @memberof tendermint.types + * @classdesc Represents a VersionParams. + * @implements IVersionParams + * @constructor + * @param {tendermint.types.IVersionParams=} [properties] Properties to set + */ + function VersionParams(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * VersionParams appVersion. + * @member {number|Long} appVersion + * @memberof tendermint.types.VersionParams + * @instance + */ + VersionParams.prototype.appVersion = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new VersionParams instance using the specified properties. + * @function create + * @memberof tendermint.types.VersionParams + * @static + * @param {tendermint.types.IVersionParams=} [properties] Properties to set + * @returns {tendermint.types.VersionParams} VersionParams instance + */ + VersionParams.create = function create(properties) { + return new VersionParams(properties); + }; + + /** + * Encodes the specified VersionParams message. Does not implicitly {@link tendermint.types.VersionParams.verify|verify} messages. + * @function encode + * @memberof tendermint.types.VersionParams + * @static + * @param {tendermint.types.IVersionParams} message VersionParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VersionParams.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.appVersion != null && Object.hasOwnProperty.call(message, "appVersion")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.appVersion); + return writer; + }; + + /** + * Encodes the specified VersionParams message, length delimited. Does not implicitly {@link tendermint.types.VersionParams.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.types.VersionParams + * @static + * @param {tendermint.types.IVersionParams} message VersionParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VersionParams.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VersionParams message from the specified reader or buffer. + * @function decode + * @memberof tendermint.types.VersionParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.types.VersionParams} VersionParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VersionParams.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.VersionParams(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.appVersion = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VersionParams message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.types.VersionParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.types.VersionParams} VersionParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VersionParams.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VersionParams message. + * @function verify + * @memberof tendermint.types.VersionParams + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VersionParams.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.appVersion != null && message.hasOwnProperty("appVersion")) + if (!$util.isInteger(message.appVersion) && !(message.appVersion && $util.isInteger(message.appVersion.low) && $util.isInteger(message.appVersion.high))) + return "appVersion: integer|Long expected"; + return null; + }; + + /** + * Creates a VersionParams message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.types.VersionParams + * @static + * @param {Object.} object Plain object + * @returns {tendermint.types.VersionParams} VersionParams + */ + VersionParams.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.types.VersionParams) + return object; + var message = new $root.tendermint.types.VersionParams(); + if (object.appVersion != null) + if ($util.Long) + (message.appVersion = $util.Long.fromValue(object.appVersion)).unsigned = true; + else if (typeof object.appVersion === "string") + message.appVersion = parseInt(object.appVersion, 10); + else if (typeof object.appVersion === "number") + message.appVersion = object.appVersion; + else if (typeof object.appVersion === "object") + message.appVersion = new $util.LongBits(object.appVersion.low >>> 0, object.appVersion.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a VersionParams message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.types.VersionParams + * @static + * @param {tendermint.types.VersionParams} message VersionParams + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VersionParams.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.appVersion = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.appVersion = options.longs === String ? "0" : 0; + if (message.appVersion != null && message.hasOwnProperty("appVersion")) + if (typeof message.appVersion === "number") + object.appVersion = options.longs === String ? String(message.appVersion) : message.appVersion; + else + object.appVersion = options.longs === String ? $util.Long.prototype.toString.call(message.appVersion) : options.longs === Number ? new $util.LongBits(message.appVersion.low >>> 0, message.appVersion.high >>> 0).toNumber(true) : message.appVersion; + return object; + }; + + /** + * Converts this VersionParams to JSON. + * @function toJSON + * @memberof tendermint.types.VersionParams + * @instance + * @returns {Object.} JSON object + */ + VersionParams.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return VersionParams; + })(types.VersionParams || {}); + + types.HashedParams = (function(HashedParams) { + + /** + * Properties of a HashedParams. + * @memberof tendermint.types + * @interface IHashedParams + * @property {number|Long|null} [blockMaxBytes] HashedParams blockMaxBytes + * @property {number|Long|null} [blockMaxGas] HashedParams blockMaxGas + */ + + /** + * Constructs a new HashedParams. + * @memberof tendermint.types + * @classdesc Represents a HashedParams. + * @implements IHashedParams + * @constructor + * @param {tendermint.types.IHashedParams=} [properties] Properties to set + */ + function HashedParams(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HashedParams blockMaxBytes. + * @member {number|Long} blockMaxBytes + * @memberof tendermint.types.HashedParams + * @instance + */ + HashedParams.prototype.blockMaxBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * HashedParams blockMaxGas. + * @member {number|Long} blockMaxGas + * @memberof tendermint.types.HashedParams + * @instance + */ + HashedParams.prototype.blockMaxGas = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new HashedParams instance using the specified properties. + * @function create + * @memberof tendermint.types.HashedParams + * @static + * @param {tendermint.types.IHashedParams=} [properties] Properties to set + * @returns {tendermint.types.HashedParams} HashedParams instance + */ + HashedParams.create = function create(properties) { + return new HashedParams(properties); + }; + + /** + * Encodes the specified HashedParams message. Does not implicitly {@link tendermint.types.HashedParams.verify|verify} messages. + * @function encode + * @memberof tendermint.types.HashedParams + * @static + * @param {tendermint.types.IHashedParams} message HashedParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HashedParams.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.blockMaxBytes != null && Object.hasOwnProperty.call(message, "blockMaxBytes")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.blockMaxBytes); + if (message.blockMaxGas != null && Object.hasOwnProperty.call(message, "blockMaxGas")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.blockMaxGas); + return writer; + }; + + /** + * Encodes the specified HashedParams message, length delimited. Does not implicitly {@link tendermint.types.HashedParams.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.types.HashedParams + * @static + * @param {tendermint.types.IHashedParams} message HashedParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HashedParams.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HashedParams message from the specified reader or buffer. + * @function decode + * @memberof tendermint.types.HashedParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.types.HashedParams} HashedParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HashedParams.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.HashedParams(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.blockMaxBytes = reader.int64(); + break; + case 2: + message.blockMaxGas = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HashedParams message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.types.HashedParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.types.HashedParams} HashedParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HashedParams.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HashedParams message. + * @function verify + * @memberof tendermint.types.HashedParams + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HashedParams.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.blockMaxBytes != null && message.hasOwnProperty("blockMaxBytes")) + if (!$util.isInteger(message.blockMaxBytes) && !(message.blockMaxBytes && $util.isInteger(message.blockMaxBytes.low) && $util.isInteger(message.blockMaxBytes.high))) + return "blockMaxBytes: integer|Long expected"; + if (message.blockMaxGas != null && message.hasOwnProperty("blockMaxGas")) + if (!$util.isInteger(message.blockMaxGas) && !(message.blockMaxGas && $util.isInteger(message.blockMaxGas.low) && $util.isInteger(message.blockMaxGas.high))) + return "blockMaxGas: integer|Long expected"; + return null; + }; + + /** + * Creates a HashedParams message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.types.HashedParams + * @static + * @param {Object.} object Plain object + * @returns {tendermint.types.HashedParams} HashedParams + */ + HashedParams.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.types.HashedParams) + return object; + var message = new $root.tendermint.types.HashedParams(); + if (object.blockMaxBytes != null) + if ($util.Long) + (message.blockMaxBytes = $util.Long.fromValue(object.blockMaxBytes)).unsigned = false; + else if (typeof object.blockMaxBytes === "string") + message.blockMaxBytes = parseInt(object.blockMaxBytes, 10); + else if (typeof object.blockMaxBytes === "number") + message.blockMaxBytes = object.blockMaxBytes; + else if (typeof object.blockMaxBytes === "object") + message.blockMaxBytes = new $util.LongBits(object.blockMaxBytes.low >>> 0, object.blockMaxBytes.high >>> 0).toNumber(); + if (object.blockMaxGas != null) + if ($util.Long) + (message.blockMaxGas = $util.Long.fromValue(object.blockMaxGas)).unsigned = false; + else if (typeof object.blockMaxGas === "string") + message.blockMaxGas = parseInt(object.blockMaxGas, 10); + else if (typeof object.blockMaxGas === "number") + message.blockMaxGas = object.blockMaxGas; + else if (typeof object.blockMaxGas === "object") + message.blockMaxGas = new $util.LongBits(object.blockMaxGas.low >>> 0, object.blockMaxGas.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a HashedParams message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.types.HashedParams + * @static + * @param {tendermint.types.HashedParams} message HashedParams + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HashedParams.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.blockMaxBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.blockMaxBytes = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.blockMaxGas = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.blockMaxGas = options.longs === String ? "0" : 0; + } + if (message.blockMaxBytes != null && message.hasOwnProperty("blockMaxBytes")) + if (typeof message.blockMaxBytes === "number") + object.blockMaxBytes = options.longs === String ? String(message.blockMaxBytes) : message.blockMaxBytes; + else + object.blockMaxBytes = options.longs === String ? $util.Long.prototype.toString.call(message.blockMaxBytes) : options.longs === Number ? new $util.LongBits(message.blockMaxBytes.low >>> 0, message.blockMaxBytes.high >>> 0).toNumber() : message.blockMaxBytes; + if (message.blockMaxGas != null && message.hasOwnProperty("blockMaxGas")) + if (typeof message.blockMaxGas === "number") + object.blockMaxGas = options.longs === String ? String(message.blockMaxGas) : message.blockMaxGas; + else + object.blockMaxGas = options.longs === String ? $util.Long.prototype.toString.call(message.blockMaxGas) : options.longs === Number ? new $util.LongBits(message.blockMaxGas.low >>> 0, message.blockMaxGas.high >>> 0).toNumber() : message.blockMaxGas; + return object; + }; + + /** + * Converts this HashedParams to JSON. + * @function toJSON + * @memberof tendermint.types.HashedParams + * @instance + * @returns {Object.} JSON object + */ + HashedParams.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return HashedParams; + })(types.HashedParams || {}); + + /** + * BlockIDFlag enum. + * @name tendermint.types.BlockIDFlag + * @enum {string} + * @property {number} BLOCK_ID_FLAG_UNKNOWN=0 BLOCK_ID_FLAG_UNKNOWN value + * @property {number} BLOCK_ID_FLAG_ABSENT=1 BLOCK_ID_FLAG_ABSENT value + * @property {number} BLOCK_ID_FLAG_COMMIT=2 BLOCK_ID_FLAG_COMMIT value + * @property {number} BLOCK_ID_FLAG_NIL=3 BLOCK_ID_FLAG_NIL value + */ + types.BlockIDFlag = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "BLOCK_ID_FLAG_UNKNOWN"] = 0; + values[valuesById[1] = "BLOCK_ID_FLAG_ABSENT"] = 1; + values[valuesById[2] = "BLOCK_ID_FLAG_COMMIT"] = 2; + values[valuesById[3] = "BLOCK_ID_FLAG_NIL"] = 3; + return values; + })(); + + /** + * SignedMsgType enum. + * @name tendermint.types.SignedMsgType + * @enum {string} + * @property {number} SIGNED_MSG_TYPE_UNKNOWN=0 SIGNED_MSG_TYPE_UNKNOWN value + * @property {number} SIGNED_MSG_TYPE_PREVOTE=1 SIGNED_MSG_TYPE_PREVOTE value + * @property {number} SIGNED_MSG_TYPE_PRECOMMIT=2 SIGNED_MSG_TYPE_PRECOMMIT value + * @property {number} SIGNED_MSG_TYPE_PROPOSAL=32 SIGNED_MSG_TYPE_PROPOSAL value + */ + types.SignedMsgType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SIGNED_MSG_TYPE_UNKNOWN"] = 0; + values[valuesById[1] = "SIGNED_MSG_TYPE_PREVOTE"] = 1; + values[valuesById[2] = "SIGNED_MSG_TYPE_PRECOMMIT"] = 2; + values[valuesById[32] = "SIGNED_MSG_TYPE_PROPOSAL"] = 32; + return values; + })(); + + types.PartSetHeader = (function(PartSetHeader) { + + /** + * Properties of a PartSetHeader. + * @memberof tendermint.types + * @interface IPartSetHeader + * @property {number|null} [total] PartSetHeader total + * @property {Uint8Array|null} [hash] PartSetHeader hash + */ + + /** + * Constructs a new PartSetHeader. + * @memberof tendermint.types + * @classdesc Represents a PartSetHeader. + * @implements IPartSetHeader + * @constructor + * @param {tendermint.types.IPartSetHeader=} [properties] Properties to set + */ + function PartSetHeader(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PartSetHeader total. + * @member {number} total + * @memberof tendermint.types.PartSetHeader + * @instance + */ + PartSetHeader.prototype.total = 0; + + /** + * PartSetHeader hash. + * @member {Uint8Array} hash + * @memberof tendermint.types.PartSetHeader + * @instance + */ + PartSetHeader.prototype.hash = $util.newBuffer([]); + + /** + * Creates a new PartSetHeader instance using the specified properties. + * @function create + * @memberof tendermint.types.PartSetHeader + * @static + * @param {tendermint.types.IPartSetHeader=} [properties] Properties to set + * @returns {tendermint.types.PartSetHeader} PartSetHeader instance + */ + PartSetHeader.create = function create(properties) { + return new PartSetHeader(properties); + }; + + /** + * Encodes the specified PartSetHeader message. Does not implicitly {@link tendermint.types.PartSetHeader.verify|verify} messages. + * @function encode + * @memberof tendermint.types.PartSetHeader + * @static + * @param {tendermint.types.IPartSetHeader} message PartSetHeader message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PartSetHeader.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.total != null && Object.hasOwnProperty.call(message, "total")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.total); + if (message.hash != null && Object.hasOwnProperty.call(message, "hash")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.hash); + return writer; + }; + + /** + * Encodes the specified PartSetHeader message, length delimited. Does not implicitly {@link tendermint.types.PartSetHeader.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.types.PartSetHeader + * @static + * @param {tendermint.types.IPartSetHeader} message PartSetHeader message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PartSetHeader.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PartSetHeader message from the specified reader or buffer. + * @function decode + * @memberof tendermint.types.PartSetHeader + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.types.PartSetHeader} PartSetHeader + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PartSetHeader.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.PartSetHeader(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.total = reader.uint32(); + break; + case 2: + message.hash = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PartSetHeader message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.types.PartSetHeader + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.types.PartSetHeader} PartSetHeader + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PartSetHeader.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PartSetHeader message. + * @function verify + * @memberof tendermint.types.PartSetHeader + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PartSetHeader.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.total != null && message.hasOwnProperty("total")) + if (!$util.isInteger(message.total)) + return "total: integer expected"; + if (message.hash != null && message.hasOwnProperty("hash")) + if (!(message.hash && typeof message.hash.length === "number" || $util.isString(message.hash))) + return "hash: buffer expected"; + return null; + }; + + /** + * Creates a PartSetHeader message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.types.PartSetHeader + * @static + * @param {Object.} object Plain object + * @returns {tendermint.types.PartSetHeader} PartSetHeader + */ + PartSetHeader.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.types.PartSetHeader) + return object; + var message = new $root.tendermint.types.PartSetHeader(); + if (object.total != null) + message.total = object.total >>> 0; + if (object.hash != null) + if (typeof object.hash === "string") + $util.base64.decode(object.hash, message.hash = $util.newBuffer($util.base64.length(object.hash)), 0); + else if (object.hash.length) + message.hash = object.hash; + return message; + }; + + /** + * Creates a plain object from a PartSetHeader message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.types.PartSetHeader + * @static + * @param {tendermint.types.PartSetHeader} message PartSetHeader + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PartSetHeader.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.total = 0; + if (options.bytes === String) + object.hash = ""; + else { + object.hash = []; + if (options.bytes !== Array) + object.hash = $util.newBuffer(object.hash); + } + } + if (message.total != null && message.hasOwnProperty("total")) + object.total = message.total; + if (message.hash != null && message.hasOwnProperty("hash")) + object.hash = options.bytes === String ? $util.base64.encode(message.hash, 0, message.hash.length) : options.bytes === Array ? Array.prototype.slice.call(message.hash) : message.hash; + return object; + }; + + /** + * Converts this PartSetHeader to JSON. + * @function toJSON + * @memberof tendermint.types.PartSetHeader + * @instance + * @returns {Object.} JSON object + */ + PartSetHeader.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PartSetHeader; + })(types.PartSetHeader || {}); + + types.Part = (function(Part) { + + /** + * Properties of a Part. + * @memberof tendermint.types + * @interface IPart + * @property {number|null} [index] Part index + * @property {Uint8Array|null} [bytes] Part bytes + * @property {tendermint.crypto.IProof|null} [proof] Part proof + */ + + /** + * Constructs a new Part. + * @memberof tendermint.types + * @classdesc Represents a Part. + * @implements IPart + * @constructor + * @param {tendermint.types.IPart=} [properties] Properties to set + */ + function Part(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Part index. + * @member {number} index + * @memberof tendermint.types.Part + * @instance + */ + Part.prototype.index = 0; + + /** + * Part bytes. + * @member {Uint8Array} bytes + * @memberof tendermint.types.Part + * @instance + */ + Part.prototype.bytes = $util.newBuffer([]); + + /** + * Part proof. + * @member {tendermint.crypto.IProof|null|undefined} proof + * @memberof tendermint.types.Part + * @instance + */ + Part.prototype.proof = null; + + /** + * Creates a new Part instance using the specified properties. + * @function create + * @memberof tendermint.types.Part + * @static + * @param {tendermint.types.IPart=} [properties] Properties to set + * @returns {tendermint.types.Part} Part instance + */ + Part.create = function create(properties) { + return new Part(properties); + }; + + /** + * Encodes the specified Part message. Does not implicitly {@link tendermint.types.Part.verify|verify} messages. + * @function encode + * @memberof tendermint.types.Part + * @static + * @param {tendermint.types.IPart} message Part message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Part.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.index != null && Object.hasOwnProperty.call(message, "index")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.index); + if (message.bytes != null && Object.hasOwnProperty.call(message, "bytes")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.bytes); + if (message.proof != null && Object.hasOwnProperty.call(message, "proof")) + $root.tendermint.crypto.Proof.encode(message.proof, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Part message, length delimited. Does not implicitly {@link tendermint.types.Part.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.types.Part + * @static + * @param {tendermint.types.IPart} message Part message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Part.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Part message from the specified reader or buffer. + * @function decode + * @memberof tendermint.types.Part + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.types.Part} Part + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Part.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.Part(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.index = reader.uint32(); + break; + case 2: + message.bytes = reader.bytes(); + break; + case 3: + message.proof = $root.tendermint.crypto.Proof.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Part message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.types.Part + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.types.Part} Part + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Part.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Part message. + * @function verify + * @memberof tendermint.types.Part + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Part.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.index != null && message.hasOwnProperty("index")) + if (!$util.isInteger(message.index)) + return "index: integer expected"; + if (message.bytes != null && message.hasOwnProperty("bytes")) + if (!(message.bytes && typeof message.bytes.length === "number" || $util.isString(message.bytes))) + return "bytes: buffer expected"; + if (message.proof != null && message.hasOwnProperty("proof")) { + var error = $root.tendermint.crypto.Proof.verify(message.proof); + if (error) + return "proof." + error; + } + return null; + }; + + /** + * Creates a Part message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.types.Part + * @static + * @param {Object.} object Plain object + * @returns {tendermint.types.Part} Part + */ + Part.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.types.Part) + return object; + var message = new $root.tendermint.types.Part(); + if (object.index != null) + message.index = object.index >>> 0; + if (object.bytes != null) + if (typeof object.bytes === "string") + $util.base64.decode(object.bytes, message.bytes = $util.newBuffer($util.base64.length(object.bytes)), 0); + else if (object.bytes.length) + message.bytes = object.bytes; + if (object.proof != null) { + if (typeof object.proof !== "object") + throw TypeError(".tendermint.types.Part.proof: object expected"); + message.proof = $root.tendermint.crypto.Proof.fromObject(object.proof); + } + return message; + }; + + /** + * Creates a plain object from a Part message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.types.Part + * @static + * @param {tendermint.types.Part} message Part + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Part.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.index = 0; + if (options.bytes === String) + object.bytes = ""; + else { + object.bytes = []; + if (options.bytes !== Array) + object.bytes = $util.newBuffer(object.bytes); + } + object.proof = null; + } + if (message.index != null && message.hasOwnProperty("index")) + object.index = message.index; + if (message.bytes != null && message.hasOwnProperty("bytes")) + object.bytes = options.bytes === String ? $util.base64.encode(message.bytes, 0, message.bytes.length) : options.bytes === Array ? Array.prototype.slice.call(message.bytes) : message.bytes; + if (message.proof != null && message.hasOwnProperty("proof")) + object.proof = $root.tendermint.crypto.Proof.toObject(message.proof, options); + return object; + }; + + /** + * Converts this Part to JSON. + * @function toJSON + * @memberof tendermint.types.Part + * @instance + * @returns {Object.} JSON object + */ + Part.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Part; + })(types.Part || {}); + + types.BlockID = (function(BlockID) { + + /** + * Properties of a BlockID. + * @memberof tendermint.types + * @interface IBlockID + * @property {Uint8Array|null} [hash] BlockID hash + * @property {tendermint.types.IPartSetHeader|null} [partSetHeader] BlockID partSetHeader + */ + + /** + * Constructs a new BlockID. + * @memberof tendermint.types + * @classdesc Represents a BlockID. + * @implements IBlockID + * @constructor + * @param {tendermint.types.IBlockID=} [properties] Properties to set + */ + function BlockID(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BlockID hash. + * @member {Uint8Array} hash + * @memberof tendermint.types.BlockID + * @instance + */ + BlockID.prototype.hash = $util.newBuffer([]); + + /** + * BlockID partSetHeader. + * @member {tendermint.types.IPartSetHeader|null|undefined} partSetHeader + * @memberof tendermint.types.BlockID + * @instance + */ + BlockID.prototype.partSetHeader = null; + + /** + * Creates a new BlockID instance using the specified properties. + * @function create + * @memberof tendermint.types.BlockID + * @static + * @param {tendermint.types.IBlockID=} [properties] Properties to set + * @returns {tendermint.types.BlockID} BlockID instance + */ + BlockID.create = function create(properties) { + return new BlockID(properties); + }; + + /** + * Encodes the specified BlockID message. Does not implicitly {@link tendermint.types.BlockID.verify|verify} messages. + * @function encode + * @memberof tendermint.types.BlockID + * @static + * @param {tendermint.types.IBlockID} message BlockID message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BlockID.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.hash != null && Object.hasOwnProperty.call(message, "hash")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.hash); + if (message.partSetHeader != null && Object.hasOwnProperty.call(message, "partSetHeader")) + $root.tendermint.types.PartSetHeader.encode(message.partSetHeader, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BlockID message, length delimited. Does not implicitly {@link tendermint.types.BlockID.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.types.BlockID + * @static + * @param {tendermint.types.IBlockID} message BlockID message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BlockID.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BlockID message from the specified reader or buffer. + * @function decode + * @memberof tendermint.types.BlockID + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.types.BlockID} BlockID + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BlockID.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.BlockID(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.hash = reader.bytes(); + break; + case 2: + message.partSetHeader = $root.tendermint.types.PartSetHeader.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BlockID message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.types.BlockID + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.types.BlockID} BlockID + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BlockID.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BlockID message. + * @function verify + * @memberof tendermint.types.BlockID + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BlockID.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.hash != null && message.hasOwnProperty("hash")) + if (!(message.hash && typeof message.hash.length === "number" || $util.isString(message.hash))) + return "hash: buffer expected"; + if (message.partSetHeader != null && message.hasOwnProperty("partSetHeader")) { + var error = $root.tendermint.types.PartSetHeader.verify(message.partSetHeader); + if (error) + return "partSetHeader." + error; + } + return null; + }; + + /** + * Creates a BlockID message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.types.BlockID + * @static + * @param {Object.} object Plain object + * @returns {tendermint.types.BlockID} BlockID + */ + BlockID.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.types.BlockID) + return object; + var message = new $root.tendermint.types.BlockID(); + if (object.hash != null) + if (typeof object.hash === "string") + $util.base64.decode(object.hash, message.hash = $util.newBuffer($util.base64.length(object.hash)), 0); + else if (object.hash.length) + message.hash = object.hash; + if (object.partSetHeader != null) { + if (typeof object.partSetHeader !== "object") + throw TypeError(".tendermint.types.BlockID.partSetHeader: object expected"); + message.partSetHeader = $root.tendermint.types.PartSetHeader.fromObject(object.partSetHeader); + } + return message; + }; + + /** + * Creates a plain object from a BlockID message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.types.BlockID + * @static + * @param {tendermint.types.BlockID} message BlockID + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BlockID.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.hash = ""; + else { + object.hash = []; + if (options.bytes !== Array) + object.hash = $util.newBuffer(object.hash); + } + object.partSetHeader = null; + } + if (message.hash != null && message.hasOwnProperty("hash")) + object.hash = options.bytes === String ? $util.base64.encode(message.hash, 0, message.hash.length) : options.bytes === Array ? Array.prototype.slice.call(message.hash) : message.hash; + if (message.partSetHeader != null && message.hasOwnProperty("partSetHeader")) + object.partSetHeader = $root.tendermint.types.PartSetHeader.toObject(message.partSetHeader, options); + return object; + }; + + /** + * Converts this BlockID to JSON. + * @function toJSON + * @memberof tendermint.types.BlockID + * @instance + * @returns {Object.} JSON object + */ + BlockID.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return BlockID; + })(types.BlockID || {}); + + types.Header = (function(Header) { + + /** + * Properties of a Header. + * @memberof tendermint.types + * @interface IHeader + * @property {tendermint.version.IConsensus|null} [version] Header version + * @property {string|null} [chainId] Header chainId + * @property {number|Long|null} [height] Header height + * @property {google.protobuf.ITimestamp|null} [time] Header time + * @property {tendermint.types.IBlockID|null} [lastBlockId] Header lastBlockId + * @property {Uint8Array|null} [lastCommitHash] Header lastCommitHash + * @property {Uint8Array|null} [dataHash] Header dataHash + * @property {Uint8Array|null} [validatorsHash] Header validatorsHash + * @property {Uint8Array|null} [nextValidatorsHash] Header nextValidatorsHash + * @property {Uint8Array|null} [consensusHash] Header consensusHash + * @property {Uint8Array|null} [appHash] Header appHash + * @property {Uint8Array|null} [lastResultsHash] Header lastResultsHash + * @property {Uint8Array|null} [evidenceHash] Header evidenceHash + * @property {Uint8Array|null} [proposerAddress] Header proposerAddress + */ + + /** + * Constructs a new Header. + * @memberof tendermint.types + * @classdesc Represents a Header. + * @implements IHeader + * @constructor + * @param {tendermint.types.IHeader=} [properties] Properties to set + */ + function Header(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Header version. + * @member {tendermint.version.IConsensus|null|undefined} version + * @memberof tendermint.types.Header + * @instance + */ + Header.prototype.version = null; + + /** + * Header chainId. + * @member {string} chainId + * @memberof tendermint.types.Header + * @instance + */ + Header.prototype.chainId = ""; + + /** + * Header height. + * @member {number|Long} height + * @memberof tendermint.types.Header + * @instance + */ + Header.prototype.height = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Header time. + * @member {google.protobuf.ITimestamp|null|undefined} time + * @memberof tendermint.types.Header + * @instance + */ + Header.prototype.time = null; + + /** + * Header lastBlockId. + * @member {tendermint.types.IBlockID|null|undefined} lastBlockId + * @memberof tendermint.types.Header + * @instance + */ + Header.prototype.lastBlockId = null; + + /** + * Header lastCommitHash. + * @member {Uint8Array} lastCommitHash + * @memberof tendermint.types.Header + * @instance + */ + Header.prototype.lastCommitHash = $util.newBuffer([]); + + /** + * Header dataHash. + * @member {Uint8Array} dataHash + * @memberof tendermint.types.Header + * @instance + */ + Header.prototype.dataHash = $util.newBuffer([]); + + /** + * Header validatorsHash. + * @member {Uint8Array} validatorsHash + * @memberof tendermint.types.Header + * @instance + */ + Header.prototype.validatorsHash = $util.newBuffer([]); + + /** + * Header nextValidatorsHash. + * @member {Uint8Array} nextValidatorsHash + * @memberof tendermint.types.Header + * @instance + */ + Header.prototype.nextValidatorsHash = $util.newBuffer([]); + + /** + * Header consensusHash. + * @member {Uint8Array} consensusHash + * @memberof tendermint.types.Header + * @instance + */ + Header.prototype.consensusHash = $util.newBuffer([]); + + /** + * Header appHash. + * @member {Uint8Array} appHash + * @memberof tendermint.types.Header + * @instance + */ + Header.prototype.appHash = $util.newBuffer([]); + + /** + * Header lastResultsHash. + * @member {Uint8Array} lastResultsHash + * @memberof tendermint.types.Header + * @instance + */ + Header.prototype.lastResultsHash = $util.newBuffer([]); + + /** + * Header evidenceHash. + * @member {Uint8Array} evidenceHash + * @memberof tendermint.types.Header + * @instance + */ + Header.prototype.evidenceHash = $util.newBuffer([]); + + /** + * Header proposerAddress. + * @member {Uint8Array} proposerAddress + * @memberof tendermint.types.Header + * @instance + */ + Header.prototype.proposerAddress = $util.newBuffer([]); + + /** + * Creates a new Header instance using the specified properties. + * @function create + * @memberof tendermint.types.Header + * @static + * @param {tendermint.types.IHeader=} [properties] Properties to set + * @returns {tendermint.types.Header} Header instance + */ + Header.create = function create(properties) { + return new Header(properties); + }; + + /** + * Encodes the specified Header message. Does not implicitly {@link tendermint.types.Header.verify|verify} messages. + * @function encode + * @memberof tendermint.types.Header + * @static + * @param {tendermint.types.IHeader} message Header message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Header.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + $root.tendermint.version.Consensus.encode(message.version, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.chainId != null && Object.hasOwnProperty.call(message, "chainId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.chainId); + if (message.height != null && Object.hasOwnProperty.call(message, "height")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.height); + if (message.time != null && Object.hasOwnProperty.call(message, "time")) + $root.google.protobuf.Timestamp.encode(message.time, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.lastBlockId != null && Object.hasOwnProperty.call(message, "lastBlockId")) + $root.tendermint.types.BlockID.encode(message.lastBlockId, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.lastCommitHash != null && Object.hasOwnProperty.call(message, "lastCommitHash")) + writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.lastCommitHash); + if (message.dataHash != null && Object.hasOwnProperty.call(message, "dataHash")) + writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.dataHash); + if (message.validatorsHash != null && Object.hasOwnProperty.call(message, "validatorsHash")) + writer.uint32(/* id 8, wireType 2 =*/66).bytes(message.validatorsHash); + if (message.nextValidatorsHash != null && Object.hasOwnProperty.call(message, "nextValidatorsHash")) + writer.uint32(/* id 9, wireType 2 =*/74).bytes(message.nextValidatorsHash); + if (message.consensusHash != null && Object.hasOwnProperty.call(message, "consensusHash")) + writer.uint32(/* id 10, wireType 2 =*/82).bytes(message.consensusHash); + if (message.appHash != null && Object.hasOwnProperty.call(message, "appHash")) + writer.uint32(/* id 11, wireType 2 =*/90).bytes(message.appHash); + if (message.lastResultsHash != null && Object.hasOwnProperty.call(message, "lastResultsHash")) + writer.uint32(/* id 12, wireType 2 =*/98).bytes(message.lastResultsHash); + if (message.evidenceHash != null && Object.hasOwnProperty.call(message, "evidenceHash")) + writer.uint32(/* id 13, wireType 2 =*/106).bytes(message.evidenceHash); + if (message.proposerAddress != null && Object.hasOwnProperty.call(message, "proposerAddress")) + writer.uint32(/* id 14, wireType 2 =*/114).bytes(message.proposerAddress); + return writer; + }; + + /** + * Encodes the specified Header message, length delimited. Does not implicitly {@link tendermint.types.Header.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.types.Header + * @static + * @param {tendermint.types.IHeader} message Header message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Header.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Header message from the specified reader or buffer. + * @function decode + * @memberof tendermint.types.Header + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.types.Header} Header + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Header.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.Header(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.version = $root.tendermint.version.Consensus.decode(reader, reader.uint32()); + break; + case 2: + message.chainId = reader.string(); + break; + case 3: + message.height = reader.int64(); + break; + case 4: + message.time = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 5: + message.lastBlockId = $root.tendermint.types.BlockID.decode(reader, reader.uint32()); + break; + case 6: + message.lastCommitHash = reader.bytes(); + break; + case 7: + message.dataHash = reader.bytes(); + break; + case 8: + message.validatorsHash = reader.bytes(); + break; + case 9: + message.nextValidatorsHash = reader.bytes(); + break; + case 10: + message.consensusHash = reader.bytes(); + break; + case 11: + message.appHash = reader.bytes(); + break; + case 12: + message.lastResultsHash = reader.bytes(); + break; + case 13: + message.evidenceHash = reader.bytes(); + break; + case 14: + message.proposerAddress = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Header message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.types.Header + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.types.Header} Header + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Header.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Header message. + * @function verify + * @memberof tendermint.types.Header + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Header.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.version != null && message.hasOwnProperty("version")) { + var error = $root.tendermint.version.Consensus.verify(message.version); + if (error) + return "version." + error; + } + if (message.chainId != null && message.hasOwnProperty("chainId")) + if (!$util.isString(message.chainId)) + return "chainId: string expected"; + if (message.height != null && message.hasOwnProperty("height")) + if (!$util.isInteger(message.height) && !(message.height && $util.isInteger(message.height.low) && $util.isInteger(message.height.high))) + return "height: integer|Long expected"; + if (message.time != null && message.hasOwnProperty("time")) { + var error = $root.google.protobuf.Timestamp.verify(message.time); + if (error) + return "time." + error; + } + if (message.lastBlockId != null && message.hasOwnProperty("lastBlockId")) { + var error = $root.tendermint.types.BlockID.verify(message.lastBlockId); + if (error) + return "lastBlockId." + error; + } + if (message.lastCommitHash != null && message.hasOwnProperty("lastCommitHash")) + if (!(message.lastCommitHash && typeof message.lastCommitHash.length === "number" || $util.isString(message.lastCommitHash))) + return "lastCommitHash: buffer expected"; + if (message.dataHash != null && message.hasOwnProperty("dataHash")) + if (!(message.dataHash && typeof message.dataHash.length === "number" || $util.isString(message.dataHash))) + return "dataHash: buffer expected"; + if (message.validatorsHash != null && message.hasOwnProperty("validatorsHash")) + if (!(message.validatorsHash && typeof message.validatorsHash.length === "number" || $util.isString(message.validatorsHash))) + return "validatorsHash: buffer expected"; + if (message.nextValidatorsHash != null && message.hasOwnProperty("nextValidatorsHash")) + if (!(message.nextValidatorsHash && typeof message.nextValidatorsHash.length === "number" || $util.isString(message.nextValidatorsHash))) + return "nextValidatorsHash: buffer expected"; + if (message.consensusHash != null && message.hasOwnProperty("consensusHash")) + if (!(message.consensusHash && typeof message.consensusHash.length === "number" || $util.isString(message.consensusHash))) + return "consensusHash: buffer expected"; + if (message.appHash != null && message.hasOwnProperty("appHash")) + if (!(message.appHash && typeof message.appHash.length === "number" || $util.isString(message.appHash))) + return "appHash: buffer expected"; + if (message.lastResultsHash != null && message.hasOwnProperty("lastResultsHash")) + if (!(message.lastResultsHash && typeof message.lastResultsHash.length === "number" || $util.isString(message.lastResultsHash))) + return "lastResultsHash: buffer expected"; + if (message.evidenceHash != null && message.hasOwnProperty("evidenceHash")) + if (!(message.evidenceHash && typeof message.evidenceHash.length === "number" || $util.isString(message.evidenceHash))) + return "evidenceHash: buffer expected"; + if (message.proposerAddress != null && message.hasOwnProperty("proposerAddress")) + if (!(message.proposerAddress && typeof message.proposerAddress.length === "number" || $util.isString(message.proposerAddress))) + return "proposerAddress: buffer expected"; + return null; + }; + + /** + * Creates a Header message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.types.Header + * @static + * @param {Object.} object Plain object + * @returns {tendermint.types.Header} Header + */ + Header.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.types.Header) + return object; + var message = new $root.tendermint.types.Header(); + if (object.version != null) { + if (typeof object.version !== "object") + throw TypeError(".tendermint.types.Header.version: object expected"); + message.version = $root.tendermint.version.Consensus.fromObject(object.version); + } + if (object.chainId != null) + message.chainId = String(object.chainId); + if (object.height != null) + if ($util.Long) + (message.height = $util.Long.fromValue(object.height)).unsigned = false; + else if (typeof object.height === "string") + message.height = parseInt(object.height, 10); + else if (typeof object.height === "number") + message.height = object.height; + else if (typeof object.height === "object") + message.height = new $util.LongBits(object.height.low >>> 0, object.height.high >>> 0).toNumber(); + if (object.time != null) { + if (typeof object.time !== "object") + throw TypeError(".tendermint.types.Header.time: object expected"); + message.time = $root.google.protobuf.Timestamp.fromObject(object.time); + } + if (object.lastBlockId != null) { + if (typeof object.lastBlockId !== "object") + throw TypeError(".tendermint.types.Header.lastBlockId: object expected"); + message.lastBlockId = $root.tendermint.types.BlockID.fromObject(object.lastBlockId); + } + if (object.lastCommitHash != null) + if (typeof object.lastCommitHash === "string") + $util.base64.decode(object.lastCommitHash, message.lastCommitHash = $util.newBuffer($util.base64.length(object.lastCommitHash)), 0); + else if (object.lastCommitHash.length) + message.lastCommitHash = object.lastCommitHash; + if (object.dataHash != null) + if (typeof object.dataHash === "string") + $util.base64.decode(object.dataHash, message.dataHash = $util.newBuffer($util.base64.length(object.dataHash)), 0); + else if (object.dataHash.length) + message.dataHash = object.dataHash; + if (object.validatorsHash != null) + if (typeof object.validatorsHash === "string") + $util.base64.decode(object.validatorsHash, message.validatorsHash = $util.newBuffer($util.base64.length(object.validatorsHash)), 0); + else if (object.validatorsHash.length) + message.validatorsHash = object.validatorsHash; + if (object.nextValidatorsHash != null) + if (typeof object.nextValidatorsHash === "string") + $util.base64.decode(object.nextValidatorsHash, message.nextValidatorsHash = $util.newBuffer($util.base64.length(object.nextValidatorsHash)), 0); + else if (object.nextValidatorsHash.length) + message.nextValidatorsHash = object.nextValidatorsHash; + if (object.consensusHash != null) + if (typeof object.consensusHash === "string") + $util.base64.decode(object.consensusHash, message.consensusHash = $util.newBuffer($util.base64.length(object.consensusHash)), 0); + else if (object.consensusHash.length) + message.consensusHash = object.consensusHash; + if (object.appHash != null) + if (typeof object.appHash === "string") + $util.base64.decode(object.appHash, message.appHash = $util.newBuffer($util.base64.length(object.appHash)), 0); + else if (object.appHash.length) + message.appHash = object.appHash; + if (object.lastResultsHash != null) + if (typeof object.lastResultsHash === "string") + $util.base64.decode(object.lastResultsHash, message.lastResultsHash = $util.newBuffer($util.base64.length(object.lastResultsHash)), 0); + else if (object.lastResultsHash.length) + message.lastResultsHash = object.lastResultsHash; + if (object.evidenceHash != null) + if (typeof object.evidenceHash === "string") + $util.base64.decode(object.evidenceHash, message.evidenceHash = $util.newBuffer($util.base64.length(object.evidenceHash)), 0); + else if (object.evidenceHash.length) + message.evidenceHash = object.evidenceHash; + if (object.proposerAddress != null) + if (typeof object.proposerAddress === "string") + $util.base64.decode(object.proposerAddress, message.proposerAddress = $util.newBuffer($util.base64.length(object.proposerAddress)), 0); + else if (object.proposerAddress.length) + message.proposerAddress = object.proposerAddress; + return message; + }; + + /** + * Creates a plain object from a Header message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.types.Header + * @static + * @param {tendermint.types.Header} message Header + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Header.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.version = null; + object.chainId = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.height = options.longs === String ? "0" : 0; + object.time = null; + object.lastBlockId = null; + if (options.bytes === String) + object.lastCommitHash = ""; + else { + object.lastCommitHash = []; + if (options.bytes !== Array) + object.lastCommitHash = $util.newBuffer(object.lastCommitHash); + } + if (options.bytes === String) + object.dataHash = ""; + else { + object.dataHash = []; + if (options.bytes !== Array) + object.dataHash = $util.newBuffer(object.dataHash); + } + if (options.bytes === String) + object.validatorsHash = ""; + else { + object.validatorsHash = []; + if (options.bytes !== Array) + object.validatorsHash = $util.newBuffer(object.validatorsHash); + } + if (options.bytes === String) + object.nextValidatorsHash = ""; + else { + object.nextValidatorsHash = []; + if (options.bytes !== Array) + object.nextValidatorsHash = $util.newBuffer(object.nextValidatorsHash); + } + if (options.bytes === String) + object.consensusHash = ""; + else { + object.consensusHash = []; + if (options.bytes !== Array) + object.consensusHash = $util.newBuffer(object.consensusHash); + } + if (options.bytes === String) + object.appHash = ""; + else { + object.appHash = []; + if (options.bytes !== Array) + object.appHash = $util.newBuffer(object.appHash); + } + if (options.bytes === String) + object.lastResultsHash = ""; + else { + object.lastResultsHash = []; + if (options.bytes !== Array) + object.lastResultsHash = $util.newBuffer(object.lastResultsHash); + } + if (options.bytes === String) + object.evidenceHash = ""; + else { + object.evidenceHash = []; + if (options.bytes !== Array) + object.evidenceHash = $util.newBuffer(object.evidenceHash); + } + if (options.bytes === String) + object.proposerAddress = ""; + else { + object.proposerAddress = []; + if (options.bytes !== Array) + object.proposerAddress = $util.newBuffer(object.proposerAddress); + } + } + if (message.version != null && message.hasOwnProperty("version")) + object.version = $root.tendermint.version.Consensus.toObject(message.version, options); + if (message.chainId != null && message.hasOwnProperty("chainId")) + object.chainId = message.chainId; + if (message.height != null && message.hasOwnProperty("height")) + if (typeof message.height === "number") + object.height = options.longs === String ? String(message.height) : message.height; + else + object.height = options.longs === String ? $util.Long.prototype.toString.call(message.height) : options.longs === Number ? new $util.LongBits(message.height.low >>> 0, message.height.high >>> 0).toNumber() : message.height; + if (message.time != null && message.hasOwnProperty("time")) + object.time = $root.google.protobuf.Timestamp.toObject(message.time, options); + if (message.lastBlockId != null && message.hasOwnProperty("lastBlockId")) + object.lastBlockId = $root.tendermint.types.BlockID.toObject(message.lastBlockId, options); + if (message.lastCommitHash != null && message.hasOwnProperty("lastCommitHash")) + object.lastCommitHash = options.bytes === String ? $util.base64.encode(message.lastCommitHash, 0, message.lastCommitHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.lastCommitHash) : message.lastCommitHash; + if (message.dataHash != null && message.hasOwnProperty("dataHash")) + object.dataHash = options.bytes === String ? $util.base64.encode(message.dataHash, 0, message.dataHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.dataHash) : message.dataHash; + if (message.validatorsHash != null && message.hasOwnProperty("validatorsHash")) + object.validatorsHash = options.bytes === String ? $util.base64.encode(message.validatorsHash, 0, message.validatorsHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.validatorsHash) : message.validatorsHash; + if (message.nextValidatorsHash != null && message.hasOwnProperty("nextValidatorsHash")) + object.nextValidatorsHash = options.bytes === String ? $util.base64.encode(message.nextValidatorsHash, 0, message.nextValidatorsHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.nextValidatorsHash) : message.nextValidatorsHash; + if (message.consensusHash != null && message.hasOwnProperty("consensusHash")) + object.consensusHash = options.bytes === String ? $util.base64.encode(message.consensusHash, 0, message.consensusHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.consensusHash) : message.consensusHash; + if (message.appHash != null && message.hasOwnProperty("appHash")) + object.appHash = options.bytes === String ? $util.base64.encode(message.appHash, 0, message.appHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.appHash) : message.appHash; + if (message.lastResultsHash != null && message.hasOwnProperty("lastResultsHash")) + object.lastResultsHash = options.bytes === String ? $util.base64.encode(message.lastResultsHash, 0, message.lastResultsHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.lastResultsHash) : message.lastResultsHash; + if (message.evidenceHash != null && message.hasOwnProperty("evidenceHash")) + object.evidenceHash = options.bytes === String ? $util.base64.encode(message.evidenceHash, 0, message.evidenceHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.evidenceHash) : message.evidenceHash; + if (message.proposerAddress != null && message.hasOwnProperty("proposerAddress")) + object.proposerAddress = options.bytes === String ? $util.base64.encode(message.proposerAddress, 0, message.proposerAddress.length) : options.bytes === Array ? Array.prototype.slice.call(message.proposerAddress) : message.proposerAddress; + return object; + }; + + /** + * Converts this Header to JSON. + * @function toJSON + * @memberof tendermint.types.Header + * @instance + * @returns {Object.} JSON object + */ + Header.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Header; + })(types.Header || {}); + + types.Data = (function(Data) { + + /** + * Properties of a Data. + * @memberof tendermint.types + * @interface IData + * @property {Array.|null} [txs] Data txs + */ + + /** + * Constructs a new Data. + * @memberof tendermint.types + * @classdesc Represents a Data. + * @implements IData + * @constructor + * @param {tendermint.types.IData=} [properties] Properties to set + */ + function Data(properties) { + this.txs = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Data txs. + * @member {Array.} txs + * @memberof tendermint.types.Data + * @instance + */ + Data.prototype.txs = $util.emptyArray; + + /** + * Creates a new Data instance using the specified properties. + * @function create + * @memberof tendermint.types.Data + * @static + * @param {tendermint.types.IData=} [properties] Properties to set + * @returns {tendermint.types.Data} Data instance + */ + Data.create = function create(properties) { + return new Data(properties); + }; + + /** + * Encodes the specified Data message. Does not implicitly {@link tendermint.types.Data.verify|verify} messages. + * @function encode + * @memberof tendermint.types.Data + * @static + * @param {tendermint.types.IData} message Data message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Data.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.txs != null && message.txs.length) + for (var i = 0; i < message.txs.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.txs[i]); + return writer; + }; + + /** + * Encodes the specified Data message, length delimited. Does not implicitly {@link tendermint.types.Data.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.types.Data + * @static + * @param {tendermint.types.IData} message Data message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Data.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Data message from the specified reader or buffer. + * @function decode + * @memberof tendermint.types.Data + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.types.Data} Data + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Data.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.Data(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.txs && message.txs.length)) + message.txs = []; + message.txs.push(reader.bytes()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Data message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.types.Data + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.types.Data} Data + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Data.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Data message. + * @function verify + * @memberof tendermint.types.Data + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Data.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.txs != null && message.hasOwnProperty("txs")) { + if (!Array.isArray(message.txs)) + return "txs: array expected"; + for (var i = 0; i < message.txs.length; ++i) + if (!(message.txs[i] && typeof message.txs[i].length === "number" || $util.isString(message.txs[i]))) + return "txs: buffer[] expected"; + } + return null; + }; + + /** + * Creates a Data message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.types.Data + * @static + * @param {Object.} object Plain object + * @returns {tendermint.types.Data} Data + */ + Data.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.types.Data) + return object; + var message = new $root.tendermint.types.Data(); + if (object.txs) { + if (!Array.isArray(object.txs)) + throw TypeError(".tendermint.types.Data.txs: array expected"); + message.txs = []; + for (var i = 0; i < object.txs.length; ++i) + if (typeof object.txs[i] === "string") + $util.base64.decode(object.txs[i], message.txs[i] = $util.newBuffer($util.base64.length(object.txs[i])), 0); + else if (object.txs[i].length) + message.txs[i] = object.txs[i]; + } + return message; + }; + + /** + * Creates a plain object from a Data message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.types.Data + * @static + * @param {tendermint.types.Data} message Data + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Data.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.txs = []; + if (message.txs && message.txs.length) { + object.txs = []; + for (var j = 0; j < message.txs.length; ++j) + object.txs[j] = options.bytes === String ? $util.base64.encode(message.txs[j], 0, message.txs[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.txs[j]) : message.txs[j]; + } + return object; + }; + + /** + * Converts this Data to JSON. + * @function toJSON + * @memberof tendermint.types.Data + * @instance + * @returns {Object.} JSON object + */ + Data.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Data; + })(types.Data || {}); + + types.Vote = (function(Vote) { + + /** + * Properties of a Vote. + * @memberof tendermint.types + * @interface IVote + * @property {tendermint.types.SignedMsgType|null} [type] Vote type + * @property {number|Long|null} [height] Vote height + * @property {number|null} [round] Vote round + * @property {tendermint.types.IBlockID|null} [blockId] Vote blockId + * @property {google.protobuf.ITimestamp|null} [timestamp] Vote timestamp + * @property {Uint8Array|null} [validatorAddress] Vote validatorAddress + * @property {number|null} [validatorIndex] Vote validatorIndex + * @property {Uint8Array|null} [signature] Vote signature + */ + + /** + * Constructs a new Vote. + * @memberof tendermint.types + * @classdesc Represents a Vote. + * @implements IVote + * @constructor + * @param {tendermint.types.IVote=} [properties] Properties to set + */ + function Vote(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Vote type. + * @member {tendermint.types.SignedMsgType} type + * @memberof tendermint.types.Vote + * @instance + */ + Vote.prototype.type = 0; + + /** + * Vote height. + * @member {number|Long} height + * @memberof tendermint.types.Vote + * @instance + */ + Vote.prototype.height = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Vote round. + * @member {number} round + * @memberof tendermint.types.Vote + * @instance + */ + Vote.prototype.round = 0; + + /** + * Vote blockId. + * @member {tendermint.types.IBlockID|null|undefined} blockId + * @memberof tendermint.types.Vote + * @instance + */ + Vote.prototype.blockId = null; + + /** + * Vote timestamp. + * @member {google.protobuf.ITimestamp|null|undefined} timestamp + * @memberof tendermint.types.Vote + * @instance + */ + Vote.prototype.timestamp = null; + + /** + * Vote validatorAddress. + * @member {Uint8Array} validatorAddress + * @memberof tendermint.types.Vote + * @instance + */ + Vote.prototype.validatorAddress = $util.newBuffer([]); + + /** + * Vote validatorIndex. + * @member {number} validatorIndex + * @memberof tendermint.types.Vote + * @instance + */ + Vote.prototype.validatorIndex = 0; + + /** + * Vote signature. + * @member {Uint8Array} signature + * @memberof tendermint.types.Vote + * @instance + */ + Vote.prototype.signature = $util.newBuffer([]); + + /** + * Creates a new Vote instance using the specified properties. + * @function create + * @memberof tendermint.types.Vote + * @static + * @param {tendermint.types.IVote=} [properties] Properties to set + * @returns {tendermint.types.Vote} Vote instance + */ + Vote.create = function create(properties) { + return new Vote(properties); + }; + + /** + * Encodes the specified Vote message. Does not implicitly {@link tendermint.types.Vote.verify|verify} messages. + * @function encode + * @memberof tendermint.types.Vote + * @static + * @param {tendermint.types.IVote} message Vote message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Vote.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); + if (message.height != null && Object.hasOwnProperty.call(message, "height")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.height); + if (message.round != null && Object.hasOwnProperty.call(message, "round")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.round); + if (message.blockId != null && Object.hasOwnProperty.call(message, "blockId")) + $root.tendermint.types.BlockID.encode(message.blockId, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) + $root.google.protobuf.Timestamp.encode(message.timestamp, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.validatorAddress != null && Object.hasOwnProperty.call(message, "validatorAddress")) + writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.validatorAddress); + if (message.validatorIndex != null && Object.hasOwnProperty.call(message, "validatorIndex")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.validatorIndex); + if (message.signature != null && Object.hasOwnProperty.call(message, "signature")) + writer.uint32(/* id 8, wireType 2 =*/66).bytes(message.signature); + return writer; + }; + + /** + * Encodes the specified Vote message, length delimited. Does not implicitly {@link tendermint.types.Vote.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.types.Vote + * @static + * @param {tendermint.types.IVote} message Vote message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Vote.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Vote message from the specified reader or buffer. + * @function decode + * @memberof tendermint.types.Vote + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.types.Vote} Vote + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Vote.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.Vote(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type = reader.int32(); + break; + case 2: + message.height = reader.int64(); + break; + case 3: + message.round = reader.int32(); + break; + case 4: + message.blockId = $root.tendermint.types.BlockID.decode(reader, reader.uint32()); + break; + case 5: + message.timestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 6: + message.validatorAddress = reader.bytes(); + break; + case 7: + message.validatorIndex = reader.int32(); + break; + case 8: + message.signature = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Vote message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.types.Vote + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.types.Vote} Vote + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Vote.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Vote message. + * @function verify + * @memberof tendermint.types.Vote + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Vote.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 32: + break; + } + if (message.height != null && message.hasOwnProperty("height")) + if (!$util.isInteger(message.height) && !(message.height && $util.isInteger(message.height.low) && $util.isInteger(message.height.high))) + return "height: integer|Long expected"; + if (message.round != null && message.hasOwnProperty("round")) + if (!$util.isInteger(message.round)) + return "round: integer expected"; + if (message.blockId != null && message.hasOwnProperty("blockId")) { + var error = $root.tendermint.types.BlockID.verify(message.blockId); + if (error) + return "blockId." + error; + } + if (message.timestamp != null && message.hasOwnProperty("timestamp")) { + var error = $root.google.protobuf.Timestamp.verify(message.timestamp); + if (error) + return "timestamp." + error; + } + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + if (!(message.validatorAddress && typeof message.validatorAddress.length === "number" || $util.isString(message.validatorAddress))) + return "validatorAddress: buffer expected"; + if (message.validatorIndex != null && message.hasOwnProperty("validatorIndex")) + if (!$util.isInteger(message.validatorIndex)) + return "validatorIndex: integer expected"; + if (message.signature != null && message.hasOwnProperty("signature")) + if (!(message.signature && typeof message.signature.length === "number" || $util.isString(message.signature))) + return "signature: buffer expected"; + return null; + }; + + /** + * Creates a Vote message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.types.Vote + * @static + * @param {Object.} object Plain object + * @returns {tendermint.types.Vote} Vote + */ + Vote.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.types.Vote) + return object; + var message = new $root.tendermint.types.Vote(); + switch (object.type) { + case "SIGNED_MSG_TYPE_UNKNOWN": + case 0: + message.type = 0; + break; + case "SIGNED_MSG_TYPE_PREVOTE": + case 1: + message.type = 1; + break; + case "SIGNED_MSG_TYPE_PRECOMMIT": + case 2: + message.type = 2; + break; + case "SIGNED_MSG_TYPE_PROPOSAL": + case 32: + message.type = 32; + break; + } + if (object.height != null) + if ($util.Long) + (message.height = $util.Long.fromValue(object.height)).unsigned = false; + else if (typeof object.height === "string") + message.height = parseInt(object.height, 10); + else if (typeof object.height === "number") + message.height = object.height; + else if (typeof object.height === "object") + message.height = new $util.LongBits(object.height.low >>> 0, object.height.high >>> 0).toNumber(); + if (object.round != null) + message.round = object.round | 0; + if (object.blockId != null) { + if (typeof object.blockId !== "object") + throw TypeError(".tendermint.types.Vote.blockId: object expected"); + message.blockId = $root.tendermint.types.BlockID.fromObject(object.blockId); + } + if (object.timestamp != null) { + if (typeof object.timestamp !== "object") + throw TypeError(".tendermint.types.Vote.timestamp: object expected"); + message.timestamp = $root.google.protobuf.Timestamp.fromObject(object.timestamp); + } + if (object.validatorAddress != null) + if (typeof object.validatorAddress === "string") + $util.base64.decode(object.validatorAddress, message.validatorAddress = $util.newBuffer($util.base64.length(object.validatorAddress)), 0); + else if (object.validatorAddress.length) + message.validatorAddress = object.validatorAddress; + if (object.validatorIndex != null) + message.validatorIndex = object.validatorIndex | 0; + if (object.signature != null) + if (typeof object.signature === "string") + $util.base64.decode(object.signature, message.signature = $util.newBuffer($util.base64.length(object.signature)), 0); + else if (object.signature.length) + message.signature = object.signature; + return message; + }; + + /** + * Creates a plain object from a Vote message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.types.Vote + * @static + * @param {tendermint.types.Vote} message Vote + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Vote.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = options.enums === String ? "SIGNED_MSG_TYPE_UNKNOWN" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.height = options.longs === String ? "0" : 0; + object.round = 0; + object.blockId = null; + object.timestamp = null; + if (options.bytes === String) + object.validatorAddress = ""; + else { + object.validatorAddress = []; + if (options.bytes !== Array) + object.validatorAddress = $util.newBuffer(object.validatorAddress); + } + object.validatorIndex = 0; + if (options.bytes === String) + object.signature = ""; + else { + object.signature = []; + if (options.bytes !== Array) + object.signature = $util.newBuffer(object.signature); + } + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.tendermint.types.SignedMsgType[message.type] : message.type; + if (message.height != null && message.hasOwnProperty("height")) + if (typeof message.height === "number") + object.height = options.longs === String ? String(message.height) : message.height; + else + object.height = options.longs === String ? $util.Long.prototype.toString.call(message.height) : options.longs === Number ? new $util.LongBits(message.height.low >>> 0, message.height.high >>> 0).toNumber() : message.height; + if (message.round != null && message.hasOwnProperty("round")) + object.round = message.round; + if (message.blockId != null && message.hasOwnProperty("blockId")) + object.blockId = $root.tendermint.types.BlockID.toObject(message.blockId, options); + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + object.timestamp = $root.google.protobuf.Timestamp.toObject(message.timestamp, options); + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + object.validatorAddress = options.bytes === String ? $util.base64.encode(message.validatorAddress, 0, message.validatorAddress.length) : options.bytes === Array ? Array.prototype.slice.call(message.validatorAddress) : message.validatorAddress; + if (message.validatorIndex != null && message.hasOwnProperty("validatorIndex")) + object.validatorIndex = message.validatorIndex; + if (message.signature != null && message.hasOwnProperty("signature")) + object.signature = options.bytes === String ? $util.base64.encode(message.signature, 0, message.signature.length) : options.bytes === Array ? Array.prototype.slice.call(message.signature) : message.signature; + return object; + }; + + /** + * Converts this Vote to JSON. + * @function toJSON + * @memberof tendermint.types.Vote + * @instance + * @returns {Object.} JSON object + */ + Vote.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Vote; + })(types.Vote || {}); + + types.Commit = (function(Commit) { + + /** + * Properties of a Commit. + * @memberof tendermint.types + * @interface ICommit + * @property {number|Long|null} [height] Commit height + * @property {number|null} [round] Commit round + * @property {tendermint.types.IBlockID|null} [blockId] Commit blockId + * @property {Array.|null} [signatures] Commit signatures + */ + + /** + * Constructs a new Commit. + * @memberof tendermint.types + * @classdesc Represents a Commit. + * @implements ICommit + * @constructor + * @param {tendermint.types.ICommit=} [properties] Properties to set + */ + function Commit(properties) { + this.signatures = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Commit height. + * @member {number|Long} height + * @memberof tendermint.types.Commit + * @instance + */ + Commit.prototype.height = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Commit round. + * @member {number} round + * @memberof tendermint.types.Commit + * @instance + */ + Commit.prototype.round = 0; + + /** + * Commit blockId. + * @member {tendermint.types.IBlockID|null|undefined} blockId + * @memberof tendermint.types.Commit + * @instance + */ + Commit.prototype.blockId = null; + + /** + * Commit signatures. + * @member {Array.} signatures + * @memberof tendermint.types.Commit + * @instance + */ + Commit.prototype.signatures = $util.emptyArray; + + /** + * Creates a new Commit instance using the specified properties. + * @function create + * @memberof tendermint.types.Commit + * @static + * @param {tendermint.types.ICommit=} [properties] Properties to set + * @returns {tendermint.types.Commit} Commit instance + */ + Commit.create = function create(properties) { + return new Commit(properties); + }; + + /** + * Encodes the specified Commit message. Does not implicitly {@link tendermint.types.Commit.verify|verify} messages. + * @function encode + * @memberof tendermint.types.Commit + * @static + * @param {tendermint.types.ICommit} message Commit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Commit.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.height != null && Object.hasOwnProperty.call(message, "height")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.height); + if (message.round != null && Object.hasOwnProperty.call(message, "round")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.round); + if (message.blockId != null && Object.hasOwnProperty.call(message, "blockId")) + $root.tendermint.types.BlockID.encode(message.blockId, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.signatures != null && message.signatures.length) + for (var i = 0; i < message.signatures.length; ++i) + $root.tendermint.types.CommitSig.encode(message.signatures[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Commit message, length delimited. Does not implicitly {@link tendermint.types.Commit.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.types.Commit + * @static + * @param {tendermint.types.ICommit} message Commit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Commit.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Commit message from the specified reader or buffer. + * @function decode + * @memberof tendermint.types.Commit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.types.Commit} Commit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Commit.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.Commit(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.height = reader.int64(); + break; + case 2: + message.round = reader.int32(); + break; + case 3: + message.blockId = $root.tendermint.types.BlockID.decode(reader, reader.uint32()); + break; + case 4: + if (!(message.signatures && message.signatures.length)) + message.signatures = []; + message.signatures.push($root.tendermint.types.CommitSig.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Commit message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.types.Commit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.types.Commit} Commit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Commit.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Commit message. + * @function verify + * @memberof tendermint.types.Commit + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Commit.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.height != null && message.hasOwnProperty("height")) + if (!$util.isInteger(message.height) && !(message.height && $util.isInteger(message.height.low) && $util.isInteger(message.height.high))) + return "height: integer|Long expected"; + if (message.round != null && message.hasOwnProperty("round")) + if (!$util.isInteger(message.round)) + return "round: integer expected"; + if (message.blockId != null && message.hasOwnProperty("blockId")) { + var error = $root.tendermint.types.BlockID.verify(message.blockId); + if (error) + return "blockId." + error; + } + if (message.signatures != null && message.hasOwnProperty("signatures")) { + if (!Array.isArray(message.signatures)) + return "signatures: array expected"; + for (var i = 0; i < message.signatures.length; ++i) { + var error = $root.tendermint.types.CommitSig.verify(message.signatures[i]); + if (error) + return "signatures." + error; + } + } + return null; + }; + + /** + * Creates a Commit message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.types.Commit + * @static + * @param {Object.} object Plain object + * @returns {tendermint.types.Commit} Commit + */ + Commit.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.types.Commit) + return object; + var message = new $root.tendermint.types.Commit(); + if (object.height != null) + if ($util.Long) + (message.height = $util.Long.fromValue(object.height)).unsigned = false; + else if (typeof object.height === "string") + message.height = parseInt(object.height, 10); + else if (typeof object.height === "number") + message.height = object.height; + else if (typeof object.height === "object") + message.height = new $util.LongBits(object.height.low >>> 0, object.height.high >>> 0).toNumber(); + if (object.round != null) + message.round = object.round | 0; + if (object.blockId != null) { + if (typeof object.blockId !== "object") + throw TypeError(".tendermint.types.Commit.blockId: object expected"); + message.blockId = $root.tendermint.types.BlockID.fromObject(object.blockId); + } + if (object.signatures) { + if (!Array.isArray(object.signatures)) + throw TypeError(".tendermint.types.Commit.signatures: array expected"); + message.signatures = []; + for (var i = 0; i < object.signatures.length; ++i) { + if (typeof object.signatures[i] !== "object") + throw TypeError(".tendermint.types.Commit.signatures: object expected"); + message.signatures[i] = $root.tendermint.types.CommitSig.fromObject(object.signatures[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Commit message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.types.Commit + * @static + * @param {tendermint.types.Commit} message Commit + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Commit.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.signatures = []; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.height = options.longs === String ? "0" : 0; + object.round = 0; + object.blockId = null; + } + if (message.height != null && message.hasOwnProperty("height")) + if (typeof message.height === "number") + object.height = options.longs === String ? String(message.height) : message.height; + else + object.height = options.longs === String ? $util.Long.prototype.toString.call(message.height) : options.longs === Number ? new $util.LongBits(message.height.low >>> 0, message.height.high >>> 0).toNumber() : message.height; + if (message.round != null && message.hasOwnProperty("round")) + object.round = message.round; + if (message.blockId != null && message.hasOwnProperty("blockId")) + object.blockId = $root.tendermint.types.BlockID.toObject(message.blockId, options); + if (message.signatures && message.signatures.length) { + object.signatures = []; + for (var j = 0; j < message.signatures.length; ++j) + object.signatures[j] = $root.tendermint.types.CommitSig.toObject(message.signatures[j], options); + } + return object; + }; + + /** + * Converts this Commit to JSON. + * @function toJSON + * @memberof tendermint.types.Commit + * @instance + * @returns {Object.} JSON object + */ + Commit.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Commit; + })(types.Commit || {}); + + types.CommitSig = (function(CommitSig) { + + /** + * Properties of a CommitSig. + * @memberof tendermint.types + * @interface ICommitSig + * @property {tendermint.types.BlockIDFlag|null} [blockIdFlag] CommitSig blockIdFlag + * @property {Uint8Array|null} [validatorAddress] CommitSig validatorAddress + * @property {google.protobuf.ITimestamp|null} [timestamp] CommitSig timestamp + * @property {Uint8Array|null} [signature] CommitSig signature + */ + + /** + * Constructs a new CommitSig. + * @memberof tendermint.types + * @classdesc Represents a CommitSig. + * @implements ICommitSig + * @constructor + * @param {tendermint.types.ICommitSig=} [properties] Properties to set + */ + function CommitSig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CommitSig blockIdFlag. + * @member {tendermint.types.BlockIDFlag} blockIdFlag + * @memberof tendermint.types.CommitSig + * @instance + */ + CommitSig.prototype.blockIdFlag = 0; + + /** + * CommitSig validatorAddress. + * @member {Uint8Array} validatorAddress + * @memberof tendermint.types.CommitSig + * @instance + */ + CommitSig.prototype.validatorAddress = $util.newBuffer([]); + + /** + * CommitSig timestamp. + * @member {google.protobuf.ITimestamp|null|undefined} timestamp + * @memberof tendermint.types.CommitSig + * @instance + */ + CommitSig.prototype.timestamp = null; + + /** + * CommitSig signature. + * @member {Uint8Array} signature + * @memberof tendermint.types.CommitSig + * @instance + */ + CommitSig.prototype.signature = $util.newBuffer([]); + + /** + * Creates a new CommitSig instance using the specified properties. + * @function create + * @memberof tendermint.types.CommitSig + * @static + * @param {tendermint.types.ICommitSig=} [properties] Properties to set + * @returns {tendermint.types.CommitSig} CommitSig instance + */ + CommitSig.create = function create(properties) { + return new CommitSig(properties); + }; + + /** + * Encodes the specified CommitSig message. Does not implicitly {@link tendermint.types.CommitSig.verify|verify} messages. + * @function encode + * @memberof tendermint.types.CommitSig + * @static + * @param {tendermint.types.ICommitSig} message CommitSig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommitSig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.blockIdFlag != null && Object.hasOwnProperty.call(message, "blockIdFlag")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.blockIdFlag); + if (message.validatorAddress != null && Object.hasOwnProperty.call(message, "validatorAddress")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.validatorAddress); + if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) + $root.google.protobuf.Timestamp.encode(message.timestamp, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.signature != null && Object.hasOwnProperty.call(message, "signature")) + writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.signature); + return writer; + }; + + /** + * Encodes the specified CommitSig message, length delimited. Does not implicitly {@link tendermint.types.CommitSig.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.types.CommitSig + * @static + * @param {tendermint.types.ICommitSig} message CommitSig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommitSig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CommitSig message from the specified reader or buffer. + * @function decode + * @memberof tendermint.types.CommitSig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.types.CommitSig} CommitSig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommitSig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.CommitSig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.blockIdFlag = reader.int32(); + break; + case 2: + message.validatorAddress = reader.bytes(); + break; + case 3: + message.timestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 4: + message.signature = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CommitSig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.types.CommitSig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.types.CommitSig} CommitSig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommitSig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CommitSig message. + * @function verify + * @memberof tendermint.types.CommitSig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CommitSig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.blockIdFlag != null && message.hasOwnProperty("blockIdFlag")) + switch (message.blockIdFlag) { + default: + return "blockIdFlag: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + if (!(message.validatorAddress && typeof message.validatorAddress.length === "number" || $util.isString(message.validatorAddress))) + return "validatorAddress: buffer expected"; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) { + var error = $root.google.protobuf.Timestamp.verify(message.timestamp); + if (error) + return "timestamp." + error; + } + if (message.signature != null && message.hasOwnProperty("signature")) + if (!(message.signature && typeof message.signature.length === "number" || $util.isString(message.signature))) + return "signature: buffer expected"; + return null; + }; + + /** + * Creates a CommitSig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.types.CommitSig + * @static + * @param {Object.} object Plain object + * @returns {tendermint.types.CommitSig} CommitSig + */ + CommitSig.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.types.CommitSig) + return object; + var message = new $root.tendermint.types.CommitSig(); + switch (object.blockIdFlag) { + case "BLOCK_ID_FLAG_UNKNOWN": + case 0: + message.blockIdFlag = 0; + break; + case "BLOCK_ID_FLAG_ABSENT": + case 1: + message.blockIdFlag = 1; + break; + case "BLOCK_ID_FLAG_COMMIT": + case 2: + message.blockIdFlag = 2; + break; + case "BLOCK_ID_FLAG_NIL": + case 3: + message.blockIdFlag = 3; + break; + } + if (object.validatorAddress != null) + if (typeof object.validatorAddress === "string") + $util.base64.decode(object.validatorAddress, message.validatorAddress = $util.newBuffer($util.base64.length(object.validatorAddress)), 0); + else if (object.validatorAddress.length) + message.validatorAddress = object.validatorAddress; + if (object.timestamp != null) { + if (typeof object.timestamp !== "object") + throw TypeError(".tendermint.types.CommitSig.timestamp: object expected"); + message.timestamp = $root.google.protobuf.Timestamp.fromObject(object.timestamp); + } + if (object.signature != null) + if (typeof object.signature === "string") + $util.base64.decode(object.signature, message.signature = $util.newBuffer($util.base64.length(object.signature)), 0); + else if (object.signature.length) + message.signature = object.signature; + return message; + }; + + /** + * Creates a plain object from a CommitSig message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.types.CommitSig + * @static + * @param {tendermint.types.CommitSig} message CommitSig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CommitSig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.blockIdFlag = options.enums === String ? "BLOCK_ID_FLAG_UNKNOWN" : 0; + if (options.bytes === String) + object.validatorAddress = ""; + else { + object.validatorAddress = []; + if (options.bytes !== Array) + object.validatorAddress = $util.newBuffer(object.validatorAddress); + } + object.timestamp = null; + if (options.bytes === String) + object.signature = ""; + else { + object.signature = []; + if (options.bytes !== Array) + object.signature = $util.newBuffer(object.signature); + } + } + if (message.blockIdFlag != null && message.hasOwnProperty("blockIdFlag")) + object.blockIdFlag = options.enums === String ? $root.tendermint.types.BlockIDFlag[message.blockIdFlag] : message.blockIdFlag; + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + object.validatorAddress = options.bytes === String ? $util.base64.encode(message.validatorAddress, 0, message.validatorAddress.length) : options.bytes === Array ? Array.prototype.slice.call(message.validatorAddress) : message.validatorAddress; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + object.timestamp = $root.google.protobuf.Timestamp.toObject(message.timestamp, options); + if (message.signature != null && message.hasOwnProperty("signature")) + object.signature = options.bytes === String ? $util.base64.encode(message.signature, 0, message.signature.length) : options.bytes === Array ? Array.prototype.slice.call(message.signature) : message.signature; + return object; + }; + + /** + * Converts this CommitSig to JSON. + * @function toJSON + * @memberof tendermint.types.CommitSig + * @instance + * @returns {Object.} JSON object + */ + CommitSig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CommitSig; + })(types.CommitSig || {}); + + types.Proposal = (function(Proposal) { + + /** + * Properties of a Proposal. + * @memberof tendermint.types + * @interface IProposal + * @property {tendermint.types.SignedMsgType|null} [type] Proposal type + * @property {number|Long|null} [height] Proposal height + * @property {number|null} [round] Proposal round + * @property {number|null} [polRound] Proposal polRound + * @property {tendermint.types.IBlockID|null} [blockId] Proposal blockId + * @property {google.protobuf.ITimestamp|null} [timestamp] Proposal timestamp + * @property {Uint8Array|null} [signature] Proposal signature + */ + + /** + * Constructs a new Proposal. + * @memberof tendermint.types + * @classdesc Represents a Proposal. + * @implements IProposal + * @constructor + * @param {tendermint.types.IProposal=} [properties] Properties to set + */ + function Proposal(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Proposal type. + * @member {tendermint.types.SignedMsgType} type + * @memberof tendermint.types.Proposal + * @instance + */ + Proposal.prototype.type = 0; + + /** + * Proposal height. + * @member {number|Long} height + * @memberof tendermint.types.Proposal + * @instance + */ + Proposal.prototype.height = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Proposal round. + * @member {number} round + * @memberof tendermint.types.Proposal + * @instance + */ + Proposal.prototype.round = 0; + + /** + * Proposal polRound. + * @member {number} polRound + * @memberof tendermint.types.Proposal + * @instance + */ + Proposal.prototype.polRound = 0; + + /** + * Proposal blockId. + * @member {tendermint.types.IBlockID|null|undefined} blockId + * @memberof tendermint.types.Proposal + * @instance + */ + Proposal.prototype.blockId = null; + + /** + * Proposal timestamp. + * @member {google.protobuf.ITimestamp|null|undefined} timestamp + * @memberof tendermint.types.Proposal + * @instance + */ + Proposal.prototype.timestamp = null; + + /** + * Proposal signature. + * @member {Uint8Array} signature + * @memberof tendermint.types.Proposal + * @instance + */ + Proposal.prototype.signature = $util.newBuffer([]); + + /** + * Creates a new Proposal instance using the specified properties. + * @function create + * @memberof tendermint.types.Proposal + * @static + * @param {tendermint.types.IProposal=} [properties] Properties to set + * @returns {tendermint.types.Proposal} Proposal instance + */ + Proposal.create = function create(properties) { + return new Proposal(properties); + }; + + /** + * Encodes the specified Proposal message. Does not implicitly {@link tendermint.types.Proposal.verify|verify} messages. + * @function encode + * @memberof tendermint.types.Proposal + * @static + * @param {tendermint.types.IProposal} message Proposal message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Proposal.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); + if (message.height != null && Object.hasOwnProperty.call(message, "height")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.height); + if (message.round != null && Object.hasOwnProperty.call(message, "round")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.round); + if (message.polRound != null && Object.hasOwnProperty.call(message, "polRound")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.polRound); + if (message.blockId != null && Object.hasOwnProperty.call(message, "blockId")) + $root.tendermint.types.BlockID.encode(message.blockId, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) + $root.google.protobuf.Timestamp.encode(message.timestamp, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.signature != null && Object.hasOwnProperty.call(message, "signature")) + writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.signature); + return writer; + }; + + /** + * Encodes the specified Proposal message, length delimited. Does not implicitly {@link tendermint.types.Proposal.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.types.Proposal + * @static + * @param {tendermint.types.IProposal} message Proposal message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Proposal.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Proposal message from the specified reader or buffer. + * @function decode + * @memberof tendermint.types.Proposal + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.types.Proposal} Proposal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Proposal.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.Proposal(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type = reader.int32(); + break; + case 2: + message.height = reader.int64(); + break; + case 3: + message.round = reader.int32(); + break; + case 4: + message.polRound = reader.int32(); + break; + case 5: + message.blockId = $root.tendermint.types.BlockID.decode(reader, reader.uint32()); + break; + case 6: + message.timestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 7: + message.signature = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Proposal message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.types.Proposal + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.types.Proposal} Proposal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Proposal.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Proposal message. + * @function verify + * @memberof tendermint.types.Proposal + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Proposal.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 32: + break; + } + if (message.height != null && message.hasOwnProperty("height")) + if (!$util.isInteger(message.height) && !(message.height && $util.isInteger(message.height.low) && $util.isInteger(message.height.high))) + return "height: integer|Long expected"; + if (message.round != null && message.hasOwnProperty("round")) + if (!$util.isInteger(message.round)) + return "round: integer expected"; + if (message.polRound != null && message.hasOwnProperty("polRound")) + if (!$util.isInteger(message.polRound)) + return "polRound: integer expected"; + if (message.blockId != null && message.hasOwnProperty("blockId")) { + var error = $root.tendermint.types.BlockID.verify(message.blockId); + if (error) + return "blockId." + error; + } + if (message.timestamp != null && message.hasOwnProperty("timestamp")) { + var error = $root.google.protobuf.Timestamp.verify(message.timestamp); + if (error) + return "timestamp." + error; + } + if (message.signature != null && message.hasOwnProperty("signature")) + if (!(message.signature && typeof message.signature.length === "number" || $util.isString(message.signature))) + return "signature: buffer expected"; + return null; + }; + + /** + * Creates a Proposal message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.types.Proposal + * @static + * @param {Object.} object Plain object + * @returns {tendermint.types.Proposal} Proposal + */ + Proposal.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.types.Proposal) + return object; + var message = new $root.tendermint.types.Proposal(); + switch (object.type) { + case "SIGNED_MSG_TYPE_UNKNOWN": + case 0: + message.type = 0; + break; + case "SIGNED_MSG_TYPE_PREVOTE": + case 1: + message.type = 1; + break; + case "SIGNED_MSG_TYPE_PRECOMMIT": + case 2: + message.type = 2; + break; + case "SIGNED_MSG_TYPE_PROPOSAL": + case 32: + message.type = 32; + break; + } + if (object.height != null) + if ($util.Long) + (message.height = $util.Long.fromValue(object.height)).unsigned = false; + else if (typeof object.height === "string") + message.height = parseInt(object.height, 10); + else if (typeof object.height === "number") + message.height = object.height; + else if (typeof object.height === "object") + message.height = new $util.LongBits(object.height.low >>> 0, object.height.high >>> 0).toNumber(); + if (object.round != null) + message.round = object.round | 0; + if (object.polRound != null) + message.polRound = object.polRound | 0; + if (object.blockId != null) { + if (typeof object.blockId !== "object") + throw TypeError(".tendermint.types.Proposal.blockId: object expected"); + message.blockId = $root.tendermint.types.BlockID.fromObject(object.blockId); + } + if (object.timestamp != null) { + if (typeof object.timestamp !== "object") + throw TypeError(".tendermint.types.Proposal.timestamp: object expected"); + message.timestamp = $root.google.protobuf.Timestamp.fromObject(object.timestamp); + } + if (object.signature != null) + if (typeof object.signature === "string") + $util.base64.decode(object.signature, message.signature = $util.newBuffer($util.base64.length(object.signature)), 0); + else if (object.signature.length) + message.signature = object.signature; + return message; + }; + + /** + * Creates a plain object from a Proposal message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.types.Proposal + * @static + * @param {tendermint.types.Proposal} message Proposal + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Proposal.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = options.enums === String ? "SIGNED_MSG_TYPE_UNKNOWN" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.height = options.longs === String ? "0" : 0; + object.round = 0; + object.polRound = 0; + object.blockId = null; + object.timestamp = null; + if (options.bytes === String) + object.signature = ""; + else { + object.signature = []; + if (options.bytes !== Array) + object.signature = $util.newBuffer(object.signature); + } + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.tendermint.types.SignedMsgType[message.type] : message.type; + if (message.height != null && message.hasOwnProperty("height")) + if (typeof message.height === "number") + object.height = options.longs === String ? String(message.height) : message.height; + else + object.height = options.longs === String ? $util.Long.prototype.toString.call(message.height) : options.longs === Number ? new $util.LongBits(message.height.low >>> 0, message.height.high >>> 0).toNumber() : message.height; + if (message.round != null && message.hasOwnProperty("round")) + object.round = message.round; + if (message.polRound != null && message.hasOwnProperty("polRound")) + object.polRound = message.polRound; + if (message.blockId != null && message.hasOwnProperty("blockId")) + object.blockId = $root.tendermint.types.BlockID.toObject(message.blockId, options); + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + object.timestamp = $root.google.protobuf.Timestamp.toObject(message.timestamp, options); + if (message.signature != null && message.hasOwnProperty("signature")) + object.signature = options.bytes === String ? $util.base64.encode(message.signature, 0, message.signature.length) : options.bytes === Array ? Array.prototype.slice.call(message.signature) : message.signature; + return object; + }; + + /** + * Converts this Proposal to JSON. + * @function toJSON + * @memberof tendermint.types.Proposal + * @instance + * @returns {Object.} JSON object + */ + Proposal.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Proposal; + })(types.Proposal || {}); + + types.SignedHeader = (function(SignedHeader) { + + /** + * Properties of a SignedHeader. + * @memberof tendermint.types + * @interface ISignedHeader + * @property {tendermint.types.IHeader|null} [header] SignedHeader header + * @property {tendermint.types.ICommit|null} [commit] SignedHeader commit + */ + + /** + * Constructs a new SignedHeader. + * @memberof tendermint.types + * @classdesc Represents a SignedHeader. + * @implements ISignedHeader + * @constructor + * @param {tendermint.types.ISignedHeader=} [properties] Properties to set + */ + function SignedHeader(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SignedHeader header. + * @member {tendermint.types.IHeader|null|undefined} header + * @memberof tendermint.types.SignedHeader + * @instance + */ + SignedHeader.prototype.header = null; + + /** + * SignedHeader commit. + * @member {tendermint.types.ICommit|null|undefined} commit + * @memberof tendermint.types.SignedHeader + * @instance + */ + SignedHeader.prototype.commit = null; + + /** + * Creates a new SignedHeader instance using the specified properties. + * @function create + * @memberof tendermint.types.SignedHeader + * @static + * @param {tendermint.types.ISignedHeader=} [properties] Properties to set + * @returns {tendermint.types.SignedHeader} SignedHeader instance + */ + SignedHeader.create = function create(properties) { + return new SignedHeader(properties); + }; + + /** + * Encodes the specified SignedHeader message. Does not implicitly {@link tendermint.types.SignedHeader.verify|verify} messages. + * @function encode + * @memberof tendermint.types.SignedHeader + * @static + * @param {tendermint.types.ISignedHeader} message SignedHeader message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SignedHeader.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.header != null && Object.hasOwnProperty.call(message, "header")) + $root.tendermint.types.Header.encode(message.header, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.commit != null && Object.hasOwnProperty.call(message, "commit")) + $root.tendermint.types.Commit.encode(message.commit, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SignedHeader message, length delimited. Does not implicitly {@link tendermint.types.SignedHeader.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.types.SignedHeader + * @static + * @param {tendermint.types.ISignedHeader} message SignedHeader message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SignedHeader.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SignedHeader message from the specified reader or buffer. + * @function decode + * @memberof tendermint.types.SignedHeader + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.types.SignedHeader} SignedHeader + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SignedHeader.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.SignedHeader(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.header = $root.tendermint.types.Header.decode(reader, reader.uint32()); + break; + case 2: + message.commit = $root.tendermint.types.Commit.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SignedHeader message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.types.SignedHeader + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.types.SignedHeader} SignedHeader + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SignedHeader.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SignedHeader message. + * @function verify + * @memberof tendermint.types.SignedHeader + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SignedHeader.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.header != null && message.hasOwnProperty("header")) { + var error = $root.tendermint.types.Header.verify(message.header); + if (error) + return "header." + error; + } + if (message.commit != null && message.hasOwnProperty("commit")) { + var error = $root.tendermint.types.Commit.verify(message.commit); + if (error) + return "commit." + error; + } + return null; + }; + + /** + * Creates a SignedHeader message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.types.SignedHeader + * @static + * @param {Object.} object Plain object + * @returns {tendermint.types.SignedHeader} SignedHeader + */ + SignedHeader.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.types.SignedHeader) + return object; + var message = new $root.tendermint.types.SignedHeader(); + if (object.header != null) { + if (typeof object.header !== "object") + throw TypeError(".tendermint.types.SignedHeader.header: object expected"); + message.header = $root.tendermint.types.Header.fromObject(object.header); + } + if (object.commit != null) { + if (typeof object.commit !== "object") + throw TypeError(".tendermint.types.SignedHeader.commit: object expected"); + message.commit = $root.tendermint.types.Commit.fromObject(object.commit); + } + return message; + }; + + /** + * Creates a plain object from a SignedHeader message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.types.SignedHeader + * @static + * @param {tendermint.types.SignedHeader} message SignedHeader + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SignedHeader.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.header = null; + object.commit = null; + } + if (message.header != null && message.hasOwnProperty("header")) + object.header = $root.tendermint.types.Header.toObject(message.header, options); + if (message.commit != null && message.hasOwnProperty("commit")) + object.commit = $root.tendermint.types.Commit.toObject(message.commit, options); + return object; + }; + + /** + * Converts this SignedHeader to JSON. + * @function toJSON + * @memberof tendermint.types.SignedHeader + * @instance + * @returns {Object.} JSON object + */ + SignedHeader.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SignedHeader; + })(types.SignedHeader || {}); + + types.LightBlock = (function(LightBlock) { + + /** + * Properties of a LightBlock. + * @memberof tendermint.types + * @interface ILightBlock + * @property {tendermint.types.ISignedHeader|null} [signedHeader] LightBlock signedHeader + * @property {tendermint.types.IValidatorSet|null} [validatorSet] LightBlock validatorSet + */ + + /** + * Constructs a new LightBlock. + * @memberof tendermint.types + * @classdesc Represents a LightBlock. + * @implements ILightBlock + * @constructor + * @param {tendermint.types.ILightBlock=} [properties] Properties to set + */ + function LightBlock(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LightBlock signedHeader. + * @member {tendermint.types.ISignedHeader|null|undefined} signedHeader + * @memberof tendermint.types.LightBlock + * @instance + */ + LightBlock.prototype.signedHeader = null; + + /** + * LightBlock validatorSet. + * @member {tendermint.types.IValidatorSet|null|undefined} validatorSet + * @memberof tendermint.types.LightBlock + * @instance + */ + LightBlock.prototype.validatorSet = null; + + /** + * Creates a new LightBlock instance using the specified properties. + * @function create + * @memberof tendermint.types.LightBlock + * @static + * @param {tendermint.types.ILightBlock=} [properties] Properties to set + * @returns {tendermint.types.LightBlock} LightBlock instance + */ + LightBlock.create = function create(properties) { + return new LightBlock(properties); + }; + + /** + * Encodes the specified LightBlock message. Does not implicitly {@link tendermint.types.LightBlock.verify|verify} messages. + * @function encode + * @memberof tendermint.types.LightBlock + * @static + * @param {tendermint.types.ILightBlock} message LightBlock message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LightBlock.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.signedHeader != null && Object.hasOwnProperty.call(message, "signedHeader")) + $root.tendermint.types.SignedHeader.encode(message.signedHeader, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.validatorSet != null && Object.hasOwnProperty.call(message, "validatorSet")) + $root.tendermint.types.ValidatorSet.encode(message.validatorSet, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LightBlock message, length delimited. Does not implicitly {@link tendermint.types.LightBlock.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.types.LightBlock + * @static + * @param {tendermint.types.ILightBlock} message LightBlock message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LightBlock.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LightBlock message from the specified reader or buffer. + * @function decode + * @memberof tendermint.types.LightBlock + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.types.LightBlock} LightBlock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LightBlock.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.LightBlock(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.signedHeader = $root.tendermint.types.SignedHeader.decode(reader, reader.uint32()); + break; + case 2: + message.validatorSet = $root.tendermint.types.ValidatorSet.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LightBlock message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.types.LightBlock + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.types.LightBlock} LightBlock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LightBlock.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LightBlock message. + * @function verify + * @memberof tendermint.types.LightBlock + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LightBlock.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.signedHeader != null && message.hasOwnProperty("signedHeader")) { + var error = $root.tendermint.types.SignedHeader.verify(message.signedHeader); + if (error) + return "signedHeader." + error; + } + if (message.validatorSet != null && message.hasOwnProperty("validatorSet")) { + var error = $root.tendermint.types.ValidatorSet.verify(message.validatorSet); + if (error) + return "validatorSet." + error; + } + return null; + }; + + /** + * Creates a LightBlock message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.types.LightBlock + * @static + * @param {Object.} object Plain object + * @returns {tendermint.types.LightBlock} LightBlock + */ + LightBlock.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.types.LightBlock) + return object; + var message = new $root.tendermint.types.LightBlock(); + if (object.signedHeader != null) { + if (typeof object.signedHeader !== "object") + throw TypeError(".tendermint.types.LightBlock.signedHeader: object expected"); + message.signedHeader = $root.tendermint.types.SignedHeader.fromObject(object.signedHeader); + } + if (object.validatorSet != null) { + if (typeof object.validatorSet !== "object") + throw TypeError(".tendermint.types.LightBlock.validatorSet: object expected"); + message.validatorSet = $root.tendermint.types.ValidatorSet.fromObject(object.validatorSet); + } + return message; + }; + + /** + * Creates a plain object from a LightBlock message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.types.LightBlock + * @static + * @param {tendermint.types.LightBlock} message LightBlock + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LightBlock.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.signedHeader = null; + object.validatorSet = null; + } + if (message.signedHeader != null && message.hasOwnProperty("signedHeader")) + object.signedHeader = $root.tendermint.types.SignedHeader.toObject(message.signedHeader, options); + if (message.validatorSet != null && message.hasOwnProperty("validatorSet")) + object.validatorSet = $root.tendermint.types.ValidatorSet.toObject(message.validatorSet, options); + return object; + }; + + /** + * Converts this LightBlock to JSON. + * @function toJSON + * @memberof tendermint.types.LightBlock + * @instance + * @returns {Object.} JSON object + */ + LightBlock.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return LightBlock; + })(types.LightBlock || {}); + + types.BlockMeta = (function(BlockMeta) { + + /** + * Properties of a BlockMeta. + * @memberof tendermint.types + * @interface IBlockMeta + * @property {tendermint.types.IBlockID|null} [blockId] BlockMeta blockId + * @property {number|Long|null} [blockSize] BlockMeta blockSize + * @property {tendermint.types.IHeader|null} [header] BlockMeta header + * @property {number|Long|null} [numTxs] BlockMeta numTxs + */ + + /** + * Constructs a new BlockMeta. + * @memberof tendermint.types + * @classdesc Represents a BlockMeta. + * @implements IBlockMeta + * @constructor + * @param {tendermint.types.IBlockMeta=} [properties] Properties to set + */ + function BlockMeta(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BlockMeta blockId. + * @member {tendermint.types.IBlockID|null|undefined} blockId + * @memberof tendermint.types.BlockMeta + * @instance + */ + BlockMeta.prototype.blockId = null; + + /** + * BlockMeta blockSize. + * @member {number|Long} blockSize + * @memberof tendermint.types.BlockMeta + * @instance + */ + BlockMeta.prototype.blockSize = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * BlockMeta header. + * @member {tendermint.types.IHeader|null|undefined} header + * @memberof tendermint.types.BlockMeta + * @instance + */ + BlockMeta.prototype.header = null; + + /** + * BlockMeta numTxs. + * @member {number|Long} numTxs + * @memberof tendermint.types.BlockMeta + * @instance + */ + BlockMeta.prototype.numTxs = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new BlockMeta instance using the specified properties. + * @function create + * @memberof tendermint.types.BlockMeta + * @static + * @param {tendermint.types.IBlockMeta=} [properties] Properties to set + * @returns {tendermint.types.BlockMeta} BlockMeta instance + */ + BlockMeta.create = function create(properties) { + return new BlockMeta(properties); + }; + + /** + * Encodes the specified BlockMeta message. Does not implicitly {@link tendermint.types.BlockMeta.verify|verify} messages. + * @function encode + * @memberof tendermint.types.BlockMeta + * @static + * @param {tendermint.types.IBlockMeta} message BlockMeta message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BlockMeta.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.blockId != null && Object.hasOwnProperty.call(message, "blockId")) + $root.tendermint.types.BlockID.encode(message.blockId, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.blockSize != null && Object.hasOwnProperty.call(message, "blockSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.blockSize); + if (message.header != null && Object.hasOwnProperty.call(message, "header")) + $root.tendermint.types.Header.encode(message.header, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.numTxs != null && Object.hasOwnProperty.call(message, "numTxs")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.numTxs); + return writer; + }; + + /** + * Encodes the specified BlockMeta message, length delimited. Does not implicitly {@link tendermint.types.BlockMeta.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.types.BlockMeta + * @static + * @param {tendermint.types.IBlockMeta} message BlockMeta message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BlockMeta.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BlockMeta message from the specified reader or buffer. + * @function decode + * @memberof tendermint.types.BlockMeta + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.types.BlockMeta} BlockMeta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BlockMeta.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.BlockMeta(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.blockId = $root.tendermint.types.BlockID.decode(reader, reader.uint32()); + break; + case 2: + message.blockSize = reader.int64(); + break; + case 3: + message.header = $root.tendermint.types.Header.decode(reader, reader.uint32()); + break; + case 4: + message.numTxs = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BlockMeta message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.types.BlockMeta + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.types.BlockMeta} BlockMeta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BlockMeta.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BlockMeta message. + * @function verify + * @memberof tendermint.types.BlockMeta + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BlockMeta.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.blockId != null && message.hasOwnProperty("blockId")) { + var error = $root.tendermint.types.BlockID.verify(message.blockId); + if (error) + return "blockId." + error; + } + if (message.blockSize != null && message.hasOwnProperty("blockSize")) + if (!$util.isInteger(message.blockSize) && !(message.blockSize && $util.isInteger(message.blockSize.low) && $util.isInteger(message.blockSize.high))) + return "blockSize: integer|Long expected"; + if (message.header != null && message.hasOwnProperty("header")) { + var error = $root.tendermint.types.Header.verify(message.header); + if (error) + return "header." + error; + } + if (message.numTxs != null && message.hasOwnProperty("numTxs")) + if (!$util.isInteger(message.numTxs) && !(message.numTxs && $util.isInteger(message.numTxs.low) && $util.isInteger(message.numTxs.high))) + return "numTxs: integer|Long expected"; + return null; + }; + + /** + * Creates a BlockMeta message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.types.BlockMeta + * @static + * @param {Object.} object Plain object + * @returns {tendermint.types.BlockMeta} BlockMeta + */ + BlockMeta.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.types.BlockMeta) + return object; + var message = new $root.tendermint.types.BlockMeta(); + if (object.blockId != null) { + if (typeof object.blockId !== "object") + throw TypeError(".tendermint.types.BlockMeta.blockId: object expected"); + message.blockId = $root.tendermint.types.BlockID.fromObject(object.blockId); + } + if (object.blockSize != null) + if ($util.Long) + (message.blockSize = $util.Long.fromValue(object.blockSize)).unsigned = false; + else if (typeof object.blockSize === "string") + message.blockSize = parseInt(object.blockSize, 10); + else if (typeof object.blockSize === "number") + message.blockSize = object.blockSize; + else if (typeof object.blockSize === "object") + message.blockSize = new $util.LongBits(object.blockSize.low >>> 0, object.blockSize.high >>> 0).toNumber(); + if (object.header != null) { + if (typeof object.header !== "object") + throw TypeError(".tendermint.types.BlockMeta.header: object expected"); + message.header = $root.tendermint.types.Header.fromObject(object.header); + } + if (object.numTxs != null) + if ($util.Long) + (message.numTxs = $util.Long.fromValue(object.numTxs)).unsigned = false; + else if (typeof object.numTxs === "string") + message.numTxs = parseInt(object.numTxs, 10); + else if (typeof object.numTxs === "number") + message.numTxs = object.numTxs; + else if (typeof object.numTxs === "object") + message.numTxs = new $util.LongBits(object.numTxs.low >>> 0, object.numTxs.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a BlockMeta message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.types.BlockMeta + * @static + * @param {tendermint.types.BlockMeta} message BlockMeta + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BlockMeta.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.blockId = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.blockSize = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.blockSize = options.longs === String ? "0" : 0; + object.header = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.numTxs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.numTxs = options.longs === String ? "0" : 0; + } + if (message.blockId != null && message.hasOwnProperty("blockId")) + object.blockId = $root.tendermint.types.BlockID.toObject(message.blockId, options); + if (message.blockSize != null && message.hasOwnProperty("blockSize")) + if (typeof message.blockSize === "number") + object.blockSize = options.longs === String ? String(message.blockSize) : message.blockSize; + else + object.blockSize = options.longs === String ? $util.Long.prototype.toString.call(message.blockSize) : options.longs === Number ? new $util.LongBits(message.blockSize.low >>> 0, message.blockSize.high >>> 0).toNumber() : message.blockSize; + if (message.header != null && message.hasOwnProperty("header")) + object.header = $root.tendermint.types.Header.toObject(message.header, options); + if (message.numTxs != null && message.hasOwnProperty("numTxs")) + if (typeof message.numTxs === "number") + object.numTxs = options.longs === String ? String(message.numTxs) : message.numTxs; + else + object.numTxs = options.longs === String ? $util.Long.prototype.toString.call(message.numTxs) : options.longs === Number ? new $util.LongBits(message.numTxs.low >>> 0, message.numTxs.high >>> 0).toNumber() : message.numTxs; + return object; + }; + + /** + * Converts this BlockMeta to JSON. + * @function toJSON + * @memberof tendermint.types.BlockMeta + * @instance + * @returns {Object.} JSON object + */ + BlockMeta.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return BlockMeta; + })(types.BlockMeta || {}); + + types.TxProof = (function(TxProof) { + + /** + * Properties of a TxProof. + * @memberof tendermint.types + * @interface ITxProof + * @property {Uint8Array|null} [rootHash] TxProof rootHash + * @property {Uint8Array|null} [data] TxProof data + * @property {tendermint.crypto.IProof|null} [proof] TxProof proof + */ + + /** + * Constructs a new TxProof. + * @memberof tendermint.types + * @classdesc Represents a TxProof. + * @implements ITxProof + * @constructor + * @param {tendermint.types.ITxProof=} [properties] Properties to set + */ + function TxProof(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TxProof rootHash. + * @member {Uint8Array} rootHash + * @memberof tendermint.types.TxProof + * @instance + */ + TxProof.prototype.rootHash = $util.newBuffer([]); + + /** + * TxProof data. + * @member {Uint8Array} data + * @memberof tendermint.types.TxProof + * @instance + */ + TxProof.prototype.data = $util.newBuffer([]); + + /** + * TxProof proof. + * @member {tendermint.crypto.IProof|null|undefined} proof + * @memberof tendermint.types.TxProof + * @instance + */ + TxProof.prototype.proof = null; + + /** + * Creates a new TxProof instance using the specified properties. + * @function create + * @memberof tendermint.types.TxProof + * @static + * @param {tendermint.types.ITxProof=} [properties] Properties to set + * @returns {tendermint.types.TxProof} TxProof instance + */ + TxProof.create = function create(properties) { + return new TxProof(properties); + }; + + /** + * Encodes the specified TxProof message. Does not implicitly {@link tendermint.types.TxProof.verify|verify} messages. + * @function encode + * @memberof tendermint.types.TxProof + * @static + * @param {tendermint.types.ITxProof} message TxProof message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TxProof.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rootHash != null && Object.hasOwnProperty.call(message, "rootHash")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.rootHash); + if (message.data != null && Object.hasOwnProperty.call(message, "data")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.data); + if (message.proof != null && Object.hasOwnProperty.call(message, "proof")) + $root.tendermint.crypto.Proof.encode(message.proof, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TxProof message, length delimited. Does not implicitly {@link tendermint.types.TxProof.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.types.TxProof + * @static + * @param {tendermint.types.ITxProof} message TxProof message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TxProof.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TxProof message from the specified reader or buffer. + * @function decode + * @memberof tendermint.types.TxProof + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.types.TxProof} TxProof + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TxProof.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.TxProof(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.rootHash = reader.bytes(); + break; + case 2: + message.data = reader.bytes(); + break; + case 3: + message.proof = $root.tendermint.crypto.Proof.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TxProof message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.types.TxProof + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.types.TxProof} TxProof + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TxProof.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TxProof message. + * @function verify + * @memberof tendermint.types.TxProof + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TxProof.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rootHash != null && message.hasOwnProperty("rootHash")) + if (!(message.rootHash && typeof message.rootHash.length === "number" || $util.isString(message.rootHash))) + return "rootHash: buffer expected"; + if (message.data != null && message.hasOwnProperty("data")) + if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) + return "data: buffer expected"; + if (message.proof != null && message.hasOwnProperty("proof")) { + var error = $root.tendermint.crypto.Proof.verify(message.proof); + if (error) + return "proof." + error; + } + return null; + }; + + /** + * Creates a TxProof message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.types.TxProof + * @static + * @param {Object.} object Plain object + * @returns {tendermint.types.TxProof} TxProof + */ + TxProof.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.types.TxProof) + return object; + var message = new $root.tendermint.types.TxProof(); + if (object.rootHash != null) + if (typeof object.rootHash === "string") + $util.base64.decode(object.rootHash, message.rootHash = $util.newBuffer($util.base64.length(object.rootHash)), 0); + else if (object.rootHash.length) + message.rootHash = object.rootHash; + if (object.data != null) + if (typeof object.data === "string") + $util.base64.decode(object.data, message.data = $util.newBuffer($util.base64.length(object.data)), 0); + else if (object.data.length) + message.data = object.data; + if (object.proof != null) { + if (typeof object.proof !== "object") + throw TypeError(".tendermint.types.TxProof.proof: object expected"); + message.proof = $root.tendermint.crypto.Proof.fromObject(object.proof); + } + return message; + }; + + /** + * Creates a plain object from a TxProof message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.types.TxProof + * @static + * @param {tendermint.types.TxProof} message TxProof + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TxProof.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.rootHash = ""; + else { + object.rootHash = []; + if (options.bytes !== Array) + object.rootHash = $util.newBuffer(object.rootHash); + } + if (options.bytes === String) + object.data = ""; + else { + object.data = []; + if (options.bytes !== Array) + object.data = $util.newBuffer(object.data); + } + object.proof = null; + } + if (message.rootHash != null && message.hasOwnProperty("rootHash")) + object.rootHash = options.bytes === String ? $util.base64.encode(message.rootHash, 0, message.rootHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.rootHash) : message.rootHash; + if (message.data != null && message.hasOwnProperty("data")) + object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; + if (message.proof != null && message.hasOwnProperty("proof")) + object.proof = $root.tendermint.crypto.Proof.toObject(message.proof, options); + return object; + }; + + /** + * Converts this TxProof to JSON. + * @function toJSON + * @memberof tendermint.types.TxProof + * @instance + * @returns {Object.} JSON object + */ + TxProof.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TxProof; + })(types.TxProof || {}); + + types.ValidatorSet = (function(ValidatorSet) { + + /** + * Properties of a ValidatorSet. + * @memberof tendermint.types + * @interface IValidatorSet + * @property {Array.|null} [validators] ValidatorSet validators + * @property {tendermint.types.IValidator|null} [proposer] ValidatorSet proposer + * @property {number|Long|null} [totalVotingPower] ValidatorSet totalVotingPower + */ + + /** + * Constructs a new ValidatorSet. + * @memberof tendermint.types + * @classdesc Represents a ValidatorSet. + * @implements IValidatorSet + * @constructor + * @param {tendermint.types.IValidatorSet=} [properties] Properties to set + */ + function ValidatorSet(properties) { + this.validators = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ValidatorSet validators. + * @member {Array.} validators + * @memberof tendermint.types.ValidatorSet + * @instance + */ + ValidatorSet.prototype.validators = $util.emptyArray; + + /** + * ValidatorSet proposer. + * @member {tendermint.types.IValidator|null|undefined} proposer + * @memberof tendermint.types.ValidatorSet + * @instance + */ + ValidatorSet.prototype.proposer = null; + + /** + * ValidatorSet totalVotingPower. + * @member {number|Long} totalVotingPower + * @memberof tendermint.types.ValidatorSet + * @instance + */ + ValidatorSet.prototype.totalVotingPower = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new ValidatorSet instance using the specified properties. + * @function create + * @memberof tendermint.types.ValidatorSet + * @static + * @param {tendermint.types.IValidatorSet=} [properties] Properties to set + * @returns {tendermint.types.ValidatorSet} ValidatorSet instance + */ + ValidatorSet.create = function create(properties) { + return new ValidatorSet(properties); + }; + + /** + * Encodes the specified ValidatorSet message. Does not implicitly {@link tendermint.types.ValidatorSet.verify|verify} messages. + * @function encode + * @memberof tendermint.types.ValidatorSet + * @static + * @param {tendermint.types.IValidatorSet} message ValidatorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValidatorSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.validators != null && message.validators.length) + for (var i = 0; i < message.validators.length; ++i) + $root.tendermint.types.Validator.encode(message.validators[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.proposer != null && Object.hasOwnProperty.call(message, "proposer")) + $root.tendermint.types.Validator.encode(message.proposer, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.totalVotingPower != null && Object.hasOwnProperty.call(message, "totalVotingPower")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.totalVotingPower); + return writer; + }; + + /** + * Encodes the specified ValidatorSet message, length delimited. Does not implicitly {@link tendermint.types.ValidatorSet.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.types.ValidatorSet + * @static + * @param {tendermint.types.IValidatorSet} message ValidatorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValidatorSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ValidatorSet message from the specified reader or buffer. + * @function decode + * @memberof tendermint.types.ValidatorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.types.ValidatorSet} ValidatorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValidatorSet.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.ValidatorSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.validators && message.validators.length)) + message.validators = []; + message.validators.push($root.tendermint.types.Validator.decode(reader, reader.uint32())); + break; + case 2: + message.proposer = $root.tendermint.types.Validator.decode(reader, reader.uint32()); + break; + case 3: + message.totalVotingPower = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ValidatorSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.types.ValidatorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.types.ValidatorSet} ValidatorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValidatorSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ValidatorSet message. + * @function verify + * @memberof tendermint.types.ValidatorSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ValidatorSet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.validators != null && message.hasOwnProperty("validators")) { + if (!Array.isArray(message.validators)) + return "validators: array expected"; + for (var i = 0; i < message.validators.length; ++i) { + var error = $root.tendermint.types.Validator.verify(message.validators[i]); + if (error) + return "validators." + error; + } + } + if (message.proposer != null && message.hasOwnProperty("proposer")) { + var error = $root.tendermint.types.Validator.verify(message.proposer); + if (error) + return "proposer." + error; + } + if (message.totalVotingPower != null && message.hasOwnProperty("totalVotingPower")) + if (!$util.isInteger(message.totalVotingPower) && !(message.totalVotingPower && $util.isInteger(message.totalVotingPower.low) && $util.isInteger(message.totalVotingPower.high))) + return "totalVotingPower: integer|Long expected"; + return null; + }; + + /** + * Creates a ValidatorSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.types.ValidatorSet + * @static + * @param {Object.} object Plain object + * @returns {tendermint.types.ValidatorSet} ValidatorSet + */ + ValidatorSet.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.types.ValidatorSet) + return object; + var message = new $root.tendermint.types.ValidatorSet(); + if (object.validators) { + if (!Array.isArray(object.validators)) + throw TypeError(".tendermint.types.ValidatorSet.validators: array expected"); + message.validators = []; + for (var i = 0; i < object.validators.length; ++i) { + if (typeof object.validators[i] !== "object") + throw TypeError(".tendermint.types.ValidatorSet.validators: object expected"); + message.validators[i] = $root.tendermint.types.Validator.fromObject(object.validators[i]); + } + } + if (object.proposer != null) { + if (typeof object.proposer !== "object") + throw TypeError(".tendermint.types.ValidatorSet.proposer: object expected"); + message.proposer = $root.tendermint.types.Validator.fromObject(object.proposer); + } + if (object.totalVotingPower != null) + if ($util.Long) + (message.totalVotingPower = $util.Long.fromValue(object.totalVotingPower)).unsigned = false; + else if (typeof object.totalVotingPower === "string") + message.totalVotingPower = parseInt(object.totalVotingPower, 10); + else if (typeof object.totalVotingPower === "number") + message.totalVotingPower = object.totalVotingPower; + else if (typeof object.totalVotingPower === "object") + message.totalVotingPower = new $util.LongBits(object.totalVotingPower.low >>> 0, object.totalVotingPower.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a ValidatorSet message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.types.ValidatorSet + * @static + * @param {tendermint.types.ValidatorSet} message ValidatorSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ValidatorSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.validators = []; + if (options.defaults) { + object.proposer = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.totalVotingPower = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.totalVotingPower = options.longs === String ? "0" : 0; + } + if (message.validators && message.validators.length) { + object.validators = []; + for (var j = 0; j < message.validators.length; ++j) + object.validators[j] = $root.tendermint.types.Validator.toObject(message.validators[j], options); + } + if (message.proposer != null && message.hasOwnProperty("proposer")) + object.proposer = $root.tendermint.types.Validator.toObject(message.proposer, options); + if (message.totalVotingPower != null && message.hasOwnProperty("totalVotingPower")) + if (typeof message.totalVotingPower === "number") + object.totalVotingPower = options.longs === String ? String(message.totalVotingPower) : message.totalVotingPower; + else + object.totalVotingPower = options.longs === String ? $util.Long.prototype.toString.call(message.totalVotingPower) : options.longs === Number ? new $util.LongBits(message.totalVotingPower.low >>> 0, message.totalVotingPower.high >>> 0).toNumber() : message.totalVotingPower; + return object; + }; + + /** + * Converts this ValidatorSet to JSON. + * @function toJSON + * @memberof tendermint.types.ValidatorSet + * @instance + * @returns {Object.} JSON object + */ + ValidatorSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ValidatorSet; + })(types.ValidatorSet || {}); + + types.Validator = (function(Validator) { + + /** + * Properties of a Validator. + * @memberof tendermint.types + * @interface IValidator + * @property {Uint8Array|null} [address] Validator address + * @property {tendermint.crypto.IPublicKey|null} [pubKey] Validator pubKey + * @property {number|Long|null} [votingPower] Validator votingPower + * @property {number|Long|null} [proposerPriority] Validator proposerPriority + */ + + /** + * Constructs a new Validator. + * @memberof tendermint.types + * @classdesc Represents a Validator. + * @implements IValidator + * @constructor + * @param {tendermint.types.IValidator=} [properties] Properties to set + */ + function Validator(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Validator address. + * @member {Uint8Array} address + * @memberof tendermint.types.Validator + * @instance + */ + Validator.prototype.address = $util.newBuffer([]); + + /** + * Validator pubKey. + * @member {tendermint.crypto.IPublicKey|null|undefined} pubKey + * @memberof tendermint.types.Validator + * @instance + */ + Validator.prototype.pubKey = null; + + /** + * Validator votingPower. + * @member {number|Long} votingPower + * @memberof tendermint.types.Validator + * @instance + */ + Validator.prototype.votingPower = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Validator proposerPriority. + * @member {number|Long} proposerPriority + * @memberof tendermint.types.Validator + * @instance + */ + Validator.prototype.proposerPriority = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new Validator instance using the specified properties. + * @function create + * @memberof tendermint.types.Validator + * @static + * @param {tendermint.types.IValidator=} [properties] Properties to set + * @returns {tendermint.types.Validator} Validator instance + */ + Validator.create = function create(properties) { + return new Validator(properties); + }; + + /** + * Encodes the specified Validator message. Does not implicitly {@link tendermint.types.Validator.verify|verify} messages. + * @function encode + * @memberof tendermint.types.Validator + * @static + * @param {tendermint.types.IValidator} message Validator message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Validator.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.address != null && Object.hasOwnProperty.call(message, "address")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.address); + if (message.pubKey != null && Object.hasOwnProperty.call(message, "pubKey")) + $root.tendermint.crypto.PublicKey.encode(message.pubKey, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.votingPower != null && Object.hasOwnProperty.call(message, "votingPower")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.votingPower); + if (message.proposerPriority != null && Object.hasOwnProperty.call(message, "proposerPriority")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.proposerPriority); + return writer; + }; + + /** + * Encodes the specified Validator message, length delimited. Does not implicitly {@link tendermint.types.Validator.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.types.Validator + * @static + * @param {tendermint.types.IValidator} message Validator message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Validator.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Validator message from the specified reader or buffer. + * @function decode + * @memberof tendermint.types.Validator + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.types.Validator} Validator + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Validator.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.Validator(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.address = reader.bytes(); + break; + case 2: + message.pubKey = $root.tendermint.crypto.PublicKey.decode(reader, reader.uint32()); + break; + case 3: + message.votingPower = reader.int64(); + break; + case 4: + message.proposerPriority = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Validator message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.types.Validator + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.types.Validator} Validator + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Validator.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Validator message. + * @function verify + * @memberof tendermint.types.Validator + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Validator.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.address != null && message.hasOwnProperty("address")) + if (!(message.address && typeof message.address.length === "number" || $util.isString(message.address))) + return "address: buffer expected"; + if (message.pubKey != null && message.hasOwnProperty("pubKey")) { + var error = $root.tendermint.crypto.PublicKey.verify(message.pubKey); + if (error) + return "pubKey." + error; + } + if (message.votingPower != null && message.hasOwnProperty("votingPower")) + if (!$util.isInteger(message.votingPower) && !(message.votingPower && $util.isInteger(message.votingPower.low) && $util.isInteger(message.votingPower.high))) + return "votingPower: integer|Long expected"; + if (message.proposerPriority != null && message.hasOwnProperty("proposerPriority")) + if (!$util.isInteger(message.proposerPriority) && !(message.proposerPriority && $util.isInteger(message.proposerPriority.low) && $util.isInteger(message.proposerPriority.high))) + return "proposerPriority: integer|Long expected"; + return null; + }; + + /** + * Creates a Validator message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.types.Validator + * @static + * @param {Object.} object Plain object + * @returns {tendermint.types.Validator} Validator + */ + Validator.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.types.Validator) + return object; + var message = new $root.tendermint.types.Validator(); + if (object.address != null) + if (typeof object.address === "string") + $util.base64.decode(object.address, message.address = $util.newBuffer($util.base64.length(object.address)), 0); + else if (object.address.length) + message.address = object.address; + if (object.pubKey != null) { + if (typeof object.pubKey !== "object") + throw TypeError(".tendermint.types.Validator.pubKey: object expected"); + message.pubKey = $root.tendermint.crypto.PublicKey.fromObject(object.pubKey); + } + if (object.votingPower != null) + if ($util.Long) + (message.votingPower = $util.Long.fromValue(object.votingPower)).unsigned = false; + else if (typeof object.votingPower === "string") + message.votingPower = parseInt(object.votingPower, 10); + else if (typeof object.votingPower === "number") + message.votingPower = object.votingPower; + else if (typeof object.votingPower === "object") + message.votingPower = new $util.LongBits(object.votingPower.low >>> 0, object.votingPower.high >>> 0).toNumber(); + if (object.proposerPriority != null) + if ($util.Long) + (message.proposerPriority = $util.Long.fromValue(object.proposerPriority)).unsigned = false; + else if (typeof object.proposerPriority === "string") + message.proposerPriority = parseInt(object.proposerPriority, 10); + else if (typeof object.proposerPriority === "number") + message.proposerPriority = object.proposerPriority; + else if (typeof object.proposerPriority === "object") + message.proposerPriority = new $util.LongBits(object.proposerPriority.low >>> 0, object.proposerPriority.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a Validator message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.types.Validator + * @static + * @param {tendermint.types.Validator} message Validator + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Validator.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.address = ""; + else { + object.address = []; + if (options.bytes !== Array) + object.address = $util.newBuffer(object.address); + } + object.pubKey = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.votingPower = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.votingPower = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.proposerPriority = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.proposerPriority = options.longs === String ? "0" : 0; + } + if (message.address != null && message.hasOwnProperty("address")) + object.address = options.bytes === String ? $util.base64.encode(message.address, 0, message.address.length) : options.bytes === Array ? Array.prototype.slice.call(message.address) : message.address; + if (message.pubKey != null && message.hasOwnProperty("pubKey")) + object.pubKey = $root.tendermint.crypto.PublicKey.toObject(message.pubKey, options); + if (message.votingPower != null && message.hasOwnProperty("votingPower")) + if (typeof message.votingPower === "number") + object.votingPower = options.longs === String ? String(message.votingPower) : message.votingPower; + else + object.votingPower = options.longs === String ? $util.Long.prototype.toString.call(message.votingPower) : options.longs === Number ? new $util.LongBits(message.votingPower.low >>> 0, message.votingPower.high >>> 0).toNumber() : message.votingPower; + if (message.proposerPriority != null && message.hasOwnProperty("proposerPriority")) + if (typeof message.proposerPriority === "number") + object.proposerPriority = options.longs === String ? String(message.proposerPriority) : message.proposerPriority; + else + object.proposerPriority = options.longs === String ? $util.Long.prototype.toString.call(message.proposerPriority) : options.longs === Number ? new $util.LongBits(message.proposerPriority.low >>> 0, message.proposerPriority.high >>> 0).toNumber() : message.proposerPriority; + return object; + }; + + /** + * Converts this Validator to JSON. + * @function toJSON + * @memberof tendermint.types.Validator + * @instance + * @returns {Object.} JSON object + */ + Validator.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Validator; + })(types.Validator || {}); + + types.SimpleValidator = (function(SimpleValidator) { + + /** + * Properties of a SimpleValidator. + * @memberof tendermint.types + * @interface ISimpleValidator + * @property {tendermint.crypto.IPublicKey|null} [pubKey] SimpleValidator pubKey + * @property {number|Long|null} [votingPower] SimpleValidator votingPower + */ + + /** + * Constructs a new SimpleValidator. + * @memberof tendermint.types + * @classdesc Represents a SimpleValidator. + * @implements ISimpleValidator + * @constructor + * @param {tendermint.types.ISimpleValidator=} [properties] Properties to set + */ + function SimpleValidator(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SimpleValidator pubKey. + * @member {tendermint.crypto.IPublicKey|null|undefined} pubKey + * @memberof tendermint.types.SimpleValidator + * @instance + */ + SimpleValidator.prototype.pubKey = null; + + /** + * SimpleValidator votingPower. + * @member {number|Long} votingPower + * @memberof tendermint.types.SimpleValidator + * @instance + */ + SimpleValidator.prototype.votingPower = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new SimpleValidator instance using the specified properties. + * @function create + * @memberof tendermint.types.SimpleValidator + * @static + * @param {tendermint.types.ISimpleValidator=} [properties] Properties to set + * @returns {tendermint.types.SimpleValidator} SimpleValidator instance + */ + SimpleValidator.create = function create(properties) { + return new SimpleValidator(properties); + }; + + /** + * Encodes the specified SimpleValidator message. Does not implicitly {@link tendermint.types.SimpleValidator.verify|verify} messages. + * @function encode + * @memberof tendermint.types.SimpleValidator + * @static + * @param {tendermint.types.ISimpleValidator} message SimpleValidator message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SimpleValidator.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pubKey != null && Object.hasOwnProperty.call(message, "pubKey")) + $root.tendermint.crypto.PublicKey.encode(message.pubKey, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.votingPower != null && Object.hasOwnProperty.call(message, "votingPower")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.votingPower); + return writer; + }; + + /** + * Encodes the specified SimpleValidator message, length delimited. Does not implicitly {@link tendermint.types.SimpleValidator.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.types.SimpleValidator + * @static + * @param {tendermint.types.ISimpleValidator} message SimpleValidator message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SimpleValidator.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SimpleValidator message from the specified reader or buffer. + * @function decode + * @memberof tendermint.types.SimpleValidator + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.types.SimpleValidator} SimpleValidator + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SimpleValidator.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.SimpleValidator(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.pubKey = $root.tendermint.crypto.PublicKey.decode(reader, reader.uint32()); + break; + case 2: + message.votingPower = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SimpleValidator message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.types.SimpleValidator + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.types.SimpleValidator} SimpleValidator + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SimpleValidator.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SimpleValidator message. + * @function verify + * @memberof tendermint.types.SimpleValidator + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SimpleValidator.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.pubKey != null && message.hasOwnProperty("pubKey")) { + var error = $root.tendermint.crypto.PublicKey.verify(message.pubKey); + if (error) + return "pubKey." + error; + } + if (message.votingPower != null && message.hasOwnProperty("votingPower")) + if (!$util.isInteger(message.votingPower) && !(message.votingPower && $util.isInteger(message.votingPower.low) && $util.isInteger(message.votingPower.high))) + return "votingPower: integer|Long expected"; + return null; + }; + + /** + * Creates a SimpleValidator message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.types.SimpleValidator + * @static + * @param {Object.} object Plain object + * @returns {tendermint.types.SimpleValidator} SimpleValidator + */ + SimpleValidator.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.types.SimpleValidator) + return object; + var message = new $root.tendermint.types.SimpleValidator(); + if (object.pubKey != null) { + if (typeof object.pubKey !== "object") + throw TypeError(".tendermint.types.SimpleValidator.pubKey: object expected"); + message.pubKey = $root.tendermint.crypto.PublicKey.fromObject(object.pubKey); + } + if (object.votingPower != null) + if ($util.Long) + (message.votingPower = $util.Long.fromValue(object.votingPower)).unsigned = false; + else if (typeof object.votingPower === "string") + message.votingPower = parseInt(object.votingPower, 10); + else if (typeof object.votingPower === "number") + message.votingPower = object.votingPower; + else if (typeof object.votingPower === "object") + message.votingPower = new $util.LongBits(object.votingPower.low >>> 0, object.votingPower.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a SimpleValidator message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.types.SimpleValidator + * @static + * @param {tendermint.types.SimpleValidator} message SimpleValidator + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SimpleValidator.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.pubKey = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.votingPower = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.votingPower = options.longs === String ? "0" : 0; + } + if (message.pubKey != null && message.hasOwnProperty("pubKey")) + object.pubKey = $root.tendermint.crypto.PublicKey.toObject(message.pubKey, options); + if (message.votingPower != null && message.hasOwnProperty("votingPower")) + if (typeof message.votingPower === "number") + object.votingPower = options.longs === String ? String(message.votingPower) : message.votingPower; + else + object.votingPower = options.longs === String ? $util.Long.prototype.toString.call(message.votingPower) : options.longs === Number ? new $util.LongBits(message.votingPower.low >>> 0, message.votingPower.high >>> 0).toNumber() : message.votingPower; + return object; + }; + + /** + * Converts this SimpleValidator to JSON. + * @function toJSON + * @memberof tendermint.types.SimpleValidator + * @instance + * @returns {Object.} JSON object + */ + SimpleValidator.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SimpleValidator; + })(types.SimpleValidator || {}); + + return types; + })(tendermint.types || {}); + + /** + * Namespace version. + * @memberof tendermint + * @namespace + */ + + tendermint.version = (function(version) { + + version.App = (function(App) { + + /** + * Properties of an App. + * @memberof tendermint.version + * @interface IApp + * @property {number|Long|null} [protocol] App protocol + * @property {string|null} [software] App software + */ + + /** + * Constructs a new App. + * @memberof tendermint.version + * @classdesc Represents an App. + * @implements IApp + * @constructor + * @param {tendermint.version.IApp=} [properties] Properties to set + */ + function App(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * App protocol. + * @member {number|Long} protocol + * @memberof tendermint.version.App + * @instance + */ + App.prototype.protocol = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * App software. + * @member {string} software + * @memberof tendermint.version.App + * @instance + */ + App.prototype.software = ""; + + /** + * Creates a new App instance using the specified properties. + * @function create + * @memberof tendermint.version.App + * @static + * @param {tendermint.version.IApp=} [properties] Properties to set + * @returns {tendermint.version.App} App instance + */ + App.create = function create(properties) { + return new App(properties); + }; + + /** + * Encodes the specified App message. Does not implicitly {@link tendermint.version.App.verify|verify} messages. + * @function encode + * @memberof tendermint.version.App + * @static + * @param {tendermint.version.IApp} message App message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + App.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.protocol != null && Object.hasOwnProperty.call(message, "protocol")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.protocol); + if (message.software != null && Object.hasOwnProperty.call(message, "software")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.software); + return writer; + }; + + /** + * Encodes the specified App message, length delimited. Does not implicitly {@link tendermint.version.App.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.version.App + * @static + * @param {tendermint.version.IApp} message App message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + App.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an App message from the specified reader or buffer. + * @function decode + * @memberof tendermint.version.App + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.version.App} App + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + App.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.version.App(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.protocol = reader.uint64(); + break; + case 2: + message.software = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an App message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.version.App + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.version.App} App + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + App.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an App message. + * @function verify + * @memberof tendermint.version.App + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + App.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.protocol != null && message.hasOwnProperty("protocol")) + if (!$util.isInteger(message.protocol) && !(message.protocol && $util.isInteger(message.protocol.low) && $util.isInteger(message.protocol.high))) + return "protocol: integer|Long expected"; + if (message.software != null && message.hasOwnProperty("software")) + if (!$util.isString(message.software)) + return "software: string expected"; + return null; + }; + + /** + * Creates an App message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.version.App + * @static + * @param {Object.} object Plain object + * @returns {tendermint.version.App} App + */ + App.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.version.App) + return object; + var message = new $root.tendermint.version.App(); + if (object.protocol != null) + if ($util.Long) + (message.protocol = $util.Long.fromValue(object.protocol)).unsigned = true; + else if (typeof object.protocol === "string") + message.protocol = parseInt(object.protocol, 10); + else if (typeof object.protocol === "number") + message.protocol = object.protocol; + else if (typeof object.protocol === "object") + message.protocol = new $util.LongBits(object.protocol.low >>> 0, object.protocol.high >>> 0).toNumber(true); + if (object.software != null) + message.software = String(object.software); + return message; + }; + + /** + * Creates a plain object from an App message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.version.App + * @static + * @param {tendermint.version.App} message App + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + App.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.protocol = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.protocol = options.longs === String ? "0" : 0; + object.software = ""; + } + if (message.protocol != null && message.hasOwnProperty("protocol")) + if (typeof message.protocol === "number") + object.protocol = options.longs === String ? String(message.protocol) : message.protocol; + else + object.protocol = options.longs === String ? $util.Long.prototype.toString.call(message.protocol) : options.longs === Number ? new $util.LongBits(message.protocol.low >>> 0, message.protocol.high >>> 0).toNumber(true) : message.protocol; + if (message.software != null && message.hasOwnProperty("software")) + object.software = message.software; + return object; + }; + + /** + * Converts this App to JSON. + * @function toJSON + * @memberof tendermint.version.App + * @instance + * @returns {Object.} JSON object + */ + App.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return App; + })(version.App || {}); + + version.Consensus = (function(Consensus) { + + /** + * Properties of a Consensus. + * @memberof tendermint.version + * @interface IConsensus + * @property {number|Long|null} [block] Consensus block + * @property {number|Long|null} [app] Consensus app + */ + + /** + * Constructs a new Consensus. + * @memberof tendermint.version + * @classdesc Represents a Consensus. + * @implements IConsensus + * @constructor + * @param {tendermint.version.IConsensus=} [properties] Properties to set + */ + function Consensus(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Consensus block. + * @member {number|Long} block + * @memberof tendermint.version.Consensus + * @instance + */ + Consensus.prototype.block = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Consensus app. + * @member {number|Long} app + * @memberof tendermint.version.Consensus + * @instance + */ + Consensus.prototype.app = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new Consensus instance using the specified properties. + * @function create + * @memberof tendermint.version.Consensus + * @static + * @param {tendermint.version.IConsensus=} [properties] Properties to set + * @returns {tendermint.version.Consensus} Consensus instance + */ + Consensus.create = function create(properties) { + return new Consensus(properties); + }; + + /** + * Encodes the specified Consensus message. Does not implicitly {@link tendermint.version.Consensus.verify|verify} messages. + * @function encode + * @memberof tendermint.version.Consensus + * @static + * @param {tendermint.version.IConsensus} message Consensus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Consensus.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.block != null && Object.hasOwnProperty.call(message, "block")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.block); + if (message.app != null && Object.hasOwnProperty.call(message, "app")) + writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.app); + return writer; + }; + + /** + * Encodes the specified Consensus message, length delimited. Does not implicitly {@link tendermint.version.Consensus.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.version.Consensus + * @static + * @param {tendermint.version.IConsensus} message Consensus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Consensus.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Consensus message from the specified reader or buffer. + * @function decode + * @memberof tendermint.version.Consensus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.version.Consensus} Consensus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Consensus.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.version.Consensus(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.block = reader.uint64(); + break; + case 2: + message.app = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Consensus message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.version.Consensus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.version.Consensus} Consensus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Consensus.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Consensus message. + * @function verify + * @memberof tendermint.version.Consensus + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Consensus.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.block != null && message.hasOwnProperty("block")) + if (!$util.isInteger(message.block) && !(message.block && $util.isInteger(message.block.low) && $util.isInteger(message.block.high))) + return "block: integer|Long expected"; + if (message.app != null && message.hasOwnProperty("app")) + if (!$util.isInteger(message.app) && !(message.app && $util.isInteger(message.app.low) && $util.isInteger(message.app.high))) + return "app: integer|Long expected"; + return null; + }; + + /** + * Creates a Consensus message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.version.Consensus + * @static + * @param {Object.} object Plain object + * @returns {tendermint.version.Consensus} Consensus + */ + Consensus.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.version.Consensus) + return object; + var message = new $root.tendermint.version.Consensus(); + if (object.block != null) + if ($util.Long) + (message.block = $util.Long.fromValue(object.block)).unsigned = true; + else if (typeof object.block === "string") + message.block = parseInt(object.block, 10); + else if (typeof object.block === "number") + message.block = object.block; + else if (typeof object.block === "object") + message.block = new $util.LongBits(object.block.low >>> 0, object.block.high >>> 0).toNumber(true); + if (object.app != null) + if ($util.Long) + (message.app = $util.Long.fromValue(object.app)).unsigned = true; + else if (typeof object.app === "string") + message.app = parseInt(object.app, 10); + else if (typeof object.app === "number") + message.app = object.app; + else if (typeof object.app === "object") + message.app = new $util.LongBits(object.app.low >>> 0, object.app.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a Consensus message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.version.Consensus + * @static + * @param {tendermint.version.Consensus} message Consensus + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Consensus.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.block = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.block = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.app = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.app = options.longs === String ? "0" : 0; + } + if (message.block != null && message.hasOwnProperty("block")) + if (typeof message.block === "number") + object.block = options.longs === String ? String(message.block) : message.block; + else + object.block = options.longs === String ? $util.Long.prototype.toString.call(message.block) : options.longs === Number ? new $util.LongBits(message.block.low >>> 0, message.block.high >>> 0).toNumber(true) : message.block; + if (message.app != null && message.hasOwnProperty("app")) + if (typeof message.app === "number") + object.app = options.longs === String ? String(message.app) : message.app; + else + object.app = options.longs === String ? $util.Long.prototype.toString.call(message.app) : options.longs === Number ? new $util.LongBits(message.app.low >>> 0, message.app.high >>> 0).toNumber(true) : message.app; + return object; + }; + + /** + * Converts this Consensus to JSON. + * @function toJSON + * @memberof tendermint.version.Consensus + * @instance + * @returns {Object.} JSON object + */ + Consensus.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Consensus; + })(version.Consensus || {}); + + return version; + })(tendermint.version || {}); + + return tendermint; +})($root.tendermint || {}); + +/** + * Namespace ibc. + * @exports ibc + * @namespace + */ + +$root.ibc = (function(ibc) { + + /** + * Namespace applications. + * @memberof ibc + * @namespace + */ + + ibc.applications = (function(applications) { + + /** + * Namespace transfer. + * @memberof ibc.applications + * @namespace + */ + + applications.transfer = (function(transfer) { + + /** + * Namespace v1. + * @memberof ibc.applications.transfer + * @namespace + */ + + transfer.v1 = (function(v1) { + + v1.Msg = (function(Msg) { + + /** + * Constructs a new Msg service. + * @memberof ibc.applications.transfer.v1 + * @classdesc Represents a Msg + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Msg(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Msg.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Msg; + + /** + * Creates new Msg service using the specified rpc implementation. + * @function create + * @memberof ibc.applications.transfer.v1.Msg + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Msg} RPC service. Useful where requests and/or responses are streamed. + */ + Msg.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link ibc.applications.transfer.v1.Msg#transfer}. + * @memberof ibc.applications.transfer.v1.Msg + * @typedef TransferCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {ibc.applications.transfer.v1.IMsgTransferResponse} [response] MsgTransferResponse + */ + + /** + * Calls Transfer. + * @function transfer + * @memberof ibc.applications.transfer.v1.Msg + * @instance + * @param {ibc.applications.transfer.v1.IMsgTransfer} request MsgTransfer message or plain object + * @param {ibc.applications.transfer.v1.Msg.TransferCallback} callback Node-style callback called with the error, if any, and MsgTransferResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Msg.prototype.transfer = function transfer(request, callback) { + return this.rpcCall(transfer, $root.ibc.applications.transfer.v1.MsgTransfer, $root.ibc.applications.transfer.v1.MsgTransferResponse, request, callback); + }, "name", { value: "Transfer" }); + + /** + * Calls Transfer. + * @function transfer + * @memberof ibc.applications.transfer.v1.Msg + * @instance + * @param {ibc.applications.transfer.v1.IMsgTransfer} request MsgTransfer message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Msg; + })(v1.Msg || {}); + + v1.MsgTransfer = (function(MsgTransfer) { + + /** + * Properties of a MsgTransfer. + * @memberof ibc.applications.transfer.v1 + * @interface IMsgTransfer + * @property {string|null} [sourcePort] MsgTransfer sourcePort + * @property {string|null} [sourceChannel] MsgTransfer sourceChannel + * @property {cosmos.base.v1beta1.ICoin|null} [token] MsgTransfer token + * @property {string|null} [sender] MsgTransfer sender + * @property {string|null} [receiver] MsgTransfer receiver + * @property {ibc.core.client.v1.IHeight|null} [timeoutHeight] MsgTransfer timeoutHeight + * @property {number|Long|null} [timeoutTimestamp] MsgTransfer timeoutTimestamp + */ + + /** + * Constructs a new MsgTransfer. + * @memberof ibc.applications.transfer.v1 + * @classdesc Represents a MsgTransfer. + * @implements IMsgTransfer + * @constructor + * @param {ibc.applications.transfer.v1.IMsgTransfer=} [properties] Properties to set + */ + function MsgTransfer(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgTransfer sourcePort. + * @member {string} sourcePort + * @memberof ibc.applications.transfer.v1.MsgTransfer + * @instance + */ + MsgTransfer.prototype.sourcePort = ""; + + /** + * MsgTransfer sourceChannel. + * @member {string} sourceChannel + * @memberof ibc.applications.transfer.v1.MsgTransfer + * @instance + */ + MsgTransfer.prototype.sourceChannel = ""; + + /** + * MsgTransfer token. + * @member {cosmos.base.v1beta1.ICoin|null|undefined} token + * @memberof ibc.applications.transfer.v1.MsgTransfer + * @instance + */ + MsgTransfer.prototype.token = null; + + /** + * MsgTransfer sender. + * @member {string} sender + * @memberof ibc.applications.transfer.v1.MsgTransfer + * @instance + */ + MsgTransfer.prototype.sender = ""; + + /** + * MsgTransfer receiver. + * @member {string} receiver + * @memberof ibc.applications.transfer.v1.MsgTransfer + * @instance + */ + MsgTransfer.prototype.receiver = ""; + + /** + * MsgTransfer timeoutHeight. + * @member {ibc.core.client.v1.IHeight|null|undefined} timeoutHeight + * @memberof ibc.applications.transfer.v1.MsgTransfer + * @instance + */ + MsgTransfer.prototype.timeoutHeight = null; + + /** + * MsgTransfer timeoutTimestamp. + * @member {number|Long} timeoutTimestamp + * @memberof ibc.applications.transfer.v1.MsgTransfer + * @instance + */ + MsgTransfer.prototype.timeoutTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new MsgTransfer instance using the specified properties. + * @function create + * @memberof ibc.applications.transfer.v1.MsgTransfer + * @static + * @param {ibc.applications.transfer.v1.IMsgTransfer=} [properties] Properties to set + * @returns {ibc.applications.transfer.v1.MsgTransfer} MsgTransfer instance + */ + MsgTransfer.create = function create(properties) { + return new MsgTransfer(properties); + }; + + /** + * Encodes the specified MsgTransfer message. Does not implicitly {@link ibc.applications.transfer.v1.MsgTransfer.verify|verify} messages. + * @function encode + * @memberof ibc.applications.transfer.v1.MsgTransfer + * @static + * @param {ibc.applications.transfer.v1.IMsgTransfer} message MsgTransfer message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgTransfer.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sourcePort != null && Object.hasOwnProperty.call(message, "sourcePort")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.sourcePort); + if (message.sourceChannel != null && Object.hasOwnProperty.call(message, "sourceChannel")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceChannel); + if (message.token != null && Object.hasOwnProperty.call(message, "token")) + $root.cosmos.base.v1beta1.Coin.encode(message.token, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.sender != null && Object.hasOwnProperty.call(message, "sender")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.sender); + if (message.receiver != null && Object.hasOwnProperty.call(message, "receiver")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.receiver); + if (message.timeoutHeight != null && Object.hasOwnProperty.call(message, "timeoutHeight")) + $root.ibc.core.client.v1.Height.encode(message.timeoutHeight, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.timeoutTimestamp != null && Object.hasOwnProperty.call(message, "timeoutTimestamp")) + writer.uint32(/* id 7, wireType 0 =*/56).uint64(message.timeoutTimestamp); + return writer; + }; + + /** + * Encodes the specified MsgTransfer message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.MsgTransfer.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.applications.transfer.v1.MsgTransfer + * @static + * @param {ibc.applications.transfer.v1.IMsgTransfer} message MsgTransfer message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgTransfer.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgTransfer message from the specified reader or buffer. + * @function decode + * @memberof ibc.applications.transfer.v1.MsgTransfer + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.applications.transfer.v1.MsgTransfer} MsgTransfer + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgTransfer.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.transfer.v1.MsgTransfer(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.sourcePort = reader.string(); + break; + case 2: + message.sourceChannel = reader.string(); + break; + case 3: + message.token = $root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32()); + break; + case 4: + message.sender = reader.string(); + break; + case 5: + message.receiver = reader.string(); + break; + case 6: + message.timeoutHeight = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); + break; + case 7: + message.timeoutTimestamp = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgTransfer message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.applications.transfer.v1.MsgTransfer + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.applications.transfer.v1.MsgTransfer} MsgTransfer + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgTransfer.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgTransfer message. + * @function verify + * @memberof ibc.applications.transfer.v1.MsgTransfer + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgTransfer.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sourcePort != null && message.hasOwnProperty("sourcePort")) + if (!$util.isString(message.sourcePort)) + return "sourcePort: string expected"; + if (message.sourceChannel != null && message.hasOwnProperty("sourceChannel")) + if (!$util.isString(message.sourceChannel)) + return "sourceChannel: string expected"; + if (message.token != null && message.hasOwnProperty("token")) { + var error = $root.cosmos.base.v1beta1.Coin.verify(message.token); + if (error) + return "token." + error; + } + if (message.sender != null && message.hasOwnProperty("sender")) + if (!$util.isString(message.sender)) + return "sender: string expected"; + if (message.receiver != null && message.hasOwnProperty("receiver")) + if (!$util.isString(message.receiver)) + return "receiver: string expected"; + if (message.timeoutHeight != null && message.hasOwnProperty("timeoutHeight")) { + var error = $root.ibc.core.client.v1.Height.verify(message.timeoutHeight); + if (error) + return "timeoutHeight." + error; + } + if (message.timeoutTimestamp != null && message.hasOwnProperty("timeoutTimestamp")) + if (!$util.isInteger(message.timeoutTimestamp) && !(message.timeoutTimestamp && $util.isInteger(message.timeoutTimestamp.low) && $util.isInteger(message.timeoutTimestamp.high))) + return "timeoutTimestamp: integer|Long expected"; + return null; + }; + + /** + * Creates a MsgTransfer message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.applications.transfer.v1.MsgTransfer + * @static + * @param {Object.} object Plain object + * @returns {ibc.applications.transfer.v1.MsgTransfer} MsgTransfer + */ + MsgTransfer.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.applications.transfer.v1.MsgTransfer) + return object; + var message = new $root.ibc.applications.transfer.v1.MsgTransfer(); + if (object.sourcePort != null) + message.sourcePort = String(object.sourcePort); + if (object.sourceChannel != null) + message.sourceChannel = String(object.sourceChannel); + if (object.token != null) { + if (typeof object.token !== "object") + throw TypeError(".ibc.applications.transfer.v1.MsgTransfer.token: object expected"); + message.token = $root.cosmos.base.v1beta1.Coin.fromObject(object.token); + } + if (object.sender != null) + message.sender = String(object.sender); + if (object.receiver != null) + message.receiver = String(object.receiver); + if (object.timeoutHeight != null) { + if (typeof object.timeoutHeight !== "object") + throw TypeError(".ibc.applications.transfer.v1.MsgTransfer.timeoutHeight: object expected"); + message.timeoutHeight = $root.ibc.core.client.v1.Height.fromObject(object.timeoutHeight); + } + if (object.timeoutTimestamp != null) + if ($util.Long) + (message.timeoutTimestamp = $util.Long.fromValue(object.timeoutTimestamp)).unsigned = true; + else if (typeof object.timeoutTimestamp === "string") + message.timeoutTimestamp = parseInt(object.timeoutTimestamp, 10); + else if (typeof object.timeoutTimestamp === "number") + message.timeoutTimestamp = object.timeoutTimestamp; + else if (typeof object.timeoutTimestamp === "object") + message.timeoutTimestamp = new $util.LongBits(object.timeoutTimestamp.low >>> 0, object.timeoutTimestamp.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a MsgTransfer message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.applications.transfer.v1.MsgTransfer + * @static + * @param {ibc.applications.transfer.v1.MsgTransfer} message MsgTransfer + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgTransfer.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.sourcePort = ""; + object.sourceChannel = ""; + object.token = null; + object.sender = ""; + object.receiver = ""; + object.timeoutHeight = null; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.timeoutTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.timeoutTimestamp = options.longs === String ? "0" : 0; + } + if (message.sourcePort != null && message.hasOwnProperty("sourcePort")) + object.sourcePort = message.sourcePort; + if (message.sourceChannel != null && message.hasOwnProperty("sourceChannel")) + object.sourceChannel = message.sourceChannel; + if (message.token != null && message.hasOwnProperty("token")) + object.token = $root.cosmos.base.v1beta1.Coin.toObject(message.token, options); + if (message.sender != null && message.hasOwnProperty("sender")) + object.sender = message.sender; + if (message.receiver != null && message.hasOwnProperty("receiver")) + object.receiver = message.receiver; + if (message.timeoutHeight != null && message.hasOwnProperty("timeoutHeight")) + object.timeoutHeight = $root.ibc.core.client.v1.Height.toObject(message.timeoutHeight, options); + if (message.timeoutTimestamp != null && message.hasOwnProperty("timeoutTimestamp")) + if (typeof message.timeoutTimestamp === "number") + object.timeoutTimestamp = options.longs === String ? String(message.timeoutTimestamp) : message.timeoutTimestamp; + else + object.timeoutTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.timeoutTimestamp) : options.longs === Number ? new $util.LongBits(message.timeoutTimestamp.low >>> 0, message.timeoutTimestamp.high >>> 0).toNumber(true) : message.timeoutTimestamp; + return object; + }; + + /** + * Converts this MsgTransfer to JSON. + * @function toJSON + * @memberof ibc.applications.transfer.v1.MsgTransfer + * @instance + * @returns {Object.} JSON object + */ + MsgTransfer.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgTransfer; + })(v1.MsgTransfer || {}); + + v1.MsgTransferResponse = (function(MsgTransferResponse) { + + /** + * Properties of a MsgTransferResponse. + * @memberof ibc.applications.transfer.v1 + * @interface IMsgTransferResponse + */ + + /** + * Constructs a new MsgTransferResponse. + * @memberof ibc.applications.transfer.v1 + * @classdesc Represents a MsgTransferResponse. + * @implements IMsgTransferResponse + * @constructor + * @param {ibc.applications.transfer.v1.IMsgTransferResponse=} [properties] Properties to set + */ + function MsgTransferResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new MsgTransferResponse instance using the specified properties. + * @function create + * @memberof ibc.applications.transfer.v1.MsgTransferResponse + * @static + * @param {ibc.applications.transfer.v1.IMsgTransferResponse=} [properties] Properties to set + * @returns {ibc.applications.transfer.v1.MsgTransferResponse} MsgTransferResponse instance + */ + MsgTransferResponse.create = function create(properties) { + return new MsgTransferResponse(properties); + }; + + /** + * Encodes the specified MsgTransferResponse message. Does not implicitly {@link ibc.applications.transfer.v1.MsgTransferResponse.verify|verify} messages. + * @function encode + * @memberof ibc.applications.transfer.v1.MsgTransferResponse + * @static + * @param {ibc.applications.transfer.v1.IMsgTransferResponse} message MsgTransferResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgTransferResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MsgTransferResponse message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.MsgTransferResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.applications.transfer.v1.MsgTransferResponse + * @static + * @param {ibc.applications.transfer.v1.IMsgTransferResponse} message MsgTransferResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgTransferResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgTransferResponse message from the specified reader or buffer. + * @function decode + * @memberof ibc.applications.transfer.v1.MsgTransferResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.applications.transfer.v1.MsgTransferResponse} MsgTransferResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgTransferResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.transfer.v1.MsgTransferResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgTransferResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.applications.transfer.v1.MsgTransferResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.applications.transfer.v1.MsgTransferResponse} MsgTransferResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgTransferResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgTransferResponse message. + * @function verify + * @memberof ibc.applications.transfer.v1.MsgTransferResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgTransferResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MsgTransferResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.applications.transfer.v1.MsgTransferResponse + * @static + * @param {Object.} object Plain object + * @returns {ibc.applications.transfer.v1.MsgTransferResponse} MsgTransferResponse + */ + MsgTransferResponse.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.applications.transfer.v1.MsgTransferResponse) + return object; + return new $root.ibc.applications.transfer.v1.MsgTransferResponse(); + }; + + /** + * Creates a plain object from a MsgTransferResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.applications.transfer.v1.MsgTransferResponse + * @static + * @param {ibc.applications.transfer.v1.MsgTransferResponse} message MsgTransferResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgTransferResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MsgTransferResponse to JSON. + * @function toJSON + * @memberof ibc.applications.transfer.v1.MsgTransferResponse + * @instance + * @returns {Object.} JSON object + */ + MsgTransferResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgTransferResponse; + })(v1.MsgTransferResponse || {}); + + return v1; + })(transfer.v1 || {}); + + return transfer; + })(applications.transfer || {}); + + return applications; + })(ibc.applications || {}); + + /** + * Namespace core. + * @memberof ibc + * @namespace + */ + + ibc.core = (function(core) { + + /** + * Namespace client. + * @memberof ibc.core + * @namespace + */ + + core.client = (function(client) { + + /** + * Namespace v1. + * @memberof ibc.core.client + * @namespace + */ + + client.v1 = (function(v1) { + + v1.IdentifiedClientState = (function(IdentifiedClientState) { + + /** + * Properties of an IdentifiedClientState. + * @memberof ibc.core.client.v1 + * @interface IIdentifiedClientState + * @property {string|null} [clientId] IdentifiedClientState clientId + * @property {google.protobuf.IAny|null} [clientState] IdentifiedClientState clientState + */ + + /** + * Constructs a new IdentifiedClientState. + * @memberof ibc.core.client.v1 + * @classdesc Represents an IdentifiedClientState. + * @implements IIdentifiedClientState + * @constructor + * @param {ibc.core.client.v1.IIdentifiedClientState=} [properties] Properties to set + */ + function IdentifiedClientState(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * IdentifiedClientState clientId. + * @member {string} clientId + * @memberof ibc.core.client.v1.IdentifiedClientState + * @instance + */ + IdentifiedClientState.prototype.clientId = ""; + + /** + * IdentifiedClientState clientState. + * @member {google.protobuf.IAny|null|undefined} clientState + * @memberof ibc.core.client.v1.IdentifiedClientState + * @instance + */ + IdentifiedClientState.prototype.clientState = null; + + /** + * Creates a new IdentifiedClientState instance using the specified properties. + * @function create + * @memberof ibc.core.client.v1.IdentifiedClientState + * @static + * @param {ibc.core.client.v1.IIdentifiedClientState=} [properties] Properties to set + * @returns {ibc.core.client.v1.IdentifiedClientState} IdentifiedClientState instance + */ + IdentifiedClientState.create = function create(properties) { + return new IdentifiedClientState(properties); + }; + + /** + * Encodes the specified IdentifiedClientState message. Does not implicitly {@link ibc.core.client.v1.IdentifiedClientState.verify|verify} messages. + * @function encode + * @memberof ibc.core.client.v1.IdentifiedClientState + * @static + * @param {ibc.core.client.v1.IIdentifiedClientState} message IdentifiedClientState message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IdentifiedClientState.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.clientId != null && Object.hasOwnProperty.call(message, "clientId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.clientId); + if (message.clientState != null && Object.hasOwnProperty.call(message, "clientState")) + $root.google.protobuf.Any.encode(message.clientState, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified IdentifiedClientState message, length delimited. Does not implicitly {@link ibc.core.client.v1.IdentifiedClientState.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.client.v1.IdentifiedClientState + * @static + * @param {ibc.core.client.v1.IIdentifiedClientState} message IdentifiedClientState message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IdentifiedClientState.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IdentifiedClientState message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.client.v1.IdentifiedClientState + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.client.v1.IdentifiedClientState} IdentifiedClientState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IdentifiedClientState.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.IdentifiedClientState(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.clientId = reader.string(); + break; + case 2: + message.clientState = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IdentifiedClientState message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.client.v1.IdentifiedClientState + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.client.v1.IdentifiedClientState} IdentifiedClientState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IdentifiedClientState.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IdentifiedClientState message. + * @function verify + * @memberof ibc.core.client.v1.IdentifiedClientState + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IdentifiedClientState.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.clientId != null && message.hasOwnProperty("clientId")) + if (!$util.isString(message.clientId)) + return "clientId: string expected"; + if (message.clientState != null && message.hasOwnProperty("clientState")) { + var error = $root.google.protobuf.Any.verify(message.clientState); + if (error) + return "clientState." + error; + } + return null; + }; + + /** + * Creates an IdentifiedClientState message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.client.v1.IdentifiedClientState + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.client.v1.IdentifiedClientState} IdentifiedClientState + */ + IdentifiedClientState.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.client.v1.IdentifiedClientState) + return object; + var message = new $root.ibc.core.client.v1.IdentifiedClientState(); + if (object.clientId != null) + message.clientId = String(object.clientId); + if (object.clientState != null) { + if (typeof object.clientState !== "object") + throw TypeError(".ibc.core.client.v1.IdentifiedClientState.clientState: object expected"); + message.clientState = $root.google.protobuf.Any.fromObject(object.clientState); + } + return message; + }; + + /** + * Creates a plain object from an IdentifiedClientState message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.client.v1.IdentifiedClientState + * @static + * @param {ibc.core.client.v1.IdentifiedClientState} message IdentifiedClientState + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IdentifiedClientState.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.clientId = ""; + object.clientState = null; + } + if (message.clientId != null && message.hasOwnProperty("clientId")) + object.clientId = message.clientId; + if (message.clientState != null && message.hasOwnProperty("clientState")) + object.clientState = $root.google.protobuf.Any.toObject(message.clientState, options); + return object; + }; + + /** + * Converts this IdentifiedClientState to JSON. + * @function toJSON + * @memberof ibc.core.client.v1.IdentifiedClientState + * @instance + * @returns {Object.} JSON object + */ + IdentifiedClientState.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return IdentifiedClientState; + })(v1.IdentifiedClientState || {}); + + v1.ConsensusStateWithHeight = (function(ConsensusStateWithHeight) { + + /** + * Properties of a ConsensusStateWithHeight. + * @memberof ibc.core.client.v1 + * @interface IConsensusStateWithHeight + * @property {ibc.core.client.v1.IHeight|null} [height] ConsensusStateWithHeight height + * @property {google.protobuf.IAny|null} [consensusState] ConsensusStateWithHeight consensusState + */ + + /** + * Constructs a new ConsensusStateWithHeight. + * @memberof ibc.core.client.v1 + * @classdesc Represents a ConsensusStateWithHeight. + * @implements IConsensusStateWithHeight + * @constructor + * @param {ibc.core.client.v1.IConsensusStateWithHeight=} [properties] Properties to set + */ + function ConsensusStateWithHeight(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ConsensusStateWithHeight height. + * @member {ibc.core.client.v1.IHeight|null|undefined} height + * @memberof ibc.core.client.v1.ConsensusStateWithHeight + * @instance + */ + ConsensusStateWithHeight.prototype.height = null; + + /** + * ConsensusStateWithHeight consensusState. + * @member {google.protobuf.IAny|null|undefined} consensusState + * @memberof ibc.core.client.v1.ConsensusStateWithHeight + * @instance + */ + ConsensusStateWithHeight.prototype.consensusState = null; + + /** + * Creates a new ConsensusStateWithHeight instance using the specified properties. + * @function create + * @memberof ibc.core.client.v1.ConsensusStateWithHeight + * @static + * @param {ibc.core.client.v1.IConsensusStateWithHeight=} [properties] Properties to set + * @returns {ibc.core.client.v1.ConsensusStateWithHeight} ConsensusStateWithHeight instance + */ + ConsensusStateWithHeight.create = function create(properties) { + return new ConsensusStateWithHeight(properties); + }; + + /** + * Encodes the specified ConsensusStateWithHeight message. Does not implicitly {@link ibc.core.client.v1.ConsensusStateWithHeight.verify|verify} messages. + * @function encode + * @memberof ibc.core.client.v1.ConsensusStateWithHeight + * @static + * @param {ibc.core.client.v1.IConsensusStateWithHeight} message ConsensusStateWithHeight message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConsensusStateWithHeight.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.height != null && Object.hasOwnProperty.call(message, "height")) + $root.ibc.core.client.v1.Height.encode(message.height, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.consensusState != null && Object.hasOwnProperty.call(message, "consensusState")) + $root.google.protobuf.Any.encode(message.consensusState, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ConsensusStateWithHeight message, length delimited. Does not implicitly {@link ibc.core.client.v1.ConsensusStateWithHeight.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.client.v1.ConsensusStateWithHeight + * @static + * @param {ibc.core.client.v1.IConsensusStateWithHeight} message ConsensusStateWithHeight message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConsensusStateWithHeight.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConsensusStateWithHeight message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.client.v1.ConsensusStateWithHeight + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.client.v1.ConsensusStateWithHeight} ConsensusStateWithHeight + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConsensusStateWithHeight.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.ConsensusStateWithHeight(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); + break; + case 2: + message.consensusState = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ConsensusStateWithHeight message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.client.v1.ConsensusStateWithHeight + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.client.v1.ConsensusStateWithHeight} ConsensusStateWithHeight + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConsensusStateWithHeight.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConsensusStateWithHeight message. + * @function verify + * @memberof ibc.core.client.v1.ConsensusStateWithHeight + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConsensusStateWithHeight.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.height != null && message.hasOwnProperty("height")) { + var error = $root.ibc.core.client.v1.Height.verify(message.height); + if (error) + return "height." + error; + } + if (message.consensusState != null && message.hasOwnProperty("consensusState")) { + var error = $root.google.protobuf.Any.verify(message.consensusState); + if (error) + return "consensusState." + error; + } + return null; + }; + + /** + * Creates a ConsensusStateWithHeight message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.client.v1.ConsensusStateWithHeight + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.client.v1.ConsensusStateWithHeight} ConsensusStateWithHeight + */ + ConsensusStateWithHeight.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.client.v1.ConsensusStateWithHeight) + return object; + var message = new $root.ibc.core.client.v1.ConsensusStateWithHeight(); + if (object.height != null) { + if (typeof object.height !== "object") + throw TypeError(".ibc.core.client.v1.ConsensusStateWithHeight.height: object expected"); + message.height = $root.ibc.core.client.v1.Height.fromObject(object.height); + } + if (object.consensusState != null) { + if (typeof object.consensusState !== "object") + throw TypeError(".ibc.core.client.v1.ConsensusStateWithHeight.consensusState: object expected"); + message.consensusState = $root.google.protobuf.Any.fromObject(object.consensusState); + } + return message; + }; + + /** + * Creates a plain object from a ConsensusStateWithHeight message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.client.v1.ConsensusStateWithHeight + * @static + * @param {ibc.core.client.v1.ConsensusStateWithHeight} message ConsensusStateWithHeight + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConsensusStateWithHeight.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.height = null; + object.consensusState = null; + } + if (message.height != null && message.hasOwnProperty("height")) + object.height = $root.ibc.core.client.v1.Height.toObject(message.height, options); + if (message.consensusState != null && message.hasOwnProperty("consensusState")) + object.consensusState = $root.google.protobuf.Any.toObject(message.consensusState, options); + return object; + }; + + /** + * Converts this ConsensusStateWithHeight to JSON. + * @function toJSON + * @memberof ibc.core.client.v1.ConsensusStateWithHeight + * @instance + * @returns {Object.} JSON object + */ + ConsensusStateWithHeight.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ConsensusStateWithHeight; + })(v1.ConsensusStateWithHeight || {}); + + v1.ClientConsensusStates = (function(ClientConsensusStates) { + + /** + * Properties of a ClientConsensusStates. + * @memberof ibc.core.client.v1 + * @interface IClientConsensusStates + * @property {string|null} [clientId] ClientConsensusStates clientId + * @property {Array.|null} [consensusStates] ClientConsensusStates consensusStates + */ + + /** + * Constructs a new ClientConsensusStates. + * @memberof ibc.core.client.v1 + * @classdesc Represents a ClientConsensusStates. + * @implements IClientConsensusStates + * @constructor + * @param {ibc.core.client.v1.IClientConsensusStates=} [properties] Properties to set + */ + function ClientConsensusStates(properties) { + this.consensusStates = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ClientConsensusStates clientId. + * @member {string} clientId + * @memberof ibc.core.client.v1.ClientConsensusStates + * @instance + */ + ClientConsensusStates.prototype.clientId = ""; + + /** + * ClientConsensusStates consensusStates. + * @member {Array.} consensusStates + * @memberof ibc.core.client.v1.ClientConsensusStates + * @instance + */ + ClientConsensusStates.prototype.consensusStates = $util.emptyArray; + + /** + * Creates a new ClientConsensusStates instance using the specified properties. + * @function create + * @memberof ibc.core.client.v1.ClientConsensusStates + * @static + * @param {ibc.core.client.v1.IClientConsensusStates=} [properties] Properties to set + * @returns {ibc.core.client.v1.ClientConsensusStates} ClientConsensusStates instance + */ + ClientConsensusStates.create = function create(properties) { + return new ClientConsensusStates(properties); + }; + + /** + * Encodes the specified ClientConsensusStates message. Does not implicitly {@link ibc.core.client.v1.ClientConsensusStates.verify|verify} messages. + * @function encode + * @memberof ibc.core.client.v1.ClientConsensusStates + * @static + * @param {ibc.core.client.v1.IClientConsensusStates} message ClientConsensusStates message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientConsensusStates.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.clientId != null && Object.hasOwnProperty.call(message, "clientId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.clientId); + if (message.consensusStates != null && message.consensusStates.length) + for (var i = 0; i < message.consensusStates.length; ++i) + $root.ibc.core.client.v1.ConsensusStateWithHeight.encode(message.consensusStates[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ClientConsensusStates message, length delimited. Does not implicitly {@link ibc.core.client.v1.ClientConsensusStates.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.client.v1.ClientConsensusStates + * @static + * @param {ibc.core.client.v1.IClientConsensusStates} message ClientConsensusStates message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientConsensusStates.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ClientConsensusStates message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.client.v1.ClientConsensusStates + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.client.v1.ClientConsensusStates} ClientConsensusStates + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientConsensusStates.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.ClientConsensusStates(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.clientId = reader.string(); + break; + case 2: + if (!(message.consensusStates && message.consensusStates.length)) + message.consensusStates = []; + message.consensusStates.push($root.ibc.core.client.v1.ConsensusStateWithHeight.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ClientConsensusStates message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.client.v1.ClientConsensusStates + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.client.v1.ClientConsensusStates} ClientConsensusStates + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientConsensusStates.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ClientConsensusStates message. + * @function verify + * @memberof ibc.core.client.v1.ClientConsensusStates + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ClientConsensusStates.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.clientId != null && message.hasOwnProperty("clientId")) + if (!$util.isString(message.clientId)) + return "clientId: string expected"; + if (message.consensusStates != null && message.hasOwnProperty("consensusStates")) { + if (!Array.isArray(message.consensusStates)) + return "consensusStates: array expected"; + for (var i = 0; i < message.consensusStates.length; ++i) { + var error = $root.ibc.core.client.v1.ConsensusStateWithHeight.verify(message.consensusStates[i]); + if (error) + return "consensusStates." + error; + } + } + return null; + }; + + /** + * Creates a ClientConsensusStates message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.client.v1.ClientConsensusStates + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.client.v1.ClientConsensusStates} ClientConsensusStates + */ + ClientConsensusStates.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.client.v1.ClientConsensusStates) + return object; + var message = new $root.ibc.core.client.v1.ClientConsensusStates(); + if (object.clientId != null) + message.clientId = String(object.clientId); + if (object.consensusStates) { + if (!Array.isArray(object.consensusStates)) + throw TypeError(".ibc.core.client.v1.ClientConsensusStates.consensusStates: array expected"); + message.consensusStates = []; + for (var i = 0; i < object.consensusStates.length; ++i) { + if (typeof object.consensusStates[i] !== "object") + throw TypeError(".ibc.core.client.v1.ClientConsensusStates.consensusStates: object expected"); + message.consensusStates[i] = $root.ibc.core.client.v1.ConsensusStateWithHeight.fromObject(object.consensusStates[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ClientConsensusStates message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.client.v1.ClientConsensusStates + * @static + * @param {ibc.core.client.v1.ClientConsensusStates} message ClientConsensusStates + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ClientConsensusStates.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.consensusStates = []; + if (options.defaults) + object.clientId = ""; + if (message.clientId != null && message.hasOwnProperty("clientId")) + object.clientId = message.clientId; + if (message.consensusStates && message.consensusStates.length) { + object.consensusStates = []; + for (var j = 0; j < message.consensusStates.length; ++j) + object.consensusStates[j] = $root.ibc.core.client.v1.ConsensusStateWithHeight.toObject(message.consensusStates[j], options); + } + return object; + }; + + /** + * Converts this ClientConsensusStates to JSON. + * @function toJSON + * @memberof ibc.core.client.v1.ClientConsensusStates + * @instance + * @returns {Object.} JSON object + */ + ClientConsensusStates.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ClientConsensusStates; + })(v1.ClientConsensusStates || {}); + + v1.ClientUpdateProposal = (function(ClientUpdateProposal) { + + /** + * Properties of a ClientUpdateProposal. + * @memberof ibc.core.client.v1 + * @interface IClientUpdateProposal + * @property {string|null} [title] ClientUpdateProposal title + * @property {string|null} [description] ClientUpdateProposal description + * @property {string|null} [clientId] ClientUpdateProposal clientId + * @property {google.protobuf.IAny|null} [header] ClientUpdateProposal header + */ + + /** + * Constructs a new ClientUpdateProposal. + * @memberof ibc.core.client.v1 + * @classdesc Represents a ClientUpdateProposal. + * @implements IClientUpdateProposal + * @constructor + * @param {ibc.core.client.v1.IClientUpdateProposal=} [properties] Properties to set + */ + function ClientUpdateProposal(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ClientUpdateProposal title. + * @member {string} title + * @memberof ibc.core.client.v1.ClientUpdateProposal + * @instance + */ + ClientUpdateProposal.prototype.title = ""; + + /** + * ClientUpdateProposal description. + * @member {string} description + * @memberof ibc.core.client.v1.ClientUpdateProposal + * @instance + */ + ClientUpdateProposal.prototype.description = ""; + + /** + * ClientUpdateProposal clientId. + * @member {string} clientId + * @memberof ibc.core.client.v1.ClientUpdateProposal + * @instance + */ + ClientUpdateProposal.prototype.clientId = ""; + + /** + * ClientUpdateProposal header. + * @member {google.protobuf.IAny|null|undefined} header + * @memberof ibc.core.client.v1.ClientUpdateProposal + * @instance + */ + ClientUpdateProposal.prototype.header = null; + + /** + * Creates a new ClientUpdateProposal instance using the specified properties. + * @function create + * @memberof ibc.core.client.v1.ClientUpdateProposal + * @static + * @param {ibc.core.client.v1.IClientUpdateProposal=} [properties] Properties to set + * @returns {ibc.core.client.v1.ClientUpdateProposal} ClientUpdateProposal instance + */ + ClientUpdateProposal.create = function create(properties) { + return new ClientUpdateProposal(properties); + }; + + /** + * Encodes the specified ClientUpdateProposal message. Does not implicitly {@link ibc.core.client.v1.ClientUpdateProposal.verify|verify} messages. + * @function encode + * @memberof ibc.core.client.v1.ClientUpdateProposal + * @static + * @param {ibc.core.client.v1.IClientUpdateProposal} message ClientUpdateProposal message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientUpdateProposal.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.title != null && Object.hasOwnProperty.call(message, "title")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.title); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.clientId != null && Object.hasOwnProperty.call(message, "clientId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.clientId); + if (message.header != null && Object.hasOwnProperty.call(message, "header")) + $root.google.protobuf.Any.encode(message.header, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ClientUpdateProposal message, length delimited. Does not implicitly {@link ibc.core.client.v1.ClientUpdateProposal.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.client.v1.ClientUpdateProposal + * @static + * @param {ibc.core.client.v1.IClientUpdateProposal} message ClientUpdateProposal message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientUpdateProposal.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ClientUpdateProposal message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.client.v1.ClientUpdateProposal + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.client.v1.ClientUpdateProposal} ClientUpdateProposal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientUpdateProposal.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.ClientUpdateProposal(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.title = reader.string(); + break; + case 2: + message.description = reader.string(); + break; + case 3: + message.clientId = reader.string(); + break; + case 4: + message.header = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ClientUpdateProposal message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.client.v1.ClientUpdateProposal + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.client.v1.ClientUpdateProposal} ClientUpdateProposal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientUpdateProposal.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ClientUpdateProposal message. + * @function verify + * @memberof ibc.core.client.v1.ClientUpdateProposal + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ClientUpdateProposal.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.title != null && message.hasOwnProperty("title")) + if (!$util.isString(message.title)) + return "title: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.clientId != null && message.hasOwnProperty("clientId")) + if (!$util.isString(message.clientId)) + return "clientId: string expected"; + if (message.header != null && message.hasOwnProperty("header")) { + var error = $root.google.protobuf.Any.verify(message.header); + if (error) + return "header." + error; + } + return null; + }; + + /** + * Creates a ClientUpdateProposal message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.client.v1.ClientUpdateProposal + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.client.v1.ClientUpdateProposal} ClientUpdateProposal + */ + ClientUpdateProposal.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.client.v1.ClientUpdateProposal) + return object; + var message = new $root.ibc.core.client.v1.ClientUpdateProposal(); + if (object.title != null) + message.title = String(object.title); + if (object.description != null) + message.description = String(object.description); + if (object.clientId != null) + message.clientId = String(object.clientId); + if (object.header != null) { + if (typeof object.header !== "object") + throw TypeError(".ibc.core.client.v1.ClientUpdateProposal.header: object expected"); + message.header = $root.google.protobuf.Any.fromObject(object.header); + } + return message; + }; + + /** + * Creates a plain object from a ClientUpdateProposal message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.client.v1.ClientUpdateProposal + * @static + * @param {ibc.core.client.v1.ClientUpdateProposal} message ClientUpdateProposal + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ClientUpdateProposal.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.title = ""; + object.description = ""; + object.clientId = ""; + object.header = null; + } + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.clientId != null && message.hasOwnProperty("clientId")) + object.clientId = message.clientId; + if (message.header != null && message.hasOwnProperty("header")) + object.header = $root.google.protobuf.Any.toObject(message.header, options); + return object; + }; + + /** + * Converts this ClientUpdateProposal to JSON. + * @function toJSON + * @memberof ibc.core.client.v1.ClientUpdateProposal + * @instance + * @returns {Object.} JSON object + */ + ClientUpdateProposal.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ClientUpdateProposal; + })(v1.ClientUpdateProposal || {}); + + v1.Height = (function(Height) { + + /** + * Properties of an Height. + * @memberof ibc.core.client.v1 + * @interface IHeight + * @property {number|Long|null} [revisionNumber] Height revisionNumber + * @property {number|Long|null} [revisionHeight] Height revisionHeight + */ + + /** + * Constructs a new Height. + * @memberof ibc.core.client.v1 + * @classdesc Represents an Height. + * @implements IHeight + * @constructor + * @param {ibc.core.client.v1.IHeight=} [properties] Properties to set + */ + function Height(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Height revisionNumber. + * @member {number|Long} revisionNumber + * @memberof ibc.core.client.v1.Height + * @instance + */ + Height.prototype.revisionNumber = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Height revisionHeight. + * @member {number|Long} revisionHeight + * @memberof ibc.core.client.v1.Height + * @instance + */ + Height.prototype.revisionHeight = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new Height instance using the specified properties. + * @function create + * @memberof ibc.core.client.v1.Height + * @static + * @param {ibc.core.client.v1.IHeight=} [properties] Properties to set + * @returns {ibc.core.client.v1.Height} Height instance + */ + Height.create = function create(properties) { + return new Height(properties); + }; + + /** + * Encodes the specified Height message. Does not implicitly {@link ibc.core.client.v1.Height.verify|verify} messages. + * @function encode + * @memberof ibc.core.client.v1.Height + * @static + * @param {ibc.core.client.v1.IHeight} message Height message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Height.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.revisionNumber != null && Object.hasOwnProperty.call(message, "revisionNumber")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.revisionNumber); + if (message.revisionHeight != null && Object.hasOwnProperty.call(message, "revisionHeight")) + writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.revisionHeight); + return writer; + }; + + /** + * Encodes the specified Height message, length delimited. Does not implicitly {@link ibc.core.client.v1.Height.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.client.v1.Height + * @static + * @param {ibc.core.client.v1.IHeight} message Height message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Height.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Height message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.client.v1.Height + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.client.v1.Height} Height + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Height.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.Height(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.revisionNumber = reader.uint64(); + break; + case 2: + message.revisionHeight = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Height message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.client.v1.Height + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.client.v1.Height} Height + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Height.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Height message. + * @function verify + * @memberof ibc.core.client.v1.Height + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Height.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.revisionNumber != null && message.hasOwnProperty("revisionNumber")) + if (!$util.isInteger(message.revisionNumber) && !(message.revisionNumber && $util.isInteger(message.revisionNumber.low) && $util.isInteger(message.revisionNumber.high))) + return "revisionNumber: integer|Long expected"; + if (message.revisionHeight != null && message.hasOwnProperty("revisionHeight")) + if (!$util.isInteger(message.revisionHeight) && !(message.revisionHeight && $util.isInteger(message.revisionHeight.low) && $util.isInteger(message.revisionHeight.high))) + return "revisionHeight: integer|Long expected"; + return null; + }; + + /** + * Creates an Height message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.client.v1.Height + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.client.v1.Height} Height + */ + Height.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.client.v1.Height) + return object; + var message = new $root.ibc.core.client.v1.Height(); + if (object.revisionNumber != null) + if ($util.Long) + (message.revisionNumber = $util.Long.fromValue(object.revisionNumber)).unsigned = true; + else if (typeof object.revisionNumber === "string") + message.revisionNumber = parseInt(object.revisionNumber, 10); + else if (typeof object.revisionNumber === "number") + message.revisionNumber = object.revisionNumber; + else if (typeof object.revisionNumber === "object") + message.revisionNumber = new $util.LongBits(object.revisionNumber.low >>> 0, object.revisionNumber.high >>> 0).toNumber(true); + if (object.revisionHeight != null) + if ($util.Long) + (message.revisionHeight = $util.Long.fromValue(object.revisionHeight)).unsigned = true; + else if (typeof object.revisionHeight === "string") + message.revisionHeight = parseInt(object.revisionHeight, 10); + else if (typeof object.revisionHeight === "number") + message.revisionHeight = object.revisionHeight; + else if (typeof object.revisionHeight === "object") + message.revisionHeight = new $util.LongBits(object.revisionHeight.low >>> 0, object.revisionHeight.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from an Height message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.client.v1.Height + * @static + * @param {ibc.core.client.v1.Height} message Height + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Height.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.revisionNumber = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.revisionNumber = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.revisionHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.revisionHeight = options.longs === String ? "0" : 0; + } + if (message.revisionNumber != null && message.hasOwnProperty("revisionNumber")) + if (typeof message.revisionNumber === "number") + object.revisionNumber = options.longs === String ? String(message.revisionNumber) : message.revisionNumber; + else + object.revisionNumber = options.longs === String ? $util.Long.prototype.toString.call(message.revisionNumber) : options.longs === Number ? new $util.LongBits(message.revisionNumber.low >>> 0, message.revisionNumber.high >>> 0).toNumber(true) : message.revisionNumber; + if (message.revisionHeight != null && message.hasOwnProperty("revisionHeight")) + if (typeof message.revisionHeight === "number") + object.revisionHeight = options.longs === String ? String(message.revisionHeight) : message.revisionHeight; + else + object.revisionHeight = options.longs === String ? $util.Long.prototype.toString.call(message.revisionHeight) : options.longs === Number ? new $util.LongBits(message.revisionHeight.low >>> 0, message.revisionHeight.high >>> 0).toNumber(true) : message.revisionHeight; + return object; + }; + + /** + * Converts this Height to JSON. + * @function toJSON + * @memberof ibc.core.client.v1.Height + * @instance + * @returns {Object.} JSON object + */ + Height.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Height; + })(v1.Height || {}); + + v1.Params = (function(Params) { + + /** + * Properties of a Params. + * @memberof ibc.core.client.v1 + * @interface IParams + * @property {Array.|null} [allowedClients] Params allowedClients + */ + + /** + * Constructs a new Params. + * @memberof ibc.core.client.v1 + * @classdesc Represents a Params. + * @implements IParams + * @constructor + * @param {ibc.core.client.v1.IParams=} [properties] Properties to set + */ + function Params(properties) { + this.allowedClients = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Params allowedClients. + * @member {Array.} allowedClients + * @memberof ibc.core.client.v1.Params + * @instance + */ + Params.prototype.allowedClients = $util.emptyArray; + + /** + * Creates a new Params instance using the specified properties. + * @function create + * @memberof ibc.core.client.v1.Params + * @static + * @param {ibc.core.client.v1.IParams=} [properties] Properties to set + * @returns {ibc.core.client.v1.Params} Params instance + */ + Params.create = function create(properties) { + return new Params(properties); + }; + + /** + * Encodes the specified Params message. Does not implicitly {@link ibc.core.client.v1.Params.verify|verify} messages. + * @function encode + * @memberof ibc.core.client.v1.Params + * @static + * @param {ibc.core.client.v1.IParams} message Params message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Params.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.allowedClients != null && message.allowedClients.length) + for (var i = 0; i < message.allowedClients.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.allowedClients[i]); + return writer; + }; + + /** + * Encodes the specified Params message, length delimited. Does not implicitly {@link ibc.core.client.v1.Params.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.client.v1.Params + * @static + * @param {ibc.core.client.v1.IParams} message Params message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Params.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Params message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.client.v1.Params + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.client.v1.Params} Params + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Params.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.Params(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.allowedClients && message.allowedClients.length)) + message.allowedClients = []; + message.allowedClients.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Params message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.client.v1.Params + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.client.v1.Params} Params + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Params.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Params message. + * @function verify + * @memberof ibc.core.client.v1.Params + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Params.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.allowedClients != null && message.hasOwnProperty("allowedClients")) { + if (!Array.isArray(message.allowedClients)) + return "allowedClients: array expected"; + for (var i = 0; i < message.allowedClients.length; ++i) + if (!$util.isString(message.allowedClients[i])) + return "allowedClients: string[] expected"; + } + return null; + }; + + /** + * Creates a Params message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.client.v1.Params + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.client.v1.Params} Params + */ + Params.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.client.v1.Params) + return object; + var message = new $root.ibc.core.client.v1.Params(); + if (object.allowedClients) { + if (!Array.isArray(object.allowedClients)) + throw TypeError(".ibc.core.client.v1.Params.allowedClients: array expected"); + message.allowedClients = []; + for (var i = 0; i < object.allowedClients.length; ++i) + message.allowedClients[i] = String(object.allowedClients[i]); + } + return message; + }; + + /** + * Creates a plain object from a Params message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.client.v1.Params + * @static + * @param {ibc.core.client.v1.Params} message Params + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Params.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.allowedClients = []; + if (message.allowedClients && message.allowedClients.length) { + object.allowedClients = []; + for (var j = 0; j < message.allowedClients.length; ++j) + object.allowedClients[j] = message.allowedClients[j]; + } + return object; + }; + + /** + * Converts this Params to JSON. + * @function toJSON + * @memberof ibc.core.client.v1.Params + * @instance + * @returns {Object.} JSON object + */ + Params.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Params; + })(v1.Params || {}); + + v1.GenesisState = (function(GenesisState) { + + /** + * Properties of a GenesisState. + * @memberof ibc.core.client.v1 + * @interface IGenesisState + * @property {Array.|null} [clients] GenesisState clients + * @property {Array.|null} [clientsConsensus] GenesisState clientsConsensus + * @property {Array.|null} [clientsMetadata] GenesisState clientsMetadata + * @property {ibc.core.client.v1.IParams|null} [params] GenesisState params + * @property {boolean|null} [createLocalhost] GenesisState createLocalhost + * @property {number|Long|null} [nextClientSequence] GenesisState nextClientSequence + */ + + /** + * Constructs a new GenesisState. + * @memberof ibc.core.client.v1 + * @classdesc Represents a GenesisState. + * @implements IGenesisState + * @constructor + * @param {ibc.core.client.v1.IGenesisState=} [properties] Properties to set + */ + function GenesisState(properties) { + this.clients = []; + this.clientsConsensus = []; + this.clientsMetadata = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GenesisState clients. + * @member {Array.} clients + * @memberof ibc.core.client.v1.GenesisState + * @instance + */ + GenesisState.prototype.clients = $util.emptyArray; + + /** + * GenesisState clientsConsensus. + * @member {Array.} clientsConsensus + * @memberof ibc.core.client.v1.GenesisState + * @instance + */ + GenesisState.prototype.clientsConsensus = $util.emptyArray; + + /** + * GenesisState clientsMetadata. + * @member {Array.} clientsMetadata + * @memberof ibc.core.client.v1.GenesisState + * @instance + */ + GenesisState.prototype.clientsMetadata = $util.emptyArray; + + /** + * GenesisState params. + * @member {ibc.core.client.v1.IParams|null|undefined} params + * @memberof ibc.core.client.v1.GenesisState + * @instance + */ + GenesisState.prototype.params = null; + + /** + * GenesisState createLocalhost. + * @member {boolean} createLocalhost + * @memberof ibc.core.client.v1.GenesisState + * @instance + */ + GenesisState.prototype.createLocalhost = false; + + /** + * GenesisState nextClientSequence. + * @member {number|Long} nextClientSequence + * @memberof ibc.core.client.v1.GenesisState + * @instance + */ + GenesisState.prototype.nextClientSequence = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new GenesisState instance using the specified properties. + * @function create + * @memberof ibc.core.client.v1.GenesisState + * @static + * @param {ibc.core.client.v1.IGenesisState=} [properties] Properties to set + * @returns {ibc.core.client.v1.GenesisState} GenesisState instance + */ + GenesisState.create = function create(properties) { + return new GenesisState(properties); + }; + + /** + * Encodes the specified GenesisState message. Does not implicitly {@link ibc.core.client.v1.GenesisState.verify|verify} messages. + * @function encode + * @memberof ibc.core.client.v1.GenesisState + * @static + * @param {ibc.core.client.v1.IGenesisState} message GenesisState message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenesisState.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.clients != null && message.clients.length) + for (var i = 0; i < message.clients.length; ++i) + $root.ibc.core.client.v1.IdentifiedClientState.encode(message.clients[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.clientsConsensus != null && message.clientsConsensus.length) + for (var i = 0; i < message.clientsConsensus.length; ++i) + $root.ibc.core.client.v1.ClientConsensusStates.encode(message.clientsConsensus[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.clientsMetadata != null && message.clientsMetadata.length) + for (var i = 0; i < message.clientsMetadata.length; ++i) + $root.ibc.core.client.v1.IdentifiedGenesisMetadata.encode(message.clientsMetadata[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.params != null && Object.hasOwnProperty.call(message, "params")) + $root.ibc.core.client.v1.Params.encode(message.params, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.createLocalhost != null && Object.hasOwnProperty.call(message, "createLocalhost")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.createLocalhost); + if (message.nextClientSequence != null && Object.hasOwnProperty.call(message, "nextClientSequence")) + writer.uint32(/* id 6, wireType 0 =*/48).uint64(message.nextClientSequence); + return writer; + }; + + /** + * Encodes the specified GenesisState message, length delimited. Does not implicitly {@link ibc.core.client.v1.GenesisState.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.client.v1.GenesisState + * @static + * @param {ibc.core.client.v1.IGenesisState} message GenesisState message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenesisState.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GenesisState message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.client.v1.GenesisState + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.client.v1.GenesisState} GenesisState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenesisState.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.GenesisState(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.clients && message.clients.length)) + message.clients = []; + message.clients.push($root.ibc.core.client.v1.IdentifiedClientState.decode(reader, reader.uint32())); + break; + case 2: + if (!(message.clientsConsensus && message.clientsConsensus.length)) + message.clientsConsensus = []; + message.clientsConsensus.push($root.ibc.core.client.v1.ClientConsensusStates.decode(reader, reader.uint32())); + break; + case 3: + if (!(message.clientsMetadata && message.clientsMetadata.length)) + message.clientsMetadata = []; + message.clientsMetadata.push($root.ibc.core.client.v1.IdentifiedGenesisMetadata.decode(reader, reader.uint32())); + break; + case 4: + message.params = $root.ibc.core.client.v1.Params.decode(reader, reader.uint32()); + break; + case 5: + message.createLocalhost = reader.bool(); + break; + case 6: + message.nextClientSequence = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GenesisState message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.client.v1.GenesisState + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.client.v1.GenesisState} GenesisState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenesisState.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GenesisState message. + * @function verify + * @memberof ibc.core.client.v1.GenesisState + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GenesisState.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.clients != null && message.hasOwnProperty("clients")) { + if (!Array.isArray(message.clients)) + return "clients: array expected"; + for (var i = 0; i < message.clients.length; ++i) { + var error = $root.ibc.core.client.v1.IdentifiedClientState.verify(message.clients[i]); + if (error) + return "clients." + error; + } + } + if (message.clientsConsensus != null && message.hasOwnProperty("clientsConsensus")) { + if (!Array.isArray(message.clientsConsensus)) + return "clientsConsensus: array expected"; + for (var i = 0; i < message.clientsConsensus.length; ++i) { + var error = $root.ibc.core.client.v1.ClientConsensusStates.verify(message.clientsConsensus[i]); + if (error) + return "clientsConsensus." + error; + } + } + if (message.clientsMetadata != null && message.hasOwnProperty("clientsMetadata")) { + if (!Array.isArray(message.clientsMetadata)) + return "clientsMetadata: array expected"; + for (var i = 0; i < message.clientsMetadata.length; ++i) { + var error = $root.ibc.core.client.v1.IdentifiedGenesisMetadata.verify(message.clientsMetadata[i]); + if (error) + return "clientsMetadata." + error; + } + } + if (message.params != null && message.hasOwnProperty("params")) { + var error = $root.ibc.core.client.v1.Params.verify(message.params); + if (error) + return "params." + error; + } + if (message.createLocalhost != null && message.hasOwnProperty("createLocalhost")) + if (typeof message.createLocalhost !== "boolean") + return "createLocalhost: boolean expected"; + if (message.nextClientSequence != null && message.hasOwnProperty("nextClientSequence")) + if (!$util.isInteger(message.nextClientSequence) && !(message.nextClientSequence && $util.isInteger(message.nextClientSequence.low) && $util.isInteger(message.nextClientSequence.high))) + return "nextClientSequence: integer|Long expected"; + return null; + }; + + /** + * Creates a GenesisState message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.client.v1.GenesisState + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.client.v1.GenesisState} GenesisState + */ + GenesisState.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.client.v1.GenesisState) + return object; + var message = new $root.ibc.core.client.v1.GenesisState(); + if (object.clients) { + if (!Array.isArray(object.clients)) + throw TypeError(".ibc.core.client.v1.GenesisState.clients: array expected"); + message.clients = []; + for (var i = 0; i < object.clients.length; ++i) { + if (typeof object.clients[i] !== "object") + throw TypeError(".ibc.core.client.v1.GenesisState.clients: object expected"); + message.clients[i] = $root.ibc.core.client.v1.IdentifiedClientState.fromObject(object.clients[i]); + } + } + if (object.clientsConsensus) { + if (!Array.isArray(object.clientsConsensus)) + throw TypeError(".ibc.core.client.v1.GenesisState.clientsConsensus: array expected"); + message.clientsConsensus = []; + for (var i = 0; i < object.clientsConsensus.length; ++i) { + if (typeof object.clientsConsensus[i] !== "object") + throw TypeError(".ibc.core.client.v1.GenesisState.clientsConsensus: object expected"); + message.clientsConsensus[i] = $root.ibc.core.client.v1.ClientConsensusStates.fromObject(object.clientsConsensus[i]); + } + } + if (object.clientsMetadata) { + if (!Array.isArray(object.clientsMetadata)) + throw TypeError(".ibc.core.client.v1.GenesisState.clientsMetadata: array expected"); + message.clientsMetadata = []; + for (var i = 0; i < object.clientsMetadata.length; ++i) { + if (typeof object.clientsMetadata[i] !== "object") + throw TypeError(".ibc.core.client.v1.GenesisState.clientsMetadata: object expected"); + message.clientsMetadata[i] = $root.ibc.core.client.v1.IdentifiedGenesisMetadata.fromObject(object.clientsMetadata[i]); + } + } + if (object.params != null) { + if (typeof object.params !== "object") + throw TypeError(".ibc.core.client.v1.GenesisState.params: object expected"); + message.params = $root.ibc.core.client.v1.Params.fromObject(object.params); + } + if (object.createLocalhost != null) + message.createLocalhost = Boolean(object.createLocalhost); + if (object.nextClientSequence != null) + if ($util.Long) + (message.nextClientSequence = $util.Long.fromValue(object.nextClientSequence)).unsigned = true; + else if (typeof object.nextClientSequence === "string") + message.nextClientSequence = parseInt(object.nextClientSequence, 10); + else if (typeof object.nextClientSequence === "number") + message.nextClientSequence = object.nextClientSequence; + else if (typeof object.nextClientSequence === "object") + message.nextClientSequence = new $util.LongBits(object.nextClientSequence.low >>> 0, object.nextClientSequence.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a GenesisState message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.client.v1.GenesisState + * @static + * @param {ibc.core.client.v1.GenesisState} message GenesisState + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GenesisState.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.clients = []; + object.clientsConsensus = []; + object.clientsMetadata = []; + } + if (options.defaults) { + object.params = null; + object.createLocalhost = false; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.nextClientSequence = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.nextClientSequence = options.longs === String ? "0" : 0; + } + if (message.clients && message.clients.length) { + object.clients = []; + for (var j = 0; j < message.clients.length; ++j) + object.clients[j] = $root.ibc.core.client.v1.IdentifiedClientState.toObject(message.clients[j], options); + } + if (message.clientsConsensus && message.clientsConsensus.length) { + object.clientsConsensus = []; + for (var j = 0; j < message.clientsConsensus.length; ++j) + object.clientsConsensus[j] = $root.ibc.core.client.v1.ClientConsensusStates.toObject(message.clientsConsensus[j], options); + } + if (message.clientsMetadata && message.clientsMetadata.length) { + object.clientsMetadata = []; + for (var j = 0; j < message.clientsMetadata.length; ++j) + object.clientsMetadata[j] = $root.ibc.core.client.v1.IdentifiedGenesisMetadata.toObject(message.clientsMetadata[j], options); + } + if (message.params != null && message.hasOwnProperty("params")) + object.params = $root.ibc.core.client.v1.Params.toObject(message.params, options); + if (message.createLocalhost != null && message.hasOwnProperty("createLocalhost")) + object.createLocalhost = message.createLocalhost; + if (message.nextClientSequence != null && message.hasOwnProperty("nextClientSequence")) + if (typeof message.nextClientSequence === "number") + object.nextClientSequence = options.longs === String ? String(message.nextClientSequence) : message.nextClientSequence; + else + object.nextClientSequence = options.longs === String ? $util.Long.prototype.toString.call(message.nextClientSequence) : options.longs === Number ? new $util.LongBits(message.nextClientSequence.low >>> 0, message.nextClientSequence.high >>> 0).toNumber(true) : message.nextClientSequence; + return object; + }; + + /** + * Converts this GenesisState to JSON. + * @function toJSON + * @memberof ibc.core.client.v1.GenesisState + * @instance + * @returns {Object.} JSON object + */ + GenesisState.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GenesisState; + })(v1.GenesisState || {}); + + v1.GenesisMetadata = (function(GenesisMetadata) { + + /** + * Properties of a GenesisMetadata. + * @memberof ibc.core.client.v1 + * @interface IGenesisMetadata + * @property {Uint8Array|null} [key] GenesisMetadata key + * @property {Uint8Array|null} [value] GenesisMetadata value + */ + + /** + * Constructs a new GenesisMetadata. + * @memberof ibc.core.client.v1 + * @classdesc Represents a GenesisMetadata. + * @implements IGenesisMetadata + * @constructor + * @param {ibc.core.client.v1.IGenesisMetadata=} [properties] Properties to set + */ + function GenesisMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GenesisMetadata key. + * @member {Uint8Array} key + * @memberof ibc.core.client.v1.GenesisMetadata + * @instance + */ + GenesisMetadata.prototype.key = $util.newBuffer([]); + + /** + * GenesisMetadata value. + * @member {Uint8Array} value + * @memberof ibc.core.client.v1.GenesisMetadata + * @instance + */ + GenesisMetadata.prototype.value = $util.newBuffer([]); + + /** + * Creates a new GenesisMetadata instance using the specified properties. + * @function create + * @memberof ibc.core.client.v1.GenesisMetadata + * @static + * @param {ibc.core.client.v1.IGenesisMetadata=} [properties] Properties to set + * @returns {ibc.core.client.v1.GenesisMetadata} GenesisMetadata instance + */ + GenesisMetadata.create = function create(properties) { + return new GenesisMetadata(properties); + }; + + /** + * Encodes the specified GenesisMetadata message. Does not implicitly {@link ibc.core.client.v1.GenesisMetadata.verify|verify} messages. + * @function encode + * @memberof ibc.core.client.v1.GenesisMetadata + * @static + * @param {ibc.core.client.v1.IGenesisMetadata} message GenesisMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenesisMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.key); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); + return writer; + }; + + /** + * Encodes the specified GenesisMetadata message, length delimited. Does not implicitly {@link ibc.core.client.v1.GenesisMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.client.v1.GenesisMetadata + * @static + * @param {ibc.core.client.v1.IGenesisMetadata} message GenesisMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenesisMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GenesisMetadata message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.client.v1.GenesisMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.client.v1.GenesisMetadata} GenesisMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenesisMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.GenesisMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.key = reader.bytes(); + break; + case 2: + message.value = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GenesisMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.client.v1.GenesisMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.client.v1.GenesisMetadata} GenesisMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenesisMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GenesisMetadata message. + * @function verify + * @memberof ibc.core.client.v1.GenesisMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GenesisMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.key != null && message.hasOwnProperty("key")) + if (!(message.key && typeof message.key.length === "number" || $util.isString(message.key))) + return "key: buffer expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; + return null; + }; + + /** + * Creates a GenesisMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.client.v1.GenesisMetadata + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.client.v1.GenesisMetadata} GenesisMetadata + */ + GenesisMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.client.v1.GenesisMetadata) + return object; + var message = new $root.ibc.core.client.v1.GenesisMetadata(); + if (object.key != null) + if (typeof object.key === "string") + $util.base64.decode(object.key, message.key = $util.newBuffer($util.base64.length(object.key)), 0); + else if (object.key.length) + message.key = object.key; + if (object.value != null) + if (typeof object.value === "string") + $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); + else if (object.value.length) + message.value = object.value; + return message; + }; + + /** + * Creates a plain object from a GenesisMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.client.v1.GenesisMetadata + * @static + * @param {ibc.core.client.v1.GenesisMetadata} message GenesisMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GenesisMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.key = ""; + else { + object.key = []; + if (options.bytes !== Array) + object.key = $util.newBuffer(object.key); + } + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + } + if (message.key != null && message.hasOwnProperty("key")) + object.key = options.bytes === String ? $util.base64.encode(message.key, 0, message.key.length) : options.bytes === Array ? Array.prototype.slice.call(message.key) : message.key; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + return object; + }; + + /** + * Converts this GenesisMetadata to JSON. + * @function toJSON + * @memberof ibc.core.client.v1.GenesisMetadata + * @instance + * @returns {Object.} JSON object + */ + GenesisMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GenesisMetadata; + })(v1.GenesisMetadata || {}); + + v1.IdentifiedGenesisMetadata = (function(IdentifiedGenesisMetadata) { + + /** + * Properties of an IdentifiedGenesisMetadata. + * @memberof ibc.core.client.v1 + * @interface IIdentifiedGenesisMetadata + * @property {string|null} [clientId] IdentifiedGenesisMetadata clientId + * @property {Array.|null} [clientMetadata] IdentifiedGenesisMetadata clientMetadata + */ + + /** + * Constructs a new IdentifiedGenesisMetadata. + * @memberof ibc.core.client.v1 + * @classdesc Represents an IdentifiedGenesisMetadata. + * @implements IIdentifiedGenesisMetadata + * @constructor + * @param {ibc.core.client.v1.IIdentifiedGenesisMetadata=} [properties] Properties to set + */ + function IdentifiedGenesisMetadata(properties) { + this.clientMetadata = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * IdentifiedGenesisMetadata clientId. + * @member {string} clientId + * @memberof ibc.core.client.v1.IdentifiedGenesisMetadata + * @instance + */ + IdentifiedGenesisMetadata.prototype.clientId = ""; + + /** + * IdentifiedGenesisMetadata clientMetadata. + * @member {Array.} clientMetadata + * @memberof ibc.core.client.v1.IdentifiedGenesisMetadata + * @instance + */ + IdentifiedGenesisMetadata.prototype.clientMetadata = $util.emptyArray; + + /** + * Creates a new IdentifiedGenesisMetadata instance using the specified properties. + * @function create + * @memberof ibc.core.client.v1.IdentifiedGenesisMetadata + * @static + * @param {ibc.core.client.v1.IIdentifiedGenesisMetadata=} [properties] Properties to set + * @returns {ibc.core.client.v1.IdentifiedGenesisMetadata} IdentifiedGenesisMetadata instance + */ + IdentifiedGenesisMetadata.create = function create(properties) { + return new IdentifiedGenesisMetadata(properties); + }; + + /** + * Encodes the specified IdentifiedGenesisMetadata message. Does not implicitly {@link ibc.core.client.v1.IdentifiedGenesisMetadata.verify|verify} messages. + * @function encode + * @memberof ibc.core.client.v1.IdentifiedGenesisMetadata + * @static + * @param {ibc.core.client.v1.IIdentifiedGenesisMetadata} message IdentifiedGenesisMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IdentifiedGenesisMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.clientId != null && Object.hasOwnProperty.call(message, "clientId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.clientId); + if (message.clientMetadata != null && message.clientMetadata.length) + for (var i = 0; i < message.clientMetadata.length; ++i) + $root.ibc.core.client.v1.GenesisMetadata.encode(message.clientMetadata[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified IdentifiedGenesisMetadata message, length delimited. Does not implicitly {@link ibc.core.client.v1.IdentifiedGenesisMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.client.v1.IdentifiedGenesisMetadata + * @static + * @param {ibc.core.client.v1.IIdentifiedGenesisMetadata} message IdentifiedGenesisMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IdentifiedGenesisMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IdentifiedGenesisMetadata message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.client.v1.IdentifiedGenesisMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.client.v1.IdentifiedGenesisMetadata} IdentifiedGenesisMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IdentifiedGenesisMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.IdentifiedGenesisMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.clientId = reader.string(); + break; + case 2: + if (!(message.clientMetadata && message.clientMetadata.length)) + message.clientMetadata = []; + message.clientMetadata.push($root.ibc.core.client.v1.GenesisMetadata.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IdentifiedGenesisMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.client.v1.IdentifiedGenesisMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.client.v1.IdentifiedGenesisMetadata} IdentifiedGenesisMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IdentifiedGenesisMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IdentifiedGenesisMetadata message. + * @function verify + * @memberof ibc.core.client.v1.IdentifiedGenesisMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IdentifiedGenesisMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.clientId != null && message.hasOwnProperty("clientId")) + if (!$util.isString(message.clientId)) + return "clientId: string expected"; + if (message.clientMetadata != null && message.hasOwnProperty("clientMetadata")) { + if (!Array.isArray(message.clientMetadata)) + return "clientMetadata: array expected"; + for (var i = 0; i < message.clientMetadata.length; ++i) { + var error = $root.ibc.core.client.v1.GenesisMetadata.verify(message.clientMetadata[i]); + if (error) + return "clientMetadata." + error; + } + } + return null; + }; + + /** + * Creates an IdentifiedGenesisMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.client.v1.IdentifiedGenesisMetadata + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.client.v1.IdentifiedGenesisMetadata} IdentifiedGenesisMetadata + */ + IdentifiedGenesisMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.client.v1.IdentifiedGenesisMetadata) + return object; + var message = new $root.ibc.core.client.v1.IdentifiedGenesisMetadata(); + if (object.clientId != null) + message.clientId = String(object.clientId); + if (object.clientMetadata) { + if (!Array.isArray(object.clientMetadata)) + throw TypeError(".ibc.core.client.v1.IdentifiedGenesisMetadata.clientMetadata: array expected"); + message.clientMetadata = []; + for (var i = 0; i < object.clientMetadata.length; ++i) { + if (typeof object.clientMetadata[i] !== "object") + throw TypeError(".ibc.core.client.v1.IdentifiedGenesisMetadata.clientMetadata: object expected"); + message.clientMetadata[i] = $root.ibc.core.client.v1.GenesisMetadata.fromObject(object.clientMetadata[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an IdentifiedGenesisMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.client.v1.IdentifiedGenesisMetadata + * @static + * @param {ibc.core.client.v1.IdentifiedGenesisMetadata} message IdentifiedGenesisMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IdentifiedGenesisMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.clientMetadata = []; + if (options.defaults) + object.clientId = ""; + if (message.clientId != null && message.hasOwnProperty("clientId")) + object.clientId = message.clientId; + if (message.clientMetadata && message.clientMetadata.length) { + object.clientMetadata = []; + for (var j = 0; j < message.clientMetadata.length; ++j) + object.clientMetadata[j] = $root.ibc.core.client.v1.GenesisMetadata.toObject(message.clientMetadata[j], options); + } + return object; + }; + + /** + * Converts this IdentifiedGenesisMetadata to JSON. + * @function toJSON + * @memberof ibc.core.client.v1.IdentifiedGenesisMetadata + * @instance + * @returns {Object.} JSON object + */ + IdentifiedGenesisMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return IdentifiedGenesisMetadata; + })(v1.IdentifiedGenesisMetadata || {}); + + v1.Query = (function(Query) { + + /** + * Constructs a new Query service. + * @memberof ibc.core.client.v1 + * @classdesc Represents a Query + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Query(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Query.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Query; + + /** + * Creates new Query service using the specified rpc implementation. + * @function create + * @memberof ibc.core.client.v1.Query + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Query} RPC service. Useful where requests and/or responses are streamed. + */ + Query.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link ibc.core.client.v1.Query#clientState}. + * @memberof ibc.core.client.v1.Query + * @typedef ClientStateCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {ibc.core.client.v1.IQueryClientStateResponse} [response] QueryClientStateResponse + */ + + /** + * Calls ClientState. + * @function clientState + * @memberof ibc.core.client.v1.Query + * @instance + * @param {ibc.core.client.v1.IQueryClientStateRequest} request QueryClientStateRequest message or plain object + * @param {ibc.core.client.v1.Query.ClientStateCallback} callback Node-style callback called with the error, if any, and QueryClientStateResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.clientState = function clientState(request, callback) { + return this.rpcCall(clientState, $root.ibc.core.client.v1.QueryClientStateRequest, $root.ibc.core.client.v1.QueryClientStateResponse, request, callback); + }, "name", { value: "ClientState" }); + + /** + * Calls ClientState. + * @function clientState + * @memberof ibc.core.client.v1.Query + * @instance + * @param {ibc.core.client.v1.IQueryClientStateRequest} request QueryClientStateRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link ibc.core.client.v1.Query#clientStates}. + * @memberof ibc.core.client.v1.Query + * @typedef ClientStatesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {ibc.core.client.v1.IQueryClientStatesResponse} [response] QueryClientStatesResponse + */ + + /** + * Calls ClientStates. + * @function clientStates + * @memberof ibc.core.client.v1.Query + * @instance + * @param {ibc.core.client.v1.IQueryClientStatesRequest} request QueryClientStatesRequest message or plain object + * @param {ibc.core.client.v1.Query.ClientStatesCallback} callback Node-style callback called with the error, if any, and QueryClientStatesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.clientStates = function clientStates(request, callback) { + return this.rpcCall(clientStates, $root.ibc.core.client.v1.QueryClientStatesRequest, $root.ibc.core.client.v1.QueryClientStatesResponse, request, callback); + }, "name", { value: "ClientStates" }); + + /** + * Calls ClientStates. + * @function clientStates + * @memberof ibc.core.client.v1.Query + * @instance + * @param {ibc.core.client.v1.IQueryClientStatesRequest} request QueryClientStatesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link ibc.core.client.v1.Query#consensusState}. + * @memberof ibc.core.client.v1.Query + * @typedef ConsensusStateCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {ibc.core.client.v1.IQueryConsensusStateResponse} [response] QueryConsensusStateResponse + */ + + /** + * Calls ConsensusState. + * @function consensusState + * @memberof ibc.core.client.v1.Query + * @instance + * @param {ibc.core.client.v1.IQueryConsensusStateRequest} request QueryConsensusStateRequest message or plain object + * @param {ibc.core.client.v1.Query.ConsensusStateCallback} callback Node-style callback called with the error, if any, and QueryConsensusStateResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.consensusState = function consensusState(request, callback) { + return this.rpcCall(consensusState, $root.ibc.core.client.v1.QueryConsensusStateRequest, $root.ibc.core.client.v1.QueryConsensusStateResponse, request, callback); + }, "name", { value: "ConsensusState" }); + + /** + * Calls ConsensusState. + * @function consensusState + * @memberof ibc.core.client.v1.Query + * @instance + * @param {ibc.core.client.v1.IQueryConsensusStateRequest} request QueryConsensusStateRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link ibc.core.client.v1.Query#consensusStates}. + * @memberof ibc.core.client.v1.Query + * @typedef ConsensusStatesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {ibc.core.client.v1.IQueryConsensusStatesResponse} [response] QueryConsensusStatesResponse + */ + + /** + * Calls ConsensusStates. + * @function consensusStates + * @memberof ibc.core.client.v1.Query + * @instance + * @param {ibc.core.client.v1.IQueryConsensusStatesRequest} request QueryConsensusStatesRequest message or plain object + * @param {ibc.core.client.v1.Query.ConsensusStatesCallback} callback Node-style callback called with the error, if any, and QueryConsensusStatesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.consensusStates = function consensusStates(request, callback) { + return this.rpcCall(consensusStates, $root.ibc.core.client.v1.QueryConsensusStatesRequest, $root.ibc.core.client.v1.QueryConsensusStatesResponse, request, callback); + }, "name", { value: "ConsensusStates" }); + + /** + * Calls ConsensusStates. + * @function consensusStates + * @memberof ibc.core.client.v1.Query + * @instance + * @param {ibc.core.client.v1.IQueryConsensusStatesRequest} request QueryConsensusStatesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link ibc.core.client.v1.Query#clientParams}. + * @memberof ibc.core.client.v1.Query + * @typedef ClientParamsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {ibc.core.client.v1.IQueryClientParamsResponse} [response] QueryClientParamsResponse + */ + + /** + * Calls ClientParams. + * @function clientParams + * @memberof ibc.core.client.v1.Query + * @instance + * @param {ibc.core.client.v1.IQueryClientParamsRequest} request QueryClientParamsRequest message or plain object + * @param {ibc.core.client.v1.Query.ClientParamsCallback} callback Node-style callback called with the error, if any, and QueryClientParamsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.clientParams = function clientParams(request, callback) { + return this.rpcCall(clientParams, $root.ibc.core.client.v1.QueryClientParamsRequest, $root.ibc.core.client.v1.QueryClientParamsResponse, request, callback); + }, "name", { value: "ClientParams" }); + + /** + * Calls ClientParams. + * @function clientParams + * @memberof ibc.core.client.v1.Query + * @instance + * @param {ibc.core.client.v1.IQueryClientParamsRequest} request QueryClientParamsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Query; + })(v1.Query || {}); + + v1.QueryClientStateRequest = (function(QueryClientStateRequest) { + + /** + * Properties of a QueryClientStateRequest. + * @memberof ibc.core.client.v1 + * @interface IQueryClientStateRequest + * @property {string|null} [clientId] QueryClientStateRequest clientId + */ + + /** + * Constructs a new QueryClientStateRequest. + * @memberof ibc.core.client.v1 + * @classdesc Represents a QueryClientStateRequest. + * @implements IQueryClientStateRequest + * @constructor + * @param {ibc.core.client.v1.IQueryClientStateRequest=} [properties] Properties to set + */ + function QueryClientStateRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryClientStateRequest clientId. + * @member {string} clientId + * @memberof ibc.core.client.v1.QueryClientStateRequest + * @instance + */ + QueryClientStateRequest.prototype.clientId = ""; + + /** + * Creates a new QueryClientStateRequest instance using the specified properties. + * @function create + * @memberof ibc.core.client.v1.QueryClientStateRequest + * @static + * @param {ibc.core.client.v1.IQueryClientStateRequest=} [properties] Properties to set + * @returns {ibc.core.client.v1.QueryClientStateRequest} QueryClientStateRequest instance + */ + QueryClientStateRequest.create = function create(properties) { + return new QueryClientStateRequest(properties); + }; + + /** + * Encodes the specified QueryClientStateRequest message. Does not implicitly {@link ibc.core.client.v1.QueryClientStateRequest.verify|verify} messages. + * @function encode + * @memberof ibc.core.client.v1.QueryClientStateRequest + * @static + * @param {ibc.core.client.v1.IQueryClientStateRequest} message QueryClientStateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryClientStateRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.clientId != null && Object.hasOwnProperty.call(message, "clientId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.clientId); + return writer; + }; + + /** + * Encodes the specified QueryClientStateRequest message, length delimited. Does not implicitly {@link ibc.core.client.v1.QueryClientStateRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.client.v1.QueryClientStateRequest + * @static + * @param {ibc.core.client.v1.IQueryClientStateRequest} message QueryClientStateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryClientStateRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryClientStateRequest message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.client.v1.QueryClientStateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.client.v1.QueryClientStateRequest} QueryClientStateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryClientStateRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.QueryClientStateRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.clientId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryClientStateRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.client.v1.QueryClientStateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.client.v1.QueryClientStateRequest} QueryClientStateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryClientStateRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryClientStateRequest message. + * @function verify + * @memberof ibc.core.client.v1.QueryClientStateRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryClientStateRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.clientId != null && message.hasOwnProperty("clientId")) + if (!$util.isString(message.clientId)) + return "clientId: string expected"; + return null; + }; + + /** + * Creates a QueryClientStateRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.client.v1.QueryClientStateRequest + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.client.v1.QueryClientStateRequest} QueryClientStateRequest + */ + QueryClientStateRequest.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.client.v1.QueryClientStateRequest) + return object; + var message = new $root.ibc.core.client.v1.QueryClientStateRequest(); + if (object.clientId != null) + message.clientId = String(object.clientId); + return message; + }; + + /** + * Creates a plain object from a QueryClientStateRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.client.v1.QueryClientStateRequest + * @static + * @param {ibc.core.client.v1.QueryClientStateRequest} message QueryClientStateRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryClientStateRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.clientId = ""; + if (message.clientId != null && message.hasOwnProperty("clientId")) + object.clientId = message.clientId; + return object; + }; + + /** + * Converts this QueryClientStateRequest to JSON. + * @function toJSON + * @memberof ibc.core.client.v1.QueryClientStateRequest + * @instance + * @returns {Object.} JSON object + */ + QueryClientStateRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryClientStateRequest; + })(v1.QueryClientStateRequest || {}); + + v1.QueryClientStateResponse = (function(QueryClientStateResponse) { + + /** + * Properties of a QueryClientStateResponse. + * @memberof ibc.core.client.v1 + * @interface IQueryClientStateResponse + * @property {google.protobuf.IAny|null} [clientState] QueryClientStateResponse clientState + * @property {Uint8Array|null} [proof] QueryClientStateResponse proof + * @property {ibc.core.client.v1.IHeight|null} [proofHeight] QueryClientStateResponse proofHeight + */ + + /** + * Constructs a new QueryClientStateResponse. + * @memberof ibc.core.client.v1 + * @classdesc Represents a QueryClientStateResponse. + * @implements IQueryClientStateResponse + * @constructor + * @param {ibc.core.client.v1.IQueryClientStateResponse=} [properties] Properties to set + */ + function QueryClientStateResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryClientStateResponse clientState. + * @member {google.protobuf.IAny|null|undefined} clientState + * @memberof ibc.core.client.v1.QueryClientStateResponse + * @instance + */ + QueryClientStateResponse.prototype.clientState = null; + + /** + * QueryClientStateResponse proof. + * @member {Uint8Array} proof + * @memberof ibc.core.client.v1.QueryClientStateResponse + * @instance + */ + QueryClientStateResponse.prototype.proof = $util.newBuffer([]); + + /** + * QueryClientStateResponse proofHeight. + * @member {ibc.core.client.v1.IHeight|null|undefined} proofHeight + * @memberof ibc.core.client.v1.QueryClientStateResponse + * @instance + */ + QueryClientStateResponse.prototype.proofHeight = null; + + /** + * Creates a new QueryClientStateResponse instance using the specified properties. + * @function create + * @memberof ibc.core.client.v1.QueryClientStateResponse + * @static + * @param {ibc.core.client.v1.IQueryClientStateResponse=} [properties] Properties to set + * @returns {ibc.core.client.v1.QueryClientStateResponse} QueryClientStateResponse instance + */ + QueryClientStateResponse.create = function create(properties) { + return new QueryClientStateResponse(properties); + }; + + /** + * Encodes the specified QueryClientStateResponse message. Does not implicitly {@link ibc.core.client.v1.QueryClientStateResponse.verify|verify} messages. + * @function encode + * @memberof ibc.core.client.v1.QueryClientStateResponse + * @static + * @param {ibc.core.client.v1.IQueryClientStateResponse} message QueryClientStateResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryClientStateResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.clientState != null && Object.hasOwnProperty.call(message, "clientState")) + $root.google.protobuf.Any.encode(message.clientState, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.proof != null && Object.hasOwnProperty.call(message, "proof")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.proof); + if (message.proofHeight != null && Object.hasOwnProperty.call(message, "proofHeight")) + $root.ibc.core.client.v1.Height.encode(message.proofHeight, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryClientStateResponse message, length delimited. Does not implicitly {@link ibc.core.client.v1.QueryClientStateResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.client.v1.QueryClientStateResponse + * @static + * @param {ibc.core.client.v1.IQueryClientStateResponse} message QueryClientStateResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryClientStateResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryClientStateResponse message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.client.v1.QueryClientStateResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.client.v1.QueryClientStateResponse} QueryClientStateResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryClientStateResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.QueryClientStateResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.clientState = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + case 2: + message.proof = reader.bytes(); + break; + case 3: + message.proofHeight = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryClientStateResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.client.v1.QueryClientStateResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.client.v1.QueryClientStateResponse} QueryClientStateResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryClientStateResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryClientStateResponse message. + * @function verify + * @memberof ibc.core.client.v1.QueryClientStateResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryClientStateResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.clientState != null && message.hasOwnProperty("clientState")) { + var error = $root.google.protobuf.Any.verify(message.clientState); + if (error) + return "clientState." + error; + } + if (message.proof != null && message.hasOwnProperty("proof")) + if (!(message.proof && typeof message.proof.length === "number" || $util.isString(message.proof))) + return "proof: buffer expected"; + if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) { + var error = $root.ibc.core.client.v1.Height.verify(message.proofHeight); + if (error) + return "proofHeight." + error; + } + return null; + }; + + /** + * Creates a QueryClientStateResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.client.v1.QueryClientStateResponse + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.client.v1.QueryClientStateResponse} QueryClientStateResponse + */ + QueryClientStateResponse.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.client.v1.QueryClientStateResponse) + return object; + var message = new $root.ibc.core.client.v1.QueryClientStateResponse(); + if (object.clientState != null) { + if (typeof object.clientState !== "object") + throw TypeError(".ibc.core.client.v1.QueryClientStateResponse.clientState: object expected"); + message.clientState = $root.google.protobuf.Any.fromObject(object.clientState); + } + if (object.proof != null) + if (typeof object.proof === "string") + $util.base64.decode(object.proof, message.proof = $util.newBuffer($util.base64.length(object.proof)), 0); + else if (object.proof.length) + message.proof = object.proof; + if (object.proofHeight != null) { + if (typeof object.proofHeight !== "object") + throw TypeError(".ibc.core.client.v1.QueryClientStateResponse.proofHeight: object expected"); + message.proofHeight = $root.ibc.core.client.v1.Height.fromObject(object.proofHeight); + } + return message; + }; + + /** + * Creates a plain object from a QueryClientStateResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.client.v1.QueryClientStateResponse + * @static + * @param {ibc.core.client.v1.QueryClientStateResponse} message QueryClientStateResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryClientStateResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.clientState = null; + if (options.bytes === String) + object.proof = ""; + else { + object.proof = []; + if (options.bytes !== Array) + object.proof = $util.newBuffer(object.proof); + } + object.proofHeight = null; + } + if (message.clientState != null && message.hasOwnProperty("clientState")) + object.clientState = $root.google.protobuf.Any.toObject(message.clientState, options); + if (message.proof != null && message.hasOwnProperty("proof")) + object.proof = options.bytes === String ? $util.base64.encode(message.proof, 0, message.proof.length) : options.bytes === Array ? Array.prototype.slice.call(message.proof) : message.proof; + if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) + object.proofHeight = $root.ibc.core.client.v1.Height.toObject(message.proofHeight, options); + return object; + }; + + /** + * Converts this QueryClientStateResponse to JSON. + * @function toJSON + * @memberof ibc.core.client.v1.QueryClientStateResponse + * @instance + * @returns {Object.} JSON object + */ + QueryClientStateResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryClientStateResponse; + })(v1.QueryClientStateResponse || {}); + + v1.QueryClientStatesRequest = (function(QueryClientStatesRequest) { + + /** + * Properties of a QueryClientStatesRequest. + * @memberof ibc.core.client.v1 + * @interface IQueryClientStatesRequest + * @property {cosmos.base.query.v1beta1.IPageRequest|null} [pagination] QueryClientStatesRequest pagination + */ + + /** + * Constructs a new QueryClientStatesRequest. + * @memberof ibc.core.client.v1 + * @classdesc Represents a QueryClientStatesRequest. + * @implements IQueryClientStatesRequest + * @constructor + * @param {ibc.core.client.v1.IQueryClientStatesRequest=} [properties] Properties to set + */ + function QueryClientStatesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryClientStatesRequest pagination. + * @member {cosmos.base.query.v1beta1.IPageRequest|null|undefined} pagination + * @memberof ibc.core.client.v1.QueryClientStatesRequest + * @instance + */ + QueryClientStatesRequest.prototype.pagination = null; + + /** + * Creates a new QueryClientStatesRequest instance using the specified properties. + * @function create + * @memberof ibc.core.client.v1.QueryClientStatesRequest + * @static + * @param {ibc.core.client.v1.IQueryClientStatesRequest=} [properties] Properties to set + * @returns {ibc.core.client.v1.QueryClientStatesRequest} QueryClientStatesRequest instance + */ + QueryClientStatesRequest.create = function create(properties) { + return new QueryClientStatesRequest(properties); + }; + + /** + * Encodes the specified QueryClientStatesRequest message. Does not implicitly {@link ibc.core.client.v1.QueryClientStatesRequest.verify|verify} messages. + * @function encode + * @memberof ibc.core.client.v1.QueryClientStatesRequest + * @static + * @param {ibc.core.client.v1.IQueryClientStatesRequest} message QueryClientStatesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryClientStatesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) + $root.cosmos.base.query.v1beta1.PageRequest.encode(message.pagination, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryClientStatesRequest message, length delimited. Does not implicitly {@link ibc.core.client.v1.QueryClientStatesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.client.v1.QueryClientStatesRequest + * @static + * @param {ibc.core.client.v1.IQueryClientStatesRequest} message QueryClientStatesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryClientStatesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryClientStatesRequest message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.client.v1.QueryClientStatesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.client.v1.QueryClientStatesRequest} QueryClientStatesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryClientStatesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.QueryClientStatesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryClientStatesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.client.v1.QueryClientStatesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.client.v1.QueryClientStatesRequest} QueryClientStatesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryClientStatesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryClientStatesRequest message. + * @function verify + * @memberof ibc.core.client.v1.QueryClientStatesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryClientStatesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.pagination != null && message.hasOwnProperty("pagination")) { + var error = $root.cosmos.base.query.v1beta1.PageRequest.verify(message.pagination); + if (error) + return "pagination." + error; + } + return null; + }; + + /** + * Creates a QueryClientStatesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.client.v1.QueryClientStatesRequest + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.client.v1.QueryClientStatesRequest} QueryClientStatesRequest + */ + QueryClientStatesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.client.v1.QueryClientStatesRequest) + return object; + var message = new $root.ibc.core.client.v1.QueryClientStatesRequest(); + if (object.pagination != null) { + if (typeof object.pagination !== "object") + throw TypeError(".ibc.core.client.v1.QueryClientStatesRequest.pagination: object expected"); + message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.fromObject(object.pagination); + } + return message; + }; + + /** + * Creates a plain object from a QueryClientStatesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.client.v1.QueryClientStatesRequest + * @static + * @param {ibc.core.client.v1.QueryClientStatesRequest} message QueryClientStatesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryClientStatesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.pagination = null; + if (message.pagination != null && message.hasOwnProperty("pagination")) + object.pagination = $root.cosmos.base.query.v1beta1.PageRequest.toObject(message.pagination, options); + return object; + }; + + /** + * Converts this QueryClientStatesRequest to JSON. + * @function toJSON + * @memberof ibc.core.client.v1.QueryClientStatesRequest + * @instance + * @returns {Object.} JSON object + */ + QueryClientStatesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryClientStatesRequest; + })(v1.QueryClientStatesRequest || {}); + + v1.QueryClientStatesResponse = (function(QueryClientStatesResponse) { + + /** + * Properties of a QueryClientStatesResponse. + * @memberof ibc.core.client.v1 + * @interface IQueryClientStatesResponse + * @property {Array.|null} [clientStates] QueryClientStatesResponse clientStates + * @property {cosmos.base.query.v1beta1.IPageResponse|null} [pagination] QueryClientStatesResponse pagination + */ + + /** + * Constructs a new QueryClientStatesResponse. + * @memberof ibc.core.client.v1 + * @classdesc Represents a QueryClientStatesResponse. + * @implements IQueryClientStatesResponse + * @constructor + * @param {ibc.core.client.v1.IQueryClientStatesResponse=} [properties] Properties to set + */ + function QueryClientStatesResponse(properties) { + this.clientStates = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryClientStatesResponse clientStates. + * @member {Array.} clientStates + * @memberof ibc.core.client.v1.QueryClientStatesResponse + * @instance + */ + QueryClientStatesResponse.prototype.clientStates = $util.emptyArray; + + /** + * QueryClientStatesResponse pagination. + * @member {cosmos.base.query.v1beta1.IPageResponse|null|undefined} pagination + * @memberof ibc.core.client.v1.QueryClientStatesResponse + * @instance + */ + QueryClientStatesResponse.prototype.pagination = null; + + /** + * Creates a new QueryClientStatesResponse instance using the specified properties. + * @function create + * @memberof ibc.core.client.v1.QueryClientStatesResponse + * @static + * @param {ibc.core.client.v1.IQueryClientStatesResponse=} [properties] Properties to set + * @returns {ibc.core.client.v1.QueryClientStatesResponse} QueryClientStatesResponse instance + */ + QueryClientStatesResponse.create = function create(properties) { + return new QueryClientStatesResponse(properties); + }; + + /** + * Encodes the specified QueryClientStatesResponse message. Does not implicitly {@link ibc.core.client.v1.QueryClientStatesResponse.verify|verify} messages. + * @function encode + * @memberof ibc.core.client.v1.QueryClientStatesResponse + * @static + * @param {ibc.core.client.v1.IQueryClientStatesResponse} message QueryClientStatesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryClientStatesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.clientStates != null && message.clientStates.length) + for (var i = 0; i < message.clientStates.length; ++i) + $root.ibc.core.client.v1.IdentifiedClientState.encode(message.clientStates[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) + $root.cosmos.base.query.v1beta1.PageResponse.encode(message.pagination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryClientStatesResponse message, length delimited. Does not implicitly {@link ibc.core.client.v1.QueryClientStatesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.client.v1.QueryClientStatesResponse + * @static + * @param {ibc.core.client.v1.IQueryClientStatesResponse} message QueryClientStatesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryClientStatesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryClientStatesResponse message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.client.v1.QueryClientStatesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.client.v1.QueryClientStatesResponse} QueryClientStatesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryClientStatesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.QueryClientStatesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.clientStates && message.clientStates.length)) + message.clientStates = []; + message.clientStates.push($root.ibc.core.client.v1.IdentifiedClientState.decode(reader, reader.uint32())); + break; + case 2: + message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryClientStatesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.client.v1.QueryClientStatesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.client.v1.QueryClientStatesResponse} QueryClientStatesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryClientStatesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryClientStatesResponse message. + * @function verify + * @memberof ibc.core.client.v1.QueryClientStatesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryClientStatesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.clientStates != null && message.hasOwnProperty("clientStates")) { + if (!Array.isArray(message.clientStates)) + return "clientStates: array expected"; + for (var i = 0; i < message.clientStates.length; ++i) { + var error = $root.ibc.core.client.v1.IdentifiedClientState.verify(message.clientStates[i]); + if (error) + return "clientStates." + error; + } + } + if (message.pagination != null && message.hasOwnProperty("pagination")) { + var error = $root.cosmos.base.query.v1beta1.PageResponse.verify(message.pagination); + if (error) + return "pagination." + error; + } + return null; + }; + + /** + * Creates a QueryClientStatesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.client.v1.QueryClientStatesResponse + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.client.v1.QueryClientStatesResponse} QueryClientStatesResponse + */ + QueryClientStatesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.client.v1.QueryClientStatesResponse) + return object; + var message = new $root.ibc.core.client.v1.QueryClientStatesResponse(); + if (object.clientStates) { + if (!Array.isArray(object.clientStates)) + throw TypeError(".ibc.core.client.v1.QueryClientStatesResponse.clientStates: array expected"); + message.clientStates = []; + for (var i = 0; i < object.clientStates.length; ++i) { + if (typeof object.clientStates[i] !== "object") + throw TypeError(".ibc.core.client.v1.QueryClientStatesResponse.clientStates: object expected"); + message.clientStates[i] = $root.ibc.core.client.v1.IdentifiedClientState.fromObject(object.clientStates[i]); + } + } + if (object.pagination != null) { + if (typeof object.pagination !== "object") + throw TypeError(".ibc.core.client.v1.QueryClientStatesResponse.pagination: object expected"); + message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.fromObject(object.pagination); + } + return message; + }; + + /** + * Creates a plain object from a QueryClientStatesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.client.v1.QueryClientStatesResponse + * @static + * @param {ibc.core.client.v1.QueryClientStatesResponse} message QueryClientStatesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryClientStatesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.clientStates = []; + if (options.defaults) + object.pagination = null; + if (message.clientStates && message.clientStates.length) { + object.clientStates = []; + for (var j = 0; j < message.clientStates.length; ++j) + object.clientStates[j] = $root.ibc.core.client.v1.IdentifiedClientState.toObject(message.clientStates[j], options); + } + if (message.pagination != null && message.hasOwnProperty("pagination")) + object.pagination = $root.cosmos.base.query.v1beta1.PageResponse.toObject(message.pagination, options); + return object; + }; + + /** + * Converts this QueryClientStatesResponse to JSON. + * @function toJSON + * @memberof ibc.core.client.v1.QueryClientStatesResponse + * @instance + * @returns {Object.} JSON object + */ + QueryClientStatesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryClientStatesResponse; + })(v1.QueryClientStatesResponse || {}); + + v1.QueryConsensusStateRequest = (function(QueryConsensusStateRequest) { + + /** + * Properties of a QueryConsensusStateRequest. + * @memberof ibc.core.client.v1 + * @interface IQueryConsensusStateRequest + * @property {string|null} [clientId] QueryConsensusStateRequest clientId + * @property {number|Long|null} [revisionNumber] QueryConsensusStateRequest revisionNumber + * @property {number|Long|null} [revisionHeight] QueryConsensusStateRequest revisionHeight + * @property {boolean|null} [latestHeight] QueryConsensusStateRequest latestHeight + */ + + /** + * Constructs a new QueryConsensusStateRequest. + * @memberof ibc.core.client.v1 + * @classdesc Represents a QueryConsensusStateRequest. + * @implements IQueryConsensusStateRequest + * @constructor + * @param {ibc.core.client.v1.IQueryConsensusStateRequest=} [properties] Properties to set + */ + function QueryConsensusStateRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryConsensusStateRequest clientId. + * @member {string} clientId + * @memberof ibc.core.client.v1.QueryConsensusStateRequest + * @instance + */ + QueryConsensusStateRequest.prototype.clientId = ""; + + /** + * QueryConsensusStateRequest revisionNumber. + * @member {number|Long} revisionNumber + * @memberof ibc.core.client.v1.QueryConsensusStateRequest + * @instance + */ + QueryConsensusStateRequest.prototype.revisionNumber = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * QueryConsensusStateRequest revisionHeight. + * @member {number|Long} revisionHeight + * @memberof ibc.core.client.v1.QueryConsensusStateRequest + * @instance + */ + QueryConsensusStateRequest.prototype.revisionHeight = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * QueryConsensusStateRequest latestHeight. + * @member {boolean} latestHeight + * @memberof ibc.core.client.v1.QueryConsensusStateRequest + * @instance + */ + QueryConsensusStateRequest.prototype.latestHeight = false; + + /** + * Creates a new QueryConsensusStateRequest instance using the specified properties. + * @function create + * @memberof ibc.core.client.v1.QueryConsensusStateRequest + * @static + * @param {ibc.core.client.v1.IQueryConsensusStateRequest=} [properties] Properties to set + * @returns {ibc.core.client.v1.QueryConsensusStateRequest} QueryConsensusStateRequest instance + */ + QueryConsensusStateRequest.create = function create(properties) { + return new QueryConsensusStateRequest(properties); + }; + + /** + * Encodes the specified QueryConsensusStateRequest message. Does not implicitly {@link ibc.core.client.v1.QueryConsensusStateRequest.verify|verify} messages. + * @function encode + * @memberof ibc.core.client.v1.QueryConsensusStateRequest + * @static + * @param {ibc.core.client.v1.IQueryConsensusStateRequest} message QueryConsensusStateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryConsensusStateRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.clientId != null && Object.hasOwnProperty.call(message, "clientId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.clientId); + if (message.revisionNumber != null && Object.hasOwnProperty.call(message, "revisionNumber")) + writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.revisionNumber); + if (message.revisionHeight != null && Object.hasOwnProperty.call(message, "revisionHeight")) + writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.revisionHeight); + if (message.latestHeight != null && Object.hasOwnProperty.call(message, "latestHeight")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.latestHeight); + return writer; + }; + + /** + * Encodes the specified QueryConsensusStateRequest message, length delimited. Does not implicitly {@link ibc.core.client.v1.QueryConsensusStateRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.client.v1.QueryConsensusStateRequest + * @static + * @param {ibc.core.client.v1.IQueryConsensusStateRequest} message QueryConsensusStateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryConsensusStateRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryConsensusStateRequest message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.client.v1.QueryConsensusStateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.client.v1.QueryConsensusStateRequest} QueryConsensusStateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryConsensusStateRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.QueryConsensusStateRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.clientId = reader.string(); + break; + case 2: + message.revisionNumber = reader.uint64(); + break; + case 3: + message.revisionHeight = reader.uint64(); + break; + case 4: + message.latestHeight = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryConsensusStateRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.client.v1.QueryConsensusStateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.client.v1.QueryConsensusStateRequest} QueryConsensusStateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryConsensusStateRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryConsensusStateRequest message. + * @function verify + * @memberof ibc.core.client.v1.QueryConsensusStateRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryConsensusStateRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.clientId != null && message.hasOwnProperty("clientId")) + if (!$util.isString(message.clientId)) + return "clientId: string expected"; + if (message.revisionNumber != null && message.hasOwnProperty("revisionNumber")) + if (!$util.isInteger(message.revisionNumber) && !(message.revisionNumber && $util.isInteger(message.revisionNumber.low) && $util.isInteger(message.revisionNumber.high))) + return "revisionNumber: integer|Long expected"; + if (message.revisionHeight != null && message.hasOwnProperty("revisionHeight")) + if (!$util.isInteger(message.revisionHeight) && !(message.revisionHeight && $util.isInteger(message.revisionHeight.low) && $util.isInteger(message.revisionHeight.high))) + return "revisionHeight: integer|Long expected"; + if (message.latestHeight != null && message.hasOwnProperty("latestHeight")) + if (typeof message.latestHeight !== "boolean") + return "latestHeight: boolean expected"; + return null; + }; + + /** + * Creates a QueryConsensusStateRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.client.v1.QueryConsensusStateRequest + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.client.v1.QueryConsensusStateRequest} QueryConsensusStateRequest + */ + QueryConsensusStateRequest.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.client.v1.QueryConsensusStateRequest) + return object; + var message = new $root.ibc.core.client.v1.QueryConsensusStateRequest(); + if (object.clientId != null) + message.clientId = String(object.clientId); + if (object.revisionNumber != null) + if ($util.Long) + (message.revisionNumber = $util.Long.fromValue(object.revisionNumber)).unsigned = true; + else if (typeof object.revisionNumber === "string") + message.revisionNumber = parseInt(object.revisionNumber, 10); + else if (typeof object.revisionNumber === "number") + message.revisionNumber = object.revisionNumber; + else if (typeof object.revisionNumber === "object") + message.revisionNumber = new $util.LongBits(object.revisionNumber.low >>> 0, object.revisionNumber.high >>> 0).toNumber(true); + if (object.revisionHeight != null) + if ($util.Long) + (message.revisionHeight = $util.Long.fromValue(object.revisionHeight)).unsigned = true; + else if (typeof object.revisionHeight === "string") + message.revisionHeight = parseInt(object.revisionHeight, 10); + else if (typeof object.revisionHeight === "number") + message.revisionHeight = object.revisionHeight; + else if (typeof object.revisionHeight === "object") + message.revisionHeight = new $util.LongBits(object.revisionHeight.low >>> 0, object.revisionHeight.high >>> 0).toNumber(true); + if (object.latestHeight != null) + message.latestHeight = Boolean(object.latestHeight); + return message; + }; + + /** + * Creates a plain object from a QueryConsensusStateRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.client.v1.QueryConsensusStateRequest + * @static + * @param {ibc.core.client.v1.QueryConsensusStateRequest} message QueryConsensusStateRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryConsensusStateRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.clientId = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.revisionNumber = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.revisionNumber = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.revisionHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.revisionHeight = options.longs === String ? "0" : 0; + object.latestHeight = false; + } + if (message.clientId != null && message.hasOwnProperty("clientId")) + object.clientId = message.clientId; + if (message.revisionNumber != null && message.hasOwnProperty("revisionNumber")) + if (typeof message.revisionNumber === "number") + object.revisionNumber = options.longs === String ? String(message.revisionNumber) : message.revisionNumber; + else + object.revisionNumber = options.longs === String ? $util.Long.prototype.toString.call(message.revisionNumber) : options.longs === Number ? new $util.LongBits(message.revisionNumber.low >>> 0, message.revisionNumber.high >>> 0).toNumber(true) : message.revisionNumber; + if (message.revisionHeight != null && message.hasOwnProperty("revisionHeight")) + if (typeof message.revisionHeight === "number") + object.revisionHeight = options.longs === String ? String(message.revisionHeight) : message.revisionHeight; + else + object.revisionHeight = options.longs === String ? $util.Long.prototype.toString.call(message.revisionHeight) : options.longs === Number ? new $util.LongBits(message.revisionHeight.low >>> 0, message.revisionHeight.high >>> 0).toNumber(true) : message.revisionHeight; + if (message.latestHeight != null && message.hasOwnProperty("latestHeight")) + object.latestHeight = message.latestHeight; + return object; + }; + + /** + * Converts this QueryConsensusStateRequest to JSON. + * @function toJSON + * @memberof ibc.core.client.v1.QueryConsensusStateRequest + * @instance + * @returns {Object.} JSON object + */ + QueryConsensusStateRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryConsensusStateRequest; + })(v1.QueryConsensusStateRequest || {}); + + v1.QueryConsensusStateResponse = (function(QueryConsensusStateResponse) { + + /** + * Properties of a QueryConsensusStateResponse. + * @memberof ibc.core.client.v1 + * @interface IQueryConsensusStateResponse + * @property {google.protobuf.IAny|null} [consensusState] QueryConsensusStateResponse consensusState + * @property {Uint8Array|null} [proof] QueryConsensusStateResponse proof + * @property {ibc.core.client.v1.IHeight|null} [proofHeight] QueryConsensusStateResponse proofHeight + */ + + /** + * Constructs a new QueryConsensusStateResponse. + * @memberof ibc.core.client.v1 + * @classdesc Represents a QueryConsensusStateResponse. + * @implements IQueryConsensusStateResponse + * @constructor + * @param {ibc.core.client.v1.IQueryConsensusStateResponse=} [properties] Properties to set + */ + function QueryConsensusStateResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryConsensusStateResponse consensusState. + * @member {google.protobuf.IAny|null|undefined} consensusState + * @memberof ibc.core.client.v1.QueryConsensusStateResponse + * @instance + */ + QueryConsensusStateResponse.prototype.consensusState = null; + + /** + * QueryConsensusStateResponse proof. + * @member {Uint8Array} proof + * @memberof ibc.core.client.v1.QueryConsensusStateResponse + * @instance + */ + QueryConsensusStateResponse.prototype.proof = $util.newBuffer([]); + + /** + * QueryConsensusStateResponse proofHeight. + * @member {ibc.core.client.v1.IHeight|null|undefined} proofHeight + * @memberof ibc.core.client.v1.QueryConsensusStateResponse + * @instance + */ + QueryConsensusStateResponse.prototype.proofHeight = null; + + /** + * Creates a new QueryConsensusStateResponse instance using the specified properties. + * @function create + * @memberof ibc.core.client.v1.QueryConsensusStateResponse + * @static + * @param {ibc.core.client.v1.IQueryConsensusStateResponse=} [properties] Properties to set + * @returns {ibc.core.client.v1.QueryConsensusStateResponse} QueryConsensusStateResponse instance + */ + QueryConsensusStateResponse.create = function create(properties) { + return new QueryConsensusStateResponse(properties); + }; + + /** + * Encodes the specified QueryConsensusStateResponse message. Does not implicitly {@link ibc.core.client.v1.QueryConsensusStateResponse.verify|verify} messages. + * @function encode + * @memberof ibc.core.client.v1.QueryConsensusStateResponse + * @static + * @param {ibc.core.client.v1.IQueryConsensusStateResponse} message QueryConsensusStateResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryConsensusStateResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.consensusState != null && Object.hasOwnProperty.call(message, "consensusState")) + $root.google.protobuf.Any.encode(message.consensusState, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.proof != null && Object.hasOwnProperty.call(message, "proof")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.proof); + if (message.proofHeight != null && Object.hasOwnProperty.call(message, "proofHeight")) + $root.ibc.core.client.v1.Height.encode(message.proofHeight, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryConsensusStateResponse message, length delimited. Does not implicitly {@link ibc.core.client.v1.QueryConsensusStateResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.client.v1.QueryConsensusStateResponse + * @static + * @param {ibc.core.client.v1.IQueryConsensusStateResponse} message QueryConsensusStateResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryConsensusStateResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryConsensusStateResponse message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.client.v1.QueryConsensusStateResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.client.v1.QueryConsensusStateResponse} QueryConsensusStateResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryConsensusStateResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.QueryConsensusStateResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.consensusState = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + case 2: + message.proof = reader.bytes(); + break; + case 3: + message.proofHeight = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryConsensusStateResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.client.v1.QueryConsensusStateResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.client.v1.QueryConsensusStateResponse} QueryConsensusStateResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryConsensusStateResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryConsensusStateResponse message. + * @function verify + * @memberof ibc.core.client.v1.QueryConsensusStateResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryConsensusStateResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.consensusState != null && message.hasOwnProperty("consensusState")) { + var error = $root.google.protobuf.Any.verify(message.consensusState); + if (error) + return "consensusState." + error; + } + if (message.proof != null && message.hasOwnProperty("proof")) + if (!(message.proof && typeof message.proof.length === "number" || $util.isString(message.proof))) + return "proof: buffer expected"; + if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) { + var error = $root.ibc.core.client.v1.Height.verify(message.proofHeight); + if (error) + return "proofHeight." + error; + } + return null; + }; + + /** + * Creates a QueryConsensusStateResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.client.v1.QueryConsensusStateResponse + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.client.v1.QueryConsensusStateResponse} QueryConsensusStateResponse + */ + QueryConsensusStateResponse.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.client.v1.QueryConsensusStateResponse) + return object; + var message = new $root.ibc.core.client.v1.QueryConsensusStateResponse(); + if (object.consensusState != null) { + if (typeof object.consensusState !== "object") + throw TypeError(".ibc.core.client.v1.QueryConsensusStateResponse.consensusState: object expected"); + message.consensusState = $root.google.protobuf.Any.fromObject(object.consensusState); + } + if (object.proof != null) + if (typeof object.proof === "string") + $util.base64.decode(object.proof, message.proof = $util.newBuffer($util.base64.length(object.proof)), 0); + else if (object.proof.length) + message.proof = object.proof; + if (object.proofHeight != null) { + if (typeof object.proofHeight !== "object") + throw TypeError(".ibc.core.client.v1.QueryConsensusStateResponse.proofHeight: object expected"); + message.proofHeight = $root.ibc.core.client.v1.Height.fromObject(object.proofHeight); + } + return message; + }; + + /** + * Creates a plain object from a QueryConsensusStateResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.client.v1.QueryConsensusStateResponse + * @static + * @param {ibc.core.client.v1.QueryConsensusStateResponse} message QueryConsensusStateResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryConsensusStateResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.consensusState = null; + if (options.bytes === String) + object.proof = ""; + else { + object.proof = []; + if (options.bytes !== Array) + object.proof = $util.newBuffer(object.proof); + } + object.proofHeight = null; + } + if (message.consensusState != null && message.hasOwnProperty("consensusState")) + object.consensusState = $root.google.protobuf.Any.toObject(message.consensusState, options); + if (message.proof != null && message.hasOwnProperty("proof")) + object.proof = options.bytes === String ? $util.base64.encode(message.proof, 0, message.proof.length) : options.bytes === Array ? Array.prototype.slice.call(message.proof) : message.proof; + if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) + object.proofHeight = $root.ibc.core.client.v1.Height.toObject(message.proofHeight, options); + return object; + }; + + /** + * Converts this QueryConsensusStateResponse to JSON. + * @function toJSON + * @memberof ibc.core.client.v1.QueryConsensusStateResponse + * @instance + * @returns {Object.} JSON object + */ + QueryConsensusStateResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryConsensusStateResponse; + })(v1.QueryConsensusStateResponse || {}); + + v1.QueryConsensusStatesRequest = (function(QueryConsensusStatesRequest) { + + /** + * Properties of a QueryConsensusStatesRequest. + * @memberof ibc.core.client.v1 + * @interface IQueryConsensusStatesRequest + * @property {string|null} [clientId] QueryConsensusStatesRequest clientId + * @property {cosmos.base.query.v1beta1.IPageRequest|null} [pagination] QueryConsensusStatesRequest pagination + */ + + /** + * Constructs a new QueryConsensusStatesRequest. + * @memberof ibc.core.client.v1 + * @classdesc Represents a QueryConsensusStatesRequest. + * @implements IQueryConsensusStatesRequest + * @constructor + * @param {ibc.core.client.v1.IQueryConsensusStatesRequest=} [properties] Properties to set + */ + function QueryConsensusStatesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryConsensusStatesRequest clientId. + * @member {string} clientId + * @memberof ibc.core.client.v1.QueryConsensusStatesRequest + * @instance + */ + QueryConsensusStatesRequest.prototype.clientId = ""; + + /** + * QueryConsensusStatesRequest pagination. + * @member {cosmos.base.query.v1beta1.IPageRequest|null|undefined} pagination + * @memberof ibc.core.client.v1.QueryConsensusStatesRequest + * @instance + */ + QueryConsensusStatesRequest.prototype.pagination = null; + + /** + * Creates a new QueryConsensusStatesRequest instance using the specified properties. + * @function create + * @memberof ibc.core.client.v1.QueryConsensusStatesRequest + * @static + * @param {ibc.core.client.v1.IQueryConsensusStatesRequest=} [properties] Properties to set + * @returns {ibc.core.client.v1.QueryConsensusStatesRequest} QueryConsensusStatesRequest instance + */ + QueryConsensusStatesRequest.create = function create(properties) { + return new QueryConsensusStatesRequest(properties); + }; + + /** + * Encodes the specified QueryConsensusStatesRequest message. Does not implicitly {@link ibc.core.client.v1.QueryConsensusStatesRequest.verify|verify} messages. + * @function encode + * @memberof ibc.core.client.v1.QueryConsensusStatesRequest + * @static + * @param {ibc.core.client.v1.IQueryConsensusStatesRequest} message QueryConsensusStatesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryConsensusStatesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.clientId != null && Object.hasOwnProperty.call(message, "clientId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.clientId); + if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) + $root.cosmos.base.query.v1beta1.PageRequest.encode(message.pagination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryConsensusStatesRequest message, length delimited. Does not implicitly {@link ibc.core.client.v1.QueryConsensusStatesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.client.v1.QueryConsensusStatesRequest + * @static + * @param {ibc.core.client.v1.IQueryConsensusStatesRequest} message QueryConsensusStatesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryConsensusStatesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryConsensusStatesRequest message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.client.v1.QueryConsensusStatesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.client.v1.QueryConsensusStatesRequest} QueryConsensusStatesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryConsensusStatesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.QueryConsensusStatesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.clientId = reader.string(); + break; + case 2: + message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryConsensusStatesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.client.v1.QueryConsensusStatesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.client.v1.QueryConsensusStatesRequest} QueryConsensusStatesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryConsensusStatesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryConsensusStatesRequest message. + * @function verify + * @memberof ibc.core.client.v1.QueryConsensusStatesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryConsensusStatesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.clientId != null && message.hasOwnProperty("clientId")) + if (!$util.isString(message.clientId)) + return "clientId: string expected"; + if (message.pagination != null && message.hasOwnProperty("pagination")) { + var error = $root.cosmos.base.query.v1beta1.PageRequest.verify(message.pagination); + if (error) + return "pagination." + error; + } + return null; + }; + + /** + * Creates a QueryConsensusStatesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.client.v1.QueryConsensusStatesRequest + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.client.v1.QueryConsensusStatesRequest} QueryConsensusStatesRequest + */ + QueryConsensusStatesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.client.v1.QueryConsensusStatesRequest) + return object; + var message = new $root.ibc.core.client.v1.QueryConsensusStatesRequest(); + if (object.clientId != null) + message.clientId = String(object.clientId); + if (object.pagination != null) { + if (typeof object.pagination !== "object") + throw TypeError(".ibc.core.client.v1.QueryConsensusStatesRequest.pagination: object expected"); + message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.fromObject(object.pagination); + } + return message; + }; + + /** + * Creates a plain object from a QueryConsensusStatesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.client.v1.QueryConsensusStatesRequest + * @static + * @param {ibc.core.client.v1.QueryConsensusStatesRequest} message QueryConsensusStatesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryConsensusStatesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.clientId = ""; + object.pagination = null; + } + if (message.clientId != null && message.hasOwnProperty("clientId")) + object.clientId = message.clientId; + if (message.pagination != null && message.hasOwnProperty("pagination")) + object.pagination = $root.cosmos.base.query.v1beta1.PageRequest.toObject(message.pagination, options); + return object; + }; + + /** + * Converts this QueryConsensusStatesRequest to JSON. + * @function toJSON + * @memberof ibc.core.client.v1.QueryConsensusStatesRequest + * @instance + * @returns {Object.} JSON object + */ + QueryConsensusStatesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryConsensusStatesRequest; + })(v1.QueryConsensusStatesRequest || {}); + + v1.QueryConsensusStatesResponse = (function(QueryConsensusStatesResponse) { + + /** + * Properties of a QueryConsensusStatesResponse. + * @memberof ibc.core.client.v1 + * @interface IQueryConsensusStatesResponse + * @property {Array.|null} [consensusStates] QueryConsensusStatesResponse consensusStates + * @property {cosmos.base.query.v1beta1.IPageResponse|null} [pagination] QueryConsensusStatesResponse pagination + */ + + /** + * Constructs a new QueryConsensusStatesResponse. + * @memberof ibc.core.client.v1 + * @classdesc Represents a QueryConsensusStatesResponse. + * @implements IQueryConsensusStatesResponse + * @constructor + * @param {ibc.core.client.v1.IQueryConsensusStatesResponse=} [properties] Properties to set + */ + function QueryConsensusStatesResponse(properties) { + this.consensusStates = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryConsensusStatesResponse consensusStates. + * @member {Array.} consensusStates + * @memberof ibc.core.client.v1.QueryConsensusStatesResponse + * @instance + */ + QueryConsensusStatesResponse.prototype.consensusStates = $util.emptyArray; + + /** + * QueryConsensusStatesResponse pagination. + * @member {cosmos.base.query.v1beta1.IPageResponse|null|undefined} pagination + * @memberof ibc.core.client.v1.QueryConsensusStatesResponse + * @instance + */ + QueryConsensusStatesResponse.prototype.pagination = null; + + /** + * Creates a new QueryConsensusStatesResponse instance using the specified properties. + * @function create + * @memberof ibc.core.client.v1.QueryConsensusStatesResponse + * @static + * @param {ibc.core.client.v1.IQueryConsensusStatesResponse=} [properties] Properties to set + * @returns {ibc.core.client.v1.QueryConsensusStatesResponse} QueryConsensusStatesResponse instance + */ + QueryConsensusStatesResponse.create = function create(properties) { + return new QueryConsensusStatesResponse(properties); + }; + + /** + * Encodes the specified QueryConsensusStatesResponse message. Does not implicitly {@link ibc.core.client.v1.QueryConsensusStatesResponse.verify|verify} messages. + * @function encode + * @memberof ibc.core.client.v1.QueryConsensusStatesResponse + * @static + * @param {ibc.core.client.v1.IQueryConsensusStatesResponse} message QueryConsensusStatesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryConsensusStatesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.consensusStates != null && message.consensusStates.length) + for (var i = 0; i < message.consensusStates.length; ++i) + $root.ibc.core.client.v1.ConsensusStateWithHeight.encode(message.consensusStates[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) + $root.cosmos.base.query.v1beta1.PageResponse.encode(message.pagination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryConsensusStatesResponse message, length delimited. Does not implicitly {@link ibc.core.client.v1.QueryConsensusStatesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.client.v1.QueryConsensusStatesResponse + * @static + * @param {ibc.core.client.v1.IQueryConsensusStatesResponse} message QueryConsensusStatesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryConsensusStatesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryConsensusStatesResponse message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.client.v1.QueryConsensusStatesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.client.v1.QueryConsensusStatesResponse} QueryConsensusStatesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryConsensusStatesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.QueryConsensusStatesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.consensusStates && message.consensusStates.length)) + message.consensusStates = []; + message.consensusStates.push($root.ibc.core.client.v1.ConsensusStateWithHeight.decode(reader, reader.uint32())); + break; + case 2: + message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryConsensusStatesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.client.v1.QueryConsensusStatesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.client.v1.QueryConsensusStatesResponse} QueryConsensusStatesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryConsensusStatesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryConsensusStatesResponse message. + * @function verify + * @memberof ibc.core.client.v1.QueryConsensusStatesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryConsensusStatesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.consensusStates != null && message.hasOwnProperty("consensusStates")) { + if (!Array.isArray(message.consensusStates)) + return "consensusStates: array expected"; + for (var i = 0; i < message.consensusStates.length; ++i) { + var error = $root.ibc.core.client.v1.ConsensusStateWithHeight.verify(message.consensusStates[i]); + if (error) + return "consensusStates." + error; + } + } + if (message.pagination != null && message.hasOwnProperty("pagination")) { + var error = $root.cosmos.base.query.v1beta1.PageResponse.verify(message.pagination); + if (error) + return "pagination." + error; + } + return null; + }; + + /** + * Creates a QueryConsensusStatesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.client.v1.QueryConsensusStatesResponse + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.client.v1.QueryConsensusStatesResponse} QueryConsensusStatesResponse + */ + QueryConsensusStatesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.client.v1.QueryConsensusStatesResponse) + return object; + var message = new $root.ibc.core.client.v1.QueryConsensusStatesResponse(); + if (object.consensusStates) { + if (!Array.isArray(object.consensusStates)) + throw TypeError(".ibc.core.client.v1.QueryConsensusStatesResponse.consensusStates: array expected"); + message.consensusStates = []; + for (var i = 0; i < object.consensusStates.length; ++i) { + if (typeof object.consensusStates[i] !== "object") + throw TypeError(".ibc.core.client.v1.QueryConsensusStatesResponse.consensusStates: object expected"); + message.consensusStates[i] = $root.ibc.core.client.v1.ConsensusStateWithHeight.fromObject(object.consensusStates[i]); + } + } + if (object.pagination != null) { + if (typeof object.pagination !== "object") + throw TypeError(".ibc.core.client.v1.QueryConsensusStatesResponse.pagination: object expected"); + message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.fromObject(object.pagination); + } + return message; + }; + + /** + * Creates a plain object from a QueryConsensusStatesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.client.v1.QueryConsensusStatesResponse + * @static + * @param {ibc.core.client.v1.QueryConsensusStatesResponse} message QueryConsensusStatesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryConsensusStatesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.consensusStates = []; + if (options.defaults) + object.pagination = null; + if (message.consensusStates && message.consensusStates.length) { + object.consensusStates = []; + for (var j = 0; j < message.consensusStates.length; ++j) + object.consensusStates[j] = $root.ibc.core.client.v1.ConsensusStateWithHeight.toObject(message.consensusStates[j], options); + } + if (message.pagination != null && message.hasOwnProperty("pagination")) + object.pagination = $root.cosmos.base.query.v1beta1.PageResponse.toObject(message.pagination, options); + return object; + }; + + /** + * Converts this QueryConsensusStatesResponse to JSON. + * @function toJSON + * @memberof ibc.core.client.v1.QueryConsensusStatesResponse + * @instance + * @returns {Object.} JSON object + */ + QueryConsensusStatesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryConsensusStatesResponse; + })(v1.QueryConsensusStatesResponse || {}); + + v1.QueryClientParamsRequest = (function(QueryClientParamsRequest) { + + /** + * Properties of a QueryClientParamsRequest. + * @memberof ibc.core.client.v1 + * @interface IQueryClientParamsRequest + */ + + /** + * Constructs a new QueryClientParamsRequest. + * @memberof ibc.core.client.v1 + * @classdesc Represents a QueryClientParamsRequest. + * @implements IQueryClientParamsRequest + * @constructor + * @param {ibc.core.client.v1.IQueryClientParamsRequest=} [properties] Properties to set + */ + function QueryClientParamsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new QueryClientParamsRequest instance using the specified properties. + * @function create + * @memberof ibc.core.client.v1.QueryClientParamsRequest + * @static + * @param {ibc.core.client.v1.IQueryClientParamsRequest=} [properties] Properties to set + * @returns {ibc.core.client.v1.QueryClientParamsRequest} QueryClientParamsRequest instance + */ + QueryClientParamsRequest.create = function create(properties) { + return new QueryClientParamsRequest(properties); + }; + + /** + * Encodes the specified QueryClientParamsRequest message. Does not implicitly {@link ibc.core.client.v1.QueryClientParamsRequest.verify|verify} messages. + * @function encode + * @memberof ibc.core.client.v1.QueryClientParamsRequest + * @static + * @param {ibc.core.client.v1.IQueryClientParamsRequest} message QueryClientParamsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryClientParamsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified QueryClientParamsRequest message, length delimited. Does not implicitly {@link ibc.core.client.v1.QueryClientParamsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.client.v1.QueryClientParamsRequest + * @static + * @param {ibc.core.client.v1.IQueryClientParamsRequest} message QueryClientParamsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryClientParamsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryClientParamsRequest message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.client.v1.QueryClientParamsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.client.v1.QueryClientParamsRequest} QueryClientParamsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryClientParamsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.QueryClientParamsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryClientParamsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.client.v1.QueryClientParamsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.client.v1.QueryClientParamsRequest} QueryClientParamsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryClientParamsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryClientParamsRequest message. + * @function verify + * @memberof ibc.core.client.v1.QueryClientParamsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryClientParamsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a QueryClientParamsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.client.v1.QueryClientParamsRequest + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.client.v1.QueryClientParamsRequest} QueryClientParamsRequest + */ + QueryClientParamsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.client.v1.QueryClientParamsRequest) + return object; + return new $root.ibc.core.client.v1.QueryClientParamsRequest(); + }; + + /** + * Creates a plain object from a QueryClientParamsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.client.v1.QueryClientParamsRequest + * @static + * @param {ibc.core.client.v1.QueryClientParamsRequest} message QueryClientParamsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryClientParamsRequest.toObject = function toObject() { + return {}; + }; + + /** + * Converts this QueryClientParamsRequest to JSON. + * @function toJSON + * @memberof ibc.core.client.v1.QueryClientParamsRequest + * @instance + * @returns {Object.} JSON object + */ + QueryClientParamsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryClientParamsRequest; + })(v1.QueryClientParamsRequest || {}); + + v1.QueryClientParamsResponse = (function(QueryClientParamsResponse) { + + /** + * Properties of a QueryClientParamsResponse. + * @memberof ibc.core.client.v1 + * @interface IQueryClientParamsResponse + * @property {ibc.core.client.v1.IParams|null} [params] QueryClientParamsResponse params + */ + + /** + * Constructs a new QueryClientParamsResponse. + * @memberof ibc.core.client.v1 + * @classdesc Represents a QueryClientParamsResponse. + * @implements IQueryClientParamsResponse + * @constructor + * @param {ibc.core.client.v1.IQueryClientParamsResponse=} [properties] Properties to set + */ + function QueryClientParamsResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryClientParamsResponse params. + * @member {ibc.core.client.v1.IParams|null|undefined} params + * @memberof ibc.core.client.v1.QueryClientParamsResponse + * @instance + */ + QueryClientParamsResponse.prototype.params = null; + + /** + * Creates a new QueryClientParamsResponse instance using the specified properties. + * @function create + * @memberof ibc.core.client.v1.QueryClientParamsResponse + * @static + * @param {ibc.core.client.v1.IQueryClientParamsResponse=} [properties] Properties to set + * @returns {ibc.core.client.v1.QueryClientParamsResponse} QueryClientParamsResponse instance + */ + QueryClientParamsResponse.create = function create(properties) { + return new QueryClientParamsResponse(properties); + }; + + /** + * Encodes the specified QueryClientParamsResponse message. Does not implicitly {@link ibc.core.client.v1.QueryClientParamsResponse.verify|verify} messages. + * @function encode + * @memberof ibc.core.client.v1.QueryClientParamsResponse + * @static + * @param {ibc.core.client.v1.IQueryClientParamsResponse} message QueryClientParamsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryClientParamsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.params != null && Object.hasOwnProperty.call(message, "params")) + $root.ibc.core.client.v1.Params.encode(message.params, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryClientParamsResponse message, length delimited. Does not implicitly {@link ibc.core.client.v1.QueryClientParamsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.client.v1.QueryClientParamsResponse + * @static + * @param {ibc.core.client.v1.IQueryClientParamsResponse} message QueryClientParamsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryClientParamsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryClientParamsResponse message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.client.v1.QueryClientParamsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.client.v1.QueryClientParamsResponse} QueryClientParamsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryClientParamsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.QueryClientParamsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.params = $root.ibc.core.client.v1.Params.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryClientParamsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.client.v1.QueryClientParamsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.client.v1.QueryClientParamsResponse} QueryClientParamsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryClientParamsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryClientParamsResponse message. + * @function verify + * @memberof ibc.core.client.v1.QueryClientParamsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryClientParamsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.params != null && message.hasOwnProperty("params")) { + var error = $root.ibc.core.client.v1.Params.verify(message.params); + if (error) + return "params." + error; + } + return null; + }; + + /** + * Creates a QueryClientParamsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.client.v1.QueryClientParamsResponse + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.client.v1.QueryClientParamsResponse} QueryClientParamsResponse + */ + QueryClientParamsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.client.v1.QueryClientParamsResponse) + return object; + var message = new $root.ibc.core.client.v1.QueryClientParamsResponse(); + if (object.params != null) { + if (typeof object.params !== "object") + throw TypeError(".ibc.core.client.v1.QueryClientParamsResponse.params: object expected"); + message.params = $root.ibc.core.client.v1.Params.fromObject(object.params); + } + return message; + }; + + /** + * Creates a plain object from a QueryClientParamsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.client.v1.QueryClientParamsResponse + * @static + * @param {ibc.core.client.v1.QueryClientParamsResponse} message QueryClientParamsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryClientParamsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.params = null; + if (message.params != null && message.hasOwnProperty("params")) + object.params = $root.ibc.core.client.v1.Params.toObject(message.params, options); + return object; + }; + + /** + * Converts this QueryClientParamsResponse to JSON. + * @function toJSON + * @memberof ibc.core.client.v1.QueryClientParamsResponse + * @instance + * @returns {Object.} JSON object + */ + QueryClientParamsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryClientParamsResponse; + })(v1.QueryClientParamsResponse || {}); + + v1.Msg = (function(Msg) { + + /** + * Constructs a new Msg service. + * @memberof ibc.core.client.v1 + * @classdesc Represents a Msg + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Msg(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Msg.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Msg; + + /** + * Creates new Msg service using the specified rpc implementation. + * @function create + * @memberof ibc.core.client.v1.Msg + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Msg} RPC service. Useful where requests and/or responses are streamed. + */ + Msg.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link ibc.core.client.v1.Msg#createClient}. + * @memberof ibc.core.client.v1.Msg + * @typedef CreateClientCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {ibc.core.client.v1.IMsgCreateClientResponse} [response] MsgCreateClientResponse + */ + + /** + * Calls CreateClient. + * @function createClient + * @memberof ibc.core.client.v1.Msg + * @instance + * @param {ibc.core.client.v1.IMsgCreateClient} request MsgCreateClient message or plain object + * @param {ibc.core.client.v1.Msg.CreateClientCallback} callback Node-style callback called with the error, if any, and MsgCreateClientResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Msg.prototype.createClient = function createClient(request, callback) { + return this.rpcCall(createClient, $root.ibc.core.client.v1.MsgCreateClient, $root.ibc.core.client.v1.MsgCreateClientResponse, request, callback); + }, "name", { value: "CreateClient" }); + + /** + * Calls CreateClient. + * @function createClient + * @memberof ibc.core.client.v1.Msg + * @instance + * @param {ibc.core.client.v1.IMsgCreateClient} request MsgCreateClient message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link ibc.core.client.v1.Msg#updateClient}. + * @memberof ibc.core.client.v1.Msg + * @typedef UpdateClientCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {ibc.core.client.v1.IMsgUpdateClientResponse} [response] MsgUpdateClientResponse + */ + + /** + * Calls UpdateClient. + * @function updateClient + * @memberof ibc.core.client.v1.Msg + * @instance + * @param {ibc.core.client.v1.IMsgUpdateClient} request MsgUpdateClient message or plain object + * @param {ibc.core.client.v1.Msg.UpdateClientCallback} callback Node-style callback called with the error, if any, and MsgUpdateClientResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Msg.prototype.updateClient = function updateClient(request, callback) { + return this.rpcCall(updateClient, $root.ibc.core.client.v1.MsgUpdateClient, $root.ibc.core.client.v1.MsgUpdateClientResponse, request, callback); + }, "name", { value: "UpdateClient" }); + + /** + * Calls UpdateClient. + * @function updateClient + * @memberof ibc.core.client.v1.Msg + * @instance + * @param {ibc.core.client.v1.IMsgUpdateClient} request MsgUpdateClient message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link ibc.core.client.v1.Msg#upgradeClient}. + * @memberof ibc.core.client.v1.Msg + * @typedef UpgradeClientCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {ibc.core.client.v1.IMsgUpgradeClientResponse} [response] MsgUpgradeClientResponse + */ + + /** + * Calls UpgradeClient. + * @function upgradeClient + * @memberof ibc.core.client.v1.Msg + * @instance + * @param {ibc.core.client.v1.IMsgUpgradeClient} request MsgUpgradeClient message or plain object + * @param {ibc.core.client.v1.Msg.UpgradeClientCallback} callback Node-style callback called with the error, if any, and MsgUpgradeClientResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Msg.prototype.upgradeClient = function upgradeClient(request, callback) { + return this.rpcCall(upgradeClient, $root.ibc.core.client.v1.MsgUpgradeClient, $root.ibc.core.client.v1.MsgUpgradeClientResponse, request, callback); + }, "name", { value: "UpgradeClient" }); + + /** + * Calls UpgradeClient. + * @function upgradeClient + * @memberof ibc.core.client.v1.Msg + * @instance + * @param {ibc.core.client.v1.IMsgUpgradeClient} request MsgUpgradeClient message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link ibc.core.client.v1.Msg#submitMisbehaviour}. + * @memberof ibc.core.client.v1.Msg + * @typedef SubmitMisbehaviourCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {ibc.core.client.v1.IMsgSubmitMisbehaviourResponse} [response] MsgSubmitMisbehaviourResponse + */ + + /** + * Calls SubmitMisbehaviour. + * @function submitMisbehaviour + * @memberof ibc.core.client.v1.Msg + * @instance + * @param {ibc.core.client.v1.IMsgSubmitMisbehaviour} request MsgSubmitMisbehaviour message or plain object + * @param {ibc.core.client.v1.Msg.SubmitMisbehaviourCallback} callback Node-style callback called with the error, if any, and MsgSubmitMisbehaviourResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Msg.prototype.submitMisbehaviour = function submitMisbehaviour(request, callback) { + return this.rpcCall(submitMisbehaviour, $root.ibc.core.client.v1.MsgSubmitMisbehaviour, $root.ibc.core.client.v1.MsgSubmitMisbehaviourResponse, request, callback); + }, "name", { value: "SubmitMisbehaviour" }); + + /** + * Calls SubmitMisbehaviour. + * @function submitMisbehaviour + * @memberof ibc.core.client.v1.Msg + * @instance + * @param {ibc.core.client.v1.IMsgSubmitMisbehaviour} request MsgSubmitMisbehaviour message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Msg; + })(v1.Msg || {}); + + v1.MsgCreateClient = (function(MsgCreateClient) { + + /** + * Properties of a MsgCreateClient. + * @memberof ibc.core.client.v1 + * @interface IMsgCreateClient + * @property {google.protobuf.IAny|null} [clientState] MsgCreateClient clientState + * @property {google.protobuf.IAny|null} [consensusState] MsgCreateClient consensusState + * @property {string|null} [signer] MsgCreateClient signer + */ + + /** + * Constructs a new MsgCreateClient. + * @memberof ibc.core.client.v1 + * @classdesc Represents a MsgCreateClient. + * @implements IMsgCreateClient + * @constructor + * @param {ibc.core.client.v1.IMsgCreateClient=} [properties] Properties to set + */ + function MsgCreateClient(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgCreateClient clientState. + * @member {google.protobuf.IAny|null|undefined} clientState + * @memberof ibc.core.client.v1.MsgCreateClient + * @instance + */ + MsgCreateClient.prototype.clientState = null; + + /** + * MsgCreateClient consensusState. + * @member {google.protobuf.IAny|null|undefined} consensusState + * @memberof ibc.core.client.v1.MsgCreateClient + * @instance + */ + MsgCreateClient.prototype.consensusState = null; + + /** + * MsgCreateClient signer. + * @member {string} signer + * @memberof ibc.core.client.v1.MsgCreateClient + * @instance + */ + MsgCreateClient.prototype.signer = ""; + + /** + * Creates a new MsgCreateClient instance using the specified properties. + * @function create + * @memberof ibc.core.client.v1.MsgCreateClient + * @static + * @param {ibc.core.client.v1.IMsgCreateClient=} [properties] Properties to set + * @returns {ibc.core.client.v1.MsgCreateClient} MsgCreateClient instance + */ + MsgCreateClient.create = function create(properties) { + return new MsgCreateClient(properties); + }; + + /** + * Encodes the specified MsgCreateClient message. Does not implicitly {@link ibc.core.client.v1.MsgCreateClient.verify|verify} messages. + * @function encode + * @memberof ibc.core.client.v1.MsgCreateClient + * @static + * @param {ibc.core.client.v1.IMsgCreateClient} message MsgCreateClient message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgCreateClient.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.clientState != null && Object.hasOwnProperty.call(message, "clientState")) + $root.google.protobuf.Any.encode(message.clientState, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.consensusState != null && Object.hasOwnProperty.call(message, "consensusState")) + $root.google.protobuf.Any.encode(message.consensusState, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.signer); + return writer; + }; + + /** + * Encodes the specified MsgCreateClient message, length delimited. Does not implicitly {@link ibc.core.client.v1.MsgCreateClient.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.client.v1.MsgCreateClient + * @static + * @param {ibc.core.client.v1.IMsgCreateClient} message MsgCreateClient message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgCreateClient.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgCreateClient message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.client.v1.MsgCreateClient + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.client.v1.MsgCreateClient} MsgCreateClient + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgCreateClient.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.MsgCreateClient(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.clientState = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + case 2: + message.consensusState = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + case 3: + message.signer = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgCreateClient message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.client.v1.MsgCreateClient + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.client.v1.MsgCreateClient} MsgCreateClient + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgCreateClient.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgCreateClient message. + * @function verify + * @memberof ibc.core.client.v1.MsgCreateClient + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgCreateClient.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.clientState != null && message.hasOwnProperty("clientState")) { + var error = $root.google.protobuf.Any.verify(message.clientState); + if (error) + return "clientState." + error; + } + if (message.consensusState != null && message.hasOwnProperty("consensusState")) { + var error = $root.google.protobuf.Any.verify(message.consensusState); + if (error) + return "consensusState." + error; + } + if (message.signer != null && message.hasOwnProperty("signer")) + if (!$util.isString(message.signer)) + return "signer: string expected"; + return null; + }; + + /** + * Creates a MsgCreateClient message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.client.v1.MsgCreateClient + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.client.v1.MsgCreateClient} MsgCreateClient + */ + MsgCreateClient.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.client.v1.MsgCreateClient) + return object; + var message = new $root.ibc.core.client.v1.MsgCreateClient(); + if (object.clientState != null) { + if (typeof object.clientState !== "object") + throw TypeError(".ibc.core.client.v1.MsgCreateClient.clientState: object expected"); + message.clientState = $root.google.protobuf.Any.fromObject(object.clientState); + } + if (object.consensusState != null) { + if (typeof object.consensusState !== "object") + throw TypeError(".ibc.core.client.v1.MsgCreateClient.consensusState: object expected"); + message.consensusState = $root.google.protobuf.Any.fromObject(object.consensusState); + } + if (object.signer != null) + message.signer = String(object.signer); + return message; + }; + + /** + * Creates a plain object from a MsgCreateClient message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.client.v1.MsgCreateClient + * @static + * @param {ibc.core.client.v1.MsgCreateClient} message MsgCreateClient + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgCreateClient.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.clientState = null; + object.consensusState = null; + object.signer = ""; + } + if (message.clientState != null && message.hasOwnProperty("clientState")) + object.clientState = $root.google.protobuf.Any.toObject(message.clientState, options); + if (message.consensusState != null && message.hasOwnProperty("consensusState")) + object.consensusState = $root.google.protobuf.Any.toObject(message.consensusState, options); + if (message.signer != null && message.hasOwnProperty("signer")) + object.signer = message.signer; + return object; + }; + + /** + * Converts this MsgCreateClient to JSON. + * @function toJSON + * @memberof ibc.core.client.v1.MsgCreateClient + * @instance + * @returns {Object.} JSON object + */ + MsgCreateClient.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgCreateClient; + })(v1.MsgCreateClient || {}); + + v1.MsgCreateClientResponse = (function(MsgCreateClientResponse) { + + /** + * Properties of a MsgCreateClientResponse. + * @memberof ibc.core.client.v1 + * @interface IMsgCreateClientResponse + */ + + /** + * Constructs a new MsgCreateClientResponse. + * @memberof ibc.core.client.v1 + * @classdesc Represents a MsgCreateClientResponse. + * @implements IMsgCreateClientResponse + * @constructor + * @param {ibc.core.client.v1.IMsgCreateClientResponse=} [properties] Properties to set + */ + function MsgCreateClientResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new MsgCreateClientResponse instance using the specified properties. + * @function create + * @memberof ibc.core.client.v1.MsgCreateClientResponse + * @static + * @param {ibc.core.client.v1.IMsgCreateClientResponse=} [properties] Properties to set + * @returns {ibc.core.client.v1.MsgCreateClientResponse} MsgCreateClientResponse instance + */ + MsgCreateClientResponse.create = function create(properties) { + return new MsgCreateClientResponse(properties); + }; + + /** + * Encodes the specified MsgCreateClientResponse message. Does not implicitly {@link ibc.core.client.v1.MsgCreateClientResponse.verify|verify} messages. + * @function encode + * @memberof ibc.core.client.v1.MsgCreateClientResponse + * @static + * @param {ibc.core.client.v1.IMsgCreateClientResponse} message MsgCreateClientResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgCreateClientResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MsgCreateClientResponse message, length delimited. Does not implicitly {@link ibc.core.client.v1.MsgCreateClientResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.client.v1.MsgCreateClientResponse + * @static + * @param {ibc.core.client.v1.IMsgCreateClientResponse} message MsgCreateClientResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgCreateClientResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgCreateClientResponse message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.client.v1.MsgCreateClientResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.client.v1.MsgCreateClientResponse} MsgCreateClientResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgCreateClientResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.MsgCreateClientResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgCreateClientResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.client.v1.MsgCreateClientResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.client.v1.MsgCreateClientResponse} MsgCreateClientResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgCreateClientResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgCreateClientResponse message. + * @function verify + * @memberof ibc.core.client.v1.MsgCreateClientResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgCreateClientResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MsgCreateClientResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.client.v1.MsgCreateClientResponse + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.client.v1.MsgCreateClientResponse} MsgCreateClientResponse + */ + MsgCreateClientResponse.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.client.v1.MsgCreateClientResponse) + return object; + return new $root.ibc.core.client.v1.MsgCreateClientResponse(); + }; + + /** + * Creates a plain object from a MsgCreateClientResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.client.v1.MsgCreateClientResponse + * @static + * @param {ibc.core.client.v1.MsgCreateClientResponse} message MsgCreateClientResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgCreateClientResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MsgCreateClientResponse to JSON. + * @function toJSON + * @memberof ibc.core.client.v1.MsgCreateClientResponse + * @instance + * @returns {Object.} JSON object + */ + MsgCreateClientResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgCreateClientResponse; + })(v1.MsgCreateClientResponse || {}); + + v1.MsgUpdateClient = (function(MsgUpdateClient) { + + /** + * Properties of a MsgUpdateClient. + * @memberof ibc.core.client.v1 + * @interface IMsgUpdateClient + * @property {string|null} [clientId] MsgUpdateClient clientId + * @property {google.protobuf.IAny|null} [header] MsgUpdateClient header + * @property {string|null} [signer] MsgUpdateClient signer + */ + + /** + * Constructs a new MsgUpdateClient. + * @memberof ibc.core.client.v1 + * @classdesc Represents a MsgUpdateClient. + * @implements IMsgUpdateClient + * @constructor + * @param {ibc.core.client.v1.IMsgUpdateClient=} [properties] Properties to set + */ + function MsgUpdateClient(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgUpdateClient clientId. + * @member {string} clientId + * @memberof ibc.core.client.v1.MsgUpdateClient + * @instance + */ + MsgUpdateClient.prototype.clientId = ""; + + /** + * MsgUpdateClient header. + * @member {google.protobuf.IAny|null|undefined} header + * @memberof ibc.core.client.v1.MsgUpdateClient + * @instance + */ + MsgUpdateClient.prototype.header = null; + + /** + * MsgUpdateClient signer. + * @member {string} signer + * @memberof ibc.core.client.v1.MsgUpdateClient + * @instance + */ + MsgUpdateClient.prototype.signer = ""; + + /** + * Creates a new MsgUpdateClient instance using the specified properties. + * @function create + * @memberof ibc.core.client.v1.MsgUpdateClient + * @static + * @param {ibc.core.client.v1.IMsgUpdateClient=} [properties] Properties to set + * @returns {ibc.core.client.v1.MsgUpdateClient} MsgUpdateClient instance + */ + MsgUpdateClient.create = function create(properties) { + return new MsgUpdateClient(properties); + }; + + /** + * Encodes the specified MsgUpdateClient message. Does not implicitly {@link ibc.core.client.v1.MsgUpdateClient.verify|verify} messages. + * @function encode + * @memberof ibc.core.client.v1.MsgUpdateClient + * @static + * @param {ibc.core.client.v1.IMsgUpdateClient} message MsgUpdateClient message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgUpdateClient.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.clientId != null && Object.hasOwnProperty.call(message, "clientId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.clientId); + if (message.header != null && Object.hasOwnProperty.call(message, "header")) + $root.google.protobuf.Any.encode(message.header, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.signer); + return writer; + }; + + /** + * Encodes the specified MsgUpdateClient message, length delimited. Does not implicitly {@link ibc.core.client.v1.MsgUpdateClient.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.client.v1.MsgUpdateClient + * @static + * @param {ibc.core.client.v1.IMsgUpdateClient} message MsgUpdateClient message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgUpdateClient.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgUpdateClient message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.client.v1.MsgUpdateClient + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.client.v1.MsgUpdateClient} MsgUpdateClient + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgUpdateClient.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.MsgUpdateClient(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.clientId = reader.string(); + break; + case 2: + message.header = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + case 3: + message.signer = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgUpdateClient message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.client.v1.MsgUpdateClient + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.client.v1.MsgUpdateClient} MsgUpdateClient + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgUpdateClient.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgUpdateClient message. + * @function verify + * @memberof ibc.core.client.v1.MsgUpdateClient + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgUpdateClient.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.clientId != null && message.hasOwnProperty("clientId")) + if (!$util.isString(message.clientId)) + return "clientId: string expected"; + if (message.header != null && message.hasOwnProperty("header")) { + var error = $root.google.protobuf.Any.verify(message.header); + if (error) + return "header." + error; + } + if (message.signer != null && message.hasOwnProperty("signer")) + if (!$util.isString(message.signer)) + return "signer: string expected"; + return null; + }; + + /** + * Creates a MsgUpdateClient message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.client.v1.MsgUpdateClient + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.client.v1.MsgUpdateClient} MsgUpdateClient + */ + MsgUpdateClient.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.client.v1.MsgUpdateClient) + return object; + var message = new $root.ibc.core.client.v1.MsgUpdateClient(); + if (object.clientId != null) + message.clientId = String(object.clientId); + if (object.header != null) { + if (typeof object.header !== "object") + throw TypeError(".ibc.core.client.v1.MsgUpdateClient.header: object expected"); + message.header = $root.google.protobuf.Any.fromObject(object.header); + } + if (object.signer != null) + message.signer = String(object.signer); + return message; + }; + + /** + * Creates a plain object from a MsgUpdateClient message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.client.v1.MsgUpdateClient + * @static + * @param {ibc.core.client.v1.MsgUpdateClient} message MsgUpdateClient + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgUpdateClient.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.clientId = ""; + object.header = null; + object.signer = ""; + } + if (message.clientId != null && message.hasOwnProperty("clientId")) + object.clientId = message.clientId; + if (message.header != null && message.hasOwnProperty("header")) + object.header = $root.google.protobuf.Any.toObject(message.header, options); + if (message.signer != null && message.hasOwnProperty("signer")) + object.signer = message.signer; + return object; + }; + + /** + * Converts this MsgUpdateClient to JSON. + * @function toJSON + * @memberof ibc.core.client.v1.MsgUpdateClient + * @instance + * @returns {Object.} JSON object + */ + MsgUpdateClient.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgUpdateClient; + })(v1.MsgUpdateClient || {}); + + v1.MsgUpdateClientResponse = (function(MsgUpdateClientResponse) { + + /** + * Properties of a MsgUpdateClientResponse. + * @memberof ibc.core.client.v1 + * @interface IMsgUpdateClientResponse + */ + + /** + * Constructs a new MsgUpdateClientResponse. + * @memberof ibc.core.client.v1 + * @classdesc Represents a MsgUpdateClientResponse. + * @implements IMsgUpdateClientResponse + * @constructor + * @param {ibc.core.client.v1.IMsgUpdateClientResponse=} [properties] Properties to set + */ + function MsgUpdateClientResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new MsgUpdateClientResponse instance using the specified properties. + * @function create + * @memberof ibc.core.client.v1.MsgUpdateClientResponse + * @static + * @param {ibc.core.client.v1.IMsgUpdateClientResponse=} [properties] Properties to set + * @returns {ibc.core.client.v1.MsgUpdateClientResponse} MsgUpdateClientResponse instance + */ + MsgUpdateClientResponse.create = function create(properties) { + return new MsgUpdateClientResponse(properties); + }; + + /** + * Encodes the specified MsgUpdateClientResponse message. Does not implicitly {@link ibc.core.client.v1.MsgUpdateClientResponse.verify|verify} messages. + * @function encode + * @memberof ibc.core.client.v1.MsgUpdateClientResponse + * @static + * @param {ibc.core.client.v1.IMsgUpdateClientResponse} message MsgUpdateClientResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgUpdateClientResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MsgUpdateClientResponse message, length delimited. Does not implicitly {@link ibc.core.client.v1.MsgUpdateClientResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.client.v1.MsgUpdateClientResponse + * @static + * @param {ibc.core.client.v1.IMsgUpdateClientResponse} message MsgUpdateClientResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgUpdateClientResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgUpdateClientResponse message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.client.v1.MsgUpdateClientResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.client.v1.MsgUpdateClientResponse} MsgUpdateClientResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgUpdateClientResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.MsgUpdateClientResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgUpdateClientResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.client.v1.MsgUpdateClientResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.client.v1.MsgUpdateClientResponse} MsgUpdateClientResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgUpdateClientResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgUpdateClientResponse message. + * @function verify + * @memberof ibc.core.client.v1.MsgUpdateClientResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgUpdateClientResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MsgUpdateClientResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.client.v1.MsgUpdateClientResponse + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.client.v1.MsgUpdateClientResponse} MsgUpdateClientResponse + */ + MsgUpdateClientResponse.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.client.v1.MsgUpdateClientResponse) + return object; + return new $root.ibc.core.client.v1.MsgUpdateClientResponse(); + }; + + /** + * Creates a plain object from a MsgUpdateClientResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.client.v1.MsgUpdateClientResponse + * @static + * @param {ibc.core.client.v1.MsgUpdateClientResponse} message MsgUpdateClientResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgUpdateClientResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MsgUpdateClientResponse to JSON. + * @function toJSON + * @memberof ibc.core.client.v1.MsgUpdateClientResponse + * @instance + * @returns {Object.} JSON object + */ + MsgUpdateClientResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgUpdateClientResponse; + })(v1.MsgUpdateClientResponse || {}); + + v1.MsgUpgradeClient = (function(MsgUpgradeClient) { + + /** + * Properties of a MsgUpgradeClient. + * @memberof ibc.core.client.v1 + * @interface IMsgUpgradeClient + * @property {string|null} [clientId] MsgUpgradeClient clientId + * @property {google.protobuf.IAny|null} [clientState] MsgUpgradeClient clientState + * @property {google.protobuf.IAny|null} [consensusState] MsgUpgradeClient consensusState + * @property {Uint8Array|null} [proofUpgradeClient] MsgUpgradeClient proofUpgradeClient + * @property {Uint8Array|null} [proofUpgradeConsensusState] MsgUpgradeClient proofUpgradeConsensusState + * @property {string|null} [signer] MsgUpgradeClient signer + */ + + /** + * Constructs a new MsgUpgradeClient. + * @memberof ibc.core.client.v1 + * @classdesc Represents a MsgUpgradeClient. + * @implements IMsgUpgradeClient + * @constructor + * @param {ibc.core.client.v1.IMsgUpgradeClient=} [properties] Properties to set + */ + function MsgUpgradeClient(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgUpgradeClient clientId. + * @member {string} clientId + * @memberof ibc.core.client.v1.MsgUpgradeClient + * @instance + */ + MsgUpgradeClient.prototype.clientId = ""; + + /** + * MsgUpgradeClient clientState. + * @member {google.protobuf.IAny|null|undefined} clientState + * @memberof ibc.core.client.v1.MsgUpgradeClient + * @instance + */ + MsgUpgradeClient.prototype.clientState = null; + + /** + * MsgUpgradeClient consensusState. + * @member {google.protobuf.IAny|null|undefined} consensusState + * @memberof ibc.core.client.v1.MsgUpgradeClient + * @instance + */ + MsgUpgradeClient.prototype.consensusState = null; + + /** + * MsgUpgradeClient proofUpgradeClient. + * @member {Uint8Array} proofUpgradeClient + * @memberof ibc.core.client.v1.MsgUpgradeClient + * @instance + */ + MsgUpgradeClient.prototype.proofUpgradeClient = $util.newBuffer([]); + + /** + * MsgUpgradeClient proofUpgradeConsensusState. + * @member {Uint8Array} proofUpgradeConsensusState + * @memberof ibc.core.client.v1.MsgUpgradeClient + * @instance + */ + MsgUpgradeClient.prototype.proofUpgradeConsensusState = $util.newBuffer([]); + + /** + * MsgUpgradeClient signer. + * @member {string} signer + * @memberof ibc.core.client.v1.MsgUpgradeClient + * @instance + */ + MsgUpgradeClient.prototype.signer = ""; + + /** + * Creates a new MsgUpgradeClient instance using the specified properties. + * @function create + * @memberof ibc.core.client.v1.MsgUpgradeClient + * @static + * @param {ibc.core.client.v1.IMsgUpgradeClient=} [properties] Properties to set + * @returns {ibc.core.client.v1.MsgUpgradeClient} MsgUpgradeClient instance + */ + MsgUpgradeClient.create = function create(properties) { + return new MsgUpgradeClient(properties); + }; + + /** + * Encodes the specified MsgUpgradeClient message. Does not implicitly {@link ibc.core.client.v1.MsgUpgradeClient.verify|verify} messages. + * @function encode + * @memberof ibc.core.client.v1.MsgUpgradeClient + * @static + * @param {ibc.core.client.v1.IMsgUpgradeClient} message MsgUpgradeClient message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgUpgradeClient.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.clientId != null && Object.hasOwnProperty.call(message, "clientId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.clientId); + if (message.clientState != null && Object.hasOwnProperty.call(message, "clientState")) + $root.google.protobuf.Any.encode(message.clientState, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.consensusState != null && Object.hasOwnProperty.call(message, "consensusState")) + $root.google.protobuf.Any.encode(message.consensusState, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.proofUpgradeClient != null && Object.hasOwnProperty.call(message, "proofUpgradeClient")) + writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.proofUpgradeClient); + if (message.proofUpgradeConsensusState != null && Object.hasOwnProperty.call(message, "proofUpgradeConsensusState")) + writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.proofUpgradeConsensusState); + if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.signer); + return writer; + }; + + /** + * Encodes the specified MsgUpgradeClient message, length delimited. Does not implicitly {@link ibc.core.client.v1.MsgUpgradeClient.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.client.v1.MsgUpgradeClient + * @static + * @param {ibc.core.client.v1.IMsgUpgradeClient} message MsgUpgradeClient message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgUpgradeClient.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgUpgradeClient message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.client.v1.MsgUpgradeClient + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.client.v1.MsgUpgradeClient} MsgUpgradeClient + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgUpgradeClient.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.MsgUpgradeClient(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.clientId = reader.string(); + break; + case 2: + message.clientState = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + case 3: + message.consensusState = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + case 4: + message.proofUpgradeClient = reader.bytes(); + break; + case 5: + message.proofUpgradeConsensusState = reader.bytes(); + break; + case 6: + message.signer = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgUpgradeClient message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.client.v1.MsgUpgradeClient + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.client.v1.MsgUpgradeClient} MsgUpgradeClient + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgUpgradeClient.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgUpgradeClient message. + * @function verify + * @memberof ibc.core.client.v1.MsgUpgradeClient + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgUpgradeClient.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.clientId != null && message.hasOwnProperty("clientId")) + if (!$util.isString(message.clientId)) + return "clientId: string expected"; + if (message.clientState != null && message.hasOwnProperty("clientState")) { + var error = $root.google.protobuf.Any.verify(message.clientState); + if (error) + return "clientState." + error; + } + if (message.consensusState != null && message.hasOwnProperty("consensusState")) { + var error = $root.google.protobuf.Any.verify(message.consensusState); + if (error) + return "consensusState." + error; + } + if (message.proofUpgradeClient != null && message.hasOwnProperty("proofUpgradeClient")) + if (!(message.proofUpgradeClient && typeof message.proofUpgradeClient.length === "number" || $util.isString(message.proofUpgradeClient))) + return "proofUpgradeClient: buffer expected"; + if (message.proofUpgradeConsensusState != null && message.hasOwnProperty("proofUpgradeConsensusState")) + if (!(message.proofUpgradeConsensusState && typeof message.proofUpgradeConsensusState.length === "number" || $util.isString(message.proofUpgradeConsensusState))) + return "proofUpgradeConsensusState: buffer expected"; + if (message.signer != null && message.hasOwnProperty("signer")) + if (!$util.isString(message.signer)) + return "signer: string expected"; + return null; + }; + + /** + * Creates a MsgUpgradeClient message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.client.v1.MsgUpgradeClient + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.client.v1.MsgUpgradeClient} MsgUpgradeClient + */ + MsgUpgradeClient.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.client.v1.MsgUpgradeClient) + return object; + var message = new $root.ibc.core.client.v1.MsgUpgradeClient(); + if (object.clientId != null) + message.clientId = String(object.clientId); + if (object.clientState != null) { + if (typeof object.clientState !== "object") + throw TypeError(".ibc.core.client.v1.MsgUpgradeClient.clientState: object expected"); + message.clientState = $root.google.protobuf.Any.fromObject(object.clientState); + } + if (object.consensusState != null) { + if (typeof object.consensusState !== "object") + throw TypeError(".ibc.core.client.v1.MsgUpgradeClient.consensusState: object expected"); + message.consensusState = $root.google.protobuf.Any.fromObject(object.consensusState); + } + if (object.proofUpgradeClient != null) + if (typeof object.proofUpgradeClient === "string") + $util.base64.decode(object.proofUpgradeClient, message.proofUpgradeClient = $util.newBuffer($util.base64.length(object.proofUpgradeClient)), 0); + else if (object.proofUpgradeClient.length) + message.proofUpgradeClient = object.proofUpgradeClient; + if (object.proofUpgradeConsensusState != null) + if (typeof object.proofUpgradeConsensusState === "string") + $util.base64.decode(object.proofUpgradeConsensusState, message.proofUpgradeConsensusState = $util.newBuffer($util.base64.length(object.proofUpgradeConsensusState)), 0); + else if (object.proofUpgradeConsensusState.length) + message.proofUpgradeConsensusState = object.proofUpgradeConsensusState; + if (object.signer != null) + message.signer = String(object.signer); + return message; + }; + + /** + * Creates a plain object from a MsgUpgradeClient message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.client.v1.MsgUpgradeClient + * @static + * @param {ibc.core.client.v1.MsgUpgradeClient} message MsgUpgradeClient + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgUpgradeClient.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.clientId = ""; + object.clientState = null; + object.consensusState = null; + if (options.bytes === String) + object.proofUpgradeClient = ""; + else { + object.proofUpgradeClient = []; + if (options.bytes !== Array) + object.proofUpgradeClient = $util.newBuffer(object.proofUpgradeClient); + } + if (options.bytes === String) + object.proofUpgradeConsensusState = ""; + else { + object.proofUpgradeConsensusState = []; + if (options.bytes !== Array) + object.proofUpgradeConsensusState = $util.newBuffer(object.proofUpgradeConsensusState); + } + object.signer = ""; + } + if (message.clientId != null && message.hasOwnProperty("clientId")) + object.clientId = message.clientId; + if (message.clientState != null && message.hasOwnProperty("clientState")) + object.clientState = $root.google.protobuf.Any.toObject(message.clientState, options); + if (message.consensusState != null && message.hasOwnProperty("consensusState")) + object.consensusState = $root.google.protobuf.Any.toObject(message.consensusState, options); + if (message.proofUpgradeClient != null && message.hasOwnProperty("proofUpgradeClient")) + object.proofUpgradeClient = options.bytes === String ? $util.base64.encode(message.proofUpgradeClient, 0, message.proofUpgradeClient.length) : options.bytes === Array ? Array.prototype.slice.call(message.proofUpgradeClient) : message.proofUpgradeClient; + if (message.proofUpgradeConsensusState != null && message.hasOwnProperty("proofUpgradeConsensusState")) + object.proofUpgradeConsensusState = options.bytes === String ? $util.base64.encode(message.proofUpgradeConsensusState, 0, message.proofUpgradeConsensusState.length) : options.bytes === Array ? Array.prototype.slice.call(message.proofUpgradeConsensusState) : message.proofUpgradeConsensusState; + if (message.signer != null && message.hasOwnProperty("signer")) + object.signer = message.signer; + return object; + }; + + /** + * Converts this MsgUpgradeClient to JSON. + * @function toJSON + * @memberof ibc.core.client.v1.MsgUpgradeClient + * @instance + * @returns {Object.} JSON object + */ + MsgUpgradeClient.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgUpgradeClient; + })(v1.MsgUpgradeClient || {}); + + v1.MsgUpgradeClientResponse = (function(MsgUpgradeClientResponse) { + + /** + * Properties of a MsgUpgradeClientResponse. + * @memberof ibc.core.client.v1 + * @interface IMsgUpgradeClientResponse + */ + + /** + * Constructs a new MsgUpgradeClientResponse. + * @memberof ibc.core.client.v1 + * @classdesc Represents a MsgUpgradeClientResponse. + * @implements IMsgUpgradeClientResponse + * @constructor + * @param {ibc.core.client.v1.IMsgUpgradeClientResponse=} [properties] Properties to set + */ + function MsgUpgradeClientResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new MsgUpgradeClientResponse instance using the specified properties. + * @function create + * @memberof ibc.core.client.v1.MsgUpgradeClientResponse + * @static + * @param {ibc.core.client.v1.IMsgUpgradeClientResponse=} [properties] Properties to set + * @returns {ibc.core.client.v1.MsgUpgradeClientResponse} MsgUpgradeClientResponse instance + */ + MsgUpgradeClientResponse.create = function create(properties) { + return new MsgUpgradeClientResponse(properties); + }; + + /** + * Encodes the specified MsgUpgradeClientResponse message. Does not implicitly {@link ibc.core.client.v1.MsgUpgradeClientResponse.verify|verify} messages. + * @function encode + * @memberof ibc.core.client.v1.MsgUpgradeClientResponse + * @static + * @param {ibc.core.client.v1.IMsgUpgradeClientResponse} message MsgUpgradeClientResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgUpgradeClientResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MsgUpgradeClientResponse message, length delimited. Does not implicitly {@link ibc.core.client.v1.MsgUpgradeClientResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.client.v1.MsgUpgradeClientResponse + * @static + * @param {ibc.core.client.v1.IMsgUpgradeClientResponse} message MsgUpgradeClientResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgUpgradeClientResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgUpgradeClientResponse message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.client.v1.MsgUpgradeClientResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.client.v1.MsgUpgradeClientResponse} MsgUpgradeClientResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgUpgradeClientResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.MsgUpgradeClientResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgUpgradeClientResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.client.v1.MsgUpgradeClientResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.client.v1.MsgUpgradeClientResponse} MsgUpgradeClientResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgUpgradeClientResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgUpgradeClientResponse message. + * @function verify + * @memberof ibc.core.client.v1.MsgUpgradeClientResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgUpgradeClientResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MsgUpgradeClientResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.client.v1.MsgUpgradeClientResponse + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.client.v1.MsgUpgradeClientResponse} MsgUpgradeClientResponse + */ + MsgUpgradeClientResponse.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.client.v1.MsgUpgradeClientResponse) + return object; + return new $root.ibc.core.client.v1.MsgUpgradeClientResponse(); + }; + + /** + * Creates a plain object from a MsgUpgradeClientResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.client.v1.MsgUpgradeClientResponse + * @static + * @param {ibc.core.client.v1.MsgUpgradeClientResponse} message MsgUpgradeClientResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgUpgradeClientResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MsgUpgradeClientResponse to JSON. + * @function toJSON + * @memberof ibc.core.client.v1.MsgUpgradeClientResponse + * @instance + * @returns {Object.} JSON object + */ + MsgUpgradeClientResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgUpgradeClientResponse; + })(v1.MsgUpgradeClientResponse || {}); + + v1.MsgSubmitMisbehaviour = (function(MsgSubmitMisbehaviour) { + + /** + * Properties of a MsgSubmitMisbehaviour. + * @memberof ibc.core.client.v1 + * @interface IMsgSubmitMisbehaviour + * @property {string|null} [clientId] MsgSubmitMisbehaviour clientId + * @property {google.protobuf.IAny|null} [misbehaviour] MsgSubmitMisbehaviour misbehaviour + * @property {string|null} [signer] MsgSubmitMisbehaviour signer + */ + + /** + * Constructs a new MsgSubmitMisbehaviour. + * @memberof ibc.core.client.v1 + * @classdesc Represents a MsgSubmitMisbehaviour. + * @implements IMsgSubmitMisbehaviour + * @constructor + * @param {ibc.core.client.v1.IMsgSubmitMisbehaviour=} [properties] Properties to set + */ + function MsgSubmitMisbehaviour(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgSubmitMisbehaviour clientId. + * @member {string} clientId + * @memberof ibc.core.client.v1.MsgSubmitMisbehaviour + * @instance + */ + MsgSubmitMisbehaviour.prototype.clientId = ""; + + /** + * MsgSubmitMisbehaviour misbehaviour. + * @member {google.protobuf.IAny|null|undefined} misbehaviour + * @memberof ibc.core.client.v1.MsgSubmitMisbehaviour + * @instance + */ + MsgSubmitMisbehaviour.prototype.misbehaviour = null; + + /** + * MsgSubmitMisbehaviour signer. + * @member {string} signer + * @memberof ibc.core.client.v1.MsgSubmitMisbehaviour + * @instance + */ + MsgSubmitMisbehaviour.prototype.signer = ""; + + /** + * Creates a new MsgSubmitMisbehaviour instance using the specified properties. + * @function create + * @memberof ibc.core.client.v1.MsgSubmitMisbehaviour + * @static + * @param {ibc.core.client.v1.IMsgSubmitMisbehaviour=} [properties] Properties to set + * @returns {ibc.core.client.v1.MsgSubmitMisbehaviour} MsgSubmitMisbehaviour instance + */ + MsgSubmitMisbehaviour.create = function create(properties) { + return new MsgSubmitMisbehaviour(properties); + }; + + /** + * Encodes the specified MsgSubmitMisbehaviour message. Does not implicitly {@link ibc.core.client.v1.MsgSubmitMisbehaviour.verify|verify} messages. + * @function encode + * @memberof ibc.core.client.v1.MsgSubmitMisbehaviour + * @static + * @param {ibc.core.client.v1.IMsgSubmitMisbehaviour} message MsgSubmitMisbehaviour message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgSubmitMisbehaviour.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.clientId != null && Object.hasOwnProperty.call(message, "clientId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.clientId); + if (message.misbehaviour != null && Object.hasOwnProperty.call(message, "misbehaviour")) + $root.google.protobuf.Any.encode(message.misbehaviour, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.signer); + return writer; + }; + + /** + * Encodes the specified MsgSubmitMisbehaviour message, length delimited. Does not implicitly {@link ibc.core.client.v1.MsgSubmitMisbehaviour.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.client.v1.MsgSubmitMisbehaviour + * @static + * @param {ibc.core.client.v1.IMsgSubmitMisbehaviour} message MsgSubmitMisbehaviour message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgSubmitMisbehaviour.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgSubmitMisbehaviour message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.client.v1.MsgSubmitMisbehaviour + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.client.v1.MsgSubmitMisbehaviour} MsgSubmitMisbehaviour + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgSubmitMisbehaviour.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.MsgSubmitMisbehaviour(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.clientId = reader.string(); + break; + case 2: + message.misbehaviour = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + case 3: + message.signer = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgSubmitMisbehaviour message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.client.v1.MsgSubmitMisbehaviour + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.client.v1.MsgSubmitMisbehaviour} MsgSubmitMisbehaviour + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgSubmitMisbehaviour.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgSubmitMisbehaviour message. + * @function verify + * @memberof ibc.core.client.v1.MsgSubmitMisbehaviour + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgSubmitMisbehaviour.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.clientId != null && message.hasOwnProperty("clientId")) + if (!$util.isString(message.clientId)) + return "clientId: string expected"; + if (message.misbehaviour != null && message.hasOwnProperty("misbehaviour")) { + var error = $root.google.protobuf.Any.verify(message.misbehaviour); + if (error) + return "misbehaviour." + error; + } + if (message.signer != null && message.hasOwnProperty("signer")) + if (!$util.isString(message.signer)) + return "signer: string expected"; + return null; + }; + + /** + * Creates a MsgSubmitMisbehaviour message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.client.v1.MsgSubmitMisbehaviour + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.client.v1.MsgSubmitMisbehaviour} MsgSubmitMisbehaviour + */ + MsgSubmitMisbehaviour.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.client.v1.MsgSubmitMisbehaviour) + return object; + var message = new $root.ibc.core.client.v1.MsgSubmitMisbehaviour(); + if (object.clientId != null) + message.clientId = String(object.clientId); + if (object.misbehaviour != null) { + if (typeof object.misbehaviour !== "object") + throw TypeError(".ibc.core.client.v1.MsgSubmitMisbehaviour.misbehaviour: object expected"); + message.misbehaviour = $root.google.protobuf.Any.fromObject(object.misbehaviour); + } + if (object.signer != null) + message.signer = String(object.signer); + return message; + }; + + /** + * Creates a plain object from a MsgSubmitMisbehaviour message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.client.v1.MsgSubmitMisbehaviour + * @static + * @param {ibc.core.client.v1.MsgSubmitMisbehaviour} message MsgSubmitMisbehaviour + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgSubmitMisbehaviour.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.clientId = ""; + object.misbehaviour = null; + object.signer = ""; + } + if (message.clientId != null && message.hasOwnProperty("clientId")) + object.clientId = message.clientId; + if (message.misbehaviour != null && message.hasOwnProperty("misbehaviour")) + object.misbehaviour = $root.google.protobuf.Any.toObject(message.misbehaviour, options); + if (message.signer != null && message.hasOwnProperty("signer")) + object.signer = message.signer; + return object; + }; + + /** + * Converts this MsgSubmitMisbehaviour to JSON. + * @function toJSON + * @memberof ibc.core.client.v1.MsgSubmitMisbehaviour + * @instance + * @returns {Object.} JSON object + */ + MsgSubmitMisbehaviour.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgSubmitMisbehaviour; + })(v1.MsgSubmitMisbehaviour || {}); + + v1.MsgSubmitMisbehaviourResponse = (function(MsgSubmitMisbehaviourResponse) { + + /** + * Properties of a MsgSubmitMisbehaviourResponse. + * @memberof ibc.core.client.v1 + * @interface IMsgSubmitMisbehaviourResponse + */ + + /** + * Constructs a new MsgSubmitMisbehaviourResponse. + * @memberof ibc.core.client.v1 + * @classdesc Represents a MsgSubmitMisbehaviourResponse. + * @implements IMsgSubmitMisbehaviourResponse + * @constructor + * @param {ibc.core.client.v1.IMsgSubmitMisbehaviourResponse=} [properties] Properties to set + */ + function MsgSubmitMisbehaviourResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new MsgSubmitMisbehaviourResponse instance using the specified properties. + * @function create + * @memberof ibc.core.client.v1.MsgSubmitMisbehaviourResponse + * @static + * @param {ibc.core.client.v1.IMsgSubmitMisbehaviourResponse=} [properties] Properties to set + * @returns {ibc.core.client.v1.MsgSubmitMisbehaviourResponse} MsgSubmitMisbehaviourResponse instance + */ + MsgSubmitMisbehaviourResponse.create = function create(properties) { + return new MsgSubmitMisbehaviourResponse(properties); + }; + + /** + * Encodes the specified MsgSubmitMisbehaviourResponse message. Does not implicitly {@link ibc.core.client.v1.MsgSubmitMisbehaviourResponse.verify|verify} messages. + * @function encode + * @memberof ibc.core.client.v1.MsgSubmitMisbehaviourResponse + * @static + * @param {ibc.core.client.v1.IMsgSubmitMisbehaviourResponse} message MsgSubmitMisbehaviourResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgSubmitMisbehaviourResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MsgSubmitMisbehaviourResponse message, length delimited. Does not implicitly {@link ibc.core.client.v1.MsgSubmitMisbehaviourResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.client.v1.MsgSubmitMisbehaviourResponse + * @static + * @param {ibc.core.client.v1.IMsgSubmitMisbehaviourResponse} message MsgSubmitMisbehaviourResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgSubmitMisbehaviourResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgSubmitMisbehaviourResponse message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.client.v1.MsgSubmitMisbehaviourResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.client.v1.MsgSubmitMisbehaviourResponse} MsgSubmitMisbehaviourResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgSubmitMisbehaviourResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.MsgSubmitMisbehaviourResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgSubmitMisbehaviourResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.client.v1.MsgSubmitMisbehaviourResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.client.v1.MsgSubmitMisbehaviourResponse} MsgSubmitMisbehaviourResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgSubmitMisbehaviourResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgSubmitMisbehaviourResponse message. + * @function verify + * @memberof ibc.core.client.v1.MsgSubmitMisbehaviourResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgSubmitMisbehaviourResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MsgSubmitMisbehaviourResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.client.v1.MsgSubmitMisbehaviourResponse + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.client.v1.MsgSubmitMisbehaviourResponse} MsgSubmitMisbehaviourResponse + */ + MsgSubmitMisbehaviourResponse.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.client.v1.MsgSubmitMisbehaviourResponse) + return object; + return new $root.ibc.core.client.v1.MsgSubmitMisbehaviourResponse(); + }; + + /** + * Creates a plain object from a MsgSubmitMisbehaviourResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.client.v1.MsgSubmitMisbehaviourResponse + * @static + * @param {ibc.core.client.v1.MsgSubmitMisbehaviourResponse} message MsgSubmitMisbehaviourResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgSubmitMisbehaviourResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MsgSubmitMisbehaviourResponse to JSON. + * @function toJSON + * @memberof ibc.core.client.v1.MsgSubmitMisbehaviourResponse + * @instance + * @returns {Object.} JSON object + */ + MsgSubmitMisbehaviourResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgSubmitMisbehaviourResponse; + })(v1.MsgSubmitMisbehaviourResponse || {}); + + return v1; + })(client.v1 || {}); + + return client; + })(core.client || {}); + + return core; + })(ibc.core || {}); + + return ibc; +})($root.ibc || {}); + +module.exports = $root; diff --git a/src/libs/bundle.js b/src/libs/bundle.js new file mode 100644 index 00000000..1f4545a9 --- /dev/null +++ b/src/libs/bundle.js @@ -0,0 +1,46223 @@ +/* eslint-disable */ +"use strict"; + +var $protobuf = require("protobufjs-dbx/minimal"); + +// Common aliases +var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; + +// Exported root namespace +var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {}); + +/** + * Namespace cosmos. + * @exports cosmos + * @namespace + */ + +$root.cosmos = (function(cosmos) { + + /** + * Namespace base. + * @memberof cosmos + * @namespace + */ + + cosmos.base = (function(base) { + + /** + * Namespace v1beta1. + * @memberof cosmos.base + * @namespace + */ + + base.v1beta1 = (function(v1beta1) { + + v1beta1.Coin = (function(Coin) { + + /** + * Properties of a Coin. + * @memberof cosmos.base.v1beta1 + * @interface ICoin + * @property {string|null} [denom] Coin denom + * @property {string|null} [amount] Coin amount + */ + + /** + * Constructs a new Coin. + * @memberof cosmos.base.v1beta1 + * @classdesc Represents a Coin. + * @implements ICoin + * @constructor + * @param {cosmos.base.v1beta1.ICoin=} [properties] Properties to set + */ + function Coin(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Coin denom. + * @member {string} denom + * @memberof cosmos.base.v1beta1.Coin + * @instance + */ + Coin.prototype.denom = ""; + + /** + * Coin amount. + * @member {string} amount + * @memberof cosmos.base.v1beta1.Coin + * @instance + */ + Coin.prototype.amount = ""; + + /** + * Creates a new Coin instance using the specified properties. + * @function create + * @memberof cosmos.base.v1beta1.Coin + * @static + * @param {cosmos.base.v1beta1.ICoin=} [properties] Properties to set + * @returns {cosmos.base.v1beta1.Coin} Coin instance + */ + Coin.create = function create(properties) { + return new Coin(properties); + }; + + /** + * Encodes the specified Coin message. Does not implicitly {@link cosmos.base.v1beta1.Coin.verify|verify} messages. + * @function encode + * @memberof cosmos.base.v1beta1.Coin + * @static + * @param {cosmos.base.v1beta1.ICoin} message Coin message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Coin.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.denom != null && Object.hasOwnProperty.call(message, "denom")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.denom); + if (message.amount != null && Object.hasOwnProperty.call(message, "amount")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.amount); + return writer; + }; + + /** + * Encodes the specified Coin message, length delimited. Does not implicitly {@link cosmos.base.v1beta1.Coin.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.base.v1beta1.Coin + * @static + * @param {cosmos.base.v1beta1.ICoin} message Coin message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Coin.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Coin message from the specified reader or buffer. + * @function decode + * @memberof cosmos.base.v1beta1.Coin + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.base.v1beta1.Coin} Coin + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Coin.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.v1beta1.Coin(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.denom = reader.string(); + break; + case 2: + message.amount = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Coin message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.base.v1beta1.Coin + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.base.v1beta1.Coin} Coin + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Coin.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Coin message. + * @function verify + * @memberof cosmos.base.v1beta1.Coin + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Coin.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.denom != null && message.hasOwnProperty("denom")) + if (!$util.isString(message.denom)) + return "denom: string expected"; + if (message.amount != null && message.hasOwnProperty("amount")) + if (!$util.isString(message.amount)) + return "amount: string expected"; + return null; + }; + + /** + * Creates a Coin message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.base.v1beta1.Coin + * @static + * @param {Object.} object Plain object + * @returns {cosmos.base.v1beta1.Coin} Coin + */ + Coin.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.base.v1beta1.Coin) + return object; + var message = new $root.cosmos.base.v1beta1.Coin(); + if (object.denom != null) + message.denom = String(object.denom); + if (object.amount != null) + message.amount = String(object.amount); + return message; + }; + + /** + * Creates a plain object from a Coin message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.base.v1beta1.Coin + * @static + * @param {cosmos.base.v1beta1.Coin} message Coin + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Coin.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.denom = ""; + object.amount = ""; + } + if (message.denom != null && message.hasOwnProperty("denom")) + object.denom = message.denom; + if (message.amount != null && message.hasOwnProperty("amount")) + object.amount = message.amount; + return object; + }; + + /** + * Converts this Coin to JSON. + * @function toJSON + * @memberof cosmos.base.v1beta1.Coin + * @instance + * @returns {Object.} JSON object + */ + Coin.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Coin; + })(v1beta1.Coin || {}); + + v1beta1.DecCoin = (function(DecCoin) { + + /** + * Properties of a DecCoin. + * @memberof cosmos.base.v1beta1 + * @interface IDecCoin + * @property {string|null} [denom] DecCoin denom + * @property {string|null} [amount] DecCoin amount + */ + + /** + * Constructs a new DecCoin. + * @memberof cosmos.base.v1beta1 + * @classdesc Represents a DecCoin. + * @implements IDecCoin + * @constructor + * @param {cosmos.base.v1beta1.IDecCoin=} [properties] Properties to set + */ + function DecCoin(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DecCoin denom. + * @member {string} denom + * @memberof cosmos.base.v1beta1.DecCoin + * @instance + */ + DecCoin.prototype.denom = ""; + + /** + * DecCoin amount. + * @member {string} amount + * @memberof cosmos.base.v1beta1.DecCoin + * @instance + */ + DecCoin.prototype.amount = ""; + + /** + * Creates a new DecCoin instance using the specified properties. + * @function create + * @memberof cosmos.base.v1beta1.DecCoin + * @static + * @param {cosmos.base.v1beta1.IDecCoin=} [properties] Properties to set + * @returns {cosmos.base.v1beta1.DecCoin} DecCoin instance + */ + DecCoin.create = function create(properties) { + return new DecCoin(properties); + }; + + /** + * Encodes the specified DecCoin message. Does not implicitly {@link cosmos.base.v1beta1.DecCoin.verify|verify} messages. + * @function encode + * @memberof cosmos.base.v1beta1.DecCoin + * @static + * @param {cosmos.base.v1beta1.IDecCoin} message DecCoin message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DecCoin.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.denom != null && Object.hasOwnProperty.call(message, "denom")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.denom); + if (message.amount != null && Object.hasOwnProperty.call(message, "amount")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.amount); + return writer; + }; + + /** + * Encodes the specified DecCoin message, length delimited. Does not implicitly {@link cosmos.base.v1beta1.DecCoin.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.base.v1beta1.DecCoin + * @static + * @param {cosmos.base.v1beta1.IDecCoin} message DecCoin message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DecCoin.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DecCoin message from the specified reader or buffer. + * @function decode + * @memberof cosmos.base.v1beta1.DecCoin + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.base.v1beta1.DecCoin} DecCoin + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DecCoin.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.v1beta1.DecCoin(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.denom = reader.string(); + break; + case 2: + message.amount = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DecCoin message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.base.v1beta1.DecCoin + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.base.v1beta1.DecCoin} DecCoin + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DecCoin.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DecCoin message. + * @function verify + * @memberof cosmos.base.v1beta1.DecCoin + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DecCoin.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.denom != null && message.hasOwnProperty("denom")) + if (!$util.isString(message.denom)) + return "denom: string expected"; + if (message.amount != null && message.hasOwnProperty("amount")) + if (!$util.isString(message.amount)) + return "amount: string expected"; + return null; + }; + + /** + * Creates a DecCoin message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.base.v1beta1.DecCoin + * @static + * @param {Object.} object Plain object + * @returns {cosmos.base.v1beta1.DecCoin} DecCoin + */ + DecCoin.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.base.v1beta1.DecCoin) + return object; + var message = new $root.cosmos.base.v1beta1.DecCoin(); + if (object.denom != null) + message.denom = String(object.denom); + if (object.amount != null) + message.amount = String(object.amount); + return message; + }; + + /** + * Creates a plain object from a DecCoin message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.base.v1beta1.DecCoin + * @static + * @param {cosmos.base.v1beta1.DecCoin} message DecCoin + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DecCoin.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.denom = ""; + object.amount = ""; + } + if (message.denom != null && message.hasOwnProperty("denom")) + object.denom = message.denom; + if (message.amount != null && message.hasOwnProperty("amount")) + object.amount = message.amount; + return object; + }; + + /** + * Converts this DecCoin to JSON. + * @function toJSON + * @memberof cosmos.base.v1beta1.DecCoin + * @instance + * @returns {Object.} JSON object + */ + DecCoin.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DecCoin; + })(v1beta1.DecCoin || {}); + + v1beta1.IntProto = (function(IntProto) { + + /** + * Properties of an IntProto. + * @memberof cosmos.base.v1beta1 + * @interface IIntProto + * @property {string|null} [int] IntProto int + */ + + /** + * Constructs a new IntProto. + * @memberof cosmos.base.v1beta1 + * @classdesc Represents an IntProto. + * @implements IIntProto + * @constructor + * @param {cosmos.base.v1beta1.IIntProto=} [properties] Properties to set + */ + function IntProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * IntProto int. + * @member {string} int + * @memberof cosmos.base.v1beta1.IntProto + * @instance + */ + IntProto.prototype.int = ""; + + /** + * Creates a new IntProto instance using the specified properties. + * @function create + * @memberof cosmos.base.v1beta1.IntProto + * @static + * @param {cosmos.base.v1beta1.IIntProto=} [properties] Properties to set + * @returns {cosmos.base.v1beta1.IntProto} IntProto instance + */ + IntProto.create = function create(properties) { + return new IntProto(properties); + }; + + /** + * Encodes the specified IntProto message. Does not implicitly {@link cosmos.base.v1beta1.IntProto.verify|verify} messages. + * @function encode + * @memberof cosmos.base.v1beta1.IntProto + * @static + * @param {cosmos.base.v1beta1.IIntProto} message IntProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IntProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.int != null && Object.hasOwnProperty.call(message, "int")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.int); + return writer; + }; + + /** + * Encodes the specified IntProto message, length delimited. Does not implicitly {@link cosmos.base.v1beta1.IntProto.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.base.v1beta1.IntProto + * @static + * @param {cosmos.base.v1beta1.IIntProto} message IntProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IntProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IntProto message from the specified reader or buffer. + * @function decode + * @memberof cosmos.base.v1beta1.IntProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.base.v1beta1.IntProto} IntProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IntProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.v1beta1.IntProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.int = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IntProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.base.v1beta1.IntProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.base.v1beta1.IntProto} IntProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IntProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IntProto message. + * @function verify + * @memberof cosmos.base.v1beta1.IntProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IntProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.int != null && message.hasOwnProperty("int")) + if (!$util.isString(message.int)) + return "int: string expected"; + return null; + }; + + /** + * Creates an IntProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.base.v1beta1.IntProto + * @static + * @param {Object.} object Plain object + * @returns {cosmos.base.v1beta1.IntProto} IntProto + */ + IntProto.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.base.v1beta1.IntProto) + return object; + var message = new $root.cosmos.base.v1beta1.IntProto(); + if (object.int != null) + message.int = String(object.int); + return message; + }; + + /** + * Creates a plain object from an IntProto message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.base.v1beta1.IntProto + * @static + * @param {cosmos.base.v1beta1.IntProto} message IntProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IntProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.int = ""; + if (message.int != null && message.hasOwnProperty("int")) + object.int = message.int; + return object; + }; + + /** + * Converts this IntProto to JSON. + * @function toJSON + * @memberof cosmos.base.v1beta1.IntProto + * @instance + * @returns {Object.} JSON object + */ + IntProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return IntProto; + })(v1beta1.IntProto || {}); + + v1beta1.DecProto = (function(DecProto) { + + /** + * Properties of a DecProto. + * @memberof cosmos.base.v1beta1 + * @interface IDecProto + * @property {string|null} [dec] DecProto dec + */ + + /** + * Constructs a new DecProto. + * @memberof cosmos.base.v1beta1 + * @classdesc Represents a DecProto. + * @implements IDecProto + * @constructor + * @param {cosmos.base.v1beta1.IDecProto=} [properties] Properties to set + */ + function DecProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DecProto dec. + * @member {string} dec + * @memberof cosmos.base.v1beta1.DecProto + * @instance + */ + DecProto.prototype.dec = ""; + + /** + * Creates a new DecProto instance using the specified properties. + * @function create + * @memberof cosmos.base.v1beta1.DecProto + * @static + * @param {cosmos.base.v1beta1.IDecProto=} [properties] Properties to set + * @returns {cosmos.base.v1beta1.DecProto} DecProto instance + */ + DecProto.create = function create(properties) { + return new DecProto(properties); + }; + + /** + * Encodes the specified DecProto message. Does not implicitly {@link cosmos.base.v1beta1.DecProto.verify|verify} messages. + * @function encode + * @memberof cosmos.base.v1beta1.DecProto + * @static + * @param {cosmos.base.v1beta1.IDecProto} message DecProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DecProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dec != null && Object.hasOwnProperty.call(message, "dec")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.dec); + return writer; + }; + + /** + * Encodes the specified DecProto message, length delimited. Does not implicitly {@link cosmos.base.v1beta1.DecProto.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.base.v1beta1.DecProto + * @static + * @param {cosmos.base.v1beta1.IDecProto} message DecProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DecProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DecProto message from the specified reader or buffer. + * @function decode + * @memberof cosmos.base.v1beta1.DecProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.base.v1beta1.DecProto} DecProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DecProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.v1beta1.DecProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.dec = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DecProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.base.v1beta1.DecProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.base.v1beta1.DecProto} DecProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DecProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DecProto message. + * @function verify + * @memberof cosmos.base.v1beta1.DecProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DecProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dec != null && message.hasOwnProperty("dec")) + if (!$util.isString(message.dec)) + return "dec: string expected"; + return null; + }; + + /** + * Creates a DecProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.base.v1beta1.DecProto + * @static + * @param {Object.} object Plain object + * @returns {cosmos.base.v1beta1.DecProto} DecProto + */ + DecProto.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.base.v1beta1.DecProto) + return object; + var message = new $root.cosmos.base.v1beta1.DecProto(); + if (object.dec != null) + message.dec = String(object.dec); + return message; + }; + + /** + * Creates a plain object from a DecProto message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.base.v1beta1.DecProto + * @static + * @param {cosmos.base.v1beta1.DecProto} message DecProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DecProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.dec = ""; + if (message.dec != null && message.hasOwnProperty("dec")) + object.dec = message.dec; + return object; + }; + + /** + * Converts this DecProto to JSON. + * @function toJSON + * @memberof cosmos.base.v1beta1.DecProto + * @instance + * @returns {Object.} JSON object + */ + DecProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DecProto; + })(v1beta1.DecProto || {}); + + return v1beta1; + })(base.v1beta1 || {}); + + return base; + })(cosmos.base || {}); + + /** + * Namespace bank. + * @memberof cosmos + * @namespace + */ + + cosmos.bank = (function(bank) { + + /** + * Namespace v1beta1. + * @memberof cosmos.bank + * @namespace + */ + + bank.v1beta1 = (function(v1beta1) { + + v1beta1.Params = (function(Params) { + + /** + * Properties of a Params. + * @memberof cosmos.bank.v1beta1 + * @interface IParams + * @property {Array.|null} [sendEnabled] Params sendEnabled + * @property {boolean|null} [defaultSendEnabled] Params defaultSendEnabled + */ + + /** + * Constructs a new Params. + * @memberof cosmos.bank.v1beta1 + * @classdesc Represents a Params. + * @implements IParams + * @constructor + * @param {cosmos.bank.v1beta1.IParams=} [properties] Properties to set + */ + function Params(properties) { + this.sendEnabled = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Params sendEnabled. + * @member {Array.} sendEnabled + * @memberof cosmos.bank.v1beta1.Params + * @instance + */ + Params.prototype.sendEnabled = $util.emptyArray; + + /** + * Params defaultSendEnabled. + * @member {boolean} defaultSendEnabled + * @memberof cosmos.bank.v1beta1.Params + * @instance + */ + Params.prototype.defaultSendEnabled = false; + + /** + * Creates a new Params instance using the specified properties. + * @function create + * @memberof cosmos.bank.v1beta1.Params + * @static + * @param {cosmos.bank.v1beta1.IParams=} [properties] Properties to set + * @returns {cosmos.bank.v1beta1.Params} Params instance + */ + Params.create = function create(properties) { + return new Params(properties); + }; + + /** + * Encodes the specified Params message. Does not implicitly {@link cosmos.bank.v1beta1.Params.verify|verify} messages. + * @function encode + * @memberof cosmos.bank.v1beta1.Params + * @static + * @param {cosmos.bank.v1beta1.IParams} message Params message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Params.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sendEnabled != null && message.sendEnabled.length) + for (var i = 0; i < message.sendEnabled.length; ++i) + $root.cosmos.bank.v1beta1.SendEnabled.encode(message.sendEnabled[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.defaultSendEnabled != null && Object.hasOwnProperty.call(message, "defaultSendEnabled")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.defaultSendEnabled); + return writer; + }; + + /** + * Encodes the specified Params message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.Params.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.bank.v1beta1.Params + * @static + * @param {cosmos.bank.v1beta1.IParams} message Params message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Params.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Params message from the specified reader or buffer. + * @function decode + * @memberof cosmos.bank.v1beta1.Params + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.bank.v1beta1.Params} Params + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Params.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.bank.v1beta1.Params(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.sendEnabled && message.sendEnabled.length)) + message.sendEnabled = []; + message.sendEnabled.push($root.cosmos.bank.v1beta1.SendEnabled.decode(reader, reader.uint32())); + break; + case 2: + message.defaultSendEnabled = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Params message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.bank.v1beta1.Params + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.bank.v1beta1.Params} Params + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Params.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Params message. + * @function verify + * @memberof cosmos.bank.v1beta1.Params + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Params.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sendEnabled != null && message.hasOwnProperty("sendEnabled")) { + if (!Array.isArray(message.sendEnabled)) + return "sendEnabled: array expected"; + for (var i = 0; i < message.sendEnabled.length; ++i) { + var error = $root.cosmos.bank.v1beta1.SendEnabled.verify(message.sendEnabled[i]); + if (error) + return "sendEnabled." + error; + } + } + if (message.defaultSendEnabled != null && message.hasOwnProperty("defaultSendEnabled")) + if (typeof message.defaultSendEnabled !== "boolean") + return "defaultSendEnabled: boolean expected"; + return null; + }; + + /** + * Creates a Params message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.bank.v1beta1.Params + * @static + * @param {Object.} object Plain object + * @returns {cosmos.bank.v1beta1.Params} Params + */ + Params.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.bank.v1beta1.Params) + return object; + var message = new $root.cosmos.bank.v1beta1.Params(); + if (object.sendEnabled) { + if (!Array.isArray(object.sendEnabled)) + throw TypeError(".cosmos.bank.v1beta1.Params.sendEnabled: array expected"); + message.sendEnabled = []; + for (var i = 0; i < object.sendEnabled.length; ++i) { + if (typeof object.sendEnabled[i] !== "object") + throw TypeError(".cosmos.bank.v1beta1.Params.sendEnabled: object expected"); + message.sendEnabled[i] = $root.cosmos.bank.v1beta1.SendEnabled.fromObject(object.sendEnabled[i]); + } + } + if (object.defaultSendEnabled != null) + message.defaultSendEnabled = Boolean(object.defaultSendEnabled); + return message; + }; + + /** + * Creates a plain object from a Params message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.bank.v1beta1.Params + * @static + * @param {cosmos.bank.v1beta1.Params} message Params + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Params.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.sendEnabled = []; + if (options.defaults) + object.defaultSendEnabled = false; + if (message.sendEnabled && message.sendEnabled.length) { + object.sendEnabled = []; + for (var j = 0; j < message.sendEnabled.length; ++j) + object.sendEnabled[j] = $root.cosmos.bank.v1beta1.SendEnabled.toObject(message.sendEnabled[j], options); + } + if (message.defaultSendEnabled != null && message.hasOwnProperty("defaultSendEnabled")) + object.defaultSendEnabled = message.defaultSendEnabled; + return object; + }; + + /** + * Converts this Params to JSON. + * @function toJSON + * @memberof cosmos.bank.v1beta1.Params + * @instance + * @returns {Object.} JSON object + */ + Params.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Params; + })(v1beta1.Params || {}); + + v1beta1.SendEnabled = (function(SendEnabled) { + + /** + * Properties of a SendEnabled. + * @memberof cosmos.bank.v1beta1 + * @interface ISendEnabled + * @property {string|null} [denom] SendEnabled denom + * @property {boolean|null} [enabled] SendEnabled enabled + */ + + /** + * Constructs a new SendEnabled. + * @memberof cosmos.bank.v1beta1 + * @classdesc Represents a SendEnabled. + * @implements ISendEnabled + * @constructor + * @param {cosmos.bank.v1beta1.ISendEnabled=} [properties] Properties to set + */ + function SendEnabled(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SendEnabled denom. + * @member {string} denom + * @memberof cosmos.bank.v1beta1.SendEnabled + * @instance + */ + SendEnabled.prototype.denom = ""; + + /** + * SendEnabled enabled. + * @member {boolean} enabled + * @memberof cosmos.bank.v1beta1.SendEnabled + * @instance + */ + SendEnabled.prototype.enabled = false; + + /** + * Creates a new SendEnabled instance using the specified properties. + * @function create + * @memberof cosmos.bank.v1beta1.SendEnabled + * @static + * @param {cosmos.bank.v1beta1.ISendEnabled=} [properties] Properties to set + * @returns {cosmos.bank.v1beta1.SendEnabled} SendEnabled instance + */ + SendEnabled.create = function create(properties) { + return new SendEnabled(properties); + }; + + /** + * Encodes the specified SendEnabled message. Does not implicitly {@link cosmos.bank.v1beta1.SendEnabled.verify|verify} messages. + * @function encode + * @memberof cosmos.bank.v1beta1.SendEnabled + * @static + * @param {cosmos.bank.v1beta1.ISendEnabled} message SendEnabled message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SendEnabled.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.denom != null && Object.hasOwnProperty.call(message, "denom")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.denom); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.enabled); + return writer; + }; + + /** + * Encodes the specified SendEnabled message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.SendEnabled.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.bank.v1beta1.SendEnabled + * @static + * @param {cosmos.bank.v1beta1.ISendEnabled} message SendEnabled message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SendEnabled.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SendEnabled message from the specified reader or buffer. + * @function decode + * @memberof cosmos.bank.v1beta1.SendEnabled + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.bank.v1beta1.SendEnabled} SendEnabled + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SendEnabled.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.bank.v1beta1.SendEnabled(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.denom = reader.string(); + break; + case 2: + message.enabled = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SendEnabled message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.bank.v1beta1.SendEnabled + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.bank.v1beta1.SendEnabled} SendEnabled + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SendEnabled.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SendEnabled message. + * @function verify + * @memberof cosmos.bank.v1beta1.SendEnabled + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SendEnabled.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.denom != null && message.hasOwnProperty("denom")) + if (!$util.isString(message.denom)) + return "denom: string expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + return null; + }; + + /** + * Creates a SendEnabled message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.bank.v1beta1.SendEnabled + * @static + * @param {Object.} object Plain object + * @returns {cosmos.bank.v1beta1.SendEnabled} SendEnabled + */ + SendEnabled.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.bank.v1beta1.SendEnabled) + return object; + var message = new $root.cosmos.bank.v1beta1.SendEnabled(); + if (object.denom != null) + message.denom = String(object.denom); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + return message; + }; + + /** + * Creates a plain object from a SendEnabled message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.bank.v1beta1.SendEnabled + * @static + * @param {cosmos.bank.v1beta1.SendEnabled} message SendEnabled + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SendEnabled.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.denom = ""; + object.enabled = false; + } + if (message.denom != null && message.hasOwnProperty("denom")) + object.denom = message.denom; + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + return object; + }; + + /** + * Converts this SendEnabled to JSON. + * @function toJSON + * @memberof cosmos.bank.v1beta1.SendEnabled + * @instance + * @returns {Object.} JSON object + */ + SendEnabled.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SendEnabled; + })(v1beta1.SendEnabled || {}); + + v1beta1.Input = (function(Input) { + + /** + * Properties of an Input. + * @memberof cosmos.bank.v1beta1 + * @interface IInput + * @property {string|null} [address] Input address + * @property {Array.|null} [coins] Input coins + */ + + /** + * Constructs a new Input. + * @memberof cosmos.bank.v1beta1 + * @classdesc Represents an Input. + * @implements IInput + * @constructor + * @param {cosmos.bank.v1beta1.IInput=} [properties] Properties to set + */ + function Input(properties) { + this.coins = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Input address. + * @member {string} address + * @memberof cosmos.bank.v1beta1.Input + * @instance + */ + Input.prototype.address = ""; + + /** + * Input coins. + * @member {Array.} coins + * @memberof cosmos.bank.v1beta1.Input + * @instance + */ + Input.prototype.coins = $util.emptyArray; + + /** + * Creates a new Input instance using the specified properties. + * @function create + * @memberof cosmos.bank.v1beta1.Input + * @static + * @param {cosmos.bank.v1beta1.IInput=} [properties] Properties to set + * @returns {cosmos.bank.v1beta1.Input} Input instance + */ + Input.create = function create(properties) { + return new Input(properties); + }; + + /** + * Encodes the specified Input message. Does not implicitly {@link cosmos.bank.v1beta1.Input.verify|verify} messages. + * @function encode + * @memberof cosmos.bank.v1beta1.Input + * @static + * @param {cosmos.bank.v1beta1.IInput} message Input message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Input.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.address != null && Object.hasOwnProperty.call(message, "address")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.address); + if (message.coins != null && message.coins.length) + for (var i = 0; i < message.coins.length; ++i) + $root.cosmos.base.v1beta1.Coin.encode(message.coins[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Input message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.Input.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.bank.v1beta1.Input + * @static + * @param {cosmos.bank.v1beta1.IInput} message Input message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Input.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Input message from the specified reader or buffer. + * @function decode + * @memberof cosmos.bank.v1beta1.Input + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.bank.v1beta1.Input} Input + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Input.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.bank.v1beta1.Input(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.address = reader.string(); + break; + case 2: + if (!(message.coins && message.coins.length)) + message.coins = []; + message.coins.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Input message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.bank.v1beta1.Input + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.bank.v1beta1.Input} Input + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Input.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Input message. + * @function verify + * @memberof cosmos.bank.v1beta1.Input + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Input.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.address != null && message.hasOwnProperty("address")) + if (!$util.isString(message.address)) + return "address: string expected"; + if (message.coins != null && message.hasOwnProperty("coins")) { + if (!Array.isArray(message.coins)) + return "coins: array expected"; + for (var i = 0; i < message.coins.length; ++i) { + var error = $root.cosmos.base.v1beta1.Coin.verify(message.coins[i]); + if (error) + return "coins." + error; + } + } + return null; + }; + + /** + * Creates an Input message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.bank.v1beta1.Input + * @static + * @param {Object.} object Plain object + * @returns {cosmos.bank.v1beta1.Input} Input + */ + Input.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.bank.v1beta1.Input) + return object; + var message = new $root.cosmos.bank.v1beta1.Input(); + if (object.address != null) + message.address = String(object.address); + if (object.coins) { + if (!Array.isArray(object.coins)) + throw TypeError(".cosmos.bank.v1beta1.Input.coins: array expected"); + message.coins = []; + for (var i = 0; i < object.coins.length; ++i) { + if (typeof object.coins[i] !== "object") + throw TypeError(".cosmos.bank.v1beta1.Input.coins: object expected"); + message.coins[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.coins[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an Input message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.bank.v1beta1.Input + * @static + * @param {cosmos.bank.v1beta1.Input} message Input + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Input.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.coins = []; + if (options.defaults) + object.address = ""; + if (message.address != null && message.hasOwnProperty("address")) + object.address = message.address; + if (message.coins && message.coins.length) { + object.coins = []; + for (var j = 0; j < message.coins.length; ++j) + object.coins[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.coins[j], options); + } + return object; + }; + + /** + * Converts this Input to JSON. + * @function toJSON + * @memberof cosmos.bank.v1beta1.Input + * @instance + * @returns {Object.} JSON object + */ + Input.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Input; + })(v1beta1.Input || {}); + + v1beta1.Output = (function(Output) { + + /** + * Properties of an Output. + * @memberof cosmos.bank.v1beta1 + * @interface IOutput + * @property {string|null} [address] Output address + * @property {Array.|null} [coins] Output coins + */ + + /** + * Constructs a new Output. + * @memberof cosmos.bank.v1beta1 + * @classdesc Represents an Output. + * @implements IOutput + * @constructor + * @param {cosmos.bank.v1beta1.IOutput=} [properties] Properties to set + */ + function Output(properties) { + this.coins = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Output address. + * @member {string} address + * @memberof cosmos.bank.v1beta1.Output + * @instance + */ + Output.prototype.address = ""; + + /** + * Output coins. + * @member {Array.} coins + * @memberof cosmos.bank.v1beta1.Output + * @instance + */ + Output.prototype.coins = $util.emptyArray; + + /** + * Creates a new Output instance using the specified properties. + * @function create + * @memberof cosmos.bank.v1beta1.Output + * @static + * @param {cosmos.bank.v1beta1.IOutput=} [properties] Properties to set + * @returns {cosmos.bank.v1beta1.Output} Output instance + */ + Output.create = function create(properties) { + return new Output(properties); + }; + + /** + * Encodes the specified Output message. Does not implicitly {@link cosmos.bank.v1beta1.Output.verify|verify} messages. + * @function encode + * @memberof cosmos.bank.v1beta1.Output + * @static + * @param {cosmos.bank.v1beta1.IOutput} message Output message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Output.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.address != null && Object.hasOwnProperty.call(message, "address")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.address); + if (message.coins != null && message.coins.length) + for (var i = 0; i < message.coins.length; ++i) + $root.cosmos.base.v1beta1.Coin.encode(message.coins[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Output message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.Output.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.bank.v1beta1.Output + * @static + * @param {cosmos.bank.v1beta1.IOutput} message Output message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Output.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Output message from the specified reader or buffer. + * @function decode + * @memberof cosmos.bank.v1beta1.Output + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.bank.v1beta1.Output} Output + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Output.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.bank.v1beta1.Output(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.address = reader.string(); + break; + case 2: + if (!(message.coins && message.coins.length)) + message.coins = []; + message.coins.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Output message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.bank.v1beta1.Output + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.bank.v1beta1.Output} Output + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Output.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Output message. + * @function verify + * @memberof cosmos.bank.v1beta1.Output + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Output.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.address != null && message.hasOwnProperty("address")) + if (!$util.isString(message.address)) + return "address: string expected"; + if (message.coins != null && message.hasOwnProperty("coins")) { + if (!Array.isArray(message.coins)) + return "coins: array expected"; + for (var i = 0; i < message.coins.length; ++i) { + var error = $root.cosmos.base.v1beta1.Coin.verify(message.coins[i]); + if (error) + return "coins." + error; + } + } + return null; + }; + + /** + * Creates an Output message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.bank.v1beta1.Output + * @static + * @param {Object.} object Plain object + * @returns {cosmos.bank.v1beta1.Output} Output + */ + Output.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.bank.v1beta1.Output) + return object; + var message = new $root.cosmos.bank.v1beta1.Output(); + if (object.address != null) + message.address = String(object.address); + if (object.coins) { + if (!Array.isArray(object.coins)) + throw TypeError(".cosmos.bank.v1beta1.Output.coins: array expected"); + message.coins = []; + for (var i = 0; i < object.coins.length; ++i) { + if (typeof object.coins[i] !== "object") + throw TypeError(".cosmos.bank.v1beta1.Output.coins: object expected"); + message.coins[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.coins[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an Output message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.bank.v1beta1.Output + * @static + * @param {cosmos.bank.v1beta1.Output} message Output + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Output.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.coins = []; + if (options.defaults) + object.address = ""; + if (message.address != null && message.hasOwnProperty("address")) + object.address = message.address; + if (message.coins && message.coins.length) { + object.coins = []; + for (var j = 0; j < message.coins.length; ++j) + object.coins[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.coins[j], options); + } + return object; + }; + + /** + * Converts this Output to JSON. + * @function toJSON + * @memberof cosmos.bank.v1beta1.Output + * @instance + * @returns {Object.} JSON object + */ + Output.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Output; + })(v1beta1.Output || {}); + + v1beta1.Supply = (function(Supply) { + + /** + * Properties of a Supply. + * @memberof cosmos.bank.v1beta1 + * @interface ISupply + * @property {Array.|null} [total] Supply total + */ + + /** + * Constructs a new Supply. + * @memberof cosmos.bank.v1beta1 + * @classdesc Represents a Supply. + * @implements ISupply + * @constructor + * @param {cosmos.bank.v1beta1.ISupply=} [properties] Properties to set + */ + function Supply(properties) { + this.total = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Supply total. + * @member {Array.} total + * @memberof cosmos.bank.v1beta1.Supply + * @instance + */ + Supply.prototype.total = $util.emptyArray; + + /** + * Creates a new Supply instance using the specified properties. + * @function create + * @memberof cosmos.bank.v1beta1.Supply + * @static + * @param {cosmos.bank.v1beta1.ISupply=} [properties] Properties to set + * @returns {cosmos.bank.v1beta1.Supply} Supply instance + */ + Supply.create = function create(properties) { + return new Supply(properties); + }; + + /** + * Encodes the specified Supply message. Does not implicitly {@link cosmos.bank.v1beta1.Supply.verify|verify} messages. + * @function encode + * @memberof cosmos.bank.v1beta1.Supply + * @static + * @param {cosmos.bank.v1beta1.ISupply} message Supply message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Supply.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.total != null && message.total.length) + for (var i = 0; i < message.total.length; ++i) + $root.cosmos.base.v1beta1.Coin.encode(message.total[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Supply message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.Supply.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.bank.v1beta1.Supply + * @static + * @param {cosmos.bank.v1beta1.ISupply} message Supply message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Supply.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Supply message from the specified reader or buffer. + * @function decode + * @memberof cosmos.bank.v1beta1.Supply + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.bank.v1beta1.Supply} Supply + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Supply.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.bank.v1beta1.Supply(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.total && message.total.length)) + message.total = []; + message.total.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Supply message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.bank.v1beta1.Supply + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.bank.v1beta1.Supply} Supply + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Supply.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Supply message. + * @function verify + * @memberof cosmos.bank.v1beta1.Supply + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Supply.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.total != null && message.hasOwnProperty("total")) { + if (!Array.isArray(message.total)) + return "total: array expected"; + for (var i = 0; i < message.total.length; ++i) { + var error = $root.cosmos.base.v1beta1.Coin.verify(message.total[i]); + if (error) + return "total." + error; + } + } + return null; + }; + + /** + * Creates a Supply message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.bank.v1beta1.Supply + * @static + * @param {Object.} object Plain object + * @returns {cosmos.bank.v1beta1.Supply} Supply + */ + Supply.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.bank.v1beta1.Supply) + return object; + var message = new $root.cosmos.bank.v1beta1.Supply(); + if (object.total) { + if (!Array.isArray(object.total)) + throw TypeError(".cosmos.bank.v1beta1.Supply.total: array expected"); + message.total = []; + for (var i = 0; i < object.total.length; ++i) { + if (typeof object.total[i] !== "object") + throw TypeError(".cosmos.bank.v1beta1.Supply.total: object expected"); + message.total[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.total[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Supply message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.bank.v1beta1.Supply + * @static + * @param {cosmos.bank.v1beta1.Supply} message Supply + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Supply.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.total = []; + if (message.total && message.total.length) { + object.total = []; + for (var j = 0; j < message.total.length; ++j) + object.total[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.total[j], options); + } + return object; + }; + + /** + * Converts this Supply to JSON. + * @function toJSON + * @memberof cosmos.bank.v1beta1.Supply + * @instance + * @returns {Object.} JSON object + */ + Supply.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Supply; + })(v1beta1.Supply || {}); + + v1beta1.DenomUnit = (function(DenomUnit) { + + /** + * Properties of a DenomUnit. + * @memberof cosmos.bank.v1beta1 + * @interface IDenomUnit + * @property {string|null} [denom] DenomUnit denom + * @property {number|null} [exponent] DenomUnit exponent + * @property {Array.|null} [aliases] DenomUnit aliases + */ + + /** + * Constructs a new DenomUnit. + * @memberof cosmos.bank.v1beta1 + * @classdesc Represents a DenomUnit. + * @implements IDenomUnit + * @constructor + * @param {cosmos.bank.v1beta1.IDenomUnit=} [properties] Properties to set + */ + function DenomUnit(properties) { + this.aliases = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DenomUnit denom. + * @member {string} denom + * @memberof cosmos.bank.v1beta1.DenomUnit + * @instance + */ + DenomUnit.prototype.denom = ""; + + /** + * DenomUnit exponent. + * @member {number} exponent + * @memberof cosmos.bank.v1beta1.DenomUnit + * @instance + */ + DenomUnit.prototype.exponent = 0; + + /** + * DenomUnit aliases. + * @member {Array.} aliases + * @memberof cosmos.bank.v1beta1.DenomUnit + * @instance + */ + DenomUnit.prototype.aliases = $util.emptyArray; + + /** + * Creates a new DenomUnit instance using the specified properties. + * @function create + * @memberof cosmos.bank.v1beta1.DenomUnit + * @static + * @param {cosmos.bank.v1beta1.IDenomUnit=} [properties] Properties to set + * @returns {cosmos.bank.v1beta1.DenomUnit} DenomUnit instance + */ + DenomUnit.create = function create(properties) { + return new DenomUnit(properties); + }; + + /** + * Encodes the specified DenomUnit message. Does not implicitly {@link cosmos.bank.v1beta1.DenomUnit.verify|verify} messages. + * @function encode + * @memberof cosmos.bank.v1beta1.DenomUnit + * @static + * @param {cosmos.bank.v1beta1.IDenomUnit} message DenomUnit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DenomUnit.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.denom != null && Object.hasOwnProperty.call(message, "denom")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.denom); + if (message.exponent != null && Object.hasOwnProperty.call(message, "exponent")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.exponent); + if (message.aliases != null && message.aliases.length) + for (var i = 0; i < message.aliases.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.aliases[i]); + return writer; + }; + + /** + * Encodes the specified DenomUnit message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.DenomUnit.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.bank.v1beta1.DenomUnit + * @static + * @param {cosmos.bank.v1beta1.IDenomUnit} message DenomUnit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DenomUnit.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DenomUnit message from the specified reader or buffer. + * @function decode + * @memberof cosmos.bank.v1beta1.DenomUnit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.bank.v1beta1.DenomUnit} DenomUnit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DenomUnit.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.bank.v1beta1.DenomUnit(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.denom = reader.string(); + break; + case 2: + message.exponent = reader.uint32(); + break; + case 3: + if (!(message.aliases && message.aliases.length)) + message.aliases = []; + message.aliases.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DenomUnit message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.bank.v1beta1.DenomUnit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.bank.v1beta1.DenomUnit} DenomUnit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DenomUnit.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DenomUnit message. + * @function verify + * @memberof cosmos.bank.v1beta1.DenomUnit + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DenomUnit.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.denom != null && message.hasOwnProperty("denom")) + if (!$util.isString(message.denom)) + return "denom: string expected"; + if (message.exponent != null && message.hasOwnProperty("exponent")) + if (!$util.isInteger(message.exponent)) + return "exponent: integer expected"; + if (message.aliases != null && message.hasOwnProperty("aliases")) { + if (!Array.isArray(message.aliases)) + return "aliases: array expected"; + for (var i = 0; i < message.aliases.length; ++i) + if (!$util.isString(message.aliases[i])) + return "aliases: string[] expected"; + } + return null; + }; + + /** + * Creates a DenomUnit message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.bank.v1beta1.DenomUnit + * @static + * @param {Object.} object Plain object + * @returns {cosmos.bank.v1beta1.DenomUnit} DenomUnit + */ + DenomUnit.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.bank.v1beta1.DenomUnit) + return object; + var message = new $root.cosmos.bank.v1beta1.DenomUnit(); + if (object.denom != null) + message.denom = String(object.denom); + if (object.exponent != null) + message.exponent = object.exponent >>> 0; + if (object.aliases) { + if (!Array.isArray(object.aliases)) + throw TypeError(".cosmos.bank.v1beta1.DenomUnit.aliases: array expected"); + message.aliases = []; + for (var i = 0; i < object.aliases.length; ++i) + message.aliases[i] = String(object.aliases[i]); + } + return message; + }; + + /** + * Creates a plain object from a DenomUnit message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.bank.v1beta1.DenomUnit + * @static + * @param {cosmos.bank.v1beta1.DenomUnit} message DenomUnit + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DenomUnit.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.aliases = []; + if (options.defaults) { + object.denom = ""; + object.exponent = 0; + } + if (message.denom != null && message.hasOwnProperty("denom")) + object.denom = message.denom; + if (message.exponent != null && message.hasOwnProperty("exponent")) + object.exponent = message.exponent; + if (message.aliases && message.aliases.length) { + object.aliases = []; + for (var j = 0; j < message.aliases.length; ++j) + object.aliases[j] = message.aliases[j]; + } + return object; + }; + + /** + * Converts this DenomUnit to JSON. + * @function toJSON + * @memberof cosmos.bank.v1beta1.DenomUnit + * @instance + * @returns {Object.} JSON object + */ + DenomUnit.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DenomUnit; + })(v1beta1.DenomUnit || {}); + + v1beta1.Metadata = (function(Metadata) { + + /** + * Properties of a Metadata. + * @memberof cosmos.bank.v1beta1 + * @interface IMetadata + * @property {string|null} [description] Metadata description + * @property {Array.|null} [denomUnits] Metadata denomUnits + * @property {string|null} [base] Metadata base + * @property {string|null} [display] Metadata display + */ + + /** + * Constructs a new Metadata. + * @memberof cosmos.bank.v1beta1 + * @classdesc Represents a Metadata. + * @implements IMetadata + * @constructor + * @param {cosmos.bank.v1beta1.IMetadata=} [properties] Properties to set + */ + function Metadata(properties) { + this.denomUnits = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Metadata description. + * @member {string} description + * @memberof cosmos.bank.v1beta1.Metadata + * @instance + */ + Metadata.prototype.description = ""; + + /** + * Metadata denomUnits. + * @member {Array.} denomUnits + * @memberof cosmos.bank.v1beta1.Metadata + * @instance + */ + Metadata.prototype.denomUnits = $util.emptyArray; + + /** + * Metadata base. + * @member {string} base + * @memberof cosmos.bank.v1beta1.Metadata + * @instance + */ + Metadata.prototype.base = ""; + + /** + * Metadata display. + * @member {string} display + * @memberof cosmos.bank.v1beta1.Metadata + * @instance + */ + Metadata.prototype.display = ""; + + /** + * Creates a new Metadata instance using the specified properties. + * @function create + * @memberof cosmos.bank.v1beta1.Metadata + * @static + * @param {cosmos.bank.v1beta1.IMetadata=} [properties] Properties to set + * @returns {cosmos.bank.v1beta1.Metadata} Metadata instance + */ + Metadata.create = function create(properties) { + return new Metadata(properties); + }; + + /** + * Encodes the specified Metadata message. Does not implicitly {@link cosmos.bank.v1beta1.Metadata.verify|verify} messages. + * @function encode + * @memberof cosmos.bank.v1beta1.Metadata + * @static + * @param {cosmos.bank.v1beta1.IMetadata} message Metadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Metadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.description); + if (message.denomUnits != null && message.denomUnits.length) + for (var i = 0; i < message.denomUnits.length; ++i) + $root.cosmos.bank.v1beta1.DenomUnit.encode(message.denomUnits[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.base != null && Object.hasOwnProperty.call(message, "base")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.base); + if (message.display != null && Object.hasOwnProperty.call(message, "display")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.display); + return writer; + }; + + /** + * Encodes the specified Metadata message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.Metadata.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.bank.v1beta1.Metadata + * @static + * @param {cosmos.bank.v1beta1.IMetadata} message Metadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Metadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Metadata message from the specified reader or buffer. + * @function decode + * @memberof cosmos.bank.v1beta1.Metadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.bank.v1beta1.Metadata} Metadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Metadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.bank.v1beta1.Metadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.description = reader.string(); + break; + case 2: + if (!(message.denomUnits && message.denomUnits.length)) + message.denomUnits = []; + message.denomUnits.push($root.cosmos.bank.v1beta1.DenomUnit.decode(reader, reader.uint32())); + break; + case 3: + message.base = reader.string(); + break; + case 4: + message.display = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Metadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.bank.v1beta1.Metadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.bank.v1beta1.Metadata} Metadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Metadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Metadata message. + * @function verify + * @memberof cosmos.bank.v1beta1.Metadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Metadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.denomUnits != null && message.hasOwnProperty("denomUnits")) { + if (!Array.isArray(message.denomUnits)) + return "denomUnits: array expected"; + for (var i = 0; i < message.denomUnits.length; ++i) { + var error = $root.cosmos.bank.v1beta1.DenomUnit.verify(message.denomUnits[i]); + if (error) + return "denomUnits." + error; + } + } + if (message.base != null && message.hasOwnProperty("base")) + if (!$util.isString(message.base)) + return "base: string expected"; + if (message.display != null && message.hasOwnProperty("display")) + if (!$util.isString(message.display)) + return "display: string expected"; + return null; + }; + + /** + * Creates a Metadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.bank.v1beta1.Metadata + * @static + * @param {Object.} object Plain object + * @returns {cosmos.bank.v1beta1.Metadata} Metadata + */ + Metadata.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.bank.v1beta1.Metadata) + return object; + var message = new $root.cosmos.bank.v1beta1.Metadata(); + if (object.description != null) + message.description = String(object.description); + if (object.denomUnits) { + if (!Array.isArray(object.denomUnits)) + throw TypeError(".cosmos.bank.v1beta1.Metadata.denomUnits: array expected"); + message.denomUnits = []; + for (var i = 0; i < object.denomUnits.length; ++i) { + if (typeof object.denomUnits[i] !== "object") + throw TypeError(".cosmos.bank.v1beta1.Metadata.denomUnits: object expected"); + message.denomUnits[i] = $root.cosmos.bank.v1beta1.DenomUnit.fromObject(object.denomUnits[i]); + } + } + if (object.base != null) + message.base = String(object.base); + if (object.display != null) + message.display = String(object.display); + return message; + }; + + /** + * Creates a plain object from a Metadata message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.bank.v1beta1.Metadata + * @static + * @param {cosmos.bank.v1beta1.Metadata} message Metadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Metadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.denomUnits = []; + if (options.defaults) { + object.description = ""; + object.base = ""; + object.display = ""; + } + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.denomUnits && message.denomUnits.length) { + object.denomUnits = []; + for (var j = 0; j < message.denomUnits.length; ++j) + object.denomUnits[j] = $root.cosmos.bank.v1beta1.DenomUnit.toObject(message.denomUnits[j], options); + } + if (message.base != null && message.hasOwnProperty("base")) + object.base = message.base; + if (message.display != null && message.hasOwnProperty("display")) + object.display = message.display; + return object; + }; + + /** + * Converts this Metadata to JSON. + * @function toJSON + * @memberof cosmos.bank.v1beta1.Metadata + * @instance + * @returns {Object.} JSON object + */ + Metadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Metadata; + })(v1beta1.Metadata || {}); + + v1beta1.Msg = (function(Msg) { + + /** + * Constructs a new Msg service. + * @memberof cosmos.bank.v1beta1 + * @classdesc Represents a Msg + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Msg(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Msg.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Msg; + + /** + * Creates new Msg service using the specified rpc implementation. + * @function create + * @memberof cosmos.bank.v1beta1.Msg + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Msg} RPC service. Useful where requests and/or responses are streamed. + */ + Msg.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link cosmos.bank.v1beta1.Msg#send}. + * @memberof cosmos.bank.v1beta1.Msg + * @typedef SendCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.bank.v1beta1.IMsgSendResponse} [response] MsgSendResponse + */ + + /** + * Calls Send. + * @function send + * @memberof cosmos.bank.v1beta1.Msg + * @instance + * @param {cosmos.bank.v1beta1.IMsgSend} request MsgSend message or plain object + * @param {cosmos.bank.v1beta1.Msg.SendCallback} callback Node-style callback called with the error, if any, and MsgSendResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Msg.prototype.send = function send(request, callback) { + return this.rpcCall(send, $root.cosmos.bank.v1beta1.MsgSend, $root.cosmos.bank.v1beta1.MsgSendResponse, request, callback); + }, "name", { value: "Send" }); + + /** + * Calls Send. + * @function send + * @memberof cosmos.bank.v1beta1.Msg + * @instance + * @param {cosmos.bank.v1beta1.IMsgSend} request MsgSend message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link cosmos.bank.v1beta1.Msg#multiSend}. + * @memberof cosmos.bank.v1beta1.Msg + * @typedef MultiSendCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.bank.v1beta1.IMsgMultiSendResponse} [response] MsgMultiSendResponse + */ + + /** + * Calls MultiSend. + * @function multiSend + * @memberof cosmos.bank.v1beta1.Msg + * @instance + * @param {cosmos.bank.v1beta1.IMsgMultiSend} request MsgMultiSend message or plain object + * @param {cosmos.bank.v1beta1.Msg.MultiSendCallback} callback Node-style callback called with the error, if any, and MsgMultiSendResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Msg.prototype.multiSend = function multiSend(request, callback) { + return this.rpcCall(multiSend, $root.cosmos.bank.v1beta1.MsgMultiSend, $root.cosmos.bank.v1beta1.MsgMultiSendResponse, request, callback); + }, "name", { value: "MultiSend" }); + + /** + * Calls MultiSend. + * @function multiSend + * @memberof cosmos.bank.v1beta1.Msg + * @instance + * @param {cosmos.bank.v1beta1.IMsgMultiSend} request MsgMultiSend message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Msg; + })(v1beta1.Msg || {}); + + v1beta1.MsgSend = (function(MsgSend) { + + /** + * Properties of a MsgSend. + * @memberof cosmos.bank.v1beta1 + * @interface IMsgSend + * @property {string|null} [fromAddress] MsgSend fromAddress + * @property {string|null} [toAddress] MsgSend toAddress + * @property {Array.|null} [amount] MsgSend amount + */ + + /** + * Constructs a new MsgSend. + * @memberof cosmos.bank.v1beta1 + * @classdesc Represents a MsgSend. + * @implements IMsgSend + * @constructor + * @param {cosmos.bank.v1beta1.IMsgSend=} [properties] Properties to set + */ + function MsgSend(properties) { + this.amount = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgSend fromAddress. + * @member {string} fromAddress + * @memberof cosmos.bank.v1beta1.MsgSend + * @instance + */ + MsgSend.prototype.fromAddress = ""; + + /** + * MsgSend toAddress. + * @member {string} toAddress + * @memberof cosmos.bank.v1beta1.MsgSend + * @instance + */ + MsgSend.prototype.toAddress = ""; + + /** + * MsgSend amount. + * @member {Array.} amount + * @memberof cosmos.bank.v1beta1.MsgSend + * @instance + */ + MsgSend.prototype.amount = $util.emptyArray; + + /** + * Creates a new MsgSend instance using the specified properties. + * @function create + * @memberof cosmos.bank.v1beta1.MsgSend + * @static + * @param {cosmos.bank.v1beta1.IMsgSend=} [properties] Properties to set + * @returns {cosmos.bank.v1beta1.MsgSend} MsgSend instance + */ + MsgSend.create = function create(properties) { + return new MsgSend(properties); + }; + + /** + * Encodes the specified MsgSend message. Does not implicitly {@link cosmos.bank.v1beta1.MsgSend.verify|verify} messages. + * @function encode + * @memberof cosmos.bank.v1beta1.MsgSend + * @static + * @param {cosmos.bank.v1beta1.IMsgSend} message MsgSend message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgSend.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fromAddress != null && Object.hasOwnProperty.call(message, "fromAddress")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.fromAddress); + if (message.toAddress != null && Object.hasOwnProperty.call(message, "toAddress")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.toAddress); + if (message.amount != null && message.amount.length) + for (var i = 0; i < message.amount.length; ++i) + $root.cosmos.base.v1beta1.Coin.encode(message.amount[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MsgSend message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.MsgSend.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.bank.v1beta1.MsgSend + * @static + * @param {cosmos.bank.v1beta1.IMsgSend} message MsgSend message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgSend.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgSend message from the specified reader or buffer. + * @function decode + * @memberof cosmos.bank.v1beta1.MsgSend + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.bank.v1beta1.MsgSend} MsgSend + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgSend.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.bank.v1beta1.MsgSend(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.fromAddress = reader.string(); + break; + case 2: + message.toAddress = reader.string(); + break; + case 3: + if (!(message.amount && message.amount.length)) + message.amount = []; + message.amount.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgSend message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.bank.v1beta1.MsgSend + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.bank.v1beta1.MsgSend} MsgSend + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgSend.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgSend message. + * @function verify + * @memberof cosmos.bank.v1beta1.MsgSend + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgSend.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fromAddress != null && message.hasOwnProperty("fromAddress")) + if (!$util.isString(message.fromAddress)) + return "fromAddress: string expected"; + if (message.toAddress != null && message.hasOwnProperty("toAddress")) + if (!$util.isString(message.toAddress)) + return "toAddress: string expected"; + if (message.amount != null && message.hasOwnProperty("amount")) { + if (!Array.isArray(message.amount)) + return "amount: array expected"; + for (var i = 0; i < message.amount.length; ++i) { + var error = $root.cosmos.base.v1beta1.Coin.verify(message.amount[i]); + if (error) + return "amount." + error; + } + } + return null; + }; + + /** + * Creates a MsgSend message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.bank.v1beta1.MsgSend + * @static + * @param {Object.} object Plain object + * @returns {cosmos.bank.v1beta1.MsgSend} MsgSend + */ + MsgSend.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.bank.v1beta1.MsgSend) + return object; + var message = new $root.cosmos.bank.v1beta1.MsgSend(); + if (object.fromAddress != null) + message.fromAddress = String(object.fromAddress); + if (object.toAddress != null) + message.toAddress = String(object.toAddress); + if (object.amount) { + if (!Array.isArray(object.amount)) + throw TypeError(".cosmos.bank.v1beta1.MsgSend.amount: array expected"); + message.amount = []; + for (var i = 0; i < object.amount.length; ++i) { + if (typeof object.amount[i] !== "object") + throw TypeError(".cosmos.bank.v1beta1.MsgSend.amount: object expected"); + message.amount[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.amount[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a MsgSend message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.bank.v1beta1.MsgSend + * @static + * @param {cosmos.bank.v1beta1.MsgSend} message MsgSend + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgSend.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.amount = []; + if (options.defaults) { + object.fromAddress = ""; + object.toAddress = ""; + } + if (message.fromAddress != null && message.hasOwnProperty("fromAddress")) + object.fromAddress = message.fromAddress; + if (message.toAddress != null && message.hasOwnProperty("toAddress")) + object.toAddress = message.toAddress; + if (message.amount && message.amount.length) { + object.amount = []; + for (var j = 0; j < message.amount.length; ++j) + object.amount[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.amount[j], options); + } + return object; + }; + + /** + * Converts this MsgSend to JSON. + * @function toJSON + * @memberof cosmos.bank.v1beta1.MsgSend + * @instance + * @returns {Object.} JSON object + */ + MsgSend.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgSend; + })(v1beta1.MsgSend || {}); + + v1beta1.MsgSendResponse = (function(MsgSendResponse) { + + /** + * Properties of a MsgSendResponse. + * @memberof cosmos.bank.v1beta1 + * @interface IMsgSendResponse + */ + + /** + * Constructs a new MsgSendResponse. + * @memberof cosmos.bank.v1beta1 + * @classdesc Represents a MsgSendResponse. + * @implements IMsgSendResponse + * @constructor + * @param {cosmos.bank.v1beta1.IMsgSendResponse=} [properties] Properties to set + */ + function MsgSendResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new MsgSendResponse instance using the specified properties. + * @function create + * @memberof cosmos.bank.v1beta1.MsgSendResponse + * @static + * @param {cosmos.bank.v1beta1.IMsgSendResponse=} [properties] Properties to set + * @returns {cosmos.bank.v1beta1.MsgSendResponse} MsgSendResponse instance + */ + MsgSendResponse.create = function create(properties) { + return new MsgSendResponse(properties); + }; + + /** + * Encodes the specified MsgSendResponse message. Does not implicitly {@link cosmos.bank.v1beta1.MsgSendResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.bank.v1beta1.MsgSendResponse + * @static + * @param {cosmos.bank.v1beta1.IMsgSendResponse} message MsgSendResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgSendResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MsgSendResponse message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.MsgSendResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.bank.v1beta1.MsgSendResponse + * @static + * @param {cosmos.bank.v1beta1.IMsgSendResponse} message MsgSendResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgSendResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgSendResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.bank.v1beta1.MsgSendResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.bank.v1beta1.MsgSendResponse} MsgSendResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgSendResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.bank.v1beta1.MsgSendResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgSendResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.bank.v1beta1.MsgSendResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.bank.v1beta1.MsgSendResponse} MsgSendResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgSendResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgSendResponse message. + * @function verify + * @memberof cosmos.bank.v1beta1.MsgSendResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgSendResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MsgSendResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.bank.v1beta1.MsgSendResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.bank.v1beta1.MsgSendResponse} MsgSendResponse + */ + MsgSendResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.bank.v1beta1.MsgSendResponse) + return object; + return new $root.cosmos.bank.v1beta1.MsgSendResponse(); + }; + + /** + * Creates a plain object from a MsgSendResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.bank.v1beta1.MsgSendResponse + * @static + * @param {cosmos.bank.v1beta1.MsgSendResponse} message MsgSendResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgSendResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MsgSendResponse to JSON. + * @function toJSON + * @memberof cosmos.bank.v1beta1.MsgSendResponse + * @instance + * @returns {Object.} JSON object + */ + MsgSendResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgSendResponse; + })(v1beta1.MsgSendResponse || {}); + + v1beta1.MsgMultiSend = (function(MsgMultiSend) { + + /** + * Properties of a MsgMultiSend. + * @memberof cosmos.bank.v1beta1 + * @interface IMsgMultiSend + * @property {Array.|null} [inputs] MsgMultiSend inputs + * @property {Array.|null} [outputs] MsgMultiSend outputs + */ + + /** + * Constructs a new MsgMultiSend. + * @memberof cosmos.bank.v1beta1 + * @classdesc Represents a MsgMultiSend. + * @implements IMsgMultiSend + * @constructor + * @param {cosmos.bank.v1beta1.IMsgMultiSend=} [properties] Properties to set + */ + function MsgMultiSend(properties) { + this.inputs = []; + this.outputs = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgMultiSend inputs. + * @member {Array.} inputs + * @memberof cosmos.bank.v1beta1.MsgMultiSend + * @instance + */ + MsgMultiSend.prototype.inputs = $util.emptyArray; + + /** + * MsgMultiSend outputs. + * @member {Array.} outputs + * @memberof cosmos.bank.v1beta1.MsgMultiSend + * @instance + */ + MsgMultiSend.prototype.outputs = $util.emptyArray; + + /** + * Creates a new MsgMultiSend instance using the specified properties. + * @function create + * @memberof cosmos.bank.v1beta1.MsgMultiSend + * @static + * @param {cosmos.bank.v1beta1.IMsgMultiSend=} [properties] Properties to set + * @returns {cosmos.bank.v1beta1.MsgMultiSend} MsgMultiSend instance + */ + MsgMultiSend.create = function create(properties) { + return new MsgMultiSend(properties); + }; + + /** + * Encodes the specified MsgMultiSend message. Does not implicitly {@link cosmos.bank.v1beta1.MsgMultiSend.verify|verify} messages. + * @function encode + * @memberof cosmos.bank.v1beta1.MsgMultiSend + * @static + * @param {cosmos.bank.v1beta1.IMsgMultiSend} message MsgMultiSend message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgMultiSend.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.inputs != null && message.inputs.length) + for (var i = 0; i < message.inputs.length; ++i) + $root.cosmos.bank.v1beta1.Input.encode(message.inputs[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.outputs != null && message.outputs.length) + for (var i = 0; i < message.outputs.length; ++i) + $root.cosmos.bank.v1beta1.Output.encode(message.outputs[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MsgMultiSend message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.MsgMultiSend.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.bank.v1beta1.MsgMultiSend + * @static + * @param {cosmos.bank.v1beta1.IMsgMultiSend} message MsgMultiSend message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgMultiSend.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgMultiSend message from the specified reader or buffer. + * @function decode + * @memberof cosmos.bank.v1beta1.MsgMultiSend + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.bank.v1beta1.MsgMultiSend} MsgMultiSend + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgMultiSend.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.bank.v1beta1.MsgMultiSend(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.inputs && message.inputs.length)) + message.inputs = []; + message.inputs.push($root.cosmos.bank.v1beta1.Input.decode(reader, reader.uint32())); + break; + case 2: + if (!(message.outputs && message.outputs.length)) + message.outputs = []; + message.outputs.push($root.cosmos.bank.v1beta1.Output.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgMultiSend message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.bank.v1beta1.MsgMultiSend + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.bank.v1beta1.MsgMultiSend} MsgMultiSend + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgMultiSend.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgMultiSend message. + * @function verify + * @memberof cosmos.bank.v1beta1.MsgMultiSend + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgMultiSend.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.inputs != null && message.hasOwnProperty("inputs")) { + if (!Array.isArray(message.inputs)) + return "inputs: array expected"; + for (var i = 0; i < message.inputs.length; ++i) { + var error = $root.cosmos.bank.v1beta1.Input.verify(message.inputs[i]); + if (error) + return "inputs." + error; + } + } + if (message.outputs != null && message.hasOwnProperty("outputs")) { + if (!Array.isArray(message.outputs)) + return "outputs: array expected"; + for (var i = 0; i < message.outputs.length; ++i) { + var error = $root.cosmos.bank.v1beta1.Output.verify(message.outputs[i]); + if (error) + return "outputs." + error; + } + } + return null; + }; + + /** + * Creates a MsgMultiSend message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.bank.v1beta1.MsgMultiSend + * @static + * @param {Object.} object Plain object + * @returns {cosmos.bank.v1beta1.MsgMultiSend} MsgMultiSend + */ + MsgMultiSend.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.bank.v1beta1.MsgMultiSend) + return object; + var message = new $root.cosmos.bank.v1beta1.MsgMultiSend(); + if (object.inputs) { + if (!Array.isArray(object.inputs)) + throw TypeError(".cosmos.bank.v1beta1.MsgMultiSend.inputs: array expected"); + message.inputs = []; + for (var i = 0; i < object.inputs.length; ++i) { + if (typeof object.inputs[i] !== "object") + throw TypeError(".cosmos.bank.v1beta1.MsgMultiSend.inputs: object expected"); + message.inputs[i] = $root.cosmos.bank.v1beta1.Input.fromObject(object.inputs[i]); + } + } + if (object.outputs) { + if (!Array.isArray(object.outputs)) + throw TypeError(".cosmos.bank.v1beta1.MsgMultiSend.outputs: array expected"); + message.outputs = []; + for (var i = 0; i < object.outputs.length; ++i) { + if (typeof object.outputs[i] !== "object") + throw TypeError(".cosmos.bank.v1beta1.MsgMultiSend.outputs: object expected"); + message.outputs[i] = $root.cosmos.bank.v1beta1.Output.fromObject(object.outputs[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a MsgMultiSend message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.bank.v1beta1.MsgMultiSend + * @static + * @param {cosmos.bank.v1beta1.MsgMultiSend} message MsgMultiSend + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgMultiSend.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.inputs = []; + object.outputs = []; + } + if (message.inputs && message.inputs.length) { + object.inputs = []; + for (var j = 0; j < message.inputs.length; ++j) + object.inputs[j] = $root.cosmos.bank.v1beta1.Input.toObject(message.inputs[j], options); + } + if (message.outputs && message.outputs.length) { + object.outputs = []; + for (var j = 0; j < message.outputs.length; ++j) + object.outputs[j] = $root.cosmos.bank.v1beta1.Output.toObject(message.outputs[j], options); + } + return object; + }; + + /** + * Converts this MsgMultiSend to JSON. + * @function toJSON + * @memberof cosmos.bank.v1beta1.MsgMultiSend + * @instance + * @returns {Object.} JSON object + */ + MsgMultiSend.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgMultiSend; + })(v1beta1.MsgMultiSend || {}); + + v1beta1.MsgMultiSendResponse = (function(MsgMultiSendResponse) { + + /** + * Properties of a MsgMultiSendResponse. + * @memberof cosmos.bank.v1beta1 + * @interface IMsgMultiSendResponse + */ + + /** + * Constructs a new MsgMultiSendResponse. + * @memberof cosmos.bank.v1beta1 + * @classdesc Represents a MsgMultiSendResponse. + * @implements IMsgMultiSendResponse + * @constructor + * @param {cosmos.bank.v1beta1.IMsgMultiSendResponse=} [properties] Properties to set + */ + function MsgMultiSendResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new MsgMultiSendResponse instance using the specified properties. + * @function create + * @memberof cosmos.bank.v1beta1.MsgMultiSendResponse + * @static + * @param {cosmos.bank.v1beta1.IMsgMultiSendResponse=} [properties] Properties to set + * @returns {cosmos.bank.v1beta1.MsgMultiSendResponse} MsgMultiSendResponse instance + */ + MsgMultiSendResponse.create = function create(properties) { + return new MsgMultiSendResponse(properties); + }; + + /** + * Encodes the specified MsgMultiSendResponse message. Does not implicitly {@link cosmos.bank.v1beta1.MsgMultiSendResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.bank.v1beta1.MsgMultiSendResponse + * @static + * @param {cosmos.bank.v1beta1.IMsgMultiSendResponse} message MsgMultiSendResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgMultiSendResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MsgMultiSendResponse message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.MsgMultiSendResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.bank.v1beta1.MsgMultiSendResponse + * @static + * @param {cosmos.bank.v1beta1.IMsgMultiSendResponse} message MsgMultiSendResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgMultiSendResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgMultiSendResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.bank.v1beta1.MsgMultiSendResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.bank.v1beta1.MsgMultiSendResponse} MsgMultiSendResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgMultiSendResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.bank.v1beta1.MsgMultiSendResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgMultiSendResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.bank.v1beta1.MsgMultiSendResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.bank.v1beta1.MsgMultiSendResponse} MsgMultiSendResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgMultiSendResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgMultiSendResponse message. + * @function verify + * @memberof cosmos.bank.v1beta1.MsgMultiSendResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgMultiSendResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MsgMultiSendResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.bank.v1beta1.MsgMultiSendResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.bank.v1beta1.MsgMultiSendResponse} MsgMultiSendResponse + */ + MsgMultiSendResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.bank.v1beta1.MsgMultiSendResponse) + return object; + return new $root.cosmos.bank.v1beta1.MsgMultiSendResponse(); + }; + + /** + * Creates a plain object from a MsgMultiSendResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.bank.v1beta1.MsgMultiSendResponse + * @static + * @param {cosmos.bank.v1beta1.MsgMultiSendResponse} message MsgMultiSendResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgMultiSendResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MsgMultiSendResponse to JSON. + * @function toJSON + * @memberof cosmos.bank.v1beta1.MsgMultiSendResponse + * @instance + * @returns {Object.} JSON object + */ + MsgMultiSendResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgMultiSendResponse; + })(v1beta1.MsgMultiSendResponse || {}); + + return v1beta1; + })(bank.v1beta1 || {}); + + return bank; + })(cosmos.bank || {}); + + /** + * Namespace gov. + * @memberof cosmos + * @namespace + */ + + cosmos.gov = (function(gov) { + + /** + * Namespace v1beta1. + * @memberof cosmos.gov + * @namespace + */ + + gov.v1beta1 = (function(v1beta1) { + + /** + * VoteOption enum. + * @name cosmos.gov.v1beta1.VoteOption + * @enum {string} + * @property {number} VOTE_OPTION_UNSPECIFIED=0 VOTE_OPTION_UNSPECIFIED value + * @property {number} VOTE_OPTION_YES=1 VOTE_OPTION_YES value + * @property {number} VOTE_OPTION_ABSTAIN=2 VOTE_OPTION_ABSTAIN value + * @property {number} VOTE_OPTION_NO=3 VOTE_OPTION_NO value + * @property {number} VOTE_OPTION_NO_WITH_VETO=4 VOTE_OPTION_NO_WITH_VETO value + */ + v1beta1.VoteOption = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "VOTE_OPTION_UNSPECIFIED"] = 0; + values[valuesById[1] = "VOTE_OPTION_YES"] = 1; + values[valuesById[2] = "VOTE_OPTION_ABSTAIN"] = 2; + values[valuesById[3] = "VOTE_OPTION_NO"] = 3; + values[valuesById[4] = "VOTE_OPTION_NO_WITH_VETO"] = 4; + return values; + })(); + + v1beta1.TextProposal = (function(TextProposal) { + + /** + * Properties of a TextProposal. + * @memberof cosmos.gov.v1beta1 + * @interface ITextProposal + * @property {string|null} [title] TextProposal title + * @property {string|null} [description] TextProposal description + */ + + /** + * Constructs a new TextProposal. + * @memberof cosmos.gov.v1beta1 + * @classdesc Represents a TextProposal. + * @implements ITextProposal + * @constructor + * @param {cosmos.gov.v1beta1.ITextProposal=} [properties] Properties to set + */ + function TextProposal(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TextProposal title. + * @member {string} title + * @memberof cosmos.gov.v1beta1.TextProposal + * @instance + */ + TextProposal.prototype.title = ""; + + /** + * TextProposal description. + * @member {string} description + * @memberof cosmos.gov.v1beta1.TextProposal + * @instance + */ + TextProposal.prototype.description = ""; + + /** + * Creates a new TextProposal instance using the specified properties. + * @function create + * @memberof cosmos.gov.v1beta1.TextProposal + * @static + * @param {cosmos.gov.v1beta1.ITextProposal=} [properties] Properties to set + * @returns {cosmos.gov.v1beta1.TextProposal} TextProposal instance + */ + TextProposal.create = function create(properties) { + return new TextProposal(properties); + }; + + /** + * Encodes the specified TextProposal message. Does not implicitly {@link cosmos.gov.v1beta1.TextProposal.verify|verify} messages. + * @function encode + * @memberof cosmos.gov.v1beta1.TextProposal + * @static + * @param {cosmos.gov.v1beta1.ITextProposal} message TextProposal message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TextProposal.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.title != null && Object.hasOwnProperty.call(message, "title")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.title); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + return writer; + }; + + /** + * Encodes the specified TextProposal message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.TextProposal.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.gov.v1beta1.TextProposal + * @static + * @param {cosmos.gov.v1beta1.ITextProposal} message TextProposal message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TextProposal.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TextProposal message from the specified reader or buffer. + * @function decode + * @memberof cosmos.gov.v1beta1.TextProposal + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.gov.v1beta1.TextProposal} TextProposal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TextProposal.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1beta1.TextProposal(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.title = reader.string(); + break; + case 2: + message.description = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TextProposal message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.gov.v1beta1.TextProposal + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.gov.v1beta1.TextProposal} TextProposal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TextProposal.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TextProposal message. + * @function verify + * @memberof cosmos.gov.v1beta1.TextProposal + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TextProposal.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.title != null && message.hasOwnProperty("title")) + if (!$util.isString(message.title)) + return "title: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + return null; + }; + + /** + * Creates a TextProposal message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.gov.v1beta1.TextProposal + * @static + * @param {Object.} object Plain object + * @returns {cosmos.gov.v1beta1.TextProposal} TextProposal + */ + TextProposal.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.gov.v1beta1.TextProposal) + return object; + var message = new $root.cosmos.gov.v1beta1.TextProposal(); + if (object.title != null) + message.title = String(object.title); + if (object.description != null) + message.description = String(object.description); + return message; + }; + + /** + * Creates a plain object from a TextProposal message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.gov.v1beta1.TextProposal + * @static + * @param {cosmos.gov.v1beta1.TextProposal} message TextProposal + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TextProposal.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.title = ""; + object.description = ""; + } + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + return object; + }; + + /** + * Converts this TextProposal to JSON. + * @function toJSON + * @memberof cosmos.gov.v1beta1.TextProposal + * @instance + * @returns {Object.} JSON object + */ + TextProposal.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TextProposal; + })(v1beta1.TextProposal || {}); + + v1beta1.Deposit = (function(Deposit) { + + /** + * Properties of a Deposit. + * @memberof cosmos.gov.v1beta1 + * @interface IDeposit + * @property {number|Long|null} [proposalId] Deposit proposalId + * @property {string|null} [depositor] Deposit depositor + * @property {Array.|null} [amount] Deposit amount + */ + + /** + * Constructs a new Deposit. + * @memberof cosmos.gov.v1beta1 + * @classdesc Represents a Deposit. + * @implements IDeposit + * @constructor + * @param {cosmos.gov.v1beta1.IDeposit=} [properties] Properties to set + */ + function Deposit(properties) { + this.amount = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Deposit proposalId. + * @member {number|Long} proposalId + * @memberof cosmos.gov.v1beta1.Deposit + * @instance + */ + Deposit.prototype.proposalId = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Deposit depositor. + * @member {string} depositor + * @memberof cosmos.gov.v1beta1.Deposit + * @instance + */ + Deposit.prototype.depositor = ""; + + /** + * Deposit amount. + * @member {Array.} amount + * @memberof cosmos.gov.v1beta1.Deposit + * @instance + */ + Deposit.prototype.amount = $util.emptyArray; + + /** + * Creates a new Deposit instance using the specified properties. + * @function create + * @memberof cosmos.gov.v1beta1.Deposit + * @static + * @param {cosmos.gov.v1beta1.IDeposit=} [properties] Properties to set + * @returns {cosmos.gov.v1beta1.Deposit} Deposit instance + */ + Deposit.create = function create(properties) { + return new Deposit(properties); + }; + + /** + * Encodes the specified Deposit message. Does not implicitly {@link cosmos.gov.v1beta1.Deposit.verify|verify} messages. + * @function encode + * @memberof cosmos.gov.v1beta1.Deposit + * @static + * @param {cosmos.gov.v1beta1.IDeposit} message Deposit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Deposit.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.proposalId != null && Object.hasOwnProperty.call(message, "proposalId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.proposalId); + if (message.depositor != null && Object.hasOwnProperty.call(message, "depositor")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.depositor); + if (message.amount != null && message.amount.length) + for (var i = 0; i < message.amount.length; ++i) + $root.cosmos.base.v1beta1.Coin.encode(message.amount[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Deposit message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.Deposit.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.gov.v1beta1.Deposit + * @static + * @param {cosmos.gov.v1beta1.IDeposit} message Deposit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Deposit.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Deposit message from the specified reader or buffer. + * @function decode + * @memberof cosmos.gov.v1beta1.Deposit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.gov.v1beta1.Deposit} Deposit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Deposit.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1beta1.Deposit(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.proposalId = reader.uint64(); + break; + case 2: + message.depositor = reader.string(); + break; + case 3: + if (!(message.amount && message.amount.length)) + message.amount = []; + message.amount.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Deposit message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.gov.v1beta1.Deposit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.gov.v1beta1.Deposit} Deposit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Deposit.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Deposit message. + * @function verify + * @memberof cosmos.gov.v1beta1.Deposit + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Deposit.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.proposalId != null && message.hasOwnProperty("proposalId")) + if (!$util.isInteger(message.proposalId) && !(message.proposalId && $util.isInteger(message.proposalId.low) && $util.isInteger(message.proposalId.high))) + return "proposalId: integer|Long expected"; + if (message.depositor != null && message.hasOwnProperty("depositor")) + if (!$util.isString(message.depositor)) + return "depositor: string expected"; + if (message.amount != null && message.hasOwnProperty("amount")) { + if (!Array.isArray(message.amount)) + return "amount: array expected"; + for (var i = 0; i < message.amount.length; ++i) { + var error = $root.cosmos.base.v1beta1.Coin.verify(message.amount[i]); + if (error) + return "amount." + error; + } + } + return null; + }; + + /** + * Creates a Deposit message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.gov.v1beta1.Deposit + * @static + * @param {Object.} object Plain object + * @returns {cosmos.gov.v1beta1.Deposit} Deposit + */ + Deposit.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.gov.v1beta1.Deposit) + return object; + var message = new $root.cosmos.gov.v1beta1.Deposit(); + if (object.proposalId != null) + if ($util.Long) + (message.proposalId = $util.Long.fromValue(object.proposalId)).unsigned = true; + else if (typeof object.proposalId === "string") + message.proposalId = parseInt(object.proposalId, 10); + else if (typeof object.proposalId === "number") + message.proposalId = object.proposalId; + else if (typeof object.proposalId === "object") + message.proposalId = new $util.LongBits(object.proposalId.low >>> 0, object.proposalId.high >>> 0).toNumber(true); + if (object.depositor != null) + message.depositor = String(object.depositor); + if (object.amount) { + if (!Array.isArray(object.amount)) + throw TypeError(".cosmos.gov.v1beta1.Deposit.amount: array expected"); + message.amount = []; + for (var i = 0; i < object.amount.length; ++i) { + if (typeof object.amount[i] !== "object") + throw TypeError(".cosmos.gov.v1beta1.Deposit.amount: object expected"); + message.amount[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.amount[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Deposit message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.gov.v1beta1.Deposit + * @static + * @param {cosmos.gov.v1beta1.Deposit} message Deposit + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Deposit.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.amount = []; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.proposalId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.proposalId = options.longs === String ? "0" : 0; + object.depositor = ""; + } + if (message.proposalId != null && message.hasOwnProperty("proposalId")) + if (typeof message.proposalId === "number") + object.proposalId = options.longs === String ? String(message.proposalId) : message.proposalId; + else + object.proposalId = options.longs === String ? $util.Long.prototype.toString.call(message.proposalId) : options.longs === Number ? new $util.LongBits(message.proposalId.low >>> 0, message.proposalId.high >>> 0).toNumber(true) : message.proposalId; + if (message.depositor != null && message.hasOwnProperty("depositor")) + object.depositor = message.depositor; + if (message.amount && message.amount.length) { + object.amount = []; + for (var j = 0; j < message.amount.length; ++j) + object.amount[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.amount[j], options); + } + return object; + }; + + /** + * Converts this Deposit to JSON. + * @function toJSON + * @memberof cosmos.gov.v1beta1.Deposit + * @instance + * @returns {Object.} JSON object + */ + Deposit.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Deposit; + })(v1beta1.Deposit || {}); + + v1beta1.Proposal = (function(Proposal) { + + /** + * Properties of a Proposal. + * @memberof cosmos.gov.v1beta1 + * @interface IProposal + * @property {number|Long|null} [proposalId] Proposal proposalId + * @property {google.protobuf.IAny|null} [content] Proposal content + * @property {cosmos.gov.v1beta1.ProposalStatus|null} [status] Proposal status + * @property {cosmos.gov.v1beta1.ITallyResult|null} [finalTallyResult] Proposal finalTallyResult + * @property {google.protobuf.ITimestamp|null} [submitTime] Proposal submitTime + * @property {google.protobuf.ITimestamp|null} [depositEndTime] Proposal depositEndTime + * @property {Array.|null} [totalDeposit] Proposal totalDeposit + * @property {google.protobuf.ITimestamp|null} [votingStartTime] Proposal votingStartTime + * @property {google.protobuf.ITimestamp|null} [votingEndTime] Proposal votingEndTime + */ + + /** + * Constructs a new Proposal. + * @memberof cosmos.gov.v1beta1 + * @classdesc Represents a Proposal. + * @implements IProposal + * @constructor + * @param {cosmos.gov.v1beta1.IProposal=} [properties] Properties to set + */ + function Proposal(properties) { + this.totalDeposit = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Proposal proposalId. + * @member {number|Long} proposalId + * @memberof cosmos.gov.v1beta1.Proposal + * @instance + */ + Proposal.prototype.proposalId = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Proposal content. + * @member {google.protobuf.IAny|null|undefined} content + * @memberof cosmos.gov.v1beta1.Proposal + * @instance + */ + Proposal.prototype.content = null; + + /** + * Proposal status. + * @member {cosmos.gov.v1beta1.ProposalStatus} status + * @memberof cosmos.gov.v1beta1.Proposal + * @instance + */ + Proposal.prototype.status = 0; + + /** + * Proposal finalTallyResult. + * @member {cosmos.gov.v1beta1.ITallyResult|null|undefined} finalTallyResult + * @memberof cosmos.gov.v1beta1.Proposal + * @instance + */ + Proposal.prototype.finalTallyResult = null; + + /** + * Proposal submitTime. + * @member {google.protobuf.ITimestamp|null|undefined} submitTime + * @memberof cosmos.gov.v1beta1.Proposal + * @instance + */ + Proposal.prototype.submitTime = null; + + /** + * Proposal depositEndTime. + * @member {google.protobuf.ITimestamp|null|undefined} depositEndTime + * @memberof cosmos.gov.v1beta1.Proposal + * @instance + */ + Proposal.prototype.depositEndTime = null; + + /** + * Proposal totalDeposit. + * @member {Array.} totalDeposit + * @memberof cosmos.gov.v1beta1.Proposal + * @instance + */ + Proposal.prototype.totalDeposit = $util.emptyArray; + + /** + * Proposal votingStartTime. + * @member {google.protobuf.ITimestamp|null|undefined} votingStartTime + * @memberof cosmos.gov.v1beta1.Proposal + * @instance + */ + Proposal.prototype.votingStartTime = null; + + /** + * Proposal votingEndTime. + * @member {google.protobuf.ITimestamp|null|undefined} votingEndTime + * @memberof cosmos.gov.v1beta1.Proposal + * @instance + */ + Proposal.prototype.votingEndTime = null; + + /** + * Creates a new Proposal instance using the specified properties. + * @function create + * @memberof cosmos.gov.v1beta1.Proposal + * @static + * @param {cosmos.gov.v1beta1.IProposal=} [properties] Properties to set + * @returns {cosmos.gov.v1beta1.Proposal} Proposal instance + */ + Proposal.create = function create(properties) { + return new Proposal(properties); + }; + + /** + * Encodes the specified Proposal message. Does not implicitly {@link cosmos.gov.v1beta1.Proposal.verify|verify} messages. + * @function encode + * @memberof cosmos.gov.v1beta1.Proposal + * @static + * @param {cosmos.gov.v1beta1.IProposal} message Proposal message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Proposal.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.proposalId != null && Object.hasOwnProperty.call(message, "proposalId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.proposalId); + if (message.content != null && Object.hasOwnProperty.call(message, "content")) + $root.google.protobuf.Any.encode(message.content, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.status); + if (message.finalTallyResult != null && Object.hasOwnProperty.call(message, "finalTallyResult")) + $root.cosmos.gov.v1beta1.TallyResult.encode(message.finalTallyResult, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.submitTime != null && Object.hasOwnProperty.call(message, "submitTime")) + $root.google.protobuf.Timestamp.encode(message.submitTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.depositEndTime != null && Object.hasOwnProperty.call(message, "depositEndTime")) + $root.google.protobuf.Timestamp.encode(message.depositEndTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.totalDeposit != null && message.totalDeposit.length) + for (var i = 0; i < message.totalDeposit.length; ++i) + $root.cosmos.base.v1beta1.Coin.encode(message.totalDeposit[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.votingStartTime != null && Object.hasOwnProperty.call(message, "votingStartTime")) + $root.google.protobuf.Timestamp.encode(message.votingStartTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.votingEndTime != null && Object.hasOwnProperty.call(message, "votingEndTime")) + $root.google.protobuf.Timestamp.encode(message.votingEndTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Proposal message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.Proposal.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.gov.v1beta1.Proposal + * @static + * @param {cosmos.gov.v1beta1.IProposal} message Proposal message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Proposal.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Proposal message from the specified reader or buffer. + * @function decode + * @memberof cosmos.gov.v1beta1.Proposal + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.gov.v1beta1.Proposal} Proposal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Proposal.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1beta1.Proposal(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.proposalId = reader.uint64(); + break; + case 2: + message.content = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + case 3: + message.status = reader.int32(); + break; + case 4: + message.finalTallyResult = $root.cosmos.gov.v1beta1.TallyResult.decode(reader, reader.uint32()); + break; + case 5: + message.submitTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 6: + message.depositEndTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 7: + if (!(message.totalDeposit && message.totalDeposit.length)) + message.totalDeposit = []; + message.totalDeposit.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); + break; + case 8: + message.votingStartTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 9: + message.votingEndTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Proposal message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.gov.v1beta1.Proposal + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.gov.v1beta1.Proposal} Proposal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Proposal.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Proposal message. + * @function verify + * @memberof cosmos.gov.v1beta1.Proposal + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Proposal.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.proposalId != null && message.hasOwnProperty("proposalId")) + if (!$util.isInteger(message.proposalId) && !(message.proposalId && $util.isInteger(message.proposalId.low) && $util.isInteger(message.proposalId.high))) + return "proposalId: integer|Long expected"; + if (message.content != null && message.hasOwnProperty("content")) { + var error = $root.google.protobuf.Any.verify(message.content); + if (error) + return "content." + error; + } + if (message.status != null && message.hasOwnProperty("status")) + switch (message.status) { + default: + return "status: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.finalTallyResult != null && message.hasOwnProperty("finalTallyResult")) { + var error = $root.cosmos.gov.v1beta1.TallyResult.verify(message.finalTallyResult); + if (error) + return "finalTallyResult." + error; + } + if (message.submitTime != null && message.hasOwnProperty("submitTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.submitTime); + if (error) + return "submitTime." + error; + } + if (message.depositEndTime != null && message.hasOwnProperty("depositEndTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.depositEndTime); + if (error) + return "depositEndTime." + error; + } + if (message.totalDeposit != null && message.hasOwnProperty("totalDeposit")) { + if (!Array.isArray(message.totalDeposit)) + return "totalDeposit: array expected"; + for (var i = 0; i < message.totalDeposit.length; ++i) { + var error = $root.cosmos.base.v1beta1.Coin.verify(message.totalDeposit[i]); + if (error) + return "totalDeposit." + error; + } + } + if (message.votingStartTime != null && message.hasOwnProperty("votingStartTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.votingStartTime); + if (error) + return "votingStartTime." + error; + } + if (message.votingEndTime != null && message.hasOwnProperty("votingEndTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.votingEndTime); + if (error) + return "votingEndTime." + error; + } + return null; + }; + + /** + * Creates a Proposal message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.gov.v1beta1.Proposal + * @static + * @param {Object.} object Plain object + * @returns {cosmos.gov.v1beta1.Proposal} Proposal + */ + Proposal.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.gov.v1beta1.Proposal) + return object; + var message = new $root.cosmos.gov.v1beta1.Proposal(); + if (object.proposalId != null) + if ($util.Long) + (message.proposalId = $util.Long.fromValue(object.proposalId)).unsigned = true; + else if (typeof object.proposalId === "string") + message.proposalId = parseInt(object.proposalId, 10); + else if (typeof object.proposalId === "number") + message.proposalId = object.proposalId; + else if (typeof object.proposalId === "object") + message.proposalId = new $util.LongBits(object.proposalId.low >>> 0, object.proposalId.high >>> 0).toNumber(true); + if (object.content != null) { + if (typeof object.content !== "object") + throw TypeError(".cosmos.gov.v1beta1.Proposal.content: object expected"); + message.content = $root.google.protobuf.Any.fromObject(object.content); + } + switch (object.status) { + case "PROPOSAL_STATUS_UNSPECIFIED": + case 0: + message.status = 0; + break; + case "PROPOSAL_STATUS_DEPOSIT_PERIOD": + case 1: + message.status = 1; + break; + case "PROPOSAL_STATUS_VOTING_PERIOD": + case 2: + message.status = 2; + break; + case "PROPOSAL_STATUS_PASSED": + case 3: + message.status = 3; + break; + case "PROPOSAL_STATUS_REJECTED": + case 4: + message.status = 4; + break; + case "PROPOSAL_STATUS_FAILED": + case 5: + message.status = 5; + break; + } + if (object.finalTallyResult != null) { + if (typeof object.finalTallyResult !== "object") + throw TypeError(".cosmos.gov.v1beta1.Proposal.finalTallyResult: object expected"); + message.finalTallyResult = $root.cosmos.gov.v1beta1.TallyResult.fromObject(object.finalTallyResult); + } + if (object.submitTime != null) { + if (typeof object.submitTime !== "object") + throw TypeError(".cosmos.gov.v1beta1.Proposal.submitTime: object expected"); + message.submitTime = $root.google.protobuf.Timestamp.fromObject(object.submitTime); + } + if (object.depositEndTime != null) { + if (typeof object.depositEndTime !== "object") + throw TypeError(".cosmos.gov.v1beta1.Proposal.depositEndTime: object expected"); + message.depositEndTime = $root.google.protobuf.Timestamp.fromObject(object.depositEndTime); + } + if (object.totalDeposit) { + if (!Array.isArray(object.totalDeposit)) + throw TypeError(".cosmos.gov.v1beta1.Proposal.totalDeposit: array expected"); + message.totalDeposit = []; + for (var i = 0; i < object.totalDeposit.length; ++i) { + if (typeof object.totalDeposit[i] !== "object") + throw TypeError(".cosmos.gov.v1beta1.Proposal.totalDeposit: object expected"); + message.totalDeposit[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.totalDeposit[i]); + } + } + if (object.votingStartTime != null) { + if (typeof object.votingStartTime !== "object") + throw TypeError(".cosmos.gov.v1beta1.Proposal.votingStartTime: object expected"); + message.votingStartTime = $root.google.protobuf.Timestamp.fromObject(object.votingStartTime); + } + if (object.votingEndTime != null) { + if (typeof object.votingEndTime !== "object") + throw TypeError(".cosmos.gov.v1beta1.Proposal.votingEndTime: object expected"); + message.votingEndTime = $root.google.protobuf.Timestamp.fromObject(object.votingEndTime); + } + return message; + }; + + /** + * Creates a plain object from a Proposal message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.gov.v1beta1.Proposal + * @static + * @param {cosmos.gov.v1beta1.Proposal} message Proposal + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Proposal.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.totalDeposit = []; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.proposalId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.proposalId = options.longs === String ? "0" : 0; + object.content = null; + object.status = options.enums === String ? "PROPOSAL_STATUS_UNSPECIFIED" : 0; + object.finalTallyResult = null; + object.submitTime = null; + object.depositEndTime = null; + object.votingStartTime = null; + object.votingEndTime = null; + } + if (message.proposalId != null && message.hasOwnProperty("proposalId")) + if (typeof message.proposalId === "number") + object.proposalId = options.longs === String ? String(message.proposalId) : message.proposalId; + else + object.proposalId = options.longs === String ? $util.Long.prototype.toString.call(message.proposalId) : options.longs === Number ? new $util.LongBits(message.proposalId.low >>> 0, message.proposalId.high >>> 0).toNumber(true) : message.proposalId; + if (message.content != null && message.hasOwnProperty("content")) + object.content = $root.google.protobuf.Any.toObject(message.content, options); + if (message.status != null && message.hasOwnProperty("status")) + object.status = options.enums === String ? $root.cosmos.gov.v1beta1.ProposalStatus[message.status] : message.status; + if (message.finalTallyResult != null && message.hasOwnProperty("finalTallyResult")) + object.finalTallyResult = $root.cosmos.gov.v1beta1.TallyResult.toObject(message.finalTallyResult, options); + if (message.submitTime != null && message.hasOwnProperty("submitTime")) + object.submitTime = $root.google.protobuf.Timestamp.toObject(message.submitTime, options); + if (message.depositEndTime != null && message.hasOwnProperty("depositEndTime")) + object.depositEndTime = $root.google.protobuf.Timestamp.toObject(message.depositEndTime, options); + if (message.totalDeposit && message.totalDeposit.length) { + object.totalDeposit = []; + for (var j = 0; j < message.totalDeposit.length; ++j) + object.totalDeposit[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.totalDeposit[j], options); + } + if (message.votingStartTime != null && message.hasOwnProperty("votingStartTime")) + object.votingStartTime = $root.google.protobuf.Timestamp.toObject(message.votingStartTime, options); + if (message.votingEndTime != null && message.hasOwnProperty("votingEndTime")) + object.votingEndTime = $root.google.protobuf.Timestamp.toObject(message.votingEndTime, options); + return object; + }; + + /** + * Converts this Proposal to JSON. + * @function toJSON + * @memberof cosmos.gov.v1beta1.Proposal + * @instance + * @returns {Object.} JSON object + */ + Proposal.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Proposal; + })(v1beta1.Proposal || {}); + + /** + * ProposalStatus enum. + * @name cosmos.gov.v1beta1.ProposalStatus + * @enum {string} + * @property {number} PROPOSAL_STATUS_UNSPECIFIED=0 PROPOSAL_STATUS_UNSPECIFIED value + * @property {number} PROPOSAL_STATUS_DEPOSIT_PERIOD=1 PROPOSAL_STATUS_DEPOSIT_PERIOD value + * @property {number} PROPOSAL_STATUS_VOTING_PERIOD=2 PROPOSAL_STATUS_VOTING_PERIOD value + * @property {number} PROPOSAL_STATUS_PASSED=3 PROPOSAL_STATUS_PASSED value + * @property {number} PROPOSAL_STATUS_REJECTED=4 PROPOSAL_STATUS_REJECTED value + * @property {number} PROPOSAL_STATUS_FAILED=5 PROPOSAL_STATUS_FAILED value + */ + v1beta1.ProposalStatus = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PROPOSAL_STATUS_UNSPECIFIED"] = 0; + values[valuesById[1] = "PROPOSAL_STATUS_DEPOSIT_PERIOD"] = 1; + values[valuesById[2] = "PROPOSAL_STATUS_VOTING_PERIOD"] = 2; + values[valuesById[3] = "PROPOSAL_STATUS_PASSED"] = 3; + values[valuesById[4] = "PROPOSAL_STATUS_REJECTED"] = 4; + values[valuesById[5] = "PROPOSAL_STATUS_FAILED"] = 5; + return values; + })(); + + v1beta1.TallyResult = (function(TallyResult) { + + /** + * Properties of a TallyResult. + * @memberof cosmos.gov.v1beta1 + * @interface ITallyResult + * @property {string|null} [yes] TallyResult yes + * @property {string|null} [abstain] TallyResult abstain + * @property {string|null} [no] TallyResult no + * @property {string|null} [noWithVeto] TallyResult noWithVeto + */ + + /** + * Constructs a new TallyResult. + * @memberof cosmos.gov.v1beta1 + * @classdesc Represents a TallyResult. + * @implements ITallyResult + * @constructor + * @param {cosmos.gov.v1beta1.ITallyResult=} [properties] Properties to set + */ + function TallyResult(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TallyResult yes. + * @member {string} yes + * @memberof cosmos.gov.v1beta1.TallyResult + * @instance + */ + TallyResult.prototype.yes = ""; + + /** + * TallyResult abstain. + * @member {string} abstain + * @memberof cosmos.gov.v1beta1.TallyResult + * @instance + */ + TallyResult.prototype.abstain = ""; + + /** + * TallyResult no. + * @member {string} no + * @memberof cosmos.gov.v1beta1.TallyResult + * @instance + */ + TallyResult.prototype.no = ""; + + /** + * TallyResult noWithVeto. + * @member {string} noWithVeto + * @memberof cosmos.gov.v1beta1.TallyResult + * @instance + */ + TallyResult.prototype.noWithVeto = ""; + + /** + * Creates a new TallyResult instance using the specified properties. + * @function create + * @memberof cosmos.gov.v1beta1.TallyResult + * @static + * @param {cosmos.gov.v1beta1.ITallyResult=} [properties] Properties to set + * @returns {cosmos.gov.v1beta1.TallyResult} TallyResult instance + */ + TallyResult.create = function create(properties) { + return new TallyResult(properties); + }; + + /** + * Encodes the specified TallyResult message. Does not implicitly {@link cosmos.gov.v1beta1.TallyResult.verify|verify} messages. + * @function encode + * @memberof cosmos.gov.v1beta1.TallyResult + * @static + * @param {cosmos.gov.v1beta1.ITallyResult} message TallyResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TallyResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.yes != null && Object.hasOwnProperty.call(message, "yes")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.yes); + if (message.abstain != null && Object.hasOwnProperty.call(message, "abstain")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.abstain); + if (message.no != null && Object.hasOwnProperty.call(message, "no")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.no); + if (message.noWithVeto != null && Object.hasOwnProperty.call(message, "noWithVeto")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.noWithVeto); + return writer; + }; + + /** + * Encodes the specified TallyResult message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.TallyResult.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.gov.v1beta1.TallyResult + * @static + * @param {cosmos.gov.v1beta1.ITallyResult} message TallyResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TallyResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TallyResult message from the specified reader or buffer. + * @function decode + * @memberof cosmos.gov.v1beta1.TallyResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.gov.v1beta1.TallyResult} TallyResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TallyResult.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1beta1.TallyResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.yes = reader.string(); + break; + case 2: + message.abstain = reader.string(); + break; + case 3: + message.no = reader.string(); + break; + case 4: + message.noWithVeto = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TallyResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.gov.v1beta1.TallyResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.gov.v1beta1.TallyResult} TallyResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TallyResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TallyResult message. + * @function verify + * @memberof cosmos.gov.v1beta1.TallyResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TallyResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.yes != null && message.hasOwnProperty("yes")) + if (!$util.isString(message.yes)) + return "yes: string expected"; + if (message.abstain != null && message.hasOwnProperty("abstain")) + if (!$util.isString(message.abstain)) + return "abstain: string expected"; + if (message.no != null && message.hasOwnProperty("no")) + if (!$util.isString(message.no)) + return "no: string expected"; + if (message.noWithVeto != null && message.hasOwnProperty("noWithVeto")) + if (!$util.isString(message.noWithVeto)) + return "noWithVeto: string expected"; + return null; + }; + + /** + * Creates a TallyResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.gov.v1beta1.TallyResult + * @static + * @param {Object.} object Plain object + * @returns {cosmos.gov.v1beta1.TallyResult} TallyResult + */ + TallyResult.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.gov.v1beta1.TallyResult) + return object; + var message = new $root.cosmos.gov.v1beta1.TallyResult(); + if (object.yes != null) + message.yes = String(object.yes); + if (object.abstain != null) + message.abstain = String(object.abstain); + if (object.no != null) + message.no = String(object.no); + if (object.noWithVeto != null) + message.noWithVeto = String(object.noWithVeto); + return message; + }; + + /** + * Creates a plain object from a TallyResult message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.gov.v1beta1.TallyResult + * @static + * @param {cosmos.gov.v1beta1.TallyResult} message TallyResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TallyResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.yes = ""; + object.abstain = ""; + object.no = ""; + object.noWithVeto = ""; + } + if (message.yes != null && message.hasOwnProperty("yes")) + object.yes = message.yes; + if (message.abstain != null && message.hasOwnProperty("abstain")) + object.abstain = message.abstain; + if (message.no != null && message.hasOwnProperty("no")) + object.no = message.no; + if (message.noWithVeto != null && message.hasOwnProperty("noWithVeto")) + object.noWithVeto = message.noWithVeto; + return object; + }; + + /** + * Converts this TallyResult to JSON. + * @function toJSON + * @memberof cosmos.gov.v1beta1.TallyResult + * @instance + * @returns {Object.} JSON object + */ + TallyResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TallyResult; + })(v1beta1.TallyResult || {}); + + v1beta1.Vote = (function(Vote) { + + /** + * Properties of a Vote. + * @memberof cosmos.gov.v1beta1 + * @interface IVote + * @property {number|Long|null} [proposalId] Vote proposalId + * @property {string|null} [voter] Vote voter + * @property {cosmos.gov.v1beta1.VoteOption|null} [option] Vote option + */ + + /** + * Constructs a new Vote. + * @memberof cosmos.gov.v1beta1 + * @classdesc Represents a Vote. + * @implements IVote + * @constructor + * @param {cosmos.gov.v1beta1.IVote=} [properties] Properties to set + */ + function Vote(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Vote proposalId. + * @member {number|Long} proposalId + * @memberof cosmos.gov.v1beta1.Vote + * @instance + */ + Vote.prototype.proposalId = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Vote voter. + * @member {string} voter + * @memberof cosmos.gov.v1beta1.Vote + * @instance + */ + Vote.prototype.voter = ""; + + /** + * Vote option. + * @member {cosmos.gov.v1beta1.VoteOption} option + * @memberof cosmos.gov.v1beta1.Vote + * @instance + */ + Vote.prototype.option = 0; + + /** + * Creates a new Vote instance using the specified properties. + * @function create + * @memberof cosmos.gov.v1beta1.Vote + * @static + * @param {cosmos.gov.v1beta1.IVote=} [properties] Properties to set + * @returns {cosmos.gov.v1beta1.Vote} Vote instance + */ + Vote.create = function create(properties) { + return new Vote(properties); + }; + + /** + * Encodes the specified Vote message. Does not implicitly {@link cosmos.gov.v1beta1.Vote.verify|verify} messages. + * @function encode + * @memberof cosmos.gov.v1beta1.Vote + * @static + * @param {cosmos.gov.v1beta1.IVote} message Vote message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Vote.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.proposalId != null && Object.hasOwnProperty.call(message, "proposalId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.proposalId); + if (message.voter != null && Object.hasOwnProperty.call(message, "voter")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.voter); + if (message.option != null && Object.hasOwnProperty.call(message, "option")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.option); + return writer; + }; + + /** + * Encodes the specified Vote message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.Vote.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.gov.v1beta1.Vote + * @static + * @param {cosmos.gov.v1beta1.IVote} message Vote message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Vote.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Vote message from the specified reader or buffer. + * @function decode + * @memberof cosmos.gov.v1beta1.Vote + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.gov.v1beta1.Vote} Vote + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Vote.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1beta1.Vote(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.proposalId = reader.uint64(); + break; + case 2: + message.voter = reader.string(); + break; + case 3: + message.option = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Vote message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.gov.v1beta1.Vote + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.gov.v1beta1.Vote} Vote + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Vote.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Vote message. + * @function verify + * @memberof cosmos.gov.v1beta1.Vote + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Vote.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.proposalId != null && message.hasOwnProperty("proposalId")) + if (!$util.isInteger(message.proposalId) && !(message.proposalId && $util.isInteger(message.proposalId.low) && $util.isInteger(message.proposalId.high))) + return "proposalId: integer|Long expected"; + if (message.voter != null && message.hasOwnProperty("voter")) + if (!$util.isString(message.voter)) + return "voter: string expected"; + if (message.option != null && message.hasOwnProperty("option")) + switch (message.option) { + default: + return "option: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + return null; + }; + + /** + * Creates a Vote message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.gov.v1beta1.Vote + * @static + * @param {Object.} object Plain object + * @returns {cosmos.gov.v1beta1.Vote} Vote + */ + Vote.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.gov.v1beta1.Vote) + return object; + var message = new $root.cosmos.gov.v1beta1.Vote(); + if (object.proposalId != null) + if ($util.Long) + (message.proposalId = $util.Long.fromValue(object.proposalId)).unsigned = true; + else if (typeof object.proposalId === "string") + message.proposalId = parseInt(object.proposalId, 10); + else if (typeof object.proposalId === "number") + message.proposalId = object.proposalId; + else if (typeof object.proposalId === "object") + message.proposalId = new $util.LongBits(object.proposalId.low >>> 0, object.proposalId.high >>> 0).toNumber(true); + if (object.voter != null) + message.voter = String(object.voter); + switch (object.option) { + case "VOTE_OPTION_UNSPECIFIED": + case 0: + message.option = 0; + break; + case "VOTE_OPTION_YES": + case 1: + message.option = 1; + break; + case "VOTE_OPTION_ABSTAIN": + case 2: + message.option = 2; + break; + case "VOTE_OPTION_NO": + case 3: + message.option = 3; + break; + case "VOTE_OPTION_NO_WITH_VETO": + case 4: + message.option = 4; + break; + } + return message; + }; + + /** + * Creates a plain object from a Vote message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.gov.v1beta1.Vote + * @static + * @param {cosmos.gov.v1beta1.Vote} message Vote + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Vote.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.proposalId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.proposalId = options.longs === String ? "0" : 0; + object.voter = ""; + object.option = options.enums === String ? "VOTE_OPTION_UNSPECIFIED" : 0; + } + if (message.proposalId != null && message.hasOwnProperty("proposalId")) + if (typeof message.proposalId === "number") + object.proposalId = options.longs === String ? String(message.proposalId) : message.proposalId; + else + object.proposalId = options.longs === String ? $util.Long.prototype.toString.call(message.proposalId) : options.longs === Number ? new $util.LongBits(message.proposalId.low >>> 0, message.proposalId.high >>> 0).toNumber(true) : message.proposalId; + if (message.voter != null && message.hasOwnProperty("voter")) + object.voter = message.voter; + if (message.option != null && message.hasOwnProperty("option")) + object.option = options.enums === String ? $root.cosmos.gov.v1beta1.VoteOption[message.option] : message.option; + return object; + }; + + /** + * Converts this Vote to JSON. + * @function toJSON + * @memberof cosmos.gov.v1beta1.Vote + * @instance + * @returns {Object.} JSON object + */ + Vote.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Vote; + })(v1beta1.Vote || {}); + + v1beta1.DepositParams = (function(DepositParams) { + + /** + * Properties of a DepositParams. + * @memberof cosmos.gov.v1beta1 + * @interface IDepositParams + * @property {Array.|null} [minDeposit] DepositParams minDeposit + * @property {google.protobuf.IDuration|null} [maxDepositPeriod] DepositParams maxDepositPeriod + */ + + /** + * Constructs a new DepositParams. + * @memberof cosmos.gov.v1beta1 + * @classdesc Represents a DepositParams. + * @implements IDepositParams + * @constructor + * @param {cosmos.gov.v1beta1.IDepositParams=} [properties] Properties to set + */ + function DepositParams(properties) { + this.minDeposit = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DepositParams minDeposit. + * @member {Array.} minDeposit + * @memberof cosmos.gov.v1beta1.DepositParams + * @instance + */ + DepositParams.prototype.minDeposit = $util.emptyArray; + + /** + * DepositParams maxDepositPeriod. + * @member {google.protobuf.IDuration|null|undefined} maxDepositPeriod + * @memberof cosmos.gov.v1beta1.DepositParams + * @instance + */ + DepositParams.prototype.maxDepositPeriod = null; + + /** + * Creates a new DepositParams instance using the specified properties. + * @function create + * @memberof cosmos.gov.v1beta1.DepositParams + * @static + * @param {cosmos.gov.v1beta1.IDepositParams=} [properties] Properties to set + * @returns {cosmos.gov.v1beta1.DepositParams} DepositParams instance + */ + DepositParams.create = function create(properties) { + return new DepositParams(properties); + }; + + /** + * Encodes the specified DepositParams message. Does not implicitly {@link cosmos.gov.v1beta1.DepositParams.verify|verify} messages. + * @function encode + * @memberof cosmos.gov.v1beta1.DepositParams + * @static + * @param {cosmos.gov.v1beta1.IDepositParams} message DepositParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DepositParams.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.minDeposit != null && message.minDeposit.length) + for (var i = 0; i < message.minDeposit.length; ++i) + $root.cosmos.base.v1beta1.Coin.encode(message.minDeposit[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.maxDepositPeriod != null && Object.hasOwnProperty.call(message, "maxDepositPeriod")) + $root.google.protobuf.Duration.encode(message.maxDepositPeriod, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DepositParams message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.DepositParams.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.gov.v1beta1.DepositParams + * @static + * @param {cosmos.gov.v1beta1.IDepositParams} message DepositParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DepositParams.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DepositParams message from the specified reader or buffer. + * @function decode + * @memberof cosmos.gov.v1beta1.DepositParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.gov.v1beta1.DepositParams} DepositParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DepositParams.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1beta1.DepositParams(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.minDeposit && message.minDeposit.length)) + message.minDeposit = []; + message.minDeposit.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); + break; + case 2: + message.maxDepositPeriod = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DepositParams message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.gov.v1beta1.DepositParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.gov.v1beta1.DepositParams} DepositParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DepositParams.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DepositParams message. + * @function verify + * @memberof cosmos.gov.v1beta1.DepositParams + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DepositParams.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.minDeposit != null && message.hasOwnProperty("minDeposit")) { + if (!Array.isArray(message.minDeposit)) + return "minDeposit: array expected"; + for (var i = 0; i < message.minDeposit.length; ++i) { + var error = $root.cosmos.base.v1beta1.Coin.verify(message.minDeposit[i]); + if (error) + return "minDeposit." + error; + } + } + if (message.maxDepositPeriod != null && message.hasOwnProperty("maxDepositPeriod")) { + var error = $root.google.protobuf.Duration.verify(message.maxDepositPeriod); + if (error) + return "maxDepositPeriod." + error; + } + return null; + }; + + /** + * Creates a DepositParams message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.gov.v1beta1.DepositParams + * @static + * @param {Object.} object Plain object + * @returns {cosmos.gov.v1beta1.DepositParams} DepositParams + */ + DepositParams.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.gov.v1beta1.DepositParams) + return object; + var message = new $root.cosmos.gov.v1beta1.DepositParams(); + if (object.minDeposit) { + if (!Array.isArray(object.minDeposit)) + throw TypeError(".cosmos.gov.v1beta1.DepositParams.minDeposit: array expected"); + message.minDeposit = []; + for (var i = 0; i < object.minDeposit.length; ++i) { + if (typeof object.minDeposit[i] !== "object") + throw TypeError(".cosmos.gov.v1beta1.DepositParams.minDeposit: object expected"); + message.minDeposit[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.minDeposit[i]); + } + } + if (object.maxDepositPeriod != null) { + if (typeof object.maxDepositPeriod !== "object") + throw TypeError(".cosmos.gov.v1beta1.DepositParams.maxDepositPeriod: object expected"); + message.maxDepositPeriod = $root.google.protobuf.Duration.fromObject(object.maxDepositPeriod); + } + return message; + }; + + /** + * Creates a plain object from a DepositParams message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.gov.v1beta1.DepositParams + * @static + * @param {cosmos.gov.v1beta1.DepositParams} message DepositParams + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DepositParams.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.minDeposit = []; + if (options.defaults) + object.maxDepositPeriod = null; + if (message.minDeposit && message.minDeposit.length) { + object.minDeposit = []; + for (var j = 0; j < message.minDeposit.length; ++j) + object.minDeposit[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.minDeposit[j], options); + } + if (message.maxDepositPeriod != null && message.hasOwnProperty("maxDepositPeriod")) + object.maxDepositPeriod = $root.google.protobuf.Duration.toObject(message.maxDepositPeriod, options); + return object; + }; + + /** + * Converts this DepositParams to JSON. + * @function toJSON + * @memberof cosmos.gov.v1beta1.DepositParams + * @instance + * @returns {Object.} JSON object + */ + DepositParams.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DepositParams; + })(v1beta1.DepositParams || {}); + + v1beta1.VotingParams = (function(VotingParams) { + + /** + * Properties of a VotingParams. + * @memberof cosmos.gov.v1beta1 + * @interface IVotingParams + * @property {google.protobuf.IDuration|null} [votingPeriod] VotingParams votingPeriod + */ + + /** + * Constructs a new VotingParams. + * @memberof cosmos.gov.v1beta1 + * @classdesc Represents a VotingParams. + * @implements IVotingParams + * @constructor + * @param {cosmos.gov.v1beta1.IVotingParams=} [properties] Properties to set + */ + function VotingParams(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * VotingParams votingPeriod. + * @member {google.protobuf.IDuration|null|undefined} votingPeriod + * @memberof cosmos.gov.v1beta1.VotingParams + * @instance + */ + VotingParams.prototype.votingPeriod = null; + + /** + * Creates a new VotingParams instance using the specified properties. + * @function create + * @memberof cosmos.gov.v1beta1.VotingParams + * @static + * @param {cosmos.gov.v1beta1.IVotingParams=} [properties] Properties to set + * @returns {cosmos.gov.v1beta1.VotingParams} VotingParams instance + */ + VotingParams.create = function create(properties) { + return new VotingParams(properties); + }; + + /** + * Encodes the specified VotingParams message. Does not implicitly {@link cosmos.gov.v1beta1.VotingParams.verify|verify} messages. + * @function encode + * @memberof cosmos.gov.v1beta1.VotingParams + * @static + * @param {cosmos.gov.v1beta1.IVotingParams} message VotingParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VotingParams.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.votingPeriod != null && Object.hasOwnProperty.call(message, "votingPeriod")) + $root.google.protobuf.Duration.encode(message.votingPeriod, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified VotingParams message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.VotingParams.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.gov.v1beta1.VotingParams + * @static + * @param {cosmos.gov.v1beta1.IVotingParams} message VotingParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VotingParams.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VotingParams message from the specified reader or buffer. + * @function decode + * @memberof cosmos.gov.v1beta1.VotingParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.gov.v1beta1.VotingParams} VotingParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VotingParams.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1beta1.VotingParams(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.votingPeriod = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VotingParams message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.gov.v1beta1.VotingParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.gov.v1beta1.VotingParams} VotingParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VotingParams.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VotingParams message. + * @function verify + * @memberof cosmos.gov.v1beta1.VotingParams + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VotingParams.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.votingPeriod != null && message.hasOwnProperty("votingPeriod")) { + var error = $root.google.protobuf.Duration.verify(message.votingPeriod); + if (error) + return "votingPeriod." + error; + } + return null; + }; + + /** + * Creates a VotingParams message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.gov.v1beta1.VotingParams + * @static + * @param {Object.} object Plain object + * @returns {cosmos.gov.v1beta1.VotingParams} VotingParams + */ + VotingParams.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.gov.v1beta1.VotingParams) + return object; + var message = new $root.cosmos.gov.v1beta1.VotingParams(); + if (object.votingPeriod != null) { + if (typeof object.votingPeriod !== "object") + throw TypeError(".cosmos.gov.v1beta1.VotingParams.votingPeriod: object expected"); + message.votingPeriod = $root.google.protobuf.Duration.fromObject(object.votingPeriod); + } + return message; + }; + + /** + * Creates a plain object from a VotingParams message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.gov.v1beta1.VotingParams + * @static + * @param {cosmos.gov.v1beta1.VotingParams} message VotingParams + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VotingParams.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.votingPeriod = null; + if (message.votingPeriod != null && message.hasOwnProperty("votingPeriod")) + object.votingPeriod = $root.google.protobuf.Duration.toObject(message.votingPeriod, options); + return object; + }; + + /** + * Converts this VotingParams to JSON. + * @function toJSON + * @memberof cosmos.gov.v1beta1.VotingParams + * @instance + * @returns {Object.} JSON object + */ + VotingParams.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return VotingParams; + })(v1beta1.VotingParams || {}); + + v1beta1.TallyParams = (function(TallyParams) { + + /** + * Properties of a TallyParams. + * @memberof cosmos.gov.v1beta1 + * @interface ITallyParams + * @property {Uint8Array|null} [quorum] TallyParams quorum + * @property {Uint8Array|null} [threshold] TallyParams threshold + * @property {Uint8Array|null} [vetoThreshold] TallyParams vetoThreshold + */ + + /** + * Constructs a new TallyParams. + * @memberof cosmos.gov.v1beta1 + * @classdesc Represents a TallyParams. + * @implements ITallyParams + * @constructor + * @param {cosmos.gov.v1beta1.ITallyParams=} [properties] Properties to set + */ + function TallyParams(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TallyParams quorum. + * @member {Uint8Array} quorum + * @memberof cosmos.gov.v1beta1.TallyParams + * @instance + */ + TallyParams.prototype.quorum = $util.newBuffer([]); + + /** + * TallyParams threshold. + * @member {Uint8Array} threshold + * @memberof cosmos.gov.v1beta1.TallyParams + * @instance + */ + TallyParams.prototype.threshold = $util.newBuffer([]); + + /** + * TallyParams vetoThreshold. + * @member {Uint8Array} vetoThreshold + * @memberof cosmos.gov.v1beta1.TallyParams + * @instance + */ + TallyParams.prototype.vetoThreshold = $util.newBuffer([]); + + /** + * Creates a new TallyParams instance using the specified properties. + * @function create + * @memberof cosmos.gov.v1beta1.TallyParams + * @static + * @param {cosmos.gov.v1beta1.ITallyParams=} [properties] Properties to set + * @returns {cosmos.gov.v1beta1.TallyParams} TallyParams instance + */ + TallyParams.create = function create(properties) { + return new TallyParams(properties); + }; + + /** + * Encodes the specified TallyParams message. Does not implicitly {@link cosmos.gov.v1beta1.TallyParams.verify|verify} messages. + * @function encode + * @memberof cosmos.gov.v1beta1.TallyParams + * @static + * @param {cosmos.gov.v1beta1.ITallyParams} message TallyParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TallyParams.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.quorum != null && Object.hasOwnProperty.call(message, "quorum")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.quorum); + if (message.threshold != null && Object.hasOwnProperty.call(message, "threshold")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.threshold); + if (message.vetoThreshold != null && Object.hasOwnProperty.call(message, "vetoThreshold")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.vetoThreshold); + return writer; + }; + + /** + * Encodes the specified TallyParams message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.TallyParams.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.gov.v1beta1.TallyParams + * @static + * @param {cosmos.gov.v1beta1.ITallyParams} message TallyParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TallyParams.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TallyParams message from the specified reader or buffer. + * @function decode + * @memberof cosmos.gov.v1beta1.TallyParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.gov.v1beta1.TallyParams} TallyParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TallyParams.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1beta1.TallyParams(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.quorum = reader.bytes(); + break; + case 2: + message.threshold = reader.bytes(); + break; + case 3: + message.vetoThreshold = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TallyParams message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.gov.v1beta1.TallyParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.gov.v1beta1.TallyParams} TallyParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TallyParams.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TallyParams message. + * @function verify + * @memberof cosmos.gov.v1beta1.TallyParams + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TallyParams.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.quorum != null && message.hasOwnProperty("quorum")) + if (!(message.quorum && typeof message.quorum.length === "number" || $util.isString(message.quorum))) + return "quorum: buffer expected"; + if (message.threshold != null && message.hasOwnProperty("threshold")) + if (!(message.threshold && typeof message.threshold.length === "number" || $util.isString(message.threshold))) + return "threshold: buffer expected"; + if (message.vetoThreshold != null && message.hasOwnProperty("vetoThreshold")) + if (!(message.vetoThreshold && typeof message.vetoThreshold.length === "number" || $util.isString(message.vetoThreshold))) + return "vetoThreshold: buffer expected"; + return null; + }; + + /** + * Creates a TallyParams message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.gov.v1beta1.TallyParams + * @static + * @param {Object.} object Plain object + * @returns {cosmos.gov.v1beta1.TallyParams} TallyParams + */ + TallyParams.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.gov.v1beta1.TallyParams) + return object; + var message = new $root.cosmos.gov.v1beta1.TallyParams(); + if (object.quorum != null) + if (typeof object.quorum === "string") + $util.base64.decode(object.quorum, message.quorum = $util.newBuffer($util.base64.length(object.quorum)), 0); + else if (object.quorum.length) + message.quorum = object.quorum; + if (object.threshold != null) + if (typeof object.threshold === "string") + $util.base64.decode(object.threshold, message.threshold = $util.newBuffer($util.base64.length(object.threshold)), 0); + else if (object.threshold.length) + message.threshold = object.threshold; + if (object.vetoThreshold != null) + if (typeof object.vetoThreshold === "string") + $util.base64.decode(object.vetoThreshold, message.vetoThreshold = $util.newBuffer($util.base64.length(object.vetoThreshold)), 0); + else if (object.vetoThreshold.length) + message.vetoThreshold = object.vetoThreshold; + return message; + }; + + /** + * Creates a plain object from a TallyParams message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.gov.v1beta1.TallyParams + * @static + * @param {cosmos.gov.v1beta1.TallyParams} message TallyParams + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TallyParams.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.quorum = ""; + else { + object.quorum = []; + if (options.bytes !== Array) + object.quorum = $util.newBuffer(object.quorum); + } + if (options.bytes === String) + object.threshold = ""; + else { + object.threshold = []; + if (options.bytes !== Array) + object.threshold = $util.newBuffer(object.threshold); + } + if (options.bytes === String) + object.vetoThreshold = ""; + else { + object.vetoThreshold = []; + if (options.bytes !== Array) + object.vetoThreshold = $util.newBuffer(object.vetoThreshold); + } + } + if (message.quorum != null && message.hasOwnProperty("quorum")) + object.quorum = options.bytes === String ? $util.base64.encode(message.quorum, 0, message.quorum.length) : options.bytes === Array ? Array.prototype.slice.call(message.quorum) : message.quorum; + if (message.threshold != null && message.hasOwnProperty("threshold")) + object.threshold = options.bytes === String ? $util.base64.encode(message.threshold, 0, message.threshold.length) : options.bytes === Array ? Array.prototype.slice.call(message.threshold) : message.threshold; + if (message.vetoThreshold != null && message.hasOwnProperty("vetoThreshold")) + object.vetoThreshold = options.bytes === String ? $util.base64.encode(message.vetoThreshold, 0, message.vetoThreshold.length) : options.bytes === Array ? Array.prototype.slice.call(message.vetoThreshold) : message.vetoThreshold; + return object; + }; + + /** + * Converts this TallyParams to JSON. + * @function toJSON + * @memberof cosmos.gov.v1beta1.TallyParams + * @instance + * @returns {Object.} JSON object + */ + TallyParams.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TallyParams; + })(v1beta1.TallyParams || {}); + + v1beta1.Msg = (function(Msg) { + + /** + * Constructs a new Msg service. + * @memberof cosmos.gov.v1beta1 + * @classdesc Represents a Msg + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Msg(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Msg.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Msg; + + /** + * Creates new Msg service using the specified rpc implementation. + * @function create + * @memberof cosmos.gov.v1beta1.Msg + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Msg} RPC service. Useful where requests and/or responses are streamed. + */ + Msg.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link cosmos.gov.v1beta1.Msg#submitProposal}. + * @memberof cosmos.gov.v1beta1.Msg + * @typedef SubmitProposalCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.gov.v1beta1.IMsgSubmitProposalResponse} [response] MsgSubmitProposalResponse + */ + + /** + * Calls SubmitProposal. + * @function submitProposal + * @memberof cosmos.gov.v1beta1.Msg + * @instance + * @param {cosmos.gov.v1beta1.IMsgSubmitProposal} request MsgSubmitProposal message or plain object + * @param {cosmos.gov.v1beta1.Msg.SubmitProposalCallback} callback Node-style callback called with the error, if any, and MsgSubmitProposalResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Msg.prototype.submitProposal = function submitProposal(request, callback) { + return this.rpcCall(submitProposal, $root.cosmos.gov.v1beta1.MsgSubmitProposal, $root.cosmos.gov.v1beta1.MsgSubmitProposalResponse, request, callback); + }, "name", { value: "SubmitProposal" }); + + /** + * Calls SubmitProposal. + * @function submitProposal + * @memberof cosmos.gov.v1beta1.Msg + * @instance + * @param {cosmos.gov.v1beta1.IMsgSubmitProposal} request MsgSubmitProposal message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link cosmos.gov.v1beta1.Msg#vote}. + * @memberof cosmos.gov.v1beta1.Msg + * @typedef VoteCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.gov.v1beta1.IMsgVoteResponse} [response] MsgVoteResponse + */ + + /** + * Calls Vote. + * @function vote + * @memberof cosmos.gov.v1beta1.Msg + * @instance + * @param {cosmos.gov.v1beta1.IMsgVote} request MsgVote message or plain object + * @param {cosmos.gov.v1beta1.Msg.VoteCallback} callback Node-style callback called with the error, if any, and MsgVoteResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Msg.prototype.vote = function vote(request, callback) { + return this.rpcCall(vote, $root.cosmos.gov.v1beta1.MsgVote, $root.cosmos.gov.v1beta1.MsgVoteResponse, request, callback); + }, "name", { value: "Vote" }); + + /** + * Calls Vote. + * @function vote + * @memberof cosmos.gov.v1beta1.Msg + * @instance + * @param {cosmos.gov.v1beta1.IMsgVote} request MsgVote message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link cosmos.gov.v1beta1.Msg#deposit}. + * @memberof cosmos.gov.v1beta1.Msg + * @typedef DepositCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.gov.v1beta1.IMsgDepositResponse} [response] MsgDepositResponse + */ + + /** + * Calls Deposit. + * @function deposit + * @memberof cosmos.gov.v1beta1.Msg + * @instance + * @param {cosmos.gov.v1beta1.IMsgDeposit} request MsgDeposit message or plain object + * @param {cosmos.gov.v1beta1.Msg.DepositCallback} callback Node-style callback called with the error, if any, and MsgDepositResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Msg.prototype.deposit = function deposit(request, callback) { + return this.rpcCall(deposit, $root.cosmos.gov.v1beta1.MsgDeposit, $root.cosmos.gov.v1beta1.MsgDepositResponse, request, callback); + }, "name", { value: "Deposit" }); + + /** + * Calls Deposit. + * @function deposit + * @memberof cosmos.gov.v1beta1.Msg + * @instance + * @param {cosmos.gov.v1beta1.IMsgDeposit} request MsgDeposit message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Msg; + })(v1beta1.Msg || {}); + + v1beta1.MsgSubmitProposal = (function(MsgSubmitProposal) { + + /** + * Properties of a MsgSubmitProposal. + * @memberof cosmos.gov.v1beta1 + * @interface IMsgSubmitProposal + * @property {google.protobuf.IAny|null} [content] MsgSubmitProposal content + * @property {Array.|null} [initialDeposit] MsgSubmitProposal initialDeposit + * @property {string|null} [proposer] MsgSubmitProposal proposer + */ + + /** + * Constructs a new MsgSubmitProposal. + * @memberof cosmos.gov.v1beta1 + * @classdesc Represents a MsgSubmitProposal. + * @implements IMsgSubmitProposal + * @constructor + * @param {cosmos.gov.v1beta1.IMsgSubmitProposal=} [properties] Properties to set + */ + function MsgSubmitProposal(properties) { + this.initialDeposit = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgSubmitProposal content. + * @member {google.protobuf.IAny|null|undefined} content + * @memberof cosmos.gov.v1beta1.MsgSubmitProposal + * @instance + */ + MsgSubmitProposal.prototype.content = null; + + /** + * MsgSubmitProposal initialDeposit. + * @member {Array.} initialDeposit + * @memberof cosmos.gov.v1beta1.MsgSubmitProposal + * @instance + */ + MsgSubmitProposal.prototype.initialDeposit = $util.emptyArray; + + /** + * MsgSubmitProposal proposer. + * @member {string} proposer + * @memberof cosmos.gov.v1beta1.MsgSubmitProposal + * @instance + */ + MsgSubmitProposal.prototype.proposer = ""; + + /** + * Creates a new MsgSubmitProposal instance using the specified properties. + * @function create + * @memberof cosmos.gov.v1beta1.MsgSubmitProposal + * @static + * @param {cosmos.gov.v1beta1.IMsgSubmitProposal=} [properties] Properties to set + * @returns {cosmos.gov.v1beta1.MsgSubmitProposal} MsgSubmitProposal instance + */ + MsgSubmitProposal.create = function create(properties) { + return new MsgSubmitProposal(properties); + }; + + /** + * Encodes the specified MsgSubmitProposal message. Does not implicitly {@link cosmos.gov.v1beta1.MsgSubmitProposal.verify|verify} messages. + * @function encode + * @memberof cosmos.gov.v1beta1.MsgSubmitProposal + * @static + * @param {cosmos.gov.v1beta1.IMsgSubmitProposal} message MsgSubmitProposal message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgSubmitProposal.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.content != null && Object.hasOwnProperty.call(message, "content")) + $root.google.protobuf.Any.encode(message.content, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.initialDeposit != null && message.initialDeposit.length) + for (var i = 0; i < message.initialDeposit.length; ++i) + $root.cosmos.base.v1beta1.Coin.encode(message.initialDeposit[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.proposer != null && Object.hasOwnProperty.call(message, "proposer")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.proposer); + return writer; + }; + + /** + * Encodes the specified MsgSubmitProposal message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.MsgSubmitProposal.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.gov.v1beta1.MsgSubmitProposal + * @static + * @param {cosmos.gov.v1beta1.IMsgSubmitProposal} message MsgSubmitProposal message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgSubmitProposal.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgSubmitProposal message from the specified reader or buffer. + * @function decode + * @memberof cosmos.gov.v1beta1.MsgSubmitProposal + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.gov.v1beta1.MsgSubmitProposal} MsgSubmitProposal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgSubmitProposal.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1beta1.MsgSubmitProposal(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.content = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + case 2: + if (!(message.initialDeposit && message.initialDeposit.length)) + message.initialDeposit = []; + message.initialDeposit.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); + break; + case 3: + message.proposer = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgSubmitProposal message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.gov.v1beta1.MsgSubmitProposal + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.gov.v1beta1.MsgSubmitProposal} MsgSubmitProposal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgSubmitProposal.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgSubmitProposal message. + * @function verify + * @memberof cosmos.gov.v1beta1.MsgSubmitProposal + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgSubmitProposal.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.content != null && message.hasOwnProperty("content")) { + var error = $root.google.protobuf.Any.verify(message.content); + if (error) + return "content." + error; + } + if (message.initialDeposit != null && message.hasOwnProperty("initialDeposit")) { + if (!Array.isArray(message.initialDeposit)) + return "initialDeposit: array expected"; + for (var i = 0; i < message.initialDeposit.length; ++i) { + var error = $root.cosmos.base.v1beta1.Coin.verify(message.initialDeposit[i]); + if (error) + return "initialDeposit." + error; + } + } + if (message.proposer != null && message.hasOwnProperty("proposer")) + if (!$util.isString(message.proposer)) + return "proposer: string expected"; + return null; + }; + + /** + * Creates a MsgSubmitProposal message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.gov.v1beta1.MsgSubmitProposal + * @static + * @param {Object.} object Plain object + * @returns {cosmos.gov.v1beta1.MsgSubmitProposal} MsgSubmitProposal + */ + MsgSubmitProposal.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.gov.v1beta1.MsgSubmitProposal) + return object; + var message = new $root.cosmos.gov.v1beta1.MsgSubmitProposal(); + if (object.content != null) { + if (typeof object.content !== "object") + throw TypeError(".cosmos.gov.v1beta1.MsgSubmitProposal.content: object expected"); + message.content = $root.google.protobuf.Any.fromObject(object.content); + } + if (object.initialDeposit) { + if (!Array.isArray(object.initialDeposit)) + throw TypeError(".cosmos.gov.v1beta1.MsgSubmitProposal.initialDeposit: array expected"); + message.initialDeposit = []; + for (var i = 0; i < object.initialDeposit.length; ++i) { + if (typeof object.initialDeposit[i] !== "object") + throw TypeError(".cosmos.gov.v1beta1.MsgSubmitProposal.initialDeposit: object expected"); + message.initialDeposit[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.initialDeposit[i]); + } + } + if (object.proposer != null) + message.proposer = String(object.proposer); + return message; + }; + + /** + * Creates a plain object from a MsgSubmitProposal message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.gov.v1beta1.MsgSubmitProposal + * @static + * @param {cosmos.gov.v1beta1.MsgSubmitProposal} message MsgSubmitProposal + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgSubmitProposal.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.initialDeposit = []; + if (options.defaults) { + object.content = null; + object.proposer = ""; + } + if (message.content != null && message.hasOwnProperty("content")) + object.content = $root.google.protobuf.Any.toObject(message.content, options); + if (message.initialDeposit && message.initialDeposit.length) { + object.initialDeposit = []; + for (var j = 0; j < message.initialDeposit.length; ++j) + object.initialDeposit[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.initialDeposit[j], options); + } + if (message.proposer != null && message.hasOwnProperty("proposer")) + object.proposer = message.proposer; + return object; + }; + + /** + * Converts this MsgSubmitProposal to JSON. + * @function toJSON + * @memberof cosmos.gov.v1beta1.MsgSubmitProposal + * @instance + * @returns {Object.} JSON object + */ + MsgSubmitProposal.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgSubmitProposal; + })(v1beta1.MsgSubmitProposal || {}); + + v1beta1.MsgSubmitProposalResponse = (function(MsgSubmitProposalResponse) { + + /** + * Properties of a MsgSubmitProposalResponse. + * @memberof cosmos.gov.v1beta1 + * @interface IMsgSubmitProposalResponse + * @property {number|Long|null} [proposalId] MsgSubmitProposalResponse proposalId + */ + + /** + * Constructs a new MsgSubmitProposalResponse. + * @memberof cosmos.gov.v1beta1 + * @classdesc Represents a MsgSubmitProposalResponse. + * @implements IMsgSubmitProposalResponse + * @constructor + * @param {cosmos.gov.v1beta1.IMsgSubmitProposalResponse=} [properties] Properties to set + */ + function MsgSubmitProposalResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgSubmitProposalResponse proposalId. + * @member {number|Long} proposalId + * @memberof cosmos.gov.v1beta1.MsgSubmitProposalResponse + * @instance + */ + MsgSubmitProposalResponse.prototype.proposalId = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new MsgSubmitProposalResponse instance using the specified properties. + * @function create + * @memberof cosmos.gov.v1beta1.MsgSubmitProposalResponse + * @static + * @param {cosmos.gov.v1beta1.IMsgSubmitProposalResponse=} [properties] Properties to set + * @returns {cosmos.gov.v1beta1.MsgSubmitProposalResponse} MsgSubmitProposalResponse instance + */ + MsgSubmitProposalResponse.create = function create(properties) { + return new MsgSubmitProposalResponse(properties); + }; + + /** + * Encodes the specified MsgSubmitProposalResponse message. Does not implicitly {@link cosmos.gov.v1beta1.MsgSubmitProposalResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.gov.v1beta1.MsgSubmitProposalResponse + * @static + * @param {cosmos.gov.v1beta1.IMsgSubmitProposalResponse} message MsgSubmitProposalResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgSubmitProposalResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.proposalId != null && Object.hasOwnProperty.call(message, "proposalId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.proposalId); + return writer; + }; + + /** + * Encodes the specified MsgSubmitProposalResponse message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.MsgSubmitProposalResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.gov.v1beta1.MsgSubmitProposalResponse + * @static + * @param {cosmos.gov.v1beta1.IMsgSubmitProposalResponse} message MsgSubmitProposalResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgSubmitProposalResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgSubmitProposalResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.gov.v1beta1.MsgSubmitProposalResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.gov.v1beta1.MsgSubmitProposalResponse} MsgSubmitProposalResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgSubmitProposalResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1beta1.MsgSubmitProposalResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.proposalId = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgSubmitProposalResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.gov.v1beta1.MsgSubmitProposalResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.gov.v1beta1.MsgSubmitProposalResponse} MsgSubmitProposalResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgSubmitProposalResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgSubmitProposalResponse message. + * @function verify + * @memberof cosmos.gov.v1beta1.MsgSubmitProposalResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgSubmitProposalResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.proposalId != null && message.hasOwnProperty("proposalId")) + if (!$util.isInteger(message.proposalId) && !(message.proposalId && $util.isInteger(message.proposalId.low) && $util.isInteger(message.proposalId.high))) + return "proposalId: integer|Long expected"; + return null; + }; + + /** + * Creates a MsgSubmitProposalResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.gov.v1beta1.MsgSubmitProposalResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.gov.v1beta1.MsgSubmitProposalResponse} MsgSubmitProposalResponse + */ + MsgSubmitProposalResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.gov.v1beta1.MsgSubmitProposalResponse) + return object; + var message = new $root.cosmos.gov.v1beta1.MsgSubmitProposalResponse(); + if (object.proposalId != null) + if ($util.Long) + (message.proposalId = $util.Long.fromValue(object.proposalId)).unsigned = true; + else if (typeof object.proposalId === "string") + message.proposalId = parseInt(object.proposalId, 10); + else if (typeof object.proposalId === "number") + message.proposalId = object.proposalId; + else if (typeof object.proposalId === "object") + message.proposalId = new $util.LongBits(object.proposalId.low >>> 0, object.proposalId.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a MsgSubmitProposalResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.gov.v1beta1.MsgSubmitProposalResponse + * @static + * @param {cosmos.gov.v1beta1.MsgSubmitProposalResponse} message MsgSubmitProposalResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgSubmitProposalResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.proposalId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.proposalId = options.longs === String ? "0" : 0; + if (message.proposalId != null && message.hasOwnProperty("proposalId")) + if (typeof message.proposalId === "number") + object.proposalId = options.longs === String ? String(message.proposalId) : message.proposalId; + else + object.proposalId = options.longs === String ? $util.Long.prototype.toString.call(message.proposalId) : options.longs === Number ? new $util.LongBits(message.proposalId.low >>> 0, message.proposalId.high >>> 0).toNumber(true) : message.proposalId; + return object; + }; + + /** + * Converts this MsgSubmitProposalResponse to JSON. + * @function toJSON + * @memberof cosmos.gov.v1beta1.MsgSubmitProposalResponse + * @instance + * @returns {Object.} JSON object + */ + MsgSubmitProposalResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgSubmitProposalResponse; + })(v1beta1.MsgSubmitProposalResponse || {}); + + v1beta1.MsgVote = (function(MsgVote) { + + /** + * Properties of a MsgVote. + * @memberof cosmos.gov.v1beta1 + * @interface IMsgVote + * @property {number|Long|null} [proposalId] MsgVote proposalId + * @property {string|null} [voter] MsgVote voter + * @property {cosmos.gov.v1beta1.VoteOption|null} [option] MsgVote option + */ + + /** + * Constructs a new MsgVote. + * @memberof cosmos.gov.v1beta1 + * @classdesc Represents a MsgVote. + * @implements IMsgVote + * @constructor + * @param {cosmos.gov.v1beta1.IMsgVote=} [properties] Properties to set + */ + function MsgVote(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgVote proposalId. + * @member {number|Long} proposalId + * @memberof cosmos.gov.v1beta1.MsgVote + * @instance + */ + MsgVote.prototype.proposalId = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * MsgVote voter. + * @member {string} voter + * @memberof cosmos.gov.v1beta1.MsgVote + * @instance + */ + MsgVote.prototype.voter = ""; + + /** + * MsgVote option. + * @member {cosmos.gov.v1beta1.VoteOption} option + * @memberof cosmos.gov.v1beta1.MsgVote + * @instance + */ + MsgVote.prototype.option = 0; + + /** + * Creates a new MsgVote instance using the specified properties. + * @function create + * @memberof cosmos.gov.v1beta1.MsgVote + * @static + * @param {cosmos.gov.v1beta1.IMsgVote=} [properties] Properties to set + * @returns {cosmos.gov.v1beta1.MsgVote} MsgVote instance + */ + MsgVote.create = function create(properties) { + return new MsgVote(properties); + }; + + /** + * Encodes the specified MsgVote message. Does not implicitly {@link cosmos.gov.v1beta1.MsgVote.verify|verify} messages. + * @function encode + * @memberof cosmos.gov.v1beta1.MsgVote + * @static + * @param {cosmos.gov.v1beta1.IMsgVote} message MsgVote message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgVote.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.proposalId != null && Object.hasOwnProperty.call(message, "proposalId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.proposalId); + if (message.voter != null && Object.hasOwnProperty.call(message, "voter")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.voter); + if (message.option != null && Object.hasOwnProperty.call(message, "option")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.option); + return writer; + }; + + /** + * Encodes the specified MsgVote message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.MsgVote.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.gov.v1beta1.MsgVote + * @static + * @param {cosmos.gov.v1beta1.IMsgVote} message MsgVote message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgVote.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgVote message from the specified reader or buffer. + * @function decode + * @memberof cosmos.gov.v1beta1.MsgVote + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.gov.v1beta1.MsgVote} MsgVote + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgVote.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1beta1.MsgVote(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.proposalId = reader.uint64(); + break; + case 2: + message.voter = reader.string(); + break; + case 3: + message.option = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgVote message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.gov.v1beta1.MsgVote + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.gov.v1beta1.MsgVote} MsgVote + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgVote.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgVote message. + * @function verify + * @memberof cosmos.gov.v1beta1.MsgVote + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgVote.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.proposalId != null && message.hasOwnProperty("proposalId")) + if (!$util.isInteger(message.proposalId) && !(message.proposalId && $util.isInteger(message.proposalId.low) && $util.isInteger(message.proposalId.high))) + return "proposalId: integer|Long expected"; + if (message.voter != null && message.hasOwnProperty("voter")) + if (!$util.isString(message.voter)) + return "voter: string expected"; + if (message.option != null && message.hasOwnProperty("option")) + switch (message.option) { + default: + return "option: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + return null; + }; + + /** + * Creates a MsgVote message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.gov.v1beta1.MsgVote + * @static + * @param {Object.} object Plain object + * @returns {cosmos.gov.v1beta1.MsgVote} MsgVote + */ + MsgVote.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.gov.v1beta1.MsgVote) + return object; + var message = new $root.cosmos.gov.v1beta1.MsgVote(); + if (object.proposalId != null) + if ($util.Long) + (message.proposalId = $util.Long.fromValue(object.proposalId)).unsigned = true; + else if (typeof object.proposalId === "string") + message.proposalId = parseInt(object.proposalId, 10); + else if (typeof object.proposalId === "number") + message.proposalId = object.proposalId; + else if (typeof object.proposalId === "object") + message.proposalId = new $util.LongBits(object.proposalId.low >>> 0, object.proposalId.high >>> 0).toNumber(true); + if (object.voter != null) + message.voter = String(object.voter); + switch (object.option) { + case "VOTE_OPTION_UNSPECIFIED": + case 0: + message.option = 0; + break; + case "VOTE_OPTION_YES": + case 1: + message.option = 1; + break; + case "VOTE_OPTION_ABSTAIN": + case 2: + message.option = 2; + break; + case "VOTE_OPTION_NO": + case 3: + message.option = 3; + break; + case "VOTE_OPTION_NO_WITH_VETO": + case 4: + message.option = 4; + break; + } + return message; + }; + + /** + * Creates a plain object from a MsgVote message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.gov.v1beta1.MsgVote + * @static + * @param {cosmos.gov.v1beta1.MsgVote} message MsgVote + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgVote.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.proposalId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.proposalId = options.longs === String ? "0" : 0; + object.voter = ""; + object.option = options.enums === String ? "VOTE_OPTION_UNSPECIFIED" : 0; + } + if (message.proposalId != null && message.hasOwnProperty("proposalId")) + if (typeof message.proposalId === "number") + object.proposalId = options.longs === String ? String(message.proposalId) : message.proposalId; + else + object.proposalId = options.longs === String ? $util.Long.prototype.toString.call(message.proposalId) : options.longs === Number ? new $util.LongBits(message.proposalId.low >>> 0, message.proposalId.high >>> 0).toNumber(true) : message.proposalId; + if (message.voter != null && message.hasOwnProperty("voter")) + object.voter = message.voter; + if (message.option != null && message.hasOwnProperty("option")) + object.option = options.enums === String ? $root.cosmos.gov.v1beta1.VoteOption[message.option] : message.option; + return object; + }; + + /** + * Converts this MsgVote to JSON. + * @function toJSON + * @memberof cosmos.gov.v1beta1.MsgVote + * @instance + * @returns {Object.} JSON object + */ + MsgVote.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgVote; + })(v1beta1.MsgVote || {}); + + v1beta1.MsgVoteResponse = (function(MsgVoteResponse) { + + /** + * Properties of a MsgVoteResponse. + * @memberof cosmos.gov.v1beta1 + * @interface IMsgVoteResponse + */ + + /** + * Constructs a new MsgVoteResponse. + * @memberof cosmos.gov.v1beta1 + * @classdesc Represents a MsgVoteResponse. + * @implements IMsgVoteResponse + * @constructor + * @param {cosmos.gov.v1beta1.IMsgVoteResponse=} [properties] Properties to set + */ + function MsgVoteResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new MsgVoteResponse instance using the specified properties. + * @function create + * @memberof cosmos.gov.v1beta1.MsgVoteResponse + * @static + * @param {cosmos.gov.v1beta1.IMsgVoteResponse=} [properties] Properties to set + * @returns {cosmos.gov.v1beta1.MsgVoteResponse} MsgVoteResponse instance + */ + MsgVoteResponse.create = function create(properties) { + return new MsgVoteResponse(properties); + }; + + /** + * Encodes the specified MsgVoteResponse message. Does not implicitly {@link cosmos.gov.v1beta1.MsgVoteResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.gov.v1beta1.MsgVoteResponse + * @static + * @param {cosmos.gov.v1beta1.IMsgVoteResponse} message MsgVoteResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgVoteResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MsgVoteResponse message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.MsgVoteResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.gov.v1beta1.MsgVoteResponse + * @static + * @param {cosmos.gov.v1beta1.IMsgVoteResponse} message MsgVoteResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgVoteResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgVoteResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.gov.v1beta1.MsgVoteResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.gov.v1beta1.MsgVoteResponse} MsgVoteResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgVoteResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1beta1.MsgVoteResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgVoteResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.gov.v1beta1.MsgVoteResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.gov.v1beta1.MsgVoteResponse} MsgVoteResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgVoteResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgVoteResponse message. + * @function verify + * @memberof cosmos.gov.v1beta1.MsgVoteResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgVoteResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MsgVoteResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.gov.v1beta1.MsgVoteResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.gov.v1beta1.MsgVoteResponse} MsgVoteResponse + */ + MsgVoteResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.gov.v1beta1.MsgVoteResponse) + return object; + return new $root.cosmos.gov.v1beta1.MsgVoteResponse(); + }; + + /** + * Creates a plain object from a MsgVoteResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.gov.v1beta1.MsgVoteResponse + * @static + * @param {cosmos.gov.v1beta1.MsgVoteResponse} message MsgVoteResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgVoteResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MsgVoteResponse to JSON. + * @function toJSON + * @memberof cosmos.gov.v1beta1.MsgVoteResponse + * @instance + * @returns {Object.} JSON object + */ + MsgVoteResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgVoteResponse; + })(v1beta1.MsgVoteResponse || {}); + + v1beta1.MsgDeposit = (function(MsgDeposit) { + + /** + * Properties of a MsgDeposit. + * @memberof cosmos.gov.v1beta1 + * @interface IMsgDeposit + * @property {number|Long|null} [proposalId] MsgDeposit proposalId + * @property {string|null} [depositor] MsgDeposit depositor + * @property {Array.|null} [amount] MsgDeposit amount + */ + + /** + * Constructs a new MsgDeposit. + * @memberof cosmos.gov.v1beta1 + * @classdesc Represents a MsgDeposit. + * @implements IMsgDeposit + * @constructor + * @param {cosmos.gov.v1beta1.IMsgDeposit=} [properties] Properties to set + */ + function MsgDeposit(properties) { + this.amount = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgDeposit proposalId. + * @member {number|Long} proposalId + * @memberof cosmos.gov.v1beta1.MsgDeposit + * @instance + */ + MsgDeposit.prototype.proposalId = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * MsgDeposit depositor. + * @member {string} depositor + * @memberof cosmos.gov.v1beta1.MsgDeposit + * @instance + */ + MsgDeposit.prototype.depositor = ""; + + /** + * MsgDeposit amount. + * @member {Array.} amount + * @memberof cosmos.gov.v1beta1.MsgDeposit + * @instance + */ + MsgDeposit.prototype.amount = $util.emptyArray; + + /** + * Creates a new MsgDeposit instance using the specified properties. + * @function create + * @memberof cosmos.gov.v1beta1.MsgDeposit + * @static + * @param {cosmos.gov.v1beta1.IMsgDeposit=} [properties] Properties to set + * @returns {cosmos.gov.v1beta1.MsgDeposit} MsgDeposit instance + */ + MsgDeposit.create = function create(properties) { + return new MsgDeposit(properties); + }; + + /** + * Encodes the specified MsgDeposit message. Does not implicitly {@link cosmos.gov.v1beta1.MsgDeposit.verify|verify} messages. + * @function encode + * @memberof cosmos.gov.v1beta1.MsgDeposit + * @static + * @param {cosmos.gov.v1beta1.IMsgDeposit} message MsgDeposit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgDeposit.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.proposalId != null && Object.hasOwnProperty.call(message, "proposalId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.proposalId); + if (message.depositor != null && Object.hasOwnProperty.call(message, "depositor")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.depositor); + if (message.amount != null && message.amount.length) + for (var i = 0; i < message.amount.length; ++i) + $root.cosmos.base.v1beta1.Coin.encode(message.amount[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MsgDeposit message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.MsgDeposit.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.gov.v1beta1.MsgDeposit + * @static + * @param {cosmos.gov.v1beta1.IMsgDeposit} message MsgDeposit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgDeposit.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgDeposit message from the specified reader or buffer. + * @function decode + * @memberof cosmos.gov.v1beta1.MsgDeposit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.gov.v1beta1.MsgDeposit} MsgDeposit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgDeposit.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1beta1.MsgDeposit(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.proposalId = reader.uint64(); + break; + case 2: + message.depositor = reader.string(); + break; + case 3: + if (!(message.amount && message.amount.length)) + message.amount = []; + message.amount.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgDeposit message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.gov.v1beta1.MsgDeposit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.gov.v1beta1.MsgDeposit} MsgDeposit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgDeposit.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgDeposit message. + * @function verify + * @memberof cosmos.gov.v1beta1.MsgDeposit + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgDeposit.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.proposalId != null && message.hasOwnProperty("proposalId")) + if (!$util.isInteger(message.proposalId) && !(message.proposalId && $util.isInteger(message.proposalId.low) && $util.isInteger(message.proposalId.high))) + return "proposalId: integer|Long expected"; + if (message.depositor != null && message.hasOwnProperty("depositor")) + if (!$util.isString(message.depositor)) + return "depositor: string expected"; + if (message.amount != null && message.hasOwnProperty("amount")) { + if (!Array.isArray(message.amount)) + return "amount: array expected"; + for (var i = 0; i < message.amount.length; ++i) { + var error = $root.cosmos.base.v1beta1.Coin.verify(message.amount[i]); + if (error) + return "amount." + error; + } + } + return null; + }; + + /** + * Creates a MsgDeposit message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.gov.v1beta1.MsgDeposit + * @static + * @param {Object.} object Plain object + * @returns {cosmos.gov.v1beta1.MsgDeposit} MsgDeposit + */ + MsgDeposit.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.gov.v1beta1.MsgDeposit) + return object; + var message = new $root.cosmos.gov.v1beta1.MsgDeposit(); + if (object.proposalId != null) + if ($util.Long) + (message.proposalId = $util.Long.fromValue(object.proposalId)).unsigned = true; + else if (typeof object.proposalId === "string") + message.proposalId = parseInt(object.proposalId, 10); + else if (typeof object.proposalId === "number") + message.proposalId = object.proposalId; + else if (typeof object.proposalId === "object") + message.proposalId = new $util.LongBits(object.proposalId.low >>> 0, object.proposalId.high >>> 0).toNumber(true); + if (object.depositor != null) + message.depositor = String(object.depositor); + if (object.amount) { + if (!Array.isArray(object.amount)) + throw TypeError(".cosmos.gov.v1beta1.MsgDeposit.amount: array expected"); + message.amount = []; + for (var i = 0; i < object.amount.length; ++i) { + if (typeof object.amount[i] !== "object") + throw TypeError(".cosmos.gov.v1beta1.MsgDeposit.amount: object expected"); + message.amount[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.amount[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a MsgDeposit message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.gov.v1beta1.MsgDeposit + * @static + * @param {cosmos.gov.v1beta1.MsgDeposit} message MsgDeposit + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgDeposit.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.amount = []; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.proposalId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.proposalId = options.longs === String ? "0" : 0; + object.depositor = ""; + } + if (message.proposalId != null && message.hasOwnProperty("proposalId")) + if (typeof message.proposalId === "number") + object.proposalId = options.longs === String ? String(message.proposalId) : message.proposalId; + else + object.proposalId = options.longs === String ? $util.Long.prototype.toString.call(message.proposalId) : options.longs === Number ? new $util.LongBits(message.proposalId.low >>> 0, message.proposalId.high >>> 0).toNumber(true) : message.proposalId; + if (message.depositor != null && message.hasOwnProperty("depositor")) + object.depositor = message.depositor; + if (message.amount && message.amount.length) { + object.amount = []; + for (var j = 0; j < message.amount.length; ++j) + object.amount[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.amount[j], options); + } + return object; + }; + + /** + * Converts this MsgDeposit to JSON. + * @function toJSON + * @memberof cosmos.gov.v1beta1.MsgDeposit + * @instance + * @returns {Object.} JSON object + */ + MsgDeposit.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgDeposit; + })(v1beta1.MsgDeposit || {}); + + v1beta1.MsgDepositResponse = (function(MsgDepositResponse) { + + /** + * Properties of a MsgDepositResponse. + * @memberof cosmos.gov.v1beta1 + * @interface IMsgDepositResponse + */ + + /** + * Constructs a new MsgDepositResponse. + * @memberof cosmos.gov.v1beta1 + * @classdesc Represents a MsgDepositResponse. + * @implements IMsgDepositResponse + * @constructor + * @param {cosmos.gov.v1beta1.IMsgDepositResponse=} [properties] Properties to set + */ + function MsgDepositResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new MsgDepositResponse instance using the specified properties. + * @function create + * @memberof cosmos.gov.v1beta1.MsgDepositResponse + * @static + * @param {cosmos.gov.v1beta1.IMsgDepositResponse=} [properties] Properties to set + * @returns {cosmos.gov.v1beta1.MsgDepositResponse} MsgDepositResponse instance + */ + MsgDepositResponse.create = function create(properties) { + return new MsgDepositResponse(properties); + }; + + /** + * Encodes the specified MsgDepositResponse message. Does not implicitly {@link cosmos.gov.v1beta1.MsgDepositResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.gov.v1beta1.MsgDepositResponse + * @static + * @param {cosmos.gov.v1beta1.IMsgDepositResponse} message MsgDepositResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgDepositResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MsgDepositResponse message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.MsgDepositResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.gov.v1beta1.MsgDepositResponse + * @static + * @param {cosmos.gov.v1beta1.IMsgDepositResponse} message MsgDepositResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgDepositResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgDepositResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.gov.v1beta1.MsgDepositResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.gov.v1beta1.MsgDepositResponse} MsgDepositResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgDepositResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1beta1.MsgDepositResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgDepositResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.gov.v1beta1.MsgDepositResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.gov.v1beta1.MsgDepositResponse} MsgDepositResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgDepositResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgDepositResponse message. + * @function verify + * @memberof cosmos.gov.v1beta1.MsgDepositResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgDepositResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MsgDepositResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.gov.v1beta1.MsgDepositResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.gov.v1beta1.MsgDepositResponse} MsgDepositResponse + */ + MsgDepositResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.gov.v1beta1.MsgDepositResponse) + return object; + return new $root.cosmos.gov.v1beta1.MsgDepositResponse(); + }; + + /** + * Creates a plain object from a MsgDepositResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.gov.v1beta1.MsgDepositResponse + * @static + * @param {cosmos.gov.v1beta1.MsgDepositResponse} message MsgDepositResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgDepositResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MsgDepositResponse to JSON. + * @function toJSON + * @memberof cosmos.gov.v1beta1.MsgDepositResponse + * @instance + * @returns {Object.} JSON object + */ + MsgDepositResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgDepositResponse; + })(v1beta1.MsgDepositResponse || {}); + + return v1beta1; + })(gov.v1beta1 || {}); + + return gov; + })(cosmos.gov || {}); + + /** + * Namespace staking. + * @memberof cosmos + * @namespace + */ + + cosmos.staking = (function(staking) { + + /** + * Namespace v1beta1. + * @memberof cosmos.staking + * @namespace + */ + + staking.v1beta1 = (function(v1beta1) { + + v1beta1.HistoricalInfo = (function(HistoricalInfo) { + + /** + * Properties of a HistoricalInfo. + * @memberof cosmos.staking.v1beta1 + * @interface IHistoricalInfo + * @property {tendermint.types.IHeader|null} [header] HistoricalInfo header + * @property {Array.|null} [valset] HistoricalInfo valset + */ + + /** + * Constructs a new HistoricalInfo. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a HistoricalInfo. + * @implements IHistoricalInfo + * @constructor + * @param {cosmos.staking.v1beta1.IHistoricalInfo=} [properties] Properties to set + */ + function HistoricalInfo(properties) { + this.valset = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HistoricalInfo header. + * @member {tendermint.types.IHeader|null|undefined} header + * @memberof cosmos.staking.v1beta1.HistoricalInfo + * @instance + */ + HistoricalInfo.prototype.header = null; + + /** + * HistoricalInfo valset. + * @member {Array.} valset + * @memberof cosmos.staking.v1beta1.HistoricalInfo + * @instance + */ + HistoricalInfo.prototype.valset = $util.emptyArray; + + /** + * Creates a new HistoricalInfo instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.HistoricalInfo + * @static + * @param {cosmos.staking.v1beta1.IHistoricalInfo=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.HistoricalInfo} HistoricalInfo instance + */ + HistoricalInfo.create = function create(properties) { + return new HistoricalInfo(properties); + }; + + /** + * Encodes the specified HistoricalInfo message. Does not implicitly {@link cosmos.staking.v1beta1.HistoricalInfo.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.HistoricalInfo + * @static + * @param {cosmos.staking.v1beta1.IHistoricalInfo} message HistoricalInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HistoricalInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.header != null && Object.hasOwnProperty.call(message, "header")) + $root.tendermint.types.Header.encode(message.header, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.valset != null && message.valset.length) + for (var i = 0; i < message.valset.length; ++i) + $root.cosmos.staking.v1beta1.Validator.encode(message.valset[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified HistoricalInfo message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.HistoricalInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.HistoricalInfo + * @static + * @param {cosmos.staking.v1beta1.IHistoricalInfo} message HistoricalInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HistoricalInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HistoricalInfo message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.HistoricalInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.HistoricalInfo} HistoricalInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HistoricalInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.HistoricalInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.header = $root.tendermint.types.Header.decode(reader, reader.uint32()); + break; + case 2: + if (!(message.valset && message.valset.length)) + message.valset = []; + message.valset.push($root.cosmos.staking.v1beta1.Validator.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HistoricalInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.HistoricalInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.HistoricalInfo} HistoricalInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HistoricalInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HistoricalInfo message. + * @function verify + * @memberof cosmos.staking.v1beta1.HistoricalInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HistoricalInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.header != null && message.hasOwnProperty("header")) { + var error = $root.tendermint.types.Header.verify(message.header); + if (error) + return "header." + error; + } + if (message.valset != null && message.hasOwnProperty("valset")) { + if (!Array.isArray(message.valset)) + return "valset: array expected"; + for (var i = 0; i < message.valset.length; ++i) { + var error = $root.cosmos.staking.v1beta1.Validator.verify(message.valset[i]); + if (error) + return "valset." + error; + } + } + return null; + }; + + /** + * Creates a HistoricalInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.HistoricalInfo + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.HistoricalInfo} HistoricalInfo + */ + HistoricalInfo.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.HistoricalInfo) + return object; + var message = new $root.cosmos.staking.v1beta1.HistoricalInfo(); + if (object.header != null) { + if (typeof object.header !== "object") + throw TypeError(".cosmos.staking.v1beta1.HistoricalInfo.header: object expected"); + message.header = $root.tendermint.types.Header.fromObject(object.header); + } + if (object.valset) { + if (!Array.isArray(object.valset)) + throw TypeError(".cosmos.staking.v1beta1.HistoricalInfo.valset: array expected"); + message.valset = []; + for (var i = 0; i < object.valset.length; ++i) { + if (typeof object.valset[i] !== "object") + throw TypeError(".cosmos.staking.v1beta1.HistoricalInfo.valset: object expected"); + message.valset[i] = $root.cosmos.staking.v1beta1.Validator.fromObject(object.valset[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a HistoricalInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.HistoricalInfo + * @static + * @param {cosmos.staking.v1beta1.HistoricalInfo} message HistoricalInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HistoricalInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.valset = []; + if (options.defaults) + object.header = null; + if (message.header != null && message.hasOwnProperty("header")) + object.header = $root.tendermint.types.Header.toObject(message.header, options); + if (message.valset && message.valset.length) { + object.valset = []; + for (var j = 0; j < message.valset.length; ++j) + object.valset[j] = $root.cosmos.staking.v1beta1.Validator.toObject(message.valset[j], options); + } + return object; + }; + + /** + * Converts this HistoricalInfo to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.HistoricalInfo + * @instance + * @returns {Object.} JSON object + */ + HistoricalInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return HistoricalInfo; + })(v1beta1.HistoricalInfo || {}); + + v1beta1.CommissionRates = (function(CommissionRates) { + + /** + * Properties of a CommissionRates. + * @memberof cosmos.staking.v1beta1 + * @interface ICommissionRates + * @property {string|null} [rate] CommissionRates rate + * @property {string|null} [maxRate] CommissionRates maxRate + * @property {string|null} [maxChangeRate] CommissionRates maxChangeRate + */ + + /** + * Constructs a new CommissionRates. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a CommissionRates. + * @implements ICommissionRates + * @constructor + * @param {cosmos.staking.v1beta1.ICommissionRates=} [properties] Properties to set + */ + function CommissionRates(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CommissionRates rate. + * @member {string} rate + * @memberof cosmos.staking.v1beta1.CommissionRates + * @instance + */ + CommissionRates.prototype.rate = ""; + + /** + * CommissionRates maxRate. + * @member {string} maxRate + * @memberof cosmos.staking.v1beta1.CommissionRates + * @instance + */ + CommissionRates.prototype.maxRate = ""; + + /** + * CommissionRates maxChangeRate. + * @member {string} maxChangeRate + * @memberof cosmos.staking.v1beta1.CommissionRates + * @instance + */ + CommissionRates.prototype.maxChangeRate = ""; + + /** + * Creates a new CommissionRates instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.CommissionRates + * @static + * @param {cosmos.staking.v1beta1.ICommissionRates=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.CommissionRates} CommissionRates instance + */ + CommissionRates.create = function create(properties) { + return new CommissionRates(properties); + }; + + /** + * Encodes the specified CommissionRates message. Does not implicitly {@link cosmos.staking.v1beta1.CommissionRates.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.CommissionRates + * @static + * @param {cosmos.staking.v1beta1.ICommissionRates} message CommissionRates message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommissionRates.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rate != null && Object.hasOwnProperty.call(message, "rate")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.rate); + if (message.maxRate != null && Object.hasOwnProperty.call(message, "maxRate")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.maxRate); + if (message.maxChangeRate != null && Object.hasOwnProperty.call(message, "maxChangeRate")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.maxChangeRate); + return writer; + }; + + /** + * Encodes the specified CommissionRates message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.CommissionRates.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.CommissionRates + * @static + * @param {cosmos.staking.v1beta1.ICommissionRates} message CommissionRates message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommissionRates.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CommissionRates message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.CommissionRates + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.CommissionRates} CommissionRates + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommissionRates.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.CommissionRates(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.rate = reader.string(); + break; + case 2: + message.maxRate = reader.string(); + break; + case 3: + message.maxChangeRate = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CommissionRates message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.CommissionRates + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.CommissionRates} CommissionRates + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommissionRates.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CommissionRates message. + * @function verify + * @memberof cosmos.staking.v1beta1.CommissionRates + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CommissionRates.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rate != null && message.hasOwnProperty("rate")) + if (!$util.isString(message.rate)) + return "rate: string expected"; + if (message.maxRate != null && message.hasOwnProperty("maxRate")) + if (!$util.isString(message.maxRate)) + return "maxRate: string expected"; + if (message.maxChangeRate != null && message.hasOwnProperty("maxChangeRate")) + if (!$util.isString(message.maxChangeRate)) + return "maxChangeRate: string expected"; + return null; + }; + + /** + * Creates a CommissionRates message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.CommissionRates + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.CommissionRates} CommissionRates + */ + CommissionRates.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.CommissionRates) + return object; + var message = new $root.cosmos.staking.v1beta1.CommissionRates(); + if (object.rate != null) + message.rate = String(object.rate); + if (object.maxRate != null) + message.maxRate = String(object.maxRate); + if (object.maxChangeRate != null) + message.maxChangeRate = String(object.maxChangeRate); + return message; + }; + + /** + * Creates a plain object from a CommissionRates message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.CommissionRates + * @static + * @param {cosmos.staking.v1beta1.CommissionRates} message CommissionRates + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CommissionRates.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.rate = ""; + object.maxRate = ""; + object.maxChangeRate = ""; + } + if (message.rate != null && message.hasOwnProperty("rate")) + object.rate = message.rate; + if (message.maxRate != null && message.hasOwnProperty("maxRate")) + object.maxRate = message.maxRate; + if (message.maxChangeRate != null && message.hasOwnProperty("maxChangeRate")) + object.maxChangeRate = message.maxChangeRate; + return object; + }; + + /** + * Converts this CommissionRates to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.CommissionRates + * @instance + * @returns {Object.} JSON object + */ + CommissionRates.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CommissionRates; + })(v1beta1.CommissionRates || {}); + + v1beta1.Commission = (function(Commission) { + + /** + * Properties of a Commission. + * @memberof cosmos.staking.v1beta1 + * @interface ICommission + * @property {cosmos.staking.v1beta1.ICommissionRates|null} [commissionRates] Commission commissionRates + * @property {google.protobuf.ITimestamp|null} [updateTime] Commission updateTime + */ + + /** + * Constructs a new Commission. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a Commission. + * @implements ICommission + * @constructor + * @param {cosmos.staking.v1beta1.ICommission=} [properties] Properties to set + */ + function Commission(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Commission commissionRates. + * @member {cosmos.staking.v1beta1.ICommissionRates|null|undefined} commissionRates + * @memberof cosmos.staking.v1beta1.Commission + * @instance + */ + Commission.prototype.commissionRates = null; + + /** + * Commission updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof cosmos.staking.v1beta1.Commission + * @instance + */ + Commission.prototype.updateTime = null; + + /** + * Creates a new Commission instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.Commission + * @static + * @param {cosmos.staking.v1beta1.ICommission=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.Commission} Commission instance + */ + Commission.create = function create(properties) { + return new Commission(properties); + }; + + /** + * Encodes the specified Commission message. Does not implicitly {@link cosmos.staking.v1beta1.Commission.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.Commission + * @static + * @param {cosmos.staking.v1beta1.ICommission} message Commission message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Commission.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.commissionRates != null && Object.hasOwnProperty.call(message, "commissionRates")) + $root.cosmos.staking.v1beta1.CommissionRates.encode(message.commissionRates, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Commission message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.Commission.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.Commission + * @static + * @param {cosmos.staking.v1beta1.ICommission} message Commission message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Commission.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Commission message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.Commission + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.Commission} Commission + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Commission.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.Commission(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.commissionRates = $root.cosmos.staking.v1beta1.CommissionRates.decode(reader, reader.uint32()); + break; + case 2: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Commission message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.Commission + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.Commission} Commission + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Commission.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Commission message. + * @function verify + * @memberof cosmos.staking.v1beta1.Commission + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Commission.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.commissionRates != null && message.hasOwnProperty("commissionRates")) { + var error = $root.cosmos.staking.v1beta1.CommissionRates.verify(message.commissionRates); + if (error) + return "commissionRates." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + return null; + }; + + /** + * Creates a Commission message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.Commission + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.Commission} Commission + */ + Commission.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.Commission) + return object; + var message = new $root.cosmos.staking.v1beta1.Commission(); + if (object.commissionRates != null) { + if (typeof object.commissionRates !== "object") + throw TypeError(".cosmos.staking.v1beta1.Commission.commissionRates: object expected"); + message.commissionRates = $root.cosmos.staking.v1beta1.CommissionRates.fromObject(object.commissionRates); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".cosmos.staking.v1beta1.Commission.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + return message; + }; + + /** + * Creates a plain object from a Commission message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.Commission + * @static + * @param {cosmos.staking.v1beta1.Commission} message Commission + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Commission.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.commissionRates = null; + object.updateTime = null; + } + if (message.commissionRates != null && message.hasOwnProperty("commissionRates")) + object.commissionRates = $root.cosmos.staking.v1beta1.CommissionRates.toObject(message.commissionRates, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + return object; + }; + + /** + * Converts this Commission to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.Commission + * @instance + * @returns {Object.} JSON object + */ + Commission.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Commission; + })(v1beta1.Commission || {}); + + v1beta1.Description = (function(Description) { + + /** + * Properties of a Description. + * @memberof cosmos.staking.v1beta1 + * @interface IDescription + * @property {string|null} [moniker] Description moniker + * @property {string|null} [identity] Description identity + * @property {string|null} [website] Description website + * @property {string|null} [securityContact] Description securityContact + * @property {string|null} [details] Description details + */ + + /** + * Constructs a new Description. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a Description. + * @implements IDescription + * @constructor + * @param {cosmos.staking.v1beta1.IDescription=} [properties] Properties to set + */ + function Description(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Description moniker. + * @member {string} moniker + * @memberof cosmos.staking.v1beta1.Description + * @instance + */ + Description.prototype.moniker = ""; + + /** + * Description identity. + * @member {string} identity + * @memberof cosmos.staking.v1beta1.Description + * @instance + */ + Description.prototype.identity = ""; + + /** + * Description website. + * @member {string} website + * @memberof cosmos.staking.v1beta1.Description + * @instance + */ + Description.prototype.website = ""; + + /** + * Description securityContact. + * @member {string} securityContact + * @memberof cosmos.staking.v1beta1.Description + * @instance + */ + Description.prototype.securityContact = ""; + + /** + * Description details. + * @member {string} details + * @memberof cosmos.staking.v1beta1.Description + * @instance + */ + Description.prototype.details = ""; + + /** + * Creates a new Description instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.Description + * @static + * @param {cosmos.staking.v1beta1.IDescription=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.Description} Description instance + */ + Description.create = function create(properties) { + return new Description(properties); + }; + + /** + * Encodes the specified Description message. Does not implicitly {@link cosmos.staking.v1beta1.Description.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.Description + * @static + * @param {cosmos.staking.v1beta1.IDescription} message Description message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Description.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.moniker != null && Object.hasOwnProperty.call(message, "moniker")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.moniker); + if (message.identity != null && Object.hasOwnProperty.call(message, "identity")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.identity); + if (message.website != null && Object.hasOwnProperty.call(message, "website")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.website); + if (message.securityContact != null && Object.hasOwnProperty.call(message, "securityContact")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.securityContact); + if (message.details != null && Object.hasOwnProperty.call(message, "details")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.details); + return writer; + }; + + /** + * Encodes the specified Description message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.Description.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.Description + * @static + * @param {cosmos.staking.v1beta1.IDescription} message Description message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Description.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Description message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.Description + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.Description} Description + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Description.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.Description(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.moniker = reader.string(); + break; + case 2: + message.identity = reader.string(); + break; + case 3: + message.website = reader.string(); + break; + case 4: + message.securityContact = reader.string(); + break; + case 5: + message.details = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Description message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.Description + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.Description} Description + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Description.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Description message. + * @function verify + * @memberof cosmos.staking.v1beta1.Description + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Description.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.moniker != null && message.hasOwnProperty("moniker")) + if (!$util.isString(message.moniker)) + return "moniker: string expected"; + if (message.identity != null && message.hasOwnProperty("identity")) + if (!$util.isString(message.identity)) + return "identity: string expected"; + if (message.website != null && message.hasOwnProperty("website")) + if (!$util.isString(message.website)) + return "website: string expected"; + if (message.securityContact != null && message.hasOwnProperty("securityContact")) + if (!$util.isString(message.securityContact)) + return "securityContact: string expected"; + if (message.details != null && message.hasOwnProperty("details")) + if (!$util.isString(message.details)) + return "details: string expected"; + return null; + }; + + /** + * Creates a Description message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.Description + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.Description} Description + */ + Description.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.Description) + return object; + var message = new $root.cosmos.staking.v1beta1.Description(); + if (object.moniker != null) + message.moniker = String(object.moniker); + if (object.identity != null) + message.identity = String(object.identity); + if (object.website != null) + message.website = String(object.website); + if (object.securityContact != null) + message.securityContact = String(object.securityContact); + if (object.details != null) + message.details = String(object.details); + return message; + }; + + /** + * Creates a plain object from a Description message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.Description + * @static + * @param {cosmos.staking.v1beta1.Description} message Description + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Description.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.moniker = ""; + object.identity = ""; + object.website = ""; + object.securityContact = ""; + object.details = ""; + } + if (message.moniker != null && message.hasOwnProperty("moniker")) + object.moniker = message.moniker; + if (message.identity != null && message.hasOwnProperty("identity")) + object.identity = message.identity; + if (message.website != null && message.hasOwnProperty("website")) + object.website = message.website; + if (message.securityContact != null && message.hasOwnProperty("securityContact")) + object.securityContact = message.securityContact; + if (message.details != null && message.hasOwnProperty("details")) + object.details = message.details; + return object; + }; + + /** + * Converts this Description to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.Description + * @instance + * @returns {Object.} JSON object + */ + Description.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Description; + })(v1beta1.Description || {}); + + v1beta1.Validator = (function(Validator) { + + /** + * Properties of a Validator. + * @memberof cosmos.staking.v1beta1 + * @interface IValidator + * @property {string|null} [operatorAddress] Validator operatorAddress + * @property {google.protobuf.IAny|null} [consensusPubkey] Validator consensusPubkey + * @property {boolean|null} [jailed] Validator jailed + * @property {cosmos.staking.v1beta1.BondStatus|null} [status] Validator status + * @property {string|null} [tokens] Validator tokens + * @property {string|null} [delegatorShares] Validator delegatorShares + * @property {cosmos.staking.v1beta1.IDescription|null} [description] Validator description + * @property {number|Long|null} [unbondingHeight] Validator unbondingHeight + * @property {google.protobuf.ITimestamp|null} [unbondingTime] Validator unbondingTime + * @property {cosmos.staking.v1beta1.ICommission|null} [commission] Validator commission + * @property {string|null} [minSelfDelegation] Validator minSelfDelegation + */ + + /** + * Constructs a new Validator. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a Validator. + * @implements IValidator + * @constructor + * @param {cosmos.staking.v1beta1.IValidator=} [properties] Properties to set + */ + function Validator(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Validator operatorAddress. + * @member {string} operatorAddress + * @memberof cosmos.staking.v1beta1.Validator + * @instance + */ + Validator.prototype.operatorAddress = ""; + + /** + * Validator consensusPubkey. + * @member {google.protobuf.IAny|null|undefined} consensusPubkey + * @memberof cosmos.staking.v1beta1.Validator + * @instance + */ + Validator.prototype.consensusPubkey = null; + + /** + * Validator jailed. + * @member {boolean} jailed + * @memberof cosmos.staking.v1beta1.Validator + * @instance + */ + Validator.prototype.jailed = false; + + /** + * Validator status. + * @member {cosmos.staking.v1beta1.BondStatus} status + * @memberof cosmos.staking.v1beta1.Validator + * @instance + */ + Validator.prototype.status = 0; + + /** + * Validator tokens. + * @member {string} tokens + * @memberof cosmos.staking.v1beta1.Validator + * @instance + */ + Validator.prototype.tokens = ""; + + /** + * Validator delegatorShares. + * @member {string} delegatorShares + * @memberof cosmos.staking.v1beta1.Validator + * @instance + */ + Validator.prototype.delegatorShares = ""; + + /** + * Validator description. + * @member {cosmos.staking.v1beta1.IDescription|null|undefined} description + * @memberof cosmos.staking.v1beta1.Validator + * @instance + */ + Validator.prototype.description = null; + + /** + * Validator unbondingHeight. + * @member {number|Long} unbondingHeight + * @memberof cosmos.staking.v1beta1.Validator + * @instance + */ + Validator.prototype.unbondingHeight = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Validator unbondingTime. + * @member {google.protobuf.ITimestamp|null|undefined} unbondingTime + * @memberof cosmos.staking.v1beta1.Validator + * @instance + */ + Validator.prototype.unbondingTime = null; + + /** + * Validator commission. + * @member {cosmos.staking.v1beta1.ICommission|null|undefined} commission + * @memberof cosmos.staking.v1beta1.Validator + * @instance + */ + Validator.prototype.commission = null; + + /** + * Validator minSelfDelegation. + * @member {string} minSelfDelegation + * @memberof cosmos.staking.v1beta1.Validator + * @instance + */ + Validator.prototype.minSelfDelegation = ""; + + /** + * Creates a new Validator instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.Validator + * @static + * @param {cosmos.staking.v1beta1.IValidator=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.Validator} Validator instance + */ + Validator.create = function create(properties) { + return new Validator(properties); + }; + + /** + * Encodes the specified Validator message. Does not implicitly {@link cosmos.staking.v1beta1.Validator.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.Validator + * @static + * @param {cosmos.staking.v1beta1.IValidator} message Validator message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Validator.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.operatorAddress != null && Object.hasOwnProperty.call(message, "operatorAddress")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.operatorAddress); + if (message.consensusPubkey != null && Object.hasOwnProperty.call(message, "consensusPubkey")) + $root.google.protobuf.Any.encode(message.consensusPubkey, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.jailed != null && Object.hasOwnProperty.call(message, "jailed")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.jailed); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.status); + if (message.tokens != null && Object.hasOwnProperty.call(message, "tokens")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.tokens); + if (message.delegatorShares != null && Object.hasOwnProperty.call(message, "delegatorShares")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.delegatorShares); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + $root.cosmos.staking.v1beta1.Description.encode(message.description, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.unbondingHeight != null && Object.hasOwnProperty.call(message, "unbondingHeight")) + writer.uint32(/* id 8, wireType 0 =*/64).int64(message.unbondingHeight); + if (message.unbondingTime != null && Object.hasOwnProperty.call(message, "unbondingTime")) + $root.google.protobuf.Timestamp.encode(message.unbondingTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.commission != null && Object.hasOwnProperty.call(message, "commission")) + $root.cosmos.staking.v1beta1.Commission.encode(message.commission, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.minSelfDelegation != null && Object.hasOwnProperty.call(message, "minSelfDelegation")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.minSelfDelegation); + return writer; + }; + + /** + * Encodes the specified Validator message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.Validator.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.Validator + * @static + * @param {cosmos.staking.v1beta1.IValidator} message Validator message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Validator.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Validator message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.Validator + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.Validator} Validator + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Validator.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.Validator(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.operatorAddress = reader.string(); + break; + case 2: + message.consensusPubkey = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + case 3: + message.jailed = reader.bool(); + break; + case 4: + message.status = reader.int32(); + break; + case 5: + message.tokens = reader.string(); + break; + case 6: + message.delegatorShares = reader.string(); + break; + case 7: + message.description = $root.cosmos.staking.v1beta1.Description.decode(reader, reader.uint32()); + break; + case 8: + message.unbondingHeight = reader.int64(); + break; + case 9: + message.unbondingTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 10: + message.commission = $root.cosmos.staking.v1beta1.Commission.decode(reader, reader.uint32()); + break; + case 11: + message.minSelfDelegation = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Validator message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.Validator + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.Validator} Validator + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Validator.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Validator message. + * @function verify + * @memberof cosmos.staking.v1beta1.Validator + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Validator.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.operatorAddress != null && message.hasOwnProperty("operatorAddress")) + if (!$util.isString(message.operatorAddress)) + return "operatorAddress: string expected"; + if (message.consensusPubkey != null && message.hasOwnProperty("consensusPubkey")) { + var error = $root.google.protobuf.Any.verify(message.consensusPubkey); + if (error) + return "consensusPubkey." + error; + } + if (message.jailed != null && message.hasOwnProperty("jailed")) + if (typeof message.jailed !== "boolean") + return "jailed: boolean expected"; + if (message.status != null && message.hasOwnProperty("status")) + switch (message.status) { + default: + return "status: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.tokens != null && message.hasOwnProperty("tokens")) + if (!$util.isString(message.tokens)) + return "tokens: string expected"; + if (message.delegatorShares != null && message.hasOwnProperty("delegatorShares")) + if (!$util.isString(message.delegatorShares)) + return "delegatorShares: string expected"; + if (message.description != null && message.hasOwnProperty("description")) { + var error = $root.cosmos.staking.v1beta1.Description.verify(message.description); + if (error) + return "description." + error; + } + if (message.unbondingHeight != null && message.hasOwnProperty("unbondingHeight")) + if (!$util.isInteger(message.unbondingHeight) && !(message.unbondingHeight && $util.isInteger(message.unbondingHeight.low) && $util.isInteger(message.unbondingHeight.high))) + return "unbondingHeight: integer|Long expected"; + if (message.unbondingTime != null && message.hasOwnProperty("unbondingTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.unbondingTime); + if (error) + return "unbondingTime." + error; + } + if (message.commission != null && message.hasOwnProperty("commission")) { + var error = $root.cosmos.staking.v1beta1.Commission.verify(message.commission); + if (error) + return "commission." + error; + } + if (message.minSelfDelegation != null && message.hasOwnProperty("minSelfDelegation")) + if (!$util.isString(message.minSelfDelegation)) + return "minSelfDelegation: string expected"; + return null; + }; + + /** + * Creates a Validator message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.Validator + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.Validator} Validator + */ + Validator.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.Validator) + return object; + var message = new $root.cosmos.staking.v1beta1.Validator(); + if (object.operatorAddress != null) + message.operatorAddress = String(object.operatorAddress); + if (object.consensusPubkey != null) { + if (typeof object.consensusPubkey !== "object") + throw TypeError(".cosmos.staking.v1beta1.Validator.consensusPubkey: object expected"); + message.consensusPubkey = $root.google.protobuf.Any.fromObject(object.consensusPubkey); + } + if (object.jailed != null) + message.jailed = Boolean(object.jailed); + switch (object.status) { + case "BOND_STATUS_UNSPECIFIED": + case 0: + message.status = 0; + break; + case "BOND_STATUS_UNBONDED": + case 1: + message.status = 1; + break; + case "BOND_STATUS_UNBONDING": + case 2: + message.status = 2; + break; + case "BOND_STATUS_BONDED": + case 3: + message.status = 3; + break; + } + if (object.tokens != null) + message.tokens = String(object.tokens); + if (object.delegatorShares != null) + message.delegatorShares = String(object.delegatorShares); + if (object.description != null) { + if (typeof object.description !== "object") + throw TypeError(".cosmos.staking.v1beta1.Validator.description: object expected"); + message.description = $root.cosmos.staking.v1beta1.Description.fromObject(object.description); + } + if (object.unbondingHeight != null) + if ($util.Long) + (message.unbondingHeight = $util.Long.fromValue(object.unbondingHeight)).unsigned = false; + else if (typeof object.unbondingHeight === "string") + message.unbondingHeight = parseInt(object.unbondingHeight, 10); + else if (typeof object.unbondingHeight === "number") + message.unbondingHeight = object.unbondingHeight; + else if (typeof object.unbondingHeight === "object") + message.unbondingHeight = new $util.LongBits(object.unbondingHeight.low >>> 0, object.unbondingHeight.high >>> 0).toNumber(); + if (object.unbondingTime != null) { + if (typeof object.unbondingTime !== "object") + throw TypeError(".cosmos.staking.v1beta1.Validator.unbondingTime: object expected"); + message.unbondingTime = $root.google.protobuf.Timestamp.fromObject(object.unbondingTime); + } + if (object.commission != null) { + if (typeof object.commission !== "object") + throw TypeError(".cosmos.staking.v1beta1.Validator.commission: object expected"); + message.commission = $root.cosmos.staking.v1beta1.Commission.fromObject(object.commission); + } + if (object.minSelfDelegation != null) + message.minSelfDelegation = String(object.minSelfDelegation); + return message; + }; + + /** + * Creates a plain object from a Validator message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.Validator + * @static + * @param {cosmos.staking.v1beta1.Validator} message Validator + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Validator.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.operatorAddress = ""; + object.consensusPubkey = null; + object.jailed = false; + object.status = options.enums === String ? "BOND_STATUS_UNSPECIFIED" : 0; + object.tokens = ""; + object.delegatorShares = ""; + object.description = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.unbondingHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.unbondingHeight = options.longs === String ? "0" : 0; + object.unbondingTime = null; + object.commission = null; + object.minSelfDelegation = ""; + } + if (message.operatorAddress != null && message.hasOwnProperty("operatorAddress")) + object.operatorAddress = message.operatorAddress; + if (message.consensusPubkey != null && message.hasOwnProperty("consensusPubkey")) + object.consensusPubkey = $root.google.protobuf.Any.toObject(message.consensusPubkey, options); + if (message.jailed != null && message.hasOwnProperty("jailed")) + object.jailed = message.jailed; + if (message.status != null && message.hasOwnProperty("status")) + object.status = options.enums === String ? $root.cosmos.staking.v1beta1.BondStatus[message.status] : message.status; + if (message.tokens != null && message.hasOwnProperty("tokens")) + object.tokens = message.tokens; + if (message.delegatorShares != null && message.hasOwnProperty("delegatorShares")) + object.delegatorShares = message.delegatorShares; + if (message.description != null && message.hasOwnProperty("description")) + object.description = $root.cosmos.staking.v1beta1.Description.toObject(message.description, options); + if (message.unbondingHeight != null && message.hasOwnProperty("unbondingHeight")) + if (typeof message.unbondingHeight === "number") + object.unbondingHeight = options.longs === String ? String(message.unbondingHeight) : message.unbondingHeight; + else + object.unbondingHeight = options.longs === String ? $util.Long.prototype.toString.call(message.unbondingHeight) : options.longs === Number ? new $util.LongBits(message.unbondingHeight.low >>> 0, message.unbondingHeight.high >>> 0).toNumber() : message.unbondingHeight; + if (message.unbondingTime != null && message.hasOwnProperty("unbondingTime")) + object.unbondingTime = $root.google.protobuf.Timestamp.toObject(message.unbondingTime, options); + if (message.commission != null && message.hasOwnProperty("commission")) + object.commission = $root.cosmos.staking.v1beta1.Commission.toObject(message.commission, options); + if (message.minSelfDelegation != null && message.hasOwnProperty("minSelfDelegation")) + object.minSelfDelegation = message.minSelfDelegation; + return object; + }; + + /** + * Converts this Validator to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.Validator + * @instance + * @returns {Object.} JSON object + */ + Validator.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Validator; + })(v1beta1.Validator || {}); + + /** + * BondStatus enum. + * @name cosmos.staking.v1beta1.BondStatus + * @enum {string} + * @property {number} BOND_STATUS_UNSPECIFIED=0 BOND_STATUS_UNSPECIFIED value + * @property {number} BOND_STATUS_UNBONDED=1 BOND_STATUS_UNBONDED value + * @property {number} BOND_STATUS_UNBONDING=2 BOND_STATUS_UNBONDING value + * @property {number} BOND_STATUS_BONDED=3 BOND_STATUS_BONDED value + */ + v1beta1.BondStatus = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "BOND_STATUS_UNSPECIFIED"] = 0; + values[valuesById[1] = "BOND_STATUS_UNBONDED"] = 1; + values[valuesById[2] = "BOND_STATUS_UNBONDING"] = 2; + values[valuesById[3] = "BOND_STATUS_BONDED"] = 3; + return values; + })(); + + v1beta1.ValAddresses = (function(ValAddresses) { + + /** + * Properties of a ValAddresses. + * @memberof cosmos.staking.v1beta1 + * @interface IValAddresses + * @property {Array.|null} [addresses] ValAddresses addresses + */ + + /** + * Constructs a new ValAddresses. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a ValAddresses. + * @implements IValAddresses + * @constructor + * @param {cosmos.staking.v1beta1.IValAddresses=} [properties] Properties to set + */ + function ValAddresses(properties) { + this.addresses = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ValAddresses addresses. + * @member {Array.} addresses + * @memberof cosmos.staking.v1beta1.ValAddresses + * @instance + */ + ValAddresses.prototype.addresses = $util.emptyArray; + + /** + * Creates a new ValAddresses instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.ValAddresses + * @static + * @param {cosmos.staking.v1beta1.IValAddresses=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.ValAddresses} ValAddresses instance + */ + ValAddresses.create = function create(properties) { + return new ValAddresses(properties); + }; + + /** + * Encodes the specified ValAddresses message. Does not implicitly {@link cosmos.staking.v1beta1.ValAddresses.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.ValAddresses + * @static + * @param {cosmos.staking.v1beta1.IValAddresses} message ValAddresses message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValAddresses.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.addresses != null && message.addresses.length) + for (var i = 0; i < message.addresses.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.addresses[i]); + return writer; + }; + + /** + * Encodes the specified ValAddresses message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.ValAddresses.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.ValAddresses + * @static + * @param {cosmos.staking.v1beta1.IValAddresses} message ValAddresses message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValAddresses.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ValAddresses message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.ValAddresses + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.ValAddresses} ValAddresses + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValAddresses.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.ValAddresses(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.addresses && message.addresses.length)) + message.addresses = []; + message.addresses.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ValAddresses message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.ValAddresses + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.ValAddresses} ValAddresses + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValAddresses.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ValAddresses message. + * @function verify + * @memberof cosmos.staking.v1beta1.ValAddresses + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ValAddresses.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.addresses != null && message.hasOwnProperty("addresses")) { + if (!Array.isArray(message.addresses)) + return "addresses: array expected"; + for (var i = 0; i < message.addresses.length; ++i) + if (!$util.isString(message.addresses[i])) + return "addresses: string[] expected"; + } + return null; + }; + + /** + * Creates a ValAddresses message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.ValAddresses + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.ValAddresses} ValAddresses + */ + ValAddresses.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.ValAddresses) + return object; + var message = new $root.cosmos.staking.v1beta1.ValAddresses(); + if (object.addresses) { + if (!Array.isArray(object.addresses)) + throw TypeError(".cosmos.staking.v1beta1.ValAddresses.addresses: array expected"); + message.addresses = []; + for (var i = 0; i < object.addresses.length; ++i) + message.addresses[i] = String(object.addresses[i]); + } + return message; + }; + + /** + * Creates a plain object from a ValAddresses message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.ValAddresses + * @static + * @param {cosmos.staking.v1beta1.ValAddresses} message ValAddresses + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ValAddresses.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.addresses = []; + if (message.addresses && message.addresses.length) { + object.addresses = []; + for (var j = 0; j < message.addresses.length; ++j) + object.addresses[j] = message.addresses[j]; + } + return object; + }; + + /** + * Converts this ValAddresses to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.ValAddresses + * @instance + * @returns {Object.} JSON object + */ + ValAddresses.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ValAddresses; + })(v1beta1.ValAddresses || {}); + + v1beta1.DVPair = (function(DVPair) { + + /** + * Properties of a DVPair. + * @memberof cosmos.staking.v1beta1 + * @interface IDVPair + * @property {string|null} [delegatorAddress] DVPair delegatorAddress + * @property {string|null} [validatorAddress] DVPair validatorAddress + */ + + /** + * Constructs a new DVPair. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a DVPair. + * @implements IDVPair + * @constructor + * @param {cosmos.staking.v1beta1.IDVPair=} [properties] Properties to set + */ + function DVPair(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DVPair delegatorAddress. + * @member {string} delegatorAddress + * @memberof cosmos.staking.v1beta1.DVPair + * @instance + */ + DVPair.prototype.delegatorAddress = ""; + + /** + * DVPair validatorAddress. + * @member {string} validatorAddress + * @memberof cosmos.staking.v1beta1.DVPair + * @instance + */ + DVPair.prototype.validatorAddress = ""; + + /** + * Creates a new DVPair instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.DVPair + * @static + * @param {cosmos.staking.v1beta1.IDVPair=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.DVPair} DVPair instance + */ + DVPair.create = function create(properties) { + return new DVPair(properties); + }; + + /** + * Encodes the specified DVPair message. Does not implicitly {@link cosmos.staking.v1beta1.DVPair.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.DVPair + * @static + * @param {cosmos.staking.v1beta1.IDVPair} message DVPair message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DVPair.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.delegatorAddress != null && Object.hasOwnProperty.call(message, "delegatorAddress")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.delegatorAddress); + if (message.validatorAddress != null && Object.hasOwnProperty.call(message, "validatorAddress")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.validatorAddress); + return writer; + }; + + /** + * Encodes the specified DVPair message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.DVPair.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.DVPair + * @static + * @param {cosmos.staking.v1beta1.IDVPair} message DVPair message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DVPair.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DVPair message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.DVPair + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.DVPair} DVPair + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DVPair.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.DVPair(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.delegatorAddress = reader.string(); + break; + case 2: + message.validatorAddress = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DVPair message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.DVPair + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.DVPair} DVPair + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DVPair.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DVPair message. + * @function verify + * @memberof cosmos.staking.v1beta1.DVPair + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DVPair.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + if (!$util.isString(message.delegatorAddress)) + return "delegatorAddress: string expected"; + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + if (!$util.isString(message.validatorAddress)) + return "validatorAddress: string expected"; + return null; + }; + + /** + * Creates a DVPair message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.DVPair + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.DVPair} DVPair + */ + DVPair.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.DVPair) + return object; + var message = new $root.cosmos.staking.v1beta1.DVPair(); + if (object.delegatorAddress != null) + message.delegatorAddress = String(object.delegatorAddress); + if (object.validatorAddress != null) + message.validatorAddress = String(object.validatorAddress); + return message; + }; + + /** + * Creates a plain object from a DVPair message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.DVPair + * @static + * @param {cosmos.staking.v1beta1.DVPair} message DVPair + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DVPair.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.delegatorAddress = ""; + object.validatorAddress = ""; + } + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + object.delegatorAddress = message.delegatorAddress; + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + object.validatorAddress = message.validatorAddress; + return object; + }; + + /** + * Converts this DVPair to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.DVPair + * @instance + * @returns {Object.} JSON object + */ + DVPair.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DVPair; + })(v1beta1.DVPair || {}); + + v1beta1.DVPairs = (function(DVPairs) { + + /** + * Properties of a DVPairs. + * @memberof cosmos.staking.v1beta1 + * @interface IDVPairs + * @property {Array.|null} [pairs] DVPairs pairs + */ + + /** + * Constructs a new DVPairs. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a DVPairs. + * @implements IDVPairs + * @constructor + * @param {cosmos.staking.v1beta1.IDVPairs=} [properties] Properties to set + */ + function DVPairs(properties) { + this.pairs = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DVPairs pairs. + * @member {Array.} pairs + * @memberof cosmos.staking.v1beta1.DVPairs + * @instance + */ + DVPairs.prototype.pairs = $util.emptyArray; + + /** + * Creates a new DVPairs instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.DVPairs + * @static + * @param {cosmos.staking.v1beta1.IDVPairs=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.DVPairs} DVPairs instance + */ + DVPairs.create = function create(properties) { + return new DVPairs(properties); + }; + + /** + * Encodes the specified DVPairs message. Does not implicitly {@link cosmos.staking.v1beta1.DVPairs.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.DVPairs + * @static + * @param {cosmos.staking.v1beta1.IDVPairs} message DVPairs message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DVPairs.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pairs != null && message.pairs.length) + for (var i = 0; i < message.pairs.length; ++i) + $root.cosmos.staking.v1beta1.DVPair.encode(message.pairs[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DVPairs message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.DVPairs.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.DVPairs + * @static + * @param {cosmos.staking.v1beta1.IDVPairs} message DVPairs message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DVPairs.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DVPairs message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.DVPairs + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.DVPairs} DVPairs + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DVPairs.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.DVPairs(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.pairs && message.pairs.length)) + message.pairs = []; + message.pairs.push($root.cosmos.staking.v1beta1.DVPair.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DVPairs message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.DVPairs + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.DVPairs} DVPairs + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DVPairs.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DVPairs message. + * @function verify + * @memberof cosmos.staking.v1beta1.DVPairs + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DVPairs.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.pairs != null && message.hasOwnProperty("pairs")) { + if (!Array.isArray(message.pairs)) + return "pairs: array expected"; + for (var i = 0; i < message.pairs.length; ++i) { + var error = $root.cosmos.staking.v1beta1.DVPair.verify(message.pairs[i]); + if (error) + return "pairs." + error; + } + } + return null; + }; + + /** + * Creates a DVPairs message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.DVPairs + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.DVPairs} DVPairs + */ + DVPairs.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.DVPairs) + return object; + var message = new $root.cosmos.staking.v1beta1.DVPairs(); + if (object.pairs) { + if (!Array.isArray(object.pairs)) + throw TypeError(".cosmos.staking.v1beta1.DVPairs.pairs: array expected"); + message.pairs = []; + for (var i = 0; i < object.pairs.length; ++i) { + if (typeof object.pairs[i] !== "object") + throw TypeError(".cosmos.staking.v1beta1.DVPairs.pairs: object expected"); + message.pairs[i] = $root.cosmos.staking.v1beta1.DVPair.fromObject(object.pairs[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a DVPairs message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.DVPairs + * @static + * @param {cosmos.staking.v1beta1.DVPairs} message DVPairs + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DVPairs.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.pairs = []; + if (message.pairs && message.pairs.length) { + object.pairs = []; + for (var j = 0; j < message.pairs.length; ++j) + object.pairs[j] = $root.cosmos.staking.v1beta1.DVPair.toObject(message.pairs[j], options); + } + return object; + }; + + /** + * Converts this DVPairs to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.DVPairs + * @instance + * @returns {Object.} JSON object + */ + DVPairs.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DVPairs; + })(v1beta1.DVPairs || {}); + + v1beta1.DVVTriplet = (function(DVVTriplet) { + + /** + * Properties of a DVVTriplet. + * @memberof cosmos.staking.v1beta1 + * @interface IDVVTriplet + * @property {string|null} [delegatorAddress] DVVTriplet delegatorAddress + * @property {string|null} [validatorSrcAddress] DVVTriplet validatorSrcAddress + * @property {string|null} [validatorDstAddress] DVVTriplet validatorDstAddress + */ + + /** + * Constructs a new DVVTriplet. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a DVVTriplet. + * @implements IDVVTriplet + * @constructor + * @param {cosmos.staking.v1beta1.IDVVTriplet=} [properties] Properties to set + */ + function DVVTriplet(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DVVTriplet delegatorAddress. + * @member {string} delegatorAddress + * @memberof cosmos.staking.v1beta1.DVVTriplet + * @instance + */ + DVVTriplet.prototype.delegatorAddress = ""; + + /** + * DVVTriplet validatorSrcAddress. + * @member {string} validatorSrcAddress + * @memberof cosmos.staking.v1beta1.DVVTriplet + * @instance + */ + DVVTriplet.prototype.validatorSrcAddress = ""; + + /** + * DVVTriplet validatorDstAddress. + * @member {string} validatorDstAddress + * @memberof cosmos.staking.v1beta1.DVVTriplet + * @instance + */ + DVVTriplet.prototype.validatorDstAddress = ""; + + /** + * Creates a new DVVTriplet instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.DVVTriplet + * @static + * @param {cosmos.staking.v1beta1.IDVVTriplet=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.DVVTriplet} DVVTriplet instance + */ + DVVTriplet.create = function create(properties) { + return new DVVTriplet(properties); + }; + + /** + * Encodes the specified DVVTriplet message. Does not implicitly {@link cosmos.staking.v1beta1.DVVTriplet.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.DVVTriplet + * @static + * @param {cosmos.staking.v1beta1.IDVVTriplet} message DVVTriplet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DVVTriplet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.delegatorAddress != null && Object.hasOwnProperty.call(message, "delegatorAddress")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.delegatorAddress); + if (message.validatorSrcAddress != null && Object.hasOwnProperty.call(message, "validatorSrcAddress")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.validatorSrcAddress); + if (message.validatorDstAddress != null && Object.hasOwnProperty.call(message, "validatorDstAddress")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.validatorDstAddress); + return writer; + }; + + /** + * Encodes the specified DVVTriplet message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.DVVTriplet.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.DVVTriplet + * @static + * @param {cosmos.staking.v1beta1.IDVVTriplet} message DVVTriplet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DVVTriplet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DVVTriplet message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.DVVTriplet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.DVVTriplet} DVVTriplet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DVVTriplet.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.DVVTriplet(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.delegatorAddress = reader.string(); + break; + case 2: + message.validatorSrcAddress = reader.string(); + break; + case 3: + message.validatorDstAddress = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DVVTriplet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.DVVTriplet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.DVVTriplet} DVVTriplet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DVVTriplet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DVVTriplet message. + * @function verify + * @memberof cosmos.staking.v1beta1.DVVTriplet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DVVTriplet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + if (!$util.isString(message.delegatorAddress)) + return "delegatorAddress: string expected"; + if (message.validatorSrcAddress != null && message.hasOwnProperty("validatorSrcAddress")) + if (!$util.isString(message.validatorSrcAddress)) + return "validatorSrcAddress: string expected"; + if (message.validatorDstAddress != null && message.hasOwnProperty("validatorDstAddress")) + if (!$util.isString(message.validatorDstAddress)) + return "validatorDstAddress: string expected"; + return null; + }; + + /** + * Creates a DVVTriplet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.DVVTriplet + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.DVVTriplet} DVVTriplet + */ + DVVTriplet.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.DVVTriplet) + return object; + var message = new $root.cosmos.staking.v1beta1.DVVTriplet(); + if (object.delegatorAddress != null) + message.delegatorAddress = String(object.delegatorAddress); + if (object.validatorSrcAddress != null) + message.validatorSrcAddress = String(object.validatorSrcAddress); + if (object.validatorDstAddress != null) + message.validatorDstAddress = String(object.validatorDstAddress); + return message; + }; + + /** + * Creates a plain object from a DVVTriplet message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.DVVTriplet + * @static + * @param {cosmos.staking.v1beta1.DVVTriplet} message DVVTriplet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DVVTriplet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.delegatorAddress = ""; + object.validatorSrcAddress = ""; + object.validatorDstAddress = ""; + } + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + object.delegatorAddress = message.delegatorAddress; + if (message.validatorSrcAddress != null && message.hasOwnProperty("validatorSrcAddress")) + object.validatorSrcAddress = message.validatorSrcAddress; + if (message.validatorDstAddress != null && message.hasOwnProperty("validatorDstAddress")) + object.validatorDstAddress = message.validatorDstAddress; + return object; + }; + + /** + * Converts this DVVTriplet to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.DVVTriplet + * @instance + * @returns {Object.} JSON object + */ + DVVTriplet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DVVTriplet; + })(v1beta1.DVVTriplet || {}); + + v1beta1.DVVTriplets = (function(DVVTriplets) { + + /** + * Properties of a DVVTriplets. + * @memberof cosmos.staking.v1beta1 + * @interface IDVVTriplets + * @property {Array.|null} [triplets] DVVTriplets triplets + */ + + /** + * Constructs a new DVVTriplets. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a DVVTriplets. + * @implements IDVVTriplets + * @constructor + * @param {cosmos.staking.v1beta1.IDVVTriplets=} [properties] Properties to set + */ + function DVVTriplets(properties) { + this.triplets = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DVVTriplets triplets. + * @member {Array.} triplets + * @memberof cosmos.staking.v1beta1.DVVTriplets + * @instance + */ + DVVTriplets.prototype.triplets = $util.emptyArray; + + /** + * Creates a new DVVTriplets instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.DVVTriplets + * @static + * @param {cosmos.staking.v1beta1.IDVVTriplets=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.DVVTriplets} DVVTriplets instance + */ + DVVTriplets.create = function create(properties) { + return new DVVTriplets(properties); + }; + + /** + * Encodes the specified DVVTriplets message. Does not implicitly {@link cosmos.staking.v1beta1.DVVTriplets.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.DVVTriplets + * @static + * @param {cosmos.staking.v1beta1.IDVVTriplets} message DVVTriplets message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DVVTriplets.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.triplets != null && message.triplets.length) + for (var i = 0; i < message.triplets.length; ++i) + $root.cosmos.staking.v1beta1.DVVTriplet.encode(message.triplets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DVVTriplets message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.DVVTriplets.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.DVVTriplets + * @static + * @param {cosmos.staking.v1beta1.IDVVTriplets} message DVVTriplets message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DVVTriplets.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DVVTriplets message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.DVVTriplets + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.DVVTriplets} DVVTriplets + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DVVTriplets.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.DVVTriplets(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.triplets && message.triplets.length)) + message.triplets = []; + message.triplets.push($root.cosmos.staking.v1beta1.DVVTriplet.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DVVTriplets message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.DVVTriplets + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.DVVTriplets} DVVTriplets + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DVVTriplets.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DVVTriplets message. + * @function verify + * @memberof cosmos.staking.v1beta1.DVVTriplets + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DVVTriplets.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.triplets != null && message.hasOwnProperty("triplets")) { + if (!Array.isArray(message.triplets)) + return "triplets: array expected"; + for (var i = 0; i < message.triplets.length; ++i) { + var error = $root.cosmos.staking.v1beta1.DVVTriplet.verify(message.triplets[i]); + if (error) + return "triplets." + error; + } + } + return null; + }; + + /** + * Creates a DVVTriplets message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.DVVTriplets + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.DVVTriplets} DVVTriplets + */ + DVVTriplets.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.DVVTriplets) + return object; + var message = new $root.cosmos.staking.v1beta1.DVVTriplets(); + if (object.triplets) { + if (!Array.isArray(object.triplets)) + throw TypeError(".cosmos.staking.v1beta1.DVVTriplets.triplets: array expected"); + message.triplets = []; + for (var i = 0; i < object.triplets.length; ++i) { + if (typeof object.triplets[i] !== "object") + throw TypeError(".cosmos.staking.v1beta1.DVVTriplets.triplets: object expected"); + message.triplets[i] = $root.cosmos.staking.v1beta1.DVVTriplet.fromObject(object.triplets[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a DVVTriplets message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.DVVTriplets + * @static + * @param {cosmos.staking.v1beta1.DVVTriplets} message DVVTriplets + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DVVTriplets.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.triplets = []; + if (message.triplets && message.triplets.length) { + object.triplets = []; + for (var j = 0; j < message.triplets.length; ++j) + object.triplets[j] = $root.cosmos.staking.v1beta1.DVVTriplet.toObject(message.triplets[j], options); + } + return object; + }; + + /** + * Converts this DVVTriplets to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.DVVTriplets + * @instance + * @returns {Object.} JSON object + */ + DVVTriplets.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DVVTriplets; + })(v1beta1.DVVTriplets || {}); + + v1beta1.Delegation = (function(Delegation) { + + /** + * Properties of a Delegation. + * @memberof cosmos.staking.v1beta1 + * @interface IDelegation + * @property {string|null} [delegatorAddress] Delegation delegatorAddress + * @property {string|null} [validatorAddress] Delegation validatorAddress + * @property {string|null} [shares] Delegation shares + */ + + /** + * Constructs a new Delegation. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a Delegation. + * @implements IDelegation + * @constructor + * @param {cosmos.staking.v1beta1.IDelegation=} [properties] Properties to set + */ + function Delegation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Delegation delegatorAddress. + * @member {string} delegatorAddress + * @memberof cosmos.staking.v1beta1.Delegation + * @instance + */ + Delegation.prototype.delegatorAddress = ""; + + /** + * Delegation validatorAddress. + * @member {string} validatorAddress + * @memberof cosmos.staking.v1beta1.Delegation + * @instance + */ + Delegation.prototype.validatorAddress = ""; + + /** + * Delegation shares. + * @member {string} shares + * @memberof cosmos.staking.v1beta1.Delegation + * @instance + */ + Delegation.prototype.shares = ""; + + /** + * Creates a new Delegation instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.Delegation + * @static + * @param {cosmos.staking.v1beta1.IDelegation=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.Delegation} Delegation instance + */ + Delegation.create = function create(properties) { + return new Delegation(properties); + }; + + /** + * Encodes the specified Delegation message. Does not implicitly {@link cosmos.staking.v1beta1.Delegation.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.Delegation + * @static + * @param {cosmos.staking.v1beta1.IDelegation} message Delegation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Delegation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.delegatorAddress != null && Object.hasOwnProperty.call(message, "delegatorAddress")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.delegatorAddress); + if (message.validatorAddress != null && Object.hasOwnProperty.call(message, "validatorAddress")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.validatorAddress); + if (message.shares != null && Object.hasOwnProperty.call(message, "shares")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.shares); + return writer; + }; + + /** + * Encodes the specified Delegation message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.Delegation.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.Delegation + * @static + * @param {cosmos.staking.v1beta1.IDelegation} message Delegation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Delegation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Delegation message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.Delegation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.Delegation} Delegation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Delegation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.Delegation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.delegatorAddress = reader.string(); + break; + case 2: + message.validatorAddress = reader.string(); + break; + case 3: + message.shares = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Delegation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.Delegation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.Delegation} Delegation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Delegation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Delegation message. + * @function verify + * @memberof cosmos.staking.v1beta1.Delegation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Delegation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + if (!$util.isString(message.delegatorAddress)) + return "delegatorAddress: string expected"; + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + if (!$util.isString(message.validatorAddress)) + return "validatorAddress: string expected"; + if (message.shares != null && message.hasOwnProperty("shares")) + if (!$util.isString(message.shares)) + return "shares: string expected"; + return null; + }; + + /** + * Creates a Delegation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.Delegation + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.Delegation} Delegation + */ + Delegation.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.Delegation) + return object; + var message = new $root.cosmos.staking.v1beta1.Delegation(); + if (object.delegatorAddress != null) + message.delegatorAddress = String(object.delegatorAddress); + if (object.validatorAddress != null) + message.validatorAddress = String(object.validatorAddress); + if (object.shares != null) + message.shares = String(object.shares); + return message; + }; + + /** + * Creates a plain object from a Delegation message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.Delegation + * @static + * @param {cosmos.staking.v1beta1.Delegation} message Delegation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Delegation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.delegatorAddress = ""; + object.validatorAddress = ""; + object.shares = ""; + } + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + object.delegatorAddress = message.delegatorAddress; + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + object.validatorAddress = message.validatorAddress; + if (message.shares != null && message.hasOwnProperty("shares")) + object.shares = message.shares; + return object; + }; + + /** + * Converts this Delegation to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.Delegation + * @instance + * @returns {Object.} JSON object + */ + Delegation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Delegation; + })(v1beta1.Delegation || {}); + + v1beta1.UnbondingDelegation = (function(UnbondingDelegation) { + + /** + * Properties of an UnbondingDelegation. + * @memberof cosmos.staking.v1beta1 + * @interface IUnbondingDelegation + * @property {string|null} [delegatorAddress] UnbondingDelegation delegatorAddress + * @property {string|null} [validatorAddress] UnbondingDelegation validatorAddress + * @property {Array.|null} [entries] UnbondingDelegation entries + */ + + /** + * Constructs a new UnbondingDelegation. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents an UnbondingDelegation. + * @implements IUnbondingDelegation + * @constructor + * @param {cosmos.staking.v1beta1.IUnbondingDelegation=} [properties] Properties to set + */ + function UnbondingDelegation(properties) { + this.entries = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UnbondingDelegation delegatorAddress. + * @member {string} delegatorAddress + * @memberof cosmos.staking.v1beta1.UnbondingDelegation + * @instance + */ + UnbondingDelegation.prototype.delegatorAddress = ""; + + /** + * UnbondingDelegation validatorAddress. + * @member {string} validatorAddress + * @memberof cosmos.staking.v1beta1.UnbondingDelegation + * @instance + */ + UnbondingDelegation.prototype.validatorAddress = ""; + + /** + * UnbondingDelegation entries. + * @member {Array.} entries + * @memberof cosmos.staking.v1beta1.UnbondingDelegation + * @instance + */ + UnbondingDelegation.prototype.entries = $util.emptyArray; + + /** + * Creates a new UnbondingDelegation instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.UnbondingDelegation + * @static + * @param {cosmos.staking.v1beta1.IUnbondingDelegation=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.UnbondingDelegation} UnbondingDelegation instance + */ + UnbondingDelegation.create = function create(properties) { + return new UnbondingDelegation(properties); + }; + + /** + * Encodes the specified UnbondingDelegation message. Does not implicitly {@link cosmos.staking.v1beta1.UnbondingDelegation.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.UnbondingDelegation + * @static + * @param {cosmos.staking.v1beta1.IUnbondingDelegation} message UnbondingDelegation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UnbondingDelegation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.delegatorAddress != null && Object.hasOwnProperty.call(message, "delegatorAddress")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.delegatorAddress); + if (message.validatorAddress != null && Object.hasOwnProperty.call(message, "validatorAddress")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.validatorAddress); + if (message.entries != null && message.entries.length) + for (var i = 0; i < message.entries.length; ++i) + $root.cosmos.staking.v1beta1.UnbondingDelegationEntry.encode(message.entries[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UnbondingDelegation message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.UnbondingDelegation.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.UnbondingDelegation + * @static + * @param {cosmos.staking.v1beta1.IUnbondingDelegation} message UnbondingDelegation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UnbondingDelegation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UnbondingDelegation message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.UnbondingDelegation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.UnbondingDelegation} UnbondingDelegation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UnbondingDelegation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.UnbondingDelegation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.delegatorAddress = reader.string(); + break; + case 2: + message.validatorAddress = reader.string(); + break; + case 3: + if (!(message.entries && message.entries.length)) + message.entries = []; + message.entries.push($root.cosmos.staking.v1beta1.UnbondingDelegationEntry.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UnbondingDelegation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.UnbondingDelegation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.UnbondingDelegation} UnbondingDelegation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UnbondingDelegation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UnbondingDelegation message. + * @function verify + * @memberof cosmos.staking.v1beta1.UnbondingDelegation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UnbondingDelegation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + if (!$util.isString(message.delegatorAddress)) + return "delegatorAddress: string expected"; + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + if (!$util.isString(message.validatorAddress)) + return "validatorAddress: string expected"; + if (message.entries != null && message.hasOwnProperty("entries")) { + if (!Array.isArray(message.entries)) + return "entries: array expected"; + for (var i = 0; i < message.entries.length; ++i) { + var error = $root.cosmos.staking.v1beta1.UnbondingDelegationEntry.verify(message.entries[i]); + if (error) + return "entries." + error; + } + } + return null; + }; + + /** + * Creates an UnbondingDelegation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.UnbondingDelegation + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.UnbondingDelegation} UnbondingDelegation + */ + UnbondingDelegation.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.UnbondingDelegation) + return object; + var message = new $root.cosmos.staking.v1beta1.UnbondingDelegation(); + if (object.delegatorAddress != null) + message.delegatorAddress = String(object.delegatorAddress); + if (object.validatorAddress != null) + message.validatorAddress = String(object.validatorAddress); + if (object.entries) { + if (!Array.isArray(object.entries)) + throw TypeError(".cosmos.staking.v1beta1.UnbondingDelegation.entries: array expected"); + message.entries = []; + for (var i = 0; i < object.entries.length; ++i) { + if (typeof object.entries[i] !== "object") + throw TypeError(".cosmos.staking.v1beta1.UnbondingDelegation.entries: object expected"); + message.entries[i] = $root.cosmos.staking.v1beta1.UnbondingDelegationEntry.fromObject(object.entries[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an UnbondingDelegation message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.UnbondingDelegation + * @static + * @param {cosmos.staking.v1beta1.UnbondingDelegation} message UnbondingDelegation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UnbondingDelegation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.entries = []; + if (options.defaults) { + object.delegatorAddress = ""; + object.validatorAddress = ""; + } + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + object.delegatorAddress = message.delegatorAddress; + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + object.validatorAddress = message.validatorAddress; + if (message.entries && message.entries.length) { + object.entries = []; + for (var j = 0; j < message.entries.length; ++j) + object.entries[j] = $root.cosmos.staking.v1beta1.UnbondingDelegationEntry.toObject(message.entries[j], options); + } + return object; + }; + + /** + * Converts this UnbondingDelegation to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.UnbondingDelegation + * @instance + * @returns {Object.} JSON object + */ + UnbondingDelegation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UnbondingDelegation; + })(v1beta1.UnbondingDelegation || {}); + + v1beta1.UnbondingDelegationEntry = (function(UnbondingDelegationEntry) { + + /** + * Properties of an UnbondingDelegationEntry. + * @memberof cosmos.staking.v1beta1 + * @interface IUnbondingDelegationEntry + * @property {number|Long|null} [creationHeight] UnbondingDelegationEntry creationHeight + * @property {google.protobuf.ITimestamp|null} [completionTime] UnbondingDelegationEntry completionTime + * @property {string|null} [initialBalance] UnbondingDelegationEntry initialBalance + * @property {string|null} [balance] UnbondingDelegationEntry balance + */ + + /** + * Constructs a new UnbondingDelegationEntry. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents an UnbondingDelegationEntry. + * @implements IUnbondingDelegationEntry + * @constructor + * @param {cosmos.staking.v1beta1.IUnbondingDelegationEntry=} [properties] Properties to set + */ + function UnbondingDelegationEntry(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UnbondingDelegationEntry creationHeight. + * @member {number|Long} creationHeight + * @memberof cosmos.staking.v1beta1.UnbondingDelegationEntry + * @instance + */ + UnbondingDelegationEntry.prototype.creationHeight = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * UnbondingDelegationEntry completionTime. + * @member {google.protobuf.ITimestamp|null|undefined} completionTime + * @memberof cosmos.staking.v1beta1.UnbondingDelegationEntry + * @instance + */ + UnbondingDelegationEntry.prototype.completionTime = null; + + /** + * UnbondingDelegationEntry initialBalance. + * @member {string} initialBalance + * @memberof cosmos.staking.v1beta1.UnbondingDelegationEntry + * @instance + */ + UnbondingDelegationEntry.prototype.initialBalance = ""; + + /** + * UnbondingDelegationEntry balance. + * @member {string} balance + * @memberof cosmos.staking.v1beta1.UnbondingDelegationEntry + * @instance + */ + UnbondingDelegationEntry.prototype.balance = ""; + + /** + * Creates a new UnbondingDelegationEntry instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.UnbondingDelegationEntry + * @static + * @param {cosmos.staking.v1beta1.IUnbondingDelegationEntry=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.UnbondingDelegationEntry} UnbondingDelegationEntry instance + */ + UnbondingDelegationEntry.create = function create(properties) { + return new UnbondingDelegationEntry(properties); + }; + + /** + * Encodes the specified UnbondingDelegationEntry message. Does not implicitly {@link cosmos.staking.v1beta1.UnbondingDelegationEntry.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.UnbondingDelegationEntry + * @static + * @param {cosmos.staking.v1beta1.IUnbondingDelegationEntry} message UnbondingDelegationEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UnbondingDelegationEntry.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.creationHeight != null && Object.hasOwnProperty.call(message, "creationHeight")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.creationHeight); + if (message.completionTime != null && Object.hasOwnProperty.call(message, "completionTime")) + $root.google.protobuf.Timestamp.encode(message.completionTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.initialBalance != null && Object.hasOwnProperty.call(message, "initialBalance")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.initialBalance); + if (message.balance != null && Object.hasOwnProperty.call(message, "balance")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.balance); + return writer; + }; + + /** + * Encodes the specified UnbondingDelegationEntry message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.UnbondingDelegationEntry.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.UnbondingDelegationEntry + * @static + * @param {cosmos.staking.v1beta1.IUnbondingDelegationEntry} message UnbondingDelegationEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UnbondingDelegationEntry.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UnbondingDelegationEntry message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.UnbondingDelegationEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.UnbondingDelegationEntry} UnbondingDelegationEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UnbondingDelegationEntry.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.UnbondingDelegationEntry(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.creationHeight = reader.int64(); + break; + case 2: + message.completionTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 3: + message.initialBalance = reader.string(); + break; + case 4: + message.balance = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UnbondingDelegationEntry message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.UnbondingDelegationEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.UnbondingDelegationEntry} UnbondingDelegationEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UnbondingDelegationEntry.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UnbondingDelegationEntry message. + * @function verify + * @memberof cosmos.staking.v1beta1.UnbondingDelegationEntry + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UnbondingDelegationEntry.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.creationHeight != null && message.hasOwnProperty("creationHeight")) + if (!$util.isInteger(message.creationHeight) && !(message.creationHeight && $util.isInteger(message.creationHeight.low) && $util.isInteger(message.creationHeight.high))) + return "creationHeight: integer|Long expected"; + if (message.completionTime != null && message.hasOwnProperty("completionTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.completionTime); + if (error) + return "completionTime." + error; + } + if (message.initialBalance != null && message.hasOwnProperty("initialBalance")) + if (!$util.isString(message.initialBalance)) + return "initialBalance: string expected"; + if (message.balance != null && message.hasOwnProperty("balance")) + if (!$util.isString(message.balance)) + return "balance: string expected"; + return null; + }; + + /** + * Creates an UnbondingDelegationEntry message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.UnbondingDelegationEntry + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.UnbondingDelegationEntry} UnbondingDelegationEntry + */ + UnbondingDelegationEntry.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.UnbondingDelegationEntry) + return object; + var message = new $root.cosmos.staking.v1beta1.UnbondingDelegationEntry(); + if (object.creationHeight != null) + if ($util.Long) + (message.creationHeight = $util.Long.fromValue(object.creationHeight)).unsigned = false; + else if (typeof object.creationHeight === "string") + message.creationHeight = parseInt(object.creationHeight, 10); + else if (typeof object.creationHeight === "number") + message.creationHeight = object.creationHeight; + else if (typeof object.creationHeight === "object") + message.creationHeight = new $util.LongBits(object.creationHeight.low >>> 0, object.creationHeight.high >>> 0).toNumber(); + if (object.completionTime != null) { + if (typeof object.completionTime !== "object") + throw TypeError(".cosmos.staking.v1beta1.UnbondingDelegationEntry.completionTime: object expected"); + message.completionTime = $root.google.protobuf.Timestamp.fromObject(object.completionTime); + } + if (object.initialBalance != null) + message.initialBalance = String(object.initialBalance); + if (object.balance != null) + message.balance = String(object.balance); + return message; + }; + + /** + * Creates a plain object from an UnbondingDelegationEntry message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.UnbondingDelegationEntry + * @static + * @param {cosmos.staking.v1beta1.UnbondingDelegationEntry} message UnbondingDelegationEntry + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UnbondingDelegationEntry.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.creationHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.creationHeight = options.longs === String ? "0" : 0; + object.completionTime = null; + object.initialBalance = ""; + object.balance = ""; + } + if (message.creationHeight != null && message.hasOwnProperty("creationHeight")) + if (typeof message.creationHeight === "number") + object.creationHeight = options.longs === String ? String(message.creationHeight) : message.creationHeight; + else + object.creationHeight = options.longs === String ? $util.Long.prototype.toString.call(message.creationHeight) : options.longs === Number ? new $util.LongBits(message.creationHeight.low >>> 0, message.creationHeight.high >>> 0).toNumber() : message.creationHeight; + if (message.completionTime != null && message.hasOwnProperty("completionTime")) + object.completionTime = $root.google.protobuf.Timestamp.toObject(message.completionTime, options); + if (message.initialBalance != null && message.hasOwnProperty("initialBalance")) + object.initialBalance = message.initialBalance; + if (message.balance != null && message.hasOwnProperty("balance")) + object.balance = message.balance; + return object; + }; + + /** + * Converts this UnbondingDelegationEntry to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.UnbondingDelegationEntry + * @instance + * @returns {Object.} JSON object + */ + UnbondingDelegationEntry.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UnbondingDelegationEntry; + })(v1beta1.UnbondingDelegationEntry || {}); + + v1beta1.RedelegationEntry = (function(RedelegationEntry) { + + /** + * Properties of a RedelegationEntry. + * @memberof cosmos.staking.v1beta1 + * @interface IRedelegationEntry + * @property {number|Long|null} [creationHeight] RedelegationEntry creationHeight + * @property {google.protobuf.ITimestamp|null} [completionTime] RedelegationEntry completionTime + * @property {string|null} [initialBalance] RedelegationEntry initialBalance + * @property {string|null} [sharesDst] RedelegationEntry sharesDst + */ + + /** + * Constructs a new RedelegationEntry. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a RedelegationEntry. + * @implements IRedelegationEntry + * @constructor + * @param {cosmos.staking.v1beta1.IRedelegationEntry=} [properties] Properties to set + */ + function RedelegationEntry(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RedelegationEntry creationHeight. + * @member {number|Long} creationHeight + * @memberof cosmos.staking.v1beta1.RedelegationEntry + * @instance + */ + RedelegationEntry.prototype.creationHeight = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * RedelegationEntry completionTime. + * @member {google.protobuf.ITimestamp|null|undefined} completionTime + * @memberof cosmos.staking.v1beta1.RedelegationEntry + * @instance + */ + RedelegationEntry.prototype.completionTime = null; + + /** + * RedelegationEntry initialBalance. + * @member {string} initialBalance + * @memberof cosmos.staking.v1beta1.RedelegationEntry + * @instance + */ + RedelegationEntry.prototype.initialBalance = ""; + + /** + * RedelegationEntry sharesDst. + * @member {string} sharesDst + * @memberof cosmos.staking.v1beta1.RedelegationEntry + * @instance + */ + RedelegationEntry.prototype.sharesDst = ""; + + /** + * Creates a new RedelegationEntry instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.RedelegationEntry + * @static + * @param {cosmos.staking.v1beta1.IRedelegationEntry=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.RedelegationEntry} RedelegationEntry instance + */ + RedelegationEntry.create = function create(properties) { + return new RedelegationEntry(properties); + }; + + /** + * Encodes the specified RedelegationEntry message. Does not implicitly {@link cosmos.staking.v1beta1.RedelegationEntry.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.RedelegationEntry + * @static + * @param {cosmos.staking.v1beta1.IRedelegationEntry} message RedelegationEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RedelegationEntry.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.creationHeight != null && Object.hasOwnProperty.call(message, "creationHeight")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.creationHeight); + if (message.completionTime != null && Object.hasOwnProperty.call(message, "completionTime")) + $root.google.protobuf.Timestamp.encode(message.completionTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.initialBalance != null && Object.hasOwnProperty.call(message, "initialBalance")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.initialBalance); + if (message.sharesDst != null && Object.hasOwnProperty.call(message, "sharesDst")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.sharesDst); + return writer; + }; + + /** + * Encodes the specified RedelegationEntry message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.RedelegationEntry.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.RedelegationEntry + * @static + * @param {cosmos.staking.v1beta1.IRedelegationEntry} message RedelegationEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RedelegationEntry.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RedelegationEntry message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.RedelegationEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.RedelegationEntry} RedelegationEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RedelegationEntry.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.RedelegationEntry(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.creationHeight = reader.int64(); + break; + case 2: + message.completionTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 3: + message.initialBalance = reader.string(); + break; + case 4: + message.sharesDst = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RedelegationEntry message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.RedelegationEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.RedelegationEntry} RedelegationEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RedelegationEntry.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RedelegationEntry message. + * @function verify + * @memberof cosmos.staking.v1beta1.RedelegationEntry + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RedelegationEntry.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.creationHeight != null && message.hasOwnProperty("creationHeight")) + if (!$util.isInteger(message.creationHeight) && !(message.creationHeight && $util.isInteger(message.creationHeight.low) && $util.isInteger(message.creationHeight.high))) + return "creationHeight: integer|Long expected"; + if (message.completionTime != null && message.hasOwnProperty("completionTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.completionTime); + if (error) + return "completionTime." + error; + } + if (message.initialBalance != null && message.hasOwnProperty("initialBalance")) + if (!$util.isString(message.initialBalance)) + return "initialBalance: string expected"; + if (message.sharesDst != null && message.hasOwnProperty("sharesDst")) + if (!$util.isString(message.sharesDst)) + return "sharesDst: string expected"; + return null; + }; + + /** + * Creates a RedelegationEntry message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.RedelegationEntry + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.RedelegationEntry} RedelegationEntry + */ + RedelegationEntry.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.RedelegationEntry) + return object; + var message = new $root.cosmos.staking.v1beta1.RedelegationEntry(); + if (object.creationHeight != null) + if ($util.Long) + (message.creationHeight = $util.Long.fromValue(object.creationHeight)).unsigned = false; + else if (typeof object.creationHeight === "string") + message.creationHeight = parseInt(object.creationHeight, 10); + else if (typeof object.creationHeight === "number") + message.creationHeight = object.creationHeight; + else if (typeof object.creationHeight === "object") + message.creationHeight = new $util.LongBits(object.creationHeight.low >>> 0, object.creationHeight.high >>> 0).toNumber(); + if (object.completionTime != null) { + if (typeof object.completionTime !== "object") + throw TypeError(".cosmos.staking.v1beta1.RedelegationEntry.completionTime: object expected"); + message.completionTime = $root.google.protobuf.Timestamp.fromObject(object.completionTime); + } + if (object.initialBalance != null) + message.initialBalance = String(object.initialBalance); + if (object.sharesDst != null) + message.sharesDst = String(object.sharesDst); + return message; + }; + + /** + * Creates a plain object from a RedelegationEntry message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.RedelegationEntry + * @static + * @param {cosmos.staking.v1beta1.RedelegationEntry} message RedelegationEntry + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RedelegationEntry.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.creationHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.creationHeight = options.longs === String ? "0" : 0; + object.completionTime = null; + object.initialBalance = ""; + object.sharesDst = ""; + } + if (message.creationHeight != null && message.hasOwnProperty("creationHeight")) + if (typeof message.creationHeight === "number") + object.creationHeight = options.longs === String ? String(message.creationHeight) : message.creationHeight; + else + object.creationHeight = options.longs === String ? $util.Long.prototype.toString.call(message.creationHeight) : options.longs === Number ? new $util.LongBits(message.creationHeight.low >>> 0, message.creationHeight.high >>> 0).toNumber() : message.creationHeight; + if (message.completionTime != null && message.hasOwnProperty("completionTime")) + object.completionTime = $root.google.protobuf.Timestamp.toObject(message.completionTime, options); + if (message.initialBalance != null && message.hasOwnProperty("initialBalance")) + object.initialBalance = message.initialBalance; + if (message.sharesDst != null && message.hasOwnProperty("sharesDst")) + object.sharesDst = message.sharesDst; + return object; + }; + + /** + * Converts this RedelegationEntry to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.RedelegationEntry + * @instance + * @returns {Object.} JSON object + */ + RedelegationEntry.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RedelegationEntry; + })(v1beta1.RedelegationEntry || {}); + + v1beta1.Redelegation = (function(Redelegation) { + + /** + * Properties of a Redelegation. + * @memberof cosmos.staking.v1beta1 + * @interface IRedelegation + * @property {string|null} [delegatorAddress] Redelegation delegatorAddress + * @property {string|null} [validatorSrcAddress] Redelegation validatorSrcAddress + * @property {string|null} [validatorDstAddress] Redelegation validatorDstAddress + * @property {Array.|null} [entries] Redelegation entries + */ + + /** + * Constructs a new Redelegation. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a Redelegation. + * @implements IRedelegation + * @constructor + * @param {cosmos.staking.v1beta1.IRedelegation=} [properties] Properties to set + */ + function Redelegation(properties) { + this.entries = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Redelegation delegatorAddress. + * @member {string} delegatorAddress + * @memberof cosmos.staking.v1beta1.Redelegation + * @instance + */ + Redelegation.prototype.delegatorAddress = ""; + + /** + * Redelegation validatorSrcAddress. + * @member {string} validatorSrcAddress + * @memberof cosmos.staking.v1beta1.Redelegation + * @instance + */ + Redelegation.prototype.validatorSrcAddress = ""; + + /** + * Redelegation validatorDstAddress. + * @member {string} validatorDstAddress + * @memberof cosmos.staking.v1beta1.Redelegation + * @instance + */ + Redelegation.prototype.validatorDstAddress = ""; + + /** + * Redelegation entries. + * @member {Array.} entries + * @memberof cosmos.staking.v1beta1.Redelegation + * @instance + */ + Redelegation.prototype.entries = $util.emptyArray; + + /** + * Creates a new Redelegation instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.Redelegation + * @static + * @param {cosmos.staking.v1beta1.IRedelegation=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.Redelegation} Redelegation instance + */ + Redelegation.create = function create(properties) { + return new Redelegation(properties); + }; + + /** + * Encodes the specified Redelegation message. Does not implicitly {@link cosmos.staking.v1beta1.Redelegation.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.Redelegation + * @static + * @param {cosmos.staking.v1beta1.IRedelegation} message Redelegation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Redelegation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.delegatorAddress != null && Object.hasOwnProperty.call(message, "delegatorAddress")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.delegatorAddress); + if (message.validatorSrcAddress != null && Object.hasOwnProperty.call(message, "validatorSrcAddress")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.validatorSrcAddress); + if (message.validatorDstAddress != null && Object.hasOwnProperty.call(message, "validatorDstAddress")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.validatorDstAddress); + if (message.entries != null && message.entries.length) + for (var i = 0; i < message.entries.length; ++i) + $root.cosmos.staking.v1beta1.RedelegationEntry.encode(message.entries[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Redelegation message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.Redelegation.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.Redelegation + * @static + * @param {cosmos.staking.v1beta1.IRedelegation} message Redelegation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Redelegation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Redelegation message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.Redelegation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.Redelegation} Redelegation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Redelegation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.Redelegation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.delegatorAddress = reader.string(); + break; + case 2: + message.validatorSrcAddress = reader.string(); + break; + case 3: + message.validatorDstAddress = reader.string(); + break; + case 4: + if (!(message.entries && message.entries.length)) + message.entries = []; + message.entries.push($root.cosmos.staking.v1beta1.RedelegationEntry.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Redelegation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.Redelegation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.Redelegation} Redelegation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Redelegation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Redelegation message. + * @function verify + * @memberof cosmos.staking.v1beta1.Redelegation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Redelegation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + if (!$util.isString(message.delegatorAddress)) + return "delegatorAddress: string expected"; + if (message.validatorSrcAddress != null && message.hasOwnProperty("validatorSrcAddress")) + if (!$util.isString(message.validatorSrcAddress)) + return "validatorSrcAddress: string expected"; + if (message.validatorDstAddress != null && message.hasOwnProperty("validatorDstAddress")) + if (!$util.isString(message.validatorDstAddress)) + return "validatorDstAddress: string expected"; + if (message.entries != null && message.hasOwnProperty("entries")) { + if (!Array.isArray(message.entries)) + return "entries: array expected"; + for (var i = 0; i < message.entries.length; ++i) { + var error = $root.cosmos.staking.v1beta1.RedelegationEntry.verify(message.entries[i]); + if (error) + return "entries." + error; + } + } + return null; + }; + + /** + * Creates a Redelegation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.Redelegation + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.Redelegation} Redelegation + */ + Redelegation.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.Redelegation) + return object; + var message = new $root.cosmos.staking.v1beta1.Redelegation(); + if (object.delegatorAddress != null) + message.delegatorAddress = String(object.delegatorAddress); + if (object.validatorSrcAddress != null) + message.validatorSrcAddress = String(object.validatorSrcAddress); + if (object.validatorDstAddress != null) + message.validatorDstAddress = String(object.validatorDstAddress); + if (object.entries) { + if (!Array.isArray(object.entries)) + throw TypeError(".cosmos.staking.v1beta1.Redelegation.entries: array expected"); + message.entries = []; + for (var i = 0; i < object.entries.length; ++i) { + if (typeof object.entries[i] !== "object") + throw TypeError(".cosmos.staking.v1beta1.Redelegation.entries: object expected"); + message.entries[i] = $root.cosmos.staking.v1beta1.RedelegationEntry.fromObject(object.entries[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Redelegation message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.Redelegation + * @static + * @param {cosmos.staking.v1beta1.Redelegation} message Redelegation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Redelegation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.entries = []; + if (options.defaults) { + object.delegatorAddress = ""; + object.validatorSrcAddress = ""; + object.validatorDstAddress = ""; + } + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + object.delegatorAddress = message.delegatorAddress; + if (message.validatorSrcAddress != null && message.hasOwnProperty("validatorSrcAddress")) + object.validatorSrcAddress = message.validatorSrcAddress; + if (message.validatorDstAddress != null && message.hasOwnProperty("validatorDstAddress")) + object.validatorDstAddress = message.validatorDstAddress; + if (message.entries && message.entries.length) { + object.entries = []; + for (var j = 0; j < message.entries.length; ++j) + object.entries[j] = $root.cosmos.staking.v1beta1.RedelegationEntry.toObject(message.entries[j], options); + } + return object; + }; + + /** + * Converts this Redelegation to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.Redelegation + * @instance + * @returns {Object.} JSON object + */ + Redelegation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Redelegation; + })(v1beta1.Redelegation || {}); + + v1beta1.Params = (function(Params) { + + /** + * Properties of a Params. + * @memberof cosmos.staking.v1beta1 + * @interface IParams + * @property {google.protobuf.IDuration|null} [unbondingTime] Params unbondingTime + * @property {number|null} [maxValidators] Params maxValidators + * @property {number|null} [maxEntries] Params maxEntries + * @property {number|null} [historicalEntries] Params historicalEntries + * @property {string|null} [bondDenom] Params bondDenom + */ + + /** + * Constructs a new Params. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a Params. + * @implements IParams + * @constructor + * @param {cosmos.staking.v1beta1.IParams=} [properties] Properties to set + */ + function Params(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Params unbondingTime. + * @member {google.protobuf.IDuration|null|undefined} unbondingTime + * @memberof cosmos.staking.v1beta1.Params + * @instance + */ + Params.prototype.unbondingTime = null; + + /** + * Params maxValidators. + * @member {number} maxValidators + * @memberof cosmos.staking.v1beta1.Params + * @instance + */ + Params.prototype.maxValidators = 0; + + /** + * Params maxEntries. + * @member {number} maxEntries + * @memberof cosmos.staking.v1beta1.Params + * @instance + */ + Params.prototype.maxEntries = 0; + + /** + * Params historicalEntries. + * @member {number} historicalEntries + * @memberof cosmos.staking.v1beta1.Params + * @instance + */ + Params.prototype.historicalEntries = 0; + + /** + * Params bondDenom. + * @member {string} bondDenom + * @memberof cosmos.staking.v1beta1.Params + * @instance + */ + Params.prototype.bondDenom = ""; + + /** + * Creates a new Params instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.Params + * @static + * @param {cosmos.staking.v1beta1.IParams=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.Params} Params instance + */ + Params.create = function create(properties) { + return new Params(properties); + }; + + /** + * Encodes the specified Params message. Does not implicitly {@link cosmos.staking.v1beta1.Params.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.Params + * @static + * @param {cosmos.staking.v1beta1.IParams} message Params message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Params.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.unbondingTime != null && Object.hasOwnProperty.call(message, "unbondingTime")) + $root.google.protobuf.Duration.encode(message.unbondingTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.maxValidators != null && Object.hasOwnProperty.call(message, "maxValidators")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.maxValidators); + if (message.maxEntries != null && Object.hasOwnProperty.call(message, "maxEntries")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.maxEntries); + if (message.historicalEntries != null && Object.hasOwnProperty.call(message, "historicalEntries")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.historicalEntries); + if (message.bondDenom != null && Object.hasOwnProperty.call(message, "bondDenom")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.bondDenom); + return writer; + }; + + /** + * Encodes the specified Params message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.Params.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.Params + * @static + * @param {cosmos.staking.v1beta1.IParams} message Params message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Params.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Params message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.Params + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.Params} Params + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Params.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.Params(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.unbondingTime = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + case 2: + message.maxValidators = reader.uint32(); + break; + case 3: + message.maxEntries = reader.uint32(); + break; + case 4: + message.historicalEntries = reader.uint32(); + break; + case 5: + message.bondDenom = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Params message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.Params + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.Params} Params + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Params.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Params message. + * @function verify + * @memberof cosmos.staking.v1beta1.Params + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Params.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.unbondingTime != null && message.hasOwnProperty("unbondingTime")) { + var error = $root.google.protobuf.Duration.verify(message.unbondingTime); + if (error) + return "unbondingTime." + error; + } + if (message.maxValidators != null && message.hasOwnProperty("maxValidators")) + if (!$util.isInteger(message.maxValidators)) + return "maxValidators: integer expected"; + if (message.maxEntries != null && message.hasOwnProperty("maxEntries")) + if (!$util.isInteger(message.maxEntries)) + return "maxEntries: integer expected"; + if (message.historicalEntries != null && message.hasOwnProperty("historicalEntries")) + if (!$util.isInteger(message.historicalEntries)) + return "historicalEntries: integer expected"; + if (message.bondDenom != null && message.hasOwnProperty("bondDenom")) + if (!$util.isString(message.bondDenom)) + return "bondDenom: string expected"; + return null; + }; + + /** + * Creates a Params message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.Params + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.Params} Params + */ + Params.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.Params) + return object; + var message = new $root.cosmos.staking.v1beta1.Params(); + if (object.unbondingTime != null) { + if (typeof object.unbondingTime !== "object") + throw TypeError(".cosmos.staking.v1beta1.Params.unbondingTime: object expected"); + message.unbondingTime = $root.google.protobuf.Duration.fromObject(object.unbondingTime); + } + if (object.maxValidators != null) + message.maxValidators = object.maxValidators >>> 0; + if (object.maxEntries != null) + message.maxEntries = object.maxEntries >>> 0; + if (object.historicalEntries != null) + message.historicalEntries = object.historicalEntries >>> 0; + if (object.bondDenom != null) + message.bondDenom = String(object.bondDenom); + return message; + }; + + /** + * Creates a plain object from a Params message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.Params + * @static + * @param {cosmos.staking.v1beta1.Params} message Params + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Params.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.unbondingTime = null; + object.maxValidators = 0; + object.maxEntries = 0; + object.historicalEntries = 0; + object.bondDenom = ""; + } + if (message.unbondingTime != null && message.hasOwnProperty("unbondingTime")) + object.unbondingTime = $root.google.protobuf.Duration.toObject(message.unbondingTime, options); + if (message.maxValidators != null && message.hasOwnProperty("maxValidators")) + object.maxValidators = message.maxValidators; + if (message.maxEntries != null && message.hasOwnProperty("maxEntries")) + object.maxEntries = message.maxEntries; + if (message.historicalEntries != null && message.hasOwnProperty("historicalEntries")) + object.historicalEntries = message.historicalEntries; + if (message.bondDenom != null && message.hasOwnProperty("bondDenom")) + object.bondDenom = message.bondDenom; + return object; + }; + + /** + * Converts this Params to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.Params + * @instance + * @returns {Object.} JSON object + */ + Params.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Params; + })(v1beta1.Params || {}); + + v1beta1.DelegationResponse = (function(DelegationResponse) { + + /** + * Properties of a DelegationResponse. + * @memberof cosmos.staking.v1beta1 + * @interface IDelegationResponse + * @property {cosmos.staking.v1beta1.IDelegation|null} [delegation] DelegationResponse delegation + * @property {cosmos.base.v1beta1.ICoin|null} [balance] DelegationResponse balance + */ + + /** + * Constructs a new DelegationResponse. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a DelegationResponse. + * @implements IDelegationResponse + * @constructor + * @param {cosmos.staking.v1beta1.IDelegationResponse=} [properties] Properties to set + */ + function DelegationResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DelegationResponse delegation. + * @member {cosmos.staking.v1beta1.IDelegation|null|undefined} delegation + * @memberof cosmos.staking.v1beta1.DelegationResponse + * @instance + */ + DelegationResponse.prototype.delegation = null; + + /** + * DelegationResponse balance. + * @member {cosmos.base.v1beta1.ICoin|null|undefined} balance + * @memberof cosmos.staking.v1beta1.DelegationResponse + * @instance + */ + DelegationResponse.prototype.balance = null; + + /** + * Creates a new DelegationResponse instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.DelegationResponse + * @static + * @param {cosmos.staking.v1beta1.IDelegationResponse=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.DelegationResponse} DelegationResponse instance + */ + DelegationResponse.create = function create(properties) { + return new DelegationResponse(properties); + }; + + /** + * Encodes the specified DelegationResponse message. Does not implicitly {@link cosmos.staking.v1beta1.DelegationResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.DelegationResponse + * @static + * @param {cosmos.staking.v1beta1.IDelegationResponse} message DelegationResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DelegationResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.delegation != null && Object.hasOwnProperty.call(message, "delegation")) + $root.cosmos.staking.v1beta1.Delegation.encode(message.delegation, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.balance != null && Object.hasOwnProperty.call(message, "balance")) + $root.cosmos.base.v1beta1.Coin.encode(message.balance, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DelegationResponse message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.DelegationResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.DelegationResponse + * @static + * @param {cosmos.staking.v1beta1.IDelegationResponse} message DelegationResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DelegationResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DelegationResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.DelegationResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.DelegationResponse} DelegationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DelegationResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.DelegationResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.delegation = $root.cosmos.staking.v1beta1.Delegation.decode(reader, reader.uint32()); + break; + case 2: + message.balance = $root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DelegationResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.DelegationResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.DelegationResponse} DelegationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DelegationResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DelegationResponse message. + * @function verify + * @memberof cosmos.staking.v1beta1.DelegationResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DelegationResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.delegation != null && message.hasOwnProperty("delegation")) { + var error = $root.cosmos.staking.v1beta1.Delegation.verify(message.delegation); + if (error) + return "delegation." + error; + } + if (message.balance != null && message.hasOwnProperty("balance")) { + var error = $root.cosmos.base.v1beta1.Coin.verify(message.balance); + if (error) + return "balance." + error; + } + return null; + }; + + /** + * Creates a DelegationResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.DelegationResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.DelegationResponse} DelegationResponse + */ + DelegationResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.DelegationResponse) + return object; + var message = new $root.cosmos.staking.v1beta1.DelegationResponse(); + if (object.delegation != null) { + if (typeof object.delegation !== "object") + throw TypeError(".cosmos.staking.v1beta1.DelegationResponse.delegation: object expected"); + message.delegation = $root.cosmos.staking.v1beta1.Delegation.fromObject(object.delegation); + } + if (object.balance != null) { + if (typeof object.balance !== "object") + throw TypeError(".cosmos.staking.v1beta1.DelegationResponse.balance: object expected"); + message.balance = $root.cosmos.base.v1beta1.Coin.fromObject(object.balance); + } + return message; + }; + + /** + * Creates a plain object from a DelegationResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.DelegationResponse + * @static + * @param {cosmos.staking.v1beta1.DelegationResponse} message DelegationResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DelegationResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.delegation = null; + object.balance = null; + } + if (message.delegation != null && message.hasOwnProperty("delegation")) + object.delegation = $root.cosmos.staking.v1beta1.Delegation.toObject(message.delegation, options); + if (message.balance != null && message.hasOwnProperty("balance")) + object.balance = $root.cosmos.base.v1beta1.Coin.toObject(message.balance, options); + return object; + }; + + /** + * Converts this DelegationResponse to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.DelegationResponse + * @instance + * @returns {Object.} JSON object + */ + DelegationResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DelegationResponse; + })(v1beta1.DelegationResponse || {}); + + v1beta1.RedelegationEntryResponse = (function(RedelegationEntryResponse) { + + /** + * Properties of a RedelegationEntryResponse. + * @memberof cosmos.staking.v1beta1 + * @interface IRedelegationEntryResponse + * @property {cosmos.staking.v1beta1.IRedelegationEntry|null} [redelegationEntry] RedelegationEntryResponse redelegationEntry + * @property {string|null} [balance] RedelegationEntryResponse balance + */ + + /** + * Constructs a new RedelegationEntryResponse. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a RedelegationEntryResponse. + * @implements IRedelegationEntryResponse + * @constructor + * @param {cosmos.staking.v1beta1.IRedelegationEntryResponse=} [properties] Properties to set + */ + function RedelegationEntryResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RedelegationEntryResponse redelegationEntry. + * @member {cosmos.staking.v1beta1.IRedelegationEntry|null|undefined} redelegationEntry + * @memberof cosmos.staking.v1beta1.RedelegationEntryResponse + * @instance + */ + RedelegationEntryResponse.prototype.redelegationEntry = null; + + /** + * RedelegationEntryResponse balance. + * @member {string} balance + * @memberof cosmos.staking.v1beta1.RedelegationEntryResponse + * @instance + */ + RedelegationEntryResponse.prototype.balance = ""; + + /** + * Creates a new RedelegationEntryResponse instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.RedelegationEntryResponse + * @static + * @param {cosmos.staking.v1beta1.IRedelegationEntryResponse=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.RedelegationEntryResponse} RedelegationEntryResponse instance + */ + RedelegationEntryResponse.create = function create(properties) { + return new RedelegationEntryResponse(properties); + }; + + /** + * Encodes the specified RedelegationEntryResponse message. Does not implicitly {@link cosmos.staking.v1beta1.RedelegationEntryResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.RedelegationEntryResponse + * @static + * @param {cosmos.staking.v1beta1.IRedelegationEntryResponse} message RedelegationEntryResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RedelegationEntryResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.redelegationEntry != null && Object.hasOwnProperty.call(message, "redelegationEntry")) + $root.cosmos.staking.v1beta1.RedelegationEntry.encode(message.redelegationEntry, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.balance != null && Object.hasOwnProperty.call(message, "balance")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.balance); + return writer; + }; + + /** + * Encodes the specified RedelegationEntryResponse message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.RedelegationEntryResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.RedelegationEntryResponse + * @static + * @param {cosmos.staking.v1beta1.IRedelegationEntryResponse} message RedelegationEntryResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RedelegationEntryResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RedelegationEntryResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.RedelegationEntryResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.RedelegationEntryResponse} RedelegationEntryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RedelegationEntryResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.RedelegationEntryResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.redelegationEntry = $root.cosmos.staking.v1beta1.RedelegationEntry.decode(reader, reader.uint32()); + break; + case 4: + message.balance = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RedelegationEntryResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.RedelegationEntryResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.RedelegationEntryResponse} RedelegationEntryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RedelegationEntryResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RedelegationEntryResponse message. + * @function verify + * @memberof cosmos.staking.v1beta1.RedelegationEntryResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RedelegationEntryResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.redelegationEntry != null && message.hasOwnProperty("redelegationEntry")) { + var error = $root.cosmos.staking.v1beta1.RedelegationEntry.verify(message.redelegationEntry); + if (error) + return "redelegationEntry." + error; + } + if (message.balance != null && message.hasOwnProperty("balance")) + if (!$util.isString(message.balance)) + return "balance: string expected"; + return null; + }; + + /** + * Creates a RedelegationEntryResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.RedelegationEntryResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.RedelegationEntryResponse} RedelegationEntryResponse + */ + RedelegationEntryResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.RedelegationEntryResponse) + return object; + var message = new $root.cosmos.staking.v1beta1.RedelegationEntryResponse(); + if (object.redelegationEntry != null) { + if (typeof object.redelegationEntry !== "object") + throw TypeError(".cosmos.staking.v1beta1.RedelegationEntryResponse.redelegationEntry: object expected"); + message.redelegationEntry = $root.cosmos.staking.v1beta1.RedelegationEntry.fromObject(object.redelegationEntry); + } + if (object.balance != null) + message.balance = String(object.balance); + return message; + }; + + /** + * Creates a plain object from a RedelegationEntryResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.RedelegationEntryResponse + * @static + * @param {cosmos.staking.v1beta1.RedelegationEntryResponse} message RedelegationEntryResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RedelegationEntryResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.redelegationEntry = null; + object.balance = ""; + } + if (message.redelegationEntry != null && message.hasOwnProperty("redelegationEntry")) + object.redelegationEntry = $root.cosmos.staking.v1beta1.RedelegationEntry.toObject(message.redelegationEntry, options); + if (message.balance != null && message.hasOwnProperty("balance")) + object.balance = message.balance; + return object; + }; + + /** + * Converts this RedelegationEntryResponse to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.RedelegationEntryResponse + * @instance + * @returns {Object.} JSON object + */ + RedelegationEntryResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RedelegationEntryResponse; + })(v1beta1.RedelegationEntryResponse || {}); + + v1beta1.RedelegationResponse = (function(RedelegationResponse) { + + /** + * Properties of a RedelegationResponse. + * @memberof cosmos.staking.v1beta1 + * @interface IRedelegationResponse + * @property {cosmos.staking.v1beta1.IRedelegation|null} [redelegation] RedelegationResponse redelegation + * @property {Array.|null} [entries] RedelegationResponse entries + */ + + /** + * Constructs a new RedelegationResponse. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a RedelegationResponse. + * @implements IRedelegationResponse + * @constructor + * @param {cosmos.staking.v1beta1.IRedelegationResponse=} [properties] Properties to set + */ + function RedelegationResponse(properties) { + this.entries = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RedelegationResponse redelegation. + * @member {cosmos.staking.v1beta1.IRedelegation|null|undefined} redelegation + * @memberof cosmos.staking.v1beta1.RedelegationResponse + * @instance + */ + RedelegationResponse.prototype.redelegation = null; + + /** + * RedelegationResponse entries. + * @member {Array.} entries + * @memberof cosmos.staking.v1beta1.RedelegationResponse + * @instance + */ + RedelegationResponse.prototype.entries = $util.emptyArray; + + /** + * Creates a new RedelegationResponse instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.RedelegationResponse + * @static + * @param {cosmos.staking.v1beta1.IRedelegationResponse=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.RedelegationResponse} RedelegationResponse instance + */ + RedelegationResponse.create = function create(properties) { + return new RedelegationResponse(properties); + }; + + /** + * Encodes the specified RedelegationResponse message. Does not implicitly {@link cosmos.staking.v1beta1.RedelegationResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.RedelegationResponse + * @static + * @param {cosmos.staking.v1beta1.IRedelegationResponse} message RedelegationResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RedelegationResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.redelegation != null && Object.hasOwnProperty.call(message, "redelegation")) + $root.cosmos.staking.v1beta1.Redelegation.encode(message.redelegation, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.entries != null && message.entries.length) + for (var i = 0; i < message.entries.length; ++i) + $root.cosmos.staking.v1beta1.RedelegationEntryResponse.encode(message.entries[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RedelegationResponse message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.RedelegationResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.RedelegationResponse + * @static + * @param {cosmos.staking.v1beta1.IRedelegationResponse} message RedelegationResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RedelegationResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RedelegationResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.RedelegationResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.RedelegationResponse} RedelegationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RedelegationResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.RedelegationResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.redelegation = $root.cosmos.staking.v1beta1.Redelegation.decode(reader, reader.uint32()); + break; + case 2: + if (!(message.entries && message.entries.length)) + message.entries = []; + message.entries.push($root.cosmos.staking.v1beta1.RedelegationEntryResponse.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RedelegationResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.RedelegationResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.RedelegationResponse} RedelegationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RedelegationResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RedelegationResponse message. + * @function verify + * @memberof cosmos.staking.v1beta1.RedelegationResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RedelegationResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.redelegation != null && message.hasOwnProperty("redelegation")) { + var error = $root.cosmos.staking.v1beta1.Redelegation.verify(message.redelegation); + if (error) + return "redelegation." + error; + } + if (message.entries != null && message.hasOwnProperty("entries")) { + if (!Array.isArray(message.entries)) + return "entries: array expected"; + for (var i = 0; i < message.entries.length; ++i) { + var error = $root.cosmos.staking.v1beta1.RedelegationEntryResponse.verify(message.entries[i]); + if (error) + return "entries." + error; + } + } + return null; + }; + + /** + * Creates a RedelegationResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.RedelegationResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.RedelegationResponse} RedelegationResponse + */ + RedelegationResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.RedelegationResponse) + return object; + var message = new $root.cosmos.staking.v1beta1.RedelegationResponse(); + if (object.redelegation != null) { + if (typeof object.redelegation !== "object") + throw TypeError(".cosmos.staking.v1beta1.RedelegationResponse.redelegation: object expected"); + message.redelegation = $root.cosmos.staking.v1beta1.Redelegation.fromObject(object.redelegation); + } + if (object.entries) { + if (!Array.isArray(object.entries)) + throw TypeError(".cosmos.staking.v1beta1.RedelegationResponse.entries: array expected"); + message.entries = []; + for (var i = 0; i < object.entries.length; ++i) { + if (typeof object.entries[i] !== "object") + throw TypeError(".cosmos.staking.v1beta1.RedelegationResponse.entries: object expected"); + message.entries[i] = $root.cosmos.staking.v1beta1.RedelegationEntryResponse.fromObject(object.entries[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a RedelegationResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.RedelegationResponse + * @static + * @param {cosmos.staking.v1beta1.RedelegationResponse} message RedelegationResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RedelegationResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.entries = []; + if (options.defaults) + object.redelegation = null; + if (message.redelegation != null && message.hasOwnProperty("redelegation")) + object.redelegation = $root.cosmos.staking.v1beta1.Redelegation.toObject(message.redelegation, options); + if (message.entries && message.entries.length) { + object.entries = []; + for (var j = 0; j < message.entries.length; ++j) + object.entries[j] = $root.cosmos.staking.v1beta1.RedelegationEntryResponse.toObject(message.entries[j], options); + } + return object; + }; + + /** + * Converts this RedelegationResponse to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.RedelegationResponse + * @instance + * @returns {Object.} JSON object + */ + RedelegationResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RedelegationResponse; + })(v1beta1.RedelegationResponse || {}); + + v1beta1.Pool = (function(Pool) { + + /** + * Properties of a Pool. + * @memberof cosmos.staking.v1beta1 + * @interface IPool + * @property {string|null} [notBondedTokens] Pool notBondedTokens + * @property {string|null} [bondedTokens] Pool bondedTokens + */ + + /** + * Constructs a new Pool. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a Pool. + * @implements IPool + * @constructor + * @param {cosmos.staking.v1beta1.IPool=} [properties] Properties to set + */ + function Pool(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Pool notBondedTokens. + * @member {string} notBondedTokens + * @memberof cosmos.staking.v1beta1.Pool + * @instance + */ + Pool.prototype.notBondedTokens = ""; + + /** + * Pool bondedTokens. + * @member {string} bondedTokens + * @memberof cosmos.staking.v1beta1.Pool + * @instance + */ + Pool.prototype.bondedTokens = ""; + + /** + * Creates a new Pool instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.Pool + * @static + * @param {cosmos.staking.v1beta1.IPool=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.Pool} Pool instance + */ + Pool.create = function create(properties) { + return new Pool(properties); + }; + + /** + * Encodes the specified Pool message. Does not implicitly {@link cosmos.staking.v1beta1.Pool.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.Pool + * @static + * @param {cosmos.staking.v1beta1.IPool} message Pool message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Pool.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.notBondedTokens != null && Object.hasOwnProperty.call(message, "notBondedTokens")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.notBondedTokens); + if (message.bondedTokens != null && Object.hasOwnProperty.call(message, "bondedTokens")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.bondedTokens); + return writer; + }; + + /** + * Encodes the specified Pool message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.Pool.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.Pool + * @static + * @param {cosmos.staking.v1beta1.IPool} message Pool message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Pool.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Pool message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.Pool + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.Pool} Pool + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Pool.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.Pool(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.notBondedTokens = reader.string(); + break; + case 2: + message.bondedTokens = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Pool message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.Pool + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.Pool} Pool + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Pool.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Pool message. + * @function verify + * @memberof cosmos.staking.v1beta1.Pool + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Pool.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.notBondedTokens != null && message.hasOwnProperty("notBondedTokens")) + if (!$util.isString(message.notBondedTokens)) + return "notBondedTokens: string expected"; + if (message.bondedTokens != null && message.hasOwnProperty("bondedTokens")) + if (!$util.isString(message.bondedTokens)) + return "bondedTokens: string expected"; + return null; + }; + + /** + * Creates a Pool message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.Pool + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.Pool} Pool + */ + Pool.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.Pool) + return object; + var message = new $root.cosmos.staking.v1beta1.Pool(); + if (object.notBondedTokens != null) + message.notBondedTokens = String(object.notBondedTokens); + if (object.bondedTokens != null) + message.bondedTokens = String(object.bondedTokens); + return message; + }; + + /** + * Creates a plain object from a Pool message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.Pool + * @static + * @param {cosmos.staking.v1beta1.Pool} message Pool + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Pool.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.notBondedTokens = ""; + object.bondedTokens = ""; + } + if (message.notBondedTokens != null && message.hasOwnProperty("notBondedTokens")) + object.notBondedTokens = message.notBondedTokens; + if (message.bondedTokens != null && message.hasOwnProperty("bondedTokens")) + object.bondedTokens = message.bondedTokens; + return object; + }; + + /** + * Converts this Pool to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.Pool + * @instance + * @returns {Object.} JSON object + */ + Pool.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Pool; + })(v1beta1.Pool || {}); + + v1beta1.Msg = (function(Msg) { + + /** + * Constructs a new Msg service. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a Msg + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Msg(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Msg.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Msg; + + /** + * Creates new Msg service using the specified rpc implementation. + * @function create + * @memberof cosmos.staking.v1beta1.Msg + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Msg} RPC service. Useful where requests and/or responses are streamed. + */ + Msg.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link cosmos.staking.v1beta1.Msg#createValidator}. + * @memberof cosmos.staking.v1beta1.Msg + * @typedef CreateValidatorCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.staking.v1beta1.IMsgCreateValidatorResponse} [response] MsgCreateValidatorResponse + */ + + /** + * Calls CreateValidator. + * @function createValidator + * @memberof cosmos.staking.v1beta1.Msg + * @instance + * @param {cosmos.staking.v1beta1.IMsgCreateValidator} request MsgCreateValidator message or plain object + * @param {cosmos.staking.v1beta1.Msg.CreateValidatorCallback} callback Node-style callback called with the error, if any, and MsgCreateValidatorResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Msg.prototype.createValidator = function createValidator(request, callback) { + return this.rpcCall(createValidator, $root.cosmos.staking.v1beta1.MsgCreateValidator, $root.cosmos.staking.v1beta1.MsgCreateValidatorResponse, request, callback); + }, "name", { value: "CreateValidator" }); + + /** + * Calls CreateValidator. + * @function createValidator + * @memberof cosmos.staking.v1beta1.Msg + * @instance + * @param {cosmos.staking.v1beta1.IMsgCreateValidator} request MsgCreateValidator message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link cosmos.staking.v1beta1.Msg#editValidator}. + * @memberof cosmos.staking.v1beta1.Msg + * @typedef EditValidatorCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.staking.v1beta1.IMsgEditValidatorResponse} [response] MsgEditValidatorResponse + */ + + /** + * Calls EditValidator. + * @function editValidator + * @memberof cosmos.staking.v1beta1.Msg + * @instance + * @param {cosmos.staking.v1beta1.IMsgEditValidator} request MsgEditValidator message or plain object + * @param {cosmos.staking.v1beta1.Msg.EditValidatorCallback} callback Node-style callback called with the error, if any, and MsgEditValidatorResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Msg.prototype.editValidator = function editValidator(request, callback) { + return this.rpcCall(editValidator, $root.cosmos.staking.v1beta1.MsgEditValidator, $root.cosmos.staking.v1beta1.MsgEditValidatorResponse, request, callback); + }, "name", { value: "EditValidator" }); + + /** + * Calls EditValidator. + * @function editValidator + * @memberof cosmos.staking.v1beta1.Msg + * @instance + * @param {cosmos.staking.v1beta1.IMsgEditValidator} request MsgEditValidator message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link cosmos.staking.v1beta1.Msg#delegate}. + * @memberof cosmos.staking.v1beta1.Msg + * @typedef DelegateCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.staking.v1beta1.IMsgDelegateResponse} [response] MsgDelegateResponse + */ + + /** + * Calls Delegate. + * @function delegate + * @memberof cosmos.staking.v1beta1.Msg + * @instance + * @param {cosmos.staking.v1beta1.IMsgDelegate} request MsgDelegate message or plain object + * @param {cosmos.staking.v1beta1.Msg.DelegateCallback} callback Node-style callback called with the error, if any, and MsgDelegateResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Msg.prototype.delegate = function delegate(request, callback) { + return this.rpcCall(delegate, $root.cosmos.staking.v1beta1.MsgDelegate, $root.cosmos.staking.v1beta1.MsgDelegateResponse, request, callback); + }, "name", { value: "Delegate" }); + + /** + * Calls Delegate. + * @function delegate + * @memberof cosmos.staking.v1beta1.Msg + * @instance + * @param {cosmos.staking.v1beta1.IMsgDelegate} request MsgDelegate message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link cosmos.staking.v1beta1.Msg#beginRedelegate}. + * @memberof cosmos.staking.v1beta1.Msg + * @typedef BeginRedelegateCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.staking.v1beta1.IMsgBeginRedelegateResponse} [response] MsgBeginRedelegateResponse + */ + + /** + * Calls BeginRedelegate. + * @function beginRedelegate + * @memberof cosmos.staking.v1beta1.Msg + * @instance + * @param {cosmos.staking.v1beta1.IMsgBeginRedelegate} request MsgBeginRedelegate message or plain object + * @param {cosmos.staking.v1beta1.Msg.BeginRedelegateCallback} callback Node-style callback called with the error, if any, and MsgBeginRedelegateResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Msg.prototype.beginRedelegate = function beginRedelegate(request, callback) { + return this.rpcCall(beginRedelegate, $root.cosmos.staking.v1beta1.MsgBeginRedelegate, $root.cosmos.staking.v1beta1.MsgBeginRedelegateResponse, request, callback); + }, "name", { value: "BeginRedelegate" }); + + /** + * Calls BeginRedelegate. + * @function beginRedelegate + * @memberof cosmos.staking.v1beta1.Msg + * @instance + * @param {cosmos.staking.v1beta1.IMsgBeginRedelegate} request MsgBeginRedelegate message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link cosmos.staking.v1beta1.Msg#undelegate}. + * @memberof cosmos.staking.v1beta1.Msg + * @typedef UndelegateCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.staking.v1beta1.IMsgUndelegateResponse} [response] MsgUndelegateResponse + */ + + /** + * Calls Undelegate. + * @function undelegate + * @memberof cosmos.staking.v1beta1.Msg + * @instance + * @param {cosmos.staking.v1beta1.IMsgUndelegate} request MsgUndelegate message or plain object + * @param {cosmos.staking.v1beta1.Msg.UndelegateCallback} callback Node-style callback called with the error, if any, and MsgUndelegateResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Msg.prototype.undelegate = function undelegate(request, callback) { + return this.rpcCall(undelegate, $root.cosmos.staking.v1beta1.MsgUndelegate, $root.cosmos.staking.v1beta1.MsgUndelegateResponse, request, callback); + }, "name", { value: "Undelegate" }); + + /** + * Calls Undelegate. + * @function undelegate + * @memberof cosmos.staking.v1beta1.Msg + * @instance + * @param {cosmos.staking.v1beta1.IMsgUndelegate} request MsgUndelegate message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Msg; + })(v1beta1.Msg || {}); + + v1beta1.MsgCreateValidator = (function(MsgCreateValidator) { + + /** + * Properties of a MsgCreateValidator. + * @memberof cosmos.staking.v1beta1 + * @interface IMsgCreateValidator + * @property {cosmos.staking.v1beta1.IDescription|null} [description] MsgCreateValidator description + * @property {cosmos.staking.v1beta1.ICommissionRates|null} [commission] MsgCreateValidator commission + * @property {string|null} [minSelfDelegation] MsgCreateValidator minSelfDelegation + * @property {string|null} [delegatorAddress] MsgCreateValidator delegatorAddress + * @property {string|null} [validatorAddress] MsgCreateValidator validatorAddress + * @property {google.protobuf.IAny|null} [pubkey] MsgCreateValidator pubkey + * @property {cosmos.base.v1beta1.ICoin|null} [value] MsgCreateValidator value + */ + + /** + * Constructs a new MsgCreateValidator. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a MsgCreateValidator. + * @implements IMsgCreateValidator + * @constructor + * @param {cosmos.staking.v1beta1.IMsgCreateValidator=} [properties] Properties to set + */ + function MsgCreateValidator(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgCreateValidator description. + * @member {cosmos.staking.v1beta1.IDescription|null|undefined} description + * @memberof cosmos.staking.v1beta1.MsgCreateValidator + * @instance + */ + MsgCreateValidator.prototype.description = null; + + /** + * MsgCreateValidator commission. + * @member {cosmos.staking.v1beta1.ICommissionRates|null|undefined} commission + * @memberof cosmos.staking.v1beta1.MsgCreateValidator + * @instance + */ + MsgCreateValidator.prototype.commission = null; + + /** + * MsgCreateValidator minSelfDelegation. + * @member {string} minSelfDelegation + * @memberof cosmos.staking.v1beta1.MsgCreateValidator + * @instance + */ + MsgCreateValidator.prototype.minSelfDelegation = ""; + + /** + * MsgCreateValidator delegatorAddress. + * @member {string} delegatorAddress + * @memberof cosmos.staking.v1beta1.MsgCreateValidator + * @instance + */ + MsgCreateValidator.prototype.delegatorAddress = ""; + + /** + * MsgCreateValidator validatorAddress. + * @member {string} validatorAddress + * @memberof cosmos.staking.v1beta1.MsgCreateValidator + * @instance + */ + MsgCreateValidator.prototype.validatorAddress = ""; + + /** + * MsgCreateValidator pubkey. + * @member {google.protobuf.IAny|null|undefined} pubkey + * @memberof cosmos.staking.v1beta1.MsgCreateValidator + * @instance + */ + MsgCreateValidator.prototype.pubkey = null; + + /** + * MsgCreateValidator value. + * @member {cosmos.base.v1beta1.ICoin|null|undefined} value + * @memberof cosmos.staking.v1beta1.MsgCreateValidator + * @instance + */ + MsgCreateValidator.prototype.value = null; + + /** + * Creates a new MsgCreateValidator instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.MsgCreateValidator + * @static + * @param {cosmos.staking.v1beta1.IMsgCreateValidator=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.MsgCreateValidator} MsgCreateValidator instance + */ + MsgCreateValidator.create = function create(properties) { + return new MsgCreateValidator(properties); + }; + + /** + * Encodes the specified MsgCreateValidator message. Does not implicitly {@link cosmos.staking.v1beta1.MsgCreateValidator.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.MsgCreateValidator + * @static + * @param {cosmos.staking.v1beta1.IMsgCreateValidator} message MsgCreateValidator message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgCreateValidator.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + $root.cosmos.staking.v1beta1.Description.encode(message.description, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.commission != null && Object.hasOwnProperty.call(message, "commission")) + $root.cosmos.staking.v1beta1.CommissionRates.encode(message.commission, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.minSelfDelegation != null && Object.hasOwnProperty.call(message, "minSelfDelegation")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.minSelfDelegation); + if (message.delegatorAddress != null && Object.hasOwnProperty.call(message, "delegatorAddress")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.delegatorAddress); + if (message.validatorAddress != null && Object.hasOwnProperty.call(message, "validatorAddress")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.validatorAddress); + if (message.pubkey != null && Object.hasOwnProperty.call(message, "pubkey")) + $root.google.protobuf.Any.encode(message.pubkey, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + $root.cosmos.base.v1beta1.Coin.encode(message.value, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MsgCreateValidator message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.MsgCreateValidator.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.MsgCreateValidator + * @static + * @param {cosmos.staking.v1beta1.IMsgCreateValidator} message MsgCreateValidator message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgCreateValidator.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgCreateValidator message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.MsgCreateValidator + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.MsgCreateValidator} MsgCreateValidator + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgCreateValidator.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.MsgCreateValidator(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.description = $root.cosmos.staking.v1beta1.Description.decode(reader, reader.uint32()); + break; + case 2: + message.commission = $root.cosmos.staking.v1beta1.CommissionRates.decode(reader, reader.uint32()); + break; + case 3: + message.minSelfDelegation = reader.string(); + break; + case 4: + message.delegatorAddress = reader.string(); + break; + case 5: + message.validatorAddress = reader.string(); + break; + case 6: + message.pubkey = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + case 7: + message.value = $root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgCreateValidator message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.MsgCreateValidator + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.MsgCreateValidator} MsgCreateValidator + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgCreateValidator.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgCreateValidator message. + * @function verify + * @memberof cosmos.staking.v1beta1.MsgCreateValidator + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgCreateValidator.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.description != null && message.hasOwnProperty("description")) { + var error = $root.cosmos.staking.v1beta1.Description.verify(message.description); + if (error) + return "description." + error; + } + if (message.commission != null && message.hasOwnProperty("commission")) { + var error = $root.cosmos.staking.v1beta1.CommissionRates.verify(message.commission); + if (error) + return "commission." + error; + } + if (message.minSelfDelegation != null && message.hasOwnProperty("minSelfDelegation")) + if (!$util.isString(message.minSelfDelegation)) + return "minSelfDelegation: string expected"; + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + if (!$util.isString(message.delegatorAddress)) + return "delegatorAddress: string expected"; + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + if (!$util.isString(message.validatorAddress)) + return "validatorAddress: string expected"; + if (message.pubkey != null && message.hasOwnProperty("pubkey")) { + var error = $root.google.protobuf.Any.verify(message.pubkey); + if (error) + return "pubkey." + error; + } + if (message.value != null && message.hasOwnProperty("value")) { + var error = $root.cosmos.base.v1beta1.Coin.verify(message.value); + if (error) + return "value." + error; + } + return null; + }; + + /** + * Creates a MsgCreateValidator message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.MsgCreateValidator + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.MsgCreateValidator} MsgCreateValidator + */ + MsgCreateValidator.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.MsgCreateValidator) + return object; + var message = new $root.cosmos.staking.v1beta1.MsgCreateValidator(); + if (object.description != null) { + if (typeof object.description !== "object") + throw TypeError(".cosmos.staking.v1beta1.MsgCreateValidator.description: object expected"); + message.description = $root.cosmos.staking.v1beta1.Description.fromObject(object.description); + } + if (object.commission != null) { + if (typeof object.commission !== "object") + throw TypeError(".cosmos.staking.v1beta1.MsgCreateValidator.commission: object expected"); + message.commission = $root.cosmos.staking.v1beta1.CommissionRates.fromObject(object.commission); + } + if (object.minSelfDelegation != null) + message.minSelfDelegation = String(object.minSelfDelegation); + if (object.delegatorAddress != null) + message.delegatorAddress = String(object.delegatorAddress); + if (object.validatorAddress != null) + message.validatorAddress = String(object.validatorAddress); + if (object.pubkey != null) { + if (typeof object.pubkey !== "object") + throw TypeError(".cosmos.staking.v1beta1.MsgCreateValidator.pubkey: object expected"); + message.pubkey = $root.google.protobuf.Any.fromObject(object.pubkey); + } + if (object.value != null) { + if (typeof object.value !== "object") + throw TypeError(".cosmos.staking.v1beta1.MsgCreateValidator.value: object expected"); + message.value = $root.cosmos.base.v1beta1.Coin.fromObject(object.value); + } + return message; + }; + + /** + * Creates a plain object from a MsgCreateValidator message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.MsgCreateValidator + * @static + * @param {cosmos.staking.v1beta1.MsgCreateValidator} message MsgCreateValidator + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgCreateValidator.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.description = null; + object.commission = null; + object.minSelfDelegation = ""; + object.delegatorAddress = ""; + object.validatorAddress = ""; + object.pubkey = null; + object.value = null; + } + if (message.description != null && message.hasOwnProperty("description")) + object.description = $root.cosmos.staking.v1beta1.Description.toObject(message.description, options); + if (message.commission != null && message.hasOwnProperty("commission")) + object.commission = $root.cosmos.staking.v1beta1.CommissionRates.toObject(message.commission, options); + if (message.minSelfDelegation != null && message.hasOwnProperty("minSelfDelegation")) + object.minSelfDelegation = message.minSelfDelegation; + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + object.delegatorAddress = message.delegatorAddress; + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + object.validatorAddress = message.validatorAddress; + if (message.pubkey != null && message.hasOwnProperty("pubkey")) + object.pubkey = $root.google.protobuf.Any.toObject(message.pubkey, options); + if (message.value != null && message.hasOwnProperty("value")) + object.value = $root.cosmos.base.v1beta1.Coin.toObject(message.value, options); + return object; + }; + + /** + * Converts this MsgCreateValidator to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.MsgCreateValidator + * @instance + * @returns {Object.} JSON object + */ + MsgCreateValidator.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgCreateValidator; + })(v1beta1.MsgCreateValidator || {}); + + v1beta1.MsgCreateValidatorResponse = (function(MsgCreateValidatorResponse) { + + /** + * Properties of a MsgCreateValidatorResponse. + * @memberof cosmos.staking.v1beta1 + * @interface IMsgCreateValidatorResponse + */ + + /** + * Constructs a new MsgCreateValidatorResponse. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a MsgCreateValidatorResponse. + * @implements IMsgCreateValidatorResponse + * @constructor + * @param {cosmos.staking.v1beta1.IMsgCreateValidatorResponse=} [properties] Properties to set + */ + function MsgCreateValidatorResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new MsgCreateValidatorResponse instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.MsgCreateValidatorResponse + * @static + * @param {cosmos.staking.v1beta1.IMsgCreateValidatorResponse=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.MsgCreateValidatorResponse} MsgCreateValidatorResponse instance + */ + MsgCreateValidatorResponse.create = function create(properties) { + return new MsgCreateValidatorResponse(properties); + }; + + /** + * Encodes the specified MsgCreateValidatorResponse message. Does not implicitly {@link cosmos.staking.v1beta1.MsgCreateValidatorResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.MsgCreateValidatorResponse + * @static + * @param {cosmos.staking.v1beta1.IMsgCreateValidatorResponse} message MsgCreateValidatorResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgCreateValidatorResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MsgCreateValidatorResponse message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.MsgCreateValidatorResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.MsgCreateValidatorResponse + * @static + * @param {cosmos.staking.v1beta1.IMsgCreateValidatorResponse} message MsgCreateValidatorResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgCreateValidatorResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgCreateValidatorResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.MsgCreateValidatorResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.MsgCreateValidatorResponse} MsgCreateValidatorResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgCreateValidatorResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.MsgCreateValidatorResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgCreateValidatorResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.MsgCreateValidatorResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.MsgCreateValidatorResponse} MsgCreateValidatorResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgCreateValidatorResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgCreateValidatorResponse message. + * @function verify + * @memberof cosmos.staking.v1beta1.MsgCreateValidatorResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgCreateValidatorResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MsgCreateValidatorResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.MsgCreateValidatorResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.MsgCreateValidatorResponse} MsgCreateValidatorResponse + */ + MsgCreateValidatorResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.MsgCreateValidatorResponse) + return object; + return new $root.cosmos.staking.v1beta1.MsgCreateValidatorResponse(); + }; + + /** + * Creates a plain object from a MsgCreateValidatorResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.MsgCreateValidatorResponse + * @static + * @param {cosmos.staking.v1beta1.MsgCreateValidatorResponse} message MsgCreateValidatorResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgCreateValidatorResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MsgCreateValidatorResponse to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.MsgCreateValidatorResponse + * @instance + * @returns {Object.} JSON object + */ + MsgCreateValidatorResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgCreateValidatorResponse; + })(v1beta1.MsgCreateValidatorResponse || {}); + + v1beta1.MsgEditValidator = (function(MsgEditValidator) { + + /** + * Properties of a MsgEditValidator. + * @memberof cosmos.staking.v1beta1 + * @interface IMsgEditValidator + * @property {cosmos.staking.v1beta1.IDescription|null} [description] MsgEditValidator description + * @property {string|null} [validatorAddress] MsgEditValidator validatorAddress + * @property {string|null} [commissionRate] MsgEditValidator commissionRate + * @property {string|null} [minSelfDelegation] MsgEditValidator minSelfDelegation + */ + + /** + * Constructs a new MsgEditValidator. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a MsgEditValidator. + * @implements IMsgEditValidator + * @constructor + * @param {cosmos.staking.v1beta1.IMsgEditValidator=} [properties] Properties to set + */ + function MsgEditValidator(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgEditValidator description. + * @member {cosmos.staking.v1beta1.IDescription|null|undefined} description + * @memberof cosmos.staking.v1beta1.MsgEditValidator + * @instance + */ + MsgEditValidator.prototype.description = null; + + /** + * MsgEditValidator validatorAddress. + * @member {string} validatorAddress + * @memberof cosmos.staking.v1beta1.MsgEditValidator + * @instance + */ + MsgEditValidator.prototype.validatorAddress = ""; + + /** + * MsgEditValidator commissionRate. + * @member {string} commissionRate + * @memberof cosmos.staking.v1beta1.MsgEditValidator + * @instance + */ + MsgEditValidator.prototype.commissionRate = ""; + + /** + * MsgEditValidator minSelfDelegation. + * @member {string} minSelfDelegation + * @memberof cosmos.staking.v1beta1.MsgEditValidator + * @instance + */ + MsgEditValidator.prototype.minSelfDelegation = ""; + + /** + * Creates a new MsgEditValidator instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.MsgEditValidator + * @static + * @param {cosmos.staking.v1beta1.IMsgEditValidator=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.MsgEditValidator} MsgEditValidator instance + */ + MsgEditValidator.create = function create(properties) { + return new MsgEditValidator(properties); + }; + + /** + * Encodes the specified MsgEditValidator message. Does not implicitly {@link cosmos.staking.v1beta1.MsgEditValidator.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.MsgEditValidator + * @static + * @param {cosmos.staking.v1beta1.IMsgEditValidator} message MsgEditValidator message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgEditValidator.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + $root.cosmos.staking.v1beta1.Description.encode(message.description, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.validatorAddress != null && Object.hasOwnProperty.call(message, "validatorAddress")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.validatorAddress); + if (message.commissionRate != null && Object.hasOwnProperty.call(message, "commissionRate")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.commissionRate); + if (message.minSelfDelegation != null && Object.hasOwnProperty.call(message, "minSelfDelegation")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.minSelfDelegation); + return writer; + }; + + /** + * Encodes the specified MsgEditValidator message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.MsgEditValidator.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.MsgEditValidator + * @static + * @param {cosmos.staking.v1beta1.IMsgEditValidator} message MsgEditValidator message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgEditValidator.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgEditValidator message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.MsgEditValidator + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.MsgEditValidator} MsgEditValidator + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgEditValidator.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.MsgEditValidator(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.description = $root.cosmos.staking.v1beta1.Description.decode(reader, reader.uint32()); + break; + case 2: + message.validatorAddress = reader.string(); + break; + case 3: + message.commissionRate = reader.string(); + break; + case 4: + message.minSelfDelegation = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgEditValidator message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.MsgEditValidator + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.MsgEditValidator} MsgEditValidator + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgEditValidator.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgEditValidator message. + * @function verify + * @memberof cosmos.staking.v1beta1.MsgEditValidator + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgEditValidator.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.description != null && message.hasOwnProperty("description")) { + var error = $root.cosmos.staking.v1beta1.Description.verify(message.description); + if (error) + return "description." + error; + } + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + if (!$util.isString(message.validatorAddress)) + return "validatorAddress: string expected"; + if (message.commissionRate != null && message.hasOwnProperty("commissionRate")) + if (!$util.isString(message.commissionRate)) + return "commissionRate: string expected"; + if (message.minSelfDelegation != null && message.hasOwnProperty("minSelfDelegation")) + if (!$util.isString(message.minSelfDelegation)) + return "minSelfDelegation: string expected"; + return null; + }; + + /** + * Creates a MsgEditValidator message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.MsgEditValidator + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.MsgEditValidator} MsgEditValidator + */ + MsgEditValidator.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.MsgEditValidator) + return object; + var message = new $root.cosmos.staking.v1beta1.MsgEditValidator(); + if (object.description != null) { + if (typeof object.description !== "object") + throw TypeError(".cosmos.staking.v1beta1.MsgEditValidator.description: object expected"); + message.description = $root.cosmos.staking.v1beta1.Description.fromObject(object.description); + } + if (object.validatorAddress != null) + message.validatorAddress = String(object.validatorAddress); + if (object.commissionRate != null) + message.commissionRate = String(object.commissionRate); + if (object.minSelfDelegation != null) + message.minSelfDelegation = String(object.minSelfDelegation); + return message; + }; + + /** + * Creates a plain object from a MsgEditValidator message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.MsgEditValidator + * @static + * @param {cosmos.staking.v1beta1.MsgEditValidator} message MsgEditValidator + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgEditValidator.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.description = null; + object.validatorAddress = ""; + object.commissionRate = ""; + object.minSelfDelegation = ""; + } + if (message.description != null && message.hasOwnProperty("description")) + object.description = $root.cosmos.staking.v1beta1.Description.toObject(message.description, options); + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + object.validatorAddress = message.validatorAddress; + if (message.commissionRate != null && message.hasOwnProperty("commissionRate")) + object.commissionRate = message.commissionRate; + if (message.minSelfDelegation != null && message.hasOwnProperty("minSelfDelegation")) + object.minSelfDelegation = message.minSelfDelegation; + return object; + }; + + /** + * Converts this MsgEditValidator to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.MsgEditValidator + * @instance + * @returns {Object.} JSON object + */ + MsgEditValidator.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgEditValidator; + })(v1beta1.MsgEditValidator || {}); + + v1beta1.MsgEditValidatorResponse = (function(MsgEditValidatorResponse) { + + /** + * Properties of a MsgEditValidatorResponse. + * @memberof cosmos.staking.v1beta1 + * @interface IMsgEditValidatorResponse + */ + + /** + * Constructs a new MsgEditValidatorResponse. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a MsgEditValidatorResponse. + * @implements IMsgEditValidatorResponse + * @constructor + * @param {cosmos.staking.v1beta1.IMsgEditValidatorResponse=} [properties] Properties to set + */ + function MsgEditValidatorResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new MsgEditValidatorResponse instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.MsgEditValidatorResponse + * @static + * @param {cosmos.staking.v1beta1.IMsgEditValidatorResponse=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.MsgEditValidatorResponse} MsgEditValidatorResponse instance + */ + MsgEditValidatorResponse.create = function create(properties) { + return new MsgEditValidatorResponse(properties); + }; + + /** + * Encodes the specified MsgEditValidatorResponse message. Does not implicitly {@link cosmos.staking.v1beta1.MsgEditValidatorResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.MsgEditValidatorResponse + * @static + * @param {cosmos.staking.v1beta1.IMsgEditValidatorResponse} message MsgEditValidatorResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgEditValidatorResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MsgEditValidatorResponse message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.MsgEditValidatorResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.MsgEditValidatorResponse + * @static + * @param {cosmos.staking.v1beta1.IMsgEditValidatorResponse} message MsgEditValidatorResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgEditValidatorResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgEditValidatorResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.MsgEditValidatorResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.MsgEditValidatorResponse} MsgEditValidatorResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgEditValidatorResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.MsgEditValidatorResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgEditValidatorResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.MsgEditValidatorResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.MsgEditValidatorResponse} MsgEditValidatorResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgEditValidatorResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgEditValidatorResponse message. + * @function verify + * @memberof cosmos.staking.v1beta1.MsgEditValidatorResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgEditValidatorResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MsgEditValidatorResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.MsgEditValidatorResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.MsgEditValidatorResponse} MsgEditValidatorResponse + */ + MsgEditValidatorResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.MsgEditValidatorResponse) + return object; + return new $root.cosmos.staking.v1beta1.MsgEditValidatorResponse(); + }; + + /** + * Creates a plain object from a MsgEditValidatorResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.MsgEditValidatorResponse + * @static + * @param {cosmos.staking.v1beta1.MsgEditValidatorResponse} message MsgEditValidatorResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgEditValidatorResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MsgEditValidatorResponse to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.MsgEditValidatorResponse + * @instance + * @returns {Object.} JSON object + */ + MsgEditValidatorResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgEditValidatorResponse; + })(v1beta1.MsgEditValidatorResponse || {}); + + v1beta1.MsgDelegate = (function(MsgDelegate) { + + /** + * Properties of a MsgDelegate. + * @memberof cosmos.staking.v1beta1 + * @interface IMsgDelegate + * @property {string|null} [delegatorAddress] MsgDelegate delegatorAddress + * @property {string|null} [validatorAddress] MsgDelegate validatorAddress + * @property {cosmos.base.v1beta1.ICoin|null} [amount] MsgDelegate amount + */ + + /** + * Constructs a new MsgDelegate. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a MsgDelegate. + * @implements IMsgDelegate + * @constructor + * @param {cosmos.staking.v1beta1.IMsgDelegate=} [properties] Properties to set + */ + function MsgDelegate(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgDelegate delegatorAddress. + * @member {string} delegatorAddress + * @memberof cosmos.staking.v1beta1.MsgDelegate + * @instance + */ + MsgDelegate.prototype.delegatorAddress = ""; + + /** + * MsgDelegate validatorAddress. + * @member {string} validatorAddress + * @memberof cosmos.staking.v1beta1.MsgDelegate + * @instance + */ + MsgDelegate.prototype.validatorAddress = ""; + + /** + * MsgDelegate amount. + * @member {cosmos.base.v1beta1.ICoin|null|undefined} amount + * @memberof cosmos.staking.v1beta1.MsgDelegate + * @instance + */ + MsgDelegate.prototype.amount = null; + + /** + * Creates a new MsgDelegate instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.MsgDelegate + * @static + * @param {cosmos.staking.v1beta1.IMsgDelegate=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.MsgDelegate} MsgDelegate instance + */ + MsgDelegate.create = function create(properties) { + return new MsgDelegate(properties); + }; + + /** + * Encodes the specified MsgDelegate message. Does not implicitly {@link cosmos.staking.v1beta1.MsgDelegate.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.MsgDelegate + * @static + * @param {cosmos.staking.v1beta1.IMsgDelegate} message MsgDelegate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgDelegate.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.delegatorAddress != null && Object.hasOwnProperty.call(message, "delegatorAddress")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.delegatorAddress); + if (message.validatorAddress != null && Object.hasOwnProperty.call(message, "validatorAddress")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.validatorAddress); + if (message.amount != null && Object.hasOwnProperty.call(message, "amount")) + $root.cosmos.base.v1beta1.Coin.encode(message.amount, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MsgDelegate message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.MsgDelegate.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.MsgDelegate + * @static + * @param {cosmos.staking.v1beta1.IMsgDelegate} message MsgDelegate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgDelegate.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgDelegate message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.MsgDelegate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.MsgDelegate} MsgDelegate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgDelegate.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.MsgDelegate(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.delegatorAddress = reader.string(); + break; + case 2: + message.validatorAddress = reader.string(); + break; + case 3: + message.amount = $root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgDelegate message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.MsgDelegate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.MsgDelegate} MsgDelegate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgDelegate.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgDelegate message. + * @function verify + * @memberof cosmos.staking.v1beta1.MsgDelegate + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgDelegate.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + if (!$util.isString(message.delegatorAddress)) + return "delegatorAddress: string expected"; + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + if (!$util.isString(message.validatorAddress)) + return "validatorAddress: string expected"; + if (message.amount != null && message.hasOwnProperty("amount")) { + var error = $root.cosmos.base.v1beta1.Coin.verify(message.amount); + if (error) + return "amount." + error; + } + return null; + }; + + /** + * Creates a MsgDelegate message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.MsgDelegate + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.MsgDelegate} MsgDelegate + */ + MsgDelegate.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.MsgDelegate) + return object; + var message = new $root.cosmos.staking.v1beta1.MsgDelegate(); + if (object.delegatorAddress != null) + message.delegatorAddress = String(object.delegatorAddress); + if (object.validatorAddress != null) + message.validatorAddress = String(object.validatorAddress); + if (object.amount != null) { + if (typeof object.amount !== "object") + throw TypeError(".cosmos.staking.v1beta1.MsgDelegate.amount: object expected"); + message.amount = $root.cosmos.base.v1beta1.Coin.fromObject(object.amount); + } + return message; + }; + + /** + * Creates a plain object from a MsgDelegate message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.MsgDelegate + * @static + * @param {cosmos.staking.v1beta1.MsgDelegate} message MsgDelegate + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgDelegate.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.delegatorAddress = ""; + object.validatorAddress = ""; + object.amount = null; + } + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + object.delegatorAddress = message.delegatorAddress; + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + object.validatorAddress = message.validatorAddress; + if (message.amount != null && message.hasOwnProperty("amount")) + object.amount = $root.cosmos.base.v1beta1.Coin.toObject(message.amount, options); + return object; + }; + + /** + * Converts this MsgDelegate to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.MsgDelegate + * @instance + * @returns {Object.} JSON object + */ + MsgDelegate.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgDelegate; + })(v1beta1.MsgDelegate || {}); + + v1beta1.MsgDelegateResponse = (function(MsgDelegateResponse) { + + /** + * Properties of a MsgDelegateResponse. + * @memberof cosmos.staking.v1beta1 + * @interface IMsgDelegateResponse + */ + + /** + * Constructs a new MsgDelegateResponse. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a MsgDelegateResponse. + * @implements IMsgDelegateResponse + * @constructor + * @param {cosmos.staking.v1beta1.IMsgDelegateResponse=} [properties] Properties to set + */ + function MsgDelegateResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new MsgDelegateResponse instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.MsgDelegateResponse + * @static + * @param {cosmos.staking.v1beta1.IMsgDelegateResponse=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.MsgDelegateResponse} MsgDelegateResponse instance + */ + MsgDelegateResponse.create = function create(properties) { + return new MsgDelegateResponse(properties); + }; + + /** + * Encodes the specified MsgDelegateResponse message. Does not implicitly {@link cosmos.staking.v1beta1.MsgDelegateResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.MsgDelegateResponse + * @static + * @param {cosmos.staking.v1beta1.IMsgDelegateResponse} message MsgDelegateResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgDelegateResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MsgDelegateResponse message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.MsgDelegateResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.MsgDelegateResponse + * @static + * @param {cosmos.staking.v1beta1.IMsgDelegateResponse} message MsgDelegateResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgDelegateResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgDelegateResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.MsgDelegateResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.MsgDelegateResponse} MsgDelegateResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgDelegateResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.MsgDelegateResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgDelegateResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.MsgDelegateResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.MsgDelegateResponse} MsgDelegateResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgDelegateResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgDelegateResponse message. + * @function verify + * @memberof cosmos.staking.v1beta1.MsgDelegateResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgDelegateResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MsgDelegateResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.MsgDelegateResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.MsgDelegateResponse} MsgDelegateResponse + */ + MsgDelegateResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.MsgDelegateResponse) + return object; + return new $root.cosmos.staking.v1beta1.MsgDelegateResponse(); + }; + + /** + * Creates a plain object from a MsgDelegateResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.MsgDelegateResponse + * @static + * @param {cosmos.staking.v1beta1.MsgDelegateResponse} message MsgDelegateResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgDelegateResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MsgDelegateResponse to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.MsgDelegateResponse + * @instance + * @returns {Object.} JSON object + */ + MsgDelegateResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgDelegateResponse; + })(v1beta1.MsgDelegateResponse || {}); + + v1beta1.MsgBeginRedelegate = (function(MsgBeginRedelegate) { + + /** + * Properties of a MsgBeginRedelegate. + * @memberof cosmos.staking.v1beta1 + * @interface IMsgBeginRedelegate + * @property {string|null} [delegatorAddress] MsgBeginRedelegate delegatorAddress + * @property {string|null} [validatorSrcAddress] MsgBeginRedelegate validatorSrcAddress + * @property {string|null} [validatorDstAddress] MsgBeginRedelegate validatorDstAddress + * @property {cosmos.base.v1beta1.ICoin|null} [amount] MsgBeginRedelegate amount + */ + + /** + * Constructs a new MsgBeginRedelegate. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a MsgBeginRedelegate. + * @implements IMsgBeginRedelegate + * @constructor + * @param {cosmos.staking.v1beta1.IMsgBeginRedelegate=} [properties] Properties to set + */ + function MsgBeginRedelegate(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgBeginRedelegate delegatorAddress. + * @member {string} delegatorAddress + * @memberof cosmos.staking.v1beta1.MsgBeginRedelegate + * @instance + */ + MsgBeginRedelegate.prototype.delegatorAddress = ""; + + /** + * MsgBeginRedelegate validatorSrcAddress. + * @member {string} validatorSrcAddress + * @memberof cosmos.staking.v1beta1.MsgBeginRedelegate + * @instance + */ + MsgBeginRedelegate.prototype.validatorSrcAddress = ""; + + /** + * MsgBeginRedelegate validatorDstAddress. + * @member {string} validatorDstAddress + * @memberof cosmos.staking.v1beta1.MsgBeginRedelegate + * @instance + */ + MsgBeginRedelegate.prototype.validatorDstAddress = ""; + + /** + * MsgBeginRedelegate amount. + * @member {cosmos.base.v1beta1.ICoin|null|undefined} amount + * @memberof cosmos.staking.v1beta1.MsgBeginRedelegate + * @instance + */ + MsgBeginRedelegate.prototype.amount = null; + + /** + * Creates a new MsgBeginRedelegate instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.MsgBeginRedelegate + * @static + * @param {cosmos.staking.v1beta1.IMsgBeginRedelegate=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.MsgBeginRedelegate} MsgBeginRedelegate instance + */ + MsgBeginRedelegate.create = function create(properties) { + return new MsgBeginRedelegate(properties); + }; + + /** + * Encodes the specified MsgBeginRedelegate message. Does not implicitly {@link cosmos.staking.v1beta1.MsgBeginRedelegate.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.MsgBeginRedelegate + * @static + * @param {cosmos.staking.v1beta1.IMsgBeginRedelegate} message MsgBeginRedelegate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgBeginRedelegate.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.delegatorAddress != null && Object.hasOwnProperty.call(message, "delegatorAddress")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.delegatorAddress); + if (message.validatorSrcAddress != null && Object.hasOwnProperty.call(message, "validatorSrcAddress")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.validatorSrcAddress); + if (message.validatorDstAddress != null && Object.hasOwnProperty.call(message, "validatorDstAddress")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.validatorDstAddress); + if (message.amount != null && Object.hasOwnProperty.call(message, "amount")) + $root.cosmos.base.v1beta1.Coin.encode(message.amount, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MsgBeginRedelegate message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.MsgBeginRedelegate.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.MsgBeginRedelegate + * @static + * @param {cosmos.staking.v1beta1.IMsgBeginRedelegate} message MsgBeginRedelegate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgBeginRedelegate.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgBeginRedelegate message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.MsgBeginRedelegate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.MsgBeginRedelegate} MsgBeginRedelegate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgBeginRedelegate.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.MsgBeginRedelegate(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.delegatorAddress = reader.string(); + break; + case 2: + message.validatorSrcAddress = reader.string(); + break; + case 3: + message.validatorDstAddress = reader.string(); + break; + case 4: + message.amount = $root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgBeginRedelegate message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.MsgBeginRedelegate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.MsgBeginRedelegate} MsgBeginRedelegate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgBeginRedelegate.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgBeginRedelegate message. + * @function verify + * @memberof cosmos.staking.v1beta1.MsgBeginRedelegate + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgBeginRedelegate.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + if (!$util.isString(message.delegatorAddress)) + return "delegatorAddress: string expected"; + if (message.validatorSrcAddress != null && message.hasOwnProperty("validatorSrcAddress")) + if (!$util.isString(message.validatorSrcAddress)) + return "validatorSrcAddress: string expected"; + if (message.validatorDstAddress != null && message.hasOwnProperty("validatorDstAddress")) + if (!$util.isString(message.validatorDstAddress)) + return "validatorDstAddress: string expected"; + if (message.amount != null && message.hasOwnProperty("amount")) { + var error = $root.cosmos.base.v1beta1.Coin.verify(message.amount); + if (error) + return "amount." + error; + } + return null; + }; + + /** + * Creates a MsgBeginRedelegate message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.MsgBeginRedelegate + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.MsgBeginRedelegate} MsgBeginRedelegate + */ + MsgBeginRedelegate.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.MsgBeginRedelegate) + return object; + var message = new $root.cosmos.staking.v1beta1.MsgBeginRedelegate(); + if (object.delegatorAddress != null) + message.delegatorAddress = String(object.delegatorAddress); + if (object.validatorSrcAddress != null) + message.validatorSrcAddress = String(object.validatorSrcAddress); + if (object.validatorDstAddress != null) + message.validatorDstAddress = String(object.validatorDstAddress); + if (object.amount != null) { + if (typeof object.amount !== "object") + throw TypeError(".cosmos.staking.v1beta1.MsgBeginRedelegate.amount: object expected"); + message.amount = $root.cosmos.base.v1beta1.Coin.fromObject(object.amount); + } + return message; + }; + + /** + * Creates a plain object from a MsgBeginRedelegate message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.MsgBeginRedelegate + * @static + * @param {cosmos.staking.v1beta1.MsgBeginRedelegate} message MsgBeginRedelegate + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgBeginRedelegate.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.delegatorAddress = ""; + object.validatorSrcAddress = ""; + object.validatorDstAddress = ""; + object.amount = null; + } + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + object.delegatorAddress = message.delegatorAddress; + if (message.validatorSrcAddress != null && message.hasOwnProperty("validatorSrcAddress")) + object.validatorSrcAddress = message.validatorSrcAddress; + if (message.validatorDstAddress != null && message.hasOwnProperty("validatorDstAddress")) + object.validatorDstAddress = message.validatorDstAddress; + if (message.amount != null && message.hasOwnProperty("amount")) + object.amount = $root.cosmos.base.v1beta1.Coin.toObject(message.amount, options); + return object; + }; + + /** + * Converts this MsgBeginRedelegate to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.MsgBeginRedelegate + * @instance + * @returns {Object.} JSON object + */ + MsgBeginRedelegate.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgBeginRedelegate; + })(v1beta1.MsgBeginRedelegate || {}); + + v1beta1.MsgBeginRedelegateResponse = (function(MsgBeginRedelegateResponse) { + + /** + * Properties of a MsgBeginRedelegateResponse. + * @memberof cosmos.staking.v1beta1 + * @interface IMsgBeginRedelegateResponse + * @property {google.protobuf.ITimestamp|null} [completionTime] MsgBeginRedelegateResponse completionTime + */ + + /** + * Constructs a new MsgBeginRedelegateResponse. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a MsgBeginRedelegateResponse. + * @implements IMsgBeginRedelegateResponse + * @constructor + * @param {cosmos.staking.v1beta1.IMsgBeginRedelegateResponse=} [properties] Properties to set + */ + function MsgBeginRedelegateResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgBeginRedelegateResponse completionTime. + * @member {google.protobuf.ITimestamp|null|undefined} completionTime + * @memberof cosmos.staking.v1beta1.MsgBeginRedelegateResponse + * @instance + */ + MsgBeginRedelegateResponse.prototype.completionTime = null; + + /** + * Creates a new MsgBeginRedelegateResponse instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.MsgBeginRedelegateResponse + * @static + * @param {cosmos.staking.v1beta1.IMsgBeginRedelegateResponse=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.MsgBeginRedelegateResponse} MsgBeginRedelegateResponse instance + */ + MsgBeginRedelegateResponse.create = function create(properties) { + return new MsgBeginRedelegateResponse(properties); + }; + + /** + * Encodes the specified MsgBeginRedelegateResponse message. Does not implicitly {@link cosmos.staking.v1beta1.MsgBeginRedelegateResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.MsgBeginRedelegateResponse + * @static + * @param {cosmos.staking.v1beta1.IMsgBeginRedelegateResponse} message MsgBeginRedelegateResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgBeginRedelegateResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.completionTime != null && Object.hasOwnProperty.call(message, "completionTime")) + $root.google.protobuf.Timestamp.encode(message.completionTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MsgBeginRedelegateResponse message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.MsgBeginRedelegateResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.MsgBeginRedelegateResponse + * @static + * @param {cosmos.staking.v1beta1.IMsgBeginRedelegateResponse} message MsgBeginRedelegateResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgBeginRedelegateResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgBeginRedelegateResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.MsgBeginRedelegateResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.MsgBeginRedelegateResponse} MsgBeginRedelegateResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgBeginRedelegateResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.MsgBeginRedelegateResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.completionTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgBeginRedelegateResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.MsgBeginRedelegateResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.MsgBeginRedelegateResponse} MsgBeginRedelegateResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgBeginRedelegateResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgBeginRedelegateResponse message. + * @function verify + * @memberof cosmos.staking.v1beta1.MsgBeginRedelegateResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgBeginRedelegateResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.completionTime != null && message.hasOwnProperty("completionTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.completionTime); + if (error) + return "completionTime." + error; + } + return null; + }; + + /** + * Creates a MsgBeginRedelegateResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.MsgBeginRedelegateResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.MsgBeginRedelegateResponse} MsgBeginRedelegateResponse + */ + MsgBeginRedelegateResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.MsgBeginRedelegateResponse) + return object; + var message = new $root.cosmos.staking.v1beta1.MsgBeginRedelegateResponse(); + if (object.completionTime != null) { + if (typeof object.completionTime !== "object") + throw TypeError(".cosmos.staking.v1beta1.MsgBeginRedelegateResponse.completionTime: object expected"); + message.completionTime = $root.google.protobuf.Timestamp.fromObject(object.completionTime); + } + return message; + }; + + /** + * Creates a plain object from a MsgBeginRedelegateResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.MsgBeginRedelegateResponse + * @static + * @param {cosmos.staking.v1beta1.MsgBeginRedelegateResponse} message MsgBeginRedelegateResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgBeginRedelegateResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.completionTime = null; + if (message.completionTime != null && message.hasOwnProperty("completionTime")) + object.completionTime = $root.google.protobuf.Timestamp.toObject(message.completionTime, options); + return object; + }; + + /** + * Converts this MsgBeginRedelegateResponse to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.MsgBeginRedelegateResponse + * @instance + * @returns {Object.} JSON object + */ + MsgBeginRedelegateResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgBeginRedelegateResponse; + })(v1beta1.MsgBeginRedelegateResponse || {}); + + v1beta1.MsgUndelegate = (function(MsgUndelegate) { + + /** + * Properties of a MsgUndelegate. + * @memberof cosmos.staking.v1beta1 + * @interface IMsgUndelegate + * @property {string|null} [delegatorAddress] MsgUndelegate delegatorAddress + * @property {string|null} [validatorAddress] MsgUndelegate validatorAddress + * @property {cosmos.base.v1beta1.ICoin|null} [amount] MsgUndelegate amount + */ + + /** + * Constructs a new MsgUndelegate. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a MsgUndelegate. + * @implements IMsgUndelegate + * @constructor + * @param {cosmos.staking.v1beta1.IMsgUndelegate=} [properties] Properties to set + */ + function MsgUndelegate(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgUndelegate delegatorAddress. + * @member {string} delegatorAddress + * @memberof cosmos.staking.v1beta1.MsgUndelegate + * @instance + */ + MsgUndelegate.prototype.delegatorAddress = ""; + + /** + * MsgUndelegate validatorAddress. + * @member {string} validatorAddress + * @memberof cosmos.staking.v1beta1.MsgUndelegate + * @instance + */ + MsgUndelegate.prototype.validatorAddress = ""; + + /** + * MsgUndelegate amount. + * @member {cosmos.base.v1beta1.ICoin|null|undefined} amount + * @memberof cosmos.staking.v1beta1.MsgUndelegate + * @instance + */ + MsgUndelegate.prototype.amount = null; + + /** + * Creates a new MsgUndelegate instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.MsgUndelegate + * @static + * @param {cosmos.staking.v1beta1.IMsgUndelegate=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.MsgUndelegate} MsgUndelegate instance + */ + MsgUndelegate.create = function create(properties) { + return new MsgUndelegate(properties); + }; + + /** + * Encodes the specified MsgUndelegate message. Does not implicitly {@link cosmos.staking.v1beta1.MsgUndelegate.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.MsgUndelegate + * @static + * @param {cosmos.staking.v1beta1.IMsgUndelegate} message MsgUndelegate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgUndelegate.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.delegatorAddress != null && Object.hasOwnProperty.call(message, "delegatorAddress")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.delegatorAddress); + if (message.validatorAddress != null && Object.hasOwnProperty.call(message, "validatorAddress")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.validatorAddress); + if (message.amount != null && Object.hasOwnProperty.call(message, "amount")) + $root.cosmos.base.v1beta1.Coin.encode(message.amount, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MsgUndelegate message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.MsgUndelegate.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.MsgUndelegate + * @static + * @param {cosmos.staking.v1beta1.IMsgUndelegate} message MsgUndelegate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgUndelegate.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgUndelegate message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.MsgUndelegate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.MsgUndelegate} MsgUndelegate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgUndelegate.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.MsgUndelegate(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.delegatorAddress = reader.string(); + break; + case 2: + message.validatorAddress = reader.string(); + break; + case 3: + message.amount = $root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgUndelegate message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.MsgUndelegate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.MsgUndelegate} MsgUndelegate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgUndelegate.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgUndelegate message. + * @function verify + * @memberof cosmos.staking.v1beta1.MsgUndelegate + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgUndelegate.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + if (!$util.isString(message.delegatorAddress)) + return "delegatorAddress: string expected"; + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + if (!$util.isString(message.validatorAddress)) + return "validatorAddress: string expected"; + if (message.amount != null && message.hasOwnProperty("amount")) { + var error = $root.cosmos.base.v1beta1.Coin.verify(message.amount); + if (error) + return "amount." + error; + } + return null; + }; + + /** + * Creates a MsgUndelegate message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.MsgUndelegate + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.MsgUndelegate} MsgUndelegate + */ + MsgUndelegate.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.MsgUndelegate) + return object; + var message = new $root.cosmos.staking.v1beta1.MsgUndelegate(); + if (object.delegatorAddress != null) + message.delegatorAddress = String(object.delegatorAddress); + if (object.validatorAddress != null) + message.validatorAddress = String(object.validatorAddress); + if (object.amount != null) { + if (typeof object.amount !== "object") + throw TypeError(".cosmos.staking.v1beta1.MsgUndelegate.amount: object expected"); + message.amount = $root.cosmos.base.v1beta1.Coin.fromObject(object.amount); + } + return message; + }; + + /** + * Creates a plain object from a MsgUndelegate message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.MsgUndelegate + * @static + * @param {cosmos.staking.v1beta1.MsgUndelegate} message MsgUndelegate + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgUndelegate.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.delegatorAddress = ""; + object.validatorAddress = ""; + object.amount = null; + } + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + object.delegatorAddress = message.delegatorAddress; + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + object.validatorAddress = message.validatorAddress; + if (message.amount != null && message.hasOwnProperty("amount")) + object.amount = $root.cosmos.base.v1beta1.Coin.toObject(message.amount, options); + return object; + }; + + /** + * Converts this MsgUndelegate to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.MsgUndelegate + * @instance + * @returns {Object.} JSON object + */ + MsgUndelegate.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgUndelegate; + })(v1beta1.MsgUndelegate || {}); + + v1beta1.MsgUndelegateResponse = (function(MsgUndelegateResponse) { + + /** + * Properties of a MsgUndelegateResponse. + * @memberof cosmos.staking.v1beta1 + * @interface IMsgUndelegateResponse + * @property {google.protobuf.ITimestamp|null} [completionTime] MsgUndelegateResponse completionTime + */ + + /** + * Constructs a new MsgUndelegateResponse. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a MsgUndelegateResponse. + * @implements IMsgUndelegateResponse + * @constructor + * @param {cosmos.staking.v1beta1.IMsgUndelegateResponse=} [properties] Properties to set + */ + function MsgUndelegateResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgUndelegateResponse completionTime. + * @member {google.protobuf.ITimestamp|null|undefined} completionTime + * @memberof cosmos.staking.v1beta1.MsgUndelegateResponse + * @instance + */ + MsgUndelegateResponse.prototype.completionTime = null; + + /** + * Creates a new MsgUndelegateResponse instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.MsgUndelegateResponse + * @static + * @param {cosmos.staking.v1beta1.IMsgUndelegateResponse=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.MsgUndelegateResponse} MsgUndelegateResponse instance + */ + MsgUndelegateResponse.create = function create(properties) { + return new MsgUndelegateResponse(properties); + }; + + /** + * Encodes the specified MsgUndelegateResponse message. Does not implicitly {@link cosmos.staking.v1beta1.MsgUndelegateResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.MsgUndelegateResponse + * @static + * @param {cosmos.staking.v1beta1.IMsgUndelegateResponse} message MsgUndelegateResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgUndelegateResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.completionTime != null && Object.hasOwnProperty.call(message, "completionTime")) + $root.google.protobuf.Timestamp.encode(message.completionTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MsgUndelegateResponse message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.MsgUndelegateResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.MsgUndelegateResponse + * @static + * @param {cosmos.staking.v1beta1.IMsgUndelegateResponse} message MsgUndelegateResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgUndelegateResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgUndelegateResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.MsgUndelegateResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.MsgUndelegateResponse} MsgUndelegateResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgUndelegateResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.MsgUndelegateResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.completionTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgUndelegateResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.MsgUndelegateResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.MsgUndelegateResponse} MsgUndelegateResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgUndelegateResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgUndelegateResponse message. + * @function verify + * @memberof cosmos.staking.v1beta1.MsgUndelegateResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgUndelegateResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.completionTime != null && message.hasOwnProperty("completionTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.completionTime); + if (error) + return "completionTime." + error; + } + return null; + }; + + /** + * Creates a MsgUndelegateResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.MsgUndelegateResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.MsgUndelegateResponse} MsgUndelegateResponse + */ + MsgUndelegateResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.MsgUndelegateResponse) + return object; + var message = new $root.cosmos.staking.v1beta1.MsgUndelegateResponse(); + if (object.completionTime != null) { + if (typeof object.completionTime !== "object") + throw TypeError(".cosmos.staking.v1beta1.MsgUndelegateResponse.completionTime: object expected"); + message.completionTime = $root.google.protobuf.Timestamp.fromObject(object.completionTime); + } + return message; + }; + + /** + * Creates a plain object from a MsgUndelegateResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.MsgUndelegateResponse + * @static + * @param {cosmos.staking.v1beta1.MsgUndelegateResponse} message MsgUndelegateResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgUndelegateResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.completionTime = null; + if (message.completionTime != null && message.hasOwnProperty("completionTime")) + object.completionTime = $root.google.protobuf.Timestamp.toObject(message.completionTime, options); + return object; + }; + + /** + * Converts this MsgUndelegateResponse to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.MsgUndelegateResponse + * @instance + * @returns {Object.} JSON object + */ + MsgUndelegateResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgUndelegateResponse; + })(v1beta1.MsgUndelegateResponse || {}); + + return v1beta1; + })(staking.v1beta1 || {}); + + return staking; + })(cosmos.staking || {}); + + /** + * Namespace crypto. + * @memberof cosmos + * @namespace + */ + + cosmos.crypto = (function(crypto) { + + /** + * Namespace multisig. + * @memberof cosmos.crypto + * @namespace + */ + + crypto.multisig = (function(multisig) { + + /** + * Namespace v1beta1. + * @memberof cosmos.crypto.multisig + * @namespace + */ + + multisig.v1beta1 = (function(v1beta1) { + + v1beta1.MultiSignature = (function(MultiSignature) { + + /** + * Properties of a MultiSignature. + * @memberof cosmos.crypto.multisig.v1beta1 + * @interface IMultiSignature + * @property {Array.|null} [signatures] MultiSignature signatures + */ + + /** + * Constructs a new MultiSignature. + * @memberof cosmos.crypto.multisig.v1beta1 + * @classdesc Represents a MultiSignature. + * @implements IMultiSignature + * @constructor + * @param {cosmos.crypto.multisig.v1beta1.IMultiSignature=} [properties] Properties to set + */ + function MultiSignature(properties) { + this.signatures = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MultiSignature signatures. + * @member {Array.} signatures + * @memberof cosmos.crypto.multisig.v1beta1.MultiSignature + * @instance + */ + MultiSignature.prototype.signatures = $util.emptyArray; + + /** + * Creates a new MultiSignature instance using the specified properties. + * @function create + * @memberof cosmos.crypto.multisig.v1beta1.MultiSignature + * @static + * @param {cosmos.crypto.multisig.v1beta1.IMultiSignature=} [properties] Properties to set + * @returns {cosmos.crypto.multisig.v1beta1.MultiSignature} MultiSignature instance + */ + MultiSignature.create = function create(properties) { + return new MultiSignature(properties); + }; + + /** + * Encodes the specified MultiSignature message. Does not implicitly {@link cosmos.crypto.multisig.v1beta1.MultiSignature.verify|verify} messages. + * @function encode + * @memberof cosmos.crypto.multisig.v1beta1.MultiSignature + * @static + * @param {cosmos.crypto.multisig.v1beta1.IMultiSignature} message MultiSignature message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MultiSignature.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.signatures != null && message.signatures.length) + for (var i = 0; i < message.signatures.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.signatures[i]); + return writer; + }; + + /** + * Encodes the specified MultiSignature message, length delimited. Does not implicitly {@link cosmos.crypto.multisig.v1beta1.MultiSignature.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.crypto.multisig.v1beta1.MultiSignature + * @static + * @param {cosmos.crypto.multisig.v1beta1.IMultiSignature} message MultiSignature message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MultiSignature.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MultiSignature message from the specified reader or buffer. + * @function decode + * @memberof cosmos.crypto.multisig.v1beta1.MultiSignature + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.crypto.multisig.v1beta1.MultiSignature} MultiSignature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MultiSignature.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.crypto.multisig.v1beta1.MultiSignature(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.signatures && message.signatures.length)) + message.signatures = []; + message.signatures.push(reader.bytes()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MultiSignature message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.crypto.multisig.v1beta1.MultiSignature + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.crypto.multisig.v1beta1.MultiSignature} MultiSignature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MultiSignature.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MultiSignature message. + * @function verify + * @memberof cosmos.crypto.multisig.v1beta1.MultiSignature + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MultiSignature.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.signatures != null && message.hasOwnProperty("signatures")) { + if (!Array.isArray(message.signatures)) + return "signatures: array expected"; + for (var i = 0; i < message.signatures.length; ++i) + if (!(message.signatures[i] && typeof message.signatures[i].length === "number" || $util.isString(message.signatures[i]))) + return "signatures: buffer[] expected"; + } + return null; + }; + + /** + * Creates a MultiSignature message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.crypto.multisig.v1beta1.MultiSignature + * @static + * @param {Object.} object Plain object + * @returns {cosmos.crypto.multisig.v1beta1.MultiSignature} MultiSignature + */ + MultiSignature.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.crypto.multisig.v1beta1.MultiSignature) + return object; + var message = new $root.cosmos.crypto.multisig.v1beta1.MultiSignature(); + if (object.signatures) { + if (!Array.isArray(object.signatures)) + throw TypeError(".cosmos.crypto.multisig.v1beta1.MultiSignature.signatures: array expected"); + message.signatures = []; + for (var i = 0; i < object.signatures.length; ++i) + if (typeof object.signatures[i] === "string") + $util.base64.decode(object.signatures[i], message.signatures[i] = $util.newBuffer($util.base64.length(object.signatures[i])), 0); + else if (object.signatures[i].length) + message.signatures[i] = object.signatures[i]; + } + return message; + }; + + /** + * Creates a plain object from a MultiSignature message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.crypto.multisig.v1beta1.MultiSignature + * @static + * @param {cosmos.crypto.multisig.v1beta1.MultiSignature} message MultiSignature + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MultiSignature.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.signatures = []; + if (message.signatures && message.signatures.length) { + object.signatures = []; + for (var j = 0; j < message.signatures.length; ++j) + object.signatures[j] = options.bytes === String ? $util.base64.encode(message.signatures[j], 0, message.signatures[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.signatures[j]) : message.signatures[j]; + } + return object; + }; + + /** + * Converts this MultiSignature to JSON. + * @function toJSON + * @memberof cosmos.crypto.multisig.v1beta1.MultiSignature + * @instance + * @returns {Object.} JSON object + */ + MultiSignature.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MultiSignature; + })(v1beta1.MultiSignature || {}); + + v1beta1.CompactBitArray = (function(CompactBitArray) { + + /** + * Properties of a CompactBitArray. + * @memberof cosmos.crypto.multisig.v1beta1 + * @interface ICompactBitArray + * @property {number|null} [extraBitsStored] CompactBitArray extraBitsStored + * @property {Uint8Array|null} [elems] CompactBitArray elems + */ + + /** + * Constructs a new CompactBitArray. + * @memberof cosmos.crypto.multisig.v1beta1 + * @classdesc Represents a CompactBitArray. + * @implements ICompactBitArray + * @constructor + * @param {cosmos.crypto.multisig.v1beta1.ICompactBitArray=} [properties] Properties to set + */ + function CompactBitArray(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CompactBitArray extraBitsStored. + * @member {number} extraBitsStored + * @memberof cosmos.crypto.multisig.v1beta1.CompactBitArray + * @instance + */ + CompactBitArray.prototype.extraBitsStored = 0; + + /** + * CompactBitArray elems. + * @member {Uint8Array} elems + * @memberof cosmos.crypto.multisig.v1beta1.CompactBitArray + * @instance + */ + CompactBitArray.prototype.elems = $util.newBuffer([]); + + /** + * Creates a new CompactBitArray instance using the specified properties. + * @function create + * @memberof cosmos.crypto.multisig.v1beta1.CompactBitArray + * @static + * @param {cosmos.crypto.multisig.v1beta1.ICompactBitArray=} [properties] Properties to set + * @returns {cosmos.crypto.multisig.v1beta1.CompactBitArray} CompactBitArray instance + */ + CompactBitArray.create = function create(properties) { + return new CompactBitArray(properties); + }; + + /** + * Encodes the specified CompactBitArray message. Does not implicitly {@link cosmos.crypto.multisig.v1beta1.CompactBitArray.verify|verify} messages. + * @function encode + * @memberof cosmos.crypto.multisig.v1beta1.CompactBitArray + * @static + * @param {cosmos.crypto.multisig.v1beta1.ICompactBitArray} message CompactBitArray message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompactBitArray.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.extraBitsStored != null && Object.hasOwnProperty.call(message, "extraBitsStored")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.extraBitsStored); + if (message.elems != null && Object.hasOwnProperty.call(message, "elems")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.elems); + return writer; + }; + + /** + * Encodes the specified CompactBitArray message, length delimited. Does not implicitly {@link cosmos.crypto.multisig.v1beta1.CompactBitArray.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.crypto.multisig.v1beta1.CompactBitArray + * @static + * @param {cosmos.crypto.multisig.v1beta1.ICompactBitArray} message CompactBitArray message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompactBitArray.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CompactBitArray message from the specified reader or buffer. + * @function decode + * @memberof cosmos.crypto.multisig.v1beta1.CompactBitArray + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.crypto.multisig.v1beta1.CompactBitArray} CompactBitArray + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompactBitArray.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.crypto.multisig.v1beta1.CompactBitArray(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.extraBitsStored = reader.uint32(); + break; + case 2: + message.elems = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CompactBitArray message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.crypto.multisig.v1beta1.CompactBitArray + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.crypto.multisig.v1beta1.CompactBitArray} CompactBitArray + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompactBitArray.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CompactBitArray message. + * @function verify + * @memberof cosmos.crypto.multisig.v1beta1.CompactBitArray + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CompactBitArray.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.extraBitsStored != null && message.hasOwnProperty("extraBitsStored")) + if (!$util.isInteger(message.extraBitsStored)) + return "extraBitsStored: integer expected"; + if (message.elems != null && message.hasOwnProperty("elems")) + if (!(message.elems && typeof message.elems.length === "number" || $util.isString(message.elems))) + return "elems: buffer expected"; + return null; + }; + + /** + * Creates a CompactBitArray message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.crypto.multisig.v1beta1.CompactBitArray + * @static + * @param {Object.} object Plain object + * @returns {cosmos.crypto.multisig.v1beta1.CompactBitArray} CompactBitArray + */ + CompactBitArray.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.crypto.multisig.v1beta1.CompactBitArray) + return object; + var message = new $root.cosmos.crypto.multisig.v1beta1.CompactBitArray(); + if (object.extraBitsStored != null) + message.extraBitsStored = object.extraBitsStored >>> 0; + if (object.elems != null) + if (typeof object.elems === "string") + $util.base64.decode(object.elems, message.elems = $util.newBuffer($util.base64.length(object.elems)), 0); + else if (object.elems.length) + message.elems = object.elems; + return message; + }; + + /** + * Creates a plain object from a CompactBitArray message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.crypto.multisig.v1beta1.CompactBitArray + * @static + * @param {cosmos.crypto.multisig.v1beta1.CompactBitArray} message CompactBitArray + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CompactBitArray.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.extraBitsStored = 0; + if (options.bytes === String) + object.elems = ""; + else { + object.elems = []; + if (options.bytes !== Array) + object.elems = $util.newBuffer(object.elems); + } + } + if (message.extraBitsStored != null && message.hasOwnProperty("extraBitsStored")) + object.extraBitsStored = message.extraBitsStored; + if (message.elems != null && message.hasOwnProperty("elems")) + object.elems = options.bytes === String ? $util.base64.encode(message.elems, 0, message.elems.length) : options.bytes === Array ? Array.prototype.slice.call(message.elems) : message.elems; + return object; + }; + + /** + * Converts this CompactBitArray to JSON. + * @function toJSON + * @memberof cosmos.crypto.multisig.v1beta1.CompactBitArray + * @instance + * @returns {Object.} JSON object + */ + CompactBitArray.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CompactBitArray; + })(v1beta1.CompactBitArray || {}); + + return v1beta1; + })(multisig.v1beta1 || {}); + + return multisig; + })(crypto.multisig || {}); + + return crypto; + })(cosmos.crypto || {}); + + /** + * Namespace tx. + * @memberof cosmos + * @namespace + */ + + cosmos.tx = (function(tx) { + + /** + * Namespace signing. + * @memberof cosmos.tx + * @namespace + */ + + tx.signing = (function(signing) { + + /** + * Namespace v1beta1. + * @memberof cosmos.tx.signing + * @namespace + */ + + signing.v1beta1 = (function(v1beta1) { + + /** + * SignMode enum. + * @name cosmos.tx.signing.v1beta1.SignMode + * @enum {string} + * @property {number} SIGN_MODE_UNSPECIFIED=0 SIGN_MODE_UNSPECIFIED value + * @property {number} SIGN_MODE_DIRECT=1 SIGN_MODE_DIRECT value + * @property {number} SIGN_MODE_TEXTUAL=2 SIGN_MODE_TEXTUAL value + * @property {number} SIGN_MODE_LEGACY_AMINO_JSON=127 SIGN_MODE_LEGACY_AMINO_JSON value + */ + v1beta1.SignMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SIGN_MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SIGN_MODE_DIRECT"] = 1; + values[valuesById[2] = "SIGN_MODE_TEXTUAL"] = 2; + values[valuesById[127] = "SIGN_MODE_LEGACY_AMINO_JSON"] = 127; + return values; + })(); + + v1beta1.SignatureDescriptors = (function(SignatureDescriptors) { + + /** + * Properties of a SignatureDescriptors. + * @memberof cosmos.tx.signing.v1beta1 + * @interface ISignatureDescriptors + * @property {Array.|null} [signatures] SignatureDescriptors signatures + */ + + /** + * Constructs a new SignatureDescriptors. + * @memberof cosmos.tx.signing.v1beta1 + * @classdesc Represents a SignatureDescriptors. + * @implements ISignatureDescriptors + * @constructor + * @param {cosmos.tx.signing.v1beta1.ISignatureDescriptors=} [properties] Properties to set + */ + function SignatureDescriptors(properties) { + this.signatures = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SignatureDescriptors signatures. + * @member {Array.} signatures + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptors + * @instance + */ + SignatureDescriptors.prototype.signatures = $util.emptyArray; + + /** + * Creates a new SignatureDescriptors instance using the specified properties. + * @function create + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptors + * @static + * @param {cosmos.tx.signing.v1beta1.ISignatureDescriptors=} [properties] Properties to set + * @returns {cosmos.tx.signing.v1beta1.SignatureDescriptors} SignatureDescriptors instance + */ + SignatureDescriptors.create = function create(properties) { + return new SignatureDescriptors(properties); + }; + + /** + * Encodes the specified SignatureDescriptors message. Does not implicitly {@link cosmos.tx.signing.v1beta1.SignatureDescriptors.verify|verify} messages. + * @function encode + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptors + * @static + * @param {cosmos.tx.signing.v1beta1.ISignatureDescriptors} message SignatureDescriptors message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SignatureDescriptors.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.signatures != null && message.signatures.length) + for (var i = 0; i < message.signatures.length; ++i) + $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.encode(message.signatures[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SignatureDescriptors message, length delimited. Does not implicitly {@link cosmos.tx.signing.v1beta1.SignatureDescriptors.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptors + * @static + * @param {cosmos.tx.signing.v1beta1.ISignatureDescriptors} message SignatureDescriptors message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SignatureDescriptors.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SignatureDescriptors message from the specified reader or buffer. + * @function decode + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptors + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.tx.signing.v1beta1.SignatureDescriptors} SignatureDescriptors + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SignatureDescriptors.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.tx.signing.v1beta1.SignatureDescriptors(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.signatures && message.signatures.length)) + message.signatures = []; + message.signatures.push($root.cosmos.tx.signing.v1beta1.SignatureDescriptor.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SignatureDescriptors message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptors + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.tx.signing.v1beta1.SignatureDescriptors} SignatureDescriptors + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SignatureDescriptors.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SignatureDescriptors message. + * @function verify + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptors + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SignatureDescriptors.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.signatures != null && message.hasOwnProperty("signatures")) { + if (!Array.isArray(message.signatures)) + return "signatures: array expected"; + for (var i = 0; i < message.signatures.length; ++i) { + var error = $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.verify(message.signatures[i]); + if (error) + return "signatures." + error; + } + } + return null; + }; + + /** + * Creates a SignatureDescriptors message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptors + * @static + * @param {Object.} object Plain object + * @returns {cosmos.tx.signing.v1beta1.SignatureDescriptors} SignatureDescriptors + */ + SignatureDescriptors.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.tx.signing.v1beta1.SignatureDescriptors) + return object; + var message = new $root.cosmos.tx.signing.v1beta1.SignatureDescriptors(); + if (object.signatures) { + if (!Array.isArray(object.signatures)) + throw TypeError(".cosmos.tx.signing.v1beta1.SignatureDescriptors.signatures: array expected"); + message.signatures = []; + for (var i = 0; i < object.signatures.length; ++i) { + if (typeof object.signatures[i] !== "object") + throw TypeError(".cosmos.tx.signing.v1beta1.SignatureDescriptors.signatures: object expected"); + message.signatures[i] = $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.fromObject(object.signatures[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SignatureDescriptors message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptors + * @static + * @param {cosmos.tx.signing.v1beta1.SignatureDescriptors} message SignatureDescriptors + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SignatureDescriptors.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.signatures = []; + if (message.signatures && message.signatures.length) { + object.signatures = []; + for (var j = 0; j < message.signatures.length; ++j) + object.signatures[j] = $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.toObject(message.signatures[j], options); + } + return object; + }; + + /** + * Converts this SignatureDescriptors to JSON. + * @function toJSON + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptors + * @instance + * @returns {Object.} JSON object + */ + SignatureDescriptors.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SignatureDescriptors; + })(v1beta1.SignatureDescriptors || {}); + + v1beta1.SignatureDescriptor = (function(SignatureDescriptor) { + + /** + * Properties of a SignatureDescriptor. + * @memberof cosmos.tx.signing.v1beta1 + * @interface ISignatureDescriptor + * @property {google.protobuf.IAny|null} [publicKey] SignatureDescriptor publicKey + * @property {cosmos.tx.signing.v1beta1.SignatureDescriptor.IData|null} [data] SignatureDescriptor data + * @property {number|Long|null} [sequence] SignatureDescriptor sequence + */ + + /** + * Constructs a new SignatureDescriptor. + * @memberof cosmos.tx.signing.v1beta1 + * @classdesc Represents a SignatureDescriptor. + * @implements ISignatureDescriptor + * @constructor + * @param {cosmos.tx.signing.v1beta1.ISignatureDescriptor=} [properties] Properties to set + */ + function SignatureDescriptor(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SignatureDescriptor publicKey. + * @member {google.protobuf.IAny|null|undefined} publicKey + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor + * @instance + */ + SignatureDescriptor.prototype.publicKey = null; + + /** + * SignatureDescriptor data. + * @member {cosmos.tx.signing.v1beta1.SignatureDescriptor.IData|null|undefined} data + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor + * @instance + */ + SignatureDescriptor.prototype.data = null; + + /** + * SignatureDescriptor sequence. + * @member {number|Long} sequence + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor + * @instance + */ + SignatureDescriptor.prototype.sequence = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new SignatureDescriptor instance using the specified properties. + * @function create + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor + * @static + * @param {cosmos.tx.signing.v1beta1.ISignatureDescriptor=} [properties] Properties to set + * @returns {cosmos.tx.signing.v1beta1.SignatureDescriptor} SignatureDescriptor instance + */ + SignatureDescriptor.create = function create(properties) { + return new SignatureDescriptor(properties); + }; + + /** + * Encodes the specified SignatureDescriptor message. Does not implicitly {@link cosmos.tx.signing.v1beta1.SignatureDescriptor.verify|verify} messages. + * @function encode + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor + * @static + * @param {cosmos.tx.signing.v1beta1.ISignatureDescriptor} message SignatureDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SignatureDescriptor.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.publicKey != null && Object.hasOwnProperty.call(message, "publicKey")) + $root.google.protobuf.Any.encode(message.publicKey, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.data != null && Object.hasOwnProperty.call(message, "data")) + $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.encode(message.data, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.sequence != null && Object.hasOwnProperty.call(message, "sequence")) + writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.sequence); + return writer; + }; + + /** + * Encodes the specified SignatureDescriptor message, length delimited. Does not implicitly {@link cosmos.tx.signing.v1beta1.SignatureDescriptor.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor + * @static + * @param {cosmos.tx.signing.v1beta1.ISignatureDescriptor} message SignatureDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SignatureDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SignatureDescriptor message from the specified reader or buffer. + * @function decode + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.tx.signing.v1beta1.SignatureDescriptor} SignatureDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SignatureDescriptor.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.tx.signing.v1beta1.SignatureDescriptor(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.publicKey = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + case 2: + message.data = $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.decode(reader, reader.uint32()); + break; + case 3: + message.sequence = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SignatureDescriptor message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.tx.signing.v1beta1.SignatureDescriptor} SignatureDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SignatureDescriptor.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SignatureDescriptor message. + * @function verify + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SignatureDescriptor.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.publicKey != null && message.hasOwnProperty("publicKey")) { + var error = $root.google.protobuf.Any.verify(message.publicKey); + if (error) + return "publicKey." + error; + } + if (message.data != null && message.hasOwnProperty("data")) { + var error = $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.verify(message.data); + if (error) + return "data." + error; + } + if (message.sequence != null && message.hasOwnProperty("sequence")) + if (!$util.isInteger(message.sequence) && !(message.sequence && $util.isInteger(message.sequence.low) && $util.isInteger(message.sequence.high))) + return "sequence: integer|Long expected"; + return null; + }; + + /** + * Creates a SignatureDescriptor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor + * @static + * @param {Object.} object Plain object + * @returns {cosmos.tx.signing.v1beta1.SignatureDescriptor} SignatureDescriptor + */ + SignatureDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.tx.signing.v1beta1.SignatureDescriptor) + return object; + var message = new $root.cosmos.tx.signing.v1beta1.SignatureDescriptor(); + if (object.publicKey != null) { + if (typeof object.publicKey !== "object") + throw TypeError(".cosmos.tx.signing.v1beta1.SignatureDescriptor.publicKey: object expected"); + message.publicKey = $root.google.protobuf.Any.fromObject(object.publicKey); + } + if (object.data != null) { + if (typeof object.data !== "object") + throw TypeError(".cosmos.tx.signing.v1beta1.SignatureDescriptor.data: object expected"); + message.data = $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.fromObject(object.data); + } + if (object.sequence != null) + if ($util.Long) + (message.sequence = $util.Long.fromValue(object.sequence)).unsigned = true; + else if (typeof object.sequence === "string") + message.sequence = parseInt(object.sequence, 10); + else if (typeof object.sequence === "number") + message.sequence = object.sequence; + else if (typeof object.sequence === "object") + message.sequence = new $util.LongBits(object.sequence.low >>> 0, object.sequence.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a SignatureDescriptor message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor + * @static + * @param {cosmos.tx.signing.v1beta1.SignatureDescriptor} message SignatureDescriptor + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SignatureDescriptor.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.publicKey = null; + object.data = null; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.sequence = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.sequence = options.longs === String ? "0" : 0; + } + if (message.publicKey != null && message.hasOwnProperty("publicKey")) + object.publicKey = $root.google.protobuf.Any.toObject(message.publicKey, options); + if (message.data != null && message.hasOwnProperty("data")) + object.data = $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.toObject(message.data, options); + if (message.sequence != null && message.hasOwnProperty("sequence")) + if (typeof message.sequence === "number") + object.sequence = options.longs === String ? String(message.sequence) : message.sequence; + else + object.sequence = options.longs === String ? $util.Long.prototype.toString.call(message.sequence) : options.longs === Number ? new $util.LongBits(message.sequence.low >>> 0, message.sequence.high >>> 0).toNumber(true) : message.sequence; + return object; + }; + + /** + * Converts this SignatureDescriptor to JSON. + * @function toJSON + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor + * @instance + * @returns {Object.} JSON object + */ + SignatureDescriptor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + SignatureDescriptor.Data = (function(Data) { + + /** + * Properties of a Data. + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor + * @interface IData + * @property {cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.ISingle|null} [single] Data single + * @property {cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.IMulti|null} [multi] Data multi + */ + + /** + * Constructs a new Data. + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor + * @classdesc Represents a Data. + * @implements IData + * @constructor + * @param {cosmos.tx.signing.v1beta1.SignatureDescriptor.IData=} [properties] Properties to set + */ + function Data(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Data single. + * @member {cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.ISingle|null|undefined} single + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data + * @instance + */ + Data.prototype.single = null; + + /** + * Data multi. + * @member {cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.IMulti|null|undefined} multi + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data + * @instance + */ + Data.prototype.multi = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Data sum. + * @member {"single"|"multi"|undefined} sum + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data + * @instance + */ + Object.defineProperty(Data.prototype, "sum", { + get: $util.oneOfGetter($oneOfFields = ["single", "multi"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Data instance using the specified properties. + * @function create + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data + * @static + * @param {cosmos.tx.signing.v1beta1.SignatureDescriptor.IData=} [properties] Properties to set + * @returns {cosmos.tx.signing.v1beta1.SignatureDescriptor.Data} Data instance + */ + Data.create = function create(properties) { + return new Data(properties); + }; + + /** + * Encodes the specified Data message. Does not implicitly {@link cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.verify|verify} messages. + * @function encode + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data + * @static + * @param {cosmos.tx.signing.v1beta1.SignatureDescriptor.IData} message Data message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Data.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.single != null && Object.hasOwnProperty.call(message, "single")) + $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single.encode(message.single, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.multi != null && Object.hasOwnProperty.call(message, "multi")) + $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.encode(message.multi, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Data message, length delimited. Does not implicitly {@link cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data + * @static + * @param {cosmos.tx.signing.v1beta1.SignatureDescriptor.IData} message Data message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Data.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Data message from the specified reader or buffer. + * @function decode + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.tx.signing.v1beta1.SignatureDescriptor.Data} Data + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Data.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.single = $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single.decode(reader, reader.uint32()); + break; + case 2: + message.multi = $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Data message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.tx.signing.v1beta1.SignatureDescriptor.Data} Data + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Data.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Data message. + * @function verify + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Data.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.single != null && message.hasOwnProperty("single")) { + properties.sum = 1; + { + var error = $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single.verify(message.single); + if (error) + return "single." + error; + } + } + if (message.multi != null && message.hasOwnProperty("multi")) { + if (properties.sum === 1) + return "sum: multiple values"; + properties.sum = 1; + { + var error = $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.verify(message.multi); + if (error) + return "multi." + error; + } + } + return null; + }; + + /** + * Creates a Data message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data + * @static + * @param {Object.} object Plain object + * @returns {cosmos.tx.signing.v1beta1.SignatureDescriptor.Data} Data + */ + Data.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data) + return object; + var message = new $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data(); + if (object.single != null) { + if (typeof object.single !== "object") + throw TypeError(".cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.single: object expected"); + message.single = $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single.fromObject(object.single); + } + if (object.multi != null) { + if (typeof object.multi !== "object") + throw TypeError(".cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.multi: object expected"); + message.multi = $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.fromObject(object.multi); + } + return message; + }; + + /** + * Creates a plain object from a Data message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data + * @static + * @param {cosmos.tx.signing.v1beta1.SignatureDescriptor.Data} message Data + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Data.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.single != null && message.hasOwnProperty("single")) { + object.single = $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single.toObject(message.single, options); + if (options.oneofs) + object.sum = "single"; + } + if (message.multi != null && message.hasOwnProperty("multi")) { + object.multi = $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.toObject(message.multi, options); + if (options.oneofs) + object.sum = "multi"; + } + return object; + }; + + /** + * Converts this Data to JSON. + * @function toJSON + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data + * @instance + * @returns {Object.} JSON object + */ + Data.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + Data.Single = (function(Single) { + + /** + * Properties of a Single. + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data + * @interface ISingle + * @property {cosmos.tx.signing.v1beta1.SignMode|null} [mode] Single mode + * @property {Uint8Array|null} [signature] Single signature + */ + + /** + * Constructs a new Single. + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data + * @classdesc Represents a Single. + * @implements ISingle + * @constructor + * @param {cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.ISingle=} [properties] Properties to set + */ + function Single(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Single mode. + * @member {cosmos.tx.signing.v1beta1.SignMode} mode + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single + * @instance + */ + Single.prototype.mode = 0; + + /** + * Single signature. + * @member {Uint8Array} signature + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single + * @instance + */ + Single.prototype.signature = $util.newBuffer([]); + + /** + * Creates a new Single instance using the specified properties. + * @function create + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single + * @static + * @param {cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.ISingle=} [properties] Properties to set + * @returns {cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single} Single instance + */ + Single.create = function create(properties) { + return new Single(properties); + }; + + /** + * Encodes the specified Single message. Does not implicitly {@link cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single.verify|verify} messages. + * @function encode + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single + * @static + * @param {cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.ISingle} message Single message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Single.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.mode != null && Object.hasOwnProperty.call(message, "mode")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.mode); + if (message.signature != null && Object.hasOwnProperty.call(message, "signature")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.signature); + return writer; + }; + + /** + * Encodes the specified Single message, length delimited. Does not implicitly {@link cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single + * @static + * @param {cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.ISingle} message Single message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Single.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Single message from the specified reader or buffer. + * @function decode + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single} Single + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Single.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.mode = reader.int32(); + break; + case 2: + message.signature = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Single message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single} Single + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Single.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Single message. + * @function verify + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Single.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.mode != null && message.hasOwnProperty("mode")) + switch (message.mode) { + default: + return "mode: enum value expected"; + case 0: + case 1: + case 2: + case 127: + break; + } + if (message.signature != null && message.hasOwnProperty("signature")) + if (!(message.signature && typeof message.signature.length === "number" || $util.isString(message.signature))) + return "signature: buffer expected"; + return null; + }; + + /** + * Creates a Single message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single + * @static + * @param {Object.} object Plain object + * @returns {cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single} Single + */ + Single.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single) + return object; + var message = new $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single(); + switch (object.mode) { + case "SIGN_MODE_UNSPECIFIED": + case 0: + message.mode = 0; + break; + case "SIGN_MODE_DIRECT": + case 1: + message.mode = 1; + break; + case "SIGN_MODE_TEXTUAL": + case 2: + message.mode = 2; + break; + case "SIGN_MODE_LEGACY_AMINO_JSON": + case 127: + message.mode = 127; + break; + } + if (object.signature != null) + if (typeof object.signature === "string") + $util.base64.decode(object.signature, message.signature = $util.newBuffer($util.base64.length(object.signature)), 0); + else if (object.signature.length) + message.signature = object.signature; + return message; + }; + + /** + * Creates a plain object from a Single message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single + * @static + * @param {cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single} message Single + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Single.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.mode = options.enums === String ? "SIGN_MODE_UNSPECIFIED" : 0; + if (options.bytes === String) + object.signature = ""; + else { + object.signature = []; + if (options.bytes !== Array) + object.signature = $util.newBuffer(object.signature); + } + } + if (message.mode != null && message.hasOwnProperty("mode")) + object.mode = options.enums === String ? $root.cosmos.tx.signing.v1beta1.SignMode[message.mode] : message.mode; + if (message.signature != null && message.hasOwnProperty("signature")) + object.signature = options.bytes === String ? $util.base64.encode(message.signature, 0, message.signature.length) : options.bytes === Array ? Array.prototype.slice.call(message.signature) : message.signature; + return object; + }; + + /** + * Converts this Single to JSON. + * @function toJSON + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single + * @instance + * @returns {Object.} JSON object + */ + Single.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Single; + })(Data.Single || {}); + + Data.Multi = (function(Multi) { + + /** + * Properties of a Multi. + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data + * @interface IMulti + * @property {cosmos.crypto.multisig.v1beta1.ICompactBitArray|null} [bitarray] Multi bitarray + * @property {Array.|null} [signatures] Multi signatures + */ + + /** + * Constructs a new Multi. + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data + * @classdesc Represents a Multi. + * @implements IMulti + * @constructor + * @param {cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.IMulti=} [properties] Properties to set + */ + function Multi(properties) { + this.signatures = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Multi bitarray. + * @member {cosmos.crypto.multisig.v1beta1.ICompactBitArray|null|undefined} bitarray + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi + * @instance + */ + Multi.prototype.bitarray = null; + + /** + * Multi signatures. + * @member {Array.} signatures + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi + * @instance + */ + Multi.prototype.signatures = $util.emptyArray; + + /** + * Creates a new Multi instance using the specified properties. + * @function create + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi + * @static + * @param {cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.IMulti=} [properties] Properties to set + * @returns {cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi} Multi instance + */ + Multi.create = function create(properties) { + return new Multi(properties); + }; + + /** + * Encodes the specified Multi message. Does not implicitly {@link cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.verify|verify} messages. + * @function encode + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi + * @static + * @param {cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.IMulti} message Multi message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Multi.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.bitarray != null && Object.hasOwnProperty.call(message, "bitarray")) + $root.cosmos.crypto.multisig.v1beta1.CompactBitArray.encode(message.bitarray, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.signatures != null && message.signatures.length) + for (var i = 0; i < message.signatures.length; ++i) + $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.encode(message.signatures[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Multi message, length delimited. Does not implicitly {@link cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi + * @static + * @param {cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.IMulti} message Multi message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Multi.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Multi message from the specified reader or buffer. + * @function decode + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi} Multi + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Multi.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.bitarray = $root.cosmos.crypto.multisig.v1beta1.CompactBitArray.decode(reader, reader.uint32()); + break; + case 2: + if (!(message.signatures && message.signatures.length)) + message.signatures = []; + message.signatures.push($root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Multi message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi} Multi + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Multi.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Multi message. + * @function verify + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Multi.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.bitarray != null && message.hasOwnProperty("bitarray")) { + var error = $root.cosmos.crypto.multisig.v1beta1.CompactBitArray.verify(message.bitarray); + if (error) + return "bitarray." + error; + } + if (message.signatures != null && message.hasOwnProperty("signatures")) { + if (!Array.isArray(message.signatures)) + return "signatures: array expected"; + for (var i = 0; i < message.signatures.length; ++i) { + var error = $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.verify(message.signatures[i]); + if (error) + return "signatures." + error; + } + } + return null; + }; + + /** + * Creates a Multi message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi + * @static + * @param {Object.} object Plain object + * @returns {cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi} Multi + */ + Multi.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi) + return object; + var message = new $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi(); + if (object.bitarray != null) { + if (typeof object.bitarray !== "object") + throw TypeError(".cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.bitarray: object expected"); + message.bitarray = $root.cosmos.crypto.multisig.v1beta1.CompactBitArray.fromObject(object.bitarray); + } + if (object.signatures) { + if (!Array.isArray(object.signatures)) + throw TypeError(".cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.signatures: array expected"); + message.signatures = []; + for (var i = 0; i < object.signatures.length; ++i) { + if (typeof object.signatures[i] !== "object") + throw TypeError(".cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.signatures: object expected"); + message.signatures[i] = $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.fromObject(object.signatures[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Multi message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi + * @static + * @param {cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi} message Multi + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Multi.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.signatures = []; + if (options.defaults) + object.bitarray = null; + if (message.bitarray != null && message.hasOwnProperty("bitarray")) + object.bitarray = $root.cosmos.crypto.multisig.v1beta1.CompactBitArray.toObject(message.bitarray, options); + if (message.signatures && message.signatures.length) { + object.signatures = []; + for (var j = 0; j < message.signatures.length; ++j) + object.signatures[j] = $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.toObject(message.signatures[j], options); + } + return object; + }; + + /** + * Converts this Multi to JSON. + * @function toJSON + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi + * @instance + * @returns {Object.} JSON object + */ + Multi.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Multi; + })(Data.Multi || {}); + + return Data; + })(SignatureDescriptor.Data || {}); + + return SignatureDescriptor; + })(v1beta1.SignatureDescriptor || {}); + + return v1beta1; + })(signing.v1beta1 || {}); + + return signing; + })(tx.signing || {}); + + /** + * Namespace v1beta1. + * @memberof cosmos.tx + * @namespace + */ + + tx.v1beta1 = (function(v1beta1) { + + v1beta1.Tx = (function(Tx) { + + /** + * Properties of a Tx. + * @memberof cosmos.tx.v1beta1 + * @interface ITx + * @property {cosmos.tx.v1beta1.ITxBody|null} [body] Tx body + * @property {cosmos.tx.v1beta1.IAuthInfo|null} [authInfo] Tx authInfo + * @property {Array.|null} [signatures] Tx signatures + */ + + /** + * Constructs a new Tx. + * @memberof cosmos.tx.v1beta1 + * @classdesc Represents a Tx. + * @implements ITx + * @constructor + * @param {cosmos.tx.v1beta1.ITx=} [properties] Properties to set + */ + function Tx(properties) { + this.signatures = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Tx body. + * @member {cosmos.tx.v1beta1.ITxBody|null|undefined} body + * @memberof cosmos.tx.v1beta1.Tx + * @instance + */ + Tx.prototype.body = null; + + /** + * Tx authInfo. + * @member {cosmos.tx.v1beta1.IAuthInfo|null|undefined} authInfo + * @memberof cosmos.tx.v1beta1.Tx + * @instance + */ + Tx.prototype.authInfo = null; + + /** + * Tx signatures. + * @member {Array.} signatures + * @memberof cosmos.tx.v1beta1.Tx + * @instance + */ + Tx.prototype.signatures = $util.emptyArray; + + /** + * Creates a new Tx instance using the specified properties. + * @function create + * @memberof cosmos.tx.v1beta1.Tx + * @static + * @param {cosmos.tx.v1beta1.ITx=} [properties] Properties to set + * @returns {cosmos.tx.v1beta1.Tx} Tx instance + */ + Tx.create = function create(properties) { + return new Tx(properties); + }; + + /** + * Encodes the specified Tx message. Does not implicitly {@link cosmos.tx.v1beta1.Tx.verify|verify} messages. + * @function encode + * @memberof cosmos.tx.v1beta1.Tx + * @static + * @param {cosmos.tx.v1beta1.ITx} message Tx message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Tx.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.body != null && Object.hasOwnProperty.call(message, "body")) + $root.cosmos.tx.v1beta1.TxBody.encode(message.body, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.authInfo != null && Object.hasOwnProperty.call(message, "authInfo")) + $root.cosmos.tx.v1beta1.AuthInfo.encode(message.authInfo, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.signatures != null && message.signatures.length) + for (var i = 0; i < message.signatures.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.signatures[i]); + return writer; + }; + + /** + * Encodes the specified Tx message, length delimited. Does not implicitly {@link cosmos.tx.v1beta1.Tx.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.tx.v1beta1.Tx + * @static + * @param {cosmos.tx.v1beta1.ITx} message Tx message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Tx.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Tx message from the specified reader or buffer. + * @function decode + * @memberof cosmos.tx.v1beta1.Tx + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.tx.v1beta1.Tx} Tx + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Tx.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.tx.v1beta1.Tx(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.body = $root.cosmos.tx.v1beta1.TxBody.decode(reader, reader.uint32()); + break; + case 2: + message.authInfo = $root.cosmos.tx.v1beta1.AuthInfo.decode(reader, reader.uint32()); + break; + case 3: + if (!(message.signatures && message.signatures.length)) + message.signatures = []; + message.signatures.push(reader.bytes()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Tx message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.tx.v1beta1.Tx + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.tx.v1beta1.Tx} Tx + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Tx.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Tx message. + * @function verify + * @memberof cosmos.tx.v1beta1.Tx + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Tx.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.body != null && message.hasOwnProperty("body")) { + var error = $root.cosmos.tx.v1beta1.TxBody.verify(message.body); + if (error) + return "body." + error; + } + if (message.authInfo != null && message.hasOwnProperty("authInfo")) { + var error = $root.cosmos.tx.v1beta1.AuthInfo.verify(message.authInfo); + if (error) + return "authInfo." + error; + } + if (message.signatures != null && message.hasOwnProperty("signatures")) { + if (!Array.isArray(message.signatures)) + return "signatures: array expected"; + for (var i = 0; i < message.signatures.length; ++i) + if (!(message.signatures[i] && typeof message.signatures[i].length === "number" || $util.isString(message.signatures[i]))) + return "signatures: buffer[] expected"; + } + return null; + }; + + /** + * Creates a Tx message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.tx.v1beta1.Tx + * @static + * @param {Object.} object Plain object + * @returns {cosmos.tx.v1beta1.Tx} Tx + */ + Tx.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.tx.v1beta1.Tx) + return object; + var message = new $root.cosmos.tx.v1beta1.Tx(); + if (object.body != null) { + if (typeof object.body !== "object") + throw TypeError(".cosmos.tx.v1beta1.Tx.body: object expected"); + message.body = $root.cosmos.tx.v1beta1.TxBody.fromObject(object.body); + } + if (object.authInfo != null) { + if (typeof object.authInfo !== "object") + throw TypeError(".cosmos.tx.v1beta1.Tx.authInfo: object expected"); + message.authInfo = $root.cosmos.tx.v1beta1.AuthInfo.fromObject(object.authInfo); + } + if (object.signatures) { + if (!Array.isArray(object.signatures)) + throw TypeError(".cosmos.tx.v1beta1.Tx.signatures: array expected"); + message.signatures = []; + for (var i = 0; i < object.signatures.length; ++i) + if (typeof object.signatures[i] === "string") + $util.base64.decode(object.signatures[i], message.signatures[i] = $util.newBuffer($util.base64.length(object.signatures[i])), 0); + else if (object.signatures[i].length) + message.signatures[i] = object.signatures[i]; + } + return message; + }; + + /** + * Creates a plain object from a Tx message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.tx.v1beta1.Tx + * @static + * @param {cosmos.tx.v1beta1.Tx} message Tx + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Tx.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.signatures = []; + if (options.defaults) { + object.body = null; + object.authInfo = null; + } + if (message.body != null && message.hasOwnProperty("body")) + object.body = $root.cosmos.tx.v1beta1.TxBody.toObject(message.body, options); + if (message.authInfo != null && message.hasOwnProperty("authInfo")) + object.authInfo = $root.cosmos.tx.v1beta1.AuthInfo.toObject(message.authInfo, options); + if (message.signatures && message.signatures.length) { + object.signatures = []; + for (var j = 0; j < message.signatures.length; ++j) + object.signatures[j] = options.bytes === String ? $util.base64.encode(message.signatures[j], 0, message.signatures[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.signatures[j]) : message.signatures[j]; + } + return object; + }; + + /** + * Converts this Tx to JSON. + * @function toJSON + * @memberof cosmos.tx.v1beta1.Tx + * @instance + * @returns {Object.} JSON object + */ + Tx.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Tx; + })(v1beta1.Tx || {}); + + v1beta1.TxRaw = (function(TxRaw) { + + /** + * Properties of a TxRaw. + * @memberof cosmos.tx.v1beta1 + * @interface ITxRaw + * @property {Uint8Array|null} [bodyBytes] TxRaw bodyBytes + * @property {Uint8Array|null} [authInfoBytes] TxRaw authInfoBytes + * @property {Array.|null} [signatures] TxRaw signatures + */ + + /** + * Constructs a new TxRaw. + * @memberof cosmos.tx.v1beta1 + * @classdesc Represents a TxRaw. + * @implements ITxRaw + * @constructor + * @param {cosmos.tx.v1beta1.ITxRaw=} [properties] Properties to set + */ + function TxRaw(properties) { + this.signatures = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TxRaw bodyBytes. + * @member {Uint8Array} bodyBytes + * @memberof cosmos.tx.v1beta1.TxRaw + * @instance + */ + TxRaw.prototype.bodyBytes = $util.newBuffer([]); + + /** + * TxRaw authInfoBytes. + * @member {Uint8Array} authInfoBytes + * @memberof cosmos.tx.v1beta1.TxRaw + * @instance + */ + TxRaw.prototype.authInfoBytes = $util.newBuffer([]); + + /** + * TxRaw signatures. + * @member {Array.} signatures + * @memberof cosmos.tx.v1beta1.TxRaw + * @instance + */ + TxRaw.prototype.signatures = $util.emptyArray; + + /** + * Creates a new TxRaw instance using the specified properties. + * @function create + * @memberof cosmos.tx.v1beta1.TxRaw + * @static + * @param {cosmos.tx.v1beta1.ITxRaw=} [properties] Properties to set + * @returns {cosmos.tx.v1beta1.TxRaw} TxRaw instance + */ + TxRaw.create = function create(properties) { + return new TxRaw(properties); + }; + + /** + * Encodes the specified TxRaw message. Does not implicitly {@link cosmos.tx.v1beta1.TxRaw.verify|verify} messages. + * @function encode + * @memberof cosmos.tx.v1beta1.TxRaw + * @static + * @param {cosmos.tx.v1beta1.ITxRaw} message TxRaw message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TxRaw.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.bodyBytes != null && Object.hasOwnProperty.call(message, "bodyBytes")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.bodyBytes); + if (message.authInfoBytes != null && Object.hasOwnProperty.call(message, "authInfoBytes")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.authInfoBytes); + if (message.signatures != null && message.signatures.length) + for (var i = 0; i < message.signatures.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.signatures[i]); + return writer; + }; + + /** + * Encodes the specified TxRaw message, length delimited. Does not implicitly {@link cosmos.tx.v1beta1.TxRaw.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.tx.v1beta1.TxRaw + * @static + * @param {cosmos.tx.v1beta1.ITxRaw} message TxRaw message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TxRaw.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TxRaw message from the specified reader or buffer. + * @function decode + * @memberof cosmos.tx.v1beta1.TxRaw + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.tx.v1beta1.TxRaw} TxRaw + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TxRaw.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.tx.v1beta1.TxRaw(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.bodyBytes = reader.bytes(); + break; + case 2: + message.authInfoBytes = reader.bytes(); + break; + case 3: + if (!(message.signatures && message.signatures.length)) + message.signatures = []; + message.signatures.push(reader.bytes()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TxRaw message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.tx.v1beta1.TxRaw + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.tx.v1beta1.TxRaw} TxRaw + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TxRaw.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TxRaw message. + * @function verify + * @memberof cosmos.tx.v1beta1.TxRaw + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TxRaw.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.bodyBytes != null && message.hasOwnProperty("bodyBytes")) + if (!(message.bodyBytes && typeof message.bodyBytes.length === "number" || $util.isString(message.bodyBytes))) + return "bodyBytes: buffer expected"; + if (message.authInfoBytes != null && message.hasOwnProperty("authInfoBytes")) + if (!(message.authInfoBytes && typeof message.authInfoBytes.length === "number" || $util.isString(message.authInfoBytes))) + return "authInfoBytes: buffer expected"; + if (message.signatures != null && message.hasOwnProperty("signatures")) { + if (!Array.isArray(message.signatures)) + return "signatures: array expected"; + for (var i = 0; i < message.signatures.length; ++i) + if (!(message.signatures[i] && typeof message.signatures[i].length === "number" || $util.isString(message.signatures[i]))) + return "signatures: buffer[] expected"; + } + return null; + }; + + /** + * Creates a TxRaw message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.tx.v1beta1.TxRaw + * @static + * @param {Object.} object Plain object + * @returns {cosmos.tx.v1beta1.TxRaw} TxRaw + */ + TxRaw.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.tx.v1beta1.TxRaw) + return object; + var message = new $root.cosmos.tx.v1beta1.TxRaw(); + if (object.bodyBytes != null) + if (typeof object.bodyBytes === "string") + $util.base64.decode(object.bodyBytes, message.bodyBytes = $util.newBuffer($util.base64.length(object.bodyBytes)), 0); + else if (object.bodyBytes.length) + message.bodyBytes = object.bodyBytes; + if (object.authInfoBytes != null) + if (typeof object.authInfoBytes === "string") + $util.base64.decode(object.authInfoBytes, message.authInfoBytes = $util.newBuffer($util.base64.length(object.authInfoBytes)), 0); + else if (object.authInfoBytes.length) + message.authInfoBytes = object.authInfoBytes; + if (object.signatures) { + if (!Array.isArray(object.signatures)) + throw TypeError(".cosmos.tx.v1beta1.TxRaw.signatures: array expected"); + message.signatures = []; + for (var i = 0; i < object.signatures.length; ++i) + if (typeof object.signatures[i] === "string") + $util.base64.decode(object.signatures[i], message.signatures[i] = $util.newBuffer($util.base64.length(object.signatures[i])), 0); + else if (object.signatures[i].length) + message.signatures[i] = object.signatures[i]; + } + return message; + }; + + /** + * Creates a plain object from a TxRaw message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.tx.v1beta1.TxRaw + * @static + * @param {cosmos.tx.v1beta1.TxRaw} message TxRaw + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TxRaw.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.signatures = []; + if (options.defaults) { + if (options.bytes === String) + object.bodyBytes = ""; + else { + object.bodyBytes = []; + if (options.bytes !== Array) + object.bodyBytes = $util.newBuffer(object.bodyBytes); + } + if (options.bytes === String) + object.authInfoBytes = ""; + else { + object.authInfoBytes = []; + if (options.bytes !== Array) + object.authInfoBytes = $util.newBuffer(object.authInfoBytes); + } + } + if (message.bodyBytes != null && message.hasOwnProperty("bodyBytes")) + object.bodyBytes = options.bytes === String ? $util.base64.encode(message.bodyBytes, 0, message.bodyBytes.length) : options.bytes === Array ? Array.prototype.slice.call(message.bodyBytes) : message.bodyBytes; + if (message.authInfoBytes != null && message.hasOwnProperty("authInfoBytes")) + object.authInfoBytes = options.bytes === String ? $util.base64.encode(message.authInfoBytes, 0, message.authInfoBytes.length) : options.bytes === Array ? Array.prototype.slice.call(message.authInfoBytes) : message.authInfoBytes; + if (message.signatures && message.signatures.length) { + object.signatures = []; + for (var j = 0; j < message.signatures.length; ++j) + object.signatures[j] = options.bytes === String ? $util.base64.encode(message.signatures[j], 0, message.signatures[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.signatures[j]) : message.signatures[j]; + } + return object; + }; + + /** + * Converts this TxRaw to JSON. + * @function toJSON + * @memberof cosmos.tx.v1beta1.TxRaw + * @instance + * @returns {Object.} JSON object + */ + TxRaw.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TxRaw; + })(v1beta1.TxRaw || {}); + + v1beta1.SignDoc = (function(SignDoc) { + + /** + * Properties of a SignDoc. + * @memberof cosmos.tx.v1beta1 + * @interface ISignDoc + * @property {Uint8Array|null} [bodyBytes] SignDoc bodyBytes + * @property {Uint8Array|null} [authInfoBytes] SignDoc authInfoBytes + * @property {string|null} [chainId] SignDoc chainId + * @property {number|Long|null} [accountNumber] SignDoc accountNumber + */ + + /** + * Constructs a new SignDoc. + * @memberof cosmos.tx.v1beta1 + * @classdesc Represents a SignDoc. + * @implements ISignDoc + * @constructor + * @param {cosmos.tx.v1beta1.ISignDoc=} [properties] Properties to set + */ + function SignDoc(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SignDoc bodyBytes. + * @member {Uint8Array} bodyBytes + * @memberof cosmos.tx.v1beta1.SignDoc + * @instance + */ + SignDoc.prototype.bodyBytes = $util.newBuffer([]); + + /** + * SignDoc authInfoBytes. + * @member {Uint8Array} authInfoBytes + * @memberof cosmos.tx.v1beta1.SignDoc + * @instance + */ + SignDoc.prototype.authInfoBytes = $util.newBuffer([]); + + /** + * SignDoc chainId. + * @member {string} chainId + * @memberof cosmos.tx.v1beta1.SignDoc + * @instance + */ + SignDoc.prototype.chainId = ""; + + /** + * SignDoc accountNumber. + * @member {number|Long} accountNumber + * @memberof cosmos.tx.v1beta1.SignDoc + * @instance + */ + SignDoc.prototype.accountNumber = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new SignDoc instance using the specified properties. + * @function create + * @memberof cosmos.tx.v1beta1.SignDoc + * @static + * @param {cosmos.tx.v1beta1.ISignDoc=} [properties] Properties to set + * @returns {cosmos.tx.v1beta1.SignDoc} SignDoc instance + */ + SignDoc.create = function create(properties) { + return new SignDoc(properties); + }; + + /** + * Encodes the specified SignDoc message. Does not implicitly {@link cosmos.tx.v1beta1.SignDoc.verify|verify} messages. + * @function encode + * @memberof cosmos.tx.v1beta1.SignDoc + * @static + * @param {cosmos.tx.v1beta1.ISignDoc} message SignDoc message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SignDoc.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.bodyBytes != null && Object.hasOwnProperty.call(message, "bodyBytes")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.bodyBytes); + if (message.authInfoBytes != null && Object.hasOwnProperty.call(message, "authInfoBytes")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.authInfoBytes); + if (message.chainId != null && Object.hasOwnProperty.call(message, "chainId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.chainId); + if (message.accountNumber != null && Object.hasOwnProperty.call(message, "accountNumber")) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.accountNumber); + return writer; + }; + + /** + * Encodes the specified SignDoc message, length delimited. Does not implicitly {@link cosmos.tx.v1beta1.SignDoc.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.tx.v1beta1.SignDoc + * @static + * @param {cosmos.tx.v1beta1.ISignDoc} message SignDoc message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SignDoc.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SignDoc message from the specified reader or buffer. + * @function decode + * @memberof cosmos.tx.v1beta1.SignDoc + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.tx.v1beta1.SignDoc} SignDoc + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SignDoc.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.tx.v1beta1.SignDoc(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.bodyBytes = reader.bytes(); + break; + case 2: + message.authInfoBytes = reader.bytes(); + break; + case 3: + message.chainId = reader.string(); + break; + case 4: + message.accountNumber = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SignDoc message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.tx.v1beta1.SignDoc + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.tx.v1beta1.SignDoc} SignDoc + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SignDoc.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SignDoc message. + * @function verify + * @memberof cosmos.tx.v1beta1.SignDoc + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SignDoc.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.bodyBytes != null && message.hasOwnProperty("bodyBytes")) + if (!(message.bodyBytes && typeof message.bodyBytes.length === "number" || $util.isString(message.bodyBytes))) + return "bodyBytes: buffer expected"; + if (message.authInfoBytes != null && message.hasOwnProperty("authInfoBytes")) + if (!(message.authInfoBytes && typeof message.authInfoBytes.length === "number" || $util.isString(message.authInfoBytes))) + return "authInfoBytes: buffer expected"; + if (message.chainId != null && message.hasOwnProperty("chainId")) + if (!$util.isString(message.chainId)) + return "chainId: string expected"; + if (message.accountNumber != null && message.hasOwnProperty("accountNumber")) + if (!$util.isInteger(message.accountNumber) && !(message.accountNumber && $util.isInteger(message.accountNumber.low) && $util.isInteger(message.accountNumber.high))) + return "accountNumber: integer|Long expected"; + return null; + }; + + /** + * Creates a SignDoc message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.tx.v1beta1.SignDoc + * @static + * @param {Object.} object Plain object + * @returns {cosmos.tx.v1beta1.SignDoc} SignDoc + */ + SignDoc.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.tx.v1beta1.SignDoc) + return object; + var message = new $root.cosmos.tx.v1beta1.SignDoc(); + if (object.bodyBytes != null) + if (typeof object.bodyBytes === "string") + $util.base64.decode(object.bodyBytes, message.bodyBytes = $util.newBuffer($util.base64.length(object.bodyBytes)), 0); + else if (object.bodyBytes.length) + message.bodyBytes = object.bodyBytes; + if (object.authInfoBytes != null) + if (typeof object.authInfoBytes === "string") + $util.base64.decode(object.authInfoBytes, message.authInfoBytes = $util.newBuffer($util.base64.length(object.authInfoBytes)), 0); + else if (object.authInfoBytes.length) + message.authInfoBytes = object.authInfoBytes; + if (object.chainId != null) + message.chainId = String(object.chainId); + if (object.accountNumber != null) + if ($util.Long) + (message.accountNumber = $util.Long.fromValue(object.accountNumber)).unsigned = true; + else if (typeof object.accountNumber === "string") + message.accountNumber = parseInt(object.accountNumber, 10); + else if (typeof object.accountNumber === "number") + message.accountNumber = object.accountNumber; + else if (typeof object.accountNumber === "object") + message.accountNumber = new $util.LongBits(object.accountNumber.low >>> 0, object.accountNumber.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a SignDoc message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.tx.v1beta1.SignDoc + * @static + * @param {cosmos.tx.v1beta1.SignDoc} message SignDoc + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SignDoc.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.bodyBytes = ""; + else { + object.bodyBytes = []; + if (options.bytes !== Array) + object.bodyBytes = $util.newBuffer(object.bodyBytes); + } + if (options.bytes === String) + object.authInfoBytes = ""; + else { + object.authInfoBytes = []; + if (options.bytes !== Array) + object.authInfoBytes = $util.newBuffer(object.authInfoBytes); + } + object.chainId = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.accountNumber = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.accountNumber = options.longs === String ? "0" : 0; + } + if (message.bodyBytes != null && message.hasOwnProperty("bodyBytes")) + object.bodyBytes = options.bytes === String ? $util.base64.encode(message.bodyBytes, 0, message.bodyBytes.length) : options.bytes === Array ? Array.prototype.slice.call(message.bodyBytes) : message.bodyBytes; + if (message.authInfoBytes != null && message.hasOwnProperty("authInfoBytes")) + object.authInfoBytes = options.bytes === String ? $util.base64.encode(message.authInfoBytes, 0, message.authInfoBytes.length) : options.bytes === Array ? Array.prototype.slice.call(message.authInfoBytes) : message.authInfoBytes; + if (message.chainId != null && message.hasOwnProperty("chainId")) + object.chainId = message.chainId; + if (message.accountNumber != null && message.hasOwnProperty("accountNumber")) + if (typeof message.accountNumber === "number") + object.accountNumber = options.longs === String ? String(message.accountNumber) : message.accountNumber; + else + object.accountNumber = options.longs === String ? $util.Long.prototype.toString.call(message.accountNumber) : options.longs === Number ? new $util.LongBits(message.accountNumber.low >>> 0, message.accountNumber.high >>> 0).toNumber(true) : message.accountNumber; + return object; + }; + + /** + * Converts this SignDoc to JSON. + * @function toJSON + * @memberof cosmos.tx.v1beta1.SignDoc + * @instance + * @returns {Object.} JSON object + */ + SignDoc.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SignDoc; + })(v1beta1.SignDoc || {}); + + v1beta1.TxBody = (function(TxBody) { + + /** + * Properties of a TxBody. + * @memberof cosmos.tx.v1beta1 + * @interface ITxBody + * @property {Array.|null} [messages] TxBody messages + * @property {string|null} [memo] TxBody memo + * @property {number|Long|null} [timeoutHeight] TxBody timeoutHeight + * @property {Array.|null} [extensionOptions] TxBody extensionOptions + * @property {Array.|null} [nonCriticalExtensionOptions] TxBody nonCriticalExtensionOptions + */ + + /** + * Constructs a new TxBody. + * @memberof cosmos.tx.v1beta1 + * @classdesc Represents a TxBody. + * @implements ITxBody + * @constructor + * @param {cosmos.tx.v1beta1.ITxBody=} [properties] Properties to set + */ + function TxBody(properties) { + this.messages = []; + this.extensionOptions = []; + this.nonCriticalExtensionOptions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TxBody messages. + * @member {Array.} messages + * @memberof cosmos.tx.v1beta1.TxBody + * @instance + */ + TxBody.prototype.messages = $util.emptyArray; + + /** + * TxBody memo. + * @member {string} memo + * @memberof cosmos.tx.v1beta1.TxBody + * @instance + */ + TxBody.prototype.memo = ""; + + /** + * TxBody timeoutHeight. + * @member {number|Long} timeoutHeight + * @memberof cosmos.tx.v1beta1.TxBody + * @instance + */ + TxBody.prototype.timeoutHeight = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * TxBody extensionOptions. + * @member {Array.} extensionOptions + * @memberof cosmos.tx.v1beta1.TxBody + * @instance + */ + TxBody.prototype.extensionOptions = $util.emptyArray; + + /** + * TxBody nonCriticalExtensionOptions. + * @member {Array.} nonCriticalExtensionOptions + * @memberof cosmos.tx.v1beta1.TxBody + * @instance + */ + TxBody.prototype.nonCriticalExtensionOptions = $util.emptyArray; + + /** + * Creates a new TxBody instance using the specified properties. + * @function create + * @memberof cosmos.tx.v1beta1.TxBody + * @static + * @param {cosmos.tx.v1beta1.ITxBody=} [properties] Properties to set + * @returns {cosmos.tx.v1beta1.TxBody} TxBody instance + */ + TxBody.create = function create(properties) { + return new TxBody(properties); + }; + + /** + * Encodes the specified TxBody message. Does not implicitly {@link cosmos.tx.v1beta1.TxBody.verify|verify} messages. + * @function encode + * @memberof cosmos.tx.v1beta1.TxBody + * @static + * @param {cosmos.tx.v1beta1.ITxBody} message TxBody message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TxBody.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.messages != null && message.messages.length) + for (var i = 0; i < message.messages.length; ++i) + $root.google.protobuf.Any.encode(message.messages[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.memo != null && Object.hasOwnProperty.call(message, "memo")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.memo); + if (message.timeoutHeight != null && Object.hasOwnProperty.call(message, "timeoutHeight")) + writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.timeoutHeight); + if (message.extensionOptions != null && message.extensionOptions.length) + for (var i = 0; i < message.extensionOptions.length; ++i) + $root.google.protobuf.Any.encode(message.extensionOptions[i], writer.uint32(/* id 1023, wireType 2 =*/8186).fork()).ldelim(); + if (message.nonCriticalExtensionOptions != null && message.nonCriticalExtensionOptions.length) + for (var i = 0; i < message.nonCriticalExtensionOptions.length; ++i) + $root.google.protobuf.Any.encode(message.nonCriticalExtensionOptions[i], writer.uint32(/* id 2047, wireType 2 =*/16378).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TxBody message, length delimited. Does not implicitly {@link cosmos.tx.v1beta1.TxBody.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.tx.v1beta1.TxBody + * @static + * @param {cosmos.tx.v1beta1.ITxBody} message TxBody message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TxBody.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TxBody message from the specified reader or buffer. + * @function decode + * @memberof cosmos.tx.v1beta1.TxBody + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.tx.v1beta1.TxBody} TxBody + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TxBody.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.tx.v1beta1.TxBody(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.messages && message.messages.length)) + message.messages = []; + message.messages.push($root.google.protobuf.Any.decode(reader, reader.uint32())); + break; + case 2: + message.memo = reader.string(); + break; + case 3: + message.timeoutHeight = reader.uint64(); + break; + case 1023: + if (!(message.extensionOptions && message.extensionOptions.length)) + message.extensionOptions = []; + message.extensionOptions.push($root.google.protobuf.Any.decode(reader, reader.uint32())); + break; + case 2047: + if (!(message.nonCriticalExtensionOptions && message.nonCriticalExtensionOptions.length)) + message.nonCriticalExtensionOptions = []; + message.nonCriticalExtensionOptions.push($root.google.protobuf.Any.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TxBody message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.tx.v1beta1.TxBody + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.tx.v1beta1.TxBody} TxBody + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TxBody.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TxBody message. + * @function verify + * @memberof cosmos.tx.v1beta1.TxBody + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TxBody.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.messages != null && message.hasOwnProperty("messages")) { + if (!Array.isArray(message.messages)) + return "messages: array expected"; + for (var i = 0; i < message.messages.length; ++i) { + var error = $root.google.protobuf.Any.verify(message.messages[i]); + if (error) + return "messages." + error; + } + } + if (message.memo != null && message.hasOwnProperty("memo")) + if (!$util.isString(message.memo)) + return "memo: string expected"; + if (message.timeoutHeight != null && message.hasOwnProperty("timeoutHeight")) + if (!$util.isInteger(message.timeoutHeight) && !(message.timeoutHeight && $util.isInteger(message.timeoutHeight.low) && $util.isInteger(message.timeoutHeight.high))) + return "timeoutHeight: integer|Long expected"; + if (message.extensionOptions != null && message.hasOwnProperty("extensionOptions")) { + if (!Array.isArray(message.extensionOptions)) + return "extensionOptions: array expected"; + for (var i = 0; i < message.extensionOptions.length; ++i) { + var error = $root.google.protobuf.Any.verify(message.extensionOptions[i]); + if (error) + return "extensionOptions." + error; + } + } + if (message.nonCriticalExtensionOptions != null && message.hasOwnProperty("nonCriticalExtensionOptions")) { + if (!Array.isArray(message.nonCriticalExtensionOptions)) + return "nonCriticalExtensionOptions: array expected"; + for (var i = 0; i < message.nonCriticalExtensionOptions.length; ++i) { + var error = $root.google.protobuf.Any.verify(message.nonCriticalExtensionOptions[i]); + if (error) + return "nonCriticalExtensionOptions." + error; + } + } + return null; + }; + + /** + * Creates a TxBody message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.tx.v1beta1.TxBody + * @static + * @param {Object.} object Plain object + * @returns {cosmos.tx.v1beta1.TxBody} TxBody + */ + TxBody.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.tx.v1beta1.TxBody) + return object; + var message = new $root.cosmos.tx.v1beta1.TxBody(); + if (object.messages) { + if (!Array.isArray(object.messages)) + throw TypeError(".cosmos.tx.v1beta1.TxBody.messages: array expected"); + message.messages = []; + for (var i = 0; i < object.messages.length; ++i) { + if (typeof object.messages[i] !== "object") + throw TypeError(".cosmos.tx.v1beta1.TxBody.messages: object expected"); + message.messages[i] = $root.google.protobuf.Any.fromObject(object.messages[i]); + } + } + if (object.memo != null) + message.memo = String(object.memo); + if (object.timeoutHeight != null) + if ($util.Long) + (message.timeoutHeight = $util.Long.fromValue(object.timeoutHeight)).unsigned = true; + else if (typeof object.timeoutHeight === "string") + message.timeoutHeight = parseInt(object.timeoutHeight, 10); + else if (typeof object.timeoutHeight === "number") + message.timeoutHeight = object.timeoutHeight; + else if (typeof object.timeoutHeight === "object") + message.timeoutHeight = new $util.LongBits(object.timeoutHeight.low >>> 0, object.timeoutHeight.high >>> 0).toNumber(true); + if (object.extensionOptions) { + if (!Array.isArray(object.extensionOptions)) + throw TypeError(".cosmos.tx.v1beta1.TxBody.extensionOptions: array expected"); + message.extensionOptions = []; + for (var i = 0; i < object.extensionOptions.length; ++i) { + if (typeof object.extensionOptions[i] !== "object") + throw TypeError(".cosmos.tx.v1beta1.TxBody.extensionOptions: object expected"); + message.extensionOptions[i] = $root.google.protobuf.Any.fromObject(object.extensionOptions[i]); + } + } + if (object.nonCriticalExtensionOptions) { + if (!Array.isArray(object.nonCriticalExtensionOptions)) + throw TypeError(".cosmos.tx.v1beta1.TxBody.nonCriticalExtensionOptions: array expected"); + message.nonCriticalExtensionOptions = []; + for (var i = 0; i < object.nonCriticalExtensionOptions.length; ++i) { + if (typeof object.nonCriticalExtensionOptions[i] !== "object") + throw TypeError(".cosmos.tx.v1beta1.TxBody.nonCriticalExtensionOptions: object expected"); + message.nonCriticalExtensionOptions[i] = $root.google.protobuf.Any.fromObject(object.nonCriticalExtensionOptions[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a TxBody message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.tx.v1beta1.TxBody + * @static + * @param {cosmos.tx.v1beta1.TxBody} message TxBody + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TxBody.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.messages = []; + object.extensionOptions = []; + object.nonCriticalExtensionOptions = []; + } + if (options.defaults) { + object.memo = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.timeoutHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.timeoutHeight = options.longs === String ? "0" : 0; + } + if (message.messages && message.messages.length) { + object.messages = []; + for (var j = 0; j < message.messages.length; ++j) + object.messages[j] = $root.google.protobuf.Any.toObject(message.messages[j], options); + } + if (message.memo != null && message.hasOwnProperty("memo")) + object.memo = message.memo; + if (message.timeoutHeight != null && message.hasOwnProperty("timeoutHeight")) + if (typeof message.timeoutHeight === "number") + object.timeoutHeight = options.longs === String ? String(message.timeoutHeight) : message.timeoutHeight; + else + object.timeoutHeight = options.longs === String ? $util.Long.prototype.toString.call(message.timeoutHeight) : options.longs === Number ? new $util.LongBits(message.timeoutHeight.low >>> 0, message.timeoutHeight.high >>> 0).toNumber(true) : message.timeoutHeight; + if (message.extensionOptions && message.extensionOptions.length) { + object.extensionOptions = []; + for (var j = 0; j < message.extensionOptions.length; ++j) + object.extensionOptions[j] = $root.google.protobuf.Any.toObject(message.extensionOptions[j], options); + } + if (message.nonCriticalExtensionOptions && message.nonCriticalExtensionOptions.length) { + object.nonCriticalExtensionOptions = []; + for (var j = 0; j < message.nonCriticalExtensionOptions.length; ++j) + object.nonCriticalExtensionOptions[j] = $root.google.protobuf.Any.toObject(message.nonCriticalExtensionOptions[j], options); + } + return object; + }; + + /** + * Converts this TxBody to JSON. + * @function toJSON + * @memberof cosmos.tx.v1beta1.TxBody + * @instance + * @returns {Object.} JSON object + */ + TxBody.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TxBody; + })(v1beta1.TxBody || {}); + + v1beta1.AuthInfo = (function(AuthInfo) { + + /** + * Properties of an AuthInfo. + * @memberof cosmos.tx.v1beta1 + * @interface IAuthInfo + * @property {Array.|null} [signerInfos] AuthInfo signerInfos + * @property {cosmos.tx.v1beta1.IFee|null} [fee] AuthInfo fee + */ + + /** + * Constructs a new AuthInfo. + * @memberof cosmos.tx.v1beta1 + * @classdesc Represents an AuthInfo. + * @implements IAuthInfo + * @constructor + * @param {cosmos.tx.v1beta1.IAuthInfo=} [properties] Properties to set + */ + function AuthInfo(properties) { + this.signerInfos = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AuthInfo signerInfos. + * @member {Array.} signerInfos + * @memberof cosmos.tx.v1beta1.AuthInfo + * @instance + */ + AuthInfo.prototype.signerInfos = $util.emptyArray; + + /** + * AuthInfo fee. + * @member {cosmos.tx.v1beta1.IFee|null|undefined} fee + * @memberof cosmos.tx.v1beta1.AuthInfo + * @instance + */ + AuthInfo.prototype.fee = null; + + /** + * Creates a new AuthInfo instance using the specified properties. + * @function create + * @memberof cosmos.tx.v1beta1.AuthInfo + * @static + * @param {cosmos.tx.v1beta1.IAuthInfo=} [properties] Properties to set + * @returns {cosmos.tx.v1beta1.AuthInfo} AuthInfo instance + */ + AuthInfo.create = function create(properties) { + return new AuthInfo(properties); + }; + + /** + * Encodes the specified AuthInfo message. Does not implicitly {@link cosmos.tx.v1beta1.AuthInfo.verify|verify} messages. + * @function encode + * @memberof cosmos.tx.v1beta1.AuthInfo + * @static + * @param {cosmos.tx.v1beta1.IAuthInfo} message AuthInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuthInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.signerInfos != null && message.signerInfos.length) + for (var i = 0; i < message.signerInfos.length; ++i) + $root.cosmos.tx.v1beta1.SignerInfo.encode(message.signerInfos[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.fee != null && Object.hasOwnProperty.call(message, "fee")) + $root.cosmos.tx.v1beta1.Fee.encode(message.fee, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AuthInfo message, length delimited. Does not implicitly {@link cosmos.tx.v1beta1.AuthInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.tx.v1beta1.AuthInfo + * @static + * @param {cosmos.tx.v1beta1.IAuthInfo} message AuthInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuthInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AuthInfo message from the specified reader or buffer. + * @function decode + * @memberof cosmos.tx.v1beta1.AuthInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.tx.v1beta1.AuthInfo} AuthInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuthInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.tx.v1beta1.AuthInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.signerInfos && message.signerInfos.length)) + message.signerInfos = []; + message.signerInfos.push($root.cosmos.tx.v1beta1.SignerInfo.decode(reader, reader.uint32())); + break; + case 2: + message.fee = $root.cosmos.tx.v1beta1.Fee.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AuthInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.tx.v1beta1.AuthInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.tx.v1beta1.AuthInfo} AuthInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuthInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AuthInfo message. + * @function verify + * @memberof cosmos.tx.v1beta1.AuthInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AuthInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.signerInfos != null && message.hasOwnProperty("signerInfos")) { + if (!Array.isArray(message.signerInfos)) + return "signerInfos: array expected"; + for (var i = 0; i < message.signerInfos.length; ++i) { + var error = $root.cosmos.tx.v1beta1.SignerInfo.verify(message.signerInfos[i]); + if (error) + return "signerInfos." + error; + } + } + if (message.fee != null && message.hasOwnProperty("fee")) { + var error = $root.cosmos.tx.v1beta1.Fee.verify(message.fee); + if (error) + return "fee." + error; + } + return null; + }; + + /** + * Creates an AuthInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.tx.v1beta1.AuthInfo + * @static + * @param {Object.} object Plain object + * @returns {cosmos.tx.v1beta1.AuthInfo} AuthInfo + */ + AuthInfo.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.tx.v1beta1.AuthInfo) + return object; + var message = new $root.cosmos.tx.v1beta1.AuthInfo(); + if (object.signerInfos) { + if (!Array.isArray(object.signerInfos)) + throw TypeError(".cosmos.tx.v1beta1.AuthInfo.signerInfos: array expected"); + message.signerInfos = []; + for (var i = 0; i < object.signerInfos.length; ++i) { + if (typeof object.signerInfos[i] !== "object") + throw TypeError(".cosmos.tx.v1beta1.AuthInfo.signerInfos: object expected"); + message.signerInfos[i] = $root.cosmos.tx.v1beta1.SignerInfo.fromObject(object.signerInfos[i]); + } + } + if (object.fee != null) { + if (typeof object.fee !== "object") + throw TypeError(".cosmos.tx.v1beta1.AuthInfo.fee: object expected"); + message.fee = $root.cosmos.tx.v1beta1.Fee.fromObject(object.fee); + } + return message; + }; + + /** + * Creates a plain object from an AuthInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.tx.v1beta1.AuthInfo + * @static + * @param {cosmos.tx.v1beta1.AuthInfo} message AuthInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AuthInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.signerInfos = []; + if (options.defaults) + object.fee = null; + if (message.signerInfos && message.signerInfos.length) { + object.signerInfos = []; + for (var j = 0; j < message.signerInfos.length; ++j) + object.signerInfos[j] = $root.cosmos.tx.v1beta1.SignerInfo.toObject(message.signerInfos[j], options); + } + if (message.fee != null && message.hasOwnProperty("fee")) + object.fee = $root.cosmos.tx.v1beta1.Fee.toObject(message.fee, options); + return object; + }; + + /** + * Converts this AuthInfo to JSON. + * @function toJSON + * @memberof cosmos.tx.v1beta1.AuthInfo + * @instance + * @returns {Object.} JSON object + */ + AuthInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return AuthInfo; + })(v1beta1.AuthInfo || {}); + + v1beta1.SignerInfo = (function(SignerInfo) { + + /** + * Properties of a SignerInfo. + * @memberof cosmos.tx.v1beta1 + * @interface ISignerInfo + * @property {google.protobuf.IAny|null} [publicKey] SignerInfo publicKey + * @property {cosmos.tx.v1beta1.IModeInfo|null} [modeInfo] SignerInfo modeInfo + * @property {number|Long|null} [sequence] SignerInfo sequence + */ + + /** + * Constructs a new SignerInfo. + * @memberof cosmos.tx.v1beta1 + * @classdesc Represents a SignerInfo. + * @implements ISignerInfo + * @constructor + * @param {cosmos.tx.v1beta1.ISignerInfo=} [properties] Properties to set + */ + function SignerInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SignerInfo publicKey. + * @member {google.protobuf.IAny|null|undefined} publicKey + * @memberof cosmos.tx.v1beta1.SignerInfo + * @instance + */ + SignerInfo.prototype.publicKey = null; + + /** + * SignerInfo modeInfo. + * @member {cosmos.tx.v1beta1.IModeInfo|null|undefined} modeInfo + * @memberof cosmos.tx.v1beta1.SignerInfo + * @instance + */ + SignerInfo.prototype.modeInfo = null; + + /** + * SignerInfo sequence. + * @member {number|Long} sequence + * @memberof cosmos.tx.v1beta1.SignerInfo + * @instance + */ + SignerInfo.prototype.sequence = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new SignerInfo instance using the specified properties. + * @function create + * @memberof cosmos.tx.v1beta1.SignerInfo + * @static + * @param {cosmos.tx.v1beta1.ISignerInfo=} [properties] Properties to set + * @returns {cosmos.tx.v1beta1.SignerInfo} SignerInfo instance + */ + SignerInfo.create = function create(properties) { + return new SignerInfo(properties); + }; + + /** + * Encodes the specified SignerInfo message. Does not implicitly {@link cosmos.tx.v1beta1.SignerInfo.verify|verify} messages. + * @function encode + * @memberof cosmos.tx.v1beta1.SignerInfo + * @static + * @param {cosmos.tx.v1beta1.ISignerInfo} message SignerInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SignerInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.publicKey != null && Object.hasOwnProperty.call(message, "publicKey")) + $root.google.protobuf.Any.encode(message.publicKey, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.modeInfo != null && Object.hasOwnProperty.call(message, "modeInfo")) + $root.cosmos.tx.v1beta1.ModeInfo.encode(message.modeInfo, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.sequence != null && Object.hasOwnProperty.call(message, "sequence")) + writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.sequence); + return writer; + }; + + /** + * Encodes the specified SignerInfo message, length delimited. Does not implicitly {@link cosmos.tx.v1beta1.SignerInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.tx.v1beta1.SignerInfo + * @static + * @param {cosmos.tx.v1beta1.ISignerInfo} message SignerInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SignerInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SignerInfo message from the specified reader or buffer. + * @function decode + * @memberof cosmos.tx.v1beta1.SignerInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.tx.v1beta1.SignerInfo} SignerInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SignerInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.tx.v1beta1.SignerInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.publicKey = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + case 2: + message.modeInfo = $root.cosmos.tx.v1beta1.ModeInfo.decode(reader, reader.uint32()); + break; + case 3: + message.sequence = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SignerInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.tx.v1beta1.SignerInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.tx.v1beta1.SignerInfo} SignerInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SignerInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SignerInfo message. + * @function verify + * @memberof cosmos.tx.v1beta1.SignerInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SignerInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.publicKey != null && message.hasOwnProperty("publicKey")) { + var error = $root.google.protobuf.Any.verify(message.publicKey); + if (error) + return "publicKey." + error; + } + if (message.modeInfo != null && message.hasOwnProperty("modeInfo")) { + var error = $root.cosmos.tx.v1beta1.ModeInfo.verify(message.modeInfo); + if (error) + return "modeInfo." + error; + } + if (message.sequence != null && message.hasOwnProperty("sequence")) + if (!$util.isInteger(message.sequence) && !(message.sequence && $util.isInteger(message.sequence.low) && $util.isInteger(message.sequence.high))) + return "sequence: integer|Long expected"; + return null; + }; + + /** + * Creates a SignerInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.tx.v1beta1.SignerInfo + * @static + * @param {Object.} object Plain object + * @returns {cosmos.tx.v1beta1.SignerInfo} SignerInfo + */ + SignerInfo.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.tx.v1beta1.SignerInfo) + return object; + var message = new $root.cosmos.tx.v1beta1.SignerInfo(); + if (object.publicKey != null) { + if (typeof object.publicKey !== "object") + throw TypeError(".cosmos.tx.v1beta1.SignerInfo.publicKey: object expected"); + message.publicKey = $root.google.protobuf.Any.fromObject(object.publicKey); + } + if (object.modeInfo != null) { + if (typeof object.modeInfo !== "object") + throw TypeError(".cosmos.tx.v1beta1.SignerInfo.modeInfo: object expected"); + message.modeInfo = $root.cosmos.tx.v1beta1.ModeInfo.fromObject(object.modeInfo); + } + if (object.sequence != null) + if ($util.Long) + (message.sequence = $util.Long.fromValue(object.sequence)).unsigned = true; + else if (typeof object.sequence === "string") + message.sequence = parseInt(object.sequence, 10); + else if (typeof object.sequence === "number") + message.sequence = object.sequence; + else if (typeof object.sequence === "object") + message.sequence = new $util.LongBits(object.sequence.low >>> 0, object.sequence.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a SignerInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.tx.v1beta1.SignerInfo + * @static + * @param {cosmos.tx.v1beta1.SignerInfo} message SignerInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SignerInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.publicKey = null; + object.modeInfo = null; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.sequence = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.sequence = options.longs === String ? "0" : 0; + } + if (message.publicKey != null && message.hasOwnProperty("publicKey")) + object.publicKey = $root.google.protobuf.Any.toObject(message.publicKey, options); + if (message.modeInfo != null && message.hasOwnProperty("modeInfo")) + object.modeInfo = $root.cosmos.tx.v1beta1.ModeInfo.toObject(message.modeInfo, options); + if (message.sequence != null && message.hasOwnProperty("sequence")) + if (typeof message.sequence === "number") + object.sequence = options.longs === String ? String(message.sequence) : message.sequence; + else + object.sequence = options.longs === String ? $util.Long.prototype.toString.call(message.sequence) : options.longs === Number ? new $util.LongBits(message.sequence.low >>> 0, message.sequence.high >>> 0).toNumber(true) : message.sequence; + return object; + }; + + /** + * Converts this SignerInfo to JSON. + * @function toJSON + * @memberof cosmos.tx.v1beta1.SignerInfo + * @instance + * @returns {Object.} JSON object + */ + SignerInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SignerInfo; + })(v1beta1.SignerInfo || {}); + + v1beta1.ModeInfo = (function(ModeInfo) { + + /** + * Properties of a ModeInfo. + * @memberof cosmos.tx.v1beta1 + * @interface IModeInfo + * @property {cosmos.tx.v1beta1.ModeInfo.ISingle|null} [single] ModeInfo single + * @property {cosmos.tx.v1beta1.ModeInfo.IMulti|null} [multi] ModeInfo multi + */ + + /** + * Constructs a new ModeInfo. + * @memberof cosmos.tx.v1beta1 + * @classdesc Represents a ModeInfo. + * @implements IModeInfo + * @constructor + * @param {cosmos.tx.v1beta1.IModeInfo=} [properties] Properties to set + */ + function ModeInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ModeInfo single. + * @member {cosmos.tx.v1beta1.ModeInfo.ISingle|null|undefined} single + * @memberof cosmos.tx.v1beta1.ModeInfo + * @instance + */ + ModeInfo.prototype.single = null; + + /** + * ModeInfo multi. + * @member {cosmos.tx.v1beta1.ModeInfo.IMulti|null|undefined} multi + * @memberof cosmos.tx.v1beta1.ModeInfo + * @instance + */ + ModeInfo.prototype.multi = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ModeInfo sum. + * @member {"single"|"multi"|undefined} sum + * @memberof cosmos.tx.v1beta1.ModeInfo + * @instance + */ + Object.defineProperty(ModeInfo.prototype, "sum", { + get: $util.oneOfGetter($oneOfFields = ["single", "multi"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ModeInfo instance using the specified properties. + * @function create + * @memberof cosmos.tx.v1beta1.ModeInfo + * @static + * @param {cosmos.tx.v1beta1.IModeInfo=} [properties] Properties to set + * @returns {cosmos.tx.v1beta1.ModeInfo} ModeInfo instance + */ + ModeInfo.create = function create(properties) { + return new ModeInfo(properties); + }; + + /** + * Encodes the specified ModeInfo message. Does not implicitly {@link cosmos.tx.v1beta1.ModeInfo.verify|verify} messages. + * @function encode + * @memberof cosmos.tx.v1beta1.ModeInfo + * @static + * @param {cosmos.tx.v1beta1.IModeInfo} message ModeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ModeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.single != null && Object.hasOwnProperty.call(message, "single")) + $root.cosmos.tx.v1beta1.ModeInfo.Single.encode(message.single, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.multi != null && Object.hasOwnProperty.call(message, "multi")) + $root.cosmos.tx.v1beta1.ModeInfo.Multi.encode(message.multi, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ModeInfo message, length delimited. Does not implicitly {@link cosmos.tx.v1beta1.ModeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.tx.v1beta1.ModeInfo + * @static + * @param {cosmos.tx.v1beta1.IModeInfo} message ModeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ModeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ModeInfo message from the specified reader or buffer. + * @function decode + * @memberof cosmos.tx.v1beta1.ModeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.tx.v1beta1.ModeInfo} ModeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ModeInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.tx.v1beta1.ModeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.single = $root.cosmos.tx.v1beta1.ModeInfo.Single.decode(reader, reader.uint32()); + break; + case 2: + message.multi = $root.cosmos.tx.v1beta1.ModeInfo.Multi.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ModeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.tx.v1beta1.ModeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.tx.v1beta1.ModeInfo} ModeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ModeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ModeInfo message. + * @function verify + * @memberof cosmos.tx.v1beta1.ModeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ModeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.single != null && message.hasOwnProperty("single")) { + properties.sum = 1; + { + var error = $root.cosmos.tx.v1beta1.ModeInfo.Single.verify(message.single); + if (error) + return "single." + error; + } + } + if (message.multi != null && message.hasOwnProperty("multi")) { + if (properties.sum === 1) + return "sum: multiple values"; + properties.sum = 1; + { + var error = $root.cosmos.tx.v1beta1.ModeInfo.Multi.verify(message.multi); + if (error) + return "multi." + error; + } + } + return null; + }; + + /** + * Creates a ModeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.tx.v1beta1.ModeInfo + * @static + * @param {Object.} object Plain object + * @returns {cosmos.tx.v1beta1.ModeInfo} ModeInfo + */ + ModeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.tx.v1beta1.ModeInfo) + return object; + var message = new $root.cosmos.tx.v1beta1.ModeInfo(); + if (object.single != null) { + if (typeof object.single !== "object") + throw TypeError(".cosmos.tx.v1beta1.ModeInfo.single: object expected"); + message.single = $root.cosmos.tx.v1beta1.ModeInfo.Single.fromObject(object.single); + } + if (object.multi != null) { + if (typeof object.multi !== "object") + throw TypeError(".cosmos.tx.v1beta1.ModeInfo.multi: object expected"); + message.multi = $root.cosmos.tx.v1beta1.ModeInfo.Multi.fromObject(object.multi); + } + return message; + }; + + /** + * Creates a plain object from a ModeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.tx.v1beta1.ModeInfo + * @static + * @param {cosmos.tx.v1beta1.ModeInfo} message ModeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ModeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.single != null && message.hasOwnProperty("single")) { + object.single = $root.cosmos.tx.v1beta1.ModeInfo.Single.toObject(message.single, options); + if (options.oneofs) + object.sum = "single"; + } + if (message.multi != null && message.hasOwnProperty("multi")) { + object.multi = $root.cosmos.tx.v1beta1.ModeInfo.Multi.toObject(message.multi, options); + if (options.oneofs) + object.sum = "multi"; + } + return object; + }; + + /** + * Converts this ModeInfo to JSON. + * @function toJSON + * @memberof cosmos.tx.v1beta1.ModeInfo + * @instance + * @returns {Object.} JSON object + */ + ModeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + ModeInfo.Single = (function(Single) { + + /** + * Properties of a Single. + * @memberof cosmos.tx.v1beta1.ModeInfo + * @interface ISingle + * @property {cosmos.tx.signing.v1beta1.SignMode|null} [mode] Single mode + */ + + /** + * Constructs a new Single. + * @memberof cosmos.tx.v1beta1.ModeInfo + * @classdesc Represents a Single. + * @implements ISingle + * @constructor + * @param {cosmos.tx.v1beta1.ModeInfo.ISingle=} [properties] Properties to set + */ + function Single(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Single mode. + * @member {cosmos.tx.signing.v1beta1.SignMode} mode + * @memberof cosmos.tx.v1beta1.ModeInfo.Single + * @instance + */ + Single.prototype.mode = 0; + + /** + * Creates a new Single instance using the specified properties. + * @function create + * @memberof cosmos.tx.v1beta1.ModeInfo.Single + * @static + * @param {cosmos.tx.v1beta1.ModeInfo.ISingle=} [properties] Properties to set + * @returns {cosmos.tx.v1beta1.ModeInfo.Single} Single instance + */ + Single.create = function create(properties) { + return new Single(properties); + }; + + /** + * Encodes the specified Single message. Does not implicitly {@link cosmos.tx.v1beta1.ModeInfo.Single.verify|verify} messages. + * @function encode + * @memberof cosmos.tx.v1beta1.ModeInfo.Single + * @static + * @param {cosmos.tx.v1beta1.ModeInfo.ISingle} message Single message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Single.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.mode != null && Object.hasOwnProperty.call(message, "mode")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.mode); + return writer; + }; + + /** + * Encodes the specified Single message, length delimited. Does not implicitly {@link cosmos.tx.v1beta1.ModeInfo.Single.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.tx.v1beta1.ModeInfo.Single + * @static + * @param {cosmos.tx.v1beta1.ModeInfo.ISingle} message Single message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Single.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Single message from the specified reader or buffer. + * @function decode + * @memberof cosmos.tx.v1beta1.ModeInfo.Single + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.tx.v1beta1.ModeInfo.Single} Single + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Single.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.tx.v1beta1.ModeInfo.Single(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.mode = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Single message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.tx.v1beta1.ModeInfo.Single + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.tx.v1beta1.ModeInfo.Single} Single + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Single.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Single message. + * @function verify + * @memberof cosmos.tx.v1beta1.ModeInfo.Single + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Single.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.mode != null && message.hasOwnProperty("mode")) + switch (message.mode) { + default: + return "mode: enum value expected"; + case 0: + case 1: + case 2: + case 127: + break; + } + return null; + }; + + /** + * Creates a Single message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.tx.v1beta1.ModeInfo.Single + * @static + * @param {Object.} object Plain object + * @returns {cosmos.tx.v1beta1.ModeInfo.Single} Single + */ + Single.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.tx.v1beta1.ModeInfo.Single) + return object; + var message = new $root.cosmos.tx.v1beta1.ModeInfo.Single(); + switch (object.mode) { + case "SIGN_MODE_UNSPECIFIED": + case 0: + message.mode = 0; + break; + case "SIGN_MODE_DIRECT": + case 1: + message.mode = 1; + break; + case "SIGN_MODE_TEXTUAL": + case 2: + message.mode = 2; + break; + case "SIGN_MODE_LEGACY_AMINO_JSON": + case 127: + message.mode = 127; + break; + } + return message; + }; + + /** + * Creates a plain object from a Single message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.tx.v1beta1.ModeInfo.Single + * @static + * @param {cosmos.tx.v1beta1.ModeInfo.Single} message Single + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Single.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.mode = options.enums === String ? "SIGN_MODE_UNSPECIFIED" : 0; + if (message.mode != null && message.hasOwnProperty("mode")) + object.mode = options.enums === String ? $root.cosmos.tx.signing.v1beta1.SignMode[message.mode] : message.mode; + return object; + }; + + /** + * Converts this Single to JSON. + * @function toJSON + * @memberof cosmos.tx.v1beta1.ModeInfo.Single + * @instance + * @returns {Object.} JSON object + */ + Single.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Single; + })(ModeInfo.Single || {}); + + ModeInfo.Multi = (function(Multi) { + + /** + * Properties of a Multi. + * @memberof cosmos.tx.v1beta1.ModeInfo + * @interface IMulti + * @property {cosmos.crypto.multisig.v1beta1.ICompactBitArray|null} [bitarray] Multi bitarray + * @property {Array.|null} [modeInfos] Multi modeInfos + */ + + /** + * Constructs a new Multi. + * @memberof cosmos.tx.v1beta1.ModeInfo + * @classdesc Represents a Multi. + * @implements IMulti + * @constructor + * @param {cosmos.tx.v1beta1.ModeInfo.IMulti=} [properties] Properties to set + */ + function Multi(properties) { + this.modeInfos = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Multi bitarray. + * @member {cosmos.crypto.multisig.v1beta1.ICompactBitArray|null|undefined} bitarray + * @memberof cosmos.tx.v1beta1.ModeInfo.Multi + * @instance + */ + Multi.prototype.bitarray = null; + + /** + * Multi modeInfos. + * @member {Array.} modeInfos + * @memberof cosmos.tx.v1beta1.ModeInfo.Multi + * @instance + */ + Multi.prototype.modeInfos = $util.emptyArray; + + /** + * Creates a new Multi instance using the specified properties. + * @function create + * @memberof cosmos.tx.v1beta1.ModeInfo.Multi + * @static + * @param {cosmos.tx.v1beta1.ModeInfo.IMulti=} [properties] Properties to set + * @returns {cosmos.tx.v1beta1.ModeInfo.Multi} Multi instance + */ + Multi.create = function create(properties) { + return new Multi(properties); + }; + + /** + * Encodes the specified Multi message. Does not implicitly {@link cosmos.tx.v1beta1.ModeInfo.Multi.verify|verify} messages. + * @function encode + * @memberof cosmos.tx.v1beta1.ModeInfo.Multi + * @static + * @param {cosmos.tx.v1beta1.ModeInfo.IMulti} message Multi message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Multi.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.bitarray != null && Object.hasOwnProperty.call(message, "bitarray")) + $root.cosmos.crypto.multisig.v1beta1.CompactBitArray.encode(message.bitarray, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.modeInfos != null && message.modeInfos.length) + for (var i = 0; i < message.modeInfos.length; ++i) + $root.cosmos.tx.v1beta1.ModeInfo.encode(message.modeInfos[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Multi message, length delimited. Does not implicitly {@link cosmos.tx.v1beta1.ModeInfo.Multi.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.tx.v1beta1.ModeInfo.Multi + * @static + * @param {cosmos.tx.v1beta1.ModeInfo.IMulti} message Multi message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Multi.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Multi message from the specified reader or buffer. + * @function decode + * @memberof cosmos.tx.v1beta1.ModeInfo.Multi + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.tx.v1beta1.ModeInfo.Multi} Multi + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Multi.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.tx.v1beta1.ModeInfo.Multi(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.bitarray = $root.cosmos.crypto.multisig.v1beta1.CompactBitArray.decode(reader, reader.uint32()); + break; + case 2: + if (!(message.modeInfos && message.modeInfos.length)) + message.modeInfos = []; + message.modeInfos.push($root.cosmos.tx.v1beta1.ModeInfo.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Multi message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.tx.v1beta1.ModeInfo.Multi + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.tx.v1beta1.ModeInfo.Multi} Multi + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Multi.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Multi message. + * @function verify + * @memberof cosmos.tx.v1beta1.ModeInfo.Multi + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Multi.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.bitarray != null && message.hasOwnProperty("bitarray")) { + var error = $root.cosmos.crypto.multisig.v1beta1.CompactBitArray.verify(message.bitarray); + if (error) + return "bitarray." + error; + } + if (message.modeInfos != null && message.hasOwnProperty("modeInfos")) { + if (!Array.isArray(message.modeInfos)) + return "modeInfos: array expected"; + for (var i = 0; i < message.modeInfos.length; ++i) { + var error = $root.cosmos.tx.v1beta1.ModeInfo.verify(message.modeInfos[i]); + if (error) + return "modeInfos." + error; + } + } + return null; + }; + + /** + * Creates a Multi message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.tx.v1beta1.ModeInfo.Multi + * @static + * @param {Object.} object Plain object + * @returns {cosmos.tx.v1beta1.ModeInfo.Multi} Multi + */ + Multi.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.tx.v1beta1.ModeInfo.Multi) + return object; + var message = new $root.cosmos.tx.v1beta1.ModeInfo.Multi(); + if (object.bitarray != null) { + if (typeof object.bitarray !== "object") + throw TypeError(".cosmos.tx.v1beta1.ModeInfo.Multi.bitarray: object expected"); + message.bitarray = $root.cosmos.crypto.multisig.v1beta1.CompactBitArray.fromObject(object.bitarray); + } + if (object.modeInfos) { + if (!Array.isArray(object.modeInfos)) + throw TypeError(".cosmos.tx.v1beta1.ModeInfo.Multi.modeInfos: array expected"); + message.modeInfos = []; + for (var i = 0; i < object.modeInfos.length; ++i) { + if (typeof object.modeInfos[i] !== "object") + throw TypeError(".cosmos.tx.v1beta1.ModeInfo.Multi.modeInfos: object expected"); + message.modeInfos[i] = $root.cosmos.tx.v1beta1.ModeInfo.fromObject(object.modeInfos[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Multi message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.tx.v1beta1.ModeInfo.Multi + * @static + * @param {cosmos.tx.v1beta1.ModeInfo.Multi} message Multi + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Multi.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.modeInfos = []; + if (options.defaults) + object.bitarray = null; + if (message.bitarray != null && message.hasOwnProperty("bitarray")) + object.bitarray = $root.cosmos.crypto.multisig.v1beta1.CompactBitArray.toObject(message.bitarray, options); + if (message.modeInfos && message.modeInfos.length) { + object.modeInfos = []; + for (var j = 0; j < message.modeInfos.length; ++j) + object.modeInfos[j] = $root.cosmos.tx.v1beta1.ModeInfo.toObject(message.modeInfos[j], options); + } + return object; + }; + + /** + * Converts this Multi to JSON. + * @function toJSON + * @memberof cosmos.tx.v1beta1.ModeInfo.Multi + * @instance + * @returns {Object.} JSON object + */ + Multi.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Multi; + })(ModeInfo.Multi || {}); + + return ModeInfo; + })(v1beta1.ModeInfo || {}); + + v1beta1.Fee = (function(Fee) { + + /** + * Properties of a Fee. + * @memberof cosmos.tx.v1beta1 + * @interface IFee + * @property {Array.|null} [amount] Fee amount + * @property {number|Long|null} [gasLimit] Fee gasLimit + * @property {string|null} [payer] Fee payer + * @property {string|null} [granter] Fee granter + */ + + /** + * Constructs a new Fee. + * @memberof cosmos.tx.v1beta1 + * @classdesc Represents a Fee. + * @implements IFee + * @constructor + * @param {cosmos.tx.v1beta1.IFee=} [properties] Properties to set + */ + function Fee(properties) { + this.amount = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Fee amount. + * @member {Array.} amount + * @memberof cosmos.tx.v1beta1.Fee + * @instance + */ + Fee.prototype.amount = $util.emptyArray; + + /** + * Fee gasLimit. + * @member {number|Long} gasLimit + * @memberof cosmos.tx.v1beta1.Fee + * @instance + */ + Fee.prototype.gasLimit = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Fee payer. + * @member {string} payer + * @memberof cosmos.tx.v1beta1.Fee + * @instance + */ + Fee.prototype.payer = ""; + + /** + * Fee granter. + * @member {string} granter + * @memberof cosmos.tx.v1beta1.Fee + * @instance + */ + Fee.prototype.granter = ""; + + /** + * Creates a new Fee instance using the specified properties. + * @function create + * @memberof cosmos.tx.v1beta1.Fee + * @static + * @param {cosmos.tx.v1beta1.IFee=} [properties] Properties to set + * @returns {cosmos.tx.v1beta1.Fee} Fee instance + */ + Fee.create = function create(properties) { + return new Fee(properties); + }; + + /** + * Encodes the specified Fee message. Does not implicitly {@link cosmos.tx.v1beta1.Fee.verify|verify} messages. + * @function encode + * @memberof cosmos.tx.v1beta1.Fee + * @static + * @param {cosmos.tx.v1beta1.IFee} message Fee message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Fee.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.amount != null && message.amount.length) + for (var i = 0; i < message.amount.length; ++i) + $root.cosmos.base.v1beta1.Coin.encode(message.amount[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.gasLimit != null && Object.hasOwnProperty.call(message, "gasLimit")) + writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.gasLimit); + if (message.payer != null && Object.hasOwnProperty.call(message, "payer")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.payer); + if (message.granter != null && Object.hasOwnProperty.call(message, "granter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.granter); + return writer; + }; + + /** + * Encodes the specified Fee message, length delimited. Does not implicitly {@link cosmos.tx.v1beta1.Fee.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.tx.v1beta1.Fee + * @static + * @param {cosmos.tx.v1beta1.IFee} message Fee message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Fee.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Fee message from the specified reader or buffer. + * @function decode + * @memberof cosmos.tx.v1beta1.Fee + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.tx.v1beta1.Fee} Fee + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Fee.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.tx.v1beta1.Fee(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.amount && message.amount.length)) + message.amount = []; + message.amount.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); + break; + case 2: + message.gasLimit = reader.uint64(); + break; + case 3: + message.payer = reader.string(); + break; + case 4: + message.granter = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Fee message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.tx.v1beta1.Fee + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.tx.v1beta1.Fee} Fee + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Fee.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Fee message. + * @function verify + * @memberof cosmos.tx.v1beta1.Fee + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Fee.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.amount != null && message.hasOwnProperty("amount")) { + if (!Array.isArray(message.amount)) + return "amount: array expected"; + for (var i = 0; i < message.amount.length; ++i) { + var error = $root.cosmos.base.v1beta1.Coin.verify(message.amount[i]); + if (error) + return "amount." + error; + } + } + if (message.gasLimit != null && message.hasOwnProperty("gasLimit")) + if (!$util.isInteger(message.gasLimit) && !(message.gasLimit && $util.isInteger(message.gasLimit.low) && $util.isInteger(message.gasLimit.high))) + return "gasLimit: integer|Long expected"; + if (message.payer != null && message.hasOwnProperty("payer")) + if (!$util.isString(message.payer)) + return "payer: string expected"; + if (message.granter != null && message.hasOwnProperty("granter")) + if (!$util.isString(message.granter)) + return "granter: string expected"; + return null; + }; + + /** + * Creates a Fee message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.tx.v1beta1.Fee + * @static + * @param {Object.} object Plain object + * @returns {cosmos.tx.v1beta1.Fee} Fee + */ + Fee.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.tx.v1beta1.Fee) + return object; + var message = new $root.cosmos.tx.v1beta1.Fee(); + if (object.amount) { + if (!Array.isArray(object.amount)) + throw TypeError(".cosmos.tx.v1beta1.Fee.amount: array expected"); + message.amount = []; + for (var i = 0; i < object.amount.length; ++i) { + if (typeof object.amount[i] !== "object") + throw TypeError(".cosmos.tx.v1beta1.Fee.amount: object expected"); + message.amount[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.amount[i]); + } + } + if (object.gasLimit != null) + if ($util.Long) + (message.gasLimit = $util.Long.fromValue(object.gasLimit)).unsigned = true; + else if (typeof object.gasLimit === "string") + message.gasLimit = parseInt(object.gasLimit, 10); + else if (typeof object.gasLimit === "number") + message.gasLimit = object.gasLimit; + else if (typeof object.gasLimit === "object") + message.gasLimit = new $util.LongBits(object.gasLimit.low >>> 0, object.gasLimit.high >>> 0).toNumber(true); + if (object.payer != null) + message.payer = String(object.payer); + if (object.granter != null) + message.granter = String(object.granter); + return message; + }; + + /** + * Creates a plain object from a Fee message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.tx.v1beta1.Fee + * @static + * @param {cosmos.tx.v1beta1.Fee} message Fee + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Fee.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.amount = []; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.gasLimit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.gasLimit = options.longs === String ? "0" : 0; + object.payer = ""; + object.granter = ""; + } + if (message.amount && message.amount.length) { + object.amount = []; + for (var j = 0; j < message.amount.length; ++j) + object.amount[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.amount[j], options); + } + if (message.gasLimit != null && message.hasOwnProperty("gasLimit")) + if (typeof message.gasLimit === "number") + object.gasLimit = options.longs === String ? String(message.gasLimit) : message.gasLimit; + else + object.gasLimit = options.longs === String ? $util.Long.prototype.toString.call(message.gasLimit) : options.longs === Number ? new $util.LongBits(message.gasLimit.low >>> 0, message.gasLimit.high >>> 0).toNumber(true) : message.gasLimit; + if (message.payer != null && message.hasOwnProperty("payer")) + object.payer = message.payer; + if (message.granter != null && message.hasOwnProperty("granter")) + object.granter = message.granter; + return object; + }; + + /** + * Converts this Fee to JSON. + * @function toJSON + * @memberof cosmos.tx.v1beta1.Fee + * @instance + * @returns {Object.} JSON object + */ + Fee.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Fee; + })(v1beta1.Fee || {}); + + return v1beta1; + })(tx.v1beta1 || {}); + + return tx; + })(cosmos.tx || {}); + + /** + * Namespace crisis. + * @memberof cosmos + * @namespace + */ + + cosmos.crisis = (function(crisis) { + + /** + * Namespace v1beta1. + * @memberof cosmos.crisis + * @namespace + */ + + crisis.v1beta1 = (function(v1beta1) { + + v1beta1.Msg = (function(Msg) { + + /** + * Constructs a new Msg service. + * @memberof cosmos.crisis.v1beta1 + * @classdesc Represents a Msg + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Msg(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Msg.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Msg; + + /** + * Creates new Msg service using the specified rpc implementation. + * @function create + * @memberof cosmos.crisis.v1beta1.Msg + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Msg} RPC service. Useful where requests and/or responses are streamed. + */ + Msg.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link cosmos.crisis.v1beta1.Msg#verifyInvariant}. + * @memberof cosmos.crisis.v1beta1.Msg + * @typedef VerifyInvariantCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.crisis.v1beta1.IMsgVerifyInvariantResponse} [response] MsgVerifyInvariantResponse + */ + + /** + * Calls VerifyInvariant. + * @function verifyInvariant + * @memberof cosmos.crisis.v1beta1.Msg + * @instance + * @param {cosmos.crisis.v1beta1.IMsgVerifyInvariant} request MsgVerifyInvariant message or plain object + * @param {cosmos.crisis.v1beta1.Msg.VerifyInvariantCallback} callback Node-style callback called with the error, if any, and MsgVerifyInvariantResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Msg.prototype.verifyInvariant = function verifyInvariant(request, callback) { + return this.rpcCall(verifyInvariant, $root.cosmos.crisis.v1beta1.MsgVerifyInvariant, $root.cosmos.crisis.v1beta1.MsgVerifyInvariantResponse, request, callback); + }, "name", { value: "VerifyInvariant" }); + + /** + * Calls VerifyInvariant. + * @function verifyInvariant + * @memberof cosmos.crisis.v1beta1.Msg + * @instance + * @param {cosmos.crisis.v1beta1.IMsgVerifyInvariant} request MsgVerifyInvariant message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Msg; + })(v1beta1.Msg || {}); + + v1beta1.MsgVerifyInvariant = (function(MsgVerifyInvariant) { + + /** + * Properties of a MsgVerifyInvariant. + * @memberof cosmos.crisis.v1beta1 + * @interface IMsgVerifyInvariant + * @property {string|null} [sender] MsgVerifyInvariant sender + * @property {string|null} [invariantModuleName] MsgVerifyInvariant invariantModuleName + * @property {string|null} [invariantRoute] MsgVerifyInvariant invariantRoute + */ + + /** + * Constructs a new MsgVerifyInvariant. + * @memberof cosmos.crisis.v1beta1 + * @classdesc Represents a MsgVerifyInvariant. + * @implements IMsgVerifyInvariant + * @constructor + * @param {cosmos.crisis.v1beta1.IMsgVerifyInvariant=} [properties] Properties to set + */ + function MsgVerifyInvariant(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgVerifyInvariant sender. + * @member {string} sender + * @memberof cosmos.crisis.v1beta1.MsgVerifyInvariant + * @instance + */ + MsgVerifyInvariant.prototype.sender = ""; + + /** + * MsgVerifyInvariant invariantModuleName. + * @member {string} invariantModuleName + * @memberof cosmos.crisis.v1beta1.MsgVerifyInvariant + * @instance + */ + MsgVerifyInvariant.prototype.invariantModuleName = ""; + + /** + * MsgVerifyInvariant invariantRoute. + * @member {string} invariantRoute + * @memberof cosmos.crisis.v1beta1.MsgVerifyInvariant + * @instance + */ + MsgVerifyInvariant.prototype.invariantRoute = ""; + + /** + * Creates a new MsgVerifyInvariant instance using the specified properties. + * @function create + * @memberof cosmos.crisis.v1beta1.MsgVerifyInvariant + * @static + * @param {cosmos.crisis.v1beta1.IMsgVerifyInvariant=} [properties] Properties to set + * @returns {cosmos.crisis.v1beta1.MsgVerifyInvariant} MsgVerifyInvariant instance + */ + MsgVerifyInvariant.create = function create(properties) { + return new MsgVerifyInvariant(properties); + }; + + /** + * Encodes the specified MsgVerifyInvariant message. Does not implicitly {@link cosmos.crisis.v1beta1.MsgVerifyInvariant.verify|verify} messages. + * @function encode + * @memberof cosmos.crisis.v1beta1.MsgVerifyInvariant + * @static + * @param {cosmos.crisis.v1beta1.IMsgVerifyInvariant} message MsgVerifyInvariant message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgVerifyInvariant.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sender != null && Object.hasOwnProperty.call(message, "sender")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.sender); + if (message.invariantModuleName != null && Object.hasOwnProperty.call(message, "invariantModuleName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.invariantModuleName); + if (message.invariantRoute != null && Object.hasOwnProperty.call(message, "invariantRoute")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.invariantRoute); + return writer; + }; + + /** + * Encodes the specified MsgVerifyInvariant message, length delimited. Does not implicitly {@link cosmos.crisis.v1beta1.MsgVerifyInvariant.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.crisis.v1beta1.MsgVerifyInvariant + * @static + * @param {cosmos.crisis.v1beta1.IMsgVerifyInvariant} message MsgVerifyInvariant message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgVerifyInvariant.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgVerifyInvariant message from the specified reader or buffer. + * @function decode + * @memberof cosmos.crisis.v1beta1.MsgVerifyInvariant + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.crisis.v1beta1.MsgVerifyInvariant} MsgVerifyInvariant + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgVerifyInvariant.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.crisis.v1beta1.MsgVerifyInvariant(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.sender = reader.string(); + break; + case 2: + message.invariantModuleName = reader.string(); + break; + case 3: + message.invariantRoute = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgVerifyInvariant message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.crisis.v1beta1.MsgVerifyInvariant + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.crisis.v1beta1.MsgVerifyInvariant} MsgVerifyInvariant + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgVerifyInvariant.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgVerifyInvariant message. + * @function verify + * @memberof cosmos.crisis.v1beta1.MsgVerifyInvariant + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgVerifyInvariant.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sender != null && message.hasOwnProperty("sender")) + if (!$util.isString(message.sender)) + return "sender: string expected"; + if (message.invariantModuleName != null && message.hasOwnProperty("invariantModuleName")) + if (!$util.isString(message.invariantModuleName)) + return "invariantModuleName: string expected"; + if (message.invariantRoute != null && message.hasOwnProperty("invariantRoute")) + if (!$util.isString(message.invariantRoute)) + return "invariantRoute: string expected"; + return null; + }; + + /** + * Creates a MsgVerifyInvariant message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.crisis.v1beta1.MsgVerifyInvariant + * @static + * @param {Object.} object Plain object + * @returns {cosmos.crisis.v1beta1.MsgVerifyInvariant} MsgVerifyInvariant + */ + MsgVerifyInvariant.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.crisis.v1beta1.MsgVerifyInvariant) + return object; + var message = new $root.cosmos.crisis.v1beta1.MsgVerifyInvariant(); + if (object.sender != null) + message.sender = String(object.sender); + if (object.invariantModuleName != null) + message.invariantModuleName = String(object.invariantModuleName); + if (object.invariantRoute != null) + message.invariantRoute = String(object.invariantRoute); + return message; + }; + + /** + * Creates a plain object from a MsgVerifyInvariant message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.crisis.v1beta1.MsgVerifyInvariant + * @static + * @param {cosmos.crisis.v1beta1.MsgVerifyInvariant} message MsgVerifyInvariant + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgVerifyInvariant.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.sender = ""; + object.invariantModuleName = ""; + object.invariantRoute = ""; + } + if (message.sender != null && message.hasOwnProperty("sender")) + object.sender = message.sender; + if (message.invariantModuleName != null && message.hasOwnProperty("invariantModuleName")) + object.invariantModuleName = message.invariantModuleName; + if (message.invariantRoute != null && message.hasOwnProperty("invariantRoute")) + object.invariantRoute = message.invariantRoute; + return object; + }; + + /** + * Converts this MsgVerifyInvariant to JSON. + * @function toJSON + * @memberof cosmos.crisis.v1beta1.MsgVerifyInvariant + * @instance + * @returns {Object.} JSON object + */ + MsgVerifyInvariant.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgVerifyInvariant; + })(v1beta1.MsgVerifyInvariant || {}); + + v1beta1.MsgVerifyInvariantResponse = (function(MsgVerifyInvariantResponse) { + + /** + * Properties of a MsgVerifyInvariantResponse. + * @memberof cosmos.crisis.v1beta1 + * @interface IMsgVerifyInvariantResponse + */ + + /** + * Constructs a new MsgVerifyInvariantResponse. + * @memberof cosmos.crisis.v1beta1 + * @classdesc Represents a MsgVerifyInvariantResponse. + * @implements IMsgVerifyInvariantResponse + * @constructor + * @param {cosmos.crisis.v1beta1.IMsgVerifyInvariantResponse=} [properties] Properties to set + */ + function MsgVerifyInvariantResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new MsgVerifyInvariantResponse instance using the specified properties. + * @function create + * @memberof cosmos.crisis.v1beta1.MsgVerifyInvariantResponse + * @static + * @param {cosmos.crisis.v1beta1.IMsgVerifyInvariantResponse=} [properties] Properties to set + * @returns {cosmos.crisis.v1beta1.MsgVerifyInvariantResponse} MsgVerifyInvariantResponse instance + */ + MsgVerifyInvariantResponse.create = function create(properties) { + return new MsgVerifyInvariantResponse(properties); + }; + + /** + * Encodes the specified MsgVerifyInvariantResponse message. Does not implicitly {@link cosmos.crisis.v1beta1.MsgVerifyInvariantResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.crisis.v1beta1.MsgVerifyInvariantResponse + * @static + * @param {cosmos.crisis.v1beta1.IMsgVerifyInvariantResponse} message MsgVerifyInvariantResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgVerifyInvariantResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MsgVerifyInvariantResponse message, length delimited. Does not implicitly {@link cosmos.crisis.v1beta1.MsgVerifyInvariantResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.crisis.v1beta1.MsgVerifyInvariantResponse + * @static + * @param {cosmos.crisis.v1beta1.IMsgVerifyInvariantResponse} message MsgVerifyInvariantResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgVerifyInvariantResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgVerifyInvariantResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.crisis.v1beta1.MsgVerifyInvariantResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.crisis.v1beta1.MsgVerifyInvariantResponse} MsgVerifyInvariantResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgVerifyInvariantResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.crisis.v1beta1.MsgVerifyInvariantResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgVerifyInvariantResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.crisis.v1beta1.MsgVerifyInvariantResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.crisis.v1beta1.MsgVerifyInvariantResponse} MsgVerifyInvariantResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgVerifyInvariantResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgVerifyInvariantResponse message. + * @function verify + * @memberof cosmos.crisis.v1beta1.MsgVerifyInvariantResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgVerifyInvariantResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MsgVerifyInvariantResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.crisis.v1beta1.MsgVerifyInvariantResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.crisis.v1beta1.MsgVerifyInvariantResponse} MsgVerifyInvariantResponse + */ + MsgVerifyInvariantResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.crisis.v1beta1.MsgVerifyInvariantResponse) + return object; + return new $root.cosmos.crisis.v1beta1.MsgVerifyInvariantResponse(); + }; + + /** + * Creates a plain object from a MsgVerifyInvariantResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.crisis.v1beta1.MsgVerifyInvariantResponse + * @static + * @param {cosmos.crisis.v1beta1.MsgVerifyInvariantResponse} message MsgVerifyInvariantResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgVerifyInvariantResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MsgVerifyInvariantResponse to JSON. + * @function toJSON + * @memberof cosmos.crisis.v1beta1.MsgVerifyInvariantResponse + * @instance + * @returns {Object.} JSON object + */ + MsgVerifyInvariantResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgVerifyInvariantResponse; + })(v1beta1.MsgVerifyInvariantResponse || {}); + + return v1beta1; + })(crisis.v1beta1 || {}); + + return crisis; + })(cosmos.crisis || {}); + + /** + * Namespace distribution. + * @memberof cosmos + * @namespace + */ + + cosmos.distribution = (function(distribution) { + + /** + * Namespace v1beta1. + * @memberof cosmos.distribution + * @namespace + */ + + distribution.v1beta1 = (function(v1beta1) { + + v1beta1.Msg = (function(Msg) { + + /** + * Constructs a new Msg service. + * @memberof cosmos.distribution.v1beta1 + * @classdesc Represents a Msg + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Msg(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Msg.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Msg; + + /** + * Creates new Msg service using the specified rpc implementation. + * @function create + * @memberof cosmos.distribution.v1beta1.Msg + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Msg} RPC service. Useful where requests and/or responses are streamed. + */ + Msg.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link cosmos.distribution.v1beta1.Msg#setWithdrawAddress}. + * @memberof cosmos.distribution.v1beta1.Msg + * @typedef SetWithdrawAddressCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.distribution.v1beta1.IMsgSetWithdrawAddressResponse} [response] MsgSetWithdrawAddressResponse + */ + + /** + * Calls SetWithdrawAddress. + * @function setWithdrawAddress + * @memberof cosmos.distribution.v1beta1.Msg + * @instance + * @param {cosmos.distribution.v1beta1.IMsgSetWithdrawAddress} request MsgSetWithdrawAddress message or plain object + * @param {cosmos.distribution.v1beta1.Msg.SetWithdrawAddressCallback} callback Node-style callback called with the error, if any, and MsgSetWithdrawAddressResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Msg.prototype.setWithdrawAddress = function setWithdrawAddress(request, callback) { + return this.rpcCall(setWithdrawAddress, $root.cosmos.distribution.v1beta1.MsgSetWithdrawAddress, $root.cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse, request, callback); + }, "name", { value: "SetWithdrawAddress" }); + + /** + * Calls SetWithdrawAddress. + * @function setWithdrawAddress + * @memberof cosmos.distribution.v1beta1.Msg + * @instance + * @param {cosmos.distribution.v1beta1.IMsgSetWithdrawAddress} request MsgSetWithdrawAddress message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link cosmos.distribution.v1beta1.Msg#withdrawDelegatorReward}. + * @memberof cosmos.distribution.v1beta1.Msg + * @typedef WithdrawDelegatorRewardCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.distribution.v1beta1.IMsgWithdrawDelegatorRewardResponse} [response] MsgWithdrawDelegatorRewardResponse + */ + + /** + * Calls WithdrawDelegatorReward. + * @function withdrawDelegatorReward + * @memberof cosmos.distribution.v1beta1.Msg + * @instance + * @param {cosmos.distribution.v1beta1.IMsgWithdrawDelegatorReward} request MsgWithdrawDelegatorReward message or plain object + * @param {cosmos.distribution.v1beta1.Msg.WithdrawDelegatorRewardCallback} callback Node-style callback called with the error, if any, and MsgWithdrawDelegatorRewardResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Msg.prototype.withdrawDelegatorReward = function withdrawDelegatorReward(request, callback) { + return this.rpcCall(withdrawDelegatorReward, $root.cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward, $root.cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse, request, callback); + }, "name", { value: "WithdrawDelegatorReward" }); + + /** + * Calls WithdrawDelegatorReward. + * @function withdrawDelegatorReward + * @memberof cosmos.distribution.v1beta1.Msg + * @instance + * @param {cosmos.distribution.v1beta1.IMsgWithdrawDelegatorReward} request MsgWithdrawDelegatorReward message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link cosmos.distribution.v1beta1.Msg#withdrawValidatorCommission}. + * @memberof cosmos.distribution.v1beta1.Msg + * @typedef WithdrawValidatorCommissionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.distribution.v1beta1.IMsgWithdrawValidatorCommissionResponse} [response] MsgWithdrawValidatorCommissionResponse + */ + + /** + * Calls WithdrawValidatorCommission. + * @function withdrawValidatorCommission + * @memberof cosmos.distribution.v1beta1.Msg + * @instance + * @param {cosmos.distribution.v1beta1.IMsgWithdrawValidatorCommission} request MsgWithdrawValidatorCommission message or plain object + * @param {cosmos.distribution.v1beta1.Msg.WithdrawValidatorCommissionCallback} callback Node-style callback called with the error, if any, and MsgWithdrawValidatorCommissionResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Msg.prototype.withdrawValidatorCommission = function withdrawValidatorCommission(request, callback) { + return this.rpcCall(withdrawValidatorCommission, $root.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission, $root.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse, request, callback); + }, "name", { value: "WithdrawValidatorCommission" }); + + /** + * Calls WithdrawValidatorCommission. + * @function withdrawValidatorCommission + * @memberof cosmos.distribution.v1beta1.Msg + * @instance + * @param {cosmos.distribution.v1beta1.IMsgWithdrawValidatorCommission} request MsgWithdrawValidatorCommission message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link cosmos.distribution.v1beta1.Msg#fundCommunityPool}. + * @memberof cosmos.distribution.v1beta1.Msg + * @typedef FundCommunityPoolCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.distribution.v1beta1.IMsgFundCommunityPoolResponse} [response] MsgFundCommunityPoolResponse + */ + + /** + * Calls FundCommunityPool. + * @function fundCommunityPool + * @memberof cosmos.distribution.v1beta1.Msg + * @instance + * @param {cosmos.distribution.v1beta1.IMsgFundCommunityPool} request MsgFundCommunityPool message or plain object + * @param {cosmos.distribution.v1beta1.Msg.FundCommunityPoolCallback} callback Node-style callback called with the error, if any, and MsgFundCommunityPoolResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Msg.prototype.fundCommunityPool = function fundCommunityPool(request, callback) { + return this.rpcCall(fundCommunityPool, $root.cosmos.distribution.v1beta1.MsgFundCommunityPool, $root.cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse, request, callback); + }, "name", { value: "FundCommunityPool" }); + + /** + * Calls FundCommunityPool. + * @function fundCommunityPool + * @memberof cosmos.distribution.v1beta1.Msg + * @instance + * @param {cosmos.distribution.v1beta1.IMsgFundCommunityPool} request MsgFundCommunityPool message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Msg; + })(v1beta1.Msg || {}); + + v1beta1.MsgSetWithdrawAddress = (function(MsgSetWithdrawAddress) { + + /** + * Properties of a MsgSetWithdrawAddress. + * @memberof cosmos.distribution.v1beta1 + * @interface IMsgSetWithdrawAddress + * @property {string|null} [delegatorAddress] MsgSetWithdrawAddress delegatorAddress + * @property {string|null} [withdrawAddress] MsgSetWithdrawAddress withdrawAddress + */ + + /** + * Constructs a new MsgSetWithdrawAddress. + * @memberof cosmos.distribution.v1beta1 + * @classdesc Represents a MsgSetWithdrawAddress. + * @implements IMsgSetWithdrawAddress + * @constructor + * @param {cosmos.distribution.v1beta1.IMsgSetWithdrawAddress=} [properties] Properties to set + */ + function MsgSetWithdrawAddress(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgSetWithdrawAddress delegatorAddress. + * @member {string} delegatorAddress + * @memberof cosmos.distribution.v1beta1.MsgSetWithdrawAddress + * @instance + */ + MsgSetWithdrawAddress.prototype.delegatorAddress = ""; + + /** + * MsgSetWithdrawAddress withdrawAddress. + * @member {string} withdrawAddress + * @memberof cosmos.distribution.v1beta1.MsgSetWithdrawAddress + * @instance + */ + MsgSetWithdrawAddress.prototype.withdrawAddress = ""; + + /** + * Creates a new MsgSetWithdrawAddress instance using the specified properties. + * @function create + * @memberof cosmos.distribution.v1beta1.MsgSetWithdrawAddress + * @static + * @param {cosmos.distribution.v1beta1.IMsgSetWithdrawAddress=} [properties] Properties to set + * @returns {cosmos.distribution.v1beta1.MsgSetWithdrawAddress} MsgSetWithdrawAddress instance + */ + MsgSetWithdrawAddress.create = function create(properties) { + return new MsgSetWithdrawAddress(properties); + }; + + /** + * Encodes the specified MsgSetWithdrawAddress message. Does not implicitly {@link cosmos.distribution.v1beta1.MsgSetWithdrawAddress.verify|verify} messages. + * @function encode + * @memberof cosmos.distribution.v1beta1.MsgSetWithdrawAddress + * @static + * @param {cosmos.distribution.v1beta1.IMsgSetWithdrawAddress} message MsgSetWithdrawAddress message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgSetWithdrawAddress.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.delegatorAddress != null && Object.hasOwnProperty.call(message, "delegatorAddress")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.delegatorAddress); + if (message.withdrawAddress != null && Object.hasOwnProperty.call(message, "withdrawAddress")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.withdrawAddress); + return writer; + }; + + /** + * Encodes the specified MsgSetWithdrawAddress message, length delimited. Does not implicitly {@link cosmos.distribution.v1beta1.MsgSetWithdrawAddress.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.distribution.v1beta1.MsgSetWithdrawAddress + * @static + * @param {cosmos.distribution.v1beta1.IMsgSetWithdrawAddress} message MsgSetWithdrawAddress message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgSetWithdrawAddress.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgSetWithdrawAddress message from the specified reader or buffer. + * @function decode + * @memberof cosmos.distribution.v1beta1.MsgSetWithdrawAddress + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.distribution.v1beta1.MsgSetWithdrawAddress} MsgSetWithdrawAddress + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgSetWithdrawAddress.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.distribution.v1beta1.MsgSetWithdrawAddress(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.delegatorAddress = reader.string(); + break; + case 2: + message.withdrawAddress = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgSetWithdrawAddress message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.distribution.v1beta1.MsgSetWithdrawAddress + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.distribution.v1beta1.MsgSetWithdrawAddress} MsgSetWithdrawAddress + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgSetWithdrawAddress.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgSetWithdrawAddress message. + * @function verify + * @memberof cosmos.distribution.v1beta1.MsgSetWithdrawAddress + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgSetWithdrawAddress.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + if (!$util.isString(message.delegatorAddress)) + return "delegatorAddress: string expected"; + if (message.withdrawAddress != null && message.hasOwnProperty("withdrawAddress")) + if (!$util.isString(message.withdrawAddress)) + return "withdrawAddress: string expected"; + return null; + }; + + /** + * Creates a MsgSetWithdrawAddress message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.distribution.v1beta1.MsgSetWithdrawAddress + * @static + * @param {Object.} object Plain object + * @returns {cosmos.distribution.v1beta1.MsgSetWithdrawAddress} MsgSetWithdrawAddress + */ + MsgSetWithdrawAddress.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.distribution.v1beta1.MsgSetWithdrawAddress) + return object; + var message = new $root.cosmos.distribution.v1beta1.MsgSetWithdrawAddress(); + if (object.delegatorAddress != null) + message.delegatorAddress = String(object.delegatorAddress); + if (object.withdrawAddress != null) + message.withdrawAddress = String(object.withdrawAddress); + return message; + }; + + /** + * Creates a plain object from a MsgSetWithdrawAddress message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.distribution.v1beta1.MsgSetWithdrawAddress + * @static + * @param {cosmos.distribution.v1beta1.MsgSetWithdrawAddress} message MsgSetWithdrawAddress + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgSetWithdrawAddress.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.delegatorAddress = ""; + object.withdrawAddress = ""; + } + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + object.delegatorAddress = message.delegatorAddress; + if (message.withdrawAddress != null && message.hasOwnProperty("withdrawAddress")) + object.withdrawAddress = message.withdrawAddress; + return object; + }; + + /** + * Converts this MsgSetWithdrawAddress to JSON. + * @function toJSON + * @memberof cosmos.distribution.v1beta1.MsgSetWithdrawAddress + * @instance + * @returns {Object.} JSON object + */ + MsgSetWithdrawAddress.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgSetWithdrawAddress; + })(v1beta1.MsgSetWithdrawAddress || {}); + + v1beta1.MsgSetWithdrawAddressResponse = (function(MsgSetWithdrawAddressResponse) { + + /** + * Properties of a MsgSetWithdrawAddressResponse. + * @memberof cosmos.distribution.v1beta1 + * @interface IMsgSetWithdrawAddressResponse + */ + + /** + * Constructs a new MsgSetWithdrawAddressResponse. + * @memberof cosmos.distribution.v1beta1 + * @classdesc Represents a MsgSetWithdrawAddressResponse. + * @implements IMsgSetWithdrawAddressResponse + * @constructor + * @param {cosmos.distribution.v1beta1.IMsgSetWithdrawAddressResponse=} [properties] Properties to set + */ + function MsgSetWithdrawAddressResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new MsgSetWithdrawAddressResponse instance using the specified properties. + * @function create + * @memberof cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse + * @static + * @param {cosmos.distribution.v1beta1.IMsgSetWithdrawAddressResponse=} [properties] Properties to set + * @returns {cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse} MsgSetWithdrawAddressResponse instance + */ + MsgSetWithdrawAddressResponse.create = function create(properties) { + return new MsgSetWithdrawAddressResponse(properties); + }; + + /** + * Encodes the specified MsgSetWithdrawAddressResponse message. Does not implicitly {@link cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse + * @static + * @param {cosmos.distribution.v1beta1.IMsgSetWithdrawAddressResponse} message MsgSetWithdrawAddressResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgSetWithdrawAddressResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MsgSetWithdrawAddressResponse message, length delimited. Does not implicitly {@link cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse + * @static + * @param {cosmos.distribution.v1beta1.IMsgSetWithdrawAddressResponse} message MsgSetWithdrawAddressResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgSetWithdrawAddressResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgSetWithdrawAddressResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse} MsgSetWithdrawAddressResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgSetWithdrawAddressResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgSetWithdrawAddressResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse} MsgSetWithdrawAddressResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgSetWithdrawAddressResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgSetWithdrawAddressResponse message. + * @function verify + * @memberof cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgSetWithdrawAddressResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MsgSetWithdrawAddressResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse} MsgSetWithdrawAddressResponse + */ + MsgSetWithdrawAddressResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse) + return object; + return new $root.cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse(); + }; + + /** + * Creates a plain object from a MsgSetWithdrawAddressResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse + * @static + * @param {cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse} message MsgSetWithdrawAddressResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgSetWithdrawAddressResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MsgSetWithdrawAddressResponse to JSON. + * @function toJSON + * @memberof cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse + * @instance + * @returns {Object.} JSON object + */ + MsgSetWithdrawAddressResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgSetWithdrawAddressResponse; + })(v1beta1.MsgSetWithdrawAddressResponse || {}); + + v1beta1.MsgWithdrawDelegatorReward = (function(MsgWithdrawDelegatorReward) { + + /** + * Properties of a MsgWithdrawDelegatorReward. + * @memberof cosmos.distribution.v1beta1 + * @interface IMsgWithdrawDelegatorReward + * @property {string|null} [delegatorAddress] MsgWithdrawDelegatorReward delegatorAddress + * @property {string|null} [validatorAddress] MsgWithdrawDelegatorReward validatorAddress + */ + + /** + * Constructs a new MsgWithdrawDelegatorReward. + * @memberof cosmos.distribution.v1beta1 + * @classdesc Represents a MsgWithdrawDelegatorReward. + * @implements IMsgWithdrawDelegatorReward + * @constructor + * @param {cosmos.distribution.v1beta1.IMsgWithdrawDelegatorReward=} [properties] Properties to set + */ + function MsgWithdrawDelegatorReward(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgWithdrawDelegatorReward delegatorAddress. + * @member {string} delegatorAddress + * @memberof cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward + * @instance + */ + MsgWithdrawDelegatorReward.prototype.delegatorAddress = ""; + + /** + * MsgWithdrawDelegatorReward validatorAddress. + * @member {string} validatorAddress + * @memberof cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward + * @instance + */ + MsgWithdrawDelegatorReward.prototype.validatorAddress = ""; + + /** + * Creates a new MsgWithdrawDelegatorReward instance using the specified properties. + * @function create + * @memberof cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward + * @static + * @param {cosmos.distribution.v1beta1.IMsgWithdrawDelegatorReward=} [properties] Properties to set + * @returns {cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward} MsgWithdrawDelegatorReward instance + */ + MsgWithdrawDelegatorReward.create = function create(properties) { + return new MsgWithdrawDelegatorReward(properties); + }; + + /** + * Encodes the specified MsgWithdrawDelegatorReward message. Does not implicitly {@link cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward.verify|verify} messages. + * @function encode + * @memberof cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward + * @static + * @param {cosmos.distribution.v1beta1.IMsgWithdrawDelegatorReward} message MsgWithdrawDelegatorReward message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgWithdrawDelegatorReward.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.delegatorAddress != null && Object.hasOwnProperty.call(message, "delegatorAddress")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.delegatorAddress); + if (message.validatorAddress != null && Object.hasOwnProperty.call(message, "validatorAddress")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.validatorAddress); + return writer; + }; + + /** + * Encodes the specified MsgWithdrawDelegatorReward message, length delimited. Does not implicitly {@link cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward + * @static + * @param {cosmos.distribution.v1beta1.IMsgWithdrawDelegatorReward} message MsgWithdrawDelegatorReward message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgWithdrawDelegatorReward.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgWithdrawDelegatorReward message from the specified reader or buffer. + * @function decode + * @memberof cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward} MsgWithdrawDelegatorReward + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgWithdrawDelegatorReward.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.delegatorAddress = reader.string(); + break; + case 2: + message.validatorAddress = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgWithdrawDelegatorReward message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward} MsgWithdrawDelegatorReward + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgWithdrawDelegatorReward.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgWithdrawDelegatorReward message. + * @function verify + * @memberof cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgWithdrawDelegatorReward.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + if (!$util.isString(message.delegatorAddress)) + return "delegatorAddress: string expected"; + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + if (!$util.isString(message.validatorAddress)) + return "validatorAddress: string expected"; + return null; + }; + + /** + * Creates a MsgWithdrawDelegatorReward message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward + * @static + * @param {Object.} object Plain object + * @returns {cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward} MsgWithdrawDelegatorReward + */ + MsgWithdrawDelegatorReward.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward) + return object; + var message = new $root.cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward(); + if (object.delegatorAddress != null) + message.delegatorAddress = String(object.delegatorAddress); + if (object.validatorAddress != null) + message.validatorAddress = String(object.validatorAddress); + return message; + }; + + /** + * Creates a plain object from a MsgWithdrawDelegatorReward message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward + * @static + * @param {cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward} message MsgWithdrawDelegatorReward + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgWithdrawDelegatorReward.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.delegatorAddress = ""; + object.validatorAddress = ""; + } + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + object.delegatorAddress = message.delegatorAddress; + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + object.validatorAddress = message.validatorAddress; + return object; + }; + + /** + * Converts this MsgWithdrawDelegatorReward to JSON. + * @function toJSON + * @memberof cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward + * @instance + * @returns {Object.} JSON object + */ + MsgWithdrawDelegatorReward.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgWithdrawDelegatorReward; + })(v1beta1.MsgWithdrawDelegatorReward || {}); + + v1beta1.MsgWithdrawDelegatorRewardResponse = (function(MsgWithdrawDelegatorRewardResponse) { + + /** + * Properties of a MsgWithdrawDelegatorRewardResponse. + * @memberof cosmos.distribution.v1beta1 + * @interface IMsgWithdrawDelegatorRewardResponse + */ + + /** + * Constructs a new MsgWithdrawDelegatorRewardResponse. + * @memberof cosmos.distribution.v1beta1 + * @classdesc Represents a MsgWithdrawDelegatorRewardResponse. + * @implements IMsgWithdrawDelegatorRewardResponse + * @constructor + * @param {cosmos.distribution.v1beta1.IMsgWithdrawDelegatorRewardResponse=} [properties] Properties to set + */ + function MsgWithdrawDelegatorRewardResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new MsgWithdrawDelegatorRewardResponse instance using the specified properties. + * @function create + * @memberof cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse + * @static + * @param {cosmos.distribution.v1beta1.IMsgWithdrawDelegatorRewardResponse=} [properties] Properties to set + * @returns {cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse} MsgWithdrawDelegatorRewardResponse instance + */ + MsgWithdrawDelegatorRewardResponse.create = function create(properties) { + return new MsgWithdrawDelegatorRewardResponse(properties); + }; + + /** + * Encodes the specified MsgWithdrawDelegatorRewardResponse message. Does not implicitly {@link cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse + * @static + * @param {cosmos.distribution.v1beta1.IMsgWithdrawDelegatorRewardResponse} message MsgWithdrawDelegatorRewardResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgWithdrawDelegatorRewardResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MsgWithdrawDelegatorRewardResponse message, length delimited. Does not implicitly {@link cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse + * @static + * @param {cosmos.distribution.v1beta1.IMsgWithdrawDelegatorRewardResponse} message MsgWithdrawDelegatorRewardResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgWithdrawDelegatorRewardResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgWithdrawDelegatorRewardResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse} MsgWithdrawDelegatorRewardResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgWithdrawDelegatorRewardResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgWithdrawDelegatorRewardResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse} MsgWithdrawDelegatorRewardResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgWithdrawDelegatorRewardResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgWithdrawDelegatorRewardResponse message. + * @function verify + * @memberof cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgWithdrawDelegatorRewardResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MsgWithdrawDelegatorRewardResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse} MsgWithdrawDelegatorRewardResponse + */ + MsgWithdrawDelegatorRewardResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse) + return object; + return new $root.cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse(); + }; + + /** + * Creates a plain object from a MsgWithdrawDelegatorRewardResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse + * @static + * @param {cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse} message MsgWithdrawDelegatorRewardResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgWithdrawDelegatorRewardResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MsgWithdrawDelegatorRewardResponse to JSON. + * @function toJSON + * @memberof cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse + * @instance + * @returns {Object.} JSON object + */ + MsgWithdrawDelegatorRewardResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgWithdrawDelegatorRewardResponse; + })(v1beta1.MsgWithdrawDelegatorRewardResponse || {}); + + v1beta1.MsgWithdrawValidatorCommission = (function(MsgWithdrawValidatorCommission) { + + /** + * Properties of a MsgWithdrawValidatorCommission. + * @memberof cosmos.distribution.v1beta1 + * @interface IMsgWithdrawValidatorCommission + * @property {string|null} [validatorAddress] MsgWithdrawValidatorCommission validatorAddress + */ + + /** + * Constructs a new MsgWithdrawValidatorCommission. + * @memberof cosmos.distribution.v1beta1 + * @classdesc Represents a MsgWithdrawValidatorCommission. + * @implements IMsgWithdrawValidatorCommission + * @constructor + * @param {cosmos.distribution.v1beta1.IMsgWithdrawValidatorCommission=} [properties] Properties to set + */ + function MsgWithdrawValidatorCommission(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgWithdrawValidatorCommission validatorAddress. + * @member {string} validatorAddress + * @memberof cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission + * @instance + */ + MsgWithdrawValidatorCommission.prototype.validatorAddress = ""; + + /** + * Creates a new MsgWithdrawValidatorCommission instance using the specified properties. + * @function create + * @memberof cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission + * @static + * @param {cosmos.distribution.v1beta1.IMsgWithdrawValidatorCommission=} [properties] Properties to set + * @returns {cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission} MsgWithdrawValidatorCommission instance + */ + MsgWithdrawValidatorCommission.create = function create(properties) { + return new MsgWithdrawValidatorCommission(properties); + }; + + /** + * Encodes the specified MsgWithdrawValidatorCommission message. Does not implicitly {@link cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission.verify|verify} messages. + * @function encode + * @memberof cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission + * @static + * @param {cosmos.distribution.v1beta1.IMsgWithdrawValidatorCommission} message MsgWithdrawValidatorCommission message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgWithdrawValidatorCommission.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.validatorAddress != null && Object.hasOwnProperty.call(message, "validatorAddress")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.validatorAddress); + return writer; + }; + + /** + * Encodes the specified MsgWithdrawValidatorCommission message, length delimited. Does not implicitly {@link cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission + * @static + * @param {cosmos.distribution.v1beta1.IMsgWithdrawValidatorCommission} message MsgWithdrawValidatorCommission message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgWithdrawValidatorCommission.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgWithdrawValidatorCommission message from the specified reader or buffer. + * @function decode + * @memberof cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission} MsgWithdrawValidatorCommission + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgWithdrawValidatorCommission.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.validatorAddress = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgWithdrawValidatorCommission message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission} MsgWithdrawValidatorCommission + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgWithdrawValidatorCommission.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgWithdrawValidatorCommission message. + * @function verify + * @memberof cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgWithdrawValidatorCommission.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + if (!$util.isString(message.validatorAddress)) + return "validatorAddress: string expected"; + return null; + }; + + /** + * Creates a MsgWithdrawValidatorCommission message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission + * @static + * @param {Object.} object Plain object + * @returns {cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission} MsgWithdrawValidatorCommission + */ + MsgWithdrawValidatorCommission.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission) + return object; + var message = new $root.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission(); + if (object.validatorAddress != null) + message.validatorAddress = String(object.validatorAddress); + return message; + }; + + /** + * Creates a plain object from a MsgWithdrawValidatorCommission message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission + * @static + * @param {cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission} message MsgWithdrawValidatorCommission + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgWithdrawValidatorCommission.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.validatorAddress = ""; + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + object.validatorAddress = message.validatorAddress; + return object; + }; + + /** + * Converts this MsgWithdrawValidatorCommission to JSON. + * @function toJSON + * @memberof cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission + * @instance + * @returns {Object.} JSON object + */ + MsgWithdrawValidatorCommission.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgWithdrawValidatorCommission; + })(v1beta1.MsgWithdrawValidatorCommission || {}); + + v1beta1.MsgWithdrawValidatorCommissionResponse = (function(MsgWithdrawValidatorCommissionResponse) { + + /** + * Properties of a MsgWithdrawValidatorCommissionResponse. + * @memberof cosmos.distribution.v1beta1 + * @interface IMsgWithdrawValidatorCommissionResponse + */ + + /** + * Constructs a new MsgWithdrawValidatorCommissionResponse. + * @memberof cosmos.distribution.v1beta1 + * @classdesc Represents a MsgWithdrawValidatorCommissionResponse. + * @implements IMsgWithdrawValidatorCommissionResponse + * @constructor + * @param {cosmos.distribution.v1beta1.IMsgWithdrawValidatorCommissionResponse=} [properties] Properties to set + */ + function MsgWithdrawValidatorCommissionResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new MsgWithdrawValidatorCommissionResponse instance using the specified properties. + * @function create + * @memberof cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse + * @static + * @param {cosmos.distribution.v1beta1.IMsgWithdrawValidatorCommissionResponse=} [properties] Properties to set + * @returns {cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse} MsgWithdrawValidatorCommissionResponse instance + */ + MsgWithdrawValidatorCommissionResponse.create = function create(properties) { + return new MsgWithdrawValidatorCommissionResponse(properties); + }; + + /** + * Encodes the specified MsgWithdrawValidatorCommissionResponse message. Does not implicitly {@link cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse + * @static + * @param {cosmos.distribution.v1beta1.IMsgWithdrawValidatorCommissionResponse} message MsgWithdrawValidatorCommissionResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgWithdrawValidatorCommissionResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MsgWithdrawValidatorCommissionResponse message, length delimited. Does not implicitly {@link cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse + * @static + * @param {cosmos.distribution.v1beta1.IMsgWithdrawValidatorCommissionResponse} message MsgWithdrawValidatorCommissionResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgWithdrawValidatorCommissionResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgWithdrawValidatorCommissionResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse} MsgWithdrawValidatorCommissionResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgWithdrawValidatorCommissionResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgWithdrawValidatorCommissionResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse} MsgWithdrawValidatorCommissionResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgWithdrawValidatorCommissionResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgWithdrawValidatorCommissionResponse message. + * @function verify + * @memberof cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgWithdrawValidatorCommissionResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MsgWithdrawValidatorCommissionResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse} MsgWithdrawValidatorCommissionResponse + */ + MsgWithdrawValidatorCommissionResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse) + return object; + return new $root.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse(); + }; + + /** + * Creates a plain object from a MsgWithdrawValidatorCommissionResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse + * @static + * @param {cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse} message MsgWithdrawValidatorCommissionResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgWithdrawValidatorCommissionResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MsgWithdrawValidatorCommissionResponse to JSON. + * @function toJSON + * @memberof cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse + * @instance + * @returns {Object.} JSON object + */ + MsgWithdrawValidatorCommissionResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgWithdrawValidatorCommissionResponse; + })(v1beta1.MsgWithdrawValidatorCommissionResponse || {}); + + v1beta1.MsgFundCommunityPool = (function(MsgFundCommunityPool) { + + /** + * Properties of a MsgFundCommunityPool. + * @memberof cosmos.distribution.v1beta1 + * @interface IMsgFundCommunityPool + * @property {Array.|null} [amount] MsgFundCommunityPool amount + * @property {string|null} [depositor] MsgFundCommunityPool depositor + */ + + /** + * Constructs a new MsgFundCommunityPool. + * @memberof cosmos.distribution.v1beta1 + * @classdesc Represents a MsgFundCommunityPool. + * @implements IMsgFundCommunityPool + * @constructor + * @param {cosmos.distribution.v1beta1.IMsgFundCommunityPool=} [properties] Properties to set + */ + function MsgFundCommunityPool(properties) { + this.amount = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgFundCommunityPool amount. + * @member {Array.} amount + * @memberof cosmos.distribution.v1beta1.MsgFundCommunityPool + * @instance + */ + MsgFundCommunityPool.prototype.amount = $util.emptyArray; + + /** + * MsgFundCommunityPool depositor. + * @member {string} depositor + * @memberof cosmos.distribution.v1beta1.MsgFundCommunityPool + * @instance + */ + MsgFundCommunityPool.prototype.depositor = ""; + + /** + * Creates a new MsgFundCommunityPool instance using the specified properties. + * @function create + * @memberof cosmos.distribution.v1beta1.MsgFundCommunityPool + * @static + * @param {cosmos.distribution.v1beta1.IMsgFundCommunityPool=} [properties] Properties to set + * @returns {cosmos.distribution.v1beta1.MsgFundCommunityPool} MsgFundCommunityPool instance + */ + MsgFundCommunityPool.create = function create(properties) { + return new MsgFundCommunityPool(properties); + }; + + /** + * Encodes the specified MsgFundCommunityPool message. Does not implicitly {@link cosmos.distribution.v1beta1.MsgFundCommunityPool.verify|verify} messages. + * @function encode + * @memberof cosmos.distribution.v1beta1.MsgFundCommunityPool + * @static + * @param {cosmos.distribution.v1beta1.IMsgFundCommunityPool} message MsgFundCommunityPool message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgFundCommunityPool.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.amount != null && message.amount.length) + for (var i = 0; i < message.amount.length; ++i) + $root.cosmos.base.v1beta1.Coin.encode(message.amount[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.depositor != null && Object.hasOwnProperty.call(message, "depositor")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.depositor); + return writer; + }; + + /** + * Encodes the specified MsgFundCommunityPool message, length delimited. Does not implicitly {@link cosmos.distribution.v1beta1.MsgFundCommunityPool.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.distribution.v1beta1.MsgFundCommunityPool + * @static + * @param {cosmos.distribution.v1beta1.IMsgFundCommunityPool} message MsgFundCommunityPool message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgFundCommunityPool.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgFundCommunityPool message from the specified reader or buffer. + * @function decode + * @memberof cosmos.distribution.v1beta1.MsgFundCommunityPool + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.distribution.v1beta1.MsgFundCommunityPool} MsgFundCommunityPool + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgFundCommunityPool.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.distribution.v1beta1.MsgFundCommunityPool(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.amount && message.amount.length)) + message.amount = []; + message.amount.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); + break; + case 2: + message.depositor = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgFundCommunityPool message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.distribution.v1beta1.MsgFundCommunityPool + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.distribution.v1beta1.MsgFundCommunityPool} MsgFundCommunityPool + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgFundCommunityPool.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgFundCommunityPool message. + * @function verify + * @memberof cosmos.distribution.v1beta1.MsgFundCommunityPool + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgFundCommunityPool.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.amount != null && message.hasOwnProperty("amount")) { + if (!Array.isArray(message.amount)) + return "amount: array expected"; + for (var i = 0; i < message.amount.length; ++i) { + var error = $root.cosmos.base.v1beta1.Coin.verify(message.amount[i]); + if (error) + return "amount." + error; + } + } + if (message.depositor != null && message.hasOwnProperty("depositor")) + if (!$util.isString(message.depositor)) + return "depositor: string expected"; + return null; + }; + + /** + * Creates a MsgFundCommunityPool message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.distribution.v1beta1.MsgFundCommunityPool + * @static + * @param {Object.} object Plain object + * @returns {cosmos.distribution.v1beta1.MsgFundCommunityPool} MsgFundCommunityPool + */ + MsgFundCommunityPool.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.distribution.v1beta1.MsgFundCommunityPool) + return object; + var message = new $root.cosmos.distribution.v1beta1.MsgFundCommunityPool(); + if (object.amount) { + if (!Array.isArray(object.amount)) + throw TypeError(".cosmos.distribution.v1beta1.MsgFundCommunityPool.amount: array expected"); + message.amount = []; + for (var i = 0; i < object.amount.length; ++i) { + if (typeof object.amount[i] !== "object") + throw TypeError(".cosmos.distribution.v1beta1.MsgFundCommunityPool.amount: object expected"); + message.amount[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.amount[i]); + } + } + if (object.depositor != null) + message.depositor = String(object.depositor); + return message; + }; + + /** + * Creates a plain object from a MsgFundCommunityPool message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.distribution.v1beta1.MsgFundCommunityPool + * @static + * @param {cosmos.distribution.v1beta1.MsgFundCommunityPool} message MsgFundCommunityPool + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgFundCommunityPool.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.amount = []; + if (options.defaults) + object.depositor = ""; + if (message.amount && message.amount.length) { + object.amount = []; + for (var j = 0; j < message.amount.length; ++j) + object.amount[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.amount[j], options); + } + if (message.depositor != null && message.hasOwnProperty("depositor")) + object.depositor = message.depositor; + return object; + }; + + /** + * Converts this MsgFundCommunityPool to JSON. + * @function toJSON + * @memberof cosmos.distribution.v1beta1.MsgFundCommunityPool + * @instance + * @returns {Object.} JSON object + */ + MsgFundCommunityPool.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgFundCommunityPool; + })(v1beta1.MsgFundCommunityPool || {}); + + v1beta1.MsgFundCommunityPoolResponse = (function(MsgFundCommunityPoolResponse) { + + /** + * Properties of a MsgFundCommunityPoolResponse. + * @memberof cosmos.distribution.v1beta1 + * @interface IMsgFundCommunityPoolResponse + */ + + /** + * Constructs a new MsgFundCommunityPoolResponse. + * @memberof cosmos.distribution.v1beta1 + * @classdesc Represents a MsgFundCommunityPoolResponse. + * @implements IMsgFundCommunityPoolResponse + * @constructor + * @param {cosmos.distribution.v1beta1.IMsgFundCommunityPoolResponse=} [properties] Properties to set + */ + function MsgFundCommunityPoolResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new MsgFundCommunityPoolResponse instance using the specified properties. + * @function create + * @memberof cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse + * @static + * @param {cosmos.distribution.v1beta1.IMsgFundCommunityPoolResponse=} [properties] Properties to set + * @returns {cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse} MsgFundCommunityPoolResponse instance + */ + MsgFundCommunityPoolResponse.create = function create(properties) { + return new MsgFundCommunityPoolResponse(properties); + }; + + /** + * Encodes the specified MsgFundCommunityPoolResponse message. Does not implicitly {@link cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse + * @static + * @param {cosmos.distribution.v1beta1.IMsgFundCommunityPoolResponse} message MsgFundCommunityPoolResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgFundCommunityPoolResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MsgFundCommunityPoolResponse message, length delimited. Does not implicitly {@link cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse + * @static + * @param {cosmos.distribution.v1beta1.IMsgFundCommunityPoolResponse} message MsgFundCommunityPoolResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgFundCommunityPoolResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgFundCommunityPoolResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse} MsgFundCommunityPoolResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgFundCommunityPoolResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgFundCommunityPoolResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse} MsgFundCommunityPoolResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgFundCommunityPoolResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgFundCommunityPoolResponse message. + * @function verify + * @memberof cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgFundCommunityPoolResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MsgFundCommunityPoolResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse} MsgFundCommunityPoolResponse + */ + MsgFundCommunityPoolResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse) + return object; + return new $root.cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse(); + }; + + /** + * Creates a plain object from a MsgFundCommunityPoolResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse + * @static + * @param {cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse} message MsgFundCommunityPoolResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgFundCommunityPoolResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MsgFundCommunityPoolResponse to JSON. + * @function toJSON + * @memberof cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse + * @instance + * @returns {Object.} JSON object + */ + MsgFundCommunityPoolResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgFundCommunityPoolResponse; + })(v1beta1.MsgFundCommunityPoolResponse || {}); + + return v1beta1; + })(distribution.v1beta1 || {}); + + return distribution; + })(cosmos.distribution || {}); + + /** + * Namespace evidence. + * @memberof cosmos + * @namespace + */ + + cosmos.evidence = (function(evidence) { + + /** + * Namespace v1beta1. + * @memberof cosmos.evidence + * @namespace + */ + + evidence.v1beta1 = (function(v1beta1) { + + v1beta1.Msg = (function(Msg) { + + /** + * Constructs a new Msg service. + * @memberof cosmos.evidence.v1beta1 + * @classdesc Represents a Msg + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Msg(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Msg.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Msg; + + /** + * Creates new Msg service using the specified rpc implementation. + * @function create + * @memberof cosmos.evidence.v1beta1.Msg + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Msg} RPC service. Useful where requests and/or responses are streamed. + */ + Msg.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link cosmos.evidence.v1beta1.Msg#submitEvidence}. + * @memberof cosmos.evidence.v1beta1.Msg + * @typedef SubmitEvidenceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.evidence.v1beta1.IMsgSubmitEvidenceResponse} [response] MsgSubmitEvidenceResponse + */ + + /** + * Calls SubmitEvidence. + * @function submitEvidence + * @memberof cosmos.evidence.v1beta1.Msg + * @instance + * @param {cosmos.evidence.v1beta1.IMsgSubmitEvidence} request MsgSubmitEvidence message or plain object + * @param {cosmos.evidence.v1beta1.Msg.SubmitEvidenceCallback} callback Node-style callback called with the error, if any, and MsgSubmitEvidenceResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Msg.prototype.submitEvidence = function submitEvidence(request, callback) { + return this.rpcCall(submitEvidence, $root.cosmos.evidence.v1beta1.MsgSubmitEvidence, $root.cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse, request, callback); + }, "name", { value: "SubmitEvidence" }); + + /** + * Calls SubmitEvidence. + * @function submitEvidence + * @memberof cosmos.evidence.v1beta1.Msg + * @instance + * @param {cosmos.evidence.v1beta1.IMsgSubmitEvidence} request MsgSubmitEvidence message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Msg; + })(v1beta1.Msg || {}); + + v1beta1.MsgSubmitEvidence = (function(MsgSubmitEvidence) { + + /** + * Properties of a MsgSubmitEvidence. + * @memberof cosmos.evidence.v1beta1 + * @interface IMsgSubmitEvidence + * @property {string|null} [submitter] MsgSubmitEvidence submitter + * @property {google.protobuf.IAny|null} [evidence] MsgSubmitEvidence evidence + */ + + /** + * Constructs a new MsgSubmitEvidence. + * @memberof cosmos.evidence.v1beta1 + * @classdesc Represents a MsgSubmitEvidence. + * @implements IMsgSubmitEvidence + * @constructor + * @param {cosmos.evidence.v1beta1.IMsgSubmitEvidence=} [properties] Properties to set + */ + function MsgSubmitEvidence(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgSubmitEvidence submitter. + * @member {string} submitter + * @memberof cosmos.evidence.v1beta1.MsgSubmitEvidence + * @instance + */ + MsgSubmitEvidence.prototype.submitter = ""; + + /** + * MsgSubmitEvidence evidence. + * @member {google.protobuf.IAny|null|undefined} evidence + * @memberof cosmos.evidence.v1beta1.MsgSubmitEvidence + * @instance + */ + MsgSubmitEvidence.prototype.evidence = null; + + /** + * Creates a new MsgSubmitEvidence instance using the specified properties. + * @function create + * @memberof cosmos.evidence.v1beta1.MsgSubmitEvidence + * @static + * @param {cosmos.evidence.v1beta1.IMsgSubmitEvidence=} [properties] Properties to set + * @returns {cosmos.evidence.v1beta1.MsgSubmitEvidence} MsgSubmitEvidence instance + */ + MsgSubmitEvidence.create = function create(properties) { + return new MsgSubmitEvidence(properties); + }; + + /** + * Encodes the specified MsgSubmitEvidence message. Does not implicitly {@link cosmos.evidence.v1beta1.MsgSubmitEvidence.verify|verify} messages. + * @function encode + * @memberof cosmos.evidence.v1beta1.MsgSubmitEvidence + * @static + * @param {cosmos.evidence.v1beta1.IMsgSubmitEvidence} message MsgSubmitEvidence message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgSubmitEvidence.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.submitter != null && Object.hasOwnProperty.call(message, "submitter")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.submitter); + if (message.evidence != null && Object.hasOwnProperty.call(message, "evidence")) + $root.google.protobuf.Any.encode(message.evidence, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MsgSubmitEvidence message, length delimited. Does not implicitly {@link cosmos.evidence.v1beta1.MsgSubmitEvidence.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.evidence.v1beta1.MsgSubmitEvidence + * @static + * @param {cosmos.evidence.v1beta1.IMsgSubmitEvidence} message MsgSubmitEvidence message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgSubmitEvidence.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgSubmitEvidence message from the specified reader or buffer. + * @function decode + * @memberof cosmos.evidence.v1beta1.MsgSubmitEvidence + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.evidence.v1beta1.MsgSubmitEvidence} MsgSubmitEvidence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgSubmitEvidence.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.evidence.v1beta1.MsgSubmitEvidence(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.submitter = reader.string(); + break; + case 2: + message.evidence = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgSubmitEvidence message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.evidence.v1beta1.MsgSubmitEvidence + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.evidence.v1beta1.MsgSubmitEvidence} MsgSubmitEvidence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgSubmitEvidence.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgSubmitEvidence message. + * @function verify + * @memberof cosmos.evidence.v1beta1.MsgSubmitEvidence + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgSubmitEvidence.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.submitter != null && message.hasOwnProperty("submitter")) + if (!$util.isString(message.submitter)) + return "submitter: string expected"; + if (message.evidence != null && message.hasOwnProperty("evidence")) { + var error = $root.google.protobuf.Any.verify(message.evidence); + if (error) + return "evidence." + error; + } + return null; + }; + + /** + * Creates a MsgSubmitEvidence message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.evidence.v1beta1.MsgSubmitEvidence + * @static + * @param {Object.} object Plain object + * @returns {cosmos.evidence.v1beta1.MsgSubmitEvidence} MsgSubmitEvidence + */ + MsgSubmitEvidence.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.evidence.v1beta1.MsgSubmitEvidence) + return object; + var message = new $root.cosmos.evidence.v1beta1.MsgSubmitEvidence(); + if (object.submitter != null) + message.submitter = String(object.submitter); + if (object.evidence != null) { + if (typeof object.evidence !== "object") + throw TypeError(".cosmos.evidence.v1beta1.MsgSubmitEvidence.evidence: object expected"); + message.evidence = $root.google.protobuf.Any.fromObject(object.evidence); + } + return message; + }; + + /** + * Creates a plain object from a MsgSubmitEvidence message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.evidence.v1beta1.MsgSubmitEvidence + * @static + * @param {cosmos.evidence.v1beta1.MsgSubmitEvidence} message MsgSubmitEvidence + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgSubmitEvidence.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.submitter = ""; + object.evidence = null; + } + if (message.submitter != null && message.hasOwnProperty("submitter")) + object.submitter = message.submitter; + if (message.evidence != null && message.hasOwnProperty("evidence")) + object.evidence = $root.google.protobuf.Any.toObject(message.evidence, options); + return object; + }; + + /** + * Converts this MsgSubmitEvidence to JSON. + * @function toJSON + * @memberof cosmos.evidence.v1beta1.MsgSubmitEvidence + * @instance + * @returns {Object.} JSON object + */ + MsgSubmitEvidence.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgSubmitEvidence; + })(v1beta1.MsgSubmitEvidence || {}); + + v1beta1.MsgSubmitEvidenceResponse = (function(MsgSubmitEvidenceResponse) { + + /** + * Properties of a MsgSubmitEvidenceResponse. + * @memberof cosmos.evidence.v1beta1 + * @interface IMsgSubmitEvidenceResponse + * @property {Uint8Array|null} [hash] MsgSubmitEvidenceResponse hash + */ + + /** + * Constructs a new MsgSubmitEvidenceResponse. + * @memberof cosmos.evidence.v1beta1 + * @classdesc Represents a MsgSubmitEvidenceResponse. + * @implements IMsgSubmitEvidenceResponse + * @constructor + * @param {cosmos.evidence.v1beta1.IMsgSubmitEvidenceResponse=} [properties] Properties to set + */ + function MsgSubmitEvidenceResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgSubmitEvidenceResponse hash. + * @member {Uint8Array} hash + * @memberof cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse + * @instance + */ + MsgSubmitEvidenceResponse.prototype.hash = $util.newBuffer([]); + + /** + * Creates a new MsgSubmitEvidenceResponse instance using the specified properties. + * @function create + * @memberof cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse + * @static + * @param {cosmos.evidence.v1beta1.IMsgSubmitEvidenceResponse=} [properties] Properties to set + * @returns {cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse} MsgSubmitEvidenceResponse instance + */ + MsgSubmitEvidenceResponse.create = function create(properties) { + return new MsgSubmitEvidenceResponse(properties); + }; + + /** + * Encodes the specified MsgSubmitEvidenceResponse message. Does not implicitly {@link cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse + * @static + * @param {cosmos.evidence.v1beta1.IMsgSubmitEvidenceResponse} message MsgSubmitEvidenceResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgSubmitEvidenceResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.hash != null && Object.hasOwnProperty.call(message, "hash")) + writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.hash); + return writer; + }; + + /** + * Encodes the specified MsgSubmitEvidenceResponse message, length delimited. Does not implicitly {@link cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse + * @static + * @param {cosmos.evidence.v1beta1.IMsgSubmitEvidenceResponse} message MsgSubmitEvidenceResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgSubmitEvidenceResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgSubmitEvidenceResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse} MsgSubmitEvidenceResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgSubmitEvidenceResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 4: + message.hash = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgSubmitEvidenceResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse} MsgSubmitEvidenceResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgSubmitEvidenceResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgSubmitEvidenceResponse message. + * @function verify + * @memberof cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgSubmitEvidenceResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.hash != null && message.hasOwnProperty("hash")) + if (!(message.hash && typeof message.hash.length === "number" || $util.isString(message.hash))) + return "hash: buffer expected"; + return null; + }; + + /** + * Creates a MsgSubmitEvidenceResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse} MsgSubmitEvidenceResponse + */ + MsgSubmitEvidenceResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse) + return object; + var message = new $root.cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse(); + if (object.hash != null) + if (typeof object.hash === "string") + $util.base64.decode(object.hash, message.hash = $util.newBuffer($util.base64.length(object.hash)), 0); + else if (object.hash.length) + message.hash = object.hash; + return message; + }; + + /** + * Creates a plain object from a MsgSubmitEvidenceResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse + * @static + * @param {cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse} message MsgSubmitEvidenceResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgSubmitEvidenceResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if (options.bytes === String) + object.hash = ""; + else { + object.hash = []; + if (options.bytes !== Array) + object.hash = $util.newBuffer(object.hash); + } + if (message.hash != null && message.hasOwnProperty("hash")) + object.hash = options.bytes === String ? $util.base64.encode(message.hash, 0, message.hash.length) : options.bytes === Array ? Array.prototype.slice.call(message.hash) : message.hash; + return object; + }; + + /** + * Converts this MsgSubmitEvidenceResponse to JSON. + * @function toJSON + * @memberof cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse + * @instance + * @returns {Object.} JSON object + */ + MsgSubmitEvidenceResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgSubmitEvidenceResponse; + })(v1beta1.MsgSubmitEvidenceResponse || {}); + + return v1beta1; + })(evidence.v1beta1 || {}); + + return evidence; + })(cosmos.evidence || {}); + + /** + * Namespace slashing. + * @memberof cosmos + * @namespace + */ + + cosmos.slashing = (function(slashing) { + + /** + * Namespace v1beta1. + * @memberof cosmos.slashing + * @namespace + */ + + slashing.v1beta1 = (function(v1beta1) { + + v1beta1.Msg = (function(Msg) { + + /** + * Constructs a new Msg service. + * @memberof cosmos.slashing.v1beta1 + * @classdesc Represents a Msg + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Msg(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Msg.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Msg; + + /** + * Creates new Msg service using the specified rpc implementation. + * @function create + * @memberof cosmos.slashing.v1beta1.Msg + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Msg} RPC service. Useful where requests and/or responses are streamed. + */ + Msg.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link cosmos.slashing.v1beta1.Msg#unjail}. + * @memberof cosmos.slashing.v1beta1.Msg + * @typedef UnjailCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.slashing.v1beta1.IMsgUnjailResponse} [response] MsgUnjailResponse + */ + + /** + * Calls Unjail. + * @function unjail + * @memberof cosmos.slashing.v1beta1.Msg + * @instance + * @param {cosmos.slashing.v1beta1.IMsgUnjail} request MsgUnjail message or plain object + * @param {cosmos.slashing.v1beta1.Msg.UnjailCallback} callback Node-style callback called with the error, if any, and MsgUnjailResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Msg.prototype.unjail = function unjail(request, callback) { + return this.rpcCall(unjail, $root.cosmos.slashing.v1beta1.MsgUnjail, $root.cosmos.slashing.v1beta1.MsgUnjailResponse, request, callback); + }, "name", { value: "Unjail" }); + + /** + * Calls Unjail. + * @function unjail + * @memberof cosmos.slashing.v1beta1.Msg + * @instance + * @param {cosmos.slashing.v1beta1.IMsgUnjail} request MsgUnjail message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Msg; + })(v1beta1.Msg || {}); + + v1beta1.MsgUnjail = (function(MsgUnjail) { + + /** + * Properties of a MsgUnjail. + * @memberof cosmos.slashing.v1beta1 + * @interface IMsgUnjail + * @property {string|null} [validatorAddr] MsgUnjail validatorAddr + */ + + /** + * Constructs a new MsgUnjail. + * @memberof cosmos.slashing.v1beta1 + * @classdesc Represents a MsgUnjail. + * @implements IMsgUnjail + * @constructor + * @param {cosmos.slashing.v1beta1.IMsgUnjail=} [properties] Properties to set + */ + function MsgUnjail(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgUnjail validatorAddr. + * @member {string} validatorAddr + * @memberof cosmos.slashing.v1beta1.MsgUnjail + * @instance + */ + MsgUnjail.prototype.validatorAddr = ""; + + /** + * Creates a new MsgUnjail instance using the specified properties. + * @function create + * @memberof cosmos.slashing.v1beta1.MsgUnjail + * @static + * @param {cosmos.slashing.v1beta1.IMsgUnjail=} [properties] Properties to set + * @returns {cosmos.slashing.v1beta1.MsgUnjail} MsgUnjail instance + */ + MsgUnjail.create = function create(properties) { + return new MsgUnjail(properties); + }; + + /** + * Encodes the specified MsgUnjail message. Does not implicitly {@link cosmos.slashing.v1beta1.MsgUnjail.verify|verify} messages. + * @function encode + * @memberof cosmos.slashing.v1beta1.MsgUnjail + * @static + * @param {cosmos.slashing.v1beta1.IMsgUnjail} message MsgUnjail message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgUnjail.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.validatorAddr != null && Object.hasOwnProperty.call(message, "validatorAddr")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.validatorAddr); + return writer; + }; + + /** + * Encodes the specified MsgUnjail message, length delimited. Does not implicitly {@link cosmos.slashing.v1beta1.MsgUnjail.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.slashing.v1beta1.MsgUnjail + * @static + * @param {cosmos.slashing.v1beta1.IMsgUnjail} message MsgUnjail message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgUnjail.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgUnjail message from the specified reader or buffer. + * @function decode + * @memberof cosmos.slashing.v1beta1.MsgUnjail + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.slashing.v1beta1.MsgUnjail} MsgUnjail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgUnjail.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.slashing.v1beta1.MsgUnjail(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.validatorAddr = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgUnjail message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.slashing.v1beta1.MsgUnjail + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.slashing.v1beta1.MsgUnjail} MsgUnjail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgUnjail.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgUnjail message. + * @function verify + * @memberof cosmos.slashing.v1beta1.MsgUnjail + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgUnjail.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.validatorAddr != null && message.hasOwnProperty("validatorAddr")) + if (!$util.isString(message.validatorAddr)) + return "validatorAddr: string expected"; + return null; + }; + + /** + * Creates a MsgUnjail message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.slashing.v1beta1.MsgUnjail + * @static + * @param {Object.} object Plain object + * @returns {cosmos.slashing.v1beta1.MsgUnjail} MsgUnjail + */ + MsgUnjail.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.slashing.v1beta1.MsgUnjail) + return object; + var message = new $root.cosmos.slashing.v1beta1.MsgUnjail(); + if (object.validatorAddr != null) + message.validatorAddr = String(object.validatorAddr); + return message; + }; + + /** + * Creates a plain object from a MsgUnjail message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.slashing.v1beta1.MsgUnjail + * @static + * @param {cosmos.slashing.v1beta1.MsgUnjail} message MsgUnjail + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgUnjail.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.validatorAddr = ""; + if (message.validatorAddr != null && message.hasOwnProperty("validatorAddr")) + object.validatorAddr = message.validatorAddr; + return object; + }; + + /** + * Converts this MsgUnjail to JSON. + * @function toJSON + * @memberof cosmos.slashing.v1beta1.MsgUnjail + * @instance + * @returns {Object.} JSON object + */ + MsgUnjail.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgUnjail; + })(v1beta1.MsgUnjail || {}); + + v1beta1.MsgUnjailResponse = (function(MsgUnjailResponse) { + + /** + * Properties of a MsgUnjailResponse. + * @memberof cosmos.slashing.v1beta1 + * @interface IMsgUnjailResponse + */ + + /** + * Constructs a new MsgUnjailResponse. + * @memberof cosmos.slashing.v1beta1 + * @classdesc Represents a MsgUnjailResponse. + * @implements IMsgUnjailResponse + * @constructor + * @param {cosmos.slashing.v1beta1.IMsgUnjailResponse=} [properties] Properties to set + */ + function MsgUnjailResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new MsgUnjailResponse instance using the specified properties. + * @function create + * @memberof cosmos.slashing.v1beta1.MsgUnjailResponse + * @static + * @param {cosmos.slashing.v1beta1.IMsgUnjailResponse=} [properties] Properties to set + * @returns {cosmos.slashing.v1beta1.MsgUnjailResponse} MsgUnjailResponse instance + */ + MsgUnjailResponse.create = function create(properties) { + return new MsgUnjailResponse(properties); + }; + + /** + * Encodes the specified MsgUnjailResponse message. Does not implicitly {@link cosmos.slashing.v1beta1.MsgUnjailResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.slashing.v1beta1.MsgUnjailResponse + * @static + * @param {cosmos.slashing.v1beta1.IMsgUnjailResponse} message MsgUnjailResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgUnjailResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MsgUnjailResponse message, length delimited. Does not implicitly {@link cosmos.slashing.v1beta1.MsgUnjailResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.slashing.v1beta1.MsgUnjailResponse + * @static + * @param {cosmos.slashing.v1beta1.IMsgUnjailResponse} message MsgUnjailResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgUnjailResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgUnjailResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.slashing.v1beta1.MsgUnjailResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.slashing.v1beta1.MsgUnjailResponse} MsgUnjailResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgUnjailResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.slashing.v1beta1.MsgUnjailResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgUnjailResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.slashing.v1beta1.MsgUnjailResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.slashing.v1beta1.MsgUnjailResponse} MsgUnjailResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgUnjailResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgUnjailResponse message. + * @function verify + * @memberof cosmos.slashing.v1beta1.MsgUnjailResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgUnjailResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MsgUnjailResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.slashing.v1beta1.MsgUnjailResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.slashing.v1beta1.MsgUnjailResponse} MsgUnjailResponse + */ + MsgUnjailResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.slashing.v1beta1.MsgUnjailResponse) + return object; + return new $root.cosmos.slashing.v1beta1.MsgUnjailResponse(); + }; + + /** + * Creates a plain object from a MsgUnjailResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.slashing.v1beta1.MsgUnjailResponse + * @static + * @param {cosmos.slashing.v1beta1.MsgUnjailResponse} message MsgUnjailResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgUnjailResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MsgUnjailResponse to JSON. + * @function toJSON + * @memberof cosmos.slashing.v1beta1.MsgUnjailResponse + * @instance + * @returns {Object.} JSON object + */ + MsgUnjailResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgUnjailResponse; + })(v1beta1.MsgUnjailResponse || {}); + + return v1beta1; + })(slashing.v1beta1 || {}); + + return slashing; + })(cosmos.slashing || {}); + + /** + * Namespace vesting. + * @memberof cosmos + * @namespace + */ + + cosmos.vesting = (function(vesting) { + + /** + * Namespace v1beta1. + * @memberof cosmos.vesting + * @namespace + */ + + vesting.v1beta1 = (function(v1beta1) { + + v1beta1.Msg = (function(Msg) { + + /** + * Constructs a new Msg service. + * @memberof cosmos.vesting.v1beta1 + * @classdesc Represents a Msg + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Msg(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Msg.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Msg; + + /** + * Creates new Msg service using the specified rpc implementation. + * @function create + * @memberof cosmos.vesting.v1beta1.Msg + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Msg} RPC service. Useful where requests and/or responses are streamed. + */ + Msg.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link cosmos.vesting.v1beta1.Msg#createVestingAccount}. + * @memberof cosmos.vesting.v1beta1.Msg + * @typedef CreateVestingAccountCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.vesting.v1beta1.IMsgCreateVestingAccountResponse} [response] MsgCreateVestingAccountResponse + */ + + /** + * Calls CreateVestingAccount. + * @function createVestingAccount + * @memberof cosmos.vesting.v1beta1.Msg + * @instance + * @param {cosmos.vesting.v1beta1.IMsgCreateVestingAccount} request MsgCreateVestingAccount message or plain object + * @param {cosmos.vesting.v1beta1.Msg.CreateVestingAccountCallback} callback Node-style callback called with the error, if any, and MsgCreateVestingAccountResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Msg.prototype.createVestingAccount = function createVestingAccount(request, callback) { + return this.rpcCall(createVestingAccount, $root.cosmos.vesting.v1beta1.MsgCreateVestingAccount, $root.cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse, request, callback); + }, "name", { value: "CreateVestingAccount" }); + + /** + * Calls CreateVestingAccount. + * @function createVestingAccount + * @memberof cosmos.vesting.v1beta1.Msg + * @instance + * @param {cosmos.vesting.v1beta1.IMsgCreateVestingAccount} request MsgCreateVestingAccount message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Msg; + })(v1beta1.Msg || {}); + + v1beta1.MsgCreateVestingAccount = (function(MsgCreateVestingAccount) { + + /** + * Properties of a MsgCreateVestingAccount. + * @memberof cosmos.vesting.v1beta1 + * @interface IMsgCreateVestingAccount + * @property {string|null} [fromAddress] MsgCreateVestingAccount fromAddress + * @property {string|null} [toAddress] MsgCreateVestingAccount toAddress + * @property {Array.|null} [amount] MsgCreateVestingAccount amount + * @property {number|Long|null} [endTime] MsgCreateVestingAccount endTime + * @property {boolean|null} [delayed] MsgCreateVestingAccount delayed + */ + + /** + * Constructs a new MsgCreateVestingAccount. + * @memberof cosmos.vesting.v1beta1 + * @classdesc Represents a MsgCreateVestingAccount. + * @implements IMsgCreateVestingAccount + * @constructor + * @param {cosmos.vesting.v1beta1.IMsgCreateVestingAccount=} [properties] Properties to set + */ + function MsgCreateVestingAccount(properties) { + this.amount = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgCreateVestingAccount fromAddress. + * @member {string} fromAddress + * @memberof cosmos.vesting.v1beta1.MsgCreateVestingAccount + * @instance + */ + MsgCreateVestingAccount.prototype.fromAddress = ""; + + /** + * MsgCreateVestingAccount toAddress. + * @member {string} toAddress + * @memberof cosmos.vesting.v1beta1.MsgCreateVestingAccount + * @instance + */ + MsgCreateVestingAccount.prototype.toAddress = ""; + + /** + * MsgCreateVestingAccount amount. + * @member {Array.} amount + * @memberof cosmos.vesting.v1beta1.MsgCreateVestingAccount + * @instance + */ + MsgCreateVestingAccount.prototype.amount = $util.emptyArray; + + /** + * MsgCreateVestingAccount endTime. + * @member {number|Long} endTime + * @memberof cosmos.vesting.v1beta1.MsgCreateVestingAccount + * @instance + */ + MsgCreateVestingAccount.prototype.endTime = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * MsgCreateVestingAccount delayed. + * @member {boolean} delayed + * @memberof cosmos.vesting.v1beta1.MsgCreateVestingAccount + * @instance + */ + MsgCreateVestingAccount.prototype.delayed = false; + + /** + * Creates a new MsgCreateVestingAccount instance using the specified properties. + * @function create + * @memberof cosmos.vesting.v1beta1.MsgCreateVestingAccount + * @static + * @param {cosmos.vesting.v1beta1.IMsgCreateVestingAccount=} [properties] Properties to set + * @returns {cosmos.vesting.v1beta1.MsgCreateVestingAccount} MsgCreateVestingAccount instance + */ + MsgCreateVestingAccount.create = function create(properties) { + return new MsgCreateVestingAccount(properties); + }; + + /** + * Encodes the specified MsgCreateVestingAccount message. Does not implicitly {@link cosmos.vesting.v1beta1.MsgCreateVestingAccount.verify|verify} messages. + * @function encode + * @memberof cosmos.vesting.v1beta1.MsgCreateVestingAccount + * @static + * @param {cosmos.vesting.v1beta1.IMsgCreateVestingAccount} message MsgCreateVestingAccount message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgCreateVestingAccount.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fromAddress != null && Object.hasOwnProperty.call(message, "fromAddress")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.fromAddress); + if (message.toAddress != null && Object.hasOwnProperty.call(message, "toAddress")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.toAddress); + if (message.amount != null && message.amount.length) + for (var i = 0; i < message.amount.length; ++i) + $root.cosmos.base.v1beta1.Coin.encode(message.amount[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.endTime); + if (message.delayed != null && Object.hasOwnProperty.call(message, "delayed")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.delayed); + return writer; + }; + + /** + * Encodes the specified MsgCreateVestingAccount message, length delimited. Does not implicitly {@link cosmos.vesting.v1beta1.MsgCreateVestingAccount.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.vesting.v1beta1.MsgCreateVestingAccount + * @static + * @param {cosmos.vesting.v1beta1.IMsgCreateVestingAccount} message MsgCreateVestingAccount message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgCreateVestingAccount.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgCreateVestingAccount message from the specified reader or buffer. + * @function decode + * @memberof cosmos.vesting.v1beta1.MsgCreateVestingAccount + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.vesting.v1beta1.MsgCreateVestingAccount} MsgCreateVestingAccount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgCreateVestingAccount.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.vesting.v1beta1.MsgCreateVestingAccount(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.fromAddress = reader.string(); + break; + case 2: + message.toAddress = reader.string(); + break; + case 3: + if (!(message.amount && message.amount.length)) + message.amount = []; + message.amount.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); + break; + case 4: + message.endTime = reader.int64(); + break; + case 5: + message.delayed = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgCreateVestingAccount message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.vesting.v1beta1.MsgCreateVestingAccount + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.vesting.v1beta1.MsgCreateVestingAccount} MsgCreateVestingAccount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgCreateVestingAccount.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgCreateVestingAccount message. + * @function verify + * @memberof cosmos.vesting.v1beta1.MsgCreateVestingAccount + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgCreateVestingAccount.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fromAddress != null && message.hasOwnProperty("fromAddress")) + if (!$util.isString(message.fromAddress)) + return "fromAddress: string expected"; + if (message.toAddress != null && message.hasOwnProperty("toAddress")) + if (!$util.isString(message.toAddress)) + return "toAddress: string expected"; + if (message.amount != null && message.hasOwnProperty("amount")) { + if (!Array.isArray(message.amount)) + return "amount: array expected"; + for (var i = 0; i < message.amount.length; ++i) { + var error = $root.cosmos.base.v1beta1.Coin.verify(message.amount[i]); + if (error) + return "amount." + error; + } + } + if (message.endTime != null && message.hasOwnProperty("endTime")) + if (!$util.isInteger(message.endTime) && !(message.endTime && $util.isInteger(message.endTime.low) && $util.isInteger(message.endTime.high))) + return "endTime: integer|Long expected"; + if (message.delayed != null && message.hasOwnProperty("delayed")) + if (typeof message.delayed !== "boolean") + return "delayed: boolean expected"; + return null; + }; + + /** + * Creates a MsgCreateVestingAccount message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.vesting.v1beta1.MsgCreateVestingAccount + * @static + * @param {Object.} object Plain object + * @returns {cosmos.vesting.v1beta1.MsgCreateVestingAccount} MsgCreateVestingAccount + */ + MsgCreateVestingAccount.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.vesting.v1beta1.MsgCreateVestingAccount) + return object; + var message = new $root.cosmos.vesting.v1beta1.MsgCreateVestingAccount(); + if (object.fromAddress != null) + message.fromAddress = String(object.fromAddress); + if (object.toAddress != null) + message.toAddress = String(object.toAddress); + if (object.amount) { + if (!Array.isArray(object.amount)) + throw TypeError(".cosmos.vesting.v1beta1.MsgCreateVestingAccount.amount: array expected"); + message.amount = []; + for (var i = 0; i < object.amount.length; ++i) { + if (typeof object.amount[i] !== "object") + throw TypeError(".cosmos.vesting.v1beta1.MsgCreateVestingAccount.amount: object expected"); + message.amount[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.amount[i]); + } + } + if (object.endTime != null) + if ($util.Long) + (message.endTime = $util.Long.fromValue(object.endTime)).unsigned = false; + else if (typeof object.endTime === "string") + message.endTime = parseInt(object.endTime, 10); + else if (typeof object.endTime === "number") + message.endTime = object.endTime; + else if (typeof object.endTime === "object") + message.endTime = new $util.LongBits(object.endTime.low >>> 0, object.endTime.high >>> 0).toNumber(); + if (object.delayed != null) + message.delayed = Boolean(object.delayed); + return message; + }; + + /** + * Creates a plain object from a MsgCreateVestingAccount message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.vesting.v1beta1.MsgCreateVestingAccount + * @static + * @param {cosmos.vesting.v1beta1.MsgCreateVestingAccount} message MsgCreateVestingAccount + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgCreateVestingAccount.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.amount = []; + if (options.defaults) { + object.fromAddress = ""; + object.toAddress = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.endTime = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.endTime = options.longs === String ? "0" : 0; + object.delayed = false; + } + if (message.fromAddress != null && message.hasOwnProperty("fromAddress")) + object.fromAddress = message.fromAddress; + if (message.toAddress != null && message.hasOwnProperty("toAddress")) + object.toAddress = message.toAddress; + if (message.amount && message.amount.length) { + object.amount = []; + for (var j = 0; j < message.amount.length; ++j) + object.amount[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.amount[j], options); + } + if (message.endTime != null && message.hasOwnProperty("endTime")) + if (typeof message.endTime === "number") + object.endTime = options.longs === String ? String(message.endTime) : message.endTime; + else + object.endTime = options.longs === String ? $util.Long.prototype.toString.call(message.endTime) : options.longs === Number ? new $util.LongBits(message.endTime.low >>> 0, message.endTime.high >>> 0).toNumber() : message.endTime; + if (message.delayed != null && message.hasOwnProperty("delayed")) + object.delayed = message.delayed; + return object; + }; + + /** + * Converts this MsgCreateVestingAccount to JSON. + * @function toJSON + * @memberof cosmos.vesting.v1beta1.MsgCreateVestingAccount + * @instance + * @returns {Object.} JSON object + */ + MsgCreateVestingAccount.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgCreateVestingAccount; + })(v1beta1.MsgCreateVestingAccount || {}); + + v1beta1.MsgCreateVestingAccountResponse = (function(MsgCreateVestingAccountResponse) { + + /** + * Properties of a MsgCreateVestingAccountResponse. + * @memberof cosmos.vesting.v1beta1 + * @interface IMsgCreateVestingAccountResponse + */ + + /** + * Constructs a new MsgCreateVestingAccountResponse. + * @memberof cosmos.vesting.v1beta1 + * @classdesc Represents a MsgCreateVestingAccountResponse. + * @implements IMsgCreateVestingAccountResponse + * @constructor + * @param {cosmos.vesting.v1beta1.IMsgCreateVestingAccountResponse=} [properties] Properties to set + */ + function MsgCreateVestingAccountResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new MsgCreateVestingAccountResponse instance using the specified properties. + * @function create + * @memberof cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse + * @static + * @param {cosmos.vesting.v1beta1.IMsgCreateVestingAccountResponse=} [properties] Properties to set + * @returns {cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse} MsgCreateVestingAccountResponse instance + */ + MsgCreateVestingAccountResponse.create = function create(properties) { + return new MsgCreateVestingAccountResponse(properties); + }; + + /** + * Encodes the specified MsgCreateVestingAccountResponse message. Does not implicitly {@link cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse + * @static + * @param {cosmos.vesting.v1beta1.IMsgCreateVestingAccountResponse} message MsgCreateVestingAccountResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgCreateVestingAccountResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MsgCreateVestingAccountResponse message, length delimited. Does not implicitly {@link cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse + * @static + * @param {cosmos.vesting.v1beta1.IMsgCreateVestingAccountResponse} message MsgCreateVestingAccountResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgCreateVestingAccountResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgCreateVestingAccountResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse} MsgCreateVestingAccountResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgCreateVestingAccountResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgCreateVestingAccountResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse} MsgCreateVestingAccountResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgCreateVestingAccountResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgCreateVestingAccountResponse message. + * @function verify + * @memberof cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgCreateVestingAccountResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MsgCreateVestingAccountResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse} MsgCreateVestingAccountResponse + */ + MsgCreateVestingAccountResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse) + return object; + return new $root.cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse(); + }; + + /** + * Creates a plain object from a MsgCreateVestingAccountResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse + * @static + * @param {cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse} message MsgCreateVestingAccountResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgCreateVestingAccountResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MsgCreateVestingAccountResponse to JSON. + * @function toJSON + * @memberof cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse + * @instance + * @returns {Object.} JSON object + */ + MsgCreateVestingAccountResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgCreateVestingAccountResponse; + })(v1beta1.MsgCreateVestingAccountResponse || {}); + + return v1beta1; + })(vesting.v1beta1 || {}); + + return vesting; + })(cosmos.vesting || {}); + + return cosmos; +})($root.cosmos || {}); + +/** + * Namespace google. + * @exports google + * @namespace + */ + +$root.google = (function(google) { + + /** + * Namespace protobuf. + * @memberof google + * @namespace + */ + + google.protobuf = (function(protobuf) { + + protobuf.Timestamp = (function(Timestamp) { + + /** + * Properties of a Timestamp. + * @memberof google.protobuf + * @interface ITimestamp + * @property {number|Long|null} [seconds] Timestamp seconds + * @property {number|null} [nanos] Timestamp nanos + */ + + /** + * Constructs a new Timestamp. + * @memberof google.protobuf + * @classdesc Represents a Timestamp. + * @implements ITimestamp + * @constructor + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + */ + function Timestamp(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Timestamp seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Timestamp nanos. + * @member {number} nanos + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.nanos = 0; + + /** + * Creates a new Timestamp instance using the specified properties. + * @function create + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + * @returns {google.protobuf.Timestamp} Timestamp instance + */ + Timestamp.create = function create(properties) { + return new Timestamp(properties); + }; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.seconds = reader.int64(); + break; + case 2: + message.nanos = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Timestamp message. + * @function verify + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Timestamp.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Timestamp} Timestamp + */ + Timestamp.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Timestamp) + return object; + var message = new $root.google.protobuf.Timestamp(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.Timestamp} message Timestamp + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Timestamp.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Timestamp to JSON. + * @function toJSON + * @memberof google.protobuf.Timestamp + * @instance + * @returns {Object.} JSON object + */ + Timestamp.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Timestamp; + })(protobuf.Timestamp || {}); + + protobuf.Any = (function(Any) { + + /** + * Properties of an Any. + * @memberof google.protobuf + * @interface IAny + * @property {string|null} [type_url] Any type_url + * @property {Uint8Array|null} [value] Any value + */ + + /** + * Constructs a new Any. + * @memberof google.protobuf + * @classdesc Represents an Any. + * @implements IAny + * @constructor + * @param {google.protobuf.IAny=} [properties] Properties to set + */ + function Any(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Any type_url. + * @member {string} type_url + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.type_url = ""; + + /** + * Any value. + * @member {Uint8Array} value + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.value = $util.newBuffer([]); + + /** + * Creates a new Any instance using the specified properties. + * @function create + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny=} [properties] Properties to set + * @returns {google.protobuf.Any} Any instance + */ + Any.create = function create(properties) { + return new Any(properties); + }; + + /** + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Any.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type_url != null && Object.hasOwnProperty.call(message, "type_url")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type_url); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); + return writer; + }; + + /** + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Any.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Any message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Any + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Any} Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Any.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Any(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type_url = reader.string(); + break; + case 2: + message.value = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Any message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Any + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Any} Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Any.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Any message. + * @function verify + * @memberof google.protobuf.Any + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Any.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type_url != null && message.hasOwnProperty("type_url")) + if (!$util.isString(message.type_url)) + return "type_url: string expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; + return null; + }; + + /** + * Creates an Any message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Any + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Any} Any + */ + Any.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Any) + return object; + var message = new $root.google.protobuf.Any(); + if (object.type_url != null) + message.type_url = String(object.type_url); + if (object.value != null) + if (typeof object.value === "string") + $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); + else if (object.value.length) + message.value = object.value; + return message; + }; + + /** + * Creates a plain object from an Any message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.Any} message Any + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Any.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type_url = ""; + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + } + if (message.type_url != null && message.hasOwnProperty("type_url")) + object.type_url = message.type_url; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + return object; + }; + + /** + * Converts this Any to JSON. + * @function toJSON + * @memberof google.protobuf.Any + * @instance + * @returns {Object.} JSON object + */ + Any.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Any; + })(protobuf.Any || {}); + + protobuf.Duration = (function(Duration) { + + /** + * Properties of a Duration. + * @memberof google.protobuf + * @interface IDuration + * @property {number|Long|null} [seconds] Duration seconds + * @property {number|null} [nanos] Duration nanos + */ + + /** + * Constructs a new Duration. + * @memberof google.protobuf + * @classdesc Represents a Duration. + * @implements IDuration + * @constructor + * @param {google.protobuf.IDuration=} [properties] Properties to set + */ + function Duration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Duration seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Duration nanos. + * @member {number} nanos + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.nanos = 0; + + /** + * Creates a new Duration instance using the specified properties. + * @function create + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration=} [properties] Properties to set + * @returns {google.protobuf.Duration} Duration instance + */ + Duration.create = function create(properties) { + return new Duration(properties); + }; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.seconds = reader.int64(); + break; + case 2: + message.nanos = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Duration message. + * @function verify + * @memberof google.protobuf.Duration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Duration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Duration + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Duration} Duration + */ + Duration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Duration) + return object; + var message = new $root.google.protobuf.Duration(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.Duration} message Duration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Duration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Duration to JSON. + * @function toJSON + * @memberof google.protobuf.Duration + * @instance + * @returns {Object.} JSON object + */ + Duration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Duration; + })(protobuf.Duration || {}); + + return protobuf; + })(google.protobuf || {}); + + return google; +})($root.google || {}); + +/** + * Namespace tendermint. + * @exports tendermint + * @namespace + */ + +$root.tendermint = (function(tendermint) { + + /** + * Namespace abci. + * @memberof tendermint + * @namespace + */ + + tendermint.abci = (function(abci) { + + abci.Request = (function(Request) { + + /** + * Properties of a Request. + * @memberof tendermint.abci + * @interface IRequest + * @property {tendermint.abci.IRequestEcho|null} [echo] Request echo + * @property {tendermint.abci.IRequestFlush|null} [flush] Request flush + * @property {tendermint.abci.IRequestInfo|null} [info] Request info + * @property {tendermint.abci.IRequestSetOption|null} [setOption] Request setOption + * @property {tendermint.abci.IRequestInitChain|null} [initChain] Request initChain + * @property {tendermint.abci.IRequestQuery|null} [query] Request query + * @property {tendermint.abci.IRequestBeginBlock|null} [beginBlock] Request beginBlock + * @property {tendermint.abci.IRequestCheckTx|null} [checkTx] Request checkTx + * @property {tendermint.abci.IRequestDeliverTx|null} [deliverTx] Request deliverTx + * @property {tendermint.abci.IRequestEndBlock|null} [endBlock] Request endBlock + * @property {tendermint.abci.IRequestCommit|null} [commit] Request commit + * @property {tendermint.abci.IRequestListSnapshots|null} [listSnapshots] Request listSnapshots + * @property {tendermint.abci.IRequestOfferSnapshot|null} [offerSnapshot] Request offerSnapshot + * @property {tendermint.abci.IRequestLoadSnapshotChunk|null} [loadSnapshotChunk] Request loadSnapshotChunk + * @property {tendermint.abci.IRequestApplySnapshotChunk|null} [applySnapshotChunk] Request applySnapshotChunk + */ + + /** + * Constructs a new Request. + * @memberof tendermint.abci + * @classdesc Represents a Request. + * @implements IRequest + * @constructor + * @param {tendermint.abci.IRequest=} [properties] Properties to set + */ + function Request(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Request echo. + * @member {tendermint.abci.IRequestEcho|null|undefined} echo + * @memberof tendermint.abci.Request + * @instance + */ + Request.prototype.echo = null; + + /** + * Request flush. + * @member {tendermint.abci.IRequestFlush|null|undefined} flush + * @memberof tendermint.abci.Request + * @instance + */ + Request.prototype.flush = null; + + /** + * Request info. + * @member {tendermint.abci.IRequestInfo|null|undefined} info + * @memberof tendermint.abci.Request + * @instance + */ + Request.prototype.info = null; + + /** + * Request setOption. + * @member {tendermint.abci.IRequestSetOption|null|undefined} setOption + * @memberof tendermint.abci.Request + * @instance + */ + Request.prototype.setOption = null; + + /** + * Request initChain. + * @member {tendermint.abci.IRequestInitChain|null|undefined} initChain + * @memberof tendermint.abci.Request + * @instance + */ + Request.prototype.initChain = null; + + /** + * Request query. + * @member {tendermint.abci.IRequestQuery|null|undefined} query + * @memberof tendermint.abci.Request + * @instance + */ + Request.prototype.query = null; + + /** + * Request beginBlock. + * @member {tendermint.abci.IRequestBeginBlock|null|undefined} beginBlock + * @memberof tendermint.abci.Request + * @instance + */ + Request.prototype.beginBlock = null; + + /** + * Request checkTx. + * @member {tendermint.abci.IRequestCheckTx|null|undefined} checkTx + * @memberof tendermint.abci.Request + * @instance + */ + Request.prototype.checkTx = null; + + /** + * Request deliverTx. + * @member {tendermint.abci.IRequestDeliverTx|null|undefined} deliverTx + * @memberof tendermint.abci.Request + * @instance + */ + Request.prototype.deliverTx = null; + + /** + * Request endBlock. + * @member {tendermint.abci.IRequestEndBlock|null|undefined} endBlock + * @memberof tendermint.abci.Request + * @instance + */ + Request.prototype.endBlock = null; + + /** + * Request commit. + * @member {tendermint.abci.IRequestCommit|null|undefined} commit + * @memberof tendermint.abci.Request + * @instance + */ + Request.prototype.commit = null; + + /** + * Request listSnapshots. + * @member {tendermint.abci.IRequestListSnapshots|null|undefined} listSnapshots + * @memberof tendermint.abci.Request + * @instance + */ + Request.prototype.listSnapshots = null; + + /** + * Request offerSnapshot. + * @member {tendermint.abci.IRequestOfferSnapshot|null|undefined} offerSnapshot + * @memberof tendermint.abci.Request + * @instance + */ + Request.prototype.offerSnapshot = null; + + /** + * Request loadSnapshotChunk. + * @member {tendermint.abci.IRequestLoadSnapshotChunk|null|undefined} loadSnapshotChunk + * @memberof tendermint.abci.Request + * @instance + */ + Request.prototype.loadSnapshotChunk = null; + + /** + * Request applySnapshotChunk. + * @member {tendermint.abci.IRequestApplySnapshotChunk|null|undefined} applySnapshotChunk + * @memberof tendermint.abci.Request + * @instance + */ + Request.prototype.applySnapshotChunk = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Request value. + * @member {"echo"|"flush"|"info"|"setOption"|"initChain"|"query"|"beginBlock"|"checkTx"|"deliverTx"|"endBlock"|"commit"|"listSnapshots"|"offerSnapshot"|"loadSnapshotChunk"|"applySnapshotChunk"|undefined} value + * @memberof tendermint.abci.Request + * @instance + */ + Object.defineProperty(Request.prototype, "value", { + get: $util.oneOfGetter($oneOfFields = ["echo", "flush", "info", "setOption", "initChain", "query", "beginBlock", "checkTx", "deliverTx", "endBlock", "commit", "listSnapshots", "offerSnapshot", "loadSnapshotChunk", "applySnapshotChunk"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Request instance using the specified properties. + * @function create + * @memberof tendermint.abci.Request + * @static + * @param {tendermint.abci.IRequest=} [properties] Properties to set + * @returns {tendermint.abci.Request} Request instance + */ + Request.create = function create(properties) { + return new Request(properties); + }; + + /** + * Encodes the specified Request message. Does not implicitly {@link tendermint.abci.Request.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.Request + * @static + * @param {tendermint.abci.IRequest} message Request message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Request.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.echo != null && Object.hasOwnProperty.call(message, "echo")) + $root.tendermint.abci.RequestEcho.encode(message.echo, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.flush != null && Object.hasOwnProperty.call(message, "flush")) + $root.tendermint.abci.RequestFlush.encode(message.flush, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.info != null && Object.hasOwnProperty.call(message, "info")) + $root.tendermint.abci.RequestInfo.encode(message.info, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.setOption != null && Object.hasOwnProperty.call(message, "setOption")) + $root.tendermint.abci.RequestSetOption.encode(message.setOption, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.initChain != null && Object.hasOwnProperty.call(message, "initChain")) + $root.tendermint.abci.RequestInitChain.encode(message.initChain, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.query != null && Object.hasOwnProperty.call(message, "query")) + $root.tendermint.abci.RequestQuery.encode(message.query, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.beginBlock != null && Object.hasOwnProperty.call(message, "beginBlock")) + $root.tendermint.abci.RequestBeginBlock.encode(message.beginBlock, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.checkTx != null && Object.hasOwnProperty.call(message, "checkTx")) + $root.tendermint.abci.RequestCheckTx.encode(message.checkTx, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.deliverTx != null && Object.hasOwnProperty.call(message, "deliverTx")) + $root.tendermint.abci.RequestDeliverTx.encode(message.deliverTx, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.endBlock != null && Object.hasOwnProperty.call(message, "endBlock")) + $root.tendermint.abci.RequestEndBlock.encode(message.endBlock, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.commit != null && Object.hasOwnProperty.call(message, "commit")) + $root.tendermint.abci.RequestCommit.encode(message.commit, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.listSnapshots != null && Object.hasOwnProperty.call(message, "listSnapshots")) + $root.tendermint.abci.RequestListSnapshots.encode(message.listSnapshots, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.offerSnapshot != null && Object.hasOwnProperty.call(message, "offerSnapshot")) + $root.tendermint.abci.RequestOfferSnapshot.encode(message.offerSnapshot, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.loadSnapshotChunk != null && Object.hasOwnProperty.call(message, "loadSnapshotChunk")) + $root.tendermint.abci.RequestLoadSnapshotChunk.encode(message.loadSnapshotChunk, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.applySnapshotChunk != null && Object.hasOwnProperty.call(message, "applySnapshotChunk")) + $root.tendermint.abci.RequestApplySnapshotChunk.encode(message.applySnapshotChunk, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Request message, length delimited. Does not implicitly {@link tendermint.abci.Request.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.Request + * @static + * @param {tendermint.abci.IRequest} message Request message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Request.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Request message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.Request + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.Request} Request + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Request.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.Request(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.echo = $root.tendermint.abci.RequestEcho.decode(reader, reader.uint32()); + break; + case 2: + message.flush = $root.tendermint.abci.RequestFlush.decode(reader, reader.uint32()); + break; + case 3: + message.info = $root.tendermint.abci.RequestInfo.decode(reader, reader.uint32()); + break; + case 4: + message.setOption = $root.tendermint.abci.RequestSetOption.decode(reader, reader.uint32()); + break; + case 5: + message.initChain = $root.tendermint.abci.RequestInitChain.decode(reader, reader.uint32()); + break; + case 6: + message.query = $root.tendermint.abci.RequestQuery.decode(reader, reader.uint32()); + break; + case 7: + message.beginBlock = $root.tendermint.abci.RequestBeginBlock.decode(reader, reader.uint32()); + break; + case 8: + message.checkTx = $root.tendermint.abci.RequestCheckTx.decode(reader, reader.uint32()); + break; + case 9: + message.deliverTx = $root.tendermint.abci.RequestDeliverTx.decode(reader, reader.uint32()); + break; + case 10: + message.endBlock = $root.tendermint.abci.RequestEndBlock.decode(reader, reader.uint32()); + break; + case 11: + message.commit = $root.tendermint.abci.RequestCommit.decode(reader, reader.uint32()); + break; + case 12: + message.listSnapshots = $root.tendermint.abci.RequestListSnapshots.decode(reader, reader.uint32()); + break; + case 13: + message.offerSnapshot = $root.tendermint.abci.RequestOfferSnapshot.decode(reader, reader.uint32()); + break; + case 14: + message.loadSnapshotChunk = $root.tendermint.abci.RequestLoadSnapshotChunk.decode(reader, reader.uint32()); + break; + case 15: + message.applySnapshotChunk = $root.tendermint.abci.RequestApplySnapshotChunk.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Request message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.Request + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.Request} Request + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Request.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Request message. + * @function verify + * @memberof tendermint.abci.Request + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Request.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.echo != null && message.hasOwnProperty("echo")) { + properties.value = 1; + { + var error = $root.tendermint.abci.RequestEcho.verify(message.echo); + if (error) + return "echo." + error; + } + } + if (message.flush != null && message.hasOwnProperty("flush")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.tendermint.abci.RequestFlush.verify(message.flush); + if (error) + return "flush." + error; + } + } + if (message.info != null && message.hasOwnProperty("info")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.tendermint.abci.RequestInfo.verify(message.info); + if (error) + return "info." + error; + } + } + if (message.setOption != null && message.hasOwnProperty("setOption")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.tendermint.abci.RequestSetOption.verify(message.setOption); + if (error) + return "setOption." + error; + } + } + if (message.initChain != null && message.hasOwnProperty("initChain")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.tendermint.abci.RequestInitChain.verify(message.initChain); + if (error) + return "initChain." + error; + } + } + if (message.query != null && message.hasOwnProperty("query")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.tendermint.abci.RequestQuery.verify(message.query); + if (error) + return "query." + error; + } + } + if (message.beginBlock != null && message.hasOwnProperty("beginBlock")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.tendermint.abci.RequestBeginBlock.verify(message.beginBlock); + if (error) + return "beginBlock." + error; + } + } + if (message.checkTx != null && message.hasOwnProperty("checkTx")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.tendermint.abci.RequestCheckTx.verify(message.checkTx); + if (error) + return "checkTx." + error; + } + } + if (message.deliverTx != null && message.hasOwnProperty("deliverTx")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.tendermint.abci.RequestDeliverTx.verify(message.deliverTx); + if (error) + return "deliverTx." + error; + } + } + if (message.endBlock != null && message.hasOwnProperty("endBlock")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.tendermint.abci.RequestEndBlock.verify(message.endBlock); + if (error) + return "endBlock." + error; + } + } + if (message.commit != null && message.hasOwnProperty("commit")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.tendermint.abci.RequestCommit.verify(message.commit); + if (error) + return "commit." + error; + } + } + if (message.listSnapshots != null && message.hasOwnProperty("listSnapshots")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.tendermint.abci.RequestListSnapshots.verify(message.listSnapshots); + if (error) + return "listSnapshots." + error; + } + } + if (message.offerSnapshot != null && message.hasOwnProperty("offerSnapshot")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.tendermint.abci.RequestOfferSnapshot.verify(message.offerSnapshot); + if (error) + return "offerSnapshot." + error; + } + } + if (message.loadSnapshotChunk != null && message.hasOwnProperty("loadSnapshotChunk")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.tendermint.abci.RequestLoadSnapshotChunk.verify(message.loadSnapshotChunk); + if (error) + return "loadSnapshotChunk." + error; + } + } + if (message.applySnapshotChunk != null && message.hasOwnProperty("applySnapshotChunk")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.tendermint.abci.RequestApplySnapshotChunk.verify(message.applySnapshotChunk); + if (error) + return "applySnapshotChunk." + error; + } + } + return null; + }; + + /** + * Creates a Request message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.Request + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.Request} Request + */ + Request.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.Request) + return object; + var message = new $root.tendermint.abci.Request(); + if (object.echo != null) { + if (typeof object.echo !== "object") + throw TypeError(".tendermint.abci.Request.echo: object expected"); + message.echo = $root.tendermint.abci.RequestEcho.fromObject(object.echo); + } + if (object.flush != null) { + if (typeof object.flush !== "object") + throw TypeError(".tendermint.abci.Request.flush: object expected"); + message.flush = $root.tendermint.abci.RequestFlush.fromObject(object.flush); + } + if (object.info != null) { + if (typeof object.info !== "object") + throw TypeError(".tendermint.abci.Request.info: object expected"); + message.info = $root.tendermint.abci.RequestInfo.fromObject(object.info); + } + if (object.setOption != null) { + if (typeof object.setOption !== "object") + throw TypeError(".tendermint.abci.Request.setOption: object expected"); + message.setOption = $root.tendermint.abci.RequestSetOption.fromObject(object.setOption); + } + if (object.initChain != null) { + if (typeof object.initChain !== "object") + throw TypeError(".tendermint.abci.Request.initChain: object expected"); + message.initChain = $root.tendermint.abci.RequestInitChain.fromObject(object.initChain); + } + if (object.query != null) { + if (typeof object.query !== "object") + throw TypeError(".tendermint.abci.Request.query: object expected"); + message.query = $root.tendermint.abci.RequestQuery.fromObject(object.query); + } + if (object.beginBlock != null) { + if (typeof object.beginBlock !== "object") + throw TypeError(".tendermint.abci.Request.beginBlock: object expected"); + message.beginBlock = $root.tendermint.abci.RequestBeginBlock.fromObject(object.beginBlock); + } + if (object.checkTx != null) { + if (typeof object.checkTx !== "object") + throw TypeError(".tendermint.abci.Request.checkTx: object expected"); + message.checkTx = $root.tendermint.abci.RequestCheckTx.fromObject(object.checkTx); + } + if (object.deliverTx != null) { + if (typeof object.deliverTx !== "object") + throw TypeError(".tendermint.abci.Request.deliverTx: object expected"); + message.deliverTx = $root.tendermint.abci.RequestDeliverTx.fromObject(object.deliverTx); + } + if (object.endBlock != null) { + if (typeof object.endBlock !== "object") + throw TypeError(".tendermint.abci.Request.endBlock: object expected"); + message.endBlock = $root.tendermint.abci.RequestEndBlock.fromObject(object.endBlock); + } + if (object.commit != null) { + if (typeof object.commit !== "object") + throw TypeError(".tendermint.abci.Request.commit: object expected"); + message.commit = $root.tendermint.abci.RequestCommit.fromObject(object.commit); + } + if (object.listSnapshots != null) { + if (typeof object.listSnapshots !== "object") + throw TypeError(".tendermint.abci.Request.listSnapshots: object expected"); + message.listSnapshots = $root.tendermint.abci.RequestListSnapshots.fromObject(object.listSnapshots); + } + if (object.offerSnapshot != null) { + if (typeof object.offerSnapshot !== "object") + throw TypeError(".tendermint.abci.Request.offerSnapshot: object expected"); + message.offerSnapshot = $root.tendermint.abci.RequestOfferSnapshot.fromObject(object.offerSnapshot); + } + if (object.loadSnapshotChunk != null) { + if (typeof object.loadSnapshotChunk !== "object") + throw TypeError(".tendermint.abci.Request.loadSnapshotChunk: object expected"); + message.loadSnapshotChunk = $root.tendermint.abci.RequestLoadSnapshotChunk.fromObject(object.loadSnapshotChunk); + } + if (object.applySnapshotChunk != null) { + if (typeof object.applySnapshotChunk !== "object") + throw TypeError(".tendermint.abci.Request.applySnapshotChunk: object expected"); + message.applySnapshotChunk = $root.tendermint.abci.RequestApplySnapshotChunk.fromObject(object.applySnapshotChunk); + } + return message; + }; + + /** + * Creates a plain object from a Request message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.Request + * @static + * @param {tendermint.abci.Request} message Request + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Request.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.echo != null && message.hasOwnProperty("echo")) { + object.echo = $root.tendermint.abci.RequestEcho.toObject(message.echo, options); + if (options.oneofs) + object.value = "echo"; + } + if (message.flush != null && message.hasOwnProperty("flush")) { + object.flush = $root.tendermint.abci.RequestFlush.toObject(message.flush, options); + if (options.oneofs) + object.value = "flush"; + } + if (message.info != null && message.hasOwnProperty("info")) { + object.info = $root.tendermint.abci.RequestInfo.toObject(message.info, options); + if (options.oneofs) + object.value = "info"; + } + if (message.setOption != null && message.hasOwnProperty("setOption")) { + object.setOption = $root.tendermint.abci.RequestSetOption.toObject(message.setOption, options); + if (options.oneofs) + object.value = "setOption"; + } + if (message.initChain != null && message.hasOwnProperty("initChain")) { + object.initChain = $root.tendermint.abci.RequestInitChain.toObject(message.initChain, options); + if (options.oneofs) + object.value = "initChain"; + } + if (message.query != null && message.hasOwnProperty("query")) { + object.query = $root.tendermint.abci.RequestQuery.toObject(message.query, options); + if (options.oneofs) + object.value = "query"; + } + if (message.beginBlock != null && message.hasOwnProperty("beginBlock")) { + object.beginBlock = $root.tendermint.abci.RequestBeginBlock.toObject(message.beginBlock, options); + if (options.oneofs) + object.value = "beginBlock"; + } + if (message.checkTx != null && message.hasOwnProperty("checkTx")) { + object.checkTx = $root.tendermint.abci.RequestCheckTx.toObject(message.checkTx, options); + if (options.oneofs) + object.value = "checkTx"; + } + if (message.deliverTx != null && message.hasOwnProperty("deliverTx")) { + object.deliverTx = $root.tendermint.abci.RequestDeliverTx.toObject(message.deliverTx, options); + if (options.oneofs) + object.value = "deliverTx"; + } + if (message.endBlock != null && message.hasOwnProperty("endBlock")) { + object.endBlock = $root.tendermint.abci.RequestEndBlock.toObject(message.endBlock, options); + if (options.oneofs) + object.value = "endBlock"; + } + if (message.commit != null && message.hasOwnProperty("commit")) { + object.commit = $root.tendermint.abci.RequestCommit.toObject(message.commit, options); + if (options.oneofs) + object.value = "commit"; + } + if (message.listSnapshots != null && message.hasOwnProperty("listSnapshots")) { + object.listSnapshots = $root.tendermint.abci.RequestListSnapshots.toObject(message.listSnapshots, options); + if (options.oneofs) + object.value = "listSnapshots"; + } + if (message.offerSnapshot != null && message.hasOwnProperty("offerSnapshot")) { + object.offerSnapshot = $root.tendermint.abci.RequestOfferSnapshot.toObject(message.offerSnapshot, options); + if (options.oneofs) + object.value = "offerSnapshot"; + } + if (message.loadSnapshotChunk != null && message.hasOwnProperty("loadSnapshotChunk")) { + object.loadSnapshotChunk = $root.tendermint.abci.RequestLoadSnapshotChunk.toObject(message.loadSnapshotChunk, options); + if (options.oneofs) + object.value = "loadSnapshotChunk"; + } + if (message.applySnapshotChunk != null && message.hasOwnProperty("applySnapshotChunk")) { + object.applySnapshotChunk = $root.tendermint.abci.RequestApplySnapshotChunk.toObject(message.applySnapshotChunk, options); + if (options.oneofs) + object.value = "applySnapshotChunk"; + } + return object; + }; + + /** + * Converts this Request to JSON. + * @function toJSON + * @memberof tendermint.abci.Request + * @instance + * @returns {Object.} JSON object + */ + Request.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Request; + })(abci.Request || {}); + + abci.RequestEcho = (function(RequestEcho) { + + /** + * Properties of a RequestEcho. + * @memberof tendermint.abci + * @interface IRequestEcho + * @property {string|null} [message] RequestEcho message + */ + + /** + * Constructs a new RequestEcho. + * @memberof tendermint.abci + * @classdesc Represents a RequestEcho. + * @implements IRequestEcho + * @constructor + * @param {tendermint.abci.IRequestEcho=} [properties] Properties to set + */ + function RequestEcho(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RequestEcho message. + * @member {string} message + * @memberof tendermint.abci.RequestEcho + * @instance + */ + RequestEcho.prototype.message = ""; + + /** + * Creates a new RequestEcho instance using the specified properties. + * @function create + * @memberof tendermint.abci.RequestEcho + * @static + * @param {tendermint.abci.IRequestEcho=} [properties] Properties to set + * @returns {tendermint.abci.RequestEcho} RequestEcho instance + */ + RequestEcho.create = function create(properties) { + return new RequestEcho(properties); + }; + + /** + * Encodes the specified RequestEcho message. Does not implicitly {@link tendermint.abci.RequestEcho.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.RequestEcho + * @static + * @param {tendermint.abci.IRequestEcho} message RequestEcho message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestEcho.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.message); + return writer; + }; + + /** + * Encodes the specified RequestEcho message, length delimited. Does not implicitly {@link tendermint.abci.RequestEcho.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.RequestEcho + * @static + * @param {tendermint.abci.IRequestEcho} message RequestEcho message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestEcho.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RequestEcho message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.RequestEcho + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.RequestEcho} RequestEcho + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestEcho.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.RequestEcho(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.message = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RequestEcho message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.RequestEcho + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.RequestEcho} RequestEcho + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestEcho.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RequestEcho message. + * @function verify + * @memberof tendermint.abci.RequestEcho + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RequestEcho.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + return null; + }; + + /** + * Creates a RequestEcho message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.RequestEcho + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.RequestEcho} RequestEcho + */ + RequestEcho.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.RequestEcho) + return object; + var message = new $root.tendermint.abci.RequestEcho(); + if (object.message != null) + message.message = String(object.message); + return message; + }; + + /** + * Creates a plain object from a RequestEcho message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.RequestEcho + * @static + * @param {tendermint.abci.RequestEcho} message RequestEcho + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RequestEcho.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.message = ""; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + return object; + }; + + /** + * Converts this RequestEcho to JSON. + * @function toJSON + * @memberof tendermint.abci.RequestEcho + * @instance + * @returns {Object.} JSON object + */ + RequestEcho.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RequestEcho; + })(abci.RequestEcho || {}); + + abci.RequestFlush = (function(RequestFlush) { + + /** + * Properties of a RequestFlush. + * @memberof tendermint.abci + * @interface IRequestFlush + */ + + /** + * Constructs a new RequestFlush. + * @memberof tendermint.abci + * @classdesc Represents a RequestFlush. + * @implements IRequestFlush + * @constructor + * @param {tendermint.abci.IRequestFlush=} [properties] Properties to set + */ + function RequestFlush(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new RequestFlush instance using the specified properties. + * @function create + * @memberof tendermint.abci.RequestFlush + * @static + * @param {tendermint.abci.IRequestFlush=} [properties] Properties to set + * @returns {tendermint.abci.RequestFlush} RequestFlush instance + */ + RequestFlush.create = function create(properties) { + return new RequestFlush(properties); + }; + + /** + * Encodes the specified RequestFlush message. Does not implicitly {@link tendermint.abci.RequestFlush.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.RequestFlush + * @static + * @param {tendermint.abci.IRequestFlush} message RequestFlush message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestFlush.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified RequestFlush message, length delimited. Does not implicitly {@link tendermint.abci.RequestFlush.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.RequestFlush + * @static + * @param {tendermint.abci.IRequestFlush} message RequestFlush message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestFlush.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RequestFlush message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.RequestFlush + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.RequestFlush} RequestFlush + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestFlush.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.RequestFlush(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RequestFlush message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.RequestFlush + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.RequestFlush} RequestFlush + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestFlush.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RequestFlush message. + * @function verify + * @memberof tendermint.abci.RequestFlush + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RequestFlush.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a RequestFlush message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.RequestFlush + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.RequestFlush} RequestFlush + */ + RequestFlush.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.RequestFlush) + return object; + return new $root.tendermint.abci.RequestFlush(); + }; + + /** + * Creates a plain object from a RequestFlush message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.RequestFlush + * @static + * @param {tendermint.abci.RequestFlush} message RequestFlush + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RequestFlush.toObject = function toObject() { + return {}; + }; + + /** + * Converts this RequestFlush to JSON. + * @function toJSON + * @memberof tendermint.abci.RequestFlush + * @instance + * @returns {Object.} JSON object + */ + RequestFlush.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RequestFlush; + })(abci.RequestFlush || {}); + + abci.RequestInfo = (function(RequestInfo) { + + /** + * Properties of a RequestInfo. + * @memberof tendermint.abci + * @interface IRequestInfo + * @property {string|null} [version] RequestInfo version + * @property {number|Long|null} [blockVersion] RequestInfo blockVersion + * @property {number|Long|null} [p2pVersion] RequestInfo p2pVersion + */ + + /** + * Constructs a new RequestInfo. + * @memberof tendermint.abci + * @classdesc Represents a RequestInfo. + * @implements IRequestInfo + * @constructor + * @param {tendermint.abci.IRequestInfo=} [properties] Properties to set + */ + function RequestInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RequestInfo version. + * @member {string} version + * @memberof tendermint.abci.RequestInfo + * @instance + */ + RequestInfo.prototype.version = ""; + + /** + * RequestInfo blockVersion. + * @member {number|Long} blockVersion + * @memberof tendermint.abci.RequestInfo + * @instance + */ + RequestInfo.prototype.blockVersion = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * RequestInfo p2pVersion. + * @member {number|Long} p2pVersion + * @memberof tendermint.abci.RequestInfo + * @instance + */ + RequestInfo.prototype.p2pVersion = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new RequestInfo instance using the specified properties. + * @function create + * @memberof tendermint.abci.RequestInfo + * @static + * @param {tendermint.abci.IRequestInfo=} [properties] Properties to set + * @returns {tendermint.abci.RequestInfo} RequestInfo instance + */ + RequestInfo.create = function create(properties) { + return new RequestInfo(properties); + }; + + /** + * Encodes the specified RequestInfo message. Does not implicitly {@link tendermint.abci.RequestInfo.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.RequestInfo + * @static + * @param {tendermint.abci.IRequestInfo} message RequestInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); + if (message.blockVersion != null && Object.hasOwnProperty.call(message, "blockVersion")) + writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.blockVersion); + if (message.p2pVersion != null && Object.hasOwnProperty.call(message, "p2pVersion")) + writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.p2pVersion); + return writer; + }; + + /** + * Encodes the specified RequestInfo message, length delimited. Does not implicitly {@link tendermint.abci.RequestInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.RequestInfo + * @static + * @param {tendermint.abci.IRequestInfo} message RequestInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RequestInfo message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.RequestInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.RequestInfo} RequestInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.RequestInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.version = reader.string(); + break; + case 2: + message.blockVersion = reader.uint64(); + break; + case 3: + message.p2pVersion = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RequestInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.RequestInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.RequestInfo} RequestInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RequestInfo message. + * @function verify + * @memberof tendermint.abci.RequestInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RequestInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.blockVersion != null && message.hasOwnProperty("blockVersion")) + if (!$util.isInteger(message.blockVersion) && !(message.blockVersion && $util.isInteger(message.blockVersion.low) && $util.isInteger(message.blockVersion.high))) + return "blockVersion: integer|Long expected"; + if (message.p2pVersion != null && message.hasOwnProperty("p2pVersion")) + if (!$util.isInteger(message.p2pVersion) && !(message.p2pVersion && $util.isInteger(message.p2pVersion.low) && $util.isInteger(message.p2pVersion.high))) + return "p2pVersion: integer|Long expected"; + return null; + }; + + /** + * Creates a RequestInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.RequestInfo + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.RequestInfo} RequestInfo + */ + RequestInfo.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.RequestInfo) + return object; + var message = new $root.tendermint.abci.RequestInfo(); + if (object.version != null) + message.version = String(object.version); + if (object.blockVersion != null) + if ($util.Long) + (message.blockVersion = $util.Long.fromValue(object.blockVersion)).unsigned = true; + else if (typeof object.blockVersion === "string") + message.blockVersion = parseInt(object.blockVersion, 10); + else if (typeof object.blockVersion === "number") + message.blockVersion = object.blockVersion; + else if (typeof object.blockVersion === "object") + message.blockVersion = new $util.LongBits(object.blockVersion.low >>> 0, object.blockVersion.high >>> 0).toNumber(true); + if (object.p2pVersion != null) + if ($util.Long) + (message.p2pVersion = $util.Long.fromValue(object.p2pVersion)).unsigned = true; + else if (typeof object.p2pVersion === "string") + message.p2pVersion = parseInt(object.p2pVersion, 10); + else if (typeof object.p2pVersion === "number") + message.p2pVersion = object.p2pVersion; + else if (typeof object.p2pVersion === "object") + message.p2pVersion = new $util.LongBits(object.p2pVersion.low >>> 0, object.p2pVersion.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a RequestInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.RequestInfo + * @static + * @param {tendermint.abci.RequestInfo} message RequestInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RequestInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.version = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.blockVersion = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.blockVersion = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.p2pVersion = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.p2pVersion = options.longs === String ? "0" : 0; + } + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.blockVersion != null && message.hasOwnProperty("blockVersion")) + if (typeof message.blockVersion === "number") + object.blockVersion = options.longs === String ? String(message.blockVersion) : message.blockVersion; + else + object.blockVersion = options.longs === String ? $util.Long.prototype.toString.call(message.blockVersion) : options.longs === Number ? new $util.LongBits(message.blockVersion.low >>> 0, message.blockVersion.high >>> 0).toNumber(true) : message.blockVersion; + if (message.p2pVersion != null && message.hasOwnProperty("p2pVersion")) + if (typeof message.p2pVersion === "number") + object.p2pVersion = options.longs === String ? String(message.p2pVersion) : message.p2pVersion; + else + object.p2pVersion = options.longs === String ? $util.Long.prototype.toString.call(message.p2pVersion) : options.longs === Number ? new $util.LongBits(message.p2pVersion.low >>> 0, message.p2pVersion.high >>> 0).toNumber(true) : message.p2pVersion; + return object; + }; + + /** + * Converts this RequestInfo to JSON. + * @function toJSON + * @memberof tendermint.abci.RequestInfo + * @instance + * @returns {Object.} JSON object + */ + RequestInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RequestInfo; + })(abci.RequestInfo || {}); + + abci.RequestSetOption = (function(RequestSetOption) { + + /** + * Properties of a RequestSetOption. + * @memberof tendermint.abci + * @interface IRequestSetOption + * @property {string|null} [key] RequestSetOption key + * @property {string|null} [value] RequestSetOption value + */ + + /** + * Constructs a new RequestSetOption. + * @memberof tendermint.abci + * @classdesc Represents a RequestSetOption. + * @implements IRequestSetOption + * @constructor + * @param {tendermint.abci.IRequestSetOption=} [properties] Properties to set + */ + function RequestSetOption(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RequestSetOption key. + * @member {string} key + * @memberof tendermint.abci.RequestSetOption + * @instance + */ + RequestSetOption.prototype.key = ""; + + /** + * RequestSetOption value. + * @member {string} value + * @memberof tendermint.abci.RequestSetOption + * @instance + */ + RequestSetOption.prototype.value = ""; + + /** + * Creates a new RequestSetOption instance using the specified properties. + * @function create + * @memberof tendermint.abci.RequestSetOption + * @static + * @param {tendermint.abci.IRequestSetOption=} [properties] Properties to set + * @returns {tendermint.abci.RequestSetOption} RequestSetOption instance + */ + RequestSetOption.create = function create(properties) { + return new RequestSetOption(properties); + }; + + /** + * Encodes the specified RequestSetOption message. Does not implicitly {@link tendermint.abci.RequestSetOption.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.RequestSetOption + * @static + * @param {tendermint.abci.IRequestSetOption} message RequestSetOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestSetOption.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + return writer; + }; + + /** + * Encodes the specified RequestSetOption message, length delimited. Does not implicitly {@link tendermint.abci.RequestSetOption.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.RequestSetOption + * @static + * @param {tendermint.abci.IRequestSetOption} message RequestSetOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestSetOption.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RequestSetOption message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.RequestSetOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.RequestSetOption} RequestSetOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestSetOption.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.RequestSetOption(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.key = reader.string(); + break; + case 2: + message.value = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RequestSetOption message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.RequestSetOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.RequestSetOption} RequestSetOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestSetOption.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RequestSetOption message. + * @function verify + * @memberof tendermint.abci.RequestSetOption + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RequestSetOption.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.key != null && message.hasOwnProperty("key")) + if (!$util.isString(message.key)) + return "key: string expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + return null; + }; + + /** + * Creates a RequestSetOption message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.RequestSetOption + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.RequestSetOption} RequestSetOption + */ + RequestSetOption.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.RequestSetOption) + return object; + var message = new $root.tendermint.abci.RequestSetOption(); + if (object.key != null) + message.key = String(object.key); + if (object.value != null) + message.value = String(object.value); + return message; + }; + + /** + * Creates a plain object from a RequestSetOption message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.RequestSetOption + * @static + * @param {tendermint.abci.RequestSetOption} message RequestSetOption + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RequestSetOption.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.key = ""; + object.value = ""; + } + if (message.key != null && message.hasOwnProperty("key")) + object.key = message.key; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + return object; + }; + + /** + * Converts this RequestSetOption to JSON. + * @function toJSON + * @memberof tendermint.abci.RequestSetOption + * @instance + * @returns {Object.} JSON object + */ + RequestSetOption.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RequestSetOption; + })(abci.RequestSetOption || {}); + + abci.RequestInitChain = (function(RequestInitChain) { + + /** + * Properties of a RequestInitChain. + * @memberof tendermint.abci + * @interface IRequestInitChain + * @property {google.protobuf.ITimestamp|null} [time] RequestInitChain time + * @property {string|null} [chainId] RequestInitChain chainId + * @property {tendermint.abci.IConsensusParams|null} [consensusParams] RequestInitChain consensusParams + * @property {Array.|null} [validators] RequestInitChain validators + * @property {Uint8Array|null} [appStateBytes] RequestInitChain appStateBytes + * @property {number|Long|null} [initialHeight] RequestInitChain initialHeight + */ + + /** + * Constructs a new RequestInitChain. + * @memberof tendermint.abci + * @classdesc Represents a RequestInitChain. + * @implements IRequestInitChain + * @constructor + * @param {tendermint.abci.IRequestInitChain=} [properties] Properties to set + */ + function RequestInitChain(properties) { + this.validators = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RequestInitChain time. + * @member {google.protobuf.ITimestamp|null|undefined} time + * @memberof tendermint.abci.RequestInitChain + * @instance + */ + RequestInitChain.prototype.time = null; + + /** + * RequestInitChain chainId. + * @member {string} chainId + * @memberof tendermint.abci.RequestInitChain + * @instance + */ + RequestInitChain.prototype.chainId = ""; + + /** + * RequestInitChain consensusParams. + * @member {tendermint.abci.IConsensusParams|null|undefined} consensusParams + * @memberof tendermint.abci.RequestInitChain + * @instance + */ + RequestInitChain.prototype.consensusParams = null; + + /** + * RequestInitChain validators. + * @member {Array.} validators + * @memberof tendermint.abci.RequestInitChain + * @instance + */ + RequestInitChain.prototype.validators = $util.emptyArray; + + /** + * RequestInitChain appStateBytes. + * @member {Uint8Array} appStateBytes + * @memberof tendermint.abci.RequestInitChain + * @instance + */ + RequestInitChain.prototype.appStateBytes = $util.newBuffer([]); + + /** + * RequestInitChain initialHeight. + * @member {number|Long} initialHeight + * @memberof tendermint.abci.RequestInitChain + * @instance + */ + RequestInitChain.prototype.initialHeight = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new RequestInitChain instance using the specified properties. + * @function create + * @memberof tendermint.abci.RequestInitChain + * @static + * @param {tendermint.abci.IRequestInitChain=} [properties] Properties to set + * @returns {tendermint.abci.RequestInitChain} RequestInitChain instance + */ + RequestInitChain.create = function create(properties) { + return new RequestInitChain(properties); + }; + + /** + * Encodes the specified RequestInitChain message. Does not implicitly {@link tendermint.abci.RequestInitChain.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.RequestInitChain + * @static + * @param {tendermint.abci.IRequestInitChain} message RequestInitChain message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestInitChain.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.time != null && Object.hasOwnProperty.call(message, "time")) + $root.google.protobuf.Timestamp.encode(message.time, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.chainId != null && Object.hasOwnProperty.call(message, "chainId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.chainId); + if (message.consensusParams != null && Object.hasOwnProperty.call(message, "consensusParams")) + $root.tendermint.abci.ConsensusParams.encode(message.consensusParams, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.validators != null && message.validators.length) + for (var i = 0; i < message.validators.length; ++i) + $root.tendermint.abci.ValidatorUpdate.encode(message.validators[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.appStateBytes != null && Object.hasOwnProperty.call(message, "appStateBytes")) + writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.appStateBytes); + if (message.initialHeight != null && Object.hasOwnProperty.call(message, "initialHeight")) + writer.uint32(/* id 6, wireType 0 =*/48).int64(message.initialHeight); + return writer; + }; + + /** + * Encodes the specified RequestInitChain message, length delimited. Does not implicitly {@link tendermint.abci.RequestInitChain.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.RequestInitChain + * @static + * @param {tendermint.abci.IRequestInitChain} message RequestInitChain message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestInitChain.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RequestInitChain message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.RequestInitChain + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.RequestInitChain} RequestInitChain + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestInitChain.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.RequestInitChain(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.time = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 2: + message.chainId = reader.string(); + break; + case 3: + message.consensusParams = $root.tendermint.abci.ConsensusParams.decode(reader, reader.uint32()); + break; + case 4: + if (!(message.validators && message.validators.length)) + message.validators = []; + message.validators.push($root.tendermint.abci.ValidatorUpdate.decode(reader, reader.uint32())); + break; + case 5: + message.appStateBytes = reader.bytes(); + break; + case 6: + message.initialHeight = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RequestInitChain message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.RequestInitChain + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.RequestInitChain} RequestInitChain + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestInitChain.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RequestInitChain message. + * @function verify + * @memberof tendermint.abci.RequestInitChain + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RequestInitChain.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.time != null && message.hasOwnProperty("time")) { + var error = $root.google.protobuf.Timestamp.verify(message.time); + if (error) + return "time." + error; + } + if (message.chainId != null && message.hasOwnProperty("chainId")) + if (!$util.isString(message.chainId)) + return "chainId: string expected"; + if (message.consensusParams != null && message.hasOwnProperty("consensusParams")) { + var error = $root.tendermint.abci.ConsensusParams.verify(message.consensusParams); + if (error) + return "consensusParams." + error; + } + if (message.validators != null && message.hasOwnProperty("validators")) { + if (!Array.isArray(message.validators)) + return "validators: array expected"; + for (var i = 0; i < message.validators.length; ++i) { + var error = $root.tendermint.abci.ValidatorUpdate.verify(message.validators[i]); + if (error) + return "validators." + error; + } + } + if (message.appStateBytes != null && message.hasOwnProperty("appStateBytes")) + if (!(message.appStateBytes && typeof message.appStateBytes.length === "number" || $util.isString(message.appStateBytes))) + return "appStateBytes: buffer expected"; + if (message.initialHeight != null && message.hasOwnProperty("initialHeight")) + if (!$util.isInteger(message.initialHeight) && !(message.initialHeight && $util.isInteger(message.initialHeight.low) && $util.isInteger(message.initialHeight.high))) + return "initialHeight: integer|Long expected"; + return null; + }; + + /** + * Creates a RequestInitChain message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.RequestInitChain + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.RequestInitChain} RequestInitChain + */ + RequestInitChain.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.RequestInitChain) + return object; + var message = new $root.tendermint.abci.RequestInitChain(); + if (object.time != null) { + if (typeof object.time !== "object") + throw TypeError(".tendermint.abci.RequestInitChain.time: object expected"); + message.time = $root.google.protobuf.Timestamp.fromObject(object.time); + } + if (object.chainId != null) + message.chainId = String(object.chainId); + if (object.consensusParams != null) { + if (typeof object.consensusParams !== "object") + throw TypeError(".tendermint.abci.RequestInitChain.consensusParams: object expected"); + message.consensusParams = $root.tendermint.abci.ConsensusParams.fromObject(object.consensusParams); + } + if (object.validators) { + if (!Array.isArray(object.validators)) + throw TypeError(".tendermint.abci.RequestInitChain.validators: array expected"); + message.validators = []; + for (var i = 0; i < object.validators.length; ++i) { + if (typeof object.validators[i] !== "object") + throw TypeError(".tendermint.abci.RequestInitChain.validators: object expected"); + message.validators[i] = $root.tendermint.abci.ValidatorUpdate.fromObject(object.validators[i]); + } + } + if (object.appStateBytes != null) + if (typeof object.appStateBytes === "string") + $util.base64.decode(object.appStateBytes, message.appStateBytes = $util.newBuffer($util.base64.length(object.appStateBytes)), 0); + else if (object.appStateBytes.length) + message.appStateBytes = object.appStateBytes; + if (object.initialHeight != null) + if ($util.Long) + (message.initialHeight = $util.Long.fromValue(object.initialHeight)).unsigned = false; + else if (typeof object.initialHeight === "string") + message.initialHeight = parseInt(object.initialHeight, 10); + else if (typeof object.initialHeight === "number") + message.initialHeight = object.initialHeight; + else if (typeof object.initialHeight === "object") + message.initialHeight = new $util.LongBits(object.initialHeight.low >>> 0, object.initialHeight.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a RequestInitChain message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.RequestInitChain + * @static + * @param {tendermint.abci.RequestInitChain} message RequestInitChain + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RequestInitChain.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.validators = []; + if (options.defaults) { + object.time = null; + object.chainId = ""; + object.consensusParams = null; + if (options.bytes === String) + object.appStateBytes = ""; + else { + object.appStateBytes = []; + if (options.bytes !== Array) + object.appStateBytes = $util.newBuffer(object.appStateBytes); + } + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.initialHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.initialHeight = options.longs === String ? "0" : 0; + } + if (message.time != null && message.hasOwnProperty("time")) + object.time = $root.google.protobuf.Timestamp.toObject(message.time, options); + if (message.chainId != null && message.hasOwnProperty("chainId")) + object.chainId = message.chainId; + if (message.consensusParams != null && message.hasOwnProperty("consensusParams")) + object.consensusParams = $root.tendermint.abci.ConsensusParams.toObject(message.consensusParams, options); + if (message.validators && message.validators.length) { + object.validators = []; + for (var j = 0; j < message.validators.length; ++j) + object.validators[j] = $root.tendermint.abci.ValidatorUpdate.toObject(message.validators[j], options); + } + if (message.appStateBytes != null && message.hasOwnProperty("appStateBytes")) + object.appStateBytes = options.bytes === String ? $util.base64.encode(message.appStateBytes, 0, message.appStateBytes.length) : options.bytes === Array ? Array.prototype.slice.call(message.appStateBytes) : message.appStateBytes; + if (message.initialHeight != null && message.hasOwnProperty("initialHeight")) + if (typeof message.initialHeight === "number") + object.initialHeight = options.longs === String ? String(message.initialHeight) : message.initialHeight; + else + object.initialHeight = options.longs === String ? $util.Long.prototype.toString.call(message.initialHeight) : options.longs === Number ? new $util.LongBits(message.initialHeight.low >>> 0, message.initialHeight.high >>> 0).toNumber() : message.initialHeight; + return object; + }; + + /** + * Converts this RequestInitChain to JSON. + * @function toJSON + * @memberof tendermint.abci.RequestInitChain + * @instance + * @returns {Object.} JSON object + */ + RequestInitChain.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RequestInitChain; + })(abci.RequestInitChain || {}); + + abci.RequestQuery = (function(RequestQuery) { + + /** + * Properties of a RequestQuery. + * @memberof tendermint.abci + * @interface IRequestQuery + * @property {Uint8Array|null} [data] RequestQuery data + * @property {string|null} [path] RequestQuery path + * @property {number|Long|null} [height] RequestQuery height + * @property {boolean|null} [prove] RequestQuery prove + */ + + /** + * Constructs a new RequestQuery. + * @memberof tendermint.abci + * @classdesc Represents a RequestQuery. + * @implements IRequestQuery + * @constructor + * @param {tendermint.abci.IRequestQuery=} [properties] Properties to set + */ + function RequestQuery(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RequestQuery data. + * @member {Uint8Array} data + * @memberof tendermint.abci.RequestQuery + * @instance + */ + RequestQuery.prototype.data = $util.newBuffer([]); + + /** + * RequestQuery path. + * @member {string} path + * @memberof tendermint.abci.RequestQuery + * @instance + */ + RequestQuery.prototype.path = ""; + + /** + * RequestQuery height. + * @member {number|Long} height + * @memberof tendermint.abci.RequestQuery + * @instance + */ + RequestQuery.prototype.height = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * RequestQuery prove. + * @member {boolean} prove + * @memberof tendermint.abci.RequestQuery + * @instance + */ + RequestQuery.prototype.prove = false; + + /** + * Creates a new RequestQuery instance using the specified properties. + * @function create + * @memberof tendermint.abci.RequestQuery + * @static + * @param {tendermint.abci.IRequestQuery=} [properties] Properties to set + * @returns {tendermint.abci.RequestQuery} RequestQuery instance + */ + RequestQuery.create = function create(properties) { + return new RequestQuery(properties); + }; + + /** + * Encodes the specified RequestQuery message. Does not implicitly {@link tendermint.abci.RequestQuery.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.RequestQuery + * @static + * @param {tendermint.abci.IRequestQuery} message RequestQuery message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestQuery.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.data != null && Object.hasOwnProperty.call(message, "data")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.data); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + if (message.height != null && Object.hasOwnProperty.call(message, "height")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.height); + if (message.prove != null && Object.hasOwnProperty.call(message, "prove")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.prove); + return writer; + }; + + /** + * Encodes the specified RequestQuery message, length delimited. Does not implicitly {@link tendermint.abci.RequestQuery.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.RequestQuery + * @static + * @param {tendermint.abci.IRequestQuery} message RequestQuery message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestQuery.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RequestQuery message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.RequestQuery + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.RequestQuery} RequestQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestQuery.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.RequestQuery(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.data = reader.bytes(); + break; + case 2: + message.path = reader.string(); + break; + case 3: + message.height = reader.int64(); + break; + case 4: + message.prove = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RequestQuery message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.RequestQuery + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.RequestQuery} RequestQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestQuery.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RequestQuery message. + * @function verify + * @memberof tendermint.abci.RequestQuery + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RequestQuery.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.data != null && message.hasOwnProperty("data")) + if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) + return "data: buffer expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + if (message.height != null && message.hasOwnProperty("height")) + if (!$util.isInteger(message.height) && !(message.height && $util.isInteger(message.height.low) && $util.isInteger(message.height.high))) + return "height: integer|Long expected"; + if (message.prove != null && message.hasOwnProperty("prove")) + if (typeof message.prove !== "boolean") + return "prove: boolean expected"; + return null; + }; + + /** + * Creates a RequestQuery message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.RequestQuery + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.RequestQuery} RequestQuery + */ + RequestQuery.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.RequestQuery) + return object; + var message = new $root.tendermint.abci.RequestQuery(); + if (object.data != null) + if (typeof object.data === "string") + $util.base64.decode(object.data, message.data = $util.newBuffer($util.base64.length(object.data)), 0); + else if (object.data.length) + message.data = object.data; + if (object.path != null) + message.path = String(object.path); + if (object.height != null) + if ($util.Long) + (message.height = $util.Long.fromValue(object.height)).unsigned = false; + else if (typeof object.height === "string") + message.height = parseInt(object.height, 10); + else if (typeof object.height === "number") + message.height = object.height; + else if (typeof object.height === "object") + message.height = new $util.LongBits(object.height.low >>> 0, object.height.high >>> 0).toNumber(); + if (object.prove != null) + message.prove = Boolean(object.prove); + return message; + }; + + /** + * Creates a plain object from a RequestQuery message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.RequestQuery + * @static + * @param {tendermint.abci.RequestQuery} message RequestQuery + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RequestQuery.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.data = ""; + else { + object.data = []; + if (options.bytes !== Array) + object.data = $util.newBuffer(object.data); + } + object.path = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.height = options.longs === String ? "0" : 0; + object.prove = false; + } + if (message.data != null && message.hasOwnProperty("data")) + object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + if (message.height != null && message.hasOwnProperty("height")) + if (typeof message.height === "number") + object.height = options.longs === String ? String(message.height) : message.height; + else + object.height = options.longs === String ? $util.Long.prototype.toString.call(message.height) : options.longs === Number ? new $util.LongBits(message.height.low >>> 0, message.height.high >>> 0).toNumber() : message.height; + if (message.prove != null && message.hasOwnProperty("prove")) + object.prove = message.prove; + return object; + }; + + /** + * Converts this RequestQuery to JSON. + * @function toJSON + * @memberof tendermint.abci.RequestQuery + * @instance + * @returns {Object.} JSON object + */ + RequestQuery.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RequestQuery; + })(abci.RequestQuery || {}); + + abci.RequestBeginBlock = (function(RequestBeginBlock) { + + /** + * Properties of a RequestBeginBlock. + * @memberof tendermint.abci + * @interface IRequestBeginBlock + * @property {Uint8Array|null} [hash] RequestBeginBlock hash + * @property {tendermint.types.IHeader|null} [header] RequestBeginBlock header + * @property {tendermint.abci.ILastCommitInfo|null} [lastCommitInfo] RequestBeginBlock lastCommitInfo + * @property {Array.|null} [byzantineValidators] RequestBeginBlock byzantineValidators + */ + + /** + * Constructs a new RequestBeginBlock. + * @memberof tendermint.abci + * @classdesc Represents a RequestBeginBlock. + * @implements IRequestBeginBlock + * @constructor + * @param {tendermint.abci.IRequestBeginBlock=} [properties] Properties to set + */ + function RequestBeginBlock(properties) { + this.byzantineValidators = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RequestBeginBlock hash. + * @member {Uint8Array} hash + * @memberof tendermint.abci.RequestBeginBlock + * @instance + */ + RequestBeginBlock.prototype.hash = $util.newBuffer([]); + + /** + * RequestBeginBlock header. + * @member {tendermint.types.IHeader|null|undefined} header + * @memberof tendermint.abci.RequestBeginBlock + * @instance + */ + RequestBeginBlock.prototype.header = null; + + /** + * RequestBeginBlock lastCommitInfo. + * @member {tendermint.abci.ILastCommitInfo|null|undefined} lastCommitInfo + * @memberof tendermint.abci.RequestBeginBlock + * @instance + */ + RequestBeginBlock.prototype.lastCommitInfo = null; + + /** + * RequestBeginBlock byzantineValidators. + * @member {Array.} byzantineValidators + * @memberof tendermint.abci.RequestBeginBlock + * @instance + */ + RequestBeginBlock.prototype.byzantineValidators = $util.emptyArray; + + /** + * Creates a new RequestBeginBlock instance using the specified properties. + * @function create + * @memberof tendermint.abci.RequestBeginBlock + * @static + * @param {tendermint.abci.IRequestBeginBlock=} [properties] Properties to set + * @returns {tendermint.abci.RequestBeginBlock} RequestBeginBlock instance + */ + RequestBeginBlock.create = function create(properties) { + return new RequestBeginBlock(properties); + }; + + /** + * Encodes the specified RequestBeginBlock message. Does not implicitly {@link tendermint.abci.RequestBeginBlock.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.RequestBeginBlock + * @static + * @param {tendermint.abci.IRequestBeginBlock} message RequestBeginBlock message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestBeginBlock.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.hash != null && Object.hasOwnProperty.call(message, "hash")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.hash); + if (message.header != null && Object.hasOwnProperty.call(message, "header")) + $root.tendermint.types.Header.encode(message.header, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.lastCommitInfo != null && Object.hasOwnProperty.call(message, "lastCommitInfo")) + $root.tendermint.abci.LastCommitInfo.encode(message.lastCommitInfo, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.byzantineValidators != null && message.byzantineValidators.length) + for (var i = 0; i < message.byzantineValidators.length; ++i) + $root.tendermint.abci.Evidence.encode(message.byzantineValidators[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RequestBeginBlock message, length delimited. Does not implicitly {@link tendermint.abci.RequestBeginBlock.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.RequestBeginBlock + * @static + * @param {tendermint.abci.IRequestBeginBlock} message RequestBeginBlock message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestBeginBlock.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RequestBeginBlock message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.RequestBeginBlock + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.RequestBeginBlock} RequestBeginBlock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestBeginBlock.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.RequestBeginBlock(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.hash = reader.bytes(); + break; + case 2: + message.header = $root.tendermint.types.Header.decode(reader, reader.uint32()); + break; + case 3: + message.lastCommitInfo = $root.tendermint.abci.LastCommitInfo.decode(reader, reader.uint32()); + break; + case 4: + if (!(message.byzantineValidators && message.byzantineValidators.length)) + message.byzantineValidators = []; + message.byzantineValidators.push($root.tendermint.abci.Evidence.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RequestBeginBlock message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.RequestBeginBlock + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.RequestBeginBlock} RequestBeginBlock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestBeginBlock.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RequestBeginBlock message. + * @function verify + * @memberof tendermint.abci.RequestBeginBlock + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RequestBeginBlock.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.hash != null && message.hasOwnProperty("hash")) + if (!(message.hash && typeof message.hash.length === "number" || $util.isString(message.hash))) + return "hash: buffer expected"; + if (message.header != null && message.hasOwnProperty("header")) { + var error = $root.tendermint.types.Header.verify(message.header); + if (error) + return "header." + error; + } + if (message.lastCommitInfo != null && message.hasOwnProperty("lastCommitInfo")) { + var error = $root.tendermint.abci.LastCommitInfo.verify(message.lastCommitInfo); + if (error) + return "lastCommitInfo." + error; + } + if (message.byzantineValidators != null && message.hasOwnProperty("byzantineValidators")) { + if (!Array.isArray(message.byzantineValidators)) + return "byzantineValidators: array expected"; + for (var i = 0; i < message.byzantineValidators.length; ++i) { + var error = $root.tendermint.abci.Evidence.verify(message.byzantineValidators[i]); + if (error) + return "byzantineValidators." + error; + } + } + return null; + }; + + /** + * Creates a RequestBeginBlock message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.RequestBeginBlock + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.RequestBeginBlock} RequestBeginBlock + */ + RequestBeginBlock.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.RequestBeginBlock) + return object; + var message = new $root.tendermint.abci.RequestBeginBlock(); + if (object.hash != null) + if (typeof object.hash === "string") + $util.base64.decode(object.hash, message.hash = $util.newBuffer($util.base64.length(object.hash)), 0); + else if (object.hash.length) + message.hash = object.hash; + if (object.header != null) { + if (typeof object.header !== "object") + throw TypeError(".tendermint.abci.RequestBeginBlock.header: object expected"); + message.header = $root.tendermint.types.Header.fromObject(object.header); + } + if (object.lastCommitInfo != null) { + if (typeof object.lastCommitInfo !== "object") + throw TypeError(".tendermint.abci.RequestBeginBlock.lastCommitInfo: object expected"); + message.lastCommitInfo = $root.tendermint.abci.LastCommitInfo.fromObject(object.lastCommitInfo); + } + if (object.byzantineValidators) { + if (!Array.isArray(object.byzantineValidators)) + throw TypeError(".tendermint.abci.RequestBeginBlock.byzantineValidators: array expected"); + message.byzantineValidators = []; + for (var i = 0; i < object.byzantineValidators.length; ++i) { + if (typeof object.byzantineValidators[i] !== "object") + throw TypeError(".tendermint.abci.RequestBeginBlock.byzantineValidators: object expected"); + message.byzantineValidators[i] = $root.tendermint.abci.Evidence.fromObject(object.byzantineValidators[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a RequestBeginBlock message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.RequestBeginBlock + * @static + * @param {tendermint.abci.RequestBeginBlock} message RequestBeginBlock + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RequestBeginBlock.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.byzantineValidators = []; + if (options.defaults) { + if (options.bytes === String) + object.hash = ""; + else { + object.hash = []; + if (options.bytes !== Array) + object.hash = $util.newBuffer(object.hash); + } + object.header = null; + object.lastCommitInfo = null; + } + if (message.hash != null && message.hasOwnProperty("hash")) + object.hash = options.bytes === String ? $util.base64.encode(message.hash, 0, message.hash.length) : options.bytes === Array ? Array.prototype.slice.call(message.hash) : message.hash; + if (message.header != null && message.hasOwnProperty("header")) + object.header = $root.tendermint.types.Header.toObject(message.header, options); + if (message.lastCommitInfo != null && message.hasOwnProperty("lastCommitInfo")) + object.lastCommitInfo = $root.tendermint.abci.LastCommitInfo.toObject(message.lastCommitInfo, options); + if (message.byzantineValidators && message.byzantineValidators.length) { + object.byzantineValidators = []; + for (var j = 0; j < message.byzantineValidators.length; ++j) + object.byzantineValidators[j] = $root.tendermint.abci.Evidence.toObject(message.byzantineValidators[j], options); + } + return object; + }; + + /** + * Converts this RequestBeginBlock to JSON. + * @function toJSON + * @memberof tendermint.abci.RequestBeginBlock + * @instance + * @returns {Object.} JSON object + */ + RequestBeginBlock.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RequestBeginBlock; + })(abci.RequestBeginBlock || {}); + + /** + * CheckTxType enum. + * @name tendermint.abci.CheckTxType + * @enum {string} + * @property {number} NEW=0 NEW value + * @property {number} RECHECK=1 RECHECK value + */ + abci.CheckTxType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NEW"] = 0; + values[valuesById[1] = "RECHECK"] = 1; + return values; + })(); + + abci.RequestCheckTx = (function(RequestCheckTx) { + + /** + * Properties of a RequestCheckTx. + * @memberof tendermint.abci + * @interface IRequestCheckTx + * @property {Uint8Array|null} [tx] RequestCheckTx tx + * @property {tendermint.abci.CheckTxType|null} [type] RequestCheckTx type + */ + + /** + * Constructs a new RequestCheckTx. + * @memberof tendermint.abci + * @classdesc Represents a RequestCheckTx. + * @implements IRequestCheckTx + * @constructor + * @param {tendermint.abci.IRequestCheckTx=} [properties] Properties to set + */ + function RequestCheckTx(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RequestCheckTx tx. + * @member {Uint8Array} tx + * @memberof tendermint.abci.RequestCheckTx + * @instance + */ + RequestCheckTx.prototype.tx = $util.newBuffer([]); + + /** + * RequestCheckTx type. + * @member {tendermint.abci.CheckTxType} type + * @memberof tendermint.abci.RequestCheckTx + * @instance + */ + RequestCheckTx.prototype.type = 0; + + /** + * Creates a new RequestCheckTx instance using the specified properties. + * @function create + * @memberof tendermint.abci.RequestCheckTx + * @static + * @param {tendermint.abci.IRequestCheckTx=} [properties] Properties to set + * @returns {tendermint.abci.RequestCheckTx} RequestCheckTx instance + */ + RequestCheckTx.create = function create(properties) { + return new RequestCheckTx(properties); + }; + + /** + * Encodes the specified RequestCheckTx message. Does not implicitly {@link tendermint.abci.RequestCheckTx.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.RequestCheckTx + * @static + * @param {tendermint.abci.IRequestCheckTx} message RequestCheckTx message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestCheckTx.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tx != null && Object.hasOwnProperty.call(message, "tx")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.tx); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); + return writer; + }; + + /** + * Encodes the specified RequestCheckTx message, length delimited. Does not implicitly {@link tendermint.abci.RequestCheckTx.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.RequestCheckTx + * @static + * @param {tendermint.abci.IRequestCheckTx} message RequestCheckTx message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestCheckTx.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RequestCheckTx message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.RequestCheckTx + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.RequestCheckTx} RequestCheckTx + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestCheckTx.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.RequestCheckTx(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.tx = reader.bytes(); + break; + case 2: + message.type = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RequestCheckTx message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.RequestCheckTx + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.RequestCheckTx} RequestCheckTx + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestCheckTx.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RequestCheckTx message. + * @function verify + * @memberof tendermint.abci.RequestCheckTx + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RequestCheckTx.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tx != null && message.hasOwnProperty("tx")) + if (!(message.tx && typeof message.tx.length === "number" || $util.isString(message.tx))) + return "tx: buffer expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + break; + } + return null; + }; + + /** + * Creates a RequestCheckTx message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.RequestCheckTx + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.RequestCheckTx} RequestCheckTx + */ + RequestCheckTx.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.RequestCheckTx) + return object; + var message = new $root.tendermint.abci.RequestCheckTx(); + if (object.tx != null) + if (typeof object.tx === "string") + $util.base64.decode(object.tx, message.tx = $util.newBuffer($util.base64.length(object.tx)), 0); + else if (object.tx.length) + message.tx = object.tx; + switch (object.type) { + case "NEW": + case 0: + message.type = 0; + break; + case "RECHECK": + case 1: + message.type = 1; + break; + } + return message; + }; + + /** + * Creates a plain object from a RequestCheckTx message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.RequestCheckTx + * @static + * @param {tendermint.abci.RequestCheckTx} message RequestCheckTx + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RequestCheckTx.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.tx = ""; + else { + object.tx = []; + if (options.bytes !== Array) + object.tx = $util.newBuffer(object.tx); + } + object.type = options.enums === String ? "NEW" : 0; + } + if (message.tx != null && message.hasOwnProperty("tx")) + object.tx = options.bytes === String ? $util.base64.encode(message.tx, 0, message.tx.length) : options.bytes === Array ? Array.prototype.slice.call(message.tx) : message.tx; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.tendermint.abci.CheckTxType[message.type] : message.type; + return object; + }; + + /** + * Converts this RequestCheckTx to JSON. + * @function toJSON + * @memberof tendermint.abci.RequestCheckTx + * @instance + * @returns {Object.} JSON object + */ + RequestCheckTx.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RequestCheckTx; + })(abci.RequestCheckTx || {}); + + abci.RequestDeliverTx = (function(RequestDeliverTx) { + + /** + * Properties of a RequestDeliverTx. + * @memberof tendermint.abci + * @interface IRequestDeliverTx + * @property {Uint8Array|null} [tx] RequestDeliverTx tx + */ + + /** + * Constructs a new RequestDeliverTx. + * @memberof tendermint.abci + * @classdesc Represents a RequestDeliverTx. + * @implements IRequestDeliverTx + * @constructor + * @param {tendermint.abci.IRequestDeliverTx=} [properties] Properties to set + */ + function RequestDeliverTx(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RequestDeliverTx tx. + * @member {Uint8Array} tx + * @memberof tendermint.abci.RequestDeliverTx + * @instance + */ + RequestDeliverTx.prototype.tx = $util.newBuffer([]); + + /** + * Creates a new RequestDeliverTx instance using the specified properties. + * @function create + * @memberof tendermint.abci.RequestDeliverTx + * @static + * @param {tendermint.abci.IRequestDeliverTx=} [properties] Properties to set + * @returns {tendermint.abci.RequestDeliverTx} RequestDeliverTx instance + */ + RequestDeliverTx.create = function create(properties) { + return new RequestDeliverTx(properties); + }; + + /** + * Encodes the specified RequestDeliverTx message. Does not implicitly {@link tendermint.abci.RequestDeliverTx.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.RequestDeliverTx + * @static + * @param {tendermint.abci.IRequestDeliverTx} message RequestDeliverTx message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestDeliverTx.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tx != null && Object.hasOwnProperty.call(message, "tx")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.tx); + return writer; + }; + + /** + * Encodes the specified RequestDeliverTx message, length delimited. Does not implicitly {@link tendermint.abci.RequestDeliverTx.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.RequestDeliverTx + * @static + * @param {tendermint.abci.IRequestDeliverTx} message RequestDeliverTx message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestDeliverTx.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RequestDeliverTx message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.RequestDeliverTx + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.RequestDeliverTx} RequestDeliverTx + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestDeliverTx.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.RequestDeliverTx(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.tx = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RequestDeliverTx message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.RequestDeliverTx + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.RequestDeliverTx} RequestDeliverTx + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestDeliverTx.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RequestDeliverTx message. + * @function verify + * @memberof tendermint.abci.RequestDeliverTx + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RequestDeliverTx.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tx != null && message.hasOwnProperty("tx")) + if (!(message.tx && typeof message.tx.length === "number" || $util.isString(message.tx))) + return "tx: buffer expected"; + return null; + }; + + /** + * Creates a RequestDeliverTx message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.RequestDeliverTx + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.RequestDeliverTx} RequestDeliverTx + */ + RequestDeliverTx.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.RequestDeliverTx) + return object; + var message = new $root.tendermint.abci.RequestDeliverTx(); + if (object.tx != null) + if (typeof object.tx === "string") + $util.base64.decode(object.tx, message.tx = $util.newBuffer($util.base64.length(object.tx)), 0); + else if (object.tx.length) + message.tx = object.tx; + return message; + }; + + /** + * Creates a plain object from a RequestDeliverTx message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.RequestDeliverTx + * @static + * @param {tendermint.abci.RequestDeliverTx} message RequestDeliverTx + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RequestDeliverTx.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if (options.bytes === String) + object.tx = ""; + else { + object.tx = []; + if (options.bytes !== Array) + object.tx = $util.newBuffer(object.tx); + } + if (message.tx != null && message.hasOwnProperty("tx")) + object.tx = options.bytes === String ? $util.base64.encode(message.tx, 0, message.tx.length) : options.bytes === Array ? Array.prototype.slice.call(message.tx) : message.tx; + return object; + }; + + /** + * Converts this RequestDeliverTx to JSON. + * @function toJSON + * @memberof tendermint.abci.RequestDeliverTx + * @instance + * @returns {Object.} JSON object + */ + RequestDeliverTx.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RequestDeliverTx; + })(abci.RequestDeliverTx || {}); + + abci.RequestEndBlock = (function(RequestEndBlock) { + + /** + * Properties of a RequestEndBlock. + * @memberof tendermint.abci + * @interface IRequestEndBlock + * @property {number|Long|null} [height] RequestEndBlock height + */ + + /** + * Constructs a new RequestEndBlock. + * @memberof tendermint.abci + * @classdesc Represents a RequestEndBlock. + * @implements IRequestEndBlock + * @constructor + * @param {tendermint.abci.IRequestEndBlock=} [properties] Properties to set + */ + function RequestEndBlock(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RequestEndBlock height. + * @member {number|Long} height + * @memberof tendermint.abci.RequestEndBlock + * @instance + */ + RequestEndBlock.prototype.height = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new RequestEndBlock instance using the specified properties. + * @function create + * @memberof tendermint.abci.RequestEndBlock + * @static + * @param {tendermint.abci.IRequestEndBlock=} [properties] Properties to set + * @returns {tendermint.abci.RequestEndBlock} RequestEndBlock instance + */ + RequestEndBlock.create = function create(properties) { + return new RequestEndBlock(properties); + }; + + /** + * Encodes the specified RequestEndBlock message. Does not implicitly {@link tendermint.abci.RequestEndBlock.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.RequestEndBlock + * @static + * @param {tendermint.abci.IRequestEndBlock} message RequestEndBlock message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestEndBlock.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.height != null && Object.hasOwnProperty.call(message, "height")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.height); + return writer; + }; + + /** + * Encodes the specified RequestEndBlock message, length delimited. Does not implicitly {@link tendermint.abci.RequestEndBlock.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.RequestEndBlock + * @static + * @param {tendermint.abci.IRequestEndBlock} message RequestEndBlock message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestEndBlock.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RequestEndBlock message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.RequestEndBlock + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.RequestEndBlock} RequestEndBlock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestEndBlock.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.RequestEndBlock(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.height = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RequestEndBlock message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.RequestEndBlock + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.RequestEndBlock} RequestEndBlock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestEndBlock.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RequestEndBlock message. + * @function verify + * @memberof tendermint.abci.RequestEndBlock + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RequestEndBlock.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.height != null && message.hasOwnProperty("height")) + if (!$util.isInteger(message.height) && !(message.height && $util.isInteger(message.height.low) && $util.isInteger(message.height.high))) + return "height: integer|Long expected"; + return null; + }; + + /** + * Creates a RequestEndBlock message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.RequestEndBlock + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.RequestEndBlock} RequestEndBlock + */ + RequestEndBlock.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.RequestEndBlock) + return object; + var message = new $root.tendermint.abci.RequestEndBlock(); + if (object.height != null) + if ($util.Long) + (message.height = $util.Long.fromValue(object.height)).unsigned = false; + else if (typeof object.height === "string") + message.height = parseInt(object.height, 10); + else if (typeof object.height === "number") + message.height = object.height; + else if (typeof object.height === "object") + message.height = new $util.LongBits(object.height.low >>> 0, object.height.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a RequestEndBlock message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.RequestEndBlock + * @static + * @param {tendermint.abci.RequestEndBlock} message RequestEndBlock + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RequestEndBlock.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.height = options.longs === String ? "0" : 0; + if (message.height != null && message.hasOwnProperty("height")) + if (typeof message.height === "number") + object.height = options.longs === String ? String(message.height) : message.height; + else + object.height = options.longs === String ? $util.Long.prototype.toString.call(message.height) : options.longs === Number ? new $util.LongBits(message.height.low >>> 0, message.height.high >>> 0).toNumber() : message.height; + return object; + }; + + /** + * Converts this RequestEndBlock to JSON. + * @function toJSON + * @memberof tendermint.abci.RequestEndBlock + * @instance + * @returns {Object.} JSON object + */ + RequestEndBlock.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RequestEndBlock; + })(abci.RequestEndBlock || {}); + + abci.RequestCommit = (function(RequestCommit) { + + /** + * Properties of a RequestCommit. + * @memberof tendermint.abci + * @interface IRequestCommit + */ + + /** + * Constructs a new RequestCommit. + * @memberof tendermint.abci + * @classdesc Represents a RequestCommit. + * @implements IRequestCommit + * @constructor + * @param {tendermint.abci.IRequestCommit=} [properties] Properties to set + */ + function RequestCommit(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new RequestCommit instance using the specified properties. + * @function create + * @memberof tendermint.abci.RequestCommit + * @static + * @param {tendermint.abci.IRequestCommit=} [properties] Properties to set + * @returns {tendermint.abci.RequestCommit} RequestCommit instance + */ + RequestCommit.create = function create(properties) { + return new RequestCommit(properties); + }; + + /** + * Encodes the specified RequestCommit message. Does not implicitly {@link tendermint.abci.RequestCommit.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.RequestCommit + * @static + * @param {tendermint.abci.IRequestCommit} message RequestCommit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestCommit.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified RequestCommit message, length delimited. Does not implicitly {@link tendermint.abci.RequestCommit.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.RequestCommit + * @static + * @param {tendermint.abci.IRequestCommit} message RequestCommit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestCommit.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RequestCommit message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.RequestCommit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.RequestCommit} RequestCommit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestCommit.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.RequestCommit(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RequestCommit message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.RequestCommit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.RequestCommit} RequestCommit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestCommit.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RequestCommit message. + * @function verify + * @memberof tendermint.abci.RequestCommit + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RequestCommit.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a RequestCommit message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.RequestCommit + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.RequestCommit} RequestCommit + */ + RequestCommit.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.RequestCommit) + return object; + return new $root.tendermint.abci.RequestCommit(); + }; + + /** + * Creates a plain object from a RequestCommit message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.RequestCommit + * @static + * @param {tendermint.abci.RequestCommit} message RequestCommit + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RequestCommit.toObject = function toObject() { + return {}; + }; + + /** + * Converts this RequestCommit to JSON. + * @function toJSON + * @memberof tendermint.abci.RequestCommit + * @instance + * @returns {Object.} JSON object + */ + RequestCommit.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RequestCommit; + })(abci.RequestCommit || {}); + + abci.RequestListSnapshots = (function(RequestListSnapshots) { + + /** + * Properties of a RequestListSnapshots. + * @memberof tendermint.abci + * @interface IRequestListSnapshots + */ + + /** + * Constructs a new RequestListSnapshots. + * @memberof tendermint.abci + * @classdesc Represents a RequestListSnapshots. + * @implements IRequestListSnapshots + * @constructor + * @param {tendermint.abci.IRequestListSnapshots=} [properties] Properties to set + */ + function RequestListSnapshots(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new RequestListSnapshots instance using the specified properties. + * @function create + * @memberof tendermint.abci.RequestListSnapshots + * @static + * @param {tendermint.abci.IRequestListSnapshots=} [properties] Properties to set + * @returns {tendermint.abci.RequestListSnapshots} RequestListSnapshots instance + */ + RequestListSnapshots.create = function create(properties) { + return new RequestListSnapshots(properties); + }; + + /** + * Encodes the specified RequestListSnapshots message. Does not implicitly {@link tendermint.abci.RequestListSnapshots.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.RequestListSnapshots + * @static + * @param {tendermint.abci.IRequestListSnapshots} message RequestListSnapshots message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestListSnapshots.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified RequestListSnapshots message, length delimited. Does not implicitly {@link tendermint.abci.RequestListSnapshots.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.RequestListSnapshots + * @static + * @param {tendermint.abci.IRequestListSnapshots} message RequestListSnapshots message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestListSnapshots.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RequestListSnapshots message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.RequestListSnapshots + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.RequestListSnapshots} RequestListSnapshots + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestListSnapshots.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.RequestListSnapshots(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RequestListSnapshots message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.RequestListSnapshots + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.RequestListSnapshots} RequestListSnapshots + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestListSnapshots.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RequestListSnapshots message. + * @function verify + * @memberof tendermint.abci.RequestListSnapshots + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RequestListSnapshots.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a RequestListSnapshots message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.RequestListSnapshots + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.RequestListSnapshots} RequestListSnapshots + */ + RequestListSnapshots.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.RequestListSnapshots) + return object; + return new $root.tendermint.abci.RequestListSnapshots(); + }; + + /** + * Creates a plain object from a RequestListSnapshots message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.RequestListSnapshots + * @static + * @param {tendermint.abci.RequestListSnapshots} message RequestListSnapshots + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RequestListSnapshots.toObject = function toObject() { + return {}; + }; + + /** + * Converts this RequestListSnapshots to JSON. + * @function toJSON + * @memberof tendermint.abci.RequestListSnapshots + * @instance + * @returns {Object.} JSON object + */ + RequestListSnapshots.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RequestListSnapshots; + })(abci.RequestListSnapshots || {}); + + abci.RequestOfferSnapshot = (function(RequestOfferSnapshot) { + + /** + * Properties of a RequestOfferSnapshot. + * @memberof tendermint.abci + * @interface IRequestOfferSnapshot + * @property {tendermint.abci.ISnapshot|null} [snapshot] RequestOfferSnapshot snapshot + * @property {Uint8Array|null} [appHash] RequestOfferSnapshot appHash + */ + + /** + * Constructs a new RequestOfferSnapshot. + * @memberof tendermint.abci + * @classdesc Represents a RequestOfferSnapshot. + * @implements IRequestOfferSnapshot + * @constructor + * @param {tendermint.abci.IRequestOfferSnapshot=} [properties] Properties to set + */ + function RequestOfferSnapshot(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RequestOfferSnapshot snapshot. + * @member {tendermint.abci.ISnapshot|null|undefined} snapshot + * @memberof tendermint.abci.RequestOfferSnapshot + * @instance + */ + RequestOfferSnapshot.prototype.snapshot = null; + + /** + * RequestOfferSnapshot appHash. + * @member {Uint8Array} appHash + * @memberof tendermint.abci.RequestOfferSnapshot + * @instance + */ + RequestOfferSnapshot.prototype.appHash = $util.newBuffer([]); + + /** + * Creates a new RequestOfferSnapshot instance using the specified properties. + * @function create + * @memberof tendermint.abci.RequestOfferSnapshot + * @static + * @param {tendermint.abci.IRequestOfferSnapshot=} [properties] Properties to set + * @returns {tendermint.abci.RequestOfferSnapshot} RequestOfferSnapshot instance + */ + RequestOfferSnapshot.create = function create(properties) { + return new RequestOfferSnapshot(properties); + }; + + /** + * Encodes the specified RequestOfferSnapshot message. Does not implicitly {@link tendermint.abci.RequestOfferSnapshot.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.RequestOfferSnapshot + * @static + * @param {tendermint.abci.IRequestOfferSnapshot} message RequestOfferSnapshot message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestOfferSnapshot.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.snapshot != null && Object.hasOwnProperty.call(message, "snapshot")) + $root.tendermint.abci.Snapshot.encode(message.snapshot, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.appHash != null && Object.hasOwnProperty.call(message, "appHash")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.appHash); + return writer; + }; + + /** + * Encodes the specified RequestOfferSnapshot message, length delimited. Does not implicitly {@link tendermint.abci.RequestOfferSnapshot.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.RequestOfferSnapshot + * @static + * @param {tendermint.abci.IRequestOfferSnapshot} message RequestOfferSnapshot message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestOfferSnapshot.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RequestOfferSnapshot message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.RequestOfferSnapshot + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.RequestOfferSnapshot} RequestOfferSnapshot + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestOfferSnapshot.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.RequestOfferSnapshot(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.snapshot = $root.tendermint.abci.Snapshot.decode(reader, reader.uint32()); + break; + case 2: + message.appHash = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RequestOfferSnapshot message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.RequestOfferSnapshot + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.RequestOfferSnapshot} RequestOfferSnapshot + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestOfferSnapshot.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RequestOfferSnapshot message. + * @function verify + * @memberof tendermint.abci.RequestOfferSnapshot + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RequestOfferSnapshot.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.snapshot != null && message.hasOwnProperty("snapshot")) { + var error = $root.tendermint.abci.Snapshot.verify(message.snapshot); + if (error) + return "snapshot." + error; + } + if (message.appHash != null && message.hasOwnProperty("appHash")) + if (!(message.appHash && typeof message.appHash.length === "number" || $util.isString(message.appHash))) + return "appHash: buffer expected"; + return null; + }; + + /** + * Creates a RequestOfferSnapshot message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.RequestOfferSnapshot + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.RequestOfferSnapshot} RequestOfferSnapshot + */ + RequestOfferSnapshot.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.RequestOfferSnapshot) + return object; + var message = new $root.tendermint.abci.RequestOfferSnapshot(); + if (object.snapshot != null) { + if (typeof object.snapshot !== "object") + throw TypeError(".tendermint.abci.RequestOfferSnapshot.snapshot: object expected"); + message.snapshot = $root.tendermint.abci.Snapshot.fromObject(object.snapshot); + } + if (object.appHash != null) + if (typeof object.appHash === "string") + $util.base64.decode(object.appHash, message.appHash = $util.newBuffer($util.base64.length(object.appHash)), 0); + else if (object.appHash.length) + message.appHash = object.appHash; + return message; + }; + + /** + * Creates a plain object from a RequestOfferSnapshot message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.RequestOfferSnapshot + * @static + * @param {tendermint.abci.RequestOfferSnapshot} message RequestOfferSnapshot + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RequestOfferSnapshot.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.snapshot = null; + if (options.bytes === String) + object.appHash = ""; + else { + object.appHash = []; + if (options.bytes !== Array) + object.appHash = $util.newBuffer(object.appHash); + } + } + if (message.snapshot != null && message.hasOwnProperty("snapshot")) + object.snapshot = $root.tendermint.abci.Snapshot.toObject(message.snapshot, options); + if (message.appHash != null && message.hasOwnProperty("appHash")) + object.appHash = options.bytes === String ? $util.base64.encode(message.appHash, 0, message.appHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.appHash) : message.appHash; + return object; + }; + + /** + * Converts this RequestOfferSnapshot to JSON. + * @function toJSON + * @memberof tendermint.abci.RequestOfferSnapshot + * @instance + * @returns {Object.} JSON object + */ + RequestOfferSnapshot.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RequestOfferSnapshot; + })(abci.RequestOfferSnapshot || {}); + + abci.RequestLoadSnapshotChunk = (function(RequestLoadSnapshotChunk) { + + /** + * Properties of a RequestLoadSnapshotChunk. + * @memberof tendermint.abci + * @interface IRequestLoadSnapshotChunk + * @property {number|Long|null} [height] RequestLoadSnapshotChunk height + * @property {number|null} [format] RequestLoadSnapshotChunk format + * @property {number|null} [chunk] RequestLoadSnapshotChunk chunk + */ + + /** + * Constructs a new RequestLoadSnapshotChunk. + * @memberof tendermint.abci + * @classdesc Represents a RequestLoadSnapshotChunk. + * @implements IRequestLoadSnapshotChunk + * @constructor + * @param {tendermint.abci.IRequestLoadSnapshotChunk=} [properties] Properties to set + */ + function RequestLoadSnapshotChunk(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RequestLoadSnapshotChunk height. + * @member {number|Long} height + * @memberof tendermint.abci.RequestLoadSnapshotChunk + * @instance + */ + RequestLoadSnapshotChunk.prototype.height = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * RequestLoadSnapshotChunk format. + * @member {number} format + * @memberof tendermint.abci.RequestLoadSnapshotChunk + * @instance + */ + RequestLoadSnapshotChunk.prototype.format = 0; + + /** + * RequestLoadSnapshotChunk chunk. + * @member {number} chunk + * @memberof tendermint.abci.RequestLoadSnapshotChunk + * @instance + */ + RequestLoadSnapshotChunk.prototype.chunk = 0; + + /** + * Creates a new RequestLoadSnapshotChunk instance using the specified properties. + * @function create + * @memberof tendermint.abci.RequestLoadSnapshotChunk + * @static + * @param {tendermint.abci.IRequestLoadSnapshotChunk=} [properties] Properties to set + * @returns {tendermint.abci.RequestLoadSnapshotChunk} RequestLoadSnapshotChunk instance + */ + RequestLoadSnapshotChunk.create = function create(properties) { + return new RequestLoadSnapshotChunk(properties); + }; + + /** + * Encodes the specified RequestLoadSnapshotChunk message. Does not implicitly {@link tendermint.abci.RequestLoadSnapshotChunk.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.RequestLoadSnapshotChunk + * @static + * @param {tendermint.abci.IRequestLoadSnapshotChunk} message RequestLoadSnapshotChunk message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestLoadSnapshotChunk.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.height != null && Object.hasOwnProperty.call(message, "height")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.height); + if (message.format != null && Object.hasOwnProperty.call(message, "format")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.format); + if (message.chunk != null && Object.hasOwnProperty.call(message, "chunk")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.chunk); + return writer; + }; + + /** + * Encodes the specified RequestLoadSnapshotChunk message, length delimited. Does not implicitly {@link tendermint.abci.RequestLoadSnapshotChunk.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.RequestLoadSnapshotChunk + * @static + * @param {tendermint.abci.IRequestLoadSnapshotChunk} message RequestLoadSnapshotChunk message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestLoadSnapshotChunk.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RequestLoadSnapshotChunk message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.RequestLoadSnapshotChunk + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.RequestLoadSnapshotChunk} RequestLoadSnapshotChunk + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestLoadSnapshotChunk.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.RequestLoadSnapshotChunk(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.height = reader.uint64(); + break; + case 2: + message.format = reader.uint32(); + break; + case 3: + message.chunk = reader.uint32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RequestLoadSnapshotChunk message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.RequestLoadSnapshotChunk + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.RequestLoadSnapshotChunk} RequestLoadSnapshotChunk + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestLoadSnapshotChunk.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RequestLoadSnapshotChunk message. + * @function verify + * @memberof tendermint.abci.RequestLoadSnapshotChunk + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RequestLoadSnapshotChunk.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.height != null && message.hasOwnProperty("height")) + if (!$util.isInteger(message.height) && !(message.height && $util.isInteger(message.height.low) && $util.isInteger(message.height.high))) + return "height: integer|Long expected"; + if (message.format != null && message.hasOwnProperty("format")) + if (!$util.isInteger(message.format)) + return "format: integer expected"; + if (message.chunk != null && message.hasOwnProperty("chunk")) + if (!$util.isInteger(message.chunk)) + return "chunk: integer expected"; + return null; + }; + + /** + * Creates a RequestLoadSnapshotChunk message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.RequestLoadSnapshotChunk + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.RequestLoadSnapshotChunk} RequestLoadSnapshotChunk + */ + RequestLoadSnapshotChunk.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.RequestLoadSnapshotChunk) + return object; + var message = new $root.tendermint.abci.RequestLoadSnapshotChunk(); + if (object.height != null) + if ($util.Long) + (message.height = $util.Long.fromValue(object.height)).unsigned = true; + else if (typeof object.height === "string") + message.height = parseInt(object.height, 10); + else if (typeof object.height === "number") + message.height = object.height; + else if (typeof object.height === "object") + message.height = new $util.LongBits(object.height.low >>> 0, object.height.high >>> 0).toNumber(true); + if (object.format != null) + message.format = object.format >>> 0; + if (object.chunk != null) + message.chunk = object.chunk >>> 0; + return message; + }; + + /** + * Creates a plain object from a RequestLoadSnapshotChunk message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.RequestLoadSnapshotChunk + * @static + * @param {tendermint.abci.RequestLoadSnapshotChunk} message RequestLoadSnapshotChunk + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RequestLoadSnapshotChunk.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.height = options.longs === String ? "0" : 0; + object.format = 0; + object.chunk = 0; + } + if (message.height != null && message.hasOwnProperty("height")) + if (typeof message.height === "number") + object.height = options.longs === String ? String(message.height) : message.height; + else + object.height = options.longs === String ? $util.Long.prototype.toString.call(message.height) : options.longs === Number ? new $util.LongBits(message.height.low >>> 0, message.height.high >>> 0).toNumber(true) : message.height; + if (message.format != null && message.hasOwnProperty("format")) + object.format = message.format; + if (message.chunk != null && message.hasOwnProperty("chunk")) + object.chunk = message.chunk; + return object; + }; + + /** + * Converts this RequestLoadSnapshotChunk to JSON. + * @function toJSON + * @memberof tendermint.abci.RequestLoadSnapshotChunk + * @instance + * @returns {Object.} JSON object + */ + RequestLoadSnapshotChunk.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RequestLoadSnapshotChunk; + })(abci.RequestLoadSnapshotChunk || {}); + + abci.RequestApplySnapshotChunk = (function(RequestApplySnapshotChunk) { + + /** + * Properties of a RequestApplySnapshotChunk. + * @memberof tendermint.abci + * @interface IRequestApplySnapshotChunk + * @property {number|null} [index] RequestApplySnapshotChunk index + * @property {Uint8Array|null} [chunk] RequestApplySnapshotChunk chunk + * @property {string|null} [sender] RequestApplySnapshotChunk sender + */ + + /** + * Constructs a new RequestApplySnapshotChunk. + * @memberof tendermint.abci + * @classdesc Represents a RequestApplySnapshotChunk. + * @implements IRequestApplySnapshotChunk + * @constructor + * @param {tendermint.abci.IRequestApplySnapshotChunk=} [properties] Properties to set + */ + function RequestApplySnapshotChunk(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RequestApplySnapshotChunk index. + * @member {number} index + * @memberof tendermint.abci.RequestApplySnapshotChunk + * @instance + */ + RequestApplySnapshotChunk.prototype.index = 0; + + /** + * RequestApplySnapshotChunk chunk. + * @member {Uint8Array} chunk + * @memberof tendermint.abci.RequestApplySnapshotChunk + * @instance + */ + RequestApplySnapshotChunk.prototype.chunk = $util.newBuffer([]); + + /** + * RequestApplySnapshotChunk sender. + * @member {string} sender + * @memberof tendermint.abci.RequestApplySnapshotChunk + * @instance + */ + RequestApplySnapshotChunk.prototype.sender = ""; + + /** + * Creates a new RequestApplySnapshotChunk instance using the specified properties. + * @function create + * @memberof tendermint.abci.RequestApplySnapshotChunk + * @static + * @param {tendermint.abci.IRequestApplySnapshotChunk=} [properties] Properties to set + * @returns {tendermint.abci.RequestApplySnapshotChunk} RequestApplySnapshotChunk instance + */ + RequestApplySnapshotChunk.create = function create(properties) { + return new RequestApplySnapshotChunk(properties); + }; + + /** + * Encodes the specified RequestApplySnapshotChunk message. Does not implicitly {@link tendermint.abci.RequestApplySnapshotChunk.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.RequestApplySnapshotChunk + * @static + * @param {tendermint.abci.IRequestApplySnapshotChunk} message RequestApplySnapshotChunk message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestApplySnapshotChunk.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.index != null && Object.hasOwnProperty.call(message, "index")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.index); + if (message.chunk != null && Object.hasOwnProperty.call(message, "chunk")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.chunk); + if (message.sender != null && Object.hasOwnProperty.call(message, "sender")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.sender); + return writer; + }; + + /** + * Encodes the specified RequestApplySnapshotChunk message, length delimited. Does not implicitly {@link tendermint.abci.RequestApplySnapshotChunk.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.RequestApplySnapshotChunk + * @static + * @param {tendermint.abci.IRequestApplySnapshotChunk} message RequestApplySnapshotChunk message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestApplySnapshotChunk.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RequestApplySnapshotChunk message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.RequestApplySnapshotChunk + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.RequestApplySnapshotChunk} RequestApplySnapshotChunk + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestApplySnapshotChunk.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.RequestApplySnapshotChunk(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.index = reader.uint32(); + break; + case 2: + message.chunk = reader.bytes(); + break; + case 3: + message.sender = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RequestApplySnapshotChunk message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.RequestApplySnapshotChunk + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.RequestApplySnapshotChunk} RequestApplySnapshotChunk + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestApplySnapshotChunk.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RequestApplySnapshotChunk message. + * @function verify + * @memberof tendermint.abci.RequestApplySnapshotChunk + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RequestApplySnapshotChunk.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.index != null && message.hasOwnProperty("index")) + if (!$util.isInteger(message.index)) + return "index: integer expected"; + if (message.chunk != null && message.hasOwnProperty("chunk")) + if (!(message.chunk && typeof message.chunk.length === "number" || $util.isString(message.chunk))) + return "chunk: buffer expected"; + if (message.sender != null && message.hasOwnProperty("sender")) + if (!$util.isString(message.sender)) + return "sender: string expected"; + return null; + }; + + /** + * Creates a RequestApplySnapshotChunk message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.RequestApplySnapshotChunk + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.RequestApplySnapshotChunk} RequestApplySnapshotChunk + */ + RequestApplySnapshotChunk.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.RequestApplySnapshotChunk) + return object; + var message = new $root.tendermint.abci.RequestApplySnapshotChunk(); + if (object.index != null) + message.index = object.index >>> 0; + if (object.chunk != null) + if (typeof object.chunk === "string") + $util.base64.decode(object.chunk, message.chunk = $util.newBuffer($util.base64.length(object.chunk)), 0); + else if (object.chunk.length) + message.chunk = object.chunk; + if (object.sender != null) + message.sender = String(object.sender); + return message; + }; + + /** + * Creates a plain object from a RequestApplySnapshotChunk message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.RequestApplySnapshotChunk + * @static + * @param {tendermint.abci.RequestApplySnapshotChunk} message RequestApplySnapshotChunk + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RequestApplySnapshotChunk.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.index = 0; + if (options.bytes === String) + object.chunk = ""; + else { + object.chunk = []; + if (options.bytes !== Array) + object.chunk = $util.newBuffer(object.chunk); + } + object.sender = ""; + } + if (message.index != null && message.hasOwnProperty("index")) + object.index = message.index; + if (message.chunk != null && message.hasOwnProperty("chunk")) + object.chunk = options.bytes === String ? $util.base64.encode(message.chunk, 0, message.chunk.length) : options.bytes === Array ? Array.prototype.slice.call(message.chunk) : message.chunk; + if (message.sender != null && message.hasOwnProperty("sender")) + object.sender = message.sender; + return object; + }; + + /** + * Converts this RequestApplySnapshotChunk to JSON. + * @function toJSON + * @memberof tendermint.abci.RequestApplySnapshotChunk + * @instance + * @returns {Object.} JSON object + */ + RequestApplySnapshotChunk.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RequestApplySnapshotChunk; + })(abci.RequestApplySnapshotChunk || {}); + + abci.Response = (function(Response) { + + /** + * Properties of a Response. + * @memberof tendermint.abci + * @interface IResponse + * @property {tendermint.abci.IResponseException|null} [exception] Response exception + * @property {tendermint.abci.IResponseEcho|null} [echo] Response echo + * @property {tendermint.abci.IResponseFlush|null} [flush] Response flush + * @property {tendermint.abci.IResponseInfo|null} [info] Response info + * @property {tendermint.abci.IResponseSetOption|null} [setOption] Response setOption + * @property {tendermint.abci.IResponseInitChain|null} [initChain] Response initChain + * @property {tendermint.abci.IResponseQuery|null} [query] Response query + * @property {tendermint.abci.IResponseBeginBlock|null} [beginBlock] Response beginBlock + * @property {tendermint.abci.IResponseCheckTx|null} [checkTx] Response checkTx + * @property {tendermint.abci.IResponseDeliverTx|null} [deliverTx] Response deliverTx + * @property {tendermint.abci.IResponseEndBlock|null} [endBlock] Response endBlock + * @property {tendermint.abci.IResponseCommit|null} [commit] Response commit + * @property {tendermint.abci.IResponseListSnapshots|null} [listSnapshots] Response listSnapshots + * @property {tendermint.abci.IResponseOfferSnapshot|null} [offerSnapshot] Response offerSnapshot + * @property {tendermint.abci.IResponseLoadSnapshotChunk|null} [loadSnapshotChunk] Response loadSnapshotChunk + * @property {tendermint.abci.IResponseApplySnapshotChunk|null} [applySnapshotChunk] Response applySnapshotChunk + */ + + /** + * Constructs a new Response. + * @memberof tendermint.abci + * @classdesc Represents a Response. + * @implements IResponse + * @constructor + * @param {tendermint.abci.IResponse=} [properties] Properties to set + */ + function Response(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Response exception. + * @member {tendermint.abci.IResponseException|null|undefined} exception + * @memberof tendermint.abci.Response + * @instance + */ + Response.prototype.exception = null; + + /** + * Response echo. + * @member {tendermint.abci.IResponseEcho|null|undefined} echo + * @memberof tendermint.abci.Response + * @instance + */ + Response.prototype.echo = null; + + /** + * Response flush. + * @member {tendermint.abci.IResponseFlush|null|undefined} flush + * @memberof tendermint.abci.Response + * @instance + */ + Response.prototype.flush = null; + + /** + * Response info. + * @member {tendermint.abci.IResponseInfo|null|undefined} info + * @memberof tendermint.abci.Response + * @instance + */ + Response.prototype.info = null; + + /** + * Response setOption. + * @member {tendermint.abci.IResponseSetOption|null|undefined} setOption + * @memberof tendermint.abci.Response + * @instance + */ + Response.prototype.setOption = null; + + /** + * Response initChain. + * @member {tendermint.abci.IResponseInitChain|null|undefined} initChain + * @memberof tendermint.abci.Response + * @instance + */ + Response.prototype.initChain = null; + + /** + * Response query. + * @member {tendermint.abci.IResponseQuery|null|undefined} query + * @memberof tendermint.abci.Response + * @instance + */ + Response.prototype.query = null; + + /** + * Response beginBlock. + * @member {tendermint.abci.IResponseBeginBlock|null|undefined} beginBlock + * @memberof tendermint.abci.Response + * @instance + */ + Response.prototype.beginBlock = null; + + /** + * Response checkTx. + * @member {tendermint.abci.IResponseCheckTx|null|undefined} checkTx + * @memberof tendermint.abci.Response + * @instance + */ + Response.prototype.checkTx = null; + + /** + * Response deliverTx. + * @member {tendermint.abci.IResponseDeliverTx|null|undefined} deliverTx + * @memberof tendermint.abci.Response + * @instance + */ + Response.prototype.deliverTx = null; + + /** + * Response endBlock. + * @member {tendermint.abci.IResponseEndBlock|null|undefined} endBlock + * @memberof tendermint.abci.Response + * @instance + */ + Response.prototype.endBlock = null; + + /** + * Response commit. + * @member {tendermint.abci.IResponseCommit|null|undefined} commit + * @memberof tendermint.abci.Response + * @instance + */ + Response.prototype.commit = null; + + /** + * Response listSnapshots. + * @member {tendermint.abci.IResponseListSnapshots|null|undefined} listSnapshots + * @memberof tendermint.abci.Response + * @instance + */ + Response.prototype.listSnapshots = null; + + /** + * Response offerSnapshot. + * @member {tendermint.abci.IResponseOfferSnapshot|null|undefined} offerSnapshot + * @memberof tendermint.abci.Response + * @instance + */ + Response.prototype.offerSnapshot = null; + + /** + * Response loadSnapshotChunk. + * @member {tendermint.abci.IResponseLoadSnapshotChunk|null|undefined} loadSnapshotChunk + * @memberof tendermint.abci.Response + * @instance + */ + Response.prototype.loadSnapshotChunk = null; + + /** + * Response applySnapshotChunk. + * @member {tendermint.abci.IResponseApplySnapshotChunk|null|undefined} applySnapshotChunk + * @memberof tendermint.abci.Response + * @instance + */ + Response.prototype.applySnapshotChunk = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Response value. + * @member {"exception"|"echo"|"flush"|"info"|"setOption"|"initChain"|"query"|"beginBlock"|"checkTx"|"deliverTx"|"endBlock"|"commit"|"listSnapshots"|"offerSnapshot"|"loadSnapshotChunk"|"applySnapshotChunk"|undefined} value + * @memberof tendermint.abci.Response + * @instance + */ + Object.defineProperty(Response.prototype, "value", { + get: $util.oneOfGetter($oneOfFields = ["exception", "echo", "flush", "info", "setOption", "initChain", "query", "beginBlock", "checkTx", "deliverTx", "endBlock", "commit", "listSnapshots", "offerSnapshot", "loadSnapshotChunk", "applySnapshotChunk"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Response instance using the specified properties. + * @function create + * @memberof tendermint.abci.Response + * @static + * @param {tendermint.abci.IResponse=} [properties] Properties to set + * @returns {tendermint.abci.Response} Response instance + */ + Response.create = function create(properties) { + return new Response(properties); + }; + + /** + * Encodes the specified Response message. Does not implicitly {@link tendermint.abci.Response.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.Response + * @static + * @param {tendermint.abci.IResponse} message Response message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Response.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.exception != null && Object.hasOwnProperty.call(message, "exception")) + $root.tendermint.abci.ResponseException.encode(message.exception, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.echo != null && Object.hasOwnProperty.call(message, "echo")) + $root.tendermint.abci.ResponseEcho.encode(message.echo, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.flush != null && Object.hasOwnProperty.call(message, "flush")) + $root.tendermint.abci.ResponseFlush.encode(message.flush, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.info != null && Object.hasOwnProperty.call(message, "info")) + $root.tendermint.abci.ResponseInfo.encode(message.info, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.setOption != null && Object.hasOwnProperty.call(message, "setOption")) + $root.tendermint.abci.ResponseSetOption.encode(message.setOption, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.initChain != null && Object.hasOwnProperty.call(message, "initChain")) + $root.tendermint.abci.ResponseInitChain.encode(message.initChain, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.query != null && Object.hasOwnProperty.call(message, "query")) + $root.tendermint.abci.ResponseQuery.encode(message.query, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.beginBlock != null && Object.hasOwnProperty.call(message, "beginBlock")) + $root.tendermint.abci.ResponseBeginBlock.encode(message.beginBlock, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.checkTx != null && Object.hasOwnProperty.call(message, "checkTx")) + $root.tendermint.abci.ResponseCheckTx.encode(message.checkTx, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.deliverTx != null && Object.hasOwnProperty.call(message, "deliverTx")) + $root.tendermint.abci.ResponseDeliverTx.encode(message.deliverTx, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.endBlock != null && Object.hasOwnProperty.call(message, "endBlock")) + $root.tendermint.abci.ResponseEndBlock.encode(message.endBlock, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.commit != null && Object.hasOwnProperty.call(message, "commit")) + $root.tendermint.abci.ResponseCommit.encode(message.commit, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.listSnapshots != null && Object.hasOwnProperty.call(message, "listSnapshots")) + $root.tendermint.abci.ResponseListSnapshots.encode(message.listSnapshots, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.offerSnapshot != null && Object.hasOwnProperty.call(message, "offerSnapshot")) + $root.tendermint.abci.ResponseOfferSnapshot.encode(message.offerSnapshot, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.loadSnapshotChunk != null && Object.hasOwnProperty.call(message, "loadSnapshotChunk")) + $root.tendermint.abci.ResponseLoadSnapshotChunk.encode(message.loadSnapshotChunk, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.applySnapshotChunk != null && Object.hasOwnProperty.call(message, "applySnapshotChunk")) + $root.tendermint.abci.ResponseApplySnapshotChunk.encode(message.applySnapshotChunk, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Response message, length delimited. Does not implicitly {@link tendermint.abci.Response.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.Response + * @static + * @param {tendermint.abci.IResponse} message Response message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Response.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Response message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.Response + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.Response} Response + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Response.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.Response(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.exception = $root.tendermint.abci.ResponseException.decode(reader, reader.uint32()); + break; + case 2: + message.echo = $root.tendermint.abci.ResponseEcho.decode(reader, reader.uint32()); + break; + case 3: + message.flush = $root.tendermint.abci.ResponseFlush.decode(reader, reader.uint32()); + break; + case 4: + message.info = $root.tendermint.abci.ResponseInfo.decode(reader, reader.uint32()); + break; + case 5: + message.setOption = $root.tendermint.abci.ResponseSetOption.decode(reader, reader.uint32()); + break; + case 6: + message.initChain = $root.tendermint.abci.ResponseInitChain.decode(reader, reader.uint32()); + break; + case 7: + message.query = $root.tendermint.abci.ResponseQuery.decode(reader, reader.uint32()); + break; + case 8: + message.beginBlock = $root.tendermint.abci.ResponseBeginBlock.decode(reader, reader.uint32()); + break; + case 9: + message.checkTx = $root.tendermint.abci.ResponseCheckTx.decode(reader, reader.uint32()); + break; + case 10: + message.deliverTx = $root.tendermint.abci.ResponseDeliverTx.decode(reader, reader.uint32()); + break; + case 11: + message.endBlock = $root.tendermint.abci.ResponseEndBlock.decode(reader, reader.uint32()); + break; + case 12: + message.commit = $root.tendermint.abci.ResponseCommit.decode(reader, reader.uint32()); + break; + case 13: + message.listSnapshots = $root.tendermint.abci.ResponseListSnapshots.decode(reader, reader.uint32()); + break; + case 14: + message.offerSnapshot = $root.tendermint.abci.ResponseOfferSnapshot.decode(reader, reader.uint32()); + break; + case 15: + message.loadSnapshotChunk = $root.tendermint.abci.ResponseLoadSnapshotChunk.decode(reader, reader.uint32()); + break; + case 16: + message.applySnapshotChunk = $root.tendermint.abci.ResponseApplySnapshotChunk.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Response message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.Response + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.Response} Response + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Response.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Response message. + * @function verify + * @memberof tendermint.abci.Response + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Response.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.exception != null && message.hasOwnProperty("exception")) { + properties.value = 1; + { + var error = $root.tendermint.abci.ResponseException.verify(message.exception); + if (error) + return "exception." + error; + } + } + if (message.echo != null && message.hasOwnProperty("echo")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.tendermint.abci.ResponseEcho.verify(message.echo); + if (error) + return "echo." + error; + } + } + if (message.flush != null && message.hasOwnProperty("flush")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.tendermint.abci.ResponseFlush.verify(message.flush); + if (error) + return "flush." + error; + } + } + if (message.info != null && message.hasOwnProperty("info")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.tendermint.abci.ResponseInfo.verify(message.info); + if (error) + return "info." + error; + } + } + if (message.setOption != null && message.hasOwnProperty("setOption")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.tendermint.abci.ResponseSetOption.verify(message.setOption); + if (error) + return "setOption." + error; + } + } + if (message.initChain != null && message.hasOwnProperty("initChain")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.tendermint.abci.ResponseInitChain.verify(message.initChain); + if (error) + return "initChain." + error; + } + } + if (message.query != null && message.hasOwnProperty("query")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.tendermint.abci.ResponseQuery.verify(message.query); + if (error) + return "query." + error; + } + } + if (message.beginBlock != null && message.hasOwnProperty("beginBlock")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.tendermint.abci.ResponseBeginBlock.verify(message.beginBlock); + if (error) + return "beginBlock." + error; + } + } + if (message.checkTx != null && message.hasOwnProperty("checkTx")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.tendermint.abci.ResponseCheckTx.verify(message.checkTx); + if (error) + return "checkTx." + error; + } + } + if (message.deliverTx != null && message.hasOwnProperty("deliverTx")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.tendermint.abci.ResponseDeliverTx.verify(message.deliverTx); + if (error) + return "deliverTx." + error; + } + } + if (message.endBlock != null && message.hasOwnProperty("endBlock")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.tendermint.abci.ResponseEndBlock.verify(message.endBlock); + if (error) + return "endBlock." + error; + } + } + if (message.commit != null && message.hasOwnProperty("commit")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.tendermint.abci.ResponseCommit.verify(message.commit); + if (error) + return "commit." + error; + } + } + if (message.listSnapshots != null && message.hasOwnProperty("listSnapshots")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.tendermint.abci.ResponseListSnapshots.verify(message.listSnapshots); + if (error) + return "listSnapshots." + error; + } + } + if (message.offerSnapshot != null && message.hasOwnProperty("offerSnapshot")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.tendermint.abci.ResponseOfferSnapshot.verify(message.offerSnapshot); + if (error) + return "offerSnapshot." + error; + } + } + if (message.loadSnapshotChunk != null && message.hasOwnProperty("loadSnapshotChunk")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.tendermint.abci.ResponseLoadSnapshotChunk.verify(message.loadSnapshotChunk); + if (error) + return "loadSnapshotChunk." + error; + } + } + if (message.applySnapshotChunk != null && message.hasOwnProperty("applySnapshotChunk")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.tendermint.abci.ResponseApplySnapshotChunk.verify(message.applySnapshotChunk); + if (error) + return "applySnapshotChunk." + error; + } + } + return null; + }; + + /** + * Creates a Response message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.Response + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.Response} Response + */ + Response.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.Response) + return object; + var message = new $root.tendermint.abci.Response(); + if (object.exception != null) { + if (typeof object.exception !== "object") + throw TypeError(".tendermint.abci.Response.exception: object expected"); + message.exception = $root.tendermint.abci.ResponseException.fromObject(object.exception); + } + if (object.echo != null) { + if (typeof object.echo !== "object") + throw TypeError(".tendermint.abci.Response.echo: object expected"); + message.echo = $root.tendermint.abci.ResponseEcho.fromObject(object.echo); + } + if (object.flush != null) { + if (typeof object.flush !== "object") + throw TypeError(".tendermint.abci.Response.flush: object expected"); + message.flush = $root.tendermint.abci.ResponseFlush.fromObject(object.flush); + } + if (object.info != null) { + if (typeof object.info !== "object") + throw TypeError(".tendermint.abci.Response.info: object expected"); + message.info = $root.tendermint.abci.ResponseInfo.fromObject(object.info); + } + if (object.setOption != null) { + if (typeof object.setOption !== "object") + throw TypeError(".tendermint.abci.Response.setOption: object expected"); + message.setOption = $root.tendermint.abci.ResponseSetOption.fromObject(object.setOption); + } + if (object.initChain != null) { + if (typeof object.initChain !== "object") + throw TypeError(".tendermint.abci.Response.initChain: object expected"); + message.initChain = $root.tendermint.abci.ResponseInitChain.fromObject(object.initChain); + } + if (object.query != null) { + if (typeof object.query !== "object") + throw TypeError(".tendermint.abci.Response.query: object expected"); + message.query = $root.tendermint.abci.ResponseQuery.fromObject(object.query); + } + if (object.beginBlock != null) { + if (typeof object.beginBlock !== "object") + throw TypeError(".tendermint.abci.Response.beginBlock: object expected"); + message.beginBlock = $root.tendermint.abci.ResponseBeginBlock.fromObject(object.beginBlock); + } + if (object.checkTx != null) { + if (typeof object.checkTx !== "object") + throw TypeError(".tendermint.abci.Response.checkTx: object expected"); + message.checkTx = $root.tendermint.abci.ResponseCheckTx.fromObject(object.checkTx); + } + if (object.deliverTx != null) { + if (typeof object.deliverTx !== "object") + throw TypeError(".tendermint.abci.Response.deliverTx: object expected"); + message.deliverTx = $root.tendermint.abci.ResponseDeliverTx.fromObject(object.deliverTx); + } + if (object.endBlock != null) { + if (typeof object.endBlock !== "object") + throw TypeError(".tendermint.abci.Response.endBlock: object expected"); + message.endBlock = $root.tendermint.abci.ResponseEndBlock.fromObject(object.endBlock); + } + if (object.commit != null) { + if (typeof object.commit !== "object") + throw TypeError(".tendermint.abci.Response.commit: object expected"); + message.commit = $root.tendermint.abci.ResponseCommit.fromObject(object.commit); + } + if (object.listSnapshots != null) { + if (typeof object.listSnapshots !== "object") + throw TypeError(".tendermint.abci.Response.listSnapshots: object expected"); + message.listSnapshots = $root.tendermint.abci.ResponseListSnapshots.fromObject(object.listSnapshots); + } + if (object.offerSnapshot != null) { + if (typeof object.offerSnapshot !== "object") + throw TypeError(".tendermint.abci.Response.offerSnapshot: object expected"); + message.offerSnapshot = $root.tendermint.abci.ResponseOfferSnapshot.fromObject(object.offerSnapshot); + } + if (object.loadSnapshotChunk != null) { + if (typeof object.loadSnapshotChunk !== "object") + throw TypeError(".tendermint.abci.Response.loadSnapshotChunk: object expected"); + message.loadSnapshotChunk = $root.tendermint.abci.ResponseLoadSnapshotChunk.fromObject(object.loadSnapshotChunk); + } + if (object.applySnapshotChunk != null) { + if (typeof object.applySnapshotChunk !== "object") + throw TypeError(".tendermint.abci.Response.applySnapshotChunk: object expected"); + message.applySnapshotChunk = $root.tendermint.abci.ResponseApplySnapshotChunk.fromObject(object.applySnapshotChunk); + } + return message; + }; + + /** + * Creates a plain object from a Response message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.Response + * @static + * @param {tendermint.abci.Response} message Response + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Response.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.exception != null && message.hasOwnProperty("exception")) { + object.exception = $root.tendermint.abci.ResponseException.toObject(message.exception, options); + if (options.oneofs) + object.value = "exception"; + } + if (message.echo != null && message.hasOwnProperty("echo")) { + object.echo = $root.tendermint.abci.ResponseEcho.toObject(message.echo, options); + if (options.oneofs) + object.value = "echo"; + } + if (message.flush != null && message.hasOwnProperty("flush")) { + object.flush = $root.tendermint.abci.ResponseFlush.toObject(message.flush, options); + if (options.oneofs) + object.value = "flush"; + } + if (message.info != null && message.hasOwnProperty("info")) { + object.info = $root.tendermint.abci.ResponseInfo.toObject(message.info, options); + if (options.oneofs) + object.value = "info"; + } + if (message.setOption != null && message.hasOwnProperty("setOption")) { + object.setOption = $root.tendermint.abci.ResponseSetOption.toObject(message.setOption, options); + if (options.oneofs) + object.value = "setOption"; + } + if (message.initChain != null && message.hasOwnProperty("initChain")) { + object.initChain = $root.tendermint.abci.ResponseInitChain.toObject(message.initChain, options); + if (options.oneofs) + object.value = "initChain"; + } + if (message.query != null && message.hasOwnProperty("query")) { + object.query = $root.tendermint.abci.ResponseQuery.toObject(message.query, options); + if (options.oneofs) + object.value = "query"; + } + if (message.beginBlock != null && message.hasOwnProperty("beginBlock")) { + object.beginBlock = $root.tendermint.abci.ResponseBeginBlock.toObject(message.beginBlock, options); + if (options.oneofs) + object.value = "beginBlock"; + } + if (message.checkTx != null && message.hasOwnProperty("checkTx")) { + object.checkTx = $root.tendermint.abci.ResponseCheckTx.toObject(message.checkTx, options); + if (options.oneofs) + object.value = "checkTx"; + } + if (message.deliverTx != null && message.hasOwnProperty("deliverTx")) { + object.deliverTx = $root.tendermint.abci.ResponseDeliverTx.toObject(message.deliverTx, options); + if (options.oneofs) + object.value = "deliverTx"; + } + if (message.endBlock != null && message.hasOwnProperty("endBlock")) { + object.endBlock = $root.tendermint.abci.ResponseEndBlock.toObject(message.endBlock, options); + if (options.oneofs) + object.value = "endBlock"; + } + if (message.commit != null && message.hasOwnProperty("commit")) { + object.commit = $root.tendermint.abci.ResponseCommit.toObject(message.commit, options); + if (options.oneofs) + object.value = "commit"; + } + if (message.listSnapshots != null && message.hasOwnProperty("listSnapshots")) { + object.listSnapshots = $root.tendermint.abci.ResponseListSnapshots.toObject(message.listSnapshots, options); + if (options.oneofs) + object.value = "listSnapshots"; + } + if (message.offerSnapshot != null && message.hasOwnProperty("offerSnapshot")) { + object.offerSnapshot = $root.tendermint.abci.ResponseOfferSnapshot.toObject(message.offerSnapshot, options); + if (options.oneofs) + object.value = "offerSnapshot"; + } + if (message.loadSnapshotChunk != null && message.hasOwnProperty("loadSnapshotChunk")) { + object.loadSnapshotChunk = $root.tendermint.abci.ResponseLoadSnapshotChunk.toObject(message.loadSnapshotChunk, options); + if (options.oneofs) + object.value = "loadSnapshotChunk"; + } + if (message.applySnapshotChunk != null && message.hasOwnProperty("applySnapshotChunk")) { + object.applySnapshotChunk = $root.tendermint.abci.ResponseApplySnapshotChunk.toObject(message.applySnapshotChunk, options); + if (options.oneofs) + object.value = "applySnapshotChunk"; + } + return object; + }; + + /** + * Converts this Response to JSON. + * @function toJSON + * @memberof tendermint.abci.Response + * @instance + * @returns {Object.} JSON object + */ + Response.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Response; + })(abci.Response || {}); + + abci.ResponseException = (function(ResponseException) { + + /** + * Properties of a ResponseException. + * @memberof tendermint.abci + * @interface IResponseException + * @property {string|null} [error] ResponseException error + */ + + /** + * Constructs a new ResponseException. + * @memberof tendermint.abci + * @classdesc Represents a ResponseException. + * @implements IResponseException + * @constructor + * @param {tendermint.abci.IResponseException=} [properties] Properties to set + */ + function ResponseException(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResponseException error. + * @member {string} error + * @memberof tendermint.abci.ResponseException + * @instance + */ + ResponseException.prototype.error = ""; + + /** + * Creates a new ResponseException instance using the specified properties. + * @function create + * @memberof tendermint.abci.ResponseException + * @static + * @param {tendermint.abci.IResponseException=} [properties] Properties to set + * @returns {tendermint.abci.ResponseException} ResponseException instance + */ + ResponseException.create = function create(properties) { + return new ResponseException(properties); + }; + + /** + * Encodes the specified ResponseException message. Does not implicitly {@link tendermint.abci.ResponseException.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.ResponseException + * @static + * @param {tendermint.abci.IResponseException} message ResponseException message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseException.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.error != null && Object.hasOwnProperty.call(message, "error")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.error); + return writer; + }; + + /** + * Encodes the specified ResponseException message, length delimited. Does not implicitly {@link tendermint.abci.ResponseException.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.ResponseException + * @static + * @param {tendermint.abci.IResponseException} message ResponseException message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseException.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResponseException message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.ResponseException + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.ResponseException} ResponseException + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseException.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.ResponseException(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.error = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResponseException message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.ResponseException + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.ResponseException} ResponseException + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseException.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResponseException message. + * @function verify + * @memberof tendermint.abci.ResponseException + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResponseException.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.error != null && message.hasOwnProperty("error")) + if (!$util.isString(message.error)) + return "error: string expected"; + return null; + }; + + /** + * Creates a ResponseException message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.ResponseException + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.ResponseException} ResponseException + */ + ResponseException.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.ResponseException) + return object; + var message = new $root.tendermint.abci.ResponseException(); + if (object.error != null) + message.error = String(object.error); + return message; + }; + + /** + * Creates a plain object from a ResponseException message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.ResponseException + * @static + * @param {tendermint.abci.ResponseException} message ResponseException + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResponseException.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.error = ""; + if (message.error != null && message.hasOwnProperty("error")) + object.error = message.error; + return object; + }; + + /** + * Converts this ResponseException to JSON. + * @function toJSON + * @memberof tendermint.abci.ResponseException + * @instance + * @returns {Object.} JSON object + */ + ResponseException.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ResponseException; + })(abci.ResponseException || {}); + + abci.ResponseEcho = (function(ResponseEcho) { + + /** + * Properties of a ResponseEcho. + * @memberof tendermint.abci + * @interface IResponseEcho + * @property {string|null} [message] ResponseEcho message + */ + + /** + * Constructs a new ResponseEcho. + * @memberof tendermint.abci + * @classdesc Represents a ResponseEcho. + * @implements IResponseEcho + * @constructor + * @param {tendermint.abci.IResponseEcho=} [properties] Properties to set + */ + function ResponseEcho(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResponseEcho message. + * @member {string} message + * @memberof tendermint.abci.ResponseEcho + * @instance + */ + ResponseEcho.prototype.message = ""; + + /** + * Creates a new ResponseEcho instance using the specified properties. + * @function create + * @memberof tendermint.abci.ResponseEcho + * @static + * @param {tendermint.abci.IResponseEcho=} [properties] Properties to set + * @returns {tendermint.abci.ResponseEcho} ResponseEcho instance + */ + ResponseEcho.create = function create(properties) { + return new ResponseEcho(properties); + }; + + /** + * Encodes the specified ResponseEcho message. Does not implicitly {@link tendermint.abci.ResponseEcho.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.ResponseEcho + * @static + * @param {tendermint.abci.IResponseEcho} message ResponseEcho message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseEcho.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.message); + return writer; + }; + + /** + * Encodes the specified ResponseEcho message, length delimited. Does not implicitly {@link tendermint.abci.ResponseEcho.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.ResponseEcho + * @static + * @param {tendermint.abci.IResponseEcho} message ResponseEcho message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseEcho.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResponseEcho message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.ResponseEcho + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.ResponseEcho} ResponseEcho + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseEcho.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.ResponseEcho(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.message = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResponseEcho message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.ResponseEcho + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.ResponseEcho} ResponseEcho + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseEcho.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResponseEcho message. + * @function verify + * @memberof tendermint.abci.ResponseEcho + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResponseEcho.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + return null; + }; + + /** + * Creates a ResponseEcho message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.ResponseEcho + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.ResponseEcho} ResponseEcho + */ + ResponseEcho.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.ResponseEcho) + return object; + var message = new $root.tendermint.abci.ResponseEcho(); + if (object.message != null) + message.message = String(object.message); + return message; + }; + + /** + * Creates a plain object from a ResponseEcho message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.ResponseEcho + * @static + * @param {tendermint.abci.ResponseEcho} message ResponseEcho + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResponseEcho.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.message = ""; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + return object; + }; + + /** + * Converts this ResponseEcho to JSON. + * @function toJSON + * @memberof tendermint.abci.ResponseEcho + * @instance + * @returns {Object.} JSON object + */ + ResponseEcho.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ResponseEcho; + })(abci.ResponseEcho || {}); + + abci.ResponseFlush = (function(ResponseFlush) { + + /** + * Properties of a ResponseFlush. + * @memberof tendermint.abci + * @interface IResponseFlush + */ + + /** + * Constructs a new ResponseFlush. + * @memberof tendermint.abci + * @classdesc Represents a ResponseFlush. + * @implements IResponseFlush + * @constructor + * @param {tendermint.abci.IResponseFlush=} [properties] Properties to set + */ + function ResponseFlush(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new ResponseFlush instance using the specified properties. + * @function create + * @memberof tendermint.abci.ResponseFlush + * @static + * @param {tendermint.abci.IResponseFlush=} [properties] Properties to set + * @returns {tendermint.abci.ResponseFlush} ResponseFlush instance + */ + ResponseFlush.create = function create(properties) { + return new ResponseFlush(properties); + }; + + /** + * Encodes the specified ResponseFlush message. Does not implicitly {@link tendermint.abci.ResponseFlush.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.ResponseFlush + * @static + * @param {tendermint.abci.IResponseFlush} message ResponseFlush message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseFlush.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified ResponseFlush message, length delimited. Does not implicitly {@link tendermint.abci.ResponseFlush.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.ResponseFlush + * @static + * @param {tendermint.abci.IResponseFlush} message ResponseFlush message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseFlush.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResponseFlush message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.ResponseFlush + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.ResponseFlush} ResponseFlush + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseFlush.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.ResponseFlush(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResponseFlush message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.ResponseFlush + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.ResponseFlush} ResponseFlush + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseFlush.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResponseFlush message. + * @function verify + * @memberof tendermint.abci.ResponseFlush + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResponseFlush.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a ResponseFlush message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.ResponseFlush + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.ResponseFlush} ResponseFlush + */ + ResponseFlush.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.ResponseFlush) + return object; + return new $root.tendermint.abci.ResponseFlush(); + }; + + /** + * Creates a plain object from a ResponseFlush message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.ResponseFlush + * @static + * @param {tendermint.abci.ResponseFlush} message ResponseFlush + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResponseFlush.toObject = function toObject() { + return {}; + }; + + /** + * Converts this ResponseFlush to JSON. + * @function toJSON + * @memberof tendermint.abci.ResponseFlush + * @instance + * @returns {Object.} JSON object + */ + ResponseFlush.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ResponseFlush; + })(abci.ResponseFlush || {}); + + abci.ResponseInfo = (function(ResponseInfo) { + + /** + * Properties of a ResponseInfo. + * @memberof tendermint.abci + * @interface IResponseInfo + * @property {string|null} [data] ResponseInfo data + * @property {string|null} [version] ResponseInfo version + * @property {number|Long|null} [appVersion] ResponseInfo appVersion + * @property {number|Long|null} [lastBlockHeight] ResponseInfo lastBlockHeight + * @property {Uint8Array|null} [lastBlockAppHash] ResponseInfo lastBlockAppHash + */ + + /** + * Constructs a new ResponseInfo. + * @memberof tendermint.abci + * @classdesc Represents a ResponseInfo. + * @implements IResponseInfo + * @constructor + * @param {tendermint.abci.IResponseInfo=} [properties] Properties to set + */ + function ResponseInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResponseInfo data. + * @member {string} data + * @memberof tendermint.abci.ResponseInfo + * @instance + */ + ResponseInfo.prototype.data = ""; + + /** + * ResponseInfo version. + * @member {string} version + * @memberof tendermint.abci.ResponseInfo + * @instance + */ + ResponseInfo.prototype.version = ""; + + /** + * ResponseInfo appVersion. + * @member {number|Long} appVersion + * @memberof tendermint.abci.ResponseInfo + * @instance + */ + ResponseInfo.prototype.appVersion = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * ResponseInfo lastBlockHeight. + * @member {number|Long} lastBlockHeight + * @memberof tendermint.abci.ResponseInfo + * @instance + */ + ResponseInfo.prototype.lastBlockHeight = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ResponseInfo lastBlockAppHash. + * @member {Uint8Array} lastBlockAppHash + * @memberof tendermint.abci.ResponseInfo + * @instance + */ + ResponseInfo.prototype.lastBlockAppHash = $util.newBuffer([]); + + /** + * Creates a new ResponseInfo instance using the specified properties. + * @function create + * @memberof tendermint.abci.ResponseInfo + * @static + * @param {tendermint.abci.IResponseInfo=} [properties] Properties to set + * @returns {tendermint.abci.ResponseInfo} ResponseInfo instance + */ + ResponseInfo.create = function create(properties) { + return new ResponseInfo(properties); + }; + + /** + * Encodes the specified ResponseInfo message. Does not implicitly {@link tendermint.abci.ResponseInfo.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.ResponseInfo + * @static + * @param {tendermint.abci.IResponseInfo} message ResponseInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.data != null && Object.hasOwnProperty.call(message, "data")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.data); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.version); + if (message.appVersion != null && Object.hasOwnProperty.call(message, "appVersion")) + writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.appVersion); + if (message.lastBlockHeight != null && Object.hasOwnProperty.call(message, "lastBlockHeight")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.lastBlockHeight); + if (message.lastBlockAppHash != null && Object.hasOwnProperty.call(message, "lastBlockAppHash")) + writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.lastBlockAppHash); + return writer; + }; + + /** + * Encodes the specified ResponseInfo message, length delimited. Does not implicitly {@link tendermint.abci.ResponseInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.ResponseInfo + * @static + * @param {tendermint.abci.IResponseInfo} message ResponseInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResponseInfo message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.ResponseInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.ResponseInfo} ResponseInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.ResponseInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.data = reader.string(); + break; + case 2: + message.version = reader.string(); + break; + case 3: + message.appVersion = reader.uint64(); + break; + case 4: + message.lastBlockHeight = reader.int64(); + break; + case 5: + message.lastBlockAppHash = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResponseInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.ResponseInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.ResponseInfo} ResponseInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResponseInfo message. + * @function verify + * @memberof tendermint.abci.ResponseInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResponseInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.data != null && message.hasOwnProperty("data")) + if (!$util.isString(message.data)) + return "data: string expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.appVersion != null && message.hasOwnProperty("appVersion")) + if (!$util.isInteger(message.appVersion) && !(message.appVersion && $util.isInteger(message.appVersion.low) && $util.isInteger(message.appVersion.high))) + return "appVersion: integer|Long expected"; + if (message.lastBlockHeight != null && message.hasOwnProperty("lastBlockHeight")) + if (!$util.isInteger(message.lastBlockHeight) && !(message.lastBlockHeight && $util.isInteger(message.lastBlockHeight.low) && $util.isInteger(message.lastBlockHeight.high))) + return "lastBlockHeight: integer|Long expected"; + if (message.lastBlockAppHash != null && message.hasOwnProperty("lastBlockAppHash")) + if (!(message.lastBlockAppHash && typeof message.lastBlockAppHash.length === "number" || $util.isString(message.lastBlockAppHash))) + return "lastBlockAppHash: buffer expected"; + return null; + }; + + /** + * Creates a ResponseInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.ResponseInfo + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.ResponseInfo} ResponseInfo + */ + ResponseInfo.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.ResponseInfo) + return object; + var message = new $root.tendermint.abci.ResponseInfo(); + if (object.data != null) + message.data = String(object.data); + if (object.version != null) + message.version = String(object.version); + if (object.appVersion != null) + if ($util.Long) + (message.appVersion = $util.Long.fromValue(object.appVersion)).unsigned = true; + else if (typeof object.appVersion === "string") + message.appVersion = parseInt(object.appVersion, 10); + else if (typeof object.appVersion === "number") + message.appVersion = object.appVersion; + else if (typeof object.appVersion === "object") + message.appVersion = new $util.LongBits(object.appVersion.low >>> 0, object.appVersion.high >>> 0).toNumber(true); + if (object.lastBlockHeight != null) + if ($util.Long) + (message.lastBlockHeight = $util.Long.fromValue(object.lastBlockHeight)).unsigned = false; + else if (typeof object.lastBlockHeight === "string") + message.lastBlockHeight = parseInt(object.lastBlockHeight, 10); + else if (typeof object.lastBlockHeight === "number") + message.lastBlockHeight = object.lastBlockHeight; + else if (typeof object.lastBlockHeight === "object") + message.lastBlockHeight = new $util.LongBits(object.lastBlockHeight.low >>> 0, object.lastBlockHeight.high >>> 0).toNumber(); + if (object.lastBlockAppHash != null) + if (typeof object.lastBlockAppHash === "string") + $util.base64.decode(object.lastBlockAppHash, message.lastBlockAppHash = $util.newBuffer($util.base64.length(object.lastBlockAppHash)), 0); + else if (object.lastBlockAppHash.length) + message.lastBlockAppHash = object.lastBlockAppHash; + return message; + }; + + /** + * Creates a plain object from a ResponseInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.ResponseInfo + * @static + * @param {tendermint.abci.ResponseInfo} message ResponseInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResponseInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.data = ""; + object.version = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.appVersion = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.appVersion = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.lastBlockHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.lastBlockHeight = options.longs === String ? "0" : 0; + if (options.bytes === String) + object.lastBlockAppHash = ""; + else { + object.lastBlockAppHash = []; + if (options.bytes !== Array) + object.lastBlockAppHash = $util.newBuffer(object.lastBlockAppHash); + } + } + if (message.data != null && message.hasOwnProperty("data")) + object.data = message.data; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.appVersion != null && message.hasOwnProperty("appVersion")) + if (typeof message.appVersion === "number") + object.appVersion = options.longs === String ? String(message.appVersion) : message.appVersion; + else + object.appVersion = options.longs === String ? $util.Long.prototype.toString.call(message.appVersion) : options.longs === Number ? new $util.LongBits(message.appVersion.low >>> 0, message.appVersion.high >>> 0).toNumber(true) : message.appVersion; + if (message.lastBlockHeight != null && message.hasOwnProperty("lastBlockHeight")) + if (typeof message.lastBlockHeight === "number") + object.lastBlockHeight = options.longs === String ? String(message.lastBlockHeight) : message.lastBlockHeight; + else + object.lastBlockHeight = options.longs === String ? $util.Long.prototype.toString.call(message.lastBlockHeight) : options.longs === Number ? new $util.LongBits(message.lastBlockHeight.low >>> 0, message.lastBlockHeight.high >>> 0).toNumber() : message.lastBlockHeight; + if (message.lastBlockAppHash != null && message.hasOwnProperty("lastBlockAppHash")) + object.lastBlockAppHash = options.bytes === String ? $util.base64.encode(message.lastBlockAppHash, 0, message.lastBlockAppHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.lastBlockAppHash) : message.lastBlockAppHash; + return object; + }; + + /** + * Converts this ResponseInfo to JSON. + * @function toJSON + * @memberof tendermint.abci.ResponseInfo + * @instance + * @returns {Object.} JSON object + */ + ResponseInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ResponseInfo; + })(abci.ResponseInfo || {}); + + abci.ResponseSetOption = (function(ResponseSetOption) { + + /** + * Properties of a ResponseSetOption. + * @memberof tendermint.abci + * @interface IResponseSetOption + * @property {number|null} [code] ResponseSetOption code + * @property {string|null} [log] ResponseSetOption log + * @property {string|null} [info] ResponseSetOption info + */ + + /** + * Constructs a new ResponseSetOption. + * @memberof tendermint.abci + * @classdesc Represents a ResponseSetOption. + * @implements IResponseSetOption + * @constructor + * @param {tendermint.abci.IResponseSetOption=} [properties] Properties to set + */ + function ResponseSetOption(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResponseSetOption code. + * @member {number} code + * @memberof tendermint.abci.ResponseSetOption + * @instance + */ + ResponseSetOption.prototype.code = 0; + + /** + * ResponseSetOption log. + * @member {string} log + * @memberof tendermint.abci.ResponseSetOption + * @instance + */ + ResponseSetOption.prototype.log = ""; + + /** + * ResponseSetOption info. + * @member {string} info + * @memberof tendermint.abci.ResponseSetOption + * @instance + */ + ResponseSetOption.prototype.info = ""; + + /** + * Creates a new ResponseSetOption instance using the specified properties. + * @function create + * @memberof tendermint.abci.ResponseSetOption + * @static + * @param {tendermint.abci.IResponseSetOption=} [properties] Properties to set + * @returns {tendermint.abci.ResponseSetOption} ResponseSetOption instance + */ + ResponseSetOption.create = function create(properties) { + return new ResponseSetOption(properties); + }; + + /** + * Encodes the specified ResponseSetOption message. Does not implicitly {@link tendermint.abci.ResponseSetOption.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.ResponseSetOption + * @static + * @param {tendermint.abci.IResponseSetOption} message ResponseSetOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseSetOption.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.code != null && Object.hasOwnProperty.call(message, "code")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.code); + if (message.log != null && Object.hasOwnProperty.call(message, "log")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.log); + if (message.info != null && Object.hasOwnProperty.call(message, "info")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.info); + return writer; + }; + + /** + * Encodes the specified ResponseSetOption message, length delimited. Does not implicitly {@link tendermint.abci.ResponseSetOption.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.ResponseSetOption + * @static + * @param {tendermint.abci.IResponseSetOption} message ResponseSetOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseSetOption.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResponseSetOption message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.ResponseSetOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.ResponseSetOption} ResponseSetOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseSetOption.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.ResponseSetOption(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.code = reader.uint32(); + break; + case 3: + message.log = reader.string(); + break; + case 4: + message.info = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResponseSetOption message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.ResponseSetOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.ResponseSetOption} ResponseSetOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseSetOption.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResponseSetOption message. + * @function verify + * @memberof tendermint.abci.ResponseSetOption + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResponseSetOption.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.code != null && message.hasOwnProperty("code")) + if (!$util.isInteger(message.code)) + return "code: integer expected"; + if (message.log != null && message.hasOwnProperty("log")) + if (!$util.isString(message.log)) + return "log: string expected"; + if (message.info != null && message.hasOwnProperty("info")) + if (!$util.isString(message.info)) + return "info: string expected"; + return null; + }; + + /** + * Creates a ResponseSetOption message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.ResponseSetOption + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.ResponseSetOption} ResponseSetOption + */ + ResponseSetOption.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.ResponseSetOption) + return object; + var message = new $root.tendermint.abci.ResponseSetOption(); + if (object.code != null) + message.code = object.code >>> 0; + if (object.log != null) + message.log = String(object.log); + if (object.info != null) + message.info = String(object.info); + return message; + }; + + /** + * Creates a plain object from a ResponseSetOption message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.ResponseSetOption + * @static + * @param {tendermint.abci.ResponseSetOption} message ResponseSetOption + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResponseSetOption.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.code = 0; + object.log = ""; + object.info = ""; + } + if (message.code != null && message.hasOwnProperty("code")) + object.code = message.code; + if (message.log != null && message.hasOwnProperty("log")) + object.log = message.log; + if (message.info != null && message.hasOwnProperty("info")) + object.info = message.info; + return object; + }; + + /** + * Converts this ResponseSetOption to JSON. + * @function toJSON + * @memberof tendermint.abci.ResponseSetOption + * @instance + * @returns {Object.} JSON object + */ + ResponseSetOption.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ResponseSetOption; + })(abci.ResponseSetOption || {}); + + abci.ResponseInitChain = (function(ResponseInitChain) { + + /** + * Properties of a ResponseInitChain. + * @memberof tendermint.abci + * @interface IResponseInitChain + * @property {tendermint.abci.IConsensusParams|null} [consensusParams] ResponseInitChain consensusParams + * @property {Array.|null} [validators] ResponseInitChain validators + * @property {Uint8Array|null} [appHash] ResponseInitChain appHash + */ + + /** + * Constructs a new ResponseInitChain. + * @memberof tendermint.abci + * @classdesc Represents a ResponseInitChain. + * @implements IResponseInitChain + * @constructor + * @param {tendermint.abci.IResponseInitChain=} [properties] Properties to set + */ + function ResponseInitChain(properties) { + this.validators = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResponseInitChain consensusParams. + * @member {tendermint.abci.IConsensusParams|null|undefined} consensusParams + * @memberof tendermint.abci.ResponseInitChain + * @instance + */ + ResponseInitChain.prototype.consensusParams = null; + + /** + * ResponseInitChain validators. + * @member {Array.} validators + * @memberof tendermint.abci.ResponseInitChain + * @instance + */ + ResponseInitChain.prototype.validators = $util.emptyArray; + + /** + * ResponseInitChain appHash. + * @member {Uint8Array} appHash + * @memberof tendermint.abci.ResponseInitChain + * @instance + */ + ResponseInitChain.prototype.appHash = $util.newBuffer([]); + + /** + * Creates a new ResponseInitChain instance using the specified properties. + * @function create + * @memberof tendermint.abci.ResponseInitChain + * @static + * @param {tendermint.abci.IResponseInitChain=} [properties] Properties to set + * @returns {tendermint.abci.ResponseInitChain} ResponseInitChain instance + */ + ResponseInitChain.create = function create(properties) { + return new ResponseInitChain(properties); + }; + + /** + * Encodes the specified ResponseInitChain message. Does not implicitly {@link tendermint.abci.ResponseInitChain.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.ResponseInitChain + * @static + * @param {tendermint.abci.IResponseInitChain} message ResponseInitChain message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseInitChain.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.consensusParams != null && Object.hasOwnProperty.call(message, "consensusParams")) + $root.tendermint.abci.ConsensusParams.encode(message.consensusParams, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.validators != null && message.validators.length) + for (var i = 0; i < message.validators.length; ++i) + $root.tendermint.abci.ValidatorUpdate.encode(message.validators[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.appHash != null && Object.hasOwnProperty.call(message, "appHash")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.appHash); + return writer; + }; + + /** + * Encodes the specified ResponseInitChain message, length delimited. Does not implicitly {@link tendermint.abci.ResponseInitChain.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.ResponseInitChain + * @static + * @param {tendermint.abci.IResponseInitChain} message ResponseInitChain message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseInitChain.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResponseInitChain message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.ResponseInitChain + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.ResponseInitChain} ResponseInitChain + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseInitChain.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.ResponseInitChain(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.consensusParams = $root.tendermint.abci.ConsensusParams.decode(reader, reader.uint32()); + break; + case 2: + if (!(message.validators && message.validators.length)) + message.validators = []; + message.validators.push($root.tendermint.abci.ValidatorUpdate.decode(reader, reader.uint32())); + break; + case 3: + message.appHash = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResponseInitChain message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.ResponseInitChain + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.ResponseInitChain} ResponseInitChain + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseInitChain.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResponseInitChain message. + * @function verify + * @memberof tendermint.abci.ResponseInitChain + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResponseInitChain.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.consensusParams != null && message.hasOwnProperty("consensusParams")) { + var error = $root.tendermint.abci.ConsensusParams.verify(message.consensusParams); + if (error) + return "consensusParams." + error; + } + if (message.validators != null && message.hasOwnProperty("validators")) { + if (!Array.isArray(message.validators)) + return "validators: array expected"; + for (var i = 0; i < message.validators.length; ++i) { + var error = $root.tendermint.abci.ValidatorUpdate.verify(message.validators[i]); + if (error) + return "validators." + error; + } + } + if (message.appHash != null && message.hasOwnProperty("appHash")) + if (!(message.appHash && typeof message.appHash.length === "number" || $util.isString(message.appHash))) + return "appHash: buffer expected"; + return null; + }; + + /** + * Creates a ResponseInitChain message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.ResponseInitChain + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.ResponseInitChain} ResponseInitChain + */ + ResponseInitChain.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.ResponseInitChain) + return object; + var message = new $root.tendermint.abci.ResponseInitChain(); + if (object.consensusParams != null) { + if (typeof object.consensusParams !== "object") + throw TypeError(".tendermint.abci.ResponseInitChain.consensusParams: object expected"); + message.consensusParams = $root.tendermint.abci.ConsensusParams.fromObject(object.consensusParams); + } + if (object.validators) { + if (!Array.isArray(object.validators)) + throw TypeError(".tendermint.abci.ResponseInitChain.validators: array expected"); + message.validators = []; + for (var i = 0; i < object.validators.length; ++i) { + if (typeof object.validators[i] !== "object") + throw TypeError(".tendermint.abci.ResponseInitChain.validators: object expected"); + message.validators[i] = $root.tendermint.abci.ValidatorUpdate.fromObject(object.validators[i]); + } + } + if (object.appHash != null) + if (typeof object.appHash === "string") + $util.base64.decode(object.appHash, message.appHash = $util.newBuffer($util.base64.length(object.appHash)), 0); + else if (object.appHash.length) + message.appHash = object.appHash; + return message; + }; + + /** + * Creates a plain object from a ResponseInitChain message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.ResponseInitChain + * @static + * @param {tendermint.abci.ResponseInitChain} message ResponseInitChain + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResponseInitChain.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.validators = []; + if (options.defaults) { + object.consensusParams = null; + if (options.bytes === String) + object.appHash = ""; + else { + object.appHash = []; + if (options.bytes !== Array) + object.appHash = $util.newBuffer(object.appHash); + } + } + if (message.consensusParams != null && message.hasOwnProperty("consensusParams")) + object.consensusParams = $root.tendermint.abci.ConsensusParams.toObject(message.consensusParams, options); + if (message.validators && message.validators.length) { + object.validators = []; + for (var j = 0; j < message.validators.length; ++j) + object.validators[j] = $root.tendermint.abci.ValidatorUpdate.toObject(message.validators[j], options); + } + if (message.appHash != null && message.hasOwnProperty("appHash")) + object.appHash = options.bytes === String ? $util.base64.encode(message.appHash, 0, message.appHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.appHash) : message.appHash; + return object; + }; + + /** + * Converts this ResponseInitChain to JSON. + * @function toJSON + * @memberof tendermint.abci.ResponseInitChain + * @instance + * @returns {Object.} JSON object + */ + ResponseInitChain.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ResponseInitChain; + })(abci.ResponseInitChain || {}); + + abci.ResponseQuery = (function(ResponseQuery) { + + /** + * Properties of a ResponseQuery. + * @memberof tendermint.abci + * @interface IResponseQuery + * @property {number|null} [code] ResponseQuery code + * @property {string|null} [log] ResponseQuery log + * @property {string|null} [info] ResponseQuery info + * @property {number|Long|null} [index] ResponseQuery index + * @property {Uint8Array|null} [key] ResponseQuery key + * @property {Uint8Array|null} [value] ResponseQuery value + * @property {tendermint.crypto.IProofOps|null} [proofOps] ResponseQuery proofOps + * @property {number|Long|null} [height] ResponseQuery height + * @property {string|null} [codespace] ResponseQuery codespace + */ + + /** + * Constructs a new ResponseQuery. + * @memberof tendermint.abci + * @classdesc Represents a ResponseQuery. + * @implements IResponseQuery + * @constructor + * @param {tendermint.abci.IResponseQuery=} [properties] Properties to set + */ + function ResponseQuery(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResponseQuery code. + * @member {number} code + * @memberof tendermint.abci.ResponseQuery + * @instance + */ + ResponseQuery.prototype.code = 0; + + /** + * ResponseQuery log. + * @member {string} log + * @memberof tendermint.abci.ResponseQuery + * @instance + */ + ResponseQuery.prototype.log = ""; + + /** + * ResponseQuery info. + * @member {string} info + * @memberof tendermint.abci.ResponseQuery + * @instance + */ + ResponseQuery.prototype.info = ""; + + /** + * ResponseQuery index. + * @member {number|Long} index + * @memberof tendermint.abci.ResponseQuery + * @instance + */ + ResponseQuery.prototype.index = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ResponseQuery key. + * @member {Uint8Array} key + * @memberof tendermint.abci.ResponseQuery + * @instance + */ + ResponseQuery.prototype.key = $util.newBuffer([]); + + /** + * ResponseQuery value. + * @member {Uint8Array} value + * @memberof tendermint.abci.ResponseQuery + * @instance + */ + ResponseQuery.prototype.value = $util.newBuffer([]); + + /** + * ResponseQuery proofOps. + * @member {tendermint.crypto.IProofOps|null|undefined} proofOps + * @memberof tendermint.abci.ResponseQuery + * @instance + */ + ResponseQuery.prototype.proofOps = null; + + /** + * ResponseQuery height. + * @member {number|Long} height + * @memberof tendermint.abci.ResponseQuery + * @instance + */ + ResponseQuery.prototype.height = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ResponseQuery codespace. + * @member {string} codespace + * @memberof tendermint.abci.ResponseQuery + * @instance + */ + ResponseQuery.prototype.codespace = ""; + + /** + * Creates a new ResponseQuery instance using the specified properties. + * @function create + * @memberof tendermint.abci.ResponseQuery + * @static + * @param {tendermint.abci.IResponseQuery=} [properties] Properties to set + * @returns {tendermint.abci.ResponseQuery} ResponseQuery instance + */ + ResponseQuery.create = function create(properties) { + return new ResponseQuery(properties); + }; + + /** + * Encodes the specified ResponseQuery message. Does not implicitly {@link tendermint.abci.ResponseQuery.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.ResponseQuery + * @static + * @param {tendermint.abci.IResponseQuery} message ResponseQuery message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseQuery.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.code != null && Object.hasOwnProperty.call(message, "code")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.code); + if (message.log != null && Object.hasOwnProperty.call(message, "log")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.log); + if (message.info != null && Object.hasOwnProperty.call(message, "info")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.info); + if (message.index != null && Object.hasOwnProperty.call(message, "index")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.index); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.key); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.value); + if (message.proofOps != null && Object.hasOwnProperty.call(message, "proofOps")) + $root.tendermint.crypto.ProofOps.encode(message.proofOps, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.height != null && Object.hasOwnProperty.call(message, "height")) + writer.uint32(/* id 9, wireType 0 =*/72).int64(message.height); + if (message.codespace != null && Object.hasOwnProperty.call(message, "codespace")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.codespace); + return writer; + }; + + /** + * Encodes the specified ResponseQuery message, length delimited. Does not implicitly {@link tendermint.abci.ResponseQuery.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.ResponseQuery + * @static + * @param {tendermint.abci.IResponseQuery} message ResponseQuery message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseQuery.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResponseQuery message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.ResponseQuery + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.ResponseQuery} ResponseQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseQuery.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.ResponseQuery(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.code = reader.uint32(); + break; + case 3: + message.log = reader.string(); + break; + case 4: + message.info = reader.string(); + break; + case 5: + message.index = reader.int64(); + break; + case 6: + message.key = reader.bytes(); + break; + case 7: + message.value = reader.bytes(); + break; + case 8: + message.proofOps = $root.tendermint.crypto.ProofOps.decode(reader, reader.uint32()); + break; + case 9: + message.height = reader.int64(); + break; + case 10: + message.codespace = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResponseQuery message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.ResponseQuery + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.ResponseQuery} ResponseQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseQuery.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResponseQuery message. + * @function verify + * @memberof tendermint.abci.ResponseQuery + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResponseQuery.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.code != null && message.hasOwnProperty("code")) + if (!$util.isInteger(message.code)) + return "code: integer expected"; + if (message.log != null && message.hasOwnProperty("log")) + if (!$util.isString(message.log)) + return "log: string expected"; + if (message.info != null && message.hasOwnProperty("info")) + if (!$util.isString(message.info)) + return "info: string expected"; + if (message.index != null && message.hasOwnProperty("index")) + if (!$util.isInteger(message.index) && !(message.index && $util.isInteger(message.index.low) && $util.isInteger(message.index.high))) + return "index: integer|Long expected"; + if (message.key != null && message.hasOwnProperty("key")) + if (!(message.key && typeof message.key.length === "number" || $util.isString(message.key))) + return "key: buffer expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; + if (message.proofOps != null && message.hasOwnProperty("proofOps")) { + var error = $root.tendermint.crypto.ProofOps.verify(message.proofOps); + if (error) + return "proofOps." + error; + } + if (message.height != null && message.hasOwnProperty("height")) + if (!$util.isInteger(message.height) && !(message.height && $util.isInteger(message.height.low) && $util.isInteger(message.height.high))) + return "height: integer|Long expected"; + if (message.codespace != null && message.hasOwnProperty("codespace")) + if (!$util.isString(message.codespace)) + return "codespace: string expected"; + return null; + }; + + /** + * Creates a ResponseQuery message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.ResponseQuery + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.ResponseQuery} ResponseQuery + */ + ResponseQuery.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.ResponseQuery) + return object; + var message = new $root.tendermint.abci.ResponseQuery(); + if (object.code != null) + message.code = object.code >>> 0; + if (object.log != null) + message.log = String(object.log); + if (object.info != null) + message.info = String(object.info); + if (object.index != null) + if ($util.Long) + (message.index = $util.Long.fromValue(object.index)).unsigned = false; + else if (typeof object.index === "string") + message.index = parseInt(object.index, 10); + else if (typeof object.index === "number") + message.index = object.index; + else if (typeof object.index === "object") + message.index = new $util.LongBits(object.index.low >>> 0, object.index.high >>> 0).toNumber(); + if (object.key != null) + if (typeof object.key === "string") + $util.base64.decode(object.key, message.key = $util.newBuffer($util.base64.length(object.key)), 0); + else if (object.key.length) + message.key = object.key; + if (object.value != null) + if (typeof object.value === "string") + $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); + else if (object.value.length) + message.value = object.value; + if (object.proofOps != null) { + if (typeof object.proofOps !== "object") + throw TypeError(".tendermint.abci.ResponseQuery.proofOps: object expected"); + message.proofOps = $root.tendermint.crypto.ProofOps.fromObject(object.proofOps); + } + if (object.height != null) + if ($util.Long) + (message.height = $util.Long.fromValue(object.height)).unsigned = false; + else if (typeof object.height === "string") + message.height = parseInt(object.height, 10); + else if (typeof object.height === "number") + message.height = object.height; + else if (typeof object.height === "object") + message.height = new $util.LongBits(object.height.low >>> 0, object.height.high >>> 0).toNumber(); + if (object.codespace != null) + message.codespace = String(object.codespace); + return message; + }; + + /** + * Creates a plain object from a ResponseQuery message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.ResponseQuery + * @static + * @param {tendermint.abci.ResponseQuery} message ResponseQuery + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResponseQuery.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.code = 0; + object.log = ""; + object.info = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.index = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.index = options.longs === String ? "0" : 0; + if (options.bytes === String) + object.key = ""; + else { + object.key = []; + if (options.bytes !== Array) + object.key = $util.newBuffer(object.key); + } + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + object.proofOps = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.height = options.longs === String ? "0" : 0; + object.codespace = ""; + } + if (message.code != null && message.hasOwnProperty("code")) + object.code = message.code; + if (message.log != null && message.hasOwnProperty("log")) + object.log = message.log; + if (message.info != null && message.hasOwnProperty("info")) + object.info = message.info; + if (message.index != null && message.hasOwnProperty("index")) + if (typeof message.index === "number") + object.index = options.longs === String ? String(message.index) : message.index; + else + object.index = options.longs === String ? $util.Long.prototype.toString.call(message.index) : options.longs === Number ? new $util.LongBits(message.index.low >>> 0, message.index.high >>> 0).toNumber() : message.index; + if (message.key != null && message.hasOwnProperty("key")) + object.key = options.bytes === String ? $util.base64.encode(message.key, 0, message.key.length) : options.bytes === Array ? Array.prototype.slice.call(message.key) : message.key; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + if (message.proofOps != null && message.hasOwnProperty("proofOps")) + object.proofOps = $root.tendermint.crypto.ProofOps.toObject(message.proofOps, options); + if (message.height != null && message.hasOwnProperty("height")) + if (typeof message.height === "number") + object.height = options.longs === String ? String(message.height) : message.height; + else + object.height = options.longs === String ? $util.Long.prototype.toString.call(message.height) : options.longs === Number ? new $util.LongBits(message.height.low >>> 0, message.height.high >>> 0).toNumber() : message.height; + if (message.codespace != null && message.hasOwnProperty("codespace")) + object.codespace = message.codespace; + return object; + }; + + /** + * Converts this ResponseQuery to JSON. + * @function toJSON + * @memberof tendermint.abci.ResponseQuery + * @instance + * @returns {Object.} JSON object + */ + ResponseQuery.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ResponseQuery; + })(abci.ResponseQuery || {}); + + abci.ResponseBeginBlock = (function(ResponseBeginBlock) { + + /** + * Properties of a ResponseBeginBlock. + * @memberof tendermint.abci + * @interface IResponseBeginBlock + * @property {Array.|null} [events] ResponseBeginBlock events + */ + + /** + * Constructs a new ResponseBeginBlock. + * @memberof tendermint.abci + * @classdesc Represents a ResponseBeginBlock. + * @implements IResponseBeginBlock + * @constructor + * @param {tendermint.abci.IResponseBeginBlock=} [properties] Properties to set + */ + function ResponseBeginBlock(properties) { + this.events = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResponseBeginBlock events. + * @member {Array.} events + * @memberof tendermint.abci.ResponseBeginBlock + * @instance + */ + ResponseBeginBlock.prototype.events = $util.emptyArray; + + /** + * Creates a new ResponseBeginBlock instance using the specified properties. + * @function create + * @memberof tendermint.abci.ResponseBeginBlock + * @static + * @param {tendermint.abci.IResponseBeginBlock=} [properties] Properties to set + * @returns {tendermint.abci.ResponseBeginBlock} ResponseBeginBlock instance + */ + ResponseBeginBlock.create = function create(properties) { + return new ResponseBeginBlock(properties); + }; + + /** + * Encodes the specified ResponseBeginBlock message. Does not implicitly {@link tendermint.abci.ResponseBeginBlock.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.ResponseBeginBlock + * @static + * @param {tendermint.abci.IResponseBeginBlock} message ResponseBeginBlock message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseBeginBlock.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.events != null && message.events.length) + for (var i = 0; i < message.events.length; ++i) + $root.tendermint.abci.Event.encode(message.events[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ResponseBeginBlock message, length delimited. Does not implicitly {@link tendermint.abci.ResponseBeginBlock.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.ResponseBeginBlock + * @static + * @param {tendermint.abci.IResponseBeginBlock} message ResponseBeginBlock message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseBeginBlock.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResponseBeginBlock message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.ResponseBeginBlock + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.ResponseBeginBlock} ResponseBeginBlock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseBeginBlock.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.ResponseBeginBlock(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.events && message.events.length)) + message.events = []; + message.events.push($root.tendermint.abci.Event.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResponseBeginBlock message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.ResponseBeginBlock + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.ResponseBeginBlock} ResponseBeginBlock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseBeginBlock.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResponseBeginBlock message. + * @function verify + * @memberof tendermint.abci.ResponseBeginBlock + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResponseBeginBlock.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.events != null && message.hasOwnProperty("events")) { + if (!Array.isArray(message.events)) + return "events: array expected"; + for (var i = 0; i < message.events.length; ++i) { + var error = $root.tendermint.abci.Event.verify(message.events[i]); + if (error) + return "events." + error; + } + } + return null; + }; + + /** + * Creates a ResponseBeginBlock message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.ResponseBeginBlock + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.ResponseBeginBlock} ResponseBeginBlock + */ + ResponseBeginBlock.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.ResponseBeginBlock) + return object; + var message = new $root.tendermint.abci.ResponseBeginBlock(); + if (object.events) { + if (!Array.isArray(object.events)) + throw TypeError(".tendermint.abci.ResponseBeginBlock.events: array expected"); + message.events = []; + for (var i = 0; i < object.events.length; ++i) { + if (typeof object.events[i] !== "object") + throw TypeError(".tendermint.abci.ResponseBeginBlock.events: object expected"); + message.events[i] = $root.tendermint.abci.Event.fromObject(object.events[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ResponseBeginBlock message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.ResponseBeginBlock + * @static + * @param {tendermint.abci.ResponseBeginBlock} message ResponseBeginBlock + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResponseBeginBlock.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.events = []; + if (message.events && message.events.length) { + object.events = []; + for (var j = 0; j < message.events.length; ++j) + object.events[j] = $root.tendermint.abci.Event.toObject(message.events[j], options); + } + return object; + }; + + /** + * Converts this ResponseBeginBlock to JSON. + * @function toJSON + * @memberof tendermint.abci.ResponseBeginBlock + * @instance + * @returns {Object.} JSON object + */ + ResponseBeginBlock.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ResponseBeginBlock; + })(abci.ResponseBeginBlock || {}); + + abci.ResponseCheckTx = (function(ResponseCheckTx) { + + /** + * Properties of a ResponseCheckTx. + * @memberof tendermint.abci + * @interface IResponseCheckTx + * @property {number|null} [code] ResponseCheckTx code + * @property {Uint8Array|null} [data] ResponseCheckTx data + * @property {string|null} [log] ResponseCheckTx log + * @property {string|null} [info] ResponseCheckTx info + * @property {number|Long|null} [gasWanted] ResponseCheckTx gasWanted + * @property {number|Long|null} [gasUsed] ResponseCheckTx gasUsed + * @property {Array.|null} [events] ResponseCheckTx events + * @property {string|null} [codespace] ResponseCheckTx codespace + */ + + /** + * Constructs a new ResponseCheckTx. + * @memberof tendermint.abci + * @classdesc Represents a ResponseCheckTx. + * @implements IResponseCheckTx + * @constructor + * @param {tendermint.abci.IResponseCheckTx=} [properties] Properties to set + */ + function ResponseCheckTx(properties) { + this.events = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResponseCheckTx code. + * @member {number} code + * @memberof tendermint.abci.ResponseCheckTx + * @instance + */ + ResponseCheckTx.prototype.code = 0; + + /** + * ResponseCheckTx data. + * @member {Uint8Array} data + * @memberof tendermint.abci.ResponseCheckTx + * @instance + */ + ResponseCheckTx.prototype.data = $util.newBuffer([]); + + /** + * ResponseCheckTx log. + * @member {string} log + * @memberof tendermint.abci.ResponseCheckTx + * @instance + */ + ResponseCheckTx.prototype.log = ""; + + /** + * ResponseCheckTx info. + * @member {string} info + * @memberof tendermint.abci.ResponseCheckTx + * @instance + */ + ResponseCheckTx.prototype.info = ""; + + /** + * ResponseCheckTx gasWanted. + * @member {number|Long} gasWanted + * @memberof tendermint.abci.ResponseCheckTx + * @instance + */ + ResponseCheckTx.prototype.gasWanted = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ResponseCheckTx gasUsed. + * @member {number|Long} gasUsed + * @memberof tendermint.abci.ResponseCheckTx + * @instance + */ + ResponseCheckTx.prototype.gasUsed = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ResponseCheckTx events. + * @member {Array.} events + * @memberof tendermint.abci.ResponseCheckTx + * @instance + */ + ResponseCheckTx.prototype.events = $util.emptyArray; + + /** + * ResponseCheckTx codespace. + * @member {string} codespace + * @memberof tendermint.abci.ResponseCheckTx + * @instance + */ + ResponseCheckTx.prototype.codespace = ""; + + /** + * Creates a new ResponseCheckTx instance using the specified properties. + * @function create + * @memberof tendermint.abci.ResponseCheckTx + * @static + * @param {tendermint.abci.IResponseCheckTx=} [properties] Properties to set + * @returns {tendermint.abci.ResponseCheckTx} ResponseCheckTx instance + */ + ResponseCheckTx.create = function create(properties) { + return new ResponseCheckTx(properties); + }; + + /** + * Encodes the specified ResponseCheckTx message. Does not implicitly {@link tendermint.abci.ResponseCheckTx.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.ResponseCheckTx + * @static + * @param {tendermint.abci.IResponseCheckTx} message ResponseCheckTx message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseCheckTx.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.code != null && Object.hasOwnProperty.call(message, "code")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.code); + if (message.data != null && Object.hasOwnProperty.call(message, "data")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.data); + if (message.log != null && Object.hasOwnProperty.call(message, "log")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.log); + if (message.info != null && Object.hasOwnProperty.call(message, "info")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.info); + if (message.gasWanted != null && Object.hasOwnProperty.call(message, "gasWanted")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.gasWanted); + if (message.gasUsed != null && Object.hasOwnProperty.call(message, "gasUsed")) + writer.uint32(/* id 6, wireType 0 =*/48).int64(message.gasUsed); + if (message.events != null && message.events.length) + for (var i = 0; i < message.events.length; ++i) + $root.tendermint.abci.Event.encode(message.events[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.codespace != null && Object.hasOwnProperty.call(message, "codespace")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.codespace); + return writer; + }; + + /** + * Encodes the specified ResponseCheckTx message, length delimited. Does not implicitly {@link tendermint.abci.ResponseCheckTx.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.ResponseCheckTx + * @static + * @param {tendermint.abci.IResponseCheckTx} message ResponseCheckTx message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseCheckTx.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResponseCheckTx message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.ResponseCheckTx + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.ResponseCheckTx} ResponseCheckTx + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseCheckTx.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.ResponseCheckTx(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.code = reader.uint32(); + break; + case 2: + message.data = reader.bytes(); + break; + case 3: + message.log = reader.string(); + break; + case 4: + message.info = reader.string(); + break; + case 5: + message.gasWanted = reader.int64(); + break; + case 6: + message.gasUsed = reader.int64(); + break; + case 7: + if (!(message.events && message.events.length)) + message.events = []; + message.events.push($root.tendermint.abci.Event.decode(reader, reader.uint32())); + break; + case 8: + message.codespace = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResponseCheckTx message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.ResponseCheckTx + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.ResponseCheckTx} ResponseCheckTx + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseCheckTx.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResponseCheckTx message. + * @function verify + * @memberof tendermint.abci.ResponseCheckTx + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResponseCheckTx.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.code != null && message.hasOwnProperty("code")) + if (!$util.isInteger(message.code)) + return "code: integer expected"; + if (message.data != null && message.hasOwnProperty("data")) + if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) + return "data: buffer expected"; + if (message.log != null && message.hasOwnProperty("log")) + if (!$util.isString(message.log)) + return "log: string expected"; + if (message.info != null && message.hasOwnProperty("info")) + if (!$util.isString(message.info)) + return "info: string expected"; + if (message.gasWanted != null && message.hasOwnProperty("gasWanted")) + if (!$util.isInteger(message.gasWanted) && !(message.gasWanted && $util.isInteger(message.gasWanted.low) && $util.isInteger(message.gasWanted.high))) + return "gasWanted: integer|Long expected"; + if (message.gasUsed != null && message.hasOwnProperty("gasUsed")) + if (!$util.isInteger(message.gasUsed) && !(message.gasUsed && $util.isInteger(message.gasUsed.low) && $util.isInteger(message.gasUsed.high))) + return "gasUsed: integer|Long expected"; + if (message.events != null && message.hasOwnProperty("events")) { + if (!Array.isArray(message.events)) + return "events: array expected"; + for (var i = 0; i < message.events.length; ++i) { + var error = $root.tendermint.abci.Event.verify(message.events[i]); + if (error) + return "events." + error; + } + } + if (message.codespace != null && message.hasOwnProperty("codespace")) + if (!$util.isString(message.codespace)) + return "codespace: string expected"; + return null; + }; + + /** + * Creates a ResponseCheckTx message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.ResponseCheckTx + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.ResponseCheckTx} ResponseCheckTx + */ + ResponseCheckTx.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.ResponseCheckTx) + return object; + var message = new $root.tendermint.abci.ResponseCheckTx(); + if (object.code != null) + message.code = object.code >>> 0; + if (object.data != null) + if (typeof object.data === "string") + $util.base64.decode(object.data, message.data = $util.newBuffer($util.base64.length(object.data)), 0); + else if (object.data.length) + message.data = object.data; + if (object.log != null) + message.log = String(object.log); + if (object.info != null) + message.info = String(object.info); + if (object.gasWanted != null) + if ($util.Long) + (message.gasWanted = $util.Long.fromValue(object.gasWanted)).unsigned = false; + else if (typeof object.gasWanted === "string") + message.gasWanted = parseInt(object.gasWanted, 10); + else if (typeof object.gasWanted === "number") + message.gasWanted = object.gasWanted; + else if (typeof object.gasWanted === "object") + message.gasWanted = new $util.LongBits(object.gasWanted.low >>> 0, object.gasWanted.high >>> 0).toNumber(); + if (object.gasUsed != null) + if ($util.Long) + (message.gasUsed = $util.Long.fromValue(object.gasUsed)).unsigned = false; + else if (typeof object.gasUsed === "string") + message.gasUsed = parseInt(object.gasUsed, 10); + else if (typeof object.gasUsed === "number") + message.gasUsed = object.gasUsed; + else if (typeof object.gasUsed === "object") + message.gasUsed = new $util.LongBits(object.gasUsed.low >>> 0, object.gasUsed.high >>> 0).toNumber(); + if (object.events) { + if (!Array.isArray(object.events)) + throw TypeError(".tendermint.abci.ResponseCheckTx.events: array expected"); + message.events = []; + for (var i = 0; i < object.events.length; ++i) { + if (typeof object.events[i] !== "object") + throw TypeError(".tendermint.abci.ResponseCheckTx.events: object expected"); + message.events[i] = $root.tendermint.abci.Event.fromObject(object.events[i]); + } + } + if (object.codespace != null) + message.codespace = String(object.codespace); + return message; + }; + + /** + * Creates a plain object from a ResponseCheckTx message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.ResponseCheckTx + * @static + * @param {tendermint.abci.ResponseCheckTx} message ResponseCheckTx + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResponseCheckTx.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.events = []; + if (options.defaults) { + object.code = 0; + if (options.bytes === String) + object.data = ""; + else { + object.data = []; + if (options.bytes !== Array) + object.data = $util.newBuffer(object.data); + } + object.log = ""; + object.info = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.gasWanted = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.gasWanted = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.gasUsed = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.gasUsed = options.longs === String ? "0" : 0; + object.codespace = ""; + } + if (message.code != null && message.hasOwnProperty("code")) + object.code = message.code; + if (message.data != null && message.hasOwnProperty("data")) + object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; + if (message.log != null && message.hasOwnProperty("log")) + object.log = message.log; + if (message.info != null && message.hasOwnProperty("info")) + object.info = message.info; + if (message.gasWanted != null && message.hasOwnProperty("gasWanted")) + if (typeof message.gasWanted === "number") + object.gasWanted = options.longs === String ? String(message.gasWanted) : message.gasWanted; + else + object.gasWanted = options.longs === String ? $util.Long.prototype.toString.call(message.gasWanted) : options.longs === Number ? new $util.LongBits(message.gasWanted.low >>> 0, message.gasWanted.high >>> 0).toNumber() : message.gasWanted; + if (message.gasUsed != null && message.hasOwnProperty("gasUsed")) + if (typeof message.gasUsed === "number") + object.gasUsed = options.longs === String ? String(message.gasUsed) : message.gasUsed; + else + object.gasUsed = options.longs === String ? $util.Long.prototype.toString.call(message.gasUsed) : options.longs === Number ? new $util.LongBits(message.gasUsed.low >>> 0, message.gasUsed.high >>> 0).toNumber() : message.gasUsed; + if (message.events && message.events.length) { + object.events = []; + for (var j = 0; j < message.events.length; ++j) + object.events[j] = $root.tendermint.abci.Event.toObject(message.events[j], options); + } + if (message.codespace != null && message.hasOwnProperty("codespace")) + object.codespace = message.codespace; + return object; + }; + + /** + * Converts this ResponseCheckTx to JSON. + * @function toJSON + * @memberof tendermint.abci.ResponseCheckTx + * @instance + * @returns {Object.} JSON object + */ + ResponseCheckTx.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ResponseCheckTx; + })(abci.ResponseCheckTx || {}); + + abci.ResponseDeliverTx = (function(ResponseDeliverTx) { + + /** + * Properties of a ResponseDeliverTx. + * @memberof tendermint.abci + * @interface IResponseDeliverTx + * @property {number|null} [code] ResponseDeliverTx code + * @property {Uint8Array|null} [data] ResponseDeliverTx data + * @property {string|null} [log] ResponseDeliverTx log + * @property {string|null} [info] ResponseDeliverTx info + * @property {number|Long|null} [gasWanted] ResponseDeliverTx gasWanted + * @property {number|Long|null} [gasUsed] ResponseDeliverTx gasUsed + * @property {Array.|null} [events] ResponseDeliverTx events + * @property {string|null} [codespace] ResponseDeliverTx codespace + */ + + /** + * Constructs a new ResponseDeliverTx. + * @memberof tendermint.abci + * @classdesc Represents a ResponseDeliverTx. + * @implements IResponseDeliverTx + * @constructor + * @param {tendermint.abci.IResponseDeliverTx=} [properties] Properties to set + */ + function ResponseDeliverTx(properties) { + this.events = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResponseDeliverTx code. + * @member {number} code + * @memberof tendermint.abci.ResponseDeliverTx + * @instance + */ + ResponseDeliverTx.prototype.code = 0; + + /** + * ResponseDeliverTx data. + * @member {Uint8Array} data + * @memberof tendermint.abci.ResponseDeliverTx + * @instance + */ + ResponseDeliverTx.prototype.data = $util.newBuffer([]); + + /** + * ResponseDeliverTx log. + * @member {string} log + * @memberof tendermint.abci.ResponseDeliverTx + * @instance + */ + ResponseDeliverTx.prototype.log = ""; + + /** + * ResponseDeliverTx info. + * @member {string} info + * @memberof tendermint.abci.ResponseDeliverTx + * @instance + */ + ResponseDeliverTx.prototype.info = ""; + + /** + * ResponseDeliverTx gasWanted. + * @member {number|Long} gasWanted + * @memberof tendermint.abci.ResponseDeliverTx + * @instance + */ + ResponseDeliverTx.prototype.gasWanted = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ResponseDeliverTx gasUsed. + * @member {number|Long} gasUsed + * @memberof tendermint.abci.ResponseDeliverTx + * @instance + */ + ResponseDeliverTx.prototype.gasUsed = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ResponseDeliverTx events. + * @member {Array.} events + * @memberof tendermint.abci.ResponseDeliverTx + * @instance + */ + ResponseDeliverTx.prototype.events = $util.emptyArray; + + /** + * ResponseDeliverTx codespace. + * @member {string} codespace + * @memberof tendermint.abci.ResponseDeliverTx + * @instance + */ + ResponseDeliverTx.prototype.codespace = ""; + + /** + * Creates a new ResponseDeliverTx instance using the specified properties. + * @function create + * @memberof tendermint.abci.ResponseDeliverTx + * @static + * @param {tendermint.abci.IResponseDeliverTx=} [properties] Properties to set + * @returns {tendermint.abci.ResponseDeliverTx} ResponseDeliverTx instance + */ + ResponseDeliverTx.create = function create(properties) { + return new ResponseDeliverTx(properties); + }; + + /** + * Encodes the specified ResponseDeliverTx message. Does not implicitly {@link tendermint.abci.ResponseDeliverTx.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.ResponseDeliverTx + * @static + * @param {tendermint.abci.IResponseDeliverTx} message ResponseDeliverTx message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseDeliverTx.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.code != null && Object.hasOwnProperty.call(message, "code")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.code); + if (message.data != null && Object.hasOwnProperty.call(message, "data")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.data); + if (message.log != null && Object.hasOwnProperty.call(message, "log")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.log); + if (message.info != null && Object.hasOwnProperty.call(message, "info")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.info); + if (message.gasWanted != null && Object.hasOwnProperty.call(message, "gasWanted")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.gasWanted); + if (message.gasUsed != null && Object.hasOwnProperty.call(message, "gasUsed")) + writer.uint32(/* id 6, wireType 0 =*/48).int64(message.gasUsed); + if (message.events != null && message.events.length) + for (var i = 0; i < message.events.length; ++i) + $root.tendermint.abci.Event.encode(message.events[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.codespace != null && Object.hasOwnProperty.call(message, "codespace")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.codespace); + return writer; + }; + + /** + * Encodes the specified ResponseDeliverTx message, length delimited. Does not implicitly {@link tendermint.abci.ResponseDeliverTx.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.ResponseDeliverTx + * @static + * @param {tendermint.abci.IResponseDeliverTx} message ResponseDeliverTx message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseDeliverTx.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResponseDeliverTx message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.ResponseDeliverTx + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.ResponseDeliverTx} ResponseDeliverTx + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseDeliverTx.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.ResponseDeliverTx(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.code = reader.uint32(); + break; + case 2: + message.data = reader.bytes(); + break; + case 3: + message.log = reader.string(); + break; + case 4: + message.info = reader.string(); + break; + case 5: + message.gasWanted = reader.int64(); + break; + case 6: + message.gasUsed = reader.int64(); + break; + case 7: + if (!(message.events && message.events.length)) + message.events = []; + message.events.push($root.tendermint.abci.Event.decode(reader, reader.uint32())); + break; + case 8: + message.codespace = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResponseDeliverTx message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.ResponseDeliverTx + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.ResponseDeliverTx} ResponseDeliverTx + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseDeliverTx.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResponseDeliverTx message. + * @function verify + * @memberof tendermint.abci.ResponseDeliverTx + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResponseDeliverTx.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.code != null && message.hasOwnProperty("code")) + if (!$util.isInteger(message.code)) + return "code: integer expected"; + if (message.data != null && message.hasOwnProperty("data")) + if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) + return "data: buffer expected"; + if (message.log != null && message.hasOwnProperty("log")) + if (!$util.isString(message.log)) + return "log: string expected"; + if (message.info != null && message.hasOwnProperty("info")) + if (!$util.isString(message.info)) + return "info: string expected"; + if (message.gasWanted != null && message.hasOwnProperty("gasWanted")) + if (!$util.isInteger(message.gasWanted) && !(message.gasWanted && $util.isInteger(message.gasWanted.low) && $util.isInteger(message.gasWanted.high))) + return "gasWanted: integer|Long expected"; + if (message.gasUsed != null && message.hasOwnProperty("gasUsed")) + if (!$util.isInteger(message.gasUsed) && !(message.gasUsed && $util.isInteger(message.gasUsed.low) && $util.isInteger(message.gasUsed.high))) + return "gasUsed: integer|Long expected"; + if (message.events != null && message.hasOwnProperty("events")) { + if (!Array.isArray(message.events)) + return "events: array expected"; + for (var i = 0; i < message.events.length; ++i) { + var error = $root.tendermint.abci.Event.verify(message.events[i]); + if (error) + return "events." + error; + } + } + if (message.codespace != null && message.hasOwnProperty("codespace")) + if (!$util.isString(message.codespace)) + return "codespace: string expected"; + return null; + }; + + /** + * Creates a ResponseDeliverTx message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.ResponseDeliverTx + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.ResponseDeliverTx} ResponseDeliverTx + */ + ResponseDeliverTx.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.ResponseDeliverTx) + return object; + var message = new $root.tendermint.abci.ResponseDeliverTx(); + if (object.code != null) + message.code = object.code >>> 0; + if (object.data != null) + if (typeof object.data === "string") + $util.base64.decode(object.data, message.data = $util.newBuffer($util.base64.length(object.data)), 0); + else if (object.data.length) + message.data = object.data; + if (object.log != null) + message.log = String(object.log); + if (object.info != null) + message.info = String(object.info); + if (object.gasWanted != null) + if ($util.Long) + (message.gasWanted = $util.Long.fromValue(object.gasWanted)).unsigned = false; + else if (typeof object.gasWanted === "string") + message.gasWanted = parseInt(object.gasWanted, 10); + else if (typeof object.gasWanted === "number") + message.gasWanted = object.gasWanted; + else if (typeof object.gasWanted === "object") + message.gasWanted = new $util.LongBits(object.gasWanted.low >>> 0, object.gasWanted.high >>> 0).toNumber(); + if (object.gasUsed != null) + if ($util.Long) + (message.gasUsed = $util.Long.fromValue(object.gasUsed)).unsigned = false; + else if (typeof object.gasUsed === "string") + message.gasUsed = parseInt(object.gasUsed, 10); + else if (typeof object.gasUsed === "number") + message.gasUsed = object.gasUsed; + else if (typeof object.gasUsed === "object") + message.gasUsed = new $util.LongBits(object.gasUsed.low >>> 0, object.gasUsed.high >>> 0).toNumber(); + if (object.events) { + if (!Array.isArray(object.events)) + throw TypeError(".tendermint.abci.ResponseDeliverTx.events: array expected"); + message.events = []; + for (var i = 0; i < object.events.length; ++i) { + if (typeof object.events[i] !== "object") + throw TypeError(".tendermint.abci.ResponseDeliverTx.events: object expected"); + message.events[i] = $root.tendermint.abci.Event.fromObject(object.events[i]); + } + } + if (object.codespace != null) + message.codespace = String(object.codespace); + return message; + }; + + /** + * Creates a plain object from a ResponseDeliverTx message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.ResponseDeliverTx + * @static + * @param {tendermint.abci.ResponseDeliverTx} message ResponseDeliverTx + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResponseDeliverTx.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.events = []; + if (options.defaults) { + object.code = 0; + if (options.bytes === String) + object.data = ""; + else { + object.data = []; + if (options.bytes !== Array) + object.data = $util.newBuffer(object.data); + } + object.log = ""; + object.info = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.gasWanted = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.gasWanted = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.gasUsed = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.gasUsed = options.longs === String ? "0" : 0; + object.codespace = ""; + } + if (message.code != null && message.hasOwnProperty("code")) + object.code = message.code; + if (message.data != null && message.hasOwnProperty("data")) + object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; + if (message.log != null && message.hasOwnProperty("log")) + object.log = message.log; + if (message.info != null && message.hasOwnProperty("info")) + object.info = message.info; + if (message.gasWanted != null && message.hasOwnProperty("gasWanted")) + if (typeof message.gasWanted === "number") + object.gasWanted = options.longs === String ? String(message.gasWanted) : message.gasWanted; + else + object.gasWanted = options.longs === String ? $util.Long.prototype.toString.call(message.gasWanted) : options.longs === Number ? new $util.LongBits(message.gasWanted.low >>> 0, message.gasWanted.high >>> 0).toNumber() : message.gasWanted; + if (message.gasUsed != null && message.hasOwnProperty("gasUsed")) + if (typeof message.gasUsed === "number") + object.gasUsed = options.longs === String ? String(message.gasUsed) : message.gasUsed; + else + object.gasUsed = options.longs === String ? $util.Long.prototype.toString.call(message.gasUsed) : options.longs === Number ? new $util.LongBits(message.gasUsed.low >>> 0, message.gasUsed.high >>> 0).toNumber() : message.gasUsed; + if (message.events && message.events.length) { + object.events = []; + for (var j = 0; j < message.events.length; ++j) + object.events[j] = $root.tendermint.abci.Event.toObject(message.events[j], options); + } + if (message.codespace != null && message.hasOwnProperty("codespace")) + object.codespace = message.codespace; + return object; + }; + + /** + * Converts this ResponseDeliverTx to JSON. + * @function toJSON + * @memberof tendermint.abci.ResponseDeliverTx + * @instance + * @returns {Object.} JSON object + */ + ResponseDeliverTx.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ResponseDeliverTx; + })(abci.ResponseDeliverTx || {}); + + abci.ResponseEndBlock = (function(ResponseEndBlock) { + + /** + * Properties of a ResponseEndBlock. + * @memberof tendermint.abci + * @interface IResponseEndBlock + * @property {Array.|null} [validatorUpdates] ResponseEndBlock validatorUpdates + * @property {tendermint.abci.IConsensusParams|null} [consensusParamUpdates] ResponseEndBlock consensusParamUpdates + * @property {Array.|null} [events] ResponseEndBlock events + */ + + /** + * Constructs a new ResponseEndBlock. + * @memberof tendermint.abci + * @classdesc Represents a ResponseEndBlock. + * @implements IResponseEndBlock + * @constructor + * @param {tendermint.abci.IResponseEndBlock=} [properties] Properties to set + */ + function ResponseEndBlock(properties) { + this.validatorUpdates = []; + this.events = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResponseEndBlock validatorUpdates. + * @member {Array.} validatorUpdates + * @memberof tendermint.abci.ResponseEndBlock + * @instance + */ + ResponseEndBlock.prototype.validatorUpdates = $util.emptyArray; + + /** + * ResponseEndBlock consensusParamUpdates. + * @member {tendermint.abci.IConsensusParams|null|undefined} consensusParamUpdates + * @memberof tendermint.abci.ResponseEndBlock + * @instance + */ + ResponseEndBlock.prototype.consensusParamUpdates = null; + + /** + * ResponseEndBlock events. + * @member {Array.} events + * @memberof tendermint.abci.ResponseEndBlock + * @instance + */ + ResponseEndBlock.prototype.events = $util.emptyArray; + + /** + * Creates a new ResponseEndBlock instance using the specified properties. + * @function create + * @memberof tendermint.abci.ResponseEndBlock + * @static + * @param {tendermint.abci.IResponseEndBlock=} [properties] Properties to set + * @returns {tendermint.abci.ResponseEndBlock} ResponseEndBlock instance + */ + ResponseEndBlock.create = function create(properties) { + return new ResponseEndBlock(properties); + }; + + /** + * Encodes the specified ResponseEndBlock message. Does not implicitly {@link tendermint.abci.ResponseEndBlock.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.ResponseEndBlock + * @static + * @param {tendermint.abci.IResponseEndBlock} message ResponseEndBlock message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseEndBlock.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.validatorUpdates != null && message.validatorUpdates.length) + for (var i = 0; i < message.validatorUpdates.length; ++i) + $root.tendermint.abci.ValidatorUpdate.encode(message.validatorUpdates[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.consensusParamUpdates != null && Object.hasOwnProperty.call(message, "consensusParamUpdates")) + $root.tendermint.abci.ConsensusParams.encode(message.consensusParamUpdates, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.events != null && message.events.length) + for (var i = 0; i < message.events.length; ++i) + $root.tendermint.abci.Event.encode(message.events[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ResponseEndBlock message, length delimited. Does not implicitly {@link tendermint.abci.ResponseEndBlock.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.ResponseEndBlock + * @static + * @param {tendermint.abci.IResponseEndBlock} message ResponseEndBlock message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseEndBlock.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResponseEndBlock message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.ResponseEndBlock + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.ResponseEndBlock} ResponseEndBlock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseEndBlock.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.ResponseEndBlock(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.validatorUpdates && message.validatorUpdates.length)) + message.validatorUpdates = []; + message.validatorUpdates.push($root.tendermint.abci.ValidatorUpdate.decode(reader, reader.uint32())); + break; + case 2: + message.consensusParamUpdates = $root.tendermint.abci.ConsensusParams.decode(reader, reader.uint32()); + break; + case 3: + if (!(message.events && message.events.length)) + message.events = []; + message.events.push($root.tendermint.abci.Event.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResponseEndBlock message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.ResponseEndBlock + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.ResponseEndBlock} ResponseEndBlock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseEndBlock.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResponseEndBlock message. + * @function verify + * @memberof tendermint.abci.ResponseEndBlock + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResponseEndBlock.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.validatorUpdates != null && message.hasOwnProperty("validatorUpdates")) { + if (!Array.isArray(message.validatorUpdates)) + return "validatorUpdates: array expected"; + for (var i = 0; i < message.validatorUpdates.length; ++i) { + var error = $root.tendermint.abci.ValidatorUpdate.verify(message.validatorUpdates[i]); + if (error) + return "validatorUpdates." + error; + } + } + if (message.consensusParamUpdates != null && message.hasOwnProperty("consensusParamUpdates")) { + var error = $root.tendermint.abci.ConsensusParams.verify(message.consensusParamUpdates); + if (error) + return "consensusParamUpdates." + error; + } + if (message.events != null && message.hasOwnProperty("events")) { + if (!Array.isArray(message.events)) + return "events: array expected"; + for (var i = 0; i < message.events.length; ++i) { + var error = $root.tendermint.abci.Event.verify(message.events[i]); + if (error) + return "events." + error; + } + } + return null; + }; + + /** + * Creates a ResponseEndBlock message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.ResponseEndBlock + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.ResponseEndBlock} ResponseEndBlock + */ + ResponseEndBlock.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.ResponseEndBlock) + return object; + var message = new $root.tendermint.abci.ResponseEndBlock(); + if (object.validatorUpdates) { + if (!Array.isArray(object.validatorUpdates)) + throw TypeError(".tendermint.abci.ResponseEndBlock.validatorUpdates: array expected"); + message.validatorUpdates = []; + for (var i = 0; i < object.validatorUpdates.length; ++i) { + if (typeof object.validatorUpdates[i] !== "object") + throw TypeError(".tendermint.abci.ResponseEndBlock.validatorUpdates: object expected"); + message.validatorUpdates[i] = $root.tendermint.abci.ValidatorUpdate.fromObject(object.validatorUpdates[i]); + } + } + if (object.consensusParamUpdates != null) { + if (typeof object.consensusParamUpdates !== "object") + throw TypeError(".tendermint.abci.ResponseEndBlock.consensusParamUpdates: object expected"); + message.consensusParamUpdates = $root.tendermint.abci.ConsensusParams.fromObject(object.consensusParamUpdates); + } + if (object.events) { + if (!Array.isArray(object.events)) + throw TypeError(".tendermint.abci.ResponseEndBlock.events: array expected"); + message.events = []; + for (var i = 0; i < object.events.length; ++i) { + if (typeof object.events[i] !== "object") + throw TypeError(".tendermint.abci.ResponseEndBlock.events: object expected"); + message.events[i] = $root.tendermint.abci.Event.fromObject(object.events[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ResponseEndBlock message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.ResponseEndBlock + * @static + * @param {tendermint.abci.ResponseEndBlock} message ResponseEndBlock + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResponseEndBlock.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.validatorUpdates = []; + object.events = []; + } + if (options.defaults) + object.consensusParamUpdates = null; + if (message.validatorUpdates && message.validatorUpdates.length) { + object.validatorUpdates = []; + for (var j = 0; j < message.validatorUpdates.length; ++j) + object.validatorUpdates[j] = $root.tendermint.abci.ValidatorUpdate.toObject(message.validatorUpdates[j], options); + } + if (message.consensusParamUpdates != null && message.hasOwnProperty("consensusParamUpdates")) + object.consensusParamUpdates = $root.tendermint.abci.ConsensusParams.toObject(message.consensusParamUpdates, options); + if (message.events && message.events.length) { + object.events = []; + for (var j = 0; j < message.events.length; ++j) + object.events[j] = $root.tendermint.abci.Event.toObject(message.events[j], options); + } + return object; + }; + + /** + * Converts this ResponseEndBlock to JSON. + * @function toJSON + * @memberof tendermint.abci.ResponseEndBlock + * @instance + * @returns {Object.} JSON object + */ + ResponseEndBlock.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ResponseEndBlock; + })(abci.ResponseEndBlock || {}); + + abci.ResponseCommit = (function(ResponseCommit) { + + /** + * Properties of a ResponseCommit. + * @memberof tendermint.abci + * @interface IResponseCommit + * @property {Uint8Array|null} [data] ResponseCommit data + * @property {number|Long|null} [retainHeight] ResponseCommit retainHeight + */ + + /** + * Constructs a new ResponseCommit. + * @memberof tendermint.abci + * @classdesc Represents a ResponseCommit. + * @implements IResponseCommit + * @constructor + * @param {tendermint.abci.IResponseCommit=} [properties] Properties to set + */ + function ResponseCommit(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResponseCommit data. + * @member {Uint8Array} data + * @memberof tendermint.abci.ResponseCommit + * @instance + */ + ResponseCommit.prototype.data = $util.newBuffer([]); + + /** + * ResponseCommit retainHeight. + * @member {number|Long} retainHeight + * @memberof tendermint.abci.ResponseCommit + * @instance + */ + ResponseCommit.prototype.retainHeight = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new ResponseCommit instance using the specified properties. + * @function create + * @memberof tendermint.abci.ResponseCommit + * @static + * @param {tendermint.abci.IResponseCommit=} [properties] Properties to set + * @returns {tendermint.abci.ResponseCommit} ResponseCommit instance + */ + ResponseCommit.create = function create(properties) { + return new ResponseCommit(properties); + }; + + /** + * Encodes the specified ResponseCommit message. Does not implicitly {@link tendermint.abci.ResponseCommit.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.ResponseCommit + * @static + * @param {tendermint.abci.IResponseCommit} message ResponseCommit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseCommit.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.data != null && Object.hasOwnProperty.call(message, "data")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.data); + if (message.retainHeight != null && Object.hasOwnProperty.call(message, "retainHeight")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.retainHeight); + return writer; + }; + + /** + * Encodes the specified ResponseCommit message, length delimited. Does not implicitly {@link tendermint.abci.ResponseCommit.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.ResponseCommit + * @static + * @param {tendermint.abci.IResponseCommit} message ResponseCommit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseCommit.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResponseCommit message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.ResponseCommit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.ResponseCommit} ResponseCommit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseCommit.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.ResponseCommit(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + message.data = reader.bytes(); + break; + case 3: + message.retainHeight = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResponseCommit message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.ResponseCommit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.ResponseCommit} ResponseCommit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseCommit.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResponseCommit message. + * @function verify + * @memberof tendermint.abci.ResponseCommit + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResponseCommit.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.data != null && message.hasOwnProperty("data")) + if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) + return "data: buffer expected"; + if (message.retainHeight != null && message.hasOwnProperty("retainHeight")) + if (!$util.isInteger(message.retainHeight) && !(message.retainHeight && $util.isInteger(message.retainHeight.low) && $util.isInteger(message.retainHeight.high))) + return "retainHeight: integer|Long expected"; + return null; + }; + + /** + * Creates a ResponseCommit message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.ResponseCommit + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.ResponseCommit} ResponseCommit + */ + ResponseCommit.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.ResponseCommit) + return object; + var message = new $root.tendermint.abci.ResponseCommit(); + if (object.data != null) + if (typeof object.data === "string") + $util.base64.decode(object.data, message.data = $util.newBuffer($util.base64.length(object.data)), 0); + else if (object.data.length) + message.data = object.data; + if (object.retainHeight != null) + if ($util.Long) + (message.retainHeight = $util.Long.fromValue(object.retainHeight)).unsigned = false; + else if (typeof object.retainHeight === "string") + message.retainHeight = parseInt(object.retainHeight, 10); + else if (typeof object.retainHeight === "number") + message.retainHeight = object.retainHeight; + else if (typeof object.retainHeight === "object") + message.retainHeight = new $util.LongBits(object.retainHeight.low >>> 0, object.retainHeight.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a ResponseCommit message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.ResponseCommit + * @static + * @param {tendermint.abci.ResponseCommit} message ResponseCommit + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResponseCommit.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.data = ""; + else { + object.data = []; + if (options.bytes !== Array) + object.data = $util.newBuffer(object.data); + } + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.retainHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.retainHeight = options.longs === String ? "0" : 0; + } + if (message.data != null && message.hasOwnProperty("data")) + object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; + if (message.retainHeight != null && message.hasOwnProperty("retainHeight")) + if (typeof message.retainHeight === "number") + object.retainHeight = options.longs === String ? String(message.retainHeight) : message.retainHeight; + else + object.retainHeight = options.longs === String ? $util.Long.prototype.toString.call(message.retainHeight) : options.longs === Number ? new $util.LongBits(message.retainHeight.low >>> 0, message.retainHeight.high >>> 0).toNumber() : message.retainHeight; + return object; + }; + + /** + * Converts this ResponseCommit to JSON. + * @function toJSON + * @memberof tendermint.abci.ResponseCommit + * @instance + * @returns {Object.} JSON object + */ + ResponseCommit.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ResponseCommit; + })(abci.ResponseCommit || {}); + + abci.ResponseListSnapshots = (function(ResponseListSnapshots) { + + /** + * Properties of a ResponseListSnapshots. + * @memberof tendermint.abci + * @interface IResponseListSnapshots + * @property {Array.|null} [snapshots] ResponseListSnapshots snapshots + */ + + /** + * Constructs a new ResponseListSnapshots. + * @memberof tendermint.abci + * @classdesc Represents a ResponseListSnapshots. + * @implements IResponseListSnapshots + * @constructor + * @param {tendermint.abci.IResponseListSnapshots=} [properties] Properties to set + */ + function ResponseListSnapshots(properties) { + this.snapshots = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResponseListSnapshots snapshots. + * @member {Array.} snapshots + * @memberof tendermint.abci.ResponseListSnapshots + * @instance + */ + ResponseListSnapshots.prototype.snapshots = $util.emptyArray; + + /** + * Creates a new ResponseListSnapshots instance using the specified properties. + * @function create + * @memberof tendermint.abci.ResponseListSnapshots + * @static + * @param {tendermint.abci.IResponseListSnapshots=} [properties] Properties to set + * @returns {tendermint.abci.ResponseListSnapshots} ResponseListSnapshots instance + */ + ResponseListSnapshots.create = function create(properties) { + return new ResponseListSnapshots(properties); + }; + + /** + * Encodes the specified ResponseListSnapshots message. Does not implicitly {@link tendermint.abci.ResponseListSnapshots.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.ResponseListSnapshots + * @static + * @param {tendermint.abci.IResponseListSnapshots} message ResponseListSnapshots message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseListSnapshots.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.snapshots != null && message.snapshots.length) + for (var i = 0; i < message.snapshots.length; ++i) + $root.tendermint.abci.Snapshot.encode(message.snapshots[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ResponseListSnapshots message, length delimited. Does not implicitly {@link tendermint.abci.ResponseListSnapshots.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.ResponseListSnapshots + * @static + * @param {tendermint.abci.IResponseListSnapshots} message ResponseListSnapshots message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseListSnapshots.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResponseListSnapshots message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.ResponseListSnapshots + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.ResponseListSnapshots} ResponseListSnapshots + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseListSnapshots.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.ResponseListSnapshots(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.snapshots && message.snapshots.length)) + message.snapshots = []; + message.snapshots.push($root.tendermint.abci.Snapshot.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResponseListSnapshots message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.ResponseListSnapshots + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.ResponseListSnapshots} ResponseListSnapshots + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseListSnapshots.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResponseListSnapshots message. + * @function verify + * @memberof tendermint.abci.ResponseListSnapshots + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResponseListSnapshots.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.snapshots != null && message.hasOwnProperty("snapshots")) { + if (!Array.isArray(message.snapshots)) + return "snapshots: array expected"; + for (var i = 0; i < message.snapshots.length; ++i) { + var error = $root.tendermint.abci.Snapshot.verify(message.snapshots[i]); + if (error) + return "snapshots." + error; + } + } + return null; + }; + + /** + * Creates a ResponseListSnapshots message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.ResponseListSnapshots + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.ResponseListSnapshots} ResponseListSnapshots + */ + ResponseListSnapshots.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.ResponseListSnapshots) + return object; + var message = new $root.tendermint.abci.ResponseListSnapshots(); + if (object.snapshots) { + if (!Array.isArray(object.snapshots)) + throw TypeError(".tendermint.abci.ResponseListSnapshots.snapshots: array expected"); + message.snapshots = []; + for (var i = 0; i < object.snapshots.length; ++i) { + if (typeof object.snapshots[i] !== "object") + throw TypeError(".tendermint.abci.ResponseListSnapshots.snapshots: object expected"); + message.snapshots[i] = $root.tendermint.abci.Snapshot.fromObject(object.snapshots[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ResponseListSnapshots message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.ResponseListSnapshots + * @static + * @param {tendermint.abci.ResponseListSnapshots} message ResponseListSnapshots + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResponseListSnapshots.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.snapshots = []; + if (message.snapshots && message.snapshots.length) { + object.snapshots = []; + for (var j = 0; j < message.snapshots.length; ++j) + object.snapshots[j] = $root.tendermint.abci.Snapshot.toObject(message.snapshots[j], options); + } + return object; + }; + + /** + * Converts this ResponseListSnapshots to JSON. + * @function toJSON + * @memberof tendermint.abci.ResponseListSnapshots + * @instance + * @returns {Object.} JSON object + */ + ResponseListSnapshots.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ResponseListSnapshots; + })(abci.ResponseListSnapshots || {}); + + abci.ResponseOfferSnapshot = (function(ResponseOfferSnapshot) { + + /** + * Properties of a ResponseOfferSnapshot. + * @memberof tendermint.abci + * @interface IResponseOfferSnapshot + * @property {tendermint.abci.ResponseOfferSnapshot.Result|null} [result] ResponseOfferSnapshot result + */ + + /** + * Constructs a new ResponseOfferSnapshot. + * @memberof tendermint.abci + * @classdesc Represents a ResponseOfferSnapshot. + * @implements IResponseOfferSnapshot + * @constructor + * @param {tendermint.abci.IResponseOfferSnapshot=} [properties] Properties to set + */ + function ResponseOfferSnapshot(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResponseOfferSnapshot result. + * @member {tendermint.abci.ResponseOfferSnapshot.Result} result + * @memberof tendermint.abci.ResponseOfferSnapshot + * @instance + */ + ResponseOfferSnapshot.prototype.result = 0; + + /** + * Creates a new ResponseOfferSnapshot instance using the specified properties. + * @function create + * @memberof tendermint.abci.ResponseOfferSnapshot + * @static + * @param {tendermint.abci.IResponseOfferSnapshot=} [properties] Properties to set + * @returns {tendermint.abci.ResponseOfferSnapshot} ResponseOfferSnapshot instance + */ + ResponseOfferSnapshot.create = function create(properties) { + return new ResponseOfferSnapshot(properties); + }; + + /** + * Encodes the specified ResponseOfferSnapshot message. Does not implicitly {@link tendermint.abci.ResponseOfferSnapshot.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.ResponseOfferSnapshot + * @static + * @param {tendermint.abci.IResponseOfferSnapshot} message ResponseOfferSnapshot message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseOfferSnapshot.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.result != null && Object.hasOwnProperty.call(message, "result")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.result); + return writer; + }; + + /** + * Encodes the specified ResponseOfferSnapshot message, length delimited. Does not implicitly {@link tendermint.abci.ResponseOfferSnapshot.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.ResponseOfferSnapshot + * @static + * @param {tendermint.abci.IResponseOfferSnapshot} message ResponseOfferSnapshot message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseOfferSnapshot.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResponseOfferSnapshot message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.ResponseOfferSnapshot + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.ResponseOfferSnapshot} ResponseOfferSnapshot + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseOfferSnapshot.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.ResponseOfferSnapshot(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.result = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResponseOfferSnapshot message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.ResponseOfferSnapshot + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.ResponseOfferSnapshot} ResponseOfferSnapshot + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseOfferSnapshot.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResponseOfferSnapshot message. + * @function verify + * @memberof tendermint.abci.ResponseOfferSnapshot + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResponseOfferSnapshot.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.result != null && message.hasOwnProperty("result")) + switch (message.result) { + default: + return "result: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + return null; + }; + + /** + * Creates a ResponseOfferSnapshot message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.ResponseOfferSnapshot + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.ResponseOfferSnapshot} ResponseOfferSnapshot + */ + ResponseOfferSnapshot.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.ResponseOfferSnapshot) + return object; + var message = new $root.tendermint.abci.ResponseOfferSnapshot(); + switch (object.result) { + case "UNKNOWN": + case 0: + message.result = 0; + break; + case "ACCEPT": + case 1: + message.result = 1; + break; + case "ABORT": + case 2: + message.result = 2; + break; + case "REJECT": + case 3: + message.result = 3; + break; + case "REJECT_FORMAT": + case 4: + message.result = 4; + break; + case "REJECT_SENDER": + case 5: + message.result = 5; + break; + } + return message; + }; + + /** + * Creates a plain object from a ResponseOfferSnapshot message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.ResponseOfferSnapshot + * @static + * @param {tendermint.abci.ResponseOfferSnapshot} message ResponseOfferSnapshot + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResponseOfferSnapshot.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.result = options.enums === String ? "UNKNOWN" : 0; + if (message.result != null && message.hasOwnProperty("result")) + object.result = options.enums === String ? $root.tendermint.abci.ResponseOfferSnapshot.Result[message.result] : message.result; + return object; + }; + + /** + * Converts this ResponseOfferSnapshot to JSON. + * @function toJSON + * @memberof tendermint.abci.ResponseOfferSnapshot + * @instance + * @returns {Object.} JSON object + */ + ResponseOfferSnapshot.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Result enum. + * @name tendermint.abci.ResponseOfferSnapshot.Result + * @enum {string} + * @property {number} UNKNOWN=0 UNKNOWN value + * @property {number} ACCEPT=1 ACCEPT value + * @property {number} ABORT=2 ABORT value + * @property {number} REJECT=3 REJECT value + * @property {number} REJECT_FORMAT=4 REJECT_FORMAT value + * @property {number} REJECT_SENDER=5 REJECT_SENDER value + */ + ResponseOfferSnapshot.Result = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNKNOWN"] = 0; + values[valuesById[1] = "ACCEPT"] = 1; + values[valuesById[2] = "ABORT"] = 2; + values[valuesById[3] = "REJECT"] = 3; + values[valuesById[4] = "REJECT_FORMAT"] = 4; + values[valuesById[5] = "REJECT_SENDER"] = 5; + return values; + })(); + + return ResponseOfferSnapshot; + })(abci.ResponseOfferSnapshot || {}); + + abci.ResponseLoadSnapshotChunk = (function(ResponseLoadSnapshotChunk) { + + /** + * Properties of a ResponseLoadSnapshotChunk. + * @memberof tendermint.abci + * @interface IResponseLoadSnapshotChunk + * @property {Uint8Array|null} [chunk] ResponseLoadSnapshotChunk chunk + */ + + /** + * Constructs a new ResponseLoadSnapshotChunk. + * @memberof tendermint.abci + * @classdesc Represents a ResponseLoadSnapshotChunk. + * @implements IResponseLoadSnapshotChunk + * @constructor + * @param {tendermint.abci.IResponseLoadSnapshotChunk=} [properties] Properties to set + */ + function ResponseLoadSnapshotChunk(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResponseLoadSnapshotChunk chunk. + * @member {Uint8Array} chunk + * @memberof tendermint.abci.ResponseLoadSnapshotChunk + * @instance + */ + ResponseLoadSnapshotChunk.prototype.chunk = $util.newBuffer([]); + + /** + * Creates a new ResponseLoadSnapshotChunk instance using the specified properties. + * @function create + * @memberof tendermint.abci.ResponseLoadSnapshotChunk + * @static + * @param {tendermint.abci.IResponseLoadSnapshotChunk=} [properties] Properties to set + * @returns {tendermint.abci.ResponseLoadSnapshotChunk} ResponseLoadSnapshotChunk instance + */ + ResponseLoadSnapshotChunk.create = function create(properties) { + return new ResponseLoadSnapshotChunk(properties); + }; + + /** + * Encodes the specified ResponseLoadSnapshotChunk message. Does not implicitly {@link tendermint.abci.ResponseLoadSnapshotChunk.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.ResponseLoadSnapshotChunk + * @static + * @param {tendermint.abci.IResponseLoadSnapshotChunk} message ResponseLoadSnapshotChunk message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseLoadSnapshotChunk.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.chunk != null && Object.hasOwnProperty.call(message, "chunk")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.chunk); + return writer; + }; + + /** + * Encodes the specified ResponseLoadSnapshotChunk message, length delimited. Does not implicitly {@link tendermint.abci.ResponseLoadSnapshotChunk.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.ResponseLoadSnapshotChunk + * @static + * @param {tendermint.abci.IResponseLoadSnapshotChunk} message ResponseLoadSnapshotChunk message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseLoadSnapshotChunk.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResponseLoadSnapshotChunk message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.ResponseLoadSnapshotChunk + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.ResponseLoadSnapshotChunk} ResponseLoadSnapshotChunk + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseLoadSnapshotChunk.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.ResponseLoadSnapshotChunk(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.chunk = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResponseLoadSnapshotChunk message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.ResponseLoadSnapshotChunk + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.ResponseLoadSnapshotChunk} ResponseLoadSnapshotChunk + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseLoadSnapshotChunk.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResponseLoadSnapshotChunk message. + * @function verify + * @memberof tendermint.abci.ResponseLoadSnapshotChunk + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResponseLoadSnapshotChunk.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.chunk != null && message.hasOwnProperty("chunk")) + if (!(message.chunk && typeof message.chunk.length === "number" || $util.isString(message.chunk))) + return "chunk: buffer expected"; + return null; + }; + + /** + * Creates a ResponseLoadSnapshotChunk message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.ResponseLoadSnapshotChunk + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.ResponseLoadSnapshotChunk} ResponseLoadSnapshotChunk + */ + ResponseLoadSnapshotChunk.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.ResponseLoadSnapshotChunk) + return object; + var message = new $root.tendermint.abci.ResponseLoadSnapshotChunk(); + if (object.chunk != null) + if (typeof object.chunk === "string") + $util.base64.decode(object.chunk, message.chunk = $util.newBuffer($util.base64.length(object.chunk)), 0); + else if (object.chunk.length) + message.chunk = object.chunk; + return message; + }; + + /** + * Creates a plain object from a ResponseLoadSnapshotChunk message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.ResponseLoadSnapshotChunk + * @static + * @param {tendermint.abci.ResponseLoadSnapshotChunk} message ResponseLoadSnapshotChunk + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResponseLoadSnapshotChunk.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if (options.bytes === String) + object.chunk = ""; + else { + object.chunk = []; + if (options.bytes !== Array) + object.chunk = $util.newBuffer(object.chunk); + } + if (message.chunk != null && message.hasOwnProperty("chunk")) + object.chunk = options.bytes === String ? $util.base64.encode(message.chunk, 0, message.chunk.length) : options.bytes === Array ? Array.prototype.slice.call(message.chunk) : message.chunk; + return object; + }; + + /** + * Converts this ResponseLoadSnapshotChunk to JSON. + * @function toJSON + * @memberof tendermint.abci.ResponseLoadSnapshotChunk + * @instance + * @returns {Object.} JSON object + */ + ResponseLoadSnapshotChunk.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ResponseLoadSnapshotChunk; + })(abci.ResponseLoadSnapshotChunk || {}); + + abci.ResponseApplySnapshotChunk = (function(ResponseApplySnapshotChunk) { + + /** + * Properties of a ResponseApplySnapshotChunk. + * @memberof tendermint.abci + * @interface IResponseApplySnapshotChunk + * @property {tendermint.abci.ResponseApplySnapshotChunk.Result|null} [result] ResponseApplySnapshotChunk result + * @property {Array.|null} [refetchChunks] ResponseApplySnapshotChunk refetchChunks + * @property {Array.|null} [rejectSenders] ResponseApplySnapshotChunk rejectSenders + */ + + /** + * Constructs a new ResponseApplySnapshotChunk. + * @memberof tendermint.abci + * @classdesc Represents a ResponseApplySnapshotChunk. + * @implements IResponseApplySnapshotChunk + * @constructor + * @param {tendermint.abci.IResponseApplySnapshotChunk=} [properties] Properties to set + */ + function ResponseApplySnapshotChunk(properties) { + this.refetchChunks = []; + this.rejectSenders = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResponseApplySnapshotChunk result. + * @member {tendermint.abci.ResponseApplySnapshotChunk.Result} result + * @memberof tendermint.abci.ResponseApplySnapshotChunk + * @instance + */ + ResponseApplySnapshotChunk.prototype.result = 0; + + /** + * ResponseApplySnapshotChunk refetchChunks. + * @member {Array.} refetchChunks + * @memberof tendermint.abci.ResponseApplySnapshotChunk + * @instance + */ + ResponseApplySnapshotChunk.prototype.refetchChunks = $util.emptyArray; + + /** + * ResponseApplySnapshotChunk rejectSenders. + * @member {Array.} rejectSenders + * @memberof tendermint.abci.ResponseApplySnapshotChunk + * @instance + */ + ResponseApplySnapshotChunk.prototype.rejectSenders = $util.emptyArray; + + /** + * Creates a new ResponseApplySnapshotChunk instance using the specified properties. + * @function create + * @memberof tendermint.abci.ResponseApplySnapshotChunk + * @static + * @param {tendermint.abci.IResponseApplySnapshotChunk=} [properties] Properties to set + * @returns {tendermint.abci.ResponseApplySnapshotChunk} ResponseApplySnapshotChunk instance + */ + ResponseApplySnapshotChunk.create = function create(properties) { + return new ResponseApplySnapshotChunk(properties); + }; + + /** + * Encodes the specified ResponseApplySnapshotChunk message. Does not implicitly {@link tendermint.abci.ResponseApplySnapshotChunk.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.ResponseApplySnapshotChunk + * @static + * @param {tendermint.abci.IResponseApplySnapshotChunk} message ResponseApplySnapshotChunk message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseApplySnapshotChunk.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.result != null && Object.hasOwnProperty.call(message, "result")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.result); + if (message.refetchChunks != null && message.refetchChunks.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.refetchChunks.length; ++i) + writer.uint32(message.refetchChunks[i]); + writer.ldelim(); + } + if (message.rejectSenders != null && message.rejectSenders.length) + for (var i = 0; i < message.rejectSenders.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.rejectSenders[i]); + return writer; + }; + + /** + * Encodes the specified ResponseApplySnapshotChunk message, length delimited. Does not implicitly {@link tendermint.abci.ResponseApplySnapshotChunk.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.ResponseApplySnapshotChunk + * @static + * @param {tendermint.abci.IResponseApplySnapshotChunk} message ResponseApplySnapshotChunk message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseApplySnapshotChunk.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResponseApplySnapshotChunk message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.ResponseApplySnapshotChunk + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.ResponseApplySnapshotChunk} ResponseApplySnapshotChunk + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseApplySnapshotChunk.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.ResponseApplySnapshotChunk(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.result = reader.int32(); + break; + case 2: + if (!(message.refetchChunks && message.refetchChunks.length)) + message.refetchChunks = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.refetchChunks.push(reader.uint32()); + } else + message.refetchChunks.push(reader.uint32()); + break; + case 3: + if (!(message.rejectSenders && message.rejectSenders.length)) + message.rejectSenders = []; + message.rejectSenders.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResponseApplySnapshotChunk message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.ResponseApplySnapshotChunk + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.ResponseApplySnapshotChunk} ResponseApplySnapshotChunk + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseApplySnapshotChunk.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResponseApplySnapshotChunk message. + * @function verify + * @memberof tendermint.abci.ResponseApplySnapshotChunk + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResponseApplySnapshotChunk.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.result != null && message.hasOwnProperty("result")) + switch (message.result) { + default: + return "result: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.refetchChunks != null && message.hasOwnProperty("refetchChunks")) { + if (!Array.isArray(message.refetchChunks)) + return "refetchChunks: array expected"; + for (var i = 0; i < message.refetchChunks.length; ++i) + if (!$util.isInteger(message.refetchChunks[i])) + return "refetchChunks: integer[] expected"; + } + if (message.rejectSenders != null && message.hasOwnProperty("rejectSenders")) { + if (!Array.isArray(message.rejectSenders)) + return "rejectSenders: array expected"; + for (var i = 0; i < message.rejectSenders.length; ++i) + if (!$util.isString(message.rejectSenders[i])) + return "rejectSenders: string[] expected"; + } + return null; + }; + + /** + * Creates a ResponseApplySnapshotChunk message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.ResponseApplySnapshotChunk + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.ResponseApplySnapshotChunk} ResponseApplySnapshotChunk + */ + ResponseApplySnapshotChunk.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.ResponseApplySnapshotChunk) + return object; + var message = new $root.tendermint.abci.ResponseApplySnapshotChunk(); + switch (object.result) { + case "UNKNOWN": + case 0: + message.result = 0; + break; + case "ACCEPT": + case 1: + message.result = 1; + break; + case "ABORT": + case 2: + message.result = 2; + break; + case "RETRY": + case 3: + message.result = 3; + break; + case "RETRY_SNAPSHOT": + case 4: + message.result = 4; + break; + case "REJECT_SNAPSHOT": + case 5: + message.result = 5; + break; + } + if (object.refetchChunks) { + if (!Array.isArray(object.refetchChunks)) + throw TypeError(".tendermint.abci.ResponseApplySnapshotChunk.refetchChunks: array expected"); + message.refetchChunks = []; + for (var i = 0; i < object.refetchChunks.length; ++i) + message.refetchChunks[i] = object.refetchChunks[i] >>> 0; + } + if (object.rejectSenders) { + if (!Array.isArray(object.rejectSenders)) + throw TypeError(".tendermint.abci.ResponseApplySnapshotChunk.rejectSenders: array expected"); + message.rejectSenders = []; + for (var i = 0; i < object.rejectSenders.length; ++i) + message.rejectSenders[i] = String(object.rejectSenders[i]); + } + return message; + }; + + /** + * Creates a plain object from a ResponseApplySnapshotChunk message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.ResponseApplySnapshotChunk + * @static + * @param {tendermint.abci.ResponseApplySnapshotChunk} message ResponseApplySnapshotChunk + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResponseApplySnapshotChunk.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.refetchChunks = []; + object.rejectSenders = []; + } + if (options.defaults) + object.result = options.enums === String ? "UNKNOWN" : 0; + if (message.result != null && message.hasOwnProperty("result")) + object.result = options.enums === String ? $root.tendermint.abci.ResponseApplySnapshotChunk.Result[message.result] : message.result; + if (message.refetchChunks && message.refetchChunks.length) { + object.refetchChunks = []; + for (var j = 0; j < message.refetchChunks.length; ++j) + object.refetchChunks[j] = message.refetchChunks[j]; + } + if (message.rejectSenders && message.rejectSenders.length) { + object.rejectSenders = []; + for (var j = 0; j < message.rejectSenders.length; ++j) + object.rejectSenders[j] = message.rejectSenders[j]; + } + return object; + }; + + /** + * Converts this ResponseApplySnapshotChunk to JSON. + * @function toJSON + * @memberof tendermint.abci.ResponseApplySnapshotChunk + * @instance + * @returns {Object.} JSON object + */ + ResponseApplySnapshotChunk.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Result enum. + * @name tendermint.abci.ResponseApplySnapshotChunk.Result + * @enum {string} + * @property {number} UNKNOWN=0 UNKNOWN value + * @property {number} ACCEPT=1 ACCEPT value + * @property {number} ABORT=2 ABORT value + * @property {number} RETRY=3 RETRY value + * @property {number} RETRY_SNAPSHOT=4 RETRY_SNAPSHOT value + * @property {number} REJECT_SNAPSHOT=5 REJECT_SNAPSHOT value + */ + ResponseApplySnapshotChunk.Result = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNKNOWN"] = 0; + values[valuesById[1] = "ACCEPT"] = 1; + values[valuesById[2] = "ABORT"] = 2; + values[valuesById[3] = "RETRY"] = 3; + values[valuesById[4] = "RETRY_SNAPSHOT"] = 4; + values[valuesById[5] = "REJECT_SNAPSHOT"] = 5; + return values; + })(); + + return ResponseApplySnapshotChunk; + })(abci.ResponseApplySnapshotChunk || {}); + + abci.ConsensusParams = (function(ConsensusParams) { + + /** + * Properties of a ConsensusParams. + * @memberof tendermint.abci + * @interface IConsensusParams + * @property {tendermint.abci.IBlockParams|null} [block] ConsensusParams block + * @property {tendermint.types.IEvidenceParams|null} [evidence] ConsensusParams evidence + * @property {tendermint.types.IValidatorParams|null} [validator] ConsensusParams validator + * @property {tendermint.types.IVersionParams|null} [version] ConsensusParams version + */ + + /** + * Constructs a new ConsensusParams. + * @memberof tendermint.abci + * @classdesc Represents a ConsensusParams. + * @implements IConsensusParams + * @constructor + * @param {tendermint.abci.IConsensusParams=} [properties] Properties to set + */ + function ConsensusParams(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ConsensusParams block. + * @member {tendermint.abci.IBlockParams|null|undefined} block + * @memberof tendermint.abci.ConsensusParams + * @instance + */ + ConsensusParams.prototype.block = null; + + /** + * ConsensusParams evidence. + * @member {tendermint.types.IEvidenceParams|null|undefined} evidence + * @memberof tendermint.abci.ConsensusParams + * @instance + */ + ConsensusParams.prototype.evidence = null; + + /** + * ConsensusParams validator. + * @member {tendermint.types.IValidatorParams|null|undefined} validator + * @memberof tendermint.abci.ConsensusParams + * @instance + */ + ConsensusParams.prototype.validator = null; + + /** + * ConsensusParams version. + * @member {tendermint.types.IVersionParams|null|undefined} version + * @memberof tendermint.abci.ConsensusParams + * @instance + */ + ConsensusParams.prototype.version = null; + + /** + * Creates a new ConsensusParams instance using the specified properties. + * @function create + * @memberof tendermint.abci.ConsensusParams + * @static + * @param {tendermint.abci.IConsensusParams=} [properties] Properties to set + * @returns {tendermint.abci.ConsensusParams} ConsensusParams instance + */ + ConsensusParams.create = function create(properties) { + return new ConsensusParams(properties); + }; + + /** + * Encodes the specified ConsensusParams message. Does not implicitly {@link tendermint.abci.ConsensusParams.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.ConsensusParams + * @static + * @param {tendermint.abci.IConsensusParams} message ConsensusParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConsensusParams.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.block != null && Object.hasOwnProperty.call(message, "block")) + $root.tendermint.abci.BlockParams.encode(message.block, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.evidence != null && Object.hasOwnProperty.call(message, "evidence")) + $root.tendermint.types.EvidenceParams.encode(message.evidence, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.validator != null && Object.hasOwnProperty.call(message, "validator")) + $root.tendermint.types.ValidatorParams.encode(message.validator, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + $root.tendermint.types.VersionParams.encode(message.version, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ConsensusParams message, length delimited. Does not implicitly {@link tendermint.abci.ConsensusParams.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.ConsensusParams + * @static + * @param {tendermint.abci.IConsensusParams} message ConsensusParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConsensusParams.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConsensusParams message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.ConsensusParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.ConsensusParams} ConsensusParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConsensusParams.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.ConsensusParams(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.block = $root.tendermint.abci.BlockParams.decode(reader, reader.uint32()); + break; + case 2: + message.evidence = $root.tendermint.types.EvidenceParams.decode(reader, reader.uint32()); + break; + case 3: + message.validator = $root.tendermint.types.ValidatorParams.decode(reader, reader.uint32()); + break; + case 4: + message.version = $root.tendermint.types.VersionParams.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ConsensusParams message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.ConsensusParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.ConsensusParams} ConsensusParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConsensusParams.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConsensusParams message. + * @function verify + * @memberof tendermint.abci.ConsensusParams + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConsensusParams.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.block != null && message.hasOwnProperty("block")) { + var error = $root.tendermint.abci.BlockParams.verify(message.block); + if (error) + return "block." + error; + } + if (message.evidence != null && message.hasOwnProperty("evidence")) { + var error = $root.tendermint.types.EvidenceParams.verify(message.evidence); + if (error) + return "evidence." + error; + } + if (message.validator != null && message.hasOwnProperty("validator")) { + var error = $root.tendermint.types.ValidatorParams.verify(message.validator); + if (error) + return "validator." + error; + } + if (message.version != null && message.hasOwnProperty("version")) { + var error = $root.tendermint.types.VersionParams.verify(message.version); + if (error) + return "version." + error; + } + return null; + }; + + /** + * Creates a ConsensusParams message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.ConsensusParams + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.ConsensusParams} ConsensusParams + */ + ConsensusParams.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.ConsensusParams) + return object; + var message = new $root.tendermint.abci.ConsensusParams(); + if (object.block != null) { + if (typeof object.block !== "object") + throw TypeError(".tendermint.abci.ConsensusParams.block: object expected"); + message.block = $root.tendermint.abci.BlockParams.fromObject(object.block); + } + if (object.evidence != null) { + if (typeof object.evidence !== "object") + throw TypeError(".tendermint.abci.ConsensusParams.evidence: object expected"); + message.evidence = $root.tendermint.types.EvidenceParams.fromObject(object.evidence); + } + if (object.validator != null) { + if (typeof object.validator !== "object") + throw TypeError(".tendermint.abci.ConsensusParams.validator: object expected"); + message.validator = $root.tendermint.types.ValidatorParams.fromObject(object.validator); + } + if (object.version != null) { + if (typeof object.version !== "object") + throw TypeError(".tendermint.abci.ConsensusParams.version: object expected"); + message.version = $root.tendermint.types.VersionParams.fromObject(object.version); + } + return message; + }; + + /** + * Creates a plain object from a ConsensusParams message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.ConsensusParams + * @static + * @param {tendermint.abci.ConsensusParams} message ConsensusParams + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConsensusParams.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.block = null; + object.evidence = null; + object.validator = null; + object.version = null; + } + if (message.block != null && message.hasOwnProperty("block")) + object.block = $root.tendermint.abci.BlockParams.toObject(message.block, options); + if (message.evidence != null && message.hasOwnProperty("evidence")) + object.evidence = $root.tendermint.types.EvidenceParams.toObject(message.evidence, options); + if (message.validator != null && message.hasOwnProperty("validator")) + object.validator = $root.tendermint.types.ValidatorParams.toObject(message.validator, options); + if (message.version != null && message.hasOwnProperty("version")) + object.version = $root.tendermint.types.VersionParams.toObject(message.version, options); + return object; + }; + + /** + * Converts this ConsensusParams to JSON. + * @function toJSON + * @memberof tendermint.abci.ConsensusParams + * @instance + * @returns {Object.} JSON object + */ + ConsensusParams.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ConsensusParams; + })(abci.ConsensusParams || {}); + + abci.BlockParams = (function(BlockParams) { + + /** + * Properties of a BlockParams. + * @memberof tendermint.abci + * @interface IBlockParams + * @property {number|Long|null} [maxBytes] BlockParams maxBytes + * @property {number|Long|null} [maxGas] BlockParams maxGas + */ + + /** + * Constructs a new BlockParams. + * @memberof tendermint.abci + * @classdesc Represents a BlockParams. + * @implements IBlockParams + * @constructor + * @param {tendermint.abci.IBlockParams=} [properties] Properties to set + */ + function BlockParams(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BlockParams maxBytes. + * @member {number|Long} maxBytes + * @memberof tendermint.abci.BlockParams + * @instance + */ + BlockParams.prototype.maxBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * BlockParams maxGas. + * @member {number|Long} maxGas + * @memberof tendermint.abci.BlockParams + * @instance + */ + BlockParams.prototype.maxGas = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new BlockParams instance using the specified properties. + * @function create + * @memberof tendermint.abci.BlockParams + * @static + * @param {tendermint.abci.IBlockParams=} [properties] Properties to set + * @returns {tendermint.abci.BlockParams} BlockParams instance + */ + BlockParams.create = function create(properties) { + return new BlockParams(properties); + }; + + /** + * Encodes the specified BlockParams message. Does not implicitly {@link tendermint.abci.BlockParams.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.BlockParams + * @static + * @param {tendermint.abci.IBlockParams} message BlockParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BlockParams.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.maxBytes != null && Object.hasOwnProperty.call(message, "maxBytes")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.maxBytes); + if (message.maxGas != null && Object.hasOwnProperty.call(message, "maxGas")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.maxGas); + return writer; + }; + + /** + * Encodes the specified BlockParams message, length delimited. Does not implicitly {@link tendermint.abci.BlockParams.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.BlockParams + * @static + * @param {tendermint.abci.IBlockParams} message BlockParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BlockParams.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BlockParams message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.BlockParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.BlockParams} BlockParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BlockParams.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.BlockParams(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.maxBytes = reader.int64(); + break; + case 2: + message.maxGas = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BlockParams message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.BlockParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.BlockParams} BlockParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BlockParams.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BlockParams message. + * @function verify + * @memberof tendermint.abci.BlockParams + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BlockParams.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.maxBytes != null && message.hasOwnProperty("maxBytes")) + if (!$util.isInteger(message.maxBytes) && !(message.maxBytes && $util.isInteger(message.maxBytes.low) && $util.isInteger(message.maxBytes.high))) + return "maxBytes: integer|Long expected"; + if (message.maxGas != null && message.hasOwnProperty("maxGas")) + if (!$util.isInteger(message.maxGas) && !(message.maxGas && $util.isInteger(message.maxGas.low) && $util.isInteger(message.maxGas.high))) + return "maxGas: integer|Long expected"; + return null; + }; + + /** + * Creates a BlockParams message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.BlockParams + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.BlockParams} BlockParams + */ + BlockParams.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.BlockParams) + return object; + var message = new $root.tendermint.abci.BlockParams(); + if (object.maxBytes != null) + if ($util.Long) + (message.maxBytes = $util.Long.fromValue(object.maxBytes)).unsigned = false; + else if (typeof object.maxBytes === "string") + message.maxBytes = parseInt(object.maxBytes, 10); + else if (typeof object.maxBytes === "number") + message.maxBytes = object.maxBytes; + else if (typeof object.maxBytes === "object") + message.maxBytes = new $util.LongBits(object.maxBytes.low >>> 0, object.maxBytes.high >>> 0).toNumber(); + if (object.maxGas != null) + if ($util.Long) + (message.maxGas = $util.Long.fromValue(object.maxGas)).unsigned = false; + else if (typeof object.maxGas === "string") + message.maxGas = parseInt(object.maxGas, 10); + else if (typeof object.maxGas === "number") + message.maxGas = object.maxGas; + else if (typeof object.maxGas === "object") + message.maxGas = new $util.LongBits(object.maxGas.low >>> 0, object.maxGas.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a BlockParams message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.BlockParams + * @static + * @param {tendermint.abci.BlockParams} message BlockParams + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BlockParams.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.maxBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.maxBytes = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.maxGas = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.maxGas = options.longs === String ? "0" : 0; + } + if (message.maxBytes != null && message.hasOwnProperty("maxBytes")) + if (typeof message.maxBytes === "number") + object.maxBytes = options.longs === String ? String(message.maxBytes) : message.maxBytes; + else + object.maxBytes = options.longs === String ? $util.Long.prototype.toString.call(message.maxBytes) : options.longs === Number ? new $util.LongBits(message.maxBytes.low >>> 0, message.maxBytes.high >>> 0).toNumber() : message.maxBytes; + if (message.maxGas != null && message.hasOwnProperty("maxGas")) + if (typeof message.maxGas === "number") + object.maxGas = options.longs === String ? String(message.maxGas) : message.maxGas; + else + object.maxGas = options.longs === String ? $util.Long.prototype.toString.call(message.maxGas) : options.longs === Number ? new $util.LongBits(message.maxGas.low >>> 0, message.maxGas.high >>> 0).toNumber() : message.maxGas; + return object; + }; + + /** + * Converts this BlockParams to JSON. + * @function toJSON + * @memberof tendermint.abci.BlockParams + * @instance + * @returns {Object.} JSON object + */ + BlockParams.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return BlockParams; + })(abci.BlockParams || {}); + + abci.LastCommitInfo = (function(LastCommitInfo) { + + /** + * Properties of a LastCommitInfo. + * @memberof tendermint.abci + * @interface ILastCommitInfo + * @property {number|null} [round] LastCommitInfo round + * @property {Array.|null} [votes] LastCommitInfo votes + */ + + /** + * Constructs a new LastCommitInfo. + * @memberof tendermint.abci + * @classdesc Represents a LastCommitInfo. + * @implements ILastCommitInfo + * @constructor + * @param {tendermint.abci.ILastCommitInfo=} [properties] Properties to set + */ + function LastCommitInfo(properties) { + this.votes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LastCommitInfo round. + * @member {number} round + * @memberof tendermint.abci.LastCommitInfo + * @instance + */ + LastCommitInfo.prototype.round = 0; + + /** + * LastCommitInfo votes. + * @member {Array.} votes + * @memberof tendermint.abci.LastCommitInfo + * @instance + */ + LastCommitInfo.prototype.votes = $util.emptyArray; + + /** + * Creates a new LastCommitInfo instance using the specified properties. + * @function create + * @memberof tendermint.abci.LastCommitInfo + * @static + * @param {tendermint.abci.ILastCommitInfo=} [properties] Properties to set + * @returns {tendermint.abci.LastCommitInfo} LastCommitInfo instance + */ + LastCommitInfo.create = function create(properties) { + return new LastCommitInfo(properties); + }; + + /** + * Encodes the specified LastCommitInfo message. Does not implicitly {@link tendermint.abci.LastCommitInfo.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.LastCommitInfo + * @static + * @param {tendermint.abci.ILastCommitInfo} message LastCommitInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LastCommitInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.round != null && Object.hasOwnProperty.call(message, "round")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.round); + if (message.votes != null && message.votes.length) + for (var i = 0; i < message.votes.length; ++i) + $root.tendermint.abci.VoteInfo.encode(message.votes[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LastCommitInfo message, length delimited. Does not implicitly {@link tendermint.abci.LastCommitInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.LastCommitInfo + * @static + * @param {tendermint.abci.ILastCommitInfo} message LastCommitInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LastCommitInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LastCommitInfo message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.LastCommitInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.LastCommitInfo} LastCommitInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LastCommitInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.LastCommitInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.round = reader.int32(); + break; + case 2: + if (!(message.votes && message.votes.length)) + message.votes = []; + message.votes.push($root.tendermint.abci.VoteInfo.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LastCommitInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.LastCommitInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.LastCommitInfo} LastCommitInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LastCommitInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LastCommitInfo message. + * @function verify + * @memberof tendermint.abci.LastCommitInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LastCommitInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.round != null && message.hasOwnProperty("round")) + if (!$util.isInteger(message.round)) + return "round: integer expected"; + if (message.votes != null && message.hasOwnProperty("votes")) { + if (!Array.isArray(message.votes)) + return "votes: array expected"; + for (var i = 0; i < message.votes.length; ++i) { + var error = $root.tendermint.abci.VoteInfo.verify(message.votes[i]); + if (error) + return "votes." + error; + } + } + return null; + }; + + /** + * Creates a LastCommitInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.LastCommitInfo + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.LastCommitInfo} LastCommitInfo + */ + LastCommitInfo.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.LastCommitInfo) + return object; + var message = new $root.tendermint.abci.LastCommitInfo(); + if (object.round != null) + message.round = object.round | 0; + if (object.votes) { + if (!Array.isArray(object.votes)) + throw TypeError(".tendermint.abci.LastCommitInfo.votes: array expected"); + message.votes = []; + for (var i = 0; i < object.votes.length; ++i) { + if (typeof object.votes[i] !== "object") + throw TypeError(".tendermint.abci.LastCommitInfo.votes: object expected"); + message.votes[i] = $root.tendermint.abci.VoteInfo.fromObject(object.votes[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a LastCommitInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.LastCommitInfo + * @static + * @param {tendermint.abci.LastCommitInfo} message LastCommitInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LastCommitInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.votes = []; + if (options.defaults) + object.round = 0; + if (message.round != null && message.hasOwnProperty("round")) + object.round = message.round; + if (message.votes && message.votes.length) { + object.votes = []; + for (var j = 0; j < message.votes.length; ++j) + object.votes[j] = $root.tendermint.abci.VoteInfo.toObject(message.votes[j], options); + } + return object; + }; + + /** + * Converts this LastCommitInfo to JSON. + * @function toJSON + * @memberof tendermint.abci.LastCommitInfo + * @instance + * @returns {Object.} JSON object + */ + LastCommitInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return LastCommitInfo; + })(abci.LastCommitInfo || {}); + + abci.Event = (function(Event) { + + /** + * Properties of an Event. + * @memberof tendermint.abci + * @interface IEvent + * @property {string|null} [type] Event type + * @property {Array.|null} [attributes] Event attributes + */ + + /** + * Constructs a new Event. + * @memberof tendermint.abci + * @classdesc Represents an Event. + * @implements IEvent + * @constructor + * @param {tendermint.abci.IEvent=} [properties] Properties to set + */ + function Event(properties) { + this.attributes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Event type. + * @member {string} type + * @memberof tendermint.abci.Event + * @instance + */ + Event.prototype.type = ""; + + /** + * Event attributes. + * @member {Array.} attributes + * @memberof tendermint.abci.Event + * @instance + */ + Event.prototype.attributes = $util.emptyArray; + + /** + * Creates a new Event instance using the specified properties. + * @function create + * @memberof tendermint.abci.Event + * @static + * @param {tendermint.abci.IEvent=} [properties] Properties to set + * @returns {tendermint.abci.Event} Event instance + */ + Event.create = function create(properties) { + return new Event(properties); + }; + + /** + * Encodes the specified Event message. Does not implicitly {@link tendermint.abci.Event.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.Event + * @static + * @param {tendermint.abci.IEvent} message Event message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Event.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.attributes != null && message.attributes.length) + for (var i = 0; i < message.attributes.length; ++i) + $root.tendermint.abci.EventAttribute.encode(message.attributes[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Event message, length delimited. Does not implicitly {@link tendermint.abci.Event.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.Event + * @static + * @param {tendermint.abci.IEvent} message Event message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Event.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Event message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.Event + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.Event} Event + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Event.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.Event(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type = reader.string(); + break; + case 2: + if (!(message.attributes && message.attributes.length)) + message.attributes = []; + message.attributes.push($root.tendermint.abci.EventAttribute.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Event message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.Event + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.Event} Event + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Event.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Event message. + * @function verify + * @memberof tendermint.abci.Event + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Event.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.attributes != null && message.hasOwnProperty("attributes")) { + if (!Array.isArray(message.attributes)) + return "attributes: array expected"; + for (var i = 0; i < message.attributes.length; ++i) { + var error = $root.tendermint.abci.EventAttribute.verify(message.attributes[i]); + if (error) + return "attributes." + error; + } + } + return null; + }; + + /** + * Creates an Event message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.Event + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.Event} Event + */ + Event.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.Event) + return object; + var message = new $root.tendermint.abci.Event(); + if (object.type != null) + message.type = String(object.type); + if (object.attributes) { + if (!Array.isArray(object.attributes)) + throw TypeError(".tendermint.abci.Event.attributes: array expected"); + message.attributes = []; + for (var i = 0; i < object.attributes.length; ++i) { + if (typeof object.attributes[i] !== "object") + throw TypeError(".tendermint.abci.Event.attributes: object expected"); + message.attributes[i] = $root.tendermint.abci.EventAttribute.fromObject(object.attributes[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an Event message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.Event + * @static + * @param {tendermint.abci.Event} message Event + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Event.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.attributes = []; + if (options.defaults) + object.type = ""; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.attributes && message.attributes.length) { + object.attributes = []; + for (var j = 0; j < message.attributes.length; ++j) + object.attributes[j] = $root.tendermint.abci.EventAttribute.toObject(message.attributes[j], options); + } + return object; + }; + + /** + * Converts this Event to JSON. + * @function toJSON + * @memberof tendermint.abci.Event + * @instance + * @returns {Object.} JSON object + */ + Event.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Event; + })(abci.Event || {}); + + abci.EventAttribute = (function(EventAttribute) { + + /** + * Properties of an EventAttribute. + * @memberof tendermint.abci + * @interface IEventAttribute + * @property {Uint8Array|null} [key] EventAttribute key + * @property {Uint8Array|null} [value] EventAttribute value + * @property {boolean|null} [index] EventAttribute index + */ + + /** + * Constructs a new EventAttribute. + * @memberof tendermint.abci + * @classdesc Represents an EventAttribute. + * @implements IEventAttribute + * @constructor + * @param {tendermint.abci.IEventAttribute=} [properties] Properties to set + */ + function EventAttribute(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EventAttribute key. + * @member {Uint8Array} key + * @memberof tendermint.abci.EventAttribute + * @instance + */ + EventAttribute.prototype.key = $util.newBuffer([]); + + /** + * EventAttribute value. + * @member {Uint8Array} value + * @memberof tendermint.abci.EventAttribute + * @instance + */ + EventAttribute.prototype.value = $util.newBuffer([]); + + /** + * EventAttribute index. + * @member {boolean} index + * @memberof tendermint.abci.EventAttribute + * @instance + */ + EventAttribute.prototype.index = false; + + /** + * Creates a new EventAttribute instance using the specified properties. + * @function create + * @memberof tendermint.abci.EventAttribute + * @static + * @param {tendermint.abci.IEventAttribute=} [properties] Properties to set + * @returns {tendermint.abci.EventAttribute} EventAttribute instance + */ + EventAttribute.create = function create(properties) { + return new EventAttribute(properties); + }; + + /** + * Encodes the specified EventAttribute message. Does not implicitly {@link tendermint.abci.EventAttribute.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.EventAttribute + * @static + * @param {tendermint.abci.IEventAttribute} message EventAttribute message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EventAttribute.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.key); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); + if (message.index != null && Object.hasOwnProperty.call(message, "index")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.index); + return writer; + }; + + /** + * Encodes the specified EventAttribute message, length delimited. Does not implicitly {@link tendermint.abci.EventAttribute.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.EventAttribute + * @static + * @param {tendermint.abci.IEventAttribute} message EventAttribute message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EventAttribute.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EventAttribute message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.EventAttribute + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.EventAttribute} EventAttribute + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EventAttribute.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.EventAttribute(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.key = reader.bytes(); + break; + case 2: + message.value = reader.bytes(); + break; + case 3: + message.index = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EventAttribute message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.EventAttribute + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.EventAttribute} EventAttribute + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EventAttribute.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EventAttribute message. + * @function verify + * @memberof tendermint.abci.EventAttribute + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EventAttribute.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.key != null && message.hasOwnProperty("key")) + if (!(message.key && typeof message.key.length === "number" || $util.isString(message.key))) + return "key: buffer expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; + if (message.index != null && message.hasOwnProperty("index")) + if (typeof message.index !== "boolean") + return "index: boolean expected"; + return null; + }; + + /** + * Creates an EventAttribute message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.EventAttribute + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.EventAttribute} EventAttribute + */ + EventAttribute.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.EventAttribute) + return object; + var message = new $root.tendermint.abci.EventAttribute(); + if (object.key != null) + if (typeof object.key === "string") + $util.base64.decode(object.key, message.key = $util.newBuffer($util.base64.length(object.key)), 0); + else if (object.key.length) + message.key = object.key; + if (object.value != null) + if (typeof object.value === "string") + $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); + else if (object.value.length) + message.value = object.value; + if (object.index != null) + message.index = Boolean(object.index); + return message; + }; + + /** + * Creates a plain object from an EventAttribute message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.EventAttribute + * @static + * @param {tendermint.abci.EventAttribute} message EventAttribute + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EventAttribute.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.key = ""; + else { + object.key = []; + if (options.bytes !== Array) + object.key = $util.newBuffer(object.key); + } + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + object.index = false; + } + if (message.key != null && message.hasOwnProperty("key")) + object.key = options.bytes === String ? $util.base64.encode(message.key, 0, message.key.length) : options.bytes === Array ? Array.prototype.slice.call(message.key) : message.key; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + if (message.index != null && message.hasOwnProperty("index")) + object.index = message.index; + return object; + }; + + /** + * Converts this EventAttribute to JSON. + * @function toJSON + * @memberof tendermint.abci.EventAttribute + * @instance + * @returns {Object.} JSON object + */ + EventAttribute.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EventAttribute; + })(abci.EventAttribute || {}); + + abci.TxResult = (function(TxResult) { + + /** + * Properties of a TxResult. + * @memberof tendermint.abci + * @interface ITxResult + * @property {number|Long|null} [height] TxResult height + * @property {number|null} [index] TxResult index + * @property {Uint8Array|null} [tx] TxResult tx + * @property {tendermint.abci.IResponseDeliverTx|null} [result] TxResult result + */ + + /** + * Constructs a new TxResult. + * @memberof tendermint.abci + * @classdesc Represents a TxResult. + * @implements ITxResult + * @constructor + * @param {tendermint.abci.ITxResult=} [properties] Properties to set + */ + function TxResult(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TxResult height. + * @member {number|Long} height + * @memberof tendermint.abci.TxResult + * @instance + */ + TxResult.prototype.height = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * TxResult index. + * @member {number} index + * @memberof tendermint.abci.TxResult + * @instance + */ + TxResult.prototype.index = 0; + + /** + * TxResult tx. + * @member {Uint8Array} tx + * @memberof tendermint.abci.TxResult + * @instance + */ + TxResult.prototype.tx = $util.newBuffer([]); + + /** + * TxResult result. + * @member {tendermint.abci.IResponseDeliverTx|null|undefined} result + * @memberof tendermint.abci.TxResult + * @instance + */ + TxResult.prototype.result = null; + + /** + * Creates a new TxResult instance using the specified properties. + * @function create + * @memberof tendermint.abci.TxResult + * @static + * @param {tendermint.abci.ITxResult=} [properties] Properties to set + * @returns {tendermint.abci.TxResult} TxResult instance + */ + TxResult.create = function create(properties) { + return new TxResult(properties); + }; + + /** + * Encodes the specified TxResult message. Does not implicitly {@link tendermint.abci.TxResult.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.TxResult + * @static + * @param {tendermint.abci.ITxResult} message TxResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TxResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.height != null && Object.hasOwnProperty.call(message, "height")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.height); + if (message.index != null && Object.hasOwnProperty.call(message, "index")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.index); + if (message.tx != null && Object.hasOwnProperty.call(message, "tx")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.tx); + if (message.result != null && Object.hasOwnProperty.call(message, "result")) + $root.tendermint.abci.ResponseDeliverTx.encode(message.result, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TxResult message, length delimited. Does not implicitly {@link tendermint.abci.TxResult.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.TxResult + * @static + * @param {tendermint.abci.ITxResult} message TxResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TxResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TxResult message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.TxResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.TxResult} TxResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TxResult.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.TxResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.height = reader.int64(); + break; + case 2: + message.index = reader.uint32(); + break; + case 3: + message.tx = reader.bytes(); + break; + case 4: + message.result = $root.tendermint.abci.ResponseDeliverTx.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TxResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.TxResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.TxResult} TxResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TxResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TxResult message. + * @function verify + * @memberof tendermint.abci.TxResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TxResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.height != null && message.hasOwnProperty("height")) + if (!$util.isInteger(message.height) && !(message.height && $util.isInteger(message.height.low) && $util.isInteger(message.height.high))) + return "height: integer|Long expected"; + if (message.index != null && message.hasOwnProperty("index")) + if (!$util.isInteger(message.index)) + return "index: integer expected"; + if (message.tx != null && message.hasOwnProperty("tx")) + if (!(message.tx && typeof message.tx.length === "number" || $util.isString(message.tx))) + return "tx: buffer expected"; + if (message.result != null && message.hasOwnProperty("result")) { + var error = $root.tendermint.abci.ResponseDeliverTx.verify(message.result); + if (error) + return "result." + error; + } + return null; + }; + + /** + * Creates a TxResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.TxResult + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.TxResult} TxResult + */ + TxResult.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.TxResult) + return object; + var message = new $root.tendermint.abci.TxResult(); + if (object.height != null) + if ($util.Long) + (message.height = $util.Long.fromValue(object.height)).unsigned = false; + else if (typeof object.height === "string") + message.height = parseInt(object.height, 10); + else if (typeof object.height === "number") + message.height = object.height; + else if (typeof object.height === "object") + message.height = new $util.LongBits(object.height.low >>> 0, object.height.high >>> 0).toNumber(); + if (object.index != null) + message.index = object.index >>> 0; + if (object.tx != null) + if (typeof object.tx === "string") + $util.base64.decode(object.tx, message.tx = $util.newBuffer($util.base64.length(object.tx)), 0); + else if (object.tx.length) + message.tx = object.tx; + if (object.result != null) { + if (typeof object.result !== "object") + throw TypeError(".tendermint.abci.TxResult.result: object expected"); + message.result = $root.tendermint.abci.ResponseDeliverTx.fromObject(object.result); + } + return message; + }; + + /** + * Creates a plain object from a TxResult message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.TxResult + * @static + * @param {tendermint.abci.TxResult} message TxResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TxResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.height = options.longs === String ? "0" : 0; + object.index = 0; + if (options.bytes === String) + object.tx = ""; + else { + object.tx = []; + if (options.bytes !== Array) + object.tx = $util.newBuffer(object.tx); + } + object.result = null; + } + if (message.height != null && message.hasOwnProperty("height")) + if (typeof message.height === "number") + object.height = options.longs === String ? String(message.height) : message.height; + else + object.height = options.longs === String ? $util.Long.prototype.toString.call(message.height) : options.longs === Number ? new $util.LongBits(message.height.low >>> 0, message.height.high >>> 0).toNumber() : message.height; + if (message.index != null && message.hasOwnProperty("index")) + object.index = message.index; + if (message.tx != null && message.hasOwnProperty("tx")) + object.tx = options.bytes === String ? $util.base64.encode(message.tx, 0, message.tx.length) : options.bytes === Array ? Array.prototype.slice.call(message.tx) : message.tx; + if (message.result != null && message.hasOwnProperty("result")) + object.result = $root.tendermint.abci.ResponseDeliverTx.toObject(message.result, options); + return object; + }; + + /** + * Converts this TxResult to JSON. + * @function toJSON + * @memberof tendermint.abci.TxResult + * @instance + * @returns {Object.} JSON object + */ + TxResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TxResult; + })(abci.TxResult || {}); + + abci.Validator = (function(Validator) { + + /** + * Properties of a Validator. + * @memberof tendermint.abci + * @interface IValidator + * @property {Uint8Array|null} [address] Validator address + * @property {number|Long|null} [power] Validator power + */ + + /** + * Constructs a new Validator. + * @memberof tendermint.abci + * @classdesc Represents a Validator. + * @implements IValidator + * @constructor + * @param {tendermint.abci.IValidator=} [properties] Properties to set + */ + function Validator(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Validator address. + * @member {Uint8Array} address + * @memberof tendermint.abci.Validator + * @instance + */ + Validator.prototype.address = $util.newBuffer([]); + + /** + * Validator power. + * @member {number|Long} power + * @memberof tendermint.abci.Validator + * @instance + */ + Validator.prototype.power = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new Validator instance using the specified properties. + * @function create + * @memberof tendermint.abci.Validator + * @static + * @param {tendermint.abci.IValidator=} [properties] Properties to set + * @returns {tendermint.abci.Validator} Validator instance + */ + Validator.create = function create(properties) { + return new Validator(properties); + }; + + /** + * Encodes the specified Validator message. Does not implicitly {@link tendermint.abci.Validator.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.Validator + * @static + * @param {tendermint.abci.IValidator} message Validator message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Validator.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.address != null && Object.hasOwnProperty.call(message, "address")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.address); + if (message.power != null && Object.hasOwnProperty.call(message, "power")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.power); + return writer; + }; + + /** + * Encodes the specified Validator message, length delimited. Does not implicitly {@link tendermint.abci.Validator.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.Validator + * @static + * @param {tendermint.abci.IValidator} message Validator message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Validator.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Validator message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.Validator + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.Validator} Validator + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Validator.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.Validator(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.address = reader.bytes(); + break; + case 3: + message.power = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Validator message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.Validator + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.Validator} Validator + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Validator.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Validator message. + * @function verify + * @memberof tendermint.abci.Validator + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Validator.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.address != null && message.hasOwnProperty("address")) + if (!(message.address && typeof message.address.length === "number" || $util.isString(message.address))) + return "address: buffer expected"; + if (message.power != null && message.hasOwnProperty("power")) + if (!$util.isInteger(message.power) && !(message.power && $util.isInteger(message.power.low) && $util.isInteger(message.power.high))) + return "power: integer|Long expected"; + return null; + }; + + /** + * Creates a Validator message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.Validator + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.Validator} Validator + */ + Validator.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.Validator) + return object; + var message = new $root.tendermint.abci.Validator(); + if (object.address != null) + if (typeof object.address === "string") + $util.base64.decode(object.address, message.address = $util.newBuffer($util.base64.length(object.address)), 0); + else if (object.address.length) + message.address = object.address; + if (object.power != null) + if ($util.Long) + (message.power = $util.Long.fromValue(object.power)).unsigned = false; + else if (typeof object.power === "string") + message.power = parseInt(object.power, 10); + else if (typeof object.power === "number") + message.power = object.power; + else if (typeof object.power === "object") + message.power = new $util.LongBits(object.power.low >>> 0, object.power.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a Validator message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.Validator + * @static + * @param {tendermint.abci.Validator} message Validator + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Validator.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.address = ""; + else { + object.address = []; + if (options.bytes !== Array) + object.address = $util.newBuffer(object.address); + } + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.power = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.power = options.longs === String ? "0" : 0; + } + if (message.address != null && message.hasOwnProperty("address")) + object.address = options.bytes === String ? $util.base64.encode(message.address, 0, message.address.length) : options.bytes === Array ? Array.prototype.slice.call(message.address) : message.address; + if (message.power != null && message.hasOwnProperty("power")) + if (typeof message.power === "number") + object.power = options.longs === String ? String(message.power) : message.power; + else + object.power = options.longs === String ? $util.Long.prototype.toString.call(message.power) : options.longs === Number ? new $util.LongBits(message.power.low >>> 0, message.power.high >>> 0).toNumber() : message.power; + return object; + }; + + /** + * Converts this Validator to JSON. + * @function toJSON + * @memberof tendermint.abci.Validator + * @instance + * @returns {Object.} JSON object + */ + Validator.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Validator; + })(abci.Validator || {}); + + abci.ValidatorUpdate = (function(ValidatorUpdate) { + + /** + * Properties of a ValidatorUpdate. + * @memberof tendermint.abci + * @interface IValidatorUpdate + * @property {tendermint.crypto.IPublicKey|null} [pubKey] ValidatorUpdate pubKey + * @property {number|Long|null} [power] ValidatorUpdate power + */ + + /** + * Constructs a new ValidatorUpdate. + * @memberof tendermint.abci + * @classdesc Represents a ValidatorUpdate. + * @implements IValidatorUpdate + * @constructor + * @param {tendermint.abci.IValidatorUpdate=} [properties] Properties to set + */ + function ValidatorUpdate(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ValidatorUpdate pubKey. + * @member {tendermint.crypto.IPublicKey|null|undefined} pubKey + * @memberof tendermint.abci.ValidatorUpdate + * @instance + */ + ValidatorUpdate.prototype.pubKey = null; + + /** + * ValidatorUpdate power. + * @member {number|Long} power + * @memberof tendermint.abci.ValidatorUpdate + * @instance + */ + ValidatorUpdate.prototype.power = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new ValidatorUpdate instance using the specified properties. + * @function create + * @memberof tendermint.abci.ValidatorUpdate + * @static + * @param {tendermint.abci.IValidatorUpdate=} [properties] Properties to set + * @returns {tendermint.abci.ValidatorUpdate} ValidatorUpdate instance + */ + ValidatorUpdate.create = function create(properties) { + return new ValidatorUpdate(properties); + }; + + /** + * Encodes the specified ValidatorUpdate message. Does not implicitly {@link tendermint.abci.ValidatorUpdate.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.ValidatorUpdate + * @static + * @param {tendermint.abci.IValidatorUpdate} message ValidatorUpdate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValidatorUpdate.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pubKey != null && Object.hasOwnProperty.call(message, "pubKey")) + $root.tendermint.crypto.PublicKey.encode(message.pubKey, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.power != null && Object.hasOwnProperty.call(message, "power")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.power); + return writer; + }; + + /** + * Encodes the specified ValidatorUpdate message, length delimited. Does not implicitly {@link tendermint.abci.ValidatorUpdate.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.ValidatorUpdate + * @static + * @param {tendermint.abci.IValidatorUpdate} message ValidatorUpdate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValidatorUpdate.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ValidatorUpdate message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.ValidatorUpdate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.ValidatorUpdate} ValidatorUpdate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValidatorUpdate.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.ValidatorUpdate(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.pubKey = $root.tendermint.crypto.PublicKey.decode(reader, reader.uint32()); + break; + case 2: + message.power = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ValidatorUpdate message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.ValidatorUpdate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.ValidatorUpdate} ValidatorUpdate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValidatorUpdate.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ValidatorUpdate message. + * @function verify + * @memberof tendermint.abci.ValidatorUpdate + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ValidatorUpdate.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.pubKey != null && message.hasOwnProperty("pubKey")) { + var error = $root.tendermint.crypto.PublicKey.verify(message.pubKey); + if (error) + return "pubKey." + error; + } + if (message.power != null && message.hasOwnProperty("power")) + if (!$util.isInteger(message.power) && !(message.power && $util.isInteger(message.power.low) && $util.isInteger(message.power.high))) + return "power: integer|Long expected"; + return null; + }; + + /** + * Creates a ValidatorUpdate message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.ValidatorUpdate + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.ValidatorUpdate} ValidatorUpdate + */ + ValidatorUpdate.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.ValidatorUpdate) + return object; + var message = new $root.tendermint.abci.ValidatorUpdate(); + if (object.pubKey != null) { + if (typeof object.pubKey !== "object") + throw TypeError(".tendermint.abci.ValidatorUpdate.pubKey: object expected"); + message.pubKey = $root.tendermint.crypto.PublicKey.fromObject(object.pubKey); + } + if (object.power != null) + if ($util.Long) + (message.power = $util.Long.fromValue(object.power)).unsigned = false; + else if (typeof object.power === "string") + message.power = parseInt(object.power, 10); + else if (typeof object.power === "number") + message.power = object.power; + else if (typeof object.power === "object") + message.power = new $util.LongBits(object.power.low >>> 0, object.power.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a ValidatorUpdate message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.ValidatorUpdate + * @static + * @param {tendermint.abci.ValidatorUpdate} message ValidatorUpdate + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ValidatorUpdate.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.pubKey = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.power = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.power = options.longs === String ? "0" : 0; + } + if (message.pubKey != null && message.hasOwnProperty("pubKey")) + object.pubKey = $root.tendermint.crypto.PublicKey.toObject(message.pubKey, options); + if (message.power != null && message.hasOwnProperty("power")) + if (typeof message.power === "number") + object.power = options.longs === String ? String(message.power) : message.power; + else + object.power = options.longs === String ? $util.Long.prototype.toString.call(message.power) : options.longs === Number ? new $util.LongBits(message.power.low >>> 0, message.power.high >>> 0).toNumber() : message.power; + return object; + }; + + /** + * Converts this ValidatorUpdate to JSON. + * @function toJSON + * @memberof tendermint.abci.ValidatorUpdate + * @instance + * @returns {Object.} JSON object + */ + ValidatorUpdate.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ValidatorUpdate; + })(abci.ValidatorUpdate || {}); + + abci.VoteInfo = (function(VoteInfo) { + + /** + * Properties of a VoteInfo. + * @memberof tendermint.abci + * @interface IVoteInfo + * @property {tendermint.abci.IValidator|null} [validator] VoteInfo validator + * @property {boolean|null} [signedLastBlock] VoteInfo signedLastBlock + */ + + /** + * Constructs a new VoteInfo. + * @memberof tendermint.abci + * @classdesc Represents a VoteInfo. + * @implements IVoteInfo + * @constructor + * @param {tendermint.abci.IVoteInfo=} [properties] Properties to set + */ + function VoteInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * VoteInfo validator. + * @member {tendermint.abci.IValidator|null|undefined} validator + * @memberof tendermint.abci.VoteInfo + * @instance + */ + VoteInfo.prototype.validator = null; + + /** + * VoteInfo signedLastBlock. + * @member {boolean} signedLastBlock + * @memberof tendermint.abci.VoteInfo + * @instance + */ + VoteInfo.prototype.signedLastBlock = false; + + /** + * Creates a new VoteInfo instance using the specified properties. + * @function create + * @memberof tendermint.abci.VoteInfo + * @static + * @param {tendermint.abci.IVoteInfo=} [properties] Properties to set + * @returns {tendermint.abci.VoteInfo} VoteInfo instance + */ + VoteInfo.create = function create(properties) { + return new VoteInfo(properties); + }; + + /** + * Encodes the specified VoteInfo message. Does not implicitly {@link tendermint.abci.VoteInfo.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.VoteInfo + * @static + * @param {tendermint.abci.IVoteInfo} message VoteInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VoteInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.validator != null && Object.hasOwnProperty.call(message, "validator")) + $root.tendermint.abci.Validator.encode(message.validator, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.signedLastBlock != null && Object.hasOwnProperty.call(message, "signedLastBlock")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.signedLastBlock); + return writer; + }; + + /** + * Encodes the specified VoteInfo message, length delimited. Does not implicitly {@link tendermint.abci.VoteInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.VoteInfo + * @static + * @param {tendermint.abci.IVoteInfo} message VoteInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VoteInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VoteInfo message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.VoteInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.VoteInfo} VoteInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VoteInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.VoteInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.validator = $root.tendermint.abci.Validator.decode(reader, reader.uint32()); + break; + case 2: + message.signedLastBlock = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VoteInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.VoteInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.VoteInfo} VoteInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VoteInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VoteInfo message. + * @function verify + * @memberof tendermint.abci.VoteInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VoteInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.validator != null && message.hasOwnProperty("validator")) { + var error = $root.tendermint.abci.Validator.verify(message.validator); + if (error) + return "validator." + error; + } + if (message.signedLastBlock != null && message.hasOwnProperty("signedLastBlock")) + if (typeof message.signedLastBlock !== "boolean") + return "signedLastBlock: boolean expected"; + return null; + }; + + /** + * Creates a VoteInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.VoteInfo + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.VoteInfo} VoteInfo + */ + VoteInfo.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.VoteInfo) + return object; + var message = new $root.tendermint.abci.VoteInfo(); + if (object.validator != null) { + if (typeof object.validator !== "object") + throw TypeError(".tendermint.abci.VoteInfo.validator: object expected"); + message.validator = $root.tendermint.abci.Validator.fromObject(object.validator); + } + if (object.signedLastBlock != null) + message.signedLastBlock = Boolean(object.signedLastBlock); + return message; + }; + + /** + * Creates a plain object from a VoteInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.VoteInfo + * @static + * @param {tendermint.abci.VoteInfo} message VoteInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VoteInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.validator = null; + object.signedLastBlock = false; + } + if (message.validator != null && message.hasOwnProperty("validator")) + object.validator = $root.tendermint.abci.Validator.toObject(message.validator, options); + if (message.signedLastBlock != null && message.hasOwnProperty("signedLastBlock")) + object.signedLastBlock = message.signedLastBlock; + return object; + }; + + /** + * Converts this VoteInfo to JSON. + * @function toJSON + * @memberof tendermint.abci.VoteInfo + * @instance + * @returns {Object.} JSON object + */ + VoteInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return VoteInfo; + })(abci.VoteInfo || {}); + + /** + * EvidenceType enum. + * @name tendermint.abci.EvidenceType + * @enum {string} + * @property {number} UNKNOWN=0 UNKNOWN value + * @property {number} DUPLICATE_VOTE=1 DUPLICATE_VOTE value + * @property {number} LIGHT_CLIENT_ATTACK=2 LIGHT_CLIENT_ATTACK value + */ + abci.EvidenceType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNKNOWN"] = 0; + values[valuesById[1] = "DUPLICATE_VOTE"] = 1; + values[valuesById[2] = "LIGHT_CLIENT_ATTACK"] = 2; + return values; + })(); + + abci.Evidence = (function(Evidence) { + + /** + * Properties of an Evidence. + * @memberof tendermint.abci + * @interface IEvidence + * @property {tendermint.abci.EvidenceType|null} [type] Evidence type + * @property {tendermint.abci.IValidator|null} [validator] Evidence validator + * @property {number|Long|null} [height] Evidence height + * @property {google.protobuf.ITimestamp|null} [time] Evidence time + * @property {number|Long|null} [totalVotingPower] Evidence totalVotingPower + */ + + /** + * Constructs a new Evidence. + * @memberof tendermint.abci + * @classdesc Represents an Evidence. + * @implements IEvidence + * @constructor + * @param {tendermint.abci.IEvidence=} [properties] Properties to set + */ + function Evidence(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Evidence type. + * @member {tendermint.abci.EvidenceType} type + * @memberof tendermint.abci.Evidence + * @instance + */ + Evidence.prototype.type = 0; + + /** + * Evidence validator. + * @member {tendermint.abci.IValidator|null|undefined} validator + * @memberof tendermint.abci.Evidence + * @instance + */ + Evidence.prototype.validator = null; + + /** + * Evidence height. + * @member {number|Long} height + * @memberof tendermint.abci.Evidence + * @instance + */ + Evidence.prototype.height = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Evidence time. + * @member {google.protobuf.ITimestamp|null|undefined} time + * @memberof tendermint.abci.Evidence + * @instance + */ + Evidence.prototype.time = null; + + /** + * Evidence totalVotingPower. + * @member {number|Long} totalVotingPower + * @memberof tendermint.abci.Evidence + * @instance + */ + Evidence.prototype.totalVotingPower = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new Evidence instance using the specified properties. + * @function create + * @memberof tendermint.abci.Evidence + * @static + * @param {tendermint.abci.IEvidence=} [properties] Properties to set + * @returns {tendermint.abci.Evidence} Evidence instance + */ + Evidence.create = function create(properties) { + return new Evidence(properties); + }; + + /** + * Encodes the specified Evidence message. Does not implicitly {@link tendermint.abci.Evidence.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.Evidence + * @static + * @param {tendermint.abci.IEvidence} message Evidence message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Evidence.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); + if (message.validator != null && Object.hasOwnProperty.call(message, "validator")) + $root.tendermint.abci.Validator.encode(message.validator, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.height != null && Object.hasOwnProperty.call(message, "height")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.height); + if (message.time != null && Object.hasOwnProperty.call(message, "time")) + $root.google.protobuf.Timestamp.encode(message.time, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.totalVotingPower != null && Object.hasOwnProperty.call(message, "totalVotingPower")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.totalVotingPower); + return writer; + }; + + /** + * Encodes the specified Evidence message, length delimited. Does not implicitly {@link tendermint.abci.Evidence.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.Evidence + * @static + * @param {tendermint.abci.IEvidence} message Evidence message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Evidence.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Evidence message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.Evidence + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.Evidence} Evidence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Evidence.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.Evidence(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type = reader.int32(); + break; + case 2: + message.validator = $root.tendermint.abci.Validator.decode(reader, reader.uint32()); + break; + case 3: + message.height = reader.int64(); + break; + case 4: + message.time = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 5: + message.totalVotingPower = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Evidence message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.Evidence + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.Evidence} Evidence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Evidence.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Evidence message. + * @function verify + * @memberof tendermint.abci.Evidence + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Evidence.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.validator != null && message.hasOwnProperty("validator")) { + var error = $root.tendermint.abci.Validator.verify(message.validator); + if (error) + return "validator." + error; + } + if (message.height != null && message.hasOwnProperty("height")) + if (!$util.isInteger(message.height) && !(message.height && $util.isInteger(message.height.low) && $util.isInteger(message.height.high))) + return "height: integer|Long expected"; + if (message.time != null && message.hasOwnProperty("time")) { + var error = $root.google.protobuf.Timestamp.verify(message.time); + if (error) + return "time." + error; + } + if (message.totalVotingPower != null && message.hasOwnProperty("totalVotingPower")) + if (!$util.isInteger(message.totalVotingPower) && !(message.totalVotingPower && $util.isInteger(message.totalVotingPower.low) && $util.isInteger(message.totalVotingPower.high))) + return "totalVotingPower: integer|Long expected"; + return null; + }; + + /** + * Creates an Evidence message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.Evidence + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.Evidence} Evidence + */ + Evidence.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.Evidence) + return object; + var message = new $root.tendermint.abci.Evidence(); + switch (object.type) { + case "UNKNOWN": + case 0: + message.type = 0; + break; + case "DUPLICATE_VOTE": + case 1: + message.type = 1; + break; + case "LIGHT_CLIENT_ATTACK": + case 2: + message.type = 2; + break; + } + if (object.validator != null) { + if (typeof object.validator !== "object") + throw TypeError(".tendermint.abci.Evidence.validator: object expected"); + message.validator = $root.tendermint.abci.Validator.fromObject(object.validator); + } + if (object.height != null) + if ($util.Long) + (message.height = $util.Long.fromValue(object.height)).unsigned = false; + else if (typeof object.height === "string") + message.height = parseInt(object.height, 10); + else if (typeof object.height === "number") + message.height = object.height; + else if (typeof object.height === "object") + message.height = new $util.LongBits(object.height.low >>> 0, object.height.high >>> 0).toNumber(); + if (object.time != null) { + if (typeof object.time !== "object") + throw TypeError(".tendermint.abci.Evidence.time: object expected"); + message.time = $root.google.protobuf.Timestamp.fromObject(object.time); + } + if (object.totalVotingPower != null) + if ($util.Long) + (message.totalVotingPower = $util.Long.fromValue(object.totalVotingPower)).unsigned = false; + else if (typeof object.totalVotingPower === "string") + message.totalVotingPower = parseInt(object.totalVotingPower, 10); + else if (typeof object.totalVotingPower === "number") + message.totalVotingPower = object.totalVotingPower; + else if (typeof object.totalVotingPower === "object") + message.totalVotingPower = new $util.LongBits(object.totalVotingPower.low >>> 0, object.totalVotingPower.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from an Evidence message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.Evidence + * @static + * @param {tendermint.abci.Evidence} message Evidence + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Evidence.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = options.enums === String ? "UNKNOWN" : 0; + object.validator = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.height = options.longs === String ? "0" : 0; + object.time = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.totalVotingPower = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.totalVotingPower = options.longs === String ? "0" : 0; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.tendermint.abci.EvidenceType[message.type] : message.type; + if (message.validator != null && message.hasOwnProperty("validator")) + object.validator = $root.tendermint.abci.Validator.toObject(message.validator, options); + if (message.height != null && message.hasOwnProperty("height")) + if (typeof message.height === "number") + object.height = options.longs === String ? String(message.height) : message.height; + else + object.height = options.longs === String ? $util.Long.prototype.toString.call(message.height) : options.longs === Number ? new $util.LongBits(message.height.low >>> 0, message.height.high >>> 0).toNumber() : message.height; + if (message.time != null && message.hasOwnProperty("time")) + object.time = $root.google.protobuf.Timestamp.toObject(message.time, options); + if (message.totalVotingPower != null && message.hasOwnProperty("totalVotingPower")) + if (typeof message.totalVotingPower === "number") + object.totalVotingPower = options.longs === String ? String(message.totalVotingPower) : message.totalVotingPower; + else + object.totalVotingPower = options.longs === String ? $util.Long.prototype.toString.call(message.totalVotingPower) : options.longs === Number ? new $util.LongBits(message.totalVotingPower.low >>> 0, message.totalVotingPower.high >>> 0).toNumber() : message.totalVotingPower; + return object; + }; + + /** + * Converts this Evidence to JSON. + * @function toJSON + * @memberof tendermint.abci.Evidence + * @instance + * @returns {Object.} JSON object + */ + Evidence.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Evidence; + })(abci.Evidence || {}); + + abci.Snapshot = (function(Snapshot) { + + /** + * Properties of a Snapshot. + * @memberof tendermint.abci + * @interface ISnapshot + * @property {number|Long|null} [height] Snapshot height + * @property {number|null} [format] Snapshot format + * @property {number|null} [chunks] Snapshot chunks + * @property {Uint8Array|null} [hash] Snapshot hash + * @property {Uint8Array|null} [metadata] Snapshot metadata + */ + + /** + * Constructs a new Snapshot. + * @memberof tendermint.abci + * @classdesc Represents a Snapshot. + * @implements ISnapshot + * @constructor + * @param {tendermint.abci.ISnapshot=} [properties] Properties to set + */ + function Snapshot(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Snapshot height. + * @member {number|Long} height + * @memberof tendermint.abci.Snapshot + * @instance + */ + Snapshot.prototype.height = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Snapshot format. + * @member {number} format + * @memberof tendermint.abci.Snapshot + * @instance + */ + Snapshot.prototype.format = 0; + + /** + * Snapshot chunks. + * @member {number} chunks + * @memberof tendermint.abci.Snapshot + * @instance + */ + Snapshot.prototype.chunks = 0; + + /** + * Snapshot hash. + * @member {Uint8Array} hash + * @memberof tendermint.abci.Snapshot + * @instance + */ + Snapshot.prototype.hash = $util.newBuffer([]); + + /** + * Snapshot metadata. + * @member {Uint8Array} metadata + * @memberof tendermint.abci.Snapshot + * @instance + */ + Snapshot.prototype.metadata = $util.newBuffer([]); + + /** + * Creates a new Snapshot instance using the specified properties. + * @function create + * @memberof tendermint.abci.Snapshot + * @static + * @param {tendermint.abci.ISnapshot=} [properties] Properties to set + * @returns {tendermint.abci.Snapshot} Snapshot instance + */ + Snapshot.create = function create(properties) { + return new Snapshot(properties); + }; + + /** + * Encodes the specified Snapshot message. Does not implicitly {@link tendermint.abci.Snapshot.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.Snapshot + * @static + * @param {tendermint.abci.ISnapshot} message Snapshot message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Snapshot.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.height != null && Object.hasOwnProperty.call(message, "height")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.height); + if (message.format != null && Object.hasOwnProperty.call(message, "format")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.format); + if (message.chunks != null && Object.hasOwnProperty.call(message, "chunks")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.chunks); + if (message.hash != null && Object.hasOwnProperty.call(message, "hash")) + writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.hash); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.metadata); + return writer; + }; + + /** + * Encodes the specified Snapshot message, length delimited. Does not implicitly {@link tendermint.abci.Snapshot.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.Snapshot + * @static + * @param {tendermint.abci.ISnapshot} message Snapshot message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Snapshot.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Snapshot message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.Snapshot + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.Snapshot} Snapshot + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Snapshot.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.Snapshot(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.height = reader.uint64(); + break; + case 2: + message.format = reader.uint32(); + break; + case 3: + message.chunks = reader.uint32(); + break; + case 4: + message.hash = reader.bytes(); + break; + case 5: + message.metadata = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Snapshot message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.Snapshot + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.Snapshot} Snapshot + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Snapshot.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Snapshot message. + * @function verify + * @memberof tendermint.abci.Snapshot + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Snapshot.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.height != null && message.hasOwnProperty("height")) + if (!$util.isInteger(message.height) && !(message.height && $util.isInteger(message.height.low) && $util.isInteger(message.height.high))) + return "height: integer|Long expected"; + if (message.format != null && message.hasOwnProperty("format")) + if (!$util.isInteger(message.format)) + return "format: integer expected"; + if (message.chunks != null && message.hasOwnProperty("chunks")) + if (!$util.isInteger(message.chunks)) + return "chunks: integer expected"; + if (message.hash != null && message.hasOwnProperty("hash")) + if (!(message.hash && typeof message.hash.length === "number" || $util.isString(message.hash))) + return "hash: buffer expected"; + if (message.metadata != null && message.hasOwnProperty("metadata")) + if (!(message.metadata && typeof message.metadata.length === "number" || $util.isString(message.metadata))) + return "metadata: buffer expected"; + return null; + }; + + /** + * Creates a Snapshot message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.Snapshot + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.Snapshot} Snapshot + */ + Snapshot.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.Snapshot) + return object; + var message = new $root.tendermint.abci.Snapshot(); + if (object.height != null) + if ($util.Long) + (message.height = $util.Long.fromValue(object.height)).unsigned = true; + else if (typeof object.height === "string") + message.height = parseInt(object.height, 10); + else if (typeof object.height === "number") + message.height = object.height; + else if (typeof object.height === "object") + message.height = new $util.LongBits(object.height.low >>> 0, object.height.high >>> 0).toNumber(true); + if (object.format != null) + message.format = object.format >>> 0; + if (object.chunks != null) + message.chunks = object.chunks >>> 0; + if (object.hash != null) + if (typeof object.hash === "string") + $util.base64.decode(object.hash, message.hash = $util.newBuffer($util.base64.length(object.hash)), 0); + else if (object.hash.length) + message.hash = object.hash; + if (object.metadata != null) + if (typeof object.metadata === "string") + $util.base64.decode(object.metadata, message.metadata = $util.newBuffer($util.base64.length(object.metadata)), 0); + else if (object.metadata.length) + message.metadata = object.metadata; + return message; + }; + + /** + * Creates a plain object from a Snapshot message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.Snapshot + * @static + * @param {tendermint.abci.Snapshot} message Snapshot + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Snapshot.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.height = options.longs === String ? "0" : 0; + object.format = 0; + object.chunks = 0; + if (options.bytes === String) + object.hash = ""; + else { + object.hash = []; + if (options.bytes !== Array) + object.hash = $util.newBuffer(object.hash); + } + if (options.bytes === String) + object.metadata = ""; + else { + object.metadata = []; + if (options.bytes !== Array) + object.metadata = $util.newBuffer(object.metadata); + } + } + if (message.height != null && message.hasOwnProperty("height")) + if (typeof message.height === "number") + object.height = options.longs === String ? String(message.height) : message.height; + else + object.height = options.longs === String ? $util.Long.prototype.toString.call(message.height) : options.longs === Number ? new $util.LongBits(message.height.low >>> 0, message.height.high >>> 0).toNumber(true) : message.height; + if (message.format != null && message.hasOwnProperty("format")) + object.format = message.format; + if (message.chunks != null && message.hasOwnProperty("chunks")) + object.chunks = message.chunks; + if (message.hash != null && message.hasOwnProperty("hash")) + object.hash = options.bytes === String ? $util.base64.encode(message.hash, 0, message.hash.length) : options.bytes === Array ? Array.prototype.slice.call(message.hash) : message.hash; + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = options.bytes === String ? $util.base64.encode(message.metadata, 0, message.metadata.length) : options.bytes === Array ? Array.prototype.slice.call(message.metadata) : message.metadata; + return object; + }; + + /** + * Converts this Snapshot to JSON. + * @function toJSON + * @memberof tendermint.abci.Snapshot + * @instance + * @returns {Object.} JSON object + */ + Snapshot.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Snapshot; + })(abci.Snapshot || {}); + + abci.ABCIApplication = (function(ABCIApplication) { + + /** + * Constructs a new ABCIApplication service. + * @memberof tendermint.abci + * @classdesc Represents a ABCIApplication + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function ABCIApplication(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (ABCIApplication.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ABCIApplication; + + /** + * Creates new ABCIApplication service using the specified rpc implementation. + * @function create + * @memberof tendermint.abci.ABCIApplication + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {ABCIApplication} RPC service. Useful where requests and/or responses are streamed. + */ + ABCIApplication.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link tendermint.abci.ABCIApplication#echo}. + * @memberof tendermint.abci.ABCIApplication + * @typedef EchoCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {tendermint.abci.IResponseEcho} [response] ResponseEcho + */ + + /** + * Calls Echo. + * @function echo + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestEcho} request RequestEcho message or plain object + * @param {tendermint.abci.ABCIApplication.EchoCallback} callback Node-style callback called with the error, if any, and ResponseEcho + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ABCIApplication.prototype.echo = function echo(request, callback) { + return this.rpcCall(echo, $root.tendermint.abci.RequestEcho, $root.tendermint.abci.ResponseEcho, request, callback); + }, "name", { value: "Echo" }); + + /** + * Calls Echo. + * @function echo + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestEcho} request RequestEcho message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link tendermint.abci.ABCIApplication#flush}. + * @memberof tendermint.abci.ABCIApplication + * @typedef FlushCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {tendermint.abci.IResponseFlush} [response] ResponseFlush + */ + + /** + * Calls Flush. + * @function flush + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestFlush} request RequestFlush message or plain object + * @param {tendermint.abci.ABCIApplication.FlushCallback} callback Node-style callback called with the error, if any, and ResponseFlush + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ABCIApplication.prototype.flush = function flush(request, callback) { + return this.rpcCall(flush, $root.tendermint.abci.RequestFlush, $root.tendermint.abci.ResponseFlush, request, callback); + }, "name", { value: "Flush" }); + + /** + * Calls Flush. + * @function flush + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestFlush} request RequestFlush message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link tendermint.abci.ABCIApplication#info}. + * @memberof tendermint.abci.ABCIApplication + * @typedef InfoCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {tendermint.abci.IResponseInfo} [response] ResponseInfo + */ + + /** + * Calls Info. + * @function info + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestInfo} request RequestInfo message or plain object + * @param {tendermint.abci.ABCIApplication.InfoCallback} callback Node-style callback called with the error, if any, and ResponseInfo + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ABCIApplication.prototype.info = function info(request, callback) { + return this.rpcCall(info, $root.tendermint.abci.RequestInfo, $root.tendermint.abci.ResponseInfo, request, callback); + }, "name", { value: "Info" }); + + /** + * Calls Info. + * @function info + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestInfo} request RequestInfo message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link tendermint.abci.ABCIApplication#setOption}. + * @memberof tendermint.abci.ABCIApplication + * @typedef SetOptionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {tendermint.abci.IResponseSetOption} [response] ResponseSetOption + */ + + /** + * Calls SetOption. + * @function setOption + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestSetOption} request RequestSetOption message or plain object + * @param {tendermint.abci.ABCIApplication.SetOptionCallback} callback Node-style callback called with the error, if any, and ResponseSetOption + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ABCIApplication.prototype.setOption = function setOption(request, callback) { + return this.rpcCall(setOption, $root.tendermint.abci.RequestSetOption, $root.tendermint.abci.ResponseSetOption, request, callback); + }, "name", { value: "SetOption" }); + + /** + * Calls SetOption. + * @function setOption + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestSetOption} request RequestSetOption message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link tendermint.abci.ABCIApplication#deliverTx}. + * @memberof tendermint.abci.ABCIApplication + * @typedef DeliverTxCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {tendermint.abci.IResponseDeliverTx} [response] ResponseDeliverTx + */ + + /** + * Calls DeliverTx. + * @function deliverTx + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestDeliverTx} request RequestDeliverTx message or plain object + * @param {tendermint.abci.ABCIApplication.DeliverTxCallback} callback Node-style callback called with the error, if any, and ResponseDeliverTx + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ABCIApplication.prototype.deliverTx = function deliverTx(request, callback) { + return this.rpcCall(deliverTx, $root.tendermint.abci.RequestDeliverTx, $root.tendermint.abci.ResponseDeliverTx, request, callback); + }, "name", { value: "DeliverTx" }); + + /** + * Calls DeliverTx. + * @function deliverTx + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestDeliverTx} request RequestDeliverTx message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link tendermint.abci.ABCIApplication#checkTx}. + * @memberof tendermint.abci.ABCIApplication + * @typedef CheckTxCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {tendermint.abci.IResponseCheckTx} [response] ResponseCheckTx + */ + + /** + * Calls CheckTx. + * @function checkTx + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestCheckTx} request RequestCheckTx message or plain object + * @param {tendermint.abci.ABCIApplication.CheckTxCallback} callback Node-style callback called with the error, if any, and ResponseCheckTx + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ABCIApplication.prototype.checkTx = function checkTx(request, callback) { + return this.rpcCall(checkTx, $root.tendermint.abci.RequestCheckTx, $root.tendermint.abci.ResponseCheckTx, request, callback); + }, "name", { value: "CheckTx" }); + + /** + * Calls CheckTx. + * @function checkTx + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestCheckTx} request RequestCheckTx message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link tendermint.abci.ABCIApplication#query}. + * @memberof tendermint.abci.ABCIApplication + * @typedef QueryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {tendermint.abci.IResponseQuery} [response] ResponseQuery + */ + + /** + * Calls Query. + * @function query + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestQuery} request RequestQuery message or plain object + * @param {tendermint.abci.ABCIApplication.QueryCallback} callback Node-style callback called with the error, if any, and ResponseQuery + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ABCIApplication.prototype.query = function query(request, callback) { + return this.rpcCall(query, $root.tendermint.abci.RequestQuery, $root.tendermint.abci.ResponseQuery, request, callback); + }, "name", { value: "Query" }); + + /** + * Calls Query. + * @function query + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestQuery} request RequestQuery message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link tendermint.abci.ABCIApplication#commit}. + * @memberof tendermint.abci.ABCIApplication + * @typedef CommitCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {tendermint.abci.IResponseCommit} [response] ResponseCommit + */ + + /** + * Calls Commit. + * @function commit + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestCommit} request RequestCommit message or plain object + * @param {tendermint.abci.ABCIApplication.CommitCallback} callback Node-style callback called with the error, if any, and ResponseCommit + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ABCIApplication.prototype.commit = function commit(request, callback) { + return this.rpcCall(commit, $root.tendermint.abci.RequestCommit, $root.tendermint.abci.ResponseCommit, request, callback); + }, "name", { value: "Commit" }); + + /** + * Calls Commit. + * @function commit + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestCommit} request RequestCommit message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link tendermint.abci.ABCIApplication#initChain}. + * @memberof tendermint.abci.ABCIApplication + * @typedef InitChainCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {tendermint.abci.IResponseInitChain} [response] ResponseInitChain + */ + + /** + * Calls InitChain. + * @function initChain + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestInitChain} request RequestInitChain message or plain object + * @param {tendermint.abci.ABCIApplication.InitChainCallback} callback Node-style callback called with the error, if any, and ResponseInitChain + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ABCIApplication.prototype.initChain = function initChain(request, callback) { + return this.rpcCall(initChain, $root.tendermint.abci.RequestInitChain, $root.tendermint.abci.ResponseInitChain, request, callback); + }, "name", { value: "InitChain" }); + + /** + * Calls InitChain. + * @function initChain + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestInitChain} request RequestInitChain message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link tendermint.abci.ABCIApplication#beginBlock}. + * @memberof tendermint.abci.ABCIApplication + * @typedef BeginBlockCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {tendermint.abci.IResponseBeginBlock} [response] ResponseBeginBlock + */ + + /** + * Calls BeginBlock. + * @function beginBlock + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestBeginBlock} request RequestBeginBlock message or plain object + * @param {tendermint.abci.ABCIApplication.BeginBlockCallback} callback Node-style callback called with the error, if any, and ResponseBeginBlock + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ABCIApplication.prototype.beginBlock = function beginBlock(request, callback) { + return this.rpcCall(beginBlock, $root.tendermint.abci.RequestBeginBlock, $root.tendermint.abci.ResponseBeginBlock, request, callback); + }, "name", { value: "BeginBlock" }); + + /** + * Calls BeginBlock. + * @function beginBlock + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestBeginBlock} request RequestBeginBlock message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link tendermint.abci.ABCIApplication#endBlock}. + * @memberof tendermint.abci.ABCIApplication + * @typedef EndBlockCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {tendermint.abci.IResponseEndBlock} [response] ResponseEndBlock + */ + + /** + * Calls EndBlock. + * @function endBlock + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestEndBlock} request RequestEndBlock message or plain object + * @param {tendermint.abci.ABCIApplication.EndBlockCallback} callback Node-style callback called with the error, if any, and ResponseEndBlock + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ABCIApplication.prototype.endBlock = function endBlock(request, callback) { + return this.rpcCall(endBlock, $root.tendermint.abci.RequestEndBlock, $root.tendermint.abci.ResponseEndBlock, request, callback); + }, "name", { value: "EndBlock" }); + + /** + * Calls EndBlock. + * @function endBlock + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestEndBlock} request RequestEndBlock message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link tendermint.abci.ABCIApplication#listSnapshots}. + * @memberof tendermint.abci.ABCIApplication + * @typedef ListSnapshotsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {tendermint.abci.IResponseListSnapshots} [response] ResponseListSnapshots + */ + + /** + * Calls ListSnapshots. + * @function listSnapshots + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestListSnapshots} request RequestListSnapshots message or plain object + * @param {tendermint.abci.ABCIApplication.ListSnapshotsCallback} callback Node-style callback called with the error, if any, and ResponseListSnapshots + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ABCIApplication.prototype.listSnapshots = function listSnapshots(request, callback) { + return this.rpcCall(listSnapshots, $root.tendermint.abci.RequestListSnapshots, $root.tendermint.abci.ResponseListSnapshots, request, callback); + }, "name", { value: "ListSnapshots" }); + + /** + * Calls ListSnapshots. + * @function listSnapshots + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestListSnapshots} request RequestListSnapshots message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link tendermint.abci.ABCIApplication#offerSnapshot}. + * @memberof tendermint.abci.ABCIApplication + * @typedef OfferSnapshotCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {tendermint.abci.IResponseOfferSnapshot} [response] ResponseOfferSnapshot + */ + + /** + * Calls OfferSnapshot. + * @function offerSnapshot + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestOfferSnapshot} request RequestOfferSnapshot message or plain object + * @param {tendermint.abci.ABCIApplication.OfferSnapshotCallback} callback Node-style callback called with the error, if any, and ResponseOfferSnapshot + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ABCIApplication.prototype.offerSnapshot = function offerSnapshot(request, callback) { + return this.rpcCall(offerSnapshot, $root.tendermint.abci.RequestOfferSnapshot, $root.tendermint.abci.ResponseOfferSnapshot, request, callback); + }, "name", { value: "OfferSnapshot" }); + + /** + * Calls OfferSnapshot. + * @function offerSnapshot + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestOfferSnapshot} request RequestOfferSnapshot message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link tendermint.abci.ABCIApplication#loadSnapshotChunk}. + * @memberof tendermint.abci.ABCIApplication + * @typedef LoadSnapshotChunkCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {tendermint.abci.IResponseLoadSnapshotChunk} [response] ResponseLoadSnapshotChunk + */ + + /** + * Calls LoadSnapshotChunk. + * @function loadSnapshotChunk + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestLoadSnapshotChunk} request RequestLoadSnapshotChunk message or plain object + * @param {tendermint.abci.ABCIApplication.LoadSnapshotChunkCallback} callback Node-style callback called with the error, if any, and ResponseLoadSnapshotChunk + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ABCIApplication.prototype.loadSnapshotChunk = function loadSnapshotChunk(request, callback) { + return this.rpcCall(loadSnapshotChunk, $root.tendermint.abci.RequestLoadSnapshotChunk, $root.tendermint.abci.ResponseLoadSnapshotChunk, request, callback); + }, "name", { value: "LoadSnapshotChunk" }); + + /** + * Calls LoadSnapshotChunk. + * @function loadSnapshotChunk + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestLoadSnapshotChunk} request RequestLoadSnapshotChunk message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link tendermint.abci.ABCIApplication#applySnapshotChunk}. + * @memberof tendermint.abci.ABCIApplication + * @typedef ApplySnapshotChunkCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {tendermint.abci.IResponseApplySnapshotChunk} [response] ResponseApplySnapshotChunk + */ + + /** + * Calls ApplySnapshotChunk. + * @function applySnapshotChunk + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestApplySnapshotChunk} request RequestApplySnapshotChunk message or plain object + * @param {tendermint.abci.ABCIApplication.ApplySnapshotChunkCallback} callback Node-style callback called with the error, if any, and ResponseApplySnapshotChunk + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ABCIApplication.prototype.applySnapshotChunk = function applySnapshotChunk(request, callback) { + return this.rpcCall(applySnapshotChunk, $root.tendermint.abci.RequestApplySnapshotChunk, $root.tendermint.abci.ResponseApplySnapshotChunk, request, callback); + }, "name", { value: "ApplySnapshotChunk" }); + + /** + * Calls ApplySnapshotChunk. + * @function applySnapshotChunk + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestApplySnapshotChunk} request RequestApplySnapshotChunk message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return ABCIApplication; + })(abci.ABCIApplication || {}); + + return abci; + })(tendermint.abci || {}); + + /** + * Namespace crypto. + * @memberof tendermint + * @namespace + */ + + tendermint.crypto = (function(crypto) { + + crypto.PublicKey = (function(PublicKey) { + + /** + * Properties of a PublicKey. + * @memberof tendermint.crypto + * @interface IPublicKey + * @property {Uint8Array|null} [ed25519] PublicKey ed25519 + * @property {Uint8Array|null} [secp256k1] PublicKey secp256k1 + */ + + /** + * Constructs a new PublicKey. + * @memberof tendermint.crypto + * @classdesc Represents a PublicKey. + * @implements IPublicKey + * @constructor + * @param {tendermint.crypto.IPublicKey=} [properties] Properties to set + */ + function PublicKey(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PublicKey ed25519. + * @member {Uint8Array} ed25519 + * @memberof tendermint.crypto.PublicKey + * @instance + */ + PublicKey.prototype.ed25519 = $util.newBuffer([]); + + /** + * PublicKey secp256k1. + * @member {Uint8Array} secp256k1 + * @memberof tendermint.crypto.PublicKey + * @instance + */ + PublicKey.prototype.secp256k1 = $util.newBuffer([]); + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * PublicKey sum. + * @member {"ed25519"|"secp256k1"|undefined} sum + * @memberof tendermint.crypto.PublicKey + * @instance + */ + Object.defineProperty(PublicKey.prototype, "sum", { + get: $util.oneOfGetter($oneOfFields = ["ed25519", "secp256k1"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new PublicKey instance using the specified properties. + * @function create + * @memberof tendermint.crypto.PublicKey + * @static + * @param {tendermint.crypto.IPublicKey=} [properties] Properties to set + * @returns {tendermint.crypto.PublicKey} PublicKey instance + */ + PublicKey.create = function create(properties) { + return new PublicKey(properties); + }; + + /** + * Encodes the specified PublicKey message. Does not implicitly {@link tendermint.crypto.PublicKey.verify|verify} messages. + * @function encode + * @memberof tendermint.crypto.PublicKey + * @static + * @param {tendermint.crypto.IPublicKey} message PublicKey message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PublicKey.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ed25519 != null && Object.hasOwnProperty.call(message, "ed25519")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.ed25519); + if (message.secp256k1 != null && Object.hasOwnProperty.call(message, "secp256k1")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.secp256k1); + return writer; + }; + + /** + * Encodes the specified PublicKey message, length delimited. Does not implicitly {@link tendermint.crypto.PublicKey.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.crypto.PublicKey + * @static + * @param {tendermint.crypto.IPublicKey} message PublicKey message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PublicKey.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PublicKey message from the specified reader or buffer. + * @function decode + * @memberof tendermint.crypto.PublicKey + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.crypto.PublicKey} PublicKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PublicKey.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.crypto.PublicKey(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.ed25519 = reader.bytes(); + break; + case 2: + message.secp256k1 = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PublicKey message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.crypto.PublicKey + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.crypto.PublicKey} PublicKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PublicKey.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PublicKey message. + * @function verify + * @memberof tendermint.crypto.PublicKey + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PublicKey.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.ed25519 != null && message.hasOwnProperty("ed25519")) { + properties.sum = 1; + if (!(message.ed25519 && typeof message.ed25519.length === "number" || $util.isString(message.ed25519))) + return "ed25519: buffer expected"; + } + if (message.secp256k1 != null && message.hasOwnProperty("secp256k1")) { + if (properties.sum === 1) + return "sum: multiple values"; + properties.sum = 1; + if (!(message.secp256k1 && typeof message.secp256k1.length === "number" || $util.isString(message.secp256k1))) + return "secp256k1: buffer expected"; + } + return null; + }; + + /** + * Creates a PublicKey message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.crypto.PublicKey + * @static + * @param {Object.} object Plain object + * @returns {tendermint.crypto.PublicKey} PublicKey + */ + PublicKey.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.crypto.PublicKey) + return object; + var message = new $root.tendermint.crypto.PublicKey(); + if (object.ed25519 != null) + if (typeof object.ed25519 === "string") + $util.base64.decode(object.ed25519, message.ed25519 = $util.newBuffer($util.base64.length(object.ed25519)), 0); + else if (object.ed25519.length) + message.ed25519 = object.ed25519; + if (object.secp256k1 != null) + if (typeof object.secp256k1 === "string") + $util.base64.decode(object.secp256k1, message.secp256k1 = $util.newBuffer($util.base64.length(object.secp256k1)), 0); + else if (object.secp256k1.length) + message.secp256k1 = object.secp256k1; + return message; + }; + + /** + * Creates a plain object from a PublicKey message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.crypto.PublicKey + * @static + * @param {tendermint.crypto.PublicKey} message PublicKey + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PublicKey.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.ed25519 != null && message.hasOwnProperty("ed25519")) { + object.ed25519 = options.bytes === String ? $util.base64.encode(message.ed25519, 0, message.ed25519.length) : options.bytes === Array ? Array.prototype.slice.call(message.ed25519) : message.ed25519; + if (options.oneofs) + object.sum = "ed25519"; + } + if (message.secp256k1 != null && message.hasOwnProperty("secp256k1")) { + object.secp256k1 = options.bytes === String ? $util.base64.encode(message.secp256k1, 0, message.secp256k1.length) : options.bytes === Array ? Array.prototype.slice.call(message.secp256k1) : message.secp256k1; + if (options.oneofs) + object.sum = "secp256k1"; + } + return object; + }; + + /** + * Converts this PublicKey to JSON. + * @function toJSON + * @memberof tendermint.crypto.PublicKey + * @instance + * @returns {Object.} JSON object + */ + PublicKey.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PublicKey; + })(crypto.PublicKey || {}); + + crypto.Proof = (function(Proof) { + + /** + * Properties of a Proof. + * @memberof tendermint.crypto + * @interface IProof + * @property {number|Long|null} [total] Proof total + * @property {number|Long|null} [index] Proof index + * @property {Uint8Array|null} [leafHash] Proof leafHash + * @property {Array.|null} [aunts] Proof aunts + */ + + /** + * Constructs a new Proof. + * @memberof tendermint.crypto + * @classdesc Represents a Proof. + * @implements IProof + * @constructor + * @param {tendermint.crypto.IProof=} [properties] Properties to set + */ + function Proof(properties) { + this.aunts = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Proof total. + * @member {number|Long} total + * @memberof tendermint.crypto.Proof + * @instance + */ + Proof.prototype.total = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Proof index. + * @member {number|Long} index + * @memberof tendermint.crypto.Proof + * @instance + */ + Proof.prototype.index = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Proof leafHash. + * @member {Uint8Array} leafHash + * @memberof tendermint.crypto.Proof + * @instance + */ + Proof.prototype.leafHash = $util.newBuffer([]); + + /** + * Proof aunts. + * @member {Array.} aunts + * @memberof tendermint.crypto.Proof + * @instance + */ + Proof.prototype.aunts = $util.emptyArray; + + /** + * Creates a new Proof instance using the specified properties. + * @function create + * @memberof tendermint.crypto.Proof + * @static + * @param {tendermint.crypto.IProof=} [properties] Properties to set + * @returns {tendermint.crypto.Proof} Proof instance + */ + Proof.create = function create(properties) { + return new Proof(properties); + }; + + /** + * Encodes the specified Proof message. Does not implicitly {@link tendermint.crypto.Proof.verify|verify} messages. + * @function encode + * @memberof tendermint.crypto.Proof + * @static + * @param {tendermint.crypto.IProof} message Proof message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Proof.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.total != null && Object.hasOwnProperty.call(message, "total")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.total); + if (message.index != null && Object.hasOwnProperty.call(message, "index")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.index); + if (message.leafHash != null && Object.hasOwnProperty.call(message, "leafHash")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.leafHash); + if (message.aunts != null && message.aunts.length) + for (var i = 0; i < message.aunts.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.aunts[i]); + return writer; + }; + + /** + * Encodes the specified Proof message, length delimited. Does not implicitly {@link tendermint.crypto.Proof.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.crypto.Proof + * @static + * @param {tendermint.crypto.IProof} message Proof message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Proof.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Proof message from the specified reader or buffer. + * @function decode + * @memberof tendermint.crypto.Proof + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.crypto.Proof} Proof + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Proof.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.crypto.Proof(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.total = reader.int64(); + break; + case 2: + message.index = reader.int64(); + break; + case 3: + message.leafHash = reader.bytes(); + break; + case 4: + if (!(message.aunts && message.aunts.length)) + message.aunts = []; + message.aunts.push(reader.bytes()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Proof message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.crypto.Proof + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.crypto.Proof} Proof + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Proof.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Proof message. + * @function verify + * @memberof tendermint.crypto.Proof + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Proof.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.total != null && message.hasOwnProperty("total")) + if (!$util.isInteger(message.total) && !(message.total && $util.isInteger(message.total.low) && $util.isInteger(message.total.high))) + return "total: integer|Long expected"; + if (message.index != null && message.hasOwnProperty("index")) + if (!$util.isInteger(message.index) && !(message.index && $util.isInteger(message.index.low) && $util.isInteger(message.index.high))) + return "index: integer|Long expected"; + if (message.leafHash != null && message.hasOwnProperty("leafHash")) + if (!(message.leafHash && typeof message.leafHash.length === "number" || $util.isString(message.leafHash))) + return "leafHash: buffer expected"; + if (message.aunts != null && message.hasOwnProperty("aunts")) { + if (!Array.isArray(message.aunts)) + return "aunts: array expected"; + for (var i = 0; i < message.aunts.length; ++i) + if (!(message.aunts[i] && typeof message.aunts[i].length === "number" || $util.isString(message.aunts[i]))) + return "aunts: buffer[] expected"; + } + return null; + }; + + /** + * Creates a Proof message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.crypto.Proof + * @static + * @param {Object.} object Plain object + * @returns {tendermint.crypto.Proof} Proof + */ + Proof.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.crypto.Proof) + return object; + var message = new $root.tendermint.crypto.Proof(); + if (object.total != null) + if ($util.Long) + (message.total = $util.Long.fromValue(object.total)).unsigned = false; + else if (typeof object.total === "string") + message.total = parseInt(object.total, 10); + else if (typeof object.total === "number") + message.total = object.total; + else if (typeof object.total === "object") + message.total = new $util.LongBits(object.total.low >>> 0, object.total.high >>> 0).toNumber(); + if (object.index != null) + if ($util.Long) + (message.index = $util.Long.fromValue(object.index)).unsigned = false; + else if (typeof object.index === "string") + message.index = parseInt(object.index, 10); + else if (typeof object.index === "number") + message.index = object.index; + else if (typeof object.index === "object") + message.index = new $util.LongBits(object.index.low >>> 0, object.index.high >>> 0).toNumber(); + if (object.leafHash != null) + if (typeof object.leafHash === "string") + $util.base64.decode(object.leafHash, message.leafHash = $util.newBuffer($util.base64.length(object.leafHash)), 0); + else if (object.leafHash.length) + message.leafHash = object.leafHash; + if (object.aunts) { + if (!Array.isArray(object.aunts)) + throw TypeError(".tendermint.crypto.Proof.aunts: array expected"); + message.aunts = []; + for (var i = 0; i < object.aunts.length; ++i) + if (typeof object.aunts[i] === "string") + $util.base64.decode(object.aunts[i], message.aunts[i] = $util.newBuffer($util.base64.length(object.aunts[i])), 0); + else if (object.aunts[i].length) + message.aunts[i] = object.aunts[i]; + } + return message; + }; + + /** + * Creates a plain object from a Proof message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.crypto.Proof + * @static + * @param {tendermint.crypto.Proof} message Proof + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Proof.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.aunts = []; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.total = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.total = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.index = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.index = options.longs === String ? "0" : 0; + if (options.bytes === String) + object.leafHash = ""; + else { + object.leafHash = []; + if (options.bytes !== Array) + object.leafHash = $util.newBuffer(object.leafHash); + } + } + if (message.total != null && message.hasOwnProperty("total")) + if (typeof message.total === "number") + object.total = options.longs === String ? String(message.total) : message.total; + else + object.total = options.longs === String ? $util.Long.prototype.toString.call(message.total) : options.longs === Number ? new $util.LongBits(message.total.low >>> 0, message.total.high >>> 0).toNumber() : message.total; + if (message.index != null && message.hasOwnProperty("index")) + if (typeof message.index === "number") + object.index = options.longs === String ? String(message.index) : message.index; + else + object.index = options.longs === String ? $util.Long.prototype.toString.call(message.index) : options.longs === Number ? new $util.LongBits(message.index.low >>> 0, message.index.high >>> 0).toNumber() : message.index; + if (message.leafHash != null && message.hasOwnProperty("leafHash")) + object.leafHash = options.bytes === String ? $util.base64.encode(message.leafHash, 0, message.leafHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.leafHash) : message.leafHash; + if (message.aunts && message.aunts.length) { + object.aunts = []; + for (var j = 0; j < message.aunts.length; ++j) + object.aunts[j] = options.bytes === String ? $util.base64.encode(message.aunts[j], 0, message.aunts[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.aunts[j]) : message.aunts[j]; + } + return object; + }; + + /** + * Converts this Proof to JSON. + * @function toJSON + * @memberof tendermint.crypto.Proof + * @instance + * @returns {Object.} JSON object + */ + Proof.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Proof; + })(crypto.Proof || {}); + + crypto.ValueOp = (function(ValueOp) { + + /** + * Properties of a ValueOp. + * @memberof tendermint.crypto + * @interface IValueOp + * @property {Uint8Array|null} [key] ValueOp key + * @property {tendermint.crypto.IProof|null} [proof] ValueOp proof + */ + + /** + * Constructs a new ValueOp. + * @memberof tendermint.crypto + * @classdesc Represents a ValueOp. + * @implements IValueOp + * @constructor + * @param {tendermint.crypto.IValueOp=} [properties] Properties to set + */ + function ValueOp(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ValueOp key. + * @member {Uint8Array} key + * @memberof tendermint.crypto.ValueOp + * @instance + */ + ValueOp.prototype.key = $util.newBuffer([]); + + /** + * ValueOp proof. + * @member {tendermint.crypto.IProof|null|undefined} proof + * @memberof tendermint.crypto.ValueOp + * @instance + */ + ValueOp.prototype.proof = null; + + /** + * Creates a new ValueOp instance using the specified properties. + * @function create + * @memberof tendermint.crypto.ValueOp + * @static + * @param {tendermint.crypto.IValueOp=} [properties] Properties to set + * @returns {tendermint.crypto.ValueOp} ValueOp instance + */ + ValueOp.create = function create(properties) { + return new ValueOp(properties); + }; + + /** + * Encodes the specified ValueOp message. Does not implicitly {@link tendermint.crypto.ValueOp.verify|verify} messages. + * @function encode + * @memberof tendermint.crypto.ValueOp + * @static + * @param {tendermint.crypto.IValueOp} message ValueOp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValueOp.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.key); + if (message.proof != null && Object.hasOwnProperty.call(message, "proof")) + $root.tendermint.crypto.Proof.encode(message.proof, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ValueOp message, length delimited. Does not implicitly {@link tendermint.crypto.ValueOp.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.crypto.ValueOp + * @static + * @param {tendermint.crypto.IValueOp} message ValueOp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValueOp.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ValueOp message from the specified reader or buffer. + * @function decode + * @memberof tendermint.crypto.ValueOp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.crypto.ValueOp} ValueOp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValueOp.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.crypto.ValueOp(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.key = reader.bytes(); + break; + case 2: + message.proof = $root.tendermint.crypto.Proof.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ValueOp message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.crypto.ValueOp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.crypto.ValueOp} ValueOp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValueOp.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ValueOp message. + * @function verify + * @memberof tendermint.crypto.ValueOp + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ValueOp.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.key != null && message.hasOwnProperty("key")) + if (!(message.key && typeof message.key.length === "number" || $util.isString(message.key))) + return "key: buffer expected"; + if (message.proof != null && message.hasOwnProperty("proof")) { + var error = $root.tendermint.crypto.Proof.verify(message.proof); + if (error) + return "proof." + error; + } + return null; + }; + + /** + * Creates a ValueOp message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.crypto.ValueOp + * @static + * @param {Object.} object Plain object + * @returns {tendermint.crypto.ValueOp} ValueOp + */ + ValueOp.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.crypto.ValueOp) + return object; + var message = new $root.tendermint.crypto.ValueOp(); + if (object.key != null) + if (typeof object.key === "string") + $util.base64.decode(object.key, message.key = $util.newBuffer($util.base64.length(object.key)), 0); + else if (object.key.length) + message.key = object.key; + if (object.proof != null) { + if (typeof object.proof !== "object") + throw TypeError(".tendermint.crypto.ValueOp.proof: object expected"); + message.proof = $root.tendermint.crypto.Proof.fromObject(object.proof); + } + return message; + }; + + /** + * Creates a plain object from a ValueOp message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.crypto.ValueOp + * @static + * @param {tendermint.crypto.ValueOp} message ValueOp + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ValueOp.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.key = ""; + else { + object.key = []; + if (options.bytes !== Array) + object.key = $util.newBuffer(object.key); + } + object.proof = null; + } + if (message.key != null && message.hasOwnProperty("key")) + object.key = options.bytes === String ? $util.base64.encode(message.key, 0, message.key.length) : options.bytes === Array ? Array.prototype.slice.call(message.key) : message.key; + if (message.proof != null && message.hasOwnProperty("proof")) + object.proof = $root.tendermint.crypto.Proof.toObject(message.proof, options); + return object; + }; + + /** + * Converts this ValueOp to JSON. + * @function toJSON + * @memberof tendermint.crypto.ValueOp + * @instance + * @returns {Object.} JSON object + */ + ValueOp.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ValueOp; + })(crypto.ValueOp || {}); + + crypto.DominoOp = (function(DominoOp) { + + /** + * Properties of a DominoOp. + * @memberof tendermint.crypto + * @interface IDominoOp + * @property {string|null} [key] DominoOp key + * @property {string|null} [input] DominoOp input + * @property {string|null} [output] DominoOp output + */ + + /** + * Constructs a new DominoOp. + * @memberof tendermint.crypto + * @classdesc Represents a DominoOp. + * @implements IDominoOp + * @constructor + * @param {tendermint.crypto.IDominoOp=} [properties] Properties to set + */ + function DominoOp(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DominoOp key. + * @member {string} key + * @memberof tendermint.crypto.DominoOp + * @instance + */ + DominoOp.prototype.key = ""; + + /** + * DominoOp input. + * @member {string} input + * @memberof tendermint.crypto.DominoOp + * @instance + */ + DominoOp.prototype.input = ""; + + /** + * DominoOp output. + * @member {string} output + * @memberof tendermint.crypto.DominoOp + * @instance + */ + DominoOp.prototype.output = ""; + + /** + * Creates a new DominoOp instance using the specified properties. + * @function create + * @memberof tendermint.crypto.DominoOp + * @static + * @param {tendermint.crypto.IDominoOp=} [properties] Properties to set + * @returns {tendermint.crypto.DominoOp} DominoOp instance + */ + DominoOp.create = function create(properties) { + return new DominoOp(properties); + }; + + /** + * Encodes the specified DominoOp message. Does not implicitly {@link tendermint.crypto.DominoOp.verify|verify} messages. + * @function encode + * @memberof tendermint.crypto.DominoOp + * @static + * @param {tendermint.crypto.IDominoOp} message DominoOp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DominoOp.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); + if (message.input != null && Object.hasOwnProperty.call(message, "input")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.input); + if (message.output != null && Object.hasOwnProperty.call(message, "output")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.output); + return writer; + }; + + /** + * Encodes the specified DominoOp message, length delimited. Does not implicitly {@link tendermint.crypto.DominoOp.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.crypto.DominoOp + * @static + * @param {tendermint.crypto.IDominoOp} message DominoOp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DominoOp.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DominoOp message from the specified reader or buffer. + * @function decode + * @memberof tendermint.crypto.DominoOp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.crypto.DominoOp} DominoOp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DominoOp.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.crypto.DominoOp(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.key = reader.string(); + break; + case 2: + message.input = reader.string(); + break; + case 3: + message.output = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DominoOp message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.crypto.DominoOp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.crypto.DominoOp} DominoOp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DominoOp.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DominoOp message. + * @function verify + * @memberof tendermint.crypto.DominoOp + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DominoOp.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.key != null && message.hasOwnProperty("key")) + if (!$util.isString(message.key)) + return "key: string expected"; + if (message.input != null && message.hasOwnProperty("input")) + if (!$util.isString(message.input)) + return "input: string expected"; + if (message.output != null && message.hasOwnProperty("output")) + if (!$util.isString(message.output)) + return "output: string expected"; + return null; + }; + + /** + * Creates a DominoOp message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.crypto.DominoOp + * @static + * @param {Object.} object Plain object + * @returns {tendermint.crypto.DominoOp} DominoOp + */ + DominoOp.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.crypto.DominoOp) + return object; + var message = new $root.tendermint.crypto.DominoOp(); + if (object.key != null) + message.key = String(object.key); + if (object.input != null) + message.input = String(object.input); + if (object.output != null) + message.output = String(object.output); + return message; + }; + + /** + * Creates a plain object from a DominoOp message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.crypto.DominoOp + * @static + * @param {tendermint.crypto.DominoOp} message DominoOp + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DominoOp.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.key = ""; + object.input = ""; + object.output = ""; + } + if (message.key != null && message.hasOwnProperty("key")) + object.key = message.key; + if (message.input != null && message.hasOwnProperty("input")) + object.input = message.input; + if (message.output != null && message.hasOwnProperty("output")) + object.output = message.output; + return object; + }; + + /** + * Converts this DominoOp to JSON. + * @function toJSON + * @memberof tendermint.crypto.DominoOp + * @instance + * @returns {Object.} JSON object + */ + DominoOp.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DominoOp; + })(crypto.DominoOp || {}); + + crypto.ProofOp = (function(ProofOp) { + + /** + * Properties of a ProofOp. + * @memberof tendermint.crypto + * @interface IProofOp + * @property {string|null} [type] ProofOp type + * @property {Uint8Array|null} [key] ProofOp key + * @property {Uint8Array|null} [data] ProofOp data + */ + + /** + * Constructs a new ProofOp. + * @memberof tendermint.crypto + * @classdesc Represents a ProofOp. + * @implements IProofOp + * @constructor + * @param {tendermint.crypto.IProofOp=} [properties] Properties to set + */ + function ProofOp(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ProofOp type. + * @member {string} type + * @memberof tendermint.crypto.ProofOp + * @instance + */ + ProofOp.prototype.type = ""; + + /** + * ProofOp key. + * @member {Uint8Array} key + * @memberof tendermint.crypto.ProofOp + * @instance + */ + ProofOp.prototype.key = $util.newBuffer([]); + + /** + * ProofOp data. + * @member {Uint8Array} data + * @memberof tendermint.crypto.ProofOp + * @instance + */ + ProofOp.prototype.data = $util.newBuffer([]); + + /** + * Creates a new ProofOp instance using the specified properties. + * @function create + * @memberof tendermint.crypto.ProofOp + * @static + * @param {tendermint.crypto.IProofOp=} [properties] Properties to set + * @returns {tendermint.crypto.ProofOp} ProofOp instance + */ + ProofOp.create = function create(properties) { + return new ProofOp(properties); + }; + + /** + * Encodes the specified ProofOp message. Does not implicitly {@link tendermint.crypto.ProofOp.verify|verify} messages. + * @function encode + * @memberof tendermint.crypto.ProofOp + * @static + * @param {tendermint.crypto.IProofOp} message ProofOp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProofOp.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.key); + if (message.data != null && Object.hasOwnProperty.call(message, "data")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.data); + return writer; + }; + + /** + * Encodes the specified ProofOp message, length delimited. Does not implicitly {@link tendermint.crypto.ProofOp.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.crypto.ProofOp + * @static + * @param {tendermint.crypto.IProofOp} message ProofOp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProofOp.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ProofOp message from the specified reader or buffer. + * @function decode + * @memberof tendermint.crypto.ProofOp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.crypto.ProofOp} ProofOp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProofOp.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.crypto.ProofOp(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type = reader.string(); + break; + case 2: + message.key = reader.bytes(); + break; + case 3: + message.data = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ProofOp message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.crypto.ProofOp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.crypto.ProofOp} ProofOp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProofOp.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ProofOp message. + * @function verify + * @memberof tendermint.crypto.ProofOp + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ProofOp.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.key != null && message.hasOwnProperty("key")) + if (!(message.key && typeof message.key.length === "number" || $util.isString(message.key))) + return "key: buffer expected"; + if (message.data != null && message.hasOwnProperty("data")) + if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) + return "data: buffer expected"; + return null; + }; + + /** + * Creates a ProofOp message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.crypto.ProofOp + * @static + * @param {Object.} object Plain object + * @returns {tendermint.crypto.ProofOp} ProofOp + */ + ProofOp.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.crypto.ProofOp) + return object; + var message = new $root.tendermint.crypto.ProofOp(); + if (object.type != null) + message.type = String(object.type); + if (object.key != null) + if (typeof object.key === "string") + $util.base64.decode(object.key, message.key = $util.newBuffer($util.base64.length(object.key)), 0); + else if (object.key.length) + message.key = object.key; + if (object.data != null) + if (typeof object.data === "string") + $util.base64.decode(object.data, message.data = $util.newBuffer($util.base64.length(object.data)), 0); + else if (object.data.length) + message.data = object.data; + return message; + }; + + /** + * Creates a plain object from a ProofOp message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.crypto.ProofOp + * @static + * @param {tendermint.crypto.ProofOp} message ProofOp + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ProofOp.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = ""; + if (options.bytes === String) + object.key = ""; + else { + object.key = []; + if (options.bytes !== Array) + object.key = $util.newBuffer(object.key); + } + if (options.bytes === String) + object.data = ""; + else { + object.data = []; + if (options.bytes !== Array) + object.data = $util.newBuffer(object.data); + } + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.key != null && message.hasOwnProperty("key")) + object.key = options.bytes === String ? $util.base64.encode(message.key, 0, message.key.length) : options.bytes === Array ? Array.prototype.slice.call(message.key) : message.key; + if (message.data != null && message.hasOwnProperty("data")) + object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; + return object; + }; + + /** + * Converts this ProofOp to JSON. + * @function toJSON + * @memberof tendermint.crypto.ProofOp + * @instance + * @returns {Object.} JSON object + */ + ProofOp.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ProofOp; + })(crypto.ProofOp || {}); + + crypto.ProofOps = (function(ProofOps) { + + /** + * Properties of a ProofOps. + * @memberof tendermint.crypto + * @interface IProofOps + * @property {Array.|null} [ops] ProofOps ops + */ + + /** + * Constructs a new ProofOps. + * @memberof tendermint.crypto + * @classdesc Represents a ProofOps. + * @implements IProofOps + * @constructor + * @param {tendermint.crypto.IProofOps=} [properties] Properties to set + */ + function ProofOps(properties) { + this.ops = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ProofOps ops. + * @member {Array.} ops + * @memberof tendermint.crypto.ProofOps + * @instance + */ + ProofOps.prototype.ops = $util.emptyArray; + + /** + * Creates a new ProofOps instance using the specified properties. + * @function create + * @memberof tendermint.crypto.ProofOps + * @static + * @param {tendermint.crypto.IProofOps=} [properties] Properties to set + * @returns {tendermint.crypto.ProofOps} ProofOps instance + */ + ProofOps.create = function create(properties) { + return new ProofOps(properties); + }; + + /** + * Encodes the specified ProofOps message. Does not implicitly {@link tendermint.crypto.ProofOps.verify|verify} messages. + * @function encode + * @memberof tendermint.crypto.ProofOps + * @static + * @param {tendermint.crypto.IProofOps} message ProofOps message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProofOps.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ops != null && message.ops.length) + for (var i = 0; i < message.ops.length; ++i) + $root.tendermint.crypto.ProofOp.encode(message.ops[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ProofOps message, length delimited. Does not implicitly {@link tendermint.crypto.ProofOps.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.crypto.ProofOps + * @static + * @param {tendermint.crypto.IProofOps} message ProofOps message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProofOps.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ProofOps message from the specified reader or buffer. + * @function decode + * @memberof tendermint.crypto.ProofOps + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.crypto.ProofOps} ProofOps + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProofOps.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.crypto.ProofOps(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.ops && message.ops.length)) + message.ops = []; + message.ops.push($root.tendermint.crypto.ProofOp.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ProofOps message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.crypto.ProofOps + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.crypto.ProofOps} ProofOps + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProofOps.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ProofOps message. + * @function verify + * @memberof tendermint.crypto.ProofOps + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ProofOps.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.ops != null && message.hasOwnProperty("ops")) { + if (!Array.isArray(message.ops)) + return "ops: array expected"; + for (var i = 0; i < message.ops.length; ++i) { + var error = $root.tendermint.crypto.ProofOp.verify(message.ops[i]); + if (error) + return "ops." + error; + } + } + return null; + }; + + /** + * Creates a ProofOps message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.crypto.ProofOps + * @static + * @param {Object.} object Plain object + * @returns {tendermint.crypto.ProofOps} ProofOps + */ + ProofOps.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.crypto.ProofOps) + return object; + var message = new $root.tendermint.crypto.ProofOps(); + if (object.ops) { + if (!Array.isArray(object.ops)) + throw TypeError(".tendermint.crypto.ProofOps.ops: array expected"); + message.ops = []; + for (var i = 0; i < object.ops.length; ++i) { + if (typeof object.ops[i] !== "object") + throw TypeError(".tendermint.crypto.ProofOps.ops: object expected"); + message.ops[i] = $root.tendermint.crypto.ProofOp.fromObject(object.ops[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ProofOps message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.crypto.ProofOps + * @static + * @param {tendermint.crypto.ProofOps} message ProofOps + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ProofOps.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.ops = []; + if (message.ops && message.ops.length) { + object.ops = []; + for (var j = 0; j < message.ops.length; ++j) + object.ops[j] = $root.tendermint.crypto.ProofOp.toObject(message.ops[j], options); + } + return object; + }; + + /** + * Converts this ProofOps to JSON. + * @function toJSON + * @memberof tendermint.crypto.ProofOps + * @instance + * @returns {Object.} JSON object + */ + ProofOps.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ProofOps; + })(crypto.ProofOps || {}); + + return crypto; + })(tendermint.crypto || {}); + + /** + * Namespace p2p. + * @memberof tendermint + * @namespace + */ + + tendermint.p2p = (function(p2p) { + + p2p.NetAddress = (function(NetAddress) { + + /** + * Properties of a NetAddress. + * @memberof tendermint.p2p + * @interface INetAddress + * @property {string|null} [id] NetAddress id + * @property {string|null} [ip] NetAddress ip + * @property {number|null} [port] NetAddress port + */ + + /** + * Constructs a new NetAddress. + * @memberof tendermint.p2p + * @classdesc Represents a NetAddress. + * @implements INetAddress + * @constructor + * @param {tendermint.p2p.INetAddress=} [properties] Properties to set + */ + function NetAddress(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NetAddress id. + * @member {string} id + * @memberof tendermint.p2p.NetAddress + * @instance + */ + NetAddress.prototype.id = ""; + + /** + * NetAddress ip. + * @member {string} ip + * @memberof tendermint.p2p.NetAddress + * @instance + */ + NetAddress.prototype.ip = ""; + + /** + * NetAddress port. + * @member {number} port + * @memberof tendermint.p2p.NetAddress + * @instance + */ + NetAddress.prototype.port = 0; + + /** + * Creates a new NetAddress instance using the specified properties. + * @function create + * @memberof tendermint.p2p.NetAddress + * @static + * @param {tendermint.p2p.INetAddress=} [properties] Properties to set + * @returns {tendermint.p2p.NetAddress} NetAddress instance + */ + NetAddress.create = function create(properties) { + return new NetAddress(properties); + }; + + /** + * Encodes the specified NetAddress message. Does not implicitly {@link tendermint.p2p.NetAddress.verify|verify} messages. + * @function encode + * @memberof tendermint.p2p.NetAddress + * @static + * @param {tendermint.p2p.INetAddress} message NetAddress message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NetAddress.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.ip != null && Object.hasOwnProperty.call(message, "ip")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.ip); + if (message.port != null && Object.hasOwnProperty.call(message, "port")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.port); + return writer; + }; + + /** + * Encodes the specified NetAddress message, length delimited. Does not implicitly {@link tendermint.p2p.NetAddress.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.p2p.NetAddress + * @static + * @param {tendermint.p2p.INetAddress} message NetAddress message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NetAddress.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NetAddress message from the specified reader or buffer. + * @function decode + * @memberof tendermint.p2p.NetAddress + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.p2p.NetAddress} NetAddress + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NetAddress.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.p2p.NetAddress(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.id = reader.string(); + break; + case 2: + message.ip = reader.string(); + break; + case 3: + message.port = reader.uint32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NetAddress message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.p2p.NetAddress + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.p2p.NetAddress} NetAddress + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NetAddress.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NetAddress message. + * @function verify + * @memberof tendermint.p2p.NetAddress + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NetAddress.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.ip != null && message.hasOwnProperty("ip")) + if (!$util.isString(message.ip)) + return "ip: string expected"; + if (message.port != null && message.hasOwnProperty("port")) + if (!$util.isInteger(message.port)) + return "port: integer expected"; + return null; + }; + + /** + * Creates a NetAddress message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.p2p.NetAddress + * @static + * @param {Object.} object Plain object + * @returns {tendermint.p2p.NetAddress} NetAddress + */ + NetAddress.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.p2p.NetAddress) + return object; + var message = new $root.tendermint.p2p.NetAddress(); + if (object.id != null) + message.id = String(object.id); + if (object.ip != null) + message.ip = String(object.ip); + if (object.port != null) + message.port = object.port >>> 0; + return message; + }; + + /** + * Creates a plain object from a NetAddress message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.p2p.NetAddress + * @static + * @param {tendermint.p2p.NetAddress} message NetAddress + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NetAddress.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.id = ""; + object.ip = ""; + object.port = 0; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.ip != null && message.hasOwnProperty("ip")) + object.ip = message.ip; + if (message.port != null && message.hasOwnProperty("port")) + object.port = message.port; + return object; + }; + + /** + * Converts this NetAddress to JSON. + * @function toJSON + * @memberof tendermint.p2p.NetAddress + * @instance + * @returns {Object.} JSON object + */ + NetAddress.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return NetAddress; + })(p2p.NetAddress || {}); + + p2p.ProtocolVersion = (function(ProtocolVersion) { + + /** + * Properties of a ProtocolVersion. + * @memberof tendermint.p2p + * @interface IProtocolVersion + * @property {number|Long|null} [p2p] ProtocolVersion p2p + * @property {number|Long|null} [block] ProtocolVersion block + * @property {number|Long|null} [app] ProtocolVersion app + */ + + /** + * Constructs a new ProtocolVersion. + * @memberof tendermint.p2p + * @classdesc Represents a ProtocolVersion. + * @implements IProtocolVersion + * @constructor + * @param {tendermint.p2p.IProtocolVersion=} [properties] Properties to set + */ + function ProtocolVersion(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ProtocolVersion p2p. + * @member {number|Long} p2p + * @memberof tendermint.p2p.ProtocolVersion + * @instance + */ + ProtocolVersion.prototype.p2p = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * ProtocolVersion block. + * @member {number|Long} block + * @memberof tendermint.p2p.ProtocolVersion + * @instance + */ + ProtocolVersion.prototype.block = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * ProtocolVersion app. + * @member {number|Long} app + * @memberof tendermint.p2p.ProtocolVersion + * @instance + */ + ProtocolVersion.prototype.app = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new ProtocolVersion instance using the specified properties. + * @function create + * @memberof tendermint.p2p.ProtocolVersion + * @static + * @param {tendermint.p2p.IProtocolVersion=} [properties] Properties to set + * @returns {tendermint.p2p.ProtocolVersion} ProtocolVersion instance + */ + ProtocolVersion.create = function create(properties) { + return new ProtocolVersion(properties); + }; + + /** + * Encodes the specified ProtocolVersion message. Does not implicitly {@link tendermint.p2p.ProtocolVersion.verify|verify} messages. + * @function encode + * @memberof tendermint.p2p.ProtocolVersion + * @static + * @param {tendermint.p2p.IProtocolVersion} message ProtocolVersion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProtocolVersion.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.p2p != null && Object.hasOwnProperty.call(message, "p2p")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.p2p); + if (message.block != null && Object.hasOwnProperty.call(message, "block")) + writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.block); + if (message.app != null && Object.hasOwnProperty.call(message, "app")) + writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.app); + return writer; + }; + + /** + * Encodes the specified ProtocolVersion message, length delimited. Does not implicitly {@link tendermint.p2p.ProtocolVersion.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.p2p.ProtocolVersion + * @static + * @param {tendermint.p2p.IProtocolVersion} message ProtocolVersion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProtocolVersion.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ProtocolVersion message from the specified reader or buffer. + * @function decode + * @memberof tendermint.p2p.ProtocolVersion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.p2p.ProtocolVersion} ProtocolVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProtocolVersion.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.p2p.ProtocolVersion(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.p2p = reader.uint64(); + break; + case 2: + message.block = reader.uint64(); + break; + case 3: + message.app = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ProtocolVersion message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.p2p.ProtocolVersion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.p2p.ProtocolVersion} ProtocolVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProtocolVersion.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ProtocolVersion message. + * @function verify + * @memberof tendermint.p2p.ProtocolVersion + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ProtocolVersion.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.p2p != null && message.hasOwnProperty("p2p")) + if (!$util.isInteger(message.p2p) && !(message.p2p && $util.isInteger(message.p2p.low) && $util.isInteger(message.p2p.high))) + return "p2p: integer|Long expected"; + if (message.block != null && message.hasOwnProperty("block")) + if (!$util.isInteger(message.block) && !(message.block && $util.isInteger(message.block.low) && $util.isInteger(message.block.high))) + return "block: integer|Long expected"; + if (message.app != null && message.hasOwnProperty("app")) + if (!$util.isInteger(message.app) && !(message.app && $util.isInteger(message.app.low) && $util.isInteger(message.app.high))) + return "app: integer|Long expected"; + return null; + }; + + /** + * Creates a ProtocolVersion message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.p2p.ProtocolVersion + * @static + * @param {Object.} object Plain object + * @returns {tendermint.p2p.ProtocolVersion} ProtocolVersion + */ + ProtocolVersion.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.p2p.ProtocolVersion) + return object; + var message = new $root.tendermint.p2p.ProtocolVersion(); + if (object.p2p != null) + if ($util.Long) + (message.p2p = $util.Long.fromValue(object.p2p)).unsigned = true; + else if (typeof object.p2p === "string") + message.p2p = parseInt(object.p2p, 10); + else if (typeof object.p2p === "number") + message.p2p = object.p2p; + else if (typeof object.p2p === "object") + message.p2p = new $util.LongBits(object.p2p.low >>> 0, object.p2p.high >>> 0).toNumber(true); + if (object.block != null) + if ($util.Long) + (message.block = $util.Long.fromValue(object.block)).unsigned = true; + else if (typeof object.block === "string") + message.block = parseInt(object.block, 10); + else if (typeof object.block === "number") + message.block = object.block; + else if (typeof object.block === "object") + message.block = new $util.LongBits(object.block.low >>> 0, object.block.high >>> 0).toNumber(true); + if (object.app != null) + if ($util.Long) + (message.app = $util.Long.fromValue(object.app)).unsigned = true; + else if (typeof object.app === "string") + message.app = parseInt(object.app, 10); + else if (typeof object.app === "number") + message.app = object.app; + else if (typeof object.app === "object") + message.app = new $util.LongBits(object.app.low >>> 0, object.app.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a ProtocolVersion message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.p2p.ProtocolVersion + * @static + * @param {tendermint.p2p.ProtocolVersion} message ProtocolVersion + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ProtocolVersion.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.p2p = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.p2p = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.block = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.block = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.app = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.app = options.longs === String ? "0" : 0; + } + if (message.p2p != null && message.hasOwnProperty("p2p")) + if (typeof message.p2p === "number") + object.p2p = options.longs === String ? String(message.p2p) : message.p2p; + else + object.p2p = options.longs === String ? $util.Long.prototype.toString.call(message.p2p) : options.longs === Number ? new $util.LongBits(message.p2p.low >>> 0, message.p2p.high >>> 0).toNumber(true) : message.p2p; + if (message.block != null && message.hasOwnProperty("block")) + if (typeof message.block === "number") + object.block = options.longs === String ? String(message.block) : message.block; + else + object.block = options.longs === String ? $util.Long.prototype.toString.call(message.block) : options.longs === Number ? new $util.LongBits(message.block.low >>> 0, message.block.high >>> 0).toNumber(true) : message.block; + if (message.app != null && message.hasOwnProperty("app")) + if (typeof message.app === "number") + object.app = options.longs === String ? String(message.app) : message.app; + else + object.app = options.longs === String ? $util.Long.prototype.toString.call(message.app) : options.longs === Number ? new $util.LongBits(message.app.low >>> 0, message.app.high >>> 0).toNumber(true) : message.app; + return object; + }; + + /** + * Converts this ProtocolVersion to JSON. + * @function toJSON + * @memberof tendermint.p2p.ProtocolVersion + * @instance + * @returns {Object.} JSON object + */ + ProtocolVersion.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ProtocolVersion; + })(p2p.ProtocolVersion || {}); + + p2p.DefaultNodeInfo = (function(DefaultNodeInfo) { + + /** + * Properties of a DefaultNodeInfo. + * @memberof tendermint.p2p + * @interface IDefaultNodeInfo + * @property {tendermint.p2p.IProtocolVersion|null} [protocolVersion] DefaultNodeInfo protocolVersion + * @property {string|null} [defaultNodeId] DefaultNodeInfo defaultNodeId + * @property {string|null} [listenAddr] DefaultNodeInfo listenAddr + * @property {string|null} [network] DefaultNodeInfo network + * @property {string|null} [version] DefaultNodeInfo version + * @property {Uint8Array|null} [channels] DefaultNodeInfo channels + * @property {string|null} [moniker] DefaultNodeInfo moniker + * @property {tendermint.p2p.IDefaultNodeInfoOther|null} [other] DefaultNodeInfo other + */ + + /** + * Constructs a new DefaultNodeInfo. + * @memberof tendermint.p2p + * @classdesc Represents a DefaultNodeInfo. + * @implements IDefaultNodeInfo + * @constructor + * @param {tendermint.p2p.IDefaultNodeInfo=} [properties] Properties to set + */ + function DefaultNodeInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DefaultNodeInfo protocolVersion. + * @member {tendermint.p2p.IProtocolVersion|null|undefined} protocolVersion + * @memberof tendermint.p2p.DefaultNodeInfo + * @instance + */ + DefaultNodeInfo.prototype.protocolVersion = null; + + /** + * DefaultNodeInfo defaultNodeId. + * @member {string} defaultNodeId + * @memberof tendermint.p2p.DefaultNodeInfo + * @instance + */ + DefaultNodeInfo.prototype.defaultNodeId = ""; + + /** + * DefaultNodeInfo listenAddr. + * @member {string} listenAddr + * @memberof tendermint.p2p.DefaultNodeInfo + * @instance + */ + DefaultNodeInfo.prototype.listenAddr = ""; + + /** + * DefaultNodeInfo network. + * @member {string} network + * @memberof tendermint.p2p.DefaultNodeInfo + * @instance + */ + DefaultNodeInfo.prototype.network = ""; + + /** + * DefaultNodeInfo version. + * @member {string} version + * @memberof tendermint.p2p.DefaultNodeInfo + * @instance + */ + DefaultNodeInfo.prototype.version = ""; + + /** + * DefaultNodeInfo channels. + * @member {Uint8Array} channels + * @memberof tendermint.p2p.DefaultNodeInfo + * @instance + */ + DefaultNodeInfo.prototype.channels = $util.newBuffer([]); + + /** + * DefaultNodeInfo moniker. + * @member {string} moniker + * @memberof tendermint.p2p.DefaultNodeInfo + * @instance + */ + DefaultNodeInfo.prototype.moniker = ""; + + /** + * DefaultNodeInfo other. + * @member {tendermint.p2p.IDefaultNodeInfoOther|null|undefined} other + * @memberof tendermint.p2p.DefaultNodeInfo + * @instance + */ + DefaultNodeInfo.prototype.other = null; + + /** + * Creates a new DefaultNodeInfo instance using the specified properties. + * @function create + * @memberof tendermint.p2p.DefaultNodeInfo + * @static + * @param {tendermint.p2p.IDefaultNodeInfo=} [properties] Properties to set + * @returns {tendermint.p2p.DefaultNodeInfo} DefaultNodeInfo instance + */ + DefaultNodeInfo.create = function create(properties) { + return new DefaultNodeInfo(properties); + }; + + /** + * Encodes the specified DefaultNodeInfo message. Does not implicitly {@link tendermint.p2p.DefaultNodeInfo.verify|verify} messages. + * @function encode + * @memberof tendermint.p2p.DefaultNodeInfo + * @static + * @param {tendermint.p2p.IDefaultNodeInfo} message DefaultNodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DefaultNodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.protocolVersion != null && Object.hasOwnProperty.call(message, "protocolVersion")) + $root.tendermint.p2p.ProtocolVersion.encode(message.protocolVersion, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.defaultNodeId != null && Object.hasOwnProperty.call(message, "defaultNodeId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.defaultNodeId); + if (message.listenAddr != null && Object.hasOwnProperty.call(message, "listenAddr")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.listenAddr); + if (message.network != null && Object.hasOwnProperty.call(message, "network")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.network); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.version); + if (message.channels != null && Object.hasOwnProperty.call(message, "channels")) + writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.channels); + if (message.moniker != null && Object.hasOwnProperty.call(message, "moniker")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.moniker); + if (message.other != null && Object.hasOwnProperty.call(message, "other")) + $root.tendermint.p2p.DefaultNodeInfoOther.encode(message.other, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DefaultNodeInfo message, length delimited. Does not implicitly {@link tendermint.p2p.DefaultNodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.p2p.DefaultNodeInfo + * @static + * @param {tendermint.p2p.IDefaultNodeInfo} message DefaultNodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DefaultNodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DefaultNodeInfo message from the specified reader or buffer. + * @function decode + * @memberof tendermint.p2p.DefaultNodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.p2p.DefaultNodeInfo} DefaultNodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DefaultNodeInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.p2p.DefaultNodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.protocolVersion = $root.tendermint.p2p.ProtocolVersion.decode(reader, reader.uint32()); + break; + case 2: + message.defaultNodeId = reader.string(); + break; + case 3: + message.listenAddr = reader.string(); + break; + case 4: + message.network = reader.string(); + break; + case 5: + message.version = reader.string(); + break; + case 6: + message.channels = reader.bytes(); + break; + case 7: + message.moniker = reader.string(); + break; + case 8: + message.other = $root.tendermint.p2p.DefaultNodeInfoOther.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DefaultNodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.p2p.DefaultNodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.p2p.DefaultNodeInfo} DefaultNodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DefaultNodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DefaultNodeInfo message. + * @function verify + * @memberof tendermint.p2p.DefaultNodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DefaultNodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.protocolVersion != null && message.hasOwnProperty("protocolVersion")) { + var error = $root.tendermint.p2p.ProtocolVersion.verify(message.protocolVersion); + if (error) + return "protocolVersion." + error; + } + if (message.defaultNodeId != null && message.hasOwnProperty("defaultNodeId")) + if (!$util.isString(message.defaultNodeId)) + return "defaultNodeId: string expected"; + if (message.listenAddr != null && message.hasOwnProperty("listenAddr")) + if (!$util.isString(message.listenAddr)) + return "listenAddr: string expected"; + if (message.network != null && message.hasOwnProperty("network")) + if (!$util.isString(message.network)) + return "network: string expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.channels != null && message.hasOwnProperty("channels")) + if (!(message.channels && typeof message.channels.length === "number" || $util.isString(message.channels))) + return "channels: buffer expected"; + if (message.moniker != null && message.hasOwnProperty("moniker")) + if (!$util.isString(message.moniker)) + return "moniker: string expected"; + if (message.other != null && message.hasOwnProperty("other")) { + var error = $root.tendermint.p2p.DefaultNodeInfoOther.verify(message.other); + if (error) + return "other." + error; + } + return null; + }; + + /** + * Creates a DefaultNodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.p2p.DefaultNodeInfo + * @static + * @param {Object.} object Plain object + * @returns {tendermint.p2p.DefaultNodeInfo} DefaultNodeInfo + */ + DefaultNodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.p2p.DefaultNodeInfo) + return object; + var message = new $root.tendermint.p2p.DefaultNodeInfo(); + if (object.protocolVersion != null) { + if (typeof object.protocolVersion !== "object") + throw TypeError(".tendermint.p2p.DefaultNodeInfo.protocolVersion: object expected"); + message.protocolVersion = $root.tendermint.p2p.ProtocolVersion.fromObject(object.protocolVersion); + } + if (object.defaultNodeId != null) + message.defaultNodeId = String(object.defaultNodeId); + if (object.listenAddr != null) + message.listenAddr = String(object.listenAddr); + if (object.network != null) + message.network = String(object.network); + if (object.version != null) + message.version = String(object.version); + if (object.channels != null) + if (typeof object.channels === "string") + $util.base64.decode(object.channels, message.channels = $util.newBuffer($util.base64.length(object.channels)), 0); + else if (object.channels.length) + message.channels = object.channels; + if (object.moniker != null) + message.moniker = String(object.moniker); + if (object.other != null) { + if (typeof object.other !== "object") + throw TypeError(".tendermint.p2p.DefaultNodeInfo.other: object expected"); + message.other = $root.tendermint.p2p.DefaultNodeInfoOther.fromObject(object.other); + } + return message; + }; + + /** + * Creates a plain object from a DefaultNodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.p2p.DefaultNodeInfo + * @static + * @param {tendermint.p2p.DefaultNodeInfo} message DefaultNodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DefaultNodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.protocolVersion = null; + object.defaultNodeId = ""; + object.listenAddr = ""; + object.network = ""; + object.version = ""; + if (options.bytes === String) + object.channels = ""; + else { + object.channels = []; + if (options.bytes !== Array) + object.channels = $util.newBuffer(object.channels); + } + object.moniker = ""; + object.other = null; + } + if (message.protocolVersion != null && message.hasOwnProperty("protocolVersion")) + object.protocolVersion = $root.tendermint.p2p.ProtocolVersion.toObject(message.protocolVersion, options); + if (message.defaultNodeId != null && message.hasOwnProperty("defaultNodeId")) + object.defaultNodeId = message.defaultNodeId; + if (message.listenAddr != null && message.hasOwnProperty("listenAddr")) + object.listenAddr = message.listenAddr; + if (message.network != null && message.hasOwnProperty("network")) + object.network = message.network; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.channels != null && message.hasOwnProperty("channels")) + object.channels = options.bytes === String ? $util.base64.encode(message.channels, 0, message.channels.length) : options.bytes === Array ? Array.prototype.slice.call(message.channels) : message.channels; + if (message.moniker != null && message.hasOwnProperty("moniker")) + object.moniker = message.moniker; + if (message.other != null && message.hasOwnProperty("other")) + object.other = $root.tendermint.p2p.DefaultNodeInfoOther.toObject(message.other, options); + return object; + }; + + /** + * Converts this DefaultNodeInfo to JSON. + * @function toJSON + * @memberof tendermint.p2p.DefaultNodeInfo + * @instance + * @returns {Object.} JSON object + */ + DefaultNodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DefaultNodeInfo; + })(p2p.DefaultNodeInfo || {}); + + p2p.DefaultNodeInfoOther = (function(DefaultNodeInfoOther) { + + /** + * Properties of a DefaultNodeInfoOther. + * @memberof tendermint.p2p + * @interface IDefaultNodeInfoOther + * @property {string|null} [txIndex] DefaultNodeInfoOther txIndex + * @property {string|null} [rpcAddress] DefaultNodeInfoOther rpcAddress + */ + + /** + * Constructs a new DefaultNodeInfoOther. + * @memberof tendermint.p2p + * @classdesc Represents a DefaultNodeInfoOther. + * @implements IDefaultNodeInfoOther + * @constructor + * @param {tendermint.p2p.IDefaultNodeInfoOther=} [properties] Properties to set + */ + function DefaultNodeInfoOther(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DefaultNodeInfoOther txIndex. + * @member {string} txIndex + * @memberof tendermint.p2p.DefaultNodeInfoOther + * @instance + */ + DefaultNodeInfoOther.prototype.txIndex = ""; + + /** + * DefaultNodeInfoOther rpcAddress. + * @member {string} rpcAddress + * @memberof tendermint.p2p.DefaultNodeInfoOther + * @instance + */ + DefaultNodeInfoOther.prototype.rpcAddress = ""; + + /** + * Creates a new DefaultNodeInfoOther instance using the specified properties. + * @function create + * @memberof tendermint.p2p.DefaultNodeInfoOther + * @static + * @param {tendermint.p2p.IDefaultNodeInfoOther=} [properties] Properties to set + * @returns {tendermint.p2p.DefaultNodeInfoOther} DefaultNodeInfoOther instance + */ + DefaultNodeInfoOther.create = function create(properties) { + return new DefaultNodeInfoOther(properties); + }; + + /** + * Encodes the specified DefaultNodeInfoOther message. Does not implicitly {@link tendermint.p2p.DefaultNodeInfoOther.verify|verify} messages. + * @function encode + * @memberof tendermint.p2p.DefaultNodeInfoOther + * @static + * @param {tendermint.p2p.IDefaultNodeInfoOther} message DefaultNodeInfoOther message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DefaultNodeInfoOther.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.txIndex != null && Object.hasOwnProperty.call(message, "txIndex")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.txIndex); + if (message.rpcAddress != null && Object.hasOwnProperty.call(message, "rpcAddress")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.rpcAddress); + return writer; + }; + + /** + * Encodes the specified DefaultNodeInfoOther message, length delimited. Does not implicitly {@link tendermint.p2p.DefaultNodeInfoOther.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.p2p.DefaultNodeInfoOther + * @static + * @param {tendermint.p2p.IDefaultNodeInfoOther} message DefaultNodeInfoOther message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DefaultNodeInfoOther.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DefaultNodeInfoOther message from the specified reader or buffer. + * @function decode + * @memberof tendermint.p2p.DefaultNodeInfoOther + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.p2p.DefaultNodeInfoOther} DefaultNodeInfoOther + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DefaultNodeInfoOther.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.p2p.DefaultNodeInfoOther(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.txIndex = reader.string(); + break; + case 2: + message.rpcAddress = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DefaultNodeInfoOther message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.p2p.DefaultNodeInfoOther + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.p2p.DefaultNodeInfoOther} DefaultNodeInfoOther + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DefaultNodeInfoOther.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DefaultNodeInfoOther message. + * @function verify + * @memberof tendermint.p2p.DefaultNodeInfoOther + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DefaultNodeInfoOther.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.txIndex != null && message.hasOwnProperty("txIndex")) + if (!$util.isString(message.txIndex)) + return "txIndex: string expected"; + if (message.rpcAddress != null && message.hasOwnProperty("rpcAddress")) + if (!$util.isString(message.rpcAddress)) + return "rpcAddress: string expected"; + return null; + }; + + /** + * Creates a DefaultNodeInfoOther message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.p2p.DefaultNodeInfoOther + * @static + * @param {Object.} object Plain object + * @returns {tendermint.p2p.DefaultNodeInfoOther} DefaultNodeInfoOther + */ + DefaultNodeInfoOther.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.p2p.DefaultNodeInfoOther) + return object; + var message = new $root.tendermint.p2p.DefaultNodeInfoOther(); + if (object.txIndex != null) + message.txIndex = String(object.txIndex); + if (object.rpcAddress != null) + message.rpcAddress = String(object.rpcAddress); + return message; + }; + + /** + * Creates a plain object from a DefaultNodeInfoOther message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.p2p.DefaultNodeInfoOther + * @static + * @param {tendermint.p2p.DefaultNodeInfoOther} message DefaultNodeInfoOther + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DefaultNodeInfoOther.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.txIndex = ""; + object.rpcAddress = ""; + } + if (message.txIndex != null && message.hasOwnProperty("txIndex")) + object.txIndex = message.txIndex; + if (message.rpcAddress != null && message.hasOwnProperty("rpcAddress")) + object.rpcAddress = message.rpcAddress; + return object; + }; + + /** + * Converts this DefaultNodeInfoOther to JSON. + * @function toJSON + * @memberof tendermint.p2p.DefaultNodeInfoOther + * @instance + * @returns {Object.} JSON object + */ + DefaultNodeInfoOther.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DefaultNodeInfoOther; + })(p2p.DefaultNodeInfoOther || {}); + + return p2p; + })(tendermint.p2p || {}); + + /** + * Namespace types. + * @memberof tendermint + * @namespace + */ + + tendermint.types = (function(types) { + + types.Block = (function(Block) { + + /** + * Properties of a Block. + * @memberof tendermint.types + * @interface IBlock + * @property {tendermint.types.IHeader|null} [header] Block header + * @property {tendermint.types.IData|null} [data] Block data + * @property {tendermint.types.IEvidenceList|null} [evidence] Block evidence + * @property {tendermint.types.ICommit|null} [lastCommit] Block lastCommit + */ + + /** + * Constructs a new Block. + * @memberof tendermint.types + * @classdesc Represents a Block. + * @implements IBlock + * @constructor + * @param {tendermint.types.IBlock=} [properties] Properties to set + */ + function Block(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Block header. + * @member {tendermint.types.IHeader|null|undefined} header + * @memberof tendermint.types.Block + * @instance + */ + Block.prototype.header = null; + + /** + * Block data. + * @member {tendermint.types.IData|null|undefined} data + * @memberof tendermint.types.Block + * @instance + */ + Block.prototype.data = null; + + /** + * Block evidence. + * @member {tendermint.types.IEvidenceList|null|undefined} evidence + * @memberof tendermint.types.Block + * @instance + */ + Block.prototype.evidence = null; + + /** + * Block lastCommit. + * @member {tendermint.types.ICommit|null|undefined} lastCommit + * @memberof tendermint.types.Block + * @instance + */ + Block.prototype.lastCommit = null; + + /** + * Creates a new Block instance using the specified properties. + * @function create + * @memberof tendermint.types.Block + * @static + * @param {tendermint.types.IBlock=} [properties] Properties to set + * @returns {tendermint.types.Block} Block instance + */ + Block.create = function create(properties) { + return new Block(properties); + }; + + /** + * Encodes the specified Block message. Does not implicitly {@link tendermint.types.Block.verify|verify} messages. + * @function encode + * @memberof tendermint.types.Block + * @static + * @param {tendermint.types.IBlock} message Block message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Block.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.header != null && Object.hasOwnProperty.call(message, "header")) + $root.tendermint.types.Header.encode(message.header, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.data != null && Object.hasOwnProperty.call(message, "data")) + $root.tendermint.types.Data.encode(message.data, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.evidence != null && Object.hasOwnProperty.call(message, "evidence")) + $root.tendermint.types.EvidenceList.encode(message.evidence, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.lastCommit != null && Object.hasOwnProperty.call(message, "lastCommit")) + $root.tendermint.types.Commit.encode(message.lastCommit, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Block message, length delimited. Does not implicitly {@link tendermint.types.Block.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.types.Block + * @static + * @param {tendermint.types.IBlock} message Block message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Block.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Block message from the specified reader or buffer. + * @function decode + * @memberof tendermint.types.Block + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.types.Block} Block + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Block.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.Block(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.header = $root.tendermint.types.Header.decode(reader, reader.uint32()); + break; + case 2: + message.data = $root.tendermint.types.Data.decode(reader, reader.uint32()); + break; + case 3: + message.evidence = $root.tendermint.types.EvidenceList.decode(reader, reader.uint32()); + break; + case 4: + message.lastCommit = $root.tendermint.types.Commit.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Block message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.types.Block + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.types.Block} Block + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Block.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Block message. + * @function verify + * @memberof tendermint.types.Block + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Block.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.header != null && message.hasOwnProperty("header")) { + var error = $root.tendermint.types.Header.verify(message.header); + if (error) + return "header." + error; + } + if (message.data != null && message.hasOwnProperty("data")) { + var error = $root.tendermint.types.Data.verify(message.data); + if (error) + return "data." + error; + } + if (message.evidence != null && message.hasOwnProperty("evidence")) { + var error = $root.tendermint.types.EvidenceList.verify(message.evidence); + if (error) + return "evidence." + error; + } + if (message.lastCommit != null && message.hasOwnProperty("lastCommit")) { + var error = $root.tendermint.types.Commit.verify(message.lastCommit); + if (error) + return "lastCommit." + error; + } + return null; + }; + + /** + * Creates a Block message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.types.Block + * @static + * @param {Object.} object Plain object + * @returns {tendermint.types.Block} Block + */ + Block.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.types.Block) + return object; + var message = new $root.tendermint.types.Block(); + if (object.header != null) { + if (typeof object.header !== "object") + throw TypeError(".tendermint.types.Block.header: object expected"); + message.header = $root.tendermint.types.Header.fromObject(object.header); + } + if (object.data != null) { + if (typeof object.data !== "object") + throw TypeError(".tendermint.types.Block.data: object expected"); + message.data = $root.tendermint.types.Data.fromObject(object.data); + } + if (object.evidence != null) { + if (typeof object.evidence !== "object") + throw TypeError(".tendermint.types.Block.evidence: object expected"); + message.evidence = $root.tendermint.types.EvidenceList.fromObject(object.evidence); + } + if (object.lastCommit != null) { + if (typeof object.lastCommit !== "object") + throw TypeError(".tendermint.types.Block.lastCommit: object expected"); + message.lastCommit = $root.tendermint.types.Commit.fromObject(object.lastCommit); + } + return message; + }; + + /** + * Creates a plain object from a Block message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.types.Block + * @static + * @param {tendermint.types.Block} message Block + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Block.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.header = null; + object.data = null; + object.evidence = null; + object.lastCommit = null; + } + if (message.header != null && message.hasOwnProperty("header")) + object.header = $root.tendermint.types.Header.toObject(message.header, options); + if (message.data != null && message.hasOwnProperty("data")) + object.data = $root.tendermint.types.Data.toObject(message.data, options); + if (message.evidence != null && message.hasOwnProperty("evidence")) + object.evidence = $root.tendermint.types.EvidenceList.toObject(message.evidence, options); + if (message.lastCommit != null && message.hasOwnProperty("lastCommit")) + object.lastCommit = $root.tendermint.types.Commit.toObject(message.lastCommit, options); + return object; + }; + + /** + * Converts this Block to JSON. + * @function toJSON + * @memberof tendermint.types.Block + * @instance + * @returns {Object.} JSON object + */ + Block.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Block; + })(types.Block || {}); + + types.Evidence = (function(Evidence) { + + /** + * Properties of an Evidence. + * @memberof tendermint.types + * @interface IEvidence + * @property {tendermint.types.IDuplicateVoteEvidence|null} [duplicateVoteEvidence] Evidence duplicateVoteEvidence + * @property {tendermint.types.ILightClientAttackEvidence|null} [lightClientAttackEvidence] Evidence lightClientAttackEvidence + */ + + /** + * Constructs a new Evidence. + * @memberof tendermint.types + * @classdesc Represents an Evidence. + * @implements IEvidence + * @constructor + * @param {tendermint.types.IEvidence=} [properties] Properties to set + */ + function Evidence(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Evidence duplicateVoteEvidence. + * @member {tendermint.types.IDuplicateVoteEvidence|null|undefined} duplicateVoteEvidence + * @memberof tendermint.types.Evidence + * @instance + */ + Evidence.prototype.duplicateVoteEvidence = null; + + /** + * Evidence lightClientAttackEvidence. + * @member {tendermint.types.ILightClientAttackEvidence|null|undefined} lightClientAttackEvidence + * @memberof tendermint.types.Evidence + * @instance + */ + Evidence.prototype.lightClientAttackEvidence = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Evidence sum. + * @member {"duplicateVoteEvidence"|"lightClientAttackEvidence"|undefined} sum + * @memberof tendermint.types.Evidence + * @instance + */ + Object.defineProperty(Evidence.prototype, "sum", { + get: $util.oneOfGetter($oneOfFields = ["duplicateVoteEvidence", "lightClientAttackEvidence"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Evidence instance using the specified properties. + * @function create + * @memberof tendermint.types.Evidence + * @static + * @param {tendermint.types.IEvidence=} [properties] Properties to set + * @returns {tendermint.types.Evidence} Evidence instance + */ + Evidence.create = function create(properties) { + return new Evidence(properties); + }; + + /** + * Encodes the specified Evidence message. Does not implicitly {@link tendermint.types.Evidence.verify|verify} messages. + * @function encode + * @memberof tendermint.types.Evidence + * @static + * @param {tendermint.types.IEvidence} message Evidence message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Evidence.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.duplicateVoteEvidence != null && Object.hasOwnProperty.call(message, "duplicateVoteEvidence")) + $root.tendermint.types.DuplicateVoteEvidence.encode(message.duplicateVoteEvidence, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.lightClientAttackEvidence != null && Object.hasOwnProperty.call(message, "lightClientAttackEvidence")) + $root.tendermint.types.LightClientAttackEvidence.encode(message.lightClientAttackEvidence, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Evidence message, length delimited. Does not implicitly {@link tendermint.types.Evidence.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.types.Evidence + * @static + * @param {tendermint.types.IEvidence} message Evidence message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Evidence.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Evidence message from the specified reader or buffer. + * @function decode + * @memberof tendermint.types.Evidence + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.types.Evidence} Evidence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Evidence.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.Evidence(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.duplicateVoteEvidence = $root.tendermint.types.DuplicateVoteEvidence.decode(reader, reader.uint32()); + break; + case 2: + message.lightClientAttackEvidence = $root.tendermint.types.LightClientAttackEvidence.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Evidence message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.types.Evidence + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.types.Evidence} Evidence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Evidence.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Evidence message. + * @function verify + * @memberof tendermint.types.Evidence + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Evidence.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.duplicateVoteEvidence != null && message.hasOwnProperty("duplicateVoteEvidence")) { + properties.sum = 1; + { + var error = $root.tendermint.types.DuplicateVoteEvidence.verify(message.duplicateVoteEvidence); + if (error) + return "duplicateVoteEvidence." + error; + } + } + if (message.lightClientAttackEvidence != null && message.hasOwnProperty("lightClientAttackEvidence")) { + if (properties.sum === 1) + return "sum: multiple values"; + properties.sum = 1; + { + var error = $root.tendermint.types.LightClientAttackEvidence.verify(message.lightClientAttackEvidence); + if (error) + return "lightClientAttackEvidence." + error; + } + } + return null; + }; + + /** + * Creates an Evidence message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.types.Evidence + * @static + * @param {Object.} object Plain object + * @returns {tendermint.types.Evidence} Evidence + */ + Evidence.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.types.Evidence) + return object; + var message = new $root.tendermint.types.Evidence(); + if (object.duplicateVoteEvidence != null) { + if (typeof object.duplicateVoteEvidence !== "object") + throw TypeError(".tendermint.types.Evidence.duplicateVoteEvidence: object expected"); + message.duplicateVoteEvidence = $root.tendermint.types.DuplicateVoteEvidence.fromObject(object.duplicateVoteEvidence); + } + if (object.lightClientAttackEvidence != null) { + if (typeof object.lightClientAttackEvidence !== "object") + throw TypeError(".tendermint.types.Evidence.lightClientAttackEvidence: object expected"); + message.lightClientAttackEvidence = $root.tendermint.types.LightClientAttackEvidence.fromObject(object.lightClientAttackEvidence); + } + return message; + }; + + /** + * Creates a plain object from an Evidence message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.types.Evidence + * @static + * @param {tendermint.types.Evidence} message Evidence + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Evidence.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.duplicateVoteEvidence != null && message.hasOwnProperty("duplicateVoteEvidence")) { + object.duplicateVoteEvidence = $root.tendermint.types.DuplicateVoteEvidence.toObject(message.duplicateVoteEvidence, options); + if (options.oneofs) + object.sum = "duplicateVoteEvidence"; + } + if (message.lightClientAttackEvidence != null && message.hasOwnProperty("lightClientAttackEvidence")) { + object.lightClientAttackEvidence = $root.tendermint.types.LightClientAttackEvidence.toObject(message.lightClientAttackEvidence, options); + if (options.oneofs) + object.sum = "lightClientAttackEvidence"; + } + return object; + }; + + /** + * Converts this Evidence to JSON. + * @function toJSON + * @memberof tendermint.types.Evidence + * @instance + * @returns {Object.} JSON object + */ + Evidence.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Evidence; + })(types.Evidence || {}); + + types.DuplicateVoteEvidence = (function(DuplicateVoteEvidence) { + + /** + * Properties of a DuplicateVoteEvidence. + * @memberof tendermint.types + * @interface IDuplicateVoteEvidence + * @property {tendermint.types.IVote|null} [voteA] DuplicateVoteEvidence voteA + * @property {tendermint.types.IVote|null} [voteB] DuplicateVoteEvidence voteB + * @property {number|Long|null} [totalVotingPower] DuplicateVoteEvidence totalVotingPower + * @property {number|Long|null} [validatorPower] DuplicateVoteEvidence validatorPower + * @property {google.protobuf.ITimestamp|null} [timestamp] DuplicateVoteEvidence timestamp + */ + + /** + * Constructs a new DuplicateVoteEvidence. + * @memberof tendermint.types + * @classdesc Represents a DuplicateVoteEvidence. + * @implements IDuplicateVoteEvidence + * @constructor + * @param {tendermint.types.IDuplicateVoteEvidence=} [properties] Properties to set + */ + function DuplicateVoteEvidence(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DuplicateVoteEvidence voteA. + * @member {tendermint.types.IVote|null|undefined} voteA + * @memberof tendermint.types.DuplicateVoteEvidence + * @instance + */ + DuplicateVoteEvidence.prototype.voteA = null; + + /** + * DuplicateVoteEvidence voteB. + * @member {tendermint.types.IVote|null|undefined} voteB + * @memberof tendermint.types.DuplicateVoteEvidence + * @instance + */ + DuplicateVoteEvidence.prototype.voteB = null; + + /** + * DuplicateVoteEvidence totalVotingPower. + * @member {number|Long} totalVotingPower + * @memberof tendermint.types.DuplicateVoteEvidence + * @instance + */ + DuplicateVoteEvidence.prototype.totalVotingPower = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * DuplicateVoteEvidence validatorPower. + * @member {number|Long} validatorPower + * @memberof tendermint.types.DuplicateVoteEvidence + * @instance + */ + DuplicateVoteEvidence.prototype.validatorPower = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * DuplicateVoteEvidence timestamp. + * @member {google.protobuf.ITimestamp|null|undefined} timestamp + * @memberof tendermint.types.DuplicateVoteEvidence + * @instance + */ + DuplicateVoteEvidence.prototype.timestamp = null; + + /** + * Creates a new DuplicateVoteEvidence instance using the specified properties. + * @function create + * @memberof tendermint.types.DuplicateVoteEvidence + * @static + * @param {tendermint.types.IDuplicateVoteEvidence=} [properties] Properties to set + * @returns {tendermint.types.DuplicateVoteEvidence} DuplicateVoteEvidence instance + */ + DuplicateVoteEvidence.create = function create(properties) { + return new DuplicateVoteEvidence(properties); + }; + + /** + * Encodes the specified DuplicateVoteEvidence message. Does not implicitly {@link tendermint.types.DuplicateVoteEvidence.verify|verify} messages. + * @function encode + * @memberof tendermint.types.DuplicateVoteEvidence + * @static + * @param {tendermint.types.IDuplicateVoteEvidence} message DuplicateVoteEvidence message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DuplicateVoteEvidence.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.voteA != null && Object.hasOwnProperty.call(message, "voteA")) + $root.tendermint.types.Vote.encode(message.voteA, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.voteB != null && Object.hasOwnProperty.call(message, "voteB")) + $root.tendermint.types.Vote.encode(message.voteB, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.totalVotingPower != null && Object.hasOwnProperty.call(message, "totalVotingPower")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.totalVotingPower); + if (message.validatorPower != null && Object.hasOwnProperty.call(message, "validatorPower")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.validatorPower); + if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) + $root.google.protobuf.Timestamp.encode(message.timestamp, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DuplicateVoteEvidence message, length delimited. Does not implicitly {@link tendermint.types.DuplicateVoteEvidence.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.types.DuplicateVoteEvidence + * @static + * @param {tendermint.types.IDuplicateVoteEvidence} message DuplicateVoteEvidence message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DuplicateVoteEvidence.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DuplicateVoteEvidence message from the specified reader or buffer. + * @function decode + * @memberof tendermint.types.DuplicateVoteEvidence + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.types.DuplicateVoteEvidence} DuplicateVoteEvidence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DuplicateVoteEvidence.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.DuplicateVoteEvidence(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.voteA = $root.tendermint.types.Vote.decode(reader, reader.uint32()); + break; + case 2: + message.voteB = $root.tendermint.types.Vote.decode(reader, reader.uint32()); + break; + case 3: + message.totalVotingPower = reader.int64(); + break; + case 4: + message.validatorPower = reader.int64(); + break; + case 5: + message.timestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DuplicateVoteEvidence message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.types.DuplicateVoteEvidence + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.types.DuplicateVoteEvidence} DuplicateVoteEvidence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DuplicateVoteEvidence.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DuplicateVoteEvidence message. + * @function verify + * @memberof tendermint.types.DuplicateVoteEvidence + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DuplicateVoteEvidence.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.voteA != null && message.hasOwnProperty("voteA")) { + var error = $root.tendermint.types.Vote.verify(message.voteA); + if (error) + return "voteA." + error; + } + if (message.voteB != null && message.hasOwnProperty("voteB")) { + var error = $root.tendermint.types.Vote.verify(message.voteB); + if (error) + return "voteB." + error; + } + if (message.totalVotingPower != null && message.hasOwnProperty("totalVotingPower")) + if (!$util.isInteger(message.totalVotingPower) && !(message.totalVotingPower && $util.isInteger(message.totalVotingPower.low) && $util.isInteger(message.totalVotingPower.high))) + return "totalVotingPower: integer|Long expected"; + if (message.validatorPower != null && message.hasOwnProperty("validatorPower")) + if (!$util.isInteger(message.validatorPower) && !(message.validatorPower && $util.isInteger(message.validatorPower.low) && $util.isInteger(message.validatorPower.high))) + return "validatorPower: integer|Long expected"; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) { + var error = $root.google.protobuf.Timestamp.verify(message.timestamp); + if (error) + return "timestamp." + error; + } + return null; + }; + + /** + * Creates a DuplicateVoteEvidence message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.types.DuplicateVoteEvidence + * @static + * @param {Object.} object Plain object + * @returns {tendermint.types.DuplicateVoteEvidence} DuplicateVoteEvidence + */ + DuplicateVoteEvidence.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.types.DuplicateVoteEvidence) + return object; + var message = new $root.tendermint.types.DuplicateVoteEvidence(); + if (object.voteA != null) { + if (typeof object.voteA !== "object") + throw TypeError(".tendermint.types.DuplicateVoteEvidence.voteA: object expected"); + message.voteA = $root.tendermint.types.Vote.fromObject(object.voteA); + } + if (object.voteB != null) { + if (typeof object.voteB !== "object") + throw TypeError(".tendermint.types.DuplicateVoteEvidence.voteB: object expected"); + message.voteB = $root.tendermint.types.Vote.fromObject(object.voteB); + } + if (object.totalVotingPower != null) + if ($util.Long) + (message.totalVotingPower = $util.Long.fromValue(object.totalVotingPower)).unsigned = false; + else if (typeof object.totalVotingPower === "string") + message.totalVotingPower = parseInt(object.totalVotingPower, 10); + else if (typeof object.totalVotingPower === "number") + message.totalVotingPower = object.totalVotingPower; + else if (typeof object.totalVotingPower === "object") + message.totalVotingPower = new $util.LongBits(object.totalVotingPower.low >>> 0, object.totalVotingPower.high >>> 0).toNumber(); + if (object.validatorPower != null) + if ($util.Long) + (message.validatorPower = $util.Long.fromValue(object.validatorPower)).unsigned = false; + else if (typeof object.validatorPower === "string") + message.validatorPower = parseInt(object.validatorPower, 10); + else if (typeof object.validatorPower === "number") + message.validatorPower = object.validatorPower; + else if (typeof object.validatorPower === "object") + message.validatorPower = new $util.LongBits(object.validatorPower.low >>> 0, object.validatorPower.high >>> 0).toNumber(); + if (object.timestamp != null) { + if (typeof object.timestamp !== "object") + throw TypeError(".tendermint.types.DuplicateVoteEvidence.timestamp: object expected"); + message.timestamp = $root.google.protobuf.Timestamp.fromObject(object.timestamp); + } + return message; + }; + + /** + * Creates a plain object from a DuplicateVoteEvidence message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.types.DuplicateVoteEvidence + * @static + * @param {tendermint.types.DuplicateVoteEvidence} message DuplicateVoteEvidence + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DuplicateVoteEvidence.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.voteA = null; + object.voteB = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.totalVotingPower = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.totalVotingPower = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.validatorPower = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.validatorPower = options.longs === String ? "0" : 0; + object.timestamp = null; + } + if (message.voteA != null && message.hasOwnProperty("voteA")) + object.voteA = $root.tendermint.types.Vote.toObject(message.voteA, options); + if (message.voteB != null && message.hasOwnProperty("voteB")) + object.voteB = $root.tendermint.types.Vote.toObject(message.voteB, options); + if (message.totalVotingPower != null && message.hasOwnProperty("totalVotingPower")) + if (typeof message.totalVotingPower === "number") + object.totalVotingPower = options.longs === String ? String(message.totalVotingPower) : message.totalVotingPower; + else + object.totalVotingPower = options.longs === String ? $util.Long.prototype.toString.call(message.totalVotingPower) : options.longs === Number ? new $util.LongBits(message.totalVotingPower.low >>> 0, message.totalVotingPower.high >>> 0).toNumber() : message.totalVotingPower; + if (message.validatorPower != null && message.hasOwnProperty("validatorPower")) + if (typeof message.validatorPower === "number") + object.validatorPower = options.longs === String ? String(message.validatorPower) : message.validatorPower; + else + object.validatorPower = options.longs === String ? $util.Long.prototype.toString.call(message.validatorPower) : options.longs === Number ? new $util.LongBits(message.validatorPower.low >>> 0, message.validatorPower.high >>> 0).toNumber() : message.validatorPower; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + object.timestamp = $root.google.protobuf.Timestamp.toObject(message.timestamp, options); + return object; + }; + + /** + * Converts this DuplicateVoteEvidence to JSON. + * @function toJSON + * @memberof tendermint.types.DuplicateVoteEvidence + * @instance + * @returns {Object.} JSON object + */ + DuplicateVoteEvidence.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DuplicateVoteEvidence; + })(types.DuplicateVoteEvidence || {}); + + types.LightClientAttackEvidence = (function(LightClientAttackEvidence) { + + /** + * Properties of a LightClientAttackEvidence. + * @memberof tendermint.types + * @interface ILightClientAttackEvidence + * @property {tendermint.types.ILightBlock|null} [conflictingBlock] LightClientAttackEvidence conflictingBlock + * @property {number|Long|null} [commonHeight] LightClientAttackEvidence commonHeight + * @property {Array.|null} [byzantineValidators] LightClientAttackEvidence byzantineValidators + * @property {number|Long|null} [totalVotingPower] LightClientAttackEvidence totalVotingPower + * @property {google.protobuf.ITimestamp|null} [timestamp] LightClientAttackEvidence timestamp + */ + + /** + * Constructs a new LightClientAttackEvidence. + * @memberof tendermint.types + * @classdesc Represents a LightClientAttackEvidence. + * @implements ILightClientAttackEvidence + * @constructor + * @param {tendermint.types.ILightClientAttackEvidence=} [properties] Properties to set + */ + function LightClientAttackEvidence(properties) { + this.byzantineValidators = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LightClientAttackEvidence conflictingBlock. + * @member {tendermint.types.ILightBlock|null|undefined} conflictingBlock + * @memberof tendermint.types.LightClientAttackEvidence + * @instance + */ + LightClientAttackEvidence.prototype.conflictingBlock = null; + + /** + * LightClientAttackEvidence commonHeight. + * @member {number|Long} commonHeight + * @memberof tendermint.types.LightClientAttackEvidence + * @instance + */ + LightClientAttackEvidence.prototype.commonHeight = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * LightClientAttackEvidence byzantineValidators. + * @member {Array.} byzantineValidators + * @memberof tendermint.types.LightClientAttackEvidence + * @instance + */ + LightClientAttackEvidence.prototype.byzantineValidators = $util.emptyArray; + + /** + * LightClientAttackEvidence totalVotingPower. + * @member {number|Long} totalVotingPower + * @memberof tendermint.types.LightClientAttackEvidence + * @instance + */ + LightClientAttackEvidence.prototype.totalVotingPower = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * LightClientAttackEvidence timestamp. + * @member {google.protobuf.ITimestamp|null|undefined} timestamp + * @memberof tendermint.types.LightClientAttackEvidence + * @instance + */ + LightClientAttackEvidence.prototype.timestamp = null; + + /** + * Creates a new LightClientAttackEvidence instance using the specified properties. + * @function create + * @memberof tendermint.types.LightClientAttackEvidence + * @static + * @param {tendermint.types.ILightClientAttackEvidence=} [properties] Properties to set + * @returns {tendermint.types.LightClientAttackEvidence} LightClientAttackEvidence instance + */ + LightClientAttackEvidence.create = function create(properties) { + return new LightClientAttackEvidence(properties); + }; + + /** + * Encodes the specified LightClientAttackEvidence message. Does not implicitly {@link tendermint.types.LightClientAttackEvidence.verify|verify} messages. + * @function encode + * @memberof tendermint.types.LightClientAttackEvidence + * @static + * @param {tendermint.types.ILightClientAttackEvidence} message LightClientAttackEvidence message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LightClientAttackEvidence.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.conflictingBlock != null && Object.hasOwnProperty.call(message, "conflictingBlock")) + $root.tendermint.types.LightBlock.encode(message.conflictingBlock, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.commonHeight != null && Object.hasOwnProperty.call(message, "commonHeight")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.commonHeight); + if (message.byzantineValidators != null && message.byzantineValidators.length) + for (var i = 0; i < message.byzantineValidators.length; ++i) + $root.tendermint.types.Validator.encode(message.byzantineValidators[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.totalVotingPower != null && Object.hasOwnProperty.call(message, "totalVotingPower")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.totalVotingPower); + if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) + $root.google.protobuf.Timestamp.encode(message.timestamp, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LightClientAttackEvidence message, length delimited. Does not implicitly {@link tendermint.types.LightClientAttackEvidence.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.types.LightClientAttackEvidence + * @static + * @param {tendermint.types.ILightClientAttackEvidence} message LightClientAttackEvidence message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LightClientAttackEvidence.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LightClientAttackEvidence message from the specified reader or buffer. + * @function decode + * @memberof tendermint.types.LightClientAttackEvidence + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.types.LightClientAttackEvidence} LightClientAttackEvidence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LightClientAttackEvidence.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.LightClientAttackEvidence(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.conflictingBlock = $root.tendermint.types.LightBlock.decode(reader, reader.uint32()); + break; + case 2: + message.commonHeight = reader.int64(); + break; + case 3: + if (!(message.byzantineValidators && message.byzantineValidators.length)) + message.byzantineValidators = []; + message.byzantineValidators.push($root.tendermint.types.Validator.decode(reader, reader.uint32())); + break; + case 4: + message.totalVotingPower = reader.int64(); + break; + case 5: + message.timestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LightClientAttackEvidence message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.types.LightClientAttackEvidence + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.types.LightClientAttackEvidence} LightClientAttackEvidence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LightClientAttackEvidence.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LightClientAttackEvidence message. + * @function verify + * @memberof tendermint.types.LightClientAttackEvidence + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LightClientAttackEvidence.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.conflictingBlock != null && message.hasOwnProperty("conflictingBlock")) { + var error = $root.tendermint.types.LightBlock.verify(message.conflictingBlock); + if (error) + return "conflictingBlock." + error; + } + if (message.commonHeight != null && message.hasOwnProperty("commonHeight")) + if (!$util.isInteger(message.commonHeight) && !(message.commonHeight && $util.isInteger(message.commonHeight.low) && $util.isInteger(message.commonHeight.high))) + return "commonHeight: integer|Long expected"; + if (message.byzantineValidators != null && message.hasOwnProperty("byzantineValidators")) { + if (!Array.isArray(message.byzantineValidators)) + return "byzantineValidators: array expected"; + for (var i = 0; i < message.byzantineValidators.length; ++i) { + var error = $root.tendermint.types.Validator.verify(message.byzantineValidators[i]); + if (error) + return "byzantineValidators." + error; + } + } + if (message.totalVotingPower != null && message.hasOwnProperty("totalVotingPower")) + if (!$util.isInteger(message.totalVotingPower) && !(message.totalVotingPower && $util.isInteger(message.totalVotingPower.low) && $util.isInteger(message.totalVotingPower.high))) + return "totalVotingPower: integer|Long expected"; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) { + var error = $root.google.protobuf.Timestamp.verify(message.timestamp); + if (error) + return "timestamp." + error; + } + return null; + }; + + /** + * Creates a LightClientAttackEvidence message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.types.LightClientAttackEvidence + * @static + * @param {Object.} object Plain object + * @returns {tendermint.types.LightClientAttackEvidence} LightClientAttackEvidence + */ + LightClientAttackEvidence.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.types.LightClientAttackEvidence) + return object; + var message = new $root.tendermint.types.LightClientAttackEvidence(); + if (object.conflictingBlock != null) { + if (typeof object.conflictingBlock !== "object") + throw TypeError(".tendermint.types.LightClientAttackEvidence.conflictingBlock: object expected"); + message.conflictingBlock = $root.tendermint.types.LightBlock.fromObject(object.conflictingBlock); + } + if (object.commonHeight != null) + if ($util.Long) + (message.commonHeight = $util.Long.fromValue(object.commonHeight)).unsigned = false; + else if (typeof object.commonHeight === "string") + message.commonHeight = parseInt(object.commonHeight, 10); + else if (typeof object.commonHeight === "number") + message.commonHeight = object.commonHeight; + else if (typeof object.commonHeight === "object") + message.commonHeight = new $util.LongBits(object.commonHeight.low >>> 0, object.commonHeight.high >>> 0).toNumber(); + if (object.byzantineValidators) { + if (!Array.isArray(object.byzantineValidators)) + throw TypeError(".tendermint.types.LightClientAttackEvidence.byzantineValidators: array expected"); + message.byzantineValidators = []; + for (var i = 0; i < object.byzantineValidators.length; ++i) { + if (typeof object.byzantineValidators[i] !== "object") + throw TypeError(".tendermint.types.LightClientAttackEvidence.byzantineValidators: object expected"); + message.byzantineValidators[i] = $root.tendermint.types.Validator.fromObject(object.byzantineValidators[i]); + } + } + if (object.totalVotingPower != null) + if ($util.Long) + (message.totalVotingPower = $util.Long.fromValue(object.totalVotingPower)).unsigned = false; + else if (typeof object.totalVotingPower === "string") + message.totalVotingPower = parseInt(object.totalVotingPower, 10); + else if (typeof object.totalVotingPower === "number") + message.totalVotingPower = object.totalVotingPower; + else if (typeof object.totalVotingPower === "object") + message.totalVotingPower = new $util.LongBits(object.totalVotingPower.low >>> 0, object.totalVotingPower.high >>> 0).toNumber(); + if (object.timestamp != null) { + if (typeof object.timestamp !== "object") + throw TypeError(".tendermint.types.LightClientAttackEvidence.timestamp: object expected"); + message.timestamp = $root.google.protobuf.Timestamp.fromObject(object.timestamp); + } + return message; + }; + + /** + * Creates a plain object from a LightClientAttackEvidence message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.types.LightClientAttackEvidence + * @static + * @param {tendermint.types.LightClientAttackEvidence} message LightClientAttackEvidence + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LightClientAttackEvidence.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.byzantineValidators = []; + if (options.defaults) { + object.conflictingBlock = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.commonHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.commonHeight = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.totalVotingPower = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.totalVotingPower = options.longs === String ? "0" : 0; + object.timestamp = null; + } + if (message.conflictingBlock != null && message.hasOwnProperty("conflictingBlock")) + object.conflictingBlock = $root.tendermint.types.LightBlock.toObject(message.conflictingBlock, options); + if (message.commonHeight != null && message.hasOwnProperty("commonHeight")) + if (typeof message.commonHeight === "number") + object.commonHeight = options.longs === String ? String(message.commonHeight) : message.commonHeight; + else + object.commonHeight = options.longs === String ? $util.Long.prototype.toString.call(message.commonHeight) : options.longs === Number ? new $util.LongBits(message.commonHeight.low >>> 0, message.commonHeight.high >>> 0).toNumber() : message.commonHeight; + if (message.byzantineValidators && message.byzantineValidators.length) { + object.byzantineValidators = []; + for (var j = 0; j < message.byzantineValidators.length; ++j) + object.byzantineValidators[j] = $root.tendermint.types.Validator.toObject(message.byzantineValidators[j], options); + } + if (message.totalVotingPower != null && message.hasOwnProperty("totalVotingPower")) + if (typeof message.totalVotingPower === "number") + object.totalVotingPower = options.longs === String ? String(message.totalVotingPower) : message.totalVotingPower; + else + object.totalVotingPower = options.longs === String ? $util.Long.prototype.toString.call(message.totalVotingPower) : options.longs === Number ? new $util.LongBits(message.totalVotingPower.low >>> 0, message.totalVotingPower.high >>> 0).toNumber() : message.totalVotingPower; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + object.timestamp = $root.google.protobuf.Timestamp.toObject(message.timestamp, options); + return object; + }; + + /** + * Converts this LightClientAttackEvidence to JSON. + * @function toJSON + * @memberof tendermint.types.LightClientAttackEvidence + * @instance + * @returns {Object.} JSON object + */ + LightClientAttackEvidence.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return LightClientAttackEvidence; + })(types.LightClientAttackEvidence || {}); + + types.EvidenceList = (function(EvidenceList) { + + /** + * Properties of an EvidenceList. + * @memberof tendermint.types + * @interface IEvidenceList + * @property {Array.|null} [evidence] EvidenceList evidence + */ + + /** + * Constructs a new EvidenceList. + * @memberof tendermint.types + * @classdesc Represents an EvidenceList. + * @implements IEvidenceList + * @constructor + * @param {tendermint.types.IEvidenceList=} [properties] Properties to set + */ + function EvidenceList(properties) { + this.evidence = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EvidenceList evidence. + * @member {Array.} evidence + * @memberof tendermint.types.EvidenceList + * @instance + */ + EvidenceList.prototype.evidence = $util.emptyArray; + + /** + * Creates a new EvidenceList instance using the specified properties. + * @function create + * @memberof tendermint.types.EvidenceList + * @static + * @param {tendermint.types.IEvidenceList=} [properties] Properties to set + * @returns {tendermint.types.EvidenceList} EvidenceList instance + */ + EvidenceList.create = function create(properties) { + return new EvidenceList(properties); + }; + + /** + * Encodes the specified EvidenceList message. Does not implicitly {@link tendermint.types.EvidenceList.verify|verify} messages. + * @function encode + * @memberof tendermint.types.EvidenceList + * @static + * @param {tendermint.types.IEvidenceList} message EvidenceList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EvidenceList.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.evidence != null && message.evidence.length) + for (var i = 0; i < message.evidence.length; ++i) + $root.tendermint.types.Evidence.encode(message.evidence[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EvidenceList message, length delimited. Does not implicitly {@link tendermint.types.EvidenceList.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.types.EvidenceList + * @static + * @param {tendermint.types.IEvidenceList} message EvidenceList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EvidenceList.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EvidenceList message from the specified reader or buffer. + * @function decode + * @memberof tendermint.types.EvidenceList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.types.EvidenceList} EvidenceList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EvidenceList.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.EvidenceList(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.evidence && message.evidence.length)) + message.evidence = []; + message.evidence.push($root.tendermint.types.Evidence.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EvidenceList message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.types.EvidenceList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.types.EvidenceList} EvidenceList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EvidenceList.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EvidenceList message. + * @function verify + * @memberof tendermint.types.EvidenceList + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EvidenceList.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.evidence != null && message.hasOwnProperty("evidence")) { + if (!Array.isArray(message.evidence)) + return "evidence: array expected"; + for (var i = 0; i < message.evidence.length; ++i) { + var error = $root.tendermint.types.Evidence.verify(message.evidence[i]); + if (error) + return "evidence." + error; + } + } + return null; + }; + + /** + * Creates an EvidenceList message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.types.EvidenceList + * @static + * @param {Object.} object Plain object + * @returns {tendermint.types.EvidenceList} EvidenceList + */ + EvidenceList.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.types.EvidenceList) + return object; + var message = new $root.tendermint.types.EvidenceList(); + if (object.evidence) { + if (!Array.isArray(object.evidence)) + throw TypeError(".tendermint.types.EvidenceList.evidence: array expected"); + message.evidence = []; + for (var i = 0; i < object.evidence.length; ++i) { + if (typeof object.evidence[i] !== "object") + throw TypeError(".tendermint.types.EvidenceList.evidence: object expected"); + message.evidence[i] = $root.tendermint.types.Evidence.fromObject(object.evidence[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EvidenceList message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.types.EvidenceList + * @static + * @param {tendermint.types.EvidenceList} message EvidenceList + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EvidenceList.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.evidence = []; + if (message.evidence && message.evidence.length) { + object.evidence = []; + for (var j = 0; j < message.evidence.length; ++j) + object.evidence[j] = $root.tendermint.types.Evidence.toObject(message.evidence[j], options); + } + return object; + }; + + /** + * Converts this EvidenceList to JSON. + * @function toJSON + * @memberof tendermint.types.EvidenceList + * @instance + * @returns {Object.} JSON object + */ + EvidenceList.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EvidenceList; + })(types.EvidenceList || {}); + + types.ConsensusParams = (function(ConsensusParams) { + + /** + * Properties of a ConsensusParams. + * @memberof tendermint.types + * @interface IConsensusParams + * @property {tendermint.types.IBlockParams|null} [block] ConsensusParams block + * @property {tendermint.types.IEvidenceParams|null} [evidence] ConsensusParams evidence + * @property {tendermint.types.IValidatorParams|null} [validator] ConsensusParams validator + * @property {tendermint.types.IVersionParams|null} [version] ConsensusParams version + */ + + /** + * Constructs a new ConsensusParams. + * @memberof tendermint.types + * @classdesc Represents a ConsensusParams. + * @implements IConsensusParams + * @constructor + * @param {tendermint.types.IConsensusParams=} [properties] Properties to set + */ + function ConsensusParams(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ConsensusParams block. + * @member {tendermint.types.IBlockParams|null|undefined} block + * @memberof tendermint.types.ConsensusParams + * @instance + */ + ConsensusParams.prototype.block = null; + + /** + * ConsensusParams evidence. + * @member {tendermint.types.IEvidenceParams|null|undefined} evidence + * @memberof tendermint.types.ConsensusParams + * @instance + */ + ConsensusParams.prototype.evidence = null; + + /** + * ConsensusParams validator. + * @member {tendermint.types.IValidatorParams|null|undefined} validator + * @memberof tendermint.types.ConsensusParams + * @instance + */ + ConsensusParams.prototype.validator = null; + + /** + * ConsensusParams version. + * @member {tendermint.types.IVersionParams|null|undefined} version + * @memberof tendermint.types.ConsensusParams + * @instance + */ + ConsensusParams.prototype.version = null; + + /** + * Creates a new ConsensusParams instance using the specified properties. + * @function create + * @memberof tendermint.types.ConsensusParams + * @static + * @param {tendermint.types.IConsensusParams=} [properties] Properties to set + * @returns {tendermint.types.ConsensusParams} ConsensusParams instance + */ + ConsensusParams.create = function create(properties) { + return new ConsensusParams(properties); + }; + + /** + * Encodes the specified ConsensusParams message. Does not implicitly {@link tendermint.types.ConsensusParams.verify|verify} messages. + * @function encode + * @memberof tendermint.types.ConsensusParams + * @static + * @param {tendermint.types.IConsensusParams} message ConsensusParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConsensusParams.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.block != null && Object.hasOwnProperty.call(message, "block")) + $root.tendermint.types.BlockParams.encode(message.block, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.evidence != null && Object.hasOwnProperty.call(message, "evidence")) + $root.tendermint.types.EvidenceParams.encode(message.evidence, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.validator != null && Object.hasOwnProperty.call(message, "validator")) + $root.tendermint.types.ValidatorParams.encode(message.validator, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + $root.tendermint.types.VersionParams.encode(message.version, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ConsensusParams message, length delimited. Does not implicitly {@link tendermint.types.ConsensusParams.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.types.ConsensusParams + * @static + * @param {tendermint.types.IConsensusParams} message ConsensusParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConsensusParams.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConsensusParams message from the specified reader or buffer. + * @function decode + * @memberof tendermint.types.ConsensusParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.types.ConsensusParams} ConsensusParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConsensusParams.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.ConsensusParams(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.block = $root.tendermint.types.BlockParams.decode(reader, reader.uint32()); + break; + case 2: + message.evidence = $root.tendermint.types.EvidenceParams.decode(reader, reader.uint32()); + break; + case 3: + message.validator = $root.tendermint.types.ValidatorParams.decode(reader, reader.uint32()); + break; + case 4: + message.version = $root.tendermint.types.VersionParams.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ConsensusParams message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.types.ConsensusParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.types.ConsensusParams} ConsensusParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConsensusParams.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConsensusParams message. + * @function verify + * @memberof tendermint.types.ConsensusParams + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConsensusParams.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.block != null && message.hasOwnProperty("block")) { + var error = $root.tendermint.types.BlockParams.verify(message.block); + if (error) + return "block." + error; + } + if (message.evidence != null && message.hasOwnProperty("evidence")) { + var error = $root.tendermint.types.EvidenceParams.verify(message.evidence); + if (error) + return "evidence." + error; + } + if (message.validator != null && message.hasOwnProperty("validator")) { + var error = $root.tendermint.types.ValidatorParams.verify(message.validator); + if (error) + return "validator." + error; + } + if (message.version != null && message.hasOwnProperty("version")) { + var error = $root.tendermint.types.VersionParams.verify(message.version); + if (error) + return "version." + error; + } + return null; + }; + + /** + * Creates a ConsensusParams message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.types.ConsensusParams + * @static + * @param {Object.} object Plain object + * @returns {tendermint.types.ConsensusParams} ConsensusParams + */ + ConsensusParams.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.types.ConsensusParams) + return object; + var message = new $root.tendermint.types.ConsensusParams(); + if (object.block != null) { + if (typeof object.block !== "object") + throw TypeError(".tendermint.types.ConsensusParams.block: object expected"); + message.block = $root.tendermint.types.BlockParams.fromObject(object.block); + } + if (object.evidence != null) { + if (typeof object.evidence !== "object") + throw TypeError(".tendermint.types.ConsensusParams.evidence: object expected"); + message.evidence = $root.tendermint.types.EvidenceParams.fromObject(object.evidence); + } + if (object.validator != null) { + if (typeof object.validator !== "object") + throw TypeError(".tendermint.types.ConsensusParams.validator: object expected"); + message.validator = $root.tendermint.types.ValidatorParams.fromObject(object.validator); + } + if (object.version != null) { + if (typeof object.version !== "object") + throw TypeError(".tendermint.types.ConsensusParams.version: object expected"); + message.version = $root.tendermint.types.VersionParams.fromObject(object.version); + } + return message; + }; + + /** + * Creates a plain object from a ConsensusParams message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.types.ConsensusParams + * @static + * @param {tendermint.types.ConsensusParams} message ConsensusParams + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConsensusParams.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.block = null; + object.evidence = null; + object.validator = null; + object.version = null; + } + if (message.block != null && message.hasOwnProperty("block")) + object.block = $root.tendermint.types.BlockParams.toObject(message.block, options); + if (message.evidence != null && message.hasOwnProperty("evidence")) + object.evidence = $root.tendermint.types.EvidenceParams.toObject(message.evidence, options); + if (message.validator != null && message.hasOwnProperty("validator")) + object.validator = $root.tendermint.types.ValidatorParams.toObject(message.validator, options); + if (message.version != null && message.hasOwnProperty("version")) + object.version = $root.tendermint.types.VersionParams.toObject(message.version, options); + return object; + }; + + /** + * Converts this ConsensusParams to JSON. + * @function toJSON + * @memberof tendermint.types.ConsensusParams + * @instance + * @returns {Object.} JSON object + */ + ConsensusParams.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ConsensusParams; + })(types.ConsensusParams || {}); + + types.BlockParams = (function(BlockParams) { + + /** + * Properties of a BlockParams. + * @memberof tendermint.types + * @interface IBlockParams + * @property {number|Long|null} [maxBytes] BlockParams maxBytes + * @property {number|Long|null} [maxGas] BlockParams maxGas + * @property {number|Long|null} [timeIotaMs] BlockParams timeIotaMs + */ + + /** + * Constructs a new BlockParams. + * @memberof tendermint.types + * @classdesc Represents a BlockParams. + * @implements IBlockParams + * @constructor + * @param {tendermint.types.IBlockParams=} [properties] Properties to set + */ + function BlockParams(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BlockParams maxBytes. + * @member {number|Long} maxBytes + * @memberof tendermint.types.BlockParams + * @instance + */ + BlockParams.prototype.maxBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * BlockParams maxGas. + * @member {number|Long} maxGas + * @memberof tendermint.types.BlockParams + * @instance + */ + BlockParams.prototype.maxGas = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * BlockParams timeIotaMs. + * @member {number|Long} timeIotaMs + * @memberof tendermint.types.BlockParams + * @instance + */ + BlockParams.prototype.timeIotaMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new BlockParams instance using the specified properties. + * @function create + * @memberof tendermint.types.BlockParams + * @static + * @param {tendermint.types.IBlockParams=} [properties] Properties to set + * @returns {tendermint.types.BlockParams} BlockParams instance + */ + BlockParams.create = function create(properties) { + return new BlockParams(properties); + }; + + /** + * Encodes the specified BlockParams message. Does not implicitly {@link tendermint.types.BlockParams.verify|verify} messages. + * @function encode + * @memberof tendermint.types.BlockParams + * @static + * @param {tendermint.types.IBlockParams} message BlockParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BlockParams.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.maxBytes != null && Object.hasOwnProperty.call(message, "maxBytes")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.maxBytes); + if (message.maxGas != null && Object.hasOwnProperty.call(message, "maxGas")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.maxGas); + if (message.timeIotaMs != null && Object.hasOwnProperty.call(message, "timeIotaMs")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.timeIotaMs); + return writer; + }; + + /** + * Encodes the specified BlockParams message, length delimited. Does not implicitly {@link tendermint.types.BlockParams.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.types.BlockParams + * @static + * @param {tendermint.types.IBlockParams} message BlockParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BlockParams.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BlockParams message from the specified reader or buffer. + * @function decode + * @memberof tendermint.types.BlockParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.types.BlockParams} BlockParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BlockParams.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.BlockParams(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.maxBytes = reader.int64(); + break; + case 2: + message.maxGas = reader.int64(); + break; + case 3: + message.timeIotaMs = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BlockParams message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.types.BlockParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.types.BlockParams} BlockParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BlockParams.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BlockParams message. + * @function verify + * @memberof tendermint.types.BlockParams + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BlockParams.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.maxBytes != null && message.hasOwnProperty("maxBytes")) + if (!$util.isInteger(message.maxBytes) && !(message.maxBytes && $util.isInteger(message.maxBytes.low) && $util.isInteger(message.maxBytes.high))) + return "maxBytes: integer|Long expected"; + if (message.maxGas != null && message.hasOwnProperty("maxGas")) + if (!$util.isInteger(message.maxGas) && !(message.maxGas && $util.isInteger(message.maxGas.low) && $util.isInteger(message.maxGas.high))) + return "maxGas: integer|Long expected"; + if (message.timeIotaMs != null && message.hasOwnProperty("timeIotaMs")) + if (!$util.isInteger(message.timeIotaMs) && !(message.timeIotaMs && $util.isInteger(message.timeIotaMs.low) && $util.isInteger(message.timeIotaMs.high))) + return "timeIotaMs: integer|Long expected"; + return null; + }; + + /** + * Creates a BlockParams message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.types.BlockParams + * @static + * @param {Object.} object Plain object + * @returns {tendermint.types.BlockParams} BlockParams + */ + BlockParams.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.types.BlockParams) + return object; + var message = new $root.tendermint.types.BlockParams(); + if (object.maxBytes != null) + if ($util.Long) + (message.maxBytes = $util.Long.fromValue(object.maxBytes)).unsigned = false; + else if (typeof object.maxBytes === "string") + message.maxBytes = parseInt(object.maxBytes, 10); + else if (typeof object.maxBytes === "number") + message.maxBytes = object.maxBytes; + else if (typeof object.maxBytes === "object") + message.maxBytes = new $util.LongBits(object.maxBytes.low >>> 0, object.maxBytes.high >>> 0).toNumber(); + if (object.maxGas != null) + if ($util.Long) + (message.maxGas = $util.Long.fromValue(object.maxGas)).unsigned = false; + else if (typeof object.maxGas === "string") + message.maxGas = parseInt(object.maxGas, 10); + else if (typeof object.maxGas === "number") + message.maxGas = object.maxGas; + else if (typeof object.maxGas === "object") + message.maxGas = new $util.LongBits(object.maxGas.low >>> 0, object.maxGas.high >>> 0).toNumber(); + if (object.timeIotaMs != null) + if ($util.Long) + (message.timeIotaMs = $util.Long.fromValue(object.timeIotaMs)).unsigned = false; + else if (typeof object.timeIotaMs === "string") + message.timeIotaMs = parseInt(object.timeIotaMs, 10); + else if (typeof object.timeIotaMs === "number") + message.timeIotaMs = object.timeIotaMs; + else if (typeof object.timeIotaMs === "object") + message.timeIotaMs = new $util.LongBits(object.timeIotaMs.low >>> 0, object.timeIotaMs.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a BlockParams message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.types.BlockParams + * @static + * @param {tendermint.types.BlockParams} message BlockParams + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BlockParams.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.maxBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.maxBytes = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.maxGas = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.maxGas = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.timeIotaMs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.timeIotaMs = options.longs === String ? "0" : 0; + } + if (message.maxBytes != null && message.hasOwnProperty("maxBytes")) + if (typeof message.maxBytes === "number") + object.maxBytes = options.longs === String ? String(message.maxBytes) : message.maxBytes; + else + object.maxBytes = options.longs === String ? $util.Long.prototype.toString.call(message.maxBytes) : options.longs === Number ? new $util.LongBits(message.maxBytes.low >>> 0, message.maxBytes.high >>> 0).toNumber() : message.maxBytes; + if (message.maxGas != null && message.hasOwnProperty("maxGas")) + if (typeof message.maxGas === "number") + object.maxGas = options.longs === String ? String(message.maxGas) : message.maxGas; + else + object.maxGas = options.longs === String ? $util.Long.prototype.toString.call(message.maxGas) : options.longs === Number ? new $util.LongBits(message.maxGas.low >>> 0, message.maxGas.high >>> 0).toNumber() : message.maxGas; + if (message.timeIotaMs != null && message.hasOwnProperty("timeIotaMs")) + if (typeof message.timeIotaMs === "number") + object.timeIotaMs = options.longs === String ? String(message.timeIotaMs) : message.timeIotaMs; + else + object.timeIotaMs = options.longs === String ? $util.Long.prototype.toString.call(message.timeIotaMs) : options.longs === Number ? new $util.LongBits(message.timeIotaMs.low >>> 0, message.timeIotaMs.high >>> 0).toNumber() : message.timeIotaMs; + return object; + }; + + /** + * Converts this BlockParams to JSON. + * @function toJSON + * @memberof tendermint.types.BlockParams + * @instance + * @returns {Object.} JSON object + */ + BlockParams.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return BlockParams; + })(types.BlockParams || {}); + + types.EvidenceParams = (function(EvidenceParams) { + + /** + * Properties of an EvidenceParams. + * @memberof tendermint.types + * @interface IEvidenceParams + * @property {number|Long|null} [maxAgeNumBlocks] EvidenceParams maxAgeNumBlocks + * @property {google.protobuf.IDuration|null} [maxAgeDuration] EvidenceParams maxAgeDuration + * @property {number|Long|null} [maxBytes] EvidenceParams maxBytes + */ + + /** + * Constructs a new EvidenceParams. + * @memberof tendermint.types + * @classdesc Represents an EvidenceParams. + * @implements IEvidenceParams + * @constructor + * @param {tendermint.types.IEvidenceParams=} [properties] Properties to set + */ + function EvidenceParams(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EvidenceParams maxAgeNumBlocks. + * @member {number|Long} maxAgeNumBlocks + * @memberof tendermint.types.EvidenceParams + * @instance + */ + EvidenceParams.prototype.maxAgeNumBlocks = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * EvidenceParams maxAgeDuration. + * @member {google.protobuf.IDuration|null|undefined} maxAgeDuration + * @memberof tendermint.types.EvidenceParams + * @instance + */ + EvidenceParams.prototype.maxAgeDuration = null; + + /** + * EvidenceParams maxBytes. + * @member {number|Long} maxBytes + * @memberof tendermint.types.EvidenceParams + * @instance + */ + EvidenceParams.prototype.maxBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new EvidenceParams instance using the specified properties. + * @function create + * @memberof tendermint.types.EvidenceParams + * @static + * @param {tendermint.types.IEvidenceParams=} [properties] Properties to set + * @returns {tendermint.types.EvidenceParams} EvidenceParams instance + */ + EvidenceParams.create = function create(properties) { + return new EvidenceParams(properties); + }; + + /** + * Encodes the specified EvidenceParams message. Does not implicitly {@link tendermint.types.EvidenceParams.verify|verify} messages. + * @function encode + * @memberof tendermint.types.EvidenceParams + * @static + * @param {tendermint.types.IEvidenceParams} message EvidenceParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EvidenceParams.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.maxAgeNumBlocks != null && Object.hasOwnProperty.call(message, "maxAgeNumBlocks")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.maxAgeNumBlocks); + if (message.maxAgeDuration != null && Object.hasOwnProperty.call(message, "maxAgeDuration")) + $root.google.protobuf.Duration.encode(message.maxAgeDuration, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.maxBytes != null && Object.hasOwnProperty.call(message, "maxBytes")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.maxBytes); + return writer; + }; + + /** + * Encodes the specified EvidenceParams message, length delimited. Does not implicitly {@link tendermint.types.EvidenceParams.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.types.EvidenceParams + * @static + * @param {tendermint.types.IEvidenceParams} message EvidenceParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EvidenceParams.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EvidenceParams message from the specified reader or buffer. + * @function decode + * @memberof tendermint.types.EvidenceParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.types.EvidenceParams} EvidenceParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EvidenceParams.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.EvidenceParams(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.maxAgeNumBlocks = reader.int64(); + break; + case 2: + message.maxAgeDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + case 3: + message.maxBytes = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EvidenceParams message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.types.EvidenceParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.types.EvidenceParams} EvidenceParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EvidenceParams.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EvidenceParams message. + * @function verify + * @memberof tendermint.types.EvidenceParams + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EvidenceParams.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.maxAgeNumBlocks != null && message.hasOwnProperty("maxAgeNumBlocks")) + if (!$util.isInteger(message.maxAgeNumBlocks) && !(message.maxAgeNumBlocks && $util.isInteger(message.maxAgeNumBlocks.low) && $util.isInteger(message.maxAgeNumBlocks.high))) + return "maxAgeNumBlocks: integer|Long expected"; + if (message.maxAgeDuration != null && message.hasOwnProperty("maxAgeDuration")) { + var error = $root.google.protobuf.Duration.verify(message.maxAgeDuration); + if (error) + return "maxAgeDuration." + error; + } + if (message.maxBytes != null && message.hasOwnProperty("maxBytes")) + if (!$util.isInteger(message.maxBytes) && !(message.maxBytes && $util.isInteger(message.maxBytes.low) && $util.isInteger(message.maxBytes.high))) + return "maxBytes: integer|Long expected"; + return null; + }; + + /** + * Creates an EvidenceParams message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.types.EvidenceParams + * @static + * @param {Object.} object Plain object + * @returns {tendermint.types.EvidenceParams} EvidenceParams + */ + EvidenceParams.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.types.EvidenceParams) + return object; + var message = new $root.tendermint.types.EvidenceParams(); + if (object.maxAgeNumBlocks != null) + if ($util.Long) + (message.maxAgeNumBlocks = $util.Long.fromValue(object.maxAgeNumBlocks)).unsigned = false; + else if (typeof object.maxAgeNumBlocks === "string") + message.maxAgeNumBlocks = parseInt(object.maxAgeNumBlocks, 10); + else if (typeof object.maxAgeNumBlocks === "number") + message.maxAgeNumBlocks = object.maxAgeNumBlocks; + else if (typeof object.maxAgeNumBlocks === "object") + message.maxAgeNumBlocks = new $util.LongBits(object.maxAgeNumBlocks.low >>> 0, object.maxAgeNumBlocks.high >>> 0).toNumber(); + if (object.maxAgeDuration != null) { + if (typeof object.maxAgeDuration !== "object") + throw TypeError(".tendermint.types.EvidenceParams.maxAgeDuration: object expected"); + message.maxAgeDuration = $root.google.protobuf.Duration.fromObject(object.maxAgeDuration); + } + if (object.maxBytes != null) + if ($util.Long) + (message.maxBytes = $util.Long.fromValue(object.maxBytes)).unsigned = false; + else if (typeof object.maxBytes === "string") + message.maxBytes = parseInt(object.maxBytes, 10); + else if (typeof object.maxBytes === "number") + message.maxBytes = object.maxBytes; + else if (typeof object.maxBytes === "object") + message.maxBytes = new $util.LongBits(object.maxBytes.low >>> 0, object.maxBytes.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from an EvidenceParams message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.types.EvidenceParams + * @static + * @param {tendermint.types.EvidenceParams} message EvidenceParams + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EvidenceParams.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.maxAgeNumBlocks = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.maxAgeNumBlocks = options.longs === String ? "0" : 0; + object.maxAgeDuration = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.maxBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.maxBytes = options.longs === String ? "0" : 0; + } + if (message.maxAgeNumBlocks != null && message.hasOwnProperty("maxAgeNumBlocks")) + if (typeof message.maxAgeNumBlocks === "number") + object.maxAgeNumBlocks = options.longs === String ? String(message.maxAgeNumBlocks) : message.maxAgeNumBlocks; + else + object.maxAgeNumBlocks = options.longs === String ? $util.Long.prototype.toString.call(message.maxAgeNumBlocks) : options.longs === Number ? new $util.LongBits(message.maxAgeNumBlocks.low >>> 0, message.maxAgeNumBlocks.high >>> 0).toNumber() : message.maxAgeNumBlocks; + if (message.maxAgeDuration != null && message.hasOwnProperty("maxAgeDuration")) + object.maxAgeDuration = $root.google.protobuf.Duration.toObject(message.maxAgeDuration, options); + if (message.maxBytes != null && message.hasOwnProperty("maxBytes")) + if (typeof message.maxBytes === "number") + object.maxBytes = options.longs === String ? String(message.maxBytes) : message.maxBytes; + else + object.maxBytes = options.longs === String ? $util.Long.prototype.toString.call(message.maxBytes) : options.longs === Number ? new $util.LongBits(message.maxBytes.low >>> 0, message.maxBytes.high >>> 0).toNumber() : message.maxBytes; + return object; + }; + + /** + * Converts this EvidenceParams to JSON. + * @function toJSON + * @memberof tendermint.types.EvidenceParams + * @instance + * @returns {Object.} JSON object + */ + EvidenceParams.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EvidenceParams; + })(types.EvidenceParams || {}); + + types.ValidatorParams = (function(ValidatorParams) { + + /** + * Properties of a ValidatorParams. + * @memberof tendermint.types + * @interface IValidatorParams + * @property {Array.|null} [pubKeyTypes] ValidatorParams pubKeyTypes + */ + + /** + * Constructs a new ValidatorParams. + * @memberof tendermint.types + * @classdesc Represents a ValidatorParams. + * @implements IValidatorParams + * @constructor + * @param {tendermint.types.IValidatorParams=} [properties] Properties to set + */ + function ValidatorParams(properties) { + this.pubKeyTypes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ValidatorParams pubKeyTypes. + * @member {Array.} pubKeyTypes + * @memberof tendermint.types.ValidatorParams + * @instance + */ + ValidatorParams.prototype.pubKeyTypes = $util.emptyArray; + + /** + * Creates a new ValidatorParams instance using the specified properties. + * @function create + * @memberof tendermint.types.ValidatorParams + * @static + * @param {tendermint.types.IValidatorParams=} [properties] Properties to set + * @returns {tendermint.types.ValidatorParams} ValidatorParams instance + */ + ValidatorParams.create = function create(properties) { + return new ValidatorParams(properties); + }; + + /** + * Encodes the specified ValidatorParams message. Does not implicitly {@link tendermint.types.ValidatorParams.verify|verify} messages. + * @function encode + * @memberof tendermint.types.ValidatorParams + * @static + * @param {tendermint.types.IValidatorParams} message ValidatorParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValidatorParams.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pubKeyTypes != null && message.pubKeyTypes.length) + for (var i = 0; i < message.pubKeyTypes.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.pubKeyTypes[i]); + return writer; + }; + + /** + * Encodes the specified ValidatorParams message, length delimited. Does not implicitly {@link tendermint.types.ValidatorParams.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.types.ValidatorParams + * @static + * @param {tendermint.types.IValidatorParams} message ValidatorParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValidatorParams.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ValidatorParams message from the specified reader or buffer. + * @function decode + * @memberof tendermint.types.ValidatorParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.types.ValidatorParams} ValidatorParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValidatorParams.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.ValidatorParams(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.pubKeyTypes && message.pubKeyTypes.length)) + message.pubKeyTypes = []; + message.pubKeyTypes.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ValidatorParams message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.types.ValidatorParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.types.ValidatorParams} ValidatorParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValidatorParams.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ValidatorParams message. + * @function verify + * @memberof tendermint.types.ValidatorParams + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ValidatorParams.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.pubKeyTypes != null && message.hasOwnProperty("pubKeyTypes")) { + if (!Array.isArray(message.pubKeyTypes)) + return "pubKeyTypes: array expected"; + for (var i = 0; i < message.pubKeyTypes.length; ++i) + if (!$util.isString(message.pubKeyTypes[i])) + return "pubKeyTypes: string[] expected"; + } + return null; + }; + + /** + * Creates a ValidatorParams message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.types.ValidatorParams + * @static + * @param {Object.} object Plain object + * @returns {tendermint.types.ValidatorParams} ValidatorParams + */ + ValidatorParams.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.types.ValidatorParams) + return object; + var message = new $root.tendermint.types.ValidatorParams(); + if (object.pubKeyTypes) { + if (!Array.isArray(object.pubKeyTypes)) + throw TypeError(".tendermint.types.ValidatorParams.pubKeyTypes: array expected"); + message.pubKeyTypes = []; + for (var i = 0; i < object.pubKeyTypes.length; ++i) + message.pubKeyTypes[i] = String(object.pubKeyTypes[i]); + } + return message; + }; + + /** + * Creates a plain object from a ValidatorParams message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.types.ValidatorParams + * @static + * @param {tendermint.types.ValidatorParams} message ValidatorParams + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ValidatorParams.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.pubKeyTypes = []; + if (message.pubKeyTypes && message.pubKeyTypes.length) { + object.pubKeyTypes = []; + for (var j = 0; j < message.pubKeyTypes.length; ++j) + object.pubKeyTypes[j] = message.pubKeyTypes[j]; + } + return object; + }; + + /** + * Converts this ValidatorParams to JSON. + * @function toJSON + * @memberof tendermint.types.ValidatorParams + * @instance + * @returns {Object.} JSON object + */ + ValidatorParams.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ValidatorParams; + })(types.ValidatorParams || {}); + + types.VersionParams = (function(VersionParams) { + + /** + * Properties of a VersionParams. + * @memberof tendermint.types + * @interface IVersionParams + * @property {number|Long|null} [appVersion] VersionParams appVersion + */ + + /** + * Constructs a new VersionParams. + * @memberof tendermint.types + * @classdesc Represents a VersionParams. + * @implements IVersionParams + * @constructor + * @param {tendermint.types.IVersionParams=} [properties] Properties to set + */ + function VersionParams(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * VersionParams appVersion. + * @member {number|Long} appVersion + * @memberof tendermint.types.VersionParams + * @instance + */ + VersionParams.prototype.appVersion = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new VersionParams instance using the specified properties. + * @function create + * @memberof tendermint.types.VersionParams + * @static + * @param {tendermint.types.IVersionParams=} [properties] Properties to set + * @returns {tendermint.types.VersionParams} VersionParams instance + */ + VersionParams.create = function create(properties) { + return new VersionParams(properties); + }; + + /** + * Encodes the specified VersionParams message. Does not implicitly {@link tendermint.types.VersionParams.verify|verify} messages. + * @function encode + * @memberof tendermint.types.VersionParams + * @static + * @param {tendermint.types.IVersionParams} message VersionParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VersionParams.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.appVersion != null && Object.hasOwnProperty.call(message, "appVersion")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.appVersion); + return writer; + }; + + /** + * Encodes the specified VersionParams message, length delimited. Does not implicitly {@link tendermint.types.VersionParams.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.types.VersionParams + * @static + * @param {tendermint.types.IVersionParams} message VersionParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VersionParams.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VersionParams message from the specified reader or buffer. + * @function decode + * @memberof tendermint.types.VersionParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.types.VersionParams} VersionParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VersionParams.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.VersionParams(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.appVersion = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VersionParams message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.types.VersionParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.types.VersionParams} VersionParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VersionParams.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VersionParams message. + * @function verify + * @memberof tendermint.types.VersionParams + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VersionParams.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.appVersion != null && message.hasOwnProperty("appVersion")) + if (!$util.isInteger(message.appVersion) && !(message.appVersion && $util.isInteger(message.appVersion.low) && $util.isInteger(message.appVersion.high))) + return "appVersion: integer|Long expected"; + return null; + }; + + /** + * Creates a VersionParams message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.types.VersionParams + * @static + * @param {Object.} object Plain object + * @returns {tendermint.types.VersionParams} VersionParams + */ + VersionParams.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.types.VersionParams) + return object; + var message = new $root.tendermint.types.VersionParams(); + if (object.appVersion != null) + if ($util.Long) + (message.appVersion = $util.Long.fromValue(object.appVersion)).unsigned = true; + else if (typeof object.appVersion === "string") + message.appVersion = parseInt(object.appVersion, 10); + else if (typeof object.appVersion === "number") + message.appVersion = object.appVersion; + else if (typeof object.appVersion === "object") + message.appVersion = new $util.LongBits(object.appVersion.low >>> 0, object.appVersion.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a VersionParams message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.types.VersionParams + * @static + * @param {tendermint.types.VersionParams} message VersionParams + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VersionParams.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.appVersion = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.appVersion = options.longs === String ? "0" : 0; + if (message.appVersion != null && message.hasOwnProperty("appVersion")) + if (typeof message.appVersion === "number") + object.appVersion = options.longs === String ? String(message.appVersion) : message.appVersion; + else + object.appVersion = options.longs === String ? $util.Long.prototype.toString.call(message.appVersion) : options.longs === Number ? new $util.LongBits(message.appVersion.low >>> 0, message.appVersion.high >>> 0).toNumber(true) : message.appVersion; + return object; + }; + + /** + * Converts this VersionParams to JSON. + * @function toJSON + * @memberof tendermint.types.VersionParams + * @instance + * @returns {Object.} JSON object + */ + VersionParams.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return VersionParams; + })(types.VersionParams || {}); + + types.HashedParams = (function(HashedParams) { + + /** + * Properties of a HashedParams. + * @memberof tendermint.types + * @interface IHashedParams + * @property {number|Long|null} [blockMaxBytes] HashedParams blockMaxBytes + * @property {number|Long|null} [blockMaxGas] HashedParams blockMaxGas + */ + + /** + * Constructs a new HashedParams. + * @memberof tendermint.types + * @classdesc Represents a HashedParams. + * @implements IHashedParams + * @constructor + * @param {tendermint.types.IHashedParams=} [properties] Properties to set + */ + function HashedParams(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HashedParams blockMaxBytes. + * @member {number|Long} blockMaxBytes + * @memberof tendermint.types.HashedParams + * @instance + */ + HashedParams.prototype.blockMaxBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * HashedParams blockMaxGas. + * @member {number|Long} blockMaxGas + * @memberof tendermint.types.HashedParams + * @instance + */ + HashedParams.prototype.blockMaxGas = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new HashedParams instance using the specified properties. + * @function create + * @memberof tendermint.types.HashedParams + * @static + * @param {tendermint.types.IHashedParams=} [properties] Properties to set + * @returns {tendermint.types.HashedParams} HashedParams instance + */ + HashedParams.create = function create(properties) { + return new HashedParams(properties); + }; + + /** + * Encodes the specified HashedParams message. Does not implicitly {@link tendermint.types.HashedParams.verify|verify} messages. + * @function encode + * @memberof tendermint.types.HashedParams + * @static + * @param {tendermint.types.IHashedParams} message HashedParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HashedParams.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.blockMaxBytes != null && Object.hasOwnProperty.call(message, "blockMaxBytes")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.blockMaxBytes); + if (message.blockMaxGas != null && Object.hasOwnProperty.call(message, "blockMaxGas")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.blockMaxGas); + return writer; + }; + + /** + * Encodes the specified HashedParams message, length delimited. Does not implicitly {@link tendermint.types.HashedParams.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.types.HashedParams + * @static + * @param {tendermint.types.IHashedParams} message HashedParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HashedParams.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HashedParams message from the specified reader or buffer. + * @function decode + * @memberof tendermint.types.HashedParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.types.HashedParams} HashedParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HashedParams.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.HashedParams(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.blockMaxBytes = reader.int64(); + break; + case 2: + message.blockMaxGas = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HashedParams message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.types.HashedParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.types.HashedParams} HashedParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HashedParams.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HashedParams message. + * @function verify + * @memberof tendermint.types.HashedParams + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HashedParams.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.blockMaxBytes != null && message.hasOwnProperty("blockMaxBytes")) + if (!$util.isInteger(message.blockMaxBytes) && !(message.blockMaxBytes && $util.isInteger(message.blockMaxBytes.low) && $util.isInteger(message.blockMaxBytes.high))) + return "blockMaxBytes: integer|Long expected"; + if (message.blockMaxGas != null && message.hasOwnProperty("blockMaxGas")) + if (!$util.isInteger(message.blockMaxGas) && !(message.blockMaxGas && $util.isInteger(message.blockMaxGas.low) && $util.isInteger(message.blockMaxGas.high))) + return "blockMaxGas: integer|Long expected"; + return null; + }; + + /** + * Creates a HashedParams message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.types.HashedParams + * @static + * @param {Object.} object Plain object + * @returns {tendermint.types.HashedParams} HashedParams + */ + HashedParams.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.types.HashedParams) + return object; + var message = new $root.tendermint.types.HashedParams(); + if (object.blockMaxBytes != null) + if ($util.Long) + (message.blockMaxBytes = $util.Long.fromValue(object.blockMaxBytes)).unsigned = false; + else if (typeof object.blockMaxBytes === "string") + message.blockMaxBytes = parseInt(object.blockMaxBytes, 10); + else if (typeof object.blockMaxBytes === "number") + message.blockMaxBytes = object.blockMaxBytes; + else if (typeof object.blockMaxBytes === "object") + message.blockMaxBytes = new $util.LongBits(object.blockMaxBytes.low >>> 0, object.blockMaxBytes.high >>> 0).toNumber(); + if (object.blockMaxGas != null) + if ($util.Long) + (message.blockMaxGas = $util.Long.fromValue(object.blockMaxGas)).unsigned = false; + else if (typeof object.blockMaxGas === "string") + message.blockMaxGas = parseInt(object.blockMaxGas, 10); + else if (typeof object.blockMaxGas === "number") + message.blockMaxGas = object.blockMaxGas; + else if (typeof object.blockMaxGas === "object") + message.blockMaxGas = new $util.LongBits(object.blockMaxGas.low >>> 0, object.blockMaxGas.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a HashedParams message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.types.HashedParams + * @static + * @param {tendermint.types.HashedParams} message HashedParams + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HashedParams.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.blockMaxBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.blockMaxBytes = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.blockMaxGas = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.blockMaxGas = options.longs === String ? "0" : 0; + } + if (message.blockMaxBytes != null && message.hasOwnProperty("blockMaxBytes")) + if (typeof message.blockMaxBytes === "number") + object.blockMaxBytes = options.longs === String ? String(message.blockMaxBytes) : message.blockMaxBytes; + else + object.blockMaxBytes = options.longs === String ? $util.Long.prototype.toString.call(message.blockMaxBytes) : options.longs === Number ? new $util.LongBits(message.blockMaxBytes.low >>> 0, message.blockMaxBytes.high >>> 0).toNumber() : message.blockMaxBytes; + if (message.blockMaxGas != null && message.hasOwnProperty("blockMaxGas")) + if (typeof message.blockMaxGas === "number") + object.blockMaxGas = options.longs === String ? String(message.blockMaxGas) : message.blockMaxGas; + else + object.blockMaxGas = options.longs === String ? $util.Long.prototype.toString.call(message.blockMaxGas) : options.longs === Number ? new $util.LongBits(message.blockMaxGas.low >>> 0, message.blockMaxGas.high >>> 0).toNumber() : message.blockMaxGas; + return object; + }; + + /** + * Converts this HashedParams to JSON. + * @function toJSON + * @memberof tendermint.types.HashedParams + * @instance + * @returns {Object.} JSON object + */ + HashedParams.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return HashedParams; + })(types.HashedParams || {}); + + /** + * BlockIDFlag enum. + * @name tendermint.types.BlockIDFlag + * @enum {string} + * @property {number} BLOCK_ID_FLAG_UNKNOWN=0 BLOCK_ID_FLAG_UNKNOWN value + * @property {number} BLOCK_ID_FLAG_ABSENT=1 BLOCK_ID_FLAG_ABSENT value + * @property {number} BLOCK_ID_FLAG_COMMIT=2 BLOCK_ID_FLAG_COMMIT value + * @property {number} BLOCK_ID_FLAG_NIL=3 BLOCK_ID_FLAG_NIL value + */ + types.BlockIDFlag = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "BLOCK_ID_FLAG_UNKNOWN"] = 0; + values[valuesById[1] = "BLOCK_ID_FLAG_ABSENT"] = 1; + values[valuesById[2] = "BLOCK_ID_FLAG_COMMIT"] = 2; + values[valuesById[3] = "BLOCK_ID_FLAG_NIL"] = 3; + return values; + })(); + + /** + * SignedMsgType enum. + * @name tendermint.types.SignedMsgType + * @enum {string} + * @property {number} SIGNED_MSG_TYPE_UNKNOWN=0 SIGNED_MSG_TYPE_UNKNOWN value + * @property {number} SIGNED_MSG_TYPE_PREVOTE=1 SIGNED_MSG_TYPE_PREVOTE value + * @property {number} SIGNED_MSG_TYPE_PRECOMMIT=2 SIGNED_MSG_TYPE_PRECOMMIT value + * @property {number} SIGNED_MSG_TYPE_PROPOSAL=32 SIGNED_MSG_TYPE_PROPOSAL value + */ + types.SignedMsgType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SIGNED_MSG_TYPE_UNKNOWN"] = 0; + values[valuesById[1] = "SIGNED_MSG_TYPE_PREVOTE"] = 1; + values[valuesById[2] = "SIGNED_MSG_TYPE_PRECOMMIT"] = 2; + values[valuesById[32] = "SIGNED_MSG_TYPE_PROPOSAL"] = 32; + return values; + })(); + + types.PartSetHeader = (function(PartSetHeader) { + + /** + * Properties of a PartSetHeader. + * @memberof tendermint.types + * @interface IPartSetHeader + * @property {number|null} [total] PartSetHeader total + * @property {Uint8Array|null} [hash] PartSetHeader hash + */ + + /** + * Constructs a new PartSetHeader. + * @memberof tendermint.types + * @classdesc Represents a PartSetHeader. + * @implements IPartSetHeader + * @constructor + * @param {tendermint.types.IPartSetHeader=} [properties] Properties to set + */ + function PartSetHeader(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PartSetHeader total. + * @member {number} total + * @memberof tendermint.types.PartSetHeader + * @instance + */ + PartSetHeader.prototype.total = 0; + + /** + * PartSetHeader hash. + * @member {Uint8Array} hash + * @memberof tendermint.types.PartSetHeader + * @instance + */ + PartSetHeader.prototype.hash = $util.newBuffer([]); + + /** + * Creates a new PartSetHeader instance using the specified properties. + * @function create + * @memberof tendermint.types.PartSetHeader + * @static + * @param {tendermint.types.IPartSetHeader=} [properties] Properties to set + * @returns {tendermint.types.PartSetHeader} PartSetHeader instance + */ + PartSetHeader.create = function create(properties) { + return new PartSetHeader(properties); + }; + + /** + * Encodes the specified PartSetHeader message. Does not implicitly {@link tendermint.types.PartSetHeader.verify|verify} messages. + * @function encode + * @memberof tendermint.types.PartSetHeader + * @static + * @param {tendermint.types.IPartSetHeader} message PartSetHeader message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PartSetHeader.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.total != null && Object.hasOwnProperty.call(message, "total")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.total); + if (message.hash != null && Object.hasOwnProperty.call(message, "hash")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.hash); + return writer; + }; + + /** + * Encodes the specified PartSetHeader message, length delimited. Does not implicitly {@link tendermint.types.PartSetHeader.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.types.PartSetHeader + * @static + * @param {tendermint.types.IPartSetHeader} message PartSetHeader message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PartSetHeader.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PartSetHeader message from the specified reader or buffer. + * @function decode + * @memberof tendermint.types.PartSetHeader + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.types.PartSetHeader} PartSetHeader + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PartSetHeader.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.PartSetHeader(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.total = reader.uint32(); + break; + case 2: + message.hash = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PartSetHeader message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.types.PartSetHeader + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.types.PartSetHeader} PartSetHeader + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PartSetHeader.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PartSetHeader message. + * @function verify + * @memberof tendermint.types.PartSetHeader + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PartSetHeader.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.total != null && message.hasOwnProperty("total")) + if (!$util.isInteger(message.total)) + return "total: integer expected"; + if (message.hash != null && message.hasOwnProperty("hash")) + if (!(message.hash && typeof message.hash.length === "number" || $util.isString(message.hash))) + return "hash: buffer expected"; + return null; + }; + + /** + * Creates a PartSetHeader message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.types.PartSetHeader + * @static + * @param {Object.} object Plain object + * @returns {tendermint.types.PartSetHeader} PartSetHeader + */ + PartSetHeader.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.types.PartSetHeader) + return object; + var message = new $root.tendermint.types.PartSetHeader(); + if (object.total != null) + message.total = object.total >>> 0; + if (object.hash != null) + if (typeof object.hash === "string") + $util.base64.decode(object.hash, message.hash = $util.newBuffer($util.base64.length(object.hash)), 0); + else if (object.hash.length) + message.hash = object.hash; + return message; + }; + + /** + * Creates a plain object from a PartSetHeader message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.types.PartSetHeader + * @static + * @param {tendermint.types.PartSetHeader} message PartSetHeader + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PartSetHeader.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.total = 0; + if (options.bytes === String) + object.hash = ""; + else { + object.hash = []; + if (options.bytes !== Array) + object.hash = $util.newBuffer(object.hash); + } + } + if (message.total != null && message.hasOwnProperty("total")) + object.total = message.total; + if (message.hash != null && message.hasOwnProperty("hash")) + object.hash = options.bytes === String ? $util.base64.encode(message.hash, 0, message.hash.length) : options.bytes === Array ? Array.prototype.slice.call(message.hash) : message.hash; + return object; + }; + + /** + * Converts this PartSetHeader to JSON. + * @function toJSON + * @memberof tendermint.types.PartSetHeader + * @instance + * @returns {Object.} JSON object + */ + PartSetHeader.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PartSetHeader; + })(types.PartSetHeader || {}); + + types.Part = (function(Part) { + + /** + * Properties of a Part. + * @memberof tendermint.types + * @interface IPart + * @property {number|null} [index] Part index + * @property {Uint8Array|null} [bytes] Part bytes + * @property {tendermint.crypto.IProof|null} [proof] Part proof + */ + + /** + * Constructs a new Part. + * @memberof tendermint.types + * @classdesc Represents a Part. + * @implements IPart + * @constructor + * @param {tendermint.types.IPart=} [properties] Properties to set + */ + function Part(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Part index. + * @member {number} index + * @memberof tendermint.types.Part + * @instance + */ + Part.prototype.index = 0; + + /** + * Part bytes. + * @member {Uint8Array} bytes + * @memberof tendermint.types.Part + * @instance + */ + Part.prototype.bytes = $util.newBuffer([]); + + /** + * Part proof. + * @member {tendermint.crypto.IProof|null|undefined} proof + * @memberof tendermint.types.Part + * @instance + */ + Part.prototype.proof = null; + + /** + * Creates a new Part instance using the specified properties. + * @function create + * @memberof tendermint.types.Part + * @static + * @param {tendermint.types.IPart=} [properties] Properties to set + * @returns {tendermint.types.Part} Part instance + */ + Part.create = function create(properties) { + return new Part(properties); + }; + + /** + * Encodes the specified Part message. Does not implicitly {@link tendermint.types.Part.verify|verify} messages. + * @function encode + * @memberof tendermint.types.Part + * @static + * @param {tendermint.types.IPart} message Part message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Part.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.index != null && Object.hasOwnProperty.call(message, "index")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.index); + if (message.bytes != null && Object.hasOwnProperty.call(message, "bytes")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.bytes); + if (message.proof != null && Object.hasOwnProperty.call(message, "proof")) + $root.tendermint.crypto.Proof.encode(message.proof, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Part message, length delimited. Does not implicitly {@link tendermint.types.Part.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.types.Part + * @static + * @param {tendermint.types.IPart} message Part message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Part.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Part message from the specified reader or buffer. + * @function decode + * @memberof tendermint.types.Part + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.types.Part} Part + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Part.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.Part(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.index = reader.uint32(); + break; + case 2: + message.bytes = reader.bytes(); + break; + case 3: + message.proof = $root.tendermint.crypto.Proof.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Part message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.types.Part + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.types.Part} Part + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Part.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Part message. + * @function verify + * @memberof tendermint.types.Part + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Part.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.index != null && message.hasOwnProperty("index")) + if (!$util.isInteger(message.index)) + return "index: integer expected"; + if (message.bytes != null && message.hasOwnProperty("bytes")) + if (!(message.bytes && typeof message.bytes.length === "number" || $util.isString(message.bytes))) + return "bytes: buffer expected"; + if (message.proof != null && message.hasOwnProperty("proof")) { + var error = $root.tendermint.crypto.Proof.verify(message.proof); + if (error) + return "proof." + error; + } + return null; + }; + + /** + * Creates a Part message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.types.Part + * @static + * @param {Object.} object Plain object + * @returns {tendermint.types.Part} Part + */ + Part.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.types.Part) + return object; + var message = new $root.tendermint.types.Part(); + if (object.index != null) + message.index = object.index >>> 0; + if (object.bytes != null) + if (typeof object.bytes === "string") + $util.base64.decode(object.bytes, message.bytes = $util.newBuffer($util.base64.length(object.bytes)), 0); + else if (object.bytes.length) + message.bytes = object.bytes; + if (object.proof != null) { + if (typeof object.proof !== "object") + throw TypeError(".tendermint.types.Part.proof: object expected"); + message.proof = $root.tendermint.crypto.Proof.fromObject(object.proof); + } + return message; + }; + + /** + * Creates a plain object from a Part message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.types.Part + * @static + * @param {tendermint.types.Part} message Part + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Part.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.index = 0; + if (options.bytes === String) + object.bytes = ""; + else { + object.bytes = []; + if (options.bytes !== Array) + object.bytes = $util.newBuffer(object.bytes); + } + object.proof = null; + } + if (message.index != null && message.hasOwnProperty("index")) + object.index = message.index; + if (message.bytes != null && message.hasOwnProperty("bytes")) + object.bytes = options.bytes === String ? $util.base64.encode(message.bytes, 0, message.bytes.length) : options.bytes === Array ? Array.prototype.slice.call(message.bytes) : message.bytes; + if (message.proof != null && message.hasOwnProperty("proof")) + object.proof = $root.tendermint.crypto.Proof.toObject(message.proof, options); + return object; + }; + + /** + * Converts this Part to JSON. + * @function toJSON + * @memberof tendermint.types.Part + * @instance + * @returns {Object.} JSON object + */ + Part.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Part; + })(types.Part || {}); + + types.BlockID = (function(BlockID) { + + /** + * Properties of a BlockID. + * @memberof tendermint.types + * @interface IBlockID + * @property {Uint8Array|null} [hash] BlockID hash + * @property {tendermint.types.IPartSetHeader|null} [partSetHeader] BlockID partSetHeader + */ + + /** + * Constructs a new BlockID. + * @memberof tendermint.types + * @classdesc Represents a BlockID. + * @implements IBlockID + * @constructor + * @param {tendermint.types.IBlockID=} [properties] Properties to set + */ + function BlockID(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BlockID hash. + * @member {Uint8Array} hash + * @memberof tendermint.types.BlockID + * @instance + */ + BlockID.prototype.hash = $util.newBuffer([]); + + /** + * BlockID partSetHeader. + * @member {tendermint.types.IPartSetHeader|null|undefined} partSetHeader + * @memberof tendermint.types.BlockID + * @instance + */ + BlockID.prototype.partSetHeader = null; + + /** + * Creates a new BlockID instance using the specified properties. + * @function create + * @memberof tendermint.types.BlockID + * @static + * @param {tendermint.types.IBlockID=} [properties] Properties to set + * @returns {tendermint.types.BlockID} BlockID instance + */ + BlockID.create = function create(properties) { + return new BlockID(properties); + }; + + /** + * Encodes the specified BlockID message. Does not implicitly {@link tendermint.types.BlockID.verify|verify} messages. + * @function encode + * @memberof tendermint.types.BlockID + * @static + * @param {tendermint.types.IBlockID} message BlockID message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BlockID.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.hash != null && Object.hasOwnProperty.call(message, "hash")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.hash); + if (message.partSetHeader != null && Object.hasOwnProperty.call(message, "partSetHeader")) + $root.tendermint.types.PartSetHeader.encode(message.partSetHeader, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BlockID message, length delimited. Does not implicitly {@link tendermint.types.BlockID.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.types.BlockID + * @static + * @param {tendermint.types.IBlockID} message BlockID message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BlockID.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BlockID message from the specified reader or buffer. + * @function decode + * @memberof tendermint.types.BlockID + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.types.BlockID} BlockID + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BlockID.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.BlockID(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.hash = reader.bytes(); + break; + case 2: + message.partSetHeader = $root.tendermint.types.PartSetHeader.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BlockID message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.types.BlockID + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.types.BlockID} BlockID + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BlockID.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BlockID message. + * @function verify + * @memberof tendermint.types.BlockID + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BlockID.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.hash != null && message.hasOwnProperty("hash")) + if (!(message.hash && typeof message.hash.length === "number" || $util.isString(message.hash))) + return "hash: buffer expected"; + if (message.partSetHeader != null && message.hasOwnProperty("partSetHeader")) { + var error = $root.tendermint.types.PartSetHeader.verify(message.partSetHeader); + if (error) + return "partSetHeader." + error; + } + return null; + }; + + /** + * Creates a BlockID message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.types.BlockID + * @static + * @param {Object.} object Plain object + * @returns {tendermint.types.BlockID} BlockID + */ + BlockID.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.types.BlockID) + return object; + var message = new $root.tendermint.types.BlockID(); + if (object.hash != null) + if (typeof object.hash === "string") + $util.base64.decode(object.hash, message.hash = $util.newBuffer($util.base64.length(object.hash)), 0); + else if (object.hash.length) + message.hash = object.hash; + if (object.partSetHeader != null) { + if (typeof object.partSetHeader !== "object") + throw TypeError(".tendermint.types.BlockID.partSetHeader: object expected"); + message.partSetHeader = $root.tendermint.types.PartSetHeader.fromObject(object.partSetHeader); + } + return message; + }; + + /** + * Creates a plain object from a BlockID message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.types.BlockID + * @static + * @param {tendermint.types.BlockID} message BlockID + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BlockID.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.hash = ""; + else { + object.hash = []; + if (options.bytes !== Array) + object.hash = $util.newBuffer(object.hash); + } + object.partSetHeader = null; + } + if (message.hash != null && message.hasOwnProperty("hash")) + object.hash = options.bytes === String ? $util.base64.encode(message.hash, 0, message.hash.length) : options.bytes === Array ? Array.prototype.slice.call(message.hash) : message.hash; + if (message.partSetHeader != null && message.hasOwnProperty("partSetHeader")) + object.partSetHeader = $root.tendermint.types.PartSetHeader.toObject(message.partSetHeader, options); + return object; + }; + + /** + * Converts this BlockID to JSON. + * @function toJSON + * @memberof tendermint.types.BlockID + * @instance + * @returns {Object.} JSON object + */ + BlockID.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return BlockID; + })(types.BlockID || {}); + + types.Header = (function(Header) { + + /** + * Properties of a Header. + * @memberof tendermint.types + * @interface IHeader + * @property {tendermint.version.IConsensus|null} [version] Header version + * @property {string|null} [chainId] Header chainId + * @property {number|Long|null} [height] Header height + * @property {google.protobuf.ITimestamp|null} [time] Header time + * @property {tendermint.types.IBlockID|null} [lastBlockId] Header lastBlockId + * @property {Uint8Array|null} [lastCommitHash] Header lastCommitHash + * @property {Uint8Array|null} [dataHash] Header dataHash + * @property {Uint8Array|null} [validatorsHash] Header validatorsHash + * @property {Uint8Array|null} [nextValidatorsHash] Header nextValidatorsHash + * @property {Uint8Array|null} [consensusHash] Header consensusHash + * @property {Uint8Array|null} [appHash] Header appHash + * @property {Uint8Array|null} [lastResultsHash] Header lastResultsHash + * @property {Uint8Array|null} [evidenceHash] Header evidenceHash + * @property {Uint8Array|null} [proposerAddress] Header proposerAddress + */ + + /** + * Constructs a new Header. + * @memberof tendermint.types + * @classdesc Represents a Header. + * @implements IHeader + * @constructor + * @param {tendermint.types.IHeader=} [properties] Properties to set + */ + function Header(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Header version. + * @member {tendermint.version.IConsensus|null|undefined} version + * @memberof tendermint.types.Header + * @instance + */ + Header.prototype.version = null; + + /** + * Header chainId. + * @member {string} chainId + * @memberof tendermint.types.Header + * @instance + */ + Header.prototype.chainId = ""; + + /** + * Header height. + * @member {number|Long} height + * @memberof tendermint.types.Header + * @instance + */ + Header.prototype.height = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Header time. + * @member {google.protobuf.ITimestamp|null|undefined} time + * @memberof tendermint.types.Header + * @instance + */ + Header.prototype.time = null; + + /** + * Header lastBlockId. + * @member {tendermint.types.IBlockID|null|undefined} lastBlockId + * @memberof tendermint.types.Header + * @instance + */ + Header.prototype.lastBlockId = null; + + /** + * Header lastCommitHash. + * @member {Uint8Array} lastCommitHash + * @memberof tendermint.types.Header + * @instance + */ + Header.prototype.lastCommitHash = $util.newBuffer([]); + + /** + * Header dataHash. + * @member {Uint8Array} dataHash + * @memberof tendermint.types.Header + * @instance + */ + Header.prototype.dataHash = $util.newBuffer([]); + + /** + * Header validatorsHash. + * @member {Uint8Array} validatorsHash + * @memberof tendermint.types.Header + * @instance + */ + Header.prototype.validatorsHash = $util.newBuffer([]); + + /** + * Header nextValidatorsHash. + * @member {Uint8Array} nextValidatorsHash + * @memberof tendermint.types.Header + * @instance + */ + Header.prototype.nextValidatorsHash = $util.newBuffer([]); + + /** + * Header consensusHash. + * @member {Uint8Array} consensusHash + * @memberof tendermint.types.Header + * @instance + */ + Header.prototype.consensusHash = $util.newBuffer([]); + + /** + * Header appHash. + * @member {Uint8Array} appHash + * @memberof tendermint.types.Header + * @instance + */ + Header.prototype.appHash = $util.newBuffer([]); + + /** + * Header lastResultsHash. + * @member {Uint8Array} lastResultsHash + * @memberof tendermint.types.Header + * @instance + */ + Header.prototype.lastResultsHash = $util.newBuffer([]); + + /** + * Header evidenceHash. + * @member {Uint8Array} evidenceHash + * @memberof tendermint.types.Header + * @instance + */ + Header.prototype.evidenceHash = $util.newBuffer([]); + + /** + * Header proposerAddress. + * @member {Uint8Array} proposerAddress + * @memberof tendermint.types.Header + * @instance + */ + Header.prototype.proposerAddress = $util.newBuffer([]); + + /** + * Creates a new Header instance using the specified properties. + * @function create + * @memberof tendermint.types.Header + * @static + * @param {tendermint.types.IHeader=} [properties] Properties to set + * @returns {tendermint.types.Header} Header instance + */ + Header.create = function create(properties) { + return new Header(properties); + }; + + /** + * Encodes the specified Header message. Does not implicitly {@link tendermint.types.Header.verify|verify} messages. + * @function encode + * @memberof tendermint.types.Header + * @static + * @param {tendermint.types.IHeader} message Header message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Header.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + $root.tendermint.version.Consensus.encode(message.version, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.chainId != null && Object.hasOwnProperty.call(message, "chainId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.chainId); + if (message.height != null && Object.hasOwnProperty.call(message, "height")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.height); + if (message.time != null && Object.hasOwnProperty.call(message, "time")) + $root.google.protobuf.Timestamp.encode(message.time, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.lastBlockId != null && Object.hasOwnProperty.call(message, "lastBlockId")) + $root.tendermint.types.BlockID.encode(message.lastBlockId, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.lastCommitHash != null && Object.hasOwnProperty.call(message, "lastCommitHash")) + writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.lastCommitHash); + if (message.dataHash != null && Object.hasOwnProperty.call(message, "dataHash")) + writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.dataHash); + if (message.validatorsHash != null && Object.hasOwnProperty.call(message, "validatorsHash")) + writer.uint32(/* id 8, wireType 2 =*/66).bytes(message.validatorsHash); + if (message.nextValidatorsHash != null && Object.hasOwnProperty.call(message, "nextValidatorsHash")) + writer.uint32(/* id 9, wireType 2 =*/74).bytes(message.nextValidatorsHash); + if (message.consensusHash != null && Object.hasOwnProperty.call(message, "consensusHash")) + writer.uint32(/* id 10, wireType 2 =*/82).bytes(message.consensusHash); + if (message.appHash != null && Object.hasOwnProperty.call(message, "appHash")) + writer.uint32(/* id 11, wireType 2 =*/90).bytes(message.appHash); + if (message.lastResultsHash != null && Object.hasOwnProperty.call(message, "lastResultsHash")) + writer.uint32(/* id 12, wireType 2 =*/98).bytes(message.lastResultsHash); + if (message.evidenceHash != null && Object.hasOwnProperty.call(message, "evidenceHash")) + writer.uint32(/* id 13, wireType 2 =*/106).bytes(message.evidenceHash); + if (message.proposerAddress != null && Object.hasOwnProperty.call(message, "proposerAddress")) + writer.uint32(/* id 14, wireType 2 =*/114).bytes(message.proposerAddress); + return writer; + }; + + /** + * Encodes the specified Header message, length delimited. Does not implicitly {@link tendermint.types.Header.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.types.Header + * @static + * @param {tendermint.types.IHeader} message Header message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Header.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Header message from the specified reader or buffer. + * @function decode + * @memberof tendermint.types.Header + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.types.Header} Header + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Header.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.Header(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.version = $root.tendermint.version.Consensus.decode(reader, reader.uint32()); + break; + case 2: + message.chainId = reader.string(); + break; + case 3: + message.height = reader.int64(); + break; + case 4: + message.time = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 5: + message.lastBlockId = $root.tendermint.types.BlockID.decode(reader, reader.uint32()); + break; + case 6: + message.lastCommitHash = reader.bytes(); + break; + case 7: + message.dataHash = reader.bytes(); + break; + case 8: + message.validatorsHash = reader.bytes(); + break; + case 9: + message.nextValidatorsHash = reader.bytes(); + break; + case 10: + message.consensusHash = reader.bytes(); + break; + case 11: + message.appHash = reader.bytes(); + break; + case 12: + message.lastResultsHash = reader.bytes(); + break; + case 13: + message.evidenceHash = reader.bytes(); + break; + case 14: + message.proposerAddress = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Header message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.types.Header + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.types.Header} Header + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Header.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Header message. + * @function verify + * @memberof tendermint.types.Header + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Header.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.version != null && message.hasOwnProperty("version")) { + var error = $root.tendermint.version.Consensus.verify(message.version); + if (error) + return "version." + error; + } + if (message.chainId != null && message.hasOwnProperty("chainId")) + if (!$util.isString(message.chainId)) + return "chainId: string expected"; + if (message.height != null && message.hasOwnProperty("height")) + if (!$util.isInteger(message.height) && !(message.height && $util.isInteger(message.height.low) && $util.isInteger(message.height.high))) + return "height: integer|Long expected"; + if (message.time != null && message.hasOwnProperty("time")) { + var error = $root.google.protobuf.Timestamp.verify(message.time); + if (error) + return "time." + error; + } + if (message.lastBlockId != null && message.hasOwnProperty("lastBlockId")) { + var error = $root.tendermint.types.BlockID.verify(message.lastBlockId); + if (error) + return "lastBlockId." + error; + } + if (message.lastCommitHash != null && message.hasOwnProperty("lastCommitHash")) + if (!(message.lastCommitHash && typeof message.lastCommitHash.length === "number" || $util.isString(message.lastCommitHash))) + return "lastCommitHash: buffer expected"; + if (message.dataHash != null && message.hasOwnProperty("dataHash")) + if (!(message.dataHash && typeof message.dataHash.length === "number" || $util.isString(message.dataHash))) + return "dataHash: buffer expected"; + if (message.validatorsHash != null && message.hasOwnProperty("validatorsHash")) + if (!(message.validatorsHash && typeof message.validatorsHash.length === "number" || $util.isString(message.validatorsHash))) + return "validatorsHash: buffer expected"; + if (message.nextValidatorsHash != null && message.hasOwnProperty("nextValidatorsHash")) + if (!(message.nextValidatorsHash && typeof message.nextValidatorsHash.length === "number" || $util.isString(message.nextValidatorsHash))) + return "nextValidatorsHash: buffer expected"; + if (message.consensusHash != null && message.hasOwnProperty("consensusHash")) + if (!(message.consensusHash && typeof message.consensusHash.length === "number" || $util.isString(message.consensusHash))) + return "consensusHash: buffer expected"; + if (message.appHash != null && message.hasOwnProperty("appHash")) + if (!(message.appHash && typeof message.appHash.length === "number" || $util.isString(message.appHash))) + return "appHash: buffer expected"; + if (message.lastResultsHash != null && message.hasOwnProperty("lastResultsHash")) + if (!(message.lastResultsHash && typeof message.lastResultsHash.length === "number" || $util.isString(message.lastResultsHash))) + return "lastResultsHash: buffer expected"; + if (message.evidenceHash != null && message.hasOwnProperty("evidenceHash")) + if (!(message.evidenceHash && typeof message.evidenceHash.length === "number" || $util.isString(message.evidenceHash))) + return "evidenceHash: buffer expected"; + if (message.proposerAddress != null && message.hasOwnProperty("proposerAddress")) + if (!(message.proposerAddress && typeof message.proposerAddress.length === "number" || $util.isString(message.proposerAddress))) + return "proposerAddress: buffer expected"; + return null; + }; + + /** + * Creates a Header message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.types.Header + * @static + * @param {Object.} object Plain object + * @returns {tendermint.types.Header} Header + */ + Header.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.types.Header) + return object; + var message = new $root.tendermint.types.Header(); + if (object.version != null) { + if (typeof object.version !== "object") + throw TypeError(".tendermint.types.Header.version: object expected"); + message.version = $root.tendermint.version.Consensus.fromObject(object.version); + } + if (object.chainId != null) + message.chainId = String(object.chainId); + if (object.height != null) + if ($util.Long) + (message.height = $util.Long.fromValue(object.height)).unsigned = false; + else if (typeof object.height === "string") + message.height = parseInt(object.height, 10); + else if (typeof object.height === "number") + message.height = object.height; + else if (typeof object.height === "object") + message.height = new $util.LongBits(object.height.low >>> 0, object.height.high >>> 0).toNumber(); + if (object.time != null) { + if (typeof object.time !== "object") + throw TypeError(".tendermint.types.Header.time: object expected"); + message.time = $root.google.protobuf.Timestamp.fromObject(object.time); + } + if (object.lastBlockId != null) { + if (typeof object.lastBlockId !== "object") + throw TypeError(".tendermint.types.Header.lastBlockId: object expected"); + message.lastBlockId = $root.tendermint.types.BlockID.fromObject(object.lastBlockId); + } + if (object.lastCommitHash != null) + if (typeof object.lastCommitHash === "string") + $util.base64.decode(object.lastCommitHash, message.lastCommitHash = $util.newBuffer($util.base64.length(object.lastCommitHash)), 0); + else if (object.lastCommitHash.length) + message.lastCommitHash = object.lastCommitHash; + if (object.dataHash != null) + if (typeof object.dataHash === "string") + $util.base64.decode(object.dataHash, message.dataHash = $util.newBuffer($util.base64.length(object.dataHash)), 0); + else if (object.dataHash.length) + message.dataHash = object.dataHash; + if (object.validatorsHash != null) + if (typeof object.validatorsHash === "string") + $util.base64.decode(object.validatorsHash, message.validatorsHash = $util.newBuffer($util.base64.length(object.validatorsHash)), 0); + else if (object.validatorsHash.length) + message.validatorsHash = object.validatorsHash; + if (object.nextValidatorsHash != null) + if (typeof object.nextValidatorsHash === "string") + $util.base64.decode(object.nextValidatorsHash, message.nextValidatorsHash = $util.newBuffer($util.base64.length(object.nextValidatorsHash)), 0); + else if (object.nextValidatorsHash.length) + message.nextValidatorsHash = object.nextValidatorsHash; + if (object.consensusHash != null) + if (typeof object.consensusHash === "string") + $util.base64.decode(object.consensusHash, message.consensusHash = $util.newBuffer($util.base64.length(object.consensusHash)), 0); + else if (object.consensusHash.length) + message.consensusHash = object.consensusHash; + if (object.appHash != null) + if (typeof object.appHash === "string") + $util.base64.decode(object.appHash, message.appHash = $util.newBuffer($util.base64.length(object.appHash)), 0); + else if (object.appHash.length) + message.appHash = object.appHash; + if (object.lastResultsHash != null) + if (typeof object.lastResultsHash === "string") + $util.base64.decode(object.lastResultsHash, message.lastResultsHash = $util.newBuffer($util.base64.length(object.lastResultsHash)), 0); + else if (object.lastResultsHash.length) + message.lastResultsHash = object.lastResultsHash; + if (object.evidenceHash != null) + if (typeof object.evidenceHash === "string") + $util.base64.decode(object.evidenceHash, message.evidenceHash = $util.newBuffer($util.base64.length(object.evidenceHash)), 0); + else if (object.evidenceHash.length) + message.evidenceHash = object.evidenceHash; + if (object.proposerAddress != null) + if (typeof object.proposerAddress === "string") + $util.base64.decode(object.proposerAddress, message.proposerAddress = $util.newBuffer($util.base64.length(object.proposerAddress)), 0); + else if (object.proposerAddress.length) + message.proposerAddress = object.proposerAddress; + return message; + }; + + /** + * Creates a plain object from a Header message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.types.Header + * @static + * @param {tendermint.types.Header} message Header + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Header.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.version = null; + object.chainId = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.height = options.longs === String ? "0" : 0; + object.time = null; + object.lastBlockId = null; + if (options.bytes === String) + object.lastCommitHash = ""; + else { + object.lastCommitHash = []; + if (options.bytes !== Array) + object.lastCommitHash = $util.newBuffer(object.lastCommitHash); + } + if (options.bytes === String) + object.dataHash = ""; + else { + object.dataHash = []; + if (options.bytes !== Array) + object.dataHash = $util.newBuffer(object.dataHash); + } + if (options.bytes === String) + object.validatorsHash = ""; + else { + object.validatorsHash = []; + if (options.bytes !== Array) + object.validatorsHash = $util.newBuffer(object.validatorsHash); + } + if (options.bytes === String) + object.nextValidatorsHash = ""; + else { + object.nextValidatorsHash = []; + if (options.bytes !== Array) + object.nextValidatorsHash = $util.newBuffer(object.nextValidatorsHash); + } + if (options.bytes === String) + object.consensusHash = ""; + else { + object.consensusHash = []; + if (options.bytes !== Array) + object.consensusHash = $util.newBuffer(object.consensusHash); + } + if (options.bytes === String) + object.appHash = ""; + else { + object.appHash = []; + if (options.bytes !== Array) + object.appHash = $util.newBuffer(object.appHash); + } + if (options.bytes === String) + object.lastResultsHash = ""; + else { + object.lastResultsHash = []; + if (options.bytes !== Array) + object.lastResultsHash = $util.newBuffer(object.lastResultsHash); + } + if (options.bytes === String) + object.evidenceHash = ""; + else { + object.evidenceHash = []; + if (options.bytes !== Array) + object.evidenceHash = $util.newBuffer(object.evidenceHash); + } + if (options.bytes === String) + object.proposerAddress = ""; + else { + object.proposerAddress = []; + if (options.bytes !== Array) + object.proposerAddress = $util.newBuffer(object.proposerAddress); + } + } + if (message.version != null && message.hasOwnProperty("version")) + object.version = $root.tendermint.version.Consensus.toObject(message.version, options); + if (message.chainId != null && message.hasOwnProperty("chainId")) + object.chainId = message.chainId; + if (message.height != null && message.hasOwnProperty("height")) + if (typeof message.height === "number") + object.height = options.longs === String ? String(message.height) : message.height; + else + object.height = options.longs === String ? $util.Long.prototype.toString.call(message.height) : options.longs === Number ? new $util.LongBits(message.height.low >>> 0, message.height.high >>> 0).toNumber() : message.height; + if (message.time != null && message.hasOwnProperty("time")) + object.time = $root.google.protobuf.Timestamp.toObject(message.time, options); + if (message.lastBlockId != null && message.hasOwnProperty("lastBlockId")) + object.lastBlockId = $root.tendermint.types.BlockID.toObject(message.lastBlockId, options); + if (message.lastCommitHash != null && message.hasOwnProperty("lastCommitHash")) + object.lastCommitHash = options.bytes === String ? $util.base64.encode(message.lastCommitHash, 0, message.lastCommitHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.lastCommitHash) : message.lastCommitHash; + if (message.dataHash != null && message.hasOwnProperty("dataHash")) + object.dataHash = options.bytes === String ? $util.base64.encode(message.dataHash, 0, message.dataHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.dataHash) : message.dataHash; + if (message.validatorsHash != null && message.hasOwnProperty("validatorsHash")) + object.validatorsHash = options.bytes === String ? $util.base64.encode(message.validatorsHash, 0, message.validatorsHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.validatorsHash) : message.validatorsHash; + if (message.nextValidatorsHash != null && message.hasOwnProperty("nextValidatorsHash")) + object.nextValidatorsHash = options.bytes === String ? $util.base64.encode(message.nextValidatorsHash, 0, message.nextValidatorsHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.nextValidatorsHash) : message.nextValidatorsHash; + if (message.consensusHash != null && message.hasOwnProperty("consensusHash")) + object.consensusHash = options.bytes === String ? $util.base64.encode(message.consensusHash, 0, message.consensusHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.consensusHash) : message.consensusHash; + if (message.appHash != null && message.hasOwnProperty("appHash")) + object.appHash = options.bytes === String ? $util.base64.encode(message.appHash, 0, message.appHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.appHash) : message.appHash; + if (message.lastResultsHash != null && message.hasOwnProperty("lastResultsHash")) + object.lastResultsHash = options.bytes === String ? $util.base64.encode(message.lastResultsHash, 0, message.lastResultsHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.lastResultsHash) : message.lastResultsHash; + if (message.evidenceHash != null && message.hasOwnProperty("evidenceHash")) + object.evidenceHash = options.bytes === String ? $util.base64.encode(message.evidenceHash, 0, message.evidenceHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.evidenceHash) : message.evidenceHash; + if (message.proposerAddress != null && message.hasOwnProperty("proposerAddress")) + object.proposerAddress = options.bytes === String ? $util.base64.encode(message.proposerAddress, 0, message.proposerAddress.length) : options.bytes === Array ? Array.prototype.slice.call(message.proposerAddress) : message.proposerAddress; + return object; + }; + + /** + * Converts this Header to JSON. + * @function toJSON + * @memberof tendermint.types.Header + * @instance + * @returns {Object.} JSON object + */ + Header.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Header; + })(types.Header || {}); + + types.Data = (function(Data) { + + /** + * Properties of a Data. + * @memberof tendermint.types + * @interface IData + * @property {Array.|null} [txs] Data txs + */ + + /** + * Constructs a new Data. + * @memberof tendermint.types + * @classdesc Represents a Data. + * @implements IData + * @constructor + * @param {tendermint.types.IData=} [properties] Properties to set + */ + function Data(properties) { + this.txs = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Data txs. + * @member {Array.} txs + * @memberof tendermint.types.Data + * @instance + */ + Data.prototype.txs = $util.emptyArray; + + /** + * Creates a new Data instance using the specified properties. + * @function create + * @memberof tendermint.types.Data + * @static + * @param {tendermint.types.IData=} [properties] Properties to set + * @returns {tendermint.types.Data} Data instance + */ + Data.create = function create(properties) { + return new Data(properties); + }; + + /** + * Encodes the specified Data message. Does not implicitly {@link tendermint.types.Data.verify|verify} messages. + * @function encode + * @memberof tendermint.types.Data + * @static + * @param {tendermint.types.IData} message Data message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Data.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.txs != null && message.txs.length) + for (var i = 0; i < message.txs.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.txs[i]); + return writer; + }; + + /** + * Encodes the specified Data message, length delimited. Does not implicitly {@link tendermint.types.Data.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.types.Data + * @static + * @param {tendermint.types.IData} message Data message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Data.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Data message from the specified reader or buffer. + * @function decode + * @memberof tendermint.types.Data + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.types.Data} Data + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Data.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.Data(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.txs && message.txs.length)) + message.txs = []; + message.txs.push(reader.bytes()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Data message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.types.Data + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.types.Data} Data + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Data.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Data message. + * @function verify + * @memberof tendermint.types.Data + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Data.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.txs != null && message.hasOwnProperty("txs")) { + if (!Array.isArray(message.txs)) + return "txs: array expected"; + for (var i = 0; i < message.txs.length; ++i) + if (!(message.txs[i] && typeof message.txs[i].length === "number" || $util.isString(message.txs[i]))) + return "txs: buffer[] expected"; + } + return null; + }; + + /** + * Creates a Data message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.types.Data + * @static + * @param {Object.} object Plain object + * @returns {tendermint.types.Data} Data + */ + Data.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.types.Data) + return object; + var message = new $root.tendermint.types.Data(); + if (object.txs) { + if (!Array.isArray(object.txs)) + throw TypeError(".tendermint.types.Data.txs: array expected"); + message.txs = []; + for (var i = 0; i < object.txs.length; ++i) + if (typeof object.txs[i] === "string") + $util.base64.decode(object.txs[i], message.txs[i] = $util.newBuffer($util.base64.length(object.txs[i])), 0); + else if (object.txs[i].length) + message.txs[i] = object.txs[i]; + } + return message; + }; + + /** + * Creates a plain object from a Data message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.types.Data + * @static + * @param {tendermint.types.Data} message Data + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Data.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.txs = []; + if (message.txs && message.txs.length) { + object.txs = []; + for (var j = 0; j < message.txs.length; ++j) + object.txs[j] = options.bytes === String ? $util.base64.encode(message.txs[j], 0, message.txs[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.txs[j]) : message.txs[j]; + } + return object; + }; + + /** + * Converts this Data to JSON. + * @function toJSON + * @memberof tendermint.types.Data + * @instance + * @returns {Object.} JSON object + */ + Data.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Data; + })(types.Data || {}); + + types.Vote = (function(Vote) { + + /** + * Properties of a Vote. + * @memberof tendermint.types + * @interface IVote + * @property {tendermint.types.SignedMsgType|null} [type] Vote type + * @property {number|Long|null} [height] Vote height + * @property {number|null} [round] Vote round + * @property {tendermint.types.IBlockID|null} [blockId] Vote blockId + * @property {google.protobuf.ITimestamp|null} [timestamp] Vote timestamp + * @property {Uint8Array|null} [validatorAddress] Vote validatorAddress + * @property {number|null} [validatorIndex] Vote validatorIndex + * @property {Uint8Array|null} [signature] Vote signature + */ + + /** + * Constructs a new Vote. + * @memberof tendermint.types + * @classdesc Represents a Vote. + * @implements IVote + * @constructor + * @param {tendermint.types.IVote=} [properties] Properties to set + */ + function Vote(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Vote type. + * @member {tendermint.types.SignedMsgType} type + * @memberof tendermint.types.Vote + * @instance + */ + Vote.prototype.type = 0; + + /** + * Vote height. + * @member {number|Long} height + * @memberof tendermint.types.Vote + * @instance + */ + Vote.prototype.height = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Vote round. + * @member {number} round + * @memberof tendermint.types.Vote + * @instance + */ + Vote.prototype.round = 0; + + /** + * Vote blockId. + * @member {tendermint.types.IBlockID|null|undefined} blockId + * @memberof tendermint.types.Vote + * @instance + */ + Vote.prototype.blockId = null; + + /** + * Vote timestamp. + * @member {google.protobuf.ITimestamp|null|undefined} timestamp + * @memberof tendermint.types.Vote + * @instance + */ + Vote.prototype.timestamp = null; + + /** + * Vote validatorAddress. + * @member {Uint8Array} validatorAddress + * @memberof tendermint.types.Vote + * @instance + */ + Vote.prototype.validatorAddress = $util.newBuffer([]); + + /** + * Vote validatorIndex. + * @member {number} validatorIndex + * @memberof tendermint.types.Vote + * @instance + */ + Vote.prototype.validatorIndex = 0; + + /** + * Vote signature. + * @member {Uint8Array} signature + * @memberof tendermint.types.Vote + * @instance + */ + Vote.prototype.signature = $util.newBuffer([]); + + /** + * Creates a new Vote instance using the specified properties. + * @function create + * @memberof tendermint.types.Vote + * @static + * @param {tendermint.types.IVote=} [properties] Properties to set + * @returns {tendermint.types.Vote} Vote instance + */ + Vote.create = function create(properties) { + return new Vote(properties); + }; + + /** + * Encodes the specified Vote message. Does not implicitly {@link tendermint.types.Vote.verify|verify} messages. + * @function encode + * @memberof tendermint.types.Vote + * @static + * @param {tendermint.types.IVote} message Vote message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Vote.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); + if (message.height != null && Object.hasOwnProperty.call(message, "height")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.height); + if (message.round != null && Object.hasOwnProperty.call(message, "round")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.round); + if (message.blockId != null && Object.hasOwnProperty.call(message, "blockId")) + $root.tendermint.types.BlockID.encode(message.blockId, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) + $root.google.protobuf.Timestamp.encode(message.timestamp, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.validatorAddress != null && Object.hasOwnProperty.call(message, "validatorAddress")) + writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.validatorAddress); + if (message.validatorIndex != null && Object.hasOwnProperty.call(message, "validatorIndex")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.validatorIndex); + if (message.signature != null && Object.hasOwnProperty.call(message, "signature")) + writer.uint32(/* id 8, wireType 2 =*/66).bytes(message.signature); + return writer; + }; + + /** + * Encodes the specified Vote message, length delimited. Does not implicitly {@link tendermint.types.Vote.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.types.Vote + * @static + * @param {tendermint.types.IVote} message Vote message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Vote.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Vote message from the specified reader or buffer. + * @function decode + * @memberof tendermint.types.Vote + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.types.Vote} Vote + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Vote.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.Vote(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type = reader.int32(); + break; + case 2: + message.height = reader.int64(); + break; + case 3: + message.round = reader.int32(); + break; + case 4: + message.blockId = $root.tendermint.types.BlockID.decode(reader, reader.uint32()); + break; + case 5: + message.timestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 6: + message.validatorAddress = reader.bytes(); + break; + case 7: + message.validatorIndex = reader.int32(); + break; + case 8: + message.signature = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Vote message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.types.Vote + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.types.Vote} Vote + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Vote.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Vote message. + * @function verify + * @memberof tendermint.types.Vote + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Vote.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 32: + break; + } + if (message.height != null && message.hasOwnProperty("height")) + if (!$util.isInteger(message.height) && !(message.height && $util.isInteger(message.height.low) && $util.isInteger(message.height.high))) + return "height: integer|Long expected"; + if (message.round != null && message.hasOwnProperty("round")) + if (!$util.isInteger(message.round)) + return "round: integer expected"; + if (message.blockId != null && message.hasOwnProperty("blockId")) { + var error = $root.tendermint.types.BlockID.verify(message.blockId); + if (error) + return "blockId." + error; + } + if (message.timestamp != null && message.hasOwnProperty("timestamp")) { + var error = $root.google.protobuf.Timestamp.verify(message.timestamp); + if (error) + return "timestamp." + error; + } + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + if (!(message.validatorAddress && typeof message.validatorAddress.length === "number" || $util.isString(message.validatorAddress))) + return "validatorAddress: buffer expected"; + if (message.validatorIndex != null && message.hasOwnProperty("validatorIndex")) + if (!$util.isInteger(message.validatorIndex)) + return "validatorIndex: integer expected"; + if (message.signature != null && message.hasOwnProperty("signature")) + if (!(message.signature && typeof message.signature.length === "number" || $util.isString(message.signature))) + return "signature: buffer expected"; + return null; + }; + + /** + * Creates a Vote message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.types.Vote + * @static + * @param {Object.} object Plain object + * @returns {tendermint.types.Vote} Vote + */ + Vote.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.types.Vote) + return object; + var message = new $root.tendermint.types.Vote(); + switch (object.type) { + case "SIGNED_MSG_TYPE_UNKNOWN": + case 0: + message.type = 0; + break; + case "SIGNED_MSG_TYPE_PREVOTE": + case 1: + message.type = 1; + break; + case "SIGNED_MSG_TYPE_PRECOMMIT": + case 2: + message.type = 2; + break; + case "SIGNED_MSG_TYPE_PROPOSAL": + case 32: + message.type = 32; + break; + } + if (object.height != null) + if ($util.Long) + (message.height = $util.Long.fromValue(object.height)).unsigned = false; + else if (typeof object.height === "string") + message.height = parseInt(object.height, 10); + else if (typeof object.height === "number") + message.height = object.height; + else if (typeof object.height === "object") + message.height = new $util.LongBits(object.height.low >>> 0, object.height.high >>> 0).toNumber(); + if (object.round != null) + message.round = object.round | 0; + if (object.blockId != null) { + if (typeof object.blockId !== "object") + throw TypeError(".tendermint.types.Vote.blockId: object expected"); + message.blockId = $root.tendermint.types.BlockID.fromObject(object.blockId); + } + if (object.timestamp != null) { + if (typeof object.timestamp !== "object") + throw TypeError(".tendermint.types.Vote.timestamp: object expected"); + message.timestamp = $root.google.protobuf.Timestamp.fromObject(object.timestamp); + } + if (object.validatorAddress != null) + if (typeof object.validatorAddress === "string") + $util.base64.decode(object.validatorAddress, message.validatorAddress = $util.newBuffer($util.base64.length(object.validatorAddress)), 0); + else if (object.validatorAddress.length) + message.validatorAddress = object.validatorAddress; + if (object.validatorIndex != null) + message.validatorIndex = object.validatorIndex | 0; + if (object.signature != null) + if (typeof object.signature === "string") + $util.base64.decode(object.signature, message.signature = $util.newBuffer($util.base64.length(object.signature)), 0); + else if (object.signature.length) + message.signature = object.signature; + return message; + }; + + /** + * Creates a plain object from a Vote message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.types.Vote + * @static + * @param {tendermint.types.Vote} message Vote + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Vote.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = options.enums === String ? "SIGNED_MSG_TYPE_UNKNOWN" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.height = options.longs === String ? "0" : 0; + object.round = 0; + object.blockId = null; + object.timestamp = null; + if (options.bytes === String) + object.validatorAddress = ""; + else { + object.validatorAddress = []; + if (options.bytes !== Array) + object.validatorAddress = $util.newBuffer(object.validatorAddress); + } + object.validatorIndex = 0; + if (options.bytes === String) + object.signature = ""; + else { + object.signature = []; + if (options.bytes !== Array) + object.signature = $util.newBuffer(object.signature); + } + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.tendermint.types.SignedMsgType[message.type] : message.type; + if (message.height != null && message.hasOwnProperty("height")) + if (typeof message.height === "number") + object.height = options.longs === String ? String(message.height) : message.height; + else + object.height = options.longs === String ? $util.Long.prototype.toString.call(message.height) : options.longs === Number ? new $util.LongBits(message.height.low >>> 0, message.height.high >>> 0).toNumber() : message.height; + if (message.round != null && message.hasOwnProperty("round")) + object.round = message.round; + if (message.blockId != null && message.hasOwnProperty("blockId")) + object.blockId = $root.tendermint.types.BlockID.toObject(message.blockId, options); + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + object.timestamp = $root.google.protobuf.Timestamp.toObject(message.timestamp, options); + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + object.validatorAddress = options.bytes === String ? $util.base64.encode(message.validatorAddress, 0, message.validatorAddress.length) : options.bytes === Array ? Array.prototype.slice.call(message.validatorAddress) : message.validatorAddress; + if (message.validatorIndex != null && message.hasOwnProperty("validatorIndex")) + object.validatorIndex = message.validatorIndex; + if (message.signature != null && message.hasOwnProperty("signature")) + object.signature = options.bytes === String ? $util.base64.encode(message.signature, 0, message.signature.length) : options.bytes === Array ? Array.prototype.slice.call(message.signature) : message.signature; + return object; + }; + + /** + * Converts this Vote to JSON. + * @function toJSON + * @memberof tendermint.types.Vote + * @instance + * @returns {Object.} JSON object + */ + Vote.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Vote; + })(types.Vote || {}); + + types.Commit = (function(Commit) { + + /** + * Properties of a Commit. + * @memberof tendermint.types + * @interface ICommit + * @property {number|Long|null} [height] Commit height + * @property {number|null} [round] Commit round + * @property {tendermint.types.IBlockID|null} [blockId] Commit blockId + * @property {Array.|null} [signatures] Commit signatures + */ + + /** + * Constructs a new Commit. + * @memberof tendermint.types + * @classdesc Represents a Commit. + * @implements ICommit + * @constructor + * @param {tendermint.types.ICommit=} [properties] Properties to set + */ + function Commit(properties) { + this.signatures = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Commit height. + * @member {number|Long} height + * @memberof tendermint.types.Commit + * @instance + */ + Commit.prototype.height = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Commit round. + * @member {number} round + * @memberof tendermint.types.Commit + * @instance + */ + Commit.prototype.round = 0; + + /** + * Commit blockId. + * @member {tendermint.types.IBlockID|null|undefined} blockId + * @memberof tendermint.types.Commit + * @instance + */ + Commit.prototype.blockId = null; + + /** + * Commit signatures. + * @member {Array.} signatures + * @memberof tendermint.types.Commit + * @instance + */ + Commit.prototype.signatures = $util.emptyArray; + + /** + * Creates a new Commit instance using the specified properties. + * @function create + * @memberof tendermint.types.Commit + * @static + * @param {tendermint.types.ICommit=} [properties] Properties to set + * @returns {tendermint.types.Commit} Commit instance + */ + Commit.create = function create(properties) { + return new Commit(properties); + }; + + /** + * Encodes the specified Commit message. Does not implicitly {@link tendermint.types.Commit.verify|verify} messages. + * @function encode + * @memberof tendermint.types.Commit + * @static + * @param {tendermint.types.ICommit} message Commit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Commit.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.height != null && Object.hasOwnProperty.call(message, "height")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.height); + if (message.round != null && Object.hasOwnProperty.call(message, "round")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.round); + if (message.blockId != null && Object.hasOwnProperty.call(message, "blockId")) + $root.tendermint.types.BlockID.encode(message.blockId, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.signatures != null && message.signatures.length) + for (var i = 0; i < message.signatures.length; ++i) + $root.tendermint.types.CommitSig.encode(message.signatures[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Commit message, length delimited. Does not implicitly {@link tendermint.types.Commit.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.types.Commit + * @static + * @param {tendermint.types.ICommit} message Commit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Commit.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Commit message from the specified reader or buffer. + * @function decode + * @memberof tendermint.types.Commit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.types.Commit} Commit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Commit.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.Commit(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.height = reader.int64(); + break; + case 2: + message.round = reader.int32(); + break; + case 3: + message.blockId = $root.tendermint.types.BlockID.decode(reader, reader.uint32()); + break; + case 4: + if (!(message.signatures && message.signatures.length)) + message.signatures = []; + message.signatures.push($root.tendermint.types.CommitSig.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Commit message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.types.Commit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.types.Commit} Commit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Commit.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Commit message. + * @function verify + * @memberof tendermint.types.Commit + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Commit.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.height != null && message.hasOwnProperty("height")) + if (!$util.isInteger(message.height) && !(message.height && $util.isInteger(message.height.low) && $util.isInteger(message.height.high))) + return "height: integer|Long expected"; + if (message.round != null && message.hasOwnProperty("round")) + if (!$util.isInteger(message.round)) + return "round: integer expected"; + if (message.blockId != null && message.hasOwnProperty("blockId")) { + var error = $root.tendermint.types.BlockID.verify(message.blockId); + if (error) + return "blockId." + error; + } + if (message.signatures != null && message.hasOwnProperty("signatures")) { + if (!Array.isArray(message.signatures)) + return "signatures: array expected"; + for (var i = 0; i < message.signatures.length; ++i) { + var error = $root.tendermint.types.CommitSig.verify(message.signatures[i]); + if (error) + return "signatures." + error; + } + } + return null; + }; + + /** + * Creates a Commit message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.types.Commit + * @static + * @param {Object.} object Plain object + * @returns {tendermint.types.Commit} Commit + */ + Commit.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.types.Commit) + return object; + var message = new $root.tendermint.types.Commit(); + if (object.height != null) + if ($util.Long) + (message.height = $util.Long.fromValue(object.height)).unsigned = false; + else if (typeof object.height === "string") + message.height = parseInt(object.height, 10); + else if (typeof object.height === "number") + message.height = object.height; + else if (typeof object.height === "object") + message.height = new $util.LongBits(object.height.low >>> 0, object.height.high >>> 0).toNumber(); + if (object.round != null) + message.round = object.round | 0; + if (object.blockId != null) { + if (typeof object.blockId !== "object") + throw TypeError(".tendermint.types.Commit.blockId: object expected"); + message.blockId = $root.tendermint.types.BlockID.fromObject(object.blockId); + } + if (object.signatures) { + if (!Array.isArray(object.signatures)) + throw TypeError(".tendermint.types.Commit.signatures: array expected"); + message.signatures = []; + for (var i = 0; i < object.signatures.length; ++i) { + if (typeof object.signatures[i] !== "object") + throw TypeError(".tendermint.types.Commit.signatures: object expected"); + message.signatures[i] = $root.tendermint.types.CommitSig.fromObject(object.signatures[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Commit message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.types.Commit + * @static + * @param {tendermint.types.Commit} message Commit + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Commit.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.signatures = []; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.height = options.longs === String ? "0" : 0; + object.round = 0; + object.blockId = null; + } + if (message.height != null && message.hasOwnProperty("height")) + if (typeof message.height === "number") + object.height = options.longs === String ? String(message.height) : message.height; + else + object.height = options.longs === String ? $util.Long.prototype.toString.call(message.height) : options.longs === Number ? new $util.LongBits(message.height.low >>> 0, message.height.high >>> 0).toNumber() : message.height; + if (message.round != null && message.hasOwnProperty("round")) + object.round = message.round; + if (message.blockId != null && message.hasOwnProperty("blockId")) + object.blockId = $root.tendermint.types.BlockID.toObject(message.blockId, options); + if (message.signatures && message.signatures.length) { + object.signatures = []; + for (var j = 0; j < message.signatures.length; ++j) + object.signatures[j] = $root.tendermint.types.CommitSig.toObject(message.signatures[j], options); + } + return object; + }; + + /** + * Converts this Commit to JSON. + * @function toJSON + * @memberof tendermint.types.Commit + * @instance + * @returns {Object.} JSON object + */ + Commit.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Commit; + })(types.Commit || {}); + + types.CommitSig = (function(CommitSig) { + + /** + * Properties of a CommitSig. + * @memberof tendermint.types + * @interface ICommitSig + * @property {tendermint.types.BlockIDFlag|null} [blockIdFlag] CommitSig blockIdFlag + * @property {Uint8Array|null} [validatorAddress] CommitSig validatorAddress + * @property {google.protobuf.ITimestamp|null} [timestamp] CommitSig timestamp + * @property {Uint8Array|null} [signature] CommitSig signature + */ + + /** + * Constructs a new CommitSig. + * @memberof tendermint.types + * @classdesc Represents a CommitSig. + * @implements ICommitSig + * @constructor + * @param {tendermint.types.ICommitSig=} [properties] Properties to set + */ + function CommitSig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CommitSig blockIdFlag. + * @member {tendermint.types.BlockIDFlag} blockIdFlag + * @memberof tendermint.types.CommitSig + * @instance + */ + CommitSig.prototype.blockIdFlag = 0; + + /** + * CommitSig validatorAddress. + * @member {Uint8Array} validatorAddress + * @memberof tendermint.types.CommitSig + * @instance + */ + CommitSig.prototype.validatorAddress = $util.newBuffer([]); + + /** + * CommitSig timestamp. + * @member {google.protobuf.ITimestamp|null|undefined} timestamp + * @memberof tendermint.types.CommitSig + * @instance + */ + CommitSig.prototype.timestamp = null; + + /** + * CommitSig signature. + * @member {Uint8Array} signature + * @memberof tendermint.types.CommitSig + * @instance + */ + CommitSig.prototype.signature = $util.newBuffer([]); + + /** + * Creates a new CommitSig instance using the specified properties. + * @function create + * @memberof tendermint.types.CommitSig + * @static + * @param {tendermint.types.ICommitSig=} [properties] Properties to set + * @returns {tendermint.types.CommitSig} CommitSig instance + */ + CommitSig.create = function create(properties) { + return new CommitSig(properties); + }; + + /** + * Encodes the specified CommitSig message. Does not implicitly {@link tendermint.types.CommitSig.verify|verify} messages. + * @function encode + * @memberof tendermint.types.CommitSig + * @static + * @param {tendermint.types.ICommitSig} message CommitSig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommitSig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.blockIdFlag != null && Object.hasOwnProperty.call(message, "blockIdFlag")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.blockIdFlag); + if (message.validatorAddress != null && Object.hasOwnProperty.call(message, "validatorAddress")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.validatorAddress); + if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) + $root.google.protobuf.Timestamp.encode(message.timestamp, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.signature != null && Object.hasOwnProperty.call(message, "signature")) + writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.signature); + return writer; + }; + + /** + * Encodes the specified CommitSig message, length delimited. Does not implicitly {@link tendermint.types.CommitSig.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.types.CommitSig + * @static + * @param {tendermint.types.ICommitSig} message CommitSig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommitSig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CommitSig message from the specified reader or buffer. + * @function decode + * @memberof tendermint.types.CommitSig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.types.CommitSig} CommitSig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommitSig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.CommitSig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.blockIdFlag = reader.int32(); + break; + case 2: + message.validatorAddress = reader.bytes(); + break; + case 3: + message.timestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 4: + message.signature = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CommitSig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.types.CommitSig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.types.CommitSig} CommitSig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommitSig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CommitSig message. + * @function verify + * @memberof tendermint.types.CommitSig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CommitSig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.blockIdFlag != null && message.hasOwnProperty("blockIdFlag")) + switch (message.blockIdFlag) { + default: + return "blockIdFlag: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + if (!(message.validatorAddress && typeof message.validatorAddress.length === "number" || $util.isString(message.validatorAddress))) + return "validatorAddress: buffer expected"; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) { + var error = $root.google.protobuf.Timestamp.verify(message.timestamp); + if (error) + return "timestamp." + error; + } + if (message.signature != null && message.hasOwnProperty("signature")) + if (!(message.signature && typeof message.signature.length === "number" || $util.isString(message.signature))) + return "signature: buffer expected"; + return null; + }; + + /** + * Creates a CommitSig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.types.CommitSig + * @static + * @param {Object.} object Plain object + * @returns {tendermint.types.CommitSig} CommitSig + */ + CommitSig.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.types.CommitSig) + return object; + var message = new $root.tendermint.types.CommitSig(); + switch (object.blockIdFlag) { + case "BLOCK_ID_FLAG_UNKNOWN": + case 0: + message.blockIdFlag = 0; + break; + case "BLOCK_ID_FLAG_ABSENT": + case 1: + message.blockIdFlag = 1; + break; + case "BLOCK_ID_FLAG_COMMIT": + case 2: + message.blockIdFlag = 2; + break; + case "BLOCK_ID_FLAG_NIL": + case 3: + message.blockIdFlag = 3; + break; + } + if (object.validatorAddress != null) + if (typeof object.validatorAddress === "string") + $util.base64.decode(object.validatorAddress, message.validatorAddress = $util.newBuffer($util.base64.length(object.validatorAddress)), 0); + else if (object.validatorAddress.length) + message.validatorAddress = object.validatorAddress; + if (object.timestamp != null) { + if (typeof object.timestamp !== "object") + throw TypeError(".tendermint.types.CommitSig.timestamp: object expected"); + message.timestamp = $root.google.protobuf.Timestamp.fromObject(object.timestamp); + } + if (object.signature != null) + if (typeof object.signature === "string") + $util.base64.decode(object.signature, message.signature = $util.newBuffer($util.base64.length(object.signature)), 0); + else if (object.signature.length) + message.signature = object.signature; + return message; + }; + + /** + * Creates a plain object from a CommitSig message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.types.CommitSig + * @static + * @param {tendermint.types.CommitSig} message CommitSig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CommitSig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.blockIdFlag = options.enums === String ? "BLOCK_ID_FLAG_UNKNOWN" : 0; + if (options.bytes === String) + object.validatorAddress = ""; + else { + object.validatorAddress = []; + if (options.bytes !== Array) + object.validatorAddress = $util.newBuffer(object.validatorAddress); + } + object.timestamp = null; + if (options.bytes === String) + object.signature = ""; + else { + object.signature = []; + if (options.bytes !== Array) + object.signature = $util.newBuffer(object.signature); + } + } + if (message.blockIdFlag != null && message.hasOwnProperty("blockIdFlag")) + object.blockIdFlag = options.enums === String ? $root.tendermint.types.BlockIDFlag[message.blockIdFlag] : message.blockIdFlag; + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + object.validatorAddress = options.bytes === String ? $util.base64.encode(message.validatorAddress, 0, message.validatorAddress.length) : options.bytes === Array ? Array.prototype.slice.call(message.validatorAddress) : message.validatorAddress; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + object.timestamp = $root.google.protobuf.Timestamp.toObject(message.timestamp, options); + if (message.signature != null && message.hasOwnProperty("signature")) + object.signature = options.bytes === String ? $util.base64.encode(message.signature, 0, message.signature.length) : options.bytes === Array ? Array.prototype.slice.call(message.signature) : message.signature; + return object; + }; + + /** + * Converts this CommitSig to JSON. + * @function toJSON + * @memberof tendermint.types.CommitSig + * @instance + * @returns {Object.} JSON object + */ + CommitSig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CommitSig; + })(types.CommitSig || {}); + + types.Proposal = (function(Proposal) { + + /** + * Properties of a Proposal. + * @memberof tendermint.types + * @interface IProposal + * @property {tendermint.types.SignedMsgType|null} [type] Proposal type + * @property {number|Long|null} [height] Proposal height + * @property {number|null} [round] Proposal round + * @property {number|null} [polRound] Proposal polRound + * @property {tendermint.types.IBlockID|null} [blockId] Proposal blockId + * @property {google.protobuf.ITimestamp|null} [timestamp] Proposal timestamp + * @property {Uint8Array|null} [signature] Proposal signature + */ + + /** + * Constructs a new Proposal. + * @memberof tendermint.types + * @classdesc Represents a Proposal. + * @implements IProposal + * @constructor + * @param {tendermint.types.IProposal=} [properties] Properties to set + */ + function Proposal(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Proposal type. + * @member {tendermint.types.SignedMsgType} type + * @memberof tendermint.types.Proposal + * @instance + */ + Proposal.prototype.type = 0; + + /** + * Proposal height. + * @member {number|Long} height + * @memberof tendermint.types.Proposal + * @instance + */ + Proposal.prototype.height = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Proposal round. + * @member {number} round + * @memberof tendermint.types.Proposal + * @instance + */ + Proposal.prototype.round = 0; + + /** + * Proposal polRound. + * @member {number} polRound + * @memberof tendermint.types.Proposal + * @instance + */ + Proposal.prototype.polRound = 0; + + /** + * Proposal blockId. + * @member {tendermint.types.IBlockID|null|undefined} blockId + * @memberof tendermint.types.Proposal + * @instance + */ + Proposal.prototype.blockId = null; + + /** + * Proposal timestamp. + * @member {google.protobuf.ITimestamp|null|undefined} timestamp + * @memberof tendermint.types.Proposal + * @instance + */ + Proposal.prototype.timestamp = null; + + /** + * Proposal signature. + * @member {Uint8Array} signature + * @memberof tendermint.types.Proposal + * @instance + */ + Proposal.prototype.signature = $util.newBuffer([]); + + /** + * Creates a new Proposal instance using the specified properties. + * @function create + * @memberof tendermint.types.Proposal + * @static + * @param {tendermint.types.IProposal=} [properties] Properties to set + * @returns {tendermint.types.Proposal} Proposal instance + */ + Proposal.create = function create(properties) { + return new Proposal(properties); + }; + + /** + * Encodes the specified Proposal message. Does not implicitly {@link tendermint.types.Proposal.verify|verify} messages. + * @function encode + * @memberof tendermint.types.Proposal + * @static + * @param {tendermint.types.IProposal} message Proposal message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Proposal.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); + if (message.height != null && Object.hasOwnProperty.call(message, "height")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.height); + if (message.round != null && Object.hasOwnProperty.call(message, "round")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.round); + if (message.polRound != null && Object.hasOwnProperty.call(message, "polRound")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.polRound); + if (message.blockId != null && Object.hasOwnProperty.call(message, "blockId")) + $root.tendermint.types.BlockID.encode(message.blockId, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) + $root.google.protobuf.Timestamp.encode(message.timestamp, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.signature != null && Object.hasOwnProperty.call(message, "signature")) + writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.signature); + return writer; + }; + + /** + * Encodes the specified Proposal message, length delimited. Does not implicitly {@link tendermint.types.Proposal.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.types.Proposal + * @static + * @param {tendermint.types.IProposal} message Proposal message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Proposal.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Proposal message from the specified reader or buffer. + * @function decode + * @memberof tendermint.types.Proposal + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.types.Proposal} Proposal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Proposal.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.Proposal(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type = reader.int32(); + break; + case 2: + message.height = reader.int64(); + break; + case 3: + message.round = reader.int32(); + break; + case 4: + message.polRound = reader.int32(); + break; + case 5: + message.blockId = $root.tendermint.types.BlockID.decode(reader, reader.uint32()); + break; + case 6: + message.timestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 7: + message.signature = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Proposal message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.types.Proposal + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.types.Proposal} Proposal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Proposal.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Proposal message. + * @function verify + * @memberof tendermint.types.Proposal + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Proposal.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 32: + break; + } + if (message.height != null && message.hasOwnProperty("height")) + if (!$util.isInteger(message.height) && !(message.height && $util.isInteger(message.height.low) && $util.isInteger(message.height.high))) + return "height: integer|Long expected"; + if (message.round != null && message.hasOwnProperty("round")) + if (!$util.isInteger(message.round)) + return "round: integer expected"; + if (message.polRound != null && message.hasOwnProperty("polRound")) + if (!$util.isInteger(message.polRound)) + return "polRound: integer expected"; + if (message.blockId != null && message.hasOwnProperty("blockId")) { + var error = $root.tendermint.types.BlockID.verify(message.blockId); + if (error) + return "blockId." + error; + } + if (message.timestamp != null && message.hasOwnProperty("timestamp")) { + var error = $root.google.protobuf.Timestamp.verify(message.timestamp); + if (error) + return "timestamp." + error; + } + if (message.signature != null && message.hasOwnProperty("signature")) + if (!(message.signature && typeof message.signature.length === "number" || $util.isString(message.signature))) + return "signature: buffer expected"; + return null; + }; + + /** + * Creates a Proposal message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.types.Proposal + * @static + * @param {Object.} object Plain object + * @returns {tendermint.types.Proposal} Proposal + */ + Proposal.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.types.Proposal) + return object; + var message = new $root.tendermint.types.Proposal(); + switch (object.type) { + case "SIGNED_MSG_TYPE_UNKNOWN": + case 0: + message.type = 0; + break; + case "SIGNED_MSG_TYPE_PREVOTE": + case 1: + message.type = 1; + break; + case "SIGNED_MSG_TYPE_PRECOMMIT": + case 2: + message.type = 2; + break; + case "SIGNED_MSG_TYPE_PROPOSAL": + case 32: + message.type = 32; + break; + } + if (object.height != null) + if ($util.Long) + (message.height = $util.Long.fromValue(object.height)).unsigned = false; + else if (typeof object.height === "string") + message.height = parseInt(object.height, 10); + else if (typeof object.height === "number") + message.height = object.height; + else if (typeof object.height === "object") + message.height = new $util.LongBits(object.height.low >>> 0, object.height.high >>> 0).toNumber(); + if (object.round != null) + message.round = object.round | 0; + if (object.polRound != null) + message.polRound = object.polRound | 0; + if (object.blockId != null) { + if (typeof object.blockId !== "object") + throw TypeError(".tendermint.types.Proposal.blockId: object expected"); + message.blockId = $root.tendermint.types.BlockID.fromObject(object.blockId); + } + if (object.timestamp != null) { + if (typeof object.timestamp !== "object") + throw TypeError(".tendermint.types.Proposal.timestamp: object expected"); + message.timestamp = $root.google.protobuf.Timestamp.fromObject(object.timestamp); + } + if (object.signature != null) + if (typeof object.signature === "string") + $util.base64.decode(object.signature, message.signature = $util.newBuffer($util.base64.length(object.signature)), 0); + else if (object.signature.length) + message.signature = object.signature; + return message; + }; + + /** + * Creates a plain object from a Proposal message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.types.Proposal + * @static + * @param {tendermint.types.Proposal} message Proposal + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Proposal.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = options.enums === String ? "SIGNED_MSG_TYPE_UNKNOWN" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.height = options.longs === String ? "0" : 0; + object.round = 0; + object.polRound = 0; + object.blockId = null; + object.timestamp = null; + if (options.bytes === String) + object.signature = ""; + else { + object.signature = []; + if (options.bytes !== Array) + object.signature = $util.newBuffer(object.signature); + } + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.tendermint.types.SignedMsgType[message.type] : message.type; + if (message.height != null && message.hasOwnProperty("height")) + if (typeof message.height === "number") + object.height = options.longs === String ? String(message.height) : message.height; + else + object.height = options.longs === String ? $util.Long.prototype.toString.call(message.height) : options.longs === Number ? new $util.LongBits(message.height.low >>> 0, message.height.high >>> 0).toNumber() : message.height; + if (message.round != null && message.hasOwnProperty("round")) + object.round = message.round; + if (message.polRound != null && message.hasOwnProperty("polRound")) + object.polRound = message.polRound; + if (message.blockId != null && message.hasOwnProperty("blockId")) + object.blockId = $root.tendermint.types.BlockID.toObject(message.blockId, options); + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + object.timestamp = $root.google.protobuf.Timestamp.toObject(message.timestamp, options); + if (message.signature != null && message.hasOwnProperty("signature")) + object.signature = options.bytes === String ? $util.base64.encode(message.signature, 0, message.signature.length) : options.bytes === Array ? Array.prototype.slice.call(message.signature) : message.signature; + return object; + }; + + /** + * Converts this Proposal to JSON. + * @function toJSON + * @memberof tendermint.types.Proposal + * @instance + * @returns {Object.} JSON object + */ + Proposal.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Proposal; + })(types.Proposal || {}); + + types.SignedHeader = (function(SignedHeader) { + + /** + * Properties of a SignedHeader. + * @memberof tendermint.types + * @interface ISignedHeader + * @property {tendermint.types.IHeader|null} [header] SignedHeader header + * @property {tendermint.types.ICommit|null} [commit] SignedHeader commit + */ + + /** + * Constructs a new SignedHeader. + * @memberof tendermint.types + * @classdesc Represents a SignedHeader. + * @implements ISignedHeader + * @constructor + * @param {tendermint.types.ISignedHeader=} [properties] Properties to set + */ + function SignedHeader(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SignedHeader header. + * @member {tendermint.types.IHeader|null|undefined} header + * @memberof tendermint.types.SignedHeader + * @instance + */ + SignedHeader.prototype.header = null; + + /** + * SignedHeader commit. + * @member {tendermint.types.ICommit|null|undefined} commit + * @memberof tendermint.types.SignedHeader + * @instance + */ + SignedHeader.prototype.commit = null; + + /** + * Creates a new SignedHeader instance using the specified properties. + * @function create + * @memberof tendermint.types.SignedHeader + * @static + * @param {tendermint.types.ISignedHeader=} [properties] Properties to set + * @returns {tendermint.types.SignedHeader} SignedHeader instance + */ + SignedHeader.create = function create(properties) { + return new SignedHeader(properties); + }; + + /** + * Encodes the specified SignedHeader message. Does not implicitly {@link tendermint.types.SignedHeader.verify|verify} messages. + * @function encode + * @memberof tendermint.types.SignedHeader + * @static + * @param {tendermint.types.ISignedHeader} message SignedHeader message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SignedHeader.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.header != null && Object.hasOwnProperty.call(message, "header")) + $root.tendermint.types.Header.encode(message.header, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.commit != null && Object.hasOwnProperty.call(message, "commit")) + $root.tendermint.types.Commit.encode(message.commit, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SignedHeader message, length delimited. Does not implicitly {@link tendermint.types.SignedHeader.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.types.SignedHeader + * @static + * @param {tendermint.types.ISignedHeader} message SignedHeader message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SignedHeader.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SignedHeader message from the specified reader or buffer. + * @function decode + * @memberof tendermint.types.SignedHeader + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.types.SignedHeader} SignedHeader + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SignedHeader.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.SignedHeader(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.header = $root.tendermint.types.Header.decode(reader, reader.uint32()); + break; + case 2: + message.commit = $root.tendermint.types.Commit.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SignedHeader message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.types.SignedHeader + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.types.SignedHeader} SignedHeader + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SignedHeader.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SignedHeader message. + * @function verify + * @memberof tendermint.types.SignedHeader + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SignedHeader.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.header != null && message.hasOwnProperty("header")) { + var error = $root.tendermint.types.Header.verify(message.header); + if (error) + return "header." + error; + } + if (message.commit != null && message.hasOwnProperty("commit")) { + var error = $root.tendermint.types.Commit.verify(message.commit); + if (error) + return "commit." + error; + } + return null; + }; + + /** + * Creates a SignedHeader message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.types.SignedHeader + * @static + * @param {Object.} object Plain object + * @returns {tendermint.types.SignedHeader} SignedHeader + */ + SignedHeader.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.types.SignedHeader) + return object; + var message = new $root.tendermint.types.SignedHeader(); + if (object.header != null) { + if (typeof object.header !== "object") + throw TypeError(".tendermint.types.SignedHeader.header: object expected"); + message.header = $root.tendermint.types.Header.fromObject(object.header); + } + if (object.commit != null) { + if (typeof object.commit !== "object") + throw TypeError(".tendermint.types.SignedHeader.commit: object expected"); + message.commit = $root.tendermint.types.Commit.fromObject(object.commit); + } + return message; + }; + + /** + * Creates a plain object from a SignedHeader message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.types.SignedHeader + * @static + * @param {tendermint.types.SignedHeader} message SignedHeader + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SignedHeader.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.header = null; + object.commit = null; + } + if (message.header != null && message.hasOwnProperty("header")) + object.header = $root.tendermint.types.Header.toObject(message.header, options); + if (message.commit != null && message.hasOwnProperty("commit")) + object.commit = $root.tendermint.types.Commit.toObject(message.commit, options); + return object; + }; + + /** + * Converts this SignedHeader to JSON. + * @function toJSON + * @memberof tendermint.types.SignedHeader + * @instance + * @returns {Object.} JSON object + */ + SignedHeader.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SignedHeader; + })(types.SignedHeader || {}); + + types.LightBlock = (function(LightBlock) { + + /** + * Properties of a LightBlock. + * @memberof tendermint.types + * @interface ILightBlock + * @property {tendermint.types.ISignedHeader|null} [signedHeader] LightBlock signedHeader + * @property {tendermint.types.IValidatorSet|null} [validatorSet] LightBlock validatorSet + */ + + /** + * Constructs a new LightBlock. + * @memberof tendermint.types + * @classdesc Represents a LightBlock. + * @implements ILightBlock + * @constructor + * @param {tendermint.types.ILightBlock=} [properties] Properties to set + */ + function LightBlock(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LightBlock signedHeader. + * @member {tendermint.types.ISignedHeader|null|undefined} signedHeader + * @memberof tendermint.types.LightBlock + * @instance + */ + LightBlock.prototype.signedHeader = null; + + /** + * LightBlock validatorSet. + * @member {tendermint.types.IValidatorSet|null|undefined} validatorSet + * @memberof tendermint.types.LightBlock + * @instance + */ + LightBlock.prototype.validatorSet = null; + + /** + * Creates a new LightBlock instance using the specified properties. + * @function create + * @memberof tendermint.types.LightBlock + * @static + * @param {tendermint.types.ILightBlock=} [properties] Properties to set + * @returns {tendermint.types.LightBlock} LightBlock instance + */ + LightBlock.create = function create(properties) { + return new LightBlock(properties); + }; + + /** + * Encodes the specified LightBlock message. Does not implicitly {@link tendermint.types.LightBlock.verify|verify} messages. + * @function encode + * @memberof tendermint.types.LightBlock + * @static + * @param {tendermint.types.ILightBlock} message LightBlock message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LightBlock.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.signedHeader != null && Object.hasOwnProperty.call(message, "signedHeader")) + $root.tendermint.types.SignedHeader.encode(message.signedHeader, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.validatorSet != null && Object.hasOwnProperty.call(message, "validatorSet")) + $root.tendermint.types.ValidatorSet.encode(message.validatorSet, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LightBlock message, length delimited. Does not implicitly {@link tendermint.types.LightBlock.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.types.LightBlock + * @static + * @param {tendermint.types.ILightBlock} message LightBlock message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LightBlock.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LightBlock message from the specified reader or buffer. + * @function decode + * @memberof tendermint.types.LightBlock + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.types.LightBlock} LightBlock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LightBlock.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.LightBlock(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.signedHeader = $root.tendermint.types.SignedHeader.decode(reader, reader.uint32()); + break; + case 2: + message.validatorSet = $root.tendermint.types.ValidatorSet.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LightBlock message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.types.LightBlock + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.types.LightBlock} LightBlock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LightBlock.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LightBlock message. + * @function verify + * @memberof tendermint.types.LightBlock + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LightBlock.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.signedHeader != null && message.hasOwnProperty("signedHeader")) { + var error = $root.tendermint.types.SignedHeader.verify(message.signedHeader); + if (error) + return "signedHeader." + error; + } + if (message.validatorSet != null && message.hasOwnProperty("validatorSet")) { + var error = $root.tendermint.types.ValidatorSet.verify(message.validatorSet); + if (error) + return "validatorSet." + error; + } + return null; + }; + + /** + * Creates a LightBlock message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.types.LightBlock + * @static + * @param {Object.} object Plain object + * @returns {tendermint.types.LightBlock} LightBlock + */ + LightBlock.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.types.LightBlock) + return object; + var message = new $root.tendermint.types.LightBlock(); + if (object.signedHeader != null) { + if (typeof object.signedHeader !== "object") + throw TypeError(".tendermint.types.LightBlock.signedHeader: object expected"); + message.signedHeader = $root.tendermint.types.SignedHeader.fromObject(object.signedHeader); + } + if (object.validatorSet != null) { + if (typeof object.validatorSet !== "object") + throw TypeError(".tendermint.types.LightBlock.validatorSet: object expected"); + message.validatorSet = $root.tendermint.types.ValidatorSet.fromObject(object.validatorSet); + } + return message; + }; + + /** + * Creates a plain object from a LightBlock message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.types.LightBlock + * @static + * @param {tendermint.types.LightBlock} message LightBlock + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LightBlock.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.signedHeader = null; + object.validatorSet = null; + } + if (message.signedHeader != null && message.hasOwnProperty("signedHeader")) + object.signedHeader = $root.tendermint.types.SignedHeader.toObject(message.signedHeader, options); + if (message.validatorSet != null && message.hasOwnProperty("validatorSet")) + object.validatorSet = $root.tendermint.types.ValidatorSet.toObject(message.validatorSet, options); + return object; + }; + + /** + * Converts this LightBlock to JSON. + * @function toJSON + * @memberof tendermint.types.LightBlock + * @instance + * @returns {Object.} JSON object + */ + LightBlock.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return LightBlock; + })(types.LightBlock || {}); + + types.BlockMeta = (function(BlockMeta) { + + /** + * Properties of a BlockMeta. + * @memberof tendermint.types + * @interface IBlockMeta + * @property {tendermint.types.IBlockID|null} [blockId] BlockMeta blockId + * @property {number|Long|null} [blockSize] BlockMeta blockSize + * @property {tendermint.types.IHeader|null} [header] BlockMeta header + * @property {number|Long|null} [numTxs] BlockMeta numTxs + */ + + /** + * Constructs a new BlockMeta. + * @memberof tendermint.types + * @classdesc Represents a BlockMeta. + * @implements IBlockMeta + * @constructor + * @param {tendermint.types.IBlockMeta=} [properties] Properties to set + */ + function BlockMeta(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BlockMeta blockId. + * @member {tendermint.types.IBlockID|null|undefined} blockId + * @memberof tendermint.types.BlockMeta + * @instance + */ + BlockMeta.prototype.blockId = null; + + /** + * BlockMeta blockSize. + * @member {number|Long} blockSize + * @memberof tendermint.types.BlockMeta + * @instance + */ + BlockMeta.prototype.blockSize = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * BlockMeta header. + * @member {tendermint.types.IHeader|null|undefined} header + * @memberof tendermint.types.BlockMeta + * @instance + */ + BlockMeta.prototype.header = null; + + /** + * BlockMeta numTxs. + * @member {number|Long} numTxs + * @memberof tendermint.types.BlockMeta + * @instance + */ + BlockMeta.prototype.numTxs = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new BlockMeta instance using the specified properties. + * @function create + * @memberof tendermint.types.BlockMeta + * @static + * @param {tendermint.types.IBlockMeta=} [properties] Properties to set + * @returns {tendermint.types.BlockMeta} BlockMeta instance + */ + BlockMeta.create = function create(properties) { + return new BlockMeta(properties); + }; + + /** + * Encodes the specified BlockMeta message. Does not implicitly {@link tendermint.types.BlockMeta.verify|verify} messages. + * @function encode + * @memberof tendermint.types.BlockMeta + * @static + * @param {tendermint.types.IBlockMeta} message BlockMeta message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BlockMeta.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.blockId != null && Object.hasOwnProperty.call(message, "blockId")) + $root.tendermint.types.BlockID.encode(message.blockId, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.blockSize != null && Object.hasOwnProperty.call(message, "blockSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.blockSize); + if (message.header != null && Object.hasOwnProperty.call(message, "header")) + $root.tendermint.types.Header.encode(message.header, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.numTxs != null && Object.hasOwnProperty.call(message, "numTxs")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.numTxs); + return writer; + }; + + /** + * Encodes the specified BlockMeta message, length delimited. Does not implicitly {@link tendermint.types.BlockMeta.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.types.BlockMeta + * @static + * @param {tendermint.types.IBlockMeta} message BlockMeta message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BlockMeta.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BlockMeta message from the specified reader or buffer. + * @function decode + * @memberof tendermint.types.BlockMeta + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.types.BlockMeta} BlockMeta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BlockMeta.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.BlockMeta(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.blockId = $root.tendermint.types.BlockID.decode(reader, reader.uint32()); + break; + case 2: + message.blockSize = reader.int64(); + break; + case 3: + message.header = $root.tendermint.types.Header.decode(reader, reader.uint32()); + break; + case 4: + message.numTxs = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BlockMeta message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.types.BlockMeta + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.types.BlockMeta} BlockMeta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BlockMeta.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BlockMeta message. + * @function verify + * @memberof tendermint.types.BlockMeta + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BlockMeta.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.blockId != null && message.hasOwnProperty("blockId")) { + var error = $root.tendermint.types.BlockID.verify(message.blockId); + if (error) + return "blockId." + error; + } + if (message.blockSize != null && message.hasOwnProperty("blockSize")) + if (!$util.isInteger(message.blockSize) && !(message.blockSize && $util.isInteger(message.blockSize.low) && $util.isInteger(message.blockSize.high))) + return "blockSize: integer|Long expected"; + if (message.header != null && message.hasOwnProperty("header")) { + var error = $root.tendermint.types.Header.verify(message.header); + if (error) + return "header." + error; + } + if (message.numTxs != null && message.hasOwnProperty("numTxs")) + if (!$util.isInteger(message.numTxs) && !(message.numTxs && $util.isInteger(message.numTxs.low) && $util.isInteger(message.numTxs.high))) + return "numTxs: integer|Long expected"; + return null; + }; + + /** + * Creates a BlockMeta message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.types.BlockMeta + * @static + * @param {Object.} object Plain object + * @returns {tendermint.types.BlockMeta} BlockMeta + */ + BlockMeta.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.types.BlockMeta) + return object; + var message = new $root.tendermint.types.BlockMeta(); + if (object.blockId != null) { + if (typeof object.blockId !== "object") + throw TypeError(".tendermint.types.BlockMeta.blockId: object expected"); + message.blockId = $root.tendermint.types.BlockID.fromObject(object.blockId); + } + if (object.blockSize != null) + if ($util.Long) + (message.blockSize = $util.Long.fromValue(object.blockSize)).unsigned = false; + else if (typeof object.blockSize === "string") + message.blockSize = parseInt(object.blockSize, 10); + else if (typeof object.blockSize === "number") + message.blockSize = object.blockSize; + else if (typeof object.blockSize === "object") + message.blockSize = new $util.LongBits(object.blockSize.low >>> 0, object.blockSize.high >>> 0).toNumber(); + if (object.header != null) { + if (typeof object.header !== "object") + throw TypeError(".tendermint.types.BlockMeta.header: object expected"); + message.header = $root.tendermint.types.Header.fromObject(object.header); + } + if (object.numTxs != null) + if ($util.Long) + (message.numTxs = $util.Long.fromValue(object.numTxs)).unsigned = false; + else if (typeof object.numTxs === "string") + message.numTxs = parseInt(object.numTxs, 10); + else if (typeof object.numTxs === "number") + message.numTxs = object.numTxs; + else if (typeof object.numTxs === "object") + message.numTxs = new $util.LongBits(object.numTxs.low >>> 0, object.numTxs.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a BlockMeta message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.types.BlockMeta + * @static + * @param {tendermint.types.BlockMeta} message BlockMeta + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BlockMeta.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.blockId = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.blockSize = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.blockSize = options.longs === String ? "0" : 0; + object.header = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.numTxs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.numTxs = options.longs === String ? "0" : 0; + } + if (message.blockId != null && message.hasOwnProperty("blockId")) + object.blockId = $root.tendermint.types.BlockID.toObject(message.blockId, options); + if (message.blockSize != null && message.hasOwnProperty("blockSize")) + if (typeof message.blockSize === "number") + object.blockSize = options.longs === String ? String(message.blockSize) : message.blockSize; + else + object.blockSize = options.longs === String ? $util.Long.prototype.toString.call(message.blockSize) : options.longs === Number ? new $util.LongBits(message.blockSize.low >>> 0, message.blockSize.high >>> 0).toNumber() : message.blockSize; + if (message.header != null && message.hasOwnProperty("header")) + object.header = $root.tendermint.types.Header.toObject(message.header, options); + if (message.numTxs != null && message.hasOwnProperty("numTxs")) + if (typeof message.numTxs === "number") + object.numTxs = options.longs === String ? String(message.numTxs) : message.numTxs; + else + object.numTxs = options.longs === String ? $util.Long.prototype.toString.call(message.numTxs) : options.longs === Number ? new $util.LongBits(message.numTxs.low >>> 0, message.numTxs.high >>> 0).toNumber() : message.numTxs; + return object; + }; + + /** + * Converts this BlockMeta to JSON. + * @function toJSON + * @memberof tendermint.types.BlockMeta + * @instance + * @returns {Object.} JSON object + */ + BlockMeta.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return BlockMeta; + })(types.BlockMeta || {}); + + types.TxProof = (function(TxProof) { + + /** + * Properties of a TxProof. + * @memberof tendermint.types + * @interface ITxProof + * @property {Uint8Array|null} [rootHash] TxProof rootHash + * @property {Uint8Array|null} [data] TxProof data + * @property {tendermint.crypto.IProof|null} [proof] TxProof proof + */ + + /** + * Constructs a new TxProof. + * @memberof tendermint.types + * @classdesc Represents a TxProof. + * @implements ITxProof + * @constructor + * @param {tendermint.types.ITxProof=} [properties] Properties to set + */ + function TxProof(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TxProof rootHash. + * @member {Uint8Array} rootHash + * @memberof tendermint.types.TxProof + * @instance + */ + TxProof.prototype.rootHash = $util.newBuffer([]); + + /** + * TxProof data. + * @member {Uint8Array} data + * @memberof tendermint.types.TxProof + * @instance + */ + TxProof.prototype.data = $util.newBuffer([]); + + /** + * TxProof proof. + * @member {tendermint.crypto.IProof|null|undefined} proof + * @memberof tendermint.types.TxProof + * @instance + */ + TxProof.prototype.proof = null; + + /** + * Creates a new TxProof instance using the specified properties. + * @function create + * @memberof tendermint.types.TxProof + * @static + * @param {tendermint.types.ITxProof=} [properties] Properties to set + * @returns {tendermint.types.TxProof} TxProof instance + */ + TxProof.create = function create(properties) { + return new TxProof(properties); + }; + + /** + * Encodes the specified TxProof message. Does not implicitly {@link tendermint.types.TxProof.verify|verify} messages. + * @function encode + * @memberof tendermint.types.TxProof + * @static + * @param {tendermint.types.ITxProof} message TxProof message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TxProof.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rootHash != null && Object.hasOwnProperty.call(message, "rootHash")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.rootHash); + if (message.data != null && Object.hasOwnProperty.call(message, "data")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.data); + if (message.proof != null && Object.hasOwnProperty.call(message, "proof")) + $root.tendermint.crypto.Proof.encode(message.proof, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TxProof message, length delimited. Does not implicitly {@link tendermint.types.TxProof.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.types.TxProof + * @static + * @param {tendermint.types.ITxProof} message TxProof message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TxProof.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TxProof message from the specified reader or buffer. + * @function decode + * @memberof tendermint.types.TxProof + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.types.TxProof} TxProof + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TxProof.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.TxProof(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.rootHash = reader.bytes(); + break; + case 2: + message.data = reader.bytes(); + break; + case 3: + message.proof = $root.tendermint.crypto.Proof.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TxProof message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.types.TxProof + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.types.TxProof} TxProof + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TxProof.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TxProof message. + * @function verify + * @memberof tendermint.types.TxProof + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TxProof.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rootHash != null && message.hasOwnProperty("rootHash")) + if (!(message.rootHash && typeof message.rootHash.length === "number" || $util.isString(message.rootHash))) + return "rootHash: buffer expected"; + if (message.data != null && message.hasOwnProperty("data")) + if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) + return "data: buffer expected"; + if (message.proof != null && message.hasOwnProperty("proof")) { + var error = $root.tendermint.crypto.Proof.verify(message.proof); + if (error) + return "proof." + error; + } + return null; + }; + + /** + * Creates a TxProof message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.types.TxProof + * @static + * @param {Object.} object Plain object + * @returns {tendermint.types.TxProof} TxProof + */ + TxProof.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.types.TxProof) + return object; + var message = new $root.tendermint.types.TxProof(); + if (object.rootHash != null) + if (typeof object.rootHash === "string") + $util.base64.decode(object.rootHash, message.rootHash = $util.newBuffer($util.base64.length(object.rootHash)), 0); + else if (object.rootHash.length) + message.rootHash = object.rootHash; + if (object.data != null) + if (typeof object.data === "string") + $util.base64.decode(object.data, message.data = $util.newBuffer($util.base64.length(object.data)), 0); + else if (object.data.length) + message.data = object.data; + if (object.proof != null) { + if (typeof object.proof !== "object") + throw TypeError(".tendermint.types.TxProof.proof: object expected"); + message.proof = $root.tendermint.crypto.Proof.fromObject(object.proof); + } + return message; + }; + + /** + * Creates a plain object from a TxProof message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.types.TxProof + * @static + * @param {tendermint.types.TxProof} message TxProof + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TxProof.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.rootHash = ""; + else { + object.rootHash = []; + if (options.bytes !== Array) + object.rootHash = $util.newBuffer(object.rootHash); + } + if (options.bytes === String) + object.data = ""; + else { + object.data = []; + if (options.bytes !== Array) + object.data = $util.newBuffer(object.data); + } + object.proof = null; + } + if (message.rootHash != null && message.hasOwnProperty("rootHash")) + object.rootHash = options.bytes === String ? $util.base64.encode(message.rootHash, 0, message.rootHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.rootHash) : message.rootHash; + if (message.data != null && message.hasOwnProperty("data")) + object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; + if (message.proof != null && message.hasOwnProperty("proof")) + object.proof = $root.tendermint.crypto.Proof.toObject(message.proof, options); + return object; + }; + + /** + * Converts this TxProof to JSON. + * @function toJSON + * @memberof tendermint.types.TxProof + * @instance + * @returns {Object.} JSON object + */ + TxProof.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TxProof; + })(types.TxProof || {}); + + types.ValidatorSet = (function(ValidatorSet) { + + /** + * Properties of a ValidatorSet. + * @memberof tendermint.types + * @interface IValidatorSet + * @property {Array.|null} [validators] ValidatorSet validators + * @property {tendermint.types.IValidator|null} [proposer] ValidatorSet proposer + * @property {number|Long|null} [totalVotingPower] ValidatorSet totalVotingPower + */ + + /** + * Constructs a new ValidatorSet. + * @memberof tendermint.types + * @classdesc Represents a ValidatorSet. + * @implements IValidatorSet + * @constructor + * @param {tendermint.types.IValidatorSet=} [properties] Properties to set + */ + function ValidatorSet(properties) { + this.validators = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ValidatorSet validators. + * @member {Array.} validators + * @memberof tendermint.types.ValidatorSet + * @instance + */ + ValidatorSet.prototype.validators = $util.emptyArray; + + /** + * ValidatorSet proposer. + * @member {tendermint.types.IValidator|null|undefined} proposer + * @memberof tendermint.types.ValidatorSet + * @instance + */ + ValidatorSet.prototype.proposer = null; + + /** + * ValidatorSet totalVotingPower. + * @member {number|Long} totalVotingPower + * @memberof tendermint.types.ValidatorSet + * @instance + */ + ValidatorSet.prototype.totalVotingPower = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new ValidatorSet instance using the specified properties. + * @function create + * @memberof tendermint.types.ValidatorSet + * @static + * @param {tendermint.types.IValidatorSet=} [properties] Properties to set + * @returns {tendermint.types.ValidatorSet} ValidatorSet instance + */ + ValidatorSet.create = function create(properties) { + return new ValidatorSet(properties); + }; + + /** + * Encodes the specified ValidatorSet message. Does not implicitly {@link tendermint.types.ValidatorSet.verify|verify} messages. + * @function encode + * @memberof tendermint.types.ValidatorSet + * @static + * @param {tendermint.types.IValidatorSet} message ValidatorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValidatorSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.validators != null && message.validators.length) + for (var i = 0; i < message.validators.length; ++i) + $root.tendermint.types.Validator.encode(message.validators[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.proposer != null && Object.hasOwnProperty.call(message, "proposer")) + $root.tendermint.types.Validator.encode(message.proposer, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.totalVotingPower != null && Object.hasOwnProperty.call(message, "totalVotingPower")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.totalVotingPower); + return writer; + }; + + /** + * Encodes the specified ValidatorSet message, length delimited. Does not implicitly {@link tendermint.types.ValidatorSet.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.types.ValidatorSet + * @static + * @param {tendermint.types.IValidatorSet} message ValidatorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValidatorSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ValidatorSet message from the specified reader or buffer. + * @function decode + * @memberof tendermint.types.ValidatorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.types.ValidatorSet} ValidatorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValidatorSet.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.ValidatorSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.validators && message.validators.length)) + message.validators = []; + message.validators.push($root.tendermint.types.Validator.decode(reader, reader.uint32())); + break; + case 2: + message.proposer = $root.tendermint.types.Validator.decode(reader, reader.uint32()); + break; + case 3: + message.totalVotingPower = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ValidatorSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.types.ValidatorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.types.ValidatorSet} ValidatorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValidatorSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ValidatorSet message. + * @function verify + * @memberof tendermint.types.ValidatorSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ValidatorSet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.validators != null && message.hasOwnProperty("validators")) { + if (!Array.isArray(message.validators)) + return "validators: array expected"; + for (var i = 0; i < message.validators.length; ++i) { + var error = $root.tendermint.types.Validator.verify(message.validators[i]); + if (error) + return "validators." + error; + } + } + if (message.proposer != null && message.hasOwnProperty("proposer")) { + var error = $root.tendermint.types.Validator.verify(message.proposer); + if (error) + return "proposer." + error; + } + if (message.totalVotingPower != null && message.hasOwnProperty("totalVotingPower")) + if (!$util.isInteger(message.totalVotingPower) && !(message.totalVotingPower && $util.isInteger(message.totalVotingPower.low) && $util.isInteger(message.totalVotingPower.high))) + return "totalVotingPower: integer|Long expected"; + return null; + }; + + /** + * Creates a ValidatorSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.types.ValidatorSet + * @static + * @param {Object.} object Plain object + * @returns {tendermint.types.ValidatorSet} ValidatorSet + */ + ValidatorSet.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.types.ValidatorSet) + return object; + var message = new $root.tendermint.types.ValidatorSet(); + if (object.validators) { + if (!Array.isArray(object.validators)) + throw TypeError(".tendermint.types.ValidatorSet.validators: array expected"); + message.validators = []; + for (var i = 0; i < object.validators.length; ++i) { + if (typeof object.validators[i] !== "object") + throw TypeError(".tendermint.types.ValidatorSet.validators: object expected"); + message.validators[i] = $root.tendermint.types.Validator.fromObject(object.validators[i]); + } + } + if (object.proposer != null) { + if (typeof object.proposer !== "object") + throw TypeError(".tendermint.types.ValidatorSet.proposer: object expected"); + message.proposer = $root.tendermint.types.Validator.fromObject(object.proposer); + } + if (object.totalVotingPower != null) + if ($util.Long) + (message.totalVotingPower = $util.Long.fromValue(object.totalVotingPower)).unsigned = false; + else if (typeof object.totalVotingPower === "string") + message.totalVotingPower = parseInt(object.totalVotingPower, 10); + else if (typeof object.totalVotingPower === "number") + message.totalVotingPower = object.totalVotingPower; + else if (typeof object.totalVotingPower === "object") + message.totalVotingPower = new $util.LongBits(object.totalVotingPower.low >>> 0, object.totalVotingPower.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a ValidatorSet message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.types.ValidatorSet + * @static + * @param {tendermint.types.ValidatorSet} message ValidatorSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ValidatorSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.validators = []; + if (options.defaults) { + object.proposer = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.totalVotingPower = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.totalVotingPower = options.longs === String ? "0" : 0; + } + if (message.validators && message.validators.length) { + object.validators = []; + for (var j = 0; j < message.validators.length; ++j) + object.validators[j] = $root.tendermint.types.Validator.toObject(message.validators[j], options); + } + if (message.proposer != null && message.hasOwnProperty("proposer")) + object.proposer = $root.tendermint.types.Validator.toObject(message.proposer, options); + if (message.totalVotingPower != null && message.hasOwnProperty("totalVotingPower")) + if (typeof message.totalVotingPower === "number") + object.totalVotingPower = options.longs === String ? String(message.totalVotingPower) : message.totalVotingPower; + else + object.totalVotingPower = options.longs === String ? $util.Long.prototype.toString.call(message.totalVotingPower) : options.longs === Number ? new $util.LongBits(message.totalVotingPower.low >>> 0, message.totalVotingPower.high >>> 0).toNumber() : message.totalVotingPower; + return object; + }; + + /** + * Converts this ValidatorSet to JSON. + * @function toJSON + * @memberof tendermint.types.ValidatorSet + * @instance + * @returns {Object.} JSON object + */ + ValidatorSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ValidatorSet; + })(types.ValidatorSet || {}); + + types.Validator = (function(Validator) { + + /** + * Properties of a Validator. + * @memberof tendermint.types + * @interface IValidator + * @property {Uint8Array|null} [address] Validator address + * @property {tendermint.crypto.IPublicKey|null} [pubKey] Validator pubKey + * @property {number|Long|null} [votingPower] Validator votingPower + * @property {number|Long|null} [proposerPriority] Validator proposerPriority + */ + + /** + * Constructs a new Validator. + * @memberof tendermint.types + * @classdesc Represents a Validator. + * @implements IValidator + * @constructor + * @param {tendermint.types.IValidator=} [properties] Properties to set + */ + function Validator(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Validator address. + * @member {Uint8Array} address + * @memberof tendermint.types.Validator + * @instance + */ + Validator.prototype.address = $util.newBuffer([]); + + /** + * Validator pubKey. + * @member {tendermint.crypto.IPublicKey|null|undefined} pubKey + * @memberof tendermint.types.Validator + * @instance + */ + Validator.prototype.pubKey = null; + + /** + * Validator votingPower. + * @member {number|Long} votingPower + * @memberof tendermint.types.Validator + * @instance + */ + Validator.prototype.votingPower = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Validator proposerPriority. + * @member {number|Long} proposerPriority + * @memberof tendermint.types.Validator + * @instance + */ + Validator.prototype.proposerPriority = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new Validator instance using the specified properties. + * @function create + * @memberof tendermint.types.Validator + * @static + * @param {tendermint.types.IValidator=} [properties] Properties to set + * @returns {tendermint.types.Validator} Validator instance + */ + Validator.create = function create(properties) { + return new Validator(properties); + }; + + /** + * Encodes the specified Validator message. Does not implicitly {@link tendermint.types.Validator.verify|verify} messages. + * @function encode + * @memberof tendermint.types.Validator + * @static + * @param {tendermint.types.IValidator} message Validator message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Validator.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.address != null && Object.hasOwnProperty.call(message, "address")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.address); + if (message.pubKey != null && Object.hasOwnProperty.call(message, "pubKey")) + $root.tendermint.crypto.PublicKey.encode(message.pubKey, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.votingPower != null && Object.hasOwnProperty.call(message, "votingPower")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.votingPower); + if (message.proposerPriority != null && Object.hasOwnProperty.call(message, "proposerPriority")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.proposerPriority); + return writer; + }; + + /** + * Encodes the specified Validator message, length delimited. Does not implicitly {@link tendermint.types.Validator.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.types.Validator + * @static + * @param {tendermint.types.IValidator} message Validator message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Validator.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Validator message from the specified reader or buffer. + * @function decode + * @memberof tendermint.types.Validator + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.types.Validator} Validator + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Validator.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.Validator(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.address = reader.bytes(); + break; + case 2: + message.pubKey = $root.tendermint.crypto.PublicKey.decode(reader, reader.uint32()); + break; + case 3: + message.votingPower = reader.int64(); + break; + case 4: + message.proposerPriority = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Validator message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.types.Validator + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.types.Validator} Validator + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Validator.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Validator message. + * @function verify + * @memberof tendermint.types.Validator + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Validator.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.address != null && message.hasOwnProperty("address")) + if (!(message.address && typeof message.address.length === "number" || $util.isString(message.address))) + return "address: buffer expected"; + if (message.pubKey != null && message.hasOwnProperty("pubKey")) { + var error = $root.tendermint.crypto.PublicKey.verify(message.pubKey); + if (error) + return "pubKey." + error; + } + if (message.votingPower != null && message.hasOwnProperty("votingPower")) + if (!$util.isInteger(message.votingPower) && !(message.votingPower && $util.isInteger(message.votingPower.low) && $util.isInteger(message.votingPower.high))) + return "votingPower: integer|Long expected"; + if (message.proposerPriority != null && message.hasOwnProperty("proposerPriority")) + if (!$util.isInteger(message.proposerPriority) && !(message.proposerPriority && $util.isInteger(message.proposerPriority.low) && $util.isInteger(message.proposerPriority.high))) + return "proposerPriority: integer|Long expected"; + return null; + }; + + /** + * Creates a Validator message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.types.Validator + * @static + * @param {Object.} object Plain object + * @returns {tendermint.types.Validator} Validator + */ + Validator.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.types.Validator) + return object; + var message = new $root.tendermint.types.Validator(); + if (object.address != null) + if (typeof object.address === "string") + $util.base64.decode(object.address, message.address = $util.newBuffer($util.base64.length(object.address)), 0); + else if (object.address.length) + message.address = object.address; + if (object.pubKey != null) { + if (typeof object.pubKey !== "object") + throw TypeError(".tendermint.types.Validator.pubKey: object expected"); + message.pubKey = $root.tendermint.crypto.PublicKey.fromObject(object.pubKey); + } + if (object.votingPower != null) + if ($util.Long) + (message.votingPower = $util.Long.fromValue(object.votingPower)).unsigned = false; + else if (typeof object.votingPower === "string") + message.votingPower = parseInt(object.votingPower, 10); + else if (typeof object.votingPower === "number") + message.votingPower = object.votingPower; + else if (typeof object.votingPower === "object") + message.votingPower = new $util.LongBits(object.votingPower.low >>> 0, object.votingPower.high >>> 0).toNumber(); + if (object.proposerPriority != null) + if ($util.Long) + (message.proposerPriority = $util.Long.fromValue(object.proposerPriority)).unsigned = false; + else if (typeof object.proposerPriority === "string") + message.proposerPriority = parseInt(object.proposerPriority, 10); + else if (typeof object.proposerPriority === "number") + message.proposerPriority = object.proposerPriority; + else if (typeof object.proposerPriority === "object") + message.proposerPriority = new $util.LongBits(object.proposerPriority.low >>> 0, object.proposerPriority.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a Validator message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.types.Validator + * @static + * @param {tendermint.types.Validator} message Validator + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Validator.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.address = ""; + else { + object.address = []; + if (options.bytes !== Array) + object.address = $util.newBuffer(object.address); + } + object.pubKey = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.votingPower = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.votingPower = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.proposerPriority = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.proposerPriority = options.longs === String ? "0" : 0; + } + if (message.address != null && message.hasOwnProperty("address")) + object.address = options.bytes === String ? $util.base64.encode(message.address, 0, message.address.length) : options.bytes === Array ? Array.prototype.slice.call(message.address) : message.address; + if (message.pubKey != null && message.hasOwnProperty("pubKey")) + object.pubKey = $root.tendermint.crypto.PublicKey.toObject(message.pubKey, options); + if (message.votingPower != null && message.hasOwnProperty("votingPower")) + if (typeof message.votingPower === "number") + object.votingPower = options.longs === String ? String(message.votingPower) : message.votingPower; + else + object.votingPower = options.longs === String ? $util.Long.prototype.toString.call(message.votingPower) : options.longs === Number ? new $util.LongBits(message.votingPower.low >>> 0, message.votingPower.high >>> 0).toNumber() : message.votingPower; + if (message.proposerPriority != null && message.hasOwnProperty("proposerPriority")) + if (typeof message.proposerPriority === "number") + object.proposerPriority = options.longs === String ? String(message.proposerPriority) : message.proposerPriority; + else + object.proposerPriority = options.longs === String ? $util.Long.prototype.toString.call(message.proposerPriority) : options.longs === Number ? new $util.LongBits(message.proposerPriority.low >>> 0, message.proposerPriority.high >>> 0).toNumber() : message.proposerPriority; + return object; + }; + + /** + * Converts this Validator to JSON. + * @function toJSON + * @memberof tendermint.types.Validator + * @instance + * @returns {Object.} JSON object + */ + Validator.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Validator; + })(types.Validator || {}); + + types.SimpleValidator = (function(SimpleValidator) { + + /** + * Properties of a SimpleValidator. + * @memberof tendermint.types + * @interface ISimpleValidator + * @property {tendermint.crypto.IPublicKey|null} [pubKey] SimpleValidator pubKey + * @property {number|Long|null} [votingPower] SimpleValidator votingPower + */ + + /** + * Constructs a new SimpleValidator. + * @memberof tendermint.types + * @classdesc Represents a SimpleValidator. + * @implements ISimpleValidator + * @constructor + * @param {tendermint.types.ISimpleValidator=} [properties] Properties to set + */ + function SimpleValidator(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SimpleValidator pubKey. + * @member {tendermint.crypto.IPublicKey|null|undefined} pubKey + * @memberof tendermint.types.SimpleValidator + * @instance + */ + SimpleValidator.prototype.pubKey = null; + + /** + * SimpleValidator votingPower. + * @member {number|Long} votingPower + * @memberof tendermint.types.SimpleValidator + * @instance + */ + SimpleValidator.prototype.votingPower = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new SimpleValidator instance using the specified properties. + * @function create + * @memberof tendermint.types.SimpleValidator + * @static + * @param {tendermint.types.ISimpleValidator=} [properties] Properties to set + * @returns {tendermint.types.SimpleValidator} SimpleValidator instance + */ + SimpleValidator.create = function create(properties) { + return new SimpleValidator(properties); + }; + + /** + * Encodes the specified SimpleValidator message. Does not implicitly {@link tendermint.types.SimpleValidator.verify|verify} messages. + * @function encode + * @memberof tendermint.types.SimpleValidator + * @static + * @param {tendermint.types.ISimpleValidator} message SimpleValidator message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SimpleValidator.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pubKey != null && Object.hasOwnProperty.call(message, "pubKey")) + $root.tendermint.crypto.PublicKey.encode(message.pubKey, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.votingPower != null && Object.hasOwnProperty.call(message, "votingPower")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.votingPower); + return writer; + }; + + /** + * Encodes the specified SimpleValidator message, length delimited. Does not implicitly {@link tendermint.types.SimpleValidator.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.types.SimpleValidator + * @static + * @param {tendermint.types.ISimpleValidator} message SimpleValidator message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SimpleValidator.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SimpleValidator message from the specified reader or buffer. + * @function decode + * @memberof tendermint.types.SimpleValidator + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.types.SimpleValidator} SimpleValidator + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SimpleValidator.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.SimpleValidator(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.pubKey = $root.tendermint.crypto.PublicKey.decode(reader, reader.uint32()); + break; + case 2: + message.votingPower = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SimpleValidator message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.types.SimpleValidator + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.types.SimpleValidator} SimpleValidator + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SimpleValidator.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SimpleValidator message. + * @function verify + * @memberof tendermint.types.SimpleValidator + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SimpleValidator.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.pubKey != null && message.hasOwnProperty("pubKey")) { + var error = $root.tendermint.crypto.PublicKey.verify(message.pubKey); + if (error) + return "pubKey." + error; + } + if (message.votingPower != null && message.hasOwnProperty("votingPower")) + if (!$util.isInteger(message.votingPower) && !(message.votingPower && $util.isInteger(message.votingPower.low) && $util.isInteger(message.votingPower.high))) + return "votingPower: integer|Long expected"; + return null; + }; + + /** + * Creates a SimpleValidator message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.types.SimpleValidator + * @static + * @param {Object.} object Plain object + * @returns {tendermint.types.SimpleValidator} SimpleValidator + */ + SimpleValidator.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.types.SimpleValidator) + return object; + var message = new $root.tendermint.types.SimpleValidator(); + if (object.pubKey != null) { + if (typeof object.pubKey !== "object") + throw TypeError(".tendermint.types.SimpleValidator.pubKey: object expected"); + message.pubKey = $root.tendermint.crypto.PublicKey.fromObject(object.pubKey); + } + if (object.votingPower != null) + if ($util.Long) + (message.votingPower = $util.Long.fromValue(object.votingPower)).unsigned = false; + else if (typeof object.votingPower === "string") + message.votingPower = parseInt(object.votingPower, 10); + else if (typeof object.votingPower === "number") + message.votingPower = object.votingPower; + else if (typeof object.votingPower === "object") + message.votingPower = new $util.LongBits(object.votingPower.low >>> 0, object.votingPower.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a SimpleValidator message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.types.SimpleValidator + * @static + * @param {tendermint.types.SimpleValidator} message SimpleValidator + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SimpleValidator.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.pubKey = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.votingPower = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.votingPower = options.longs === String ? "0" : 0; + } + if (message.pubKey != null && message.hasOwnProperty("pubKey")) + object.pubKey = $root.tendermint.crypto.PublicKey.toObject(message.pubKey, options); + if (message.votingPower != null && message.hasOwnProperty("votingPower")) + if (typeof message.votingPower === "number") + object.votingPower = options.longs === String ? String(message.votingPower) : message.votingPower; + else + object.votingPower = options.longs === String ? $util.Long.prototype.toString.call(message.votingPower) : options.longs === Number ? new $util.LongBits(message.votingPower.low >>> 0, message.votingPower.high >>> 0).toNumber() : message.votingPower; + return object; + }; + + /** + * Converts this SimpleValidator to JSON. + * @function toJSON + * @memberof tendermint.types.SimpleValidator + * @instance + * @returns {Object.} JSON object + */ + SimpleValidator.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SimpleValidator; + })(types.SimpleValidator || {}); + + return types; + })(tendermint.types || {}); + + /** + * Namespace version. + * @memberof tendermint + * @namespace + */ + + tendermint.version = (function(version) { + + version.App = (function(App) { + + /** + * Properties of an App. + * @memberof tendermint.version + * @interface IApp + * @property {number|Long|null} [protocol] App protocol + * @property {string|null} [software] App software + */ + + /** + * Constructs a new App. + * @memberof tendermint.version + * @classdesc Represents an App. + * @implements IApp + * @constructor + * @param {tendermint.version.IApp=} [properties] Properties to set + */ + function App(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * App protocol. + * @member {number|Long} protocol + * @memberof tendermint.version.App + * @instance + */ + App.prototype.protocol = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * App software. + * @member {string} software + * @memberof tendermint.version.App + * @instance + */ + App.prototype.software = ""; + + /** + * Creates a new App instance using the specified properties. + * @function create + * @memberof tendermint.version.App + * @static + * @param {tendermint.version.IApp=} [properties] Properties to set + * @returns {tendermint.version.App} App instance + */ + App.create = function create(properties) { + return new App(properties); + }; + + /** + * Encodes the specified App message. Does not implicitly {@link tendermint.version.App.verify|verify} messages. + * @function encode + * @memberof tendermint.version.App + * @static + * @param {tendermint.version.IApp} message App message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + App.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.protocol != null && Object.hasOwnProperty.call(message, "protocol")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.protocol); + if (message.software != null && Object.hasOwnProperty.call(message, "software")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.software); + return writer; + }; + + /** + * Encodes the specified App message, length delimited. Does not implicitly {@link tendermint.version.App.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.version.App + * @static + * @param {tendermint.version.IApp} message App message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + App.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an App message from the specified reader or buffer. + * @function decode + * @memberof tendermint.version.App + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.version.App} App + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + App.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.version.App(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.protocol = reader.uint64(); + break; + case 2: + message.software = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an App message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.version.App + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.version.App} App + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + App.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an App message. + * @function verify + * @memberof tendermint.version.App + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + App.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.protocol != null && message.hasOwnProperty("protocol")) + if (!$util.isInteger(message.protocol) && !(message.protocol && $util.isInteger(message.protocol.low) && $util.isInteger(message.protocol.high))) + return "protocol: integer|Long expected"; + if (message.software != null && message.hasOwnProperty("software")) + if (!$util.isString(message.software)) + return "software: string expected"; + return null; + }; + + /** + * Creates an App message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.version.App + * @static + * @param {Object.} object Plain object + * @returns {tendermint.version.App} App + */ + App.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.version.App) + return object; + var message = new $root.tendermint.version.App(); + if (object.protocol != null) + if ($util.Long) + (message.protocol = $util.Long.fromValue(object.protocol)).unsigned = true; + else if (typeof object.protocol === "string") + message.protocol = parseInt(object.protocol, 10); + else if (typeof object.protocol === "number") + message.protocol = object.protocol; + else if (typeof object.protocol === "object") + message.protocol = new $util.LongBits(object.protocol.low >>> 0, object.protocol.high >>> 0).toNumber(true); + if (object.software != null) + message.software = String(object.software); + return message; + }; + + /** + * Creates a plain object from an App message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.version.App + * @static + * @param {tendermint.version.App} message App + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + App.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.protocol = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.protocol = options.longs === String ? "0" : 0; + object.software = ""; + } + if (message.protocol != null && message.hasOwnProperty("protocol")) + if (typeof message.protocol === "number") + object.protocol = options.longs === String ? String(message.protocol) : message.protocol; + else + object.protocol = options.longs === String ? $util.Long.prototype.toString.call(message.protocol) : options.longs === Number ? new $util.LongBits(message.protocol.low >>> 0, message.protocol.high >>> 0).toNumber(true) : message.protocol; + if (message.software != null && message.hasOwnProperty("software")) + object.software = message.software; + return object; + }; + + /** + * Converts this App to JSON. + * @function toJSON + * @memberof tendermint.version.App + * @instance + * @returns {Object.} JSON object + */ + App.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return App; + })(version.App || {}); + + version.Consensus = (function(Consensus) { + + /** + * Properties of a Consensus. + * @memberof tendermint.version + * @interface IConsensus + * @property {number|Long|null} [block] Consensus block + * @property {number|Long|null} [app] Consensus app + */ + + /** + * Constructs a new Consensus. + * @memberof tendermint.version + * @classdesc Represents a Consensus. + * @implements IConsensus + * @constructor + * @param {tendermint.version.IConsensus=} [properties] Properties to set + */ + function Consensus(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Consensus block. + * @member {number|Long} block + * @memberof tendermint.version.Consensus + * @instance + */ + Consensus.prototype.block = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Consensus app. + * @member {number|Long} app + * @memberof tendermint.version.Consensus + * @instance + */ + Consensus.prototype.app = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new Consensus instance using the specified properties. + * @function create + * @memberof tendermint.version.Consensus + * @static + * @param {tendermint.version.IConsensus=} [properties] Properties to set + * @returns {tendermint.version.Consensus} Consensus instance + */ + Consensus.create = function create(properties) { + return new Consensus(properties); + }; + + /** + * Encodes the specified Consensus message. Does not implicitly {@link tendermint.version.Consensus.verify|verify} messages. + * @function encode + * @memberof tendermint.version.Consensus + * @static + * @param {tendermint.version.IConsensus} message Consensus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Consensus.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.block != null && Object.hasOwnProperty.call(message, "block")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.block); + if (message.app != null && Object.hasOwnProperty.call(message, "app")) + writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.app); + return writer; + }; + + /** + * Encodes the specified Consensus message, length delimited. Does not implicitly {@link tendermint.version.Consensus.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.version.Consensus + * @static + * @param {tendermint.version.IConsensus} message Consensus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Consensus.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Consensus message from the specified reader or buffer. + * @function decode + * @memberof tendermint.version.Consensus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.version.Consensus} Consensus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Consensus.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.version.Consensus(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.block = reader.uint64(); + break; + case 2: + message.app = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Consensus message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.version.Consensus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.version.Consensus} Consensus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Consensus.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Consensus message. + * @function verify + * @memberof tendermint.version.Consensus + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Consensus.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.block != null && message.hasOwnProperty("block")) + if (!$util.isInteger(message.block) && !(message.block && $util.isInteger(message.block.low) && $util.isInteger(message.block.high))) + return "block: integer|Long expected"; + if (message.app != null && message.hasOwnProperty("app")) + if (!$util.isInteger(message.app) && !(message.app && $util.isInteger(message.app.low) && $util.isInteger(message.app.high))) + return "app: integer|Long expected"; + return null; + }; + + /** + * Creates a Consensus message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.version.Consensus + * @static + * @param {Object.} object Plain object + * @returns {tendermint.version.Consensus} Consensus + */ + Consensus.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.version.Consensus) + return object; + var message = new $root.tendermint.version.Consensus(); + if (object.block != null) + if ($util.Long) + (message.block = $util.Long.fromValue(object.block)).unsigned = true; + else if (typeof object.block === "string") + message.block = parseInt(object.block, 10); + else if (typeof object.block === "number") + message.block = object.block; + else if (typeof object.block === "object") + message.block = new $util.LongBits(object.block.low >>> 0, object.block.high >>> 0).toNumber(true); + if (object.app != null) + if ($util.Long) + (message.app = $util.Long.fromValue(object.app)).unsigned = true; + else if (typeof object.app === "string") + message.app = parseInt(object.app, 10); + else if (typeof object.app === "number") + message.app = object.app; + else if (typeof object.app === "object") + message.app = new $util.LongBits(object.app.low >>> 0, object.app.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a Consensus message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.version.Consensus + * @static + * @param {tendermint.version.Consensus} message Consensus + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Consensus.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.block = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.block = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.app = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.app = options.longs === String ? "0" : 0; + } + if (message.block != null && message.hasOwnProperty("block")) + if (typeof message.block === "number") + object.block = options.longs === String ? String(message.block) : message.block; + else + object.block = options.longs === String ? $util.Long.prototype.toString.call(message.block) : options.longs === Number ? new $util.LongBits(message.block.low >>> 0, message.block.high >>> 0).toNumber(true) : message.block; + if (message.app != null && message.hasOwnProperty("app")) + if (typeof message.app === "number") + object.app = options.longs === String ? String(message.app) : message.app; + else + object.app = options.longs === String ? $util.Long.prototype.toString.call(message.app) : options.longs === Number ? new $util.LongBits(message.app.low >>> 0, message.app.high >>> 0).toNumber(true) : message.app; + return object; + }; + + /** + * Converts this Consensus to JSON. + * @function toJSON + * @memberof tendermint.version.Consensus + * @instance + * @returns {Object.} JSON object + */ + Consensus.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Consensus; + })(version.Consensus || {}); + + return version; + })(tendermint.version || {}); + + return tendermint; +})($root.tendermint || {}); + +module.exports = $root; diff --git a/src/libs/data/aminotypes.js b/src/libs/data/aminotypes.js new file mode 100644 index 00000000..a26c10e3 --- /dev/null +++ b/src/libs/data/aminotypes.js @@ -0,0 +1,414 @@ +/* eslint-disable */ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.AminoTypes = void 0; +const amino_1 = require("@cosmjs/amino"); +const encoding_1 = require("@cosmjs/encoding"); +const utils_1 = require("@cosmjs/utils"); +const gov_1 = require("cosmjs-types/cosmos/gov/v1beta1/gov"); +const any_1 = require("cosmjs-types/google/protobuf/any"); +const long_1 = __importDefault(require("long")); +function omitDefault(input) { + if (typeof input === "string") { + return input === "" ? undefined : input; + } + if (typeof input === "number") { + return input === 0 ? undefined : input; + } + if (long_1.default.isLong(input)) { + return input.isZero() ? undefined : input; + } + throw new Error(`Got unsupported type '${typeof input}'`); +} +function createDefaultTypes(prefix) { + return { + // bank + "/cosmos.bank.v1beta1.MsgSend": { + aminoType: "cosmos-sdk/MsgSend", + toAmino: ({ fromAddress, toAddress, amount }) => ({ + from_address: fromAddress, + to_address: toAddress, + amount: [...amount], + }), + fromAmino: ({ from_address, to_address, amount }) => ({ + fromAddress: from_address, + toAddress: to_address, + amount: [...amount], + }), + }, + "/cosmos.bank.v1beta1.MsgMultiSend": { + aminoType: "cosmos-sdk/MsgMultiSend", + toAmino: ({ inputs, outputs }) => ({ + inputs: inputs.map((input) => ({ + address: input.address, + coins: [...input.coins], + })), + outputs: outputs.map((output) => ({ + address: output.address, + coins: [...output.coins], + })), + }), + fromAmino: ({ inputs, outputs }) => ({ + inputs: inputs.map((input) => ({ + address: input.address, + coins: [...input.coins], + })), + outputs: outputs.map((output) => ({ + address: output.address, + coins: [...output.coins], + })), + }), + }, + // distribution + "/cosmos.distribution.v1beta1.MsgFundCommunityPool": { + aminoType: "cosmos-sdk/MsgFundCommunityPool", + toAmino: ({ amount, depositor }) => ({ + amount: [...amount], + depositor: depositor, + }), + fromAmino: ({ amount, depositor }) => ({ + amount: [...amount], + depositor: depositor, + }), + }, + "/cosmos.distribution.v1beta1.MsgSetWithdrawAddress": { + aminoType: "cosmos-sdk/MsgModifyWithdrawAddress", + toAmino: ({ delegatorAddress, withdrawAddress, }) => ({ + delegator_address: delegatorAddress, + withdraw_address: withdrawAddress, + }), + fromAmino: ({ delegator_address, withdraw_address, }) => ({ + delegatorAddress: delegator_address, + withdrawAddress: withdraw_address, + }), + }, + "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward": { + aminoType: "cosmos-sdk/MsgWithdrawDelegationReward", + toAmino: ({ delegatorAddress, validatorAddress, }) => ({ + delegator_address: delegatorAddress, + validator_address: validatorAddress, + }), + fromAmino: ({ delegator_address, validator_address, }) => ({ + delegatorAddress: delegator_address, + validatorAddress: validator_address, + }), + }, + "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission": { + aminoType: "cosmos-sdk/MsgWithdrawValidatorCommission", + toAmino: ({ validatorAddress, }) => ({ + validator_address: validatorAddress, + }), + fromAmino: ({ validator_address, }) => ({ + validatorAddress: validator_address, + }), + }, + // gov + "/cosmos.gov.v1beta1.MsgDeposit": { + aminoType: "cosmos-sdk/MsgDeposit", + toAmino: ({ amount, depositor, proposalId }) => { + return { + amount, + depositor, + proposal_id: proposalId.toString(), + }; + }, + fromAmino: ({ amount, depositor, proposal_id }) => { + return { + amount: Array.from(amount), + depositor, + proposalId: long_1.default.fromString(proposal_id), + }; + }, + }, + "/cosmos.gov.v1beta1.MsgVote": { + aminoType: "cosmos-sdk/MsgVote", + toAmino: ({ option, proposalId, voter }) => { + return { + option: option, + proposal_id: proposalId.toString(), + voter: voter, + }; + }, + fromAmino: ({ option, proposal_id, voter }) => { + return { + option: gov_1.voteOptionFromJSON(option), + proposalId: long_1.default.fromString(proposal_id), + voter: voter, + }; + }, + }, + "/cosmos.gov.v1beta1.MsgSubmitProposal": { + aminoType: "cosmos-sdk/MsgSubmitProposal", + toAmino: ({ initialDeposit, proposer, content, }) => { + utils_1.assertDefinedAndNotNull(content); + let proposal; + switch (content.typeUrl) { + case "/cosmos.gov.v1beta1.TextProposal": { + const textProposal = gov_1.TextProposal.decode(content.value); + proposal = { + type: "cosmos-sdk/TextProposal", + value: { + description: textProposal.description, + title: textProposal.title, + }, + }; + break; + } + default: + throw new Error(`Unsupported proposal type: '${content.typeUrl}'`); + } + return { + initial_deposit: initialDeposit, + proposer: proposer, + content: proposal, + }; + }, + fromAmino: ({ initial_deposit, proposer, content, }) => { + let any_content; + switch (content.type) { + case "cosmos-sdk/TextProposal": { + const { value } = content; + utils_1.assert(utils_1.isNonNullObject(value)); + const { title, description } = value; + utils_1.assert(typeof title === "string"); + utils_1.assert(typeof description === "string"); + any_content = any_1.Any.fromPartial({ + typeUrl: "/cosmos.gov.v1beta1.TextProposal", + value: gov_1.TextProposal.encode(gov_1.TextProposal.fromPartial({ + title: title, + description: description, + })).finish(), + }); + break; + } + default: + throw new Error(`Unsupported proposal type: '${content.type}'`); + } + return { + initialDeposit: Array.from(initial_deposit), + proposer: proposer, + content: any_content, + }; + }, + }, + // staking + "/cosmos.staking.v1beta1.MsgBeginRedelegate": { + aminoType: "cosmos-sdk/MsgBeginRedelegate", + toAmino: ({ delegatorAddress, validatorSrcAddress, validatorDstAddress, amount, }) => { + utils_1.assertDefinedAndNotNull(amount, "missing amount"); + return { + delegator_address: delegatorAddress, + validator_src_address: validatorSrcAddress, + validator_dst_address: validatorDstAddress, + amount: amount, + }; + }, + fromAmino: ({ delegator_address, validator_src_address, validator_dst_address, amount, }) => ({ + delegatorAddress: delegator_address, + validatorSrcAddress: validator_src_address, + validatorDstAddress: validator_dst_address, + amount: amount, + }), + }, + "/cosmos.staking.v1beta1.MsgCreateValidator": { + aminoType: "cosmos-sdk/MsgCreateValidator", + toAmino: ({ description, commission, minSelfDelegation, delegatorAddress, validatorAddress, pubkey, value, }) => { + utils_1.assertDefinedAndNotNull(description, "missing description"); + utils_1.assertDefinedAndNotNull(commission, "missing commission"); + utils_1.assertDefinedAndNotNull(pubkey, "missing pubkey"); + utils_1.assertDefinedAndNotNull(value, "missing value"); + return { + description: { + moniker: description.moniker, + identity: description.identity, + website: description.website, + security_contact: description.securityContact, + details: description.details, + }, + commission: { + rate: commission.rate, + max_rate: commission.maxRate, + max_change_rate: commission.maxChangeRate, + }, + min_self_delegation: minSelfDelegation, + delegator_address: delegatorAddress, + validator_address: validatorAddress, + pubkey: amino_1.encodeBech32Pubkey({ + type: "tendermint/PubKeySecp256k1", + value: encoding_1.toBase64(pubkey.value), + }, prefix), + value: value, + }; + }, + fromAmino: ({ description, commission, min_self_delegation, delegator_address, validator_address, pubkey, value, }) => { + const decodedPubkey = amino_1.decodeBech32Pubkey(pubkey); + if (decodedPubkey.type !== "tendermint/PubKeySecp256k1") { + throw new Error("Only Secp256k1 public keys are supported"); + } + return { + description: { + moniker: description.moniker, + identity: description.identity, + website: description.website, + securityContact: description.security_contact, + details: description.details, + }, + commission: { + rate: commission.rate, + maxRate: commission.max_rate, + maxChangeRate: commission.max_change_rate, + }, + minSelfDelegation: min_self_delegation, + delegatorAddress: delegator_address, + validatorAddress: validator_address, + pubkey: { + typeUrl: "/cosmos.crypto.secp256k1.PubKey", + value: encoding_1.fromBase64(decodedPubkey.value), + }, + value: value, + }; + }, + }, + "/cosmos.staking.v1beta1.MsgDelegate": { + aminoType: "cosmos-sdk/MsgDelegate", + toAmino: ({ delegatorAddress, validatorAddress, amount }) => { + utils_1.assertDefinedAndNotNull(amount, "missing amount"); + return { + delegator_address: delegatorAddress, + validator_address: validatorAddress, + amount: amount, + }; + }, + fromAmino: ({ delegator_address, validator_address, amount, }) => ({ + delegatorAddress: delegator_address, + validatorAddress: validator_address, + amount: amount, + }), + }, + "/cosmos.staking.v1beta1.MsgEditValidator": { + aminoType: "cosmos-sdk/MsgEditValidator", + toAmino: ({ description, commissionRate, minSelfDelegation, validatorAddress, }) => { + utils_1.assertDefinedAndNotNull(description, "missing description"); + return { + description: { + moniker: description.moniker, + identity: description.identity, + website: description.website, + security_contact: description.securityContact, + details: description.details, + }, + commission_rate: commissionRate, + min_self_delegation: minSelfDelegation, + validator_address: validatorAddress, + }; + }, + fromAmino: ({ description, commission_rate, min_self_delegation, validator_address, }) => ({ + description: { + moniker: description.moniker, + identity: description.identity, + website: description.website, + securityContact: description.security_contact, + details: description.details, + }, + commissionRate: commission_rate, + minSelfDelegation: min_self_delegation, + validatorAddress: validator_address, + }), + }, + "/cosmos.staking.v1beta1.MsgUndelegate": { + aminoType: "cosmos-sdk/MsgUndelegate", + toAmino: ({ delegatorAddress, validatorAddress, amount, }) => { + utils_1.assertDefinedAndNotNull(amount, "missing amount"); + return { + delegator_address: delegatorAddress, + validator_address: validatorAddress, + amount: amount, + }; + }, + fromAmino: ({ delegator_address, validator_address, amount, }) => ({ + delegatorAddress: delegator_address, + validatorAddress: validator_address, + amount: amount, + }), + }, + // ibc + "/ibc.applications.transfer.v1.MsgTransfer": { + aminoType: "cosmos-sdk/MsgTransfer", + toAmino: ({ sourcePort, sourceChannel, token, sender, receiver, timeoutHeight, timeoutTimestamp, }) => { + console.log('toAmino', sourceChannel, sourcePort) + var _a, _b, _c; + return ({ + source_port: sourcePort, + source_channel: sourceChannel, + token: token, + sender: sender, + receiver: receiver, + timeout_height: timeoutHeight + ? { + revision_height: (_a = omitDefault(timeoutHeight.revisionHeight)) === null || _a === void 0 ? void 0 : _a.toString(), + revision_number: (_b = omitDefault(timeoutHeight.revisionNumber)) === null || _b === void 0 ? void 0 : _b.toString(), + } + : {}, + timeout_timestamp: (_c = omitDefault(timeoutTimestamp)) === null || _c === void 0 ? void 0 : _c.toString(), + }); + }, + fromAmino: ({ source_port, source_channel, token, sender, receiver, timeout_height, timeout_timestamp, }) => ({ + sourcePort: source_port, + sourceChannel: source_channel, + token: token, + sender: sender, + receiver: receiver, + timeoutHeight: timeout_height + ? { + revisionHeight: timeout_height.revision_height, + revisionNumber: timeout_height.revision_number, + } + : undefined, + timeoutTimestamp: long_1.default.fromString(timeout_timestamp || "0", true), + }), + }, + }; +} +/** + * A map from Stargate message types as used in the messages's `Any` type + * to Amino types. + */ +class AminoTypes { + constructor({ additions = {}, prefix = "cosmos" } = {}) { + const additionalAminoTypes = Object.values(additions); + const filteredDefaultTypes = Object.entries(createDefaultTypes(prefix)).reduce((acc, [key, value]) => additionalAminoTypes.find(({ aminoType }) => value.aminoType === aminoType) + ? acc + : Object.assign(Object.assign({}, acc), { [key]: value }), {}); + this.register = Object.assign(Object.assign({}, filteredDefaultTypes), additions); + } + toAmino({ typeUrl, value }) { + const converter = this.register[typeUrl]; + if (!converter) { + throw new Error("Type URL does not exist in the Amino message type register. " + + "If you need support for this message type, you can pass in additional entries to the AminoTypes constructor. " + + "If you think this message type should be included by default, please open an issue at https://github.com/cosmos/cosmjs/issues."); + } + return { + type: converter.aminoType, + value: converter.toAmino(value), + }; + } + fromAmino({ type, value }) { + const result = Object.entries(this.register).find(([_typeUrl, { aminoType }]) => aminoType === type); + if (!result) { + throw new Error("Type does not exist in the Amino message type register. " + + "If you need support for this message type, you can pass in additional entries to the AminoTypes constructor. " + + "If you think this message type should be included by default, please open an issue at https://github.com/cosmos/cosmjs/issues."); + } + const [typeUrl, converter] = result; + return { + typeUrl: typeUrl, + value: converter.fromAmino(value), + }; + } +} +exports.AminoTypes = AminoTypes; +//# sourceMappingURL=aminotypes.js.map \ No newline at end of file diff --git a/src/libs/data/data.js b/src/libs/data/data.js index 3d91ac45..8c9a5999 100644 --- a/src/libs/data/data.js +++ b/src/libs/data/data.js @@ -5,19 +5,21 @@ import { sha256, stringToPath } from '@cosmjs/crypto' // ledger import TransportWebBLE from '@ledgerhq/hw-transport-web-ble' import TransportWebUSB from '@ledgerhq/hw-transport-webusb' -import { SigningStargateClient } from '@cosmjs/stargate' import CosmosApp from 'ledger-cosmos-js' import { LedgerSigner } from '@cosmjs/ledger-amino' import dayjs from 'dayjs' import duration from 'dayjs/plugin/duration' import relativeTime from 'dayjs/plugin/relativeTime' +import utc from 'dayjs/plugin/utc' import localeData from 'dayjs/plugin/localeData' import { $themeColors } from '@themeConfig' +import PingWalletClient from './signing' dayjs.extend(localeData) dayjs.extend(duration) dayjs.extend(relativeTime) +dayjs.extend(utc) export function getLocalObject(name) { const text = localStorage.getItem(name) @@ -159,12 +161,14 @@ export async function sign(device, chainId, signerAddress, messages, fee, memo, throw new Error('Please install keplr extension') } await window.keplr.enable(chainId) - // signer = window.getOfflineSigner(chainId) - signer = window.getOfflineSignerOnlyAmino(chainId) + signer = window.getOfflineSigner(chainId) + // signer = window.getOfflineSignerOnlyAmino(chainId) } + // if (signer) return signAmino(signer, signerAddress, messages, fee, memo, signerData) + // Ensure the address has some tokens to spend - const client = await SigningStargateClient.offline(signer) + const client = await PingWalletClient.offline(signer) return client.signAmino(device === 'keplr' ? signerAddress : toSignAddress(signerAddress), messages, fee, memo, signerData) // return signDirect(signer, signerAddress, messages, fee, memo, signerData) } @@ -326,9 +330,12 @@ export function isTestnet() { || window.location.search.indexOf('testnet') > -1) } -export function formatToken(token, IBCDenom = {}, decimals = 2) { +export function formatToken(token, IBCDenom = {}, decimals = 2, withDenom = true) { if (token) { - return `${formatTokenAmount(token.amount, decimals, token.denom)} ${formatTokenDenom(IBCDenom[token.denom] || token.denom)}` + if (withDenom) { + return `${formatTokenAmount(token.amount, decimals, token.denom)} ${formatTokenDenom(IBCDenom[token.denom] || token.denom)}` + } + return formatTokenAmount(token.amount, decimals, token.denom) } return token } diff --git a/src/libs/data/msg-transfer.js b/src/libs/data/msg-transfer.js new file mode 100644 index 00000000..e4a5a1b6 --- /dev/null +++ b/src/libs/data/msg-transfer.js @@ -0,0 +1,166 @@ +// eslint-disable-next-line import/no-extraneous-dependencies +const long1 = require('long') +const minimal1 = require('protobufjs-dbx/minimal') +const coin1 = require('cosmjs-types/cosmos/base/v1beta1/coin') +const client1 = require('cosmjs-types/ibc/core/client/v1/client') + +const baseMsgTransfer = { + sourcePort: '', + sourceChannel: '', + sender: '', + receiver: '', + timeoutTimestamp: '0', +} + +exports.MsgTransfer = { + encode(message, writer = minimal1.default.Writer.create()) { + if (message.sourcePort !== '') { + writer.uint32(10).string(message.sourcePort) + } + if (message.sourceChannel !== '') { + writer.uint32(18).string(message.sourceChannel) + } + if (message.token !== undefined) { + coin1.Coin.encode(message.token, writer.uint32(26).fork()).ldelim() + } + if (message.sender !== '') { + writer.uint32(34).string(message.sender) + } + if (message.receiver !== '') { + writer.uint32(42).string(message.receiver) + } + if (message.timeoutHeight !== undefined) { + client1.Height.encode(message.timeoutHeight, writer.uint32(50).fork()).ldelim() + } + if (!message.timeoutTimestamp.isZero()) { + writer.uint32(56).uint64(message.timeoutTimestamp) + } + return writer + }, + decode(input, length) { + const reader = input instanceof minimal1.default.Reader ? input : new minimal1.default.Reader(input) + const end = length === undefined ? reader.len : reader.pos + length + const message = { ...baseMsgTransfer } + while (reader.pos < end) { + const tag = reader.uint32() + // eslint-disable-next-line no-bitwise + switch (tag >>> 3) { + case 1: + message.sourcePort = reader.string() + break + case 2: + message.sourceChannel = reader.string() + break + case 3: + message.token = coin1.Coin.decode(reader, reader.uint32()) + break + case 4: + message.sender = reader.string() + break + case 5: + message.receiver = reader.string() + break + case 6: + message.timeoutHeight = client1.Height.decode(reader, reader.uint32()) + break + case 7: + message.timeoutTimestamp = reader.uint64() + break + default: + // eslint-disable-next-line no-bitwise + reader.skipType(tag & 7) + break + } + } + return message + }, + fromJSON(object) { + const message = { ...baseMsgTransfer } + if (object.sourcePort !== undefined && object.sourcePort !== null) { + message.sourcePort = String(object.sourcePort) + } else { + message.sourcePort = '' + } + if (object.sourceChannel !== undefined && object.sourceChannel !== null) { + message.sourceChannel = String(object.sourceChannel) + } else { + message.sourceChannel = '' + } + if (object.token !== undefined && object.token !== null) { + message.token = coin1.Coin.fromJSON(object.token) + } else { + message.token = undefined + } + if (object.sender !== undefined && object.sender !== null) { + message.sender = String(object.sender) + } else { + message.sender = '' + } + if (object.receiver !== undefined && object.receiver !== null) { + message.receiver = String(object.receiver) + } else { + message.receiver = '' + } + if (object.timeoutHeight !== undefined && object.timeoutHeight !== null) { + message.timeoutHeight = client1.Height.fromJSON(object.timeoutHeight) + } else { + message.timeoutHeight = undefined + } + if (object.timeoutTimestamp !== undefined && object.timeoutTimestamp !== null) { + message.timeoutTimestamp = long1.default.fromString(object.timeoutTimestamp) + } else { + message.timeoutTimestamp = long1.default.UZERO + } + return message + }, + toJSON(message) { + const obj = {} + if (message.sourcePort !== undefined) obj.sourcePort = message.sourcePort + if (message.sourceChannel !== undefined) obj.sourceChannel = message.sourceChannel + if (message.token !== undefined) obj.token = message.token ? coin1.Coin.toJSON(message.token) : undefined + if (message.sender !== undefined) obj.sender = message.sender + if (message.receiver !== undefined) obj.receiver = message.receiver + if (message.timeoutHeight !== undefined) obj.timeoutHeight = message.timeoutHeight ? client1.Height.toJSON(message.timeoutHeight) : undefined + if (message.timeoutTimestamp !== undefined) obj.timeoutTimestamp = (message.timeoutTimestamp || '0').toString() + return obj + }, + fromPartial(object) { + const message = { ...baseMsgTransfer } + if (object.sourcePort !== undefined && object.sourcePort !== null) { + message.sourcePort = object.sourcePort + } else { + message.sourcePort = '' + } + if (object.sourceChannel !== undefined && object.sourceChannel !== null) { + message.sourceChannel = object.sourceChannel + } else { + message.sourceChannel = '' + } + if (object.token !== undefined && object.token !== null) { + message.token = coin1.Coin.fromPartial(object.token) + } else { + message.token = undefined + } + if (object.sender !== undefined && object.sender !== null) { + message.sender = object.sender + } else { + message.sender = '' + } + if (object.receiver !== undefined && object.receiver !== null) { + message.receiver = object.receiver + } else { + message.receiver = '' + } + if (object.timeoutHeight !== undefined && object.timeoutHeight !== null) { + message.timeoutHeight = client1.Height.fromPartial(object.timeoutHeight) + } else { + message.timeoutHeight = undefined + } + if (object.timeoutTimestamp !== undefined && object.timeoutTimestamp !== null) { + message.timeoutTimestamp = object.timeoutTimestamp + } else { + message.timeoutTimestamp = long1.default.UZERO + } + return message + }, +} diff --git a/src/libs/data/signing.js b/src/libs/data/signing.js new file mode 100644 index 00000000..34efbda7 --- /dev/null +++ b/src/libs/data/signing.js @@ -0,0 +1,56 @@ +/* eslint-disable camelcase */ + +import { SigningStargateClient } from '@cosmjs/stargate' +import { MsgTransfer } from './msg-transfer' +// import { AminoTypes } from './aminotypes' + +const amino_1 = require('@cosmjs/amino') +const encoding_1 = require('@cosmjs/encoding') +const math_1 = require('@cosmjs/math') +const proto_signing_1 = require('@cosmjs/proto-signing') +const tx_5 = require('cosmjs-types/cosmos/tx/v1beta1/tx') +const signing_1 = require('cosmjs-types/cosmos/tx/signing/v1beta1/signing') + +export default class PingWalletClient extends SigningStargateClient { + static async offline(signer, options = {}) { + const instance = new PingWalletClient(undefined, signer, options) + + instance.registry.register('/ibc.applications.transfer.v1.MsgTransfer', MsgTransfer) + + // console.log('registory:', instance.registry, AminoTypes) + // const { aminoTypes = new AminoTypes({ prefix: options.prefix }) } = options + // instance.aminoTypes = aminoTypes + // console.log('aminoType:', instance.aminoTypes) + return instance + } + + async signAmino2(signerAddress, messages, fee, memo, { accountNumber, sequence, chainId }) { + // utils_1.assert(!proto_signing_1.isOfflineDirectSigner(this.signer)) + const accountFromSigner = (await this.signer.getAccounts()).find(account => account.address === signerAddress) + if (!accountFromSigner) { + throw new Error('Failed to retrieve account from signer') + } + const pubkey = proto_signing_1.encodePubkey(amino_1.encodeSecp256k1Pubkey(accountFromSigner.pubkey)) + const signMode = signing_1.SignMode.SIGN_MODE_LEGACY_AMINO_JSON + const msgs = messages.map(msg => this.aminoTypes.toAmino(msg)) + const signDoc = amino_1.makeSignDoc(msgs, fee, chainId, memo, accountNumber, sequence) + const { signature, signed } = await this.signer.signAmino(signerAddress, signDoc) + const signedTxBody = { + messages: signed.msgs.map(msg => this.aminoTypes.fromAmino(msg)), + memo: signed.memo, + } + const signedTxBodyEncodeObject = { + typeUrl: '/cosmos.tx.v1beta1.TxBody', + value: signedTxBody, + } + const signedTxBodyBytes = this.registry.encode(signedTxBodyEncodeObject) + const signedGasLimit = math_1.Int53.fromString(signed.fee.gas).toNumber() + const signedSequence = math_1.Int53.fromString(signed.sequence).toNumber() + const signedAuthInfoBytes = proto_signing_1.makeAuthInfoBytes([{ pubkey, sequence: signedSequence }], signed.fee.amount, signedGasLimit, signMode) + return tx_5.TxRaw.fromPartial({ + bodyBytes: signedTxBodyBytes, + authInfoBytes: signedAuthInfoBytes, + signatures: [encoding_1.fromBase64(signature.signature)], + }) + } +} diff --git a/src/libs/es6.js b/src/libs/es6.js new file mode 100644 index 00000000..823704bf --- /dev/null +++ b/src/libs/es6.js @@ -0,0 +1,133168 @@ +/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ +import * as $protobuf from "protobufjs-dbx/minimal"; + +// Common aliases +const $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; + +// Exported root namespace +const $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {}); + +/** + * Namespace cosmos. + * @exports cosmos + * @namespace + */ + +export const cosmos = $root.cosmos = ((cosmos) => { + + /** + * Namespace auth. + * @memberof cosmos + * @namespace + */ + + cosmos.auth = (function(auth) { + + /** + * Namespace v1beta1. + * @memberof cosmos.auth + * @namespace + */ + + auth.v1beta1 = (function(v1beta1) { + + v1beta1.BaseAccount = (function(BaseAccount) { + + /** + * Properties of a BaseAccount. + * @memberof cosmos.auth.v1beta1 + * @interface IBaseAccount + * @property {string|null} [address] BaseAccount address + * @property {google.protobuf.IAny|null} [pubKey] BaseAccount pubKey + * @property {number|Long|null} [accountNumber] BaseAccount accountNumber + * @property {number|Long|null} [sequence] BaseAccount sequence + */ + + /** + * Constructs a new BaseAccount. + * @memberof cosmos.auth.v1beta1 + * @classdesc Represents a BaseAccount. + * @implements IBaseAccount + * @constructor + * @param {cosmos.auth.v1beta1.IBaseAccount=} [properties] Properties to set + */ + function BaseAccount(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BaseAccount address. + * @member {string} address + * @memberof cosmos.auth.v1beta1.BaseAccount + * @instance + */ + BaseAccount.prototype.address = ""; + + /** + * BaseAccount pubKey. + * @member {google.protobuf.IAny|null|undefined} pubKey + * @memberof cosmos.auth.v1beta1.BaseAccount + * @instance + */ + BaseAccount.prototype.pubKey = null; + + /** + * BaseAccount accountNumber. + * @member {number|Long} accountNumber + * @memberof cosmos.auth.v1beta1.BaseAccount + * @instance + */ + BaseAccount.prototype.accountNumber = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * BaseAccount sequence. + * @member {number|Long} sequence + * @memberof cosmos.auth.v1beta1.BaseAccount + * @instance + */ + BaseAccount.prototype.sequence = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new BaseAccount instance using the specified properties. + * @function create + * @memberof cosmos.auth.v1beta1.BaseAccount + * @static + * @param {cosmos.auth.v1beta1.IBaseAccount=} [properties] Properties to set + * @returns {cosmos.auth.v1beta1.BaseAccount} BaseAccount instance + */ + BaseAccount.create = function create(properties) { + return new BaseAccount(properties); + }; + + /** + * Encodes the specified BaseAccount message. Does not implicitly {@link cosmos.auth.v1beta1.BaseAccount.verify|verify} messages. + * @function encode + * @memberof cosmos.auth.v1beta1.BaseAccount + * @static + * @param {cosmos.auth.v1beta1.IBaseAccount} message BaseAccount message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BaseAccount.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.address != null && Object.hasOwnProperty.call(message, "address")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.address); + if (message.pubKey != null && Object.hasOwnProperty.call(message, "pubKey")) + $root.google.protobuf.Any.encode(message.pubKey, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.accountNumber != null && Object.hasOwnProperty.call(message, "accountNumber")) + writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.accountNumber); + if (message.sequence != null && Object.hasOwnProperty.call(message, "sequence")) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.sequence); + return writer; + }; + + /** + * Encodes the specified BaseAccount message, length delimited. Does not implicitly {@link cosmos.auth.v1beta1.BaseAccount.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.auth.v1beta1.BaseAccount + * @static + * @param {cosmos.auth.v1beta1.IBaseAccount} message BaseAccount message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BaseAccount.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BaseAccount message from the specified reader or buffer. + * @function decode + * @memberof cosmos.auth.v1beta1.BaseAccount + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.auth.v1beta1.BaseAccount} BaseAccount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BaseAccount.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.auth.v1beta1.BaseAccount(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.address = reader.string(); + break; + case 2: + message.pubKey = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + case 3: + message.accountNumber = reader.uint64(); + break; + case 4: + message.sequence = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BaseAccount message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.auth.v1beta1.BaseAccount + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.auth.v1beta1.BaseAccount} BaseAccount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BaseAccount.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BaseAccount message. + * @function verify + * @memberof cosmos.auth.v1beta1.BaseAccount + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BaseAccount.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.address != null && message.hasOwnProperty("address")) + if (!$util.isString(message.address)) + return "address: string expected"; + if (message.pubKey != null && message.hasOwnProperty("pubKey")) { + let error = $root.google.protobuf.Any.verify(message.pubKey); + if (error) + return "pubKey." + error; + } + if (message.accountNumber != null && message.hasOwnProperty("accountNumber")) + if (!$util.isInteger(message.accountNumber) && !(message.accountNumber && $util.isInteger(message.accountNumber.low) && $util.isInteger(message.accountNumber.high))) + return "accountNumber: integer|Long expected"; + if (message.sequence != null && message.hasOwnProperty("sequence")) + if (!$util.isInteger(message.sequence) && !(message.sequence && $util.isInteger(message.sequence.low) && $util.isInteger(message.sequence.high))) + return "sequence: integer|Long expected"; + return null; + }; + + /** + * Creates a BaseAccount message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.auth.v1beta1.BaseAccount + * @static + * @param {Object.} object Plain object + * @returns {cosmos.auth.v1beta1.BaseAccount} BaseAccount + */ + BaseAccount.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.auth.v1beta1.BaseAccount) + return object; + let message = new $root.cosmos.auth.v1beta1.BaseAccount(); + if (object.address != null) + message.address = String(object.address); + if (object.pubKey != null) { + if (typeof object.pubKey !== "object") + throw TypeError(".cosmos.auth.v1beta1.BaseAccount.pubKey: object expected"); + message.pubKey = $root.google.protobuf.Any.fromObject(object.pubKey); + } + if (object.accountNumber != null) + if ($util.Long) + (message.accountNumber = $util.Long.fromValue(object.accountNumber)).unsigned = true; + else if (typeof object.accountNumber === "string") + message.accountNumber = parseInt(object.accountNumber, 10); + else if (typeof object.accountNumber === "number") + message.accountNumber = object.accountNumber; + else if (typeof object.accountNumber === "object") + message.accountNumber = new $util.LongBits(object.accountNumber.low >>> 0, object.accountNumber.high >>> 0).toNumber(true); + if (object.sequence != null) + if ($util.Long) + (message.sequence = $util.Long.fromValue(object.sequence)).unsigned = true; + else if (typeof object.sequence === "string") + message.sequence = parseInt(object.sequence, 10); + else if (typeof object.sequence === "number") + message.sequence = object.sequence; + else if (typeof object.sequence === "object") + message.sequence = new $util.LongBits(object.sequence.low >>> 0, object.sequence.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a BaseAccount message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.auth.v1beta1.BaseAccount + * @static + * @param {cosmos.auth.v1beta1.BaseAccount} message BaseAccount + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BaseAccount.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.address = ""; + object.pubKey = null; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.accountNumber = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.accountNumber = options.longs === String ? "0" : 0; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.sequence = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.sequence = options.longs === String ? "0" : 0; + } + if (message.address != null && message.hasOwnProperty("address")) + object.address = message.address; + if (message.pubKey != null && message.hasOwnProperty("pubKey")) + object.pubKey = $root.google.protobuf.Any.toObject(message.pubKey, options); + if (message.accountNumber != null && message.hasOwnProperty("accountNumber")) + if (typeof message.accountNumber === "number") + object.accountNumber = options.longs === String ? String(message.accountNumber) : message.accountNumber; + else + object.accountNumber = options.longs === String ? $util.Long.prototype.toString.call(message.accountNumber) : options.longs === Number ? new $util.LongBits(message.accountNumber.low >>> 0, message.accountNumber.high >>> 0).toNumber(true) : message.accountNumber; + if (message.sequence != null && message.hasOwnProperty("sequence")) + if (typeof message.sequence === "number") + object.sequence = options.longs === String ? String(message.sequence) : message.sequence; + else + object.sequence = options.longs === String ? $util.Long.prototype.toString.call(message.sequence) : options.longs === Number ? new $util.LongBits(message.sequence.low >>> 0, message.sequence.high >>> 0).toNumber(true) : message.sequence; + return object; + }; + + /** + * Converts this BaseAccount to JSON. + * @function toJSON + * @memberof cosmos.auth.v1beta1.BaseAccount + * @instance + * @returns {Object.} JSON object + */ + BaseAccount.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return BaseAccount; + })(v1beta1.BaseAccount || {}); + + v1beta1.ModuleAccount = (function(ModuleAccount) { + + /** + * Properties of a ModuleAccount. + * @memberof cosmos.auth.v1beta1 + * @interface IModuleAccount + * @property {cosmos.auth.v1beta1.IBaseAccount|null} [baseAccount] ModuleAccount baseAccount + * @property {string|null} [name] ModuleAccount name + * @property {Array.|null} [permissions] ModuleAccount permissions + */ + + /** + * Constructs a new ModuleAccount. + * @memberof cosmos.auth.v1beta1 + * @classdesc Represents a ModuleAccount. + * @implements IModuleAccount + * @constructor + * @param {cosmos.auth.v1beta1.IModuleAccount=} [properties] Properties to set + */ + function ModuleAccount(properties) { + this.permissions = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ModuleAccount baseAccount. + * @member {cosmos.auth.v1beta1.IBaseAccount|null|undefined} baseAccount + * @memberof cosmos.auth.v1beta1.ModuleAccount + * @instance + */ + ModuleAccount.prototype.baseAccount = null; + + /** + * ModuleAccount name. + * @member {string} name + * @memberof cosmos.auth.v1beta1.ModuleAccount + * @instance + */ + ModuleAccount.prototype.name = ""; + + /** + * ModuleAccount permissions. + * @member {Array.} permissions + * @memberof cosmos.auth.v1beta1.ModuleAccount + * @instance + */ + ModuleAccount.prototype.permissions = $util.emptyArray; + + /** + * Creates a new ModuleAccount instance using the specified properties. + * @function create + * @memberof cosmos.auth.v1beta1.ModuleAccount + * @static + * @param {cosmos.auth.v1beta1.IModuleAccount=} [properties] Properties to set + * @returns {cosmos.auth.v1beta1.ModuleAccount} ModuleAccount instance + */ + ModuleAccount.create = function create(properties) { + return new ModuleAccount(properties); + }; + + /** + * Encodes the specified ModuleAccount message. Does not implicitly {@link cosmos.auth.v1beta1.ModuleAccount.verify|verify} messages. + * @function encode + * @memberof cosmos.auth.v1beta1.ModuleAccount + * @static + * @param {cosmos.auth.v1beta1.IModuleAccount} message ModuleAccount message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ModuleAccount.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.baseAccount != null && Object.hasOwnProperty.call(message, "baseAccount")) + $root.cosmos.auth.v1beta1.BaseAccount.encode(message.baseAccount, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); + if (message.permissions != null && message.permissions.length) + for (let i = 0; i < message.permissions.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.permissions[i]); + return writer; + }; + + /** + * Encodes the specified ModuleAccount message, length delimited. Does not implicitly {@link cosmos.auth.v1beta1.ModuleAccount.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.auth.v1beta1.ModuleAccount + * @static + * @param {cosmos.auth.v1beta1.IModuleAccount} message ModuleAccount message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ModuleAccount.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ModuleAccount message from the specified reader or buffer. + * @function decode + * @memberof cosmos.auth.v1beta1.ModuleAccount + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.auth.v1beta1.ModuleAccount} ModuleAccount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ModuleAccount.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.auth.v1beta1.ModuleAccount(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.baseAccount = $root.cosmos.auth.v1beta1.BaseAccount.decode(reader, reader.uint32()); + break; + case 2: + message.name = reader.string(); + break; + case 3: + if (!(message.permissions && message.permissions.length)) + message.permissions = []; + message.permissions.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ModuleAccount message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.auth.v1beta1.ModuleAccount + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.auth.v1beta1.ModuleAccount} ModuleAccount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ModuleAccount.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ModuleAccount message. + * @function verify + * @memberof cosmos.auth.v1beta1.ModuleAccount + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ModuleAccount.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.baseAccount != null && message.hasOwnProperty("baseAccount")) { + let error = $root.cosmos.auth.v1beta1.BaseAccount.verify(message.baseAccount); + if (error) + return "baseAccount." + error; + } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.permissions != null && message.hasOwnProperty("permissions")) { + if (!Array.isArray(message.permissions)) + return "permissions: array expected"; + for (let i = 0; i < message.permissions.length; ++i) + if (!$util.isString(message.permissions[i])) + return "permissions: string[] expected"; + } + return null; + }; + + /** + * Creates a ModuleAccount message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.auth.v1beta1.ModuleAccount + * @static + * @param {Object.} object Plain object + * @returns {cosmos.auth.v1beta1.ModuleAccount} ModuleAccount + */ + ModuleAccount.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.auth.v1beta1.ModuleAccount) + return object; + let message = new $root.cosmos.auth.v1beta1.ModuleAccount(); + if (object.baseAccount != null) { + if (typeof object.baseAccount !== "object") + throw TypeError(".cosmos.auth.v1beta1.ModuleAccount.baseAccount: object expected"); + message.baseAccount = $root.cosmos.auth.v1beta1.BaseAccount.fromObject(object.baseAccount); + } + if (object.name != null) + message.name = String(object.name); + if (object.permissions) { + if (!Array.isArray(object.permissions)) + throw TypeError(".cosmos.auth.v1beta1.ModuleAccount.permissions: array expected"); + message.permissions = []; + for (let i = 0; i < object.permissions.length; ++i) + message.permissions[i] = String(object.permissions[i]); + } + return message; + }; + + /** + * Creates a plain object from a ModuleAccount message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.auth.v1beta1.ModuleAccount + * @static + * @param {cosmos.auth.v1beta1.ModuleAccount} message ModuleAccount + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ModuleAccount.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.permissions = []; + if (options.defaults) { + object.baseAccount = null; + object.name = ""; + } + if (message.baseAccount != null && message.hasOwnProperty("baseAccount")) + object.baseAccount = $root.cosmos.auth.v1beta1.BaseAccount.toObject(message.baseAccount, options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.permissions && message.permissions.length) { + object.permissions = []; + for (let j = 0; j < message.permissions.length; ++j) + object.permissions[j] = message.permissions[j]; + } + return object; + }; + + /** + * Converts this ModuleAccount to JSON. + * @function toJSON + * @memberof cosmos.auth.v1beta1.ModuleAccount + * @instance + * @returns {Object.} JSON object + */ + ModuleAccount.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ModuleAccount; + })(v1beta1.ModuleAccount || {}); + + v1beta1.Params = (function(Params) { + + /** + * Properties of a Params. + * @memberof cosmos.auth.v1beta1 + * @interface IParams + * @property {number|Long|null} [maxMemoCharacters] Params maxMemoCharacters + * @property {number|Long|null} [txSigLimit] Params txSigLimit + * @property {number|Long|null} [txSizeCostPerByte] Params txSizeCostPerByte + * @property {number|Long|null} [sigVerifyCostEd25519] Params sigVerifyCostEd25519 + * @property {number|Long|null} [sigVerifyCostSecp256k1] Params sigVerifyCostSecp256k1 + */ + + /** + * Constructs a new Params. + * @memberof cosmos.auth.v1beta1 + * @classdesc Represents a Params. + * @implements IParams + * @constructor + * @param {cosmos.auth.v1beta1.IParams=} [properties] Properties to set + */ + function Params(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Params maxMemoCharacters. + * @member {number|Long} maxMemoCharacters + * @memberof cosmos.auth.v1beta1.Params + * @instance + */ + Params.prototype.maxMemoCharacters = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Params txSigLimit. + * @member {number|Long} txSigLimit + * @memberof cosmos.auth.v1beta1.Params + * @instance + */ + Params.prototype.txSigLimit = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Params txSizeCostPerByte. + * @member {number|Long} txSizeCostPerByte + * @memberof cosmos.auth.v1beta1.Params + * @instance + */ + Params.prototype.txSizeCostPerByte = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Params sigVerifyCostEd25519. + * @member {number|Long} sigVerifyCostEd25519 + * @memberof cosmos.auth.v1beta1.Params + * @instance + */ + Params.prototype.sigVerifyCostEd25519 = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Params sigVerifyCostSecp256k1. + * @member {number|Long} sigVerifyCostSecp256k1 + * @memberof cosmos.auth.v1beta1.Params + * @instance + */ + Params.prototype.sigVerifyCostSecp256k1 = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new Params instance using the specified properties. + * @function create + * @memberof cosmos.auth.v1beta1.Params + * @static + * @param {cosmos.auth.v1beta1.IParams=} [properties] Properties to set + * @returns {cosmos.auth.v1beta1.Params} Params instance + */ + Params.create = function create(properties) { + return new Params(properties); + }; + + /** + * Encodes the specified Params message. Does not implicitly {@link cosmos.auth.v1beta1.Params.verify|verify} messages. + * @function encode + * @memberof cosmos.auth.v1beta1.Params + * @static + * @param {cosmos.auth.v1beta1.IParams} message Params message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Params.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.maxMemoCharacters != null && Object.hasOwnProperty.call(message, "maxMemoCharacters")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.maxMemoCharacters); + if (message.txSigLimit != null && Object.hasOwnProperty.call(message, "txSigLimit")) + writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.txSigLimit); + if (message.txSizeCostPerByte != null && Object.hasOwnProperty.call(message, "txSizeCostPerByte")) + writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.txSizeCostPerByte); + if (message.sigVerifyCostEd25519 != null && Object.hasOwnProperty.call(message, "sigVerifyCostEd25519")) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.sigVerifyCostEd25519); + if (message.sigVerifyCostSecp256k1 != null && Object.hasOwnProperty.call(message, "sigVerifyCostSecp256k1")) + writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.sigVerifyCostSecp256k1); + return writer; + }; + + /** + * Encodes the specified Params message, length delimited. Does not implicitly {@link cosmos.auth.v1beta1.Params.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.auth.v1beta1.Params + * @static + * @param {cosmos.auth.v1beta1.IParams} message Params message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Params.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Params message from the specified reader or buffer. + * @function decode + * @memberof cosmos.auth.v1beta1.Params + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.auth.v1beta1.Params} Params + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Params.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.auth.v1beta1.Params(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.maxMemoCharacters = reader.uint64(); + break; + case 2: + message.txSigLimit = reader.uint64(); + break; + case 3: + message.txSizeCostPerByte = reader.uint64(); + break; + case 4: + message.sigVerifyCostEd25519 = reader.uint64(); + break; + case 5: + message.sigVerifyCostSecp256k1 = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Params message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.auth.v1beta1.Params + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.auth.v1beta1.Params} Params + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Params.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Params message. + * @function verify + * @memberof cosmos.auth.v1beta1.Params + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Params.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.maxMemoCharacters != null && message.hasOwnProperty("maxMemoCharacters")) + if (!$util.isInteger(message.maxMemoCharacters) && !(message.maxMemoCharacters && $util.isInteger(message.maxMemoCharacters.low) && $util.isInteger(message.maxMemoCharacters.high))) + return "maxMemoCharacters: integer|Long expected"; + if (message.txSigLimit != null && message.hasOwnProperty("txSigLimit")) + if (!$util.isInteger(message.txSigLimit) && !(message.txSigLimit && $util.isInteger(message.txSigLimit.low) && $util.isInteger(message.txSigLimit.high))) + return "txSigLimit: integer|Long expected"; + if (message.txSizeCostPerByte != null && message.hasOwnProperty("txSizeCostPerByte")) + if (!$util.isInteger(message.txSizeCostPerByte) && !(message.txSizeCostPerByte && $util.isInteger(message.txSizeCostPerByte.low) && $util.isInteger(message.txSizeCostPerByte.high))) + return "txSizeCostPerByte: integer|Long expected"; + if (message.sigVerifyCostEd25519 != null && message.hasOwnProperty("sigVerifyCostEd25519")) + if (!$util.isInteger(message.sigVerifyCostEd25519) && !(message.sigVerifyCostEd25519 && $util.isInteger(message.sigVerifyCostEd25519.low) && $util.isInteger(message.sigVerifyCostEd25519.high))) + return "sigVerifyCostEd25519: integer|Long expected"; + if (message.sigVerifyCostSecp256k1 != null && message.hasOwnProperty("sigVerifyCostSecp256k1")) + if (!$util.isInteger(message.sigVerifyCostSecp256k1) && !(message.sigVerifyCostSecp256k1 && $util.isInteger(message.sigVerifyCostSecp256k1.low) && $util.isInteger(message.sigVerifyCostSecp256k1.high))) + return "sigVerifyCostSecp256k1: integer|Long expected"; + return null; + }; + + /** + * Creates a Params message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.auth.v1beta1.Params + * @static + * @param {Object.} object Plain object + * @returns {cosmos.auth.v1beta1.Params} Params + */ + Params.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.auth.v1beta1.Params) + return object; + let message = new $root.cosmos.auth.v1beta1.Params(); + if (object.maxMemoCharacters != null) + if ($util.Long) + (message.maxMemoCharacters = $util.Long.fromValue(object.maxMemoCharacters)).unsigned = true; + else if (typeof object.maxMemoCharacters === "string") + message.maxMemoCharacters = parseInt(object.maxMemoCharacters, 10); + else if (typeof object.maxMemoCharacters === "number") + message.maxMemoCharacters = object.maxMemoCharacters; + else if (typeof object.maxMemoCharacters === "object") + message.maxMemoCharacters = new $util.LongBits(object.maxMemoCharacters.low >>> 0, object.maxMemoCharacters.high >>> 0).toNumber(true); + if (object.txSigLimit != null) + if ($util.Long) + (message.txSigLimit = $util.Long.fromValue(object.txSigLimit)).unsigned = true; + else if (typeof object.txSigLimit === "string") + message.txSigLimit = parseInt(object.txSigLimit, 10); + else if (typeof object.txSigLimit === "number") + message.txSigLimit = object.txSigLimit; + else if (typeof object.txSigLimit === "object") + message.txSigLimit = new $util.LongBits(object.txSigLimit.low >>> 0, object.txSigLimit.high >>> 0).toNumber(true); + if (object.txSizeCostPerByte != null) + if ($util.Long) + (message.txSizeCostPerByte = $util.Long.fromValue(object.txSizeCostPerByte)).unsigned = true; + else if (typeof object.txSizeCostPerByte === "string") + message.txSizeCostPerByte = parseInt(object.txSizeCostPerByte, 10); + else if (typeof object.txSizeCostPerByte === "number") + message.txSizeCostPerByte = object.txSizeCostPerByte; + else if (typeof object.txSizeCostPerByte === "object") + message.txSizeCostPerByte = new $util.LongBits(object.txSizeCostPerByte.low >>> 0, object.txSizeCostPerByte.high >>> 0).toNumber(true); + if (object.sigVerifyCostEd25519 != null) + if ($util.Long) + (message.sigVerifyCostEd25519 = $util.Long.fromValue(object.sigVerifyCostEd25519)).unsigned = true; + else if (typeof object.sigVerifyCostEd25519 === "string") + message.sigVerifyCostEd25519 = parseInt(object.sigVerifyCostEd25519, 10); + else if (typeof object.sigVerifyCostEd25519 === "number") + message.sigVerifyCostEd25519 = object.sigVerifyCostEd25519; + else if (typeof object.sigVerifyCostEd25519 === "object") + message.sigVerifyCostEd25519 = new $util.LongBits(object.sigVerifyCostEd25519.low >>> 0, object.sigVerifyCostEd25519.high >>> 0).toNumber(true); + if (object.sigVerifyCostSecp256k1 != null) + if ($util.Long) + (message.sigVerifyCostSecp256k1 = $util.Long.fromValue(object.sigVerifyCostSecp256k1)).unsigned = true; + else if (typeof object.sigVerifyCostSecp256k1 === "string") + message.sigVerifyCostSecp256k1 = parseInt(object.sigVerifyCostSecp256k1, 10); + else if (typeof object.sigVerifyCostSecp256k1 === "number") + message.sigVerifyCostSecp256k1 = object.sigVerifyCostSecp256k1; + else if (typeof object.sigVerifyCostSecp256k1 === "object") + message.sigVerifyCostSecp256k1 = new $util.LongBits(object.sigVerifyCostSecp256k1.low >>> 0, object.sigVerifyCostSecp256k1.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a Params message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.auth.v1beta1.Params + * @static + * @param {cosmos.auth.v1beta1.Params} message Params + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Params.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.maxMemoCharacters = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.maxMemoCharacters = options.longs === String ? "0" : 0; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.txSigLimit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.txSigLimit = options.longs === String ? "0" : 0; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.txSizeCostPerByte = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.txSizeCostPerByte = options.longs === String ? "0" : 0; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.sigVerifyCostEd25519 = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.sigVerifyCostEd25519 = options.longs === String ? "0" : 0; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.sigVerifyCostSecp256k1 = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.sigVerifyCostSecp256k1 = options.longs === String ? "0" : 0; + } + if (message.maxMemoCharacters != null && message.hasOwnProperty("maxMemoCharacters")) + if (typeof message.maxMemoCharacters === "number") + object.maxMemoCharacters = options.longs === String ? String(message.maxMemoCharacters) : message.maxMemoCharacters; + else + object.maxMemoCharacters = options.longs === String ? $util.Long.prototype.toString.call(message.maxMemoCharacters) : options.longs === Number ? new $util.LongBits(message.maxMemoCharacters.low >>> 0, message.maxMemoCharacters.high >>> 0).toNumber(true) : message.maxMemoCharacters; + if (message.txSigLimit != null && message.hasOwnProperty("txSigLimit")) + if (typeof message.txSigLimit === "number") + object.txSigLimit = options.longs === String ? String(message.txSigLimit) : message.txSigLimit; + else + object.txSigLimit = options.longs === String ? $util.Long.prototype.toString.call(message.txSigLimit) : options.longs === Number ? new $util.LongBits(message.txSigLimit.low >>> 0, message.txSigLimit.high >>> 0).toNumber(true) : message.txSigLimit; + if (message.txSizeCostPerByte != null && message.hasOwnProperty("txSizeCostPerByte")) + if (typeof message.txSizeCostPerByte === "number") + object.txSizeCostPerByte = options.longs === String ? String(message.txSizeCostPerByte) : message.txSizeCostPerByte; + else + object.txSizeCostPerByte = options.longs === String ? $util.Long.prototype.toString.call(message.txSizeCostPerByte) : options.longs === Number ? new $util.LongBits(message.txSizeCostPerByte.low >>> 0, message.txSizeCostPerByte.high >>> 0).toNumber(true) : message.txSizeCostPerByte; + if (message.sigVerifyCostEd25519 != null && message.hasOwnProperty("sigVerifyCostEd25519")) + if (typeof message.sigVerifyCostEd25519 === "number") + object.sigVerifyCostEd25519 = options.longs === String ? String(message.sigVerifyCostEd25519) : message.sigVerifyCostEd25519; + else + object.sigVerifyCostEd25519 = options.longs === String ? $util.Long.prototype.toString.call(message.sigVerifyCostEd25519) : options.longs === Number ? new $util.LongBits(message.sigVerifyCostEd25519.low >>> 0, message.sigVerifyCostEd25519.high >>> 0).toNumber(true) : message.sigVerifyCostEd25519; + if (message.sigVerifyCostSecp256k1 != null && message.hasOwnProperty("sigVerifyCostSecp256k1")) + if (typeof message.sigVerifyCostSecp256k1 === "number") + object.sigVerifyCostSecp256k1 = options.longs === String ? String(message.sigVerifyCostSecp256k1) : message.sigVerifyCostSecp256k1; + else + object.sigVerifyCostSecp256k1 = options.longs === String ? $util.Long.prototype.toString.call(message.sigVerifyCostSecp256k1) : options.longs === Number ? new $util.LongBits(message.sigVerifyCostSecp256k1.low >>> 0, message.sigVerifyCostSecp256k1.high >>> 0).toNumber(true) : message.sigVerifyCostSecp256k1; + return object; + }; + + /** + * Converts this Params to JSON. + * @function toJSON + * @memberof cosmos.auth.v1beta1.Params + * @instance + * @returns {Object.} JSON object + */ + Params.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Params; + })(v1beta1.Params || {}); + + v1beta1.GenesisState = (function(GenesisState) { + + /** + * Properties of a GenesisState. + * @memberof cosmos.auth.v1beta1 + * @interface IGenesisState + * @property {cosmos.auth.v1beta1.IParams|null} [params] GenesisState params + * @property {Array.|null} [accounts] GenesisState accounts + */ + + /** + * Constructs a new GenesisState. + * @memberof cosmos.auth.v1beta1 + * @classdesc Represents a GenesisState. + * @implements IGenesisState + * @constructor + * @param {cosmos.auth.v1beta1.IGenesisState=} [properties] Properties to set + */ + function GenesisState(properties) { + this.accounts = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GenesisState params. + * @member {cosmos.auth.v1beta1.IParams|null|undefined} params + * @memberof cosmos.auth.v1beta1.GenesisState + * @instance + */ + GenesisState.prototype.params = null; + + /** + * GenesisState accounts. + * @member {Array.} accounts + * @memberof cosmos.auth.v1beta1.GenesisState + * @instance + */ + GenesisState.prototype.accounts = $util.emptyArray; + + /** + * Creates a new GenesisState instance using the specified properties. + * @function create + * @memberof cosmos.auth.v1beta1.GenesisState + * @static + * @param {cosmos.auth.v1beta1.IGenesisState=} [properties] Properties to set + * @returns {cosmos.auth.v1beta1.GenesisState} GenesisState instance + */ + GenesisState.create = function create(properties) { + return new GenesisState(properties); + }; + + /** + * Encodes the specified GenesisState message. Does not implicitly {@link cosmos.auth.v1beta1.GenesisState.verify|verify} messages. + * @function encode + * @memberof cosmos.auth.v1beta1.GenesisState + * @static + * @param {cosmos.auth.v1beta1.IGenesisState} message GenesisState message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenesisState.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.params != null && Object.hasOwnProperty.call(message, "params")) + $root.cosmos.auth.v1beta1.Params.encode(message.params, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.accounts != null && message.accounts.length) + for (let i = 0; i < message.accounts.length; ++i) + $root.google.protobuf.Any.encode(message.accounts[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GenesisState message, length delimited. Does not implicitly {@link cosmos.auth.v1beta1.GenesisState.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.auth.v1beta1.GenesisState + * @static + * @param {cosmos.auth.v1beta1.IGenesisState} message GenesisState message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenesisState.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GenesisState message from the specified reader or buffer. + * @function decode + * @memberof cosmos.auth.v1beta1.GenesisState + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.auth.v1beta1.GenesisState} GenesisState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenesisState.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.auth.v1beta1.GenesisState(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.params = $root.cosmos.auth.v1beta1.Params.decode(reader, reader.uint32()); + break; + case 2: + if (!(message.accounts && message.accounts.length)) + message.accounts = []; + message.accounts.push($root.google.protobuf.Any.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GenesisState message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.auth.v1beta1.GenesisState + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.auth.v1beta1.GenesisState} GenesisState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenesisState.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GenesisState message. + * @function verify + * @memberof cosmos.auth.v1beta1.GenesisState + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GenesisState.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.params != null && message.hasOwnProperty("params")) { + let error = $root.cosmos.auth.v1beta1.Params.verify(message.params); + if (error) + return "params." + error; + } + if (message.accounts != null && message.hasOwnProperty("accounts")) { + if (!Array.isArray(message.accounts)) + return "accounts: array expected"; + for (let i = 0; i < message.accounts.length; ++i) { + let error = $root.google.protobuf.Any.verify(message.accounts[i]); + if (error) + return "accounts." + error; + } + } + return null; + }; + + /** + * Creates a GenesisState message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.auth.v1beta1.GenesisState + * @static + * @param {Object.} object Plain object + * @returns {cosmos.auth.v1beta1.GenesisState} GenesisState + */ + GenesisState.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.auth.v1beta1.GenesisState) + return object; + let message = new $root.cosmos.auth.v1beta1.GenesisState(); + if (object.params != null) { + if (typeof object.params !== "object") + throw TypeError(".cosmos.auth.v1beta1.GenesisState.params: object expected"); + message.params = $root.cosmos.auth.v1beta1.Params.fromObject(object.params); + } + if (object.accounts) { + if (!Array.isArray(object.accounts)) + throw TypeError(".cosmos.auth.v1beta1.GenesisState.accounts: array expected"); + message.accounts = []; + for (let i = 0; i < object.accounts.length; ++i) { + if (typeof object.accounts[i] !== "object") + throw TypeError(".cosmos.auth.v1beta1.GenesisState.accounts: object expected"); + message.accounts[i] = $root.google.protobuf.Any.fromObject(object.accounts[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a GenesisState message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.auth.v1beta1.GenesisState + * @static + * @param {cosmos.auth.v1beta1.GenesisState} message GenesisState + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GenesisState.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.accounts = []; + if (options.defaults) + object.params = null; + if (message.params != null && message.hasOwnProperty("params")) + object.params = $root.cosmos.auth.v1beta1.Params.toObject(message.params, options); + if (message.accounts && message.accounts.length) { + object.accounts = []; + for (let j = 0; j < message.accounts.length; ++j) + object.accounts[j] = $root.google.protobuf.Any.toObject(message.accounts[j], options); + } + return object; + }; + + /** + * Converts this GenesisState to JSON. + * @function toJSON + * @memberof cosmos.auth.v1beta1.GenesisState + * @instance + * @returns {Object.} JSON object + */ + GenesisState.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GenesisState; + })(v1beta1.GenesisState || {}); + + v1beta1.Query = (function(Query) { + + /** + * Constructs a new Query service. + * @memberof cosmos.auth.v1beta1 + * @classdesc Represents a Query + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Query(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Query.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Query; + + /** + * Creates new Query service using the specified rpc implementation. + * @function create + * @memberof cosmos.auth.v1beta1.Query + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Query} RPC service. Useful where requests and/or responses are streamed. + */ + Query.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link cosmos.auth.v1beta1.Query#account}. + * @memberof cosmos.auth.v1beta1.Query + * @typedef AccountCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.auth.v1beta1.IQueryAccountResponse} [response] QueryAccountResponse + */ + + /** + * Calls Account. + * @function account + * @memberof cosmos.auth.v1beta1.Query + * @instance + * @param {cosmos.auth.v1beta1.IQueryAccountRequest} request QueryAccountRequest message or plain object + * @param {cosmos.auth.v1beta1.Query.AccountCallback} callback Node-style callback called with the error, if any, and QueryAccountResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.account = function account(request, callback) { + return this.rpcCall(account, $root.cosmos.auth.v1beta1.QueryAccountRequest, $root.cosmos.auth.v1beta1.QueryAccountResponse, request, callback); + }, "name", { value: "Account" }); + + /** + * Calls Account. + * @function account + * @memberof cosmos.auth.v1beta1.Query + * @instance + * @param {cosmos.auth.v1beta1.IQueryAccountRequest} request QueryAccountRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link cosmos.auth.v1beta1.Query#params}. + * @memberof cosmos.auth.v1beta1.Query + * @typedef ParamsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.auth.v1beta1.IQueryParamsResponse} [response] QueryParamsResponse + */ + + /** + * Calls Params. + * @function params + * @memberof cosmos.auth.v1beta1.Query + * @instance + * @param {cosmos.auth.v1beta1.IQueryParamsRequest} request QueryParamsRequest message or plain object + * @param {cosmos.auth.v1beta1.Query.ParamsCallback} callback Node-style callback called with the error, if any, and QueryParamsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.params = function params(request, callback) { + return this.rpcCall(params, $root.cosmos.auth.v1beta1.QueryParamsRequest, $root.cosmos.auth.v1beta1.QueryParamsResponse, request, callback); + }, "name", { value: "Params" }); + + /** + * Calls Params. + * @function params + * @memberof cosmos.auth.v1beta1.Query + * @instance + * @param {cosmos.auth.v1beta1.IQueryParamsRequest} request QueryParamsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Query; + })(v1beta1.Query || {}); + + v1beta1.QueryAccountRequest = (function(QueryAccountRequest) { + + /** + * Properties of a QueryAccountRequest. + * @memberof cosmos.auth.v1beta1 + * @interface IQueryAccountRequest + * @property {string|null} [address] QueryAccountRequest address + */ + + /** + * Constructs a new QueryAccountRequest. + * @memberof cosmos.auth.v1beta1 + * @classdesc Represents a QueryAccountRequest. + * @implements IQueryAccountRequest + * @constructor + * @param {cosmos.auth.v1beta1.IQueryAccountRequest=} [properties] Properties to set + */ + function QueryAccountRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryAccountRequest address. + * @member {string} address + * @memberof cosmos.auth.v1beta1.QueryAccountRequest + * @instance + */ + QueryAccountRequest.prototype.address = ""; + + /** + * Creates a new QueryAccountRequest instance using the specified properties. + * @function create + * @memberof cosmos.auth.v1beta1.QueryAccountRequest + * @static + * @param {cosmos.auth.v1beta1.IQueryAccountRequest=} [properties] Properties to set + * @returns {cosmos.auth.v1beta1.QueryAccountRequest} QueryAccountRequest instance + */ + QueryAccountRequest.create = function create(properties) { + return new QueryAccountRequest(properties); + }; + + /** + * Encodes the specified QueryAccountRequest message. Does not implicitly {@link cosmos.auth.v1beta1.QueryAccountRequest.verify|verify} messages. + * @function encode + * @memberof cosmos.auth.v1beta1.QueryAccountRequest + * @static + * @param {cosmos.auth.v1beta1.IQueryAccountRequest} message QueryAccountRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryAccountRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.address != null && Object.hasOwnProperty.call(message, "address")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.address); + return writer; + }; + + /** + * Encodes the specified QueryAccountRequest message, length delimited. Does not implicitly {@link cosmos.auth.v1beta1.QueryAccountRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.auth.v1beta1.QueryAccountRequest + * @static + * @param {cosmos.auth.v1beta1.IQueryAccountRequest} message QueryAccountRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryAccountRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryAccountRequest message from the specified reader or buffer. + * @function decode + * @memberof cosmos.auth.v1beta1.QueryAccountRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.auth.v1beta1.QueryAccountRequest} QueryAccountRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryAccountRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.auth.v1beta1.QueryAccountRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.address = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryAccountRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.auth.v1beta1.QueryAccountRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.auth.v1beta1.QueryAccountRequest} QueryAccountRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryAccountRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryAccountRequest message. + * @function verify + * @memberof cosmos.auth.v1beta1.QueryAccountRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryAccountRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.address != null && message.hasOwnProperty("address")) + if (!$util.isString(message.address)) + return "address: string expected"; + return null; + }; + + /** + * Creates a QueryAccountRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.auth.v1beta1.QueryAccountRequest + * @static + * @param {Object.} object Plain object + * @returns {cosmos.auth.v1beta1.QueryAccountRequest} QueryAccountRequest + */ + QueryAccountRequest.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.auth.v1beta1.QueryAccountRequest) + return object; + let message = new $root.cosmos.auth.v1beta1.QueryAccountRequest(); + if (object.address != null) + message.address = String(object.address); + return message; + }; + + /** + * Creates a plain object from a QueryAccountRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.auth.v1beta1.QueryAccountRequest + * @static + * @param {cosmos.auth.v1beta1.QueryAccountRequest} message QueryAccountRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryAccountRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.address = ""; + if (message.address != null && message.hasOwnProperty("address")) + object.address = message.address; + return object; + }; + + /** + * Converts this QueryAccountRequest to JSON. + * @function toJSON + * @memberof cosmos.auth.v1beta1.QueryAccountRequest + * @instance + * @returns {Object.} JSON object + */ + QueryAccountRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryAccountRequest; + })(v1beta1.QueryAccountRequest || {}); + + v1beta1.QueryAccountResponse = (function(QueryAccountResponse) { + + /** + * Properties of a QueryAccountResponse. + * @memberof cosmos.auth.v1beta1 + * @interface IQueryAccountResponse + * @property {google.protobuf.IAny|null} [account] QueryAccountResponse account + */ + + /** + * Constructs a new QueryAccountResponse. + * @memberof cosmos.auth.v1beta1 + * @classdesc Represents a QueryAccountResponse. + * @implements IQueryAccountResponse + * @constructor + * @param {cosmos.auth.v1beta1.IQueryAccountResponse=} [properties] Properties to set + */ + function QueryAccountResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryAccountResponse account. + * @member {google.protobuf.IAny|null|undefined} account + * @memberof cosmos.auth.v1beta1.QueryAccountResponse + * @instance + */ + QueryAccountResponse.prototype.account = null; + + /** + * Creates a new QueryAccountResponse instance using the specified properties. + * @function create + * @memberof cosmos.auth.v1beta1.QueryAccountResponse + * @static + * @param {cosmos.auth.v1beta1.IQueryAccountResponse=} [properties] Properties to set + * @returns {cosmos.auth.v1beta1.QueryAccountResponse} QueryAccountResponse instance + */ + QueryAccountResponse.create = function create(properties) { + return new QueryAccountResponse(properties); + }; + + /** + * Encodes the specified QueryAccountResponse message. Does not implicitly {@link cosmos.auth.v1beta1.QueryAccountResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.auth.v1beta1.QueryAccountResponse + * @static + * @param {cosmos.auth.v1beta1.IQueryAccountResponse} message QueryAccountResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryAccountResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.account != null && Object.hasOwnProperty.call(message, "account")) + $root.google.protobuf.Any.encode(message.account, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryAccountResponse message, length delimited. Does not implicitly {@link cosmos.auth.v1beta1.QueryAccountResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.auth.v1beta1.QueryAccountResponse + * @static + * @param {cosmos.auth.v1beta1.IQueryAccountResponse} message QueryAccountResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryAccountResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryAccountResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.auth.v1beta1.QueryAccountResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.auth.v1beta1.QueryAccountResponse} QueryAccountResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryAccountResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.auth.v1beta1.QueryAccountResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.account = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryAccountResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.auth.v1beta1.QueryAccountResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.auth.v1beta1.QueryAccountResponse} QueryAccountResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryAccountResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryAccountResponse message. + * @function verify + * @memberof cosmos.auth.v1beta1.QueryAccountResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryAccountResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.account != null && message.hasOwnProperty("account")) { + let error = $root.google.protobuf.Any.verify(message.account); + if (error) + return "account." + error; + } + return null; + }; + + /** + * Creates a QueryAccountResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.auth.v1beta1.QueryAccountResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.auth.v1beta1.QueryAccountResponse} QueryAccountResponse + */ + QueryAccountResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.auth.v1beta1.QueryAccountResponse) + return object; + let message = new $root.cosmos.auth.v1beta1.QueryAccountResponse(); + if (object.account != null) { + if (typeof object.account !== "object") + throw TypeError(".cosmos.auth.v1beta1.QueryAccountResponse.account: object expected"); + message.account = $root.google.protobuf.Any.fromObject(object.account); + } + return message; + }; + + /** + * Creates a plain object from a QueryAccountResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.auth.v1beta1.QueryAccountResponse + * @static + * @param {cosmos.auth.v1beta1.QueryAccountResponse} message QueryAccountResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryAccountResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.account = null; + if (message.account != null && message.hasOwnProperty("account")) + object.account = $root.google.protobuf.Any.toObject(message.account, options); + return object; + }; + + /** + * Converts this QueryAccountResponse to JSON. + * @function toJSON + * @memberof cosmos.auth.v1beta1.QueryAccountResponse + * @instance + * @returns {Object.} JSON object + */ + QueryAccountResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryAccountResponse; + })(v1beta1.QueryAccountResponse || {}); + + v1beta1.QueryParamsRequest = (function(QueryParamsRequest) { + + /** + * Properties of a QueryParamsRequest. + * @memberof cosmos.auth.v1beta1 + * @interface IQueryParamsRequest + */ + + /** + * Constructs a new QueryParamsRequest. + * @memberof cosmos.auth.v1beta1 + * @classdesc Represents a QueryParamsRequest. + * @implements IQueryParamsRequest + * @constructor + * @param {cosmos.auth.v1beta1.IQueryParamsRequest=} [properties] Properties to set + */ + function QueryParamsRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new QueryParamsRequest instance using the specified properties. + * @function create + * @memberof cosmos.auth.v1beta1.QueryParamsRequest + * @static + * @param {cosmos.auth.v1beta1.IQueryParamsRequest=} [properties] Properties to set + * @returns {cosmos.auth.v1beta1.QueryParamsRequest} QueryParamsRequest instance + */ + QueryParamsRequest.create = function create(properties) { + return new QueryParamsRequest(properties); + }; + + /** + * Encodes the specified QueryParamsRequest message. Does not implicitly {@link cosmos.auth.v1beta1.QueryParamsRequest.verify|verify} messages. + * @function encode + * @memberof cosmos.auth.v1beta1.QueryParamsRequest + * @static + * @param {cosmos.auth.v1beta1.IQueryParamsRequest} message QueryParamsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryParamsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified QueryParamsRequest message, length delimited. Does not implicitly {@link cosmos.auth.v1beta1.QueryParamsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.auth.v1beta1.QueryParamsRequest + * @static + * @param {cosmos.auth.v1beta1.IQueryParamsRequest} message QueryParamsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryParamsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryParamsRequest message from the specified reader or buffer. + * @function decode + * @memberof cosmos.auth.v1beta1.QueryParamsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.auth.v1beta1.QueryParamsRequest} QueryParamsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryParamsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.auth.v1beta1.QueryParamsRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryParamsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.auth.v1beta1.QueryParamsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.auth.v1beta1.QueryParamsRequest} QueryParamsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryParamsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryParamsRequest message. + * @function verify + * @memberof cosmos.auth.v1beta1.QueryParamsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryParamsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a QueryParamsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.auth.v1beta1.QueryParamsRequest + * @static + * @param {Object.} object Plain object + * @returns {cosmos.auth.v1beta1.QueryParamsRequest} QueryParamsRequest + */ + QueryParamsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.auth.v1beta1.QueryParamsRequest) + return object; + return new $root.cosmos.auth.v1beta1.QueryParamsRequest(); + }; + + /** + * Creates a plain object from a QueryParamsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.auth.v1beta1.QueryParamsRequest + * @static + * @param {cosmos.auth.v1beta1.QueryParamsRequest} message QueryParamsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryParamsRequest.toObject = function toObject() { + return {}; + }; + + /** + * Converts this QueryParamsRequest to JSON. + * @function toJSON + * @memberof cosmos.auth.v1beta1.QueryParamsRequest + * @instance + * @returns {Object.} JSON object + */ + QueryParamsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryParamsRequest; + })(v1beta1.QueryParamsRequest || {}); + + v1beta1.QueryParamsResponse = (function(QueryParamsResponse) { + + /** + * Properties of a QueryParamsResponse. + * @memberof cosmos.auth.v1beta1 + * @interface IQueryParamsResponse + * @property {cosmos.auth.v1beta1.IParams|null} [params] QueryParamsResponse params + */ + + /** + * Constructs a new QueryParamsResponse. + * @memberof cosmos.auth.v1beta1 + * @classdesc Represents a QueryParamsResponse. + * @implements IQueryParamsResponse + * @constructor + * @param {cosmos.auth.v1beta1.IQueryParamsResponse=} [properties] Properties to set + */ + function QueryParamsResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryParamsResponse params. + * @member {cosmos.auth.v1beta1.IParams|null|undefined} params + * @memberof cosmos.auth.v1beta1.QueryParamsResponse + * @instance + */ + QueryParamsResponse.prototype.params = null; + + /** + * Creates a new QueryParamsResponse instance using the specified properties. + * @function create + * @memberof cosmos.auth.v1beta1.QueryParamsResponse + * @static + * @param {cosmos.auth.v1beta1.IQueryParamsResponse=} [properties] Properties to set + * @returns {cosmos.auth.v1beta1.QueryParamsResponse} QueryParamsResponse instance + */ + QueryParamsResponse.create = function create(properties) { + return new QueryParamsResponse(properties); + }; + + /** + * Encodes the specified QueryParamsResponse message. Does not implicitly {@link cosmos.auth.v1beta1.QueryParamsResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.auth.v1beta1.QueryParamsResponse + * @static + * @param {cosmos.auth.v1beta1.IQueryParamsResponse} message QueryParamsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryParamsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.params != null && Object.hasOwnProperty.call(message, "params")) + $root.cosmos.auth.v1beta1.Params.encode(message.params, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryParamsResponse message, length delimited. Does not implicitly {@link cosmos.auth.v1beta1.QueryParamsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.auth.v1beta1.QueryParamsResponse + * @static + * @param {cosmos.auth.v1beta1.IQueryParamsResponse} message QueryParamsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryParamsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryParamsResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.auth.v1beta1.QueryParamsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.auth.v1beta1.QueryParamsResponse} QueryParamsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryParamsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.auth.v1beta1.QueryParamsResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.params = $root.cosmos.auth.v1beta1.Params.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryParamsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.auth.v1beta1.QueryParamsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.auth.v1beta1.QueryParamsResponse} QueryParamsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryParamsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryParamsResponse message. + * @function verify + * @memberof cosmos.auth.v1beta1.QueryParamsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryParamsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.params != null && message.hasOwnProperty("params")) { + let error = $root.cosmos.auth.v1beta1.Params.verify(message.params); + if (error) + return "params." + error; + } + return null; + }; + + /** + * Creates a QueryParamsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.auth.v1beta1.QueryParamsResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.auth.v1beta1.QueryParamsResponse} QueryParamsResponse + */ + QueryParamsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.auth.v1beta1.QueryParamsResponse) + return object; + let message = new $root.cosmos.auth.v1beta1.QueryParamsResponse(); + if (object.params != null) { + if (typeof object.params !== "object") + throw TypeError(".cosmos.auth.v1beta1.QueryParamsResponse.params: object expected"); + message.params = $root.cosmos.auth.v1beta1.Params.fromObject(object.params); + } + return message; + }; + + /** + * Creates a plain object from a QueryParamsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.auth.v1beta1.QueryParamsResponse + * @static + * @param {cosmos.auth.v1beta1.QueryParamsResponse} message QueryParamsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryParamsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.params = null; + if (message.params != null && message.hasOwnProperty("params")) + object.params = $root.cosmos.auth.v1beta1.Params.toObject(message.params, options); + return object; + }; + + /** + * Converts this QueryParamsResponse to JSON. + * @function toJSON + * @memberof cosmos.auth.v1beta1.QueryParamsResponse + * @instance + * @returns {Object.} JSON object + */ + QueryParamsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryParamsResponse; + })(v1beta1.QueryParamsResponse || {}); + + return v1beta1; + })(auth.v1beta1 || {}); + + return auth; + })(cosmos.auth || {}); + + /** + * Namespace bank. + * @memberof cosmos + * @namespace + */ + + cosmos.bank = (function(bank) { + + /** + * Namespace v1beta1. + * @memberof cosmos.bank + * @namespace + */ + + bank.v1beta1 = (function(v1beta1) { + + v1beta1.Params = (function(Params) { + + /** + * Properties of a Params. + * @memberof cosmos.bank.v1beta1 + * @interface IParams + * @property {Array.|null} [sendEnabled] Params sendEnabled + * @property {boolean|null} [defaultSendEnabled] Params defaultSendEnabled + */ + + /** + * Constructs a new Params. + * @memberof cosmos.bank.v1beta1 + * @classdesc Represents a Params. + * @implements IParams + * @constructor + * @param {cosmos.bank.v1beta1.IParams=} [properties] Properties to set + */ + function Params(properties) { + this.sendEnabled = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Params sendEnabled. + * @member {Array.} sendEnabled + * @memberof cosmos.bank.v1beta1.Params + * @instance + */ + Params.prototype.sendEnabled = $util.emptyArray; + + /** + * Params defaultSendEnabled. + * @member {boolean} defaultSendEnabled + * @memberof cosmos.bank.v1beta1.Params + * @instance + */ + Params.prototype.defaultSendEnabled = false; + + /** + * Creates a new Params instance using the specified properties. + * @function create + * @memberof cosmos.bank.v1beta1.Params + * @static + * @param {cosmos.bank.v1beta1.IParams=} [properties] Properties to set + * @returns {cosmos.bank.v1beta1.Params} Params instance + */ + Params.create = function create(properties) { + return new Params(properties); + }; + + /** + * Encodes the specified Params message. Does not implicitly {@link cosmos.bank.v1beta1.Params.verify|verify} messages. + * @function encode + * @memberof cosmos.bank.v1beta1.Params + * @static + * @param {cosmos.bank.v1beta1.IParams} message Params message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Params.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sendEnabled != null && message.sendEnabled.length) + for (let i = 0; i < message.sendEnabled.length; ++i) + $root.cosmos.bank.v1beta1.SendEnabled.encode(message.sendEnabled[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.defaultSendEnabled != null && Object.hasOwnProperty.call(message, "defaultSendEnabled")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.defaultSendEnabled); + return writer; + }; + + /** + * Encodes the specified Params message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.Params.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.bank.v1beta1.Params + * @static + * @param {cosmos.bank.v1beta1.IParams} message Params message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Params.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Params message from the specified reader or buffer. + * @function decode + * @memberof cosmos.bank.v1beta1.Params + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.bank.v1beta1.Params} Params + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Params.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.bank.v1beta1.Params(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.sendEnabled && message.sendEnabled.length)) + message.sendEnabled = []; + message.sendEnabled.push($root.cosmos.bank.v1beta1.SendEnabled.decode(reader, reader.uint32())); + break; + case 2: + message.defaultSendEnabled = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Params message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.bank.v1beta1.Params + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.bank.v1beta1.Params} Params + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Params.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Params message. + * @function verify + * @memberof cosmos.bank.v1beta1.Params + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Params.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sendEnabled != null && message.hasOwnProperty("sendEnabled")) { + if (!Array.isArray(message.sendEnabled)) + return "sendEnabled: array expected"; + for (let i = 0; i < message.sendEnabled.length; ++i) { + let error = $root.cosmos.bank.v1beta1.SendEnabled.verify(message.sendEnabled[i]); + if (error) + return "sendEnabled." + error; + } + } + if (message.defaultSendEnabled != null && message.hasOwnProperty("defaultSendEnabled")) + if (typeof message.defaultSendEnabled !== "boolean") + return "defaultSendEnabled: boolean expected"; + return null; + }; + + /** + * Creates a Params message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.bank.v1beta1.Params + * @static + * @param {Object.} object Plain object + * @returns {cosmos.bank.v1beta1.Params} Params + */ + Params.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.bank.v1beta1.Params) + return object; + let message = new $root.cosmos.bank.v1beta1.Params(); + if (object.sendEnabled) { + if (!Array.isArray(object.sendEnabled)) + throw TypeError(".cosmos.bank.v1beta1.Params.sendEnabled: array expected"); + message.sendEnabled = []; + for (let i = 0; i < object.sendEnabled.length; ++i) { + if (typeof object.sendEnabled[i] !== "object") + throw TypeError(".cosmos.bank.v1beta1.Params.sendEnabled: object expected"); + message.sendEnabled[i] = $root.cosmos.bank.v1beta1.SendEnabled.fromObject(object.sendEnabled[i]); + } + } + if (object.defaultSendEnabled != null) + message.defaultSendEnabled = Boolean(object.defaultSendEnabled); + return message; + }; + + /** + * Creates a plain object from a Params message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.bank.v1beta1.Params + * @static + * @param {cosmos.bank.v1beta1.Params} message Params + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Params.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.sendEnabled = []; + if (options.defaults) + object.defaultSendEnabled = false; + if (message.sendEnabled && message.sendEnabled.length) { + object.sendEnabled = []; + for (let j = 0; j < message.sendEnabled.length; ++j) + object.sendEnabled[j] = $root.cosmos.bank.v1beta1.SendEnabled.toObject(message.sendEnabled[j], options); + } + if (message.defaultSendEnabled != null && message.hasOwnProperty("defaultSendEnabled")) + object.defaultSendEnabled = message.defaultSendEnabled; + return object; + }; + + /** + * Converts this Params to JSON. + * @function toJSON + * @memberof cosmos.bank.v1beta1.Params + * @instance + * @returns {Object.} JSON object + */ + Params.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Params; + })(v1beta1.Params || {}); + + v1beta1.SendEnabled = (function(SendEnabled) { + + /** + * Properties of a SendEnabled. + * @memberof cosmos.bank.v1beta1 + * @interface ISendEnabled + * @property {string|null} [denom] SendEnabled denom + * @property {boolean|null} [enabled] SendEnabled enabled + */ + + /** + * Constructs a new SendEnabled. + * @memberof cosmos.bank.v1beta1 + * @classdesc Represents a SendEnabled. + * @implements ISendEnabled + * @constructor + * @param {cosmos.bank.v1beta1.ISendEnabled=} [properties] Properties to set + */ + function SendEnabled(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SendEnabled denom. + * @member {string} denom + * @memberof cosmos.bank.v1beta1.SendEnabled + * @instance + */ + SendEnabled.prototype.denom = ""; + + /** + * SendEnabled enabled. + * @member {boolean} enabled + * @memberof cosmos.bank.v1beta1.SendEnabled + * @instance + */ + SendEnabled.prototype.enabled = false; + + /** + * Creates a new SendEnabled instance using the specified properties. + * @function create + * @memberof cosmos.bank.v1beta1.SendEnabled + * @static + * @param {cosmos.bank.v1beta1.ISendEnabled=} [properties] Properties to set + * @returns {cosmos.bank.v1beta1.SendEnabled} SendEnabled instance + */ + SendEnabled.create = function create(properties) { + return new SendEnabled(properties); + }; + + /** + * Encodes the specified SendEnabled message. Does not implicitly {@link cosmos.bank.v1beta1.SendEnabled.verify|verify} messages. + * @function encode + * @memberof cosmos.bank.v1beta1.SendEnabled + * @static + * @param {cosmos.bank.v1beta1.ISendEnabled} message SendEnabled message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SendEnabled.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.denom != null && Object.hasOwnProperty.call(message, "denom")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.denom); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.enabled); + return writer; + }; + + /** + * Encodes the specified SendEnabled message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.SendEnabled.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.bank.v1beta1.SendEnabled + * @static + * @param {cosmos.bank.v1beta1.ISendEnabled} message SendEnabled message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SendEnabled.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SendEnabled message from the specified reader or buffer. + * @function decode + * @memberof cosmos.bank.v1beta1.SendEnabled + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.bank.v1beta1.SendEnabled} SendEnabled + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SendEnabled.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.bank.v1beta1.SendEnabled(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.denom = reader.string(); + break; + case 2: + message.enabled = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SendEnabled message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.bank.v1beta1.SendEnabled + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.bank.v1beta1.SendEnabled} SendEnabled + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SendEnabled.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SendEnabled message. + * @function verify + * @memberof cosmos.bank.v1beta1.SendEnabled + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SendEnabled.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.denom != null && message.hasOwnProperty("denom")) + if (!$util.isString(message.denom)) + return "denom: string expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + return null; + }; + + /** + * Creates a SendEnabled message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.bank.v1beta1.SendEnabled + * @static + * @param {Object.} object Plain object + * @returns {cosmos.bank.v1beta1.SendEnabled} SendEnabled + */ + SendEnabled.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.bank.v1beta1.SendEnabled) + return object; + let message = new $root.cosmos.bank.v1beta1.SendEnabled(); + if (object.denom != null) + message.denom = String(object.denom); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + return message; + }; + + /** + * Creates a plain object from a SendEnabled message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.bank.v1beta1.SendEnabled + * @static + * @param {cosmos.bank.v1beta1.SendEnabled} message SendEnabled + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SendEnabled.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.denom = ""; + object.enabled = false; + } + if (message.denom != null && message.hasOwnProperty("denom")) + object.denom = message.denom; + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + return object; + }; + + /** + * Converts this SendEnabled to JSON. + * @function toJSON + * @memberof cosmos.bank.v1beta1.SendEnabled + * @instance + * @returns {Object.} JSON object + */ + SendEnabled.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SendEnabled; + })(v1beta1.SendEnabled || {}); + + v1beta1.Input = (function(Input) { + + /** + * Properties of an Input. + * @memberof cosmos.bank.v1beta1 + * @interface IInput + * @property {string|null} [address] Input address + * @property {Array.|null} [coins] Input coins + */ + + /** + * Constructs a new Input. + * @memberof cosmos.bank.v1beta1 + * @classdesc Represents an Input. + * @implements IInput + * @constructor + * @param {cosmos.bank.v1beta1.IInput=} [properties] Properties to set + */ + function Input(properties) { + this.coins = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Input address. + * @member {string} address + * @memberof cosmos.bank.v1beta1.Input + * @instance + */ + Input.prototype.address = ""; + + /** + * Input coins. + * @member {Array.} coins + * @memberof cosmos.bank.v1beta1.Input + * @instance + */ + Input.prototype.coins = $util.emptyArray; + + /** + * Creates a new Input instance using the specified properties. + * @function create + * @memberof cosmos.bank.v1beta1.Input + * @static + * @param {cosmos.bank.v1beta1.IInput=} [properties] Properties to set + * @returns {cosmos.bank.v1beta1.Input} Input instance + */ + Input.create = function create(properties) { + return new Input(properties); + }; + + /** + * Encodes the specified Input message. Does not implicitly {@link cosmos.bank.v1beta1.Input.verify|verify} messages. + * @function encode + * @memberof cosmos.bank.v1beta1.Input + * @static + * @param {cosmos.bank.v1beta1.IInput} message Input message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Input.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.address != null && Object.hasOwnProperty.call(message, "address")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.address); + if (message.coins != null && message.coins.length) + for (let i = 0; i < message.coins.length; ++i) + $root.cosmos.base.v1beta1.Coin.encode(message.coins[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Input message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.Input.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.bank.v1beta1.Input + * @static + * @param {cosmos.bank.v1beta1.IInput} message Input message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Input.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Input message from the specified reader or buffer. + * @function decode + * @memberof cosmos.bank.v1beta1.Input + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.bank.v1beta1.Input} Input + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Input.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.bank.v1beta1.Input(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.address = reader.string(); + break; + case 2: + if (!(message.coins && message.coins.length)) + message.coins = []; + message.coins.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Input message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.bank.v1beta1.Input + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.bank.v1beta1.Input} Input + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Input.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Input message. + * @function verify + * @memberof cosmos.bank.v1beta1.Input + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Input.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.address != null && message.hasOwnProperty("address")) + if (!$util.isString(message.address)) + return "address: string expected"; + if (message.coins != null && message.hasOwnProperty("coins")) { + if (!Array.isArray(message.coins)) + return "coins: array expected"; + for (let i = 0; i < message.coins.length; ++i) { + let error = $root.cosmos.base.v1beta1.Coin.verify(message.coins[i]); + if (error) + return "coins." + error; + } + } + return null; + }; + + /** + * Creates an Input message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.bank.v1beta1.Input + * @static + * @param {Object.} object Plain object + * @returns {cosmos.bank.v1beta1.Input} Input + */ + Input.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.bank.v1beta1.Input) + return object; + let message = new $root.cosmos.bank.v1beta1.Input(); + if (object.address != null) + message.address = String(object.address); + if (object.coins) { + if (!Array.isArray(object.coins)) + throw TypeError(".cosmos.bank.v1beta1.Input.coins: array expected"); + message.coins = []; + for (let i = 0; i < object.coins.length; ++i) { + if (typeof object.coins[i] !== "object") + throw TypeError(".cosmos.bank.v1beta1.Input.coins: object expected"); + message.coins[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.coins[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an Input message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.bank.v1beta1.Input + * @static + * @param {cosmos.bank.v1beta1.Input} message Input + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Input.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.coins = []; + if (options.defaults) + object.address = ""; + if (message.address != null && message.hasOwnProperty("address")) + object.address = message.address; + if (message.coins && message.coins.length) { + object.coins = []; + for (let j = 0; j < message.coins.length; ++j) + object.coins[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.coins[j], options); + } + return object; + }; + + /** + * Converts this Input to JSON. + * @function toJSON + * @memberof cosmos.bank.v1beta1.Input + * @instance + * @returns {Object.} JSON object + */ + Input.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Input; + })(v1beta1.Input || {}); + + v1beta1.Output = (function(Output) { + + /** + * Properties of an Output. + * @memberof cosmos.bank.v1beta1 + * @interface IOutput + * @property {string|null} [address] Output address + * @property {Array.|null} [coins] Output coins + */ + + /** + * Constructs a new Output. + * @memberof cosmos.bank.v1beta1 + * @classdesc Represents an Output. + * @implements IOutput + * @constructor + * @param {cosmos.bank.v1beta1.IOutput=} [properties] Properties to set + */ + function Output(properties) { + this.coins = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Output address. + * @member {string} address + * @memberof cosmos.bank.v1beta1.Output + * @instance + */ + Output.prototype.address = ""; + + /** + * Output coins. + * @member {Array.} coins + * @memberof cosmos.bank.v1beta1.Output + * @instance + */ + Output.prototype.coins = $util.emptyArray; + + /** + * Creates a new Output instance using the specified properties. + * @function create + * @memberof cosmos.bank.v1beta1.Output + * @static + * @param {cosmos.bank.v1beta1.IOutput=} [properties] Properties to set + * @returns {cosmos.bank.v1beta1.Output} Output instance + */ + Output.create = function create(properties) { + return new Output(properties); + }; + + /** + * Encodes the specified Output message. Does not implicitly {@link cosmos.bank.v1beta1.Output.verify|verify} messages. + * @function encode + * @memberof cosmos.bank.v1beta1.Output + * @static + * @param {cosmos.bank.v1beta1.IOutput} message Output message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Output.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.address != null && Object.hasOwnProperty.call(message, "address")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.address); + if (message.coins != null && message.coins.length) + for (let i = 0; i < message.coins.length; ++i) + $root.cosmos.base.v1beta1.Coin.encode(message.coins[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Output message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.Output.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.bank.v1beta1.Output + * @static + * @param {cosmos.bank.v1beta1.IOutput} message Output message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Output.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Output message from the specified reader or buffer. + * @function decode + * @memberof cosmos.bank.v1beta1.Output + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.bank.v1beta1.Output} Output + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Output.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.bank.v1beta1.Output(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.address = reader.string(); + break; + case 2: + if (!(message.coins && message.coins.length)) + message.coins = []; + message.coins.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Output message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.bank.v1beta1.Output + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.bank.v1beta1.Output} Output + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Output.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Output message. + * @function verify + * @memberof cosmos.bank.v1beta1.Output + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Output.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.address != null && message.hasOwnProperty("address")) + if (!$util.isString(message.address)) + return "address: string expected"; + if (message.coins != null && message.hasOwnProperty("coins")) { + if (!Array.isArray(message.coins)) + return "coins: array expected"; + for (let i = 0; i < message.coins.length; ++i) { + let error = $root.cosmos.base.v1beta1.Coin.verify(message.coins[i]); + if (error) + return "coins." + error; + } + } + return null; + }; + + /** + * Creates an Output message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.bank.v1beta1.Output + * @static + * @param {Object.} object Plain object + * @returns {cosmos.bank.v1beta1.Output} Output + */ + Output.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.bank.v1beta1.Output) + return object; + let message = new $root.cosmos.bank.v1beta1.Output(); + if (object.address != null) + message.address = String(object.address); + if (object.coins) { + if (!Array.isArray(object.coins)) + throw TypeError(".cosmos.bank.v1beta1.Output.coins: array expected"); + message.coins = []; + for (let i = 0; i < object.coins.length; ++i) { + if (typeof object.coins[i] !== "object") + throw TypeError(".cosmos.bank.v1beta1.Output.coins: object expected"); + message.coins[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.coins[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an Output message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.bank.v1beta1.Output + * @static + * @param {cosmos.bank.v1beta1.Output} message Output + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Output.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.coins = []; + if (options.defaults) + object.address = ""; + if (message.address != null && message.hasOwnProperty("address")) + object.address = message.address; + if (message.coins && message.coins.length) { + object.coins = []; + for (let j = 0; j < message.coins.length; ++j) + object.coins[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.coins[j], options); + } + return object; + }; + + /** + * Converts this Output to JSON. + * @function toJSON + * @memberof cosmos.bank.v1beta1.Output + * @instance + * @returns {Object.} JSON object + */ + Output.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Output; + })(v1beta1.Output || {}); + + v1beta1.Supply = (function(Supply) { + + /** + * Properties of a Supply. + * @memberof cosmos.bank.v1beta1 + * @interface ISupply + * @property {Array.|null} [total] Supply total + */ + + /** + * Constructs a new Supply. + * @memberof cosmos.bank.v1beta1 + * @classdesc Represents a Supply. + * @implements ISupply + * @constructor + * @param {cosmos.bank.v1beta1.ISupply=} [properties] Properties to set + */ + function Supply(properties) { + this.total = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Supply total. + * @member {Array.} total + * @memberof cosmos.bank.v1beta1.Supply + * @instance + */ + Supply.prototype.total = $util.emptyArray; + + /** + * Creates a new Supply instance using the specified properties. + * @function create + * @memberof cosmos.bank.v1beta1.Supply + * @static + * @param {cosmos.bank.v1beta1.ISupply=} [properties] Properties to set + * @returns {cosmos.bank.v1beta1.Supply} Supply instance + */ + Supply.create = function create(properties) { + return new Supply(properties); + }; + + /** + * Encodes the specified Supply message. Does not implicitly {@link cosmos.bank.v1beta1.Supply.verify|verify} messages. + * @function encode + * @memberof cosmos.bank.v1beta1.Supply + * @static + * @param {cosmos.bank.v1beta1.ISupply} message Supply message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Supply.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.total != null && message.total.length) + for (let i = 0; i < message.total.length; ++i) + $root.cosmos.base.v1beta1.Coin.encode(message.total[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Supply message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.Supply.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.bank.v1beta1.Supply + * @static + * @param {cosmos.bank.v1beta1.ISupply} message Supply message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Supply.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Supply message from the specified reader or buffer. + * @function decode + * @memberof cosmos.bank.v1beta1.Supply + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.bank.v1beta1.Supply} Supply + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Supply.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.bank.v1beta1.Supply(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.total && message.total.length)) + message.total = []; + message.total.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Supply message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.bank.v1beta1.Supply + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.bank.v1beta1.Supply} Supply + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Supply.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Supply message. + * @function verify + * @memberof cosmos.bank.v1beta1.Supply + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Supply.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.total != null && message.hasOwnProperty("total")) { + if (!Array.isArray(message.total)) + return "total: array expected"; + for (let i = 0; i < message.total.length; ++i) { + let error = $root.cosmos.base.v1beta1.Coin.verify(message.total[i]); + if (error) + return "total." + error; + } + } + return null; + }; + + /** + * Creates a Supply message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.bank.v1beta1.Supply + * @static + * @param {Object.} object Plain object + * @returns {cosmos.bank.v1beta1.Supply} Supply + */ + Supply.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.bank.v1beta1.Supply) + return object; + let message = new $root.cosmos.bank.v1beta1.Supply(); + if (object.total) { + if (!Array.isArray(object.total)) + throw TypeError(".cosmos.bank.v1beta1.Supply.total: array expected"); + message.total = []; + for (let i = 0; i < object.total.length; ++i) { + if (typeof object.total[i] !== "object") + throw TypeError(".cosmos.bank.v1beta1.Supply.total: object expected"); + message.total[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.total[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Supply message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.bank.v1beta1.Supply + * @static + * @param {cosmos.bank.v1beta1.Supply} message Supply + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Supply.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.total = []; + if (message.total && message.total.length) { + object.total = []; + for (let j = 0; j < message.total.length; ++j) + object.total[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.total[j], options); + } + return object; + }; + + /** + * Converts this Supply to JSON. + * @function toJSON + * @memberof cosmos.bank.v1beta1.Supply + * @instance + * @returns {Object.} JSON object + */ + Supply.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Supply; + })(v1beta1.Supply || {}); + + v1beta1.DenomUnit = (function(DenomUnit) { + + /** + * Properties of a DenomUnit. + * @memberof cosmos.bank.v1beta1 + * @interface IDenomUnit + * @property {string|null} [denom] DenomUnit denom + * @property {number|null} [exponent] DenomUnit exponent + * @property {Array.|null} [aliases] DenomUnit aliases + */ + + /** + * Constructs a new DenomUnit. + * @memberof cosmos.bank.v1beta1 + * @classdesc Represents a DenomUnit. + * @implements IDenomUnit + * @constructor + * @param {cosmos.bank.v1beta1.IDenomUnit=} [properties] Properties to set + */ + function DenomUnit(properties) { + this.aliases = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DenomUnit denom. + * @member {string} denom + * @memberof cosmos.bank.v1beta1.DenomUnit + * @instance + */ + DenomUnit.prototype.denom = ""; + + /** + * DenomUnit exponent. + * @member {number} exponent + * @memberof cosmos.bank.v1beta1.DenomUnit + * @instance + */ + DenomUnit.prototype.exponent = 0; + + /** + * DenomUnit aliases. + * @member {Array.} aliases + * @memberof cosmos.bank.v1beta1.DenomUnit + * @instance + */ + DenomUnit.prototype.aliases = $util.emptyArray; + + /** + * Creates a new DenomUnit instance using the specified properties. + * @function create + * @memberof cosmos.bank.v1beta1.DenomUnit + * @static + * @param {cosmos.bank.v1beta1.IDenomUnit=} [properties] Properties to set + * @returns {cosmos.bank.v1beta1.DenomUnit} DenomUnit instance + */ + DenomUnit.create = function create(properties) { + return new DenomUnit(properties); + }; + + /** + * Encodes the specified DenomUnit message. Does not implicitly {@link cosmos.bank.v1beta1.DenomUnit.verify|verify} messages. + * @function encode + * @memberof cosmos.bank.v1beta1.DenomUnit + * @static + * @param {cosmos.bank.v1beta1.IDenomUnit} message DenomUnit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DenomUnit.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.denom != null && Object.hasOwnProperty.call(message, "denom")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.denom); + if (message.exponent != null && Object.hasOwnProperty.call(message, "exponent")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.exponent); + if (message.aliases != null && message.aliases.length) + for (let i = 0; i < message.aliases.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.aliases[i]); + return writer; + }; + + /** + * Encodes the specified DenomUnit message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.DenomUnit.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.bank.v1beta1.DenomUnit + * @static + * @param {cosmos.bank.v1beta1.IDenomUnit} message DenomUnit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DenomUnit.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DenomUnit message from the specified reader or buffer. + * @function decode + * @memberof cosmos.bank.v1beta1.DenomUnit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.bank.v1beta1.DenomUnit} DenomUnit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DenomUnit.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.bank.v1beta1.DenomUnit(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.denom = reader.string(); + break; + case 2: + message.exponent = reader.uint32(); + break; + case 3: + if (!(message.aliases && message.aliases.length)) + message.aliases = []; + message.aliases.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DenomUnit message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.bank.v1beta1.DenomUnit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.bank.v1beta1.DenomUnit} DenomUnit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DenomUnit.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DenomUnit message. + * @function verify + * @memberof cosmos.bank.v1beta1.DenomUnit + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DenomUnit.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.denom != null && message.hasOwnProperty("denom")) + if (!$util.isString(message.denom)) + return "denom: string expected"; + if (message.exponent != null && message.hasOwnProperty("exponent")) + if (!$util.isInteger(message.exponent)) + return "exponent: integer expected"; + if (message.aliases != null && message.hasOwnProperty("aliases")) { + if (!Array.isArray(message.aliases)) + return "aliases: array expected"; + for (let i = 0; i < message.aliases.length; ++i) + if (!$util.isString(message.aliases[i])) + return "aliases: string[] expected"; + } + return null; + }; + + /** + * Creates a DenomUnit message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.bank.v1beta1.DenomUnit + * @static + * @param {Object.} object Plain object + * @returns {cosmos.bank.v1beta1.DenomUnit} DenomUnit + */ + DenomUnit.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.bank.v1beta1.DenomUnit) + return object; + let message = new $root.cosmos.bank.v1beta1.DenomUnit(); + if (object.denom != null) + message.denom = String(object.denom); + if (object.exponent != null) + message.exponent = object.exponent >>> 0; + if (object.aliases) { + if (!Array.isArray(object.aliases)) + throw TypeError(".cosmos.bank.v1beta1.DenomUnit.aliases: array expected"); + message.aliases = []; + for (let i = 0; i < object.aliases.length; ++i) + message.aliases[i] = String(object.aliases[i]); + } + return message; + }; + + /** + * Creates a plain object from a DenomUnit message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.bank.v1beta1.DenomUnit + * @static + * @param {cosmos.bank.v1beta1.DenomUnit} message DenomUnit + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DenomUnit.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.aliases = []; + if (options.defaults) { + object.denom = ""; + object.exponent = 0; + } + if (message.denom != null && message.hasOwnProperty("denom")) + object.denom = message.denom; + if (message.exponent != null && message.hasOwnProperty("exponent")) + object.exponent = message.exponent; + if (message.aliases && message.aliases.length) { + object.aliases = []; + for (let j = 0; j < message.aliases.length; ++j) + object.aliases[j] = message.aliases[j]; + } + return object; + }; + + /** + * Converts this DenomUnit to JSON. + * @function toJSON + * @memberof cosmos.bank.v1beta1.DenomUnit + * @instance + * @returns {Object.} JSON object + */ + DenomUnit.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DenomUnit; + })(v1beta1.DenomUnit || {}); + + v1beta1.Metadata = (function(Metadata) { + + /** + * Properties of a Metadata. + * @memberof cosmos.bank.v1beta1 + * @interface IMetadata + * @property {string|null} [description] Metadata description + * @property {Array.|null} [denomUnits] Metadata denomUnits + * @property {string|null} [base] Metadata base + * @property {string|null} [display] Metadata display + */ + + /** + * Constructs a new Metadata. + * @memberof cosmos.bank.v1beta1 + * @classdesc Represents a Metadata. + * @implements IMetadata + * @constructor + * @param {cosmos.bank.v1beta1.IMetadata=} [properties] Properties to set + */ + function Metadata(properties) { + this.denomUnits = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Metadata description. + * @member {string} description + * @memberof cosmos.bank.v1beta1.Metadata + * @instance + */ + Metadata.prototype.description = ""; + + /** + * Metadata denomUnits. + * @member {Array.} denomUnits + * @memberof cosmos.bank.v1beta1.Metadata + * @instance + */ + Metadata.prototype.denomUnits = $util.emptyArray; + + /** + * Metadata base. + * @member {string} base + * @memberof cosmos.bank.v1beta1.Metadata + * @instance + */ + Metadata.prototype.base = ""; + + /** + * Metadata display. + * @member {string} display + * @memberof cosmos.bank.v1beta1.Metadata + * @instance + */ + Metadata.prototype.display = ""; + + /** + * Creates a new Metadata instance using the specified properties. + * @function create + * @memberof cosmos.bank.v1beta1.Metadata + * @static + * @param {cosmos.bank.v1beta1.IMetadata=} [properties] Properties to set + * @returns {cosmos.bank.v1beta1.Metadata} Metadata instance + */ + Metadata.create = function create(properties) { + return new Metadata(properties); + }; + + /** + * Encodes the specified Metadata message. Does not implicitly {@link cosmos.bank.v1beta1.Metadata.verify|verify} messages. + * @function encode + * @memberof cosmos.bank.v1beta1.Metadata + * @static + * @param {cosmos.bank.v1beta1.IMetadata} message Metadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Metadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.description); + if (message.denomUnits != null && message.denomUnits.length) + for (let i = 0; i < message.denomUnits.length; ++i) + $root.cosmos.bank.v1beta1.DenomUnit.encode(message.denomUnits[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.base != null && Object.hasOwnProperty.call(message, "base")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.base); + if (message.display != null && Object.hasOwnProperty.call(message, "display")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.display); + return writer; + }; + + /** + * Encodes the specified Metadata message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.Metadata.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.bank.v1beta1.Metadata + * @static + * @param {cosmos.bank.v1beta1.IMetadata} message Metadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Metadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Metadata message from the specified reader or buffer. + * @function decode + * @memberof cosmos.bank.v1beta1.Metadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.bank.v1beta1.Metadata} Metadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Metadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.bank.v1beta1.Metadata(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.description = reader.string(); + break; + case 2: + if (!(message.denomUnits && message.denomUnits.length)) + message.denomUnits = []; + message.denomUnits.push($root.cosmos.bank.v1beta1.DenomUnit.decode(reader, reader.uint32())); + break; + case 3: + message.base = reader.string(); + break; + case 4: + message.display = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Metadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.bank.v1beta1.Metadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.bank.v1beta1.Metadata} Metadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Metadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Metadata message. + * @function verify + * @memberof cosmos.bank.v1beta1.Metadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Metadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.denomUnits != null && message.hasOwnProperty("denomUnits")) { + if (!Array.isArray(message.denomUnits)) + return "denomUnits: array expected"; + for (let i = 0; i < message.denomUnits.length; ++i) { + let error = $root.cosmos.bank.v1beta1.DenomUnit.verify(message.denomUnits[i]); + if (error) + return "denomUnits." + error; + } + } + if (message.base != null && message.hasOwnProperty("base")) + if (!$util.isString(message.base)) + return "base: string expected"; + if (message.display != null && message.hasOwnProperty("display")) + if (!$util.isString(message.display)) + return "display: string expected"; + return null; + }; + + /** + * Creates a Metadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.bank.v1beta1.Metadata + * @static + * @param {Object.} object Plain object + * @returns {cosmos.bank.v1beta1.Metadata} Metadata + */ + Metadata.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.bank.v1beta1.Metadata) + return object; + let message = new $root.cosmos.bank.v1beta1.Metadata(); + if (object.description != null) + message.description = String(object.description); + if (object.denomUnits) { + if (!Array.isArray(object.denomUnits)) + throw TypeError(".cosmos.bank.v1beta1.Metadata.denomUnits: array expected"); + message.denomUnits = []; + for (let i = 0; i < object.denomUnits.length; ++i) { + if (typeof object.denomUnits[i] !== "object") + throw TypeError(".cosmos.bank.v1beta1.Metadata.denomUnits: object expected"); + message.denomUnits[i] = $root.cosmos.bank.v1beta1.DenomUnit.fromObject(object.denomUnits[i]); + } + } + if (object.base != null) + message.base = String(object.base); + if (object.display != null) + message.display = String(object.display); + return message; + }; + + /** + * Creates a plain object from a Metadata message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.bank.v1beta1.Metadata + * @static + * @param {cosmos.bank.v1beta1.Metadata} message Metadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Metadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.denomUnits = []; + if (options.defaults) { + object.description = ""; + object.base = ""; + object.display = ""; + } + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.denomUnits && message.denomUnits.length) { + object.denomUnits = []; + for (let j = 0; j < message.denomUnits.length; ++j) + object.denomUnits[j] = $root.cosmos.bank.v1beta1.DenomUnit.toObject(message.denomUnits[j], options); + } + if (message.base != null && message.hasOwnProperty("base")) + object.base = message.base; + if (message.display != null && message.hasOwnProperty("display")) + object.display = message.display; + return object; + }; + + /** + * Converts this Metadata to JSON. + * @function toJSON + * @memberof cosmos.bank.v1beta1.Metadata + * @instance + * @returns {Object.} JSON object + */ + Metadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Metadata; + })(v1beta1.Metadata || {}); + + v1beta1.GenesisState = (function(GenesisState) { + + /** + * Properties of a GenesisState. + * @memberof cosmos.bank.v1beta1 + * @interface IGenesisState + * @property {cosmos.bank.v1beta1.IParams|null} [params] GenesisState params + * @property {Array.|null} [balances] GenesisState balances + * @property {Array.|null} [supply] GenesisState supply + * @property {Array.|null} [denomMetadata] GenesisState denomMetadata + */ + + /** + * Constructs a new GenesisState. + * @memberof cosmos.bank.v1beta1 + * @classdesc Represents a GenesisState. + * @implements IGenesisState + * @constructor + * @param {cosmos.bank.v1beta1.IGenesisState=} [properties] Properties to set + */ + function GenesisState(properties) { + this.balances = []; + this.supply = []; + this.denomMetadata = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GenesisState params. + * @member {cosmos.bank.v1beta1.IParams|null|undefined} params + * @memberof cosmos.bank.v1beta1.GenesisState + * @instance + */ + GenesisState.prototype.params = null; + + /** + * GenesisState balances. + * @member {Array.} balances + * @memberof cosmos.bank.v1beta1.GenesisState + * @instance + */ + GenesisState.prototype.balances = $util.emptyArray; + + /** + * GenesisState supply. + * @member {Array.} supply + * @memberof cosmos.bank.v1beta1.GenesisState + * @instance + */ + GenesisState.prototype.supply = $util.emptyArray; + + /** + * GenesisState denomMetadata. + * @member {Array.} denomMetadata + * @memberof cosmos.bank.v1beta1.GenesisState + * @instance + */ + GenesisState.prototype.denomMetadata = $util.emptyArray; + + /** + * Creates a new GenesisState instance using the specified properties. + * @function create + * @memberof cosmos.bank.v1beta1.GenesisState + * @static + * @param {cosmos.bank.v1beta1.IGenesisState=} [properties] Properties to set + * @returns {cosmos.bank.v1beta1.GenesisState} GenesisState instance + */ + GenesisState.create = function create(properties) { + return new GenesisState(properties); + }; + + /** + * Encodes the specified GenesisState message. Does not implicitly {@link cosmos.bank.v1beta1.GenesisState.verify|verify} messages. + * @function encode + * @memberof cosmos.bank.v1beta1.GenesisState + * @static + * @param {cosmos.bank.v1beta1.IGenesisState} message GenesisState message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenesisState.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.params != null && Object.hasOwnProperty.call(message, "params")) + $root.cosmos.bank.v1beta1.Params.encode(message.params, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.balances != null && message.balances.length) + for (let i = 0; i < message.balances.length; ++i) + $root.cosmos.bank.v1beta1.Balance.encode(message.balances[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.supply != null && message.supply.length) + for (let i = 0; i < message.supply.length; ++i) + $root.cosmos.base.v1beta1.Coin.encode(message.supply[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.denomMetadata != null && message.denomMetadata.length) + for (let i = 0; i < message.denomMetadata.length; ++i) + $root.cosmos.bank.v1beta1.Metadata.encode(message.denomMetadata[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GenesisState message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.GenesisState.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.bank.v1beta1.GenesisState + * @static + * @param {cosmos.bank.v1beta1.IGenesisState} message GenesisState message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenesisState.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GenesisState message from the specified reader or buffer. + * @function decode + * @memberof cosmos.bank.v1beta1.GenesisState + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.bank.v1beta1.GenesisState} GenesisState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenesisState.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.bank.v1beta1.GenesisState(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.params = $root.cosmos.bank.v1beta1.Params.decode(reader, reader.uint32()); + break; + case 2: + if (!(message.balances && message.balances.length)) + message.balances = []; + message.balances.push($root.cosmos.bank.v1beta1.Balance.decode(reader, reader.uint32())); + break; + case 3: + if (!(message.supply && message.supply.length)) + message.supply = []; + message.supply.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); + break; + case 4: + if (!(message.denomMetadata && message.denomMetadata.length)) + message.denomMetadata = []; + message.denomMetadata.push($root.cosmos.bank.v1beta1.Metadata.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GenesisState message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.bank.v1beta1.GenesisState + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.bank.v1beta1.GenesisState} GenesisState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenesisState.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GenesisState message. + * @function verify + * @memberof cosmos.bank.v1beta1.GenesisState + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GenesisState.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.params != null && message.hasOwnProperty("params")) { + let error = $root.cosmos.bank.v1beta1.Params.verify(message.params); + if (error) + return "params." + error; + } + if (message.balances != null && message.hasOwnProperty("balances")) { + if (!Array.isArray(message.balances)) + return "balances: array expected"; + for (let i = 0; i < message.balances.length; ++i) { + let error = $root.cosmos.bank.v1beta1.Balance.verify(message.balances[i]); + if (error) + return "balances." + error; + } + } + if (message.supply != null && message.hasOwnProperty("supply")) { + if (!Array.isArray(message.supply)) + return "supply: array expected"; + for (let i = 0; i < message.supply.length; ++i) { + let error = $root.cosmos.base.v1beta1.Coin.verify(message.supply[i]); + if (error) + return "supply." + error; + } + } + if (message.denomMetadata != null && message.hasOwnProperty("denomMetadata")) { + if (!Array.isArray(message.denomMetadata)) + return "denomMetadata: array expected"; + for (let i = 0; i < message.denomMetadata.length; ++i) { + let error = $root.cosmos.bank.v1beta1.Metadata.verify(message.denomMetadata[i]); + if (error) + return "denomMetadata." + error; + } + } + return null; + }; + + /** + * Creates a GenesisState message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.bank.v1beta1.GenesisState + * @static + * @param {Object.} object Plain object + * @returns {cosmos.bank.v1beta1.GenesisState} GenesisState + */ + GenesisState.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.bank.v1beta1.GenesisState) + return object; + let message = new $root.cosmos.bank.v1beta1.GenesisState(); + if (object.params != null) { + if (typeof object.params !== "object") + throw TypeError(".cosmos.bank.v1beta1.GenesisState.params: object expected"); + message.params = $root.cosmos.bank.v1beta1.Params.fromObject(object.params); + } + if (object.balances) { + if (!Array.isArray(object.balances)) + throw TypeError(".cosmos.bank.v1beta1.GenesisState.balances: array expected"); + message.balances = []; + for (let i = 0; i < object.balances.length; ++i) { + if (typeof object.balances[i] !== "object") + throw TypeError(".cosmos.bank.v1beta1.GenesisState.balances: object expected"); + message.balances[i] = $root.cosmos.bank.v1beta1.Balance.fromObject(object.balances[i]); + } + } + if (object.supply) { + if (!Array.isArray(object.supply)) + throw TypeError(".cosmos.bank.v1beta1.GenesisState.supply: array expected"); + message.supply = []; + for (let i = 0; i < object.supply.length; ++i) { + if (typeof object.supply[i] !== "object") + throw TypeError(".cosmos.bank.v1beta1.GenesisState.supply: object expected"); + message.supply[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.supply[i]); + } + } + if (object.denomMetadata) { + if (!Array.isArray(object.denomMetadata)) + throw TypeError(".cosmos.bank.v1beta1.GenesisState.denomMetadata: array expected"); + message.denomMetadata = []; + for (let i = 0; i < object.denomMetadata.length; ++i) { + if (typeof object.denomMetadata[i] !== "object") + throw TypeError(".cosmos.bank.v1beta1.GenesisState.denomMetadata: object expected"); + message.denomMetadata[i] = $root.cosmos.bank.v1beta1.Metadata.fromObject(object.denomMetadata[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a GenesisState message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.bank.v1beta1.GenesisState + * @static + * @param {cosmos.bank.v1beta1.GenesisState} message GenesisState + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GenesisState.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) { + object.balances = []; + object.supply = []; + object.denomMetadata = []; + } + if (options.defaults) + object.params = null; + if (message.params != null && message.hasOwnProperty("params")) + object.params = $root.cosmos.bank.v1beta1.Params.toObject(message.params, options); + if (message.balances && message.balances.length) { + object.balances = []; + for (let j = 0; j < message.balances.length; ++j) + object.balances[j] = $root.cosmos.bank.v1beta1.Balance.toObject(message.balances[j], options); + } + if (message.supply && message.supply.length) { + object.supply = []; + for (let j = 0; j < message.supply.length; ++j) + object.supply[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.supply[j], options); + } + if (message.denomMetadata && message.denomMetadata.length) { + object.denomMetadata = []; + for (let j = 0; j < message.denomMetadata.length; ++j) + object.denomMetadata[j] = $root.cosmos.bank.v1beta1.Metadata.toObject(message.denomMetadata[j], options); + } + return object; + }; + + /** + * Converts this GenesisState to JSON. + * @function toJSON + * @memberof cosmos.bank.v1beta1.GenesisState + * @instance + * @returns {Object.} JSON object + */ + GenesisState.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GenesisState; + })(v1beta1.GenesisState || {}); + + v1beta1.Balance = (function(Balance) { + + /** + * Properties of a Balance. + * @memberof cosmos.bank.v1beta1 + * @interface IBalance + * @property {string|null} [address] Balance address + * @property {Array.|null} [coins] Balance coins + */ + + /** + * Constructs a new Balance. + * @memberof cosmos.bank.v1beta1 + * @classdesc Represents a Balance. + * @implements IBalance + * @constructor + * @param {cosmos.bank.v1beta1.IBalance=} [properties] Properties to set + */ + function Balance(properties) { + this.coins = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Balance address. + * @member {string} address + * @memberof cosmos.bank.v1beta1.Balance + * @instance + */ + Balance.prototype.address = ""; + + /** + * Balance coins. + * @member {Array.} coins + * @memberof cosmos.bank.v1beta1.Balance + * @instance + */ + Balance.prototype.coins = $util.emptyArray; + + /** + * Creates a new Balance instance using the specified properties. + * @function create + * @memberof cosmos.bank.v1beta1.Balance + * @static + * @param {cosmos.bank.v1beta1.IBalance=} [properties] Properties to set + * @returns {cosmos.bank.v1beta1.Balance} Balance instance + */ + Balance.create = function create(properties) { + return new Balance(properties); + }; + + /** + * Encodes the specified Balance message. Does not implicitly {@link cosmos.bank.v1beta1.Balance.verify|verify} messages. + * @function encode + * @memberof cosmos.bank.v1beta1.Balance + * @static + * @param {cosmos.bank.v1beta1.IBalance} message Balance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Balance.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.address != null && Object.hasOwnProperty.call(message, "address")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.address); + if (message.coins != null && message.coins.length) + for (let i = 0; i < message.coins.length; ++i) + $root.cosmos.base.v1beta1.Coin.encode(message.coins[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Balance message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.Balance.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.bank.v1beta1.Balance + * @static + * @param {cosmos.bank.v1beta1.IBalance} message Balance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Balance.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Balance message from the specified reader or buffer. + * @function decode + * @memberof cosmos.bank.v1beta1.Balance + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.bank.v1beta1.Balance} Balance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Balance.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.bank.v1beta1.Balance(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.address = reader.string(); + break; + case 2: + if (!(message.coins && message.coins.length)) + message.coins = []; + message.coins.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Balance message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.bank.v1beta1.Balance + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.bank.v1beta1.Balance} Balance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Balance.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Balance message. + * @function verify + * @memberof cosmos.bank.v1beta1.Balance + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Balance.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.address != null && message.hasOwnProperty("address")) + if (!$util.isString(message.address)) + return "address: string expected"; + if (message.coins != null && message.hasOwnProperty("coins")) { + if (!Array.isArray(message.coins)) + return "coins: array expected"; + for (let i = 0; i < message.coins.length; ++i) { + let error = $root.cosmos.base.v1beta1.Coin.verify(message.coins[i]); + if (error) + return "coins." + error; + } + } + return null; + }; + + /** + * Creates a Balance message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.bank.v1beta1.Balance + * @static + * @param {Object.} object Plain object + * @returns {cosmos.bank.v1beta1.Balance} Balance + */ + Balance.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.bank.v1beta1.Balance) + return object; + let message = new $root.cosmos.bank.v1beta1.Balance(); + if (object.address != null) + message.address = String(object.address); + if (object.coins) { + if (!Array.isArray(object.coins)) + throw TypeError(".cosmos.bank.v1beta1.Balance.coins: array expected"); + message.coins = []; + for (let i = 0; i < object.coins.length; ++i) { + if (typeof object.coins[i] !== "object") + throw TypeError(".cosmos.bank.v1beta1.Balance.coins: object expected"); + message.coins[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.coins[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Balance message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.bank.v1beta1.Balance + * @static + * @param {cosmos.bank.v1beta1.Balance} message Balance + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Balance.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.coins = []; + if (options.defaults) + object.address = ""; + if (message.address != null && message.hasOwnProperty("address")) + object.address = message.address; + if (message.coins && message.coins.length) { + object.coins = []; + for (let j = 0; j < message.coins.length; ++j) + object.coins[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.coins[j], options); + } + return object; + }; + + /** + * Converts this Balance to JSON. + * @function toJSON + * @memberof cosmos.bank.v1beta1.Balance + * @instance + * @returns {Object.} JSON object + */ + Balance.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Balance; + })(v1beta1.Balance || {}); + + v1beta1.Query = (function(Query) { + + /** + * Constructs a new Query service. + * @memberof cosmos.bank.v1beta1 + * @classdesc Represents a Query + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Query(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Query.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Query; + + /** + * Creates new Query service using the specified rpc implementation. + * @function create + * @memberof cosmos.bank.v1beta1.Query + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Query} RPC service. Useful where requests and/or responses are streamed. + */ + Query.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link cosmos.bank.v1beta1.Query#balance}. + * @memberof cosmos.bank.v1beta1.Query + * @typedef BalanceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.bank.v1beta1.IQueryBalanceResponse} [response] QueryBalanceResponse + */ + + /** + * Calls Balance. + * @function balance + * @memberof cosmos.bank.v1beta1.Query + * @instance + * @param {cosmos.bank.v1beta1.IQueryBalanceRequest} request QueryBalanceRequest message or plain object + * @param {cosmos.bank.v1beta1.Query.BalanceCallback} callback Node-style callback called with the error, if any, and QueryBalanceResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.balance = function balance(request, callback) { + return this.rpcCall(balance, $root.cosmos.bank.v1beta1.QueryBalanceRequest, $root.cosmos.bank.v1beta1.QueryBalanceResponse, request, callback); + }, "name", { value: "Balance" }); + + /** + * Calls Balance. + * @function balance + * @memberof cosmos.bank.v1beta1.Query + * @instance + * @param {cosmos.bank.v1beta1.IQueryBalanceRequest} request QueryBalanceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link cosmos.bank.v1beta1.Query#allBalances}. + * @memberof cosmos.bank.v1beta1.Query + * @typedef AllBalancesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.bank.v1beta1.IQueryAllBalancesResponse} [response] QueryAllBalancesResponse + */ + + /** + * Calls AllBalances. + * @function allBalances + * @memberof cosmos.bank.v1beta1.Query + * @instance + * @param {cosmos.bank.v1beta1.IQueryAllBalancesRequest} request QueryAllBalancesRequest message or plain object + * @param {cosmos.bank.v1beta1.Query.AllBalancesCallback} callback Node-style callback called with the error, if any, and QueryAllBalancesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.allBalances = function allBalances(request, callback) { + return this.rpcCall(allBalances, $root.cosmos.bank.v1beta1.QueryAllBalancesRequest, $root.cosmos.bank.v1beta1.QueryAllBalancesResponse, request, callback); + }, "name", { value: "AllBalances" }); + + /** + * Calls AllBalances. + * @function allBalances + * @memberof cosmos.bank.v1beta1.Query + * @instance + * @param {cosmos.bank.v1beta1.IQueryAllBalancesRequest} request QueryAllBalancesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link cosmos.bank.v1beta1.Query#totalSupply}. + * @memberof cosmos.bank.v1beta1.Query + * @typedef TotalSupplyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.bank.v1beta1.IQueryTotalSupplyResponse} [response] QueryTotalSupplyResponse + */ + + /** + * Calls TotalSupply. + * @function totalSupply + * @memberof cosmos.bank.v1beta1.Query + * @instance + * @param {cosmos.bank.v1beta1.IQueryTotalSupplyRequest} request QueryTotalSupplyRequest message or plain object + * @param {cosmos.bank.v1beta1.Query.TotalSupplyCallback} callback Node-style callback called with the error, if any, and QueryTotalSupplyResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.totalSupply = function totalSupply(request, callback) { + return this.rpcCall(totalSupply, $root.cosmos.bank.v1beta1.QueryTotalSupplyRequest, $root.cosmos.bank.v1beta1.QueryTotalSupplyResponse, request, callback); + }, "name", { value: "TotalSupply" }); + + /** + * Calls TotalSupply. + * @function totalSupply + * @memberof cosmos.bank.v1beta1.Query + * @instance + * @param {cosmos.bank.v1beta1.IQueryTotalSupplyRequest} request QueryTotalSupplyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link cosmos.bank.v1beta1.Query#supplyOf}. + * @memberof cosmos.bank.v1beta1.Query + * @typedef SupplyOfCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.bank.v1beta1.IQuerySupplyOfResponse} [response] QuerySupplyOfResponse + */ + + /** + * Calls SupplyOf. + * @function supplyOf + * @memberof cosmos.bank.v1beta1.Query + * @instance + * @param {cosmos.bank.v1beta1.IQuerySupplyOfRequest} request QuerySupplyOfRequest message or plain object + * @param {cosmos.bank.v1beta1.Query.SupplyOfCallback} callback Node-style callback called with the error, if any, and QuerySupplyOfResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.supplyOf = function supplyOf(request, callback) { + return this.rpcCall(supplyOf, $root.cosmos.bank.v1beta1.QuerySupplyOfRequest, $root.cosmos.bank.v1beta1.QuerySupplyOfResponse, request, callback); + }, "name", { value: "SupplyOf" }); + + /** + * Calls SupplyOf. + * @function supplyOf + * @memberof cosmos.bank.v1beta1.Query + * @instance + * @param {cosmos.bank.v1beta1.IQuerySupplyOfRequest} request QuerySupplyOfRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link cosmos.bank.v1beta1.Query#params}. + * @memberof cosmos.bank.v1beta1.Query + * @typedef ParamsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.bank.v1beta1.IQueryParamsResponse} [response] QueryParamsResponse + */ + + /** + * Calls Params. + * @function params + * @memberof cosmos.bank.v1beta1.Query + * @instance + * @param {cosmos.bank.v1beta1.IQueryParamsRequest} request QueryParamsRequest message or plain object + * @param {cosmos.bank.v1beta1.Query.ParamsCallback} callback Node-style callback called with the error, if any, and QueryParamsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.params = function params(request, callback) { + return this.rpcCall(params, $root.cosmos.bank.v1beta1.QueryParamsRequest, $root.cosmos.bank.v1beta1.QueryParamsResponse, request, callback); + }, "name", { value: "Params" }); + + /** + * Calls Params. + * @function params + * @memberof cosmos.bank.v1beta1.Query + * @instance + * @param {cosmos.bank.v1beta1.IQueryParamsRequest} request QueryParamsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link cosmos.bank.v1beta1.Query#denomMetadata}. + * @memberof cosmos.bank.v1beta1.Query + * @typedef DenomMetadataCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.bank.v1beta1.IQueryDenomMetadataResponse} [response] QueryDenomMetadataResponse + */ + + /** + * Calls DenomMetadata. + * @function denomMetadata + * @memberof cosmos.bank.v1beta1.Query + * @instance + * @param {cosmos.bank.v1beta1.IQueryDenomMetadataRequest} request QueryDenomMetadataRequest message or plain object + * @param {cosmos.bank.v1beta1.Query.DenomMetadataCallback} callback Node-style callback called with the error, if any, and QueryDenomMetadataResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.denomMetadata = function denomMetadata(request, callback) { + return this.rpcCall(denomMetadata, $root.cosmos.bank.v1beta1.QueryDenomMetadataRequest, $root.cosmos.bank.v1beta1.QueryDenomMetadataResponse, request, callback); + }, "name", { value: "DenomMetadata" }); + + /** + * Calls DenomMetadata. + * @function denomMetadata + * @memberof cosmos.bank.v1beta1.Query + * @instance + * @param {cosmos.bank.v1beta1.IQueryDenomMetadataRequest} request QueryDenomMetadataRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link cosmos.bank.v1beta1.Query#denomsMetadata}. + * @memberof cosmos.bank.v1beta1.Query + * @typedef DenomsMetadataCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.bank.v1beta1.IQueryDenomsMetadataResponse} [response] QueryDenomsMetadataResponse + */ + + /** + * Calls DenomsMetadata. + * @function denomsMetadata + * @memberof cosmos.bank.v1beta1.Query + * @instance + * @param {cosmos.bank.v1beta1.IQueryDenomsMetadataRequest} request QueryDenomsMetadataRequest message or plain object + * @param {cosmos.bank.v1beta1.Query.DenomsMetadataCallback} callback Node-style callback called with the error, if any, and QueryDenomsMetadataResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.denomsMetadata = function denomsMetadata(request, callback) { + return this.rpcCall(denomsMetadata, $root.cosmos.bank.v1beta1.QueryDenomsMetadataRequest, $root.cosmos.bank.v1beta1.QueryDenomsMetadataResponse, request, callback); + }, "name", { value: "DenomsMetadata" }); + + /** + * Calls DenomsMetadata. + * @function denomsMetadata + * @memberof cosmos.bank.v1beta1.Query + * @instance + * @param {cosmos.bank.v1beta1.IQueryDenomsMetadataRequest} request QueryDenomsMetadataRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Query; + })(v1beta1.Query || {}); + + v1beta1.QueryBalanceRequest = (function(QueryBalanceRequest) { + + /** + * Properties of a QueryBalanceRequest. + * @memberof cosmos.bank.v1beta1 + * @interface IQueryBalanceRequest + * @property {string|null} [address] QueryBalanceRequest address + * @property {string|null} [denom] QueryBalanceRequest denom + */ + + /** + * Constructs a new QueryBalanceRequest. + * @memberof cosmos.bank.v1beta1 + * @classdesc Represents a QueryBalanceRequest. + * @implements IQueryBalanceRequest + * @constructor + * @param {cosmos.bank.v1beta1.IQueryBalanceRequest=} [properties] Properties to set + */ + function QueryBalanceRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryBalanceRequest address. + * @member {string} address + * @memberof cosmos.bank.v1beta1.QueryBalanceRequest + * @instance + */ + QueryBalanceRequest.prototype.address = ""; + + /** + * QueryBalanceRequest denom. + * @member {string} denom + * @memberof cosmos.bank.v1beta1.QueryBalanceRequest + * @instance + */ + QueryBalanceRequest.prototype.denom = ""; + + /** + * Creates a new QueryBalanceRequest instance using the specified properties. + * @function create + * @memberof cosmos.bank.v1beta1.QueryBalanceRequest + * @static + * @param {cosmos.bank.v1beta1.IQueryBalanceRequest=} [properties] Properties to set + * @returns {cosmos.bank.v1beta1.QueryBalanceRequest} QueryBalanceRequest instance + */ + QueryBalanceRequest.create = function create(properties) { + return new QueryBalanceRequest(properties); + }; + + /** + * Encodes the specified QueryBalanceRequest message. Does not implicitly {@link cosmos.bank.v1beta1.QueryBalanceRequest.verify|verify} messages. + * @function encode + * @memberof cosmos.bank.v1beta1.QueryBalanceRequest + * @static + * @param {cosmos.bank.v1beta1.IQueryBalanceRequest} message QueryBalanceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryBalanceRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.address != null && Object.hasOwnProperty.call(message, "address")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.address); + if (message.denom != null && Object.hasOwnProperty.call(message, "denom")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.denom); + return writer; + }; + + /** + * Encodes the specified QueryBalanceRequest message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.QueryBalanceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.bank.v1beta1.QueryBalanceRequest + * @static + * @param {cosmos.bank.v1beta1.IQueryBalanceRequest} message QueryBalanceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryBalanceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryBalanceRequest message from the specified reader or buffer. + * @function decode + * @memberof cosmos.bank.v1beta1.QueryBalanceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.bank.v1beta1.QueryBalanceRequest} QueryBalanceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryBalanceRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.bank.v1beta1.QueryBalanceRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.address = reader.string(); + break; + case 2: + message.denom = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryBalanceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.bank.v1beta1.QueryBalanceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.bank.v1beta1.QueryBalanceRequest} QueryBalanceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryBalanceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryBalanceRequest message. + * @function verify + * @memberof cosmos.bank.v1beta1.QueryBalanceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryBalanceRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.address != null && message.hasOwnProperty("address")) + if (!$util.isString(message.address)) + return "address: string expected"; + if (message.denom != null && message.hasOwnProperty("denom")) + if (!$util.isString(message.denom)) + return "denom: string expected"; + return null; + }; + + /** + * Creates a QueryBalanceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.bank.v1beta1.QueryBalanceRequest + * @static + * @param {Object.} object Plain object + * @returns {cosmos.bank.v1beta1.QueryBalanceRequest} QueryBalanceRequest + */ + QueryBalanceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.bank.v1beta1.QueryBalanceRequest) + return object; + let message = new $root.cosmos.bank.v1beta1.QueryBalanceRequest(); + if (object.address != null) + message.address = String(object.address); + if (object.denom != null) + message.denom = String(object.denom); + return message; + }; + + /** + * Creates a plain object from a QueryBalanceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.bank.v1beta1.QueryBalanceRequest + * @static + * @param {cosmos.bank.v1beta1.QueryBalanceRequest} message QueryBalanceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryBalanceRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.address = ""; + object.denom = ""; + } + if (message.address != null && message.hasOwnProperty("address")) + object.address = message.address; + if (message.denom != null && message.hasOwnProperty("denom")) + object.denom = message.denom; + return object; + }; + + /** + * Converts this QueryBalanceRequest to JSON. + * @function toJSON + * @memberof cosmos.bank.v1beta1.QueryBalanceRequest + * @instance + * @returns {Object.} JSON object + */ + QueryBalanceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryBalanceRequest; + })(v1beta1.QueryBalanceRequest || {}); + + v1beta1.QueryBalanceResponse = (function(QueryBalanceResponse) { + + /** + * Properties of a QueryBalanceResponse. + * @memberof cosmos.bank.v1beta1 + * @interface IQueryBalanceResponse + * @property {cosmos.base.v1beta1.ICoin|null} [balance] QueryBalanceResponse balance + */ + + /** + * Constructs a new QueryBalanceResponse. + * @memberof cosmos.bank.v1beta1 + * @classdesc Represents a QueryBalanceResponse. + * @implements IQueryBalanceResponse + * @constructor + * @param {cosmos.bank.v1beta1.IQueryBalanceResponse=} [properties] Properties to set + */ + function QueryBalanceResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryBalanceResponse balance. + * @member {cosmos.base.v1beta1.ICoin|null|undefined} balance + * @memberof cosmos.bank.v1beta1.QueryBalanceResponse + * @instance + */ + QueryBalanceResponse.prototype.balance = null; + + /** + * Creates a new QueryBalanceResponse instance using the specified properties. + * @function create + * @memberof cosmos.bank.v1beta1.QueryBalanceResponse + * @static + * @param {cosmos.bank.v1beta1.IQueryBalanceResponse=} [properties] Properties to set + * @returns {cosmos.bank.v1beta1.QueryBalanceResponse} QueryBalanceResponse instance + */ + QueryBalanceResponse.create = function create(properties) { + return new QueryBalanceResponse(properties); + }; + + /** + * Encodes the specified QueryBalanceResponse message. Does not implicitly {@link cosmos.bank.v1beta1.QueryBalanceResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.bank.v1beta1.QueryBalanceResponse + * @static + * @param {cosmos.bank.v1beta1.IQueryBalanceResponse} message QueryBalanceResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryBalanceResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.balance != null && Object.hasOwnProperty.call(message, "balance")) + $root.cosmos.base.v1beta1.Coin.encode(message.balance, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryBalanceResponse message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.QueryBalanceResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.bank.v1beta1.QueryBalanceResponse + * @static + * @param {cosmos.bank.v1beta1.IQueryBalanceResponse} message QueryBalanceResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryBalanceResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryBalanceResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.bank.v1beta1.QueryBalanceResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.bank.v1beta1.QueryBalanceResponse} QueryBalanceResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryBalanceResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.bank.v1beta1.QueryBalanceResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.balance = $root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryBalanceResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.bank.v1beta1.QueryBalanceResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.bank.v1beta1.QueryBalanceResponse} QueryBalanceResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryBalanceResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryBalanceResponse message. + * @function verify + * @memberof cosmos.bank.v1beta1.QueryBalanceResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryBalanceResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.balance != null && message.hasOwnProperty("balance")) { + let error = $root.cosmos.base.v1beta1.Coin.verify(message.balance); + if (error) + return "balance." + error; + } + return null; + }; + + /** + * Creates a QueryBalanceResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.bank.v1beta1.QueryBalanceResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.bank.v1beta1.QueryBalanceResponse} QueryBalanceResponse + */ + QueryBalanceResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.bank.v1beta1.QueryBalanceResponse) + return object; + let message = new $root.cosmos.bank.v1beta1.QueryBalanceResponse(); + if (object.balance != null) { + if (typeof object.balance !== "object") + throw TypeError(".cosmos.bank.v1beta1.QueryBalanceResponse.balance: object expected"); + message.balance = $root.cosmos.base.v1beta1.Coin.fromObject(object.balance); + } + return message; + }; + + /** + * Creates a plain object from a QueryBalanceResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.bank.v1beta1.QueryBalanceResponse + * @static + * @param {cosmos.bank.v1beta1.QueryBalanceResponse} message QueryBalanceResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryBalanceResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.balance = null; + if (message.balance != null && message.hasOwnProperty("balance")) + object.balance = $root.cosmos.base.v1beta1.Coin.toObject(message.balance, options); + return object; + }; + + /** + * Converts this QueryBalanceResponse to JSON. + * @function toJSON + * @memberof cosmos.bank.v1beta1.QueryBalanceResponse + * @instance + * @returns {Object.} JSON object + */ + QueryBalanceResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryBalanceResponse; + })(v1beta1.QueryBalanceResponse || {}); + + v1beta1.QueryAllBalancesRequest = (function(QueryAllBalancesRequest) { + + /** + * Properties of a QueryAllBalancesRequest. + * @memberof cosmos.bank.v1beta1 + * @interface IQueryAllBalancesRequest + * @property {string|null} [address] QueryAllBalancesRequest address + * @property {cosmos.base.query.v1beta1.IPageRequest|null} [pagination] QueryAllBalancesRequest pagination + */ + + /** + * Constructs a new QueryAllBalancesRequest. + * @memberof cosmos.bank.v1beta1 + * @classdesc Represents a QueryAllBalancesRequest. + * @implements IQueryAllBalancesRequest + * @constructor + * @param {cosmos.bank.v1beta1.IQueryAllBalancesRequest=} [properties] Properties to set + */ + function QueryAllBalancesRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryAllBalancesRequest address. + * @member {string} address + * @memberof cosmos.bank.v1beta1.QueryAllBalancesRequest + * @instance + */ + QueryAllBalancesRequest.prototype.address = ""; + + /** + * QueryAllBalancesRequest pagination. + * @member {cosmos.base.query.v1beta1.IPageRequest|null|undefined} pagination + * @memberof cosmos.bank.v1beta1.QueryAllBalancesRequest + * @instance + */ + QueryAllBalancesRequest.prototype.pagination = null; + + /** + * Creates a new QueryAllBalancesRequest instance using the specified properties. + * @function create + * @memberof cosmos.bank.v1beta1.QueryAllBalancesRequest + * @static + * @param {cosmos.bank.v1beta1.IQueryAllBalancesRequest=} [properties] Properties to set + * @returns {cosmos.bank.v1beta1.QueryAllBalancesRequest} QueryAllBalancesRequest instance + */ + QueryAllBalancesRequest.create = function create(properties) { + return new QueryAllBalancesRequest(properties); + }; + + /** + * Encodes the specified QueryAllBalancesRequest message. Does not implicitly {@link cosmos.bank.v1beta1.QueryAllBalancesRequest.verify|verify} messages. + * @function encode + * @memberof cosmos.bank.v1beta1.QueryAllBalancesRequest + * @static + * @param {cosmos.bank.v1beta1.IQueryAllBalancesRequest} message QueryAllBalancesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryAllBalancesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.address != null && Object.hasOwnProperty.call(message, "address")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.address); + if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) + $root.cosmos.base.query.v1beta1.PageRequest.encode(message.pagination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryAllBalancesRequest message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.QueryAllBalancesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.bank.v1beta1.QueryAllBalancesRequest + * @static + * @param {cosmos.bank.v1beta1.IQueryAllBalancesRequest} message QueryAllBalancesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryAllBalancesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryAllBalancesRequest message from the specified reader or buffer. + * @function decode + * @memberof cosmos.bank.v1beta1.QueryAllBalancesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.bank.v1beta1.QueryAllBalancesRequest} QueryAllBalancesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryAllBalancesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.bank.v1beta1.QueryAllBalancesRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.address = reader.string(); + break; + case 2: + message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryAllBalancesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.bank.v1beta1.QueryAllBalancesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.bank.v1beta1.QueryAllBalancesRequest} QueryAllBalancesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryAllBalancesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryAllBalancesRequest message. + * @function verify + * @memberof cosmos.bank.v1beta1.QueryAllBalancesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryAllBalancesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.address != null && message.hasOwnProperty("address")) + if (!$util.isString(message.address)) + return "address: string expected"; + if (message.pagination != null && message.hasOwnProperty("pagination")) { + let error = $root.cosmos.base.query.v1beta1.PageRequest.verify(message.pagination); + if (error) + return "pagination." + error; + } + return null; + }; + + /** + * Creates a QueryAllBalancesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.bank.v1beta1.QueryAllBalancesRequest + * @static + * @param {Object.} object Plain object + * @returns {cosmos.bank.v1beta1.QueryAllBalancesRequest} QueryAllBalancesRequest + */ + QueryAllBalancesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.bank.v1beta1.QueryAllBalancesRequest) + return object; + let message = new $root.cosmos.bank.v1beta1.QueryAllBalancesRequest(); + if (object.address != null) + message.address = String(object.address); + if (object.pagination != null) { + if (typeof object.pagination !== "object") + throw TypeError(".cosmos.bank.v1beta1.QueryAllBalancesRequest.pagination: object expected"); + message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.fromObject(object.pagination); + } + return message; + }; + + /** + * Creates a plain object from a QueryAllBalancesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.bank.v1beta1.QueryAllBalancesRequest + * @static + * @param {cosmos.bank.v1beta1.QueryAllBalancesRequest} message QueryAllBalancesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryAllBalancesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.address = ""; + object.pagination = null; + } + if (message.address != null && message.hasOwnProperty("address")) + object.address = message.address; + if (message.pagination != null && message.hasOwnProperty("pagination")) + object.pagination = $root.cosmos.base.query.v1beta1.PageRequest.toObject(message.pagination, options); + return object; + }; + + /** + * Converts this QueryAllBalancesRequest to JSON. + * @function toJSON + * @memberof cosmos.bank.v1beta1.QueryAllBalancesRequest + * @instance + * @returns {Object.} JSON object + */ + QueryAllBalancesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryAllBalancesRequest; + })(v1beta1.QueryAllBalancesRequest || {}); + + v1beta1.QueryAllBalancesResponse = (function(QueryAllBalancesResponse) { + + /** + * Properties of a QueryAllBalancesResponse. + * @memberof cosmos.bank.v1beta1 + * @interface IQueryAllBalancesResponse + * @property {Array.|null} [balances] QueryAllBalancesResponse balances + * @property {cosmos.base.query.v1beta1.IPageResponse|null} [pagination] QueryAllBalancesResponse pagination + */ + + /** + * Constructs a new QueryAllBalancesResponse. + * @memberof cosmos.bank.v1beta1 + * @classdesc Represents a QueryAllBalancesResponse. + * @implements IQueryAllBalancesResponse + * @constructor + * @param {cosmos.bank.v1beta1.IQueryAllBalancesResponse=} [properties] Properties to set + */ + function QueryAllBalancesResponse(properties) { + this.balances = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryAllBalancesResponse balances. + * @member {Array.} balances + * @memberof cosmos.bank.v1beta1.QueryAllBalancesResponse + * @instance + */ + QueryAllBalancesResponse.prototype.balances = $util.emptyArray; + + /** + * QueryAllBalancesResponse pagination. + * @member {cosmos.base.query.v1beta1.IPageResponse|null|undefined} pagination + * @memberof cosmos.bank.v1beta1.QueryAllBalancesResponse + * @instance + */ + QueryAllBalancesResponse.prototype.pagination = null; + + /** + * Creates a new QueryAllBalancesResponse instance using the specified properties. + * @function create + * @memberof cosmos.bank.v1beta1.QueryAllBalancesResponse + * @static + * @param {cosmos.bank.v1beta1.IQueryAllBalancesResponse=} [properties] Properties to set + * @returns {cosmos.bank.v1beta1.QueryAllBalancesResponse} QueryAllBalancesResponse instance + */ + QueryAllBalancesResponse.create = function create(properties) { + return new QueryAllBalancesResponse(properties); + }; + + /** + * Encodes the specified QueryAllBalancesResponse message. Does not implicitly {@link cosmos.bank.v1beta1.QueryAllBalancesResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.bank.v1beta1.QueryAllBalancesResponse + * @static + * @param {cosmos.bank.v1beta1.IQueryAllBalancesResponse} message QueryAllBalancesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryAllBalancesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.balances != null && message.balances.length) + for (let i = 0; i < message.balances.length; ++i) + $root.cosmos.base.v1beta1.Coin.encode(message.balances[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) + $root.cosmos.base.query.v1beta1.PageResponse.encode(message.pagination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryAllBalancesResponse message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.QueryAllBalancesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.bank.v1beta1.QueryAllBalancesResponse + * @static + * @param {cosmos.bank.v1beta1.IQueryAllBalancesResponse} message QueryAllBalancesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryAllBalancesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryAllBalancesResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.bank.v1beta1.QueryAllBalancesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.bank.v1beta1.QueryAllBalancesResponse} QueryAllBalancesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryAllBalancesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.bank.v1beta1.QueryAllBalancesResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.balances && message.balances.length)) + message.balances = []; + message.balances.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); + break; + case 2: + message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryAllBalancesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.bank.v1beta1.QueryAllBalancesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.bank.v1beta1.QueryAllBalancesResponse} QueryAllBalancesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryAllBalancesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryAllBalancesResponse message. + * @function verify + * @memberof cosmos.bank.v1beta1.QueryAllBalancesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryAllBalancesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.balances != null && message.hasOwnProperty("balances")) { + if (!Array.isArray(message.balances)) + return "balances: array expected"; + for (let i = 0; i < message.balances.length; ++i) { + let error = $root.cosmos.base.v1beta1.Coin.verify(message.balances[i]); + if (error) + return "balances." + error; + } + } + if (message.pagination != null && message.hasOwnProperty("pagination")) { + let error = $root.cosmos.base.query.v1beta1.PageResponse.verify(message.pagination); + if (error) + return "pagination." + error; + } + return null; + }; + + /** + * Creates a QueryAllBalancesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.bank.v1beta1.QueryAllBalancesResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.bank.v1beta1.QueryAllBalancesResponse} QueryAllBalancesResponse + */ + QueryAllBalancesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.bank.v1beta1.QueryAllBalancesResponse) + return object; + let message = new $root.cosmos.bank.v1beta1.QueryAllBalancesResponse(); + if (object.balances) { + if (!Array.isArray(object.balances)) + throw TypeError(".cosmos.bank.v1beta1.QueryAllBalancesResponse.balances: array expected"); + message.balances = []; + for (let i = 0; i < object.balances.length; ++i) { + if (typeof object.balances[i] !== "object") + throw TypeError(".cosmos.bank.v1beta1.QueryAllBalancesResponse.balances: object expected"); + message.balances[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.balances[i]); + } + } + if (object.pagination != null) { + if (typeof object.pagination !== "object") + throw TypeError(".cosmos.bank.v1beta1.QueryAllBalancesResponse.pagination: object expected"); + message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.fromObject(object.pagination); + } + return message; + }; + + /** + * Creates a plain object from a QueryAllBalancesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.bank.v1beta1.QueryAllBalancesResponse + * @static + * @param {cosmos.bank.v1beta1.QueryAllBalancesResponse} message QueryAllBalancesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryAllBalancesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.balances = []; + if (options.defaults) + object.pagination = null; + if (message.balances && message.balances.length) { + object.balances = []; + for (let j = 0; j < message.balances.length; ++j) + object.balances[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.balances[j], options); + } + if (message.pagination != null && message.hasOwnProperty("pagination")) + object.pagination = $root.cosmos.base.query.v1beta1.PageResponse.toObject(message.pagination, options); + return object; + }; + + /** + * Converts this QueryAllBalancesResponse to JSON. + * @function toJSON + * @memberof cosmos.bank.v1beta1.QueryAllBalancesResponse + * @instance + * @returns {Object.} JSON object + */ + QueryAllBalancesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryAllBalancesResponse; + })(v1beta1.QueryAllBalancesResponse || {}); + + v1beta1.QueryTotalSupplyRequest = (function(QueryTotalSupplyRequest) { + + /** + * Properties of a QueryTotalSupplyRequest. + * @memberof cosmos.bank.v1beta1 + * @interface IQueryTotalSupplyRequest + */ + + /** + * Constructs a new QueryTotalSupplyRequest. + * @memberof cosmos.bank.v1beta1 + * @classdesc Represents a QueryTotalSupplyRequest. + * @implements IQueryTotalSupplyRequest + * @constructor + * @param {cosmos.bank.v1beta1.IQueryTotalSupplyRequest=} [properties] Properties to set + */ + function QueryTotalSupplyRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new QueryTotalSupplyRequest instance using the specified properties. + * @function create + * @memberof cosmos.bank.v1beta1.QueryTotalSupplyRequest + * @static + * @param {cosmos.bank.v1beta1.IQueryTotalSupplyRequest=} [properties] Properties to set + * @returns {cosmos.bank.v1beta1.QueryTotalSupplyRequest} QueryTotalSupplyRequest instance + */ + QueryTotalSupplyRequest.create = function create(properties) { + return new QueryTotalSupplyRequest(properties); + }; + + /** + * Encodes the specified QueryTotalSupplyRequest message. Does not implicitly {@link cosmos.bank.v1beta1.QueryTotalSupplyRequest.verify|verify} messages. + * @function encode + * @memberof cosmos.bank.v1beta1.QueryTotalSupplyRequest + * @static + * @param {cosmos.bank.v1beta1.IQueryTotalSupplyRequest} message QueryTotalSupplyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryTotalSupplyRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified QueryTotalSupplyRequest message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.QueryTotalSupplyRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.bank.v1beta1.QueryTotalSupplyRequest + * @static + * @param {cosmos.bank.v1beta1.IQueryTotalSupplyRequest} message QueryTotalSupplyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryTotalSupplyRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryTotalSupplyRequest message from the specified reader or buffer. + * @function decode + * @memberof cosmos.bank.v1beta1.QueryTotalSupplyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.bank.v1beta1.QueryTotalSupplyRequest} QueryTotalSupplyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryTotalSupplyRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.bank.v1beta1.QueryTotalSupplyRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryTotalSupplyRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.bank.v1beta1.QueryTotalSupplyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.bank.v1beta1.QueryTotalSupplyRequest} QueryTotalSupplyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryTotalSupplyRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryTotalSupplyRequest message. + * @function verify + * @memberof cosmos.bank.v1beta1.QueryTotalSupplyRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryTotalSupplyRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a QueryTotalSupplyRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.bank.v1beta1.QueryTotalSupplyRequest + * @static + * @param {Object.} object Plain object + * @returns {cosmos.bank.v1beta1.QueryTotalSupplyRequest} QueryTotalSupplyRequest + */ + QueryTotalSupplyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.bank.v1beta1.QueryTotalSupplyRequest) + return object; + return new $root.cosmos.bank.v1beta1.QueryTotalSupplyRequest(); + }; + + /** + * Creates a plain object from a QueryTotalSupplyRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.bank.v1beta1.QueryTotalSupplyRequest + * @static + * @param {cosmos.bank.v1beta1.QueryTotalSupplyRequest} message QueryTotalSupplyRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryTotalSupplyRequest.toObject = function toObject() { + return {}; + }; + + /** + * Converts this QueryTotalSupplyRequest to JSON. + * @function toJSON + * @memberof cosmos.bank.v1beta1.QueryTotalSupplyRequest + * @instance + * @returns {Object.} JSON object + */ + QueryTotalSupplyRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryTotalSupplyRequest; + })(v1beta1.QueryTotalSupplyRequest || {}); + + v1beta1.QueryTotalSupplyResponse = (function(QueryTotalSupplyResponse) { + + /** + * Properties of a QueryTotalSupplyResponse. + * @memberof cosmos.bank.v1beta1 + * @interface IQueryTotalSupplyResponse + * @property {Array.|null} [supply] QueryTotalSupplyResponse supply + */ + + /** + * Constructs a new QueryTotalSupplyResponse. + * @memberof cosmos.bank.v1beta1 + * @classdesc Represents a QueryTotalSupplyResponse. + * @implements IQueryTotalSupplyResponse + * @constructor + * @param {cosmos.bank.v1beta1.IQueryTotalSupplyResponse=} [properties] Properties to set + */ + function QueryTotalSupplyResponse(properties) { + this.supply = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryTotalSupplyResponse supply. + * @member {Array.} supply + * @memberof cosmos.bank.v1beta1.QueryTotalSupplyResponse + * @instance + */ + QueryTotalSupplyResponse.prototype.supply = $util.emptyArray; + + /** + * Creates a new QueryTotalSupplyResponse instance using the specified properties. + * @function create + * @memberof cosmos.bank.v1beta1.QueryTotalSupplyResponse + * @static + * @param {cosmos.bank.v1beta1.IQueryTotalSupplyResponse=} [properties] Properties to set + * @returns {cosmos.bank.v1beta1.QueryTotalSupplyResponse} QueryTotalSupplyResponse instance + */ + QueryTotalSupplyResponse.create = function create(properties) { + return new QueryTotalSupplyResponse(properties); + }; + + /** + * Encodes the specified QueryTotalSupplyResponse message. Does not implicitly {@link cosmos.bank.v1beta1.QueryTotalSupplyResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.bank.v1beta1.QueryTotalSupplyResponse + * @static + * @param {cosmos.bank.v1beta1.IQueryTotalSupplyResponse} message QueryTotalSupplyResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryTotalSupplyResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.supply != null && message.supply.length) + for (let i = 0; i < message.supply.length; ++i) + $root.cosmos.base.v1beta1.Coin.encode(message.supply[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryTotalSupplyResponse message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.QueryTotalSupplyResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.bank.v1beta1.QueryTotalSupplyResponse + * @static + * @param {cosmos.bank.v1beta1.IQueryTotalSupplyResponse} message QueryTotalSupplyResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryTotalSupplyResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryTotalSupplyResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.bank.v1beta1.QueryTotalSupplyResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.bank.v1beta1.QueryTotalSupplyResponse} QueryTotalSupplyResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryTotalSupplyResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.bank.v1beta1.QueryTotalSupplyResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.supply && message.supply.length)) + message.supply = []; + message.supply.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryTotalSupplyResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.bank.v1beta1.QueryTotalSupplyResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.bank.v1beta1.QueryTotalSupplyResponse} QueryTotalSupplyResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryTotalSupplyResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryTotalSupplyResponse message. + * @function verify + * @memberof cosmos.bank.v1beta1.QueryTotalSupplyResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryTotalSupplyResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.supply != null && message.hasOwnProperty("supply")) { + if (!Array.isArray(message.supply)) + return "supply: array expected"; + for (let i = 0; i < message.supply.length; ++i) { + let error = $root.cosmos.base.v1beta1.Coin.verify(message.supply[i]); + if (error) + return "supply." + error; + } + } + return null; + }; + + /** + * Creates a QueryTotalSupplyResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.bank.v1beta1.QueryTotalSupplyResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.bank.v1beta1.QueryTotalSupplyResponse} QueryTotalSupplyResponse + */ + QueryTotalSupplyResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.bank.v1beta1.QueryTotalSupplyResponse) + return object; + let message = new $root.cosmos.bank.v1beta1.QueryTotalSupplyResponse(); + if (object.supply) { + if (!Array.isArray(object.supply)) + throw TypeError(".cosmos.bank.v1beta1.QueryTotalSupplyResponse.supply: array expected"); + message.supply = []; + for (let i = 0; i < object.supply.length; ++i) { + if (typeof object.supply[i] !== "object") + throw TypeError(".cosmos.bank.v1beta1.QueryTotalSupplyResponse.supply: object expected"); + message.supply[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.supply[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a QueryTotalSupplyResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.bank.v1beta1.QueryTotalSupplyResponse + * @static + * @param {cosmos.bank.v1beta1.QueryTotalSupplyResponse} message QueryTotalSupplyResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryTotalSupplyResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.supply = []; + if (message.supply && message.supply.length) { + object.supply = []; + for (let j = 0; j < message.supply.length; ++j) + object.supply[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.supply[j], options); + } + return object; + }; + + /** + * Converts this QueryTotalSupplyResponse to JSON. + * @function toJSON + * @memberof cosmos.bank.v1beta1.QueryTotalSupplyResponse + * @instance + * @returns {Object.} JSON object + */ + QueryTotalSupplyResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryTotalSupplyResponse; + })(v1beta1.QueryTotalSupplyResponse || {}); + + v1beta1.QuerySupplyOfRequest = (function(QuerySupplyOfRequest) { + + /** + * Properties of a QuerySupplyOfRequest. + * @memberof cosmos.bank.v1beta1 + * @interface IQuerySupplyOfRequest + * @property {string|null} [denom] QuerySupplyOfRequest denom + */ + + /** + * Constructs a new QuerySupplyOfRequest. + * @memberof cosmos.bank.v1beta1 + * @classdesc Represents a QuerySupplyOfRequest. + * @implements IQuerySupplyOfRequest + * @constructor + * @param {cosmos.bank.v1beta1.IQuerySupplyOfRequest=} [properties] Properties to set + */ + function QuerySupplyOfRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QuerySupplyOfRequest denom. + * @member {string} denom + * @memberof cosmos.bank.v1beta1.QuerySupplyOfRequest + * @instance + */ + QuerySupplyOfRequest.prototype.denom = ""; + + /** + * Creates a new QuerySupplyOfRequest instance using the specified properties. + * @function create + * @memberof cosmos.bank.v1beta1.QuerySupplyOfRequest + * @static + * @param {cosmos.bank.v1beta1.IQuerySupplyOfRequest=} [properties] Properties to set + * @returns {cosmos.bank.v1beta1.QuerySupplyOfRequest} QuerySupplyOfRequest instance + */ + QuerySupplyOfRequest.create = function create(properties) { + return new QuerySupplyOfRequest(properties); + }; + + /** + * Encodes the specified QuerySupplyOfRequest message. Does not implicitly {@link cosmos.bank.v1beta1.QuerySupplyOfRequest.verify|verify} messages. + * @function encode + * @memberof cosmos.bank.v1beta1.QuerySupplyOfRequest + * @static + * @param {cosmos.bank.v1beta1.IQuerySupplyOfRequest} message QuerySupplyOfRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuerySupplyOfRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.denom != null && Object.hasOwnProperty.call(message, "denom")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.denom); + return writer; + }; + + /** + * Encodes the specified QuerySupplyOfRequest message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.QuerySupplyOfRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.bank.v1beta1.QuerySupplyOfRequest + * @static + * @param {cosmos.bank.v1beta1.IQuerySupplyOfRequest} message QuerySupplyOfRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuerySupplyOfRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QuerySupplyOfRequest message from the specified reader or buffer. + * @function decode + * @memberof cosmos.bank.v1beta1.QuerySupplyOfRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.bank.v1beta1.QuerySupplyOfRequest} QuerySupplyOfRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuerySupplyOfRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.bank.v1beta1.QuerySupplyOfRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.denom = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QuerySupplyOfRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.bank.v1beta1.QuerySupplyOfRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.bank.v1beta1.QuerySupplyOfRequest} QuerySupplyOfRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuerySupplyOfRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QuerySupplyOfRequest message. + * @function verify + * @memberof cosmos.bank.v1beta1.QuerySupplyOfRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QuerySupplyOfRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.denom != null && message.hasOwnProperty("denom")) + if (!$util.isString(message.denom)) + return "denom: string expected"; + return null; + }; + + /** + * Creates a QuerySupplyOfRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.bank.v1beta1.QuerySupplyOfRequest + * @static + * @param {Object.} object Plain object + * @returns {cosmos.bank.v1beta1.QuerySupplyOfRequest} QuerySupplyOfRequest + */ + QuerySupplyOfRequest.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.bank.v1beta1.QuerySupplyOfRequest) + return object; + let message = new $root.cosmos.bank.v1beta1.QuerySupplyOfRequest(); + if (object.denom != null) + message.denom = String(object.denom); + return message; + }; + + /** + * Creates a plain object from a QuerySupplyOfRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.bank.v1beta1.QuerySupplyOfRequest + * @static + * @param {cosmos.bank.v1beta1.QuerySupplyOfRequest} message QuerySupplyOfRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QuerySupplyOfRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.denom = ""; + if (message.denom != null && message.hasOwnProperty("denom")) + object.denom = message.denom; + return object; + }; + + /** + * Converts this QuerySupplyOfRequest to JSON. + * @function toJSON + * @memberof cosmos.bank.v1beta1.QuerySupplyOfRequest + * @instance + * @returns {Object.} JSON object + */ + QuerySupplyOfRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QuerySupplyOfRequest; + })(v1beta1.QuerySupplyOfRequest || {}); + + v1beta1.QuerySupplyOfResponse = (function(QuerySupplyOfResponse) { + + /** + * Properties of a QuerySupplyOfResponse. + * @memberof cosmos.bank.v1beta1 + * @interface IQuerySupplyOfResponse + * @property {cosmos.base.v1beta1.ICoin|null} [amount] QuerySupplyOfResponse amount + */ + + /** + * Constructs a new QuerySupplyOfResponse. + * @memberof cosmos.bank.v1beta1 + * @classdesc Represents a QuerySupplyOfResponse. + * @implements IQuerySupplyOfResponse + * @constructor + * @param {cosmos.bank.v1beta1.IQuerySupplyOfResponse=} [properties] Properties to set + */ + function QuerySupplyOfResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QuerySupplyOfResponse amount. + * @member {cosmos.base.v1beta1.ICoin|null|undefined} amount + * @memberof cosmos.bank.v1beta1.QuerySupplyOfResponse + * @instance + */ + QuerySupplyOfResponse.prototype.amount = null; + + /** + * Creates a new QuerySupplyOfResponse instance using the specified properties. + * @function create + * @memberof cosmos.bank.v1beta1.QuerySupplyOfResponse + * @static + * @param {cosmos.bank.v1beta1.IQuerySupplyOfResponse=} [properties] Properties to set + * @returns {cosmos.bank.v1beta1.QuerySupplyOfResponse} QuerySupplyOfResponse instance + */ + QuerySupplyOfResponse.create = function create(properties) { + return new QuerySupplyOfResponse(properties); + }; + + /** + * Encodes the specified QuerySupplyOfResponse message. Does not implicitly {@link cosmos.bank.v1beta1.QuerySupplyOfResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.bank.v1beta1.QuerySupplyOfResponse + * @static + * @param {cosmos.bank.v1beta1.IQuerySupplyOfResponse} message QuerySupplyOfResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuerySupplyOfResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.amount != null && Object.hasOwnProperty.call(message, "amount")) + $root.cosmos.base.v1beta1.Coin.encode(message.amount, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QuerySupplyOfResponse message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.QuerySupplyOfResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.bank.v1beta1.QuerySupplyOfResponse + * @static + * @param {cosmos.bank.v1beta1.IQuerySupplyOfResponse} message QuerySupplyOfResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuerySupplyOfResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QuerySupplyOfResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.bank.v1beta1.QuerySupplyOfResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.bank.v1beta1.QuerySupplyOfResponse} QuerySupplyOfResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuerySupplyOfResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.bank.v1beta1.QuerySupplyOfResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.amount = $root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QuerySupplyOfResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.bank.v1beta1.QuerySupplyOfResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.bank.v1beta1.QuerySupplyOfResponse} QuerySupplyOfResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuerySupplyOfResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QuerySupplyOfResponse message. + * @function verify + * @memberof cosmos.bank.v1beta1.QuerySupplyOfResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QuerySupplyOfResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.amount != null && message.hasOwnProperty("amount")) { + let error = $root.cosmos.base.v1beta1.Coin.verify(message.amount); + if (error) + return "amount." + error; + } + return null; + }; + + /** + * Creates a QuerySupplyOfResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.bank.v1beta1.QuerySupplyOfResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.bank.v1beta1.QuerySupplyOfResponse} QuerySupplyOfResponse + */ + QuerySupplyOfResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.bank.v1beta1.QuerySupplyOfResponse) + return object; + let message = new $root.cosmos.bank.v1beta1.QuerySupplyOfResponse(); + if (object.amount != null) { + if (typeof object.amount !== "object") + throw TypeError(".cosmos.bank.v1beta1.QuerySupplyOfResponse.amount: object expected"); + message.amount = $root.cosmos.base.v1beta1.Coin.fromObject(object.amount); + } + return message; + }; + + /** + * Creates a plain object from a QuerySupplyOfResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.bank.v1beta1.QuerySupplyOfResponse + * @static + * @param {cosmos.bank.v1beta1.QuerySupplyOfResponse} message QuerySupplyOfResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QuerySupplyOfResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.amount = null; + if (message.amount != null && message.hasOwnProperty("amount")) + object.amount = $root.cosmos.base.v1beta1.Coin.toObject(message.amount, options); + return object; + }; + + /** + * Converts this QuerySupplyOfResponse to JSON. + * @function toJSON + * @memberof cosmos.bank.v1beta1.QuerySupplyOfResponse + * @instance + * @returns {Object.} JSON object + */ + QuerySupplyOfResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QuerySupplyOfResponse; + })(v1beta1.QuerySupplyOfResponse || {}); + + v1beta1.QueryParamsRequest = (function(QueryParamsRequest) { + + /** + * Properties of a QueryParamsRequest. + * @memberof cosmos.bank.v1beta1 + * @interface IQueryParamsRequest + */ + + /** + * Constructs a new QueryParamsRequest. + * @memberof cosmos.bank.v1beta1 + * @classdesc Represents a QueryParamsRequest. + * @implements IQueryParamsRequest + * @constructor + * @param {cosmos.bank.v1beta1.IQueryParamsRequest=} [properties] Properties to set + */ + function QueryParamsRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new QueryParamsRequest instance using the specified properties. + * @function create + * @memberof cosmos.bank.v1beta1.QueryParamsRequest + * @static + * @param {cosmos.bank.v1beta1.IQueryParamsRequest=} [properties] Properties to set + * @returns {cosmos.bank.v1beta1.QueryParamsRequest} QueryParamsRequest instance + */ + QueryParamsRequest.create = function create(properties) { + return new QueryParamsRequest(properties); + }; + + /** + * Encodes the specified QueryParamsRequest message. Does not implicitly {@link cosmos.bank.v1beta1.QueryParamsRequest.verify|verify} messages. + * @function encode + * @memberof cosmos.bank.v1beta1.QueryParamsRequest + * @static + * @param {cosmos.bank.v1beta1.IQueryParamsRequest} message QueryParamsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryParamsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified QueryParamsRequest message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.QueryParamsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.bank.v1beta1.QueryParamsRequest + * @static + * @param {cosmos.bank.v1beta1.IQueryParamsRequest} message QueryParamsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryParamsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryParamsRequest message from the specified reader or buffer. + * @function decode + * @memberof cosmos.bank.v1beta1.QueryParamsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.bank.v1beta1.QueryParamsRequest} QueryParamsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryParamsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.bank.v1beta1.QueryParamsRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryParamsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.bank.v1beta1.QueryParamsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.bank.v1beta1.QueryParamsRequest} QueryParamsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryParamsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryParamsRequest message. + * @function verify + * @memberof cosmos.bank.v1beta1.QueryParamsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryParamsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a QueryParamsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.bank.v1beta1.QueryParamsRequest + * @static + * @param {Object.} object Plain object + * @returns {cosmos.bank.v1beta1.QueryParamsRequest} QueryParamsRequest + */ + QueryParamsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.bank.v1beta1.QueryParamsRequest) + return object; + return new $root.cosmos.bank.v1beta1.QueryParamsRequest(); + }; + + /** + * Creates a plain object from a QueryParamsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.bank.v1beta1.QueryParamsRequest + * @static + * @param {cosmos.bank.v1beta1.QueryParamsRequest} message QueryParamsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryParamsRequest.toObject = function toObject() { + return {}; + }; + + /** + * Converts this QueryParamsRequest to JSON. + * @function toJSON + * @memberof cosmos.bank.v1beta1.QueryParamsRequest + * @instance + * @returns {Object.} JSON object + */ + QueryParamsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryParamsRequest; + })(v1beta1.QueryParamsRequest || {}); + + v1beta1.QueryParamsResponse = (function(QueryParamsResponse) { + + /** + * Properties of a QueryParamsResponse. + * @memberof cosmos.bank.v1beta1 + * @interface IQueryParamsResponse + * @property {cosmos.bank.v1beta1.IParams|null} [params] QueryParamsResponse params + */ + + /** + * Constructs a new QueryParamsResponse. + * @memberof cosmos.bank.v1beta1 + * @classdesc Represents a QueryParamsResponse. + * @implements IQueryParamsResponse + * @constructor + * @param {cosmos.bank.v1beta1.IQueryParamsResponse=} [properties] Properties to set + */ + function QueryParamsResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryParamsResponse params. + * @member {cosmos.bank.v1beta1.IParams|null|undefined} params + * @memberof cosmos.bank.v1beta1.QueryParamsResponse + * @instance + */ + QueryParamsResponse.prototype.params = null; + + /** + * Creates a new QueryParamsResponse instance using the specified properties. + * @function create + * @memberof cosmos.bank.v1beta1.QueryParamsResponse + * @static + * @param {cosmos.bank.v1beta1.IQueryParamsResponse=} [properties] Properties to set + * @returns {cosmos.bank.v1beta1.QueryParamsResponse} QueryParamsResponse instance + */ + QueryParamsResponse.create = function create(properties) { + return new QueryParamsResponse(properties); + }; + + /** + * Encodes the specified QueryParamsResponse message. Does not implicitly {@link cosmos.bank.v1beta1.QueryParamsResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.bank.v1beta1.QueryParamsResponse + * @static + * @param {cosmos.bank.v1beta1.IQueryParamsResponse} message QueryParamsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryParamsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.params != null && Object.hasOwnProperty.call(message, "params")) + $root.cosmos.bank.v1beta1.Params.encode(message.params, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryParamsResponse message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.QueryParamsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.bank.v1beta1.QueryParamsResponse + * @static + * @param {cosmos.bank.v1beta1.IQueryParamsResponse} message QueryParamsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryParamsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryParamsResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.bank.v1beta1.QueryParamsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.bank.v1beta1.QueryParamsResponse} QueryParamsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryParamsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.bank.v1beta1.QueryParamsResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.params = $root.cosmos.bank.v1beta1.Params.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryParamsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.bank.v1beta1.QueryParamsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.bank.v1beta1.QueryParamsResponse} QueryParamsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryParamsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryParamsResponse message. + * @function verify + * @memberof cosmos.bank.v1beta1.QueryParamsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryParamsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.params != null && message.hasOwnProperty("params")) { + let error = $root.cosmos.bank.v1beta1.Params.verify(message.params); + if (error) + return "params." + error; + } + return null; + }; + + /** + * Creates a QueryParamsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.bank.v1beta1.QueryParamsResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.bank.v1beta1.QueryParamsResponse} QueryParamsResponse + */ + QueryParamsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.bank.v1beta1.QueryParamsResponse) + return object; + let message = new $root.cosmos.bank.v1beta1.QueryParamsResponse(); + if (object.params != null) { + if (typeof object.params !== "object") + throw TypeError(".cosmos.bank.v1beta1.QueryParamsResponse.params: object expected"); + message.params = $root.cosmos.bank.v1beta1.Params.fromObject(object.params); + } + return message; + }; + + /** + * Creates a plain object from a QueryParamsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.bank.v1beta1.QueryParamsResponse + * @static + * @param {cosmos.bank.v1beta1.QueryParamsResponse} message QueryParamsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryParamsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.params = null; + if (message.params != null && message.hasOwnProperty("params")) + object.params = $root.cosmos.bank.v1beta1.Params.toObject(message.params, options); + return object; + }; + + /** + * Converts this QueryParamsResponse to JSON. + * @function toJSON + * @memberof cosmos.bank.v1beta1.QueryParamsResponse + * @instance + * @returns {Object.} JSON object + */ + QueryParamsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryParamsResponse; + })(v1beta1.QueryParamsResponse || {}); + + v1beta1.QueryDenomsMetadataRequest = (function(QueryDenomsMetadataRequest) { + + /** + * Properties of a QueryDenomsMetadataRequest. + * @memberof cosmos.bank.v1beta1 + * @interface IQueryDenomsMetadataRequest + * @property {cosmos.base.query.v1beta1.IPageRequest|null} [pagination] QueryDenomsMetadataRequest pagination + */ + + /** + * Constructs a new QueryDenomsMetadataRequest. + * @memberof cosmos.bank.v1beta1 + * @classdesc Represents a QueryDenomsMetadataRequest. + * @implements IQueryDenomsMetadataRequest + * @constructor + * @param {cosmos.bank.v1beta1.IQueryDenomsMetadataRequest=} [properties] Properties to set + */ + function QueryDenomsMetadataRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryDenomsMetadataRequest pagination. + * @member {cosmos.base.query.v1beta1.IPageRequest|null|undefined} pagination + * @memberof cosmos.bank.v1beta1.QueryDenomsMetadataRequest + * @instance + */ + QueryDenomsMetadataRequest.prototype.pagination = null; + + /** + * Creates a new QueryDenomsMetadataRequest instance using the specified properties. + * @function create + * @memberof cosmos.bank.v1beta1.QueryDenomsMetadataRequest + * @static + * @param {cosmos.bank.v1beta1.IQueryDenomsMetadataRequest=} [properties] Properties to set + * @returns {cosmos.bank.v1beta1.QueryDenomsMetadataRequest} QueryDenomsMetadataRequest instance + */ + QueryDenomsMetadataRequest.create = function create(properties) { + return new QueryDenomsMetadataRequest(properties); + }; + + /** + * Encodes the specified QueryDenomsMetadataRequest message. Does not implicitly {@link cosmos.bank.v1beta1.QueryDenomsMetadataRequest.verify|verify} messages. + * @function encode + * @memberof cosmos.bank.v1beta1.QueryDenomsMetadataRequest + * @static + * @param {cosmos.bank.v1beta1.IQueryDenomsMetadataRequest} message QueryDenomsMetadataRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDenomsMetadataRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) + $root.cosmos.base.query.v1beta1.PageRequest.encode(message.pagination, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryDenomsMetadataRequest message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.QueryDenomsMetadataRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.bank.v1beta1.QueryDenomsMetadataRequest + * @static + * @param {cosmos.bank.v1beta1.IQueryDenomsMetadataRequest} message QueryDenomsMetadataRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDenomsMetadataRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryDenomsMetadataRequest message from the specified reader or buffer. + * @function decode + * @memberof cosmos.bank.v1beta1.QueryDenomsMetadataRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.bank.v1beta1.QueryDenomsMetadataRequest} QueryDenomsMetadataRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDenomsMetadataRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.bank.v1beta1.QueryDenomsMetadataRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryDenomsMetadataRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.bank.v1beta1.QueryDenomsMetadataRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.bank.v1beta1.QueryDenomsMetadataRequest} QueryDenomsMetadataRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDenomsMetadataRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryDenomsMetadataRequest message. + * @function verify + * @memberof cosmos.bank.v1beta1.QueryDenomsMetadataRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryDenomsMetadataRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.pagination != null && message.hasOwnProperty("pagination")) { + let error = $root.cosmos.base.query.v1beta1.PageRequest.verify(message.pagination); + if (error) + return "pagination." + error; + } + return null; + }; + + /** + * Creates a QueryDenomsMetadataRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.bank.v1beta1.QueryDenomsMetadataRequest + * @static + * @param {Object.} object Plain object + * @returns {cosmos.bank.v1beta1.QueryDenomsMetadataRequest} QueryDenomsMetadataRequest + */ + QueryDenomsMetadataRequest.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.bank.v1beta1.QueryDenomsMetadataRequest) + return object; + let message = new $root.cosmos.bank.v1beta1.QueryDenomsMetadataRequest(); + if (object.pagination != null) { + if (typeof object.pagination !== "object") + throw TypeError(".cosmos.bank.v1beta1.QueryDenomsMetadataRequest.pagination: object expected"); + message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.fromObject(object.pagination); + } + return message; + }; + + /** + * Creates a plain object from a QueryDenomsMetadataRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.bank.v1beta1.QueryDenomsMetadataRequest + * @static + * @param {cosmos.bank.v1beta1.QueryDenomsMetadataRequest} message QueryDenomsMetadataRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryDenomsMetadataRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.pagination = null; + if (message.pagination != null && message.hasOwnProperty("pagination")) + object.pagination = $root.cosmos.base.query.v1beta1.PageRequest.toObject(message.pagination, options); + return object; + }; + + /** + * Converts this QueryDenomsMetadataRequest to JSON. + * @function toJSON + * @memberof cosmos.bank.v1beta1.QueryDenomsMetadataRequest + * @instance + * @returns {Object.} JSON object + */ + QueryDenomsMetadataRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryDenomsMetadataRequest; + })(v1beta1.QueryDenomsMetadataRequest || {}); + + v1beta1.QueryDenomsMetadataResponse = (function(QueryDenomsMetadataResponse) { + + /** + * Properties of a QueryDenomsMetadataResponse. + * @memberof cosmos.bank.v1beta1 + * @interface IQueryDenomsMetadataResponse + * @property {Array.|null} [metadatas] QueryDenomsMetadataResponse metadatas + * @property {cosmos.base.query.v1beta1.IPageResponse|null} [pagination] QueryDenomsMetadataResponse pagination + */ + + /** + * Constructs a new QueryDenomsMetadataResponse. + * @memberof cosmos.bank.v1beta1 + * @classdesc Represents a QueryDenomsMetadataResponse. + * @implements IQueryDenomsMetadataResponse + * @constructor + * @param {cosmos.bank.v1beta1.IQueryDenomsMetadataResponse=} [properties] Properties to set + */ + function QueryDenomsMetadataResponse(properties) { + this.metadatas = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryDenomsMetadataResponse metadatas. + * @member {Array.} metadatas + * @memberof cosmos.bank.v1beta1.QueryDenomsMetadataResponse + * @instance + */ + QueryDenomsMetadataResponse.prototype.metadatas = $util.emptyArray; + + /** + * QueryDenomsMetadataResponse pagination. + * @member {cosmos.base.query.v1beta1.IPageResponse|null|undefined} pagination + * @memberof cosmos.bank.v1beta1.QueryDenomsMetadataResponse + * @instance + */ + QueryDenomsMetadataResponse.prototype.pagination = null; + + /** + * Creates a new QueryDenomsMetadataResponse instance using the specified properties. + * @function create + * @memberof cosmos.bank.v1beta1.QueryDenomsMetadataResponse + * @static + * @param {cosmos.bank.v1beta1.IQueryDenomsMetadataResponse=} [properties] Properties to set + * @returns {cosmos.bank.v1beta1.QueryDenomsMetadataResponse} QueryDenomsMetadataResponse instance + */ + QueryDenomsMetadataResponse.create = function create(properties) { + return new QueryDenomsMetadataResponse(properties); + }; + + /** + * Encodes the specified QueryDenomsMetadataResponse message. Does not implicitly {@link cosmos.bank.v1beta1.QueryDenomsMetadataResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.bank.v1beta1.QueryDenomsMetadataResponse + * @static + * @param {cosmos.bank.v1beta1.IQueryDenomsMetadataResponse} message QueryDenomsMetadataResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDenomsMetadataResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metadatas != null && message.metadatas.length) + for (let i = 0; i < message.metadatas.length; ++i) + $root.cosmos.bank.v1beta1.Metadata.encode(message.metadatas[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) + $root.cosmos.base.query.v1beta1.PageResponse.encode(message.pagination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryDenomsMetadataResponse message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.QueryDenomsMetadataResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.bank.v1beta1.QueryDenomsMetadataResponse + * @static + * @param {cosmos.bank.v1beta1.IQueryDenomsMetadataResponse} message QueryDenomsMetadataResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDenomsMetadataResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryDenomsMetadataResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.bank.v1beta1.QueryDenomsMetadataResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.bank.v1beta1.QueryDenomsMetadataResponse} QueryDenomsMetadataResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDenomsMetadataResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.bank.v1beta1.QueryDenomsMetadataResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.metadatas && message.metadatas.length)) + message.metadatas = []; + message.metadatas.push($root.cosmos.bank.v1beta1.Metadata.decode(reader, reader.uint32())); + break; + case 2: + message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryDenomsMetadataResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.bank.v1beta1.QueryDenomsMetadataResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.bank.v1beta1.QueryDenomsMetadataResponse} QueryDenomsMetadataResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDenomsMetadataResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryDenomsMetadataResponse message. + * @function verify + * @memberof cosmos.bank.v1beta1.QueryDenomsMetadataResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryDenomsMetadataResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.metadatas != null && message.hasOwnProperty("metadatas")) { + if (!Array.isArray(message.metadatas)) + return "metadatas: array expected"; + for (let i = 0; i < message.metadatas.length; ++i) { + let error = $root.cosmos.bank.v1beta1.Metadata.verify(message.metadatas[i]); + if (error) + return "metadatas." + error; + } + } + if (message.pagination != null && message.hasOwnProperty("pagination")) { + let error = $root.cosmos.base.query.v1beta1.PageResponse.verify(message.pagination); + if (error) + return "pagination." + error; + } + return null; + }; + + /** + * Creates a QueryDenomsMetadataResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.bank.v1beta1.QueryDenomsMetadataResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.bank.v1beta1.QueryDenomsMetadataResponse} QueryDenomsMetadataResponse + */ + QueryDenomsMetadataResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.bank.v1beta1.QueryDenomsMetadataResponse) + return object; + let message = new $root.cosmos.bank.v1beta1.QueryDenomsMetadataResponse(); + if (object.metadatas) { + if (!Array.isArray(object.metadatas)) + throw TypeError(".cosmos.bank.v1beta1.QueryDenomsMetadataResponse.metadatas: array expected"); + message.metadatas = []; + for (let i = 0; i < object.metadatas.length; ++i) { + if (typeof object.metadatas[i] !== "object") + throw TypeError(".cosmos.bank.v1beta1.QueryDenomsMetadataResponse.metadatas: object expected"); + message.metadatas[i] = $root.cosmos.bank.v1beta1.Metadata.fromObject(object.metadatas[i]); + } + } + if (object.pagination != null) { + if (typeof object.pagination !== "object") + throw TypeError(".cosmos.bank.v1beta1.QueryDenomsMetadataResponse.pagination: object expected"); + message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.fromObject(object.pagination); + } + return message; + }; + + /** + * Creates a plain object from a QueryDenomsMetadataResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.bank.v1beta1.QueryDenomsMetadataResponse + * @static + * @param {cosmos.bank.v1beta1.QueryDenomsMetadataResponse} message QueryDenomsMetadataResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryDenomsMetadataResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.metadatas = []; + if (options.defaults) + object.pagination = null; + if (message.metadatas && message.metadatas.length) { + object.metadatas = []; + for (let j = 0; j < message.metadatas.length; ++j) + object.metadatas[j] = $root.cosmos.bank.v1beta1.Metadata.toObject(message.metadatas[j], options); + } + if (message.pagination != null && message.hasOwnProperty("pagination")) + object.pagination = $root.cosmos.base.query.v1beta1.PageResponse.toObject(message.pagination, options); + return object; + }; + + /** + * Converts this QueryDenomsMetadataResponse to JSON. + * @function toJSON + * @memberof cosmos.bank.v1beta1.QueryDenomsMetadataResponse + * @instance + * @returns {Object.} JSON object + */ + QueryDenomsMetadataResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryDenomsMetadataResponse; + })(v1beta1.QueryDenomsMetadataResponse || {}); + + v1beta1.QueryDenomMetadataRequest = (function(QueryDenomMetadataRequest) { + + /** + * Properties of a QueryDenomMetadataRequest. + * @memberof cosmos.bank.v1beta1 + * @interface IQueryDenomMetadataRequest + * @property {string|null} [denom] QueryDenomMetadataRequest denom + */ + + /** + * Constructs a new QueryDenomMetadataRequest. + * @memberof cosmos.bank.v1beta1 + * @classdesc Represents a QueryDenomMetadataRequest. + * @implements IQueryDenomMetadataRequest + * @constructor + * @param {cosmos.bank.v1beta1.IQueryDenomMetadataRequest=} [properties] Properties to set + */ + function QueryDenomMetadataRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryDenomMetadataRequest denom. + * @member {string} denom + * @memberof cosmos.bank.v1beta1.QueryDenomMetadataRequest + * @instance + */ + QueryDenomMetadataRequest.prototype.denom = ""; + + /** + * Creates a new QueryDenomMetadataRequest instance using the specified properties. + * @function create + * @memberof cosmos.bank.v1beta1.QueryDenomMetadataRequest + * @static + * @param {cosmos.bank.v1beta1.IQueryDenomMetadataRequest=} [properties] Properties to set + * @returns {cosmos.bank.v1beta1.QueryDenomMetadataRequest} QueryDenomMetadataRequest instance + */ + QueryDenomMetadataRequest.create = function create(properties) { + return new QueryDenomMetadataRequest(properties); + }; + + /** + * Encodes the specified QueryDenomMetadataRequest message. Does not implicitly {@link cosmos.bank.v1beta1.QueryDenomMetadataRequest.verify|verify} messages. + * @function encode + * @memberof cosmos.bank.v1beta1.QueryDenomMetadataRequest + * @static + * @param {cosmos.bank.v1beta1.IQueryDenomMetadataRequest} message QueryDenomMetadataRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDenomMetadataRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.denom != null && Object.hasOwnProperty.call(message, "denom")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.denom); + return writer; + }; + + /** + * Encodes the specified QueryDenomMetadataRequest message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.QueryDenomMetadataRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.bank.v1beta1.QueryDenomMetadataRequest + * @static + * @param {cosmos.bank.v1beta1.IQueryDenomMetadataRequest} message QueryDenomMetadataRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDenomMetadataRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryDenomMetadataRequest message from the specified reader or buffer. + * @function decode + * @memberof cosmos.bank.v1beta1.QueryDenomMetadataRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.bank.v1beta1.QueryDenomMetadataRequest} QueryDenomMetadataRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDenomMetadataRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.bank.v1beta1.QueryDenomMetadataRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.denom = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryDenomMetadataRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.bank.v1beta1.QueryDenomMetadataRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.bank.v1beta1.QueryDenomMetadataRequest} QueryDenomMetadataRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDenomMetadataRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryDenomMetadataRequest message. + * @function verify + * @memberof cosmos.bank.v1beta1.QueryDenomMetadataRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryDenomMetadataRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.denom != null && message.hasOwnProperty("denom")) + if (!$util.isString(message.denom)) + return "denom: string expected"; + return null; + }; + + /** + * Creates a QueryDenomMetadataRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.bank.v1beta1.QueryDenomMetadataRequest + * @static + * @param {Object.} object Plain object + * @returns {cosmos.bank.v1beta1.QueryDenomMetadataRequest} QueryDenomMetadataRequest + */ + QueryDenomMetadataRequest.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.bank.v1beta1.QueryDenomMetadataRequest) + return object; + let message = new $root.cosmos.bank.v1beta1.QueryDenomMetadataRequest(); + if (object.denom != null) + message.denom = String(object.denom); + return message; + }; + + /** + * Creates a plain object from a QueryDenomMetadataRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.bank.v1beta1.QueryDenomMetadataRequest + * @static + * @param {cosmos.bank.v1beta1.QueryDenomMetadataRequest} message QueryDenomMetadataRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryDenomMetadataRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.denom = ""; + if (message.denom != null && message.hasOwnProperty("denom")) + object.denom = message.denom; + return object; + }; + + /** + * Converts this QueryDenomMetadataRequest to JSON. + * @function toJSON + * @memberof cosmos.bank.v1beta1.QueryDenomMetadataRequest + * @instance + * @returns {Object.} JSON object + */ + QueryDenomMetadataRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryDenomMetadataRequest; + })(v1beta1.QueryDenomMetadataRequest || {}); + + v1beta1.QueryDenomMetadataResponse = (function(QueryDenomMetadataResponse) { + + /** + * Properties of a QueryDenomMetadataResponse. + * @memberof cosmos.bank.v1beta1 + * @interface IQueryDenomMetadataResponse + * @property {cosmos.bank.v1beta1.IMetadata|null} [metadata] QueryDenomMetadataResponse metadata + */ + + /** + * Constructs a new QueryDenomMetadataResponse. + * @memberof cosmos.bank.v1beta1 + * @classdesc Represents a QueryDenomMetadataResponse. + * @implements IQueryDenomMetadataResponse + * @constructor + * @param {cosmos.bank.v1beta1.IQueryDenomMetadataResponse=} [properties] Properties to set + */ + function QueryDenomMetadataResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryDenomMetadataResponse metadata. + * @member {cosmos.bank.v1beta1.IMetadata|null|undefined} metadata + * @memberof cosmos.bank.v1beta1.QueryDenomMetadataResponse + * @instance + */ + QueryDenomMetadataResponse.prototype.metadata = null; + + /** + * Creates a new QueryDenomMetadataResponse instance using the specified properties. + * @function create + * @memberof cosmos.bank.v1beta1.QueryDenomMetadataResponse + * @static + * @param {cosmos.bank.v1beta1.IQueryDenomMetadataResponse=} [properties] Properties to set + * @returns {cosmos.bank.v1beta1.QueryDenomMetadataResponse} QueryDenomMetadataResponse instance + */ + QueryDenomMetadataResponse.create = function create(properties) { + return new QueryDenomMetadataResponse(properties); + }; + + /** + * Encodes the specified QueryDenomMetadataResponse message. Does not implicitly {@link cosmos.bank.v1beta1.QueryDenomMetadataResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.bank.v1beta1.QueryDenomMetadataResponse + * @static + * @param {cosmos.bank.v1beta1.IQueryDenomMetadataResponse} message QueryDenomMetadataResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDenomMetadataResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.cosmos.bank.v1beta1.Metadata.encode(message.metadata, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryDenomMetadataResponse message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.QueryDenomMetadataResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.bank.v1beta1.QueryDenomMetadataResponse + * @static + * @param {cosmos.bank.v1beta1.IQueryDenomMetadataResponse} message QueryDenomMetadataResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDenomMetadataResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryDenomMetadataResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.bank.v1beta1.QueryDenomMetadataResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.bank.v1beta1.QueryDenomMetadataResponse} QueryDenomMetadataResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDenomMetadataResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.bank.v1beta1.QueryDenomMetadataResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.metadata = $root.cosmos.bank.v1beta1.Metadata.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryDenomMetadataResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.bank.v1beta1.QueryDenomMetadataResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.bank.v1beta1.QueryDenomMetadataResponse} QueryDenomMetadataResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDenomMetadataResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryDenomMetadataResponse message. + * @function verify + * @memberof cosmos.bank.v1beta1.QueryDenomMetadataResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryDenomMetadataResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.metadata != null && message.hasOwnProperty("metadata")) { + let error = $root.cosmos.bank.v1beta1.Metadata.verify(message.metadata); + if (error) + return "metadata." + error; + } + return null; + }; + + /** + * Creates a QueryDenomMetadataResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.bank.v1beta1.QueryDenomMetadataResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.bank.v1beta1.QueryDenomMetadataResponse} QueryDenomMetadataResponse + */ + QueryDenomMetadataResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.bank.v1beta1.QueryDenomMetadataResponse) + return object; + let message = new $root.cosmos.bank.v1beta1.QueryDenomMetadataResponse(); + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".cosmos.bank.v1beta1.QueryDenomMetadataResponse.metadata: object expected"); + message.metadata = $root.cosmos.bank.v1beta1.Metadata.fromObject(object.metadata); + } + return message; + }; + + /** + * Creates a plain object from a QueryDenomMetadataResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.bank.v1beta1.QueryDenomMetadataResponse + * @static + * @param {cosmos.bank.v1beta1.QueryDenomMetadataResponse} message QueryDenomMetadataResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryDenomMetadataResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.metadata = null; + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.cosmos.bank.v1beta1.Metadata.toObject(message.metadata, options); + return object; + }; + + /** + * Converts this QueryDenomMetadataResponse to JSON. + * @function toJSON + * @memberof cosmos.bank.v1beta1.QueryDenomMetadataResponse + * @instance + * @returns {Object.} JSON object + */ + QueryDenomMetadataResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryDenomMetadataResponse; + })(v1beta1.QueryDenomMetadataResponse || {}); + + v1beta1.Msg = (function(Msg) { + + /** + * Constructs a new Msg service. + * @memberof cosmos.bank.v1beta1 + * @classdesc Represents a Msg + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Msg(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Msg.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Msg; + + /** + * Creates new Msg service using the specified rpc implementation. + * @function create + * @memberof cosmos.bank.v1beta1.Msg + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Msg} RPC service. Useful where requests and/or responses are streamed. + */ + Msg.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link cosmos.bank.v1beta1.Msg#send}. + * @memberof cosmos.bank.v1beta1.Msg + * @typedef SendCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.bank.v1beta1.IMsgSendResponse} [response] MsgSendResponse + */ + + /** + * Calls Send. + * @function send + * @memberof cosmos.bank.v1beta1.Msg + * @instance + * @param {cosmos.bank.v1beta1.IMsgSend} request MsgSend message or plain object + * @param {cosmos.bank.v1beta1.Msg.SendCallback} callback Node-style callback called with the error, if any, and MsgSendResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Msg.prototype.send = function send(request, callback) { + return this.rpcCall(send, $root.cosmos.bank.v1beta1.MsgSend, $root.cosmos.bank.v1beta1.MsgSendResponse, request, callback); + }, "name", { value: "Send" }); + + /** + * Calls Send. + * @function send + * @memberof cosmos.bank.v1beta1.Msg + * @instance + * @param {cosmos.bank.v1beta1.IMsgSend} request MsgSend message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link cosmos.bank.v1beta1.Msg#multiSend}. + * @memberof cosmos.bank.v1beta1.Msg + * @typedef MultiSendCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.bank.v1beta1.IMsgMultiSendResponse} [response] MsgMultiSendResponse + */ + + /** + * Calls MultiSend. + * @function multiSend + * @memberof cosmos.bank.v1beta1.Msg + * @instance + * @param {cosmos.bank.v1beta1.IMsgMultiSend} request MsgMultiSend message or plain object + * @param {cosmos.bank.v1beta1.Msg.MultiSendCallback} callback Node-style callback called with the error, if any, and MsgMultiSendResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Msg.prototype.multiSend = function multiSend(request, callback) { + return this.rpcCall(multiSend, $root.cosmos.bank.v1beta1.MsgMultiSend, $root.cosmos.bank.v1beta1.MsgMultiSendResponse, request, callback); + }, "name", { value: "MultiSend" }); + + /** + * Calls MultiSend. + * @function multiSend + * @memberof cosmos.bank.v1beta1.Msg + * @instance + * @param {cosmos.bank.v1beta1.IMsgMultiSend} request MsgMultiSend message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Msg; + })(v1beta1.Msg || {}); + + v1beta1.MsgSend = (function(MsgSend) { + + /** + * Properties of a MsgSend. + * @memberof cosmos.bank.v1beta1 + * @interface IMsgSend + * @property {string|null} [fromAddress] MsgSend fromAddress + * @property {string|null} [toAddress] MsgSend toAddress + * @property {Array.|null} [amount] MsgSend amount + */ + + /** + * Constructs a new MsgSend. + * @memberof cosmos.bank.v1beta1 + * @classdesc Represents a MsgSend. + * @implements IMsgSend + * @constructor + * @param {cosmos.bank.v1beta1.IMsgSend=} [properties] Properties to set + */ + function MsgSend(properties) { + this.amount = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgSend fromAddress. + * @member {string} fromAddress + * @memberof cosmos.bank.v1beta1.MsgSend + * @instance + */ + MsgSend.prototype.fromAddress = ""; + + /** + * MsgSend toAddress. + * @member {string} toAddress + * @memberof cosmos.bank.v1beta1.MsgSend + * @instance + */ + MsgSend.prototype.toAddress = ""; + + /** + * MsgSend amount. + * @member {Array.} amount + * @memberof cosmos.bank.v1beta1.MsgSend + * @instance + */ + MsgSend.prototype.amount = $util.emptyArray; + + /** + * Creates a new MsgSend instance using the specified properties. + * @function create + * @memberof cosmos.bank.v1beta1.MsgSend + * @static + * @param {cosmos.bank.v1beta1.IMsgSend=} [properties] Properties to set + * @returns {cosmos.bank.v1beta1.MsgSend} MsgSend instance + */ + MsgSend.create = function create(properties) { + return new MsgSend(properties); + }; + + /** + * Encodes the specified MsgSend message. Does not implicitly {@link cosmos.bank.v1beta1.MsgSend.verify|verify} messages. + * @function encode + * @memberof cosmos.bank.v1beta1.MsgSend + * @static + * @param {cosmos.bank.v1beta1.IMsgSend} message MsgSend message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgSend.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fromAddress != null && Object.hasOwnProperty.call(message, "fromAddress")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.fromAddress); + if (message.toAddress != null && Object.hasOwnProperty.call(message, "toAddress")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.toAddress); + if (message.amount != null && message.amount.length) + for (let i = 0; i < message.amount.length; ++i) + $root.cosmos.base.v1beta1.Coin.encode(message.amount[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MsgSend message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.MsgSend.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.bank.v1beta1.MsgSend + * @static + * @param {cosmos.bank.v1beta1.IMsgSend} message MsgSend message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgSend.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgSend message from the specified reader or buffer. + * @function decode + * @memberof cosmos.bank.v1beta1.MsgSend + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.bank.v1beta1.MsgSend} MsgSend + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgSend.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.bank.v1beta1.MsgSend(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.fromAddress = reader.string(); + break; + case 2: + message.toAddress = reader.string(); + break; + case 3: + if (!(message.amount && message.amount.length)) + message.amount = []; + message.amount.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgSend message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.bank.v1beta1.MsgSend + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.bank.v1beta1.MsgSend} MsgSend + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgSend.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgSend message. + * @function verify + * @memberof cosmos.bank.v1beta1.MsgSend + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgSend.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fromAddress != null && message.hasOwnProperty("fromAddress")) + if (!$util.isString(message.fromAddress)) + return "fromAddress: string expected"; + if (message.toAddress != null && message.hasOwnProperty("toAddress")) + if (!$util.isString(message.toAddress)) + return "toAddress: string expected"; + if (message.amount != null && message.hasOwnProperty("amount")) { + if (!Array.isArray(message.amount)) + return "amount: array expected"; + for (let i = 0; i < message.amount.length; ++i) { + let error = $root.cosmos.base.v1beta1.Coin.verify(message.amount[i]); + if (error) + return "amount." + error; + } + } + return null; + }; + + /** + * Creates a MsgSend message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.bank.v1beta1.MsgSend + * @static + * @param {Object.} object Plain object + * @returns {cosmos.bank.v1beta1.MsgSend} MsgSend + */ + MsgSend.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.bank.v1beta1.MsgSend) + return object; + let message = new $root.cosmos.bank.v1beta1.MsgSend(); + if (object.fromAddress != null) + message.fromAddress = String(object.fromAddress); + if (object.toAddress != null) + message.toAddress = String(object.toAddress); + if (object.amount) { + if (!Array.isArray(object.amount)) + throw TypeError(".cosmos.bank.v1beta1.MsgSend.amount: array expected"); + message.amount = []; + for (let i = 0; i < object.amount.length; ++i) { + if (typeof object.amount[i] !== "object") + throw TypeError(".cosmos.bank.v1beta1.MsgSend.amount: object expected"); + message.amount[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.amount[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a MsgSend message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.bank.v1beta1.MsgSend + * @static + * @param {cosmos.bank.v1beta1.MsgSend} message MsgSend + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgSend.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.amount = []; + if (options.defaults) { + object.fromAddress = ""; + object.toAddress = ""; + } + if (message.fromAddress != null && message.hasOwnProperty("fromAddress")) + object.fromAddress = message.fromAddress; + if (message.toAddress != null && message.hasOwnProperty("toAddress")) + object.toAddress = message.toAddress; + if (message.amount && message.amount.length) { + object.amount = []; + for (let j = 0; j < message.amount.length; ++j) + object.amount[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.amount[j], options); + } + return object; + }; + + /** + * Converts this MsgSend to JSON. + * @function toJSON + * @memberof cosmos.bank.v1beta1.MsgSend + * @instance + * @returns {Object.} JSON object + */ + MsgSend.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgSend; + })(v1beta1.MsgSend || {}); + + v1beta1.MsgSendResponse = (function(MsgSendResponse) { + + /** + * Properties of a MsgSendResponse. + * @memberof cosmos.bank.v1beta1 + * @interface IMsgSendResponse + */ + + /** + * Constructs a new MsgSendResponse. + * @memberof cosmos.bank.v1beta1 + * @classdesc Represents a MsgSendResponse. + * @implements IMsgSendResponse + * @constructor + * @param {cosmos.bank.v1beta1.IMsgSendResponse=} [properties] Properties to set + */ + function MsgSendResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new MsgSendResponse instance using the specified properties. + * @function create + * @memberof cosmos.bank.v1beta1.MsgSendResponse + * @static + * @param {cosmos.bank.v1beta1.IMsgSendResponse=} [properties] Properties to set + * @returns {cosmos.bank.v1beta1.MsgSendResponse} MsgSendResponse instance + */ + MsgSendResponse.create = function create(properties) { + return new MsgSendResponse(properties); + }; + + /** + * Encodes the specified MsgSendResponse message. Does not implicitly {@link cosmos.bank.v1beta1.MsgSendResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.bank.v1beta1.MsgSendResponse + * @static + * @param {cosmos.bank.v1beta1.IMsgSendResponse} message MsgSendResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgSendResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MsgSendResponse message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.MsgSendResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.bank.v1beta1.MsgSendResponse + * @static + * @param {cosmos.bank.v1beta1.IMsgSendResponse} message MsgSendResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgSendResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgSendResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.bank.v1beta1.MsgSendResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.bank.v1beta1.MsgSendResponse} MsgSendResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgSendResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.bank.v1beta1.MsgSendResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgSendResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.bank.v1beta1.MsgSendResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.bank.v1beta1.MsgSendResponse} MsgSendResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgSendResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgSendResponse message. + * @function verify + * @memberof cosmos.bank.v1beta1.MsgSendResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgSendResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MsgSendResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.bank.v1beta1.MsgSendResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.bank.v1beta1.MsgSendResponse} MsgSendResponse + */ + MsgSendResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.bank.v1beta1.MsgSendResponse) + return object; + return new $root.cosmos.bank.v1beta1.MsgSendResponse(); + }; + + /** + * Creates a plain object from a MsgSendResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.bank.v1beta1.MsgSendResponse + * @static + * @param {cosmos.bank.v1beta1.MsgSendResponse} message MsgSendResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgSendResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MsgSendResponse to JSON. + * @function toJSON + * @memberof cosmos.bank.v1beta1.MsgSendResponse + * @instance + * @returns {Object.} JSON object + */ + MsgSendResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgSendResponse; + })(v1beta1.MsgSendResponse || {}); + + v1beta1.MsgMultiSend = (function(MsgMultiSend) { + + /** + * Properties of a MsgMultiSend. + * @memberof cosmos.bank.v1beta1 + * @interface IMsgMultiSend + * @property {Array.|null} [inputs] MsgMultiSend inputs + * @property {Array.|null} [outputs] MsgMultiSend outputs + */ + + /** + * Constructs a new MsgMultiSend. + * @memberof cosmos.bank.v1beta1 + * @classdesc Represents a MsgMultiSend. + * @implements IMsgMultiSend + * @constructor + * @param {cosmos.bank.v1beta1.IMsgMultiSend=} [properties] Properties to set + */ + function MsgMultiSend(properties) { + this.inputs = []; + this.outputs = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgMultiSend inputs. + * @member {Array.} inputs + * @memberof cosmos.bank.v1beta1.MsgMultiSend + * @instance + */ + MsgMultiSend.prototype.inputs = $util.emptyArray; + + /** + * MsgMultiSend outputs. + * @member {Array.} outputs + * @memberof cosmos.bank.v1beta1.MsgMultiSend + * @instance + */ + MsgMultiSend.prototype.outputs = $util.emptyArray; + + /** + * Creates a new MsgMultiSend instance using the specified properties. + * @function create + * @memberof cosmos.bank.v1beta1.MsgMultiSend + * @static + * @param {cosmos.bank.v1beta1.IMsgMultiSend=} [properties] Properties to set + * @returns {cosmos.bank.v1beta1.MsgMultiSend} MsgMultiSend instance + */ + MsgMultiSend.create = function create(properties) { + return new MsgMultiSend(properties); + }; + + /** + * Encodes the specified MsgMultiSend message. Does not implicitly {@link cosmos.bank.v1beta1.MsgMultiSend.verify|verify} messages. + * @function encode + * @memberof cosmos.bank.v1beta1.MsgMultiSend + * @static + * @param {cosmos.bank.v1beta1.IMsgMultiSend} message MsgMultiSend message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgMultiSend.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.inputs != null && message.inputs.length) + for (let i = 0; i < message.inputs.length; ++i) + $root.cosmos.bank.v1beta1.Input.encode(message.inputs[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.outputs != null && message.outputs.length) + for (let i = 0; i < message.outputs.length; ++i) + $root.cosmos.bank.v1beta1.Output.encode(message.outputs[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MsgMultiSend message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.MsgMultiSend.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.bank.v1beta1.MsgMultiSend + * @static + * @param {cosmos.bank.v1beta1.IMsgMultiSend} message MsgMultiSend message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgMultiSend.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgMultiSend message from the specified reader or buffer. + * @function decode + * @memberof cosmos.bank.v1beta1.MsgMultiSend + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.bank.v1beta1.MsgMultiSend} MsgMultiSend + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgMultiSend.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.bank.v1beta1.MsgMultiSend(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.inputs && message.inputs.length)) + message.inputs = []; + message.inputs.push($root.cosmos.bank.v1beta1.Input.decode(reader, reader.uint32())); + break; + case 2: + if (!(message.outputs && message.outputs.length)) + message.outputs = []; + message.outputs.push($root.cosmos.bank.v1beta1.Output.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgMultiSend message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.bank.v1beta1.MsgMultiSend + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.bank.v1beta1.MsgMultiSend} MsgMultiSend + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgMultiSend.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgMultiSend message. + * @function verify + * @memberof cosmos.bank.v1beta1.MsgMultiSend + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgMultiSend.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.inputs != null && message.hasOwnProperty("inputs")) { + if (!Array.isArray(message.inputs)) + return "inputs: array expected"; + for (let i = 0; i < message.inputs.length; ++i) { + let error = $root.cosmos.bank.v1beta1.Input.verify(message.inputs[i]); + if (error) + return "inputs." + error; + } + } + if (message.outputs != null && message.hasOwnProperty("outputs")) { + if (!Array.isArray(message.outputs)) + return "outputs: array expected"; + for (let i = 0; i < message.outputs.length; ++i) { + let error = $root.cosmos.bank.v1beta1.Output.verify(message.outputs[i]); + if (error) + return "outputs." + error; + } + } + return null; + }; + + /** + * Creates a MsgMultiSend message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.bank.v1beta1.MsgMultiSend + * @static + * @param {Object.} object Plain object + * @returns {cosmos.bank.v1beta1.MsgMultiSend} MsgMultiSend + */ + MsgMultiSend.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.bank.v1beta1.MsgMultiSend) + return object; + let message = new $root.cosmos.bank.v1beta1.MsgMultiSend(); + if (object.inputs) { + if (!Array.isArray(object.inputs)) + throw TypeError(".cosmos.bank.v1beta1.MsgMultiSend.inputs: array expected"); + message.inputs = []; + for (let i = 0; i < object.inputs.length; ++i) { + if (typeof object.inputs[i] !== "object") + throw TypeError(".cosmos.bank.v1beta1.MsgMultiSend.inputs: object expected"); + message.inputs[i] = $root.cosmos.bank.v1beta1.Input.fromObject(object.inputs[i]); + } + } + if (object.outputs) { + if (!Array.isArray(object.outputs)) + throw TypeError(".cosmos.bank.v1beta1.MsgMultiSend.outputs: array expected"); + message.outputs = []; + for (let i = 0; i < object.outputs.length; ++i) { + if (typeof object.outputs[i] !== "object") + throw TypeError(".cosmos.bank.v1beta1.MsgMultiSend.outputs: object expected"); + message.outputs[i] = $root.cosmos.bank.v1beta1.Output.fromObject(object.outputs[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a MsgMultiSend message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.bank.v1beta1.MsgMultiSend + * @static + * @param {cosmos.bank.v1beta1.MsgMultiSend} message MsgMultiSend + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgMultiSend.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) { + object.inputs = []; + object.outputs = []; + } + if (message.inputs && message.inputs.length) { + object.inputs = []; + for (let j = 0; j < message.inputs.length; ++j) + object.inputs[j] = $root.cosmos.bank.v1beta1.Input.toObject(message.inputs[j], options); + } + if (message.outputs && message.outputs.length) { + object.outputs = []; + for (let j = 0; j < message.outputs.length; ++j) + object.outputs[j] = $root.cosmos.bank.v1beta1.Output.toObject(message.outputs[j], options); + } + return object; + }; + + /** + * Converts this MsgMultiSend to JSON. + * @function toJSON + * @memberof cosmos.bank.v1beta1.MsgMultiSend + * @instance + * @returns {Object.} JSON object + */ + MsgMultiSend.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgMultiSend; + })(v1beta1.MsgMultiSend || {}); + + v1beta1.MsgMultiSendResponse = (function(MsgMultiSendResponse) { + + /** + * Properties of a MsgMultiSendResponse. + * @memberof cosmos.bank.v1beta1 + * @interface IMsgMultiSendResponse + */ + + /** + * Constructs a new MsgMultiSendResponse. + * @memberof cosmos.bank.v1beta1 + * @classdesc Represents a MsgMultiSendResponse. + * @implements IMsgMultiSendResponse + * @constructor + * @param {cosmos.bank.v1beta1.IMsgMultiSendResponse=} [properties] Properties to set + */ + function MsgMultiSendResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new MsgMultiSendResponse instance using the specified properties. + * @function create + * @memberof cosmos.bank.v1beta1.MsgMultiSendResponse + * @static + * @param {cosmos.bank.v1beta1.IMsgMultiSendResponse=} [properties] Properties to set + * @returns {cosmos.bank.v1beta1.MsgMultiSendResponse} MsgMultiSendResponse instance + */ + MsgMultiSendResponse.create = function create(properties) { + return new MsgMultiSendResponse(properties); + }; + + /** + * Encodes the specified MsgMultiSendResponse message. Does not implicitly {@link cosmos.bank.v1beta1.MsgMultiSendResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.bank.v1beta1.MsgMultiSendResponse + * @static + * @param {cosmos.bank.v1beta1.IMsgMultiSendResponse} message MsgMultiSendResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgMultiSendResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MsgMultiSendResponse message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.MsgMultiSendResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.bank.v1beta1.MsgMultiSendResponse + * @static + * @param {cosmos.bank.v1beta1.IMsgMultiSendResponse} message MsgMultiSendResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgMultiSendResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgMultiSendResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.bank.v1beta1.MsgMultiSendResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.bank.v1beta1.MsgMultiSendResponse} MsgMultiSendResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgMultiSendResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.bank.v1beta1.MsgMultiSendResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgMultiSendResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.bank.v1beta1.MsgMultiSendResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.bank.v1beta1.MsgMultiSendResponse} MsgMultiSendResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgMultiSendResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgMultiSendResponse message. + * @function verify + * @memberof cosmos.bank.v1beta1.MsgMultiSendResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgMultiSendResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MsgMultiSendResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.bank.v1beta1.MsgMultiSendResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.bank.v1beta1.MsgMultiSendResponse} MsgMultiSendResponse + */ + MsgMultiSendResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.bank.v1beta1.MsgMultiSendResponse) + return object; + return new $root.cosmos.bank.v1beta1.MsgMultiSendResponse(); + }; + + /** + * Creates a plain object from a MsgMultiSendResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.bank.v1beta1.MsgMultiSendResponse + * @static + * @param {cosmos.bank.v1beta1.MsgMultiSendResponse} message MsgMultiSendResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgMultiSendResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MsgMultiSendResponse to JSON. + * @function toJSON + * @memberof cosmos.bank.v1beta1.MsgMultiSendResponse + * @instance + * @returns {Object.} JSON object + */ + MsgMultiSendResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgMultiSendResponse; + })(v1beta1.MsgMultiSendResponse || {}); + + return v1beta1; + })(bank.v1beta1 || {}); + + return bank; + })(cosmos.bank || {}); + + /** + * Namespace base. + * @memberof cosmos + * @namespace + */ + + cosmos.base = (function(base) { + + /** + * Namespace abci. + * @memberof cosmos.base + * @namespace + */ + + base.abci = (function(abci) { + + /** + * Namespace v1beta1. + * @memberof cosmos.base.abci + * @namespace + */ + + abci.v1beta1 = (function(v1beta1) { + + v1beta1.TxResponse = (function(TxResponse) { + + /** + * Properties of a TxResponse. + * @memberof cosmos.base.abci.v1beta1 + * @interface ITxResponse + * @property {number|Long|null} [height] TxResponse height + * @property {string|null} [txhash] TxResponse txhash + * @property {string|null} [codespace] TxResponse codespace + * @property {number|null} [code] TxResponse code + * @property {string|null} [data] TxResponse data + * @property {string|null} [rawLog] TxResponse rawLog + * @property {Array.|null} [logs] TxResponse logs + * @property {string|null} [info] TxResponse info + * @property {number|Long|null} [gasWanted] TxResponse gasWanted + * @property {number|Long|null} [gasUsed] TxResponse gasUsed + * @property {google.protobuf.IAny|null} [tx] TxResponse tx + * @property {string|null} [timestamp] TxResponse timestamp + */ + + /** + * Constructs a new TxResponse. + * @memberof cosmos.base.abci.v1beta1 + * @classdesc Represents a TxResponse. + * @implements ITxResponse + * @constructor + * @param {cosmos.base.abci.v1beta1.ITxResponse=} [properties] Properties to set + */ + function TxResponse(properties) { + this.logs = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TxResponse height. + * @member {number|Long} height + * @memberof cosmos.base.abci.v1beta1.TxResponse + * @instance + */ + TxResponse.prototype.height = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * TxResponse txhash. + * @member {string} txhash + * @memberof cosmos.base.abci.v1beta1.TxResponse + * @instance + */ + TxResponse.prototype.txhash = ""; + + /** + * TxResponse codespace. + * @member {string} codespace + * @memberof cosmos.base.abci.v1beta1.TxResponse + * @instance + */ + TxResponse.prototype.codespace = ""; + + /** + * TxResponse code. + * @member {number} code + * @memberof cosmos.base.abci.v1beta1.TxResponse + * @instance + */ + TxResponse.prototype.code = 0; + + /** + * TxResponse data. + * @member {string} data + * @memberof cosmos.base.abci.v1beta1.TxResponse + * @instance + */ + TxResponse.prototype.data = ""; + + /** + * TxResponse rawLog. + * @member {string} rawLog + * @memberof cosmos.base.abci.v1beta1.TxResponse + * @instance + */ + TxResponse.prototype.rawLog = ""; + + /** + * TxResponse logs. + * @member {Array.} logs + * @memberof cosmos.base.abci.v1beta1.TxResponse + * @instance + */ + TxResponse.prototype.logs = $util.emptyArray; + + /** + * TxResponse info. + * @member {string} info + * @memberof cosmos.base.abci.v1beta1.TxResponse + * @instance + */ + TxResponse.prototype.info = ""; + + /** + * TxResponse gasWanted. + * @member {number|Long} gasWanted + * @memberof cosmos.base.abci.v1beta1.TxResponse + * @instance + */ + TxResponse.prototype.gasWanted = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * TxResponse gasUsed. + * @member {number|Long} gasUsed + * @memberof cosmos.base.abci.v1beta1.TxResponse + * @instance + */ + TxResponse.prototype.gasUsed = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * TxResponse tx. + * @member {google.protobuf.IAny|null|undefined} tx + * @memberof cosmos.base.abci.v1beta1.TxResponse + * @instance + */ + TxResponse.prototype.tx = null; + + /** + * TxResponse timestamp. + * @member {string} timestamp + * @memberof cosmos.base.abci.v1beta1.TxResponse + * @instance + */ + TxResponse.prototype.timestamp = ""; + + /** + * Creates a new TxResponse instance using the specified properties. + * @function create + * @memberof cosmos.base.abci.v1beta1.TxResponse + * @static + * @param {cosmos.base.abci.v1beta1.ITxResponse=} [properties] Properties to set + * @returns {cosmos.base.abci.v1beta1.TxResponse} TxResponse instance + */ + TxResponse.create = function create(properties) { + return new TxResponse(properties); + }; + + /** + * Encodes the specified TxResponse message. Does not implicitly {@link cosmos.base.abci.v1beta1.TxResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.base.abci.v1beta1.TxResponse + * @static + * @param {cosmos.base.abci.v1beta1.ITxResponse} message TxResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TxResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.height != null && Object.hasOwnProperty.call(message, "height")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.height); + if (message.txhash != null && Object.hasOwnProperty.call(message, "txhash")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.txhash); + if (message.codespace != null && Object.hasOwnProperty.call(message, "codespace")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.codespace); + if (message.code != null && Object.hasOwnProperty.call(message, "code")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.code); + if (message.data != null && Object.hasOwnProperty.call(message, "data")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.data); + if (message.rawLog != null && Object.hasOwnProperty.call(message, "rawLog")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.rawLog); + if (message.logs != null && message.logs.length) + for (let i = 0; i < message.logs.length; ++i) + $root.cosmos.base.abci.v1beta1.ABCIMessageLog.encode(message.logs[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.info != null && Object.hasOwnProperty.call(message, "info")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.info); + if (message.gasWanted != null && Object.hasOwnProperty.call(message, "gasWanted")) + writer.uint32(/* id 9, wireType 0 =*/72).int64(message.gasWanted); + if (message.gasUsed != null && Object.hasOwnProperty.call(message, "gasUsed")) + writer.uint32(/* id 10, wireType 0 =*/80).int64(message.gasUsed); + if (message.tx != null && Object.hasOwnProperty.call(message, "tx")) + $root.google.protobuf.Any.encode(message.tx, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.timestamp); + return writer; + }; + + /** + * Encodes the specified TxResponse message, length delimited. Does not implicitly {@link cosmos.base.abci.v1beta1.TxResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.base.abci.v1beta1.TxResponse + * @static + * @param {cosmos.base.abci.v1beta1.ITxResponse} message TxResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TxResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TxResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.base.abci.v1beta1.TxResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.base.abci.v1beta1.TxResponse} TxResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TxResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.abci.v1beta1.TxResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.height = reader.int64(); + break; + case 2: + message.txhash = reader.string(); + break; + case 3: + message.codespace = reader.string(); + break; + case 4: + message.code = reader.uint32(); + break; + case 5: + message.data = reader.string(); + break; + case 6: + message.rawLog = reader.string(); + break; + case 7: + if (!(message.logs && message.logs.length)) + message.logs = []; + message.logs.push($root.cosmos.base.abci.v1beta1.ABCIMessageLog.decode(reader, reader.uint32())); + break; + case 8: + message.info = reader.string(); + break; + case 9: + message.gasWanted = reader.int64(); + break; + case 10: + message.gasUsed = reader.int64(); + break; + case 11: + message.tx = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + case 12: + message.timestamp = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TxResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.base.abci.v1beta1.TxResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.base.abci.v1beta1.TxResponse} TxResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TxResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TxResponse message. + * @function verify + * @memberof cosmos.base.abci.v1beta1.TxResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TxResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.height != null && message.hasOwnProperty("height")) + if (!$util.isInteger(message.height) && !(message.height && $util.isInteger(message.height.low) && $util.isInteger(message.height.high))) + return "height: integer|Long expected"; + if (message.txhash != null && message.hasOwnProperty("txhash")) + if (!$util.isString(message.txhash)) + return "txhash: string expected"; + if (message.codespace != null && message.hasOwnProperty("codespace")) + if (!$util.isString(message.codespace)) + return "codespace: string expected"; + if (message.code != null && message.hasOwnProperty("code")) + if (!$util.isInteger(message.code)) + return "code: integer expected"; + if (message.data != null && message.hasOwnProperty("data")) + if (!$util.isString(message.data)) + return "data: string expected"; + if (message.rawLog != null && message.hasOwnProperty("rawLog")) + if (!$util.isString(message.rawLog)) + return "rawLog: string expected"; + if (message.logs != null && message.hasOwnProperty("logs")) { + if (!Array.isArray(message.logs)) + return "logs: array expected"; + for (let i = 0; i < message.logs.length; ++i) { + let error = $root.cosmos.base.abci.v1beta1.ABCIMessageLog.verify(message.logs[i]); + if (error) + return "logs." + error; + } + } + if (message.info != null && message.hasOwnProperty("info")) + if (!$util.isString(message.info)) + return "info: string expected"; + if (message.gasWanted != null && message.hasOwnProperty("gasWanted")) + if (!$util.isInteger(message.gasWanted) && !(message.gasWanted && $util.isInteger(message.gasWanted.low) && $util.isInteger(message.gasWanted.high))) + return "gasWanted: integer|Long expected"; + if (message.gasUsed != null && message.hasOwnProperty("gasUsed")) + if (!$util.isInteger(message.gasUsed) && !(message.gasUsed && $util.isInteger(message.gasUsed.low) && $util.isInteger(message.gasUsed.high))) + return "gasUsed: integer|Long expected"; + if (message.tx != null && message.hasOwnProperty("tx")) { + let error = $root.google.protobuf.Any.verify(message.tx); + if (error) + return "tx." + error; + } + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + if (!$util.isString(message.timestamp)) + return "timestamp: string expected"; + return null; + }; + + /** + * Creates a TxResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.base.abci.v1beta1.TxResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.base.abci.v1beta1.TxResponse} TxResponse + */ + TxResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.base.abci.v1beta1.TxResponse) + return object; + let message = new $root.cosmos.base.abci.v1beta1.TxResponse(); + if (object.height != null) + if ($util.Long) + (message.height = $util.Long.fromValue(object.height)).unsigned = false; + else if (typeof object.height === "string") + message.height = parseInt(object.height, 10); + else if (typeof object.height === "number") + message.height = object.height; + else if (typeof object.height === "object") + message.height = new $util.LongBits(object.height.low >>> 0, object.height.high >>> 0).toNumber(); + if (object.txhash != null) + message.txhash = String(object.txhash); + if (object.codespace != null) + message.codespace = String(object.codespace); + if (object.code != null) + message.code = object.code >>> 0; + if (object.data != null) + message.data = String(object.data); + if (object.rawLog != null) + message.rawLog = String(object.rawLog); + if (object.logs) { + if (!Array.isArray(object.logs)) + throw TypeError(".cosmos.base.abci.v1beta1.TxResponse.logs: array expected"); + message.logs = []; + for (let i = 0; i < object.logs.length; ++i) { + if (typeof object.logs[i] !== "object") + throw TypeError(".cosmos.base.abci.v1beta1.TxResponse.logs: object expected"); + message.logs[i] = $root.cosmos.base.abci.v1beta1.ABCIMessageLog.fromObject(object.logs[i]); + } + } + if (object.info != null) + message.info = String(object.info); + if (object.gasWanted != null) + if ($util.Long) + (message.gasWanted = $util.Long.fromValue(object.gasWanted)).unsigned = false; + else if (typeof object.gasWanted === "string") + message.gasWanted = parseInt(object.gasWanted, 10); + else if (typeof object.gasWanted === "number") + message.gasWanted = object.gasWanted; + else if (typeof object.gasWanted === "object") + message.gasWanted = new $util.LongBits(object.gasWanted.low >>> 0, object.gasWanted.high >>> 0).toNumber(); + if (object.gasUsed != null) + if ($util.Long) + (message.gasUsed = $util.Long.fromValue(object.gasUsed)).unsigned = false; + else if (typeof object.gasUsed === "string") + message.gasUsed = parseInt(object.gasUsed, 10); + else if (typeof object.gasUsed === "number") + message.gasUsed = object.gasUsed; + else if (typeof object.gasUsed === "object") + message.gasUsed = new $util.LongBits(object.gasUsed.low >>> 0, object.gasUsed.high >>> 0).toNumber(); + if (object.tx != null) { + if (typeof object.tx !== "object") + throw TypeError(".cosmos.base.abci.v1beta1.TxResponse.tx: object expected"); + message.tx = $root.google.protobuf.Any.fromObject(object.tx); + } + if (object.timestamp != null) + message.timestamp = String(object.timestamp); + return message; + }; + + /** + * Creates a plain object from a TxResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.base.abci.v1beta1.TxResponse + * @static + * @param {cosmos.base.abci.v1beta1.TxResponse} message TxResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TxResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.logs = []; + if (options.defaults) { + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.height = options.longs === String ? "0" : 0; + object.txhash = ""; + object.codespace = ""; + object.code = 0; + object.data = ""; + object.rawLog = ""; + object.info = ""; + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.gasWanted = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.gasWanted = options.longs === String ? "0" : 0; + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.gasUsed = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.gasUsed = options.longs === String ? "0" : 0; + object.tx = null; + object.timestamp = ""; + } + if (message.height != null && message.hasOwnProperty("height")) + if (typeof message.height === "number") + object.height = options.longs === String ? String(message.height) : message.height; + else + object.height = options.longs === String ? $util.Long.prototype.toString.call(message.height) : options.longs === Number ? new $util.LongBits(message.height.low >>> 0, message.height.high >>> 0).toNumber() : message.height; + if (message.txhash != null && message.hasOwnProperty("txhash")) + object.txhash = message.txhash; + if (message.codespace != null && message.hasOwnProperty("codespace")) + object.codespace = message.codespace; + if (message.code != null && message.hasOwnProperty("code")) + object.code = message.code; + if (message.data != null && message.hasOwnProperty("data")) + object.data = message.data; + if (message.rawLog != null && message.hasOwnProperty("rawLog")) + object.rawLog = message.rawLog; + if (message.logs && message.logs.length) { + object.logs = []; + for (let j = 0; j < message.logs.length; ++j) + object.logs[j] = $root.cosmos.base.abci.v1beta1.ABCIMessageLog.toObject(message.logs[j], options); + } + if (message.info != null && message.hasOwnProperty("info")) + object.info = message.info; + if (message.gasWanted != null && message.hasOwnProperty("gasWanted")) + if (typeof message.gasWanted === "number") + object.gasWanted = options.longs === String ? String(message.gasWanted) : message.gasWanted; + else + object.gasWanted = options.longs === String ? $util.Long.prototype.toString.call(message.gasWanted) : options.longs === Number ? new $util.LongBits(message.gasWanted.low >>> 0, message.gasWanted.high >>> 0).toNumber() : message.gasWanted; + if (message.gasUsed != null && message.hasOwnProperty("gasUsed")) + if (typeof message.gasUsed === "number") + object.gasUsed = options.longs === String ? String(message.gasUsed) : message.gasUsed; + else + object.gasUsed = options.longs === String ? $util.Long.prototype.toString.call(message.gasUsed) : options.longs === Number ? new $util.LongBits(message.gasUsed.low >>> 0, message.gasUsed.high >>> 0).toNumber() : message.gasUsed; + if (message.tx != null && message.hasOwnProperty("tx")) + object.tx = $root.google.protobuf.Any.toObject(message.tx, options); + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + object.timestamp = message.timestamp; + return object; + }; + + /** + * Converts this TxResponse to JSON. + * @function toJSON + * @memberof cosmos.base.abci.v1beta1.TxResponse + * @instance + * @returns {Object.} JSON object + */ + TxResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TxResponse; + })(v1beta1.TxResponse || {}); + + v1beta1.ABCIMessageLog = (function(ABCIMessageLog) { + + /** + * Properties of a ABCIMessageLog. + * @memberof cosmos.base.abci.v1beta1 + * @interface IABCIMessageLog + * @property {number|null} [msgIndex] ABCIMessageLog msgIndex + * @property {string|null} [log] ABCIMessageLog log + * @property {Array.|null} [events] ABCIMessageLog events + */ + + /** + * Constructs a new ABCIMessageLog. + * @memberof cosmos.base.abci.v1beta1 + * @classdesc Represents a ABCIMessageLog. + * @implements IABCIMessageLog + * @constructor + * @param {cosmos.base.abci.v1beta1.IABCIMessageLog=} [properties] Properties to set + */ + function ABCIMessageLog(properties) { + this.events = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ABCIMessageLog msgIndex. + * @member {number} msgIndex + * @memberof cosmos.base.abci.v1beta1.ABCIMessageLog + * @instance + */ + ABCIMessageLog.prototype.msgIndex = 0; + + /** + * ABCIMessageLog log. + * @member {string} log + * @memberof cosmos.base.abci.v1beta1.ABCIMessageLog + * @instance + */ + ABCIMessageLog.prototype.log = ""; + + /** + * ABCIMessageLog events. + * @member {Array.} events + * @memberof cosmos.base.abci.v1beta1.ABCIMessageLog + * @instance + */ + ABCIMessageLog.prototype.events = $util.emptyArray; + + /** + * Creates a new ABCIMessageLog instance using the specified properties. + * @function create + * @memberof cosmos.base.abci.v1beta1.ABCIMessageLog + * @static + * @param {cosmos.base.abci.v1beta1.IABCIMessageLog=} [properties] Properties to set + * @returns {cosmos.base.abci.v1beta1.ABCIMessageLog} ABCIMessageLog instance + */ + ABCIMessageLog.create = function create(properties) { + return new ABCIMessageLog(properties); + }; + + /** + * Encodes the specified ABCIMessageLog message. Does not implicitly {@link cosmos.base.abci.v1beta1.ABCIMessageLog.verify|verify} messages. + * @function encode + * @memberof cosmos.base.abci.v1beta1.ABCIMessageLog + * @static + * @param {cosmos.base.abci.v1beta1.IABCIMessageLog} message ABCIMessageLog message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ABCIMessageLog.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.msgIndex != null && Object.hasOwnProperty.call(message, "msgIndex")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.msgIndex); + if (message.log != null && Object.hasOwnProperty.call(message, "log")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.log); + if (message.events != null && message.events.length) + for (let i = 0; i < message.events.length; ++i) + $root.cosmos.base.abci.v1beta1.StringEvent.encode(message.events[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ABCIMessageLog message, length delimited. Does not implicitly {@link cosmos.base.abci.v1beta1.ABCIMessageLog.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.base.abci.v1beta1.ABCIMessageLog + * @static + * @param {cosmos.base.abci.v1beta1.IABCIMessageLog} message ABCIMessageLog message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ABCIMessageLog.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ABCIMessageLog message from the specified reader or buffer. + * @function decode + * @memberof cosmos.base.abci.v1beta1.ABCIMessageLog + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.base.abci.v1beta1.ABCIMessageLog} ABCIMessageLog + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ABCIMessageLog.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.abci.v1beta1.ABCIMessageLog(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.msgIndex = reader.uint32(); + break; + case 2: + message.log = reader.string(); + break; + case 3: + if (!(message.events && message.events.length)) + message.events = []; + message.events.push($root.cosmos.base.abci.v1beta1.StringEvent.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ABCIMessageLog message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.base.abci.v1beta1.ABCIMessageLog + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.base.abci.v1beta1.ABCIMessageLog} ABCIMessageLog + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ABCIMessageLog.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ABCIMessageLog message. + * @function verify + * @memberof cosmos.base.abci.v1beta1.ABCIMessageLog + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ABCIMessageLog.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.msgIndex != null && message.hasOwnProperty("msgIndex")) + if (!$util.isInteger(message.msgIndex)) + return "msgIndex: integer expected"; + if (message.log != null && message.hasOwnProperty("log")) + if (!$util.isString(message.log)) + return "log: string expected"; + if (message.events != null && message.hasOwnProperty("events")) { + if (!Array.isArray(message.events)) + return "events: array expected"; + for (let i = 0; i < message.events.length; ++i) { + let error = $root.cosmos.base.abci.v1beta1.StringEvent.verify(message.events[i]); + if (error) + return "events." + error; + } + } + return null; + }; + + /** + * Creates a ABCIMessageLog message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.base.abci.v1beta1.ABCIMessageLog + * @static + * @param {Object.} object Plain object + * @returns {cosmos.base.abci.v1beta1.ABCIMessageLog} ABCIMessageLog + */ + ABCIMessageLog.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.base.abci.v1beta1.ABCIMessageLog) + return object; + let message = new $root.cosmos.base.abci.v1beta1.ABCIMessageLog(); + if (object.msgIndex != null) + message.msgIndex = object.msgIndex >>> 0; + if (object.log != null) + message.log = String(object.log); + if (object.events) { + if (!Array.isArray(object.events)) + throw TypeError(".cosmos.base.abci.v1beta1.ABCIMessageLog.events: array expected"); + message.events = []; + for (let i = 0; i < object.events.length; ++i) { + if (typeof object.events[i] !== "object") + throw TypeError(".cosmos.base.abci.v1beta1.ABCIMessageLog.events: object expected"); + message.events[i] = $root.cosmos.base.abci.v1beta1.StringEvent.fromObject(object.events[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ABCIMessageLog message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.base.abci.v1beta1.ABCIMessageLog + * @static + * @param {cosmos.base.abci.v1beta1.ABCIMessageLog} message ABCIMessageLog + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ABCIMessageLog.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.events = []; + if (options.defaults) { + object.msgIndex = 0; + object.log = ""; + } + if (message.msgIndex != null && message.hasOwnProperty("msgIndex")) + object.msgIndex = message.msgIndex; + if (message.log != null && message.hasOwnProperty("log")) + object.log = message.log; + if (message.events && message.events.length) { + object.events = []; + for (let j = 0; j < message.events.length; ++j) + object.events[j] = $root.cosmos.base.abci.v1beta1.StringEvent.toObject(message.events[j], options); + } + return object; + }; + + /** + * Converts this ABCIMessageLog to JSON. + * @function toJSON + * @memberof cosmos.base.abci.v1beta1.ABCIMessageLog + * @instance + * @returns {Object.} JSON object + */ + ABCIMessageLog.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ABCIMessageLog; + })(v1beta1.ABCIMessageLog || {}); + + v1beta1.StringEvent = (function(StringEvent) { + + /** + * Properties of a StringEvent. + * @memberof cosmos.base.abci.v1beta1 + * @interface IStringEvent + * @property {string|null} [type] StringEvent type + * @property {Array.|null} [attributes] StringEvent attributes + */ + + /** + * Constructs a new StringEvent. + * @memberof cosmos.base.abci.v1beta1 + * @classdesc Represents a StringEvent. + * @implements IStringEvent + * @constructor + * @param {cosmos.base.abci.v1beta1.IStringEvent=} [properties] Properties to set + */ + function StringEvent(properties) { + this.attributes = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StringEvent type. + * @member {string} type + * @memberof cosmos.base.abci.v1beta1.StringEvent + * @instance + */ + StringEvent.prototype.type = ""; + + /** + * StringEvent attributes. + * @member {Array.} attributes + * @memberof cosmos.base.abci.v1beta1.StringEvent + * @instance + */ + StringEvent.prototype.attributes = $util.emptyArray; + + /** + * Creates a new StringEvent instance using the specified properties. + * @function create + * @memberof cosmos.base.abci.v1beta1.StringEvent + * @static + * @param {cosmos.base.abci.v1beta1.IStringEvent=} [properties] Properties to set + * @returns {cosmos.base.abci.v1beta1.StringEvent} StringEvent instance + */ + StringEvent.create = function create(properties) { + return new StringEvent(properties); + }; + + /** + * Encodes the specified StringEvent message. Does not implicitly {@link cosmos.base.abci.v1beta1.StringEvent.verify|verify} messages. + * @function encode + * @memberof cosmos.base.abci.v1beta1.StringEvent + * @static + * @param {cosmos.base.abci.v1beta1.IStringEvent} message StringEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StringEvent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.attributes != null && message.attributes.length) + for (let i = 0; i < message.attributes.length; ++i) + $root.cosmos.base.abci.v1beta1.Attribute.encode(message.attributes[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified StringEvent message, length delimited. Does not implicitly {@link cosmos.base.abci.v1beta1.StringEvent.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.base.abci.v1beta1.StringEvent + * @static + * @param {cosmos.base.abci.v1beta1.IStringEvent} message StringEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StringEvent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StringEvent message from the specified reader or buffer. + * @function decode + * @memberof cosmos.base.abci.v1beta1.StringEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.base.abci.v1beta1.StringEvent} StringEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StringEvent.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.abci.v1beta1.StringEvent(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type = reader.string(); + break; + case 2: + if (!(message.attributes && message.attributes.length)) + message.attributes = []; + message.attributes.push($root.cosmos.base.abci.v1beta1.Attribute.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StringEvent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.base.abci.v1beta1.StringEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.base.abci.v1beta1.StringEvent} StringEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StringEvent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StringEvent message. + * @function verify + * @memberof cosmos.base.abci.v1beta1.StringEvent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StringEvent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.attributes != null && message.hasOwnProperty("attributes")) { + if (!Array.isArray(message.attributes)) + return "attributes: array expected"; + for (let i = 0; i < message.attributes.length; ++i) { + let error = $root.cosmos.base.abci.v1beta1.Attribute.verify(message.attributes[i]); + if (error) + return "attributes." + error; + } + } + return null; + }; + + /** + * Creates a StringEvent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.base.abci.v1beta1.StringEvent + * @static + * @param {Object.} object Plain object + * @returns {cosmos.base.abci.v1beta1.StringEvent} StringEvent + */ + StringEvent.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.base.abci.v1beta1.StringEvent) + return object; + let message = new $root.cosmos.base.abci.v1beta1.StringEvent(); + if (object.type != null) + message.type = String(object.type); + if (object.attributes) { + if (!Array.isArray(object.attributes)) + throw TypeError(".cosmos.base.abci.v1beta1.StringEvent.attributes: array expected"); + message.attributes = []; + for (let i = 0; i < object.attributes.length; ++i) { + if (typeof object.attributes[i] !== "object") + throw TypeError(".cosmos.base.abci.v1beta1.StringEvent.attributes: object expected"); + message.attributes[i] = $root.cosmos.base.abci.v1beta1.Attribute.fromObject(object.attributes[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a StringEvent message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.base.abci.v1beta1.StringEvent + * @static + * @param {cosmos.base.abci.v1beta1.StringEvent} message StringEvent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StringEvent.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.attributes = []; + if (options.defaults) + object.type = ""; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.attributes && message.attributes.length) { + object.attributes = []; + for (let j = 0; j < message.attributes.length; ++j) + object.attributes[j] = $root.cosmos.base.abci.v1beta1.Attribute.toObject(message.attributes[j], options); + } + return object; + }; + + /** + * Converts this StringEvent to JSON. + * @function toJSON + * @memberof cosmos.base.abci.v1beta1.StringEvent + * @instance + * @returns {Object.} JSON object + */ + StringEvent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return StringEvent; + })(v1beta1.StringEvent || {}); + + v1beta1.Attribute = (function(Attribute) { + + /** + * Properties of an Attribute. + * @memberof cosmos.base.abci.v1beta1 + * @interface IAttribute + * @property {string|null} [key] Attribute key + * @property {string|null} [value] Attribute value + */ + + /** + * Constructs a new Attribute. + * @memberof cosmos.base.abci.v1beta1 + * @classdesc Represents an Attribute. + * @implements IAttribute + * @constructor + * @param {cosmos.base.abci.v1beta1.IAttribute=} [properties] Properties to set + */ + function Attribute(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Attribute key. + * @member {string} key + * @memberof cosmos.base.abci.v1beta1.Attribute + * @instance + */ + Attribute.prototype.key = ""; + + /** + * Attribute value. + * @member {string} value + * @memberof cosmos.base.abci.v1beta1.Attribute + * @instance + */ + Attribute.prototype.value = ""; + + /** + * Creates a new Attribute instance using the specified properties. + * @function create + * @memberof cosmos.base.abci.v1beta1.Attribute + * @static + * @param {cosmos.base.abci.v1beta1.IAttribute=} [properties] Properties to set + * @returns {cosmos.base.abci.v1beta1.Attribute} Attribute instance + */ + Attribute.create = function create(properties) { + return new Attribute(properties); + }; + + /** + * Encodes the specified Attribute message. Does not implicitly {@link cosmos.base.abci.v1beta1.Attribute.verify|verify} messages. + * @function encode + * @memberof cosmos.base.abci.v1beta1.Attribute + * @static + * @param {cosmos.base.abci.v1beta1.IAttribute} message Attribute message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Attribute.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + return writer; + }; + + /** + * Encodes the specified Attribute message, length delimited. Does not implicitly {@link cosmos.base.abci.v1beta1.Attribute.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.base.abci.v1beta1.Attribute + * @static + * @param {cosmos.base.abci.v1beta1.IAttribute} message Attribute message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Attribute.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Attribute message from the specified reader or buffer. + * @function decode + * @memberof cosmos.base.abci.v1beta1.Attribute + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.base.abci.v1beta1.Attribute} Attribute + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Attribute.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.abci.v1beta1.Attribute(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.key = reader.string(); + break; + case 2: + message.value = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Attribute message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.base.abci.v1beta1.Attribute + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.base.abci.v1beta1.Attribute} Attribute + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Attribute.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Attribute message. + * @function verify + * @memberof cosmos.base.abci.v1beta1.Attribute + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Attribute.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.key != null && message.hasOwnProperty("key")) + if (!$util.isString(message.key)) + return "key: string expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + return null; + }; + + /** + * Creates an Attribute message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.base.abci.v1beta1.Attribute + * @static + * @param {Object.} object Plain object + * @returns {cosmos.base.abci.v1beta1.Attribute} Attribute + */ + Attribute.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.base.abci.v1beta1.Attribute) + return object; + let message = new $root.cosmos.base.abci.v1beta1.Attribute(); + if (object.key != null) + message.key = String(object.key); + if (object.value != null) + message.value = String(object.value); + return message; + }; + + /** + * Creates a plain object from an Attribute message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.base.abci.v1beta1.Attribute + * @static + * @param {cosmos.base.abci.v1beta1.Attribute} message Attribute + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Attribute.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.key = ""; + object.value = ""; + } + if (message.key != null && message.hasOwnProperty("key")) + object.key = message.key; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + return object; + }; + + /** + * Converts this Attribute to JSON. + * @function toJSON + * @memberof cosmos.base.abci.v1beta1.Attribute + * @instance + * @returns {Object.} JSON object + */ + Attribute.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Attribute; + })(v1beta1.Attribute || {}); + + v1beta1.GasInfo = (function(GasInfo) { + + /** + * Properties of a GasInfo. + * @memberof cosmos.base.abci.v1beta1 + * @interface IGasInfo + * @property {number|Long|null} [gasWanted] GasInfo gasWanted + * @property {number|Long|null} [gasUsed] GasInfo gasUsed + */ + + /** + * Constructs a new GasInfo. + * @memberof cosmos.base.abci.v1beta1 + * @classdesc Represents a GasInfo. + * @implements IGasInfo + * @constructor + * @param {cosmos.base.abci.v1beta1.IGasInfo=} [properties] Properties to set + */ + function GasInfo(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GasInfo gasWanted. + * @member {number|Long} gasWanted + * @memberof cosmos.base.abci.v1beta1.GasInfo + * @instance + */ + GasInfo.prototype.gasWanted = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * GasInfo gasUsed. + * @member {number|Long} gasUsed + * @memberof cosmos.base.abci.v1beta1.GasInfo + * @instance + */ + GasInfo.prototype.gasUsed = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new GasInfo instance using the specified properties. + * @function create + * @memberof cosmos.base.abci.v1beta1.GasInfo + * @static + * @param {cosmos.base.abci.v1beta1.IGasInfo=} [properties] Properties to set + * @returns {cosmos.base.abci.v1beta1.GasInfo} GasInfo instance + */ + GasInfo.create = function create(properties) { + return new GasInfo(properties); + }; + + /** + * Encodes the specified GasInfo message. Does not implicitly {@link cosmos.base.abci.v1beta1.GasInfo.verify|verify} messages. + * @function encode + * @memberof cosmos.base.abci.v1beta1.GasInfo + * @static + * @param {cosmos.base.abci.v1beta1.IGasInfo} message GasInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GasInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.gasWanted != null && Object.hasOwnProperty.call(message, "gasWanted")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.gasWanted); + if (message.gasUsed != null && Object.hasOwnProperty.call(message, "gasUsed")) + writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.gasUsed); + return writer; + }; + + /** + * Encodes the specified GasInfo message, length delimited. Does not implicitly {@link cosmos.base.abci.v1beta1.GasInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.base.abci.v1beta1.GasInfo + * @static + * @param {cosmos.base.abci.v1beta1.IGasInfo} message GasInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GasInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GasInfo message from the specified reader or buffer. + * @function decode + * @memberof cosmos.base.abci.v1beta1.GasInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.base.abci.v1beta1.GasInfo} GasInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GasInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.abci.v1beta1.GasInfo(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.gasWanted = reader.uint64(); + break; + case 2: + message.gasUsed = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GasInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.base.abci.v1beta1.GasInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.base.abci.v1beta1.GasInfo} GasInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GasInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GasInfo message. + * @function verify + * @memberof cosmos.base.abci.v1beta1.GasInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GasInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.gasWanted != null && message.hasOwnProperty("gasWanted")) + if (!$util.isInteger(message.gasWanted) && !(message.gasWanted && $util.isInteger(message.gasWanted.low) && $util.isInteger(message.gasWanted.high))) + return "gasWanted: integer|Long expected"; + if (message.gasUsed != null && message.hasOwnProperty("gasUsed")) + if (!$util.isInteger(message.gasUsed) && !(message.gasUsed && $util.isInteger(message.gasUsed.low) && $util.isInteger(message.gasUsed.high))) + return "gasUsed: integer|Long expected"; + return null; + }; + + /** + * Creates a GasInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.base.abci.v1beta1.GasInfo + * @static + * @param {Object.} object Plain object + * @returns {cosmos.base.abci.v1beta1.GasInfo} GasInfo + */ + GasInfo.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.base.abci.v1beta1.GasInfo) + return object; + let message = new $root.cosmos.base.abci.v1beta1.GasInfo(); + if (object.gasWanted != null) + if ($util.Long) + (message.gasWanted = $util.Long.fromValue(object.gasWanted)).unsigned = true; + else if (typeof object.gasWanted === "string") + message.gasWanted = parseInt(object.gasWanted, 10); + else if (typeof object.gasWanted === "number") + message.gasWanted = object.gasWanted; + else if (typeof object.gasWanted === "object") + message.gasWanted = new $util.LongBits(object.gasWanted.low >>> 0, object.gasWanted.high >>> 0).toNumber(true); + if (object.gasUsed != null) + if ($util.Long) + (message.gasUsed = $util.Long.fromValue(object.gasUsed)).unsigned = true; + else if (typeof object.gasUsed === "string") + message.gasUsed = parseInt(object.gasUsed, 10); + else if (typeof object.gasUsed === "number") + message.gasUsed = object.gasUsed; + else if (typeof object.gasUsed === "object") + message.gasUsed = new $util.LongBits(object.gasUsed.low >>> 0, object.gasUsed.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a GasInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.base.abci.v1beta1.GasInfo + * @static + * @param {cosmos.base.abci.v1beta1.GasInfo} message GasInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GasInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.gasWanted = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.gasWanted = options.longs === String ? "0" : 0; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.gasUsed = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.gasUsed = options.longs === String ? "0" : 0; + } + if (message.gasWanted != null && message.hasOwnProperty("gasWanted")) + if (typeof message.gasWanted === "number") + object.gasWanted = options.longs === String ? String(message.gasWanted) : message.gasWanted; + else + object.gasWanted = options.longs === String ? $util.Long.prototype.toString.call(message.gasWanted) : options.longs === Number ? new $util.LongBits(message.gasWanted.low >>> 0, message.gasWanted.high >>> 0).toNumber(true) : message.gasWanted; + if (message.gasUsed != null && message.hasOwnProperty("gasUsed")) + if (typeof message.gasUsed === "number") + object.gasUsed = options.longs === String ? String(message.gasUsed) : message.gasUsed; + else + object.gasUsed = options.longs === String ? $util.Long.prototype.toString.call(message.gasUsed) : options.longs === Number ? new $util.LongBits(message.gasUsed.low >>> 0, message.gasUsed.high >>> 0).toNumber(true) : message.gasUsed; + return object; + }; + + /** + * Converts this GasInfo to JSON. + * @function toJSON + * @memberof cosmos.base.abci.v1beta1.GasInfo + * @instance + * @returns {Object.} JSON object + */ + GasInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GasInfo; + })(v1beta1.GasInfo || {}); + + v1beta1.Result = (function(Result) { + + /** + * Properties of a Result. + * @memberof cosmos.base.abci.v1beta1 + * @interface IResult + * @property {Uint8Array|null} [data] Result data + * @property {string|null} [log] Result log + * @property {Array.|null} [events] Result events + */ + + /** + * Constructs a new Result. + * @memberof cosmos.base.abci.v1beta1 + * @classdesc Represents a Result. + * @implements IResult + * @constructor + * @param {cosmos.base.abci.v1beta1.IResult=} [properties] Properties to set + */ + function Result(properties) { + this.events = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Result data. + * @member {Uint8Array} data + * @memberof cosmos.base.abci.v1beta1.Result + * @instance + */ + Result.prototype.data = $util.newBuffer([]); + + /** + * Result log. + * @member {string} log + * @memberof cosmos.base.abci.v1beta1.Result + * @instance + */ + Result.prototype.log = ""; + + /** + * Result events. + * @member {Array.} events + * @memberof cosmos.base.abci.v1beta1.Result + * @instance + */ + Result.prototype.events = $util.emptyArray; + + /** + * Creates a new Result instance using the specified properties. + * @function create + * @memberof cosmos.base.abci.v1beta1.Result + * @static + * @param {cosmos.base.abci.v1beta1.IResult=} [properties] Properties to set + * @returns {cosmos.base.abci.v1beta1.Result} Result instance + */ + Result.create = function create(properties) { + return new Result(properties); + }; + + /** + * Encodes the specified Result message. Does not implicitly {@link cosmos.base.abci.v1beta1.Result.verify|verify} messages. + * @function encode + * @memberof cosmos.base.abci.v1beta1.Result + * @static + * @param {cosmos.base.abci.v1beta1.IResult} message Result message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Result.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.data != null && Object.hasOwnProperty.call(message, "data")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.data); + if (message.log != null && Object.hasOwnProperty.call(message, "log")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.log); + if (message.events != null && message.events.length) + for (let i = 0; i < message.events.length; ++i) + $root.tendermint.abci.Event.encode(message.events[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Result message, length delimited. Does not implicitly {@link cosmos.base.abci.v1beta1.Result.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.base.abci.v1beta1.Result + * @static + * @param {cosmos.base.abci.v1beta1.IResult} message Result message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Result.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Result message from the specified reader or buffer. + * @function decode + * @memberof cosmos.base.abci.v1beta1.Result + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.base.abci.v1beta1.Result} Result + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Result.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.abci.v1beta1.Result(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.data = reader.bytes(); + break; + case 2: + message.log = reader.string(); + break; + case 3: + if (!(message.events && message.events.length)) + message.events = []; + message.events.push($root.tendermint.abci.Event.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Result message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.base.abci.v1beta1.Result + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.base.abci.v1beta1.Result} Result + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Result.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Result message. + * @function verify + * @memberof cosmos.base.abci.v1beta1.Result + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Result.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.data != null && message.hasOwnProperty("data")) + if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) + return "data: buffer expected"; + if (message.log != null && message.hasOwnProperty("log")) + if (!$util.isString(message.log)) + return "log: string expected"; + if (message.events != null && message.hasOwnProperty("events")) { + if (!Array.isArray(message.events)) + return "events: array expected"; + for (let i = 0; i < message.events.length; ++i) { + let error = $root.tendermint.abci.Event.verify(message.events[i]); + if (error) + return "events." + error; + } + } + return null; + }; + + /** + * Creates a Result message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.base.abci.v1beta1.Result + * @static + * @param {Object.} object Plain object + * @returns {cosmos.base.abci.v1beta1.Result} Result + */ + Result.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.base.abci.v1beta1.Result) + return object; + let message = new $root.cosmos.base.abci.v1beta1.Result(); + if (object.data != null) + if (typeof object.data === "string") + $util.base64.decode(object.data, message.data = $util.newBuffer($util.base64.length(object.data)), 0); + else if (object.data.length) + message.data = object.data; + if (object.log != null) + message.log = String(object.log); + if (object.events) { + if (!Array.isArray(object.events)) + throw TypeError(".cosmos.base.abci.v1beta1.Result.events: array expected"); + message.events = []; + for (let i = 0; i < object.events.length; ++i) { + if (typeof object.events[i] !== "object") + throw TypeError(".cosmos.base.abci.v1beta1.Result.events: object expected"); + message.events[i] = $root.tendermint.abci.Event.fromObject(object.events[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Result message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.base.abci.v1beta1.Result + * @static + * @param {cosmos.base.abci.v1beta1.Result} message Result + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Result.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.events = []; + if (options.defaults) { + if (options.bytes === String) + object.data = ""; + else { + object.data = []; + if (options.bytes !== Array) + object.data = $util.newBuffer(object.data); + } + object.log = ""; + } + if (message.data != null && message.hasOwnProperty("data")) + object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; + if (message.log != null && message.hasOwnProperty("log")) + object.log = message.log; + if (message.events && message.events.length) { + object.events = []; + for (let j = 0; j < message.events.length; ++j) + object.events[j] = $root.tendermint.abci.Event.toObject(message.events[j], options); + } + return object; + }; + + /** + * Converts this Result to JSON. + * @function toJSON + * @memberof cosmos.base.abci.v1beta1.Result + * @instance + * @returns {Object.} JSON object + */ + Result.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Result; + })(v1beta1.Result || {}); + + v1beta1.SimulationResponse = (function(SimulationResponse) { + + /** + * Properties of a SimulationResponse. + * @memberof cosmos.base.abci.v1beta1 + * @interface ISimulationResponse + * @property {cosmos.base.abci.v1beta1.IGasInfo|null} [gasInfo] SimulationResponse gasInfo + * @property {cosmos.base.abci.v1beta1.IResult|null} [result] SimulationResponse result + */ + + /** + * Constructs a new SimulationResponse. + * @memberof cosmos.base.abci.v1beta1 + * @classdesc Represents a SimulationResponse. + * @implements ISimulationResponse + * @constructor + * @param {cosmos.base.abci.v1beta1.ISimulationResponse=} [properties] Properties to set + */ + function SimulationResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SimulationResponse gasInfo. + * @member {cosmos.base.abci.v1beta1.IGasInfo|null|undefined} gasInfo + * @memberof cosmos.base.abci.v1beta1.SimulationResponse + * @instance + */ + SimulationResponse.prototype.gasInfo = null; + + /** + * SimulationResponse result. + * @member {cosmos.base.abci.v1beta1.IResult|null|undefined} result + * @memberof cosmos.base.abci.v1beta1.SimulationResponse + * @instance + */ + SimulationResponse.prototype.result = null; + + /** + * Creates a new SimulationResponse instance using the specified properties. + * @function create + * @memberof cosmos.base.abci.v1beta1.SimulationResponse + * @static + * @param {cosmos.base.abci.v1beta1.ISimulationResponse=} [properties] Properties to set + * @returns {cosmos.base.abci.v1beta1.SimulationResponse} SimulationResponse instance + */ + SimulationResponse.create = function create(properties) { + return new SimulationResponse(properties); + }; + + /** + * Encodes the specified SimulationResponse message. Does not implicitly {@link cosmos.base.abci.v1beta1.SimulationResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.base.abci.v1beta1.SimulationResponse + * @static + * @param {cosmos.base.abci.v1beta1.ISimulationResponse} message SimulationResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SimulationResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.gasInfo != null && Object.hasOwnProperty.call(message, "gasInfo")) + $root.cosmos.base.abci.v1beta1.GasInfo.encode(message.gasInfo, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.result != null && Object.hasOwnProperty.call(message, "result")) + $root.cosmos.base.abci.v1beta1.Result.encode(message.result, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SimulationResponse message, length delimited. Does not implicitly {@link cosmos.base.abci.v1beta1.SimulationResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.base.abci.v1beta1.SimulationResponse + * @static + * @param {cosmos.base.abci.v1beta1.ISimulationResponse} message SimulationResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SimulationResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SimulationResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.base.abci.v1beta1.SimulationResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.base.abci.v1beta1.SimulationResponse} SimulationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SimulationResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.abci.v1beta1.SimulationResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.gasInfo = $root.cosmos.base.abci.v1beta1.GasInfo.decode(reader, reader.uint32()); + break; + case 2: + message.result = $root.cosmos.base.abci.v1beta1.Result.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SimulationResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.base.abci.v1beta1.SimulationResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.base.abci.v1beta1.SimulationResponse} SimulationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SimulationResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SimulationResponse message. + * @function verify + * @memberof cosmos.base.abci.v1beta1.SimulationResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SimulationResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.gasInfo != null && message.hasOwnProperty("gasInfo")) { + let error = $root.cosmos.base.abci.v1beta1.GasInfo.verify(message.gasInfo); + if (error) + return "gasInfo." + error; + } + if (message.result != null && message.hasOwnProperty("result")) { + let error = $root.cosmos.base.abci.v1beta1.Result.verify(message.result); + if (error) + return "result." + error; + } + return null; + }; + + /** + * Creates a SimulationResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.base.abci.v1beta1.SimulationResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.base.abci.v1beta1.SimulationResponse} SimulationResponse + */ + SimulationResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.base.abci.v1beta1.SimulationResponse) + return object; + let message = new $root.cosmos.base.abci.v1beta1.SimulationResponse(); + if (object.gasInfo != null) { + if (typeof object.gasInfo !== "object") + throw TypeError(".cosmos.base.abci.v1beta1.SimulationResponse.gasInfo: object expected"); + message.gasInfo = $root.cosmos.base.abci.v1beta1.GasInfo.fromObject(object.gasInfo); + } + if (object.result != null) { + if (typeof object.result !== "object") + throw TypeError(".cosmos.base.abci.v1beta1.SimulationResponse.result: object expected"); + message.result = $root.cosmos.base.abci.v1beta1.Result.fromObject(object.result); + } + return message; + }; + + /** + * Creates a plain object from a SimulationResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.base.abci.v1beta1.SimulationResponse + * @static + * @param {cosmos.base.abci.v1beta1.SimulationResponse} message SimulationResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SimulationResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.gasInfo = null; + object.result = null; + } + if (message.gasInfo != null && message.hasOwnProperty("gasInfo")) + object.gasInfo = $root.cosmos.base.abci.v1beta1.GasInfo.toObject(message.gasInfo, options); + if (message.result != null && message.hasOwnProperty("result")) + object.result = $root.cosmos.base.abci.v1beta1.Result.toObject(message.result, options); + return object; + }; + + /** + * Converts this SimulationResponse to JSON. + * @function toJSON + * @memberof cosmos.base.abci.v1beta1.SimulationResponse + * @instance + * @returns {Object.} JSON object + */ + SimulationResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SimulationResponse; + })(v1beta1.SimulationResponse || {}); + + v1beta1.MsgData = (function(MsgData) { + + /** + * Properties of a MsgData. + * @memberof cosmos.base.abci.v1beta1 + * @interface IMsgData + * @property {string|null} [msgType] MsgData msgType + * @property {Uint8Array|null} [data] MsgData data + */ + + /** + * Constructs a new MsgData. + * @memberof cosmos.base.abci.v1beta1 + * @classdesc Represents a MsgData. + * @implements IMsgData + * @constructor + * @param {cosmos.base.abci.v1beta1.IMsgData=} [properties] Properties to set + */ + function MsgData(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgData msgType. + * @member {string} msgType + * @memberof cosmos.base.abci.v1beta1.MsgData + * @instance + */ + MsgData.prototype.msgType = ""; + + /** + * MsgData data. + * @member {Uint8Array} data + * @memberof cosmos.base.abci.v1beta1.MsgData + * @instance + */ + MsgData.prototype.data = $util.newBuffer([]); + + /** + * Creates a new MsgData instance using the specified properties. + * @function create + * @memberof cosmos.base.abci.v1beta1.MsgData + * @static + * @param {cosmos.base.abci.v1beta1.IMsgData=} [properties] Properties to set + * @returns {cosmos.base.abci.v1beta1.MsgData} MsgData instance + */ + MsgData.create = function create(properties) { + return new MsgData(properties); + }; + + /** + * Encodes the specified MsgData message. Does not implicitly {@link cosmos.base.abci.v1beta1.MsgData.verify|verify} messages. + * @function encode + * @memberof cosmos.base.abci.v1beta1.MsgData + * @static + * @param {cosmos.base.abci.v1beta1.IMsgData} message MsgData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.msgType != null && Object.hasOwnProperty.call(message, "msgType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.msgType); + if (message.data != null && Object.hasOwnProperty.call(message, "data")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.data); + return writer; + }; + + /** + * Encodes the specified MsgData message, length delimited. Does not implicitly {@link cosmos.base.abci.v1beta1.MsgData.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.base.abci.v1beta1.MsgData + * @static + * @param {cosmos.base.abci.v1beta1.IMsgData} message MsgData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgData message from the specified reader or buffer. + * @function decode + * @memberof cosmos.base.abci.v1beta1.MsgData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.base.abci.v1beta1.MsgData} MsgData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgData.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.abci.v1beta1.MsgData(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.msgType = reader.string(); + break; + case 2: + message.data = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.base.abci.v1beta1.MsgData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.base.abci.v1beta1.MsgData} MsgData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgData message. + * @function verify + * @memberof cosmos.base.abci.v1beta1.MsgData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.msgType != null && message.hasOwnProperty("msgType")) + if (!$util.isString(message.msgType)) + return "msgType: string expected"; + if (message.data != null && message.hasOwnProperty("data")) + if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) + return "data: buffer expected"; + return null; + }; + + /** + * Creates a MsgData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.base.abci.v1beta1.MsgData + * @static + * @param {Object.} object Plain object + * @returns {cosmos.base.abci.v1beta1.MsgData} MsgData + */ + MsgData.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.base.abci.v1beta1.MsgData) + return object; + let message = new $root.cosmos.base.abci.v1beta1.MsgData(); + if (object.msgType != null) + message.msgType = String(object.msgType); + if (object.data != null) + if (typeof object.data === "string") + $util.base64.decode(object.data, message.data = $util.newBuffer($util.base64.length(object.data)), 0); + else if (object.data.length) + message.data = object.data; + return message; + }; + + /** + * Creates a plain object from a MsgData message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.base.abci.v1beta1.MsgData + * @static + * @param {cosmos.base.abci.v1beta1.MsgData} message MsgData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgData.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.msgType = ""; + if (options.bytes === String) + object.data = ""; + else { + object.data = []; + if (options.bytes !== Array) + object.data = $util.newBuffer(object.data); + } + } + if (message.msgType != null && message.hasOwnProperty("msgType")) + object.msgType = message.msgType; + if (message.data != null && message.hasOwnProperty("data")) + object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; + return object; + }; + + /** + * Converts this MsgData to JSON. + * @function toJSON + * @memberof cosmos.base.abci.v1beta1.MsgData + * @instance + * @returns {Object.} JSON object + */ + MsgData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgData; + })(v1beta1.MsgData || {}); + + v1beta1.TxMsgData = (function(TxMsgData) { + + /** + * Properties of a TxMsgData. + * @memberof cosmos.base.abci.v1beta1 + * @interface ITxMsgData + * @property {Array.|null} [data] TxMsgData data + */ + + /** + * Constructs a new TxMsgData. + * @memberof cosmos.base.abci.v1beta1 + * @classdesc Represents a TxMsgData. + * @implements ITxMsgData + * @constructor + * @param {cosmos.base.abci.v1beta1.ITxMsgData=} [properties] Properties to set + */ + function TxMsgData(properties) { + this.data = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TxMsgData data. + * @member {Array.} data + * @memberof cosmos.base.abci.v1beta1.TxMsgData + * @instance + */ + TxMsgData.prototype.data = $util.emptyArray; + + /** + * Creates a new TxMsgData instance using the specified properties. + * @function create + * @memberof cosmos.base.abci.v1beta1.TxMsgData + * @static + * @param {cosmos.base.abci.v1beta1.ITxMsgData=} [properties] Properties to set + * @returns {cosmos.base.abci.v1beta1.TxMsgData} TxMsgData instance + */ + TxMsgData.create = function create(properties) { + return new TxMsgData(properties); + }; + + /** + * Encodes the specified TxMsgData message. Does not implicitly {@link cosmos.base.abci.v1beta1.TxMsgData.verify|verify} messages. + * @function encode + * @memberof cosmos.base.abci.v1beta1.TxMsgData + * @static + * @param {cosmos.base.abci.v1beta1.ITxMsgData} message TxMsgData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TxMsgData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.data != null && message.data.length) + for (let i = 0; i < message.data.length; ++i) + $root.cosmos.base.abci.v1beta1.MsgData.encode(message.data[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TxMsgData message, length delimited. Does not implicitly {@link cosmos.base.abci.v1beta1.TxMsgData.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.base.abci.v1beta1.TxMsgData + * @static + * @param {cosmos.base.abci.v1beta1.ITxMsgData} message TxMsgData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TxMsgData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TxMsgData message from the specified reader or buffer. + * @function decode + * @memberof cosmos.base.abci.v1beta1.TxMsgData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.base.abci.v1beta1.TxMsgData} TxMsgData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TxMsgData.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.abci.v1beta1.TxMsgData(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.data && message.data.length)) + message.data = []; + message.data.push($root.cosmos.base.abci.v1beta1.MsgData.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TxMsgData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.base.abci.v1beta1.TxMsgData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.base.abci.v1beta1.TxMsgData} TxMsgData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TxMsgData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TxMsgData message. + * @function verify + * @memberof cosmos.base.abci.v1beta1.TxMsgData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TxMsgData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.data != null && message.hasOwnProperty("data")) { + if (!Array.isArray(message.data)) + return "data: array expected"; + for (let i = 0; i < message.data.length; ++i) { + let error = $root.cosmos.base.abci.v1beta1.MsgData.verify(message.data[i]); + if (error) + return "data." + error; + } + } + return null; + }; + + /** + * Creates a TxMsgData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.base.abci.v1beta1.TxMsgData + * @static + * @param {Object.} object Plain object + * @returns {cosmos.base.abci.v1beta1.TxMsgData} TxMsgData + */ + TxMsgData.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.base.abci.v1beta1.TxMsgData) + return object; + let message = new $root.cosmos.base.abci.v1beta1.TxMsgData(); + if (object.data) { + if (!Array.isArray(object.data)) + throw TypeError(".cosmos.base.abci.v1beta1.TxMsgData.data: array expected"); + message.data = []; + for (let i = 0; i < object.data.length; ++i) { + if (typeof object.data[i] !== "object") + throw TypeError(".cosmos.base.abci.v1beta1.TxMsgData.data: object expected"); + message.data[i] = $root.cosmos.base.abci.v1beta1.MsgData.fromObject(object.data[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a TxMsgData message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.base.abci.v1beta1.TxMsgData + * @static + * @param {cosmos.base.abci.v1beta1.TxMsgData} message TxMsgData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TxMsgData.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.data = []; + if (message.data && message.data.length) { + object.data = []; + for (let j = 0; j < message.data.length; ++j) + object.data[j] = $root.cosmos.base.abci.v1beta1.MsgData.toObject(message.data[j], options); + } + return object; + }; + + /** + * Converts this TxMsgData to JSON. + * @function toJSON + * @memberof cosmos.base.abci.v1beta1.TxMsgData + * @instance + * @returns {Object.} JSON object + */ + TxMsgData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TxMsgData; + })(v1beta1.TxMsgData || {}); + + v1beta1.SearchTxsResult = (function(SearchTxsResult) { + + /** + * Properties of a SearchTxsResult. + * @memberof cosmos.base.abci.v1beta1 + * @interface ISearchTxsResult + * @property {number|Long|null} [totalCount] SearchTxsResult totalCount + * @property {number|Long|null} [count] SearchTxsResult count + * @property {number|Long|null} [pageNumber] SearchTxsResult pageNumber + * @property {number|Long|null} [pageTotal] SearchTxsResult pageTotal + * @property {number|Long|null} [limit] SearchTxsResult limit + * @property {Array.|null} [txs] SearchTxsResult txs + */ + + /** + * Constructs a new SearchTxsResult. + * @memberof cosmos.base.abci.v1beta1 + * @classdesc Represents a SearchTxsResult. + * @implements ISearchTxsResult + * @constructor + * @param {cosmos.base.abci.v1beta1.ISearchTxsResult=} [properties] Properties to set + */ + function SearchTxsResult(properties) { + this.txs = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SearchTxsResult totalCount. + * @member {number|Long} totalCount + * @memberof cosmos.base.abci.v1beta1.SearchTxsResult + * @instance + */ + SearchTxsResult.prototype.totalCount = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * SearchTxsResult count. + * @member {number|Long} count + * @memberof cosmos.base.abci.v1beta1.SearchTxsResult + * @instance + */ + SearchTxsResult.prototype.count = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * SearchTxsResult pageNumber. + * @member {number|Long} pageNumber + * @memberof cosmos.base.abci.v1beta1.SearchTxsResult + * @instance + */ + SearchTxsResult.prototype.pageNumber = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * SearchTxsResult pageTotal. + * @member {number|Long} pageTotal + * @memberof cosmos.base.abci.v1beta1.SearchTxsResult + * @instance + */ + SearchTxsResult.prototype.pageTotal = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * SearchTxsResult limit. + * @member {number|Long} limit + * @memberof cosmos.base.abci.v1beta1.SearchTxsResult + * @instance + */ + SearchTxsResult.prototype.limit = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * SearchTxsResult txs. + * @member {Array.} txs + * @memberof cosmos.base.abci.v1beta1.SearchTxsResult + * @instance + */ + SearchTxsResult.prototype.txs = $util.emptyArray; + + /** + * Creates a new SearchTxsResult instance using the specified properties. + * @function create + * @memberof cosmos.base.abci.v1beta1.SearchTxsResult + * @static + * @param {cosmos.base.abci.v1beta1.ISearchTxsResult=} [properties] Properties to set + * @returns {cosmos.base.abci.v1beta1.SearchTxsResult} SearchTxsResult instance + */ + SearchTxsResult.create = function create(properties) { + return new SearchTxsResult(properties); + }; + + /** + * Encodes the specified SearchTxsResult message. Does not implicitly {@link cosmos.base.abci.v1beta1.SearchTxsResult.verify|verify} messages. + * @function encode + * @memberof cosmos.base.abci.v1beta1.SearchTxsResult + * @static + * @param {cosmos.base.abci.v1beta1.ISearchTxsResult} message SearchTxsResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchTxsResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.totalCount != null && Object.hasOwnProperty.call(message, "totalCount")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.totalCount); + if (message.count != null && Object.hasOwnProperty.call(message, "count")) + writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.count); + if (message.pageNumber != null && Object.hasOwnProperty.call(message, "pageNumber")) + writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.pageNumber); + if (message.pageTotal != null && Object.hasOwnProperty.call(message, "pageTotal")) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.pageTotal); + if (message.limit != null && Object.hasOwnProperty.call(message, "limit")) + writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.limit); + if (message.txs != null && message.txs.length) + for (let i = 0; i < message.txs.length; ++i) + $root.cosmos.base.abci.v1beta1.TxResponse.encode(message.txs[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SearchTxsResult message, length delimited. Does not implicitly {@link cosmos.base.abci.v1beta1.SearchTxsResult.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.base.abci.v1beta1.SearchTxsResult + * @static + * @param {cosmos.base.abci.v1beta1.ISearchTxsResult} message SearchTxsResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchTxsResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SearchTxsResult message from the specified reader or buffer. + * @function decode + * @memberof cosmos.base.abci.v1beta1.SearchTxsResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.base.abci.v1beta1.SearchTxsResult} SearchTxsResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchTxsResult.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.abci.v1beta1.SearchTxsResult(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.totalCount = reader.uint64(); + break; + case 2: + message.count = reader.uint64(); + break; + case 3: + message.pageNumber = reader.uint64(); + break; + case 4: + message.pageTotal = reader.uint64(); + break; + case 5: + message.limit = reader.uint64(); + break; + case 6: + if (!(message.txs && message.txs.length)) + message.txs = []; + message.txs.push($root.cosmos.base.abci.v1beta1.TxResponse.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SearchTxsResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.base.abci.v1beta1.SearchTxsResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.base.abci.v1beta1.SearchTxsResult} SearchTxsResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchTxsResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SearchTxsResult message. + * @function verify + * @memberof cosmos.base.abci.v1beta1.SearchTxsResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SearchTxsResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.totalCount != null && message.hasOwnProperty("totalCount")) + if (!$util.isInteger(message.totalCount) && !(message.totalCount && $util.isInteger(message.totalCount.low) && $util.isInteger(message.totalCount.high))) + return "totalCount: integer|Long expected"; + if (message.count != null && message.hasOwnProperty("count")) + if (!$util.isInteger(message.count) && !(message.count && $util.isInteger(message.count.low) && $util.isInteger(message.count.high))) + return "count: integer|Long expected"; + if (message.pageNumber != null && message.hasOwnProperty("pageNumber")) + if (!$util.isInteger(message.pageNumber) && !(message.pageNumber && $util.isInteger(message.pageNumber.low) && $util.isInteger(message.pageNumber.high))) + return "pageNumber: integer|Long expected"; + if (message.pageTotal != null && message.hasOwnProperty("pageTotal")) + if (!$util.isInteger(message.pageTotal) && !(message.pageTotal && $util.isInteger(message.pageTotal.low) && $util.isInteger(message.pageTotal.high))) + return "pageTotal: integer|Long expected"; + if (message.limit != null && message.hasOwnProperty("limit")) + if (!$util.isInteger(message.limit) && !(message.limit && $util.isInteger(message.limit.low) && $util.isInteger(message.limit.high))) + return "limit: integer|Long expected"; + if (message.txs != null && message.hasOwnProperty("txs")) { + if (!Array.isArray(message.txs)) + return "txs: array expected"; + for (let i = 0; i < message.txs.length; ++i) { + let error = $root.cosmos.base.abci.v1beta1.TxResponse.verify(message.txs[i]); + if (error) + return "txs." + error; + } + } + return null; + }; + + /** + * Creates a SearchTxsResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.base.abci.v1beta1.SearchTxsResult + * @static + * @param {Object.} object Plain object + * @returns {cosmos.base.abci.v1beta1.SearchTxsResult} SearchTxsResult + */ + SearchTxsResult.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.base.abci.v1beta1.SearchTxsResult) + return object; + let message = new $root.cosmos.base.abci.v1beta1.SearchTxsResult(); + if (object.totalCount != null) + if ($util.Long) + (message.totalCount = $util.Long.fromValue(object.totalCount)).unsigned = true; + else if (typeof object.totalCount === "string") + message.totalCount = parseInt(object.totalCount, 10); + else if (typeof object.totalCount === "number") + message.totalCount = object.totalCount; + else if (typeof object.totalCount === "object") + message.totalCount = new $util.LongBits(object.totalCount.low >>> 0, object.totalCount.high >>> 0).toNumber(true); + if (object.count != null) + if ($util.Long) + (message.count = $util.Long.fromValue(object.count)).unsigned = true; + else if (typeof object.count === "string") + message.count = parseInt(object.count, 10); + else if (typeof object.count === "number") + message.count = object.count; + else if (typeof object.count === "object") + message.count = new $util.LongBits(object.count.low >>> 0, object.count.high >>> 0).toNumber(true); + if (object.pageNumber != null) + if ($util.Long) + (message.pageNumber = $util.Long.fromValue(object.pageNumber)).unsigned = true; + else if (typeof object.pageNumber === "string") + message.pageNumber = parseInt(object.pageNumber, 10); + else if (typeof object.pageNumber === "number") + message.pageNumber = object.pageNumber; + else if (typeof object.pageNumber === "object") + message.pageNumber = new $util.LongBits(object.pageNumber.low >>> 0, object.pageNumber.high >>> 0).toNumber(true); + if (object.pageTotal != null) + if ($util.Long) + (message.pageTotal = $util.Long.fromValue(object.pageTotal)).unsigned = true; + else if (typeof object.pageTotal === "string") + message.pageTotal = parseInt(object.pageTotal, 10); + else if (typeof object.pageTotal === "number") + message.pageTotal = object.pageTotal; + else if (typeof object.pageTotal === "object") + message.pageTotal = new $util.LongBits(object.pageTotal.low >>> 0, object.pageTotal.high >>> 0).toNumber(true); + if (object.limit != null) + if ($util.Long) + (message.limit = $util.Long.fromValue(object.limit)).unsigned = true; + else if (typeof object.limit === "string") + message.limit = parseInt(object.limit, 10); + else if (typeof object.limit === "number") + message.limit = object.limit; + else if (typeof object.limit === "object") + message.limit = new $util.LongBits(object.limit.low >>> 0, object.limit.high >>> 0).toNumber(true); + if (object.txs) { + if (!Array.isArray(object.txs)) + throw TypeError(".cosmos.base.abci.v1beta1.SearchTxsResult.txs: array expected"); + message.txs = []; + for (let i = 0; i < object.txs.length; ++i) { + if (typeof object.txs[i] !== "object") + throw TypeError(".cosmos.base.abci.v1beta1.SearchTxsResult.txs: object expected"); + message.txs[i] = $root.cosmos.base.abci.v1beta1.TxResponse.fromObject(object.txs[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SearchTxsResult message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.base.abci.v1beta1.SearchTxsResult + * @static + * @param {cosmos.base.abci.v1beta1.SearchTxsResult} message SearchTxsResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SearchTxsResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.txs = []; + if (options.defaults) { + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.totalCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.totalCount = options.longs === String ? "0" : 0; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.count = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.count = options.longs === String ? "0" : 0; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.pageNumber = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.pageNumber = options.longs === String ? "0" : 0; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.pageTotal = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.pageTotal = options.longs === String ? "0" : 0; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.limit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.limit = options.longs === String ? "0" : 0; + } + if (message.totalCount != null && message.hasOwnProperty("totalCount")) + if (typeof message.totalCount === "number") + object.totalCount = options.longs === String ? String(message.totalCount) : message.totalCount; + else + object.totalCount = options.longs === String ? $util.Long.prototype.toString.call(message.totalCount) : options.longs === Number ? new $util.LongBits(message.totalCount.low >>> 0, message.totalCount.high >>> 0).toNumber(true) : message.totalCount; + if (message.count != null && message.hasOwnProperty("count")) + if (typeof message.count === "number") + object.count = options.longs === String ? String(message.count) : message.count; + else + object.count = options.longs === String ? $util.Long.prototype.toString.call(message.count) : options.longs === Number ? new $util.LongBits(message.count.low >>> 0, message.count.high >>> 0).toNumber(true) : message.count; + if (message.pageNumber != null && message.hasOwnProperty("pageNumber")) + if (typeof message.pageNumber === "number") + object.pageNumber = options.longs === String ? String(message.pageNumber) : message.pageNumber; + else + object.pageNumber = options.longs === String ? $util.Long.prototype.toString.call(message.pageNumber) : options.longs === Number ? new $util.LongBits(message.pageNumber.low >>> 0, message.pageNumber.high >>> 0).toNumber(true) : message.pageNumber; + if (message.pageTotal != null && message.hasOwnProperty("pageTotal")) + if (typeof message.pageTotal === "number") + object.pageTotal = options.longs === String ? String(message.pageTotal) : message.pageTotal; + else + object.pageTotal = options.longs === String ? $util.Long.prototype.toString.call(message.pageTotal) : options.longs === Number ? new $util.LongBits(message.pageTotal.low >>> 0, message.pageTotal.high >>> 0).toNumber(true) : message.pageTotal; + if (message.limit != null && message.hasOwnProperty("limit")) + if (typeof message.limit === "number") + object.limit = options.longs === String ? String(message.limit) : message.limit; + else + object.limit = options.longs === String ? $util.Long.prototype.toString.call(message.limit) : options.longs === Number ? new $util.LongBits(message.limit.low >>> 0, message.limit.high >>> 0).toNumber(true) : message.limit; + if (message.txs && message.txs.length) { + object.txs = []; + for (let j = 0; j < message.txs.length; ++j) + object.txs[j] = $root.cosmos.base.abci.v1beta1.TxResponse.toObject(message.txs[j], options); + } + return object; + }; + + /** + * Converts this SearchTxsResult to JSON. + * @function toJSON + * @memberof cosmos.base.abci.v1beta1.SearchTxsResult + * @instance + * @returns {Object.} JSON object + */ + SearchTxsResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SearchTxsResult; + })(v1beta1.SearchTxsResult || {}); + + return v1beta1; + })(abci.v1beta1 || {}); + + return abci; + })(base.abci || {}); + + /** + * Namespace kv. + * @memberof cosmos.base + * @namespace + */ + + base.kv = (function(kv) { + + /** + * Namespace v1beta1. + * @memberof cosmos.base.kv + * @namespace + */ + + kv.v1beta1 = (function(v1beta1) { + + v1beta1.Pairs = (function(Pairs) { + + /** + * Properties of a Pairs. + * @memberof cosmos.base.kv.v1beta1 + * @interface IPairs + * @property {Array.|null} [pairs] Pairs pairs + */ + + /** + * Constructs a new Pairs. + * @memberof cosmos.base.kv.v1beta1 + * @classdesc Represents a Pairs. + * @implements IPairs + * @constructor + * @param {cosmos.base.kv.v1beta1.IPairs=} [properties] Properties to set + */ + function Pairs(properties) { + this.pairs = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Pairs pairs. + * @member {Array.} pairs + * @memberof cosmos.base.kv.v1beta1.Pairs + * @instance + */ + Pairs.prototype.pairs = $util.emptyArray; + + /** + * Creates a new Pairs instance using the specified properties. + * @function create + * @memberof cosmos.base.kv.v1beta1.Pairs + * @static + * @param {cosmos.base.kv.v1beta1.IPairs=} [properties] Properties to set + * @returns {cosmos.base.kv.v1beta1.Pairs} Pairs instance + */ + Pairs.create = function create(properties) { + return new Pairs(properties); + }; + + /** + * Encodes the specified Pairs message. Does not implicitly {@link cosmos.base.kv.v1beta1.Pairs.verify|verify} messages. + * @function encode + * @memberof cosmos.base.kv.v1beta1.Pairs + * @static + * @param {cosmos.base.kv.v1beta1.IPairs} message Pairs message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Pairs.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pairs != null && message.pairs.length) + for (let i = 0; i < message.pairs.length; ++i) + $root.cosmos.base.kv.v1beta1.Pair.encode(message.pairs[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Pairs message, length delimited. Does not implicitly {@link cosmos.base.kv.v1beta1.Pairs.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.base.kv.v1beta1.Pairs + * @static + * @param {cosmos.base.kv.v1beta1.IPairs} message Pairs message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Pairs.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Pairs message from the specified reader or buffer. + * @function decode + * @memberof cosmos.base.kv.v1beta1.Pairs + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.base.kv.v1beta1.Pairs} Pairs + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Pairs.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.kv.v1beta1.Pairs(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.pairs && message.pairs.length)) + message.pairs = []; + message.pairs.push($root.cosmos.base.kv.v1beta1.Pair.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Pairs message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.base.kv.v1beta1.Pairs + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.base.kv.v1beta1.Pairs} Pairs + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Pairs.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Pairs message. + * @function verify + * @memberof cosmos.base.kv.v1beta1.Pairs + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Pairs.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.pairs != null && message.hasOwnProperty("pairs")) { + if (!Array.isArray(message.pairs)) + return "pairs: array expected"; + for (let i = 0; i < message.pairs.length; ++i) { + let error = $root.cosmos.base.kv.v1beta1.Pair.verify(message.pairs[i]); + if (error) + return "pairs." + error; + } + } + return null; + }; + + /** + * Creates a Pairs message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.base.kv.v1beta1.Pairs + * @static + * @param {Object.} object Plain object + * @returns {cosmos.base.kv.v1beta1.Pairs} Pairs + */ + Pairs.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.base.kv.v1beta1.Pairs) + return object; + let message = new $root.cosmos.base.kv.v1beta1.Pairs(); + if (object.pairs) { + if (!Array.isArray(object.pairs)) + throw TypeError(".cosmos.base.kv.v1beta1.Pairs.pairs: array expected"); + message.pairs = []; + for (let i = 0; i < object.pairs.length; ++i) { + if (typeof object.pairs[i] !== "object") + throw TypeError(".cosmos.base.kv.v1beta1.Pairs.pairs: object expected"); + message.pairs[i] = $root.cosmos.base.kv.v1beta1.Pair.fromObject(object.pairs[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Pairs message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.base.kv.v1beta1.Pairs + * @static + * @param {cosmos.base.kv.v1beta1.Pairs} message Pairs + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Pairs.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.pairs = []; + if (message.pairs && message.pairs.length) { + object.pairs = []; + for (let j = 0; j < message.pairs.length; ++j) + object.pairs[j] = $root.cosmos.base.kv.v1beta1.Pair.toObject(message.pairs[j], options); + } + return object; + }; + + /** + * Converts this Pairs to JSON. + * @function toJSON + * @memberof cosmos.base.kv.v1beta1.Pairs + * @instance + * @returns {Object.} JSON object + */ + Pairs.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Pairs; + })(v1beta1.Pairs || {}); + + v1beta1.Pair = (function(Pair) { + + /** + * Properties of a Pair. + * @memberof cosmos.base.kv.v1beta1 + * @interface IPair + * @property {Uint8Array|null} [key] Pair key + * @property {Uint8Array|null} [value] Pair value + */ + + /** + * Constructs a new Pair. + * @memberof cosmos.base.kv.v1beta1 + * @classdesc Represents a Pair. + * @implements IPair + * @constructor + * @param {cosmos.base.kv.v1beta1.IPair=} [properties] Properties to set + */ + function Pair(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Pair key. + * @member {Uint8Array} key + * @memberof cosmos.base.kv.v1beta1.Pair + * @instance + */ + Pair.prototype.key = $util.newBuffer([]); + + /** + * Pair value. + * @member {Uint8Array} value + * @memberof cosmos.base.kv.v1beta1.Pair + * @instance + */ + Pair.prototype.value = $util.newBuffer([]); + + /** + * Creates a new Pair instance using the specified properties. + * @function create + * @memberof cosmos.base.kv.v1beta1.Pair + * @static + * @param {cosmos.base.kv.v1beta1.IPair=} [properties] Properties to set + * @returns {cosmos.base.kv.v1beta1.Pair} Pair instance + */ + Pair.create = function create(properties) { + return new Pair(properties); + }; + + /** + * Encodes the specified Pair message. Does not implicitly {@link cosmos.base.kv.v1beta1.Pair.verify|verify} messages. + * @function encode + * @memberof cosmos.base.kv.v1beta1.Pair + * @static + * @param {cosmos.base.kv.v1beta1.IPair} message Pair message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Pair.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.key); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); + return writer; + }; + + /** + * Encodes the specified Pair message, length delimited. Does not implicitly {@link cosmos.base.kv.v1beta1.Pair.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.base.kv.v1beta1.Pair + * @static + * @param {cosmos.base.kv.v1beta1.IPair} message Pair message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Pair.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Pair message from the specified reader or buffer. + * @function decode + * @memberof cosmos.base.kv.v1beta1.Pair + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.base.kv.v1beta1.Pair} Pair + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Pair.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.kv.v1beta1.Pair(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.key = reader.bytes(); + break; + case 2: + message.value = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Pair message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.base.kv.v1beta1.Pair + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.base.kv.v1beta1.Pair} Pair + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Pair.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Pair message. + * @function verify + * @memberof cosmos.base.kv.v1beta1.Pair + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Pair.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.key != null && message.hasOwnProperty("key")) + if (!(message.key && typeof message.key.length === "number" || $util.isString(message.key))) + return "key: buffer expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; + return null; + }; + + /** + * Creates a Pair message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.base.kv.v1beta1.Pair + * @static + * @param {Object.} object Plain object + * @returns {cosmos.base.kv.v1beta1.Pair} Pair + */ + Pair.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.base.kv.v1beta1.Pair) + return object; + let message = new $root.cosmos.base.kv.v1beta1.Pair(); + if (object.key != null) + if (typeof object.key === "string") + $util.base64.decode(object.key, message.key = $util.newBuffer($util.base64.length(object.key)), 0); + else if (object.key.length) + message.key = object.key; + if (object.value != null) + if (typeof object.value === "string") + $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); + else if (object.value.length) + message.value = object.value; + return message; + }; + + /** + * Creates a plain object from a Pair message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.base.kv.v1beta1.Pair + * @static + * @param {cosmos.base.kv.v1beta1.Pair} message Pair + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Pair.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + if (options.bytes === String) + object.key = ""; + else { + object.key = []; + if (options.bytes !== Array) + object.key = $util.newBuffer(object.key); + } + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + } + if (message.key != null && message.hasOwnProperty("key")) + object.key = options.bytes === String ? $util.base64.encode(message.key, 0, message.key.length) : options.bytes === Array ? Array.prototype.slice.call(message.key) : message.key; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + return object; + }; + + /** + * Converts this Pair to JSON. + * @function toJSON + * @memberof cosmos.base.kv.v1beta1.Pair + * @instance + * @returns {Object.} JSON object + */ + Pair.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Pair; + })(v1beta1.Pair || {}); + + return v1beta1; + })(kv.v1beta1 || {}); + + return kv; + })(base.kv || {}); + + /** + * Namespace query. + * @memberof cosmos.base + * @namespace + */ + + base.query = (function(query) { + + /** + * Namespace v1beta1. + * @memberof cosmos.base.query + * @namespace + */ + + query.v1beta1 = (function(v1beta1) { + + v1beta1.PageRequest = (function(PageRequest) { + + /** + * Properties of a PageRequest. + * @memberof cosmos.base.query.v1beta1 + * @interface IPageRequest + * @property {Uint8Array|null} [key] PageRequest key + * @property {number|Long|null} [offset] PageRequest offset + * @property {number|Long|null} [limit] PageRequest limit + * @property {boolean|null} [countTotal] PageRequest countTotal + */ + + /** + * Constructs a new PageRequest. + * @memberof cosmos.base.query.v1beta1 + * @classdesc Represents a PageRequest. + * @implements IPageRequest + * @constructor + * @param {cosmos.base.query.v1beta1.IPageRequest=} [properties] Properties to set + */ + function PageRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PageRequest key. + * @member {Uint8Array} key + * @memberof cosmos.base.query.v1beta1.PageRequest + * @instance + */ + PageRequest.prototype.key = $util.newBuffer([]); + + /** + * PageRequest offset. + * @member {number|Long} offset + * @memberof cosmos.base.query.v1beta1.PageRequest + * @instance + */ + PageRequest.prototype.offset = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * PageRequest limit. + * @member {number|Long} limit + * @memberof cosmos.base.query.v1beta1.PageRequest + * @instance + */ + PageRequest.prototype.limit = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * PageRequest countTotal. + * @member {boolean} countTotal + * @memberof cosmos.base.query.v1beta1.PageRequest + * @instance + */ + PageRequest.prototype.countTotal = false; + + /** + * Creates a new PageRequest instance using the specified properties. + * @function create + * @memberof cosmos.base.query.v1beta1.PageRequest + * @static + * @param {cosmos.base.query.v1beta1.IPageRequest=} [properties] Properties to set + * @returns {cosmos.base.query.v1beta1.PageRequest} PageRequest instance + */ + PageRequest.create = function create(properties) { + return new PageRequest(properties); + }; + + /** + * Encodes the specified PageRequest message. Does not implicitly {@link cosmos.base.query.v1beta1.PageRequest.verify|verify} messages. + * @function encode + * @memberof cosmos.base.query.v1beta1.PageRequest + * @static + * @param {cosmos.base.query.v1beta1.IPageRequest} message PageRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PageRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.key); + if (message.offset != null && Object.hasOwnProperty.call(message, "offset")) + writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.offset); + if (message.limit != null && Object.hasOwnProperty.call(message, "limit")) + writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.limit); + if (message.countTotal != null && Object.hasOwnProperty.call(message, "countTotal")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.countTotal); + return writer; + }; + + /** + * Encodes the specified PageRequest message, length delimited. Does not implicitly {@link cosmos.base.query.v1beta1.PageRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.base.query.v1beta1.PageRequest + * @static + * @param {cosmos.base.query.v1beta1.IPageRequest} message PageRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PageRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PageRequest message from the specified reader or buffer. + * @function decode + * @memberof cosmos.base.query.v1beta1.PageRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.base.query.v1beta1.PageRequest} PageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PageRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.query.v1beta1.PageRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.key = reader.bytes(); + break; + case 2: + message.offset = reader.uint64(); + break; + case 3: + message.limit = reader.uint64(); + break; + case 4: + message.countTotal = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PageRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.base.query.v1beta1.PageRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.base.query.v1beta1.PageRequest} PageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PageRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PageRequest message. + * @function verify + * @memberof cosmos.base.query.v1beta1.PageRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PageRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.key != null && message.hasOwnProperty("key")) + if (!(message.key && typeof message.key.length === "number" || $util.isString(message.key))) + return "key: buffer expected"; + if (message.offset != null && message.hasOwnProperty("offset")) + if (!$util.isInteger(message.offset) && !(message.offset && $util.isInteger(message.offset.low) && $util.isInteger(message.offset.high))) + return "offset: integer|Long expected"; + if (message.limit != null && message.hasOwnProperty("limit")) + if (!$util.isInteger(message.limit) && !(message.limit && $util.isInteger(message.limit.low) && $util.isInteger(message.limit.high))) + return "limit: integer|Long expected"; + if (message.countTotal != null && message.hasOwnProperty("countTotal")) + if (typeof message.countTotal !== "boolean") + return "countTotal: boolean expected"; + return null; + }; + + /** + * Creates a PageRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.base.query.v1beta1.PageRequest + * @static + * @param {Object.} object Plain object + * @returns {cosmos.base.query.v1beta1.PageRequest} PageRequest + */ + PageRequest.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.base.query.v1beta1.PageRequest) + return object; + let message = new $root.cosmos.base.query.v1beta1.PageRequest(); + if (object.key != null) + if (typeof object.key === "string") + $util.base64.decode(object.key, message.key = $util.newBuffer($util.base64.length(object.key)), 0); + else if (object.key.length) + message.key = object.key; + if (object.offset != null) + if ($util.Long) + (message.offset = $util.Long.fromValue(object.offset)).unsigned = true; + else if (typeof object.offset === "string") + message.offset = parseInt(object.offset, 10); + else if (typeof object.offset === "number") + message.offset = object.offset; + else if (typeof object.offset === "object") + message.offset = new $util.LongBits(object.offset.low >>> 0, object.offset.high >>> 0).toNumber(true); + if (object.limit != null) + if ($util.Long) + (message.limit = $util.Long.fromValue(object.limit)).unsigned = true; + else if (typeof object.limit === "string") + message.limit = parseInt(object.limit, 10); + else if (typeof object.limit === "number") + message.limit = object.limit; + else if (typeof object.limit === "object") + message.limit = new $util.LongBits(object.limit.low >>> 0, object.limit.high >>> 0).toNumber(true); + if (object.countTotal != null) + message.countTotal = Boolean(object.countTotal); + return message; + }; + + /** + * Creates a plain object from a PageRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.base.query.v1beta1.PageRequest + * @static + * @param {cosmos.base.query.v1beta1.PageRequest} message PageRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PageRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + if (options.bytes === String) + object.key = ""; + else { + object.key = []; + if (options.bytes !== Array) + object.key = $util.newBuffer(object.key); + } + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.offset = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.offset = options.longs === String ? "0" : 0; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.limit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.limit = options.longs === String ? "0" : 0; + object.countTotal = false; + } + if (message.key != null && message.hasOwnProperty("key")) + object.key = options.bytes === String ? $util.base64.encode(message.key, 0, message.key.length) : options.bytes === Array ? Array.prototype.slice.call(message.key) : message.key; + if (message.offset != null && message.hasOwnProperty("offset")) + if (typeof message.offset === "number") + object.offset = options.longs === String ? String(message.offset) : message.offset; + else + object.offset = options.longs === String ? $util.Long.prototype.toString.call(message.offset) : options.longs === Number ? new $util.LongBits(message.offset.low >>> 0, message.offset.high >>> 0).toNumber(true) : message.offset; + if (message.limit != null && message.hasOwnProperty("limit")) + if (typeof message.limit === "number") + object.limit = options.longs === String ? String(message.limit) : message.limit; + else + object.limit = options.longs === String ? $util.Long.prototype.toString.call(message.limit) : options.longs === Number ? new $util.LongBits(message.limit.low >>> 0, message.limit.high >>> 0).toNumber(true) : message.limit; + if (message.countTotal != null && message.hasOwnProperty("countTotal")) + object.countTotal = message.countTotal; + return object; + }; + + /** + * Converts this PageRequest to JSON. + * @function toJSON + * @memberof cosmos.base.query.v1beta1.PageRequest + * @instance + * @returns {Object.} JSON object + */ + PageRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PageRequest; + })(v1beta1.PageRequest || {}); + + v1beta1.PageResponse = (function(PageResponse) { + + /** + * Properties of a PageResponse. + * @memberof cosmos.base.query.v1beta1 + * @interface IPageResponse + * @property {Uint8Array|null} [nextKey] PageResponse nextKey + * @property {number|Long|null} [total] PageResponse total + */ + + /** + * Constructs a new PageResponse. + * @memberof cosmos.base.query.v1beta1 + * @classdesc Represents a PageResponse. + * @implements IPageResponse + * @constructor + * @param {cosmos.base.query.v1beta1.IPageResponse=} [properties] Properties to set + */ + function PageResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PageResponse nextKey. + * @member {Uint8Array} nextKey + * @memberof cosmos.base.query.v1beta1.PageResponse + * @instance + */ + PageResponse.prototype.nextKey = $util.newBuffer([]); + + /** + * PageResponse total. + * @member {number|Long} total + * @memberof cosmos.base.query.v1beta1.PageResponse + * @instance + */ + PageResponse.prototype.total = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new PageResponse instance using the specified properties. + * @function create + * @memberof cosmos.base.query.v1beta1.PageResponse + * @static + * @param {cosmos.base.query.v1beta1.IPageResponse=} [properties] Properties to set + * @returns {cosmos.base.query.v1beta1.PageResponse} PageResponse instance + */ + PageResponse.create = function create(properties) { + return new PageResponse(properties); + }; + + /** + * Encodes the specified PageResponse message. Does not implicitly {@link cosmos.base.query.v1beta1.PageResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.base.query.v1beta1.PageResponse + * @static + * @param {cosmos.base.query.v1beta1.IPageResponse} message PageResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PageResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.nextKey != null && Object.hasOwnProperty.call(message, "nextKey")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.nextKey); + if (message.total != null && Object.hasOwnProperty.call(message, "total")) + writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.total); + return writer; + }; + + /** + * Encodes the specified PageResponse message, length delimited. Does not implicitly {@link cosmos.base.query.v1beta1.PageResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.base.query.v1beta1.PageResponse + * @static + * @param {cosmos.base.query.v1beta1.IPageResponse} message PageResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PageResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PageResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.base.query.v1beta1.PageResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.base.query.v1beta1.PageResponse} PageResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PageResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.query.v1beta1.PageResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.nextKey = reader.bytes(); + break; + case 2: + message.total = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PageResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.base.query.v1beta1.PageResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.base.query.v1beta1.PageResponse} PageResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PageResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PageResponse message. + * @function verify + * @memberof cosmos.base.query.v1beta1.PageResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PageResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.nextKey != null && message.hasOwnProperty("nextKey")) + if (!(message.nextKey && typeof message.nextKey.length === "number" || $util.isString(message.nextKey))) + return "nextKey: buffer expected"; + if (message.total != null && message.hasOwnProperty("total")) + if (!$util.isInteger(message.total) && !(message.total && $util.isInteger(message.total.low) && $util.isInteger(message.total.high))) + return "total: integer|Long expected"; + return null; + }; + + /** + * Creates a PageResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.base.query.v1beta1.PageResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.base.query.v1beta1.PageResponse} PageResponse + */ + PageResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.base.query.v1beta1.PageResponse) + return object; + let message = new $root.cosmos.base.query.v1beta1.PageResponse(); + if (object.nextKey != null) + if (typeof object.nextKey === "string") + $util.base64.decode(object.nextKey, message.nextKey = $util.newBuffer($util.base64.length(object.nextKey)), 0); + else if (object.nextKey.length) + message.nextKey = object.nextKey; + if (object.total != null) + if ($util.Long) + (message.total = $util.Long.fromValue(object.total)).unsigned = true; + else if (typeof object.total === "string") + message.total = parseInt(object.total, 10); + else if (typeof object.total === "number") + message.total = object.total; + else if (typeof object.total === "object") + message.total = new $util.LongBits(object.total.low >>> 0, object.total.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a PageResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.base.query.v1beta1.PageResponse + * @static + * @param {cosmos.base.query.v1beta1.PageResponse} message PageResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PageResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + if (options.bytes === String) + object.nextKey = ""; + else { + object.nextKey = []; + if (options.bytes !== Array) + object.nextKey = $util.newBuffer(object.nextKey); + } + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.total = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.total = options.longs === String ? "0" : 0; + } + if (message.nextKey != null && message.hasOwnProperty("nextKey")) + object.nextKey = options.bytes === String ? $util.base64.encode(message.nextKey, 0, message.nextKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.nextKey) : message.nextKey; + if (message.total != null && message.hasOwnProperty("total")) + if (typeof message.total === "number") + object.total = options.longs === String ? String(message.total) : message.total; + else + object.total = options.longs === String ? $util.Long.prototype.toString.call(message.total) : options.longs === Number ? new $util.LongBits(message.total.low >>> 0, message.total.high >>> 0).toNumber(true) : message.total; + return object; + }; + + /** + * Converts this PageResponse to JSON. + * @function toJSON + * @memberof cosmos.base.query.v1beta1.PageResponse + * @instance + * @returns {Object.} JSON object + */ + PageResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PageResponse; + })(v1beta1.PageResponse || {}); + + return v1beta1; + })(query.v1beta1 || {}); + + return query; + })(base.query || {}); + + /** + * Namespace reflection. + * @memberof cosmos.base + * @namespace + */ + + base.reflection = (function(reflection) { + + /** + * Namespace v1beta1. + * @memberof cosmos.base.reflection + * @namespace + */ + + reflection.v1beta1 = (function(v1beta1) { + + v1beta1.ReflectionService = (function(ReflectionService) { + + /** + * Constructs a new ReflectionService service. + * @memberof cosmos.base.reflection.v1beta1 + * @classdesc Represents a ReflectionService + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function ReflectionService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (ReflectionService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ReflectionService; + + /** + * Creates new ReflectionService service using the specified rpc implementation. + * @function create + * @memberof cosmos.base.reflection.v1beta1.ReflectionService + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {ReflectionService} RPC service. Useful where requests and/or responses are streamed. + */ + ReflectionService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link cosmos.base.reflection.v1beta1.ReflectionService#listAllInterfaces}. + * @memberof cosmos.base.reflection.v1beta1.ReflectionService + * @typedef ListAllInterfacesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.base.reflection.v1beta1.IListAllInterfacesResponse} [response] ListAllInterfacesResponse + */ + + /** + * Calls ListAllInterfaces. + * @function listAllInterfaces + * @memberof cosmos.base.reflection.v1beta1.ReflectionService + * @instance + * @param {cosmos.base.reflection.v1beta1.IListAllInterfacesRequest} request ListAllInterfacesRequest message or plain object + * @param {cosmos.base.reflection.v1beta1.ReflectionService.ListAllInterfacesCallback} callback Node-style callback called with the error, if any, and ListAllInterfacesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ReflectionService.prototype.listAllInterfaces = function listAllInterfaces(request, callback) { + return this.rpcCall(listAllInterfaces, $root.cosmos.base.reflection.v1beta1.ListAllInterfacesRequest, $root.cosmos.base.reflection.v1beta1.ListAllInterfacesResponse, request, callback); + }, "name", { value: "ListAllInterfaces" }); + + /** + * Calls ListAllInterfaces. + * @function listAllInterfaces + * @memberof cosmos.base.reflection.v1beta1.ReflectionService + * @instance + * @param {cosmos.base.reflection.v1beta1.IListAllInterfacesRequest} request ListAllInterfacesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link cosmos.base.reflection.v1beta1.ReflectionService#listImplementations}. + * @memberof cosmos.base.reflection.v1beta1.ReflectionService + * @typedef ListImplementationsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.base.reflection.v1beta1.IListImplementationsResponse} [response] ListImplementationsResponse + */ + + /** + * Calls ListImplementations. + * @function listImplementations + * @memberof cosmos.base.reflection.v1beta1.ReflectionService + * @instance + * @param {cosmos.base.reflection.v1beta1.IListImplementationsRequest} request ListImplementationsRequest message or plain object + * @param {cosmos.base.reflection.v1beta1.ReflectionService.ListImplementationsCallback} callback Node-style callback called with the error, if any, and ListImplementationsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ReflectionService.prototype.listImplementations = function listImplementations(request, callback) { + return this.rpcCall(listImplementations, $root.cosmos.base.reflection.v1beta1.ListImplementationsRequest, $root.cosmos.base.reflection.v1beta1.ListImplementationsResponse, request, callback); + }, "name", { value: "ListImplementations" }); + + /** + * Calls ListImplementations. + * @function listImplementations + * @memberof cosmos.base.reflection.v1beta1.ReflectionService + * @instance + * @param {cosmos.base.reflection.v1beta1.IListImplementationsRequest} request ListImplementationsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return ReflectionService; + })(v1beta1.ReflectionService || {}); + + v1beta1.ListAllInterfacesRequest = (function(ListAllInterfacesRequest) { + + /** + * Properties of a ListAllInterfacesRequest. + * @memberof cosmos.base.reflection.v1beta1 + * @interface IListAllInterfacesRequest + */ + + /** + * Constructs a new ListAllInterfacesRequest. + * @memberof cosmos.base.reflection.v1beta1 + * @classdesc Represents a ListAllInterfacesRequest. + * @implements IListAllInterfacesRequest + * @constructor + * @param {cosmos.base.reflection.v1beta1.IListAllInterfacesRequest=} [properties] Properties to set + */ + function ListAllInterfacesRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new ListAllInterfacesRequest instance using the specified properties. + * @function create + * @memberof cosmos.base.reflection.v1beta1.ListAllInterfacesRequest + * @static + * @param {cosmos.base.reflection.v1beta1.IListAllInterfacesRequest=} [properties] Properties to set + * @returns {cosmos.base.reflection.v1beta1.ListAllInterfacesRequest} ListAllInterfacesRequest instance + */ + ListAllInterfacesRequest.create = function create(properties) { + return new ListAllInterfacesRequest(properties); + }; + + /** + * Encodes the specified ListAllInterfacesRequest message. Does not implicitly {@link cosmos.base.reflection.v1beta1.ListAllInterfacesRequest.verify|verify} messages. + * @function encode + * @memberof cosmos.base.reflection.v1beta1.ListAllInterfacesRequest + * @static + * @param {cosmos.base.reflection.v1beta1.IListAllInterfacesRequest} message ListAllInterfacesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAllInterfacesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified ListAllInterfacesRequest message, length delimited. Does not implicitly {@link cosmos.base.reflection.v1beta1.ListAllInterfacesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.base.reflection.v1beta1.ListAllInterfacesRequest + * @static + * @param {cosmos.base.reflection.v1beta1.IListAllInterfacesRequest} message ListAllInterfacesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAllInterfacesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListAllInterfacesRequest message from the specified reader or buffer. + * @function decode + * @memberof cosmos.base.reflection.v1beta1.ListAllInterfacesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.base.reflection.v1beta1.ListAllInterfacesRequest} ListAllInterfacesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAllInterfacesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.reflection.v1beta1.ListAllInterfacesRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListAllInterfacesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.base.reflection.v1beta1.ListAllInterfacesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.base.reflection.v1beta1.ListAllInterfacesRequest} ListAllInterfacesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAllInterfacesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListAllInterfacesRequest message. + * @function verify + * @memberof cosmos.base.reflection.v1beta1.ListAllInterfacesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListAllInterfacesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a ListAllInterfacesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.base.reflection.v1beta1.ListAllInterfacesRequest + * @static + * @param {Object.} object Plain object + * @returns {cosmos.base.reflection.v1beta1.ListAllInterfacesRequest} ListAllInterfacesRequest + */ + ListAllInterfacesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.base.reflection.v1beta1.ListAllInterfacesRequest) + return object; + return new $root.cosmos.base.reflection.v1beta1.ListAllInterfacesRequest(); + }; + + /** + * Creates a plain object from a ListAllInterfacesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.base.reflection.v1beta1.ListAllInterfacesRequest + * @static + * @param {cosmos.base.reflection.v1beta1.ListAllInterfacesRequest} message ListAllInterfacesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListAllInterfacesRequest.toObject = function toObject() { + return {}; + }; + + /** + * Converts this ListAllInterfacesRequest to JSON. + * @function toJSON + * @memberof cosmos.base.reflection.v1beta1.ListAllInterfacesRequest + * @instance + * @returns {Object.} JSON object + */ + ListAllInterfacesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListAllInterfacesRequest; + })(v1beta1.ListAllInterfacesRequest || {}); + + v1beta1.ListAllInterfacesResponse = (function(ListAllInterfacesResponse) { + + /** + * Properties of a ListAllInterfacesResponse. + * @memberof cosmos.base.reflection.v1beta1 + * @interface IListAllInterfacesResponse + * @property {Array.|null} [interfaceNames] ListAllInterfacesResponse interfaceNames + */ + + /** + * Constructs a new ListAllInterfacesResponse. + * @memberof cosmos.base.reflection.v1beta1 + * @classdesc Represents a ListAllInterfacesResponse. + * @implements IListAllInterfacesResponse + * @constructor + * @param {cosmos.base.reflection.v1beta1.IListAllInterfacesResponse=} [properties] Properties to set + */ + function ListAllInterfacesResponse(properties) { + this.interfaceNames = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListAllInterfacesResponse interfaceNames. + * @member {Array.} interfaceNames + * @memberof cosmos.base.reflection.v1beta1.ListAllInterfacesResponse + * @instance + */ + ListAllInterfacesResponse.prototype.interfaceNames = $util.emptyArray; + + /** + * Creates a new ListAllInterfacesResponse instance using the specified properties. + * @function create + * @memberof cosmos.base.reflection.v1beta1.ListAllInterfacesResponse + * @static + * @param {cosmos.base.reflection.v1beta1.IListAllInterfacesResponse=} [properties] Properties to set + * @returns {cosmos.base.reflection.v1beta1.ListAllInterfacesResponse} ListAllInterfacesResponse instance + */ + ListAllInterfacesResponse.create = function create(properties) { + return new ListAllInterfacesResponse(properties); + }; + + /** + * Encodes the specified ListAllInterfacesResponse message. Does not implicitly {@link cosmos.base.reflection.v1beta1.ListAllInterfacesResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.base.reflection.v1beta1.ListAllInterfacesResponse + * @static + * @param {cosmos.base.reflection.v1beta1.IListAllInterfacesResponse} message ListAllInterfacesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAllInterfacesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.interfaceNames != null && message.interfaceNames.length) + for (let i = 0; i < message.interfaceNames.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.interfaceNames[i]); + return writer; + }; + + /** + * Encodes the specified ListAllInterfacesResponse message, length delimited. Does not implicitly {@link cosmos.base.reflection.v1beta1.ListAllInterfacesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.base.reflection.v1beta1.ListAllInterfacesResponse + * @static + * @param {cosmos.base.reflection.v1beta1.IListAllInterfacesResponse} message ListAllInterfacesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAllInterfacesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListAllInterfacesResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.base.reflection.v1beta1.ListAllInterfacesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.base.reflection.v1beta1.ListAllInterfacesResponse} ListAllInterfacesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAllInterfacesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.reflection.v1beta1.ListAllInterfacesResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.interfaceNames && message.interfaceNames.length)) + message.interfaceNames = []; + message.interfaceNames.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListAllInterfacesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.base.reflection.v1beta1.ListAllInterfacesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.base.reflection.v1beta1.ListAllInterfacesResponse} ListAllInterfacesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAllInterfacesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListAllInterfacesResponse message. + * @function verify + * @memberof cosmos.base.reflection.v1beta1.ListAllInterfacesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListAllInterfacesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.interfaceNames != null && message.hasOwnProperty("interfaceNames")) { + if (!Array.isArray(message.interfaceNames)) + return "interfaceNames: array expected"; + for (let i = 0; i < message.interfaceNames.length; ++i) + if (!$util.isString(message.interfaceNames[i])) + return "interfaceNames: string[] expected"; + } + return null; + }; + + /** + * Creates a ListAllInterfacesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.base.reflection.v1beta1.ListAllInterfacesResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.base.reflection.v1beta1.ListAllInterfacesResponse} ListAllInterfacesResponse + */ + ListAllInterfacesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.base.reflection.v1beta1.ListAllInterfacesResponse) + return object; + let message = new $root.cosmos.base.reflection.v1beta1.ListAllInterfacesResponse(); + if (object.interfaceNames) { + if (!Array.isArray(object.interfaceNames)) + throw TypeError(".cosmos.base.reflection.v1beta1.ListAllInterfacesResponse.interfaceNames: array expected"); + message.interfaceNames = []; + for (let i = 0; i < object.interfaceNames.length; ++i) + message.interfaceNames[i] = String(object.interfaceNames[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListAllInterfacesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.base.reflection.v1beta1.ListAllInterfacesResponse + * @static + * @param {cosmos.base.reflection.v1beta1.ListAllInterfacesResponse} message ListAllInterfacesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListAllInterfacesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.interfaceNames = []; + if (message.interfaceNames && message.interfaceNames.length) { + object.interfaceNames = []; + for (let j = 0; j < message.interfaceNames.length; ++j) + object.interfaceNames[j] = message.interfaceNames[j]; + } + return object; + }; + + /** + * Converts this ListAllInterfacesResponse to JSON. + * @function toJSON + * @memberof cosmos.base.reflection.v1beta1.ListAllInterfacesResponse + * @instance + * @returns {Object.} JSON object + */ + ListAllInterfacesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListAllInterfacesResponse; + })(v1beta1.ListAllInterfacesResponse || {}); + + v1beta1.ListImplementationsRequest = (function(ListImplementationsRequest) { + + /** + * Properties of a ListImplementationsRequest. + * @memberof cosmos.base.reflection.v1beta1 + * @interface IListImplementationsRequest + * @property {string|null} [interfaceName] ListImplementationsRequest interfaceName + */ + + /** + * Constructs a new ListImplementationsRequest. + * @memberof cosmos.base.reflection.v1beta1 + * @classdesc Represents a ListImplementationsRequest. + * @implements IListImplementationsRequest + * @constructor + * @param {cosmos.base.reflection.v1beta1.IListImplementationsRequest=} [properties] Properties to set + */ + function ListImplementationsRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListImplementationsRequest interfaceName. + * @member {string} interfaceName + * @memberof cosmos.base.reflection.v1beta1.ListImplementationsRequest + * @instance + */ + ListImplementationsRequest.prototype.interfaceName = ""; + + /** + * Creates a new ListImplementationsRequest instance using the specified properties. + * @function create + * @memberof cosmos.base.reflection.v1beta1.ListImplementationsRequest + * @static + * @param {cosmos.base.reflection.v1beta1.IListImplementationsRequest=} [properties] Properties to set + * @returns {cosmos.base.reflection.v1beta1.ListImplementationsRequest} ListImplementationsRequest instance + */ + ListImplementationsRequest.create = function create(properties) { + return new ListImplementationsRequest(properties); + }; + + /** + * Encodes the specified ListImplementationsRequest message. Does not implicitly {@link cosmos.base.reflection.v1beta1.ListImplementationsRequest.verify|verify} messages. + * @function encode + * @memberof cosmos.base.reflection.v1beta1.ListImplementationsRequest + * @static + * @param {cosmos.base.reflection.v1beta1.IListImplementationsRequest} message ListImplementationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListImplementationsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.interfaceName != null && Object.hasOwnProperty.call(message, "interfaceName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.interfaceName); + return writer; + }; + + /** + * Encodes the specified ListImplementationsRequest message, length delimited. Does not implicitly {@link cosmos.base.reflection.v1beta1.ListImplementationsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.base.reflection.v1beta1.ListImplementationsRequest + * @static + * @param {cosmos.base.reflection.v1beta1.IListImplementationsRequest} message ListImplementationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListImplementationsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListImplementationsRequest message from the specified reader or buffer. + * @function decode + * @memberof cosmos.base.reflection.v1beta1.ListImplementationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.base.reflection.v1beta1.ListImplementationsRequest} ListImplementationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListImplementationsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.reflection.v1beta1.ListImplementationsRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.interfaceName = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListImplementationsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.base.reflection.v1beta1.ListImplementationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.base.reflection.v1beta1.ListImplementationsRequest} ListImplementationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListImplementationsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListImplementationsRequest message. + * @function verify + * @memberof cosmos.base.reflection.v1beta1.ListImplementationsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListImplementationsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.interfaceName != null && message.hasOwnProperty("interfaceName")) + if (!$util.isString(message.interfaceName)) + return "interfaceName: string expected"; + return null; + }; + + /** + * Creates a ListImplementationsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.base.reflection.v1beta1.ListImplementationsRequest + * @static + * @param {Object.} object Plain object + * @returns {cosmos.base.reflection.v1beta1.ListImplementationsRequest} ListImplementationsRequest + */ + ListImplementationsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.base.reflection.v1beta1.ListImplementationsRequest) + return object; + let message = new $root.cosmos.base.reflection.v1beta1.ListImplementationsRequest(); + if (object.interfaceName != null) + message.interfaceName = String(object.interfaceName); + return message; + }; + + /** + * Creates a plain object from a ListImplementationsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.base.reflection.v1beta1.ListImplementationsRequest + * @static + * @param {cosmos.base.reflection.v1beta1.ListImplementationsRequest} message ListImplementationsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListImplementationsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.interfaceName = ""; + if (message.interfaceName != null && message.hasOwnProperty("interfaceName")) + object.interfaceName = message.interfaceName; + return object; + }; + + /** + * Converts this ListImplementationsRequest to JSON. + * @function toJSON + * @memberof cosmos.base.reflection.v1beta1.ListImplementationsRequest + * @instance + * @returns {Object.} JSON object + */ + ListImplementationsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListImplementationsRequest; + })(v1beta1.ListImplementationsRequest || {}); + + v1beta1.ListImplementationsResponse = (function(ListImplementationsResponse) { + + /** + * Properties of a ListImplementationsResponse. + * @memberof cosmos.base.reflection.v1beta1 + * @interface IListImplementationsResponse + * @property {Array.|null} [implementationMessageNames] ListImplementationsResponse implementationMessageNames + */ + + /** + * Constructs a new ListImplementationsResponse. + * @memberof cosmos.base.reflection.v1beta1 + * @classdesc Represents a ListImplementationsResponse. + * @implements IListImplementationsResponse + * @constructor + * @param {cosmos.base.reflection.v1beta1.IListImplementationsResponse=} [properties] Properties to set + */ + function ListImplementationsResponse(properties) { + this.implementationMessageNames = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListImplementationsResponse implementationMessageNames. + * @member {Array.} implementationMessageNames + * @memberof cosmos.base.reflection.v1beta1.ListImplementationsResponse + * @instance + */ + ListImplementationsResponse.prototype.implementationMessageNames = $util.emptyArray; + + /** + * Creates a new ListImplementationsResponse instance using the specified properties. + * @function create + * @memberof cosmos.base.reflection.v1beta1.ListImplementationsResponse + * @static + * @param {cosmos.base.reflection.v1beta1.IListImplementationsResponse=} [properties] Properties to set + * @returns {cosmos.base.reflection.v1beta1.ListImplementationsResponse} ListImplementationsResponse instance + */ + ListImplementationsResponse.create = function create(properties) { + return new ListImplementationsResponse(properties); + }; + + /** + * Encodes the specified ListImplementationsResponse message. Does not implicitly {@link cosmos.base.reflection.v1beta1.ListImplementationsResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.base.reflection.v1beta1.ListImplementationsResponse + * @static + * @param {cosmos.base.reflection.v1beta1.IListImplementationsResponse} message ListImplementationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListImplementationsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.implementationMessageNames != null && message.implementationMessageNames.length) + for (let i = 0; i < message.implementationMessageNames.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.implementationMessageNames[i]); + return writer; + }; + + /** + * Encodes the specified ListImplementationsResponse message, length delimited. Does not implicitly {@link cosmos.base.reflection.v1beta1.ListImplementationsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.base.reflection.v1beta1.ListImplementationsResponse + * @static + * @param {cosmos.base.reflection.v1beta1.IListImplementationsResponse} message ListImplementationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListImplementationsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListImplementationsResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.base.reflection.v1beta1.ListImplementationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.base.reflection.v1beta1.ListImplementationsResponse} ListImplementationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListImplementationsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.reflection.v1beta1.ListImplementationsResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.implementationMessageNames && message.implementationMessageNames.length)) + message.implementationMessageNames = []; + message.implementationMessageNames.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListImplementationsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.base.reflection.v1beta1.ListImplementationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.base.reflection.v1beta1.ListImplementationsResponse} ListImplementationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListImplementationsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListImplementationsResponse message. + * @function verify + * @memberof cosmos.base.reflection.v1beta1.ListImplementationsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListImplementationsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.implementationMessageNames != null && message.hasOwnProperty("implementationMessageNames")) { + if (!Array.isArray(message.implementationMessageNames)) + return "implementationMessageNames: array expected"; + for (let i = 0; i < message.implementationMessageNames.length; ++i) + if (!$util.isString(message.implementationMessageNames[i])) + return "implementationMessageNames: string[] expected"; + } + return null; + }; + + /** + * Creates a ListImplementationsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.base.reflection.v1beta1.ListImplementationsResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.base.reflection.v1beta1.ListImplementationsResponse} ListImplementationsResponse + */ + ListImplementationsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.base.reflection.v1beta1.ListImplementationsResponse) + return object; + let message = new $root.cosmos.base.reflection.v1beta1.ListImplementationsResponse(); + if (object.implementationMessageNames) { + if (!Array.isArray(object.implementationMessageNames)) + throw TypeError(".cosmos.base.reflection.v1beta1.ListImplementationsResponse.implementationMessageNames: array expected"); + message.implementationMessageNames = []; + for (let i = 0; i < object.implementationMessageNames.length; ++i) + message.implementationMessageNames[i] = String(object.implementationMessageNames[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListImplementationsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.base.reflection.v1beta1.ListImplementationsResponse + * @static + * @param {cosmos.base.reflection.v1beta1.ListImplementationsResponse} message ListImplementationsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListImplementationsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.implementationMessageNames = []; + if (message.implementationMessageNames && message.implementationMessageNames.length) { + object.implementationMessageNames = []; + for (let j = 0; j < message.implementationMessageNames.length; ++j) + object.implementationMessageNames[j] = message.implementationMessageNames[j]; + } + return object; + }; + + /** + * Converts this ListImplementationsResponse to JSON. + * @function toJSON + * @memberof cosmos.base.reflection.v1beta1.ListImplementationsResponse + * @instance + * @returns {Object.} JSON object + */ + ListImplementationsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListImplementationsResponse; + })(v1beta1.ListImplementationsResponse || {}); + + return v1beta1; + })(reflection.v1beta1 || {}); + + return reflection; + })(base.reflection || {}); + + /** + * Namespace snapshots. + * @memberof cosmos.base + * @namespace + */ + + base.snapshots = (function(snapshots) { + + /** + * Namespace v1beta1. + * @memberof cosmos.base.snapshots + * @namespace + */ + + snapshots.v1beta1 = (function(v1beta1) { + + v1beta1.Snapshot = (function(Snapshot) { + + /** + * Properties of a Snapshot. + * @memberof cosmos.base.snapshots.v1beta1 + * @interface ISnapshot + * @property {number|Long|null} [height] Snapshot height + * @property {number|null} [format] Snapshot format + * @property {number|null} [chunks] Snapshot chunks + * @property {Uint8Array|null} [hash] Snapshot hash + * @property {cosmos.base.snapshots.v1beta1.IMetadata|null} [metadata] Snapshot metadata + */ + + /** + * Constructs a new Snapshot. + * @memberof cosmos.base.snapshots.v1beta1 + * @classdesc Represents a Snapshot. + * @implements ISnapshot + * @constructor + * @param {cosmos.base.snapshots.v1beta1.ISnapshot=} [properties] Properties to set + */ + function Snapshot(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Snapshot height. + * @member {number|Long} height + * @memberof cosmos.base.snapshots.v1beta1.Snapshot + * @instance + */ + Snapshot.prototype.height = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Snapshot format. + * @member {number} format + * @memberof cosmos.base.snapshots.v1beta1.Snapshot + * @instance + */ + Snapshot.prototype.format = 0; + + /** + * Snapshot chunks. + * @member {number} chunks + * @memberof cosmos.base.snapshots.v1beta1.Snapshot + * @instance + */ + Snapshot.prototype.chunks = 0; + + /** + * Snapshot hash. + * @member {Uint8Array} hash + * @memberof cosmos.base.snapshots.v1beta1.Snapshot + * @instance + */ + Snapshot.prototype.hash = $util.newBuffer([]); + + /** + * Snapshot metadata. + * @member {cosmos.base.snapshots.v1beta1.IMetadata|null|undefined} metadata + * @memberof cosmos.base.snapshots.v1beta1.Snapshot + * @instance + */ + Snapshot.prototype.metadata = null; + + /** + * Creates a new Snapshot instance using the specified properties. + * @function create + * @memberof cosmos.base.snapshots.v1beta1.Snapshot + * @static + * @param {cosmos.base.snapshots.v1beta1.ISnapshot=} [properties] Properties to set + * @returns {cosmos.base.snapshots.v1beta1.Snapshot} Snapshot instance + */ + Snapshot.create = function create(properties) { + return new Snapshot(properties); + }; + + /** + * Encodes the specified Snapshot message. Does not implicitly {@link cosmos.base.snapshots.v1beta1.Snapshot.verify|verify} messages. + * @function encode + * @memberof cosmos.base.snapshots.v1beta1.Snapshot + * @static + * @param {cosmos.base.snapshots.v1beta1.ISnapshot} message Snapshot message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Snapshot.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.height != null && Object.hasOwnProperty.call(message, "height")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.height); + if (message.format != null && Object.hasOwnProperty.call(message, "format")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.format); + if (message.chunks != null && Object.hasOwnProperty.call(message, "chunks")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.chunks); + if (message.hash != null && Object.hasOwnProperty.call(message, "hash")) + writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.hash); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.cosmos.base.snapshots.v1beta1.Metadata.encode(message.metadata, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Snapshot message, length delimited. Does not implicitly {@link cosmos.base.snapshots.v1beta1.Snapshot.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.base.snapshots.v1beta1.Snapshot + * @static + * @param {cosmos.base.snapshots.v1beta1.ISnapshot} message Snapshot message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Snapshot.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Snapshot message from the specified reader or buffer. + * @function decode + * @memberof cosmos.base.snapshots.v1beta1.Snapshot + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.base.snapshots.v1beta1.Snapshot} Snapshot + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Snapshot.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.snapshots.v1beta1.Snapshot(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.height = reader.uint64(); + break; + case 2: + message.format = reader.uint32(); + break; + case 3: + message.chunks = reader.uint32(); + break; + case 4: + message.hash = reader.bytes(); + break; + case 5: + message.metadata = $root.cosmos.base.snapshots.v1beta1.Metadata.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Snapshot message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.base.snapshots.v1beta1.Snapshot + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.base.snapshots.v1beta1.Snapshot} Snapshot + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Snapshot.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Snapshot message. + * @function verify + * @memberof cosmos.base.snapshots.v1beta1.Snapshot + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Snapshot.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.height != null && message.hasOwnProperty("height")) + if (!$util.isInteger(message.height) && !(message.height && $util.isInteger(message.height.low) && $util.isInteger(message.height.high))) + return "height: integer|Long expected"; + if (message.format != null && message.hasOwnProperty("format")) + if (!$util.isInteger(message.format)) + return "format: integer expected"; + if (message.chunks != null && message.hasOwnProperty("chunks")) + if (!$util.isInteger(message.chunks)) + return "chunks: integer expected"; + if (message.hash != null && message.hasOwnProperty("hash")) + if (!(message.hash && typeof message.hash.length === "number" || $util.isString(message.hash))) + return "hash: buffer expected"; + if (message.metadata != null && message.hasOwnProperty("metadata")) { + let error = $root.cosmos.base.snapshots.v1beta1.Metadata.verify(message.metadata); + if (error) + return "metadata." + error; + } + return null; + }; + + /** + * Creates a Snapshot message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.base.snapshots.v1beta1.Snapshot + * @static + * @param {Object.} object Plain object + * @returns {cosmos.base.snapshots.v1beta1.Snapshot} Snapshot + */ + Snapshot.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.base.snapshots.v1beta1.Snapshot) + return object; + let message = new $root.cosmos.base.snapshots.v1beta1.Snapshot(); + if (object.height != null) + if ($util.Long) + (message.height = $util.Long.fromValue(object.height)).unsigned = true; + else if (typeof object.height === "string") + message.height = parseInt(object.height, 10); + else if (typeof object.height === "number") + message.height = object.height; + else if (typeof object.height === "object") + message.height = new $util.LongBits(object.height.low >>> 0, object.height.high >>> 0).toNumber(true); + if (object.format != null) + message.format = object.format >>> 0; + if (object.chunks != null) + message.chunks = object.chunks >>> 0; + if (object.hash != null) + if (typeof object.hash === "string") + $util.base64.decode(object.hash, message.hash = $util.newBuffer($util.base64.length(object.hash)), 0); + else if (object.hash.length) + message.hash = object.hash; + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".cosmos.base.snapshots.v1beta1.Snapshot.metadata: object expected"); + message.metadata = $root.cosmos.base.snapshots.v1beta1.Metadata.fromObject(object.metadata); + } + return message; + }; + + /** + * Creates a plain object from a Snapshot message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.base.snapshots.v1beta1.Snapshot + * @static + * @param {cosmos.base.snapshots.v1beta1.Snapshot} message Snapshot + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Snapshot.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.height = options.longs === String ? "0" : 0; + object.format = 0; + object.chunks = 0; + if (options.bytes === String) + object.hash = ""; + else { + object.hash = []; + if (options.bytes !== Array) + object.hash = $util.newBuffer(object.hash); + } + object.metadata = null; + } + if (message.height != null && message.hasOwnProperty("height")) + if (typeof message.height === "number") + object.height = options.longs === String ? String(message.height) : message.height; + else + object.height = options.longs === String ? $util.Long.prototype.toString.call(message.height) : options.longs === Number ? new $util.LongBits(message.height.low >>> 0, message.height.high >>> 0).toNumber(true) : message.height; + if (message.format != null && message.hasOwnProperty("format")) + object.format = message.format; + if (message.chunks != null && message.hasOwnProperty("chunks")) + object.chunks = message.chunks; + if (message.hash != null && message.hasOwnProperty("hash")) + object.hash = options.bytes === String ? $util.base64.encode(message.hash, 0, message.hash.length) : options.bytes === Array ? Array.prototype.slice.call(message.hash) : message.hash; + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.cosmos.base.snapshots.v1beta1.Metadata.toObject(message.metadata, options); + return object; + }; + + /** + * Converts this Snapshot to JSON. + * @function toJSON + * @memberof cosmos.base.snapshots.v1beta1.Snapshot + * @instance + * @returns {Object.} JSON object + */ + Snapshot.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Snapshot; + })(v1beta1.Snapshot || {}); + + v1beta1.Metadata = (function(Metadata) { + + /** + * Properties of a Metadata. + * @memberof cosmos.base.snapshots.v1beta1 + * @interface IMetadata + * @property {Array.|null} [chunkHashes] Metadata chunkHashes + */ + + /** + * Constructs a new Metadata. + * @memberof cosmos.base.snapshots.v1beta1 + * @classdesc Represents a Metadata. + * @implements IMetadata + * @constructor + * @param {cosmos.base.snapshots.v1beta1.IMetadata=} [properties] Properties to set + */ + function Metadata(properties) { + this.chunkHashes = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Metadata chunkHashes. + * @member {Array.} chunkHashes + * @memberof cosmos.base.snapshots.v1beta1.Metadata + * @instance + */ + Metadata.prototype.chunkHashes = $util.emptyArray; + + /** + * Creates a new Metadata instance using the specified properties. + * @function create + * @memberof cosmos.base.snapshots.v1beta1.Metadata + * @static + * @param {cosmos.base.snapshots.v1beta1.IMetadata=} [properties] Properties to set + * @returns {cosmos.base.snapshots.v1beta1.Metadata} Metadata instance + */ + Metadata.create = function create(properties) { + return new Metadata(properties); + }; + + /** + * Encodes the specified Metadata message. Does not implicitly {@link cosmos.base.snapshots.v1beta1.Metadata.verify|verify} messages. + * @function encode + * @memberof cosmos.base.snapshots.v1beta1.Metadata + * @static + * @param {cosmos.base.snapshots.v1beta1.IMetadata} message Metadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Metadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.chunkHashes != null && message.chunkHashes.length) + for (let i = 0; i < message.chunkHashes.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.chunkHashes[i]); + return writer; + }; + + /** + * Encodes the specified Metadata message, length delimited. Does not implicitly {@link cosmos.base.snapshots.v1beta1.Metadata.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.base.snapshots.v1beta1.Metadata + * @static + * @param {cosmos.base.snapshots.v1beta1.IMetadata} message Metadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Metadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Metadata message from the specified reader or buffer. + * @function decode + * @memberof cosmos.base.snapshots.v1beta1.Metadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.base.snapshots.v1beta1.Metadata} Metadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Metadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.snapshots.v1beta1.Metadata(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.chunkHashes && message.chunkHashes.length)) + message.chunkHashes = []; + message.chunkHashes.push(reader.bytes()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Metadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.base.snapshots.v1beta1.Metadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.base.snapshots.v1beta1.Metadata} Metadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Metadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Metadata message. + * @function verify + * @memberof cosmos.base.snapshots.v1beta1.Metadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Metadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.chunkHashes != null && message.hasOwnProperty("chunkHashes")) { + if (!Array.isArray(message.chunkHashes)) + return "chunkHashes: array expected"; + for (let i = 0; i < message.chunkHashes.length; ++i) + if (!(message.chunkHashes[i] && typeof message.chunkHashes[i].length === "number" || $util.isString(message.chunkHashes[i]))) + return "chunkHashes: buffer[] expected"; + } + return null; + }; + + /** + * Creates a Metadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.base.snapshots.v1beta1.Metadata + * @static + * @param {Object.} object Plain object + * @returns {cosmos.base.snapshots.v1beta1.Metadata} Metadata + */ + Metadata.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.base.snapshots.v1beta1.Metadata) + return object; + let message = new $root.cosmos.base.snapshots.v1beta1.Metadata(); + if (object.chunkHashes) { + if (!Array.isArray(object.chunkHashes)) + throw TypeError(".cosmos.base.snapshots.v1beta1.Metadata.chunkHashes: array expected"); + message.chunkHashes = []; + for (let i = 0; i < object.chunkHashes.length; ++i) + if (typeof object.chunkHashes[i] === "string") + $util.base64.decode(object.chunkHashes[i], message.chunkHashes[i] = $util.newBuffer($util.base64.length(object.chunkHashes[i])), 0); + else if (object.chunkHashes[i].length) + message.chunkHashes[i] = object.chunkHashes[i]; + } + return message; + }; + + /** + * Creates a plain object from a Metadata message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.base.snapshots.v1beta1.Metadata + * @static + * @param {cosmos.base.snapshots.v1beta1.Metadata} message Metadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Metadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.chunkHashes = []; + if (message.chunkHashes && message.chunkHashes.length) { + object.chunkHashes = []; + for (let j = 0; j < message.chunkHashes.length; ++j) + object.chunkHashes[j] = options.bytes === String ? $util.base64.encode(message.chunkHashes[j], 0, message.chunkHashes[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.chunkHashes[j]) : message.chunkHashes[j]; + } + return object; + }; + + /** + * Converts this Metadata to JSON. + * @function toJSON + * @memberof cosmos.base.snapshots.v1beta1.Metadata + * @instance + * @returns {Object.} JSON object + */ + Metadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Metadata; + })(v1beta1.Metadata || {}); + + return v1beta1; + })(snapshots.v1beta1 || {}); + + return snapshots; + })(base.snapshots || {}); + + /** + * Namespace store. + * @memberof cosmos.base + * @namespace + */ + + base.store = (function(store) { + + /** + * Namespace v1beta1. + * @memberof cosmos.base.store + * @namespace + */ + + store.v1beta1 = (function(v1beta1) { + + v1beta1.CommitInfo = (function(CommitInfo) { + + /** + * Properties of a CommitInfo. + * @memberof cosmos.base.store.v1beta1 + * @interface ICommitInfo + * @property {number|Long|null} [version] CommitInfo version + * @property {Array.|null} [storeInfos] CommitInfo storeInfos + */ + + /** + * Constructs a new CommitInfo. + * @memberof cosmos.base.store.v1beta1 + * @classdesc Represents a CommitInfo. + * @implements ICommitInfo + * @constructor + * @param {cosmos.base.store.v1beta1.ICommitInfo=} [properties] Properties to set + */ + function CommitInfo(properties) { + this.storeInfos = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CommitInfo version. + * @member {number|Long} version + * @memberof cosmos.base.store.v1beta1.CommitInfo + * @instance + */ + CommitInfo.prototype.version = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * CommitInfo storeInfos. + * @member {Array.} storeInfos + * @memberof cosmos.base.store.v1beta1.CommitInfo + * @instance + */ + CommitInfo.prototype.storeInfos = $util.emptyArray; + + /** + * Creates a new CommitInfo instance using the specified properties. + * @function create + * @memberof cosmos.base.store.v1beta1.CommitInfo + * @static + * @param {cosmos.base.store.v1beta1.ICommitInfo=} [properties] Properties to set + * @returns {cosmos.base.store.v1beta1.CommitInfo} CommitInfo instance + */ + CommitInfo.create = function create(properties) { + return new CommitInfo(properties); + }; + + /** + * Encodes the specified CommitInfo message. Does not implicitly {@link cosmos.base.store.v1beta1.CommitInfo.verify|verify} messages. + * @function encode + * @memberof cosmos.base.store.v1beta1.CommitInfo + * @static + * @param {cosmos.base.store.v1beta1.ICommitInfo} message CommitInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommitInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.version); + if (message.storeInfos != null && message.storeInfos.length) + for (let i = 0; i < message.storeInfos.length; ++i) + $root.cosmos.base.store.v1beta1.StoreInfo.encode(message.storeInfos[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CommitInfo message, length delimited. Does not implicitly {@link cosmos.base.store.v1beta1.CommitInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.base.store.v1beta1.CommitInfo + * @static + * @param {cosmos.base.store.v1beta1.ICommitInfo} message CommitInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommitInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CommitInfo message from the specified reader or buffer. + * @function decode + * @memberof cosmos.base.store.v1beta1.CommitInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.base.store.v1beta1.CommitInfo} CommitInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommitInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.store.v1beta1.CommitInfo(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.version = reader.int64(); + break; + case 2: + if (!(message.storeInfos && message.storeInfos.length)) + message.storeInfos = []; + message.storeInfos.push($root.cosmos.base.store.v1beta1.StoreInfo.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CommitInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.base.store.v1beta1.CommitInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.base.store.v1beta1.CommitInfo} CommitInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommitInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CommitInfo message. + * @function verify + * @memberof cosmos.base.store.v1beta1.CommitInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CommitInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isInteger(message.version) && !(message.version && $util.isInteger(message.version.low) && $util.isInteger(message.version.high))) + return "version: integer|Long expected"; + if (message.storeInfos != null && message.hasOwnProperty("storeInfos")) { + if (!Array.isArray(message.storeInfos)) + return "storeInfos: array expected"; + for (let i = 0; i < message.storeInfos.length; ++i) { + let error = $root.cosmos.base.store.v1beta1.StoreInfo.verify(message.storeInfos[i]); + if (error) + return "storeInfos." + error; + } + } + return null; + }; + + /** + * Creates a CommitInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.base.store.v1beta1.CommitInfo + * @static + * @param {Object.} object Plain object + * @returns {cosmos.base.store.v1beta1.CommitInfo} CommitInfo + */ + CommitInfo.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.base.store.v1beta1.CommitInfo) + return object; + let message = new $root.cosmos.base.store.v1beta1.CommitInfo(); + if (object.version != null) + if ($util.Long) + (message.version = $util.Long.fromValue(object.version)).unsigned = false; + else if (typeof object.version === "string") + message.version = parseInt(object.version, 10); + else if (typeof object.version === "number") + message.version = object.version; + else if (typeof object.version === "object") + message.version = new $util.LongBits(object.version.low >>> 0, object.version.high >>> 0).toNumber(); + if (object.storeInfos) { + if (!Array.isArray(object.storeInfos)) + throw TypeError(".cosmos.base.store.v1beta1.CommitInfo.storeInfos: array expected"); + message.storeInfos = []; + for (let i = 0; i < object.storeInfos.length; ++i) { + if (typeof object.storeInfos[i] !== "object") + throw TypeError(".cosmos.base.store.v1beta1.CommitInfo.storeInfos: object expected"); + message.storeInfos[i] = $root.cosmos.base.store.v1beta1.StoreInfo.fromObject(object.storeInfos[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a CommitInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.base.store.v1beta1.CommitInfo + * @static + * @param {cosmos.base.store.v1beta1.CommitInfo} message CommitInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CommitInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.storeInfos = []; + if (options.defaults) + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.version = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.version = options.longs === String ? "0" : 0; + if (message.version != null && message.hasOwnProperty("version")) + if (typeof message.version === "number") + object.version = options.longs === String ? String(message.version) : message.version; + else + object.version = options.longs === String ? $util.Long.prototype.toString.call(message.version) : options.longs === Number ? new $util.LongBits(message.version.low >>> 0, message.version.high >>> 0).toNumber() : message.version; + if (message.storeInfos && message.storeInfos.length) { + object.storeInfos = []; + for (let j = 0; j < message.storeInfos.length; ++j) + object.storeInfos[j] = $root.cosmos.base.store.v1beta1.StoreInfo.toObject(message.storeInfos[j], options); + } + return object; + }; + + /** + * Converts this CommitInfo to JSON. + * @function toJSON + * @memberof cosmos.base.store.v1beta1.CommitInfo + * @instance + * @returns {Object.} JSON object + */ + CommitInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CommitInfo; + })(v1beta1.CommitInfo || {}); + + v1beta1.StoreInfo = (function(StoreInfo) { + + /** + * Properties of a StoreInfo. + * @memberof cosmos.base.store.v1beta1 + * @interface IStoreInfo + * @property {string|null} [name] StoreInfo name + * @property {cosmos.base.store.v1beta1.ICommitID|null} [commitId] StoreInfo commitId + */ + + /** + * Constructs a new StoreInfo. + * @memberof cosmos.base.store.v1beta1 + * @classdesc Represents a StoreInfo. + * @implements IStoreInfo + * @constructor + * @param {cosmos.base.store.v1beta1.IStoreInfo=} [properties] Properties to set + */ + function StoreInfo(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StoreInfo name. + * @member {string} name + * @memberof cosmos.base.store.v1beta1.StoreInfo + * @instance + */ + StoreInfo.prototype.name = ""; + + /** + * StoreInfo commitId. + * @member {cosmos.base.store.v1beta1.ICommitID|null|undefined} commitId + * @memberof cosmos.base.store.v1beta1.StoreInfo + * @instance + */ + StoreInfo.prototype.commitId = null; + + /** + * Creates a new StoreInfo instance using the specified properties. + * @function create + * @memberof cosmos.base.store.v1beta1.StoreInfo + * @static + * @param {cosmos.base.store.v1beta1.IStoreInfo=} [properties] Properties to set + * @returns {cosmos.base.store.v1beta1.StoreInfo} StoreInfo instance + */ + StoreInfo.create = function create(properties) { + return new StoreInfo(properties); + }; + + /** + * Encodes the specified StoreInfo message. Does not implicitly {@link cosmos.base.store.v1beta1.StoreInfo.verify|verify} messages. + * @function encode + * @memberof cosmos.base.store.v1beta1.StoreInfo + * @static + * @param {cosmos.base.store.v1beta1.IStoreInfo} message StoreInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StoreInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.commitId != null && Object.hasOwnProperty.call(message, "commitId")) + $root.cosmos.base.store.v1beta1.CommitID.encode(message.commitId, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified StoreInfo message, length delimited. Does not implicitly {@link cosmos.base.store.v1beta1.StoreInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.base.store.v1beta1.StoreInfo + * @static + * @param {cosmos.base.store.v1beta1.IStoreInfo} message StoreInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StoreInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StoreInfo message from the specified reader or buffer. + * @function decode + * @memberof cosmos.base.store.v1beta1.StoreInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.base.store.v1beta1.StoreInfo} StoreInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StoreInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.store.v1beta1.StoreInfo(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.commitId = $root.cosmos.base.store.v1beta1.CommitID.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StoreInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.base.store.v1beta1.StoreInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.base.store.v1beta1.StoreInfo} StoreInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StoreInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StoreInfo message. + * @function verify + * @memberof cosmos.base.store.v1beta1.StoreInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StoreInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.commitId != null && message.hasOwnProperty("commitId")) { + let error = $root.cosmos.base.store.v1beta1.CommitID.verify(message.commitId); + if (error) + return "commitId." + error; + } + return null; + }; + + /** + * Creates a StoreInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.base.store.v1beta1.StoreInfo + * @static + * @param {Object.} object Plain object + * @returns {cosmos.base.store.v1beta1.StoreInfo} StoreInfo + */ + StoreInfo.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.base.store.v1beta1.StoreInfo) + return object; + let message = new $root.cosmos.base.store.v1beta1.StoreInfo(); + if (object.name != null) + message.name = String(object.name); + if (object.commitId != null) { + if (typeof object.commitId !== "object") + throw TypeError(".cosmos.base.store.v1beta1.StoreInfo.commitId: object expected"); + message.commitId = $root.cosmos.base.store.v1beta1.CommitID.fromObject(object.commitId); + } + return message; + }; + + /** + * Creates a plain object from a StoreInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.base.store.v1beta1.StoreInfo + * @static + * @param {cosmos.base.store.v1beta1.StoreInfo} message StoreInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StoreInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.name = ""; + object.commitId = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.commitId != null && message.hasOwnProperty("commitId")) + object.commitId = $root.cosmos.base.store.v1beta1.CommitID.toObject(message.commitId, options); + return object; + }; + + /** + * Converts this StoreInfo to JSON. + * @function toJSON + * @memberof cosmos.base.store.v1beta1.StoreInfo + * @instance + * @returns {Object.} JSON object + */ + StoreInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return StoreInfo; + })(v1beta1.StoreInfo || {}); + + v1beta1.CommitID = (function(CommitID) { + + /** + * Properties of a CommitID. + * @memberof cosmos.base.store.v1beta1 + * @interface ICommitID + * @property {number|Long|null} [version] CommitID version + * @property {Uint8Array|null} [hash] CommitID hash + */ + + /** + * Constructs a new CommitID. + * @memberof cosmos.base.store.v1beta1 + * @classdesc Represents a CommitID. + * @implements ICommitID + * @constructor + * @param {cosmos.base.store.v1beta1.ICommitID=} [properties] Properties to set + */ + function CommitID(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CommitID version. + * @member {number|Long} version + * @memberof cosmos.base.store.v1beta1.CommitID + * @instance + */ + CommitID.prototype.version = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * CommitID hash. + * @member {Uint8Array} hash + * @memberof cosmos.base.store.v1beta1.CommitID + * @instance + */ + CommitID.prototype.hash = $util.newBuffer([]); + + /** + * Creates a new CommitID instance using the specified properties. + * @function create + * @memberof cosmos.base.store.v1beta1.CommitID + * @static + * @param {cosmos.base.store.v1beta1.ICommitID=} [properties] Properties to set + * @returns {cosmos.base.store.v1beta1.CommitID} CommitID instance + */ + CommitID.create = function create(properties) { + return new CommitID(properties); + }; + + /** + * Encodes the specified CommitID message. Does not implicitly {@link cosmos.base.store.v1beta1.CommitID.verify|verify} messages. + * @function encode + * @memberof cosmos.base.store.v1beta1.CommitID + * @static + * @param {cosmos.base.store.v1beta1.ICommitID} message CommitID message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommitID.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.version); + if (message.hash != null && Object.hasOwnProperty.call(message, "hash")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.hash); + return writer; + }; + + /** + * Encodes the specified CommitID message, length delimited. Does not implicitly {@link cosmos.base.store.v1beta1.CommitID.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.base.store.v1beta1.CommitID + * @static + * @param {cosmos.base.store.v1beta1.ICommitID} message CommitID message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommitID.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CommitID message from the specified reader or buffer. + * @function decode + * @memberof cosmos.base.store.v1beta1.CommitID + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.base.store.v1beta1.CommitID} CommitID + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommitID.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.store.v1beta1.CommitID(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.version = reader.int64(); + break; + case 2: + message.hash = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CommitID message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.base.store.v1beta1.CommitID + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.base.store.v1beta1.CommitID} CommitID + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommitID.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CommitID message. + * @function verify + * @memberof cosmos.base.store.v1beta1.CommitID + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CommitID.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isInteger(message.version) && !(message.version && $util.isInteger(message.version.low) && $util.isInteger(message.version.high))) + return "version: integer|Long expected"; + if (message.hash != null && message.hasOwnProperty("hash")) + if (!(message.hash && typeof message.hash.length === "number" || $util.isString(message.hash))) + return "hash: buffer expected"; + return null; + }; + + /** + * Creates a CommitID message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.base.store.v1beta1.CommitID + * @static + * @param {Object.} object Plain object + * @returns {cosmos.base.store.v1beta1.CommitID} CommitID + */ + CommitID.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.base.store.v1beta1.CommitID) + return object; + let message = new $root.cosmos.base.store.v1beta1.CommitID(); + if (object.version != null) + if ($util.Long) + (message.version = $util.Long.fromValue(object.version)).unsigned = false; + else if (typeof object.version === "string") + message.version = parseInt(object.version, 10); + else if (typeof object.version === "number") + message.version = object.version; + else if (typeof object.version === "object") + message.version = new $util.LongBits(object.version.low >>> 0, object.version.high >>> 0).toNumber(); + if (object.hash != null) + if (typeof object.hash === "string") + $util.base64.decode(object.hash, message.hash = $util.newBuffer($util.base64.length(object.hash)), 0); + else if (object.hash.length) + message.hash = object.hash; + return message; + }; + + /** + * Creates a plain object from a CommitID message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.base.store.v1beta1.CommitID + * @static + * @param {cosmos.base.store.v1beta1.CommitID} message CommitID + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CommitID.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.version = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.version = options.longs === String ? "0" : 0; + if (options.bytes === String) + object.hash = ""; + else { + object.hash = []; + if (options.bytes !== Array) + object.hash = $util.newBuffer(object.hash); + } + } + if (message.version != null && message.hasOwnProperty("version")) + if (typeof message.version === "number") + object.version = options.longs === String ? String(message.version) : message.version; + else + object.version = options.longs === String ? $util.Long.prototype.toString.call(message.version) : options.longs === Number ? new $util.LongBits(message.version.low >>> 0, message.version.high >>> 0).toNumber() : message.version; + if (message.hash != null && message.hasOwnProperty("hash")) + object.hash = options.bytes === String ? $util.base64.encode(message.hash, 0, message.hash.length) : options.bytes === Array ? Array.prototype.slice.call(message.hash) : message.hash; + return object; + }; + + /** + * Converts this CommitID to JSON. + * @function toJSON + * @memberof cosmos.base.store.v1beta1.CommitID + * @instance + * @returns {Object.} JSON object + */ + CommitID.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CommitID; + })(v1beta1.CommitID || {}); + + v1beta1.SnapshotItem = (function(SnapshotItem) { + + /** + * Properties of a SnapshotItem. + * @memberof cosmos.base.store.v1beta1 + * @interface ISnapshotItem + * @property {cosmos.base.store.v1beta1.ISnapshotStoreItem|null} [store] SnapshotItem store + * @property {cosmos.base.store.v1beta1.ISnapshotIAVLItem|null} [iavl] SnapshotItem iavl + */ + + /** + * Constructs a new SnapshotItem. + * @memberof cosmos.base.store.v1beta1 + * @classdesc Represents a SnapshotItem. + * @implements ISnapshotItem + * @constructor + * @param {cosmos.base.store.v1beta1.ISnapshotItem=} [properties] Properties to set + */ + function SnapshotItem(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SnapshotItem store. + * @member {cosmos.base.store.v1beta1.ISnapshotStoreItem|null|undefined} store + * @memberof cosmos.base.store.v1beta1.SnapshotItem + * @instance + */ + SnapshotItem.prototype.store = null; + + /** + * SnapshotItem iavl. + * @member {cosmos.base.store.v1beta1.ISnapshotIAVLItem|null|undefined} iavl + * @memberof cosmos.base.store.v1beta1.SnapshotItem + * @instance + */ + SnapshotItem.prototype.iavl = null; + + // OneOf field names bound to virtual getters and setters + let $oneOfFields; + + /** + * SnapshotItem item. + * @member {"store"|"iavl"|undefined} item + * @memberof cosmos.base.store.v1beta1.SnapshotItem + * @instance + */ + Object.defineProperty(SnapshotItem.prototype, "item", { + get: $util.oneOfGetter($oneOfFields = ["store", "iavl"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SnapshotItem instance using the specified properties. + * @function create + * @memberof cosmos.base.store.v1beta1.SnapshotItem + * @static + * @param {cosmos.base.store.v1beta1.ISnapshotItem=} [properties] Properties to set + * @returns {cosmos.base.store.v1beta1.SnapshotItem} SnapshotItem instance + */ + SnapshotItem.create = function create(properties) { + return new SnapshotItem(properties); + }; + + /** + * Encodes the specified SnapshotItem message. Does not implicitly {@link cosmos.base.store.v1beta1.SnapshotItem.verify|verify} messages. + * @function encode + * @memberof cosmos.base.store.v1beta1.SnapshotItem + * @static + * @param {cosmos.base.store.v1beta1.ISnapshotItem} message SnapshotItem message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SnapshotItem.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.store != null && Object.hasOwnProperty.call(message, "store")) + $root.cosmos.base.store.v1beta1.SnapshotStoreItem.encode(message.store, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.iavl != null && Object.hasOwnProperty.call(message, "iavl")) + $root.cosmos.base.store.v1beta1.SnapshotIAVLItem.encode(message.iavl, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SnapshotItem message, length delimited. Does not implicitly {@link cosmos.base.store.v1beta1.SnapshotItem.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.base.store.v1beta1.SnapshotItem + * @static + * @param {cosmos.base.store.v1beta1.ISnapshotItem} message SnapshotItem message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SnapshotItem.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SnapshotItem message from the specified reader or buffer. + * @function decode + * @memberof cosmos.base.store.v1beta1.SnapshotItem + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.base.store.v1beta1.SnapshotItem} SnapshotItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SnapshotItem.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.store.v1beta1.SnapshotItem(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.store = $root.cosmos.base.store.v1beta1.SnapshotStoreItem.decode(reader, reader.uint32()); + break; + case 2: + message.iavl = $root.cosmos.base.store.v1beta1.SnapshotIAVLItem.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SnapshotItem message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.base.store.v1beta1.SnapshotItem + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.base.store.v1beta1.SnapshotItem} SnapshotItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SnapshotItem.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SnapshotItem message. + * @function verify + * @memberof cosmos.base.store.v1beta1.SnapshotItem + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SnapshotItem.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + let properties = {}; + if (message.store != null && message.hasOwnProperty("store")) { + properties.item = 1; + { + let error = $root.cosmos.base.store.v1beta1.SnapshotStoreItem.verify(message.store); + if (error) + return "store." + error; + } + } + if (message.iavl != null && message.hasOwnProperty("iavl")) { + if (properties.item === 1) + return "item: multiple values"; + properties.item = 1; + { + let error = $root.cosmos.base.store.v1beta1.SnapshotIAVLItem.verify(message.iavl); + if (error) + return "iavl." + error; + } + } + return null; + }; + + /** + * Creates a SnapshotItem message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.base.store.v1beta1.SnapshotItem + * @static + * @param {Object.} object Plain object + * @returns {cosmos.base.store.v1beta1.SnapshotItem} SnapshotItem + */ + SnapshotItem.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.base.store.v1beta1.SnapshotItem) + return object; + let message = new $root.cosmos.base.store.v1beta1.SnapshotItem(); + if (object.store != null) { + if (typeof object.store !== "object") + throw TypeError(".cosmos.base.store.v1beta1.SnapshotItem.store: object expected"); + message.store = $root.cosmos.base.store.v1beta1.SnapshotStoreItem.fromObject(object.store); + } + if (object.iavl != null) { + if (typeof object.iavl !== "object") + throw TypeError(".cosmos.base.store.v1beta1.SnapshotItem.iavl: object expected"); + message.iavl = $root.cosmos.base.store.v1beta1.SnapshotIAVLItem.fromObject(object.iavl); + } + return message; + }; + + /** + * Creates a plain object from a SnapshotItem message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.base.store.v1beta1.SnapshotItem + * @static + * @param {cosmos.base.store.v1beta1.SnapshotItem} message SnapshotItem + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SnapshotItem.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (message.store != null && message.hasOwnProperty("store")) { + object.store = $root.cosmos.base.store.v1beta1.SnapshotStoreItem.toObject(message.store, options); + if (options.oneofs) + object.item = "store"; + } + if (message.iavl != null && message.hasOwnProperty("iavl")) { + object.iavl = $root.cosmos.base.store.v1beta1.SnapshotIAVLItem.toObject(message.iavl, options); + if (options.oneofs) + object.item = "iavl"; + } + return object; + }; + + /** + * Converts this SnapshotItem to JSON. + * @function toJSON + * @memberof cosmos.base.store.v1beta1.SnapshotItem + * @instance + * @returns {Object.} JSON object + */ + SnapshotItem.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SnapshotItem; + })(v1beta1.SnapshotItem || {}); + + v1beta1.SnapshotStoreItem = (function(SnapshotStoreItem) { + + /** + * Properties of a SnapshotStoreItem. + * @memberof cosmos.base.store.v1beta1 + * @interface ISnapshotStoreItem + * @property {string|null} [name] SnapshotStoreItem name + */ + + /** + * Constructs a new SnapshotStoreItem. + * @memberof cosmos.base.store.v1beta1 + * @classdesc Represents a SnapshotStoreItem. + * @implements ISnapshotStoreItem + * @constructor + * @param {cosmos.base.store.v1beta1.ISnapshotStoreItem=} [properties] Properties to set + */ + function SnapshotStoreItem(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SnapshotStoreItem name. + * @member {string} name + * @memberof cosmos.base.store.v1beta1.SnapshotStoreItem + * @instance + */ + SnapshotStoreItem.prototype.name = ""; + + /** + * Creates a new SnapshotStoreItem instance using the specified properties. + * @function create + * @memberof cosmos.base.store.v1beta1.SnapshotStoreItem + * @static + * @param {cosmos.base.store.v1beta1.ISnapshotStoreItem=} [properties] Properties to set + * @returns {cosmos.base.store.v1beta1.SnapshotStoreItem} SnapshotStoreItem instance + */ + SnapshotStoreItem.create = function create(properties) { + return new SnapshotStoreItem(properties); + }; + + /** + * Encodes the specified SnapshotStoreItem message. Does not implicitly {@link cosmos.base.store.v1beta1.SnapshotStoreItem.verify|verify} messages. + * @function encode + * @memberof cosmos.base.store.v1beta1.SnapshotStoreItem + * @static + * @param {cosmos.base.store.v1beta1.ISnapshotStoreItem} message SnapshotStoreItem message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SnapshotStoreItem.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified SnapshotStoreItem message, length delimited. Does not implicitly {@link cosmos.base.store.v1beta1.SnapshotStoreItem.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.base.store.v1beta1.SnapshotStoreItem + * @static + * @param {cosmos.base.store.v1beta1.ISnapshotStoreItem} message SnapshotStoreItem message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SnapshotStoreItem.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SnapshotStoreItem message from the specified reader or buffer. + * @function decode + * @memberof cosmos.base.store.v1beta1.SnapshotStoreItem + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.base.store.v1beta1.SnapshotStoreItem} SnapshotStoreItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SnapshotStoreItem.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.store.v1beta1.SnapshotStoreItem(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SnapshotStoreItem message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.base.store.v1beta1.SnapshotStoreItem + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.base.store.v1beta1.SnapshotStoreItem} SnapshotStoreItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SnapshotStoreItem.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SnapshotStoreItem message. + * @function verify + * @memberof cosmos.base.store.v1beta1.SnapshotStoreItem + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SnapshotStoreItem.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a SnapshotStoreItem message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.base.store.v1beta1.SnapshotStoreItem + * @static + * @param {Object.} object Plain object + * @returns {cosmos.base.store.v1beta1.SnapshotStoreItem} SnapshotStoreItem + */ + SnapshotStoreItem.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.base.store.v1beta1.SnapshotStoreItem) + return object; + let message = new $root.cosmos.base.store.v1beta1.SnapshotStoreItem(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a SnapshotStoreItem message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.base.store.v1beta1.SnapshotStoreItem + * @static + * @param {cosmos.base.store.v1beta1.SnapshotStoreItem} message SnapshotStoreItem + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SnapshotStoreItem.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this SnapshotStoreItem to JSON. + * @function toJSON + * @memberof cosmos.base.store.v1beta1.SnapshotStoreItem + * @instance + * @returns {Object.} JSON object + */ + SnapshotStoreItem.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SnapshotStoreItem; + })(v1beta1.SnapshotStoreItem || {}); + + v1beta1.SnapshotIAVLItem = (function(SnapshotIAVLItem) { + + /** + * Properties of a SnapshotIAVLItem. + * @memberof cosmos.base.store.v1beta1 + * @interface ISnapshotIAVLItem + * @property {Uint8Array|null} [key] SnapshotIAVLItem key + * @property {Uint8Array|null} [value] SnapshotIAVLItem value + * @property {number|Long|null} [version] SnapshotIAVLItem version + * @property {number|null} [height] SnapshotIAVLItem height + */ + + /** + * Constructs a new SnapshotIAVLItem. + * @memberof cosmos.base.store.v1beta1 + * @classdesc Represents a SnapshotIAVLItem. + * @implements ISnapshotIAVLItem + * @constructor + * @param {cosmos.base.store.v1beta1.ISnapshotIAVLItem=} [properties] Properties to set + */ + function SnapshotIAVLItem(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SnapshotIAVLItem key. + * @member {Uint8Array} key + * @memberof cosmos.base.store.v1beta1.SnapshotIAVLItem + * @instance + */ + SnapshotIAVLItem.prototype.key = $util.newBuffer([]); + + /** + * SnapshotIAVLItem value. + * @member {Uint8Array} value + * @memberof cosmos.base.store.v1beta1.SnapshotIAVLItem + * @instance + */ + SnapshotIAVLItem.prototype.value = $util.newBuffer([]); + + /** + * SnapshotIAVLItem version. + * @member {number|Long} version + * @memberof cosmos.base.store.v1beta1.SnapshotIAVLItem + * @instance + */ + SnapshotIAVLItem.prototype.version = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * SnapshotIAVLItem height. + * @member {number} height + * @memberof cosmos.base.store.v1beta1.SnapshotIAVLItem + * @instance + */ + SnapshotIAVLItem.prototype.height = 0; + + /** + * Creates a new SnapshotIAVLItem instance using the specified properties. + * @function create + * @memberof cosmos.base.store.v1beta1.SnapshotIAVLItem + * @static + * @param {cosmos.base.store.v1beta1.ISnapshotIAVLItem=} [properties] Properties to set + * @returns {cosmos.base.store.v1beta1.SnapshotIAVLItem} SnapshotIAVLItem instance + */ + SnapshotIAVLItem.create = function create(properties) { + return new SnapshotIAVLItem(properties); + }; + + /** + * Encodes the specified SnapshotIAVLItem message. Does not implicitly {@link cosmos.base.store.v1beta1.SnapshotIAVLItem.verify|verify} messages. + * @function encode + * @memberof cosmos.base.store.v1beta1.SnapshotIAVLItem + * @static + * @param {cosmos.base.store.v1beta1.ISnapshotIAVLItem} message SnapshotIAVLItem message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SnapshotIAVLItem.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.key); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.version); + if (message.height != null && Object.hasOwnProperty.call(message, "height")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.height); + return writer; + }; + + /** + * Encodes the specified SnapshotIAVLItem message, length delimited. Does not implicitly {@link cosmos.base.store.v1beta1.SnapshotIAVLItem.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.base.store.v1beta1.SnapshotIAVLItem + * @static + * @param {cosmos.base.store.v1beta1.ISnapshotIAVLItem} message SnapshotIAVLItem message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SnapshotIAVLItem.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SnapshotIAVLItem message from the specified reader or buffer. + * @function decode + * @memberof cosmos.base.store.v1beta1.SnapshotIAVLItem + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.base.store.v1beta1.SnapshotIAVLItem} SnapshotIAVLItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SnapshotIAVLItem.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.store.v1beta1.SnapshotIAVLItem(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.key = reader.bytes(); + break; + case 2: + message.value = reader.bytes(); + break; + case 3: + message.version = reader.int64(); + break; + case 4: + message.height = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SnapshotIAVLItem message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.base.store.v1beta1.SnapshotIAVLItem + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.base.store.v1beta1.SnapshotIAVLItem} SnapshotIAVLItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SnapshotIAVLItem.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SnapshotIAVLItem message. + * @function verify + * @memberof cosmos.base.store.v1beta1.SnapshotIAVLItem + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SnapshotIAVLItem.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.key != null && message.hasOwnProperty("key")) + if (!(message.key && typeof message.key.length === "number" || $util.isString(message.key))) + return "key: buffer expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isInteger(message.version) && !(message.version && $util.isInteger(message.version.low) && $util.isInteger(message.version.high))) + return "version: integer|Long expected"; + if (message.height != null && message.hasOwnProperty("height")) + if (!$util.isInteger(message.height)) + return "height: integer expected"; + return null; + }; + + /** + * Creates a SnapshotIAVLItem message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.base.store.v1beta1.SnapshotIAVLItem + * @static + * @param {Object.} object Plain object + * @returns {cosmos.base.store.v1beta1.SnapshotIAVLItem} SnapshotIAVLItem + */ + SnapshotIAVLItem.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.base.store.v1beta1.SnapshotIAVLItem) + return object; + let message = new $root.cosmos.base.store.v1beta1.SnapshotIAVLItem(); + if (object.key != null) + if (typeof object.key === "string") + $util.base64.decode(object.key, message.key = $util.newBuffer($util.base64.length(object.key)), 0); + else if (object.key.length) + message.key = object.key; + if (object.value != null) + if (typeof object.value === "string") + $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); + else if (object.value.length) + message.value = object.value; + if (object.version != null) + if ($util.Long) + (message.version = $util.Long.fromValue(object.version)).unsigned = false; + else if (typeof object.version === "string") + message.version = parseInt(object.version, 10); + else if (typeof object.version === "number") + message.version = object.version; + else if (typeof object.version === "object") + message.version = new $util.LongBits(object.version.low >>> 0, object.version.high >>> 0).toNumber(); + if (object.height != null) + message.height = object.height | 0; + return message; + }; + + /** + * Creates a plain object from a SnapshotIAVLItem message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.base.store.v1beta1.SnapshotIAVLItem + * @static + * @param {cosmos.base.store.v1beta1.SnapshotIAVLItem} message SnapshotIAVLItem + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SnapshotIAVLItem.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + if (options.bytes === String) + object.key = ""; + else { + object.key = []; + if (options.bytes !== Array) + object.key = $util.newBuffer(object.key); + } + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.version = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.version = options.longs === String ? "0" : 0; + object.height = 0; + } + if (message.key != null && message.hasOwnProperty("key")) + object.key = options.bytes === String ? $util.base64.encode(message.key, 0, message.key.length) : options.bytes === Array ? Array.prototype.slice.call(message.key) : message.key; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + if (message.version != null && message.hasOwnProperty("version")) + if (typeof message.version === "number") + object.version = options.longs === String ? String(message.version) : message.version; + else + object.version = options.longs === String ? $util.Long.prototype.toString.call(message.version) : options.longs === Number ? new $util.LongBits(message.version.low >>> 0, message.version.high >>> 0).toNumber() : message.version; + if (message.height != null && message.hasOwnProperty("height")) + object.height = message.height; + return object; + }; + + /** + * Converts this SnapshotIAVLItem to JSON. + * @function toJSON + * @memberof cosmos.base.store.v1beta1.SnapshotIAVLItem + * @instance + * @returns {Object.} JSON object + */ + SnapshotIAVLItem.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SnapshotIAVLItem; + })(v1beta1.SnapshotIAVLItem || {}); + + return v1beta1; + })(store.v1beta1 || {}); + + return store; + })(base.store || {}); + + /** + * Namespace tendermint. + * @memberof cosmos.base + * @namespace + */ + + base.tendermint = (function(tendermint) { + + /** + * Namespace v1beta1. + * @memberof cosmos.base.tendermint + * @namespace + */ + + tendermint.v1beta1 = (function(v1beta1) { + + v1beta1.Service = (function(Service) { + + /** + * Constructs a new Service service. + * @memberof cosmos.base.tendermint.v1beta1 + * @classdesc Represents a Service + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Service(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Service.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Service; + + /** + * Creates new Service service using the specified rpc implementation. + * @function create + * @memberof cosmos.base.tendermint.v1beta1.Service + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Service} RPC service. Useful where requests and/or responses are streamed. + */ + Service.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link cosmos.base.tendermint.v1beta1.Service#getNodeInfo}. + * @memberof cosmos.base.tendermint.v1beta1.Service + * @typedef GetNodeInfoCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.base.tendermint.v1beta1.IGetNodeInfoResponse} [response] GetNodeInfoResponse + */ + + /** + * Calls GetNodeInfo. + * @function getNodeInfo + * @memberof cosmos.base.tendermint.v1beta1.Service + * @instance + * @param {cosmos.base.tendermint.v1beta1.IGetNodeInfoRequest} request GetNodeInfoRequest message or plain object + * @param {cosmos.base.tendermint.v1beta1.Service.GetNodeInfoCallback} callback Node-style callback called with the error, if any, and GetNodeInfoResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Service.prototype.getNodeInfo = function getNodeInfo(request, callback) { + return this.rpcCall(getNodeInfo, $root.cosmos.base.tendermint.v1beta1.GetNodeInfoRequest, $root.cosmos.base.tendermint.v1beta1.GetNodeInfoResponse, request, callback); + }, "name", { value: "GetNodeInfo" }); + + /** + * Calls GetNodeInfo. + * @function getNodeInfo + * @memberof cosmos.base.tendermint.v1beta1.Service + * @instance + * @param {cosmos.base.tendermint.v1beta1.IGetNodeInfoRequest} request GetNodeInfoRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link cosmos.base.tendermint.v1beta1.Service#getSyncing}. + * @memberof cosmos.base.tendermint.v1beta1.Service + * @typedef GetSyncingCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.base.tendermint.v1beta1.IGetSyncingResponse} [response] GetSyncingResponse + */ + + /** + * Calls GetSyncing. + * @function getSyncing + * @memberof cosmos.base.tendermint.v1beta1.Service + * @instance + * @param {cosmos.base.tendermint.v1beta1.IGetSyncingRequest} request GetSyncingRequest message or plain object + * @param {cosmos.base.tendermint.v1beta1.Service.GetSyncingCallback} callback Node-style callback called with the error, if any, and GetSyncingResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Service.prototype.getSyncing = function getSyncing(request, callback) { + return this.rpcCall(getSyncing, $root.cosmos.base.tendermint.v1beta1.GetSyncingRequest, $root.cosmos.base.tendermint.v1beta1.GetSyncingResponse, request, callback); + }, "name", { value: "GetSyncing" }); + + /** + * Calls GetSyncing. + * @function getSyncing + * @memberof cosmos.base.tendermint.v1beta1.Service + * @instance + * @param {cosmos.base.tendermint.v1beta1.IGetSyncingRequest} request GetSyncingRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link cosmos.base.tendermint.v1beta1.Service#getLatestBlock}. + * @memberof cosmos.base.tendermint.v1beta1.Service + * @typedef GetLatestBlockCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.base.tendermint.v1beta1.IGetLatestBlockResponse} [response] GetLatestBlockResponse + */ + + /** + * Calls GetLatestBlock. + * @function getLatestBlock + * @memberof cosmos.base.tendermint.v1beta1.Service + * @instance + * @param {cosmos.base.tendermint.v1beta1.IGetLatestBlockRequest} request GetLatestBlockRequest message or plain object + * @param {cosmos.base.tendermint.v1beta1.Service.GetLatestBlockCallback} callback Node-style callback called with the error, if any, and GetLatestBlockResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Service.prototype.getLatestBlock = function getLatestBlock(request, callback) { + return this.rpcCall(getLatestBlock, $root.cosmos.base.tendermint.v1beta1.GetLatestBlockRequest, $root.cosmos.base.tendermint.v1beta1.GetLatestBlockResponse, request, callback); + }, "name", { value: "GetLatestBlock" }); + + /** + * Calls GetLatestBlock. + * @function getLatestBlock + * @memberof cosmos.base.tendermint.v1beta1.Service + * @instance + * @param {cosmos.base.tendermint.v1beta1.IGetLatestBlockRequest} request GetLatestBlockRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link cosmos.base.tendermint.v1beta1.Service#getBlockByHeight}. + * @memberof cosmos.base.tendermint.v1beta1.Service + * @typedef GetBlockByHeightCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.base.tendermint.v1beta1.IGetBlockByHeightResponse} [response] GetBlockByHeightResponse + */ + + /** + * Calls GetBlockByHeight. + * @function getBlockByHeight + * @memberof cosmos.base.tendermint.v1beta1.Service + * @instance + * @param {cosmos.base.tendermint.v1beta1.IGetBlockByHeightRequest} request GetBlockByHeightRequest message or plain object + * @param {cosmos.base.tendermint.v1beta1.Service.GetBlockByHeightCallback} callback Node-style callback called with the error, if any, and GetBlockByHeightResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Service.prototype.getBlockByHeight = function getBlockByHeight(request, callback) { + return this.rpcCall(getBlockByHeight, $root.cosmos.base.tendermint.v1beta1.GetBlockByHeightRequest, $root.cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse, request, callback); + }, "name", { value: "GetBlockByHeight" }); + + /** + * Calls GetBlockByHeight. + * @function getBlockByHeight + * @memberof cosmos.base.tendermint.v1beta1.Service + * @instance + * @param {cosmos.base.tendermint.v1beta1.IGetBlockByHeightRequest} request GetBlockByHeightRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link cosmos.base.tendermint.v1beta1.Service#getLatestValidatorSet}. + * @memberof cosmos.base.tendermint.v1beta1.Service + * @typedef GetLatestValidatorSetCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.base.tendermint.v1beta1.IGetLatestValidatorSetResponse} [response] GetLatestValidatorSetResponse + */ + + /** + * Calls GetLatestValidatorSet. + * @function getLatestValidatorSet + * @memberof cosmos.base.tendermint.v1beta1.Service + * @instance + * @param {cosmos.base.tendermint.v1beta1.IGetLatestValidatorSetRequest} request GetLatestValidatorSetRequest message or plain object + * @param {cosmos.base.tendermint.v1beta1.Service.GetLatestValidatorSetCallback} callback Node-style callback called with the error, if any, and GetLatestValidatorSetResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Service.prototype.getLatestValidatorSet = function getLatestValidatorSet(request, callback) { + return this.rpcCall(getLatestValidatorSet, $root.cosmos.base.tendermint.v1beta1.GetLatestValidatorSetRequest, $root.cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse, request, callback); + }, "name", { value: "GetLatestValidatorSet" }); + + /** + * Calls GetLatestValidatorSet. + * @function getLatestValidatorSet + * @memberof cosmos.base.tendermint.v1beta1.Service + * @instance + * @param {cosmos.base.tendermint.v1beta1.IGetLatestValidatorSetRequest} request GetLatestValidatorSetRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link cosmos.base.tendermint.v1beta1.Service#getValidatorSetByHeight}. + * @memberof cosmos.base.tendermint.v1beta1.Service + * @typedef GetValidatorSetByHeightCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.base.tendermint.v1beta1.IGetValidatorSetByHeightResponse} [response] GetValidatorSetByHeightResponse + */ + + /** + * Calls GetValidatorSetByHeight. + * @function getValidatorSetByHeight + * @memberof cosmos.base.tendermint.v1beta1.Service + * @instance + * @param {cosmos.base.tendermint.v1beta1.IGetValidatorSetByHeightRequest} request GetValidatorSetByHeightRequest message or plain object + * @param {cosmos.base.tendermint.v1beta1.Service.GetValidatorSetByHeightCallback} callback Node-style callback called with the error, if any, and GetValidatorSetByHeightResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Service.prototype.getValidatorSetByHeight = function getValidatorSetByHeight(request, callback) { + return this.rpcCall(getValidatorSetByHeight, $root.cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest, $root.cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse, request, callback); + }, "name", { value: "GetValidatorSetByHeight" }); + + /** + * Calls GetValidatorSetByHeight. + * @function getValidatorSetByHeight + * @memberof cosmos.base.tendermint.v1beta1.Service + * @instance + * @param {cosmos.base.tendermint.v1beta1.IGetValidatorSetByHeightRequest} request GetValidatorSetByHeightRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Service; + })(v1beta1.Service || {}); + + v1beta1.GetValidatorSetByHeightRequest = (function(GetValidatorSetByHeightRequest) { + + /** + * Properties of a GetValidatorSetByHeightRequest. + * @memberof cosmos.base.tendermint.v1beta1 + * @interface IGetValidatorSetByHeightRequest + * @property {number|Long|null} [height] GetValidatorSetByHeightRequest height + * @property {cosmos.base.query.v1beta1.IPageRequest|null} [pagination] GetValidatorSetByHeightRequest pagination + */ + + /** + * Constructs a new GetValidatorSetByHeightRequest. + * @memberof cosmos.base.tendermint.v1beta1 + * @classdesc Represents a GetValidatorSetByHeightRequest. + * @implements IGetValidatorSetByHeightRequest + * @constructor + * @param {cosmos.base.tendermint.v1beta1.IGetValidatorSetByHeightRequest=} [properties] Properties to set + */ + function GetValidatorSetByHeightRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetValidatorSetByHeightRequest height. + * @member {number|Long} height + * @memberof cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest + * @instance + */ + GetValidatorSetByHeightRequest.prototype.height = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * GetValidatorSetByHeightRequest pagination. + * @member {cosmos.base.query.v1beta1.IPageRequest|null|undefined} pagination + * @memberof cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest + * @instance + */ + GetValidatorSetByHeightRequest.prototype.pagination = null; + + /** + * Creates a new GetValidatorSetByHeightRequest instance using the specified properties. + * @function create + * @memberof cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest + * @static + * @param {cosmos.base.tendermint.v1beta1.IGetValidatorSetByHeightRequest=} [properties] Properties to set + * @returns {cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest} GetValidatorSetByHeightRequest instance + */ + GetValidatorSetByHeightRequest.create = function create(properties) { + return new GetValidatorSetByHeightRequest(properties); + }; + + /** + * Encodes the specified GetValidatorSetByHeightRequest message. Does not implicitly {@link cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest.verify|verify} messages. + * @function encode + * @memberof cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest + * @static + * @param {cosmos.base.tendermint.v1beta1.IGetValidatorSetByHeightRequest} message GetValidatorSetByHeightRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetValidatorSetByHeightRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.height != null && Object.hasOwnProperty.call(message, "height")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.height); + if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) + $root.cosmos.base.query.v1beta1.PageRequest.encode(message.pagination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GetValidatorSetByHeightRequest message, length delimited. Does not implicitly {@link cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest + * @static + * @param {cosmos.base.tendermint.v1beta1.IGetValidatorSetByHeightRequest} message GetValidatorSetByHeightRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetValidatorSetByHeightRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetValidatorSetByHeightRequest message from the specified reader or buffer. + * @function decode + * @memberof cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest} GetValidatorSetByHeightRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetValidatorSetByHeightRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.height = reader.int64(); + break; + case 2: + message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetValidatorSetByHeightRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest} GetValidatorSetByHeightRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetValidatorSetByHeightRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetValidatorSetByHeightRequest message. + * @function verify + * @memberof cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetValidatorSetByHeightRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.height != null && message.hasOwnProperty("height")) + if (!$util.isInteger(message.height) && !(message.height && $util.isInteger(message.height.low) && $util.isInteger(message.height.high))) + return "height: integer|Long expected"; + if (message.pagination != null && message.hasOwnProperty("pagination")) { + let error = $root.cosmos.base.query.v1beta1.PageRequest.verify(message.pagination); + if (error) + return "pagination." + error; + } + return null; + }; + + /** + * Creates a GetValidatorSetByHeightRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest + * @static + * @param {Object.} object Plain object + * @returns {cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest} GetValidatorSetByHeightRequest + */ + GetValidatorSetByHeightRequest.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest) + return object; + let message = new $root.cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest(); + if (object.height != null) + if ($util.Long) + (message.height = $util.Long.fromValue(object.height)).unsigned = false; + else if (typeof object.height === "string") + message.height = parseInt(object.height, 10); + else if (typeof object.height === "number") + message.height = object.height; + else if (typeof object.height === "object") + message.height = new $util.LongBits(object.height.low >>> 0, object.height.high >>> 0).toNumber(); + if (object.pagination != null) { + if (typeof object.pagination !== "object") + throw TypeError(".cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest.pagination: object expected"); + message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.fromObject(object.pagination); + } + return message; + }; + + /** + * Creates a plain object from a GetValidatorSetByHeightRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest + * @static + * @param {cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest} message GetValidatorSetByHeightRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetValidatorSetByHeightRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.height = options.longs === String ? "0" : 0; + object.pagination = null; + } + if (message.height != null && message.hasOwnProperty("height")) + if (typeof message.height === "number") + object.height = options.longs === String ? String(message.height) : message.height; + else + object.height = options.longs === String ? $util.Long.prototype.toString.call(message.height) : options.longs === Number ? new $util.LongBits(message.height.low >>> 0, message.height.high >>> 0).toNumber() : message.height; + if (message.pagination != null && message.hasOwnProperty("pagination")) + object.pagination = $root.cosmos.base.query.v1beta1.PageRequest.toObject(message.pagination, options); + return object; + }; + + /** + * Converts this GetValidatorSetByHeightRequest to JSON. + * @function toJSON + * @memberof cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest + * @instance + * @returns {Object.} JSON object + */ + GetValidatorSetByHeightRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetValidatorSetByHeightRequest; + })(v1beta1.GetValidatorSetByHeightRequest || {}); + + v1beta1.GetValidatorSetByHeightResponse = (function(GetValidatorSetByHeightResponse) { + + /** + * Properties of a GetValidatorSetByHeightResponse. + * @memberof cosmos.base.tendermint.v1beta1 + * @interface IGetValidatorSetByHeightResponse + * @property {number|Long|null} [blockHeight] GetValidatorSetByHeightResponse blockHeight + * @property {Array.|null} [validators] GetValidatorSetByHeightResponse validators + * @property {cosmos.base.query.v1beta1.IPageResponse|null} [pagination] GetValidatorSetByHeightResponse pagination + */ + + /** + * Constructs a new GetValidatorSetByHeightResponse. + * @memberof cosmos.base.tendermint.v1beta1 + * @classdesc Represents a GetValidatorSetByHeightResponse. + * @implements IGetValidatorSetByHeightResponse + * @constructor + * @param {cosmos.base.tendermint.v1beta1.IGetValidatorSetByHeightResponse=} [properties] Properties to set + */ + function GetValidatorSetByHeightResponse(properties) { + this.validators = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetValidatorSetByHeightResponse blockHeight. + * @member {number|Long} blockHeight + * @memberof cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse + * @instance + */ + GetValidatorSetByHeightResponse.prototype.blockHeight = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * GetValidatorSetByHeightResponse validators. + * @member {Array.} validators + * @memberof cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse + * @instance + */ + GetValidatorSetByHeightResponse.prototype.validators = $util.emptyArray; + + /** + * GetValidatorSetByHeightResponse pagination. + * @member {cosmos.base.query.v1beta1.IPageResponse|null|undefined} pagination + * @memberof cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse + * @instance + */ + GetValidatorSetByHeightResponse.prototype.pagination = null; + + /** + * Creates a new GetValidatorSetByHeightResponse instance using the specified properties. + * @function create + * @memberof cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse + * @static + * @param {cosmos.base.tendermint.v1beta1.IGetValidatorSetByHeightResponse=} [properties] Properties to set + * @returns {cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse} GetValidatorSetByHeightResponse instance + */ + GetValidatorSetByHeightResponse.create = function create(properties) { + return new GetValidatorSetByHeightResponse(properties); + }; + + /** + * Encodes the specified GetValidatorSetByHeightResponse message. Does not implicitly {@link cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse + * @static + * @param {cosmos.base.tendermint.v1beta1.IGetValidatorSetByHeightResponse} message GetValidatorSetByHeightResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetValidatorSetByHeightResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.blockHeight != null && Object.hasOwnProperty.call(message, "blockHeight")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.blockHeight); + if (message.validators != null && message.validators.length) + for (let i = 0; i < message.validators.length; ++i) + $root.cosmos.base.tendermint.v1beta1.Validator.encode(message.validators[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) + $root.cosmos.base.query.v1beta1.PageResponse.encode(message.pagination, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GetValidatorSetByHeightResponse message, length delimited. Does not implicitly {@link cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse + * @static + * @param {cosmos.base.tendermint.v1beta1.IGetValidatorSetByHeightResponse} message GetValidatorSetByHeightResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetValidatorSetByHeightResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetValidatorSetByHeightResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse} GetValidatorSetByHeightResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetValidatorSetByHeightResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.blockHeight = reader.int64(); + break; + case 2: + if (!(message.validators && message.validators.length)) + message.validators = []; + message.validators.push($root.cosmos.base.tendermint.v1beta1.Validator.decode(reader, reader.uint32())); + break; + case 3: + message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetValidatorSetByHeightResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse} GetValidatorSetByHeightResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetValidatorSetByHeightResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetValidatorSetByHeightResponse message. + * @function verify + * @memberof cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetValidatorSetByHeightResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.blockHeight != null && message.hasOwnProperty("blockHeight")) + if (!$util.isInteger(message.blockHeight) && !(message.blockHeight && $util.isInteger(message.blockHeight.low) && $util.isInteger(message.blockHeight.high))) + return "blockHeight: integer|Long expected"; + if (message.validators != null && message.hasOwnProperty("validators")) { + if (!Array.isArray(message.validators)) + return "validators: array expected"; + for (let i = 0; i < message.validators.length; ++i) { + let error = $root.cosmos.base.tendermint.v1beta1.Validator.verify(message.validators[i]); + if (error) + return "validators." + error; + } + } + if (message.pagination != null && message.hasOwnProperty("pagination")) { + let error = $root.cosmos.base.query.v1beta1.PageResponse.verify(message.pagination); + if (error) + return "pagination." + error; + } + return null; + }; + + /** + * Creates a GetValidatorSetByHeightResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse} GetValidatorSetByHeightResponse + */ + GetValidatorSetByHeightResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse) + return object; + let message = new $root.cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse(); + if (object.blockHeight != null) + if ($util.Long) + (message.blockHeight = $util.Long.fromValue(object.blockHeight)).unsigned = false; + else if (typeof object.blockHeight === "string") + message.blockHeight = parseInt(object.blockHeight, 10); + else if (typeof object.blockHeight === "number") + message.blockHeight = object.blockHeight; + else if (typeof object.blockHeight === "object") + message.blockHeight = new $util.LongBits(object.blockHeight.low >>> 0, object.blockHeight.high >>> 0).toNumber(); + if (object.validators) { + if (!Array.isArray(object.validators)) + throw TypeError(".cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse.validators: array expected"); + message.validators = []; + for (let i = 0; i < object.validators.length; ++i) { + if (typeof object.validators[i] !== "object") + throw TypeError(".cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse.validators: object expected"); + message.validators[i] = $root.cosmos.base.tendermint.v1beta1.Validator.fromObject(object.validators[i]); + } + } + if (object.pagination != null) { + if (typeof object.pagination !== "object") + throw TypeError(".cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse.pagination: object expected"); + message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.fromObject(object.pagination); + } + return message; + }; + + /** + * Creates a plain object from a GetValidatorSetByHeightResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse + * @static + * @param {cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse} message GetValidatorSetByHeightResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetValidatorSetByHeightResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.validators = []; + if (options.defaults) { + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.blockHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.blockHeight = options.longs === String ? "0" : 0; + object.pagination = null; + } + if (message.blockHeight != null && message.hasOwnProperty("blockHeight")) + if (typeof message.blockHeight === "number") + object.blockHeight = options.longs === String ? String(message.blockHeight) : message.blockHeight; + else + object.blockHeight = options.longs === String ? $util.Long.prototype.toString.call(message.blockHeight) : options.longs === Number ? new $util.LongBits(message.blockHeight.low >>> 0, message.blockHeight.high >>> 0).toNumber() : message.blockHeight; + if (message.validators && message.validators.length) { + object.validators = []; + for (let j = 0; j < message.validators.length; ++j) + object.validators[j] = $root.cosmos.base.tendermint.v1beta1.Validator.toObject(message.validators[j], options); + } + if (message.pagination != null && message.hasOwnProperty("pagination")) + object.pagination = $root.cosmos.base.query.v1beta1.PageResponse.toObject(message.pagination, options); + return object; + }; + + /** + * Converts this GetValidatorSetByHeightResponse to JSON. + * @function toJSON + * @memberof cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse + * @instance + * @returns {Object.} JSON object + */ + GetValidatorSetByHeightResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetValidatorSetByHeightResponse; + })(v1beta1.GetValidatorSetByHeightResponse || {}); + + v1beta1.GetLatestValidatorSetRequest = (function(GetLatestValidatorSetRequest) { + + /** + * Properties of a GetLatestValidatorSetRequest. + * @memberof cosmos.base.tendermint.v1beta1 + * @interface IGetLatestValidatorSetRequest + * @property {cosmos.base.query.v1beta1.IPageRequest|null} [pagination] GetLatestValidatorSetRequest pagination + */ + + /** + * Constructs a new GetLatestValidatorSetRequest. + * @memberof cosmos.base.tendermint.v1beta1 + * @classdesc Represents a GetLatestValidatorSetRequest. + * @implements IGetLatestValidatorSetRequest + * @constructor + * @param {cosmos.base.tendermint.v1beta1.IGetLatestValidatorSetRequest=} [properties] Properties to set + */ + function GetLatestValidatorSetRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetLatestValidatorSetRequest pagination. + * @member {cosmos.base.query.v1beta1.IPageRequest|null|undefined} pagination + * @memberof cosmos.base.tendermint.v1beta1.GetLatestValidatorSetRequest + * @instance + */ + GetLatestValidatorSetRequest.prototype.pagination = null; + + /** + * Creates a new GetLatestValidatorSetRequest instance using the specified properties. + * @function create + * @memberof cosmos.base.tendermint.v1beta1.GetLatestValidatorSetRequest + * @static + * @param {cosmos.base.tendermint.v1beta1.IGetLatestValidatorSetRequest=} [properties] Properties to set + * @returns {cosmos.base.tendermint.v1beta1.GetLatestValidatorSetRequest} GetLatestValidatorSetRequest instance + */ + GetLatestValidatorSetRequest.create = function create(properties) { + return new GetLatestValidatorSetRequest(properties); + }; + + /** + * Encodes the specified GetLatestValidatorSetRequest message. Does not implicitly {@link cosmos.base.tendermint.v1beta1.GetLatestValidatorSetRequest.verify|verify} messages. + * @function encode + * @memberof cosmos.base.tendermint.v1beta1.GetLatestValidatorSetRequest + * @static + * @param {cosmos.base.tendermint.v1beta1.IGetLatestValidatorSetRequest} message GetLatestValidatorSetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetLatestValidatorSetRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) + $root.cosmos.base.query.v1beta1.PageRequest.encode(message.pagination, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GetLatestValidatorSetRequest message, length delimited. Does not implicitly {@link cosmos.base.tendermint.v1beta1.GetLatestValidatorSetRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.base.tendermint.v1beta1.GetLatestValidatorSetRequest + * @static + * @param {cosmos.base.tendermint.v1beta1.IGetLatestValidatorSetRequest} message GetLatestValidatorSetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetLatestValidatorSetRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetLatestValidatorSetRequest message from the specified reader or buffer. + * @function decode + * @memberof cosmos.base.tendermint.v1beta1.GetLatestValidatorSetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.base.tendermint.v1beta1.GetLatestValidatorSetRequest} GetLatestValidatorSetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetLatestValidatorSetRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.tendermint.v1beta1.GetLatestValidatorSetRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetLatestValidatorSetRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.base.tendermint.v1beta1.GetLatestValidatorSetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.base.tendermint.v1beta1.GetLatestValidatorSetRequest} GetLatestValidatorSetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetLatestValidatorSetRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetLatestValidatorSetRequest message. + * @function verify + * @memberof cosmos.base.tendermint.v1beta1.GetLatestValidatorSetRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetLatestValidatorSetRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.pagination != null && message.hasOwnProperty("pagination")) { + let error = $root.cosmos.base.query.v1beta1.PageRequest.verify(message.pagination); + if (error) + return "pagination." + error; + } + return null; + }; + + /** + * Creates a GetLatestValidatorSetRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.base.tendermint.v1beta1.GetLatestValidatorSetRequest + * @static + * @param {Object.} object Plain object + * @returns {cosmos.base.tendermint.v1beta1.GetLatestValidatorSetRequest} GetLatestValidatorSetRequest + */ + GetLatestValidatorSetRequest.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.base.tendermint.v1beta1.GetLatestValidatorSetRequest) + return object; + let message = new $root.cosmos.base.tendermint.v1beta1.GetLatestValidatorSetRequest(); + if (object.pagination != null) { + if (typeof object.pagination !== "object") + throw TypeError(".cosmos.base.tendermint.v1beta1.GetLatestValidatorSetRequest.pagination: object expected"); + message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.fromObject(object.pagination); + } + return message; + }; + + /** + * Creates a plain object from a GetLatestValidatorSetRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.base.tendermint.v1beta1.GetLatestValidatorSetRequest + * @static + * @param {cosmos.base.tendermint.v1beta1.GetLatestValidatorSetRequest} message GetLatestValidatorSetRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetLatestValidatorSetRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.pagination = null; + if (message.pagination != null && message.hasOwnProperty("pagination")) + object.pagination = $root.cosmos.base.query.v1beta1.PageRequest.toObject(message.pagination, options); + return object; + }; + + /** + * Converts this GetLatestValidatorSetRequest to JSON. + * @function toJSON + * @memberof cosmos.base.tendermint.v1beta1.GetLatestValidatorSetRequest + * @instance + * @returns {Object.} JSON object + */ + GetLatestValidatorSetRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetLatestValidatorSetRequest; + })(v1beta1.GetLatestValidatorSetRequest || {}); + + v1beta1.GetLatestValidatorSetResponse = (function(GetLatestValidatorSetResponse) { + + /** + * Properties of a GetLatestValidatorSetResponse. + * @memberof cosmos.base.tendermint.v1beta1 + * @interface IGetLatestValidatorSetResponse + * @property {number|Long|null} [blockHeight] GetLatestValidatorSetResponse blockHeight + * @property {Array.|null} [validators] GetLatestValidatorSetResponse validators + * @property {cosmos.base.query.v1beta1.IPageResponse|null} [pagination] GetLatestValidatorSetResponse pagination + */ + + /** + * Constructs a new GetLatestValidatorSetResponse. + * @memberof cosmos.base.tendermint.v1beta1 + * @classdesc Represents a GetLatestValidatorSetResponse. + * @implements IGetLatestValidatorSetResponse + * @constructor + * @param {cosmos.base.tendermint.v1beta1.IGetLatestValidatorSetResponse=} [properties] Properties to set + */ + function GetLatestValidatorSetResponse(properties) { + this.validators = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetLatestValidatorSetResponse blockHeight. + * @member {number|Long} blockHeight + * @memberof cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse + * @instance + */ + GetLatestValidatorSetResponse.prototype.blockHeight = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * GetLatestValidatorSetResponse validators. + * @member {Array.} validators + * @memberof cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse + * @instance + */ + GetLatestValidatorSetResponse.prototype.validators = $util.emptyArray; + + /** + * GetLatestValidatorSetResponse pagination. + * @member {cosmos.base.query.v1beta1.IPageResponse|null|undefined} pagination + * @memberof cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse + * @instance + */ + GetLatestValidatorSetResponse.prototype.pagination = null; + + /** + * Creates a new GetLatestValidatorSetResponse instance using the specified properties. + * @function create + * @memberof cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse + * @static + * @param {cosmos.base.tendermint.v1beta1.IGetLatestValidatorSetResponse=} [properties] Properties to set + * @returns {cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse} GetLatestValidatorSetResponse instance + */ + GetLatestValidatorSetResponse.create = function create(properties) { + return new GetLatestValidatorSetResponse(properties); + }; + + /** + * Encodes the specified GetLatestValidatorSetResponse message. Does not implicitly {@link cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse + * @static + * @param {cosmos.base.tendermint.v1beta1.IGetLatestValidatorSetResponse} message GetLatestValidatorSetResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetLatestValidatorSetResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.blockHeight != null && Object.hasOwnProperty.call(message, "blockHeight")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.blockHeight); + if (message.validators != null && message.validators.length) + for (let i = 0; i < message.validators.length; ++i) + $root.cosmos.base.tendermint.v1beta1.Validator.encode(message.validators[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) + $root.cosmos.base.query.v1beta1.PageResponse.encode(message.pagination, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GetLatestValidatorSetResponse message, length delimited. Does not implicitly {@link cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse + * @static + * @param {cosmos.base.tendermint.v1beta1.IGetLatestValidatorSetResponse} message GetLatestValidatorSetResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetLatestValidatorSetResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetLatestValidatorSetResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse} GetLatestValidatorSetResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetLatestValidatorSetResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.blockHeight = reader.int64(); + break; + case 2: + if (!(message.validators && message.validators.length)) + message.validators = []; + message.validators.push($root.cosmos.base.tendermint.v1beta1.Validator.decode(reader, reader.uint32())); + break; + case 3: + message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetLatestValidatorSetResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse} GetLatestValidatorSetResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetLatestValidatorSetResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetLatestValidatorSetResponse message. + * @function verify + * @memberof cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetLatestValidatorSetResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.blockHeight != null && message.hasOwnProperty("blockHeight")) + if (!$util.isInteger(message.blockHeight) && !(message.blockHeight && $util.isInteger(message.blockHeight.low) && $util.isInteger(message.blockHeight.high))) + return "blockHeight: integer|Long expected"; + if (message.validators != null && message.hasOwnProperty("validators")) { + if (!Array.isArray(message.validators)) + return "validators: array expected"; + for (let i = 0; i < message.validators.length; ++i) { + let error = $root.cosmos.base.tendermint.v1beta1.Validator.verify(message.validators[i]); + if (error) + return "validators." + error; + } + } + if (message.pagination != null && message.hasOwnProperty("pagination")) { + let error = $root.cosmos.base.query.v1beta1.PageResponse.verify(message.pagination); + if (error) + return "pagination." + error; + } + return null; + }; + + /** + * Creates a GetLatestValidatorSetResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse} GetLatestValidatorSetResponse + */ + GetLatestValidatorSetResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse) + return object; + let message = new $root.cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse(); + if (object.blockHeight != null) + if ($util.Long) + (message.blockHeight = $util.Long.fromValue(object.blockHeight)).unsigned = false; + else if (typeof object.blockHeight === "string") + message.blockHeight = parseInt(object.blockHeight, 10); + else if (typeof object.blockHeight === "number") + message.blockHeight = object.blockHeight; + else if (typeof object.blockHeight === "object") + message.blockHeight = new $util.LongBits(object.blockHeight.low >>> 0, object.blockHeight.high >>> 0).toNumber(); + if (object.validators) { + if (!Array.isArray(object.validators)) + throw TypeError(".cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse.validators: array expected"); + message.validators = []; + for (let i = 0; i < object.validators.length; ++i) { + if (typeof object.validators[i] !== "object") + throw TypeError(".cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse.validators: object expected"); + message.validators[i] = $root.cosmos.base.tendermint.v1beta1.Validator.fromObject(object.validators[i]); + } + } + if (object.pagination != null) { + if (typeof object.pagination !== "object") + throw TypeError(".cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse.pagination: object expected"); + message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.fromObject(object.pagination); + } + return message; + }; + + /** + * Creates a plain object from a GetLatestValidatorSetResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse + * @static + * @param {cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse} message GetLatestValidatorSetResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetLatestValidatorSetResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.validators = []; + if (options.defaults) { + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.blockHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.blockHeight = options.longs === String ? "0" : 0; + object.pagination = null; + } + if (message.blockHeight != null && message.hasOwnProperty("blockHeight")) + if (typeof message.blockHeight === "number") + object.blockHeight = options.longs === String ? String(message.blockHeight) : message.blockHeight; + else + object.blockHeight = options.longs === String ? $util.Long.prototype.toString.call(message.blockHeight) : options.longs === Number ? new $util.LongBits(message.blockHeight.low >>> 0, message.blockHeight.high >>> 0).toNumber() : message.blockHeight; + if (message.validators && message.validators.length) { + object.validators = []; + for (let j = 0; j < message.validators.length; ++j) + object.validators[j] = $root.cosmos.base.tendermint.v1beta1.Validator.toObject(message.validators[j], options); + } + if (message.pagination != null && message.hasOwnProperty("pagination")) + object.pagination = $root.cosmos.base.query.v1beta1.PageResponse.toObject(message.pagination, options); + return object; + }; + + /** + * Converts this GetLatestValidatorSetResponse to JSON. + * @function toJSON + * @memberof cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse + * @instance + * @returns {Object.} JSON object + */ + GetLatestValidatorSetResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetLatestValidatorSetResponse; + })(v1beta1.GetLatestValidatorSetResponse || {}); + + v1beta1.Validator = (function(Validator) { + + /** + * Properties of a Validator. + * @memberof cosmos.base.tendermint.v1beta1 + * @interface IValidator + * @property {string|null} [address] Validator address + * @property {google.protobuf.IAny|null} [pubKey] Validator pubKey + * @property {number|Long|null} [votingPower] Validator votingPower + * @property {number|Long|null} [proposerPriority] Validator proposerPriority + */ + + /** + * Constructs a new Validator. + * @memberof cosmos.base.tendermint.v1beta1 + * @classdesc Represents a Validator. + * @implements IValidator + * @constructor + * @param {cosmos.base.tendermint.v1beta1.IValidator=} [properties] Properties to set + */ + function Validator(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Validator address. + * @member {string} address + * @memberof cosmos.base.tendermint.v1beta1.Validator + * @instance + */ + Validator.prototype.address = ""; + + /** + * Validator pubKey. + * @member {google.protobuf.IAny|null|undefined} pubKey + * @memberof cosmos.base.tendermint.v1beta1.Validator + * @instance + */ + Validator.prototype.pubKey = null; + + /** + * Validator votingPower. + * @member {number|Long} votingPower + * @memberof cosmos.base.tendermint.v1beta1.Validator + * @instance + */ + Validator.prototype.votingPower = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Validator proposerPriority. + * @member {number|Long} proposerPriority + * @memberof cosmos.base.tendermint.v1beta1.Validator + * @instance + */ + Validator.prototype.proposerPriority = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new Validator instance using the specified properties. + * @function create + * @memberof cosmos.base.tendermint.v1beta1.Validator + * @static + * @param {cosmos.base.tendermint.v1beta1.IValidator=} [properties] Properties to set + * @returns {cosmos.base.tendermint.v1beta1.Validator} Validator instance + */ + Validator.create = function create(properties) { + return new Validator(properties); + }; + + /** + * Encodes the specified Validator message. Does not implicitly {@link cosmos.base.tendermint.v1beta1.Validator.verify|verify} messages. + * @function encode + * @memberof cosmos.base.tendermint.v1beta1.Validator + * @static + * @param {cosmos.base.tendermint.v1beta1.IValidator} message Validator message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Validator.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.address != null && Object.hasOwnProperty.call(message, "address")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.address); + if (message.pubKey != null && Object.hasOwnProperty.call(message, "pubKey")) + $root.google.protobuf.Any.encode(message.pubKey, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.votingPower != null && Object.hasOwnProperty.call(message, "votingPower")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.votingPower); + if (message.proposerPriority != null && Object.hasOwnProperty.call(message, "proposerPriority")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.proposerPriority); + return writer; + }; + + /** + * Encodes the specified Validator message, length delimited. Does not implicitly {@link cosmos.base.tendermint.v1beta1.Validator.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.base.tendermint.v1beta1.Validator + * @static + * @param {cosmos.base.tendermint.v1beta1.IValidator} message Validator message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Validator.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Validator message from the specified reader or buffer. + * @function decode + * @memberof cosmos.base.tendermint.v1beta1.Validator + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.base.tendermint.v1beta1.Validator} Validator + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Validator.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.tendermint.v1beta1.Validator(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.address = reader.string(); + break; + case 2: + message.pubKey = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + case 3: + message.votingPower = reader.int64(); + break; + case 4: + message.proposerPriority = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Validator message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.base.tendermint.v1beta1.Validator + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.base.tendermint.v1beta1.Validator} Validator + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Validator.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Validator message. + * @function verify + * @memberof cosmos.base.tendermint.v1beta1.Validator + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Validator.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.address != null && message.hasOwnProperty("address")) + if (!$util.isString(message.address)) + return "address: string expected"; + if (message.pubKey != null && message.hasOwnProperty("pubKey")) { + let error = $root.google.protobuf.Any.verify(message.pubKey); + if (error) + return "pubKey." + error; + } + if (message.votingPower != null && message.hasOwnProperty("votingPower")) + if (!$util.isInteger(message.votingPower) && !(message.votingPower && $util.isInteger(message.votingPower.low) && $util.isInteger(message.votingPower.high))) + return "votingPower: integer|Long expected"; + if (message.proposerPriority != null && message.hasOwnProperty("proposerPriority")) + if (!$util.isInteger(message.proposerPriority) && !(message.proposerPriority && $util.isInteger(message.proposerPriority.low) && $util.isInteger(message.proposerPriority.high))) + return "proposerPriority: integer|Long expected"; + return null; + }; + + /** + * Creates a Validator message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.base.tendermint.v1beta1.Validator + * @static + * @param {Object.} object Plain object + * @returns {cosmos.base.tendermint.v1beta1.Validator} Validator + */ + Validator.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.base.tendermint.v1beta1.Validator) + return object; + let message = new $root.cosmos.base.tendermint.v1beta1.Validator(); + if (object.address != null) + message.address = String(object.address); + if (object.pubKey != null) { + if (typeof object.pubKey !== "object") + throw TypeError(".cosmos.base.tendermint.v1beta1.Validator.pubKey: object expected"); + message.pubKey = $root.google.protobuf.Any.fromObject(object.pubKey); + } + if (object.votingPower != null) + if ($util.Long) + (message.votingPower = $util.Long.fromValue(object.votingPower)).unsigned = false; + else if (typeof object.votingPower === "string") + message.votingPower = parseInt(object.votingPower, 10); + else if (typeof object.votingPower === "number") + message.votingPower = object.votingPower; + else if (typeof object.votingPower === "object") + message.votingPower = new $util.LongBits(object.votingPower.low >>> 0, object.votingPower.high >>> 0).toNumber(); + if (object.proposerPriority != null) + if ($util.Long) + (message.proposerPriority = $util.Long.fromValue(object.proposerPriority)).unsigned = false; + else if (typeof object.proposerPriority === "string") + message.proposerPriority = parseInt(object.proposerPriority, 10); + else if (typeof object.proposerPriority === "number") + message.proposerPriority = object.proposerPriority; + else if (typeof object.proposerPriority === "object") + message.proposerPriority = new $util.LongBits(object.proposerPriority.low >>> 0, object.proposerPriority.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a Validator message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.base.tendermint.v1beta1.Validator + * @static + * @param {cosmos.base.tendermint.v1beta1.Validator} message Validator + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Validator.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.address = ""; + object.pubKey = null; + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.votingPower = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.votingPower = options.longs === String ? "0" : 0; + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.proposerPriority = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.proposerPriority = options.longs === String ? "0" : 0; + } + if (message.address != null && message.hasOwnProperty("address")) + object.address = message.address; + if (message.pubKey != null && message.hasOwnProperty("pubKey")) + object.pubKey = $root.google.protobuf.Any.toObject(message.pubKey, options); + if (message.votingPower != null && message.hasOwnProperty("votingPower")) + if (typeof message.votingPower === "number") + object.votingPower = options.longs === String ? String(message.votingPower) : message.votingPower; + else + object.votingPower = options.longs === String ? $util.Long.prototype.toString.call(message.votingPower) : options.longs === Number ? new $util.LongBits(message.votingPower.low >>> 0, message.votingPower.high >>> 0).toNumber() : message.votingPower; + if (message.proposerPriority != null && message.hasOwnProperty("proposerPriority")) + if (typeof message.proposerPriority === "number") + object.proposerPriority = options.longs === String ? String(message.proposerPriority) : message.proposerPriority; + else + object.proposerPriority = options.longs === String ? $util.Long.prototype.toString.call(message.proposerPriority) : options.longs === Number ? new $util.LongBits(message.proposerPriority.low >>> 0, message.proposerPriority.high >>> 0).toNumber() : message.proposerPriority; + return object; + }; + + /** + * Converts this Validator to JSON. + * @function toJSON + * @memberof cosmos.base.tendermint.v1beta1.Validator + * @instance + * @returns {Object.} JSON object + */ + Validator.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Validator; + })(v1beta1.Validator || {}); + + v1beta1.GetBlockByHeightRequest = (function(GetBlockByHeightRequest) { + + /** + * Properties of a GetBlockByHeightRequest. + * @memberof cosmos.base.tendermint.v1beta1 + * @interface IGetBlockByHeightRequest + * @property {number|Long|null} [height] GetBlockByHeightRequest height + */ + + /** + * Constructs a new GetBlockByHeightRequest. + * @memberof cosmos.base.tendermint.v1beta1 + * @classdesc Represents a GetBlockByHeightRequest. + * @implements IGetBlockByHeightRequest + * @constructor + * @param {cosmos.base.tendermint.v1beta1.IGetBlockByHeightRequest=} [properties] Properties to set + */ + function GetBlockByHeightRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetBlockByHeightRequest height. + * @member {number|Long} height + * @memberof cosmos.base.tendermint.v1beta1.GetBlockByHeightRequest + * @instance + */ + GetBlockByHeightRequest.prototype.height = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new GetBlockByHeightRequest instance using the specified properties. + * @function create + * @memberof cosmos.base.tendermint.v1beta1.GetBlockByHeightRequest + * @static + * @param {cosmos.base.tendermint.v1beta1.IGetBlockByHeightRequest=} [properties] Properties to set + * @returns {cosmos.base.tendermint.v1beta1.GetBlockByHeightRequest} GetBlockByHeightRequest instance + */ + GetBlockByHeightRequest.create = function create(properties) { + return new GetBlockByHeightRequest(properties); + }; + + /** + * Encodes the specified GetBlockByHeightRequest message. Does not implicitly {@link cosmos.base.tendermint.v1beta1.GetBlockByHeightRequest.verify|verify} messages. + * @function encode + * @memberof cosmos.base.tendermint.v1beta1.GetBlockByHeightRequest + * @static + * @param {cosmos.base.tendermint.v1beta1.IGetBlockByHeightRequest} message GetBlockByHeightRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetBlockByHeightRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.height != null && Object.hasOwnProperty.call(message, "height")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.height); + return writer; + }; + + /** + * Encodes the specified GetBlockByHeightRequest message, length delimited. Does not implicitly {@link cosmos.base.tendermint.v1beta1.GetBlockByHeightRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.base.tendermint.v1beta1.GetBlockByHeightRequest + * @static + * @param {cosmos.base.tendermint.v1beta1.IGetBlockByHeightRequest} message GetBlockByHeightRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetBlockByHeightRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetBlockByHeightRequest message from the specified reader or buffer. + * @function decode + * @memberof cosmos.base.tendermint.v1beta1.GetBlockByHeightRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.base.tendermint.v1beta1.GetBlockByHeightRequest} GetBlockByHeightRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetBlockByHeightRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.tendermint.v1beta1.GetBlockByHeightRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.height = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetBlockByHeightRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.base.tendermint.v1beta1.GetBlockByHeightRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.base.tendermint.v1beta1.GetBlockByHeightRequest} GetBlockByHeightRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetBlockByHeightRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetBlockByHeightRequest message. + * @function verify + * @memberof cosmos.base.tendermint.v1beta1.GetBlockByHeightRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetBlockByHeightRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.height != null && message.hasOwnProperty("height")) + if (!$util.isInteger(message.height) && !(message.height && $util.isInteger(message.height.low) && $util.isInteger(message.height.high))) + return "height: integer|Long expected"; + return null; + }; + + /** + * Creates a GetBlockByHeightRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.base.tendermint.v1beta1.GetBlockByHeightRequest + * @static + * @param {Object.} object Plain object + * @returns {cosmos.base.tendermint.v1beta1.GetBlockByHeightRequest} GetBlockByHeightRequest + */ + GetBlockByHeightRequest.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.base.tendermint.v1beta1.GetBlockByHeightRequest) + return object; + let message = new $root.cosmos.base.tendermint.v1beta1.GetBlockByHeightRequest(); + if (object.height != null) + if ($util.Long) + (message.height = $util.Long.fromValue(object.height)).unsigned = false; + else if (typeof object.height === "string") + message.height = parseInt(object.height, 10); + else if (typeof object.height === "number") + message.height = object.height; + else if (typeof object.height === "object") + message.height = new $util.LongBits(object.height.low >>> 0, object.height.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a GetBlockByHeightRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.base.tendermint.v1beta1.GetBlockByHeightRequest + * @static + * @param {cosmos.base.tendermint.v1beta1.GetBlockByHeightRequest} message GetBlockByHeightRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetBlockByHeightRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.height = options.longs === String ? "0" : 0; + if (message.height != null && message.hasOwnProperty("height")) + if (typeof message.height === "number") + object.height = options.longs === String ? String(message.height) : message.height; + else + object.height = options.longs === String ? $util.Long.prototype.toString.call(message.height) : options.longs === Number ? new $util.LongBits(message.height.low >>> 0, message.height.high >>> 0).toNumber() : message.height; + return object; + }; + + /** + * Converts this GetBlockByHeightRequest to JSON. + * @function toJSON + * @memberof cosmos.base.tendermint.v1beta1.GetBlockByHeightRequest + * @instance + * @returns {Object.} JSON object + */ + GetBlockByHeightRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetBlockByHeightRequest; + })(v1beta1.GetBlockByHeightRequest || {}); + + v1beta1.GetBlockByHeightResponse = (function(GetBlockByHeightResponse) { + + /** + * Properties of a GetBlockByHeightResponse. + * @memberof cosmos.base.tendermint.v1beta1 + * @interface IGetBlockByHeightResponse + * @property {tendermint.types.IBlockID|null} [blockId] GetBlockByHeightResponse blockId + * @property {tendermint.types.IBlock|null} [block] GetBlockByHeightResponse block + */ + + /** + * Constructs a new GetBlockByHeightResponse. + * @memberof cosmos.base.tendermint.v1beta1 + * @classdesc Represents a GetBlockByHeightResponse. + * @implements IGetBlockByHeightResponse + * @constructor + * @param {cosmos.base.tendermint.v1beta1.IGetBlockByHeightResponse=} [properties] Properties to set + */ + function GetBlockByHeightResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetBlockByHeightResponse blockId. + * @member {tendermint.types.IBlockID|null|undefined} blockId + * @memberof cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse + * @instance + */ + GetBlockByHeightResponse.prototype.blockId = null; + + /** + * GetBlockByHeightResponse block. + * @member {tendermint.types.IBlock|null|undefined} block + * @memberof cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse + * @instance + */ + GetBlockByHeightResponse.prototype.block = null; + + /** + * Creates a new GetBlockByHeightResponse instance using the specified properties. + * @function create + * @memberof cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse + * @static + * @param {cosmos.base.tendermint.v1beta1.IGetBlockByHeightResponse=} [properties] Properties to set + * @returns {cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse} GetBlockByHeightResponse instance + */ + GetBlockByHeightResponse.create = function create(properties) { + return new GetBlockByHeightResponse(properties); + }; + + /** + * Encodes the specified GetBlockByHeightResponse message. Does not implicitly {@link cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse + * @static + * @param {cosmos.base.tendermint.v1beta1.IGetBlockByHeightResponse} message GetBlockByHeightResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetBlockByHeightResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.blockId != null && Object.hasOwnProperty.call(message, "blockId")) + $root.tendermint.types.BlockID.encode(message.blockId, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.block != null && Object.hasOwnProperty.call(message, "block")) + $root.tendermint.types.Block.encode(message.block, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GetBlockByHeightResponse message, length delimited. Does not implicitly {@link cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse + * @static + * @param {cosmos.base.tendermint.v1beta1.IGetBlockByHeightResponse} message GetBlockByHeightResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetBlockByHeightResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetBlockByHeightResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse} GetBlockByHeightResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetBlockByHeightResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.blockId = $root.tendermint.types.BlockID.decode(reader, reader.uint32()); + break; + case 2: + message.block = $root.tendermint.types.Block.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetBlockByHeightResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse} GetBlockByHeightResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetBlockByHeightResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetBlockByHeightResponse message. + * @function verify + * @memberof cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetBlockByHeightResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.blockId != null && message.hasOwnProperty("blockId")) { + let error = $root.tendermint.types.BlockID.verify(message.blockId); + if (error) + return "blockId." + error; + } + if (message.block != null && message.hasOwnProperty("block")) { + let error = $root.tendermint.types.Block.verify(message.block); + if (error) + return "block." + error; + } + return null; + }; + + /** + * Creates a GetBlockByHeightResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse} GetBlockByHeightResponse + */ + GetBlockByHeightResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse) + return object; + let message = new $root.cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse(); + if (object.blockId != null) { + if (typeof object.blockId !== "object") + throw TypeError(".cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse.blockId: object expected"); + message.blockId = $root.tendermint.types.BlockID.fromObject(object.blockId); + } + if (object.block != null) { + if (typeof object.block !== "object") + throw TypeError(".cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse.block: object expected"); + message.block = $root.tendermint.types.Block.fromObject(object.block); + } + return message; + }; + + /** + * Creates a plain object from a GetBlockByHeightResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse + * @static + * @param {cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse} message GetBlockByHeightResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetBlockByHeightResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.blockId = null; + object.block = null; + } + if (message.blockId != null && message.hasOwnProperty("blockId")) + object.blockId = $root.tendermint.types.BlockID.toObject(message.blockId, options); + if (message.block != null && message.hasOwnProperty("block")) + object.block = $root.tendermint.types.Block.toObject(message.block, options); + return object; + }; + + /** + * Converts this GetBlockByHeightResponse to JSON. + * @function toJSON + * @memberof cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse + * @instance + * @returns {Object.} JSON object + */ + GetBlockByHeightResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetBlockByHeightResponse; + })(v1beta1.GetBlockByHeightResponse || {}); + + v1beta1.GetLatestBlockRequest = (function(GetLatestBlockRequest) { + + /** + * Properties of a GetLatestBlockRequest. + * @memberof cosmos.base.tendermint.v1beta1 + * @interface IGetLatestBlockRequest + */ + + /** + * Constructs a new GetLatestBlockRequest. + * @memberof cosmos.base.tendermint.v1beta1 + * @classdesc Represents a GetLatestBlockRequest. + * @implements IGetLatestBlockRequest + * @constructor + * @param {cosmos.base.tendermint.v1beta1.IGetLatestBlockRequest=} [properties] Properties to set + */ + function GetLatestBlockRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new GetLatestBlockRequest instance using the specified properties. + * @function create + * @memberof cosmos.base.tendermint.v1beta1.GetLatestBlockRequest + * @static + * @param {cosmos.base.tendermint.v1beta1.IGetLatestBlockRequest=} [properties] Properties to set + * @returns {cosmos.base.tendermint.v1beta1.GetLatestBlockRequest} GetLatestBlockRequest instance + */ + GetLatestBlockRequest.create = function create(properties) { + return new GetLatestBlockRequest(properties); + }; + + /** + * Encodes the specified GetLatestBlockRequest message. Does not implicitly {@link cosmos.base.tendermint.v1beta1.GetLatestBlockRequest.verify|verify} messages. + * @function encode + * @memberof cosmos.base.tendermint.v1beta1.GetLatestBlockRequest + * @static + * @param {cosmos.base.tendermint.v1beta1.IGetLatestBlockRequest} message GetLatestBlockRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetLatestBlockRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified GetLatestBlockRequest message, length delimited. Does not implicitly {@link cosmos.base.tendermint.v1beta1.GetLatestBlockRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.base.tendermint.v1beta1.GetLatestBlockRequest + * @static + * @param {cosmos.base.tendermint.v1beta1.IGetLatestBlockRequest} message GetLatestBlockRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetLatestBlockRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetLatestBlockRequest message from the specified reader or buffer. + * @function decode + * @memberof cosmos.base.tendermint.v1beta1.GetLatestBlockRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.base.tendermint.v1beta1.GetLatestBlockRequest} GetLatestBlockRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetLatestBlockRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.tendermint.v1beta1.GetLatestBlockRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetLatestBlockRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.base.tendermint.v1beta1.GetLatestBlockRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.base.tendermint.v1beta1.GetLatestBlockRequest} GetLatestBlockRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetLatestBlockRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetLatestBlockRequest message. + * @function verify + * @memberof cosmos.base.tendermint.v1beta1.GetLatestBlockRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetLatestBlockRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a GetLatestBlockRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.base.tendermint.v1beta1.GetLatestBlockRequest + * @static + * @param {Object.} object Plain object + * @returns {cosmos.base.tendermint.v1beta1.GetLatestBlockRequest} GetLatestBlockRequest + */ + GetLatestBlockRequest.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.base.tendermint.v1beta1.GetLatestBlockRequest) + return object; + return new $root.cosmos.base.tendermint.v1beta1.GetLatestBlockRequest(); + }; + + /** + * Creates a plain object from a GetLatestBlockRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.base.tendermint.v1beta1.GetLatestBlockRequest + * @static + * @param {cosmos.base.tendermint.v1beta1.GetLatestBlockRequest} message GetLatestBlockRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetLatestBlockRequest.toObject = function toObject() { + return {}; + }; + + /** + * Converts this GetLatestBlockRequest to JSON. + * @function toJSON + * @memberof cosmos.base.tendermint.v1beta1.GetLatestBlockRequest + * @instance + * @returns {Object.} JSON object + */ + GetLatestBlockRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetLatestBlockRequest; + })(v1beta1.GetLatestBlockRequest || {}); + + v1beta1.GetLatestBlockResponse = (function(GetLatestBlockResponse) { + + /** + * Properties of a GetLatestBlockResponse. + * @memberof cosmos.base.tendermint.v1beta1 + * @interface IGetLatestBlockResponse + * @property {tendermint.types.IBlockID|null} [blockId] GetLatestBlockResponse blockId + * @property {tendermint.types.IBlock|null} [block] GetLatestBlockResponse block + */ + + /** + * Constructs a new GetLatestBlockResponse. + * @memberof cosmos.base.tendermint.v1beta1 + * @classdesc Represents a GetLatestBlockResponse. + * @implements IGetLatestBlockResponse + * @constructor + * @param {cosmos.base.tendermint.v1beta1.IGetLatestBlockResponse=} [properties] Properties to set + */ + function GetLatestBlockResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetLatestBlockResponse blockId. + * @member {tendermint.types.IBlockID|null|undefined} blockId + * @memberof cosmos.base.tendermint.v1beta1.GetLatestBlockResponse + * @instance + */ + GetLatestBlockResponse.prototype.blockId = null; + + /** + * GetLatestBlockResponse block. + * @member {tendermint.types.IBlock|null|undefined} block + * @memberof cosmos.base.tendermint.v1beta1.GetLatestBlockResponse + * @instance + */ + GetLatestBlockResponse.prototype.block = null; + + /** + * Creates a new GetLatestBlockResponse instance using the specified properties. + * @function create + * @memberof cosmos.base.tendermint.v1beta1.GetLatestBlockResponse + * @static + * @param {cosmos.base.tendermint.v1beta1.IGetLatestBlockResponse=} [properties] Properties to set + * @returns {cosmos.base.tendermint.v1beta1.GetLatestBlockResponse} GetLatestBlockResponse instance + */ + GetLatestBlockResponse.create = function create(properties) { + return new GetLatestBlockResponse(properties); + }; + + /** + * Encodes the specified GetLatestBlockResponse message. Does not implicitly {@link cosmos.base.tendermint.v1beta1.GetLatestBlockResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.base.tendermint.v1beta1.GetLatestBlockResponse + * @static + * @param {cosmos.base.tendermint.v1beta1.IGetLatestBlockResponse} message GetLatestBlockResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetLatestBlockResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.blockId != null && Object.hasOwnProperty.call(message, "blockId")) + $root.tendermint.types.BlockID.encode(message.blockId, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.block != null && Object.hasOwnProperty.call(message, "block")) + $root.tendermint.types.Block.encode(message.block, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GetLatestBlockResponse message, length delimited. Does not implicitly {@link cosmos.base.tendermint.v1beta1.GetLatestBlockResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.base.tendermint.v1beta1.GetLatestBlockResponse + * @static + * @param {cosmos.base.tendermint.v1beta1.IGetLatestBlockResponse} message GetLatestBlockResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetLatestBlockResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetLatestBlockResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.base.tendermint.v1beta1.GetLatestBlockResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.base.tendermint.v1beta1.GetLatestBlockResponse} GetLatestBlockResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetLatestBlockResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.tendermint.v1beta1.GetLatestBlockResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.blockId = $root.tendermint.types.BlockID.decode(reader, reader.uint32()); + break; + case 2: + message.block = $root.tendermint.types.Block.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetLatestBlockResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.base.tendermint.v1beta1.GetLatestBlockResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.base.tendermint.v1beta1.GetLatestBlockResponse} GetLatestBlockResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetLatestBlockResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetLatestBlockResponse message. + * @function verify + * @memberof cosmos.base.tendermint.v1beta1.GetLatestBlockResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetLatestBlockResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.blockId != null && message.hasOwnProperty("blockId")) { + let error = $root.tendermint.types.BlockID.verify(message.blockId); + if (error) + return "blockId." + error; + } + if (message.block != null && message.hasOwnProperty("block")) { + let error = $root.tendermint.types.Block.verify(message.block); + if (error) + return "block." + error; + } + return null; + }; + + /** + * Creates a GetLatestBlockResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.base.tendermint.v1beta1.GetLatestBlockResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.base.tendermint.v1beta1.GetLatestBlockResponse} GetLatestBlockResponse + */ + GetLatestBlockResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.base.tendermint.v1beta1.GetLatestBlockResponse) + return object; + let message = new $root.cosmos.base.tendermint.v1beta1.GetLatestBlockResponse(); + if (object.blockId != null) { + if (typeof object.blockId !== "object") + throw TypeError(".cosmos.base.tendermint.v1beta1.GetLatestBlockResponse.blockId: object expected"); + message.blockId = $root.tendermint.types.BlockID.fromObject(object.blockId); + } + if (object.block != null) { + if (typeof object.block !== "object") + throw TypeError(".cosmos.base.tendermint.v1beta1.GetLatestBlockResponse.block: object expected"); + message.block = $root.tendermint.types.Block.fromObject(object.block); + } + return message; + }; + + /** + * Creates a plain object from a GetLatestBlockResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.base.tendermint.v1beta1.GetLatestBlockResponse + * @static + * @param {cosmos.base.tendermint.v1beta1.GetLatestBlockResponse} message GetLatestBlockResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetLatestBlockResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.blockId = null; + object.block = null; + } + if (message.blockId != null && message.hasOwnProperty("blockId")) + object.blockId = $root.tendermint.types.BlockID.toObject(message.blockId, options); + if (message.block != null && message.hasOwnProperty("block")) + object.block = $root.tendermint.types.Block.toObject(message.block, options); + return object; + }; + + /** + * Converts this GetLatestBlockResponse to JSON. + * @function toJSON + * @memberof cosmos.base.tendermint.v1beta1.GetLatestBlockResponse + * @instance + * @returns {Object.} JSON object + */ + GetLatestBlockResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetLatestBlockResponse; + })(v1beta1.GetLatestBlockResponse || {}); + + v1beta1.GetSyncingRequest = (function(GetSyncingRequest) { + + /** + * Properties of a GetSyncingRequest. + * @memberof cosmos.base.tendermint.v1beta1 + * @interface IGetSyncingRequest + */ + + /** + * Constructs a new GetSyncingRequest. + * @memberof cosmos.base.tendermint.v1beta1 + * @classdesc Represents a GetSyncingRequest. + * @implements IGetSyncingRequest + * @constructor + * @param {cosmos.base.tendermint.v1beta1.IGetSyncingRequest=} [properties] Properties to set + */ + function GetSyncingRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new GetSyncingRequest instance using the specified properties. + * @function create + * @memberof cosmos.base.tendermint.v1beta1.GetSyncingRequest + * @static + * @param {cosmos.base.tendermint.v1beta1.IGetSyncingRequest=} [properties] Properties to set + * @returns {cosmos.base.tendermint.v1beta1.GetSyncingRequest} GetSyncingRequest instance + */ + GetSyncingRequest.create = function create(properties) { + return new GetSyncingRequest(properties); + }; + + /** + * Encodes the specified GetSyncingRequest message. Does not implicitly {@link cosmos.base.tendermint.v1beta1.GetSyncingRequest.verify|verify} messages. + * @function encode + * @memberof cosmos.base.tendermint.v1beta1.GetSyncingRequest + * @static + * @param {cosmos.base.tendermint.v1beta1.IGetSyncingRequest} message GetSyncingRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetSyncingRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified GetSyncingRequest message, length delimited. Does not implicitly {@link cosmos.base.tendermint.v1beta1.GetSyncingRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.base.tendermint.v1beta1.GetSyncingRequest + * @static + * @param {cosmos.base.tendermint.v1beta1.IGetSyncingRequest} message GetSyncingRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetSyncingRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetSyncingRequest message from the specified reader or buffer. + * @function decode + * @memberof cosmos.base.tendermint.v1beta1.GetSyncingRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.base.tendermint.v1beta1.GetSyncingRequest} GetSyncingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetSyncingRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.tendermint.v1beta1.GetSyncingRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetSyncingRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.base.tendermint.v1beta1.GetSyncingRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.base.tendermint.v1beta1.GetSyncingRequest} GetSyncingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetSyncingRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetSyncingRequest message. + * @function verify + * @memberof cosmos.base.tendermint.v1beta1.GetSyncingRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetSyncingRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a GetSyncingRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.base.tendermint.v1beta1.GetSyncingRequest + * @static + * @param {Object.} object Plain object + * @returns {cosmos.base.tendermint.v1beta1.GetSyncingRequest} GetSyncingRequest + */ + GetSyncingRequest.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.base.tendermint.v1beta1.GetSyncingRequest) + return object; + return new $root.cosmos.base.tendermint.v1beta1.GetSyncingRequest(); + }; + + /** + * Creates a plain object from a GetSyncingRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.base.tendermint.v1beta1.GetSyncingRequest + * @static + * @param {cosmos.base.tendermint.v1beta1.GetSyncingRequest} message GetSyncingRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetSyncingRequest.toObject = function toObject() { + return {}; + }; + + /** + * Converts this GetSyncingRequest to JSON. + * @function toJSON + * @memberof cosmos.base.tendermint.v1beta1.GetSyncingRequest + * @instance + * @returns {Object.} JSON object + */ + GetSyncingRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetSyncingRequest; + })(v1beta1.GetSyncingRequest || {}); + + v1beta1.GetSyncingResponse = (function(GetSyncingResponse) { + + /** + * Properties of a GetSyncingResponse. + * @memberof cosmos.base.tendermint.v1beta1 + * @interface IGetSyncingResponse + * @property {boolean|null} [syncing] GetSyncingResponse syncing + */ + + /** + * Constructs a new GetSyncingResponse. + * @memberof cosmos.base.tendermint.v1beta1 + * @classdesc Represents a GetSyncingResponse. + * @implements IGetSyncingResponse + * @constructor + * @param {cosmos.base.tendermint.v1beta1.IGetSyncingResponse=} [properties] Properties to set + */ + function GetSyncingResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetSyncingResponse syncing. + * @member {boolean} syncing + * @memberof cosmos.base.tendermint.v1beta1.GetSyncingResponse + * @instance + */ + GetSyncingResponse.prototype.syncing = false; + + /** + * Creates a new GetSyncingResponse instance using the specified properties. + * @function create + * @memberof cosmos.base.tendermint.v1beta1.GetSyncingResponse + * @static + * @param {cosmos.base.tendermint.v1beta1.IGetSyncingResponse=} [properties] Properties to set + * @returns {cosmos.base.tendermint.v1beta1.GetSyncingResponse} GetSyncingResponse instance + */ + GetSyncingResponse.create = function create(properties) { + return new GetSyncingResponse(properties); + }; + + /** + * Encodes the specified GetSyncingResponse message. Does not implicitly {@link cosmos.base.tendermint.v1beta1.GetSyncingResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.base.tendermint.v1beta1.GetSyncingResponse + * @static + * @param {cosmos.base.tendermint.v1beta1.IGetSyncingResponse} message GetSyncingResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetSyncingResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.syncing != null && Object.hasOwnProperty.call(message, "syncing")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.syncing); + return writer; + }; + + /** + * Encodes the specified GetSyncingResponse message, length delimited. Does not implicitly {@link cosmos.base.tendermint.v1beta1.GetSyncingResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.base.tendermint.v1beta1.GetSyncingResponse + * @static + * @param {cosmos.base.tendermint.v1beta1.IGetSyncingResponse} message GetSyncingResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetSyncingResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetSyncingResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.base.tendermint.v1beta1.GetSyncingResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.base.tendermint.v1beta1.GetSyncingResponse} GetSyncingResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetSyncingResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.tendermint.v1beta1.GetSyncingResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.syncing = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetSyncingResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.base.tendermint.v1beta1.GetSyncingResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.base.tendermint.v1beta1.GetSyncingResponse} GetSyncingResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetSyncingResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetSyncingResponse message. + * @function verify + * @memberof cosmos.base.tendermint.v1beta1.GetSyncingResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetSyncingResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.syncing != null && message.hasOwnProperty("syncing")) + if (typeof message.syncing !== "boolean") + return "syncing: boolean expected"; + return null; + }; + + /** + * Creates a GetSyncingResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.base.tendermint.v1beta1.GetSyncingResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.base.tendermint.v1beta1.GetSyncingResponse} GetSyncingResponse + */ + GetSyncingResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.base.tendermint.v1beta1.GetSyncingResponse) + return object; + let message = new $root.cosmos.base.tendermint.v1beta1.GetSyncingResponse(); + if (object.syncing != null) + message.syncing = Boolean(object.syncing); + return message; + }; + + /** + * Creates a plain object from a GetSyncingResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.base.tendermint.v1beta1.GetSyncingResponse + * @static + * @param {cosmos.base.tendermint.v1beta1.GetSyncingResponse} message GetSyncingResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetSyncingResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.syncing = false; + if (message.syncing != null && message.hasOwnProperty("syncing")) + object.syncing = message.syncing; + return object; + }; + + /** + * Converts this GetSyncingResponse to JSON. + * @function toJSON + * @memberof cosmos.base.tendermint.v1beta1.GetSyncingResponse + * @instance + * @returns {Object.} JSON object + */ + GetSyncingResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetSyncingResponse; + })(v1beta1.GetSyncingResponse || {}); + + v1beta1.GetNodeInfoRequest = (function(GetNodeInfoRequest) { + + /** + * Properties of a GetNodeInfoRequest. + * @memberof cosmos.base.tendermint.v1beta1 + * @interface IGetNodeInfoRequest + */ + + /** + * Constructs a new GetNodeInfoRequest. + * @memberof cosmos.base.tendermint.v1beta1 + * @classdesc Represents a GetNodeInfoRequest. + * @implements IGetNodeInfoRequest + * @constructor + * @param {cosmos.base.tendermint.v1beta1.IGetNodeInfoRequest=} [properties] Properties to set + */ + function GetNodeInfoRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new GetNodeInfoRequest instance using the specified properties. + * @function create + * @memberof cosmos.base.tendermint.v1beta1.GetNodeInfoRequest + * @static + * @param {cosmos.base.tendermint.v1beta1.IGetNodeInfoRequest=} [properties] Properties to set + * @returns {cosmos.base.tendermint.v1beta1.GetNodeInfoRequest} GetNodeInfoRequest instance + */ + GetNodeInfoRequest.create = function create(properties) { + return new GetNodeInfoRequest(properties); + }; + + /** + * Encodes the specified GetNodeInfoRequest message. Does not implicitly {@link cosmos.base.tendermint.v1beta1.GetNodeInfoRequest.verify|verify} messages. + * @function encode + * @memberof cosmos.base.tendermint.v1beta1.GetNodeInfoRequest + * @static + * @param {cosmos.base.tendermint.v1beta1.IGetNodeInfoRequest} message GetNodeInfoRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetNodeInfoRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified GetNodeInfoRequest message, length delimited. Does not implicitly {@link cosmos.base.tendermint.v1beta1.GetNodeInfoRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.base.tendermint.v1beta1.GetNodeInfoRequest + * @static + * @param {cosmos.base.tendermint.v1beta1.IGetNodeInfoRequest} message GetNodeInfoRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetNodeInfoRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetNodeInfoRequest message from the specified reader or buffer. + * @function decode + * @memberof cosmos.base.tendermint.v1beta1.GetNodeInfoRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.base.tendermint.v1beta1.GetNodeInfoRequest} GetNodeInfoRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetNodeInfoRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.tendermint.v1beta1.GetNodeInfoRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetNodeInfoRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.base.tendermint.v1beta1.GetNodeInfoRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.base.tendermint.v1beta1.GetNodeInfoRequest} GetNodeInfoRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetNodeInfoRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetNodeInfoRequest message. + * @function verify + * @memberof cosmos.base.tendermint.v1beta1.GetNodeInfoRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetNodeInfoRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a GetNodeInfoRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.base.tendermint.v1beta1.GetNodeInfoRequest + * @static + * @param {Object.} object Plain object + * @returns {cosmos.base.tendermint.v1beta1.GetNodeInfoRequest} GetNodeInfoRequest + */ + GetNodeInfoRequest.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.base.tendermint.v1beta1.GetNodeInfoRequest) + return object; + return new $root.cosmos.base.tendermint.v1beta1.GetNodeInfoRequest(); + }; + + /** + * Creates a plain object from a GetNodeInfoRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.base.tendermint.v1beta1.GetNodeInfoRequest + * @static + * @param {cosmos.base.tendermint.v1beta1.GetNodeInfoRequest} message GetNodeInfoRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetNodeInfoRequest.toObject = function toObject() { + return {}; + }; + + /** + * Converts this GetNodeInfoRequest to JSON. + * @function toJSON + * @memberof cosmos.base.tendermint.v1beta1.GetNodeInfoRequest + * @instance + * @returns {Object.} JSON object + */ + GetNodeInfoRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetNodeInfoRequest; + })(v1beta1.GetNodeInfoRequest || {}); + + v1beta1.GetNodeInfoResponse = (function(GetNodeInfoResponse) { + + /** + * Properties of a GetNodeInfoResponse. + * @memberof cosmos.base.tendermint.v1beta1 + * @interface IGetNodeInfoResponse + * @property {tendermint.p2p.IDefaultNodeInfo|null} [defaultNodeInfo] GetNodeInfoResponse defaultNodeInfo + * @property {cosmos.base.tendermint.v1beta1.IVersionInfo|null} [applicationVersion] GetNodeInfoResponse applicationVersion + */ + + /** + * Constructs a new GetNodeInfoResponse. + * @memberof cosmos.base.tendermint.v1beta1 + * @classdesc Represents a GetNodeInfoResponse. + * @implements IGetNodeInfoResponse + * @constructor + * @param {cosmos.base.tendermint.v1beta1.IGetNodeInfoResponse=} [properties] Properties to set + */ + function GetNodeInfoResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetNodeInfoResponse defaultNodeInfo. + * @member {tendermint.p2p.IDefaultNodeInfo|null|undefined} defaultNodeInfo + * @memberof cosmos.base.tendermint.v1beta1.GetNodeInfoResponse + * @instance + */ + GetNodeInfoResponse.prototype.defaultNodeInfo = null; + + /** + * GetNodeInfoResponse applicationVersion. + * @member {cosmos.base.tendermint.v1beta1.IVersionInfo|null|undefined} applicationVersion + * @memberof cosmos.base.tendermint.v1beta1.GetNodeInfoResponse + * @instance + */ + GetNodeInfoResponse.prototype.applicationVersion = null; + + /** + * Creates a new GetNodeInfoResponse instance using the specified properties. + * @function create + * @memberof cosmos.base.tendermint.v1beta1.GetNodeInfoResponse + * @static + * @param {cosmos.base.tendermint.v1beta1.IGetNodeInfoResponse=} [properties] Properties to set + * @returns {cosmos.base.tendermint.v1beta1.GetNodeInfoResponse} GetNodeInfoResponse instance + */ + GetNodeInfoResponse.create = function create(properties) { + return new GetNodeInfoResponse(properties); + }; + + /** + * Encodes the specified GetNodeInfoResponse message. Does not implicitly {@link cosmos.base.tendermint.v1beta1.GetNodeInfoResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.base.tendermint.v1beta1.GetNodeInfoResponse + * @static + * @param {cosmos.base.tendermint.v1beta1.IGetNodeInfoResponse} message GetNodeInfoResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetNodeInfoResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.defaultNodeInfo != null && Object.hasOwnProperty.call(message, "defaultNodeInfo")) + $root.tendermint.p2p.DefaultNodeInfo.encode(message.defaultNodeInfo, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.applicationVersion != null && Object.hasOwnProperty.call(message, "applicationVersion")) + $root.cosmos.base.tendermint.v1beta1.VersionInfo.encode(message.applicationVersion, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GetNodeInfoResponse message, length delimited. Does not implicitly {@link cosmos.base.tendermint.v1beta1.GetNodeInfoResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.base.tendermint.v1beta1.GetNodeInfoResponse + * @static + * @param {cosmos.base.tendermint.v1beta1.IGetNodeInfoResponse} message GetNodeInfoResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetNodeInfoResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetNodeInfoResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.base.tendermint.v1beta1.GetNodeInfoResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.base.tendermint.v1beta1.GetNodeInfoResponse} GetNodeInfoResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetNodeInfoResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.tendermint.v1beta1.GetNodeInfoResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.defaultNodeInfo = $root.tendermint.p2p.DefaultNodeInfo.decode(reader, reader.uint32()); + break; + case 2: + message.applicationVersion = $root.cosmos.base.tendermint.v1beta1.VersionInfo.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetNodeInfoResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.base.tendermint.v1beta1.GetNodeInfoResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.base.tendermint.v1beta1.GetNodeInfoResponse} GetNodeInfoResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetNodeInfoResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetNodeInfoResponse message. + * @function verify + * @memberof cosmos.base.tendermint.v1beta1.GetNodeInfoResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetNodeInfoResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.defaultNodeInfo != null && message.hasOwnProperty("defaultNodeInfo")) { + let error = $root.tendermint.p2p.DefaultNodeInfo.verify(message.defaultNodeInfo); + if (error) + return "defaultNodeInfo." + error; + } + if (message.applicationVersion != null && message.hasOwnProperty("applicationVersion")) { + let error = $root.cosmos.base.tendermint.v1beta1.VersionInfo.verify(message.applicationVersion); + if (error) + return "applicationVersion." + error; + } + return null; + }; + + /** + * Creates a GetNodeInfoResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.base.tendermint.v1beta1.GetNodeInfoResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.base.tendermint.v1beta1.GetNodeInfoResponse} GetNodeInfoResponse + */ + GetNodeInfoResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.base.tendermint.v1beta1.GetNodeInfoResponse) + return object; + let message = new $root.cosmos.base.tendermint.v1beta1.GetNodeInfoResponse(); + if (object.defaultNodeInfo != null) { + if (typeof object.defaultNodeInfo !== "object") + throw TypeError(".cosmos.base.tendermint.v1beta1.GetNodeInfoResponse.defaultNodeInfo: object expected"); + message.defaultNodeInfo = $root.tendermint.p2p.DefaultNodeInfo.fromObject(object.defaultNodeInfo); + } + if (object.applicationVersion != null) { + if (typeof object.applicationVersion !== "object") + throw TypeError(".cosmos.base.tendermint.v1beta1.GetNodeInfoResponse.applicationVersion: object expected"); + message.applicationVersion = $root.cosmos.base.tendermint.v1beta1.VersionInfo.fromObject(object.applicationVersion); + } + return message; + }; + + /** + * Creates a plain object from a GetNodeInfoResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.base.tendermint.v1beta1.GetNodeInfoResponse + * @static + * @param {cosmos.base.tendermint.v1beta1.GetNodeInfoResponse} message GetNodeInfoResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetNodeInfoResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.defaultNodeInfo = null; + object.applicationVersion = null; + } + if (message.defaultNodeInfo != null && message.hasOwnProperty("defaultNodeInfo")) + object.defaultNodeInfo = $root.tendermint.p2p.DefaultNodeInfo.toObject(message.defaultNodeInfo, options); + if (message.applicationVersion != null && message.hasOwnProperty("applicationVersion")) + object.applicationVersion = $root.cosmos.base.tendermint.v1beta1.VersionInfo.toObject(message.applicationVersion, options); + return object; + }; + + /** + * Converts this GetNodeInfoResponse to JSON. + * @function toJSON + * @memberof cosmos.base.tendermint.v1beta1.GetNodeInfoResponse + * @instance + * @returns {Object.} JSON object + */ + GetNodeInfoResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetNodeInfoResponse; + })(v1beta1.GetNodeInfoResponse || {}); + + v1beta1.VersionInfo = (function(VersionInfo) { + + /** + * Properties of a VersionInfo. + * @memberof cosmos.base.tendermint.v1beta1 + * @interface IVersionInfo + * @property {string|null} [name] VersionInfo name + * @property {string|null} [appName] VersionInfo appName + * @property {string|null} [version] VersionInfo version + * @property {string|null} [gitCommit] VersionInfo gitCommit + * @property {string|null} [buildTags] VersionInfo buildTags + * @property {string|null} [goVersion] VersionInfo goVersion + * @property {Array.|null} [buildDeps] VersionInfo buildDeps + */ + + /** + * Constructs a new VersionInfo. + * @memberof cosmos.base.tendermint.v1beta1 + * @classdesc Represents a VersionInfo. + * @implements IVersionInfo + * @constructor + * @param {cosmos.base.tendermint.v1beta1.IVersionInfo=} [properties] Properties to set + */ + function VersionInfo(properties) { + this.buildDeps = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * VersionInfo name. + * @member {string} name + * @memberof cosmos.base.tendermint.v1beta1.VersionInfo + * @instance + */ + VersionInfo.prototype.name = ""; + + /** + * VersionInfo appName. + * @member {string} appName + * @memberof cosmos.base.tendermint.v1beta1.VersionInfo + * @instance + */ + VersionInfo.prototype.appName = ""; + + /** + * VersionInfo version. + * @member {string} version + * @memberof cosmos.base.tendermint.v1beta1.VersionInfo + * @instance + */ + VersionInfo.prototype.version = ""; + + /** + * VersionInfo gitCommit. + * @member {string} gitCommit + * @memberof cosmos.base.tendermint.v1beta1.VersionInfo + * @instance + */ + VersionInfo.prototype.gitCommit = ""; + + /** + * VersionInfo buildTags. + * @member {string} buildTags + * @memberof cosmos.base.tendermint.v1beta1.VersionInfo + * @instance + */ + VersionInfo.prototype.buildTags = ""; + + /** + * VersionInfo goVersion. + * @member {string} goVersion + * @memberof cosmos.base.tendermint.v1beta1.VersionInfo + * @instance + */ + VersionInfo.prototype.goVersion = ""; + + /** + * VersionInfo buildDeps. + * @member {Array.} buildDeps + * @memberof cosmos.base.tendermint.v1beta1.VersionInfo + * @instance + */ + VersionInfo.prototype.buildDeps = $util.emptyArray; + + /** + * Creates a new VersionInfo instance using the specified properties. + * @function create + * @memberof cosmos.base.tendermint.v1beta1.VersionInfo + * @static + * @param {cosmos.base.tendermint.v1beta1.IVersionInfo=} [properties] Properties to set + * @returns {cosmos.base.tendermint.v1beta1.VersionInfo} VersionInfo instance + */ + VersionInfo.create = function create(properties) { + return new VersionInfo(properties); + }; + + /** + * Encodes the specified VersionInfo message. Does not implicitly {@link cosmos.base.tendermint.v1beta1.VersionInfo.verify|verify} messages. + * @function encode + * @memberof cosmos.base.tendermint.v1beta1.VersionInfo + * @static + * @param {cosmos.base.tendermint.v1beta1.IVersionInfo} message VersionInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VersionInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.appName != null && Object.hasOwnProperty.call(message, "appName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.appName); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.version); + if (message.gitCommit != null && Object.hasOwnProperty.call(message, "gitCommit")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.gitCommit); + if (message.buildTags != null && Object.hasOwnProperty.call(message, "buildTags")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.buildTags); + if (message.goVersion != null && Object.hasOwnProperty.call(message, "goVersion")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.goVersion); + if (message.buildDeps != null && message.buildDeps.length) + for (let i = 0; i < message.buildDeps.length; ++i) + $root.cosmos.base.tendermint.v1beta1.Module.encode(message.buildDeps[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified VersionInfo message, length delimited. Does not implicitly {@link cosmos.base.tendermint.v1beta1.VersionInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.base.tendermint.v1beta1.VersionInfo + * @static + * @param {cosmos.base.tendermint.v1beta1.IVersionInfo} message VersionInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VersionInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VersionInfo message from the specified reader or buffer. + * @function decode + * @memberof cosmos.base.tendermint.v1beta1.VersionInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.base.tendermint.v1beta1.VersionInfo} VersionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VersionInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.tendermint.v1beta1.VersionInfo(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.appName = reader.string(); + break; + case 3: + message.version = reader.string(); + break; + case 4: + message.gitCommit = reader.string(); + break; + case 5: + message.buildTags = reader.string(); + break; + case 6: + message.goVersion = reader.string(); + break; + case 7: + if (!(message.buildDeps && message.buildDeps.length)) + message.buildDeps = []; + message.buildDeps.push($root.cosmos.base.tendermint.v1beta1.Module.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VersionInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.base.tendermint.v1beta1.VersionInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.base.tendermint.v1beta1.VersionInfo} VersionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VersionInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VersionInfo message. + * @function verify + * @memberof cosmos.base.tendermint.v1beta1.VersionInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VersionInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.appName != null && message.hasOwnProperty("appName")) + if (!$util.isString(message.appName)) + return "appName: string expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.gitCommit != null && message.hasOwnProperty("gitCommit")) + if (!$util.isString(message.gitCommit)) + return "gitCommit: string expected"; + if (message.buildTags != null && message.hasOwnProperty("buildTags")) + if (!$util.isString(message.buildTags)) + return "buildTags: string expected"; + if (message.goVersion != null && message.hasOwnProperty("goVersion")) + if (!$util.isString(message.goVersion)) + return "goVersion: string expected"; + if (message.buildDeps != null && message.hasOwnProperty("buildDeps")) { + if (!Array.isArray(message.buildDeps)) + return "buildDeps: array expected"; + for (let i = 0; i < message.buildDeps.length; ++i) { + let error = $root.cosmos.base.tendermint.v1beta1.Module.verify(message.buildDeps[i]); + if (error) + return "buildDeps." + error; + } + } + return null; + }; + + /** + * Creates a VersionInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.base.tendermint.v1beta1.VersionInfo + * @static + * @param {Object.} object Plain object + * @returns {cosmos.base.tendermint.v1beta1.VersionInfo} VersionInfo + */ + VersionInfo.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.base.tendermint.v1beta1.VersionInfo) + return object; + let message = new $root.cosmos.base.tendermint.v1beta1.VersionInfo(); + if (object.name != null) + message.name = String(object.name); + if (object.appName != null) + message.appName = String(object.appName); + if (object.version != null) + message.version = String(object.version); + if (object.gitCommit != null) + message.gitCommit = String(object.gitCommit); + if (object.buildTags != null) + message.buildTags = String(object.buildTags); + if (object.goVersion != null) + message.goVersion = String(object.goVersion); + if (object.buildDeps) { + if (!Array.isArray(object.buildDeps)) + throw TypeError(".cosmos.base.tendermint.v1beta1.VersionInfo.buildDeps: array expected"); + message.buildDeps = []; + for (let i = 0; i < object.buildDeps.length; ++i) { + if (typeof object.buildDeps[i] !== "object") + throw TypeError(".cosmos.base.tendermint.v1beta1.VersionInfo.buildDeps: object expected"); + message.buildDeps[i] = $root.cosmos.base.tendermint.v1beta1.Module.fromObject(object.buildDeps[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a VersionInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.base.tendermint.v1beta1.VersionInfo + * @static + * @param {cosmos.base.tendermint.v1beta1.VersionInfo} message VersionInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VersionInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.buildDeps = []; + if (options.defaults) { + object.name = ""; + object.appName = ""; + object.version = ""; + object.gitCommit = ""; + object.buildTags = ""; + object.goVersion = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.appName != null && message.hasOwnProperty("appName")) + object.appName = message.appName; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.gitCommit != null && message.hasOwnProperty("gitCommit")) + object.gitCommit = message.gitCommit; + if (message.buildTags != null && message.hasOwnProperty("buildTags")) + object.buildTags = message.buildTags; + if (message.goVersion != null && message.hasOwnProperty("goVersion")) + object.goVersion = message.goVersion; + if (message.buildDeps && message.buildDeps.length) { + object.buildDeps = []; + for (let j = 0; j < message.buildDeps.length; ++j) + object.buildDeps[j] = $root.cosmos.base.tendermint.v1beta1.Module.toObject(message.buildDeps[j], options); + } + return object; + }; + + /** + * Converts this VersionInfo to JSON. + * @function toJSON + * @memberof cosmos.base.tendermint.v1beta1.VersionInfo + * @instance + * @returns {Object.} JSON object + */ + VersionInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return VersionInfo; + })(v1beta1.VersionInfo || {}); + + v1beta1.Module = (function(Module) { + + /** + * Properties of a Module. + * @memberof cosmos.base.tendermint.v1beta1 + * @interface IModule + * @property {string|null} [path] Module path + * @property {string|null} [version] Module version + * @property {string|null} [sum] Module sum + */ + + /** + * Constructs a new Module. + * @memberof cosmos.base.tendermint.v1beta1 + * @classdesc Represents a Module. + * @implements IModule + * @constructor + * @param {cosmos.base.tendermint.v1beta1.IModule=} [properties] Properties to set + */ + function Module(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Module path. + * @member {string} path + * @memberof cosmos.base.tendermint.v1beta1.Module + * @instance + */ + Module.prototype.path = ""; + + /** + * Module version. + * @member {string} version + * @memberof cosmos.base.tendermint.v1beta1.Module + * @instance + */ + Module.prototype.version = ""; + + /** + * Module sum. + * @member {string} sum + * @memberof cosmos.base.tendermint.v1beta1.Module + * @instance + */ + Module.prototype.sum = ""; + + /** + * Creates a new Module instance using the specified properties. + * @function create + * @memberof cosmos.base.tendermint.v1beta1.Module + * @static + * @param {cosmos.base.tendermint.v1beta1.IModule=} [properties] Properties to set + * @returns {cosmos.base.tendermint.v1beta1.Module} Module instance + */ + Module.create = function create(properties) { + return new Module(properties); + }; + + /** + * Encodes the specified Module message. Does not implicitly {@link cosmos.base.tendermint.v1beta1.Module.verify|verify} messages. + * @function encode + * @memberof cosmos.base.tendermint.v1beta1.Module + * @static + * @param {cosmos.base.tendermint.v1beta1.IModule} message Module message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Module.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.path); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.version); + if (message.sum != null && Object.hasOwnProperty.call(message, "sum")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.sum); + return writer; + }; + + /** + * Encodes the specified Module message, length delimited. Does not implicitly {@link cosmos.base.tendermint.v1beta1.Module.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.base.tendermint.v1beta1.Module + * @static + * @param {cosmos.base.tendermint.v1beta1.IModule} message Module message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Module.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Module message from the specified reader or buffer. + * @function decode + * @memberof cosmos.base.tendermint.v1beta1.Module + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.base.tendermint.v1beta1.Module} Module + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Module.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.tendermint.v1beta1.Module(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.path = reader.string(); + break; + case 2: + message.version = reader.string(); + break; + case 3: + message.sum = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Module message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.base.tendermint.v1beta1.Module + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.base.tendermint.v1beta1.Module} Module + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Module.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Module message. + * @function verify + * @memberof cosmos.base.tendermint.v1beta1.Module + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Module.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.sum != null && message.hasOwnProperty("sum")) + if (!$util.isString(message.sum)) + return "sum: string expected"; + return null; + }; + + /** + * Creates a Module message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.base.tendermint.v1beta1.Module + * @static + * @param {Object.} object Plain object + * @returns {cosmos.base.tendermint.v1beta1.Module} Module + */ + Module.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.base.tendermint.v1beta1.Module) + return object; + let message = new $root.cosmos.base.tendermint.v1beta1.Module(); + if (object.path != null) + message.path = String(object.path); + if (object.version != null) + message.version = String(object.version); + if (object.sum != null) + message.sum = String(object.sum); + return message; + }; + + /** + * Creates a plain object from a Module message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.base.tendermint.v1beta1.Module + * @static + * @param {cosmos.base.tendermint.v1beta1.Module} message Module + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Module.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.path = ""; + object.version = ""; + object.sum = ""; + } + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.sum != null && message.hasOwnProperty("sum")) + object.sum = message.sum; + return object; + }; + + /** + * Converts this Module to JSON. + * @function toJSON + * @memberof cosmos.base.tendermint.v1beta1.Module + * @instance + * @returns {Object.} JSON object + */ + Module.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Module; + })(v1beta1.Module || {}); + + return v1beta1; + })(tendermint.v1beta1 || {}); + + return tendermint; + })(base.tendermint || {}); + + /** + * Namespace v1beta1. + * @memberof cosmos.base + * @namespace + */ + + base.v1beta1 = (function(v1beta1) { + + v1beta1.Coin = (function(Coin) { + + /** + * Properties of a Coin. + * @memberof cosmos.base.v1beta1 + * @interface ICoin + * @property {string|null} [denom] Coin denom + * @property {string|null} [amount] Coin amount + */ + + /** + * Constructs a new Coin. + * @memberof cosmos.base.v1beta1 + * @classdesc Represents a Coin. + * @implements ICoin + * @constructor + * @param {cosmos.base.v1beta1.ICoin=} [properties] Properties to set + */ + function Coin(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Coin denom. + * @member {string} denom + * @memberof cosmos.base.v1beta1.Coin + * @instance + */ + Coin.prototype.denom = ""; + + /** + * Coin amount. + * @member {string} amount + * @memberof cosmos.base.v1beta1.Coin + * @instance + */ + Coin.prototype.amount = ""; + + /** + * Creates a new Coin instance using the specified properties. + * @function create + * @memberof cosmos.base.v1beta1.Coin + * @static + * @param {cosmos.base.v1beta1.ICoin=} [properties] Properties to set + * @returns {cosmos.base.v1beta1.Coin} Coin instance + */ + Coin.create = function create(properties) { + return new Coin(properties); + }; + + /** + * Encodes the specified Coin message. Does not implicitly {@link cosmos.base.v1beta1.Coin.verify|verify} messages. + * @function encode + * @memberof cosmos.base.v1beta1.Coin + * @static + * @param {cosmos.base.v1beta1.ICoin} message Coin message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Coin.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.denom != null && Object.hasOwnProperty.call(message, "denom")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.denom); + if (message.amount != null && Object.hasOwnProperty.call(message, "amount")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.amount); + return writer; + }; + + /** + * Encodes the specified Coin message, length delimited. Does not implicitly {@link cosmos.base.v1beta1.Coin.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.base.v1beta1.Coin + * @static + * @param {cosmos.base.v1beta1.ICoin} message Coin message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Coin.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Coin message from the specified reader or buffer. + * @function decode + * @memberof cosmos.base.v1beta1.Coin + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.base.v1beta1.Coin} Coin + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Coin.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.v1beta1.Coin(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.denom = reader.string(); + break; + case 2: + message.amount = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Coin message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.base.v1beta1.Coin + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.base.v1beta1.Coin} Coin + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Coin.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Coin message. + * @function verify + * @memberof cosmos.base.v1beta1.Coin + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Coin.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.denom != null && message.hasOwnProperty("denom")) + if (!$util.isString(message.denom)) + return "denom: string expected"; + if (message.amount != null && message.hasOwnProperty("amount")) + if (!$util.isString(message.amount)) + return "amount: string expected"; + return null; + }; + + /** + * Creates a Coin message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.base.v1beta1.Coin + * @static + * @param {Object.} object Plain object + * @returns {cosmos.base.v1beta1.Coin} Coin + */ + Coin.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.base.v1beta1.Coin) + return object; + let message = new $root.cosmos.base.v1beta1.Coin(); + if (object.denom != null) + message.denom = String(object.denom); + if (object.amount != null) + message.amount = String(object.amount); + return message; + }; + + /** + * Creates a plain object from a Coin message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.base.v1beta1.Coin + * @static + * @param {cosmos.base.v1beta1.Coin} message Coin + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Coin.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.denom = ""; + object.amount = ""; + } + if (message.denom != null && message.hasOwnProperty("denom")) + object.denom = message.denom; + if (message.amount != null && message.hasOwnProperty("amount")) + object.amount = message.amount; + return object; + }; + + /** + * Converts this Coin to JSON. + * @function toJSON + * @memberof cosmos.base.v1beta1.Coin + * @instance + * @returns {Object.} JSON object + */ + Coin.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Coin; + })(v1beta1.Coin || {}); + + v1beta1.DecCoin = (function(DecCoin) { + + /** + * Properties of a DecCoin. + * @memberof cosmos.base.v1beta1 + * @interface IDecCoin + * @property {string|null} [denom] DecCoin denom + * @property {string|null} [amount] DecCoin amount + */ + + /** + * Constructs a new DecCoin. + * @memberof cosmos.base.v1beta1 + * @classdesc Represents a DecCoin. + * @implements IDecCoin + * @constructor + * @param {cosmos.base.v1beta1.IDecCoin=} [properties] Properties to set + */ + function DecCoin(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DecCoin denom. + * @member {string} denom + * @memberof cosmos.base.v1beta1.DecCoin + * @instance + */ + DecCoin.prototype.denom = ""; + + /** + * DecCoin amount. + * @member {string} amount + * @memberof cosmos.base.v1beta1.DecCoin + * @instance + */ + DecCoin.prototype.amount = ""; + + /** + * Creates a new DecCoin instance using the specified properties. + * @function create + * @memberof cosmos.base.v1beta1.DecCoin + * @static + * @param {cosmos.base.v1beta1.IDecCoin=} [properties] Properties to set + * @returns {cosmos.base.v1beta1.DecCoin} DecCoin instance + */ + DecCoin.create = function create(properties) { + return new DecCoin(properties); + }; + + /** + * Encodes the specified DecCoin message. Does not implicitly {@link cosmos.base.v1beta1.DecCoin.verify|verify} messages. + * @function encode + * @memberof cosmos.base.v1beta1.DecCoin + * @static + * @param {cosmos.base.v1beta1.IDecCoin} message DecCoin message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DecCoin.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.denom != null && Object.hasOwnProperty.call(message, "denom")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.denom); + if (message.amount != null && Object.hasOwnProperty.call(message, "amount")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.amount); + return writer; + }; + + /** + * Encodes the specified DecCoin message, length delimited. Does not implicitly {@link cosmos.base.v1beta1.DecCoin.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.base.v1beta1.DecCoin + * @static + * @param {cosmos.base.v1beta1.IDecCoin} message DecCoin message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DecCoin.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DecCoin message from the specified reader or buffer. + * @function decode + * @memberof cosmos.base.v1beta1.DecCoin + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.base.v1beta1.DecCoin} DecCoin + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DecCoin.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.v1beta1.DecCoin(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.denom = reader.string(); + break; + case 2: + message.amount = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DecCoin message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.base.v1beta1.DecCoin + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.base.v1beta1.DecCoin} DecCoin + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DecCoin.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DecCoin message. + * @function verify + * @memberof cosmos.base.v1beta1.DecCoin + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DecCoin.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.denom != null && message.hasOwnProperty("denom")) + if (!$util.isString(message.denom)) + return "denom: string expected"; + if (message.amount != null && message.hasOwnProperty("amount")) + if (!$util.isString(message.amount)) + return "amount: string expected"; + return null; + }; + + /** + * Creates a DecCoin message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.base.v1beta1.DecCoin + * @static + * @param {Object.} object Plain object + * @returns {cosmos.base.v1beta1.DecCoin} DecCoin + */ + DecCoin.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.base.v1beta1.DecCoin) + return object; + let message = new $root.cosmos.base.v1beta1.DecCoin(); + if (object.denom != null) + message.denom = String(object.denom); + if (object.amount != null) + message.amount = String(object.amount); + return message; + }; + + /** + * Creates a plain object from a DecCoin message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.base.v1beta1.DecCoin + * @static + * @param {cosmos.base.v1beta1.DecCoin} message DecCoin + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DecCoin.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.denom = ""; + object.amount = ""; + } + if (message.denom != null && message.hasOwnProperty("denom")) + object.denom = message.denom; + if (message.amount != null && message.hasOwnProperty("amount")) + object.amount = message.amount; + return object; + }; + + /** + * Converts this DecCoin to JSON. + * @function toJSON + * @memberof cosmos.base.v1beta1.DecCoin + * @instance + * @returns {Object.} JSON object + */ + DecCoin.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DecCoin; + })(v1beta1.DecCoin || {}); + + v1beta1.IntProto = (function(IntProto) { + + /** + * Properties of an IntProto. + * @memberof cosmos.base.v1beta1 + * @interface IIntProto + * @property {string|null} [int] IntProto int + */ + + /** + * Constructs a new IntProto. + * @memberof cosmos.base.v1beta1 + * @classdesc Represents an IntProto. + * @implements IIntProto + * @constructor + * @param {cosmos.base.v1beta1.IIntProto=} [properties] Properties to set + */ + function IntProto(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * IntProto int. + * @member {string} int + * @memberof cosmos.base.v1beta1.IntProto + * @instance + */ + IntProto.prototype.int = ""; + + /** + * Creates a new IntProto instance using the specified properties. + * @function create + * @memberof cosmos.base.v1beta1.IntProto + * @static + * @param {cosmos.base.v1beta1.IIntProto=} [properties] Properties to set + * @returns {cosmos.base.v1beta1.IntProto} IntProto instance + */ + IntProto.create = function create(properties) { + return new IntProto(properties); + }; + + /** + * Encodes the specified IntProto message. Does not implicitly {@link cosmos.base.v1beta1.IntProto.verify|verify} messages. + * @function encode + * @memberof cosmos.base.v1beta1.IntProto + * @static + * @param {cosmos.base.v1beta1.IIntProto} message IntProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IntProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.int != null && Object.hasOwnProperty.call(message, "int")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.int); + return writer; + }; + + /** + * Encodes the specified IntProto message, length delimited. Does not implicitly {@link cosmos.base.v1beta1.IntProto.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.base.v1beta1.IntProto + * @static + * @param {cosmos.base.v1beta1.IIntProto} message IntProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IntProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IntProto message from the specified reader or buffer. + * @function decode + * @memberof cosmos.base.v1beta1.IntProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.base.v1beta1.IntProto} IntProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IntProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.v1beta1.IntProto(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.int = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IntProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.base.v1beta1.IntProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.base.v1beta1.IntProto} IntProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IntProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IntProto message. + * @function verify + * @memberof cosmos.base.v1beta1.IntProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IntProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.int != null && message.hasOwnProperty("int")) + if (!$util.isString(message.int)) + return "int: string expected"; + return null; + }; + + /** + * Creates an IntProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.base.v1beta1.IntProto + * @static + * @param {Object.} object Plain object + * @returns {cosmos.base.v1beta1.IntProto} IntProto + */ + IntProto.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.base.v1beta1.IntProto) + return object; + let message = new $root.cosmos.base.v1beta1.IntProto(); + if (object.int != null) + message.int = String(object.int); + return message; + }; + + /** + * Creates a plain object from an IntProto message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.base.v1beta1.IntProto + * @static + * @param {cosmos.base.v1beta1.IntProto} message IntProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IntProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.int = ""; + if (message.int != null && message.hasOwnProperty("int")) + object.int = message.int; + return object; + }; + + /** + * Converts this IntProto to JSON. + * @function toJSON + * @memberof cosmos.base.v1beta1.IntProto + * @instance + * @returns {Object.} JSON object + */ + IntProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return IntProto; + })(v1beta1.IntProto || {}); + + v1beta1.DecProto = (function(DecProto) { + + /** + * Properties of a DecProto. + * @memberof cosmos.base.v1beta1 + * @interface IDecProto + * @property {string|null} [dec] DecProto dec + */ + + /** + * Constructs a new DecProto. + * @memberof cosmos.base.v1beta1 + * @classdesc Represents a DecProto. + * @implements IDecProto + * @constructor + * @param {cosmos.base.v1beta1.IDecProto=} [properties] Properties to set + */ + function DecProto(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DecProto dec. + * @member {string} dec + * @memberof cosmos.base.v1beta1.DecProto + * @instance + */ + DecProto.prototype.dec = ""; + + /** + * Creates a new DecProto instance using the specified properties. + * @function create + * @memberof cosmos.base.v1beta1.DecProto + * @static + * @param {cosmos.base.v1beta1.IDecProto=} [properties] Properties to set + * @returns {cosmos.base.v1beta1.DecProto} DecProto instance + */ + DecProto.create = function create(properties) { + return new DecProto(properties); + }; + + /** + * Encodes the specified DecProto message. Does not implicitly {@link cosmos.base.v1beta1.DecProto.verify|verify} messages. + * @function encode + * @memberof cosmos.base.v1beta1.DecProto + * @static + * @param {cosmos.base.v1beta1.IDecProto} message DecProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DecProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dec != null && Object.hasOwnProperty.call(message, "dec")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.dec); + return writer; + }; + + /** + * Encodes the specified DecProto message, length delimited. Does not implicitly {@link cosmos.base.v1beta1.DecProto.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.base.v1beta1.DecProto + * @static + * @param {cosmos.base.v1beta1.IDecProto} message DecProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DecProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DecProto message from the specified reader or buffer. + * @function decode + * @memberof cosmos.base.v1beta1.DecProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.base.v1beta1.DecProto} DecProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DecProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.v1beta1.DecProto(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.dec = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DecProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.base.v1beta1.DecProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.base.v1beta1.DecProto} DecProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DecProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DecProto message. + * @function verify + * @memberof cosmos.base.v1beta1.DecProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DecProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dec != null && message.hasOwnProperty("dec")) + if (!$util.isString(message.dec)) + return "dec: string expected"; + return null; + }; + + /** + * Creates a DecProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.base.v1beta1.DecProto + * @static + * @param {Object.} object Plain object + * @returns {cosmos.base.v1beta1.DecProto} DecProto + */ + DecProto.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.base.v1beta1.DecProto) + return object; + let message = new $root.cosmos.base.v1beta1.DecProto(); + if (object.dec != null) + message.dec = String(object.dec); + return message; + }; + + /** + * Creates a plain object from a DecProto message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.base.v1beta1.DecProto + * @static + * @param {cosmos.base.v1beta1.DecProto} message DecProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DecProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.dec = ""; + if (message.dec != null && message.hasOwnProperty("dec")) + object.dec = message.dec; + return object; + }; + + /** + * Converts this DecProto to JSON. + * @function toJSON + * @memberof cosmos.base.v1beta1.DecProto + * @instance + * @returns {Object.} JSON object + */ + DecProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DecProto; + })(v1beta1.DecProto || {}); + + return v1beta1; + })(base.v1beta1 || {}); + + return base; + })(cosmos.base || {}); + + /** + * Namespace capability. + * @memberof cosmos + * @namespace + */ + + cosmos.capability = (function(capability) { + + /** + * Namespace v1beta1. + * @memberof cosmos.capability + * @namespace + */ + + capability.v1beta1 = (function(v1beta1) { + + v1beta1.Capability = (function(Capability) { + + /** + * Properties of a Capability. + * @memberof cosmos.capability.v1beta1 + * @interface ICapability + * @property {number|Long|null} [index] Capability index + */ + + /** + * Constructs a new Capability. + * @memberof cosmos.capability.v1beta1 + * @classdesc Represents a Capability. + * @implements ICapability + * @constructor + * @param {cosmos.capability.v1beta1.ICapability=} [properties] Properties to set + */ + function Capability(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Capability index. + * @member {number|Long} index + * @memberof cosmos.capability.v1beta1.Capability + * @instance + */ + Capability.prototype.index = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new Capability instance using the specified properties. + * @function create + * @memberof cosmos.capability.v1beta1.Capability + * @static + * @param {cosmos.capability.v1beta1.ICapability=} [properties] Properties to set + * @returns {cosmos.capability.v1beta1.Capability} Capability instance + */ + Capability.create = function create(properties) { + return new Capability(properties); + }; + + /** + * Encodes the specified Capability message. Does not implicitly {@link cosmos.capability.v1beta1.Capability.verify|verify} messages. + * @function encode + * @memberof cosmos.capability.v1beta1.Capability + * @static + * @param {cosmos.capability.v1beta1.ICapability} message Capability message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Capability.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.index != null && Object.hasOwnProperty.call(message, "index")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.index); + return writer; + }; + + /** + * Encodes the specified Capability message, length delimited. Does not implicitly {@link cosmos.capability.v1beta1.Capability.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.capability.v1beta1.Capability + * @static + * @param {cosmos.capability.v1beta1.ICapability} message Capability message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Capability.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Capability message from the specified reader or buffer. + * @function decode + * @memberof cosmos.capability.v1beta1.Capability + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.capability.v1beta1.Capability} Capability + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Capability.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.capability.v1beta1.Capability(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.index = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Capability message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.capability.v1beta1.Capability + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.capability.v1beta1.Capability} Capability + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Capability.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Capability message. + * @function verify + * @memberof cosmos.capability.v1beta1.Capability + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Capability.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.index != null && message.hasOwnProperty("index")) + if (!$util.isInteger(message.index) && !(message.index && $util.isInteger(message.index.low) && $util.isInteger(message.index.high))) + return "index: integer|Long expected"; + return null; + }; + + /** + * Creates a Capability message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.capability.v1beta1.Capability + * @static + * @param {Object.} object Plain object + * @returns {cosmos.capability.v1beta1.Capability} Capability + */ + Capability.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.capability.v1beta1.Capability) + return object; + let message = new $root.cosmos.capability.v1beta1.Capability(); + if (object.index != null) + if ($util.Long) + (message.index = $util.Long.fromValue(object.index)).unsigned = true; + else if (typeof object.index === "string") + message.index = parseInt(object.index, 10); + else if (typeof object.index === "number") + message.index = object.index; + else if (typeof object.index === "object") + message.index = new $util.LongBits(object.index.low >>> 0, object.index.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a Capability message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.capability.v1beta1.Capability + * @static + * @param {cosmos.capability.v1beta1.Capability} message Capability + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Capability.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.index = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.index = options.longs === String ? "0" : 0; + if (message.index != null && message.hasOwnProperty("index")) + if (typeof message.index === "number") + object.index = options.longs === String ? String(message.index) : message.index; + else + object.index = options.longs === String ? $util.Long.prototype.toString.call(message.index) : options.longs === Number ? new $util.LongBits(message.index.low >>> 0, message.index.high >>> 0).toNumber(true) : message.index; + return object; + }; + + /** + * Converts this Capability to JSON. + * @function toJSON + * @memberof cosmos.capability.v1beta1.Capability + * @instance + * @returns {Object.} JSON object + */ + Capability.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Capability; + })(v1beta1.Capability || {}); + + v1beta1.Owner = (function(Owner) { + + /** + * Properties of an Owner. + * @memberof cosmos.capability.v1beta1 + * @interface IOwner + * @property {string|null} [module] Owner module + * @property {string|null} [name] Owner name + */ + + /** + * Constructs a new Owner. + * @memberof cosmos.capability.v1beta1 + * @classdesc Represents an Owner. + * @implements IOwner + * @constructor + * @param {cosmos.capability.v1beta1.IOwner=} [properties] Properties to set + */ + function Owner(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Owner module. + * @member {string} module + * @memberof cosmos.capability.v1beta1.Owner + * @instance + */ + Owner.prototype.module = ""; + + /** + * Owner name. + * @member {string} name + * @memberof cosmos.capability.v1beta1.Owner + * @instance + */ + Owner.prototype.name = ""; + + /** + * Creates a new Owner instance using the specified properties. + * @function create + * @memberof cosmos.capability.v1beta1.Owner + * @static + * @param {cosmos.capability.v1beta1.IOwner=} [properties] Properties to set + * @returns {cosmos.capability.v1beta1.Owner} Owner instance + */ + Owner.create = function create(properties) { + return new Owner(properties); + }; + + /** + * Encodes the specified Owner message. Does not implicitly {@link cosmos.capability.v1beta1.Owner.verify|verify} messages. + * @function encode + * @memberof cosmos.capability.v1beta1.Owner + * @static + * @param {cosmos.capability.v1beta1.IOwner} message Owner message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Owner.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.module != null && Object.hasOwnProperty.call(message, "module")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.module); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); + return writer; + }; + + /** + * Encodes the specified Owner message, length delimited. Does not implicitly {@link cosmos.capability.v1beta1.Owner.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.capability.v1beta1.Owner + * @static + * @param {cosmos.capability.v1beta1.IOwner} message Owner message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Owner.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Owner message from the specified reader or buffer. + * @function decode + * @memberof cosmos.capability.v1beta1.Owner + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.capability.v1beta1.Owner} Owner + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Owner.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.capability.v1beta1.Owner(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.module = reader.string(); + break; + case 2: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Owner message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.capability.v1beta1.Owner + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.capability.v1beta1.Owner} Owner + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Owner.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Owner message. + * @function verify + * @memberof cosmos.capability.v1beta1.Owner + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Owner.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.module != null && message.hasOwnProperty("module")) + if (!$util.isString(message.module)) + return "module: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates an Owner message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.capability.v1beta1.Owner + * @static + * @param {Object.} object Plain object + * @returns {cosmos.capability.v1beta1.Owner} Owner + */ + Owner.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.capability.v1beta1.Owner) + return object; + let message = new $root.cosmos.capability.v1beta1.Owner(); + if (object.module != null) + message.module = String(object.module); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from an Owner message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.capability.v1beta1.Owner + * @static + * @param {cosmos.capability.v1beta1.Owner} message Owner + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Owner.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.module = ""; + object.name = ""; + } + if (message.module != null && message.hasOwnProperty("module")) + object.module = message.module; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this Owner to JSON. + * @function toJSON + * @memberof cosmos.capability.v1beta1.Owner + * @instance + * @returns {Object.} JSON object + */ + Owner.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Owner; + })(v1beta1.Owner || {}); + + v1beta1.CapabilityOwners = (function(CapabilityOwners) { + + /** + * Properties of a CapabilityOwners. + * @memberof cosmos.capability.v1beta1 + * @interface ICapabilityOwners + * @property {Array.|null} [owners] CapabilityOwners owners + */ + + /** + * Constructs a new CapabilityOwners. + * @memberof cosmos.capability.v1beta1 + * @classdesc Represents a CapabilityOwners. + * @implements ICapabilityOwners + * @constructor + * @param {cosmos.capability.v1beta1.ICapabilityOwners=} [properties] Properties to set + */ + function CapabilityOwners(properties) { + this.owners = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CapabilityOwners owners. + * @member {Array.} owners + * @memberof cosmos.capability.v1beta1.CapabilityOwners + * @instance + */ + CapabilityOwners.prototype.owners = $util.emptyArray; + + /** + * Creates a new CapabilityOwners instance using the specified properties. + * @function create + * @memberof cosmos.capability.v1beta1.CapabilityOwners + * @static + * @param {cosmos.capability.v1beta1.ICapabilityOwners=} [properties] Properties to set + * @returns {cosmos.capability.v1beta1.CapabilityOwners} CapabilityOwners instance + */ + CapabilityOwners.create = function create(properties) { + return new CapabilityOwners(properties); + }; + + /** + * Encodes the specified CapabilityOwners message. Does not implicitly {@link cosmos.capability.v1beta1.CapabilityOwners.verify|verify} messages. + * @function encode + * @memberof cosmos.capability.v1beta1.CapabilityOwners + * @static + * @param {cosmos.capability.v1beta1.ICapabilityOwners} message CapabilityOwners message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CapabilityOwners.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.owners != null && message.owners.length) + for (let i = 0; i < message.owners.length; ++i) + $root.cosmos.capability.v1beta1.Owner.encode(message.owners[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CapabilityOwners message, length delimited. Does not implicitly {@link cosmos.capability.v1beta1.CapabilityOwners.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.capability.v1beta1.CapabilityOwners + * @static + * @param {cosmos.capability.v1beta1.ICapabilityOwners} message CapabilityOwners message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CapabilityOwners.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CapabilityOwners message from the specified reader or buffer. + * @function decode + * @memberof cosmos.capability.v1beta1.CapabilityOwners + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.capability.v1beta1.CapabilityOwners} CapabilityOwners + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CapabilityOwners.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.capability.v1beta1.CapabilityOwners(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.owners && message.owners.length)) + message.owners = []; + message.owners.push($root.cosmos.capability.v1beta1.Owner.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CapabilityOwners message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.capability.v1beta1.CapabilityOwners + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.capability.v1beta1.CapabilityOwners} CapabilityOwners + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CapabilityOwners.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CapabilityOwners message. + * @function verify + * @memberof cosmos.capability.v1beta1.CapabilityOwners + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CapabilityOwners.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.owners != null && message.hasOwnProperty("owners")) { + if (!Array.isArray(message.owners)) + return "owners: array expected"; + for (let i = 0; i < message.owners.length; ++i) { + let error = $root.cosmos.capability.v1beta1.Owner.verify(message.owners[i]); + if (error) + return "owners." + error; + } + } + return null; + }; + + /** + * Creates a CapabilityOwners message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.capability.v1beta1.CapabilityOwners + * @static + * @param {Object.} object Plain object + * @returns {cosmos.capability.v1beta1.CapabilityOwners} CapabilityOwners + */ + CapabilityOwners.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.capability.v1beta1.CapabilityOwners) + return object; + let message = new $root.cosmos.capability.v1beta1.CapabilityOwners(); + if (object.owners) { + if (!Array.isArray(object.owners)) + throw TypeError(".cosmos.capability.v1beta1.CapabilityOwners.owners: array expected"); + message.owners = []; + for (let i = 0; i < object.owners.length; ++i) { + if (typeof object.owners[i] !== "object") + throw TypeError(".cosmos.capability.v1beta1.CapabilityOwners.owners: object expected"); + message.owners[i] = $root.cosmos.capability.v1beta1.Owner.fromObject(object.owners[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a CapabilityOwners message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.capability.v1beta1.CapabilityOwners + * @static + * @param {cosmos.capability.v1beta1.CapabilityOwners} message CapabilityOwners + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CapabilityOwners.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.owners = []; + if (message.owners && message.owners.length) { + object.owners = []; + for (let j = 0; j < message.owners.length; ++j) + object.owners[j] = $root.cosmos.capability.v1beta1.Owner.toObject(message.owners[j], options); + } + return object; + }; + + /** + * Converts this CapabilityOwners to JSON. + * @function toJSON + * @memberof cosmos.capability.v1beta1.CapabilityOwners + * @instance + * @returns {Object.} JSON object + */ + CapabilityOwners.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CapabilityOwners; + })(v1beta1.CapabilityOwners || {}); + + v1beta1.GenesisOwners = (function(GenesisOwners) { + + /** + * Properties of a GenesisOwners. + * @memberof cosmos.capability.v1beta1 + * @interface IGenesisOwners + * @property {number|Long|null} [index] GenesisOwners index + * @property {cosmos.capability.v1beta1.ICapabilityOwners|null} [indexOwners] GenesisOwners indexOwners + */ + + /** + * Constructs a new GenesisOwners. + * @memberof cosmos.capability.v1beta1 + * @classdesc Represents a GenesisOwners. + * @implements IGenesisOwners + * @constructor + * @param {cosmos.capability.v1beta1.IGenesisOwners=} [properties] Properties to set + */ + function GenesisOwners(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GenesisOwners index. + * @member {number|Long} index + * @memberof cosmos.capability.v1beta1.GenesisOwners + * @instance + */ + GenesisOwners.prototype.index = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * GenesisOwners indexOwners. + * @member {cosmos.capability.v1beta1.ICapabilityOwners|null|undefined} indexOwners + * @memberof cosmos.capability.v1beta1.GenesisOwners + * @instance + */ + GenesisOwners.prototype.indexOwners = null; + + /** + * Creates a new GenesisOwners instance using the specified properties. + * @function create + * @memberof cosmos.capability.v1beta1.GenesisOwners + * @static + * @param {cosmos.capability.v1beta1.IGenesisOwners=} [properties] Properties to set + * @returns {cosmos.capability.v1beta1.GenesisOwners} GenesisOwners instance + */ + GenesisOwners.create = function create(properties) { + return new GenesisOwners(properties); + }; + + /** + * Encodes the specified GenesisOwners message. Does not implicitly {@link cosmos.capability.v1beta1.GenesisOwners.verify|verify} messages. + * @function encode + * @memberof cosmos.capability.v1beta1.GenesisOwners + * @static + * @param {cosmos.capability.v1beta1.IGenesisOwners} message GenesisOwners message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenesisOwners.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.index != null && Object.hasOwnProperty.call(message, "index")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.index); + if (message.indexOwners != null && Object.hasOwnProperty.call(message, "indexOwners")) + $root.cosmos.capability.v1beta1.CapabilityOwners.encode(message.indexOwners, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GenesisOwners message, length delimited. Does not implicitly {@link cosmos.capability.v1beta1.GenesisOwners.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.capability.v1beta1.GenesisOwners + * @static + * @param {cosmos.capability.v1beta1.IGenesisOwners} message GenesisOwners message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenesisOwners.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GenesisOwners message from the specified reader or buffer. + * @function decode + * @memberof cosmos.capability.v1beta1.GenesisOwners + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.capability.v1beta1.GenesisOwners} GenesisOwners + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenesisOwners.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.capability.v1beta1.GenesisOwners(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.index = reader.uint64(); + break; + case 2: + message.indexOwners = $root.cosmos.capability.v1beta1.CapabilityOwners.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GenesisOwners message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.capability.v1beta1.GenesisOwners + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.capability.v1beta1.GenesisOwners} GenesisOwners + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenesisOwners.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GenesisOwners message. + * @function verify + * @memberof cosmos.capability.v1beta1.GenesisOwners + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GenesisOwners.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.index != null && message.hasOwnProperty("index")) + if (!$util.isInteger(message.index) && !(message.index && $util.isInteger(message.index.low) && $util.isInteger(message.index.high))) + return "index: integer|Long expected"; + if (message.indexOwners != null && message.hasOwnProperty("indexOwners")) { + let error = $root.cosmos.capability.v1beta1.CapabilityOwners.verify(message.indexOwners); + if (error) + return "indexOwners." + error; + } + return null; + }; + + /** + * Creates a GenesisOwners message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.capability.v1beta1.GenesisOwners + * @static + * @param {Object.} object Plain object + * @returns {cosmos.capability.v1beta1.GenesisOwners} GenesisOwners + */ + GenesisOwners.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.capability.v1beta1.GenesisOwners) + return object; + let message = new $root.cosmos.capability.v1beta1.GenesisOwners(); + if (object.index != null) + if ($util.Long) + (message.index = $util.Long.fromValue(object.index)).unsigned = true; + else if (typeof object.index === "string") + message.index = parseInt(object.index, 10); + else if (typeof object.index === "number") + message.index = object.index; + else if (typeof object.index === "object") + message.index = new $util.LongBits(object.index.low >>> 0, object.index.high >>> 0).toNumber(true); + if (object.indexOwners != null) { + if (typeof object.indexOwners !== "object") + throw TypeError(".cosmos.capability.v1beta1.GenesisOwners.indexOwners: object expected"); + message.indexOwners = $root.cosmos.capability.v1beta1.CapabilityOwners.fromObject(object.indexOwners); + } + return message; + }; + + /** + * Creates a plain object from a GenesisOwners message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.capability.v1beta1.GenesisOwners + * @static + * @param {cosmos.capability.v1beta1.GenesisOwners} message GenesisOwners + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GenesisOwners.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.index = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.index = options.longs === String ? "0" : 0; + object.indexOwners = null; + } + if (message.index != null && message.hasOwnProperty("index")) + if (typeof message.index === "number") + object.index = options.longs === String ? String(message.index) : message.index; + else + object.index = options.longs === String ? $util.Long.prototype.toString.call(message.index) : options.longs === Number ? new $util.LongBits(message.index.low >>> 0, message.index.high >>> 0).toNumber(true) : message.index; + if (message.indexOwners != null && message.hasOwnProperty("indexOwners")) + object.indexOwners = $root.cosmos.capability.v1beta1.CapabilityOwners.toObject(message.indexOwners, options); + return object; + }; + + /** + * Converts this GenesisOwners to JSON. + * @function toJSON + * @memberof cosmos.capability.v1beta1.GenesisOwners + * @instance + * @returns {Object.} JSON object + */ + GenesisOwners.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GenesisOwners; + })(v1beta1.GenesisOwners || {}); + + v1beta1.GenesisState = (function(GenesisState) { + + /** + * Properties of a GenesisState. + * @memberof cosmos.capability.v1beta1 + * @interface IGenesisState + * @property {number|Long|null} [index] GenesisState index + * @property {Array.|null} [owners] GenesisState owners + */ + + /** + * Constructs a new GenesisState. + * @memberof cosmos.capability.v1beta1 + * @classdesc Represents a GenesisState. + * @implements IGenesisState + * @constructor + * @param {cosmos.capability.v1beta1.IGenesisState=} [properties] Properties to set + */ + function GenesisState(properties) { + this.owners = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GenesisState index. + * @member {number|Long} index + * @memberof cosmos.capability.v1beta1.GenesisState + * @instance + */ + GenesisState.prototype.index = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * GenesisState owners. + * @member {Array.} owners + * @memberof cosmos.capability.v1beta1.GenesisState + * @instance + */ + GenesisState.prototype.owners = $util.emptyArray; + + /** + * Creates a new GenesisState instance using the specified properties. + * @function create + * @memberof cosmos.capability.v1beta1.GenesisState + * @static + * @param {cosmos.capability.v1beta1.IGenesisState=} [properties] Properties to set + * @returns {cosmos.capability.v1beta1.GenesisState} GenesisState instance + */ + GenesisState.create = function create(properties) { + return new GenesisState(properties); + }; + + /** + * Encodes the specified GenesisState message. Does not implicitly {@link cosmos.capability.v1beta1.GenesisState.verify|verify} messages. + * @function encode + * @memberof cosmos.capability.v1beta1.GenesisState + * @static + * @param {cosmos.capability.v1beta1.IGenesisState} message GenesisState message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenesisState.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.index != null && Object.hasOwnProperty.call(message, "index")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.index); + if (message.owners != null && message.owners.length) + for (let i = 0; i < message.owners.length; ++i) + $root.cosmos.capability.v1beta1.GenesisOwners.encode(message.owners[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GenesisState message, length delimited. Does not implicitly {@link cosmos.capability.v1beta1.GenesisState.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.capability.v1beta1.GenesisState + * @static + * @param {cosmos.capability.v1beta1.IGenesisState} message GenesisState message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenesisState.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GenesisState message from the specified reader or buffer. + * @function decode + * @memberof cosmos.capability.v1beta1.GenesisState + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.capability.v1beta1.GenesisState} GenesisState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenesisState.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.capability.v1beta1.GenesisState(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.index = reader.uint64(); + break; + case 2: + if (!(message.owners && message.owners.length)) + message.owners = []; + message.owners.push($root.cosmos.capability.v1beta1.GenesisOwners.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GenesisState message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.capability.v1beta1.GenesisState + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.capability.v1beta1.GenesisState} GenesisState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenesisState.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GenesisState message. + * @function verify + * @memberof cosmos.capability.v1beta1.GenesisState + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GenesisState.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.index != null && message.hasOwnProperty("index")) + if (!$util.isInteger(message.index) && !(message.index && $util.isInteger(message.index.low) && $util.isInteger(message.index.high))) + return "index: integer|Long expected"; + if (message.owners != null && message.hasOwnProperty("owners")) { + if (!Array.isArray(message.owners)) + return "owners: array expected"; + for (let i = 0; i < message.owners.length; ++i) { + let error = $root.cosmos.capability.v1beta1.GenesisOwners.verify(message.owners[i]); + if (error) + return "owners." + error; + } + } + return null; + }; + + /** + * Creates a GenesisState message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.capability.v1beta1.GenesisState + * @static + * @param {Object.} object Plain object + * @returns {cosmos.capability.v1beta1.GenesisState} GenesisState + */ + GenesisState.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.capability.v1beta1.GenesisState) + return object; + let message = new $root.cosmos.capability.v1beta1.GenesisState(); + if (object.index != null) + if ($util.Long) + (message.index = $util.Long.fromValue(object.index)).unsigned = true; + else if (typeof object.index === "string") + message.index = parseInt(object.index, 10); + else if (typeof object.index === "number") + message.index = object.index; + else if (typeof object.index === "object") + message.index = new $util.LongBits(object.index.low >>> 0, object.index.high >>> 0).toNumber(true); + if (object.owners) { + if (!Array.isArray(object.owners)) + throw TypeError(".cosmos.capability.v1beta1.GenesisState.owners: array expected"); + message.owners = []; + for (let i = 0; i < object.owners.length; ++i) { + if (typeof object.owners[i] !== "object") + throw TypeError(".cosmos.capability.v1beta1.GenesisState.owners: object expected"); + message.owners[i] = $root.cosmos.capability.v1beta1.GenesisOwners.fromObject(object.owners[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a GenesisState message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.capability.v1beta1.GenesisState + * @static + * @param {cosmos.capability.v1beta1.GenesisState} message GenesisState + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GenesisState.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.owners = []; + if (options.defaults) + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.index = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.index = options.longs === String ? "0" : 0; + if (message.index != null && message.hasOwnProperty("index")) + if (typeof message.index === "number") + object.index = options.longs === String ? String(message.index) : message.index; + else + object.index = options.longs === String ? $util.Long.prototype.toString.call(message.index) : options.longs === Number ? new $util.LongBits(message.index.low >>> 0, message.index.high >>> 0).toNumber(true) : message.index; + if (message.owners && message.owners.length) { + object.owners = []; + for (let j = 0; j < message.owners.length; ++j) + object.owners[j] = $root.cosmos.capability.v1beta1.GenesisOwners.toObject(message.owners[j], options); + } + return object; + }; + + /** + * Converts this GenesisState to JSON. + * @function toJSON + * @memberof cosmos.capability.v1beta1.GenesisState + * @instance + * @returns {Object.} JSON object + */ + GenesisState.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GenesisState; + })(v1beta1.GenesisState || {}); + + return v1beta1; + })(capability.v1beta1 || {}); + + return capability; + })(cosmos.capability || {}); + + /** + * Namespace crisis. + * @memberof cosmos + * @namespace + */ + + cosmos.crisis = (function(crisis) { + + /** + * Namespace v1beta1. + * @memberof cosmos.crisis + * @namespace + */ + + crisis.v1beta1 = (function(v1beta1) { + + v1beta1.GenesisState = (function(GenesisState) { + + /** + * Properties of a GenesisState. + * @memberof cosmos.crisis.v1beta1 + * @interface IGenesisState + * @property {cosmos.base.v1beta1.ICoin|null} [constantFee] GenesisState constantFee + */ + + /** + * Constructs a new GenesisState. + * @memberof cosmos.crisis.v1beta1 + * @classdesc Represents a GenesisState. + * @implements IGenesisState + * @constructor + * @param {cosmos.crisis.v1beta1.IGenesisState=} [properties] Properties to set + */ + function GenesisState(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GenesisState constantFee. + * @member {cosmos.base.v1beta1.ICoin|null|undefined} constantFee + * @memberof cosmos.crisis.v1beta1.GenesisState + * @instance + */ + GenesisState.prototype.constantFee = null; + + /** + * Creates a new GenesisState instance using the specified properties. + * @function create + * @memberof cosmos.crisis.v1beta1.GenesisState + * @static + * @param {cosmos.crisis.v1beta1.IGenesisState=} [properties] Properties to set + * @returns {cosmos.crisis.v1beta1.GenesisState} GenesisState instance + */ + GenesisState.create = function create(properties) { + return new GenesisState(properties); + }; + + /** + * Encodes the specified GenesisState message. Does not implicitly {@link cosmos.crisis.v1beta1.GenesisState.verify|verify} messages. + * @function encode + * @memberof cosmos.crisis.v1beta1.GenesisState + * @static + * @param {cosmos.crisis.v1beta1.IGenesisState} message GenesisState message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenesisState.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.constantFee != null && Object.hasOwnProperty.call(message, "constantFee")) + $root.cosmos.base.v1beta1.Coin.encode(message.constantFee, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GenesisState message, length delimited. Does not implicitly {@link cosmos.crisis.v1beta1.GenesisState.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.crisis.v1beta1.GenesisState + * @static + * @param {cosmos.crisis.v1beta1.IGenesisState} message GenesisState message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenesisState.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GenesisState message from the specified reader or buffer. + * @function decode + * @memberof cosmos.crisis.v1beta1.GenesisState + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.crisis.v1beta1.GenesisState} GenesisState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenesisState.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.crisis.v1beta1.GenesisState(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 3: + message.constantFee = $root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GenesisState message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.crisis.v1beta1.GenesisState + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.crisis.v1beta1.GenesisState} GenesisState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenesisState.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GenesisState message. + * @function verify + * @memberof cosmos.crisis.v1beta1.GenesisState + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GenesisState.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.constantFee != null && message.hasOwnProperty("constantFee")) { + let error = $root.cosmos.base.v1beta1.Coin.verify(message.constantFee); + if (error) + return "constantFee." + error; + } + return null; + }; + + /** + * Creates a GenesisState message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.crisis.v1beta1.GenesisState + * @static + * @param {Object.} object Plain object + * @returns {cosmos.crisis.v1beta1.GenesisState} GenesisState + */ + GenesisState.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.crisis.v1beta1.GenesisState) + return object; + let message = new $root.cosmos.crisis.v1beta1.GenesisState(); + if (object.constantFee != null) { + if (typeof object.constantFee !== "object") + throw TypeError(".cosmos.crisis.v1beta1.GenesisState.constantFee: object expected"); + message.constantFee = $root.cosmos.base.v1beta1.Coin.fromObject(object.constantFee); + } + return message; + }; + + /** + * Creates a plain object from a GenesisState message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.crisis.v1beta1.GenesisState + * @static + * @param {cosmos.crisis.v1beta1.GenesisState} message GenesisState + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GenesisState.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.constantFee = null; + if (message.constantFee != null && message.hasOwnProperty("constantFee")) + object.constantFee = $root.cosmos.base.v1beta1.Coin.toObject(message.constantFee, options); + return object; + }; + + /** + * Converts this GenesisState to JSON. + * @function toJSON + * @memberof cosmos.crisis.v1beta1.GenesisState + * @instance + * @returns {Object.} JSON object + */ + GenesisState.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GenesisState; + })(v1beta1.GenesisState || {}); + + v1beta1.Msg = (function(Msg) { + + /** + * Constructs a new Msg service. + * @memberof cosmos.crisis.v1beta1 + * @classdesc Represents a Msg + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Msg(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Msg.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Msg; + + /** + * Creates new Msg service using the specified rpc implementation. + * @function create + * @memberof cosmos.crisis.v1beta1.Msg + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Msg} RPC service. Useful where requests and/or responses are streamed. + */ + Msg.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link cosmos.crisis.v1beta1.Msg#verifyInvariant}. + * @memberof cosmos.crisis.v1beta1.Msg + * @typedef VerifyInvariantCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.crisis.v1beta1.IMsgVerifyInvariantResponse} [response] MsgVerifyInvariantResponse + */ + + /** + * Calls VerifyInvariant. + * @function verifyInvariant + * @memberof cosmos.crisis.v1beta1.Msg + * @instance + * @param {cosmos.crisis.v1beta1.IMsgVerifyInvariant} request MsgVerifyInvariant message or plain object + * @param {cosmos.crisis.v1beta1.Msg.VerifyInvariantCallback} callback Node-style callback called with the error, if any, and MsgVerifyInvariantResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Msg.prototype.verifyInvariant = function verifyInvariant(request, callback) { + return this.rpcCall(verifyInvariant, $root.cosmos.crisis.v1beta1.MsgVerifyInvariant, $root.cosmos.crisis.v1beta1.MsgVerifyInvariantResponse, request, callback); + }, "name", { value: "VerifyInvariant" }); + + /** + * Calls VerifyInvariant. + * @function verifyInvariant + * @memberof cosmos.crisis.v1beta1.Msg + * @instance + * @param {cosmos.crisis.v1beta1.IMsgVerifyInvariant} request MsgVerifyInvariant message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Msg; + })(v1beta1.Msg || {}); + + v1beta1.MsgVerifyInvariant = (function(MsgVerifyInvariant) { + + /** + * Properties of a MsgVerifyInvariant. + * @memberof cosmos.crisis.v1beta1 + * @interface IMsgVerifyInvariant + * @property {string|null} [sender] MsgVerifyInvariant sender + * @property {string|null} [invariantModuleName] MsgVerifyInvariant invariantModuleName + * @property {string|null} [invariantRoute] MsgVerifyInvariant invariantRoute + */ + + /** + * Constructs a new MsgVerifyInvariant. + * @memberof cosmos.crisis.v1beta1 + * @classdesc Represents a MsgVerifyInvariant. + * @implements IMsgVerifyInvariant + * @constructor + * @param {cosmos.crisis.v1beta1.IMsgVerifyInvariant=} [properties] Properties to set + */ + function MsgVerifyInvariant(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgVerifyInvariant sender. + * @member {string} sender + * @memberof cosmos.crisis.v1beta1.MsgVerifyInvariant + * @instance + */ + MsgVerifyInvariant.prototype.sender = ""; + + /** + * MsgVerifyInvariant invariantModuleName. + * @member {string} invariantModuleName + * @memberof cosmos.crisis.v1beta1.MsgVerifyInvariant + * @instance + */ + MsgVerifyInvariant.prototype.invariantModuleName = ""; + + /** + * MsgVerifyInvariant invariantRoute. + * @member {string} invariantRoute + * @memberof cosmos.crisis.v1beta1.MsgVerifyInvariant + * @instance + */ + MsgVerifyInvariant.prototype.invariantRoute = ""; + + /** + * Creates a new MsgVerifyInvariant instance using the specified properties. + * @function create + * @memberof cosmos.crisis.v1beta1.MsgVerifyInvariant + * @static + * @param {cosmos.crisis.v1beta1.IMsgVerifyInvariant=} [properties] Properties to set + * @returns {cosmos.crisis.v1beta1.MsgVerifyInvariant} MsgVerifyInvariant instance + */ + MsgVerifyInvariant.create = function create(properties) { + return new MsgVerifyInvariant(properties); + }; + + /** + * Encodes the specified MsgVerifyInvariant message. Does not implicitly {@link cosmos.crisis.v1beta1.MsgVerifyInvariant.verify|verify} messages. + * @function encode + * @memberof cosmos.crisis.v1beta1.MsgVerifyInvariant + * @static + * @param {cosmos.crisis.v1beta1.IMsgVerifyInvariant} message MsgVerifyInvariant message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgVerifyInvariant.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sender != null && Object.hasOwnProperty.call(message, "sender")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.sender); + if (message.invariantModuleName != null && Object.hasOwnProperty.call(message, "invariantModuleName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.invariantModuleName); + if (message.invariantRoute != null && Object.hasOwnProperty.call(message, "invariantRoute")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.invariantRoute); + return writer; + }; + + /** + * Encodes the specified MsgVerifyInvariant message, length delimited. Does not implicitly {@link cosmos.crisis.v1beta1.MsgVerifyInvariant.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.crisis.v1beta1.MsgVerifyInvariant + * @static + * @param {cosmos.crisis.v1beta1.IMsgVerifyInvariant} message MsgVerifyInvariant message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgVerifyInvariant.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgVerifyInvariant message from the specified reader or buffer. + * @function decode + * @memberof cosmos.crisis.v1beta1.MsgVerifyInvariant + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.crisis.v1beta1.MsgVerifyInvariant} MsgVerifyInvariant + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgVerifyInvariant.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.crisis.v1beta1.MsgVerifyInvariant(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.sender = reader.string(); + break; + case 2: + message.invariantModuleName = reader.string(); + break; + case 3: + message.invariantRoute = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgVerifyInvariant message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.crisis.v1beta1.MsgVerifyInvariant + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.crisis.v1beta1.MsgVerifyInvariant} MsgVerifyInvariant + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgVerifyInvariant.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgVerifyInvariant message. + * @function verify + * @memberof cosmos.crisis.v1beta1.MsgVerifyInvariant + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgVerifyInvariant.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sender != null && message.hasOwnProperty("sender")) + if (!$util.isString(message.sender)) + return "sender: string expected"; + if (message.invariantModuleName != null && message.hasOwnProperty("invariantModuleName")) + if (!$util.isString(message.invariantModuleName)) + return "invariantModuleName: string expected"; + if (message.invariantRoute != null && message.hasOwnProperty("invariantRoute")) + if (!$util.isString(message.invariantRoute)) + return "invariantRoute: string expected"; + return null; + }; + + /** + * Creates a MsgVerifyInvariant message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.crisis.v1beta1.MsgVerifyInvariant + * @static + * @param {Object.} object Plain object + * @returns {cosmos.crisis.v1beta1.MsgVerifyInvariant} MsgVerifyInvariant + */ + MsgVerifyInvariant.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.crisis.v1beta1.MsgVerifyInvariant) + return object; + let message = new $root.cosmos.crisis.v1beta1.MsgVerifyInvariant(); + if (object.sender != null) + message.sender = String(object.sender); + if (object.invariantModuleName != null) + message.invariantModuleName = String(object.invariantModuleName); + if (object.invariantRoute != null) + message.invariantRoute = String(object.invariantRoute); + return message; + }; + + /** + * Creates a plain object from a MsgVerifyInvariant message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.crisis.v1beta1.MsgVerifyInvariant + * @static + * @param {cosmos.crisis.v1beta1.MsgVerifyInvariant} message MsgVerifyInvariant + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgVerifyInvariant.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.sender = ""; + object.invariantModuleName = ""; + object.invariantRoute = ""; + } + if (message.sender != null && message.hasOwnProperty("sender")) + object.sender = message.sender; + if (message.invariantModuleName != null && message.hasOwnProperty("invariantModuleName")) + object.invariantModuleName = message.invariantModuleName; + if (message.invariantRoute != null && message.hasOwnProperty("invariantRoute")) + object.invariantRoute = message.invariantRoute; + return object; + }; + + /** + * Converts this MsgVerifyInvariant to JSON. + * @function toJSON + * @memberof cosmos.crisis.v1beta1.MsgVerifyInvariant + * @instance + * @returns {Object.} JSON object + */ + MsgVerifyInvariant.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgVerifyInvariant; + })(v1beta1.MsgVerifyInvariant || {}); + + v1beta1.MsgVerifyInvariantResponse = (function(MsgVerifyInvariantResponse) { + + /** + * Properties of a MsgVerifyInvariantResponse. + * @memberof cosmos.crisis.v1beta1 + * @interface IMsgVerifyInvariantResponse + */ + + /** + * Constructs a new MsgVerifyInvariantResponse. + * @memberof cosmos.crisis.v1beta1 + * @classdesc Represents a MsgVerifyInvariantResponse. + * @implements IMsgVerifyInvariantResponse + * @constructor + * @param {cosmos.crisis.v1beta1.IMsgVerifyInvariantResponse=} [properties] Properties to set + */ + function MsgVerifyInvariantResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new MsgVerifyInvariantResponse instance using the specified properties. + * @function create + * @memberof cosmos.crisis.v1beta1.MsgVerifyInvariantResponse + * @static + * @param {cosmos.crisis.v1beta1.IMsgVerifyInvariantResponse=} [properties] Properties to set + * @returns {cosmos.crisis.v1beta1.MsgVerifyInvariantResponse} MsgVerifyInvariantResponse instance + */ + MsgVerifyInvariantResponse.create = function create(properties) { + return new MsgVerifyInvariantResponse(properties); + }; + + /** + * Encodes the specified MsgVerifyInvariantResponse message. Does not implicitly {@link cosmos.crisis.v1beta1.MsgVerifyInvariantResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.crisis.v1beta1.MsgVerifyInvariantResponse + * @static + * @param {cosmos.crisis.v1beta1.IMsgVerifyInvariantResponse} message MsgVerifyInvariantResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgVerifyInvariantResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MsgVerifyInvariantResponse message, length delimited. Does not implicitly {@link cosmos.crisis.v1beta1.MsgVerifyInvariantResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.crisis.v1beta1.MsgVerifyInvariantResponse + * @static + * @param {cosmos.crisis.v1beta1.IMsgVerifyInvariantResponse} message MsgVerifyInvariantResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgVerifyInvariantResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgVerifyInvariantResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.crisis.v1beta1.MsgVerifyInvariantResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.crisis.v1beta1.MsgVerifyInvariantResponse} MsgVerifyInvariantResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgVerifyInvariantResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.crisis.v1beta1.MsgVerifyInvariantResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgVerifyInvariantResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.crisis.v1beta1.MsgVerifyInvariantResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.crisis.v1beta1.MsgVerifyInvariantResponse} MsgVerifyInvariantResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgVerifyInvariantResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgVerifyInvariantResponse message. + * @function verify + * @memberof cosmos.crisis.v1beta1.MsgVerifyInvariantResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgVerifyInvariantResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MsgVerifyInvariantResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.crisis.v1beta1.MsgVerifyInvariantResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.crisis.v1beta1.MsgVerifyInvariantResponse} MsgVerifyInvariantResponse + */ + MsgVerifyInvariantResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.crisis.v1beta1.MsgVerifyInvariantResponse) + return object; + return new $root.cosmos.crisis.v1beta1.MsgVerifyInvariantResponse(); + }; + + /** + * Creates a plain object from a MsgVerifyInvariantResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.crisis.v1beta1.MsgVerifyInvariantResponse + * @static + * @param {cosmos.crisis.v1beta1.MsgVerifyInvariantResponse} message MsgVerifyInvariantResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgVerifyInvariantResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MsgVerifyInvariantResponse to JSON. + * @function toJSON + * @memberof cosmos.crisis.v1beta1.MsgVerifyInvariantResponse + * @instance + * @returns {Object.} JSON object + */ + MsgVerifyInvariantResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgVerifyInvariantResponse; + })(v1beta1.MsgVerifyInvariantResponse || {}); + + return v1beta1; + })(crisis.v1beta1 || {}); + + return crisis; + })(cosmos.crisis || {}); + + /** + * Namespace crypto. + * @memberof cosmos + * @namespace + */ + + cosmos.crypto = (function(crypto) { + + /** + * Namespace ed25519. + * @memberof cosmos.crypto + * @namespace + */ + + crypto.ed25519 = (function(ed25519) { + + ed25519.PubKey = (function(PubKey) { + + /** + * Properties of a PubKey. + * @memberof cosmos.crypto.ed25519 + * @interface IPubKey + * @property {Uint8Array|null} [key] PubKey key + */ + + /** + * Constructs a new PubKey. + * @memberof cosmos.crypto.ed25519 + * @classdesc Represents a PubKey. + * @implements IPubKey + * @constructor + * @param {cosmos.crypto.ed25519.IPubKey=} [properties] Properties to set + */ + function PubKey(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PubKey key. + * @member {Uint8Array} key + * @memberof cosmos.crypto.ed25519.PubKey + * @instance + */ + PubKey.prototype.key = $util.newBuffer([]); + + /** + * Creates a new PubKey instance using the specified properties. + * @function create + * @memberof cosmos.crypto.ed25519.PubKey + * @static + * @param {cosmos.crypto.ed25519.IPubKey=} [properties] Properties to set + * @returns {cosmos.crypto.ed25519.PubKey} PubKey instance + */ + PubKey.create = function create(properties) { + return new PubKey(properties); + }; + + /** + * Encodes the specified PubKey message. Does not implicitly {@link cosmos.crypto.ed25519.PubKey.verify|verify} messages. + * @function encode + * @memberof cosmos.crypto.ed25519.PubKey + * @static + * @param {cosmos.crypto.ed25519.IPubKey} message PubKey message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PubKey.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.key); + return writer; + }; + + /** + * Encodes the specified PubKey message, length delimited. Does not implicitly {@link cosmos.crypto.ed25519.PubKey.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.crypto.ed25519.PubKey + * @static + * @param {cosmos.crypto.ed25519.IPubKey} message PubKey message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PubKey.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PubKey message from the specified reader or buffer. + * @function decode + * @memberof cosmos.crypto.ed25519.PubKey + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.crypto.ed25519.PubKey} PubKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PubKey.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.crypto.ed25519.PubKey(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.key = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PubKey message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.crypto.ed25519.PubKey + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.crypto.ed25519.PubKey} PubKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PubKey.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PubKey message. + * @function verify + * @memberof cosmos.crypto.ed25519.PubKey + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PubKey.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.key != null && message.hasOwnProperty("key")) + if (!(message.key && typeof message.key.length === "number" || $util.isString(message.key))) + return "key: buffer expected"; + return null; + }; + + /** + * Creates a PubKey message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.crypto.ed25519.PubKey + * @static + * @param {Object.} object Plain object + * @returns {cosmos.crypto.ed25519.PubKey} PubKey + */ + PubKey.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.crypto.ed25519.PubKey) + return object; + let message = new $root.cosmos.crypto.ed25519.PubKey(); + if (object.key != null) + if (typeof object.key === "string") + $util.base64.decode(object.key, message.key = $util.newBuffer($util.base64.length(object.key)), 0); + else if (object.key.length) + message.key = object.key; + return message; + }; + + /** + * Creates a plain object from a PubKey message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.crypto.ed25519.PubKey + * @static + * @param {cosmos.crypto.ed25519.PubKey} message PubKey + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PubKey.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + if (options.bytes === String) + object.key = ""; + else { + object.key = []; + if (options.bytes !== Array) + object.key = $util.newBuffer(object.key); + } + if (message.key != null && message.hasOwnProperty("key")) + object.key = options.bytes === String ? $util.base64.encode(message.key, 0, message.key.length) : options.bytes === Array ? Array.prototype.slice.call(message.key) : message.key; + return object; + }; + + /** + * Converts this PubKey to JSON. + * @function toJSON + * @memberof cosmos.crypto.ed25519.PubKey + * @instance + * @returns {Object.} JSON object + */ + PubKey.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PubKey; + })(ed25519.PubKey || {}); + + ed25519.PrivKey = (function(PrivKey) { + + /** + * Properties of a PrivKey. + * @memberof cosmos.crypto.ed25519 + * @interface IPrivKey + * @property {Uint8Array|null} [key] PrivKey key + */ + + /** + * Constructs a new PrivKey. + * @memberof cosmos.crypto.ed25519 + * @classdesc Represents a PrivKey. + * @implements IPrivKey + * @constructor + * @param {cosmos.crypto.ed25519.IPrivKey=} [properties] Properties to set + */ + function PrivKey(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PrivKey key. + * @member {Uint8Array} key + * @memberof cosmos.crypto.ed25519.PrivKey + * @instance + */ + PrivKey.prototype.key = $util.newBuffer([]); + + /** + * Creates a new PrivKey instance using the specified properties. + * @function create + * @memberof cosmos.crypto.ed25519.PrivKey + * @static + * @param {cosmos.crypto.ed25519.IPrivKey=} [properties] Properties to set + * @returns {cosmos.crypto.ed25519.PrivKey} PrivKey instance + */ + PrivKey.create = function create(properties) { + return new PrivKey(properties); + }; + + /** + * Encodes the specified PrivKey message. Does not implicitly {@link cosmos.crypto.ed25519.PrivKey.verify|verify} messages. + * @function encode + * @memberof cosmos.crypto.ed25519.PrivKey + * @static + * @param {cosmos.crypto.ed25519.IPrivKey} message PrivKey message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PrivKey.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.key); + return writer; + }; + + /** + * Encodes the specified PrivKey message, length delimited. Does not implicitly {@link cosmos.crypto.ed25519.PrivKey.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.crypto.ed25519.PrivKey + * @static + * @param {cosmos.crypto.ed25519.IPrivKey} message PrivKey message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PrivKey.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PrivKey message from the specified reader or buffer. + * @function decode + * @memberof cosmos.crypto.ed25519.PrivKey + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.crypto.ed25519.PrivKey} PrivKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PrivKey.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.crypto.ed25519.PrivKey(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.key = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PrivKey message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.crypto.ed25519.PrivKey + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.crypto.ed25519.PrivKey} PrivKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PrivKey.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PrivKey message. + * @function verify + * @memberof cosmos.crypto.ed25519.PrivKey + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PrivKey.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.key != null && message.hasOwnProperty("key")) + if (!(message.key && typeof message.key.length === "number" || $util.isString(message.key))) + return "key: buffer expected"; + return null; + }; + + /** + * Creates a PrivKey message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.crypto.ed25519.PrivKey + * @static + * @param {Object.} object Plain object + * @returns {cosmos.crypto.ed25519.PrivKey} PrivKey + */ + PrivKey.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.crypto.ed25519.PrivKey) + return object; + let message = new $root.cosmos.crypto.ed25519.PrivKey(); + if (object.key != null) + if (typeof object.key === "string") + $util.base64.decode(object.key, message.key = $util.newBuffer($util.base64.length(object.key)), 0); + else if (object.key.length) + message.key = object.key; + return message; + }; + + /** + * Creates a plain object from a PrivKey message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.crypto.ed25519.PrivKey + * @static + * @param {cosmos.crypto.ed25519.PrivKey} message PrivKey + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PrivKey.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + if (options.bytes === String) + object.key = ""; + else { + object.key = []; + if (options.bytes !== Array) + object.key = $util.newBuffer(object.key); + } + if (message.key != null && message.hasOwnProperty("key")) + object.key = options.bytes === String ? $util.base64.encode(message.key, 0, message.key.length) : options.bytes === Array ? Array.prototype.slice.call(message.key) : message.key; + return object; + }; + + /** + * Converts this PrivKey to JSON. + * @function toJSON + * @memberof cosmos.crypto.ed25519.PrivKey + * @instance + * @returns {Object.} JSON object + */ + PrivKey.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PrivKey; + })(ed25519.PrivKey || {}); + + return ed25519; + })(crypto.ed25519 || {}); + + /** + * Namespace multisig. + * @memberof cosmos.crypto + * @namespace + */ + + crypto.multisig = (function(multisig) { + + multisig.LegacyAminoPubKey = (function(LegacyAminoPubKey) { + + /** + * Properties of a LegacyAminoPubKey. + * @memberof cosmos.crypto.multisig + * @interface ILegacyAminoPubKey + * @property {number|null} [threshold] LegacyAminoPubKey threshold + * @property {Array.|null} [publicKeys] LegacyAminoPubKey publicKeys + */ + + /** + * Constructs a new LegacyAminoPubKey. + * @memberof cosmos.crypto.multisig + * @classdesc Represents a LegacyAminoPubKey. + * @implements ILegacyAminoPubKey + * @constructor + * @param {cosmos.crypto.multisig.ILegacyAminoPubKey=} [properties] Properties to set + */ + function LegacyAminoPubKey(properties) { + this.publicKeys = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LegacyAminoPubKey threshold. + * @member {number} threshold + * @memberof cosmos.crypto.multisig.LegacyAminoPubKey + * @instance + */ + LegacyAminoPubKey.prototype.threshold = 0; + + /** + * LegacyAminoPubKey publicKeys. + * @member {Array.} publicKeys + * @memberof cosmos.crypto.multisig.LegacyAminoPubKey + * @instance + */ + LegacyAminoPubKey.prototype.publicKeys = $util.emptyArray; + + /** + * Creates a new LegacyAminoPubKey instance using the specified properties. + * @function create + * @memberof cosmos.crypto.multisig.LegacyAminoPubKey + * @static + * @param {cosmos.crypto.multisig.ILegacyAminoPubKey=} [properties] Properties to set + * @returns {cosmos.crypto.multisig.LegacyAminoPubKey} LegacyAminoPubKey instance + */ + LegacyAminoPubKey.create = function create(properties) { + return new LegacyAminoPubKey(properties); + }; + + /** + * Encodes the specified LegacyAminoPubKey message. Does not implicitly {@link cosmos.crypto.multisig.LegacyAminoPubKey.verify|verify} messages. + * @function encode + * @memberof cosmos.crypto.multisig.LegacyAminoPubKey + * @static + * @param {cosmos.crypto.multisig.ILegacyAminoPubKey} message LegacyAminoPubKey message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LegacyAminoPubKey.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.threshold != null && Object.hasOwnProperty.call(message, "threshold")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.threshold); + if (message.publicKeys != null && message.publicKeys.length) + for (let i = 0; i < message.publicKeys.length; ++i) + $root.google.protobuf.Any.encode(message.publicKeys[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LegacyAminoPubKey message, length delimited. Does not implicitly {@link cosmos.crypto.multisig.LegacyAminoPubKey.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.crypto.multisig.LegacyAminoPubKey + * @static + * @param {cosmos.crypto.multisig.ILegacyAminoPubKey} message LegacyAminoPubKey message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LegacyAminoPubKey.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LegacyAminoPubKey message from the specified reader or buffer. + * @function decode + * @memberof cosmos.crypto.multisig.LegacyAminoPubKey + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.crypto.multisig.LegacyAminoPubKey} LegacyAminoPubKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LegacyAminoPubKey.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.crypto.multisig.LegacyAminoPubKey(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.threshold = reader.uint32(); + break; + case 2: + if (!(message.publicKeys && message.publicKeys.length)) + message.publicKeys = []; + message.publicKeys.push($root.google.protobuf.Any.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LegacyAminoPubKey message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.crypto.multisig.LegacyAminoPubKey + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.crypto.multisig.LegacyAminoPubKey} LegacyAminoPubKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LegacyAminoPubKey.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LegacyAminoPubKey message. + * @function verify + * @memberof cosmos.crypto.multisig.LegacyAminoPubKey + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LegacyAminoPubKey.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.threshold != null && message.hasOwnProperty("threshold")) + if (!$util.isInteger(message.threshold)) + return "threshold: integer expected"; + if (message.publicKeys != null && message.hasOwnProperty("publicKeys")) { + if (!Array.isArray(message.publicKeys)) + return "publicKeys: array expected"; + for (let i = 0; i < message.publicKeys.length; ++i) { + let error = $root.google.protobuf.Any.verify(message.publicKeys[i]); + if (error) + return "publicKeys." + error; + } + } + return null; + }; + + /** + * Creates a LegacyAminoPubKey message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.crypto.multisig.LegacyAminoPubKey + * @static + * @param {Object.} object Plain object + * @returns {cosmos.crypto.multisig.LegacyAminoPubKey} LegacyAminoPubKey + */ + LegacyAminoPubKey.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.crypto.multisig.LegacyAminoPubKey) + return object; + let message = new $root.cosmos.crypto.multisig.LegacyAminoPubKey(); + if (object.threshold != null) + message.threshold = object.threshold >>> 0; + if (object.publicKeys) { + if (!Array.isArray(object.publicKeys)) + throw TypeError(".cosmos.crypto.multisig.LegacyAminoPubKey.publicKeys: array expected"); + message.publicKeys = []; + for (let i = 0; i < object.publicKeys.length; ++i) { + if (typeof object.publicKeys[i] !== "object") + throw TypeError(".cosmos.crypto.multisig.LegacyAminoPubKey.publicKeys: object expected"); + message.publicKeys[i] = $root.google.protobuf.Any.fromObject(object.publicKeys[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a LegacyAminoPubKey message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.crypto.multisig.LegacyAminoPubKey + * @static + * @param {cosmos.crypto.multisig.LegacyAminoPubKey} message LegacyAminoPubKey + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LegacyAminoPubKey.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.publicKeys = []; + if (options.defaults) + object.threshold = 0; + if (message.threshold != null && message.hasOwnProperty("threshold")) + object.threshold = message.threshold; + if (message.publicKeys && message.publicKeys.length) { + object.publicKeys = []; + for (let j = 0; j < message.publicKeys.length; ++j) + object.publicKeys[j] = $root.google.protobuf.Any.toObject(message.publicKeys[j], options); + } + return object; + }; + + /** + * Converts this LegacyAminoPubKey to JSON. + * @function toJSON + * @memberof cosmos.crypto.multisig.LegacyAminoPubKey + * @instance + * @returns {Object.} JSON object + */ + LegacyAminoPubKey.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return LegacyAminoPubKey; + })(multisig.LegacyAminoPubKey || {}); + + /** + * Namespace v1beta1. + * @memberof cosmos.crypto.multisig + * @namespace + */ + + multisig.v1beta1 = (function(v1beta1) { + + v1beta1.MultiSignature = (function(MultiSignature) { + + /** + * Properties of a MultiSignature. + * @memberof cosmos.crypto.multisig.v1beta1 + * @interface IMultiSignature + * @property {Array.|null} [signatures] MultiSignature signatures + */ + + /** + * Constructs a new MultiSignature. + * @memberof cosmos.crypto.multisig.v1beta1 + * @classdesc Represents a MultiSignature. + * @implements IMultiSignature + * @constructor + * @param {cosmos.crypto.multisig.v1beta1.IMultiSignature=} [properties] Properties to set + */ + function MultiSignature(properties) { + this.signatures = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MultiSignature signatures. + * @member {Array.} signatures + * @memberof cosmos.crypto.multisig.v1beta1.MultiSignature + * @instance + */ + MultiSignature.prototype.signatures = $util.emptyArray; + + /** + * Creates a new MultiSignature instance using the specified properties. + * @function create + * @memberof cosmos.crypto.multisig.v1beta1.MultiSignature + * @static + * @param {cosmos.crypto.multisig.v1beta1.IMultiSignature=} [properties] Properties to set + * @returns {cosmos.crypto.multisig.v1beta1.MultiSignature} MultiSignature instance + */ + MultiSignature.create = function create(properties) { + return new MultiSignature(properties); + }; + + /** + * Encodes the specified MultiSignature message. Does not implicitly {@link cosmos.crypto.multisig.v1beta1.MultiSignature.verify|verify} messages. + * @function encode + * @memberof cosmos.crypto.multisig.v1beta1.MultiSignature + * @static + * @param {cosmos.crypto.multisig.v1beta1.IMultiSignature} message MultiSignature message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MultiSignature.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.signatures != null && message.signatures.length) + for (let i = 0; i < message.signatures.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.signatures[i]); + return writer; + }; + + /** + * Encodes the specified MultiSignature message, length delimited. Does not implicitly {@link cosmos.crypto.multisig.v1beta1.MultiSignature.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.crypto.multisig.v1beta1.MultiSignature + * @static + * @param {cosmos.crypto.multisig.v1beta1.IMultiSignature} message MultiSignature message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MultiSignature.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MultiSignature message from the specified reader or buffer. + * @function decode + * @memberof cosmos.crypto.multisig.v1beta1.MultiSignature + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.crypto.multisig.v1beta1.MultiSignature} MultiSignature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MultiSignature.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.crypto.multisig.v1beta1.MultiSignature(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.signatures && message.signatures.length)) + message.signatures = []; + message.signatures.push(reader.bytes()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MultiSignature message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.crypto.multisig.v1beta1.MultiSignature + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.crypto.multisig.v1beta1.MultiSignature} MultiSignature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MultiSignature.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MultiSignature message. + * @function verify + * @memberof cosmos.crypto.multisig.v1beta1.MultiSignature + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MultiSignature.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.signatures != null && message.hasOwnProperty("signatures")) { + if (!Array.isArray(message.signatures)) + return "signatures: array expected"; + for (let i = 0; i < message.signatures.length; ++i) + if (!(message.signatures[i] && typeof message.signatures[i].length === "number" || $util.isString(message.signatures[i]))) + return "signatures: buffer[] expected"; + } + return null; + }; + + /** + * Creates a MultiSignature message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.crypto.multisig.v1beta1.MultiSignature + * @static + * @param {Object.} object Plain object + * @returns {cosmos.crypto.multisig.v1beta1.MultiSignature} MultiSignature + */ + MultiSignature.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.crypto.multisig.v1beta1.MultiSignature) + return object; + let message = new $root.cosmos.crypto.multisig.v1beta1.MultiSignature(); + if (object.signatures) { + if (!Array.isArray(object.signatures)) + throw TypeError(".cosmos.crypto.multisig.v1beta1.MultiSignature.signatures: array expected"); + message.signatures = []; + for (let i = 0; i < object.signatures.length; ++i) + if (typeof object.signatures[i] === "string") + $util.base64.decode(object.signatures[i], message.signatures[i] = $util.newBuffer($util.base64.length(object.signatures[i])), 0); + else if (object.signatures[i].length) + message.signatures[i] = object.signatures[i]; + } + return message; + }; + + /** + * Creates a plain object from a MultiSignature message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.crypto.multisig.v1beta1.MultiSignature + * @static + * @param {cosmos.crypto.multisig.v1beta1.MultiSignature} message MultiSignature + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MultiSignature.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.signatures = []; + if (message.signatures && message.signatures.length) { + object.signatures = []; + for (let j = 0; j < message.signatures.length; ++j) + object.signatures[j] = options.bytes === String ? $util.base64.encode(message.signatures[j], 0, message.signatures[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.signatures[j]) : message.signatures[j]; + } + return object; + }; + + /** + * Converts this MultiSignature to JSON. + * @function toJSON + * @memberof cosmos.crypto.multisig.v1beta1.MultiSignature + * @instance + * @returns {Object.} JSON object + */ + MultiSignature.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MultiSignature; + })(v1beta1.MultiSignature || {}); + + v1beta1.CompactBitArray = (function(CompactBitArray) { + + /** + * Properties of a CompactBitArray. + * @memberof cosmos.crypto.multisig.v1beta1 + * @interface ICompactBitArray + * @property {number|null} [extraBitsStored] CompactBitArray extraBitsStored + * @property {Uint8Array|null} [elems] CompactBitArray elems + */ + + /** + * Constructs a new CompactBitArray. + * @memberof cosmos.crypto.multisig.v1beta1 + * @classdesc Represents a CompactBitArray. + * @implements ICompactBitArray + * @constructor + * @param {cosmos.crypto.multisig.v1beta1.ICompactBitArray=} [properties] Properties to set + */ + function CompactBitArray(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CompactBitArray extraBitsStored. + * @member {number} extraBitsStored + * @memberof cosmos.crypto.multisig.v1beta1.CompactBitArray + * @instance + */ + CompactBitArray.prototype.extraBitsStored = 0; + + /** + * CompactBitArray elems. + * @member {Uint8Array} elems + * @memberof cosmos.crypto.multisig.v1beta1.CompactBitArray + * @instance + */ + CompactBitArray.prototype.elems = $util.newBuffer([]); + + /** + * Creates a new CompactBitArray instance using the specified properties. + * @function create + * @memberof cosmos.crypto.multisig.v1beta1.CompactBitArray + * @static + * @param {cosmos.crypto.multisig.v1beta1.ICompactBitArray=} [properties] Properties to set + * @returns {cosmos.crypto.multisig.v1beta1.CompactBitArray} CompactBitArray instance + */ + CompactBitArray.create = function create(properties) { + return new CompactBitArray(properties); + }; + + /** + * Encodes the specified CompactBitArray message. Does not implicitly {@link cosmos.crypto.multisig.v1beta1.CompactBitArray.verify|verify} messages. + * @function encode + * @memberof cosmos.crypto.multisig.v1beta1.CompactBitArray + * @static + * @param {cosmos.crypto.multisig.v1beta1.ICompactBitArray} message CompactBitArray message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompactBitArray.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.extraBitsStored != null && Object.hasOwnProperty.call(message, "extraBitsStored")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.extraBitsStored); + if (message.elems != null && Object.hasOwnProperty.call(message, "elems")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.elems); + return writer; + }; + + /** + * Encodes the specified CompactBitArray message, length delimited. Does not implicitly {@link cosmos.crypto.multisig.v1beta1.CompactBitArray.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.crypto.multisig.v1beta1.CompactBitArray + * @static + * @param {cosmos.crypto.multisig.v1beta1.ICompactBitArray} message CompactBitArray message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompactBitArray.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CompactBitArray message from the specified reader or buffer. + * @function decode + * @memberof cosmos.crypto.multisig.v1beta1.CompactBitArray + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.crypto.multisig.v1beta1.CompactBitArray} CompactBitArray + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompactBitArray.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.crypto.multisig.v1beta1.CompactBitArray(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.extraBitsStored = reader.uint32(); + break; + case 2: + message.elems = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CompactBitArray message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.crypto.multisig.v1beta1.CompactBitArray + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.crypto.multisig.v1beta1.CompactBitArray} CompactBitArray + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompactBitArray.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CompactBitArray message. + * @function verify + * @memberof cosmos.crypto.multisig.v1beta1.CompactBitArray + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CompactBitArray.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.extraBitsStored != null && message.hasOwnProperty("extraBitsStored")) + if (!$util.isInteger(message.extraBitsStored)) + return "extraBitsStored: integer expected"; + if (message.elems != null && message.hasOwnProperty("elems")) + if (!(message.elems && typeof message.elems.length === "number" || $util.isString(message.elems))) + return "elems: buffer expected"; + return null; + }; + + /** + * Creates a CompactBitArray message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.crypto.multisig.v1beta1.CompactBitArray + * @static + * @param {Object.} object Plain object + * @returns {cosmos.crypto.multisig.v1beta1.CompactBitArray} CompactBitArray + */ + CompactBitArray.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.crypto.multisig.v1beta1.CompactBitArray) + return object; + let message = new $root.cosmos.crypto.multisig.v1beta1.CompactBitArray(); + if (object.extraBitsStored != null) + message.extraBitsStored = object.extraBitsStored >>> 0; + if (object.elems != null) + if (typeof object.elems === "string") + $util.base64.decode(object.elems, message.elems = $util.newBuffer($util.base64.length(object.elems)), 0); + else if (object.elems.length) + message.elems = object.elems; + return message; + }; + + /** + * Creates a plain object from a CompactBitArray message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.crypto.multisig.v1beta1.CompactBitArray + * @static + * @param {cosmos.crypto.multisig.v1beta1.CompactBitArray} message CompactBitArray + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CompactBitArray.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.extraBitsStored = 0; + if (options.bytes === String) + object.elems = ""; + else { + object.elems = []; + if (options.bytes !== Array) + object.elems = $util.newBuffer(object.elems); + } + } + if (message.extraBitsStored != null && message.hasOwnProperty("extraBitsStored")) + object.extraBitsStored = message.extraBitsStored; + if (message.elems != null && message.hasOwnProperty("elems")) + object.elems = options.bytes === String ? $util.base64.encode(message.elems, 0, message.elems.length) : options.bytes === Array ? Array.prototype.slice.call(message.elems) : message.elems; + return object; + }; + + /** + * Converts this CompactBitArray to JSON. + * @function toJSON + * @memberof cosmos.crypto.multisig.v1beta1.CompactBitArray + * @instance + * @returns {Object.} JSON object + */ + CompactBitArray.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CompactBitArray; + })(v1beta1.CompactBitArray || {}); + + return v1beta1; + })(multisig.v1beta1 || {}); + + return multisig; + })(crypto.multisig || {}); + + /** + * Namespace secp256k1. + * @memberof cosmos.crypto + * @namespace + */ + + crypto.secp256k1 = (function(secp256k1) { + + secp256k1.PubKey = (function(PubKey) { + + /** + * Properties of a PubKey. + * @memberof cosmos.crypto.secp256k1 + * @interface IPubKey + * @property {Uint8Array|null} [key] PubKey key + */ + + /** + * Constructs a new PubKey. + * @memberof cosmos.crypto.secp256k1 + * @classdesc Represents a PubKey. + * @implements IPubKey + * @constructor + * @param {cosmos.crypto.secp256k1.IPubKey=} [properties] Properties to set + */ + function PubKey(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PubKey key. + * @member {Uint8Array} key + * @memberof cosmos.crypto.secp256k1.PubKey + * @instance + */ + PubKey.prototype.key = $util.newBuffer([]); + + /** + * Creates a new PubKey instance using the specified properties. + * @function create + * @memberof cosmos.crypto.secp256k1.PubKey + * @static + * @param {cosmos.crypto.secp256k1.IPubKey=} [properties] Properties to set + * @returns {cosmos.crypto.secp256k1.PubKey} PubKey instance + */ + PubKey.create = function create(properties) { + return new PubKey(properties); + }; + + /** + * Encodes the specified PubKey message. Does not implicitly {@link cosmos.crypto.secp256k1.PubKey.verify|verify} messages. + * @function encode + * @memberof cosmos.crypto.secp256k1.PubKey + * @static + * @param {cosmos.crypto.secp256k1.IPubKey} message PubKey message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PubKey.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.key); + return writer; + }; + + /** + * Encodes the specified PubKey message, length delimited. Does not implicitly {@link cosmos.crypto.secp256k1.PubKey.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.crypto.secp256k1.PubKey + * @static + * @param {cosmos.crypto.secp256k1.IPubKey} message PubKey message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PubKey.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PubKey message from the specified reader or buffer. + * @function decode + * @memberof cosmos.crypto.secp256k1.PubKey + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.crypto.secp256k1.PubKey} PubKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PubKey.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.crypto.secp256k1.PubKey(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.key = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PubKey message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.crypto.secp256k1.PubKey + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.crypto.secp256k1.PubKey} PubKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PubKey.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PubKey message. + * @function verify + * @memberof cosmos.crypto.secp256k1.PubKey + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PubKey.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.key != null && message.hasOwnProperty("key")) + if (!(message.key && typeof message.key.length === "number" || $util.isString(message.key))) + return "key: buffer expected"; + return null; + }; + + /** + * Creates a PubKey message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.crypto.secp256k1.PubKey + * @static + * @param {Object.} object Plain object + * @returns {cosmos.crypto.secp256k1.PubKey} PubKey + */ + PubKey.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.crypto.secp256k1.PubKey) + return object; + let message = new $root.cosmos.crypto.secp256k1.PubKey(); + if (object.key != null) + if (typeof object.key === "string") + $util.base64.decode(object.key, message.key = $util.newBuffer($util.base64.length(object.key)), 0); + else if (object.key.length) + message.key = object.key; + return message; + }; + + /** + * Creates a plain object from a PubKey message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.crypto.secp256k1.PubKey + * @static + * @param {cosmos.crypto.secp256k1.PubKey} message PubKey + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PubKey.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + if (options.bytes === String) + object.key = ""; + else { + object.key = []; + if (options.bytes !== Array) + object.key = $util.newBuffer(object.key); + } + if (message.key != null && message.hasOwnProperty("key")) + object.key = options.bytes === String ? $util.base64.encode(message.key, 0, message.key.length) : options.bytes === Array ? Array.prototype.slice.call(message.key) : message.key; + return object; + }; + + /** + * Converts this PubKey to JSON. + * @function toJSON + * @memberof cosmos.crypto.secp256k1.PubKey + * @instance + * @returns {Object.} JSON object + */ + PubKey.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PubKey; + })(secp256k1.PubKey || {}); + + secp256k1.PrivKey = (function(PrivKey) { + + /** + * Properties of a PrivKey. + * @memberof cosmos.crypto.secp256k1 + * @interface IPrivKey + * @property {Uint8Array|null} [key] PrivKey key + */ + + /** + * Constructs a new PrivKey. + * @memberof cosmos.crypto.secp256k1 + * @classdesc Represents a PrivKey. + * @implements IPrivKey + * @constructor + * @param {cosmos.crypto.secp256k1.IPrivKey=} [properties] Properties to set + */ + function PrivKey(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PrivKey key. + * @member {Uint8Array} key + * @memberof cosmos.crypto.secp256k1.PrivKey + * @instance + */ + PrivKey.prototype.key = $util.newBuffer([]); + + /** + * Creates a new PrivKey instance using the specified properties. + * @function create + * @memberof cosmos.crypto.secp256k1.PrivKey + * @static + * @param {cosmos.crypto.secp256k1.IPrivKey=} [properties] Properties to set + * @returns {cosmos.crypto.secp256k1.PrivKey} PrivKey instance + */ + PrivKey.create = function create(properties) { + return new PrivKey(properties); + }; + + /** + * Encodes the specified PrivKey message. Does not implicitly {@link cosmos.crypto.secp256k1.PrivKey.verify|verify} messages. + * @function encode + * @memberof cosmos.crypto.secp256k1.PrivKey + * @static + * @param {cosmos.crypto.secp256k1.IPrivKey} message PrivKey message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PrivKey.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.key); + return writer; + }; + + /** + * Encodes the specified PrivKey message, length delimited. Does not implicitly {@link cosmos.crypto.secp256k1.PrivKey.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.crypto.secp256k1.PrivKey + * @static + * @param {cosmos.crypto.secp256k1.IPrivKey} message PrivKey message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PrivKey.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PrivKey message from the specified reader or buffer. + * @function decode + * @memberof cosmos.crypto.secp256k1.PrivKey + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.crypto.secp256k1.PrivKey} PrivKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PrivKey.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.crypto.secp256k1.PrivKey(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.key = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PrivKey message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.crypto.secp256k1.PrivKey + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.crypto.secp256k1.PrivKey} PrivKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PrivKey.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PrivKey message. + * @function verify + * @memberof cosmos.crypto.secp256k1.PrivKey + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PrivKey.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.key != null && message.hasOwnProperty("key")) + if (!(message.key && typeof message.key.length === "number" || $util.isString(message.key))) + return "key: buffer expected"; + return null; + }; + + /** + * Creates a PrivKey message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.crypto.secp256k1.PrivKey + * @static + * @param {Object.} object Plain object + * @returns {cosmos.crypto.secp256k1.PrivKey} PrivKey + */ + PrivKey.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.crypto.secp256k1.PrivKey) + return object; + let message = new $root.cosmos.crypto.secp256k1.PrivKey(); + if (object.key != null) + if (typeof object.key === "string") + $util.base64.decode(object.key, message.key = $util.newBuffer($util.base64.length(object.key)), 0); + else if (object.key.length) + message.key = object.key; + return message; + }; + + /** + * Creates a plain object from a PrivKey message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.crypto.secp256k1.PrivKey + * @static + * @param {cosmos.crypto.secp256k1.PrivKey} message PrivKey + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PrivKey.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + if (options.bytes === String) + object.key = ""; + else { + object.key = []; + if (options.bytes !== Array) + object.key = $util.newBuffer(object.key); + } + if (message.key != null && message.hasOwnProperty("key")) + object.key = options.bytes === String ? $util.base64.encode(message.key, 0, message.key.length) : options.bytes === Array ? Array.prototype.slice.call(message.key) : message.key; + return object; + }; + + /** + * Converts this PrivKey to JSON. + * @function toJSON + * @memberof cosmos.crypto.secp256k1.PrivKey + * @instance + * @returns {Object.} JSON object + */ + PrivKey.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PrivKey; + })(secp256k1.PrivKey || {}); + + return secp256k1; + })(crypto.secp256k1 || {}); + + return crypto; + })(cosmos.crypto || {}); + + /** + * Namespace distribution. + * @memberof cosmos + * @namespace + */ + + cosmos.distribution = (function(distribution) { + + /** + * Namespace v1beta1. + * @memberof cosmos.distribution + * @namespace + */ + + distribution.v1beta1 = (function(v1beta1) { + + v1beta1.Params = (function(Params) { + + /** + * Properties of a Params. + * @memberof cosmos.distribution.v1beta1 + * @interface IParams + * @property {string|null} [communityTax] Params communityTax + * @property {string|null} [baseProposerReward] Params baseProposerReward + * @property {string|null} [bonusProposerReward] Params bonusProposerReward + * @property {boolean|null} [withdrawAddrEnabled] Params withdrawAddrEnabled + */ + + /** + * Constructs a new Params. + * @memberof cosmos.distribution.v1beta1 + * @classdesc Represents a Params. + * @implements IParams + * @constructor + * @param {cosmos.distribution.v1beta1.IParams=} [properties] Properties to set + */ + function Params(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Params communityTax. + * @member {string} communityTax + * @memberof cosmos.distribution.v1beta1.Params + * @instance + */ + Params.prototype.communityTax = ""; + + /** + * Params baseProposerReward. + * @member {string} baseProposerReward + * @memberof cosmos.distribution.v1beta1.Params + * @instance + */ + Params.prototype.baseProposerReward = ""; + + /** + * Params bonusProposerReward. + * @member {string} bonusProposerReward + * @memberof cosmos.distribution.v1beta1.Params + * @instance + */ + Params.prototype.bonusProposerReward = ""; + + /** + * Params withdrawAddrEnabled. + * @member {boolean} withdrawAddrEnabled + * @memberof cosmos.distribution.v1beta1.Params + * @instance + */ + Params.prototype.withdrawAddrEnabled = false; + + /** + * Creates a new Params instance using the specified properties. + * @function create + * @memberof cosmos.distribution.v1beta1.Params + * @static + * @param {cosmos.distribution.v1beta1.IParams=} [properties] Properties to set + * @returns {cosmos.distribution.v1beta1.Params} Params instance + */ + Params.create = function create(properties) { + return new Params(properties); + }; + + /** + * Encodes the specified Params message. Does not implicitly {@link cosmos.distribution.v1beta1.Params.verify|verify} messages. + * @function encode + * @memberof cosmos.distribution.v1beta1.Params + * @static + * @param {cosmos.distribution.v1beta1.IParams} message Params message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Params.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.communityTax != null && Object.hasOwnProperty.call(message, "communityTax")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.communityTax); + if (message.baseProposerReward != null && Object.hasOwnProperty.call(message, "baseProposerReward")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.baseProposerReward); + if (message.bonusProposerReward != null && Object.hasOwnProperty.call(message, "bonusProposerReward")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.bonusProposerReward); + if (message.withdrawAddrEnabled != null && Object.hasOwnProperty.call(message, "withdrawAddrEnabled")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.withdrawAddrEnabled); + return writer; + }; + + /** + * Encodes the specified Params message, length delimited. Does not implicitly {@link cosmos.distribution.v1beta1.Params.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.distribution.v1beta1.Params + * @static + * @param {cosmos.distribution.v1beta1.IParams} message Params message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Params.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Params message from the specified reader or buffer. + * @function decode + * @memberof cosmos.distribution.v1beta1.Params + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.distribution.v1beta1.Params} Params + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Params.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.distribution.v1beta1.Params(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.communityTax = reader.string(); + break; + case 2: + message.baseProposerReward = reader.string(); + break; + case 3: + message.bonusProposerReward = reader.string(); + break; + case 4: + message.withdrawAddrEnabled = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Params message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.distribution.v1beta1.Params + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.distribution.v1beta1.Params} Params + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Params.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Params message. + * @function verify + * @memberof cosmos.distribution.v1beta1.Params + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Params.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.communityTax != null && message.hasOwnProperty("communityTax")) + if (!$util.isString(message.communityTax)) + return "communityTax: string expected"; + if (message.baseProposerReward != null && message.hasOwnProperty("baseProposerReward")) + if (!$util.isString(message.baseProposerReward)) + return "baseProposerReward: string expected"; + if (message.bonusProposerReward != null && message.hasOwnProperty("bonusProposerReward")) + if (!$util.isString(message.bonusProposerReward)) + return "bonusProposerReward: string expected"; + if (message.withdrawAddrEnabled != null && message.hasOwnProperty("withdrawAddrEnabled")) + if (typeof message.withdrawAddrEnabled !== "boolean") + return "withdrawAddrEnabled: boolean expected"; + return null; + }; + + /** + * Creates a Params message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.distribution.v1beta1.Params + * @static + * @param {Object.} object Plain object + * @returns {cosmos.distribution.v1beta1.Params} Params + */ + Params.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.distribution.v1beta1.Params) + return object; + let message = new $root.cosmos.distribution.v1beta1.Params(); + if (object.communityTax != null) + message.communityTax = String(object.communityTax); + if (object.baseProposerReward != null) + message.baseProposerReward = String(object.baseProposerReward); + if (object.bonusProposerReward != null) + message.bonusProposerReward = String(object.bonusProposerReward); + if (object.withdrawAddrEnabled != null) + message.withdrawAddrEnabled = Boolean(object.withdrawAddrEnabled); + return message; + }; + + /** + * Creates a plain object from a Params message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.distribution.v1beta1.Params + * @static + * @param {cosmos.distribution.v1beta1.Params} message Params + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Params.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.communityTax = ""; + object.baseProposerReward = ""; + object.bonusProposerReward = ""; + object.withdrawAddrEnabled = false; + } + if (message.communityTax != null && message.hasOwnProperty("communityTax")) + object.communityTax = message.communityTax; + if (message.baseProposerReward != null && message.hasOwnProperty("baseProposerReward")) + object.baseProposerReward = message.baseProposerReward; + if (message.bonusProposerReward != null && message.hasOwnProperty("bonusProposerReward")) + object.bonusProposerReward = message.bonusProposerReward; + if (message.withdrawAddrEnabled != null && message.hasOwnProperty("withdrawAddrEnabled")) + object.withdrawAddrEnabled = message.withdrawAddrEnabled; + return object; + }; + + /** + * Converts this Params to JSON. + * @function toJSON + * @memberof cosmos.distribution.v1beta1.Params + * @instance + * @returns {Object.} JSON object + */ + Params.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Params; + })(v1beta1.Params || {}); + + v1beta1.ValidatorHistoricalRewards = (function(ValidatorHistoricalRewards) { + + /** + * Properties of a ValidatorHistoricalRewards. + * @memberof cosmos.distribution.v1beta1 + * @interface IValidatorHistoricalRewards + * @property {Array.|null} [cumulativeRewardRatio] ValidatorHistoricalRewards cumulativeRewardRatio + * @property {number|null} [referenceCount] ValidatorHistoricalRewards referenceCount + */ + + /** + * Constructs a new ValidatorHistoricalRewards. + * @memberof cosmos.distribution.v1beta1 + * @classdesc Represents a ValidatorHistoricalRewards. + * @implements IValidatorHistoricalRewards + * @constructor + * @param {cosmos.distribution.v1beta1.IValidatorHistoricalRewards=} [properties] Properties to set + */ + function ValidatorHistoricalRewards(properties) { + this.cumulativeRewardRatio = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ValidatorHistoricalRewards cumulativeRewardRatio. + * @member {Array.} cumulativeRewardRatio + * @memberof cosmos.distribution.v1beta1.ValidatorHistoricalRewards + * @instance + */ + ValidatorHistoricalRewards.prototype.cumulativeRewardRatio = $util.emptyArray; + + /** + * ValidatorHistoricalRewards referenceCount. + * @member {number} referenceCount + * @memberof cosmos.distribution.v1beta1.ValidatorHistoricalRewards + * @instance + */ + ValidatorHistoricalRewards.prototype.referenceCount = 0; + + /** + * Creates a new ValidatorHistoricalRewards instance using the specified properties. + * @function create + * @memberof cosmos.distribution.v1beta1.ValidatorHistoricalRewards + * @static + * @param {cosmos.distribution.v1beta1.IValidatorHistoricalRewards=} [properties] Properties to set + * @returns {cosmos.distribution.v1beta1.ValidatorHistoricalRewards} ValidatorHistoricalRewards instance + */ + ValidatorHistoricalRewards.create = function create(properties) { + return new ValidatorHistoricalRewards(properties); + }; + + /** + * Encodes the specified ValidatorHistoricalRewards message. Does not implicitly {@link cosmos.distribution.v1beta1.ValidatorHistoricalRewards.verify|verify} messages. + * @function encode + * @memberof cosmos.distribution.v1beta1.ValidatorHistoricalRewards + * @static + * @param {cosmos.distribution.v1beta1.IValidatorHistoricalRewards} message ValidatorHistoricalRewards message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValidatorHistoricalRewards.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.cumulativeRewardRatio != null && message.cumulativeRewardRatio.length) + for (let i = 0; i < message.cumulativeRewardRatio.length; ++i) + $root.cosmos.base.v1beta1.DecCoin.encode(message.cumulativeRewardRatio[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.referenceCount != null && Object.hasOwnProperty.call(message, "referenceCount")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.referenceCount); + return writer; + }; + + /** + * Encodes the specified ValidatorHistoricalRewards message, length delimited. Does not implicitly {@link cosmos.distribution.v1beta1.ValidatorHistoricalRewards.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.distribution.v1beta1.ValidatorHistoricalRewards + * @static + * @param {cosmos.distribution.v1beta1.IValidatorHistoricalRewards} message ValidatorHistoricalRewards message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValidatorHistoricalRewards.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ValidatorHistoricalRewards message from the specified reader or buffer. + * @function decode + * @memberof cosmos.distribution.v1beta1.ValidatorHistoricalRewards + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.distribution.v1beta1.ValidatorHistoricalRewards} ValidatorHistoricalRewards + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValidatorHistoricalRewards.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.distribution.v1beta1.ValidatorHistoricalRewards(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.cumulativeRewardRatio && message.cumulativeRewardRatio.length)) + message.cumulativeRewardRatio = []; + message.cumulativeRewardRatio.push($root.cosmos.base.v1beta1.DecCoin.decode(reader, reader.uint32())); + break; + case 2: + message.referenceCount = reader.uint32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ValidatorHistoricalRewards message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.distribution.v1beta1.ValidatorHistoricalRewards + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.distribution.v1beta1.ValidatorHistoricalRewards} ValidatorHistoricalRewards + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValidatorHistoricalRewards.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ValidatorHistoricalRewards message. + * @function verify + * @memberof cosmos.distribution.v1beta1.ValidatorHistoricalRewards + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ValidatorHistoricalRewards.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.cumulativeRewardRatio != null && message.hasOwnProperty("cumulativeRewardRatio")) { + if (!Array.isArray(message.cumulativeRewardRatio)) + return "cumulativeRewardRatio: array expected"; + for (let i = 0; i < message.cumulativeRewardRatio.length; ++i) { + let error = $root.cosmos.base.v1beta1.DecCoin.verify(message.cumulativeRewardRatio[i]); + if (error) + return "cumulativeRewardRatio." + error; + } + } + if (message.referenceCount != null && message.hasOwnProperty("referenceCount")) + if (!$util.isInteger(message.referenceCount)) + return "referenceCount: integer expected"; + return null; + }; + + /** + * Creates a ValidatorHistoricalRewards message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.distribution.v1beta1.ValidatorHistoricalRewards + * @static + * @param {Object.} object Plain object + * @returns {cosmos.distribution.v1beta1.ValidatorHistoricalRewards} ValidatorHistoricalRewards + */ + ValidatorHistoricalRewards.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.distribution.v1beta1.ValidatorHistoricalRewards) + return object; + let message = new $root.cosmos.distribution.v1beta1.ValidatorHistoricalRewards(); + if (object.cumulativeRewardRatio) { + if (!Array.isArray(object.cumulativeRewardRatio)) + throw TypeError(".cosmos.distribution.v1beta1.ValidatorHistoricalRewards.cumulativeRewardRatio: array expected"); + message.cumulativeRewardRatio = []; + for (let i = 0; i < object.cumulativeRewardRatio.length; ++i) { + if (typeof object.cumulativeRewardRatio[i] !== "object") + throw TypeError(".cosmos.distribution.v1beta1.ValidatorHistoricalRewards.cumulativeRewardRatio: object expected"); + message.cumulativeRewardRatio[i] = $root.cosmos.base.v1beta1.DecCoin.fromObject(object.cumulativeRewardRatio[i]); + } + } + if (object.referenceCount != null) + message.referenceCount = object.referenceCount >>> 0; + return message; + }; + + /** + * Creates a plain object from a ValidatorHistoricalRewards message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.distribution.v1beta1.ValidatorHistoricalRewards + * @static + * @param {cosmos.distribution.v1beta1.ValidatorHistoricalRewards} message ValidatorHistoricalRewards + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ValidatorHistoricalRewards.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.cumulativeRewardRatio = []; + if (options.defaults) + object.referenceCount = 0; + if (message.cumulativeRewardRatio && message.cumulativeRewardRatio.length) { + object.cumulativeRewardRatio = []; + for (let j = 0; j < message.cumulativeRewardRatio.length; ++j) + object.cumulativeRewardRatio[j] = $root.cosmos.base.v1beta1.DecCoin.toObject(message.cumulativeRewardRatio[j], options); + } + if (message.referenceCount != null && message.hasOwnProperty("referenceCount")) + object.referenceCount = message.referenceCount; + return object; + }; + + /** + * Converts this ValidatorHistoricalRewards to JSON. + * @function toJSON + * @memberof cosmos.distribution.v1beta1.ValidatorHistoricalRewards + * @instance + * @returns {Object.} JSON object + */ + ValidatorHistoricalRewards.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ValidatorHistoricalRewards; + })(v1beta1.ValidatorHistoricalRewards || {}); + + v1beta1.ValidatorCurrentRewards = (function(ValidatorCurrentRewards) { + + /** + * Properties of a ValidatorCurrentRewards. + * @memberof cosmos.distribution.v1beta1 + * @interface IValidatorCurrentRewards + * @property {Array.|null} [rewards] ValidatorCurrentRewards rewards + * @property {number|Long|null} [period] ValidatorCurrentRewards period + */ + + /** + * Constructs a new ValidatorCurrentRewards. + * @memberof cosmos.distribution.v1beta1 + * @classdesc Represents a ValidatorCurrentRewards. + * @implements IValidatorCurrentRewards + * @constructor + * @param {cosmos.distribution.v1beta1.IValidatorCurrentRewards=} [properties] Properties to set + */ + function ValidatorCurrentRewards(properties) { + this.rewards = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ValidatorCurrentRewards rewards. + * @member {Array.} rewards + * @memberof cosmos.distribution.v1beta1.ValidatorCurrentRewards + * @instance + */ + ValidatorCurrentRewards.prototype.rewards = $util.emptyArray; + + /** + * ValidatorCurrentRewards period. + * @member {number|Long} period + * @memberof cosmos.distribution.v1beta1.ValidatorCurrentRewards + * @instance + */ + ValidatorCurrentRewards.prototype.period = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new ValidatorCurrentRewards instance using the specified properties. + * @function create + * @memberof cosmos.distribution.v1beta1.ValidatorCurrentRewards + * @static + * @param {cosmos.distribution.v1beta1.IValidatorCurrentRewards=} [properties] Properties to set + * @returns {cosmos.distribution.v1beta1.ValidatorCurrentRewards} ValidatorCurrentRewards instance + */ + ValidatorCurrentRewards.create = function create(properties) { + return new ValidatorCurrentRewards(properties); + }; + + /** + * Encodes the specified ValidatorCurrentRewards message. Does not implicitly {@link cosmos.distribution.v1beta1.ValidatorCurrentRewards.verify|verify} messages. + * @function encode + * @memberof cosmos.distribution.v1beta1.ValidatorCurrentRewards + * @static + * @param {cosmos.distribution.v1beta1.IValidatorCurrentRewards} message ValidatorCurrentRewards message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValidatorCurrentRewards.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rewards != null && message.rewards.length) + for (let i = 0; i < message.rewards.length; ++i) + $root.cosmos.base.v1beta1.DecCoin.encode(message.rewards[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.period != null && Object.hasOwnProperty.call(message, "period")) + writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.period); + return writer; + }; + + /** + * Encodes the specified ValidatorCurrentRewards message, length delimited. Does not implicitly {@link cosmos.distribution.v1beta1.ValidatorCurrentRewards.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.distribution.v1beta1.ValidatorCurrentRewards + * @static + * @param {cosmos.distribution.v1beta1.IValidatorCurrentRewards} message ValidatorCurrentRewards message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValidatorCurrentRewards.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ValidatorCurrentRewards message from the specified reader or buffer. + * @function decode + * @memberof cosmos.distribution.v1beta1.ValidatorCurrentRewards + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.distribution.v1beta1.ValidatorCurrentRewards} ValidatorCurrentRewards + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValidatorCurrentRewards.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.distribution.v1beta1.ValidatorCurrentRewards(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.rewards && message.rewards.length)) + message.rewards = []; + message.rewards.push($root.cosmos.base.v1beta1.DecCoin.decode(reader, reader.uint32())); + break; + case 2: + message.period = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ValidatorCurrentRewards message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.distribution.v1beta1.ValidatorCurrentRewards + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.distribution.v1beta1.ValidatorCurrentRewards} ValidatorCurrentRewards + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValidatorCurrentRewards.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ValidatorCurrentRewards message. + * @function verify + * @memberof cosmos.distribution.v1beta1.ValidatorCurrentRewards + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ValidatorCurrentRewards.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rewards != null && message.hasOwnProperty("rewards")) { + if (!Array.isArray(message.rewards)) + return "rewards: array expected"; + for (let i = 0; i < message.rewards.length; ++i) { + let error = $root.cosmos.base.v1beta1.DecCoin.verify(message.rewards[i]); + if (error) + return "rewards." + error; + } + } + if (message.period != null && message.hasOwnProperty("period")) + if (!$util.isInteger(message.period) && !(message.period && $util.isInteger(message.period.low) && $util.isInteger(message.period.high))) + return "period: integer|Long expected"; + return null; + }; + + /** + * Creates a ValidatorCurrentRewards message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.distribution.v1beta1.ValidatorCurrentRewards + * @static + * @param {Object.} object Plain object + * @returns {cosmos.distribution.v1beta1.ValidatorCurrentRewards} ValidatorCurrentRewards + */ + ValidatorCurrentRewards.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.distribution.v1beta1.ValidatorCurrentRewards) + return object; + let message = new $root.cosmos.distribution.v1beta1.ValidatorCurrentRewards(); + if (object.rewards) { + if (!Array.isArray(object.rewards)) + throw TypeError(".cosmos.distribution.v1beta1.ValidatorCurrentRewards.rewards: array expected"); + message.rewards = []; + for (let i = 0; i < object.rewards.length; ++i) { + if (typeof object.rewards[i] !== "object") + throw TypeError(".cosmos.distribution.v1beta1.ValidatorCurrentRewards.rewards: object expected"); + message.rewards[i] = $root.cosmos.base.v1beta1.DecCoin.fromObject(object.rewards[i]); + } + } + if (object.period != null) + if ($util.Long) + (message.period = $util.Long.fromValue(object.period)).unsigned = true; + else if (typeof object.period === "string") + message.period = parseInt(object.period, 10); + else if (typeof object.period === "number") + message.period = object.period; + else if (typeof object.period === "object") + message.period = new $util.LongBits(object.period.low >>> 0, object.period.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a ValidatorCurrentRewards message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.distribution.v1beta1.ValidatorCurrentRewards + * @static + * @param {cosmos.distribution.v1beta1.ValidatorCurrentRewards} message ValidatorCurrentRewards + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ValidatorCurrentRewards.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.rewards = []; + if (options.defaults) + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.period = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.period = options.longs === String ? "0" : 0; + if (message.rewards && message.rewards.length) { + object.rewards = []; + for (let j = 0; j < message.rewards.length; ++j) + object.rewards[j] = $root.cosmos.base.v1beta1.DecCoin.toObject(message.rewards[j], options); + } + if (message.period != null && message.hasOwnProperty("period")) + if (typeof message.period === "number") + object.period = options.longs === String ? String(message.period) : message.period; + else + object.period = options.longs === String ? $util.Long.prototype.toString.call(message.period) : options.longs === Number ? new $util.LongBits(message.period.low >>> 0, message.period.high >>> 0).toNumber(true) : message.period; + return object; + }; + + /** + * Converts this ValidatorCurrentRewards to JSON. + * @function toJSON + * @memberof cosmos.distribution.v1beta1.ValidatorCurrentRewards + * @instance + * @returns {Object.} JSON object + */ + ValidatorCurrentRewards.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ValidatorCurrentRewards; + })(v1beta1.ValidatorCurrentRewards || {}); + + v1beta1.ValidatorAccumulatedCommission = (function(ValidatorAccumulatedCommission) { + + /** + * Properties of a ValidatorAccumulatedCommission. + * @memberof cosmos.distribution.v1beta1 + * @interface IValidatorAccumulatedCommission + * @property {Array.|null} [commission] ValidatorAccumulatedCommission commission + */ + + /** + * Constructs a new ValidatorAccumulatedCommission. + * @memberof cosmos.distribution.v1beta1 + * @classdesc Represents a ValidatorAccumulatedCommission. + * @implements IValidatorAccumulatedCommission + * @constructor + * @param {cosmos.distribution.v1beta1.IValidatorAccumulatedCommission=} [properties] Properties to set + */ + function ValidatorAccumulatedCommission(properties) { + this.commission = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ValidatorAccumulatedCommission commission. + * @member {Array.} commission + * @memberof cosmos.distribution.v1beta1.ValidatorAccumulatedCommission + * @instance + */ + ValidatorAccumulatedCommission.prototype.commission = $util.emptyArray; + + /** + * Creates a new ValidatorAccumulatedCommission instance using the specified properties. + * @function create + * @memberof cosmos.distribution.v1beta1.ValidatorAccumulatedCommission + * @static + * @param {cosmos.distribution.v1beta1.IValidatorAccumulatedCommission=} [properties] Properties to set + * @returns {cosmos.distribution.v1beta1.ValidatorAccumulatedCommission} ValidatorAccumulatedCommission instance + */ + ValidatorAccumulatedCommission.create = function create(properties) { + return new ValidatorAccumulatedCommission(properties); + }; + + /** + * Encodes the specified ValidatorAccumulatedCommission message. Does not implicitly {@link cosmos.distribution.v1beta1.ValidatorAccumulatedCommission.verify|verify} messages. + * @function encode + * @memberof cosmos.distribution.v1beta1.ValidatorAccumulatedCommission + * @static + * @param {cosmos.distribution.v1beta1.IValidatorAccumulatedCommission} message ValidatorAccumulatedCommission message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValidatorAccumulatedCommission.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.commission != null && message.commission.length) + for (let i = 0; i < message.commission.length; ++i) + $root.cosmos.base.v1beta1.DecCoin.encode(message.commission[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ValidatorAccumulatedCommission message, length delimited. Does not implicitly {@link cosmos.distribution.v1beta1.ValidatorAccumulatedCommission.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.distribution.v1beta1.ValidatorAccumulatedCommission + * @static + * @param {cosmos.distribution.v1beta1.IValidatorAccumulatedCommission} message ValidatorAccumulatedCommission message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValidatorAccumulatedCommission.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ValidatorAccumulatedCommission message from the specified reader or buffer. + * @function decode + * @memberof cosmos.distribution.v1beta1.ValidatorAccumulatedCommission + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.distribution.v1beta1.ValidatorAccumulatedCommission} ValidatorAccumulatedCommission + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValidatorAccumulatedCommission.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.commission && message.commission.length)) + message.commission = []; + message.commission.push($root.cosmos.base.v1beta1.DecCoin.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ValidatorAccumulatedCommission message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.distribution.v1beta1.ValidatorAccumulatedCommission + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.distribution.v1beta1.ValidatorAccumulatedCommission} ValidatorAccumulatedCommission + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValidatorAccumulatedCommission.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ValidatorAccumulatedCommission message. + * @function verify + * @memberof cosmos.distribution.v1beta1.ValidatorAccumulatedCommission + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ValidatorAccumulatedCommission.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.commission != null && message.hasOwnProperty("commission")) { + if (!Array.isArray(message.commission)) + return "commission: array expected"; + for (let i = 0; i < message.commission.length; ++i) { + let error = $root.cosmos.base.v1beta1.DecCoin.verify(message.commission[i]); + if (error) + return "commission." + error; + } + } + return null; + }; + + /** + * Creates a ValidatorAccumulatedCommission message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.distribution.v1beta1.ValidatorAccumulatedCommission + * @static + * @param {Object.} object Plain object + * @returns {cosmos.distribution.v1beta1.ValidatorAccumulatedCommission} ValidatorAccumulatedCommission + */ + ValidatorAccumulatedCommission.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission) + return object; + let message = new $root.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission(); + if (object.commission) { + if (!Array.isArray(object.commission)) + throw TypeError(".cosmos.distribution.v1beta1.ValidatorAccumulatedCommission.commission: array expected"); + message.commission = []; + for (let i = 0; i < object.commission.length; ++i) { + if (typeof object.commission[i] !== "object") + throw TypeError(".cosmos.distribution.v1beta1.ValidatorAccumulatedCommission.commission: object expected"); + message.commission[i] = $root.cosmos.base.v1beta1.DecCoin.fromObject(object.commission[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ValidatorAccumulatedCommission message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.distribution.v1beta1.ValidatorAccumulatedCommission + * @static + * @param {cosmos.distribution.v1beta1.ValidatorAccumulatedCommission} message ValidatorAccumulatedCommission + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ValidatorAccumulatedCommission.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.commission = []; + if (message.commission && message.commission.length) { + object.commission = []; + for (let j = 0; j < message.commission.length; ++j) + object.commission[j] = $root.cosmos.base.v1beta1.DecCoin.toObject(message.commission[j], options); + } + return object; + }; + + /** + * Converts this ValidatorAccumulatedCommission to JSON. + * @function toJSON + * @memberof cosmos.distribution.v1beta1.ValidatorAccumulatedCommission + * @instance + * @returns {Object.} JSON object + */ + ValidatorAccumulatedCommission.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ValidatorAccumulatedCommission; + })(v1beta1.ValidatorAccumulatedCommission || {}); + + v1beta1.ValidatorOutstandingRewards = (function(ValidatorOutstandingRewards) { + + /** + * Properties of a ValidatorOutstandingRewards. + * @memberof cosmos.distribution.v1beta1 + * @interface IValidatorOutstandingRewards + * @property {Array.|null} [rewards] ValidatorOutstandingRewards rewards + */ + + /** + * Constructs a new ValidatorOutstandingRewards. + * @memberof cosmos.distribution.v1beta1 + * @classdesc Represents a ValidatorOutstandingRewards. + * @implements IValidatorOutstandingRewards + * @constructor + * @param {cosmos.distribution.v1beta1.IValidatorOutstandingRewards=} [properties] Properties to set + */ + function ValidatorOutstandingRewards(properties) { + this.rewards = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ValidatorOutstandingRewards rewards. + * @member {Array.} rewards + * @memberof cosmos.distribution.v1beta1.ValidatorOutstandingRewards + * @instance + */ + ValidatorOutstandingRewards.prototype.rewards = $util.emptyArray; + + /** + * Creates a new ValidatorOutstandingRewards instance using the specified properties. + * @function create + * @memberof cosmos.distribution.v1beta1.ValidatorOutstandingRewards + * @static + * @param {cosmos.distribution.v1beta1.IValidatorOutstandingRewards=} [properties] Properties to set + * @returns {cosmos.distribution.v1beta1.ValidatorOutstandingRewards} ValidatorOutstandingRewards instance + */ + ValidatorOutstandingRewards.create = function create(properties) { + return new ValidatorOutstandingRewards(properties); + }; + + /** + * Encodes the specified ValidatorOutstandingRewards message. Does not implicitly {@link cosmos.distribution.v1beta1.ValidatorOutstandingRewards.verify|verify} messages. + * @function encode + * @memberof cosmos.distribution.v1beta1.ValidatorOutstandingRewards + * @static + * @param {cosmos.distribution.v1beta1.IValidatorOutstandingRewards} message ValidatorOutstandingRewards message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValidatorOutstandingRewards.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rewards != null && message.rewards.length) + for (let i = 0; i < message.rewards.length; ++i) + $root.cosmos.base.v1beta1.DecCoin.encode(message.rewards[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ValidatorOutstandingRewards message, length delimited. Does not implicitly {@link cosmos.distribution.v1beta1.ValidatorOutstandingRewards.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.distribution.v1beta1.ValidatorOutstandingRewards + * @static + * @param {cosmos.distribution.v1beta1.IValidatorOutstandingRewards} message ValidatorOutstandingRewards message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValidatorOutstandingRewards.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ValidatorOutstandingRewards message from the specified reader or buffer. + * @function decode + * @memberof cosmos.distribution.v1beta1.ValidatorOutstandingRewards + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.distribution.v1beta1.ValidatorOutstandingRewards} ValidatorOutstandingRewards + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValidatorOutstandingRewards.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.distribution.v1beta1.ValidatorOutstandingRewards(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.rewards && message.rewards.length)) + message.rewards = []; + message.rewards.push($root.cosmos.base.v1beta1.DecCoin.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ValidatorOutstandingRewards message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.distribution.v1beta1.ValidatorOutstandingRewards + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.distribution.v1beta1.ValidatorOutstandingRewards} ValidatorOutstandingRewards + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValidatorOutstandingRewards.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ValidatorOutstandingRewards message. + * @function verify + * @memberof cosmos.distribution.v1beta1.ValidatorOutstandingRewards + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ValidatorOutstandingRewards.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rewards != null && message.hasOwnProperty("rewards")) { + if (!Array.isArray(message.rewards)) + return "rewards: array expected"; + for (let i = 0; i < message.rewards.length; ++i) { + let error = $root.cosmos.base.v1beta1.DecCoin.verify(message.rewards[i]); + if (error) + return "rewards." + error; + } + } + return null; + }; + + /** + * Creates a ValidatorOutstandingRewards message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.distribution.v1beta1.ValidatorOutstandingRewards + * @static + * @param {Object.} object Plain object + * @returns {cosmos.distribution.v1beta1.ValidatorOutstandingRewards} ValidatorOutstandingRewards + */ + ValidatorOutstandingRewards.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.distribution.v1beta1.ValidatorOutstandingRewards) + return object; + let message = new $root.cosmos.distribution.v1beta1.ValidatorOutstandingRewards(); + if (object.rewards) { + if (!Array.isArray(object.rewards)) + throw TypeError(".cosmos.distribution.v1beta1.ValidatorOutstandingRewards.rewards: array expected"); + message.rewards = []; + for (let i = 0; i < object.rewards.length; ++i) { + if (typeof object.rewards[i] !== "object") + throw TypeError(".cosmos.distribution.v1beta1.ValidatorOutstandingRewards.rewards: object expected"); + message.rewards[i] = $root.cosmos.base.v1beta1.DecCoin.fromObject(object.rewards[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ValidatorOutstandingRewards message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.distribution.v1beta1.ValidatorOutstandingRewards + * @static + * @param {cosmos.distribution.v1beta1.ValidatorOutstandingRewards} message ValidatorOutstandingRewards + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ValidatorOutstandingRewards.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.rewards = []; + if (message.rewards && message.rewards.length) { + object.rewards = []; + for (let j = 0; j < message.rewards.length; ++j) + object.rewards[j] = $root.cosmos.base.v1beta1.DecCoin.toObject(message.rewards[j], options); + } + return object; + }; + + /** + * Converts this ValidatorOutstandingRewards to JSON. + * @function toJSON + * @memberof cosmos.distribution.v1beta1.ValidatorOutstandingRewards + * @instance + * @returns {Object.} JSON object + */ + ValidatorOutstandingRewards.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ValidatorOutstandingRewards; + })(v1beta1.ValidatorOutstandingRewards || {}); + + v1beta1.ValidatorSlashEvent = (function(ValidatorSlashEvent) { + + /** + * Properties of a ValidatorSlashEvent. + * @memberof cosmos.distribution.v1beta1 + * @interface IValidatorSlashEvent + * @property {number|Long|null} [validatorPeriod] ValidatorSlashEvent validatorPeriod + * @property {string|null} [fraction] ValidatorSlashEvent fraction + */ + + /** + * Constructs a new ValidatorSlashEvent. + * @memberof cosmos.distribution.v1beta1 + * @classdesc Represents a ValidatorSlashEvent. + * @implements IValidatorSlashEvent + * @constructor + * @param {cosmos.distribution.v1beta1.IValidatorSlashEvent=} [properties] Properties to set + */ + function ValidatorSlashEvent(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ValidatorSlashEvent validatorPeriod. + * @member {number|Long} validatorPeriod + * @memberof cosmos.distribution.v1beta1.ValidatorSlashEvent + * @instance + */ + ValidatorSlashEvent.prototype.validatorPeriod = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * ValidatorSlashEvent fraction. + * @member {string} fraction + * @memberof cosmos.distribution.v1beta1.ValidatorSlashEvent + * @instance + */ + ValidatorSlashEvent.prototype.fraction = ""; + + /** + * Creates a new ValidatorSlashEvent instance using the specified properties. + * @function create + * @memberof cosmos.distribution.v1beta1.ValidatorSlashEvent + * @static + * @param {cosmos.distribution.v1beta1.IValidatorSlashEvent=} [properties] Properties to set + * @returns {cosmos.distribution.v1beta1.ValidatorSlashEvent} ValidatorSlashEvent instance + */ + ValidatorSlashEvent.create = function create(properties) { + return new ValidatorSlashEvent(properties); + }; + + /** + * Encodes the specified ValidatorSlashEvent message. Does not implicitly {@link cosmos.distribution.v1beta1.ValidatorSlashEvent.verify|verify} messages. + * @function encode + * @memberof cosmos.distribution.v1beta1.ValidatorSlashEvent + * @static + * @param {cosmos.distribution.v1beta1.IValidatorSlashEvent} message ValidatorSlashEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValidatorSlashEvent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.validatorPeriod != null && Object.hasOwnProperty.call(message, "validatorPeriod")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.validatorPeriod); + if (message.fraction != null && Object.hasOwnProperty.call(message, "fraction")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.fraction); + return writer; + }; + + /** + * Encodes the specified ValidatorSlashEvent message, length delimited. Does not implicitly {@link cosmos.distribution.v1beta1.ValidatorSlashEvent.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.distribution.v1beta1.ValidatorSlashEvent + * @static + * @param {cosmos.distribution.v1beta1.IValidatorSlashEvent} message ValidatorSlashEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValidatorSlashEvent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ValidatorSlashEvent message from the specified reader or buffer. + * @function decode + * @memberof cosmos.distribution.v1beta1.ValidatorSlashEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.distribution.v1beta1.ValidatorSlashEvent} ValidatorSlashEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValidatorSlashEvent.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.distribution.v1beta1.ValidatorSlashEvent(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.validatorPeriod = reader.uint64(); + break; + case 2: + message.fraction = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ValidatorSlashEvent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.distribution.v1beta1.ValidatorSlashEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.distribution.v1beta1.ValidatorSlashEvent} ValidatorSlashEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValidatorSlashEvent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ValidatorSlashEvent message. + * @function verify + * @memberof cosmos.distribution.v1beta1.ValidatorSlashEvent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ValidatorSlashEvent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.validatorPeriod != null && message.hasOwnProperty("validatorPeriod")) + if (!$util.isInteger(message.validatorPeriod) && !(message.validatorPeriod && $util.isInteger(message.validatorPeriod.low) && $util.isInteger(message.validatorPeriod.high))) + return "validatorPeriod: integer|Long expected"; + if (message.fraction != null && message.hasOwnProperty("fraction")) + if (!$util.isString(message.fraction)) + return "fraction: string expected"; + return null; + }; + + /** + * Creates a ValidatorSlashEvent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.distribution.v1beta1.ValidatorSlashEvent + * @static + * @param {Object.} object Plain object + * @returns {cosmos.distribution.v1beta1.ValidatorSlashEvent} ValidatorSlashEvent + */ + ValidatorSlashEvent.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.distribution.v1beta1.ValidatorSlashEvent) + return object; + let message = new $root.cosmos.distribution.v1beta1.ValidatorSlashEvent(); + if (object.validatorPeriod != null) + if ($util.Long) + (message.validatorPeriod = $util.Long.fromValue(object.validatorPeriod)).unsigned = true; + else if (typeof object.validatorPeriod === "string") + message.validatorPeriod = parseInt(object.validatorPeriod, 10); + else if (typeof object.validatorPeriod === "number") + message.validatorPeriod = object.validatorPeriod; + else if (typeof object.validatorPeriod === "object") + message.validatorPeriod = new $util.LongBits(object.validatorPeriod.low >>> 0, object.validatorPeriod.high >>> 0).toNumber(true); + if (object.fraction != null) + message.fraction = String(object.fraction); + return message; + }; + + /** + * Creates a plain object from a ValidatorSlashEvent message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.distribution.v1beta1.ValidatorSlashEvent + * @static + * @param {cosmos.distribution.v1beta1.ValidatorSlashEvent} message ValidatorSlashEvent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ValidatorSlashEvent.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.validatorPeriod = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.validatorPeriod = options.longs === String ? "0" : 0; + object.fraction = ""; + } + if (message.validatorPeriod != null && message.hasOwnProperty("validatorPeriod")) + if (typeof message.validatorPeriod === "number") + object.validatorPeriod = options.longs === String ? String(message.validatorPeriod) : message.validatorPeriod; + else + object.validatorPeriod = options.longs === String ? $util.Long.prototype.toString.call(message.validatorPeriod) : options.longs === Number ? new $util.LongBits(message.validatorPeriod.low >>> 0, message.validatorPeriod.high >>> 0).toNumber(true) : message.validatorPeriod; + if (message.fraction != null && message.hasOwnProperty("fraction")) + object.fraction = message.fraction; + return object; + }; + + /** + * Converts this ValidatorSlashEvent to JSON. + * @function toJSON + * @memberof cosmos.distribution.v1beta1.ValidatorSlashEvent + * @instance + * @returns {Object.} JSON object + */ + ValidatorSlashEvent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ValidatorSlashEvent; + })(v1beta1.ValidatorSlashEvent || {}); + + v1beta1.ValidatorSlashEvents = (function(ValidatorSlashEvents) { + + /** + * Properties of a ValidatorSlashEvents. + * @memberof cosmos.distribution.v1beta1 + * @interface IValidatorSlashEvents + * @property {Array.|null} [validatorSlashEvents] ValidatorSlashEvents validatorSlashEvents + */ + + /** + * Constructs a new ValidatorSlashEvents. + * @memberof cosmos.distribution.v1beta1 + * @classdesc Represents a ValidatorSlashEvents. + * @implements IValidatorSlashEvents + * @constructor + * @param {cosmos.distribution.v1beta1.IValidatorSlashEvents=} [properties] Properties to set + */ + function ValidatorSlashEvents(properties) { + this.validatorSlashEvents = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ValidatorSlashEvents validatorSlashEvents. + * @member {Array.} validatorSlashEvents + * @memberof cosmos.distribution.v1beta1.ValidatorSlashEvents + * @instance + */ + ValidatorSlashEvents.prototype.validatorSlashEvents = $util.emptyArray; + + /** + * Creates a new ValidatorSlashEvents instance using the specified properties. + * @function create + * @memberof cosmos.distribution.v1beta1.ValidatorSlashEvents + * @static + * @param {cosmos.distribution.v1beta1.IValidatorSlashEvents=} [properties] Properties to set + * @returns {cosmos.distribution.v1beta1.ValidatorSlashEvents} ValidatorSlashEvents instance + */ + ValidatorSlashEvents.create = function create(properties) { + return new ValidatorSlashEvents(properties); + }; + + /** + * Encodes the specified ValidatorSlashEvents message. Does not implicitly {@link cosmos.distribution.v1beta1.ValidatorSlashEvents.verify|verify} messages. + * @function encode + * @memberof cosmos.distribution.v1beta1.ValidatorSlashEvents + * @static + * @param {cosmos.distribution.v1beta1.IValidatorSlashEvents} message ValidatorSlashEvents message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValidatorSlashEvents.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.validatorSlashEvents != null && message.validatorSlashEvents.length) + for (let i = 0; i < message.validatorSlashEvents.length; ++i) + $root.cosmos.distribution.v1beta1.ValidatorSlashEvent.encode(message.validatorSlashEvents[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ValidatorSlashEvents message, length delimited. Does not implicitly {@link cosmos.distribution.v1beta1.ValidatorSlashEvents.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.distribution.v1beta1.ValidatorSlashEvents + * @static + * @param {cosmos.distribution.v1beta1.IValidatorSlashEvents} message ValidatorSlashEvents message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValidatorSlashEvents.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ValidatorSlashEvents message from the specified reader or buffer. + * @function decode + * @memberof cosmos.distribution.v1beta1.ValidatorSlashEvents + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.distribution.v1beta1.ValidatorSlashEvents} ValidatorSlashEvents + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValidatorSlashEvents.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.distribution.v1beta1.ValidatorSlashEvents(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.validatorSlashEvents && message.validatorSlashEvents.length)) + message.validatorSlashEvents = []; + message.validatorSlashEvents.push($root.cosmos.distribution.v1beta1.ValidatorSlashEvent.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ValidatorSlashEvents message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.distribution.v1beta1.ValidatorSlashEvents + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.distribution.v1beta1.ValidatorSlashEvents} ValidatorSlashEvents + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValidatorSlashEvents.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ValidatorSlashEvents message. + * @function verify + * @memberof cosmos.distribution.v1beta1.ValidatorSlashEvents + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ValidatorSlashEvents.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.validatorSlashEvents != null && message.hasOwnProperty("validatorSlashEvents")) { + if (!Array.isArray(message.validatorSlashEvents)) + return "validatorSlashEvents: array expected"; + for (let i = 0; i < message.validatorSlashEvents.length; ++i) { + let error = $root.cosmos.distribution.v1beta1.ValidatorSlashEvent.verify(message.validatorSlashEvents[i]); + if (error) + return "validatorSlashEvents." + error; + } + } + return null; + }; + + /** + * Creates a ValidatorSlashEvents message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.distribution.v1beta1.ValidatorSlashEvents + * @static + * @param {Object.} object Plain object + * @returns {cosmos.distribution.v1beta1.ValidatorSlashEvents} ValidatorSlashEvents + */ + ValidatorSlashEvents.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.distribution.v1beta1.ValidatorSlashEvents) + return object; + let message = new $root.cosmos.distribution.v1beta1.ValidatorSlashEvents(); + if (object.validatorSlashEvents) { + if (!Array.isArray(object.validatorSlashEvents)) + throw TypeError(".cosmos.distribution.v1beta1.ValidatorSlashEvents.validatorSlashEvents: array expected"); + message.validatorSlashEvents = []; + for (let i = 0; i < object.validatorSlashEvents.length; ++i) { + if (typeof object.validatorSlashEvents[i] !== "object") + throw TypeError(".cosmos.distribution.v1beta1.ValidatorSlashEvents.validatorSlashEvents: object expected"); + message.validatorSlashEvents[i] = $root.cosmos.distribution.v1beta1.ValidatorSlashEvent.fromObject(object.validatorSlashEvents[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ValidatorSlashEvents message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.distribution.v1beta1.ValidatorSlashEvents + * @static + * @param {cosmos.distribution.v1beta1.ValidatorSlashEvents} message ValidatorSlashEvents + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ValidatorSlashEvents.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.validatorSlashEvents = []; + if (message.validatorSlashEvents && message.validatorSlashEvents.length) { + object.validatorSlashEvents = []; + for (let j = 0; j < message.validatorSlashEvents.length; ++j) + object.validatorSlashEvents[j] = $root.cosmos.distribution.v1beta1.ValidatorSlashEvent.toObject(message.validatorSlashEvents[j], options); + } + return object; + }; + + /** + * Converts this ValidatorSlashEvents to JSON. + * @function toJSON + * @memberof cosmos.distribution.v1beta1.ValidatorSlashEvents + * @instance + * @returns {Object.} JSON object + */ + ValidatorSlashEvents.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ValidatorSlashEvents; + })(v1beta1.ValidatorSlashEvents || {}); + + v1beta1.FeePool = (function(FeePool) { + + /** + * Properties of a FeePool. + * @memberof cosmos.distribution.v1beta1 + * @interface IFeePool + * @property {Array.|null} [communityPool] FeePool communityPool + */ + + /** + * Constructs a new FeePool. + * @memberof cosmos.distribution.v1beta1 + * @classdesc Represents a FeePool. + * @implements IFeePool + * @constructor + * @param {cosmos.distribution.v1beta1.IFeePool=} [properties] Properties to set + */ + function FeePool(properties) { + this.communityPool = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FeePool communityPool. + * @member {Array.} communityPool + * @memberof cosmos.distribution.v1beta1.FeePool + * @instance + */ + FeePool.prototype.communityPool = $util.emptyArray; + + /** + * Creates a new FeePool instance using the specified properties. + * @function create + * @memberof cosmos.distribution.v1beta1.FeePool + * @static + * @param {cosmos.distribution.v1beta1.IFeePool=} [properties] Properties to set + * @returns {cosmos.distribution.v1beta1.FeePool} FeePool instance + */ + FeePool.create = function create(properties) { + return new FeePool(properties); + }; + + /** + * Encodes the specified FeePool message. Does not implicitly {@link cosmos.distribution.v1beta1.FeePool.verify|verify} messages. + * @function encode + * @memberof cosmos.distribution.v1beta1.FeePool + * @static + * @param {cosmos.distribution.v1beta1.IFeePool} message FeePool message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeePool.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.communityPool != null && message.communityPool.length) + for (let i = 0; i < message.communityPool.length; ++i) + $root.cosmos.base.v1beta1.DecCoin.encode(message.communityPool[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FeePool message, length delimited. Does not implicitly {@link cosmos.distribution.v1beta1.FeePool.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.distribution.v1beta1.FeePool + * @static + * @param {cosmos.distribution.v1beta1.IFeePool} message FeePool message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeePool.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeePool message from the specified reader or buffer. + * @function decode + * @memberof cosmos.distribution.v1beta1.FeePool + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.distribution.v1beta1.FeePool} FeePool + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeePool.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.distribution.v1beta1.FeePool(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.communityPool && message.communityPool.length)) + message.communityPool = []; + message.communityPool.push($root.cosmos.base.v1beta1.DecCoin.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeePool message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.distribution.v1beta1.FeePool + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.distribution.v1beta1.FeePool} FeePool + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeePool.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeePool message. + * @function verify + * @memberof cosmos.distribution.v1beta1.FeePool + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeePool.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.communityPool != null && message.hasOwnProperty("communityPool")) { + if (!Array.isArray(message.communityPool)) + return "communityPool: array expected"; + for (let i = 0; i < message.communityPool.length; ++i) { + let error = $root.cosmos.base.v1beta1.DecCoin.verify(message.communityPool[i]); + if (error) + return "communityPool." + error; + } + } + return null; + }; + + /** + * Creates a FeePool message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.distribution.v1beta1.FeePool + * @static + * @param {Object.} object Plain object + * @returns {cosmos.distribution.v1beta1.FeePool} FeePool + */ + FeePool.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.distribution.v1beta1.FeePool) + return object; + let message = new $root.cosmos.distribution.v1beta1.FeePool(); + if (object.communityPool) { + if (!Array.isArray(object.communityPool)) + throw TypeError(".cosmos.distribution.v1beta1.FeePool.communityPool: array expected"); + message.communityPool = []; + for (let i = 0; i < object.communityPool.length; ++i) { + if (typeof object.communityPool[i] !== "object") + throw TypeError(".cosmos.distribution.v1beta1.FeePool.communityPool: object expected"); + message.communityPool[i] = $root.cosmos.base.v1beta1.DecCoin.fromObject(object.communityPool[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FeePool message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.distribution.v1beta1.FeePool + * @static + * @param {cosmos.distribution.v1beta1.FeePool} message FeePool + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeePool.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.communityPool = []; + if (message.communityPool && message.communityPool.length) { + object.communityPool = []; + for (let j = 0; j < message.communityPool.length; ++j) + object.communityPool[j] = $root.cosmos.base.v1beta1.DecCoin.toObject(message.communityPool[j], options); + } + return object; + }; + + /** + * Converts this FeePool to JSON. + * @function toJSON + * @memberof cosmos.distribution.v1beta1.FeePool + * @instance + * @returns {Object.} JSON object + */ + FeePool.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FeePool; + })(v1beta1.FeePool || {}); + + v1beta1.CommunityPoolSpendProposal = (function(CommunityPoolSpendProposal) { + + /** + * Properties of a CommunityPoolSpendProposal. + * @memberof cosmos.distribution.v1beta1 + * @interface ICommunityPoolSpendProposal + * @property {string|null} [title] CommunityPoolSpendProposal title + * @property {string|null} [description] CommunityPoolSpendProposal description + * @property {string|null} [recipient] CommunityPoolSpendProposal recipient + * @property {Array.|null} [amount] CommunityPoolSpendProposal amount + */ + + /** + * Constructs a new CommunityPoolSpendProposal. + * @memberof cosmos.distribution.v1beta1 + * @classdesc Represents a CommunityPoolSpendProposal. + * @implements ICommunityPoolSpendProposal + * @constructor + * @param {cosmos.distribution.v1beta1.ICommunityPoolSpendProposal=} [properties] Properties to set + */ + function CommunityPoolSpendProposal(properties) { + this.amount = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CommunityPoolSpendProposal title. + * @member {string} title + * @memberof cosmos.distribution.v1beta1.CommunityPoolSpendProposal + * @instance + */ + CommunityPoolSpendProposal.prototype.title = ""; + + /** + * CommunityPoolSpendProposal description. + * @member {string} description + * @memberof cosmos.distribution.v1beta1.CommunityPoolSpendProposal + * @instance + */ + CommunityPoolSpendProposal.prototype.description = ""; + + /** + * CommunityPoolSpendProposal recipient. + * @member {string} recipient + * @memberof cosmos.distribution.v1beta1.CommunityPoolSpendProposal + * @instance + */ + CommunityPoolSpendProposal.prototype.recipient = ""; + + /** + * CommunityPoolSpendProposal amount. + * @member {Array.} amount + * @memberof cosmos.distribution.v1beta1.CommunityPoolSpendProposal + * @instance + */ + CommunityPoolSpendProposal.prototype.amount = $util.emptyArray; + + /** + * Creates a new CommunityPoolSpendProposal instance using the specified properties. + * @function create + * @memberof cosmos.distribution.v1beta1.CommunityPoolSpendProposal + * @static + * @param {cosmos.distribution.v1beta1.ICommunityPoolSpendProposal=} [properties] Properties to set + * @returns {cosmos.distribution.v1beta1.CommunityPoolSpendProposal} CommunityPoolSpendProposal instance + */ + CommunityPoolSpendProposal.create = function create(properties) { + return new CommunityPoolSpendProposal(properties); + }; + + /** + * Encodes the specified CommunityPoolSpendProposal message. Does not implicitly {@link cosmos.distribution.v1beta1.CommunityPoolSpendProposal.verify|verify} messages. + * @function encode + * @memberof cosmos.distribution.v1beta1.CommunityPoolSpendProposal + * @static + * @param {cosmos.distribution.v1beta1.ICommunityPoolSpendProposal} message CommunityPoolSpendProposal message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommunityPoolSpendProposal.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.title != null && Object.hasOwnProperty.call(message, "title")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.title); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.recipient != null && Object.hasOwnProperty.call(message, "recipient")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.recipient); + if (message.amount != null && message.amount.length) + for (let i = 0; i < message.amount.length; ++i) + $root.cosmos.base.v1beta1.Coin.encode(message.amount[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CommunityPoolSpendProposal message, length delimited. Does not implicitly {@link cosmos.distribution.v1beta1.CommunityPoolSpendProposal.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.distribution.v1beta1.CommunityPoolSpendProposal + * @static + * @param {cosmos.distribution.v1beta1.ICommunityPoolSpendProposal} message CommunityPoolSpendProposal message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommunityPoolSpendProposal.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CommunityPoolSpendProposal message from the specified reader or buffer. + * @function decode + * @memberof cosmos.distribution.v1beta1.CommunityPoolSpendProposal + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.distribution.v1beta1.CommunityPoolSpendProposal} CommunityPoolSpendProposal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommunityPoolSpendProposal.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.distribution.v1beta1.CommunityPoolSpendProposal(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.title = reader.string(); + break; + case 2: + message.description = reader.string(); + break; + case 3: + message.recipient = reader.string(); + break; + case 4: + if (!(message.amount && message.amount.length)) + message.amount = []; + message.amount.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CommunityPoolSpendProposal message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.distribution.v1beta1.CommunityPoolSpendProposal + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.distribution.v1beta1.CommunityPoolSpendProposal} CommunityPoolSpendProposal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommunityPoolSpendProposal.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CommunityPoolSpendProposal message. + * @function verify + * @memberof cosmos.distribution.v1beta1.CommunityPoolSpendProposal + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CommunityPoolSpendProposal.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.title != null && message.hasOwnProperty("title")) + if (!$util.isString(message.title)) + return "title: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.recipient != null && message.hasOwnProperty("recipient")) + if (!$util.isString(message.recipient)) + return "recipient: string expected"; + if (message.amount != null && message.hasOwnProperty("amount")) { + if (!Array.isArray(message.amount)) + return "amount: array expected"; + for (let i = 0; i < message.amount.length; ++i) { + let error = $root.cosmos.base.v1beta1.Coin.verify(message.amount[i]); + if (error) + return "amount." + error; + } + } + return null; + }; + + /** + * Creates a CommunityPoolSpendProposal message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.distribution.v1beta1.CommunityPoolSpendProposal + * @static + * @param {Object.} object Plain object + * @returns {cosmos.distribution.v1beta1.CommunityPoolSpendProposal} CommunityPoolSpendProposal + */ + CommunityPoolSpendProposal.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.distribution.v1beta1.CommunityPoolSpendProposal) + return object; + let message = new $root.cosmos.distribution.v1beta1.CommunityPoolSpendProposal(); + if (object.title != null) + message.title = String(object.title); + if (object.description != null) + message.description = String(object.description); + if (object.recipient != null) + message.recipient = String(object.recipient); + if (object.amount) { + if (!Array.isArray(object.amount)) + throw TypeError(".cosmos.distribution.v1beta1.CommunityPoolSpendProposal.amount: array expected"); + message.amount = []; + for (let i = 0; i < object.amount.length; ++i) { + if (typeof object.amount[i] !== "object") + throw TypeError(".cosmos.distribution.v1beta1.CommunityPoolSpendProposal.amount: object expected"); + message.amount[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.amount[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a CommunityPoolSpendProposal message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.distribution.v1beta1.CommunityPoolSpendProposal + * @static + * @param {cosmos.distribution.v1beta1.CommunityPoolSpendProposal} message CommunityPoolSpendProposal + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CommunityPoolSpendProposal.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.amount = []; + if (options.defaults) { + object.title = ""; + object.description = ""; + object.recipient = ""; + } + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.recipient != null && message.hasOwnProperty("recipient")) + object.recipient = message.recipient; + if (message.amount && message.amount.length) { + object.amount = []; + for (let j = 0; j < message.amount.length; ++j) + object.amount[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.amount[j], options); + } + return object; + }; + + /** + * Converts this CommunityPoolSpendProposal to JSON. + * @function toJSON + * @memberof cosmos.distribution.v1beta1.CommunityPoolSpendProposal + * @instance + * @returns {Object.} JSON object + */ + CommunityPoolSpendProposal.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CommunityPoolSpendProposal; + })(v1beta1.CommunityPoolSpendProposal || {}); + + v1beta1.DelegatorStartingInfo = (function(DelegatorStartingInfo) { + + /** + * Properties of a DelegatorStartingInfo. + * @memberof cosmos.distribution.v1beta1 + * @interface IDelegatorStartingInfo + * @property {number|Long|null} [previousPeriod] DelegatorStartingInfo previousPeriod + * @property {string|null} [stake] DelegatorStartingInfo stake + * @property {number|Long|null} [height] DelegatorStartingInfo height + */ + + /** + * Constructs a new DelegatorStartingInfo. + * @memberof cosmos.distribution.v1beta1 + * @classdesc Represents a DelegatorStartingInfo. + * @implements IDelegatorStartingInfo + * @constructor + * @param {cosmos.distribution.v1beta1.IDelegatorStartingInfo=} [properties] Properties to set + */ + function DelegatorStartingInfo(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DelegatorStartingInfo previousPeriod. + * @member {number|Long} previousPeriod + * @memberof cosmos.distribution.v1beta1.DelegatorStartingInfo + * @instance + */ + DelegatorStartingInfo.prototype.previousPeriod = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * DelegatorStartingInfo stake. + * @member {string} stake + * @memberof cosmos.distribution.v1beta1.DelegatorStartingInfo + * @instance + */ + DelegatorStartingInfo.prototype.stake = ""; + + /** + * DelegatorStartingInfo height. + * @member {number|Long} height + * @memberof cosmos.distribution.v1beta1.DelegatorStartingInfo + * @instance + */ + DelegatorStartingInfo.prototype.height = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new DelegatorStartingInfo instance using the specified properties. + * @function create + * @memberof cosmos.distribution.v1beta1.DelegatorStartingInfo + * @static + * @param {cosmos.distribution.v1beta1.IDelegatorStartingInfo=} [properties] Properties to set + * @returns {cosmos.distribution.v1beta1.DelegatorStartingInfo} DelegatorStartingInfo instance + */ + DelegatorStartingInfo.create = function create(properties) { + return new DelegatorStartingInfo(properties); + }; + + /** + * Encodes the specified DelegatorStartingInfo message. Does not implicitly {@link cosmos.distribution.v1beta1.DelegatorStartingInfo.verify|verify} messages. + * @function encode + * @memberof cosmos.distribution.v1beta1.DelegatorStartingInfo + * @static + * @param {cosmos.distribution.v1beta1.IDelegatorStartingInfo} message DelegatorStartingInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DelegatorStartingInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.previousPeriod != null && Object.hasOwnProperty.call(message, "previousPeriod")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.previousPeriod); + if (message.stake != null && Object.hasOwnProperty.call(message, "stake")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.stake); + if (message.height != null && Object.hasOwnProperty.call(message, "height")) + writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.height); + return writer; + }; + + /** + * Encodes the specified DelegatorStartingInfo message, length delimited. Does not implicitly {@link cosmos.distribution.v1beta1.DelegatorStartingInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.distribution.v1beta1.DelegatorStartingInfo + * @static + * @param {cosmos.distribution.v1beta1.IDelegatorStartingInfo} message DelegatorStartingInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DelegatorStartingInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DelegatorStartingInfo message from the specified reader or buffer. + * @function decode + * @memberof cosmos.distribution.v1beta1.DelegatorStartingInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.distribution.v1beta1.DelegatorStartingInfo} DelegatorStartingInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DelegatorStartingInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.distribution.v1beta1.DelegatorStartingInfo(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.previousPeriod = reader.uint64(); + break; + case 2: + message.stake = reader.string(); + break; + case 3: + message.height = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DelegatorStartingInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.distribution.v1beta1.DelegatorStartingInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.distribution.v1beta1.DelegatorStartingInfo} DelegatorStartingInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DelegatorStartingInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DelegatorStartingInfo message. + * @function verify + * @memberof cosmos.distribution.v1beta1.DelegatorStartingInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DelegatorStartingInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.previousPeriod != null && message.hasOwnProperty("previousPeriod")) + if (!$util.isInteger(message.previousPeriod) && !(message.previousPeriod && $util.isInteger(message.previousPeriod.low) && $util.isInteger(message.previousPeriod.high))) + return "previousPeriod: integer|Long expected"; + if (message.stake != null && message.hasOwnProperty("stake")) + if (!$util.isString(message.stake)) + return "stake: string expected"; + if (message.height != null && message.hasOwnProperty("height")) + if (!$util.isInteger(message.height) && !(message.height && $util.isInteger(message.height.low) && $util.isInteger(message.height.high))) + return "height: integer|Long expected"; + return null; + }; + + /** + * Creates a DelegatorStartingInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.distribution.v1beta1.DelegatorStartingInfo + * @static + * @param {Object.} object Plain object + * @returns {cosmos.distribution.v1beta1.DelegatorStartingInfo} DelegatorStartingInfo + */ + DelegatorStartingInfo.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.distribution.v1beta1.DelegatorStartingInfo) + return object; + let message = new $root.cosmos.distribution.v1beta1.DelegatorStartingInfo(); + if (object.previousPeriod != null) + if ($util.Long) + (message.previousPeriod = $util.Long.fromValue(object.previousPeriod)).unsigned = true; + else if (typeof object.previousPeriod === "string") + message.previousPeriod = parseInt(object.previousPeriod, 10); + else if (typeof object.previousPeriod === "number") + message.previousPeriod = object.previousPeriod; + else if (typeof object.previousPeriod === "object") + message.previousPeriod = new $util.LongBits(object.previousPeriod.low >>> 0, object.previousPeriod.high >>> 0).toNumber(true); + if (object.stake != null) + message.stake = String(object.stake); + if (object.height != null) + if ($util.Long) + (message.height = $util.Long.fromValue(object.height)).unsigned = true; + else if (typeof object.height === "string") + message.height = parseInt(object.height, 10); + else if (typeof object.height === "number") + message.height = object.height; + else if (typeof object.height === "object") + message.height = new $util.LongBits(object.height.low >>> 0, object.height.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a DelegatorStartingInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.distribution.v1beta1.DelegatorStartingInfo + * @static + * @param {cosmos.distribution.v1beta1.DelegatorStartingInfo} message DelegatorStartingInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DelegatorStartingInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.previousPeriod = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.previousPeriod = options.longs === String ? "0" : 0; + object.stake = ""; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.height = options.longs === String ? "0" : 0; + } + if (message.previousPeriod != null && message.hasOwnProperty("previousPeriod")) + if (typeof message.previousPeriod === "number") + object.previousPeriod = options.longs === String ? String(message.previousPeriod) : message.previousPeriod; + else + object.previousPeriod = options.longs === String ? $util.Long.prototype.toString.call(message.previousPeriod) : options.longs === Number ? new $util.LongBits(message.previousPeriod.low >>> 0, message.previousPeriod.high >>> 0).toNumber(true) : message.previousPeriod; + if (message.stake != null && message.hasOwnProperty("stake")) + object.stake = message.stake; + if (message.height != null && message.hasOwnProperty("height")) + if (typeof message.height === "number") + object.height = options.longs === String ? String(message.height) : message.height; + else + object.height = options.longs === String ? $util.Long.prototype.toString.call(message.height) : options.longs === Number ? new $util.LongBits(message.height.low >>> 0, message.height.high >>> 0).toNumber(true) : message.height; + return object; + }; + + /** + * Converts this DelegatorStartingInfo to JSON. + * @function toJSON + * @memberof cosmos.distribution.v1beta1.DelegatorStartingInfo + * @instance + * @returns {Object.} JSON object + */ + DelegatorStartingInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DelegatorStartingInfo; + })(v1beta1.DelegatorStartingInfo || {}); + + v1beta1.DelegationDelegatorReward = (function(DelegationDelegatorReward) { + + /** + * Properties of a DelegationDelegatorReward. + * @memberof cosmos.distribution.v1beta1 + * @interface IDelegationDelegatorReward + * @property {string|null} [validatorAddress] DelegationDelegatorReward validatorAddress + * @property {Array.|null} [reward] DelegationDelegatorReward reward + */ + + /** + * Constructs a new DelegationDelegatorReward. + * @memberof cosmos.distribution.v1beta1 + * @classdesc Represents a DelegationDelegatorReward. + * @implements IDelegationDelegatorReward + * @constructor + * @param {cosmos.distribution.v1beta1.IDelegationDelegatorReward=} [properties] Properties to set + */ + function DelegationDelegatorReward(properties) { + this.reward = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DelegationDelegatorReward validatorAddress. + * @member {string} validatorAddress + * @memberof cosmos.distribution.v1beta1.DelegationDelegatorReward + * @instance + */ + DelegationDelegatorReward.prototype.validatorAddress = ""; + + /** + * DelegationDelegatorReward reward. + * @member {Array.} reward + * @memberof cosmos.distribution.v1beta1.DelegationDelegatorReward + * @instance + */ + DelegationDelegatorReward.prototype.reward = $util.emptyArray; + + /** + * Creates a new DelegationDelegatorReward instance using the specified properties. + * @function create + * @memberof cosmos.distribution.v1beta1.DelegationDelegatorReward + * @static + * @param {cosmos.distribution.v1beta1.IDelegationDelegatorReward=} [properties] Properties to set + * @returns {cosmos.distribution.v1beta1.DelegationDelegatorReward} DelegationDelegatorReward instance + */ + DelegationDelegatorReward.create = function create(properties) { + return new DelegationDelegatorReward(properties); + }; + + /** + * Encodes the specified DelegationDelegatorReward message. Does not implicitly {@link cosmos.distribution.v1beta1.DelegationDelegatorReward.verify|verify} messages. + * @function encode + * @memberof cosmos.distribution.v1beta1.DelegationDelegatorReward + * @static + * @param {cosmos.distribution.v1beta1.IDelegationDelegatorReward} message DelegationDelegatorReward message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DelegationDelegatorReward.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.validatorAddress != null && Object.hasOwnProperty.call(message, "validatorAddress")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.validatorAddress); + if (message.reward != null && message.reward.length) + for (let i = 0; i < message.reward.length; ++i) + $root.cosmos.base.v1beta1.DecCoin.encode(message.reward[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DelegationDelegatorReward message, length delimited. Does not implicitly {@link cosmos.distribution.v1beta1.DelegationDelegatorReward.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.distribution.v1beta1.DelegationDelegatorReward + * @static + * @param {cosmos.distribution.v1beta1.IDelegationDelegatorReward} message DelegationDelegatorReward message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DelegationDelegatorReward.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DelegationDelegatorReward message from the specified reader or buffer. + * @function decode + * @memberof cosmos.distribution.v1beta1.DelegationDelegatorReward + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.distribution.v1beta1.DelegationDelegatorReward} DelegationDelegatorReward + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DelegationDelegatorReward.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.distribution.v1beta1.DelegationDelegatorReward(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.validatorAddress = reader.string(); + break; + case 2: + if (!(message.reward && message.reward.length)) + message.reward = []; + message.reward.push($root.cosmos.base.v1beta1.DecCoin.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DelegationDelegatorReward message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.distribution.v1beta1.DelegationDelegatorReward + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.distribution.v1beta1.DelegationDelegatorReward} DelegationDelegatorReward + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DelegationDelegatorReward.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DelegationDelegatorReward message. + * @function verify + * @memberof cosmos.distribution.v1beta1.DelegationDelegatorReward + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DelegationDelegatorReward.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + if (!$util.isString(message.validatorAddress)) + return "validatorAddress: string expected"; + if (message.reward != null && message.hasOwnProperty("reward")) { + if (!Array.isArray(message.reward)) + return "reward: array expected"; + for (let i = 0; i < message.reward.length; ++i) { + let error = $root.cosmos.base.v1beta1.DecCoin.verify(message.reward[i]); + if (error) + return "reward." + error; + } + } + return null; + }; + + /** + * Creates a DelegationDelegatorReward message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.distribution.v1beta1.DelegationDelegatorReward + * @static + * @param {Object.} object Plain object + * @returns {cosmos.distribution.v1beta1.DelegationDelegatorReward} DelegationDelegatorReward + */ + DelegationDelegatorReward.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.distribution.v1beta1.DelegationDelegatorReward) + return object; + let message = new $root.cosmos.distribution.v1beta1.DelegationDelegatorReward(); + if (object.validatorAddress != null) + message.validatorAddress = String(object.validatorAddress); + if (object.reward) { + if (!Array.isArray(object.reward)) + throw TypeError(".cosmos.distribution.v1beta1.DelegationDelegatorReward.reward: array expected"); + message.reward = []; + for (let i = 0; i < object.reward.length; ++i) { + if (typeof object.reward[i] !== "object") + throw TypeError(".cosmos.distribution.v1beta1.DelegationDelegatorReward.reward: object expected"); + message.reward[i] = $root.cosmos.base.v1beta1.DecCoin.fromObject(object.reward[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a DelegationDelegatorReward message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.distribution.v1beta1.DelegationDelegatorReward + * @static + * @param {cosmos.distribution.v1beta1.DelegationDelegatorReward} message DelegationDelegatorReward + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DelegationDelegatorReward.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.reward = []; + if (options.defaults) + object.validatorAddress = ""; + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + object.validatorAddress = message.validatorAddress; + if (message.reward && message.reward.length) { + object.reward = []; + for (let j = 0; j < message.reward.length; ++j) + object.reward[j] = $root.cosmos.base.v1beta1.DecCoin.toObject(message.reward[j], options); + } + return object; + }; + + /** + * Converts this DelegationDelegatorReward to JSON. + * @function toJSON + * @memberof cosmos.distribution.v1beta1.DelegationDelegatorReward + * @instance + * @returns {Object.} JSON object + */ + DelegationDelegatorReward.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DelegationDelegatorReward; + })(v1beta1.DelegationDelegatorReward || {}); + + v1beta1.CommunityPoolSpendProposalWithDeposit = (function(CommunityPoolSpendProposalWithDeposit) { + + /** + * Properties of a CommunityPoolSpendProposalWithDeposit. + * @memberof cosmos.distribution.v1beta1 + * @interface ICommunityPoolSpendProposalWithDeposit + * @property {string|null} [title] CommunityPoolSpendProposalWithDeposit title + * @property {string|null} [description] CommunityPoolSpendProposalWithDeposit description + * @property {string|null} [recipient] CommunityPoolSpendProposalWithDeposit recipient + * @property {string|null} [amount] CommunityPoolSpendProposalWithDeposit amount + * @property {string|null} [deposit] CommunityPoolSpendProposalWithDeposit deposit + */ + + /** + * Constructs a new CommunityPoolSpendProposalWithDeposit. + * @memberof cosmos.distribution.v1beta1 + * @classdesc Represents a CommunityPoolSpendProposalWithDeposit. + * @implements ICommunityPoolSpendProposalWithDeposit + * @constructor + * @param {cosmos.distribution.v1beta1.ICommunityPoolSpendProposalWithDeposit=} [properties] Properties to set + */ + function CommunityPoolSpendProposalWithDeposit(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CommunityPoolSpendProposalWithDeposit title. + * @member {string} title + * @memberof cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit + * @instance + */ + CommunityPoolSpendProposalWithDeposit.prototype.title = ""; + + /** + * CommunityPoolSpendProposalWithDeposit description. + * @member {string} description + * @memberof cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit + * @instance + */ + CommunityPoolSpendProposalWithDeposit.prototype.description = ""; + + /** + * CommunityPoolSpendProposalWithDeposit recipient. + * @member {string} recipient + * @memberof cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit + * @instance + */ + CommunityPoolSpendProposalWithDeposit.prototype.recipient = ""; + + /** + * CommunityPoolSpendProposalWithDeposit amount. + * @member {string} amount + * @memberof cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit + * @instance + */ + CommunityPoolSpendProposalWithDeposit.prototype.amount = ""; + + /** + * CommunityPoolSpendProposalWithDeposit deposit. + * @member {string} deposit + * @memberof cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit + * @instance + */ + CommunityPoolSpendProposalWithDeposit.prototype.deposit = ""; + + /** + * Creates a new CommunityPoolSpendProposalWithDeposit instance using the specified properties. + * @function create + * @memberof cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit + * @static + * @param {cosmos.distribution.v1beta1.ICommunityPoolSpendProposalWithDeposit=} [properties] Properties to set + * @returns {cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit} CommunityPoolSpendProposalWithDeposit instance + */ + CommunityPoolSpendProposalWithDeposit.create = function create(properties) { + return new CommunityPoolSpendProposalWithDeposit(properties); + }; + + /** + * Encodes the specified CommunityPoolSpendProposalWithDeposit message. Does not implicitly {@link cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.verify|verify} messages. + * @function encode + * @memberof cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit + * @static + * @param {cosmos.distribution.v1beta1.ICommunityPoolSpendProposalWithDeposit} message CommunityPoolSpendProposalWithDeposit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommunityPoolSpendProposalWithDeposit.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.title != null && Object.hasOwnProperty.call(message, "title")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.title); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.recipient != null && Object.hasOwnProperty.call(message, "recipient")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.recipient); + if (message.amount != null && Object.hasOwnProperty.call(message, "amount")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.amount); + if (message.deposit != null && Object.hasOwnProperty.call(message, "deposit")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.deposit); + return writer; + }; + + /** + * Encodes the specified CommunityPoolSpendProposalWithDeposit message, length delimited. Does not implicitly {@link cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit + * @static + * @param {cosmos.distribution.v1beta1.ICommunityPoolSpendProposalWithDeposit} message CommunityPoolSpendProposalWithDeposit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommunityPoolSpendProposalWithDeposit.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CommunityPoolSpendProposalWithDeposit message from the specified reader or buffer. + * @function decode + * @memberof cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit} CommunityPoolSpendProposalWithDeposit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommunityPoolSpendProposalWithDeposit.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.title = reader.string(); + break; + case 2: + message.description = reader.string(); + break; + case 3: + message.recipient = reader.string(); + break; + case 4: + message.amount = reader.string(); + break; + case 5: + message.deposit = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CommunityPoolSpendProposalWithDeposit message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit} CommunityPoolSpendProposalWithDeposit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommunityPoolSpendProposalWithDeposit.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CommunityPoolSpendProposalWithDeposit message. + * @function verify + * @memberof cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CommunityPoolSpendProposalWithDeposit.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.title != null && message.hasOwnProperty("title")) + if (!$util.isString(message.title)) + return "title: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.recipient != null && message.hasOwnProperty("recipient")) + if (!$util.isString(message.recipient)) + return "recipient: string expected"; + if (message.amount != null && message.hasOwnProperty("amount")) + if (!$util.isString(message.amount)) + return "amount: string expected"; + if (message.deposit != null && message.hasOwnProperty("deposit")) + if (!$util.isString(message.deposit)) + return "deposit: string expected"; + return null; + }; + + /** + * Creates a CommunityPoolSpendProposalWithDeposit message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit + * @static + * @param {Object.} object Plain object + * @returns {cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit} CommunityPoolSpendProposalWithDeposit + */ + CommunityPoolSpendProposalWithDeposit.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit) + return object; + let message = new $root.cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit(); + if (object.title != null) + message.title = String(object.title); + if (object.description != null) + message.description = String(object.description); + if (object.recipient != null) + message.recipient = String(object.recipient); + if (object.amount != null) + message.amount = String(object.amount); + if (object.deposit != null) + message.deposit = String(object.deposit); + return message; + }; + + /** + * Creates a plain object from a CommunityPoolSpendProposalWithDeposit message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit + * @static + * @param {cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit} message CommunityPoolSpendProposalWithDeposit + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CommunityPoolSpendProposalWithDeposit.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.title = ""; + object.description = ""; + object.recipient = ""; + object.amount = ""; + object.deposit = ""; + } + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.recipient != null && message.hasOwnProperty("recipient")) + object.recipient = message.recipient; + if (message.amount != null && message.hasOwnProperty("amount")) + object.amount = message.amount; + if (message.deposit != null && message.hasOwnProperty("deposit")) + object.deposit = message.deposit; + return object; + }; + + /** + * Converts this CommunityPoolSpendProposalWithDeposit to JSON. + * @function toJSON + * @memberof cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit + * @instance + * @returns {Object.} JSON object + */ + CommunityPoolSpendProposalWithDeposit.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CommunityPoolSpendProposalWithDeposit; + })(v1beta1.CommunityPoolSpendProposalWithDeposit || {}); + + v1beta1.DelegatorWithdrawInfo = (function(DelegatorWithdrawInfo) { + + /** + * Properties of a DelegatorWithdrawInfo. + * @memberof cosmos.distribution.v1beta1 + * @interface IDelegatorWithdrawInfo + * @property {string|null} [delegatorAddress] DelegatorWithdrawInfo delegatorAddress + * @property {string|null} [withdrawAddress] DelegatorWithdrawInfo withdrawAddress + */ + + /** + * Constructs a new DelegatorWithdrawInfo. + * @memberof cosmos.distribution.v1beta1 + * @classdesc Represents a DelegatorWithdrawInfo. + * @implements IDelegatorWithdrawInfo + * @constructor + * @param {cosmos.distribution.v1beta1.IDelegatorWithdrawInfo=} [properties] Properties to set + */ + function DelegatorWithdrawInfo(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DelegatorWithdrawInfo delegatorAddress. + * @member {string} delegatorAddress + * @memberof cosmos.distribution.v1beta1.DelegatorWithdrawInfo + * @instance + */ + DelegatorWithdrawInfo.prototype.delegatorAddress = ""; + + /** + * DelegatorWithdrawInfo withdrawAddress. + * @member {string} withdrawAddress + * @memberof cosmos.distribution.v1beta1.DelegatorWithdrawInfo + * @instance + */ + DelegatorWithdrawInfo.prototype.withdrawAddress = ""; + + /** + * Creates a new DelegatorWithdrawInfo instance using the specified properties. + * @function create + * @memberof cosmos.distribution.v1beta1.DelegatorWithdrawInfo + * @static + * @param {cosmos.distribution.v1beta1.IDelegatorWithdrawInfo=} [properties] Properties to set + * @returns {cosmos.distribution.v1beta1.DelegatorWithdrawInfo} DelegatorWithdrawInfo instance + */ + DelegatorWithdrawInfo.create = function create(properties) { + return new DelegatorWithdrawInfo(properties); + }; + + /** + * Encodes the specified DelegatorWithdrawInfo message. Does not implicitly {@link cosmos.distribution.v1beta1.DelegatorWithdrawInfo.verify|verify} messages. + * @function encode + * @memberof cosmos.distribution.v1beta1.DelegatorWithdrawInfo + * @static + * @param {cosmos.distribution.v1beta1.IDelegatorWithdrawInfo} message DelegatorWithdrawInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DelegatorWithdrawInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.delegatorAddress != null && Object.hasOwnProperty.call(message, "delegatorAddress")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.delegatorAddress); + if (message.withdrawAddress != null && Object.hasOwnProperty.call(message, "withdrawAddress")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.withdrawAddress); + return writer; + }; + + /** + * Encodes the specified DelegatorWithdrawInfo message, length delimited. Does not implicitly {@link cosmos.distribution.v1beta1.DelegatorWithdrawInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.distribution.v1beta1.DelegatorWithdrawInfo + * @static + * @param {cosmos.distribution.v1beta1.IDelegatorWithdrawInfo} message DelegatorWithdrawInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DelegatorWithdrawInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DelegatorWithdrawInfo message from the specified reader or buffer. + * @function decode + * @memberof cosmos.distribution.v1beta1.DelegatorWithdrawInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.distribution.v1beta1.DelegatorWithdrawInfo} DelegatorWithdrawInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DelegatorWithdrawInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.distribution.v1beta1.DelegatorWithdrawInfo(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.delegatorAddress = reader.string(); + break; + case 2: + message.withdrawAddress = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DelegatorWithdrawInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.distribution.v1beta1.DelegatorWithdrawInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.distribution.v1beta1.DelegatorWithdrawInfo} DelegatorWithdrawInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DelegatorWithdrawInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DelegatorWithdrawInfo message. + * @function verify + * @memberof cosmos.distribution.v1beta1.DelegatorWithdrawInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DelegatorWithdrawInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + if (!$util.isString(message.delegatorAddress)) + return "delegatorAddress: string expected"; + if (message.withdrawAddress != null && message.hasOwnProperty("withdrawAddress")) + if (!$util.isString(message.withdrawAddress)) + return "withdrawAddress: string expected"; + return null; + }; + + /** + * Creates a DelegatorWithdrawInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.distribution.v1beta1.DelegatorWithdrawInfo + * @static + * @param {Object.} object Plain object + * @returns {cosmos.distribution.v1beta1.DelegatorWithdrawInfo} DelegatorWithdrawInfo + */ + DelegatorWithdrawInfo.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.distribution.v1beta1.DelegatorWithdrawInfo) + return object; + let message = new $root.cosmos.distribution.v1beta1.DelegatorWithdrawInfo(); + if (object.delegatorAddress != null) + message.delegatorAddress = String(object.delegatorAddress); + if (object.withdrawAddress != null) + message.withdrawAddress = String(object.withdrawAddress); + return message; + }; + + /** + * Creates a plain object from a DelegatorWithdrawInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.distribution.v1beta1.DelegatorWithdrawInfo + * @static + * @param {cosmos.distribution.v1beta1.DelegatorWithdrawInfo} message DelegatorWithdrawInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DelegatorWithdrawInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.delegatorAddress = ""; + object.withdrawAddress = ""; + } + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + object.delegatorAddress = message.delegatorAddress; + if (message.withdrawAddress != null && message.hasOwnProperty("withdrawAddress")) + object.withdrawAddress = message.withdrawAddress; + return object; + }; + + /** + * Converts this DelegatorWithdrawInfo to JSON. + * @function toJSON + * @memberof cosmos.distribution.v1beta1.DelegatorWithdrawInfo + * @instance + * @returns {Object.} JSON object + */ + DelegatorWithdrawInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DelegatorWithdrawInfo; + })(v1beta1.DelegatorWithdrawInfo || {}); + + v1beta1.ValidatorOutstandingRewardsRecord = (function(ValidatorOutstandingRewardsRecord) { + + /** + * Properties of a ValidatorOutstandingRewardsRecord. + * @memberof cosmos.distribution.v1beta1 + * @interface IValidatorOutstandingRewardsRecord + * @property {string|null} [validatorAddress] ValidatorOutstandingRewardsRecord validatorAddress + * @property {Array.|null} [outstandingRewards] ValidatorOutstandingRewardsRecord outstandingRewards + */ + + /** + * Constructs a new ValidatorOutstandingRewardsRecord. + * @memberof cosmos.distribution.v1beta1 + * @classdesc Represents a ValidatorOutstandingRewardsRecord. + * @implements IValidatorOutstandingRewardsRecord + * @constructor + * @param {cosmos.distribution.v1beta1.IValidatorOutstandingRewardsRecord=} [properties] Properties to set + */ + function ValidatorOutstandingRewardsRecord(properties) { + this.outstandingRewards = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ValidatorOutstandingRewardsRecord validatorAddress. + * @member {string} validatorAddress + * @memberof cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord + * @instance + */ + ValidatorOutstandingRewardsRecord.prototype.validatorAddress = ""; + + /** + * ValidatorOutstandingRewardsRecord outstandingRewards. + * @member {Array.} outstandingRewards + * @memberof cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord + * @instance + */ + ValidatorOutstandingRewardsRecord.prototype.outstandingRewards = $util.emptyArray; + + /** + * Creates a new ValidatorOutstandingRewardsRecord instance using the specified properties. + * @function create + * @memberof cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord + * @static + * @param {cosmos.distribution.v1beta1.IValidatorOutstandingRewardsRecord=} [properties] Properties to set + * @returns {cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord} ValidatorOutstandingRewardsRecord instance + */ + ValidatorOutstandingRewardsRecord.create = function create(properties) { + return new ValidatorOutstandingRewardsRecord(properties); + }; + + /** + * Encodes the specified ValidatorOutstandingRewardsRecord message. Does not implicitly {@link cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord.verify|verify} messages. + * @function encode + * @memberof cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord + * @static + * @param {cosmos.distribution.v1beta1.IValidatorOutstandingRewardsRecord} message ValidatorOutstandingRewardsRecord message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValidatorOutstandingRewardsRecord.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.validatorAddress != null && Object.hasOwnProperty.call(message, "validatorAddress")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.validatorAddress); + if (message.outstandingRewards != null && message.outstandingRewards.length) + for (let i = 0; i < message.outstandingRewards.length; ++i) + $root.cosmos.base.v1beta1.DecCoin.encode(message.outstandingRewards[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ValidatorOutstandingRewardsRecord message, length delimited. Does not implicitly {@link cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord + * @static + * @param {cosmos.distribution.v1beta1.IValidatorOutstandingRewardsRecord} message ValidatorOutstandingRewardsRecord message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValidatorOutstandingRewardsRecord.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ValidatorOutstandingRewardsRecord message from the specified reader or buffer. + * @function decode + * @memberof cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord} ValidatorOutstandingRewardsRecord + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValidatorOutstandingRewardsRecord.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.validatorAddress = reader.string(); + break; + case 2: + if (!(message.outstandingRewards && message.outstandingRewards.length)) + message.outstandingRewards = []; + message.outstandingRewards.push($root.cosmos.base.v1beta1.DecCoin.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ValidatorOutstandingRewardsRecord message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord} ValidatorOutstandingRewardsRecord + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValidatorOutstandingRewardsRecord.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ValidatorOutstandingRewardsRecord message. + * @function verify + * @memberof cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ValidatorOutstandingRewardsRecord.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + if (!$util.isString(message.validatorAddress)) + return "validatorAddress: string expected"; + if (message.outstandingRewards != null && message.hasOwnProperty("outstandingRewards")) { + if (!Array.isArray(message.outstandingRewards)) + return "outstandingRewards: array expected"; + for (let i = 0; i < message.outstandingRewards.length; ++i) { + let error = $root.cosmos.base.v1beta1.DecCoin.verify(message.outstandingRewards[i]); + if (error) + return "outstandingRewards." + error; + } + } + return null; + }; + + /** + * Creates a ValidatorOutstandingRewardsRecord message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord + * @static + * @param {Object.} object Plain object + * @returns {cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord} ValidatorOutstandingRewardsRecord + */ + ValidatorOutstandingRewardsRecord.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord) + return object; + let message = new $root.cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord(); + if (object.validatorAddress != null) + message.validatorAddress = String(object.validatorAddress); + if (object.outstandingRewards) { + if (!Array.isArray(object.outstandingRewards)) + throw TypeError(".cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord.outstandingRewards: array expected"); + message.outstandingRewards = []; + for (let i = 0; i < object.outstandingRewards.length; ++i) { + if (typeof object.outstandingRewards[i] !== "object") + throw TypeError(".cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord.outstandingRewards: object expected"); + message.outstandingRewards[i] = $root.cosmos.base.v1beta1.DecCoin.fromObject(object.outstandingRewards[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ValidatorOutstandingRewardsRecord message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord + * @static + * @param {cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord} message ValidatorOutstandingRewardsRecord + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ValidatorOutstandingRewardsRecord.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.outstandingRewards = []; + if (options.defaults) + object.validatorAddress = ""; + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + object.validatorAddress = message.validatorAddress; + if (message.outstandingRewards && message.outstandingRewards.length) { + object.outstandingRewards = []; + for (let j = 0; j < message.outstandingRewards.length; ++j) + object.outstandingRewards[j] = $root.cosmos.base.v1beta1.DecCoin.toObject(message.outstandingRewards[j], options); + } + return object; + }; + + /** + * Converts this ValidatorOutstandingRewardsRecord to JSON. + * @function toJSON + * @memberof cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord + * @instance + * @returns {Object.} JSON object + */ + ValidatorOutstandingRewardsRecord.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ValidatorOutstandingRewardsRecord; + })(v1beta1.ValidatorOutstandingRewardsRecord || {}); + + v1beta1.ValidatorAccumulatedCommissionRecord = (function(ValidatorAccumulatedCommissionRecord) { + + /** + * Properties of a ValidatorAccumulatedCommissionRecord. + * @memberof cosmos.distribution.v1beta1 + * @interface IValidatorAccumulatedCommissionRecord + * @property {string|null} [validatorAddress] ValidatorAccumulatedCommissionRecord validatorAddress + * @property {cosmos.distribution.v1beta1.IValidatorAccumulatedCommission|null} [accumulated] ValidatorAccumulatedCommissionRecord accumulated + */ + + /** + * Constructs a new ValidatorAccumulatedCommissionRecord. + * @memberof cosmos.distribution.v1beta1 + * @classdesc Represents a ValidatorAccumulatedCommissionRecord. + * @implements IValidatorAccumulatedCommissionRecord + * @constructor + * @param {cosmos.distribution.v1beta1.IValidatorAccumulatedCommissionRecord=} [properties] Properties to set + */ + function ValidatorAccumulatedCommissionRecord(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ValidatorAccumulatedCommissionRecord validatorAddress. + * @member {string} validatorAddress + * @memberof cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord + * @instance + */ + ValidatorAccumulatedCommissionRecord.prototype.validatorAddress = ""; + + /** + * ValidatorAccumulatedCommissionRecord accumulated. + * @member {cosmos.distribution.v1beta1.IValidatorAccumulatedCommission|null|undefined} accumulated + * @memberof cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord + * @instance + */ + ValidatorAccumulatedCommissionRecord.prototype.accumulated = null; + + /** + * Creates a new ValidatorAccumulatedCommissionRecord instance using the specified properties. + * @function create + * @memberof cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord + * @static + * @param {cosmos.distribution.v1beta1.IValidatorAccumulatedCommissionRecord=} [properties] Properties to set + * @returns {cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord} ValidatorAccumulatedCommissionRecord instance + */ + ValidatorAccumulatedCommissionRecord.create = function create(properties) { + return new ValidatorAccumulatedCommissionRecord(properties); + }; + + /** + * Encodes the specified ValidatorAccumulatedCommissionRecord message. Does not implicitly {@link cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord.verify|verify} messages. + * @function encode + * @memberof cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord + * @static + * @param {cosmos.distribution.v1beta1.IValidatorAccumulatedCommissionRecord} message ValidatorAccumulatedCommissionRecord message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValidatorAccumulatedCommissionRecord.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.validatorAddress != null && Object.hasOwnProperty.call(message, "validatorAddress")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.validatorAddress); + if (message.accumulated != null && Object.hasOwnProperty.call(message, "accumulated")) + $root.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission.encode(message.accumulated, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ValidatorAccumulatedCommissionRecord message, length delimited. Does not implicitly {@link cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord + * @static + * @param {cosmos.distribution.v1beta1.IValidatorAccumulatedCommissionRecord} message ValidatorAccumulatedCommissionRecord message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValidatorAccumulatedCommissionRecord.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ValidatorAccumulatedCommissionRecord message from the specified reader or buffer. + * @function decode + * @memberof cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord} ValidatorAccumulatedCommissionRecord + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValidatorAccumulatedCommissionRecord.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.validatorAddress = reader.string(); + break; + case 2: + message.accumulated = $root.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ValidatorAccumulatedCommissionRecord message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord} ValidatorAccumulatedCommissionRecord + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValidatorAccumulatedCommissionRecord.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ValidatorAccumulatedCommissionRecord message. + * @function verify + * @memberof cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ValidatorAccumulatedCommissionRecord.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + if (!$util.isString(message.validatorAddress)) + return "validatorAddress: string expected"; + if (message.accumulated != null && message.hasOwnProperty("accumulated")) { + let error = $root.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission.verify(message.accumulated); + if (error) + return "accumulated." + error; + } + return null; + }; + + /** + * Creates a ValidatorAccumulatedCommissionRecord message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord + * @static + * @param {Object.} object Plain object + * @returns {cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord} ValidatorAccumulatedCommissionRecord + */ + ValidatorAccumulatedCommissionRecord.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord) + return object; + let message = new $root.cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord(); + if (object.validatorAddress != null) + message.validatorAddress = String(object.validatorAddress); + if (object.accumulated != null) { + if (typeof object.accumulated !== "object") + throw TypeError(".cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord.accumulated: object expected"); + message.accumulated = $root.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission.fromObject(object.accumulated); + } + return message; + }; + + /** + * Creates a plain object from a ValidatorAccumulatedCommissionRecord message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord + * @static + * @param {cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord} message ValidatorAccumulatedCommissionRecord + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ValidatorAccumulatedCommissionRecord.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.validatorAddress = ""; + object.accumulated = null; + } + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + object.validatorAddress = message.validatorAddress; + if (message.accumulated != null && message.hasOwnProperty("accumulated")) + object.accumulated = $root.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission.toObject(message.accumulated, options); + return object; + }; + + /** + * Converts this ValidatorAccumulatedCommissionRecord to JSON. + * @function toJSON + * @memberof cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord + * @instance + * @returns {Object.} JSON object + */ + ValidatorAccumulatedCommissionRecord.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ValidatorAccumulatedCommissionRecord; + })(v1beta1.ValidatorAccumulatedCommissionRecord || {}); + + v1beta1.ValidatorHistoricalRewardsRecord = (function(ValidatorHistoricalRewardsRecord) { + + /** + * Properties of a ValidatorHistoricalRewardsRecord. + * @memberof cosmos.distribution.v1beta1 + * @interface IValidatorHistoricalRewardsRecord + * @property {string|null} [validatorAddress] ValidatorHistoricalRewardsRecord validatorAddress + * @property {number|Long|null} [period] ValidatorHistoricalRewardsRecord period + * @property {cosmos.distribution.v1beta1.IValidatorHistoricalRewards|null} [rewards] ValidatorHistoricalRewardsRecord rewards + */ + + /** + * Constructs a new ValidatorHistoricalRewardsRecord. + * @memberof cosmos.distribution.v1beta1 + * @classdesc Represents a ValidatorHistoricalRewardsRecord. + * @implements IValidatorHistoricalRewardsRecord + * @constructor + * @param {cosmos.distribution.v1beta1.IValidatorHistoricalRewardsRecord=} [properties] Properties to set + */ + function ValidatorHistoricalRewardsRecord(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ValidatorHistoricalRewardsRecord validatorAddress. + * @member {string} validatorAddress + * @memberof cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord + * @instance + */ + ValidatorHistoricalRewardsRecord.prototype.validatorAddress = ""; + + /** + * ValidatorHistoricalRewardsRecord period. + * @member {number|Long} period + * @memberof cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord + * @instance + */ + ValidatorHistoricalRewardsRecord.prototype.period = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * ValidatorHistoricalRewardsRecord rewards. + * @member {cosmos.distribution.v1beta1.IValidatorHistoricalRewards|null|undefined} rewards + * @memberof cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord + * @instance + */ + ValidatorHistoricalRewardsRecord.prototype.rewards = null; + + /** + * Creates a new ValidatorHistoricalRewardsRecord instance using the specified properties. + * @function create + * @memberof cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord + * @static + * @param {cosmos.distribution.v1beta1.IValidatorHistoricalRewardsRecord=} [properties] Properties to set + * @returns {cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord} ValidatorHistoricalRewardsRecord instance + */ + ValidatorHistoricalRewardsRecord.create = function create(properties) { + return new ValidatorHistoricalRewardsRecord(properties); + }; + + /** + * Encodes the specified ValidatorHistoricalRewardsRecord message. Does not implicitly {@link cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord.verify|verify} messages. + * @function encode + * @memberof cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord + * @static + * @param {cosmos.distribution.v1beta1.IValidatorHistoricalRewardsRecord} message ValidatorHistoricalRewardsRecord message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValidatorHistoricalRewardsRecord.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.validatorAddress != null && Object.hasOwnProperty.call(message, "validatorAddress")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.validatorAddress); + if (message.period != null && Object.hasOwnProperty.call(message, "period")) + writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.period); + if (message.rewards != null && Object.hasOwnProperty.call(message, "rewards")) + $root.cosmos.distribution.v1beta1.ValidatorHistoricalRewards.encode(message.rewards, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ValidatorHistoricalRewardsRecord message, length delimited. Does not implicitly {@link cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord + * @static + * @param {cosmos.distribution.v1beta1.IValidatorHistoricalRewardsRecord} message ValidatorHistoricalRewardsRecord message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValidatorHistoricalRewardsRecord.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ValidatorHistoricalRewardsRecord message from the specified reader or buffer. + * @function decode + * @memberof cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord} ValidatorHistoricalRewardsRecord + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValidatorHistoricalRewardsRecord.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.validatorAddress = reader.string(); + break; + case 2: + message.period = reader.uint64(); + break; + case 3: + message.rewards = $root.cosmos.distribution.v1beta1.ValidatorHistoricalRewards.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ValidatorHistoricalRewardsRecord message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord} ValidatorHistoricalRewardsRecord + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValidatorHistoricalRewardsRecord.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ValidatorHistoricalRewardsRecord message. + * @function verify + * @memberof cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ValidatorHistoricalRewardsRecord.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + if (!$util.isString(message.validatorAddress)) + return "validatorAddress: string expected"; + if (message.period != null && message.hasOwnProperty("period")) + if (!$util.isInteger(message.period) && !(message.period && $util.isInteger(message.period.low) && $util.isInteger(message.period.high))) + return "period: integer|Long expected"; + if (message.rewards != null && message.hasOwnProperty("rewards")) { + let error = $root.cosmos.distribution.v1beta1.ValidatorHistoricalRewards.verify(message.rewards); + if (error) + return "rewards." + error; + } + return null; + }; + + /** + * Creates a ValidatorHistoricalRewardsRecord message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord + * @static + * @param {Object.} object Plain object + * @returns {cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord} ValidatorHistoricalRewardsRecord + */ + ValidatorHistoricalRewardsRecord.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord) + return object; + let message = new $root.cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord(); + if (object.validatorAddress != null) + message.validatorAddress = String(object.validatorAddress); + if (object.period != null) + if ($util.Long) + (message.period = $util.Long.fromValue(object.period)).unsigned = true; + else if (typeof object.period === "string") + message.period = parseInt(object.period, 10); + else if (typeof object.period === "number") + message.period = object.period; + else if (typeof object.period === "object") + message.period = new $util.LongBits(object.period.low >>> 0, object.period.high >>> 0).toNumber(true); + if (object.rewards != null) { + if (typeof object.rewards !== "object") + throw TypeError(".cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord.rewards: object expected"); + message.rewards = $root.cosmos.distribution.v1beta1.ValidatorHistoricalRewards.fromObject(object.rewards); + } + return message; + }; + + /** + * Creates a plain object from a ValidatorHistoricalRewardsRecord message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord + * @static + * @param {cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord} message ValidatorHistoricalRewardsRecord + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ValidatorHistoricalRewardsRecord.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.validatorAddress = ""; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.period = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.period = options.longs === String ? "0" : 0; + object.rewards = null; + } + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + object.validatorAddress = message.validatorAddress; + if (message.period != null && message.hasOwnProperty("period")) + if (typeof message.period === "number") + object.period = options.longs === String ? String(message.period) : message.period; + else + object.period = options.longs === String ? $util.Long.prototype.toString.call(message.period) : options.longs === Number ? new $util.LongBits(message.period.low >>> 0, message.period.high >>> 0).toNumber(true) : message.period; + if (message.rewards != null && message.hasOwnProperty("rewards")) + object.rewards = $root.cosmos.distribution.v1beta1.ValidatorHistoricalRewards.toObject(message.rewards, options); + return object; + }; + + /** + * Converts this ValidatorHistoricalRewardsRecord to JSON. + * @function toJSON + * @memberof cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord + * @instance + * @returns {Object.} JSON object + */ + ValidatorHistoricalRewardsRecord.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ValidatorHistoricalRewardsRecord; + })(v1beta1.ValidatorHistoricalRewardsRecord || {}); + + v1beta1.ValidatorCurrentRewardsRecord = (function(ValidatorCurrentRewardsRecord) { + + /** + * Properties of a ValidatorCurrentRewardsRecord. + * @memberof cosmos.distribution.v1beta1 + * @interface IValidatorCurrentRewardsRecord + * @property {string|null} [validatorAddress] ValidatorCurrentRewardsRecord validatorAddress + * @property {cosmos.distribution.v1beta1.IValidatorCurrentRewards|null} [rewards] ValidatorCurrentRewardsRecord rewards + */ + + /** + * Constructs a new ValidatorCurrentRewardsRecord. + * @memberof cosmos.distribution.v1beta1 + * @classdesc Represents a ValidatorCurrentRewardsRecord. + * @implements IValidatorCurrentRewardsRecord + * @constructor + * @param {cosmos.distribution.v1beta1.IValidatorCurrentRewardsRecord=} [properties] Properties to set + */ + function ValidatorCurrentRewardsRecord(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ValidatorCurrentRewardsRecord validatorAddress. + * @member {string} validatorAddress + * @memberof cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord + * @instance + */ + ValidatorCurrentRewardsRecord.prototype.validatorAddress = ""; + + /** + * ValidatorCurrentRewardsRecord rewards. + * @member {cosmos.distribution.v1beta1.IValidatorCurrentRewards|null|undefined} rewards + * @memberof cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord + * @instance + */ + ValidatorCurrentRewardsRecord.prototype.rewards = null; + + /** + * Creates a new ValidatorCurrentRewardsRecord instance using the specified properties. + * @function create + * @memberof cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord + * @static + * @param {cosmos.distribution.v1beta1.IValidatorCurrentRewardsRecord=} [properties] Properties to set + * @returns {cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord} ValidatorCurrentRewardsRecord instance + */ + ValidatorCurrentRewardsRecord.create = function create(properties) { + return new ValidatorCurrentRewardsRecord(properties); + }; + + /** + * Encodes the specified ValidatorCurrentRewardsRecord message. Does not implicitly {@link cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord.verify|verify} messages. + * @function encode + * @memberof cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord + * @static + * @param {cosmos.distribution.v1beta1.IValidatorCurrentRewardsRecord} message ValidatorCurrentRewardsRecord message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValidatorCurrentRewardsRecord.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.validatorAddress != null && Object.hasOwnProperty.call(message, "validatorAddress")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.validatorAddress); + if (message.rewards != null && Object.hasOwnProperty.call(message, "rewards")) + $root.cosmos.distribution.v1beta1.ValidatorCurrentRewards.encode(message.rewards, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ValidatorCurrentRewardsRecord message, length delimited. Does not implicitly {@link cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord + * @static + * @param {cosmos.distribution.v1beta1.IValidatorCurrentRewardsRecord} message ValidatorCurrentRewardsRecord message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValidatorCurrentRewardsRecord.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ValidatorCurrentRewardsRecord message from the specified reader or buffer. + * @function decode + * @memberof cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord} ValidatorCurrentRewardsRecord + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValidatorCurrentRewardsRecord.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.validatorAddress = reader.string(); + break; + case 2: + message.rewards = $root.cosmos.distribution.v1beta1.ValidatorCurrentRewards.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ValidatorCurrentRewardsRecord message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord} ValidatorCurrentRewardsRecord + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValidatorCurrentRewardsRecord.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ValidatorCurrentRewardsRecord message. + * @function verify + * @memberof cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ValidatorCurrentRewardsRecord.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + if (!$util.isString(message.validatorAddress)) + return "validatorAddress: string expected"; + if (message.rewards != null && message.hasOwnProperty("rewards")) { + let error = $root.cosmos.distribution.v1beta1.ValidatorCurrentRewards.verify(message.rewards); + if (error) + return "rewards." + error; + } + return null; + }; + + /** + * Creates a ValidatorCurrentRewardsRecord message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord + * @static + * @param {Object.} object Plain object + * @returns {cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord} ValidatorCurrentRewardsRecord + */ + ValidatorCurrentRewardsRecord.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord) + return object; + let message = new $root.cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord(); + if (object.validatorAddress != null) + message.validatorAddress = String(object.validatorAddress); + if (object.rewards != null) { + if (typeof object.rewards !== "object") + throw TypeError(".cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord.rewards: object expected"); + message.rewards = $root.cosmos.distribution.v1beta1.ValidatorCurrentRewards.fromObject(object.rewards); + } + return message; + }; + + /** + * Creates a plain object from a ValidatorCurrentRewardsRecord message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord + * @static + * @param {cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord} message ValidatorCurrentRewardsRecord + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ValidatorCurrentRewardsRecord.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.validatorAddress = ""; + object.rewards = null; + } + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + object.validatorAddress = message.validatorAddress; + if (message.rewards != null && message.hasOwnProperty("rewards")) + object.rewards = $root.cosmos.distribution.v1beta1.ValidatorCurrentRewards.toObject(message.rewards, options); + return object; + }; + + /** + * Converts this ValidatorCurrentRewardsRecord to JSON. + * @function toJSON + * @memberof cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord + * @instance + * @returns {Object.} JSON object + */ + ValidatorCurrentRewardsRecord.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ValidatorCurrentRewardsRecord; + })(v1beta1.ValidatorCurrentRewardsRecord || {}); + + v1beta1.DelegatorStartingInfoRecord = (function(DelegatorStartingInfoRecord) { + + /** + * Properties of a DelegatorStartingInfoRecord. + * @memberof cosmos.distribution.v1beta1 + * @interface IDelegatorStartingInfoRecord + * @property {string|null} [delegatorAddress] DelegatorStartingInfoRecord delegatorAddress + * @property {string|null} [validatorAddress] DelegatorStartingInfoRecord validatorAddress + * @property {cosmos.distribution.v1beta1.IDelegatorStartingInfo|null} [startingInfo] DelegatorStartingInfoRecord startingInfo + */ + + /** + * Constructs a new DelegatorStartingInfoRecord. + * @memberof cosmos.distribution.v1beta1 + * @classdesc Represents a DelegatorStartingInfoRecord. + * @implements IDelegatorStartingInfoRecord + * @constructor + * @param {cosmos.distribution.v1beta1.IDelegatorStartingInfoRecord=} [properties] Properties to set + */ + function DelegatorStartingInfoRecord(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DelegatorStartingInfoRecord delegatorAddress. + * @member {string} delegatorAddress + * @memberof cosmos.distribution.v1beta1.DelegatorStartingInfoRecord + * @instance + */ + DelegatorStartingInfoRecord.prototype.delegatorAddress = ""; + + /** + * DelegatorStartingInfoRecord validatorAddress. + * @member {string} validatorAddress + * @memberof cosmos.distribution.v1beta1.DelegatorStartingInfoRecord + * @instance + */ + DelegatorStartingInfoRecord.prototype.validatorAddress = ""; + + /** + * DelegatorStartingInfoRecord startingInfo. + * @member {cosmos.distribution.v1beta1.IDelegatorStartingInfo|null|undefined} startingInfo + * @memberof cosmos.distribution.v1beta1.DelegatorStartingInfoRecord + * @instance + */ + DelegatorStartingInfoRecord.prototype.startingInfo = null; + + /** + * Creates a new DelegatorStartingInfoRecord instance using the specified properties. + * @function create + * @memberof cosmos.distribution.v1beta1.DelegatorStartingInfoRecord + * @static + * @param {cosmos.distribution.v1beta1.IDelegatorStartingInfoRecord=} [properties] Properties to set + * @returns {cosmos.distribution.v1beta1.DelegatorStartingInfoRecord} DelegatorStartingInfoRecord instance + */ + DelegatorStartingInfoRecord.create = function create(properties) { + return new DelegatorStartingInfoRecord(properties); + }; + + /** + * Encodes the specified DelegatorStartingInfoRecord message. Does not implicitly {@link cosmos.distribution.v1beta1.DelegatorStartingInfoRecord.verify|verify} messages. + * @function encode + * @memberof cosmos.distribution.v1beta1.DelegatorStartingInfoRecord + * @static + * @param {cosmos.distribution.v1beta1.IDelegatorStartingInfoRecord} message DelegatorStartingInfoRecord message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DelegatorStartingInfoRecord.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.delegatorAddress != null && Object.hasOwnProperty.call(message, "delegatorAddress")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.delegatorAddress); + if (message.validatorAddress != null && Object.hasOwnProperty.call(message, "validatorAddress")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.validatorAddress); + if (message.startingInfo != null && Object.hasOwnProperty.call(message, "startingInfo")) + $root.cosmos.distribution.v1beta1.DelegatorStartingInfo.encode(message.startingInfo, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DelegatorStartingInfoRecord message, length delimited. Does not implicitly {@link cosmos.distribution.v1beta1.DelegatorStartingInfoRecord.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.distribution.v1beta1.DelegatorStartingInfoRecord + * @static + * @param {cosmos.distribution.v1beta1.IDelegatorStartingInfoRecord} message DelegatorStartingInfoRecord message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DelegatorStartingInfoRecord.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DelegatorStartingInfoRecord message from the specified reader or buffer. + * @function decode + * @memberof cosmos.distribution.v1beta1.DelegatorStartingInfoRecord + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.distribution.v1beta1.DelegatorStartingInfoRecord} DelegatorStartingInfoRecord + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DelegatorStartingInfoRecord.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.distribution.v1beta1.DelegatorStartingInfoRecord(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.delegatorAddress = reader.string(); + break; + case 2: + message.validatorAddress = reader.string(); + break; + case 3: + message.startingInfo = $root.cosmos.distribution.v1beta1.DelegatorStartingInfo.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DelegatorStartingInfoRecord message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.distribution.v1beta1.DelegatorStartingInfoRecord + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.distribution.v1beta1.DelegatorStartingInfoRecord} DelegatorStartingInfoRecord + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DelegatorStartingInfoRecord.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DelegatorStartingInfoRecord message. + * @function verify + * @memberof cosmos.distribution.v1beta1.DelegatorStartingInfoRecord + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DelegatorStartingInfoRecord.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + if (!$util.isString(message.delegatorAddress)) + return "delegatorAddress: string expected"; + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + if (!$util.isString(message.validatorAddress)) + return "validatorAddress: string expected"; + if (message.startingInfo != null && message.hasOwnProperty("startingInfo")) { + let error = $root.cosmos.distribution.v1beta1.DelegatorStartingInfo.verify(message.startingInfo); + if (error) + return "startingInfo." + error; + } + return null; + }; + + /** + * Creates a DelegatorStartingInfoRecord message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.distribution.v1beta1.DelegatorStartingInfoRecord + * @static + * @param {Object.} object Plain object + * @returns {cosmos.distribution.v1beta1.DelegatorStartingInfoRecord} DelegatorStartingInfoRecord + */ + DelegatorStartingInfoRecord.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.distribution.v1beta1.DelegatorStartingInfoRecord) + return object; + let message = new $root.cosmos.distribution.v1beta1.DelegatorStartingInfoRecord(); + if (object.delegatorAddress != null) + message.delegatorAddress = String(object.delegatorAddress); + if (object.validatorAddress != null) + message.validatorAddress = String(object.validatorAddress); + if (object.startingInfo != null) { + if (typeof object.startingInfo !== "object") + throw TypeError(".cosmos.distribution.v1beta1.DelegatorStartingInfoRecord.startingInfo: object expected"); + message.startingInfo = $root.cosmos.distribution.v1beta1.DelegatorStartingInfo.fromObject(object.startingInfo); + } + return message; + }; + + /** + * Creates a plain object from a DelegatorStartingInfoRecord message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.distribution.v1beta1.DelegatorStartingInfoRecord + * @static + * @param {cosmos.distribution.v1beta1.DelegatorStartingInfoRecord} message DelegatorStartingInfoRecord + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DelegatorStartingInfoRecord.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.delegatorAddress = ""; + object.validatorAddress = ""; + object.startingInfo = null; + } + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + object.delegatorAddress = message.delegatorAddress; + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + object.validatorAddress = message.validatorAddress; + if (message.startingInfo != null && message.hasOwnProperty("startingInfo")) + object.startingInfo = $root.cosmos.distribution.v1beta1.DelegatorStartingInfo.toObject(message.startingInfo, options); + return object; + }; + + /** + * Converts this DelegatorStartingInfoRecord to JSON. + * @function toJSON + * @memberof cosmos.distribution.v1beta1.DelegatorStartingInfoRecord + * @instance + * @returns {Object.} JSON object + */ + DelegatorStartingInfoRecord.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DelegatorStartingInfoRecord; + })(v1beta1.DelegatorStartingInfoRecord || {}); + + v1beta1.ValidatorSlashEventRecord = (function(ValidatorSlashEventRecord) { + + /** + * Properties of a ValidatorSlashEventRecord. + * @memberof cosmos.distribution.v1beta1 + * @interface IValidatorSlashEventRecord + * @property {string|null} [validatorAddress] ValidatorSlashEventRecord validatorAddress + * @property {number|Long|null} [height] ValidatorSlashEventRecord height + * @property {number|Long|null} [period] ValidatorSlashEventRecord period + * @property {cosmos.distribution.v1beta1.IValidatorSlashEvent|null} [validatorSlashEvent] ValidatorSlashEventRecord validatorSlashEvent + */ + + /** + * Constructs a new ValidatorSlashEventRecord. + * @memberof cosmos.distribution.v1beta1 + * @classdesc Represents a ValidatorSlashEventRecord. + * @implements IValidatorSlashEventRecord + * @constructor + * @param {cosmos.distribution.v1beta1.IValidatorSlashEventRecord=} [properties] Properties to set + */ + function ValidatorSlashEventRecord(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ValidatorSlashEventRecord validatorAddress. + * @member {string} validatorAddress + * @memberof cosmos.distribution.v1beta1.ValidatorSlashEventRecord + * @instance + */ + ValidatorSlashEventRecord.prototype.validatorAddress = ""; + + /** + * ValidatorSlashEventRecord height. + * @member {number|Long} height + * @memberof cosmos.distribution.v1beta1.ValidatorSlashEventRecord + * @instance + */ + ValidatorSlashEventRecord.prototype.height = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * ValidatorSlashEventRecord period. + * @member {number|Long} period + * @memberof cosmos.distribution.v1beta1.ValidatorSlashEventRecord + * @instance + */ + ValidatorSlashEventRecord.prototype.period = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * ValidatorSlashEventRecord validatorSlashEvent. + * @member {cosmos.distribution.v1beta1.IValidatorSlashEvent|null|undefined} validatorSlashEvent + * @memberof cosmos.distribution.v1beta1.ValidatorSlashEventRecord + * @instance + */ + ValidatorSlashEventRecord.prototype.validatorSlashEvent = null; + + /** + * Creates a new ValidatorSlashEventRecord instance using the specified properties. + * @function create + * @memberof cosmos.distribution.v1beta1.ValidatorSlashEventRecord + * @static + * @param {cosmos.distribution.v1beta1.IValidatorSlashEventRecord=} [properties] Properties to set + * @returns {cosmos.distribution.v1beta1.ValidatorSlashEventRecord} ValidatorSlashEventRecord instance + */ + ValidatorSlashEventRecord.create = function create(properties) { + return new ValidatorSlashEventRecord(properties); + }; + + /** + * Encodes the specified ValidatorSlashEventRecord message. Does not implicitly {@link cosmos.distribution.v1beta1.ValidatorSlashEventRecord.verify|verify} messages. + * @function encode + * @memberof cosmos.distribution.v1beta1.ValidatorSlashEventRecord + * @static + * @param {cosmos.distribution.v1beta1.IValidatorSlashEventRecord} message ValidatorSlashEventRecord message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValidatorSlashEventRecord.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.validatorAddress != null && Object.hasOwnProperty.call(message, "validatorAddress")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.validatorAddress); + if (message.height != null && Object.hasOwnProperty.call(message, "height")) + writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.height); + if (message.period != null && Object.hasOwnProperty.call(message, "period")) + writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.period); + if (message.validatorSlashEvent != null && Object.hasOwnProperty.call(message, "validatorSlashEvent")) + $root.cosmos.distribution.v1beta1.ValidatorSlashEvent.encode(message.validatorSlashEvent, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ValidatorSlashEventRecord message, length delimited. Does not implicitly {@link cosmos.distribution.v1beta1.ValidatorSlashEventRecord.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.distribution.v1beta1.ValidatorSlashEventRecord + * @static + * @param {cosmos.distribution.v1beta1.IValidatorSlashEventRecord} message ValidatorSlashEventRecord message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValidatorSlashEventRecord.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ValidatorSlashEventRecord message from the specified reader or buffer. + * @function decode + * @memberof cosmos.distribution.v1beta1.ValidatorSlashEventRecord + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.distribution.v1beta1.ValidatorSlashEventRecord} ValidatorSlashEventRecord + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValidatorSlashEventRecord.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.distribution.v1beta1.ValidatorSlashEventRecord(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.validatorAddress = reader.string(); + break; + case 2: + message.height = reader.uint64(); + break; + case 3: + message.period = reader.uint64(); + break; + case 4: + message.validatorSlashEvent = $root.cosmos.distribution.v1beta1.ValidatorSlashEvent.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ValidatorSlashEventRecord message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.distribution.v1beta1.ValidatorSlashEventRecord + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.distribution.v1beta1.ValidatorSlashEventRecord} ValidatorSlashEventRecord + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValidatorSlashEventRecord.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ValidatorSlashEventRecord message. + * @function verify + * @memberof cosmos.distribution.v1beta1.ValidatorSlashEventRecord + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ValidatorSlashEventRecord.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + if (!$util.isString(message.validatorAddress)) + return "validatorAddress: string expected"; + if (message.height != null && message.hasOwnProperty("height")) + if (!$util.isInteger(message.height) && !(message.height && $util.isInteger(message.height.low) && $util.isInteger(message.height.high))) + return "height: integer|Long expected"; + if (message.period != null && message.hasOwnProperty("period")) + if (!$util.isInteger(message.period) && !(message.period && $util.isInteger(message.period.low) && $util.isInteger(message.period.high))) + return "period: integer|Long expected"; + if (message.validatorSlashEvent != null && message.hasOwnProperty("validatorSlashEvent")) { + let error = $root.cosmos.distribution.v1beta1.ValidatorSlashEvent.verify(message.validatorSlashEvent); + if (error) + return "validatorSlashEvent." + error; + } + return null; + }; + + /** + * Creates a ValidatorSlashEventRecord message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.distribution.v1beta1.ValidatorSlashEventRecord + * @static + * @param {Object.} object Plain object + * @returns {cosmos.distribution.v1beta1.ValidatorSlashEventRecord} ValidatorSlashEventRecord + */ + ValidatorSlashEventRecord.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.distribution.v1beta1.ValidatorSlashEventRecord) + return object; + let message = new $root.cosmos.distribution.v1beta1.ValidatorSlashEventRecord(); + if (object.validatorAddress != null) + message.validatorAddress = String(object.validatorAddress); + if (object.height != null) + if ($util.Long) + (message.height = $util.Long.fromValue(object.height)).unsigned = true; + else if (typeof object.height === "string") + message.height = parseInt(object.height, 10); + else if (typeof object.height === "number") + message.height = object.height; + else if (typeof object.height === "object") + message.height = new $util.LongBits(object.height.low >>> 0, object.height.high >>> 0).toNumber(true); + if (object.period != null) + if ($util.Long) + (message.period = $util.Long.fromValue(object.period)).unsigned = true; + else if (typeof object.period === "string") + message.period = parseInt(object.period, 10); + else if (typeof object.period === "number") + message.period = object.period; + else if (typeof object.period === "object") + message.period = new $util.LongBits(object.period.low >>> 0, object.period.high >>> 0).toNumber(true); + if (object.validatorSlashEvent != null) { + if (typeof object.validatorSlashEvent !== "object") + throw TypeError(".cosmos.distribution.v1beta1.ValidatorSlashEventRecord.validatorSlashEvent: object expected"); + message.validatorSlashEvent = $root.cosmos.distribution.v1beta1.ValidatorSlashEvent.fromObject(object.validatorSlashEvent); + } + return message; + }; + + /** + * Creates a plain object from a ValidatorSlashEventRecord message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.distribution.v1beta1.ValidatorSlashEventRecord + * @static + * @param {cosmos.distribution.v1beta1.ValidatorSlashEventRecord} message ValidatorSlashEventRecord + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ValidatorSlashEventRecord.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.validatorAddress = ""; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.height = options.longs === String ? "0" : 0; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.period = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.period = options.longs === String ? "0" : 0; + object.validatorSlashEvent = null; + } + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + object.validatorAddress = message.validatorAddress; + if (message.height != null && message.hasOwnProperty("height")) + if (typeof message.height === "number") + object.height = options.longs === String ? String(message.height) : message.height; + else + object.height = options.longs === String ? $util.Long.prototype.toString.call(message.height) : options.longs === Number ? new $util.LongBits(message.height.low >>> 0, message.height.high >>> 0).toNumber(true) : message.height; + if (message.period != null && message.hasOwnProperty("period")) + if (typeof message.period === "number") + object.period = options.longs === String ? String(message.period) : message.period; + else + object.period = options.longs === String ? $util.Long.prototype.toString.call(message.period) : options.longs === Number ? new $util.LongBits(message.period.low >>> 0, message.period.high >>> 0).toNumber(true) : message.period; + if (message.validatorSlashEvent != null && message.hasOwnProperty("validatorSlashEvent")) + object.validatorSlashEvent = $root.cosmos.distribution.v1beta1.ValidatorSlashEvent.toObject(message.validatorSlashEvent, options); + return object; + }; + + /** + * Converts this ValidatorSlashEventRecord to JSON. + * @function toJSON + * @memberof cosmos.distribution.v1beta1.ValidatorSlashEventRecord + * @instance + * @returns {Object.} JSON object + */ + ValidatorSlashEventRecord.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ValidatorSlashEventRecord; + })(v1beta1.ValidatorSlashEventRecord || {}); + + v1beta1.GenesisState = (function(GenesisState) { + + /** + * Properties of a GenesisState. + * @memberof cosmos.distribution.v1beta1 + * @interface IGenesisState + * @property {cosmos.distribution.v1beta1.IParams|null} [params] GenesisState params + * @property {cosmos.distribution.v1beta1.IFeePool|null} [feePool] GenesisState feePool + * @property {Array.|null} [delegatorWithdrawInfos] GenesisState delegatorWithdrawInfos + * @property {string|null} [previousProposer] GenesisState previousProposer + * @property {Array.|null} [outstandingRewards] GenesisState outstandingRewards + * @property {Array.|null} [validatorAccumulatedCommissions] GenesisState validatorAccumulatedCommissions + * @property {Array.|null} [validatorHistoricalRewards] GenesisState validatorHistoricalRewards + * @property {Array.|null} [validatorCurrentRewards] GenesisState validatorCurrentRewards + * @property {Array.|null} [delegatorStartingInfos] GenesisState delegatorStartingInfos + * @property {Array.|null} [validatorSlashEvents] GenesisState validatorSlashEvents + */ + + /** + * Constructs a new GenesisState. + * @memberof cosmos.distribution.v1beta1 + * @classdesc Represents a GenesisState. + * @implements IGenesisState + * @constructor + * @param {cosmos.distribution.v1beta1.IGenesisState=} [properties] Properties to set + */ + function GenesisState(properties) { + this.delegatorWithdrawInfos = []; + this.outstandingRewards = []; + this.validatorAccumulatedCommissions = []; + this.validatorHistoricalRewards = []; + this.validatorCurrentRewards = []; + this.delegatorStartingInfos = []; + this.validatorSlashEvents = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GenesisState params. + * @member {cosmos.distribution.v1beta1.IParams|null|undefined} params + * @memberof cosmos.distribution.v1beta1.GenesisState + * @instance + */ + GenesisState.prototype.params = null; + + /** + * GenesisState feePool. + * @member {cosmos.distribution.v1beta1.IFeePool|null|undefined} feePool + * @memberof cosmos.distribution.v1beta1.GenesisState + * @instance + */ + GenesisState.prototype.feePool = null; + + /** + * GenesisState delegatorWithdrawInfos. + * @member {Array.} delegatorWithdrawInfos + * @memberof cosmos.distribution.v1beta1.GenesisState + * @instance + */ + GenesisState.prototype.delegatorWithdrawInfos = $util.emptyArray; + + /** + * GenesisState previousProposer. + * @member {string} previousProposer + * @memberof cosmos.distribution.v1beta1.GenesisState + * @instance + */ + GenesisState.prototype.previousProposer = ""; + + /** + * GenesisState outstandingRewards. + * @member {Array.} outstandingRewards + * @memberof cosmos.distribution.v1beta1.GenesisState + * @instance + */ + GenesisState.prototype.outstandingRewards = $util.emptyArray; + + /** + * GenesisState validatorAccumulatedCommissions. + * @member {Array.} validatorAccumulatedCommissions + * @memberof cosmos.distribution.v1beta1.GenesisState + * @instance + */ + GenesisState.prototype.validatorAccumulatedCommissions = $util.emptyArray; + + /** + * GenesisState validatorHistoricalRewards. + * @member {Array.} validatorHistoricalRewards + * @memberof cosmos.distribution.v1beta1.GenesisState + * @instance + */ + GenesisState.prototype.validatorHistoricalRewards = $util.emptyArray; + + /** + * GenesisState validatorCurrentRewards. + * @member {Array.} validatorCurrentRewards + * @memberof cosmos.distribution.v1beta1.GenesisState + * @instance + */ + GenesisState.prototype.validatorCurrentRewards = $util.emptyArray; + + /** + * GenesisState delegatorStartingInfos. + * @member {Array.} delegatorStartingInfos + * @memberof cosmos.distribution.v1beta1.GenesisState + * @instance + */ + GenesisState.prototype.delegatorStartingInfos = $util.emptyArray; + + /** + * GenesisState validatorSlashEvents. + * @member {Array.} validatorSlashEvents + * @memberof cosmos.distribution.v1beta1.GenesisState + * @instance + */ + GenesisState.prototype.validatorSlashEvents = $util.emptyArray; + + /** + * Creates a new GenesisState instance using the specified properties. + * @function create + * @memberof cosmos.distribution.v1beta1.GenesisState + * @static + * @param {cosmos.distribution.v1beta1.IGenesisState=} [properties] Properties to set + * @returns {cosmos.distribution.v1beta1.GenesisState} GenesisState instance + */ + GenesisState.create = function create(properties) { + return new GenesisState(properties); + }; + + /** + * Encodes the specified GenesisState message. Does not implicitly {@link cosmos.distribution.v1beta1.GenesisState.verify|verify} messages. + * @function encode + * @memberof cosmos.distribution.v1beta1.GenesisState + * @static + * @param {cosmos.distribution.v1beta1.IGenesisState} message GenesisState message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenesisState.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.params != null && Object.hasOwnProperty.call(message, "params")) + $root.cosmos.distribution.v1beta1.Params.encode(message.params, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.feePool != null && Object.hasOwnProperty.call(message, "feePool")) + $root.cosmos.distribution.v1beta1.FeePool.encode(message.feePool, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.delegatorWithdrawInfos != null && message.delegatorWithdrawInfos.length) + for (let i = 0; i < message.delegatorWithdrawInfos.length; ++i) + $root.cosmos.distribution.v1beta1.DelegatorWithdrawInfo.encode(message.delegatorWithdrawInfos[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.previousProposer != null && Object.hasOwnProperty.call(message, "previousProposer")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.previousProposer); + if (message.outstandingRewards != null && message.outstandingRewards.length) + for (let i = 0; i < message.outstandingRewards.length; ++i) + $root.cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord.encode(message.outstandingRewards[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.validatorAccumulatedCommissions != null && message.validatorAccumulatedCommissions.length) + for (let i = 0; i < message.validatorAccumulatedCommissions.length; ++i) + $root.cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord.encode(message.validatorAccumulatedCommissions[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.validatorHistoricalRewards != null && message.validatorHistoricalRewards.length) + for (let i = 0; i < message.validatorHistoricalRewards.length; ++i) + $root.cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord.encode(message.validatorHistoricalRewards[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.validatorCurrentRewards != null && message.validatorCurrentRewards.length) + for (let i = 0; i < message.validatorCurrentRewards.length; ++i) + $root.cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord.encode(message.validatorCurrentRewards[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.delegatorStartingInfos != null && message.delegatorStartingInfos.length) + for (let i = 0; i < message.delegatorStartingInfos.length; ++i) + $root.cosmos.distribution.v1beta1.DelegatorStartingInfoRecord.encode(message.delegatorStartingInfos[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.validatorSlashEvents != null && message.validatorSlashEvents.length) + for (let i = 0; i < message.validatorSlashEvents.length; ++i) + $root.cosmos.distribution.v1beta1.ValidatorSlashEventRecord.encode(message.validatorSlashEvents[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GenesisState message, length delimited. Does not implicitly {@link cosmos.distribution.v1beta1.GenesisState.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.distribution.v1beta1.GenesisState + * @static + * @param {cosmos.distribution.v1beta1.IGenesisState} message GenesisState message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenesisState.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GenesisState message from the specified reader or buffer. + * @function decode + * @memberof cosmos.distribution.v1beta1.GenesisState + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.distribution.v1beta1.GenesisState} GenesisState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenesisState.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.distribution.v1beta1.GenesisState(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.params = $root.cosmos.distribution.v1beta1.Params.decode(reader, reader.uint32()); + break; + case 2: + message.feePool = $root.cosmos.distribution.v1beta1.FeePool.decode(reader, reader.uint32()); + break; + case 3: + if (!(message.delegatorWithdrawInfos && message.delegatorWithdrawInfos.length)) + message.delegatorWithdrawInfos = []; + message.delegatorWithdrawInfos.push($root.cosmos.distribution.v1beta1.DelegatorWithdrawInfo.decode(reader, reader.uint32())); + break; + case 4: + message.previousProposer = reader.string(); + break; + case 5: + if (!(message.outstandingRewards && message.outstandingRewards.length)) + message.outstandingRewards = []; + message.outstandingRewards.push($root.cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord.decode(reader, reader.uint32())); + break; + case 6: + if (!(message.validatorAccumulatedCommissions && message.validatorAccumulatedCommissions.length)) + message.validatorAccumulatedCommissions = []; + message.validatorAccumulatedCommissions.push($root.cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord.decode(reader, reader.uint32())); + break; + case 7: + if (!(message.validatorHistoricalRewards && message.validatorHistoricalRewards.length)) + message.validatorHistoricalRewards = []; + message.validatorHistoricalRewards.push($root.cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord.decode(reader, reader.uint32())); + break; + case 8: + if (!(message.validatorCurrentRewards && message.validatorCurrentRewards.length)) + message.validatorCurrentRewards = []; + message.validatorCurrentRewards.push($root.cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord.decode(reader, reader.uint32())); + break; + case 9: + if (!(message.delegatorStartingInfos && message.delegatorStartingInfos.length)) + message.delegatorStartingInfos = []; + message.delegatorStartingInfos.push($root.cosmos.distribution.v1beta1.DelegatorStartingInfoRecord.decode(reader, reader.uint32())); + break; + case 10: + if (!(message.validatorSlashEvents && message.validatorSlashEvents.length)) + message.validatorSlashEvents = []; + message.validatorSlashEvents.push($root.cosmos.distribution.v1beta1.ValidatorSlashEventRecord.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GenesisState message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.distribution.v1beta1.GenesisState + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.distribution.v1beta1.GenesisState} GenesisState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenesisState.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GenesisState message. + * @function verify + * @memberof cosmos.distribution.v1beta1.GenesisState + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GenesisState.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.params != null && message.hasOwnProperty("params")) { + let error = $root.cosmos.distribution.v1beta1.Params.verify(message.params); + if (error) + return "params." + error; + } + if (message.feePool != null && message.hasOwnProperty("feePool")) { + let error = $root.cosmos.distribution.v1beta1.FeePool.verify(message.feePool); + if (error) + return "feePool." + error; + } + if (message.delegatorWithdrawInfos != null && message.hasOwnProperty("delegatorWithdrawInfos")) { + if (!Array.isArray(message.delegatorWithdrawInfos)) + return "delegatorWithdrawInfos: array expected"; + for (let i = 0; i < message.delegatorWithdrawInfos.length; ++i) { + let error = $root.cosmos.distribution.v1beta1.DelegatorWithdrawInfo.verify(message.delegatorWithdrawInfos[i]); + if (error) + return "delegatorWithdrawInfos." + error; + } + } + if (message.previousProposer != null && message.hasOwnProperty("previousProposer")) + if (!$util.isString(message.previousProposer)) + return "previousProposer: string expected"; + if (message.outstandingRewards != null && message.hasOwnProperty("outstandingRewards")) { + if (!Array.isArray(message.outstandingRewards)) + return "outstandingRewards: array expected"; + for (let i = 0; i < message.outstandingRewards.length; ++i) { + let error = $root.cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord.verify(message.outstandingRewards[i]); + if (error) + return "outstandingRewards." + error; + } + } + if (message.validatorAccumulatedCommissions != null && message.hasOwnProperty("validatorAccumulatedCommissions")) { + if (!Array.isArray(message.validatorAccumulatedCommissions)) + return "validatorAccumulatedCommissions: array expected"; + for (let i = 0; i < message.validatorAccumulatedCommissions.length; ++i) { + let error = $root.cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord.verify(message.validatorAccumulatedCommissions[i]); + if (error) + return "validatorAccumulatedCommissions." + error; + } + } + if (message.validatorHistoricalRewards != null && message.hasOwnProperty("validatorHistoricalRewards")) { + if (!Array.isArray(message.validatorHistoricalRewards)) + return "validatorHistoricalRewards: array expected"; + for (let i = 0; i < message.validatorHistoricalRewards.length; ++i) { + let error = $root.cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord.verify(message.validatorHistoricalRewards[i]); + if (error) + return "validatorHistoricalRewards." + error; + } + } + if (message.validatorCurrentRewards != null && message.hasOwnProperty("validatorCurrentRewards")) { + if (!Array.isArray(message.validatorCurrentRewards)) + return "validatorCurrentRewards: array expected"; + for (let i = 0; i < message.validatorCurrentRewards.length; ++i) { + let error = $root.cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord.verify(message.validatorCurrentRewards[i]); + if (error) + return "validatorCurrentRewards." + error; + } + } + if (message.delegatorStartingInfos != null && message.hasOwnProperty("delegatorStartingInfos")) { + if (!Array.isArray(message.delegatorStartingInfos)) + return "delegatorStartingInfos: array expected"; + for (let i = 0; i < message.delegatorStartingInfos.length; ++i) { + let error = $root.cosmos.distribution.v1beta1.DelegatorStartingInfoRecord.verify(message.delegatorStartingInfos[i]); + if (error) + return "delegatorStartingInfos." + error; + } + } + if (message.validatorSlashEvents != null && message.hasOwnProperty("validatorSlashEvents")) { + if (!Array.isArray(message.validatorSlashEvents)) + return "validatorSlashEvents: array expected"; + for (let i = 0; i < message.validatorSlashEvents.length; ++i) { + let error = $root.cosmos.distribution.v1beta1.ValidatorSlashEventRecord.verify(message.validatorSlashEvents[i]); + if (error) + return "validatorSlashEvents." + error; + } + } + return null; + }; + + /** + * Creates a GenesisState message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.distribution.v1beta1.GenesisState + * @static + * @param {Object.} object Plain object + * @returns {cosmos.distribution.v1beta1.GenesisState} GenesisState + */ + GenesisState.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.distribution.v1beta1.GenesisState) + return object; + let message = new $root.cosmos.distribution.v1beta1.GenesisState(); + if (object.params != null) { + if (typeof object.params !== "object") + throw TypeError(".cosmos.distribution.v1beta1.GenesisState.params: object expected"); + message.params = $root.cosmos.distribution.v1beta1.Params.fromObject(object.params); + } + if (object.feePool != null) { + if (typeof object.feePool !== "object") + throw TypeError(".cosmos.distribution.v1beta1.GenesisState.feePool: object expected"); + message.feePool = $root.cosmos.distribution.v1beta1.FeePool.fromObject(object.feePool); + } + if (object.delegatorWithdrawInfos) { + if (!Array.isArray(object.delegatorWithdrawInfos)) + throw TypeError(".cosmos.distribution.v1beta1.GenesisState.delegatorWithdrawInfos: array expected"); + message.delegatorWithdrawInfos = []; + for (let i = 0; i < object.delegatorWithdrawInfos.length; ++i) { + if (typeof object.delegatorWithdrawInfos[i] !== "object") + throw TypeError(".cosmos.distribution.v1beta1.GenesisState.delegatorWithdrawInfos: object expected"); + message.delegatorWithdrawInfos[i] = $root.cosmos.distribution.v1beta1.DelegatorWithdrawInfo.fromObject(object.delegatorWithdrawInfos[i]); + } + } + if (object.previousProposer != null) + message.previousProposer = String(object.previousProposer); + if (object.outstandingRewards) { + if (!Array.isArray(object.outstandingRewards)) + throw TypeError(".cosmos.distribution.v1beta1.GenesisState.outstandingRewards: array expected"); + message.outstandingRewards = []; + for (let i = 0; i < object.outstandingRewards.length; ++i) { + if (typeof object.outstandingRewards[i] !== "object") + throw TypeError(".cosmos.distribution.v1beta1.GenesisState.outstandingRewards: object expected"); + message.outstandingRewards[i] = $root.cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord.fromObject(object.outstandingRewards[i]); + } + } + if (object.validatorAccumulatedCommissions) { + if (!Array.isArray(object.validatorAccumulatedCommissions)) + throw TypeError(".cosmos.distribution.v1beta1.GenesisState.validatorAccumulatedCommissions: array expected"); + message.validatorAccumulatedCommissions = []; + for (let i = 0; i < object.validatorAccumulatedCommissions.length; ++i) { + if (typeof object.validatorAccumulatedCommissions[i] !== "object") + throw TypeError(".cosmos.distribution.v1beta1.GenesisState.validatorAccumulatedCommissions: object expected"); + message.validatorAccumulatedCommissions[i] = $root.cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord.fromObject(object.validatorAccumulatedCommissions[i]); + } + } + if (object.validatorHistoricalRewards) { + if (!Array.isArray(object.validatorHistoricalRewards)) + throw TypeError(".cosmos.distribution.v1beta1.GenesisState.validatorHistoricalRewards: array expected"); + message.validatorHistoricalRewards = []; + for (let i = 0; i < object.validatorHistoricalRewards.length; ++i) { + if (typeof object.validatorHistoricalRewards[i] !== "object") + throw TypeError(".cosmos.distribution.v1beta1.GenesisState.validatorHistoricalRewards: object expected"); + message.validatorHistoricalRewards[i] = $root.cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord.fromObject(object.validatorHistoricalRewards[i]); + } + } + if (object.validatorCurrentRewards) { + if (!Array.isArray(object.validatorCurrentRewards)) + throw TypeError(".cosmos.distribution.v1beta1.GenesisState.validatorCurrentRewards: array expected"); + message.validatorCurrentRewards = []; + for (let i = 0; i < object.validatorCurrentRewards.length; ++i) { + if (typeof object.validatorCurrentRewards[i] !== "object") + throw TypeError(".cosmos.distribution.v1beta1.GenesisState.validatorCurrentRewards: object expected"); + message.validatorCurrentRewards[i] = $root.cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord.fromObject(object.validatorCurrentRewards[i]); + } + } + if (object.delegatorStartingInfos) { + if (!Array.isArray(object.delegatorStartingInfos)) + throw TypeError(".cosmos.distribution.v1beta1.GenesisState.delegatorStartingInfos: array expected"); + message.delegatorStartingInfos = []; + for (let i = 0; i < object.delegatorStartingInfos.length; ++i) { + if (typeof object.delegatorStartingInfos[i] !== "object") + throw TypeError(".cosmos.distribution.v1beta1.GenesisState.delegatorStartingInfos: object expected"); + message.delegatorStartingInfos[i] = $root.cosmos.distribution.v1beta1.DelegatorStartingInfoRecord.fromObject(object.delegatorStartingInfos[i]); + } + } + if (object.validatorSlashEvents) { + if (!Array.isArray(object.validatorSlashEvents)) + throw TypeError(".cosmos.distribution.v1beta1.GenesisState.validatorSlashEvents: array expected"); + message.validatorSlashEvents = []; + for (let i = 0; i < object.validatorSlashEvents.length; ++i) { + if (typeof object.validatorSlashEvents[i] !== "object") + throw TypeError(".cosmos.distribution.v1beta1.GenesisState.validatorSlashEvents: object expected"); + message.validatorSlashEvents[i] = $root.cosmos.distribution.v1beta1.ValidatorSlashEventRecord.fromObject(object.validatorSlashEvents[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a GenesisState message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.distribution.v1beta1.GenesisState + * @static + * @param {cosmos.distribution.v1beta1.GenesisState} message GenesisState + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GenesisState.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) { + object.delegatorWithdrawInfos = []; + object.outstandingRewards = []; + object.validatorAccumulatedCommissions = []; + object.validatorHistoricalRewards = []; + object.validatorCurrentRewards = []; + object.delegatorStartingInfos = []; + object.validatorSlashEvents = []; + } + if (options.defaults) { + object.params = null; + object.feePool = null; + object.previousProposer = ""; + } + if (message.params != null && message.hasOwnProperty("params")) + object.params = $root.cosmos.distribution.v1beta1.Params.toObject(message.params, options); + if (message.feePool != null && message.hasOwnProperty("feePool")) + object.feePool = $root.cosmos.distribution.v1beta1.FeePool.toObject(message.feePool, options); + if (message.delegatorWithdrawInfos && message.delegatorWithdrawInfos.length) { + object.delegatorWithdrawInfos = []; + for (let j = 0; j < message.delegatorWithdrawInfos.length; ++j) + object.delegatorWithdrawInfos[j] = $root.cosmos.distribution.v1beta1.DelegatorWithdrawInfo.toObject(message.delegatorWithdrawInfos[j], options); + } + if (message.previousProposer != null && message.hasOwnProperty("previousProposer")) + object.previousProposer = message.previousProposer; + if (message.outstandingRewards && message.outstandingRewards.length) { + object.outstandingRewards = []; + for (let j = 0; j < message.outstandingRewards.length; ++j) + object.outstandingRewards[j] = $root.cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord.toObject(message.outstandingRewards[j], options); + } + if (message.validatorAccumulatedCommissions && message.validatorAccumulatedCommissions.length) { + object.validatorAccumulatedCommissions = []; + for (let j = 0; j < message.validatorAccumulatedCommissions.length; ++j) + object.validatorAccumulatedCommissions[j] = $root.cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord.toObject(message.validatorAccumulatedCommissions[j], options); + } + if (message.validatorHistoricalRewards && message.validatorHistoricalRewards.length) { + object.validatorHistoricalRewards = []; + for (let j = 0; j < message.validatorHistoricalRewards.length; ++j) + object.validatorHistoricalRewards[j] = $root.cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord.toObject(message.validatorHistoricalRewards[j], options); + } + if (message.validatorCurrentRewards && message.validatorCurrentRewards.length) { + object.validatorCurrentRewards = []; + for (let j = 0; j < message.validatorCurrentRewards.length; ++j) + object.validatorCurrentRewards[j] = $root.cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord.toObject(message.validatorCurrentRewards[j], options); + } + if (message.delegatorStartingInfos && message.delegatorStartingInfos.length) { + object.delegatorStartingInfos = []; + for (let j = 0; j < message.delegatorStartingInfos.length; ++j) + object.delegatorStartingInfos[j] = $root.cosmos.distribution.v1beta1.DelegatorStartingInfoRecord.toObject(message.delegatorStartingInfos[j], options); + } + if (message.validatorSlashEvents && message.validatorSlashEvents.length) { + object.validatorSlashEvents = []; + for (let j = 0; j < message.validatorSlashEvents.length; ++j) + object.validatorSlashEvents[j] = $root.cosmos.distribution.v1beta1.ValidatorSlashEventRecord.toObject(message.validatorSlashEvents[j], options); + } + return object; + }; + + /** + * Converts this GenesisState to JSON. + * @function toJSON + * @memberof cosmos.distribution.v1beta1.GenesisState + * @instance + * @returns {Object.} JSON object + */ + GenesisState.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GenesisState; + })(v1beta1.GenesisState || {}); + + v1beta1.Query = (function(Query) { + + /** + * Constructs a new Query service. + * @memberof cosmos.distribution.v1beta1 + * @classdesc Represents a Query + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Query(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Query.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Query; + + /** + * Creates new Query service using the specified rpc implementation. + * @function create + * @memberof cosmos.distribution.v1beta1.Query + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Query} RPC service. Useful where requests and/or responses are streamed. + */ + Query.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link cosmos.distribution.v1beta1.Query#params}. + * @memberof cosmos.distribution.v1beta1.Query + * @typedef ParamsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.distribution.v1beta1.IQueryParamsResponse} [response] QueryParamsResponse + */ + + /** + * Calls Params. + * @function params + * @memberof cosmos.distribution.v1beta1.Query + * @instance + * @param {cosmos.distribution.v1beta1.IQueryParamsRequest} request QueryParamsRequest message or plain object + * @param {cosmos.distribution.v1beta1.Query.ParamsCallback} callback Node-style callback called with the error, if any, and QueryParamsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.params = function params(request, callback) { + return this.rpcCall(params, $root.cosmos.distribution.v1beta1.QueryParamsRequest, $root.cosmos.distribution.v1beta1.QueryParamsResponse, request, callback); + }, "name", { value: "Params" }); + + /** + * Calls Params. + * @function params + * @memberof cosmos.distribution.v1beta1.Query + * @instance + * @param {cosmos.distribution.v1beta1.IQueryParamsRequest} request QueryParamsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link cosmos.distribution.v1beta1.Query#validatorOutstandingRewards}. + * @memberof cosmos.distribution.v1beta1.Query + * @typedef ValidatorOutstandingRewardsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.distribution.v1beta1.IQueryValidatorOutstandingRewardsResponse} [response] QueryValidatorOutstandingRewardsResponse + */ + + /** + * Calls ValidatorOutstandingRewards. + * @function validatorOutstandingRewards + * @memberof cosmos.distribution.v1beta1.Query + * @instance + * @param {cosmos.distribution.v1beta1.IQueryValidatorOutstandingRewardsRequest} request QueryValidatorOutstandingRewardsRequest message or plain object + * @param {cosmos.distribution.v1beta1.Query.ValidatorOutstandingRewardsCallback} callback Node-style callback called with the error, if any, and QueryValidatorOutstandingRewardsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.validatorOutstandingRewards = function validatorOutstandingRewards(request, callback) { + return this.rpcCall(validatorOutstandingRewards, $root.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest, $root.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse, request, callback); + }, "name", { value: "ValidatorOutstandingRewards" }); + + /** + * Calls ValidatorOutstandingRewards. + * @function validatorOutstandingRewards + * @memberof cosmos.distribution.v1beta1.Query + * @instance + * @param {cosmos.distribution.v1beta1.IQueryValidatorOutstandingRewardsRequest} request QueryValidatorOutstandingRewardsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link cosmos.distribution.v1beta1.Query#validatorCommission}. + * @memberof cosmos.distribution.v1beta1.Query + * @typedef ValidatorCommissionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.distribution.v1beta1.IQueryValidatorCommissionResponse} [response] QueryValidatorCommissionResponse + */ + + /** + * Calls ValidatorCommission. + * @function validatorCommission + * @memberof cosmos.distribution.v1beta1.Query + * @instance + * @param {cosmos.distribution.v1beta1.IQueryValidatorCommissionRequest} request QueryValidatorCommissionRequest message or plain object + * @param {cosmos.distribution.v1beta1.Query.ValidatorCommissionCallback} callback Node-style callback called with the error, if any, and QueryValidatorCommissionResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.validatorCommission = function validatorCommission(request, callback) { + return this.rpcCall(validatorCommission, $root.cosmos.distribution.v1beta1.QueryValidatorCommissionRequest, $root.cosmos.distribution.v1beta1.QueryValidatorCommissionResponse, request, callback); + }, "name", { value: "ValidatorCommission" }); + + /** + * Calls ValidatorCommission. + * @function validatorCommission + * @memberof cosmos.distribution.v1beta1.Query + * @instance + * @param {cosmos.distribution.v1beta1.IQueryValidatorCommissionRequest} request QueryValidatorCommissionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link cosmos.distribution.v1beta1.Query#validatorSlashes}. + * @memberof cosmos.distribution.v1beta1.Query + * @typedef ValidatorSlashesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.distribution.v1beta1.IQueryValidatorSlashesResponse} [response] QueryValidatorSlashesResponse + */ + + /** + * Calls ValidatorSlashes. + * @function validatorSlashes + * @memberof cosmos.distribution.v1beta1.Query + * @instance + * @param {cosmos.distribution.v1beta1.IQueryValidatorSlashesRequest} request QueryValidatorSlashesRequest message or plain object + * @param {cosmos.distribution.v1beta1.Query.ValidatorSlashesCallback} callback Node-style callback called with the error, if any, and QueryValidatorSlashesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.validatorSlashes = function validatorSlashes(request, callback) { + return this.rpcCall(validatorSlashes, $root.cosmos.distribution.v1beta1.QueryValidatorSlashesRequest, $root.cosmos.distribution.v1beta1.QueryValidatorSlashesResponse, request, callback); + }, "name", { value: "ValidatorSlashes" }); + + /** + * Calls ValidatorSlashes. + * @function validatorSlashes + * @memberof cosmos.distribution.v1beta1.Query + * @instance + * @param {cosmos.distribution.v1beta1.IQueryValidatorSlashesRequest} request QueryValidatorSlashesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link cosmos.distribution.v1beta1.Query#delegationRewards}. + * @memberof cosmos.distribution.v1beta1.Query + * @typedef DelegationRewardsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.distribution.v1beta1.IQueryDelegationRewardsResponse} [response] QueryDelegationRewardsResponse + */ + + /** + * Calls DelegationRewards. + * @function delegationRewards + * @memberof cosmos.distribution.v1beta1.Query + * @instance + * @param {cosmos.distribution.v1beta1.IQueryDelegationRewardsRequest} request QueryDelegationRewardsRequest message or plain object + * @param {cosmos.distribution.v1beta1.Query.DelegationRewardsCallback} callback Node-style callback called with the error, if any, and QueryDelegationRewardsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.delegationRewards = function delegationRewards(request, callback) { + return this.rpcCall(delegationRewards, $root.cosmos.distribution.v1beta1.QueryDelegationRewardsRequest, $root.cosmos.distribution.v1beta1.QueryDelegationRewardsResponse, request, callback); + }, "name", { value: "DelegationRewards" }); + + /** + * Calls DelegationRewards. + * @function delegationRewards + * @memberof cosmos.distribution.v1beta1.Query + * @instance + * @param {cosmos.distribution.v1beta1.IQueryDelegationRewardsRequest} request QueryDelegationRewardsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link cosmos.distribution.v1beta1.Query#delegationTotalRewards}. + * @memberof cosmos.distribution.v1beta1.Query + * @typedef DelegationTotalRewardsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.distribution.v1beta1.IQueryDelegationTotalRewardsResponse} [response] QueryDelegationTotalRewardsResponse + */ + + /** + * Calls DelegationTotalRewards. + * @function delegationTotalRewards + * @memberof cosmos.distribution.v1beta1.Query + * @instance + * @param {cosmos.distribution.v1beta1.IQueryDelegationTotalRewardsRequest} request QueryDelegationTotalRewardsRequest message or plain object + * @param {cosmos.distribution.v1beta1.Query.DelegationTotalRewardsCallback} callback Node-style callback called with the error, if any, and QueryDelegationTotalRewardsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.delegationTotalRewards = function delegationTotalRewards(request, callback) { + return this.rpcCall(delegationTotalRewards, $root.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest, $root.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse, request, callback); + }, "name", { value: "DelegationTotalRewards" }); + + /** + * Calls DelegationTotalRewards. + * @function delegationTotalRewards + * @memberof cosmos.distribution.v1beta1.Query + * @instance + * @param {cosmos.distribution.v1beta1.IQueryDelegationTotalRewardsRequest} request QueryDelegationTotalRewardsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link cosmos.distribution.v1beta1.Query#delegatorValidators}. + * @memberof cosmos.distribution.v1beta1.Query + * @typedef DelegatorValidatorsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.distribution.v1beta1.IQueryDelegatorValidatorsResponse} [response] QueryDelegatorValidatorsResponse + */ + + /** + * Calls DelegatorValidators. + * @function delegatorValidators + * @memberof cosmos.distribution.v1beta1.Query + * @instance + * @param {cosmos.distribution.v1beta1.IQueryDelegatorValidatorsRequest} request QueryDelegatorValidatorsRequest message or plain object + * @param {cosmos.distribution.v1beta1.Query.DelegatorValidatorsCallback} callback Node-style callback called with the error, if any, and QueryDelegatorValidatorsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.delegatorValidators = function delegatorValidators(request, callback) { + return this.rpcCall(delegatorValidators, $root.cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest, $root.cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse, request, callback); + }, "name", { value: "DelegatorValidators" }); + + /** + * Calls DelegatorValidators. + * @function delegatorValidators + * @memberof cosmos.distribution.v1beta1.Query + * @instance + * @param {cosmos.distribution.v1beta1.IQueryDelegatorValidatorsRequest} request QueryDelegatorValidatorsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link cosmos.distribution.v1beta1.Query#delegatorWithdrawAddress}. + * @memberof cosmos.distribution.v1beta1.Query + * @typedef DelegatorWithdrawAddressCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.distribution.v1beta1.IQueryDelegatorWithdrawAddressResponse} [response] QueryDelegatorWithdrawAddressResponse + */ + + /** + * Calls DelegatorWithdrawAddress. + * @function delegatorWithdrawAddress + * @memberof cosmos.distribution.v1beta1.Query + * @instance + * @param {cosmos.distribution.v1beta1.IQueryDelegatorWithdrawAddressRequest} request QueryDelegatorWithdrawAddressRequest message or plain object + * @param {cosmos.distribution.v1beta1.Query.DelegatorWithdrawAddressCallback} callback Node-style callback called with the error, if any, and QueryDelegatorWithdrawAddressResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.delegatorWithdrawAddress = function delegatorWithdrawAddress(request, callback) { + return this.rpcCall(delegatorWithdrawAddress, $root.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest, $root.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse, request, callback); + }, "name", { value: "DelegatorWithdrawAddress" }); + + /** + * Calls DelegatorWithdrawAddress. + * @function delegatorWithdrawAddress + * @memberof cosmos.distribution.v1beta1.Query + * @instance + * @param {cosmos.distribution.v1beta1.IQueryDelegatorWithdrawAddressRequest} request QueryDelegatorWithdrawAddressRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link cosmos.distribution.v1beta1.Query#communityPool}. + * @memberof cosmos.distribution.v1beta1.Query + * @typedef CommunityPoolCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.distribution.v1beta1.IQueryCommunityPoolResponse} [response] QueryCommunityPoolResponse + */ + + /** + * Calls CommunityPool. + * @function communityPool + * @memberof cosmos.distribution.v1beta1.Query + * @instance + * @param {cosmos.distribution.v1beta1.IQueryCommunityPoolRequest} request QueryCommunityPoolRequest message or plain object + * @param {cosmos.distribution.v1beta1.Query.CommunityPoolCallback} callback Node-style callback called with the error, if any, and QueryCommunityPoolResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.communityPool = function communityPool(request, callback) { + return this.rpcCall(communityPool, $root.cosmos.distribution.v1beta1.QueryCommunityPoolRequest, $root.cosmos.distribution.v1beta1.QueryCommunityPoolResponse, request, callback); + }, "name", { value: "CommunityPool" }); + + /** + * Calls CommunityPool. + * @function communityPool + * @memberof cosmos.distribution.v1beta1.Query + * @instance + * @param {cosmos.distribution.v1beta1.IQueryCommunityPoolRequest} request QueryCommunityPoolRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Query; + })(v1beta1.Query || {}); + + v1beta1.QueryParamsRequest = (function(QueryParamsRequest) { + + /** + * Properties of a QueryParamsRequest. + * @memberof cosmos.distribution.v1beta1 + * @interface IQueryParamsRequest + */ + + /** + * Constructs a new QueryParamsRequest. + * @memberof cosmos.distribution.v1beta1 + * @classdesc Represents a QueryParamsRequest. + * @implements IQueryParamsRequest + * @constructor + * @param {cosmos.distribution.v1beta1.IQueryParamsRequest=} [properties] Properties to set + */ + function QueryParamsRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new QueryParamsRequest instance using the specified properties. + * @function create + * @memberof cosmos.distribution.v1beta1.QueryParamsRequest + * @static + * @param {cosmos.distribution.v1beta1.IQueryParamsRequest=} [properties] Properties to set + * @returns {cosmos.distribution.v1beta1.QueryParamsRequest} QueryParamsRequest instance + */ + QueryParamsRequest.create = function create(properties) { + return new QueryParamsRequest(properties); + }; + + /** + * Encodes the specified QueryParamsRequest message. Does not implicitly {@link cosmos.distribution.v1beta1.QueryParamsRequest.verify|verify} messages. + * @function encode + * @memberof cosmos.distribution.v1beta1.QueryParamsRequest + * @static + * @param {cosmos.distribution.v1beta1.IQueryParamsRequest} message QueryParamsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryParamsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified QueryParamsRequest message, length delimited. Does not implicitly {@link cosmos.distribution.v1beta1.QueryParamsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.distribution.v1beta1.QueryParamsRequest + * @static + * @param {cosmos.distribution.v1beta1.IQueryParamsRequest} message QueryParamsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryParamsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryParamsRequest message from the specified reader or buffer. + * @function decode + * @memberof cosmos.distribution.v1beta1.QueryParamsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.distribution.v1beta1.QueryParamsRequest} QueryParamsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryParamsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.distribution.v1beta1.QueryParamsRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryParamsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.distribution.v1beta1.QueryParamsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.distribution.v1beta1.QueryParamsRequest} QueryParamsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryParamsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryParamsRequest message. + * @function verify + * @memberof cosmos.distribution.v1beta1.QueryParamsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryParamsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a QueryParamsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.distribution.v1beta1.QueryParamsRequest + * @static + * @param {Object.} object Plain object + * @returns {cosmos.distribution.v1beta1.QueryParamsRequest} QueryParamsRequest + */ + QueryParamsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.distribution.v1beta1.QueryParamsRequest) + return object; + return new $root.cosmos.distribution.v1beta1.QueryParamsRequest(); + }; + + /** + * Creates a plain object from a QueryParamsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.distribution.v1beta1.QueryParamsRequest + * @static + * @param {cosmos.distribution.v1beta1.QueryParamsRequest} message QueryParamsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryParamsRequest.toObject = function toObject() { + return {}; + }; + + /** + * Converts this QueryParamsRequest to JSON. + * @function toJSON + * @memberof cosmos.distribution.v1beta1.QueryParamsRequest + * @instance + * @returns {Object.} JSON object + */ + QueryParamsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryParamsRequest; + })(v1beta1.QueryParamsRequest || {}); + + v1beta1.QueryParamsResponse = (function(QueryParamsResponse) { + + /** + * Properties of a QueryParamsResponse. + * @memberof cosmos.distribution.v1beta1 + * @interface IQueryParamsResponse + * @property {cosmos.distribution.v1beta1.IParams|null} [params] QueryParamsResponse params + */ + + /** + * Constructs a new QueryParamsResponse. + * @memberof cosmos.distribution.v1beta1 + * @classdesc Represents a QueryParamsResponse. + * @implements IQueryParamsResponse + * @constructor + * @param {cosmos.distribution.v1beta1.IQueryParamsResponse=} [properties] Properties to set + */ + function QueryParamsResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryParamsResponse params. + * @member {cosmos.distribution.v1beta1.IParams|null|undefined} params + * @memberof cosmos.distribution.v1beta1.QueryParamsResponse + * @instance + */ + QueryParamsResponse.prototype.params = null; + + /** + * Creates a new QueryParamsResponse instance using the specified properties. + * @function create + * @memberof cosmos.distribution.v1beta1.QueryParamsResponse + * @static + * @param {cosmos.distribution.v1beta1.IQueryParamsResponse=} [properties] Properties to set + * @returns {cosmos.distribution.v1beta1.QueryParamsResponse} QueryParamsResponse instance + */ + QueryParamsResponse.create = function create(properties) { + return new QueryParamsResponse(properties); + }; + + /** + * Encodes the specified QueryParamsResponse message. Does not implicitly {@link cosmos.distribution.v1beta1.QueryParamsResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.distribution.v1beta1.QueryParamsResponse + * @static + * @param {cosmos.distribution.v1beta1.IQueryParamsResponse} message QueryParamsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryParamsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.params != null && Object.hasOwnProperty.call(message, "params")) + $root.cosmos.distribution.v1beta1.Params.encode(message.params, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryParamsResponse message, length delimited. Does not implicitly {@link cosmos.distribution.v1beta1.QueryParamsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.distribution.v1beta1.QueryParamsResponse + * @static + * @param {cosmos.distribution.v1beta1.IQueryParamsResponse} message QueryParamsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryParamsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryParamsResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.distribution.v1beta1.QueryParamsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.distribution.v1beta1.QueryParamsResponse} QueryParamsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryParamsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.distribution.v1beta1.QueryParamsResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.params = $root.cosmos.distribution.v1beta1.Params.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryParamsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.distribution.v1beta1.QueryParamsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.distribution.v1beta1.QueryParamsResponse} QueryParamsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryParamsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryParamsResponse message. + * @function verify + * @memberof cosmos.distribution.v1beta1.QueryParamsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryParamsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.params != null && message.hasOwnProperty("params")) { + let error = $root.cosmos.distribution.v1beta1.Params.verify(message.params); + if (error) + return "params." + error; + } + return null; + }; + + /** + * Creates a QueryParamsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.distribution.v1beta1.QueryParamsResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.distribution.v1beta1.QueryParamsResponse} QueryParamsResponse + */ + QueryParamsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.distribution.v1beta1.QueryParamsResponse) + return object; + let message = new $root.cosmos.distribution.v1beta1.QueryParamsResponse(); + if (object.params != null) { + if (typeof object.params !== "object") + throw TypeError(".cosmos.distribution.v1beta1.QueryParamsResponse.params: object expected"); + message.params = $root.cosmos.distribution.v1beta1.Params.fromObject(object.params); + } + return message; + }; + + /** + * Creates a plain object from a QueryParamsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.distribution.v1beta1.QueryParamsResponse + * @static + * @param {cosmos.distribution.v1beta1.QueryParamsResponse} message QueryParamsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryParamsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.params = null; + if (message.params != null && message.hasOwnProperty("params")) + object.params = $root.cosmos.distribution.v1beta1.Params.toObject(message.params, options); + return object; + }; + + /** + * Converts this QueryParamsResponse to JSON. + * @function toJSON + * @memberof cosmos.distribution.v1beta1.QueryParamsResponse + * @instance + * @returns {Object.} JSON object + */ + QueryParamsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryParamsResponse; + })(v1beta1.QueryParamsResponse || {}); + + v1beta1.QueryValidatorOutstandingRewardsRequest = (function(QueryValidatorOutstandingRewardsRequest) { + + /** + * Properties of a QueryValidatorOutstandingRewardsRequest. + * @memberof cosmos.distribution.v1beta1 + * @interface IQueryValidatorOutstandingRewardsRequest + * @property {string|null} [validatorAddress] QueryValidatorOutstandingRewardsRequest validatorAddress + */ + + /** + * Constructs a new QueryValidatorOutstandingRewardsRequest. + * @memberof cosmos.distribution.v1beta1 + * @classdesc Represents a QueryValidatorOutstandingRewardsRequest. + * @implements IQueryValidatorOutstandingRewardsRequest + * @constructor + * @param {cosmos.distribution.v1beta1.IQueryValidatorOutstandingRewardsRequest=} [properties] Properties to set + */ + function QueryValidatorOutstandingRewardsRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryValidatorOutstandingRewardsRequest validatorAddress. + * @member {string} validatorAddress + * @memberof cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest + * @instance + */ + QueryValidatorOutstandingRewardsRequest.prototype.validatorAddress = ""; + + /** + * Creates a new QueryValidatorOutstandingRewardsRequest instance using the specified properties. + * @function create + * @memberof cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest + * @static + * @param {cosmos.distribution.v1beta1.IQueryValidatorOutstandingRewardsRequest=} [properties] Properties to set + * @returns {cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest} QueryValidatorOutstandingRewardsRequest instance + */ + QueryValidatorOutstandingRewardsRequest.create = function create(properties) { + return new QueryValidatorOutstandingRewardsRequest(properties); + }; + + /** + * Encodes the specified QueryValidatorOutstandingRewardsRequest message. Does not implicitly {@link cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest.verify|verify} messages. + * @function encode + * @memberof cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest + * @static + * @param {cosmos.distribution.v1beta1.IQueryValidatorOutstandingRewardsRequest} message QueryValidatorOutstandingRewardsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryValidatorOutstandingRewardsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.validatorAddress != null && Object.hasOwnProperty.call(message, "validatorAddress")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.validatorAddress); + return writer; + }; + + /** + * Encodes the specified QueryValidatorOutstandingRewardsRequest message, length delimited. Does not implicitly {@link cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest + * @static + * @param {cosmos.distribution.v1beta1.IQueryValidatorOutstandingRewardsRequest} message QueryValidatorOutstandingRewardsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryValidatorOutstandingRewardsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryValidatorOutstandingRewardsRequest message from the specified reader or buffer. + * @function decode + * @memberof cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest} QueryValidatorOutstandingRewardsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryValidatorOutstandingRewardsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.validatorAddress = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryValidatorOutstandingRewardsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest} QueryValidatorOutstandingRewardsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryValidatorOutstandingRewardsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryValidatorOutstandingRewardsRequest message. + * @function verify + * @memberof cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryValidatorOutstandingRewardsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + if (!$util.isString(message.validatorAddress)) + return "validatorAddress: string expected"; + return null; + }; + + /** + * Creates a QueryValidatorOutstandingRewardsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest + * @static + * @param {Object.} object Plain object + * @returns {cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest} QueryValidatorOutstandingRewardsRequest + */ + QueryValidatorOutstandingRewardsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest) + return object; + let message = new $root.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest(); + if (object.validatorAddress != null) + message.validatorAddress = String(object.validatorAddress); + return message; + }; + + /** + * Creates a plain object from a QueryValidatorOutstandingRewardsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest + * @static + * @param {cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest} message QueryValidatorOutstandingRewardsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryValidatorOutstandingRewardsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.validatorAddress = ""; + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + object.validatorAddress = message.validatorAddress; + return object; + }; + + /** + * Converts this QueryValidatorOutstandingRewardsRequest to JSON. + * @function toJSON + * @memberof cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest + * @instance + * @returns {Object.} JSON object + */ + QueryValidatorOutstandingRewardsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryValidatorOutstandingRewardsRequest; + })(v1beta1.QueryValidatorOutstandingRewardsRequest || {}); + + v1beta1.QueryValidatorOutstandingRewardsResponse = (function(QueryValidatorOutstandingRewardsResponse) { + + /** + * Properties of a QueryValidatorOutstandingRewardsResponse. + * @memberof cosmos.distribution.v1beta1 + * @interface IQueryValidatorOutstandingRewardsResponse + * @property {cosmos.distribution.v1beta1.IValidatorOutstandingRewards|null} [rewards] QueryValidatorOutstandingRewardsResponse rewards + */ + + /** + * Constructs a new QueryValidatorOutstandingRewardsResponse. + * @memberof cosmos.distribution.v1beta1 + * @classdesc Represents a QueryValidatorOutstandingRewardsResponse. + * @implements IQueryValidatorOutstandingRewardsResponse + * @constructor + * @param {cosmos.distribution.v1beta1.IQueryValidatorOutstandingRewardsResponse=} [properties] Properties to set + */ + function QueryValidatorOutstandingRewardsResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryValidatorOutstandingRewardsResponse rewards. + * @member {cosmos.distribution.v1beta1.IValidatorOutstandingRewards|null|undefined} rewards + * @memberof cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse + * @instance + */ + QueryValidatorOutstandingRewardsResponse.prototype.rewards = null; + + /** + * Creates a new QueryValidatorOutstandingRewardsResponse instance using the specified properties. + * @function create + * @memberof cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse + * @static + * @param {cosmos.distribution.v1beta1.IQueryValidatorOutstandingRewardsResponse=} [properties] Properties to set + * @returns {cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse} QueryValidatorOutstandingRewardsResponse instance + */ + QueryValidatorOutstandingRewardsResponse.create = function create(properties) { + return new QueryValidatorOutstandingRewardsResponse(properties); + }; + + /** + * Encodes the specified QueryValidatorOutstandingRewardsResponse message. Does not implicitly {@link cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse + * @static + * @param {cosmos.distribution.v1beta1.IQueryValidatorOutstandingRewardsResponse} message QueryValidatorOutstandingRewardsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryValidatorOutstandingRewardsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rewards != null && Object.hasOwnProperty.call(message, "rewards")) + $root.cosmos.distribution.v1beta1.ValidatorOutstandingRewards.encode(message.rewards, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryValidatorOutstandingRewardsResponse message, length delimited. Does not implicitly {@link cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse + * @static + * @param {cosmos.distribution.v1beta1.IQueryValidatorOutstandingRewardsResponse} message QueryValidatorOutstandingRewardsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryValidatorOutstandingRewardsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryValidatorOutstandingRewardsResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse} QueryValidatorOutstandingRewardsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryValidatorOutstandingRewardsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.rewards = $root.cosmos.distribution.v1beta1.ValidatorOutstandingRewards.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryValidatorOutstandingRewardsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse} QueryValidatorOutstandingRewardsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryValidatorOutstandingRewardsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryValidatorOutstandingRewardsResponse message. + * @function verify + * @memberof cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryValidatorOutstandingRewardsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rewards != null && message.hasOwnProperty("rewards")) { + let error = $root.cosmos.distribution.v1beta1.ValidatorOutstandingRewards.verify(message.rewards); + if (error) + return "rewards." + error; + } + return null; + }; + + /** + * Creates a QueryValidatorOutstandingRewardsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse} QueryValidatorOutstandingRewardsResponse + */ + QueryValidatorOutstandingRewardsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse) + return object; + let message = new $root.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse(); + if (object.rewards != null) { + if (typeof object.rewards !== "object") + throw TypeError(".cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse.rewards: object expected"); + message.rewards = $root.cosmos.distribution.v1beta1.ValidatorOutstandingRewards.fromObject(object.rewards); + } + return message; + }; + + /** + * Creates a plain object from a QueryValidatorOutstandingRewardsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse + * @static + * @param {cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse} message QueryValidatorOutstandingRewardsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryValidatorOutstandingRewardsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.rewards = null; + if (message.rewards != null && message.hasOwnProperty("rewards")) + object.rewards = $root.cosmos.distribution.v1beta1.ValidatorOutstandingRewards.toObject(message.rewards, options); + return object; + }; + + /** + * Converts this QueryValidatorOutstandingRewardsResponse to JSON. + * @function toJSON + * @memberof cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse + * @instance + * @returns {Object.} JSON object + */ + QueryValidatorOutstandingRewardsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryValidatorOutstandingRewardsResponse; + })(v1beta1.QueryValidatorOutstandingRewardsResponse || {}); + + v1beta1.QueryValidatorCommissionRequest = (function(QueryValidatorCommissionRequest) { + + /** + * Properties of a QueryValidatorCommissionRequest. + * @memberof cosmos.distribution.v1beta1 + * @interface IQueryValidatorCommissionRequest + * @property {string|null} [validatorAddress] QueryValidatorCommissionRequest validatorAddress + */ + + /** + * Constructs a new QueryValidatorCommissionRequest. + * @memberof cosmos.distribution.v1beta1 + * @classdesc Represents a QueryValidatorCommissionRequest. + * @implements IQueryValidatorCommissionRequest + * @constructor + * @param {cosmos.distribution.v1beta1.IQueryValidatorCommissionRequest=} [properties] Properties to set + */ + function QueryValidatorCommissionRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryValidatorCommissionRequest validatorAddress. + * @member {string} validatorAddress + * @memberof cosmos.distribution.v1beta1.QueryValidatorCommissionRequest + * @instance + */ + QueryValidatorCommissionRequest.prototype.validatorAddress = ""; + + /** + * Creates a new QueryValidatorCommissionRequest instance using the specified properties. + * @function create + * @memberof cosmos.distribution.v1beta1.QueryValidatorCommissionRequest + * @static + * @param {cosmos.distribution.v1beta1.IQueryValidatorCommissionRequest=} [properties] Properties to set + * @returns {cosmos.distribution.v1beta1.QueryValidatorCommissionRequest} QueryValidatorCommissionRequest instance + */ + QueryValidatorCommissionRequest.create = function create(properties) { + return new QueryValidatorCommissionRequest(properties); + }; + + /** + * Encodes the specified QueryValidatorCommissionRequest message. Does not implicitly {@link cosmos.distribution.v1beta1.QueryValidatorCommissionRequest.verify|verify} messages. + * @function encode + * @memberof cosmos.distribution.v1beta1.QueryValidatorCommissionRequest + * @static + * @param {cosmos.distribution.v1beta1.IQueryValidatorCommissionRequest} message QueryValidatorCommissionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryValidatorCommissionRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.validatorAddress != null && Object.hasOwnProperty.call(message, "validatorAddress")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.validatorAddress); + return writer; + }; + + /** + * Encodes the specified QueryValidatorCommissionRequest message, length delimited. Does not implicitly {@link cosmos.distribution.v1beta1.QueryValidatorCommissionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.distribution.v1beta1.QueryValidatorCommissionRequest + * @static + * @param {cosmos.distribution.v1beta1.IQueryValidatorCommissionRequest} message QueryValidatorCommissionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryValidatorCommissionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryValidatorCommissionRequest message from the specified reader or buffer. + * @function decode + * @memberof cosmos.distribution.v1beta1.QueryValidatorCommissionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.distribution.v1beta1.QueryValidatorCommissionRequest} QueryValidatorCommissionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryValidatorCommissionRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.distribution.v1beta1.QueryValidatorCommissionRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.validatorAddress = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryValidatorCommissionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.distribution.v1beta1.QueryValidatorCommissionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.distribution.v1beta1.QueryValidatorCommissionRequest} QueryValidatorCommissionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryValidatorCommissionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryValidatorCommissionRequest message. + * @function verify + * @memberof cosmos.distribution.v1beta1.QueryValidatorCommissionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryValidatorCommissionRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + if (!$util.isString(message.validatorAddress)) + return "validatorAddress: string expected"; + return null; + }; + + /** + * Creates a QueryValidatorCommissionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.distribution.v1beta1.QueryValidatorCommissionRequest + * @static + * @param {Object.} object Plain object + * @returns {cosmos.distribution.v1beta1.QueryValidatorCommissionRequest} QueryValidatorCommissionRequest + */ + QueryValidatorCommissionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.distribution.v1beta1.QueryValidatorCommissionRequest) + return object; + let message = new $root.cosmos.distribution.v1beta1.QueryValidatorCommissionRequest(); + if (object.validatorAddress != null) + message.validatorAddress = String(object.validatorAddress); + return message; + }; + + /** + * Creates a plain object from a QueryValidatorCommissionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.distribution.v1beta1.QueryValidatorCommissionRequest + * @static + * @param {cosmos.distribution.v1beta1.QueryValidatorCommissionRequest} message QueryValidatorCommissionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryValidatorCommissionRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.validatorAddress = ""; + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + object.validatorAddress = message.validatorAddress; + return object; + }; + + /** + * Converts this QueryValidatorCommissionRequest to JSON. + * @function toJSON + * @memberof cosmos.distribution.v1beta1.QueryValidatorCommissionRequest + * @instance + * @returns {Object.} JSON object + */ + QueryValidatorCommissionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryValidatorCommissionRequest; + })(v1beta1.QueryValidatorCommissionRequest || {}); + + v1beta1.QueryValidatorCommissionResponse = (function(QueryValidatorCommissionResponse) { + + /** + * Properties of a QueryValidatorCommissionResponse. + * @memberof cosmos.distribution.v1beta1 + * @interface IQueryValidatorCommissionResponse + * @property {cosmos.distribution.v1beta1.IValidatorAccumulatedCommission|null} [commission] QueryValidatorCommissionResponse commission + */ + + /** + * Constructs a new QueryValidatorCommissionResponse. + * @memberof cosmos.distribution.v1beta1 + * @classdesc Represents a QueryValidatorCommissionResponse. + * @implements IQueryValidatorCommissionResponse + * @constructor + * @param {cosmos.distribution.v1beta1.IQueryValidatorCommissionResponse=} [properties] Properties to set + */ + function QueryValidatorCommissionResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryValidatorCommissionResponse commission. + * @member {cosmos.distribution.v1beta1.IValidatorAccumulatedCommission|null|undefined} commission + * @memberof cosmos.distribution.v1beta1.QueryValidatorCommissionResponse + * @instance + */ + QueryValidatorCommissionResponse.prototype.commission = null; + + /** + * Creates a new QueryValidatorCommissionResponse instance using the specified properties. + * @function create + * @memberof cosmos.distribution.v1beta1.QueryValidatorCommissionResponse + * @static + * @param {cosmos.distribution.v1beta1.IQueryValidatorCommissionResponse=} [properties] Properties to set + * @returns {cosmos.distribution.v1beta1.QueryValidatorCommissionResponse} QueryValidatorCommissionResponse instance + */ + QueryValidatorCommissionResponse.create = function create(properties) { + return new QueryValidatorCommissionResponse(properties); + }; + + /** + * Encodes the specified QueryValidatorCommissionResponse message. Does not implicitly {@link cosmos.distribution.v1beta1.QueryValidatorCommissionResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.distribution.v1beta1.QueryValidatorCommissionResponse + * @static + * @param {cosmos.distribution.v1beta1.IQueryValidatorCommissionResponse} message QueryValidatorCommissionResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryValidatorCommissionResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.commission != null && Object.hasOwnProperty.call(message, "commission")) + $root.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission.encode(message.commission, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryValidatorCommissionResponse message, length delimited. Does not implicitly {@link cosmos.distribution.v1beta1.QueryValidatorCommissionResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.distribution.v1beta1.QueryValidatorCommissionResponse + * @static + * @param {cosmos.distribution.v1beta1.IQueryValidatorCommissionResponse} message QueryValidatorCommissionResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryValidatorCommissionResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryValidatorCommissionResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.distribution.v1beta1.QueryValidatorCommissionResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.distribution.v1beta1.QueryValidatorCommissionResponse} QueryValidatorCommissionResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryValidatorCommissionResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.distribution.v1beta1.QueryValidatorCommissionResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.commission = $root.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryValidatorCommissionResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.distribution.v1beta1.QueryValidatorCommissionResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.distribution.v1beta1.QueryValidatorCommissionResponse} QueryValidatorCommissionResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryValidatorCommissionResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryValidatorCommissionResponse message. + * @function verify + * @memberof cosmos.distribution.v1beta1.QueryValidatorCommissionResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryValidatorCommissionResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.commission != null && message.hasOwnProperty("commission")) { + let error = $root.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission.verify(message.commission); + if (error) + return "commission." + error; + } + return null; + }; + + /** + * Creates a QueryValidatorCommissionResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.distribution.v1beta1.QueryValidatorCommissionResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.distribution.v1beta1.QueryValidatorCommissionResponse} QueryValidatorCommissionResponse + */ + QueryValidatorCommissionResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.distribution.v1beta1.QueryValidatorCommissionResponse) + return object; + let message = new $root.cosmos.distribution.v1beta1.QueryValidatorCommissionResponse(); + if (object.commission != null) { + if (typeof object.commission !== "object") + throw TypeError(".cosmos.distribution.v1beta1.QueryValidatorCommissionResponse.commission: object expected"); + message.commission = $root.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission.fromObject(object.commission); + } + return message; + }; + + /** + * Creates a plain object from a QueryValidatorCommissionResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.distribution.v1beta1.QueryValidatorCommissionResponse + * @static + * @param {cosmos.distribution.v1beta1.QueryValidatorCommissionResponse} message QueryValidatorCommissionResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryValidatorCommissionResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.commission = null; + if (message.commission != null && message.hasOwnProperty("commission")) + object.commission = $root.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission.toObject(message.commission, options); + return object; + }; + + /** + * Converts this QueryValidatorCommissionResponse to JSON. + * @function toJSON + * @memberof cosmos.distribution.v1beta1.QueryValidatorCommissionResponse + * @instance + * @returns {Object.} JSON object + */ + QueryValidatorCommissionResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryValidatorCommissionResponse; + })(v1beta1.QueryValidatorCommissionResponse || {}); + + v1beta1.QueryValidatorSlashesRequest = (function(QueryValidatorSlashesRequest) { + + /** + * Properties of a QueryValidatorSlashesRequest. + * @memberof cosmos.distribution.v1beta1 + * @interface IQueryValidatorSlashesRequest + * @property {string|null} [validatorAddress] QueryValidatorSlashesRequest validatorAddress + * @property {number|Long|null} [startingHeight] QueryValidatorSlashesRequest startingHeight + * @property {number|Long|null} [endingHeight] QueryValidatorSlashesRequest endingHeight + * @property {cosmos.base.query.v1beta1.IPageRequest|null} [pagination] QueryValidatorSlashesRequest pagination + */ + + /** + * Constructs a new QueryValidatorSlashesRequest. + * @memberof cosmos.distribution.v1beta1 + * @classdesc Represents a QueryValidatorSlashesRequest. + * @implements IQueryValidatorSlashesRequest + * @constructor + * @param {cosmos.distribution.v1beta1.IQueryValidatorSlashesRequest=} [properties] Properties to set + */ + function QueryValidatorSlashesRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryValidatorSlashesRequest validatorAddress. + * @member {string} validatorAddress + * @memberof cosmos.distribution.v1beta1.QueryValidatorSlashesRequest + * @instance + */ + QueryValidatorSlashesRequest.prototype.validatorAddress = ""; + + /** + * QueryValidatorSlashesRequest startingHeight. + * @member {number|Long} startingHeight + * @memberof cosmos.distribution.v1beta1.QueryValidatorSlashesRequest + * @instance + */ + QueryValidatorSlashesRequest.prototype.startingHeight = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * QueryValidatorSlashesRequest endingHeight. + * @member {number|Long} endingHeight + * @memberof cosmos.distribution.v1beta1.QueryValidatorSlashesRequest + * @instance + */ + QueryValidatorSlashesRequest.prototype.endingHeight = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * QueryValidatorSlashesRequest pagination. + * @member {cosmos.base.query.v1beta1.IPageRequest|null|undefined} pagination + * @memberof cosmos.distribution.v1beta1.QueryValidatorSlashesRequest + * @instance + */ + QueryValidatorSlashesRequest.prototype.pagination = null; + + /** + * Creates a new QueryValidatorSlashesRequest instance using the specified properties. + * @function create + * @memberof cosmos.distribution.v1beta1.QueryValidatorSlashesRequest + * @static + * @param {cosmos.distribution.v1beta1.IQueryValidatorSlashesRequest=} [properties] Properties to set + * @returns {cosmos.distribution.v1beta1.QueryValidatorSlashesRequest} QueryValidatorSlashesRequest instance + */ + QueryValidatorSlashesRequest.create = function create(properties) { + return new QueryValidatorSlashesRequest(properties); + }; + + /** + * Encodes the specified QueryValidatorSlashesRequest message. Does not implicitly {@link cosmos.distribution.v1beta1.QueryValidatorSlashesRequest.verify|verify} messages. + * @function encode + * @memberof cosmos.distribution.v1beta1.QueryValidatorSlashesRequest + * @static + * @param {cosmos.distribution.v1beta1.IQueryValidatorSlashesRequest} message QueryValidatorSlashesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryValidatorSlashesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.validatorAddress != null && Object.hasOwnProperty.call(message, "validatorAddress")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.validatorAddress); + if (message.startingHeight != null && Object.hasOwnProperty.call(message, "startingHeight")) + writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.startingHeight); + if (message.endingHeight != null && Object.hasOwnProperty.call(message, "endingHeight")) + writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.endingHeight); + if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) + $root.cosmos.base.query.v1beta1.PageRequest.encode(message.pagination, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryValidatorSlashesRequest message, length delimited. Does not implicitly {@link cosmos.distribution.v1beta1.QueryValidatorSlashesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.distribution.v1beta1.QueryValidatorSlashesRequest + * @static + * @param {cosmos.distribution.v1beta1.IQueryValidatorSlashesRequest} message QueryValidatorSlashesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryValidatorSlashesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryValidatorSlashesRequest message from the specified reader or buffer. + * @function decode + * @memberof cosmos.distribution.v1beta1.QueryValidatorSlashesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.distribution.v1beta1.QueryValidatorSlashesRequest} QueryValidatorSlashesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryValidatorSlashesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.distribution.v1beta1.QueryValidatorSlashesRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.validatorAddress = reader.string(); + break; + case 2: + message.startingHeight = reader.uint64(); + break; + case 3: + message.endingHeight = reader.uint64(); + break; + case 4: + message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryValidatorSlashesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.distribution.v1beta1.QueryValidatorSlashesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.distribution.v1beta1.QueryValidatorSlashesRequest} QueryValidatorSlashesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryValidatorSlashesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryValidatorSlashesRequest message. + * @function verify + * @memberof cosmos.distribution.v1beta1.QueryValidatorSlashesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryValidatorSlashesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + if (!$util.isString(message.validatorAddress)) + return "validatorAddress: string expected"; + if (message.startingHeight != null && message.hasOwnProperty("startingHeight")) + if (!$util.isInteger(message.startingHeight) && !(message.startingHeight && $util.isInteger(message.startingHeight.low) && $util.isInteger(message.startingHeight.high))) + return "startingHeight: integer|Long expected"; + if (message.endingHeight != null && message.hasOwnProperty("endingHeight")) + if (!$util.isInteger(message.endingHeight) && !(message.endingHeight && $util.isInteger(message.endingHeight.low) && $util.isInteger(message.endingHeight.high))) + return "endingHeight: integer|Long expected"; + if (message.pagination != null && message.hasOwnProperty("pagination")) { + let error = $root.cosmos.base.query.v1beta1.PageRequest.verify(message.pagination); + if (error) + return "pagination." + error; + } + return null; + }; + + /** + * Creates a QueryValidatorSlashesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.distribution.v1beta1.QueryValidatorSlashesRequest + * @static + * @param {Object.} object Plain object + * @returns {cosmos.distribution.v1beta1.QueryValidatorSlashesRequest} QueryValidatorSlashesRequest + */ + QueryValidatorSlashesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.distribution.v1beta1.QueryValidatorSlashesRequest) + return object; + let message = new $root.cosmos.distribution.v1beta1.QueryValidatorSlashesRequest(); + if (object.validatorAddress != null) + message.validatorAddress = String(object.validatorAddress); + if (object.startingHeight != null) + if ($util.Long) + (message.startingHeight = $util.Long.fromValue(object.startingHeight)).unsigned = true; + else if (typeof object.startingHeight === "string") + message.startingHeight = parseInt(object.startingHeight, 10); + else if (typeof object.startingHeight === "number") + message.startingHeight = object.startingHeight; + else if (typeof object.startingHeight === "object") + message.startingHeight = new $util.LongBits(object.startingHeight.low >>> 0, object.startingHeight.high >>> 0).toNumber(true); + if (object.endingHeight != null) + if ($util.Long) + (message.endingHeight = $util.Long.fromValue(object.endingHeight)).unsigned = true; + else if (typeof object.endingHeight === "string") + message.endingHeight = parseInt(object.endingHeight, 10); + else if (typeof object.endingHeight === "number") + message.endingHeight = object.endingHeight; + else if (typeof object.endingHeight === "object") + message.endingHeight = new $util.LongBits(object.endingHeight.low >>> 0, object.endingHeight.high >>> 0).toNumber(true); + if (object.pagination != null) { + if (typeof object.pagination !== "object") + throw TypeError(".cosmos.distribution.v1beta1.QueryValidatorSlashesRequest.pagination: object expected"); + message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.fromObject(object.pagination); + } + return message; + }; + + /** + * Creates a plain object from a QueryValidatorSlashesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.distribution.v1beta1.QueryValidatorSlashesRequest + * @static + * @param {cosmos.distribution.v1beta1.QueryValidatorSlashesRequest} message QueryValidatorSlashesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryValidatorSlashesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.validatorAddress = ""; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.startingHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.startingHeight = options.longs === String ? "0" : 0; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.endingHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.endingHeight = options.longs === String ? "0" : 0; + object.pagination = null; + } + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + object.validatorAddress = message.validatorAddress; + if (message.startingHeight != null && message.hasOwnProperty("startingHeight")) + if (typeof message.startingHeight === "number") + object.startingHeight = options.longs === String ? String(message.startingHeight) : message.startingHeight; + else + object.startingHeight = options.longs === String ? $util.Long.prototype.toString.call(message.startingHeight) : options.longs === Number ? new $util.LongBits(message.startingHeight.low >>> 0, message.startingHeight.high >>> 0).toNumber(true) : message.startingHeight; + if (message.endingHeight != null && message.hasOwnProperty("endingHeight")) + if (typeof message.endingHeight === "number") + object.endingHeight = options.longs === String ? String(message.endingHeight) : message.endingHeight; + else + object.endingHeight = options.longs === String ? $util.Long.prototype.toString.call(message.endingHeight) : options.longs === Number ? new $util.LongBits(message.endingHeight.low >>> 0, message.endingHeight.high >>> 0).toNumber(true) : message.endingHeight; + if (message.pagination != null && message.hasOwnProperty("pagination")) + object.pagination = $root.cosmos.base.query.v1beta1.PageRequest.toObject(message.pagination, options); + return object; + }; + + /** + * Converts this QueryValidatorSlashesRequest to JSON. + * @function toJSON + * @memberof cosmos.distribution.v1beta1.QueryValidatorSlashesRequest + * @instance + * @returns {Object.} JSON object + */ + QueryValidatorSlashesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryValidatorSlashesRequest; + })(v1beta1.QueryValidatorSlashesRequest || {}); + + v1beta1.QueryValidatorSlashesResponse = (function(QueryValidatorSlashesResponse) { + + /** + * Properties of a QueryValidatorSlashesResponse. + * @memberof cosmos.distribution.v1beta1 + * @interface IQueryValidatorSlashesResponse + * @property {Array.|null} [slashes] QueryValidatorSlashesResponse slashes + * @property {cosmos.base.query.v1beta1.IPageResponse|null} [pagination] QueryValidatorSlashesResponse pagination + */ + + /** + * Constructs a new QueryValidatorSlashesResponse. + * @memberof cosmos.distribution.v1beta1 + * @classdesc Represents a QueryValidatorSlashesResponse. + * @implements IQueryValidatorSlashesResponse + * @constructor + * @param {cosmos.distribution.v1beta1.IQueryValidatorSlashesResponse=} [properties] Properties to set + */ + function QueryValidatorSlashesResponse(properties) { + this.slashes = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryValidatorSlashesResponse slashes. + * @member {Array.} slashes + * @memberof cosmos.distribution.v1beta1.QueryValidatorSlashesResponse + * @instance + */ + QueryValidatorSlashesResponse.prototype.slashes = $util.emptyArray; + + /** + * QueryValidatorSlashesResponse pagination. + * @member {cosmos.base.query.v1beta1.IPageResponse|null|undefined} pagination + * @memberof cosmos.distribution.v1beta1.QueryValidatorSlashesResponse + * @instance + */ + QueryValidatorSlashesResponse.prototype.pagination = null; + + /** + * Creates a new QueryValidatorSlashesResponse instance using the specified properties. + * @function create + * @memberof cosmos.distribution.v1beta1.QueryValidatorSlashesResponse + * @static + * @param {cosmos.distribution.v1beta1.IQueryValidatorSlashesResponse=} [properties] Properties to set + * @returns {cosmos.distribution.v1beta1.QueryValidatorSlashesResponse} QueryValidatorSlashesResponse instance + */ + QueryValidatorSlashesResponse.create = function create(properties) { + return new QueryValidatorSlashesResponse(properties); + }; + + /** + * Encodes the specified QueryValidatorSlashesResponse message. Does not implicitly {@link cosmos.distribution.v1beta1.QueryValidatorSlashesResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.distribution.v1beta1.QueryValidatorSlashesResponse + * @static + * @param {cosmos.distribution.v1beta1.IQueryValidatorSlashesResponse} message QueryValidatorSlashesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryValidatorSlashesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.slashes != null && message.slashes.length) + for (let i = 0; i < message.slashes.length; ++i) + $root.cosmos.distribution.v1beta1.ValidatorSlashEvent.encode(message.slashes[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) + $root.cosmos.base.query.v1beta1.PageResponse.encode(message.pagination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryValidatorSlashesResponse message, length delimited. Does not implicitly {@link cosmos.distribution.v1beta1.QueryValidatorSlashesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.distribution.v1beta1.QueryValidatorSlashesResponse + * @static + * @param {cosmos.distribution.v1beta1.IQueryValidatorSlashesResponse} message QueryValidatorSlashesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryValidatorSlashesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryValidatorSlashesResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.distribution.v1beta1.QueryValidatorSlashesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.distribution.v1beta1.QueryValidatorSlashesResponse} QueryValidatorSlashesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryValidatorSlashesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.distribution.v1beta1.QueryValidatorSlashesResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.slashes && message.slashes.length)) + message.slashes = []; + message.slashes.push($root.cosmos.distribution.v1beta1.ValidatorSlashEvent.decode(reader, reader.uint32())); + break; + case 2: + message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryValidatorSlashesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.distribution.v1beta1.QueryValidatorSlashesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.distribution.v1beta1.QueryValidatorSlashesResponse} QueryValidatorSlashesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryValidatorSlashesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryValidatorSlashesResponse message. + * @function verify + * @memberof cosmos.distribution.v1beta1.QueryValidatorSlashesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryValidatorSlashesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.slashes != null && message.hasOwnProperty("slashes")) { + if (!Array.isArray(message.slashes)) + return "slashes: array expected"; + for (let i = 0; i < message.slashes.length; ++i) { + let error = $root.cosmos.distribution.v1beta1.ValidatorSlashEvent.verify(message.slashes[i]); + if (error) + return "slashes." + error; + } + } + if (message.pagination != null && message.hasOwnProperty("pagination")) { + let error = $root.cosmos.base.query.v1beta1.PageResponse.verify(message.pagination); + if (error) + return "pagination." + error; + } + return null; + }; + + /** + * Creates a QueryValidatorSlashesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.distribution.v1beta1.QueryValidatorSlashesResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.distribution.v1beta1.QueryValidatorSlashesResponse} QueryValidatorSlashesResponse + */ + QueryValidatorSlashesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.distribution.v1beta1.QueryValidatorSlashesResponse) + return object; + let message = new $root.cosmos.distribution.v1beta1.QueryValidatorSlashesResponse(); + if (object.slashes) { + if (!Array.isArray(object.slashes)) + throw TypeError(".cosmos.distribution.v1beta1.QueryValidatorSlashesResponse.slashes: array expected"); + message.slashes = []; + for (let i = 0; i < object.slashes.length; ++i) { + if (typeof object.slashes[i] !== "object") + throw TypeError(".cosmos.distribution.v1beta1.QueryValidatorSlashesResponse.slashes: object expected"); + message.slashes[i] = $root.cosmos.distribution.v1beta1.ValidatorSlashEvent.fromObject(object.slashes[i]); + } + } + if (object.pagination != null) { + if (typeof object.pagination !== "object") + throw TypeError(".cosmos.distribution.v1beta1.QueryValidatorSlashesResponse.pagination: object expected"); + message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.fromObject(object.pagination); + } + return message; + }; + + /** + * Creates a plain object from a QueryValidatorSlashesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.distribution.v1beta1.QueryValidatorSlashesResponse + * @static + * @param {cosmos.distribution.v1beta1.QueryValidatorSlashesResponse} message QueryValidatorSlashesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryValidatorSlashesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.slashes = []; + if (options.defaults) + object.pagination = null; + if (message.slashes && message.slashes.length) { + object.slashes = []; + for (let j = 0; j < message.slashes.length; ++j) + object.slashes[j] = $root.cosmos.distribution.v1beta1.ValidatorSlashEvent.toObject(message.slashes[j], options); + } + if (message.pagination != null && message.hasOwnProperty("pagination")) + object.pagination = $root.cosmos.base.query.v1beta1.PageResponse.toObject(message.pagination, options); + return object; + }; + + /** + * Converts this QueryValidatorSlashesResponse to JSON. + * @function toJSON + * @memberof cosmos.distribution.v1beta1.QueryValidatorSlashesResponse + * @instance + * @returns {Object.} JSON object + */ + QueryValidatorSlashesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryValidatorSlashesResponse; + })(v1beta1.QueryValidatorSlashesResponse || {}); + + v1beta1.QueryDelegationRewardsRequest = (function(QueryDelegationRewardsRequest) { + + /** + * Properties of a QueryDelegationRewardsRequest. + * @memberof cosmos.distribution.v1beta1 + * @interface IQueryDelegationRewardsRequest + * @property {string|null} [delegatorAddress] QueryDelegationRewardsRequest delegatorAddress + * @property {string|null} [validatorAddress] QueryDelegationRewardsRequest validatorAddress + */ + + /** + * Constructs a new QueryDelegationRewardsRequest. + * @memberof cosmos.distribution.v1beta1 + * @classdesc Represents a QueryDelegationRewardsRequest. + * @implements IQueryDelegationRewardsRequest + * @constructor + * @param {cosmos.distribution.v1beta1.IQueryDelegationRewardsRequest=} [properties] Properties to set + */ + function QueryDelegationRewardsRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryDelegationRewardsRequest delegatorAddress. + * @member {string} delegatorAddress + * @memberof cosmos.distribution.v1beta1.QueryDelegationRewardsRequest + * @instance + */ + QueryDelegationRewardsRequest.prototype.delegatorAddress = ""; + + /** + * QueryDelegationRewardsRequest validatorAddress. + * @member {string} validatorAddress + * @memberof cosmos.distribution.v1beta1.QueryDelegationRewardsRequest + * @instance + */ + QueryDelegationRewardsRequest.prototype.validatorAddress = ""; + + /** + * Creates a new QueryDelegationRewardsRequest instance using the specified properties. + * @function create + * @memberof cosmos.distribution.v1beta1.QueryDelegationRewardsRequest + * @static + * @param {cosmos.distribution.v1beta1.IQueryDelegationRewardsRequest=} [properties] Properties to set + * @returns {cosmos.distribution.v1beta1.QueryDelegationRewardsRequest} QueryDelegationRewardsRequest instance + */ + QueryDelegationRewardsRequest.create = function create(properties) { + return new QueryDelegationRewardsRequest(properties); + }; + + /** + * Encodes the specified QueryDelegationRewardsRequest message. Does not implicitly {@link cosmos.distribution.v1beta1.QueryDelegationRewardsRequest.verify|verify} messages. + * @function encode + * @memberof cosmos.distribution.v1beta1.QueryDelegationRewardsRequest + * @static + * @param {cosmos.distribution.v1beta1.IQueryDelegationRewardsRequest} message QueryDelegationRewardsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDelegationRewardsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.delegatorAddress != null && Object.hasOwnProperty.call(message, "delegatorAddress")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.delegatorAddress); + if (message.validatorAddress != null && Object.hasOwnProperty.call(message, "validatorAddress")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.validatorAddress); + return writer; + }; + + /** + * Encodes the specified QueryDelegationRewardsRequest message, length delimited. Does not implicitly {@link cosmos.distribution.v1beta1.QueryDelegationRewardsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.distribution.v1beta1.QueryDelegationRewardsRequest + * @static + * @param {cosmos.distribution.v1beta1.IQueryDelegationRewardsRequest} message QueryDelegationRewardsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDelegationRewardsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryDelegationRewardsRequest message from the specified reader or buffer. + * @function decode + * @memberof cosmos.distribution.v1beta1.QueryDelegationRewardsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.distribution.v1beta1.QueryDelegationRewardsRequest} QueryDelegationRewardsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDelegationRewardsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.distribution.v1beta1.QueryDelegationRewardsRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.delegatorAddress = reader.string(); + break; + case 2: + message.validatorAddress = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryDelegationRewardsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.distribution.v1beta1.QueryDelegationRewardsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.distribution.v1beta1.QueryDelegationRewardsRequest} QueryDelegationRewardsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDelegationRewardsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryDelegationRewardsRequest message. + * @function verify + * @memberof cosmos.distribution.v1beta1.QueryDelegationRewardsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryDelegationRewardsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + if (!$util.isString(message.delegatorAddress)) + return "delegatorAddress: string expected"; + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + if (!$util.isString(message.validatorAddress)) + return "validatorAddress: string expected"; + return null; + }; + + /** + * Creates a QueryDelegationRewardsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.distribution.v1beta1.QueryDelegationRewardsRequest + * @static + * @param {Object.} object Plain object + * @returns {cosmos.distribution.v1beta1.QueryDelegationRewardsRequest} QueryDelegationRewardsRequest + */ + QueryDelegationRewardsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.distribution.v1beta1.QueryDelegationRewardsRequest) + return object; + let message = new $root.cosmos.distribution.v1beta1.QueryDelegationRewardsRequest(); + if (object.delegatorAddress != null) + message.delegatorAddress = String(object.delegatorAddress); + if (object.validatorAddress != null) + message.validatorAddress = String(object.validatorAddress); + return message; + }; + + /** + * Creates a plain object from a QueryDelegationRewardsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.distribution.v1beta1.QueryDelegationRewardsRequest + * @static + * @param {cosmos.distribution.v1beta1.QueryDelegationRewardsRequest} message QueryDelegationRewardsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryDelegationRewardsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.delegatorAddress = ""; + object.validatorAddress = ""; + } + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + object.delegatorAddress = message.delegatorAddress; + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + object.validatorAddress = message.validatorAddress; + return object; + }; + + /** + * Converts this QueryDelegationRewardsRequest to JSON. + * @function toJSON + * @memberof cosmos.distribution.v1beta1.QueryDelegationRewardsRequest + * @instance + * @returns {Object.} JSON object + */ + QueryDelegationRewardsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryDelegationRewardsRequest; + })(v1beta1.QueryDelegationRewardsRequest || {}); + + v1beta1.QueryDelegationRewardsResponse = (function(QueryDelegationRewardsResponse) { + + /** + * Properties of a QueryDelegationRewardsResponse. + * @memberof cosmos.distribution.v1beta1 + * @interface IQueryDelegationRewardsResponse + * @property {Array.|null} [rewards] QueryDelegationRewardsResponse rewards + */ + + /** + * Constructs a new QueryDelegationRewardsResponse. + * @memberof cosmos.distribution.v1beta1 + * @classdesc Represents a QueryDelegationRewardsResponse. + * @implements IQueryDelegationRewardsResponse + * @constructor + * @param {cosmos.distribution.v1beta1.IQueryDelegationRewardsResponse=} [properties] Properties to set + */ + function QueryDelegationRewardsResponse(properties) { + this.rewards = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryDelegationRewardsResponse rewards. + * @member {Array.} rewards + * @memberof cosmos.distribution.v1beta1.QueryDelegationRewardsResponse + * @instance + */ + QueryDelegationRewardsResponse.prototype.rewards = $util.emptyArray; + + /** + * Creates a new QueryDelegationRewardsResponse instance using the specified properties. + * @function create + * @memberof cosmos.distribution.v1beta1.QueryDelegationRewardsResponse + * @static + * @param {cosmos.distribution.v1beta1.IQueryDelegationRewardsResponse=} [properties] Properties to set + * @returns {cosmos.distribution.v1beta1.QueryDelegationRewardsResponse} QueryDelegationRewardsResponse instance + */ + QueryDelegationRewardsResponse.create = function create(properties) { + return new QueryDelegationRewardsResponse(properties); + }; + + /** + * Encodes the specified QueryDelegationRewardsResponse message. Does not implicitly {@link cosmos.distribution.v1beta1.QueryDelegationRewardsResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.distribution.v1beta1.QueryDelegationRewardsResponse + * @static + * @param {cosmos.distribution.v1beta1.IQueryDelegationRewardsResponse} message QueryDelegationRewardsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDelegationRewardsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rewards != null && message.rewards.length) + for (let i = 0; i < message.rewards.length; ++i) + $root.cosmos.base.v1beta1.DecCoin.encode(message.rewards[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryDelegationRewardsResponse message, length delimited. Does not implicitly {@link cosmos.distribution.v1beta1.QueryDelegationRewardsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.distribution.v1beta1.QueryDelegationRewardsResponse + * @static + * @param {cosmos.distribution.v1beta1.IQueryDelegationRewardsResponse} message QueryDelegationRewardsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDelegationRewardsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryDelegationRewardsResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.distribution.v1beta1.QueryDelegationRewardsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.distribution.v1beta1.QueryDelegationRewardsResponse} QueryDelegationRewardsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDelegationRewardsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.distribution.v1beta1.QueryDelegationRewardsResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.rewards && message.rewards.length)) + message.rewards = []; + message.rewards.push($root.cosmos.base.v1beta1.DecCoin.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryDelegationRewardsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.distribution.v1beta1.QueryDelegationRewardsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.distribution.v1beta1.QueryDelegationRewardsResponse} QueryDelegationRewardsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDelegationRewardsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryDelegationRewardsResponse message. + * @function verify + * @memberof cosmos.distribution.v1beta1.QueryDelegationRewardsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryDelegationRewardsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rewards != null && message.hasOwnProperty("rewards")) { + if (!Array.isArray(message.rewards)) + return "rewards: array expected"; + for (let i = 0; i < message.rewards.length; ++i) { + let error = $root.cosmos.base.v1beta1.DecCoin.verify(message.rewards[i]); + if (error) + return "rewards." + error; + } + } + return null; + }; + + /** + * Creates a QueryDelegationRewardsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.distribution.v1beta1.QueryDelegationRewardsResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.distribution.v1beta1.QueryDelegationRewardsResponse} QueryDelegationRewardsResponse + */ + QueryDelegationRewardsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.distribution.v1beta1.QueryDelegationRewardsResponse) + return object; + let message = new $root.cosmos.distribution.v1beta1.QueryDelegationRewardsResponse(); + if (object.rewards) { + if (!Array.isArray(object.rewards)) + throw TypeError(".cosmos.distribution.v1beta1.QueryDelegationRewardsResponse.rewards: array expected"); + message.rewards = []; + for (let i = 0; i < object.rewards.length; ++i) { + if (typeof object.rewards[i] !== "object") + throw TypeError(".cosmos.distribution.v1beta1.QueryDelegationRewardsResponse.rewards: object expected"); + message.rewards[i] = $root.cosmos.base.v1beta1.DecCoin.fromObject(object.rewards[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a QueryDelegationRewardsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.distribution.v1beta1.QueryDelegationRewardsResponse + * @static + * @param {cosmos.distribution.v1beta1.QueryDelegationRewardsResponse} message QueryDelegationRewardsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryDelegationRewardsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.rewards = []; + if (message.rewards && message.rewards.length) { + object.rewards = []; + for (let j = 0; j < message.rewards.length; ++j) + object.rewards[j] = $root.cosmos.base.v1beta1.DecCoin.toObject(message.rewards[j], options); + } + return object; + }; + + /** + * Converts this QueryDelegationRewardsResponse to JSON. + * @function toJSON + * @memberof cosmos.distribution.v1beta1.QueryDelegationRewardsResponse + * @instance + * @returns {Object.} JSON object + */ + QueryDelegationRewardsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryDelegationRewardsResponse; + })(v1beta1.QueryDelegationRewardsResponse || {}); + + v1beta1.QueryDelegationTotalRewardsRequest = (function(QueryDelegationTotalRewardsRequest) { + + /** + * Properties of a QueryDelegationTotalRewardsRequest. + * @memberof cosmos.distribution.v1beta1 + * @interface IQueryDelegationTotalRewardsRequest + * @property {string|null} [delegatorAddress] QueryDelegationTotalRewardsRequest delegatorAddress + */ + + /** + * Constructs a new QueryDelegationTotalRewardsRequest. + * @memberof cosmos.distribution.v1beta1 + * @classdesc Represents a QueryDelegationTotalRewardsRequest. + * @implements IQueryDelegationTotalRewardsRequest + * @constructor + * @param {cosmos.distribution.v1beta1.IQueryDelegationTotalRewardsRequest=} [properties] Properties to set + */ + function QueryDelegationTotalRewardsRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryDelegationTotalRewardsRequest delegatorAddress. + * @member {string} delegatorAddress + * @memberof cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest + * @instance + */ + QueryDelegationTotalRewardsRequest.prototype.delegatorAddress = ""; + + /** + * Creates a new QueryDelegationTotalRewardsRequest instance using the specified properties. + * @function create + * @memberof cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest + * @static + * @param {cosmos.distribution.v1beta1.IQueryDelegationTotalRewardsRequest=} [properties] Properties to set + * @returns {cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest} QueryDelegationTotalRewardsRequest instance + */ + QueryDelegationTotalRewardsRequest.create = function create(properties) { + return new QueryDelegationTotalRewardsRequest(properties); + }; + + /** + * Encodes the specified QueryDelegationTotalRewardsRequest message. Does not implicitly {@link cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest.verify|verify} messages. + * @function encode + * @memberof cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest + * @static + * @param {cosmos.distribution.v1beta1.IQueryDelegationTotalRewardsRequest} message QueryDelegationTotalRewardsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDelegationTotalRewardsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.delegatorAddress != null && Object.hasOwnProperty.call(message, "delegatorAddress")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.delegatorAddress); + return writer; + }; + + /** + * Encodes the specified QueryDelegationTotalRewardsRequest message, length delimited. Does not implicitly {@link cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest + * @static + * @param {cosmos.distribution.v1beta1.IQueryDelegationTotalRewardsRequest} message QueryDelegationTotalRewardsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDelegationTotalRewardsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryDelegationTotalRewardsRequest message from the specified reader or buffer. + * @function decode + * @memberof cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest} QueryDelegationTotalRewardsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDelegationTotalRewardsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.delegatorAddress = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryDelegationTotalRewardsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest} QueryDelegationTotalRewardsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDelegationTotalRewardsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryDelegationTotalRewardsRequest message. + * @function verify + * @memberof cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryDelegationTotalRewardsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + if (!$util.isString(message.delegatorAddress)) + return "delegatorAddress: string expected"; + return null; + }; + + /** + * Creates a QueryDelegationTotalRewardsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest + * @static + * @param {Object.} object Plain object + * @returns {cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest} QueryDelegationTotalRewardsRequest + */ + QueryDelegationTotalRewardsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest) + return object; + let message = new $root.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest(); + if (object.delegatorAddress != null) + message.delegatorAddress = String(object.delegatorAddress); + return message; + }; + + /** + * Creates a plain object from a QueryDelegationTotalRewardsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest + * @static + * @param {cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest} message QueryDelegationTotalRewardsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryDelegationTotalRewardsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.delegatorAddress = ""; + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + object.delegatorAddress = message.delegatorAddress; + return object; + }; + + /** + * Converts this QueryDelegationTotalRewardsRequest to JSON. + * @function toJSON + * @memberof cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest + * @instance + * @returns {Object.} JSON object + */ + QueryDelegationTotalRewardsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryDelegationTotalRewardsRequest; + })(v1beta1.QueryDelegationTotalRewardsRequest || {}); + + v1beta1.QueryDelegationTotalRewardsResponse = (function(QueryDelegationTotalRewardsResponse) { + + /** + * Properties of a QueryDelegationTotalRewardsResponse. + * @memberof cosmos.distribution.v1beta1 + * @interface IQueryDelegationTotalRewardsResponse + * @property {Array.|null} [rewards] QueryDelegationTotalRewardsResponse rewards + * @property {Array.|null} [total] QueryDelegationTotalRewardsResponse total + */ + + /** + * Constructs a new QueryDelegationTotalRewardsResponse. + * @memberof cosmos.distribution.v1beta1 + * @classdesc Represents a QueryDelegationTotalRewardsResponse. + * @implements IQueryDelegationTotalRewardsResponse + * @constructor + * @param {cosmos.distribution.v1beta1.IQueryDelegationTotalRewardsResponse=} [properties] Properties to set + */ + function QueryDelegationTotalRewardsResponse(properties) { + this.rewards = []; + this.total = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryDelegationTotalRewardsResponse rewards. + * @member {Array.} rewards + * @memberof cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse + * @instance + */ + QueryDelegationTotalRewardsResponse.prototype.rewards = $util.emptyArray; + + /** + * QueryDelegationTotalRewardsResponse total. + * @member {Array.} total + * @memberof cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse + * @instance + */ + QueryDelegationTotalRewardsResponse.prototype.total = $util.emptyArray; + + /** + * Creates a new QueryDelegationTotalRewardsResponse instance using the specified properties. + * @function create + * @memberof cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse + * @static + * @param {cosmos.distribution.v1beta1.IQueryDelegationTotalRewardsResponse=} [properties] Properties to set + * @returns {cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse} QueryDelegationTotalRewardsResponse instance + */ + QueryDelegationTotalRewardsResponse.create = function create(properties) { + return new QueryDelegationTotalRewardsResponse(properties); + }; + + /** + * Encodes the specified QueryDelegationTotalRewardsResponse message. Does not implicitly {@link cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse + * @static + * @param {cosmos.distribution.v1beta1.IQueryDelegationTotalRewardsResponse} message QueryDelegationTotalRewardsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDelegationTotalRewardsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rewards != null && message.rewards.length) + for (let i = 0; i < message.rewards.length; ++i) + $root.cosmos.distribution.v1beta1.DelegationDelegatorReward.encode(message.rewards[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.total != null && message.total.length) + for (let i = 0; i < message.total.length; ++i) + $root.cosmos.base.v1beta1.DecCoin.encode(message.total[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryDelegationTotalRewardsResponse message, length delimited. Does not implicitly {@link cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse + * @static + * @param {cosmos.distribution.v1beta1.IQueryDelegationTotalRewardsResponse} message QueryDelegationTotalRewardsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDelegationTotalRewardsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryDelegationTotalRewardsResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse} QueryDelegationTotalRewardsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDelegationTotalRewardsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.rewards && message.rewards.length)) + message.rewards = []; + message.rewards.push($root.cosmos.distribution.v1beta1.DelegationDelegatorReward.decode(reader, reader.uint32())); + break; + case 2: + if (!(message.total && message.total.length)) + message.total = []; + message.total.push($root.cosmos.base.v1beta1.DecCoin.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryDelegationTotalRewardsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse} QueryDelegationTotalRewardsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDelegationTotalRewardsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryDelegationTotalRewardsResponse message. + * @function verify + * @memberof cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryDelegationTotalRewardsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rewards != null && message.hasOwnProperty("rewards")) { + if (!Array.isArray(message.rewards)) + return "rewards: array expected"; + for (let i = 0; i < message.rewards.length; ++i) { + let error = $root.cosmos.distribution.v1beta1.DelegationDelegatorReward.verify(message.rewards[i]); + if (error) + return "rewards." + error; + } + } + if (message.total != null && message.hasOwnProperty("total")) { + if (!Array.isArray(message.total)) + return "total: array expected"; + for (let i = 0; i < message.total.length; ++i) { + let error = $root.cosmos.base.v1beta1.DecCoin.verify(message.total[i]); + if (error) + return "total." + error; + } + } + return null; + }; + + /** + * Creates a QueryDelegationTotalRewardsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse} QueryDelegationTotalRewardsResponse + */ + QueryDelegationTotalRewardsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse) + return object; + let message = new $root.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse(); + if (object.rewards) { + if (!Array.isArray(object.rewards)) + throw TypeError(".cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse.rewards: array expected"); + message.rewards = []; + for (let i = 0; i < object.rewards.length; ++i) { + if (typeof object.rewards[i] !== "object") + throw TypeError(".cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse.rewards: object expected"); + message.rewards[i] = $root.cosmos.distribution.v1beta1.DelegationDelegatorReward.fromObject(object.rewards[i]); + } + } + if (object.total) { + if (!Array.isArray(object.total)) + throw TypeError(".cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse.total: array expected"); + message.total = []; + for (let i = 0; i < object.total.length; ++i) { + if (typeof object.total[i] !== "object") + throw TypeError(".cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse.total: object expected"); + message.total[i] = $root.cosmos.base.v1beta1.DecCoin.fromObject(object.total[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a QueryDelegationTotalRewardsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse + * @static + * @param {cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse} message QueryDelegationTotalRewardsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryDelegationTotalRewardsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) { + object.rewards = []; + object.total = []; + } + if (message.rewards && message.rewards.length) { + object.rewards = []; + for (let j = 0; j < message.rewards.length; ++j) + object.rewards[j] = $root.cosmos.distribution.v1beta1.DelegationDelegatorReward.toObject(message.rewards[j], options); + } + if (message.total && message.total.length) { + object.total = []; + for (let j = 0; j < message.total.length; ++j) + object.total[j] = $root.cosmos.base.v1beta1.DecCoin.toObject(message.total[j], options); + } + return object; + }; + + /** + * Converts this QueryDelegationTotalRewardsResponse to JSON. + * @function toJSON + * @memberof cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse + * @instance + * @returns {Object.} JSON object + */ + QueryDelegationTotalRewardsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryDelegationTotalRewardsResponse; + })(v1beta1.QueryDelegationTotalRewardsResponse || {}); + + v1beta1.QueryDelegatorValidatorsRequest = (function(QueryDelegatorValidatorsRequest) { + + /** + * Properties of a QueryDelegatorValidatorsRequest. + * @memberof cosmos.distribution.v1beta1 + * @interface IQueryDelegatorValidatorsRequest + * @property {string|null} [delegatorAddress] QueryDelegatorValidatorsRequest delegatorAddress + */ + + /** + * Constructs a new QueryDelegatorValidatorsRequest. + * @memberof cosmos.distribution.v1beta1 + * @classdesc Represents a QueryDelegatorValidatorsRequest. + * @implements IQueryDelegatorValidatorsRequest + * @constructor + * @param {cosmos.distribution.v1beta1.IQueryDelegatorValidatorsRequest=} [properties] Properties to set + */ + function QueryDelegatorValidatorsRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryDelegatorValidatorsRequest delegatorAddress. + * @member {string} delegatorAddress + * @memberof cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest + * @instance + */ + QueryDelegatorValidatorsRequest.prototype.delegatorAddress = ""; + + /** + * Creates a new QueryDelegatorValidatorsRequest instance using the specified properties. + * @function create + * @memberof cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest + * @static + * @param {cosmos.distribution.v1beta1.IQueryDelegatorValidatorsRequest=} [properties] Properties to set + * @returns {cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest} QueryDelegatorValidatorsRequest instance + */ + QueryDelegatorValidatorsRequest.create = function create(properties) { + return new QueryDelegatorValidatorsRequest(properties); + }; + + /** + * Encodes the specified QueryDelegatorValidatorsRequest message. Does not implicitly {@link cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest.verify|verify} messages. + * @function encode + * @memberof cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest + * @static + * @param {cosmos.distribution.v1beta1.IQueryDelegatorValidatorsRequest} message QueryDelegatorValidatorsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDelegatorValidatorsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.delegatorAddress != null && Object.hasOwnProperty.call(message, "delegatorAddress")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.delegatorAddress); + return writer; + }; + + /** + * Encodes the specified QueryDelegatorValidatorsRequest message, length delimited. Does not implicitly {@link cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest + * @static + * @param {cosmos.distribution.v1beta1.IQueryDelegatorValidatorsRequest} message QueryDelegatorValidatorsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDelegatorValidatorsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryDelegatorValidatorsRequest message from the specified reader or buffer. + * @function decode + * @memberof cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest} QueryDelegatorValidatorsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDelegatorValidatorsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.delegatorAddress = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryDelegatorValidatorsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest} QueryDelegatorValidatorsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDelegatorValidatorsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryDelegatorValidatorsRequest message. + * @function verify + * @memberof cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryDelegatorValidatorsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + if (!$util.isString(message.delegatorAddress)) + return "delegatorAddress: string expected"; + return null; + }; + + /** + * Creates a QueryDelegatorValidatorsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest + * @static + * @param {Object.} object Plain object + * @returns {cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest} QueryDelegatorValidatorsRequest + */ + QueryDelegatorValidatorsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest) + return object; + let message = new $root.cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest(); + if (object.delegatorAddress != null) + message.delegatorAddress = String(object.delegatorAddress); + return message; + }; + + /** + * Creates a plain object from a QueryDelegatorValidatorsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest + * @static + * @param {cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest} message QueryDelegatorValidatorsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryDelegatorValidatorsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.delegatorAddress = ""; + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + object.delegatorAddress = message.delegatorAddress; + return object; + }; + + /** + * Converts this QueryDelegatorValidatorsRequest to JSON. + * @function toJSON + * @memberof cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest + * @instance + * @returns {Object.} JSON object + */ + QueryDelegatorValidatorsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryDelegatorValidatorsRequest; + })(v1beta1.QueryDelegatorValidatorsRequest || {}); + + v1beta1.QueryDelegatorValidatorsResponse = (function(QueryDelegatorValidatorsResponse) { + + /** + * Properties of a QueryDelegatorValidatorsResponse. + * @memberof cosmos.distribution.v1beta1 + * @interface IQueryDelegatorValidatorsResponse + * @property {Array.|null} [validators] QueryDelegatorValidatorsResponse validators + */ + + /** + * Constructs a new QueryDelegatorValidatorsResponse. + * @memberof cosmos.distribution.v1beta1 + * @classdesc Represents a QueryDelegatorValidatorsResponse. + * @implements IQueryDelegatorValidatorsResponse + * @constructor + * @param {cosmos.distribution.v1beta1.IQueryDelegatorValidatorsResponse=} [properties] Properties to set + */ + function QueryDelegatorValidatorsResponse(properties) { + this.validators = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryDelegatorValidatorsResponse validators. + * @member {Array.} validators + * @memberof cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse + * @instance + */ + QueryDelegatorValidatorsResponse.prototype.validators = $util.emptyArray; + + /** + * Creates a new QueryDelegatorValidatorsResponse instance using the specified properties. + * @function create + * @memberof cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse + * @static + * @param {cosmos.distribution.v1beta1.IQueryDelegatorValidatorsResponse=} [properties] Properties to set + * @returns {cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse} QueryDelegatorValidatorsResponse instance + */ + QueryDelegatorValidatorsResponse.create = function create(properties) { + return new QueryDelegatorValidatorsResponse(properties); + }; + + /** + * Encodes the specified QueryDelegatorValidatorsResponse message. Does not implicitly {@link cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse + * @static + * @param {cosmos.distribution.v1beta1.IQueryDelegatorValidatorsResponse} message QueryDelegatorValidatorsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDelegatorValidatorsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.validators != null && message.validators.length) + for (let i = 0; i < message.validators.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.validators[i]); + return writer; + }; + + /** + * Encodes the specified QueryDelegatorValidatorsResponse message, length delimited. Does not implicitly {@link cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse + * @static + * @param {cosmos.distribution.v1beta1.IQueryDelegatorValidatorsResponse} message QueryDelegatorValidatorsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDelegatorValidatorsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryDelegatorValidatorsResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse} QueryDelegatorValidatorsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDelegatorValidatorsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.validators && message.validators.length)) + message.validators = []; + message.validators.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryDelegatorValidatorsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse} QueryDelegatorValidatorsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDelegatorValidatorsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryDelegatorValidatorsResponse message. + * @function verify + * @memberof cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryDelegatorValidatorsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.validators != null && message.hasOwnProperty("validators")) { + if (!Array.isArray(message.validators)) + return "validators: array expected"; + for (let i = 0; i < message.validators.length; ++i) + if (!$util.isString(message.validators[i])) + return "validators: string[] expected"; + } + return null; + }; + + /** + * Creates a QueryDelegatorValidatorsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse} QueryDelegatorValidatorsResponse + */ + QueryDelegatorValidatorsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse) + return object; + let message = new $root.cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse(); + if (object.validators) { + if (!Array.isArray(object.validators)) + throw TypeError(".cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse.validators: array expected"); + message.validators = []; + for (let i = 0; i < object.validators.length; ++i) + message.validators[i] = String(object.validators[i]); + } + return message; + }; + + /** + * Creates a plain object from a QueryDelegatorValidatorsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse + * @static + * @param {cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse} message QueryDelegatorValidatorsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryDelegatorValidatorsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.validators = []; + if (message.validators && message.validators.length) { + object.validators = []; + for (let j = 0; j < message.validators.length; ++j) + object.validators[j] = message.validators[j]; + } + return object; + }; + + /** + * Converts this QueryDelegatorValidatorsResponse to JSON. + * @function toJSON + * @memberof cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse + * @instance + * @returns {Object.} JSON object + */ + QueryDelegatorValidatorsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryDelegatorValidatorsResponse; + })(v1beta1.QueryDelegatorValidatorsResponse || {}); + + v1beta1.QueryDelegatorWithdrawAddressRequest = (function(QueryDelegatorWithdrawAddressRequest) { + + /** + * Properties of a QueryDelegatorWithdrawAddressRequest. + * @memberof cosmos.distribution.v1beta1 + * @interface IQueryDelegatorWithdrawAddressRequest + * @property {string|null} [delegatorAddress] QueryDelegatorWithdrawAddressRequest delegatorAddress + */ + + /** + * Constructs a new QueryDelegatorWithdrawAddressRequest. + * @memberof cosmos.distribution.v1beta1 + * @classdesc Represents a QueryDelegatorWithdrawAddressRequest. + * @implements IQueryDelegatorWithdrawAddressRequest + * @constructor + * @param {cosmos.distribution.v1beta1.IQueryDelegatorWithdrawAddressRequest=} [properties] Properties to set + */ + function QueryDelegatorWithdrawAddressRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryDelegatorWithdrawAddressRequest delegatorAddress. + * @member {string} delegatorAddress + * @memberof cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest + * @instance + */ + QueryDelegatorWithdrawAddressRequest.prototype.delegatorAddress = ""; + + /** + * Creates a new QueryDelegatorWithdrawAddressRequest instance using the specified properties. + * @function create + * @memberof cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest + * @static + * @param {cosmos.distribution.v1beta1.IQueryDelegatorWithdrawAddressRequest=} [properties] Properties to set + * @returns {cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest} QueryDelegatorWithdrawAddressRequest instance + */ + QueryDelegatorWithdrawAddressRequest.create = function create(properties) { + return new QueryDelegatorWithdrawAddressRequest(properties); + }; + + /** + * Encodes the specified QueryDelegatorWithdrawAddressRequest message. Does not implicitly {@link cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest.verify|verify} messages. + * @function encode + * @memberof cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest + * @static + * @param {cosmos.distribution.v1beta1.IQueryDelegatorWithdrawAddressRequest} message QueryDelegatorWithdrawAddressRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDelegatorWithdrawAddressRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.delegatorAddress != null && Object.hasOwnProperty.call(message, "delegatorAddress")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.delegatorAddress); + return writer; + }; + + /** + * Encodes the specified QueryDelegatorWithdrawAddressRequest message, length delimited. Does not implicitly {@link cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest + * @static + * @param {cosmos.distribution.v1beta1.IQueryDelegatorWithdrawAddressRequest} message QueryDelegatorWithdrawAddressRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDelegatorWithdrawAddressRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryDelegatorWithdrawAddressRequest message from the specified reader or buffer. + * @function decode + * @memberof cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest} QueryDelegatorWithdrawAddressRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDelegatorWithdrawAddressRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.delegatorAddress = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryDelegatorWithdrawAddressRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest} QueryDelegatorWithdrawAddressRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDelegatorWithdrawAddressRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryDelegatorWithdrawAddressRequest message. + * @function verify + * @memberof cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryDelegatorWithdrawAddressRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + if (!$util.isString(message.delegatorAddress)) + return "delegatorAddress: string expected"; + return null; + }; + + /** + * Creates a QueryDelegatorWithdrawAddressRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest + * @static + * @param {Object.} object Plain object + * @returns {cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest} QueryDelegatorWithdrawAddressRequest + */ + QueryDelegatorWithdrawAddressRequest.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest) + return object; + let message = new $root.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest(); + if (object.delegatorAddress != null) + message.delegatorAddress = String(object.delegatorAddress); + return message; + }; + + /** + * Creates a plain object from a QueryDelegatorWithdrawAddressRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest + * @static + * @param {cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest} message QueryDelegatorWithdrawAddressRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryDelegatorWithdrawAddressRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.delegatorAddress = ""; + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + object.delegatorAddress = message.delegatorAddress; + return object; + }; + + /** + * Converts this QueryDelegatorWithdrawAddressRequest to JSON. + * @function toJSON + * @memberof cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest + * @instance + * @returns {Object.} JSON object + */ + QueryDelegatorWithdrawAddressRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryDelegatorWithdrawAddressRequest; + })(v1beta1.QueryDelegatorWithdrawAddressRequest || {}); + + v1beta1.QueryDelegatorWithdrawAddressResponse = (function(QueryDelegatorWithdrawAddressResponse) { + + /** + * Properties of a QueryDelegatorWithdrawAddressResponse. + * @memberof cosmos.distribution.v1beta1 + * @interface IQueryDelegatorWithdrawAddressResponse + * @property {string|null} [withdrawAddress] QueryDelegatorWithdrawAddressResponse withdrawAddress + */ + + /** + * Constructs a new QueryDelegatorWithdrawAddressResponse. + * @memberof cosmos.distribution.v1beta1 + * @classdesc Represents a QueryDelegatorWithdrawAddressResponse. + * @implements IQueryDelegatorWithdrawAddressResponse + * @constructor + * @param {cosmos.distribution.v1beta1.IQueryDelegatorWithdrawAddressResponse=} [properties] Properties to set + */ + function QueryDelegatorWithdrawAddressResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryDelegatorWithdrawAddressResponse withdrawAddress. + * @member {string} withdrawAddress + * @memberof cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse + * @instance + */ + QueryDelegatorWithdrawAddressResponse.prototype.withdrawAddress = ""; + + /** + * Creates a new QueryDelegatorWithdrawAddressResponse instance using the specified properties. + * @function create + * @memberof cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse + * @static + * @param {cosmos.distribution.v1beta1.IQueryDelegatorWithdrawAddressResponse=} [properties] Properties to set + * @returns {cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse} QueryDelegatorWithdrawAddressResponse instance + */ + QueryDelegatorWithdrawAddressResponse.create = function create(properties) { + return new QueryDelegatorWithdrawAddressResponse(properties); + }; + + /** + * Encodes the specified QueryDelegatorWithdrawAddressResponse message. Does not implicitly {@link cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse + * @static + * @param {cosmos.distribution.v1beta1.IQueryDelegatorWithdrawAddressResponse} message QueryDelegatorWithdrawAddressResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDelegatorWithdrawAddressResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.withdrawAddress != null && Object.hasOwnProperty.call(message, "withdrawAddress")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.withdrawAddress); + return writer; + }; + + /** + * Encodes the specified QueryDelegatorWithdrawAddressResponse message, length delimited. Does not implicitly {@link cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse + * @static + * @param {cosmos.distribution.v1beta1.IQueryDelegatorWithdrawAddressResponse} message QueryDelegatorWithdrawAddressResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDelegatorWithdrawAddressResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryDelegatorWithdrawAddressResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse} QueryDelegatorWithdrawAddressResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDelegatorWithdrawAddressResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.withdrawAddress = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryDelegatorWithdrawAddressResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse} QueryDelegatorWithdrawAddressResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDelegatorWithdrawAddressResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryDelegatorWithdrawAddressResponse message. + * @function verify + * @memberof cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryDelegatorWithdrawAddressResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.withdrawAddress != null && message.hasOwnProperty("withdrawAddress")) + if (!$util.isString(message.withdrawAddress)) + return "withdrawAddress: string expected"; + return null; + }; + + /** + * Creates a QueryDelegatorWithdrawAddressResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse} QueryDelegatorWithdrawAddressResponse + */ + QueryDelegatorWithdrawAddressResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse) + return object; + let message = new $root.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse(); + if (object.withdrawAddress != null) + message.withdrawAddress = String(object.withdrawAddress); + return message; + }; + + /** + * Creates a plain object from a QueryDelegatorWithdrawAddressResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse + * @static + * @param {cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse} message QueryDelegatorWithdrawAddressResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryDelegatorWithdrawAddressResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.withdrawAddress = ""; + if (message.withdrawAddress != null && message.hasOwnProperty("withdrawAddress")) + object.withdrawAddress = message.withdrawAddress; + return object; + }; + + /** + * Converts this QueryDelegatorWithdrawAddressResponse to JSON. + * @function toJSON + * @memberof cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse + * @instance + * @returns {Object.} JSON object + */ + QueryDelegatorWithdrawAddressResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryDelegatorWithdrawAddressResponse; + })(v1beta1.QueryDelegatorWithdrawAddressResponse || {}); + + v1beta1.QueryCommunityPoolRequest = (function(QueryCommunityPoolRequest) { + + /** + * Properties of a QueryCommunityPoolRequest. + * @memberof cosmos.distribution.v1beta1 + * @interface IQueryCommunityPoolRequest + */ + + /** + * Constructs a new QueryCommunityPoolRequest. + * @memberof cosmos.distribution.v1beta1 + * @classdesc Represents a QueryCommunityPoolRequest. + * @implements IQueryCommunityPoolRequest + * @constructor + * @param {cosmos.distribution.v1beta1.IQueryCommunityPoolRequest=} [properties] Properties to set + */ + function QueryCommunityPoolRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new QueryCommunityPoolRequest instance using the specified properties. + * @function create + * @memberof cosmos.distribution.v1beta1.QueryCommunityPoolRequest + * @static + * @param {cosmos.distribution.v1beta1.IQueryCommunityPoolRequest=} [properties] Properties to set + * @returns {cosmos.distribution.v1beta1.QueryCommunityPoolRequest} QueryCommunityPoolRequest instance + */ + QueryCommunityPoolRequest.create = function create(properties) { + return new QueryCommunityPoolRequest(properties); + }; + + /** + * Encodes the specified QueryCommunityPoolRequest message. Does not implicitly {@link cosmos.distribution.v1beta1.QueryCommunityPoolRequest.verify|verify} messages. + * @function encode + * @memberof cosmos.distribution.v1beta1.QueryCommunityPoolRequest + * @static + * @param {cosmos.distribution.v1beta1.IQueryCommunityPoolRequest} message QueryCommunityPoolRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryCommunityPoolRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified QueryCommunityPoolRequest message, length delimited. Does not implicitly {@link cosmos.distribution.v1beta1.QueryCommunityPoolRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.distribution.v1beta1.QueryCommunityPoolRequest + * @static + * @param {cosmos.distribution.v1beta1.IQueryCommunityPoolRequest} message QueryCommunityPoolRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryCommunityPoolRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryCommunityPoolRequest message from the specified reader or buffer. + * @function decode + * @memberof cosmos.distribution.v1beta1.QueryCommunityPoolRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.distribution.v1beta1.QueryCommunityPoolRequest} QueryCommunityPoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryCommunityPoolRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.distribution.v1beta1.QueryCommunityPoolRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryCommunityPoolRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.distribution.v1beta1.QueryCommunityPoolRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.distribution.v1beta1.QueryCommunityPoolRequest} QueryCommunityPoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryCommunityPoolRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryCommunityPoolRequest message. + * @function verify + * @memberof cosmos.distribution.v1beta1.QueryCommunityPoolRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryCommunityPoolRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a QueryCommunityPoolRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.distribution.v1beta1.QueryCommunityPoolRequest + * @static + * @param {Object.} object Plain object + * @returns {cosmos.distribution.v1beta1.QueryCommunityPoolRequest} QueryCommunityPoolRequest + */ + QueryCommunityPoolRequest.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.distribution.v1beta1.QueryCommunityPoolRequest) + return object; + return new $root.cosmos.distribution.v1beta1.QueryCommunityPoolRequest(); + }; + + /** + * Creates a plain object from a QueryCommunityPoolRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.distribution.v1beta1.QueryCommunityPoolRequest + * @static + * @param {cosmos.distribution.v1beta1.QueryCommunityPoolRequest} message QueryCommunityPoolRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryCommunityPoolRequest.toObject = function toObject() { + return {}; + }; + + /** + * Converts this QueryCommunityPoolRequest to JSON. + * @function toJSON + * @memberof cosmos.distribution.v1beta1.QueryCommunityPoolRequest + * @instance + * @returns {Object.} JSON object + */ + QueryCommunityPoolRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryCommunityPoolRequest; + })(v1beta1.QueryCommunityPoolRequest || {}); + + v1beta1.QueryCommunityPoolResponse = (function(QueryCommunityPoolResponse) { + + /** + * Properties of a QueryCommunityPoolResponse. + * @memberof cosmos.distribution.v1beta1 + * @interface IQueryCommunityPoolResponse + * @property {Array.|null} [pool] QueryCommunityPoolResponse pool + */ + + /** + * Constructs a new QueryCommunityPoolResponse. + * @memberof cosmos.distribution.v1beta1 + * @classdesc Represents a QueryCommunityPoolResponse. + * @implements IQueryCommunityPoolResponse + * @constructor + * @param {cosmos.distribution.v1beta1.IQueryCommunityPoolResponse=} [properties] Properties to set + */ + function QueryCommunityPoolResponse(properties) { + this.pool = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryCommunityPoolResponse pool. + * @member {Array.} pool + * @memberof cosmos.distribution.v1beta1.QueryCommunityPoolResponse + * @instance + */ + QueryCommunityPoolResponse.prototype.pool = $util.emptyArray; + + /** + * Creates a new QueryCommunityPoolResponse instance using the specified properties. + * @function create + * @memberof cosmos.distribution.v1beta1.QueryCommunityPoolResponse + * @static + * @param {cosmos.distribution.v1beta1.IQueryCommunityPoolResponse=} [properties] Properties to set + * @returns {cosmos.distribution.v1beta1.QueryCommunityPoolResponse} QueryCommunityPoolResponse instance + */ + QueryCommunityPoolResponse.create = function create(properties) { + return new QueryCommunityPoolResponse(properties); + }; + + /** + * Encodes the specified QueryCommunityPoolResponse message. Does not implicitly {@link cosmos.distribution.v1beta1.QueryCommunityPoolResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.distribution.v1beta1.QueryCommunityPoolResponse + * @static + * @param {cosmos.distribution.v1beta1.IQueryCommunityPoolResponse} message QueryCommunityPoolResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryCommunityPoolResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pool != null && message.pool.length) + for (let i = 0; i < message.pool.length; ++i) + $root.cosmos.base.v1beta1.DecCoin.encode(message.pool[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryCommunityPoolResponse message, length delimited. Does not implicitly {@link cosmos.distribution.v1beta1.QueryCommunityPoolResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.distribution.v1beta1.QueryCommunityPoolResponse + * @static + * @param {cosmos.distribution.v1beta1.IQueryCommunityPoolResponse} message QueryCommunityPoolResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryCommunityPoolResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryCommunityPoolResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.distribution.v1beta1.QueryCommunityPoolResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.distribution.v1beta1.QueryCommunityPoolResponse} QueryCommunityPoolResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryCommunityPoolResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.distribution.v1beta1.QueryCommunityPoolResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.pool && message.pool.length)) + message.pool = []; + message.pool.push($root.cosmos.base.v1beta1.DecCoin.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryCommunityPoolResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.distribution.v1beta1.QueryCommunityPoolResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.distribution.v1beta1.QueryCommunityPoolResponse} QueryCommunityPoolResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryCommunityPoolResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryCommunityPoolResponse message. + * @function verify + * @memberof cosmos.distribution.v1beta1.QueryCommunityPoolResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryCommunityPoolResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.pool != null && message.hasOwnProperty("pool")) { + if (!Array.isArray(message.pool)) + return "pool: array expected"; + for (let i = 0; i < message.pool.length; ++i) { + let error = $root.cosmos.base.v1beta1.DecCoin.verify(message.pool[i]); + if (error) + return "pool." + error; + } + } + return null; + }; + + /** + * Creates a QueryCommunityPoolResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.distribution.v1beta1.QueryCommunityPoolResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.distribution.v1beta1.QueryCommunityPoolResponse} QueryCommunityPoolResponse + */ + QueryCommunityPoolResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.distribution.v1beta1.QueryCommunityPoolResponse) + return object; + let message = new $root.cosmos.distribution.v1beta1.QueryCommunityPoolResponse(); + if (object.pool) { + if (!Array.isArray(object.pool)) + throw TypeError(".cosmos.distribution.v1beta1.QueryCommunityPoolResponse.pool: array expected"); + message.pool = []; + for (let i = 0; i < object.pool.length; ++i) { + if (typeof object.pool[i] !== "object") + throw TypeError(".cosmos.distribution.v1beta1.QueryCommunityPoolResponse.pool: object expected"); + message.pool[i] = $root.cosmos.base.v1beta1.DecCoin.fromObject(object.pool[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a QueryCommunityPoolResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.distribution.v1beta1.QueryCommunityPoolResponse + * @static + * @param {cosmos.distribution.v1beta1.QueryCommunityPoolResponse} message QueryCommunityPoolResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryCommunityPoolResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.pool = []; + if (message.pool && message.pool.length) { + object.pool = []; + for (let j = 0; j < message.pool.length; ++j) + object.pool[j] = $root.cosmos.base.v1beta1.DecCoin.toObject(message.pool[j], options); + } + return object; + }; + + /** + * Converts this QueryCommunityPoolResponse to JSON. + * @function toJSON + * @memberof cosmos.distribution.v1beta1.QueryCommunityPoolResponse + * @instance + * @returns {Object.} JSON object + */ + QueryCommunityPoolResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryCommunityPoolResponse; + })(v1beta1.QueryCommunityPoolResponse || {}); + + v1beta1.Msg = (function(Msg) { + + /** + * Constructs a new Msg service. + * @memberof cosmos.distribution.v1beta1 + * @classdesc Represents a Msg + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Msg(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Msg.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Msg; + + /** + * Creates new Msg service using the specified rpc implementation. + * @function create + * @memberof cosmos.distribution.v1beta1.Msg + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Msg} RPC service. Useful where requests and/or responses are streamed. + */ + Msg.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link cosmos.distribution.v1beta1.Msg#setWithdrawAddress}. + * @memberof cosmos.distribution.v1beta1.Msg + * @typedef SetWithdrawAddressCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.distribution.v1beta1.IMsgSetWithdrawAddressResponse} [response] MsgSetWithdrawAddressResponse + */ + + /** + * Calls SetWithdrawAddress. + * @function setWithdrawAddress + * @memberof cosmos.distribution.v1beta1.Msg + * @instance + * @param {cosmos.distribution.v1beta1.IMsgSetWithdrawAddress} request MsgSetWithdrawAddress message or plain object + * @param {cosmos.distribution.v1beta1.Msg.SetWithdrawAddressCallback} callback Node-style callback called with the error, if any, and MsgSetWithdrawAddressResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Msg.prototype.setWithdrawAddress = function setWithdrawAddress(request, callback) { + return this.rpcCall(setWithdrawAddress, $root.cosmos.distribution.v1beta1.MsgSetWithdrawAddress, $root.cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse, request, callback); + }, "name", { value: "SetWithdrawAddress" }); + + /** + * Calls SetWithdrawAddress. + * @function setWithdrawAddress + * @memberof cosmos.distribution.v1beta1.Msg + * @instance + * @param {cosmos.distribution.v1beta1.IMsgSetWithdrawAddress} request MsgSetWithdrawAddress message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link cosmos.distribution.v1beta1.Msg#withdrawDelegatorReward}. + * @memberof cosmos.distribution.v1beta1.Msg + * @typedef WithdrawDelegatorRewardCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.distribution.v1beta1.IMsgWithdrawDelegatorRewardResponse} [response] MsgWithdrawDelegatorRewardResponse + */ + + /** + * Calls WithdrawDelegatorReward. + * @function withdrawDelegatorReward + * @memberof cosmos.distribution.v1beta1.Msg + * @instance + * @param {cosmos.distribution.v1beta1.IMsgWithdrawDelegatorReward} request MsgWithdrawDelegatorReward message or plain object + * @param {cosmos.distribution.v1beta1.Msg.WithdrawDelegatorRewardCallback} callback Node-style callback called with the error, if any, and MsgWithdrawDelegatorRewardResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Msg.prototype.withdrawDelegatorReward = function withdrawDelegatorReward(request, callback) { + return this.rpcCall(withdrawDelegatorReward, $root.cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward, $root.cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse, request, callback); + }, "name", { value: "WithdrawDelegatorReward" }); + + /** + * Calls WithdrawDelegatorReward. + * @function withdrawDelegatorReward + * @memberof cosmos.distribution.v1beta1.Msg + * @instance + * @param {cosmos.distribution.v1beta1.IMsgWithdrawDelegatorReward} request MsgWithdrawDelegatorReward message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link cosmos.distribution.v1beta1.Msg#withdrawValidatorCommission}. + * @memberof cosmos.distribution.v1beta1.Msg + * @typedef WithdrawValidatorCommissionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.distribution.v1beta1.IMsgWithdrawValidatorCommissionResponse} [response] MsgWithdrawValidatorCommissionResponse + */ + + /** + * Calls WithdrawValidatorCommission. + * @function withdrawValidatorCommission + * @memberof cosmos.distribution.v1beta1.Msg + * @instance + * @param {cosmos.distribution.v1beta1.IMsgWithdrawValidatorCommission} request MsgWithdrawValidatorCommission message or plain object + * @param {cosmos.distribution.v1beta1.Msg.WithdrawValidatorCommissionCallback} callback Node-style callback called with the error, if any, and MsgWithdrawValidatorCommissionResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Msg.prototype.withdrawValidatorCommission = function withdrawValidatorCommission(request, callback) { + return this.rpcCall(withdrawValidatorCommission, $root.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission, $root.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse, request, callback); + }, "name", { value: "WithdrawValidatorCommission" }); + + /** + * Calls WithdrawValidatorCommission. + * @function withdrawValidatorCommission + * @memberof cosmos.distribution.v1beta1.Msg + * @instance + * @param {cosmos.distribution.v1beta1.IMsgWithdrawValidatorCommission} request MsgWithdrawValidatorCommission message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link cosmos.distribution.v1beta1.Msg#fundCommunityPool}. + * @memberof cosmos.distribution.v1beta1.Msg + * @typedef FundCommunityPoolCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.distribution.v1beta1.IMsgFundCommunityPoolResponse} [response] MsgFundCommunityPoolResponse + */ + + /** + * Calls FundCommunityPool. + * @function fundCommunityPool + * @memberof cosmos.distribution.v1beta1.Msg + * @instance + * @param {cosmos.distribution.v1beta1.IMsgFundCommunityPool} request MsgFundCommunityPool message or plain object + * @param {cosmos.distribution.v1beta1.Msg.FundCommunityPoolCallback} callback Node-style callback called with the error, if any, and MsgFundCommunityPoolResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Msg.prototype.fundCommunityPool = function fundCommunityPool(request, callback) { + return this.rpcCall(fundCommunityPool, $root.cosmos.distribution.v1beta1.MsgFundCommunityPool, $root.cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse, request, callback); + }, "name", { value: "FundCommunityPool" }); + + /** + * Calls FundCommunityPool. + * @function fundCommunityPool + * @memberof cosmos.distribution.v1beta1.Msg + * @instance + * @param {cosmos.distribution.v1beta1.IMsgFundCommunityPool} request MsgFundCommunityPool message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Msg; + })(v1beta1.Msg || {}); + + v1beta1.MsgSetWithdrawAddress = (function(MsgSetWithdrawAddress) { + + /** + * Properties of a MsgSetWithdrawAddress. + * @memberof cosmos.distribution.v1beta1 + * @interface IMsgSetWithdrawAddress + * @property {string|null} [delegatorAddress] MsgSetWithdrawAddress delegatorAddress + * @property {string|null} [withdrawAddress] MsgSetWithdrawAddress withdrawAddress + */ + + /** + * Constructs a new MsgSetWithdrawAddress. + * @memberof cosmos.distribution.v1beta1 + * @classdesc Represents a MsgSetWithdrawAddress. + * @implements IMsgSetWithdrawAddress + * @constructor + * @param {cosmos.distribution.v1beta1.IMsgSetWithdrawAddress=} [properties] Properties to set + */ + function MsgSetWithdrawAddress(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgSetWithdrawAddress delegatorAddress. + * @member {string} delegatorAddress + * @memberof cosmos.distribution.v1beta1.MsgSetWithdrawAddress + * @instance + */ + MsgSetWithdrawAddress.prototype.delegatorAddress = ""; + + /** + * MsgSetWithdrawAddress withdrawAddress. + * @member {string} withdrawAddress + * @memberof cosmos.distribution.v1beta1.MsgSetWithdrawAddress + * @instance + */ + MsgSetWithdrawAddress.prototype.withdrawAddress = ""; + + /** + * Creates a new MsgSetWithdrawAddress instance using the specified properties. + * @function create + * @memberof cosmos.distribution.v1beta1.MsgSetWithdrawAddress + * @static + * @param {cosmos.distribution.v1beta1.IMsgSetWithdrawAddress=} [properties] Properties to set + * @returns {cosmos.distribution.v1beta1.MsgSetWithdrawAddress} MsgSetWithdrawAddress instance + */ + MsgSetWithdrawAddress.create = function create(properties) { + return new MsgSetWithdrawAddress(properties); + }; + + /** + * Encodes the specified MsgSetWithdrawAddress message. Does not implicitly {@link cosmos.distribution.v1beta1.MsgSetWithdrawAddress.verify|verify} messages. + * @function encode + * @memberof cosmos.distribution.v1beta1.MsgSetWithdrawAddress + * @static + * @param {cosmos.distribution.v1beta1.IMsgSetWithdrawAddress} message MsgSetWithdrawAddress message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgSetWithdrawAddress.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.delegatorAddress != null && Object.hasOwnProperty.call(message, "delegatorAddress")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.delegatorAddress); + if (message.withdrawAddress != null && Object.hasOwnProperty.call(message, "withdrawAddress")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.withdrawAddress); + return writer; + }; + + /** + * Encodes the specified MsgSetWithdrawAddress message, length delimited. Does not implicitly {@link cosmos.distribution.v1beta1.MsgSetWithdrawAddress.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.distribution.v1beta1.MsgSetWithdrawAddress + * @static + * @param {cosmos.distribution.v1beta1.IMsgSetWithdrawAddress} message MsgSetWithdrawAddress message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgSetWithdrawAddress.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgSetWithdrawAddress message from the specified reader or buffer. + * @function decode + * @memberof cosmos.distribution.v1beta1.MsgSetWithdrawAddress + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.distribution.v1beta1.MsgSetWithdrawAddress} MsgSetWithdrawAddress + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgSetWithdrawAddress.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.distribution.v1beta1.MsgSetWithdrawAddress(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.delegatorAddress = reader.string(); + break; + case 2: + message.withdrawAddress = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgSetWithdrawAddress message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.distribution.v1beta1.MsgSetWithdrawAddress + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.distribution.v1beta1.MsgSetWithdrawAddress} MsgSetWithdrawAddress + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgSetWithdrawAddress.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgSetWithdrawAddress message. + * @function verify + * @memberof cosmos.distribution.v1beta1.MsgSetWithdrawAddress + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgSetWithdrawAddress.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + if (!$util.isString(message.delegatorAddress)) + return "delegatorAddress: string expected"; + if (message.withdrawAddress != null && message.hasOwnProperty("withdrawAddress")) + if (!$util.isString(message.withdrawAddress)) + return "withdrawAddress: string expected"; + return null; + }; + + /** + * Creates a MsgSetWithdrawAddress message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.distribution.v1beta1.MsgSetWithdrawAddress + * @static + * @param {Object.} object Plain object + * @returns {cosmos.distribution.v1beta1.MsgSetWithdrawAddress} MsgSetWithdrawAddress + */ + MsgSetWithdrawAddress.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.distribution.v1beta1.MsgSetWithdrawAddress) + return object; + let message = new $root.cosmos.distribution.v1beta1.MsgSetWithdrawAddress(); + if (object.delegatorAddress != null) + message.delegatorAddress = String(object.delegatorAddress); + if (object.withdrawAddress != null) + message.withdrawAddress = String(object.withdrawAddress); + return message; + }; + + /** + * Creates a plain object from a MsgSetWithdrawAddress message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.distribution.v1beta1.MsgSetWithdrawAddress + * @static + * @param {cosmos.distribution.v1beta1.MsgSetWithdrawAddress} message MsgSetWithdrawAddress + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgSetWithdrawAddress.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.delegatorAddress = ""; + object.withdrawAddress = ""; + } + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + object.delegatorAddress = message.delegatorAddress; + if (message.withdrawAddress != null && message.hasOwnProperty("withdrawAddress")) + object.withdrawAddress = message.withdrawAddress; + return object; + }; + + /** + * Converts this MsgSetWithdrawAddress to JSON. + * @function toJSON + * @memberof cosmos.distribution.v1beta1.MsgSetWithdrawAddress + * @instance + * @returns {Object.} JSON object + */ + MsgSetWithdrawAddress.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgSetWithdrawAddress; + })(v1beta1.MsgSetWithdrawAddress || {}); + + v1beta1.MsgSetWithdrawAddressResponse = (function(MsgSetWithdrawAddressResponse) { + + /** + * Properties of a MsgSetWithdrawAddressResponse. + * @memberof cosmos.distribution.v1beta1 + * @interface IMsgSetWithdrawAddressResponse + */ + + /** + * Constructs a new MsgSetWithdrawAddressResponse. + * @memberof cosmos.distribution.v1beta1 + * @classdesc Represents a MsgSetWithdrawAddressResponse. + * @implements IMsgSetWithdrawAddressResponse + * @constructor + * @param {cosmos.distribution.v1beta1.IMsgSetWithdrawAddressResponse=} [properties] Properties to set + */ + function MsgSetWithdrawAddressResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new MsgSetWithdrawAddressResponse instance using the specified properties. + * @function create + * @memberof cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse + * @static + * @param {cosmos.distribution.v1beta1.IMsgSetWithdrawAddressResponse=} [properties] Properties to set + * @returns {cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse} MsgSetWithdrawAddressResponse instance + */ + MsgSetWithdrawAddressResponse.create = function create(properties) { + return new MsgSetWithdrawAddressResponse(properties); + }; + + /** + * Encodes the specified MsgSetWithdrawAddressResponse message. Does not implicitly {@link cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse + * @static + * @param {cosmos.distribution.v1beta1.IMsgSetWithdrawAddressResponse} message MsgSetWithdrawAddressResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgSetWithdrawAddressResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MsgSetWithdrawAddressResponse message, length delimited. Does not implicitly {@link cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse + * @static + * @param {cosmos.distribution.v1beta1.IMsgSetWithdrawAddressResponse} message MsgSetWithdrawAddressResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgSetWithdrawAddressResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgSetWithdrawAddressResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse} MsgSetWithdrawAddressResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgSetWithdrawAddressResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgSetWithdrawAddressResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse} MsgSetWithdrawAddressResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgSetWithdrawAddressResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgSetWithdrawAddressResponse message. + * @function verify + * @memberof cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgSetWithdrawAddressResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MsgSetWithdrawAddressResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse} MsgSetWithdrawAddressResponse + */ + MsgSetWithdrawAddressResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse) + return object; + return new $root.cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse(); + }; + + /** + * Creates a plain object from a MsgSetWithdrawAddressResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse + * @static + * @param {cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse} message MsgSetWithdrawAddressResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgSetWithdrawAddressResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MsgSetWithdrawAddressResponse to JSON. + * @function toJSON + * @memberof cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse + * @instance + * @returns {Object.} JSON object + */ + MsgSetWithdrawAddressResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgSetWithdrawAddressResponse; + })(v1beta1.MsgSetWithdrawAddressResponse || {}); + + v1beta1.MsgWithdrawDelegatorReward = (function(MsgWithdrawDelegatorReward) { + + /** + * Properties of a MsgWithdrawDelegatorReward. + * @memberof cosmos.distribution.v1beta1 + * @interface IMsgWithdrawDelegatorReward + * @property {string|null} [delegatorAddress] MsgWithdrawDelegatorReward delegatorAddress + * @property {string|null} [validatorAddress] MsgWithdrawDelegatorReward validatorAddress + */ + + /** + * Constructs a new MsgWithdrawDelegatorReward. + * @memberof cosmos.distribution.v1beta1 + * @classdesc Represents a MsgWithdrawDelegatorReward. + * @implements IMsgWithdrawDelegatorReward + * @constructor + * @param {cosmos.distribution.v1beta1.IMsgWithdrawDelegatorReward=} [properties] Properties to set + */ + function MsgWithdrawDelegatorReward(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgWithdrawDelegatorReward delegatorAddress. + * @member {string} delegatorAddress + * @memberof cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward + * @instance + */ + MsgWithdrawDelegatorReward.prototype.delegatorAddress = ""; + + /** + * MsgWithdrawDelegatorReward validatorAddress. + * @member {string} validatorAddress + * @memberof cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward + * @instance + */ + MsgWithdrawDelegatorReward.prototype.validatorAddress = ""; + + /** + * Creates a new MsgWithdrawDelegatorReward instance using the specified properties. + * @function create + * @memberof cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward + * @static + * @param {cosmos.distribution.v1beta1.IMsgWithdrawDelegatorReward=} [properties] Properties to set + * @returns {cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward} MsgWithdrawDelegatorReward instance + */ + MsgWithdrawDelegatorReward.create = function create(properties) { + return new MsgWithdrawDelegatorReward(properties); + }; + + /** + * Encodes the specified MsgWithdrawDelegatorReward message. Does not implicitly {@link cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward.verify|verify} messages. + * @function encode + * @memberof cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward + * @static + * @param {cosmos.distribution.v1beta1.IMsgWithdrawDelegatorReward} message MsgWithdrawDelegatorReward message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgWithdrawDelegatorReward.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.delegatorAddress != null && Object.hasOwnProperty.call(message, "delegatorAddress")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.delegatorAddress); + if (message.validatorAddress != null && Object.hasOwnProperty.call(message, "validatorAddress")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.validatorAddress); + return writer; + }; + + /** + * Encodes the specified MsgWithdrawDelegatorReward message, length delimited. Does not implicitly {@link cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward + * @static + * @param {cosmos.distribution.v1beta1.IMsgWithdrawDelegatorReward} message MsgWithdrawDelegatorReward message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgWithdrawDelegatorReward.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgWithdrawDelegatorReward message from the specified reader or buffer. + * @function decode + * @memberof cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward} MsgWithdrawDelegatorReward + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgWithdrawDelegatorReward.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.delegatorAddress = reader.string(); + break; + case 2: + message.validatorAddress = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgWithdrawDelegatorReward message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward} MsgWithdrawDelegatorReward + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgWithdrawDelegatorReward.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgWithdrawDelegatorReward message. + * @function verify + * @memberof cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgWithdrawDelegatorReward.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + if (!$util.isString(message.delegatorAddress)) + return "delegatorAddress: string expected"; + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + if (!$util.isString(message.validatorAddress)) + return "validatorAddress: string expected"; + return null; + }; + + /** + * Creates a MsgWithdrawDelegatorReward message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward + * @static + * @param {Object.} object Plain object + * @returns {cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward} MsgWithdrawDelegatorReward + */ + MsgWithdrawDelegatorReward.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward) + return object; + let message = new $root.cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward(); + if (object.delegatorAddress != null) + message.delegatorAddress = String(object.delegatorAddress); + if (object.validatorAddress != null) + message.validatorAddress = String(object.validatorAddress); + return message; + }; + + /** + * Creates a plain object from a MsgWithdrawDelegatorReward message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward + * @static + * @param {cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward} message MsgWithdrawDelegatorReward + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgWithdrawDelegatorReward.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.delegatorAddress = ""; + object.validatorAddress = ""; + } + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + object.delegatorAddress = message.delegatorAddress; + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + object.validatorAddress = message.validatorAddress; + return object; + }; + + /** + * Converts this MsgWithdrawDelegatorReward to JSON. + * @function toJSON + * @memberof cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward + * @instance + * @returns {Object.} JSON object + */ + MsgWithdrawDelegatorReward.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgWithdrawDelegatorReward; + })(v1beta1.MsgWithdrawDelegatorReward || {}); + + v1beta1.MsgWithdrawDelegatorRewardResponse = (function(MsgWithdrawDelegatorRewardResponse) { + + /** + * Properties of a MsgWithdrawDelegatorRewardResponse. + * @memberof cosmos.distribution.v1beta1 + * @interface IMsgWithdrawDelegatorRewardResponse + */ + + /** + * Constructs a new MsgWithdrawDelegatorRewardResponse. + * @memberof cosmos.distribution.v1beta1 + * @classdesc Represents a MsgWithdrawDelegatorRewardResponse. + * @implements IMsgWithdrawDelegatorRewardResponse + * @constructor + * @param {cosmos.distribution.v1beta1.IMsgWithdrawDelegatorRewardResponse=} [properties] Properties to set + */ + function MsgWithdrawDelegatorRewardResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new MsgWithdrawDelegatorRewardResponse instance using the specified properties. + * @function create + * @memberof cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse + * @static + * @param {cosmos.distribution.v1beta1.IMsgWithdrawDelegatorRewardResponse=} [properties] Properties to set + * @returns {cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse} MsgWithdrawDelegatorRewardResponse instance + */ + MsgWithdrawDelegatorRewardResponse.create = function create(properties) { + return new MsgWithdrawDelegatorRewardResponse(properties); + }; + + /** + * Encodes the specified MsgWithdrawDelegatorRewardResponse message. Does not implicitly {@link cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse + * @static + * @param {cosmos.distribution.v1beta1.IMsgWithdrawDelegatorRewardResponse} message MsgWithdrawDelegatorRewardResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgWithdrawDelegatorRewardResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MsgWithdrawDelegatorRewardResponse message, length delimited. Does not implicitly {@link cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse + * @static + * @param {cosmos.distribution.v1beta1.IMsgWithdrawDelegatorRewardResponse} message MsgWithdrawDelegatorRewardResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgWithdrawDelegatorRewardResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgWithdrawDelegatorRewardResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse} MsgWithdrawDelegatorRewardResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgWithdrawDelegatorRewardResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgWithdrawDelegatorRewardResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse} MsgWithdrawDelegatorRewardResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgWithdrawDelegatorRewardResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgWithdrawDelegatorRewardResponse message. + * @function verify + * @memberof cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgWithdrawDelegatorRewardResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MsgWithdrawDelegatorRewardResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse} MsgWithdrawDelegatorRewardResponse + */ + MsgWithdrawDelegatorRewardResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse) + return object; + return new $root.cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse(); + }; + + /** + * Creates a plain object from a MsgWithdrawDelegatorRewardResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse + * @static + * @param {cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse} message MsgWithdrawDelegatorRewardResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgWithdrawDelegatorRewardResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MsgWithdrawDelegatorRewardResponse to JSON. + * @function toJSON + * @memberof cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse + * @instance + * @returns {Object.} JSON object + */ + MsgWithdrawDelegatorRewardResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgWithdrawDelegatorRewardResponse; + })(v1beta1.MsgWithdrawDelegatorRewardResponse || {}); + + v1beta1.MsgWithdrawValidatorCommission = (function(MsgWithdrawValidatorCommission) { + + /** + * Properties of a MsgWithdrawValidatorCommission. + * @memberof cosmos.distribution.v1beta1 + * @interface IMsgWithdrawValidatorCommission + * @property {string|null} [validatorAddress] MsgWithdrawValidatorCommission validatorAddress + */ + + /** + * Constructs a new MsgWithdrawValidatorCommission. + * @memberof cosmos.distribution.v1beta1 + * @classdesc Represents a MsgWithdrawValidatorCommission. + * @implements IMsgWithdrawValidatorCommission + * @constructor + * @param {cosmos.distribution.v1beta1.IMsgWithdrawValidatorCommission=} [properties] Properties to set + */ + function MsgWithdrawValidatorCommission(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgWithdrawValidatorCommission validatorAddress. + * @member {string} validatorAddress + * @memberof cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission + * @instance + */ + MsgWithdrawValidatorCommission.prototype.validatorAddress = ""; + + /** + * Creates a new MsgWithdrawValidatorCommission instance using the specified properties. + * @function create + * @memberof cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission + * @static + * @param {cosmos.distribution.v1beta1.IMsgWithdrawValidatorCommission=} [properties] Properties to set + * @returns {cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission} MsgWithdrawValidatorCommission instance + */ + MsgWithdrawValidatorCommission.create = function create(properties) { + return new MsgWithdrawValidatorCommission(properties); + }; + + /** + * Encodes the specified MsgWithdrawValidatorCommission message. Does not implicitly {@link cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission.verify|verify} messages. + * @function encode + * @memberof cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission + * @static + * @param {cosmos.distribution.v1beta1.IMsgWithdrawValidatorCommission} message MsgWithdrawValidatorCommission message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgWithdrawValidatorCommission.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.validatorAddress != null && Object.hasOwnProperty.call(message, "validatorAddress")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.validatorAddress); + return writer; + }; + + /** + * Encodes the specified MsgWithdrawValidatorCommission message, length delimited. Does not implicitly {@link cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission + * @static + * @param {cosmos.distribution.v1beta1.IMsgWithdrawValidatorCommission} message MsgWithdrawValidatorCommission message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgWithdrawValidatorCommission.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgWithdrawValidatorCommission message from the specified reader or buffer. + * @function decode + * @memberof cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission} MsgWithdrawValidatorCommission + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgWithdrawValidatorCommission.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.validatorAddress = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgWithdrawValidatorCommission message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission} MsgWithdrawValidatorCommission + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgWithdrawValidatorCommission.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgWithdrawValidatorCommission message. + * @function verify + * @memberof cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgWithdrawValidatorCommission.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + if (!$util.isString(message.validatorAddress)) + return "validatorAddress: string expected"; + return null; + }; + + /** + * Creates a MsgWithdrawValidatorCommission message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission + * @static + * @param {Object.} object Plain object + * @returns {cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission} MsgWithdrawValidatorCommission + */ + MsgWithdrawValidatorCommission.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission) + return object; + let message = new $root.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission(); + if (object.validatorAddress != null) + message.validatorAddress = String(object.validatorAddress); + return message; + }; + + /** + * Creates a plain object from a MsgWithdrawValidatorCommission message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission + * @static + * @param {cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission} message MsgWithdrawValidatorCommission + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgWithdrawValidatorCommission.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.validatorAddress = ""; + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + object.validatorAddress = message.validatorAddress; + return object; + }; + + /** + * Converts this MsgWithdrawValidatorCommission to JSON. + * @function toJSON + * @memberof cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission + * @instance + * @returns {Object.} JSON object + */ + MsgWithdrawValidatorCommission.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgWithdrawValidatorCommission; + })(v1beta1.MsgWithdrawValidatorCommission || {}); + + v1beta1.MsgWithdrawValidatorCommissionResponse = (function(MsgWithdrawValidatorCommissionResponse) { + + /** + * Properties of a MsgWithdrawValidatorCommissionResponse. + * @memberof cosmos.distribution.v1beta1 + * @interface IMsgWithdrawValidatorCommissionResponse + */ + + /** + * Constructs a new MsgWithdrawValidatorCommissionResponse. + * @memberof cosmos.distribution.v1beta1 + * @classdesc Represents a MsgWithdrawValidatorCommissionResponse. + * @implements IMsgWithdrawValidatorCommissionResponse + * @constructor + * @param {cosmos.distribution.v1beta1.IMsgWithdrawValidatorCommissionResponse=} [properties] Properties to set + */ + function MsgWithdrawValidatorCommissionResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new MsgWithdrawValidatorCommissionResponse instance using the specified properties. + * @function create + * @memberof cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse + * @static + * @param {cosmos.distribution.v1beta1.IMsgWithdrawValidatorCommissionResponse=} [properties] Properties to set + * @returns {cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse} MsgWithdrawValidatorCommissionResponse instance + */ + MsgWithdrawValidatorCommissionResponse.create = function create(properties) { + return new MsgWithdrawValidatorCommissionResponse(properties); + }; + + /** + * Encodes the specified MsgWithdrawValidatorCommissionResponse message. Does not implicitly {@link cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse + * @static + * @param {cosmos.distribution.v1beta1.IMsgWithdrawValidatorCommissionResponse} message MsgWithdrawValidatorCommissionResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgWithdrawValidatorCommissionResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MsgWithdrawValidatorCommissionResponse message, length delimited. Does not implicitly {@link cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse + * @static + * @param {cosmos.distribution.v1beta1.IMsgWithdrawValidatorCommissionResponse} message MsgWithdrawValidatorCommissionResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgWithdrawValidatorCommissionResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgWithdrawValidatorCommissionResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse} MsgWithdrawValidatorCommissionResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgWithdrawValidatorCommissionResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgWithdrawValidatorCommissionResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse} MsgWithdrawValidatorCommissionResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgWithdrawValidatorCommissionResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgWithdrawValidatorCommissionResponse message. + * @function verify + * @memberof cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgWithdrawValidatorCommissionResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MsgWithdrawValidatorCommissionResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse} MsgWithdrawValidatorCommissionResponse + */ + MsgWithdrawValidatorCommissionResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse) + return object; + return new $root.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse(); + }; + + /** + * Creates a plain object from a MsgWithdrawValidatorCommissionResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse + * @static + * @param {cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse} message MsgWithdrawValidatorCommissionResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgWithdrawValidatorCommissionResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MsgWithdrawValidatorCommissionResponse to JSON. + * @function toJSON + * @memberof cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse + * @instance + * @returns {Object.} JSON object + */ + MsgWithdrawValidatorCommissionResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgWithdrawValidatorCommissionResponse; + })(v1beta1.MsgWithdrawValidatorCommissionResponse || {}); + + v1beta1.MsgFundCommunityPool = (function(MsgFundCommunityPool) { + + /** + * Properties of a MsgFundCommunityPool. + * @memberof cosmos.distribution.v1beta1 + * @interface IMsgFundCommunityPool + * @property {Array.|null} [amount] MsgFundCommunityPool amount + * @property {string|null} [depositor] MsgFundCommunityPool depositor + */ + + /** + * Constructs a new MsgFundCommunityPool. + * @memberof cosmos.distribution.v1beta1 + * @classdesc Represents a MsgFundCommunityPool. + * @implements IMsgFundCommunityPool + * @constructor + * @param {cosmos.distribution.v1beta1.IMsgFundCommunityPool=} [properties] Properties to set + */ + function MsgFundCommunityPool(properties) { + this.amount = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgFundCommunityPool amount. + * @member {Array.} amount + * @memberof cosmos.distribution.v1beta1.MsgFundCommunityPool + * @instance + */ + MsgFundCommunityPool.prototype.amount = $util.emptyArray; + + /** + * MsgFundCommunityPool depositor. + * @member {string} depositor + * @memberof cosmos.distribution.v1beta1.MsgFundCommunityPool + * @instance + */ + MsgFundCommunityPool.prototype.depositor = ""; + + /** + * Creates a new MsgFundCommunityPool instance using the specified properties. + * @function create + * @memberof cosmos.distribution.v1beta1.MsgFundCommunityPool + * @static + * @param {cosmos.distribution.v1beta1.IMsgFundCommunityPool=} [properties] Properties to set + * @returns {cosmos.distribution.v1beta1.MsgFundCommunityPool} MsgFundCommunityPool instance + */ + MsgFundCommunityPool.create = function create(properties) { + return new MsgFundCommunityPool(properties); + }; + + /** + * Encodes the specified MsgFundCommunityPool message. Does not implicitly {@link cosmos.distribution.v1beta1.MsgFundCommunityPool.verify|verify} messages. + * @function encode + * @memberof cosmos.distribution.v1beta1.MsgFundCommunityPool + * @static + * @param {cosmos.distribution.v1beta1.IMsgFundCommunityPool} message MsgFundCommunityPool message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgFundCommunityPool.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.amount != null && message.amount.length) + for (let i = 0; i < message.amount.length; ++i) + $root.cosmos.base.v1beta1.Coin.encode(message.amount[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.depositor != null && Object.hasOwnProperty.call(message, "depositor")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.depositor); + return writer; + }; + + /** + * Encodes the specified MsgFundCommunityPool message, length delimited. Does not implicitly {@link cosmos.distribution.v1beta1.MsgFundCommunityPool.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.distribution.v1beta1.MsgFundCommunityPool + * @static + * @param {cosmos.distribution.v1beta1.IMsgFundCommunityPool} message MsgFundCommunityPool message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgFundCommunityPool.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgFundCommunityPool message from the specified reader or buffer. + * @function decode + * @memberof cosmos.distribution.v1beta1.MsgFundCommunityPool + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.distribution.v1beta1.MsgFundCommunityPool} MsgFundCommunityPool + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgFundCommunityPool.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.distribution.v1beta1.MsgFundCommunityPool(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.amount && message.amount.length)) + message.amount = []; + message.amount.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); + break; + case 2: + message.depositor = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgFundCommunityPool message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.distribution.v1beta1.MsgFundCommunityPool + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.distribution.v1beta1.MsgFundCommunityPool} MsgFundCommunityPool + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgFundCommunityPool.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgFundCommunityPool message. + * @function verify + * @memberof cosmos.distribution.v1beta1.MsgFundCommunityPool + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgFundCommunityPool.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.amount != null && message.hasOwnProperty("amount")) { + if (!Array.isArray(message.amount)) + return "amount: array expected"; + for (let i = 0; i < message.amount.length; ++i) { + let error = $root.cosmos.base.v1beta1.Coin.verify(message.amount[i]); + if (error) + return "amount." + error; + } + } + if (message.depositor != null && message.hasOwnProperty("depositor")) + if (!$util.isString(message.depositor)) + return "depositor: string expected"; + return null; + }; + + /** + * Creates a MsgFundCommunityPool message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.distribution.v1beta1.MsgFundCommunityPool + * @static + * @param {Object.} object Plain object + * @returns {cosmos.distribution.v1beta1.MsgFundCommunityPool} MsgFundCommunityPool + */ + MsgFundCommunityPool.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.distribution.v1beta1.MsgFundCommunityPool) + return object; + let message = new $root.cosmos.distribution.v1beta1.MsgFundCommunityPool(); + if (object.amount) { + if (!Array.isArray(object.amount)) + throw TypeError(".cosmos.distribution.v1beta1.MsgFundCommunityPool.amount: array expected"); + message.amount = []; + for (let i = 0; i < object.amount.length; ++i) { + if (typeof object.amount[i] !== "object") + throw TypeError(".cosmos.distribution.v1beta1.MsgFundCommunityPool.amount: object expected"); + message.amount[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.amount[i]); + } + } + if (object.depositor != null) + message.depositor = String(object.depositor); + return message; + }; + + /** + * Creates a plain object from a MsgFundCommunityPool message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.distribution.v1beta1.MsgFundCommunityPool + * @static + * @param {cosmos.distribution.v1beta1.MsgFundCommunityPool} message MsgFundCommunityPool + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgFundCommunityPool.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.amount = []; + if (options.defaults) + object.depositor = ""; + if (message.amount && message.amount.length) { + object.amount = []; + for (let j = 0; j < message.amount.length; ++j) + object.amount[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.amount[j], options); + } + if (message.depositor != null && message.hasOwnProperty("depositor")) + object.depositor = message.depositor; + return object; + }; + + /** + * Converts this MsgFundCommunityPool to JSON. + * @function toJSON + * @memberof cosmos.distribution.v1beta1.MsgFundCommunityPool + * @instance + * @returns {Object.} JSON object + */ + MsgFundCommunityPool.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgFundCommunityPool; + })(v1beta1.MsgFundCommunityPool || {}); + + v1beta1.MsgFundCommunityPoolResponse = (function(MsgFundCommunityPoolResponse) { + + /** + * Properties of a MsgFundCommunityPoolResponse. + * @memberof cosmos.distribution.v1beta1 + * @interface IMsgFundCommunityPoolResponse + */ + + /** + * Constructs a new MsgFundCommunityPoolResponse. + * @memberof cosmos.distribution.v1beta1 + * @classdesc Represents a MsgFundCommunityPoolResponse. + * @implements IMsgFundCommunityPoolResponse + * @constructor + * @param {cosmos.distribution.v1beta1.IMsgFundCommunityPoolResponse=} [properties] Properties to set + */ + function MsgFundCommunityPoolResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new MsgFundCommunityPoolResponse instance using the specified properties. + * @function create + * @memberof cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse + * @static + * @param {cosmos.distribution.v1beta1.IMsgFundCommunityPoolResponse=} [properties] Properties to set + * @returns {cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse} MsgFundCommunityPoolResponse instance + */ + MsgFundCommunityPoolResponse.create = function create(properties) { + return new MsgFundCommunityPoolResponse(properties); + }; + + /** + * Encodes the specified MsgFundCommunityPoolResponse message. Does not implicitly {@link cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse + * @static + * @param {cosmos.distribution.v1beta1.IMsgFundCommunityPoolResponse} message MsgFundCommunityPoolResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgFundCommunityPoolResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MsgFundCommunityPoolResponse message, length delimited. Does not implicitly {@link cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse + * @static + * @param {cosmos.distribution.v1beta1.IMsgFundCommunityPoolResponse} message MsgFundCommunityPoolResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgFundCommunityPoolResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgFundCommunityPoolResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse} MsgFundCommunityPoolResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgFundCommunityPoolResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgFundCommunityPoolResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse} MsgFundCommunityPoolResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgFundCommunityPoolResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgFundCommunityPoolResponse message. + * @function verify + * @memberof cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgFundCommunityPoolResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MsgFundCommunityPoolResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse} MsgFundCommunityPoolResponse + */ + MsgFundCommunityPoolResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse) + return object; + return new $root.cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse(); + }; + + /** + * Creates a plain object from a MsgFundCommunityPoolResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse + * @static + * @param {cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse} message MsgFundCommunityPoolResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgFundCommunityPoolResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MsgFundCommunityPoolResponse to JSON. + * @function toJSON + * @memberof cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse + * @instance + * @returns {Object.} JSON object + */ + MsgFundCommunityPoolResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgFundCommunityPoolResponse; + })(v1beta1.MsgFundCommunityPoolResponse || {}); + + return v1beta1; + })(distribution.v1beta1 || {}); + + return distribution; + })(cosmos.distribution || {}); + + /** + * Namespace evidence. + * @memberof cosmos + * @namespace + */ + + cosmos.evidence = (function(evidence) { + + /** + * Namespace v1beta1. + * @memberof cosmos.evidence + * @namespace + */ + + evidence.v1beta1 = (function(v1beta1) { + + v1beta1.Equivocation = (function(Equivocation) { + + /** + * Properties of an Equivocation. + * @memberof cosmos.evidence.v1beta1 + * @interface IEquivocation + * @property {number|Long|null} [height] Equivocation height + * @property {google.protobuf.ITimestamp|null} [time] Equivocation time + * @property {number|Long|null} [power] Equivocation power + * @property {string|null} [consensusAddress] Equivocation consensusAddress + */ + + /** + * Constructs a new Equivocation. + * @memberof cosmos.evidence.v1beta1 + * @classdesc Represents an Equivocation. + * @implements IEquivocation + * @constructor + * @param {cosmos.evidence.v1beta1.IEquivocation=} [properties] Properties to set + */ + function Equivocation(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Equivocation height. + * @member {number|Long} height + * @memberof cosmos.evidence.v1beta1.Equivocation + * @instance + */ + Equivocation.prototype.height = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Equivocation time. + * @member {google.protobuf.ITimestamp|null|undefined} time + * @memberof cosmos.evidence.v1beta1.Equivocation + * @instance + */ + Equivocation.prototype.time = null; + + /** + * Equivocation power. + * @member {number|Long} power + * @memberof cosmos.evidence.v1beta1.Equivocation + * @instance + */ + Equivocation.prototype.power = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Equivocation consensusAddress. + * @member {string} consensusAddress + * @memberof cosmos.evidence.v1beta1.Equivocation + * @instance + */ + Equivocation.prototype.consensusAddress = ""; + + /** + * Creates a new Equivocation instance using the specified properties. + * @function create + * @memberof cosmos.evidence.v1beta1.Equivocation + * @static + * @param {cosmos.evidence.v1beta1.IEquivocation=} [properties] Properties to set + * @returns {cosmos.evidence.v1beta1.Equivocation} Equivocation instance + */ + Equivocation.create = function create(properties) { + return new Equivocation(properties); + }; + + /** + * Encodes the specified Equivocation message. Does not implicitly {@link cosmos.evidence.v1beta1.Equivocation.verify|verify} messages. + * @function encode + * @memberof cosmos.evidence.v1beta1.Equivocation + * @static + * @param {cosmos.evidence.v1beta1.IEquivocation} message Equivocation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Equivocation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.height != null && Object.hasOwnProperty.call(message, "height")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.height); + if (message.time != null && Object.hasOwnProperty.call(message, "time")) + $root.google.protobuf.Timestamp.encode(message.time, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.power != null && Object.hasOwnProperty.call(message, "power")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.power); + if (message.consensusAddress != null && Object.hasOwnProperty.call(message, "consensusAddress")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.consensusAddress); + return writer; + }; + + /** + * Encodes the specified Equivocation message, length delimited. Does not implicitly {@link cosmos.evidence.v1beta1.Equivocation.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.evidence.v1beta1.Equivocation + * @static + * @param {cosmos.evidence.v1beta1.IEquivocation} message Equivocation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Equivocation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Equivocation message from the specified reader or buffer. + * @function decode + * @memberof cosmos.evidence.v1beta1.Equivocation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.evidence.v1beta1.Equivocation} Equivocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Equivocation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.evidence.v1beta1.Equivocation(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.height = reader.int64(); + break; + case 2: + message.time = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 3: + message.power = reader.int64(); + break; + case 4: + message.consensusAddress = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Equivocation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.evidence.v1beta1.Equivocation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.evidence.v1beta1.Equivocation} Equivocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Equivocation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Equivocation message. + * @function verify + * @memberof cosmos.evidence.v1beta1.Equivocation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Equivocation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.height != null && message.hasOwnProperty("height")) + if (!$util.isInteger(message.height) && !(message.height && $util.isInteger(message.height.low) && $util.isInteger(message.height.high))) + return "height: integer|Long expected"; + if (message.time != null && message.hasOwnProperty("time")) { + let error = $root.google.protobuf.Timestamp.verify(message.time); + if (error) + return "time." + error; + } + if (message.power != null && message.hasOwnProperty("power")) + if (!$util.isInteger(message.power) && !(message.power && $util.isInteger(message.power.low) && $util.isInteger(message.power.high))) + return "power: integer|Long expected"; + if (message.consensusAddress != null && message.hasOwnProperty("consensusAddress")) + if (!$util.isString(message.consensusAddress)) + return "consensusAddress: string expected"; + return null; + }; + + /** + * Creates an Equivocation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.evidence.v1beta1.Equivocation + * @static + * @param {Object.} object Plain object + * @returns {cosmos.evidence.v1beta1.Equivocation} Equivocation + */ + Equivocation.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.evidence.v1beta1.Equivocation) + return object; + let message = new $root.cosmos.evidence.v1beta1.Equivocation(); + if (object.height != null) + if ($util.Long) + (message.height = $util.Long.fromValue(object.height)).unsigned = false; + else if (typeof object.height === "string") + message.height = parseInt(object.height, 10); + else if (typeof object.height === "number") + message.height = object.height; + else if (typeof object.height === "object") + message.height = new $util.LongBits(object.height.low >>> 0, object.height.high >>> 0).toNumber(); + if (object.time != null) { + if (typeof object.time !== "object") + throw TypeError(".cosmos.evidence.v1beta1.Equivocation.time: object expected"); + message.time = $root.google.protobuf.Timestamp.fromObject(object.time); + } + if (object.power != null) + if ($util.Long) + (message.power = $util.Long.fromValue(object.power)).unsigned = false; + else if (typeof object.power === "string") + message.power = parseInt(object.power, 10); + else if (typeof object.power === "number") + message.power = object.power; + else if (typeof object.power === "object") + message.power = new $util.LongBits(object.power.low >>> 0, object.power.high >>> 0).toNumber(); + if (object.consensusAddress != null) + message.consensusAddress = String(object.consensusAddress); + return message; + }; + + /** + * Creates a plain object from an Equivocation message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.evidence.v1beta1.Equivocation + * @static + * @param {cosmos.evidence.v1beta1.Equivocation} message Equivocation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Equivocation.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.height = options.longs === String ? "0" : 0; + object.time = null; + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.power = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.power = options.longs === String ? "0" : 0; + object.consensusAddress = ""; + } + if (message.height != null && message.hasOwnProperty("height")) + if (typeof message.height === "number") + object.height = options.longs === String ? String(message.height) : message.height; + else + object.height = options.longs === String ? $util.Long.prototype.toString.call(message.height) : options.longs === Number ? new $util.LongBits(message.height.low >>> 0, message.height.high >>> 0).toNumber() : message.height; + if (message.time != null && message.hasOwnProperty("time")) + object.time = $root.google.protobuf.Timestamp.toObject(message.time, options); + if (message.power != null && message.hasOwnProperty("power")) + if (typeof message.power === "number") + object.power = options.longs === String ? String(message.power) : message.power; + else + object.power = options.longs === String ? $util.Long.prototype.toString.call(message.power) : options.longs === Number ? new $util.LongBits(message.power.low >>> 0, message.power.high >>> 0).toNumber() : message.power; + if (message.consensusAddress != null && message.hasOwnProperty("consensusAddress")) + object.consensusAddress = message.consensusAddress; + return object; + }; + + /** + * Converts this Equivocation to JSON. + * @function toJSON + * @memberof cosmos.evidence.v1beta1.Equivocation + * @instance + * @returns {Object.} JSON object + */ + Equivocation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Equivocation; + })(v1beta1.Equivocation || {}); + + v1beta1.GenesisState = (function(GenesisState) { + + /** + * Properties of a GenesisState. + * @memberof cosmos.evidence.v1beta1 + * @interface IGenesisState + * @property {Array.|null} [evidence] GenesisState evidence + */ + + /** + * Constructs a new GenesisState. + * @memberof cosmos.evidence.v1beta1 + * @classdesc Represents a GenesisState. + * @implements IGenesisState + * @constructor + * @param {cosmos.evidence.v1beta1.IGenesisState=} [properties] Properties to set + */ + function GenesisState(properties) { + this.evidence = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GenesisState evidence. + * @member {Array.} evidence + * @memberof cosmos.evidence.v1beta1.GenesisState + * @instance + */ + GenesisState.prototype.evidence = $util.emptyArray; + + /** + * Creates a new GenesisState instance using the specified properties. + * @function create + * @memberof cosmos.evidence.v1beta1.GenesisState + * @static + * @param {cosmos.evidence.v1beta1.IGenesisState=} [properties] Properties to set + * @returns {cosmos.evidence.v1beta1.GenesisState} GenesisState instance + */ + GenesisState.create = function create(properties) { + return new GenesisState(properties); + }; + + /** + * Encodes the specified GenesisState message. Does not implicitly {@link cosmos.evidence.v1beta1.GenesisState.verify|verify} messages. + * @function encode + * @memberof cosmos.evidence.v1beta1.GenesisState + * @static + * @param {cosmos.evidence.v1beta1.IGenesisState} message GenesisState message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenesisState.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.evidence != null && message.evidence.length) + for (let i = 0; i < message.evidence.length; ++i) + $root.google.protobuf.Any.encode(message.evidence[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GenesisState message, length delimited. Does not implicitly {@link cosmos.evidence.v1beta1.GenesisState.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.evidence.v1beta1.GenesisState + * @static + * @param {cosmos.evidence.v1beta1.IGenesisState} message GenesisState message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenesisState.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GenesisState message from the specified reader or buffer. + * @function decode + * @memberof cosmos.evidence.v1beta1.GenesisState + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.evidence.v1beta1.GenesisState} GenesisState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenesisState.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.evidence.v1beta1.GenesisState(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.evidence && message.evidence.length)) + message.evidence = []; + message.evidence.push($root.google.protobuf.Any.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GenesisState message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.evidence.v1beta1.GenesisState + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.evidence.v1beta1.GenesisState} GenesisState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenesisState.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GenesisState message. + * @function verify + * @memberof cosmos.evidence.v1beta1.GenesisState + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GenesisState.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.evidence != null && message.hasOwnProperty("evidence")) { + if (!Array.isArray(message.evidence)) + return "evidence: array expected"; + for (let i = 0; i < message.evidence.length; ++i) { + let error = $root.google.protobuf.Any.verify(message.evidence[i]); + if (error) + return "evidence." + error; + } + } + return null; + }; + + /** + * Creates a GenesisState message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.evidence.v1beta1.GenesisState + * @static + * @param {Object.} object Plain object + * @returns {cosmos.evidence.v1beta1.GenesisState} GenesisState + */ + GenesisState.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.evidence.v1beta1.GenesisState) + return object; + let message = new $root.cosmos.evidence.v1beta1.GenesisState(); + if (object.evidence) { + if (!Array.isArray(object.evidence)) + throw TypeError(".cosmos.evidence.v1beta1.GenesisState.evidence: array expected"); + message.evidence = []; + for (let i = 0; i < object.evidence.length; ++i) { + if (typeof object.evidence[i] !== "object") + throw TypeError(".cosmos.evidence.v1beta1.GenesisState.evidence: object expected"); + message.evidence[i] = $root.google.protobuf.Any.fromObject(object.evidence[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a GenesisState message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.evidence.v1beta1.GenesisState + * @static + * @param {cosmos.evidence.v1beta1.GenesisState} message GenesisState + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GenesisState.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.evidence = []; + if (message.evidence && message.evidence.length) { + object.evidence = []; + for (let j = 0; j < message.evidence.length; ++j) + object.evidence[j] = $root.google.protobuf.Any.toObject(message.evidence[j], options); + } + return object; + }; + + /** + * Converts this GenesisState to JSON. + * @function toJSON + * @memberof cosmos.evidence.v1beta1.GenesisState + * @instance + * @returns {Object.} JSON object + */ + GenesisState.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GenesisState; + })(v1beta1.GenesisState || {}); + + v1beta1.Query = (function(Query) { + + /** + * Constructs a new Query service. + * @memberof cosmos.evidence.v1beta1 + * @classdesc Represents a Query + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Query(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Query.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Query; + + /** + * Creates new Query service using the specified rpc implementation. + * @function create + * @memberof cosmos.evidence.v1beta1.Query + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Query} RPC service. Useful where requests and/or responses are streamed. + */ + Query.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link cosmos.evidence.v1beta1.Query#evidence}. + * @memberof cosmos.evidence.v1beta1.Query + * @typedef EvidenceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.evidence.v1beta1.IQueryEvidenceResponse} [response] QueryEvidenceResponse + */ + + /** + * Calls Evidence. + * @function evidence + * @memberof cosmos.evidence.v1beta1.Query + * @instance + * @param {cosmos.evidence.v1beta1.IQueryEvidenceRequest} request QueryEvidenceRequest message or plain object + * @param {cosmos.evidence.v1beta1.Query.EvidenceCallback} callback Node-style callback called with the error, if any, and QueryEvidenceResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.evidence = function evidence(request, callback) { + return this.rpcCall(evidence, $root.cosmos.evidence.v1beta1.QueryEvidenceRequest, $root.cosmos.evidence.v1beta1.QueryEvidenceResponse, request, callback); + }, "name", { value: "Evidence" }); + + /** + * Calls Evidence. + * @function evidence + * @memberof cosmos.evidence.v1beta1.Query + * @instance + * @param {cosmos.evidence.v1beta1.IQueryEvidenceRequest} request QueryEvidenceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link cosmos.evidence.v1beta1.Query#allEvidence}. + * @memberof cosmos.evidence.v1beta1.Query + * @typedef AllEvidenceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.evidence.v1beta1.IQueryAllEvidenceResponse} [response] QueryAllEvidenceResponse + */ + + /** + * Calls AllEvidence. + * @function allEvidence + * @memberof cosmos.evidence.v1beta1.Query + * @instance + * @param {cosmos.evidence.v1beta1.IQueryAllEvidenceRequest} request QueryAllEvidenceRequest message or plain object + * @param {cosmos.evidence.v1beta1.Query.AllEvidenceCallback} callback Node-style callback called with the error, if any, and QueryAllEvidenceResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.allEvidence = function allEvidence(request, callback) { + return this.rpcCall(allEvidence, $root.cosmos.evidence.v1beta1.QueryAllEvidenceRequest, $root.cosmos.evidence.v1beta1.QueryAllEvidenceResponse, request, callback); + }, "name", { value: "AllEvidence" }); + + /** + * Calls AllEvidence. + * @function allEvidence + * @memberof cosmos.evidence.v1beta1.Query + * @instance + * @param {cosmos.evidence.v1beta1.IQueryAllEvidenceRequest} request QueryAllEvidenceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Query; + })(v1beta1.Query || {}); + + v1beta1.QueryEvidenceRequest = (function(QueryEvidenceRequest) { + + /** + * Properties of a QueryEvidenceRequest. + * @memberof cosmos.evidence.v1beta1 + * @interface IQueryEvidenceRequest + * @property {Uint8Array|null} [evidenceHash] QueryEvidenceRequest evidenceHash + */ + + /** + * Constructs a new QueryEvidenceRequest. + * @memberof cosmos.evidence.v1beta1 + * @classdesc Represents a QueryEvidenceRequest. + * @implements IQueryEvidenceRequest + * @constructor + * @param {cosmos.evidence.v1beta1.IQueryEvidenceRequest=} [properties] Properties to set + */ + function QueryEvidenceRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryEvidenceRequest evidenceHash. + * @member {Uint8Array} evidenceHash + * @memberof cosmos.evidence.v1beta1.QueryEvidenceRequest + * @instance + */ + QueryEvidenceRequest.prototype.evidenceHash = $util.newBuffer([]); + + /** + * Creates a new QueryEvidenceRequest instance using the specified properties. + * @function create + * @memberof cosmos.evidence.v1beta1.QueryEvidenceRequest + * @static + * @param {cosmos.evidence.v1beta1.IQueryEvidenceRequest=} [properties] Properties to set + * @returns {cosmos.evidence.v1beta1.QueryEvidenceRequest} QueryEvidenceRequest instance + */ + QueryEvidenceRequest.create = function create(properties) { + return new QueryEvidenceRequest(properties); + }; + + /** + * Encodes the specified QueryEvidenceRequest message. Does not implicitly {@link cosmos.evidence.v1beta1.QueryEvidenceRequest.verify|verify} messages. + * @function encode + * @memberof cosmos.evidence.v1beta1.QueryEvidenceRequest + * @static + * @param {cosmos.evidence.v1beta1.IQueryEvidenceRequest} message QueryEvidenceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryEvidenceRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.evidenceHash != null && Object.hasOwnProperty.call(message, "evidenceHash")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.evidenceHash); + return writer; + }; + + /** + * Encodes the specified QueryEvidenceRequest message, length delimited. Does not implicitly {@link cosmos.evidence.v1beta1.QueryEvidenceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.evidence.v1beta1.QueryEvidenceRequest + * @static + * @param {cosmos.evidence.v1beta1.IQueryEvidenceRequest} message QueryEvidenceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryEvidenceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryEvidenceRequest message from the specified reader or buffer. + * @function decode + * @memberof cosmos.evidence.v1beta1.QueryEvidenceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.evidence.v1beta1.QueryEvidenceRequest} QueryEvidenceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryEvidenceRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.evidence.v1beta1.QueryEvidenceRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.evidenceHash = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryEvidenceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.evidence.v1beta1.QueryEvidenceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.evidence.v1beta1.QueryEvidenceRequest} QueryEvidenceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryEvidenceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryEvidenceRequest message. + * @function verify + * @memberof cosmos.evidence.v1beta1.QueryEvidenceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryEvidenceRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.evidenceHash != null && message.hasOwnProperty("evidenceHash")) + if (!(message.evidenceHash && typeof message.evidenceHash.length === "number" || $util.isString(message.evidenceHash))) + return "evidenceHash: buffer expected"; + return null; + }; + + /** + * Creates a QueryEvidenceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.evidence.v1beta1.QueryEvidenceRequest + * @static + * @param {Object.} object Plain object + * @returns {cosmos.evidence.v1beta1.QueryEvidenceRequest} QueryEvidenceRequest + */ + QueryEvidenceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.evidence.v1beta1.QueryEvidenceRequest) + return object; + let message = new $root.cosmos.evidence.v1beta1.QueryEvidenceRequest(); + if (object.evidenceHash != null) + if (typeof object.evidenceHash === "string") + $util.base64.decode(object.evidenceHash, message.evidenceHash = $util.newBuffer($util.base64.length(object.evidenceHash)), 0); + else if (object.evidenceHash.length) + message.evidenceHash = object.evidenceHash; + return message; + }; + + /** + * Creates a plain object from a QueryEvidenceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.evidence.v1beta1.QueryEvidenceRequest + * @static + * @param {cosmos.evidence.v1beta1.QueryEvidenceRequest} message QueryEvidenceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryEvidenceRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + if (options.bytes === String) + object.evidenceHash = ""; + else { + object.evidenceHash = []; + if (options.bytes !== Array) + object.evidenceHash = $util.newBuffer(object.evidenceHash); + } + if (message.evidenceHash != null && message.hasOwnProperty("evidenceHash")) + object.evidenceHash = options.bytes === String ? $util.base64.encode(message.evidenceHash, 0, message.evidenceHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.evidenceHash) : message.evidenceHash; + return object; + }; + + /** + * Converts this QueryEvidenceRequest to JSON. + * @function toJSON + * @memberof cosmos.evidence.v1beta1.QueryEvidenceRequest + * @instance + * @returns {Object.} JSON object + */ + QueryEvidenceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryEvidenceRequest; + })(v1beta1.QueryEvidenceRequest || {}); + + v1beta1.QueryEvidenceResponse = (function(QueryEvidenceResponse) { + + /** + * Properties of a QueryEvidenceResponse. + * @memberof cosmos.evidence.v1beta1 + * @interface IQueryEvidenceResponse + * @property {google.protobuf.IAny|null} [evidence] QueryEvidenceResponse evidence + */ + + /** + * Constructs a new QueryEvidenceResponse. + * @memberof cosmos.evidence.v1beta1 + * @classdesc Represents a QueryEvidenceResponse. + * @implements IQueryEvidenceResponse + * @constructor + * @param {cosmos.evidence.v1beta1.IQueryEvidenceResponse=} [properties] Properties to set + */ + function QueryEvidenceResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryEvidenceResponse evidence. + * @member {google.protobuf.IAny|null|undefined} evidence + * @memberof cosmos.evidence.v1beta1.QueryEvidenceResponse + * @instance + */ + QueryEvidenceResponse.prototype.evidence = null; + + /** + * Creates a new QueryEvidenceResponse instance using the specified properties. + * @function create + * @memberof cosmos.evidence.v1beta1.QueryEvidenceResponse + * @static + * @param {cosmos.evidence.v1beta1.IQueryEvidenceResponse=} [properties] Properties to set + * @returns {cosmos.evidence.v1beta1.QueryEvidenceResponse} QueryEvidenceResponse instance + */ + QueryEvidenceResponse.create = function create(properties) { + return new QueryEvidenceResponse(properties); + }; + + /** + * Encodes the specified QueryEvidenceResponse message. Does not implicitly {@link cosmos.evidence.v1beta1.QueryEvidenceResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.evidence.v1beta1.QueryEvidenceResponse + * @static + * @param {cosmos.evidence.v1beta1.IQueryEvidenceResponse} message QueryEvidenceResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryEvidenceResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.evidence != null && Object.hasOwnProperty.call(message, "evidence")) + $root.google.protobuf.Any.encode(message.evidence, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryEvidenceResponse message, length delimited. Does not implicitly {@link cosmos.evidence.v1beta1.QueryEvidenceResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.evidence.v1beta1.QueryEvidenceResponse + * @static + * @param {cosmos.evidence.v1beta1.IQueryEvidenceResponse} message QueryEvidenceResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryEvidenceResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryEvidenceResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.evidence.v1beta1.QueryEvidenceResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.evidence.v1beta1.QueryEvidenceResponse} QueryEvidenceResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryEvidenceResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.evidence.v1beta1.QueryEvidenceResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.evidence = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryEvidenceResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.evidence.v1beta1.QueryEvidenceResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.evidence.v1beta1.QueryEvidenceResponse} QueryEvidenceResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryEvidenceResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryEvidenceResponse message. + * @function verify + * @memberof cosmos.evidence.v1beta1.QueryEvidenceResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryEvidenceResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.evidence != null && message.hasOwnProperty("evidence")) { + let error = $root.google.protobuf.Any.verify(message.evidence); + if (error) + return "evidence." + error; + } + return null; + }; + + /** + * Creates a QueryEvidenceResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.evidence.v1beta1.QueryEvidenceResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.evidence.v1beta1.QueryEvidenceResponse} QueryEvidenceResponse + */ + QueryEvidenceResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.evidence.v1beta1.QueryEvidenceResponse) + return object; + let message = new $root.cosmos.evidence.v1beta1.QueryEvidenceResponse(); + if (object.evidence != null) { + if (typeof object.evidence !== "object") + throw TypeError(".cosmos.evidence.v1beta1.QueryEvidenceResponse.evidence: object expected"); + message.evidence = $root.google.protobuf.Any.fromObject(object.evidence); + } + return message; + }; + + /** + * Creates a plain object from a QueryEvidenceResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.evidence.v1beta1.QueryEvidenceResponse + * @static + * @param {cosmos.evidence.v1beta1.QueryEvidenceResponse} message QueryEvidenceResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryEvidenceResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.evidence = null; + if (message.evidence != null && message.hasOwnProperty("evidence")) + object.evidence = $root.google.protobuf.Any.toObject(message.evidence, options); + return object; + }; + + /** + * Converts this QueryEvidenceResponse to JSON. + * @function toJSON + * @memberof cosmos.evidence.v1beta1.QueryEvidenceResponse + * @instance + * @returns {Object.} JSON object + */ + QueryEvidenceResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryEvidenceResponse; + })(v1beta1.QueryEvidenceResponse || {}); + + v1beta1.QueryAllEvidenceRequest = (function(QueryAllEvidenceRequest) { + + /** + * Properties of a QueryAllEvidenceRequest. + * @memberof cosmos.evidence.v1beta1 + * @interface IQueryAllEvidenceRequest + * @property {cosmos.base.query.v1beta1.IPageRequest|null} [pagination] QueryAllEvidenceRequest pagination + */ + + /** + * Constructs a new QueryAllEvidenceRequest. + * @memberof cosmos.evidence.v1beta1 + * @classdesc Represents a QueryAllEvidenceRequest. + * @implements IQueryAllEvidenceRequest + * @constructor + * @param {cosmos.evidence.v1beta1.IQueryAllEvidenceRequest=} [properties] Properties to set + */ + function QueryAllEvidenceRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryAllEvidenceRequest pagination. + * @member {cosmos.base.query.v1beta1.IPageRequest|null|undefined} pagination + * @memberof cosmos.evidence.v1beta1.QueryAllEvidenceRequest + * @instance + */ + QueryAllEvidenceRequest.prototype.pagination = null; + + /** + * Creates a new QueryAllEvidenceRequest instance using the specified properties. + * @function create + * @memberof cosmos.evidence.v1beta1.QueryAllEvidenceRequest + * @static + * @param {cosmos.evidence.v1beta1.IQueryAllEvidenceRequest=} [properties] Properties to set + * @returns {cosmos.evidence.v1beta1.QueryAllEvidenceRequest} QueryAllEvidenceRequest instance + */ + QueryAllEvidenceRequest.create = function create(properties) { + return new QueryAllEvidenceRequest(properties); + }; + + /** + * Encodes the specified QueryAllEvidenceRequest message. Does not implicitly {@link cosmos.evidence.v1beta1.QueryAllEvidenceRequest.verify|verify} messages. + * @function encode + * @memberof cosmos.evidence.v1beta1.QueryAllEvidenceRequest + * @static + * @param {cosmos.evidence.v1beta1.IQueryAllEvidenceRequest} message QueryAllEvidenceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryAllEvidenceRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) + $root.cosmos.base.query.v1beta1.PageRequest.encode(message.pagination, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryAllEvidenceRequest message, length delimited. Does not implicitly {@link cosmos.evidence.v1beta1.QueryAllEvidenceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.evidence.v1beta1.QueryAllEvidenceRequest + * @static + * @param {cosmos.evidence.v1beta1.IQueryAllEvidenceRequest} message QueryAllEvidenceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryAllEvidenceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryAllEvidenceRequest message from the specified reader or buffer. + * @function decode + * @memberof cosmos.evidence.v1beta1.QueryAllEvidenceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.evidence.v1beta1.QueryAllEvidenceRequest} QueryAllEvidenceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryAllEvidenceRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.evidence.v1beta1.QueryAllEvidenceRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryAllEvidenceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.evidence.v1beta1.QueryAllEvidenceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.evidence.v1beta1.QueryAllEvidenceRequest} QueryAllEvidenceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryAllEvidenceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryAllEvidenceRequest message. + * @function verify + * @memberof cosmos.evidence.v1beta1.QueryAllEvidenceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryAllEvidenceRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.pagination != null && message.hasOwnProperty("pagination")) { + let error = $root.cosmos.base.query.v1beta1.PageRequest.verify(message.pagination); + if (error) + return "pagination." + error; + } + return null; + }; + + /** + * Creates a QueryAllEvidenceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.evidence.v1beta1.QueryAllEvidenceRequest + * @static + * @param {Object.} object Plain object + * @returns {cosmos.evidence.v1beta1.QueryAllEvidenceRequest} QueryAllEvidenceRequest + */ + QueryAllEvidenceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.evidence.v1beta1.QueryAllEvidenceRequest) + return object; + let message = new $root.cosmos.evidence.v1beta1.QueryAllEvidenceRequest(); + if (object.pagination != null) { + if (typeof object.pagination !== "object") + throw TypeError(".cosmos.evidence.v1beta1.QueryAllEvidenceRequest.pagination: object expected"); + message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.fromObject(object.pagination); + } + return message; + }; + + /** + * Creates a plain object from a QueryAllEvidenceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.evidence.v1beta1.QueryAllEvidenceRequest + * @static + * @param {cosmos.evidence.v1beta1.QueryAllEvidenceRequest} message QueryAllEvidenceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryAllEvidenceRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.pagination = null; + if (message.pagination != null && message.hasOwnProperty("pagination")) + object.pagination = $root.cosmos.base.query.v1beta1.PageRequest.toObject(message.pagination, options); + return object; + }; + + /** + * Converts this QueryAllEvidenceRequest to JSON. + * @function toJSON + * @memberof cosmos.evidence.v1beta1.QueryAllEvidenceRequest + * @instance + * @returns {Object.} JSON object + */ + QueryAllEvidenceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryAllEvidenceRequest; + })(v1beta1.QueryAllEvidenceRequest || {}); + + v1beta1.QueryAllEvidenceResponse = (function(QueryAllEvidenceResponse) { + + /** + * Properties of a QueryAllEvidenceResponse. + * @memberof cosmos.evidence.v1beta1 + * @interface IQueryAllEvidenceResponse + * @property {Array.|null} [evidence] QueryAllEvidenceResponse evidence + * @property {cosmos.base.query.v1beta1.IPageResponse|null} [pagination] QueryAllEvidenceResponse pagination + */ + + /** + * Constructs a new QueryAllEvidenceResponse. + * @memberof cosmos.evidence.v1beta1 + * @classdesc Represents a QueryAllEvidenceResponse. + * @implements IQueryAllEvidenceResponse + * @constructor + * @param {cosmos.evidence.v1beta1.IQueryAllEvidenceResponse=} [properties] Properties to set + */ + function QueryAllEvidenceResponse(properties) { + this.evidence = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryAllEvidenceResponse evidence. + * @member {Array.} evidence + * @memberof cosmos.evidence.v1beta1.QueryAllEvidenceResponse + * @instance + */ + QueryAllEvidenceResponse.prototype.evidence = $util.emptyArray; + + /** + * QueryAllEvidenceResponse pagination. + * @member {cosmos.base.query.v1beta1.IPageResponse|null|undefined} pagination + * @memberof cosmos.evidence.v1beta1.QueryAllEvidenceResponse + * @instance + */ + QueryAllEvidenceResponse.prototype.pagination = null; + + /** + * Creates a new QueryAllEvidenceResponse instance using the specified properties. + * @function create + * @memberof cosmos.evidence.v1beta1.QueryAllEvidenceResponse + * @static + * @param {cosmos.evidence.v1beta1.IQueryAllEvidenceResponse=} [properties] Properties to set + * @returns {cosmos.evidence.v1beta1.QueryAllEvidenceResponse} QueryAllEvidenceResponse instance + */ + QueryAllEvidenceResponse.create = function create(properties) { + return new QueryAllEvidenceResponse(properties); + }; + + /** + * Encodes the specified QueryAllEvidenceResponse message. Does not implicitly {@link cosmos.evidence.v1beta1.QueryAllEvidenceResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.evidence.v1beta1.QueryAllEvidenceResponse + * @static + * @param {cosmos.evidence.v1beta1.IQueryAllEvidenceResponse} message QueryAllEvidenceResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryAllEvidenceResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.evidence != null && message.evidence.length) + for (let i = 0; i < message.evidence.length; ++i) + $root.google.protobuf.Any.encode(message.evidence[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) + $root.cosmos.base.query.v1beta1.PageResponse.encode(message.pagination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryAllEvidenceResponse message, length delimited. Does not implicitly {@link cosmos.evidence.v1beta1.QueryAllEvidenceResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.evidence.v1beta1.QueryAllEvidenceResponse + * @static + * @param {cosmos.evidence.v1beta1.IQueryAllEvidenceResponse} message QueryAllEvidenceResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryAllEvidenceResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryAllEvidenceResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.evidence.v1beta1.QueryAllEvidenceResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.evidence.v1beta1.QueryAllEvidenceResponse} QueryAllEvidenceResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryAllEvidenceResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.evidence.v1beta1.QueryAllEvidenceResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.evidence && message.evidence.length)) + message.evidence = []; + message.evidence.push($root.google.protobuf.Any.decode(reader, reader.uint32())); + break; + case 2: + message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryAllEvidenceResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.evidence.v1beta1.QueryAllEvidenceResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.evidence.v1beta1.QueryAllEvidenceResponse} QueryAllEvidenceResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryAllEvidenceResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryAllEvidenceResponse message. + * @function verify + * @memberof cosmos.evidence.v1beta1.QueryAllEvidenceResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryAllEvidenceResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.evidence != null && message.hasOwnProperty("evidence")) { + if (!Array.isArray(message.evidence)) + return "evidence: array expected"; + for (let i = 0; i < message.evidence.length; ++i) { + let error = $root.google.protobuf.Any.verify(message.evidence[i]); + if (error) + return "evidence." + error; + } + } + if (message.pagination != null && message.hasOwnProperty("pagination")) { + let error = $root.cosmos.base.query.v1beta1.PageResponse.verify(message.pagination); + if (error) + return "pagination." + error; + } + return null; + }; + + /** + * Creates a QueryAllEvidenceResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.evidence.v1beta1.QueryAllEvidenceResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.evidence.v1beta1.QueryAllEvidenceResponse} QueryAllEvidenceResponse + */ + QueryAllEvidenceResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.evidence.v1beta1.QueryAllEvidenceResponse) + return object; + let message = new $root.cosmos.evidence.v1beta1.QueryAllEvidenceResponse(); + if (object.evidence) { + if (!Array.isArray(object.evidence)) + throw TypeError(".cosmos.evidence.v1beta1.QueryAllEvidenceResponse.evidence: array expected"); + message.evidence = []; + for (let i = 0; i < object.evidence.length; ++i) { + if (typeof object.evidence[i] !== "object") + throw TypeError(".cosmos.evidence.v1beta1.QueryAllEvidenceResponse.evidence: object expected"); + message.evidence[i] = $root.google.protobuf.Any.fromObject(object.evidence[i]); + } + } + if (object.pagination != null) { + if (typeof object.pagination !== "object") + throw TypeError(".cosmos.evidence.v1beta1.QueryAllEvidenceResponse.pagination: object expected"); + message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.fromObject(object.pagination); + } + return message; + }; + + /** + * Creates a plain object from a QueryAllEvidenceResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.evidence.v1beta1.QueryAllEvidenceResponse + * @static + * @param {cosmos.evidence.v1beta1.QueryAllEvidenceResponse} message QueryAllEvidenceResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryAllEvidenceResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.evidence = []; + if (options.defaults) + object.pagination = null; + if (message.evidence && message.evidence.length) { + object.evidence = []; + for (let j = 0; j < message.evidence.length; ++j) + object.evidence[j] = $root.google.protobuf.Any.toObject(message.evidence[j], options); + } + if (message.pagination != null && message.hasOwnProperty("pagination")) + object.pagination = $root.cosmos.base.query.v1beta1.PageResponse.toObject(message.pagination, options); + return object; + }; + + /** + * Converts this QueryAllEvidenceResponse to JSON. + * @function toJSON + * @memberof cosmos.evidence.v1beta1.QueryAllEvidenceResponse + * @instance + * @returns {Object.} JSON object + */ + QueryAllEvidenceResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryAllEvidenceResponse; + })(v1beta1.QueryAllEvidenceResponse || {}); + + v1beta1.Msg = (function(Msg) { + + /** + * Constructs a new Msg service. + * @memberof cosmos.evidence.v1beta1 + * @classdesc Represents a Msg + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Msg(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Msg.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Msg; + + /** + * Creates new Msg service using the specified rpc implementation. + * @function create + * @memberof cosmos.evidence.v1beta1.Msg + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Msg} RPC service. Useful where requests and/or responses are streamed. + */ + Msg.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link cosmos.evidence.v1beta1.Msg#submitEvidence}. + * @memberof cosmos.evidence.v1beta1.Msg + * @typedef SubmitEvidenceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.evidence.v1beta1.IMsgSubmitEvidenceResponse} [response] MsgSubmitEvidenceResponse + */ + + /** + * Calls SubmitEvidence. + * @function submitEvidence + * @memberof cosmos.evidence.v1beta1.Msg + * @instance + * @param {cosmos.evidence.v1beta1.IMsgSubmitEvidence} request MsgSubmitEvidence message or plain object + * @param {cosmos.evidence.v1beta1.Msg.SubmitEvidenceCallback} callback Node-style callback called with the error, if any, and MsgSubmitEvidenceResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Msg.prototype.submitEvidence = function submitEvidence(request, callback) { + return this.rpcCall(submitEvidence, $root.cosmos.evidence.v1beta1.MsgSubmitEvidence, $root.cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse, request, callback); + }, "name", { value: "SubmitEvidence" }); + + /** + * Calls SubmitEvidence. + * @function submitEvidence + * @memberof cosmos.evidence.v1beta1.Msg + * @instance + * @param {cosmos.evidence.v1beta1.IMsgSubmitEvidence} request MsgSubmitEvidence message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Msg; + })(v1beta1.Msg || {}); + + v1beta1.MsgSubmitEvidence = (function(MsgSubmitEvidence) { + + /** + * Properties of a MsgSubmitEvidence. + * @memberof cosmos.evidence.v1beta1 + * @interface IMsgSubmitEvidence + * @property {string|null} [submitter] MsgSubmitEvidence submitter + * @property {google.protobuf.IAny|null} [evidence] MsgSubmitEvidence evidence + */ + + /** + * Constructs a new MsgSubmitEvidence. + * @memberof cosmos.evidence.v1beta1 + * @classdesc Represents a MsgSubmitEvidence. + * @implements IMsgSubmitEvidence + * @constructor + * @param {cosmos.evidence.v1beta1.IMsgSubmitEvidence=} [properties] Properties to set + */ + function MsgSubmitEvidence(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgSubmitEvidence submitter. + * @member {string} submitter + * @memberof cosmos.evidence.v1beta1.MsgSubmitEvidence + * @instance + */ + MsgSubmitEvidence.prototype.submitter = ""; + + /** + * MsgSubmitEvidence evidence. + * @member {google.protobuf.IAny|null|undefined} evidence + * @memberof cosmos.evidence.v1beta1.MsgSubmitEvidence + * @instance + */ + MsgSubmitEvidence.prototype.evidence = null; + + /** + * Creates a new MsgSubmitEvidence instance using the specified properties. + * @function create + * @memberof cosmos.evidence.v1beta1.MsgSubmitEvidence + * @static + * @param {cosmos.evidence.v1beta1.IMsgSubmitEvidence=} [properties] Properties to set + * @returns {cosmos.evidence.v1beta1.MsgSubmitEvidence} MsgSubmitEvidence instance + */ + MsgSubmitEvidence.create = function create(properties) { + return new MsgSubmitEvidence(properties); + }; + + /** + * Encodes the specified MsgSubmitEvidence message. Does not implicitly {@link cosmos.evidence.v1beta1.MsgSubmitEvidence.verify|verify} messages. + * @function encode + * @memberof cosmos.evidence.v1beta1.MsgSubmitEvidence + * @static + * @param {cosmos.evidence.v1beta1.IMsgSubmitEvidence} message MsgSubmitEvidence message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgSubmitEvidence.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.submitter != null && Object.hasOwnProperty.call(message, "submitter")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.submitter); + if (message.evidence != null && Object.hasOwnProperty.call(message, "evidence")) + $root.google.protobuf.Any.encode(message.evidence, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MsgSubmitEvidence message, length delimited. Does not implicitly {@link cosmos.evidence.v1beta1.MsgSubmitEvidence.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.evidence.v1beta1.MsgSubmitEvidence + * @static + * @param {cosmos.evidence.v1beta1.IMsgSubmitEvidence} message MsgSubmitEvidence message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgSubmitEvidence.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgSubmitEvidence message from the specified reader or buffer. + * @function decode + * @memberof cosmos.evidence.v1beta1.MsgSubmitEvidence + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.evidence.v1beta1.MsgSubmitEvidence} MsgSubmitEvidence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgSubmitEvidence.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.evidence.v1beta1.MsgSubmitEvidence(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.submitter = reader.string(); + break; + case 2: + message.evidence = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgSubmitEvidence message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.evidence.v1beta1.MsgSubmitEvidence + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.evidence.v1beta1.MsgSubmitEvidence} MsgSubmitEvidence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgSubmitEvidence.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgSubmitEvidence message. + * @function verify + * @memberof cosmos.evidence.v1beta1.MsgSubmitEvidence + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgSubmitEvidence.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.submitter != null && message.hasOwnProperty("submitter")) + if (!$util.isString(message.submitter)) + return "submitter: string expected"; + if (message.evidence != null && message.hasOwnProperty("evidence")) { + let error = $root.google.protobuf.Any.verify(message.evidence); + if (error) + return "evidence." + error; + } + return null; + }; + + /** + * Creates a MsgSubmitEvidence message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.evidence.v1beta1.MsgSubmitEvidence + * @static + * @param {Object.} object Plain object + * @returns {cosmos.evidence.v1beta1.MsgSubmitEvidence} MsgSubmitEvidence + */ + MsgSubmitEvidence.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.evidence.v1beta1.MsgSubmitEvidence) + return object; + let message = new $root.cosmos.evidence.v1beta1.MsgSubmitEvidence(); + if (object.submitter != null) + message.submitter = String(object.submitter); + if (object.evidence != null) { + if (typeof object.evidence !== "object") + throw TypeError(".cosmos.evidence.v1beta1.MsgSubmitEvidence.evidence: object expected"); + message.evidence = $root.google.protobuf.Any.fromObject(object.evidence); + } + return message; + }; + + /** + * Creates a plain object from a MsgSubmitEvidence message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.evidence.v1beta1.MsgSubmitEvidence + * @static + * @param {cosmos.evidence.v1beta1.MsgSubmitEvidence} message MsgSubmitEvidence + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgSubmitEvidence.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.submitter = ""; + object.evidence = null; + } + if (message.submitter != null && message.hasOwnProperty("submitter")) + object.submitter = message.submitter; + if (message.evidence != null && message.hasOwnProperty("evidence")) + object.evidence = $root.google.protobuf.Any.toObject(message.evidence, options); + return object; + }; + + /** + * Converts this MsgSubmitEvidence to JSON. + * @function toJSON + * @memberof cosmos.evidence.v1beta1.MsgSubmitEvidence + * @instance + * @returns {Object.} JSON object + */ + MsgSubmitEvidence.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgSubmitEvidence; + })(v1beta1.MsgSubmitEvidence || {}); + + v1beta1.MsgSubmitEvidenceResponse = (function(MsgSubmitEvidenceResponse) { + + /** + * Properties of a MsgSubmitEvidenceResponse. + * @memberof cosmos.evidence.v1beta1 + * @interface IMsgSubmitEvidenceResponse + * @property {Uint8Array|null} [hash] MsgSubmitEvidenceResponse hash + */ + + /** + * Constructs a new MsgSubmitEvidenceResponse. + * @memberof cosmos.evidence.v1beta1 + * @classdesc Represents a MsgSubmitEvidenceResponse. + * @implements IMsgSubmitEvidenceResponse + * @constructor + * @param {cosmos.evidence.v1beta1.IMsgSubmitEvidenceResponse=} [properties] Properties to set + */ + function MsgSubmitEvidenceResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgSubmitEvidenceResponse hash. + * @member {Uint8Array} hash + * @memberof cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse + * @instance + */ + MsgSubmitEvidenceResponse.prototype.hash = $util.newBuffer([]); + + /** + * Creates a new MsgSubmitEvidenceResponse instance using the specified properties. + * @function create + * @memberof cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse + * @static + * @param {cosmos.evidence.v1beta1.IMsgSubmitEvidenceResponse=} [properties] Properties to set + * @returns {cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse} MsgSubmitEvidenceResponse instance + */ + MsgSubmitEvidenceResponse.create = function create(properties) { + return new MsgSubmitEvidenceResponse(properties); + }; + + /** + * Encodes the specified MsgSubmitEvidenceResponse message. Does not implicitly {@link cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse + * @static + * @param {cosmos.evidence.v1beta1.IMsgSubmitEvidenceResponse} message MsgSubmitEvidenceResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgSubmitEvidenceResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.hash != null && Object.hasOwnProperty.call(message, "hash")) + writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.hash); + return writer; + }; + + /** + * Encodes the specified MsgSubmitEvidenceResponse message, length delimited. Does not implicitly {@link cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse + * @static + * @param {cosmos.evidence.v1beta1.IMsgSubmitEvidenceResponse} message MsgSubmitEvidenceResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgSubmitEvidenceResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgSubmitEvidenceResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse} MsgSubmitEvidenceResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgSubmitEvidenceResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 4: + message.hash = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgSubmitEvidenceResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse} MsgSubmitEvidenceResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgSubmitEvidenceResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgSubmitEvidenceResponse message. + * @function verify + * @memberof cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgSubmitEvidenceResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.hash != null && message.hasOwnProperty("hash")) + if (!(message.hash && typeof message.hash.length === "number" || $util.isString(message.hash))) + return "hash: buffer expected"; + return null; + }; + + /** + * Creates a MsgSubmitEvidenceResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse} MsgSubmitEvidenceResponse + */ + MsgSubmitEvidenceResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse) + return object; + let message = new $root.cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse(); + if (object.hash != null) + if (typeof object.hash === "string") + $util.base64.decode(object.hash, message.hash = $util.newBuffer($util.base64.length(object.hash)), 0); + else if (object.hash.length) + message.hash = object.hash; + return message; + }; + + /** + * Creates a plain object from a MsgSubmitEvidenceResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse + * @static + * @param {cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse} message MsgSubmitEvidenceResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgSubmitEvidenceResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + if (options.bytes === String) + object.hash = ""; + else { + object.hash = []; + if (options.bytes !== Array) + object.hash = $util.newBuffer(object.hash); + } + if (message.hash != null && message.hasOwnProperty("hash")) + object.hash = options.bytes === String ? $util.base64.encode(message.hash, 0, message.hash.length) : options.bytes === Array ? Array.prototype.slice.call(message.hash) : message.hash; + return object; + }; + + /** + * Converts this MsgSubmitEvidenceResponse to JSON. + * @function toJSON + * @memberof cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse + * @instance + * @returns {Object.} JSON object + */ + MsgSubmitEvidenceResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgSubmitEvidenceResponse; + })(v1beta1.MsgSubmitEvidenceResponse || {}); + + return v1beta1; + })(evidence.v1beta1 || {}); + + return evidence; + })(cosmos.evidence || {}); + + /** + * Namespace genutil. + * @memberof cosmos + * @namespace + */ + + cosmos.genutil = (function(genutil) { + + /** + * Namespace v1beta1. + * @memberof cosmos.genutil + * @namespace + */ + + genutil.v1beta1 = (function(v1beta1) { + + v1beta1.GenesisState = (function(GenesisState) { + + /** + * Properties of a GenesisState. + * @memberof cosmos.genutil.v1beta1 + * @interface IGenesisState + * @property {Array.|null} [genTxs] GenesisState genTxs + */ + + /** + * Constructs a new GenesisState. + * @memberof cosmos.genutil.v1beta1 + * @classdesc Represents a GenesisState. + * @implements IGenesisState + * @constructor + * @param {cosmos.genutil.v1beta1.IGenesisState=} [properties] Properties to set + */ + function GenesisState(properties) { + this.genTxs = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GenesisState genTxs. + * @member {Array.} genTxs + * @memberof cosmos.genutil.v1beta1.GenesisState + * @instance + */ + GenesisState.prototype.genTxs = $util.emptyArray; + + /** + * Creates a new GenesisState instance using the specified properties. + * @function create + * @memberof cosmos.genutil.v1beta1.GenesisState + * @static + * @param {cosmos.genutil.v1beta1.IGenesisState=} [properties] Properties to set + * @returns {cosmos.genutil.v1beta1.GenesisState} GenesisState instance + */ + GenesisState.create = function create(properties) { + return new GenesisState(properties); + }; + + /** + * Encodes the specified GenesisState message. Does not implicitly {@link cosmos.genutil.v1beta1.GenesisState.verify|verify} messages. + * @function encode + * @memberof cosmos.genutil.v1beta1.GenesisState + * @static + * @param {cosmos.genutil.v1beta1.IGenesisState} message GenesisState message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenesisState.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.genTxs != null && message.genTxs.length) + for (let i = 0; i < message.genTxs.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.genTxs[i]); + return writer; + }; + + /** + * Encodes the specified GenesisState message, length delimited. Does not implicitly {@link cosmos.genutil.v1beta1.GenesisState.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.genutil.v1beta1.GenesisState + * @static + * @param {cosmos.genutil.v1beta1.IGenesisState} message GenesisState message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenesisState.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GenesisState message from the specified reader or buffer. + * @function decode + * @memberof cosmos.genutil.v1beta1.GenesisState + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.genutil.v1beta1.GenesisState} GenesisState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenesisState.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.genutil.v1beta1.GenesisState(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.genTxs && message.genTxs.length)) + message.genTxs = []; + message.genTxs.push(reader.bytes()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GenesisState message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.genutil.v1beta1.GenesisState + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.genutil.v1beta1.GenesisState} GenesisState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenesisState.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GenesisState message. + * @function verify + * @memberof cosmos.genutil.v1beta1.GenesisState + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GenesisState.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.genTxs != null && message.hasOwnProperty("genTxs")) { + if (!Array.isArray(message.genTxs)) + return "genTxs: array expected"; + for (let i = 0; i < message.genTxs.length; ++i) + if (!(message.genTxs[i] && typeof message.genTxs[i].length === "number" || $util.isString(message.genTxs[i]))) + return "genTxs: buffer[] expected"; + } + return null; + }; + + /** + * Creates a GenesisState message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.genutil.v1beta1.GenesisState + * @static + * @param {Object.} object Plain object + * @returns {cosmos.genutil.v1beta1.GenesisState} GenesisState + */ + GenesisState.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.genutil.v1beta1.GenesisState) + return object; + let message = new $root.cosmos.genutil.v1beta1.GenesisState(); + if (object.genTxs) { + if (!Array.isArray(object.genTxs)) + throw TypeError(".cosmos.genutil.v1beta1.GenesisState.genTxs: array expected"); + message.genTxs = []; + for (let i = 0; i < object.genTxs.length; ++i) + if (typeof object.genTxs[i] === "string") + $util.base64.decode(object.genTxs[i], message.genTxs[i] = $util.newBuffer($util.base64.length(object.genTxs[i])), 0); + else if (object.genTxs[i].length) + message.genTxs[i] = object.genTxs[i]; + } + return message; + }; + + /** + * Creates a plain object from a GenesisState message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.genutil.v1beta1.GenesisState + * @static + * @param {cosmos.genutil.v1beta1.GenesisState} message GenesisState + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GenesisState.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.genTxs = []; + if (message.genTxs && message.genTxs.length) { + object.genTxs = []; + for (let j = 0; j < message.genTxs.length; ++j) + object.genTxs[j] = options.bytes === String ? $util.base64.encode(message.genTxs[j], 0, message.genTxs[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.genTxs[j]) : message.genTxs[j]; + } + return object; + }; + + /** + * Converts this GenesisState to JSON. + * @function toJSON + * @memberof cosmos.genutil.v1beta1.GenesisState + * @instance + * @returns {Object.} JSON object + */ + GenesisState.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GenesisState; + })(v1beta1.GenesisState || {}); + + return v1beta1; + })(genutil.v1beta1 || {}); + + return genutil; + })(cosmos.genutil || {}); + + /** + * Namespace gov. + * @memberof cosmos + * @namespace + */ + + cosmos.gov = (function(gov) { + + /** + * Namespace v1beta1. + * @memberof cosmos.gov + * @namespace + */ + + gov.v1beta1 = (function(v1beta1) { + + v1beta1.GenesisState = (function(GenesisState) { + + /** + * Properties of a GenesisState. + * @memberof cosmos.gov.v1beta1 + * @interface IGenesisState + * @property {number|Long|null} [startingProposalId] GenesisState startingProposalId + * @property {Array.|null} [deposits] GenesisState deposits + * @property {Array.|null} [votes] GenesisState votes + * @property {Array.|null} [proposals] GenesisState proposals + * @property {cosmos.gov.v1beta1.IDepositParams|null} [depositParams] GenesisState depositParams + * @property {cosmos.gov.v1beta1.IVotingParams|null} [votingParams] GenesisState votingParams + * @property {cosmos.gov.v1beta1.ITallyParams|null} [tallyParams] GenesisState tallyParams + */ + + /** + * Constructs a new GenesisState. + * @memberof cosmos.gov.v1beta1 + * @classdesc Represents a GenesisState. + * @implements IGenesisState + * @constructor + * @param {cosmos.gov.v1beta1.IGenesisState=} [properties] Properties to set + */ + function GenesisState(properties) { + this.deposits = []; + this.votes = []; + this.proposals = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GenesisState startingProposalId. + * @member {number|Long} startingProposalId + * @memberof cosmos.gov.v1beta1.GenesisState + * @instance + */ + GenesisState.prototype.startingProposalId = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * GenesisState deposits. + * @member {Array.} deposits + * @memberof cosmos.gov.v1beta1.GenesisState + * @instance + */ + GenesisState.prototype.deposits = $util.emptyArray; + + /** + * GenesisState votes. + * @member {Array.} votes + * @memberof cosmos.gov.v1beta1.GenesisState + * @instance + */ + GenesisState.prototype.votes = $util.emptyArray; + + /** + * GenesisState proposals. + * @member {Array.} proposals + * @memberof cosmos.gov.v1beta1.GenesisState + * @instance + */ + GenesisState.prototype.proposals = $util.emptyArray; + + /** + * GenesisState depositParams. + * @member {cosmos.gov.v1beta1.IDepositParams|null|undefined} depositParams + * @memberof cosmos.gov.v1beta1.GenesisState + * @instance + */ + GenesisState.prototype.depositParams = null; + + /** + * GenesisState votingParams. + * @member {cosmos.gov.v1beta1.IVotingParams|null|undefined} votingParams + * @memberof cosmos.gov.v1beta1.GenesisState + * @instance + */ + GenesisState.prototype.votingParams = null; + + /** + * GenesisState tallyParams. + * @member {cosmos.gov.v1beta1.ITallyParams|null|undefined} tallyParams + * @memberof cosmos.gov.v1beta1.GenesisState + * @instance + */ + GenesisState.prototype.tallyParams = null; + + /** + * Creates a new GenesisState instance using the specified properties. + * @function create + * @memberof cosmos.gov.v1beta1.GenesisState + * @static + * @param {cosmos.gov.v1beta1.IGenesisState=} [properties] Properties to set + * @returns {cosmos.gov.v1beta1.GenesisState} GenesisState instance + */ + GenesisState.create = function create(properties) { + return new GenesisState(properties); + }; + + /** + * Encodes the specified GenesisState message. Does not implicitly {@link cosmos.gov.v1beta1.GenesisState.verify|verify} messages. + * @function encode + * @memberof cosmos.gov.v1beta1.GenesisState + * @static + * @param {cosmos.gov.v1beta1.IGenesisState} message GenesisState message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenesisState.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.startingProposalId != null && Object.hasOwnProperty.call(message, "startingProposalId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.startingProposalId); + if (message.deposits != null && message.deposits.length) + for (let i = 0; i < message.deposits.length; ++i) + $root.cosmos.gov.v1beta1.Deposit.encode(message.deposits[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.votes != null && message.votes.length) + for (let i = 0; i < message.votes.length; ++i) + $root.cosmos.gov.v1beta1.Vote.encode(message.votes[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.proposals != null && message.proposals.length) + for (let i = 0; i < message.proposals.length; ++i) + $root.cosmos.gov.v1beta1.Proposal.encode(message.proposals[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.depositParams != null && Object.hasOwnProperty.call(message, "depositParams")) + $root.cosmos.gov.v1beta1.DepositParams.encode(message.depositParams, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.votingParams != null && Object.hasOwnProperty.call(message, "votingParams")) + $root.cosmos.gov.v1beta1.VotingParams.encode(message.votingParams, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.tallyParams != null && Object.hasOwnProperty.call(message, "tallyParams")) + $root.cosmos.gov.v1beta1.TallyParams.encode(message.tallyParams, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GenesisState message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.GenesisState.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.gov.v1beta1.GenesisState + * @static + * @param {cosmos.gov.v1beta1.IGenesisState} message GenesisState message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenesisState.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GenesisState message from the specified reader or buffer. + * @function decode + * @memberof cosmos.gov.v1beta1.GenesisState + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.gov.v1beta1.GenesisState} GenesisState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenesisState.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1beta1.GenesisState(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.startingProposalId = reader.uint64(); + break; + case 2: + if (!(message.deposits && message.deposits.length)) + message.deposits = []; + message.deposits.push($root.cosmos.gov.v1beta1.Deposit.decode(reader, reader.uint32())); + break; + case 3: + if (!(message.votes && message.votes.length)) + message.votes = []; + message.votes.push($root.cosmos.gov.v1beta1.Vote.decode(reader, reader.uint32())); + break; + case 4: + if (!(message.proposals && message.proposals.length)) + message.proposals = []; + message.proposals.push($root.cosmos.gov.v1beta1.Proposal.decode(reader, reader.uint32())); + break; + case 5: + message.depositParams = $root.cosmos.gov.v1beta1.DepositParams.decode(reader, reader.uint32()); + break; + case 6: + message.votingParams = $root.cosmos.gov.v1beta1.VotingParams.decode(reader, reader.uint32()); + break; + case 7: + message.tallyParams = $root.cosmos.gov.v1beta1.TallyParams.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GenesisState message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.gov.v1beta1.GenesisState + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.gov.v1beta1.GenesisState} GenesisState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenesisState.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GenesisState message. + * @function verify + * @memberof cosmos.gov.v1beta1.GenesisState + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GenesisState.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.startingProposalId != null && message.hasOwnProperty("startingProposalId")) + if (!$util.isInteger(message.startingProposalId) && !(message.startingProposalId && $util.isInteger(message.startingProposalId.low) && $util.isInteger(message.startingProposalId.high))) + return "startingProposalId: integer|Long expected"; + if (message.deposits != null && message.hasOwnProperty("deposits")) { + if (!Array.isArray(message.deposits)) + return "deposits: array expected"; + for (let i = 0; i < message.deposits.length; ++i) { + let error = $root.cosmos.gov.v1beta1.Deposit.verify(message.deposits[i]); + if (error) + return "deposits." + error; + } + } + if (message.votes != null && message.hasOwnProperty("votes")) { + if (!Array.isArray(message.votes)) + return "votes: array expected"; + for (let i = 0; i < message.votes.length; ++i) { + let error = $root.cosmos.gov.v1beta1.Vote.verify(message.votes[i]); + if (error) + return "votes." + error; + } + } + if (message.proposals != null && message.hasOwnProperty("proposals")) { + if (!Array.isArray(message.proposals)) + return "proposals: array expected"; + for (let i = 0; i < message.proposals.length; ++i) { + let error = $root.cosmos.gov.v1beta1.Proposal.verify(message.proposals[i]); + if (error) + return "proposals." + error; + } + } + if (message.depositParams != null && message.hasOwnProperty("depositParams")) { + let error = $root.cosmos.gov.v1beta1.DepositParams.verify(message.depositParams); + if (error) + return "depositParams." + error; + } + if (message.votingParams != null && message.hasOwnProperty("votingParams")) { + let error = $root.cosmos.gov.v1beta1.VotingParams.verify(message.votingParams); + if (error) + return "votingParams." + error; + } + if (message.tallyParams != null && message.hasOwnProperty("tallyParams")) { + let error = $root.cosmos.gov.v1beta1.TallyParams.verify(message.tallyParams); + if (error) + return "tallyParams." + error; + } + return null; + }; + + /** + * Creates a GenesisState message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.gov.v1beta1.GenesisState + * @static + * @param {Object.} object Plain object + * @returns {cosmos.gov.v1beta1.GenesisState} GenesisState + */ + GenesisState.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.gov.v1beta1.GenesisState) + return object; + let message = new $root.cosmos.gov.v1beta1.GenesisState(); + if (object.startingProposalId != null) + if ($util.Long) + (message.startingProposalId = $util.Long.fromValue(object.startingProposalId)).unsigned = true; + else if (typeof object.startingProposalId === "string") + message.startingProposalId = parseInt(object.startingProposalId, 10); + else if (typeof object.startingProposalId === "number") + message.startingProposalId = object.startingProposalId; + else if (typeof object.startingProposalId === "object") + message.startingProposalId = new $util.LongBits(object.startingProposalId.low >>> 0, object.startingProposalId.high >>> 0).toNumber(true); + if (object.deposits) { + if (!Array.isArray(object.deposits)) + throw TypeError(".cosmos.gov.v1beta1.GenesisState.deposits: array expected"); + message.deposits = []; + for (let i = 0; i < object.deposits.length; ++i) { + if (typeof object.deposits[i] !== "object") + throw TypeError(".cosmos.gov.v1beta1.GenesisState.deposits: object expected"); + message.deposits[i] = $root.cosmos.gov.v1beta1.Deposit.fromObject(object.deposits[i]); + } + } + if (object.votes) { + if (!Array.isArray(object.votes)) + throw TypeError(".cosmos.gov.v1beta1.GenesisState.votes: array expected"); + message.votes = []; + for (let i = 0; i < object.votes.length; ++i) { + if (typeof object.votes[i] !== "object") + throw TypeError(".cosmos.gov.v1beta1.GenesisState.votes: object expected"); + message.votes[i] = $root.cosmos.gov.v1beta1.Vote.fromObject(object.votes[i]); + } + } + if (object.proposals) { + if (!Array.isArray(object.proposals)) + throw TypeError(".cosmos.gov.v1beta1.GenesisState.proposals: array expected"); + message.proposals = []; + for (let i = 0; i < object.proposals.length; ++i) { + if (typeof object.proposals[i] !== "object") + throw TypeError(".cosmos.gov.v1beta1.GenesisState.proposals: object expected"); + message.proposals[i] = $root.cosmos.gov.v1beta1.Proposal.fromObject(object.proposals[i]); + } + } + if (object.depositParams != null) { + if (typeof object.depositParams !== "object") + throw TypeError(".cosmos.gov.v1beta1.GenesisState.depositParams: object expected"); + message.depositParams = $root.cosmos.gov.v1beta1.DepositParams.fromObject(object.depositParams); + } + if (object.votingParams != null) { + if (typeof object.votingParams !== "object") + throw TypeError(".cosmos.gov.v1beta1.GenesisState.votingParams: object expected"); + message.votingParams = $root.cosmos.gov.v1beta1.VotingParams.fromObject(object.votingParams); + } + if (object.tallyParams != null) { + if (typeof object.tallyParams !== "object") + throw TypeError(".cosmos.gov.v1beta1.GenesisState.tallyParams: object expected"); + message.tallyParams = $root.cosmos.gov.v1beta1.TallyParams.fromObject(object.tallyParams); + } + return message; + }; + + /** + * Creates a plain object from a GenesisState message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.gov.v1beta1.GenesisState + * @static + * @param {cosmos.gov.v1beta1.GenesisState} message GenesisState + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GenesisState.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) { + object.deposits = []; + object.votes = []; + object.proposals = []; + } + if (options.defaults) { + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.startingProposalId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.startingProposalId = options.longs === String ? "0" : 0; + object.depositParams = null; + object.votingParams = null; + object.tallyParams = null; + } + if (message.startingProposalId != null && message.hasOwnProperty("startingProposalId")) + if (typeof message.startingProposalId === "number") + object.startingProposalId = options.longs === String ? String(message.startingProposalId) : message.startingProposalId; + else + object.startingProposalId = options.longs === String ? $util.Long.prototype.toString.call(message.startingProposalId) : options.longs === Number ? new $util.LongBits(message.startingProposalId.low >>> 0, message.startingProposalId.high >>> 0).toNumber(true) : message.startingProposalId; + if (message.deposits && message.deposits.length) { + object.deposits = []; + for (let j = 0; j < message.deposits.length; ++j) + object.deposits[j] = $root.cosmos.gov.v1beta1.Deposit.toObject(message.deposits[j], options); + } + if (message.votes && message.votes.length) { + object.votes = []; + for (let j = 0; j < message.votes.length; ++j) + object.votes[j] = $root.cosmos.gov.v1beta1.Vote.toObject(message.votes[j], options); + } + if (message.proposals && message.proposals.length) { + object.proposals = []; + for (let j = 0; j < message.proposals.length; ++j) + object.proposals[j] = $root.cosmos.gov.v1beta1.Proposal.toObject(message.proposals[j], options); + } + if (message.depositParams != null && message.hasOwnProperty("depositParams")) + object.depositParams = $root.cosmos.gov.v1beta1.DepositParams.toObject(message.depositParams, options); + if (message.votingParams != null && message.hasOwnProperty("votingParams")) + object.votingParams = $root.cosmos.gov.v1beta1.VotingParams.toObject(message.votingParams, options); + if (message.tallyParams != null && message.hasOwnProperty("tallyParams")) + object.tallyParams = $root.cosmos.gov.v1beta1.TallyParams.toObject(message.tallyParams, options); + return object; + }; + + /** + * Converts this GenesisState to JSON. + * @function toJSON + * @memberof cosmos.gov.v1beta1.GenesisState + * @instance + * @returns {Object.} JSON object + */ + GenesisState.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GenesisState; + })(v1beta1.GenesisState || {}); + + /** + * VoteOption enum. + * @name cosmos.gov.v1beta1.VoteOption + * @enum {string} + * @property {number} VOTE_OPTION_UNSPECIFIED=0 VOTE_OPTION_UNSPECIFIED value + * @property {number} VOTE_OPTION_YES=1 VOTE_OPTION_YES value + * @property {number} VOTE_OPTION_ABSTAIN=2 VOTE_OPTION_ABSTAIN value + * @property {number} VOTE_OPTION_NO=3 VOTE_OPTION_NO value + * @property {number} VOTE_OPTION_NO_WITH_VETO=4 VOTE_OPTION_NO_WITH_VETO value + */ + v1beta1.VoteOption = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "VOTE_OPTION_UNSPECIFIED"] = 0; + values[valuesById[1] = "VOTE_OPTION_YES"] = 1; + values[valuesById[2] = "VOTE_OPTION_ABSTAIN"] = 2; + values[valuesById[3] = "VOTE_OPTION_NO"] = 3; + values[valuesById[4] = "VOTE_OPTION_NO_WITH_VETO"] = 4; + return values; + })(); + + v1beta1.TextProposal = (function(TextProposal) { + + /** + * Properties of a TextProposal. + * @memberof cosmos.gov.v1beta1 + * @interface ITextProposal + * @property {string|null} [title] TextProposal title + * @property {string|null} [description] TextProposal description + */ + + /** + * Constructs a new TextProposal. + * @memberof cosmos.gov.v1beta1 + * @classdesc Represents a TextProposal. + * @implements ITextProposal + * @constructor + * @param {cosmos.gov.v1beta1.ITextProposal=} [properties] Properties to set + */ + function TextProposal(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TextProposal title. + * @member {string} title + * @memberof cosmos.gov.v1beta1.TextProposal + * @instance + */ + TextProposal.prototype.title = ""; + + /** + * TextProposal description. + * @member {string} description + * @memberof cosmos.gov.v1beta1.TextProposal + * @instance + */ + TextProposal.prototype.description = ""; + + /** + * Creates a new TextProposal instance using the specified properties. + * @function create + * @memberof cosmos.gov.v1beta1.TextProposal + * @static + * @param {cosmos.gov.v1beta1.ITextProposal=} [properties] Properties to set + * @returns {cosmos.gov.v1beta1.TextProposal} TextProposal instance + */ + TextProposal.create = function create(properties) { + return new TextProposal(properties); + }; + + /** + * Encodes the specified TextProposal message. Does not implicitly {@link cosmos.gov.v1beta1.TextProposal.verify|verify} messages. + * @function encode + * @memberof cosmos.gov.v1beta1.TextProposal + * @static + * @param {cosmos.gov.v1beta1.ITextProposal} message TextProposal message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TextProposal.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.title != null && Object.hasOwnProperty.call(message, "title")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.title); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + return writer; + }; + + /** + * Encodes the specified TextProposal message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.TextProposal.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.gov.v1beta1.TextProposal + * @static + * @param {cosmos.gov.v1beta1.ITextProposal} message TextProposal message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TextProposal.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TextProposal message from the specified reader or buffer. + * @function decode + * @memberof cosmos.gov.v1beta1.TextProposal + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.gov.v1beta1.TextProposal} TextProposal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TextProposal.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1beta1.TextProposal(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.title = reader.string(); + break; + case 2: + message.description = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TextProposal message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.gov.v1beta1.TextProposal + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.gov.v1beta1.TextProposal} TextProposal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TextProposal.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TextProposal message. + * @function verify + * @memberof cosmos.gov.v1beta1.TextProposal + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TextProposal.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.title != null && message.hasOwnProperty("title")) + if (!$util.isString(message.title)) + return "title: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + return null; + }; + + /** + * Creates a TextProposal message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.gov.v1beta1.TextProposal + * @static + * @param {Object.} object Plain object + * @returns {cosmos.gov.v1beta1.TextProposal} TextProposal + */ + TextProposal.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.gov.v1beta1.TextProposal) + return object; + let message = new $root.cosmos.gov.v1beta1.TextProposal(); + if (object.title != null) + message.title = String(object.title); + if (object.description != null) + message.description = String(object.description); + return message; + }; + + /** + * Creates a plain object from a TextProposal message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.gov.v1beta1.TextProposal + * @static + * @param {cosmos.gov.v1beta1.TextProposal} message TextProposal + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TextProposal.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.title = ""; + object.description = ""; + } + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + return object; + }; + + /** + * Converts this TextProposal to JSON. + * @function toJSON + * @memberof cosmos.gov.v1beta1.TextProposal + * @instance + * @returns {Object.} JSON object + */ + TextProposal.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TextProposal; + })(v1beta1.TextProposal || {}); + + v1beta1.Deposit = (function(Deposit) { + + /** + * Properties of a Deposit. + * @memberof cosmos.gov.v1beta1 + * @interface IDeposit + * @property {number|Long|null} [proposalId] Deposit proposalId + * @property {string|null} [depositor] Deposit depositor + * @property {Array.|null} [amount] Deposit amount + */ + + /** + * Constructs a new Deposit. + * @memberof cosmos.gov.v1beta1 + * @classdesc Represents a Deposit. + * @implements IDeposit + * @constructor + * @param {cosmos.gov.v1beta1.IDeposit=} [properties] Properties to set + */ + function Deposit(properties) { + this.amount = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Deposit proposalId. + * @member {number|Long} proposalId + * @memberof cosmos.gov.v1beta1.Deposit + * @instance + */ + Deposit.prototype.proposalId = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Deposit depositor. + * @member {string} depositor + * @memberof cosmos.gov.v1beta1.Deposit + * @instance + */ + Deposit.prototype.depositor = ""; + + /** + * Deposit amount. + * @member {Array.} amount + * @memberof cosmos.gov.v1beta1.Deposit + * @instance + */ + Deposit.prototype.amount = $util.emptyArray; + + /** + * Creates a new Deposit instance using the specified properties. + * @function create + * @memberof cosmos.gov.v1beta1.Deposit + * @static + * @param {cosmos.gov.v1beta1.IDeposit=} [properties] Properties to set + * @returns {cosmos.gov.v1beta1.Deposit} Deposit instance + */ + Deposit.create = function create(properties) { + return new Deposit(properties); + }; + + /** + * Encodes the specified Deposit message. Does not implicitly {@link cosmos.gov.v1beta1.Deposit.verify|verify} messages. + * @function encode + * @memberof cosmos.gov.v1beta1.Deposit + * @static + * @param {cosmos.gov.v1beta1.IDeposit} message Deposit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Deposit.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.proposalId != null && Object.hasOwnProperty.call(message, "proposalId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.proposalId); + if (message.depositor != null && Object.hasOwnProperty.call(message, "depositor")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.depositor); + if (message.amount != null && message.amount.length) + for (let i = 0; i < message.amount.length; ++i) + $root.cosmos.base.v1beta1.Coin.encode(message.amount[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Deposit message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.Deposit.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.gov.v1beta1.Deposit + * @static + * @param {cosmos.gov.v1beta1.IDeposit} message Deposit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Deposit.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Deposit message from the specified reader or buffer. + * @function decode + * @memberof cosmos.gov.v1beta1.Deposit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.gov.v1beta1.Deposit} Deposit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Deposit.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1beta1.Deposit(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.proposalId = reader.uint64(); + break; + case 2: + message.depositor = reader.string(); + break; + case 3: + if (!(message.amount && message.amount.length)) + message.amount = []; + message.amount.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Deposit message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.gov.v1beta1.Deposit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.gov.v1beta1.Deposit} Deposit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Deposit.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Deposit message. + * @function verify + * @memberof cosmos.gov.v1beta1.Deposit + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Deposit.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.proposalId != null && message.hasOwnProperty("proposalId")) + if (!$util.isInteger(message.proposalId) && !(message.proposalId && $util.isInteger(message.proposalId.low) && $util.isInteger(message.proposalId.high))) + return "proposalId: integer|Long expected"; + if (message.depositor != null && message.hasOwnProperty("depositor")) + if (!$util.isString(message.depositor)) + return "depositor: string expected"; + if (message.amount != null && message.hasOwnProperty("amount")) { + if (!Array.isArray(message.amount)) + return "amount: array expected"; + for (let i = 0; i < message.amount.length; ++i) { + let error = $root.cosmos.base.v1beta1.Coin.verify(message.amount[i]); + if (error) + return "amount." + error; + } + } + return null; + }; + + /** + * Creates a Deposit message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.gov.v1beta1.Deposit + * @static + * @param {Object.} object Plain object + * @returns {cosmos.gov.v1beta1.Deposit} Deposit + */ + Deposit.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.gov.v1beta1.Deposit) + return object; + let message = new $root.cosmos.gov.v1beta1.Deposit(); + if (object.proposalId != null) + if ($util.Long) + (message.proposalId = $util.Long.fromValue(object.proposalId)).unsigned = true; + else if (typeof object.proposalId === "string") + message.proposalId = parseInt(object.proposalId, 10); + else if (typeof object.proposalId === "number") + message.proposalId = object.proposalId; + else if (typeof object.proposalId === "object") + message.proposalId = new $util.LongBits(object.proposalId.low >>> 0, object.proposalId.high >>> 0).toNumber(true); + if (object.depositor != null) + message.depositor = String(object.depositor); + if (object.amount) { + if (!Array.isArray(object.amount)) + throw TypeError(".cosmos.gov.v1beta1.Deposit.amount: array expected"); + message.amount = []; + for (let i = 0; i < object.amount.length; ++i) { + if (typeof object.amount[i] !== "object") + throw TypeError(".cosmos.gov.v1beta1.Deposit.amount: object expected"); + message.amount[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.amount[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Deposit message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.gov.v1beta1.Deposit + * @static + * @param {cosmos.gov.v1beta1.Deposit} message Deposit + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Deposit.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.amount = []; + if (options.defaults) { + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.proposalId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.proposalId = options.longs === String ? "0" : 0; + object.depositor = ""; + } + if (message.proposalId != null && message.hasOwnProperty("proposalId")) + if (typeof message.proposalId === "number") + object.proposalId = options.longs === String ? String(message.proposalId) : message.proposalId; + else + object.proposalId = options.longs === String ? $util.Long.prototype.toString.call(message.proposalId) : options.longs === Number ? new $util.LongBits(message.proposalId.low >>> 0, message.proposalId.high >>> 0).toNumber(true) : message.proposalId; + if (message.depositor != null && message.hasOwnProperty("depositor")) + object.depositor = message.depositor; + if (message.amount && message.amount.length) { + object.amount = []; + for (let j = 0; j < message.amount.length; ++j) + object.amount[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.amount[j], options); + } + return object; + }; + + /** + * Converts this Deposit to JSON. + * @function toJSON + * @memberof cosmos.gov.v1beta1.Deposit + * @instance + * @returns {Object.} JSON object + */ + Deposit.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Deposit; + })(v1beta1.Deposit || {}); + + v1beta1.Proposal = (function(Proposal) { + + /** + * Properties of a Proposal. + * @memberof cosmos.gov.v1beta1 + * @interface IProposal + * @property {number|Long|null} [proposalId] Proposal proposalId + * @property {google.protobuf.IAny|null} [content] Proposal content + * @property {cosmos.gov.v1beta1.ProposalStatus|null} [status] Proposal status + * @property {cosmos.gov.v1beta1.ITallyResult|null} [finalTallyResult] Proposal finalTallyResult + * @property {google.protobuf.ITimestamp|null} [submitTime] Proposal submitTime + * @property {google.protobuf.ITimestamp|null} [depositEndTime] Proposal depositEndTime + * @property {Array.|null} [totalDeposit] Proposal totalDeposit + * @property {google.protobuf.ITimestamp|null} [votingStartTime] Proposal votingStartTime + * @property {google.protobuf.ITimestamp|null} [votingEndTime] Proposal votingEndTime + */ + + /** + * Constructs a new Proposal. + * @memberof cosmos.gov.v1beta1 + * @classdesc Represents a Proposal. + * @implements IProposal + * @constructor + * @param {cosmos.gov.v1beta1.IProposal=} [properties] Properties to set + */ + function Proposal(properties) { + this.totalDeposit = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Proposal proposalId. + * @member {number|Long} proposalId + * @memberof cosmos.gov.v1beta1.Proposal + * @instance + */ + Proposal.prototype.proposalId = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Proposal content. + * @member {google.protobuf.IAny|null|undefined} content + * @memberof cosmos.gov.v1beta1.Proposal + * @instance + */ + Proposal.prototype.content = null; + + /** + * Proposal status. + * @member {cosmos.gov.v1beta1.ProposalStatus} status + * @memberof cosmos.gov.v1beta1.Proposal + * @instance + */ + Proposal.prototype.status = 0; + + /** + * Proposal finalTallyResult. + * @member {cosmos.gov.v1beta1.ITallyResult|null|undefined} finalTallyResult + * @memberof cosmos.gov.v1beta1.Proposal + * @instance + */ + Proposal.prototype.finalTallyResult = null; + + /** + * Proposal submitTime. + * @member {google.protobuf.ITimestamp|null|undefined} submitTime + * @memberof cosmos.gov.v1beta1.Proposal + * @instance + */ + Proposal.prototype.submitTime = null; + + /** + * Proposal depositEndTime. + * @member {google.protobuf.ITimestamp|null|undefined} depositEndTime + * @memberof cosmos.gov.v1beta1.Proposal + * @instance + */ + Proposal.prototype.depositEndTime = null; + + /** + * Proposal totalDeposit. + * @member {Array.} totalDeposit + * @memberof cosmos.gov.v1beta1.Proposal + * @instance + */ + Proposal.prototype.totalDeposit = $util.emptyArray; + + /** + * Proposal votingStartTime. + * @member {google.protobuf.ITimestamp|null|undefined} votingStartTime + * @memberof cosmos.gov.v1beta1.Proposal + * @instance + */ + Proposal.prototype.votingStartTime = null; + + /** + * Proposal votingEndTime. + * @member {google.protobuf.ITimestamp|null|undefined} votingEndTime + * @memberof cosmos.gov.v1beta1.Proposal + * @instance + */ + Proposal.prototype.votingEndTime = null; + + /** + * Creates a new Proposal instance using the specified properties. + * @function create + * @memberof cosmos.gov.v1beta1.Proposal + * @static + * @param {cosmos.gov.v1beta1.IProposal=} [properties] Properties to set + * @returns {cosmos.gov.v1beta1.Proposal} Proposal instance + */ + Proposal.create = function create(properties) { + return new Proposal(properties); + }; + + /** + * Encodes the specified Proposal message. Does not implicitly {@link cosmos.gov.v1beta1.Proposal.verify|verify} messages. + * @function encode + * @memberof cosmos.gov.v1beta1.Proposal + * @static + * @param {cosmos.gov.v1beta1.IProposal} message Proposal message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Proposal.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.proposalId != null && Object.hasOwnProperty.call(message, "proposalId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.proposalId); + if (message.content != null && Object.hasOwnProperty.call(message, "content")) + $root.google.protobuf.Any.encode(message.content, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.status); + if (message.finalTallyResult != null && Object.hasOwnProperty.call(message, "finalTallyResult")) + $root.cosmos.gov.v1beta1.TallyResult.encode(message.finalTallyResult, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.submitTime != null && Object.hasOwnProperty.call(message, "submitTime")) + $root.google.protobuf.Timestamp.encode(message.submitTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.depositEndTime != null && Object.hasOwnProperty.call(message, "depositEndTime")) + $root.google.protobuf.Timestamp.encode(message.depositEndTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.totalDeposit != null && message.totalDeposit.length) + for (let i = 0; i < message.totalDeposit.length; ++i) + $root.cosmos.base.v1beta1.Coin.encode(message.totalDeposit[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.votingStartTime != null && Object.hasOwnProperty.call(message, "votingStartTime")) + $root.google.protobuf.Timestamp.encode(message.votingStartTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.votingEndTime != null && Object.hasOwnProperty.call(message, "votingEndTime")) + $root.google.protobuf.Timestamp.encode(message.votingEndTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Proposal message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.Proposal.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.gov.v1beta1.Proposal + * @static + * @param {cosmos.gov.v1beta1.IProposal} message Proposal message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Proposal.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Proposal message from the specified reader or buffer. + * @function decode + * @memberof cosmos.gov.v1beta1.Proposal + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.gov.v1beta1.Proposal} Proposal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Proposal.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1beta1.Proposal(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.proposalId = reader.uint64(); + break; + case 2: + message.content = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + case 3: + message.status = reader.int32(); + break; + case 4: + message.finalTallyResult = $root.cosmos.gov.v1beta1.TallyResult.decode(reader, reader.uint32()); + break; + case 5: + message.submitTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 6: + message.depositEndTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 7: + if (!(message.totalDeposit && message.totalDeposit.length)) + message.totalDeposit = []; + message.totalDeposit.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); + break; + case 8: + message.votingStartTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 9: + message.votingEndTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Proposal message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.gov.v1beta1.Proposal + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.gov.v1beta1.Proposal} Proposal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Proposal.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Proposal message. + * @function verify + * @memberof cosmos.gov.v1beta1.Proposal + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Proposal.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.proposalId != null && message.hasOwnProperty("proposalId")) + if (!$util.isInteger(message.proposalId) && !(message.proposalId && $util.isInteger(message.proposalId.low) && $util.isInteger(message.proposalId.high))) + return "proposalId: integer|Long expected"; + if (message.content != null && message.hasOwnProperty("content")) { + let error = $root.google.protobuf.Any.verify(message.content); + if (error) + return "content." + error; + } + if (message.status != null && message.hasOwnProperty("status")) + switch (message.status) { + default: + return "status: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.finalTallyResult != null && message.hasOwnProperty("finalTallyResult")) { + let error = $root.cosmos.gov.v1beta1.TallyResult.verify(message.finalTallyResult); + if (error) + return "finalTallyResult." + error; + } + if (message.submitTime != null && message.hasOwnProperty("submitTime")) { + let error = $root.google.protobuf.Timestamp.verify(message.submitTime); + if (error) + return "submitTime." + error; + } + if (message.depositEndTime != null && message.hasOwnProperty("depositEndTime")) { + let error = $root.google.protobuf.Timestamp.verify(message.depositEndTime); + if (error) + return "depositEndTime." + error; + } + if (message.totalDeposit != null && message.hasOwnProperty("totalDeposit")) { + if (!Array.isArray(message.totalDeposit)) + return "totalDeposit: array expected"; + for (let i = 0; i < message.totalDeposit.length; ++i) { + let error = $root.cosmos.base.v1beta1.Coin.verify(message.totalDeposit[i]); + if (error) + return "totalDeposit." + error; + } + } + if (message.votingStartTime != null && message.hasOwnProperty("votingStartTime")) { + let error = $root.google.protobuf.Timestamp.verify(message.votingStartTime); + if (error) + return "votingStartTime." + error; + } + if (message.votingEndTime != null && message.hasOwnProperty("votingEndTime")) { + let error = $root.google.protobuf.Timestamp.verify(message.votingEndTime); + if (error) + return "votingEndTime." + error; + } + return null; + }; + + /** + * Creates a Proposal message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.gov.v1beta1.Proposal + * @static + * @param {Object.} object Plain object + * @returns {cosmos.gov.v1beta1.Proposal} Proposal + */ + Proposal.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.gov.v1beta1.Proposal) + return object; + let message = new $root.cosmos.gov.v1beta1.Proposal(); + if (object.proposalId != null) + if ($util.Long) + (message.proposalId = $util.Long.fromValue(object.proposalId)).unsigned = true; + else if (typeof object.proposalId === "string") + message.proposalId = parseInt(object.proposalId, 10); + else if (typeof object.proposalId === "number") + message.proposalId = object.proposalId; + else if (typeof object.proposalId === "object") + message.proposalId = new $util.LongBits(object.proposalId.low >>> 0, object.proposalId.high >>> 0).toNumber(true); + if (object.content != null) { + if (typeof object.content !== "object") + throw TypeError(".cosmos.gov.v1beta1.Proposal.content: object expected"); + message.content = $root.google.protobuf.Any.fromObject(object.content); + } + switch (object.status) { + case "PROPOSAL_STATUS_UNSPECIFIED": + case 0: + message.status = 0; + break; + case "PROPOSAL_STATUS_DEPOSIT_PERIOD": + case 1: + message.status = 1; + break; + case "PROPOSAL_STATUS_VOTING_PERIOD": + case 2: + message.status = 2; + break; + case "PROPOSAL_STATUS_PASSED": + case 3: + message.status = 3; + break; + case "PROPOSAL_STATUS_REJECTED": + case 4: + message.status = 4; + break; + case "PROPOSAL_STATUS_FAILED": + case 5: + message.status = 5; + break; + } + if (object.finalTallyResult != null) { + if (typeof object.finalTallyResult !== "object") + throw TypeError(".cosmos.gov.v1beta1.Proposal.finalTallyResult: object expected"); + message.finalTallyResult = $root.cosmos.gov.v1beta1.TallyResult.fromObject(object.finalTallyResult); + } + if (object.submitTime != null) { + if (typeof object.submitTime !== "object") + throw TypeError(".cosmos.gov.v1beta1.Proposal.submitTime: object expected"); + message.submitTime = $root.google.protobuf.Timestamp.fromObject(object.submitTime); + } + if (object.depositEndTime != null) { + if (typeof object.depositEndTime !== "object") + throw TypeError(".cosmos.gov.v1beta1.Proposal.depositEndTime: object expected"); + message.depositEndTime = $root.google.protobuf.Timestamp.fromObject(object.depositEndTime); + } + if (object.totalDeposit) { + if (!Array.isArray(object.totalDeposit)) + throw TypeError(".cosmos.gov.v1beta1.Proposal.totalDeposit: array expected"); + message.totalDeposit = []; + for (let i = 0; i < object.totalDeposit.length; ++i) { + if (typeof object.totalDeposit[i] !== "object") + throw TypeError(".cosmos.gov.v1beta1.Proposal.totalDeposit: object expected"); + message.totalDeposit[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.totalDeposit[i]); + } + } + if (object.votingStartTime != null) { + if (typeof object.votingStartTime !== "object") + throw TypeError(".cosmos.gov.v1beta1.Proposal.votingStartTime: object expected"); + message.votingStartTime = $root.google.protobuf.Timestamp.fromObject(object.votingStartTime); + } + if (object.votingEndTime != null) { + if (typeof object.votingEndTime !== "object") + throw TypeError(".cosmos.gov.v1beta1.Proposal.votingEndTime: object expected"); + message.votingEndTime = $root.google.protobuf.Timestamp.fromObject(object.votingEndTime); + } + return message; + }; + + /** + * Creates a plain object from a Proposal message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.gov.v1beta1.Proposal + * @static + * @param {cosmos.gov.v1beta1.Proposal} message Proposal + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Proposal.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.totalDeposit = []; + if (options.defaults) { + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.proposalId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.proposalId = options.longs === String ? "0" : 0; + object.content = null; + object.status = options.enums === String ? "PROPOSAL_STATUS_UNSPECIFIED" : 0; + object.finalTallyResult = null; + object.submitTime = null; + object.depositEndTime = null; + object.votingStartTime = null; + object.votingEndTime = null; + } + if (message.proposalId != null && message.hasOwnProperty("proposalId")) + if (typeof message.proposalId === "number") + object.proposalId = options.longs === String ? String(message.proposalId) : message.proposalId; + else + object.proposalId = options.longs === String ? $util.Long.prototype.toString.call(message.proposalId) : options.longs === Number ? new $util.LongBits(message.proposalId.low >>> 0, message.proposalId.high >>> 0).toNumber(true) : message.proposalId; + if (message.content != null && message.hasOwnProperty("content")) + object.content = $root.google.protobuf.Any.toObject(message.content, options); + if (message.status != null && message.hasOwnProperty("status")) + object.status = options.enums === String ? $root.cosmos.gov.v1beta1.ProposalStatus[message.status] : message.status; + if (message.finalTallyResult != null && message.hasOwnProperty("finalTallyResult")) + object.finalTallyResult = $root.cosmos.gov.v1beta1.TallyResult.toObject(message.finalTallyResult, options); + if (message.submitTime != null && message.hasOwnProperty("submitTime")) + object.submitTime = $root.google.protobuf.Timestamp.toObject(message.submitTime, options); + if (message.depositEndTime != null && message.hasOwnProperty("depositEndTime")) + object.depositEndTime = $root.google.protobuf.Timestamp.toObject(message.depositEndTime, options); + if (message.totalDeposit && message.totalDeposit.length) { + object.totalDeposit = []; + for (let j = 0; j < message.totalDeposit.length; ++j) + object.totalDeposit[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.totalDeposit[j], options); + } + if (message.votingStartTime != null && message.hasOwnProperty("votingStartTime")) + object.votingStartTime = $root.google.protobuf.Timestamp.toObject(message.votingStartTime, options); + if (message.votingEndTime != null && message.hasOwnProperty("votingEndTime")) + object.votingEndTime = $root.google.protobuf.Timestamp.toObject(message.votingEndTime, options); + return object; + }; + + /** + * Converts this Proposal to JSON. + * @function toJSON + * @memberof cosmos.gov.v1beta1.Proposal + * @instance + * @returns {Object.} JSON object + */ + Proposal.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Proposal; + })(v1beta1.Proposal || {}); + + /** + * ProposalStatus enum. + * @name cosmos.gov.v1beta1.ProposalStatus + * @enum {string} + * @property {number} PROPOSAL_STATUS_UNSPECIFIED=0 PROPOSAL_STATUS_UNSPECIFIED value + * @property {number} PROPOSAL_STATUS_DEPOSIT_PERIOD=1 PROPOSAL_STATUS_DEPOSIT_PERIOD value + * @property {number} PROPOSAL_STATUS_VOTING_PERIOD=2 PROPOSAL_STATUS_VOTING_PERIOD value + * @property {number} PROPOSAL_STATUS_PASSED=3 PROPOSAL_STATUS_PASSED value + * @property {number} PROPOSAL_STATUS_REJECTED=4 PROPOSAL_STATUS_REJECTED value + * @property {number} PROPOSAL_STATUS_FAILED=5 PROPOSAL_STATUS_FAILED value + */ + v1beta1.ProposalStatus = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PROPOSAL_STATUS_UNSPECIFIED"] = 0; + values[valuesById[1] = "PROPOSAL_STATUS_DEPOSIT_PERIOD"] = 1; + values[valuesById[2] = "PROPOSAL_STATUS_VOTING_PERIOD"] = 2; + values[valuesById[3] = "PROPOSAL_STATUS_PASSED"] = 3; + values[valuesById[4] = "PROPOSAL_STATUS_REJECTED"] = 4; + values[valuesById[5] = "PROPOSAL_STATUS_FAILED"] = 5; + return values; + })(); + + v1beta1.TallyResult = (function(TallyResult) { + + /** + * Properties of a TallyResult. + * @memberof cosmos.gov.v1beta1 + * @interface ITallyResult + * @property {string|null} [yes] TallyResult yes + * @property {string|null} [abstain] TallyResult abstain + * @property {string|null} [no] TallyResult no + * @property {string|null} [noWithVeto] TallyResult noWithVeto + */ + + /** + * Constructs a new TallyResult. + * @memberof cosmos.gov.v1beta1 + * @classdesc Represents a TallyResult. + * @implements ITallyResult + * @constructor + * @param {cosmos.gov.v1beta1.ITallyResult=} [properties] Properties to set + */ + function TallyResult(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TallyResult yes. + * @member {string} yes + * @memberof cosmos.gov.v1beta1.TallyResult + * @instance + */ + TallyResult.prototype.yes = ""; + + /** + * TallyResult abstain. + * @member {string} abstain + * @memberof cosmos.gov.v1beta1.TallyResult + * @instance + */ + TallyResult.prototype.abstain = ""; + + /** + * TallyResult no. + * @member {string} no + * @memberof cosmos.gov.v1beta1.TallyResult + * @instance + */ + TallyResult.prototype.no = ""; + + /** + * TallyResult noWithVeto. + * @member {string} noWithVeto + * @memberof cosmos.gov.v1beta1.TallyResult + * @instance + */ + TallyResult.prototype.noWithVeto = ""; + + /** + * Creates a new TallyResult instance using the specified properties. + * @function create + * @memberof cosmos.gov.v1beta1.TallyResult + * @static + * @param {cosmos.gov.v1beta1.ITallyResult=} [properties] Properties to set + * @returns {cosmos.gov.v1beta1.TallyResult} TallyResult instance + */ + TallyResult.create = function create(properties) { + return new TallyResult(properties); + }; + + /** + * Encodes the specified TallyResult message. Does not implicitly {@link cosmos.gov.v1beta1.TallyResult.verify|verify} messages. + * @function encode + * @memberof cosmos.gov.v1beta1.TallyResult + * @static + * @param {cosmos.gov.v1beta1.ITallyResult} message TallyResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TallyResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.yes != null && Object.hasOwnProperty.call(message, "yes")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.yes); + if (message.abstain != null && Object.hasOwnProperty.call(message, "abstain")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.abstain); + if (message.no != null && Object.hasOwnProperty.call(message, "no")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.no); + if (message.noWithVeto != null && Object.hasOwnProperty.call(message, "noWithVeto")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.noWithVeto); + return writer; + }; + + /** + * Encodes the specified TallyResult message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.TallyResult.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.gov.v1beta1.TallyResult + * @static + * @param {cosmos.gov.v1beta1.ITallyResult} message TallyResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TallyResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TallyResult message from the specified reader or buffer. + * @function decode + * @memberof cosmos.gov.v1beta1.TallyResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.gov.v1beta1.TallyResult} TallyResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TallyResult.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1beta1.TallyResult(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.yes = reader.string(); + break; + case 2: + message.abstain = reader.string(); + break; + case 3: + message.no = reader.string(); + break; + case 4: + message.noWithVeto = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TallyResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.gov.v1beta1.TallyResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.gov.v1beta1.TallyResult} TallyResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TallyResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TallyResult message. + * @function verify + * @memberof cosmos.gov.v1beta1.TallyResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TallyResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.yes != null && message.hasOwnProperty("yes")) + if (!$util.isString(message.yes)) + return "yes: string expected"; + if (message.abstain != null && message.hasOwnProperty("abstain")) + if (!$util.isString(message.abstain)) + return "abstain: string expected"; + if (message.no != null && message.hasOwnProperty("no")) + if (!$util.isString(message.no)) + return "no: string expected"; + if (message.noWithVeto != null && message.hasOwnProperty("noWithVeto")) + if (!$util.isString(message.noWithVeto)) + return "noWithVeto: string expected"; + return null; + }; + + /** + * Creates a TallyResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.gov.v1beta1.TallyResult + * @static + * @param {Object.} object Plain object + * @returns {cosmos.gov.v1beta1.TallyResult} TallyResult + */ + TallyResult.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.gov.v1beta1.TallyResult) + return object; + let message = new $root.cosmos.gov.v1beta1.TallyResult(); + if (object.yes != null) + message.yes = String(object.yes); + if (object.abstain != null) + message.abstain = String(object.abstain); + if (object.no != null) + message.no = String(object.no); + if (object.noWithVeto != null) + message.noWithVeto = String(object.noWithVeto); + return message; + }; + + /** + * Creates a plain object from a TallyResult message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.gov.v1beta1.TallyResult + * @static + * @param {cosmos.gov.v1beta1.TallyResult} message TallyResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TallyResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.yes = ""; + object.abstain = ""; + object.no = ""; + object.noWithVeto = ""; + } + if (message.yes != null && message.hasOwnProperty("yes")) + object.yes = message.yes; + if (message.abstain != null && message.hasOwnProperty("abstain")) + object.abstain = message.abstain; + if (message.no != null && message.hasOwnProperty("no")) + object.no = message.no; + if (message.noWithVeto != null && message.hasOwnProperty("noWithVeto")) + object.noWithVeto = message.noWithVeto; + return object; + }; + + /** + * Converts this TallyResult to JSON. + * @function toJSON + * @memberof cosmos.gov.v1beta1.TallyResult + * @instance + * @returns {Object.} JSON object + */ + TallyResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TallyResult; + })(v1beta1.TallyResult || {}); + + v1beta1.Vote = (function(Vote) { + + /** + * Properties of a Vote. + * @memberof cosmos.gov.v1beta1 + * @interface IVote + * @property {number|Long|null} [proposalId] Vote proposalId + * @property {string|null} [voter] Vote voter + * @property {cosmos.gov.v1beta1.VoteOption|null} [option] Vote option + */ + + /** + * Constructs a new Vote. + * @memberof cosmos.gov.v1beta1 + * @classdesc Represents a Vote. + * @implements IVote + * @constructor + * @param {cosmos.gov.v1beta1.IVote=} [properties] Properties to set + */ + function Vote(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Vote proposalId. + * @member {number|Long} proposalId + * @memberof cosmos.gov.v1beta1.Vote + * @instance + */ + Vote.prototype.proposalId = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Vote voter. + * @member {string} voter + * @memberof cosmos.gov.v1beta1.Vote + * @instance + */ + Vote.prototype.voter = ""; + + /** + * Vote option. + * @member {cosmos.gov.v1beta1.VoteOption} option + * @memberof cosmos.gov.v1beta1.Vote + * @instance + */ + Vote.prototype.option = 0; + + /** + * Creates a new Vote instance using the specified properties. + * @function create + * @memberof cosmos.gov.v1beta1.Vote + * @static + * @param {cosmos.gov.v1beta1.IVote=} [properties] Properties to set + * @returns {cosmos.gov.v1beta1.Vote} Vote instance + */ + Vote.create = function create(properties) { + return new Vote(properties); + }; + + /** + * Encodes the specified Vote message. Does not implicitly {@link cosmos.gov.v1beta1.Vote.verify|verify} messages. + * @function encode + * @memberof cosmos.gov.v1beta1.Vote + * @static + * @param {cosmos.gov.v1beta1.IVote} message Vote message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Vote.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.proposalId != null && Object.hasOwnProperty.call(message, "proposalId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.proposalId); + if (message.voter != null && Object.hasOwnProperty.call(message, "voter")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.voter); + if (message.option != null && Object.hasOwnProperty.call(message, "option")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.option); + return writer; + }; + + /** + * Encodes the specified Vote message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.Vote.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.gov.v1beta1.Vote + * @static + * @param {cosmos.gov.v1beta1.IVote} message Vote message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Vote.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Vote message from the specified reader or buffer. + * @function decode + * @memberof cosmos.gov.v1beta1.Vote + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.gov.v1beta1.Vote} Vote + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Vote.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1beta1.Vote(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.proposalId = reader.uint64(); + break; + case 2: + message.voter = reader.string(); + break; + case 3: + message.option = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Vote message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.gov.v1beta1.Vote + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.gov.v1beta1.Vote} Vote + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Vote.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Vote message. + * @function verify + * @memberof cosmos.gov.v1beta1.Vote + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Vote.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.proposalId != null && message.hasOwnProperty("proposalId")) + if (!$util.isInteger(message.proposalId) && !(message.proposalId && $util.isInteger(message.proposalId.low) && $util.isInteger(message.proposalId.high))) + return "proposalId: integer|Long expected"; + if (message.voter != null && message.hasOwnProperty("voter")) + if (!$util.isString(message.voter)) + return "voter: string expected"; + if (message.option != null && message.hasOwnProperty("option")) + switch (message.option) { + default: + return "option: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + return null; + }; + + /** + * Creates a Vote message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.gov.v1beta1.Vote + * @static + * @param {Object.} object Plain object + * @returns {cosmos.gov.v1beta1.Vote} Vote + */ + Vote.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.gov.v1beta1.Vote) + return object; + let message = new $root.cosmos.gov.v1beta1.Vote(); + if (object.proposalId != null) + if ($util.Long) + (message.proposalId = $util.Long.fromValue(object.proposalId)).unsigned = true; + else if (typeof object.proposalId === "string") + message.proposalId = parseInt(object.proposalId, 10); + else if (typeof object.proposalId === "number") + message.proposalId = object.proposalId; + else if (typeof object.proposalId === "object") + message.proposalId = new $util.LongBits(object.proposalId.low >>> 0, object.proposalId.high >>> 0).toNumber(true); + if (object.voter != null) + message.voter = String(object.voter); + switch (object.option) { + case "VOTE_OPTION_UNSPECIFIED": + case 0: + message.option = 0; + break; + case "VOTE_OPTION_YES": + case 1: + message.option = 1; + break; + case "VOTE_OPTION_ABSTAIN": + case 2: + message.option = 2; + break; + case "VOTE_OPTION_NO": + case 3: + message.option = 3; + break; + case "VOTE_OPTION_NO_WITH_VETO": + case 4: + message.option = 4; + break; + } + return message; + }; + + /** + * Creates a plain object from a Vote message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.gov.v1beta1.Vote + * @static + * @param {cosmos.gov.v1beta1.Vote} message Vote + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Vote.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.proposalId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.proposalId = options.longs === String ? "0" : 0; + object.voter = ""; + object.option = options.enums === String ? "VOTE_OPTION_UNSPECIFIED" : 0; + } + if (message.proposalId != null && message.hasOwnProperty("proposalId")) + if (typeof message.proposalId === "number") + object.proposalId = options.longs === String ? String(message.proposalId) : message.proposalId; + else + object.proposalId = options.longs === String ? $util.Long.prototype.toString.call(message.proposalId) : options.longs === Number ? new $util.LongBits(message.proposalId.low >>> 0, message.proposalId.high >>> 0).toNumber(true) : message.proposalId; + if (message.voter != null && message.hasOwnProperty("voter")) + object.voter = message.voter; + if (message.option != null && message.hasOwnProperty("option")) + object.option = options.enums === String ? $root.cosmos.gov.v1beta1.VoteOption[message.option] : message.option; + return object; + }; + + /** + * Converts this Vote to JSON. + * @function toJSON + * @memberof cosmos.gov.v1beta1.Vote + * @instance + * @returns {Object.} JSON object + */ + Vote.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Vote; + })(v1beta1.Vote || {}); + + v1beta1.DepositParams = (function(DepositParams) { + + /** + * Properties of a DepositParams. + * @memberof cosmos.gov.v1beta1 + * @interface IDepositParams + * @property {Array.|null} [minDeposit] DepositParams minDeposit + * @property {google.protobuf.IDuration|null} [maxDepositPeriod] DepositParams maxDepositPeriod + */ + + /** + * Constructs a new DepositParams. + * @memberof cosmos.gov.v1beta1 + * @classdesc Represents a DepositParams. + * @implements IDepositParams + * @constructor + * @param {cosmos.gov.v1beta1.IDepositParams=} [properties] Properties to set + */ + function DepositParams(properties) { + this.minDeposit = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DepositParams minDeposit. + * @member {Array.} minDeposit + * @memberof cosmos.gov.v1beta1.DepositParams + * @instance + */ + DepositParams.prototype.minDeposit = $util.emptyArray; + + /** + * DepositParams maxDepositPeriod. + * @member {google.protobuf.IDuration|null|undefined} maxDepositPeriod + * @memberof cosmos.gov.v1beta1.DepositParams + * @instance + */ + DepositParams.prototype.maxDepositPeriod = null; + + /** + * Creates a new DepositParams instance using the specified properties. + * @function create + * @memberof cosmos.gov.v1beta1.DepositParams + * @static + * @param {cosmos.gov.v1beta1.IDepositParams=} [properties] Properties to set + * @returns {cosmos.gov.v1beta1.DepositParams} DepositParams instance + */ + DepositParams.create = function create(properties) { + return new DepositParams(properties); + }; + + /** + * Encodes the specified DepositParams message. Does not implicitly {@link cosmos.gov.v1beta1.DepositParams.verify|verify} messages. + * @function encode + * @memberof cosmos.gov.v1beta1.DepositParams + * @static + * @param {cosmos.gov.v1beta1.IDepositParams} message DepositParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DepositParams.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.minDeposit != null && message.minDeposit.length) + for (let i = 0; i < message.minDeposit.length; ++i) + $root.cosmos.base.v1beta1.Coin.encode(message.minDeposit[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.maxDepositPeriod != null && Object.hasOwnProperty.call(message, "maxDepositPeriod")) + $root.google.protobuf.Duration.encode(message.maxDepositPeriod, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DepositParams message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.DepositParams.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.gov.v1beta1.DepositParams + * @static + * @param {cosmos.gov.v1beta1.IDepositParams} message DepositParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DepositParams.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DepositParams message from the specified reader or buffer. + * @function decode + * @memberof cosmos.gov.v1beta1.DepositParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.gov.v1beta1.DepositParams} DepositParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DepositParams.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1beta1.DepositParams(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.minDeposit && message.minDeposit.length)) + message.minDeposit = []; + message.minDeposit.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); + break; + case 2: + message.maxDepositPeriod = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DepositParams message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.gov.v1beta1.DepositParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.gov.v1beta1.DepositParams} DepositParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DepositParams.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DepositParams message. + * @function verify + * @memberof cosmos.gov.v1beta1.DepositParams + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DepositParams.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.minDeposit != null && message.hasOwnProperty("minDeposit")) { + if (!Array.isArray(message.minDeposit)) + return "minDeposit: array expected"; + for (let i = 0; i < message.minDeposit.length; ++i) { + let error = $root.cosmos.base.v1beta1.Coin.verify(message.minDeposit[i]); + if (error) + return "minDeposit." + error; + } + } + if (message.maxDepositPeriod != null && message.hasOwnProperty("maxDepositPeriod")) { + let error = $root.google.protobuf.Duration.verify(message.maxDepositPeriod); + if (error) + return "maxDepositPeriod." + error; + } + return null; + }; + + /** + * Creates a DepositParams message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.gov.v1beta1.DepositParams + * @static + * @param {Object.} object Plain object + * @returns {cosmos.gov.v1beta1.DepositParams} DepositParams + */ + DepositParams.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.gov.v1beta1.DepositParams) + return object; + let message = new $root.cosmos.gov.v1beta1.DepositParams(); + if (object.minDeposit) { + if (!Array.isArray(object.minDeposit)) + throw TypeError(".cosmos.gov.v1beta1.DepositParams.minDeposit: array expected"); + message.minDeposit = []; + for (let i = 0; i < object.minDeposit.length; ++i) { + if (typeof object.minDeposit[i] !== "object") + throw TypeError(".cosmos.gov.v1beta1.DepositParams.minDeposit: object expected"); + message.minDeposit[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.minDeposit[i]); + } + } + if (object.maxDepositPeriod != null) { + if (typeof object.maxDepositPeriod !== "object") + throw TypeError(".cosmos.gov.v1beta1.DepositParams.maxDepositPeriod: object expected"); + message.maxDepositPeriod = $root.google.protobuf.Duration.fromObject(object.maxDepositPeriod); + } + return message; + }; + + /** + * Creates a plain object from a DepositParams message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.gov.v1beta1.DepositParams + * @static + * @param {cosmos.gov.v1beta1.DepositParams} message DepositParams + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DepositParams.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.minDeposit = []; + if (options.defaults) + object.maxDepositPeriod = null; + if (message.minDeposit && message.minDeposit.length) { + object.minDeposit = []; + for (let j = 0; j < message.minDeposit.length; ++j) + object.minDeposit[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.minDeposit[j], options); + } + if (message.maxDepositPeriod != null && message.hasOwnProperty("maxDepositPeriod")) + object.maxDepositPeriod = $root.google.protobuf.Duration.toObject(message.maxDepositPeriod, options); + return object; + }; + + /** + * Converts this DepositParams to JSON. + * @function toJSON + * @memberof cosmos.gov.v1beta1.DepositParams + * @instance + * @returns {Object.} JSON object + */ + DepositParams.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DepositParams; + })(v1beta1.DepositParams || {}); + + v1beta1.VotingParams = (function(VotingParams) { + + /** + * Properties of a VotingParams. + * @memberof cosmos.gov.v1beta1 + * @interface IVotingParams + * @property {google.protobuf.IDuration|null} [votingPeriod] VotingParams votingPeriod + */ + + /** + * Constructs a new VotingParams. + * @memberof cosmos.gov.v1beta1 + * @classdesc Represents a VotingParams. + * @implements IVotingParams + * @constructor + * @param {cosmos.gov.v1beta1.IVotingParams=} [properties] Properties to set + */ + function VotingParams(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * VotingParams votingPeriod. + * @member {google.protobuf.IDuration|null|undefined} votingPeriod + * @memberof cosmos.gov.v1beta1.VotingParams + * @instance + */ + VotingParams.prototype.votingPeriod = null; + + /** + * Creates a new VotingParams instance using the specified properties. + * @function create + * @memberof cosmos.gov.v1beta1.VotingParams + * @static + * @param {cosmos.gov.v1beta1.IVotingParams=} [properties] Properties to set + * @returns {cosmos.gov.v1beta1.VotingParams} VotingParams instance + */ + VotingParams.create = function create(properties) { + return new VotingParams(properties); + }; + + /** + * Encodes the specified VotingParams message. Does not implicitly {@link cosmos.gov.v1beta1.VotingParams.verify|verify} messages. + * @function encode + * @memberof cosmos.gov.v1beta1.VotingParams + * @static + * @param {cosmos.gov.v1beta1.IVotingParams} message VotingParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VotingParams.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.votingPeriod != null && Object.hasOwnProperty.call(message, "votingPeriod")) + $root.google.protobuf.Duration.encode(message.votingPeriod, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified VotingParams message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.VotingParams.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.gov.v1beta1.VotingParams + * @static + * @param {cosmos.gov.v1beta1.IVotingParams} message VotingParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VotingParams.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VotingParams message from the specified reader or buffer. + * @function decode + * @memberof cosmos.gov.v1beta1.VotingParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.gov.v1beta1.VotingParams} VotingParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VotingParams.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1beta1.VotingParams(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.votingPeriod = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VotingParams message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.gov.v1beta1.VotingParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.gov.v1beta1.VotingParams} VotingParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VotingParams.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VotingParams message. + * @function verify + * @memberof cosmos.gov.v1beta1.VotingParams + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VotingParams.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.votingPeriod != null && message.hasOwnProperty("votingPeriod")) { + let error = $root.google.protobuf.Duration.verify(message.votingPeriod); + if (error) + return "votingPeriod." + error; + } + return null; + }; + + /** + * Creates a VotingParams message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.gov.v1beta1.VotingParams + * @static + * @param {Object.} object Plain object + * @returns {cosmos.gov.v1beta1.VotingParams} VotingParams + */ + VotingParams.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.gov.v1beta1.VotingParams) + return object; + let message = new $root.cosmos.gov.v1beta1.VotingParams(); + if (object.votingPeriod != null) { + if (typeof object.votingPeriod !== "object") + throw TypeError(".cosmos.gov.v1beta1.VotingParams.votingPeriod: object expected"); + message.votingPeriod = $root.google.protobuf.Duration.fromObject(object.votingPeriod); + } + return message; + }; + + /** + * Creates a plain object from a VotingParams message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.gov.v1beta1.VotingParams + * @static + * @param {cosmos.gov.v1beta1.VotingParams} message VotingParams + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VotingParams.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.votingPeriod = null; + if (message.votingPeriod != null && message.hasOwnProperty("votingPeriod")) + object.votingPeriod = $root.google.protobuf.Duration.toObject(message.votingPeriod, options); + return object; + }; + + /** + * Converts this VotingParams to JSON. + * @function toJSON + * @memberof cosmos.gov.v1beta1.VotingParams + * @instance + * @returns {Object.} JSON object + */ + VotingParams.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return VotingParams; + })(v1beta1.VotingParams || {}); + + v1beta1.TallyParams = (function(TallyParams) { + + /** + * Properties of a TallyParams. + * @memberof cosmos.gov.v1beta1 + * @interface ITallyParams + * @property {Uint8Array|null} [quorum] TallyParams quorum + * @property {Uint8Array|null} [threshold] TallyParams threshold + * @property {Uint8Array|null} [vetoThreshold] TallyParams vetoThreshold + */ + + /** + * Constructs a new TallyParams. + * @memberof cosmos.gov.v1beta1 + * @classdesc Represents a TallyParams. + * @implements ITallyParams + * @constructor + * @param {cosmos.gov.v1beta1.ITallyParams=} [properties] Properties to set + */ + function TallyParams(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TallyParams quorum. + * @member {Uint8Array} quorum + * @memberof cosmos.gov.v1beta1.TallyParams + * @instance + */ + TallyParams.prototype.quorum = $util.newBuffer([]); + + /** + * TallyParams threshold. + * @member {Uint8Array} threshold + * @memberof cosmos.gov.v1beta1.TallyParams + * @instance + */ + TallyParams.prototype.threshold = $util.newBuffer([]); + + /** + * TallyParams vetoThreshold. + * @member {Uint8Array} vetoThreshold + * @memberof cosmos.gov.v1beta1.TallyParams + * @instance + */ + TallyParams.prototype.vetoThreshold = $util.newBuffer([]); + + /** + * Creates a new TallyParams instance using the specified properties. + * @function create + * @memberof cosmos.gov.v1beta1.TallyParams + * @static + * @param {cosmos.gov.v1beta1.ITallyParams=} [properties] Properties to set + * @returns {cosmos.gov.v1beta1.TallyParams} TallyParams instance + */ + TallyParams.create = function create(properties) { + return new TallyParams(properties); + }; + + /** + * Encodes the specified TallyParams message. Does not implicitly {@link cosmos.gov.v1beta1.TallyParams.verify|verify} messages. + * @function encode + * @memberof cosmos.gov.v1beta1.TallyParams + * @static + * @param {cosmos.gov.v1beta1.ITallyParams} message TallyParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TallyParams.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.quorum != null && Object.hasOwnProperty.call(message, "quorum")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.quorum); + if (message.threshold != null && Object.hasOwnProperty.call(message, "threshold")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.threshold); + if (message.vetoThreshold != null && Object.hasOwnProperty.call(message, "vetoThreshold")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.vetoThreshold); + return writer; + }; + + /** + * Encodes the specified TallyParams message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.TallyParams.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.gov.v1beta1.TallyParams + * @static + * @param {cosmos.gov.v1beta1.ITallyParams} message TallyParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TallyParams.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TallyParams message from the specified reader or buffer. + * @function decode + * @memberof cosmos.gov.v1beta1.TallyParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.gov.v1beta1.TallyParams} TallyParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TallyParams.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1beta1.TallyParams(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.quorum = reader.bytes(); + break; + case 2: + message.threshold = reader.bytes(); + break; + case 3: + message.vetoThreshold = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TallyParams message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.gov.v1beta1.TallyParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.gov.v1beta1.TallyParams} TallyParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TallyParams.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TallyParams message. + * @function verify + * @memberof cosmos.gov.v1beta1.TallyParams + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TallyParams.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.quorum != null && message.hasOwnProperty("quorum")) + if (!(message.quorum && typeof message.quorum.length === "number" || $util.isString(message.quorum))) + return "quorum: buffer expected"; + if (message.threshold != null && message.hasOwnProperty("threshold")) + if (!(message.threshold && typeof message.threshold.length === "number" || $util.isString(message.threshold))) + return "threshold: buffer expected"; + if (message.vetoThreshold != null && message.hasOwnProperty("vetoThreshold")) + if (!(message.vetoThreshold && typeof message.vetoThreshold.length === "number" || $util.isString(message.vetoThreshold))) + return "vetoThreshold: buffer expected"; + return null; + }; + + /** + * Creates a TallyParams message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.gov.v1beta1.TallyParams + * @static + * @param {Object.} object Plain object + * @returns {cosmos.gov.v1beta1.TallyParams} TallyParams + */ + TallyParams.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.gov.v1beta1.TallyParams) + return object; + let message = new $root.cosmos.gov.v1beta1.TallyParams(); + if (object.quorum != null) + if (typeof object.quorum === "string") + $util.base64.decode(object.quorum, message.quorum = $util.newBuffer($util.base64.length(object.quorum)), 0); + else if (object.quorum.length) + message.quorum = object.quorum; + if (object.threshold != null) + if (typeof object.threshold === "string") + $util.base64.decode(object.threshold, message.threshold = $util.newBuffer($util.base64.length(object.threshold)), 0); + else if (object.threshold.length) + message.threshold = object.threshold; + if (object.vetoThreshold != null) + if (typeof object.vetoThreshold === "string") + $util.base64.decode(object.vetoThreshold, message.vetoThreshold = $util.newBuffer($util.base64.length(object.vetoThreshold)), 0); + else if (object.vetoThreshold.length) + message.vetoThreshold = object.vetoThreshold; + return message; + }; + + /** + * Creates a plain object from a TallyParams message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.gov.v1beta1.TallyParams + * @static + * @param {cosmos.gov.v1beta1.TallyParams} message TallyParams + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TallyParams.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + if (options.bytes === String) + object.quorum = ""; + else { + object.quorum = []; + if (options.bytes !== Array) + object.quorum = $util.newBuffer(object.quorum); + } + if (options.bytes === String) + object.threshold = ""; + else { + object.threshold = []; + if (options.bytes !== Array) + object.threshold = $util.newBuffer(object.threshold); + } + if (options.bytes === String) + object.vetoThreshold = ""; + else { + object.vetoThreshold = []; + if (options.bytes !== Array) + object.vetoThreshold = $util.newBuffer(object.vetoThreshold); + } + } + if (message.quorum != null && message.hasOwnProperty("quorum")) + object.quorum = options.bytes === String ? $util.base64.encode(message.quorum, 0, message.quorum.length) : options.bytes === Array ? Array.prototype.slice.call(message.quorum) : message.quorum; + if (message.threshold != null && message.hasOwnProperty("threshold")) + object.threshold = options.bytes === String ? $util.base64.encode(message.threshold, 0, message.threshold.length) : options.bytes === Array ? Array.prototype.slice.call(message.threshold) : message.threshold; + if (message.vetoThreshold != null && message.hasOwnProperty("vetoThreshold")) + object.vetoThreshold = options.bytes === String ? $util.base64.encode(message.vetoThreshold, 0, message.vetoThreshold.length) : options.bytes === Array ? Array.prototype.slice.call(message.vetoThreshold) : message.vetoThreshold; + return object; + }; + + /** + * Converts this TallyParams to JSON. + * @function toJSON + * @memberof cosmos.gov.v1beta1.TallyParams + * @instance + * @returns {Object.} JSON object + */ + TallyParams.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TallyParams; + })(v1beta1.TallyParams || {}); + + v1beta1.Query = (function(Query) { + + /** + * Constructs a new Query service. + * @memberof cosmos.gov.v1beta1 + * @classdesc Represents a Query + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Query(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Query.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Query; + + /** + * Creates new Query service using the specified rpc implementation. + * @function create + * @memberof cosmos.gov.v1beta1.Query + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Query} RPC service. Useful where requests and/or responses are streamed. + */ + Query.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link cosmos.gov.v1beta1.Query#proposal}. + * @memberof cosmos.gov.v1beta1.Query + * @typedef ProposalCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.gov.v1beta1.IQueryProposalResponse} [response] QueryProposalResponse + */ + + /** + * Calls Proposal. + * @function proposal + * @memberof cosmos.gov.v1beta1.Query + * @instance + * @param {cosmos.gov.v1beta1.IQueryProposalRequest} request QueryProposalRequest message or plain object + * @param {cosmos.gov.v1beta1.Query.ProposalCallback} callback Node-style callback called with the error, if any, and QueryProposalResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.proposal = function proposal(request, callback) { + return this.rpcCall(proposal, $root.cosmos.gov.v1beta1.QueryProposalRequest, $root.cosmos.gov.v1beta1.QueryProposalResponse, request, callback); + }, "name", { value: "Proposal" }); + + /** + * Calls Proposal. + * @function proposal + * @memberof cosmos.gov.v1beta1.Query + * @instance + * @param {cosmos.gov.v1beta1.IQueryProposalRequest} request QueryProposalRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link cosmos.gov.v1beta1.Query#proposals}. + * @memberof cosmos.gov.v1beta1.Query + * @typedef ProposalsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.gov.v1beta1.IQueryProposalsResponse} [response] QueryProposalsResponse + */ + + /** + * Calls Proposals. + * @function proposals + * @memberof cosmos.gov.v1beta1.Query + * @instance + * @param {cosmos.gov.v1beta1.IQueryProposalsRequest} request QueryProposalsRequest message or plain object + * @param {cosmos.gov.v1beta1.Query.ProposalsCallback} callback Node-style callback called with the error, if any, and QueryProposalsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.proposals = function proposals(request, callback) { + return this.rpcCall(proposals, $root.cosmos.gov.v1beta1.QueryProposalsRequest, $root.cosmos.gov.v1beta1.QueryProposalsResponse, request, callback); + }, "name", { value: "Proposals" }); + + /** + * Calls Proposals. + * @function proposals + * @memberof cosmos.gov.v1beta1.Query + * @instance + * @param {cosmos.gov.v1beta1.IQueryProposalsRequest} request QueryProposalsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link cosmos.gov.v1beta1.Query#vote}. + * @memberof cosmos.gov.v1beta1.Query + * @typedef VoteCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.gov.v1beta1.IQueryVoteResponse} [response] QueryVoteResponse + */ + + /** + * Calls Vote. + * @function vote + * @memberof cosmos.gov.v1beta1.Query + * @instance + * @param {cosmos.gov.v1beta1.IQueryVoteRequest} request QueryVoteRequest message or plain object + * @param {cosmos.gov.v1beta1.Query.VoteCallback} callback Node-style callback called with the error, if any, and QueryVoteResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.vote = function vote(request, callback) { + return this.rpcCall(vote, $root.cosmos.gov.v1beta1.QueryVoteRequest, $root.cosmos.gov.v1beta1.QueryVoteResponse, request, callback); + }, "name", { value: "Vote" }); + + /** + * Calls Vote. + * @function vote + * @memberof cosmos.gov.v1beta1.Query + * @instance + * @param {cosmos.gov.v1beta1.IQueryVoteRequest} request QueryVoteRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link cosmos.gov.v1beta1.Query#votes}. + * @memberof cosmos.gov.v1beta1.Query + * @typedef VotesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.gov.v1beta1.IQueryVotesResponse} [response] QueryVotesResponse + */ + + /** + * Calls Votes. + * @function votes + * @memberof cosmos.gov.v1beta1.Query + * @instance + * @param {cosmos.gov.v1beta1.IQueryVotesRequest} request QueryVotesRequest message or plain object + * @param {cosmos.gov.v1beta1.Query.VotesCallback} callback Node-style callback called with the error, if any, and QueryVotesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.votes = function votes(request, callback) { + return this.rpcCall(votes, $root.cosmos.gov.v1beta1.QueryVotesRequest, $root.cosmos.gov.v1beta1.QueryVotesResponse, request, callback); + }, "name", { value: "Votes" }); + + /** + * Calls Votes. + * @function votes + * @memberof cosmos.gov.v1beta1.Query + * @instance + * @param {cosmos.gov.v1beta1.IQueryVotesRequest} request QueryVotesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link cosmos.gov.v1beta1.Query#params}. + * @memberof cosmos.gov.v1beta1.Query + * @typedef ParamsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.gov.v1beta1.IQueryParamsResponse} [response] QueryParamsResponse + */ + + /** + * Calls Params. + * @function params + * @memberof cosmos.gov.v1beta1.Query + * @instance + * @param {cosmos.gov.v1beta1.IQueryParamsRequest} request QueryParamsRequest message or plain object + * @param {cosmos.gov.v1beta1.Query.ParamsCallback} callback Node-style callback called with the error, if any, and QueryParamsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.params = function params(request, callback) { + return this.rpcCall(params, $root.cosmos.gov.v1beta1.QueryParamsRequest, $root.cosmos.gov.v1beta1.QueryParamsResponse, request, callback); + }, "name", { value: "Params" }); + + /** + * Calls Params. + * @function params + * @memberof cosmos.gov.v1beta1.Query + * @instance + * @param {cosmos.gov.v1beta1.IQueryParamsRequest} request QueryParamsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link cosmos.gov.v1beta1.Query#deposit}. + * @memberof cosmos.gov.v1beta1.Query + * @typedef DepositCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.gov.v1beta1.IQueryDepositResponse} [response] QueryDepositResponse + */ + + /** + * Calls Deposit. + * @function deposit + * @memberof cosmos.gov.v1beta1.Query + * @instance + * @param {cosmos.gov.v1beta1.IQueryDepositRequest} request QueryDepositRequest message or plain object + * @param {cosmos.gov.v1beta1.Query.DepositCallback} callback Node-style callback called with the error, if any, and QueryDepositResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.deposit = function deposit(request, callback) { + return this.rpcCall(deposit, $root.cosmos.gov.v1beta1.QueryDepositRequest, $root.cosmos.gov.v1beta1.QueryDepositResponse, request, callback); + }, "name", { value: "Deposit" }); + + /** + * Calls Deposit. + * @function deposit + * @memberof cosmos.gov.v1beta1.Query + * @instance + * @param {cosmos.gov.v1beta1.IQueryDepositRequest} request QueryDepositRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link cosmos.gov.v1beta1.Query#deposits}. + * @memberof cosmos.gov.v1beta1.Query + * @typedef DepositsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.gov.v1beta1.IQueryDepositsResponse} [response] QueryDepositsResponse + */ + + /** + * Calls Deposits. + * @function deposits + * @memberof cosmos.gov.v1beta1.Query + * @instance + * @param {cosmos.gov.v1beta1.IQueryDepositsRequest} request QueryDepositsRequest message or plain object + * @param {cosmos.gov.v1beta1.Query.DepositsCallback} callback Node-style callback called with the error, if any, and QueryDepositsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.deposits = function deposits(request, callback) { + return this.rpcCall(deposits, $root.cosmos.gov.v1beta1.QueryDepositsRequest, $root.cosmos.gov.v1beta1.QueryDepositsResponse, request, callback); + }, "name", { value: "Deposits" }); + + /** + * Calls Deposits. + * @function deposits + * @memberof cosmos.gov.v1beta1.Query + * @instance + * @param {cosmos.gov.v1beta1.IQueryDepositsRequest} request QueryDepositsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link cosmos.gov.v1beta1.Query#tallyResult}. + * @memberof cosmos.gov.v1beta1.Query + * @typedef TallyResultCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.gov.v1beta1.IQueryTallyResultResponse} [response] QueryTallyResultResponse + */ + + /** + * Calls TallyResult. + * @function tallyResult + * @memberof cosmos.gov.v1beta1.Query + * @instance + * @param {cosmos.gov.v1beta1.IQueryTallyResultRequest} request QueryTallyResultRequest message or plain object + * @param {cosmos.gov.v1beta1.Query.TallyResultCallback} callback Node-style callback called with the error, if any, and QueryTallyResultResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.tallyResult = function tallyResult(request, callback) { + return this.rpcCall(tallyResult, $root.cosmos.gov.v1beta1.QueryTallyResultRequest, $root.cosmos.gov.v1beta1.QueryTallyResultResponse, request, callback); + }, "name", { value: "TallyResult" }); + + /** + * Calls TallyResult. + * @function tallyResult + * @memberof cosmos.gov.v1beta1.Query + * @instance + * @param {cosmos.gov.v1beta1.IQueryTallyResultRequest} request QueryTallyResultRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Query; + })(v1beta1.Query || {}); + + v1beta1.QueryProposalRequest = (function(QueryProposalRequest) { + + /** + * Properties of a QueryProposalRequest. + * @memberof cosmos.gov.v1beta1 + * @interface IQueryProposalRequest + * @property {number|Long|null} [proposalId] QueryProposalRequest proposalId + */ + + /** + * Constructs a new QueryProposalRequest. + * @memberof cosmos.gov.v1beta1 + * @classdesc Represents a QueryProposalRequest. + * @implements IQueryProposalRequest + * @constructor + * @param {cosmos.gov.v1beta1.IQueryProposalRequest=} [properties] Properties to set + */ + function QueryProposalRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryProposalRequest proposalId. + * @member {number|Long} proposalId + * @memberof cosmos.gov.v1beta1.QueryProposalRequest + * @instance + */ + QueryProposalRequest.prototype.proposalId = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new QueryProposalRequest instance using the specified properties. + * @function create + * @memberof cosmos.gov.v1beta1.QueryProposalRequest + * @static + * @param {cosmos.gov.v1beta1.IQueryProposalRequest=} [properties] Properties to set + * @returns {cosmos.gov.v1beta1.QueryProposalRequest} QueryProposalRequest instance + */ + QueryProposalRequest.create = function create(properties) { + return new QueryProposalRequest(properties); + }; + + /** + * Encodes the specified QueryProposalRequest message. Does not implicitly {@link cosmos.gov.v1beta1.QueryProposalRequest.verify|verify} messages. + * @function encode + * @memberof cosmos.gov.v1beta1.QueryProposalRequest + * @static + * @param {cosmos.gov.v1beta1.IQueryProposalRequest} message QueryProposalRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryProposalRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.proposalId != null && Object.hasOwnProperty.call(message, "proposalId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.proposalId); + return writer; + }; + + /** + * Encodes the specified QueryProposalRequest message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.QueryProposalRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.gov.v1beta1.QueryProposalRequest + * @static + * @param {cosmos.gov.v1beta1.IQueryProposalRequest} message QueryProposalRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryProposalRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryProposalRequest message from the specified reader or buffer. + * @function decode + * @memberof cosmos.gov.v1beta1.QueryProposalRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.gov.v1beta1.QueryProposalRequest} QueryProposalRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryProposalRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1beta1.QueryProposalRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.proposalId = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryProposalRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.gov.v1beta1.QueryProposalRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.gov.v1beta1.QueryProposalRequest} QueryProposalRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryProposalRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryProposalRequest message. + * @function verify + * @memberof cosmos.gov.v1beta1.QueryProposalRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryProposalRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.proposalId != null && message.hasOwnProperty("proposalId")) + if (!$util.isInteger(message.proposalId) && !(message.proposalId && $util.isInteger(message.proposalId.low) && $util.isInteger(message.proposalId.high))) + return "proposalId: integer|Long expected"; + return null; + }; + + /** + * Creates a QueryProposalRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.gov.v1beta1.QueryProposalRequest + * @static + * @param {Object.} object Plain object + * @returns {cosmos.gov.v1beta1.QueryProposalRequest} QueryProposalRequest + */ + QueryProposalRequest.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.gov.v1beta1.QueryProposalRequest) + return object; + let message = new $root.cosmos.gov.v1beta1.QueryProposalRequest(); + if (object.proposalId != null) + if ($util.Long) + (message.proposalId = $util.Long.fromValue(object.proposalId)).unsigned = true; + else if (typeof object.proposalId === "string") + message.proposalId = parseInt(object.proposalId, 10); + else if (typeof object.proposalId === "number") + message.proposalId = object.proposalId; + else if (typeof object.proposalId === "object") + message.proposalId = new $util.LongBits(object.proposalId.low >>> 0, object.proposalId.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a QueryProposalRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.gov.v1beta1.QueryProposalRequest + * @static + * @param {cosmos.gov.v1beta1.QueryProposalRequest} message QueryProposalRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryProposalRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.proposalId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.proposalId = options.longs === String ? "0" : 0; + if (message.proposalId != null && message.hasOwnProperty("proposalId")) + if (typeof message.proposalId === "number") + object.proposalId = options.longs === String ? String(message.proposalId) : message.proposalId; + else + object.proposalId = options.longs === String ? $util.Long.prototype.toString.call(message.proposalId) : options.longs === Number ? new $util.LongBits(message.proposalId.low >>> 0, message.proposalId.high >>> 0).toNumber(true) : message.proposalId; + return object; + }; + + /** + * Converts this QueryProposalRequest to JSON. + * @function toJSON + * @memberof cosmos.gov.v1beta1.QueryProposalRequest + * @instance + * @returns {Object.} JSON object + */ + QueryProposalRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryProposalRequest; + })(v1beta1.QueryProposalRequest || {}); + + v1beta1.QueryProposalResponse = (function(QueryProposalResponse) { + + /** + * Properties of a QueryProposalResponse. + * @memberof cosmos.gov.v1beta1 + * @interface IQueryProposalResponse + * @property {cosmos.gov.v1beta1.IProposal|null} [proposal] QueryProposalResponse proposal + */ + + /** + * Constructs a new QueryProposalResponse. + * @memberof cosmos.gov.v1beta1 + * @classdesc Represents a QueryProposalResponse. + * @implements IQueryProposalResponse + * @constructor + * @param {cosmos.gov.v1beta1.IQueryProposalResponse=} [properties] Properties to set + */ + function QueryProposalResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryProposalResponse proposal. + * @member {cosmos.gov.v1beta1.IProposal|null|undefined} proposal + * @memberof cosmos.gov.v1beta1.QueryProposalResponse + * @instance + */ + QueryProposalResponse.prototype.proposal = null; + + /** + * Creates a new QueryProposalResponse instance using the specified properties. + * @function create + * @memberof cosmos.gov.v1beta1.QueryProposalResponse + * @static + * @param {cosmos.gov.v1beta1.IQueryProposalResponse=} [properties] Properties to set + * @returns {cosmos.gov.v1beta1.QueryProposalResponse} QueryProposalResponse instance + */ + QueryProposalResponse.create = function create(properties) { + return new QueryProposalResponse(properties); + }; + + /** + * Encodes the specified QueryProposalResponse message. Does not implicitly {@link cosmos.gov.v1beta1.QueryProposalResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.gov.v1beta1.QueryProposalResponse + * @static + * @param {cosmos.gov.v1beta1.IQueryProposalResponse} message QueryProposalResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryProposalResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.proposal != null && Object.hasOwnProperty.call(message, "proposal")) + $root.cosmos.gov.v1beta1.Proposal.encode(message.proposal, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryProposalResponse message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.QueryProposalResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.gov.v1beta1.QueryProposalResponse + * @static + * @param {cosmos.gov.v1beta1.IQueryProposalResponse} message QueryProposalResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryProposalResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryProposalResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.gov.v1beta1.QueryProposalResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.gov.v1beta1.QueryProposalResponse} QueryProposalResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryProposalResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1beta1.QueryProposalResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.proposal = $root.cosmos.gov.v1beta1.Proposal.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryProposalResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.gov.v1beta1.QueryProposalResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.gov.v1beta1.QueryProposalResponse} QueryProposalResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryProposalResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryProposalResponse message. + * @function verify + * @memberof cosmos.gov.v1beta1.QueryProposalResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryProposalResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.proposal != null && message.hasOwnProperty("proposal")) { + let error = $root.cosmos.gov.v1beta1.Proposal.verify(message.proposal); + if (error) + return "proposal." + error; + } + return null; + }; + + /** + * Creates a QueryProposalResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.gov.v1beta1.QueryProposalResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.gov.v1beta1.QueryProposalResponse} QueryProposalResponse + */ + QueryProposalResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.gov.v1beta1.QueryProposalResponse) + return object; + let message = new $root.cosmos.gov.v1beta1.QueryProposalResponse(); + if (object.proposal != null) { + if (typeof object.proposal !== "object") + throw TypeError(".cosmos.gov.v1beta1.QueryProposalResponse.proposal: object expected"); + message.proposal = $root.cosmos.gov.v1beta1.Proposal.fromObject(object.proposal); + } + return message; + }; + + /** + * Creates a plain object from a QueryProposalResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.gov.v1beta1.QueryProposalResponse + * @static + * @param {cosmos.gov.v1beta1.QueryProposalResponse} message QueryProposalResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryProposalResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.proposal = null; + if (message.proposal != null && message.hasOwnProperty("proposal")) + object.proposal = $root.cosmos.gov.v1beta1.Proposal.toObject(message.proposal, options); + return object; + }; + + /** + * Converts this QueryProposalResponse to JSON. + * @function toJSON + * @memberof cosmos.gov.v1beta1.QueryProposalResponse + * @instance + * @returns {Object.} JSON object + */ + QueryProposalResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryProposalResponse; + })(v1beta1.QueryProposalResponse || {}); + + v1beta1.QueryProposalsRequest = (function(QueryProposalsRequest) { + + /** + * Properties of a QueryProposalsRequest. + * @memberof cosmos.gov.v1beta1 + * @interface IQueryProposalsRequest + * @property {cosmos.gov.v1beta1.ProposalStatus|null} [proposalStatus] QueryProposalsRequest proposalStatus + * @property {string|null} [voter] QueryProposalsRequest voter + * @property {string|null} [depositor] QueryProposalsRequest depositor + * @property {cosmos.base.query.v1beta1.IPageRequest|null} [pagination] QueryProposalsRequest pagination + */ + + /** + * Constructs a new QueryProposalsRequest. + * @memberof cosmos.gov.v1beta1 + * @classdesc Represents a QueryProposalsRequest. + * @implements IQueryProposalsRequest + * @constructor + * @param {cosmos.gov.v1beta1.IQueryProposalsRequest=} [properties] Properties to set + */ + function QueryProposalsRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryProposalsRequest proposalStatus. + * @member {cosmos.gov.v1beta1.ProposalStatus} proposalStatus + * @memberof cosmos.gov.v1beta1.QueryProposalsRequest + * @instance + */ + QueryProposalsRequest.prototype.proposalStatus = 0; + + /** + * QueryProposalsRequest voter. + * @member {string} voter + * @memberof cosmos.gov.v1beta1.QueryProposalsRequest + * @instance + */ + QueryProposalsRequest.prototype.voter = ""; + + /** + * QueryProposalsRequest depositor. + * @member {string} depositor + * @memberof cosmos.gov.v1beta1.QueryProposalsRequest + * @instance + */ + QueryProposalsRequest.prototype.depositor = ""; + + /** + * QueryProposalsRequest pagination. + * @member {cosmos.base.query.v1beta1.IPageRequest|null|undefined} pagination + * @memberof cosmos.gov.v1beta1.QueryProposalsRequest + * @instance + */ + QueryProposalsRequest.prototype.pagination = null; + + /** + * Creates a new QueryProposalsRequest instance using the specified properties. + * @function create + * @memberof cosmos.gov.v1beta1.QueryProposalsRequest + * @static + * @param {cosmos.gov.v1beta1.IQueryProposalsRequest=} [properties] Properties to set + * @returns {cosmos.gov.v1beta1.QueryProposalsRequest} QueryProposalsRequest instance + */ + QueryProposalsRequest.create = function create(properties) { + return new QueryProposalsRequest(properties); + }; + + /** + * Encodes the specified QueryProposalsRequest message. Does not implicitly {@link cosmos.gov.v1beta1.QueryProposalsRequest.verify|verify} messages. + * @function encode + * @memberof cosmos.gov.v1beta1.QueryProposalsRequest + * @static + * @param {cosmos.gov.v1beta1.IQueryProposalsRequest} message QueryProposalsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryProposalsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.proposalStatus != null && Object.hasOwnProperty.call(message, "proposalStatus")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.proposalStatus); + if (message.voter != null && Object.hasOwnProperty.call(message, "voter")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.voter); + if (message.depositor != null && Object.hasOwnProperty.call(message, "depositor")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.depositor); + if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) + $root.cosmos.base.query.v1beta1.PageRequest.encode(message.pagination, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryProposalsRequest message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.QueryProposalsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.gov.v1beta1.QueryProposalsRequest + * @static + * @param {cosmos.gov.v1beta1.IQueryProposalsRequest} message QueryProposalsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryProposalsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryProposalsRequest message from the specified reader or buffer. + * @function decode + * @memberof cosmos.gov.v1beta1.QueryProposalsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.gov.v1beta1.QueryProposalsRequest} QueryProposalsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryProposalsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1beta1.QueryProposalsRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.proposalStatus = reader.int32(); + break; + case 2: + message.voter = reader.string(); + break; + case 3: + message.depositor = reader.string(); + break; + case 4: + message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryProposalsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.gov.v1beta1.QueryProposalsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.gov.v1beta1.QueryProposalsRequest} QueryProposalsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryProposalsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryProposalsRequest message. + * @function verify + * @memberof cosmos.gov.v1beta1.QueryProposalsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryProposalsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.proposalStatus != null && message.hasOwnProperty("proposalStatus")) + switch (message.proposalStatus) { + default: + return "proposalStatus: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.voter != null && message.hasOwnProperty("voter")) + if (!$util.isString(message.voter)) + return "voter: string expected"; + if (message.depositor != null && message.hasOwnProperty("depositor")) + if (!$util.isString(message.depositor)) + return "depositor: string expected"; + if (message.pagination != null && message.hasOwnProperty("pagination")) { + let error = $root.cosmos.base.query.v1beta1.PageRequest.verify(message.pagination); + if (error) + return "pagination." + error; + } + return null; + }; + + /** + * Creates a QueryProposalsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.gov.v1beta1.QueryProposalsRequest + * @static + * @param {Object.} object Plain object + * @returns {cosmos.gov.v1beta1.QueryProposalsRequest} QueryProposalsRequest + */ + QueryProposalsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.gov.v1beta1.QueryProposalsRequest) + return object; + let message = new $root.cosmos.gov.v1beta1.QueryProposalsRequest(); + switch (object.proposalStatus) { + case "PROPOSAL_STATUS_UNSPECIFIED": + case 0: + message.proposalStatus = 0; + break; + case "PROPOSAL_STATUS_DEPOSIT_PERIOD": + case 1: + message.proposalStatus = 1; + break; + case "PROPOSAL_STATUS_VOTING_PERIOD": + case 2: + message.proposalStatus = 2; + break; + case "PROPOSAL_STATUS_PASSED": + case 3: + message.proposalStatus = 3; + break; + case "PROPOSAL_STATUS_REJECTED": + case 4: + message.proposalStatus = 4; + break; + case "PROPOSAL_STATUS_FAILED": + case 5: + message.proposalStatus = 5; + break; + } + if (object.voter != null) + message.voter = String(object.voter); + if (object.depositor != null) + message.depositor = String(object.depositor); + if (object.pagination != null) { + if (typeof object.pagination !== "object") + throw TypeError(".cosmos.gov.v1beta1.QueryProposalsRequest.pagination: object expected"); + message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.fromObject(object.pagination); + } + return message; + }; + + /** + * Creates a plain object from a QueryProposalsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.gov.v1beta1.QueryProposalsRequest + * @static + * @param {cosmos.gov.v1beta1.QueryProposalsRequest} message QueryProposalsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryProposalsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.proposalStatus = options.enums === String ? "PROPOSAL_STATUS_UNSPECIFIED" : 0; + object.voter = ""; + object.depositor = ""; + object.pagination = null; + } + if (message.proposalStatus != null && message.hasOwnProperty("proposalStatus")) + object.proposalStatus = options.enums === String ? $root.cosmos.gov.v1beta1.ProposalStatus[message.proposalStatus] : message.proposalStatus; + if (message.voter != null && message.hasOwnProperty("voter")) + object.voter = message.voter; + if (message.depositor != null && message.hasOwnProperty("depositor")) + object.depositor = message.depositor; + if (message.pagination != null && message.hasOwnProperty("pagination")) + object.pagination = $root.cosmos.base.query.v1beta1.PageRequest.toObject(message.pagination, options); + return object; + }; + + /** + * Converts this QueryProposalsRequest to JSON. + * @function toJSON + * @memberof cosmos.gov.v1beta1.QueryProposalsRequest + * @instance + * @returns {Object.} JSON object + */ + QueryProposalsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryProposalsRequest; + })(v1beta1.QueryProposalsRequest || {}); + + v1beta1.QueryProposalsResponse = (function(QueryProposalsResponse) { + + /** + * Properties of a QueryProposalsResponse. + * @memberof cosmos.gov.v1beta1 + * @interface IQueryProposalsResponse + * @property {Array.|null} [proposals] QueryProposalsResponse proposals + * @property {cosmos.base.query.v1beta1.IPageResponse|null} [pagination] QueryProposalsResponse pagination + */ + + /** + * Constructs a new QueryProposalsResponse. + * @memberof cosmos.gov.v1beta1 + * @classdesc Represents a QueryProposalsResponse. + * @implements IQueryProposalsResponse + * @constructor + * @param {cosmos.gov.v1beta1.IQueryProposalsResponse=} [properties] Properties to set + */ + function QueryProposalsResponse(properties) { + this.proposals = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryProposalsResponse proposals. + * @member {Array.} proposals + * @memberof cosmos.gov.v1beta1.QueryProposalsResponse + * @instance + */ + QueryProposalsResponse.prototype.proposals = $util.emptyArray; + + /** + * QueryProposalsResponse pagination. + * @member {cosmos.base.query.v1beta1.IPageResponse|null|undefined} pagination + * @memberof cosmos.gov.v1beta1.QueryProposalsResponse + * @instance + */ + QueryProposalsResponse.prototype.pagination = null; + + /** + * Creates a new QueryProposalsResponse instance using the specified properties. + * @function create + * @memberof cosmos.gov.v1beta1.QueryProposalsResponse + * @static + * @param {cosmos.gov.v1beta1.IQueryProposalsResponse=} [properties] Properties to set + * @returns {cosmos.gov.v1beta1.QueryProposalsResponse} QueryProposalsResponse instance + */ + QueryProposalsResponse.create = function create(properties) { + return new QueryProposalsResponse(properties); + }; + + /** + * Encodes the specified QueryProposalsResponse message. Does not implicitly {@link cosmos.gov.v1beta1.QueryProposalsResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.gov.v1beta1.QueryProposalsResponse + * @static + * @param {cosmos.gov.v1beta1.IQueryProposalsResponse} message QueryProposalsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryProposalsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.proposals != null && message.proposals.length) + for (let i = 0; i < message.proposals.length; ++i) + $root.cosmos.gov.v1beta1.Proposal.encode(message.proposals[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) + $root.cosmos.base.query.v1beta1.PageResponse.encode(message.pagination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryProposalsResponse message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.QueryProposalsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.gov.v1beta1.QueryProposalsResponse + * @static + * @param {cosmos.gov.v1beta1.IQueryProposalsResponse} message QueryProposalsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryProposalsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryProposalsResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.gov.v1beta1.QueryProposalsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.gov.v1beta1.QueryProposalsResponse} QueryProposalsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryProposalsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1beta1.QueryProposalsResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.proposals && message.proposals.length)) + message.proposals = []; + message.proposals.push($root.cosmos.gov.v1beta1.Proposal.decode(reader, reader.uint32())); + break; + case 2: + message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryProposalsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.gov.v1beta1.QueryProposalsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.gov.v1beta1.QueryProposalsResponse} QueryProposalsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryProposalsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryProposalsResponse message. + * @function verify + * @memberof cosmos.gov.v1beta1.QueryProposalsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryProposalsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.proposals != null && message.hasOwnProperty("proposals")) { + if (!Array.isArray(message.proposals)) + return "proposals: array expected"; + for (let i = 0; i < message.proposals.length; ++i) { + let error = $root.cosmos.gov.v1beta1.Proposal.verify(message.proposals[i]); + if (error) + return "proposals." + error; + } + } + if (message.pagination != null && message.hasOwnProperty("pagination")) { + let error = $root.cosmos.base.query.v1beta1.PageResponse.verify(message.pagination); + if (error) + return "pagination." + error; + } + return null; + }; + + /** + * Creates a QueryProposalsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.gov.v1beta1.QueryProposalsResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.gov.v1beta1.QueryProposalsResponse} QueryProposalsResponse + */ + QueryProposalsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.gov.v1beta1.QueryProposalsResponse) + return object; + let message = new $root.cosmos.gov.v1beta1.QueryProposalsResponse(); + if (object.proposals) { + if (!Array.isArray(object.proposals)) + throw TypeError(".cosmos.gov.v1beta1.QueryProposalsResponse.proposals: array expected"); + message.proposals = []; + for (let i = 0; i < object.proposals.length; ++i) { + if (typeof object.proposals[i] !== "object") + throw TypeError(".cosmos.gov.v1beta1.QueryProposalsResponse.proposals: object expected"); + message.proposals[i] = $root.cosmos.gov.v1beta1.Proposal.fromObject(object.proposals[i]); + } + } + if (object.pagination != null) { + if (typeof object.pagination !== "object") + throw TypeError(".cosmos.gov.v1beta1.QueryProposalsResponse.pagination: object expected"); + message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.fromObject(object.pagination); + } + return message; + }; + + /** + * Creates a plain object from a QueryProposalsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.gov.v1beta1.QueryProposalsResponse + * @static + * @param {cosmos.gov.v1beta1.QueryProposalsResponse} message QueryProposalsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryProposalsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.proposals = []; + if (options.defaults) + object.pagination = null; + if (message.proposals && message.proposals.length) { + object.proposals = []; + for (let j = 0; j < message.proposals.length; ++j) + object.proposals[j] = $root.cosmos.gov.v1beta1.Proposal.toObject(message.proposals[j], options); + } + if (message.pagination != null && message.hasOwnProperty("pagination")) + object.pagination = $root.cosmos.base.query.v1beta1.PageResponse.toObject(message.pagination, options); + return object; + }; + + /** + * Converts this QueryProposalsResponse to JSON. + * @function toJSON + * @memberof cosmos.gov.v1beta1.QueryProposalsResponse + * @instance + * @returns {Object.} JSON object + */ + QueryProposalsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryProposalsResponse; + })(v1beta1.QueryProposalsResponse || {}); + + v1beta1.QueryVoteRequest = (function(QueryVoteRequest) { + + /** + * Properties of a QueryVoteRequest. + * @memberof cosmos.gov.v1beta1 + * @interface IQueryVoteRequest + * @property {number|Long|null} [proposalId] QueryVoteRequest proposalId + * @property {string|null} [voter] QueryVoteRequest voter + */ + + /** + * Constructs a new QueryVoteRequest. + * @memberof cosmos.gov.v1beta1 + * @classdesc Represents a QueryVoteRequest. + * @implements IQueryVoteRequest + * @constructor + * @param {cosmos.gov.v1beta1.IQueryVoteRequest=} [properties] Properties to set + */ + function QueryVoteRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryVoteRequest proposalId. + * @member {number|Long} proposalId + * @memberof cosmos.gov.v1beta1.QueryVoteRequest + * @instance + */ + QueryVoteRequest.prototype.proposalId = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * QueryVoteRequest voter. + * @member {string} voter + * @memberof cosmos.gov.v1beta1.QueryVoteRequest + * @instance + */ + QueryVoteRequest.prototype.voter = ""; + + /** + * Creates a new QueryVoteRequest instance using the specified properties. + * @function create + * @memberof cosmos.gov.v1beta1.QueryVoteRequest + * @static + * @param {cosmos.gov.v1beta1.IQueryVoteRequest=} [properties] Properties to set + * @returns {cosmos.gov.v1beta1.QueryVoteRequest} QueryVoteRequest instance + */ + QueryVoteRequest.create = function create(properties) { + return new QueryVoteRequest(properties); + }; + + /** + * Encodes the specified QueryVoteRequest message. Does not implicitly {@link cosmos.gov.v1beta1.QueryVoteRequest.verify|verify} messages. + * @function encode + * @memberof cosmos.gov.v1beta1.QueryVoteRequest + * @static + * @param {cosmos.gov.v1beta1.IQueryVoteRequest} message QueryVoteRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryVoteRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.proposalId != null && Object.hasOwnProperty.call(message, "proposalId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.proposalId); + if (message.voter != null && Object.hasOwnProperty.call(message, "voter")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.voter); + return writer; + }; + + /** + * Encodes the specified QueryVoteRequest message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.QueryVoteRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.gov.v1beta1.QueryVoteRequest + * @static + * @param {cosmos.gov.v1beta1.IQueryVoteRequest} message QueryVoteRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryVoteRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryVoteRequest message from the specified reader or buffer. + * @function decode + * @memberof cosmos.gov.v1beta1.QueryVoteRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.gov.v1beta1.QueryVoteRequest} QueryVoteRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryVoteRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1beta1.QueryVoteRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.proposalId = reader.uint64(); + break; + case 2: + message.voter = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryVoteRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.gov.v1beta1.QueryVoteRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.gov.v1beta1.QueryVoteRequest} QueryVoteRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryVoteRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryVoteRequest message. + * @function verify + * @memberof cosmos.gov.v1beta1.QueryVoteRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryVoteRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.proposalId != null && message.hasOwnProperty("proposalId")) + if (!$util.isInteger(message.proposalId) && !(message.proposalId && $util.isInteger(message.proposalId.low) && $util.isInteger(message.proposalId.high))) + return "proposalId: integer|Long expected"; + if (message.voter != null && message.hasOwnProperty("voter")) + if (!$util.isString(message.voter)) + return "voter: string expected"; + return null; + }; + + /** + * Creates a QueryVoteRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.gov.v1beta1.QueryVoteRequest + * @static + * @param {Object.} object Plain object + * @returns {cosmos.gov.v1beta1.QueryVoteRequest} QueryVoteRequest + */ + QueryVoteRequest.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.gov.v1beta1.QueryVoteRequest) + return object; + let message = new $root.cosmos.gov.v1beta1.QueryVoteRequest(); + if (object.proposalId != null) + if ($util.Long) + (message.proposalId = $util.Long.fromValue(object.proposalId)).unsigned = true; + else if (typeof object.proposalId === "string") + message.proposalId = parseInt(object.proposalId, 10); + else if (typeof object.proposalId === "number") + message.proposalId = object.proposalId; + else if (typeof object.proposalId === "object") + message.proposalId = new $util.LongBits(object.proposalId.low >>> 0, object.proposalId.high >>> 0).toNumber(true); + if (object.voter != null) + message.voter = String(object.voter); + return message; + }; + + /** + * Creates a plain object from a QueryVoteRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.gov.v1beta1.QueryVoteRequest + * @static + * @param {cosmos.gov.v1beta1.QueryVoteRequest} message QueryVoteRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryVoteRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.proposalId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.proposalId = options.longs === String ? "0" : 0; + object.voter = ""; + } + if (message.proposalId != null && message.hasOwnProperty("proposalId")) + if (typeof message.proposalId === "number") + object.proposalId = options.longs === String ? String(message.proposalId) : message.proposalId; + else + object.proposalId = options.longs === String ? $util.Long.prototype.toString.call(message.proposalId) : options.longs === Number ? new $util.LongBits(message.proposalId.low >>> 0, message.proposalId.high >>> 0).toNumber(true) : message.proposalId; + if (message.voter != null && message.hasOwnProperty("voter")) + object.voter = message.voter; + return object; + }; + + /** + * Converts this QueryVoteRequest to JSON. + * @function toJSON + * @memberof cosmos.gov.v1beta1.QueryVoteRequest + * @instance + * @returns {Object.} JSON object + */ + QueryVoteRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryVoteRequest; + })(v1beta1.QueryVoteRequest || {}); + + v1beta1.QueryVoteResponse = (function(QueryVoteResponse) { + + /** + * Properties of a QueryVoteResponse. + * @memberof cosmos.gov.v1beta1 + * @interface IQueryVoteResponse + * @property {cosmos.gov.v1beta1.IVote|null} [vote] QueryVoteResponse vote + */ + + /** + * Constructs a new QueryVoteResponse. + * @memberof cosmos.gov.v1beta1 + * @classdesc Represents a QueryVoteResponse. + * @implements IQueryVoteResponse + * @constructor + * @param {cosmos.gov.v1beta1.IQueryVoteResponse=} [properties] Properties to set + */ + function QueryVoteResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryVoteResponse vote. + * @member {cosmos.gov.v1beta1.IVote|null|undefined} vote + * @memberof cosmos.gov.v1beta1.QueryVoteResponse + * @instance + */ + QueryVoteResponse.prototype.vote = null; + + /** + * Creates a new QueryVoteResponse instance using the specified properties. + * @function create + * @memberof cosmos.gov.v1beta1.QueryVoteResponse + * @static + * @param {cosmos.gov.v1beta1.IQueryVoteResponse=} [properties] Properties to set + * @returns {cosmos.gov.v1beta1.QueryVoteResponse} QueryVoteResponse instance + */ + QueryVoteResponse.create = function create(properties) { + return new QueryVoteResponse(properties); + }; + + /** + * Encodes the specified QueryVoteResponse message. Does not implicitly {@link cosmos.gov.v1beta1.QueryVoteResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.gov.v1beta1.QueryVoteResponse + * @static + * @param {cosmos.gov.v1beta1.IQueryVoteResponse} message QueryVoteResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryVoteResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.vote != null && Object.hasOwnProperty.call(message, "vote")) + $root.cosmos.gov.v1beta1.Vote.encode(message.vote, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryVoteResponse message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.QueryVoteResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.gov.v1beta1.QueryVoteResponse + * @static + * @param {cosmos.gov.v1beta1.IQueryVoteResponse} message QueryVoteResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryVoteResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryVoteResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.gov.v1beta1.QueryVoteResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.gov.v1beta1.QueryVoteResponse} QueryVoteResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryVoteResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1beta1.QueryVoteResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.vote = $root.cosmos.gov.v1beta1.Vote.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryVoteResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.gov.v1beta1.QueryVoteResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.gov.v1beta1.QueryVoteResponse} QueryVoteResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryVoteResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryVoteResponse message. + * @function verify + * @memberof cosmos.gov.v1beta1.QueryVoteResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryVoteResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.vote != null && message.hasOwnProperty("vote")) { + let error = $root.cosmos.gov.v1beta1.Vote.verify(message.vote); + if (error) + return "vote." + error; + } + return null; + }; + + /** + * Creates a QueryVoteResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.gov.v1beta1.QueryVoteResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.gov.v1beta1.QueryVoteResponse} QueryVoteResponse + */ + QueryVoteResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.gov.v1beta1.QueryVoteResponse) + return object; + let message = new $root.cosmos.gov.v1beta1.QueryVoteResponse(); + if (object.vote != null) { + if (typeof object.vote !== "object") + throw TypeError(".cosmos.gov.v1beta1.QueryVoteResponse.vote: object expected"); + message.vote = $root.cosmos.gov.v1beta1.Vote.fromObject(object.vote); + } + return message; + }; + + /** + * Creates a plain object from a QueryVoteResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.gov.v1beta1.QueryVoteResponse + * @static + * @param {cosmos.gov.v1beta1.QueryVoteResponse} message QueryVoteResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryVoteResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.vote = null; + if (message.vote != null && message.hasOwnProperty("vote")) + object.vote = $root.cosmos.gov.v1beta1.Vote.toObject(message.vote, options); + return object; + }; + + /** + * Converts this QueryVoteResponse to JSON. + * @function toJSON + * @memberof cosmos.gov.v1beta1.QueryVoteResponse + * @instance + * @returns {Object.} JSON object + */ + QueryVoteResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryVoteResponse; + })(v1beta1.QueryVoteResponse || {}); + + v1beta1.QueryVotesRequest = (function(QueryVotesRequest) { + + /** + * Properties of a QueryVotesRequest. + * @memberof cosmos.gov.v1beta1 + * @interface IQueryVotesRequest + * @property {number|Long|null} [proposalId] QueryVotesRequest proposalId + * @property {cosmos.base.query.v1beta1.IPageRequest|null} [pagination] QueryVotesRequest pagination + */ + + /** + * Constructs a new QueryVotesRequest. + * @memberof cosmos.gov.v1beta1 + * @classdesc Represents a QueryVotesRequest. + * @implements IQueryVotesRequest + * @constructor + * @param {cosmos.gov.v1beta1.IQueryVotesRequest=} [properties] Properties to set + */ + function QueryVotesRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryVotesRequest proposalId. + * @member {number|Long} proposalId + * @memberof cosmos.gov.v1beta1.QueryVotesRequest + * @instance + */ + QueryVotesRequest.prototype.proposalId = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * QueryVotesRequest pagination. + * @member {cosmos.base.query.v1beta1.IPageRequest|null|undefined} pagination + * @memberof cosmos.gov.v1beta1.QueryVotesRequest + * @instance + */ + QueryVotesRequest.prototype.pagination = null; + + /** + * Creates a new QueryVotesRequest instance using the specified properties. + * @function create + * @memberof cosmos.gov.v1beta1.QueryVotesRequest + * @static + * @param {cosmos.gov.v1beta1.IQueryVotesRequest=} [properties] Properties to set + * @returns {cosmos.gov.v1beta1.QueryVotesRequest} QueryVotesRequest instance + */ + QueryVotesRequest.create = function create(properties) { + return new QueryVotesRequest(properties); + }; + + /** + * Encodes the specified QueryVotesRequest message. Does not implicitly {@link cosmos.gov.v1beta1.QueryVotesRequest.verify|verify} messages. + * @function encode + * @memberof cosmos.gov.v1beta1.QueryVotesRequest + * @static + * @param {cosmos.gov.v1beta1.IQueryVotesRequest} message QueryVotesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryVotesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.proposalId != null && Object.hasOwnProperty.call(message, "proposalId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.proposalId); + if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) + $root.cosmos.base.query.v1beta1.PageRequest.encode(message.pagination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryVotesRequest message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.QueryVotesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.gov.v1beta1.QueryVotesRequest + * @static + * @param {cosmos.gov.v1beta1.IQueryVotesRequest} message QueryVotesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryVotesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryVotesRequest message from the specified reader or buffer. + * @function decode + * @memberof cosmos.gov.v1beta1.QueryVotesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.gov.v1beta1.QueryVotesRequest} QueryVotesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryVotesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1beta1.QueryVotesRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.proposalId = reader.uint64(); + break; + case 2: + message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryVotesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.gov.v1beta1.QueryVotesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.gov.v1beta1.QueryVotesRequest} QueryVotesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryVotesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryVotesRequest message. + * @function verify + * @memberof cosmos.gov.v1beta1.QueryVotesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryVotesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.proposalId != null && message.hasOwnProperty("proposalId")) + if (!$util.isInteger(message.proposalId) && !(message.proposalId && $util.isInteger(message.proposalId.low) && $util.isInteger(message.proposalId.high))) + return "proposalId: integer|Long expected"; + if (message.pagination != null && message.hasOwnProperty("pagination")) { + let error = $root.cosmos.base.query.v1beta1.PageRequest.verify(message.pagination); + if (error) + return "pagination." + error; + } + return null; + }; + + /** + * Creates a QueryVotesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.gov.v1beta1.QueryVotesRequest + * @static + * @param {Object.} object Plain object + * @returns {cosmos.gov.v1beta1.QueryVotesRequest} QueryVotesRequest + */ + QueryVotesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.gov.v1beta1.QueryVotesRequest) + return object; + let message = new $root.cosmos.gov.v1beta1.QueryVotesRequest(); + if (object.proposalId != null) + if ($util.Long) + (message.proposalId = $util.Long.fromValue(object.proposalId)).unsigned = true; + else if (typeof object.proposalId === "string") + message.proposalId = parseInt(object.proposalId, 10); + else if (typeof object.proposalId === "number") + message.proposalId = object.proposalId; + else if (typeof object.proposalId === "object") + message.proposalId = new $util.LongBits(object.proposalId.low >>> 0, object.proposalId.high >>> 0).toNumber(true); + if (object.pagination != null) { + if (typeof object.pagination !== "object") + throw TypeError(".cosmos.gov.v1beta1.QueryVotesRequest.pagination: object expected"); + message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.fromObject(object.pagination); + } + return message; + }; + + /** + * Creates a plain object from a QueryVotesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.gov.v1beta1.QueryVotesRequest + * @static + * @param {cosmos.gov.v1beta1.QueryVotesRequest} message QueryVotesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryVotesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.proposalId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.proposalId = options.longs === String ? "0" : 0; + object.pagination = null; + } + if (message.proposalId != null && message.hasOwnProperty("proposalId")) + if (typeof message.proposalId === "number") + object.proposalId = options.longs === String ? String(message.proposalId) : message.proposalId; + else + object.proposalId = options.longs === String ? $util.Long.prototype.toString.call(message.proposalId) : options.longs === Number ? new $util.LongBits(message.proposalId.low >>> 0, message.proposalId.high >>> 0).toNumber(true) : message.proposalId; + if (message.pagination != null && message.hasOwnProperty("pagination")) + object.pagination = $root.cosmos.base.query.v1beta1.PageRequest.toObject(message.pagination, options); + return object; + }; + + /** + * Converts this QueryVotesRequest to JSON. + * @function toJSON + * @memberof cosmos.gov.v1beta1.QueryVotesRequest + * @instance + * @returns {Object.} JSON object + */ + QueryVotesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryVotesRequest; + })(v1beta1.QueryVotesRequest || {}); + + v1beta1.QueryVotesResponse = (function(QueryVotesResponse) { + + /** + * Properties of a QueryVotesResponse. + * @memberof cosmos.gov.v1beta1 + * @interface IQueryVotesResponse + * @property {Array.|null} [votes] QueryVotesResponse votes + * @property {cosmos.base.query.v1beta1.IPageResponse|null} [pagination] QueryVotesResponse pagination + */ + + /** + * Constructs a new QueryVotesResponse. + * @memberof cosmos.gov.v1beta1 + * @classdesc Represents a QueryVotesResponse. + * @implements IQueryVotesResponse + * @constructor + * @param {cosmos.gov.v1beta1.IQueryVotesResponse=} [properties] Properties to set + */ + function QueryVotesResponse(properties) { + this.votes = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryVotesResponse votes. + * @member {Array.} votes + * @memberof cosmos.gov.v1beta1.QueryVotesResponse + * @instance + */ + QueryVotesResponse.prototype.votes = $util.emptyArray; + + /** + * QueryVotesResponse pagination. + * @member {cosmos.base.query.v1beta1.IPageResponse|null|undefined} pagination + * @memberof cosmos.gov.v1beta1.QueryVotesResponse + * @instance + */ + QueryVotesResponse.prototype.pagination = null; + + /** + * Creates a new QueryVotesResponse instance using the specified properties. + * @function create + * @memberof cosmos.gov.v1beta1.QueryVotesResponse + * @static + * @param {cosmos.gov.v1beta1.IQueryVotesResponse=} [properties] Properties to set + * @returns {cosmos.gov.v1beta1.QueryVotesResponse} QueryVotesResponse instance + */ + QueryVotesResponse.create = function create(properties) { + return new QueryVotesResponse(properties); + }; + + /** + * Encodes the specified QueryVotesResponse message. Does not implicitly {@link cosmos.gov.v1beta1.QueryVotesResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.gov.v1beta1.QueryVotesResponse + * @static + * @param {cosmos.gov.v1beta1.IQueryVotesResponse} message QueryVotesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryVotesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.votes != null && message.votes.length) + for (let i = 0; i < message.votes.length; ++i) + $root.cosmos.gov.v1beta1.Vote.encode(message.votes[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) + $root.cosmos.base.query.v1beta1.PageResponse.encode(message.pagination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryVotesResponse message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.QueryVotesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.gov.v1beta1.QueryVotesResponse + * @static + * @param {cosmos.gov.v1beta1.IQueryVotesResponse} message QueryVotesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryVotesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryVotesResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.gov.v1beta1.QueryVotesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.gov.v1beta1.QueryVotesResponse} QueryVotesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryVotesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1beta1.QueryVotesResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.votes && message.votes.length)) + message.votes = []; + message.votes.push($root.cosmos.gov.v1beta1.Vote.decode(reader, reader.uint32())); + break; + case 2: + message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryVotesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.gov.v1beta1.QueryVotesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.gov.v1beta1.QueryVotesResponse} QueryVotesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryVotesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryVotesResponse message. + * @function verify + * @memberof cosmos.gov.v1beta1.QueryVotesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryVotesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.votes != null && message.hasOwnProperty("votes")) { + if (!Array.isArray(message.votes)) + return "votes: array expected"; + for (let i = 0; i < message.votes.length; ++i) { + let error = $root.cosmos.gov.v1beta1.Vote.verify(message.votes[i]); + if (error) + return "votes." + error; + } + } + if (message.pagination != null && message.hasOwnProperty("pagination")) { + let error = $root.cosmos.base.query.v1beta1.PageResponse.verify(message.pagination); + if (error) + return "pagination." + error; + } + return null; + }; + + /** + * Creates a QueryVotesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.gov.v1beta1.QueryVotesResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.gov.v1beta1.QueryVotesResponse} QueryVotesResponse + */ + QueryVotesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.gov.v1beta1.QueryVotesResponse) + return object; + let message = new $root.cosmos.gov.v1beta1.QueryVotesResponse(); + if (object.votes) { + if (!Array.isArray(object.votes)) + throw TypeError(".cosmos.gov.v1beta1.QueryVotesResponse.votes: array expected"); + message.votes = []; + for (let i = 0; i < object.votes.length; ++i) { + if (typeof object.votes[i] !== "object") + throw TypeError(".cosmos.gov.v1beta1.QueryVotesResponse.votes: object expected"); + message.votes[i] = $root.cosmos.gov.v1beta1.Vote.fromObject(object.votes[i]); + } + } + if (object.pagination != null) { + if (typeof object.pagination !== "object") + throw TypeError(".cosmos.gov.v1beta1.QueryVotesResponse.pagination: object expected"); + message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.fromObject(object.pagination); + } + return message; + }; + + /** + * Creates a plain object from a QueryVotesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.gov.v1beta1.QueryVotesResponse + * @static + * @param {cosmos.gov.v1beta1.QueryVotesResponse} message QueryVotesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryVotesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.votes = []; + if (options.defaults) + object.pagination = null; + if (message.votes && message.votes.length) { + object.votes = []; + for (let j = 0; j < message.votes.length; ++j) + object.votes[j] = $root.cosmos.gov.v1beta1.Vote.toObject(message.votes[j], options); + } + if (message.pagination != null && message.hasOwnProperty("pagination")) + object.pagination = $root.cosmos.base.query.v1beta1.PageResponse.toObject(message.pagination, options); + return object; + }; + + /** + * Converts this QueryVotesResponse to JSON. + * @function toJSON + * @memberof cosmos.gov.v1beta1.QueryVotesResponse + * @instance + * @returns {Object.} JSON object + */ + QueryVotesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryVotesResponse; + })(v1beta1.QueryVotesResponse || {}); + + v1beta1.QueryParamsRequest = (function(QueryParamsRequest) { + + /** + * Properties of a QueryParamsRequest. + * @memberof cosmos.gov.v1beta1 + * @interface IQueryParamsRequest + * @property {string|null} [paramsType] QueryParamsRequest paramsType + */ + + /** + * Constructs a new QueryParamsRequest. + * @memberof cosmos.gov.v1beta1 + * @classdesc Represents a QueryParamsRequest. + * @implements IQueryParamsRequest + * @constructor + * @param {cosmos.gov.v1beta1.IQueryParamsRequest=} [properties] Properties to set + */ + function QueryParamsRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryParamsRequest paramsType. + * @member {string} paramsType + * @memberof cosmos.gov.v1beta1.QueryParamsRequest + * @instance + */ + QueryParamsRequest.prototype.paramsType = ""; + + /** + * Creates a new QueryParamsRequest instance using the specified properties. + * @function create + * @memberof cosmos.gov.v1beta1.QueryParamsRequest + * @static + * @param {cosmos.gov.v1beta1.IQueryParamsRequest=} [properties] Properties to set + * @returns {cosmos.gov.v1beta1.QueryParamsRequest} QueryParamsRequest instance + */ + QueryParamsRequest.create = function create(properties) { + return new QueryParamsRequest(properties); + }; + + /** + * Encodes the specified QueryParamsRequest message. Does not implicitly {@link cosmos.gov.v1beta1.QueryParamsRequest.verify|verify} messages. + * @function encode + * @memberof cosmos.gov.v1beta1.QueryParamsRequest + * @static + * @param {cosmos.gov.v1beta1.IQueryParamsRequest} message QueryParamsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryParamsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.paramsType != null && Object.hasOwnProperty.call(message, "paramsType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.paramsType); + return writer; + }; + + /** + * Encodes the specified QueryParamsRequest message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.QueryParamsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.gov.v1beta1.QueryParamsRequest + * @static + * @param {cosmos.gov.v1beta1.IQueryParamsRequest} message QueryParamsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryParamsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryParamsRequest message from the specified reader or buffer. + * @function decode + * @memberof cosmos.gov.v1beta1.QueryParamsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.gov.v1beta1.QueryParamsRequest} QueryParamsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryParamsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1beta1.QueryParamsRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.paramsType = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryParamsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.gov.v1beta1.QueryParamsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.gov.v1beta1.QueryParamsRequest} QueryParamsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryParamsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryParamsRequest message. + * @function verify + * @memberof cosmos.gov.v1beta1.QueryParamsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryParamsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.paramsType != null && message.hasOwnProperty("paramsType")) + if (!$util.isString(message.paramsType)) + return "paramsType: string expected"; + return null; + }; + + /** + * Creates a QueryParamsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.gov.v1beta1.QueryParamsRequest + * @static + * @param {Object.} object Plain object + * @returns {cosmos.gov.v1beta1.QueryParamsRequest} QueryParamsRequest + */ + QueryParamsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.gov.v1beta1.QueryParamsRequest) + return object; + let message = new $root.cosmos.gov.v1beta1.QueryParamsRequest(); + if (object.paramsType != null) + message.paramsType = String(object.paramsType); + return message; + }; + + /** + * Creates a plain object from a QueryParamsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.gov.v1beta1.QueryParamsRequest + * @static + * @param {cosmos.gov.v1beta1.QueryParamsRequest} message QueryParamsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryParamsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.paramsType = ""; + if (message.paramsType != null && message.hasOwnProperty("paramsType")) + object.paramsType = message.paramsType; + return object; + }; + + /** + * Converts this QueryParamsRequest to JSON. + * @function toJSON + * @memberof cosmos.gov.v1beta1.QueryParamsRequest + * @instance + * @returns {Object.} JSON object + */ + QueryParamsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryParamsRequest; + })(v1beta1.QueryParamsRequest || {}); + + v1beta1.QueryParamsResponse = (function(QueryParamsResponse) { + + /** + * Properties of a QueryParamsResponse. + * @memberof cosmos.gov.v1beta1 + * @interface IQueryParamsResponse + * @property {cosmos.gov.v1beta1.IVotingParams|null} [votingParams] QueryParamsResponse votingParams + * @property {cosmos.gov.v1beta1.IDepositParams|null} [depositParams] QueryParamsResponse depositParams + * @property {cosmos.gov.v1beta1.ITallyParams|null} [tallyParams] QueryParamsResponse tallyParams + */ + + /** + * Constructs a new QueryParamsResponse. + * @memberof cosmos.gov.v1beta1 + * @classdesc Represents a QueryParamsResponse. + * @implements IQueryParamsResponse + * @constructor + * @param {cosmos.gov.v1beta1.IQueryParamsResponse=} [properties] Properties to set + */ + function QueryParamsResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryParamsResponse votingParams. + * @member {cosmos.gov.v1beta1.IVotingParams|null|undefined} votingParams + * @memberof cosmos.gov.v1beta1.QueryParamsResponse + * @instance + */ + QueryParamsResponse.prototype.votingParams = null; + + /** + * QueryParamsResponse depositParams. + * @member {cosmos.gov.v1beta1.IDepositParams|null|undefined} depositParams + * @memberof cosmos.gov.v1beta1.QueryParamsResponse + * @instance + */ + QueryParamsResponse.prototype.depositParams = null; + + /** + * QueryParamsResponse tallyParams. + * @member {cosmos.gov.v1beta1.ITallyParams|null|undefined} tallyParams + * @memberof cosmos.gov.v1beta1.QueryParamsResponse + * @instance + */ + QueryParamsResponse.prototype.tallyParams = null; + + /** + * Creates a new QueryParamsResponse instance using the specified properties. + * @function create + * @memberof cosmos.gov.v1beta1.QueryParamsResponse + * @static + * @param {cosmos.gov.v1beta1.IQueryParamsResponse=} [properties] Properties to set + * @returns {cosmos.gov.v1beta1.QueryParamsResponse} QueryParamsResponse instance + */ + QueryParamsResponse.create = function create(properties) { + return new QueryParamsResponse(properties); + }; + + /** + * Encodes the specified QueryParamsResponse message. Does not implicitly {@link cosmos.gov.v1beta1.QueryParamsResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.gov.v1beta1.QueryParamsResponse + * @static + * @param {cosmos.gov.v1beta1.IQueryParamsResponse} message QueryParamsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryParamsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.votingParams != null && Object.hasOwnProperty.call(message, "votingParams")) + $root.cosmos.gov.v1beta1.VotingParams.encode(message.votingParams, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.depositParams != null && Object.hasOwnProperty.call(message, "depositParams")) + $root.cosmos.gov.v1beta1.DepositParams.encode(message.depositParams, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.tallyParams != null && Object.hasOwnProperty.call(message, "tallyParams")) + $root.cosmos.gov.v1beta1.TallyParams.encode(message.tallyParams, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryParamsResponse message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.QueryParamsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.gov.v1beta1.QueryParamsResponse + * @static + * @param {cosmos.gov.v1beta1.IQueryParamsResponse} message QueryParamsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryParamsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryParamsResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.gov.v1beta1.QueryParamsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.gov.v1beta1.QueryParamsResponse} QueryParamsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryParamsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1beta1.QueryParamsResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.votingParams = $root.cosmos.gov.v1beta1.VotingParams.decode(reader, reader.uint32()); + break; + case 2: + message.depositParams = $root.cosmos.gov.v1beta1.DepositParams.decode(reader, reader.uint32()); + break; + case 3: + message.tallyParams = $root.cosmos.gov.v1beta1.TallyParams.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryParamsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.gov.v1beta1.QueryParamsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.gov.v1beta1.QueryParamsResponse} QueryParamsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryParamsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryParamsResponse message. + * @function verify + * @memberof cosmos.gov.v1beta1.QueryParamsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryParamsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.votingParams != null && message.hasOwnProperty("votingParams")) { + let error = $root.cosmos.gov.v1beta1.VotingParams.verify(message.votingParams); + if (error) + return "votingParams." + error; + } + if (message.depositParams != null && message.hasOwnProperty("depositParams")) { + let error = $root.cosmos.gov.v1beta1.DepositParams.verify(message.depositParams); + if (error) + return "depositParams." + error; + } + if (message.tallyParams != null && message.hasOwnProperty("tallyParams")) { + let error = $root.cosmos.gov.v1beta1.TallyParams.verify(message.tallyParams); + if (error) + return "tallyParams." + error; + } + return null; + }; + + /** + * Creates a QueryParamsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.gov.v1beta1.QueryParamsResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.gov.v1beta1.QueryParamsResponse} QueryParamsResponse + */ + QueryParamsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.gov.v1beta1.QueryParamsResponse) + return object; + let message = new $root.cosmos.gov.v1beta1.QueryParamsResponse(); + if (object.votingParams != null) { + if (typeof object.votingParams !== "object") + throw TypeError(".cosmos.gov.v1beta1.QueryParamsResponse.votingParams: object expected"); + message.votingParams = $root.cosmos.gov.v1beta1.VotingParams.fromObject(object.votingParams); + } + if (object.depositParams != null) { + if (typeof object.depositParams !== "object") + throw TypeError(".cosmos.gov.v1beta1.QueryParamsResponse.depositParams: object expected"); + message.depositParams = $root.cosmos.gov.v1beta1.DepositParams.fromObject(object.depositParams); + } + if (object.tallyParams != null) { + if (typeof object.tallyParams !== "object") + throw TypeError(".cosmos.gov.v1beta1.QueryParamsResponse.tallyParams: object expected"); + message.tallyParams = $root.cosmos.gov.v1beta1.TallyParams.fromObject(object.tallyParams); + } + return message; + }; + + /** + * Creates a plain object from a QueryParamsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.gov.v1beta1.QueryParamsResponse + * @static + * @param {cosmos.gov.v1beta1.QueryParamsResponse} message QueryParamsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryParamsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.votingParams = null; + object.depositParams = null; + object.tallyParams = null; + } + if (message.votingParams != null && message.hasOwnProperty("votingParams")) + object.votingParams = $root.cosmos.gov.v1beta1.VotingParams.toObject(message.votingParams, options); + if (message.depositParams != null && message.hasOwnProperty("depositParams")) + object.depositParams = $root.cosmos.gov.v1beta1.DepositParams.toObject(message.depositParams, options); + if (message.tallyParams != null && message.hasOwnProperty("tallyParams")) + object.tallyParams = $root.cosmos.gov.v1beta1.TallyParams.toObject(message.tallyParams, options); + return object; + }; + + /** + * Converts this QueryParamsResponse to JSON. + * @function toJSON + * @memberof cosmos.gov.v1beta1.QueryParamsResponse + * @instance + * @returns {Object.} JSON object + */ + QueryParamsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryParamsResponse; + })(v1beta1.QueryParamsResponse || {}); + + v1beta1.QueryDepositRequest = (function(QueryDepositRequest) { + + /** + * Properties of a QueryDepositRequest. + * @memberof cosmos.gov.v1beta1 + * @interface IQueryDepositRequest + * @property {number|Long|null} [proposalId] QueryDepositRequest proposalId + * @property {string|null} [depositor] QueryDepositRequest depositor + */ + + /** + * Constructs a new QueryDepositRequest. + * @memberof cosmos.gov.v1beta1 + * @classdesc Represents a QueryDepositRequest. + * @implements IQueryDepositRequest + * @constructor + * @param {cosmos.gov.v1beta1.IQueryDepositRequest=} [properties] Properties to set + */ + function QueryDepositRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryDepositRequest proposalId. + * @member {number|Long} proposalId + * @memberof cosmos.gov.v1beta1.QueryDepositRequest + * @instance + */ + QueryDepositRequest.prototype.proposalId = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * QueryDepositRequest depositor. + * @member {string} depositor + * @memberof cosmos.gov.v1beta1.QueryDepositRequest + * @instance + */ + QueryDepositRequest.prototype.depositor = ""; + + /** + * Creates a new QueryDepositRequest instance using the specified properties. + * @function create + * @memberof cosmos.gov.v1beta1.QueryDepositRequest + * @static + * @param {cosmos.gov.v1beta1.IQueryDepositRequest=} [properties] Properties to set + * @returns {cosmos.gov.v1beta1.QueryDepositRequest} QueryDepositRequest instance + */ + QueryDepositRequest.create = function create(properties) { + return new QueryDepositRequest(properties); + }; + + /** + * Encodes the specified QueryDepositRequest message. Does not implicitly {@link cosmos.gov.v1beta1.QueryDepositRequest.verify|verify} messages. + * @function encode + * @memberof cosmos.gov.v1beta1.QueryDepositRequest + * @static + * @param {cosmos.gov.v1beta1.IQueryDepositRequest} message QueryDepositRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDepositRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.proposalId != null && Object.hasOwnProperty.call(message, "proposalId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.proposalId); + if (message.depositor != null && Object.hasOwnProperty.call(message, "depositor")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.depositor); + return writer; + }; + + /** + * Encodes the specified QueryDepositRequest message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.QueryDepositRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.gov.v1beta1.QueryDepositRequest + * @static + * @param {cosmos.gov.v1beta1.IQueryDepositRequest} message QueryDepositRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDepositRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryDepositRequest message from the specified reader or buffer. + * @function decode + * @memberof cosmos.gov.v1beta1.QueryDepositRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.gov.v1beta1.QueryDepositRequest} QueryDepositRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDepositRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1beta1.QueryDepositRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.proposalId = reader.uint64(); + break; + case 2: + message.depositor = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryDepositRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.gov.v1beta1.QueryDepositRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.gov.v1beta1.QueryDepositRequest} QueryDepositRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDepositRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryDepositRequest message. + * @function verify + * @memberof cosmos.gov.v1beta1.QueryDepositRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryDepositRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.proposalId != null && message.hasOwnProperty("proposalId")) + if (!$util.isInteger(message.proposalId) && !(message.proposalId && $util.isInteger(message.proposalId.low) && $util.isInteger(message.proposalId.high))) + return "proposalId: integer|Long expected"; + if (message.depositor != null && message.hasOwnProperty("depositor")) + if (!$util.isString(message.depositor)) + return "depositor: string expected"; + return null; + }; + + /** + * Creates a QueryDepositRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.gov.v1beta1.QueryDepositRequest + * @static + * @param {Object.} object Plain object + * @returns {cosmos.gov.v1beta1.QueryDepositRequest} QueryDepositRequest + */ + QueryDepositRequest.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.gov.v1beta1.QueryDepositRequest) + return object; + let message = new $root.cosmos.gov.v1beta1.QueryDepositRequest(); + if (object.proposalId != null) + if ($util.Long) + (message.proposalId = $util.Long.fromValue(object.proposalId)).unsigned = true; + else if (typeof object.proposalId === "string") + message.proposalId = parseInt(object.proposalId, 10); + else if (typeof object.proposalId === "number") + message.proposalId = object.proposalId; + else if (typeof object.proposalId === "object") + message.proposalId = new $util.LongBits(object.proposalId.low >>> 0, object.proposalId.high >>> 0).toNumber(true); + if (object.depositor != null) + message.depositor = String(object.depositor); + return message; + }; + + /** + * Creates a plain object from a QueryDepositRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.gov.v1beta1.QueryDepositRequest + * @static + * @param {cosmos.gov.v1beta1.QueryDepositRequest} message QueryDepositRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryDepositRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.proposalId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.proposalId = options.longs === String ? "0" : 0; + object.depositor = ""; + } + if (message.proposalId != null && message.hasOwnProperty("proposalId")) + if (typeof message.proposalId === "number") + object.proposalId = options.longs === String ? String(message.proposalId) : message.proposalId; + else + object.proposalId = options.longs === String ? $util.Long.prototype.toString.call(message.proposalId) : options.longs === Number ? new $util.LongBits(message.proposalId.low >>> 0, message.proposalId.high >>> 0).toNumber(true) : message.proposalId; + if (message.depositor != null && message.hasOwnProperty("depositor")) + object.depositor = message.depositor; + return object; + }; + + /** + * Converts this QueryDepositRequest to JSON. + * @function toJSON + * @memberof cosmos.gov.v1beta1.QueryDepositRequest + * @instance + * @returns {Object.} JSON object + */ + QueryDepositRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryDepositRequest; + })(v1beta1.QueryDepositRequest || {}); + + v1beta1.QueryDepositResponse = (function(QueryDepositResponse) { + + /** + * Properties of a QueryDepositResponse. + * @memberof cosmos.gov.v1beta1 + * @interface IQueryDepositResponse + * @property {cosmos.gov.v1beta1.IDeposit|null} [deposit] QueryDepositResponse deposit + */ + + /** + * Constructs a new QueryDepositResponse. + * @memberof cosmos.gov.v1beta1 + * @classdesc Represents a QueryDepositResponse. + * @implements IQueryDepositResponse + * @constructor + * @param {cosmos.gov.v1beta1.IQueryDepositResponse=} [properties] Properties to set + */ + function QueryDepositResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryDepositResponse deposit. + * @member {cosmos.gov.v1beta1.IDeposit|null|undefined} deposit + * @memberof cosmos.gov.v1beta1.QueryDepositResponse + * @instance + */ + QueryDepositResponse.prototype.deposit = null; + + /** + * Creates a new QueryDepositResponse instance using the specified properties. + * @function create + * @memberof cosmos.gov.v1beta1.QueryDepositResponse + * @static + * @param {cosmos.gov.v1beta1.IQueryDepositResponse=} [properties] Properties to set + * @returns {cosmos.gov.v1beta1.QueryDepositResponse} QueryDepositResponse instance + */ + QueryDepositResponse.create = function create(properties) { + return new QueryDepositResponse(properties); + }; + + /** + * Encodes the specified QueryDepositResponse message. Does not implicitly {@link cosmos.gov.v1beta1.QueryDepositResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.gov.v1beta1.QueryDepositResponse + * @static + * @param {cosmos.gov.v1beta1.IQueryDepositResponse} message QueryDepositResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDepositResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deposit != null && Object.hasOwnProperty.call(message, "deposit")) + $root.cosmos.gov.v1beta1.Deposit.encode(message.deposit, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryDepositResponse message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.QueryDepositResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.gov.v1beta1.QueryDepositResponse + * @static + * @param {cosmos.gov.v1beta1.IQueryDepositResponse} message QueryDepositResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDepositResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryDepositResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.gov.v1beta1.QueryDepositResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.gov.v1beta1.QueryDepositResponse} QueryDepositResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDepositResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1beta1.QueryDepositResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.deposit = $root.cosmos.gov.v1beta1.Deposit.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryDepositResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.gov.v1beta1.QueryDepositResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.gov.v1beta1.QueryDepositResponse} QueryDepositResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDepositResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryDepositResponse message. + * @function verify + * @memberof cosmos.gov.v1beta1.QueryDepositResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryDepositResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deposit != null && message.hasOwnProperty("deposit")) { + let error = $root.cosmos.gov.v1beta1.Deposit.verify(message.deposit); + if (error) + return "deposit." + error; + } + return null; + }; + + /** + * Creates a QueryDepositResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.gov.v1beta1.QueryDepositResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.gov.v1beta1.QueryDepositResponse} QueryDepositResponse + */ + QueryDepositResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.gov.v1beta1.QueryDepositResponse) + return object; + let message = new $root.cosmos.gov.v1beta1.QueryDepositResponse(); + if (object.deposit != null) { + if (typeof object.deposit !== "object") + throw TypeError(".cosmos.gov.v1beta1.QueryDepositResponse.deposit: object expected"); + message.deposit = $root.cosmos.gov.v1beta1.Deposit.fromObject(object.deposit); + } + return message; + }; + + /** + * Creates a plain object from a QueryDepositResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.gov.v1beta1.QueryDepositResponse + * @static + * @param {cosmos.gov.v1beta1.QueryDepositResponse} message QueryDepositResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryDepositResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.deposit = null; + if (message.deposit != null && message.hasOwnProperty("deposit")) + object.deposit = $root.cosmos.gov.v1beta1.Deposit.toObject(message.deposit, options); + return object; + }; + + /** + * Converts this QueryDepositResponse to JSON. + * @function toJSON + * @memberof cosmos.gov.v1beta1.QueryDepositResponse + * @instance + * @returns {Object.} JSON object + */ + QueryDepositResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryDepositResponse; + })(v1beta1.QueryDepositResponse || {}); + + v1beta1.QueryDepositsRequest = (function(QueryDepositsRequest) { + + /** + * Properties of a QueryDepositsRequest. + * @memberof cosmos.gov.v1beta1 + * @interface IQueryDepositsRequest + * @property {number|Long|null} [proposalId] QueryDepositsRequest proposalId + * @property {cosmos.base.query.v1beta1.IPageRequest|null} [pagination] QueryDepositsRequest pagination + */ + + /** + * Constructs a new QueryDepositsRequest. + * @memberof cosmos.gov.v1beta1 + * @classdesc Represents a QueryDepositsRequest. + * @implements IQueryDepositsRequest + * @constructor + * @param {cosmos.gov.v1beta1.IQueryDepositsRequest=} [properties] Properties to set + */ + function QueryDepositsRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryDepositsRequest proposalId. + * @member {number|Long} proposalId + * @memberof cosmos.gov.v1beta1.QueryDepositsRequest + * @instance + */ + QueryDepositsRequest.prototype.proposalId = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * QueryDepositsRequest pagination. + * @member {cosmos.base.query.v1beta1.IPageRequest|null|undefined} pagination + * @memberof cosmos.gov.v1beta1.QueryDepositsRequest + * @instance + */ + QueryDepositsRequest.prototype.pagination = null; + + /** + * Creates a new QueryDepositsRequest instance using the specified properties. + * @function create + * @memberof cosmos.gov.v1beta1.QueryDepositsRequest + * @static + * @param {cosmos.gov.v1beta1.IQueryDepositsRequest=} [properties] Properties to set + * @returns {cosmos.gov.v1beta1.QueryDepositsRequest} QueryDepositsRequest instance + */ + QueryDepositsRequest.create = function create(properties) { + return new QueryDepositsRequest(properties); + }; + + /** + * Encodes the specified QueryDepositsRequest message. Does not implicitly {@link cosmos.gov.v1beta1.QueryDepositsRequest.verify|verify} messages. + * @function encode + * @memberof cosmos.gov.v1beta1.QueryDepositsRequest + * @static + * @param {cosmos.gov.v1beta1.IQueryDepositsRequest} message QueryDepositsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDepositsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.proposalId != null && Object.hasOwnProperty.call(message, "proposalId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.proposalId); + if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) + $root.cosmos.base.query.v1beta1.PageRequest.encode(message.pagination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryDepositsRequest message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.QueryDepositsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.gov.v1beta1.QueryDepositsRequest + * @static + * @param {cosmos.gov.v1beta1.IQueryDepositsRequest} message QueryDepositsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDepositsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryDepositsRequest message from the specified reader or buffer. + * @function decode + * @memberof cosmos.gov.v1beta1.QueryDepositsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.gov.v1beta1.QueryDepositsRequest} QueryDepositsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDepositsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1beta1.QueryDepositsRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.proposalId = reader.uint64(); + break; + case 2: + message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryDepositsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.gov.v1beta1.QueryDepositsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.gov.v1beta1.QueryDepositsRequest} QueryDepositsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDepositsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryDepositsRequest message. + * @function verify + * @memberof cosmos.gov.v1beta1.QueryDepositsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryDepositsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.proposalId != null && message.hasOwnProperty("proposalId")) + if (!$util.isInteger(message.proposalId) && !(message.proposalId && $util.isInteger(message.proposalId.low) && $util.isInteger(message.proposalId.high))) + return "proposalId: integer|Long expected"; + if (message.pagination != null && message.hasOwnProperty("pagination")) { + let error = $root.cosmos.base.query.v1beta1.PageRequest.verify(message.pagination); + if (error) + return "pagination." + error; + } + return null; + }; + + /** + * Creates a QueryDepositsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.gov.v1beta1.QueryDepositsRequest + * @static + * @param {Object.} object Plain object + * @returns {cosmos.gov.v1beta1.QueryDepositsRequest} QueryDepositsRequest + */ + QueryDepositsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.gov.v1beta1.QueryDepositsRequest) + return object; + let message = new $root.cosmos.gov.v1beta1.QueryDepositsRequest(); + if (object.proposalId != null) + if ($util.Long) + (message.proposalId = $util.Long.fromValue(object.proposalId)).unsigned = true; + else if (typeof object.proposalId === "string") + message.proposalId = parseInt(object.proposalId, 10); + else if (typeof object.proposalId === "number") + message.proposalId = object.proposalId; + else if (typeof object.proposalId === "object") + message.proposalId = new $util.LongBits(object.proposalId.low >>> 0, object.proposalId.high >>> 0).toNumber(true); + if (object.pagination != null) { + if (typeof object.pagination !== "object") + throw TypeError(".cosmos.gov.v1beta1.QueryDepositsRequest.pagination: object expected"); + message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.fromObject(object.pagination); + } + return message; + }; + + /** + * Creates a plain object from a QueryDepositsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.gov.v1beta1.QueryDepositsRequest + * @static + * @param {cosmos.gov.v1beta1.QueryDepositsRequest} message QueryDepositsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryDepositsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.proposalId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.proposalId = options.longs === String ? "0" : 0; + object.pagination = null; + } + if (message.proposalId != null && message.hasOwnProperty("proposalId")) + if (typeof message.proposalId === "number") + object.proposalId = options.longs === String ? String(message.proposalId) : message.proposalId; + else + object.proposalId = options.longs === String ? $util.Long.prototype.toString.call(message.proposalId) : options.longs === Number ? new $util.LongBits(message.proposalId.low >>> 0, message.proposalId.high >>> 0).toNumber(true) : message.proposalId; + if (message.pagination != null && message.hasOwnProperty("pagination")) + object.pagination = $root.cosmos.base.query.v1beta1.PageRequest.toObject(message.pagination, options); + return object; + }; + + /** + * Converts this QueryDepositsRequest to JSON. + * @function toJSON + * @memberof cosmos.gov.v1beta1.QueryDepositsRequest + * @instance + * @returns {Object.} JSON object + */ + QueryDepositsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryDepositsRequest; + })(v1beta1.QueryDepositsRequest || {}); + + v1beta1.QueryDepositsResponse = (function(QueryDepositsResponse) { + + /** + * Properties of a QueryDepositsResponse. + * @memberof cosmos.gov.v1beta1 + * @interface IQueryDepositsResponse + * @property {Array.|null} [deposits] QueryDepositsResponse deposits + * @property {cosmos.base.query.v1beta1.IPageResponse|null} [pagination] QueryDepositsResponse pagination + */ + + /** + * Constructs a new QueryDepositsResponse. + * @memberof cosmos.gov.v1beta1 + * @classdesc Represents a QueryDepositsResponse. + * @implements IQueryDepositsResponse + * @constructor + * @param {cosmos.gov.v1beta1.IQueryDepositsResponse=} [properties] Properties to set + */ + function QueryDepositsResponse(properties) { + this.deposits = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryDepositsResponse deposits. + * @member {Array.} deposits + * @memberof cosmos.gov.v1beta1.QueryDepositsResponse + * @instance + */ + QueryDepositsResponse.prototype.deposits = $util.emptyArray; + + /** + * QueryDepositsResponse pagination. + * @member {cosmos.base.query.v1beta1.IPageResponse|null|undefined} pagination + * @memberof cosmos.gov.v1beta1.QueryDepositsResponse + * @instance + */ + QueryDepositsResponse.prototype.pagination = null; + + /** + * Creates a new QueryDepositsResponse instance using the specified properties. + * @function create + * @memberof cosmos.gov.v1beta1.QueryDepositsResponse + * @static + * @param {cosmos.gov.v1beta1.IQueryDepositsResponse=} [properties] Properties to set + * @returns {cosmos.gov.v1beta1.QueryDepositsResponse} QueryDepositsResponse instance + */ + QueryDepositsResponse.create = function create(properties) { + return new QueryDepositsResponse(properties); + }; + + /** + * Encodes the specified QueryDepositsResponse message. Does not implicitly {@link cosmos.gov.v1beta1.QueryDepositsResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.gov.v1beta1.QueryDepositsResponse + * @static + * @param {cosmos.gov.v1beta1.IQueryDepositsResponse} message QueryDepositsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDepositsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deposits != null && message.deposits.length) + for (let i = 0; i < message.deposits.length; ++i) + $root.cosmos.gov.v1beta1.Deposit.encode(message.deposits[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) + $root.cosmos.base.query.v1beta1.PageResponse.encode(message.pagination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryDepositsResponse message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.QueryDepositsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.gov.v1beta1.QueryDepositsResponse + * @static + * @param {cosmos.gov.v1beta1.IQueryDepositsResponse} message QueryDepositsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDepositsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryDepositsResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.gov.v1beta1.QueryDepositsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.gov.v1beta1.QueryDepositsResponse} QueryDepositsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDepositsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1beta1.QueryDepositsResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.deposits && message.deposits.length)) + message.deposits = []; + message.deposits.push($root.cosmos.gov.v1beta1.Deposit.decode(reader, reader.uint32())); + break; + case 2: + message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryDepositsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.gov.v1beta1.QueryDepositsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.gov.v1beta1.QueryDepositsResponse} QueryDepositsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDepositsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryDepositsResponse message. + * @function verify + * @memberof cosmos.gov.v1beta1.QueryDepositsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryDepositsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deposits != null && message.hasOwnProperty("deposits")) { + if (!Array.isArray(message.deposits)) + return "deposits: array expected"; + for (let i = 0; i < message.deposits.length; ++i) { + let error = $root.cosmos.gov.v1beta1.Deposit.verify(message.deposits[i]); + if (error) + return "deposits." + error; + } + } + if (message.pagination != null && message.hasOwnProperty("pagination")) { + let error = $root.cosmos.base.query.v1beta1.PageResponse.verify(message.pagination); + if (error) + return "pagination." + error; + } + return null; + }; + + /** + * Creates a QueryDepositsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.gov.v1beta1.QueryDepositsResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.gov.v1beta1.QueryDepositsResponse} QueryDepositsResponse + */ + QueryDepositsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.gov.v1beta1.QueryDepositsResponse) + return object; + let message = new $root.cosmos.gov.v1beta1.QueryDepositsResponse(); + if (object.deposits) { + if (!Array.isArray(object.deposits)) + throw TypeError(".cosmos.gov.v1beta1.QueryDepositsResponse.deposits: array expected"); + message.deposits = []; + for (let i = 0; i < object.deposits.length; ++i) { + if (typeof object.deposits[i] !== "object") + throw TypeError(".cosmos.gov.v1beta1.QueryDepositsResponse.deposits: object expected"); + message.deposits[i] = $root.cosmos.gov.v1beta1.Deposit.fromObject(object.deposits[i]); + } + } + if (object.pagination != null) { + if (typeof object.pagination !== "object") + throw TypeError(".cosmos.gov.v1beta1.QueryDepositsResponse.pagination: object expected"); + message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.fromObject(object.pagination); + } + return message; + }; + + /** + * Creates a plain object from a QueryDepositsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.gov.v1beta1.QueryDepositsResponse + * @static + * @param {cosmos.gov.v1beta1.QueryDepositsResponse} message QueryDepositsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryDepositsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.deposits = []; + if (options.defaults) + object.pagination = null; + if (message.deposits && message.deposits.length) { + object.deposits = []; + for (let j = 0; j < message.deposits.length; ++j) + object.deposits[j] = $root.cosmos.gov.v1beta1.Deposit.toObject(message.deposits[j], options); + } + if (message.pagination != null && message.hasOwnProperty("pagination")) + object.pagination = $root.cosmos.base.query.v1beta1.PageResponse.toObject(message.pagination, options); + return object; + }; + + /** + * Converts this QueryDepositsResponse to JSON. + * @function toJSON + * @memberof cosmos.gov.v1beta1.QueryDepositsResponse + * @instance + * @returns {Object.} JSON object + */ + QueryDepositsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryDepositsResponse; + })(v1beta1.QueryDepositsResponse || {}); + + v1beta1.QueryTallyResultRequest = (function(QueryTallyResultRequest) { + + /** + * Properties of a QueryTallyResultRequest. + * @memberof cosmos.gov.v1beta1 + * @interface IQueryTallyResultRequest + * @property {number|Long|null} [proposalId] QueryTallyResultRequest proposalId + */ + + /** + * Constructs a new QueryTallyResultRequest. + * @memberof cosmos.gov.v1beta1 + * @classdesc Represents a QueryTallyResultRequest. + * @implements IQueryTallyResultRequest + * @constructor + * @param {cosmos.gov.v1beta1.IQueryTallyResultRequest=} [properties] Properties to set + */ + function QueryTallyResultRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryTallyResultRequest proposalId. + * @member {number|Long} proposalId + * @memberof cosmos.gov.v1beta1.QueryTallyResultRequest + * @instance + */ + QueryTallyResultRequest.prototype.proposalId = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new QueryTallyResultRequest instance using the specified properties. + * @function create + * @memberof cosmos.gov.v1beta1.QueryTallyResultRequest + * @static + * @param {cosmos.gov.v1beta1.IQueryTallyResultRequest=} [properties] Properties to set + * @returns {cosmos.gov.v1beta1.QueryTallyResultRequest} QueryTallyResultRequest instance + */ + QueryTallyResultRequest.create = function create(properties) { + return new QueryTallyResultRequest(properties); + }; + + /** + * Encodes the specified QueryTallyResultRequest message. Does not implicitly {@link cosmos.gov.v1beta1.QueryTallyResultRequest.verify|verify} messages. + * @function encode + * @memberof cosmos.gov.v1beta1.QueryTallyResultRequest + * @static + * @param {cosmos.gov.v1beta1.IQueryTallyResultRequest} message QueryTallyResultRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryTallyResultRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.proposalId != null && Object.hasOwnProperty.call(message, "proposalId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.proposalId); + return writer; + }; + + /** + * Encodes the specified QueryTallyResultRequest message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.QueryTallyResultRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.gov.v1beta1.QueryTallyResultRequest + * @static + * @param {cosmos.gov.v1beta1.IQueryTallyResultRequest} message QueryTallyResultRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryTallyResultRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryTallyResultRequest message from the specified reader or buffer. + * @function decode + * @memberof cosmos.gov.v1beta1.QueryTallyResultRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.gov.v1beta1.QueryTallyResultRequest} QueryTallyResultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryTallyResultRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1beta1.QueryTallyResultRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.proposalId = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryTallyResultRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.gov.v1beta1.QueryTallyResultRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.gov.v1beta1.QueryTallyResultRequest} QueryTallyResultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryTallyResultRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryTallyResultRequest message. + * @function verify + * @memberof cosmos.gov.v1beta1.QueryTallyResultRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryTallyResultRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.proposalId != null && message.hasOwnProperty("proposalId")) + if (!$util.isInteger(message.proposalId) && !(message.proposalId && $util.isInteger(message.proposalId.low) && $util.isInteger(message.proposalId.high))) + return "proposalId: integer|Long expected"; + return null; + }; + + /** + * Creates a QueryTallyResultRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.gov.v1beta1.QueryTallyResultRequest + * @static + * @param {Object.} object Plain object + * @returns {cosmos.gov.v1beta1.QueryTallyResultRequest} QueryTallyResultRequest + */ + QueryTallyResultRequest.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.gov.v1beta1.QueryTallyResultRequest) + return object; + let message = new $root.cosmos.gov.v1beta1.QueryTallyResultRequest(); + if (object.proposalId != null) + if ($util.Long) + (message.proposalId = $util.Long.fromValue(object.proposalId)).unsigned = true; + else if (typeof object.proposalId === "string") + message.proposalId = parseInt(object.proposalId, 10); + else if (typeof object.proposalId === "number") + message.proposalId = object.proposalId; + else if (typeof object.proposalId === "object") + message.proposalId = new $util.LongBits(object.proposalId.low >>> 0, object.proposalId.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a QueryTallyResultRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.gov.v1beta1.QueryTallyResultRequest + * @static + * @param {cosmos.gov.v1beta1.QueryTallyResultRequest} message QueryTallyResultRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryTallyResultRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.proposalId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.proposalId = options.longs === String ? "0" : 0; + if (message.proposalId != null && message.hasOwnProperty("proposalId")) + if (typeof message.proposalId === "number") + object.proposalId = options.longs === String ? String(message.proposalId) : message.proposalId; + else + object.proposalId = options.longs === String ? $util.Long.prototype.toString.call(message.proposalId) : options.longs === Number ? new $util.LongBits(message.proposalId.low >>> 0, message.proposalId.high >>> 0).toNumber(true) : message.proposalId; + return object; + }; + + /** + * Converts this QueryTallyResultRequest to JSON. + * @function toJSON + * @memberof cosmos.gov.v1beta1.QueryTallyResultRequest + * @instance + * @returns {Object.} JSON object + */ + QueryTallyResultRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryTallyResultRequest; + })(v1beta1.QueryTallyResultRequest || {}); + + v1beta1.QueryTallyResultResponse = (function(QueryTallyResultResponse) { + + /** + * Properties of a QueryTallyResultResponse. + * @memberof cosmos.gov.v1beta1 + * @interface IQueryTallyResultResponse + * @property {cosmos.gov.v1beta1.ITallyResult|null} [tally] QueryTallyResultResponse tally + */ + + /** + * Constructs a new QueryTallyResultResponse. + * @memberof cosmos.gov.v1beta1 + * @classdesc Represents a QueryTallyResultResponse. + * @implements IQueryTallyResultResponse + * @constructor + * @param {cosmos.gov.v1beta1.IQueryTallyResultResponse=} [properties] Properties to set + */ + function QueryTallyResultResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryTallyResultResponse tally. + * @member {cosmos.gov.v1beta1.ITallyResult|null|undefined} tally + * @memberof cosmos.gov.v1beta1.QueryTallyResultResponse + * @instance + */ + QueryTallyResultResponse.prototype.tally = null; + + /** + * Creates a new QueryTallyResultResponse instance using the specified properties. + * @function create + * @memberof cosmos.gov.v1beta1.QueryTallyResultResponse + * @static + * @param {cosmos.gov.v1beta1.IQueryTallyResultResponse=} [properties] Properties to set + * @returns {cosmos.gov.v1beta1.QueryTallyResultResponse} QueryTallyResultResponse instance + */ + QueryTallyResultResponse.create = function create(properties) { + return new QueryTallyResultResponse(properties); + }; + + /** + * Encodes the specified QueryTallyResultResponse message. Does not implicitly {@link cosmos.gov.v1beta1.QueryTallyResultResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.gov.v1beta1.QueryTallyResultResponse + * @static + * @param {cosmos.gov.v1beta1.IQueryTallyResultResponse} message QueryTallyResultResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryTallyResultResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tally != null && Object.hasOwnProperty.call(message, "tally")) + $root.cosmos.gov.v1beta1.TallyResult.encode(message.tally, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryTallyResultResponse message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.QueryTallyResultResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.gov.v1beta1.QueryTallyResultResponse + * @static + * @param {cosmos.gov.v1beta1.IQueryTallyResultResponse} message QueryTallyResultResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryTallyResultResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryTallyResultResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.gov.v1beta1.QueryTallyResultResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.gov.v1beta1.QueryTallyResultResponse} QueryTallyResultResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryTallyResultResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1beta1.QueryTallyResultResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.tally = $root.cosmos.gov.v1beta1.TallyResult.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryTallyResultResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.gov.v1beta1.QueryTallyResultResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.gov.v1beta1.QueryTallyResultResponse} QueryTallyResultResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryTallyResultResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryTallyResultResponse message. + * @function verify + * @memberof cosmos.gov.v1beta1.QueryTallyResultResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryTallyResultResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tally != null && message.hasOwnProperty("tally")) { + let error = $root.cosmos.gov.v1beta1.TallyResult.verify(message.tally); + if (error) + return "tally." + error; + } + return null; + }; + + /** + * Creates a QueryTallyResultResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.gov.v1beta1.QueryTallyResultResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.gov.v1beta1.QueryTallyResultResponse} QueryTallyResultResponse + */ + QueryTallyResultResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.gov.v1beta1.QueryTallyResultResponse) + return object; + let message = new $root.cosmos.gov.v1beta1.QueryTallyResultResponse(); + if (object.tally != null) { + if (typeof object.tally !== "object") + throw TypeError(".cosmos.gov.v1beta1.QueryTallyResultResponse.tally: object expected"); + message.tally = $root.cosmos.gov.v1beta1.TallyResult.fromObject(object.tally); + } + return message; + }; + + /** + * Creates a plain object from a QueryTallyResultResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.gov.v1beta1.QueryTallyResultResponse + * @static + * @param {cosmos.gov.v1beta1.QueryTallyResultResponse} message QueryTallyResultResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryTallyResultResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.tally = null; + if (message.tally != null && message.hasOwnProperty("tally")) + object.tally = $root.cosmos.gov.v1beta1.TallyResult.toObject(message.tally, options); + return object; + }; + + /** + * Converts this QueryTallyResultResponse to JSON. + * @function toJSON + * @memberof cosmos.gov.v1beta1.QueryTallyResultResponse + * @instance + * @returns {Object.} JSON object + */ + QueryTallyResultResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryTallyResultResponse; + })(v1beta1.QueryTallyResultResponse || {}); + + v1beta1.Msg = (function(Msg) { + + /** + * Constructs a new Msg service. + * @memberof cosmos.gov.v1beta1 + * @classdesc Represents a Msg + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Msg(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Msg.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Msg; + + /** + * Creates new Msg service using the specified rpc implementation. + * @function create + * @memberof cosmos.gov.v1beta1.Msg + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Msg} RPC service. Useful where requests and/or responses are streamed. + */ + Msg.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link cosmos.gov.v1beta1.Msg#submitProposal}. + * @memberof cosmos.gov.v1beta1.Msg + * @typedef SubmitProposalCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.gov.v1beta1.IMsgSubmitProposalResponse} [response] MsgSubmitProposalResponse + */ + + /** + * Calls SubmitProposal. + * @function submitProposal + * @memberof cosmos.gov.v1beta1.Msg + * @instance + * @param {cosmos.gov.v1beta1.IMsgSubmitProposal} request MsgSubmitProposal message or plain object + * @param {cosmos.gov.v1beta1.Msg.SubmitProposalCallback} callback Node-style callback called with the error, if any, and MsgSubmitProposalResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Msg.prototype.submitProposal = function submitProposal(request, callback) { + return this.rpcCall(submitProposal, $root.cosmos.gov.v1beta1.MsgSubmitProposal, $root.cosmos.gov.v1beta1.MsgSubmitProposalResponse, request, callback); + }, "name", { value: "SubmitProposal" }); + + /** + * Calls SubmitProposal. + * @function submitProposal + * @memberof cosmos.gov.v1beta1.Msg + * @instance + * @param {cosmos.gov.v1beta1.IMsgSubmitProposal} request MsgSubmitProposal message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link cosmos.gov.v1beta1.Msg#vote}. + * @memberof cosmos.gov.v1beta1.Msg + * @typedef VoteCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.gov.v1beta1.IMsgVoteResponse} [response] MsgVoteResponse + */ + + /** + * Calls Vote. + * @function vote + * @memberof cosmos.gov.v1beta1.Msg + * @instance + * @param {cosmos.gov.v1beta1.IMsgVote} request MsgVote message or plain object + * @param {cosmos.gov.v1beta1.Msg.VoteCallback} callback Node-style callback called with the error, if any, and MsgVoteResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Msg.prototype.vote = function vote(request, callback) { + return this.rpcCall(vote, $root.cosmos.gov.v1beta1.MsgVote, $root.cosmos.gov.v1beta1.MsgVoteResponse, request, callback); + }, "name", { value: "Vote" }); + + /** + * Calls Vote. + * @function vote + * @memberof cosmos.gov.v1beta1.Msg + * @instance + * @param {cosmos.gov.v1beta1.IMsgVote} request MsgVote message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link cosmos.gov.v1beta1.Msg#deposit}. + * @memberof cosmos.gov.v1beta1.Msg + * @typedef DepositCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.gov.v1beta1.IMsgDepositResponse} [response] MsgDepositResponse + */ + + /** + * Calls Deposit. + * @function deposit + * @memberof cosmos.gov.v1beta1.Msg + * @instance + * @param {cosmos.gov.v1beta1.IMsgDeposit} request MsgDeposit message or plain object + * @param {cosmos.gov.v1beta1.Msg.DepositCallback} callback Node-style callback called with the error, if any, and MsgDepositResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Msg.prototype.deposit = function deposit(request, callback) { + return this.rpcCall(deposit, $root.cosmos.gov.v1beta1.MsgDeposit, $root.cosmos.gov.v1beta1.MsgDepositResponse, request, callback); + }, "name", { value: "Deposit" }); + + /** + * Calls Deposit. + * @function deposit + * @memberof cosmos.gov.v1beta1.Msg + * @instance + * @param {cosmos.gov.v1beta1.IMsgDeposit} request MsgDeposit message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Msg; + })(v1beta1.Msg || {}); + + v1beta1.MsgSubmitProposal = (function(MsgSubmitProposal) { + + /** + * Properties of a MsgSubmitProposal. + * @memberof cosmos.gov.v1beta1 + * @interface IMsgSubmitProposal + * @property {google.protobuf.IAny|null} [content] MsgSubmitProposal content + * @property {Array.|null} [initialDeposit] MsgSubmitProposal initialDeposit + * @property {string|null} [proposer] MsgSubmitProposal proposer + */ + + /** + * Constructs a new MsgSubmitProposal. + * @memberof cosmos.gov.v1beta1 + * @classdesc Represents a MsgSubmitProposal. + * @implements IMsgSubmitProposal + * @constructor + * @param {cosmos.gov.v1beta1.IMsgSubmitProposal=} [properties] Properties to set + */ + function MsgSubmitProposal(properties) { + this.initialDeposit = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgSubmitProposal content. + * @member {google.protobuf.IAny|null|undefined} content + * @memberof cosmos.gov.v1beta1.MsgSubmitProposal + * @instance + */ + MsgSubmitProposal.prototype.content = null; + + /** + * MsgSubmitProposal initialDeposit. + * @member {Array.} initialDeposit + * @memberof cosmos.gov.v1beta1.MsgSubmitProposal + * @instance + */ + MsgSubmitProposal.prototype.initialDeposit = $util.emptyArray; + + /** + * MsgSubmitProposal proposer. + * @member {string} proposer + * @memberof cosmos.gov.v1beta1.MsgSubmitProposal + * @instance + */ + MsgSubmitProposal.prototype.proposer = ""; + + /** + * Creates a new MsgSubmitProposal instance using the specified properties. + * @function create + * @memberof cosmos.gov.v1beta1.MsgSubmitProposal + * @static + * @param {cosmos.gov.v1beta1.IMsgSubmitProposal=} [properties] Properties to set + * @returns {cosmos.gov.v1beta1.MsgSubmitProposal} MsgSubmitProposal instance + */ + MsgSubmitProposal.create = function create(properties) { + return new MsgSubmitProposal(properties); + }; + + /** + * Encodes the specified MsgSubmitProposal message. Does not implicitly {@link cosmos.gov.v1beta1.MsgSubmitProposal.verify|verify} messages. + * @function encode + * @memberof cosmos.gov.v1beta1.MsgSubmitProposal + * @static + * @param {cosmos.gov.v1beta1.IMsgSubmitProposal} message MsgSubmitProposal message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgSubmitProposal.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.content != null && Object.hasOwnProperty.call(message, "content")) + $root.google.protobuf.Any.encode(message.content, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.initialDeposit != null && message.initialDeposit.length) + for (let i = 0; i < message.initialDeposit.length; ++i) + $root.cosmos.base.v1beta1.Coin.encode(message.initialDeposit[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.proposer != null && Object.hasOwnProperty.call(message, "proposer")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.proposer); + return writer; + }; + + /** + * Encodes the specified MsgSubmitProposal message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.MsgSubmitProposal.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.gov.v1beta1.MsgSubmitProposal + * @static + * @param {cosmos.gov.v1beta1.IMsgSubmitProposal} message MsgSubmitProposal message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgSubmitProposal.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgSubmitProposal message from the specified reader or buffer. + * @function decode + * @memberof cosmos.gov.v1beta1.MsgSubmitProposal + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.gov.v1beta1.MsgSubmitProposal} MsgSubmitProposal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgSubmitProposal.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1beta1.MsgSubmitProposal(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.content = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + case 2: + if (!(message.initialDeposit && message.initialDeposit.length)) + message.initialDeposit = []; + message.initialDeposit.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); + break; + case 3: + message.proposer = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgSubmitProposal message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.gov.v1beta1.MsgSubmitProposal + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.gov.v1beta1.MsgSubmitProposal} MsgSubmitProposal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgSubmitProposal.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgSubmitProposal message. + * @function verify + * @memberof cosmos.gov.v1beta1.MsgSubmitProposal + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgSubmitProposal.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.content != null && message.hasOwnProperty("content")) { + let error = $root.google.protobuf.Any.verify(message.content); + if (error) + return "content." + error; + } + if (message.initialDeposit != null && message.hasOwnProperty("initialDeposit")) { + if (!Array.isArray(message.initialDeposit)) + return "initialDeposit: array expected"; + for (let i = 0; i < message.initialDeposit.length; ++i) { + let error = $root.cosmos.base.v1beta1.Coin.verify(message.initialDeposit[i]); + if (error) + return "initialDeposit." + error; + } + } + if (message.proposer != null && message.hasOwnProperty("proposer")) + if (!$util.isString(message.proposer)) + return "proposer: string expected"; + return null; + }; + + /** + * Creates a MsgSubmitProposal message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.gov.v1beta1.MsgSubmitProposal + * @static + * @param {Object.} object Plain object + * @returns {cosmos.gov.v1beta1.MsgSubmitProposal} MsgSubmitProposal + */ + MsgSubmitProposal.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.gov.v1beta1.MsgSubmitProposal) + return object; + let message = new $root.cosmos.gov.v1beta1.MsgSubmitProposal(); + if (object.content != null) { + if (typeof object.content !== "object") + throw TypeError(".cosmos.gov.v1beta1.MsgSubmitProposal.content: object expected"); + message.content = $root.google.protobuf.Any.fromObject(object.content); + } + if (object.initialDeposit) { + if (!Array.isArray(object.initialDeposit)) + throw TypeError(".cosmos.gov.v1beta1.MsgSubmitProposal.initialDeposit: array expected"); + message.initialDeposit = []; + for (let i = 0; i < object.initialDeposit.length; ++i) { + if (typeof object.initialDeposit[i] !== "object") + throw TypeError(".cosmos.gov.v1beta1.MsgSubmitProposal.initialDeposit: object expected"); + message.initialDeposit[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.initialDeposit[i]); + } + } + if (object.proposer != null) + message.proposer = String(object.proposer); + return message; + }; + + /** + * Creates a plain object from a MsgSubmitProposal message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.gov.v1beta1.MsgSubmitProposal + * @static + * @param {cosmos.gov.v1beta1.MsgSubmitProposal} message MsgSubmitProposal + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgSubmitProposal.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.initialDeposit = []; + if (options.defaults) { + object.content = null; + object.proposer = ""; + } + if (message.content != null && message.hasOwnProperty("content")) + object.content = $root.google.protobuf.Any.toObject(message.content, options); + if (message.initialDeposit && message.initialDeposit.length) { + object.initialDeposit = []; + for (let j = 0; j < message.initialDeposit.length; ++j) + object.initialDeposit[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.initialDeposit[j], options); + } + if (message.proposer != null && message.hasOwnProperty("proposer")) + object.proposer = message.proposer; + return object; + }; + + /** + * Converts this MsgSubmitProposal to JSON. + * @function toJSON + * @memberof cosmos.gov.v1beta1.MsgSubmitProposal + * @instance + * @returns {Object.} JSON object + */ + MsgSubmitProposal.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgSubmitProposal; + })(v1beta1.MsgSubmitProposal || {}); + + v1beta1.MsgSubmitProposalResponse = (function(MsgSubmitProposalResponse) { + + /** + * Properties of a MsgSubmitProposalResponse. + * @memberof cosmos.gov.v1beta1 + * @interface IMsgSubmitProposalResponse + * @property {number|Long|null} [proposalId] MsgSubmitProposalResponse proposalId + */ + + /** + * Constructs a new MsgSubmitProposalResponse. + * @memberof cosmos.gov.v1beta1 + * @classdesc Represents a MsgSubmitProposalResponse. + * @implements IMsgSubmitProposalResponse + * @constructor + * @param {cosmos.gov.v1beta1.IMsgSubmitProposalResponse=} [properties] Properties to set + */ + function MsgSubmitProposalResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgSubmitProposalResponse proposalId. + * @member {number|Long} proposalId + * @memberof cosmos.gov.v1beta1.MsgSubmitProposalResponse + * @instance + */ + MsgSubmitProposalResponse.prototype.proposalId = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new MsgSubmitProposalResponse instance using the specified properties. + * @function create + * @memberof cosmos.gov.v1beta1.MsgSubmitProposalResponse + * @static + * @param {cosmos.gov.v1beta1.IMsgSubmitProposalResponse=} [properties] Properties to set + * @returns {cosmos.gov.v1beta1.MsgSubmitProposalResponse} MsgSubmitProposalResponse instance + */ + MsgSubmitProposalResponse.create = function create(properties) { + return new MsgSubmitProposalResponse(properties); + }; + + /** + * Encodes the specified MsgSubmitProposalResponse message. Does not implicitly {@link cosmos.gov.v1beta1.MsgSubmitProposalResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.gov.v1beta1.MsgSubmitProposalResponse + * @static + * @param {cosmos.gov.v1beta1.IMsgSubmitProposalResponse} message MsgSubmitProposalResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgSubmitProposalResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.proposalId != null && Object.hasOwnProperty.call(message, "proposalId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.proposalId); + return writer; + }; + + /** + * Encodes the specified MsgSubmitProposalResponse message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.MsgSubmitProposalResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.gov.v1beta1.MsgSubmitProposalResponse + * @static + * @param {cosmos.gov.v1beta1.IMsgSubmitProposalResponse} message MsgSubmitProposalResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgSubmitProposalResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgSubmitProposalResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.gov.v1beta1.MsgSubmitProposalResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.gov.v1beta1.MsgSubmitProposalResponse} MsgSubmitProposalResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgSubmitProposalResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1beta1.MsgSubmitProposalResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.proposalId = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgSubmitProposalResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.gov.v1beta1.MsgSubmitProposalResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.gov.v1beta1.MsgSubmitProposalResponse} MsgSubmitProposalResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgSubmitProposalResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgSubmitProposalResponse message. + * @function verify + * @memberof cosmos.gov.v1beta1.MsgSubmitProposalResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgSubmitProposalResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.proposalId != null && message.hasOwnProperty("proposalId")) + if (!$util.isInteger(message.proposalId) && !(message.proposalId && $util.isInteger(message.proposalId.low) && $util.isInteger(message.proposalId.high))) + return "proposalId: integer|Long expected"; + return null; + }; + + /** + * Creates a MsgSubmitProposalResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.gov.v1beta1.MsgSubmitProposalResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.gov.v1beta1.MsgSubmitProposalResponse} MsgSubmitProposalResponse + */ + MsgSubmitProposalResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.gov.v1beta1.MsgSubmitProposalResponse) + return object; + let message = new $root.cosmos.gov.v1beta1.MsgSubmitProposalResponse(); + if (object.proposalId != null) + if ($util.Long) + (message.proposalId = $util.Long.fromValue(object.proposalId)).unsigned = true; + else if (typeof object.proposalId === "string") + message.proposalId = parseInt(object.proposalId, 10); + else if (typeof object.proposalId === "number") + message.proposalId = object.proposalId; + else if (typeof object.proposalId === "object") + message.proposalId = new $util.LongBits(object.proposalId.low >>> 0, object.proposalId.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a MsgSubmitProposalResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.gov.v1beta1.MsgSubmitProposalResponse + * @static + * @param {cosmos.gov.v1beta1.MsgSubmitProposalResponse} message MsgSubmitProposalResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgSubmitProposalResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.proposalId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.proposalId = options.longs === String ? "0" : 0; + if (message.proposalId != null && message.hasOwnProperty("proposalId")) + if (typeof message.proposalId === "number") + object.proposalId = options.longs === String ? String(message.proposalId) : message.proposalId; + else + object.proposalId = options.longs === String ? $util.Long.prototype.toString.call(message.proposalId) : options.longs === Number ? new $util.LongBits(message.proposalId.low >>> 0, message.proposalId.high >>> 0).toNumber(true) : message.proposalId; + return object; + }; + + /** + * Converts this MsgSubmitProposalResponse to JSON. + * @function toJSON + * @memberof cosmos.gov.v1beta1.MsgSubmitProposalResponse + * @instance + * @returns {Object.} JSON object + */ + MsgSubmitProposalResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgSubmitProposalResponse; + })(v1beta1.MsgSubmitProposalResponse || {}); + + v1beta1.MsgVote = (function(MsgVote) { + + /** + * Properties of a MsgVote. + * @memberof cosmos.gov.v1beta1 + * @interface IMsgVote + * @property {number|Long|null} [proposalId] MsgVote proposalId + * @property {string|null} [voter] MsgVote voter + * @property {cosmos.gov.v1beta1.VoteOption|null} [option] MsgVote option + */ + + /** + * Constructs a new MsgVote. + * @memberof cosmos.gov.v1beta1 + * @classdesc Represents a MsgVote. + * @implements IMsgVote + * @constructor + * @param {cosmos.gov.v1beta1.IMsgVote=} [properties] Properties to set + */ + function MsgVote(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgVote proposalId. + * @member {number|Long} proposalId + * @memberof cosmos.gov.v1beta1.MsgVote + * @instance + */ + MsgVote.prototype.proposalId = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * MsgVote voter. + * @member {string} voter + * @memberof cosmos.gov.v1beta1.MsgVote + * @instance + */ + MsgVote.prototype.voter = ""; + + /** + * MsgVote option. + * @member {cosmos.gov.v1beta1.VoteOption} option + * @memberof cosmos.gov.v1beta1.MsgVote + * @instance + */ + MsgVote.prototype.option = 0; + + /** + * Creates a new MsgVote instance using the specified properties. + * @function create + * @memberof cosmos.gov.v1beta1.MsgVote + * @static + * @param {cosmos.gov.v1beta1.IMsgVote=} [properties] Properties to set + * @returns {cosmos.gov.v1beta1.MsgVote} MsgVote instance + */ + MsgVote.create = function create(properties) { + return new MsgVote(properties); + }; + + /** + * Encodes the specified MsgVote message. Does not implicitly {@link cosmos.gov.v1beta1.MsgVote.verify|verify} messages. + * @function encode + * @memberof cosmos.gov.v1beta1.MsgVote + * @static + * @param {cosmos.gov.v1beta1.IMsgVote} message MsgVote message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgVote.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.proposalId != null && Object.hasOwnProperty.call(message, "proposalId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.proposalId); + if (message.voter != null && Object.hasOwnProperty.call(message, "voter")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.voter); + if (message.option != null && Object.hasOwnProperty.call(message, "option")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.option); + return writer; + }; + + /** + * Encodes the specified MsgVote message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.MsgVote.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.gov.v1beta1.MsgVote + * @static + * @param {cosmos.gov.v1beta1.IMsgVote} message MsgVote message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgVote.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgVote message from the specified reader or buffer. + * @function decode + * @memberof cosmos.gov.v1beta1.MsgVote + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.gov.v1beta1.MsgVote} MsgVote + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgVote.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1beta1.MsgVote(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.proposalId = reader.uint64(); + break; + case 2: + message.voter = reader.string(); + break; + case 3: + message.option = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgVote message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.gov.v1beta1.MsgVote + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.gov.v1beta1.MsgVote} MsgVote + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgVote.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgVote message. + * @function verify + * @memberof cosmos.gov.v1beta1.MsgVote + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgVote.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.proposalId != null && message.hasOwnProperty("proposalId")) + if (!$util.isInteger(message.proposalId) && !(message.proposalId && $util.isInteger(message.proposalId.low) && $util.isInteger(message.proposalId.high))) + return "proposalId: integer|Long expected"; + if (message.voter != null && message.hasOwnProperty("voter")) + if (!$util.isString(message.voter)) + return "voter: string expected"; + if (message.option != null && message.hasOwnProperty("option")) + switch (message.option) { + default: + return "option: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + return null; + }; + + /** + * Creates a MsgVote message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.gov.v1beta1.MsgVote + * @static + * @param {Object.} object Plain object + * @returns {cosmos.gov.v1beta1.MsgVote} MsgVote + */ + MsgVote.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.gov.v1beta1.MsgVote) + return object; + let message = new $root.cosmos.gov.v1beta1.MsgVote(); + if (object.proposalId != null) + if ($util.Long) + (message.proposalId = $util.Long.fromValue(object.proposalId)).unsigned = true; + else if (typeof object.proposalId === "string") + message.proposalId = parseInt(object.proposalId, 10); + else if (typeof object.proposalId === "number") + message.proposalId = object.proposalId; + else if (typeof object.proposalId === "object") + message.proposalId = new $util.LongBits(object.proposalId.low >>> 0, object.proposalId.high >>> 0).toNumber(true); + if (object.voter != null) + message.voter = String(object.voter); + switch (object.option) { + case "VOTE_OPTION_UNSPECIFIED": + case 0: + message.option = 0; + break; + case "VOTE_OPTION_YES": + case 1: + message.option = 1; + break; + case "VOTE_OPTION_ABSTAIN": + case 2: + message.option = 2; + break; + case "VOTE_OPTION_NO": + case 3: + message.option = 3; + break; + case "VOTE_OPTION_NO_WITH_VETO": + case 4: + message.option = 4; + break; + } + return message; + }; + + /** + * Creates a plain object from a MsgVote message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.gov.v1beta1.MsgVote + * @static + * @param {cosmos.gov.v1beta1.MsgVote} message MsgVote + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgVote.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.proposalId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.proposalId = options.longs === String ? "0" : 0; + object.voter = ""; + object.option = options.enums === String ? "VOTE_OPTION_UNSPECIFIED" : 0; + } + if (message.proposalId != null && message.hasOwnProperty("proposalId")) + if (typeof message.proposalId === "number") + object.proposalId = options.longs === String ? String(message.proposalId) : message.proposalId; + else + object.proposalId = options.longs === String ? $util.Long.prototype.toString.call(message.proposalId) : options.longs === Number ? new $util.LongBits(message.proposalId.low >>> 0, message.proposalId.high >>> 0).toNumber(true) : message.proposalId; + if (message.voter != null && message.hasOwnProperty("voter")) + object.voter = message.voter; + if (message.option != null && message.hasOwnProperty("option")) + object.option = options.enums === String ? $root.cosmos.gov.v1beta1.VoteOption[message.option] : message.option; + return object; + }; + + /** + * Converts this MsgVote to JSON. + * @function toJSON + * @memberof cosmos.gov.v1beta1.MsgVote + * @instance + * @returns {Object.} JSON object + */ + MsgVote.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgVote; + })(v1beta1.MsgVote || {}); + + v1beta1.MsgVoteResponse = (function(MsgVoteResponse) { + + /** + * Properties of a MsgVoteResponse. + * @memberof cosmos.gov.v1beta1 + * @interface IMsgVoteResponse + */ + + /** + * Constructs a new MsgVoteResponse. + * @memberof cosmos.gov.v1beta1 + * @classdesc Represents a MsgVoteResponse. + * @implements IMsgVoteResponse + * @constructor + * @param {cosmos.gov.v1beta1.IMsgVoteResponse=} [properties] Properties to set + */ + function MsgVoteResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new MsgVoteResponse instance using the specified properties. + * @function create + * @memberof cosmos.gov.v1beta1.MsgVoteResponse + * @static + * @param {cosmos.gov.v1beta1.IMsgVoteResponse=} [properties] Properties to set + * @returns {cosmos.gov.v1beta1.MsgVoteResponse} MsgVoteResponse instance + */ + MsgVoteResponse.create = function create(properties) { + return new MsgVoteResponse(properties); + }; + + /** + * Encodes the specified MsgVoteResponse message. Does not implicitly {@link cosmos.gov.v1beta1.MsgVoteResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.gov.v1beta1.MsgVoteResponse + * @static + * @param {cosmos.gov.v1beta1.IMsgVoteResponse} message MsgVoteResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgVoteResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MsgVoteResponse message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.MsgVoteResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.gov.v1beta1.MsgVoteResponse + * @static + * @param {cosmos.gov.v1beta1.IMsgVoteResponse} message MsgVoteResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgVoteResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgVoteResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.gov.v1beta1.MsgVoteResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.gov.v1beta1.MsgVoteResponse} MsgVoteResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgVoteResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1beta1.MsgVoteResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgVoteResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.gov.v1beta1.MsgVoteResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.gov.v1beta1.MsgVoteResponse} MsgVoteResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgVoteResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgVoteResponse message. + * @function verify + * @memberof cosmos.gov.v1beta1.MsgVoteResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgVoteResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MsgVoteResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.gov.v1beta1.MsgVoteResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.gov.v1beta1.MsgVoteResponse} MsgVoteResponse + */ + MsgVoteResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.gov.v1beta1.MsgVoteResponse) + return object; + return new $root.cosmos.gov.v1beta1.MsgVoteResponse(); + }; + + /** + * Creates a plain object from a MsgVoteResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.gov.v1beta1.MsgVoteResponse + * @static + * @param {cosmos.gov.v1beta1.MsgVoteResponse} message MsgVoteResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgVoteResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MsgVoteResponse to JSON. + * @function toJSON + * @memberof cosmos.gov.v1beta1.MsgVoteResponse + * @instance + * @returns {Object.} JSON object + */ + MsgVoteResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgVoteResponse; + })(v1beta1.MsgVoteResponse || {}); + + v1beta1.MsgDeposit = (function(MsgDeposit) { + + /** + * Properties of a MsgDeposit. + * @memberof cosmos.gov.v1beta1 + * @interface IMsgDeposit + * @property {number|Long|null} [proposalId] MsgDeposit proposalId + * @property {string|null} [depositor] MsgDeposit depositor + * @property {Array.|null} [amount] MsgDeposit amount + */ + + /** + * Constructs a new MsgDeposit. + * @memberof cosmos.gov.v1beta1 + * @classdesc Represents a MsgDeposit. + * @implements IMsgDeposit + * @constructor + * @param {cosmos.gov.v1beta1.IMsgDeposit=} [properties] Properties to set + */ + function MsgDeposit(properties) { + this.amount = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgDeposit proposalId. + * @member {number|Long} proposalId + * @memberof cosmos.gov.v1beta1.MsgDeposit + * @instance + */ + MsgDeposit.prototype.proposalId = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * MsgDeposit depositor. + * @member {string} depositor + * @memberof cosmos.gov.v1beta1.MsgDeposit + * @instance + */ + MsgDeposit.prototype.depositor = ""; + + /** + * MsgDeposit amount. + * @member {Array.} amount + * @memberof cosmos.gov.v1beta1.MsgDeposit + * @instance + */ + MsgDeposit.prototype.amount = $util.emptyArray; + + /** + * Creates a new MsgDeposit instance using the specified properties. + * @function create + * @memberof cosmos.gov.v1beta1.MsgDeposit + * @static + * @param {cosmos.gov.v1beta1.IMsgDeposit=} [properties] Properties to set + * @returns {cosmos.gov.v1beta1.MsgDeposit} MsgDeposit instance + */ + MsgDeposit.create = function create(properties) { + return new MsgDeposit(properties); + }; + + /** + * Encodes the specified MsgDeposit message. Does not implicitly {@link cosmos.gov.v1beta1.MsgDeposit.verify|verify} messages. + * @function encode + * @memberof cosmos.gov.v1beta1.MsgDeposit + * @static + * @param {cosmos.gov.v1beta1.IMsgDeposit} message MsgDeposit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgDeposit.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.proposalId != null && Object.hasOwnProperty.call(message, "proposalId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.proposalId); + if (message.depositor != null && Object.hasOwnProperty.call(message, "depositor")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.depositor); + if (message.amount != null && message.amount.length) + for (let i = 0; i < message.amount.length; ++i) + $root.cosmos.base.v1beta1.Coin.encode(message.amount[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MsgDeposit message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.MsgDeposit.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.gov.v1beta1.MsgDeposit + * @static + * @param {cosmos.gov.v1beta1.IMsgDeposit} message MsgDeposit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgDeposit.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgDeposit message from the specified reader or buffer. + * @function decode + * @memberof cosmos.gov.v1beta1.MsgDeposit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.gov.v1beta1.MsgDeposit} MsgDeposit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgDeposit.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1beta1.MsgDeposit(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.proposalId = reader.uint64(); + break; + case 2: + message.depositor = reader.string(); + break; + case 3: + if (!(message.amount && message.amount.length)) + message.amount = []; + message.amount.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgDeposit message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.gov.v1beta1.MsgDeposit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.gov.v1beta1.MsgDeposit} MsgDeposit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgDeposit.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgDeposit message. + * @function verify + * @memberof cosmos.gov.v1beta1.MsgDeposit + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgDeposit.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.proposalId != null && message.hasOwnProperty("proposalId")) + if (!$util.isInteger(message.proposalId) && !(message.proposalId && $util.isInteger(message.proposalId.low) && $util.isInteger(message.proposalId.high))) + return "proposalId: integer|Long expected"; + if (message.depositor != null && message.hasOwnProperty("depositor")) + if (!$util.isString(message.depositor)) + return "depositor: string expected"; + if (message.amount != null && message.hasOwnProperty("amount")) { + if (!Array.isArray(message.amount)) + return "amount: array expected"; + for (let i = 0; i < message.amount.length; ++i) { + let error = $root.cosmos.base.v1beta1.Coin.verify(message.amount[i]); + if (error) + return "amount." + error; + } + } + return null; + }; + + /** + * Creates a MsgDeposit message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.gov.v1beta1.MsgDeposit + * @static + * @param {Object.} object Plain object + * @returns {cosmos.gov.v1beta1.MsgDeposit} MsgDeposit + */ + MsgDeposit.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.gov.v1beta1.MsgDeposit) + return object; + let message = new $root.cosmos.gov.v1beta1.MsgDeposit(); + if (object.proposalId != null) + if ($util.Long) + (message.proposalId = $util.Long.fromValue(object.proposalId)).unsigned = true; + else if (typeof object.proposalId === "string") + message.proposalId = parseInt(object.proposalId, 10); + else if (typeof object.proposalId === "number") + message.proposalId = object.proposalId; + else if (typeof object.proposalId === "object") + message.proposalId = new $util.LongBits(object.proposalId.low >>> 0, object.proposalId.high >>> 0).toNumber(true); + if (object.depositor != null) + message.depositor = String(object.depositor); + if (object.amount) { + if (!Array.isArray(object.amount)) + throw TypeError(".cosmos.gov.v1beta1.MsgDeposit.amount: array expected"); + message.amount = []; + for (let i = 0; i < object.amount.length; ++i) { + if (typeof object.amount[i] !== "object") + throw TypeError(".cosmos.gov.v1beta1.MsgDeposit.amount: object expected"); + message.amount[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.amount[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a MsgDeposit message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.gov.v1beta1.MsgDeposit + * @static + * @param {cosmos.gov.v1beta1.MsgDeposit} message MsgDeposit + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgDeposit.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.amount = []; + if (options.defaults) { + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.proposalId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.proposalId = options.longs === String ? "0" : 0; + object.depositor = ""; + } + if (message.proposalId != null && message.hasOwnProperty("proposalId")) + if (typeof message.proposalId === "number") + object.proposalId = options.longs === String ? String(message.proposalId) : message.proposalId; + else + object.proposalId = options.longs === String ? $util.Long.prototype.toString.call(message.proposalId) : options.longs === Number ? new $util.LongBits(message.proposalId.low >>> 0, message.proposalId.high >>> 0).toNumber(true) : message.proposalId; + if (message.depositor != null && message.hasOwnProperty("depositor")) + object.depositor = message.depositor; + if (message.amount && message.amount.length) { + object.amount = []; + for (let j = 0; j < message.amount.length; ++j) + object.amount[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.amount[j], options); + } + return object; + }; + + /** + * Converts this MsgDeposit to JSON. + * @function toJSON + * @memberof cosmos.gov.v1beta1.MsgDeposit + * @instance + * @returns {Object.} JSON object + */ + MsgDeposit.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgDeposit; + })(v1beta1.MsgDeposit || {}); + + v1beta1.MsgDepositResponse = (function(MsgDepositResponse) { + + /** + * Properties of a MsgDepositResponse. + * @memberof cosmos.gov.v1beta1 + * @interface IMsgDepositResponse + */ + + /** + * Constructs a new MsgDepositResponse. + * @memberof cosmos.gov.v1beta1 + * @classdesc Represents a MsgDepositResponse. + * @implements IMsgDepositResponse + * @constructor + * @param {cosmos.gov.v1beta1.IMsgDepositResponse=} [properties] Properties to set + */ + function MsgDepositResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new MsgDepositResponse instance using the specified properties. + * @function create + * @memberof cosmos.gov.v1beta1.MsgDepositResponse + * @static + * @param {cosmos.gov.v1beta1.IMsgDepositResponse=} [properties] Properties to set + * @returns {cosmos.gov.v1beta1.MsgDepositResponse} MsgDepositResponse instance + */ + MsgDepositResponse.create = function create(properties) { + return new MsgDepositResponse(properties); + }; + + /** + * Encodes the specified MsgDepositResponse message. Does not implicitly {@link cosmos.gov.v1beta1.MsgDepositResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.gov.v1beta1.MsgDepositResponse + * @static + * @param {cosmos.gov.v1beta1.IMsgDepositResponse} message MsgDepositResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgDepositResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MsgDepositResponse message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.MsgDepositResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.gov.v1beta1.MsgDepositResponse + * @static + * @param {cosmos.gov.v1beta1.IMsgDepositResponse} message MsgDepositResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgDepositResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgDepositResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.gov.v1beta1.MsgDepositResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.gov.v1beta1.MsgDepositResponse} MsgDepositResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgDepositResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1beta1.MsgDepositResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgDepositResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.gov.v1beta1.MsgDepositResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.gov.v1beta1.MsgDepositResponse} MsgDepositResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgDepositResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgDepositResponse message. + * @function verify + * @memberof cosmos.gov.v1beta1.MsgDepositResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgDepositResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MsgDepositResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.gov.v1beta1.MsgDepositResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.gov.v1beta1.MsgDepositResponse} MsgDepositResponse + */ + MsgDepositResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.gov.v1beta1.MsgDepositResponse) + return object; + return new $root.cosmos.gov.v1beta1.MsgDepositResponse(); + }; + + /** + * Creates a plain object from a MsgDepositResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.gov.v1beta1.MsgDepositResponse + * @static + * @param {cosmos.gov.v1beta1.MsgDepositResponse} message MsgDepositResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgDepositResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MsgDepositResponse to JSON. + * @function toJSON + * @memberof cosmos.gov.v1beta1.MsgDepositResponse + * @instance + * @returns {Object.} JSON object + */ + MsgDepositResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgDepositResponse; + })(v1beta1.MsgDepositResponse || {}); + + return v1beta1; + })(gov.v1beta1 || {}); + + return gov; + })(cosmos.gov || {}); + + /** + * Namespace mint. + * @memberof cosmos + * @namespace + */ + + cosmos.mint = (function(mint) { + + /** + * Namespace v1beta1. + * @memberof cosmos.mint + * @namespace + */ + + mint.v1beta1 = (function(v1beta1) { + + v1beta1.GenesisState = (function(GenesisState) { + + /** + * Properties of a GenesisState. + * @memberof cosmos.mint.v1beta1 + * @interface IGenesisState + * @property {cosmos.mint.v1beta1.IMinter|null} [minter] GenesisState minter + * @property {cosmos.mint.v1beta1.IParams|null} [params] GenesisState params + */ + + /** + * Constructs a new GenesisState. + * @memberof cosmos.mint.v1beta1 + * @classdesc Represents a GenesisState. + * @implements IGenesisState + * @constructor + * @param {cosmos.mint.v1beta1.IGenesisState=} [properties] Properties to set + */ + function GenesisState(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GenesisState minter. + * @member {cosmos.mint.v1beta1.IMinter|null|undefined} minter + * @memberof cosmos.mint.v1beta1.GenesisState + * @instance + */ + GenesisState.prototype.minter = null; + + /** + * GenesisState params. + * @member {cosmos.mint.v1beta1.IParams|null|undefined} params + * @memberof cosmos.mint.v1beta1.GenesisState + * @instance + */ + GenesisState.prototype.params = null; + + /** + * Creates a new GenesisState instance using the specified properties. + * @function create + * @memberof cosmos.mint.v1beta1.GenesisState + * @static + * @param {cosmos.mint.v1beta1.IGenesisState=} [properties] Properties to set + * @returns {cosmos.mint.v1beta1.GenesisState} GenesisState instance + */ + GenesisState.create = function create(properties) { + return new GenesisState(properties); + }; + + /** + * Encodes the specified GenesisState message. Does not implicitly {@link cosmos.mint.v1beta1.GenesisState.verify|verify} messages. + * @function encode + * @memberof cosmos.mint.v1beta1.GenesisState + * @static + * @param {cosmos.mint.v1beta1.IGenesisState} message GenesisState message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenesisState.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.minter != null && Object.hasOwnProperty.call(message, "minter")) + $root.cosmos.mint.v1beta1.Minter.encode(message.minter, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.params != null && Object.hasOwnProperty.call(message, "params")) + $root.cosmos.mint.v1beta1.Params.encode(message.params, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GenesisState message, length delimited. Does not implicitly {@link cosmos.mint.v1beta1.GenesisState.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.mint.v1beta1.GenesisState + * @static + * @param {cosmos.mint.v1beta1.IGenesisState} message GenesisState message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenesisState.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GenesisState message from the specified reader or buffer. + * @function decode + * @memberof cosmos.mint.v1beta1.GenesisState + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.mint.v1beta1.GenesisState} GenesisState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenesisState.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.mint.v1beta1.GenesisState(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.minter = $root.cosmos.mint.v1beta1.Minter.decode(reader, reader.uint32()); + break; + case 2: + message.params = $root.cosmos.mint.v1beta1.Params.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GenesisState message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.mint.v1beta1.GenesisState + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.mint.v1beta1.GenesisState} GenesisState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenesisState.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GenesisState message. + * @function verify + * @memberof cosmos.mint.v1beta1.GenesisState + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GenesisState.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.minter != null && message.hasOwnProperty("minter")) { + let error = $root.cosmos.mint.v1beta1.Minter.verify(message.minter); + if (error) + return "minter." + error; + } + if (message.params != null && message.hasOwnProperty("params")) { + let error = $root.cosmos.mint.v1beta1.Params.verify(message.params); + if (error) + return "params." + error; + } + return null; + }; + + /** + * Creates a GenesisState message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.mint.v1beta1.GenesisState + * @static + * @param {Object.} object Plain object + * @returns {cosmos.mint.v1beta1.GenesisState} GenesisState + */ + GenesisState.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.mint.v1beta1.GenesisState) + return object; + let message = new $root.cosmos.mint.v1beta1.GenesisState(); + if (object.minter != null) { + if (typeof object.minter !== "object") + throw TypeError(".cosmos.mint.v1beta1.GenesisState.minter: object expected"); + message.minter = $root.cosmos.mint.v1beta1.Minter.fromObject(object.minter); + } + if (object.params != null) { + if (typeof object.params !== "object") + throw TypeError(".cosmos.mint.v1beta1.GenesisState.params: object expected"); + message.params = $root.cosmos.mint.v1beta1.Params.fromObject(object.params); + } + return message; + }; + + /** + * Creates a plain object from a GenesisState message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.mint.v1beta1.GenesisState + * @static + * @param {cosmos.mint.v1beta1.GenesisState} message GenesisState + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GenesisState.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.minter = null; + object.params = null; + } + if (message.minter != null && message.hasOwnProperty("minter")) + object.minter = $root.cosmos.mint.v1beta1.Minter.toObject(message.minter, options); + if (message.params != null && message.hasOwnProperty("params")) + object.params = $root.cosmos.mint.v1beta1.Params.toObject(message.params, options); + return object; + }; + + /** + * Converts this GenesisState to JSON. + * @function toJSON + * @memberof cosmos.mint.v1beta1.GenesisState + * @instance + * @returns {Object.} JSON object + */ + GenesisState.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GenesisState; + })(v1beta1.GenesisState || {}); + + v1beta1.Minter = (function(Minter) { + + /** + * Properties of a Minter. + * @memberof cosmos.mint.v1beta1 + * @interface IMinter + * @property {string|null} [inflation] Minter inflation + * @property {string|null} [annualProvisions] Minter annualProvisions + */ + + /** + * Constructs a new Minter. + * @memberof cosmos.mint.v1beta1 + * @classdesc Represents a Minter. + * @implements IMinter + * @constructor + * @param {cosmos.mint.v1beta1.IMinter=} [properties] Properties to set + */ + function Minter(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Minter inflation. + * @member {string} inflation + * @memberof cosmos.mint.v1beta1.Minter + * @instance + */ + Minter.prototype.inflation = ""; + + /** + * Minter annualProvisions. + * @member {string} annualProvisions + * @memberof cosmos.mint.v1beta1.Minter + * @instance + */ + Minter.prototype.annualProvisions = ""; + + /** + * Creates a new Minter instance using the specified properties. + * @function create + * @memberof cosmos.mint.v1beta1.Minter + * @static + * @param {cosmos.mint.v1beta1.IMinter=} [properties] Properties to set + * @returns {cosmos.mint.v1beta1.Minter} Minter instance + */ + Minter.create = function create(properties) { + return new Minter(properties); + }; + + /** + * Encodes the specified Minter message. Does not implicitly {@link cosmos.mint.v1beta1.Minter.verify|verify} messages. + * @function encode + * @memberof cosmos.mint.v1beta1.Minter + * @static + * @param {cosmos.mint.v1beta1.IMinter} message Minter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Minter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.inflation != null && Object.hasOwnProperty.call(message, "inflation")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.inflation); + if (message.annualProvisions != null && Object.hasOwnProperty.call(message, "annualProvisions")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.annualProvisions); + return writer; + }; + + /** + * Encodes the specified Minter message, length delimited. Does not implicitly {@link cosmos.mint.v1beta1.Minter.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.mint.v1beta1.Minter + * @static + * @param {cosmos.mint.v1beta1.IMinter} message Minter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Minter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Minter message from the specified reader or buffer. + * @function decode + * @memberof cosmos.mint.v1beta1.Minter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.mint.v1beta1.Minter} Minter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Minter.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.mint.v1beta1.Minter(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.inflation = reader.string(); + break; + case 2: + message.annualProvisions = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Minter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.mint.v1beta1.Minter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.mint.v1beta1.Minter} Minter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Minter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Minter message. + * @function verify + * @memberof cosmos.mint.v1beta1.Minter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Minter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.inflation != null && message.hasOwnProperty("inflation")) + if (!$util.isString(message.inflation)) + return "inflation: string expected"; + if (message.annualProvisions != null && message.hasOwnProperty("annualProvisions")) + if (!$util.isString(message.annualProvisions)) + return "annualProvisions: string expected"; + return null; + }; + + /** + * Creates a Minter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.mint.v1beta1.Minter + * @static + * @param {Object.} object Plain object + * @returns {cosmos.mint.v1beta1.Minter} Minter + */ + Minter.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.mint.v1beta1.Minter) + return object; + let message = new $root.cosmos.mint.v1beta1.Minter(); + if (object.inflation != null) + message.inflation = String(object.inflation); + if (object.annualProvisions != null) + message.annualProvisions = String(object.annualProvisions); + return message; + }; + + /** + * Creates a plain object from a Minter message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.mint.v1beta1.Minter + * @static + * @param {cosmos.mint.v1beta1.Minter} message Minter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Minter.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.inflation = ""; + object.annualProvisions = ""; + } + if (message.inflation != null && message.hasOwnProperty("inflation")) + object.inflation = message.inflation; + if (message.annualProvisions != null && message.hasOwnProperty("annualProvisions")) + object.annualProvisions = message.annualProvisions; + return object; + }; + + /** + * Converts this Minter to JSON. + * @function toJSON + * @memberof cosmos.mint.v1beta1.Minter + * @instance + * @returns {Object.} JSON object + */ + Minter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Minter; + })(v1beta1.Minter || {}); + + v1beta1.Params = (function(Params) { + + /** + * Properties of a Params. + * @memberof cosmos.mint.v1beta1 + * @interface IParams + * @property {string|null} [mintDenom] Params mintDenom + * @property {string|null} [inflationRateChange] Params inflationRateChange + * @property {string|null} [inflationMax] Params inflationMax + * @property {string|null} [inflationMin] Params inflationMin + * @property {string|null} [goalBonded] Params goalBonded + * @property {number|Long|null} [blocksPerYear] Params blocksPerYear + */ + + /** + * Constructs a new Params. + * @memberof cosmos.mint.v1beta1 + * @classdesc Represents a Params. + * @implements IParams + * @constructor + * @param {cosmos.mint.v1beta1.IParams=} [properties] Properties to set + */ + function Params(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Params mintDenom. + * @member {string} mintDenom + * @memberof cosmos.mint.v1beta1.Params + * @instance + */ + Params.prototype.mintDenom = ""; + + /** + * Params inflationRateChange. + * @member {string} inflationRateChange + * @memberof cosmos.mint.v1beta1.Params + * @instance + */ + Params.prototype.inflationRateChange = ""; + + /** + * Params inflationMax. + * @member {string} inflationMax + * @memberof cosmos.mint.v1beta1.Params + * @instance + */ + Params.prototype.inflationMax = ""; + + /** + * Params inflationMin. + * @member {string} inflationMin + * @memberof cosmos.mint.v1beta1.Params + * @instance + */ + Params.prototype.inflationMin = ""; + + /** + * Params goalBonded. + * @member {string} goalBonded + * @memberof cosmos.mint.v1beta1.Params + * @instance + */ + Params.prototype.goalBonded = ""; + + /** + * Params blocksPerYear. + * @member {number|Long} blocksPerYear + * @memberof cosmos.mint.v1beta1.Params + * @instance + */ + Params.prototype.blocksPerYear = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new Params instance using the specified properties. + * @function create + * @memberof cosmos.mint.v1beta1.Params + * @static + * @param {cosmos.mint.v1beta1.IParams=} [properties] Properties to set + * @returns {cosmos.mint.v1beta1.Params} Params instance + */ + Params.create = function create(properties) { + return new Params(properties); + }; + + /** + * Encodes the specified Params message. Does not implicitly {@link cosmos.mint.v1beta1.Params.verify|verify} messages. + * @function encode + * @memberof cosmos.mint.v1beta1.Params + * @static + * @param {cosmos.mint.v1beta1.IParams} message Params message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Params.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.mintDenom != null && Object.hasOwnProperty.call(message, "mintDenom")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.mintDenom); + if (message.inflationRateChange != null && Object.hasOwnProperty.call(message, "inflationRateChange")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.inflationRateChange); + if (message.inflationMax != null && Object.hasOwnProperty.call(message, "inflationMax")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.inflationMax); + if (message.inflationMin != null && Object.hasOwnProperty.call(message, "inflationMin")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.inflationMin); + if (message.goalBonded != null && Object.hasOwnProperty.call(message, "goalBonded")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.goalBonded); + if (message.blocksPerYear != null && Object.hasOwnProperty.call(message, "blocksPerYear")) + writer.uint32(/* id 6, wireType 0 =*/48).uint64(message.blocksPerYear); + return writer; + }; + + /** + * Encodes the specified Params message, length delimited. Does not implicitly {@link cosmos.mint.v1beta1.Params.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.mint.v1beta1.Params + * @static + * @param {cosmos.mint.v1beta1.IParams} message Params message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Params.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Params message from the specified reader or buffer. + * @function decode + * @memberof cosmos.mint.v1beta1.Params + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.mint.v1beta1.Params} Params + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Params.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.mint.v1beta1.Params(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.mintDenom = reader.string(); + break; + case 2: + message.inflationRateChange = reader.string(); + break; + case 3: + message.inflationMax = reader.string(); + break; + case 4: + message.inflationMin = reader.string(); + break; + case 5: + message.goalBonded = reader.string(); + break; + case 6: + message.blocksPerYear = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Params message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.mint.v1beta1.Params + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.mint.v1beta1.Params} Params + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Params.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Params message. + * @function verify + * @memberof cosmos.mint.v1beta1.Params + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Params.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.mintDenom != null && message.hasOwnProperty("mintDenom")) + if (!$util.isString(message.mintDenom)) + return "mintDenom: string expected"; + if (message.inflationRateChange != null && message.hasOwnProperty("inflationRateChange")) + if (!$util.isString(message.inflationRateChange)) + return "inflationRateChange: string expected"; + if (message.inflationMax != null && message.hasOwnProperty("inflationMax")) + if (!$util.isString(message.inflationMax)) + return "inflationMax: string expected"; + if (message.inflationMin != null && message.hasOwnProperty("inflationMin")) + if (!$util.isString(message.inflationMin)) + return "inflationMin: string expected"; + if (message.goalBonded != null && message.hasOwnProperty("goalBonded")) + if (!$util.isString(message.goalBonded)) + return "goalBonded: string expected"; + if (message.blocksPerYear != null && message.hasOwnProperty("blocksPerYear")) + if (!$util.isInteger(message.blocksPerYear) && !(message.blocksPerYear && $util.isInteger(message.blocksPerYear.low) && $util.isInteger(message.blocksPerYear.high))) + return "blocksPerYear: integer|Long expected"; + return null; + }; + + /** + * Creates a Params message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.mint.v1beta1.Params + * @static + * @param {Object.} object Plain object + * @returns {cosmos.mint.v1beta1.Params} Params + */ + Params.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.mint.v1beta1.Params) + return object; + let message = new $root.cosmos.mint.v1beta1.Params(); + if (object.mintDenom != null) + message.mintDenom = String(object.mintDenom); + if (object.inflationRateChange != null) + message.inflationRateChange = String(object.inflationRateChange); + if (object.inflationMax != null) + message.inflationMax = String(object.inflationMax); + if (object.inflationMin != null) + message.inflationMin = String(object.inflationMin); + if (object.goalBonded != null) + message.goalBonded = String(object.goalBonded); + if (object.blocksPerYear != null) + if ($util.Long) + (message.blocksPerYear = $util.Long.fromValue(object.blocksPerYear)).unsigned = true; + else if (typeof object.blocksPerYear === "string") + message.blocksPerYear = parseInt(object.blocksPerYear, 10); + else if (typeof object.blocksPerYear === "number") + message.blocksPerYear = object.blocksPerYear; + else if (typeof object.blocksPerYear === "object") + message.blocksPerYear = new $util.LongBits(object.blocksPerYear.low >>> 0, object.blocksPerYear.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a Params message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.mint.v1beta1.Params + * @static + * @param {cosmos.mint.v1beta1.Params} message Params + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Params.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.mintDenom = ""; + object.inflationRateChange = ""; + object.inflationMax = ""; + object.inflationMin = ""; + object.goalBonded = ""; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.blocksPerYear = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.blocksPerYear = options.longs === String ? "0" : 0; + } + if (message.mintDenom != null && message.hasOwnProperty("mintDenom")) + object.mintDenom = message.mintDenom; + if (message.inflationRateChange != null && message.hasOwnProperty("inflationRateChange")) + object.inflationRateChange = message.inflationRateChange; + if (message.inflationMax != null && message.hasOwnProperty("inflationMax")) + object.inflationMax = message.inflationMax; + if (message.inflationMin != null && message.hasOwnProperty("inflationMin")) + object.inflationMin = message.inflationMin; + if (message.goalBonded != null && message.hasOwnProperty("goalBonded")) + object.goalBonded = message.goalBonded; + if (message.blocksPerYear != null && message.hasOwnProperty("blocksPerYear")) + if (typeof message.blocksPerYear === "number") + object.blocksPerYear = options.longs === String ? String(message.blocksPerYear) : message.blocksPerYear; + else + object.blocksPerYear = options.longs === String ? $util.Long.prototype.toString.call(message.blocksPerYear) : options.longs === Number ? new $util.LongBits(message.blocksPerYear.low >>> 0, message.blocksPerYear.high >>> 0).toNumber(true) : message.blocksPerYear; + return object; + }; + + /** + * Converts this Params to JSON. + * @function toJSON + * @memberof cosmos.mint.v1beta1.Params + * @instance + * @returns {Object.} JSON object + */ + Params.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Params; + })(v1beta1.Params || {}); + + v1beta1.Query = (function(Query) { + + /** + * Constructs a new Query service. + * @memberof cosmos.mint.v1beta1 + * @classdesc Represents a Query + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Query(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Query.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Query; + + /** + * Creates new Query service using the specified rpc implementation. + * @function create + * @memberof cosmos.mint.v1beta1.Query + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Query} RPC service. Useful where requests and/or responses are streamed. + */ + Query.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link cosmos.mint.v1beta1.Query#params}. + * @memberof cosmos.mint.v1beta1.Query + * @typedef ParamsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.mint.v1beta1.IQueryParamsResponse} [response] QueryParamsResponse + */ + + /** + * Calls Params. + * @function params + * @memberof cosmos.mint.v1beta1.Query + * @instance + * @param {cosmos.mint.v1beta1.IQueryParamsRequest} request QueryParamsRequest message or plain object + * @param {cosmos.mint.v1beta1.Query.ParamsCallback} callback Node-style callback called with the error, if any, and QueryParamsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.params = function params(request, callback) { + return this.rpcCall(params, $root.cosmos.mint.v1beta1.QueryParamsRequest, $root.cosmos.mint.v1beta1.QueryParamsResponse, request, callback); + }, "name", { value: "Params" }); + + /** + * Calls Params. + * @function params + * @memberof cosmos.mint.v1beta1.Query + * @instance + * @param {cosmos.mint.v1beta1.IQueryParamsRequest} request QueryParamsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link cosmos.mint.v1beta1.Query#inflation}. + * @memberof cosmos.mint.v1beta1.Query + * @typedef InflationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.mint.v1beta1.IQueryInflationResponse} [response] QueryInflationResponse + */ + + /** + * Calls Inflation. + * @function inflation + * @memberof cosmos.mint.v1beta1.Query + * @instance + * @param {cosmos.mint.v1beta1.IQueryInflationRequest} request QueryInflationRequest message or plain object + * @param {cosmos.mint.v1beta1.Query.InflationCallback} callback Node-style callback called with the error, if any, and QueryInflationResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.inflation = function inflation(request, callback) { + return this.rpcCall(inflation, $root.cosmos.mint.v1beta1.QueryInflationRequest, $root.cosmos.mint.v1beta1.QueryInflationResponse, request, callback); + }, "name", { value: "Inflation" }); + + /** + * Calls Inflation. + * @function inflation + * @memberof cosmos.mint.v1beta1.Query + * @instance + * @param {cosmos.mint.v1beta1.IQueryInflationRequest} request QueryInflationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link cosmos.mint.v1beta1.Query#annualProvisions}. + * @memberof cosmos.mint.v1beta1.Query + * @typedef AnnualProvisionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.mint.v1beta1.IQueryAnnualProvisionsResponse} [response] QueryAnnualProvisionsResponse + */ + + /** + * Calls AnnualProvisions. + * @function annualProvisions + * @memberof cosmos.mint.v1beta1.Query + * @instance + * @param {cosmos.mint.v1beta1.IQueryAnnualProvisionsRequest} request QueryAnnualProvisionsRequest message or plain object + * @param {cosmos.mint.v1beta1.Query.AnnualProvisionsCallback} callback Node-style callback called with the error, if any, and QueryAnnualProvisionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.annualProvisions = function annualProvisions(request, callback) { + return this.rpcCall(annualProvisions, $root.cosmos.mint.v1beta1.QueryAnnualProvisionsRequest, $root.cosmos.mint.v1beta1.QueryAnnualProvisionsResponse, request, callback); + }, "name", { value: "AnnualProvisions" }); + + /** + * Calls AnnualProvisions. + * @function annualProvisions + * @memberof cosmos.mint.v1beta1.Query + * @instance + * @param {cosmos.mint.v1beta1.IQueryAnnualProvisionsRequest} request QueryAnnualProvisionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Query; + })(v1beta1.Query || {}); + + v1beta1.QueryParamsRequest = (function(QueryParamsRequest) { + + /** + * Properties of a QueryParamsRequest. + * @memberof cosmos.mint.v1beta1 + * @interface IQueryParamsRequest + */ + + /** + * Constructs a new QueryParamsRequest. + * @memberof cosmos.mint.v1beta1 + * @classdesc Represents a QueryParamsRequest. + * @implements IQueryParamsRequest + * @constructor + * @param {cosmos.mint.v1beta1.IQueryParamsRequest=} [properties] Properties to set + */ + function QueryParamsRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new QueryParamsRequest instance using the specified properties. + * @function create + * @memberof cosmos.mint.v1beta1.QueryParamsRequest + * @static + * @param {cosmos.mint.v1beta1.IQueryParamsRequest=} [properties] Properties to set + * @returns {cosmos.mint.v1beta1.QueryParamsRequest} QueryParamsRequest instance + */ + QueryParamsRequest.create = function create(properties) { + return new QueryParamsRequest(properties); + }; + + /** + * Encodes the specified QueryParamsRequest message. Does not implicitly {@link cosmos.mint.v1beta1.QueryParamsRequest.verify|verify} messages. + * @function encode + * @memberof cosmos.mint.v1beta1.QueryParamsRequest + * @static + * @param {cosmos.mint.v1beta1.IQueryParamsRequest} message QueryParamsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryParamsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified QueryParamsRequest message, length delimited. Does not implicitly {@link cosmos.mint.v1beta1.QueryParamsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.mint.v1beta1.QueryParamsRequest + * @static + * @param {cosmos.mint.v1beta1.IQueryParamsRequest} message QueryParamsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryParamsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryParamsRequest message from the specified reader or buffer. + * @function decode + * @memberof cosmos.mint.v1beta1.QueryParamsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.mint.v1beta1.QueryParamsRequest} QueryParamsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryParamsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.mint.v1beta1.QueryParamsRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryParamsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.mint.v1beta1.QueryParamsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.mint.v1beta1.QueryParamsRequest} QueryParamsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryParamsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryParamsRequest message. + * @function verify + * @memberof cosmos.mint.v1beta1.QueryParamsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryParamsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a QueryParamsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.mint.v1beta1.QueryParamsRequest + * @static + * @param {Object.} object Plain object + * @returns {cosmos.mint.v1beta1.QueryParamsRequest} QueryParamsRequest + */ + QueryParamsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.mint.v1beta1.QueryParamsRequest) + return object; + return new $root.cosmos.mint.v1beta1.QueryParamsRequest(); + }; + + /** + * Creates a plain object from a QueryParamsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.mint.v1beta1.QueryParamsRequest + * @static + * @param {cosmos.mint.v1beta1.QueryParamsRequest} message QueryParamsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryParamsRequest.toObject = function toObject() { + return {}; + }; + + /** + * Converts this QueryParamsRequest to JSON. + * @function toJSON + * @memberof cosmos.mint.v1beta1.QueryParamsRequest + * @instance + * @returns {Object.} JSON object + */ + QueryParamsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryParamsRequest; + })(v1beta1.QueryParamsRequest || {}); + + v1beta1.QueryParamsResponse = (function(QueryParamsResponse) { + + /** + * Properties of a QueryParamsResponse. + * @memberof cosmos.mint.v1beta1 + * @interface IQueryParamsResponse + * @property {cosmos.mint.v1beta1.IParams|null} [params] QueryParamsResponse params + */ + + /** + * Constructs a new QueryParamsResponse. + * @memberof cosmos.mint.v1beta1 + * @classdesc Represents a QueryParamsResponse. + * @implements IQueryParamsResponse + * @constructor + * @param {cosmos.mint.v1beta1.IQueryParamsResponse=} [properties] Properties to set + */ + function QueryParamsResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryParamsResponse params. + * @member {cosmos.mint.v1beta1.IParams|null|undefined} params + * @memberof cosmos.mint.v1beta1.QueryParamsResponse + * @instance + */ + QueryParamsResponse.prototype.params = null; + + /** + * Creates a new QueryParamsResponse instance using the specified properties. + * @function create + * @memberof cosmos.mint.v1beta1.QueryParamsResponse + * @static + * @param {cosmos.mint.v1beta1.IQueryParamsResponse=} [properties] Properties to set + * @returns {cosmos.mint.v1beta1.QueryParamsResponse} QueryParamsResponse instance + */ + QueryParamsResponse.create = function create(properties) { + return new QueryParamsResponse(properties); + }; + + /** + * Encodes the specified QueryParamsResponse message. Does not implicitly {@link cosmos.mint.v1beta1.QueryParamsResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.mint.v1beta1.QueryParamsResponse + * @static + * @param {cosmos.mint.v1beta1.IQueryParamsResponse} message QueryParamsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryParamsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.params != null && Object.hasOwnProperty.call(message, "params")) + $root.cosmos.mint.v1beta1.Params.encode(message.params, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryParamsResponse message, length delimited. Does not implicitly {@link cosmos.mint.v1beta1.QueryParamsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.mint.v1beta1.QueryParamsResponse + * @static + * @param {cosmos.mint.v1beta1.IQueryParamsResponse} message QueryParamsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryParamsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryParamsResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.mint.v1beta1.QueryParamsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.mint.v1beta1.QueryParamsResponse} QueryParamsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryParamsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.mint.v1beta1.QueryParamsResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.params = $root.cosmos.mint.v1beta1.Params.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryParamsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.mint.v1beta1.QueryParamsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.mint.v1beta1.QueryParamsResponse} QueryParamsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryParamsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryParamsResponse message. + * @function verify + * @memberof cosmos.mint.v1beta1.QueryParamsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryParamsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.params != null && message.hasOwnProperty("params")) { + let error = $root.cosmos.mint.v1beta1.Params.verify(message.params); + if (error) + return "params." + error; + } + return null; + }; + + /** + * Creates a QueryParamsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.mint.v1beta1.QueryParamsResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.mint.v1beta1.QueryParamsResponse} QueryParamsResponse + */ + QueryParamsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.mint.v1beta1.QueryParamsResponse) + return object; + let message = new $root.cosmos.mint.v1beta1.QueryParamsResponse(); + if (object.params != null) { + if (typeof object.params !== "object") + throw TypeError(".cosmos.mint.v1beta1.QueryParamsResponse.params: object expected"); + message.params = $root.cosmos.mint.v1beta1.Params.fromObject(object.params); + } + return message; + }; + + /** + * Creates a plain object from a QueryParamsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.mint.v1beta1.QueryParamsResponse + * @static + * @param {cosmos.mint.v1beta1.QueryParamsResponse} message QueryParamsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryParamsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.params = null; + if (message.params != null && message.hasOwnProperty("params")) + object.params = $root.cosmos.mint.v1beta1.Params.toObject(message.params, options); + return object; + }; + + /** + * Converts this QueryParamsResponse to JSON. + * @function toJSON + * @memberof cosmos.mint.v1beta1.QueryParamsResponse + * @instance + * @returns {Object.} JSON object + */ + QueryParamsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryParamsResponse; + })(v1beta1.QueryParamsResponse || {}); + + v1beta1.QueryInflationRequest = (function(QueryInflationRequest) { + + /** + * Properties of a QueryInflationRequest. + * @memberof cosmos.mint.v1beta1 + * @interface IQueryInflationRequest + */ + + /** + * Constructs a new QueryInflationRequest. + * @memberof cosmos.mint.v1beta1 + * @classdesc Represents a QueryInflationRequest. + * @implements IQueryInflationRequest + * @constructor + * @param {cosmos.mint.v1beta1.IQueryInflationRequest=} [properties] Properties to set + */ + function QueryInflationRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new QueryInflationRequest instance using the specified properties. + * @function create + * @memberof cosmos.mint.v1beta1.QueryInflationRequest + * @static + * @param {cosmos.mint.v1beta1.IQueryInflationRequest=} [properties] Properties to set + * @returns {cosmos.mint.v1beta1.QueryInflationRequest} QueryInflationRequest instance + */ + QueryInflationRequest.create = function create(properties) { + return new QueryInflationRequest(properties); + }; + + /** + * Encodes the specified QueryInflationRequest message. Does not implicitly {@link cosmos.mint.v1beta1.QueryInflationRequest.verify|verify} messages. + * @function encode + * @memberof cosmos.mint.v1beta1.QueryInflationRequest + * @static + * @param {cosmos.mint.v1beta1.IQueryInflationRequest} message QueryInflationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryInflationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified QueryInflationRequest message, length delimited. Does not implicitly {@link cosmos.mint.v1beta1.QueryInflationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.mint.v1beta1.QueryInflationRequest + * @static + * @param {cosmos.mint.v1beta1.IQueryInflationRequest} message QueryInflationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryInflationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryInflationRequest message from the specified reader or buffer. + * @function decode + * @memberof cosmos.mint.v1beta1.QueryInflationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.mint.v1beta1.QueryInflationRequest} QueryInflationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryInflationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.mint.v1beta1.QueryInflationRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryInflationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.mint.v1beta1.QueryInflationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.mint.v1beta1.QueryInflationRequest} QueryInflationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryInflationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryInflationRequest message. + * @function verify + * @memberof cosmos.mint.v1beta1.QueryInflationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryInflationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a QueryInflationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.mint.v1beta1.QueryInflationRequest + * @static + * @param {Object.} object Plain object + * @returns {cosmos.mint.v1beta1.QueryInflationRequest} QueryInflationRequest + */ + QueryInflationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.mint.v1beta1.QueryInflationRequest) + return object; + return new $root.cosmos.mint.v1beta1.QueryInflationRequest(); + }; + + /** + * Creates a plain object from a QueryInflationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.mint.v1beta1.QueryInflationRequest + * @static + * @param {cosmos.mint.v1beta1.QueryInflationRequest} message QueryInflationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryInflationRequest.toObject = function toObject() { + return {}; + }; + + /** + * Converts this QueryInflationRequest to JSON. + * @function toJSON + * @memberof cosmos.mint.v1beta1.QueryInflationRequest + * @instance + * @returns {Object.} JSON object + */ + QueryInflationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryInflationRequest; + })(v1beta1.QueryInflationRequest || {}); + + v1beta1.QueryInflationResponse = (function(QueryInflationResponse) { + + /** + * Properties of a QueryInflationResponse. + * @memberof cosmos.mint.v1beta1 + * @interface IQueryInflationResponse + * @property {Uint8Array|null} [inflation] QueryInflationResponse inflation + */ + + /** + * Constructs a new QueryInflationResponse. + * @memberof cosmos.mint.v1beta1 + * @classdesc Represents a QueryInflationResponse. + * @implements IQueryInflationResponse + * @constructor + * @param {cosmos.mint.v1beta1.IQueryInflationResponse=} [properties] Properties to set + */ + function QueryInflationResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryInflationResponse inflation. + * @member {Uint8Array} inflation + * @memberof cosmos.mint.v1beta1.QueryInflationResponse + * @instance + */ + QueryInflationResponse.prototype.inflation = $util.newBuffer([]); + + /** + * Creates a new QueryInflationResponse instance using the specified properties. + * @function create + * @memberof cosmos.mint.v1beta1.QueryInflationResponse + * @static + * @param {cosmos.mint.v1beta1.IQueryInflationResponse=} [properties] Properties to set + * @returns {cosmos.mint.v1beta1.QueryInflationResponse} QueryInflationResponse instance + */ + QueryInflationResponse.create = function create(properties) { + return new QueryInflationResponse(properties); + }; + + /** + * Encodes the specified QueryInflationResponse message. Does not implicitly {@link cosmos.mint.v1beta1.QueryInflationResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.mint.v1beta1.QueryInflationResponse + * @static + * @param {cosmos.mint.v1beta1.IQueryInflationResponse} message QueryInflationResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryInflationResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.inflation != null && Object.hasOwnProperty.call(message, "inflation")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.inflation); + return writer; + }; + + /** + * Encodes the specified QueryInflationResponse message, length delimited. Does not implicitly {@link cosmos.mint.v1beta1.QueryInflationResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.mint.v1beta1.QueryInflationResponse + * @static + * @param {cosmos.mint.v1beta1.IQueryInflationResponse} message QueryInflationResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryInflationResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryInflationResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.mint.v1beta1.QueryInflationResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.mint.v1beta1.QueryInflationResponse} QueryInflationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryInflationResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.mint.v1beta1.QueryInflationResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.inflation = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryInflationResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.mint.v1beta1.QueryInflationResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.mint.v1beta1.QueryInflationResponse} QueryInflationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryInflationResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryInflationResponse message. + * @function verify + * @memberof cosmos.mint.v1beta1.QueryInflationResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryInflationResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.inflation != null && message.hasOwnProperty("inflation")) + if (!(message.inflation && typeof message.inflation.length === "number" || $util.isString(message.inflation))) + return "inflation: buffer expected"; + return null; + }; + + /** + * Creates a QueryInflationResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.mint.v1beta1.QueryInflationResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.mint.v1beta1.QueryInflationResponse} QueryInflationResponse + */ + QueryInflationResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.mint.v1beta1.QueryInflationResponse) + return object; + let message = new $root.cosmos.mint.v1beta1.QueryInflationResponse(); + if (object.inflation != null) + if (typeof object.inflation === "string") + $util.base64.decode(object.inflation, message.inflation = $util.newBuffer($util.base64.length(object.inflation)), 0); + else if (object.inflation.length) + message.inflation = object.inflation; + return message; + }; + + /** + * Creates a plain object from a QueryInflationResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.mint.v1beta1.QueryInflationResponse + * @static + * @param {cosmos.mint.v1beta1.QueryInflationResponse} message QueryInflationResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryInflationResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + if (options.bytes === String) + object.inflation = ""; + else { + object.inflation = []; + if (options.bytes !== Array) + object.inflation = $util.newBuffer(object.inflation); + } + if (message.inflation != null && message.hasOwnProperty("inflation")) + object.inflation = options.bytes === String ? $util.base64.encode(message.inflation, 0, message.inflation.length) : options.bytes === Array ? Array.prototype.slice.call(message.inflation) : message.inflation; + return object; + }; + + /** + * Converts this QueryInflationResponse to JSON. + * @function toJSON + * @memberof cosmos.mint.v1beta1.QueryInflationResponse + * @instance + * @returns {Object.} JSON object + */ + QueryInflationResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryInflationResponse; + })(v1beta1.QueryInflationResponse || {}); + + v1beta1.QueryAnnualProvisionsRequest = (function(QueryAnnualProvisionsRequest) { + + /** + * Properties of a QueryAnnualProvisionsRequest. + * @memberof cosmos.mint.v1beta1 + * @interface IQueryAnnualProvisionsRequest + */ + + /** + * Constructs a new QueryAnnualProvisionsRequest. + * @memberof cosmos.mint.v1beta1 + * @classdesc Represents a QueryAnnualProvisionsRequest. + * @implements IQueryAnnualProvisionsRequest + * @constructor + * @param {cosmos.mint.v1beta1.IQueryAnnualProvisionsRequest=} [properties] Properties to set + */ + function QueryAnnualProvisionsRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new QueryAnnualProvisionsRequest instance using the specified properties. + * @function create + * @memberof cosmos.mint.v1beta1.QueryAnnualProvisionsRequest + * @static + * @param {cosmos.mint.v1beta1.IQueryAnnualProvisionsRequest=} [properties] Properties to set + * @returns {cosmos.mint.v1beta1.QueryAnnualProvisionsRequest} QueryAnnualProvisionsRequest instance + */ + QueryAnnualProvisionsRequest.create = function create(properties) { + return new QueryAnnualProvisionsRequest(properties); + }; + + /** + * Encodes the specified QueryAnnualProvisionsRequest message. Does not implicitly {@link cosmos.mint.v1beta1.QueryAnnualProvisionsRequest.verify|verify} messages. + * @function encode + * @memberof cosmos.mint.v1beta1.QueryAnnualProvisionsRequest + * @static + * @param {cosmos.mint.v1beta1.IQueryAnnualProvisionsRequest} message QueryAnnualProvisionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryAnnualProvisionsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified QueryAnnualProvisionsRequest message, length delimited. Does not implicitly {@link cosmos.mint.v1beta1.QueryAnnualProvisionsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.mint.v1beta1.QueryAnnualProvisionsRequest + * @static + * @param {cosmos.mint.v1beta1.IQueryAnnualProvisionsRequest} message QueryAnnualProvisionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryAnnualProvisionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryAnnualProvisionsRequest message from the specified reader or buffer. + * @function decode + * @memberof cosmos.mint.v1beta1.QueryAnnualProvisionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.mint.v1beta1.QueryAnnualProvisionsRequest} QueryAnnualProvisionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryAnnualProvisionsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.mint.v1beta1.QueryAnnualProvisionsRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryAnnualProvisionsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.mint.v1beta1.QueryAnnualProvisionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.mint.v1beta1.QueryAnnualProvisionsRequest} QueryAnnualProvisionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryAnnualProvisionsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryAnnualProvisionsRequest message. + * @function verify + * @memberof cosmos.mint.v1beta1.QueryAnnualProvisionsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryAnnualProvisionsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a QueryAnnualProvisionsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.mint.v1beta1.QueryAnnualProvisionsRequest + * @static + * @param {Object.} object Plain object + * @returns {cosmos.mint.v1beta1.QueryAnnualProvisionsRequest} QueryAnnualProvisionsRequest + */ + QueryAnnualProvisionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.mint.v1beta1.QueryAnnualProvisionsRequest) + return object; + return new $root.cosmos.mint.v1beta1.QueryAnnualProvisionsRequest(); + }; + + /** + * Creates a plain object from a QueryAnnualProvisionsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.mint.v1beta1.QueryAnnualProvisionsRequest + * @static + * @param {cosmos.mint.v1beta1.QueryAnnualProvisionsRequest} message QueryAnnualProvisionsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryAnnualProvisionsRequest.toObject = function toObject() { + return {}; + }; + + /** + * Converts this QueryAnnualProvisionsRequest to JSON. + * @function toJSON + * @memberof cosmos.mint.v1beta1.QueryAnnualProvisionsRequest + * @instance + * @returns {Object.} JSON object + */ + QueryAnnualProvisionsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryAnnualProvisionsRequest; + })(v1beta1.QueryAnnualProvisionsRequest || {}); + + v1beta1.QueryAnnualProvisionsResponse = (function(QueryAnnualProvisionsResponse) { + + /** + * Properties of a QueryAnnualProvisionsResponse. + * @memberof cosmos.mint.v1beta1 + * @interface IQueryAnnualProvisionsResponse + * @property {Uint8Array|null} [annualProvisions] QueryAnnualProvisionsResponse annualProvisions + */ + + /** + * Constructs a new QueryAnnualProvisionsResponse. + * @memberof cosmos.mint.v1beta1 + * @classdesc Represents a QueryAnnualProvisionsResponse. + * @implements IQueryAnnualProvisionsResponse + * @constructor + * @param {cosmos.mint.v1beta1.IQueryAnnualProvisionsResponse=} [properties] Properties to set + */ + function QueryAnnualProvisionsResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryAnnualProvisionsResponse annualProvisions. + * @member {Uint8Array} annualProvisions + * @memberof cosmos.mint.v1beta1.QueryAnnualProvisionsResponse + * @instance + */ + QueryAnnualProvisionsResponse.prototype.annualProvisions = $util.newBuffer([]); + + /** + * Creates a new QueryAnnualProvisionsResponse instance using the specified properties. + * @function create + * @memberof cosmos.mint.v1beta1.QueryAnnualProvisionsResponse + * @static + * @param {cosmos.mint.v1beta1.IQueryAnnualProvisionsResponse=} [properties] Properties to set + * @returns {cosmos.mint.v1beta1.QueryAnnualProvisionsResponse} QueryAnnualProvisionsResponse instance + */ + QueryAnnualProvisionsResponse.create = function create(properties) { + return new QueryAnnualProvisionsResponse(properties); + }; + + /** + * Encodes the specified QueryAnnualProvisionsResponse message. Does not implicitly {@link cosmos.mint.v1beta1.QueryAnnualProvisionsResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.mint.v1beta1.QueryAnnualProvisionsResponse + * @static + * @param {cosmos.mint.v1beta1.IQueryAnnualProvisionsResponse} message QueryAnnualProvisionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryAnnualProvisionsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.annualProvisions != null && Object.hasOwnProperty.call(message, "annualProvisions")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.annualProvisions); + return writer; + }; + + /** + * Encodes the specified QueryAnnualProvisionsResponse message, length delimited. Does not implicitly {@link cosmos.mint.v1beta1.QueryAnnualProvisionsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.mint.v1beta1.QueryAnnualProvisionsResponse + * @static + * @param {cosmos.mint.v1beta1.IQueryAnnualProvisionsResponse} message QueryAnnualProvisionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryAnnualProvisionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryAnnualProvisionsResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.mint.v1beta1.QueryAnnualProvisionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.mint.v1beta1.QueryAnnualProvisionsResponse} QueryAnnualProvisionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryAnnualProvisionsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.mint.v1beta1.QueryAnnualProvisionsResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.annualProvisions = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryAnnualProvisionsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.mint.v1beta1.QueryAnnualProvisionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.mint.v1beta1.QueryAnnualProvisionsResponse} QueryAnnualProvisionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryAnnualProvisionsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryAnnualProvisionsResponse message. + * @function verify + * @memberof cosmos.mint.v1beta1.QueryAnnualProvisionsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryAnnualProvisionsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.annualProvisions != null && message.hasOwnProperty("annualProvisions")) + if (!(message.annualProvisions && typeof message.annualProvisions.length === "number" || $util.isString(message.annualProvisions))) + return "annualProvisions: buffer expected"; + return null; + }; + + /** + * Creates a QueryAnnualProvisionsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.mint.v1beta1.QueryAnnualProvisionsResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.mint.v1beta1.QueryAnnualProvisionsResponse} QueryAnnualProvisionsResponse + */ + QueryAnnualProvisionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.mint.v1beta1.QueryAnnualProvisionsResponse) + return object; + let message = new $root.cosmos.mint.v1beta1.QueryAnnualProvisionsResponse(); + if (object.annualProvisions != null) + if (typeof object.annualProvisions === "string") + $util.base64.decode(object.annualProvisions, message.annualProvisions = $util.newBuffer($util.base64.length(object.annualProvisions)), 0); + else if (object.annualProvisions.length) + message.annualProvisions = object.annualProvisions; + return message; + }; + + /** + * Creates a plain object from a QueryAnnualProvisionsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.mint.v1beta1.QueryAnnualProvisionsResponse + * @static + * @param {cosmos.mint.v1beta1.QueryAnnualProvisionsResponse} message QueryAnnualProvisionsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryAnnualProvisionsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + if (options.bytes === String) + object.annualProvisions = ""; + else { + object.annualProvisions = []; + if (options.bytes !== Array) + object.annualProvisions = $util.newBuffer(object.annualProvisions); + } + if (message.annualProvisions != null && message.hasOwnProperty("annualProvisions")) + object.annualProvisions = options.bytes === String ? $util.base64.encode(message.annualProvisions, 0, message.annualProvisions.length) : options.bytes === Array ? Array.prototype.slice.call(message.annualProvisions) : message.annualProvisions; + return object; + }; + + /** + * Converts this QueryAnnualProvisionsResponse to JSON. + * @function toJSON + * @memberof cosmos.mint.v1beta1.QueryAnnualProvisionsResponse + * @instance + * @returns {Object.} JSON object + */ + QueryAnnualProvisionsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryAnnualProvisionsResponse; + })(v1beta1.QueryAnnualProvisionsResponse || {}); + + return v1beta1; + })(mint.v1beta1 || {}); + + return mint; + })(cosmos.mint || {}); + + /** + * Namespace params. + * @memberof cosmos + * @namespace + */ + + cosmos.params = (function(params) { + + /** + * Namespace v1beta1. + * @memberof cosmos.params + * @namespace + */ + + params.v1beta1 = (function(v1beta1) { + + v1beta1.ParameterChangeProposal = (function(ParameterChangeProposal) { + + /** + * Properties of a ParameterChangeProposal. + * @memberof cosmos.params.v1beta1 + * @interface IParameterChangeProposal + * @property {string|null} [title] ParameterChangeProposal title + * @property {string|null} [description] ParameterChangeProposal description + * @property {Array.|null} [changes] ParameterChangeProposal changes + */ + + /** + * Constructs a new ParameterChangeProposal. + * @memberof cosmos.params.v1beta1 + * @classdesc Represents a ParameterChangeProposal. + * @implements IParameterChangeProposal + * @constructor + * @param {cosmos.params.v1beta1.IParameterChangeProposal=} [properties] Properties to set + */ + function ParameterChangeProposal(properties) { + this.changes = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ParameterChangeProposal title. + * @member {string} title + * @memberof cosmos.params.v1beta1.ParameterChangeProposal + * @instance + */ + ParameterChangeProposal.prototype.title = ""; + + /** + * ParameterChangeProposal description. + * @member {string} description + * @memberof cosmos.params.v1beta1.ParameterChangeProposal + * @instance + */ + ParameterChangeProposal.prototype.description = ""; + + /** + * ParameterChangeProposal changes. + * @member {Array.} changes + * @memberof cosmos.params.v1beta1.ParameterChangeProposal + * @instance + */ + ParameterChangeProposal.prototype.changes = $util.emptyArray; + + /** + * Creates a new ParameterChangeProposal instance using the specified properties. + * @function create + * @memberof cosmos.params.v1beta1.ParameterChangeProposal + * @static + * @param {cosmos.params.v1beta1.IParameterChangeProposal=} [properties] Properties to set + * @returns {cosmos.params.v1beta1.ParameterChangeProposal} ParameterChangeProposal instance + */ + ParameterChangeProposal.create = function create(properties) { + return new ParameterChangeProposal(properties); + }; + + /** + * Encodes the specified ParameterChangeProposal message. Does not implicitly {@link cosmos.params.v1beta1.ParameterChangeProposal.verify|verify} messages. + * @function encode + * @memberof cosmos.params.v1beta1.ParameterChangeProposal + * @static + * @param {cosmos.params.v1beta1.IParameterChangeProposal} message ParameterChangeProposal message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ParameterChangeProposal.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.title != null && Object.hasOwnProperty.call(message, "title")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.title); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.changes != null && message.changes.length) + for (let i = 0; i < message.changes.length; ++i) + $root.cosmos.params.v1beta1.ParamChange.encode(message.changes[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ParameterChangeProposal message, length delimited. Does not implicitly {@link cosmos.params.v1beta1.ParameterChangeProposal.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.params.v1beta1.ParameterChangeProposal + * @static + * @param {cosmos.params.v1beta1.IParameterChangeProposal} message ParameterChangeProposal message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ParameterChangeProposal.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ParameterChangeProposal message from the specified reader or buffer. + * @function decode + * @memberof cosmos.params.v1beta1.ParameterChangeProposal + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.params.v1beta1.ParameterChangeProposal} ParameterChangeProposal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ParameterChangeProposal.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.params.v1beta1.ParameterChangeProposal(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.title = reader.string(); + break; + case 2: + message.description = reader.string(); + break; + case 3: + if (!(message.changes && message.changes.length)) + message.changes = []; + message.changes.push($root.cosmos.params.v1beta1.ParamChange.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ParameterChangeProposal message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.params.v1beta1.ParameterChangeProposal + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.params.v1beta1.ParameterChangeProposal} ParameterChangeProposal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ParameterChangeProposal.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ParameterChangeProposal message. + * @function verify + * @memberof cosmos.params.v1beta1.ParameterChangeProposal + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ParameterChangeProposal.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.title != null && message.hasOwnProperty("title")) + if (!$util.isString(message.title)) + return "title: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.changes != null && message.hasOwnProperty("changes")) { + if (!Array.isArray(message.changes)) + return "changes: array expected"; + for (let i = 0; i < message.changes.length; ++i) { + let error = $root.cosmos.params.v1beta1.ParamChange.verify(message.changes[i]); + if (error) + return "changes." + error; + } + } + return null; + }; + + /** + * Creates a ParameterChangeProposal message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.params.v1beta1.ParameterChangeProposal + * @static + * @param {Object.} object Plain object + * @returns {cosmos.params.v1beta1.ParameterChangeProposal} ParameterChangeProposal + */ + ParameterChangeProposal.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.params.v1beta1.ParameterChangeProposal) + return object; + let message = new $root.cosmos.params.v1beta1.ParameterChangeProposal(); + if (object.title != null) + message.title = String(object.title); + if (object.description != null) + message.description = String(object.description); + if (object.changes) { + if (!Array.isArray(object.changes)) + throw TypeError(".cosmos.params.v1beta1.ParameterChangeProposal.changes: array expected"); + message.changes = []; + for (let i = 0; i < object.changes.length; ++i) { + if (typeof object.changes[i] !== "object") + throw TypeError(".cosmos.params.v1beta1.ParameterChangeProposal.changes: object expected"); + message.changes[i] = $root.cosmos.params.v1beta1.ParamChange.fromObject(object.changes[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ParameterChangeProposal message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.params.v1beta1.ParameterChangeProposal + * @static + * @param {cosmos.params.v1beta1.ParameterChangeProposal} message ParameterChangeProposal + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ParameterChangeProposal.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.changes = []; + if (options.defaults) { + object.title = ""; + object.description = ""; + } + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.changes && message.changes.length) { + object.changes = []; + for (let j = 0; j < message.changes.length; ++j) + object.changes[j] = $root.cosmos.params.v1beta1.ParamChange.toObject(message.changes[j], options); + } + return object; + }; + + /** + * Converts this ParameterChangeProposal to JSON. + * @function toJSON + * @memberof cosmos.params.v1beta1.ParameterChangeProposal + * @instance + * @returns {Object.} JSON object + */ + ParameterChangeProposal.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ParameterChangeProposal; + })(v1beta1.ParameterChangeProposal || {}); + + v1beta1.ParamChange = (function(ParamChange) { + + /** + * Properties of a ParamChange. + * @memberof cosmos.params.v1beta1 + * @interface IParamChange + * @property {string|null} [subspace] ParamChange subspace + * @property {string|null} [key] ParamChange key + * @property {string|null} [value] ParamChange value + */ + + /** + * Constructs a new ParamChange. + * @memberof cosmos.params.v1beta1 + * @classdesc Represents a ParamChange. + * @implements IParamChange + * @constructor + * @param {cosmos.params.v1beta1.IParamChange=} [properties] Properties to set + */ + function ParamChange(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ParamChange subspace. + * @member {string} subspace + * @memberof cosmos.params.v1beta1.ParamChange + * @instance + */ + ParamChange.prototype.subspace = ""; + + /** + * ParamChange key. + * @member {string} key + * @memberof cosmos.params.v1beta1.ParamChange + * @instance + */ + ParamChange.prototype.key = ""; + + /** + * ParamChange value. + * @member {string} value + * @memberof cosmos.params.v1beta1.ParamChange + * @instance + */ + ParamChange.prototype.value = ""; + + /** + * Creates a new ParamChange instance using the specified properties. + * @function create + * @memberof cosmos.params.v1beta1.ParamChange + * @static + * @param {cosmos.params.v1beta1.IParamChange=} [properties] Properties to set + * @returns {cosmos.params.v1beta1.ParamChange} ParamChange instance + */ + ParamChange.create = function create(properties) { + return new ParamChange(properties); + }; + + /** + * Encodes the specified ParamChange message. Does not implicitly {@link cosmos.params.v1beta1.ParamChange.verify|verify} messages. + * @function encode + * @memberof cosmos.params.v1beta1.ParamChange + * @static + * @param {cosmos.params.v1beta1.IParamChange} message ParamChange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ParamChange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.subspace != null && Object.hasOwnProperty.call(message, "subspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.subspace); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.key); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.value); + return writer; + }; + + /** + * Encodes the specified ParamChange message, length delimited. Does not implicitly {@link cosmos.params.v1beta1.ParamChange.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.params.v1beta1.ParamChange + * @static + * @param {cosmos.params.v1beta1.IParamChange} message ParamChange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ParamChange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ParamChange message from the specified reader or buffer. + * @function decode + * @memberof cosmos.params.v1beta1.ParamChange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.params.v1beta1.ParamChange} ParamChange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ParamChange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.params.v1beta1.ParamChange(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.subspace = reader.string(); + break; + case 2: + message.key = reader.string(); + break; + case 3: + message.value = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ParamChange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.params.v1beta1.ParamChange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.params.v1beta1.ParamChange} ParamChange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ParamChange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ParamChange message. + * @function verify + * @memberof cosmos.params.v1beta1.ParamChange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ParamChange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.subspace != null && message.hasOwnProperty("subspace")) + if (!$util.isString(message.subspace)) + return "subspace: string expected"; + if (message.key != null && message.hasOwnProperty("key")) + if (!$util.isString(message.key)) + return "key: string expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + return null; + }; + + /** + * Creates a ParamChange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.params.v1beta1.ParamChange + * @static + * @param {Object.} object Plain object + * @returns {cosmos.params.v1beta1.ParamChange} ParamChange + */ + ParamChange.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.params.v1beta1.ParamChange) + return object; + let message = new $root.cosmos.params.v1beta1.ParamChange(); + if (object.subspace != null) + message.subspace = String(object.subspace); + if (object.key != null) + message.key = String(object.key); + if (object.value != null) + message.value = String(object.value); + return message; + }; + + /** + * Creates a plain object from a ParamChange message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.params.v1beta1.ParamChange + * @static + * @param {cosmos.params.v1beta1.ParamChange} message ParamChange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ParamChange.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.subspace = ""; + object.key = ""; + object.value = ""; + } + if (message.subspace != null && message.hasOwnProperty("subspace")) + object.subspace = message.subspace; + if (message.key != null && message.hasOwnProperty("key")) + object.key = message.key; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + return object; + }; + + /** + * Converts this ParamChange to JSON. + * @function toJSON + * @memberof cosmos.params.v1beta1.ParamChange + * @instance + * @returns {Object.} JSON object + */ + ParamChange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ParamChange; + })(v1beta1.ParamChange || {}); + + v1beta1.Query = (function(Query) { + + /** + * Constructs a new Query service. + * @memberof cosmos.params.v1beta1 + * @classdesc Represents a Query + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Query(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Query.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Query; + + /** + * Creates new Query service using the specified rpc implementation. + * @function create + * @memberof cosmos.params.v1beta1.Query + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Query} RPC service. Useful where requests and/or responses are streamed. + */ + Query.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link cosmos.params.v1beta1.Query#params}. + * @memberof cosmos.params.v1beta1.Query + * @typedef ParamsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.params.v1beta1.IQueryParamsResponse} [response] QueryParamsResponse + */ + + /** + * Calls Params. + * @function params + * @memberof cosmos.params.v1beta1.Query + * @instance + * @param {cosmos.params.v1beta1.IQueryParamsRequest} request QueryParamsRequest message or plain object + * @param {cosmos.params.v1beta1.Query.ParamsCallback} callback Node-style callback called with the error, if any, and QueryParamsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.params = function params(request, callback) { + return this.rpcCall(params, $root.cosmos.params.v1beta1.QueryParamsRequest, $root.cosmos.params.v1beta1.QueryParamsResponse, request, callback); + }, "name", { value: "Params" }); + + /** + * Calls Params. + * @function params + * @memberof cosmos.params.v1beta1.Query + * @instance + * @param {cosmos.params.v1beta1.IQueryParamsRequest} request QueryParamsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Query; + })(v1beta1.Query || {}); + + v1beta1.QueryParamsRequest = (function(QueryParamsRequest) { + + /** + * Properties of a QueryParamsRequest. + * @memberof cosmos.params.v1beta1 + * @interface IQueryParamsRequest + * @property {string|null} [subspace] QueryParamsRequest subspace + * @property {string|null} [key] QueryParamsRequest key + */ + + /** + * Constructs a new QueryParamsRequest. + * @memberof cosmos.params.v1beta1 + * @classdesc Represents a QueryParamsRequest. + * @implements IQueryParamsRequest + * @constructor + * @param {cosmos.params.v1beta1.IQueryParamsRequest=} [properties] Properties to set + */ + function QueryParamsRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryParamsRequest subspace. + * @member {string} subspace + * @memberof cosmos.params.v1beta1.QueryParamsRequest + * @instance + */ + QueryParamsRequest.prototype.subspace = ""; + + /** + * QueryParamsRequest key. + * @member {string} key + * @memberof cosmos.params.v1beta1.QueryParamsRequest + * @instance + */ + QueryParamsRequest.prototype.key = ""; + + /** + * Creates a new QueryParamsRequest instance using the specified properties. + * @function create + * @memberof cosmos.params.v1beta1.QueryParamsRequest + * @static + * @param {cosmos.params.v1beta1.IQueryParamsRequest=} [properties] Properties to set + * @returns {cosmos.params.v1beta1.QueryParamsRequest} QueryParamsRequest instance + */ + QueryParamsRequest.create = function create(properties) { + return new QueryParamsRequest(properties); + }; + + /** + * Encodes the specified QueryParamsRequest message. Does not implicitly {@link cosmos.params.v1beta1.QueryParamsRequest.verify|verify} messages. + * @function encode + * @memberof cosmos.params.v1beta1.QueryParamsRequest + * @static + * @param {cosmos.params.v1beta1.IQueryParamsRequest} message QueryParamsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryParamsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.subspace != null && Object.hasOwnProperty.call(message, "subspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.subspace); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.key); + return writer; + }; + + /** + * Encodes the specified QueryParamsRequest message, length delimited. Does not implicitly {@link cosmos.params.v1beta1.QueryParamsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.params.v1beta1.QueryParamsRequest + * @static + * @param {cosmos.params.v1beta1.IQueryParamsRequest} message QueryParamsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryParamsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryParamsRequest message from the specified reader or buffer. + * @function decode + * @memberof cosmos.params.v1beta1.QueryParamsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.params.v1beta1.QueryParamsRequest} QueryParamsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryParamsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.params.v1beta1.QueryParamsRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.subspace = reader.string(); + break; + case 2: + message.key = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryParamsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.params.v1beta1.QueryParamsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.params.v1beta1.QueryParamsRequest} QueryParamsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryParamsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryParamsRequest message. + * @function verify + * @memberof cosmos.params.v1beta1.QueryParamsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryParamsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.subspace != null && message.hasOwnProperty("subspace")) + if (!$util.isString(message.subspace)) + return "subspace: string expected"; + if (message.key != null && message.hasOwnProperty("key")) + if (!$util.isString(message.key)) + return "key: string expected"; + return null; + }; + + /** + * Creates a QueryParamsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.params.v1beta1.QueryParamsRequest + * @static + * @param {Object.} object Plain object + * @returns {cosmos.params.v1beta1.QueryParamsRequest} QueryParamsRequest + */ + QueryParamsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.params.v1beta1.QueryParamsRequest) + return object; + let message = new $root.cosmos.params.v1beta1.QueryParamsRequest(); + if (object.subspace != null) + message.subspace = String(object.subspace); + if (object.key != null) + message.key = String(object.key); + return message; + }; + + /** + * Creates a plain object from a QueryParamsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.params.v1beta1.QueryParamsRequest + * @static + * @param {cosmos.params.v1beta1.QueryParamsRequest} message QueryParamsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryParamsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.subspace = ""; + object.key = ""; + } + if (message.subspace != null && message.hasOwnProperty("subspace")) + object.subspace = message.subspace; + if (message.key != null && message.hasOwnProperty("key")) + object.key = message.key; + return object; + }; + + /** + * Converts this QueryParamsRequest to JSON. + * @function toJSON + * @memberof cosmos.params.v1beta1.QueryParamsRequest + * @instance + * @returns {Object.} JSON object + */ + QueryParamsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryParamsRequest; + })(v1beta1.QueryParamsRequest || {}); + + v1beta1.QueryParamsResponse = (function(QueryParamsResponse) { + + /** + * Properties of a QueryParamsResponse. + * @memberof cosmos.params.v1beta1 + * @interface IQueryParamsResponse + * @property {cosmos.params.v1beta1.IParamChange|null} [param] QueryParamsResponse param + */ + + /** + * Constructs a new QueryParamsResponse. + * @memberof cosmos.params.v1beta1 + * @classdesc Represents a QueryParamsResponse. + * @implements IQueryParamsResponse + * @constructor + * @param {cosmos.params.v1beta1.IQueryParamsResponse=} [properties] Properties to set + */ + function QueryParamsResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryParamsResponse param. + * @member {cosmos.params.v1beta1.IParamChange|null|undefined} param + * @memberof cosmos.params.v1beta1.QueryParamsResponse + * @instance + */ + QueryParamsResponse.prototype.param = null; + + /** + * Creates a new QueryParamsResponse instance using the specified properties. + * @function create + * @memberof cosmos.params.v1beta1.QueryParamsResponse + * @static + * @param {cosmos.params.v1beta1.IQueryParamsResponse=} [properties] Properties to set + * @returns {cosmos.params.v1beta1.QueryParamsResponse} QueryParamsResponse instance + */ + QueryParamsResponse.create = function create(properties) { + return new QueryParamsResponse(properties); + }; + + /** + * Encodes the specified QueryParamsResponse message. Does not implicitly {@link cosmos.params.v1beta1.QueryParamsResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.params.v1beta1.QueryParamsResponse + * @static + * @param {cosmos.params.v1beta1.IQueryParamsResponse} message QueryParamsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryParamsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.param != null && Object.hasOwnProperty.call(message, "param")) + $root.cosmos.params.v1beta1.ParamChange.encode(message.param, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryParamsResponse message, length delimited. Does not implicitly {@link cosmos.params.v1beta1.QueryParamsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.params.v1beta1.QueryParamsResponse + * @static + * @param {cosmos.params.v1beta1.IQueryParamsResponse} message QueryParamsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryParamsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryParamsResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.params.v1beta1.QueryParamsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.params.v1beta1.QueryParamsResponse} QueryParamsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryParamsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.params.v1beta1.QueryParamsResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.param = $root.cosmos.params.v1beta1.ParamChange.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryParamsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.params.v1beta1.QueryParamsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.params.v1beta1.QueryParamsResponse} QueryParamsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryParamsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryParamsResponse message. + * @function verify + * @memberof cosmos.params.v1beta1.QueryParamsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryParamsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.param != null && message.hasOwnProperty("param")) { + let error = $root.cosmos.params.v1beta1.ParamChange.verify(message.param); + if (error) + return "param." + error; + } + return null; + }; + + /** + * Creates a QueryParamsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.params.v1beta1.QueryParamsResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.params.v1beta1.QueryParamsResponse} QueryParamsResponse + */ + QueryParamsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.params.v1beta1.QueryParamsResponse) + return object; + let message = new $root.cosmos.params.v1beta1.QueryParamsResponse(); + if (object.param != null) { + if (typeof object.param !== "object") + throw TypeError(".cosmos.params.v1beta1.QueryParamsResponse.param: object expected"); + message.param = $root.cosmos.params.v1beta1.ParamChange.fromObject(object.param); + } + return message; + }; + + /** + * Creates a plain object from a QueryParamsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.params.v1beta1.QueryParamsResponse + * @static + * @param {cosmos.params.v1beta1.QueryParamsResponse} message QueryParamsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryParamsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.param = null; + if (message.param != null && message.hasOwnProperty("param")) + object.param = $root.cosmos.params.v1beta1.ParamChange.toObject(message.param, options); + return object; + }; + + /** + * Converts this QueryParamsResponse to JSON. + * @function toJSON + * @memberof cosmos.params.v1beta1.QueryParamsResponse + * @instance + * @returns {Object.} JSON object + */ + QueryParamsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryParamsResponse; + })(v1beta1.QueryParamsResponse || {}); + + return v1beta1; + })(params.v1beta1 || {}); + + return params; + })(cosmos.params || {}); + + /** + * Namespace slashing. + * @memberof cosmos + * @namespace + */ + + cosmos.slashing = (function(slashing) { + + /** + * Namespace v1beta1. + * @memberof cosmos.slashing + * @namespace + */ + + slashing.v1beta1 = (function(v1beta1) { + + v1beta1.GenesisState = (function(GenesisState) { + + /** + * Properties of a GenesisState. + * @memberof cosmos.slashing.v1beta1 + * @interface IGenesisState + * @property {cosmos.slashing.v1beta1.IParams|null} [params] GenesisState params + * @property {Array.|null} [signingInfos] GenesisState signingInfos + * @property {Array.|null} [missedBlocks] GenesisState missedBlocks + */ + + /** + * Constructs a new GenesisState. + * @memberof cosmos.slashing.v1beta1 + * @classdesc Represents a GenesisState. + * @implements IGenesisState + * @constructor + * @param {cosmos.slashing.v1beta1.IGenesisState=} [properties] Properties to set + */ + function GenesisState(properties) { + this.signingInfos = []; + this.missedBlocks = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GenesisState params. + * @member {cosmos.slashing.v1beta1.IParams|null|undefined} params + * @memberof cosmos.slashing.v1beta1.GenesisState + * @instance + */ + GenesisState.prototype.params = null; + + /** + * GenesisState signingInfos. + * @member {Array.} signingInfos + * @memberof cosmos.slashing.v1beta1.GenesisState + * @instance + */ + GenesisState.prototype.signingInfos = $util.emptyArray; + + /** + * GenesisState missedBlocks. + * @member {Array.} missedBlocks + * @memberof cosmos.slashing.v1beta1.GenesisState + * @instance + */ + GenesisState.prototype.missedBlocks = $util.emptyArray; + + /** + * Creates a new GenesisState instance using the specified properties. + * @function create + * @memberof cosmos.slashing.v1beta1.GenesisState + * @static + * @param {cosmos.slashing.v1beta1.IGenesisState=} [properties] Properties to set + * @returns {cosmos.slashing.v1beta1.GenesisState} GenesisState instance + */ + GenesisState.create = function create(properties) { + return new GenesisState(properties); + }; + + /** + * Encodes the specified GenesisState message. Does not implicitly {@link cosmos.slashing.v1beta1.GenesisState.verify|verify} messages. + * @function encode + * @memberof cosmos.slashing.v1beta1.GenesisState + * @static + * @param {cosmos.slashing.v1beta1.IGenesisState} message GenesisState message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenesisState.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.params != null && Object.hasOwnProperty.call(message, "params")) + $root.cosmos.slashing.v1beta1.Params.encode(message.params, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.signingInfos != null && message.signingInfos.length) + for (let i = 0; i < message.signingInfos.length; ++i) + $root.cosmos.slashing.v1beta1.SigningInfo.encode(message.signingInfos[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.missedBlocks != null && message.missedBlocks.length) + for (let i = 0; i < message.missedBlocks.length; ++i) + $root.cosmos.slashing.v1beta1.ValidatorMissedBlocks.encode(message.missedBlocks[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GenesisState message, length delimited. Does not implicitly {@link cosmos.slashing.v1beta1.GenesisState.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.slashing.v1beta1.GenesisState + * @static + * @param {cosmos.slashing.v1beta1.IGenesisState} message GenesisState message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenesisState.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GenesisState message from the specified reader or buffer. + * @function decode + * @memberof cosmos.slashing.v1beta1.GenesisState + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.slashing.v1beta1.GenesisState} GenesisState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenesisState.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.slashing.v1beta1.GenesisState(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.params = $root.cosmos.slashing.v1beta1.Params.decode(reader, reader.uint32()); + break; + case 2: + if (!(message.signingInfos && message.signingInfos.length)) + message.signingInfos = []; + message.signingInfos.push($root.cosmos.slashing.v1beta1.SigningInfo.decode(reader, reader.uint32())); + break; + case 3: + if (!(message.missedBlocks && message.missedBlocks.length)) + message.missedBlocks = []; + message.missedBlocks.push($root.cosmos.slashing.v1beta1.ValidatorMissedBlocks.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GenesisState message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.slashing.v1beta1.GenesisState + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.slashing.v1beta1.GenesisState} GenesisState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenesisState.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GenesisState message. + * @function verify + * @memberof cosmos.slashing.v1beta1.GenesisState + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GenesisState.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.params != null && message.hasOwnProperty("params")) { + let error = $root.cosmos.slashing.v1beta1.Params.verify(message.params); + if (error) + return "params." + error; + } + if (message.signingInfos != null && message.hasOwnProperty("signingInfos")) { + if (!Array.isArray(message.signingInfos)) + return "signingInfos: array expected"; + for (let i = 0; i < message.signingInfos.length; ++i) { + let error = $root.cosmos.slashing.v1beta1.SigningInfo.verify(message.signingInfos[i]); + if (error) + return "signingInfos." + error; + } + } + if (message.missedBlocks != null && message.hasOwnProperty("missedBlocks")) { + if (!Array.isArray(message.missedBlocks)) + return "missedBlocks: array expected"; + for (let i = 0; i < message.missedBlocks.length; ++i) { + let error = $root.cosmos.slashing.v1beta1.ValidatorMissedBlocks.verify(message.missedBlocks[i]); + if (error) + return "missedBlocks." + error; + } + } + return null; + }; + + /** + * Creates a GenesisState message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.slashing.v1beta1.GenesisState + * @static + * @param {Object.} object Plain object + * @returns {cosmos.slashing.v1beta1.GenesisState} GenesisState + */ + GenesisState.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.slashing.v1beta1.GenesisState) + return object; + let message = new $root.cosmos.slashing.v1beta1.GenesisState(); + if (object.params != null) { + if (typeof object.params !== "object") + throw TypeError(".cosmos.slashing.v1beta1.GenesisState.params: object expected"); + message.params = $root.cosmos.slashing.v1beta1.Params.fromObject(object.params); + } + if (object.signingInfos) { + if (!Array.isArray(object.signingInfos)) + throw TypeError(".cosmos.slashing.v1beta1.GenesisState.signingInfos: array expected"); + message.signingInfos = []; + for (let i = 0; i < object.signingInfos.length; ++i) { + if (typeof object.signingInfos[i] !== "object") + throw TypeError(".cosmos.slashing.v1beta1.GenesisState.signingInfos: object expected"); + message.signingInfos[i] = $root.cosmos.slashing.v1beta1.SigningInfo.fromObject(object.signingInfos[i]); + } + } + if (object.missedBlocks) { + if (!Array.isArray(object.missedBlocks)) + throw TypeError(".cosmos.slashing.v1beta1.GenesisState.missedBlocks: array expected"); + message.missedBlocks = []; + for (let i = 0; i < object.missedBlocks.length; ++i) { + if (typeof object.missedBlocks[i] !== "object") + throw TypeError(".cosmos.slashing.v1beta1.GenesisState.missedBlocks: object expected"); + message.missedBlocks[i] = $root.cosmos.slashing.v1beta1.ValidatorMissedBlocks.fromObject(object.missedBlocks[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a GenesisState message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.slashing.v1beta1.GenesisState + * @static + * @param {cosmos.slashing.v1beta1.GenesisState} message GenesisState + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GenesisState.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) { + object.signingInfos = []; + object.missedBlocks = []; + } + if (options.defaults) + object.params = null; + if (message.params != null && message.hasOwnProperty("params")) + object.params = $root.cosmos.slashing.v1beta1.Params.toObject(message.params, options); + if (message.signingInfos && message.signingInfos.length) { + object.signingInfos = []; + for (let j = 0; j < message.signingInfos.length; ++j) + object.signingInfos[j] = $root.cosmos.slashing.v1beta1.SigningInfo.toObject(message.signingInfos[j], options); + } + if (message.missedBlocks && message.missedBlocks.length) { + object.missedBlocks = []; + for (let j = 0; j < message.missedBlocks.length; ++j) + object.missedBlocks[j] = $root.cosmos.slashing.v1beta1.ValidatorMissedBlocks.toObject(message.missedBlocks[j], options); + } + return object; + }; + + /** + * Converts this GenesisState to JSON. + * @function toJSON + * @memberof cosmos.slashing.v1beta1.GenesisState + * @instance + * @returns {Object.} JSON object + */ + GenesisState.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GenesisState; + })(v1beta1.GenesisState || {}); + + v1beta1.SigningInfo = (function(SigningInfo) { + + /** + * Properties of a SigningInfo. + * @memberof cosmos.slashing.v1beta1 + * @interface ISigningInfo + * @property {string|null} [address] SigningInfo address + * @property {cosmos.slashing.v1beta1.IValidatorSigningInfo|null} [validatorSigningInfo] SigningInfo validatorSigningInfo + */ + + /** + * Constructs a new SigningInfo. + * @memberof cosmos.slashing.v1beta1 + * @classdesc Represents a SigningInfo. + * @implements ISigningInfo + * @constructor + * @param {cosmos.slashing.v1beta1.ISigningInfo=} [properties] Properties to set + */ + function SigningInfo(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SigningInfo address. + * @member {string} address + * @memberof cosmos.slashing.v1beta1.SigningInfo + * @instance + */ + SigningInfo.prototype.address = ""; + + /** + * SigningInfo validatorSigningInfo. + * @member {cosmos.slashing.v1beta1.IValidatorSigningInfo|null|undefined} validatorSigningInfo + * @memberof cosmos.slashing.v1beta1.SigningInfo + * @instance + */ + SigningInfo.prototype.validatorSigningInfo = null; + + /** + * Creates a new SigningInfo instance using the specified properties. + * @function create + * @memberof cosmos.slashing.v1beta1.SigningInfo + * @static + * @param {cosmos.slashing.v1beta1.ISigningInfo=} [properties] Properties to set + * @returns {cosmos.slashing.v1beta1.SigningInfo} SigningInfo instance + */ + SigningInfo.create = function create(properties) { + return new SigningInfo(properties); + }; + + /** + * Encodes the specified SigningInfo message. Does not implicitly {@link cosmos.slashing.v1beta1.SigningInfo.verify|verify} messages. + * @function encode + * @memberof cosmos.slashing.v1beta1.SigningInfo + * @static + * @param {cosmos.slashing.v1beta1.ISigningInfo} message SigningInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SigningInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.address != null && Object.hasOwnProperty.call(message, "address")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.address); + if (message.validatorSigningInfo != null && Object.hasOwnProperty.call(message, "validatorSigningInfo")) + $root.cosmos.slashing.v1beta1.ValidatorSigningInfo.encode(message.validatorSigningInfo, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SigningInfo message, length delimited. Does not implicitly {@link cosmos.slashing.v1beta1.SigningInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.slashing.v1beta1.SigningInfo + * @static + * @param {cosmos.slashing.v1beta1.ISigningInfo} message SigningInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SigningInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SigningInfo message from the specified reader or buffer. + * @function decode + * @memberof cosmos.slashing.v1beta1.SigningInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.slashing.v1beta1.SigningInfo} SigningInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SigningInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.slashing.v1beta1.SigningInfo(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.address = reader.string(); + break; + case 2: + message.validatorSigningInfo = $root.cosmos.slashing.v1beta1.ValidatorSigningInfo.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SigningInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.slashing.v1beta1.SigningInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.slashing.v1beta1.SigningInfo} SigningInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SigningInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SigningInfo message. + * @function verify + * @memberof cosmos.slashing.v1beta1.SigningInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SigningInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.address != null && message.hasOwnProperty("address")) + if (!$util.isString(message.address)) + return "address: string expected"; + if (message.validatorSigningInfo != null && message.hasOwnProperty("validatorSigningInfo")) { + let error = $root.cosmos.slashing.v1beta1.ValidatorSigningInfo.verify(message.validatorSigningInfo); + if (error) + return "validatorSigningInfo." + error; + } + return null; + }; + + /** + * Creates a SigningInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.slashing.v1beta1.SigningInfo + * @static + * @param {Object.} object Plain object + * @returns {cosmos.slashing.v1beta1.SigningInfo} SigningInfo + */ + SigningInfo.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.slashing.v1beta1.SigningInfo) + return object; + let message = new $root.cosmos.slashing.v1beta1.SigningInfo(); + if (object.address != null) + message.address = String(object.address); + if (object.validatorSigningInfo != null) { + if (typeof object.validatorSigningInfo !== "object") + throw TypeError(".cosmos.slashing.v1beta1.SigningInfo.validatorSigningInfo: object expected"); + message.validatorSigningInfo = $root.cosmos.slashing.v1beta1.ValidatorSigningInfo.fromObject(object.validatorSigningInfo); + } + return message; + }; + + /** + * Creates a plain object from a SigningInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.slashing.v1beta1.SigningInfo + * @static + * @param {cosmos.slashing.v1beta1.SigningInfo} message SigningInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SigningInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.address = ""; + object.validatorSigningInfo = null; + } + if (message.address != null && message.hasOwnProperty("address")) + object.address = message.address; + if (message.validatorSigningInfo != null && message.hasOwnProperty("validatorSigningInfo")) + object.validatorSigningInfo = $root.cosmos.slashing.v1beta1.ValidatorSigningInfo.toObject(message.validatorSigningInfo, options); + return object; + }; + + /** + * Converts this SigningInfo to JSON. + * @function toJSON + * @memberof cosmos.slashing.v1beta1.SigningInfo + * @instance + * @returns {Object.} JSON object + */ + SigningInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SigningInfo; + })(v1beta1.SigningInfo || {}); + + v1beta1.ValidatorMissedBlocks = (function(ValidatorMissedBlocks) { + + /** + * Properties of a ValidatorMissedBlocks. + * @memberof cosmos.slashing.v1beta1 + * @interface IValidatorMissedBlocks + * @property {string|null} [address] ValidatorMissedBlocks address + * @property {Array.|null} [missedBlocks] ValidatorMissedBlocks missedBlocks + */ + + /** + * Constructs a new ValidatorMissedBlocks. + * @memberof cosmos.slashing.v1beta1 + * @classdesc Represents a ValidatorMissedBlocks. + * @implements IValidatorMissedBlocks + * @constructor + * @param {cosmos.slashing.v1beta1.IValidatorMissedBlocks=} [properties] Properties to set + */ + function ValidatorMissedBlocks(properties) { + this.missedBlocks = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ValidatorMissedBlocks address. + * @member {string} address + * @memberof cosmos.slashing.v1beta1.ValidatorMissedBlocks + * @instance + */ + ValidatorMissedBlocks.prototype.address = ""; + + /** + * ValidatorMissedBlocks missedBlocks. + * @member {Array.} missedBlocks + * @memberof cosmos.slashing.v1beta1.ValidatorMissedBlocks + * @instance + */ + ValidatorMissedBlocks.prototype.missedBlocks = $util.emptyArray; + + /** + * Creates a new ValidatorMissedBlocks instance using the specified properties. + * @function create + * @memberof cosmos.slashing.v1beta1.ValidatorMissedBlocks + * @static + * @param {cosmos.slashing.v1beta1.IValidatorMissedBlocks=} [properties] Properties to set + * @returns {cosmos.slashing.v1beta1.ValidatorMissedBlocks} ValidatorMissedBlocks instance + */ + ValidatorMissedBlocks.create = function create(properties) { + return new ValidatorMissedBlocks(properties); + }; + + /** + * Encodes the specified ValidatorMissedBlocks message. Does not implicitly {@link cosmos.slashing.v1beta1.ValidatorMissedBlocks.verify|verify} messages. + * @function encode + * @memberof cosmos.slashing.v1beta1.ValidatorMissedBlocks + * @static + * @param {cosmos.slashing.v1beta1.IValidatorMissedBlocks} message ValidatorMissedBlocks message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValidatorMissedBlocks.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.address != null && Object.hasOwnProperty.call(message, "address")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.address); + if (message.missedBlocks != null && message.missedBlocks.length) + for (let i = 0; i < message.missedBlocks.length; ++i) + $root.cosmos.slashing.v1beta1.MissedBlock.encode(message.missedBlocks[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ValidatorMissedBlocks message, length delimited. Does not implicitly {@link cosmos.slashing.v1beta1.ValidatorMissedBlocks.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.slashing.v1beta1.ValidatorMissedBlocks + * @static + * @param {cosmos.slashing.v1beta1.IValidatorMissedBlocks} message ValidatorMissedBlocks message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValidatorMissedBlocks.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ValidatorMissedBlocks message from the specified reader or buffer. + * @function decode + * @memberof cosmos.slashing.v1beta1.ValidatorMissedBlocks + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.slashing.v1beta1.ValidatorMissedBlocks} ValidatorMissedBlocks + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValidatorMissedBlocks.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.slashing.v1beta1.ValidatorMissedBlocks(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.address = reader.string(); + break; + case 2: + if (!(message.missedBlocks && message.missedBlocks.length)) + message.missedBlocks = []; + message.missedBlocks.push($root.cosmos.slashing.v1beta1.MissedBlock.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ValidatorMissedBlocks message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.slashing.v1beta1.ValidatorMissedBlocks + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.slashing.v1beta1.ValidatorMissedBlocks} ValidatorMissedBlocks + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValidatorMissedBlocks.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ValidatorMissedBlocks message. + * @function verify + * @memberof cosmos.slashing.v1beta1.ValidatorMissedBlocks + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ValidatorMissedBlocks.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.address != null && message.hasOwnProperty("address")) + if (!$util.isString(message.address)) + return "address: string expected"; + if (message.missedBlocks != null && message.hasOwnProperty("missedBlocks")) { + if (!Array.isArray(message.missedBlocks)) + return "missedBlocks: array expected"; + for (let i = 0; i < message.missedBlocks.length; ++i) { + let error = $root.cosmos.slashing.v1beta1.MissedBlock.verify(message.missedBlocks[i]); + if (error) + return "missedBlocks." + error; + } + } + return null; + }; + + /** + * Creates a ValidatorMissedBlocks message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.slashing.v1beta1.ValidatorMissedBlocks + * @static + * @param {Object.} object Plain object + * @returns {cosmos.slashing.v1beta1.ValidatorMissedBlocks} ValidatorMissedBlocks + */ + ValidatorMissedBlocks.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.slashing.v1beta1.ValidatorMissedBlocks) + return object; + let message = new $root.cosmos.slashing.v1beta1.ValidatorMissedBlocks(); + if (object.address != null) + message.address = String(object.address); + if (object.missedBlocks) { + if (!Array.isArray(object.missedBlocks)) + throw TypeError(".cosmos.slashing.v1beta1.ValidatorMissedBlocks.missedBlocks: array expected"); + message.missedBlocks = []; + for (let i = 0; i < object.missedBlocks.length; ++i) { + if (typeof object.missedBlocks[i] !== "object") + throw TypeError(".cosmos.slashing.v1beta1.ValidatorMissedBlocks.missedBlocks: object expected"); + message.missedBlocks[i] = $root.cosmos.slashing.v1beta1.MissedBlock.fromObject(object.missedBlocks[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ValidatorMissedBlocks message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.slashing.v1beta1.ValidatorMissedBlocks + * @static + * @param {cosmos.slashing.v1beta1.ValidatorMissedBlocks} message ValidatorMissedBlocks + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ValidatorMissedBlocks.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.missedBlocks = []; + if (options.defaults) + object.address = ""; + if (message.address != null && message.hasOwnProperty("address")) + object.address = message.address; + if (message.missedBlocks && message.missedBlocks.length) { + object.missedBlocks = []; + for (let j = 0; j < message.missedBlocks.length; ++j) + object.missedBlocks[j] = $root.cosmos.slashing.v1beta1.MissedBlock.toObject(message.missedBlocks[j], options); + } + return object; + }; + + /** + * Converts this ValidatorMissedBlocks to JSON. + * @function toJSON + * @memberof cosmos.slashing.v1beta1.ValidatorMissedBlocks + * @instance + * @returns {Object.} JSON object + */ + ValidatorMissedBlocks.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ValidatorMissedBlocks; + })(v1beta1.ValidatorMissedBlocks || {}); + + v1beta1.MissedBlock = (function(MissedBlock) { + + /** + * Properties of a MissedBlock. + * @memberof cosmos.slashing.v1beta1 + * @interface IMissedBlock + * @property {number|Long|null} [index] MissedBlock index + * @property {boolean|null} [missed] MissedBlock missed + */ + + /** + * Constructs a new MissedBlock. + * @memberof cosmos.slashing.v1beta1 + * @classdesc Represents a MissedBlock. + * @implements IMissedBlock + * @constructor + * @param {cosmos.slashing.v1beta1.IMissedBlock=} [properties] Properties to set + */ + function MissedBlock(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MissedBlock index. + * @member {number|Long} index + * @memberof cosmos.slashing.v1beta1.MissedBlock + * @instance + */ + MissedBlock.prototype.index = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * MissedBlock missed. + * @member {boolean} missed + * @memberof cosmos.slashing.v1beta1.MissedBlock + * @instance + */ + MissedBlock.prototype.missed = false; + + /** + * Creates a new MissedBlock instance using the specified properties. + * @function create + * @memberof cosmos.slashing.v1beta1.MissedBlock + * @static + * @param {cosmos.slashing.v1beta1.IMissedBlock=} [properties] Properties to set + * @returns {cosmos.slashing.v1beta1.MissedBlock} MissedBlock instance + */ + MissedBlock.create = function create(properties) { + return new MissedBlock(properties); + }; + + /** + * Encodes the specified MissedBlock message. Does not implicitly {@link cosmos.slashing.v1beta1.MissedBlock.verify|verify} messages. + * @function encode + * @memberof cosmos.slashing.v1beta1.MissedBlock + * @static + * @param {cosmos.slashing.v1beta1.IMissedBlock} message MissedBlock message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MissedBlock.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.index != null && Object.hasOwnProperty.call(message, "index")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.index); + if (message.missed != null && Object.hasOwnProperty.call(message, "missed")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.missed); + return writer; + }; + + /** + * Encodes the specified MissedBlock message, length delimited. Does not implicitly {@link cosmos.slashing.v1beta1.MissedBlock.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.slashing.v1beta1.MissedBlock + * @static + * @param {cosmos.slashing.v1beta1.IMissedBlock} message MissedBlock message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MissedBlock.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MissedBlock message from the specified reader or buffer. + * @function decode + * @memberof cosmos.slashing.v1beta1.MissedBlock + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.slashing.v1beta1.MissedBlock} MissedBlock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MissedBlock.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.slashing.v1beta1.MissedBlock(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.index = reader.int64(); + break; + case 2: + message.missed = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MissedBlock message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.slashing.v1beta1.MissedBlock + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.slashing.v1beta1.MissedBlock} MissedBlock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MissedBlock.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MissedBlock message. + * @function verify + * @memberof cosmos.slashing.v1beta1.MissedBlock + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MissedBlock.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.index != null && message.hasOwnProperty("index")) + if (!$util.isInteger(message.index) && !(message.index && $util.isInteger(message.index.low) && $util.isInteger(message.index.high))) + return "index: integer|Long expected"; + if (message.missed != null && message.hasOwnProperty("missed")) + if (typeof message.missed !== "boolean") + return "missed: boolean expected"; + return null; + }; + + /** + * Creates a MissedBlock message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.slashing.v1beta1.MissedBlock + * @static + * @param {Object.} object Plain object + * @returns {cosmos.slashing.v1beta1.MissedBlock} MissedBlock + */ + MissedBlock.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.slashing.v1beta1.MissedBlock) + return object; + let message = new $root.cosmos.slashing.v1beta1.MissedBlock(); + if (object.index != null) + if ($util.Long) + (message.index = $util.Long.fromValue(object.index)).unsigned = false; + else if (typeof object.index === "string") + message.index = parseInt(object.index, 10); + else if (typeof object.index === "number") + message.index = object.index; + else if (typeof object.index === "object") + message.index = new $util.LongBits(object.index.low >>> 0, object.index.high >>> 0).toNumber(); + if (object.missed != null) + message.missed = Boolean(object.missed); + return message; + }; + + /** + * Creates a plain object from a MissedBlock message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.slashing.v1beta1.MissedBlock + * @static + * @param {cosmos.slashing.v1beta1.MissedBlock} message MissedBlock + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MissedBlock.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.index = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.index = options.longs === String ? "0" : 0; + object.missed = false; + } + if (message.index != null && message.hasOwnProperty("index")) + if (typeof message.index === "number") + object.index = options.longs === String ? String(message.index) : message.index; + else + object.index = options.longs === String ? $util.Long.prototype.toString.call(message.index) : options.longs === Number ? new $util.LongBits(message.index.low >>> 0, message.index.high >>> 0).toNumber() : message.index; + if (message.missed != null && message.hasOwnProperty("missed")) + object.missed = message.missed; + return object; + }; + + /** + * Converts this MissedBlock to JSON. + * @function toJSON + * @memberof cosmos.slashing.v1beta1.MissedBlock + * @instance + * @returns {Object.} JSON object + */ + MissedBlock.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MissedBlock; + })(v1beta1.MissedBlock || {}); + + v1beta1.Query = (function(Query) { + + /** + * Constructs a new Query service. + * @memberof cosmos.slashing.v1beta1 + * @classdesc Represents a Query + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Query(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Query.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Query; + + /** + * Creates new Query service using the specified rpc implementation. + * @function create + * @memberof cosmos.slashing.v1beta1.Query + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Query} RPC service. Useful where requests and/or responses are streamed. + */ + Query.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link cosmos.slashing.v1beta1.Query#params}. + * @memberof cosmos.slashing.v1beta1.Query + * @typedef ParamsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.slashing.v1beta1.IQueryParamsResponse} [response] QueryParamsResponse + */ + + /** + * Calls Params. + * @function params + * @memberof cosmos.slashing.v1beta1.Query + * @instance + * @param {cosmos.slashing.v1beta1.IQueryParamsRequest} request QueryParamsRequest message or plain object + * @param {cosmos.slashing.v1beta1.Query.ParamsCallback} callback Node-style callback called with the error, if any, and QueryParamsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.params = function params(request, callback) { + return this.rpcCall(params, $root.cosmos.slashing.v1beta1.QueryParamsRequest, $root.cosmos.slashing.v1beta1.QueryParamsResponse, request, callback); + }, "name", { value: "Params" }); + + /** + * Calls Params. + * @function params + * @memberof cosmos.slashing.v1beta1.Query + * @instance + * @param {cosmos.slashing.v1beta1.IQueryParamsRequest} request QueryParamsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link cosmos.slashing.v1beta1.Query#signingInfo}. + * @memberof cosmos.slashing.v1beta1.Query + * @typedef SigningInfoCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.slashing.v1beta1.IQuerySigningInfoResponse} [response] QuerySigningInfoResponse + */ + + /** + * Calls SigningInfo. + * @function signingInfo + * @memberof cosmos.slashing.v1beta1.Query + * @instance + * @param {cosmos.slashing.v1beta1.IQuerySigningInfoRequest} request QuerySigningInfoRequest message or plain object + * @param {cosmos.slashing.v1beta1.Query.SigningInfoCallback} callback Node-style callback called with the error, if any, and QuerySigningInfoResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.signingInfo = function signingInfo(request, callback) { + return this.rpcCall(signingInfo, $root.cosmos.slashing.v1beta1.QuerySigningInfoRequest, $root.cosmos.slashing.v1beta1.QuerySigningInfoResponse, request, callback); + }, "name", { value: "SigningInfo" }); + + /** + * Calls SigningInfo. + * @function signingInfo + * @memberof cosmos.slashing.v1beta1.Query + * @instance + * @param {cosmos.slashing.v1beta1.IQuerySigningInfoRequest} request QuerySigningInfoRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link cosmos.slashing.v1beta1.Query#signingInfos}. + * @memberof cosmos.slashing.v1beta1.Query + * @typedef SigningInfosCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.slashing.v1beta1.IQuerySigningInfosResponse} [response] QuerySigningInfosResponse + */ + + /** + * Calls SigningInfos. + * @function signingInfos + * @memberof cosmos.slashing.v1beta1.Query + * @instance + * @param {cosmos.slashing.v1beta1.IQuerySigningInfosRequest} request QuerySigningInfosRequest message or plain object + * @param {cosmos.slashing.v1beta1.Query.SigningInfosCallback} callback Node-style callback called with the error, if any, and QuerySigningInfosResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.signingInfos = function signingInfos(request, callback) { + return this.rpcCall(signingInfos, $root.cosmos.slashing.v1beta1.QuerySigningInfosRequest, $root.cosmos.slashing.v1beta1.QuerySigningInfosResponse, request, callback); + }, "name", { value: "SigningInfos" }); + + /** + * Calls SigningInfos. + * @function signingInfos + * @memberof cosmos.slashing.v1beta1.Query + * @instance + * @param {cosmos.slashing.v1beta1.IQuerySigningInfosRequest} request QuerySigningInfosRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Query; + })(v1beta1.Query || {}); + + v1beta1.QueryParamsRequest = (function(QueryParamsRequest) { + + /** + * Properties of a QueryParamsRequest. + * @memberof cosmos.slashing.v1beta1 + * @interface IQueryParamsRequest + */ + + /** + * Constructs a new QueryParamsRequest. + * @memberof cosmos.slashing.v1beta1 + * @classdesc Represents a QueryParamsRequest. + * @implements IQueryParamsRequest + * @constructor + * @param {cosmos.slashing.v1beta1.IQueryParamsRequest=} [properties] Properties to set + */ + function QueryParamsRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new QueryParamsRequest instance using the specified properties. + * @function create + * @memberof cosmos.slashing.v1beta1.QueryParamsRequest + * @static + * @param {cosmos.slashing.v1beta1.IQueryParamsRequest=} [properties] Properties to set + * @returns {cosmos.slashing.v1beta1.QueryParamsRequest} QueryParamsRequest instance + */ + QueryParamsRequest.create = function create(properties) { + return new QueryParamsRequest(properties); + }; + + /** + * Encodes the specified QueryParamsRequest message. Does not implicitly {@link cosmos.slashing.v1beta1.QueryParamsRequest.verify|verify} messages. + * @function encode + * @memberof cosmos.slashing.v1beta1.QueryParamsRequest + * @static + * @param {cosmos.slashing.v1beta1.IQueryParamsRequest} message QueryParamsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryParamsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified QueryParamsRequest message, length delimited. Does not implicitly {@link cosmos.slashing.v1beta1.QueryParamsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.slashing.v1beta1.QueryParamsRequest + * @static + * @param {cosmos.slashing.v1beta1.IQueryParamsRequest} message QueryParamsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryParamsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryParamsRequest message from the specified reader or buffer. + * @function decode + * @memberof cosmos.slashing.v1beta1.QueryParamsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.slashing.v1beta1.QueryParamsRequest} QueryParamsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryParamsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.slashing.v1beta1.QueryParamsRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryParamsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.slashing.v1beta1.QueryParamsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.slashing.v1beta1.QueryParamsRequest} QueryParamsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryParamsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryParamsRequest message. + * @function verify + * @memberof cosmos.slashing.v1beta1.QueryParamsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryParamsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a QueryParamsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.slashing.v1beta1.QueryParamsRequest + * @static + * @param {Object.} object Plain object + * @returns {cosmos.slashing.v1beta1.QueryParamsRequest} QueryParamsRequest + */ + QueryParamsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.slashing.v1beta1.QueryParamsRequest) + return object; + return new $root.cosmos.slashing.v1beta1.QueryParamsRequest(); + }; + + /** + * Creates a plain object from a QueryParamsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.slashing.v1beta1.QueryParamsRequest + * @static + * @param {cosmos.slashing.v1beta1.QueryParamsRequest} message QueryParamsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryParamsRequest.toObject = function toObject() { + return {}; + }; + + /** + * Converts this QueryParamsRequest to JSON. + * @function toJSON + * @memberof cosmos.slashing.v1beta1.QueryParamsRequest + * @instance + * @returns {Object.} JSON object + */ + QueryParamsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryParamsRequest; + })(v1beta1.QueryParamsRequest || {}); + + v1beta1.QueryParamsResponse = (function(QueryParamsResponse) { + + /** + * Properties of a QueryParamsResponse. + * @memberof cosmos.slashing.v1beta1 + * @interface IQueryParamsResponse + * @property {cosmos.slashing.v1beta1.IParams|null} [params] QueryParamsResponse params + */ + + /** + * Constructs a new QueryParamsResponse. + * @memberof cosmos.slashing.v1beta1 + * @classdesc Represents a QueryParamsResponse. + * @implements IQueryParamsResponse + * @constructor + * @param {cosmos.slashing.v1beta1.IQueryParamsResponse=} [properties] Properties to set + */ + function QueryParamsResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryParamsResponse params. + * @member {cosmos.slashing.v1beta1.IParams|null|undefined} params + * @memberof cosmos.slashing.v1beta1.QueryParamsResponse + * @instance + */ + QueryParamsResponse.prototype.params = null; + + /** + * Creates a new QueryParamsResponse instance using the specified properties. + * @function create + * @memberof cosmos.slashing.v1beta1.QueryParamsResponse + * @static + * @param {cosmos.slashing.v1beta1.IQueryParamsResponse=} [properties] Properties to set + * @returns {cosmos.slashing.v1beta1.QueryParamsResponse} QueryParamsResponse instance + */ + QueryParamsResponse.create = function create(properties) { + return new QueryParamsResponse(properties); + }; + + /** + * Encodes the specified QueryParamsResponse message. Does not implicitly {@link cosmos.slashing.v1beta1.QueryParamsResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.slashing.v1beta1.QueryParamsResponse + * @static + * @param {cosmos.slashing.v1beta1.IQueryParamsResponse} message QueryParamsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryParamsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.params != null && Object.hasOwnProperty.call(message, "params")) + $root.cosmos.slashing.v1beta1.Params.encode(message.params, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryParamsResponse message, length delimited. Does not implicitly {@link cosmos.slashing.v1beta1.QueryParamsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.slashing.v1beta1.QueryParamsResponse + * @static + * @param {cosmos.slashing.v1beta1.IQueryParamsResponse} message QueryParamsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryParamsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryParamsResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.slashing.v1beta1.QueryParamsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.slashing.v1beta1.QueryParamsResponse} QueryParamsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryParamsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.slashing.v1beta1.QueryParamsResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.params = $root.cosmos.slashing.v1beta1.Params.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryParamsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.slashing.v1beta1.QueryParamsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.slashing.v1beta1.QueryParamsResponse} QueryParamsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryParamsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryParamsResponse message. + * @function verify + * @memberof cosmos.slashing.v1beta1.QueryParamsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryParamsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.params != null && message.hasOwnProperty("params")) { + let error = $root.cosmos.slashing.v1beta1.Params.verify(message.params); + if (error) + return "params." + error; + } + return null; + }; + + /** + * Creates a QueryParamsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.slashing.v1beta1.QueryParamsResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.slashing.v1beta1.QueryParamsResponse} QueryParamsResponse + */ + QueryParamsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.slashing.v1beta1.QueryParamsResponse) + return object; + let message = new $root.cosmos.slashing.v1beta1.QueryParamsResponse(); + if (object.params != null) { + if (typeof object.params !== "object") + throw TypeError(".cosmos.slashing.v1beta1.QueryParamsResponse.params: object expected"); + message.params = $root.cosmos.slashing.v1beta1.Params.fromObject(object.params); + } + return message; + }; + + /** + * Creates a plain object from a QueryParamsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.slashing.v1beta1.QueryParamsResponse + * @static + * @param {cosmos.slashing.v1beta1.QueryParamsResponse} message QueryParamsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryParamsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.params = null; + if (message.params != null && message.hasOwnProperty("params")) + object.params = $root.cosmos.slashing.v1beta1.Params.toObject(message.params, options); + return object; + }; + + /** + * Converts this QueryParamsResponse to JSON. + * @function toJSON + * @memberof cosmos.slashing.v1beta1.QueryParamsResponse + * @instance + * @returns {Object.} JSON object + */ + QueryParamsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryParamsResponse; + })(v1beta1.QueryParamsResponse || {}); + + v1beta1.QuerySigningInfoRequest = (function(QuerySigningInfoRequest) { + + /** + * Properties of a QuerySigningInfoRequest. + * @memberof cosmos.slashing.v1beta1 + * @interface IQuerySigningInfoRequest + * @property {string|null} [consAddress] QuerySigningInfoRequest consAddress + */ + + /** + * Constructs a new QuerySigningInfoRequest. + * @memberof cosmos.slashing.v1beta1 + * @classdesc Represents a QuerySigningInfoRequest. + * @implements IQuerySigningInfoRequest + * @constructor + * @param {cosmos.slashing.v1beta1.IQuerySigningInfoRequest=} [properties] Properties to set + */ + function QuerySigningInfoRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QuerySigningInfoRequest consAddress. + * @member {string} consAddress + * @memberof cosmos.slashing.v1beta1.QuerySigningInfoRequest + * @instance + */ + QuerySigningInfoRequest.prototype.consAddress = ""; + + /** + * Creates a new QuerySigningInfoRequest instance using the specified properties. + * @function create + * @memberof cosmos.slashing.v1beta1.QuerySigningInfoRequest + * @static + * @param {cosmos.slashing.v1beta1.IQuerySigningInfoRequest=} [properties] Properties to set + * @returns {cosmos.slashing.v1beta1.QuerySigningInfoRequest} QuerySigningInfoRequest instance + */ + QuerySigningInfoRequest.create = function create(properties) { + return new QuerySigningInfoRequest(properties); + }; + + /** + * Encodes the specified QuerySigningInfoRequest message. Does not implicitly {@link cosmos.slashing.v1beta1.QuerySigningInfoRequest.verify|verify} messages. + * @function encode + * @memberof cosmos.slashing.v1beta1.QuerySigningInfoRequest + * @static + * @param {cosmos.slashing.v1beta1.IQuerySigningInfoRequest} message QuerySigningInfoRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuerySigningInfoRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.consAddress != null && Object.hasOwnProperty.call(message, "consAddress")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.consAddress); + return writer; + }; + + /** + * Encodes the specified QuerySigningInfoRequest message, length delimited. Does not implicitly {@link cosmos.slashing.v1beta1.QuerySigningInfoRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.slashing.v1beta1.QuerySigningInfoRequest + * @static + * @param {cosmos.slashing.v1beta1.IQuerySigningInfoRequest} message QuerySigningInfoRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuerySigningInfoRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QuerySigningInfoRequest message from the specified reader or buffer. + * @function decode + * @memberof cosmos.slashing.v1beta1.QuerySigningInfoRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.slashing.v1beta1.QuerySigningInfoRequest} QuerySigningInfoRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuerySigningInfoRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.slashing.v1beta1.QuerySigningInfoRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.consAddress = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QuerySigningInfoRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.slashing.v1beta1.QuerySigningInfoRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.slashing.v1beta1.QuerySigningInfoRequest} QuerySigningInfoRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuerySigningInfoRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QuerySigningInfoRequest message. + * @function verify + * @memberof cosmos.slashing.v1beta1.QuerySigningInfoRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QuerySigningInfoRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.consAddress != null && message.hasOwnProperty("consAddress")) + if (!$util.isString(message.consAddress)) + return "consAddress: string expected"; + return null; + }; + + /** + * Creates a QuerySigningInfoRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.slashing.v1beta1.QuerySigningInfoRequest + * @static + * @param {Object.} object Plain object + * @returns {cosmos.slashing.v1beta1.QuerySigningInfoRequest} QuerySigningInfoRequest + */ + QuerySigningInfoRequest.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.slashing.v1beta1.QuerySigningInfoRequest) + return object; + let message = new $root.cosmos.slashing.v1beta1.QuerySigningInfoRequest(); + if (object.consAddress != null) + message.consAddress = String(object.consAddress); + return message; + }; + + /** + * Creates a plain object from a QuerySigningInfoRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.slashing.v1beta1.QuerySigningInfoRequest + * @static + * @param {cosmos.slashing.v1beta1.QuerySigningInfoRequest} message QuerySigningInfoRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QuerySigningInfoRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.consAddress = ""; + if (message.consAddress != null && message.hasOwnProperty("consAddress")) + object.consAddress = message.consAddress; + return object; + }; + + /** + * Converts this QuerySigningInfoRequest to JSON. + * @function toJSON + * @memberof cosmos.slashing.v1beta1.QuerySigningInfoRequest + * @instance + * @returns {Object.} JSON object + */ + QuerySigningInfoRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QuerySigningInfoRequest; + })(v1beta1.QuerySigningInfoRequest || {}); + + v1beta1.QuerySigningInfoResponse = (function(QuerySigningInfoResponse) { + + /** + * Properties of a QuerySigningInfoResponse. + * @memberof cosmos.slashing.v1beta1 + * @interface IQuerySigningInfoResponse + * @property {cosmos.slashing.v1beta1.IValidatorSigningInfo|null} [valSigningInfo] QuerySigningInfoResponse valSigningInfo + */ + + /** + * Constructs a new QuerySigningInfoResponse. + * @memberof cosmos.slashing.v1beta1 + * @classdesc Represents a QuerySigningInfoResponse. + * @implements IQuerySigningInfoResponse + * @constructor + * @param {cosmos.slashing.v1beta1.IQuerySigningInfoResponse=} [properties] Properties to set + */ + function QuerySigningInfoResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QuerySigningInfoResponse valSigningInfo. + * @member {cosmos.slashing.v1beta1.IValidatorSigningInfo|null|undefined} valSigningInfo + * @memberof cosmos.slashing.v1beta1.QuerySigningInfoResponse + * @instance + */ + QuerySigningInfoResponse.prototype.valSigningInfo = null; + + /** + * Creates a new QuerySigningInfoResponse instance using the specified properties. + * @function create + * @memberof cosmos.slashing.v1beta1.QuerySigningInfoResponse + * @static + * @param {cosmos.slashing.v1beta1.IQuerySigningInfoResponse=} [properties] Properties to set + * @returns {cosmos.slashing.v1beta1.QuerySigningInfoResponse} QuerySigningInfoResponse instance + */ + QuerySigningInfoResponse.create = function create(properties) { + return new QuerySigningInfoResponse(properties); + }; + + /** + * Encodes the specified QuerySigningInfoResponse message. Does not implicitly {@link cosmos.slashing.v1beta1.QuerySigningInfoResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.slashing.v1beta1.QuerySigningInfoResponse + * @static + * @param {cosmos.slashing.v1beta1.IQuerySigningInfoResponse} message QuerySigningInfoResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuerySigningInfoResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.valSigningInfo != null && Object.hasOwnProperty.call(message, "valSigningInfo")) + $root.cosmos.slashing.v1beta1.ValidatorSigningInfo.encode(message.valSigningInfo, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QuerySigningInfoResponse message, length delimited. Does not implicitly {@link cosmos.slashing.v1beta1.QuerySigningInfoResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.slashing.v1beta1.QuerySigningInfoResponse + * @static + * @param {cosmos.slashing.v1beta1.IQuerySigningInfoResponse} message QuerySigningInfoResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuerySigningInfoResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QuerySigningInfoResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.slashing.v1beta1.QuerySigningInfoResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.slashing.v1beta1.QuerySigningInfoResponse} QuerySigningInfoResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuerySigningInfoResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.slashing.v1beta1.QuerySigningInfoResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.valSigningInfo = $root.cosmos.slashing.v1beta1.ValidatorSigningInfo.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QuerySigningInfoResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.slashing.v1beta1.QuerySigningInfoResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.slashing.v1beta1.QuerySigningInfoResponse} QuerySigningInfoResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuerySigningInfoResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QuerySigningInfoResponse message. + * @function verify + * @memberof cosmos.slashing.v1beta1.QuerySigningInfoResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QuerySigningInfoResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.valSigningInfo != null && message.hasOwnProperty("valSigningInfo")) { + let error = $root.cosmos.slashing.v1beta1.ValidatorSigningInfo.verify(message.valSigningInfo); + if (error) + return "valSigningInfo." + error; + } + return null; + }; + + /** + * Creates a QuerySigningInfoResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.slashing.v1beta1.QuerySigningInfoResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.slashing.v1beta1.QuerySigningInfoResponse} QuerySigningInfoResponse + */ + QuerySigningInfoResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.slashing.v1beta1.QuerySigningInfoResponse) + return object; + let message = new $root.cosmos.slashing.v1beta1.QuerySigningInfoResponse(); + if (object.valSigningInfo != null) { + if (typeof object.valSigningInfo !== "object") + throw TypeError(".cosmos.slashing.v1beta1.QuerySigningInfoResponse.valSigningInfo: object expected"); + message.valSigningInfo = $root.cosmos.slashing.v1beta1.ValidatorSigningInfo.fromObject(object.valSigningInfo); + } + return message; + }; + + /** + * Creates a plain object from a QuerySigningInfoResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.slashing.v1beta1.QuerySigningInfoResponse + * @static + * @param {cosmos.slashing.v1beta1.QuerySigningInfoResponse} message QuerySigningInfoResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QuerySigningInfoResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.valSigningInfo = null; + if (message.valSigningInfo != null && message.hasOwnProperty("valSigningInfo")) + object.valSigningInfo = $root.cosmos.slashing.v1beta1.ValidatorSigningInfo.toObject(message.valSigningInfo, options); + return object; + }; + + /** + * Converts this QuerySigningInfoResponse to JSON. + * @function toJSON + * @memberof cosmos.slashing.v1beta1.QuerySigningInfoResponse + * @instance + * @returns {Object.} JSON object + */ + QuerySigningInfoResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QuerySigningInfoResponse; + })(v1beta1.QuerySigningInfoResponse || {}); + + v1beta1.QuerySigningInfosRequest = (function(QuerySigningInfosRequest) { + + /** + * Properties of a QuerySigningInfosRequest. + * @memberof cosmos.slashing.v1beta1 + * @interface IQuerySigningInfosRequest + * @property {cosmos.base.query.v1beta1.IPageRequest|null} [pagination] QuerySigningInfosRequest pagination + */ + + /** + * Constructs a new QuerySigningInfosRequest. + * @memberof cosmos.slashing.v1beta1 + * @classdesc Represents a QuerySigningInfosRequest. + * @implements IQuerySigningInfosRequest + * @constructor + * @param {cosmos.slashing.v1beta1.IQuerySigningInfosRequest=} [properties] Properties to set + */ + function QuerySigningInfosRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QuerySigningInfosRequest pagination. + * @member {cosmos.base.query.v1beta1.IPageRequest|null|undefined} pagination + * @memberof cosmos.slashing.v1beta1.QuerySigningInfosRequest + * @instance + */ + QuerySigningInfosRequest.prototype.pagination = null; + + /** + * Creates a new QuerySigningInfosRequest instance using the specified properties. + * @function create + * @memberof cosmos.slashing.v1beta1.QuerySigningInfosRequest + * @static + * @param {cosmos.slashing.v1beta1.IQuerySigningInfosRequest=} [properties] Properties to set + * @returns {cosmos.slashing.v1beta1.QuerySigningInfosRequest} QuerySigningInfosRequest instance + */ + QuerySigningInfosRequest.create = function create(properties) { + return new QuerySigningInfosRequest(properties); + }; + + /** + * Encodes the specified QuerySigningInfosRequest message. Does not implicitly {@link cosmos.slashing.v1beta1.QuerySigningInfosRequest.verify|verify} messages. + * @function encode + * @memberof cosmos.slashing.v1beta1.QuerySigningInfosRequest + * @static + * @param {cosmos.slashing.v1beta1.IQuerySigningInfosRequest} message QuerySigningInfosRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuerySigningInfosRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) + $root.cosmos.base.query.v1beta1.PageRequest.encode(message.pagination, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QuerySigningInfosRequest message, length delimited. Does not implicitly {@link cosmos.slashing.v1beta1.QuerySigningInfosRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.slashing.v1beta1.QuerySigningInfosRequest + * @static + * @param {cosmos.slashing.v1beta1.IQuerySigningInfosRequest} message QuerySigningInfosRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuerySigningInfosRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QuerySigningInfosRequest message from the specified reader or buffer. + * @function decode + * @memberof cosmos.slashing.v1beta1.QuerySigningInfosRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.slashing.v1beta1.QuerySigningInfosRequest} QuerySigningInfosRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuerySigningInfosRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.slashing.v1beta1.QuerySigningInfosRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QuerySigningInfosRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.slashing.v1beta1.QuerySigningInfosRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.slashing.v1beta1.QuerySigningInfosRequest} QuerySigningInfosRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuerySigningInfosRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QuerySigningInfosRequest message. + * @function verify + * @memberof cosmos.slashing.v1beta1.QuerySigningInfosRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QuerySigningInfosRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.pagination != null && message.hasOwnProperty("pagination")) { + let error = $root.cosmos.base.query.v1beta1.PageRequest.verify(message.pagination); + if (error) + return "pagination." + error; + } + return null; + }; + + /** + * Creates a QuerySigningInfosRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.slashing.v1beta1.QuerySigningInfosRequest + * @static + * @param {Object.} object Plain object + * @returns {cosmos.slashing.v1beta1.QuerySigningInfosRequest} QuerySigningInfosRequest + */ + QuerySigningInfosRequest.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.slashing.v1beta1.QuerySigningInfosRequest) + return object; + let message = new $root.cosmos.slashing.v1beta1.QuerySigningInfosRequest(); + if (object.pagination != null) { + if (typeof object.pagination !== "object") + throw TypeError(".cosmos.slashing.v1beta1.QuerySigningInfosRequest.pagination: object expected"); + message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.fromObject(object.pagination); + } + return message; + }; + + /** + * Creates a plain object from a QuerySigningInfosRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.slashing.v1beta1.QuerySigningInfosRequest + * @static + * @param {cosmos.slashing.v1beta1.QuerySigningInfosRequest} message QuerySigningInfosRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QuerySigningInfosRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.pagination = null; + if (message.pagination != null && message.hasOwnProperty("pagination")) + object.pagination = $root.cosmos.base.query.v1beta1.PageRequest.toObject(message.pagination, options); + return object; + }; + + /** + * Converts this QuerySigningInfosRequest to JSON. + * @function toJSON + * @memberof cosmos.slashing.v1beta1.QuerySigningInfosRequest + * @instance + * @returns {Object.} JSON object + */ + QuerySigningInfosRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QuerySigningInfosRequest; + })(v1beta1.QuerySigningInfosRequest || {}); + + v1beta1.QuerySigningInfosResponse = (function(QuerySigningInfosResponse) { + + /** + * Properties of a QuerySigningInfosResponse. + * @memberof cosmos.slashing.v1beta1 + * @interface IQuerySigningInfosResponse + * @property {Array.|null} [info] QuerySigningInfosResponse info + * @property {cosmos.base.query.v1beta1.IPageResponse|null} [pagination] QuerySigningInfosResponse pagination + */ + + /** + * Constructs a new QuerySigningInfosResponse. + * @memberof cosmos.slashing.v1beta1 + * @classdesc Represents a QuerySigningInfosResponse. + * @implements IQuerySigningInfosResponse + * @constructor + * @param {cosmos.slashing.v1beta1.IQuerySigningInfosResponse=} [properties] Properties to set + */ + function QuerySigningInfosResponse(properties) { + this.info = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QuerySigningInfosResponse info. + * @member {Array.} info + * @memberof cosmos.slashing.v1beta1.QuerySigningInfosResponse + * @instance + */ + QuerySigningInfosResponse.prototype.info = $util.emptyArray; + + /** + * QuerySigningInfosResponse pagination. + * @member {cosmos.base.query.v1beta1.IPageResponse|null|undefined} pagination + * @memberof cosmos.slashing.v1beta1.QuerySigningInfosResponse + * @instance + */ + QuerySigningInfosResponse.prototype.pagination = null; + + /** + * Creates a new QuerySigningInfosResponse instance using the specified properties. + * @function create + * @memberof cosmos.slashing.v1beta1.QuerySigningInfosResponse + * @static + * @param {cosmos.slashing.v1beta1.IQuerySigningInfosResponse=} [properties] Properties to set + * @returns {cosmos.slashing.v1beta1.QuerySigningInfosResponse} QuerySigningInfosResponse instance + */ + QuerySigningInfosResponse.create = function create(properties) { + return new QuerySigningInfosResponse(properties); + }; + + /** + * Encodes the specified QuerySigningInfosResponse message. Does not implicitly {@link cosmos.slashing.v1beta1.QuerySigningInfosResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.slashing.v1beta1.QuerySigningInfosResponse + * @static + * @param {cosmos.slashing.v1beta1.IQuerySigningInfosResponse} message QuerySigningInfosResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuerySigningInfosResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.info != null && message.info.length) + for (let i = 0; i < message.info.length; ++i) + $root.cosmos.slashing.v1beta1.ValidatorSigningInfo.encode(message.info[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) + $root.cosmos.base.query.v1beta1.PageResponse.encode(message.pagination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QuerySigningInfosResponse message, length delimited. Does not implicitly {@link cosmos.slashing.v1beta1.QuerySigningInfosResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.slashing.v1beta1.QuerySigningInfosResponse + * @static + * @param {cosmos.slashing.v1beta1.IQuerySigningInfosResponse} message QuerySigningInfosResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuerySigningInfosResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QuerySigningInfosResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.slashing.v1beta1.QuerySigningInfosResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.slashing.v1beta1.QuerySigningInfosResponse} QuerySigningInfosResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuerySigningInfosResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.slashing.v1beta1.QuerySigningInfosResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.info && message.info.length)) + message.info = []; + message.info.push($root.cosmos.slashing.v1beta1.ValidatorSigningInfo.decode(reader, reader.uint32())); + break; + case 2: + message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QuerySigningInfosResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.slashing.v1beta1.QuerySigningInfosResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.slashing.v1beta1.QuerySigningInfosResponse} QuerySigningInfosResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuerySigningInfosResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QuerySigningInfosResponse message. + * @function verify + * @memberof cosmos.slashing.v1beta1.QuerySigningInfosResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QuerySigningInfosResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.info != null && message.hasOwnProperty("info")) { + if (!Array.isArray(message.info)) + return "info: array expected"; + for (let i = 0; i < message.info.length; ++i) { + let error = $root.cosmos.slashing.v1beta1.ValidatorSigningInfo.verify(message.info[i]); + if (error) + return "info." + error; + } + } + if (message.pagination != null && message.hasOwnProperty("pagination")) { + let error = $root.cosmos.base.query.v1beta1.PageResponse.verify(message.pagination); + if (error) + return "pagination." + error; + } + return null; + }; + + /** + * Creates a QuerySigningInfosResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.slashing.v1beta1.QuerySigningInfosResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.slashing.v1beta1.QuerySigningInfosResponse} QuerySigningInfosResponse + */ + QuerySigningInfosResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.slashing.v1beta1.QuerySigningInfosResponse) + return object; + let message = new $root.cosmos.slashing.v1beta1.QuerySigningInfosResponse(); + if (object.info) { + if (!Array.isArray(object.info)) + throw TypeError(".cosmos.slashing.v1beta1.QuerySigningInfosResponse.info: array expected"); + message.info = []; + for (let i = 0; i < object.info.length; ++i) { + if (typeof object.info[i] !== "object") + throw TypeError(".cosmos.slashing.v1beta1.QuerySigningInfosResponse.info: object expected"); + message.info[i] = $root.cosmos.slashing.v1beta1.ValidatorSigningInfo.fromObject(object.info[i]); + } + } + if (object.pagination != null) { + if (typeof object.pagination !== "object") + throw TypeError(".cosmos.slashing.v1beta1.QuerySigningInfosResponse.pagination: object expected"); + message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.fromObject(object.pagination); + } + return message; + }; + + /** + * Creates a plain object from a QuerySigningInfosResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.slashing.v1beta1.QuerySigningInfosResponse + * @static + * @param {cosmos.slashing.v1beta1.QuerySigningInfosResponse} message QuerySigningInfosResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QuerySigningInfosResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.info = []; + if (options.defaults) + object.pagination = null; + if (message.info && message.info.length) { + object.info = []; + for (let j = 0; j < message.info.length; ++j) + object.info[j] = $root.cosmos.slashing.v1beta1.ValidatorSigningInfo.toObject(message.info[j], options); + } + if (message.pagination != null && message.hasOwnProperty("pagination")) + object.pagination = $root.cosmos.base.query.v1beta1.PageResponse.toObject(message.pagination, options); + return object; + }; + + /** + * Converts this QuerySigningInfosResponse to JSON. + * @function toJSON + * @memberof cosmos.slashing.v1beta1.QuerySigningInfosResponse + * @instance + * @returns {Object.} JSON object + */ + QuerySigningInfosResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QuerySigningInfosResponse; + })(v1beta1.QuerySigningInfosResponse || {}); + + v1beta1.ValidatorSigningInfo = (function(ValidatorSigningInfo) { + + /** + * Properties of a ValidatorSigningInfo. + * @memberof cosmos.slashing.v1beta1 + * @interface IValidatorSigningInfo + * @property {string|null} [address] ValidatorSigningInfo address + * @property {number|Long|null} [startHeight] ValidatorSigningInfo startHeight + * @property {number|Long|null} [indexOffset] ValidatorSigningInfo indexOffset + * @property {google.protobuf.ITimestamp|null} [jailedUntil] ValidatorSigningInfo jailedUntil + * @property {boolean|null} [tombstoned] ValidatorSigningInfo tombstoned + * @property {number|Long|null} [missedBlocksCounter] ValidatorSigningInfo missedBlocksCounter + */ + + /** + * Constructs a new ValidatorSigningInfo. + * @memberof cosmos.slashing.v1beta1 + * @classdesc Represents a ValidatorSigningInfo. + * @implements IValidatorSigningInfo + * @constructor + * @param {cosmos.slashing.v1beta1.IValidatorSigningInfo=} [properties] Properties to set + */ + function ValidatorSigningInfo(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ValidatorSigningInfo address. + * @member {string} address + * @memberof cosmos.slashing.v1beta1.ValidatorSigningInfo + * @instance + */ + ValidatorSigningInfo.prototype.address = ""; + + /** + * ValidatorSigningInfo startHeight. + * @member {number|Long} startHeight + * @memberof cosmos.slashing.v1beta1.ValidatorSigningInfo + * @instance + */ + ValidatorSigningInfo.prototype.startHeight = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ValidatorSigningInfo indexOffset. + * @member {number|Long} indexOffset + * @memberof cosmos.slashing.v1beta1.ValidatorSigningInfo + * @instance + */ + ValidatorSigningInfo.prototype.indexOffset = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ValidatorSigningInfo jailedUntil. + * @member {google.protobuf.ITimestamp|null|undefined} jailedUntil + * @memberof cosmos.slashing.v1beta1.ValidatorSigningInfo + * @instance + */ + ValidatorSigningInfo.prototype.jailedUntil = null; + + /** + * ValidatorSigningInfo tombstoned. + * @member {boolean} tombstoned + * @memberof cosmos.slashing.v1beta1.ValidatorSigningInfo + * @instance + */ + ValidatorSigningInfo.prototype.tombstoned = false; + + /** + * ValidatorSigningInfo missedBlocksCounter. + * @member {number|Long} missedBlocksCounter + * @memberof cosmos.slashing.v1beta1.ValidatorSigningInfo + * @instance + */ + ValidatorSigningInfo.prototype.missedBlocksCounter = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new ValidatorSigningInfo instance using the specified properties. + * @function create + * @memberof cosmos.slashing.v1beta1.ValidatorSigningInfo + * @static + * @param {cosmos.slashing.v1beta1.IValidatorSigningInfo=} [properties] Properties to set + * @returns {cosmos.slashing.v1beta1.ValidatorSigningInfo} ValidatorSigningInfo instance + */ + ValidatorSigningInfo.create = function create(properties) { + return new ValidatorSigningInfo(properties); + }; + + /** + * Encodes the specified ValidatorSigningInfo message. Does not implicitly {@link cosmos.slashing.v1beta1.ValidatorSigningInfo.verify|verify} messages. + * @function encode + * @memberof cosmos.slashing.v1beta1.ValidatorSigningInfo + * @static + * @param {cosmos.slashing.v1beta1.IValidatorSigningInfo} message ValidatorSigningInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValidatorSigningInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.address != null && Object.hasOwnProperty.call(message, "address")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.address); + if (message.startHeight != null && Object.hasOwnProperty.call(message, "startHeight")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.startHeight); + if (message.indexOffset != null && Object.hasOwnProperty.call(message, "indexOffset")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.indexOffset); + if (message.jailedUntil != null && Object.hasOwnProperty.call(message, "jailedUntil")) + $root.google.protobuf.Timestamp.encode(message.jailedUntil, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.tombstoned != null && Object.hasOwnProperty.call(message, "tombstoned")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.tombstoned); + if (message.missedBlocksCounter != null && Object.hasOwnProperty.call(message, "missedBlocksCounter")) + writer.uint32(/* id 6, wireType 0 =*/48).int64(message.missedBlocksCounter); + return writer; + }; + + /** + * Encodes the specified ValidatorSigningInfo message, length delimited. Does not implicitly {@link cosmos.slashing.v1beta1.ValidatorSigningInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.slashing.v1beta1.ValidatorSigningInfo + * @static + * @param {cosmos.slashing.v1beta1.IValidatorSigningInfo} message ValidatorSigningInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValidatorSigningInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ValidatorSigningInfo message from the specified reader or buffer. + * @function decode + * @memberof cosmos.slashing.v1beta1.ValidatorSigningInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.slashing.v1beta1.ValidatorSigningInfo} ValidatorSigningInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValidatorSigningInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.slashing.v1beta1.ValidatorSigningInfo(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.address = reader.string(); + break; + case 2: + message.startHeight = reader.int64(); + break; + case 3: + message.indexOffset = reader.int64(); + break; + case 4: + message.jailedUntil = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 5: + message.tombstoned = reader.bool(); + break; + case 6: + message.missedBlocksCounter = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ValidatorSigningInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.slashing.v1beta1.ValidatorSigningInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.slashing.v1beta1.ValidatorSigningInfo} ValidatorSigningInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValidatorSigningInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ValidatorSigningInfo message. + * @function verify + * @memberof cosmos.slashing.v1beta1.ValidatorSigningInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ValidatorSigningInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.address != null && message.hasOwnProperty("address")) + if (!$util.isString(message.address)) + return "address: string expected"; + if (message.startHeight != null && message.hasOwnProperty("startHeight")) + if (!$util.isInteger(message.startHeight) && !(message.startHeight && $util.isInteger(message.startHeight.low) && $util.isInteger(message.startHeight.high))) + return "startHeight: integer|Long expected"; + if (message.indexOffset != null && message.hasOwnProperty("indexOffset")) + if (!$util.isInteger(message.indexOffset) && !(message.indexOffset && $util.isInteger(message.indexOffset.low) && $util.isInteger(message.indexOffset.high))) + return "indexOffset: integer|Long expected"; + if (message.jailedUntil != null && message.hasOwnProperty("jailedUntil")) { + let error = $root.google.protobuf.Timestamp.verify(message.jailedUntil); + if (error) + return "jailedUntil." + error; + } + if (message.tombstoned != null && message.hasOwnProperty("tombstoned")) + if (typeof message.tombstoned !== "boolean") + return "tombstoned: boolean expected"; + if (message.missedBlocksCounter != null && message.hasOwnProperty("missedBlocksCounter")) + if (!$util.isInteger(message.missedBlocksCounter) && !(message.missedBlocksCounter && $util.isInteger(message.missedBlocksCounter.low) && $util.isInteger(message.missedBlocksCounter.high))) + return "missedBlocksCounter: integer|Long expected"; + return null; + }; + + /** + * Creates a ValidatorSigningInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.slashing.v1beta1.ValidatorSigningInfo + * @static + * @param {Object.} object Plain object + * @returns {cosmos.slashing.v1beta1.ValidatorSigningInfo} ValidatorSigningInfo + */ + ValidatorSigningInfo.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.slashing.v1beta1.ValidatorSigningInfo) + return object; + let message = new $root.cosmos.slashing.v1beta1.ValidatorSigningInfo(); + if (object.address != null) + message.address = String(object.address); + if (object.startHeight != null) + if ($util.Long) + (message.startHeight = $util.Long.fromValue(object.startHeight)).unsigned = false; + else if (typeof object.startHeight === "string") + message.startHeight = parseInt(object.startHeight, 10); + else if (typeof object.startHeight === "number") + message.startHeight = object.startHeight; + else if (typeof object.startHeight === "object") + message.startHeight = new $util.LongBits(object.startHeight.low >>> 0, object.startHeight.high >>> 0).toNumber(); + if (object.indexOffset != null) + if ($util.Long) + (message.indexOffset = $util.Long.fromValue(object.indexOffset)).unsigned = false; + else if (typeof object.indexOffset === "string") + message.indexOffset = parseInt(object.indexOffset, 10); + else if (typeof object.indexOffset === "number") + message.indexOffset = object.indexOffset; + else if (typeof object.indexOffset === "object") + message.indexOffset = new $util.LongBits(object.indexOffset.low >>> 0, object.indexOffset.high >>> 0).toNumber(); + if (object.jailedUntil != null) { + if (typeof object.jailedUntil !== "object") + throw TypeError(".cosmos.slashing.v1beta1.ValidatorSigningInfo.jailedUntil: object expected"); + message.jailedUntil = $root.google.protobuf.Timestamp.fromObject(object.jailedUntil); + } + if (object.tombstoned != null) + message.tombstoned = Boolean(object.tombstoned); + if (object.missedBlocksCounter != null) + if ($util.Long) + (message.missedBlocksCounter = $util.Long.fromValue(object.missedBlocksCounter)).unsigned = false; + else if (typeof object.missedBlocksCounter === "string") + message.missedBlocksCounter = parseInt(object.missedBlocksCounter, 10); + else if (typeof object.missedBlocksCounter === "number") + message.missedBlocksCounter = object.missedBlocksCounter; + else if (typeof object.missedBlocksCounter === "object") + message.missedBlocksCounter = new $util.LongBits(object.missedBlocksCounter.low >>> 0, object.missedBlocksCounter.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a ValidatorSigningInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.slashing.v1beta1.ValidatorSigningInfo + * @static + * @param {cosmos.slashing.v1beta1.ValidatorSigningInfo} message ValidatorSigningInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ValidatorSigningInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.address = ""; + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.startHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.startHeight = options.longs === String ? "0" : 0; + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.indexOffset = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.indexOffset = options.longs === String ? "0" : 0; + object.jailedUntil = null; + object.tombstoned = false; + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.missedBlocksCounter = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.missedBlocksCounter = options.longs === String ? "0" : 0; + } + if (message.address != null && message.hasOwnProperty("address")) + object.address = message.address; + if (message.startHeight != null && message.hasOwnProperty("startHeight")) + if (typeof message.startHeight === "number") + object.startHeight = options.longs === String ? String(message.startHeight) : message.startHeight; + else + object.startHeight = options.longs === String ? $util.Long.prototype.toString.call(message.startHeight) : options.longs === Number ? new $util.LongBits(message.startHeight.low >>> 0, message.startHeight.high >>> 0).toNumber() : message.startHeight; + if (message.indexOffset != null && message.hasOwnProperty("indexOffset")) + if (typeof message.indexOffset === "number") + object.indexOffset = options.longs === String ? String(message.indexOffset) : message.indexOffset; + else + object.indexOffset = options.longs === String ? $util.Long.prototype.toString.call(message.indexOffset) : options.longs === Number ? new $util.LongBits(message.indexOffset.low >>> 0, message.indexOffset.high >>> 0).toNumber() : message.indexOffset; + if (message.jailedUntil != null && message.hasOwnProperty("jailedUntil")) + object.jailedUntil = $root.google.protobuf.Timestamp.toObject(message.jailedUntil, options); + if (message.tombstoned != null && message.hasOwnProperty("tombstoned")) + object.tombstoned = message.tombstoned; + if (message.missedBlocksCounter != null && message.hasOwnProperty("missedBlocksCounter")) + if (typeof message.missedBlocksCounter === "number") + object.missedBlocksCounter = options.longs === String ? String(message.missedBlocksCounter) : message.missedBlocksCounter; + else + object.missedBlocksCounter = options.longs === String ? $util.Long.prototype.toString.call(message.missedBlocksCounter) : options.longs === Number ? new $util.LongBits(message.missedBlocksCounter.low >>> 0, message.missedBlocksCounter.high >>> 0).toNumber() : message.missedBlocksCounter; + return object; + }; + + /** + * Converts this ValidatorSigningInfo to JSON. + * @function toJSON + * @memberof cosmos.slashing.v1beta1.ValidatorSigningInfo + * @instance + * @returns {Object.} JSON object + */ + ValidatorSigningInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ValidatorSigningInfo; + })(v1beta1.ValidatorSigningInfo || {}); + + v1beta1.Params = (function(Params) { + + /** + * Properties of a Params. + * @memberof cosmos.slashing.v1beta1 + * @interface IParams + * @property {number|Long|null} [signedBlocksWindow] Params signedBlocksWindow + * @property {Uint8Array|null} [minSignedPerWindow] Params minSignedPerWindow + * @property {google.protobuf.IDuration|null} [downtimeJailDuration] Params downtimeJailDuration + * @property {Uint8Array|null} [slashFractionDoubleSign] Params slashFractionDoubleSign + * @property {Uint8Array|null} [slashFractionDowntime] Params slashFractionDowntime + */ + + /** + * Constructs a new Params. + * @memberof cosmos.slashing.v1beta1 + * @classdesc Represents a Params. + * @implements IParams + * @constructor + * @param {cosmos.slashing.v1beta1.IParams=} [properties] Properties to set + */ + function Params(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Params signedBlocksWindow. + * @member {number|Long} signedBlocksWindow + * @memberof cosmos.slashing.v1beta1.Params + * @instance + */ + Params.prototype.signedBlocksWindow = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Params minSignedPerWindow. + * @member {Uint8Array} minSignedPerWindow + * @memberof cosmos.slashing.v1beta1.Params + * @instance + */ + Params.prototype.minSignedPerWindow = $util.newBuffer([]); + + /** + * Params downtimeJailDuration. + * @member {google.protobuf.IDuration|null|undefined} downtimeJailDuration + * @memberof cosmos.slashing.v1beta1.Params + * @instance + */ + Params.prototype.downtimeJailDuration = null; + + /** + * Params slashFractionDoubleSign. + * @member {Uint8Array} slashFractionDoubleSign + * @memberof cosmos.slashing.v1beta1.Params + * @instance + */ + Params.prototype.slashFractionDoubleSign = $util.newBuffer([]); + + /** + * Params slashFractionDowntime. + * @member {Uint8Array} slashFractionDowntime + * @memberof cosmos.slashing.v1beta1.Params + * @instance + */ + Params.prototype.slashFractionDowntime = $util.newBuffer([]); + + /** + * Creates a new Params instance using the specified properties. + * @function create + * @memberof cosmos.slashing.v1beta1.Params + * @static + * @param {cosmos.slashing.v1beta1.IParams=} [properties] Properties to set + * @returns {cosmos.slashing.v1beta1.Params} Params instance + */ + Params.create = function create(properties) { + return new Params(properties); + }; + + /** + * Encodes the specified Params message. Does not implicitly {@link cosmos.slashing.v1beta1.Params.verify|verify} messages. + * @function encode + * @memberof cosmos.slashing.v1beta1.Params + * @static + * @param {cosmos.slashing.v1beta1.IParams} message Params message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Params.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.signedBlocksWindow != null && Object.hasOwnProperty.call(message, "signedBlocksWindow")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.signedBlocksWindow); + if (message.minSignedPerWindow != null && Object.hasOwnProperty.call(message, "minSignedPerWindow")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.minSignedPerWindow); + if (message.downtimeJailDuration != null && Object.hasOwnProperty.call(message, "downtimeJailDuration")) + $root.google.protobuf.Duration.encode(message.downtimeJailDuration, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.slashFractionDoubleSign != null && Object.hasOwnProperty.call(message, "slashFractionDoubleSign")) + writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.slashFractionDoubleSign); + if (message.slashFractionDowntime != null && Object.hasOwnProperty.call(message, "slashFractionDowntime")) + writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.slashFractionDowntime); + return writer; + }; + + /** + * Encodes the specified Params message, length delimited. Does not implicitly {@link cosmos.slashing.v1beta1.Params.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.slashing.v1beta1.Params + * @static + * @param {cosmos.slashing.v1beta1.IParams} message Params message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Params.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Params message from the specified reader or buffer. + * @function decode + * @memberof cosmos.slashing.v1beta1.Params + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.slashing.v1beta1.Params} Params + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Params.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.slashing.v1beta1.Params(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.signedBlocksWindow = reader.int64(); + break; + case 2: + message.minSignedPerWindow = reader.bytes(); + break; + case 3: + message.downtimeJailDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + case 4: + message.slashFractionDoubleSign = reader.bytes(); + break; + case 5: + message.slashFractionDowntime = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Params message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.slashing.v1beta1.Params + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.slashing.v1beta1.Params} Params + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Params.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Params message. + * @function verify + * @memberof cosmos.slashing.v1beta1.Params + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Params.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.signedBlocksWindow != null && message.hasOwnProperty("signedBlocksWindow")) + if (!$util.isInteger(message.signedBlocksWindow) && !(message.signedBlocksWindow && $util.isInteger(message.signedBlocksWindow.low) && $util.isInteger(message.signedBlocksWindow.high))) + return "signedBlocksWindow: integer|Long expected"; + if (message.minSignedPerWindow != null && message.hasOwnProperty("minSignedPerWindow")) + if (!(message.minSignedPerWindow && typeof message.minSignedPerWindow.length === "number" || $util.isString(message.minSignedPerWindow))) + return "minSignedPerWindow: buffer expected"; + if (message.downtimeJailDuration != null && message.hasOwnProperty("downtimeJailDuration")) { + let error = $root.google.protobuf.Duration.verify(message.downtimeJailDuration); + if (error) + return "downtimeJailDuration." + error; + } + if (message.slashFractionDoubleSign != null && message.hasOwnProperty("slashFractionDoubleSign")) + if (!(message.slashFractionDoubleSign && typeof message.slashFractionDoubleSign.length === "number" || $util.isString(message.slashFractionDoubleSign))) + return "slashFractionDoubleSign: buffer expected"; + if (message.slashFractionDowntime != null && message.hasOwnProperty("slashFractionDowntime")) + if (!(message.slashFractionDowntime && typeof message.slashFractionDowntime.length === "number" || $util.isString(message.slashFractionDowntime))) + return "slashFractionDowntime: buffer expected"; + return null; + }; + + /** + * Creates a Params message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.slashing.v1beta1.Params + * @static + * @param {Object.} object Plain object + * @returns {cosmos.slashing.v1beta1.Params} Params + */ + Params.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.slashing.v1beta1.Params) + return object; + let message = new $root.cosmos.slashing.v1beta1.Params(); + if (object.signedBlocksWindow != null) + if ($util.Long) + (message.signedBlocksWindow = $util.Long.fromValue(object.signedBlocksWindow)).unsigned = false; + else if (typeof object.signedBlocksWindow === "string") + message.signedBlocksWindow = parseInt(object.signedBlocksWindow, 10); + else if (typeof object.signedBlocksWindow === "number") + message.signedBlocksWindow = object.signedBlocksWindow; + else if (typeof object.signedBlocksWindow === "object") + message.signedBlocksWindow = new $util.LongBits(object.signedBlocksWindow.low >>> 0, object.signedBlocksWindow.high >>> 0).toNumber(); + if (object.minSignedPerWindow != null) + if (typeof object.minSignedPerWindow === "string") + $util.base64.decode(object.minSignedPerWindow, message.minSignedPerWindow = $util.newBuffer($util.base64.length(object.minSignedPerWindow)), 0); + else if (object.minSignedPerWindow.length) + message.minSignedPerWindow = object.minSignedPerWindow; + if (object.downtimeJailDuration != null) { + if (typeof object.downtimeJailDuration !== "object") + throw TypeError(".cosmos.slashing.v1beta1.Params.downtimeJailDuration: object expected"); + message.downtimeJailDuration = $root.google.protobuf.Duration.fromObject(object.downtimeJailDuration); + } + if (object.slashFractionDoubleSign != null) + if (typeof object.slashFractionDoubleSign === "string") + $util.base64.decode(object.slashFractionDoubleSign, message.slashFractionDoubleSign = $util.newBuffer($util.base64.length(object.slashFractionDoubleSign)), 0); + else if (object.slashFractionDoubleSign.length) + message.slashFractionDoubleSign = object.slashFractionDoubleSign; + if (object.slashFractionDowntime != null) + if (typeof object.slashFractionDowntime === "string") + $util.base64.decode(object.slashFractionDowntime, message.slashFractionDowntime = $util.newBuffer($util.base64.length(object.slashFractionDowntime)), 0); + else if (object.slashFractionDowntime.length) + message.slashFractionDowntime = object.slashFractionDowntime; + return message; + }; + + /** + * Creates a plain object from a Params message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.slashing.v1beta1.Params + * @static + * @param {cosmos.slashing.v1beta1.Params} message Params + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Params.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.signedBlocksWindow = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.signedBlocksWindow = options.longs === String ? "0" : 0; + if (options.bytes === String) + object.minSignedPerWindow = ""; + else { + object.minSignedPerWindow = []; + if (options.bytes !== Array) + object.minSignedPerWindow = $util.newBuffer(object.minSignedPerWindow); + } + object.downtimeJailDuration = null; + if (options.bytes === String) + object.slashFractionDoubleSign = ""; + else { + object.slashFractionDoubleSign = []; + if (options.bytes !== Array) + object.slashFractionDoubleSign = $util.newBuffer(object.slashFractionDoubleSign); + } + if (options.bytes === String) + object.slashFractionDowntime = ""; + else { + object.slashFractionDowntime = []; + if (options.bytes !== Array) + object.slashFractionDowntime = $util.newBuffer(object.slashFractionDowntime); + } + } + if (message.signedBlocksWindow != null && message.hasOwnProperty("signedBlocksWindow")) + if (typeof message.signedBlocksWindow === "number") + object.signedBlocksWindow = options.longs === String ? String(message.signedBlocksWindow) : message.signedBlocksWindow; + else + object.signedBlocksWindow = options.longs === String ? $util.Long.prototype.toString.call(message.signedBlocksWindow) : options.longs === Number ? new $util.LongBits(message.signedBlocksWindow.low >>> 0, message.signedBlocksWindow.high >>> 0).toNumber() : message.signedBlocksWindow; + if (message.minSignedPerWindow != null && message.hasOwnProperty("minSignedPerWindow")) + object.minSignedPerWindow = options.bytes === String ? $util.base64.encode(message.minSignedPerWindow, 0, message.minSignedPerWindow.length) : options.bytes === Array ? Array.prototype.slice.call(message.minSignedPerWindow) : message.minSignedPerWindow; + if (message.downtimeJailDuration != null && message.hasOwnProperty("downtimeJailDuration")) + object.downtimeJailDuration = $root.google.protobuf.Duration.toObject(message.downtimeJailDuration, options); + if (message.slashFractionDoubleSign != null && message.hasOwnProperty("slashFractionDoubleSign")) + object.slashFractionDoubleSign = options.bytes === String ? $util.base64.encode(message.slashFractionDoubleSign, 0, message.slashFractionDoubleSign.length) : options.bytes === Array ? Array.prototype.slice.call(message.slashFractionDoubleSign) : message.slashFractionDoubleSign; + if (message.slashFractionDowntime != null && message.hasOwnProperty("slashFractionDowntime")) + object.slashFractionDowntime = options.bytes === String ? $util.base64.encode(message.slashFractionDowntime, 0, message.slashFractionDowntime.length) : options.bytes === Array ? Array.prototype.slice.call(message.slashFractionDowntime) : message.slashFractionDowntime; + return object; + }; + + /** + * Converts this Params to JSON. + * @function toJSON + * @memberof cosmos.slashing.v1beta1.Params + * @instance + * @returns {Object.} JSON object + */ + Params.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Params; + })(v1beta1.Params || {}); + + v1beta1.Msg = (function(Msg) { + + /** + * Constructs a new Msg service. + * @memberof cosmos.slashing.v1beta1 + * @classdesc Represents a Msg + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Msg(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Msg.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Msg; + + /** + * Creates new Msg service using the specified rpc implementation. + * @function create + * @memberof cosmos.slashing.v1beta1.Msg + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Msg} RPC service. Useful where requests and/or responses are streamed. + */ + Msg.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link cosmos.slashing.v1beta1.Msg#unjail}. + * @memberof cosmos.slashing.v1beta1.Msg + * @typedef UnjailCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.slashing.v1beta1.IMsgUnjailResponse} [response] MsgUnjailResponse + */ + + /** + * Calls Unjail. + * @function unjail + * @memberof cosmos.slashing.v1beta1.Msg + * @instance + * @param {cosmos.slashing.v1beta1.IMsgUnjail} request MsgUnjail message or plain object + * @param {cosmos.slashing.v1beta1.Msg.UnjailCallback} callback Node-style callback called with the error, if any, and MsgUnjailResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Msg.prototype.unjail = function unjail(request, callback) { + return this.rpcCall(unjail, $root.cosmos.slashing.v1beta1.MsgUnjail, $root.cosmos.slashing.v1beta1.MsgUnjailResponse, request, callback); + }, "name", { value: "Unjail" }); + + /** + * Calls Unjail. + * @function unjail + * @memberof cosmos.slashing.v1beta1.Msg + * @instance + * @param {cosmos.slashing.v1beta1.IMsgUnjail} request MsgUnjail message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Msg; + })(v1beta1.Msg || {}); + + v1beta1.MsgUnjail = (function(MsgUnjail) { + + /** + * Properties of a MsgUnjail. + * @memberof cosmos.slashing.v1beta1 + * @interface IMsgUnjail + * @property {string|null} [validatorAddr] MsgUnjail validatorAddr + */ + + /** + * Constructs a new MsgUnjail. + * @memberof cosmos.slashing.v1beta1 + * @classdesc Represents a MsgUnjail. + * @implements IMsgUnjail + * @constructor + * @param {cosmos.slashing.v1beta1.IMsgUnjail=} [properties] Properties to set + */ + function MsgUnjail(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgUnjail validatorAddr. + * @member {string} validatorAddr + * @memberof cosmos.slashing.v1beta1.MsgUnjail + * @instance + */ + MsgUnjail.prototype.validatorAddr = ""; + + /** + * Creates a new MsgUnjail instance using the specified properties. + * @function create + * @memberof cosmos.slashing.v1beta1.MsgUnjail + * @static + * @param {cosmos.slashing.v1beta1.IMsgUnjail=} [properties] Properties to set + * @returns {cosmos.slashing.v1beta1.MsgUnjail} MsgUnjail instance + */ + MsgUnjail.create = function create(properties) { + return new MsgUnjail(properties); + }; + + /** + * Encodes the specified MsgUnjail message. Does not implicitly {@link cosmos.slashing.v1beta1.MsgUnjail.verify|verify} messages. + * @function encode + * @memberof cosmos.slashing.v1beta1.MsgUnjail + * @static + * @param {cosmos.slashing.v1beta1.IMsgUnjail} message MsgUnjail message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgUnjail.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.validatorAddr != null && Object.hasOwnProperty.call(message, "validatorAddr")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.validatorAddr); + return writer; + }; + + /** + * Encodes the specified MsgUnjail message, length delimited. Does not implicitly {@link cosmos.slashing.v1beta1.MsgUnjail.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.slashing.v1beta1.MsgUnjail + * @static + * @param {cosmos.slashing.v1beta1.IMsgUnjail} message MsgUnjail message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgUnjail.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgUnjail message from the specified reader or buffer. + * @function decode + * @memberof cosmos.slashing.v1beta1.MsgUnjail + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.slashing.v1beta1.MsgUnjail} MsgUnjail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgUnjail.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.slashing.v1beta1.MsgUnjail(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.validatorAddr = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgUnjail message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.slashing.v1beta1.MsgUnjail + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.slashing.v1beta1.MsgUnjail} MsgUnjail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgUnjail.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgUnjail message. + * @function verify + * @memberof cosmos.slashing.v1beta1.MsgUnjail + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgUnjail.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.validatorAddr != null && message.hasOwnProperty("validatorAddr")) + if (!$util.isString(message.validatorAddr)) + return "validatorAddr: string expected"; + return null; + }; + + /** + * Creates a MsgUnjail message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.slashing.v1beta1.MsgUnjail + * @static + * @param {Object.} object Plain object + * @returns {cosmos.slashing.v1beta1.MsgUnjail} MsgUnjail + */ + MsgUnjail.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.slashing.v1beta1.MsgUnjail) + return object; + let message = new $root.cosmos.slashing.v1beta1.MsgUnjail(); + if (object.validatorAddr != null) + message.validatorAddr = String(object.validatorAddr); + return message; + }; + + /** + * Creates a plain object from a MsgUnjail message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.slashing.v1beta1.MsgUnjail + * @static + * @param {cosmos.slashing.v1beta1.MsgUnjail} message MsgUnjail + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgUnjail.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.validatorAddr = ""; + if (message.validatorAddr != null && message.hasOwnProperty("validatorAddr")) + object.validatorAddr = message.validatorAddr; + return object; + }; + + /** + * Converts this MsgUnjail to JSON. + * @function toJSON + * @memberof cosmos.slashing.v1beta1.MsgUnjail + * @instance + * @returns {Object.} JSON object + */ + MsgUnjail.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgUnjail; + })(v1beta1.MsgUnjail || {}); + + v1beta1.MsgUnjailResponse = (function(MsgUnjailResponse) { + + /** + * Properties of a MsgUnjailResponse. + * @memberof cosmos.slashing.v1beta1 + * @interface IMsgUnjailResponse + */ + + /** + * Constructs a new MsgUnjailResponse. + * @memberof cosmos.slashing.v1beta1 + * @classdesc Represents a MsgUnjailResponse. + * @implements IMsgUnjailResponse + * @constructor + * @param {cosmos.slashing.v1beta1.IMsgUnjailResponse=} [properties] Properties to set + */ + function MsgUnjailResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new MsgUnjailResponse instance using the specified properties. + * @function create + * @memberof cosmos.slashing.v1beta1.MsgUnjailResponse + * @static + * @param {cosmos.slashing.v1beta1.IMsgUnjailResponse=} [properties] Properties to set + * @returns {cosmos.slashing.v1beta1.MsgUnjailResponse} MsgUnjailResponse instance + */ + MsgUnjailResponse.create = function create(properties) { + return new MsgUnjailResponse(properties); + }; + + /** + * Encodes the specified MsgUnjailResponse message. Does not implicitly {@link cosmos.slashing.v1beta1.MsgUnjailResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.slashing.v1beta1.MsgUnjailResponse + * @static + * @param {cosmos.slashing.v1beta1.IMsgUnjailResponse} message MsgUnjailResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgUnjailResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MsgUnjailResponse message, length delimited. Does not implicitly {@link cosmos.slashing.v1beta1.MsgUnjailResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.slashing.v1beta1.MsgUnjailResponse + * @static + * @param {cosmos.slashing.v1beta1.IMsgUnjailResponse} message MsgUnjailResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgUnjailResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgUnjailResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.slashing.v1beta1.MsgUnjailResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.slashing.v1beta1.MsgUnjailResponse} MsgUnjailResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgUnjailResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.slashing.v1beta1.MsgUnjailResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgUnjailResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.slashing.v1beta1.MsgUnjailResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.slashing.v1beta1.MsgUnjailResponse} MsgUnjailResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgUnjailResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgUnjailResponse message. + * @function verify + * @memberof cosmos.slashing.v1beta1.MsgUnjailResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgUnjailResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MsgUnjailResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.slashing.v1beta1.MsgUnjailResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.slashing.v1beta1.MsgUnjailResponse} MsgUnjailResponse + */ + MsgUnjailResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.slashing.v1beta1.MsgUnjailResponse) + return object; + return new $root.cosmos.slashing.v1beta1.MsgUnjailResponse(); + }; + + /** + * Creates a plain object from a MsgUnjailResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.slashing.v1beta1.MsgUnjailResponse + * @static + * @param {cosmos.slashing.v1beta1.MsgUnjailResponse} message MsgUnjailResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgUnjailResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MsgUnjailResponse to JSON. + * @function toJSON + * @memberof cosmos.slashing.v1beta1.MsgUnjailResponse + * @instance + * @returns {Object.} JSON object + */ + MsgUnjailResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgUnjailResponse; + })(v1beta1.MsgUnjailResponse || {}); + + return v1beta1; + })(slashing.v1beta1 || {}); + + return slashing; + })(cosmos.slashing || {}); + + /** + * Namespace staking. + * @memberof cosmos + * @namespace + */ + + cosmos.staking = (function(staking) { + + /** + * Namespace v1beta1. + * @memberof cosmos.staking + * @namespace + */ + + staking.v1beta1 = (function(v1beta1) { + + v1beta1.GenesisState = (function(GenesisState) { + + /** + * Properties of a GenesisState. + * @memberof cosmos.staking.v1beta1 + * @interface IGenesisState + * @property {cosmos.staking.v1beta1.IParams|null} [params] GenesisState params + * @property {Uint8Array|null} [lastTotalPower] GenesisState lastTotalPower + * @property {Array.|null} [lastValidatorPowers] GenesisState lastValidatorPowers + * @property {Array.|null} [validators] GenesisState validators + * @property {Array.|null} [delegations] GenesisState delegations + * @property {Array.|null} [unbondingDelegations] GenesisState unbondingDelegations + * @property {Array.|null} [redelegations] GenesisState redelegations + * @property {boolean|null} [exported] GenesisState exported + */ + + /** + * Constructs a new GenesisState. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a GenesisState. + * @implements IGenesisState + * @constructor + * @param {cosmos.staking.v1beta1.IGenesisState=} [properties] Properties to set + */ + function GenesisState(properties) { + this.lastValidatorPowers = []; + this.validators = []; + this.delegations = []; + this.unbondingDelegations = []; + this.redelegations = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GenesisState params. + * @member {cosmos.staking.v1beta1.IParams|null|undefined} params + * @memberof cosmos.staking.v1beta1.GenesisState + * @instance + */ + GenesisState.prototype.params = null; + + /** + * GenesisState lastTotalPower. + * @member {Uint8Array} lastTotalPower + * @memberof cosmos.staking.v1beta1.GenesisState + * @instance + */ + GenesisState.prototype.lastTotalPower = $util.newBuffer([]); + + /** + * GenesisState lastValidatorPowers. + * @member {Array.} lastValidatorPowers + * @memberof cosmos.staking.v1beta1.GenesisState + * @instance + */ + GenesisState.prototype.lastValidatorPowers = $util.emptyArray; + + /** + * GenesisState validators. + * @member {Array.} validators + * @memberof cosmos.staking.v1beta1.GenesisState + * @instance + */ + GenesisState.prototype.validators = $util.emptyArray; + + /** + * GenesisState delegations. + * @member {Array.} delegations + * @memberof cosmos.staking.v1beta1.GenesisState + * @instance + */ + GenesisState.prototype.delegations = $util.emptyArray; + + /** + * GenesisState unbondingDelegations. + * @member {Array.} unbondingDelegations + * @memberof cosmos.staking.v1beta1.GenesisState + * @instance + */ + GenesisState.prototype.unbondingDelegations = $util.emptyArray; + + /** + * GenesisState redelegations. + * @member {Array.} redelegations + * @memberof cosmos.staking.v1beta1.GenesisState + * @instance + */ + GenesisState.prototype.redelegations = $util.emptyArray; + + /** + * GenesisState exported. + * @member {boolean} exported + * @memberof cosmos.staking.v1beta1.GenesisState + * @instance + */ + GenesisState.prototype.exported = false; + + /** + * Creates a new GenesisState instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.GenesisState + * @static + * @param {cosmos.staking.v1beta1.IGenesisState=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.GenesisState} GenesisState instance + */ + GenesisState.create = function create(properties) { + return new GenesisState(properties); + }; + + /** + * Encodes the specified GenesisState message. Does not implicitly {@link cosmos.staking.v1beta1.GenesisState.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.GenesisState + * @static + * @param {cosmos.staking.v1beta1.IGenesisState} message GenesisState message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenesisState.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.params != null && Object.hasOwnProperty.call(message, "params")) + $root.cosmos.staking.v1beta1.Params.encode(message.params, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.lastTotalPower != null && Object.hasOwnProperty.call(message, "lastTotalPower")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.lastTotalPower); + if (message.lastValidatorPowers != null && message.lastValidatorPowers.length) + for (let i = 0; i < message.lastValidatorPowers.length; ++i) + $root.cosmos.staking.v1beta1.LastValidatorPower.encode(message.lastValidatorPowers[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.validators != null && message.validators.length) + for (let i = 0; i < message.validators.length; ++i) + $root.cosmos.staking.v1beta1.Validator.encode(message.validators[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.delegations != null && message.delegations.length) + for (let i = 0; i < message.delegations.length; ++i) + $root.cosmos.staking.v1beta1.Delegation.encode(message.delegations[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.unbondingDelegations != null && message.unbondingDelegations.length) + for (let i = 0; i < message.unbondingDelegations.length; ++i) + $root.cosmos.staking.v1beta1.UnbondingDelegation.encode(message.unbondingDelegations[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.redelegations != null && message.redelegations.length) + for (let i = 0; i < message.redelegations.length; ++i) + $root.cosmos.staking.v1beta1.Redelegation.encode(message.redelegations[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.exported != null && Object.hasOwnProperty.call(message, "exported")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.exported); + return writer; + }; + + /** + * Encodes the specified GenesisState message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.GenesisState.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.GenesisState + * @static + * @param {cosmos.staking.v1beta1.IGenesisState} message GenesisState message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenesisState.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GenesisState message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.GenesisState + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.GenesisState} GenesisState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenesisState.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.GenesisState(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.params = $root.cosmos.staking.v1beta1.Params.decode(reader, reader.uint32()); + break; + case 2: + message.lastTotalPower = reader.bytes(); + break; + case 3: + if (!(message.lastValidatorPowers && message.lastValidatorPowers.length)) + message.lastValidatorPowers = []; + message.lastValidatorPowers.push($root.cosmos.staking.v1beta1.LastValidatorPower.decode(reader, reader.uint32())); + break; + case 4: + if (!(message.validators && message.validators.length)) + message.validators = []; + message.validators.push($root.cosmos.staking.v1beta1.Validator.decode(reader, reader.uint32())); + break; + case 5: + if (!(message.delegations && message.delegations.length)) + message.delegations = []; + message.delegations.push($root.cosmos.staking.v1beta1.Delegation.decode(reader, reader.uint32())); + break; + case 6: + if (!(message.unbondingDelegations && message.unbondingDelegations.length)) + message.unbondingDelegations = []; + message.unbondingDelegations.push($root.cosmos.staking.v1beta1.UnbondingDelegation.decode(reader, reader.uint32())); + break; + case 7: + if (!(message.redelegations && message.redelegations.length)) + message.redelegations = []; + message.redelegations.push($root.cosmos.staking.v1beta1.Redelegation.decode(reader, reader.uint32())); + break; + case 8: + message.exported = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GenesisState message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.GenesisState + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.GenesisState} GenesisState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenesisState.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GenesisState message. + * @function verify + * @memberof cosmos.staking.v1beta1.GenesisState + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GenesisState.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.params != null && message.hasOwnProperty("params")) { + let error = $root.cosmos.staking.v1beta1.Params.verify(message.params); + if (error) + return "params." + error; + } + if (message.lastTotalPower != null && message.hasOwnProperty("lastTotalPower")) + if (!(message.lastTotalPower && typeof message.lastTotalPower.length === "number" || $util.isString(message.lastTotalPower))) + return "lastTotalPower: buffer expected"; + if (message.lastValidatorPowers != null && message.hasOwnProperty("lastValidatorPowers")) { + if (!Array.isArray(message.lastValidatorPowers)) + return "lastValidatorPowers: array expected"; + for (let i = 0; i < message.lastValidatorPowers.length; ++i) { + let error = $root.cosmos.staking.v1beta1.LastValidatorPower.verify(message.lastValidatorPowers[i]); + if (error) + return "lastValidatorPowers." + error; + } + } + if (message.validators != null && message.hasOwnProperty("validators")) { + if (!Array.isArray(message.validators)) + return "validators: array expected"; + for (let i = 0; i < message.validators.length; ++i) { + let error = $root.cosmos.staking.v1beta1.Validator.verify(message.validators[i]); + if (error) + return "validators." + error; + } + } + if (message.delegations != null && message.hasOwnProperty("delegations")) { + if (!Array.isArray(message.delegations)) + return "delegations: array expected"; + for (let i = 0; i < message.delegations.length; ++i) { + let error = $root.cosmos.staking.v1beta1.Delegation.verify(message.delegations[i]); + if (error) + return "delegations." + error; + } + } + if (message.unbondingDelegations != null && message.hasOwnProperty("unbondingDelegations")) { + if (!Array.isArray(message.unbondingDelegations)) + return "unbondingDelegations: array expected"; + for (let i = 0; i < message.unbondingDelegations.length; ++i) { + let error = $root.cosmos.staking.v1beta1.UnbondingDelegation.verify(message.unbondingDelegations[i]); + if (error) + return "unbondingDelegations." + error; + } + } + if (message.redelegations != null && message.hasOwnProperty("redelegations")) { + if (!Array.isArray(message.redelegations)) + return "redelegations: array expected"; + for (let i = 0; i < message.redelegations.length; ++i) { + let error = $root.cosmos.staking.v1beta1.Redelegation.verify(message.redelegations[i]); + if (error) + return "redelegations." + error; + } + } + if (message.exported != null && message.hasOwnProperty("exported")) + if (typeof message.exported !== "boolean") + return "exported: boolean expected"; + return null; + }; + + /** + * Creates a GenesisState message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.GenesisState + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.GenesisState} GenesisState + */ + GenesisState.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.GenesisState) + return object; + let message = new $root.cosmos.staking.v1beta1.GenesisState(); + if (object.params != null) { + if (typeof object.params !== "object") + throw TypeError(".cosmos.staking.v1beta1.GenesisState.params: object expected"); + message.params = $root.cosmos.staking.v1beta1.Params.fromObject(object.params); + } + if (object.lastTotalPower != null) + if (typeof object.lastTotalPower === "string") + $util.base64.decode(object.lastTotalPower, message.lastTotalPower = $util.newBuffer($util.base64.length(object.lastTotalPower)), 0); + else if (object.lastTotalPower.length) + message.lastTotalPower = object.lastTotalPower; + if (object.lastValidatorPowers) { + if (!Array.isArray(object.lastValidatorPowers)) + throw TypeError(".cosmos.staking.v1beta1.GenesisState.lastValidatorPowers: array expected"); + message.lastValidatorPowers = []; + for (let i = 0; i < object.lastValidatorPowers.length; ++i) { + if (typeof object.lastValidatorPowers[i] !== "object") + throw TypeError(".cosmos.staking.v1beta1.GenesisState.lastValidatorPowers: object expected"); + message.lastValidatorPowers[i] = $root.cosmos.staking.v1beta1.LastValidatorPower.fromObject(object.lastValidatorPowers[i]); + } + } + if (object.validators) { + if (!Array.isArray(object.validators)) + throw TypeError(".cosmos.staking.v1beta1.GenesisState.validators: array expected"); + message.validators = []; + for (let i = 0; i < object.validators.length; ++i) { + if (typeof object.validators[i] !== "object") + throw TypeError(".cosmos.staking.v1beta1.GenesisState.validators: object expected"); + message.validators[i] = $root.cosmos.staking.v1beta1.Validator.fromObject(object.validators[i]); + } + } + if (object.delegations) { + if (!Array.isArray(object.delegations)) + throw TypeError(".cosmos.staking.v1beta1.GenesisState.delegations: array expected"); + message.delegations = []; + for (let i = 0; i < object.delegations.length; ++i) { + if (typeof object.delegations[i] !== "object") + throw TypeError(".cosmos.staking.v1beta1.GenesisState.delegations: object expected"); + message.delegations[i] = $root.cosmos.staking.v1beta1.Delegation.fromObject(object.delegations[i]); + } + } + if (object.unbondingDelegations) { + if (!Array.isArray(object.unbondingDelegations)) + throw TypeError(".cosmos.staking.v1beta1.GenesisState.unbondingDelegations: array expected"); + message.unbondingDelegations = []; + for (let i = 0; i < object.unbondingDelegations.length; ++i) { + if (typeof object.unbondingDelegations[i] !== "object") + throw TypeError(".cosmos.staking.v1beta1.GenesisState.unbondingDelegations: object expected"); + message.unbondingDelegations[i] = $root.cosmos.staking.v1beta1.UnbondingDelegation.fromObject(object.unbondingDelegations[i]); + } + } + if (object.redelegations) { + if (!Array.isArray(object.redelegations)) + throw TypeError(".cosmos.staking.v1beta1.GenesisState.redelegations: array expected"); + message.redelegations = []; + for (let i = 0; i < object.redelegations.length; ++i) { + if (typeof object.redelegations[i] !== "object") + throw TypeError(".cosmos.staking.v1beta1.GenesisState.redelegations: object expected"); + message.redelegations[i] = $root.cosmos.staking.v1beta1.Redelegation.fromObject(object.redelegations[i]); + } + } + if (object.exported != null) + message.exported = Boolean(object.exported); + return message; + }; + + /** + * Creates a plain object from a GenesisState message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.GenesisState + * @static + * @param {cosmos.staking.v1beta1.GenesisState} message GenesisState + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GenesisState.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) { + object.lastValidatorPowers = []; + object.validators = []; + object.delegations = []; + object.unbondingDelegations = []; + object.redelegations = []; + } + if (options.defaults) { + object.params = null; + if (options.bytes === String) + object.lastTotalPower = ""; + else { + object.lastTotalPower = []; + if (options.bytes !== Array) + object.lastTotalPower = $util.newBuffer(object.lastTotalPower); + } + object.exported = false; + } + if (message.params != null && message.hasOwnProperty("params")) + object.params = $root.cosmos.staking.v1beta1.Params.toObject(message.params, options); + if (message.lastTotalPower != null && message.hasOwnProperty("lastTotalPower")) + object.lastTotalPower = options.bytes === String ? $util.base64.encode(message.lastTotalPower, 0, message.lastTotalPower.length) : options.bytes === Array ? Array.prototype.slice.call(message.lastTotalPower) : message.lastTotalPower; + if (message.lastValidatorPowers && message.lastValidatorPowers.length) { + object.lastValidatorPowers = []; + for (let j = 0; j < message.lastValidatorPowers.length; ++j) + object.lastValidatorPowers[j] = $root.cosmos.staking.v1beta1.LastValidatorPower.toObject(message.lastValidatorPowers[j], options); + } + if (message.validators && message.validators.length) { + object.validators = []; + for (let j = 0; j < message.validators.length; ++j) + object.validators[j] = $root.cosmos.staking.v1beta1.Validator.toObject(message.validators[j], options); + } + if (message.delegations && message.delegations.length) { + object.delegations = []; + for (let j = 0; j < message.delegations.length; ++j) + object.delegations[j] = $root.cosmos.staking.v1beta1.Delegation.toObject(message.delegations[j], options); + } + if (message.unbondingDelegations && message.unbondingDelegations.length) { + object.unbondingDelegations = []; + for (let j = 0; j < message.unbondingDelegations.length; ++j) + object.unbondingDelegations[j] = $root.cosmos.staking.v1beta1.UnbondingDelegation.toObject(message.unbondingDelegations[j], options); + } + if (message.redelegations && message.redelegations.length) { + object.redelegations = []; + for (let j = 0; j < message.redelegations.length; ++j) + object.redelegations[j] = $root.cosmos.staking.v1beta1.Redelegation.toObject(message.redelegations[j], options); + } + if (message.exported != null && message.hasOwnProperty("exported")) + object.exported = message.exported; + return object; + }; + + /** + * Converts this GenesisState to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.GenesisState + * @instance + * @returns {Object.} JSON object + */ + GenesisState.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GenesisState; + })(v1beta1.GenesisState || {}); + + v1beta1.LastValidatorPower = (function(LastValidatorPower) { + + /** + * Properties of a LastValidatorPower. + * @memberof cosmos.staking.v1beta1 + * @interface ILastValidatorPower + * @property {string|null} [address] LastValidatorPower address + * @property {number|Long|null} [power] LastValidatorPower power + */ + + /** + * Constructs a new LastValidatorPower. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a LastValidatorPower. + * @implements ILastValidatorPower + * @constructor + * @param {cosmos.staking.v1beta1.ILastValidatorPower=} [properties] Properties to set + */ + function LastValidatorPower(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LastValidatorPower address. + * @member {string} address + * @memberof cosmos.staking.v1beta1.LastValidatorPower + * @instance + */ + LastValidatorPower.prototype.address = ""; + + /** + * LastValidatorPower power. + * @member {number|Long} power + * @memberof cosmos.staking.v1beta1.LastValidatorPower + * @instance + */ + LastValidatorPower.prototype.power = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new LastValidatorPower instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.LastValidatorPower + * @static + * @param {cosmos.staking.v1beta1.ILastValidatorPower=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.LastValidatorPower} LastValidatorPower instance + */ + LastValidatorPower.create = function create(properties) { + return new LastValidatorPower(properties); + }; + + /** + * Encodes the specified LastValidatorPower message. Does not implicitly {@link cosmos.staking.v1beta1.LastValidatorPower.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.LastValidatorPower + * @static + * @param {cosmos.staking.v1beta1.ILastValidatorPower} message LastValidatorPower message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LastValidatorPower.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.address != null && Object.hasOwnProperty.call(message, "address")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.address); + if (message.power != null && Object.hasOwnProperty.call(message, "power")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.power); + return writer; + }; + + /** + * Encodes the specified LastValidatorPower message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.LastValidatorPower.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.LastValidatorPower + * @static + * @param {cosmos.staking.v1beta1.ILastValidatorPower} message LastValidatorPower message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LastValidatorPower.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LastValidatorPower message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.LastValidatorPower + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.LastValidatorPower} LastValidatorPower + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LastValidatorPower.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.LastValidatorPower(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.address = reader.string(); + break; + case 2: + message.power = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LastValidatorPower message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.LastValidatorPower + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.LastValidatorPower} LastValidatorPower + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LastValidatorPower.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LastValidatorPower message. + * @function verify + * @memberof cosmos.staking.v1beta1.LastValidatorPower + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LastValidatorPower.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.address != null && message.hasOwnProperty("address")) + if (!$util.isString(message.address)) + return "address: string expected"; + if (message.power != null && message.hasOwnProperty("power")) + if (!$util.isInteger(message.power) && !(message.power && $util.isInteger(message.power.low) && $util.isInteger(message.power.high))) + return "power: integer|Long expected"; + return null; + }; + + /** + * Creates a LastValidatorPower message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.LastValidatorPower + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.LastValidatorPower} LastValidatorPower + */ + LastValidatorPower.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.LastValidatorPower) + return object; + let message = new $root.cosmos.staking.v1beta1.LastValidatorPower(); + if (object.address != null) + message.address = String(object.address); + if (object.power != null) + if ($util.Long) + (message.power = $util.Long.fromValue(object.power)).unsigned = false; + else if (typeof object.power === "string") + message.power = parseInt(object.power, 10); + else if (typeof object.power === "number") + message.power = object.power; + else if (typeof object.power === "object") + message.power = new $util.LongBits(object.power.low >>> 0, object.power.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a LastValidatorPower message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.LastValidatorPower + * @static + * @param {cosmos.staking.v1beta1.LastValidatorPower} message LastValidatorPower + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LastValidatorPower.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.address = ""; + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.power = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.power = options.longs === String ? "0" : 0; + } + if (message.address != null && message.hasOwnProperty("address")) + object.address = message.address; + if (message.power != null && message.hasOwnProperty("power")) + if (typeof message.power === "number") + object.power = options.longs === String ? String(message.power) : message.power; + else + object.power = options.longs === String ? $util.Long.prototype.toString.call(message.power) : options.longs === Number ? new $util.LongBits(message.power.low >>> 0, message.power.high >>> 0).toNumber() : message.power; + return object; + }; + + /** + * Converts this LastValidatorPower to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.LastValidatorPower + * @instance + * @returns {Object.} JSON object + */ + LastValidatorPower.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return LastValidatorPower; + })(v1beta1.LastValidatorPower || {}); + + v1beta1.Query = (function(Query) { + + /** + * Constructs a new Query service. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a Query + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Query(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Query.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Query; + + /** + * Creates new Query service using the specified rpc implementation. + * @function create + * @memberof cosmos.staking.v1beta1.Query + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Query} RPC service. Useful where requests and/or responses are streamed. + */ + Query.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link cosmos.staking.v1beta1.Query#validators}. + * @memberof cosmos.staking.v1beta1.Query + * @typedef ValidatorsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.staking.v1beta1.IQueryValidatorsResponse} [response] QueryValidatorsResponse + */ + + /** + * Calls Validators. + * @function validators + * @memberof cosmos.staking.v1beta1.Query + * @instance + * @param {cosmos.staking.v1beta1.IQueryValidatorsRequest} request QueryValidatorsRequest message or plain object + * @param {cosmos.staking.v1beta1.Query.ValidatorsCallback} callback Node-style callback called with the error, if any, and QueryValidatorsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.validators = function validators(request, callback) { + return this.rpcCall(validators, $root.cosmos.staking.v1beta1.QueryValidatorsRequest, $root.cosmos.staking.v1beta1.QueryValidatorsResponse, request, callback); + }, "name", { value: "Validators" }); + + /** + * Calls Validators. + * @function validators + * @memberof cosmos.staking.v1beta1.Query + * @instance + * @param {cosmos.staking.v1beta1.IQueryValidatorsRequest} request QueryValidatorsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link cosmos.staking.v1beta1.Query#validator}. + * @memberof cosmos.staking.v1beta1.Query + * @typedef ValidatorCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.staking.v1beta1.IQueryValidatorResponse} [response] QueryValidatorResponse + */ + + /** + * Calls Validator. + * @function validator + * @memberof cosmos.staking.v1beta1.Query + * @instance + * @param {cosmos.staking.v1beta1.IQueryValidatorRequest} request QueryValidatorRequest message or plain object + * @param {cosmos.staking.v1beta1.Query.ValidatorCallback} callback Node-style callback called with the error, if any, and QueryValidatorResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.validator = function validator(request, callback) { + return this.rpcCall(validator, $root.cosmos.staking.v1beta1.QueryValidatorRequest, $root.cosmos.staking.v1beta1.QueryValidatorResponse, request, callback); + }, "name", { value: "Validator" }); + + /** + * Calls Validator. + * @function validator + * @memberof cosmos.staking.v1beta1.Query + * @instance + * @param {cosmos.staking.v1beta1.IQueryValidatorRequest} request QueryValidatorRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link cosmos.staking.v1beta1.Query#validatorDelegations}. + * @memberof cosmos.staking.v1beta1.Query + * @typedef ValidatorDelegationsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.staking.v1beta1.IQueryValidatorDelegationsResponse} [response] QueryValidatorDelegationsResponse + */ + + /** + * Calls ValidatorDelegations. + * @function validatorDelegations + * @memberof cosmos.staking.v1beta1.Query + * @instance + * @param {cosmos.staking.v1beta1.IQueryValidatorDelegationsRequest} request QueryValidatorDelegationsRequest message or plain object + * @param {cosmos.staking.v1beta1.Query.ValidatorDelegationsCallback} callback Node-style callback called with the error, if any, and QueryValidatorDelegationsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.validatorDelegations = function validatorDelegations(request, callback) { + return this.rpcCall(validatorDelegations, $root.cosmos.staking.v1beta1.QueryValidatorDelegationsRequest, $root.cosmos.staking.v1beta1.QueryValidatorDelegationsResponse, request, callback); + }, "name", { value: "ValidatorDelegations" }); + + /** + * Calls ValidatorDelegations. + * @function validatorDelegations + * @memberof cosmos.staking.v1beta1.Query + * @instance + * @param {cosmos.staking.v1beta1.IQueryValidatorDelegationsRequest} request QueryValidatorDelegationsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link cosmos.staking.v1beta1.Query#validatorUnbondingDelegations}. + * @memberof cosmos.staking.v1beta1.Query + * @typedef ValidatorUnbondingDelegationsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.staking.v1beta1.IQueryValidatorUnbondingDelegationsResponse} [response] QueryValidatorUnbondingDelegationsResponse + */ + + /** + * Calls ValidatorUnbondingDelegations. + * @function validatorUnbondingDelegations + * @memberof cosmos.staking.v1beta1.Query + * @instance + * @param {cosmos.staking.v1beta1.IQueryValidatorUnbondingDelegationsRequest} request QueryValidatorUnbondingDelegationsRequest message or plain object + * @param {cosmos.staking.v1beta1.Query.ValidatorUnbondingDelegationsCallback} callback Node-style callback called with the error, if any, and QueryValidatorUnbondingDelegationsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.validatorUnbondingDelegations = function validatorUnbondingDelegations(request, callback) { + return this.rpcCall(validatorUnbondingDelegations, $root.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest, $root.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse, request, callback); + }, "name", { value: "ValidatorUnbondingDelegations" }); + + /** + * Calls ValidatorUnbondingDelegations. + * @function validatorUnbondingDelegations + * @memberof cosmos.staking.v1beta1.Query + * @instance + * @param {cosmos.staking.v1beta1.IQueryValidatorUnbondingDelegationsRequest} request QueryValidatorUnbondingDelegationsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link cosmos.staking.v1beta1.Query#delegation}. + * @memberof cosmos.staking.v1beta1.Query + * @typedef DelegationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.staking.v1beta1.IQueryDelegationResponse} [response] QueryDelegationResponse + */ + + /** + * Calls Delegation. + * @function delegation + * @memberof cosmos.staking.v1beta1.Query + * @instance + * @param {cosmos.staking.v1beta1.IQueryDelegationRequest} request QueryDelegationRequest message or plain object + * @param {cosmos.staking.v1beta1.Query.DelegationCallback} callback Node-style callback called with the error, if any, and QueryDelegationResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.delegation = function delegation(request, callback) { + return this.rpcCall(delegation, $root.cosmos.staking.v1beta1.QueryDelegationRequest, $root.cosmos.staking.v1beta1.QueryDelegationResponse, request, callback); + }, "name", { value: "Delegation" }); + + /** + * Calls Delegation. + * @function delegation + * @memberof cosmos.staking.v1beta1.Query + * @instance + * @param {cosmos.staking.v1beta1.IQueryDelegationRequest} request QueryDelegationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link cosmos.staking.v1beta1.Query#unbondingDelegation}. + * @memberof cosmos.staking.v1beta1.Query + * @typedef UnbondingDelegationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.staking.v1beta1.IQueryUnbondingDelegationResponse} [response] QueryUnbondingDelegationResponse + */ + + /** + * Calls UnbondingDelegation. + * @function unbondingDelegation + * @memberof cosmos.staking.v1beta1.Query + * @instance + * @param {cosmos.staking.v1beta1.IQueryUnbondingDelegationRequest} request QueryUnbondingDelegationRequest message or plain object + * @param {cosmos.staking.v1beta1.Query.UnbondingDelegationCallback} callback Node-style callback called with the error, if any, and QueryUnbondingDelegationResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.unbondingDelegation = function unbondingDelegation(request, callback) { + return this.rpcCall(unbondingDelegation, $root.cosmos.staking.v1beta1.QueryUnbondingDelegationRequest, $root.cosmos.staking.v1beta1.QueryUnbondingDelegationResponse, request, callback); + }, "name", { value: "UnbondingDelegation" }); + + /** + * Calls UnbondingDelegation. + * @function unbondingDelegation + * @memberof cosmos.staking.v1beta1.Query + * @instance + * @param {cosmos.staking.v1beta1.IQueryUnbondingDelegationRequest} request QueryUnbondingDelegationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link cosmos.staking.v1beta1.Query#delegatorDelegations}. + * @memberof cosmos.staking.v1beta1.Query + * @typedef DelegatorDelegationsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.staking.v1beta1.IQueryDelegatorDelegationsResponse} [response] QueryDelegatorDelegationsResponse + */ + + /** + * Calls DelegatorDelegations. + * @function delegatorDelegations + * @memberof cosmos.staking.v1beta1.Query + * @instance + * @param {cosmos.staking.v1beta1.IQueryDelegatorDelegationsRequest} request QueryDelegatorDelegationsRequest message or plain object + * @param {cosmos.staking.v1beta1.Query.DelegatorDelegationsCallback} callback Node-style callback called with the error, if any, and QueryDelegatorDelegationsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.delegatorDelegations = function delegatorDelegations(request, callback) { + return this.rpcCall(delegatorDelegations, $root.cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest, $root.cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse, request, callback); + }, "name", { value: "DelegatorDelegations" }); + + /** + * Calls DelegatorDelegations. + * @function delegatorDelegations + * @memberof cosmos.staking.v1beta1.Query + * @instance + * @param {cosmos.staking.v1beta1.IQueryDelegatorDelegationsRequest} request QueryDelegatorDelegationsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link cosmos.staking.v1beta1.Query#delegatorUnbondingDelegations}. + * @memberof cosmos.staking.v1beta1.Query + * @typedef DelegatorUnbondingDelegationsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.staking.v1beta1.IQueryDelegatorUnbondingDelegationsResponse} [response] QueryDelegatorUnbondingDelegationsResponse + */ + + /** + * Calls DelegatorUnbondingDelegations. + * @function delegatorUnbondingDelegations + * @memberof cosmos.staking.v1beta1.Query + * @instance + * @param {cosmos.staking.v1beta1.IQueryDelegatorUnbondingDelegationsRequest} request QueryDelegatorUnbondingDelegationsRequest message or plain object + * @param {cosmos.staking.v1beta1.Query.DelegatorUnbondingDelegationsCallback} callback Node-style callback called with the error, if any, and QueryDelegatorUnbondingDelegationsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.delegatorUnbondingDelegations = function delegatorUnbondingDelegations(request, callback) { + return this.rpcCall(delegatorUnbondingDelegations, $root.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest, $root.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse, request, callback); + }, "name", { value: "DelegatorUnbondingDelegations" }); + + /** + * Calls DelegatorUnbondingDelegations. + * @function delegatorUnbondingDelegations + * @memberof cosmos.staking.v1beta1.Query + * @instance + * @param {cosmos.staking.v1beta1.IQueryDelegatorUnbondingDelegationsRequest} request QueryDelegatorUnbondingDelegationsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link cosmos.staking.v1beta1.Query#redelegations}. + * @memberof cosmos.staking.v1beta1.Query + * @typedef RedelegationsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.staking.v1beta1.IQueryRedelegationsResponse} [response] QueryRedelegationsResponse + */ + + /** + * Calls Redelegations. + * @function redelegations + * @memberof cosmos.staking.v1beta1.Query + * @instance + * @param {cosmos.staking.v1beta1.IQueryRedelegationsRequest} request QueryRedelegationsRequest message or plain object + * @param {cosmos.staking.v1beta1.Query.RedelegationsCallback} callback Node-style callback called with the error, if any, and QueryRedelegationsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.redelegations = function redelegations(request, callback) { + return this.rpcCall(redelegations, $root.cosmos.staking.v1beta1.QueryRedelegationsRequest, $root.cosmos.staking.v1beta1.QueryRedelegationsResponse, request, callback); + }, "name", { value: "Redelegations" }); + + /** + * Calls Redelegations. + * @function redelegations + * @memberof cosmos.staking.v1beta1.Query + * @instance + * @param {cosmos.staking.v1beta1.IQueryRedelegationsRequest} request QueryRedelegationsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link cosmos.staking.v1beta1.Query#delegatorValidators}. + * @memberof cosmos.staking.v1beta1.Query + * @typedef DelegatorValidatorsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.staking.v1beta1.IQueryDelegatorValidatorsResponse} [response] QueryDelegatorValidatorsResponse + */ + + /** + * Calls DelegatorValidators. + * @function delegatorValidators + * @memberof cosmos.staking.v1beta1.Query + * @instance + * @param {cosmos.staking.v1beta1.IQueryDelegatorValidatorsRequest} request QueryDelegatorValidatorsRequest message or plain object + * @param {cosmos.staking.v1beta1.Query.DelegatorValidatorsCallback} callback Node-style callback called with the error, if any, and QueryDelegatorValidatorsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.delegatorValidators = function delegatorValidators(request, callback) { + return this.rpcCall(delegatorValidators, $root.cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest, $root.cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse, request, callback); + }, "name", { value: "DelegatorValidators" }); + + /** + * Calls DelegatorValidators. + * @function delegatorValidators + * @memberof cosmos.staking.v1beta1.Query + * @instance + * @param {cosmos.staking.v1beta1.IQueryDelegatorValidatorsRequest} request QueryDelegatorValidatorsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link cosmos.staking.v1beta1.Query#delegatorValidator}. + * @memberof cosmos.staking.v1beta1.Query + * @typedef DelegatorValidatorCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.staking.v1beta1.IQueryDelegatorValidatorResponse} [response] QueryDelegatorValidatorResponse + */ + + /** + * Calls DelegatorValidator. + * @function delegatorValidator + * @memberof cosmos.staking.v1beta1.Query + * @instance + * @param {cosmos.staking.v1beta1.IQueryDelegatorValidatorRequest} request QueryDelegatorValidatorRequest message or plain object + * @param {cosmos.staking.v1beta1.Query.DelegatorValidatorCallback} callback Node-style callback called with the error, if any, and QueryDelegatorValidatorResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.delegatorValidator = function delegatorValidator(request, callback) { + return this.rpcCall(delegatorValidator, $root.cosmos.staking.v1beta1.QueryDelegatorValidatorRequest, $root.cosmos.staking.v1beta1.QueryDelegatorValidatorResponse, request, callback); + }, "name", { value: "DelegatorValidator" }); + + /** + * Calls DelegatorValidator. + * @function delegatorValidator + * @memberof cosmos.staking.v1beta1.Query + * @instance + * @param {cosmos.staking.v1beta1.IQueryDelegatorValidatorRequest} request QueryDelegatorValidatorRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link cosmos.staking.v1beta1.Query#historicalInfo}. + * @memberof cosmos.staking.v1beta1.Query + * @typedef HistoricalInfoCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.staking.v1beta1.IQueryHistoricalInfoResponse} [response] QueryHistoricalInfoResponse + */ + + /** + * Calls HistoricalInfo. + * @function historicalInfo + * @memberof cosmos.staking.v1beta1.Query + * @instance + * @param {cosmos.staking.v1beta1.IQueryHistoricalInfoRequest} request QueryHistoricalInfoRequest message or plain object + * @param {cosmos.staking.v1beta1.Query.HistoricalInfoCallback} callback Node-style callback called with the error, if any, and QueryHistoricalInfoResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.historicalInfo = function historicalInfo(request, callback) { + return this.rpcCall(historicalInfo, $root.cosmos.staking.v1beta1.QueryHistoricalInfoRequest, $root.cosmos.staking.v1beta1.QueryHistoricalInfoResponse, request, callback); + }, "name", { value: "HistoricalInfo" }); + + /** + * Calls HistoricalInfo. + * @function historicalInfo + * @memberof cosmos.staking.v1beta1.Query + * @instance + * @param {cosmos.staking.v1beta1.IQueryHistoricalInfoRequest} request QueryHistoricalInfoRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link cosmos.staking.v1beta1.Query#pool}. + * @memberof cosmos.staking.v1beta1.Query + * @typedef PoolCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.staking.v1beta1.IQueryPoolResponse} [response] QueryPoolResponse + */ + + /** + * Calls Pool. + * @function pool + * @memberof cosmos.staking.v1beta1.Query + * @instance + * @param {cosmos.staking.v1beta1.IQueryPoolRequest} request QueryPoolRequest message or plain object + * @param {cosmos.staking.v1beta1.Query.PoolCallback} callback Node-style callback called with the error, if any, and QueryPoolResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.pool = function pool(request, callback) { + return this.rpcCall(pool, $root.cosmos.staking.v1beta1.QueryPoolRequest, $root.cosmos.staking.v1beta1.QueryPoolResponse, request, callback); + }, "name", { value: "Pool" }); + + /** + * Calls Pool. + * @function pool + * @memberof cosmos.staking.v1beta1.Query + * @instance + * @param {cosmos.staking.v1beta1.IQueryPoolRequest} request QueryPoolRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link cosmos.staking.v1beta1.Query#params}. + * @memberof cosmos.staking.v1beta1.Query + * @typedef ParamsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.staking.v1beta1.IQueryParamsResponse} [response] QueryParamsResponse + */ + + /** + * Calls Params. + * @function params + * @memberof cosmos.staking.v1beta1.Query + * @instance + * @param {cosmos.staking.v1beta1.IQueryParamsRequest} request QueryParamsRequest message or plain object + * @param {cosmos.staking.v1beta1.Query.ParamsCallback} callback Node-style callback called with the error, if any, and QueryParamsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.params = function params(request, callback) { + return this.rpcCall(params, $root.cosmos.staking.v1beta1.QueryParamsRequest, $root.cosmos.staking.v1beta1.QueryParamsResponse, request, callback); + }, "name", { value: "Params" }); + + /** + * Calls Params. + * @function params + * @memberof cosmos.staking.v1beta1.Query + * @instance + * @param {cosmos.staking.v1beta1.IQueryParamsRequest} request QueryParamsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Query; + })(v1beta1.Query || {}); + + v1beta1.QueryValidatorsRequest = (function(QueryValidatorsRequest) { + + /** + * Properties of a QueryValidatorsRequest. + * @memberof cosmos.staking.v1beta1 + * @interface IQueryValidatorsRequest + * @property {string|null} [status] QueryValidatorsRequest status + * @property {cosmos.base.query.v1beta1.IPageRequest|null} [pagination] QueryValidatorsRequest pagination + */ + + /** + * Constructs a new QueryValidatorsRequest. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a QueryValidatorsRequest. + * @implements IQueryValidatorsRequest + * @constructor + * @param {cosmos.staking.v1beta1.IQueryValidatorsRequest=} [properties] Properties to set + */ + function QueryValidatorsRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryValidatorsRequest status. + * @member {string} status + * @memberof cosmos.staking.v1beta1.QueryValidatorsRequest + * @instance + */ + QueryValidatorsRequest.prototype.status = ""; + + /** + * QueryValidatorsRequest pagination. + * @member {cosmos.base.query.v1beta1.IPageRequest|null|undefined} pagination + * @memberof cosmos.staking.v1beta1.QueryValidatorsRequest + * @instance + */ + QueryValidatorsRequest.prototype.pagination = null; + + /** + * Creates a new QueryValidatorsRequest instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.QueryValidatorsRequest + * @static + * @param {cosmos.staking.v1beta1.IQueryValidatorsRequest=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.QueryValidatorsRequest} QueryValidatorsRequest instance + */ + QueryValidatorsRequest.create = function create(properties) { + return new QueryValidatorsRequest(properties); + }; + + /** + * Encodes the specified QueryValidatorsRequest message. Does not implicitly {@link cosmos.staking.v1beta1.QueryValidatorsRequest.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.QueryValidatorsRequest + * @static + * @param {cosmos.staking.v1beta1.IQueryValidatorsRequest} message QueryValidatorsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryValidatorsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.status); + if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) + $root.cosmos.base.query.v1beta1.PageRequest.encode(message.pagination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryValidatorsRequest message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.QueryValidatorsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.QueryValidatorsRequest + * @static + * @param {cosmos.staking.v1beta1.IQueryValidatorsRequest} message QueryValidatorsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryValidatorsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryValidatorsRequest message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.QueryValidatorsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.QueryValidatorsRequest} QueryValidatorsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryValidatorsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.QueryValidatorsRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.status = reader.string(); + break; + case 2: + message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryValidatorsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.QueryValidatorsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.QueryValidatorsRequest} QueryValidatorsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryValidatorsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryValidatorsRequest message. + * @function verify + * @memberof cosmos.staking.v1beta1.QueryValidatorsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryValidatorsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.status != null && message.hasOwnProperty("status")) + if (!$util.isString(message.status)) + return "status: string expected"; + if (message.pagination != null && message.hasOwnProperty("pagination")) { + let error = $root.cosmos.base.query.v1beta1.PageRequest.verify(message.pagination); + if (error) + return "pagination." + error; + } + return null; + }; + + /** + * Creates a QueryValidatorsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.QueryValidatorsRequest + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.QueryValidatorsRequest} QueryValidatorsRequest + */ + QueryValidatorsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.QueryValidatorsRequest) + return object; + let message = new $root.cosmos.staking.v1beta1.QueryValidatorsRequest(); + if (object.status != null) + message.status = String(object.status); + if (object.pagination != null) { + if (typeof object.pagination !== "object") + throw TypeError(".cosmos.staking.v1beta1.QueryValidatorsRequest.pagination: object expected"); + message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.fromObject(object.pagination); + } + return message; + }; + + /** + * Creates a plain object from a QueryValidatorsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.QueryValidatorsRequest + * @static + * @param {cosmos.staking.v1beta1.QueryValidatorsRequest} message QueryValidatorsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryValidatorsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.status = ""; + object.pagination = null; + } + if (message.status != null && message.hasOwnProperty("status")) + object.status = message.status; + if (message.pagination != null && message.hasOwnProperty("pagination")) + object.pagination = $root.cosmos.base.query.v1beta1.PageRequest.toObject(message.pagination, options); + return object; + }; + + /** + * Converts this QueryValidatorsRequest to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.QueryValidatorsRequest + * @instance + * @returns {Object.} JSON object + */ + QueryValidatorsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryValidatorsRequest; + })(v1beta1.QueryValidatorsRequest || {}); + + v1beta1.QueryValidatorsResponse = (function(QueryValidatorsResponse) { + + /** + * Properties of a QueryValidatorsResponse. + * @memberof cosmos.staking.v1beta1 + * @interface IQueryValidatorsResponse + * @property {Array.|null} [validators] QueryValidatorsResponse validators + * @property {cosmos.base.query.v1beta1.IPageResponse|null} [pagination] QueryValidatorsResponse pagination + */ + + /** + * Constructs a new QueryValidatorsResponse. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a QueryValidatorsResponse. + * @implements IQueryValidatorsResponse + * @constructor + * @param {cosmos.staking.v1beta1.IQueryValidatorsResponse=} [properties] Properties to set + */ + function QueryValidatorsResponse(properties) { + this.validators = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryValidatorsResponse validators. + * @member {Array.} validators + * @memberof cosmos.staking.v1beta1.QueryValidatorsResponse + * @instance + */ + QueryValidatorsResponse.prototype.validators = $util.emptyArray; + + /** + * QueryValidatorsResponse pagination. + * @member {cosmos.base.query.v1beta1.IPageResponse|null|undefined} pagination + * @memberof cosmos.staking.v1beta1.QueryValidatorsResponse + * @instance + */ + QueryValidatorsResponse.prototype.pagination = null; + + /** + * Creates a new QueryValidatorsResponse instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.QueryValidatorsResponse + * @static + * @param {cosmos.staking.v1beta1.IQueryValidatorsResponse=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.QueryValidatorsResponse} QueryValidatorsResponse instance + */ + QueryValidatorsResponse.create = function create(properties) { + return new QueryValidatorsResponse(properties); + }; + + /** + * Encodes the specified QueryValidatorsResponse message. Does not implicitly {@link cosmos.staking.v1beta1.QueryValidatorsResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.QueryValidatorsResponse + * @static + * @param {cosmos.staking.v1beta1.IQueryValidatorsResponse} message QueryValidatorsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryValidatorsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.validators != null && message.validators.length) + for (let i = 0; i < message.validators.length; ++i) + $root.cosmos.staking.v1beta1.Validator.encode(message.validators[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) + $root.cosmos.base.query.v1beta1.PageResponse.encode(message.pagination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryValidatorsResponse message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.QueryValidatorsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.QueryValidatorsResponse + * @static + * @param {cosmos.staking.v1beta1.IQueryValidatorsResponse} message QueryValidatorsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryValidatorsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryValidatorsResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.QueryValidatorsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.QueryValidatorsResponse} QueryValidatorsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryValidatorsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.QueryValidatorsResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.validators && message.validators.length)) + message.validators = []; + message.validators.push($root.cosmos.staking.v1beta1.Validator.decode(reader, reader.uint32())); + break; + case 2: + message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryValidatorsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.QueryValidatorsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.QueryValidatorsResponse} QueryValidatorsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryValidatorsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryValidatorsResponse message. + * @function verify + * @memberof cosmos.staking.v1beta1.QueryValidatorsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryValidatorsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.validators != null && message.hasOwnProperty("validators")) { + if (!Array.isArray(message.validators)) + return "validators: array expected"; + for (let i = 0; i < message.validators.length; ++i) { + let error = $root.cosmos.staking.v1beta1.Validator.verify(message.validators[i]); + if (error) + return "validators." + error; + } + } + if (message.pagination != null && message.hasOwnProperty("pagination")) { + let error = $root.cosmos.base.query.v1beta1.PageResponse.verify(message.pagination); + if (error) + return "pagination." + error; + } + return null; + }; + + /** + * Creates a QueryValidatorsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.QueryValidatorsResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.QueryValidatorsResponse} QueryValidatorsResponse + */ + QueryValidatorsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.QueryValidatorsResponse) + return object; + let message = new $root.cosmos.staking.v1beta1.QueryValidatorsResponse(); + if (object.validators) { + if (!Array.isArray(object.validators)) + throw TypeError(".cosmos.staking.v1beta1.QueryValidatorsResponse.validators: array expected"); + message.validators = []; + for (let i = 0; i < object.validators.length; ++i) { + if (typeof object.validators[i] !== "object") + throw TypeError(".cosmos.staking.v1beta1.QueryValidatorsResponse.validators: object expected"); + message.validators[i] = $root.cosmos.staking.v1beta1.Validator.fromObject(object.validators[i]); + } + } + if (object.pagination != null) { + if (typeof object.pagination !== "object") + throw TypeError(".cosmos.staking.v1beta1.QueryValidatorsResponse.pagination: object expected"); + message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.fromObject(object.pagination); + } + return message; + }; + + /** + * Creates a plain object from a QueryValidatorsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.QueryValidatorsResponse + * @static + * @param {cosmos.staking.v1beta1.QueryValidatorsResponse} message QueryValidatorsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryValidatorsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.validators = []; + if (options.defaults) + object.pagination = null; + if (message.validators && message.validators.length) { + object.validators = []; + for (let j = 0; j < message.validators.length; ++j) + object.validators[j] = $root.cosmos.staking.v1beta1.Validator.toObject(message.validators[j], options); + } + if (message.pagination != null && message.hasOwnProperty("pagination")) + object.pagination = $root.cosmos.base.query.v1beta1.PageResponse.toObject(message.pagination, options); + return object; + }; + + /** + * Converts this QueryValidatorsResponse to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.QueryValidatorsResponse + * @instance + * @returns {Object.} JSON object + */ + QueryValidatorsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryValidatorsResponse; + })(v1beta1.QueryValidatorsResponse || {}); + + v1beta1.QueryValidatorRequest = (function(QueryValidatorRequest) { + + /** + * Properties of a QueryValidatorRequest. + * @memberof cosmos.staking.v1beta1 + * @interface IQueryValidatorRequest + * @property {string|null} [validatorAddr] QueryValidatorRequest validatorAddr + */ + + /** + * Constructs a new QueryValidatorRequest. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a QueryValidatorRequest. + * @implements IQueryValidatorRequest + * @constructor + * @param {cosmos.staking.v1beta1.IQueryValidatorRequest=} [properties] Properties to set + */ + function QueryValidatorRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryValidatorRequest validatorAddr. + * @member {string} validatorAddr + * @memberof cosmos.staking.v1beta1.QueryValidatorRequest + * @instance + */ + QueryValidatorRequest.prototype.validatorAddr = ""; + + /** + * Creates a new QueryValidatorRequest instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.QueryValidatorRequest + * @static + * @param {cosmos.staking.v1beta1.IQueryValidatorRequest=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.QueryValidatorRequest} QueryValidatorRequest instance + */ + QueryValidatorRequest.create = function create(properties) { + return new QueryValidatorRequest(properties); + }; + + /** + * Encodes the specified QueryValidatorRequest message. Does not implicitly {@link cosmos.staking.v1beta1.QueryValidatorRequest.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.QueryValidatorRequest + * @static + * @param {cosmos.staking.v1beta1.IQueryValidatorRequest} message QueryValidatorRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryValidatorRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.validatorAddr != null && Object.hasOwnProperty.call(message, "validatorAddr")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.validatorAddr); + return writer; + }; + + /** + * Encodes the specified QueryValidatorRequest message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.QueryValidatorRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.QueryValidatorRequest + * @static + * @param {cosmos.staking.v1beta1.IQueryValidatorRequest} message QueryValidatorRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryValidatorRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryValidatorRequest message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.QueryValidatorRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.QueryValidatorRequest} QueryValidatorRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryValidatorRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.QueryValidatorRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.validatorAddr = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryValidatorRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.QueryValidatorRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.QueryValidatorRequest} QueryValidatorRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryValidatorRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryValidatorRequest message. + * @function verify + * @memberof cosmos.staking.v1beta1.QueryValidatorRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryValidatorRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.validatorAddr != null && message.hasOwnProperty("validatorAddr")) + if (!$util.isString(message.validatorAddr)) + return "validatorAddr: string expected"; + return null; + }; + + /** + * Creates a QueryValidatorRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.QueryValidatorRequest + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.QueryValidatorRequest} QueryValidatorRequest + */ + QueryValidatorRequest.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.QueryValidatorRequest) + return object; + let message = new $root.cosmos.staking.v1beta1.QueryValidatorRequest(); + if (object.validatorAddr != null) + message.validatorAddr = String(object.validatorAddr); + return message; + }; + + /** + * Creates a plain object from a QueryValidatorRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.QueryValidatorRequest + * @static + * @param {cosmos.staking.v1beta1.QueryValidatorRequest} message QueryValidatorRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryValidatorRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.validatorAddr = ""; + if (message.validatorAddr != null && message.hasOwnProperty("validatorAddr")) + object.validatorAddr = message.validatorAddr; + return object; + }; + + /** + * Converts this QueryValidatorRequest to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.QueryValidatorRequest + * @instance + * @returns {Object.} JSON object + */ + QueryValidatorRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryValidatorRequest; + })(v1beta1.QueryValidatorRequest || {}); + + v1beta1.QueryValidatorResponse = (function(QueryValidatorResponse) { + + /** + * Properties of a QueryValidatorResponse. + * @memberof cosmos.staking.v1beta1 + * @interface IQueryValidatorResponse + * @property {cosmos.staking.v1beta1.IValidator|null} [validator] QueryValidatorResponse validator + */ + + /** + * Constructs a new QueryValidatorResponse. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a QueryValidatorResponse. + * @implements IQueryValidatorResponse + * @constructor + * @param {cosmos.staking.v1beta1.IQueryValidatorResponse=} [properties] Properties to set + */ + function QueryValidatorResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryValidatorResponse validator. + * @member {cosmos.staking.v1beta1.IValidator|null|undefined} validator + * @memberof cosmos.staking.v1beta1.QueryValidatorResponse + * @instance + */ + QueryValidatorResponse.prototype.validator = null; + + /** + * Creates a new QueryValidatorResponse instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.QueryValidatorResponse + * @static + * @param {cosmos.staking.v1beta1.IQueryValidatorResponse=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.QueryValidatorResponse} QueryValidatorResponse instance + */ + QueryValidatorResponse.create = function create(properties) { + return new QueryValidatorResponse(properties); + }; + + /** + * Encodes the specified QueryValidatorResponse message. Does not implicitly {@link cosmos.staking.v1beta1.QueryValidatorResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.QueryValidatorResponse + * @static + * @param {cosmos.staking.v1beta1.IQueryValidatorResponse} message QueryValidatorResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryValidatorResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.validator != null && Object.hasOwnProperty.call(message, "validator")) + $root.cosmos.staking.v1beta1.Validator.encode(message.validator, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryValidatorResponse message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.QueryValidatorResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.QueryValidatorResponse + * @static + * @param {cosmos.staking.v1beta1.IQueryValidatorResponse} message QueryValidatorResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryValidatorResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryValidatorResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.QueryValidatorResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.QueryValidatorResponse} QueryValidatorResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryValidatorResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.QueryValidatorResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.validator = $root.cosmos.staking.v1beta1.Validator.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryValidatorResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.QueryValidatorResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.QueryValidatorResponse} QueryValidatorResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryValidatorResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryValidatorResponse message. + * @function verify + * @memberof cosmos.staking.v1beta1.QueryValidatorResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryValidatorResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.validator != null && message.hasOwnProperty("validator")) { + let error = $root.cosmos.staking.v1beta1.Validator.verify(message.validator); + if (error) + return "validator." + error; + } + return null; + }; + + /** + * Creates a QueryValidatorResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.QueryValidatorResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.QueryValidatorResponse} QueryValidatorResponse + */ + QueryValidatorResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.QueryValidatorResponse) + return object; + let message = new $root.cosmos.staking.v1beta1.QueryValidatorResponse(); + if (object.validator != null) { + if (typeof object.validator !== "object") + throw TypeError(".cosmos.staking.v1beta1.QueryValidatorResponse.validator: object expected"); + message.validator = $root.cosmos.staking.v1beta1.Validator.fromObject(object.validator); + } + return message; + }; + + /** + * Creates a plain object from a QueryValidatorResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.QueryValidatorResponse + * @static + * @param {cosmos.staking.v1beta1.QueryValidatorResponse} message QueryValidatorResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryValidatorResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.validator = null; + if (message.validator != null && message.hasOwnProperty("validator")) + object.validator = $root.cosmos.staking.v1beta1.Validator.toObject(message.validator, options); + return object; + }; + + /** + * Converts this QueryValidatorResponse to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.QueryValidatorResponse + * @instance + * @returns {Object.} JSON object + */ + QueryValidatorResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryValidatorResponse; + })(v1beta1.QueryValidatorResponse || {}); + + v1beta1.QueryValidatorDelegationsRequest = (function(QueryValidatorDelegationsRequest) { + + /** + * Properties of a QueryValidatorDelegationsRequest. + * @memberof cosmos.staking.v1beta1 + * @interface IQueryValidatorDelegationsRequest + * @property {string|null} [validatorAddr] QueryValidatorDelegationsRequest validatorAddr + * @property {cosmos.base.query.v1beta1.IPageRequest|null} [pagination] QueryValidatorDelegationsRequest pagination + */ + + /** + * Constructs a new QueryValidatorDelegationsRequest. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a QueryValidatorDelegationsRequest. + * @implements IQueryValidatorDelegationsRequest + * @constructor + * @param {cosmos.staking.v1beta1.IQueryValidatorDelegationsRequest=} [properties] Properties to set + */ + function QueryValidatorDelegationsRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryValidatorDelegationsRequest validatorAddr. + * @member {string} validatorAddr + * @memberof cosmos.staking.v1beta1.QueryValidatorDelegationsRequest + * @instance + */ + QueryValidatorDelegationsRequest.prototype.validatorAddr = ""; + + /** + * QueryValidatorDelegationsRequest pagination. + * @member {cosmos.base.query.v1beta1.IPageRequest|null|undefined} pagination + * @memberof cosmos.staking.v1beta1.QueryValidatorDelegationsRequest + * @instance + */ + QueryValidatorDelegationsRequest.prototype.pagination = null; + + /** + * Creates a new QueryValidatorDelegationsRequest instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.QueryValidatorDelegationsRequest + * @static + * @param {cosmos.staking.v1beta1.IQueryValidatorDelegationsRequest=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.QueryValidatorDelegationsRequest} QueryValidatorDelegationsRequest instance + */ + QueryValidatorDelegationsRequest.create = function create(properties) { + return new QueryValidatorDelegationsRequest(properties); + }; + + /** + * Encodes the specified QueryValidatorDelegationsRequest message. Does not implicitly {@link cosmos.staking.v1beta1.QueryValidatorDelegationsRequest.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.QueryValidatorDelegationsRequest + * @static + * @param {cosmos.staking.v1beta1.IQueryValidatorDelegationsRequest} message QueryValidatorDelegationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryValidatorDelegationsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.validatorAddr != null && Object.hasOwnProperty.call(message, "validatorAddr")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.validatorAddr); + if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) + $root.cosmos.base.query.v1beta1.PageRequest.encode(message.pagination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryValidatorDelegationsRequest message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.QueryValidatorDelegationsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.QueryValidatorDelegationsRequest + * @static + * @param {cosmos.staking.v1beta1.IQueryValidatorDelegationsRequest} message QueryValidatorDelegationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryValidatorDelegationsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryValidatorDelegationsRequest message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.QueryValidatorDelegationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.QueryValidatorDelegationsRequest} QueryValidatorDelegationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryValidatorDelegationsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.QueryValidatorDelegationsRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.validatorAddr = reader.string(); + break; + case 2: + message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryValidatorDelegationsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.QueryValidatorDelegationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.QueryValidatorDelegationsRequest} QueryValidatorDelegationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryValidatorDelegationsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryValidatorDelegationsRequest message. + * @function verify + * @memberof cosmos.staking.v1beta1.QueryValidatorDelegationsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryValidatorDelegationsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.validatorAddr != null && message.hasOwnProperty("validatorAddr")) + if (!$util.isString(message.validatorAddr)) + return "validatorAddr: string expected"; + if (message.pagination != null && message.hasOwnProperty("pagination")) { + let error = $root.cosmos.base.query.v1beta1.PageRequest.verify(message.pagination); + if (error) + return "pagination." + error; + } + return null; + }; + + /** + * Creates a QueryValidatorDelegationsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.QueryValidatorDelegationsRequest + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.QueryValidatorDelegationsRequest} QueryValidatorDelegationsRequest + */ + QueryValidatorDelegationsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.QueryValidatorDelegationsRequest) + return object; + let message = new $root.cosmos.staking.v1beta1.QueryValidatorDelegationsRequest(); + if (object.validatorAddr != null) + message.validatorAddr = String(object.validatorAddr); + if (object.pagination != null) { + if (typeof object.pagination !== "object") + throw TypeError(".cosmos.staking.v1beta1.QueryValidatorDelegationsRequest.pagination: object expected"); + message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.fromObject(object.pagination); + } + return message; + }; + + /** + * Creates a plain object from a QueryValidatorDelegationsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.QueryValidatorDelegationsRequest + * @static + * @param {cosmos.staking.v1beta1.QueryValidatorDelegationsRequest} message QueryValidatorDelegationsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryValidatorDelegationsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.validatorAddr = ""; + object.pagination = null; + } + if (message.validatorAddr != null && message.hasOwnProperty("validatorAddr")) + object.validatorAddr = message.validatorAddr; + if (message.pagination != null && message.hasOwnProperty("pagination")) + object.pagination = $root.cosmos.base.query.v1beta1.PageRequest.toObject(message.pagination, options); + return object; + }; + + /** + * Converts this QueryValidatorDelegationsRequest to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.QueryValidatorDelegationsRequest + * @instance + * @returns {Object.} JSON object + */ + QueryValidatorDelegationsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryValidatorDelegationsRequest; + })(v1beta1.QueryValidatorDelegationsRequest || {}); + + v1beta1.QueryValidatorDelegationsResponse = (function(QueryValidatorDelegationsResponse) { + + /** + * Properties of a QueryValidatorDelegationsResponse. + * @memberof cosmos.staking.v1beta1 + * @interface IQueryValidatorDelegationsResponse + * @property {Array.|null} [delegationResponses] QueryValidatorDelegationsResponse delegationResponses + * @property {cosmos.base.query.v1beta1.IPageResponse|null} [pagination] QueryValidatorDelegationsResponse pagination + */ + + /** + * Constructs a new QueryValidatorDelegationsResponse. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a QueryValidatorDelegationsResponse. + * @implements IQueryValidatorDelegationsResponse + * @constructor + * @param {cosmos.staking.v1beta1.IQueryValidatorDelegationsResponse=} [properties] Properties to set + */ + function QueryValidatorDelegationsResponse(properties) { + this.delegationResponses = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryValidatorDelegationsResponse delegationResponses. + * @member {Array.} delegationResponses + * @memberof cosmos.staking.v1beta1.QueryValidatorDelegationsResponse + * @instance + */ + QueryValidatorDelegationsResponse.prototype.delegationResponses = $util.emptyArray; + + /** + * QueryValidatorDelegationsResponse pagination. + * @member {cosmos.base.query.v1beta1.IPageResponse|null|undefined} pagination + * @memberof cosmos.staking.v1beta1.QueryValidatorDelegationsResponse + * @instance + */ + QueryValidatorDelegationsResponse.prototype.pagination = null; + + /** + * Creates a new QueryValidatorDelegationsResponse instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.QueryValidatorDelegationsResponse + * @static + * @param {cosmos.staking.v1beta1.IQueryValidatorDelegationsResponse=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.QueryValidatorDelegationsResponse} QueryValidatorDelegationsResponse instance + */ + QueryValidatorDelegationsResponse.create = function create(properties) { + return new QueryValidatorDelegationsResponse(properties); + }; + + /** + * Encodes the specified QueryValidatorDelegationsResponse message. Does not implicitly {@link cosmos.staking.v1beta1.QueryValidatorDelegationsResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.QueryValidatorDelegationsResponse + * @static + * @param {cosmos.staking.v1beta1.IQueryValidatorDelegationsResponse} message QueryValidatorDelegationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryValidatorDelegationsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.delegationResponses != null && message.delegationResponses.length) + for (let i = 0; i < message.delegationResponses.length; ++i) + $root.cosmos.staking.v1beta1.DelegationResponse.encode(message.delegationResponses[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) + $root.cosmos.base.query.v1beta1.PageResponse.encode(message.pagination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryValidatorDelegationsResponse message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.QueryValidatorDelegationsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.QueryValidatorDelegationsResponse + * @static + * @param {cosmos.staking.v1beta1.IQueryValidatorDelegationsResponse} message QueryValidatorDelegationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryValidatorDelegationsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryValidatorDelegationsResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.QueryValidatorDelegationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.QueryValidatorDelegationsResponse} QueryValidatorDelegationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryValidatorDelegationsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.QueryValidatorDelegationsResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.delegationResponses && message.delegationResponses.length)) + message.delegationResponses = []; + message.delegationResponses.push($root.cosmos.staking.v1beta1.DelegationResponse.decode(reader, reader.uint32())); + break; + case 2: + message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryValidatorDelegationsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.QueryValidatorDelegationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.QueryValidatorDelegationsResponse} QueryValidatorDelegationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryValidatorDelegationsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryValidatorDelegationsResponse message. + * @function verify + * @memberof cosmos.staking.v1beta1.QueryValidatorDelegationsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryValidatorDelegationsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.delegationResponses != null && message.hasOwnProperty("delegationResponses")) { + if (!Array.isArray(message.delegationResponses)) + return "delegationResponses: array expected"; + for (let i = 0; i < message.delegationResponses.length; ++i) { + let error = $root.cosmos.staking.v1beta1.DelegationResponse.verify(message.delegationResponses[i]); + if (error) + return "delegationResponses." + error; + } + } + if (message.pagination != null && message.hasOwnProperty("pagination")) { + let error = $root.cosmos.base.query.v1beta1.PageResponse.verify(message.pagination); + if (error) + return "pagination." + error; + } + return null; + }; + + /** + * Creates a QueryValidatorDelegationsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.QueryValidatorDelegationsResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.QueryValidatorDelegationsResponse} QueryValidatorDelegationsResponse + */ + QueryValidatorDelegationsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.QueryValidatorDelegationsResponse) + return object; + let message = new $root.cosmos.staking.v1beta1.QueryValidatorDelegationsResponse(); + if (object.delegationResponses) { + if (!Array.isArray(object.delegationResponses)) + throw TypeError(".cosmos.staking.v1beta1.QueryValidatorDelegationsResponse.delegationResponses: array expected"); + message.delegationResponses = []; + for (let i = 0; i < object.delegationResponses.length; ++i) { + if (typeof object.delegationResponses[i] !== "object") + throw TypeError(".cosmos.staking.v1beta1.QueryValidatorDelegationsResponse.delegationResponses: object expected"); + message.delegationResponses[i] = $root.cosmos.staking.v1beta1.DelegationResponse.fromObject(object.delegationResponses[i]); + } + } + if (object.pagination != null) { + if (typeof object.pagination !== "object") + throw TypeError(".cosmos.staking.v1beta1.QueryValidatorDelegationsResponse.pagination: object expected"); + message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.fromObject(object.pagination); + } + return message; + }; + + /** + * Creates a plain object from a QueryValidatorDelegationsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.QueryValidatorDelegationsResponse + * @static + * @param {cosmos.staking.v1beta1.QueryValidatorDelegationsResponse} message QueryValidatorDelegationsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryValidatorDelegationsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.delegationResponses = []; + if (options.defaults) + object.pagination = null; + if (message.delegationResponses && message.delegationResponses.length) { + object.delegationResponses = []; + for (let j = 0; j < message.delegationResponses.length; ++j) + object.delegationResponses[j] = $root.cosmos.staking.v1beta1.DelegationResponse.toObject(message.delegationResponses[j], options); + } + if (message.pagination != null && message.hasOwnProperty("pagination")) + object.pagination = $root.cosmos.base.query.v1beta1.PageResponse.toObject(message.pagination, options); + return object; + }; + + /** + * Converts this QueryValidatorDelegationsResponse to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.QueryValidatorDelegationsResponse + * @instance + * @returns {Object.} JSON object + */ + QueryValidatorDelegationsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryValidatorDelegationsResponse; + })(v1beta1.QueryValidatorDelegationsResponse || {}); + + v1beta1.QueryValidatorUnbondingDelegationsRequest = (function(QueryValidatorUnbondingDelegationsRequest) { + + /** + * Properties of a QueryValidatorUnbondingDelegationsRequest. + * @memberof cosmos.staking.v1beta1 + * @interface IQueryValidatorUnbondingDelegationsRequest + * @property {string|null} [validatorAddr] QueryValidatorUnbondingDelegationsRequest validatorAddr + * @property {cosmos.base.query.v1beta1.IPageRequest|null} [pagination] QueryValidatorUnbondingDelegationsRequest pagination + */ + + /** + * Constructs a new QueryValidatorUnbondingDelegationsRequest. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a QueryValidatorUnbondingDelegationsRequest. + * @implements IQueryValidatorUnbondingDelegationsRequest + * @constructor + * @param {cosmos.staking.v1beta1.IQueryValidatorUnbondingDelegationsRequest=} [properties] Properties to set + */ + function QueryValidatorUnbondingDelegationsRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryValidatorUnbondingDelegationsRequest validatorAddr. + * @member {string} validatorAddr + * @memberof cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest + * @instance + */ + QueryValidatorUnbondingDelegationsRequest.prototype.validatorAddr = ""; + + /** + * QueryValidatorUnbondingDelegationsRequest pagination. + * @member {cosmos.base.query.v1beta1.IPageRequest|null|undefined} pagination + * @memberof cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest + * @instance + */ + QueryValidatorUnbondingDelegationsRequest.prototype.pagination = null; + + /** + * Creates a new QueryValidatorUnbondingDelegationsRequest instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest + * @static + * @param {cosmos.staking.v1beta1.IQueryValidatorUnbondingDelegationsRequest=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest} QueryValidatorUnbondingDelegationsRequest instance + */ + QueryValidatorUnbondingDelegationsRequest.create = function create(properties) { + return new QueryValidatorUnbondingDelegationsRequest(properties); + }; + + /** + * Encodes the specified QueryValidatorUnbondingDelegationsRequest message. Does not implicitly {@link cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest + * @static + * @param {cosmos.staking.v1beta1.IQueryValidatorUnbondingDelegationsRequest} message QueryValidatorUnbondingDelegationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryValidatorUnbondingDelegationsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.validatorAddr != null && Object.hasOwnProperty.call(message, "validatorAddr")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.validatorAddr); + if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) + $root.cosmos.base.query.v1beta1.PageRequest.encode(message.pagination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryValidatorUnbondingDelegationsRequest message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest + * @static + * @param {cosmos.staking.v1beta1.IQueryValidatorUnbondingDelegationsRequest} message QueryValidatorUnbondingDelegationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryValidatorUnbondingDelegationsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryValidatorUnbondingDelegationsRequest message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest} QueryValidatorUnbondingDelegationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryValidatorUnbondingDelegationsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.validatorAddr = reader.string(); + break; + case 2: + message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryValidatorUnbondingDelegationsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest} QueryValidatorUnbondingDelegationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryValidatorUnbondingDelegationsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryValidatorUnbondingDelegationsRequest message. + * @function verify + * @memberof cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryValidatorUnbondingDelegationsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.validatorAddr != null && message.hasOwnProperty("validatorAddr")) + if (!$util.isString(message.validatorAddr)) + return "validatorAddr: string expected"; + if (message.pagination != null && message.hasOwnProperty("pagination")) { + let error = $root.cosmos.base.query.v1beta1.PageRequest.verify(message.pagination); + if (error) + return "pagination." + error; + } + return null; + }; + + /** + * Creates a QueryValidatorUnbondingDelegationsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest} QueryValidatorUnbondingDelegationsRequest + */ + QueryValidatorUnbondingDelegationsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest) + return object; + let message = new $root.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest(); + if (object.validatorAddr != null) + message.validatorAddr = String(object.validatorAddr); + if (object.pagination != null) { + if (typeof object.pagination !== "object") + throw TypeError(".cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest.pagination: object expected"); + message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.fromObject(object.pagination); + } + return message; + }; + + /** + * Creates a plain object from a QueryValidatorUnbondingDelegationsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest + * @static + * @param {cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest} message QueryValidatorUnbondingDelegationsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryValidatorUnbondingDelegationsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.validatorAddr = ""; + object.pagination = null; + } + if (message.validatorAddr != null && message.hasOwnProperty("validatorAddr")) + object.validatorAddr = message.validatorAddr; + if (message.pagination != null && message.hasOwnProperty("pagination")) + object.pagination = $root.cosmos.base.query.v1beta1.PageRequest.toObject(message.pagination, options); + return object; + }; + + /** + * Converts this QueryValidatorUnbondingDelegationsRequest to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest + * @instance + * @returns {Object.} JSON object + */ + QueryValidatorUnbondingDelegationsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryValidatorUnbondingDelegationsRequest; + })(v1beta1.QueryValidatorUnbondingDelegationsRequest || {}); + + v1beta1.QueryValidatorUnbondingDelegationsResponse = (function(QueryValidatorUnbondingDelegationsResponse) { + + /** + * Properties of a QueryValidatorUnbondingDelegationsResponse. + * @memberof cosmos.staking.v1beta1 + * @interface IQueryValidatorUnbondingDelegationsResponse + * @property {Array.|null} [unbondingResponses] QueryValidatorUnbondingDelegationsResponse unbondingResponses + * @property {cosmos.base.query.v1beta1.IPageResponse|null} [pagination] QueryValidatorUnbondingDelegationsResponse pagination + */ + + /** + * Constructs a new QueryValidatorUnbondingDelegationsResponse. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a QueryValidatorUnbondingDelegationsResponse. + * @implements IQueryValidatorUnbondingDelegationsResponse + * @constructor + * @param {cosmos.staking.v1beta1.IQueryValidatorUnbondingDelegationsResponse=} [properties] Properties to set + */ + function QueryValidatorUnbondingDelegationsResponse(properties) { + this.unbondingResponses = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryValidatorUnbondingDelegationsResponse unbondingResponses. + * @member {Array.} unbondingResponses + * @memberof cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse + * @instance + */ + QueryValidatorUnbondingDelegationsResponse.prototype.unbondingResponses = $util.emptyArray; + + /** + * QueryValidatorUnbondingDelegationsResponse pagination. + * @member {cosmos.base.query.v1beta1.IPageResponse|null|undefined} pagination + * @memberof cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse + * @instance + */ + QueryValidatorUnbondingDelegationsResponse.prototype.pagination = null; + + /** + * Creates a new QueryValidatorUnbondingDelegationsResponse instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse + * @static + * @param {cosmos.staking.v1beta1.IQueryValidatorUnbondingDelegationsResponse=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse} QueryValidatorUnbondingDelegationsResponse instance + */ + QueryValidatorUnbondingDelegationsResponse.create = function create(properties) { + return new QueryValidatorUnbondingDelegationsResponse(properties); + }; + + /** + * Encodes the specified QueryValidatorUnbondingDelegationsResponse message. Does not implicitly {@link cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse + * @static + * @param {cosmos.staking.v1beta1.IQueryValidatorUnbondingDelegationsResponse} message QueryValidatorUnbondingDelegationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryValidatorUnbondingDelegationsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.unbondingResponses != null && message.unbondingResponses.length) + for (let i = 0; i < message.unbondingResponses.length; ++i) + $root.cosmos.staking.v1beta1.UnbondingDelegation.encode(message.unbondingResponses[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) + $root.cosmos.base.query.v1beta1.PageResponse.encode(message.pagination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryValidatorUnbondingDelegationsResponse message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse + * @static + * @param {cosmos.staking.v1beta1.IQueryValidatorUnbondingDelegationsResponse} message QueryValidatorUnbondingDelegationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryValidatorUnbondingDelegationsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryValidatorUnbondingDelegationsResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse} QueryValidatorUnbondingDelegationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryValidatorUnbondingDelegationsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.unbondingResponses && message.unbondingResponses.length)) + message.unbondingResponses = []; + message.unbondingResponses.push($root.cosmos.staking.v1beta1.UnbondingDelegation.decode(reader, reader.uint32())); + break; + case 2: + message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryValidatorUnbondingDelegationsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse} QueryValidatorUnbondingDelegationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryValidatorUnbondingDelegationsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryValidatorUnbondingDelegationsResponse message. + * @function verify + * @memberof cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryValidatorUnbondingDelegationsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.unbondingResponses != null && message.hasOwnProperty("unbondingResponses")) { + if (!Array.isArray(message.unbondingResponses)) + return "unbondingResponses: array expected"; + for (let i = 0; i < message.unbondingResponses.length; ++i) { + let error = $root.cosmos.staking.v1beta1.UnbondingDelegation.verify(message.unbondingResponses[i]); + if (error) + return "unbondingResponses." + error; + } + } + if (message.pagination != null && message.hasOwnProperty("pagination")) { + let error = $root.cosmos.base.query.v1beta1.PageResponse.verify(message.pagination); + if (error) + return "pagination." + error; + } + return null; + }; + + /** + * Creates a QueryValidatorUnbondingDelegationsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse} QueryValidatorUnbondingDelegationsResponse + */ + QueryValidatorUnbondingDelegationsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse) + return object; + let message = new $root.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse(); + if (object.unbondingResponses) { + if (!Array.isArray(object.unbondingResponses)) + throw TypeError(".cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse.unbondingResponses: array expected"); + message.unbondingResponses = []; + for (let i = 0; i < object.unbondingResponses.length; ++i) { + if (typeof object.unbondingResponses[i] !== "object") + throw TypeError(".cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse.unbondingResponses: object expected"); + message.unbondingResponses[i] = $root.cosmos.staking.v1beta1.UnbondingDelegation.fromObject(object.unbondingResponses[i]); + } + } + if (object.pagination != null) { + if (typeof object.pagination !== "object") + throw TypeError(".cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse.pagination: object expected"); + message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.fromObject(object.pagination); + } + return message; + }; + + /** + * Creates a plain object from a QueryValidatorUnbondingDelegationsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse + * @static + * @param {cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse} message QueryValidatorUnbondingDelegationsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryValidatorUnbondingDelegationsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.unbondingResponses = []; + if (options.defaults) + object.pagination = null; + if (message.unbondingResponses && message.unbondingResponses.length) { + object.unbondingResponses = []; + for (let j = 0; j < message.unbondingResponses.length; ++j) + object.unbondingResponses[j] = $root.cosmos.staking.v1beta1.UnbondingDelegation.toObject(message.unbondingResponses[j], options); + } + if (message.pagination != null && message.hasOwnProperty("pagination")) + object.pagination = $root.cosmos.base.query.v1beta1.PageResponse.toObject(message.pagination, options); + return object; + }; + + /** + * Converts this QueryValidatorUnbondingDelegationsResponse to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse + * @instance + * @returns {Object.} JSON object + */ + QueryValidatorUnbondingDelegationsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryValidatorUnbondingDelegationsResponse; + })(v1beta1.QueryValidatorUnbondingDelegationsResponse || {}); + + v1beta1.QueryDelegationRequest = (function(QueryDelegationRequest) { + + /** + * Properties of a QueryDelegationRequest. + * @memberof cosmos.staking.v1beta1 + * @interface IQueryDelegationRequest + * @property {string|null} [delegatorAddr] QueryDelegationRequest delegatorAddr + * @property {string|null} [validatorAddr] QueryDelegationRequest validatorAddr + */ + + /** + * Constructs a new QueryDelegationRequest. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a QueryDelegationRequest. + * @implements IQueryDelegationRequest + * @constructor + * @param {cosmos.staking.v1beta1.IQueryDelegationRequest=} [properties] Properties to set + */ + function QueryDelegationRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryDelegationRequest delegatorAddr. + * @member {string} delegatorAddr + * @memberof cosmos.staking.v1beta1.QueryDelegationRequest + * @instance + */ + QueryDelegationRequest.prototype.delegatorAddr = ""; + + /** + * QueryDelegationRequest validatorAddr. + * @member {string} validatorAddr + * @memberof cosmos.staking.v1beta1.QueryDelegationRequest + * @instance + */ + QueryDelegationRequest.prototype.validatorAddr = ""; + + /** + * Creates a new QueryDelegationRequest instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.QueryDelegationRequest + * @static + * @param {cosmos.staking.v1beta1.IQueryDelegationRequest=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.QueryDelegationRequest} QueryDelegationRequest instance + */ + QueryDelegationRequest.create = function create(properties) { + return new QueryDelegationRequest(properties); + }; + + /** + * Encodes the specified QueryDelegationRequest message. Does not implicitly {@link cosmos.staking.v1beta1.QueryDelegationRequest.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.QueryDelegationRequest + * @static + * @param {cosmos.staking.v1beta1.IQueryDelegationRequest} message QueryDelegationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDelegationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.delegatorAddr != null && Object.hasOwnProperty.call(message, "delegatorAddr")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.delegatorAddr); + if (message.validatorAddr != null && Object.hasOwnProperty.call(message, "validatorAddr")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.validatorAddr); + return writer; + }; + + /** + * Encodes the specified QueryDelegationRequest message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.QueryDelegationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.QueryDelegationRequest + * @static + * @param {cosmos.staking.v1beta1.IQueryDelegationRequest} message QueryDelegationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDelegationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryDelegationRequest message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.QueryDelegationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.QueryDelegationRequest} QueryDelegationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDelegationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.QueryDelegationRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.delegatorAddr = reader.string(); + break; + case 2: + message.validatorAddr = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryDelegationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.QueryDelegationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.QueryDelegationRequest} QueryDelegationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDelegationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryDelegationRequest message. + * @function verify + * @memberof cosmos.staking.v1beta1.QueryDelegationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryDelegationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.delegatorAddr != null && message.hasOwnProperty("delegatorAddr")) + if (!$util.isString(message.delegatorAddr)) + return "delegatorAddr: string expected"; + if (message.validatorAddr != null && message.hasOwnProperty("validatorAddr")) + if (!$util.isString(message.validatorAddr)) + return "validatorAddr: string expected"; + return null; + }; + + /** + * Creates a QueryDelegationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.QueryDelegationRequest + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.QueryDelegationRequest} QueryDelegationRequest + */ + QueryDelegationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.QueryDelegationRequest) + return object; + let message = new $root.cosmos.staking.v1beta1.QueryDelegationRequest(); + if (object.delegatorAddr != null) + message.delegatorAddr = String(object.delegatorAddr); + if (object.validatorAddr != null) + message.validatorAddr = String(object.validatorAddr); + return message; + }; + + /** + * Creates a plain object from a QueryDelegationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.QueryDelegationRequest + * @static + * @param {cosmos.staking.v1beta1.QueryDelegationRequest} message QueryDelegationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryDelegationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.delegatorAddr = ""; + object.validatorAddr = ""; + } + if (message.delegatorAddr != null && message.hasOwnProperty("delegatorAddr")) + object.delegatorAddr = message.delegatorAddr; + if (message.validatorAddr != null && message.hasOwnProperty("validatorAddr")) + object.validatorAddr = message.validatorAddr; + return object; + }; + + /** + * Converts this QueryDelegationRequest to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.QueryDelegationRequest + * @instance + * @returns {Object.} JSON object + */ + QueryDelegationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryDelegationRequest; + })(v1beta1.QueryDelegationRequest || {}); + + v1beta1.QueryDelegationResponse = (function(QueryDelegationResponse) { + + /** + * Properties of a QueryDelegationResponse. + * @memberof cosmos.staking.v1beta1 + * @interface IQueryDelegationResponse + * @property {cosmos.staking.v1beta1.IDelegationResponse|null} [delegationResponse] QueryDelegationResponse delegationResponse + */ + + /** + * Constructs a new QueryDelegationResponse. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a QueryDelegationResponse. + * @implements IQueryDelegationResponse + * @constructor + * @param {cosmos.staking.v1beta1.IQueryDelegationResponse=} [properties] Properties to set + */ + function QueryDelegationResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryDelegationResponse delegationResponse. + * @member {cosmos.staking.v1beta1.IDelegationResponse|null|undefined} delegationResponse + * @memberof cosmos.staking.v1beta1.QueryDelegationResponse + * @instance + */ + QueryDelegationResponse.prototype.delegationResponse = null; + + /** + * Creates a new QueryDelegationResponse instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.QueryDelegationResponse + * @static + * @param {cosmos.staking.v1beta1.IQueryDelegationResponse=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.QueryDelegationResponse} QueryDelegationResponse instance + */ + QueryDelegationResponse.create = function create(properties) { + return new QueryDelegationResponse(properties); + }; + + /** + * Encodes the specified QueryDelegationResponse message. Does not implicitly {@link cosmos.staking.v1beta1.QueryDelegationResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.QueryDelegationResponse + * @static + * @param {cosmos.staking.v1beta1.IQueryDelegationResponse} message QueryDelegationResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDelegationResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.delegationResponse != null && Object.hasOwnProperty.call(message, "delegationResponse")) + $root.cosmos.staking.v1beta1.DelegationResponse.encode(message.delegationResponse, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryDelegationResponse message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.QueryDelegationResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.QueryDelegationResponse + * @static + * @param {cosmos.staking.v1beta1.IQueryDelegationResponse} message QueryDelegationResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDelegationResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryDelegationResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.QueryDelegationResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.QueryDelegationResponse} QueryDelegationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDelegationResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.QueryDelegationResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.delegationResponse = $root.cosmos.staking.v1beta1.DelegationResponse.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryDelegationResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.QueryDelegationResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.QueryDelegationResponse} QueryDelegationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDelegationResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryDelegationResponse message. + * @function verify + * @memberof cosmos.staking.v1beta1.QueryDelegationResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryDelegationResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.delegationResponse != null && message.hasOwnProperty("delegationResponse")) { + let error = $root.cosmos.staking.v1beta1.DelegationResponse.verify(message.delegationResponse); + if (error) + return "delegationResponse." + error; + } + return null; + }; + + /** + * Creates a QueryDelegationResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.QueryDelegationResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.QueryDelegationResponse} QueryDelegationResponse + */ + QueryDelegationResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.QueryDelegationResponse) + return object; + let message = new $root.cosmos.staking.v1beta1.QueryDelegationResponse(); + if (object.delegationResponse != null) { + if (typeof object.delegationResponse !== "object") + throw TypeError(".cosmos.staking.v1beta1.QueryDelegationResponse.delegationResponse: object expected"); + message.delegationResponse = $root.cosmos.staking.v1beta1.DelegationResponse.fromObject(object.delegationResponse); + } + return message; + }; + + /** + * Creates a plain object from a QueryDelegationResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.QueryDelegationResponse + * @static + * @param {cosmos.staking.v1beta1.QueryDelegationResponse} message QueryDelegationResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryDelegationResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.delegationResponse = null; + if (message.delegationResponse != null && message.hasOwnProperty("delegationResponse")) + object.delegationResponse = $root.cosmos.staking.v1beta1.DelegationResponse.toObject(message.delegationResponse, options); + return object; + }; + + /** + * Converts this QueryDelegationResponse to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.QueryDelegationResponse + * @instance + * @returns {Object.} JSON object + */ + QueryDelegationResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryDelegationResponse; + })(v1beta1.QueryDelegationResponse || {}); + + v1beta1.QueryUnbondingDelegationRequest = (function(QueryUnbondingDelegationRequest) { + + /** + * Properties of a QueryUnbondingDelegationRequest. + * @memberof cosmos.staking.v1beta1 + * @interface IQueryUnbondingDelegationRequest + * @property {string|null} [delegatorAddr] QueryUnbondingDelegationRequest delegatorAddr + * @property {string|null} [validatorAddr] QueryUnbondingDelegationRequest validatorAddr + */ + + /** + * Constructs a new QueryUnbondingDelegationRequest. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a QueryUnbondingDelegationRequest. + * @implements IQueryUnbondingDelegationRequest + * @constructor + * @param {cosmos.staking.v1beta1.IQueryUnbondingDelegationRequest=} [properties] Properties to set + */ + function QueryUnbondingDelegationRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryUnbondingDelegationRequest delegatorAddr. + * @member {string} delegatorAddr + * @memberof cosmos.staking.v1beta1.QueryUnbondingDelegationRequest + * @instance + */ + QueryUnbondingDelegationRequest.prototype.delegatorAddr = ""; + + /** + * QueryUnbondingDelegationRequest validatorAddr. + * @member {string} validatorAddr + * @memberof cosmos.staking.v1beta1.QueryUnbondingDelegationRequest + * @instance + */ + QueryUnbondingDelegationRequest.prototype.validatorAddr = ""; + + /** + * Creates a new QueryUnbondingDelegationRequest instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.QueryUnbondingDelegationRequest + * @static + * @param {cosmos.staking.v1beta1.IQueryUnbondingDelegationRequest=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.QueryUnbondingDelegationRequest} QueryUnbondingDelegationRequest instance + */ + QueryUnbondingDelegationRequest.create = function create(properties) { + return new QueryUnbondingDelegationRequest(properties); + }; + + /** + * Encodes the specified QueryUnbondingDelegationRequest message. Does not implicitly {@link cosmos.staking.v1beta1.QueryUnbondingDelegationRequest.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.QueryUnbondingDelegationRequest + * @static + * @param {cosmos.staking.v1beta1.IQueryUnbondingDelegationRequest} message QueryUnbondingDelegationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryUnbondingDelegationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.delegatorAddr != null && Object.hasOwnProperty.call(message, "delegatorAddr")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.delegatorAddr); + if (message.validatorAddr != null && Object.hasOwnProperty.call(message, "validatorAddr")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.validatorAddr); + return writer; + }; + + /** + * Encodes the specified QueryUnbondingDelegationRequest message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.QueryUnbondingDelegationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.QueryUnbondingDelegationRequest + * @static + * @param {cosmos.staking.v1beta1.IQueryUnbondingDelegationRequest} message QueryUnbondingDelegationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryUnbondingDelegationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryUnbondingDelegationRequest message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.QueryUnbondingDelegationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.QueryUnbondingDelegationRequest} QueryUnbondingDelegationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryUnbondingDelegationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.QueryUnbondingDelegationRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.delegatorAddr = reader.string(); + break; + case 2: + message.validatorAddr = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryUnbondingDelegationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.QueryUnbondingDelegationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.QueryUnbondingDelegationRequest} QueryUnbondingDelegationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryUnbondingDelegationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryUnbondingDelegationRequest message. + * @function verify + * @memberof cosmos.staking.v1beta1.QueryUnbondingDelegationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryUnbondingDelegationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.delegatorAddr != null && message.hasOwnProperty("delegatorAddr")) + if (!$util.isString(message.delegatorAddr)) + return "delegatorAddr: string expected"; + if (message.validatorAddr != null && message.hasOwnProperty("validatorAddr")) + if (!$util.isString(message.validatorAddr)) + return "validatorAddr: string expected"; + return null; + }; + + /** + * Creates a QueryUnbondingDelegationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.QueryUnbondingDelegationRequest + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.QueryUnbondingDelegationRequest} QueryUnbondingDelegationRequest + */ + QueryUnbondingDelegationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.QueryUnbondingDelegationRequest) + return object; + let message = new $root.cosmos.staking.v1beta1.QueryUnbondingDelegationRequest(); + if (object.delegatorAddr != null) + message.delegatorAddr = String(object.delegatorAddr); + if (object.validatorAddr != null) + message.validatorAddr = String(object.validatorAddr); + return message; + }; + + /** + * Creates a plain object from a QueryUnbondingDelegationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.QueryUnbondingDelegationRequest + * @static + * @param {cosmos.staking.v1beta1.QueryUnbondingDelegationRequest} message QueryUnbondingDelegationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryUnbondingDelegationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.delegatorAddr = ""; + object.validatorAddr = ""; + } + if (message.delegatorAddr != null && message.hasOwnProperty("delegatorAddr")) + object.delegatorAddr = message.delegatorAddr; + if (message.validatorAddr != null && message.hasOwnProperty("validatorAddr")) + object.validatorAddr = message.validatorAddr; + return object; + }; + + /** + * Converts this QueryUnbondingDelegationRequest to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.QueryUnbondingDelegationRequest + * @instance + * @returns {Object.} JSON object + */ + QueryUnbondingDelegationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryUnbondingDelegationRequest; + })(v1beta1.QueryUnbondingDelegationRequest || {}); + + v1beta1.QueryUnbondingDelegationResponse = (function(QueryUnbondingDelegationResponse) { + + /** + * Properties of a QueryUnbondingDelegationResponse. + * @memberof cosmos.staking.v1beta1 + * @interface IQueryUnbondingDelegationResponse + * @property {cosmos.staking.v1beta1.IUnbondingDelegation|null} [unbond] QueryUnbondingDelegationResponse unbond + */ + + /** + * Constructs a new QueryUnbondingDelegationResponse. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a QueryUnbondingDelegationResponse. + * @implements IQueryUnbondingDelegationResponse + * @constructor + * @param {cosmos.staking.v1beta1.IQueryUnbondingDelegationResponse=} [properties] Properties to set + */ + function QueryUnbondingDelegationResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryUnbondingDelegationResponse unbond. + * @member {cosmos.staking.v1beta1.IUnbondingDelegation|null|undefined} unbond + * @memberof cosmos.staking.v1beta1.QueryUnbondingDelegationResponse + * @instance + */ + QueryUnbondingDelegationResponse.prototype.unbond = null; + + /** + * Creates a new QueryUnbondingDelegationResponse instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.QueryUnbondingDelegationResponse + * @static + * @param {cosmos.staking.v1beta1.IQueryUnbondingDelegationResponse=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.QueryUnbondingDelegationResponse} QueryUnbondingDelegationResponse instance + */ + QueryUnbondingDelegationResponse.create = function create(properties) { + return new QueryUnbondingDelegationResponse(properties); + }; + + /** + * Encodes the specified QueryUnbondingDelegationResponse message. Does not implicitly {@link cosmos.staking.v1beta1.QueryUnbondingDelegationResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.QueryUnbondingDelegationResponse + * @static + * @param {cosmos.staking.v1beta1.IQueryUnbondingDelegationResponse} message QueryUnbondingDelegationResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryUnbondingDelegationResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.unbond != null && Object.hasOwnProperty.call(message, "unbond")) + $root.cosmos.staking.v1beta1.UnbondingDelegation.encode(message.unbond, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryUnbondingDelegationResponse message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.QueryUnbondingDelegationResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.QueryUnbondingDelegationResponse + * @static + * @param {cosmos.staking.v1beta1.IQueryUnbondingDelegationResponse} message QueryUnbondingDelegationResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryUnbondingDelegationResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryUnbondingDelegationResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.QueryUnbondingDelegationResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.QueryUnbondingDelegationResponse} QueryUnbondingDelegationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryUnbondingDelegationResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.QueryUnbondingDelegationResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.unbond = $root.cosmos.staking.v1beta1.UnbondingDelegation.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryUnbondingDelegationResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.QueryUnbondingDelegationResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.QueryUnbondingDelegationResponse} QueryUnbondingDelegationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryUnbondingDelegationResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryUnbondingDelegationResponse message. + * @function verify + * @memberof cosmos.staking.v1beta1.QueryUnbondingDelegationResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryUnbondingDelegationResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.unbond != null && message.hasOwnProperty("unbond")) { + let error = $root.cosmos.staking.v1beta1.UnbondingDelegation.verify(message.unbond); + if (error) + return "unbond." + error; + } + return null; + }; + + /** + * Creates a QueryUnbondingDelegationResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.QueryUnbondingDelegationResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.QueryUnbondingDelegationResponse} QueryUnbondingDelegationResponse + */ + QueryUnbondingDelegationResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.QueryUnbondingDelegationResponse) + return object; + let message = new $root.cosmos.staking.v1beta1.QueryUnbondingDelegationResponse(); + if (object.unbond != null) { + if (typeof object.unbond !== "object") + throw TypeError(".cosmos.staking.v1beta1.QueryUnbondingDelegationResponse.unbond: object expected"); + message.unbond = $root.cosmos.staking.v1beta1.UnbondingDelegation.fromObject(object.unbond); + } + return message; + }; + + /** + * Creates a plain object from a QueryUnbondingDelegationResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.QueryUnbondingDelegationResponse + * @static + * @param {cosmos.staking.v1beta1.QueryUnbondingDelegationResponse} message QueryUnbondingDelegationResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryUnbondingDelegationResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.unbond = null; + if (message.unbond != null && message.hasOwnProperty("unbond")) + object.unbond = $root.cosmos.staking.v1beta1.UnbondingDelegation.toObject(message.unbond, options); + return object; + }; + + /** + * Converts this QueryUnbondingDelegationResponse to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.QueryUnbondingDelegationResponse + * @instance + * @returns {Object.} JSON object + */ + QueryUnbondingDelegationResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryUnbondingDelegationResponse; + })(v1beta1.QueryUnbondingDelegationResponse || {}); + + v1beta1.QueryDelegatorDelegationsRequest = (function(QueryDelegatorDelegationsRequest) { + + /** + * Properties of a QueryDelegatorDelegationsRequest. + * @memberof cosmos.staking.v1beta1 + * @interface IQueryDelegatorDelegationsRequest + * @property {string|null} [delegatorAddr] QueryDelegatorDelegationsRequest delegatorAddr + * @property {cosmos.base.query.v1beta1.IPageRequest|null} [pagination] QueryDelegatorDelegationsRequest pagination + */ + + /** + * Constructs a new QueryDelegatorDelegationsRequest. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a QueryDelegatorDelegationsRequest. + * @implements IQueryDelegatorDelegationsRequest + * @constructor + * @param {cosmos.staking.v1beta1.IQueryDelegatorDelegationsRequest=} [properties] Properties to set + */ + function QueryDelegatorDelegationsRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryDelegatorDelegationsRequest delegatorAddr. + * @member {string} delegatorAddr + * @memberof cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest + * @instance + */ + QueryDelegatorDelegationsRequest.prototype.delegatorAddr = ""; + + /** + * QueryDelegatorDelegationsRequest pagination. + * @member {cosmos.base.query.v1beta1.IPageRequest|null|undefined} pagination + * @memberof cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest + * @instance + */ + QueryDelegatorDelegationsRequest.prototype.pagination = null; + + /** + * Creates a new QueryDelegatorDelegationsRequest instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest + * @static + * @param {cosmos.staking.v1beta1.IQueryDelegatorDelegationsRequest=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest} QueryDelegatorDelegationsRequest instance + */ + QueryDelegatorDelegationsRequest.create = function create(properties) { + return new QueryDelegatorDelegationsRequest(properties); + }; + + /** + * Encodes the specified QueryDelegatorDelegationsRequest message. Does not implicitly {@link cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest + * @static + * @param {cosmos.staking.v1beta1.IQueryDelegatorDelegationsRequest} message QueryDelegatorDelegationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDelegatorDelegationsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.delegatorAddr != null && Object.hasOwnProperty.call(message, "delegatorAddr")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.delegatorAddr); + if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) + $root.cosmos.base.query.v1beta1.PageRequest.encode(message.pagination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryDelegatorDelegationsRequest message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest + * @static + * @param {cosmos.staking.v1beta1.IQueryDelegatorDelegationsRequest} message QueryDelegatorDelegationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDelegatorDelegationsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryDelegatorDelegationsRequest message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest} QueryDelegatorDelegationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDelegatorDelegationsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.delegatorAddr = reader.string(); + break; + case 2: + message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryDelegatorDelegationsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest} QueryDelegatorDelegationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDelegatorDelegationsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryDelegatorDelegationsRequest message. + * @function verify + * @memberof cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryDelegatorDelegationsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.delegatorAddr != null && message.hasOwnProperty("delegatorAddr")) + if (!$util.isString(message.delegatorAddr)) + return "delegatorAddr: string expected"; + if (message.pagination != null && message.hasOwnProperty("pagination")) { + let error = $root.cosmos.base.query.v1beta1.PageRequest.verify(message.pagination); + if (error) + return "pagination." + error; + } + return null; + }; + + /** + * Creates a QueryDelegatorDelegationsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest} QueryDelegatorDelegationsRequest + */ + QueryDelegatorDelegationsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest) + return object; + let message = new $root.cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest(); + if (object.delegatorAddr != null) + message.delegatorAddr = String(object.delegatorAddr); + if (object.pagination != null) { + if (typeof object.pagination !== "object") + throw TypeError(".cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest.pagination: object expected"); + message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.fromObject(object.pagination); + } + return message; + }; + + /** + * Creates a plain object from a QueryDelegatorDelegationsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest + * @static + * @param {cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest} message QueryDelegatorDelegationsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryDelegatorDelegationsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.delegatorAddr = ""; + object.pagination = null; + } + if (message.delegatorAddr != null && message.hasOwnProperty("delegatorAddr")) + object.delegatorAddr = message.delegatorAddr; + if (message.pagination != null && message.hasOwnProperty("pagination")) + object.pagination = $root.cosmos.base.query.v1beta1.PageRequest.toObject(message.pagination, options); + return object; + }; + + /** + * Converts this QueryDelegatorDelegationsRequest to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest + * @instance + * @returns {Object.} JSON object + */ + QueryDelegatorDelegationsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryDelegatorDelegationsRequest; + })(v1beta1.QueryDelegatorDelegationsRequest || {}); + + v1beta1.QueryDelegatorDelegationsResponse = (function(QueryDelegatorDelegationsResponse) { + + /** + * Properties of a QueryDelegatorDelegationsResponse. + * @memberof cosmos.staking.v1beta1 + * @interface IQueryDelegatorDelegationsResponse + * @property {Array.|null} [delegationResponses] QueryDelegatorDelegationsResponse delegationResponses + * @property {cosmos.base.query.v1beta1.IPageResponse|null} [pagination] QueryDelegatorDelegationsResponse pagination + */ + + /** + * Constructs a new QueryDelegatorDelegationsResponse. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a QueryDelegatorDelegationsResponse. + * @implements IQueryDelegatorDelegationsResponse + * @constructor + * @param {cosmos.staking.v1beta1.IQueryDelegatorDelegationsResponse=} [properties] Properties to set + */ + function QueryDelegatorDelegationsResponse(properties) { + this.delegationResponses = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryDelegatorDelegationsResponse delegationResponses. + * @member {Array.} delegationResponses + * @memberof cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse + * @instance + */ + QueryDelegatorDelegationsResponse.prototype.delegationResponses = $util.emptyArray; + + /** + * QueryDelegatorDelegationsResponse pagination. + * @member {cosmos.base.query.v1beta1.IPageResponse|null|undefined} pagination + * @memberof cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse + * @instance + */ + QueryDelegatorDelegationsResponse.prototype.pagination = null; + + /** + * Creates a new QueryDelegatorDelegationsResponse instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse + * @static + * @param {cosmos.staking.v1beta1.IQueryDelegatorDelegationsResponse=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse} QueryDelegatorDelegationsResponse instance + */ + QueryDelegatorDelegationsResponse.create = function create(properties) { + return new QueryDelegatorDelegationsResponse(properties); + }; + + /** + * Encodes the specified QueryDelegatorDelegationsResponse message. Does not implicitly {@link cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse + * @static + * @param {cosmos.staking.v1beta1.IQueryDelegatorDelegationsResponse} message QueryDelegatorDelegationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDelegatorDelegationsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.delegationResponses != null && message.delegationResponses.length) + for (let i = 0; i < message.delegationResponses.length; ++i) + $root.cosmos.staking.v1beta1.DelegationResponse.encode(message.delegationResponses[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) + $root.cosmos.base.query.v1beta1.PageResponse.encode(message.pagination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryDelegatorDelegationsResponse message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse + * @static + * @param {cosmos.staking.v1beta1.IQueryDelegatorDelegationsResponse} message QueryDelegatorDelegationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDelegatorDelegationsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryDelegatorDelegationsResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse} QueryDelegatorDelegationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDelegatorDelegationsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.delegationResponses && message.delegationResponses.length)) + message.delegationResponses = []; + message.delegationResponses.push($root.cosmos.staking.v1beta1.DelegationResponse.decode(reader, reader.uint32())); + break; + case 2: + message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryDelegatorDelegationsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse} QueryDelegatorDelegationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDelegatorDelegationsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryDelegatorDelegationsResponse message. + * @function verify + * @memberof cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryDelegatorDelegationsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.delegationResponses != null && message.hasOwnProperty("delegationResponses")) { + if (!Array.isArray(message.delegationResponses)) + return "delegationResponses: array expected"; + for (let i = 0; i < message.delegationResponses.length; ++i) { + let error = $root.cosmos.staking.v1beta1.DelegationResponse.verify(message.delegationResponses[i]); + if (error) + return "delegationResponses." + error; + } + } + if (message.pagination != null && message.hasOwnProperty("pagination")) { + let error = $root.cosmos.base.query.v1beta1.PageResponse.verify(message.pagination); + if (error) + return "pagination." + error; + } + return null; + }; + + /** + * Creates a QueryDelegatorDelegationsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse} QueryDelegatorDelegationsResponse + */ + QueryDelegatorDelegationsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse) + return object; + let message = new $root.cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse(); + if (object.delegationResponses) { + if (!Array.isArray(object.delegationResponses)) + throw TypeError(".cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse.delegationResponses: array expected"); + message.delegationResponses = []; + for (let i = 0; i < object.delegationResponses.length; ++i) { + if (typeof object.delegationResponses[i] !== "object") + throw TypeError(".cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse.delegationResponses: object expected"); + message.delegationResponses[i] = $root.cosmos.staking.v1beta1.DelegationResponse.fromObject(object.delegationResponses[i]); + } + } + if (object.pagination != null) { + if (typeof object.pagination !== "object") + throw TypeError(".cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse.pagination: object expected"); + message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.fromObject(object.pagination); + } + return message; + }; + + /** + * Creates a plain object from a QueryDelegatorDelegationsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse + * @static + * @param {cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse} message QueryDelegatorDelegationsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryDelegatorDelegationsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.delegationResponses = []; + if (options.defaults) + object.pagination = null; + if (message.delegationResponses && message.delegationResponses.length) { + object.delegationResponses = []; + for (let j = 0; j < message.delegationResponses.length; ++j) + object.delegationResponses[j] = $root.cosmos.staking.v1beta1.DelegationResponse.toObject(message.delegationResponses[j], options); + } + if (message.pagination != null && message.hasOwnProperty("pagination")) + object.pagination = $root.cosmos.base.query.v1beta1.PageResponse.toObject(message.pagination, options); + return object; + }; + + /** + * Converts this QueryDelegatorDelegationsResponse to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse + * @instance + * @returns {Object.} JSON object + */ + QueryDelegatorDelegationsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryDelegatorDelegationsResponse; + })(v1beta1.QueryDelegatorDelegationsResponse || {}); + + v1beta1.QueryDelegatorUnbondingDelegationsRequest = (function(QueryDelegatorUnbondingDelegationsRequest) { + + /** + * Properties of a QueryDelegatorUnbondingDelegationsRequest. + * @memberof cosmos.staking.v1beta1 + * @interface IQueryDelegatorUnbondingDelegationsRequest + * @property {string|null} [delegatorAddr] QueryDelegatorUnbondingDelegationsRequest delegatorAddr + * @property {cosmos.base.query.v1beta1.IPageRequest|null} [pagination] QueryDelegatorUnbondingDelegationsRequest pagination + */ + + /** + * Constructs a new QueryDelegatorUnbondingDelegationsRequest. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a QueryDelegatorUnbondingDelegationsRequest. + * @implements IQueryDelegatorUnbondingDelegationsRequest + * @constructor + * @param {cosmos.staking.v1beta1.IQueryDelegatorUnbondingDelegationsRequest=} [properties] Properties to set + */ + function QueryDelegatorUnbondingDelegationsRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryDelegatorUnbondingDelegationsRequest delegatorAddr. + * @member {string} delegatorAddr + * @memberof cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest + * @instance + */ + QueryDelegatorUnbondingDelegationsRequest.prototype.delegatorAddr = ""; + + /** + * QueryDelegatorUnbondingDelegationsRequest pagination. + * @member {cosmos.base.query.v1beta1.IPageRequest|null|undefined} pagination + * @memberof cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest + * @instance + */ + QueryDelegatorUnbondingDelegationsRequest.prototype.pagination = null; + + /** + * Creates a new QueryDelegatorUnbondingDelegationsRequest instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest + * @static + * @param {cosmos.staking.v1beta1.IQueryDelegatorUnbondingDelegationsRequest=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest} QueryDelegatorUnbondingDelegationsRequest instance + */ + QueryDelegatorUnbondingDelegationsRequest.create = function create(properties) { + return new QueryDelegatorUnbondingDelegationsRequest(properties); + }; + + /** + * Encodes the specified QueryDelegatorUnbondingDelegationsRequest message. Does not implicitly {@link cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest + * @static + * @param {cosmos.staking.v1beta1.IQueryDelegatorUnbondingDelegationsRequest} message QueryDelegatorUnbondingDelegationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDelegatorUnbondingDelegationsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.delegatorAddr != null && Object.hasOwnProperty.call(message, "delegatorAddr")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.delegatorAddr); + if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) + $root.cosmos.base.query.v1beta1.PageRequest.encode(message.pagination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryDelegatorUnbondingDelegationsRequest message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest + * @static + * @param {cosmos.staking.v1beta1.IQueryDelegatorUnbondingDelegationsRequest} message QueryDelegatorUnbondingDelegationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDelegatorUnbondingDelegationsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryDelegatorUnbondingDelegationsRequest message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest} QueryDelegatorUnbondingDelegationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDelegatorUnbondingDelegationsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.delegatorAddr = reader.string(); + break; + case 2: + message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryDelegatorUnbondingDelegationsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest} QueryDelegatorUnbondingDelegationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDelegatorUnbondingDelegationsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryDelegatorUnbondingDelegationsRequest message. + * @function verify + * @memberof cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryDelegatorUnbondingDelegationsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.delegatorAddr != null && message.hasOwnProperty("delegatorAddr")) + if (!$util.isString(message.delegatorAddr)) + return "delegatorAddr: string expected"; + if (message.pagination != null && message.hasOwnProperty("pagination")) { + let error = $root.cosmos.base.query.v1beta1.PageRequest.verify(message.pagination); + if (error) + return "pagination." + error; + } + return null; + }; + + /** + * Creates a QueryDelegatorUnbondingDelegationsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest} QueryDelegatorUnbondingDelegationsRequest + */ + QueryDelegatorUnbondingDelegationsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest) + return object; + let message = new $root.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest(); + if (object.delegatorAddr != null) + message.delegatorAddr = String(object.delegatorAddr); + if (object.pagination != null) { + if (typeof object.pagination !== "object") + throw TypeError(".cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest.pagination: object expected"); + message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.fromObject(object.pagination); + } + return message; + }; + + /** + * Creates a plain object from a QueryDelegatorUnbondingDelegationsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest + * @static + * @param {cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest} message QueryDelegatorUnbondingDelegationsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryDelegatorUnbondingDelegationsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.delegatorAddr = ""; + object.pagination = null; + } + if (message.delegatorAddr != null && message.hasOwnProperty("delegatorAddr")) + object.delegatorAddr = message.delegatorAddr; + if (message.pagination != null && message.hasOwnProperty("pagination")) + object.pagination = $root.cosmos.base.query.v1beta1.PageRequest.toObject(message.pagination, options); + return object; + }; + + /** + * Converts this QueryDelegatorUnbondingDelegationsRequest to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest + * @instance + * @returns {Object.} JSON object + */ + QueryDelegatorUnbondingDelegationsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryDelegatorUnbondingDelegationsRequest; + })(v1beta1.QueryDelegatorUnbondingDelegationsRequest || {}); + + v1beta1.QueryDelegatorUnbondingDelegationsResponse = (function(QueryDelegatorUnbondingDelegationsResponse) { + + /** + * Properties of a QueryDelegatorUnbondingDelegationsResponse. + * @memberof cosmos.staking.v1beta1 + * @interface IQueryDelegatorUnbondingDelegationsResponse + * @property {Array.|null} [unbondingResponses] QueryDelegatorUnbondingDelegationsResponse unbondingResponses + * @property {cosmos.base.query.v1beta1.IPageResponse|null} [pagination] QueryDelegatorUnbondingDelegationsResponse pagination + */ + + /** + * Constructs a new QueryDelegatorUnbondingDelegationsResponse. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a QueryDelegatorUnbondingDelegationsResponse. + * @implements IQueryDelegatorUnbondingDelegationsResponse + * @constructor + * @param {cosmos.staking.v1beta1.IQueryDelegatorUnbondingDelegationsResponse=} [properties] Properties to set + */ + function QueryDelegatorUnbondingDelegationsResponse(properties) { + this.unbondingResponses = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryDelegatorUnbondingDelegationsResponse unbondingResponses. + * @member {Array.} unbondingResponses + * @memberof cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse + * @instance + */ + QueryDelegatorUnbondingDelegationsResponse.prototype.unbondingResponses = $util.emptyArray; + + /** + * QueryDelegatorUnbondingDelegationsResponse pagination. + * @member {cosmos.base.query.v1beta1.IPageResponse|null|undefined} pagination + * @memberof cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse + * @instance + */ + QueryDelegatorUnbondingDelegationsResponse.prototype.pagination = null; + + /** + * Creates a new QueryDelegatorUnbondingDelegationsResponse instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse + * @static + * @param {cosmos.staking.v1beta1.IQueryDelegatorUnbondingDelegationsResponse=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse} QueryDelegatorUnbondingDelegationsResponse instance + */ + QueryDelegatorUnbondingDelegationsResponse.create = function create(properties) { + return new QueryDelegatorUnbondingDelegationsResponse(properties); + }; + + /** + * Encodes the specified QueryDelegatorUnbondingDelegationsResponse message. Does not implicitly {@link cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse + * @static + * @param {cosmos.staking.v1beta1.IQueryDelegatorUnbondingDelegationsResponse} message QueryDelegatorUnbondingDelegationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDelegatorUnbondingDelegationsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.unbondingResponses != null && message.unbondingResponses.length) + for (let i = 0; i < message.unbondingResponses.length; ++i) + $root.cosmos.staking.v1beta1.UnbondingDelegation.encode(message.unbondingResponses[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) + $root.cosmos.base.query.v1beta1.PageResponse.encode(message.pagination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryDelegatorUnbondingDelegationsResponse message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse + * @static + * @param {cosmos.staking.v1beta1.IQueryDelegatorUnbondingDelegationsResponse} message QueryDelegatorUnbondingDelegationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDelegatorUnbondingDelegationsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryDelegatorUnbondingDelegationsResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse} QueryDelegatorUnbondingDelegationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDelegatorUnbondingDelegationsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.unbondingResponses && message.unbondingResponses.length)) + message.unbondingResponses = []; + message.unbondingResponses.push($root.cosmos.staking.v1beta1.UnbondingDelegation.decode(reader, reader.uint32())); + break; + case 2: + message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryDelegatorUnbondingDelegationsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse} QueryDelegatorUnbondingDelegationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDelegatorUnbondingDelegationsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryDelegatorUnbondingDelegationsResponse message. + * @function verify + * @memberof cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryDelegatorUnbondingDelegationsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.unbondingResponses != null && message.hasOwnProperty("unbondingResponses")) { + if (!Array.isArray(message.unbondingResponses)) + return "unbondingResponses: array expected"; + for (let i = 0; i < message.unbondingResponses.length; ++i) { + let error = $root.cosmos.staking.v1beta1.UnbondingDelegation.verify(message.unbondingResponses[i]); + if (error) + return "unbondingResponses." + error; + } + } + if (message.pagination != null && message.hasOwnProperty("pagination")) { + let error = $root.cosmos.base.query.v1beta1.PageResponse.verify(message.pagination); + if (error) + return "pagination." + error; + } + return null; + }; + + /** + * Creates a QueryDelegatorUnbondingDelegationsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse} QueryDelegatorUnbondingDelegationsResponse + */ + QueryDelegatorUnbondingDelegationsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse) + return object; + let message = new $root.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse(); + if (object.unbondingResponses) { + if (!Array.isArray(object.unbondingResponses)) + throw TypeError(".cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse.unbondingResponses: array expected"); + message.unbondingResponses = []; + for (let i = 0; i < object.unbondingResponses.length; ++i) { + if (typeof object.unbondingResponses[i] !== "object") + throw TypeError(".cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse.unbondingResponses: object expected"); + message.unbondingResponses[i] = $root.cosmos.staking.v1beta1.UnbondingDelegation.fromObject(object.unbondingResponses[i]); + } + } + if (object.pagination != null) { + if (typeof object.pagination !== "object") + throw TypeError(".cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse.pagination: object expected"); + message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.fromObject(object.pagination); + } + return message; + }; + + /** + * Creates a plain object from a QueryDelegatorUnbondingDelegationsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse + * @static + * @param {cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse} message QueryDelegatorUnbondingDelegationsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryDelegatorUnbondingDelegationsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.unbondingResponses = []; + if (options.defaults) + object.pagination = null; + if (message.unbondingResponses && message.unbondingResponses.length) { + object.unbondingResponses = []; + for (let j = 0; j < message.unbondingResponses.length; ++j) + object.unbondingResponses[j] = $root.cosmos.staking.v1beta1.UnbondingDelegation.toObject(message.unbondingResponses[j], options); + } + if (message.pagination != null && message.hasOwnProperty("pagination")) + object.pagination = $root.cosmos.base.query.v1beta1.PageResponse.toObject(message.pagination, options); + return object; + }; + + /** + * Converts this QueryDelegatorUnbondingDelegationsResponse to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse + * @instance + * @returns {Object.} JSON object + */ + QueryDelegatorUnbondingDelegationsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryDelegatorUnbondingDelegationsResponse; + })(v1beta1.QueryDelegatorUnbondingDelegationsResponse || {}); + + v1beta1.QueryRedelegationsRequest = (function(QueryRedelegationsRequest) { + + /** + * Properties of a QueryRedelegationsRequest. + * @memberof cosmos.staking.v1beta1 + * @interface IQueryRedelegationsRequest + * @property {string|null} [delegatorAddr] QueryRedelegationsRequest delegatorAddr + * @property {string|null} [srcValidatorAddr] QueryRedelegationsRequest srcValidatorAddr + * @property {string|null} [dstValidatorAddr] QueryRedelegationsRequest dstValidatorAddr + * @property {cosmos.base.query.v1beta1.IPageRequest|null} [pagination] QueryRedelegationsRequest pagination + */ + + /** + * Constructs a new QueryRedelegationsRequest. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a QueryRedelegationsRequest. + * @implements IQueryRedelegationsRequest + * @constructor + * @param {cosmos.staking.v1beta1.IQueryRedelegationsRequest=} [properties] Properties to set + */ + function QueryRedelegationsRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryRedelegationsRequest delegatorAddr. + * @member {string} delegatorAddr + * @memberof cosmos.staking.v1beta1.QueryRedelegationsRequest + * @instance + */ + QueryRedelegationsRequest.prototype.delegatorAddr = ""; + + /** + * QueryRedelegationsRequest srcValidatorAddr. + * @member {string} srcValidatorAddr + * @memberof cosmos.staking.v1beta1.QueryRedelegationsRequest + * @instance + */ + QueryRedelegationsRequest.prototype.srcValidatorAddr = ""; + + /** + * QueryRedelegationsRequest dstValidatorAddr. + * @member {string} dstValidatorAddr + * @memberof cosmos.staking.v1beta1.QueryRedelegationsRequest + * @instance + */ + QueryRedelegationsRequest.prototype.dstValidatorAddr = ""; + + /** + * QueryRedelegationsRequest pagination. + * @member {cosmos.base.query.v1beta1.IPageRequest|null|undefined} pagination + * @memberof cosmos.staking.v1beta1.QueryRedelegationsRequest + * @instance + */ + QueryRedelegationsRequest.prototype.pagination = null; + + /** + * Creates a new QueryRedelegationsRequest instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.QueryRedelegationsRequest + * @static + * @param {cosmos.staking.v1beta1.IQueryRedelegationsRequest=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.QueryRedelegationsRequest} QueryRedelegationsRequest instance + */ + QueryRedelegationsRequest.create = function create(properties) { + return new QueryRedelegationsRequest(properties); + }; + + /** + * Encodes the specified QueryRedelegationsRequest message. Does not implicitly {@link cosmos.staking.v1beta1.QueryRedelegationsRequest.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.QueryRedelegationsRequest + * @static + * @param {cosmos.staking.v1beta1.IQueryRedelegationsRequest} message QueryRedelegationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryRedelegationsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.delegatorAddr != null && Object.hasOwnProperty.call(message, "delegatorAddr")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.delegatorAddr); + if (message.srcValidatorAddr != null && Object.hasOwnProperty.call(message, "srcValidatorAddr")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.srcValidatorAddr); + if (message.dstValidatorAddr != null && Object.hasOwnProperty.call(message, "dstValidatorAddr")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.dstValidatorAddr); + if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) + $root.cosmos.base.query.v1beta1.PageRequest.encode(message.pagination, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryRedelegationsRequest message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.QueryRedelegationsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.QueryRedelegationsRequest + * @static + * @param {cosmos.staking.v1beta1.IQueryRedelegationsRequest} message QueryRedelegationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryRedelegationsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryRedelegationsRequest message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.QueryRedelegationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.QueryRedelegationsRequest} QueryRedelegationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryRedelegationsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.QueryRedelegationsRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.delegatorAddr = reader.string(); + break; + case 2: + message.srcValidatorAddr = reader.string(); + break; + case 3: + message.dstValidatorAddr = reader.string(); + break; + case 4: + message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryRedelegationsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.QueryRedelegationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.QueryRedelegationsRequest} QueryRedelegationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryRedelegationsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryRedelegationsRequest message. + * @function verify + * @memberof cosmos.staking.v1beta1.QueryRedelegationsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryRedelegationsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.delegatorAddr != null && message.hasOwnProperty("delegatorAddr")) + if (!$util.isString(message.delegatorAddr)) + return "delegatorAddr: string expected"; + if (message.srcValidatorAddr != null && message.hasOwnProperty("srcValidatorAddr")) + if (!$util.isString(message.srcValidatorAddr)) + return "srcValidatorAddr: string expected"; + if (message.dstValidatorAddr != null && message.hasOwnProperty("dstValidatorAddr")) + if (!$util.isString(message.dstValidatorAddr)) + return "dstValidatorAddr: string expected"; + if (message.pagination != null && message.hasOwnProperty("pagination")) { + let error = $root.cosmos.base.query.v1beta1.PageRequest.verify(message.pagination); + if (error) + return "pagination." + error; + } + return null; + }; + + /** + * Creates a QueryRedelegationsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.QueryRedelegationsRequest + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.QueryRedelegationsRequest} QueryRedelegationsRequest + */ + QueryRedelegationsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.QueryRedelegationsRequest) + return object; + let message = new $root.cosmos.staking.v1beta1.QueryRedelegationsRequest(); + if (object.delegatorAddr != null) + message.delegatorAddr = String(object.delegatorAddr); + if (object.srcValidatorAddr != null) + message.srcValidatorAddr = String(object.srcValidatorAddr); + if (object.dstValidatorAddr != null) + message.dstValidatorAddr = String(object.dstValidatorAddr); + if (object.pagination != null) { + if (typeof object.pagination !== "object") + throw TypeError(".cosmos.staking.v1beta1.QueryRedelegationsRequest.pagination: object expected"); + message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.fromObject(object.pagination); + } + return message; + }; + + /** + * Creates a plain object from a QueryRedelegationsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.QueryRedelegationsRequest + * @static + * @param {cosmos.staking.v1beta1.QueryRedelegationsRequest} message QueryRedelegationsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryRedelegationsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.delegatorAddr = ""; + object.srcValidatorAddr = ""; + object.dstValidatorAddr = ""; + object.pagination = null; + } + if (message.delegatorAddr != null && message.hasOwnProperty("delegatorAddr")) + object.delegatorAddr = message.delegatorAddr; + if (message.srcValidatorAddr != null && message.hasOwnProperty("srcValidatorAddr")) + object.srcValidatorAddr = message.srcValidatorAddr; + if (message.dstValidatorAddr != null && message.hasOwnProperty("dstValidatorAddr")) + object.dstValidatorAddr = message.dstValidatorAddr; + if (message.pagination != null && message.hasOwnProperty("pagination")) + object.pagination = $root.cosmos.base.query.v1beta1.PageRequest.toObject(message.pagination, options); + return object; + }; + + /** + * Converts this QueryRedelegationsRequest to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.QueryRedelegationsRequest + * @instance + * @returns {Object.} JSON object + */ + QueryRedelegationsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryRedelegationsRequest; + })(v1beta1.QueryRedelegationsRequest || {}); + + v1beta1.QueryRedelegationsResponse = (function(QueryRedelegationsResponse) { + + /** + * Properties of a QueryRedelegationsResponse. + * @memberof cosmos.staking.v1beta1 + * @interface IQueryRedelegationsResponse + * @property {Array.|null} [redelegationResponses] QueryRedelegationsResponse redelegationResponses + * @property {cosmos.base.query.v1beta1.IPageResponse|null} [pagination] QueryRedelegationsResponse pagination + */ + + /** + * Constructs a new QueryRedelegationsResponse. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a QueryRedelegationsResponse. + * @implements IQueryRedelegationsResponse + * @constructor + * @param {cosmos.staking.v1beta1.IQueryRedelegationsResponse=} [properties] Properties to set + */ + function QueryRedelegationsResponse(properties) { + this.redelegationResponses = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryRedelegationsResponse redelegationResponses. + * @member {Array.} redelegationResponses + * @memberof cosmos.staking.v1beta1.QueryRedelegationsResponse + * @instance + */ + QueryRedelegationsResponse.prototype.redelegationResponses = $util.emptyArray; + + /** + * QueryRedelegationsResponse pagination. + * @member {cosmos.base.query.v1beta1.IPageResponse|null|undefined} pagination + * @memberof cosmos.staking.v1beta1.QueryRedelegationsResponse + * @instance + */ + QueryRedelegationsResponse.prototype.pagination = null; + + /** + * Creates a new QueryRedelegationsResponse instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.QueryRedelegationsResponse + * @static + * @param {cosmos.staking.v1beta1.IQueryRedelegationsResponse=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.QueryRedelegationsResponse} QueryRedelegationsResponse instance + */ + QueryRedelegationsResponse.create = function create(properties) { + return new QueryRedelegationsResponse(properties); + }; + + /** + * Encodes the specified QueryRedelegationsResponse message. Does not implicitly {@link cosmos.staking.v1beta1.QueryRedelegationsResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.QueryRedelegationsResponse + * @static + * @param {cosmos.staking.v1beta1.IQueryRedelegationsResponse} message QueryRedelegationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryRedelegationsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.redelegationResponses != null && message.redelegationResponses.length) + for (let i = 0; i < message.redelegationResponses.length; ++i) + $root.cosmos.staking.v1beta1.RedelegationResponse.encode(message.redelegationResponses[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) + $root.cosmos.base.query.v1beta1.PageResponse.encode(message.pagination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryRedelegationsResponse message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.QueryRedelegationsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.QueryRedelegationsResponse + * @static + * @param {cosmos.staking.v1beta1.IQueryRedelegationsResponse} message QueryRedelegationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryRedelegationsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryRedelegationsResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.QueryRedelegationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.QueryRedelegationsResponse} QueryRedelegationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryRedelegationsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.QueryRedelegationsResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.redelegationResponses && message.redelegationResponses.length)) + message.redelegationResponses = []; + message.redelegationResponses.push($root.cosmos.staking.v1beta1.RedelegationResponse.decode(reader, reader.uint32())); + break; + case 2: + message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryRedelegationsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.QueryRedelegationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.QueryRedelegationsResponse} QueryRedelegationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryRedelegationsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryRedelegationsResponse message. + * @function verify + * @memberof cosmos.staking.v1beta1.QueryRedelegationsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryRedelegationsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.redelegationResponses != null && message.hasOwnProperty("redelegationResponses")) { + if (!Array.isArray(message.redelegationResponses)) + return "redelegationResponses: array expected"; + for (let i = 0; i < message.redelegationResponses.length; ++i) { + let error = $root.cosmos.staking.v1beta1.RedelegationResponse.verify(message.redelegationResponses[i]); + if (error) + return "redelegationResponses." + error; + } + } + if (message.pagination != null && message.hasOwnProperty("pagination")) { + let error = $root.cosmos.base.query.v1beta1.PageResponse.verify(message.pagination); + if (error) + return "pagination." + error; + } + return null; + }; + + /** + * Creates a QueryRedelegationsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.QueryRedelegationsResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.QueryRedelegationsResponse} QueryRedelegationsResponse + */ + QueryRedelegationsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.QueryRedelegationsResponse) + return object; + let message = new $root.cosmos.staking.v1beta1.QueryRedelegationsResponse(); + if (object.redelegationResponses) { + if (!Array.isArray(object.redelegationResponses)) + throw TypeError(".cosmos.staking.v1beta1.QueryRedelegationsResponse.redelegationResponses: array expected"); + message.redelegationResponses = []; + for (let i = 0; i < object.redelegationResponses.length; ++i) { + if (typeof object.redelegationResponses[i] !== "object") + throw TypeError(".cosmos.staking.v1beta1.QueryRedelegationsResponse.redelegationResponses: object expected"); + message.redelegationResponses[i] = $root.cosmos.staking.v1beta1.RedelegationResponse.fromObject(object.redelegationResponses[i]); + } + } + if (object.pagination != null) { + if (typeof object.pagination !== "object") + throw TypeError(".cosmos.staking.v1beta1.QueryRedelegationsResponse.pagination: object expected"); + message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.fromObject(object.pagination); + } + return message; + }; + + /** + * Creates a plain object from a QueryRedelegationsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.QueryRedelegationsResponse + * @static + * @param {cosmos.staking.v1beta1.QueryRedelegationsResponse} message QueryRedelegationsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryRedelegationsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.redelegationResponses = []; + if (options.defaults) + object.pagination = null; + if (message.redelegationResponses && message.redelegationResponses.length) { + object.redelegationResponses = []; + for (let j = 0; j < message.redelegationResponses.length; ++j) + object.redelegationResponses[j] = $root.cosmos.staking.v1beta1.RedelegationResponse.toObject(message.redelegationResponses[j], options); + } + if (message.pagination != null && message.hasOwnProperty("pagination")) + object.pagination = $root.cosmos.base.query.v1beta1.PageResponse.toObject(message.pagination, options); + return object; + }; + + /** + * Converts this QueryRedelegationsResponse to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.QueryRedelegationsResponse + * @instance + * @returns {Object.} JSON object + */ + QueryRedelegationsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryRedelegationsResponse; + })(v1beta1.QueryRedelegationsResponse || {}); + + v1beta1.QueryDelegatorValidatorsRequest = (function(QueryDelegatorValidatorsRequest) { + + /** + * Properties of a QueryDelegatorValidatorsRequest. + * @memberof cosmos.staking.v1beta1 + * @interface IQueryDelegatorValidatorsRequest + * @property {string|null} [delegatorAddr] QueryDelegatorValidatorsRequest delegatorAddr + * @property {cosmos.base.query.v1beta1.IPageRequest|null} [pagination] QueryDelegatorValidatorsRequest pagination + */ + + /** + * Constructs a new QueryDelegatorValidatorsRequest. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a QueryDelegatorValidatorsRequest. + * @implements IQueryDelegatorValidatorsRequest + * @constructor + * @param {cosmos.staking.v1beta1.IQueryDelegatorValidatorsRequest=} [properties] Properties to set + */ + function QueryDelegatorValidatorsRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryDelegatorValidatorsRequest delegatorAddr. + * @member {string} delegatorAddr + * @memberof cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest + * @instance + */ + QueryDelegatorValidatorsRequest.prototype.delegatorAddr = ""; + + /** + * QueryDelegatorValidatorsRequest pagination. + * @member {cosmos.base.query.v1beta1.IPageRequest|null|undefined} pagination + * @memberof cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest + * @instance + */ + QueryDelegatorValidatorsRequest.prototype.pagination = null; + + /** + * Creates a new QueryDelegatorValidatorsRequest instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest + * @static + * @param {cosmos.staking.v1beta1.IQueryDelegatorValidatorsRequest=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest} QueryDelegatorValidatorsRequest instance + */ + QueryDelegatorValidatorsRequest.create = function create(properties) { + return new QueryDelegatorValidatorsRequest(properties); + }; + + /** + * Encodes the specified QueryDelegatorValidatorsRequest message. Does not implicitly {@link cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest + * @static + * @param {cosmos.staking.v1beta1.IQueryDelegatorValidatorsRequest} message QueryDelegatorValidatorsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDelegatorValidatorsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.delegatorAddr != null && Object.hasOwnProperty.call(message, "delegatorAddr")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.delegatorAddr); + if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) + $root.cosmos.base.query.v1beta1.PageRequest.encode(message.pagination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryDelegatorValidatorsRequest message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest + * @static + * @param {cosmos.staking.v1beta1.IQueryDelegatorValidatorsRequest} message QueryDelegatorValidatorsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDelegatorValidatorsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryDelegatorValidatorsRequest message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest} QueryDelegatorValidatorsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDelegatorValidatorsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.delegatorAddr = reader.string(); + break; + case 2: + message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryDelegatorValidatorsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest} QueryDelegatorValidatorsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDelegatorValidatorsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryDelegatorValidatorsRequest message. + * @function verify + * @memberof cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryDelegatorValidatorsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.delegatorAddr != null && message.hasOwnProperty("delegatorAddr")) + if (!$util.isString(message.delegatorAddr)) + return "delegatorAddr: string expected"; + if (message.pagination != null && message.hasOwnProperty("pagination")) { + let error = $root.cosmos.base.query.v1beta1.PageRequest.verify(message.pagination); + if (error) + return "pagination." + error; + } + return null; + }; + + /** + * Creates a QueryDelegatorValidatorsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest} QueryDelegatorValidatorsRequest + */ + QueryDelegatorValidatorsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest) + return object; + let message = new $root.cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest(); + if (object.delegatorAddr != null) + message.delegatorAddr = String(object.delegatorAddr); + if (object.pagination != null) { + if (typeof object.pagination !== "object") + throw TypeError(".cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest.pagination: object expected"); + message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.fromObject(object.pagination); + } + return message; + }; + + /** + * Creates a plain object from a QueryDelegatorValidatorsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest + * @static + * @param {cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest} message QueryDelegatorValidatorsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryDelegatorValidatorsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.delegatorAddr = ""; + object.pagination = null; + } + if (message.delegatorAddr != null && message.hasOwnProperty("delegatorAddr")) + object.delegatorAddr = message.delegatorAddr; + if (message.pagination != null && message.hasOwnProperty("pagination")) + object.pagination = $root.cosmos.base.query.v1beta1.PageRequest.toObject(message.pagination, options); + return object; + }; + + /** + * Converts this QueryDelegatorValidatorsRequest to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest + * @instance + * @returns {Object.} JSON object + */ + QueryDelegatorValidatorsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryDelegatorValidatorsRequest; + })(v1beta1.QueryDelegatorValidatorsRequest || {}); + + v1beta1.QueryDelegatorValidatorsResponse = (function(QueryDelegatorValidatorsResponse) { + + /** + * Properties of a QueryDelegatorValidatorsResponse. + * @memberof cosmos.staking.v1beta1 + * @interface IQueryDelegatorValidatorsResponse + * @property {Array.|null} [validators] QueryDelegatorValidatorsResponse validators + * @property {cosmos.base.query.v1beta1.IPageResponse|null} [pagination] QueryDelegatorValidatorsResponse pagination + */ + + /** + * Constructs a new QueryDelegatorValidatorsResponse. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a QueryDelegatorValidatorsResponse. + * @implements IQueryDelegatorValidatorsResponse + * @constructor + * @param {cosmos.staking.v1beta1.IQueryDelegatorValidatorsResponse=} [properties] Properties to set + */ + function QueryDelegatorValidatorsResponse(properties) { + this.validators = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryDelegatorValidatorsResponse validators. + * @member {Array.} validators + * @memberof cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse + * @instance + */ + QueryDelegatorValidatorsResponse.prototype.validators = $util.emptyArray; + + /** + * QueryDelegatorValidatorsResponse pagination. + * @member {cosmos.base.query.v1beta1.IPageResponse|null|undefined} pagination + * @memberof cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse + * @instance + */ + QueryDelegatorValidatorsResponse.prototype.pagination = null; + + /** + * Creates a new QueryDelegatorValidatorsResponse instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse + * @static + * @param {cosmos.staking.v1beta1.IQueryDelegatorValidatorsResponse=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse} QueryDelegatorValidatorsResponse instance + */ + QueryDelegatorValidatorsResponse.create = function create(properties) { + return new QueryDelegatorValidatorsResponse(properties); + }; + + /** + * Encodes the specified QueryDelegatorValidatorsResponse message. Does not implicitly {@link cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse + * @static + * @param {cosmos.staking.v1beta1.IQueryDelegatorValidatorsResponse} message QueryDelegatorValidatorsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDelegatorValidatorsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.validators != null && message.validators.length) + for (let i = 0; i < message.validators.length; ++i) + $root.cosmos.staking.v1beta1.Validator.encode(message.validators[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) + $root.cosmos.base.query.v1beta1.PageResponse.encode(message.pagination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryDelegatorValidatorsResponse message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse + * @static + * @param {cosmos.staking.v1beta1.IQueryDelegatorValidatorsResponse} message QueryDelegatorValidatorsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDelegatorValidatorsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryDelegatorValidatorsResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse} QueryDelegatorValidatorsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDelegatorValidatorsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.validators && message.validators.length)) + message.validators = []; + message.validators.push($root.cosmos.staking.v1beta1.Validator.decode(reader, reader.uint32())); + break; + case 2: + message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryDelegatorValidatorsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse} QueryDelegatorValidatorsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDelegatorValidatorsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryDelegatorValidatorsResponse message. + * @function verify + * @memberof cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryDelegatorValidatorsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.validators != null && message.hasOwnProperty("validators")) { + if (!Array.isArray(message.validators)) + return "validators: array expected"; + for (let i = 0; i < message.validators.length; ++i) { + let error = $root.cosmos.staking.v1beta1.Validator.verify(message.validators[i]); + if (error) + return "validators." + error; + } + } + if (message.pagination != null && message.hasOwnProperty("pagination")) { + let error = $root.cosmos.base.query.v1beta1.PageResponse.verify(message.pagination); + if (error) + return "pagination." + error; + } + return null; + }; + + /** + * Creates a QueryDelegatorValidatorsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse} QueryDelegatorValidatorsResponse + */ + QueryDelegatorValidatorsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse) + return object; + let message = new $root.cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse(); + if (object.validators) { + if (!Array.isArray(object.validators)) + throw TypeError(".cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse.validators: array expected"); + message.validators = []; + for (let i = 0; i < object.validators.length; ++i) { + if (typeof object.validators[i] !== "object") + throw TypeError(".cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse.validators: object expected"); + message.validators[i] = $root.cosmos.staking.v1beta1.Validator.fromObject(object.validators[i]); + } + } + if (object.pagination != null) { + if (typeof object.pagination !== "object") + throw TypeError(".cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse.pagination: object expected"); + message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.fromObject(object.pagination); + } + return message; + }; + + /** + * Creates a plain object from a QueryDelegatorValidatorsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse + * @static + * @param {cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse} message QueryDelegatorValidatorsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryDelegatorValidatorsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.validators = []; + if (options.defaults) + object.pagination = null; + if (message.validators && message.validators.length) { + object.validators = []; + for (let j = 0; j < message.validators.length; ++j) + object.validators[j] = $root.cosmos.staking.v1beta1.Validator.toObject(message.validators[j], options); + } + if (message.pagination != null && message.hasOwnProperty("pagination")) + object.pagination = $root.cosmos.base.query.v1beta1.PageResponse.toObject(message.pagination, options); + return object; + }; + + /** + * Converts this QueryDelegatorValidatorsResponse to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse + * @instance + * @returns {Object.} JSON object + */ + QueryDelegatorValidatorsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryDelegatorValidatorsResponse; + })(v1beta1.QueryDelegatorValidatorsResponse || {}); + + v1beta1.QueryDelegatorValidatorRequest = (function(QueryDelegatorValidatorRequest) { + + /** + * Properties of a QueryDelegatorValidatorRequest. + * @memberof cosmos.staking.v1beta1 + * @interface IQueryDelegatorValidatorRequest + * @property {string|null} [delegatorAddr] QueryDelegatorValidatorRequest delegatorAddr + * @property {string|null} [validatorAddr] QueryDelegatorValidatorRequest validatorAddr + */ + + /** + * Constructs a new QueryDelegatorValidatorRequest. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a QueryDelegatorValidatorRequest. + * @implements IQueryDelegatorValidatorRequest + * @constructor + * @param {cosmos.staking.v1beta1.IQueryDelegatorValidatorRequest=} [properties] Properties to set + */ + function QueryDelegatorValidatorRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryDelegatorValidatorRequest delegatorAddr. + * @member {string} delegatorAddr + * @memberof cosmos.staking.v1beta1.QueryDelegatorValidatorRequest + * @instance + */ + QueryDelegatorValidatorRequest.prototype.delegatorAddr = ""; + + /** + * QueryDelegatorValidatorRequest validatorAddr. + * @member {string} validatorAddr + * @memberof cosmos.staking.v1beta1.QueryDelegatorValidatorRequest + * @instance + */ + QueryDelegatorValidatorRequest.prototype.validatorAddr = ""; + + /** + * Creates a new QueryDelegatorValidatorRequest instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.QueryDelegatorValidatorRequest + * @static + * @param {cosmos.staking.v1beta1.IQueryDelegatorValidatorRequest=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.QueryDelegatorValidatorRequest} QueryDelegatorValidatorRequest instance + */ + QueryDelegatorValidatorRequest.create = function create(properties) { + return new QueryDelegatorValidatorRequest(properties); + }; + + /** + * Encodes the specified QueryDelegatorValidatorRequest message. Does not implicitly {@link cosmos.staking.v1beta1.QueryDelegatorValidatorRequest.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.QueryDelegatorValidatorRequest + * @static + * @param {cosmos.staking.v1beta1.IQueryDelegatorValidatorRequest} message QueryDelegatorValidatorRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDelegatorValidatorRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.delegatorAddr != null && Object.hasOwnProperty.call(message, "delegatorAddr")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.delegatorAddr); + if (message.validatorAddr != null && Object.hasOwnProperty.call(message, "validatorAddr")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.validatorAddr); + return writer; + }; + + /** + * Encodes the specified QueryDelegatorValidatorRequest message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.QueryDelegatorValidatorRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.QueryDelegatorValidatorRequest + * @static + * @param {cosmos.staking.v1beta1.IQueryDelegatorValidatorRequest} message QueryDelegatorValidatorRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDelegatorValidatorRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryDelegatorValidatorRequest message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.QueryDelegatorValidatorRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.QueryDelegatorValidatorRequest} QueryDelegatorValidatorRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDelegatorValidatorRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.QueryDelegatorValidatorRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.delegatorAddr = reader.string(); + break; + case 2: + message.validatorAddr = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryDelegatorValidatorRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.QueryDelegatorValidatorRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.QueryDelegatorValidatorRequest} QueryDelegatorValidatorRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDelegatorValidatorRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryDelegatorValidatorRequest message. + * @function verify + * @memberof cosmos.staking.v1beta1.QueryDelegatorValidatorRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryDelegatorValidatorRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.delegatorAddr != null && message.hasOwnProperty("delegatorAddr")) + if (!$util.isString(message.delegatorAddr)) + return "delegatorAddr: string expected"; + if (message.validatorAddr != null && message.hasOwnProperty("validatorAddr")) + if (!$util.isString(message.validatorAddr)) + return "validatorAddr: string expected"; + return null; + }; + + /** + * Creates a QueryDelegatorValidatorRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.QueryDelegatorValidatorRequest + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.QueryDelegatorValidatorRequest} QueryDelegatorValidatorRequest + */ + QueryDelegatorValidatorRequest.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.QueryDelegatorValidatorRequest) + return object; + let message = new $root.cosmos.staking.v1beta1.QueryDelegatorValidatorRequest(); + if (object.delegatorAddr != null) + message.delegatorAddr = String(object.delegatorAddr); + if (object.validatorAddr != null) + message.validatorAddr = String(object.validatorAddr); + return message; + }; + + /** + * Creates a plain object from a QueryDelegatorValidatorRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.QueryDelegatorValidatorRequest + * @static + * @param {cosmos.staking.v1beta1.QueryDelegatorValidatorRequest} message QueryDelegatorValidatorRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryDelegatorValidatorRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.delegatorAddr = ""; + object.validatorAddr = ""; + } + if (message.delegatorAddr != null && message.hasOwnProperty("delegatorAddr")) + object.delegatorAddr = message.delegatorAddr; + if (message.validatorAddr != null && message.hasOwnProperty("validatorAddr")) + object.validatorAddr = message.validatorAddr; + return object; + }; + + /** + * Converts this QueryDelegatorValidatorRequest to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.QueryDelegatorValidatorRequest + * @instance + * @returns {Object.} JSON object + */ + QueryDelegatorValidatorRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryDelegatorValidatorRequest; + })(v1beta1.QueryDelegatorValidatorRequest || {}); + + v1beta1.QueryDelegatorValidatorResponse = (function(QueryDelegatorValidatorResponse) { + + /** + * Properties of a QueryDelegatorValidatorResponse. + * @memberof cosmos.staking.v1beta1 + * @interface IQueryDelegatorValidatorResponse + * @property {cosmos.staking.v1beta1.IValidator|null} [validator] QueryDelegatorValidatorResponse validator + */ + + /** + * Constructs a new QueryDelegatorValidatorResponse. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a QueryDelegatorValidatorResponse. + * @implements IQueryDelegatorValidatorResponse + * @constructor + * @param {cosmos.staking.v1beta1.IQueryDelegatorValidatorResponse=} [properties] Properties to set + */ + function QueryDelegatorValidatorResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryDelegatorValidatorResponse validator. + * @member {cosmos.staking.v1beta1.IValidator|null|undefined} validator + * @memberof cosmos.staking.v1beta1.QueryDelegatorValidatorResponse + * @instance + */ + QueryDelegatorValidatorResponse.prototype.validator = null; + + /** + * Creates a new QueryDelegatorValidatorResponse instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.QueryDelegatorValidatorResponse + * @static + * @param {cosmos.staking.v1beta1.IQueryDelegatorValidatorResponse=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.QueryDelegatorValidatorResponse} QueryDelegatorValidatorResponse instance + */ + QueryDelegatorValidatorResponse.create = function create(properties) { + return new QueryDelegatorValidatorResponse(properties); + }; + + /** + * Encodes the specified QueryDelegatorValidatorResponse message. Does not implicitly {@link cosmos.staking.v1beta1.QueryDelegatorValidatorResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.QueryDelegatorValidatorResponse + * @static + * @param {cosmos.staking.v1beta1.IQueryDelegatorValidatorResponse} message QueryDelegatorValidatorResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDelegatorValidatorResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.validator != null && Object.hasOwnProperty.call(message, "validator")) + $root.cosmos.staking.v1beta1.Validator.encode(message.validator, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryDelegatorValidatorResponse message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.QueryDelegatorValidatorResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.QueryDelegatorValidatorResponse + * @static + * @param {cosmos.staking.v1beta1.IQueryDelegatorValidatorResponse} message QueryDelegatorValidatorResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDelegatorValidatorResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryDelegatorValidatorResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.QueryDelegatorValidatorResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.QueryDelegatorValidatorResponse} QueryDelegatorValidatorResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDelegatorValidatorResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.QueryDelegatorValidatorResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.validator = $root.cosmos.staking.v1beta1.Validator.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryDelegatorValidatorResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.QueryDelegatorValidatorResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.QueryDelegatorValidatorResponse} QueryDelegatorValidatorResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDelegatorValidatorResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryDelegatorValidatorResponse message. + * @function verify + * @memberof cosmos.staking.v1beta1.QueryDelegatorValidatorResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryDelegatorValidatorResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.validator != null && message.hasOwnProperty("validator")) { + let error = $root.cosmos.staking.v1beta1.Validator.verify(message.validator); + if (error) + return "validator." + error; + } + return null; + }; + + /** + * Creates a QueryDelegatorValidatorResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.QueryDelegatorValidatorResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.QueryDelegatorValidatorResponse} QueryDelegatorValidatorResponse + */ + QueryDelegatorValidatorResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.QueryDelegatorValidatorResponse) + return object; + let message = new $root.cosmos.staking.v1beta1.QueryDelegatorValidatorResponse(); + if (object.validator != null) { + if (typeof object.validator !== "object") + throw TypeError(".cosmos.staking.v1beta1.QueryDelegatorValidatorResponse.validator: object expected"); + message.validator = $root.cosmos.staking.v1beta1.Validator.fromObject(object.validator); + } + return message; + }; + + /** + * Creates a plain object from a QueryDelegatorValidatorResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.QueryDelegatorValidatorResponse + * @static + * @param {cosmos.staking.v1beta1.QueryDelegatorValidatorResponse} message QueryDelegatorValidatorResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryDelegatorValidatorResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.validator = null; + if (message.validator != null && message.hasOwnProperty("validator")) + object.validator = $root.cosmos.staking.v1beta1.Validator.toObject(message.validator, options); + return object; + }; + + /** + * Converts this QueryDelegatorValidatorResponse to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.QueryDelegatorValidatorResponse + * @instance + * @returns {Object.} JSON object + */ + QueryDelegatorValidatorResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryDelegatorValidatorResponse; + })(v1beta1.QueryDelegatorValidatorResponse || {}); + + v1beta1.QueryHistoricalInfoRequest = (function(QueryHistoricalInfoRequest) { + + /** + * Properties of a QueryHistoricalInfoRequest. + * @memberof cosmos.staking.v1beta1 + * @interface IQueryHistoricalInfoRequest + * @property {number|Long|null} [height] QueryHistoricalInfoRequest height + */ + + /** + * Constructs a new QueryHistoricalInfoRequest. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a QueryHistoricalInfoRequest. + * @implements IQueryHistoricalInfoRequest + * @constructor + * @param {cosmos.staking.v1beta1.IQueryHistoricalInfoRequest=} [properties] Properties to set + */ + function QueryHistoricalInfoRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryHistoricalInfoRequest height. + * @member {number|Long} height + * @memberof cosmos.staking.v1beta1.QueryHistoricalInfoRequest + * @instance + */ + QueryHistoricalInfoRequest.prototype.height = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new QueryHistoricalInfoRequest instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.QueryHistoricalInfoRequest + * @static + * @param {cosmos.staking.v1beta1.IQueryHistoricalInfoRequest=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.QueryHistoricalInfoRequest} QueryHistoricalInfoRequest instance + */ + QueryHistoricalInfoRequest.create = function create(properties) { + return new QueryHistoricalInfoRequest(properties); + }; + + /** + * Encodes the specified QueryHistoricalInfoRequest message. Does not implicitly {@link cosmos.staking.v1beta1.QueryHistoricalInfoRequest.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.QueryHistoricalInfoRequest + * @static + * @param {cosmos.staking.v1beta1.IQueryHistoricalInfoRequest} message QueryHistoricalInfoRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryHistoricalInfoRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.height != null && Object.hasOwnProperty.call(message, "height")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.height); + return writer; + }; + + /** + * Encodes the specified QueryHistoricalInfoRequest message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.QueryHistoricalInfoRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.QueryHistoricalInfoRequest + * @static + * @param {cosmos.staking.v1beta1.IQueryHistoricalInfoRequest} message QueryHistoricalInfoRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryHistoricalInfoRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryHistoricalInfoRequest message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.QueryHistoricalInfoRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.QueryHistoricalInfoRequest} QueryHistoricalInfoRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryHistoricalInfoRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.QueryHistoricalInfoRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.height = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryHistoricalInfoRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.QueryHistoricalInfoRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.QueryHistoricalInfoRequest} QueryHistoricalInfoRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryHistoricalInfoRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryHistoricalInfoRequest message. + * @function verify + * @memberof cosmos.staking.v1beta1.QueryHistoricalInfoRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryHistoricalInfoRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.height != null && message.hasOwnProperty("height")) + if (!$util.isInteger(message.height) && !(message.height && $util.isInteger(message.height.low) && $util.isInteger(message.height.high))) + return "height: integer|Long expected"; + return null; + }; + + /** + * Creates a QueryHistoricalInfoRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.QueryHistoricalInfoRequest + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.QueryHistoricalInfoRequest} QueryHistoricalInfoRequest + */ + QueryHistoricalInfoRequest.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.QueryHistoricalInfoRequest) + return object; + let message = new $root.cosmos.staking.v1beta1.QueryHistoricalInfoRequest(); + if (object.height != null) + if ($util.Long) + (message.height = $util.Long.fromValue(object.height)).unsigned = false; + else if (typeof object.height === "string") + message.height = parseInt(object.height, 10); + else if (typeof object.height === "number") + message.height = object.height; + else if (typeof object.height === "object") + message.height = new $util.LongBits(object.height.low >>> 0, object.height.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a QueryHistoricalInfoRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.QueryHistoricalInfoRequest + * @static + * @param {cosmos.staking.v1beta1.QueryHistoricalInfoRequest} message QueryHistoricalInfoRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryHistoricalInfoRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.height = options.longs === String ? "0" : 0; + if (message.height != null && message.hasOwnProperty("height")) + if (typeof message.height === "number") + object.height = options.longs === String ? String(message.height) : message.height; + else + object.height = options.longs === String ? $util.Long.prototype.toString.call(message.height) : options.longs === Number ? new $util.LongBits(message.height.low >>> 0, message.height.high >>> 0).toNumber() : message.height; + return object; + }; + + /** + * Converts this QueryHistoricalInfoRequest to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.QueryHistoricalInfoRequest + * @instance + * @returns {Object.} JSON object + */ + QueryHistoricalInfoRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryHistoricalInfoRequest; + })(v1beta1.QueryHistoricalInfoRequest || {}); + + v1beta1.QueryHistoricalInfoResponse = (function(QueryHistoricalInfoResponse) { + + /** + * Properties of a QueryHistoricalInfoResponse. + * @memberof cosmos.staking.v1beta1 + * @interface IQueryHistoricalInfoResponse + * @property {cosmos.staking.v1beta1.IHistoricalInfo|null} [hist] QueryHistoricalInfoResponse hist + */ + + /** + * Constructs a new QueryHistoricalInfoResponse. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a QueryHistoricalInfoResponse. + * @implements IQueryHistoricalInfoResponse + * @constructor + * @param {cosmos.staking.v1beta1.IQueryHistoricalInfoResponse=} [properties] Properties to set + */ + function QueryHistoricalInfoResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryHistoricalInfoResponse hist. + * @member {cosmos.staking.v1beta1.IHistoricalInfo|null|undefined} hist + * @memberof cosmos.staking.v1beta1.QueryHistoricalInfoResponse + * @instance + */ + QueryHistoricalInfoResponse.prototype.hist = null; + + /** + * Creates a new QueryHistoricalInfoResponse instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.QueryHistoricalInfoResponse + * @static + * @param {cosmos.staking.v1beta1.IQueryHistoricalInfoResponse=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.QueryHistoricalInfoResponse} QueryHistoricalInfoResponse instance + */ + QueryHistoricalInfoResponse.create = function create(properties) { + return new QueryHistoricalInfoResponse(properties); + }; + + /** + * Encodes the specified QueryHistoricalInfoResponse message. Does not implicitly {@link cosmos.staking.v1beta1.QueryHistoricalInfoResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.QueryHistoricalInfoResponse + * @static + * @param {cosmos.staking.v1beta1.IQueryHistoricalInfoResponse} message QueryHistoricalInfoResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryHistoricalInfoResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.hist != null && Object.hasOwnProperty.call(message, "hist")) + $root.cosmos.staking.v1beta1.HistoricalInfo.encode(message.hist, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryHistoricalInfoResponse message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.QueryHistoricalInfoResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.QueryHistoricalInfoResponse + * @static + * @param {cosmos.staking.v1beta1.IQueryHistoricalInfoResponse} message QueryHistoricalInfoResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryHistoricalInfoResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryHistoricalInfoResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.QueryHistoricalInfoResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.QueryHistoricalInfoResponse} QueryHistoricalInfoResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryHistoricalInfoResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.QueryHistoricalInfoResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.hist = $root.cosmos.staking.v1beta1.HistoricalInfo.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryHistoricalInfoResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.QueryHistoricalInfoResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.QueryHistoricalInfoResponse} QueryHistoricalInfoResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryHistoricalInfoResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryHistoricalInfoResponse message. + * @function verify + * @memberof cosmos.staking.v1beta1.QueryHistoricalInfoResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryHistoricalInfoResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.hist != null && message.hasOwnProperty("hist")) { + let error = $root.cosmos.staking.v1beta1.HistoricalInfo.verify(message.hist); + if (error) + return "hist." + error; + } + return null; + }; + + /** + * Creates a QueryHistoricalInfoResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.QueryHistoricalInfoResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.QueryHistoricalInfoResponse} QueryHistoricalInfoResponse + */ + QueryHistoricalInfoResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.QueryHistoricalInfoResponse) + return object; + let message = new $root.cosmos.staking.v1beta1.QueryHistoricalInfoResponse(); + if (object.hist != null) { + if (typeof object.hist !== "object") + throw TypeError(".cosmos.staking.v1beta1.QueryHistoricalInfoResponse.hist: object expected"); + message.hist = $root.cosmos.staking.v1beta1.HistoricalInfo.fromObject(object.hist); + } + return message; + }; + + /** + * Creates a plain object from a QueryHistoricalInfoResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.QueryHistoricalInfoResponse + * @static + * @param {cosmos.staking.v1beta1.QueryHistoricalInfoResponse} message QueryHistoricalInfoResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryHistoricalInfoResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.hist = null; + if (message.hist != null && message.hasOwnProperty("hist")) + object.hist = $root.cosmos.staking.v1beta1.HistoricalInfo.toObject(message.hist, options); + return object; + }; + + /** + * Converts this QueryHistoricalInfoResponse to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.QueryHistoricalInfoResponse + * @instance + * @returns {Object.} JSON object + */ + QueryHistoricalInfoResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryHistoricalInfoResponse; + })(v1beta1.QueryHistoricalInfoResponse || {}); + + v1beta1.QueryPoolRequest = (function(QueryPoolRequest) { + + /** + * Properties of a QueryPoolRequest. + * @memberof cosmos.staking.v1beta1 + * @interface IQueryPoolRequest + */ + + /** + * Constructs a new QueryPoolRequest. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a QueryPoolRequest. + * @implements IQueryPoolRequest + * @constructor + * @param {cosmos.staking.v1beta1.IQueryPoolRequest=} [properties] Properties to set + */ + function QueryPoolRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new QueryPoolRequest instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.QueryPoolRequest + * @static + * @param {cosmos.staking.v1beta1.IQueryPoolRequest=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.QueryPoolRequest} QueryPoolRequest instance + */ + QueryPoolRequest.create = function create(properties) { + return new QueryPoolRequest(properties); + }; + + /** + * Encodes the specified QueryPoolRequest message. Does not implicitly {@link cosmos.staking.v1beta1.QueryPoolRequest.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.QueryPoolRequest + * @static + * @param {cosmos.staking.v1beta1.IQueryPoolRequest} message QueryPoolRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryPoolRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified QueryPoolRequest message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.QueryPoolRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.QueryPoolRequest + * @static + * @param {cosmos.staking.v1beta1.IQueryPoolRequest} message QueryPoolRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryPoolRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryPoolRequest message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.QueryPoolRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.QueryPoolRequest} QueryPoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryPoolRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.QueryPoolRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryPoolRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.QueryPoolRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.QueryPoolRequest} QueryPoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryPoolRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryPoolRequest message. + * @function verify + * @memberof cosmos.staking.v1beta1.QueryPoolRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryPoolRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a QueryPoolRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.QueryPoolRequest + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.QueryPoolRequest} QueryPoolRequest + */ + QueryPoolRequest.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.QueryPoolRequest) + return object; + return new $root.cosmos.staking.v1beta1.QueryPoolRequest(); + }; + + /** + * Creates a plain object from a QueryPoolRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.QueryPoolRequest + * @static + * @param {cosmos.staking.v1beta1.QueryPoolRequest} message QueryPoolRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryPoolRequest.toObject = function toObject() { + return {}; + }; + + /** + * Converts this QueryPoolRequest to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.QueryPoolRequest + * @instance + * @returns {Object.} JSON object + */ + QueryPoolRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryPoolRequest; + })(v1beta1.QueryPoolRequest || {}); + + v1beta1.QueryPoolResponse = (function(QueryPoolResponse) { + + /** + * Properties of a QueryPoolResponse. + * @memberof cosmos.staking.v1beta1 + * @interface IQueryPoolResponse + * @property {cosmos.staking.v1beta1.IPool|null} [pool] QueryPoolResponse pool + */ + + /** + * Constructs a new QueryPoolResponse. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a QueryPoolResponse. + * @implements IQueryPoolResponse + * @constructor + * @param {cosmos.staking.v1beta1.IQueryPoolResponse=} [properties] Properties to set + */ + function QueryPoolResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryPoolResponse pool. + * @member {cosmos.staking.v1beta1.IPool|null|undefined} pool + * @memberof cosmos.staking.v1beta1.QueryPoolResponse + * @instance + */ + QueryPoolResponse.prototype.pool = null; + + /** + * Creates a new QueryPoolResponse instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.QueryPoolResponse + * @static + * @param {cosmos.staking.v1beta1.IQueryPoolResponse=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.QueryPoolResponse} QueryPoolResponse instance + */ + QueryPoolResponse.create = function create(properties) { + return new QueryPoolResponse(properties); + }; + + /** + * Encodes the specified QueryPoolResponse message. Does not implicitly {@link cosmos.staking.v1beta1.QueryPoolResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.QueryPoolResponse + * @static + * @param {cosmos.staking.v1beta1.IQueryPoolResponse} message QueryPoolResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryPoolResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pool != null && Object.hasOwnProperty.call(message, "pool")) + $root.cosmos.staking.v1beta1.Pool.encode(message.pool, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryPoolResponse message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.QueryPoolResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.QueryPoolResponse + * @static + * @param {cosmos.staking.v1beta1.IQueryPoolResponse} message QueryPoolResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryPoolResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryPoolResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.QueryPoolResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.QueryPoolResponse} QueryPoolResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryPoolResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.QueryPoolResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.pool = $root.cosmos.staking.v1beta1.Pool.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryPoolResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.QueryPoolResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.QueryPoolResponse} QueryPoolResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryPoolResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryPoolResponse message. + * @function verify + * @memberof cosmos.staking.v1beta1.QueryPoolResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryPoolResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.pool != null && message.hasOwnProperty("pool")) { + let error = $root.cosmos.staking.v1beta1.Pool.verify(message.pool); + if (error) + return "pool." + error; + } + return null; + }; + + /** + * Creates a QueryPoolResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.QueryPoolResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.QueryPoolResponse} QueryPoolResponse + */ + QueryPoolResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.QueryPoolResponse) + return object; + let message = new $root.cosmos.staking.v1beta1.QueryPoolResponse(); + if (object.pool != null) { + if (typeof object.pool !== "object") + throw TypeError(".cosmos.staking.v1beta1.QueryPoolResponse.pool: object expected"); + message.pool = $root.cosmos.staking.v1beta1.Pool.fromObject(object.pool); + } + return message; + }; + + /** + * Creates a plain object from a QueryPoolResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.QueryPoolResponse + * @static + * @param {cosmos.staking.v1beta1.QueryPoolResponse} message QueryPoolResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryPoolResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.pool = null; + if (message.pool != null && message.hasOwnProperty("pool")) + object.pool = $root.cosmos.staking.v1beta1.Pool.toObject(message.pool, options); + return object; + }; + + /** + * Converts this QueryPoolResponse to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.QueryPoolResponse + * @instance + * @returns {Object.} JSON object + */ + QueryPoolResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryPoolResponse; + })(v1beta1.QueryPoolResponse || {}); + + v1beta1.QueryParamsRequest = (function(QueryParamsRequest) { + + /** + * Properties of a QueryParamsRequest. + * @memberof cosmos.staking.v1beta1 + * @interface IQueryParamsRequest + */ + + /** + * Constructs a new QueryParamsRequest. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a QueryParamsRequest. + * @implements IQueryParamsRequest + * @constructor + * @param {cosmos.staking.v1beta1.IQueryParamsRequest=} [properties] Properties to set + */ + function QueryParamsRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new QueryParamsRequest instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.QueryParamsRequest + * @static + * @param {cosmos.staking.v1beta1.IQueryParamsRequest=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.QueryParamsRequest} QueryParamsRequest instance + */ + QueryParamsRequest.create = function create(properties) { + return new QueryParamsRequest(properties); + }; + + /** + * Encodes the specified QueryParamsRequest message. Does not implicitly {@link cosmos.staking.v1beta1.QueryParamsRequest.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.QueryParamsRequest + * @static + * @param {cosmos.staking.v1beta1.IQueryParamsRequest} message QueryParamsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryParamsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified QueryParamsRequest message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.QueryParamsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.QueryParamsRequest + * @static + * @param {cosmos.staking.v1beta1.IQueryParamsRequest} message QueryParamsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryParamsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryParamsRequest message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.QueryParamsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.QueryParamsRequest} QueryParamsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryParamsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.QueryParamsRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryParamsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.QueryParamsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.QueryParamsRequest} QueryParamsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryParamsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryParamsRequest message. + * @function verify + * @memberof cosmos.staking.v1beta1.QueryParamsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryParamsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a QueryParamsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.QueryParamsRequest + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.QueryParamsRequest} QueryParamsRequest + */ + QueryParamsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.QueryParamsRequest) + return object; + return new $root.cosmos.staking.v1beta1.QueryParamsRequest(); + }; + + /** + * Creates a plain object from a QueryParamsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.QueryParamsRequest + * @static + * @param {cosmos.staking.v1beta1.QueryParamsRequest} message QueryParamsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryParamsRequest.toObject = function toObject() { + return {}; + }; + + /** + * Converts this QueryParamsRequest to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.QueryParamsRequest + * @instance + * @returns {Object.} JSON object + */ + QueryParamsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryParamsRequest; + })(v1beta1.QueryParamsRequest || {}); + + v1beta1.QueryParamsResponse = (function(QueryParamsResponse) { + + /** + * Properties of a QueryParamsResponse. + * @memberof cosmos.staking.v1beta1 + * @interface IQueryParamsResponse + * @property {cosmos.staking.v1beta1.IParams|null} [params] QueryParamsResponse params + */ + + /** + * Constructs a new QueryParamsResponse. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a QueryParamsResponse. + * @implements IQueryParamsResponse + * @constructor + * @param {cosmos.staking.v1beta1.IQueryParamsResponse=} [properties] Properties to set + */ + function QueryParamsResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryParamsResponse params. + * @member {cosmos.staking.v1beta1.IParams|null|undefined} params + * @memberof cosmos.staking.v1beta1.QueryParamsResponse + * @instance + */ + QueryParamsResponse.prototype.params = null; + + /** + * Creates a new QueryParamsResponse instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.QueryParamsResponse + * @static + * @param {cosmos.staking.v1beta1.IQueryParamsResponse=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.QueryParamsResponse} QueryParamsResponse instance + */ + QueryParamsResponse.create = function create(properties) { + return new QueryParamsResponse(properties); + }; + + /** + * Encodes the specified QueryParamsResponse message. Does not implicitly {@link cosmos.staking.v1beta1.QueryParamsResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.QueryParamsResponse + * @static + * @param {cosmos.staking.v1beta1.IQueryParamsResponse} message QueryParamsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryParamsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.params != null && Object.hasOwnProperty.call(message, "params")) + $root.cosmos.staking.v1beta1.Params.encode(message.params, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryParamsResponse message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.QueryParamsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.QueryParamsResponse + * @static + * @param {cosmos.staking.v1beta1.IQueryParamsResponse} message QueryParamsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryParamsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryParamsResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.QueryParamsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.QueryParamsResponse} QueryParamsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryParamsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.QueryParamsResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.params = $root.cosmos.staking.v1beta1.Params.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryParamsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.QueryParamsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.QueryParamsResponse} QueryParamsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryParamsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryParamsResponse message. + * @function verify + * @memberof cosmos.staking.v1beta1.QueryParamsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryParamsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.params != null && message.hasOwnProperty("params")) { + let error = $root.cosmos.staking.v1beta1.Params.verify(message.params); + if (error) + return "params." + error; + } + return null; + }; + + /** + * Creates a QueryParamsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.QueryParamsResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.QueryParamsResponse} QueryParamsResponse + */ + QueryParamsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.QueryParamsResponse) + return object; + let message = new $root.cosmos.staking.v1beta1.QueryParamsResponse(); + if (object.params != null) { + if (typeof object.params !== "object") + throw TypeError(".cosmos.staking.v1beta1.QueryParamsResponse.params: object expected"); + message.params = $root.cosmos.staking.v1beta1.Params.fromObject(object.params); + } + return message; + }; + + /** + * Creates a plain object from a QueryParamsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.QueryParamsResponse + * @static + * @param {cosmos.staking.v1beta1.QueryParamsResponse} message QueryParamsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryParamsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.params = null; + if (message.params != null && message.hasOwnProperty("params")) + object.params = $root.cosmos.staking.v1beta1.Params.toObject(message.params, options); + return object; + }; + + /** + * Converts this QueryParamsResponse to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.QueryParamsResponse + * @instance + * @returns {Object.} JSON object + */ + QueryParamsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryParamsResponse; + })(v1beta1.QueryParamsResponse || {}); + + v1beta1.HistoricalInfo = (function(HistoricalInfo) { + + /** + * Properties of a HistoricalInfo. + * @memberof cosmos.staking.v1beta1 + * @interface IHistoricalInfo + * @property {tendermint.types.IHeader|null} [header] HistoricalInfo header + * @property {Array.|null} [valset] HistoricalInfo valset + */ + + /** + * Constructs a new HistoricalInfo. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a HistoricalInfo. + * @implements IHistoricalInfo + * @constructor + * @param {cosmos.staking.v1beta1.IHistoricalInfo=} [properties] Properties to set + */ + function HistoricalInfo(properties) { + this.valset = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HistoricalInfo header. + * @member {tendermint.types.IHeader|null|undefined} header + * @memberof cosmos.staking.v1beta1.HistoricalInfo + * @instance + */ + HistoricalInfo.prototype.header = null; + + /** + * HistoricalInfo valset. + * @member {Array.} valset + * @memberof cosmos.staking.v1beta1.HistoricalInfo + * @instance + */ + HistoricalInfo.prototype.valset = $util.emptyArray; + + /** + * Creates a new HistoricalInfo instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.HistoricalInfo + * @static + * @param {cosmos.staking.v1beta1.IHistoricalInfo=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.HistoricalInfo} HistoricalInfo instance + */ + HistoricalInfo.create = function create(properties) { + return new HistoricalInfo(properties); + }; + + /** + * Encodes the specified HistoricalInfo message. Does not implicitly {@link cosmos.staking.v1beta1.HistoricalInfo.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.HistoricalInfo + * @static + * @param {cosmos.staking.v1beta1.IHistoricalInfo} message HistoricalInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HistoricalInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.header != null && Object.hasOwnProperty.call(message, "header")) + $root.tendermint.types.Header.encode(message.header, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.valset != null && message.valset.length) + for (let i = 0; i < message.valset.length; ++i) + $root.cosmos.staking.v1beta1.Validator.encode(message.valset[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified HistoricalInfo message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.HistoricalInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.HistoricalInfo + * @static + * @param {cosmos.staking.v1beta1.IHistoricalInfo} message HistoricalInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HistoricalInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HistoricalInfo message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.HistoricalInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.HistoricalInfo} HistoricalInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HistoricalInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.HistoricalInfo(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.header = $root.tendermint.types.Header.decode(reader, reader.uint32()); + break; + case 2: + if (!(message.valset && message.valset.length)) + message.valset = []; + message.valset.push($root.cosmos.staking.v1beta1.Validator.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HistoricalInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.HistoricalInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.HistoricalInfo} HistoricalInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HistoricalInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HistoricalInfo message. + * @function verify + * @memberof cosmos.staking.v1beta1.HistoricalInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HistoricalInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.header != null && message.hasOwnProperty("header")) { + let error = $root.tendermint.types.Header.verify(message.header); + if (error) + return "header." + error; + } + if (message.valset != null && message.hasOwnProperty("valset")) { + if (!Array.isArray(message.valset)) + return "valset: array expected"; + for (let i = 0; i < message.valset.length; ++i) { + let error = $root.cosmos.staking.v1beta1.Validator.verify(message.valset[i]); + if (error) + return "valset." + error; + } + } + return null; + }; + + /** + * Creates a HistoricalInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.HistoricalInfo + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.HistoricalInfo} HistoricalInfo + */ + HistoricalInfo.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.HistoricalInfo) + return object; + let message = new $root.cosmos.staking.v1beta1.HistoricalInfo(); + if (object.header != null) { + if (typeof object.header !== "object") + throw TypeError(".cosmos.staking.v1beta1.HistoricalInfo.header: object expected"); + message.header = $root.tendermint.types.Header.fromObject(object.header); + } + if (object.valset) { + if (!Array.isArray(object.valset)) + throw TypeError(".cosmos.staking.v1beta1.HistoricalInfo.valset: array expected"); + message.valset = []; + for (let i = 0; i < object.valset.length; ++i) { + if (typeof object.valset[i] !== "object") + throw TypeError(".cosmos.staking.v1beta1.HistoricalInfo.valset: object expected"); + message.valset[i] = $root.cosmos.staking.v1beta1.Validator.fromObject(object.valset[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a HistoricalInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.HistoricalInfo + * @static + * @param {cosmos.staking.v1beta1.HistoricalInfo} message HistoricalInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HistoricalInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.valset = []; + if (options.defaults) + object.header = null; + if (message.header != null && message.hasOwnProperty("header")) + object.header = $root.tendermint.types.Header.toObject(message.header, options); + if (message.valset && message.valset.length) { + object.valset = []; + for (let j = 0; j < message.valset.length; ++j) + object.valset[j] = $root.cosmos.staking.v1beta1.Validator.toObject(message.valset[j], options); + } + return object; + }; + + /** + * Converts this HistoricalInfo to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.HistoricalInfo + * @instance + * @returns {Object.} JSON object + */ + HistoricalInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return HistoricalInfo; + })(v1beta1.HistoricalInfo || {}); + + v1beta1.CommissionRates = (function(CommissionRates) { + + /** + * Properties of a CommissionRates. + * @memberof cosmos.staking.v1beta1 + * @interface ICommissionRates + * @property {string|null} [rate] CommissionRates rate + * @property {string|null} [maxRate] CommissionRates maxRate + * @property {string|null} [maxChangeRate] CommissionRates maxChangeRate + */ + + /** + * Constructs a new CommissionRates. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a CommissionRates. + * @implements ICommissionRates + * @constructor + * @param {cosmos.staking.v1beta1.ICommissionRates=} [properties] Properties to set + */ + function CommissionRates(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CommissionRates rate. + * @member {string} rate + * @memberof cosmos.staking.v1beta1.CommissionRates + * @instance + */ + CommissionRates.prototype.rate = ""; + + /** + * CommissionRates maxRate. + * @member {string} maxRate + * @memberof cosmos.staking.v1beta1.CommissionRates + * @instance + */ + CommissionRates.prototype.maxRate = ""; + + /** + * CommissionRates maxChangeRate. + * @member {string} maxChangeRate + * @memberof cosmos.staking.v1beta1.CommissionRates + * @instance + */ + CommissionRates.prototype.maxChangeRate = ""; + + /** + * Creates a new CommissionRates instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.CommissionRates + * @static + * @param {cosmos.staking.v1beta1.ICommissionRates=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.CommissionRates} CommissionRates instance + */ + CommissionRates.create = function create(properties) { + return new CommissionRates(properties); + }; + + /** + * Encodes the specified CommissionRates message. Does not implicitly {@link cosmos.staking.v1beta1.CommissionRates.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.CommissionRates + * @static + * @param {cosmos.staking.v1beta1.ICommissionRates} message CommissionRates message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommissionRates.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rate != null && Object.hasOwnProperty.call(message, "rate")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.rate); + if (message.maxRate != null && Object.hasOwnProperty.call(message, "maxRate")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.maxRate); + if (message.maxChangeRate != null && Object.hasOwnProperty.call(message, "maxChangeRate")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.maxChangeRate); + return writer; + }; + + /** + * Encodes the specified CommissionRates message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.CommissionRates.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.CommissionRates + * @static + * @param {cosmos.staking.v1beta1.ICommissionRates} message CommissionRates message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommissionRates.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CommissionRates message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.CommissionRates + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.CommissionRates} CommissionRates + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommissionRates.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.CommissionRates(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.rate = reader.string(); + break; + case 2: + message.maxRate = reader.string(); + break; + case 3: + message.maxChangeRate = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CommissionRates message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.CommissionRates + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.CommissionRates} CommissionRates + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommissionRates.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CommissionRates message. + * @function verify + * @memberof cosmos.staking.v1beta1.CommissionRates + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CommissionRates.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rate != null && message.hasOwnProperty("rate")) + if (!$util.isString(message.rate)) + return "rate: string expected"; + if (message.maxRate != null && message.hasOwnProperty("maxRate")) + if (!$util.isString(message.maxRate)) + return "maxRate: string expected"; + if (message.maxChangeRate != null && message.hasOwnProperty("maxChangeRate")) + if (!$util.isString(message.maxChangeRate)) + return "maxChangeRate: string expected"; + return null; + }; + + /** + * Creates a CommissionRates message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.CommissionRates + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.CommissionRates} CommissionRates + */ + CommissionRates.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.CommissionRates) + return object; + let message = new $root.cosmos.staking.v1beta1.CommissionRates(); + if (object.rate != null) + message.rate = String(object.rate); + if (object.maxRate != null) + message.maxRate = String(object.maxRate); + if (object.maxChangeRate != null) + message.maxChangeRate = String(object.maxChangeRate); + return message; + }; + + /** + * Creates a plain object from a CommissionRates message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.CommissionRates + * @static + * @param {cosmos.staking.v1beta1.CommissionRates} message CommissionRates + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CommissionRates.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.rate = ""; + object.maxRate = ""; + object.maxChangeRate = ""; + } + if (message.rate != null && message.hasOwnProperty("rate")) + object.rate = message.rate; + if (message.maxRate != null && message.hasOwnProperty("maxRate")) + object.maxRate = message.maxRate; + if (message.maxChangeRate != null && message.hasOwnProperty("maxChangeRate")) + object.maxChangeRate = message.maxChangeRate; + return object; + }; + + /** + * Converts this CommissionRates to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.CommissionRates + * @instance + * @returns {Object.} JSON object + */ + CommissionRates.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CommissionRates; + })(v1beta1.CommissionRates || {}); + + v1beta1.Commission = (function(Commission) { + + /** + * Properties of a Commission. + * @memberof cosmos.staking.v1beta1 + * @interface ICommission + * @property {cosmos.staking.v1beta1.ICommissionRates|null} [commissionRates] Commission commissionRates + * @property {google.protobuf.ITimestamp|null} [updateTime] Commission updateTime + */ + + /** + * Constructs a new Commission. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a Commission. + * @implements ICommission + * @constructor + * @param {cosmos.staking.v1beta1.ICommission=} [properties] Properties to set + */ + function Commission(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Commission commissionRates. + * @member {cosmos.staking.v1beta1.ICommissionRates|null|undefined} commissionRates + * @memberof cosmos.staking.v1beta1.Commission + * @instance + */ + Commission.prototype.commissionRates = null; + + /** + * Commission updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof cosmos.staking.v1beta1.Commission + * @instance + */ + Commission.prototype.updateTime = null; + + /** + * Creates a new Commission instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.Commission + * @static + * @param {cosmos.staking.v1beta1.ICommission=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.Commission} Commission instance + */ + Commission.create = function create(properties) { + return new Commission(properties); + }; + + /** + * Encodes the specified Commission message. Does not implicitly {@link cosmos.staking.v1beta1.Commission.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.Commission + * @static + * @param {cosmos.staking.v1beta1.ICommission} message Commission message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Commission.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.commissionRates != null && Object.hasOwnProperty.call(message, "commissionRates")) + $root.cosmos.staking.v1beta1.CommissionRates.encode(message.commissionRates, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Commission message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.Commission.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.Commission + * @static + * @param {cosmos.staking.v1beta1.ICommission} message Commission message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Commission.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Commission message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.Commission + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.Commission} Commission + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Commission.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.Commission(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.commissionRates = $root.cosmos.staking.v1beta1.CommissionRates.decode(reader, reader.uint32()); + break; + case 2: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Commission message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.Commission + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.Commission} Commission + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Commission.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Commission message. + * @function verify + * @memberof cosmos.staking.v1beta1.Commission + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Commission.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.commissionRates != null && message.hasOwnProperty("commissionRates")) { + let error = $root.cosmos.staking.v1beta1.CommissionRates.verify(message.commissionRates); + if (error) + return "commissionRates." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + let error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + return null; + }; + + /** + * Creates a Commission message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.Commission + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.Commission} Commission + */ + Commission.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.Commission) + return object; + let message = new $root.cosmos.staking.v1beta1.Commission(); + if (object.commissionRates != null) { + if (typeof object.commissionRates !== "object") + throw TypeError(".cosmos.staking.v1beta1.Commission.commissionRates: object expected"); + message.commissionRates = $root.cosmos.staking.v1beta1.CommissionRates.fromObject(object.commissionRates); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".cosmos.staking.v1beta1.Commission.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + return message; + }; + + /** + * Creates a plain object from a Commission message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.Commission + * @static + * @param {cosmos.staking.v1beta1.Commission} message Commission + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Commission.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.commissionRates = null; + object.updateTime = null; + } + if (message.commissionRates != null && message.hasOwnProperty("commissionRates")) + object.commissionRates = $root.cosmos.staking.v1beta1.CommissionRates.toObject(message.commissionRates, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + return object; + }; + + /** + * Converts this Commission to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.Commission + * @instance + * @returns {Object.} JSON object + */ + Commission.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Commission; + })(v1beta1.Commission || {}); + + v1beta1.Description = (function(Description) { + + /** + * Properties of a Description. + * @memberof cosmos.staking.v1beta1 + * @interface IDescription + * @property {string|null} [moniker] Description moniker + * @property {string|null} [identity] Description identity + * @property {string|null} [website] Description website + * @property {string|null} [securityContact] Description securityContact + * @property {string|null} [details] Description details + */ + + /** + * Constructs a new Description. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a Description. + * @implements IDescription + * @constructor + * @param {cosmos.staking.v1beta1.IDescription=} [properties] Properties to set + */ + function Description(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Description moniker. + * @member {string} moniker + * @memberof cosmos.staking.v1beta1.Description + * @instance + */ + Description.prototype.moniker = ""; + + /** + * Description identity. + * @member {string} identity + * @memberof cosmos.staking.v1beta1.Description + * @instance + */ + Description.prototype.identity = ""; + + /** + * Description website. + * @member {string} website + * @memberof cosmos.staking.v1beta1.Description + * @instance + */ + Description.prototype.website = ""; + + /** + * Description securityContact. + * @member {string} securityContact + * @memberof cosmos.staking.v1beta1.Description + * @instance + */ + Description.prototype.securityContact = ""; + + /** + * Description details. + * @member {string} details + * @memberof cosmos.staking.v1beta1.Description + * @instance + */ + Description.prototype.details = ""; + + /** + * Creates a new Description instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.Description + * @static + * @param {cosmos.staking.v1beta1.IDescription=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.Description} Description instance + */ + Description.create = function create(properties) { + return new Description(properties); + }; + + /** + * Encodes the specified Description message. Does not implicitly {@link cosmos.staking.v1beta1.Description.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.Description + * @static + * @param {cosmos.staking.v1beta1.IDescription} message Description message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Description.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.moniker != null && Object.hasOwnProperty.call(message, "moniker")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.moniker); + if (message.identity != null && Object.hasOwnProperty.call(message, "identity")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.identity); + if (message.website != null && Object.hasOwnProperty.call(message, "website")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.website); + if (message.securityContact != null && Object.hasOwnProperty.call(message, "securityContact")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.securityContact); + if (message.details != null && Object.hasOwnProperty.call(message, "details")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.details); + return writer; + }; + + /** + * Encodes the specified Description message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.Description.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.Description + * @static + * @param {cosmos.staking.v1beta1.IDescription} message Description message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Description.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Description message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.Description + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.Description} Description + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Description.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.Description(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.moniker = reader.string(); + break; + case 2: + message.identity = reader.string(); + break; + case 3: + message.website = reader.string(); + break; + case 4: + message.securityContact = reader.string(); + break; + case 5: + message.details = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Description message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.Description + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.Description} Description + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Description.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Description message. + * @function verify + * @memberof cosmos.staking.v1beta1.Description + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Description.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.moniker != null && message.hasOwnProperty("moniker")) + if (!$util.isString(message.moniker)) + return "moniker: string expected"; + if (message.identity != null && message.hasOwnProperty("identity")) + if (!$util.isString(message.identity)) + return "identity: string expected"; + if (message.website != null && message.hasOwnProperty("website")) + if (!$util.isString(message.website)) + return "website: string expected"; + if (message.securityContact != null && message.hasOwnProperty("securityContact")) + if (!$util.isString(message.securityContact)) + return "securityContact: string expected"; + if (message.details != null && message.hasOwnProperty("details")) + if (!$util.isString(message.details)) + return "details: string expected"; + return null; + }; + + /** + * Creates a Description message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.Description + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.Description} Description + */ + Description.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.Description) + return object; + let message = new $root.cosmos.staking.v1beta1.Description(); + if (object.moniker != null) + message.moniker = String(object.moniker); + if (object.identity != null) + message.identity = String(object.identity); + if (object.website != null) + message.website = String(object.website); + if (object.securityContact != null) + message.securityContact = String(object.securityContact); + if (object.details != null) + message.details = String(object.details); + return message; + }; + + /** + * Creates a plain object from a Description message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.Description + * @static + * @param {cosmos.staking.v1beta1.Description} message Description + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Description.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.moniker = ""; + object.identity = ""; + object.website = ""; + object.securityContact = ""; + object.details = ""; + } + if (message.moniker != null && message.hasOwnProperty("moniker")) + object.moniker = message.moniker; + if (message.identity != null && message.hasOwnProperty("identity")) + object.identity = message.identity; + if (message.website != null && message.hasOwnProperty("website")) + object.website = message.website; + if (message.securityContact != null && message.hasOwnProperty("securityContact")) + object.securityContact = message.securityContact; + if (message.details != null && message.hasOwnProperty("details")) + object.details = message.details; + return object; + }; + + /** + * Converts this Description to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.Description + * @instance + * @returns {Object.} JSON object + */ + Description.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Description; + })(v1beta1.Description || {}); + + v1beta1.Validator = (function(Validator) { + + /** + * Properties of a Validator. + * @memberof cosmos.staking.v1beta1 + * @interface IValidator + * @property {string|null} [operatorAddress] Validator operatorAddress + * @property {google.protobuf.IAny|null} [consensusPubkey] Validator consensusPubkey + * @property {boolean|null} [jailed] Validator jailed + * @property {cosmos.staking.v1beta1.BondStatus|null} [status] Validator status + * @property {string|null} [tokens] Validator tokens + * @property {string|null} [delegatorShares] Validator delegatorShares + * @property {cosmos.staking.v1beta1.IDescription|null} [description] Validator description + * @property {number|Long|null} [unbondingHeight] Validator unbondingHeight + * @property {google.protobuf.ITimestamp|null} [unbondingTime] Validator unbondingTime + * @property {cosmos.staking.v1beta1.ICommission|null} [commission] Validator commission + * @property {string|null} [minSelfDelegation] Validator minSelfDelegation + */ + + /** + * Constructs a new Validator. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a Validator. + * @implements IValidator + * @constructor + * @param {cosmos.staking.v1beta1.IValidator=} [properties] Properties to set + */ + function Validator(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Validator operatorAddress. + * @member {string} operatorAddress + * @memberof cosmos.staking.v1beta1.Validator + * @instance + */ + Validator.prototype.operatorAddress = ""; + + /** + * Validator consensusPubkey. + * @member {google.protobuf.IAny|null|undefined} consensusPubkey + * @memberof cosmos.staking.v1beta1.Validator + * @instance + */ + Validator.prototype.consensusPubkey = null; + + /** + * Validator jailed. + * @member {boolean} jailed + * @memberof cosmos.staking.v1beta1.Validator + * @instance + */ + Validator.prototype.jailed = false; + + /** + * Validator status. + * @member {cosmos.staking.v1beta1.BondStatus} status + * @memberof cosmos.staking.v1beta1.Validator + * @instance + */ + Validator.prototype.status = 0; + + /** + * Validator tokens. + * @member {string} tokens + * @memberof cosmos.staking.v1beta1.Validator + * @instance + */ + Validator.prototype.tokens = ""; + + /** + * Validator delegatorShares. + * @member {string} delegatorShares + * @memberof cosmos.staking.v1beta1.Validator + * @instance + */ + Validator.prototype.delegatorShares = ""; + + /** + * Validator description. + * @member {cosmos.staking.v1beta1.IDescription|null|undefined} description + * @memberof cosmos.staking.v1beta1.Validator + * @instance + */ + Validator.prototype.description = null; + + /** + * Validator unbondingHeight. + * @member {number|Long} unbondingHeight + * @memberof cosmos.staking.v1beta1.Validator + * @instance + */ + Validator.prototype.unbondingHeight = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Validator unbondingTime. + * @member {google.protobuf.ITimestamp|null|undefined} unbondingTime + * @memberof cosmos.staking.v1beta1.Validator + * @instance + */ + Validator.prototype.unbondingTime = null; + + /** + * Validator commission. + * @member {cosmos.staking.v1beta1.ICommission|null|undefined} commission + * @memberof cosmos.staking.v1beta1.Validator + * @instance + */ + Validator.prototype.commission = null; + + /** + * Validator minSelfDelegation. + * @member {string} minSelfDelegation + * @memberof cosmos.staking.v1beta1.Validator + * @instance + */ + Validator.prototype.minSelfDelegation = ""; + + /** + * Creates a new Validator instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.Validator + * @static + * @param {cosmos.staking.v1beta1.IValidator=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.Validator} Validator instance + */ + Validator.create = function create(properties) { + return new Validator(properties); + }; + + /** + * Encodes the specified Validator message. Does not implicitly {@link cosmos.staking.v1beta1.Validator.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.Validator + * @static + * @param {cosmos.staking.v1beta1.IValidator} message Validator message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Validator.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.operatorAddress != null && Object.hasOwnProperty.call(message, "operatorAddress")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.operatorAddress); + if (message.consensusPubkey != null && Object.hasOwnProperty.call(message, "consensusPubkey")) + $root.google.protobuf.Any.encode(message.consensusPubkey, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.jailed != null && Object.hasOwnProperty.call(message, "jailed")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.jailed); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.status); + if (message.tokens != null && Object.hasOwnProperty.call(message, "tokens")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.tokens); + if (message.delegatorShares != null && Object.hasOwnProperty.call(message, "delegatorShares")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.delegatorShares); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + $root.cosmos.staking.v1beta1.Description.encode(message.description, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.unbondingHeight != null && Object.hasOwnProperty.call(message, "unbondingHeight")) + writer.uint32(/* id 8, wireType 0 =*/64).int64(message.unbondingHeight); + if (message.unbondingTime != null && Object.hasOwnProperty.call(message, "unbondingTime")) + $root.google.protobuf.Timestamp.encode(message.unbondingTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.commission != null && Object.hasOwnProperty.call(message, "commission")) + $root.cosmos.staking.v1beta1.Commission.encode(message.commission, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.minSelfDelegation != null && Object.hasOwnProperty.call(message, "minSelfDelegation")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.minSelfDelegation); + return writer; + }; + + /** + * Encodes the specified Validator message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.Validator.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.Validator + * @static + * @param {cosmos.staking.v1beta1.IValidator} message Validator message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Validator.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Validator message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.Validator + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.Validator} Validator + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Validator.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.Validator(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.operatorAddress = reader.string(); + break; + case 2: + message.consensusPubkey = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + case 3: + message.jailed = reader.bool(); + break; + case 4: + message.status = reader.int32(); + break; + case 5: + message.tokens = reader.string(); + break; + case 6: + message.delegatorShares = reader.string(); + break; + case 7: + message.description = $root.cosmos.staking.v1beta1.Description.decode(reader, reader.uint32()); + break; + case 8: + message.unbondingHeight = reader.int64(); + break; + case 9: + message.unbondingTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 10: + message.commission = $root.cosmos.staking.v1beta1.Commission.decode(reader, reader.uint32()); + break; + case 11: + message.minSelfDelegation = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Validator message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.Validator + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.Validator} Validator + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Validator.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Validator message. + * @function verify + * @memberof cosmos.staking.v1beta1.Validator + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Validator.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.operatorAddress != null && message.hasOwnProperty("operatorAddress")) + if (!$util.isString(message.operatorAddress)) + return "operatorAddress: string expected"; + if (message.consensusPubkey != null && message.hasOwnProperty("consensusPubkey")) { + let error = $root.google.protobuf.Any.verify(message.consensusPubkey); + if (error) + return "consensusPubkey." + error; + } + if (message.jailed != null && message.hasOwnProperty("jailed")) + if (typeof message.jailed !== "boolean") + return "jailed: boolean expected"; + if (message.status != null && message.hasOwnProperty("status")) + switch (message.status) { + default: + return "status: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.tokens != null && message.hasOwnProperty("tokens")) + if (!$util.isString(message.tokens)) + return "tokens: string expected"; + if (message.delegatorShares != null && message.hasOwnProperty("delegatorShares")) + if (!$util.isString(message.delegatorShares)) + return "delegatorShares: string expected"; + if (message.description != null && message.hasOwnProperty("description")) { + let error = $root.cosmos.staking.v1beta1.Description.verify(message.description); + if (error) + return "description." + error; + } + if (message.unbondingHeight != null && message.hasOwnProperty("unbondingHeight")) + if (!$util.isInteger(message.unbondingHeight) && !(message.unbondingHeight && $util.isInteger(message.unbondingHeight.low) && $util.isInteger(message.unbondingHeight.high))) + return "unbondingHeight: integer|Long expected"; + if (message.unbondingTime != null && message.hasOwnProperty("unbondingTime")) { + let error = $root.google.protobuf.Timestamp.verify(message.unbondingTime); + if (error) + return "unbondingTime." + error; + } + if (message.commission != null && message.hasOwnProperty("commission")) { + let error = $root.cosmos.staking.v1beta1.Commission.verify(message.commission); + if (error) + return "commission." + error; + } + if (message.minSelfDelegation != null && message.hasOwnProperty("minSelfDelegation")) + if (!$util.isString(message.minSelfDelegation)) + return "minSelfDelegation: string expected"; + return null; + }; + + /** + * Creates a Validator message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.Validator + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.Validator} Validator + */ + Validator.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.Validator) + return object; + let message = new $root.cosmos.staking.v1beta1.Validator(); + if (object.operatorAddress != null) + message.operatorAddress = String(object.operatorAddress); + if (object.consensusPubkey != null) { + if (typeof object.consensusPubkey !== "object") + throw TypeError(".cosmos.staking.v1beta1.Validator.consensusPubkey: object expected"); + message.consensusPubkey = $root.google.protobuf.Any.fromObject(object.consensusPubkey); + } + if (object.jailed != null) + message.jailed = Boolean(object.jailed); + switch (object.status) { + case "BOND_STATUS_UNSPECIFIED": + case 0: + message.status = 0; + break; + case "BOND_STATUS_UNBONDED": + case 1: + message.status = 1; + break; + case "BOND_STATUS_UNBONDING": + case 2: + message.status = 2; + break; + case "BOND_STATUS_BONDED": + case 3: + message.status = 3; + break; + } + if (object.tokens != null) + message.tokens = String(object.tokens); + if (object.delegatorShares != null) + message.delegatorShares = String(object.delegatorShares); + if (object.description != null) { + if (typeof object.description !== "object") + throw TypeError(".cosmos.staking.v1beta1.Validator.description: object expected"); + message.description = $root.cosmos.staking.v1beta1.Description.fromObject(object.description); + } + if (object.unbondingHeight != null) + if ($util.Long) + (message.unbondingHeight = $util.Long.fromValue(object.unbondingHeight)).unsigned = false; + else if (typeof object.unbondingHeight === "string") + message.unbondingHeight = parseInt(object.unbondingHeight, 10); + else if (typeof object.unbondingHeight === "number") + message.unbondingHeight = object.unbondingHeight; + else if (typeof object.unbondingHeight === "object") + message.unbondingHeight = new $util.LongBits(object.unbondingHeight.low >>> 0, object.unbondingHeight.high >>> 0).toNumber(); + if (object.unbondingTime != null) { + if (typeof object.unbondingTime !== "object") + throw TypeError(".cosmos.staking.v1beta1.Validator.unbondingTime: object expected"); + message.unbondingTime = $root.google.protobuf.Timestamp.fromObject(object.unbondingTime); + } + if (object.commission != null) { + if (typeof object.commission !== "object") + throw TypeError(".cosmos.staking.v1beta1.Validator.commission: object expected"); + message.commission = $root.cosmos.staking.v1beta1.Commission.fromObject(object.commission); + } + if (object.minSelfDelegation != null) + message.minSelfDelegation = String(object.minSelfDelegation); + return message; + }; + + /** + * Creates a plain object from a Validator message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.Validator + * @static + * @param {cosmos.staking.v1beta1.Validator} message Validator + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Validator.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.operatorAddress = ""; + object.consensusPubkey = null; + object.jailed = false; + object.status = options.enums === String ? "BOND_STATUS_UNSPECIFIED" : 0; + object.tokens = ""; + object.delegatorShares = ""; + object.description = null; + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.unbondingHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.unbondingHeight = options.longs === String ? "0" : 0; + object.unbondingTime = null; + object.commission = null; + object.minSelfDelegation = ""; + } + if (message.operatorAddress != null && message.hasOwnProperty("operatorAddress")) + object.operatorAddress = message.operatorAddress; + if (message.consensusPubkey != null && message.hasOwnProperty("consensusPubkey")) + object.consensusPubkey = $root.google.protobuf.Any.toObject(message.consensusPubkey, options); + if (message.jailed != null && message.hasOwnProperty("jailed")) + object.jailed = message.jailed; + if (message.status != null && message.hasOwnProperty("status")) + object.status = options.enums === String ? $root.cosmos.staking.v1beta1.BondStatus[message.status] : message.status; + if (message.tokens != null && message.hasOwnProperty("tokens")) + object.tokens = message.tokens; + if (message.delegatorShares != null && message.hasOwnProperty("delegatorShares")) + object.delegatorShares = message.delegatorShares; + if (message.description != null && message.hasOwnProperty("description")) + object.description = $root.cosmos.staking.v1beta1.Description.toObject(message.description, options); + if (message.unbondingHeight != null && message.hasOwnProperty("unbondingHeight")) + if (typeof message.unbondingHeight === "number") + object.unbondingHeight = options.longs === String ? String(message.unbondingHeight) : message.unbondingHeight; + else + object.unbondingHeight = options.longs === String ? $util.Long.prototype.toString.call(message.unbondingHeight) : options.longs === Number ? new $util.LongBits(message.unbondingHeight.low >>> 0, message.unbondingHeight.high >>> 0).toNumber() : message.unbondingHeight; + if (message.unbondingTime != null && message.hasOwnProperty("unbondingTime")) + object.unbondingTime = $root.google.protobuf.Timestamp.toObject(message.unbondingTime, options); + if (message.commission != null && message.hasOwnProperty("commission")) + object.commission = $root.cosmos.staking.v1beta1.Commission.toObject(message.commission, options); + if (message.minSelfDelegation != null && message.hasOwnProperty("minSelfDelegation")) + object.minSelfDelegation = message.minSelfDelegation; + return object; + }; + + /** + * Converts this Validator to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.Validator + * @instance + * @returns {Object.} JSON object + */ + Validator.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Validator; + })(v1beta1.Validator || {}); + + /** + * BondStatus enum. + * @name cosmos.staking.v1beta1.BondStatus + * @enum {string} + * @property {number} BOND_STATUS_UNSPECIFIED=0 BOND_STATUS_UNSPECIFIED value + * @property {number} BOND_STATUS_UNBONDED=1 BOND_STATUS_UNBONDED value + * @property {number} BOND_STATUS_UNBONDING=2 BOND_STATUS_UNBONDING value + * @property {number} BOND_STATUS_BONDED=3 BOND_STATUS_BONDED value + */ + v1beta1.BondStatus = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "BOND_STATUS_UNSPECIFIED"] = 0; + values[valuesById[1] = "BOND_STATUS_UNBONDED"] = 1; + values[valuesById[2] = "BOND_STATUS_UNBONDING"] = 2; + values[valuesById[3] = "BOND_STATUS_BONDED"] = 3; + return values; + })(); + + v1beta1.ValAddresses = (function(ValAddresses) { + + /** + * Properties of a ValAddresses. + * @memberof cosmos.staking.v1beta1 + * @interface IValAddresses + * @property {Array.|null} [addresses] ValAddresses addresses + */ + + /** + * Constructs a new ValAddresses. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a ValAddresses. + * @implements IValAddresses + * @constructor + * @param {cosmos.staking.v1beta1.IValAddresses=} [properties] Properties to set + */ + function ValAddresses(properties) { + this.addresses = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ValAddresses addresses. + * @member {Array.} addresses + * @memberof cosmos.staking.v1beta1.ValAddresses + * @instance + */ + ValAddresses.prototype.addresses = $util.emptyArray; + + /** + * Creates a new ValAddresses instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.ValAddresses + * @static + * @param {cosmos.staking.v1beta1.IValAddresses=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.ValAddresses} ValAddresses instance + */ + ValAddresses.create = function create(properties) { + return new ValAddresses(properties); + }; + + /** + * Encodes the specified ValAddresses message. Does not implicitly {@link cosmos.staking.v1beta1.ValAddresses.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.ValAddresses + * @static + * @param {cosmos.staking.v1beta1.IValAddresses} message ValAddresses message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValAddresses.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.addresses != null && message.addresses.length) + for (let i = 0; i < message.addresses.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.addresses[i]); + return writer; + }; + + /** + * Encodes the specified ValAddresses message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.ValAddresses.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.ValAddresses + * @static + * @param {cosmos.staking.v1beta1.IValAddresses} message ValAddresses message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValAddresses.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ValAddresses message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.ValAddresses + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.ValAddresses} ValAddresses + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValAddresses.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.ValAddresses(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.addresses && message.addresses.length)) + message.addresses = []; + message.addresses.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ValAddresses message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.ValAddresses + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.ValAddresses} ValAddresses + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValAddresses.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ValAddresses message. + * @function verify + * @memberof cosmos.staking.v1beta1.ValAddresses + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ValAddresses.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.addresses != null && message.hasOwnProperty("addresses")) { + if (!Array.isArray(message.addresses)) + return "addresses: array expected"; + for (let i = 0; i < message.addresses.length; ++i) + if (!$util.isString(message.addresses[i])) + return "addresses: string[] expected"; + } + return null; + }; + + /** + * Creates a ValAddresses message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.ValAddresses + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.ValAddresses} ValAddresses + */ + ValAddresses.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.ValAddresses) + return object; + let message = new $root.cosmos.staking.v1beta1.ValAddresses(); + if (object.addresses) { + if (!Array.isArray(object.addresses)) + throw TypeError(".cosmos.staking.v1beta1.ValAddresses.addresses: array expected"); + message.addresses = []; + for (let i = 0; i < object.addresses.length; ++i) + message.addresses[i] = String(object.addresses[i]); + } + return message; + }; + + /** + * Creates a plain object from a ValAddresses message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.ValAddresses + * @static + * @param {cosmos.staking.v1beta1.ValAddresses} message ValAddresses + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ValAddresses.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.addresses = []; + if (message.addresses && message.addresses.length) { + object.addresses = []; + for (let j = 0; j < message.addresses.length; ++j) + object.addresses[j] = message.addresses[j]; + } + return object; + }; + + /** + * Converts this ValAddresses to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.ValAddresses + * @instance + * @returns {Object.} JSON object + */ + ValAddresses.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ValAddresses; + })(v1beta1.ValAddresses || {}); + + v1beta1.DVPair = (function(DVPair) { + + /** + * Properties of a DVPair. + * @memberof cosmos.staking.v1beta1 + * @interface IDVPair + * @property {string|null} [delegatorAddress] DVPair delegatorAddress + * @property {string|null} [validatorAddress] DVPair validatorAddress + */ + + /** + * Constructs a new DVPair. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a DVPair. + * @implements IDVPair + * @constructor + * @param {cosmos.staking.v1beta1.IDVPair=} [properties] Properties to set + */ + function DVPair(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DVPair delegatorAddress. + * @member {string} delegatorAddress + * @memberof cosmos.staking.v1beta1.DVPair + * @instance + */ + DVPair.prototype.delegatorAddress = ""; + + /** + * DVPair validatorAddress. + * @member {string} validatorAddress + * @memberof cosmos.staking.v1beta1.DVPair + * @instance + */ + DVPair.prototype.validatorAddress = ""; + + /** + * Creates a new DVPair instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.DVPair + * @static + * @param {cosmos.staking.v1beta1.IDVPair=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.DVPair} DVPair instance + */ + DVPair.create = function create(properties) { + return new DVPair(properties); + }; + + /** + * Encodes the specified DVPair message. Does not implicitly {@link cosmos.staking.v1beta1.DVPair.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.DVPair + * @static + * @param {cosmos.staking.v1beta1.IDVPair} message DVPair message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DVPair.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.delegatorAddress != null && Object.hasOwnProperty.call(message, "delegatorAddress")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.delegatorAddress); + if (message.validatorAddress != null && Object.hasOwnProperty.call(message, "validatorAddress")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.validatorAddress); + return writer; + }; + + /** + * Encodes the specified DVPair message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.DVPair.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.DVPair + * @static + * @param {cosmos.staking.v1beta1.IDVPair} message DVPair message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DVPair.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DVPair message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.DVPair + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.DVPair} DVPair + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DVPair.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.DVPair(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.delegatorAddress = reader.string(); + break; + case 2: + message.validatorAddress = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DVPair message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.DVPair + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.DVPair} DVPair + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DVPair.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DVPair message. + * @function verify + * @memberof cosmos.staking.v1beta1.DVPair + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DVPair.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + if (!$util.isString(message.delegatorAddress)) + return "delegatorAddress: string expected"; + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + if (!$util.isString(message.validatorAddress)) + return "validatorAddress: string expected"; + return null; + }; + + /** + * Creates a DVPair message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.DVPair + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.DVPair} DVPair + */ + DVPair.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.DVPair) + return object; + let message = new $root.cosmos.staking.v1beta1.DVPair(); + if (object.delegatorAddress != null) + message.delegatorAddress = String(object.delegatorAddress); + if (object.validatorAddress != null) + message.validatorAddress = String(object.validatorAddress); + return message; + }; + + /** + * Creates a plain object from a DVPair message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.DVPair + * @static + * @param {cosmos.staking.v1beta1.DVPair} message DVPair + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DVPair.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.delegatorAddress = ""; + object.validatorAddress = ""; + } + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + object.delegatorAddress = message.delegatorAddress; + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + object.validatorAddress = message.validatorAddress; + return object; + }; + + /** + * Converts this DVPair to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.DVPair + * @instance + * @returns {Object.} JSON object + */ + DVPair.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DVPair; + })(v1beta1.DVPair || {}); + + v1beta1.DVPairs = (function(DVPairs) { + + /** + * Properties of a DVPairs. + * @memberof cosmos.staking.v1beta1 + * @interface IDVPairs + * @property {Array.|null} [pairs] DVPairs pairs + */ + + /** + * Constructs a new DVPairs. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a DVPairs. + * @implements IDVPairs + * @constructor + * @param {cosmos.staking.v1beta1.IDVPairs=} [properties] Properties to set + */ + function DVPairs(properties) { + this.pairs = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DVPairs pairs. + * @member {Array.} pairs + * @memberof cosmos.staking.v1beta1.DVPairs + * @instance + */ + DVPairs.prototype.pairs = $util.emptyArray; + + /** + * Creates a new DVPairs instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.DVPairs + * @static + * @param {cosmos.staking.v1beta1.IDVPairs=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.DVPairs} DVPairs instance + */ + DVPairs.create = function create(properties) { + return new DVPairs(properties); + }; + + /** + * Encodes the specified DVPairs message. Does not implicitly {@link cosmos.staking.v1beta1.DVPairs.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.DVPairs + * @static + * @param {cosmos.staking.v1beta1.IDVPairs} message DVPairs message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DVPairs.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pairs != null && message.pairs.length) + for (let i = 0; i < message.pairs.length; ++i) + $root.cosmos.staking.v1beta1.DVPair.encode(message.pairs[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DVPairs message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.DVPairs.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.DVPairs + * @static + * @param {cosmos.staking.v1beta1.IDVPairs} message DVPairs message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DVPairs.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DVPairs message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.DVPairs + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.DVPairs} DVPairs + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DVPairs.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.DVPairs(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.pairs && message.pairs.length)) + message.pairs = []; + message.pairs.push($root.cosmos.staking.v1beta1.DVPair.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DVPairs message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.DVPairs + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.DVPairs} DVPairs + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DVPairs.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DVPairs message. + * @function verify + * @memberof cosmos.staking.v1beta1.DVPairs + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DVPairs.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.pairs != null && message.hasOwnProperty("pairs")) { + if (!Array.isArray(message.pairs)) + return "pairs: array expected"; + for (let i = 0; i < message.pairs.length; ++i) { + let error = $root.cosmos.staking.v1beta1.DVPair.verify(message.pairs[i]); + if (error) + return "pairs." + error; + } + } + return null; + }; + + /** + * Creates a DVPairs message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.DVPairs + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.DVPairs} DVPairs + */ + DVPairs.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.DVPairs) + return object; + let message = new $root.cosmos.staking.v1beta1.DVPairs(); + if (object.pairs) { + if (!Array.isArray(object.pairs)) + throw TypeError(".cosmos.staking.v1beta1.DVPairs.pairs: array expected"); + message.pairs = []; + for (let i = 0; i < object.pairs.length; ++i) { + if (typeof object.pairs[i] !== "object") + throw TypeError(".cosmos.staking.v1beta1.DVPairs.pairs: object expected"); + message.pairs[i] = $root.cosmos.staking.v1beta1.DVPair.fromObject(object.pairs[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a DVPairs message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.DVPairs + * @static + * @param {cosmos.staking.v1beta1.DVPairs} message DVPairs + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DVPairs.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.pairs = []; + if (message.pairs && message.pairs.length) { + object.pairs = []; + for (let j = 0; j < message.pairs.length; ++j) + object.pairs[j] = $root.cosmos.staking.v1beta1.DVPair.toObject(message.pairs[j], options); + } + return object; + }; + + /** + * Converts this DVPairs to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.DVPairs + * @instance + * @returns {Object.} JSON object + */ + DVPairs.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DVPairs; + })(v1beta1.DVPairs || {}); + + v1beta1.DVVTriplet = (function(DVVTriplet) { + + /** + * Properties of a DVVTriplet. + * @memberof cosmos.staking.v1beta1 + * @interface IDVVTriplet + * @property {string|null} [delegatorAddress] DVVTriplet delegatorAddress + * @property {string|null} [validatorSrcAddress] DVVTriplet validatorSrcAddress + * @property {string|null} [validatorDstAddress] DVVTriplet validatorDstAddress + */ + + /** + * Constructs a new DVVTriplet. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a DVVTriplet. + * @implements IDVVTriplet + * @constructor + * @param {cosmos.staking.v1beta1.IDVVTriplet=} [properties] Properties to set + */ + function DVVTriplet(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DVVTriplet delegatorAddress. + * @member {string} delegatorAddress + * @memberof cosmos.staking.v1beta1.DVVTriplet + * @instance + */ + DVVTriplet.prototype.delegatorAddress = ""; + + /** + * DVVTriplet validatorSrcAddress. + * @member {string} validatorSrcAddress + * @memberof cosmos.staking.v1beta1.DVVTriplet + * @instance + */ + DVVTriplet.prototype.validatorSrcAddress = ""; + + /** + * DVVTriplet validatorDstAddress. + * @member {string} validatorDstAddress + * @memberof cosmos.staking.v1beta1.DVVTriplet + * @instance + */ + DVVTriplet.prototype.validatorDstAddress = ""; + + /** + * Creates a new DVVTriplet instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.DVVTriplet + * @static + * @param {cosmos.staking.v1beta1.IDVVTriplet=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.DVVTriplet} DVVTriplet instance + */ + DVVTriplet.create = function create(properties) { + return new DVVTriplet(properties); + }; + + /** + * Encodes the specified DVVTriplet message. Does not implicitly {@link cosmos.staking.v1beta1.DVVTriplet.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.DVVTriplet + * @static + * @param {cosmos.staking.v1beta1.IDVVTriplet} message DVVTriplet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DVVTriplet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.delegatorAddress != null && Object.hasOwnProperty.call(message, "delegatorAddress")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.delegatorAddress); + if (message.validatorSrcAddress != null && Object.hasOwnProperty.call(message, "validatorSrcAddress")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.validatorSrcAddress); + if (message.validatorDstAddress != null && Object.hasOwnProperty.call(message, "validatorDstAddress")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.validatorDstAddress); + return writer; + }; + + /** + * Encodes the specified DVVTriplet message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.DVVTriplet.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.DVVTriplet + * @static + * @param {cosmos.staking.v1beta1.IDVVTriplet} message DVVTriplet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DVVTriplet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DVVTriplet message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.DVVTriplet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.DVVTriplet} DVVTriplet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DVVTriplet.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.DVVTriplet(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.delegatorAddress = reader.string(); + break; + case 2: + message.validatorSrcAddress = reader.string(); + break; + case 3: + message.validatorDstAddress = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DVVTriplet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.DVVTriplet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.DVVTriplet} DVVTriplet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DVVTriplet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DVVTriplet message. + * @function verify + * @memberof cosmos.staking.v1beta1.DVVTriplet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DVVTriplet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + if (!$util.isString(message.delegatorAddress)) + return "delegatorAddress: string expected"; + if (message.validatorSrcAddress != null && message.hasOwnProperty("validatorSrcAddress")) + if (!$util.isString(message.validatorSrcAddress)) + return "validatorSrcAddress: string expected"; + if (message.validatorDstAddress != null && message.hasOwnProperty("validatorDstAddress")) + if (!$util.isString(message.validatorDstAddress)) + return "validatorDstAddress: string expected"; + return null; + }; + + /** + * Creates a DVVTriplet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.DVVTriplet + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.DVVTriplet} DVVTriplet + */ + DVVTriplet.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.DVVTriplet) + return object; + let message = new $root.cosmos.staking.v1beta1.DVVTriplet(); + if (object.delegatorAddress != null) + message.delegatorAddress = String(object.delegatorAddress); + if (object.validatorSrcAddress != null) + message.validatorSrcAddress = String(object.validatorSrcAddress); + if (object.validatorDstAddress != null) + message.validatorDstAddress = String(object.validatorDstAddress); + return message; + }; + + /** + * Creates a plain object from a DVVTriplet message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.DVVTriplet + * @static + * @param {cosmos.staking.v1beta1.DVVTriplet} message DVVTriplet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DVVTriplet.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.delegatorAddress = ""; + object.validatorSrcAddress = ""; + object.validatorDstAddress = ""; + } + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + object.delegatorAddress = message.delegatorAddress; + if (message.validatorSrcAddress != null && message.hasOwnProperty("validatorSrcAddress")) + object.validatorSrcAddress = message.validatorSrcAddress; + if (message.validatorDstAddress != null && message.hasOwnProperty("validatorDstAddress")) + object.validatorDstAddress = message.validatorDstAddress; + return object; + }; + + /** + * Converts this DVVTriplet to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.DVVTriplet + * @instance + * @returns {Object.} JSON object + */ + DVVTriplet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DVVTriplet; + })(v1beta1.DVVTriplet || {}); + + v1beta1.DVVTriplets = (function(DVVTriplets) { + + /** + * Properties of a DVVTriplets. + * @memberof cosmos.staking.v1beta1 + * @interface IDVVTriplets + * @property {Array.|null} [triplets] DVVTriplets triplets + */ + + /** + * Constructs a new DVVTriplets. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a DVVTriplets. + * @implements IDVVTriplets + * @constructor + * @param {cosmos.staking.v1beta1.IDVVTriplets=} [properties] Properties to set + */ + function DVVTriplets(properties) { + this.triplets = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DVVTriplets triplets. + * @member {Array.} triplets + * @memberof cosmos.staking.v1beta1.DVVTriplets + * @instance + */ + DVVTriplets.prototype.triplets = $util.emptyArray; + + /** + * Creates a new DVVTriplets instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.DVVTriplets + * @static + * @param {cosmos.staking.v1beta1.IDVVTriplets=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.DVVTriplets} DVVTriplets instance + */ + DVVTriplets.create = function create(properties) { + return new DVVTriplets(properties); + }; + + /** + * Encodes the specified DVVTriplets message. Does not implicitly {@link cosmos.staking.v1beta1.DVVTriplets.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.DVVTriplets + * @static + * @param {cosmos.staking.v1beta1.IDVVTriplets} message DVVTriplets message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DVVTriplets.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.triplets != null && message.triplets.length) + for (let i = 0; i < message.triplets.length; ++i) + $root.cosmos.staking.v1beta1.DVVTriplet.encode(message.triplets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DVVTriplets message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.DVVTriplets.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.DVVTriplets + * @static + * @param {cosmos.staking.v1beta1.IDVVTriplets} message DVVTriplets message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DVVTriplets.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DVVTriplets message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.DVVTriplets + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.DVVTriplets} DVVTriplets + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DVVTriplets.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.DVVTriplets(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.triplets && message.triplets.length)) + message.triplets = []; + message.triplets.push($root.cosmos.staking.v1beta1.DVVTriplet.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DVVTriplets message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.DVVTriplets + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.DVVTriplets} DVVTriplets + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DVVTriplets.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DVVTriplets message. + * @function verify + * @memberof cosmos.staking.v1beta1.DVVTriplets + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DVVTriplets.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.triplets != null && message.hasOwnProperty("triplets")) { + if (!Array.isArray(message.triplets)) + return "triplets: array expected"; + for (let i = 0; i < message.triplets.length; ++i) { + let error = $root.cosmos.staking.v1beta1.DVVTriplet.verify(message.triplets[i]); + if (error) + return "triplets." + error; + } + } + return null; + }; + + /** + * Creates a DVVTriplets message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.DVVTriplets + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.DVVTriplets} DVVTriplets + */ + DVVTriplets.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.DVVTriplets) + return object; + let message = new $root.cosmos.staking.v1beta1.DVVTriplets(); + if (object.triplets) { + if (!Array.isArray(object.triplets)) + throw TypeError(".cosmos.staking.v1beta1.DVVTriplets.triplets: array expected"); + message.triplets = []; + for (let i = 0; i < object.triplets.length; ++i) { + if (typeof object.triplets[i] !== "object") + throw TypeError(".cosmos.staking.v1beta1.DVVTriplets.triplets: object expected"); + message.triplets[i] = $root.cosmos.staking.v1beta1.DVVTriplet.fromObject(object.triplets[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a DVVTriplets message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.DVVTriplets + * @static + * @param {cosmos.staking.v1beta1.DVVTriplets} message DVVTriplets + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DVVTriplets.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.triplets = []; + if (message.triplets && message.triplets.length) { + object.triplets = []; + for (let j = 0; j < message.triplets.length; ++j) + object.triplets[j] = $root.cosmos.staking.v1beta1.DVVTriplet.toObject(message.triplets[j], options); + } + return object; + }; + + /** + * Converts this DVVTriplets to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.DVVTriplets + * @instance + * @returns {Object.} JSON object + */ + DVVTriplets.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DVVTriplets; + })(v1beta1.DVVTriplets || {}); + + v1beta1.Delegation = (function(Delegation) { + + /** + * Properties of a Delegation. + * @memberof cosmos.staking.v1beta1 + * @interface IDelegation + * @property {string|null} [delegatorAddress] Delegation delegatorAddress + * @property {string|null} [validatorAddress] Delegation validatorAddress + * @property {string|null} [shares] Delegation shares + */ + + /** + * Constructs a new Delegation. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a Delegation. + * @implements IDelegation + * @constructor + * @param {cosmos.staking.v1beta1.IDelegation=} [properties] Properties to set + */ + function Delegation(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Delegation delegatorAddress. + * @member {string} delegatorAddress + * @memberof cosmos.staking.v1beta1.Delegation + * @instance + */ + Delegation.prototype.delegatorAddress = ""; + + /** + * Delegation validatorAddress. + * @member {string} validatorAddress + * @memberof cosmos.staking.v1beta1.Delegation + * @instance + */ + Delegation.prototype.validatorAddress = ""; + + /** + * Delegation shares. + * @member {string} shares + * @memberof cosmos.staking.v1beta1.Delegation + * @instance + */ + Delegation.prototype.shares = ""; + + /** + * Creates a new Delegation instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.Delegation + * @static + * @param {cosmos.staking.v1beta1.IDelegation=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.Delegation} Delegation instance + */ + Delegation.create = function create(properties) { + return new Delegation(properties); + }; + + /** + * Encodes the specified Delegation message. Does not implicitly {@link cosmos.staking.v1beta1.Delegation.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.Delegation + * @static + * @param {cosmos.staking.v1beta1.IDelegation} message Delegation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Delegation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.delegatorAddress != null && Object.hasOwnProperty.call(message, "delegatorAddress")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.delegatorAddress); + if (message.validatorAddress != null && Object.hasOwnProperty.call(message, "validatorAddress")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.validatorAddress); + if (message.shares != null && Object.hasOwnProperty.call(message, "shares")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.shares); + return writer; + }; + + /** + * Encodes the specified Delegation message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.Delegation.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.Delegation + * @static + * @param {cosmos.staking.v1beta1.IDelegation} message Delegation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Delegation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Delegation message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.Delegation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.Delegation} Delegation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Delegation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.Delegation(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.delegatorAddress = reader.string(); + break; + case 2: + message.validatorAddress = reader.string(); + break; + case 3: + message.shares = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Delegation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.Delegation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.Delegation} Delegation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Delegation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Delegation message. + * @function verify + * @memberof cosmos.staking.v1beta1.Delegation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Delegation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + if (!$util.isString(message.delegatorAddress)) + return "delegatorAddress: string expected"; + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + if (!$util.isString(message.validatorAddress)) + return "validatorAddress: string expected"; + if (message.shares != null && message.hasOwnProperty("shares")) + if (!$util.isString(message.shares)) + return "shares: string expected"; + return null; + }; + + /** + * Creates a Delegation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.Delegation + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.Delegation} Delegation + */ + Delegation.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.Delegation) + return object; + let message = new $root.cosmos.staking.v1beta1.Delegation(); + if (object.delegatorAddress != null) + message.delegatorAddress = String(object.delegatorAddress); + if (object.validatorAddress != null) + message.validatorAddress = String(object.validatorAddress); + if (object.shares != null) + message.shares = String(object.shares); + return message; + }; + + /** + * Creates a plain object from a Delegation message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.Delegation + * @static + * @param {cosmos.staking.v1beta1.Delegation} message Delegation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Delegation.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.delegatorAddress = ""; + object.validatorAddress = ""; + object.shares = ""; + } + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + object.delegatorAddress = message.delegatorAddress; + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + object.validatorAddress = message.validatorAddress; + if (message.shares != null && message.hasOwnProperty("shares")) + object.shares = message.shares; + return object; + }; + + /** + * Converts this Delegation to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.Delegation + * @instance + * @returns {Object.} JSON object + */ + Delegation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Delegation; + })(v1beta1.Delegation || {}); + + v1beta1.UnbondingDelegation = (function(UnbondingDelegation) { + + /** + * Properties of an UnbondingDelegation. + * @memberof cosmos.staking.v1beta1 + * @interface IUnbondingDelegation + * @property {string|null} [delegatorAddress] UnbondingDelegation delegatorAddress + * @property {string|null} [validatorAddress] UnbondingDelegation validatorAddress + * @property {Array.|null} [entries] UnbondingDelegation entries + */ + + /** + * Constructs a new UnbondingDelegation. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents an UnbondingDelegation. + * @implements IUnbondingDelegation + * @constructor + * @param {cosmos.staking.v1beta1.IUnbondingDelegation=} [properties] Properties to set + */ + function UnbondingDelegation(properties) { + this.entries = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UnbondingDelegation delegatorAddress. + * @member {string} delegatorAddress + * @memberof cosmos.staking.v1beta1.UnbondingDelegation + * @instance + */ + UnbondingDelegation.prototype.delegatorAddress = ""; + + /** + * UnbondingDelegation validatorAddress. + * @member {string} validatorAddress + * @memberof cosmos.staking.v1beta1.UnbondingDelegation + * @instance + */ + UnbondingDelegation.prototype.validatorAddress = ""; + + /** + * UnbondingDelegation entries. + * @member {Array.} entries + * @memberof cosmos.staking.v1beta1.UnbondingDelegation + * @instance + */ + UnbondingDelegation.prototype.entries = $util.emptyArray; + + /** + * Creates a new UnbondingDelegation instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.UnbondingDelegation + * @static + * @param {cosmos.staking.v1beta1.IUnbondingDelegation=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.UnbondingDelegation} UnbondingDelegation instance + */ + UnbondingDelegation.create = function create(properties) { + return new UnbondingDelegation(properties); + }; + + /** + * Encodes the specified UnbondingDelegation message. Does not implicitly {@link cosmos.staking.v1beta1.UnbondingDelegation.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.UnbondingDelegation + * @static + * @param {cosmos.staking.v1beta1.IUnbondingDelegation} message UnbondingDelegation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UnbondingDelegation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.delegatorAddress != null && Object.hasOwnProperty.call(message, "delegatorAddress")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.delegatorAddress); + if (message.validatorAddress != null && Object.hasOwnProperty.call(message, "validatorAddress")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.validatorAddress); + if (message.entries != null && message.entries.length) + for (let i = 0; i < message.entries.length; ++i) + $root.cosmos.staking.v1beta1.UnbondingDelegationEntry.encode(message.entries[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UnbondingDelegation message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.UnbondingDelegation.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.UnbondingDelegation + * @static + * @param {cosmos.staking.v1beta1.IUnbondingDelegation} message UnbondingDelegation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UnbondingDelegation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UnbondingDelegation message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.UnbondingDelegation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.UnbondingDelegation} UnbondingDelegation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UnbondingDelegation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.UnbondingDelegation(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.delegatorAddress = reader.string(); + break; + case 2: + message.validatorAddress = reader.string(); + break; + case 3: + if (!(message.entries && message.entries.length)) + message.entries = []; + message.entries.push($root.cosmos.staking.v1beta1.UnbondingDelegationEntry.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UnbondingDelegation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.UnbondingDelegation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.UnbondingDelegation} UnbondingDelegation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UnbondingDelegation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UnbondingDelegation message. + * @function verify + * @memberof cosmos.staking.v1beta1.UnbondingDelegation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UnbondingDelegation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + if (!$util.isString(message.delegatorAddress)) + return "delegatorAddress: string expected"; + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + if (!$util.isString(message.validatorAddress)) + return "validatorAddress: string expected"; + if (message.entries != null && message.hasOwnProperty("entries")) { + if (!Array.isArray(message.entries)) + return "entries: array expected"; + for (let i = 0; i < message.entries.length; ++i) { + let error = $root.cosmos.staking.v1beta1.UnbondingDelegationEntry.verify(message.entries[i]); + if (error) + return "entries." + error; + } + } + return null; + }; + + /** + * Creates an UnbondingDelegation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.UnbondingDelegation + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.UnbondingDelegation} UnbondingDelegation + */ + UnbondingDelegation.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.UnbondingDelegation) + return object; + let message = new $root.cosmos.staking.v1beta1.UnbondingDelegation(); + if (object.delegatorAddress != null) + message.delegatorAddress = String(object.delegatorAddress); + if (object.validatorAddress != null) + message.validatorAddress = String(object.validatorAddress); + if (object.entries) { + if (!Array.isArray(object.entries)) + throw TypeError(".cosmos.staking.v1beta1.UnbondingDelegation.entries: array expected"); + message.entries = []; + for (let i = 0; i < object.entries.length; ++i) { + if (typeof object.entries[i] !== "object") + throw TypeError(".cosmos.staking.v1beta1.UnbondingDelegation.entries: object expected"); + message.entries[i] = $root.cosmos.staking.v1beta1.UnbondingDelegationEntry.fromObject(object.entries[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an UnbondingDelegation message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.UnbondingDelegation + * @static + * @param {cosmos.staking.v1beta1.UnbondingDelegation} message UnbondingDelegation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UnbondingDelegation.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.entries = []; + if (options.defaults) { + object.delegatorAddress = ""; + object.validatorAddress = ""; + } + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + object.delegatorAddress = message.delegatorAddress; + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + object.validatorAddress = message.validatorAddress; + if (message.entries && message.entries.length) { + object.entries = []; + for (let j = 0; j < message.entries.length; ++j) + object.entries[j] = $root.cosmos.staking.v1beta1.UnbondingDelegationEntry.toObject(message.entries[j], options); + } + return object; + }; + + /** + * Converts this UnbondingDelegation to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.UnbondingDelegation + * @instance + * @returns {Object.} JSON object + */ + UnbondingDelegation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UnbondingDelegation; + })(v1beta1.UnbondingDelegation || {}); + + v1beta1.UnbondingDelegationEntry = (function(UnbondingDelegationEntry) { + + /** + * Properties of an UnbondingDelegationEntry. + * @memberof cosmos.staking.v1beta1 + * @interface IUnbondingDelegationEntry + * @property {number|Long|null} [creationHeight] UnbondingDelegationEntry creationHeight + * @property {google.protobuf.ITimestamp|null} [completionTime] UnbondingDelegationEntry completionTime + * @property {string|null} [initialBalance] UnbondingDelegationEntry initialBalance + * @property {string|null} [balance] UnbondingDelegationEntry balance + */ + + /** + * Constructs a new UnbondingDelegationEntry. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents an UnbondingDelegationEntry. + * @implements IUnbondingDelegationEntry + * @constructor + * @param {cosmos.staking.v1beta1.IUnbondingDelegationEntry=} [properties] Properties to set + */ + function UnbondingDelegationEntry(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UnbondingDelegationEntry creationHeight. + * @member {number|Long} creationHeight + * @memberof cosmos.staking.v1beta1.UnbondingDelegationEntry + * @instance + */ + UnbondingDelegationEntry.prototype.creationHeight = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * UnbondingDelegationEntry completionTime. + * @member {google.protobuf.ITimestamp|null|undefined} completionTime + * @memberof cosmos.staking.v1beta1.UnbondingDelegationEntry + * @instance + */ + UnbondingDelegationEntry.prototype.completionTime = null; + + /** + * UnbondingDelegationEntry initialBalance. + * @member {string} initialBalance + * @memberof cosmos.staking.v1beta1.UnbondingDelegationEntry + * @instance + */ + UnbondingDelegationEntry.prototype.initialBalance = ""; + + /** + * UnbondingDelegationEntry balance. + * @member {string} balance + * @memberof cosmos.staking.v1beta1.UnbondingDelegationEntry + * @instance + */ + UnbondingDelegationEntry.prototype.balance = ""; + + /** + * Creates a new UnbondingDelegationEntry instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.UnbondingDelegationEntry + * @static + * @param {cosmos.staking.v1beta1.IUnbondingDelegationEntry=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.UnbondingDelegationEntry} UnbondingDelegationEntry instance + */ + UnbondingDelegationEntry.create = function create(properties) { + return new UnbondingDelegationEntry(properties); + }; + + /** + * Encodes the specified UnbondingDelegationEntry message. Does not implicitly {@link cosmos.staking.v1beta1.UnbondingDelegationEntry.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.UnbondingDelegationEntry + * @static + * @param {cosmos.staking.v1beta1.IUnbondingDelegationEntry} message UnbondingDelegationEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UnbondingDelegationEntry.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.creationHeight != null && Object.hasOwnProperty.call(message, "creationHeight")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.creationHeight); + if (message.completionTime != null && Object.hasOwnProperty.call(message, "completionTime")) + $root.google.protobuf.Timestamp.encode(message.completionTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.initialBalance != null && Object.hasOwnProperty.call(message, "initialBalance")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.initialBalance); + if (message.balance != null && Object.hasOwnProperty.call(message, "balance")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.balance); + return writer; + }; + + /** + * Encodes the specified UnbondingDelegationEntry message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.UnbondingDelegationEntry.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.UnbondingDelegationEntry + * @static + * @param {cosmos.staking.v1beta1.IUnbondingDelegationEntry} message UnbondingDelegationEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UnbondingDelegationEntry.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UnbondingDelegationEntry message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.UnbondingDelegationEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.UnbondingDelegationEntry} UnbondingDelegationEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UnbondingDelegationEntry.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.UnbondingDelegationEntry(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.creationHeight = reader.int64(); + break; + case 2: + message.completionTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 3: + message.initialBalance = reader.string(); + break; + case 4: + message.balance = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UnbondingDelegationEntry message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.UnbondingDelegationEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.UnbondingDelegationEntry} UnbondingDelegationEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UnbondingDelegationEntry.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UnbondingDelegationEntry message. + * @function verify + * @memberof cosmos.staking.v1beta1.UnbondingDelegationEntry + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UnbondingDelegationEntry.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.creationHeight != null && message.hasOwnProperty("creationHeight")) + if (!$util.isInteger(message.creationHeight) && !(message.creationHeight && $util.isInteger(message.creationHeight.low) && $util.isInteger(message.creationHeight.high))) + return "creationHeight: integer|Long expected"; + if (message.completionTime != null && message.hasOwnProperty("completionTime")) { + let error = $root.google.protobuf.Timestamp.verify(message.completionTime); + if (error) + return "completionTime." + error; + } + if (message.initialBalance != null && message.hasOwnProperty("initialBalance")) + if (!$util.isString(message.initialBalance)) + return "initialBalance: string expected"; + if (message.balance != null && message.hasOwnProperty("balance")) + if (!$util.isString(message.balance)) + return "balance: string expected"; + return null; + }; + + /** + * Creates an UnbondingDelegationEntry message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.UnbondingDelegationEntry + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.UnbondingDelegationEntry} UnbondingDelegationEntry + */ + UnbondingDelegationEntry.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.UnbondingDelegationEntry) + return object; + let message = new $root.cosmos.staking.v1beta1.UnbondingDelegationEntry(); + if (object.creationHeight != null) + if ($util.Long) + (message.creationHeight = $util.Long.fromValue(object.creationHeight)).unsigned = false; + else if (typeof object.creationHeight === "string") + message.creationHeight = parseInt(object.creationHeight, 10); + else if (typeof object.creationHeight === "number") + message.creationHeight = object.creationHeight; + else if (typeof object.creationHeight === "object") + message.creationHeight = new $util.LongBits(object.creationHeight.low >>> 0, object.creationHeight.high >>> 0).toNumber(); + if (object.completionTime != null) { + if (typeof object.completionTime !== "object") + throw TypeError(".cosmos.staking.v1beta1.UnbondingDelegationEntry.completionTime: object expected"); + message.completionTime = $root.google.protobuf.Timestamp.fromObject(object.completionTime); + } + if (object.initialBalance != null) + message.initialBalance = String(object.initialBalance); + if (object.balance != null) + message.balance = String(object.balance); + return message; + }; + + /** + * Creates a plain object from an UnbondingDelegationEntry message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.UnbondingDelegationEntry + * @static + * @param {cosmos.staking.v1beta1.UnbondingDelegationEntry} message UnbondingDelegationEntry + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UnbondingDelegationEntry.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.creationHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.creationHeight = options.longs === String ? "0" : 0; + object.completionTime = null; + object.initialBalance = ""; + object.balance = ""; + } + if (message.creationHeight != null && message.hasOwnProperty("creationHeight")) + if (typeof message.creationHeight === "number") + object.creationHeight = options.longs === String ? String(message.creationHeight) : message.creationHeight; + else + object.creationHeight = options.longs === String ? $util.Long.prototype.toString.call(message.creationHeight) : options.longs === Number ? new $util.LongBits(message.creationHeight.low >>> 0, message.creationHeight.high >>> 0).toNumber() : message.creationHeight; + if (message.completionTime != null && message.hasOwnProperty("completionTime")) + object.completionTime = $root.google.protobuf.Timestamp.toObject(message.completionTime, options); + if (message.initialBalance != null && message.hasOwnProperty("initialBalance")) + object.initialBalance = message.initialBalance; + if (message.balance != null && message.hasOwnProperty("balance")) + object.balance = message.balance; + return object; + }; + + /** + * Converts this UnbondingDelegationEntry to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.UnbondingDelegationEntry + * @instance + * @returns {Object.} JSON object + */ + UnbondingDelegationEntry.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UnbondingDelegationEntry; + })(v1beta1.UnbondingDelegationEntry || {}); + + v1beta1.RedelegationEntry = (function(RedelegationEntry) { + + /** + * Properties of a RedelegationEntry. + * @memberof cosmos.staking.v1beta1 + * @interface IRedelegationEntry + * @property {number|Long|null} [creationHeight] RedelegationEntry creationHeight + * @property {google.protobuf.ITimestamp|null} [completionTime] RedelegationEntry completionTime + * @property {string|null} [initialBalance] RedelegationEntry initialBalance + * @property {string|null} [sharesDst] RedelegationEntry sharesDst + */ + + /** + * Constructs a new RedelegationEntry. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a RedelegationEntry. + * @implements IRedelegationEntry + * @constructor + * @param {cosmos.staking.v1beta1.IRedelegationEntry=} [properties] Properties to set + */ + function RedelegationEntry(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RedelegationEntry creationHeight. + * @member {number|Long} creationHeight + * @memberof cosmos.staking.v1beta1.RedelegationEntry + * @instance + */ + RedelegationEntry.prototype.creationHeight = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * RedelegationEntry completionTime. + * @member {google.protobuf.ITimestamp|null|undefined} completionTime + * @memberof cosmos.staking.v1beta1.RedelegationEntry + * @instance + */ + RedelegationEntry.prototype.completionTime = null; + + /** + * RedelegationEntry initialBalance. + * @member {string} initialBalance + * @memberof cosmos.staking.v1beta1.RedelegationEntry + * @instance + */ + RedelegationEntry.prototype.initialBalance = ""; + + /** + * RedelegationEntry sharesDst. + * @member {string} sharesDst + * @memberof cosmos.staking.v1beta1.RedelegationEntry + * @instance + */ + RedelegationEntry.prototype.sharesDst = ""; + + /** + * Creates a new RedelegationEntry instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.RedelegationEntry + * @static + * @param {cosmos.staking.v1beta1.IRedelegationEntry=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.RedelegationEntry} RedelegationEntry instance + */ + RedelegationEntry.create = function create(properties) { + return new RedelegationEntry(properties); + }; + + /** + * Encodes the specified RedelegationEntry message. Does not implicitly {@link cosmos.staking.v1beta1.RedelegationEntry.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.RedelegationEntry + * @static + * @param {cosmos.staking.v1beta1.IRedelegationEntry} message RedelegationEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RedelegationEntry.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.creationHeight != null && Object.hasOwnProperty.call(message, "creationHeight")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.creationHeight); + if (message.completionTime != null && Object.hasOwnProperty.call(message, "completionTime")) + $root.google.protobuf.Timestamp.encode(message.completionTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.initialBalance != null && Object.hasOwnProperty.call(message, "initialBalance")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.initialBalance); + if (message.sharesDst != null && Object.hasOwnProperty.call(message, "sharesDst")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.sharesDst); + return writer; + }; + + /** + * Encodes the specified RedelegationEntry message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.RedelegationEntry.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.RedelegationEntry + * @static + * @param {cosmos.staking.v1beta1.IRedelegationEntry} message RedelegationEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RedelegationEntry.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RedelegationEntry message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.RedelegationEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.RedelegationEntry} RedelegationEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RedelegationEntry.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.RedelegationEntry(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.creationHeight = reader.int64(); + break; + case 2: + message.completionTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 3: + message.initialBalance = reader.string(); + break; + case 4: + message.sharesDst = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RedelegationEntry message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.RedelegationEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.RedelegationEntry} RedelegationEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RedelegationEntry.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RedelegationEntry message. + * @function verify + * @memberof cosmos.staking.v1beta1.RedelegationEntry + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RedelegationEntry.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.creationHeight != null && message.hasOwnProperty("creationHeight")) + if (!$util.isInteger(message.creationHeight) && !(message.creationHeight && $util.isInteger(message.creationHeight.low) && $util.isInteger(message.creationHeight.high))) + return "creationHeight: integer|Long expected"; + if (message.completionTime != null && message.hasOwnProperty("completionTime")) { + let error = $root.google.protobuf.Timestamp.verify(message.completionTime); + if (error) + return "completionTime." + error; + } + if (message.initialBalance != null && message.hasOwnProperty("initialBalance")) + if (!$util.isString(message.initialBalance)) + return "initialBalance: string expected"; + if (message.sharesDst != null && message.hasOwnProperty("sharesDst")) + if (!$util.isString(message.sharesDst)) + return "sharesDst: string expected"; + return null; + }; + + /** + * Creates a RedelegationEntry message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.RedelegationEntry + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.RedelegationEntry} RedelegationEntry + */ + RedelegationEntry.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.RedelegationEntry) + return object; + let message = new $root.cosmos.staking.v1beta1.RedelegationEntry(); + if (object.creationHeight != null) + if ($util.Long) + (message.creationHeight = $util.Long.fromValue(object.creationHeight)).unsigned = false; + else if (typeof object.creationHeight === "string") + message.creationHeight = parseInt(object.creationHeight, 10); + else if (typeof object.creationHeight === "number") + message.creationHeight = object.creationHeight; + else if (typeof object.creationHeight === "object") + message.creationHeight = new $util.LongBits(object.creationHeight.low >>> 0, object.creationHeight.high >>> 0).toNumber(); + if (object.completionTime != null) { + if (typeof object.completionTime !== "object") + throw TypeError(".cosmos.staking.v1beta1.RedelegationEntry.completionTime: object expected"); + message.completionTime = $root.google.protobuf.Timestamp.fromObject(object.completionTime); + } + if (object.initialBalance != null) + message.initialBalance = String(object.initialBalance); + if (object.sharesDst != null) + message.sharesDst = String(object.sharesDst); + return message; + }; + + /** + * Creates a plain object from a RedelegationEntry message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.RedelegationEntry + * @static + * @param {cosmos.staking.v1beta1.RedelegationEntry} message RedelegationEntry + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RedelegationEntry.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.creationHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.creationHeight = options.longs === String ? "0" : 0; + object.completionTime = null; + object.initialBalance = ""; + object.sharesDst = ""; + } + if (message.creationHeight != null && message.hasOwnProperty("creationHeight")) + if (typeof message.creationHeight === "number") + object.creationHeight = options.longs === String ? String(message.creationHeight) : message.creationHeight; + else + object.creationHeight = options.longs === String ? $util.Long.prototype.toString.call(message.creationHeight) : options.longs === Number ? new $util.LongBits(message.creationHeight.low >>> 0, message.creationHeight.high >>> 0).toNumber() : message.creationHeight; + if (message.completionTime != null && message.hasOwnProperty("completionTime")) + object.completionTime = $root.google.protobuf.Timestamp.toObject(message.completionTime, options); + if (message.initialBalance != null && message.hasOwnProperty("initialBalance")) + object.initialBalance = message.initialBalance; + if (message.sharesDst != null && message.hasOwnProperty("sharesDst")) + object.sharesDst = message.sharesDst; + return object; + }; + + /** + * Converts this RedelegationEntry to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.RedelegationEntry + * @instance + * @returns {Object.} JSON object + */ + RedelegationEntry.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RedelegationEntry; + })(v1beta1.RedelegationEntry || {}); + + v1beta1.Redelegation = (function(Redelegation) { + + /** + * Properties of a Redelegation. + * @memberof cosmos.staking.v1beta1 + * @interface IRedelegation + * @property {string|null} [delegatorAddress] Redelegation delegatorAddress + * @property {string|null} [validatorSrcAddress] Redelegation validatorSrcAddress + * @property {string|null} [validatorDstAddress] Redelegation validatorDstAddress + * @property {Array.|null} [entries] Redelegation entries + */ + + /** + * Constructs a new Redelegation. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a Redelegation. + * @implements IRedelegation + * @constructor + * @param {cosmos.staking.v1beta1.IRedelegation=} [properties] Properties to set + */ + function Redelegation(properties) { + this.entries = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Redelegation delegatorAddress. + * @member {string} delegatorAddress + * @memberof cosmos.staking.v1beta1.Redelegation + * @instance + */ + Redelegation.prototype.delegatorAddress = ""; + + /** + * Redelegation validatorSrcAddress. + * @member {string} validatorSrcAddress + * @memberof cosmos.staking.v1beta1.Redelegation + * @instance + */ + Redelegation.prototype.validatorSrcAddress = ""; + + /** + * Redelegation validatorDstAddress. + * @member {string} validatorDstAddress + * @memberof cosmos.staking.v1beta1.Redelegation + * @instance + */ + Redelegation.prototype.validatorDstAddress = ""; + + /** + * Redelegation entries. + * @member {Array.} entries + * @memberof cosmos.staking.v1beta1.Redelegation + * @instance + */ + Redelegation.prototype.entries = $util.emptyArray; + + /** + * Creates a new Redelegation instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.Redelegation + * @static + * @param {cosmos.staking.v1beta1.IRedelegation=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.Redelegation} Redelegation instance + */ + Redelegation.create = function create(properties) { + return new Redelegation(properties); + }; + + /** + * Encodes the specified Redelegation message. Does not implicitly {@link cosmos.staking.v1beta1.Redelegation.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.Redelegation + * @static + * @param {cosmos.staking.v1beta1.IRedelegation} message Redelegation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Redelegation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.delegatorAddress != null && Object.hasOwnProperty.call(message, "delegatorAddress")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.delegatorAddress); + if (message.validatorSrcAddress != null && Object.hasOwnProperty.call(message, "validatorSrcAddress")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.validatorSrcAddress); + if (message.validatorDstAddress != null && Object.hasOwnProperty.call(message, "validatorDstAddress")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.validatorDstAddress); + if (message.entries != null && message.entries.length) + for (let i = 0; i < message.entries.length; ++i) + $root.cosmos.staking.v1beta1.RedelegationEntry.encode(message.entries[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Redelegation message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.Redelegation.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.Redelegation + * @static + * @param {cosmos.staking.v1beta1.IRedelegation} message Redelegation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Redelegation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Redelegation message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.Redelegation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.Redelegation} Redelegation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Redelegation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.Redelegation(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.delegatorAddress = reader.string(); + break; + case 2: + message.validatorSrcAddress = reader.string(); + break; + case 3: + message.validatorDstAddress = reader.string(); + break; + case 4: + if (!(message.entries && message.entries.length)) + message.entries = []; + message.entries.push($root.cosmos.staking.v1beta1.RedelegationEntry.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Redelegation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.Redelegation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.Redelegation} Redelegation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Redelegation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Redelegation message. + * @function verify + * @memberof cosmos.staking.v1beta1.Redelegation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Redelegation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + if (!$util.isString(message.delegatorAddress)) + return "delegatorAddress: string expected"; + if (message.validatorSrcAddress != null && message.hasOwnProperty("validatorSrcAddress")) + if (!$util.isString(message.validatorSrcAddress)) + return "validatorSrcAddress: string expected"; + if (message.validatorDstAddress != null && message.hasOwnProperty("validatorDstAddress")) + if (!$util.isString(message.validatorDstAddress)) + return "validatorDstAddress: string expected"; + if (message.entries != null && message.hasOwnProperty("entries")) { + if (!Array.isArray(message.entries)) + return "entries: array expected"; + for (let i = 0; i < message.entries.length; ++i) { + let error = $root.cosmos.staking.v1beta1.RedelegationEntry.verify(message.entries[i]); + if (error) + return "entries." + error; + } + } + return null; + }; + + /** + * Creates a Redelegation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.Redelegation + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.Redelegation} Redelegation + */ + Redelegation.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.Redelegation) + return object; + let message = new $root.cosmos.staking.v1beta1.Redelegation(); + if (object.delegatorAddress != null) + message.delegatorAddress = String(object.delegatorAddress); + if (object.validatorSrcAddress != null) + message.validatorSrcAddress = String(object.validatorSrcAddress); + if (object.validatorDstAddress != null) + message.validatorDstAddress = String(object.validatorDstAddress); + if (object.entries) { + if (!Array.isArray(object.entries)) + throw TypeError(".cosmos.staking.v1beta1.Redelegation.entries: array expected"); + message.entries = []; + for (let i = 0; i < object.entries.length; ++i) { + if (typeof object.entries[i] !== "object") + throw TypeError(".cosmos.staking.v1beta1.Redelegation.entries: object expected"); + message.entries[i] = $root.cosmos.staking.v1beta1.RedelegationEntry.fromObject(object.entries[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Redelegation message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.Redelegation + * @static + * @param {cosmos.staking.v1beta1.Redelegation} message Redelegation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Redelegation.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.entries = []; + if (options.defaults) { + object.delegatorAddress = ""; + object.validatorSrcAddress = ""; + object.validatorDstAddress = ""; + } + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + object.delegatorAddress = message.delegatorAddress; + if (message.validatorSrcAddress != null && message.hasOwnProperty("validatorSrcAddress")) + object.validatorSrcAddress = message.validatorSrcAddress; + if (message.validatorDstAddress != null && message.hasOwnProperty("validatorDstAddress")) + object.validatorDstAddress = message.validatorDstAddress; + if (message.entries && message.entries.length) { + object.entries = []; + for (let j = 0; j < message.entries.length; ++j) + object.entries[j] = $root.cosmos.staking.v1beta1.RedelegationEntry.toObject(message.entries[j], options); + } + return object; + }; + + /** + * Converts this Redelegation to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.Redelegation + * @instance + * @returns {Object.} JSON object + */ + Redelegation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Redelegation; + })(v1beta1.Redelegation || {}); + + v1beta1.Params = (function(Params) { + + /** + * Properties of a Params. + * @memberof cosmos.staking.v1beta1 + * @interface IParams + * @property {google.protobuf.IDuration|null} [unbondingTime] Params unbondingTime + * @property {number|null} [maxValidators] Params maxValidators + * @property {number|null} [maxEntries] Params maxEntries + * @property {number|null} [historicalEntries] Params historicalEntries + * @property {string|null} [bondDenom] Params bondDenom + */ + + /** + * Constructs a new Params. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a Params. + * @implements IParams + * @constructor + * @param {cosmos.staking.v1beta1.IParams=} [properties] Properties to set + */ + function Params(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Params unbondingTime. + * @member {google.protobuf.IDuration|null|undefined} unbondingTime + * @memberof cosmos.staking.v1beta1.Params + * @instance + */ + Params.prototype.unbondingTime = null; + + /** + * Params maxValidators. + * @member {number} maxValidators + * @memberof cosmos.staking.v1beta1.Params + * @instance + */ + Params.prototype.maxValidators = 0; + + /** + * Params maxEntries. + * @member {number} maxEntries + * @memberof cosmos.staking.v1beta1.Params + * @instance + */ + Params.prototype.maxEntries = 0; + + /** + * Params historicalEntries. + * @member {number} historicalEntries + * @memberof cosmos.staking.v1beta1.Params + * @instance + */ + Params.prototype.historicalEntries = 0; + + /** + * Params bondDenom. + * @member {string} bondDenom + * @memberof cosmos.staking.v1beta1.Params + * @instance + */ + Params.prototype.bondDenom = ""; + + /** + * Creates a new Params instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.Params + * @static + * @param {cosmos.staking.v1beta1.IParams=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.Params} Params instance + */ + Params.create = function create(properties) { + return new Params(properties); + }; + + /** + * Encodes the specified Params message. Does not implicitly {@link cosmos.staking.v1beta1.Params.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.Params + * @static + * @param {cosmos.staking.v1beta1.IParams} message Params message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Params.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.unbondingTime != null && Object.hasOwnProperty.call(message, "unbondingTime")) + $root.google.protobuf.Duration.encode(message.unbondingTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.maxValidators != null && Object.hasOwnProperty.call(message, "maxValidators")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.maxValidators); + if (message.maxEntries != null && Object.hasOwnProperty.call(message, "maxEntries")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.maxEntries); + if (message.historicalEntries != null && Object.hasOwnProperty.call(message, "historicalEntries")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.historicalEntries); + if (message.bondDenom != null && Object.hasOwnProperty.call(message, "bondDenom")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.bondDenom); + return writer; + }; + + /** + * Encodes the specified Params message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.Params.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.Params + * @static + * @param {cosmos.staking.v1beta1.IParams} message Params message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Params.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Params message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.Params + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.Params} Params + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Params.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.Params(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.unbondingTime = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + case 2: + message.maxValidators = reader.uint32(); + break; + case 3: + message.maxEntries = reader.uint32(); + break; + case 4: + message.historicalEntries = reader.uint32(); + break; + case 5: + message.bondDenom = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Params message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.Params + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.Params} Params + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Params.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Params message. + * @function verify + * @memberof cosmos.staking.v1beta1.Params + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Params.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.unbondingTime != null && message.hasOwnProperty("unbondingTime")) { + let error = $root.google.protobuf.Duration.verify(message.unbondingTime); + if (error) + return "unbondingTime." + error; + } + if (message.maxValidators != null && message.hasOwnProperty("maxValidators")) + if (!$util.isInteger(message.maxValidators)) + return "maxValidators: integer expected"; + if (message.maxEntries != null && message.hasOwnProperty("maxEntries")) + if (!$util.isInteger(message.maxEntries)) + return "maxEntries: integer expected"; + if (message.historicalEntries != null && message.hasOwnProperty("historicalEntries")) + if (!$util.isInteger(message.historicalEntries)) + return "historicalEntries: integer expected"; + if (message.bondDenom != null && message.hasOwnProperty("bondDenom")) + if (!$util.isString(message.bondDenom)) + return "bondDenom: string expected"; + return null; + }; + + /** + * Creates a Params message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.Params + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.Params} Params + */ + Params.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.Params) + return object; + let message = new $root.cosmos.staking.v1beta1.Params(); + if (object.unbondingTime != null) { + if (typeof object.unbondingTime !== "object") + throw TypeError(".cosmos.staking.v1beta1.Params.unbondingTime: object expected"); + message.unbondingTime = $root.google.protobuf.Duration.fromObject(object.unbondingTime); + } + if (object.maxValidators != null) + message.maxValidators = object.maxValidators >>> 0; + if (object.maxEntries != null) + message.maxEntries = object.maxEntries >>> 0; + if (object.historicalEntries != null) + message.historicalEntries = object.historicalEntries >>> 0; + if (object.bondDenom != null) + message.bondDenom = String(object.bondDenom); + return message; + }; + + /** + * Creates a plain object from a Params message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.Params + * @static + * @param {cosmos.staking.v1beta1.Params} message Params + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Params.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.unbondingTime = null; + object.maxValidators = 0; + object.maxEntries = 0; + object.historicalEntries = 0; + object.bondDenom = ""; + } + if (message.unbondingTime != null && message.hasOwnProperty("unbondingTime")) + object.unbondingTime = $root.google.protobuf.Duration.toObject(message.unbondingTime, options); + if (message.maxValidators != null && message.hasOwnProperty("maxValidators")) + object.maxValidators = message.maxValidators; + if (message.maxEntries != null && message.hasOwnProperty("maxEntries")) + object.maxEntries = message.maxEntries; + if (message.historicalEntries != null && message.hasOwnProperty("historicalEntries")) + object.historicalEntries = message.historicalEntries; + if (message.bondDenom != null && message.hasOwnProperty("bondDenom")) + object.bondDenom = message.bondDenom; + return object; + }; + + /** + * Converts this Params to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.Params + * @instance + * @returns {Object.} JSON object + */ + Params.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Params; + })(v1beta1.Params || {}); + + v1beta1.DelegationResponse = (function(DelegationResponse) { + + /** + * Properties of a DelegationResponse. + * @memberof cosmos.staking.v1beta1 + * @interface IDelegationResponse + * @property {cosmos.staking.v1beta1.IDelegation|null} [delegation] DelegationResponse delegation + * @property {cosmos.base.v1beta1.ICoin|null} [balance] DelegationResponse balance + */ + + /** + * Constructs a new DelegationResponse. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a DelegationResponse. + * @implements IDelegationResponse + * @constructor + * @param {cosmos.staking.v1beta1.IDelegationResponse=} [properties] Properties to set + */ + function DelegationResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DelegationResponse delegation. + * @member {cosmos.staking.v1beta1.IDelegation|null|undefined} delegation + * @memberof cosmos.staking.v1beta1.DelegationResponse + * @instance + */ + DelegationResponse.prototype.delegation = null; + + /** + * DelegationResponse balance. + * @member {cosmos.base.v1beta1.ICoin|null|undefined} balance + * @memberof cosmos.staking.v1beta1.DelegationResponse + * @instance + */ + DelegationResponse.prototype.balance = null; + + /** + * Creates a new DelegationResponse instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.DelegationResponse + * @static + * @param {cosmos.staking.v1beta1.IDelegationResponse=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.DelegationResponse} DelegationResponse instance + */ + DelegationResponse.create = function create(properties) { + return new DelegationResponse(properties); + }; + + /** + * Encodes the specified DelegationResponse message. Does not implicitly {@link cosmos.staking.v1beta1.DelegationResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.DelegationResponse + * @static + * @param {cosmos.staking.v1beta1.IDelegationResponse} message DelegationResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DelegationResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.delegation != null && Object.hasOwnProperty.call(message, "delegation")) + $root.cosmos.staking.v1beta1.Delegation.encode(message.delegation, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.balance != null && Object.hasOwnProperty.call(message, "balance")) + $root.cosmos.base.v1beta1.Coin.encode(message.balance, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DelegationResponse message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.DelegationResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.DelegationResponse + * @static + * @param {cosmos.staking.v1beta1.IDelegationResponse} message DelegationResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DelegationResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DelegationResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.DelegationResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.DelegationResponse} DelegationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DelegationResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.DelegationResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.delegation = $root.cosmos.staking.v1beta1.Delegation.decode(reader, reader.uint32()); + break; + case 2: + message.balance = $root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DelegationResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.DelegationResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.DelegationResponse} DelegationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DelegationResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DelegationResponse message. + * @function verify + * @memberof cosmos.staking.v1beta1.DelegationResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DelegationResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.delegation != null && message.hasOwnProperty("delegation")) { + let error = $root.cosmos.staking.v1beta1.Delegation.verify(message.delegation); + if (error) + return "delegation." + error; + } + if (message.balance != null && message.hasOwnProperty("balance")) { + let error = $root.cosmos.base.v1beta1.Coin.verify(message.balance); + if (error) + return "balance." + error; + } + return null; + }; + + /** + * Creates a DelegationResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.DelegationResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.DelegationResponse} DelegationResponse + */ + DelegationResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.DelegationResponse) + return object; + let message = new $root.cosmos.staking.v1beta1.DelegationResponse(); + if (object.delegation != null) { + if (typeof object.delegation !== "object") + throw TypeError(".cosmos.staking.v1beta1.DelegationResponse.delegation: object expected"); + message.delegation = $root.cosmos.staking.v1beta1.Delegation.fromObject(object.delegation); + } + if (object.balance != null) { + if (typeof object.balance !== "object") + throw TypeError(".cosmos.staking.v1beta1.DelegationResponse.balance: object expected"); + message.balance = $root.cosmos.base.v1beta1.Coin.fromObject(object.balance); + } + return message; + }; + + /** + * Creates a plain object from a DelegationResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.DelegationResponse + * @static + * @param {cosmos.staking.v1beta1.DelegationResponse} message DelegationResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DelegationResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.delegation = null; + object.balance = null; + } + if (message.delegation != null && message.hasOwnProperty("delegation")) + object.delegation = $root.cosmos.staking.v1beta1.Delegation.toObject(message.delegation, options); + if (message.balance != null && message.hasOwnProperty("balance")) + object.balance = $root.cosmos.base.v1beta1.Coin.toObject(message.balance, options); + return object; + }; + + /** + * Converts this DelegationResponse to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.DelegationResponse + * @instance + * @returns {Object.} JSON object + */ + DelegationResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DelegationResponse; + })(v1beta1.DelegationResponse || {}); + + v1beta1.RedelegationEntryResponse = (function(RedelegationEntryResponse) { + + /** + * Properties of a RedelegationEntryResponse. + * @memberof cosmos.staking.v1beta1 + * @interface IRedelegationEntryResponse + * @property {cosmos.staking.v1beta1.IRedelegationEntry|null} [redelegationEntry] RedelegationEntryResponse redelegationEntry + * @property {string|null} [balance] RedelegationEntryResponse balance + */ + + /** + * Constructs a new RedelegationEntryResponse. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a RedelegationEntryResponse. + * @implements IRedelegationEntryResponse + * @constructor + * @param {cosmos.staking.v1beta1.IRedelegationEntryResponse=} [properties] Properties to set + */ + function RedelegationEntryResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RedelegationEntryResponse redelegationEntry. + * @member {cosmos.staking.v1beta1.IRedelegationEntry|null|undefined} redelegationEntry + * @memberof cosmos.staking.v1beta1.RedelegationEntryResponse + * @instance + */ + RedelegationEntryResponse.prototype.redelegationEntry = null; + + /** + * RedelegationEntryResponse balance. + * @member {string} balance + * @memberof cosmos.staking.v1beta1.RedelegationEntryResponse + * @instance + */ + RedelegationEntryResponse.prototype.balance = ""; + + /** + * Creates a new RedelegationEntryResponse instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.RedelegationEntryResponse + * @static + * @param {cosmos.staking.v1beta1.IRedelegationEntryResponse=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.RedelegationEntryResponse} RedelegationEntryResponse instance + */ + RedelegationEntryResponse.create = function create(properties) { + return new RedelegationEntryResponse(properties); + }; + + /** + * Encodes the specified RedelegationEntryResponse message. Does not implicitly {@link cosmos.staking.v1beta1.RedelegationEntryResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.RedelegationEntryResponse + * @static + * @param {cosmos.staking.v1beta1.IRedelegationEntryResponse} message RedelegationEntryResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RedelegationEntryResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.redelegationEntry != null && Object.hasOwnProperty.call(message, "redelegationEntry")) + $root.cosmos.staking.v1beta1.RedelegationEntry.encode(message.redelegationEntry, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.balance != null && Object.hasOwnProperty.call(message, "balance")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.balance); + return writer; + }; + + /** + * Encodes the specified RedelegationEntryResponse message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.RedelegationEntryResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.RedelegationEntryResponse + * @static + * @param {cosmos.staking.v1beta1.IRedelegationEntryResponse} message RedelegationEntryResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RedelegationEntryResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RedelegationEntryResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.RedelegationEntryResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.RedelegationEntryResponse} RedelegationEntryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RedelegationEntryResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.RedelegationEntryResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.redelegationEntry = $root.cosmos.staking.v1beta1.RedelegationEntry.decode(reader, reader.uint32()); + break; + case 4: + message.balance = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RedelegationEntryResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.RedelegationEntryResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.RedelegationEntryResponse} RedelegationEntryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RedelegationEntryResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RedelegationEntryResponse message. + * @function verify + * @memberof cosmos.staking.v1beta1.RedelegationEntryResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RedelegationEntryResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.redelegationEntry != null && message.hasOwnProperty("redelegationEntry")) { + let error = $root.cosmos.staking.v1beta1.RedelegationEntry.verify(message.redelegationEntry); + if (error) + return "redelegationEntry." + error; + } + if (message.balance != null && message.hasOwnProperty("balance")) + if (!$util.isString(message.balance)) + return "balance: string expected"; + return null; + }; + + /** + * Creates a RedelegationEntryResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.RedelegationEntryResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.RedelegationEntryResponse} RedelegationEntryResponse + */ + RedelegationEntryResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.RedelegationEntryResponse) + return object; + let message = new $root.cosmos.staking.v1beta1.RedelegationEntryResponse(); + if (object.redelegationEntry != null) { + if (typeof object.redelegationEntry !== "object") + throw TypeError(".cosmos.staking.v1beta1.RedelegationEntryResponse.redelegationEntry: object expected"); + message.redelegationEntry = $root.cosmos.staking.v1beta1.RedelegationEntry.fromObject(object.redelegationEntry); + } + if (object.balance != null) + message.balance = String(object.balance); + return message; + }; + + /** + * Creates a plain object from a RedelegationEntryResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.RedelegationEntryResponse + * @static + * @param {cosmos.staking.v1beta1.RedelegationEntryResponse} message RedelegationEntryResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RedelegationEntryResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.redelegationEntry = null; + object.balance = ""; + } + if (message.redelegationEntry != null && message.hasOwnProperty("redelegationEntry")) + object.redelegationEntry = $root.cosmos.staking.v1beta1.RedelegationEntry.toObject(message.redelegationEntry, options); + if (message.balance != null && message.hasOwnProperty("balance")) + object.balance = message.balance; + return object; + }; + + /** + * Converts this RedelegationEntryResponse to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.RedelegationEntryResponse + * @instance + * @returns {Object.} JSON object + */ + RedelegationEntryResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RedelegationEntryResponse; + })(v1beta1.RedelegationEntryResponse || {}); + + v1beta1.RedelegationResponse = (function(RedelegationResponse) { + + /** + * Properties of a RedelegationResponse. + * @memberof cosmos.staking.v1beta1 + * @interface IRedelegationResponse + * @property {cosmos.staking.v1beta1.IRedelegation|null} [redelegation] RedelegationResponse redelegation + * @property {Array.|null} [entries] RedelegationResponse entries + */ + + /** + * Constructs a new RedelegationResponse. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a RedelegationResponse. + * @implements IRedelegationResponse + * @constructor + * @param {cosmos.staking.v1beta1.IRedelegationResponse=} [properties] Properties to set + */ + function RedelegationResponse(properties) { + this.entries = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RedelegationResponse redelegation. + * @member {cosmos.staking.v1beta1.IRedelegation|null|undefined} redelegation + * @memberof cosmos.staking.v1beta1.RedelegationResponse + * @instance + */ + RedelegationResponse.prototype.redelegation = null; + + /** + * RedelegationResponse entries. + * @member {Array.} entries + * @memberof cosmos.staking.v1beta1.RedelegationResponse + * @instance + */ + RedelegationResponse.prototype.entries = $util.emptyArray; + + /** + * Creates a new RedelegationResponse instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.RedelegationResponse + * @static + * @param {cosmos.staking.v1beta1.IRedelegationResponse=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.RedelegationResponse} RedelegationResponse instance + */ + RedelegationResponse.create = function create(properties) { + return new RedelegationResponse(properties); + }; + + /** + * Encodes the specified RedelegationResponse message. Does not implicitly {@link cosmos.staking.v1beta1.RedelegationResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.RedelegationResponse + * @static + * @param {cosmos.staking.v1beta1.IRedelegationResponse} message RedelegationResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RedelegationResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.redelegation != null && Object.hasOwnProperty.call(message, "redelegation")) + $root.cosmos.staking.v1beta1.Redelegation.encode(message.redelegation, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.entries != null && message.entries.length) + for (let i = 0; i < message.entries.length; ++i) + $root.cosmos.staking.v1beta1.RedelegationEntryResponse.encode(message.entries[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RedelegationResponse message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.RedelegationResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.RedelegationResponse + * @static + * @param {cosmos.staking.v1beta1.IRedelegationResponse} message RedelegationResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RedelegationResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RedelegationResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.RedelegationResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.RedelegationResponse} RedelegationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RedelegationResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.RedelegationResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.redelegation = $root.cosmos.staking.v1beta1.Redelegation.decode(reader, reader.uint32()); + break; + case 2: + if (!(message.entries && message.entries.length)) + message.entries = []; + message.entries.push($root.cosmos.staking.v1beta1.RedelegationEntryResponse.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RedelegationResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.RedelegationResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.RedelegationResponse} RedelegationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RedelegationResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RedelegationResponse message. + * @function verify + * @memberof cosmos.staking.v1beta1.RedelegationResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RedelegationResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.redelegation != null && message.hasOwnProperty("redelegation")) { + let error = $root.cosmos.staking.v1beta1.Redelegation.verify(message.redelegation); + if (error) + return "redelegation." + error; + } + if (message.entries != null && message.hasOwnProperty("entries")) { + if (!Array.isArray(message.entries)) + return "entries: array expected"; + for (let i = 0; i < message.entries.length; ++i) { + let error = $root.cosmos.staking.v1beta1.RedelegationEntryResponse.verify(message.entries[i]); + if (error) + return "entries." + error; + } + } + return null; + }; + + /** + * Creates a RedelegationResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.RedelegationResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.RedelegationResponse} RedelegationResponse + */ + RedelegationResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.RedelegationResponse) + return object; + let message = new $root.cosmos.staking.v1beta1.RedelegationResponse(); + if (object.redelegation != null) { + if (typeof object.redelegation !== "object") + throw TypeError(".cosmos.staking.v1beta1.RedelegationResponse.redelegation: object expected"); + message.redelegation = $root.cosmos.staking.v1beta1.Redelegation.fromObject(object.redelegation); + } + if (object.entries) { + if (!Array.isArray(object.entries)) + throw TypeError(".cosmos.staking.v1beta1.RedelegationResponse.entries: array expected"); + message.entries = []; + for (let i = 0; i < object.entries.length; ++i) { + if (typeof object.entries[i] !== "object") + throw TypeError(".cosmos.staking.v1beta1.RedelegationResponse.entries: object expected"); + message.entries[i] = $root.cosmos.staking.v1beta1.RedelegationEntryResponse.fromObject(object.entries[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a RedelegationResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.RedelegationResponse + * @static + * @param {cosmos.staking.v1beta1.RedelegationResponse} message RedelegationResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RedelegationResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.entries = []; + if (options.defaults) + object.redelegation = null; + if (message.redelegation != null && message.hasOwnProperty("redelegation")) + object.redelegation = $root.cosmos.staking.v1beta1.Redelegation.toObject(message.redelegation, options); + if (message.entries && message.entries.length) { + object.entries = []; + for (let j = 0; j < message.entries.length; ++j) + object.entries[j] = $root.cosmos.staking.v1beta1.RedelegationEntryResponse.toObject(message.entries[j], options); + } + return object; + }; + + /** + * Converts this RedelegationResponse to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.RedelegationResponse + * @instance + * @returns {Object.} JSON object + */ + RedelegationResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RedelegationResponse; + })(v1beta1.RedelegationResponse || {}); + + v1beta1.Pool = (function(Pool) { + + /** + * Properties of a Pool. + * @memberof cosmos.staking.v1beta1 + * @interface IPool + * @property {string|null} [notBondedTokens] Pool notBondedTokens + * @property {string|null} [bondedTokens] Pool bondedTokens + */ + + /** + * Constructs a new Pool. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a Pool. + * @implements IPool + * @constructor + * @param {cosmos.staking.v1beta1.IPool=} [properties] Properties to set + */ + function Pool(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Pool notBondedTokens. + * @member {string} notBondedTokens + * @memberof cosmos.staking.v1beta1.Pool + * @instance + */ + Pool.prototype.notBondedTokens = ""; + + /** + * Pool bondedTokens. + * @member {string} bondedTokens + * @memberof cosmos.staking.v1beta1.Pool + * @instance + */ + Pool.prototype.bondedTokens = ""; + + /** + * Creates a new Pool instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.Pool + * @static + * @param {cosmos.staking.v1beta1.IPool=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.Pool} Pool instance + */ + Pool.create = function create(properties) { + return new Pool(properties); + }; + + /** + * Encodes the specified Pool message. Does not implicitly {@link cosmos.staking.v1beta1.Pool.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.Pool + * @static + * @param {cosmos.staking.v1beta1.IPool} message Pool message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Pool.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.notBondedTokens != null && Object.hasOwnProperty.call(message, "notBondedTokens")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.notBondedTokens); + if (message.bondedTokens != null && Object.hasOwnProperty.call(message, "bondedTokens")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.bondedTokens); + return writer; + }; + + /** + * Encodes the specified Pool message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.Pool.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.Pool + * @static + * @param {cosmos.staking.v1beta1.IPool} message Pool message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Pool.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Pool message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.Pool + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.Pool} Pool + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Pool.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.Pool(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.notBondedTokens = reader.string(); + break; + case 2: + message.bondedTokens = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Pool message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.Pool + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.Pool} Pool + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Pool.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Pool message. + * @function verify + * @memberof cosmos.staking.v1beta1.Pool + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Pool.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.notBondedTokens != null && message.hasOwnProperty("notBondedTokens")) + if (!$util.isString(message.notBondedTokens)) + return "notBondedTokens: string expected"; + if (message.bondedTokens != null && message.hasOwnProperty("bondedTokens")) + if (!$util.isString(message.bondedTokens)) + return "bondedTokens: string expected"; + return null; + }; + + /** + * Creates a Pool message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.Pool + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.Pool} Pool + */ + Pool.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.Pool) + return object; + let message = new $root.cosmos.staking.v1beta1.Pool(); + if (object.notBondedTokens != null) + message.notBondedTokens = String(object.notBondedTokens); + if (object.bondedTokens != null) + message.bondedTokens = String(object.bondedTokens); + return message; + }; + + /** + * Creates a plain object from a Pool message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.Pool + * @static + * @param {cosmos.staking.v1beta1.Pool} message Pool + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Pool.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.notBondedTokens = ""; + object.bondedTokens = ""; + } + if (message.notBondedTokens != null && message.hasOwnProperty("notBondedTokens")) + object.notBondedTokens = message.notBondedTokens; + if (message.bondedTokens != null && message.hasOwnProperty("bondedTokens")) + object.bondedTokens = message.bondedTokens; + return object; + }; + + /** + * Converts this Pool to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.Pool + * @instance + * @returns {Object.} JSON object + */ + Pool.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Pool; + })(v1beta1.Pool || {}); + + v1beta1.Msg = (function(Msg) { + + /** + * Constructs a new Msg service. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a Msg + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Msg(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Msg.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Msg; + + /** + * Creates new Msg service using the specified rpc implementation. + * @function create + * @memberof cosmos.staking.v1beta1.Msg + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Msg} RPC service. Useful where requests and/or responses are streamed. + */ + Msg.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link cosmos.staking.v1beta1.Msg#createValidator}. + * @memberof cosmos.staking.v1beta1.Msg + * @typedef CreateValidatorCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.staking.v1beta1.IMsgCreateValidatorResponse} [response] MsgCreateValidatorResponse + */ + + /** + * Calls CreateValidator. + * @function createValidator + * @memberof cosmos.staking.v1beta1.Msg + * @instance + * @param {cosmos.staking.v1beta1.IMsgCreateValidator} request MsgCreateValidator message or plain object + * @param {cosmos.staking.v1beta1.Msg.CreateValidatorCallback} callback Node-style callback called with the error, if any, and MsgCreateValidatorResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Msg.prototype.createValidator = function createValidator(request, callback) { + return this.rpcCall(createValidator, $root.cosmos.staking.v1beta1.MsgCreateValidator, $root.cosmos.staking.v1beta1.MsgCreateValidatorResponse, request, callback); + }, "name", { value: "CreateValidator" }); + + /** + * Calls CreateValidator. + * @function createValidator + * @memberof cosmos.staking.v1beta1.Msg + * @instance + * @param {cosmos.staking.v1beta1.IMsgCreateValidator} request MsgCreateValidator message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link cosmos.staking.v1beta1.Msg#editValidator}. + * @memberof cosmos.staking.v1beta1.Msg + * @typedef EditValidatorCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.staking.v1beta1.IMsgEditValidatorResponse} [response] MsgEditValidatorResponse + */ + + /** + * Calls EditValidator. + * @function editValidator + * @memberof cosmos.staking.v1beta1.Msg + * @instance + * @param {cosmos.staking.v1beta1.IMsgEditValidator} request MsgEditValidator message or plain object + * @param {cosmos.staking.v1beta1.Msg.EditValidatorCallback} callback Node-style callback called with the error, if any, and MsgEditValidatorResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Msg.prototype.editValidator = function editValidator(request, callback) { + return this.rpcCall(editValidator, $root.cosmos.staking.v1beta1.MsgEditValidator, $root.cosmos.staking.v1beta1.MsgEditValidatorResponse, request, callback); + }, "name", { value: "EditValidator" }); + + /** + * Calls EditValidator. + * @function editValidator + * @memberof cosmos.staking.v1beta1.Msg + * @instance + * @param {cosmos.staking.v1beta1.IMsgEditValidator} request MsgEditValidator message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link cosmos.staking.v1beta1.Msg#delegate}. + * @memberof cosmos.staking.v1beta1.Msg + * @typedef DelegateCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.staking.v1beta1.IMsgDelegateResponse} [response] MsgDelegateResponse + */ + + /** + * Calls Delegate. + * @function delegate + * @memberof cosmos.staking.v1beta1.Msg + * @instance + * @param {cosmos.staking.v1beta1.IMsgDelegate} request MsgDelegate message or plain object + * @param {cosmos.staking.v1beta1.Msg.DelegateCallback} callback Node-style callback called with the error, if any, and MsgDelegateResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Msg.prototype.delegate = function delegate(request, callback) { + return this.rpcCall(delegate, $root.cosmos.staking.v1beta1.MsgDelegate, $root.cosmos.staking.v1beta1.MsgDelegateResponse, request, callback); + }, "name", { value: "Delegate" }); + + /** + * Calls Delegate. + * @function delegate + * @memberof cosmos.staking.v1beta1.Msg + * @instance + * @param {cosmos.staking.v1beta1.IMsgDelegate} request MsgDelegate message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link cosmos.staking.v1beta1.Msg#beginRedelegate}. + * @memberof cosmos.staking.v1beta1.Msg + * @typedef BeginRedelegateCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.staking.v1beta1.IMsgBeginRedelegateResponse} [response] MsgBeginRedelegateResponse + */ + + /** + * Calls BeginRedelegate. + * @function beginRedelegate + * @memberof cosmos.staking.v1beta1.Msg + * @instance + * @param {cosmos.staking.v1beta1.IMsgBeginRedelegate} request MsgBeginRedelegate message or plain object + * @param {cosmos.staking.v1beta1.Msg.BeginRedelegateCallback} callback Node-style callback called with the error, if any, and MsgBeginRedelegateResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Msg.prototype.beginRedelegate = function beginRedelegate(request, callback) { + return this.rpcCall(beginRedelegate, $root.cosmos.staking.v1beta1.MsgBeginRedelegate, $root.cosmos.staking.v1beta1.MsgBeginRedelegateResponse, request, callback); + }, "name", { value: "BeginRedelegate" }); + + /** + * Calls BeginRedelegate. + * @function beginRedelegate + * @memberof cosmos.staking.v1beta1.Msg + * @instance + * @param {cosmos.staking.v1beta1.IMsgBeginRedelegate} request MsgBeginRedelegate message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link cosmos.staking.v1beta1.Msg#undelegate}. + * @memberof cosmos.staking.v1beta1.Msg + * @typedef UndelegateCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.staking.v1beta1.IMsgUndelegateResponse} [response] MsgUndelegateResponse + */ + + /** + * Calls Undelegate. + * @function undelegate + * @memberof cosmos.staking.v1beta1.Msg + * @instance + * @param {cosmos.staking.v1beta1.IMsgUndelegate} request MsgUndelegate message or plain object + * @param {cosmos.staking.v1beta1.Msg.UndelegateCallback} callback Node-style callback called with the error, if any, and MsgUndelegateResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Msg.prototype.undelegate = function undelegate(request, callback) { + return this.rpcCall(undelegate, $root.cosmos.staking.v1beta1.MsgUndelegate, $root.cosmos.staking.v1beta1.MsgUndelegateResponse, request, callback); + }, "name", { value: "Undelegate" }); + + /** + * Calls Undelegate. + * @function undelegate + * @memberof cosmos.staking.v1beta1.Msg + * @instance + * @param {cosmos.staking.v1beta1.IMsgUndelegate} request MsgUndelegate message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Msg; + })(v1beta1.Msg || {}); + + v1beta1.MsgCreateValidator = (function(MsgCreateValidator) { + + /** + * Properties of a MsgCreateValidator. + * @memberof cosmos.staking.v1beta1 + * @interface IMsgCreateValidator + * @property {cosmos.staking.v1beta1.IDescription|null} [description] MsgCreateValidator description + * @property {cosmos.staking.v1beta1.ICommissionRates|null} [commission] MsgCreateValidator commission + * @property {string|null} [minSelfDelegation] MsgCreateValidator minSelfDelegation + * @property {string|null} [delegatorAddress] MsgCreateValidator delegatorAddress + * @property {string|null} [validatorAddress] MsgCreateValidator validatorAddress + * @property {google.protobuf.IAny|null} [pubkey] MsgCreateValidator pubkey + * @property {cosmos.base.v1beta1.ICoin|null} [value] MsgCreateValidator value + */ + + /** + * Constructs a new MsgCreateValidator. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a MsgCreateValidator. + * @implements IMsgCreateValidator + * @constructor + * @param {cosmos.staking.v1beta1.IMsgCreateValidator=} [properties] Properties to set + */ + function MsgCreateValidator(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgCreateValidator description. + * @member {cosmos.staking.v1beta1.IDescription|null|undefined} description + * @memberof cosmos.staking.v1beta1.MsgCreateValidator + * @instance + */ + MsgCreateValidator.prototype.description = null; + + /** + * MsgCreateValidator commission. + * @member {cosmos.staking.v1beta1.ICommissionRates|null|undefined} commission + * @memberof cosmos.staking.v1beta1.MsgCreateValidator + * @instance + */ + MsgCreateValidator.prototype.commission = null; + + /** + * MsgCreateValidator minSelfDelegation. + * @member {string} minSelfDelegation + * @memberof cosmos.staking.v1beta1.MsgCreateValidator + * @instance + */ + MsgCreateValidator.prototype.minSelfDelegation = ""; + + /** + * MsgCreateValidator delegatorAddress. + * @member {string} delegatorAddress + * @memberof cosmos.staking.v1beta1.MsgCreateValidator + * @instance + */ + MsgCreateValidator.prototype.delegatorAddress = ""; + + /** + * MsgCreateValidator validatorAddress. + * @member {string} validatorAddress + * @memberof cosmos.staking.v1beta1.MsgCreateValidator + * @instance + */ + MsgCreateValidator.prototype.validatorAddress = ""; + + /** + * MsgCreateValidator pubkey. + * @member {google.protobuf.IAny|null|undefined} pubkey + * @memberof cosmos.staking.v1beta1.MsgCreateValidator + * @instance + */ + MsgCreateValidator.prototype.pubkey = null; + + /** + * MsgCreateValidator value. + * @member {cosmos.base.v1beta1.ICoin|null|undefined} value + * @memberof cosmos.staking.v1beta1.MsgCreateValidator + * @instance + */ + MsgCreateValidator.prototype.value = null; + + /** + * Creates a new MsgCreateValidator instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.MsgCreateValidator + * @static + * @param {cosmos.staking.v1beta1.IMsgCreateValidator=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.MsgCreateValidator} MsgCreateValidator instance + */ + MsgCreateValidator.create = function create(properties) { + return new MsgCreateValidator(properties); + }; + + /** + * Encodes the specified MsgCreateValidator message. Does not implicitly {@link cosmos.staking.v1beta1.MsgCreateValidator.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.MsgCreateValidator + * @static + * @param {cosmos.staking.v1beta1.IMsgCreateValidator} message MsgCreateValidator message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgCreateValidator.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + $root.cosmos.staking.v1beta1.Description.encode(message.description, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.commission != null && Object.hasOwnProperty.call(message, "commission")) + $root.cosmos.staking.v1beta1.CommissionRates.encode(message.commission, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.minSelfDelegation != null && Object.hasOwnProperty.call(message, "minSelfDelegation")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.minSelfDelegation); + if (message.delegatorAddress != null && Object.hasOwnProperty.call(message, "delegatorAddress")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.delegatorAddress); + if (message.validatorAddress != null && Object.hasOwnProperty.call(message, "validatorAddress")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.validatorAddress); + if (message.pubkey != null && Object.hasOwnProperty.call(message, "pubkey")) + $root.google.protobuf.Any.encode(message.pubkey, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + $root.cosmos.base.v1beta1.Coin.encode(message.value, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MsgCreateValidator message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.MsgCreateValidator.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.MsgCreateValidator + * @static + * @param {cosmos.staking.v1beta1.IMsgCreateValidator} message MsgCreateValidator message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgCreateValidator.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgCreateValidator message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.MsgCreateValidator + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.MsgCreateValidator} MsgCreateValidator + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgCreateValidator.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.MsgCreateValidator(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.description = $root.cosmos.staking.v1beta1.Description.decode(reader, reader.uint32()); + break; + case 2: + message.commission = $root.cosmos.staking.v1beta1.CommissionRates.decode(reader, reader.uint32()); + break; + case 3: + message.minSelfDelegation = reader.string(); + break; + case 4: + message.delegatorAddress = reader.string(); + break; + case 5: + message.validatorAddress = reader.string(); + break; + case 6: + message.pubkey = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + case 7: + message.value = $root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgCreateValidator message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.MsgCreateValidator + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.MsgCreateValidator} MsgCreateValidator + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgCreateValidator.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgCreateValidator message. + * @function verify + * @memberof cosmos.staking.v1beta1.MsgCreateValidator + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgCreateValidator.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.description != null && message.hasOwnProperty("description")) { + let error = $root.cosmos.staking.v1beta1.Description.verify(message.description); + if (error) + return "description." + error; + } + if (message.commission != null && message.hasOwnProperty("commission")) { + let error = $root.cosmos.staking.v1beta1.CommissionRates.verify(message.commission); + if (error) + return "commission." + error; + } + if (message.minSelfDelegation != null && message.hasOwnProperty("minSelfDelegation")) + if (!$util.isString(message.minSelfDelegation)) + return "minSelfDelegation: string expected"; + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + if (!$util.isString(message.delegatorAddress)) + return "delegatorAddress: string expected"; + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + if (!$util.isString(message.validatorAddress)) + return "validatorAddress: string expected"; + if (message.pubkey != null && message.hasOwnProperty("pubkey")) { + let error = $root.google.protobuf.Any.verify(message.pubkey); + if (error) + return "pubkey." + error; + } + if (message.value != null && message.hasOwnProperty("value")) { + let error = $root.cosmos.base.v1beta1.Coin.verify(message.value); + if (error) + return "value." + error; + } + return null; + }; + + /** + * Creates a MsgCreateValidator message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.MsgCreateValidator + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.MsgCreateValidator} MsgCreateValidator + */ + MsgCreateValidator.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.MsgCreateValidator) + return object; + let message = new $root.cosmos.staking.v1beta1.MsgCreateValidator(); + if (object.description != null) { + if (typeof object.description !== "object") + throw TypeError(".cosmos.staking.v1beta1.MsgCreateValidator.description: object expected"); + message.description = $root.cosmos.staking.v1beta1.Description.fromObject(object.description); + } + if (object.commission != null) { + if (typeof object.commission !== "object") + throw TypeError(".cosmos.staking.v1beta1.MsgCreateValidator.commission: object expected"); + message.commission = $root.cosmos.staking.v1beta1.CommissionRates.fromObject(object.commission); + } + if (object.minSelfDelegation != null) + message.minSelfDelegation = String(object.minSelfDelegation); + if (object.delegatorAddress != null) + message.delegatorAddress = String(object.delegatorAddress); + if (object.validatorAddress != null) + message.validatorAddress = String(object.validatorAddress); + if (object.pubkey != null) { + if (typeof object.pubkey !== "object") + throw TypeError(".cosmos.staking.v1beta1.MsgCreateValidator.pubkey: object expected"); + message.pubkey = $root.google.protobuf.Any.fromObject(object.pubkey); + } + if (object.value != null) { + if (typeof object.value !== "object") + throw TypeError(".cosmos.staking.v1beta1.MsgCreateValidator.value: object expected"); + message.value = $root.cosmos.base.v1beta1.Coin.fromObject(object.value); + } + return message; + }; + + /** + * Creates a plain object from a MsgCreateValidator message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.MsgCreateValidator + * @static + * @param {cosmos.staking.v1beta1.MsgCreateValidator} message MsgCreateValidator + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgCreateValidator.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.description = null; + object.commission = null; + object.minSelfDelegation = ""; + object.delegatorAddress = ""; + object.validatorAddress = ""; + object.pubkey = null; + object.value = null; + } + if (message.description != null && message.hasOwnProperty("description")) + object.description = $root.cosmos.staking.v1beta1.Description.toObject(message.description, options); + if (message.commission != null && message.hasOwnProperty("commission")) + object.commission = $root.cosmos.staking.v1beta1.CommissionRates.toObject(message.commission, options); + if (message.minSelfDelegation != null && message.hasOwnProperty("minSelfDelegation")) + object.minSelfDelegation = message.minSelfDelegation; + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + object.delegatorAddress = message.delegatorAddress; + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + object.validatorAddress = message.validatorAddress; + if (message.pubkey != null && message.hasOwnProperty("pubkey")) + object.pubkey = $root.google.protobuf.Any.toObject(message.pubkey, options); + if (message.value != null && message.hasOwnProperty("value")) + object.value = $root.cosmos.base.v1beta1.Coin.toObject(message.value, options); + return object; + }; + + /** + * Converts this MsgCreateValidator to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.MsgCreateValidator + * @instance + * @returns {Object.} JSON object + */ + MsgCreateValidator.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgCreateValidator; + })(v1beta1.MsgCreateValidator || {}); + + v1beta1.MsgCreateValidatorResponse = (function(MsgCreateValidatorResponse) { + + /** + * Properties of a MsgCreateValidatorResponse. + * @memberof cosmos.staking.v1beta1 + * @interface IMsgCreateValidatorResponse + */ + + /** + * Constructs a new MsgCreateValidatorResponse. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a MsgCreateValidatorResponse. + * @implements IMsgCreateValidatorResponse + * @constructor + * @param {cosmos.staking.v1beta1.IMsgCreateValidatorResponse=} [properties] Properties to set + */ + function MsgCreateValidatorResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new MsgCreateValidatorResponse instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.MsgCreateValidatorResponse + * @static + * @param {cosmos.staking.v1beta1.IMsgCreateValidatorResponse=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.MsgCreateValidatorResponse} MsgCreateValidatorResponse instance + */ + MsgCreateValidatorResponse.create = function create(properties) { + return new MsgCreateValidatorResponse(properties); + }; + + /** + * Encodes the specified MsgCreateValidatorResponse message. Does not implicitly {@link cosmos.staking.v1beta1.MsgCreateValidatorResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.MsgCreateValidatorResponse + * @static + * @param {cosmos.staking.v1beta1.IMsgCreateValidatorResponse} message MsgCreateValidatorResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgCreateValidatorResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MsgCreateValidatorResponse message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.MsgCreateValidatorResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.MsgCreateValidatorResponse + * @static + * @param {cosmos.staking.v1beta1.IMsgCreateValidatorResponse} message MsgCreateValidatorResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgCreateValidatorResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgCreateValidatorResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.MsgCreateValidatorResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.MsgCreateValidatorResponse} MsgCreateValidatorResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgCreateValidatorResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.MsgCreateValidatorResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgCreateValidatorResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.MsgCreateValidatorResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.MsgCreateValidatorResponse} MsgCreateValidatorResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgCreateValidatorResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgCreateValidatorResponse message. + * @function verify + * @memberof cosmos.staking.v1beta1.MsgCreateValidatorResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgCreateValidatorResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MsgCreateValidatorResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.MsgCreateValidatorResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.MsgCreateValidatorResponse} MsgCreateValidatorResponse + */ + MsgCreateValidatorResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.MsgCreateValidatorResponse) + return object; + return new $root.cosmos.staking.v1beta1.MsgCreateValidatorResponse(); + }; + + /** + * Creates a plain object from a MsgCreateValidatorResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.MsgCreateValidatorResponse + * @static + * @param {cosmos.staking.v1beta1.MsgCreateValidatorResponse} message MsgCreateValidatorResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgCreateValidatorResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MsgCreateValidatorResponse to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.MsgCreateValidatorResponse + * @instance + * @returns {Object.} JSON object + */ + MsgCreateValidatorResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgCreateValidatorResponse; + })(v1beta1.MsgCreateValidatorResponse || {}); + + v1beta1.MsgEditValidator = (function(MsgEditValidator) { + + /** + * Properties of a MsgEditValidator. + * @memberof cosmos.staking.v1beta1 + * @interface IMsgEditValidator + * @property {cosmos.staking.v1beta1.IDescription|null} [description] MsgEditValidator description + * @property {string|null} [validatorAddress] MsgEditValidator validatorAddress + * @property {string|null} [commissionRate] MsgEditValidator commissionRate + * @property {string|null} [minSelfDelegation] MsgEditValidator minSelfDelegation + */ + + /** + * Constructs a new MsgEditValidator. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a MsgEditValidator. + * @implements IMsgEditValidator + * @constructor + * @param {cosmos.staking.v1beta1.IMsgEditValidator=} [properties] Properties to set + */ + function MsgEditValidator(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgEditValidator description. + * @member {cosmos.staking.v1beta1.IDescription|null|undefined} description + * @memberof cosmos.staking.v1beta1.MsgEditValidator + * @instance + */ + MsgEditValidator.prototype.description = null; + + /** + * MsgEditValidator validatorAddress. + * @member {string} validatorAddress + * @memberof cosmos.staking.v1beta1.MsgEditValidator + * @instance + */ + MsgEditValidator.prototype.validatorAddress = ""; + + /** + * MsgEditValidator commissionRate. + * @member {string} commissionRate + * @memberof cosmos.staking.v1beta1.MsgEditValidator + * @instance + */ + MsgEditValidator.prototype.commissionRate = ""; + + /** + * MsgEditValidator minSelfDelegation. + * @member {string} minSelfDelegation + * @memberof cosmos.staking.v1beta1.MsgEditValidator + * @instance + */ + MsgEditValidator.prototype.minSelfDelegation = ""; + + /** + * Creates a new MsgEditValidator instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.MsgEditValidator + * @static + * @param {cosmos.staking.v1beta1.IMsgEditValidator=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.MsgEditValidator} MsgEditValidator instance + */ + MsgEditValidator.create = function create(properties) { + return new MsgEditValidator(properties); + }; + + /** + * Encodes the specified MsgEditValidator message. Does not implicitly {@link cosmos.staking.v1beta1.MsgEditValidator.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.MsgEditValidator + * @static + * @param {cosmos.staking.v1beta1.IMsgEditValidator} message MsgEditValidator message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgEditValidator.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + $root.cosmos.staking.v1beta1.Description.encode(message.description, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.validatorAddress != null && Object.hasOwnProperty.call(message, "validatorAddress")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.validatorAddress); + if (message.commissionRate != null && Object.hasOwnProperty.call(message, "commissionRate")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.commissionRate); + if (message.minSelfDelegation != null && Object.hasOwnProperty.call(message, "minSelfDelegation")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.minSelfDelegation); + return writer; + }; + + /** + * Encodes the specified MsgEditValidator message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.MsgEditValidator.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.MsgEditValidator + * @static + * @param {cosmos.staking.v1beta1.IMsgEditValidator} message MsgEditValidator message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgEditValidator.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgEditValidator message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.MsgEditValidator + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.MsgEditValidator} MsgEditValidator + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgEditValidator.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.MsgEditValidator(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.description = $root.cosmos.staking.v1beta1.Description.decode(reader, reader.uint32()); + break; + case 2: + message.validatorAddress = reader.string(); + break; + case 3: + message.commissionRate = reader.string(); + break; + case 4: + message.minSelfDelegation = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgEditValidator message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.MsgEditValidator + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.MsgEditValidator} MsgEditValidator + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgEditValidator.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgEditValidator message. + * @function verify + * @memberof cosmos.staking.v1beta1.MsgEditValidator + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgEditValidator.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.description != null && message.hasOwnProperty("description")) { + let error = $root.cosmos.staking.v1beta1.Description.verify(message.description); + if (error) + return "description." + error; + } + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + if (!$util.isString(message.validatorAddress)) + return "validatorAddress: string expected"; + if (message.commissionRate != null && message.hasOwnProperty("commissionRate")) + if (!$util.isString(message.commissionRate)) + return "commissionRate: string expected"; + if (message.minSelfDelegation != null && message.hasOwnProperty("minSelfDelegation")) + if (!$util.isString(message.minSelfDelegation)) + return "minSelfDelegation: string expected"; + return null; + }; + + /** + * Creates a MsgEditValidator message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.MsgEditValidator + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.MsgEditValidator} MsgEditValidator + */ + MsgEditValidator.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.MsgEditValidator) + return object; + let message = new $root.cosmos.staking.v1beta1.MsgEditValidator(); + if (object.description != null) { + if (typeof object.description !== "object") + throw TypeError(".cosmos.staking.v1beta1.MsgEditValidator.description: object expected"); + message.description = $root.cosmos.staking.v1beta1.Description.fromObject(object.description); + } + if (object.validatorAddress != null) + message.validatorAddress = String(object.validatorAddress); + if (object.commissionRate != null) + message.commissionRate = String(object.commissionRate); + if (object.minSelfDelegation != null) + message.minSelfDelegation = String(object.minSelfDelegation); + return message; + }; + + /** + * Creates a plain object from a MsgEditValidator message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.MsgEditValidator + * @static + * @param {cosmos.staking.v1beta1.MsgEditValidator} message MsgEditValidator + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgEditValidator.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.description = null; + object.validatorAddress = ""; + object.commissionRate = ""; + object.minSelfDelegation = ""; + } + if (message.description != null && message.hasOwnProperty("description")) + object.description = $root.cosmos.staking.v1beta1.Description.toObject(message.description, options); + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + object.validatorAddress = message.validatorAddress; + if (message.commissionRate != null && message.hasOwnProperty("commissionRate")) + object.commissionRate = message.commissionRate; + if (message.minSelfDelegation != null && message.hasOwnProperty("minSelfDelegation")) + object.minSelfDelegation = message.minSelfDelegation; + return object; + }; + + /** + * Converts this MsgEditValidator to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.MsgEditValidator + * @instance + * @returns {Object.} JSON object + */ + MsgEditValidator.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgEditValidator; + })(v1beta1.MsgEditValidator || {}); + + v1beta1.MsgEditValidatorResponse = (function(MsgEditValidatorResponse) { + + /** + * Properties of a MsgEditValidatorResponse. + * @memberof cosmos.staking.v1beta1 + * @interface IMsgEditValidatorResponse + */ + + /** + * Constructs a new MsgEditValidatorResponse. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a MsgEditValidatorResponse. + * @implements IMsgEditValidatorResponse + * @constructor + * @param {cosmos.staking.v1beta1.IMsgEditValidatorResponse=} [properties] Properties to set + */ + function MsgEditValidatorResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new MsgEditValidatorResponse instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.MsgEditValidatorResponse + * @static + * @param {cosmos.staking.v1beta1.IMsgEditValidatorResponse=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.MsgEditValidatorResponse} MsgEditValidatorResponse instance + */ + MsgEditValidatorResponse.create = function create(properties) { + return new MsgEditValidatorResponse(properties); + }; + + /** + * Encodes the specified MsgEditValidatorResponse message. Does not implicitly {@link cosmos.staking.v1beta1.MsgEditValidatorResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.MsgEditValidatorResponse + * @static + * @param {cosmos.staking.v1beta1.IMsgEditValidatorResponse} message MsgEditValidatorResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgEditValidatorResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MsgEditValidatorResponse message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.MsgEditValidatorResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.MsgEditValidatorResponse + * @static + * @param {cosmos.staking.v1beta1.IMsgEditValidatorResponse} message MsgEditValidatorResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgEditValidatorResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgEditValidatorResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.MsgEditValidatorResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.MsgEditValidatorResponse} MsgEditValidatorResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgEditValidatorResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.MsgEditValidatorResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgEditValidatorResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.MsgEditValidatorResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.MsgEditValidatorResponse} MsgEditValidatorResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgEditValidatorResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgEditValidatorResponse message. + * @function verify + * @memberof cosmos.staking.v1beta1.MsgEditValidatorResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgEditValidatorResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MsgEditValidatorResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.MsgEditValidatorResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.MsgEditValidatorResponse} MsgEditValidatorResponse + */ + MsgEditValidatorResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.MsgEditValidatorResponse) + return object; + return new $root.cosmos.staking.v1beta1.MsgEditValidatorResponse(); + }; + + /** + * Creates a plain object from a MsgEditValidatorResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.MsgEditValidatorResponse + * @static + * @param {cosmos.staking.v1beta1.MsgEditValidatorResponse} message MsgEditValidatorResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgEditValidatorResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MsgEditValidatorResponse to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.MsgEditValidatorResponse + * @instance + * @returns {Object.} JSON object + */ + MsgEditValidatorResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgEditValidatorResponse; + })(v1beta1.MsgEditValidatorResponse || {}); + + v1beta1.MsgDelegate = (function(MsgDelegate) { + + /** + * Properties of a MsgDelegate. + * @memberof cosmos.staking.v1beta1 + * @interface IMsgDelegate + * @property {string|null} [delegatorAddress] MsgDelegate delegatorAddress + * @property {string|null} [validatorAddress] MsgDelegate validatorAddress + * @property {cosmos.base.v1beta1.ICoin|null} [amount] MsgDelegate amount + */ + + /** + * Constructs a new MsgDelegate. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a MsgDelegate. + * @implements IMsgDelegate + * @constructor + * @param {cosmos.staking.v1beta1.IMsgDelegate=} [properties] Properties to set + */ + function MsgDelegate(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgDelegate delegatorAddress. + * @member {string} delegatorAddress + * @memberof cosmos.staking.v1beta1.MsgDelegate + * @instance + */ + MsgDelegate.prototype.delegatorAddress = ""; + + /** + * MsgDelegate validatorAddress. + * @member {string} validatorAddress + * @memberof cosmos.staking.v1beta1.MsgDelegate + * @instance + */ + MsgDelegate.prototype.validatorAddress = ""; + + /** + * MsgDelegate amount. + * @member {cosmos.base.v1beta1.ICoin|null|undefined} amount + * @memberof cosmos.staking.v1beta1.MsgDelegate + * @instance + */ + MsgDelegate.prototype.amount = null; + + /** + * Creates a new MsgDelegate instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.MsgDelegate + * @static + * @param {cosmos.staking.v1beta1.IMsgDelegate=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.MsgDelegate} MsgDelegate instance + */ + MsgDelegate.create = function create(properties) { + return new MsgDelegate(properties); + }; + + /** + * Encodes the specified MsgDelegate message. Does not implicitly {@link cosmos.staking.v1beta1.MsgDelegate.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.MsgDelegate + * @static + * @param {cosmos.staking.v1beta1.IMsgDelegate} message MsgDelegate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgDelegate.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.delegatorAddress != null && Object.hasOwnProperty.call(message, "delegatorAddress")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.delegatorAddress); + if (message.validatorAddress != null && Object.hasOwnProperty.call(message, "validatorAddress")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.validatorAddress); + if (message.amount != null && Object.hasOwnProperty.call(message, "amount")) + $root.cosmos.base.v1beta1.Coin.encode(message.amount, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MsgDelegate message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.MsgDelegate.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.MsgDelegate + * @static + * @param {cosmos.staking.v1beta1.IMsgDelegate} message MsgDelegate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgDelegate.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgDelegate message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.MsgDelegate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.MsgDelegate} MsgDelegate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgDelegate.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.MsgDelegate(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.delegatorAddress = reader.string(); + break; + case 2: + message.validatorAddress = reader.string(); + break; + case 3: + message.amount = $root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgDelegate message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.MsgDelegate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.MsgDelegate} MsgDelegate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgDelegate.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgDelegate message. + * @function verify + * @memberof cosmos.staking.v1beta1.MsgDelegate + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgDelegate.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + if (!$util.isString(message.delegatorAddress)) + return "delegatorAddress: string expected"; + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + if (!$util.isString(message.validatorAddress)) + return "validatorAddress: string expected"; + if (message.amount != null && message.hasOwnProperty("amount")) { + let error = $root.cosmos.base.v1beta1.Coin.verify(message.amount); + if (error) + return "amount." + error; + } + return null; + }; + + /** + * Creates a MsgDelegate message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.MsgDelegate + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.MsgDelegate} MsgDelegate + */ + MsgDelegate.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.MsgDelegate) + return object; + let message = new $root.cosmos.staking.v1beta1.MsgDelegate(); + if (object.delegatorAddress != null) + message.delegatorAddress = String(object.delegatorAddress); + if (object.validatorAddress != null) + message.validatorAddress = String(object.validatorAddress); + if (object.amount != null) { + if (typeof object.amount !== "object") + throw TypeError(".cosmos.staking.v1beta1.MsgDelegate.amount: object expected"); + message.amount = $root.cosmos.base.v1beta1.Coin.fromObject(object.amount); + } + return message; + }; + + /** + * Creates a plain object from a MsgDelegate message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.MsgDelegate + * @static + * @param {cosmos.staking.v1beta1.MsgDelegate} message MsgDelegate + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgDelegate.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.delegatorAddress = ""; + object.validatorAddress = ""; + object.amount = null; + } + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + object.delegatorAddress = message.delegatorAddress; + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + object.validatorAddress = message.validatorAddress; + if (message.amount != null && message.hasOwnProperty("amount")) + object.amount = $root.cosmos.base.v1beta1.Coin.toObject(message.amount, options); + return object; + }; + + /** + * Converts this MsgDelegate to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.MsgDelegate + * @instance + * @returns {Object.} JSON object + */ + MsgDelegate.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgDelegate; + })(v1beta1.MsgDelegate || {}); + + v1beta1.MsgDelegateResponse = (function(MsgDelegateResponse) { + + /** + * Properties of a MsgDelegateResponse. + * @memberof cosmos.staking.v1beta1 + * @interface IMsgDelegateResponse + */ + + /** + * Constructs a new MsgDelegateResponse. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a MsgDelegateResponse. + * @implements IMsgDelegateResponse + * @constructor + * @param {cosmos.staking.v1beta1.IMsgDelegateResponse=} [properties] Properties to set + */ + function MsgDelegateResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new MsgDelegateResponse instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.MsgDelegateResponse + * @static + * @param {cosmos.staking.v1beta1.IMsgDelegateResponse=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.MsgDelegateResponse} MsgDelegateResponse instance + */ + MsgDelegateResponse.create = function create(properties) { + return new MsgDelegateResponse(properties); + }; + + /** + * Encodes the specified MsgDelegateResponse message. Does not implicitly {@link cosmos.staking.v1beta1.MsgDelegateResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.MsgDelegateResponse + * @static + * @param {cosmos.staking.v1beta1.IMsgDelegateResponse} message MsgDelegateResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgDelegateResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MsgDelegateResponse message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.MsgDelegateResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.MsgDelegateResponse + * @static + * @param {cosmos.staking.v1beta1.IMsgDelegateResponse} message MsgDelegateResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgDelegateResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgDelegateResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.MsgDelegateResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.MsgDelegateResponse} MsgDelegateResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgDelegateResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.MsgDelegateResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgDelegateResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.MsgDelegateResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.MsgDelegateResponse} MsgDelegateResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgDelegateResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgDelegateResponse message. + * @function verify + * @memberof cosmos.staking.v1beta1.MsgDelegateResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgDelegateResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MsgDelegateResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.MsgDelegateResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.MsgDelegateResponse} MsgDelegateResponse + */ + MsgDelegateResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.MsgDelegateResponse) + return object; + return new $root.cosmos.staking.v1beta1.MsgDelegateResponse(); + }; + + /** + * Creates a plain object from a MsgDelegateResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.MsgDelegateResponse + * @static + * @param {cosmos.staking.v1beta1.MsgDelegateResponse} message MsgDelegateResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgDelegateResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MsgDelegateResponse to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.MsgDelegateResponse + * @instance + * @returns {Object.} JSON object + */ + MsgDelegateResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgDelegateResponse; + })(v1beta1.MsgDelegateResponse || {}); + + v1beta1.MsgBeginRedelegate = (function(MsgBeginRedelegate) { + + /** + * Properties of a MsgBeginRedelegate. + * @memberof cosmos.staking.v1beta1 + * @interface IMsgBeginRedelegate + * @property {string|null} [delegatorAddress] MsgBeginRedelegate delegatorAddress + * @property {string|null} [validatorSrcAddress] MsgBeginRedelegate validatorSrcAddress + * @property {string|null} [validatorDstAddress] MsgBeginRedelegate validatorDstAddress + * @property {cosmos.base.v1beta1.ICoin|null} [amount] MsgBeginRedelegate amount + */ + + /** + * Constructs a new MsgBeginRedelegate. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a MsgBeginRedelegate. + * @implements IMsgBeginRedelegate + * @constructor + * @param {cosmos.staking.v1beta1.IMsgBeginRedelegate=} [properties] Properties to set + */ + function MsgBeginRedelegate(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgBeginRedelegate delegatorAddress. + * @member {string} delegatorAddress + * @memberof cosmos.staking.v1beta1.MsgBeginRedelegate + * @instance + */ + MsgBeginRedelegate.prototype.delegatorAddress = ""; + + /** + * MsgBeginRedelegate validatorSrcAddress. + * @member {string} validatorSrcAddress + * @memberof cosmos.staking.v1beta1.MsgBeginRedelegate + * @instance + */ + MsgBeginRedelegate.prototype.validatorSrcAddress = ""; + + /** + * MsgBeginRedelegate validatorDstAddress. + * @member {string} validatorDstAddress + * @memberof cosmos.staking.v1beta1.MsgBeginRedelegate + * @instance + */ + MsgBeginRedelegate.prototype.validatorDstAddress = ""; + + /** + * MsgBeginRedelegate amount. + * @member {cosmos.base.v1beta1.ICoin|null|undefined} amount + * @memberof cosmos.staking.v1beta1.MsgBeginRedelegate + * @instance + */ + MsgBeginRedelegate.prototype.amount = null; + + /** + * Creates a new MsgBeginRedelegate instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.MsgBeginRedelegate + * @static + * @param {cosmos.staking.v1beta1.IMsgBeginRedelegate=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.MsgBeginRedelegate} MsgBeginRedelegate instance + */ + MsgBeginRedelegate.create = function create(properties) { + return new MsgBeginRedelegate(properties); + }; + + /** + * Encodes the specified MsgBeginRedelegate message. Does not implicitly {@link cosmos.staking.v1beta1.MsgBeginRedelegate.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.MsgBeginRedelegate + * @static + * @param {cosmos.staking.v1beta1.IMsgBeginRedelegate} message MsgBeginRedelegate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgBeginRedelegate.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.delegatorAddress != null && Object.hasOwnProperty.call(message, "delegatorAddress")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.delegatorAddress); + if (message.validatorSrcAddress != null && Object.hasOwnProperty.call(message, "validatorSrcAddress")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.validatorSrcAddress); + if (message.validatorDstAddress != null && Object.hasOwnProperty.call(message, "validatorDstAddress")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.validatorDstAddress); + if (message.amount != null && Object.hasOwnProperty.call(message, "amount")) + $root.cosmos.base.v1beta1.Coin.encode(message.amount, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MsgBeginRedelegate message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.MsgBeginRedelegate.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.MsgBeginRedelegate + * @static + * @param {cosmos.staking.v1beta1.IMsgBeginRedelegate} message MsgBeginRedelegate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgBeginRedelegate.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgBeginRedelegate message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.MsgBeginRedelegate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.MsgBeginRedelegate} MsgBeginRedelegate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgBeginRedelegate.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.MsgBeginRedelegate(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.delegatorAddress = reader.string(); + break; + case 2: + message.validatorSrcAddress = reader.string(); + break; + case 3: + message.validatorDstAddress = reader.string(); + break; + case 4: + message.amount = $root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgBeginRedelegate message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.MsgBeginRedelegate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.MsgBeginRedelegate} MsgBeginRedelegate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgBeginRedelegate.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgBeginRedelegate message. + * @function verify + * @memberof cosmos.staking.v1beta1.MsgBeginRedelegate + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgBeginRedelegate.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + if (!$util.isString(message.delegatorAddress)) + return "delegatorAddress: string expected"; + if (message.validatorSrcAddress != null && message.hasOwnProperty("validatorSrcAddress")) + if (!$util.isString(message.validatorSrcAddress)) + return "validatorSrcAddress: string expected"; + if (message.validatorDstAddress != null && message.hasOwnProperty("validatorDstAddress")) + if (!$util.isString(message.validatorDstAddress)) + return "validatorDstAddress: string expected"; + if (message.amount != null && message.hasOwnProperty("amount")) { + let error = $root.cosmos.base.v1beta1.Coin.verify(message.amount); + if (error) + return "amount." + error; + } + return null; + }; + + /** + * Creates a MsgBeginRedelegate message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.MsgBeginRedelegate + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.MsgBeginRedelegate} MsgBeginRedelegate + */ + MsgBeginRedelegate.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.MsgBeginRedelegate) + return object; + let message = new $root.cosmos.staking.v1beta1.MsgBeginRedelegate(); + if (object.delegatorAddress != null) + message.delegatorAddress = String(object.delegatorAddress); + if (object.validatorSrcAddress != null) + message.validatorSrcAddress = String(object.validatorSrcAddress); + if (object.validatorDstAddress != null) + message.validatorDstAddress = String(object.validatorDstAddress); + if (object.amount != null) { + if (typeof object.amount !== "object") + throw TypeError(".cosmos.staking.v1beta1.MsgBeginRedelegate.amount: object expected"); + message.amount = $root.cosmos.base.v1beta1.Coin.fromObject(object.amount); + } + return message; + }; + + /** + * Creates a plain object from a MsgBeginRedelegate message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.MsgBeginRedelegate + * @static + * @param {cosmos.staking.v1beta1.MsgBeginRedelegate} message MsgBeginRedelegate + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgBeginRedelegate.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.delegatorAddress = ""; + object.validatorSrcAddress = ""; + object.validatorDstAddress = ""; + object.amount = null; + } + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + object.delegatorAddress = message.delegatorAddress; + if (message.validatorSrcAddress != null && message.hasOwnProperty("validatorSrcAddress")) + object.validatorSrcAddress = message.validatorSrcAddress; + if (message.validatorDstAddress != null && message.hasOwnProperty("validatorDstAddress")) + object.validatorDstAddress = message.validatorDstAddress; + if (message.amount != null && message.hasOwnProperty("amount")) + object.amount = $root.cosmos.base.v1beta1.Coin.toObject(message.amount, options); + return object; + }; + + /** + * Converts this MsgBeginRedelegate to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.MsgBeginRedelegate + * @instance + * @returns {Object.} JSON object + */ + MsgBeginRedelegate.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgBeginRedelegate; + })(v1beta1.MsgBeginRedelegate || {}); + + v1beta1.MsgBeginRedelegateResponse = (function(MsgBeginRedelegateResponse) { + + /** + * Properties of a MsgBeginRedelegateResponse. + * @memberof cosmos.staking.v1beta1 + * @interface IMsgBeginRedelegateResponse + * @property {google.protobuf.ITimestamp|null} [completionTime] MsgBeginRedelegateResponse completionTime + */ + + /** + * Constructs a new MsgBeginRedelegateResponse. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a MsgBeginRedelegateResponse. + * @implements IMsgBeginRedelegateResponse + * @constructor + * @param {cosmos.staking.v1beta1.IMsgBeginRedelegateResponse=} [properties] Properties to set + */ + function MsgBeginRedelegateResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgBeginRedelegateResponse completionTime. + * @member {google.protobuf.ITimestamp|null|undefined} completionTime + * @memberof cosmos.staking.v1beta1.MsgBeginRedelegateResponse + * @instance + */ + MsgBeginRedelegateResponse.prototype.completionTime = null; + + /** + * Creates a new MsgBeginRedelegateResponse instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.MsgBeginRedelegateResponse + * @static + * @param {cosmos.staking.v1beta1.IMsgBeginRedelegateResponse=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.MsgBeginRedelegateResponse} MsgBeginRedelegateResponse instance + */ + MsgBeginRedelegateResponse.create = function create(properties) { + return new MsgBeginRedelegateResponse(properties); + }; + + /** + * Encodes the specified MsgBeginRedelegateResponse message. Does not implicitly {@link cosmos.staking.v1beta1.MsgBeginRedelegateResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.MsgBeginRedelegateResponse + * @static + * @param {cosmos.staking.v1beta1.IMsgBeginRedelegateResponse} message MsgBeginRedelegateResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgBeginRedelegateResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.completionTime != null && Object.hasOwnProperty.call(message, "completionTime")) + $root.google.protobuf.Timestamp.encode(message.completionTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MsgBeginRedelegateResponse message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.MsgBeginRedelegateResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.MsgBeginRedelegateResponse + * @static + * @param {cosmos.staking.v1beta1.IMsgBeginRedelegateResponse} message MsgBeginRedelegateResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgBeginRedelegateResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgBeginRedelegateResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.MsgBeginRedelegateResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.MsgBeginRedelegateResponse} MsgBeginRedelegateResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgBeginRedelegateResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.MsgBeginRedelegateResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.completionTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgBeginRedelegateResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.MsgBeginRedelegateResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.MsgBeginRedelegateResponse} MsgBeginRedelegateResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgBeginRedelegateResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgBeginRedelegateResponse message. + * @function verify + * @memberof cosmos.staking.v1beta1.MsgBeginRedelegateResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgBeginRedelegateResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.completionTime != null && message.hasOwnProperty("completionTime")) { + let error = $root.google.protobuf.Timestamp.verify(message.completionTime); + if (error) + return "completionTime." + error; + } + return null; + }; + + /** + * Creates a MsgBeginRedelegateResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.MsgBeginRedelegateResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.MsgBeginRedelegateResponse} MsgBeginRedelegateResponse + */ + MsgBeginRedelegateResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.MsgBeginRedelegateResponse) + return object; + let message = new $root.cosmos.staking.v1beta1.MsgBeginRedelegateResponse(); + if (object.completionTime != null) { + if (typeof object.completionTime !== "object") + throw TypeError(".cosmos.staking.v1beta1.MsgBeginRedelegateResponse.completionTime: object expected"); + message.completionTime = $root.google.protobuf.Timestamp.fromObject(object.completionTime); + } + return message; + }; + + /** + * Creates a plain object from a MsgBeginRedelegateResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.MsgBeginRedelegateResponse + * @static + * @param {cosmos.staking.v1beta1.MsgBeginRedelegateResponse} message MsgBeginRedelegateResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgBeginRedelegateResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.completionTime = null; + if (message.completionTime != null && message.hasOwnProperty("completionTime")) + object.completionTime = $root.google.protobuf.Timestamp.toObject(message.completionTime, options); + return object; + }; + + /** + * Converts this MsgBeginRedelegateResponse to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.MsgBeginRedelegateResponse + * @instance + * @returns {Object.} JSON object + */ + MsgBeginRedelegateResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgBeginRedelegateResponse; + })(v1beta1.MsgBeginRedelegateResponse || {}); + + v1beta1.MsgUndelegate = (function(MsgUndelegate) { + + /** + * Properties of a MsgUndelegate. + * @memberof cosmos.staking.v1beta1 + * @interface IMsgUndelegate + * @property {string|null} [delegatorAddress] MsgUndelegate delegatorAddress + * @property {string|null} [validatorAddress] MsgUndelegate validatorAddress + * @property {cosmos.base.v1beta1.ICoin|null} [amount] MsgUndelegate amount + */ + + /** + * Constructs a new MsgUndelegate. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a MsgUndelegate. + * @implements IMsgUndelegate + * @constructor + * @param {cosmos.staking.v1beta1.IMsgUndelegate=} [properties] Properties to set + */ + function MsgUndelegate(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgUndelegate delegatorAddress. + * @member {string} delegatorAddress + * @memberof cosmos.staking.v1beta1.MsgUndelegate + * @instance + */ + MsgUndelegate.prototype.delegatorAddress = ""; + + /** + * MsgUndelegate validatorAddress. + * @member {string} validatorAddress + * @memberof cosmos.staking.v1beta1.MsgUndelegate + * @instance + */ + MsgUndelegate.prototype.validatorAddress = ""; + + /** + * MsgUndelegate amount. + * @member {cosmos.base.v1beta1.ICoin|null|undefined} amount + * @memberof cosmos.staking.v1beta1.MsgUndelegate + * @instance + */ + MsgUndelegate.prototype.amount = null; + + /** + * Creates a new MsgUndelegate instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.MsgUndelegate + * @static + * @param {cosmos.staking.v1beta1.IMsgUndelegate=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.MsgUndelegate} MsgUndelegate instance + */ + MsgUndelegate.create = function create(properties) { + return new MsgUndelegate(properties); + }; + + /** + * Encodes the specified MsgUndelegate message. Does not implicitly {@link cosmos.staking.v1beta1.MsgUndelegate.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.MsgUndelegate + * @static + * @param {cosmos.staking.v1beta1.IMsgUndelegate} message MsgUndelegate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgUndelegate.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.delegatorAddress != null && Object.hasOwnProperty.call(message, "delegatorAddress")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.delegatorAddress); + if (message.validatorAddress != null && Object.hasOwnProperty.call(message, "validatorAddress")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.validatorAddress); + if (message.amount != null && Object.hasOwnProperty.call(message, "amount")) + $root.cosmos.base.v1beta1.Coin.encode(message.amount, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MsgUndelegate message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.MsgUndelegate.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.MsgUndelegate + * @static + * @param {cosmos.staking.v1beta1.IMsgUndelegate} message MsgUndelegate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgUndelegate.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgUndelegate message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.MsgUndelegate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.MsgUndelegate} MsgUndelegate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgUndelegate.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.MsgUndelegate(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.delegatorAddress = reader.string(); + break; + case 2: + message.validatorAddress = reader.string(); + break; + case 3: + message.amount = $root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgUndelegate message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.MsgUndelegate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.MsgUndelegate} MsgUndelegate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgUndelegate.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgUndelegate message. + * @function verify + * @memberof cosmos.staking.v1beta1.MsgUndelegate + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgUndelegate.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + if (!$util.isString(message.delegatorAddress)) + return "delegatorAddress: string expected"; + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + if (!$util.isString(message.validatorAddress)) + return "validatorAddress: string expected"; + if (message.amount != null && message.hasOwnProperty("amount")) { + let error = $root.cosmos.base.v1beta1.Coin.verify(message.amount); + if (error) + return "amount." + error; + } + return null; + }; + + /** + * Creates a MsgUndelegate message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.MsgUndelegate + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.MsgUndelegate} MsgUndelegate + */ + MsgUndelegate.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.MsgUndelegate) + return object; + let message = new $root.cosmos.staking.v1beta1.MsgUndelegate(); + if (object.delegatorAddress != null) + message.delegatorAddress = String(object.delegatorAddress); + if (object.validatorAddress != null) + message.validatorAddress = String(object.validatorAddress); + if (object.amount != null) { + if (typeof object.amount !== "object") + throw TypeError(".cosmos.staking.v1beta1.MsgUndelegate.amount: object expected"); + message.amount = $root.cosmos.base.v1beta1.Coin.fromObject(object.amount); + } + return message; + }; + + /** + * Creates a plain object from a MsgUndelegate message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.MsgUndelegate + * @static + * @param {cosmos.staking.v1beta1.MsgUndelegate} message MsgUndelegate + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgUndelegate.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.delegatorAddress = ""; + object.validatorAddress = ""; + object.amount = null; + } + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + object.delegatorAddress = message.delegatorAddress; + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + object.validatorAddress = message.validatorAddress; + if (message.amount != null && message.hasOwnProperty("amount")) + object.amount = $root.cosmos.base.v1beta1.Coin.toObject(message.amount, options); + return object; + }; + + /** + * Converts this MsgUndelegate to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.MsgUndelegate + * @instance + * @returns {Object.} JSON object + */ + MsgUndelegate.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgUndelegate; + })(v1beta1.MsgUndelegate || {}); + + v1beta1.MsgUndelegateResponse = (function(MsgUndelegateResponse) { + + /** + * Properties of a MsgUndelegateResponse. + * @memberof cosmos.staking.v1beta1 + * @interface IMsgUndelegateResponse + * @property {google.protobuf.ITimestamp|null} [completionTime] MsgUndelegateResponse completionTime + */ + + /** + * Constructs a new MsgUndelegateResponse. + * @memberof cosmos.staking.v1beta1 + * @classdesc Represents a MsgUndelegateResponse. + * @implements IMsgUndelegateResponse + * @constructor + * @param {cosmos.staking.v1beta1.IMsgUndelegateResponse=} [properties] Properties to set + */ + function MsgUndelegateResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgUndelegateResponse completionTime. + * @member {google.protobuf.ITimestamp|null|undefined} completionTime + * @memberof cosmos.staking.v1beta1.MsgUndelegateResponse + * @instance + */ + MsgUndelegateResponse.prototype.completionTime = null; + + /** + * Creates a new MsgUndelegateResponse instance using the specified properties. + * @function create + * @memberof cosmos.staking.v1beta1.MsgUndelegateResponse + * @static + * @param {cosmos.staking.v1beta1.IMsgUndelegateResponse=} [properties] Properties to set + * @returns {cosmos.staking.v1beta1.MsgUndelegateResponse} MsgUndelegateResponse instance + */ + MsgUndelegateResponse.create = function create(properties) { + return new MsgUndelegateResponse(properties); + }; + + /** + * Encodes the specified MsgUndelegateResponse message. Does not implicitly {@link cosmos.staking.v1beta1.MsgUndelegateResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.staking.v1beta1.MsgUndelegateResponse + * @static + * @param {cosmos.staking.v1beta1.IMsgUndelegateResponse} message MsgUndelegateResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgUndelegateResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.completionTime != null && Object.hasOwnProperty.call(message, "completionTime")) + $root.google.protobuf.Timestamp.encode(message.completionTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MsgUndelegateResponse message, length delimited. Does not implicitly {@link cosmos.staking.v1beta1.MsgUndelegateResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.staking.v1beta1.MsgUndelegateResponse + * @static + * @param {cosmos.staking.v1beta1.IMsgUndelegateResponse} message MsgUndelegateResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgUndelegateResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgUndelegateResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.staking.v1beta1.MsgUndelegateResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.staking.v1beta1.MsgUndelegateResponse} MsgUndelegateResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgUndelegateResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.staking.v1beta1.MsgUndelegateResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.completionTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgUndelegateResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.staking.v1beta1.MsgUndelegateResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.staking.v1beta1.MsgUndelegateResponse} MsgUndelegateResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgUndelegateResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgUndelegateResponse message. + * @function verify + * @memberof cosmos.staking.v1beta1.MsgUndelegateResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgUndelegateResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.completionTime != null && message.hasOwnProperty("completionTime")) { + let error = $root.google.protobuf.Timestamp.verify(message.completionTime); + if (error) + return "completionTime." + error; + } + return null; + }; + + /** + * Creates a MsgUndelegateResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.staking.v1beta1.MsgUndelegateResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.staking.v1beta1.MsgUndelegateResponse} MsgUndelegateResponse + */ + MsgUndelegateResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.staking.v1beta1.MsgUndelegateResponse) + return object; + let message = new $root.cosmos.staking.v1beta1.MsgUndelegateResponse(); + if (object.completionTime != null) { + if (typeof object.completionTime !== "object") + throw TypeError(".cosmos.staking.v1beta1.MsgUndelegateResponse.completionTime: object expected"); + message.completionTime = $root.google.protobuf.Timestamp.fromObject(object.completionTime); + } + return message; + }; + + /** + * Creates a plain object from a MsgUndelegateResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.staking.v1beta1.MsgUndelegateResponse + * @static + * @param {cosmos.staking.v1beta1.MsgUndelegateResponse} message MsgUndelegateResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgUndelegateResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.completionTime = null; + if (message.completionTime != null && message.hasOwnProperty("completionTime")) + object.completionTime = $root.google.protobuf.Timestamp.toObject(message.completionTime, options); + return object; + }; + + /** + * Converts this MsgUndelegateResponse to JSON. + * @function toJSON + * @memberof cosmos.staking.v1beta1.MsgUndelegateResponse + * @instance + * @returns {Object.} JSON object + */ + MsgUndelegateResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgUndelegateResponse; + })(v1beta1.MsgUndelegateResponse || {}); + + return v1beta1; + })(staking.v1beta1 || {}); + + return staking; + })(cosmos.staking || {}); + + /** + * Namespace tx. + * @memberof cosmos + * @namespace + */ + + cosmos.tx = (function(tx) { + + /** + * Namespace signing. + * @memberof cosmos.tx + * @namespace + */ + + tx.signing = (function(signing) { + + /** + * Namespace v1beta1. + * @memberof cosmos.tx.signing + * @namespace + */ + + signing.v1beta1 = (function(v1beta1) { + + /** + * SignMode enum. + * @name cosmos.tx.signing.v1beta1.SignMode + * @enum {string} + * @property {number} SIGN_MODE_UNSPECIFIED=0 SIGN_MODE_UNSPECIFIED value + * @property {number} SIGN_MODE_DIRECT=1 SIGN_MODE_DIRECT value + * @property {number} SIGN_MODE_TEXTUAL=2 SIGN_MODE_TEXTUAL value + * @property {number} SIGN_MODE_LEGACY_AMINO_JSON=127 SIGN_MODE_LEGACY_AMINO_JSON value + */ + v1beta1.SignMode = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SIGN_MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SIGN_MODE_DIRECT"] = 1; + values[valuesById[2] = "SIGN_MODE_TEXTUAL"] = 2; + values[valuesById[127] = "SIGN_MODE_LEGACY_AMINO_JSON"] = 127; + return values; + })(); + + v1beta1.SignatureDescriptors = (function(SignatureDescriptors) { + + /** + * Properties of a SignatureDescriptors. + * @memberof cosmos.tx.signing.v1beta1 + * @interface ISignatureDescriptors + * @property {Array.|null} [signatures] SignatureDescriptors signatures + */ + + /** + * Constructs a new SignatureDescriptors. + * @memberof cosmos.tx.signing.v1beta1 + * @classdesc Represents a SignatureDescriptors. + * @implements ISignatureDescriptors + * @constructor + * @param {cosmos.tx.signing.v1beta1.ISignatureDescriptors=} [properties] Properties to set + */ + function SignatureDescriptors(properties) { + this.signatures = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SignatureDescriptors signatures. + * @member {Array.} signatures + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptors + * @instance + */ + SignatureDescriptors.prototype.signatures = $util.emptyArray; + + /** + * Creates a new SignatureDescriptors instance using the specified properties. + * @function create + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptors + * @static + * @param {cosmos.tx.signing.v1beta1.ISignatureDescriptors=} [properties] Properties to set + * @returns {cosmos.tx.signing.v1beta1.SignatureDescriptors} SignatureDescriptors instance + */ + SignatureDescriptors.create = function create(properties) { + return new SignatureDescriptors(properties); + }; + + /** + * Encodes the specified SignatureDescriptors message. Does not implicitly {@link cosmos.tx.signing.v1beta1.SignatureDescriptors.verify|verify} messages. + * @function encode + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptors + * @static + * @param {cosmos.tx.signing.v1beta1.ISignatureDescriptors} message SignatureDescriptors message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SignatureDescriptors.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.signatures != null && message.signatures.length) + for (let i = 0; i < message.signatures.length; ++i) + $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.encode(message.signatures[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SignatureDescriptors message, length delimited. Does not implicitly {@link cosmos.tx.signing.v1beta1.SignatureDescriptors.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptors + * @static + * @param {cosmos.tx.signing.v1beta1.ISignatureDescriptors} message SignatureDescriptors message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SignatureDescriptors.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SignatureDescriptors message from the specified reader or buffer. + * @function decode + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptors + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.tx.signing.v1beta1.SignatureDescriptors} SignatureDescriptors + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SignatureDescriptors.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.tx.signing.v1beta1.SignatureDescriptors(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.signatures && message.signatures.length)) + message.signatures = []; + message.signatures.push($root.cosmos.tx.signing.v1beta1.SignatureDescriptor.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SignatureDescriptors message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptors + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.tx.signing.v1beta1.SignatureDescriptors} SignatureDescriptors + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SignatureDescriptors.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SignatureDescriptors message. + * @function verify + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptors + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SignatureDescriptors.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.signatures != null && message.hasOwnProperty("signatures")) { + if (!Array.isArray(message.signatures)) + return "signatures: array expected"; + for (let i = 0; i < message.signatures.length; ++i) { + let error = $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.verify(message.signatures[i]); + if (error) + return "signatures." + error; + } + } + return null; + }; + + /** + * Creates a SignatureDescriptors message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptors + * @static + * @param {Object.} object Plain object + * @returns {cosmos.tx.signing.v1beta1.SignatureDescriptors} SignatureDescriptors + */ + SignatureDescriptors.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.tx.signing.v1beta1.SignatureDescriptors) + return object; + let message = new $root.cosmos.tx.signing.v1beta1.SignatureDescriptors(); + if (object.signatures) { + if (!Array.isArray(object.signatures)) + throw TypeError(".cosmos.tx.signing.v1beta1.SignatureDescriptors.signatures: array expected"); + message.signatures = []; + for (let i = 0; i < object.signatures.length; ++i) { + if (typeof object.signatures[i] !== "object") + throw TypeError(".cosmos.tx.signing.v1beta1.SignatureDescriptors.signatures: object expected"); + message.signatures[i] = $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.fromObject(object.signatures[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SignatureDescriptors message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptors + * @static + * @param {cosmos.tx.signing.v1beta1.SignatureDescriptors} message SignatureDescriptors + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SignatureDescriptors.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.signatures = []; + if (message.signatures && message.signatures.length) { + object.signatures = []; + for (let j = 0; j < message.signatures.length; ++j) + object.signatures[j] = $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.toObject(message.signatures[j], options); + } + return object; + }; + + /** + * Converts this SignatureDescriptors to JSON. + * @function toJSON + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptors + * @instance + * @returns {Object.} JSON object + */ + SignatureDescriptors.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SignatureDescriptors; + })(v1beta1.SignatureDescriptors || {}); + + v1beta1.SignatureDescriptor = (function(SignatureDescriptor) { + + /** + * Properties of a SignatureDescriptor. + * @memberof cosmos.tx.signing.v1beta1 + * @interface ISignatureDescriptor + * @property {google.protobuf.IAny|null} [publicKey] SignatureDescriptor publicKey + * @property {cosmos.tx.signing.v1beta1.SignatureDescriptor.IData|null} [data] SignatureDescriptor data + * @property {number|Long|null} [sequence] SignatureDescriptor sequence + */ + + /** + * Constructs a new SignatureDescriptor. + * @memberof cosmos.tx.signing.v1beta1 + * @classdesc Represents a SignatureDescriptor. + * @implements ISignatureDescriptor + * @constructor + * @param {cosmos.tx.signing.v1beta1.ISignatureDescriptor=} [properties] Properties to set + */ + function SignatureDescriptor(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SignatureDescriptor publicKey. + * @member {google.protobuf.IAny|null|undefined} publicKey + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor + * @instance + */ + SignatureDescriptor.prototype.publicKey = null; + + /** + * SignatureDescriptor data. + * @member {cosmos.tx.signing.v1beta1.SignatureDescriptor.IData|null|undefined} data + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor + * @instance + */ + SignatureDescriptor.prototype.data = null; + + /** + * SignatureDescriptor sequence. + * @member {number|Long} sequence + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor + * @instance + */ + SignatureDescriptor.prototype.sequence = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new SignatureDescriptor instance using the specified properties. + * @function create + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor + * @static + * @param {cosmos.tx.signing.v1beta1.ISignatureDescriptor=} [properties] Properties to set + * @returns {cosmos.tx.signing.v1beta1.SignatureDescriptor} SignatureDescriptor instance + */ + SignatureDescriptor.create = function create(properties) { + return new SignatureDescriptor(properties); + }; + + /** + * Encodes the specified SignatureDescriptor message. Does not implicitly {@link cosmos.tx.signing.v1beta1.SignatureDescriptor.verify|verify} messages. + * @function encode + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor + * @static + * @param {cosmos.tx.signing.v1beta1.ISignatureDescriptor} message SignatureDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SignatureDescriptor.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.publicKey != null && Object.hasOwnProperty.call(message, "publicKey")) + $root.google.protobuf.Any.encode(message.publicKey, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.data != null && Object.hasOwnProperty.call(message, "data")) + $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.encode(message.data, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.sequence != null && Object.hasOwnProperty.call(message, "sequence")) + writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.sequence); + return writer; + }; + + /** + * Encodes the specified SignatureDescriptor message, length delimited. Does not implicitly {@link cosmos.tx.signing.v1beta1.SignatureDescriptor.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor + * @static + * @param {cosmos.tx.signing.v1beta1.ISignatureDescriptor} message SignatureDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SignatureDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SignatureDescriptor message from the specified reader or buffer. + * @function decode + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.tx.signing.v1beta1.SignatureDescriptor} SignatureDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SignatureDescriptor.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.tx.signing.v1beta1.SignatureDescriptor(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.publicKey = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + case 2: + message.data = $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.decode(reader, reader.uint32()); + break; + case 3: + message.sequence = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SignatureDescriptor message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.tx.signing.v1beta1.SignatureDescriptor} SignatureDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SignatureDescriptor.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SignatureDescriptor message. + * @function verify + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SignatureDescriptor.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.publicKey != null && message.hasOwnProperty("publicKey")) { + let error = $root.google.protobuf.Any.verify(message.publicKey); + if (error) + return "publicKey." + error; + } + if (message.data != null && message.hasOwnProperty("data")) { + let error = $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.verify(message.data); + if (error) + return "data." + error; + } + if (message.sequence != null && message.hasOwnProperty("sequence")) + if (!$util.isInteger(message.sequence) && !(message.sequence && $util.isInteger(message.sequence.low) && $util.isInteger(message.sequence.high))) + return "sequence: integer|Long expected"; + return null; + }; + + /** + * Creates a SignatureDescriptor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor + * @static + * @param {Object.} object Plain object + * @returns {cosmos.tx.signing.v1beta1.SignatureDescriptor} SignatureDescriptor + */ + SignatureDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.tx.signing.v1beta1.SignatureDescriptor) + return object; + let message = new $root.cosmos.tx.signing.v1beta1.SignatureDescriptor(); + if (object.publicKey != null) { + if (typeof object.publicKey !== "object") + throw TypeError(".cosmos.tx.signing.v1beta1.SignatureDescriptor.publicKey: object expected"); + message.publicKey = $root.google.protobuf.Any.fromObject(object.publicKey); + } + if (object.data != null) { + if (typeof object.data !== "object") + throw TypeError(".cosmos.tx.signing.v1beta1.SignatureDescriptor.data: object expected"); + message.data = $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.fromObject(object.data); + } + if (object.sequence != null) + if ($util.Long) + (message.sequence = $util.Long.fromValue(object.sequence)).unsigned = true; + else if (typeof object.sequence === "string") + message.sequence = parseInt(object.sequence, 10); + else if (typeof object.sequence === "number") + message.sequence = object.sequence; + else if (typeof object.sequence === "object") + message.sequence = new $util.LongBits(object.sequence.low >>> 0, object.sequence.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a SignatureDescriptor message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor + * @static + * @param {cosmos.tx.signing.v1beta1.SignatureDescriptor} message SignatureDescriptor + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SignatureDescriptor.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.publicKey = null; + object.data = null; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.sequence = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.sequence = options.longs === String ? "0" : 0; + } + if (message.publicKey != null && message.hasOwnProperty("publicKey")) + object.publicKey = $root.google.protobuf.Any.toObject(message.publicKey, options); + if (message.data != null && message.hasOwnProperty("data")) + object.data = $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.toObject(message.data, options); + if (message.sequence != null && message.hasOwnProperty("sequence")) + if (typeof message.sequence === "number") + object.sequence = options.longs === String ? String(message.sequence) : message.sequence; + else + object.sequence = options.longs === String ? $util.Long.prototype.toString.call(message.sequence) : options.longs === Number ? new $util.LongBits(message.sequence.low >>> 0, message.sequence.high >>> 0).toNumber(true) : message.sequence; + return object; + }; + + /** + * Converts this SignatureDescriptor to JSON. + * @function toJSON + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor + * @instance + * @returns {Object.} JSON object + */ + SignatureDescriptor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + SignatureDescriptor.Data = (function(Data) { + + /** + * Properties of a Data. + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor + * @interface IData + * @property {cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.ISingle|null} [single] Data single + * @property {cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.IMulti|null} [multi] Data multi + */ + + /** + * Constructs a new Data. + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor + * @classdesc Represents a Data. + * @implements IData + * @constructor + * @param {cosmos.tx.signing.v1beta1.SignatureDescriptor.IData=} [properties] Properties to set + */ + function Data(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Data single. + * @member {cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.ISingle|null|undefined} single + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data + * @instance + */ + Data.prototype.single = null; + + /** + * Data multi. + * @member {cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.IMulti|null|undefined} multi + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data + * @instance + */ + Data.prototype.multi = null; + + // OneOf field names bound to virtual getters and setters + let $oneOfFields; + + /** + * Data sum. + * @member {"single"|"multi"|undefined} sum + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data + * @instance + */ + Object.defineProperty(Data.prototype, "sum", { + get: $util.oneOfGetter($oneOfFields = ["single", "multi"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Data instance using the specified properties. + * @function create + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data + * @static + * @param {cosmos.tx.signing.v1beta1.SignatureDescriptor.IData=} [properties] Properties to set + * @returns {cosmos.tx.signing.v1beta1.SignatureDescriptor.Data} Data instance + */ + Data.create = function create(properties) { + return new Data(properties); + }; + + /** + * Encodes the specified Data message. Does not implicitly {@link cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.verify|verify} messages. + * @function encode + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data + * @static + * @param {cosmos.tx.signing.v1beta1.SignatureDescriptor.IData} message Data message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Data.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.single != null && Object.hasOwnProperty.call(message, "single")) + $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single.encode(message.single, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.multi != null && Object.hasOwnProperty.call(message, "multi")) + $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.encode(message.multi, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Data message, length delimited. Does not implicitly {@link cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data + * @static + * @param {cosmos.tx.signing.v1beta1.SignatureDescriptor.IData} message Data message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Data.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Data message from the specified reader or buffer. + * @function decode + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.tx.signing.v1beta1.SignatureDescriptor.Data} Data + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Data.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.single = $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single.decode(reader, reader.uint32()); + break; + case 2: + message.multi = $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Data message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.tx.signing.v1beta1.SignatureDescriptor.Data} Data + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Data.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Data message. + * @function verify + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Data.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + let properties = {}; + if (message.single != null && message.hasOwnProperty("single")) { + properties.sum = 1; + { + let error = $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single.verify(message.single); + if (error) + return "single." + error; + } + } + if (message.multi != null && message.hasOwnProperty("multi")) { + if (properties.sum === 1) + return "sum: multiple values"; + properties.sum = 1; + { + let error = $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.verify(message.multi); + if (error) + return "multi." + error; + } + } + return null; + }; + + /** + * Creates a Data message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data + * @static + * @param {Object.} object Plain object + * @returns {cosmos.tx.signing.v1beta1.SignatureDescriptor.Data} Data + */ + Data.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data) + return object; + let message = new $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data(); + if (object.single != null) { + if (typeof object.single !== "object") + throw TypeError(".cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.single: object expected"); + message.single = $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single.fromObject(object.single); + } + if (object.multi != null) { + if (typeof object.multi !== "object") + throw TypeError(".cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.multi: object expected"); + message.multi = $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.fromObject(object.multi); + } + return message; + }; + + /** + * Creates a plain object from a Data message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data + * @static + * @param {cosmos.tx.signing.v1beta1.SignatureDescriptor.Data} message Data + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Data.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (message.single != null && message.hasOwnProperty("single")) { + object.single = $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single.toObject(message.single, options); + if (options.oneofs) + object.sum = "single"; + } + if (message.multi != null && message.hasOwnProperty("multi")) { + object.multi = $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.toObject(message.multi, options); + if (options.oneofs) + object.sum = "multi"; + } + return object; + }; + + /** + * Converts this Data to JSON. + * @function toJSON + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data + * @instance + * @returns {Object.} JSON object + */ + Data.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + Data.Single = (function(Single) { + + /** + * Properties of a Single. + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data + * @interface ISingle + * @property {cosmos.tx.signing.v1beta1.SignMode|null} [mode] Single mode + * @property {Uint8Array|null} [signature] Single signature + */ + + /** + * Constructs a new Single. + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data + * @classdesc Represents a Single. + * @implements ISingle + * @constructor + * @param {cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.ISingle=} [properties] Properties to set + */ + function Single(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Single mode. + * @member {cosmos.tx.signing.v1beta1.SignMode} mode + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single + * @instance + */ + Single.prototype.mode = 0; + + /** + * Single signature. + * @member {Uint8Array} signature + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single + * @instance + */ + Single.prototype.signature = $util.newBuffer([]); + + /** + * Creates a new Single instance using the specified properties. + * @function create + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single + * @static + * @param {cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.ISingle=} [properties] Properties to set + * @returns {cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single} Single instance + */ + Single.create = function create(properties) { + return new Single(properties); + }; + + /** + * Encodes the specified Single message. Does not implicitly {@link cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single.verify|verify} messages. + * @function encode + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single + * @static + * @param {cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.ISingle} message Single message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Single.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.mode != null && Object.hasOwnProperty.call(message, "mode")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.mode); + if (message.signature != null && Object.hasOwnProperty.call(message, "signature")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.signature); + return writer; + }; + + /** + * Encodes the specified Single message, length delimited. Does not implicitly {@link cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single + * @static + * @param {cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.ISingle} message Single message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Single.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Single message from the specified reader or buffer. + * @function decode + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single} Single + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Single.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.mode = reader.int32(); + break; + case 2: + message.signature = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Single message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single} Single + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Single.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Single message. + * @function verify + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Single.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.mode != null && message.hasOwnProperty("mode")) + switch (message.mode) { + default: + return "mode: enum value expected"; + case 0: + case 1: + case 2: + case 127: + break; + } + if (message.signature != null && message.hasOwnProperty("signature")) + if (!(message.signature && typeof message.signature.length === "number" || $util.isString(message.signature))) + return "signature: buffer expected"; + return null; + }; + + /** + * Creates a Single message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single + * @static + * @param {Object.} object Plain object + * @returns {cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single} Single + */ + Single.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single) + return object; + let message = new $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single(); + switch (object.mode) { + case "SIGN_MODE_UNSPECIFIED": + case 0: + message.mode = 0; + break; + case "SIGN_MODE_DIRECT": + case 1: + message.mode = 1; + break; + case "SIGN_MODE_TEXTUAL": + case 2: + message.mode = 2; + break; + case "SIGN_MODE_LEGACY_AMINO_JSON": + case 127: + message.mode = 127; + break; + } + if (object.signature != null) + if (typeof object.signature === "string") + $util.base64.decode(object.signature, message.signature = $util.newBuffer($util.base64.length(object.signature)), 0); + else if (object.signature.length) + message.signature = object.signature; + return message; + }; + + /** + * Creates a plain object from a Single message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single + * @static + * @param {cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single} message Single + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Single.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.mode = options.enums === String ? "SIGN_MODE_UNSPECIFIED" : 0; + if (options.bytes === String) + object.signature = ""; + else { + object.signature = []; + if (options.bytes !== Array) + object.signature = $util.newBuffer(object.signature); + } + } + if (message.mode != null && message.hasOwnProperty("mode")) + object.mode = options.enums === String ? $root.cosmos.tx.signing.v1beta1.SignMode[message.mode] : message.mode; + if (message.signature != null && message.hasOwnProperty("signature")) + object.signature = options.bytes === String ? $util.base64.encode(message.signature, 0, message.signature.length) : options.bytes === Array ? Array.prototype.slice.call(message.signature) : message.signature; + return object; + }; + + /** + * Converts this Single to JSON. + * @function toJSON + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single + * @instance + * @returns {Object.} JSON object + */ + Single.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Single; + })(Data.Single || {}); + + Data.Multi = (function(Multi) { + + /** + * Properties of a Multi. + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data + * @interface IMulti + * @property {cosmos.crypto.multisig.v1beta1.ICompactBitArray|null} [bitarray] Multi bitarray + * @property {Array.|null} [signatures] Multi signatures + */ + + /** + * Constructs a new Multi. + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data + * @classdesc Represents a Multi. + * @implements IMulti + * @constructor + * @param {cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.IMulti=} [properties] Properties to set + */ + function Multi(properties) { + this.signatures = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Multi bitarray. + * @member {cosmos.crypto.multisig.v1beta1.ICompactBitArray|null|undefined} bitarray + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi + * @instance + */ + Multi.prototype.bitarray = null; + + /** + * Multi signatures. + * @member {Array.} signatures + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi + * @instance + */ + Multi.prototype.signatures = $util.emptyArray; + + /** + * Creates a new Multi instance using the specified properties. + * @function create + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi + * @static + * @param {cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.IMulti=} [properties] Properties to set + * @returns {cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi} Multi instance + */ + Multi.create = function create(properties) { + return new Multi(properties); + }; + + /** + * Encodes the specified Multi message. Does not implicitly {@link cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.verify|verify} messages. + * @function encode + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi + * @static + * @param {cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.IMulti} message Multi message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Multi.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.bitarray != null && Object.hasOwnProperty.call(message, "bitarray")) + $root.cosmos.crypto.multisig.v1beta1.CompactBitArray.encode(message.bitarray, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.signatures != null && message.signatures.length) + for (let i = 0; i < message.signatures.length; ++i) + $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.encode(message.signatures[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Multi message, length delimited. Does not implicitly {@link cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi + * @static + * @param {cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.IMulti} message Multi message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Multi.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Multi message from the specified reader or buffer. + * @function decode + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi} Multi + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Multi.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.bitarray = $root.cosmos.crypto.multisig.v1beta1.CompactBitArray.decode(reader, reader.uint32()); + break; + case 2: + if (!(message.signatures && message.signatures.length)) + message.signatures = []; + message.signatures.push($root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Multi message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi} Multi + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Multi.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Multi message. + * @function verify + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Multi.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.bitarray != null && message.hasOwnProperty("bitarray")) { + let error = $root.cosmos.crypto.multisig.v1beta1.CompactBitArray.verify(message.bitarray); + if (error) + return "bitarray." + error; + } + if (message.signatures != null && message.hasOwnProperty("signatures")) { + if (!Array.isArray(message.signatures)) + return "signatures: array expected"; + for (let i = 0; i < message.signatures.length; ++i) { + let error = $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.verify(message.signatures[i]); + if (error) + return "signatures." + error; + } + } + return null; + }; + + /** + * Creates a Multi message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi + * @static + * @param {Object.} object Plain object + * @returns {cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi} Multi + */ + Multi.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi) + return object; + let message = new $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi(); + if (object.bitarray != null) { + if (typeof object.bitarray !== "object") + throw TypeError(".cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.bitarray: object expected"); + message.bitarray = $root.cosmos.crypto.multisig.v1beta1.CompactBitArray.fromObject(object.bitarray); + } + if (object.signatures) { + if (!Array.isArray(object.signatures)) + throw TypeError(".cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.signatures: array expected"); + message.signatures = []; + for (let i = 0; i < object.signatures.length; ++i) { + if (typeof object.signatures[i] !== "object") + throw TypeError(".cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.signatures: object expected"); + message.signatures[i] = $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.fromObject(object.signatures[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Multi message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi + * @static + * @param {cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi} message Multi + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Multi.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.signatures = []; + if (options.defaults) + object.bitarray = null; + if (message.bitarray != null && message.hasOwnProperty("bitarray")) + object.bitarray = $root.cosmos.crypto.multisig.v1beta1.CompactBitArray.toObject(message.bitarray, options); + if (message.signatures && message.signatures.length) { + object.signatures = []; + for (let j = 0; j < message.signatures.length; ++j) + object.signatures[j] = $root.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.toObject(message.signatures[j], options); + } + return object; + }; + + /** + * Converts this Multi to JSON. + * @function toJSON + * @memberof cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi + * @instance + * @returns {Object.} JSON object + */ + Multi.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Multi; + })(Data.Multi || {}); + + return Data; + })(SignatureDescriptor.Data || {}); + + return SignatureDescriptor; + })(v1beta1.SignatureDescriptor || {}); + + return v1beta1; + })(signing.v1beta1 || {}); + + return signing; + })(tx.signing || {}); + + /** + * Namespace v1beta1. + * @memberof cosmos.tx + * @namespace + */ + + tx.v1beta1 = (function(v1beta1) { + + v1beta1.Service = (function(Service) { + + /** + * Constructs a new Service service. + * @memberof cosmos.tx.v1beta1 + * @classdesc Represents a Service + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Service(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Service.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Service; + + /** + * Creates new Service service using the specified rpc implementation. + * @function create + * @memberof cosmos.tx.v1beta1.Service + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Service} RPC service. Useful where requests and/or responses are streamed. + */ + Service.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link cosmos.tx.v1beta1.Service#simulate}. + * @memberof cosmos.tx.v1beta1.Service + * @typedef SimulateCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.tx.v1beta1.ISimulateResponse} [response] SimulateResponse + */ + + /** + * Calls Simulate. + * @function simulate + * @memberof cosmos.tx.v1beta1.Service + * @instance + * @param {cosmos.tx.v1beta1.ISimulateRequest} request SimulateRequest message or plain object + * @param {cosmos.tx.v1beta1.Service.SimulateCallback} callback Node-style callback called with the error, if any, and SimulateResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Service.prototype.simulate = function simulate(request, callback) { + return this.rpcCall(simulate, $root.cosmos.tx.v1beta1.SimulateRequest, $root.cosmos.tx.v1beta1.SimulateResponse, request, callback); + }, "name", { value: "Simulate" }); + + /** + * Calls Simulate. + * @function simulate + * @memberof cosmos.tx.v1beta1.Service + * @instance + * @param {cosmos.tx.v1beta1.ISimulateRequest} request SimulateRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link cosmos.tx.v1beta1.Service#getTx}. + * @memberof cosmos.tx.v1beta1.Service + * @typedef GetTxCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.tx.v1beta1.IGetTxResponse} [response] GetTxResponse + */ + + /** + * Calls GetTx. + * @function getTx + * @memberof cosmos.tx.v1beta1.Service + * @instance + * @param {cosmos.tx.v1beta1.IGetTxRequest} request GetTxRequest message or plain object + * @param {cosmos.tx.v1beta1.Service.GetTxCallback} callback Node-style callback called with the error, if any, and GetTxResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Service.prototype.getTx = function getTx(request, callback) { + return this.rpcCall(getTx, $root.cosmos.tx.v1beta1.GetTxRequest, $root.cosmos.tx.v1beta1.GetTxResponse, request, callback); + }, "name", { value: "GetTx" }); + + /** + * Calls GetTx. + * @function getTx + * @memberof cosmos.tx.v1beta1.Service + * @instance + * @param {cosmos.tx.v1beta1.IGetTxRequest} request GetTxRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link cosmos.tx.v1beta1.Service#broadcastTx}. + * @memberof cosmos.tx.v1beta1.Service + * @typedef BroadcastTxCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.tx.v1beta1.IBroadcastTxResponse} [response] BroadcastTxResponse + */ + + /** + * Calls BroadcastTx. + * @function broadcastTx + * @memberof cosmos.tx.v1beta1.Service + * @instance + * @param {cosmos.tx.v1beta1.IBroadcastTxRequest} request BroadcastTxRequest message or plain object + * @param {cosmos.tx.v1beta1.Service.BroadcastTxCallback} callback Node-style callback called with the error, if any, and BroadcastTxResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Service.prototype.broadcastTx = function broadcastTx(request, callback) { + return this.rpcCall(broadcastTx, $root.cosmos.tx.v1beta1.BroadcastTxRequest, $root.cosmos.tx.v1beta1.BroadcastTxResponse, request, callback); + }, "name", { value: "BroadcastTx" }); + + /** + * Calls BroadcastTx. + * @function broadcastTx + * @memberof cosmos.tx.v1beta1.Service + * @instance + * @param {cosmos.tx.v1beta1.IBroadcastTxRequest} request BroadcastTxRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link cosmos.tx.v1beta1.Service#getTxsEvent}. + * @memberof cosmos.tx.v1beta1.Service + * @typedef GetTxsEventCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.tx.v1beta1.IGetTxsEventResponse} [response] GetTxsEventResponse + */ + + /** + * Calls GetTxsEvent. + * @function getTxsEvent + * @memberof cosmos.tx.v1beta1.Service + * @instance + * @param {cosmos.tx.v1beta1.IGetTxsEventRequest} request GetTxsEventRequest message or plain object + * @param {cosmos.tx.v1beta1.Service.GetTxsEventCallback} callback Node-style callback called with the error, if any, and GetTxsEventResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Service.prototype.getTxsEvent = function getTxsEvent(request, callback) { + return this.rpcCall(getTxsEvent, $root.cosmos.tx.v1beta1.GetTxsEventRequest, $root.cosmos.tx.v1beta1.GetTxsEventResponse, request, callback); + }, "name", { value: "GetTxsEvent" }); + + /** + * Calls GetTxsEvent. + * @function getTxsEvent + * @memberof cosmos.tx.v1beta1.Service + * @instance + * @param {cosmos.tx.v1beta1.IGetTxsEventRequest} request GetTxsEventRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Service; + })(v1beta1.Service || {}); + + v1beta1.GetTxsEventRequest = (function(GetTxsEventRequest) { + + /** + * Properties of a GetTxsEventRequest. + * @memberof cosmos.tx.v1beta1 + * @interface IGetTxsEventRequest + * @property {Array.|null} [events] GetTxsEventRequest events + * @property {cosmos.base.query.v1beta1.IPageRequest|null} [pagination] GetTxsEventRequest pagination + * @property {cosmos.tx.v1beta1.OrderBy|null} [orderBy] GetTxsEventRequest orderBy + */ + + /** + * Constructs a new GetTxsEventRequest. + * @memberof cosmos.tx.v1beta1 + * @classdesc Represents a GetTxsEventRequest. + * @implements IGetTxsEventRequest + * @constructor + * @param {cosmos.tx.v1beta1.IGetTxsEventRequest=} [properties] Properties to set + */ + function GetTxsEventRequest(properties) { + this.events = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetTxsEventRequest events. + * @member {Array.} events + * @memberof cosmos.tx.v1beta1.GetTxsEventRequest + * @instance + */ + GetTxsEventRequest.prototype.events = $util.emptyArray; + + /** + * GetTxsEventRequest pagination. + * @member {cosmos.base.query.v1beta1.IPageRequest|null|undefined} pagination + * @memberof cosmos.tx.v1beta1.GetTxsEventRequest + * @instance + */ + GetTxsEventRequest.prototype.pagination = null; + + /** + * GetTxsEventRequest orderBy. + * @member {cosmos.tx.v1beta1.OrderBy} orderBy + * @memberof cosmos.tx.v1beta1.GetTxsEventRequest + * @instance + */ + GetTxsEventRequest.prototype.orderBy = 0; + + /** + * Creates a new GetTxsEventRequest instance using the specified properties. + * @function create + * @memberof cosmos.tx.v1beta1.GetTxsEventRequest + * @static + * @param {cosmos.tx.v1beta1.IGetTxsEventRequest=} [properties] Properties to set + * @returns {cosmos.tx.v1beta1.GetTxsEventRequest} GetTxsEventRequest instance + */ + GetTxsEventRequest.create = function create(properties) { + return new GetTxsEventRequest(properties); + }; + + /** + * Encodes the specified GetTxsEventRequest message. Does not implicitly {@link cosmos.tx.v1beta1.GetTxsEventRequest.verify|verify} messages. + * @function encode + * @memberof cosmos.tx.v1beta1.GetTxsEventRequest + * @static + * @param {cosmos.tx.v1beta1.IGetTxsEventRequest} message GetTxsEventRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetTxsEventRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.events != null && message.events.length) + for (let i = 0; i < message.events.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.events[i]); + if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) + $root.cosmos.base.query.v1beta1.PageRequest.encode(message.pagination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.orderBy); + return writer; + }; + + /** + * Encodes the specified GetTxsEventRequest message, length delimited. Does not implicitly {@link cosmos.tx.v1beta1.GetTxsEventRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.tx.v1beta1.GetTxsEventRequest + * @static + * @param {cosmos.tx.v1beta1.IGetTxsEventRequest} message GetTxsEventRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetTxsEventRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetTxsEventRequest message from the specified reader or buffer. + * @function decode + * @memberof cosmos.tx.v1beta1.GetTxsEventRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.tx.v1beta1.GetTxsEventRequest} GetTxsEventRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetTxsEventRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.tx.v1beta1.GetTxsEventRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.events && message.events.length)) + message.events = []; + message.events.push(reader.string()); + break; + case 2: + message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.decode(reader, reader.uint32()); + break; + case 3: + message.orderBy = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetTxsEventRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.tx.v1beta1.GetTxsEventRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.tx.v1beta1.GetTxsEventRequest} GetTxsEventRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetTxsEventRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetTxsEventRequest message. + * @function verify + * @memberof cosmos.tx.v1beta1.GetTxsEventRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetTxsEventRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.events != null && message.hasOwnProperty("events")) { + if (!Array.isArray(message.events)) + return "events: array expected"; + for (let i = 0; i < message.events.length; ++i) + if (!$util.isString(message.events[i])) + return "events: string[] expected"; + } + if (message.pagination != null && message.hasOwnProperty("pagination")) { + let error = $root.cosmos.base.query.v1beta1.PageRequest.verify(message.pagination); + if (error) + return "pagination." + error; + } + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + switch (message.orderBy) { + default: + return "orderBy: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a GetTxsEventRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.tx.v1beta1.GetTxsEventRequest + * @static + * @param {Object.} object Plain object + * @returns {cosmos.tx.v1beta1.GetTxsEventRequest} GetTxsEventRequest + */ + GetTxsEventRequest.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.tx.v1beta1.GetTxsEventRequest) + return object; + let message = new $root.cosmos.tx.v1beta1.GetTxsEventRequest(); + if (object.events) { + if (!Array.isArray(object.events)) + throw TypeError(".cosmos.tx.v1beta1.GetTxsEventRequest.events: array expected"); + message.events = []; + for (let i = 0; i < object.events.length; ++i) + message.events[i] = String(object.events[i]); + } + if (object.pagination != null) { + if (typeof object.pagination !== "object") + throw TypeError(".cosmos.tx.v1beta1.GetTxsEventRequest.pagination: object expected"); + message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.fromObject(object.pagination); + } + switch (object.orderBy) { + case "ORDER_BY_UNSPECIFIED": + case 0: + message.orderBy = 0; + break; + case "ORDER_BY_ASC": + case 1: + message.orderBy = 1; + break; + case "ORDER_BY_DESC": + case 2: + message.orderBy = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a GetTxsEventRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.tx.v1beta1.GetTxsEventRequest + * @static + * @param {cosmos.tx.v1beta1.GetTxsEventRequest} message GetTxsEventRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetTxsEventRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.events = []; + if (options.defaults) { + object.pagination = null; + object.orderBy = options.enums === String ? "ORDER_BY_UNSPECIFIED" : 0; + } + if (message.events && message.events.length) { + object.events = []; + for (let j = 0; j < message.events.length; ++j) + object.events[j] = message.events[j]; + } + if (message.pagination != null && message.hasOwnProperty("pagination")) + object.pagination = $root.cosmos.base.query.v1beta1.PageRequest.toObject(message.pagination, options); + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = options.enums === String ? $root.cosmos.tx.v1beta1.OrderBy[message.orderBy] : message.orderBy; + return object; + }; + + /** + * Converts this GetTxsEventRequest to JSON. + * @function toJSON + * @memberof cosmos.tx.v1beta1.GetTxsEventRequest + * @instance + * @returns {Object.} JSON object + */ + GetTxsEventRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetTxsEventRequest; + })(v1beta1.GetTxsEventRequest || {}); + + /** + * OrderBy enum. + * @name cosmos.tx.v1beta1.OrderBy + * @enum {string} + * @property {number} ORDER_BY_UNSPECIFIED=0 ORDER_BY_UNSPECIFIED value + * @property {number} ORDER_BY_ASC=1 ORDER_BY_ASC value + * @property {number} ORDER_BY_DESC=2 ORDER_BY_DESC value + */ + v1beta1.OrderBy = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ORDER_BY_UNSPECIFIED"] = 0; + values[valuesById[1] = "ORDER_BY_ASC"] = 1; + values[valuesById[2] = "ORDER_BY_DESC"] = 2; + return values; + })(); + + v1beta1.GetTxsEventResponse = (function(GetTxsEventResponse) { + + /** + * Properties of a GetTxsEventResponse. + * @memberof cosmos.tx.v1beta1 + * @interface IGetTxsEventResponse + * @property {Array.|null} [txs] GetTxsEventResponse txs + * @property {Array.|null} [txResponses] GetTxsEventResponse txResponses + * @property {cosmos.base.query.v1beta1.IPageResponse|null} [pagination] GetTxsEventResponse pagination + */ + + /** + * Constructs a new GetTxsEventResponse. + * @memberof cosmos.tx.v1beta1 + * @classdesc Represents a GetTxsEventResponse. + * @implements IGetTxsEventResponse + * @constructor + * @param {cosmos.tx.v1beta1.IGetTxsEventResponse=} [properties] Properties to set + */ + function GetTxsEventResponse(properties) { + this.txs = []; + this.txResponses = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetTxsEventResponse txs. + * @member {Array.} txs + * @memberof cosmos.tx.v1beta1.GetTxsEventResponse + * @instance + */ + GetTxsEventResponse.prototype.txs = $util.emptyArray; + + /** + * GetTxsEventResponse txResponses. + * @member {Array.} txResponses + * @memberof cosmos.tx.v1beta1.GetTxsEventResponse + * @instance + */ + GetTxsEventResponse.prototype.txResponses = $util.emptyArray; + + /** + * GetTxsEventResponse pagination. + * @member {cosmos.base.query.v1beta1.IPageResponse|null|undefined} pagination + * @memberof cosmos.tx.v1beta1.GetTxsEventResponse + * @instance + */ + GetTxsEventResponse.prototype.pagination = null; + + /** + * Creates a new GetTxsEventResponse instance using the specified properties. + * @function create + * @memberof cosmos.tx.v1beta1.GetTxsEventResponse + * @static + * @param {cosmos.tx.v1beta1.IGetTxsEventResponse=} [properties] Properties to set + * @returns {cosmos.tx.v1beta1.GetTxsEventResponse} GetTxsEventResponse instance + */ + GetTxsEventResponse.create = function create(properties) { + return new GetTxsEventResponse(properties); + }; + + /** + * Encodes the specified GetTxsEventResponse message. Does not implicitly {@link cosmos.tx.v1beta1.GetTxsEventResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.tx.v1beta1.GetTxsEventResponse + * @static + * @param {cosmos.tx.v1beta1.IGetTxsEventResponse} message GetTxsEventResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetTxsEventResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.txs != null && message.txs.length) + for (let i = 0; i < message.txs.length; ++i) + $root.cosmos.tx.v1beta1.Tx.encode(message.txs[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.txResponses != null && message.txResponses.length) + for (let i = 0; i < message.txResponses.length; ++i) + $root.cosmos.base.abci.v1beta1.TxResponse.encode(message.txResponses[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) + $root.cosmos.base.query.v1beta1.PageResponse.encode(message.pagination, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GetTxsEventResponse message, length delimited. Does not implicitly {@link cosmos.tx.v1beta1.GetTxsEventResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.tx.v1beta1.GetTxsEventResponse + * @static + * @param {cosmos.tx.v1beta1.IGetTxsEventResponse} message GetTxsEventResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetTxsEventResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetTxsEventResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.tx.v1beta1.GetTxsEventResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.tx.v1beta1.GetTxsEventResponse} GetTxsEventResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetTxsEventResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.tx.v1beta1.GetTxsEventResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.txs && message.txs.length)) + message.txs = []; + message.txs.push($root.cosmos.tx.v1beta1.Tx.decode(reader, reader.uint32())); + break; + case 2: + if (!(message.txResponses && message.txResponses.length)) + message.txResponses = []; + message.txResponses.push($root.cosmos.base.abci.v1beta1.TxResponse.decode(reader, reader.uint32())); + break; + case 3: + message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetTxsEventResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.tx.v1beta1.GetTxsEventResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.tx.v1beta1.GetTxsEventResponse} GetTxsEventResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetTxsEventResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetTxsEventResponse message. + * @function verify + * @memberof cosmos.tx.v1beta1.GetTxsEventResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetTxsEventResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.txs != null && message.hasOwnProperty("txs")) { + if (!Array.isArray(message.txs)) + return "txs: array expected"; + for (let i = 0; i < message.txs.length; ++i) { + let error = $root.cosmos.tx.v1beta1.Tx.verify(message.txs[i]); + if (error) + return "txs." + error; + } + } + if (message.txResponses != null && message.hasOwnProperty("txResponses")) { + if (!Array.isArray(message.txResponses)) + return "txResponses: array expected"; + for (let i = 0; i < message.txResponses.length; ++i) { + let error = $root.cosmos.base.abci.v1beta1.TxResponse.verify(message.txResponses[i]); + if (error) + return "txResponses." + error; + } + } + if (message.pagination != null && message.hasOwnProperty("pagination")) { + let error = $root.cosmos.base.query.v1beta1.PageResponse.verify(message.pagination); + if (error) + return "pagination." + error; + } + return null; + }; + + /** + * Creates a GetTxsEventResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.tx.v1beta1.GetTxsEventResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.tx.v1beta1.GetTxsEventResponse} GetTxsEventResponse + */ + GetTxsEventResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.tx.v1beta1.GetTxsEventResponse) + return object; + let message = new $root.cosmos.tx.v1beta1.GetTxsEventResponse(); + if (object.txs) { + if (!Array.isArray(object.txs)) + throw TypeError(".cosmos.tx.v1beta1.GetTxsEventResponse.txs: array expected"); + message.txs = []; + for (let i = 0; i < object.txs.length; ++i) { + if (typeof object.txs[i] !== "object") + throw TypeError(".cosmos.tx.v1beta1.GetTxsEventResponse.txs: object expected"); + message.txs[i] = $root.cosmos.tx.v1beta1.Tx.fromObject(object.txs[i]); + } + } + if (object.txResponses) { + if (!Array.isArray(object.txResponses)) + throw TypeError(".cosmos.tx.v1beta1.GetTxsEventResponse.txResponses: array expected"); + message.txResponses = []; + for (let i = 0; i < object.txResponses.length; ++i) { + if (typeof object.txResponses[i] !== "object") + throw TypeError(".cosmos.tx.v1beta1.GetTxsEventResponse.txResponses: object expected"); + message.txResponses[i] = $root.cosmos.base.abci.v1beta1.TxResponse.fromObject(object.txResponses[i]); + } + } + if (object.pagination != null) { + if (typeof object.pagination !== "object") + throw TypeError(".cosmos.tx.v1beta1.GetTxsEventResponse.pagination: object expected"); + message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.fromObject(object.pagination); + } + return message; + }; + + /** + * Creates a plain object from a GetTxsEventResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.tx.v1beta1.GetTxsEventResponse + * @static + * @param {cosmos.tx.v1beta1.GetTxsEventResponse} message GetTxsEventResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetTxsEventResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) { + object.txs = []; + object.txResponses = []; + } + if (options.defaults) + object.pagination = null; + if (message.txs && message.txs.length) { + object.txs = []; + for (let j = 0; j < message.txs.length; ++j) + object.txs[j] = $root.cosmos.tx.v1beta1.Tx.toObject(message.txs[j], options); + } + if (message.txResponses && message.txResponses.length) { + object.txResponses = []; + for (let j = 0; j < message.txResponses.length; ++j) + object.txResponses[j] = $root.cosmos.base.abci.v1beta1.TxResponse.toObject(message.txResponses[j], options); + } + if (message.pagination != null && message.hasOwnProperty("pagination")) + object.pagination = $root.cosmos.base.query.v1beta1.PageResponse.toObject(message.pagination, options); + return object; + }; + + /** + * Converts this GetTxsEventResponse to JSON. + * @function toJSON + * @memberof cosmos.tx.v1beta1.GetTxsEventResponse + * @instance + * @returns {Object.} JSON object + */ + GetTxsEventResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetTxsEventResponse; + })(v1beta1.GetTxsEventResponse || {}); + + v1beta1.BroadcastTxRequest = (function(BroadcastTxRequest) { + + /** + * Properties of a BroadcastTxRequest. + * @memberof cosmos.tx.v1beta1 + * @interface IBroadcastTxRequest + * @property {Uint8Array|null} [txBytes] BroadcastTxRequest txBytes + * @property {cosmos.tx.v1beta1.BroadcastMode|null} [mode] BroadcastTxRequest mode + */ + + /** + * Constructs a new BroadcastTxRequest. + * @memberof cosmos.tx.v1beta1 + * @classdesc Represents a BroadcastTxRequest. + * @implements IBroadcastTxRequest + * @constructor + * @param {cosmos.tx.v1beta1.IBroadcastTxRequest=} [properties] Properties to set + */ + function BroadcastTxRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BroadcastTxRequest txBytes. + * @member {Uint8Array} txBytes + * @memberof cosmos.tx.v1beta1.BroadcastTxRequest + * @instance + */ + BroadcastTxRequest.prototype.txBytes = $util.newBuffer([]); + + /** + * BroadcastTxRequest mode. + * @member {cosmos.tx.v1beta1.BroadcastMode} mode + * @memberof cosmos.tx.v1beta1.BroadcastTxRequest + * @instance + */ + BroadcastTxRequest.prototype.mode = 0; + + /** + * Creates a new BroadcastTxRequest instance using the specified properties. + * @function create + * @memberof cosmos.tx.v1beta1.BroadcastTxRequest + * @static + * @param {cosmos.tx.v1beta1.IBroadcastTxRequest=} [properties] Properties to set + * @returns {cosmos.tx.v1beta1.BroadcastTxRequest} BroadcastTxRequest instance + */ + BroadcastTxRequest.create = function create(properties) { + return new BroadcastTxRequest(properties); + }; + + /** + * Encodes the specified BroadcastTxRequest message. Does not implicitly {@link cosmos.tx.v1beta1.BroadcastTxRequest.verify|verify} messages. + * @function encode + * @memberof cosmos.tx.v1beta1.BroadcastTxRequest + * @static + * @param {cosmos.tx.v1beta1.IBroadcastTxRequest} message BroadcastTxRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BroadcastTxRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.txBytes != null && Object.hasOwnProperty.call(message, "txBytes")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.txBytes); + if (message.mode != null && Object.hasOwnProperty.call(message, "mode")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.mode); + return writer; + }; + + /** + * Encodes the specified BroadcastTxRequest message, length delimited. Does not implicitly {@link cosmos.tx.v1beta1.BroadcastTxRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.tx.v1beta1.BroadcastTxRequest + * @static + * @param {cosmos.tx.v1beta1.IBroadcastTxRequest} message BroadcastTxRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BroadcastTxRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BroadcastTxRequest message from the specified reader or buffer. + * @function decode + * @memberof cosmos.tx.v1beta1.BroadcastTxRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.tx.v1beta1.BroadcastTxRequest} BroadcastTxRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BroadcastTxRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.tx.v1beta1.BroadcastTxRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.txBytes = reader.bytes(); + break; + case 2: + message.mode = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BroadcastTxRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.tx.v1beta1.BroadcastTxRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.tx.v1beta1.BroadcastTxRequest} BroadcastTxRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BroadcastTxRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BroadcastTxRequest message. + * @function verify + * @memberof cosmos.tx.v1beta1.BroadcastTxRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BroadcastTxRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.txBytes != null && message.hasOwnProperty("txBytes")) + if (!(message.txBytes && typeof message.txBytes.length === "number" || $util.isString(message.txBytes))) + return "txBytes: buffer expected"; + if (message.mode != null && message.hasOwnProperty("mode")) + switch (message.mode) { + default: + return "mode: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + return null; + }; + + /** + * Creates a BroadcastTxRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.tx.v1beta1.BroadcastTxRequest + * @static + * @param {Object.} object Plain object + * @returns {cosmos.tx.v1beta1.BroadcastTxRequest} BroadcastTxRequest + */ + BroadcastTxRequest.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.tx.v1beta1.BroadcastTxRequest) + return object; + let message = new $root.cosmos.tx.v1beta1.BroadcastTxRequest(); + if (object.txBytes != null) + if (typeof object.txBytes === "string") + $util.base64.decode(object.txBytes, message.txBytes = $util.newBuffer($util.base64.length(object.txBytes)), 0); + else if (object.txBytes.length) + message.txBytes = object.txBytes; + switch (object.mode) { + case "BROADCAST_MODE_UNSPECIFIED": + case 0: + message.mode = 0; + break; + case "BROADCAST_MODE_BLOCK": + case 1: + message.mode = 1; + break; + case "BROADCAST_MODE_SYNC": + case 2: + message.mode = 2; + break; + case "BROADCAST_MODE_ASYNC": + case 3: + message.mode = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from a BroadcastTxRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.tx.v1beta1.BroadcastTxRequest + * @static + * @param {cosmos.tx.v1beta1.BroadcastTxRequest} message BroadcastTxRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BroadcastTxRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + if (options.bytes === String) + object.txBytes = ""; + else { + object.txBytes = []; + if (options.bytes !== Array) + object.txBytes = $util.newBuffer(object.txBytes); + } + object.mode = options.enums === String ? "BROADCAST_MODE_UNSPECIFIED" : 0; + } + if (message.txBytes != null && message.hasOwnProperty("txBytes")) + object.txBytes = options.bytes === String ? $util.base64.encode(message.txBytes, 0, message.txBytes.length) : options.bytes === Array ? Array.prototype.slice.call(message.txBytes) : message.txBytes; + if (message.mode != null && message.hasOwnProperty("mode")) + object.mode = options.enums === String ? $root.cosmos.tx.v1beta1.BroadcastMode[message.mode] : message.mode; + return object; + }; + + /** + * Converts this BroadcastTxRequest to JSON. + * @function toJSON + * @memberof cosmos.tx.v1beta1.BroadcastTxRequest + * @instance + * @returns {Object.} JSON object + */ + BroadcastTxRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return BroadcastTxRequest; + })(v1beta1.BroadcastTxRequest || {}); + + /** + * BroadcastMode enum. + * @name cosmos.tx.v1beta1.BroadcastMode + * @enum {string} + * @property {number} BROADCAST_MODE_UNSPECIFIED=0 BROADCAST_MODE_UNSPECIFIED value + * @property {number} BROADCAST_MODE_BLOCK=1 BROADCAST_MODE_BLOCK value + * @property {number} BROADCAST_MODE_SYNC=2 BROADCAST_MODE_SYNC value + * @property {number} BROADCAST_MODE_ASYNC=3 BROADCAST_MODE_ASYNC value + */ + v1beta1.BroadcastMode = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "BROADCAST_MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "BROADCAST_MODE_BLOCK"] = 1; + values[valuesById[2] = "BROADCAST_MODE_SYNC"] = 2; + values[valuesById[3] = "BROADCAST_MODE_ASYNC"] = 3; + return values; + })(); + + v1beta1.BroadcastTxResponse = (function(BroadcastTxResponse) { + + /** + * Properties of a BroadcastTxResponse. + * @memberof cosmos.tx.v1beta1 + * @interface IBroadcastTxResponse + * @property {cosmos.base.abci.v1beta1.ITxResponse|null} [txResponse] BroadcastTxResponse txResponse + */ + + /** + * Constructs a new BroadcastTxResponse. + * @memberof cosmos.tx.v1beta1 + * @classdesc Represents a BroadcastTxResponse. + * @implements IBroadcastTxResponse + * @constructor + * @param {cosmos.tx.v1beta1.IBroadcastTxResponse=} [properties] Properties to set + */ + function BroadcastTxResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BroadcastTxResponse txResponse. + * @member {cosmos.base.abci.v1beta1.ITxResponse|null|undefined} txResponse + * @memberof cosmos.tx.v1beta1.BroadcastTxResponse + * @instance + */ + BroadcastTxResponse.prototype.txResponse = null; + + /** + * Creates a new BroadcastTxResponse instance using the specified properties. + * @function create + * @memberof cosmos.tx.v1beta1.BroadcastTxResponse + * @static + * @param {cosmos.tx.v1beta1.IBroadcastTxResponse=} [properties] Properties to set + * @returns {cosmos.tx.v1beta1.BroadcastTxResponse} BroadcastTxResponse instance + */ + BroadcastTxResponse.create = function create(properties) { + return new BroadcastTxResponse(properties); + }; + + /** + * Encodes the specified BroadcastTxResponse message. Does not implicitly {@link cosmos.tx.v1beta1.BroadcastTxResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.tx.v1beta1.BroadcastTxResponse + * @static + * @param {cosmos.tx.v1beta1.IBroadcastTxResponse} message BroadcastTxResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BroadcastTxResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.txResponse != null && Object.hasOwnProperty.call(message, "txResponse")) + $root.cosmos.base.abci.v1beta1.TxResponse.encode(message.txResponse, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BroadcastTxResponse message, length delimited. Does not implicitly {@link cosmos.tx.v1beta1.BroadcastTxResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.tx.v1beta1.BroadcastTxResponse + * @static + * @param {cosmos.tx.v1beta1.IBroadcastTxResponse} message BroadcastTxResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BroadcastTxResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BroadcastTxResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.tx.v1beta1.BroadcastTxResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.tx.v1beta1.BroadcastTxResponse} BroadcastTxResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BroadcastTxResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.tx.v1beta1.BroadcastTxResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.txResponse = $root.cosmos.base.abci.v1beta1.TxResponse.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BroadcastTxResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.tx.v1beta1.BroadcastTxResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.tx.v1beta1.BroadcastTxResponse} BroadcastTxResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BroadcastTxResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BroadcastTxResponse message. + * @function verify + * @memberof cosmos.tx.v1beta1.BroadcastTxResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BroadcastTxResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.txResponse != null && message.hasOwnProperty("txResponse")) { + let error = $root.cosmos.base.abci.v1beta1.TxResponse.verify(message.txResponse); + if (error) + return "txResponse." + error; + } + return null; + }; + + /** + * Creates a BroadcastTxResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.tx.v1beta1.BroadcastTxResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.tx.v1beta1.BroadcastTxResponse} BroadcastTxResponse + */ + BroadcastTxResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.tx.v1beta1.BroadcastTxResponse) + return object; + let message = new $root.cosmos.tx.v1beta1.BroadcastTxResponse(); + if (object.txResponse != null) { + if (typeof object.txResponse !== "object") + throw TypeError(".cosmos.tx.v1beta1.BroadcastTxResponse.txResponse: object expected"); + message.txResponse = $root.cosmos.base.abci.v1beta1.TxResponse.fromObject(object.txResponse); + } + return message; + }; + + /** + * Creates a plain object from a BroadcastTxResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.tx.v1beta1.BroadcastTxResponse + * @static + * @param {cosmos.tx.v1beta1.BroadcastTxResponse} message BroadcastTxResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BroadcastTxResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.txResponse = null; + if (message.txResponse != null && message.hasOwnProperty("txResponse")) + object.txResponse = $root.cosmos.base.abci.v1beta1.TxResponse.toObject(message.txResponse, options); + return object; + }; + + /** + * Converts this BroadcastTxResponse to JSON. + * @function toJSON + * @memberof cosmos.tx.v1beta1.BroadcastTxResponse + * @instance + * @returns {Object.} JSON object + */ + BroadcastTxResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return BroadcastTxResponse; + })(v1beta1.BroadcastTxResponse || {}); + + v1beta1.SimulateRequest = (function(SimulateRequest) { + + /** + * Properties of a SimulateRequest. + * @memberof cosmos.tx.v1beta1 + * @interface ISimulateRequest + * @property {cosmos.tx.v1beta1.ITx|null} [tx] SimulateRequest tx + */ + + /** + * Constructs a new SimulateRequest. + * @memberof cosmos.tx.v1beta1 + * @classdesc Represents a SimulateRequest. + * @implements ISimulateRequest + * @constructor + * @param {cosmos.tx.v1beta1.ISimulateRequest=} [properties] Properties to set + */ + function SimulateRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SimulateRequest tx. + * @member {cosmos.tx.v1beta1.ITx|null|undefined} tx + * @memberof cosmos.tx.v1beta1.SimulateRequest + * @instance + */ + SimulateRequest.prototype.tx = null; + + /** + * Creates a new SimulateRequest instance using the specified properties. + * @function create + * @memberof cosmos.tx.v1beta1.SimulateRequest + * @static + * @param {cosmos.tx.v1beta1.ISimulateRequest=} [properties] Properties to set + * @returns {cosmos.tx.v1beta1.SimulateRequest} SimulateRequest instance + */ + SimulateRequest.create = function create(properties) { + return new SimulateRequest(properties); + }; + + /** + * Encodes the specified SimulateRequest message. Does not implicitly {@link cosmos.tx.v1beta1.SimulateRequest.verify|verify} messages. + * @function encode + * @memberof cosmos.tx.v1beta1.SimulateRequest + * @static + * @param {cosmos.tx.v1beta1.ISimulateRequest} message SimulateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SimulateRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tx != null && Object.hasOwnProperty.call(message, "tx")) + $root.cosmos.tx.v1beta1.Tx.encode(message.tx, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SimulateRequest message, length delimited. Does not implicitly {@link cosmos.tx.v1beta1.SimulateRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.tx.v1beta1.SimulateRequest + * @static + * @param {cosmos.tx.v1beta1.ISimulateRequest} message SimulateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SimulateRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SimulateRequest message from the specified reader or buffer. + * @function decode + * @memberof cosmos.tx.v1beta1.SimulateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.tx.v1beta1.SimulateRequest} SimulateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SimulateRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.tx.v1beta1.SimulateRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.tx = $root.cosmos.tx.v1beta1.Tx.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SimulateRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.tx.v1beta1.SimulateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.tx.v1beta1.SimulateRequest} SimulateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SimulateRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SimulateRequest message. + * @function verify + * @memberof cosmos.tx.v1beta1.SimulateRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SimulateRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tx != null && message.hasOwnProperty("tx")) { + let error = $root.cosmos.tx.v1beta1.Tx.verify(message.tx); + if (error) + return "tx." + error; + } + return null; + }; + + /** + * Creates a SimulateRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.tx.v1beta1.SimulateRequest + * @static + * @param {Object.} object Plain object + * @returns {cosmos.tx.v1beta1.SimulateRequest} SimulateRequest + */ + SimulateRequest.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.tx.v1beta1.SimulateRequest) + return object; + let message = new $root.cosmos.tx.v1beta1.SimulateRequest(); + if (object.tx != null) { + if (typeof object.tx !== "object") + throw TypeError(".cosmos.tx.v1beta1.SimulateRequest.tx: object expected"); + message.tx = $root.cosmos.tx.v1beta1.Tx.fromObject(object.tx); + } + return message; + }; + + /** + * Creates a plain object from a SimulateRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.tx.v1beta1.SimulateRequest + * @static + * @param {cosmos.tx.v1beta1.SimulateRequest} message SimulateRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SimulateRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.tx = null; + if (message.tx != null && message.hasOwnProperty("tx")) + object.tx = $root.cosmos.tx.v1beta1.Tx.toObject(message.tx, options); + return object; + }; + + /** + * Converts this SimulateRequest to JSON. + * @function toJSON + * @memberof cosmos.tx.v1beta1.SimulateRequest + * @instance + * @returns {Object.} JSON object + */ + SimulateRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SimulateRequest; + })(v1beta1.SimulateRequest || {}); + + v1beta1.SimulateResponse = (function(SimulateResponse) { + + /** + * Properties of a SimulateResponse. + * @memberof cosmos.tx.v1beta1 + * @interface ISimulateResponse + * @property {cosmos.base.abci.v1beta1.IGasInfo|null} [gasInfo] SimulateResponse gasInfo + * @property {cosmos.base.abci.v1beta1.IResult|null} [result] SimulateResponse result + */ + + /** + * Constructs a new SimulateResponse. + * @memberof cosmos.tx.v1beta1 + * @classdesc Represents a SimulateResponse. + * @implements ISimulateResponse + * @constructor + * @param {cosmos.tx.v1beta1.ISimulateResponse=} [properties] Properties to set + */ + function SimulateResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SimulateResponse gasInfo. + * @member {cosmos.base.abci.v1beta1.IGasInfo|null|undefined} gasInfo + * @memberof cosmos.tx.v1beta1.SimulateResponse + * @instance + */ + SimulateResponse.prototype.gasInfo = null; + + /** + * SimulateResponse result. + * @member {cosmos.base.abci.v1beta1.IResult|null|undefined} result + * @memberof cosmos.tx.v1beta1.SimulateResponse + * @instance + */ + SimulateResponse.prototype.result = null; + + /** + * Creates a new SimulateResponse instance using the specified properties. + * @function create + * @memberof cosmos.tx.v1beta1.SimulateResponse + * @static + * @param {cosmos.tx.v1beta1.ISimulateResponse=} [properties] Properties to set + * @returns {cosmos.tx.v1beta1.SimulateResponse} SimulateResponse instance + */ + SimulateResponse.create = function create(properties) { + return new SimulateResponse(properties); + }; + + /** + * Encodes the specified SimulateResponse message. Does not implicitly {@link cosmos.tx.v1beta1.SimulateResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.tx.v1beta1.SimulateResponse + * @static + * @param {cosmos.tx.v1beta1.ISimulateResponse} message SimulateResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SimulateResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.gasInfo != null && Object.hasOwnProperty.call(message, "gasInfo")) + $root.cosmos.base.abci.v1beta1.GasInfo.encode(message.gasInfo, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.result != null && Object.hasOwnProperty.call(message, "result")) + $root.cosmos.base.abci.v1beta1.Result.encode(message.result, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SimulateResponse message, length delimited. Does not implicitly {@link cosmos.tx.v1beta1.SimulateResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.tx.v1beta1.SimulateResponse + * @static + * @param {cosmos.tx.v1beta1.ISimulateResponse} message SimulateResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SimulateResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SimulateResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.tx.v1beta1.SimulateResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.tx.v1beta1.SimulateResponse} SimulateResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SimulateResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.tx.v1beta1.SimulateResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.gasInfo = $root.cosmos.base.abci.v1beta1.GasInfo.decode(reader, reader.uint32()); + break; + case 2: + message.result = $root.cosmos.base.abci.v1beta1.Result.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SimulateResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.tx.v1beta1.SimulateResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.tx.v1beta1.SimulateResponse} SimulateResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SimulateResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SimulateResponse message. + * @function verify + * @memberof cosmos.tx.v1beta1.SimulateResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SimulateResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.gasInfo != null && message.hasOwnProperty("gasInfo")) { + let error = $root.cosmos.base.abci.v1beta1.GasInfo.verify(message.gasInfo); + if (error) + return "gasInfo." + error; + } + if (message.result != null && message.hasOwnProperty("result")) { + let error = $root.cosmos.base.abci.v1beta1.Result.verify(message.result); + if (error) + return "result." + error; + } + return null; + }; + + /** + * Creates a SimulateResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.tx.v1beta1.SimulateResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.tx.v1beta1.SimulateResponse} SimulateResponse + */ + SimulateResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.tx.v1beta1.SimulateResponse) + return object; + let message = new $root.cosmos.tx.v1beta1.SimulateResponse(); + if (object.gasInfo != null) { + if (typeof object.gasInfo !== "object") + throw TypeError(".cosmos.tx.v1beta1.SimulateResponse.gasInfo: object expected"); + message.gasInfo = $root.cosmos.base.abci.v1beta1.GasInfo.fromObject(object.gasInfo); + } + if (object.result != null) { + if (typeof object.result !== "object") + throw TypeError(".cosmos.tx.v1beta1.SimulateResponse.result: object expected"); + message.result = $root.cosmos.base.abci.v1beta1.Result.fromObject(object.result); + } + return message; + }; + + /** + * Creates a plain object from a SimulateResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.tx.v1beta1.SimulateResponse + * @static + * @param {cosmos.tx.v1beta1.SimulateResponse} message SimulateResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SimulateResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.gasInfo = null; + object.result = null; + } + if (message.gasInfo != null && message.hasOwnProperty("gasInfo")) + object.gasInfo = $root.cosmos.base.abci.v1beta1.GasInfo.toObject(message.gasInfo, options); + if (message.result != null && message.hasOwnProperty("result")) + object.result = $root.cosmos.base.abci.v1beta1.Result.toObject(message.result, options); + return object; + }; + + /** + * Converts this SimulateResponse to JSON. + * @function toJSON + * @memberof cosmos.tx.v1beta1.SimulateResponse + * @instance + * @returns {Object.} JSON object + */ + SimulateResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SimulateResponse; + })(v1beta1.SimulateResponse || {}); + + v1beta1.GetTxRequest = (function(GetTxRequest) { + + /** + * Properties of a GetTxRequest. + * @memberof cosmos.tx.v1beta1 + * @interface IGetTxRequest + * @property {string|null} [hash] GetTxRequest hash + */ + + /** + * Constructs a new GetTxRequest. + * @memberof cosmos.tx.v1beta1 + * @classdesc Represents a GetTxRequest. + * @implements IGetTxRequest + * @constructor + * @param {cosmos.tx.v1beta1.IGetTxRequest=} [properties] Properties to set + */ + function GetTxRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetTxRequest hash. + * @member {string} hash + * @memberof cosmos.tx.v1beta1.GetTxRequest + * @instance + */ + GetTxRequest.prototype.hash = ""; + + /** + * Creates a new GetTxRequest instance using the specified properties. + * @function create + * @memberof cosmos.tx.v1beta1.GetTxRequest + * @static + * @param {cosmos.tx.v1beta1.IGetTxRequest=} [properties] Properties to set + * @returns {cosmos.tx.v1beta1.GetTxRequest} GetTxRequest instance + */ + GetTxRequest.create = function create(properties) { + return new GetTxRequest(properties); + }; + + /** + * Encodes the specified GetTxRequest message. Does not implicitly {@link cosmos.tx.v1beta1.GetTxRequest.verify|verify} messages. + * @function encode + * @memberof cosmos.tx.v1beta1.GetTxRequest + * @static + * @param {cosmos.tx.v1beta1.IGetTxRequest} message GetTxRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetTxRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.hash != null && Object.hasOwnProperty.call(message, "hash")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.hash); + return writer; + }; + + /** + * Encodes the specified GetTxRequest message, length delimited. Does not implicitly {@link cosmos.tx.v1beta1.GetTxRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.tx.v1beta1.GetTxRequest + * @static + * @param {cosmos.tx.v1beta1.IGetTxRequest} message GetTxRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetTxRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetTxRequest message from the specified reader or buffer. + * @function decode + * @memberof cosmos.tx.v1beta1.GetTxRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.tx.v1beta1.GetTxRequest} GetTxRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetTxRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.tx.v1beta1.GetTxRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.hash = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetTxRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.tx.v1beta1.GetTxRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.tx.v1beta1.GetTxRequest} GetTxRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetTxRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetTxRequest message. + * @function verify + * @memberof cosmos.tx.v1beta1.GetTxRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetTxRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.hash != null && message.hasOwnProperty("hash")) + if (!$util.isString(message.hash)) + return "hash: string expected"; + return null; + }; + + /** + * Creates a GetTxRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.tx.v1beta1.GetTxRequest + * @static + * @param {Object.} object Plain object + * @returns {cosmos.tx.v1beta1.GetTxRequest} GetTxRequest + */ + GetTxRequest.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.tx.v1beta1.GetTxRequest) + return object; + let message = new $root.cosmos.tx.v1beta1.GetTxRequest(); + if (object.hash != null) + message.hash = String(object.hash); + return message; + }; + + /** + * Creates a plain object from a GetTxRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.tx.v1beta1.GetTxRequest + * @static + * @param {cosmos.tx.v1beta1.GetTxRequest} message GetTxRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetTxRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.hash = ""; + if (message.hash != null && message.hasOwnProperty("hash")) + object.hash = message.hash; + return object; + }; + + /** + * Converts this GetTxRequest to JSON. + * @function toJSON + * @memberof cosmos.tx.v1beta1.GetTxRequest + * @instance + * @returns {Object.} JSON object + */ + GetTxRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetTxRequest; + })(v1beta1.GetTxRequest || {}); + + v1beta1.GetTxResponse = (function(GetTxResponse) { + + /** + * Properties of a GetTxResponse. + * @memberof cosmos.tx.v1beta1 + * @interface IGetTxResponse + * @property {cosmos.tx.v1beta1.ITx|null} [tx] GetTxResponse tx + * @property {cosmos.base.abci.v1beta1.ITxResponse|null} [txResponse] GetTxResponse txResponse + */ + + /** + * Constructs a new GetTxResponse. + * @memberof cosmos.tx.v1beta1 + * @classdesc Represents a GetTxResponse. + * @implements IGetTxResponse + * @constructor + * @param {cosmos.tx.v1beta1.IGetTxResponse=} [properties] Properties to set + */ + function GetTxResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetTxResponse tx. + * @member {cosmos.tx.v1beta1.ITx|null|undefined} tx + * @memberof cosmos.tx.v1beta1.GetTxResponse + * @instance + */ + GetTxResponse.prototype.tx = null; + + /** + * GetTxResponse txResponse. + * @member {cosmos.base.abci.v1beta1.ITxResponse|null|undefined} txResponse + * @memberof cosmos.tx.v1beta1.GetTxResponse + * @instance + */ + GetTxResponse.prototype.txResponse = null; + + /** + * Creates a new GetTxResponse instance using the specified properties. + * @function create + * @memberof cosmos.tx.v1beta1.GetTxResponse + * @static + * @param {cosmos.tx.v1beta1.IGetTxResponse=} [properties] Properties to set + * @returns {cosmos.tx.v1beta1.GetTxResponse} GetTxResponse instance + */ + GetTxResponse.create = function create(properties) { + return new GetTxResponse(properties); + }; + + /** + * Encodes the specified GetTxResponse message. Does not implicitly {@link cosmos.tx.v1beta1.GetTxResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.tx.v1beta1.GetTxResponse + * @static + * @param {cosmos.tx.v1beta1.IGetTxResponse} message GetTxResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetTxResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tx != null && Object.hasOwnProperty.call(message, "tx")) + $root.cosmos.tx.v1beta1.Tx.encode(message.tx, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.txResponse != null && Object.hasOwnProperty.call(message, "txResponse")) + $root.cosmos.base.abci.v1beta1.TxResponse.encode(message.txResponse, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GetTxResponse message, length delimited. Does not implicitly {@link cosmos.tx.v1beta1.GetTxResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.tx.v1beta1.GetTxResponse + * @static + * @param {cosmos.tx.v1beta1.IGetTxResponse} message GetTxResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetTxResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetTxResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.tx.v1beta1.GetTxResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.tx.v1beta1.GetTxResponse} GetTxResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetTxResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.tx.v1beta1.GetTxResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.tx = $root.cosmos.tx.v1beta1.Tx.decode(reader, reader.uint32()); + break; + case 2: + message.txResponse = $root.cosmos.base.abci.v1beta1.TxResponse.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetTxResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.tx.v1beta1.GetTxResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.tx.v1beta1.GetTxResponse} GetTxResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetTxResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetTxResponse message. + * @function verify + * @memberof cosmos.tx.v1beta1.GetTxResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetTxResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tx != null && message.hasOwnProperty("tx")) { + let error = $root.cosmos.tx.v1beta1.Tx.verify(message.tx); + if (error) + return "tx." + error; + } + if (message.txResponse != null && message.hasOwnProperty("txResponse")) { + let error = $root.cosmos.base.abci.v1beta1.TxResponse.verify(message.txResponse); + if (error) + return "txResponse." + error; + } + return null; + }; + + /** + * Creates a GetTxResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.tx.v1beta1.GetTxResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.tx.v1beta1.GetTxResponse} GetTxResponse + */ + GetTxResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.tx.v1beta1.GetTxResponse) + return object; + let message = new $root.cosmos.tx.v1beta1.GetTxResponse(); + if (object.tx != null) { + if (typeof object.tx !== "object") + throw TypeError(".cosmos.tx.v1beta1.GetTxResponse.tx: object expected"); + message.tx = $root.cosmos.tx.v1beta1.Tx.fromObject(object.tx); + } + if (object.txResponse != null) { + if (typeof object.txResponse !== "object") + throw TypeError(".cosmos.tx.v1beta1.GetTxResponse.txResponse: object expected"); + message.txResponse = $root.cosmos.base.abci.v1beta1.TxResponse.fromObject(object.txResponse); + } + return message; + }; + + /** + * Creates a plain object from a GetTxResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.tx.v1beta1.GetTxResponse + * @static + * @param {cosmos.tx.v1beta1.GetTxResponse} message GetTxResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetTxResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.tx = null; + object.txResponse = null; + } + if (message.tx != null && message.hasOwnProperty("tx")) + object.tx = $root.cosmos.tx.v1beta1.Tx.toObject(message.tx, options); + if (message.txResponse != null && message.hasOwnProperty("txResponse")) + object.txResponse = $root.cosmos.base.abci.v1beta1.TxResponse.toObject(message.txResponse, options); + return object; + }; + + /** + * Converts this GetTxResponse to JSON. + * @function toJSON + * @memberof cosmos.tx.v1beta1.GetTxResponse + * @instance + * @returns {Object.} JSON object + */ + GetTxResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetTxResponse; + })(v1beta1.GetTxResponse || {}); + + v1beta1.Tx = (function(Tx) { + + /** + * Properties of a Tx. + * @memberof cosmos.tx.v1beta1 + * @interface ITx + * @property {cosmos.tx.v1beta1.ITxBody|null} [body] Tx body + * @property {cosmos.tx.v1beta1.IAuthInfo|null} [authInfo] Tx authInfo + * @property {Array.|null} [signatures] Tx signatures + */ + + /** + * Constructs a new Tx. + * @memberof cosmos.tx.v1beta1 + * @classdesc Represents a Tx. + * @implements ITx + * @constructor + * @param {cosmos.tx.v1beta1.ITx=} [properties] Properties to set + */ + function Tx(properties) { + this.signatures = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Tx body. + * @member {cosmos.tx.v1beta1.ITxBody|null|undefined} body + * @memberof cosmos.tx.v1beta1.Tx + * @instance + */ + Tx.prototype.body = null; + + /** + * Tx authInfo. + * @member {cosmos.tx.v1beta1.IAuthInfo|null|undefined} authInfo + * @memberof cosmos.tx.v1beta1.Tx + * @instance + */ + Tx.prototype.authInfo = null; + + /** + * Tx signatures. + * @member {Array.} signatures + * @memberof cosmos.tx.v1beta1.Tx + * @instance + */ + Tx.prototype.signatures = $util.emptyArray; + + /** + * Creates a new Tx instance using the specified properties. + * @function create + * @memberof cosmos.tx.v1beta1.Tx + * @static + * @param {cosmos.tx.v1beta1.ITx=} [properties] Properties to set + * @returns {cosmos.tx.v1beta1.Tx} Tx instance + */ + Tx.create = function create(properties) { + return new Tx(properties); + }; + + /** + * Encodes the specified Tx message. Does not implicitly {@link cosmos.tx.v1beta1.Tx.verify|verify} messages. + * @function encode + * @memberof cosmos.tx.v1beta1.Tx + * @static + * @param {cosmos.tx.v1beta1.ITx} message Tx message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Tx.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.body != null && Object.hasOwnProperty.call(message, "body")) + $root.cosmos.tx.v1beta1.TxBody.encode(message.body, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.authInfo != null && Object.hasOwnProperty.call(message, "authInfo")) + $root.cosmos.tx.v1beta1.AuthInfo.encode(message.authInfo, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.signatures != null && message.signatures.length) + for (let i = 0; i < message.signatures.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.signatures[i]); + return writer; + }; + + /** + * Encodes the specified Tx message, length delimited. Does not implicitly {@link cosmos.tx.v1beta1.Tx.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.tx.v1beta1.Tx + * @static + * @param {cosmos.tx.v1beta1.ITx} message Tx message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Tx.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Tx message from the specified reader or buffer. + * @function decode + * @memberof cosmos.tx.v1beta1.Tx + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.tx.v1beta1.Tx} Tx + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Tx.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.tx.v1beta1.Tx(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.body = $root.cosmos.tx.v1beta1.TxBody.decode(reader, reader.uint32()); + break; + case 2: + message.authInfo = $root.cosmos.tx.v1beta1.AuthInfo.decode(reader, reader.uint32()); + break; + case 3: + if (!(message.signatures && message.signatures.length)) + message.signatures = []; + message.signatures.push(reader.bytes()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Tx message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.tx.v1beta1.Tx + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.tx.v1beta1.Tx} Tx + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Tx.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Tx message. + * @function verify + * @memberof cosmos.tx.v1beta1.Tx + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Tx.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.body != null && message.hasOwnProperty("body")) { + let error = $root.cosmos.tx.v1beta1.TxBody.verify(message.body); + if (error) + return "body." + error; + } + if (message.authInfo != null && message.hasOwnProperty("authInfo")) { + let error = $root.cosmos.tx.v1beta1.AuthInfo.verify(message.authInfo); + if (error) + return "authInfo." + error; + } + if (message.signatures != null && message.hasOwnProperty("signatures")) { + if (!Array.isArray(message.signatures)) + return "signatures: array expected"; + for (let i = 0; i < message.signatures.length; ++i) + if (!(message.signatures[i] && typeof message.signatures[i].length === "number" || $util.isString(message.signatures[i]))) + return "signatures: buffer[] expected"; + } + return null; + }; + + /** + * Creates a Tx message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.tx.v1beta1.Tx + * @static + * @param {Object.} object Plain object + * @returns {cosmos.tx.v1beta1.Tx} Tx + */ + Tx.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.tx.v1beta1.Tx) + return object; + let message = new $root.cosmos.tx.v1beta1.Tx(); + if (object.body != null) { + if (typeof object.body !== "object") + throw TypeError(".cosmos.tx.v1beta1.Tx.body: object expected"); + message.body = $root.cosmos.tx.v1beta1.TxBody.fromObject(object.body); + } + if (object.authInfo != null) { + if (typeof object.authInfo !== "object") + throw TypeError(".cosmos.tx.v1beta1.Tx.authInfo: object expected"); + message.authInfo = $root.cosmos.tx.v1beta1.AuthInfo.fromObject(object.authInfo); + } + if (object.signatures) { + if (!Array.isArray(object.signatures)) + throw TypeError(".cosmos.tx.v1beta1.Tx.signatures: array expected"); + message.signatures = []; + for (let i = 0; i < object.signatures.length; ++i) + if (typeof object.signatures[i] === "string") + $util.base64.decode(object.signatures[i], message.signatures[i] = $util.newBuffer($util.base64.length(object.signatures[i])), 0); + else if (object.signatures[i].length) + message.signatures[i] = object.signatures[i]; + } + return message; + }; + + /** + * Creates a plain object from a Tx message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.tx.v1beta1.Tx + * @static + * @param {cosmos.tx.v1beta1.Tx} message Tx + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Tx.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.signatures = []; + if (options.defaults) { + object.body = null; + object.authInfo = null; + } + if (message.body != null && message.hasOwnProperty("body")) + object.body = $root.cosmos.tx.v1beta1.TxBody.toObject(message.body, options); + if (message.authInfo != null && message.hasOwnProperty("authInfo")) + object.authInfo = $root.cosmos.tx.v1beta1.AuthInfo.toObject(message.authInfo, options); + if (message.signatures && message.signatures.length) { + object.signatures = []; + for (let j = 0; j < message.signatures.length; ++j) + object.signatures[j] = options.bytes === String ? $util.base64.encode(message.signatures[j], 0, message.signatures[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.signatures[j]) : message.signatures[j]; + } + return object; + }; + + /** + * Converts this Tx to JSON. + * @function toJSON + * @memberof cosmos.tx.v1beta1.Tx + * @instance + * @returns {Object.} JSON object + */ + Tx.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Tx; + })(v1beta1.Tx || {}); + + v1beta1.TxRaw = (function(TxRaw) { + + /** + * Properties of a TxRaw. + * @memberof cosmos.tx.v1beta1 + * @interface ITxRaw + * @property {Uint8Array|null} [bodyBytes] TxRaw bodyBytes + * @property {Uint8Array|null} [authInfoBytes] TxRaw authInfoBytes + * @property {Array.|null} [signatures] TxRaw signatures + */ + + /** + * Constructs a new TxRaw. + * @memberof cosmos.tx.v1beta1 + * @classdesc Represents a TxRaw. + * @implements ITxRaw + * @constructor + * @param {cosmos.tx.v1beta1.ITxRaw=} [properties] Properties to set + */ + function TxRaw(properties) { + this.signatures = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TxRaw bodyBytes. + * @member {Uint8Array} bodyBytes + * @memberof cosmos.tx.v1beta1.TxRaw + * @instance + */ + TxRaw.prototype.bodyBytes = $util.newBuffer([]); + + /** + * TxRaw authInfoBytes. + * @member {Uint8Array} authInfoBytes + * @memberof cosmos.tx.v1beta1.TxRaw + * @instance + */ + TxRaw.prototype.authInfoBytes = $util.newBuffer([]); + + /** + * TxRaw signatures. + * @member {Array.} signatures + * @memberof cosmos.tx.v1beta1.TxRaw + * @instance + */ + TxRaw.prototype.signatures = $util.emptyArray; + + /** + * Creates a new TxRaw instance using the specified properties. + * @function create + * @memberof cosmos.tx.v1beta1.TxRaw + * @static + * @param {cosmos.tx.v1beta1.ITxRaw=} [properties] Properties to set + * @returns {cosmos.tx.v1beta1.TxRaw} TxRaw instance + */ + TxRaw.create = function create(properties) { + return new TxRaw(properties); + }; + + /** + * Encodes the specified TxRaw message. Does not implicitly {@link cosmos.tx.v1beta1.TxRaw.verify|verify} messages. + * @function encode + * @memberof cosmos.tx.v1beta1.TxRaw + * @static + * @param {cosmos.tx.v1beta1.ITxRaw} message TxRaw message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TxRaw.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.bodyBytes != null && Object.hasOwnProperty.call(message, "bodyBytes")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.bodyBytes); + if (message.authInfoBytes != null && Object.hasOwnProperty.call(message, "authInfoBytes")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.authInfoBytes); + if (message.signatures != null && message.signatures.length) + for (let i = 0; i < message.signatures.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.signatures[i]); + return writer; + }; + + /** + * Encodes the specified TxRaw message, length delimited. Does not implicitly {@link cosmos.tx.v1beta1.TxRaw.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.tx.v1beta1.TxRaw + * @static + * @param {cosmos.tx.v1beta1.ITxRaw} message TxRaw message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TxRaw.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TxRaw message from the specified reader or buffer. + * @function decode + * @memberof cosmos.tx.v1beta1.TxRaw + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.tx.v1beta1.TxRaw} TxRaw + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TxRaw.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.tx.v1beta1.TxRaw(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.bodyBytes = reader.bytes(); + break; + case 2: + message.authInfoBytes = reader.bytes(); + break; + case 3: + if (!(message.signatures && message.signatures.length)) + message.signatures = []; + message.signatures.push(reader.bytes()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TxRaw message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.tx.v1beta1.TxRaw + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.tx.v1beta1.TxRaw} TxRaw + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TxRaw.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TxRaw message. + * @function verify + * @memberof cosmos.tx.v1beta1.TxRaw + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TxRaw.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.bodyBytes != null && message.hasOwnProperty("bodyBytes")) + if (!(message.bodyBytes && typeof message.bodyBytes.length === "number" || $util.isString(message.bodyBytes))) + return "bodyBytes: buffer expected"; + if (message.authInfoBytes != null && message.hasOwnProperty("authInfoBytes")) + if (!(message.authInfoBytes && typeof message.authInfoBytes.length === "number" || $util.isString(message.authInfoBytes))) + return "authInfoBytes: buffer expected"; + if (message.signatures != null && message.hasOwnProperty("signatures")) { + if (!Array.isArray(message.signatures)) + return "signatures: array expected"; + for (let i = 0; i < message.signatures.length; ++i) + if (!(message.signatures[i] && typeof message.signatures[i].length === "number" || $util.isString(message.signatures[i]))) + return "signatures: buffer[] expected"; + } + return null; + }; + + /** + * Creates a TxRaw message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.tx.v1beta1.TxRaw + * @static + * @param {Object.} object Plain object + * @returns {cosmos.tx.v1beta1.TxRaw} TxRaw + */ + TxRaw.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.tx.v1beta1.TxRaw) + return object; + let message = new $root.cosmos.tx.v1beta1.TxRaw(); + if (object.bodyBytes != null) + if (typeof object.bodyBytes === "string") + $util.base64.decode(object.bodyBytes, message.bodyBytes = $util.newBuffer($util.base64.length(object.bodyBytes)), 0); + else if (object.bodyBytes.length) + message.bodyBytes = object.bodyBytes; + if (object.authInfoBytes != null) + if (typeof object.authInfoBytes === "string") + $util.base64.decode(object.authInfoBytes, message.authInfoBytes = $util.newBuffer($util.base64.length(object.authInfoBytes)), 0); + else if (object.authInfoBytes.length) + message.authInfoBytes = object.authInfoBytes; + if (object.signatures) { + if (!Array.isArray(object.signatures)) + throw TypeError(".cosmos.tx.v1beta1.TxRaw.signatures: array expected"); + message.signatures = []; + for (let i = 0; i < object.signatures.length; ++i) + if (typeof object.signatures[i] === "string") + $util.base64.decode(object.signatures[i], message.signatures[i] = $util.newBuffer($util.base64.length(object.signatures[i])), 0); + else if (object.signatures[i].length) + message.signatures[i] = object.signatures[i]; + } + return message; + }; + + /** + * Creates a plain object from a TxRaw message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.tx.v1beta1.TxRaw + * @static + * @param {cosmos.tx.v1beta1.TxRaw} message TxRaw + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TxRaw.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.signatures = []; + if (options.defaults) { + if (options.bytes === String) + object.bodyBytes = ""; + else { + object.bodyBytes = []; + if (options.bytes !== Array) + object.bodyBytes = $util.newBuffer(object.bodyBytes); + } + if (options.bytes === String) + object.authInfoBytes = ""; + else { + object.authInfoBytes = []; + if (options.bytes !== Array) + object.authInfoBytes = $util.newBuffer(object.authInfoBytes); + } + } + if (message.bodyBytes != null && message.hasOwnProperty("bodyBytes")) + object.bodyBytes = options.bytes === String ? $util.base64.encode(message.bodyBytes, 0, message.bodyBytes.length) : options.bytes === Array ? Array.prototype.slice.call(message.bodyBytes) : message.bodyBytes; + if (message.authInfoBytes != null && message.hasOwnProperty("authInfoBytes")) + object.authInfoBytes = options.bytes === String ? $util.base64.encode(message.authInfoBytes, 0, message.authInfoBytes.length) : options.bytes === Array ? Array.prototype.slice.call(message.authInfoBytes) : message.authInfoBytes; + if (message.signatures && message.signatures.length) { + object.signatures = []; + for (let j = 0; j < message.signatures.length; ++j) + object.signatures[j] = options.bytes === String ? $util.base64.encode(message.signatures[j], 0, message.signatures[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.signatures[j]) : message.signatures[j]; + } + return object; + }; + + /** + * Converts this TxRaw to JSON. + * @function toJSON + * @memberof cosmos.tx.v1beta1.TxRaw + * @instance + * @returns {Object.} JSON object + */ + TxRaw.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TxRaw; + })(v1beta1.TxRaw || {}); + + v1beta1.SignDoc = (function(SignDoc) { + + /** + * Properties of a SignDoc. + * @memberof cosmos.tx.v1beta1 + * @interface ISignDoc + * @property {Uint8Array|null} [bodyBytes] SignDoc bodyBytes + * @property {Uint8Array|null} [authInfoBytes] SignDoc authInfoBytes + * @property {string|null} [chainId] SignDoc chainId + * @property {number|Long|null} [accountNumber] SignDoc accountNumber + */ + + /** + * Constructs a new SignDoc. + * @memberof cosmos.tx.v1beta1 + * @classdesc Represents a SignDoc. + * @implements ISignDoc + * @constructor + * @param {cosmos.tx.v1beta1.ISignDoc=} [properties] Properties to set + */ + function SignDoc(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SignDoc bodyBytes. + * @member {Uint8Array} bodyBytes + * @memberof cosmos.tx.v1beta1.SignDoc + * @instance + */ + SignDoc.prototype.bodyBytes = $util.newBuffer([]); + + /** + * SignDoc authInfoBytes. + * @member {Uint8Array} authInfoBytes + * @memberof cosmos.tx.v1beta1.SignDoc + * @instance + */ + SignDoc.prototype.authInfoBytes = $util.newBuffer([]); + + /** + * SignDoc chainId. + * @member {string} chainId + * @memberof cosmos.tx.v1beta1.SignDoc + * @instance + */ + SignDoc.prototype.chainId = ""; + + /** + * SignDoc accountNumber. + * @member {number|Long} accountNumber + * @memberof cosmos.tx.v1beta1.SignDoc + * @instance + */ + SignDoc.prototype.accountNumber = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new SignDoc instance using the specified properties. + * @function create + * @memberof cosmos.tx.v1beta1.SignDoc + * @static + * @param {cosmos.tx.v1beta1.ISignDoc=} [properties] Properties to set + * @returns {cosmos.tx.v1beta1.SignDoc} SignDoc instance + */ + SignDoc.create = function create(properties) { + return new SignDoc(properties); + }; + + /** + * Encodes the specified SignDoc message. Does not implicitly {@link cosmos.tx.v1beta1.SignDoc.verify|verify} messages. + * @function encode + * @memberof cosmos.tx.v1beta1.SignDoc + * @static + * @param {cosmos.tx.v1beta1.ISignDoc} message SignDoc message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SignDoc.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.bodyBytes != null && Object.hasOwnProperty.call(message, "bodyBytes")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.bodyBytes); + if (message.authInfoBytes != null && Object.hasOwnProperty.call(message, "authInfoBytes")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.authInfoBytes); + if (message.chainId != null && Object.hasOwnProperty.call(message, "chainId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.chainId); + if (message.accountNumber != null && Object.hasOwnProperty.call(message, "accountNumber")) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.accountNumber); + return writer; + }; + + /** + * Encodes the specified SignDoc message, length delimited. Does not implicitly {@link cosmos.tx.v1beta1.SignDoc.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.tx.v1beta1.SignDoc + * @static + * @param {cosmos.tx.v1beta1.ISignDoc} message SignDoc message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SignDoc.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SignDoc message from the specified reader or buffer. + * @function decode + * @memberof cosmos.tx.v1beta1.SignDoc + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.tx.v1beta1.SignDoc} SignDoc + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SignDoc.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.tx.v1beta1.SignDoc(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.bodyBytes = reader.bytes(); + break; + case 2: + message.authInfoBytes = reader.bytes(); + break; + case 3: + message.chainId = reader.string(); + break; + case 4: + message.accountNumber = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SignDoc message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.tx.v1beta1.SignDoc + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.tx.v1beta1.SignDoc} SignDoc + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SignDoc.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SignDoc message. + * @function verify + * @memberof cosmos.tx.v1beta1.SignDoc + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SignDoc.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.bodyBytes != null && message.hasOwnProperty("bodyBytes")) + if (!(message.bodyBytes && typeof message.bodyBytes.length === "number" || $util.isString(message.bodyBytes))) + return "bodyBytes: buffer expected"; + if (message.authInfoBytes != null && message.hasOwnProperty("authInfoBytes")) + if (!(message.authInfoBytes && typeof message.authInfoBytes.length === "number" || $util.isString(message.authInfoBytes))) + return "authInfoBytes: buffer expected"; + if (message.chainId != null && message.hasOwnProperty("chainId")) + if (!$util.isString(message.chainId)) + return "chainId: string expected"; + if (message.accountNumber != null && message.hasOwnProperty("accountNumber")) + if (!$util.isInteger(message.accountNumber) && !(message.accountNumber && $util.isInteger(message.accountNumber.low) && $util.isInteger(message.accountNumber.high))) + return "accountNumber: integer|Long expected"; + return null; + }; + + /** + * Creates a SignDoc message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.tx.v1beta1.SignDoc + * @static + * @param {Object.} object Plain object + * @returns {cosmos.tx.v1beta1.SignDoc} SignDoc + */ + SignDoc.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.tx.v1beta1.SignDoc) + return object; + let message = new $root.cosmos.tx.v1beta1.SignDoc(); + if (object.bodyBytes != null) + if (typeof object.bodyBytes === "string") + $util.base64.decode(object.bodyBytes, message.bodyBytes = $util.newBuffer($util.base64.length(object.bodyBytes)), 0); + else if (object.bodyBytes.length) + message.bodyBytes = object.bodyBytes; + if (object.authInfoBytes != null) + if (typeof object.authInfoBytes === "string") + $util.base64.decode(object.authInfoBytes, message.authInfoBytes = $util.newBuffer($util.base64.length(object.authInfoBytes)), 0); + else if (object.authInfoBytes.length) + message.authInfoBytes = object.authInfoBytes; + if (object.chainId != null) + message.chainId = String(object.chainId); + if (object.accountNumber != null) + if ($util.Long) + (message.accountNumber = $util.Long.fromValue(object.accountNumber)).unsigned = true; + else if (typeof object.accountNumber === "string") + message.accountNumber = parseInt(object.accountNumber, 10); + else if (typeof object.accountNumber === "number") + message.accountNumber = object.accountNumber; + else if (typeof object.accountNumber === "object") + message.accountNumber = new $util.LongBits(object.accountNumber.low >>> 0, object.accountNumber.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a SignDoc message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.tx.v1beta1.SignDoc + * @static + * @param {cosmos.tx.v1beta1.SignDoc} message SignDoc + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SignDoc.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + if (options.bytes === String) + object.bodyBytes = ""; + else { + object.bodyBytes = []; + if (options.bytes !== Array) + object.bodyBytes = $util.newBuffer(object.bodyBytes); + } + if (options.bytes === String) + object.authInfoBytes = ""; + else { + object.authInfoBytes = []; + if (options.bytes !== Array) + object.authInfoBytes = $util.newBuffer(object.authInfoBytes); + } + object.chainId = ""; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.accountNumber = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.accountNumber = options.longs === String ? "0" : 0; + } + if (message.bodyBytes != null && message.hasOwnProperty("bodyBytes")) + object.bodyBytes = options.bytes === String ? $util.base64.encode(message.bodyBytes, 0, message.bodyBytes.length) : options.bytes === Array ? Array.prototype.slice.call(message.bodyBytes) : message.bodyBytes; + if (message.authInfoBytes != null && message.hasOwnProperty("authInfoBytes")) + object.authInfoBytes = options.bytes === String ? $util.base64.encode(message.authInfoBytes, 0, message.authInfoBytes.length) : options.bytes === Array ? Array.prototype.slice.call(message.authInfoBytes) : message.authInfoBytes; + if (message.chainId != null && message.hasOwnProperty("chainId")) + object.chainId = message.chainId; + if (message.accountNumber != null && message.hasOwnProperty("accountNumber")) + if (typeof message.accountNumber === "number") + object.accountNumber = options.longs === String ? String(message.accountNumber) : message.accountNumber; + else + object.accountNumber = options.longs === String ? $util.Long.prototype.toString.call(message.accountNumber) : options.longs === Number ? new $util.LongBits(message.accountNumber.low >>> 0, message.accountNumber.high >>> 0).toNumber(true) : message.accountNumber; + return object; + }; + + /** + * Converts this SignDoc to JSON. + * @function toJSON + * @memberof cosmos.tx.v1beta1.SignDoc + * @instance + * @returns {Object.} JSON object + */ + SignDoc.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SignDoc; + })(v1beta1.SignDoc || {}); + + v1beta1.TxBody = (function(TxBody) { + + /** + * Properties of a TxBody. + * @memberof cosmos.tx.v1beta1 + * @interface ITxBody + * @property {Array.|null} [messages] TxBody messages + * @property {string|null} [memo] TxBody memo + * @property {number|Long|null} [timeoutHeight] TxBody timeoutHeight + * @property {Array.|null} [extensionOptions] TxBody extensionOptions + * @property {Array.|null} [nonCriticalExtensionOptions] TxBody nonCriticalExtensionOptions + */ + + /** + * Constructs a new TxBody. + * @memberof cosmos.tx.v1beta1 + * @classdesc Represents a TxBody. + * @implements ITxBody + * @constructor + * @param {cosmos.tx.v1beta1.ITxBody=} [properties] Properties to set + */ + function TxBody(properties) { + this.messages = []; + this.extensionOptions = []; + this.nonCriticalExtensionOptions = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TxBody messages. + * @member {Array.} messages + * @memberof cosmos.tx.v1beta1.TxBody + * @instance + */ + TxBody.prototype.messages = $util.emptyArray; + + /** + * TxBody memo. + * @member {string} memo + * @memberof cosmos.tx.v1beta1.TxBody + * @instance + */ + TxBody.prototype.memo = ""; + + /** + * TxBody timeoutHeight. + * @member {number|Long} timeoutHeight + * @memberof cosmos.tx.v1beta1.TxBody + * @instance + */ + TxBody.prototype.timeoutHeight = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * TxBody extensionOptions. + * @member {Array.} extensionOptions + * @memberof cosmos.tx.v1beta1.TxBody + * @instance + */ + TxBody.prototype.extensionOptions = $util.emptyArray; + + /** + * TxBody nonCriticalExtensionOptions. + * @member {Array.} nonCriticalExtensionOptions + * @memberof cosmos.tx.v1beta1.TxBody + * @instance + */ + TxBody.prototype.nonCriticalExtensionOptions = $util.emptyArray; + + /** + * Creates a new TxBody instance using the specified properties. + * @function create + * @memberof cosmos.tx.v1beta1.TxBody + * @static + * @param {cosmos.tx.v1beta1.ITxBody=} [properties] Properties to set + * @returns {cosmos.tx.v1beta1.TxBody} TxBody instance + */ + TxBody.create = function create(properties) { + return new TxBody(properties); + }; + + /** + * Encodes the specified TxBody message. Does not implicitly {@link cosmos.tx.v1beta1.TxBody.verify|verify} messages. + * @function encode + * @memberof cosmos.tx.v1beta1.TxBody + * @static + * @param {cosmos.tx.v1beta1.ITxBody} message TxBody message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TxBody.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.messages != null && message.messages.length) + for (let i = 0; i < message.messages.length; ++i) + $root.google.protobuf.Any.encode(message.messages[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.memo != null && Object.hasOwnProperty.call(message, "memo")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.memo); + if (message.timeoutHeight != null && Object.hasOwnProperty.call(message, "timeoutHeight")) + writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.timeoutHeight); + if (message.extensionOptions != null && message.extensionOptions.length) + for (let i = 0; i < message.extensionOptions.length; ++i) + $root.google.protobuf.Any.encode(message.extensionOptions[i], writer.uint32(/* id 1023, wireType 2 =*/8186).fork()).ldelim(); + if (message.nonCriticalExtensionOptions != null && message.nonCriticalExtensionOptions.length) + for (let i = 0; i < message.nonCriticalExtensionOptions.length; ++i) + $root.google.protobuf.Any.encode(message.nonCriticalExtensionOptions[i], writer.uint32(/* id 2047, wireType 2 =*/16378).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TxBody message, length delimited. Does not implicitly {@link cosmos.tx.v1beta1.TxBody.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.tx.v1beta1.TxBody + * @static + * @param {cosmos.tx.v1beta1.ITxBody} message TxBody message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TxBody.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TxBody message from the specified reader or buffer. + * @function decode + * @memberof cosmos.tx.v1beta1.TxBody + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.tx.v1beta1.TxBody} TxBody + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TxBody.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.tx.v1beta1.TxBody(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.messages && message.messages.length)) + message.messages = []; + message.messages.push($root.google.protobuf.Any.decode(reader, reader.uint32())); + break; + case 2: + message.memo = reader.string(); + break; + case 3: + message.timeoutHeight = reader.uint64(); + break; + case 1023: + if (!(message.extensionOptions && message.extensionOptions.length)) + message.extensionOptions = []; + message.extensionOptions.push($root.google.protobuf.Any.decode(reader, reader.uint32())); + break; + case 2047: + if (!(message.nonCriticalExtensionOptions && message.nonCriticalExtensionOptions.length)) + message.nonCriticalExtensionOptions = []; + message.nonCriticalExtensionOptions.push($root.google.protobuf.Any.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TxBody message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.tx.v1beta1.TxBody + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.tx.v1beta1.TxBody} TxBody + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TxBody.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TxBody message. + * @function verify + * @memberof cosmos.tx.v1beta1.TxBody + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TxBody.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.messages != null && message.hasOwnProperty("messages")) { + if (!Array.isArray(message.messages)) + return "messages: array expected"; + for (let i = 0; i < message.messages.length; ++i) { + let error = $root.google.protobuf.Any.verify(message.messages[i]); + if (error) + return "messages." + error; + } + } + if (message.memo != null && message.hasOwnProperty("memo")) + if (!$util.isString(message.memo)) + return "memo: string expected"; + if (message.timeoutHeight != null && message.hasOwnProperty("timeoutHeight")) + if (!$util.isInteger(message.timeoutHeight) && !(message.timeoutHeight && $util.isInteger(message.timeoutHeight.low) && $util.isInteger(message.timeoutHeight.high))) + return "timeoutHeight: integer|Long expected"; + if (message.extensionOptions != null && message.hasOwnProperty("extensionOptions")) { + if (!Array.isArray(message.extensionOptions)) + return "extensionOptions: array expected"; + for (let i = 0; i < message.extensionOptions.length; ++i) { + let error = $root.google.protobuf.Any.verify(message.extensionOptions[i]); + if (error) + return "extensionOptions." + error; + } + } + if (message.nonCriticalExtensionOptions != null && message.hasOwnProperty("nonCriticalExtensionOptions")) { + if (!Array.isArray(message.nonCriticalExtensionOptions)) + return "nonCriticalExtensionOptions: array expected"; + for (let i = 0; i < message.nonCriticalExtensionOptions.length; ++i) { + let error = $root.google.protobuf.Any.verify(message.nonCriticalExtensionOptions[i]); + if (error) + return "nonCriticalExtensionOptions." + error; + } + } + return null; + }; + + /** + * Creates a TxBody message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.tx.v1beta1.TxBody + * @static + * @param {Object.} object Plain object + * @returns {cosmos.tx.v1beta1.TxBody} TxBody + */ + TxBody.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.tx.v1beta1.TxBody) + return object; + let message = new $root.cosmos.tx.v1beta1.TxBody(); + if (object.messages) { + if (!Array.isArray(object.messages)) + throw TypeError(".cosmos.tx.v1beta1.TxBody.messages: array expected"); + message.messages = []; + for (let i = 0; i < object.messages.length; ++i) { + if (typeof object.messages[i] !== "object") + throw TypeError(".cosmos.tx.v1beta1.TxBody.messages: object expected"); + message.messages[i] = $root.google.protobuf.Any.fromObject(object.messages[i]); + } + } + if (object.memo != null) + message.memo = String(object.memo); + if (object.timeoutHeight != null) + if ($util.Long) + (message.timeoutHeight = $util.Long.fromValue(object.timeoutHeight)).unsigned = true; + else if (typeof object.timeoutHeight === "string") + message.timeoutHeight = parseInt(object.timeoutHeight, 10); + else if (typeof object.timeoutHeight === "number") + message.timeoutHeight = object.timeoutHeight; + else if (typeof object.timeoutHeight === "object") + message.timeoutHeight = new $util.LongBits(object.timeoutHeight.low >>> 0, object.timeoutHeight.high >>> 0).toNumber(true); + if (object.extensionOptions) { + if (!Array.isArray(object.extensionOptions)) + throw TypeError(".cosmos.tx.v1beta1.TxBody.extensionOptions: array expected"); + message.extensionOptions = []; + for (let i = 0; i < object.extensionOptions.length; ++i) { + if (typeof object.extensionOptions[i] !== "object") + throw TypeError(".cosmos.tx.v1beta1.TxBody.extensionOptions: object expected"); + message.extensionOptions[i] = $root.google.protobuf.Any.fromObject(object.extensionOptions[i]); + } + } + if (object.nonCriticalExtensionOptions) { + if (!Array.isArray(object.nonCriticalExtensionOptions)) + throw TypeError(".cosmos.tx.v1beta1.TxBody.nonCriticalExtensionOptions: array expected"); + message.nonCriticalExtensionOptions = []; + for (let i = 0; i < object.nonCriticalExtensionOptions.length; ++i) { + if (typeof object.nonCriticalExtensionOptions[i] !== "object") + throw TypeError(".cosmos.tx.v1beta1.TxBody.nonCriticalExtensionOptions: object expected"); + message.nonCriticalExtensionOptions[i] = $root.google.protobuf.Any.fromObject(object.nonCriticalExtensionOptions[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a TxBody message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.tx.v1beta1.TxBody + * @static + * @param {cosmos.tx.v1beta1.TxBody} message TxBody + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TxBody.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) { + object.messages = []; + object.extensionOptions = []; + object.nonCriticalExtensionOptions = []; + } + if (options.defaults) { + object.memo = ""; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.timeoutHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.timeoutHeight = options.longs === String ? "0" : 0; + } + if (message.messages && message.messages.length) { + object.messages = []; + for (let j = 0; j < message.messages.length; ++j) + object.messages[j] = $root.google.protobuf.Any.toObject(message.messages[j], options); + } + if (message.memo != null && message.hasOwnProperty("memo")) + object.memo = message.memo; + if (message.timeoutHeight != null && message.hasOwnProperty("timeoutHeight")) + if (typeof message.timeoutHeight === "number") + object.timeoutHeight = options.longs === String ? String(message.timeoutHeight) : message.timeoutHeight; + else + object.timeoutHeight = options.longs === String ? $util.Long.prototype.toString.call(message.timeoutHeight) : options.longs === Number ? new $util.LongBits(message.timeoutHeight.low >>> 0, message.timeoutHeight.high >>> 0).toNumber(true) : message.timeoutHeight; + if (message.extensionOptions && message.extensionOptions.length) { + object.extensionOptions = []; + for (let j = 0; j < message.extensionOptions.length; ++j) + object.extensionOptions[j] = $root.google.protobuf.Any.toObject(message.extensionOptions[j], options); + } + if (message.nonCriticalExtensionOptions && message.nonCriticalExtensionOptions.length) { + object.nonCriticalExtensionOptions = []; + for (let j = 0; j < message.nonCriticalExtensionOptions.length; ++j) + object.nonCriticalExtensionOptions[j] = $root.google.protobuf.Any.toObject(message.nonCriticalExtensionOptions[j], options); + } + return object; + }; + + /** + * Converts this TxBody to JSON. + * @function toJSON + * @memberof cosmos.tx.v1beta1.TxBody + * @instance + * @returns {Object.} JSON object + */ + TxBody.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TxBody; + })(v1beta1.TxBody || {}); + + v1beta1.AuthInfo = (function(AuthInfo) { + + /** + * Properties of an AuthInfo. + * @memberof cosmos.tx.v1beta1 + * @interface IAuthInfo + * @property {Array.|null} [signerInfos] AuthInfo signerInfos + * @property {cosmos.tx.v1beta1.IFee|null} [fee] AuthInfo fee + */ + + /** + * Constructs a new AuthInfo. + * @memberof cosmos.tx.v1beta1 + * @classdesc Represents an AuthInfo. + * @implements IAuthInfo + * @constructor + * @param {cosmos.tx.v1beta1.IAuthInfo=} [properties] Properties to set + */ + function AuthInfo(properties) { + this.signerInfos = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AuthInfo signerInfos. + * @member {Array.} signerInfos + * @memberof cosmos.tx.v1beta1.AuthInfo + * @instance + */ + AuthInfo.prototype.signerInfos = $util.emptyArray; + + /** + * AuthInfo fee. + * @member {cosmos.tx.v1beta1.IFee|null|undefined} fee + * @memberof cosmos.tx.v1beta1.AuthInfo + * @instance + */ + AuthInfo.prototype.fee = null; + + /** + * Creates a new AuthInfo instance using the specified properties. + * @function create + * @memberof cosmos.tx.v1beta1.AuthInfo + * @static + * @param {cosmos.tx.v1beta1.IAuthInfo=} [properties] Properties to set + * @returns {cosmos.tx.v1beta1.AuthInfo} AuthInfo instance + */ + AuthInfo.create = function create(properties) { + return new AuthInfo(properties); + }; + + /** + * Encodes the specified AuthInfo message. Does not implicitly {@link cosmos.tx.v1beta1.AuthInfo.verify|verify} messages. + * @function encode + * @memberof cosmos.tx.v1beta1.AuthInfo + * @static + * @param {cosmos.tx.v1beta1.IAuthInfo} message AuthInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuthInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.signerInfos != null && message.signerInfos.length) + for (let i = 0; i < message.signerInfos.length; ++i) + $root.cosmos.tx.v1beta1.SignerInfo.encode(message.signerInfos[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.fee != null && Object.hasOwnProperty.call(message, "fee")) + $root.cosmos.tx.v1beta1.Fee.encode(message.fee, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AuthInfo message, length delimited. Does not implicitly {@link cosmos.tx.v1beta1.AuthInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.tx.v1beta1.AuthInfo + * @static + * @param {cosmos.tx.v1beta1.IAuthInfo} message AuthInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuthInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AuthInfo message from the specified reader or buffer. + * @function decode + * @memberof cosmos.tx.v1beta1.AuthInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.tx.v1beta1.AuthInfo} AuthInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuthInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.tx.v1beta1.AuthInfo(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.signerInfos && message.signerInfos.length)) + message.signerInfos = []; + message.signerInfos.push($root.cosmos.tx.v1beta1.SignerInfo.decode(reader, reader.uint32())); + break; + case 2: + message.fee = $root.cosmos.tx.v1beta1.Fee.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AuthInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.tx.v1beta1.AuthInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.tx.v1beta1.AuthInfo} AuthInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuthInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AuthInfo message. + * @function verify + * @memberof cosmos.tx.v1beta1.AuthInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AuthInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.signerInfos != null && message.hasOwnProperty("signerInfos")) { + if (!Array.isArray(message.signerInfos)) + return "signerInfos: array expected"; + for (let i = 0; i < message.signerInfos.length; ++i) { + let error = $root.cosmos.tx.v1beta1.SignerInfo.verify(message.signerInfos[i]); + if (error) + return "signerInfos." + error; + } + } + if (message.fee != null && message.hasOwnProperty("fee")) { + let error = $root.cosmos.tx.v1beta1.Fee.verify(message.fee); + if (error) + return "fee." + error; + } + return null; + }; + + /** + * Creates an AuthInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.tx.v1beta1.AuthInfo + * @static + * @param {Object.} object Plain object + * @returns {cosmos.tx.v1beta1.AuthInfo} AuthInfo + */ + AuthInfo.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.tx.v1beta1.AuthInfo) + return object; + let message = new $root.cosmos.tx.v1beta1.AuthInfo(); + if (object.signerInfos) { + if (!Array.isArray(object.signerInfos)) + throw TypeError(".cosmos.tx.v1beta1.AuthInfo.signerInfos: array expected"); + message.signerInfos = []; + for (let i = 0; i < object.signerInfos.length; ++i) { + if (typeof object.signerInfos[i] !== "object") + throw TypeError(".cosmos.tx.v1beta1.AuthInfo.signerInfos: object expected"); + message.signerInfos[i] = $root.cosmos.tx.v1beta1.SignerInfo.fromObject(object.signerInfos[i]); + } + } + if (object.fee != null) { + if (typeof object.fee !== "object") + throw TypeError(".cosmos.tx.v1beta1.AuthInfo.fee: object expected"); + message.fee = $root.cosmos.tx.v1beta1.Fee.fromObject(object.fee); + } + return message; + }; + + /** + * Creates a plain object from an AuthInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.tx.v1beta1.AuthInfo + * @static + * @param {cosmos.tx.v1beta1.AuthInfo} message AuthInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AuthInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.signerInfos = []; + if (options.defaults) + object.fee = null; + if (message.signerInfos && message.signerInfos.length) { + object.signerInfos = []; + for (let j = 0; j < message.signerInfos.length; ++j) + object.signerInfos[j] = $root.cosmos.tx.v1beta1.SignerInfo.toObject(message.signerInfos[j], options); + } + if (message.fee != null && message.hasOwnProperty("fee")) + object.fee = $root.cosmos.tx.v1beta1.Fee.toObject(message.fee, options); + return object; + }; + + /** + * Converts this AuthInfo to JSON. + * @function toJSON + * @memberof cosmos.tx.v1beta1.AuthInfo + * @instance + * @returns {Object.} JSON object + */ + AuthInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return AuthInfo; + })(v1beta1.AuthInfo || {}); + + v1beta1.SignerInfo = (function(SignerInfo) { + + /** + * Properties of a SignerInfo. + * @memberof cosmos.tx.v1beta1 + * @interface ISignerInfo + * @property {google.protobuf.IAny|null} [publicKey] SignerInfo publicKey + * @property {cosmos.tx.v1beta1.IModeInfo|null} [modeInfo] SignerInfo modeInfo + * @property {number|Long|null} [sequence] SignerInfo sequence + */ + + /** + * Constructs a new SignerInfo. + * @memberof cosmos.tx.v1beta1 + * @classdesc Represents a SignerInfo. + * @implements ISignerInfo + * @constructor + * @param {cosmos.tx.v1beta1.ISignerInfo=} [properties] Properties to set + */ + function SignerInfo(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SignerInfo publicKey. + * @member {google.protobuf.IAny|null|undefined} publicKey + * @memberof cosmos.tx.v1beta1.SignerInfo + * @instance + */ + SignerInfo.prototype.publicKey = null; + + /** + * SignerInfo modeInfo. + * @member {cosmos.tx.v1beta1.IModeInfo|null|undefined} modeInfo + * @memberof cosmos.tx.v1beta1.SignerInfo + * @instance + */ + SignerInfo.prototype.modeInfo = null; + + /** + * SignerInfo sequence. + * @member {number|Long} sequence + * @memberof cosmos.tx.v1beta1.SignerInfo + * @instance + */ + SignerInfo.prototype.sequence = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new SignerInfo instance using the specified properties. + * @function create + * @memberof cosmos.tx.v1beta1.SignerInfo + * @static + * @param {cosmos.tx.v1beta1.ISignerInfo=} [properties] Properties to set + * @returns {cosmos.tx.v1beta1.SignerInfo} SignerInfo instance + */ + SignerInfo.create = function create(properties) { + return new SignerInfo(properties); + }; + + /** + * Encodes the specified SignerInfo message. Does not implicitly {@link cosmos.tx.v1beta1.SignerInfo.verify|verify} messages. + * @function encode + * @memberof cosmos.tx.v1beta1.SignerInfo + * @static + * @param {cosmos.tx.v1beta1.ISignerInfo} message SignerInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SignerInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.publicKey != null && Object.hasOwnProperty.call(message, "publicKey")) + $root.google.protobuf.Any.encode(message.publicKey, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.modeInfo != null && Object.hasOwnProperty.call(message, "modeInfo")) + $root.cosmos.tx.v1beta1.ModeInfo.encode(message.modeInfo, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.sequence != null && Object.hasOwnProperty.call(message, "sequence")) + writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.sequence); + return writer; + }; + + /** + * Encodes the specified SignerInfo message, length delimited. Does not implicitly {@link cosmos.tx.v1beta1.SignerInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.tx.v1beta1.SignerInfo + * @static + * @param {cosmos.tx.v1beta1.ISignerInfo} message SignerInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SignerInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SignerInfo message from the specified reader or buffer. + * @function decode + * @memberof cosmos.tx.v1beta1.SignerInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.tx.v1beta1.SignerInfo} SignerInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SignerInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.tx.v1beta1.SignerInfo(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.publicKey = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + case 2: + message.modeInfo = $root.cosmos.tx.v1beta1.ModeInfo.decode(reader, reader.uint32()); + break; + case 3: + message.sequence = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SignerInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.tx.v1beta1.SignerInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.tx.v1beta1.SignerInfo} SignerInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SignerInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SignerInfo message. + * @function verify + * @memberof cosmos.tx.v1beta1.SignerInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SignerInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.publicKey != null && message.hasOwnProperty("publicKey")) { + let error = $root.google.protobuf.Any.verify(message.publicKey); + if (error) + return "publicKey." + error; + } + if (message.modeInfo != null && message.hasOwnProperty("modeInfo")) { + let error = $root.cosmos.tx.v1beta1.ModeInfo.verify(message.modeInfo); + if (error) + return "modeInfo." + error; + } + if (message.sequence != null && message.hasOwnProperty("sequence")) + if (!$util.isInteger(message.sequence) && !(message.sequence && $util.isInteger(message.sequence.low) && $util.isInteger(message.sequence.high))) + return "sequence: integer|Long expected"; + return null; + }; + + /** + * Creates a SignerInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.tx.v1beta1.SignerInfo + * @static + * @param {Object.} object Plain object + * @returns {cosmos.tx.v1beta1.SignerInfo} SignerInfo + */ + SignerInfo.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.tx.v1beta1.SignerInfo) + return object; + let message = new $root.cosmos.tx.v1beta1.SignerInfo(); + if (object.publicKey != null) { + if (typeof object.publicKey !== "object") + throw TypeError(".cosmos.tx.v1beta1.SignerInfo.publicKey: object expected"); + message.publicKey = $root.google.protobuf.Any.fromObject(object.publicKey); + } + if (object.modeInfo != null) { + if (typeof object.modeInfo !== "object") + throw TypeError(".cosmos.tx.v1beta1.SignerInfo.modeInfo: object expected"); + message.modeInfo = $root.cosmos.tx.v1beta1.ModeInfo.fromObject(object.modeInfo); + } + if (object.sequence != null) + if ($util.Long) + (message.sequence = $util.Long.fromValue(object.sequence)).unsigned = true; + else if (typeof object.sequence === "string") + message.sequence = parseInt(object.sequence, 10); + else if (typeof object.sequence === "number") + message.sequence = object.sequence; + else if (typeof object.sequence === "object") + message.sequence = new $util.LongBits(object.sequence.low >>> 0, object.sequence.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a SignerInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.tx.v1beta1.SignerInfo + * @static + * @param {cosmos.tx.v1beta1.SignerInfo} message SignerInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SignerInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.publicKey = null; + object.modeInfo = null; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.sequence = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.sequence = options.longs === String ? "0" : 0; + } + if (message.publicKey != null && message.hasOwnProperty("publicKey")) + object.publicKey = $root.google.protobuf.Any.toObject(message.publicKey, options); + if (message.modeInfo != null && message.hasOwnProperty("modeInfo")) + object.modeInfo = $root.cosmos.tx.v1beta1.ModeInfo.toObject(message.modeInfo, options); + if (message.sequence != null && message.hasOwnProperty("sequence")) + if (typeof message.sequence === "number") + object.sequence = options.longs === String ? String(message.sequence) : message.sequence; + else + object.sequence = options.longs === String ? $util.Long.prototype.toString.call(message.sequence) : options.longs === Number ? new $util.LongBits(message.sequence.low >>> 0, message.sequence.high >>> 0).toNumber(true) : message.sequence; + return object; + }; + + /** + * Converts this SignerInfo to JSON. + * @function toJSON + * @memberof cosmos.tx.v1beta1.SignerInfo + * @instance + * @returns {Object.} JSON object + */ + SignerInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SignerInfo; + })(v1beta1.SignerInfo || {}); + + v1beta1.ModeInfo = (function(ModeInfo) { + + /** + * Properties of a ModeInfo. + * @memberof cosmos.tx.v1beta1 + * @interface IModeInfo + * @property {cosmos.tx.v1beta1.ModeInfo.ISingle|null} [single] ModeInfo single + * @property {cosmos.tx.v1beta1.ModeInfo.IMulti|null} [multi] ModeInfo multi + */ + + /** + * Constructs a new ModeInfo. + * @memberof cosmos.tx.v1beta1 + * @classdesc Represents a ModeInfo. + * @implements IModeInfo + * @constructor + * @param {cosmos.tx.v1beta1.IModeInfo=} [properties] Properties to set + */ + function ModeInfo(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ModeInfo single. + * @member {cosmos.tx.v1beta1.ModeInfo.ISingle|null|undefined} single + * @memberof cosmos.tx.v1beta1.ModeInfo + * @instance + */ + ModeInfo.prototype.single = null; + + /** + * ModeInfo multi. + * @member {cosmos.tx.v1beta1.ModeInfo.IMulti|null|undefined} multi + * @memberof cosmos.tx.v1beta1.ModeInfo + * @instance + */ + ModeInfo.prototype.multi = null; + + // OneOf field names bound to virtual getters and setters + let $oneOfFields; + + /** + * ModeInfo sum. + * @member {"single"|"multi"|undefined} sum + * @memberof cosmos.tx.v1beta1.ModeInfo + * @instance + */ + Object.defineProperty(ModeInfo.prototype, "sum", { + get: $util.oneOfGetter($oneOfFields = ["single", "multi"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ModeInfo instance using the specified properties. + * @function create + * @memberof cosmos.tx.v1beta1.ModeInfo + * @static + * @param {cosmos.tx.v1beta1.IModeInfo=} [properties] Properties to set + * @returns {cosmos.tx.v1beta1.ModeInfo} ModeInfo instance + */ + ModeInfo.create = function create(properties) { + return new ModeInfo(properties); + }; + + /** + * Encodes the specified ModeInfo message. Does not implicitly {@link cosmos.tx.v1beta1.ModeInfo.verify|verify} messages. + * @function encode + * @memberof cosmos.tx.v1beta1.ModeInfo + * @static + * @param {cosmos.tx.v1beta1.IModeInfo} message ModeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ModeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.single != null && Object.hasOwnProperty.call(message, "single")) + $root.cosmos.tx.v1beta1.ModeInfo.Single.encode(message.single, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.multi != null && Object.hasOwnProperty.call(message, "multi")) + $root.cosmos.tx.v1beta1.ModeInfo.Multi.encode(message.multi, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ModeInfo message, length delimited. Does not implicitly {@link cosmos.tx.v1beta1.ModeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.tx.v1beta1.ModeInfo + * @static + * @param {cosmos.tx.v1beta1.IModeInfo} message ModeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ModeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ModeInfo message from the specified reader or buffer. + * @function decode + * @memberof cosmos.tx.v1beta1.ModeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.tx.v1beta1.ModeInfo} ModeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ModeInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.tx.v1beta1.ModeInfo(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.single = $root.cosmos.tx.v1beta1.ModeInfo.Single.decode(reader, reader.uint32()); + break; + case 2: + message.multi = $root.cosmos.tx.v1beta1.ModeInfo.Multi.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ModeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.tx.v1beta1.ModeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.tx.v1beta1.ModeInfo} ModeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ModeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ModeInfo message. + * @function verify + * @memberof cosmos.tx.v1beta1.ModeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ModeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + let properties = {}; + if (message.single != null && message.hasOwnProperty("single")) { + properties.sum = 1; + { + let error = $root.cosmos.tx.v1beta1.ModeInfo.Single.verify(message.single); + if (error) + return "single." + error; + } + } + if (message.multi != null && message.hasOwnProperty("multi")) { + if (properties.sum === 1) + return "sum: multiple values"; + properties.sum = 1; + { + let error = $root.cosmos.tx.v1beta1.ModeInfo.Multi.verify(message.multi); + if (error) + return "multi." + error; + } + } + return null; + }; + + /** + * Creates a ModeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.tx.v1beta1.ModeInfo + * @static + * @param {Object.} object Plain object + * @returns {cosmos.tx.v1beta1.ModeInfo} ModeInfo + */ + ModeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.tx.v1beta1.ModeInfo) + return object; + let message = new $root.cosmos.tx.v1beta1.ModeInfo(); + if (object.single != null) { + if (typeof object.single !== "object") + throw TypeError(".cosmos.tx.v1beta1.ModeInfo.single: object expected"); + message.single = $root.cosmos.tx.v1beta1.ModeInfo.Single.fromObject(object.single); + } + if (object.multi != null) { + if (typeof object.multi !== "object") + throw TypeError(".cosmos.tx.v1beta1.ModeInfo.multi: object expected"); + message.multi = $root.cosmos.tx.v1beta1.ModeInfo.Multi.fromObject(object.multi); + } + return message; + }; + + /** + * Creates a plain object from a ModeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.tx.v1beta1.ModeInfo + * @static + * @param {cosmos.tx.v1beta1.ModeInfo} message ModeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ModeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (message.single != null && message.hasOwnProperty("single")) { + object.single = $root.cosmos.tx.v1beta1.ModeInfo.Single.toObject(message.single, options); + if (options.oneofs) + object.sum = "single"; + } + if (message.multi != null && message.hasOwnProperty("multi")) { + object.multi = $root.cosmos.tx.v1beta1.ModeInfo.Multi.toObject(message.multi, options); + if (options.oneofs) + object.sum = "multi"; + } + return object; + }; + + /** + * Converts this ModeInfo to JSON. + * @function toJSON + * @memberof cosmos.tx.v1beta1.ModeInfo + * @instance + * @returns {Object.} JSON object + */ + ModeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + ModeInfo.Single = (function(Single) { + + /** + * Properties of a Single. + * @memberof cosmos.tx.v1beta1.ModeInfo + * @interface ISingle + * @property {cosmos.tx.signing.v1beta1.SignMode|null} [mode] Single mode + */ + + /** + * Constructs a new Single. + * @memberof cosmos.tx.v1beta1.ModeInfo + * @classdesc Represents a Single. + * @implements ISingle + * @constructor + * @param {cosmos.tx.v1beta1.ModeInfo.ISingle=} [properties] Properties to set + */ + function Single(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Single mode. + * @member {cosmos.tx.signing.v1beta1.SignMode} mode + * @memberof cosmos.tx.v1beta1.ModeInfo.Single + * @instance + */ + Single.prototype.mode = 0; + + /** + * Creates a new Single instance using the specified properties. + * @function create + * @memberof cosmos.tx.v1beta1.ModeInfo.Single + * @static + * @param {cosmos.tx.v1beta1.ModeInfo.ISingle=} [properties] Properties to set + * @returns {cosmos.tx.v1beta1.ModeInfo.Single} Single instance + */ + Single.create = function create(properties) { + return new Single(properties); + }; + + /** + * Encodes the specified Single message. Does not implicitly {@link cosmos.tx.v1beta1.ModeInfo.Single.verify|verify} messages. + * @function encode + * @memberof cosmos.tx.v1beta1.ModeInfo.Single + * @static + * @param {cosmos.tx.v1beta1.ModeInfo.ISingle} message Single message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Single.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.mode != null && Object.hasOwnProperty.call(message, "mode")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.mode); + return writer; + }; + + /** + * Encodes the specified Single message, length delimited. Does not implicitly {@link cosmos.tx.v1beta1.ModeInfo.Single.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.tx.v1beta1.ModeInfo.Single + * @static + * @param {cosmos.tx.v1beta1.ModeInfo.ISingle} message Single message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Single.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Single message from the specified reader or buffer. + * @function decode + * @memberof cosmos.tx.v1beta1.ModeInfo.Single + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.tx.v1beta1.ModeInfo.Single} Single + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Single.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.tx.v1beta1.ModeInfo.Single(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.mode = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Single message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.tx.v1beta1.ModeInfo.Single + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.tx.v1beta1.ModeInfo.Single} Single + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Single.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Single message. + * @function verify + * @memberof cosmos.tx.v1beta1.ModeInfo.Single + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Single.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.mode != null && message.hasOwnProperty("mode")) + switch (message.mode) { + default: + return "mode: enum value expected"; + case 0: + case 1: + case 2: + case 127: + break; + } + return null; + }; + + /** + * Creates a Single message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.tx.v1beta1.ModeInfo.Single + * @static + * @param {Object.} object Plain object + * @returns {cosmos.tx.v1beta1.ModeInfo.Single} Single + */ + Single.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.tx.v1beta1.ModeInfo.Single) + return object; + let message = new $root.cosmos.tx.v1beta1.ModeInfo.Single(); + switch (object.mode) { + case "SIGN_MODE_UNSPECIFIED": + case 0: + message.mode = 0; + break; + case "SIGN_MODE_DIRECT": + case 1: + message.mode = 1; + break; + case "SIGN_MODE_TEXTUAL": + case 2: + message.mode = 2; + break; + case "SIGN_MODE_LEGACY_AMINO_JSON": + case 127: + message.mode = 127; + break; + } + return message; + }; + + /** + * Creates a plain object from a Single message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.tx.v1beta1.ModeInfo.Single + * @static + * @param {cosmos.tx.v1beta1.ModeInfo.Single} message Single + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Single.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.mode = options.enums === String ? "SIGN_MODE_UNSPECIFIED" : 0; + if (message.mode != null && message.hasOwnProperty("mode")) + object.mode = options.enums === String ? $root.cosmos.tx.signing.v1beta1.SignMode[message.mode] : message.mode; + return object; + }; + + /** + * Converts this Single to JSON. + * @function toJSON + * @memberof cosmos.tx.v1beta1.ModeInfo.Single + * @instance + * @returns {Object.} JSON object + */ + Single.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Single; + })(ModeInfo.Single || {}); + + ModeInfo.Multi = (function(Multi) { + + /** + * Properties of a Multi. + * @memberof cosmos.tx.v1beta1.ModeInfo + * @interface IMulti + * @property {cosmos.crypto.multisig.v1beta1.ICompactBitArray|null} [bitarray] Multi bitarray + * @property {Array.|null} [modeInfos] Multi modeInfos + */ + + /** + * Constructs a new Multi. + * @memberof cosmos.tx.v1beta1.ModeInfo + * @classdesc Represents a Multi. + * @implements IMulti + * @constructor + * @param {cosmos.tx.v1beta1.ModeInfo.IMulti=} [properties] Properties to set + */ + function Multi(properties) { + this.modeInfos = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Multi bitarray. + * @member {cosmos.crypto.multisig.v1beta1.ICompactBitArray|null|undefined} bitarray + * @memberof cosmos.tx.v1beta1.ModeInfo.Multi + * @instance + */ + Multi.prototype.bitarray = null; + + /** + * Multi modeInfos. + * @member {Array.} modeInfos + * @memberof cosmos.tx.v1beta1.ModeInfo.Multi + * @instance + */ + Multi.prototype.modeInfos = $util.emptyArray; + + /** + * Creates a new Multi instance using the specified properties. + * @function create + * @memberof cosmos.tx.v1beta1.ModeInfo.Multi + * @static + * @param {cosmos.tx.v1beta1.ModeInfo.IMulti=} [properties] Properties to set + * @returns {cosmos.tx.v1beta1.ModeInfo.Multi} Multi instance + */ + Multi.create = function create(properties) { + return new Multi(properties); + }; + + /** + * Encodes the specified Multi message. Does not implicitly {@link cosmos.tx.v1beta1.ModeInfo.Multi.verify|verify} messages. + * @function encode + * @memberof cosmos.tx.v1beta1.ModeInfo.Multi + * @static + * @param {cosmos.tx.v1beta1.ModeInfo.IMulti} message Multi message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Multi.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.bitarray != null && Object.hasOwnProperty.call(message, "bitarray")) + $root.cosmos.crypto.multisig.v1beta1.CompactBitArray.encode(message.bitarray, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.modeInfos != null && message.modeInfos.length) + for (let i = 0; i < message.modeInfos.length; ++i) + $root.cosmos.tx.v1beta1.ModeInfo.encode(message.modeInfos[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Multi message, length delimited. Does not implicitly {@link cosmos.tx.v1beta1.ModeInfo.Multi.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.tx.v1beta1.ModeInfo.Multi + * @static + * @param {cosmos.tx.v1beta1.ModeInfo.IMulti} message Multi message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Multi.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Multi message from the specified reader or buffer. + * @function decode + * @memberof cosmos.tx.v1beta1.ModeInfo.Multi + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.tx.v1beta1.ModeInfo.Multi} Multi + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Multi.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.tx.v1beta1.ModeInfo.Multi(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.bitarray = $root.cosmos.crypto.multisig.v1beta1.CompactBitArray.decode(reader, reader.uint32()); + break; + case 2: + if (!(message.modeInfos && message.modeInfos.length)) + message.modeInfos = []; + message.modeInfos.push($root.cosmos.tx.v1beta1.ModeInfo.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Multi message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.tx.v1beta1.ModeInfo.Multi + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.tx.v1beta1.ModeInfo.Multi} Multi + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Multi.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Multi message. + * @function verify + * @memberof cosmos.tx.v1beta1.ModeInfo.Multi + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Multi.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.bitarray != null && message.hasOwnProperty("bitarray")) { + let error = $root.cosmos.crypto.multisig.v1beta1.CompactBitArray.verify(message.bitarray); + if (error) + return "bitarray." + error; + } + if (message.modeInfos != null && message.hasOwnProperty("modeInfos")) { + if (!Array.isArray(message.modeInfos)) + return "modeInfos: array expected"; + for (let i = 0; i < message.modeInfos.length; ++i) { + let error = $root.cosmos.tx.v1beta1.ModeInfo.verify(message.modeInfos[i]); + if (error) + return "modeInfos." + error; + } + } + return null; + }; + + /** + * Creates a Multi message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.tx.v1beta1.ModeInfo.Multi + * @static + * @param {Object.} object Plain object + * @returns {cosmos.tx.v1beta1.ModeInfo.Multi} Multi + */ + Multi.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.tx.v1beta1.ModeInfo.Multi) + return object; + let message = new $root.cosmos.tx.v1beta1.ModeInfo.Multi(); + if (object.bitarray != null) { + if (typeof object.bitarray !== "object") + throw TypeError(".cosmos.tx.v1beta1.ModeInfo.Multi.bitarray: object expected"); + message.bitarray = $root.cosmos.crypto.multisig.v1beta1.CompactBitArray.fromObject(object.bitarray); + } + if (object.modeInfos) { + if (!Array.isArray(object.modeInfos)) + throw TypeError(".cosmos.tx.v1beta1.ModeInfo.Multi.modeInfos: array expected"); + message.modeInfos = []; + for (let i = 0; i < object.modeInfos.length; ++i) { + if (typeof object.modeInfos[i] !== "object") + throw TypeError(".cosmos.tx.v1beta1.ModeInfo.Multi.modeInfos: object expected"); + message.modeInfos[i] = $root.cosmos.tx.v1beta1.ModeInfo.fromObject(object.modeInfos[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Multi message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.tx.v1beta1.ModeInfo.Multi + * @static + * @param {cosmos.tx.v1beta1.ModeInfo.Multi} message Multi + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Multi.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.modeInfos = []; + if (options.defaults) + object.bitarray = null; + if (message.bitarray != null && message.hasOwnProperty("bitarray")) + object.bitarray = $root.cosmos.crypto.multisig.v1beta1.CompactBitArray.toObject(message.bitarray, options); + if (message.modeInfos && message.modeInfos.length) { + object.modeInfos = []; + for (let j = 0; j < message.modeInfos.length; ++j) + object.modeInfos[j] = $root.cosmos.tx.v1beta1.ModeInfo.toObject(message.modeInfos[j], options); + } + return object; + }; + + /** + * Converts this Multi to JSON. + * @function toJSON + * @memberof cosmos.tx.v1beta1.ModeInfo.Multi + * @instance + * @returns {Object.} JSON object + */ + Multi.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Multi; + })(ModeInfo.Multi || {}); + + return ModeInfo; + })(v1beta1.ModeInfo || {}); + + v1beta1.Fee = (function(Fee) { + + /** + * Properties of a Fee. + * @memberof cosmos.tx.v1beta1 + * @interface IFee + * @property {Array.|null} [amount] Fee amount + * @property {number|Long|null} [gasLimit] Fee gasLimit + * @property {string|null} [payer] Fee payer + * @property {string|null} [granter] Fee granter + */ + + /** + * Constructs a new Fee. + * @memberof cosmos.tx.v1beta1 + * @classdesc Represents a Fee. + * @implements IFee + * @constructor + * @param {cosmos.tx.v1beta1.IFee=} [properties] Properties to set + */ + function Fee(properties) { + this.amount = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Fee amount. + * @member {Array.} amount + * @memberof cosmos.tx.v1beta1.Fee + * @instance + */ + Fee.prototype.amount = $util.emptyArray; + + /** + * Fee gasLimit. + * @member {number|Long} gasLimit + * @memberof cosmos.tx.v1beta1.Fee + * @instance + */ + Fee.prototype.gasLimit = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Fee payer. + * @member {string} payer + * @memberof cosmos.tx.v1beta1.Fee + * @instance + */ + Fee.prototype.payer = ""; + + /** + * Fee granter. + * @member {string} granter + * @memberof cosmos.tx.v1beta1.Fee + * @instance + */ + Fee.prototype.granter = ""; + + /** + * Creates a new Fee instance using the specified properties. + * @function create + * @memberof cosmos.tx.v1beta1.Fee + * @static + * @param {cosmos.tx.v1beta1.IFee=} [properties] Properties to set + * @returns {cosmos.tx.v1beta1.Fee} Fee instance + */ + Fee.create = function create(properties) { + return new Fee(properties); + }; + + /** + * Encodes the specified Fee message. Does not implicitly {@link cosmos.tx.v1beta1.Fee.verify|verify} messages. + * @function encode + * @memberof cosmos.tx.v1beta1.Fee + * @static + * @param {cosmos.tx.v1beta1.IFee} message Fee message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Fee.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.amount != null && message.amount.length) + for (let i = 0; i < message.amount.length; ++i) + $root.cosmos.base.v1beta1.Coin.encode(message.amount[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.gasLimit != null && Object.hasOwnProperty.call(message, "gasLimit")) + writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.gasLimit); + if (message.payer != null && Object.hasOwnProperty.call(message, "payer")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.payer); + if (message.granter != null && Object.hasOwnProperty.call(message, "granter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.granter); + return writer; + }; + + /** + * Encodes the specified Fee message, length delimited. Does not implicitly {@link cosmos.tx.v1beta1.Fee.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.tx.v1beta1.Fee + * @static + * @param {cosmos.tx.v1beta1.IFee} message Fee message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Fee.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Fee message from the specified reader or buffer. + * @function decode + * @memberof cosmos.tx.v1beta1.Fee + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.tx.v1beta1.Fee} Fee + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Fee.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.tx.v1beta1.Fee(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.amount && message.amount.length)) + message.amount = []; + message.amount.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); + break; + case 2: + message.gasLimit = reader.uint64(); + break; + case 3: + message.payer = reader.string(); + break; + case 4: + message.granter = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Fee message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.tx.v1beta1.Fee + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.tx.v1beta1.Fee} Fee + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Fee.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Fee message. + * @function verify + * @memberof cosmos.tx.v1beta1.Fee + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Fee.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.amount != null && message.hasOwnProperty("amount")) { + if (!Array.isArray(message.amount)) + return "amount: array expected"; + for (let i = 0; i < message.amount.length; ++i) { + let error = $root.cosmos.base.v1beta1.Coin.verify(message.amount[i]); + if (error) + return "amount." + error; + } + } + if (message.gasLimit != null && message.hasOwnProperty("gasLimit")) + if (!$util.isInteger(message.gasLimit) && !(message.gasLimit && $util.isInteger(message.gasLimit.low) && $util.isInteger(message.gasLimit.high))) + return "gasLimit: integer|Long expected"; + if (message.payer != null && message.hasOwnProperty("payer")) + if (!$util.isString(message.payer)) + return "payer: string expected"; + if (message.granter != null && message.hasOwnProperty("granter")) + if (!$util.isString(message.granter)) + return "granter: string expected"; + return null; + }; + + /** + * Creates a Fee message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.tx.v1beta1.Fee + * @static + * @param {Object.} object Plain object + * @returns {cosmos.tx.v1beta1.Fee} Fee + */ + Fee.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.tx.v1beta1.Fee) + return object; + let message = new $root.cosmos.tx.v1beta1.Fee(); + if (object.amount) { + if (!Array.isArray(object.amount)) + throw TypeError(".cosmos.tx.v1beta1.Fee.amount: array expected"); + message.amount = []; + for (let i = 0; i < object.amount.length; ++i) { + if (typeof object.amount[i] !== "object") + throw TypeError(".cosmos.tx.v1beta1.Fee.amount: object expected"); + message.amount[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.amount[i]); + } + } + if (object.gasLimit != null) + if ($util.Long) + (message.gasLimit = $util.Long.fromValue(object.gasLimit)).unsigned = true; + else if (typeof object.gasLimit === "string") + message.gasLimit = parseInt(object.gasLimit, 10); + else if (typeof object.gasLimit === "number") + message.gasLimit = object.gasLimit; + else if (typeof object.gasLimit === "object") + message.gasLimit = new $util.LongBits(object.gasLimit.low >>> 0, object.gasLimit.high >>> 0).toNumber(true); + if (object.payer != null) + message.payer = String(object.payer); + if (object.granter != null) + message.granter = String(object.granter); + return message; + }; + + /** + * Creates a plain object from a Fee message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.tx.v1beta1.Fee + * @static + * @param {cosmos.tx.v1beta1.Fee} message Fee + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Fee.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.amount = []; + if (options.defaults) { + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.gasLimit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.gasLimit = options.longs === String ? "0" : 0; + object.payer = ""; + object.granter = ""; + } + if (message.amount && message.amount.length) { + object.amount = []; + for (let j = 0; j < message.amount.length; ++j) + object.amount[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.amount[j], options); + } + if (message.gasLimit != null && message.hasOwnProperty("gasLimit")) + if (typeof message.gasLimit === "number") + object.gasLimit = options.longs === String ? String(message.gasLimit) : message.gasLimit; + else + object.gasLimit = options.longs === String ? $util.Long.prototype.toString.call(message.gasLimit) : options.longs === Number ? new $util.LongBits(message.gasLimit.low >>> 0, message.gasLimit.high >>> 0).toNumber(true) : message.gasLimit; + if (message.payer != null && message.hasOwnProperty("payer")) + object.payer = message.payer; + if (message.granter != null && message.hasOwnProperty("granter")) + object.granter = message.granter; + return object; + }; + + /** + * Converts this Fee to JSON. + * @function toJSON + * @memberof cosmos.tx.v1beta1.Fee + * @instance + * @returns {Object.} JSON object + */ + Fee.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Fee; + })(v1beta1.Fee || {}); + + return v1beta1; + })(tx.v1beta1 || {}); + + return tx; + })(cosmos.tx || {}); + + /** + * Namespace upgrade. + * @memberof cosmos + * @namespace + */ + + cosmos.upgrade = (function(upgrade) { + + /** + * Namespace v1beta1. + * @memberof cosmos.upgrade + * @namespace + */ + + upgrade.v1beta1 = (function(v1beta1) { + + v1beta1.Query = (function(Query) { + + /** + * Constructs a new Query service. + * @memberof cosmos.upgrade.v1beta1 + * @classdesc Represents a Query + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Query(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Query.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Query; + + /** + * Creates new Query service using the specified rpc implementation. + * @function create + * @memberof cosmos.upgrade.v1beta1.Query + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Query} RPC service. Useful where requests and/or responses are streamed. + */ + Query.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link cosmos.upgrade.v1beta1.Query#currentPlan}. + * @memberof cosmos.upgrade.v1beta1.Query + * @typedef CurrentPlanCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.upgrade.v1beta1.IQueryCurrentPlanResponse} [response] QueryCurrentPlanResponse + */ + + /** + * Calls CurrentPlan. + * @function currentPlan + * @memberof cosmos.upgrade.v1beta1.Query + * @instance + * @param {cosmos.upgrade.v1beta1.IQueryCurrentPlanRequest} request QueryCurrentPlanRequest message or plain object + * @param {cosmos.upgrade.v1beta1.Query.CurrentPlanCallback} callback Node-style callback called with the error, if any, and QueryCurrentPlanResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.currentPlan = function currentPlan(request, callback) { + return this.rpcCall(currentPlan, $root.cosmos.upgrade.v1beta1.QueryCurrentPlanRequest, $root.cosmos.upgrade.v1beta1.QueryCurrentPlanResponse, request, callback); + }, "name", { value: "CurrentPlan" }); + + /** + * Calls CurrentPlan. + * @function currentPlan + * @memberof cosmos.upgrade.v1beta1.Query + * @instance + * @param {cosmos.upgrade.v1beta1.IQueryCurrentPlanRequest} request QueryCurrentPlanRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link cosmos.upgrade.v1beta1.Query#appliedPlan}. + * @memberof cosmos.upgrade.v1beta1.Query + * @typedef AppliedPlanCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.upgrade.v1beta1.IQueryAppliedPlanResponse} [response] QueryAppliedPlanResponse + */ + + /** + * Calls AppliedPlan. + * @function appliedPlan + * @memberof cosmos.upgrade.v1beta1.Query + * @instance + * @param {cosmos.upgrade.v1beta1.IQueryAppliedPlanRequest} request QueryAppliedPlanRequest message or plain object + * @param {cosmos.upgrade.v1beta1.Query.AppliedPlanCallback} callback Node-style callback called with the error, if any, and QueryAppliedPlanResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.appliedPlan = function appliedPlan(request, callback) { + return this.rpcCall(appliedPlan, $root.cosmos.upgrade.v1beta1.QueryAppliedPlanRequest, $root.cosmos.upgrade.v1beta1.QueryAppliedPlanResponse, request, callback); + }, "name", { value: "AppliedPlan" }); + + /** + * Calls AppliedPlan. + * @function appliedPlan + * @memberof cosmos.upgrade.v1beta1.Query + * @instance + * @param {cosmos.upgrade.v1beta1.IQueryAppliedPlanRequest} request QueryAppliedPlanRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link cosmos.upgrade.v1beta1.Query#upgradedConsensusState}. + * @memberof cosmos.upgrade.v1beta1.Query + * @typedef UpgradedConsensusStateCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.upgrade.v1beta1.IQueryUpgradedConsensusStateResponse} [response] QueryUpgradedConsensusStateResponse + */ + + /** + * Calls UpgradedConsensusState. + * @function upgradedConsensusState + * @memberof cosmos.upgrade.v1beta1.Query + * @instance + * @param {cosmos.upgrade.v1beta1.IQueryUpgradedConsensusStateRequest} request QueryUpgradedConsensusStateRequest message or plain object + * @param {cosmos.upgrade.v1beta1.Query.UpgradedConsensusStateCallback} callback Node-style callback called with the error, if any, and QueryUpgradedConsensusStateResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.upgradedConsensusState = function upgradedConsensusState(request, callback) { + return this.rpcCall(upgradedConsensusState, $root.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest, $root.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse, request, callback); + }, "name", { value: "UpgradedConsensusState" }); + + /** + * Calls UpgradedConsensusState. + * @function upgradedConsensusState + * @memberof cosmos.upgrade.v1beta1.Query + * @instance + * @param {cosmos.upgrade.v1beta1.IQueryUpgradedConsensusStateRequest} request QueryUpgradedConsensusStateRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Query; + })(v1beta1.Query || {}); + + v1beta1.QueryCurrentPlanRequest = (function(QueryCurrentPlanRequest) { + + /** + * Properties of a QueryCurrentPlanRequest. + * @memberof cosmos.upgrade.v1beta1 + * @interface IQueryCurrentPlanRequest + */ + + /** + * Constructs a new QueryCurrentPlanRequest. + * @memberof cosmos.upgrade.v1beta1 + * @classdesc Represents a QueryCurrentPlanRequest. + * @implements IQueryCurrentPlanRequest + * @constructor + * @param {cosmos.upgrade.v1beta1.IQueryCurrentPlanRequest=} [properties] Properties to set + */ + function QueryCurrentPlanRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new QueryCurrentPlanRequest instance using the specified properties. + * @function create + * @memberof cosmos.upgrade.v1beta1.QueryCurrentPlanRequest + * @static + * @param {cosmos.upgrade.v1beta1.IQueryCurrentPlanRequest=} [properties] Properties to set + * @returns {cosmos.upgrade.v1beta1.QueryCurrentPlanRequest} QueryCurrentPlanRequest instance + */ + QueryCurrentPlanRequest.create = function create(properties) { + return new QueryCurrentPlanRequest(properties); + }; + + /** + * Encodes the specified QueryCurrentPlanRequest message. Does not implicitly {@link cosmos.upgrade.v1beta1.QueryCurrentPlanRequest.verify|verify} messages. + * @function encode + * @memberof cosmos.upgrade.v1beta1.QueryCurrentPlanRequest + * @static + * @param {cosmos.upgrade.v1beta1.IQueryCurrentPlanRequest} message QueryCurrentPlanRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryCurrentPlanRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified QueryCurrentPlanRequest message, length delimited. Does not implicitly {@link cosmos.upgrade.v1beta1.QueryCurrentPlanRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.upgrade.v1beta1.QueryCurrentPlanRequest + * @static + * @param {cosmos.upgrade.v1beta1.IQueryCurrentPlanRequest} message QueryCurrentPlanRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryCurrentPlanRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryCurrentPlanRequest message from the specified reader or buffer. + * @function decode + * @memberof cosmos.upgrade.v1beta1.QueryCurrentPlanRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.upgrade.v1beta1.QueryCurrentPlanRequest} QueryCurrentPlanRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryCurrentPlanRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.upgrade.v1beta1.QueryCurrentPlanRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryCurrentPlanRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.upgrade.v1beta1.QueryCurrentPlanRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.upgrade.v1beta1.QueryCurrentPlanRequest} QueryCurrentPlanRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryCurrentPlanRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryCurrentPlanRequest message. + * @function verify + * @memberof cosmos.upgrade.v1beta1.QueryCurrentPlanRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryCurrentPlanRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a QueryCurrentPlanRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.upgrade.v1beta1.QueryCurrentPlanRequest + * @static + * @param {Object.} object Plain object + * @returns {cosmos.upgrade.v1beta1.QueryCurrentPlanRequest} QueryCurrentPlanRequest + */ + QueryCurrentPlanRequest.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.upgrade.v1beta1.QueryCurrentPlanRequest) + return object; + return new $root.cosmos.upgrade.v1beta1.QueryCurrentPlanRequest(); + }; + + /** + * Creates a plain object from a QueryCurrentPlanRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.upgrade.v1beta1.QueryCurrentPlanRequest + * @static + * @param {cosmos.upgrade.v1beta1.QueryCurrentPlanRequest} message QueryCurrentPlanRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryCurrentPlanRequest.toObject = function toObject() { + return {}; + }; + + /** + * Converts this QueryCurrentPlanRequest to JSON. + * @function toJSON + * @memberof cosmos.upgrade.v1beta1.QueryCurrentPlanRequest + * @instance + * @returns {Object.} JSON object + */ + QueryCurrentPlanRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryCurrentPlanRequest; + })(v1beta1.QueryCurrentPlanRequest || {}); + + v1beta1.QueryCurrentPlanResponse = (function(QueryCurrentPlanResponse) { + + /** + * Properties of a QueryCurrentPlanResponse. + * @memberof cosmos.upgrade.v1beta1 + * @interface IQueryCurrentPlanResponse + * @property {cosmos.upgrade.v1beta1.IPlan|null} [plan] QueryCurrentPlanResponse plan + */ + + /** + * Constructs a new QueryCurrentPlanResponse. + * @memberof cosmos.upgrade.v1beta1 + * @classdesc Represents a QueryCurrentPlanResponse. + * @implements IQueryCurrentPlanResponse + * @constructor + * @param {cosmos.upgrade.v1beta1.IQueryCurrentPlanResponse=} [properties] Properties to set + */ + function QueryCurrentPlanResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryCurrentPlanResponse plan. + * @member {cosmos.upgrade.v1beta1.IPlan|null|undefined} plan + * @memberof cosmos.upgrade.v1beta1.QueryCurrentPlanResponse + * @instance + */ + QueryCurrentPlanResponse.prototype.plan = null; + + /** + * Creates a new QueryCurrentPlanResponse instance using the specified properties. + * @function create + * @memberof cosmos.upgrade.v1beta1.QueryCurrentPlanResponse + * @static + * @param {cosmos.upgrade.v1beta1.IQueryCurrentPlanResponse=} [properties] Properties to set + * @returns {cosmos.upgrade.v1beta1.QueryCurrentPlanResponse} QueryCurrentPlanResponse instance + */ + QueryCurrentPlanResponse.create = function create(properties) { + return new QueryCurrentPlanResponse(properties); + }; + + /** + * Encodes the specified QueryCurrentPlanResponse message. Does not implicitly {@link cosmos.upgrade.v1beta1.QueryCurrentPlanResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.upgrade.v1beta1.QueryCurrentPlanResponse + * @static + * @param {cosmos.upgrade.v1beta1.IQueryCurrentPlanResponse} message QueryCurrentPlanResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryCurrentPlanResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.plan != null && Object.hasOwnProperty.call(message, "plan")) + $root.cosmos.upgrade.v1beta1.Plan.encode(message.plan, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryCurrentPlanResponse message, length delimited. Does not implicitly {@link cosmos.upgrade.v1beta1.QueryCurrentPlanResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.upgrade.v1beta1.QueryCurrentPlanResponse + * @static + * @param {cosmos.upgrade.v1beta1.IQueryCurrentPlanResponse} message QueryCurrentPlanResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryCurrentPlanResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryCurrentPlanResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.upgrade.v1beta1.QueryCurrentPlanResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.upgrade.v1beta1.QueryCurrentPlanResponse} QueryCurrentPlanResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryCurrentPlanResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.upgrade.v1beta1.QueryCurrentPlanResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.plan = $root.cosmos.upgrade.v1beta1.Plan.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryCurrentPlanResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.upgrade.v1beta1.QueryCurrentPlanResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.upgrade.v1beta1.QueryCurrentPlanResponse} QueryCurrentPlanResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryCurrentPlanResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryCurrentPlanResponse message. + * @function verify + * @memberof cosmos.upgrade.v1beta1.QueryCurrentPlanResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryCurrentPlanResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.plan != null && message.hasOwnProperty("plan")) { + let error = $root.cosmos.upgrade.v1beta1.Plan.verify(message.plan); + if (error) + return "plan." + error; + } + return null; + }; + + /** + * Creates a QueryCurrentPlanResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.upgrade.v1beta1.QueryCurrentPlanResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.upgrade.v1beta1.QueryCurrentPlanResponse} QueryCurrentPlanResponse + */ + QueryCurrentPlanResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.upgrade.v1beta1.QueryCurrentPlanResponse) + return object; + let message = new $root.cosmos.upgrade.v1beta1.QueryCurrentPlanResponse(); + if (object.plan != null) { + if (typeof object.plan !== "object") + throw TypeError(".cosmos.upgrade.v1beta1.QueryCurrentPlanResponse.plan: object expected"); + message.plan = $root.cosmos.upgrade.v1beta1.Plan.fromObject(object.plan); + } + return message; + }; + + /** + * Creates a plain object from a QueryCurrentPlanResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.upgrade.v1beta1.QueryCurrentPlanResponse + * @static + * @param {cosmos.upgrade.v1beta1.QueryCurrentPlanResponse} message QueryCurrentPlanResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryCurrentPlanResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.plan = null; + if (message.plan != null && message.hasOwnProperty("plan")) + object.plan = $root.cosmos.upgrade.v1beta1.Plan.toObject(message.plan, options); + return object; + }; + + /** + * Converts this QueryCurrentPlanResponse to JSON. + * @function toJSON + * @memberof cosmos.upgrade.v1beta1.QueryCurrentPlanResponse + * @instance + * @returns {Object.} JSON object + */ + QueryCurrentPlanResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryCurrentPlanResponse; + })(v1beta1.QueryCurrentPlanResponse || {}); + + v1beta1.QueryAppliedPlanRequest = (function(QueryAppliedPlanRequest) { + + /** + * Properties of a QueryAppliedPlanRequest. + * @memberof cosmos.upgrade.v1beta1 + * @interface IQueryAppliedPlanRequest + * @property {string|null} [name] QueryAppliedPlanRequest name + */ + + /** + * Constructs a new QueryAppliedPlanRequest. + * @memberof cosmos.upgrade.v1beta1 + * @classdesc Represents a QueryAppliedPlanRequest. + * @implements IQueryAppliedPlanRequest + * @constructor + * @param {cosmos.upgrade.v1beta1.IQueryAppliedPlanRequest=} [properties] Properties to set + */ + function QueryAppliedPlanRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryAppliedPlanRequest name. + * @member {string} name + * @memberof cosmos.upgrade.v1beta1.QueryAppliedPlanRequest + * @instance + */ + QueryAppliedPlanRequest.prototype.name = ""; + + /** + * Creates a new QueryAppliedPlanRequest instance using the specified properties. + * @function create + * @memberof cosmos.upgrade.v1beta1.QueryAppliedPlanRequest + * @static + * @param {cosmos.upgrade.v1beta1.IQueryAppliedPlanRequest=} [properties] Properties to set + * @returns {cosmos.upgrade.v1beta1.QueryAppliedPlanRequest} QueryAppliedPlanRequest instance + */ + QueryAppliedPlanRequest.create = function create(properties) { + return new QueryAppliedPlanRequest(properties); + }; + + /** + * Encodes the specified QueryAppliedPlanRequest message. Does not implicitly {@link cosmos.upgrade.v1beta1.QueryAppliedPlanRequest.verify|verify} messages. + * @function encode + * @memberof cosmos.upgrade.v1beta1.QueryAppliedPlanRequest + * @static + * @param {cosmos.upgrade.v1beta1.IQueryAppliedPlanRequest} message QueryAppliedPlanRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryAppliedPlanRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified QueryAppliedPlanRequest message, length delimited. Does not implicitly {@link cosmos.upgrade.v1beta1.QueryAppliedPlanRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.upgrade.v1beta1.QueryAppliedPlanRequest + * @static + * @param {cosmos.upgrade.v1beta1.IQueryAppliedPlanRequest} message QueryAppliedPlanRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryAppliedPlanRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryAppliedPlanRequest message from the specified reader or buffer. + * @function decode + * @memberof cosmos.upgrade.v1beta1.QueryAppliedPlanRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.upgrade.v1beta1.QueryAppliedPlanRequest} QueryAppliedPlanRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryAppliedPlanRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.upgrade.v1beta1.QueryAppliedPlanRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryAppliedPlanRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.upgrade.v1beta1.QueryAppliedPlanRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.upgrade.v1beta1.QueryAppliedPlanRequest} QueryAppliedPlanRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryAppliedPlanRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryAppliedPlanRequest message. + * @function verify + * @memberof cosmos.upgrade.v1beta1.QueryAppliedPlanRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryAppliedPlanRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a QueryAppliedPlanRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.upgrade.v1beta1.QueryAppliedPlanRequest + * @static + * @param {Object.} object Plain object + * @returns {cosmos.upgrade.v1beta1.QueryAppliedPlanRequest} QueryAppliedPlanRequest + */ + QueryAppliedPlanRequest.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.upgrade.v1beta1.QueryAppliedPlanRequest) + return object; + let message = new $root.cosmos.upgrade.v1beta1.QueryAppliedPlanRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a QueryAppliedPlanRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.upgrade.v1beta1.QueryAppliedPlanRequest + * @static + * @param {cosmos.upgrade.v1beta1.QueryAppliedPlanRequest} message QueryAppliedPlanRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryAppliedPlanRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this QueryAppliedPlanRequest to JSON. + * @function toJSON + * @memberof cosmos.upgrade.v1beta1.QueryAppliedPlanRequest + * @instance + * @returns {Object.} JSON object + */ + QueryAppliedPlanRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryAppliedPlanRequest; + })(v1beta1.QueryAppliedPlanRequest || {}); + + v1beta1.QueryAppliedPlanResponse = (function(QueryAppliedPlanResponse) { + + /** + * Properties of a QueryAppliedPlanResponse. + * @memberof cosmos.upgrade.v1beta1 + * @interface IQueryAppliedPlanResponse + * @property {number|Long|null} [height] QueryAppliedPlanResponse height + */ + + /** + * Constructs a new QueryAppliedPlanResponse. + * @memberof cosmos.upgrade.v1beta1 + * @classdesc Represents a QueryAppliedPlanResponse. + * @implements IQueryAppliedPlanResponse + * @constructor + * @param {cosmos.upgrade.v1beta1.IQueryAppliedPlanResponse=} [properties] Properties to set + */ + function QueryAppliedPlanResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryAppliedPlanResponse height. + * @member {number|Long} height + * @memberof cosmos.upgrade.v1beta1.QueryAppliedPlanResponse + * @instance + */ + QueryAppliedPlanResponse.prototype.height = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new QueryAppliedPlanResponse instance using the specified properties. + * @function create + * @memberof cosmos.upgrade.v1beta1.QueryAppliedPlanResponse + * @static + * @param {cosmos.upgrade.v1beta1.IQueryAppliedPlanResponse=} [properties] Properties to set + * @returns {cosmos.upgrade.v1beta1.QueryAppliedPlanResponse} QueryAppliedPlanResponse instance + */ + QueryAppliedPlanResponse.create = function create(properties) { + return new QueryAppliedPlanResponse(properties); + }; + + /** + * Encodes the specified QueryAppliedPlanResponse message. Does not implicitly {@link cosmos.upgrade.v1beta1.QueryAppliedPlanResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.upgrade.v1beta1.QueryAppliedPlanResponse + * @static + * @param {cosmos.upgrade.v1beta1.IQueryAppliedPlanResponse} message QueryAppliedPlanResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryAppliedPlanResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.height != null && Object.hasOwnProperty.call(message, "height")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.height); + return writer; + }; + + /** + * Encodes the specified QueryAppliedPlanResponse message, length delimited. Does not implicitly {@link cosmos.upgrade.v1beta1.QueryAppliedPlanResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.upgrade.v1beta1.QueryAppliedPlanResponse + * @static + * @param {cosmos.upgrade.v1beta1.IQueryAppliedPlanResponse} message QueryAppliedPlanResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryAppliedPlanResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryAppliedPlanResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.upgrade.v1beta1.QueryAppliedPlanResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.upgrade.v1beta1.QueryAppliedPlanResponse} QueryAppliedPlanResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryAppliedPlanResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.upgrade.v1beta1.QueryAppliedPlanResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.height = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryAppliedPlanResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.upgrade.v1beta1.QueryAppliedPlanResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.upgrade.v1beta1.QueryAppliedPlanResponse} QueryAppliedPlanResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryAppliedPlanResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryAppliedPlanResponse message. + * @function verify + * @memberof cosmos.upgrade.v1beta1.QueryAppliedPlanResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryAppliedPlanResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.height != null && message.hasOwnProperty("height")) + if (!$util.isInteger(message.height) && !(message.height && $util.isInteger(message.height.low) && $util.isInteger(message.height.high))) + return "height: integer|Long expected"; + return null; + }; + + /** + * Creates a QueryAppliedPlanResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.upgrade.v1beta1.QueryAppliedPlanResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.upgrade.v1beta1.QueryAppliedPlanResponse} QueryAppliedPlanResponse + */ + QueryAppliedPlanResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.upgrade.v1beta1.QueryAppliedPlanResponse) + return object; + let message = new $root.cosmos.upgrade.v1beta1.QueryAppliedPlanResponse(); + if (object.height != null) + if ($util.Long) + (message.height = $util.Long.fromValue(object.height)).unsigned = false; + else if (typeof object.height === "string") + message.height = parseInt(object.height, 10); + else if (typeof object.height === "number") + message.height = object.height; + else if (typeof object.height === "object") + message.height = new $util.LongBits(object.height.low >>> 0, object.height.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a QueryAppliedPlanResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.upgrade.v1beta1.QueryAppliedPlanResponse + * @static + * @param {cosmos.upgrade.v1beta1.QueryAppliedPlanResponse} message QueryAppliedPlanResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryAppliedPlanResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.height = options.longs === String ? "0" : 0; + if (message.height != null && message.hasOwnProperty("height")) + if (typeof message.height === "number") + object.height = options.longs === String ? String(message.height) : message.height; + else + object.height = options.longs === String ? $util.Long.prototype.toString.call(message.height) : options.longs === Number ? new $util.LongBits(message.height.low >>> 0, message.height.high >>> 0).toNumber() : message.height; + return object; + }; + + /** + * Converts this QueryAppliedPlanResponse to JSON. + * @function toJSON + * @memberof cosmos.upgrade.v1beta1.QueryAppliedPlanResponse + * @instance + * @returns {Object.} JSON object + */ + QueryAppliedPlanResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryAppliedPlanResponse; + })(v1beta1.QueryAppliedPlanResponse || {}); + + v1beta1.QueryUpgradedConsensusStateRequest = (function(QueryUpgradedConsensusStateRequest) { + + /** + * Properties of a QueryUpgradedConsensusStateRequest. + * @memberof cosmos.upgrade.v1beta1 + * @interface IQueryUpgradedConsensusStateRequest + * @property {number|Long|null} [lastHeight] QueryUpgradedConsensusStateRequest lastHeight + */ + + /** + * Constructs a new QueryUpgradedConsensusStateRequest. + * @memberof cosmos.upgrade.v1beta1 + * @classdesc Represents a QueryUpgradedConsensusStateRequest. + * @implements IQueryUpgradedConsensusStateRequest + * @constructor + * @param {cosmos.upgrade.v1beta1.IQueryUpgradedConsensusStateRequest=} [properties] Properties to set + */ + function QueryUpgradedConsensusStateRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryUpgradedConsensusStateRequest lastHeight. + * @member {number|Long} lastHeight + * @memberof cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest + * @instance + */ + QueryUpgradedConsensusStateRequest.prototype.lastHeight = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new QueryUpgradedConsensusStateRequest instance using the specified properties. + * @function create + * @memberof cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest + * @static + * @param {cosmos.upgrade.v1beta1.IQueryUpgradedConsensusStateRequest=} [properties] Properties to set + * @returns {cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest} QueryUpgradedConsensusStateRequest instance + */ + QueryUpgradedConsensusStateRequest.create = function create(properties) { + return new QueryUpgradedConsensusStateRequest(properties); + }; + + /** + * Encodes the specified QueryUpgradedConsensusStateRequest message. Does not implicitly {@link cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest.verify|verify} messages. + * @function encode + * @memberof cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest + * @static + * @param {cosmos.upgrade.v1beta1.IQueryUpgradedConsensusStateRequest} message QueryUpgradedConsensusStateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryUpgradedConsensusStateRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.lastHeight != null && Object.hasOwnProperty.call(message, "lastHeight")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.lastHeight); + return writer; + }; + + /** + * Encodes the specified QueryUpgradedConsensusStateRequest message, length delimited. Does not implicitly {@link cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest + * @static + * @param {cosmos.upgrade.v1beta1.IQueryUpgradedConsensusStateRequest} message QueryUpgradedConsensusStateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryUpgradedConsensusStateRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryUpgradedConsensusStateRequest message from the specified reader or buffer. + * @function decode + * @memberof cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest} QueryUpgradedConsensusStateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryUpgradedConsensusStateRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.lastHeight = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryUpgradedConsensusStateRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest} QueryUpgradedConsensusStateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryUpgradedConsensusStateRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryUpgradedConsensusStateRequest message. + * @function verify + * @memberof cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryUpgradedConsensusStateRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.lastHeight != null && message.hasOwnProperty("lastHeight")) + if (!$util.isInteger(message.lastHeight) && !(message.lastHeight && $util.isInteger(message.lastHeight.low) && $util.isInteger(message.lastHeight.high))) + return "lastHeight: integer|Long expected"; + return null; + }; + + /** + * Creates a QueryUpgradedConsensusStateRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest + * @static + * @param {Object.} object Plain object + * @returns {cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest} QueryUpgradedConsensusStateRequest + */ + QueryUpgradedConsensusStateRequest.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest) + return object; + let message = new $root.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest(); + if (object.lastHeight != null) + if ($util.Long) + (message.lastHeight = $util.Long.fromValue(object.lastHeight)).unsigned = false; + else if (typeof object.lastHeight === "string") + message.lastHeight = parseInt(object.lastHeight, 10); + else if (typeof object.lastHeight === "number") + message.lastHeight = object.lastHeight; + else if (typeof object.lastHeight === "object") + message.lastHeight = new $util.LongBits(object.lastHeight.low >>> 0, object.lastHeight.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a QueryUpgradedConsensusStateRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest + * @static + * @param {cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest} message QueryUpgradedConsensusStateRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryUpgradedConsensusStateRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.lastHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.lastHeight = options.longs === String ? "0" : 0; + if (message.lastHeight != null && message.hasOwnProperty("lastHeight")) + if (typeof message.lastHeight === "number") + object.lastHeight = options.longs === String ? String(message.lastHeight) : message.lastHeight; + else + object.lastHeight = options.longs === String ? $util.Long.prototype.toString.call(message.lastHeight) : options.longs === Number ? new $util.LongBits(message.lastHeight.low >>> 0, message.lastHeight.high >>> 0).toNumber() : message.lastHeight; + return object; + }; + + /** + * Converts this QueryUpgradedConsensusStateRequest to JSON. + * @function toJSON + * @memberof cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest + * @instance + * @returns {Object.} JSON object + */ + QueryUpgradedConsensusStateRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryUpgradedConsensusStateRequest; + })(v1beta1.QueryUpgradedConsensusStateRequest || {}); + + v1beta1.QueryUpgradedConsensusStateResponse = (function(QueryUpgradedConsensusStateResponse) { + + /** + * Properties of a QueryUpgradedConsensusStateResponse. + * @memberof cosmos.upgrade.v1beta1 + * @interface IQueryUpgradedConsensusStateResponse + * @property {google.protobuf.IAny|null} [upgradedConsensusState] QueryUpgradedConsensusStateResponse upgradedConsensusState + */ + + /** + * Constructs a new QueryUpgradedConsensusStateResponse. + * @memberof cosmos.upgrade.v1beta1 + * @classdesc Represents a QueryUpgradedConsensusStateResponse. + * @implements IQueryUpgradedConsensusStateResponse + * @constructor + * @param {cosmos.upgrade.v1beta1.IQueryUpgradedConsensusStateResponse=} [properties] Properties to set + */ + function QueryUpgradedConsensusStateResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryUpgradedConsensusStateResponse upgradedConsensusState. + * @member {google.protobuf.IAny|null|undefined} upgradedConsensusState + * @memberof cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse + * @instance + */ + QueryUpgradedConsensusStateResponse.prototype.upgradedConsensusState = null; + + /** + * Creates a new QueryUpgradedConsensusStateResponse instance using the specified properties. + * @function create + * @memberof cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse + * @static + * @param {cosmos.upgrade.v1beta1.IQueryUpgradedConsensusStateResponse=} [properties] Properties to set + * @returns {cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse} QueryUpgradedConsensusStateResponse instance + */ + QueryUpgradedConsensusStateResponse.create = function create(properties) { + return new QueryUpgradedConsensusStateResponse(properties); + }; + + /** + * Encodes the specified QueryUpgradedConsensusStateResponse message. Does not implicitly {@link cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse + * @static + * @param {cosmos.upgrade.v1beta1.IQueryUpgradedConsensusStateResponse} message QueryUpgradedConsensusStateResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryUpgradedConsensusStateResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.upgradedConsensusState != null && Object.hasOwnProperty.call(message, "upgradedConsensusState")) + $root.google.protobuf.Any.encode(message.upgradedConsensusState, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryUpgradedConsensusStateResponse message, length delimited. Does not implicitly {@link cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse + * @static + * @param {cosmos.upgrade.v1beta1.IQueryUpgradedConsensusStateResponse} message QueryUpgradedConsensusStateResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryUpgradedConsensusStateResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryUpgradedConsensusStateResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse} QueryUpgradedConsensusStateResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryUpgradedConsensusStateResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.upgradedConsensusState = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryUpgradedConsensusStateResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse} QueryUpgradedConsensusStateResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryUpgradedConsensusStateResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryUpgradedConsensusStateResponse message. + * @function verify + * @memberof cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryUpgradedConsensusStateResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.upgradedConsensusState != null && message.hasOwnProperty("upgradedConsensusState")) { + let error = $root.google.protobuf.Any.verify(message.upgradedConsensusState); + if (error) + return "upgradedConsensusState." + error; + } + return null; + }; + + /** + * Creates a QueryUpgradedConsensusStateResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse} QueryUpgradedConsensusStateResponse + */ + QueryUpgradedConsensusStateResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse) + return object; + let message = new $root.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse(); + if (object.upgradedConsensusState != null) { + if (typeof object.upgradedConsensusState !== "object") + throw TypeError(".cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse.upgradedConsensusState: object expected"); + message.upgradedConsensusState = $root.google.protobuf.Any.fromObject(object.upgradedConsensusState); + } + return message; + }; + + /** + * Creates a plain object from a QueryUpgradedConsensusStateResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse + * @static + * @param {cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse} message QueryUpgradedConsensusStateResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryUpgradedConsensusStateResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.upgradedConsensusState = null; + if (message.upgradedConsensusState != null && message.hasOwnProperty("upgradedConsensusState")) + object.upgradedConsensusState = $root.google.protobuf.Any.toObject(message.upgradedConsensusState, options); + return object; + }; + + /** + * Converts this QueryUpgradedConsensusStateResponse to JSON. + * @function toJSON + * @memberof cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse + * @instance + * @returns {Object.} JSON object + */ + QueryUpgradedConsensusStateResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryUpgradedConsensusStateResponse; + })(v1beta1.QueryUpgradedConsensusStateResponse || {}); + + v1beta1.Plan = (function(Plan) { + + /** + * Properties of a Plan. + * @memberof cosmos.upgrade.v1beta1 + * @interface IPlan + * @property {string|null} [name] Plan name + * @property {google.protobuf.ITimestamp|null} [time] Plan time + * @property {number|Long|null} [height] Plan height + * @property {string|null} [info] Plan info + * @property {google.protobuf.IAny|null} [upgradedClientState] Plan upgradedClientState + */ + + /** + * Constructs a new Plan. + * @memberof cosmos.upgrade.v1beta1 + * @classdesc Represents a Plan. + * @implements IPlan + * @constructor + * @param {cosmos.upgrade.v1beta1.IPlan=} [properties] Properties to set + */ + function Plan(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Plan name. + * @member {string} name + * @memberof cosmos.upgrade.v1beta1.Plan + * @instance + */ + Plan.prototype.name = ""; + + /** + * Plan time. + * @member {google.protobuf.ITimestamp|null|undefined} time + * @memberof cosmos.upgrade.v1beta1.Plan + * @instance + */ + Plan.prototype.time = null; + + /** + * Plan height. + * @member {number|Long} height + * @memberof cosmos.upgrade.v1beta1.Plan + * @instance + */ + Plan.prototype.height = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Plan info. + * @member {string} info + * @memberof cosmos.upgrade.v1beta1.Plan + * @instance + */ + Plan.prototype.info = ""; + + /** + * Plan upgradedClientState. + * @member {google.protobuf.IAny|null|undefined} upgradedClientState + * @memberof cosmos.upgrade.v1beta1.Plan + * @instance + */ + Plan.prototype.upgradedClientState = null; + + /** + * Creates a new Plan instance using the specified properties. + * @function create + * @memberof cosmos.upgrade.v1beta1.Plan + * @static + * @param {cosmos.upgrade.v1beta1.IPlan=} [properties] Properties to set + * @returns {cosmos.upgrade.v1beta1.Plan} Plan instance + */ + Plan.create = function create(properties) { + return new Plan(properties); + }; + + /** + * Encodes the specified Plan message. Does not implicitly {@link cosmos.upgrade.v1beta1.Plan.verify|verify} messages. + * @function encode + * @memberof cosmos.upgrade.v1beta1.Plan + * @static + * @param {cosmos.upgrade.v1beta1.IPlan} message Plan message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Plan.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.time != null && Object.hasOwnProperty.call(message, "time")) + $root.google.protobuf.Timestamp.encode(message.time, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.height != null && Object.hasOwnProperty.call(message, "height")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.height); + if (message.info != null && Object.hasOwnProperty.call(message, "info")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.info); + if (message.upgradedClientState != null && Object.hasOwnProperty.call(message, "upgradedClientState")) + $root.google.protobuf.Any.encode(message.upgradedClientState, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Plan message, length delimited. Does not implicitly {@link cosmos.upgrade.v1beta1.Plan.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.upgrade.v1beta1.Plan + * @static + * @param {cosmos.upgrade.v1beta1.IPlan} message Plan message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Plan.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Plan message from the specified reader or buffer. + * @function decode + * @memberof cosmos.upgrade.v1beta1.Plan + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.upgrade.v1beta1.Plan} Plan + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Plan.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.upgrade.v1beta1.Plan(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.time = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 3: + message.height = reader.int64(); + break; + case 4: + message.info = reader.string(); + break; + case 5: + message.upgradedClientState = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Plan message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.upgrade.v1beta1.Plan + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.upgrade.v1beta1.Plan} Plan + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Plan.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Plan message. + * @function verify + * @memberof cosmos.upgrade.v1beta1.Plan + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Plan.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.time != null && message.hasOwnProperty("time")) { + let error = $root.google.protobuf.Timestamp.verify(message.time); + if (error) + return "time." + error; + } + if (message.height != null && message.hasOwnProperty("height")) + if (!$util.isInteger(message.height) && !(message.height && $util.isInteger(message.height.low) && $util.isInteger(message.height.high))) + return "height: integer|Long expected"; + if (message.info != null && message.hasOwnProperty("info")) + if (!$util.isString(message.info)) + return "info: string expected"; + if (message.upgradedClientState != null && message.hasOwnProperty("upgradedClientState")) { + let error = $root.google.protobuf.Any.verify(message.upgradedClientState); + if (error) + return "upgradedClientState." + error; + } + return null; + }; + + /** + * Creates a Plan message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.upgrade.v1beta1.Plan + * @static + * @param {Object.} object Plain object + * @returns {cosmos.upgrade.v1beta1.Plan} Plan + */ + Plan.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.upgrade.v1beta1.Plan) + return object; + let message = new $root.cosmos.upgrade.v1beta1.Plan(); + if (object.name != null) + message.name = String(object.name); + if (object.time != null) { + if (typeof object.time !== "object") + throw TypeError(".cosmos.upgrade.v1beta1.Plan.time: object expected"); + message.time = $root.google.protobuf.Timestamp.fromObject(object.time); + } + if (object.height != null) + if ($util.Long) + (message.height = $util.Long.fromValue(object.height)).unsigned = false; + else if (typeof object.height === "string") + message.height = parseInt(object.height, 10); + else if (typeof object.height === "number") + message.height = object.height; + else if (typeof object.height === "object") + message.height = new $util.LongBits(object.height.low >>> 0, object.height.high >>> 0).toNumber(); + if (object.info != null) + message.info = String(object.info); + if (object.upgradedClientState != null) { + if (typeof object.upgradedClientState !== "object") + throw TypeError(".cosmos.upgrade.v1beta1.Plan.upgradedClientState: object expected"); + message.upgradedClientState = $root.google.protobuf.Any.fromObject(object.upgradedClientState); + } + return message; + }; + + /** + * Creates a plain object from a Plan message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.upgrade.v1beta1.Plan + * @static + * @param {cosmos.upgrade.v1beta1.Plan} message Plan + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Plan.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.name = ""; + object.time = null; + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.height = options.longs === String ? "0" : 0; + object.info = ""; + object.upgradedClientState = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.time != null && message.hasOwnProperty("time")) + object.time = $root.google.protobuf.Timestamp.toObject(message.time, options); + if (message.height != null && message.hasOwnProperty("height")) + if (typeof message.height === "number") + object.height = options.longs === String ? String(message.height) : message.height; + else + object.height = options.longs === String ? $util.Long.prototype.toString.call(message.height) : options.longs === Number ? new $util.LongBits(message.height.low >>> 0, message.height.high >>> 0).toNumber() : message.height; + if (message.info != null && message.hasOwnProperty("info")) + object.info = message.info; + if (message.upgradedClientState != null && message.hasOwnProperty("upgradedClientState")) + object.upgradedClientState = $root.google.protobuf.Any.toObject(message.upgradedClientState, options); + return object; + }; + + /** + * Converts this Plan to JSON. + * @function toJSON + * @memberof cosmos.upgrade.v1beta1.Plan + * @instance + * @returns {Object.} JSON object + */ + Plan.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Plan; + })(v1beta1.Plan || {}); + + v1beta1.SoftwareUpgradeProposal = (function(SoftwareUpgradeProposal) { + + /** + * Properties of a SoftwareUpgradeProposal. + * @memberof cosmos.upgrade.v1beta1 + * @interface ISoftwareUpgradeProposal + * @property {string|null} [title] SoftwareUpgradeProposal title + * @property {string|null} [description] SoftwareUpgradeProposal description + * @property {cosmos.upgrade.v1beta1.IPlan|null} [plan] SoftwareUpgradeProposal plan + */ + + /** + * Constructs a new SoftwareUpgradeProposal. + * @memberof cosmos.upgrade.v1beta1 + * @classdesc Represents a SoftwareUpgradeProposal. + * @implements ISoftwareUpgradeProposal + * @constructor + * @param {cosmos.upgrade.v1beta1.ISoftwareUpgradeProposal=} [properties] Properties to set + */ + function SoftwareUpgradeProposal(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SoftwareUpgradeProposal title. + * @member {string} title + * @memberof cosmos.upgrade.v1beta1.SoftwareUpgradeProposal + * @instance + */ + SoftwareUpgradeProposal.prototype.title = ""; + + /** + * SoftwareUpgradeProposal description. + * @member {string} description + * @memberof cosmos.upgrade.v1beta1.SoftwareUpgradeProposal + * @instance + */ + SoftwareUpgradeProposal.prototype.description = ""; + + /** + * SoftwareUpgradeProposal plan. + * @member {cosmos.upgrade.v1beta1.IPlan|null|undefined} plan + * @memberof cosmos.upgrade.v1beta1.SoftwareUpgradeProposal + * @instance + */ + SoftwareUpgradeProposal.prototype.plan = null; + + /** + * Creates a new SoftwareUpgradeProposal instance using the specified properties. + * @function create + * @memberof cosmos.upgrade.v1beta1.SoftwareUpgradeProposal + * @static + * @param {cosmos.upgrade.v1beta1.ISoftwareUpgradeProposal=} [properties] Properties to set + * @returns {cosmos.upgrade.v1beta1.SoftwareUpgradeProposal} SoftwareUpgradeProposal instance + */ + SoftwareUpgradeProposal.create = function create(properties) { + return new SoftwareUpgradeProposal(properties); + }; + + /** + * Encodes the specified SoftwareUpgradeProposal message. Does not implicitly {@link cosmos.upgrade.v1beta1.SoftwareUpgradeProposal.verify|verify} messages. + * @function encode + * @memberof cosmos.upgrade.v1beta1.SoftwareUpgradeProposal + * @static + * @param {cosmos.upgrade.v1beta1.ISoftwareUpgradeProposal} message SoftwareUpgradeProposal message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SoftwareUpgradeProposal.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.title != null && Object.hasOwnProperty.call(message, "title")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.title); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.plan != null && Object.hasOwnProperty.call(message, "plan")) + $root.cosmos.upgrade.v1beta1.Plan.encode(message.plan, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SoftwareUpgradeProposal message, length delimited. Does not implicitly {@link cosmos.upgrade.v1beta1.SoftwareUpgradeProposal.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.upgrade.v1beta1.SoftwareUpgradeProposal + * @static + * @param {cosmos.upgrade.v1beta1.ISoftwareUpgradeProposal} message SoftwareUpgradeProposal message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SoftwareUpgradeProposal.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SoftwareUpgradeProposal message from the specified reader or buffer. + * @function decode + * @memberof cosmos.upgrade.v1beta1.SoftwareUpgradeProposal + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.upgrade.v1beta1.SoftwareUpgradeProposal} SoftwareUpgradeProposal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SoftwareUpgradeProposal.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.upgrade.v1beta1.SoftwareUpgradeProposal(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.title = reader.string(); + break; + case 2: + message.description = reader.string(); + break; + case 3: + message.plan = $root.cosmos.upgrade.v1beta1.Plan.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SoftwareUpgradeProposal message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.upgrade.v1beta1.SoftwareUpgradeProposal + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.upgrade.v1beta1.SoftwareUpgradeProposal} SoftwareUpgradeProposal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SoftwareUpgradeProposal.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SoftwareUpgradeProposal message. + * @function verify + * @memberof cosmos.upgrade.v1beta1.SoftwareUpgradeProposal + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SoftwareUpgradeProposal.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.title != null && message.hasOwnProperty("title")) + if (!$util.isString(message.title)) + return "title: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.plan != null && message.hasOwnProperty("plan")) { + let error = $root.cosmos.upgrade.v1beta1.Plan.verify(message.plan); + if (error) + return "plan." + error; + } + return null; + }; + + /** + * Creates a SoftwareUpgradeProposal message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.upgrade.v1beta1.SoftwareUpgradeProposal + * @static + * @param {Object.} object Plain object + * @returns {cosmos.upgrade.v1beta1.SoftwareUpgradeProposal} SoftwareUpgradeProposal + */ + SoftwareUpgradeProposal.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.upgrade.v1beta1.SoftwareUpgradeProposal) + return object; + let message = new $root.cosmos.upgrade.v1beta1.SoftwareUpgradeProposal(); + if (object.title != null) + message.title = String(object.title); + if (object.description != null) + message.description = String(object.description); + if (object.plan != null) { + if (typeof object.plan !== "object") + throw TypeError(".cosmos.upgrade.v1beta1.SoftwareUpgradeProposal.plan: object expected"); + message.plan = $root.cosmos.upgrade.v1beta1.Plan.fromObject(object.plan); + } + return message; + }; + + /** + * Creates a plain object from a SoftwareUpgradeProposal message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.upgrade.v1beta1.SoftwareUpgradeProposal + * @static + * @param {cosmos.upgrade.v1beta1.SoftwareUpgradeProposal} message SoftwareUpgradeProposal + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SoftwareUpgradeProposal.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.title = ""; + object.description = ""; + object.plan = null; + } + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.plan != null && message.hasOwnProperty("plan")) + object.plan = $root.cosmos.upgrade.v1beta1.Plan.toObject(message.plan, options); + return object; + }; + + /** + * Converts this SoftwareUpgradeProposal to JSON. + * @function toJSON + * @memberof cosmos.upgrade.v1beta1.SoftwareUpgradeProposal + * @instance + * @returns {Object.} JSON object + */ + SoftwareUpgradeProposal.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SoftwareUpgradeProposal; + })(v1beta1.SoftwareUpgradeProposal || {}); + + v1beta1.CancelSoftwareUpgradeProposal = (function(CancelSoftwareUpgradeProposal) { + + /** + * Properties of a CancelSoftwareUpgradeProposal. + * @memberof cosmos.upgrade.v1beta1 + * @interface ICancelSoftwareUpgradeProposal + * @property {string|null} [title] CancelSoftwareUpgradeProposal title + * @property {string|null} [description] CancelSoftwareUpgradeProposal description + */ + + /** + * Constructs a new CancelSoftwareUpgradeProposal. + * @memberof cosmos.upgrade.v1beta1 + * @classdesc Represents a CancelSoftwareUpgradeProposal. + * @implements ICancelSoftwareUpgradeProposal + * @constructor + * @param {cosmos.upgrade.v1beta1.ICancelSoftwareUpgradeProposal=} [properties] Properties to set + */ + function CancelSoftwareUpgradeProposal(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CancelSoftwareUpgradeProposal title. + * @member {string} title + * @memberof cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal + * @instance + */ + CancelSoftwareUpgradeProposal.prototype.title = ""; + + /** + * CancelSoftwareUpgradeProposal description. + * @member {string} description + * @memberof cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal + * @instance + */ + CancelSoftwareUpgradeProposal.prototype.description = ""; + + /** + * Creates a new CancelSoftwareUpgradeProposal instance using the specified properties. + * @function create + * @memberof cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal + * @static + * @param {cosmos.upgrade.v1beta1.ICancelSoftwareUpgradeProposal=} [properties] Properties to set + * @returns {cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal} CancelSoftwareUpgradeProposal instance + */ + CancelSoftwareUpgradeProposal.create = function create(properties) { + return new CancelSoftwareUpgradeProposal(properties); + }; + + /** + * Encodes the specified CancelSoftwareUpgradeProposal message. Does not implicitly {@link cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal.verify|verify} messages. + * @function encode + * @memberof cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal + * @static + * @param {cosmos.upgrade.v1beta1.ICancelSoftwareUpgradeProposal} message CancelSoftwareUpgradeProposal message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelSoftwareUpgradeProposal.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.title != null && Object.hasOwnProperty.call(message, "title")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.title); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + return writer; + }; + + /** + * Encodes the specified CancelSoftwareUpgradeProposal message, length delimited. Does not implicitly {@link cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal + * @static + * @param {cosmos.upgrade.v1beta1.ICancelSoftwareUpgradeProposal} message CancelSoftwareUpgradeProposal message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelSoftwareUpgradeProposal.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CancelSoftwareUpgradeProposal message from the specified reader or buffer. + * @function decode + * @memberof cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal} CancelSoftwareUpgradeProposal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelSoftwareUpgradeProposal.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.title = reader.string(); + break; + case 2: + message.description = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CancelSoftwareUpgradeProposal message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal} CancelSoftwareUpgradeProposal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelSoftwareUpgradeProposal.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CancelSoftwareUpgradeProposal message. + * @function verify + * @memberof cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CancelSoftwareUpgradeProposal.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.title != null && message.hasOwnProperty("title")) + if (!$util.isString(message.title)) + return "title: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + return null; + }; + + /** + * Creates a CancelSoftwareUpgradeProposal message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal + * @static + * @param {Object.} object Plain object + * @returns {cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal} CancelSoftwareUpgradeProposal + */ + CancelSoftwareUpgradeProposal.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal) + return object; + let message = new $root.cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal(); + if (object.title != null) + message.title = String(object.title); + if (object.description != null) + message.description = String(object.description); + return message; + }; + + /** + * Creates a plain object from a CancelSoftwareUpgradeProposal message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal + * @static + * @param {cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal} message CancelSoftwareUpgradeProposal + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CancelSoftwareUpgradeProposal.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.title = ""; + object.description = ""; + } + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + return object; + }; + + /** + * Converts this CancelSoftwareUpgradeProposal to JSON. + * @function toJSON + * @memberof cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal + * @instance + * @returns {Object.} JSON object + */ + CancelSoftwareUpgradeProposal.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CancelSoftwareUpgradeProposal; + })(v1beta1.CancelSoftwareUpgradeProposal || {}); + + return v1beta1; + })(upgrade.v1beta1 || {}); + + return upgrade; + })(cosmos.upgrade || {}); + + /** + * Namespace vesting. + * @memberof cosmos + * @namespace + */ + + cosmos.vesting = (function(vesting) { + + /** + * Namespace v1beta1. + * @memberof cosmos.vesting + * @namespace + */ + + vesting.v1beta1 = (function(v1beta1) { + + v1beta1.Msg = (function(Msg) { + + /** + * Constructs a new Msg service. + * @memberof cosmos.vesting.v1beta1 + * @classdesc Represents a Msg + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Msg(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Msg.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Msg; + + /** + * Creates new Msg service using the specified rpc implementation. + * @function create + * @memberof cosmos.vesting.v1beta1.Msg + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Msg} RPC service. Useful where requests and/or responses are streamed. + */ + Msg.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link cosmos.vesting.v1beta1.Msg#createVestingAccount}. + * @memberof cosmos.vesting.v1beta1.Msg + * @typedef CreateVestingAccountCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos.vesting.v1beta1.IMsgCreateVestingAccountResponse} [response] MsgCreateVestingAccountResponse + */ + + /** + * Calls CreateVestingAccount. + * @function createVestingAccount + * @memberof cosmos.vesting.v1beta1.Msg + * @instance + * @param {cosmos.vesting.v1beta1.IMsgCreateVestingAccount} request MsgCreateVestingAccount message or plain object + * @param {cosmos.vesting.v1beta1.Msg.CreateVestingAccountCallback} callback Node-style callback called with the error, if any, and MsgCreateVestingAccountResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Msg.prototype.createVestingAccount = function createVestingAccount(request, callback) { + return this.rpcCall(createVestingAccount, $root.cosmos.vesting.v1beta1.MsgCreateVestingAccount, $root.cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse, request, callback); + }, "name", { value: "CreateVestingAccount" }); + + /** + * Calls CreateVestingAccount. + * @function createVestingAccount + * @memberof cosmos.vesting.v1beta1.Msg + * @instance + * @param {cosmos.vesting.v1beta1.IMsgCreateVestingAccount} request MsgCreateVestingAccount message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Msg; + })(v1beta1.Msg || {}); + + v1beta1.MsgCreateVestingAccount = (function(MsgCreateVestingAccount) { + + /** + * Properties of a MsgCreateVestingAccount. + * @memberof cosmos.vesting.v1beta1 + * @interface IMsgCreateVestingAccount + * @property {string|null} [fromAddress] MsgCreateVestingAccount fromAddress + * @property {string|null} [toAddress] MsgCreateVestingAccount toAddress + * @property {Array.|null} [amount] MsgCreateVestingAccount amount + * @property {number|Long|null} [endTime] MsgCreateVestingAccount endTime + * @property {boolean|null} [delayed] MsgCreateVestingAccount delayed + */ + + /** + * Constructs a new MsgCreateVestingAccount. + * @memberof cosmos.vesting.v1beta1 + * @classdesc Represents a MsgCreateVestingAccount. + * @implements IMsgCreateVestingAccount + * @constructor + * @param {cosmos.vesting.v1beta1.IMsgCreateVestingAccount=} [properties] Properties to set + */ + function MsgCreateVestingAccount(properties) { + this.amount = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgCreateVestingAccount fromAddress. + * @member {string} fromAddress + * @memberof cosmos.vesting.v1beta1.MsgCreateVestingAccount + * @instance + */ + MsgCreateVestingAccount.prototype.fromAddress = ""; + + /** + * MsgCreateVestingAccount toAddress. + * @member {string} toAddress + * @memberof cosmos.vesting.v1beta1.MsgCreateVestingAccount + * @instance + */ + MsgCreateVestingAccount.prototype.toAddress = ""; + + /** + * MsgCreateVestingAccount amount. + * @member {Array.} amount + * @memberof cosmos.vesting.v1beta1.MsgCreateVestingAccount + * @instance + */ + MsgCreateVestingAccount.prototype.amount = $util.emptyArray; + + /** + * MsgCreateVestingAccount endTime. + * @member {number|Long} endTime + * @memberof cosmos.vesting.v1beta1.MsgCreateVestingAccount + * @instance + */ + MsgCreateVestingAccount.prototype.endTime = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * MsgCreateVestingAccount delayed. + * @member {boolean} delayed + * @memberof cosmos.vesting.v1beta1.MsgCreateVestingAccount + * @instance + */ + MsgCreateVestingAccount.prototype.delayed = false; + + /** + * Creates a new MsgCreateVestingAccount instance using the specified properties. + * @function create + * @memberof cosmos.vesting.v1beta1.MsgCreateVestingAccount + * @static + * @param {cosmos.vesting.v1beta1.IMsgCreateVestingAccount=} [properties] Properties to set + * @returns {cosmos.vesting.v1beta1.MsgCreateVestingAccount} MsgCreateVestingAccount instance + */ + MsgCreateVestingAccount.create = function create(properties) { + return new MsgCreateVestingAccount(properties); + }; + + /** + * Encodes the specified MsgCreateVestingAccount message. Does not implicitly {@link cosmos.vesting.v1beta1.MsgCreateVestingAccount.verify|verify} messages. + * @function encode + * @memberof cosmos.vesting.v1beta1.MsgCreateVestingAccount + * @static + * @param {cosmos.vesting.v1beta1.IMsgCreateVestingAccount} message MsgCreateVestingAccount message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgCreateVestingAccount.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fromAddress != null && Object.hasOwnProperty.call(message, "fromAddress")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.fromAddress); + if (message.toAddress != null && Object.hasOwnProperty.call(message, "toAddress")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.toAddress); + if (message.amount != null && message.amount.length) + for (let i = 0; i < message.amount.length; ++i) + $root.cosmos.base.v1beta1.Coin.encode(message.amount[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.endTime); + if (message.delayed != null && Object.hasOwnProperty.call(message, "delayed")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.delayed); + return writer; + }; + + /** + * Encodes the specified MsgCreateVestingAccount message, length delimited. Does not implicitly {@link cosmos.vesting.v1beta1.MsgCreateVestingAccount.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.vesting.v1beta1.MsgCreateVestingAccount + * @static + * @param {cosmos.vesting.v1beta1.IMsgCreateVestingAccount} message MsgCreateVestingAccount message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgCreateVestingAccount.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgCreateVestingAccount message from the specified reader or buffer. + * @function decode + * @memberof cosmos.vesting.v1beta1.MsgCreateVestingAccount + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.vesting.v1beta1.MsgCreateVestingAccount} MsgCreateVestingAccount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgCreateVestingAccount.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.vesting.v1beta1.MsgCreateVestingAccount(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.fromAddress = reader.string(); + break; + case 2: + message.toAddress = reader.string(); + break; + case 3: + if (!(message.amount && message.amount.length)) + message.amount = []; + message.amount.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); + break; + case 4: + message.endTime = reader.int64(); + break; + case 5: + message.delayed = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgCreateVestingAccount message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.vesting.v1beta1.MsgCreateVestingAccount + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.vesting.v1beta1.MsgCreateVestingAccount} MsgCreateVestingAccount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgCreateVestingAccount.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgCreateVestingAccount message. + * @function verify + * @memberof cosmos.vesting.v1beta1.MsgCreateVestingAccount + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgCreateVestingAccount.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fromAddress != null && message.hasOwnProperty("fromAddress")) + if (!$util.isString(message.fromAddress)) + return "fromAddress: string expected"; + if (message.toAddress != null && message.hasOwnProperty("toAddress")) + if (!$util.isString(message.toAddress)) + return "toAddress: string expected"; + if (message.amount != null && message.hasOwnProperty("amount")) { + if (!Array.isArray(message.amount)) + return "amount: array expected"; + for (let i = 0; i < message.amount.length; ++i) { + let error = $root.cosmos.base.v1beta1.Coin.verify(message.amount[i]); + if (error) + return "amount." + error; + } + } + if (message.endTime != null && message.hasOwnProperty("endTime")) + if (!$util.isInteger(message.endTime) && !(message.endTime && $util.isInteger(message.endTime.low) && $util.isInteger(message.endTime.high))) + return "endTime: integer|Long expected"; + if (message.delayed != null && message.hasOwnProperty("delayed")) + if (typeof message.delayed !== "boolean") + return "delayed: boolean expected"; + return null; + }; + + /** + * Creates a MsgCreateVestingAccount message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.vesting.v1beta1.MsgCreateVestingAccount + * @static + * @param {Object.} object Plain object + * @returns {cosmos.vesting.v1beta1.MsgCreateVestingAccount} MsgCreateVestingAccount + */ + MsgCreateVestingAccount.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.vesting.v1beta1.MsgCreateVestingAccount) + return object; + let message = new $root.cosmos.vesting.v1beta1.MsgCreateVestingAccount(); + if (object.fromAddress != null) + message.fromAddress = String(object.fromAddress); + if (object.toAddress != null) + message.toAddress = String(object.toAddress); + if (object.amount) { + if (!Array.isArray(object.amount)) + throw TypeError(".cosmos.vesting.v1beta1.MsgCreateVestingAccount.amount: array expected"); + message.amount = []; + for (let i = 0; i < object.amount.length; ++i) { + if (typeof object.amount[i] !== "object") + throw TypeError(".cosmos.vesting.v1beta1.MsgCreateVestingAccount.amount: object expected"); + message.amount[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.amount[i]); + } + } + if (object.endTime != null) + if ($util.Long) + (message.endTime = $util.Long.fromValue(object.endTime)).unsigned = false; + else if (typeof object.endTime === "string") + message.endTime = parseInt(object.endTime, 10); + else if (typeof object.endTime === "number") + message.endTime = object.endTime; + else if (typeof object.endTime === "object") + message.endTime = new $util.LongBits(object.endTime.low >>> 0, object.endTime.high >>> 0).toNumber(); + if (object.delayed != null) + message.delayed = Boolean(object.delayed); + return message; + }; + + /** + * Creates a plain object from a MsgCreateVestingAccount message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.vesting.v1beta1.MsgCreateVestingAccount + * @static + * @param {cosmos.vesting.v1beta1.MsgCreateVestingAccount} message MsgCreateVestingAccount + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgCreateVestingAccount.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.amount = []; + if (options.defaults) { + object.fromAddress = ""; + object.toAddress = ""; + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.endTime = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.endTime = options.longs === String ? "0" : 0; + object.delayed = false; + } + if (message.fromAddress != null && message.hasOwnProperty("fromAddress")) + object.fromAddress = message.fromAddress; + if (message.toAddress != null && message.hasOwnProperty("toAddress")) + object.toAddress = message.toAddress; + if (message.amount && message.amount.length) { + object.amount = []; + for (let j = 0; j < message.amount.length; ++j) + object.amount[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.amount[j], options); + } + if (message.endTime != null && message.hasOwnProperty("endTime")) + if (typeof message.endTime === "number") + object.endTime = options.longs === String ? String(message.endTime) : message.endTime; + else + object.endTime = options.longs === String ? $util.Long.prototype.toString.call(message.endTime) : options.longs === Number ? new $util.LongBits(message.endTime.low >>> 0, message.endTime.high >>> 0).toNumber() : message.endTime; + if (message.delayed != null && message.hasOwnProperty("delayed")) + object.delayed = message.delayed; + return object; + }; + + /** + * Converts this MsgCreateVestingAccount to JSON. + * @function toJSON + * @memberof cosmos.vesting.v1beta1.MsgCreateVestingAccount + * @instance + * @returns {Object.} JSON object + */ + MsgCreateVestingAccount.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgCreateVestingAccount; + })(v1beta1.MsgCreateVestingAccount || {}); + + v1beta1.MsgCreateVestingAccountResponse = (function(MsgCreateVestingAccountResponse) { + + /** + * Properties of a MsgCreateVestingAccountResponse. + * @memberof cosmos.vesting.v1beta1 + * @interface IMsgCreateVestingAccountResponse + */ + + /** + * Constructs a new MsgCreateVestingAccountResponse. + * @memberof cosmos.vesting.v1beta1 + * @classdesc Represents a MsgCreateVestingAccountResponse. + * @implements IMsgCreateVestingAccountResponse + * @constructor + * @param {cosmos.vesting.v1beta1.IMsgCreateVestingAccountResponse=} [properties] Properties to set + */ + function MsgCreateVestingAccountResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new MsgCreateVestingAccountResponse instance using the specified properties. + * @function create + * @memberof cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse + * @static + * @param {cosmos.vesting.v1beta1.IMsgCreateVestingAccountResponse=} [properties] Properties to set + * @returns {cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse} MsgCreateVestingAccountResponse instance + */ + MsgCreateVestingAccountResponse.create = function create(properties) { + return new MsgCreateVestingAccountResponse(properties); + }; + + /** + * Encodes the specified MsgCreateVestingAccountResponse message. Does not implicitly {@link cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse + * @static + * @param {cosmos.vesting.v1beta1.IMsgCreateVestingAccountResponse} message MsgCreateVestingAccountResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgCreateVestingAccountResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MsgCreateVestingAccountResponse message, length delimited. Does not implicitly {@link cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse + * @static + * @param {cosmos.vesting.v1beta1.IMsgCreateVestingAccountResponse} message MsgCreateVestingAccountResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgCreateVestingAccountResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgCreateVestingAccountResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse} MsgCreateVestingAccountResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgCreateVestingAccountResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgCreateVestingAccountResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse} MsgCreateVestingAccountResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgCreateVestingAccountResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgCreateVestingAccountResponse message. + * @function verify + * @memberof cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgCreateVestingAccountResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MsgCreateVestingAccountResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse} MsgCreateVestingAccountResponse + */ + MsgCreateVestingAccountResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse) + return object; + return new $root.cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse(); + }; + + /** + * Creates a plain object from a MsgCreateVestingAccountResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse + * @static + * @param {cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse} message MsgCreateVestingAccountResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgCreateVestingAccountResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MsgCreateVestingAccountResponse to JSON. + * @function toJSON + * @memberof cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse + * @instance + * @returns {Object.} JSON object + */ + MsgCreateVestingAccountResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgCreateVestingAccountResponse; + })(v1beta1.MsgCreateVestingAccountResponse || {}); + + v1beta1.BaseVestingAccount = (function(BaseVestingAccount) { + + /** + * Properties of a BaseVestingAccount. + * @memberof cosmos.vesting.v1beta1 + * @interface IBaseVestingAccount + * @property {cosmos.auth.v1beta1.IBaseAccount|null} [baseAccount] BaseVestingAccount baseAccount + * @property {Array.|null} [originalVesting] BaseVestingAccount originalVesting + * @property {Array.|null} [delegatedFree] BaseVestingAccount delegatedFree + * @property {Array.|null} [delegatedVesting] BaseVestingAccount delegatedVesting + * @property {number|Long|null} [endTime] BaseVestingAccount endTime + */ + + /** + * Constructs a new BaseVestingAccount. + * @memberof cosmos.vesting.v1beta1 + * @classdesc Represents a BaseVestingAccount. + * @implements IBaseVestingAccount + * @constructor + * @param {cosmos.vesting.v1beta1.IBaseVestingAccount=} [properties] Properties to set + */ + function BaseVestingAccount(properties) { + this.originalVesting = []; + this.delegatedFree = []; + this.delegatedVesting = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BaseVestingAccount baseAccount. + * @member {cosmos.auth.v1beta1.IBaseAccount|null|undefined} baseAccount + * @memberof cosmos.vesting.v1beta1.BaseVestingAccount + * @instance + */ + BaseVestingAccount.prototype.baseAccount = null; + + /** + * BaseVestingAccount originalVesting. + * @member {Array.} originalVesting + * @memberof cosmos.vesting.v1beta1.BaseVestingAccount + * @instance + */ + BaseVestingAccount.prototype.originalVesting = $util.emptyArray; + + /** + * BaseVestingAccount delegatedFree. + * @member {Array.} delegatedFree + * @memberof cosmos.vesting.v1beta1.BaseVestingAccount + * @instance + */ + BaseVestingAccount.prototype.delegatedFree = $util.emptyArray; + + /** + * BaseVestingAccount delegatedVesting. + * @member {Array.} delegatedVesting + * @memberof cosmos.vesting.v1beta1.BaseVestingAccount + * @instance + */ + BaseVestingAccount.prototype.delegatedVesting = $util.emptyArray; + + /** + * BaseVestingAccount endTime. + * @member {number|Long} endTime + * @memberof cosmos.vesting.v1beta1.BaseVestingAccount + * @instance + */ + BaseVestingAccount.prototype.endTime = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new BaseVestingAccount instance using the specified properties. + * @function create + * @memberof cosmos.vesting.v1beta1.BaseVestingAccount + * @static + * @param {cosmos.vesting.v1beta1.IBaseVestingAccount=} [properties] Properties to set + * @returns {cosmos.vesting.v1beta1.BaseVestingAccount} BaseVestingAccount instance + */ + BaseVestingAccount.create = function create(properties) { + return new BaseVestingAccount(properties); + }; + + /** + * Encodes the specified BaseVestingAccount message. Does not implicitly {@link cosmos.vesting.v1beta1.BaseVestingAccount.verify|verify} messages. + * @function encode + * @memberof cosmos.vesting.v1beta1.BaseVestingAccount + * @static + * @param {cosmos.vesting.v1beta1.IBaseVestingAccount} message BaseVestingAccount message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BaseVestingAccount.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.baseAccount != null && Object.hasOwnProperty.call(message, "baseAccount")) + $root.cosmos.auth.v1beta1.BaseAccount.encode(message.baseAccount, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.originalVesting != null && message.originalVesting.length) + for (let i = 0; i < message.originalVesting.length; ++i) + $root.cosmos.base.v1beta1.Coin.encode(message.originalVesting[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.delegatedFree != null && message.delegatedFree.length) + for (let i = 0; i < message.delegatedFree.length; ++i) + $root.cosmos.base.v1beta1.Coin.encode(message.delegatedFree[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.delegatedVesting != null && message.delegatedVesting.length) + for (let i = 0; i < message.delegatedVesting.length; ++i) + $root.cosmos.base.v1beta1.Coin.encode(message.delegatedVesting[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.endTime); + return writer; + }; + + /** + * Encodes the specified BaseVestingAccount message, length delimited. Does not implicitly {@link cosmos.vesting.v1beta1.BaseVestingAccount.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.vesting.v1beta1.BaseVestingAccount + * @static + * @param {cosmos.vesting.v1beta1.IBaseVestingAccount} message BaseVestingAccount message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BaseVestingAccount.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BaseVestingAccount message from the specified reader or buffer. + * @function decode + * @memberof cosmos.vesting.v1beta1.BaseVestingAccount + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.vesting.v1beta1.BaseVestingAccount} BaseVestingAccount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BaseVestingAccount.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.vesting.v1beta1.BaseVestingAccount(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.baseAccount = $root.cosmos.auth.v1beta1.BaseAccount.decode(reader, reader.uint32()); + break; + case 2: + if (!(message.originalVesting && message.originalVesting.length)) + message.originalVesting = []; + message.originalVesting.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); + break; + case 3: + if (!(message.delegatedFree && message.delegatedFree.length)) + message.delegatedFree = []; + message.delegatedFree.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); + break; + case 4: + if (!(message.delegatedVesting && message.delegatedVesting.length)) + message.delegatedVesting = []; + message.delegatedVesting.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); + break; + case 5: + message.endTime = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BaseVestingAccount message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.vesting.v1beta1.BaseVestingAccount + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.vesting.v1beta1.BaseVestingAccount} BaseVestingAccount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BaseVestingAccount.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BaseVestingAccount message. + * @function verify + * @memberof cosmos.vesting.v1beta1.BaseVestingAccount + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BaseVestingAccount.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.baseAccount != null && message.hasOwnProperty("baseAccount")) { + let error = $root.cosmos.auth.v1beta1.BaseAccount.verify(message.baseAccount); + if (error) + return "baseAccount." + error; + } + if (message.originalVesting != null && message.hasOwnProperty("originalVesting")) { + if (!Array.isArray(message.originalVesting)) + return "originalVesting: array expected"; + for (let i = 0; i < message.originalVesting.length; ++i) { + let error = $root.cosmos.base.v1beta1.Coin.verify(message.originalVesting[i]); + if (error) + return "originalVesting." + error; + } + } + if (message.delegatedFree != null && message.hasOwnProperty("delegatedFree")) { + if (!Array.isArray(message.delegatedFree)) + return "delegatedFree: array expected"; + for (let i = 0; i < message.delegatedFree.length; ++i) { + let error = $root.cosmos.base.v1beta1.Coin.verify(message.delegatedFree[i]); + if (error) + return "delegatedFree." + error; + } + } + if (message.delegatedVesting != null && message.hasOwnProperty("delegatedVesting")) { + if (!Array.isArray(message.delegatedVesting)) + return "delegatedVesting: array expected"; + for (let i = 0; i < message.delegatedVesting.length; ++i) { + let error = $root.cosmos.base.v1beta1.Coin.verify(message.delegatedVesting[i]); + if (error) + return "delegatedVesting." + error; + } + } + if (message.endTime != null && message.hasOwnProperty("endTime")) + if (!$util.isInteger(message.endTime) && !(message.endTime && $util.isInteger(message.endTime.low) && $util.isInteger(message.endTime.high))) + return "endTime: integer|Long expected"; + return null; + }; + + /** + * Creates a BaseVestingAccount message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.vesting.v1beta1.BaseVestingAccount + * @static + * @param {Object.} object Plain object + * @returns {cosmos.vesting.v1beta1.BaseVestingAccount} BaseVestingAccount + */ + BaseVestingAccount.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.vesting.v1beta1.BaseVestingAccount) + return object; + let message = new $root.cosmos.vesting.v1beta1.BaseVestingAccount(); + if (object.baseAccount != null) { + if (typeof object.baseAccount !== "object") + throw TypeError(".cosmos.vesting.v1beta1.BaseVestingAccount.baseAccount: object expected"); + message.baseAccount = $root.cosmos.auth.v1beta1.BaseAccount.fromObject(object.baseAccount); + } + if (object.originalVesting) { + if (!Array.isArray(object.originalVesting)) + throw TypeError(".cosmos.vesting.v1beta1.BaseVestingAccount.originalVesting: array expected"); + message.originalVesting = []; + for (let i = 0; i < object.originalVesting.length; ++i) { + if (typeof object.originalVesting[i] !== "object") + throw TypeError(".cosmos.vesting.v1beta1.BaseVestingAccount.originalVesting: object expected"); + message.originalVesting[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.originalVesting[i]); + } + } + if (object.delegatedFree) { + if (!Array.isArray(object.delegatedFree)) + throw TypeError(".cosmos.vesting.v1beta1.BaseVestingAccount.delegatedFree: array expected"); + message.delegatedFree = []; + for (let i = 0; i < object.delegatedFree.length; ++i) { + if (typeof object.delegatedFree[i] !== "object") + throw TypeError(".cosmos.vesting.v1beta1.BaseVestingAccount.delegatedFree: object expected"); + message.delegatedFree[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.delegatedFree[i]); + } + } + if (object.delegatedVesting) { + if (!Array.isArray(object.delegatedVesting)) + throw TypeError(".cosmos.vesting.v1beta1.BaseVestingAccount.delegatedVesting: array expected"); + message.delegatedVesting = []; + for (let i = 0; i < object.delegatedVesting.length; ++i) { + if (typeof object.delegatedVesting[i] !== "object") + throw TypeError(".cosmos.vesting.v1beta1.BaseVestingAccount.delegatedVesting: object expected"); + message.delegatedVesting[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.delegatedVesting[i]); + } + } + if (object.endTime != null) + if ($util.Long) + (message.endTime = $util.Long.fromValue(object.endTime)).unsigned = false; + else if (typeof object.endTime === "string") + message.endTime = parseInt(object.endTime, 10); + else if (typeof object.endTime === "number") + message.endTime = object.endTime; + else if (typeof object.endTime === "object") + message.endTime = new $util.LongBits(object.endTime.low >>> 0, object.endTime.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a BaseVestingAccount message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.vesting.v1beta1.BaseVestingAccount + * @static + * @param {cosmos.vesting.v1beta1.BaseVestingAccount} message BaseVestingAccount + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BaseVestingAccount.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) { + object.originalVesting = []; + object.delegatedFree = []; + object.delegatedVesting = []; + } + if (options.defaults) { + object.baseAccount = null; + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.endTime = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.endTime = options.longs === String ? "0" : 0; + } + if (message.baseAccount != null && message.hasOwnProperty("baseAccount")) + object.baseAccount = $root.cosmos.auth.v1beta1.BaseAccount.toObject(message.baseAccount, options); + if (message.originalVesting && message.originalVesting.length) { + object.originalVesting = []; + for (let j = 0; j < message.originalVesting.length; ++j) + object.originalVesting[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.originalVesting[j], options); + } + if (message.delegatedFree && message.delegatedFree.length) { + object.delegatedFree = []; + for (let j = 0; j < message.delegatedFree.length; ++j) + object.delegatedFree[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.delegatedFree[j], options); + } + if (message.delegatedVesting && message.delegatedVesting.length) { + object.delegatedVesting = []; + for (let j = 0; j < message.delegatedVesting.length; ++j) + object.delegatedVesting[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.delegatedVesting[j], options); + } + if (message.endTime != null && message.hasOwnProperty("endTime")) + if (typeof message.endTime === "number") + object.endTime = options.longs === String ? String(message.endTime) : message.endTime; + else + object.endTime = options.longs === String ? $util.Long.prototype.toString.call(message.endTime) : options.longs === Number ? new $util.LongBits(message.endTime.low >>> 0, message.endTime.high >>> 0).toNumber() : message.endTime; + return object; + }; + + /** + * Converts this BaseVestingAccount to JSON. + * @function toJSON + * @memberof cosmos.vesting.v1beta1.BaseVestingAccount + * @instance + * @returns {Object.} JSON object + */ + BaseVestingAccount.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return BaseVestingAccount; + })(v1beta1.BaseVestingAccount || {}); + + v1beta1.ContinuousVestingAccount = (function(ContinuousVestingAccount) { + + /** + * Properties of a ContinuousVestingAccount. + * @memberof cosmos.vesting.v1beta1 + * @interface IContinuousVestingAccount + * @property {cosmos.vesting.v1beta1.IBaseVestingAccount|null} [baseVestingAccount] ContinuousVestingAccount baseVestingAccount + * @property {number|Long|null} [startTime] ContinuousVestingAccount startTime + */ + + /** + * Constructs a new ContinuousVestingAccount. + * @memberof cosmos.vesting.v1beta1 + * @classdesc Represents a ContinuousVestingAccount. + * @implements IContinuousVestingAccount + * @constructor + * @param {cosmos.vesting.v1beta1.IContinuousVestingAccount=} [properties] Properties to set + */ + function ContinuousVestingAccount(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ContinuousVestingAccount baseVestingAccount. + * @member {cosmos.vesting.v1beta1.IBaseVestingAccount|null|undefined} baseVestingAccount + * @memberof cosmos.vesting.v1beta1.ContinuousVestingAccount + * @instance + */ + ContinuousVestingAccount.prototype.baseVestingAccount = null; + + /** + * ContinuousVestingAccount startTime. + * @member {number|Long} startTime + * @memberof cosmos.vesting.v1beta1.ContinuousVestingAccount + * @instance + */ + ContinuousVestingAccount.prototype.startTime = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new ContinuousVestingAccount instance using the specified properties. + * @function create + * @memberof cosmos.vesting.v1beta1.ContinuousVestingAccount + * @static + * @param {cosmos.vesting.v1beta1.IContinuousVestingAccount=} [properties] Properties to set + * @returns {cosmos.vesting.v1beta1.ContinuousVestingAccount} ContinuousVestingAccount instance + */ + ContinuousVestingAccount.create = function create(properties) { + return new ContinuousVestingAccount(properties); + }; + + /** + * Encodes the specified ContinuousVestingAccount message. Does not implicitly {@link cosmos.vesting.v1beta1.ContinuousVestingAccount.verify|verify} messages. + * @function encode + * @memberof cosmos.vesting.v1beta1.ContinuousVestingAccount + * @static + * @param {cosmos.vesting.v1beta1.IContinuousVestingAccount} message ContinuousVestingAccount message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ContinuousVestingAccount.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.baseVestingAccount != null && Object.hasOwnProperty.call(message, "baseVestingAccount")) + $root.cosmos.vesting.v1beta1.BaseVestingAccount.encode(message.baseVestingAccount, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.startTime); + return writer; + }; + + /** + * Encodes the specified ContinuousVestingAccount message, length delimited. Does not implicitly {@link cosmos.vesting.v1beta1.ContinuousVestingAccount.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.vesting.v1beta1.ContinuousVestingAccount + * @static + * @param {cosmos.vesting.v1beta1.IContinuousVestingAccount} message ContinuousVestingAccount message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ContinuousVestingAccount.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ContinuousVestingAccount message from the specified reader or buffer. + * @function decode + * @memberof cosmos.vesting.v1beta1.ContinuousVestingAccount + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.vesting.v1beta1.ContinuousVestingAccount} ContinuousVestingAccount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ContinuousVestingAccount.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.vesting.v1beta1.ContinuousVestingAccount(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.baseVestingAccount = $root.cosmos.vesting.v1beta1.BaseVestingAccount.decode(reader, reader.uint32()); + break; + case 2: + message.startTime = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ContinuousVestingAccount message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.vesting.v1beta1.ContinuousVestingAccount + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.vesting.v1beta1.ContinuousVestingAccount} ContinuousVestingAccount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ContinuousVestingAccount.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ContinuousVestingAccount message. + * @function verify + * @memberof cosmos.vesting.v1beta1.ContinuousVestingAccount + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ContinuousVestingAccount.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.baseVestingAccount != null && message.hasOwnProperty("baseVestingAccount")) { + let error = $root.cosmos.vesting.v1beta1.BaseVestingAccount.verify(message.baseVestingAccount); + if (error) + return "baseVestingAccount." + error; + } + if (message.startTime != null && message.hasOwnProperty("startTime")) + if (!$util.isInteger(message.startTime) && !(message.startTime && $util.isInteger(message.startTime.low) && $util.isInteger(message.startTime.high))) + return "startTime: integer|Long expected"; + return null; + }; + + /** + * Creates a ContinuousVestingAccount message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.vesting.v1beta1.ContinuousVestingAccount + * @static + * @param {Object.} object Plain object + * @returns {cosmos.vesting.v1beta1.ContinuousVestingAccount} ContinuousVestingAccount + */ + ContinuousVestingAccount.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.vesting.v1beta1.ContinuousVestingAccount) + return object; + let message = new $root.cosmos.vesting.v1beta1.ContinuousVestingAccount(); + if (object.baseVestingAccount != null) { + if (typeof object.baseVestingAccount !== "object") + throw TypeError(".cosmos.vesting.v1beta1.ContinuousVestingAccount.baseVestingAccount: object expected"); + message.baseVestingAccount = $root.cosmos.vesting.v1beta1.BaseVestingAccount.fromObject(object.baseVestingAccount); + } + if (object.startTime != null) + if ($util.Long) + (message.startTime = $util.Long.fromValue(object.startTime)).unsigned = false; + else if (typeof object.startTime === "string") + message.startTime = parseInt(object.startTime, 10); + else if (typeof object.startTime === "number") + message.startTime = object.startTime; + else if (typeof object.startTime === "object") + message.startTime = new $util.LongBits(object.startTime.low >>> 0, object.startTime.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a ContinuousVestingAccount message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.vesting.v1beta1.ContinuousVestingAccount + * @static + * @param {cosmos.vesting.v1beta1.ContinuousVestingAccount} message ContinuousVestingAccount + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ContinuousVestingAccount.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.baseVestingAccount = null; + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.startTime = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.startTime = options.longs === String ? "0" : 0; + } + if (message.baseVestingAccount != null && message.hasOwnProperty("baseVestingAccount")) + object.baseVestingAccount = $root.cosmos.vesting.v1beta1.BaseVestingAccount.toObject(message.baseVestingAccount, options); + if (message.startTime != null && message.hasOwnProperty("startTime")) + if (typeof message.startTime === "number") + object.startTime = options.longs === String ? String(message.startTime) : message.startTime; + else + object.startTime = options.longs === String ? $util.Long.prototype.toString.call(message.startTime) : options.longs === Number ? new $util.LongBits(message.startTime.low >>> 0, message.startTime.high >>> 0).toNumber() : message.startTime; + return object; + }; + + /** + * Converts this ContinuousVestingAccount to JSON. + * @function toJSON + * @memberof cosmos.vesting.v1beta1.ContinuousVestingAccount + * @instance + * @returns {Object.} JSON object + */ + ContinuousVestingAccount.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ContinuousVestingAccount; + })(v1beta1.ContinuousVestingAccount || {}); + + v1beta1.DelayedVestingAccount = (function(DelayedVestingAccount) { + + /** + * Properties of a DelayedVestingAccount. + * @memberof cosmos.vesting.v1beta1 + * @interface IDelayedVestingAccount + * @property {cosmos.vesting.v1beta1.IBaseVestingAccount|null} [baseVestingAccount] DelayedVestingAccount baseVestingAccount + */ + + /** + * Constructs a new DelayedVestingAccount. + * @memberof cosmos.vesting.v1beta1 + * @classdesc Represents a DelayedVestingAccount. + * @implements IDelayedVestingAccount + * @constructor + * @param {cosmos.vesting.v1beta1.IDelayedVestingAccount=} [properties] Properties to set + */ + function DelayedVestingAccount(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DelayedVestingAccount baseVestingAccount. + * @member {cosmos.vesting.v1beta1.IBaseVestingAccount|null|undefined} baseVestingAccount + * @memberof cosmos.vesting.v1beta1.DelayedVestingAccount + * @instance + */ + DelayedVestingAccount.prototype.baseVestingAccount = null; + + /** + * Creates a new DelayedVestingAccount instance using the specified properties. + * @function create + * @memberof cosmos.vesting.v1beta1.DelayedVestingAccount + * @static + * @param {cosmos.vesting.v1beta1.IDelayedVestingAccount=} [properties] Properties to set + * @returns {cosmos.vesting.v1beta1.DelayedVestingAccount} DelayedVestingAccount instance + */ + DelayedVestingAccount.create = function create(properties) { + return new DelayedVestingAccount(properties); + }; + + /** + * Encodes the specified DelayedVestingAccount message. Does not implicitly {@link cosmos.vesting.v1beta1.DelayedVestingAccount.verify|verify} messages. + * @function encode + * @memberof cosmos.vesting.v1beta1.DelayedVestingAccount + * @static + * @param {cosmos.vesting.v1beta1.IDelayedVestingAccount} message DelayedVestingAccount message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DelayedVestingAccount.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.baseVestingAccount != null && Object.hasOwnProperty.call(message, "baseVestingAccount")) + $root.cosmos.vesting.v1beta1.BaseVestingAccount.encode(message.baseVestingAccount, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DelayedVestingAccount message, length delimited. Does not implicitly {@link cosmos.vesting.v1beta1.DelayedVestingAccount.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.vesting.v1beta1.DelayedVestingAccount + * @static + * @param {cosmos.vesting.v1beta1.IDelayedVestingAccount} message DelayedVestingAccount message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DelayedVestingAccount.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DelayedVestingAccount message from the specified reader or buffer. + * @function decode + * @memberof cosmos.vesting.v1beta1.DelayedVestingAccount + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.vesting.v1beta1.DelayedVestingAccount} DelayedVestingAccount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DelayedVestingAccount.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.vesting.v1beta1.DelayedVestingAccount(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.baseVestingAccount = $root.cosmos.vesting.v1beta1.BaseVestingAccount.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DelayedVestingAccount message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.vesting.v1beta1.DelayedVestingAccount + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.vesting.v1beta1.DelayedVestingAccount} DelayedVestingAccount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DelayedVestingAccount.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DelayedVestingAccount message. + * @function verify + * @memberof cosmos.vesting.v1beta1.DelayedVestingAccount + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DelayedVestingAccount.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.baseVestingAccount != null && message.hasOwnProperty("baseVestingAccount")) { + let error = $root.cosmos.vesting.v1beta1.BaseVestingAccount.verify(message.baseVestingAccount); + if (error) + return "baseVestingAccount." + error; + } + return null; + }; + + /** + * Creates a DelayedVestingAccount message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.vesting.v1beta1.DelayedVestingAccount + * @static + * @param {Object.} object Plain object + * @returns {cosmos.vesting.v1beta1.DelayedVestingAccount} DelayedVestingAccount + */ + DelayedVestingAccount.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.vesting.v1beta1.DelayedVestingAccount) + return object; + let message = new $root.cosmos.vesting.v1beta1.DelayedVestingAccount(); + if (object.baseVestingAccount != null) { + if (typeof object.baseVestingAccount !== "object") + throw TypeError(".cosmos.vesting.v1beta1.DelayedVestingAccount.baseVestingAccount: object expected"); + message.baseVestingAccount = $root.cosmos.vesting.v1beta1.BaseVestingAccount.fromObject(object.baseVestingAccount); + } + return message; + }; + + /** + * Creates a plain object from a DelayedVestingAccount message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.vesting.v1beta1.DelayedVestingAccount + * @static + * @param {cosmos.vesting.v1beta1.DelayedVestingAccount} message DelayedVestingAccount + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DelayedVestingAccount.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.baseVestingAccount = null; + if (message.baseVestingAccount != null && message.hasOwnProperty("baseVestingAccount")) + object.baseVestingAccount = $root.cosmos.vesting.v1beta1.BaseVestingAccount.toObject(message.baseVestingAccount, options); + return object; + }; + + /** + * Converts this DelayedVestingAccount to JSON. + * @function toJSON + * @memberof cosmos.vesting.v1beta1.DelayedVestingAccount + * @instance + * @returns {Object.} JSON object + */ + DelayedVestingAccount.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DelayedVestingAccount; + })(v1beta1.DelayedVestingAccount || {}); + + v1beta1.Period = (function(Period) { + + /** + * Properties of a Period. + * @memberof cosmos.vesting.v1beta1 + * @interface IPeriod + * @property {number|Long|null} [length] Period length + * @property {Array.|null} [amount] Period amount + */ + + /** + * Constructs a new Period. + * @memberof cosmos.vesting.v1beta1 + * @classdesc Represents a Period. + * @implements IPeriod + * @constructor + * @param {cosmos.vesting.v1beta1.IPeriod=} [properties] Properties to set + */ + function Period(properties) { + this.amount = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Period length. + * @member {number|Long} length + * @memberof cosmos.vesting.v1beta1.Period + * @instance + */ + Period.prototype.length = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Period amount. + * @member {Array.} amount + * @memberof cosmos.vesting.v1beta1.Period + * @instance + */ + Period.prototype.amount = $util.emptyArray; + + /** + * Creates a new Period instance using the specified properties. + * @function create + * @memberof cosmos.vesting.v1beta1.Period + * @static + * @param {cosmos.vesting.v1beta1.IPeriod=} [properties] Properties to set + * @returns {cosmos.vesting.v1beta1.Period} Period instance + */ + Period.create = function create(properties) { + return new Period(properties); + }; + + /** + * Encodes the specified Period message. Does not implicitly {@link cosmos.vesting.v1beta1.Period.verify|verify} messages. + * @function encode + * @memberof cosmos.vesting.v1beta1.Period + * @static + * @param {cosmos.vesting.v1beta1.IPeriod} message Period message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Period.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.length != null && Object.hasOwnProperty.call(message, "length")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.length); + if (message.amount != null && message.amount.length) + for (let i = 0; i < message.amount.length; ++i) + $root.cosmos.base.v1beta1.Coin.encode(message.amount[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Period message, length delimited. Does not implicitly {@link cosmos.vesting.v1beta1.Period.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.vesting.v1beta1.Period + * @static + * @param {cosmos.vesting.v1beta1.IPeriod} message Period message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Period.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Period message from the specified reader or buffer. + * @function decode + * @memberof cosmos.vesting.v1beta1.Period + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.vesting.v1beta1.Period} Period + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Period.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.vesting.v1beta1.Period(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.length = reader.int64(); + break; + case 2: + if (!(message.amount && message.amount.length)) + message.amount = []; + message.amount.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Period message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.vesting.v1beta1.Period + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.vesting.v1beta1.Period} Period + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Period.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Period message. + * @function verify + * @memberof cosmos.vesting.v1beta1.Period + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Period.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.length != null && message.hasOwnProperty("length")) + if (!$util.isInteger(message.length) && !(message.length && $util.isInteger(message.length.low) && $util.isInteger(message.length.high))) + return "length: integer|Long expected"; + if (message.amount != null && message.hasOwnProperty("amount")) { + if (!Array.isArray(message.amount)) + return "amount: array expected"; + for (let i = 0; i < message.amount.length; ++i) { + let error = $root.cosmos.base.v1beta1.Coin.verify(message.amount[i]); + if (error) + return "amount." + error; + } + } + return null; + }; + + /** + * Creates a Period message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.vesting.v1beta1.Period + * @static + * @param {Object.} object Plain object + * @returns {cosmos.vesting.v1beta1.Period} Period + */ + Period.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.vesting.v1beta1.Period) + return object; + let message = new $root.cosmos.vesting.v1beta1.Period(); + if (object.length != null) + if ($util.Long) + (message.length = $util.Long.fromValue(object.length)).unsigned = false; + else if (typeof object.length === "string") + message.length = parseInt(object.length, 10); + else if (typeof object.length === "number") + message.length = object.length; + else if (typeof object.length === "object") + message.length = new $util.LongBits(object.length.low >>> 0, object.length.high >>> 0).toNumber(); + if (object.amount) { + if (!Array.isArray(object.amount)) + throw TypeError(".cosmos.vesting.v1beta1.Period.amount: array expected"); + message.amount = []; + for (let i = 0; i < object.amount.length; ++i) { + if (typeof object.amount[i] !== "object") + throw TypeError(".cosmos.vesting.v1beta1.Period.amount: object expected"); + message.amount[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.amount[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Period message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.vesting.v1beta1.Period + * @static + * @param {cosmos.vesting.v1beta1.Period} message Period + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Period.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.amount = []; + if (options.defaults) + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.length = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.length = options.longs === String ? "0" : 0; + if (message.length != null && message.hasOwnProperty("length")) + if (typeof message.length === "number") + object.length = options.longs === String ? String(message.length) : message.length; + else + object.length = options.longs === String ? $util.Long.prototype.toString.call(message.length) : options.longs === Number ? new $util.LongBits(message.length.low >>> 0, message.length.high >>> 0).toNumber() : message.length; + if (message.amount && message.amount.length) { + object.amount = []; + for (let j = 0; j < message.amount.length; ++j) + object.amount[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.amount[j], options); + } + return object; + }; + + /** + * Converts this Period to JSON. + * @function toJSON + * @memberof cosmos.vesting.v1beta1.Period + * @instance + * @returns {Object.} JSON object + */ + Period.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Period; + })(v1beta1.Period || {}); + + v1beta1.PeriodicVestingAccount = (function(PeriodicVestingAccount) { + + /** + * Properties of a PeriodicVestingAccount. + * @memberof cosmos.vesting.v1beta1 + * @interface IPeriodicVestingAccount + * @property {cosmos.vesting.v1beta1.IBaseVestingAccount|null} [baseVestingAccount] PeriodicVestingAccount baseVestingAccount + * @property {number|Long|null} [startTime] PeriodicVestingAccount startTime + * @property {Array.|null} [vestingPeriods] PeriodicVestingAccount vestingPeriods + */ + + /** + * Constructs a new PeriodicVestingAccount. + * @memberof cosmos.vesting.v1beta1 + * @classdesc Represents a PeriodicVestingAccount. + * @implements IPeriodicVestingAccount + * @constructor + * @param {cosmos.vesting.v1beta1.IPeriodicVestingAccount=} [properties] Properties to set + */ + function PeriodicVestingAccount(properties) { + this.vestingPeriods = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PeriodicVestingAccount baseVestingAccount. + * @member {cosmos.vesting.v1beta1.IBaseVestingAccount|null|undefined} baseVestingAccount + * @memberof cosmos.vesting.v1beta1.PeriodicVestingAccount + * @instance + */ + PeriodicVestingAccount.prototype.baseVestingAccount = null; + + /** + * PeriodicVestingAccount startTime. + * @member {number|Long} startTime + * @memberof cosmos.vesting.v1beta1.PeriodicVestingAccount + * @instance + */ + PeriodicVestingAccount.prototype.startTime = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * PeriodicVestingAccount vestingPeriods. + * @member {Array.} vestingPeriods + * @memberof cosmos.vesting.v1beta1.PeriodicVestingAccount + * @instance + */ + PeriodicVestingAccount.prototype.vestingPeriods = $util.emptyArray; + + /** + * Creates a new PeriodicVestingAccount instance using the specified properties. + * @function create + * @memberof cosmos.vesting.v1beta1.PeriodicVestingAccount + * @static + * @param {cosmos.vesting.v1beta1.IPeriodicVestingAccount=} [properties] Properties to set + * @returns {cosmos.vesting.v1beta1.PeriodicVestingAccount} PeriodicVestingAccount instance + */ + PeriodicVestingAccount.create = function create(properties) { + return new PeriodicVestingAccount(properties); + }; + + /** + * Encodes the specified PeriodicVestingAccount message. Does not implicitly {@link cosmos.vesting.v1beta1.PeriodicVestingAccount.verify|verify} messages. + * @function encode + * @memberof cosmos.vesting.v1beta1.PeriodicVestingAccount + * @static + * @param {cosmos.vesting.v1beta1.IPeriodicVestingAccount} message PeriodicVestingAccount message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PeriodicVestingAccount.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.baseVestingAccount != null && Object.hasOwnProperty.call(message, "baseVestingAccount")) + $root.cosmos.vesting.v1beta1.BaseVestingAccount.encode(message.baseVestingAccount, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.startTime); + if (message.vestingPeriods != null && message.vestingPeriods.length) + for (let i = 0; i < message.vestingPeriods.length; ++i) + $root.cosmos.vesting.v1beta1.Period.encode(message.vestingPeriods[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PeriodicVestingAccount message, length delimited. Does not implicitly {@link cosmos.vesting.v1beta1.PeriodicVestingAccount.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.vesting.v1beta1.PeriodicVestingAccount + * @static + * @param {cosmos.vesting.v1beta1.IPeriodicVestingAccount} message PeriodicVestingAccount message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PeriodicVestingAccount.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PeriodicVestingAccount message from the specified reader or buffer. + * @function decode + * @memberof cosmos.vesting.v1beta1.PeriodicVestingAccount + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.vesting.v1beta1.PeriodicVestingAccount} PeriodicVestingAccount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PeriodicVestingAccount.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.vesting.v1beta1.PeriodicVestingAccount(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.baseVestingAccount = $root.cosmos.vesting.v1beta1.BaseVestingAccount.decode(reader, reader.uint32()); + break; + case 2: + message.startTime = reader.int64(); + break; + case 3: + if (!(message.vestingPeriods && message.vestingPeriods.length)) + message.vestingPeriods = []; + message.vestingPeriods.push($root.cosmos.vesting.v1beta1.Period.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PeriodicVestingAccount message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.vesting.v1beta1.PeriodicVestingAccount + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.vesting.v1beta1.PeriodicVestingAccount} PeriodicVestingAccount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PeriodicVestingAccount.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PeriodicVestingAccount message. + * @function verify + * @memberof cosmos.vesting.v1beta1.PeriodicVestingAccount + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PeriodicVestingAccount.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.baseVestingAccount != null && message.hasOwnProperty("baseVestingAccount")) { + let error = $root.cosmos.vesting.v1beta1.BaseVestingAccount.verify(message.baseVestingAccount); + if (error) + return "baseVestingAccount." + error; + } + if (message.startTime != null && message.hasOwnProperty("startTime")) + if (!$util.isInteger(message.startTime) && !(message.startTime && $util.isInteger(message.startTime.low) && $util.isInteger(message.startTime.high))) + return "startTime: integer|Long expected"; + if (message.vestingPeriods != null && message.hasOwnProperty("vestingPeriods")) { + if (!Array.isArray(message.vestingPeriods)) + return "vestingPeriods: array expected"; + for (let i = 0; i < message.vestingPeriods.length; ++i) { + let error = $root.cosmos.vesting.v1beta1.Period.verify(message.vestingPeriods[i]); + if (error) + return "vestingPeriods." + error; + } + } + return null; + }; + + /** + * Creates a PeriodicVestingAccount message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.vesting.v1beta1.PeriodicVestingAccount + * @static + * @param {Object.} object Plain object + * @returns {cosmos.vesting.v1beta1.PeriodicVestingAccount} PeriodicVestingAccount + */ + PeriodicVestingAccount.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.vesting.v1beta1.PeriodicVestingAccount) + return object; + let message = new $root.cosmos.vesting.v1beta1.PeriodicVestingAccount(); + if (object.baseVestingAccount != null) { + if (typeof object.baseVestingAccount !== "object") + throw TypeError(".cosmos.vesting.v1beta1.PeriodicVestingAccount.baseVestingAccount: object expected"); + message.baseVestingAccount = $root.cosmos.vesting.v1beta1.BaseVestingAccount.fromObject(object.baseVestingAccount); + } + if (object.startTime != null) + if ($util.Long) + (message.startTime = $util.Long.fromValue(object.startTime)).unsigned = false; + else if (typeof object.startTime === "string") + message.startTime = parseInt(object.startTime, 10); + else if (typeof object.startTime === "number") + message.startTime = object.startTime; + else if (typeof object.startTime === "object") + message.startTime = new $util.LongBits(object.startTime.low >>> 0, object.startTime.high >>> 0).toNumber(); + if (object.vestingPeriods) { + if (!Array.isArray(object.vestingPeriods)) + throw TypeError(".cosmos.vesting.v1beta1.PeriodicVestingAccount.vestingPeriods: array expected"); + message.vestingPeriods = []; + for (let i = 0; i < object.vestingPeriods.length; ++i) { + if (typeof object.vestingPeriods[i] !== "object") + throw TypeError(".cosmos.vesting.v1beta1.PeriodicVestingAccount.vestingPeriods: object expected"); + message.vestingPeriods[i] = $root.cosmos.vesting.v1beta1.Period.fromObject(object.vestingPeriods[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a PeriodicVestingAccount message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.vesting.v1beta1.PeriodicVestingAccount + * @static + * @param {cosmos.vesting.v1beta1.PeriodicVestingAccount} message PeriodicVestingAccount + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PeriodicVestingAccount.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.vestingPeriods = []; + if (options.defaults) { + object.baseVestingAccount = null; + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.startTime = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.startTime = options.longs === String ? "0" : 0; + } + if (message.baseVestingAccount != null && message.hasOwnProperty("baseVestingAccount")) + object.baseVestingAccount = $root.cosmos.vesting.v1beta1.BaseVestingAccount.toObject(message.baseVestingAccount, options); + if (message.startTime != null && message.hasOwnProperty("startTime")) + if (typeof message.startTime === "number") + object.startTime = options.longs === String ? String(message.startTime) : message.startTime; + else + object.startTime = options.longs === String ? $util.Long.prototype.toString.call(message.startTime) : options.longs === Number ? new $util.LongBits(message.startTime.low >>> 0, message.startTime.high >>> 0).toNumber() : message.startTime; + if (message.vestingPeriods && message.vestingPeriods.length) { + object.vestingPeriods = []; + for (let j = 0; j < message.vestingPeriods.length; ++j) + object.vestingPeriods[j] = $root.cosmos.vesting.v1beta1.Period.toObject(message.vestingPeriods[j], options); + } + return object; + }; + + /** + * Converts this PeriodicVestingAccount to JSON. + * @function toJSON + * @memberof cosmos.vesting.v1beta1.PeriodicVestingAccount + * @instance + * @returns {Object.} JSON object + */ + PeriodicVestingAccount.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PeriodicVestingAccount; + })(v1beta1.PeriodicVestingAccount || {}); + + return v1beta1; + })(vesting.v1beta1 || {}); + + return vesting; + })(cosmos.vesting || {}); + + return cosmos; +})($root.cosmos || {}); + +/** + * Namespace google. + * @exports google + * @namespace + */ + +export const google = $root.google = ((google) => { + + /** + * Namespace protobuf. + * @memberof google + * @namespace + */ + + google.protobuf = (function(protobuf) { + + protobuf.Any = (function(Any) { + + /** + * Properties of an Any. + * @memberof google.protobuf + * @interface IAny + * @property {string|null} [type_url] Any type_url + * @property {Uint8Array|null} [value] Any value + */ + + /** + * Constructs a new Any. + * @memberof google.protobuf + * @classdesc Represents an Any. + * @implements IAny + * @constructor + * @param {google.protobuf.IAny=} [properties] Properties to set + */ + function Any(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Any type_url. + * @member {string} type_url + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.type_url = ""; + + /** + * Any value. + * @member {Uint8Array} value + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.value = $util.newBuffer([]); + + /** + * Creates a new Any instance using the specified properties. + * @function create + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny=} [properties] Properties to set + * @returns {google.protobuf.Any} Any instance + */ + Any.create = function create(properties) { + return new Any(properties); + }; + + /** + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Any.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type_url != null && Object.hasOwnProperty.call(message, "type_url")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type_url); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); + return writer; + }; + + /** + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Any.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Any message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Any + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Any} Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Any.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Any(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type_url = reader.string(); + break; + case 2: + message.value = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Any message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Any + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Any} Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Any.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Any message. + * @function verify + * @memberof google.protobuf.Any + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Any.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type_url != null && message.hasOwnProperty("type_url")) + if (!$util.isString(message.type_url)) + return "type_url: string expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; + return null; + }; + + /** + * Creates an Any message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Any + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Any} Any + */ + Any.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Any) + return object; + let message = new $root.google.protobuf.Any(); + if (object.type_url != null) + message.type_url = String(object.type_url); + if (object.value != null) + if (typeof object.value === "string") + $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); + else if (object.value.length) + message.value = object.value; + return message; + }; + + /** + * Creates a plain object from an Any message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.Any} message Any + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Any.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.type_url = ""; + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + } + if (message.type_url != null && message.hasOwnProperty("type_url")) + object.type_url = message.type_url; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + return object; + }; + + /** + * Converts this Any to JSON. + * @function toJSON + * @memberof google.protobuf.Any + * @instance + * @returns {Object.} JSON object + */ + Any.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Any; + })(protobuf.Any || {}); + + protobuf.Timestamp = (function(Timestamp) { + + /** + * Properties of a Timestamp. + * @memberof google.protobuf + * @interface ITimestamp + * @property {number|Long|null} [seconds] Timestamp seconds + * @property {number|null} [nanos] Timestamp nanos + */ + + /** + * Constructs a new Timestamp. + * @memberof google.protobuf + * @classdesc Represents a Timestamp. + * @implements ITimestamp + * @constructor + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + */ + function Timestamp(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Timestamp seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Timestamp nanos. + * @member {number} nanos + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.nanos = 0; + + /** + * Creates a new Timestamp instance using the specified properties. + * @function create + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + * @returns {google.protobuf.Timestamp} Timestamp instance + */ + Timestamp.create = function create(properties) { + return new Timestamp(properties); + }; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.seconds = reader.int64(); + break; + case 2: + message.nanos = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Timestamp message. + * @function verify + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Timestamp.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Timestamp} Timestamp + */ + Timestamp.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Timestamp) + return object; + let message = new $root.google.protobuf.Timestamp(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.Timestamp} message Timestamp + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Timestamp.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Timestamp to JSON. + * @function toJSON + * @memberof google.protobuf.Timestamp + * @instance + * @returns {Object.} JSON object + */ + Timestamp.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Timestamp; + })(protobuf.Timestamp || {}); + + protobuf.Duration = (function(Duration) { + + /** + * Properties of a Duration. + * @memberof google.protobuf + * @interface IDuration + * @property {number|Long|null} [seconds] Duration seconds + * @property {number|null} [nanos] Duration nanos + */ + + /** + * Constructs a new Duration. + * @memberof google.protobuf + * @classdesc Represents a Duration. + * @implements IDuration + * @constructor + * @param {google.protobuf.IDuration=} [properties] Properties to set + */ + function Duration(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Duration seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Duration nanos. + * @member {number} nanos + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.nanos = 0; + + /** + * Creates a new Duration instance using the specified properties. + * @function create + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration=} [properties] Properties to set + * @returns {google.protobuf.Duration} Duration instance + */ + Duration.create = function create(properties) { + return new Duration(properties); + }; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.seconds = reader.int64(); + break; + case 2: + message.nanos = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Duration message. + * @function verify + * @memberof google.protobuf.Duration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Duration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Duration + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Duration} Duration + */ + Duration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Duration) + return object; + let message = new $root.google.protobuf.Duration(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.Duration} message Duration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Duration.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Duration to JSON. + * @function toJSON + * @memberof google.protobuf.Duration + * @instance + * @returns {Object.} JSON object + */ + Duration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Duration; + })(protobuf.Duration || {}); + + return protobuf; + })(google.protobuf || {}); + + return google; +})($root.google || {}); + +/** + * Namespace ibc. + * @exports ibc + * @namespace + */ + +export const ibc = $root.ibc = ((ibc) => { + + /** + * Namespace applications. + * @memberof ibc + * @namespace + */ + + ibc.applications = (function(applications) { + + /** + * Namespace transfer. + * @memberof ibc.applications + * @namespace + */ + + applications.transfer = (function(transfer) { + + /** + * Namespace v1. + * @memberof ibc.applications.transfer + * @namespace + */ + + transfer.v1 = (function(v1) { + + v1.GenesisState = (function(GenesisState) { + + /** + * Properties of a GenesisState. + * @memberof ibc.applications.transfer.v1 + * @interface IGenesisState + * @property {string|null} [portId] GenesisState portId + * @property {Array.|null} [denomTraces] GenesisState denomTraces + * @property {ibc.applications.transfer.v1.IParams|null} [params] GenesisState params + */ + + /** + * Constructs a new GenesisState. + * @memberof ibc.applications.transfer.v1 + * @classdesc Represents a GenesisState. + * @implements IGenesisState + * @constructor + * @param {ibc.applications.transfer.v1.IGenesisState=} [properties] Properties to set + */ + function GenesisState(properties) { + this.denomTraces = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GenesisState portId. + * @member {string} portId + * @memberof ibc.applications.transfer.v1.GenesisState + * @instance + */ + GenesisState.prototype.portId = ""; + + /** + * GenesisState denomTraces. + * @member {Array.} denomTraces + * @memberof ibc.applications.transfer.v1.GenesisState + * @instance + */ + GenesisState.prototype.denomTraces = $util.emptyArray; + + /** + * GenesisState params. + * @member {ibc.applications.transfer.v1.IParams|null|undefined} params + * @memberof ibc.applications.transfer.v1.GenesisState + * @instance + */ + GenesisState.prototype.params = null; + + /** + * Creates a new GenesisState instance using the specified properties. + * @function create + * @memberof ibc.applications.transfer.v1.GenesisState + * @static + * @param {ibc.applications.transfer.v1.IGenesisState=} [properties] Properties to set + * @returns {ibc.applications.transfer.v1.GenesisState} GenesisState instance + */ + GenesisState.create = function create(properties) { + return new GenesisState(properties); + }; + + /** + * Encodes the specified GenesisState message. Does not implicitly {@link ibc.applications.transfer.v1.GenesisState.verify|verify} messages. + * @function encode + * @memberof ibc.applications.transfer.v1.GenesisState + * @static + * @param {ibc.applications.transfer.v1.IGenesisState} message GenesisState message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenesisState.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.portId != null && Object.hasOwnProperty.call(message, "portId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.portId); + if (message.denomTraces != null && message.denomTraces.length) + for (let i = 0; i < message.denomTraces.length; ++i) + $root.ibc.applications.transfer.v1.DenomTrace.encode(message.denomTraces[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.params != null && Object.hasOwnProperty.call(message, "params")) + $root.ibc.applications.transfer.v1.Params.encode(message.params, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GenesisState message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.GenesisState.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.applications.transfer.v1.GenesisState + * @static + * @param {ibc.applications.transfer.v1.IGenesisState} message GenesisState message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenesisState.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GenesisState message from the specified reader or buffer. + * @function decode + * @memberof ibc.applications.transfer.v1.GenesisState + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.applications.transfer.v1.GenesisState} GenesisState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenesisState.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.transfer.v1.GenesisState(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.portId = reader.string(); + break; + case 2: + if (!(message.denomTraces && message.denomTraces.length)) + message.denomTraces = []; + message.denomTraces.push($root.ibc.applications.transfer.v1.DenomTrace.decode(reader, reader.uint32())); + break; + case 3: + message.params = $root.ibc.applications.transfer.v1.Params.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GenesisState message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.applications.transfer.v1.GenesisState + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.applications.transfer.v1.GenesisState} GenesisState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenesisState.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GenesisState message. + * @function verify + * @memberof ibc.applications.transfer.v1.GenesisState + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GenesisState.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.portId != null && message.hasOwnProperty("portId")) + if (!$util.isString(message.portId)) + return "portId: string expected"; + if (message.denomTraces != null && message.hasOwnProperty("denomTraces")) { + if (!Array.isArray(message.denomTraces)) + return "denomTraces: array expected"; + for (let i = 0; i < message.denomTraces.length; ++i) { + let error = $root.ibc.applications.transfer.v1.DenomTrace.verify(message.denomTraces[i]); + if (error) + return "denomTraces." + error; + } + } + if (message.params != null && message.hasOwnProperty("params")) { + let error = $root.ibc.applications.transfer.v1.Params.verify(message.params); + if (error) + return "params." + error; + } + return null; + }; + + /** + * Creates a GenesisState message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.applications.transfer.v1.GenesisState + * @static + * @param {Object.} object Plain object + * @returns {ibc.applications.transfer.v1.GenesisState} GenesisState + */ + GenesisState.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.applications.transfer.v1.GenesisState) + return object; + let message = new $root.ibc.applications.transfer.v1.GenesisState(); + if (object.portId != null) + message.portId = String(object.portId); + if (object.denomTraces) { + if (!Array.isArray(object.denomTraces)) + throw TypeError(".ibc.applications.transfer.v1.GenesisState.denomTraces: array expected"); + message.denomTraces = []; + for (let i = 0; i < object.denomTraces.length; ++i) { + if (typeof object.denomTraces[i] !== "object") + throw TypeError(".ibc.applications.transfer.v1.GenesisState.denomTraces: object expected"); + message.denomTraces[i] = $root.ibc.applications.transfer.v1.DenomTrace.fromObject(object.denomTraces[i]); + } + } + if (object.params != null) { + if (typeof object.params !== "object") + throw TypeError(".ibc.applications.transfer.v1.GenesisState.params: object expected"); + message.params = $root.ibc.applications.transfer.v1.Params.fromObject(object.params); + } + return message; + }; + + /** + * Creates a plain object from a GenesisState message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.applications.transfer.v1.GenesisState + * @static + * @param {ibc.applications.transfer.v1.GenesisState} message GenesisState + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GenesisState.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.denomTraces = []; + if (options.defaults) { + object.portId = ""; + object.params = null; + } + if (message.portId != null && message.hasOwnProperty("portId")) + object.portId = message.portId; + if (message.denomTraces && message.denomTraces.length) { + object.denomTraces = []; + for (let j = 0; j < message.denomTraces.length; ++j) + object.denomTraces[j] = $root.ibc.applications.transfer.v1.DenomTrace.toObject(message.denomTraces[j], options); + } + if (message.params != null && message.hasOwnProperty("params")) + object.params = $root.ibc.applications.transfer.v1.Params.toObject(message.params, options); + return object; + }; + + /** + * Converts this GenesisState to JSON. + * @function toJSON + * @memberof ibc.applications.transfer.v1.GenesisState + * @instance + * @returns {Object.} JSON object + */ + GenesisState.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GenesisState; + })(v1.GenesisState || {}); + + v1.Query = (function(Query) { + + /** + * Constructs a new Query service. + * @memberof ibc.applications.transfer.v1 + * @classdesc Represents a Query + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Query(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Query.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Query; + + /** + * Creates new Query service using the specified rpc implementation. + * @function create + * @memberof ibc.applications.transfer.v1.Query + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Query} RPC service. Useful where requests and/or responses are streamed. + */ + Query.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link ibc.applications.transfer.v1.Query#denomTrace}. + * @memberof ibc.applications.transfer.v1.Query + * @typedef DenomTraceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {ibc.applications.transfer.v1.IQueryDenomTraceResponse} [response] QueryDenomTraceResponse + */ + + /** + * Calls DenomTrace. + * @function denomTrace + * @memberof ibc.applications.transfer.v1.Query + * @instance + * @param {ibc.applications.transfer.v1.IQueryDenomTraceRequest} request QueryDenomTraceRequest message or plain object + * @param {ibc.applications.transfer.v1.Query.DenomTraceCallback} callback Node-style callback called with the error, if any, and QueryDenomTraceResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.denomTrace = function denomTrace(request, callback) { + return this.rpcCall(denomTrace, $root.ibc.applications.transfer.v1.QueryDenomTraceRequest, $root.ibc.applications.transfer.v1.QueryDenomTraceResponse, request, callback); + }, "name", { value: "DenomTrace" }); + + /** + * Calls DenomTrace. + * @function denomTrace + * @memberof ibc.applications.transfer.v1.Query + * @instance + * @param {ibc.applications.transfer.v1.IQueryDenomTraceRequest} request QueryDenomTraceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link ibc.applications.transfer.v1.Query#denomTraces}. + * @memberof ibc.applications.transfer.v1.Query + * @typedef DenomTracesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {ibc.applications.transfer.v1.IQueryDenomTracesResponse} [response] QueryDenomTracesResponse + */ + + /** + * Calls DenomTraces. + * @function denomTraces + * @memberof ibc.applications.transfer.v1.Query + * @instance + * @param {ibc.applications.transfer.v1.IQueryDenomTracesRequest} request QueryDenomTracesRequest message or plain object + * @param {ibc.applications.transfer.v1.Query.DenomTracesCallback} callback Node-style callback called with the error, if any, and QueryDenomTracesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.denomTraces = function denomTraces(request, callback) { + return this.rpcCall(denomTraces, $root.ibc.applications.transfer.v1.QueryDenomTracesRequest, $root.ibc.applications.transfer.v1.QueryDenomTracesResponse, request, callback); + }, "name", { value: "DenomTraces" }); + + /** + * Calls DenomTraces. + * @function denomTraces + * @memberof ibc.applications.transfer.v1.Query + * @instance + * @param {ibc.applications.transfer.v1.IQueryDenomTracesRequest} request QueryDenomTracesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link ibc.applications.transfer.v1.Query#params}. + * @memberof ibc.applications.transfer.v1.Query + * @typedef ParamsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {ibc.applications.transfer.v1.IQueryParamsResponse} [response] QueryParamsResponse + */ + + /** + * Calls Params. + * @function params + * @memberof ibc.applications.transfer.v1.Query + * @instance + * @param {ibc.applications.transfer.v1.IQueryParamsRequest} request QueryParamsRequest message or plain object + * @param {ibc.applications.transfer.v1.Query.ParamsCallback} callback Node-style callback called with the error, if any, and QueryParamsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.params = function params(request, callback) { + return this.rpcCall(params, $root.ibc.applications.transfer.v1.QueryParamsRequest, $root.ibc.applications.transfer.v1.QueryParamsResponse, request, callback); + }, "name", { value: "Params" }); + + /** + * Calls Params. + * @function params + * @memberof ibc.applications.transfer.v1.Query + * @instance + * @param {ibc.applications.transfer.v1.IQueryParamsRequest} request QueryParamsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Query; + })(v1.Query || {}); + + v1.QueryDenomTraceRequest = (function(QueryDenomTraceRequest) { + + /** + * Properties of a QueryDenomTraceRequest. + * @memberof ibc.applications.transfer.v1 + * @interface IQueryDenomTraceRequest + * @property {string|null} [hash] QueryDenomTraceRequest hash + */ + + /** + * Constructs a new QueryDenomTraceRequest. + * @memberof ibc.applications.transfer.v1 + * @classdesc Represents a QueryDenomTraceRequest. + * @implements IQueryDenomTraceRequest + * @constructor + * @param {ibc.applications.transfer.v1.IQueryDenomTraceRequest=} [properties] Properties to set + */ + function QueryDenomTraceRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryDenomTraceRequest hash. + * @member {string} hash + * @memberof ibc.applications.transfer.v1.QueryDenomTraceRequest + * @instance + */ + QueryDenomTraceRequest.prototype.hash = ""; + + /** + * Creates a new QueryDenomTraceRequest instance using the specified properties. + * @function create + * @memberof ibc.applications.transfer.v1.QueryDenomTraceRequest + * @static + * @param {ibc.applications.transfer.v1.IQueryDenomTraceRequest=} [properties] Properties to set + * @returns {ibc.applications.transfer.v1.QueryDenomTraceRequest} QueryDenomTraceRequest instance + */ + QueryDenomTraceRequest.create = function create(properties) { + return new QueryDenomTraceRequest(properties); + }; + + /** + * Encodes the specified QueryDenomTraceRequest message. Does not implicitly {@link ibc.applications.transfer.v1.QueryDenomTraceRequest.verify|verify} messages. + * @function encode + * @memberof ibc.applications.transfer.v1.QueryDenomTraceRequest + * @static + * @param {ibc.applications.transfer.v1.IQueryDenomTraceRequest} message QueryDenomTraceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDenomTraceRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.hash != null && Object.hasOwnProperty.call(message, "hash")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.hash); + return writer; + }; + + /** + * Encodes the specified QueryDenomTraceRequest message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.QueryDenomTraceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.applications.transfer.v1.QueryDenomTraceRequest + * @static + * @param {ibc.applications.transfer.v1.IQueryDenomTraceRequest} message QueryDenomTraceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDenomTraceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryDenomTraceRequest message from the specified reader or buffer. + * @function decode + * @memberof ibc.applications.transfer.v1.QueryDenomTraceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.applications.transfer.v1.QueryDenomTraceRequest} QueryDenomTraceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDenomTraceRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.transfer.v1.QueryDenomTraceRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.hash = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryDenomTraceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.applications.transfer.v1.QueryDenomTraceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.applications.transfer.v1.QueryDenomTraceRequest} QueryDenomTraceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDenomTraceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryDenomTraceRequest message. + * @function verify + * @memberof ibc.applications.transfer.v1.QueryDenomTraceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryDenomTraceRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.hash != null && message.hasOwnProperty("hash")) + if (!$util.isString(message.hash)) + return "hash: string expected"; + return null; + }; + + /** + * Creates a QueryDenomTraceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.applications.transfer.v1.QueryDenomTraceRequest + * @static + * @param {Object.} object Plain object + * @returns {ibc.applications.transfer.v1.QueryDenomTraceRequest} QueryDenomTraceRequest + */ + QueryDenomTraceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.applications.transfer.v1.QueryDenomTraceRequest) + return object; + let message = new $root.ibc.applications.transfer.v1.QueryDenomTraceRequest(); + if (object.hash != null) + message.hash = String(object.hash); + return message; + }; + + /** + * Creates a plain object from a QueryDenomTraceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.applications.transfer.v1.QueryDenomTraceRequest + * @static + * @param {ibc.applications.transfer.v1.QueryDenomTraceRequest} message QueryDenomTraceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryDenomTraceRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.hash = ""; + if (message.hash != null && message.hasOwnProperty("hash")) + object.hash = message.hash; + return object; + }; + + /** + * Converts this QueryDenomTraceRequest to JSON. + * @function toJSON + * @memberof ibc.applications.transfer.v1.QueryDenomTraceRequest + * @instance + * @returns {Object.} JSON object + */ + QueryDenomTraceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryDenomTraceRequest; + })(v1.QueryDenomTraceRequest || {}); + + v1.QueryDenomTraceResponse = (function(QueryDenomTraceResponse) { + + /** + * Properties of a QueryDenomTraceResponse. + * @memberof ibc.applications.transfer.v1 + * @interface IQueryDenomTraceResponse + * @property {ibc.applications.transfer.v1.IDenomTrace|null} [denomTrace] QueryDenomTraceResponse denomTrace + */ + + /** + * Constructs a new QueryDenomTraceResponse. + * @memberof ibc.applications.transfer.v1 + * @classdesc Represents a QueryDenomTraceResponse. + * @implements IQueryDenomTraceResponse + * @constructor + * @param {ibc.applications.transfer.v1.IQueryDenomTraceResponse=} [properties] Properties to set + */ + function QueryDenomTraceResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryDenomTraceResponse denomTrace. + * @member {ibc.applications.transfer.v1.IDenomTrace|null|undefined} denomTrace + * @memberof ibc.applications.transfer.v1.QueryDenomTraceResponse + * @instance + */ + QueryDenomTraceResponse.prototype.denomTrace = null; + + /** + * Creates a new QueryDenomTraceResponse instance using the specified properties. + * @function create + * @memberof ibc.applications.transfer.v1.QueryDenomTraceResponse + * @static + * @param {ibc.applications.transfer.v1.IQueryDenomTraceResponse=} [properties] Properties to set + * @returns {ibc.applications.transfer.v1.QueryDenomTraceResponse} QueryDenomTraceResponse instance + */ + QueryDenomTraceResponse.create = function create(properties) { + return new QueryDenomTraceResponse(properties); + }; + + /** + * Encodes the specified QueryDenomTraceResponse message. Does not implicitly {@link ibc.applications.transfer.v1.QueryDenomTraceResponse.verify|verify} messages. + * @function encode + * @memberof ibc.applications.transfer.v1.QueryDenomTraceResponse + * @static + * @param {ibc.applications.transfer.v1.IQueryDenomTraceResponse} message QueryDenomTraceResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDenomTraceResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.denomTrace != null && Object.hasOwnProperty.call(message, "denomTrace")) + $root.ibc.applications.transfer.v1.DenomTrace.encode(message.denomTrace, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryDenomTraceResponse message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.QueryDenomTraceResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.applications.transfer.v1.QueryDenomTraceResponse + * @static + * @param {ibc.applications.transfer.v1.IQueryDenomTraceResponse} message QueryDenomTraceResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDenomTraceResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryDenomTraceResponse message from the specified reader or buffer. + * @function decode + * @memberof ibc.applications.transfer.v1.QueryDenomTraceResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.applications.transfer.v1.QueryDenomTraceResponse} QueryDenomTraceResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDenomTraceResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.transfer.v1.QueryDenomTraceResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.denomTrace = $root.ibc.applications.transfer.v1.DenomTrace.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryDenomTraceResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.applications.transfer.v1.QueryDenomTraceResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.applications.transfer.v1.QueryDenomTraceResponse} QueryDenomTraceResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDenomTraceResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryDenomTraceResponse message. + * @function verify + * @memberof ibc.applications.transfer.v1.QueryDenomTraceResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryDenomTraceResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.denomTrace != null && message.hasOwnProperty("denomTrace")) { + let error = $root.ibc.applications.transfer.v1.DenomTrace.verify(message.denomTrace); + if (error) + return "denomTrace." + error; + } + return null; + }; + + /** + * Creates a QueryDenomTraceResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.applications.transfer.v1.QueryDenomTraceResponse + * @static + * @param {Object.} object Plain object + * @returns {ibc.applications.transfer.v1.QueryDenomTraceResponse} QueryDenomTraceResponse + */ + QueryDenomTraceResponse.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.applications.transfer.v1.QueryDenomTraceResponse) + return object; + let message = new $root.ibc.applications.transfer.v1.QueryDenomTraceResponse(); + if (object.denomTrace != null) { + if (typeof object.denomTrace !== "object") + throw TypeError(".ibc.applications.transfer.v1.QueryDenomTraceResponse.denomTrace: object expected"); + message.denomTrace = $root.ibc.applications.transfer.v1.DenomTrace.fromObject(object.denomTrace); + } + return message; + }; + + /** + * Creates a plain object from a QueryDenomTraceResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.applications.transfer.v1.QueryDenomTraceResponse + * @static + * @param {ibc.applications.transfer.v1.QueryDenomTraceResponse} message QueryDenomTraceResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryDenomTraceResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.denomTrace = null; + if (message.denomTrace != null && message.hasOwnProperty("denomTrace")) + object.denomTrace = $root.ibc.applications.transfer.v1.DenomTrace.toObject(message.denomTrace, options); + return object; + }; + + /** + * Converts this QueryDenomTraceResponse to JSON. + * @function toJSON + * @memberof ibc.applications.transfer.v1.QueryDenomTraceResponse + * @instance + * @returns {Object.} JSON object + */ + QueryDenomTraceResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryDenomTraceResponse; + })(v1.QueryDenomTraceResponse || {}); + + v1.QueryDenomTracesRequest = (function(QueryDenomTracesRequest) { + + /** + * Properties of a QueryDenomTracesRequest. + * @memberof ibc.applications.transfer.v1 + * @interface IQueryDenomTracesRequest + * @property {cosmos.base.query.v1beta1.IPageRequest|null} [pagination] QueryDenomTracesRequest pagination + */ + + /** + * Constructs a new QueryDenomTracesRequest. + * @memberof ibc.applications.transfer.v1 + * @classdesc Represents a QueryDenomTracesRequest. + * @implements IQueryDenomTracesRequest + * @constructor + * @param {ibc.applications.transfer.v1.IQueryDenomTracesRequest=} [properties] Properties to set + */ + function QueryDenomTracesRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryDenomTracesRequest pagination. + * @member {cosmos.base.query.v1beta1.IPageRequest|null|undefined} pagination + * @memberof ibc.applications.transfer.v1.QueryDenomTracesRequest + * @instance + */ + QueryDenomTracesRequest.prototype.pagination = null; + + /** + * Creates a new QueryDenomTracesRequest instance using the specified properties. + * @function create + * @memberof ibc.applications.transfer.v1.QueryDenomTracesRequest + * @static + * @param {ibc.applications.transfer.v1.IQueryDenomTracesRequest=} [properties] Properties to set + * @returns {ibc.applications.transfer.v1.QueryDenomTracesRequest} QueryDenomTracesRequest instance + */ + QueryDenomTracesRequest.create = function create(properties) { + return new QueryDenomTracesRequest(properties); + }; + + /** + * Encodes the specified QueryDenomTracesRequest message. Does not implicitly {@link ibc.applications.transfer.v1.QueryDenomTracesRequest.verify|verify} messages. + * @function encode + * @memberof ibc.applications.transfer.v1.QueryDenomTracesRequest + * @static + * @param {ibc.applications.transfer.v1.IQueryDenomTracesRequest} message QueryDenomTracesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDenomTracesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) + $root.cosmos.base.query.v1beta1.PageRequest.encode(message.pagination, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryDenomTracesRequest message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.QueryDenomTracesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.applications.transfer.v1.QueryDenomTracesRequest + * @static + * @param {ibc.applications.transfer.v1.IQueryDenomTracesRequest} message QueryDenomTracesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDenomTracesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryDenomTracesRequest message from the specified reader or buffer. + * @function decode + * @memberof ibc.applications.transfer.v1.QueryDenomTracesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.applications.transfer.v1.QueryDenomTracesRequest} QueryDenomTracesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDenomTracesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.transfer.v1.QueryDenomTracesRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryDenomTracesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.applications.transfer.v1.QueryDenomTracesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.applications.transfer.v1.QueryDenomTracesRequest} QueryDenomTracesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDenomTracesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryDenomTracesRequest message. + * @function verify + * @memberof ibc.applications.transfer.v1.QueryDenomTracesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryDenomTracesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.pagination != null && message.hasOwnProperty("pagination")) { + let error = $root.cosmos.base.query.v1beta1.PageRequest.verify(message.pagination); + if (error) + return "pagination." + error; + } + return null; + }; + + /** + * Creates a QueryDenomTracesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.applications.transfer.v1.QueryDenomTracesRequest + * @static + * @param {Object.} object Plain object + * @returns {ibc.applications.transfer.v1.QueryDenomTracesRequest} QueryDenomTracesRequest + */ + QueryDenomTracesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.applications.transfer.v1.QueryDenomTracesRequest) + return object; + let message = new $root.ibc.applications.transfer.v1.QueryDenomTracesRequest(); + if (object.pagination != null) { + if (typeof object.pagination !== "object") + throw TypeError(".ibc.applications.transfer.v1.QueryDenomTracesRequest.pagination: object expected"); + message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.fromObject(object.pagination); + } + return message; + }; + + /** + * Creates a plain object from a QueryDenomTracesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.applications.transfer.v1.QueryDenomTracesRequest + * @static + * @param {ibc.applications.transfer.v1.QueryDenomTracesRequest} message QueryDenomTracesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryDenomTracesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.pagination = null; + if (message.pagination != null && message.hasOwnProperty("pagination")) + object.pagination = $root.cosmos.base.query.v1beta1.PageRequest.toObject(message.pagination, options); + return object; + }; + + /** + * Converts this QueryDenomTracesRequest to JSON. + * @function toJSON + * @memberof ibc.applications.transfer.v1.QueryDenomTracesRequest + * @instance + * @returns {Object.} JSON object + */ + QueryDenomTracesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryDenomTracesRequest; + })(v1.QueryDenomTracesRequest || {}); + + v1.QueryDenomTracesResponse = (function(QueryDenomTracesResponse) { + + /** + * Properties of a QueryDenomTracesResponse. + * @memberof ibc.applications.transfer.v1 + * @interface IQueryDenomTracesResponse + * @property {Array.|null} [denomTraces] QueryDenomTracesResponse denomTraces + * @property {cosmos.base.query.v1beta1.IPageResponse|null} [pagination] QueryDenomTracesResponse pagination + */ + + /** + * Constructs a new QueryDenomTracesResponse. + * @memberof ibc.applications.transfer.v1 + * @classdesc Represents a QueryDenomTracesResponse. + * @implements IQueryDenomTracesResponse + * @constructor + * @param {ibc.applications.transfer.v1.IQueryDenomTracesResponse=} [properties] Properties to set + */ + function QueryDenomTracesResponse(properties) { + this.denomTraces = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryDenomTracesResponse denomTraces. + * @member {Array.} denomTraces + * @memberof ibc.applications.transfer.v1.QueryDenomTracesResponse + * @instance + */ + QueryDenomTracesResponse.prototype.denomTraces = $util.emptyArray; + + /** + * QueryDenomTracesResponse pagination. + * @member {cosmos.base.query.v1beta1.IPageResponse|null|undefined} pagination + * @memberof ibc.applications.transfer.v1.QueryDenomTracesResponse + * @instance + */ + QueryDenomTracesResponse.prototype.pagination = null; + + /** + * Creates a new QueryDenomTracesResponse instance using the specified properties. + * @function create + * @memberof ibc.applications.transfer.v1.QueryDenomTracesResponse + * @static + * @param {ibc.applications.transfer.v1.IQueryDenomTracesResponse=} [properties] Properties to set + * @returns {ibc.applications.transfer.v1.QueryDenomTracesResponse} QueryDenomTracesResponse instance + */ + QueryDenomTracesResponse.create = function create(properties) { + return new QueryDenomTracesResponse(properties); + }; + + /** + * Encodes the specified QueryDenomTracesResponse message. Does not implicitly {@link ibc.applications.transfer.v1.QueryDenomTracesResponse.verify|verify} messages. + * @function encode + * @memberof ibc.applications.transfer.v1.QueryDenomTracesResponse + * @static + * @param {ibc.applications.transfer.v1.IQueryDenomTracesResponse} message QueryDenomTracesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDenomTracesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.denomTraces != null && message.denomTraces.length) + for (let i = 0; i < message.denomTraces.length; ++i) + $root.ibc.applications.transfer.v1.DenomTrace.encode(message.denomTraces[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) + $root.cosmos.base.query.v1beta1.PageResponse.encode(message.pagination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryDenomTracesResponse message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.QueryDenomTracesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.applications.transfer.v1.QueryDenomTracesResponse + * @static + * @param {ibc.applications.transfer.v1.IQueryDenomTracesResponse} message QueryDenomTracesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryDenomTracesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryDenomTracesResponse message from the specified reader or buffer. + * @function decode + * @memberof ibc.applications.transfer.v1.QueryDenomTracesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.applications.transfer.v1.QueryDenomTracesResponse} QueryDenomTracesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDenomTracesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.transfer.v1.QueryDenomTracesResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.denomTraces && message.denomTraces.length)) + message.denomTraces = []; + message.denomTraces.push($root.ibc.applications.transfer.v1.DenomTrace.decode(reader, reader.uint32())); + break; + case 2: + message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryDenomTracesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.applications.transfer.v1.QueryDenomTracesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.applications.transfer.v1.QueryDenomTracesResponse} QueryDenomTracesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryDenomTracesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryDenomTracesResponse message. + * @function verify + * @memberof ibc.applications.transfer.v1.QueryDenomTracesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryDenomTracesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.denomTraces != null && message.hasOwnProperty("denomTraces")) { + if (!Array.isArray(message.denomTraces)) + return "denomTraces: array expected"; + for (let i = 0; i < message.denomTraces.length; ++i) { + let error = $root.ibc.applications.transfer.v1.DenomTrace.verify(message.denomTraces[i]); + if (error) + return "denomTraces." + error; + } + } + if (message.pagination != null && message.hasOwnProperty("pagination")) { + let error = $root.cosmos.base.query.v1beta1.PageResponse.verify(message.pagination); + if (error) + return "pagination." + error; + } + return null; + }; + + /** + * Creates a QueryDenomTracesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.applications.transfer.v1.QueryDenomTracesResponse + * @static + * @param {Object.} object Plain object + * @returns {ibc.applications.transfer.v1.QueryDenomTracesResponse} QueryDenomTracesResponse + */ + QueryDenomTracesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.applications.transfer.v1.QueryDenomTracesResponse) + return object; + let message = new $root.ibc.applications.transfer.v1.QueryDenomTracesResponse(); + if (object.denomTraces) { + if (!Array.isArray(object.denomTraces)) + throw TypeError(".ibc.applications.transfer.v1.QueryDenomTracesResponse.denomTraces: array expected"); + message.denomTraces = []; + for (let i = 0; i < object.denomTraces.length; ++i) { + if (typeof object.denomTraces[i] !== "object") + throw TypeError(".ibc.applications.transfer.v1.QueryDenomTracesResponse.denomTraces: object expected"); + message.denomTraces[i] = $root.ibc.applications.transfer.v1.DenomTrace.fromObject(object.denomTraces[i]); + } + } + if (object.pagination != null) { + if (typeof object.pagination !== "object") + throw TypeError(".ibc.applications.transfer.v1.QueryDenomTracesResponse.pagination: object expected"); + message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.fromObject(object.pagination); + } + return message; + }; + + /** + * Creates a plain object from a QueryDenomTracesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.applications.transfer.v1.QueryDenomTracesResponse + * @static + * @param {ibc.applications.transfer.v1.QueryDenomTracesResponse} message QueryDenomTracesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryDenomTracesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.denomTraces = []; + if (options.defaults) + object.pagination = null; + if (message.denomTraces && message.denomTraces.length) { + object.denomTraces = []; + for (let j = 0; j < message.denomTraces.length; ++j) + object.denomTraces[j] = $root.ibc.applications.transfer.v1.DenomTrace.toObject(message.denomTraces[j], options); + } + if (message.pagination != null && message.hasOwnProperty("pagination")) + object.pagination = $root.cosmos.base.query.v1beta1.PageResponse.toObject(message.pagination, options); + return object; + }; + + /** + * Converts this QueryDenomTracesResponse to JSON. + * @function toJSON + * @memberof ibc.applications.transfer.v1.QueryDenomTracesResponse + * @instance + * @returns {Object.} JSON object + */ + QueryDenomTracesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryDenomTracesResponse; + })(v1.QueryDenomTracesResponse || {}); + + v1.QueryParamsRequest = (function(QueryParamsRequest) { + + /** + * Properties of a QueryParamsRequest. + * @memberof ibc.applications.transfer.v1 + * @interface IQueryParamsRequest + */ + + /** + * Constructs a new QueryParamsRequest. + * @memberof ibc.applications.transfer.v1 + * @classdesc Represents a QueryParamsRequest. + * @implements IQueryParamsRequest + * @constructor + * @param {ibc.applications.transfer.v1.IQueryParamsRequest=} [properties] Properties to set + */ + function QueryParamsRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new QueryParamsRequest instance using the specified properties. + * @function create + * @memberof ibc.applications.transfer.v1.QueryParamsRequest + * @static + * @param {ibc.applications.transfer.v1.IQueryParamsRequest=} [properties] Properties to set + * @returns {ibc.applications.transfer.v1.QueryParamsRequest} QueryParamsRequest instance + */ + QueryParamsRequest.create = function create(properties) { + return new QueryParamsRequest(properties); + }; + + /** + * Encodes the specified QueryParamsRequest message. Does not implicitly {@link ibc.applications.transfer.v1.QueryParamsRequest.verify|verify} messages. + * @function encode + * @memberof ibc.applications.transfer.v1.QueryParamsRequest + * @static + * @param {ibc.applications.transfer.v1.IQueryParamsRequest} message QueryParamsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryParamsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified QueryParamsRequest message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.QueryParamsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.applications.transfer.v1.QueryParamsRequest + * @static + * @param {ibc.applications.transfer.v1.IQueryParamsRequest} message QueryParamsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryParamsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryParamsRequest message from the specified reader or buffer. + * @function decode + * @memberof ibc.applications.transfer.v1.QueryParamsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.applications.transfer.v1.QueryParamsRequest} QueryParamsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryParamsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.transfer.v1.QueryParamsRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryParamsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.applications.transfer.v1.QueryParamsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.applications.transfer.v1.QueryParamsRequest} QueryParamsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryParamsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryParamsRequest message. + * @function verify + * @memberof ibc.applications.transfer.v1.QueryParamsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryParamsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a QueryParamsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.applications.transfer.v1.QueryParamsRequest + * @static + * @param {Object.} object Plain object + * @returns {ibc.applications.transfer.v1.QueryParamsRequest} QueryParamsRequest + */ + QueryParamsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.applications.transfer.v1.QueryParamsRequest) + return object; + return new $root.ibc.applications.transfer.v1.QueryParamsRequest(); + }; + + /** + * Creates a plain object from a QueryParamsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.applications.transfer.v1.QueryParamsRequest + * @static + * @param {ibc.applications.transfer.v1.QueryParamsRequest} message QueryParamsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryParamsRequest.toObject = function toObject() { + return {}; + }; + + /** + * Converts this QueryParamsRequest to JSON. + * @function toJSON + * @memberof ibc.applications.transfer.v1.QueryParamsRequest + * @instance + * @returns {Object.} JSON object + */ + QueryParamsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryParamsRequest; + })(v1.QueryParamsRequest || {}); + + v1.QueryParamsResponse = (function(QueryParamsResponse) { + + /** + * Properties of a QueryParamsResponse. + * @memberof ibc.applications.transfer.v1 + * @interface IQueryParamsResponse + * @property {ibc.applications.transfer.v1.IParams|null} [params] QueryParamsResponse params + */ + + /** + * Constructs a new QueryParamsResponse. + * @memberof ibc.applications.transfer.v1 + * @classdesc Represents a QueryParamsResponse. + * @implements IQueryParamsResponse + * @constructor + * @param {ibc.applications.transfer.v1.IQueryParamsResponse=} [properties] Properties to set + */ + function QueryParamsResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryParamsResponse params. + * @member {ibc.applications.transfer.v1.IParams|null|undefined} params + * @memberof ibc.applications.transfer.v1.QueryParamsResponse + * @instance + */ + QueryParamsResponse.prototype.params = null; + + /** + * Creates a new QueryParamsResponse instance using the specified properties. + * @function create + * @memberof ibc.applications.transfer.v1.QueryParamsResponse + * @static + * @param {ibc.applications.transfer.v1.IQueryParamsResponse=} [properties] Properties to set + * @returns {ibc.applications.transfer.v1.QueryParamsResponse} QueryParamsResponse instance + */ + QueryParamsResponse.create = function create(properties) { + return new QueryParamsResponse(properties); + }; + + /** + * Encodes the specified QueryParamsResponse message. Does not implicitly {@link ibc.applications.transfer.v1.QueryParamsResponse.verify|verify} messages. + * @function encode + * @memberof ibc.applications.transfer.v1.QueryParamsResponse + * @static + * @param {ibc.applications.transfer.v1.IQueryParamsResponse} message QueryParamsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryParamsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.params != null && Object.hasOwnProperty.call(message, "params")) + $root.ibc.applications.transfer.v1.Params.encode(message.params, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryParamsResponse message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.QueryParamsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.applications.transfer.v1.QueryParamsResponse + * @static + * @param {ibc.applications.transfer.v1.IQueryParamsResponse} message QueryParamsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryParamsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryParamsResponse message from the specified reader or buffer. + * @function decode + * @memberof ibc.applications.transfer.v1.QueryParamsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.applications.transfer.v1.QueryParamsResponse} QueryParamsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryParamsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.transfer.v1.QueryParamsResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.params = $root.ibc.applications.transfer.v1.Params.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryParamsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.applications.transfer.v1.QueryParamsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.applications.transfer.v1.QueryParamsResponse} QueryParamsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryParamsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryParamsResponse message. + * @function verify + * @memberof ibc.applications.transfer.v1.QueryParamsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryParamsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.params != null && message.hasOwnProperty("params")) { + let error = $root.ibc.applications.transfer.v1.Params.verify(message.params); + if (error) + return "params." + error; + } + return null; + }; + + /** + * Creates a QueryParamsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.applications.transfer.v1.QueryParamsResponse + * @static + * @param {Object.} object Plain object + * @returns {ibc.applications.transfer.v1.QueryParamsResponse} QueryParamsResponse + */ + QueryParamsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.applications.transfer.v1.QueryParamsResponse) + return object; + let message = new $root.ibc.applications.transfer.v1.QueryParamsResponse(); + if (object.params != null) { + if (typeof object.params !== "object") + throw TypeError(".ibc.applications.transfer.v1.QueryParamsResponse.params: object expected"); + message.params = $root.ibc.applications.transfer.v1.Params.fromObject(object.params); + } + return message; + }; + + /** + * Creates a plain object from a QueryParamsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.applications.transfer.v1.QueryParamsResponse + * @static + * @param {ibc.applications.transfer.v1.QueryParamsResponse} message QueryParamsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryParamsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.params = null; + if (message.params != null && message.hasOwnProperty("params")) + object.params = $root.ibc.applications.transfer.v1.Params.toObject(message.params, options); + return object; + }; + + /** + * Converts this QueryParamsResponse to JSON. + * @function toJSON + * @memberof ibc.applications.transfer.v1.QueryParamsResponse + * @instance + * @returns {Object.} JSON object + */ + QueryParamsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryParamsResponse; + })(v1.QueryParamsResponse || {}); + + v1.FungibleTokenPacketData = (function(FungibleTokenPacketData) { + + /** + * Properties of a FungibleTokenPacketData. + * @memberof ibc.applications.transfer.v1 + * @interface IFungibleTokenPacketData + * @property {string|null} [denom] FungibleTokenPacketData denom + * @property {number|Long|null} [amount] FungibleTokenPacketData amount + * @property {string|null} [sender] FungibleTokenPacketData sender + * @property {string|null} [receiver] FungibleTokenPacketData receiver + */ + + /** + * Constructs a new FungibleTokenPacketData. + * @memberof ibc.applications.transfer.v1 + * @classdesc Represents a FungibleTokenPacketData. + * @implements IFungibleTokenPacketData + * @constructor + * @param {ibc.applications.transfer.v1.IFungibleTokenPacketData=} [properties] Properties to set + */ + function FungibleTokenPacketData(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FungibleTokenPacketData denom. + * @member {string} denom + * @memberof ibc.applications.transfer.v1.FungibleTokenPacketData + * @instance + */ + FungibleTokenPacketData.prototype.denom = ""; + + /** + * FungibleTokenPacketData amount. + * @member {number|Long} amount + * @memberof ibc.applications.transfer.v1.FungibleTokenPacketData + * @instance + */ + FungibleTokenPacketData.prototype.amount = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * FungibleTokenPacketData sender. + * @member {string} sender + * @memberof ibc.applications.transfer.v1.FungibleTokenPacketData + * @instance + */ + FungibleTokenPacketData.prototype.sender = ""; + + /** + * FungibleTokenPacketData receiver. + * @member {string} receiver + * @memberof ibc.applications.transfer.v1.FungibleTokenPacketData + * @instance + */ + FungibleTokenPacketData.prototype.receiver = ""; + + /** + * Creates a new FungibleTokenPacketData instance using the specified properties. + * @function create + * @memberof ibc.applications.transfer.v1.FungibleTokenPacketData + * @static + * @param {ibc.applications.transfer.v1.IFungibleTokenPacketData=} [properties] Properties to set + * @returns {ibc.applications.transfer.v1.FungibleTokenPacketData} FungibleTokenPacketData instance + */ + FungibleTokenPacketData.create = function create(properties) { + return new FungibleTokenPacketData(properties); + }; + + /** + * Encodes the specified FungibleTokenPacketData message. Does not implicitly {@link ibc.applications.transfer.v1.FungibleTokenPacketData.verify|verify} messages. + * @function encode + * @memberof ibc.applications.transfer.v1.FungibleTokenPacketData + * @static + * @param {ibc.applications.transfer.v1.IFungibleTokenPacketData} message FungibleTokenPacketData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FungibleTokenPacketData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.denom != null && Object.hasOwnProperty.call(message, "denom")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.denom); + if (message.amount != null && Object.hasOwnProperty.call(message, "amount")) + writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.amount); + if (message.sender != null && Object.hasOwnProperty.call(message, "sender")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.sender); + if (message.receiver != null && Object.hasOwnProperty.call(message, "receiver")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.receiver); + return writer; + }; + + /** + * Encodes the specified FungibleTokenPacketData message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.FungibleTokenPacketData.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.applications.transfer.v1.FungibleTokenPacketData + * @static + * @param {ibc.applications.transfer.v1.IFungibleTokenPacketData} message FungibleTokenPacketData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FungibleTokenPacketData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FungibleTokenPacketData message from the specified reader or buffer. + * @function decode + * @memberof ibc.applications.transfer.v1.FungibleTokenPacketData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.applications.transfer.v1.FungibleTokenPacketData} FungibleTokenPacketData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FungibleTokenPacketData.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.transfer.v1.FungibleTokenPacketData(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.denom = reader.string(); + break; + case 2: + message.amount = reader.uint64(); + break; + case 3: + message.sender = reader.string(); + break; + case 4: + message.receiver = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FungibleTokenPacketData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.applications.transfer.v1.FungibleTokenPacketData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.applications.transfer.v1.FungibleTokenPacketData} FungibleTokenPacketData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FungibleTokenPacketData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FungibleTokenPacketData message. + * @function verify + * @memberof ibc.applications.transfer.v1.FungibleTokenPacketData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FungibleTokenPacketData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.denom != null && message.hasOwnProperty("denom")) + if (!$util.isString(message.denom)) + return "denom: string expected"; + if (message.amount != null && message.hasOwnProperty("amount")) + if (!$util.isInteger(message.amount) && !(message.amount && $util.isInteger(message.amount.low) && $util.isInteger(message.amount.high))) + return "amount: integer|Long expected"; + if (message.sender != null && message.hasOwnProperty("sender")) + if (!$util.isString(message.sender)) + return "sender: string expected"; + if (message.receiver != null && message.hasOwnProperty("receiver")) + if (!$util.isString(message.receiver)) + return "receiver: string expected"; + return null; + }; + + /** + * Creates a FungibleTokenPacketData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.applications.transfer.v1.FungibleTokenPacketData + * @static + * @param {Object.} object Plain object + * @returns {ibc.applications.transfer.v1.FungibleTokenPacketData} FungibleTokenPacketData + */ + FungibleTokenPacketData.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.applications.transfer.v1.FungibleTokenPacketData) + return object; + let message = new $root.ibc.applications.transfer.v1.FungibleTokenPacketData(); + if (object.denom != null) + message.denom = String(object.denom); + if (object.amount != null) + if ($util.Long) + (message.amount = $util.Long.fromValue(object.amount)).unsigned = true; + else if (typeof object.amount === "string") + message.amount = parseInt(object.amount, 10); + else if (typeof object.amount === "number") + message.amount = object.amount; + else if (typeof object.amount === "object") + message.amount = new $util.LongBits(object.amount.low >>> 0, object.amount.high >>> 0).toNumber(true); + if (object.sender != null) + message.sender = String(object.sender); + if (object.receiver != null) + message.receiver = String(object.receiver); + return message; + }; + + /** + * Creates a plain object from a FungibleTokenPacketData message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.applications.transfer.v1.FungibleTokenPacketData + * @static + * @param {ibc.applications.transfer.v1.FungibleTokenPacketData} message FungibleTokenPacketData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FungibleTokenPacketData.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.denom = ""; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.amount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.amount = options.longs === String ? "0" : 0; + object.sender = ""; + object.receiver = ""; + } + if (message.denom != null && message.hasOwnProperty("denom")) + object.denom = message.denom; + if (message.amount != null && message.hasOwnProperty("amount")) + if (typeof message.amount === "number") + object.amount = options.longs === String ? String(message.amount) : message.amount; + else + object.amount = options.longs === String ? $util.Long.prototype.toString.call(message.amount) : options.longs === Number ? new $util.LongBits(message.amount.low >>> 0, message.amount.high >>> 0).toNumber(true) : message.amount; + if (message.sender != null && message.hasOwnProperty("sender")) + object.sender = message.sender; + if (message.receiver != null && message.hasOwnProperty("receiver")) + object.receiver = message.receiver; + return object; + }; + + /** + * Converts this FungibleTokenPacketData to JSON. + * @function toJSON + * @memberof ibc.applications.transfer.v1.FungibleTokenPacketData + * @instance + * @returns {Object.} JSON object + */ + FungibleTokenPacketData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FungibleTokenPacketData; + })(v1.FungibleTokenPacketData || {}); + + v1.DenomTrace = (function(DenomTrace) { + + /** + * Properties of a DenomTrace. + * @memberof ibc.applications.transfer.v1 + * @interface IDenomTrace + * @property {string|null} [path] DenomTrace path + * @property {string|null} [baseDenom] DenomTrace baseDenom + */ + + /** + * Constructs a new DenomTrace. + * @memberof ibc.applications.transfer.v1 + * @classdesc Represents a DenomTrace. + * @implements IDenomTrace + * @constructor + * @param {ibc.applications.transfer.v1.IDenomTrace=} [properties] Properties to set + */ + function DenomTrace(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DenomTrace path. + * @member {string} path + * @memberof ibc.applications.transfer.v1.DenomTrace + * @instance + */ + DenomTrace.prototype.path = ""; + + /** + * DenomTrace baseDenom. + * @member {string} baseDenom + * @memberof ibc.applications.transfer.v1.DenomTrace + * @instance + */ + DenomTrace.prototype.baseDenom = ""; + + /** + * Creates a new DenomTrace instance using the specified properties. + * @function create + * @memberof ibc.applications.transfer.v1.DenomTrace + * @static + * @param {ibc.applications.transfer.v1.IDenomTrace=} [properties] Properties to set + * @returns {ibc.applications.transfer.v1.DenomTrace} DenomTrace instance + */ + DenomTrace.create = function create(properties) { + return new DenomTrace(properties); + }; + + /** + * Encodes the specified DenomTrace message. Does not implicitly {@link ibc.applications.transfer.v1.DenomTrace.verify|verify} messages. + * @function encode + * @memberof ibc.applications.transfer.v1.DenomTrace + * @static + * @param {ibc.applications.transfer.v1.IDenomTrace} message DenomTrace message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DenomTrace.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.path); + if (message.baseDenom != null && Object.hasOwnProperty.call(message, "baseDenom")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.baseDenom); + return writer; + }; + + /** + * Encodes the specified DenomTrace message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.DenomTrace.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.applications.transfer.v1.DenomTrace + * @static + * @param {ibc.applications.transfer.v1.IDenomTrace} message DenomTrace message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DenomTrace.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DenomTrace message from the specified reader or buffer. + * @function decode + * @memberof ibc.applications.transfer.v1.DenomTrace + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.applications.transfer.v1.DenomTrace} DenomTrace + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DenomTrace.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.transfer.v1.DenomTrace(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.path = reader.string(); + break; + case 2: + message.baseDenom = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DenomTrace message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.applications.transfer.v1.DenomTrace + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.applications.transfer.v1.DenomTrace} DenomTrace + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DenomTrace.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DenomTrace message. + * @function verify + * @memberof ibc.applications.transfer.v1.DenomTrace + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DenomTrace.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + if (message.baseDenom != null && message.hasOwnProperty("baseDenom")) + if (!$util.isString(message.baseDenom)) + return "baseDenom: string expected"; + return null; + }; + + /** + * Creates a DenomTrace message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.applications.transfer.v1.DenomTrace + * @static + * @param {Object.} object Plain object + * @returns {ibc.applications.transfer.v1.DenomTrace} DenomTrace + */ + DenomTrace.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.applications.transfer.v1.DenomTrace) + return object; + let message = new $root.ibc.applications.transfer.v1.DenomTrace(); + if (object.path != null) + message.path = String(object.path); + if (object.baseDenom != null) + message.baseDenom = String(object.baseDenom); + return message; + }; + + /** + * Creates a plain object from a DenomTrace message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.applications.transfer.v1.DenomTrace + * @static + * @param {ibc.applications.transfer.v1.DenomTrace} message DenomTrace + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DenomTrace.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.path = ""; + object.baseDenom = ""; + } + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + if (message.baseDenom != null && message.hasOwnProperty("baseDenom")) + object.baseDenom = message.baseDenom; + return object; + }; + + /** + * Converts this DenomTrace to JSON. + * @function toJSON + * @memberof ibc.applications.transfer.v1.DenomTrace + * @instance + * @returns {Object.} JSON object + */ + DenomTrace.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DenomTrace; + })(v1.DenomTrace || {}); + + v1.Params = (function(Params) { + + /** + * Properties of a Params. + * @memberof ibc.applications.transfer.v1 + * @interface IParams + * @property {boolean|null} [sendEnabled] Params sendEnabled + * @property {boolean|null} [receiveEnabled] Params receiveEnabled + */ + + /** + * Constructs a new Params. + * @memberof ibc.applications.transfer.v1 + * @classdesc Represents a Params. + * @implements IParams + * @constructor + * @param {ibc.applications.transfer.v1.IParams=} [properties] Properties to set + */ + function Params(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Params sendEnabled. + * @member {boolean} sendEnabled + * @memberof ibc.applications.transfer.v1.Params + * @instance + */ + Params.prototype.sendEnabled = false; + + /** + * Params receiveEnabled. + * @member {boolean} receiveEnabled + * @memberof ibc.applications.transfer.v1.Params + * @instance + */ + Params.prototype.receiveEnabled = false; + + /** + * Creates a new Params instance using the specified properties. + * @function create + * @memberof ibc.applications.transfer.v1.Params + * @static + * @param {ibc.applications.transfer.v1.IParams=} [properties] Properties to set + * @returns {ibc.applications.transfer.v1.Params} Params instance + */ + Params.create = function create(properties) { + return new Params(properties); + }; + + /** + * Encodes the specified Params message. Does not implicitly {@link ibc.applications.transfer.v1.Params.verify|verify} messages. + * @function encode + * @memberof ibc.applications.transfer.v1.Params + * @static + * @param {ibc.applications.transfer.v1.IParams} message Params message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Params.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sendEnabled != null && Object.hasOwnProperty.call(message, "sendEnabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.sendEnabled); + if (message.receiveEnabled != null && Object.hasOwnProperty.call(message, "receiveEnabled")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.receiveEnabled); + return writer; + }; + + /** + * Encodes the specified Params message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.Params.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.applications.transfer.v1.Params + * @static + * @param {ibc.applications.transfer.v1.IParams} message Params message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Params.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Params message from the specified reader or buffer. + * @function decode + * @memberof ibc.applications.transfer.v1.Params + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.applications.transfer.v1.Params} Params + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Params.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.transfer.v1.Params(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.sendEnabled = reader.bool(); + break; + case 2: + message.receiveEnabled = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Params message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.applications.transfer.v1.Params + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.applications.transfer.v1.Params} Params + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Params.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Params message. + * @function verify + * @memberof ibc.applications.transfer.v1.Params + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Params.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sendEnabled != null && message.hasOwnProperty("sendEnabled")) + if (typeof message.sendEnabled !== "boolean") + return "sendEnabled: boolean expected"; + if (message.receiveEnabled != null && message.hasOwnProperty("receiveEnabled")) + if (typeof message.receiveEnabled !== "boolean") + return "receiveEnabled: boolean expected"; + return null; + }; + + /** + * Creates a Params message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.applications.transfer.v1.Params + * @static + * @param {Object.} object Plain object + * @returns {ibc.applications.transfer.v1.Params} Params + */ + Params.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.applications.transfer.v1.Params) + return object; + let message = new $root.ibc.applications.transfer.v1.Params(); + if (object.sendEnabled != null) + message.sendEnabled = Boolean(object.sendEnabled); + if (object.receiveEnabled != null) + message.receiveEnabled = Boolean(object.receiveEnabled); + return message; + }; + + /** + * Creates a plain object from a Params message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.applications.transfer.v1.Params + * @static + * @param {ibc.applications.transfer.v1.Params} message Params + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Params.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.sendEnabled = false; + object.receiveEnabled = false; + } + if (message.sendEnabled != null && message.hasOwnProperty("sendEnabled")) + object.sendEnabled = message.sendEnabled; + if (message.receiveEnabled != null && message.hasOwnProperty("receiveEnabled")) + object.receiveEnabled = message.receiveEnabled; + return object; + }; + + /** + * Converts this Params to JSON. + * @function toJSON + * @memberof ibc.applications.transfer.v1.Params + * @instance + * @returns {Object.} JSON object + */ + Params.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Params; + })(v1.Params || {}); + + v1.Msg = (function(Msg) { + + /** + * Constructs a new Msg service. + * @memberof ibc.applications.transfer.v1 + * @classdesc Represents a Msg + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Msg(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Msg.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Msg; + + /** + * Creates new Msg service using the specified rpc implementation. + * @function create + * @memberof ibc.applications.transfer.v1.Msg + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Msg} RPC service. Useful where requests and/or responses are streamed. + */ + Msg.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link ibc.applications.transfer.v1.Msg#transfer}. + * @memberof ibc.applications.transfer.v1.Msg + * @typedef TransferCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {ibc.applications.transfer.v1.IMsgTransferResponse} [response] MsgTransferResponse + */ + + /** + * Calls Transfer. + * @function transfer + * @memberof ibc.applications.transfer.v1.Msg + * @instance + * @param {ibc.applications.transfer.v1.IMsgTransfer} request MsgTransfer message or plain object + * @param {ibc.applications.transfer.v1.Msg.TransferCallback} callback Node-style callback called with the error, if any, and MsgTransferResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Msg.prototype.transfer = function transfer(request, callback) { + return this.rpcCall(transfer, $root.ibc.applications.transfer.v1.MsgTransfer, $root.ibc.applications.transfer.v1.MsgTransferResponse, request, callback); + }, "name", { value: "Transfer" }); + + /** + * Calls Transfer. + * @function transfer + * @memberof ibc.applications.transfer.v1.Msg + * @instance + * @param {ibc.applications.transfer.v1.IMsgTransfer} request MsgTransfer message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Msg; + })(v1.Msg || {}); + + v1.MsgTransfer = (function(MsgTransfer) { + + /** + * Properties of a MsgTransfer. + * @memberof ibc.applications.transfer.v1 + * @interface IMsgTransfer + * @property {string|null} [sourcePort] MsgTransfer sourcePort + * @property {string|null} [sourceChannel] MsgTransfer sourceChannel + * @property {cosmos.base.v1beta1.ICoin|null} [token] MsgTransfer token + * @property {string|null} [sender] MsgTransfer sender + * @property {string|null} [receiver] MsgTransfer receiver + * @property {ibc.core.client.v1.IHeight|null} [timeoutHeight] MsgTransfer timeoutHeight + * @property {number|Long|null} [timeoutTimestamp] MsgTransfer timeoutTimestamp + */ + + /** + * Constructs a new MsgTransfer. + * @memberof ibc.applications.transfer.v1 + * @classdesc Represents a MsgTransfer. + * @implements IMsgTransfer + * @constructor + * @param {ibc.applications.transfer.v1.IMsgTransfer=} [properties] Properties to set + */ + function MsgTransfer(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgTransfer sourcePort. + * @member {string} sourcePort + * @memberof ibc.applications.transfer.v1.MsgTransfer + * @instance + */ + MsgTransfer.prototype.sourcePort = ""; + + /** + * MsgTransfer sourceChannel. + * @member {string} sourceChannel + * @memberof ibc.applications.transfer.v1.MsgTransfer + * @instance + */ + MsgTransfer.prototype.sourceChannel = ""; + + /** + * MsgTransfer token. + * @member {cosmos.base.v1beta1.ICoin|null|undefined} token + * @memberof ibc.applications.transfer.v1.MsgTransfer + * @instance + */ + MsgTransfer.prototype.token = null; + + /** + * MsgTransfer sender. + * @member {string} sender + * @memberof ibc.applications.transfer.v1.MsgTransfer + * @instance + */ + MsgTransfer.prototype.sender = ""; + + /** + * MsgTransfer receiver. + * @member {string} receiver + * @memberof ibc.applications.transfer.v1.MsgTransfer + * @instance + */ + MsgTransfer.prototype.receiver = ""; + + /** + * MsgTransfer timeoutHeight. + * @member {ibc.core.client.v1.IHeight|null|undefined} timeoutHeight + * @memberof ibc.applications.transfer.v1.MsgTransfer + * @instance + */ + MsgTransfer.prototype.timeoutHeight = null; + + /** + * MsgTransfer timeoutTimestamp. + * @member {number|Long} timeoutTimestamp + * @memberof ibc.applications.transfer.v1.MsgTransfer + * @instance + */ + MsgTransfer.prototype.timeoutTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new MsgTransfer instance using the specified properties. + * @function create + * @memberof ibc.applications.transfer.v1.MsgTransfer + * @static + * @param {ibc.applications.transfer.v1.IMsgTransfer=} [properties] Properties to set + * @returns {ibc.applications.transfer.v1.MsgTransfer} MsgTransfer instance + */ + MsgTransfer.create = function create(properties) { + return new MsgTransfer(properties); + }; + + /** + * Encodes the specified MsgTransfer message. Does not implicitly {@link ibc.applications.transfer.v1.MsgTransfer.verify|verify} messages. + * @function encode + * @memberof ibc.applications.transfer.v1.MsgTransfer + * @static + * @param {ibc.applications.transfer.v1.IMsgTransfer} message MsgTransfer message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgTransfer.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sourcePort != null && Object.hasOwnProperty.call(message, "sourcePort")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.sourcePort); + if (message.sourceChannel != null && Object.hasOwnProperty.call(message, "sourceChannel")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceChannel); + if (message.token != null && Object.hasOwnProperty.call(message, "token")) + $root.cosmos.base.v1beta1.Coin.encode(message.token, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.sender != null && Object.hasOwnProperty.call(message, "sender")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.sender); + if (message.receiver != null && Object.hasOwnProperty.call(message, "receiver")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.receiver); + if (message.timeoutHeight != null && Object.hasOwnProperty.call(message, "timeoutHeight")) + $root.ibc.core.client.v1.Height.encode(message.timeoutHeight, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.timeoutTimestamp != null && Object.hasOwnProperty.call(message, "timeoutTimestamp")) + writer.uint32(/* id 7, wireType 0 =*/56).uint64(message.timeoutTimestamp); + return writer; + }; + + /** + * Encodes the specified MsgTransfer message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.MsgTransfer.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.applications.transfer.v1.MsgTransfer + * @static + * @param {ibc.applications.transfer.v1.IMsgTransfer} message MsgTransfer message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgTransfer.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgTransfer message from the specified reader or buffer. + * @function decode + * @memberof ibc.applications.transfer.v1.MsgTransfer + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.applications.transfer.v1.MsgTransfer} MsgTransfer + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgTransfer.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.transfer.v1.MsgTransfer(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.sourcePort = reader.string(); + break; + case 2: + message.sourceChannel = reader.string(); + break; + case 3: + message.token = $root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32()); + break; + case 4: + message.sender = reader.string(); + break; + case 5: + message.receiver = reader.string(); + break; + case 6: + message.timeoutHeight = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); + break; + case 7: + message.timeoutTimestamp = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgTransfer message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.applications.transfer.v1.MsgTransfer + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.applications.transfer.v1.MsgTransfer} MsgTransfer + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgTransfer.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgTransfer message. + * @function verify + * @memberof ibc.applications.transfer.v1.MsgTransfer + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgTransfer.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sourcePort != null && message.hasOwnProperty("sourcePort")) + if (!$util.isString(message.sourcePort)) + return "sourcePort: string expected"; + if (message.sourceChannel != null && message.hasOwnProperty("sourceChannel")) + if (!$util.isString(message.sourceChannel)) + return "sourceChannel: string expected"; + if (message.token != null && message.hasOwnProperty("token")) { + let error = $root.cosmos.base.v1beta1.Coin.verify(message.token); + if (error) + return "token." + error; + } + if (message.sender != null && message.hasOwnProperty("sender")) + if (!$util.isString(message.sender)) + return "sender: string expected"; + if (message.receiver != null && message.hasOwnProperty("receiver")) + if (!$util.isString(message.receiver)) + return "receiver: string expected"; + if (message.timeoutHeight != null && message.hasOwnProperty("timeoutHeight")) { + let error = $root.ibc.core.client.v1.Height.verify(message.timeoutHeight); + if (error) + return "timeoutHeight." + error; + } + if (message.timeoutTimestamp != null && message.hasOwnProperty("timeoutTimestamp")) + if (!$util.isInteger(message.timeoutTimestamp) && !(message.timeoutTimestamp && $util.isInteger(message.timeoutTimestamp.low) && $util.isInteger(message.timeoutTimestamp.high))) + return "timeoutTimestamp: integer|Long expected"; + return null; + }; + + /** + * Creates a MsgTransfer message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.applications.transfer.v1.MsgTransfer + * @static + * @param {Object.} object Plain object + * @returns {ibc.applications.transfer.v1.MsgTransfer} MsgTransfer + */ + MsgTransfer.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.applications.transfer.v1.MsgTransfer) + return object; + let message = new $root.ibc.applications.transfer.v1.MsgTransfer(); + if (object.sourcePort != null) + message.sourcePort = String(object.sourcePort); + if (object.sourceChannel != null) + message.sourceChannel = String(object.sourceChannel); + if (object.token != null) { + if (typeof object.token !== "object") + throw TypeError(".ibc.applications.transfer.v1.MsgTransfer.token: object expected"); + message.token = $root.cosmos.base.v1beta1.Coin.fromObject(object.token); + } + if (object.sender != null) + message.sender = String(object.sender); + if (object.receiver != null) + message.receiver = String(object.receiver); + if (object.timeoutHeight != null) { + if (typeof object.timeoutHeight !== "object") + throw TypeError(".ibc.applications.transfer.v1.MsgTransfer.timeoutHeight: object expected"); + message.timeoutHeight = $root.ibc.core.client.v1.Height.fromObject(object.timeoutHeight); + } + if (object.timeoutTimestamp != null) + if ($util.Long) + (message.timeoutTimestamp = $util.Long.fromValue(object.timeoutTimestamp)).unsigned = true; + else if (typeof object.timeoutTimestamp === "string") + message.timeoutTimestamp = parseInt(object.timeoutTimestamp, 10); + else if (typeof object.timeoutTimestamp === "number") + message.timeoutTimestamp = object.timeoutTimestamp; + else if (typeof object.timeoutTimestamp === "object") + message.timeoutTimestamp = new $util.LongBits(object.timeoutTimestamp.low >>> 0, object.timeoutTimestamp.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a MsgTransfer message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.applications.transfer.v1.MsgTransfer + * @static + * @param {ibc.applications.transfer.v1.MsgTransfer} message MsgTransfer + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgTransfer.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.sourcePort = ""; + object.sourceChannel = ""; + object.token = null; + object.sender = ""; + object.receiver = ""; + object.timeoutHeight = null; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.timeoutTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.timeoutTimestamp = options.longs === String ? "0" : 0; + } + if (message.sourcePort != null && message.hasOwnProperty("sourcePort")) + object.sourcePort = message.sourcePort; + if (message.sourceChannel != null && message.hasOwnProperty("sourceChannel")) + object.sourceChannel = message.sourceChannel; + if (message.token != null && message.hasOwnProperty("token")) + object.token = $root.cosmos.base.v1beta1.Coin.toObject(message.token, options); + if (message.sender != null && message.hasOwnProperty("sender")) + object.sender = message.sender; + if (message.receiver != null && message.hasOwnProperty("receiver")) + object.receiver = message.receiver; + if (message.timeoutHeight != null && message.hasOwnProperty("timeoutHeight")) + object.timeoutHeight = $root.ibc.core.client.v1.Height.toObject(message.timeoutHeight, options); + if (message.timeoutTimestamp != null && message.hasOwnProperty("timeoutTimestamp")) + if (typeof message.timeoutTimestamp === "number") + object.timeoutTimestamp = options.longs === String ? String(message.timeoutTimestamp) : message.timeoutTimestamp; + else + object.timeoutTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.timeoutTimestamp) : options.longs === Number ? new $util.LongBits(message.timeoutTimestamp.low >>> 0, message.timeoutTimestamp.high >>> 0).toNumber(true) : message.timeoutTimestamp; + return object; + }; + + /** + * Converts this MsgTransfer to JSON. + * @function toJSON + * @memberof ibc.applications.transfer.v1.MsgTransfer + * @instance + * @returns {Object.} JSON object + */ + MsgTransfer.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgTransfer; + })(v1.MsgTransfer || {}); + + v1.MsgTransferResponse = (function(MsgTransferResponse) { + + /** + * Properties of a MsgTransferResponse. + * @memberof ibc.applications.transfer.v1 + * @interface IMsgTransferResponse + */ + + /** + * Constructs a new MsgTransferResponse. + * @memberof ibc.applications.transfer.v1 + * @classdesc Represents a MsgTransferResponse. + * @implements IMsgTransferResponse + * @constructor + * @param {ibc.applications.transfer.v1.IMsgTransferResponse=} [properties] Properties to set + */ + function MsgTransferResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new MsgTransferResponse instance using the specified properties. + * @function create + * @memberof ibc.applications.transfer.v1.MsgTransferResponse + * @static + * @param {ibc.applications.transfer.v1.IMsgTransferResponse=} [properties] Properties to set + * @returns {ibc.applications.transfer.v1.MsgTransferResponse} MsgTransferResponse instance + */ + MsgTransferResponse.create = function create(properties) { + return new MsgTransferResponse(properties); + }; + + /** + * Encodes the specified MsgTransferResponse message. Does not implicitly {@link ibc.applications.transfer.v1.MsgTransferResponse.verify|verify} messages. + * @function encode + * @memberof ibc.applications.transfer.v1.MsgTransferResponse + * @static + * @param {ibc.applications.transfer.v1.IMsgTransferResponse} message MsgTransferResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgTransferResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MsgTransferResponse message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.MsgTransferResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.applications.transfer.v1.MsgTransferResponse + * @static + * @param {ibc.applications.transfer.v1.IMsgTransferResponse} message MsgTransferResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgTransferResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgTransferResponse message from the specified reader or buffer. + * @function decode + * @memberof ibc.applications.transfer.v1.MsgTransferResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.applications.transfer.v1.MsgTransferResponse} MsgTransferResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgTransferResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.transfer.v1.MsgTransferResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgTransferResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.applications.transfer.v1.MsgTransferResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.applications.transfer.v1.MsgTransferResponse} MsgTransferResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgTransferResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgTransferResponse message. + * @function verify + * @memberof ibc.applications.transfer.v1.MsgTransferResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgTransferResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MsgTransferResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.applications.transfer.v1.MsgTransferResponse + * @static + * @param {Object.} object Plain object + * @returns {ibc.applications.transfer.v1.MsgTransferResponse} MsgTransferResponse + */ + MsgTransferResponse.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.applications.transfer.v1.MsgTransferResponse) + return object; + return new $root.ibc.applications.transfer.v1.MsgTransferResponse(); + }; + + /** + * Creates a plain object from a MsgTransferResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.applications.transfer.v1.MsgTransferResponse + * @static + * @param {ibc.applications.transfer.v1.MsgTransferResponse} message MsgTransferResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgTransferResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MsgTransferResponse to JSON. + * @function toJSON + * @memberof ibc.applications.transfer.v1.MsgTransferResponse + * @instance + * @returns {Object.} JSON object + */ + MsgTransferResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgTransferResponse; + })(v1.MsgTransferResponse || {}); + + return v1; + })(transfer.v1 || {}); + + return transfer; + })(applications.transfer || {}); + + return applications; + })(ibc.applications || {}); + + /** + * Namespace core. + * @memberof ibc + * @namespace + */ + + ibc.core = (function(core) { + + /** + * Namespace channel. + * @memberof ibc.core + * @namespace + */ + + core.channel = (function(channel) { + + /** + * Namespace v1. + * @memberof ibc.core.channel + * @namespace + */ + + channel.v1 = (function(v1) { + + v1.Channel = (function(Channel) { + + /** + * Properties of a Channel. + * @memberof ibc.core.channel.v1 + * @interface IChannel + * @property {ibc.core.channel.v1.State|null} [state] Channel state + * @property {ibc.core.channel.v1.Order|null} [ordering] Channel ordering + * @property {ibc.core.channel.v1.ICounterparty|null} [counterparty] Channel counterparty + * @property {Array.|null} [connectionHops] Channel connectionHops + * @property {string|null} [version] Channel version + */ + + /** + * Constructs a new Channel. + * @memberof ibc.core.channel.v1 + * @classdesc Represents a Channel. + * @implements IChannel + * @constructor + * @param {ibc.core.channel.v1.IChannel=} [properties] Properties to set + */ + function Channel(properties) { + this.connectionHops = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Channel state. + * @member {ibc.core.channel.v1.State} state + * @memberof ibc.core.channel.v1.Channel + * @instance + */ + Channel.prototype.state = 0; + + /** + * Channel ordering. + * @member {ibc.core.channel.v1.Order} ordering + * @memberof ibc.core.channel.v1.Channel + * @instance + */ + Channel.prototype.ordering = 0; + + /** + * Channel counterparty. + * @member {ibc.core.channel.v1.ICounterparty|null|undefined} counterparty + * @memberof ibc.core.channel.v1.Channel + * @instance + */ + Channel.prototype.counterparty = null; + + /** + * Channel connectionHops. + * @member {Array.} connectionHops + * @memberof ibc.core.channel.v1.Channel + * @instance + */ + Channel.prototype.connectionHops = $util.emptyArray; + + /** + * Channel version. + * @member {string} version + * @memberof ibc.core.channel.v1.Channel + * @instance + */ + Channel.prototype.version = ""; + + /** + * Creates a new Channel instance using the specified properties. + * @function create + * @memberof ibc.core.channel.v1.Channel + * @static + * @param {ibc.core.channel.v1.IChannel=} [properties] Properties to set + * @returns {ibc.core.channel.v1.Channel} Channel instance + */ + Channel.create = function create(properties) { + return new Channel(properties); + }; + + /** + * Encodes the specified Channel message. Does not implicitly {@link ibc.core.channel.v1.Channel.verify|verify} messages. + * @function encode + * @memberof ibc.core.channel.v1.Channel + * @static + * @param {ibc.core.channel.v1.IChannel} message Channel message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Channel.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.state); + if (message.ordering != null && Object.hasOwnProperty.call(message, "ordering")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.ordering); + if (message.counterparty != null && Object.hasOwnProperty.call(message, "counterparty")) + $root.ibc.core.channel.v1.Counterparty.encode(message.counterparty, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.connectionHops != null && message.connectionHops.length) + for (let i = 0; i < message.connectionHops.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.connectionHops[i]); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.version); + return writer; + }; + + /** + * Encodes the specified Channel message, length delimited. Does not implicitly {@link ibc.core.channel.v1.Channel.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.channel.v1.Channel + * @static + * @param {ibc.core.channel.v1.IChannel} message Channel message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Channel.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Channel message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.channel.v1.Channel + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.channel.v1.Channel} Channel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Channel.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.Channel(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.state = reader.int32(); + break; + case 2: + message.ordering = reader.int32(); + break; + case 3: + message.counterparty = $root.ibc.core.channel.v1.Counterparty.decode(reader, reader.uint32()); + break; + case 4: + if (!(message.connectionHops && message.connectionHops.length)) + message.connectionHops = []; + message.connectionHops.push(reader.string()); + break; + case 5: + message.version = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Channel message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.channel.v1.Channel + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.channel.v1.Channel} Channel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Channel.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Channel message. + * @function verify + * @memberof ibc.core.channel.v1.Channel + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Channel.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.ordering != null && message.hasOwnProperty("ordering")) + switch (message.ordering) { + default: + return "ordering: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.counterparty != null && message.hasOwnProperty("counterparty")) { + let error = $root.ibc.core.channel.v1.Counterparty.verify(message.counterparty); + if (error) + return "counterparty." + error; + } + if (message.connectionHops != null && message.hasOwnProperty("connectionHops")) { + if (!Array.isArray(message.connectionHops)) + return "connectionHops: array expected"; + for (let i = 0; i < message.connectionHops.length; ++i) + if (!$util.isString(message.connectionHops[i])) + return "connectionHops: string[] expected"; + } + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + return null; + }; + + /** + * Creates a Channel message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.channel.v1.Channel + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.channel.v1.Channel} Channel + */ + Channel.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.channel.v1.Channel) + return object; + let message = new $root.ibc.core.channel.v1.Channel(); + switch (object.state) { + case "STATE_UNINITIALIZED_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "STATE_INIT": + case 1: + message.state = 1; + break; + case "STATE_TRYOPEN": + case 2: + message.state = 2; + break; + case "STATE_OPEN": + case 3: + message.state = 3; + break; + case "STATE_CLOSED": + case 4: + message.state = 4; + break; + } + switch (object.ordering) { + case "ORDER_NONE_UNSPECIFIED": + case 0: + message.ordering = 0; + break; + case "ORDER_UNORDERED": + case 1: + message.ordering = 1; + break; + case "ORDER_ORDERED": + case 2: + message.ordering = 2; + break; + } + if (object.counterparty != null) { + if (typeof object.counterparty !== "object") + throw TypeError(".ibc.core.channel.v1.Channel.counterparty: object expected"); + message.counterparty = $root.ibc.core.channel.v1.Counterparty.fromObject(object.counterparty); + } + if (object.connectionHops) { + if (!Array.isArray(object.connectionHops)) + throw TypeError(".ibc.core.channel.v1.Channel.connectionHops: array expected"); + message.connectionHops = []; + for (let i = 0; i < object.connectionHops.length; ++i) + message.connectionHops[i] = String(object.connectionHops[i]); + } + if (object.version != null) + message.version = String(object.version); + return message; + }; + + /** + * Creates a plain object from a Channel message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.channel.v1.Channel + * @static + * @param {ibc.core.channel.v1.Channel} message Channel + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Channel.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.connectionHops = []; + if (options.defaults) { + object.state = options.enums === String ? "STATE_UNINITIALIZED_UNSPECIFIED" : 0; + object.ordering = options.enums === String ? "ORDER_NONE_UNSPECIFIED" : 0; + object.counterparty = null; + object.version = ""; + } + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.ibc.core.channel.v1.State[message.state] : message.state; + if (message.ordering != null && message.hasOwnProperty("ordering")) + object.ordering = options.enums === String ? $root.ibc.core.channel.v1.Order[message.ordering] : message.ordering; + if (message.counterparty != null && message.hasOwnProperty("counterparty")) + object.counterparty = $root.ibc.core.channel.v1.Counterparty.toObject(message.counterparty, options); + if (message.connectionHops && message.connectionHops.length) { + object.connectionHops = []; + for (let j = 0; j < message.connectionHops.length; ++j) + object.connectionHops[j] = message.connectionHops[j]; + } + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + return object; + }; + + /** + * Converts this Channel to JSON. + * @function toJSON + * @memberof ibc.core.channel.v1.Channel + * @instance + * @returns {Object.} JSON object + */ + Channel.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Channel; + })(v1.Channel || {}); + + v1.IdentifiedChannel = (function(IdentifiedChannel) { + + /** + * Properties of an IdentifiedChannel. + * @memberof ibc.core.channel.v1 + * @interface IIdentifiedChannel + * @property {ibc.core.channel.v1.State|null} [state] IdentifiedChannel state + * @property {ibc.core.channel.v1.Order|null} [ordering] IdentifiedChannel ordering + * @property {ibc.core.channel.v1.ICounterparty|null} [counterparty] IdentifiedChannel counterparty + * @property {Array.|null} [connectionHops] IdentifiedChannel connectionHops + * @property {string|null} [version] IdentifiedChannel version + * @property {string|null} [portId] IdentifiedChannel portId + * @property {string|null} [channelId] IdentifiedChannel channelId + */ + + /** + * Constructs a new IdentifiedChannel. + * @memberof ibc.core.channel.v1 + * @classdesc Represents an IdentifiedChannel. + * @implements IIdentifiedChannel + * @constructor + * @param {ibc.core.channel.v1.IIdentifiedChannel=} [properties] Properties to set + */ + function IdentifiedChannel(properties) { + this.connectionHops = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * IdentifiedChannel state. + * @member {ibc.core.channel.v1.State} state + * @memberof ibc.core.channel.v1.IdentifiedChannel + * @instance + */ + IdentifiedChannel.prototype.state = 0; + + /** + * IdentifiedChannel ordering. + * @member {ibc.core.channel.v1.Order} ordering + * @memberof ibc.core.channel.v1.IdentifiedChannel + * @instance + */ + IdentifiedChannel.prototype.ordering = 0; + + /** + * IdentifiedChannel counterparty. + * @member {ibc.core.channel.v1.ICounterparty|null|undefined} counterparty + * @memberof ibc.core.channel.v1.IdentifiedChannel + * @instance + */ + IdentifiedChannel.prototype.counterparty = null; + + /** + * IdentifiedChannel connectionHops. + * @member {Array.} connectionHops + * @memberof ibc.core.channel.v1.IdentifiedChannel + * @instance + */ + IdentifiedChannel.prototype.connectionHops = $util.emptyArray; + + /** + * IdentifiedChannel version. + * @member {string} version + * @memberof ibc.core.channel.v1.IdentifiedChannel + * @instance + */ + IdentifiedChannel.prototype.version = ""; + + /** + * IdentifiedChannel portId. + * @member {string} portId + * @memberof ibc.core.channel.v1.IdentifiedChannel + * @instance + */ + IdentifiedChannel.prototype.portId = ""; + + /** + * IdentifiedChannel channelId. + * @member {string} channelId + * @memberof ibc.core.channel.v1.IdentifiedChannel + * @instance + */ + IdentifiedChannel.prototype.channelId = ""; + + /** + * Creates a new IdentifiedChannel instance using the specified properties. + * @function create + * @memberof ibc.core.channel.v1.IdentifiedChannel + * @static + * @param {ibc.core.channel.v1.IIdentifiedChannel=} [properties] Properties to set + * @returns {ibc.core.channel.v1.IdentifiedChannel} IdentifiedChannel instance + */ + IdentifiedChannel.create = function create(properties) { + return new IdentifiedChannel(properties); + }; + + /** + * Encodes the specified IdentifiedChannel message. Does not implicitly {@link ibc.core.channel.v1.IdentifiedChannel.verify|verify} messages. + * @function encode + * @memberof ibc.core.channel.v1.IdentifiedChannel + * @static + * @param {ibc.core.channel.v1.IIdentifiedChannel} message IdentifiedChannel message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IdentifiedChannel.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.state); + if (message.ordering != null && Object.hasOwnProperty.call(message, "ordering")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.ordering); + if (message.counterparty != null && Object.hasOwnProperty.call(message, "counterparty")) + $root.ibc.core.channel.v1.Counterparty.encode(message.counterparty, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.connectionHops != null && message.connectionHops.length) + for (let i = 0; i < message.connectionHops.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.connectionHops[i]); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.version); + if (message.portId != null && Object.hasOwnProperty.call(message, "portId")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.portId); + if (message.channelId != null && Object.hasOwnProperty.call(message, "channelId")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.channelId); + return writer; + }; + + /** + * Encodes the specified IdentifiedChannel message, length delimited. Does not implicitly {@link ibc.core.channel.v1.IdentifiedChannel.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.channel.v1.IdentifiedChannel + * @static + * @param {ibc.core.channel.v1.IIdentifiedChannel} message IdentifiedChannel message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IdentifiedChannel.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IdentifiedChannel message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.channel.v1.IdentifiedChannel + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.channel.v1.IdentifiedChannel} IdentifiedChannel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IdentifiedChannel.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.IdentifiedChannel(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.state = reader.int32(); + break; + case 2: + message.ordering = reader.int32(); + break; + case 3: + message.counterparty = $root.ibc.core.channel.v1.Counterparty.decode(reader, reader.uint32()); + break; + case 4: + if (!(message.connectionHops && message.connectionHops.length)) + message.connectionHops = []; + message.connectionHops.push(reader.string()); + break; + case 5: + message.version = reader.string(); + break; + case 6: + message.portId = reader.string(); + break; + case 7: + message.channelId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IdentifiedChannel message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.channel.v1.IdentifiedChannel + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.channel.v1.IdentifiedChannel} IdentifiedChannel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IdentifiedChannel.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IdentifiedChannel message. + * @function verify + * @memberof ibc.core.channel.v1.IdentifiedChannel + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IdentifiedChannel.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.ordering != null && message.hasOwnProperty("ordering")) + switch (message.ordering) { + default: + return "ordering: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.counterparty != null && message.hasOwnProperty("counterparty")) { + let error = $root.ibc.core.channel.v1.Counterparty.verify(message.counterparty); + if (error) + return "counterparty." + error; + } + if (message.connectionHops != null && message.hasOwnProperty("connectionHops")) { + if (!Array.isArray(message.connectionHops)) + return "connectionHops: array expected"; + for (let i = 0; i < message.connectionHops.length; ++i) + if (!$util.isString(message.connectionHops[i])) + return "connectionHops: string[] expected"; + } + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.portId != null && message.hasOwnProperty("portId")) + if (!$util.isString(message.portId)) + return "portId: string expected"; + if (message.channelId != null && message.hasOwnProperty("channelId")) + if (!$util.isString(message.channelId)) + return "channelId: string expected"; + return null; + }; + + /** + * Creates an IdentifiedChannel message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.channel.v1.IdentifiedChannel + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.channel.v1.IdentifiedChannel} IdentifiedChannel + */ + IdentifiedChannel.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.channel.v1.IdentifiedChannel) + return object; + let message = new $root.ibc.core.channel.v1.IdentifiedChannel(); + switch (object.state) { + case "STATE_UNINITIALIZED_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "STATE_INIT": + case 1: + message.state = 1; + break; + case "STATE_TRYOPEN": + case 2: + message.state = 2; + break; + case "STATE_OPEN": + case 3: + message.state = 3; + break; + case "STATE_CLOSED": + case 4: + message.state = 4; + break; + } + switch (object.ordering) { + case "ORDER_NONE_UNSPECIFIED": + case 0: + message.ordering = 0; + break; + case "ORDER_UNORDERED": + case 1: + message.ordering = 1; + break; + case "ORDER_ORDERED": + case 2: + message.ordering = 2; + break; + } + if (object.counterparty != null) { + if (typeof object.counterparty !== "object") + throw TypeError(".ibc.core.channel.v1.IdentifiedChannel.counterparty: object expected"); + message.counterparty = $root.ibc.core.channel.v1.Counterparty.fromObject(object.counterparty); + } + if (object.connectionHops) { + if (!Array.isArray(object.connectionHops)) + throw TypeError(".ibc.core.channel.v1.IdentifiedChannel.connectionHops: array expected"); + message.connectionHops = []; + for (let i = 0; i < object.connectionHops.length; ++i) + message.connectionHops[i] = String(object.connectionHops[i]); + } + if (object.version != null) + message.version = String(object.version); + if (object.portId != null) + message.portId = String(object.portId); + if (object.channelId != null) + message.channelId = String(object.channelId); + return message; + }; + + /** + * Creates a plain object from an IdentifiedChannel message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.channel.v1.IdentifiedChannel + * @static + * @param {ibc.core.channel.v1.IdentifiedChannel} message IdentifiedChannel + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IdentifiedChannel.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.connectionHops = []; + if (options.defaults) { + object.state = options.enums === String ? "STATE_UNINITIALIZED_UNSPECIFIED" : 0; + object.ordering = options.enums === String ? "ORDER_NONE_UNSPECIFIED" : 0; + object.counterparty = null; + object.version = ""; + object.portId = ""; + object.channelId = ""; + } + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.ibc.core.channel.v1.State[message.state] : message.state; + if (message.ordering != null && message.hasOwnProperty("ordering")) + object.ordering = options.enums === String ? $root.ibc.core.channel.v1.Order[message.ordering] : message.ordering; + if (message.counterparty != null && message.hasOwnProperty("counterparty")) + object.counterparty = $root.ibc.core.channel.v1.Counterparty.toObject(message.counterparty, options); + if (message.connectionHops && message.connectionHops.length) { + object.connectionHops = []; + for (let j = 0; j < message.connectionHops.length; ++j) + object.connectionHops[j] = message.connectionHops[j]; + } + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.portId != null && message.hasOwnProperty("portId")) + object.portId = message.portId; + if (message.channelId != null && message.hasOwnProperty("channelId")) + object.channelId = message.channelId; + return object; + }; + + /** + * Converts this IdentifiedChannel to JSON. + * @function toJSON + * @memberof ibc.core.channel.v1.IdentifiedChannel + * @instance + * @returns {Object.} JSON object + */ + IdentifiedChannel.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return IdentifiedChannel; + })(v1.IdentifiedChannel || {}); + + /** + * State enum. + * @name ibc.core.channel.v1.State + * @enum {string} + * @property {number} STATE_UNINITIALIZED_UNSPECIFIED=0 STATE_UNINITIALIZED_UNSPECIFIED value + * @property {number} STATE_INIT=1 STATE_INIT value + * @property {number} STATE_TRYOPEN=2 STATE_TRYOPEN value + * @property {number} STATE_OPEN=3 STATE_OPEN value + * @property {number} STATE_CLOSED=4 STATE_CLOSED value + */ + v1.State = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNINITIALIZED_UNSPECIFIED"] = 0; + values[valuesById[1] = "STATE_INIT"] = 1; + values[valuesById[2] = "STATE_TRYOPEN"] = 2; + values[valuesById[3] = "STATE_OPEN"] = 3; + values[valuesById[4] = "STATE_CLOSED"] = 4; + return values; + })(); + + /** + * Order enum. + * @name ibc.core.channel.v1.Order + * @enum {string} + * @property {number} ORDER_NONE_UNSPECIFIED=0 ORDER_NONE_UNSPECIFIED value + * @property {number} ORDER_UNORDERED=1 ORDER_UNORDERED value + * @property {number} ORDER_ORDERED=2 ORDER_ORDERED value + */ + v1.Order = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ORDER_NONE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ORDER_UNORDERED"] = 1; + values[valuesById[2] = "ORDER_ORDERED"] = 2; + return values; + })(); + + v1.Counterparty = (function(Counterparty) { + + /** + * Properties of a Counterparty. + * @memberof ibc.core.channel.v1 + * @interface ICounterparty + * @property {string|null} [portId] Counterparty portId + * @property {string|null} [channelId] Counterparty channelId + */ + + /** + * Constructs a new Counterparty. + * @memberof ibc.core.channel.v1 + * @classdesc Represents a Counterparty. + * @implements ICounterparty + * @constructor + * @param {ibc.core.channel.v1.ICounterparty=} [properties] Properties to set + */ + function Counterparty(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Counterparty portId. + * @member {string} portId + * @memberof ibc.core.channel.v1.Counterparty + * @instance + */ + Counterparty.prototype.portId = ""; + + /** + * Counterparty channelId. + * @member {string} channelId + * @memberof ibc.core.channel.v1.Counterparty + * @instance + */ + Counterparty.prototype.channelId = ""; + + /** + * Creates a new Counterparty instance using the specified properties. + * @function create + * @memberof ibc.core.channel.v1.Counterparty + * @static + * @param {ibc.core.channel.v1.ICounterparty=} [properties] Properties to set + * @returns {ibc.core.channel.v1.Counterparty} Counterparty instance + */ + Counterparty.create = function create(properties) { + return new Counterparty(properties); + }; + + /** + * Encodes the specified Counterparty message. Does not implicitly {@link ibc.core.channel.v1.Counterparty.verify|verify} messages. + * @function encode + * @memberof ibc.core.channel.v1.Counterparty + * @static + * @param {ibc.core.channel.v1.ICounterparty} message Counterparty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Counterparty.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.portId != null && Object.hasOwnProperty.call(message, "portId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.portId); + if (message.channelId != null && Object.hasOwnProperty.call(message, "channelId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.channelId); + return writer; + }; + + /** + * Encodes the specified Counterparty message, length delimited. Does not implicitly {@link ibc.core.channel.v1.Counterparty.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.channel.v1.Counterparty + * @static + * @param {ibc.core.channel.v1.ICounterparty} message Counterparty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Counterparty.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Counterparty message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.channel.v1.Counterparty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.channel.v1.Counterparty} Counterparty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Counterparty.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.Counterparty(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.portId = reader.string(); + break; + case 2: + message.channelId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Counterparty message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.channel.v1.Counterparty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.channel.v1.Counterparty} Counterparty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Counterparty.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Counterparty message. + * @function verify + * @memberof ibc.core.channel.v1.Counterparty + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Counterparty.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.portId != null && message.hasOwnProperty("portId")) + if (!$util.isString(message.portId)) + return "portId: string expected"; + if (message.channelId != null && message.hasOwnProperty("channelId")) + if (!$util.isString(message.channelId)) + return "channelId: string expected"; + return null; + }; + + /** + * Creates a Counterparty message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.channel.v1.Counterparty + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.channel.v1.Counterparty} Counterparty + */ + Counterparty.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.channel.v1.Counterparty) + return object; + let message = new $root.ibc.core.channel.v1.Counterparty(); + if (object.portId != null) + message.portId = String(object.portId); + if (object.channelId != null) + message.channelId = String(object.channelId); + return message; + }; + + /** + * Creates a plain object from a Counterparty message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.channel.v1.Counterparty + * @static + * @param {ibc.core.channel.v1.Counterparty} message Counterparty + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Counterparty.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.portId = ""; + object.channelId = ""; + } + if (message.portId != null && message.hasOwnProperty("portId")) + object.portId = message.portId; + if (message.channelId != null && message.hasOwnProperty("channelId")) + object.channelId = message.channelId; + return object; + }; + + /** + * Converts this Counterparty to JSON. + * @function toJSON + * @memberof ibc.core.channel.v1.Counterparty + * @instance + * @returns {Object.} JSON object + */ + Counterparty.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Counterparty; + })(v1.Counterparty || {}); + + v1.Packet = (function(Packet) { + + /** + * Properties of a Packet. + * @memberof ibc.core.channel.v1 + * @interface IPacket + * @property {number|Long|null} [sequence] Packet sequence + * @property {string|null} [sourcePort] Packet sourcePort + * @property {string|null} [sourceChannel] Packet sourceChannel + * @property {string|null} [destinationPort] Packet destinationPort + * @property {string|null} [destinationChannel] Packet destinationChannel + * @property {Uint8Array|null} [data] Packet data + * @property {ibc.core.client.v1.IHeight|null} [timeoutHeight] Packet timeoutHeight + * @property {number|Long|null} [timeoutTimestamp] Packet timeoutTimestamp + */ + + /** + * Constructs a new Packet. + * @memberof ibc.core.channel.v1 + * @classdesc Represents a Packet. + * @implements IPacket + * @constructor + * @param {ibc.core.channel.v1.IPacket=} [properties] Properties to set + */ + function Packet(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Packet sequence. + * @member {number|Long} sequence + * @memberof ibc.core.channel.v1.Packet + * @instance + */ + Packet.prototype.sequence = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Packet sourcePort. + * @member {string} sourcePort + * @memberof ibc.core.channel.v1.Packet + * @instance + */ + Packet.prototype.sourcePort = ""; + + /** + * Packet sourceChannel. + * @member {string} sourceChannel + * @memberof ibc.core.channel.v1.Packet + * @instance + */ + Packet.prototype.sourceChannel = ""; + + /** + * Packet destinationPort. + * @member {string} destinationPort + * @memberof ibc.core.channel.v1.Packet + * @instance + */ + Packet.prototype.destinationPort = ""; + + /** + * Packet destinationChannel. + * @member {string} destinationChannel + * @memberof ibc.core.channel.v1.Packet + * @instance + */ + Packet.prototype.destinationChannel = ""; + + /** + * Packet data. + * @member {Uint8Array} data + * @memberof ibc.core.channel.v1.Packet + * @instance + */ + Packet.prototype.data = $util.newBuffer([]); + + /** + * Packet timeoutHeight. + * @member {ibc.core.client.v1.IHeight|null|undefined} timeoutHeight + * @memberof ibc.core.channel.v1.Packet + * @instance + */ + Packet.prototype.timeoutHeight = null; + + /** + * Packet timeoutTimestamp. + * @member {number|Long} timeoutTimestamp + * @memberof ibc.core.channel.v1.Packet + * @instance + */ + Packet.prototype.timeoutTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new Packet instance using the specified properties. + * @function create + * @memberof ibc.core.channel.v1.Packet + * @static + * @param {ibc.core.channel.v1.IPacket=} [properties] Properties to set + * @returns {ibc.core.channel.v1.Packet} Packet instance + */ + Packet.create = function create(properties) { + return new Packet(properties); + }; + + /** + * Encodes the specified Packet message. Does not implicitly {@link ibc.core.channel.v1.Packet.verify|verify} messages. + * @function encode + * @memberof ibc.core.channel.v1.Packet + * @static + * @param {ibc.core.channel.v1.IPacket} message Packet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Packet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sequence != null && Object.hasOwnProperty.call(message, "sequence")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.sequence); + if (message.sourcePort != null && Object.hasOwnProperty.call(message, "sourcePort")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourcePort); + if (message.sourceChannel != null && Object.hasOwnProperty.call(message, "sourceChannel")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.sourceChannel); + if (message.destinationPort != null && Object.hasOwnProperty.call(message, "destinationPort")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.destinationPort); + if (message.destinationChannel != null && Object.hasOwnProperty.call(message, "destinationChannel")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.destinationChannel); + if (message.data != null && Object.hasOwnProperty.call(message, "data")) + writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.data); + if (message.timeoutHeight != null && Object.hasOwnProperty.call(message, "timeoutHeight")) + $root.ibc.core.client.v1.Height.encode(message.timeoutHeight, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.timeoutTimestamp != null && Object.hasOwnProperty.call(message, "timeoutTimestamp")) + writer.uint32(/* id 8, wireType 0 =*/64).uint64(message.timeoutTimestamp); + return writer; + }; + + /** + * Encodes the specified Packet message, length delimited. Does not implicitly {@link ibc.core.channel.v1.Packet.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.channel.v1.Packet + * @static + * @param {ibc.core.channel.v1.IPacket} message Packet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Packet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Packet message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.channel.v1.Packet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.channel.v1.Packet} Packet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Packet.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.Packet(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.sequence = reader.uint64(); + break; + case 2: + message.sourcePort = reader.string(); + break; + case 3: + message.sourceChannel = reader.string(); + break; + case 4: + message.destinationPort = reader.string(); + break; + case 5: + message.destinationChannel = reader.string(); + break; + case 6: + message.data = reader.bytes(); + break; + case 7: + message.timeoutHeight = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); + break; + case 8: + message.timeoutTimestamp = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Packet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.channel.v1.Packet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.channel.v1.Packet} Packet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Packet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Packet message. + * @function verify + * @memberof ibc.core.channel.v1.Packet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Packet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sequence != null && message.hasOwnProperty("sequence")) + if (!$util.isInteger(message.sequence) && !(message.sequence && $util.isInteger(message.sequence.low) && $util.isInteger(message.sequence.high))) + return "sequence: integer|Long expected"; + if (message.sourcePort != null && message.hasOwnProperty("sourcePort")) + if (!$util.isString(message.sourcePort)) + return "sourcePort: string expected"; + if (message.sourceChannel != null && message.hasOwnProperty("sourceChannel")) + if (!$util.isString(message.sourceChannel)) + return "sourceChannel: string expected"; + if (message.destinationPort != null && message.hasOwnProperty("destinationPort")) + if (!$util.isString(message.destinationPort)) + return "destinationPort: string expected"; + if (message.destinationChannel != null && message.hasOwnProperty("destinationChannel")) + if (!$util.isString(message.destinationChannel)) + return "destinationChannel: string expected"; + if (message.data != null && message.hasOwnProperty("data")) + if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) + return "data: buffer expected"; + if (message.timeoutHeight != null && message.hasOwnProperty("timeoutHeight")) { + let error = $root.ibc.core.client.v1.Height.verify(message.timeoutHeight); + if (error) + return "timeoutHeight." + error; + } + if (message.timeoutTimestamp != null && message.hasOwnProperty("timeoutTimestamp")) + if (!$util.isInteger(message.timeoutTimestamp) && !(message.timeoutTimestamp && $util.isInteger(message.timeoutTimestamp.low) && $util.isInteger(message.timeoutTimestamp.high))) + return "timeoutTimestamp: integer|Long expected"; + return null; + }; + + /** + * Creates a Packet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.channel.v1.Packet + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.channel.v1.Packet} Packet + */ + Packet.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.channel.v1.Packet) + return object; + let message = new $root.ibc.core.channel.v1.Packet(); + if (object.sequence != null) + if ($util.Long) + (message.sequence = $util.Long.fromValue(object.sequence)).unsigned = true; + else if (typeof object.sequence === "string") + message.sequence = parseInt(object.sequence, 10); + else if (typeof object.sequence === "number") + message.sequence = object.sequence; + else if (typeof object.sequence === "object") + message.sequence = new $util.LongBits(object.sequence.low >>> 0, object.sequence.high >>> 0).toNumber(true); + if (object.sourcePort != null) + message.sourcePort = String(object.sourcePort); + if (object.sourceChannel != null) + message.sourceChannel = String(object.sourceChannel); + if (object.destinationPort != null) + message.destinationPort = String(object.destinationPort); + if (object.destinationChannel != null) + message.destinationChannel = String(object.destinationChannel); + if (object.data != null) + if (typeof object.data === "string") + $util.base64.decode(object.data, message.data = $util.newBuffer($util.base64.length(object.data)), 0); + else if (object.data.length) + message.data = object.data; + if (object.timeoutHeight != null) { + if (typeof object.timeoutHeight !== "object") + throw TypeError(".ibc.core.channel.v1.Packet.timeoutHeight: object expected"); + message.timeoutHeight = $root.ibc.core.client.v1.Height.fromObject(object.timeoutHeight); + } + if (object.timeoutTimestamp != null) + if ($util.Long) + (message.timeoutTimestamp = $util.Long.fromValue(object.timeoutTimestamp)).unsigned = true; + else if (typeof object.timeoutTimestamp === "string") + message.timeoutTimestamp = parseInt(object.timeoutTimestamp, 10); + else if (typeof object.timeoutTimestamp === "number") + message.timeoutTimestamp = object.timeoutTimestamp; + else if (typeof object.timeoutTimestamp === "object") + message.timeoutTimestamp = new $util.LongBits(object.timeoutTimestamp.low >>> 0, object.timeoutTimestamp.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a Packet message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.channel.v1.Packet + * @static + * @param {ibc.core.channel.v1.Packet} message Packet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Packet.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.sequence = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.sequence = options.longs === String ? "0" : 0; + object.sourcePort = ""; + object.sourceChannel = ""; + object.destinationPort = ""; + object.destinationChannel = ""; + if (options.bytes === String) + object.data = ""; + else { + object.data = []; + if (options.bytes !== Array) + object.data = $util.newBuffer(object.data); + } + object.timeoutHeight = null; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.timeoutTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.timeoutTimestamp = options.longs === String ? "0" : 0; + } + if (message.sequence != null && message.hasOwnProperty("sequence")) + if (typeof message.sequence === "number") + object.sequence = options.longs === String ? String(message.sequence) : message.sequence; + else + object.sequence = options.longs === String ? $util.Long.prototype.toString.call(message.sequence) : options.longs === Number ? new $util.LongBits(message.sequence.low >>> 0, message.sequence.high >>> 0).toNumber(true) : message.sequence; + if (message.sourcePort != null && message.hasOwnProperty("sourcePort")) + object.sourcePort = message.sourcePort; + if (message.sourceChannel != null && message.hasOwnProperty("sourceChannel")) + object.sourceChannel = message.sourceChannel; + if (message.destinationPort != null && message.hasOwnProperty("destinationPort")) + object.destinationPort = message.destinationPort; + if (message.destinationChannel != null && message.hasOwnProperty("destinationChannel")) + object.destinationChannel = message.destinationChannel; + if (message.data != null && message.hasOwnProperty("data")) + object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; + if (message.timeoutHeight != null && message.hasOwnProperty("timeoutHeight")) + object.timeoutHeight = $root.ibc.core.client.v1.Height.toObject(message.timeoutHeight, options); + if (message.timeoutTimestamp != null && message.hasOwnProperty("timeoutTimestamp")) + if (typeof message.timeoutTimestamp === "number") + object.timeoutTimestamp = options.longs === String ? String(message.timeoutTimestamp) : message.timeoutTimestamp; + else + object.timeoutTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.timeoutTimestamp) : options.longs === Number ? new $util.LongBits(message.timeoutTimestamp.low >>> 0, message.timeoutTimestamp.high >>> 0).toNumber(true) : message.timeoutTimestamp; + return object; + }; + + /** + * Converts this Packet to JSON. + * @function toJSON + * @memberof ibc.core.channel.v1.Packet + * @instance + * @returns {Object.} JSON object + */ + Packet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Packet; + })(v1.Packet || {}); + + v1.PacketState = (function(PacketState) { + + /** + * Properties of a PacketState. + * @memberof ibc.core.channel.v1 + * @interface IPacketState + * @property {string|null} [portId] PacketState portId + * @property {string|null} [channelId] PacketState channelId + * @property {number|Long|null} [sequence] PacketState sequence + * @property {Uint8Array|null} [data] PacketState data + */ + + /** + * Constructs a new PacketState. + * @memberof ibc.core.channel.v1 + * @classdesc Represents a PacketState. + * @implements IPacketState + * @constructor + * @param {ibc.core.channel.v1.IPacketState=} [properties] Properties to set + */ + function PacketState(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PacketState portId. + * @member {string} portId + * @memberof ibc.core.channel.v1.PacketState + * @instance + */ + PacketState.prototype.portId = ""; + + /** + * PacketState channelId. + * @member {string} channelId + * @memberof ibc.core.channel.v1.PacketState + * @instance + */ + PacketState.prototype.channelId = ""; + + /** + * PacketState sequence. + * @member {number|Long} sequence + * @memberof ibc.core.channel.v1.PacketState + * @instance + */ + PacketState.prototype.sequence = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * PacketState data. + * @member {Uint8Array} data + * @memberof ibc.core.channel.v1.PacketState + * @instance + */ + PacketState.prototype.data = $util.newBuffer([]); + + /** + * Creates a new PacketState instance using the specified properties. + * @function create + * @memberof ibc.core.channel.v1.PacketState + * @static + * @param {ibc.core.channel.v1.IPacketState=} [properties] Properties to set + * @returns {ibc.core.channel.v1.PacketState} PacketState instance + */ + PacketState.create = function create(properties) { + return new PacketState(properties); + }; + + /** + * Encodes the specified PacketState message. Does not implicitly {@link ibc.core.channel.v1.PacketState.verify|verify} messages. + * @function encode + * @memberof ibc.core.channel.v1.PacketState + * @static + * @param {ibc.core.channel.v1.IPacketState} message PacketState message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PacketState.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.portId != null && Object.hasOwnProperty.call(message, "portId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.portId); + if (message.channelId != null && Object.hasOwnProperty.call(message, "channelId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.channelId); + if (message.sequence != null && Object.hasOwnProperty.call(message, "sequence")) + writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.sequence); + if (message.data != null && Object.hasOwnProperty.call(message, "data")) + writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.data); + return writer; + }; + + /** + * Encodes the specified PacketState message, length delimited. Does not implicitly {@link ibc.core.channel.v1.PacketState.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.channel.v1.PacketState + * @static + * @param {ibc.core.channel.v1.IPacketState} message PacketState message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PacketState.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PacketState message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.channel.v1.PacketState + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.channel.v1.PacketState} PacketState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PacketState.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.PacketState(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.portId = reader.string(); + break; + case 2: + message.channelId = reader.string(); + break; + case 3: + message.sequence = reader.uint64(); + break; + case 4: + message.data = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PacketState message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.channel.v1.PacketState + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.channel.v1.PacketState} PacketState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PacketState.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PacketState message. + * @function verify + * @memberof ibc.core.channel.v1.PacketState + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PacketState.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.portId != null && message.hasOwnProperty("portId")) + if (!$util.isString(message.portId)) + return "portId: string expected"; + if (message.channelId != null && message.hasOwnProperty("channelId")) + if (!$util.isString(message.channelId)) + return "channelId: string expected"; + if (message.sequence != null && message.hasOwnProperty("sequence")) + if (!$util.isInteger(message.sequence) && !(message.sequence && $util.isInteger(message.sequence.low) && $util.isInteger(message.sequence.high))) + return "sequence: integer|Long expected"; + if (message.data != null && message.hasOwnProperty("data")) + if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) + return "data: buffer expected"; + return null; + }; + + /** + * Creates a PacketState message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.channel.v1.PacketState + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.channel.v1.PacketState} PacketState + */ + PacketState.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.channel.v1.PacketState) + return object; + let message = new $root.ibc.core.channel.v1.PacketState(); + if (object.portId != null) + message.portId = String(object.portId); + if (object.channelId != null) + message.channelId = String(object.channelId); + if (object.sequence != null) + if ($util.Long) + (message.sequence = $util.Long.fromValue(object.sequence)).unsigned = true; + else if (typeof object.sequence === "string") + message.sequence = parseInt(object.sequence, 10); + else if (typeof object.sequence === "number") + message.sequence = object.sequence; + else if (typeof object.sequence === "object") + message.sequence = new $util.LongBits(object.sequence.low >>> 0, object.sequence.high >>> 0).toNumber(true); + if (object.data != null) + if (typeof object.data === "string") + $util.base64.decode(object.data, message.data = $util.newBuffer($util.base64.length(object.data)), 0); + else if (object.data.length) + message.data = object.data; + return message; + }; + + /** + * Creates a plain object from a PacketState message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.channel.v1.PacketState + * @static + * @param {ibc.core.channel.v1.PacketState} message PacketState + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PacketState.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.portId = ""; + object.channelId = ""; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.sequence = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.sequence = options.longs === String ? "0" : 0; + if (options.bytes === String) + object.data = ""; + else { + object.data = []; + if (options.bytes !== Array) + object.data = $util.newBuffer(object.data); + } + } + if (message.portId != null && message.hasOwnProperty("portId")) + object.portId = message.portId; + if (message.channelId != null && message.hasOwnProperty("channelId")) + object.channelId = message.channelId; + if (message.sequence != null && message.hasOwnProperty("sequence")) + if (typeof message.sequence === "number") + object.sequence = options.longs === String ? String(message.sequence) : message.sequence; + else + object.sequence = options.longs === String ? $util.Long.prototype.toString.call(message.sequence) : options.longs === Number ? new $util.LongBits(message.sequence.low >>> 0, message.sequence.high >>> 0).toNumber(true) : message.sequence; + if (message.data != null && message.hasOwnProperty("data")) + object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; + return object; + }; + + /** + * Converts this PacketState to JSON. + * @function toJSON + * @memberof ibc.core.channel.v1.PacketState + * @instance + * @returns {Object.} JSON object + */ + PacketState.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PacketState; + })(v1.PacketState || {}); + + v1.Acknowledgement = (function(Acknowledgement) { + + /** + * Properties of an Acknowledgement. + * @memberof ibc.core.channel.v1 + * @interface IAcknowledgement + * @property {Uint8Array|null} [result] Acknowledgement result + * @property {string|null} [error] Acknowledgement error + */ + + /** + * Constructs a new Acknowledgement. + * @memberof ibc.core.channel.v1 + * @classdesc Represents an Acknowledgement. + * @implements IAcknowledgement + * @constructor + * @param {ibc.core.channel.v1.IAcknowledgement=} [properties] Properties to set + */ + function Acknowledgement(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Acknowledgement result. + * @member {Uint8Array} result + * @memberof ibc.core.channel.v1.Acknowledgement + * @instance + */ + Acknowledgement.prototype.result = $util.newBuffer([]); + + /** + * Acknowledgement error. + * @member {string} error + * @memberof ibc.core.channel.v1.Acknowledgement + * @instance + */ + Acknowledgement.prototype.error = ""; + + // OneOf field names bound to virtual getters and setters + let $oneOfFields; + + /** + * Acknowledgement response. + * @member {"result"|"error"|undefined} response + * @memberof ibc.core.channel.v1.Acknowledgement + * @instance + */ + Object.defineProperty(Acknowledgement.prototype, "response", { + get: $util.oneOfGetter($oneOfFields = ["result", "error"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Acknowledgement instance using the specified properties. + * @function create + * @memberof ibc.core.channel.v1.Acknowledgement + * @static + * @param {ibc.core.channel.v1.IAcknowledgement=} [properties] Properties to set + * @returns {ibc.core.channel.v1.Acknowledgement} Acknowledgement instance + */ + Acknowledgement.create = function create(properties) { + return new Acknowledgement(properties); + }; + + /** + * Encodes the specified Acknowledgement message. Does not implicitly {@link ibc.core.channel.v1.Acknowledgement.verify|verify} messages. + * @function encode + * @memberof ibc.core.channel.v1.Acknowledgement + * @static + * @param {ibc.core.channel.v1.IAcknowledgement} message Acknowledgement message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Acknowledgement.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.result != null && Object.hasOwnProperty.call(message, "result")) + writer.uint32(/* id 21, wireType 2 =*/170).bytes(message.result); + if (message.error != null && Object.hasOwnProperty.call(message, "error")) + writer.uint32(/* id 22, wireType 2 =*/178).string(message.error); + return writer; + }; + + /** + * Encodes the specified Acknowledgement message, length delimited. Does not implicitly {@link ibc.core.channel.v1.Acknowledgement.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.channel.v1.Acknowledgement + * @static + * @param {ibc.core.channel.v1.IAcknowledgement} message Acknowledgement message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Acknowledgement.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Acknowledgement message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.channel.v1.Acknowledgement + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.channel.v1.Acknowledgement} Acknowledgement + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Acknowledgement.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.Acknowledgement(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 21: + message.result = reader.bytes(); + break; + case 22: + message.error = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Acknowledgement message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.channel.v1.Acknowledgement + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.channel.v1.Acknowledgement} Acknowledgement + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Acknowledgement.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Acknowledgement message. + * @function verify + * @memberof ibc.core.channel.v1.Acknowledgement + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Acknowledgement.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + let properties = {}; + if (message.result != null && message.hasOwnProperty("result")) { + properties.response = 1; + if (!(message.result && typeof message.result.length === "number" || $util.isString(message.result))) + return "result: buffer expected"; + } + if (message.error != null && message.hasOwnProperty("error")) { + if (properties.response === 1) + return "response: multiple values"; + properties.response = 1; + if (!$util.isString(message.error)) + return "error: string expected"; + } + return null; + }; + + /** + * Creates an Acknowledgement message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.channel.v1.Acknowledgement + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.channel.v1.Acknowledgement} Acknowledgement + */ + Acknowledgement.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.channel.v1.Acknowledgement) + return object; + let message = new $root.ibc.core.channel.v1.Acknowledgement(); + if (object.result != null) + if (typeof object.result === "string") + $util.base64.decode(object.result, message.result = $util.newBuffer($util.base64.length(object.result)), 0); + else if (object.result.length) + message.result = object.result; + if (object.error != null) + message.error = String(object.error); + return message; + }; + + /** + * Creates a plain object from an Acknowledgement message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.channel.v1.Acknowledgement + * @static + * @param {ibc.core.channel.v1.Acknowledgement} message Acknowledgement + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Acknowledgement.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (message.result != null && message.hasOwnProperty("result")) { + object.result = options.bytes === String ? $util.base64.encode(message.result, 0, message.result.length) : options.bytes === Array ? Array.prototype.slice.call(message.result) : message.result; + if (options.oneofs) + object.response = "result"; + } + if (message.error != null && message.hasOwnProperty("error")) { + object.error = message.error; + if (options.oneofs) + object.response = "error"; + } + return object; + }; + + /** + * Converts this Acknowledgement to JSON. + * @function toJSON + * @memberof ibc.core.channel.v1.Acknowledgement + * @instance + * @returns {Object.} JSON object + */ + Acknowledgement.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Acknowledgement; + })(v1.Acknowledgement || {}); + + v1.GenesisState = (function(GenesisState) { + + /** + * Properties of a GenesisState. + * @memberof ibc.core.channel.v1 + * @interface IGenesisState + * @property {Array.|null} [channels] GenesisState channels + * @property {Array.|null} [acknowledgements] GenesisState acknowledgements + * @property {Array.|null} [commitments] GenesisState commitments + * @property {Array.|null} [receipts] GenesisState receipts + * @property {Array.|null} [sendSequences] GenesisState sendSequences + * @property {Array.|null} [recvSequences] GenesisState recvSequences + * @property {Array.|null} [ackSequences] GenesisState ackSequences + * @property {number|Long|null} [nextChannelSequence] GenesisState nextChannelSequence + */ + + /** + * Constructs a new GenesisState. + * @memberof ibc.core.channel.v1 + * @classdesc Represents a GenesisState. + * @implements IGenesisState + * @constructor + * @param {ibc.core.channel.v1.IGenesisState=} [properties] Properties to set + */ + function GenesisState(properties) { + this.channels = []; + this.acknowledgements = []; + this.commitments = []; + this.receipts = []; + this.sendSequences = []; + this.recvSequences = []; + this.ackSequences = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GenesisState channels. + * @member {Array.} channels + * @memberof ibc.core.channel.v1.GenesisState + * @instance + */ + GenesisState.prototype.channels = $util.emptyArray; + + /** + * GenesisState acknowledgements. + * @member {Array.} acknowledgements + * @memberof ibc.core.channel.v1.GenesisState + * @instance + */ + GenesisState.prototype.acknowledgements = $util.emptyArray; + + /** + * GenesisState commitments. + * @member {Array.} commitments + * @memberof ibc.core.channel.v1.GenesisState + * @instance + */ + GenesisState.prototype.commitments = $util.emptyArray; + + /** + * GenesisState receipts. + * @member {Array.} receipts + * @memberof ibc.core.channel.v1.GenesisState + * @instance + */ + GenesisState.prototype.receipts = $util.emptyArray; + + /** + * GenesisState sendSequences. + * @member {Array.} sendSequences + * @memberof ibc.core.channel.v1.GenesisState + * @instance + */ + GenesisState.prototype.sendSequences = $util.emptyArray; + + /** + * GenesisState recvSequences. + * @member {Array.} recvSequences + * @memberof ibc.core.channel.v1.GenesisState + * @instance + */ + GenesisState.prototype.recvSequences = $util.emptyArray; + + /** + * GenesisState ackSequences. + * @member {Array.} ackSequences + * @memberof ibc.core.channel.v1.GenesisState + * @instance + */ + GenesisState.prototype.ackSequences = $util.emptyArray; + + /** + * GenesisState nextChannelSequence. + * @member {number|Long} nextChannelSequence + * @memberof ibc.core.channel.v1.GenesisState + * @instance + */ + GenesisState.prototype.nextChannelSequence = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new GenesisState instance using the specified properties. + * @function create + * @memberof ibc.core.channel.v1.GenesisState + * @static + * @param {ibc.core.channel.v1.IGenesisState=} [properties] Properties to set + * @returns {ibc.core.channel.v1.GenesisState} GenesisState instance + */ + GenesisState.create = function create(properties) { + return new GenesisState(properties); + }; + + /** + * Encodes the specified GenesisState message. Does not implicitly {@link ibc.core.channel.v1.GenesisState.verify|verify} messages. + * @function encode + * @memberof ibc.core.channel.v1.GenesisState + * @static + * @param {ibc.core.channel.v1.IGenesisState} message GenesisState message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenesisState.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.channels != null && message.channels.length) + for (let i = 0; i < message.channels.length; ++i) + $root.ibc.core.channel.v1.IdentifiedChannel.encode(message.channels[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.acknowledgements != null && message.acknowledgements.length) + for (let i = 0; i < message.acknowledgements.length; ++i) + $root.ibc.core.channel.v1.PacketState.encode(message.acknowledgements[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.commitments != null && message.commitments.length) + for (let i = 0; i < message.commitments.length; ++i) + $root.ibc.core.channel.v1.PacketState.encode(message.commitments[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.receipts != null && message.receipts.length) + for (let i = 0; i < message.receipts.length; ++i) + $root.ibc.core.channel.v1.PacketState.encode(message.receipts[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.sendSequences != null && message.sendSequences.length) + for (let i = 0; i < message.sendSequences.length; ++i) + $root.ibc.core.channel.v1.PacketSequence.encode(message.sendSequences[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.recvSequences != null && message.recvSequences.length) + for (let i = 0; i < message.recvSequences.length; ++i) + $root.ibc.core.channel.v1.PacketSequence.encode(message.recvSequences[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.ackSequences != null && message.ackSequences.length) + for (let i = 0; i < message.ackSequences.length; ++i) + $root.ibc.core.channel.v1.PacketSequence.encode(message.ackSequences[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.nextChannelSequence != null && Object.hasOwnProperty.call(message, "nextChannelSequence")) + writer.uint32(/* id 8, wireType 0 =*/64).uint64(message.nextChannelSequence); + return writer; + }; + + /** + * Encodes the specified GenesisState message, length delimited. Does not implicitly {@link ibc.core.channel.v1.GenesisState.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.channel.v1.GenesisState + * @static + * @param {ibc.core.channel.v1.IGenesisState} message GenesisState message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenesisState.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GenesisState message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.channel.v1.GenesisState + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.channel.v1.GenesisState} GenesisState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenesisState.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.GenesisState(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.channels && message.channels.length)) + message.channels = []; + message.channels.push($root.ibc.core.channel.v1.IdentifiedChannel.decode(reader, reader.uint32())); + break; + case 2: + if (!(message.acknowledgements && message.acknowledgements.length)) + message.acknowledgements = []; + message.acknowledgements.push($root.ibc.core.channel.v1.PacketState.decode(reader, reader.uint32())); + break; + case 3: + if (!(message.commitments && message.commitments.length)) + message.commitments = []; + message.commitments.push($root.ibc.core.channel.v1.PacketState.decode(reader, reader.uint32())); + break; + case 4: + if (!(message.receipts && message.receipts.length)) + message.receipts = []; + message.receipts.push($root.ibc.core.channel.v1.PacketState.decode(reader, reader.uint32())); + break; + case 5: + if (!(message.sendSequences && message.sendSequences.length)) + message.sendSequences = []; + message.sendSequences.push($root.ibc.core.channel.v1.PacketSequence.decode(reader, reader.uint32())); + break; + case 6: + if (!(message.recvSequences && message.recvSequences.length)) + message.recvSequences = []; + message.recvSequences.push($root.ibc.core.channel.v1.PacketSequence.decode(reader, reader.uint32())); + break; + case 7: + if (!(message.ackSequences && message.ackSequences.length)) + message.ackSequences = []; + message.ackSequences.push($root.ibc.core.channel.v1.PacketSequence.decode(reader, reader.uint32())); + break; + case 8: + message.nextChannelSequence = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GenesisState message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.channel.v1.GenesisState + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.channel.v1.GenesisState} GenesisState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenesisState.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GenesisState message. + * @function verify + * @memberof ibc.core.channel.v1.GenesisState + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GenesisState.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.channels != null && message.hasOwnProperty("channels")) { + if (!Array.isArray(message.channels)) + return "channels: array expected"; + for (let i = 0; i < message.channels.length; ++i) { + let error = $root.ibc.core.channel.v1.IdentifiedChannel.verify(message.channels[i]); + if (error) + return "channels." + error; + } + } + if (message.acknowledgements != null && message.hasOwnProperty("acknowledgements")) { + if (!Array.isArray(message.acknowledgements)) + return "acknowledgements: array expected"; + for (let i = 0; i < message.acknowledgements.length; ++i) { + let error = $root.ibc.core.channel.v1.PacketState.verify(message.acknowledgements[i]); + if (error) + return "acknowledgements." + error; + } + } + if (message.commitments != null && message.hasOwnProperty("commitments")) { + if (!Array.isArray(message.commitments)) + return "commitments: array expected"; + for (let i = 0; i < message.commitments.length; ++i) { + let error = $root.ibc.core.channel.v1.PacketState.verify(message.commitments[i]); + if (error) + return "commitments." + error; + } + } + if (message.receipts != null && message.hasOwnProperty("receipts")) { + if (!Array.isArray(message.receipts)) + return "receipts: array expected"; + for (let i = 0; i < message.receipts.length; ++i) { + let error = $root.ibc.core.channel.v1.PacketState.verify(message.receipts[i]); + if (error) + return "receipts." + error; + } + } + if (message.sendSequences != null && message.hasOwnProperty("sendSequences")) { + if (!Array.isArray(message.sendSequences)) + return "sendSequences: array expected"; + for (let i = 0; i < message.sendSequences.length; ++i) { + let error = $root.ibc.core.channel.v1.PacketSequence.verify(message.sendSequences[i]); + if (error) + return "sendSequences." + error; + } + } + if (message.recvSequences != null && message.hasOwnProperty("recvSequences")) { + if (!Array.isArray(message.recvSequences)) + return "recvSequences: array expected"; + for (let i = 0; i < message.recvSequences.length; ++i) { + let error = $root.ibc.core.channel.v1.PacketSequence.verify(message.recvSequences[i]); + if (error) + return "recvSequences." + error; + } + } + if (message.ackSequences != null && message.hasOwnProperty("ackSequences")) { + if (!Array.isArray(message.ackSequences)) + return "ackSequences: array expected"; + for (let i = 0; i < message.ackSequences.length; ++i) { + let error = $root.ibc.core.channel.v1.PacketSequence.verify(message.ackSequences[i]); + if (error) + return "ackSequences." + error; + } + } + if (message.nextChannelSequence != null && message.hasOwnProperty("nextChannelSequence")) + if (!$util.isInteger(message.nextChannelSequence) && !(message.nextChannelSequence && $util.isInteger(message.nextChannelSequence.low) && $util.isInteger(message.nextChannelSequence.high))) + return "nextChannelSequence: integer|Long expected"; + return null; + }; + + /** + * Creates a GenesisState message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.channel.v1.GenesisState + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.channel.v1.GenesisState} GenesisState + */ + GenesisState.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.channel.v1.GenesisState) + return object; + let message = new $root.ibc.core.channel.v1.GenesisState(); + if (object.channels) { + if (!Array.isArray(object.channels)) + throw TypeError(".ibc.core.channel.v1.GenesisState.channels: array expected"); + message.channels = []; + for (let i = 0; i < object.channels.length; ++i) { + if (typeof object.channels[i] !== "object") + throw TypeError(".ibc.core.channel.v1.GenesisState.channels: object expected"); + message.channels[i] = $root.ibc.core.channel.v1.IdentifiedChannel.fromObject(object.channels[i]); + } + } + if (object.acknowledgements) { + if (!Array.isArray(object.acknowledgements)) + throw TypeError(".ibc.core.channel.v1.GenesisState.acknowledgements: array expected"); + message.acknowledgements = []; + for (let i = 0; i < object.acknowledgements.length; ++i) { + if (typeof object.acknowledgements[i] !== "object") + throw TypeError(".ibc.core.channel.v1.GenesisState.acknowledgements: object expected"); + message.acknowledgements[i] = $root.ibc.core.channel.v1.PacketState.fromObject(object.acknowledgements[i]); + } + } + if (object.commitments) { + if (!Array.isArray(object.commitments)) + throw TypeError(".ibc.core.channel.v1.GenesisState.commitments: array expected"); + message.commitments = []; + for (let i = 0; i < object.commitments.length; ++i) { + if (typeof object.commitments[i] !== "object") + throw TypeError(".ibc.core.channel.v1.GenesisState.commitments: object expected"); + message.commitments[i] = $root.ibc.core.channel.v1.PacketState.fromObject(object.commitments[i]); + } + } + if (object.receipts) { + if (!Array.isArray(object.receipts)) + throw TypeError(".ibc.core.channel.v1.GenesisState.receipts: array expected"); + message.receipts = []; + for (let i = 0; i < object.receipts.length; ++i) { + if (typeof object.receipts[i] !== "object") + throw TypeError(".ibc.core.channel.v1.GenesisState.receipts: object expected"); + message.receipts[i] = $root.ibc.core.channel.v1.PacketState.fromObject(object.receipts[i]); + } + } + if (object.sendSequences) { + if (!Array.isArray(object.sendSequences)) + throw TypeError(".ibc.core.channel.v1.GenesisState.sendSequences: array expected"); + message.sendSequences = []; + for (let i = 0; i < object.sendSequences.length; ++i) { + if (typeof object.sendSequences[i] !== "object") + throw TypeError(".ibc.core.channel.v1.GenesisState.sendSequences: object expected"); + message.sendSequences[i] = $root.ibc.core.channel.v1.PacketSequence.fromObject(object.sendSequences[i]); + } + } + if (object.recvSequences) { + if (!Array.isArray(object.recvSequences)) + throw TypeError(".ibc.core.channel.v1.GenesisState.recvSequences: array expected"); + message.recvSequences = []; + for (let i = 0; i < object.recvSequences.length; ++i) { + if (typeof object.recvSequences[i] !== "object") + throw TypeError(".ibc.core.channel.v1.GenesisState.recvSequences: object expected"); + message.recvSequences[i] = $root.ibc.core.channel.v1.PacketSequence.fromObject(object.recvSequences[i]); + } + } + if (object.ackSequences) { + if (!Array.isArray(object.ackSequences)) + throw TypeError(".ibc.core.channel.v1.GenesisState.ackSequences: array expected"); + message.ackSequences = []; + for (let i = 0; i < object.ackSequences.length; ++i) { + if (typeof object.ackSequences[i] !== "object") + throw TypeError(".ibc.core.channel.v1.GenesisState.ackSequences: object expected"); + message.ackSequences[i] = $root.ibc.core.channel.v1.PacketSequence.fromObject(object.ackSequences[i]); + } + } + if (object.nextChannelSequence != null) + if ($util.Long) + (message.nextChannelSequence = $util.Long.fromValue(object.nextChannelSequence)).unsigned = true; + else if (typeof object.nextChannelSequence === "string") + message.nextChannelSequence = parseInt(object.nextChannelSequence, 10); + else if (typeof object.nextChannelSequence === "number") + message.nextChannelSequence = object.nextChannelSequence; + else if (typeof object.nextChannelSequence === "object") + message.nextChannelSequence = new $util.LongBits(object.nextChannelSequence.low >>> 0, object.nextChannelSequence.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a GenesisState message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.channel.v1.GenesisState + * @static + * @param {ibc.core.channel.v1.GenesisState} message GenesisState + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GenesisState.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) { + object.channels = []; + object.acknowledgements = []; + object.commitments = []; + object.receipts = []; + object.sendSequences = []; + object.recvSequences = []; + object.ackSequences = []; + } + if (options.defaults) + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.nextChannelSequence = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.nextChannelSequence = options.longs === String ? "0" : 0; + if (message.channels && message.channels.length) { + object.channels = []; + for (let j = 0; j < message.channels.length; ++j) + object.channels[j] = $root.ibc.core.channel.v1.IdentifiedChannel.toObject(message.channels[j], options); + } + if (message.acknowledgements && message.acknowledgements.length) { + object.acknowledgements = []; + for (let j = 0; j < message.acknowledgements.length; ++j) + object.acknowledgements[j] = $root.ibc.core.channel.v1.PacketState.toObject(message.acknowledgements[j], options); + } + if (message.commitments && message.commitments.length) { + object.commitments = []; + for (let j = 0; j < message.commitments.length; ++j) + object.commitments[j] = $root.ibc.core.channel.v1.PacketState.toObject(message.commitments[j], options); + } + if (message.receipts && message.receipts.length) { + object.receipts = []; + for (let j = 0; j < message.receipts.length; ++j) + object.receipts[j] = $root.ibc.core.channel.v1.PacketState.toObject(message.receipts[j], options); + } + if (message.sendSequences && message.sendSequences.length) { + object.sendSequences = []; + for (let j = 0; j < message.sendSequences.length; ++j) + object.sendSequences[j] = $root.ibc.core.channel.v1.PacketSequence.toObject(message.sendSequences[j], options); + } + if (message.recvSequences && message.recvSequences.length) { + object.recvSequences = []; + for (let j = 0; j < message.recvSequences.length; ++j) + object.recvSequences[j] = $root.ibc.core.channel.v1.PacketSequence.toObject(message.recvSequences[j], options); + } + if (message.ackSequences && message.ackSequences.length) { + object.ackSequences = []; + for (let j = 0; j < message.ackSequences.length; ++j) + object.ackSequences[j] = $root.ibc.core.channel.v1.PacketSequence.toObject(message.ackSequences[j], options); + } + if (message.nextChannelSequence != null && message.hasOwnProperty("nextChannelSequence")) + if (typeof message.nextChannelSequence === "number") + object.nextChannelSequence = options.longs === String ? String(message.nextChannelSequence) : message.nextChannelSequence; + else + object.nextChannelSequence = options.longs === String ? $util.Long.prototype.toString.call(message.nextChannelSequence) : options.longs === Number ? new $util.LongBits(message.nextChannelSequence.low >>> 0, message.nextChannelSequence.high >>> 0).toNumber(true) : message.nextChannelSequence; + return object; + }; + + /** + * Converts this GenesisState to JSON. + * @function toJSON + * @memberof ibc.core.channel.v1.GenesisState + * @instance + * @returns {Object.} JSON object + */ + GenesisState.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GenesisState; + })(v1.GenesisState || {}); + + v1.PacketSequence = (function(PacketSequence) { + + /** + * Properties of a PacketSequence. + * @memberof ibc.core.channel.v1 + * @interface IPacketSequence + * @property {string|null} [portId] PacketSequence portId + * @property {string|null} [channelId] PacketSequence channelId + * @property {number|Long|null} [sequence] PacketSequence sequence + */ + + /** + * Constructs a new PacketSequence. + * @memberof ibc.core.channel.v1 + * @classdesc Represents a PacketSequence. + * @implements IPacketSequence + * @constructor + * @param {ibc.core.channel.v1.IPacketSequence=} [properties] Properties to set + */ + function PacketSequence(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PacketSequence portId. + * @member {string} portId + * @memberof ibc.core.channel.v1.PacketSequence + * @instance + */ + PacketSequence.prototype.portId = ""; + + /** + * PacketSequence channelId. + * @member {string} channelId + * @memberof ibc.core.channel.v1.PacketSequence + * @instance + */ + PacketSequence.prototype.channelId = ""; + + /** + * PacketSequence sequence. + * @member {number|Long} sequence + * @memberof ibc.core.channel.v1.PacketSequence + * @instance + */ + PacketSequence.prototype.sequence = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new PacketSequence instance using the specified properties. + * @function create + * @memberof ibc.core.channel.v1.PacketSequence + * @static + * @param {ibc.core.channel.v1.IPacketSequence=} [properties] Properties to set + * @returns {ibc.core.channel.v1.PacketSequence} PacketSequence instance + */ + PacketSequence.create = function create(properties) { + return new PacketSequence(properties); + }; + + /** + * Encodes the specified PacketSequence message. Does not implicitly {@link ibc.core.channel.v1.PacketSequence.verify|verify} messages. + * @function encode + * @memberof ibc.core.channel.v1.PacketSequence + * @static + * @param {ibc.core.channel.v1.IPacketSequence} message PacketSequence message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PacketSequence.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.portId != null && Object.hasOwnProperty.call(message, "portId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.portId); + if (message.channelId != null && Object.hasOwnProperty.call(message, "channelId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.channelId); + if (message.sequence != null && Object.hasOwnProperty.call(message, "sequence")) + writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.sequence); + return writer; + }; + + /** + * Encodes the specified PacketSequence message, length delimited. Does not implicitly {@link ibc.core.channel.v1.PacketSequence.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.channel.v1.PacketSequence + * @static + * @param {ibc.core.channel.v1.IPacketSequence} message PacketSequence message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PacketSequence.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PacketSequence message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.channel.v1.PacketSequence + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.channel.v1.PacketSequence} PacketSequence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PacketSequence.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.PacketSequence(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.portId = reader.string(); + break; + case 2: + message.channelId = reader.string(); + break; + case 3: + message.sequence = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PacketSequence message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.channel.v1.PacketSequence + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.channel.v1.PacketSequence} PacketSequence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PacketSequence.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PacketSequence message. + * @function verify + * @memberof ibc.core.channel.v1.PacketSequence + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PacketSequence.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.portId != null && message.hasOwnProperty("portId")) + if (!$util.isString(message.portId)) + return "portId: string expected"; + if (message.channelId != null && message.hasOwnProperty("channelId")) + if (!$util.isString(message.channelId)) + return "channelId: string expected"; + if (message.sequence != null && message.hasOwnProperty("sequence")) + if (!$util.isInteger(message.sequence) && !(message.sequence && $util.isInteger(message.sequence.low) && $util.isInteger(message.sequence.high))) + return "sequence: integer|Long expected"; + return null; + }; + + /** + * Creates a PacketSequence message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.channel.v1.PacketSequence + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.channel.v1.PacketSequence} PacketSequence + */ + PacketSequence.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.channel.v1.PacketSequence) + return object; + let message = new $root.ibc.core.channel.v1.PacketSequence(); + if (object.portId != null) + message.portId = String(object.portId); + if (object.channelId != null) + message.channelId = String(object.channelId); + if (object.sequence != null) + if ($util.Long) + (message.sequence = $util.Long.fromValue(object.sequence)).unsigned = true; + else if (typeof object.sequence === "string") + message.sequence = parseInt(object.sequence, 10); + else if (typeof object.sequence === "number") + message.sequence = object.sequence; + else if (typeof object.sequence === "object") + message.sequence = new $util.LongBits(object.sequence.low >>> 0, object.sequence.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a PacketSequence message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.channel.v1.PacketSequence + * @static + * @param {ibc.core.channel.v1.PacketSequence} message PacketSequence + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PacketSequence.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.portId = ""; + object.channelId = ""; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.sequence = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.sequence = options.longs === String ? "0" : 0; + } + if (message.portId != null && message.hasOwnProperty("portId")) + object.portId = message.portId; + if (message.channelId != null && message.hasOwnProperty("channelId")) + object.channelId = message.channelId; + if (message.sequence != null && message.hasOwnProperty("sequence")) + if (typeof message.sequence === "number") + object.sequence = options.longs === String ? String(message.sequence) : message.sequence; + else + object.sequence = options.longs === String ? $util.Long.prototype.toString.call(message.sequence) : options.longs === Number ? new $util.LongBits(message.sequence.low >>> 0, message.sequence.high >>> 0).toNumber(true) : message.sequence; + return object; + }; + + /** + * Converts this PacketSequence to JSON. + * @function toJSON + * @memberof ibc.core.channel.v1.PacketSequence + * @instance + * @returns {Object.} JSON object + */ + PacketSequence.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PacketSequence; + })(v1.PacketSequence || {}); + + v1.Query = (function(Query) { + + /** + * Constructs a new Query service. + * @memberof ibc.core.channel.v1 + * @classdesc Represents a Query + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Query(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Query.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Query; + + /** + * Creates new Query service using the specified rpc implementation. + * @function create + * @memberof ibc.core.channel.v1.Query + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Query} RPC service. Useful where requests and/or responses are streamed. + */ + Query.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link ibc.core.channel.v1.Query#channel}. + * @memberof ibc.core.channel.v1.Query + * @typedef ChannelCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {ibc.core.channel.v1.IQueryChannelResponse} [response] QueryChannelResponse + */ + + /** + * Calls Channel. + * @function channel + * @memberof ibc.core.channel.v1.Query + * @instance + * @param {ibc.core.channel.v1.IQueryChannelRequest} request QueryChannelRequest message or plain object + * @param {ibc.core.channel.v1.Query.ChannelCallback} callback Node-style callback called with the error, if any, and QueryChannelResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.channel = function channel(request, callback) { + return this.rpcCall(channel, $root.ibc.core.channel.v1.QueryChannelRequest, $root.ibc.core.channel.v1.QueryChannelResponse, request, callback); + }, "name", { value: "Channel" }); + + /** + * Calls Channel. + * @function channel + * @memberof ibc.core.channel.v1.Query + * @instance + * @param {ibc.core.channel.v1.IQueryChannelRequest} request QueryChannelRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link ibc.core.channel.v1.Query#channels}. + * @memberof ibc.core.channel.v1.Query + * @typedef ChannelsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {ibc.core.channel.v1.IQueryChannelsResponse} [response] QueryChannelsResponse + */ + + /** + * Calls Channels. + * @function channels + * @memberof ibc.core.channel.v1.Query + * @instance + * @param {ibc.core.channel.v1.IQueryChannelsRequest} request QueryChannelsRequest message or plain object + * @param {ibc.core.channel.v1.Query.ChannelsCallback} callback Node-style callback called with the error, if any, and QueryChannelsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.channels = function channels(request, callback) { + return this.rpcCall(channels, $root.ibc.core.channel.v1.QueryChannelsRequest, $root.ibc.core.channel.v1.QueryChannelsResponse, request, callback); + }, "name", { value: "Channels" }); + + /** + * Calls Channels. + * @function channels + * @memberof ibc.core.channel.v1.Query + * @instance + * @param {ibc.core.channel.v1.IQueryChannelsRequest} request QueryChannelsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link ibc.core.channel.v1.Query#connectionChannels}. + * @memberof ibc.core.channel.v1.Query + * @typedef ConnectionChannelsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {ibc.core.channel.v1.IQueryConnectionChannelsResponse} [response] QueryConnectionChannelsResponse + */ + + /** + * Calls ConnectionChannels. + * @function connectionChannels + * @memberof ibc.core.channel.v1.Query + * @instance + * @param {ibc.core.channel.v1.IQueryConnectionChannelsRequest} request QueryConnectionChannelsRequest message or plain object + * @param {ibc.core.channel.v1.Query.ConnectionChannelsCallback} callback Node-style callback called with the error, if any, and QueryConnectionChannelsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.connectionChannels = function connectionChannels(request, callback) { + return this.rpcCall(connectionChannels, $root.ibc.core.channel.v1.QueryConnectionChannelsRequest, $root.ibc.core.channel.v1.QueryConnectionChannelsResponse, request, callback); + }, "name", { value: "ConnectionChannels" }); + + /** + * Calls ConnectionChannels. + * @function connectionChannels + * @memberof ibc.core.channel.v1.Query + * @instance + * @param {ibc.core.channel.v1.IQueryConnectionChannelsRequest} request QueryConnectionChannelsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link ibc.core.channel.v1.Query#channelClientState}. + * @memberof ibc.core.channel.v1.Query + * @typedef ChannelClientStateCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {ibc.core.channel.v1.IQueryChannelClientStateResponse} [response] QueryChannelClientStateResponse + */ + + /** + * Calls ChannelClientState. + * @function channelClientState + * @memberof ibc.core.channel.v1.Query + * @instance + * @param {ibc.core.channel.v1.IQueryChannelClientStateRequest} request QueryChannelClientStateRequest message or plain object + * @param {ibc.core.channel.v1.Query.ChannelClientStateCallback} callback Node-style callback called with the error, if any, and QueryChannelClientStateResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.channelClientState = function channelClientState(request, callback) { + return this.rpcCall(channelClientState, $root.ibc.core.channel.v1.QueryChannelClientStateRequest, $root.ibc.core.channel.v1.QueryChannelClientStateResponse, request, callback); + }, "name", { value: "ChannelClientState" }); + + /** + * Calls ChannelClientState. + * @function channelClientState + * @memberof ibc.core.channel.v1.Query + * @instance + * @param {ibc.core.channel.v1.IQueryChannelClientStateRequest} request QueryChannelClientStateRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link ibc.core.channel.v1.Query#channelConsensusState}. + * @memberof ibc.core.channel.v1.Query + * @typedef ChannelConsensusStateCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {ibc.core.channel.v1.IQueryChannelConsensusStateResponse} [response] QueryChannelConsensusStateResponse + */ + + /** + * Calls ChannelConsensusState. + * @function channelConsensusState + * @memberof ibc.core.channel.v1.Query + * @instance + * @param {ibc.core.channel.v1.IQueryChannelConsensusStateRequest} request QueryChannelConsensusStateRequest message or plain object + * @param {ibc.core.channel.v1.Query.ChannelConsensusStateCallback} callback Node-style callback called with the error, if any, and QueryChannelConsensusStateResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.channelConsensusState = function channelConsensusState(request, callback) { + return this.rpcCall(channelConsensusState, $root.ibc.core.channel.v1.QueryChannelConsensusStateRequest, $root.ibc.core.channel.v1.QueryChannelConsensusStateResponse, request, callback); + }, "name", { value: "ChannelConsensusState" }); + + /** + * Calls ChannelConsensusState. + * @function channelConsensusState + * @memberof ibc.core.channel.v1.Query + * @instance + * @param {ibc.core.channel.v1.IQueryChannelConsensusStateRequest} request QueryChannelConsensusStateRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link ibc.core.channel.v1.Query#packetCommitment}. + * @memberof ibc.core.channel.v1.Query + * @typedef PacketCommitmentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {ibc.core.channel.v1.IQueryPacketCommitmentResponse} [response] QueryPacketCommitmentResponse + */ + + /** + * Calls PacketCommitment. + * @function packetCommitment + * @memberof ibc.core.channel.v1.Query + * @instance + * @param {ibc.core.channel.v1.IQueryPacketCommitmentRequest} request QueryPacketCommitmentRequest message or plain object + * @param {ibc.core.channel.v1.Query.PacketCommitmentCallback} callback Node-style callback called with the error, if any, and QueryPacketCommitmentResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.packetCommitment = function packetCommitment(request, callback) { + return this.rpcCall(packetCommitment, $root.ibc.core.channel.v1.QueryPacketCommitmentRequest, $root.ibc.core.channel.v1.QueryPacketCommitmentResponse, request, callback); + }, "name", { value: "PacketCommitment" }); + + /** + * Calls PacketCommitment. + * @function packetCommitment + * @memberof ibc.core.channel.v1.Query + * @instance + * @param {ibc.core.channel.v1.IQueryPacketCommitmentRequest} request QueryPacketCommitmentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link ibc.core.channel.v1.Query#packetCommitments}. + * @memberof ibc.core.channel.v1.Query + * @typedef PacketCommitmentsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {ibc.core.channel.v1.IQueryPacketCommitmentsResponse} [response] QueryPacketCommitmentsResponse + */ + + /** + * Calls PacketCommitments. + * @function packetCommitments + * @memberof ibc.core.channel.v1.Query + * @instance + * @param {ibc.core.channel.v1.IQueryPacketCommitmentsRequest} request QueryPacketCommitmentsRequest message or plain object + * @param {ibc.core.channel.v1.Query.PacketCommitmentsCallback} callback Node-style callback called with the error, if any, and QueryPacketCommitmentsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.packetCommitments = function packetCommitments(request, callback) { + return this.rpcCall(packetCommitments, $root.ibc.core.channel.v1.QueryPacketCommitmentsRequest, $root.ibc.core.channel.v1.QueryPacketCommitmentsResponse, request, callback); + }, "name", { value: "PacketCommitments" }); + + /** + * Calls PacketCommitments. + * @function packetCommitments + * @memberof ibc.core.channel.v1.Query + * @instance + * @param {ibc.core.channel.v1.IQueryPacketCommitmentsRequest} request QueryPacketCommitmentsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link ibc.core.channel.v1.Query#packetReceipt}. + * @memberof ibc.core.channel.v1.Query + * @typedef PacketReceiptCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {ibc.core.channel.v1.IQueryPacketReceiptResponse} [response] QueryPacketReceiptResponse + */ + + /** + * Calls PacketReceipt. + * @function packetReceipt + * @memberof ibc.core.channel.v1.Query + * @instance + * @param {ibc.core.channel.v1.IQueryPacketReceiptRequest} request QueryPacketReceiptRequest message or plain object + * @param {ibc.core.channel.v1.Query.PacketReceiptCallback} callback Node-style callback called with the error, if any, and QueryPacketReceiptResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.packetReceipt = function packetReceipt(request, callback) { + return this.rpcCall(packetReceipt, $root.ibc.core.channel.v1.QueryPacketReceiptRequest, $root.ibc.core.channel.v1.QueryPacketReceiptResponse, request, callback); + }, "name", { value: "PacketReceipt" }); + + /** + * Calls PacketReceipt. + * @function packetReceipt + * @memberof ibc.core.channel.v1.Query + * @instance + * @param {ibc.core.channel.v1.IQueryPacketReceiptRequest} request QueryPacketReceiptRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link ibc.core.channel.v1.Query#packetAcknowledgement}. + * @memberof ibc.core.channel.v1.Query + * @typedef PacketAcknowledgementCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {ibc.core.channel.v1.IQueryPacketAcknowledgementResponse} [response] QueryPacketAcknowledgementResponse + */ + + /** + * Calls PacketAcknowledgement. + * @function packetAcknowledgement + * @memberof ibc.core.channel.v1.Query + * @instance + * @param {ibc.core.channel.v1.IQueryPacketAcknowledgementRequest} request QueryPacketAcknowledgementRequest message or plain object + * @param {ibc.core.channel.v1.Query.PacketAcknowledgementCallback} callback Node-style callback called with the error, if any, and QueryPacketAcknowledgementResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.packetAcknowledgement = function packetAcknowledgement(request, callback) { + return this.rpcCall(packetAcknowledgement, $root.ibc.core.channel.v1.QueryPacketAcknowledgementRequest, $root.ibc.core.channel.v1.QueryPacketAcknowledgementResponse, request, callback); + }, "name", { value: "PacketAcknowledgement" }); + + /** + * Calls PacketAcknowledgement. + * @function packetAcknowledgement + * @memberof ibc.core.channel.v1.Query + * @instance + * @param {ibc.core.channel.v1.IQueryPacketAcknowledgementRequest} request QueryPacketAcknowledgementRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link ibc.core.channel.v1.Query#packetAcknowledgements}. + * @memberof ibc.core.channel.v1.Query + * @typedef PacketAcknowledgementsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {ibc.core.channel.v1.IQueryPacketAcknowledgementsResponse} [response] QueryPacketAcknowledgementsResponse + */ + + /** + * Calls PacketAcknowledgements. + * @function packetAcknowledgements + * @memberof ibc.core.channel.v1.Query + * @instance + * @param {ibc.core.channel.v1.IQueryPacketAcknowledgementsRequest} request QueryPacketAcknowledgementsRequest message or plain object + * @param {ibc.core.channel.v1.Query.PacketAcknowledgementsCallback} callback Node-style callback called with the error, if any, and QueryPacketAcknowledgementsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.packetAcknowledgements = function packetAcknowledgements(request, callback) { + return this.rpcCall(packetAcknowledgements, $root.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest, $root.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse, request, callback); + }, "name", { value: "PacketAcknowledgements" }); + + /** + * Calls PacketAcknowledgements. + * @function packetAcknowledgements + * @memberof ibc.core.channel.v1.Query + * @instance + * @param {ibc.core.channel.v1.IQueryPacketAcknowledgementsRequest} request QueryPacketAcknowledgementsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link ibc.core.channel.v1.Query#unreceivedPackets}. + * @memberof ibc.core.channel.v1.Query + * @typedef UnreceivedPacketsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {ibc.core.channel.v1.IQueryUnreceivedPacketsResponse} [response] QueryUnreceivedPacketsResponse + */ + + /** + * Calls UnreceivedPackets. + * @function unreceivedPackets + * @memberof ibc.core.channel.v1.Query + * @instance + * @param {ibc.core.channel.v1.IQueryUnreceivedPacketsRequest} request QueryUnreceivedPacketsRequest message or plain object + * @param {ibc.core.channel.v1.Query.UnreceivedPacketsCallback} callback Node-style callback called with the error, if any, and QueryUnreceivedPacketsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.unreceivedPackets = function unreceivedPackets(request, callback) { + return this.rpcCall(unreceivedPackets, $root.ibc.core.channel.v1.QueryUnreceivedPacketsRequest, $root.ibc.core.channel.v1.QueryUnreceivedPacketsResponse, request, callback); + }, "name", { value: "UnreceivedPackets" }); + + /** + * Calls UnreceivedPackets. + * @function unreceivedPackets + * @memberof ibc.core.channel.v1.Query + * @instance + * @param {ibc.core.channel.v1.IQueryUnreceivedPacketsRequest} request QueryUnreceivedPacketsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link ibc.core.channel.v1.Query#unreceivedAcks}. + * @memberof ibc.core.channel.v1.Query + * @typedef UnreceivedAcksCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {ibc.core.channel.v1.IQueryUnreceivedAcksResponse} [response] QueryUnreceivedAcksResponse + */ + + /** + * Calls UnreceivedAcks. + * @function unreceivedAcks + * @memberof ibc.core.channel.v1.Query + * @instance + * @param {ibc.core.channel.v1.IQueryUnreceivedAcksRequest} request QueryUnreceivedAcksRequest message or plain object + * @param {ibc.core.channel.v1.Query.UnreceivedAcksCallback} callback Node-style callback called with the error, if any, and QueryUnreceivedAcksResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.unreceivedAcks = function unreceivedAcks(request, callback) { + return this.rpcCall(unreceivedAcks, $root.ibc.core.channel.v1.QueryUnreceivedAcksRequest, $root.ibc.core.channel.v1.QueryUnreceivedAcksResponse, request, callback); + }, "name", { value: "UnreceivedAcks" }); + + /** + * Calls UnreceivedAcks. + * @function unreceivedAcks + * @memberof ibc.core.channel.v1.Query + * @instance + * @param {ibc.core.channel.v1.IQueryUnreceivedAcksRequest} request QueryUnreceivedAcksRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link ibc.core.channel.v1.Query#nextSequenceReceive}. + * @memberof ibc.core.channel.v1.Query + * @typedef NextSequenceReceiveCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {ibc.core.channel.v1.IQueryNextSequenceReceiveResponse} [response] QueryNextSequenceReceiveResponse + */ + + /** + * Calls NextSequenceReceive. + * @function nextSequenceReceive + * @memberof ibc.core.channel.v1.Query + * @instance + * @param {ibc.core.channel.v1.IQueryNextSequenceReceiveRequest} request QueryNextSequenceReceiveRequest message or plain object + * @param {ibc.core.channel.v1.Query.NextSequenceReceiveCallback} callback Node-style callback called with the error, if any, and QueryNextSequenceReceiveResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.nextSequenceReceive = function nextSequenceReceive(request, callback) { + return this.rpcCall(nextSequenceReceive, $root.ibc.core.channel.v1.QueryNextSequenceReceiveRequest, $root.ibc.core.channel.v1.QueryNextSequenceReceiveResponse, request, callback); + }, "name", { value: "NextSequenceReceive" }); + + /** + * Calls NextSequenceReceive. + * @function nextSequenceReceive + * @memberof ibc.core.channel.v1.Query + * @instance + * @param {ibc.core.channel.v1.IQueryNextSequenceReceiveRequest} request QueryNextSequenceReceiveRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Query; + })(v1.Query || {}); + + v1.QueryChannelRequest = (function(QueryChannelRequest) { + + /** + * Properties of a QueryChannelRequest. + * @memberof ibc.core.channel.v1 + * @interface IQueryChannelRequest + * @property {string|null} [portId] QueryChannelRequest portId + * @property {string|null} [channelId] QueryChannelRequest channelId + */ + + /** + * Constructs a new QueryChannelRequest. + * @memberof ibc.core.channel.v1 + * @classdesc Represents a QueryChannelRequest. + * @implements IQueryChannelRequest + * @constructor + * @param {ibc.core.channel.v1.IQueryChannelRequest=} [properties] Properties to set + */ + function QueryChannelRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryChannelRequest portId. + * @member {string} portId + * @memberof ibc.core.channel.v1.QueryChannelRequest + * @instance + */ + QueryChannelRequest.prototype.portId = ""; + + /** + * QueryChannelRequest channelId. + * @member {string} channelId + * @memberof ibc.core.channel.v1.QueryChannelRequest + * @instance + */ + QueryChannelRequest.prototype.channelId = ""; + + /** + * Creates a new QueryChannelRequest instance using the specified properties. + * @function create + * @memberof ibc.core.channel.v1.QueryChannelRequest + * @static + * @param {ibc.core.channel.v1.IQueryChannelRequest=} [properties] Properties to set + * @returns {ibc.core.channel.v1.QueryChannelRequest} QueryChannelRequest instance + */ + QueryChannelRequest.create = function create(properties) { + return new QueryChannelRequest(properties); + }; + + /** + * Encodes the specified QueryChannelRequest message. Does not implicitly {@link ibc.core.channel.v1.QueryChannelRequest.verify|verify} messages. + * @function encode + * @memberof ibc.core.channel.v1.QueryChannelRequest + * @static + * @param {ibc.core.channel.v1.IQueryChannelRequest} message QueryChannelRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryChannelRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.portId != null && Object.hasOwnProperty.call(message, "portId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.portId); + if (message.channelId != null && Object.hasOwnProperty.call(message, "channelId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.channelId); + return writer; + }; + + /** + * Encodes the specified QueryChannelRequest message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryChannelRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.channel.v1.QueryChannelRequest + * @static + * @param {ibc.core.channel.v1.IQueryChannelRequest} message QueryChannelRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryChannelRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryChannelRequest message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.channel.v1.QueryChannelRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.channel.v1.QueryChannelRequest} QueryChannelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryChannelRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.QueryChannelRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.portId = reader.string(); + break; + case 2: + message.channelId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryChannelRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.channel.v1.QueryChannelRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.channel.v1.QueryChannelRequest} QueryChannelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryChannelRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryChannelRequest message. + * @function verify + * @memberof ibc.core.channel.v1.QueryChannelRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryChannelRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.portId != null && message.hasOwnProperty("portId")) + if (!$util.isString(message.portId)) + return "portId: string expected"; + if (message.channelId != null && message.hasOwnProperty("channelId")) + if (!$util.isString(message.channelId)) + return "channelId: string expected"; + return null; + }; + + /** + * Creates a QueryChannelRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.channel.v1.QueryChannelRequest + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.channel.v1.QueryChannelRequest} QueryChannelRequest + */ + QueryChannelRequest.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.channel.v1.QueryChannelRequest) + return object; + let message = new $root.ibc.core.channel.v1.QueryChannelRequest(); + if (object.portId != null) + message.portId = String(object.portId); + if (object.channelId != null) + message.channelId = String(object.channelId); + return message; + }; + + /** + * Creates a plain object from a QueryChannelRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.channel.v1.QueryChannelRequest + * @static + * @param {ibc.core.channel.v1.QueryChannelRequest} message QueryChannelRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryChannelRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.portId = ""; + object.channelId = ""; + } + if (message.portId != null && message.hasOwnProperty("portId")) + object.portId = message.portId; + if (message.channelId != null && message.hasOwnProperty("channelId")) + object.channelId = message.channelId; + return object; + }; + + /** + * Converts this QueryChannelRequest to JSON. + * @function toJSON + * @memberof ibc.core.channel.v1.QueryChannelRequest + * @instance + * @returns {Object.} JSON object + */ + QueryChannelRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryChannelRequest; + })(v1.QueryChannelRequest || {}); + + v1.QueryChannelResponse = (function(QueryChannelResponse) { + + /** + * Properties of a QueryChannelResponse. + * @memberof ibc.core.channel.v1 + * @interface IQueryChannelResponse + * @property {ibc.core.channel.v1.IChannel|null} [channel] QueryChannelResponse channel + * @property {Uint8Array|null} [proof] QueryChannelResponse proof + * @property {ibc.core.client.v1.IHeight|null} [proofHeight] QueryChannelResponse proofHeight + */ + + /** + * Constructs a new QueryChannelResponse. + * @memberof ibc.core.channel.v1 + * @classdesc Represents a QueryChannelResponse. + * @implements IQueryChannelResponse + * @constructor + * @param {ibc.core.channel.v1.IQueryChannelResponse=} [properties] Properties to set + */ + function QueryChannelResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryChannelResponse channel. + * @member {ibc.core.channel.v1.IChannel|null|undefined} channel + * @memberof ibc.core.channel.v1.QueryChannelResponse + * @instance + */ + QueryChannelResponse.prototype.channel = null; + + /** + * QueryChannelResponse proof. + * @member {Uint8Array} proof + * @memberof ibc.core.channel.v1.QueryChannelResponse + * @instance + */ + QueryChannelResponse.prototype.proof = $util.newBuffer([]); + + /** + * QueryChannelResponse proofHeight. + * @member {ibc.core.client.v1.IHeight|null|undefined} proofHeight + * @memberof ibc.core.channel.v1.QueryChannelResponse + * @instance + */ + QueryChannelResponse.prototype.proofHeight = null; + + /** + * Creates a new QueryChannelResponse instance using the specified properties. + * @function create + * @memberof ibc.core.channel.v1.QueryChannelResponse + * @static + * @param {ibc.core.channel.v1.IQueryChannelResponse=} [properties] Properties to set + * @returns {ibc.core.channel.v1.QueryChannelResponse} QueryChannelResponse instance + */ + QueryChannelResponse.create = function create(properties) { + return new QueryChannelResponse(properties); + }; + + /** + * Encodes the specified QueryChannelResponse message. Does not implicitly {@link ibc.core.channel.v1.QueryChannelResponse.verify|verify} messages. + * @function encode + * @memberof ibc.core.channel.v1.QueryChannelResponse + * @static + * @param {ibc.core.channel.v1.IQueryChannelResponse} message QueryChannelResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryChannelResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.channel != null && Object.hasOwnProperty.call(message, "channel")) + $root.ibc.core.channel.v1.Channel.encode(message.channel, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.proof != null && Object.hasOwnProperty.call(message, "proof")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.proof); + if (message.proofHeight != null && Object.hasOwnProperty.call(message, "proofHeight")) + $root.ibc.core.client.v1.Height.encode(message.proofHeight, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryChannelResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryChannelResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.channel.v1.QueryChannelResponse + * @static + * @param {ibc.core.channel.v1.IQueryChannelResponse} message QueryChannelResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryChannelResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryChannelResponse message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.channel.v1.QueryChannelResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.channel.v1.QueryChannelResponse} QueryChannelResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryChannelResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.QueryChannelResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.channel = $root.ibc.core.channel.v1.Channel.decode(reader, reader.uint32()); + break; + case 2: + message.proof = reader.bytes(); + break; + case 3: + message.proofHeight = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryChannelResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.channel.v1.QueryChannelResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.channel.v1.QueryChannelResponse} QueryChannelResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryChannelResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryChannelResponse message. + * @function verify + * @memberof ibc.core.channel.v1.QueryChannelResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryChannelResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.channel != null && message.hasOwnProperty("channel")) { + let error = $root.ibc.core.channel.v1.Channel.verify(message.channel); + if (error) + return "channel." + error; + } + if (message.proof != null && message.hasOwnProperty("proof")) + if (!(message.proof && typeof message.proof.length === "number" || $util.isString(message.proof))) + return "proof: buffer expected"; + if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) { + let error = $root.ibc.core.client.v1.Height.verify(message.proofHeight); + if (error) + return "proofHeight." + error; + } + return null; + }; + + /** + * Creates a QueryChannelResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.channel.v1.QueryChannelResponse + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.channel.v1.QueryChannelResponse} QueryChannelResponse + */ + QueryChannelResponse.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.channel.v1.QueryChannelResponse) + return object; + let message = new $root.ibc.core.channel.v1.QueryChannelResponse(); + if (object.channel != null) { + if (typeof object.channel !== "object") + throw TypeError(".ibc.core.channel.v1.QueryChannelResponse.channel: object expected"); + message.channel = $root.ibc.core.channel.v1.Channel.fromObject(object.channel); + } + if (object.proof != null) + if (typeof object.proof === "string") + $util.base64.decode(object.proof, message.proof = $util.newBuffer($util.base64.length(object.proof)), 0); + else if (object.proof.length) + message.proof = object.proof; + if (object.proofHeight != null) { + if (typeof object.proofHeight !== "object") + throw TypeError(".ibc.core.channel.v1.QueryChannelResponse.proofHeight: object expected"); + message.proofHeight = $root.ibc.core.client.v1.Height.fromObject(object.proofHeight); + } + return message; + }; + + /** + * Creates a plain object from a QueryChannelResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.channel.v1.QueryChannelResponse + * @static + * @param {ibc.core.channel.v1.QueryChannelResponse} message QueryChannelResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryChannelResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.channel = null; + if (options.bytes === String) + object.proof = ""; + else { + object.proof = []; + if (options.bytes !== Array) + object.proof = $util.newBuffer(object.proof); + } + object.proofHeight = null; + } + if (message.channel != null && message.hasOwnProperty("channel")) + object.channel = $root.ibc.core.channel.v1.Channel.toObject(message.channel, options); + if (message.proof != null && message.hasOwnProperty("proof")) + object.proof = options.bytes === String ? $util.base64.encode(message.proof, 0, message.proof.length) : options.bytes === Array ? Array.prototype.slice.call(message.proof) : message.proof; + if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) + object.proofHeight = $root.ibc.core.client.v1.Height.toObject(message.proofHeight, options); + return object; + }; + + /** + * Converts this QueryChannelResponse to JSON. + * @function toJSON + * @memberof ibc.core.channel.v1.QueryChannelResponse + * @instance + * @returns {Object.} JSON object + */ + QueryChannelResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryChannelResponse; + })(v1.QueryChannelResponse || {}); + + v1.QueryChannelsRequest = (function(QueryChannelsRequest) { + + /** + * Properties of a QueryChannelsRequest. + * @memberof ibc.core.channel.v1 + * @interface IQueryChannelsRequest + * @property {cosmos.base.query.v1beta1.IPageRequest|null} [pagination] QueryChannelsRequest pagination + */ + + /** + * Constructs a new QueryChannelsRequest. + * @memberof ibc.core.channel.v1 + * @classdesc Represents a QueryChannelsRequest. + * @implements IQueryChannelsRequest + * @constructor + * @param {ibc.core.channel.v1.IQueryChannelsRequest=} [properties] Properties to set + */ + function QueryChannelsRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryChannelsRequest pagination. + * @member {cosmos.base.query.v1beta1.IPageRequest|null|undefined} pagination + * @memberof ibc.core.channel.v1.QueryChannelsRequest + * @instance + */ + QueryChannelsRequest.prototype.pagination = null; + + /** + * Creates a new QueryChannelsRequest instance using the specified properties. + * @function create + * @memberof ibc.core.channel.v1.QueryChannelsRequest + * @static + * @param {ibc.core.channel.v1.IQueryChannelsRequest=} [properties] Properties to set + * @returns {ibc.core.channel.v1.QueryChannelsRequest} QueryChannelsRequest instance + */ + QueryChannelsRequest.create = function create(properties) { + return new QueryChannelsRequest(properties); + }; + + /** + * Encodes the specified QueryChannelsRequest message. Does not implicitly {@link ibc.core.channel.v1.QueryChannelsRequest.verify|verify} messages. + * @function encode + * @memberof ibc.core.channel.v1.QueryChannelsRequest + * @static + * @param {ibc.core.channel.v1.IQueryChannelsRequest} message QueryChannelsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryChannelsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) + $root.cosmos.base.query.v1beta1.PageRequest.encode(message.pagination, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryChannelsRequest message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryChannelsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.channel.v1.QueryChannelsRequest + * @static + * @param {ibc.core.channel.v1.IQueryChannelsRequest} message QueryChannelsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryChannelsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryChannelsRequest message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.channel.v1.QueryChannelsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.channel.v1.QueryChannelsRequest} QueryChannelsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryChannelsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.QueryChannelsRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryChannelsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.channel.v1.QueryChannelsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.channel.v1.QueryChannelsRequest} QueryChannelsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryChannelsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryChannelsRequest message. + * @function verify + * @memberof ibc.core.channel.v1.QueryChannelsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryChannelsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.pagination != null && message.hasOwnProperty("pagination")) { + let error = $root.cosmos.base.query.v1beta1.PageRequest.verify(message.pagination); + if (error) + return "pagination." + error; + } + return null; + }; + + /** + * Creates a QueryChannelsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.channel.v1.QueryChannelsRequest + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.channel.v1.QueryChannelsRequest} QueryChannelsRequest + */ + QueryChannelsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.channel.v1.QueryChannelsRequest) + return object; + let message = new $root.ibc.core.channel.v1.QueryChannelsRequest(); + if (object.pagination != null) { + if (typeof object.pagination !== "object") + throw TypeError(".ibc.core.channel.v1.QueryChannelsRequest.pagination: object expected"); + message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.fromObject(object.pagination); + } + return message; + }; + + /** + * Creates a plain object from a QueryChannelsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.channel.v1.QueryChannelsRequest + * @static + * @param {ibc.core.channel.v1.QueryChannelsRequest} message QueryChannelsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryChannelsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.pagination = null; + if (message.pagination != null && message.hasOwnProperty("pagination")) + object.pagination = $root.cosmos.base.query.v1beta1.PageRequest.toObject(message.pagination, options); + return object; + }; + + /** + * Converts this QueryChannelsRequest to JSON. + * @function toJSON + * @memberof ibc.core.channel.v1.QueryChannelsRequest + * @instance + * @returns {Object.} JSON object + */ + QueryChannelsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryChannelsRequest; + })(v1.QueryChannelsRequest || {}); + + v1.QueryChannelsResponse = (function(QueryChannelsResponse) { + + /** + * Properties of a QueryChannelsResponse. + * @memberof ibc.core.channel.v1 + * @interface IQueryChannelsResponse + * @property {Array.|null} [channels] QueryChannelsResponse channels + * @property {cosmos.base.query.v1beta1.IPageResponse|null} [pagination] QueryChannelsResponse pagination + * @property {ibc.core.client.v1.IHeight|null} [height] QueryChannelsResponse height + */ + + /** + * Constructs a new QueryChannelsResponse. + * @memberof ibc.core.channel.v1 + * @classdesc Represents a QueryChannelsResponse. + * @implements IQueryChannelsResponse + * @constructor + * @param {ibc.core.channel.v1.IQueryChannelsResponse=} [properties] Properties to set + */ + function QueryChannelsResponse(properties) { + this.channels = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryChannelsResponse channels. + * @member {Array.} channels + * @memberof ibc.core.channel.v1.QueryChannelsResponse + * @instance + */ + QueryChannelsResponse.prototype.channels = $util.emptyArray; + + /** + * QueryChannelsResponse pagination. + * @member {cosmos.base.query.v1beta1.IPageResponse|null|undefined} pagination + * @memberof ibc.core.channel.v1.QueryChannelsResponse + * @instance + */ + QueryChannelsResponse.prototype.pagination = null; + + /** + * QueryChannelsResponse height. + * @member {ibc.core.client.v1.IHeight|null|undefined} height + * @memberof ibc.core.channel.v1.QueryChannelsResponse + * @instance + */ + QueryChannelsResponse.prototype.height = null; + + /** + * Creates a new QueryChannelsResponse instance using the specified properties. + * @function create + * @memberof ibc.core.channel.v1.QueryChannelsResponse + * @static + * @param {ibc.core.channel.v1.IQueryChannelsResponse=} [properties] Properties to set + * @returns {ibc.core.channel.v1.QueryChannelsResponse} QueryChannelsResponse instance + */ + QueryChannelsResponse.create = function create(properties) { + return new QueryChannelsResponse(properties); + }; + + /** + * Encodes the specified QueryChannelsResponse message. Does not implicitly {@link ibc.core.channel.v1.QueryChannelsResponse.verify|verify} messages. + * @function encode + * @memberof ibc.core.channel.v1.QueryChannelsResponse + * @static + * @param {ibc.core.channel.v1.IQueryChannelsResponse} message QueryChannelsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryChannelsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.channels != null && message.channels.length) + for (let i = 0; i < message.channels.length; ++i) + $root.ibc.core.channel.v1.IdentifiedChannel.encode(message.channels[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) + $root.cosmos.base.query.v1beta1.PageResponse.encode(message.pagination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.height != null && Object.hasOwnProperty.call(message, "height")) + $root.ibc.core.client.v1.Height.encode(message.height, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryChannelsResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryChannelsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.channel.v1.QueryChannelsResponse + * @static + * @param {ibc.core.channel.v1.IQueryChannelsResponse} message QueryChannelsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryChannelsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryChannelsResponse message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.channel.v1.QueryChannelsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.channel.v1.QueryChannelsResponse} QueryChannelsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryChannelsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.QueryChannelsResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.channels && message.channels.length)) + message.channels = []; + message.channels.push($root.ibc.core.channel.v1.IdentifiedChannel.decode(reader, reader.uint32())); + break; + case 2: + message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.decode(reader, reader.uint32()); + break; + case 3: + message.height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryChannelsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.channel.v1.QueryChannelsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.channel.v1.QueryChannelsResponse} QueryChannelsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryChannelsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryChannelsResponse message. + * @function verify + * @memberof ibc.core.channel.v1.QueryChannelsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryChannelsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.channels != null && message.hasOwnProperty("channels")) { + if (!Array.isArray(message.channels)) + return "channels: array expected"; + for (let i = 0; i < message.channels.length; ++i) { + let error = $root.ibc.core.channel.v1.IdentifiedChannel.verify(message.channels[i]); + if (error) + return "channels." + error; + } + } + if (message.pagination != null && message.hasOwnProperty("pagination")) { + let error = $root.cosmos.base.query.v1beta1.PageResponse.verify(message.pagination); + if (error) + return "pagination." + error; + } + if (message.height != null && message.hasOwnProperty("height")) { + let error = $root.ibc.core.client.v1.Height.verify(message.height); + if (error) + return "height." + error; + } + return null; + }; + + /** + * Creates a QueryChannelsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.channel.v1.QueryChannelsResponse + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.channel.v1.QueryChannelsResponse} QueryChannelsResponse + */ + QueryChannelsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.channel.v1.QueryChannelsResponse) + return object; + let message = new $root.ibc.core.channel.v1.QueryChannelsResponse(); + if (object.channels) { + if (!Array.isArray(object.channels)) + throw TypeError(".ibc.core.channel.v1.QueryChannelsResponse.channels: array expected"); + message.channels = []; + for (let i = 0; i < object.channels.length; ++i) { + if (typeof object.channels[i] !== "object") + throw TypeError(".ibc.core.channel.v1.QueryChannelsResponse.channels: object expected"); + message.channels[i] = $root.ibc.core.channel.v1.IdentifiedChannel.fromObject(object.channels[i]); + } + } + if (object.pagination != null) { + if (typeof object.pagination !== "object") + throw TypeError(".ibc.core.channel.v1.QueryChannelsResponse.pagination: object expected"); + message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.fromObject(object.pagination); + } + if (object.height != null) { + if (typeof object.height !== "object") + throw TypeError(".ibc.core.channel.v1.QueryChannelsResponse.height: object expected"); + message.height = $root.ibc.core.client.v1.Height.fromObject(object.height); + } + return message; + }; + + /** + * Creates a plain object from a QueryChannelsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.channel.v1.QueryChannelsResponse + * @static + * @param {ibc.core.channel.v1.QueryChannelsResponse} message QueryChannelsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryChannelsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.channels = []; + if (options.defaults) { + object.pagination = null; + object.height = null; + } + if (message.channels && message.channels.length) { + object.channels = []; + for (let j = 0; j < message.channels.length; ++j) + object.channels[j] = $root.ibc.core.channel.v1.IdentifiedChannel.toObject(message.channels[j], options); + } + if (message.pagination != null && message.hasOwnProperty("pagination")) + object.pagination = $root.cosmos.base.query.v1beta1.PageResponse.toObject(message.pagination, options); + if (message.height != null && message.hasOwnProperty("height")) + object.height = $root.ibc.core.client.v1.Height.toObject(message.height, options); + return object; + }; + + /** + * Converts this QueryChannelsResponse to JSON. + * @function toJSON + * @memberof ibc.core.channel.v1.QueryChannelsResponse + * @instance + * @returns {Object.} JSON object + */ + QueryChannelsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryChannelsResponse; + })(v1.QueryChannelsResponse || {}); + + v1.QueryConnectionChannelsRequest = (function(QueryConnectionChannelsRequest) { + + /** + * Properties of a QueryConnectionChannelsRequest. + * @memberof ibc.core.channel.v1 + * @interface IQueryConnectionChannelsRequest + * @property {string|null} [connection] QueryConnectionChannelsRequest connection + * @property {cosmos.base.query.v1beta1.IPageRequest|null} [pagination] QueryConnectionChannelsRequest pagination + */ + + /** + * Constructs a new QueryConnectionChannelsRequest. + * @memberof ibc.core.channel.v1 + * @classdesc Represents a QueryConnectionChannelsRequest. + * @implements IQueryConnectionChannelsRequest + * @constructor + * @param {ibc.core.channel.v1.IQueryConnectionChannelsRequest=} [properties] Properties to set + */ + function QueryConnectionChannelsRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryConnectionChannelsRequest connection. + * @member {string} connection + * @memberof ibc.core.channel.v1.QueryConnectionChannelsRequest + * @instance + */ + QueryConnectionChannelsRequest.prototype.connection = ""; + + /** + * QueryConnectionChannelsRequest pagination. + * @member {cosmos.base.query.v1beta1.IPageRequest|null|undefined} pagination + * @memberof ibc.core.channel.v1.QueryConnectionChannelsRequest + * @instance + */ + QueryConnectionChannelsRequest.prototype.pagination = null; + + /** + * Creates a new QueryConnectionChannelsRequest instance using the specified properties. + * @function create + * @memberof ibc.core.channel.v1.QueryConnectionChannelsRequest + * @static + * @param {ibc.core.channel.v1.IQueryConnectionChannelsRequest=} [properties] Properties to set + * @returns {ibc.core.channel.v1.QueryConnectionChannelsRequest} QueryConnectionChannelsRequest instance + */ + QueryConnectionChannelsRequest.create = function create(properties) { + return new QueryConnectionChannelsRequest(properties); + }; + + /** + * Encodes the specified QueryConnectionChannelsRequest message. Does not implicitly {@link ibc.core.channel.v1.QueryConnectionChannelsRequest.verify|verify} messages. + * @function encode + * @memberof ibc.core.channel.v1.QueryConnectionChannelsRequest + * @static + * @param {ibc.core.channel.v1.IQueryConnectionChannelsRequest} message QueryConnectionChannelsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryConnectionChannelsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.connection != null && Object.hasOwnProperty.call(message, "connection")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.connection); + if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) + $root.cosmos.base.query.v1beta1.PageRequest.encode(message.pagination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryConnectionChannelsRequest message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryConnectionChannelsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.channel.v1.QueryConnectionChannelsRequest + * @static + * @param {ibc.core.channel.v1.IQueryConnectionChannelsRequest} message QueryConnectionChannelsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryConnectionChannelsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryConnectionChannelsRequest message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.channel.v1.QueryConnectionChannelsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.channel.v1.QueryConnectionChannelsRequest} QueryConnectionChannelsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryConnectionChannelsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.QueryConnectionChannelsRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.connection = reader.string(); + break; + case 2: + message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryConnectionChannelsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.channel.v1.QueryConnectionChannelsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.channel.v1.QueryConnectionChannelsRequest} QueryConnectionChannelsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryConnectionChannelsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryConnectionChannelsRequest message. + * @function verify + * @memberof ibc.core.channel.v1.QueryConnectionChannelsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryConnectionChannelsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.connection != null && message.hasOwnProperty("connection")) + if (!$util.isString(message.connection)) + return "connection: string expected"; + if (message.pagination != null && message.hasOwnProperty("pagination")) { + let error = $root.cosmos.base.query.v1beta1.PageRequest.verify(message.pagination); + if (error) + return "pagination." + error; + } + return null; + }; + + /** + * Creates a QueryConnectionChannelsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.channel.v1.QueryConnectionChannelsRequest + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.channel.v1.QueryConnectionChannelsRequest} QueryConnectionChannelsRequest + */ + QueryConnectionChannelsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.channel.v1.QueryConnectionChannelsRequest) + return object; + let message = new $root.ibc.core.channel.v1.QueryConnectionChannelsRequest(); + if (object.connection != null) + message.connection = String(object.connection); + if (object.pagination != null) { + if (typeof object.pagination !== "object") + throw TypeError(".ibc.core.channel.v1.QueryConnectionChannelsRequest.pagination: object expected"); + message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.fromObject(object.pagination); + } + return message; + }; + + /** + * Creates a plain object from a QueryConnectionChannelsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.channel.v1.QueryConnectionChannelsRequest + * @static + * @param {ibc.core.channel.v1.QueryConnectionChannelsRequest} message QueryConnectionChannelsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryConnectionChannelsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.connection = ""; + object.pagination = null; + } + if (message.connection != null && message.hasOwnProperty("connection")) + object.connection = message.connection; + if (message.pagination != null && message.hasOwnProperty("pagination")) + object.pagination = $root.cosmos.base.query.v1beta1.PageRequest.toObject(message.pagination, options); + return object; + }; + + /** + * Converts this QueryConnectionChannelsRequest to JSON. + * @function toJSON + * @memberof ibc.core.channel.v1.QueryConnectionChannelsRequest + * @instance + * @returns {Object.} JSON object + */ + QueryConnectionChannelsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryConnectionChannelsRequest; + })(v1.QueryConnectionChannelsRequest || {}); + + v1.QueryConnectionChannelsResponse = (function(QueryConnectionChannelsResponse) { + + /** + * Properties of a QueryConnectionChannelsResponse. + * @memberof ibc.core.channel.v1 + * @interface IQueryConnectionChannelsResponse + * @property {Array.|null} [channels] QueryConnectionChannelsResponse channels + * @property {cosmos.base.query.v1beta1.IPageResponse|null} [pagination] QueryConnectionChannelsResponse pagination + * @property {ibc.core.client.v1.IHeight|null} [height] QueryConnectionChannelsResponse height + */ + + /** + * Constructs a new QueryConnectionChannelsResponse. + * @memberof ibc.core.channel.v1 + * @classdesc Represents a QueryConnectionChannelsResponse. + * @implements IQueryConnectionChannelsResponse + * @constructor + * @param {ibc.core.channel.v1.IQueryConnectionChannelsResponse=} [properties] Properties to set + */ + function QueryConnectionChannelsResponse(properties) { + this.channels = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryConnectionChannelsResponse channels. + * @member {Array.} channels + * @memberof ibc.core.channel.v1.QueryConnectionChannelsResponse + * @instance + */ + QueryConnectionChannelsResponse.prototype.channels = $util.emptyArray; + + /** + * QueryConnectionChannelsResponse pagination. + * @member {cosmos.base.query.v1beta1.IPageResponse|null|undefined} pagination + * @memberof ibc.core.channel.v1.QueryConnectionChannelsResponse + * @instance + */ + QueryConnectionChannelsResponse.prototype.pagination = null; + + /** + * QueryConnectionChannelsResponse height. + * @member {ibc.core.client.v1.IHeight|null|undefined} height + * @memberof ibc.core.channel.v1.QueryConnectionChannelsResponse + * @instance + */ + QueryConnectionChannelsResponse.prototype.height = null; + + /** + * Creates a new QueryConnectionChannelsResponse instance using the specified properties. + * @function create + * @memberof ibc.core.channel.v1.QueryConnectionChannelsResponse + * @static + * @param {ibc.core.channel.v1.IQueryConnectionChannelsResponse=} [properties] Properties to set + * @returns {ibc.core.channel.v1.QueryConnectionChannelsResponse} QueryConnectionChannelsResponse instance + */ + QueryConnectionChannelsResponse.create = function create(properties) { + return new QueryConnectionChannelsResponse(properties); + }; + + /** + * Encodes the specified QueryConnectionChannelsResponse message. Does not implicitly {@link ibc.core.channel.v1.QueryConnectionChannelsResponse.verify|verify} messages. + * @function encode + * @memberof ibc.core.channel.v1.QueryConnectionChannelsResponse + * @static + * @param {ibc.core.channel.v1.IQueryConnectionChannelsResponse} message QueryConnectionChannelsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryConnectionChannelsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.channels != null && message.channels.length) + for (let i = 0; i < message.channels.length; ++i) + $root.ibc.core.channel.v1.IdentifiedChannel.encode(message.channels[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) + $root.cosmos.base.query.v1beta1.PageResponse.encode(message.pagination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.height != null && Object.hasOwnProperty.call(message, "height")) + $root.ibc.core.client.v1.Height.encode(message.height, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryConnectionChannelsResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryConnectionChannelsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.channel.v1.QueryConnectionChannelsResponse + * @static + * @param {ibc.core.channel.v1.IQueryConnectionChannelsResponse} message QueryConnectionChannelsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryConnectionChannelsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryConnectionChannelsResponse message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.channel.v1.QueryConnectionChannelsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.channel.v1.QueryConnectionChannelsResponse} QueryConnectionChannelsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryConnectionChannelsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.QueryConnectionChannelsResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.channels && message.channels.length)) + message.channels = []; + message.channels.push($root.ibc.core.channel.v1.IdentifiedChannel.decode(reader, reader.uint32())); + break; + case 2: + message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.decode(reader, reader.uint32()); + break; + case 3: + message.height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryConnectionChannelsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.channel.v1.QueryConnectionChannelsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.channel.v1.QueryConnectionChannelsResponse} QueryConnectionChannelsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryConnectionChannelsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryConnectionChannelsResponse message. + * @function verify + * @memberof ibc.core.channel.v1.QueryConnectionChannelsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryConnectionChannelsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.channels != null && message.hasOwnProperty("channels")) { + if (!Array.isArray(message.channels)) + return "channels: array expected"; + for (let i = 0; i < message.channels.length; ++i) { + let error = $root.ibc.core.channel.v1.IdentifiedChannel.verify(message.channels[i]); + if (error) + return "channels." + error; + } + } + if (message.pagination != null && message.hasOwnProperty("pagination")) { + let error = $root.cosmos.base.query.v1beta1.PageResponse.verify(message.pagination); + if (error) + return "pagination." + error; + } + if (message.height != null && message.hasOwnProperty("height")) { + let error = $root.ibc.core.client.v1.Height.verify(message.height); + if (error) + return "height." + error; + } + return null; + }; + + /** + * Creates a QueryConnectionChannelsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.channel.v1.QueryConnectionChannelsResponse + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.channel.v1.QueryConnectionChannelsResponse} QueryConnectionChannelsResponse + */ + QueryConnectionChannelsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.channel.v1.QueryConnectionChannelsResponse) + return object; + let message = new $root.ibc.core.channel.v1.QueryConnectionChannelsResponse(); + if (object.channels) { + if (!Array.isArray(object.channels)) + throw TypeError(".ibc.core.channel.v1.QueryConnectionChannelsResponse.channels: array expected"); + message.channels = []; + for (let i = 0; i < object.channels.length; ++i) { + if (typeof object.channels[i] !== "object") + throw TypeError(".ibc.core.channel.v1.QueryConnectionChannelsResponse.channels: object expected"); + message.channels[i] = $root.ibc.core.channel.v1.IdentifiedChannel.fromObject(object.channels[i]); + } + } + if (object.pagination != null) { + if (typeof object.pagination !== "object") + throw TypeError(".ibc.core.channel.v1.QueryConnectionChannelsResponse.pagination: object expected"); + message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.fromObject(object.pagination); + } + if (object.height != null) { + if (typeof object.height !== "object") + throw TypeError(".ibc.core.channel.v1.QueryConnectionChannelsResponse.height: object expected"); + message.height = $root.ibc.core.client.v1.Height.fromObject(object.height); + } + return message; + }; + + /** + * Creates a plain object from a QueryConnectionChannelsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.channel.v1.QueryConnectionChannelsResponse + * @static + * @param {ibc.core.channel.v1.QueryConnectionChannelsResponse} message QueryConnectionChannelsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryConnectionChannelsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.channels = []; + if (options.defaults) { + object.pagination = null; + object.height = null; + } + if (message.channels && message.channels.length) { + object.channels = []; + for (let j = 0; j < message.channels.length; ++j) + object.channels[j] = $root.ibc.core.channel.v1.IdentifiedChannel.toObject(message.channels[j], options); + } + if (message.pagination != null && message.hasOwnProperty("pagination")) + object.pagination = $root.cosmos.base.query.v1beta1.PageResponse.toObject(message.pagination, options); + if (message.height != null && message.hasOwnProperty("height")) + object.height = $root.ibc.core.client.v1.Height.toObject(message.height, options); + return object; + }; + + /** + * Converts this QueryConnectionChannelsResponse to JSON. + * @function toJSON + * @memberof ibc.core.channel.v1.QueryConnectionChannelsResponse + * @instance + * @returns {Object.} JSON object + */ + QueryConnectionChannelsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryConnectionChannelsResponse; + })(v1.QueryConnectionChannelsResponse || {}); + + v1.QueryChannelClientStateRequest = (function(QueryChannelClientStateRequest) { + + /** + * Properties of a QueryChannelClientStateRequest. + * @memberof ibc.core.channel.v1 + * @interface IQueryChannelClientStateRequest + * @property {string|null} [portId] QueryChannelClientStateRequest portId + * @property {string|null} [channelId] QueryChannelClientStateRequest channelId + */ + + /** + * Constructs a new QueryChannelClientStateRequest. + * @memberof ibc.core.channel.v1 + * @classdesc Represents a QueryChannelClientStateRequest. + * @implements IQueryChannelClientStateRequest + * @constructor + * @param {ibc.core.channel.v1.IQueryChannelClientStateRequest=} [properties] Properties to set + */ + function QueryChannelClientStateRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryChannelClientStateRequest portId. + * @member {string} portId + * @memberof ibc.core.channel.v1.QueryChannelClientStateRequest + * @instance + */ + QueryChannelClientStateRequest.prototype.portId = ""; + + /** + * QueryChannelClientStateRequest channelId. + * @member {string} channelId + * @memberof ibc.core.channel.v1.QueryChannelClientStateRequest + * @instance + */ + QueryChannelClientStateRequest.prototype.channelId = ""; + + /** + * Creates a new QueryChannelClientStateRequest instance using the specified properties. + * @function create + * @memberof ibc.core.channel.v1.QueryChannelClientStateRequest + * @static + * @param {ibc.core.channel.v1.IQueryChannelClientStateRequest=} [properties] Properties to set + * @returns {ibc.core.channel.v1.QueryChannelClientStateRequest} QueryChannelClientStateRequest instance + */ + QueryChannelClientStateRequest.create = function create(properties) { + return new QueryChannelClientStateRequest(properties); + }; + + /** + * Encodes the specified QueryChannelClientStateRequest message. Does not implicitly {@link ibc.core.channel.v1.QueryChannelClientStateRequest.verify|verify} messages. + * @function encode + * @memberof ibc.core.channel.v1.QueryChannelClientStateRequest + * @static + * @param {ibc.core.channel.v1.IQueryChannelClientStateRequest} message QueryChannelClientStateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryChannelClientStateRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.portId != null && Object.hasOwnProperty.call(message, "portId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.portId); + if (message.channelId != null && Object.hasOwnProperty.call(message, "channelId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.channelId); + return writer; + }; + + /** + * Encodes the specified QueryChannelClientStateRequest message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryChannelClientStateRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.channel.v1.QueryChannelClientStateRequest + * @static + * @param {ibc.core.channel.v1.IQueryChannelClientStateRequest} message QueryChannelClientStateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryChannelClientStateRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryChannelClientStateRequest message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.channel.v1.QueryChannelClientStateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.channel.v1.QueryChannelClientStateRequest} QueryChannelClientStateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryChannelClientStateRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.QueryChannelClientStateRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.portId = reader.string(); + break; + case 2: + message.channelId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryChannelClientStateRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.channel.v1.QueryChannelClientStateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.channel.v1.QueryChannelClientStateRequest} QueryChannelClientStateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryChannelClientStateRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryChannelClientStateRequest message. + * @function verify + * @memberof ibc.core.channel.v1.QueryChannelClientStateRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryChannelClientStateRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.portId != null && message.hasOwnProperty("portId")) + if (!$util.isString(message.portId)) + return "portId: string expected"; + if (message.channelId != null && message.hasOwnProperty("channelId")) + if (!$util.isString(message.channelId)) + return "channelId: string expected"; + return null; + }; + + /** + * Creates a QueryChannelClientStateRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.channel.v1.QueryChannelClientStateRequest + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.channel.v1.QueryChannelClientStateRequest} QueryChannelClientStateRequest + */ + QueryChannelClientStateRequest.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.channel.v1.QueryChannelClientStateRequest) + return object; + let message = new $root.ibc.core.channel.v1.QueryChannelClientStateRequest(); + if (object.portId != null) + message.portId = String(object.portId); + if (object.channelId != null) + message.channelId = String(object.channelId); + return message; + }; + + /** + * Creates a plain object from a QueryChannelClientStateRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.channel.v1.QueryChannelClientStateRequest + * @static + * @param {ibc.core.channel.v1.QueryChannelClientStateRequest} message QueryChannelClientStateRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryChannelClientStateRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.portId = ""; + object.channelId = ""; + } + if (message.portId != null && message.hasOwnProperty("portId")) + object.portId = message.portId; + if (message.channelId != null && message.hasOwnProperty("channelId")) + object.channelId = message.channelId; + return object; + }; + + /** + * Converts this QueryChannelClientStateRequest to JSON. + * @function toJSON + * @memberof ibc.core.channel.v1.QueryChannelClientStateRequest + * @instance + * @returns {Object.} JSON object + */ + QueryChannelClientStateRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryChannelClientStateRequest; + })(v1.QueryChannelClientStateRequest || {}); + + v1.QueryChannelClientStateResponse = (function(QueryChannelClientStateResponse) { + + /** + * Properties of a QueryChannelClientStateResponse. + * @memberof ibc.core.channel.v1 + * @interface IQueryChannelClientStateResponse + * @property {ibc.core.client.v1.IIdentifiedClientState|null} [identifiedClientState] QueryChannelClientStateResponse identifiedClientState + * @property {Uint8Array|null} [proof] QueryChannelClientStateResponse proof + * @property {ibc.core.client.v1.IHeight|null} [proofHeight] QueryChannelClientStateResponse proofHeight + */ + + /** + * Constructs a new QueryChannelClientStateResponse. + * @memberof ibc.core.channel.v1 + * @classdesc Represents a QueryChannelClientStateResponse. + * @implements IQueryChannelClientStateResponse + * @constructor + * @param {ibc.core.channel.v1.IQueryChannelClientStateResponse=} [properties] Properties to set + */ + function QueryChannelClientStateResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryChannelClientStateResponse identifiedClientState. + * @member {ibc.core.client.v1.IIdentifiedClientState|null|undefined} identifiedClientState + * @memberof ibc.core.channel.v1.QueryChannelClientStateResponse + * @instance + */ + QueryChannelClientStateResponse.prototype.identifiedClientState = null; + + /** + * QueryChannelClientStateResponse proof. + * @member {Uint8Array} proof + * @memberof ibc.core.channel.v1.QueryChannelClientStateResponse + * @instance + */ + QueryChannelClientStateResponse.prototype.proof = $util.newBuffer([]); + + /** + * QueryChannelClientStateResponse proofHeight. + * @member {ibc.core.client.v1.IHeight|null|undefined} proofHeight + * @memberof ibc.core.channel.v1.QueryChannelClientStateResponse + * @instance + */ + QueryChannelClientStateResponse.prototype.proofHeight = null; + + /** + * Creates a new QueryChannelClientStateResponse instance using the specified properties. + * @function create + * @memberof ibc.core.channel.v1.QueryChannelClientStateResponse + * @static + * @param {ibc.core.channel.v1.IQueryChannelClientStateResponse=} [properties] Properties to set + * @returns {ibc.core.channel.v1.QueryChannelClientStateResponse} QueryChannelClientStateResponse instance + */ + QueryChannelClientStateResponse.create = function create(properties) { + return new QueryChannelClientStateResponse(properties); + }; + + /** + * Encodes the specified QueryChannelClientStateResponse message. Does not implicitly {@link ibc.core.channel.v1.QueryChannelClientStateResponse.verify|verify} messages. + * @function encode + * @memberof ibc.core.channel.v1.QueryChannelClientStateResponse + * @static + * @param {ibc.core.channel.v1.IQueryChannelClientStateResponse} message QueryChannelClientStateResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryChannelClientStateResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.identifiedClientState != null && Object.hasOwnProperty.call(message, "identifiedClientState")) + $root.ibc.core.client.v1.IdentifiedClientState.encode(message.identifiedClientState, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.proof != null && Object.hasOwnProperty.call(message, "proof")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.proof); + if (message.proofHeight != null && Object.hasOwnProperty.call(message, "proofHeight")) + $root.ibc.core.client.v1.Height.encode(message.proofHeight, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryChannelClientStateResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryChannelClientStateResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.channel.v1.QueryChannelClientStateResponse + * @static + * @param {ibc.core.channel.v1.IQueryChannelClientStateResponse} message QueryChannelClientStateResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryChannelClientStateResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryChannelClientStateResponse message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.channel.v1.QueryChannelClientStateResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.channel.v1.QueryChannelClientStateResponse} QueryChannelClientStateResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryChannelClientStateResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.QueryChannelClientStateResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.identifiedClientState = $root.ibc.core.client.v1.IdentifiedClientState.decode(reader, reader.uint32()); + break; + case 2: + message.proof = reader.bytes(); + break; + case 3: + message.proofHeight = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryChannelClientStateResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.channel.v1.QueryChannelClientStateResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.channel.v1.QueryChannelClientStateResponse} QueryChannelClientStateResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryChannelClientStateResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryChannelClientStateResponse message. + * @function verify + * @memberof ibc.core.channel.v1.QueryChannelClientStateResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryChannelClientStateResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.identifiedClientState != null && message.hasOwnProperty("identifiedClientState")) { + let error = $root.ibc.core.client.v1.IdentifiedClientState.verify(message.identifiedClientState); + if (error) + return "identifiedClientState." + error; + } + if (message.proof != null && message.hasOwnProperty("proof")) + if (!(message.proof && typeof message.proof.length === "number" || $util.isString(message.proof))) + return "proof: buffer expected"; + if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) { + let error = $root.ibc.core.client.v1.Height.verify(message.proofHeight); + if (error) + return "proofHeight." + error; + } + return null; + }; + + /** + * Creates a QueryChannelClientStateResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.channel.v1.QueryChannelClientStateResponse + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.channel.v1.QueryChannelClientStateResponse} QueryChannelClientStateResponse + */ + QueryChannelClientStateResponse.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.channel.v1.QueryChannelClientStateResponse) + return object; + let message = new $root.ibc.core.channel.v1.QueryChannelClientStateResponse(); + if (object.identifiedClientState != null) { + if (typeof object.identifiedClientState !== "object") + throw TypeError(".ibc.core.channel.v1.QueryChannelClientStateResponse.identifiedClientState: object expected"); + message.identifiedClientState = $root.ibc.core.client.v1.IdentifiedClientState.fromObject(object.identifiedClientState); + } + if (object.proof != null) + if (typeof object.proof === "string") + $util.base64.decode(object.proof, message.proof = $util.newBuffer($util.base64.length(object.proof)), 0); + else if (object.proof.length) + message.proof = object.proof; + if (object.proofHeight != null) { + if (typeof object.proofHeight !== "object") + throw TypeError(".ibc.core.channel.v1.QueryChannelClientStateResponse.proofHeight: object expected"); + message.proofHeight = $root.ibc.core.client.v1.Height.fromObject(object.proofHeight); + } + return message; + }; + + /** + * Creates a plain object from a QueryChannelClientStateResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.channel.v1.QueryChannelClientStateResponse + * @static + * @param {ibc.core.channel.v1.QueryChannelClientStateResponse} message QueryChannelClientStateResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryChannelClientStateResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.identifiedClientState = null; + if (options.bytes === String) + object.proof = ""; + else { + object.proof = []; + if (options.bytes !== Array) + object.proof = $util.newBuffer(object.proof); + } + object.proofHeight = null; + } + if (message.identifiedClientState != null && message.hasOwnProperty("identifiedClientState")) + object.identifiedClientState = $root.ibc.core.client.v1.IdentifiedClientState.toObject(message.identifiedClientState, options); + if (message.proof != null && message.hasOwnProperty("proof")) + object.proof = options.bytes === String ? $util.base64.encode(message.proof, 0, message.proof.length) : options.bytes === Array ? Array.prototype.slice.call(message.proof) : message.proof; + if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) + object.proofHeight = $root.ibc.core.client.v1.Height.toObject(message.proofHeight, options); + return object; + }; + + /** + * Converts this QueryChannelClientStateResponse to JSON. + * @function toJSON + * @memberof ibc.core.channel.v1.QueryChannelClientStateResponse + * @instance + * @returns {Object.} JSON object + */ + QueryChannelClientStateResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryChannelClientStateResponse; + })(v1.QueryChannelClientStateResponse || {}); + + v1.QueryChannelConsensusStateRequest = (function(QueryChannelConsensusStateRequest) { + + /** + * Properties of a QueryChannelConsensusStateRequest. + * @memberof ibc.core.channel.v1 + * @interface IQueryChannelConsensusStateRequest + * @property {string|null} [portId] QueryChannelConsensusStateRequest portId + * @property {string|null} [channelId] QueryChannelConsensusStateRequest channelId + * @property {number|Long|null} [revisionNumber] QueryChannelConsensusStateRequest revisionNumber + * @property {number|Long|null} [revisionHeight] QueryChannelConsensusStateRequest revisionHeight + */ + + /** + * Constructs a new QueryChannelConsensusStateRequest. + * @memberof ibc.core.channel.v1 + * @classdesc Represents a QueryChannelConsensusStateRequest. + * @implements IQueryChannelConsensusStateRequest + * @constructor + * @param {ibc.core.channel.v1.IQueryChannelConsensusStateRequest=} [properties] Properties to set + */ + function QueryChannelConsensusStateRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryChannelConsensusStateRequest portId. + * @member {string} portId + * @memberof ibc.core.channel.v1.QueryChannelConsensusStateRequest + * @instance + */ + QueryChannelConsensusStateRequest.prototype.portId = ""; + + /** + * QueryChannelConsensusStateRequest channelId. + * @member {string} channelId + * @memberof ibc.core.channel.v1.QueryChannelConsensusStateRequest + * @instance + */ + QueryChannelConsensusStateRequest.prototype.channelId = ""; + + /** + * QueryChannelConsensusStateRequest revisionNumber. + * @member {number|Long} revisionNumber + * @memberof ibc.core.channel.v1.QueryChannelConsensusStateRequest + * @instance + */ + QueryChannelConsensusStateRequest.prototype.revisionNumber = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * QueryChannelConsensusStateRequest revisionHeight. + * @member {number|Long} revisionHeight + * @memberof ibc.core.channel.v1.QueryChannelConsensusStateRequest + * @instance + */ + QueryChannelConsensusStateRequest.prototype.revisionHeight = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new QueryChannelConsensusStateRequest instance using the specified properties. + * @function create + * @memberof ibc.core.channel.v1.QueryChannelConsensusStateRequest + * @static + * @param {ibc.core.channel.v1.IQueryChannelConsensusStateRequest=} [properties] Properties to set + * @returns {ibc.core.channel.v1.QueryChannelConsensusStateRequest} QueryChannelConsensusStateRequest instance + */ + QueryChannelConsensusStateRequest.create = function create(properties) { + return new QueryChannelConsensusStateRequest(properties); + }; + + /** + * Encodes the specified QueryChannelConsensusStateRequest message. Does not implicitly {@link ibc.core.channel.v1.QueryChannelConsensusStateRequest.verify|verify} messages. + * @function encode + * @memberof ibc.core.channel.v1.QueryChannelConsensusStateRequest + * @static + * @param {ibc.core.channel.v1.IQueryChannelConsensusStateRequest} message QueryChannelConsensusStateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryChannelConsensusStateRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.portId != null && Object.hasOwnProperty.call(message, "portId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.portId); + if (message.channelId != null && Object.hasOwnProperty.call(message, "channelId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.channelId); + if (message.revisionNumber != null && Object.hasOwnProperty.call(message, "revisionNumber")) + writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.revisionNumber); + if (message.revisionHeight != null && Object.hasOwnProperty.call(message, "revisionHeight")) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.revisionHeight); + return writer; + }; + + /** + * Encodes the specified QueryChannelConsensusStateRequest message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryChannelConsensusStateRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.channel.v1.QueryChannelConsensusStateRequest + * @static + * @param {ibc.core.channel.v1.IQueryChannelConsensusStateRequest} message QueryChannelConsensusStateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryChannelConsensusStateRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryChannelConsensusStateRequest message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.channel.v1.QueryChannelConsensusStateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.channel.v1.QueryChannelConsensusStateRequest} QueryChannelConsensusStateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryChannelConsensusStateRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.QueryChannelConsensusStateRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.portId = reader.string(); + break; + case 2: + message.channelId = reader.string(); + break; + case 3: + message.revisionNumber = reader.uint64(); + break; + case 4: + message.revisionHeight = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryChannelConsensusStateRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.channel.v1.QueryChannelConsensusStateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.channel.v1.QueryChannelConsensusStateRequest} QueryChannelConsensusStateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryChannelConsensusStateRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryChannelConsensusStateRequest message. + * @function verify + * @memberof ibc.core.channel.v1.QueryChannelConsensusStateRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryChannelConsensusStateRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.portId != null && message.hasOwnProperty("portId")) + if (!$util.isString(message.portId)) + return "portId: string expected"; + if (message.channelId != null && message.hasOwnProperty("channelId")) + if (!$util.isString(message.channelId)) + return "channelId: string expected"; + if (message.revisionNumber != null && message.hasOwnProperty("revisionNumber")) + if (!$util.isInteger(message.revisionNumber) && !(message.revisionNumber && $util.isInteger(message.revisionNumber.low) && $util.isInteger(message.revisionNumber.high))) + return "revisionNumber: integer|Long expected"; + if (message.revisionHeight != null && message.hasOwnProperty("revisionHeight")) + if (!$util.isInteger(message.revisionHeight) && !(message.revisionHeight && $util.isInteger(message.revisionHeight.low) && $util.isInteger(message.revisionHeight.high))) + return "revisionHeight: integer|Long expected"; + return null; + }; + + /** + * Creates a QueryChannelConsensusStateRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.channel.v1.QueryChannelConsensusStateRequest + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.channel.v1.QueryChannelConsensusStateRequest} QueryChannelConsensusStateRequest + */ + QueryChannelConsensusStateRequest.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.channel.v1.QueryChannelConsensusStateRequest) + return object; + let message = new $root.ibc.core.channel.v1.QueryChannelConsensusStateRequest(); + if (object.portId != null) + message.portId = String(object.portId); + if (object.channelId != null) + message.channelId = String(object.channelId); + if (object.revisionNumber != null) + if ($util.Long) + (message.revisionNumber = $util.Long.fromValue(object.revisionNumber)).unsigned = true; + else if (typeof object.revisionNumber === "string") + message.revisionNumber = parseInt(object.revisionNumber, 10); + else if (typeof object.revisionNumber === "number") + message.revisionNumber = object.revisionNumber; + else if (typeof object.revisionNumber === "object") + message.revisionNumber = new $util.LongBits(object.revisionNumber.low >>> 0, object.revisionNumber.high >>> 0).toNumber(true); + if (object.revisionHeight != null) + if ($util.Long) + (message.revisionHeight = $util.Long.fromValue(object.revisionHeight)).unsigned = true; + else if (typeof object.revisionHeight === "string") + message.revisionHeight = parseInt(object.revisionHeight, 10); + else if (typeof object.revisionHeight === "number") + message.revisionHeight = object.revisionHeight; + else if (typeof object.revisionHeight === "object") + message.revisionHeight = new $util.LongBits(object.revisionHeight.low >>> 0, object.revisionHeight.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a QueryChannelConsensusStateRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.channel.v1.QueryChannelConsensusStateRequest + * @static + * @param {ibc.core.channel.v1.QueryChannelConsensusStateRequest} message QueryChannelConsensusStateRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryChannelConsensusStateRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.portId = ""; + object.channelId = ""; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.revisionNumber = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.revisionNumber = options.longs === String ? "0" : 0; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.revisionHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.revisionHeight = options.longs === String ? "0" : 0; + } + if (message.portId != null && message.hasOwnProperty("portId")) + object.portId = message.portId; + if (message.channelId != null && message.hasOwnProperty("channelId")) + object.channelId = message.channelId; + if (message.revisionNumber != null && message.hasOwnProperty("revisionNumber")) + if (typeof message.revisionNumber === "number") + object.revisionNumber = options.longs === String ? String(message.revisionNumber) : message.revisionNumber; + else + object.revisionNumber = options.longs === String ? $util.Long.prototype.toString.call(message.revisionNumber) : options.longs === Number ? new $util.LongBits(message.revisionNumber.low >>> 0, message.revisionNumber.high >>> 0).toNumber(true) : message.revisionNumber; + if (message.revisionHeight != null && message.hasOwnProperty("revisionHeight")) + if (typeof message.revisionHeight === "number") + object.revisionHeight = options.longs === String ? String(message.revisionHeight) : message.revisionHeight; + else + object.revisionHeight = options.longs === String ? $util.Long.prototype.toString.call(message.revisionHeight) : options.longs === Number ? new $util.LongBits(message.revisionHeight.low >>> 0, message.revisionHeight.high >>> 0).toNumber(true) : message.revisionHeight; + return object; + }; + + /** + * Converts this QueryChannelConsensusStateRequest to JSON. + * @function toJSON + * @memberof ibc.core.channel.v1.QueryChannelConsensusStateRequest + * @instance + * @returns {Object.} JSON object + */ + QueryChannelConsensusStateRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryChannelConsensusStateRequest; + })(v1.QueryChannelConsensusStateRequest || {}); + + v1.QueryChannelConsensusStateResponse = (function(QueryChannelConsensusStateResponse) { + + /** + * Properties of a QueryChannelConsensusStateResponse. + * @memberof ibc.core.channel.v1 + * @interface IQueryChannelConsensusStateResponse + * @property {google.protobuf.IAny|null} [consensusState] QueryChannelConsensusStateResponse consensusState + * @property {string|null} [clientId] QueryChannelConsensusStateResponse clientId + * @property {Uint8Array|null} [proof] QueryChannelConsensusStateResponse proof + * @property {ibc.core.client.v1.IHeight|null} [proofHeight] QueryChannelConsensusStateResponse proofHeight + */ + + /** + * Constructs a new QueryChannelConsensusStateResponse. + * @memberof ibc.core.channel.v1 + * @classdesc Represents a QueryChannelConsensusStateResponse. + * @implements IQueryChannelConsensusStateResponse + * @constructor + * @param {ibc.core.channel.v1.IQueryChannelConsensusStateResponse=} [properties] Properties to set + */ + function QueryChannelConsensusStateResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryChannelConsensusStateResponse consensusState. + * @member {google.protobuf.IAny|null|undefined} consensusState + * @memberof ibc.core.channel.v1.QueryChannelConsensusStateResponse + * @instance + */ + QueryChannelConsensusStateResponse.prototype.consensusState = null; + + /** + * QueryChannelConsensusStateResponse clientId. + * @member {string} clientId + * @memberof ibc.core.channel.v1.QueryChannelConsensusStateResponse + * @instance + */ + QueryChannelConsensusStateResponse.prototype.clientId = ""; + + /** + * QueryChannelConsensusStateResponse proof. + * @member {Uint8Array} proof + * @memberof ibc.core.channel.v1.QueryChannelConsensusStateResponse + * @instance + */ + QueryChannelConsensusStateResponse.prototype.proof = $util.newBuffer([]); + + /** + * QueryChannelConsensusStateResponse proofHeight. + * @member {ibc.core.client.v1.IHeight|null|undefined} proofHeight + * @memberof ibc.core.channel.v1.QueryChannelConsensusStateResponse + * @instance + */ + QueryChannelConsensusStateResponse.prototype.proofHeight = null; + + /** + * Creates a new QueryChannelConsensusStateResponse instance using the specified properties. + * @function create + * @memberof ibc.core.channel.v1.QueryChannelConsensusStateResponse + * @static + * @param {ibc.core.channel.v1.IQueryChannelConsensusStateResponse=} [properties] Properties to set + * @returns {ibc.core.channel.v1.QueryChannelConsensusStateResponse} QueryChannelConsensusStateResponse instance + */ + QueryChannelConsensusStateResponse.create = function create(properties) { + return new QueryChannelConsensusStateResponse(properties); + }; + + /** + * Encodes the specified QueryChannelConsensusStateResponse message. Does not implicitly {@link ibc.core.channel.v1.QueryChannelConsensusStateResponse.verify|verify} messages. + * @function encode + * @memberof ibc.core.channel.v1.QueryChannelConsensusStateResponse + * @static + * @param {ibc.core.channel.v1.IQueryChannelConsensusStateResponse} message QueryChannelConsensusStateResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryChannelConsensusStateResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.consensusState != null && Object.hasOwnProperty.call(message, "consensusState")) + $root.google.protobuf.Any.encode(message.consensusState, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.clientId != null && Object.hasOwnProperty.call(message, "clientId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.clientId); + if (message.proof != null && Object.hasOwnProperty.call(message, "proof")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.proof); + if (message.proofHeight != null && Object.hasOwnProperty.call(message, "proofHeight")) + $root.ibc.core.client.v1.Height.encode(message.proofHeight, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryChannelConsensusStateResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryChannelConsensusStateResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.channel.v1.QueryChannelConsensusStateResponse + * @static + * @param {ibc.core.channel.v1.IQueryChannelConsensusStateResponse} message QueryChannelConsensusStateResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryChannelConsensusStateResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryChannelConsensusStateResponse message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.channel.v1.QueryChannelConsensusStateResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.channel.v1.QueryChannelConsensusStateResponse} QueryChannelConsensusStateResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryChannelConsensusStateResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.QueryChannelConsensusStateResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.consensusState = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + case 2: + message.clientId = reader.string(); + break; + case 3: + message.proof = reader.bytes(); + break; + case 4: + message.proofHeight = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryChannelConsensusStateResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.channel.v1.QueryChannelConsensusStateResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.channel.v1.QueryChannelConsensusStateResponse} QueryChannelConsensusStateResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryChannelConsensusStateResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryChannelConsensusStateResponse message. + * @function verify + * @memberof ibc.core.channel.v1.QueryChannelConsensusStateResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryChannelConsensusStateResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.consensusState != null && message.hasOwnProperty("consensusState")) { + let error = $root.google.protobuf.Any.verify(message.consensusState); + if (error) + return "consensusState." + error; + } + if (message.clientId != null && message.hasOwnProperty("clientId")) + if (!$util.isString(message.clientId)) + return "clientId: string expected"; + if (message.proof != null && message.hasOwnProperty("proof")) + if (!(message.proof && typeof message.proof.length === "number" || $util.isString(message.proof))) + return "proof: buffer expected"; + if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) { + let error = $root.ibc.core.client.v1.Height.verify(message.proofHeight); + if (error) + return "proofHeight." + error; + } + return null; + }; + + /** + * Creates a QueryChannelConsensusStateResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.channel.v1.QueryChannelConsensusStateResponse + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.channel.v1.QueryChannelConsensusStateResponse} QueryChannelConsensusStateResponse + */ + QueryChannelConsensusStateResponse.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.channel.v1.QueryChannelConsensusStateResponse) + return object; + let message = new $root.ibc.core.channel.v1.QueryChannelConsensusStateResponse(); + if (object.consensusState != null) { + if (typeof object.consensusState !== "object") + throw TypeError(".ibc.core.channel.v1.QueryChannelConsensusStateResponse.consensusState: object expected"); + message.consensusState = $root.google.protobuf.Any.fromObject(object.consensusState); + } + if (object.clientId != null) + message.clientId = String(object.clientId); + if (object.proof != null) + if (typeof object.proof === "string") + $util.base64.decode(object.proof, message.proof = $util.newBuffer($util.base64.length(object.proof)), 0); + else if (object.proof.length) + message.proof = object.proof; + if (object.proofHeight != null) { + if (typeof object.proofHeight !== "object") + throw TypeError(".ibc.core.channel.v1.QueryChannelConsensusStateResponse.proofHeight: object expected"); + message.proofHeight = $root.ibc.core.client.v1.Height.fromObject(object.proofHeight); + } + return message; + }; + + /** + * Creates a plain object from a QueryChannelConsensusStateResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.channel.v1.QueryChannelConsensusStateResponse + * @static + * @param {ibc.core.channel.v1.QueryChannelConsensusStateResponse} message QueryChannelConsensusStateResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryChannelConsensusStateResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.consensusState = null; + object.clientId = ""; + if (options.bytes === String) + object.proof = ""; + else { + object.proof = []; + if (options.bytes !== Array) + object.proof = $util.newBuffer(object.proof); + } + object.proofHeight = null; + } + if (message.consensusState != null && message.hasOwnProperty("consensusState")) + object.consensusState = $root.google.protobuf.Any.toObject(message.consensusState, options); + if (message.clientId != null && message.hasOwnProperty("clientId")) + object.clientId = message.clientId; + if (message.proof != null && message.hasOwnProperty("proof")) + object.proof = options.bytes === String ? $util.base64.encode(message.proof, 0, message.proof.length) : options.bytes === Array ? Array.prototype.slice.call(message.proof) : message.proof; + if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) + object.proofHeight = $root.ibc.core.client.v1.Height.toObject(message.proofHeight, options); + return object; + }; + + /** + * Converts this QueryChannelConsensusStateResponse to JSON. + * @function toJSON + * @memberof ibc.core.channel.v1.QueryChannelConsensusStateResponse + * @instance + * @returns {Object.} JSON object + */ + QueryChannelConsensusStateResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryChannelConsensusStateResponse; + })(v1.QueryChannelConsensusStateResponse || {}); + + v1.QueryPacketCommitmentRequest = (function(QueryPacketCommitmentRequest) { + + /** + * Properties of a QueryPacketCommitmentRequest. + * @memberof ibc.core.channel.v1 + * @interface IQueryPacketCommitmentRequest + * @property {string|null} [portId] QueryPacketCommitmentRequest portId + * @property {string|null} [channelId] QueryPacketCommitmentRequest channelId + * @property {number|Long|null} [sequence] QueryPacketCommitmentRequest sequence + */ + + /** + * Constructs a new QueryPacketCommitmentRequest. + * @memberof ibc.core.channel.v1 + * @classdesc Represents a QueryPacketCommitmentRequest. + * @implements IQueryPacketCommitmentRequest + * @constructor + * @param {ibc.core.channel.v1.IQueryPacketCommitmentRequest=} [properties] Properties to set + */ + function QueryPacketCommitmentRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryPacketCommitmentRequest portId. + * @member {string} portId + * @memberof ibc.core.channel.v1.QueryPacketCommitmentRequest + * @instance + */ + QueryPacketCommitmentRequest.prototype.portId = ""; + + /** + * QueryPacketCommitmentRequest channelId. + * @member {string} channelId + * @memberof ibc.core.channel.v1.QueryPacketCommitmentRequest + * @instance + */ + QueryPacketCommitmentRequest.prototype.channelId = ""; + + /** + * QueryPacketCommitmentRequest sequence. + * @member {number|Long} sequence + * @memberof ibc.core.channel.v1.QueryPacketCommitmentRequest + * @instance + */ + QueryPacketCommitmentRequest.prototype.sequence = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new QueryPacketCommitmentRequest instance using the specified properties. + * @function create + * @memberof ibc.core.channel.v1.QueryPacketCommitmentRequest + * @static + * @param {ibc.core.channel.v1.IQueryPacketCommitmentRequest=} [properties] Properties to set + * @returns {ibc.core.channel.v1.QueryPacketCommitmentRequest} QueryPacketCommitmentRequest instance + */ + QueryPacketCommitmentRequest.create = function create(properties) { + return new QueryPacketCommitmentRequest(properties); + }; + + /** + * Encodes the specified QueryPacketCommitmentRequest message. Does not implicitly {@link ibc.core.channel.v1.QueryPacketCommitmentRequest.verify|verify} messages. + * @function encode + * @memberof ibc.core.channel.v1.QueryPacketCommitmentRequest + * @static + * @param {ibc.core.channel.v1.IQueryPacketCommitmentRequest} message QueryPacketCommitmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryPacketCommitmentRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.portId != null && Object.hasOwnProperty.call(message, "portId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.portId); + if (message.channelId != null && Object.hasOwnProperty.call(message, "channelId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.channelId); + if (message.sequence != null && Object.hasOwnProperty.call(message, "sequence")) + writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.sequence); + return writer; + }; + + /** + * Encodes the specified QueryPacketCommitmentRequest message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryPacketCommitmentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.channel.v1.QueryPacketCommitmentRequest + * @static + * @param {ibc.core.channel.v1.IQueryPacketCommitmentRequest} message QueryPacketCommitmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryPacketCommitmentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryPacketCommitmentRequest message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.channel.v1.QueryPacketCommitmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.channel.v1.QueryPacketCommitmentRequest} QueryPacketCommitmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryPacketCommitmentRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.QueryPacketCommitmentRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.portId = reader.string(); + break; + case 2: + message.channelId = reader.string(); + break; + case 3: + message.sequence = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryPacketCommitmentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.channel.v1.QueryPacketCommitmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.channel.v1.QueryPacketCommitmentRequest} QueryPacketCommitmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryPacketCommitmentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryPacketCommitmentRequest message. + * @function verify + * @memberof ibc.core.channel.v1.QueryPacketCommitmentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryPacketCommitmentRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.portId != null && message.hasOwnProperty("portId")) + if (!$util.isString(message.portId)) + return "portId: string expected"; + if (message.channelId != null && message.hasOwnProperty("channelId")) + if (!$util.isString(message.channelId)) + return "channelId: string expected"; + if (message.sequence != null && message.hasOwnProperty("sequence")) + if (!$util.isInteger(message.sequence) && !(message.sequence && $util.isInteger(message.sequence.low) && $util.isInteger(message.sequence.high))) + return "sequence: integer|Long expected"; + return null; + }; + + /** + * Creates a QueryPacketCommitmentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.channel.v1.QueryPacketCommitmentRequest + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.channel.v1.QueryPacketCommitmentRequest} QueryPacketCommitmentRequest + */ + QueryPacketCommitmentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.channel.v1.QueryPacketCommitmentRequest) + return object; + let message = new $root.ibc.core.channel.v1.QueryPacketCommitmentRequest(); + if (object.portId != null) + message.portId = String(object.portId); + if (object.channelId != null) + message.channelId = String(object.channelId); + if (object.sequence != null) + if ($util.Long) + (message.sequence = $util.Long.fromValue(object.sequence)).unsigned = true; + else if (typeof object.sequence === "string") + message.sequence = parseInt(object.sequence, 10); + else if (typeof object.sequence === "number") + message.sequence = object.sequence; + else if (typeof object.sequence === "object") + message.sequence = new $util.LongBits(object.sequence.low >>> 0, object.sequence.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a QueryPacketCommitmentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.channel.v1.QueryPacketCommitmentRequest + * @static + * @param {ibc.core.channel.v1.QueryPacketCommitmentRequest} message QueryPacketCommitmentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryPacketCommitmentRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.portId = ""; + object.channelId = ""; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.sequence = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.sequence = options.longs === String ? "0" : 0; + } + if (message.portId != null && message.hasOwnProperty("portId")) + object.portId = message.portId; + if (message.channelId != null && message.hasOwnProperty("channelId")) + object.channelId = message.channelId; + if (message.sequence != null && message.hasOwnProperty("sequence")) + if (typeof message.sequence === "number") + object.sequence = options.longs === String ? String(message.sequence) : message.sequence; + else + object.sequence = options.longs === String ? $util.Long.prototype.toString.call(message.sequence) : options.longs === Number ? new $util.LongBits(message.sequence.low >>> 0, message.sequence.high >>> 0).toNumber(true) : message.sequence; + return object; + }; + + /** + * Converts this QueryPacketCommitmentRequest to JSON. + * @function toJSON + * @memberof ibc.core.channel.v1.QueryPacketCommitmentRequest + * @instance + * @returns {Object.} JSON object + */ + QueryPacketCommitmentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryPacketCommitmentRequest; + })(v1.QueryPacketCommitmentRequest || {}); + + v1.QueryPacketCommitmentResponse = (function(QueryPacketCommitmentResponse) { + + /** + * Properties of a QueryPacketCommitmentResponse. + * @memberof ibc.core.channel.v1 + * @interface IQueryPacketCommitmentResponse + * @property {Uint8Array|null} [commitment] QueryPacketCommitmentResponse commitment + * @property {Uint8Array|null} [proof] QueryPacketCommitmentResponse proof + * @property {ibc.core.client.v1.IHeight|null} [proofHeight] QueryPacketCommitmentResponse proofHeight + */ + + /** + * Constructs a new QueryPacketCommitmentResponse. + * @memberof ibc.core.channel.v1 + * @classdesc Represents a QueryPacketCommitmentResponse. + * @implements IQueryPacketCommitmentResponse + * @constructor + * @param {ibc.core.channel.v1.IQueryPacketCommitmentResponse=} [properties] Properties to set + */ + function QueryPacketCommitmentResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryPacketCommitmentResponse commitment. + * @member {Uint8Array} commitment + * @memberof ibc.core.channel.v1.QueryPacketCommitmentResponse + * @instance + */ + QueryPacketCommitmentResponse.prototype.commitment = $util.newBuffer([]); + + /** + * QueryPacketCommitmentResponse proof. + * @member {Uint8Array} proof + * @memberof ibc.core.channel.v1.QueryPacketCommitmentResponse + * @instance + */ + QueryPacketCommitmentResponse.prototype.proof = $util.newBuffer([]); + + /** + * QueryPacketCommitmentResponse proofHeight. + * @member {ibc.core.client.v1.IHeight|null|undefined} proofHeight + * @memberof ibc.core.channel.v1.QueryPacketCommitmentResponse + * @instance + */ + QueryPacketCommitmentResponse.prototype.proofHeight = null; + + /** + * Creates a new QueryPacketCommitmentResponse instance using the specified properties. + * @function create + * @memberof ibc.core.channel.v1.QueryPacketCommitmentResponse + * @static + * @param {ibc.core.channel.v1.IQueryPacketCommitmentResponse=} [properties] Properties to set + * @returns {ibc.core.channel.v1.QueryPacketCommitmentResponse} QueryPacketCommitmentResponse instance + */ + QueryPacketCommitmentResponse.create = function create(properties) { + return new QueryPacketCommitmentResponse(properties); + }; + + /** + * Encodes the specified QueryPacketCommitmentResponse message. Does not implicitly {@link ibc.core.channel.v1.QueryPacketCommitmentResponse.verify|verify} messages. + * @function encode + * @memberof ibc.core.channel.v1.QueryPacketCommitmentResponse + * @static + * @param {ibc.core.channel.v1.IQueryPacketCommitmentResponse} message QueryPacketCommitmentResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryPacketCommitmentResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.commitment != null && Object.hasOwnProperty.call(message, "commitment")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.commitment); + if (message.proof != null && Object.hasOwnProperty.call(message, "proof")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.proof); + if (message.proofHeight != null && Object.hasOwnProperty.call(message, "proofHeight")) + $root.ibc.core.client.v1.Height.encode(message.proofHeight, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryPacketCommitmentResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryPacketCommitmentResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.channel.v1.QueryPacketCommitmentResponse + * @static + * @param {ibc.core.channel.v1.IQueryPacketCommitmentResponse} message QueryPacketCommitmentResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryPacketCommitmentResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryPacketCommitmentResponse message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.channel.v1.QueryPacketCommitmentResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.channel.v1.QueryPacketCommitmentResponse} QueryPacketCommitmentResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryPacketCommitmentResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.QueryPacketCommitmentResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.commitment = reader.bytes(); + break; + case 2: + message.proof = reader.bytes(); + break; + case 3: + message.proofHeight = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryPacketCommitmentResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.channel.v1.QueryPacketCommitmentResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.channel.v1.QueryPacketCommitmentResponse} QueryPacketCommitmentResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryPacketCommitmentResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryPacketCommitmentResponse message. + * @function verify + * @memberof ibc.core.channel.v1.QueryPacketCommitmentResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryPacketCommitmentResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.commitment != null && message.hasOwnProperty("commitment")) + if (!(message.commitment && typeof message.commitment.length === "number" || $util.isString(message.commitment))) + return "commitment: buffer expected"; + if (message.proof != null && message.hasOwnProperty("proof")) + if (!(message.proof && typeof message.proof.length === "number" || $util.isString(message.proof))) + return "proof: buffer expected"; + if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) { + let error = $root.ibc.core.client.v1.Height.verify(message.proofHeight); + if (error) + return "proofHeight." + error; + } + return null; + }; + + /** + * Creates a QueryPacketCommitmentResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.channel.v1.QueryPacketCommitmentResponse + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.channel.v1.QueryPacketCommitmentResponse} QueryPacketCommitmentResponse + */ + QueryPacketCommitmentResponse.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.channel.v1.QueryPacketCommitmentResponse) + return object; + let message = new $root.ibc.core.channel.v1.QueryPacketCommitmentResponse(); + if (object.commitment != null) + if (typeof object.commitment === "string") + $util.base64.decode(object.commitment, message.commitment = $util.newBuffer($util.base64.length(object.commitment)), 0); + else if (object.commitment.length) + message.commitment = object.commitment; + if (object.proof != null) + if (typeof object.proof === "string") + $util.base64.decode(object.proof, message.proof = $util.newBuffer($util.base64.length(object.proof)), 0); + else if (object.proof.length) + message.proof = object.proof; + if (object.proofHeight != null) { + if (typeof object.proofHeight !== "object") + throw TypeError(".ibc.core.channel.v1.QueryPacketCommitmentResponse.proofHeight: object expected"); + message.proofHeight = $root.ibc.core.client.v1.Height.fromObject(object.proofHeight); + } + return message; + }; + + /** + * Creates a plain object from a QueryPacketCommitmentResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.channel.v1.QueryPacketCommitmentResponse + * @static + * @param {ibc.core.channel.v1.QueryPacketCommitmentResponse} message QueryPacketCommitmentResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryPacketCommitmentResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + if (options.bytes === String) + object.commitment = ""; + else { + object.commitment = []; + if (options.bytes !== Array) + object.commitment = $util.newBuffer(object.commitment); + } + if (options.bytes === String) + object.proof = ""; + else { + object.proof = []; + if (options.bytes !== Array) + object.proof = $util.newBuffer(object.proof); + } + object.proofHeight = null; + } + if (message.commitment != null && message.hasOwnProperty("commitment")) + object.commitment = options.bytes === String ? $util.base64.encode(message.commitment, 0, message.commitment.length) : options.bytes === Array ? Array.prototype.slice.call(message.commitment) : message.commitment; + if (message.proof != null && message.hasOwnProperty("proof")) + object.proof = options.bytes === String ? $util.base64.encode(message.proof, 0, message.proof.length) : options.bytes === Array ? Array.prototype.slice.call(message.proof) : message.proof; + if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) + object.proofHeight = $root.ibc.core.client.v1.Height.toObject(message.proofHeight, options); + return object; + }; + + /** + * Converts this QueryPacketCommitmentResponse to JSON. + * @function toJSON + * @memberof ibc.core.channel.v1.QueryPacketCommitmentResponse + * @instance + * @returns {Object.} JSON object + */ + QueryPacketCommitmentResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryPacketCommitmentResponse; + })(v1.QueryPacketCommitmentResponse || {}); + + v1.QueryPacketCommitmentsRequest = (function(QueryPacketCommitmentsRequest) { + + /** + * Properties of a QueryPacketCommitmentsRequest. + * @memberof ibc.core.channel.v1 + * @interface IQueryPacketCommitmentsRequest + * @property {string|null} [portId] QueryPacketCommitmentsRequest portId + * @property {string|null} [channelId] QueryPacketCommitmentsRequest channelId + * @property {cosmos.base.query.v1beta1.IPageRequest|null} [pagination] QueryPacketCommitmentsRequest pagination + */ + + /** + * Constructs a new QueryPacketCommitmentsRequest. + * @memberof ibc.core.channel.v1 + * @classdesc Represents a QueryPacketCommitmentsRequest. + * @implements IQueryPacketCommitmentsRequest + * @constructor + * @param {ibc.core.channel.v1.IQueryPacketCommitmentsRequest=} [properties] Properties to set + */ + function QueryPacketCommitmentsRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryPacketCommitmentsRequest portId. + * @member {string} portId + * @memberof ibc.core.channel.v1.QueryPacketCommitmentsRequest + * @instance + */ + QueryPacketCommitmentsRequest.prototype.portId = ""; + + /** + * QueryPacketCommitmentsRequest channelId. + * @member {string} channelId + * @memberof ibc.core.channel.v1.QueryPacketCommitmentsRequest + * @instance + */ + QueryPacketCommitmentsRequest.prototype.channelId = ""; + + /** + * QueryPacketCommitmentsRequest pagination. + * @member {cosmos.base.query.v1beta1.IPageRequest|null|undefined} pagination + * @memberof ibc.core.channel.v1.QueryPacketCommitmentsRequest + * @instance + */ + QueryPacketCommitmentsRequest.prototype.pagination = null; + + /** + * Creates a new QueryPacketCommitmentsRequest instance using the specified properties. + * @function create + * @memberof ibc.core.channel.v1.QueryPacketCommitmentsRequest + * @static + * @param {ibc.core.channel.v1.IQueryPacketCommitmentsRequest=} [properties] Properties to set + * @returns {ibc.core.channel.v1.QueryPacketCommitmentsRequest} QueryPacketCommitmentsRequest instance + */ + QueryPacketCommitmentsRequest.create = function create(properties) { + return new QueryPacketCommitmentsRequest(properties); + }; + + /** + * Encodes the specified QueryPacketCommitmentsRequest message. Does not implicitly {@link ibc.core.channel.v1.QueryPacketCommitmentsRequest.verify|verify} messages. + * @function encode + * @memberof ibc.core.channel.v1.QueryPacketCommitmentsRequest + * @static + * @param {ibc.core.channel.v1.IQueryPacketCommitmentsRequest} message QueryPacketCommitmentsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryPacketCommitmentsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.portId != null && Object.hasOwnProperty.call(message, "portId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.portId); + if (message.channelId != null && Object.hasOwnProperty.call(message, "channelId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.channelId); + if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) + $root.cosmos.base.query.v1beta1.PageRequest.encode(message.pagination, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryPacketCommitmentsRequest message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryPacketCommitmentsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.channel.v1.QueryPacketCommitmentsRequest + * @static + * @param {ibc.core.channel.v1.IQueryPacketCommitmentsRequest} message QueryPacketCommitmentsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryPacketCommitmentsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryPacketCommitmentsRequest message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.channel.v1.QueryPacketCommitmentsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.channel.v1.QueryPacketCommitmentsRequest} QueryPacketCommitmentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryPacketCommitmentsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.QueryPacketCommitmentsRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.portId = reader.string(); + break; + case 2: + message.channelId = reader.string(); + break; + case 3: + message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryPacketCommitmentsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.channel.v1.QueryPacketCommitmentsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.channel.v1.QueryPacketCommitmentsRequest} QueryPacketCommitmentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryPacketCommitmentsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryPacketCommitmentsRequest message. + * @function verify + * @memberof ibc.core.channel.v1.QueryPacketCommitmentsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryPacketCommitmentsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.portId != null && message.hasOwnProperty("portId")) + if (!$util.isString(message.portId)) + return "portId: string expected"; + if (message.channelId != null && message.hasOwnProperty("channelId")) + if (!$util.isString(message.channelId)) + return "channelId: string expected"; + if (message.pagination != null && message.hasOwnProperty("pagination")) { + let error = $root.cosmos.base.query.v1beta1.PageRequest.verify(message.pagination); + if (error) + return "pagination." + error; + } + return null; + }; + + /** + * Creates a QueryPacketCommitmentsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.channel.v1.QueryPacketCommitmentsRequest + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.channel.v1.QueryPacketCommitmentsRequest} QueryPacketCommitmentsRequest + */ + QueryPacketCommitmentsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.channel.v1.QueryPacketCommitmentsRequest) + return object; + let message = new $root.ibc.core.channel.v1.QueryPacketCommitmentsRequest(); + if (object.portId != null) + message.portId = String(object.portId); + if (object.channelId != null) + message.channelId = String(object.channelId); + if (object.pagination != null) { + if (typeof object.pagination !== "object") + throw TypeError(".ibc.core.channel.v1.QueryPacketCommitmentsRequest.pagination: object expected"); + message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.fromObject(object.pagination); + } + return message; + }; + + /** + * Creates a plain object from a QueryPacketCommitmentsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.channel.v1.QueryPacketCommitmentsRequest + * @static + * @param {ibc.core.channel.v1.QueryPacketCommitmentsRequest} message QueryPacketCommitmentsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryPacketCommitmentsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.portId = ""; + object.channelId = ""; + object.pagination = null; + } + if (message.portId != null && message.hasOwnProperty("portId")) + object.portId = message.portId; + if (message.channelId != null && message.hasOwnProperty("channelId")) + object.channelId = message.channelId; + if (message.pagination != null && message.hasOwnProperty("pagination")) + object.pagination = $root.cosmos.base.query.v1beta1.PageRequest.toObject(message.pagination, options); + return object; + }; + + /** + * Converts this QueryPacketCommitmentsRequest to JSON. + * @function toJSON + * @memberof ibc.core.channel.v1.QueryPacketCommitmentsRequest + * @instance + * @returns {Object.} JSON object + */ + QueryPacketCommitmentsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryPacketCommitmentsRequest; + })(v1.QueryPacketCommitmentsRequest || {}); + + v1.QueryPacketCommitmentsResponse = (function(QueryPacketCommitmentsResponse) { + + /** + * Properties of a QueryPacketCommitmentsResponse. + * @memberof ibc.core.channel.v1 + * @interface IQueryPacketCommitmentsResponse + * @property {Array.|null} [commitments] QueryPacketCommitmentsResponse commitments + * @property {cosmos.base.query.v1beta1.IPageResponse|null} [pagination] QueryPacketCommitmentsResponse pagination + * @property {ibc.core.client.v1.IHeight|null} [height] QueryPacketCommitmentsResponse height + */ + + /** + * Constructs a new QueryPacketCommitmentsResponse. + * @memberof ibc.core.channel.v1 + * @classdesc Represents a QueryPacketCommitmentsResponse. + * @implements IQueryPacketCommitmentsResponse + * @constructor + * @param {ibc.core.channel.v1.IQueryPacketCommitmentsResponse=} [properties] Properties to set + */ + function QueryPacketCommitmentsResponse(properties) { + this.commitments = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryPacketCommitmentsResponse commitments. + * @member {Array.} commitments + * @memberof ibc.core.channel.v1.QueryPacketCommitmentsResponse + * @instance + */ + QueryPacketCommitmentsResponse.prototype.commitments = $util.emptyArray; + + /** + * QueryPacketCommitmentsResponse pagination. + * @member {cosmos.base.query.v1beta1.IPageResponse|null|undefined} pagination + * @memberof ibc.core.channel.v1.QueryPacketCommitmentsResponse + * @instance + */ + QueryPacketCommitmentsResponse.prototype.pagination = null; + + /** + * QueryPacketCommitmentsResponse height. + * @member {ibc.core.client.v1.IHeight|null|undefined} height + * @memberof ibc.core.channel.v1.QueryPacketCommitmentsResponse + * @instance + */ + QueryPacketCommitmentsResponse.prototype.height = null; + + /** + * Creates a new QueryPacketCommitmentsResponse instance using the specified properties. + * @function create + * @memberof ibc.core.channel.v1.QueryPacketCommitmentsResponse + * @static + * @param {ibc.core.channel.v1.IQueryPacketCommitmentsResponse=} [properties] Properties to set + * @returns {ibc.core.channel.v1.QueryPacketCommitmentsResponse} QueryPacketCommitmentsResponse instance + */ + QueryPacketCommitmentsResponse.create = function create(properties) { + return new QueryPacketCommitmentsResponse(properties); + }; + + /** + * Encodes the specified QueryPacketCommitmentsResponse message. Does not implicitly {@link ibc.core.channel.v1.QueryPacketCommitmentsResponse.verify|verify} messages. + * @function encode + * @memberof ibc.core.channel.v1.QueryPacketCommitmentsResponse + * @static + * @param {ibc.core.channel.v1.IQueryPacketCommitmentsResponse} message QueryPacketCommitmentsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryPacketCommitmentsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.commitments != null && message.commitments.length) + for (let i = 0; i < message.commitments.length; ++i) + $root.ibc.core.channel.v1.PacketState.encode(message.commitments[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) + $root.cosmos.base.query.v1beta1.PageResponse.encode(message.pagination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.height != null && Object.hasOwnProperty.call(message, "height")) + $root.ibc.core.client.v1.Height.encode(message.height, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryPacketCommitmentsResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryPacketCommitmentsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.channel.v1.QueryPacketCommitmentsResponse + * @static + * @param {ibc.core.channel.v1.IQueryPacketCommitmentsResponse} message QueryPacketCommitmentsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryPacketCommitmentsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryPacketCommitmentsResponse message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.channel.v1.QueryPacketCommitmentsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.channel.v1.QueryPacketCommitmentsResponse} QueryPacketCommitmentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryPacketCommitmentsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.QueryPacketCommitmentsResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.commitments && message.commitments.length)) + message.commitments = []; + message.commitments.push($root.ibc.core.channel.v1.PacketState.decode(reader, reader.uint32())); + break; + case 2: + message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.decode(reader, reader.uint32()); + break; + case 3: + message.height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryPacketCommitmentsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.channel.v1.QueryPacketCommitmentsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.channel.v1.QueryPacketCommitmentsResponse} QueryPacketCommitmentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryPacketCommitmentsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryPacketCommitmentsResponse message. + * @function verify + * @memberof ibc.core.channel.v1.QueryPacketCommitmentsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryPacketCommitmentsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.commitments != null && message.hasOwnProperty("commitments")) { + if (!Array.isArray(message.commitments)) + return "commitments: array expected"; + for (let i = 0; i < message.commitments.length; ++i) { + let error = $root.ibc.core.channel.v1.PacketState.verify(message.commitments[i]); + if (error) + return "commitments." + error; + } + } + if (message.pagination != null && message.hasOwnProperty("pagination")) { + let error = $root.cosmos.base.query.v1beta1.PageResponse.verify(message.pagination); + if (error) + return "pagination." + error; + } + if (message.height != null && message.hasOwnProperty("height")) { + let error = $root.ibc.core.client.v1.Height.verify(message.height); + if (error) + return "height." + error; + } + return null; + }; + + /** + * Creates a QueryPacketCommitmentsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.channel.v1.QueryPacketCommitmentsResponse + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.channel.v1.QueryPacketCommitmentsResponse} QueryPacketCommitmentsResponse + */ + QueryPacketCommitmentsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.channel.v1.QueryPacketCommitmentsResponse) + return object; + let message = new $root.ibc.core.channel.v1.QueryPacketCommitmentsResponse(); + if (object.commitments) { + if (!Array.isArray(object.commitments)) + throw TypeError(".ibc.core.channel.v1.QueryPacketCommitmentsResponse.commitments: array expected"); + message.commitments = []; + for (let i = 0; i < object.commitments.length; ++i) { + if (typeof object.commitments[i] !== "object") + throw TypeError(".ibc.core.channel.v1.QueryPacketCommitmentsResponse.commitments: object expected"); + message.commitments[i] = $root.ibc.core.channel.v1.PacketState.fromObject(object.commitments[i]); + } + } + if (object.pagination != null) { + if (typeof object.pagination !== "object") + throw TypeError(".ibc.core.channel.v1.QueryPacketCommitmentsResponse.pagination: object expected"); + message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.fromObject(object.pagination); + } + if (object.height != null) { + if (typeof object.height !== "object") + throw TypeError(".ibc.core.channel.v1.QueryPacketCommitmentsResponse.height: object expected"); + message.height = $root.ibc.core.client.v1.Height.fromObject(object.height); + } + return message; + }; + + /** + * Creates a plain object from a QueryPacketCommitmentsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.channel.v1.QueryPacketCommitmentsResponse + * @static + * @param {ibc.core.channel.v1.QueryPacketCommitmentsResponse} message QueryPacketCommitmentsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryPacketCommitmentsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.commitments = []; + if (options.defaults) { + object.pagination = null; + object.height = null; + } + if (message.commitments && message.commitments.length) { + object.commitments = []; + for (let j = 0; j < message.commitments.length; ++j) + object.commitments[j] = $root.ibc.core.channel.v1.PacketState.toObject(message.commitments[j], options); + } + if (message.pagination != null && message.hasOwnProperty("pagination")) + object.pagination = $root.cosmos.base.query.v1beta1.PageResponse.toObject(message.pagination, options); + if (message.height != null && message.hasOwnProperty("height")) + object.height = $root.ibc.core.client.v1.Height.toObject(message.height, options); + return object; + }; + + /** + * Converts this QueryPacketCommitmentsResponse to JSON. + * @function toJSON + * @memberof ibc.core.channel.v1.QueryPacketCommitmentsResponse + * @instance + * @returns {Object.} JSON object + */ + QueryPacketCommitmentsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryPacketCommitmentsResponse; + })(v1.QueryPacketCommitmentsResponse || {}); + + v1.QueryPacketReceiptRequest = (function(QueryPacketReceiptRequest) { + + /** + * Properties of a QueryPacketReceiptRequest. + * @memberof ibc.core.channel.v1 + * @interface IQueryPacketReceiptRequest + * @property {string|null} [portId] QueryPacketReceiptRequest portId + * @property {string|null} [channelId] QueryPacketReceiptRequest channelId + * @property {number|Long|null} [sequence] QueryPacketReceiptRequest sequence + */ + + /** + * Constructs a new QueryPacketReceiptRequest. + * @memberof ibc.core.channel.v1 + * @classdesc Represents a QueryPacketReceiptRequest. + * @implements IQueryPacketReceiptRequest + * @constructor + * @param {ibc.core.channel.v1.IQueryPacketReceiptRequest=} [properties] Properties to set + */ + function QueryPacketReceiptRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryPacketReceiptRequest portId. + * @member {string} portId + * @memberof ibc.core.channel.v1.QueryPacketReceiptRequest + * @instance + */ + QueryPacketReceiptRequest.prototype.portId = ""; + + /** + * QueryPacketReceiptRequest channelId. + * @member {string} channelId + * @memberof ibc.core.channel.v1.QueryPacketReceiptRequest + * @instance + */ + QueryPacketReceiptRequest.prototype.channelId = ""; + + /** + * QueryPacketReceiptRequest sequence. + * @member {number|Long} sequence + * @memberof ibc.core.channel.v1.QueryPacketReceiptRequest + * @instance + */ + QueryPacketReceiptRequest.prototype.sequence = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new QueryPacketReceiptRequest instance using the specified properties. + * @function create + * @memberof ibc.core.channel.v1.QueryPacketReceiptRequest + * @static + * @param {ibc.core.channel.v1.IQueryPacketReceiptRequest=} [properties] Properties to set + * @returns {ibc.core.channel.v1.QueryPacketReceiptRequest} QueryPacketReceiptRequest instance + */ + QueryPacketReceiptRequest.create = function create(properties) { + return new QueryPacketReceiptRequest(properties); + }; + + /** + * Encodes the specified QueryPacketReceiptRequest message. Does not implicitly {@link ibc.core.channel.v1.QueryPacketReceiptRequest.verify|verify} messages. + * @function encode + * @memberof ibc.core.channel.v1.QueryPacketReceiptRequest + * @static + * @param {ibc.core.channel.v1.IQueryPacketReceiptRequest} message QueryPacketReceiptRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryPacketReceiptRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.portId != null && Object.hasOwnProperty.call(message, "portId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.portId); + if (message.channelId != null && Object.hasOwnProperty.call(message, "channelId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.channelId); + if (message.sequence != null && Object.hasOwnProperty.call(message, "sequence")) + writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.sequence); + return writer; + }; + + /** + * Encodes the specified QueryPacketReceiptRequest message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryPacketReceiptRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.channel.v1.QueryPacketReceiptRequest + * @static + * @param {ibc.core.channel.v1.IQueryPacketReceiptRequest} message QueryPacketReceiptRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryPacketReceiptRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryPacketReceiptRequest message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.channel.v1.QueryPacketReceiptRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.channel.v1.QueryPacketReceiptRequest} QueryPacketReceiptRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryPacketReceiptRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.QueryPacketReceiptRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.portId = reader.string(); + break; + case 2: + message.channelId = reader.string(); + break; + case 3: + message.sequence = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryPacketReceiptRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.channel.v1.QueryPacketReceiptRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.channel.v1.QueryPacketReceiptRequest} QueryPacketReceiptRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryPacketReceiptRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryPacketReceiptRequest message. + * @function verify + * @memberof ibc.core.channel.v1.QueryPacketReceiptRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryPacketReceiptRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.portId != null && message.hasOwnProperty("portId")) + if (!$util.isString(message.portId)) + return "portId: string expected"; + if (message.channelId != null && message.hasOwnProperty("channelId")) + if (!$util.isString(message.channelId)) + return "channelId: string expected"; + if (message.sequence != null && message.hasOwnProperty("sequence")) + if (!$util.isInteger(message.sequence) && !(message.sequence && $util.isInteger(message.sequence.low) && $util.isInteger(message.sequence.high))) + return "sequence: integer|Long expected"; + return null; + }; + + /** + * Creates a QueryPacketReceiptRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.channel.v1.QueryPacketReceiptRequest + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.channel.v1.QueryPacketReceiptRequest} QueryPacketReceiptRequest + */ + QueryPacketReceiptRequest.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.channel.v1.QueryPacketReceiptRequest) + return object; + let message = new $root.ibc.core.channel.v1.QueryPacketReceiptRequest(); + if (object.portId != null) + message.portId = String(object.portId); + if (object.channelId != null) + message.channelId = String(object.channelId); + if (object.sequence != null) + if ($util.Long) + (message.sequence = $util.Long.fromValue(object.sequence)).unsigned = true; + else if (typeof object.sequence === "string") + message.sequence = parseInt(object.sequence, 10); + else if (typeof object.sequence === "number") + message.sequence = object.sequence; + else if (typeof object.sequence === "object") + message.sequence = new $util.LongBits(object.sequence.low >>> 0, object.sequence.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a QueryPacketReceiptRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.channel.v1.QueryPacketReceiptRequest + * @static + * @param {ibc.core.channel.v1.QueryPacketReceiptRequest} message QueryPacketReceiptRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryPacketReceiptRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.portId = ""; + object.channelId = ""; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.sequence = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.sequence = options.longs === String ? "0" : 0; + } + if (message.portId != null && message.hasOwnProperty("portId")) + object.portId = message.portId; + if (message.channelId != null && message.hasOwnProperty("channelId")) + object.channelId = message.channelId; + if (message.sequence != null && message.hasOwnProperty("sequence")) + if (typeof message.sequence === "number") + object.sequence = options.longs === String ? String(message.sequence) : message.sequence; + else + object.sequence = options.longs === String ? $util.Long.prototype.toString.call(message.sequence) : options.longs === Number ? new $util.LongBits(message.sequence.low >>> 0, message.sequence.high >>> 0).toNumber(true) : message.sequence; + return object; + }; + + /** + * Converts this QueryPacketReceiptRequest to JSON. + * @function toJSON + * @memberof ibc.core.channel.v1.QueryPacketReceiptRequest + * @instance + * @returns {Object.} JSON object + */ + QueryPacketReceiptRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryPacketReceiptRequest; + })(v1.QueryPacketReceiptRequest || {}); + + v1.QueryPacketReceiptResponse = (function(QueryPacketReceiptResponse) { + + /** + * Properties of a QueryPacketReceiptResponse. + * @memberof ibc.core.channel.v1 + * @interface IQueryPacketReceiptResponse + * @property {boolean|null} [received] QueryPacketReceiptResponse received + * @property {Uint8Array|null} [proof] QueryPacketReceiptResponse proof + * @property {ibc.core.client.v1.IHeight|null} [proofHeight] QueryPacketReceiptResponse proofHeight + */ + + /** + * Constructs a new QueryPacketReceiptResponse. + * @memberof ibc.core.channel.v1 + * @classdesc Represents a QueryPacketReceiptResponse. + * @implements IQueryPacketReceiptResponse + * @constructor + * @param {ibc.core.channel.v1.IQueryPacketReceiptResponse=} [properties] Properties to set + */ + function QueryPacketReceiptResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryPacketReceiptResponse received. + * @member {boolean} received + * @memberof ibc.core.channel.v1.QueryPacketReceiptResponse + * @instance + */ + QueryPacketReceiptResponse.prototype.received = false; + + /** + * QueryPacketReceiptResponse proof. + * @member {Uint8Array} proof + * @memberof ibc.core.channel.v1.QueryPacketReceiptResponse + * @instance + */ + QueryPacketReceiptResponse.prototype.proof = $util.newBuffer([]); + + /** + * QueryPacketReceiptResponse proofHeight. + * @member {ibc.core.client.v1.IHeight|null|undefined} proofHeight + * @memberof ibc.core.channel.v1.QueryPacketReceiptResponse + * @instance + */ + QueryPacketReceiptResponse.prototype.proofHeight = null; + + /** + * Creates a new QueryPacketReceiptResponse instance using the specified properties. + * @function create + * @memberof ibc.core.channel.v1.QueryPacketReceiptResponse + * @static + * @param {ibc.core.channel.v1.IQueryPacketReceiptResponse=} [properties] Properties to set + * @returns {ibc.core.channel.v1.QueryPacketReceiptResponse} QueryPacketReceiptResponse instance + */ + QueryPacketReceiptResponse.create = function create(properties) { + return new QueryPacketReceiptResponse(properties); + }; + + /** + * Encodes the specified QueryPacketReceiptResponse message. Does not implicitly {@link ibc.core.channel.v1.QueryPacketReceiptResponse.verify|verify} messages. + * @function encode + * @memberof ibc.core.channel.v1.QueryPacketReceiptResponse + * @static + * @param {ibc.core.channel.v1.IQueryPacketReceiptResponse} message QueryPacketReceiptResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryPacketReceiptResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.received != null && Object.hasOwnProperty.call(message, "received")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.received); + if (message.proof != null && Object.hasOwnProperty.call(message, "proof")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.proof); + if (message.proofHeight != null && Object.hasOwnProperty.call(message, "proofHeight")) + $root.ibc.core.client.v1.Height.encode(message.proofHeight, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryPacketReceiptResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryPacketReceiptResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.channel.v1.QueryPacketReceiptResponse + * @static + * @param {ibc.core.channel.v1.IQueryPacketReceiptResponse} message QueryPacketReceiptResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryPacketReceiptResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryPacketReceiptResponse message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.channel.v1.QueryPacketReceiptResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.channel.v1.QueryPacketReceiptResponse} QueryPacketReceiptResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryPacketReceiptResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.QueryPacketReceiptResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + message.received = reader.bool(); + break; + case 3: + message.proof = reader.bytes(); + break; + case 4: + message.proofHeight = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryPacketReceiptResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.channel.v1.QueryPacketReceiptResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.channel.v1.QueryPacketReceiptResponse} QueryPacketReceiptResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryPacketReceiptResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryPacketReceiptResponse message. + * @function verify + * @memberof ibc.core.channel.v1.QueryPacketReceiptResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryPacketReceiptResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.received != null && message.hasOwnProperty("received")) + if (typeof message.received !== "boolean") + return "received: boolean expected"; + if (message.proof != null && message.hasOwnProperty("proof")) + if (!(message.proof && typeof message.proof.length === "number" || $util.isString(message.proof))) + return "proof: buffer expected"; + if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) { + let error = $root.ibc.core.client.v1.Height.verify(message.proofHeight); + if (error) + return "proofHeight." + error; + } + return null; + }; + + /** + * Creates a QueryPacketReceiptResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.channel.v1.QueryPacketReceiptResponse + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.channel.v1.QueryPacketReceiptResponse} QueryPacketReceiptResponse + */ + QueryPacketReceiptResponse.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.channel.v1.QueryPacketReceiptResponse) + return object; + let message = new $root.ibc.core.channel.v1.QueryPacketReceiptResponse(); + if (object.received != null) + message.received = Boolean(object.received); + if (object.proof != null) + if (typeof object.proof === "string") + $util.base64.decode(object.proof, message.proof = $util.newBuffer($util.base64.length(object.proof)), 0); + else if (object.proof.length) + message.proof = object.proof; + if (object.proofHeight != null) { + if (typeof object.proofHeight !== "object") + throw TypeError(".ibc.core.channel.v1.QueryPacketReceiptResponse.proofHeight: object expected"); + message.proofHeight = $root.ibc.core.client.v1.Height.fromObject(object.proofHeight); + } + return message; + }; + + /** + * Creates a plain object from a QueryPacketReceiptResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.channel.v1.QueryPacketReceiptResponse + * @static + * @param {ibc.core.channel.v1.QueryPacketReceiptResponse} message QueryPacketReceiptResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryPacketReceiptResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.received = false; + if (options.bytes === String) + object.proof = ""; + else { + object.proof = []; + if (options.bytes !== Array) + object.proof = $util.newBuffer(object.proof); + } + object.proofHeight = null; + } + if (message.received != null && message.hasOwnProperty("received")) + object.received = message.received; + if (message.proof != null && message.hasOwnProperty("proof")) + object.proof = options.bytes === String ? $util.base64.encode(message.proof, 0, message.proof.length) : options.bytes === Array ? Array.prototype.slice.call(message.proof) : message.proof; + if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) + object.proofHeight = $root.ibc.core.client.v1.Height.toObject(message.proofHeight, options); + return object; + }; + + /** + * Converts this QueryPacketReceiptResponse to JSON. + * @function toJSON + * @memberof ibc.core.channel.v1.QueryPacketReceiptResponse + * @instance + * @returns {Object.} JSON object + */ + QueryPacketReceiptResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryPacketReceiptResponse; + })(v1.QueryPacketReceiptResponse || {}); + + v1.QueryPacketAcknowledgementRequest = (function(QueryPacketAcknowledgementRequest) { + + /** + * Properties of a QueryPacketAcknowledgementRequest. + * @memberof ibc.core.channel.v1 + * @interface IQueryPacketAcknowledgementRequest + * @property {string|null} [portId] QueryPacketAcknowledgementRequest portId + * @property {string|null} [channelId] QueryPacketAcknowledgementRequest channelId + * @property {number|Long|null} [sequence] QueryPacketAcknowledgementRequest sequence + */ + + /** + * Constructs a new QueryPacketAcknowledgementRequest. + * @memberof ibc.core.channel.v1 + * @classdesc Represents a QueryPacketAcknowledgementRequest. + * @implements IQueryPacketAcknowledgementRequest + * @constructor + * @param {ibc.core.channel.v1.IQueryPacketAcknowledgementRequest=} [properties] Properties to set + */ + function QueryPacketAcknowledgementRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryPacketAcknowledgementRequest portId. + * @member {string} portId + * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementRequest + * @instance + */ + QueryPacketAcknowledgementRequest.prototype.portId = ""; + + /** + * QueryPacketAcknowledgementRequest channelId. + * @member {string} channelId + * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementRequest + * @instance + */ + QueryPacketAcknowledgementRequest.prototype.channelId = ""; + + /** + * QueryPacketAcknowledgementRequest sequence. + * @member {number|Long} sequence + * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementRequest + * @instance + */ + QueryPacketAcknowledgementRequest.prototype.sequence = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new QueryPacketAcknowledgementRequest instance using the specified properties. + * @function create + * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementRequest + * @static + * @param {ibc.core.channel.v1.IQueryPacketAcknowledgementRequest=} [properties] Properties to set + * @returns {ibc.core.channel.v1.QueryPacketAcknowledgementRequest} QueryPacketAcknowledgementRequest instance + */ + QueryPacketAcknowledgementRequest.create = function create(properties) { + return new QueryPacketAcknowledgementRequest(properties); + }; + + /** + * Encodes the specified QueryPacketAcknowledgementRequest message. Does not implicitly {@link ibc.core.channel.v1.QueryPacketAcknowledgementRequest.verify|verify} messages. + * @function encode + * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementRequest + * @static + * @param {ibc.core.channel.v1.IQueryPacketAcknowledgementRequest} message QueryPacketAcknowledgementRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryPacketAcknowledgementRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.portId != null && Object.hasOwnProperty.call(message, "portId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.portId); + if (message.channelId != null && Object.hasOwnProperty.call(message, "channelId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.channelId); + if (message.sequence != null && Object.hasOwnProperty.call(message, "sequence")) + writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.sequence); + return writer; + }; + + /** + * Encodes the specified QueryPacketAcknowledgementRequest message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryPacketAcknowledgementRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementRequest + * @static + * @param {ibc.core.channel.v1.IQueryPacketAcknowledgementRequest} message QueryPacketAcknowledgementRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryPacketAcknowledgementRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryPacketAcknowledgementRequest message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.channel.v1.QueryPacketAcknowledgementRequest} QueryPacketAcknowledgementRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryPacketAcknowledgementRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.QueryPacketAcknowledgementRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.portId = reader.string(); + break; + case 2: + message.channelId = reader.string(); + break; + case 3: + message.sequence = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryPacketAcknowledgementRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.channel.v1.QueryPacketAcknowledgementRequest} QueryPacketAcknowledgementRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryPacketAcknowledgementRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryPacketAcknowledgementRequest message. + * @function verify + * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryPacketAcknowledgementRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.portId != null && message.hasOwnProperty("portId")) + if (!$util.isString(message.portId)) + return "portId: string expected"; + if (message.channelId != null && message.hasOwnProperty("channelId")) + if (!$util.isString(message.channelId)) + return "channelId: string expected"; + if (message.sequence != null && message.hasOwnProperty("sequence")) + if (!$util.isInteger(message.sequence) && !(message.sequence && $util.isInteger(message.sequence.low) && $util.isInteger(message.sequence.high))) + return "sequence: integer|Long expected"; + return null; + }; + + /** + * Creates a QueryPacketAcknowledgementRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementRequest + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.channel.v1.QueryPacketAcknowledgementRequest} QueryPacketAcknowledgementRequest + */ + QueryPacketAcknowledgementRequest.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.channel.v1.QueryPacketAcknowledgementRequest) + return object; + let message = new $root.ibc.core.channel.v1.QueryPacketAcknowledgementRequest(); + if (object.portId != null) + message.portId = String(object.portId); + if (object.channelId != null) + message.channelId = String(object.channelId); + if (object.sequence != null) + if ($util.Long) + (message.sequence = $util.Long.fromValue(object.sequence)).unsigned = true; + else if (typeof object.sequence === "string") + message.sequence = parseInt(object.sequence, 10); + else if (typeof object.sequence === "number") + message.sequence = object.sequence; + else if (typeof object.sequence === "object") + message.sequence = new $util.LongBits(object.sequence.low >>> 0, object.sequence.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a QueryPacketAcknowledgementRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementRequest + * @static + * @param {ibc.core.channel.v1.QueryPacketAcknowledgementRequest} message QueryPacketAcknowledgementRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryPacketAcknowledgementRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.portId = ""; + object.channelId = ""; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.sequence = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.sequence = options.longs === String ? "0" : 0; + } + if (message.portId != null && message.hasOwnProperty("portId")) + object.portId = message.portId; + if (message.channelId != null && message.hasOwnProperty("channelId")) + object.channelId = message.channelId; + if (message.sequence != null && message.hasOwnProperty("sequence")) + if (typeof message.sequence === "number") + object.sequence = options.longs === String ? String(message.sequence) : message.sequence; + else + object.sequence = options.longs === String ? $util.Long.prototype.toString.call(message.sequence) : options.longs === Number ? new $util.LongBits(message.sequence.low >>> 0, message.sequence.high >>> 0).toNumber(true) : message.sequence; + return object; + }; + + /** + * Converts this QueryPacketAcknowledgementRequest to JSON. + * @function toJSON + * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementRequest + * @instance + * @returns {Object.} JSON object + */ + QueryPacketAcknowledgementRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryPacketAcknowledgementRequest; + })(v1.QueryPacketAcknowledgementRequest || {}); + + v1.QueryPacketAcknowledgementResponse = (function(QueryPacketAcknowledgementResponse) { + + /** + * Properties of a QueryPacketAcknowledgementResponse. + * @memberof ibc.core.channel.v1 + * @interface IQueryPacketAcknowledgementResponse + * @property {Uint8Array|null} [acknowledgement] QueryPacketAcknowledgementResponse acknowledgement + * @property {Uint8Array|null} [proof] QueryPacketAcknowledgementResponse proof + * @property {ibc.core.client.v1.IHeight|null} [proofHeight] QueryPacketAcknowledgementResponse proofHeight + */ + + /** + * Constructs a new QueryPacketAcknowledgementResponse. + * @memberof ibc.core.channel.v1 + * @classdesc Represents a QueryPacketAcknowledgementResponse. + * @implements IQueryPacketAcknowledgementResponse + * @constructor + * @param {ibc.core.channel.v1.IQueryPacketAcknowledgementResponse=} [properties] Properties to set + */ + function QueryPacketAcknowledgementResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryPacketAcknowledgementResponse acknowledgement. + * @member {Uint8Array} acknowledgement + * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementResponse + * @instance + */ + QueryPacketAcknowledgementResponse.prototype.acknowledgement = $util.newBuffer([]); + + /** + * QueryPacketAcknowledgementResponse proof. + * @member {Uint8Array} proof + * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementResponse + * @instance + */ + QueryPacketAcknowledgementResponse.prototype.proof = $util.newBuffer([]); + + /** + * QueryPacketAcknowledgementResponse proofHeight. + * @member {ibc.core.client.v1.IHeight|null|undefined} proofHeight + * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementResponse + * @instance + */ + QueryPacketAcknowledgementResponse.prototype.proofHeight = null; + + /** + * Creates a new QueryPacketAcknowledgementResponse instance using the specified properties. + * @function create + * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementResponse + * @static + * @param {ibc.core.channel.v1.IQueryPacketAcknowledgementResponse=} [properties] Properties to set + * @returns {ibc.core.channel.v1.QueryPacketAcknowledgementResponse} QueryPacketAcknowledgementResponse instance + */ + QueryPacketAcknowledgementResponse.create = function create(properties) { + return new QueryPacketAcknowledgementResponse(properties); + }; + + /** + * Encodes the specified QueryPacketAcknowledgementResponse message. Does not implicitly {@link ibc.core.channel.v1.QueryPacketAcknowledgementResponse.verify|verify} messages. + * @function encode + * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementResponse + * @static + * @param {ibc.core.channel.v1.IQueryPacketAcknowledgementResponse} message QueryPacketAcknowledgementResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryPacketAcknowledgementResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.acknowledgement != null && Object.hasOwnProperty.call(message, "acknowledgement")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.acknowledgement); + if (message.proof != null && Object.hasOwnProperty.call(message, "proof")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.proof); + if (message.proofHeight != null && Object.hasOwnProperty.call(message, "proofHeight")) + $root.ibc.core.client.v1.Height.encode(message.proofHeight, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryPacketAcknowledgementResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryPacketAcknowledgementResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementResponse + * @static + * @param {ibc.core.channel.v1.IQueryPacketAcknowledgementResponse} message QueryPacketAcknowledgementResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryPacketAcknowledgementResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryPacketAcknowledgementResponse message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.channel.v1.QueryPacketAcknowledgementResponse} QueryPacketAcknowledgementResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryPacketAcknowledgementResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.QueryPacketAcknowledgementResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.acknowledgement = reader.bytes(); + break; + case 2: + message.proof = reader.bytes(); + break; + case 3: + message.proofHeight = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryPacketAcknowledgementResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.channel.v1.QueryPacketAcknowledgementResponse} QueryPacketAcknowledgementResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryPacketAcknowledgementResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryPacketAcknowledgementResponse message. + * @function verify + * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryPacketAcknowledgementResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.acknowledgement != null && message.hasOwnProperty("acknowledgement")) + if (!(message.acknowledgement && typeof message.acknowledgement.length === "number" || $util.isString(message.acknowledgement))) + return "acknowledgement: buffer expected"; + if (message.proof != null && message.hasOwnProperty("proof")) + if (!(message.proof && typeof message.proof.length === "number" || $util.isString(message.proof))) + return "proof: buffer expected"; + if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) { + let error = $root.ibc.core.client.v1.Height.verify(message.proofHeight); + if (error) + return "proofHeight." + error; + } + return null; + }; + + /** + * Creates a QueryPacketAcknowledgementResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementResponse + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.channel.v1.QueryPacketAcknowledgementResponse} QueryPacketAcknowledgementResponse + */ + QueryPacketAcknowledgementResponse.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.channel.v1.QueryPacketAcknowledgementResponse) + return object; + let message = new $root.ibc.core.channel.v1.QueryPacketAcknowledgementResponse(); + if (object.acknowledgement != null) + if (typeof object.acknowledgement === "string") + $util.base64.decode(object.acknowledgement, message.acknowledgement = $util.newBuffer($util.base64.length(object.acknowledgement)), 0); + else if (object.acknowledgement.length) + message.acknowledgement = object.acknowledgement; + if (object.proof != null) + if (typeof object.proof === "string") + $util.base64.decode(object.proof, message.proof = $util.newBuffer($util.base64.length(object.proof)), 0); + else if (object.proof.length) + message.proof = object.proof; + if (object.proofHeight != null) { + if (typeof object.proofHeight !== "object") + throw TypeError(".ibc.core.channel.v1.QueryPacketAcknowledgementResponse.proofHeight: object expected"); + message.proofHeight = $root.ibc.core.client.v1.Height.fromObject(object.proofHeight); + } + return message; + }; + + /** + * Creates a plain object from a QueryPacketAcknowledgementResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementResponse + * @static + * @param {ibc.core.channel.v1.QueryPacketAcknowledgementResponse} message QueryPacketAcknowledgementResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryPacketAcknowledgementResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + if (options.bytes === String) + object.acknowledgement = ""; + else { + object.acknowledgement = []; + if (options.bytes !== Array) + object.acknowledgement = $util.newBuffer(object.acknowledgement); + } + if (options.bytes === String) + object.proof = ""; + else { + object.proof = []; + if (options.bytes !== Array) + object.proof = $util.newBuffer(object.proof); + } + object.proofHeight = null; + } + if (message.acknowledgement != null && message.hasOwnProperty("acknowledgement")) + object.acknowledgement = options.bytes === String ? $util.base64.encode(message.acknowledgement, 0, message.acknowledgement.length) : options.bytes === Array ? Array.prototype.slice.call(message.acknowledgement) : message.acknowledgement; + if (message.proof != null && message.hasOwnProperty("proof")) + object.proof = options.bytes === String ? $util.base64.encode(message.proof, 0, message.proof.length) : options.bytes === Array ? Array.prototype.slice.call(message.proof) : message.proof; + if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) + object.proofHeight = $root.ibc.core.client.v1.Height.toObject(message.proofHeight, options); + return object; + }; + + /** + * Converts this QueryPacketAcknowledgementResponse to JSON. + * @function toJSON + * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementResponse + * @instance + * @returns {Object.} JSON object + */ + QueryPacketAcknowledgementResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryPacketAcknowledgementResponse; + })(v1.QueryPacketAcknowledgementResponse || {}); + + v1.QueryPacketAcknowledgementsRequest = (function(QueryPacketAcknowledgementsRequest) { + + /** + * Properties of a QueryPacketAcknowledgementsRequest. + * @memberof ibc.core.channel.v1 + * @interface IQueryPacketAcknowledgementsRequest + * @property {string|null} [portId] QueryPacketAcknowledgementsRequest portId + * @property {string|null} [channelId] QueryPacketAcknowledgementsRequest channelId + * @property {cosmos.base.query.v1beta1.IPageRequest|null} [pagination] QueryPacketAcknowledgementsRequest pagination + */ + + /** + * Constructs a new QueryPacketAcknowledgementsRequest. + * @memberof ibc.core.channel.v1 + * @classdesc Represents a QueryPacketAcknowledgementsRequest. + * @implements IQueryPacketAcknowledgementsRequest + * @constructor + * @param {ibc.core.channel.v1.IQueryPacketAcknowledgementsRequest=} [properties] Properties to set + */ + function QueryPacketAcknowledgementsRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryPacketAcknowledgementsRequest portId. + * @member {string} portId + * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementsRequest + * @instance + */ + QueryPacketAcknowledgementsRequest.prototype.portId = ""; + + /** + * QueryPacketAcknowledgementsRequest channelId. + * @member {string} channelId + * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementsRequest + * @instance + */ + QueryPacketAcknowledgementsRequest.prototype.channelId = ""; + + /** + * QueryPacketAcknowledgementsRequest pagination. + * @member {cosmos.base.query.v1beta1.IPageRequest|null|undefined} pagination + * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementsRequest + * @instance + */ + QueryPacketAcknowledgementsRequest.prototype.pagination = null; + + /** + * Creates a new QueryPacketAcknowledgementsRequest instance using the specified properties. + * @function create + * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementsRequest + * @static + * @param {ibc.core.channel.v1.IQueryPacketAcknowledgementsRequest=} [properties] Properties to set + * @returns {ibc.core.channel.v1.QueryPacketAcknowledgementsRequest} QueryPacketAcknowledgementsRequest instance + */ + QueryPacketAcknowledgementsRequest.create = function create(properties) { + return new QueryPacketAcknowledgementsRequest(properties); + }; + + /** + * Encodes the specified QueryPacketAcknowledgementsRequest message. Does not implicitly {@link ibc.core.channel.v1.QueryPacketAcknowledgementsRequest.verify|verify} messages. + * @function encode + * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementsRequest + * @static + * @param {ibc.core.channel.v1.IQueryPacketAcknowledgementsRequest} message QueryPacketAcknowledgementsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryPacketAcknowledgementsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.portId != null && Object.hasOwnProperty.call(message, "portId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.portId); + if (message.channelId != null && Object.hasOwnProperty.call(message, "channelId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.channelId); + if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) + $root.cosmos.base.query.v1beta1.PageRequest.encode(message.pagination, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryPacketAcknowledgementsRequest message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryPacketAcknowledgementsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementsRequest + * @static + * @param {ibc.core.channel.v1.IQueryPacketAcknowledgementsRequest} message QueryPacketAcknowledgementsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryPacketAcknowledgementsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryPacketAcknowledgementsRequest message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.channel.v1.QueryPacketAcknowledgementsRequest} QueryPacketAcknowledgementsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryPacketAcknowledgementsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.portId = reader.string(); + break; + case 2: + message.channelId = reader.string(); + break; + case 3: + message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryPacketAcknowledgementsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.channel.v1.QueryPacketAcknowledgementsRequest} QueryPacketAcknowledgementsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryPacketAcknowledgementsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryPacketAcknowledgementsRequest message. + * @function verify + * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryPacketAcknowledgementsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.portId != null && message.hasOwnProperty("portId")) + if (!$util.isString(message.portId)) + return "portId: string expected"; + if (message.channelId != null && message.hasOwnProperty("channelId")) + if (!$util.isString(message.channelId)) + return "channelId: string expected"; + if (message.pagination != null && message.hasOwnProperty("pagination")) { + let error = $root.cosmos.base.query.v1beta1.PageRequest.verify(message.pagination); + if (error) + return "pagination." + error; + } + return null; + }; + + /** + * Creates a QueryPacketAcknowledgementsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementsRequest + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.channel.v1.QueryPacketAcknowledgementsRequest} QueryPacketAcknowledgementsRequest + */ + QueryPacketAcknowledgementsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest) + return object; + let message = new $root.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest(); + if (object.portId != null) + message.portId = String(object.portId); + if (object.channelId != null) + message.channelId = String(object.channelId); + if (object.pagination != null) { + if (typeof object.pagination !== "object") + throw TypeError(".ibc.core.channel.v1.QueryPacketAcknowledgementsRequest.pagination: object expected"); + message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.fromObject(object.pagination); + } + return message; + }; + + /** + * Creates a plain object from a QueryPacketAcknowledgementsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementsRequest + * @static + * @param {ibc.core.channel.v1.QueryPacketAcknowledgementsRequest} message QueryPacketAcknowledgementsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryPacketAcknowledgementsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.portId = ""; + object.channelId = ""; + object.pagination = null; + } + if (message.portId != null && message.hasOwnProperty("portId")) + object.portId = message.portId; + if (message.channelId != null && message.hasOwnProperty("channelId")) + object.channelId = message.channelId; + if (message.pagination != null && message.hasOwnProperty("pagination")) + object.pagination = $root.cosmos.base.query.v1beta1.PageRequest.toObject(message.pagination, options); + return object; + }; + + /** + * Converts this QueryPacketAcknowledgementsRequest to JSON. + * @function toJSON + * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementsRequest + * @instance + * @returns {Object.} JSON object + */ + QueryPacketAcknowledgementsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryPacketAcknowledgementsRequest; + })(v1.QueryPacketAcknowledgementsRequest || {}); + + v1.QueryPacketAcknowledgementsResponse = (function(QueryPacketAcknowledgementsResponse) { + + /** + * Properties of a QueryPacketAcknowledgementsResponse. + * @memberof ibc.core.channel.v1 + * @interface IQueryPacketAcknowledgementsResponse + * @property {Array.|null} [acknowledgements] QueryPacketAcknowledgementsResponse acknowledgements + * @property {cosmos.base.query.v1beta1.IPageResponse|null} [pagination] QueryPacketAcknowledgementsResponse pagination + * @property {ibc.core.client.v1.IHeight|null} [height] QueryPacketAcknowledgementsResponse height + */ + + /** + * Constructs a new QueryPacketAcknowledgementsResponse. + * @memberof ibc.core.channel.v1 + * @classdesc Represents a QueryPacketAcknowledgementsResponse. + * @implements IQueryPacketAcknowledgementsResponse + * @constructor + * @param {ibc.core.channel.v1.IQueryPacketAcknowledgementsResponse=} [properties] Properties to set + */ + function QueryPacketAcknowledgementsResponse(properties) { + this.acknowledgements = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryPacketAcknowledgementsResponse acknowledgements. + * @member {Array.} acknowledgements + * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementsResponse + * @instance + */ + QueryPacketAcknowledgementsResponse.prototype.acknowledgements = $util.emptyArray; + + /** + * QueryPacketAcknowledgementsResponse pagination. + * @member {cosmos.base.query.v1beta1.IPageResponse|null|undefined} pagination + * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementsResponse + * @instance + */ + QueryPacketAcknowledgementsResponse.prototype.pagination = null; + + /** + * QueryPacketAcknowledgementsResponse height. + * @member {ibc.core.client.v1.IHeight|null|undefined} height + * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementsResponse + * @instance + */ + QueryPacketAcknowledgementsResponse.prototype.height = null; + + /** + * Creates a new QueryPacketAcknowledgementsResponse instance using the specified properties. + * @function create + * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementsResponse + * @static + * @param {ibc.core.channel.v1.IQueryPacketAcknowledgementsResponse=} [properties] Properties to set + * @returns {ibc.core.channel.v1.QueryPacketAcknowledgementsResponse} QueryPacketAcknowledgementsResponse instance + */ + QueryPacketAcknowledgementsResponse.create = function create(properties) { + return new QueryPacketAcknowledgementsResponse(properties); + }; + + /** + * Encodes the specified QueryPacketAcknowledgementsResponse message. Does not implicitly {@link ibc.core.channel.v1.QueryPacketAcknowledgementsResponse.verify|verify} messages. + * @function encode + * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementsResponse + * @static + * @param {ibc.core.channel.v1.IQueryPacketAcknowledgementsResponse} message QueryPacketAcknowledgementsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryPacketAcknowledgementsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.acknowledgements != null && message.acknowledgements.length) + for (let i = 0; i < message.acknowledgements.length; ++i) + $root.ibc.core.channel.v1.PacketState.encode(message.acknowledgements[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) + $root.cosmos.base.query.v1beta1.PageResponse.encode(message.pagination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.height != null && Object.hasOwnProperty.call(message, "height")) + $root.ibc.core.client.v1.Height.encode(message.height, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryPacketAcknowledgementsResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryPacketAcknowledgementsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementsResponse + * @static + * @param {ibc.core.channel.v1.IQueryPacketAcknowledgementsResponse} message QueryPacketAcknowledgementsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryPacketAcknowledgementsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryPacketAcknowledgementsResponse message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.channel.v1.QueryPacketAcknowledgementsResponse} QueryPacketAcknowledgementsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryPacketAcknowledgementsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.acknowledgements && message.acknowledgements.length)) + message.acknowledgements = []; + message.acknowledgements.push($root.ibc.core.channel.v1.PacketState.decode(reader, reader.uint32())); + break; + case 2: + message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.decode(reader, reader.uint32()); + break; + case 3: + message.height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryPacketAcknowledgementsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.channel.v1.QueryPacketAcknowledgementsResponse} QueryPacketAcknowledgementsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryPacketAcknowledgementsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryPacketAcknowledgementsResponse message. + * @function verify + * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryPacketAcknowledgementsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.acknowledgements != null && message.hasOwnProperty("acknowledgements")) { + if (!Array.isArray(message.acknowledgements)) + return "acknowledgements: array expected"; + for (let i = 0; i < message.acknowledgements.length; ++i) { + let error = $root.ibc.core.channel.v1.PacketState.verify(message.acknowledgements[i]); + if (error) + return "acknowledgements." + error; + } + } + if (message.pagination != null && message.hasOwnProperty("pagination")) { + let error = $root.cosmos.base.query.v1beta1.PageResponse.verify(message.pagination); + if (error) + return "pagination." + error; + } + if (message.height != null && message.hasOwnProperty("height")) { + let error = $root.ibc.core.client.v1.Height.verify(message.height); + if (error) + return "height." + error; + } + return null; + }; + + /** + * Creates a QueryPacketAcknowledgementsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementsResponse + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.channel.v1.QueryPacketAcknowledgementsResponse} QueryPacketAcknowledgementsResponse + */ + QueryPacketAcknowledgementsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse) + return object; + let message = new $root.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse(); + if (object.acknowledgements) { + if (!Array.isArray(object.acknowledgements)) + throw TypeError(".ibc.core.channel.v1.QueryPacketAcknowledgementsResponse.acknowledgements: array expected"); + message.acknowledgements = []; + for (let i = 0; i < object.acknowledgements.length; ++i) { + if (typeof object.acknowledgements[i] !== "object") + throw TypeError(".ibc.core.channel.v1.QueryPacketAcknowledgementsResponse.acknowledgements: object expected"); + message.acknowledgements[i] = $root.ibc.core.channel.v1.PacketState.fromObject(object.acknowledgements[i]); + } + } + if (object.pagination != null) { + if (typeof object.pagination !== "object") + throw TypeError(".ibc.core.channel.v1.QueryPacketAcknowledgementsResponse.pagination: object expected"); + message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.fromObject(object.pagination); + } + if (object.height != null) { + if (typeof object.height !== "object") + throw TypeError(".ibc.core.channel.v1.QueryPacketAcknowledgementsResponse.height: object expected"); + message.height = $root.ibc.core.client.v1.Height.fromObject(object.height); + } + return message; + }; + + /** + * Creates a plain object from a QueryPacketAcknowledgementsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementsResponse + * @static + * @param {ibc.core.channel.v1.QueryPacketAcknowledgementsResponse} message QueryPacketAcknowledgementsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryPacketAcknowledgementsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.acknowledgements = []; + if (options.defaults) { + object.pagination = null; + object.height = null; + } + if (message.acknowledgements && message.acknowledgements.length) { + object.acknowledgements = []; + for (let j = 0; j < message.acknowledgements.length; ++j) + object.acknowledgements[j] = $root.ibc.core.channel.v1.PacketState.toObject(message.acknowledgements[j], options); + } + if (message.pagination != null && message.hasOwnProperty("pagination")) + object.pagination = $root.cosmos.base.query.v1beta1.PageResponse.toObject(message.pagination, options); + if (message.height != null && message.hasOwnProperty("height")) + object.height = $root.ibc.core.client.v1.Height.toObject(message.height, options); + return object; + }; + + /** + * Converts this QueryPacketAcknowledgementsResponse to JSON. + * @function toJSON + * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementsResponse + * @instance + * @returns {Object.} JSON object + */ + QueryPacketAcknowledgementsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryPacketAcknowledgementsResponse; + })(v1.QueryPacketAcknowledgementsResponse || {}); + + v1.QueryUnreceivedPacketsRequest = (function(QueryUnreceivedPacketsRequest) { + + /** + * Properties of a QueryUnreceivedPacketsRequest. + * @memberof ibc.core.channel.v1 + * @interface IQueryUnreceivedPacketsRequest + * @property {string|null} [portId] QueryUnreceivedPacketsRequest portId + * @property {string|null} [channelId] QueryUnreceivedPacketsRequest channelId + * @property {Array.|null} [packetCommitmentSequences] QueryUnreceivedPacketsRequest packetCommitmentSequences + */ + + /** + * Constructs a new QueryUnreceivedPacketsRequest. + * @memberof ibc.core.channel.v1 + * @classdesc Represents a QueryUnreceivedPacketsRequest. + * @implements IQueryUnreceivedPacketsRequest + * @constructor + * @param {ibc.core.channel.v1.IQueryUnreceivedPacketsRequest=} [properties] Properties to set + */ + function QueryUnreceivedPacketsRequest(properties) { + this.packetCommitmentSequences = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryUnreceivedPacketsRequest portId. + * @member {string} portId + * @memberof ibc.core.channel.v1.QueryUnreceivedPacketsRequest + * @instance + */ + QueryUnreceivedPacketsRequest.prototype.portId = ""; + + /** + * QueryUnreceivedPacketsRequest channelId. + * @member {string} channelId + * @memberof ibc.core.channel.v1.QueryUnreceivedPacketsRequest + * @instance + */ + QueryUnreceivedPacketsRequest.prototype.channelId = ""; + + /** + * QueryUnreceivedPacketsRequest packetCommitmentSequences. + * @member {Array.} packetCommitmentSequences + * @memberof ibc.core.channel.v1.QueryUnreceivedPacketsRequest + * @instance + */ + QueryUnreceivedPacketsRequest.prototype.packetCommitmentSequences = $util.emptyArray; + + /** + * Creates a new QueryUnreceivedPacketsRequest instance using the specified properties. + * @function create + * @memberof ibc.core.channel.v1.QueryUnreceivedPacketsRequest + * @static + * @param {ibc.core.channel.v1.IQueryUnreceivedPacketsRequest=} [properties] Properties to set + * @returns {ibc.core.channel.v1.QueryUnreceivedPacketsRequest} QueryUnreceivedPacketsRequest instance + */ + QueryUnreceivedPacketsRequest.create = function create(properties) { + return new QueryUnreceivedPacketsRequest(properties); + }; + + /** + * Encodes the specified QueryUnreceivedPacketsRequest message. Does not implicitly {@link ibc.core.channel.v1.QueryUnreceivedPacketsRequest.verify|verify} messages. + * @function encode + * @memberof ibc.core.channel.v1.QueryUnreceivedPacketsRequest + * @static + * @param {ibc.core.channel.v1.IQueryUnreceivedPacketsRequest} message QueryUnreceivedPacketsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryUnreceivedPacketsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.portId != null && Object.hasOwnProperty.call(message, "portId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.portId); + if (message.channelId != null && Object.hasOwnProperty.call(message, "channelId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.channelId); + if (message.packetCommitmentSequences != null && message.packetCommitmentSequences.length) { + writer.uint32(/* id 3, wireType 2 =*/26).fork(); + for (let i = 0; i < message.packetCommitmentSequences.length; ++i) + writer.uint64(message.packetCommitmentSequences[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified QueryUnreceivedPacketsRequest message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryUnreceivedPacketsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.channel.v1.QueryUnreceivedPacketsRequest + * @static + * @param {ibc.core.channel.v1.IQueryUnreceivedPacketsRequest} message QueryUnreceivedPacketsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryUnreceivedPacketsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryUnreceivedPacketsRequest message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.channel.v1.QueryUnreceivedPacketsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.channel.v1.QueryUnreceivedPacketsRequest} QueryUnreceivedPacketsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryUnreceivedPacketsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.QueryUnreceivedPacketsRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.portId = reader.string(); + break; + case 2: + message.channelId = reader.string(); + break; + case 3: + if (!(message.packetCommitmentSequences && message.packetCommitmentSequences.length)) + message.packetCommitmentSequences = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.packetCommitmentSequences.push(reader.uint64()); + } else + message.packetCommitmentSequences.push(reader.uint64()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryUnreceivedPacketsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.channel.v1.QueryUnreceivedPacketsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.channel.v1.QueryUnreceivedPacketsRequest} QueryUnreceivedPacketsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryUnreceivedPacketsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryUnreceivedPacketsRequest message. + * @function verify + * @memberof ibc.core.channel.v1.QueryUnreceivedPacketsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryUnreceivedPacketsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.portId != null && message.hasOwnProperty("portId")) + if (!$util.isString(message.portId)) + return "portId: string expected"; + if (message.channelId != null && message.hasOwnProperty("channelId")) + if (!$util.isString(message.channelId)) + return "channelId: string expected"; + if (message.packetCommitmentSequences != null && message.hasOwnProperty("packetCommitmentSequences")) { + if (!Array.isArray(message.packetCommitmentSequences)) + return "packetCommitmentSequences: array expected"; + for (let i = 0; i < message.packetCommitmentSequences.length; ++i) + if (!$util.isInteger(message.packetCommitmentSequences[i]) && !(message.packetCommitmentSequences[i] && $util.isInteger(message.packetCommitmentSequences[i].low) && $util.isInteger(message.packetCommitmentSequences[i].high))) + return "packetCommitmentSequences: integer|Long[] expected"; + } + return null; + }; + + /** + * Creates a QueryUnreceivedPacketsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.channel.v1.QueryUnreceivedPacketsRequest + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.channel.v1.QueryUnreceivedPacketsRequest} QueryUnreceivedPacketsRequest + */ + QueryUnreceivedPacketsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.channel.v1.QueryUnreceivedPacketsRequest) + return object; + let message = new $root.ibc.core.channel.v1.QueryUnreceivedPacketsRequest(); + if (object.portId != null) + message.portId = String(object.portId); + if (object.channelId != null) + message.channelId = String(object.channelId); + if (object.packetCommitmentSequences) { + if (!Array.isArray(object.packetCommitmentSequences)) + throw TypeError(".ibc.core.channel.v1.QueryUnreceivedPacketsRequest.packetCommitmentSequences: array expected"); + message.packetCommitmentSequences = []; + for (let i = 0; i < object.packetCommitmentSequences.length; ++i) + if ($util.Long) + (message.packetCommitmentSequences[i] = $util.Long.fromValue(object.packetCommitmentSequences[i])).unsigned = true; + else if (typeof object.packetCommitmentSequences[i] === "string") + message.packetCommitmentSequences[i] = parseInt(object.packetCommitmentSequences[i], 10); + else if (typeof object.packetCommitmentSequences[i] === "number") + message.packetCommitmentSequences[i] = object.packetCommitmentSequences[i]; + else if (typeof object.packetCommitmentSequences[i] === "object") + message.packetCommitmentSequences[i] = new $util.LongBits(object.packetCommitmentSequences[i].low >>> 0, object.packetCommitmentSequences[i].high >>> 0).toNumber(true); + } + return message; + }; + + /** + * Creates a plain object from a QueryUnreceivedPacketsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.channel.v1.QueryUnreceivedPacketsRequest + * @static + * @param {ibc.core.channel.v1.QueryUnreceivedPacketsRequest} message QueryUnreceivedPacketsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryUnreceivedPacketsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.packetCommitmentSequences = []; + if (options.defaults) { + object.portId = ""; + object.channelId = ""; + } + if (message.portId != null && message.hasOwnProperty("portId")) + object.portId = message.portId; + if (message.channelId != null && message.hasOwnProperty("channelId")) + object.channelId = message.channelId; + if (message.packetCommitmentSequences && message.packetCommitmentSequences.length) { + object.packetCommitmentSequences = []; + for (let j = 0; j < message.packetCommitmentSequences.length; ++j) + if (typeof message.packetCommitmentSequences[j] === "number") + object.packetCommitmentSequences[j] = options.longs === String ? String(message.packetCommitmentSequences[j]) : message.packetCommitmentSequences[j]; + else + object.packetCommitmentSequences[j] = options.longs === String ? $util.Long.prototype.toString.call(message.packetCommitmentSequences[j]) : options.longs === Number ? new $util.LongBits(message.packetCommitmentSequences[j].low >>> 0, message.packetCommitmentSequences[j].high >>> 0).toNumber(true) : message.packetCommitmentSequences[j]; + } + return object; + }; + + /** + * Converts this QueryUnreceivedPacketsRequest to JSON. + * @function toJSON + * @memberof ibc.core.channel.v1.QueryUnreceivedPacketsRequest + * @instance + * @returns {Object.} JSON object + */ + QueryUnreceivedPacketsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryUnreceivedPacketsRequest; + })(v1.QueryUnreceivedPacketsRequest || {}); + + v1.QueryUnreceivedPacketsResponse = (function(QueryUnreceivedPacketsResponse) { + + /** + * Properties of a QueryUnreceivedPacketsResponse. + * @memberof ibc.core.channel.v1 + * @interface IQueryUnreceivedPacketsResponse + * @property {Array.|null} [sequences] QueryUnreceivedPacketsResponse sequences + * @property {ibc.core.client.v1.IHeight|null} [height] QueryUnreceivedPacketsResponse height + */ + + /** + * Constructs a new QueryUnreceivedPacketsResponse. + * @memberof ibc.core.channel.v1 + * @classdesc Represents a QueryUnreceivedPacketsResponse. + * @implements IQueryUnreceivedPacketsResponse + * @constructor + * @param {ibc.core.channel.v1.IQueryUnreceivedPacketsResponse=} [properties] Properties to set + */ + function QueryUnreceivedPacketsResponse(properties) { + this.sequences = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryUnreceivedPacketsResponse sequences. + * @member {Array.} sequences + * @memberof ibc.core.channel.v1.QueryUnreceivedPacketsResponse + * @instance + */ + QueryUnreceivedPacketsResponse.prototype.sequences = $util.emptyArray; + + /** + * QueryUnreceivedPacketsResponse height. + * @member {ibc.core.client.v1.IHeight|null|undefined} height + * @memberof ibc.core.channel.v1.QueryUnreceivedPacketsResponse + * @instance + */ + QueryUnreceivedPacketsResponse.prototype.height = null; + + /** + * Creates a new QueryUnreceivedPacketsResponse instance using the specified properties. + * @function create + * @memberof ibc.core.channel.v1.QueryUnreceivedPacketsResponse + * @static + * @param {ibc.core.channel.v1.IQueryUnreceivedPacketsResponse=} [properties] Properties to set + * @returns {ibc.core.channel.v1.QueryUnreceivedPacketsResponse} QueryUnreceivedPacketsResponse instance + */ + QueryUnreceivedPacketsResponse.create = function create(properties) { + return new QueryUnreceivedPacketsResponse(properties); + }; + + /** + * Encodes the specified QueryUnreceivedPacketsResponse message. Does not implicitly {@link ibc.core.channel.v1.QueryUnreceivedPacketsResponse.verify|verify} messages. + * @function encode + * @memberof ibc.core.channel.v1.QueryUnreceivedPacketsResponse + * @static + * @param {ibc.core.channel.v1.IQueryUnreceivedPacketsResponse} message QueryUnreceivedPacketsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryUnreceivedPacketsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sequences != null && message.sequences.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (let i = 0; i < message.sequences.length; ++i) + writer.uint64(message.sequences[i]); + writer.ldelim(); + } + if (message.height != null && Object.hasOwnProperty.call(message, "height")) + $root.ibc.core.client.v1.Height.encode(message.height, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryUnreceivedPacketsResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryUnreceivedPacketsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.channel.v1.QueryUnreceivedPacketsResponse + * @static + * @param {ibc.core.channel.v1.IQueryUnreceivedPacketsResponse} message QueryUnreceivedPacketsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryUnreceivedPacketsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryUnreceivedPacketsResponse message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.channel.v1.QueryUnreceivedPacketsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.channel.v1.QueryUnreceivedPacketsResponse} QueryUnreceivedPacketsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryUnreceivedPacketsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.QueryUnreceivedPacketsResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.sequences && message.sequences.length)) + message.sequences = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.sequences.push(reader.uint64()); + } else + message.sequences.push(reader.uint64()); + break; + case 2: + message.height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryUnreceivedPacketsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.channel.v1.QueryUnreceivedPacketsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.channel.v1.QueryUnreceivedPacketsResponse} QueryUnreceivedPacketsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryUnreceivedPacketsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryUnreceivedPacketsResponse message. + * @function verify + * @memberof ibc.core.channel.v1.QueryUnreceivedPacketsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryUnreceivedPacketsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sequences != null && message.hasOwnProperty("sequences")) { + if (!Array.isArray(message.sequences)) + return "sequences: array expected"; + for (let i = 0; i < message.sequences.length; ++i) + if (!$util.isInteger(message.sequences[i]) && !(message.sequences[i] && $util.isInteger(message.sequences[i].low) && $util.isInteger(message.sequences[i].high))) + return "sequences: integer|Long[] expected"; + } + if (message.height != null && message.hasOwnProperty("height")) { + let error = $root.ibc.core.client.v1.Height.verify(message.height); + if (error) + return "height." + error; + } + return null; + }; + + /** + * Creates a QueryUnreceivedPacketsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.channel.v1.QueryUnreceivedPacketsResponse + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.channel.v1.QueryUnreceivedPacketsResponse} QueryUnreceivedPacketsResponse + */ + QueryUnreceivedPacketsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.channel.v1.QueryUnreceivedPacketsResponse) + return object; + let message = new $root.ibc.core.channel.v1.QueryUnreceivedPacketsResponse(); + if (object.sequences) { + if (!Array.isArray(object.sequences)) + throw TypeError(".ibc.core.channel.v1.QueryUnreceivedPacketsResponse.sequences: array expected"); + message.sequences = []; + for (let i = 0; i < object.sequences.length; ++i) + if ($util.Long) + (message.sequences[i] = $util.Long.fromValue(object.sequences[i])).unsigned = true; + else if (typeof object.sequences[i] === "string") + message.sequences[i] = parseInt(object.sequences[i], 10); + else if (typeof object.sequences[i] === "number") + message.sequences[i] = object.sequences[i]; + else if (typeof object.sequences[i] === "object") + message.sequences[i] = new $util.LongBits(object.sequences[i].low >>> 0, object.sequences[i].high >>> 0).toNumber(true); + } + if (object.height != null) { + if (typeof object.height !== "object") + throw TypeError(".ibc.core.channel.v1.QueryUnreceivedPacketsResponse.height: object expected"); + message.height = $root.ibc.core.client.v1.Height.fromObject(object.height); + } + return message; + }; + + /** + * Creates a plain object from a QueryUnreceivedPacketsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.channel.v1.QueryUnreceivedPacketsResponse + * @static + * @param {ibc.core.channel.v1.QueryUnreceivedPacketsResponse} message QueryUnreceivedPacketsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryUnreceivedPacketsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.sequences = []; + if (options.defaults) + object.height = null; + if (message.sequences && message.sequences.length) { + object.sequences = []; + for (let j = 0; j < message.sequences.length; ++j) + if (typeof message.sequences[j] === "number") + object.sequences[j] = options.longs === String ? String(message.sequences[j]) : message.sequences[j]; + else + object.sequences[j] = options.longs === String ? $util.Long.prototype.toString.call(message.sequences[j]) : options.longs === Number ? new $util.LongBits(message.sequences[j].low >>> 0, message.sequences[j].high >>> 0).toNumber(true) : message.sequences[j]; + } + if (message.height != null && message.hasOwnProperty("height")) + object.height = $root.ibc.core.client.v1.Height.toObject(message.height, options); + return object; + }; + + /** + * Converts this QueryUnreceivedPacketsResponse to JSON. + * @function toJSON + * @memberof ibc.core.channel.v1.QueryUnreceivedPacketsResponse + * @instance + * @returns {Object.} JSON object + */ + QueryUnreceivedPacketsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryUnreceivedPacketsResponse; + })(v1.QueryUnreceivedPacketsResponse || {}); + + v1.QueryUnreceivedAcksRequest = (function(QueryUnreceivedAcksRequest) { + + /** + * Properties of a QueryUnreceivedAcksRequest. + * @memberof ibc.core.channel.v1 + * @interface IQueryUnreceivedAcksRequest + * @property {string|null} [portId] QueryUnreceivedAcksRequest portId + * @property {string|null} [channelId] QueryUnreceivedAcksRequest channelId + * @property {Array.|null} [packetAckSequences] QueryUnreceivedAcksRequest packetAckSequences + */ + + /** + * Constructs a new QueryUnreceivedAcksRequest. + * @memberof ibc.core.channel.v1 + * @classdesc Represents a QueryUnreceivedAcksRequest. + * @implements IQueryUnreceivedAcksRequest + * @constructor + * @param {ibc.core.channel.v1.IQueryUnreceivedAcksRequest=} [properties] Properties to set + */ + function QueryUnreceivedAcksRequest(properties) { + this.packetAckSequences = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryUnreceivedAcksRequest portId. + * @member {string} portId + * @memberof ibc.core.channel.v1.QueryUnreceivedAcksRequest + * @instance + */ + QueryUnreceivedAcksRequest.prototype.portId = ""; + + /** + * QueryUnreceivedAcksRequest channelId. + * @member {string} channelId + * @memberof ibc.core.channel.v1.QueryUnreceivedAcksRequest + * @instance + */ + QueryUnreceivedAcksRequest.prototype.channelId = ""; + + /** + * QueryUnreceivedAcksRequest packetAckSequences. + * @member {Array.} packetAckSequences + * @memberof ibc.core.channel.v1.QueryUnreceivedAcksRequest + * @instance + */ + QueryUnreceivedAcksRequest.prototype.packetAckSequences = $util.emptyArray; + + /** + * Creates a new QueryUnreceivedAcksRequest instance using the specified properties. + * @function create + * @memberof ibc.core.channel.v1.QueryUnreceivedAcksRequest + * @static + * @param {ibc.core.channel.v1.IQueryUnreceivedAcksRequest=} [properties] Properties to set + * @returns {ibc.core.channel.v1.QueryUnreceivedAcksRequest} QueryUnreceivedAcksRequest instance + */ + QueryUnreceivedAcksRequest.create = function create(properties) { + return new QueryUnreceivedAcksRequest(properties); + }; + + /** + * Encodes the specified QueryUnreceivedAcksRequest message. Does not implicitly {@link ibc.core.channel.v1.QueryUnreceivedAcksRequest.verify|verify} messages. + * @function encode + * @memberof ibc.core.channel.v1.QueryUnreceivedAcksRequest + * @static + * @param {ibc.core.channel.v1.IQueryUnreceivedAcksRequest} message QueryUnreceivedAcksRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryUnreceivedAcksRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.portId != null && Object.hasOwnProperty.call(message, "portId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.portId); + if (message.channelId != null && Object.hasOwnProperty.call(message, "channelId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.channelId); + if (message.packetAckSequences != null && message.packetAckSequences.length) { + writer.uint32(/* id 3, wireType 2 =*/26).fork(); + for (let i = 0; i < message.packetAckSequences.length; ++i) + writer.uint64(message.packetAckSequences[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified QueryUnreceivedAcksRequest message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryUnreceivedAcksRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.channel.v1.QueryUnreceivedAcksRequest + * @static + * @param {ibc.core.channel.v1.IQueryUnreceivedAcksRequest} message QueryUnreceivedAcksRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryUnreceivedAcksRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryUnreceivedAcksRequest message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.channel.v1.QueryUnreceivedAcksRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.channel.v1.QueryUnreceivedAcksRequest} QueryUnreceivedAcksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryUnreceivedAcksRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.QueryUnreceivedAcksRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.portId = reader.string(); + break; + case 2: + message.channelId = reader.string(); + break; + case 3: + if (!(message.packetAckSequences && message.packetAckSequences.length)) + message.packetAckSequences = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.packetAckSequences.push(reader.uint64()); + } else + message.packetAckSequences.push(reader.uint64()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryUnreceivedAcksRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.channel.v1.QueryUnreceivedAcksRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.channel.v1.QueryUnreceivedAcksRequest} QueryUnreceivedAcksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryUnreceivedAcksRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryUnreceivedAcksRequest message. + * @function verify + * @memberof ibc.core.channel.v1.QueryUnreceivedAcksRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryUnreceivedAcksRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.portId != null && message.hasOwnProperty("portId")) + if (!$util.isString(message.portId)) + return "portId: string expected"; + if (message.channelId != null && message.hasOwnProperty("channelId")) + if (!$util.isString(message.channelId)) + return "channelId: string expected"; + if (message.packetAckSequences != null && message.hasOwnProperty("packetAckSequences")) { + if (!Array.isArray(message.packetAckSequences)) + return "packetAckSequences: array expected"; + for (let i = 0; i < message.packetAckSequences.length; ++i) + if (!$util.isInteger(message.packetAckSequences[i]) && !(message.packetAckSequences[i] && $util.isInteger(message.packetAckSequences[i].low) && $util.isInteger(message.packetAckSequences[i].high))) + return "packetAckSequences: integer|Long[] expected"; + } + return null; + }; + + /** + * Creates a QueryUnreceivedAcksRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.channel.v1.QueryUnreceivedAcksRequest + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.channel.v1.QueryUnreceivedAcksRequest} QueryUnreceivedAcksRequest + */ + QueryUnreceivedAcksRequest.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.channel.v1.QueryUnreceivedAcksRequest) + return object; + let message = new $root.ibc.core.channel.v1.QueryUnreceivedAcksRequest(); + if (object.portId != null) + message.portId = String(object.portId); + if (object.channelId != null) + message.channelId = String(object.channelId); + if (object.packetAckSequences) { + if (!Array.isArray(object.packetAckSequences)) + throw TypeError(".ibc.core.channel.v1.QueryUnreceivedAcksRequest.packetAckSequences: array expected"); + message.packetAckSequences = []; + for (let i = 0; i < object.packetAckSequences.length; ++i) + if ($util.Long) + (message.packetAckSequences[i] = $util.Long.fromValue(object.packetAckSequences[i])).unsigned = true; + else if (typeof object.packetAckSequences[i] === "string") + message.packetAckSequences[i] = parseInt(object.packetAckSequences[i], 10); + else if (typeof object.packetAckSequences[i] === "number") + message.packetAckSequences[i] = object.packetAckSequences[i]; + else if (typeof object.packetAckSequences[i] === "object") + message.packetAckSequences[i] = new $util.LongBits(object.packetAckSequences[i].low >>> 0, object.packetAckSequences[i].high >>> 0).toNumber(true); + } + return message; + }; + + /** + * Creates a plain object from a QueryUnreceivedAcksRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.channel.v1.QueryUnreceivedAcksRequest + * @static + * @param {ibc.core.channel.v1.QueryUnreceivedAcksRequest} message QueryUnreceivedAcksRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryUnreceivedAcksRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.packetAckSequences = []; + if (options.defaults) { + object.portId = ""; + object.channelId = ""; + } + if (message.portId != null && message.hasOwnProperty("portId")) + object.portId = message.portId; + if (message.channelId != null && message.hasOwnProperty("channelId")) + object.channelId = message.channelId; + if (message.packetAckSequences && message.packetAckSequences.length) { + object.packetAckSequences = []; + for (let j = 0; j < message.packetAckSequences.length; ++j) + if (typeof message.packetAckSequences[j] === "number") + object.packetAckSequences[j] = options.longs === String ? String(message.packetAckSequences[j]) : message.packetAckSequences[j]; + else + object.packetAckSequences[j] = options.longs === String ? $util.Long.prototype.toString.call(message.packetAckSequences[j]) : options.longs === Number ? new $util.LongBits(message.packetAckSequences[j].low >>> 0, message.packetAckSequences[j].high >>> 0).toNumber(true) : message.packetAckSequences[j]; + } + return object; + }; + + /** + * Converts this QueryUnreceivedAcksRequest to JSON. + * @function toJSON + * @memberof ibc.core.channel.v1.QueryUnreceivedAcksRequest + * @instance + * @returns {Object.} JSON object + */ + QueryUnreceivedAcksRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryUnreceivedAcksRequest; + })(v1.QueryUnreceivedAcksRequest || {}); + + v1.QueryUnreceivedAcksResponse = (function(QueryUnreceivedAcksResponse) { + + /** + * Properties of a QueryUnreceivedAcksResponse. + * @memberof ibc.core.channel.v1 + * @interface IQueryUnreceivedAcksResponse + * @property {Array.|null} [sequences] QueryUnreceivedAcksResponse sequences + * @property {ibc.core.client.v1.IHeight|null} [height] QueryUnreceivedAcksResponse height + */ + + /** + * Constructs a new QueryUnreceivedAcksResponse. + * @memberof ibc.core.channel.v1 + * @classdesc Represents a QueryUnreceivedAcksResponse. + * @implements IQueryUnreceivedAcksResponse + * @constructor + * @param {ibc.core.channel.v1.IQueryUnreceivedAcksResponse=} [properties] Properties to set + */ + function QueryUnreceivedAcksResponse(properties) { + this.sequences = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryUnreceivedAcksResponse sequences. + * @member {Array.} sequences + * @memberof ibc.core.channel.v1.QueryUnreceivedAcksResponse + * @instance + */ + QueryUnreceivedAcksResponse.prototype.sequences = $util.emptyArray; + + /** + * QueryUnreceivedAcksResponse height. + * @member {ibc.core.client.v1.IHeight|null|undefined} height + * @memberof ibc.core.channel.v1.QueryUnreceivedAcksResponse + * @instance + */ + QueryUnreceivedAcksResponse.prototype.height = null; + + /** + * Creates a new QueryUnreceivedAcksResponse instance using the specified properties. + * @function create + * @memberof ibc.core.channel.v1.QueryUnreceivedAcksResponse + * @static + * @param {ibc.core.channel.v1.IQueryUnreceivedAcksResponse=} [properties] Properties to set + * @returns {ibc.core.channel.v1.QueryUnreceivedAcksResponse} QueryUnreceivedAcksResponse instance + */ + QueryUnreceivedAcksResponse.create = function create(properties) { + return new QueryUnreceivedAcksResponse(properties); + }; + + /** + * Encodes the specified QueryUnreceivedAcksResponse message. Does not implicitly {@link ibc.core.channel.v1.QueryUnreceivedAcksResponse.verify|verify} messages. + * @function encode + * @memberof ibc.core.channel.v1.QueryUnreceivedAcksResponse + * @static + * @param {ibc.core.channel.v1.IQueryUnreceivedAcksResponse} message QueryUnreceivedAcksResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryUnreceivedAcksResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sequences != null && message.sequences.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (let i = 0; i < message.sequences.length; ++i) + writer.uint64(message.sequences[i]); + writer.ldelim(); + } + if (message.height != null && Object.hasOwnProperty.call(message, "height")) + $root.ibc.core.client.v1.Height.encode(message.height, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryUnreceivedAcksResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryUnreceivedAcksResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.channel.v1.QueryUnreceivedAcksResponse + * @static + * @param {ibc.core.channel.v1.IQueryUnreceivedAcksResponse} message QueryUnreceivedAcksResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryUnreceivedAcksResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryUnreceivedAcksResponse message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.channel.v1.QueryUnreceivedAcksResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.channel.v1.QueryUnreceivedAcksResponse} QueryUnreceivedAcksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryUnreceivedAcksResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.QueryUnreceivedAcksResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.sequences && message.sequences.length)) + message.sequences = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.sequences.push(reader.uint64()); + } else + message.sequences.push(reader.uint64()); + break; + case 2: + message.height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryUnreceivedAcksResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.channel.v1.QueryUnreceivedAcksResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.channel.v1.QueryUnreceivedAcksResponse} QueryUnreceivedAcksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryUnreceivedAcksResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryUnreceivedAcksResponse message. + * @function verify + * @memberof ibc.core.channel.v1.QueryUnreceivedAcksResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryUnreceivedAcksResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sequences != null && message.hasOwnProperty("sequences")) { + if (!Array.isArray(message.sequences)) + return "sequences: array expected"; + for (let i = 0; i < message.sequences.length; ++i) + if (!$util.isInteger(message.sequences[i]) && !(message.sequences[i] && $util.isInteger(message.sequences[i].low) && $util.isInteger(message.sequences[i].high))) + return "sequences: integer|Long[] expected"; + } + if (message.height != null && message.hasOwnProperty("height")) { + let error = $root.ibc.core.client.v1.Height.verify(message.height); + if (error) + return "height." + error; + } + return null; + }; + + /** + * Creates a QueryUnreceivedAcksResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.channel.v1.QueryUnreceivedAcksResponse + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.channel.v1.QueryUnreceivedAcksResponse} QueryUnreceivedAcksResponse + */ + QueryUnreceivedAcksResponse.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.channel.v1.QueryUnreceivedAcksResponse) + return object; + let message = new $root.ibc.core.channel.v1.QueryUnreceivedAcksResponse(); + if (object.sequences) { + if (!Array.isArray(object.sequences)) + throw TypeError(".ibc.core.channel.v1.QueryUnreceivedAcksResponse.sequences: array expected"); + message.sequences = []; + for (let i = 0; i < object.sequences.length; ++i) + if ($util.Long) + (message.sequences[i] = $util.Long.fromValue(object.sequences[i])).unsigned = true; + else if (typeof object.sequences[i] === "string") + message.sequences[i] = parseInt(object.sequences[i], 10); + else if (typeof object.sequences[i] === "number") + message.sequences[i] = object.sequences[i]; + else if (typeof object.sequences[i] === "object") + message.sequences[i] = new $util.LongBits(object.sequences[i].low >>> 0, object.sequences[i].high >>> 0).toNumber(true); + } + if (object.height != null) { + if (typeof object.height !== "object") + throw TypeError(".ibc.core.channel.v1.QueryUnreceivedAcksResponse.height: object expected"); + message.height = $root.ibc.core.client.v1.Height.fromObject(object.height); + } + return message; + }; + + /** + * Creates a plain object from a QueryUnreceivedAcksResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.channel.v1.QueryUnreceivedAcksResponse + * @static + * @param {ibc.core.channel.v1.QueryUnreceivedAcksResponse} message QueryUnreceivedAcksResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryUnreceivedAcksResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.sequences = []; + if (options.defaults) + object.height = null; + if (message.sequences && message.sequences.length) { + object.sequences = []; + for (let j = 0; j < message.sequences.length; ++j) + if (typeof message.sequences[j] === "number") + object.sequences[j] = options.longs === String ? String(message.sequences[j]) : message.sequences[j]; + else + object.sequences[j] = options.longs === String ? $util.Long.prototype.toString.call(message.sequences[j]) : options.longs === Number ? new $util.LongBits(message.sequences[j].low >>> 0, message.sequences[j].high >>> 0).toNumber(true) : message.sequences[j]; + } + if (message.height != null && message.hasOwnProperty("height")) + object.height = $root.ibc.core.client.v1.Height.toObject(message.height, options); + return object; + }; + + /** + * Converts this QueryUnreceivedAcksResponse to JSON. + * @function toJSON + * @memberof ibc.core.channel.v1.QueryUnreceivedAcksResponse + * @instance + * @returns {Object.} JSON object + */ + QueryUnreceivedAcksResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryUnreceivedAcksResponse; + })(v1.QueryUnreceivedAcksResponse || {}); + + v1.QueryNextSequenceReceiveRequest = (function(QueryNextSequenceReceiveRequest) { + + /** + * Properties of a QueryNextSequenceReceiveRequest. + * @memberof ibc.core.channel.v1 + * @interface IQueryNextSequenceReceiveRequest + * @property {string|null} [portId] QueryNextSequenceReceiveRequest portId + * @property {string|null} [channelId] QueryNextSequenceReceiveRequest channelId + */ + + /** + * Constructs a new QueryNextSequenceReceiveRequest. + * @memberof ibc.core.channel.v1 + * @classdesc Represents a QueryNextSequenceReceiveRequest. + * @implements IQueryNextSequenceReceiveRequest + * @constructor + * @param {ibc.core.channel.v1.IQueryNextSequenceReceiveRequest=} [properties] Properties to set + */ + function QueryNextSequenceReceiveRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryNextSequenceReceiveRequest portId. + * @member {string} portId + * @memberof ibc.core.channel.v1.QueryNextSequenceReceiveRequest + * @instance + */ + QueryNextSequenceReceiveRequest.prototype.portId = ""; + + /** + * QueryNextSequenceReceiveRequest channelId. + * @member {string} channelId + * @memberof ibc.core.channel.v1.QueryNextSequenceReceiveRequest + * @instance + */ + QueryNextSequenceReceiveRequest.prototype.channelId = ""; + + /** + * Creates a new QueryNextSequenceReceiveRequest instance using the specified properties. + * @function create + * @memberof ibc.core.channel.v1.QueryNextSequenceReceiveRequest + * @static + * @param {ibc.core.channel.v1.IQueryNextSequenceReceiveRequest=} [properties] Properties to set + * @returns {ibc.core.channel.v1.QueryNextSequenceReceiveRequest} QueryNextSequenceReceiveRequest instance + */ + QueryNextSequenceReceiveRequest.create = function create(properties) { + return new QueryNextSequenceReceiveRequest(properties); + }; + + /** + * Encodes the specified QueryNextSequenceReceiveRequest message. Does not implicitly {@link ibc.core.channel.v1.QueryNextSequenceReceiveRequest.verify|verify} messages. + * @function encode + * @memberof ibc.core.channel.v1.QueryNextSequenceReceiveRequest + * @static + * @param {ibc.core.channel.v1.IQueryNextSequenceReceiveRequest} message QueryNextSequenceReceiveRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryNextSequenceReceiveRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.portId != null && Object.hasOwnProperty.call(message, "portId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.portId); + if (message.channelId != null && Object.hasOwnProperty.call(message, "channelId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.channelId); + return writer; + }; + + /** + * Encodes the specified QueryNextSequenceReceiveRequest message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryNextSequenceReceiveRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.channel.v1.QueryNextSequenceReceiveRequest + * @static + * @param {ibc.core.channel.v1.IQueryNextSequenceReceiveRequest} message QueryNextSequenceReceiveRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryNextSequenceReceiveRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryNextSequenceReceiveRequest message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.channel.v1.QueryNextSequenceReceiveRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.channel.v1.QueryNextSequenceReceiveRequest} QueryNextSequenceReceiveRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryNextSequenceReceiveRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.QueryNextSequenceReceiveRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.portId = reader.string(); + break; + case 2: + message.channelId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryNextSequenceReceiveRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.channel.v1.QueryNextSequenceReceiveRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.channel.v1.QueryNextSequenceReceiveRequest} QueryNextSequenceReceiveRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryNextSequenceReceiveRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryNextSequenceReceiveRequest message. + * @function verify + * @memberof ibc.core.channel.v1.QueryNextSequenceReceiveRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryNextSequenceReceiveRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.portId != null && message.hasOwnProperty("portId")) + if (!$util.isString(message.portId)) + return "portId: string expected"; + if (message.channelId != null && message.hasOwnProperty("channelId")) + if (!$util.isString(message.channelId)) + return "channelId: string expected"; + return null; + }; + + /** + * Creates a QueryNextSequenceReceiveRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.channel.v1.QueryNextSequenceReceiveRequest + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.channel.v1.QueryNextSequenceReceiveRequest} QueryNextSequenceReceiveRequest + */ + QueryNextSequenceReceiveRequest.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.channel.v1.QueryNextSequenceReceiveRequest) + return object; + let message = new $root.ibc.core.channel.v1.QueryNextSequenceReceiveRequest(); + if (object.portId != null) + message.portId = String(object.portId); + if (object.channelId != null) + message.channelId = String(object.channelId); + return message; + }; + + /** + * Creates a plain object from a QueryNextSequenceReceiveRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.channel.v1.QueryNextSequenceReceiveRequest + * @static + * @param {ibc.core.channel.v1.QueryNextSequenceReceiveRequest} message QueryNextSequenceReceiveRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryNextSequenceReceiveRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.portId = ""; + object.channelId = ""; + } + if (message.portId != null && message.hasOwnProperty("portId")) + object.portId = message.portId; + if (message.channelId != null && message.hasOwnProperty("channelId")) + object.channelId = message.channelId; + return object; + }; + + /** + * Converts this QueryNextSequenceReceiveRequest to JSON. + * @function toJSON + * @memberof ibc.core.channel.v1.QueryNextSequenceReceiveRequest + * @instance + * @returns {Object.} JSON object + */ + QueryNextSequenceReceiveRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryNextSequenceReceiveRequest; + })(v1.QueryNextSequenceReceiveRequest || {}); + + v1.QueryNextSequenceReceiveResponse = (function(QueryNextSequenceReceiveResponse) { + + /** + * Properties of a QueryNextSequenceReceiveResponse. + * @memberof ibc.core.channel.v1 + * @interface IQueryNextSequenceReceiveResponse + * @property {number|Long|null} [nextSequenceReceive] QueryNextSequenceReceiveResponse nextSequenceReceive + * @property {Uint8Array|null} [proof] QueryNextSequenceReceiveResponse proof + * @property {ibc.core.client.v1.IHeight|null} [proofHeight] QueryNextSequenceReceiveResponse proofHeight + */ + + /** + * Constructs a new QueryNextSequenceReceiveResponse. + * @memberof ibc.core.channel.v1 + * @classdesc Represents a QueryNextSequenceReceiveResponse. + * @implements IQueryNextSequenceReceiveResponse + * @constructor + * @param {ibc.core.channel.v1.IQueryNextSequenceReceiveResponse=} [properties] Properties to set + */ + function QueryNextSequenceReceiveResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryNextSequenceReceiveResponse nextSequenceReceive. + * @member {number|Long} nextSequenceReceive + * @memberof ibc.core.channel.v1.QueryNextSequenceReceiveResponse + * @instance + */ + QueryNextSequenceReceiveResponse.prototype.nextSequenceReceive = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * QueryNextSequenceReceiveResponse proof. + * @member {Uint8Array} proof + * @memberof ibc.core.channel.v1.QueryNextSequenceReceiveResponse + * @instance + */ + QueryNextSequenceReceiveResponse.prototype.proof = $util.newBuffer([]); + + /** + * QueryNextSequenceReceiveResponse proofHeight. + * @member {ibc.core.client.v1.IHeight|null|undefined} proofHeight + * @memberof ibc.core.channel.v1.QueryNextSequenceReceiveResponse + * @instance + */ + QueryNextSequenceReceiveResponse.prototype.proofHeight = null; + + /** + * Creates a new QueryNextSequenceReceiveResponse instance using the specified properties. + * @function create + * @memberof ibc.core.channel.v1.QueryNextSequenceReceiveResponse + * @static + * @param {ibc.core.channel.v1.IQueryNextSequenceReceiveResponse=} [properties] Properties to set + * @returns {ibc.core.channel.v1.QueryNextSequenceReceiveResponse} QueryNextSequenceReceiveResponse instance + */ + QueryNextSequenceReceiveResponse.create = function create(properties) { + return new QueryNextSequenceReceiveResponse(properties); + }; + + /** + * Encodes the specified QueryNextSequenceReceiveResponse message. Does not implicitly {@link ibc.core.channel.v1.QueryNextSequenceReceiveResponse.verify|verify} messages. + * @function encode + * @memberof ibc.core.channel.v1.QueryNextSequenceReceiveResponse + * @static + * @param {ibc.core.channel.v1.IQueryNextSequenceReceiveResponse} message QueryNextSequenceReceiveResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryNextSequenceReceiveResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.nextSequenceReceive != null && Object.hasOwnProperty.call(message, "nextSequenceReceive")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.nextSequenceReceive); + if (message.proof != null && Object.hasOwnProperty.call(message, "proof")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.proof); + if (message.proofHeight != null && Object.hasOwnProperty.call(message, "proofHeight")) + $root.ibc.core.client.v1.Height.encode(message.proofHeight, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryNextSequenceReceiveResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryNextSequenceReceiveResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.channel.v1.QueryNextSequenceReceiveResponse + * @static + * @param {ibc.core.channel.v1.IQueryNextSequenceReceiveResponse} message QueryNextSequenceReceiveResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryNextSequenceReceiveResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryNextSequenceReceiveResponse message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.channel.v1.QueryNextSequenceReceiveResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.channel.v1.QueryNextSequenceReceiveResponse} QueryNextSequenceReceiveResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryNextSequenceReceiveResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.QueryNextSequenceReceiveResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.nextSequenceReceive = reader.uint64(); + break; + case 2: + message.proof = reader.bytes(); + break; + case 3: + message.proofHeight = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryNextSequenceReceiveResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.channel.v1.QueryNextSequenceReceiveResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.channel.v1.QueryNextSequenceReceiveResponse} QueryNextSequenceReceiveResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryNextSequenceReceiveResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryNextSequenceReceiveResponse message. + * @function verify + * @memberof ibc.core.channel.v1.QueryNextSequenceReceiveResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryNextSequenceReceiveResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.nextSequenceReceive != null && message.hasOwnProperty("nextSequenceReceive")) + if (!$util.isInteger(message.nextSequenceReceive) && !(message.nextSequenceReceive && $util.isInteger(message.nextSequenceReceive.low) && $util.isInteger(message.nextSequenceReceive.high))) + return "nextSequenceReceive: integer|Long expected"; + if (message.proof != null && message.hasOwnProperty("proof")) + if (!(message.proof && typeof message.proof.length === "number" || $util.isString(message.proof))) + return "proof: buffer expected"; + if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) { + let error = $root.ibc.core.client.v1.Height.verify(message.proofHeight); + if (error) + return "proofHeight." + error; + } + return null; + }; + + /** + * Creates a QueryNextSequenceReceiveResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.channel.v1.QueryNextSequenceReceiveResponse + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.channel.v1.QueryNextSequenceReceiveResponse} QueryNextSequenceReceiveResponse + */ + QueryNextSequenceReceiveResponse.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.channel.v1.QueryNextSequenceReceiveResponse) + return object; + let message = new $root.ibc.core.channel.v1.QueryNextSequenceReceiveResponse(); + if (object.nextSequenceReceive != null) + if ($util.Long) + (message.nextSequenceReceive = $util.Long.fromValue(object.nextSequenceReceive)).unsigned = true; + else if (typeof object.nextSequenceReceive === "string") + message.nextSequenceReceive = parseInt(object.nextSequenceReceive, 10); + else if (typeof object.nextSequenceReceive === "number") + message.nextSequenceReceive = object.nextSequenceReceive; + else if (typeof object.nextSequenceReceive === "object") + message.nextSequenceReceive = new $util.LongBits(object.nextSequenceReceive.low >>> 0, object.nextSequenceReceive.high >>> 0).toNumber(true); + if (object.proof != null) + if (typeof object.proof === "string") + $util.base64.decode(object.proof, message.proof = $util.newBuffer($util.base64.length(object.proof)), 0); + else if (object.proof.length) + message.proof = object.proof; + if (object.proofHeight != null) { + if (typeof object.proofHeight !== "object") + throw TypeError(".ibc.core.channel.v1.QueryNextSequenceReceiveResponse.proofHeight: object expected"); + message.proofHeight = $root.ibc.core.client.v1.Height.fromObject(object.proofHeight); + } + return message; + }; + + /** + * Creates a plain object from a QueryNextSequenceReceiveResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.channel.v1.QueryNextSequenceReceiveResponse + * @static + * @param {ibc.core.channel.v1.QueryNextSequenceReceiveResponse} message QueryNextSequenceReceiveResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryNextSequenceReceiveResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.nextSequenceReceive = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.nextSequenceReceive = options.longs === String ? "0" : 0; + if (options.bytes === String) + object.proof = ""; + else { + object.proof = []; + if (options.bytes !== Array) + object.proof = $util.newBuffer(object.proof); + } + object.proofHeight = null; + } + if (message.nextSequenceReceive != null && message.hasOwnProperty("nextSequenceReceive")) + if (typeof message.nextSequenceReceive === "number") + object.nextSequenceReceive = options.longs === String ? String(message.nextSequenceReceive) : message.nextSequenceReceive; + else + object.nextSequenceReceive = options.longs === String ? $util.Long.prototype.toString.call(message.nextSequenceReceive) : options.longs === Number ? new $util.LongBits(message.nextSequenceReceive.low >>> 0, message.nextSequenceReceive.high >>> 0).toNumber(true) : message.nextSequenceReceive; + if (message.proof != null && message.hasOwnProperty("proof")) + object.proof = options.bytes === String ? $util.base64.encode(message.proof, 0, message.proof.length) : options.bytes === Array ? Array.prototype.slice.call(message.proof) : message.proof; + if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) + object.proofHeight = $root.ibc.core.client.v1.Height.toObject(message.proofHeight, options); + return object; + }; + + /** + * Converts this QueryNextSequenceReceiveResponse to JSON. + * @function toJSON + * @memberof ibc.core.channel.v1.QueryNextSequenceReceiveResponse + * @instance + * @returns {Object.} JSON object + */ + QueryNextSequenceReceiveResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryNextSequenceReceiveResponse; + })(v1.QueryNextSequenceReceiveResponse || {}); + + v1.Msg = (function(Msg) { + + /** + * Constructs a new Msg service. + * @memberof ibc.core.channel.v1 + * @classdesc Represents a Msg + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Msg(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Msg.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Msg; + + /** + * Creates new Msg service using the specified rpc implementation. + * @function create + * @memberof ibc.core.channel.v1.Msg + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Msg} RPC service. Useful where requests and/or responses are streamed. + */ + Msg.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link ibc.core.channel.v1.Msg#channelOpenInit}. + * @memberof ibc.core.channel.v1.Msg + * @typedef ChannelOpenInitCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {ibc.core.channel.v1.IMsgChannelOpenInitResponse} [response] MsgChannelOpenInitResponse + */ + + /** + * Calls ChannelOpenInit. + * @function channelOpenInit + * @memberof ibc.core.channel.v1.Msg + * @instance + * @param {ibc.core.channel.v1.IMsgChannelOpenInit} request MsgChannelOpenInit message or plain object + * @param {ibc.core.channel.v1.Msg.ChannelOpenInitCallback} callback Node-style callback called with the error, if any, and MsgChannelOpenInitResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Msg.prototype.channelOpenInit = function channelOpenInit(request, callback) { + return this.rpcCall(channelOpenInit, $root.ibc.core.channel.v1.MsgChannelOpenInit, $root.ibc.core.channel.v1.MsgChannelOpenInitResponse, request, callback); + }, "name", { value: "ChannelOpenInit" }); + + /** + * Calls ChannelOpenInit. + * @function channelOpenInit + * @memberof ibc.core.channel.v1.Msg + * @instance + * @param {ibc.core.channel.v1.IMsgChannelOpenInit} request MsgChannelOpenInit message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link ibc.core.channel.v1.Msg#channelOpenTry}. + * @memberof ibc.core.channel.v1.Msg + * @typedef ChannelOpenTryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {ibc.core.channel.v1.IMsgChannelOpenTryResponse} [response] MsgChannelOpenTryResponse + */ + + /** + * Calls ChannelOpenTry. + * @function channelOpenTry + * @memberof ibc.core.channel.v1.Msg + * @instance + * @param {ibc.core.channel.v1.IMsgChannelOpenTry} request MsgChannelOpenTry message or plain object + * @param {ibc.core.channel.v1.Msg.ChannelOpenTryCallback} callback Node-style callback called with the error, if any, and MsgChannelOpenTryResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Msg.prototype.channelOpenTry = function channelOpenTry(request, callback) { + return this.rpcCall(channelOpenTry, $root.ibc.core.channel.v1.MsgChannelOpenTry, $root.ibc.core.channel.v1.MsgChannelOpenTryResponse, request, callback); + }, "name", { value: "ChannelOpenTry" }); + + /** + * Calls ChannelOpenTry. + * @function channelOpenTry + * @memberof ibc.core.channel.v1.Msg + * @instance + * @param {ibc.core.channel.v1.IMsgChannelOpenTry} request MsgChannelOpenTry message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link ibc.core.channel.v1.Msg#channelOpenAck}. + * @memberof ibc.core.channel.v1.Msg + * @typedef ChannelOpenAckCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {ibc.core.channel.v1.IMsgChannelOpenAckResponse} [response] MsgChannelOpenAckResponse + */ + + /** + * Calls ChannelOpenAck. + * @function channelOpenAck + * @memberof ibc.core.channel.v1.Msg + * @instance + * @param {ibc.core.channel.v1.IMsgChannelOpenAck} request MsgChannelOpenAck message or plain object + * @param {ibc.core.channel.v1.Msg.ChannelOpenAckCallback} callback Node-style callback called with the error, if any, and MsgChannelOpenAckResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Msg.prototype.channelOpenAck = function channelOpenAck(request, callback) { + return this.rpcCall(channelOpenAck, $root.ibc.core.channel.v1.MsgChannelOpenAck, $root.ibc.core.channel.v1.MsgChannelOpenAckResponse, request, callback); + }, "name", { value: "ChannelOpenAck" }); + + /** + * Calls ChannelOpenAck. + * @function channelOpenAck + * @memberof ibc.core.channel.v1.Msg + * @instance + * @param {ibc.core.channel.v1.IMsgChannelOpenAck} request MsgChannelOpenAck message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link ibc.core.channel.v1.Msg#channelOpenConfirm}. + * @memberof ibc.core.channel.v1.Msg + * @typedef ChannelOpenConfirmCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {ibc.core.channel.v1.IMsgChannelOpenConfirmResponse} [response] MsgChannelOpenConfirmResponse + */ + + /** + * Calls ChannelOpenConfirm. + * @function channelOpenConfirm + * @memberof ibc.core.channel.v1.Msg + * @instance + * @param {ibc.core.channel.v1.IMsgChannelOpenConfirm} request MsgChannelOpenConfirm message or plain object + * @param {ibc.core.channel.v1.Msg.ChannelOpenConfirmCallback} callback Node-style callback called with the error, if any, and MsgChannelOpenConfirmResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Msg.prototype.channelOpenConfirm = function channelOpenConfirm(request, callback) { + return this.rpcCall(channelOpenConfirm, $root.ibc.core.channel.v1.MsgChannelOpenConfirm, $root.ibc.core.channel.v1.MsgChannelOpenConfirmResponse, request, callback); + }, "name", { value: "ChannelOpenConfirm" }); + + /** + * Calls ChannelOpenConfirm. + * @function channelOpenConfirm + * @memberof ibc.core.channel.v1.Msg + * @instance + * @param {ibc.core.channel.v1.IMsgChannelOpenConfirm} request MsgChannelOpenConfirm message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link ibc.core.channel.v1.Msg#channelCloseInit}. + * @memberof ibc.core.channel.v1.Msg + * @typedef ChannelCloseInitCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {ibc.core.channel.v1.IMsgChannelCloseInitResponse} [response] MsgChannelCloseInitResponse + */ + + /** + * Calls ChannelCloseInit. + * @function channelCloseInit + * @memberof ibc.core.channel.v1.Msg + * @instance + * @param {ibc.core.channel.v1.IMsgChannelCloseInit} request MsgChannelCloseInit message or plain object + * @param {ibc.core.channel.v1.Msg.ChannelCloseInitCallback} callback Node-style callback called with the error, if any, and MsgChannelCloseInitResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Msg.prototype.channelCloseInit = function channelCloseInit(request, callback) { + return this.rpcCall(channelCloseInit, $root.ibc.core.channel.v1.MsgChannelCloseInit, $root.ibc.core.channel.v1.MsgChannelCloseInitResponse, request, callback); + }, "name", { value: "ChannelCloseInit" }); + + /** + * Calls ChannelCloseInit. + * @function channelCloseInit + * @memberof ibc.core.channel.v1.Msg + * @instance + * @param {ibc.core.channel.v1.IMsgChannelCloseInit} request MsgChannelCloseInit message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link ibc.core.channel.v1.Msg#channelCloseConfirm}. + * @memberof ibc.core.channel.v1.Msg + * @typedef ChannelCloseConfirmCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {ibc.core.channel.v1.IMsgChannelCloseConfirmResponse} [response] MsgChannelCloseConfirmResponse + */ + + /** + * Calls ChannelCloseConfirm. + * @function channelCloseConfirm + * @memberof ibc.core.channel.v1.Msg + * @instance + * @param {ibc.core.channel.v1.IMsgChannelCloseConfirm} request MsgChannelCloseConfirm message or plain object + * @param {ibc.core.channel.v1.Msg.ChannelCloseConfirmCallback} callback Node-style callback called with the error, if any, and MsgChannelCloseConfirmResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Msg.prototype.channelCloseConfirm = function channelCloseConfirm(request, callback) { + return this.rpcCall(channelCloseConfirm, $root.ibc.core.channel.v1.MsgChannelCloseConfirm, $root.ibc.core.channel.v1.MsgChannelCloseConfirmResponse, request, callback); + }, "name", { value: "ChannelCloseConfirm" }); + + /** + * Calls ChannelCloseConfirm. + * @function channelCloseConfirm + * @memberof ibc.core.channel.v1.Msg + * @instance + * @param {ibc.core.channel.v1.IMsgChannelCloseConfirm} request MsgChannelCloseConfirm message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link ibc.core.channel.v1.Msg#recvPacket}. + * @memberof ibc.core.channel.v1.Msg + * @typedef RecvPacketCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {ibc.core.channel.v1.IMsgRecvPacketResponse} [response] MsgRecvPacketResponse + */ + + /** + * Calls RecvPacket. + * @function recvPacket + * @memberof ibc.core.channel.v1.Msg + * @instance + * @param {ibc.core.channel.v1.IMsgRecvPacket} request MsgRecvPacket message or plain object + * @param {ibc.core.channel.v1.Msg.RecvPacketCallback} callback Node-style callback called with the error, if any, and MsgRecvPacketResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Msg.prototype.recvPacket = function recvPacket(request, callback) { + return this.rpcCall(recvPacket, $root.ibc.core.channel.v1.MsgRecvPacket, $root.ibc.core.channel.v1.MsgRecvPacketResponse, request, callback); + }, "name", { value: "RecvPacket" }); + + /** + * Calls RecvPacket. + * @function recvPacket + * @memberof ibc.core.channel.v1.Msg + * @instance + * @param {ibc.core.channel.v1.IMsgRecvPacket} request MsgRecvPacket message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link ibc.core.channel.v1.Msg#timeout}. + * @memberof ibc.core.channel.v1.Msg + * @typedef TimeoutCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {ibc.core.channel.v1.IMsgTimeoutResponse} [response] MsgTimeoutResponse + */ + + /** + * Calls Timeout. + * @function timeout + * @memberof ibc.core.channel.v1.Msg + * @instance + * @param {ibc.core.channel.v1.IMsgTimeout} request MsgTimeout message or plain object + * @param {ibc.core.channel.v1.Msg.TimeoutCallback} callback Node-style callback called with the error, if any, and MsgTimeoutResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Msg.prototype.timeout = function timeout(request, callback) { + return this.rpcCall(timeout, $root.ibc.core.channel.v1.MsgTimeout, $root.ibc.core.channel.v1.MsgTimeoutResponse, request, callback); + }, "name", { value: "Timeout" }); + + /** + * Calls Timeout. + * @function timeout + * @memberof ibc.core.channel.v1.Msg + * @instance + * @param {ibc.core.channel.v1.IMsgTimeout} request MsgTimeout message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link ibc.core.channel.v1.Msg#timeoutOnClose}. + * @memberof ibc.core.channel.v1.Msg + * @typedef TimeoutOnCloseCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {ibc.core.channel.v1.IMsgTimeoutOnCloseResponse} [response] MsgTimeoutOnCloseResponse + */ + + /** + * Calls TimeoutOnClose. + * @function timeoutOnClose + * @memberof ibc.core.channel.v1.Msg + * @instance + * @param {ibc.core.channel.v1.IMsgTimeoutOnClose} request MsgTimeoutOnClose message or plain object + * @param {ibc.core.channel.v1.Msg.TimeoutOnCloseCallback} callback Node-style callback called with the error, if any, and MsgTimeoutOnCloseResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Msg.prototype.timeoutOnClose = function timeoutOnClose(request, callback) { + return this.rpcCall(timeoutOnClose, $root.ibc.core.channel.v1.MsgTimeoutOnClose, $root.ibc.core.channel.v1.MsgTimeoutOnCloseResponse, request, callback); + }, "name", { value: "TimeoutOnClose" }); + + /** + * Calls TimeoutOnClose. + * @function timeoutOnClose + * @memberof ibc.core.channel.v1.Msg + * @instance + * @param {ibc.core.channel.v1.IMsgTimeoutOnClose} request MsgTimeoutOnClose message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link ibc.core.channel.v1.Msg#acknowledgement}. + * @memberof ibc.core.channel.v1.Msg + * @typedef AcknowledgementCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {ibc.core.channel.v1.IMsgAcknowledgementResponse} [response] MsgAcknowledgementResponse + */ + + /** + * Calls Acknowledgement. + * @function acknowledgement + * @memberof ibc.core.channel.v1.Msg + * @instance + * @param {ibc.core.channel.v1.IMsgAcknowledgement} request MsgAcknowledgement message or plain object + * @param {ibc.core.channel.v1.Msg.AcknowledgementCallback} callback Node-style callback called with the error, if any, and MsgAcknowledgementResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Msg.prototype.acknowledgement = function acknowledgement(request, callback) { + return this.rpcCall(acknowledgement, $root.ibc.core.channel.v1.MsgAcknowledgement, $root.ibc.core.channel.v1.MsgAcknowledgementResponse, request, callback); + }, "name", { value: "Acknowledgement" }); + + /** + * Calls Acknowledgement. + * @function acknowledgement + * @memberof ibc.core.channel.v1.Msg + * @instance + * @param {ibc.core.channel.v1.IMsgAcknowledgement} request MsgAcknowledgement message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Msg; + })(v1.Msg || {}); + + v1.MsgChannelOpenInit = (function(MsgChannelOpenInit) { + + /** + * Properties of a MsgChannelOpenInit. + * @memberof ibc.core.channel.v1 + * @interface IMsgChannelOpenInit + * @property {string|null} [portId] MsgChannelOpenInit portId + * @property {ibc.core.channel.v1.IChannel|null} [channel] MsgChannelOpenInit channel + * @property {string|null} [signer] MsgChannelOpenInit signer + */ + + /** + * Constructs a new MsgChannelOpenInit. + * @memberof ibc.core.channel.v1 + * @classdesc Represents a MsgChannelOpenInit. + * @implements IMsgChannelOpenInit + * @constructor + * @param {ibc.core.channel.v1.IMsgChannelOpenInit=} [properties] Properties to set + */ + function MsgChannelOpenInit(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgChannelOpenInit portId. + * @member {string} portId + * @memberof ibc.core.channel.v1.MsgChannelOpenInit + * @instance + */ + MsgChannelOpenInit.prototype.portId = ""; + + /** + * MsgChannelOpenInit channel. + * @member {ibc.core.channel.v1.IChannel|null|undefined} channel + * @memberof ibc.core.channel.v1.MsgChannelOpenInit + * @instance + */ + MsgChannelOpenInit.prototype.channel = null; + + /** + * MsgChannelOpenInit signer. + * @member {string} signer + * @memberof ibc.core.channel.v1.MsgChannelOpenInit + * @instance + */ + MsgChannelOpenInit.prototype.signer = ""; + + /** + * Creates a new MsgChannelOpenInit instance using the specified properties. + * @function create + * @memberof ibc.core.channel.v1.MsgChannelOpenInit + * @static + * @param {ibc.core.channel.v1.IMsgChannelOpenInit=} [properties] Properties to set + * @returns {ibc.core.channel.v1.MsgChannelOpenInit} MsgChannelOpenInit instance + */ + MsgChannelOpenInit.create = function create(properties) { + return new MsgChannelOpenInit(properties); + }; + + /** + * Encodes the specified MsgChannelOpenInit message. Does not implicitly {@link ibc.core.channel.v1.MsgChannelOpenInit.verify|verify} messages. + * @function encode + * @memberof ibc.core.channel.v1.MsgChannelOpenInit + * @static + * @param {ibc.core.channel.v1.IMsgChannelOpenInit} message MsgChannelOpenInit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgChannelOpenInit.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.portId != null && Object.hasOwnProperty.call(message, "portId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.portId); + if (message.channel != null && Object.hasOwnProperty.call(message, "channel")) + $root.ibc.core.channel.v1.Channel.encode(message.channel, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.signer); + return writer; + }; + + /** + * Encodes the specified MsgChannelOpenInit message, length delimited. Does not implicitly {@link ibc.core.channel.v1.MsgChannelOpenInit.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.channel.v1.MsgChannelOpenInit + * @static + * @param {ibc.core.channel.v1.IMsgChannelOpenInit} message MsgChannelOpenInit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgChannelOpenInit.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgChannelOpenInit message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.channel.v1.MsgChannelOpenInit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.channel.v1.MsgChannelOpenInit} MsgChannelOpenInit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgChannelOpenInit.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.MsgChannelOpenInit(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.portId = reader.string(); + break; + case 2: + message.channel = $root.ibc.core.channel.v1.Channel.decode(reader, reader.uint32()); + break; + case 3: + message.signer = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgChannelOpenInit message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.channel.v1.MsgChannelOpenInit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.channel.v1.MsgChannelOpenInit} MsgChannelOpenInit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgChannelOpenInit.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgChannelOpenInit message. + * @function verify + * @memberof ibc.core.channel.v1.MsgChannelOpenInit + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgChannelOpenInit.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.portId != null && message.hasOwnProperty("portId")) + if (!$util.isString(message.portId)) + return "portId: string expected"; + if (message.channel != null && message.hasOwnProperty("channel")) { + let error = $root.ibc.core.channel.v1.Channel.verify(message.channel); + if (error) + return "channel." + error; + } + if (message.signer != null && message.hasOwnProperty("signer")) + if (!$util.isString(message.signer)) + return "signer: string expected"; + return null; + }; + + /** + * Creates a MsgChannelOpenInit message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.channel.v1.MsgChannelOpenInit + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.channel.v1.MsgChannelOpenInit} MsgChannelOpenInit + */ + MsgChannelOpenInit.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.channel.v1.MsgChannelOpenInit) + return object; + let message = new $root.ibc.core.channel.v1.MsgChannelOpenInit(); + if (object.portId != null) + message.portId = String(object.portId); + if (object.channel != null) { + if (typeof object.channel !== "object") + throw TypeError(".ibc.core.channel.v1.MsgChannelOpenInit.channel: object expected"); + message.channel = $root.ibc.core.channel.v1.Channel.fromObject(object.channel); + } + if (object.signer != null) + message.signer = String(object.signer); + return message; + }; + + /** + * Creates a plain object from a MsgChannelOpenInit message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.channel.v1.MsgChannelOpenInit + * @static + * @param {ibc.core.channel.v1.MsgChannelOpenInit} message MsgChannelOpenInit + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgChannelOpenInit.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.portId = ""; + object.channel = null; + object.signer = ""; + } + if (message.portId != null && message.hasOwnProperty("portId")) + object.portId = message.portId; + if (message.channel != null && message.hasOwnProperty("channel")) + object.channel = $root.ibc.core.channel.v1.Channel.toObject(message.channel, options); + if (message.signer != null && message.hasOwnProperty("signer")) + object.signer = message.signer; + return object; + }; + + /** + * Converts this MsgChannelOpenInit to JSON. + * @function toJSON + * @memberof ibc.core.channel.v1.MsgChannelOpenInit + * @instance + * @returns {Object.} JSON object + */ + MsgChannelOpenInit.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgChannelOpenInit; + })(v1.MsgChannelOpenInit || {}); + + v1.MsgChannelOpenInitResponse = (function(MsgChannelOpenInitResponse) { + + /** + * Properties of a MsgChannelOpenInitResponse. + * @memberof ibc.core.channel.v1 + * @interface IMsgChannelOpenInitResponse + */ + + /** + * Constructs a new MsgChannelOpenInitResponse. + * @memberof ibc.core.channel.v1 + * @classdesc Represents a MsgChannelOpenInitResponse. + * @implements IMsgChannelOpenInitResponse + * @constructor + * @param {ibc.core.channel.v1.IMsgChannelOpenInitResponse=} [properties] Properties to set + */ + function MsgChannelOpenInitResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new MsgChannelOpenInitResponse instance using the specified properties. + * @function create + * @memberof ibc.core.channel.v1.MsgChannelOpenInitResponse + * @static + * @param {ibc.core.channel.v1.IMsgChannelOpenInitResponse=} [properties] Properties to set + * @returns {ibc.core.channel.v1.MsgChannelOpenInitResponse} MsgChannelOpenInitResponse instance + */ + MsgChannelOpenInitResponse.create = function create(properties) { + return new MsgChannelOpenInitResponse(properties); + }; + + /** + * Encodes the specified MsgChannelOpenInitResponse message. Does not implicitly {@link ibc.core.channel.v1.MsgChannelOpenInitResponse.verify|verify} messages. + * @function encode + * @memberof ibc.core.channel.v1.MsgChannelOpenInitResponse + * @static + * @param {ibc.core.channel.v1.IMsgChannelOpenInitResponse} message MsgChannelOpenInitResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgChannelOpenInitResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MsgChannelOpenInitResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.MsgChannelOpenInitResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.channel.v1.MsgChannelOpenInitResponse + * @static + * @param {ibc.core.channel.v1.IMsgChannelOpenInitResponse} message MsgChannelOpenInitResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgChannelOpenInitResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgChannelOpenInitResponse message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.channel.v1.MsgChannelOpenInitResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.channel.v1.MsgChannelOpenInitResponse} MsgChannelOpenInitResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgChannelOpenInitResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.MsgChannelOpenInitResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgChannelOpenInitResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.channel.v1.MsgChannelOpenInitResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.channel.v1.MsgChannelOpenInitResponse} MsgChannelOpenInitResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgChannelOpenInitResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgChannelOpenInitResponse message. + * @function verify + * @memberof ibc.core.channel.v1.MsgChannelOpenInitResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgChannelOpenInitResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MsgChannelOpenInitResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.channel.v1.MsgChannelOpenInitResponse + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.channel.v1.MsgChannelOpenInitResponse} MsgChannelOpenInitResponse + */ + MsgChannelOpenInitResponse.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.channel.v1.MsgChannelOpenInitResponse) + return object; + return new $root.ibc.core.channel.v1.MsgChannelOpenInitResponse(); + }; + + /** + * Creates a plain object from a MsgChannelOpenInitResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.channel.v1.MsgChannelOpenInitResponse + * @static + * @param {ibc.core.channel.v1.MsgChannelOpenInitResponse} message MsgChannelOpenInitResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgChannelOpenInitResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MsgChannelOpenInitResponse to JSON. + * @function toJSON + * @memberof ibc.core.channel.v1.MsgChannelOpenInitResponse + * @instance + * @returns {Object.} JSON object + */ + MsgChannelOpenInitResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgChannelOpenInitResponse; + })(v1.MsgChannelOpenInitResponse || {}); + + v1.MsgChannelOpenTry = (function(MsgChannelOpenTry) { + + /** + * Properties of a MsgChannelOpenTry. + * @memberof ibc.core.channel.v1 + * @interface IMsgChannelOpenTry + * @property {string|null} [portId] MsgChannelOpenTry portId + * @property {string|null} [previousChannelId] MsgChannelOpenTry previousChannelId + * @property {ibc.core.channel.v1.IChannel|null} [channel] MsgChannelOpenTry channel + * @property {string|null} [counterpartyVersion] MsgChannelOpenTry counterpartyVersion + * @property {Uint8Array|null} [proofInit] MsgChannelOpenTry proofInit + * @property {ibc.core.client.v1.IHeight|null} [proofHeight] MsgChannelOpenTry proofHeight + * @property {string|null} [signer] MsgChannelOpenTry signer + */ + + /** + * Constructs a new MsgChannelOpenTry. + * @memberof ibc.core.channel.v1 + * @classdesc Represents a MsgChannelOpenTry. + * @implements IMsgChannelOpenTry + * @constructor + * @param {ibc.core.channel.v1.IMsgChannelOpenTry=} [properties] Properties to set + */ + function MsgChannelOpenTry(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgChannelOpenTry portId. + * @member {string} portId + * @memberof ibc.core.channel.v1.MsgChannelOpenTry + * @instance + */ + MsgChannelOpenTry.prototype.portId = ""; + + /** + * MsgChannelOpenTry previousChannelId. + * @member {string} previousChannelId + * @memberof ibc.core.channel.v1.MsgChannelOpenTry + * @instance + */ + MsgChannelOpenTry.prototype.previousChannelId = ""; + + /** + * MsgChannelOpenTry channel. + * @member {ibc.core.channel.v1.IChannel|null|undefined} channel + * @memberof ibc.core.channel.v1.MsgChannelOpenTry + * @instance + */ + MsgChannelOpenTry.prototype.channel = null; + + /** + * MsgChannelOpenTry counterpartyVersion. + * @member {string} counterpartyVersion + * @memberof ibc.core.channel.v1.MsgChannelOpenTry + * @instance + */ + MsgChannelOpenTry.prototype.counterpartyVersion = ""; + + /** + * MsgChannelOpenTry proofInit. + * @member {Uint8Array} proofInit + * @memberof ibc.core.channel.v1.MsgChannelOpenTry + * @instance + */ + MsgChannelOpenTry.prototype.proofInit = $util.newBuffer([]); + + /** + * MsgChannelOpenTry proofHeight. + * @member {ibc.core.client.v1.IHeight|null|undefined} proofHeight + * @memberof ibc.core.channel.v1.MsgChannelOpenTry + * @instance + */ + MsgChannelOpenTry.prototype.proofHeight = null; + + /** + * MsgChannelOpenTry signer. + * @member {string} signer + * @memberof ibc.core.channel.v1.MsgChannelOpenTry + * @instance + */ + MsgChannelOpenTry.prototype.signer = ""; + + /** + * Creates a new MsgChannelOpenTry instance using the specified properties. + * @function create + * @memberof ibc.core.channel.v1.MsgChannelOpenTry + * @static + * @param {ibc.core.channel.v1.IMsgChannelOpenTry=} [properties] Properties to set + * @returns {ibc.core.channel.v1.MsgChannelOpenTry} MsgChannelOpenTry instance + */ + MsgChannelOpenTry.create = function create(properties) { + return new MsgChannelOpenTry(properties); + }; + + /** + * Encodes the specified MsgChannelOpenTry message. Does not implicitly {@link ibc.core.channel.v1.MsgChannelOpenTry.verify|verify} messages. + * @function encode + * @memberof ibc.core.channel.v1.MsgChannelOpenTry + * @static + * @param {ibc.core.channel.v1.IMsgChannelOpenTry} message MsgChannelOpenTry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgChannelOpenTry.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.portId != null && Object.hasOwnProperty.call(message, "portId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.portId); + if (message.previousChannelId != null && Object.hasOwnProperty.call(message, "previousChannelId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.previousChannelId); + if (message.channel != null && Object.hasOwnProperty.call(message, "channel")) + $root.ibc.core.channel.v1.Channel.encode(message.channel, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.counterpartyVersion != null && Object.hasOwnProperty.call(message, "counterpartyVersion")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.counterpartyVersion); + if (message.proofInit != null && Object.hasOwnProperty.call(message, "proofInit")) + writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.proofInit); + if (message.proofHeight != null && Object.hasOwnProperty.call(message, "proofHeight")) + $root.ibc.core.client.v1.Height.encode(message.proofHeight, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.signer); + return writer; + }; + + /** + * Encodes the specified MsgChannelOpenTry message, length delimited. Does not implicitly {@link ibc.core.channel.v1.MsgChannelOpenTry.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.channel.v1.MsgChannelOpenTry + * @static + * @param {ibc.core.channel.v1.IMsgChannelOpenTry} message MsgChannelOpenTry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgChannelOpenTry.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgChannelOpenTry message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.channel.v1.MsgChannelOpenTry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.channel.v1.MsgChannelOpenTry} MsgChannelOpenTry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgChannelOpenTry.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.MsgChannelOpenTry(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.portId = reader.string(); + break; + case 2: + message.previousChannelId = reader.string(); + break; + case 3: + message.channel = $root.ibc.core.channel.v1.Channel.decode(reader, reader.uint32()); + break; + case 4: + message.counterpartyVersion = reader.string(); + break; + case 5: + message.proofInit = reader.bytes(); + break; + case 6: + message.proofHeight = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); + break; + case 7: + message.signer = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgChannelOpenTry message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.channel.v1.MsgChannelOpenTry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.channel.v1.MsgChannelOpenTry} MsgChannelOpenTry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgChannelOpenTry.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgChannelOpenTry message. + * @function verify + * @memberof ibc.core.channel.v1.MsgChannelOpenTry + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgChannelOpenTry.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.portId != null && message.hasOwnProperty("portId")) + if (!$util.isString(message.portId)) + return "portId: string expected"; + if (message.previousChannelId != null && message.hasOwnProperty("previousChannelId")) + if (!$util.isString(message.previousChannelId)) + return "previousChannelId: string expected"; + if (message.channel != null && message.hasOwnProperty("channel")) { + let error = $root.ibc.core.channel.v1.Channel.verify(message.channel); + if (error) + return "channel." + error; + } + if (message.counterpartyVersion != null && message.hasOwnProperty("counterpartyVersion")) + if (!$util.isString(message.counterpartyVersion)) + return "counterpartyVersion: string expected"; + if (message.proofInit != null && message.hasOwnProperty("proofInit")) + if (!(message.proofInit && typeof message.proofInit.length === "number" || $util.isString(message.proofInit))) + return "proofInit: buffer expected"; + if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) { + let error = $root.ibc.core.client.v1.Height.verify(message.proofHeight); + if (error) + return "proofHeight." + error; + } + if (message.signer != null && message.hasOwnProperty("signer")) + if (!$util.isString(message.signer)) + return "signer: string expected"; + return null; + }; + + /** + * Creates a MsgChannelOpenTry message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.channel.v1.MsgChannelOpenTry + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.channel.v1.MsgChannelOpenTry} MsgChannelOpenTry + */ + MsgChannelOpenTry.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.channel.v1.MsgChannelOpenTry) + return object; + let message = new $root.ibc.core.channel.v1.MsgChannelOpenTry(); + if (object.portId != null) + message.portId = String(object.portId); + if (object.previousChannelId != null) + message.previousChannelId = String(object.previousChannelId); + if (object.channel != null) { + if (typeof object.channel !== "object") + throw TypeError(".ibc.core.channel.v1.MsgChannelOpenTry.channel: object expected"); + message.channel = $root.ibc.core.channel.v1.Channel.fromObject(object.channel); + } + if (object.counterpartyVersion != null) + message.counterpartyVersion = String(object.counterpartyVersion); + if (object.proofInit != null) + if (typeof object.proofInit === "string") + $util.base64.decode(object.proofInit, message.proofInit = $util.newBuffer($util.base64.length(object.proofInit)), 0); + else if (object.proofInit.length) + message.proofInit = object.proofInit; + if (object.proofHeight != null) { + if (typeof object.proofHeight !== "object") + throw TypeError(".ibc.core.channel.v1.MsgChannelOpenTry.proofHeight: object expected"); + message.proofHeight = $root.ibc.core.client.v1.Height.fromObject(object.proofHeight); + } + if (object.signer != null) + message.signer = String(object.signer); + return message; + }; + + /** + * Creates a plain object from a MsgChannelOpenTry message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.channel.v1.MsgChannelOpenTry + * @static + * @param {ibc.core.channel.v1.MsgChannelOpenTry} message MsgChannelOpenTry + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgChannelOpenTry.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.portId = ""; + object.previousChannelId = ""; + object.channel = null; + object.counterpartyVersion = ""; + if (options.bytes === String) + object.proofInit = ""; + else { + object.proofInit = []; + if (options.bytes !== Array) + object.proofInit = $util.newBuffer(object.proofInit); + } + object.proofHeight = null; + object.signer = ""; + } + if (message.portId != null && message.hasOwnProperty("portId")) + object.portId = message.portId; + if (message.previousChannelId != null && message.hasOwnProperty("previousChannelId")) + object.previousChannelId = message.previousChannelId; + if (message.channel != null && message.hasOwnProperty("channel")) + object.channel = $root.ibc.core.channel.v1.Channel.toObject(message.channel, options); + if (message.counterpartyVersion != null && message.hasOwnProperty("counterpartyVersion")) + object.counterpartyVersion = message.counterpartyVersion; + if (message.proofInit != null && message.hasOwnProperty("proofInit")) + object.proofInit = options.bytes === String ? $util.base64.encode(message.proofInit, 0, message.proofInit.length) : options.bytes === Array ? Array.prototype.slice.call(message.proofInit) : message.proofInit; + if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) + object.proofHeight = $root.ibc.core.client.v1.Height.toObject(message.proofHeight, options); + if (message.signer != null && message.hasOwnProperty("signer")) + object.signer = message.signer; + return object; + }; + + /** + * Converts this MsgChannelOpenTry to JSON. + * @function toJSON + * @memberof ibc.core.channel.v1.MsgChannelOpenTry + * @instance + * @returns {Object.} JSON object + */ + MsgChannelOpenTry.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgChannelOpenTry; + })(v1.MsgChannelOpenTry || {}); + + v1.MsgChannelOpenTryResponse = (function(MsgChannelOpenTryResponse) { + + /** + * Properties of a MsgChannelOpenTryResponse. + * @memberof ibc.core.channel.v1 + * @interface IMsgChannelOpenTryResponse + */ + + /** + * Constructs a new MsgChannelOpenTryResponse. + * @memberof ibc.core.channel.v1 + * @classdesc Represents a MsgChannelOpenTryResponse. + * @implements IMsgChannelOpenTryResponse + * @constructor + * @param {ibc.core.channel.v1.IMsgChannelOpenTryResponse=} [properties] Properties to set + */ + function MsgChannelOpenTryResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new MsgChannelOpenTryResponse instance using the specified properties. + * @function create + * @memberof ibc.core.channel.v1.MsgChannelOpenTryResponse + * @static + * @param {ibc.core.channel.v1.IMsgChannelOpenTryResponse=} [properties] Properties to set + * @returns {ibc.core.channel.v1.MsgChannelOpenTryResponse} MsgChannelOpenTryResponse instance + */ + MsgChannelOpenTryResponse.create = function create(properties) { + return new MsgChannelOpenTryResponse(properties); + }; + + /** + * Encodes the specified MsgChannelOpenTryResponse message. Does not implicitly {@link ibc.core.channel.v1.MsgChannelOpenTryResponse.verify|verify} messages. + * @function encode + * @memberof ibc.core.channel.v1.MsgChannelOpenTryResponse + * @static + * @param {ibc.core.channel.v1.IMsgChannelOpenTryResponse} message MsgChannelOpenTryResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgChannelOpenTryResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MsgChannelOpenTryResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.MsgChannelOpenTryResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.channel.v1.MsgChannelOpenTryResponse + * @static + * @param {ibc.core.channel.v1.IMsgChannelOpenTryResponse} message MsgChannelOpenTryResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgChannelOpenTryResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgChannelOpenTryResponse message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.channel.v1.MsgChannelOpenTryResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.channel.v1.MsgChannelOpenTryResponse} MsgChannelOpenTryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgChannelOpenTryResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.MsgChannelOpenTryResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgChannelOpenTryResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.channel.v1.MsgChannelOpenTryResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.channel.v1.MsgChannelOpenTryResponse} MsgChannelOpenTryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgChannelOpenTryResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgChannelOpenTryResponse message. + * @function verify + * @memberof ibc.core.channel.v1.MsgChannelOpenTryResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgChannelOpenTryResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MsgChannelOpenTryResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.channel.v1.MsgChannelOpenTryResponse + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.channel.v1.MsgChannelOpenTryResponse} MsgChannelOpenTryResponse + */ + MsgChannelOpenTryResponse.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.channel.v1.MsgChannelOpenTryResponse) + return object; + return new $root.ibc.core.channel.v1.MsgChannelOpenTryResponse(); + }; + + /** + * Creates a plain object from a MsgChannelOpenTryResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.channel.v1.MsgChannelOpenTryResponse + * @static + * @param {ibc.core.channel.v1.MsgChannelOpenTryResponse} message MsgChannelOpenTryResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgChannelOpenTryResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MsgChannelOpenTryResponse to JSON. + * @function toJSON + * @memberof ibc.core.channel.v1.MsgChannelOpenTryResponse + * @instance + * @returns {Object.} JSON object + */ + MsgChannelOpenTryResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgChannelOpenTryResponse; + })(v1.MsgChannelOpenTryResponse || {}); + + v1.MsgChannelOpenAck = (function(MsgChannelOpenAck) { + + /** + * Properties of a MsgChannelOpenAck. + * @memberof ibc.core.channel.v1 + * @interface IMsgChannelOpenAck + * @property {string|null} [portId] MsgChannelOpenAck portId + * @property {string|null} [channelId] MsgChannelOpenAck channelId + * @property {string|null} [counterpartyChannelId] MsgChannelOpenAck counterpartyChannelId + * @property {string|null} [counterpartyVersion] MsgChannelOpenAck counterpartyVersion + * @property {Uint8Array|null} [proofTry] MsgChannelOpenAck proofTry + * @property {ibc.core.client.v1.IHeight|null} [proofHeight] MsgChannelOpenAck proofHeight + * @property {string|null} [signer] MsgChannelOpenAck signer + */ + + /** + * Constructs a new MsgChannelOpenAck. + * @memberof ibc.core.channel.v1 + * @classdesc Represents a MsgChannelOpenAck. + * @implements IMsgChannelOpenAck + * @constructor + * @param {ibc.core.channel.v1.IMsgChannelOpenAck=} [properties] Properties to set + */ + function MsgChannelOpenAck(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgChannelOpenAck portId. + * @member {string} portId + * @memberof ibc.core.channel.v1.MsgChannelOpenAck + * @instance + */ + MsgChannelOpenAck.prototype.portId = ""; + + /** + * MsgChannelOpenAck channelId. + * @member {string} channelId + * @memberof ibc.core.channel.v1.MsgChannelOpenAck + * @instance + */ + MsgChannelOpenAck.prototype.channelId = ""; + + /** + * MsgChannelOpenAck counterpartyChannelId. + * @member {string} counterpartyChannelId + * @memberof ibc.core.channel.v1.MsgChannelOpenAck + * @instance + */ + MsgChannelOpenAck.prototype.counterpartyChannelId = ""; + + /** + * MsgChannelOpenAck counterpartyVersion. + * @member {string} counterpartyVersion + * @memberof ibc.core.channel.v1.MsgChannelOpenAck + * @instance + */ + MsgChannelOpenAck.prototype.counterpartyVersion = ""; + + /** + * MsgChannelOpenAck proofTry. + * @member {Uint8Array} proofTry + * @memberof ibc.core.channel.v1.MsgChannelOpenAck + * @instance + */ + MsgChannelOpenAck.prototype.proofTry = $util.newBuffer([]); + + /** + * MsgChannelOpenAck proofHeight. + * @member {ibc.core.client.v1.IHeight|null|undefined} proofHeight + * @memberof ibc.core.channel.v1.MsgChannelOpenAck + * @instance + */ + MsgChannelOpenAck.prototype.proofHeight = null; + + /** + * MsgChannelOpenAck signer. + * @member {string} signer + * @memberof ibc.core.channel.v1.MsgChannelOpenAck + * @instance + */ + MsgChannelOpenAck.prototype.signer = ""; + + /** + * Creates a new MsgChannelOpenAck instance using the specified properties. + * @function create + * @memberof ibc.core.channel.v1.MsgChannelOpenAck + * @static + * @param {ibc.core.channel.v1.IMsgChannelOpenAck=} [properties] Properties to set + * @returns {ibc.core.channel.v1.MsgChannelOpenAck} MsgChannelOpenAck instance + */ + MsgChannelOpenAck.create = function create(properties) { + return new MsgChannelOpenAck(properties); + }; + + /** + * Encodes the specified MsgChannelOpenAck message. Does not implicitly {@link ibc.core.channel.v1.MsgChannelOpenAck.verify|verify} messages. + * @function encode + * @memberof ibc.core.channel.v1.MsgChannelOpenAck + * @static + * @param {ibc.core.channel.v1.IMsgChannelOpenAck} message MsgChannelOpenAck message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgChannelOpenAck.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.portId != null && Object.hasOwnProperty.call(message, "portId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.portId); + if (message.channelId != null && Object.hasOwnProperty.call(message, "channelId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.channelId); + if (message.counterpartyChannelId != null && Object.hasOwnProperty.call(message, "counterpartyChannelId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.counterpartyChannelId); + if (message.counterpartyVersion != null && Object.hasOwnProperty.call(message, "counterpartyVersion")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.counterpartyVersion); + if (message.proofTry != null && Object.hasOwnProperty.call(message, "proofTry")) + writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.proofTry); + if (message.proofHeight != null && Object.hasOwnProperty.call(message, "proofHeight")) + $root.ibc.core.client.v1.Height.encode(message.proofHeight, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.signer); + return writer; + }; + + /** + * Encodes the specified MsgChannelOpenAck message, length delimited. Does not implicitly {@link ibc.core.channel.v1.MsgChannelOpenAck.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.channel.v1.MsgChannelOpenAck + * @static + * @param {ibc.core.channel.v1.IMsgChannelOpenAck} message MsgChannelOpenAck message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgChannelOpenAck.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgChannelOpenAck message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.channel.v1.MsgChannelOpenAck + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.channel.v1.MsgChannelOpenAck} MsgChannelOpenAck + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgChannelOpenAck.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.MsgChannelOpenAck(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.portId = reader.string(); + break; + case 2: + message.channelId = reader.string(); + break; + case 3: + message.counterpartyChannelId = reader.string(); + break; + case 4: + message.counterpartyVersion = reader.string(); + break; + case 5: + message.proofTry = reader.bytes(); + break; + case 6: + message.proofHeight = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); + break; + case 7: + message.signer = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgChannelOpenAck message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.channel.v1.MsgChannelOpenAck + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.channel.v1.MsgChannelOpenAck} MsgChannelOpenAck + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgChannelOpenAck.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgChannelOpenAck message. + * @function verify + * @memberof ibc.core.channel.v1.MsgChannelOpenAck + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgChannelOpenAck.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.portId != null && message.hasOwnProperty("portId")) + if (!$util.isString(message.portId)) + return "portId: string expected"; + if (message.channelId != null && message.hasOwnProperty("channelId")) + if (!$util.isString(message.channelId)) + return "channelId: string expected"; + if (message.counterpartyChannelId != null && message.hasOwnProperty("counterpartyChannelId")) + if (!$util.isString(message.counterpartyChannelId)) + return "counterpartyChannelId: string expected"; + if (message.counterpartyVersion != null && message.hasOwnProperty("counterpartyVersion")) + if (!$util.isString(message.counterpartyVersion)) + return "counterpartyVersion: string expected"; + if (message.proofTry != null && message.hasOwnProperty("proofTry")) + if (!(message.proofTry && typeof message.proofTry.length === "number" || $util.isString(message.proofTry))) + return "proofTry: buffer expected"; + if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) { + let error = $root.ibc.core.client.v1.Height.verify(message.proofHeight); + if (error) + return "proofHeight." + error; + } + if (message.signer != null && message.hasOwnProperty("signer")) + if (!$util.isString(message.signer)) + return "signer: string expected"; + return null; + }; + + /** + * Creates a MsgChannelOpenAck message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.channel.v1.MsgChannelOpenAck + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.channel.v1.MsgChannelOpenAck} MsgChannelOpenAck + */ + MsgChannelOpenAck.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.channel.v1.MsgChannelOpenAck) + return object; + let message = new $root.ibc.core.channel.v1.MsgChannelOpenAck(); + if (object.portId != null) + message.portId = String(object.portId); + if (object.channelId != null) + message.channelId = String(object.channelId); + if (object.counterpartyChannelId != null) + message.counterpartyChannelId = String(object.counterpartyChannelId); + if (object.counterpartyVersion != null) + message.counterpartyVersion = String(object.counterpartyVersion); + if (object.proofTry != null) + if (typeof object.proofTry === "string") + $util.base64.decode(object.proofTry, message.proofTry = $util.newBuffer($util.base64.length(object.proofTry)), 0); + else if (object.proofTry.length) + message.proofTry = object.proofTry; + if (object.proofHeight != null) { + if (typeof object.proofHeight !== "object") + throw TypeError(".ibc.core.channel.v1.MsgChannelOpenAck.proofHeight: object expected"); + message.proofHeight = $root.ibc.core.client.v1.Height.fromObject(object.proofHeight); + } + if (object.signer != null) + message.signer = String(object.signer); + return message; + }; + + /** + * Creates a plain object from a MsgChannelOpenAck message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.channel.v1.MsgChannelOpenAck + * @static + * @param {ibc.core.channel.v1.MsgChannelOpenAck} message MsgChannelOpenAck + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgChannelOpenAck.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.portId = ""; + object.channelId = ""; + object.counterpartyChannelId = ""; + object.counterpartyVersion = ""; + if (options.bytes === String) + object.proofTry = ""; + else { + object.proofTry = []; + if (options.bytes !== Array) + object.proofTry = $util.newBuffer(object.proofTry); + } + object.proofHeight = null; + object.signer = ""; + } + if (message.portId != null && message.hasOwnProperty("portId")) + object.portId = message.portId; + if (message.channelId != null && message.hasOwnProperty("channelId")) + object.channelId = message.channelId; + if (message.counterpartyChannelId != null && message.hasOwnProperty("counterpartyChannelId")) + object.counterpartyChannelId = message.counterpartyChannelId; + if (message.counterpartyVersion != null && message.hasOwnProperty("counterpartyVersion")) + object.counterpartyVersion = message.counterpartyVersion; + if (message.proofTry != null && message.hasOwnProperty("proofTry")) + object.proofTry = options.bytes === String ? $util.base64.encode(message.proofTry, 0, message.proofTry.length) : options.bytes === Array ? Array.prototype.slice.call(message.proofTry) : message.proofTry; + if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) + object.proofHeight = $root.ibc.core.client.v1.Height.toObject(message.proofHeight, options); + if (message.signer != null && message.hasOwnProperty("signer")) + object.signer = message.signer; + return object; + }; + + /** + * Converts this MsgChannelOpenAck to JSON. + * @function toJSON + * @memberof ibc.core.channel.v1.MsgChannelOpenAck + * @instance + * @returns {Object.} JSON object + */ + MsgChannelOpenAck.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgChannelOpenAck; + })(v1.MsgChannelOpenAck || {}); + + v1.MsgChannelOpenAckResponse = (function(MsgChannelOpenAckResponse) { + + /** + * Properties of a MsgChannelOpenAckResponse. + * @memberof ibc.core.channel.v1 + * @interface IMsgChannelOpenAckResponse + */ + + /** + * Constructs a new MsgChannelOpenAckResponse. + * @memberof ibc.core.channel.v1 + * @classdesc Represents a MsgChannelOpenAckResponse. + * @implements IMsgChannelOpenAckResponse + * @constructor + * @param {ibc.core.channel.v1.IMsgChannelOpenAckResponse=} [properties] Properties to set + */ + function MsgChannelOpenAckResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new MsgChannelOpenAckResponse instance using the specified properties. + * @function create + * @memberof ibc.core.channel.v1.MsgChannelOpenAckResponse + * @static + * @param {ibc.core.channel.v1.IMsgChannelOpenAckResponse=} [properties] Properties to set + * @returns {ibc.core.channel.v1.MsgChannelOpenAckResponse} MsgChannelOpenAckResponse instance + */ + MsgChannelOpenAckResponse.create = function create(properties) { + return new MsgChannelOpenAckResponse(properties); + }; + + /** + * Encodes the specified MsgChannelOpenAckResponse message. Does not implicitly {@link ibc.core.channel.v1.MsgChannelOpenAckResponse.verify|verify} messages. + * @function encode + * @memberof ibc.core.channel.v1.MsgChannelOpenAckResponse + * @static + * @param {ibc.core.channel.v1.IMsgChannelOpenAckResponse} message MsgChannelOpenAckResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgChannelOpenAckResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MsgChannelOpenAckResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.MsgChannelOpenAckResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.channel.v1.MsgChannelOpenAckResponse + * @static + * @param {ibc.core.channel.v1.IMsgChannelOpenAckResponse} message MsgChannelOpenAckResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgChannelOpenAckResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgChannelOpenAckResponse message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.channel.v1.MsgChannelOpenAckResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.channel.v1.MsgChannelOpenAckResponse} MsgChannelOpenAckResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgChannelOpenAckResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.MsgChannelOpenAckResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgChannelOpenAckResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.channel.v1.MsgChannelOpenAckResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.channel.v1.MsgChannelOpenAckResponse} MsgChannelOpenAckResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgChannelOpenAckResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgChannelOpenAckResponse message. + * @function verify + * @memberof ibc.core.channel.v1.MsgChannelOpenAckResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgChannelOpenAckResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MsgChannelOpenAckResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.channel.v1.MsgChannelOpenAckResponse + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.channel.v1.MsgChannelOpenAckResponse} MsgChannelOpenAckResponse + */ + MsgChannelOpenAckResponse.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.channel.v1.MsgChannelOpenAckResponse) + return object; + return new $root.ibc.core.channel.v1.MsgChannelOpenAckResponse(); + }; + + /** + * Creates a plain object from a MsgChannelOpenAckResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.channel.v1.MsgChannelOpenAckResponse + * @static + * @param {ibc.core.channel.v1.MsgChannelOpenAckResponse} message MsgChannelOpenAckResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgChannelOpenAckResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MsgChannelOpenAckResponse to JSON. + * @function toJSON + * @memberof ibc.core.channel.v1.MsgChannelOpenAckResponse + * @instance + * @returns {Object.} JSON object + */ + MsgChannelOpenAckResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgChannelOpenAckResponse; + })(v1.MsgChannelOpenAckResponse || {}); + + v1.MsgChannelOpenConfirm = (function(MsgChannelOpenConfirm) { + + /** + * Properties of a MsgChannelOpenConfirm. + * @memberof ibc.core.channel.v1 + * @interface IMsgChannelOpenConfirm + * @property {string|null} [portId] MsgChannelOpenConfirm portId + * @property {string|null} [channelId] MsgChannelOpenConfirm channelId + * @property {Uint8Array|null} [proofAck] MsgChannelOpenConfirm proofAck + * @property {ibc.core.client.v1.IHeight|null} [proofHeight] MsgChannelOpenConfirm proofHeight + * @property {string|null} [signer] MsgChannelOpenConfirm signer + */ + + /** + * Constructs a new MsgChannelOpenConfirm. + * @memberof ibc.core.channel.v1 + * @classdesc Represents a MsgChannelOpenConfirm. + * @implements IMsgChannelOpenConfirm + * @constructor + * @param {ibc.core.channel.v1.IMsgChannelOpenConfirm=} [properties] Properties to set + */ + function MsgChannelOpenConfirm(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgChannelOpenConfirm portId. + * @member {string} portId + * @memberof ibc.core.channel.v1.MsgChannelOpenConfirm + * @instance + */ + MsgChannelOpenConfirm.prototype.portId = ""; + + /** + * MsgChannelOpenConfirm channelId. + * @member {string} channelId + * @memberof ibc.core.channel.v1.MsgChannelOpenConfirm + * @instance + */ + MsgChannelOpenConfirm.prototype.channelId = ""; + + /** + * MsgChannelOpenConfirm proofAck. + * @member {Uint8Array} proofAck + * @memberof ibc.core.channel.v1.MsgChannelOpenConfirm + * @instance + */ + MsgChannelOpenConfirm.prototype.proofAck = $util.newBuffer([]); + + /** + * MsgChannelOpenConfirm proofHeight. + * @member {ibc.core.client.v1.IHeight|null|undefined} proofHeight + * @memberof ibc.core.channel.v1.MsgChannelOpenConfirm + * @instance + */ + MsgChannelOpenConfirm.prototype.proofHeight = null; + + /** + * MsgChannelOpenConfirm signer. + * @member {string} signer + * @memberof ibc.core.channel.v1.MsgChannelOpenConfirm + * @instance + */ + MsgChannelOpenConfirm.prototype.signer = ""; + + /** + * Creates a new MsgChannelOpenConfirm instance using the specified properties. + * @function create + * @memberof ibc.core.channel.v1.MsgChannelOpenConfirm + * @static + * @param {ibc.core.channel.v1.IMsgChannelOpenConfirm=} [properties] Properties to set + * @returns {ibc.core.channel.v1.MsgChannelOpenConfirm} MsgChannelOpenConfirm instance + */ + MsgChannelOpenConfirm.create = function create(properties) { + return new MsgChannelOpenConfirm(properties); + }; + + /** + * Encodes the specified MsgChannelOpenConfirm message. Does not implicitly {@link ibc.core.channel.v1.MsgChannelOpenConfirm.verify|verify} messages. + * @function encode + * @memberof ibc.core.channel.v1.MsgChannelOpenConfirm + * @static + * @param {ibc.core.channel.v1.IMsgChannelOpenConfirm} message MsgChannelOpenConfirm message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgChannelOpenConfirm.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.portId != null && Object.hasOwnProperty.call(message, "portId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.portId); + if (message.channelId != null && Object.hasOwnProperty.call(message, "channelId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.channelId); + if (message.proofAck != null && Object.hasOwnProperty.call(message, "proofAck")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.proofAck); + if (message.proofHeight != null && Object.hasOwnProperty.call(message, "proofHeight")) + $root.ibc.core.client.v1.Height.encode(message.proofHeight, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.signer); + return writer; + }; + + /** + * Encodes the specified MsgChannelOpenConfirm message, length delimited. Does not implicitly {@link ibc.core.channel.v1.MsgChannelOpenConfirm.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.channel.v1.MsgChannelOpenConfirm + * @static + * @param {ibc.core.channel.v1.IMsgChannelOpenConfirm} message MsgChannelOpenConfirm message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgChannelOpenConfirm.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgChannelOpenConfirm message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.channel.v1.MsgChannelOpenConfirm + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.channel.v1.MsgChannelOpenConfirm} MsgChannelOpenConfirm + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgChannelOpenConfirm.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.MsgChannelOpenConfirm(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.portId = reader.string(); + break; + case 2: + message.channelId = reader.string(); + break; + case 3: + message.proofAck = reader.bytes(); + break; + case 4: + message.proofHeight = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); + break; + case 5: + message.signer = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgChannelOpenConfirm message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.channel.v1.MsgChannelOpenConfirm + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.channel.v1.MsgChannelOpenConfirm} MsgChannelOpenConfirm + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgChannelOpenConfirm.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgChannelOpenConfirm message. + * @function verify + * @memberof ibc.core.channel.v1.MsgChannelOpenConfirm + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgChannelOpenConfirm.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.portId != null && message.hasOwnProperty("portId")) + if (!$util.isString(message.portId)) + return "portId: string expected"; + if (message.channelId != null && message.hasOwnProperty("channelId")) + if (!$util.isString(message.channelId)) + return "channelId: string expected"; + if (message.proofAck != null && message.hasOwnProperty("proofAck")) + if (!(message.proofAck && typeof message.proofAck.length === "number" || $util.isString(message.proofAck))) + return "proofAck: buffer expected"; + if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) { + let error = $root.ibc.core.client.v1.Height.verify(message.proofHeight); + if (error) + return "proofHeight." + error; + } + if (message.signer != null && message.hasOwnProperty("signer")) + if (!$util.isString(message.signer)) + return "signer: string expected"; + return null; + }; + + /** + * Creates a MsgChannelOpenConfirm message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.channel.v1.MsgChannelOpenConfirm + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.channel.v1.MsgChannelOpenConfirm} MsgChannelOpenConfirm + */ + MsgChannelOpenConfirm.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.channel.v1.MsgChannelOpenConfirm) + return object; + let message = new $root.ibc.core.channel.v1.MsgChannelOpenConfirm(); + if (object.portId != null) + message.portId = String(object.portId); + if (object.channelId != null) + message.channelId = String(object.channelId); + if (object.proofAck != null) + if (typeof object.proofAck === "string") + $util.base64.decode(object.proofAck, message.proofAck = $util.newBuffer($util.base64.length(object.proofAck)), 0); + else if (object.proofAck.length) + message.proofAck = object.proofAck; + if (object.proofHeight != null) { + if (typeof object.proofHeight !== "object") + throw TypeError(".ibc.core.channel.v1.MsgChannelOpenConfirm.proofHeight: object expected"); + message.proofHeight = $root.ibc.core.client.v1.Height.fromObject(object.proofHeight); + } + if (object.signer != null) + message.signer = String(object.signer); + return message; + }; + + /** + * Creates a plain object from a MsgChannelOpenConfirm message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.channel.v1.MsgChannelOpenConfirm + * @static + * @param {ibc.core.channel.v1.MsgChannelOpenConfirm} message MsgChannelOpenConfirm + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgChannelOpenConfirm.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.portId = ""; + object.channelId = ""; + if (options.bytes === String) + object.proofAck = ""; + else { + object.proofAck = []; + if (options.bytes !== Array) + object.proofAck = $util.newBuffer(object.proofAck); + } + object.proofHeight = null; + object.signer = ""; + } + if (message.portId != null && message.hasOwnProperty("portId")) + object.portId = message.portId; + if (message.channelId != null && message.hasOwnProperty("channelId")) + object.channelId = message.channelId; + if (message.proofAck != null && message.hasOwnProperty("proofAck")) + object.proofAck = options.bytes === String ? $util.base64.encode(message.proofAck, 0, message.proofAck.length) : options.bytes === Array ? Array.prototype.slice.call(message.proofAck) : message.proofAck; + if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) + object.proofHeight = $root.ibc.core.client.v1.Height.toObject(message.proofHeight, options); + if (message.signer != null && message.hasOwnProperty("signer")) + object.signer = message.signer; + return object; + }; + + /** + * Converts this MsgChannelOpenConfirm to JSON. + * @function toJSON + * @memberof ibc.core.channel.v1.MsgChannelOpenConfirm + * @instance + * @returns {Object.} JSON object + */ + MsgChannelOpenConfirm.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgChannelOpenConfirm; + })(v1.MsgChannelOpenConfirm || {}); + + v1.MsgChannelOpenConfirmResponse = (function(MsgChannelOpenConfirmResponse) { + + /** + * Properties of a MsgChannelOpenConfirmResponse. + * @memberof ibc.core.channel.v1 + * @interface IMsgChannelOpenConfirmResponse + */ + + /** + * Constructs a new MsgChannelOpenConfirmResponse. + * @memberof ibc.core.channel.v1 + * @classdesc Represents a MsgChannelOpenConfirmResponse. + * @implements IMsgChannelOpenConfirmResponse + * @constructor + * @param {ibc.core.channel.v1.IMsgChannelOpenConfirmResponse=} [properties] Properties to set + */ + function MsgChannelOpenConfirmResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new MsgChannelOpenConfirmResponse instance using the specified properties. + * @function create + * @memberof ibc.core.channel.v1.MsgChannelOpenConfirmResponse + * @static + * @param {ibc.core.channel.v1.IMsgChannelOpenConfirmResponse=} [properties] Properties to set + * @returns {ibc.core.channel.v1.MsgChannelOpenConfirmResponse} MsgChannelOpenConfirmResponse instance + */ + MsgChannelOpenConfirmResponse.create = function create(properties) { + return new MsgChannelOpenConfirmResponse(properties); + }; + + /** + * Encodes the specified MsgChannelOpenConfirmResponse message. Does not implicitly {@link ibc.core.channel.v1.MsgChannelOpenConfirmResponse.verify|verify} messages. + * @function encode + * @memberof ibc.core.channel.v1.MsgChannelOpenConfirmResponse + * @static + * @param {ibc.core.channel.v1.IMsgChannelOpenConfirmResponse} message MsgChannelOpenConfirmResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgChannelOpenConfirmResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MsgChannelOpenConfirmResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.MsgChannelOpenConfirmResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.channel.v1.MsgChannelOpenConfirmResponse + * @static + * @param {ibc.core.channel.v1.IMsgChannelOpenConfirmResponse} message MsgChannelOpenConfirmResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgChannelOpenConfirmResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgChannelOpenConfirmResponse message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.channel.v1.MsgChannelOpenConfirmResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.channel.v1.MsgChannelOpenConfirmResponse} MsgChannelOpenConfirmResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgChannelOpenConfirmResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.MsgChannelOpenConfirmResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgChannelOpenConfirmResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.channel.v1.MsgChannelOpenConfirmResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.channel.v1.MsgChannelOpenConfirmResponse} MsgChannelOpenConfirmResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgChannelOpenConfirmResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgChannelOpenConfirmResponse message. + * @function verify + * @memberof ibc.core.channel.v1.MsgChannelOpenConfirmResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgChannelOpenConfirmResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MsgChannelOpenConfirmResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.channel.v1.MsgChannelOpenConfirmResponse + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.channel.v1.MsgChannelOpenConfirmResponse} MsgChannelOpenConfirmResponse + */ + MsgChannelOpenConfirmResponse.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.channel.v1.MsgChannelOpenConfirmResponse) + return object; + return new $root.ibc.core.channel.v1.MsgChannelOpenConfirmResponse(); + }; + + /** + * Creates a plain object from a MsgChannelOpenConfirmResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.channel.v1.MsgChannelOpenConfirmResponse + * @static + * @param {ibc.core.channel.v1.MsgChannelOpenConfirmResponse} message MsgChannelOpenConfirmResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgChannelOpenConfirmResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MsgChannelOpenConfirmResponse to JSON. + * @function toJSON + * @memberof ibc.core.channel.v1.MsgChannelOpenConfirmResponse + * @instance + * @returns {Object.} JSON object + */ + MsgChannelOpenConfirmResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgChannelOpenConfirmResponse; + })(v1.MsgChannelOpenConfirmResponse || {}); + + v1.MsgChannelCloseInit = (function(MsgChannelCloseInit) { + + /** + * Properties of a MsgChannelCloseInit. + * @memberof ibc.core.channel.v1 + * @interface IMsgChannelCloseInit + * @property {string|null} [portId] MsgChannelCloseInit portId + * @property {string|null} [channelId] MsgChannelCloseInit channelId + * @property {string|null} [signer] MsgChannelCloseInit signer + */ + + /** + * Constructs a new MsgChannelCloseInit. + * @memberof ibc.core.channel.v1 + * @classdesc Represents a MsgChannelCloseInit. + * @implements IMsgChannelCloseInit + * @constructor + * @param {ibc.core.channel.v1.IMsgChannelCloseInit=} [properties] Properties to set + */ + function MsgChannelCloseInit(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgChannelCloseInit portId. + * @member {string} portId + * @memberof ibc.core.channel.v1.MsgChannelCloseInit + * @instance + */ + MsgChannelCloseInit.prototype.portId = ""; + + /** + * MsgChannelCloseInit channelId. + * @member {string} channelId + * @memberof ibc.core.channel.v1.MsgChannelCloseInit + * @instance + */ + MsgChannelCloseInit.prototype.channelId = ""; + + /** + * MsgChannelCloseInit signer. + * @member {string} signer + * @memberof ibc.core.channel.v1.MsgChannelCloseInit + * @instance + */ + MsgChannelCloseInit.prototype.signer = ""; + + /** + * Creates a new MsgChannelCloseInit instance using the specified properties. + * @function create + * @memberof ibc.core.channel.v1.MsgChannelCloseInit + * @static + * @param {ibc.core.channel.v1.IMsgChannelCloseInit=} [properties] Properties to set + * @returns {ibc.core.channel.v1.MsgChannelCloseInit} MsgChannelCloseInit instance + */ + MsgChannelCloseInit.create = function create(properties) { + return new MsgChannelCloseInit(properties); + }; + + /** + * Encodes the specified MsgChannelCloseInit message. Does not implicitly {@link ibc.core.channel.v1.MsgChannelCloseInit.verify|verify} messages. + * @function encode + * @memberof ibc.core.channel.v1.MsgChannelCloseInit + * @static + * @param {ibc.core.channel.v1.IMsgChannelCloseInit} message MsgChannelCloseInit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgChannelCloseInit.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.portId != null && Object.hasOwnProperty.call(message, "portId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.portId); + if (message.channelId != null && Object.hasOwnProperty.call(message, "channelId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.channelId); + if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.signer); + return writer; + }; + + /** + * Encodes the specified MsgChannelCloseInit message, length delimited. Does not implicitly {@link ibc.core.channel.v1.MsgChannelCloseInit.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.channel.v1.MsgChannelCloseInit + * @static + * @param {ibc.core.channel.v1.IMsgChannelCloseInit} message MsgChannelCloseInit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgChannelCloseInit.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgChannelCloseInit message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.channel.v1.MsgChannelCloseInit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.channel.v1.MsgChannelCloseInit} MsgChannelCloseInit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgChannelCloseInit.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.MsgChannelCloseInit(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.portId = reader.string(); + break; + case 2: + message.channelId = reader.string(); + break; + case 3: + message.signer = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgChannelCloseInit message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.channel.v1.MsgChannelCloseInit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.channel.v1.MsgChannelCloseInit} MsgChannelCloseInit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgChannelCloseInit.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgChannelCloseInit message. + * @function verify + * @memberof ibc.core.channel.v1.MsgChannelCloseInit + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgChannelCloseInit.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.portId != null && message.hasOwnProperty("portId")) + if (!$util.isString(message.portId)) + return "portId: string expected"; + if (message.channelId != null && message.hasOwnProperty("channelId")) + if (!$util.isString(message.channelId)) + return "channelId: string expected"; + if (message.signer != null && message.hasOwnProperty("signer")) + if (!$util.isString(message.signer)) + return "signer: string expected"; + return null; + }; + + /** + * Creates a MsgChannelCloseInit message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.channel.v1.MsgChannelCloseInit + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.channel.v1.MsgChannelCloseInit} MsgChannelCloseInit + */ + MsgChannelCloseInit.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.channel.v1.MsgChannelCloseInit) + return object; + let message = new $root.ibc.core.channel.v1.MsgChannelCloseInit(); + if (object.portId != null) + message.portId = String(object.portId); + if (object.channelId != null) + message.channelId = String(object.channelId); + if (object.signer != null) + message.signer = String(object.signer); + return message; + }; + + /** + * Creates a plain object from a MsgChannelCloseInit message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.channel.v1.MsgChannelCloseInit + * @static + * @param {ibc.core.channel.v1.MsgChannelCloseInit} message MsgChannelCloseInit + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgChannelCloseInit.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.portId = ""; + object.channelId = ""; + object.signer = ""; + } + if (message.portId != null && message.hasOwnProperty("portId")) + object.portId = message.portId; + if (message.channelId != null && message.hasOwnProperty("channelId")) + object.channelId = message.channelId; + if (message.signer != null && message.hasOwnProperty("signer")) + object.signer = message.signer; + return object; + }; + + /** + * Converts this MsgChannelCloseInit to JSON. + * @function toJSON + * @memberof ibc.core.channel.v1.MsgChannelCloseInit + * @instance + * @returns {Object.} JSON object + */ + MsgChannelCloseInit.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgChannelCloseInit; + })(v1.MsgChannelCloseInit || {}); + + v1.MsgChannelCloseInitResponse = (function(MsgChannelCloseInitResponse) { + + /** + * Properties of a MsgChannelCloseInitResponse. + * @memberof ibc.core.channel.v1 + * @interface IMsgChannelCloseInitResponse + */ + + /** + * Constructs a new MsgChannelCloseInitResponse. + * @memberof ibc.core.channel.v1 + * @classdesc Represents a MsgChannelCloseInitResponse. + * @implements IMsgChannelCloseInitResponse + * @constructor + * @param {ibc.core.channel.v1.IMsgChannelCloseInitResponse=} [properties] Properties to set + */ + function MsgChannelCloseInitResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new MsgChannelCloseInitResponse instance using the specified properties. + * @function create + * @memberof ibc.core.channel.v1.MsgChannelCloseInitResponse + * @static + * @param {ibc.core.channel.v1.IMsgChannelCloseInitResponse=} [properties] Properties to set + * @returns {ibc.core.channel.v1.MsgChannelCloseInitResponse} MsgChannelCloseInitResponse instance + */ + MsgChannelCloseInitResponse.create = function create(properties) { + return new MsgChannelCloseInitResponse(properties); + }; + + /** + * Encodes the specified MsgChannelCloseInitResponse message. Does not implicitly {@link ibc.core.channel.v1.MsgChannelCloseInitResponse.verify|verify} messages. + * @function encode + * @memberof ibc.core.channel.v1.MsgChannelCloseInitResponse + * @static + * @param {ibc.core.channel.v1.IMsgChannelCloseInitResponse} message MsgChannelCloseInitResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgChannelCloseInitResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MsgChannelCloseInitResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.MsgChannelCloseInitResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.channel.v1.MsgChannelCloseInitResponse + * @static + * @param {ibc.core.channel.v1.IMsgChannelCloseInitResponse} message MsgChannelCloseInitResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgChannelCloseInitResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgChannelCloseInitResponse message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.channel.v1.MsgChannelCloseInitResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.channel.v1.MsgChannelCloseInitResponse} MsgChannelCloseInitResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgChannelCloseInitResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.MsgChannelCloseInitResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgChannelCloseInitResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.channel.v1.MsgChannelCloseInitResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.channel.v1.MsgChannelCloseInitResponse} MsgChannelCloseInitResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgChannelCloseInitResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgChannelCloseInitResponse message. + * @function verify + * @memberof ibc.core.channel.v1.MsgChannelCloseInitResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgChannelCloseInitResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MsgChannelCloseInitResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.channel.v1.MsgChannelCloseInitResponse + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.channel.v1.MsgChannelCloseInitResponse} MsgChannelCloseInitResponse + */ + MsgChannelCloseInitResponse.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.channel.v1.MsgChannelCloseInitResponse) + return object; + return new $root.ibc.core.channel.v1.MsgChannelCloseInitResponse(); + }; + + /** + * Creates a plain object from a MsgChannelCloseInitResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.channel.v1.MsgChannelCloseInitResponse + * @static + * @param {ibc.core.channel.v1.MsgChannelCloseInitResponse} message MsgChannelCloseInitResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgChannelCloseInitResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MsgChannelCloseInitResponse to JSON. + * @function toJSON + * @memberof ibc.core.channel.v1.MsgChannelCloseInitResponse + * @instance + * @returns {Object.} JSON object + */ + MsgChannelCloseInitResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgChannelCloseInitResponse; + })(v1.MsgChannelCloseInitResponse || {}); + + v1.MsgChannelCloseConfirm = (function(MsgChannelCloseConfirm) { + + /** + * Properties of a MsgChannelCloseConfirm. + * @memberof ibc.core.channel.v1 + * @interface IMsgChannelCloseConfirm + * @property {string|null} [portId] MsgChannelCloseConfirm portId + * @property {string|null} [channelId] MsgChannelCloseConfirm channelId + * @property {Uint8Array|null} [proofInit] MsgChannelCloseConfirm proofInit + * @property {ibc.core.client.v1.IHeight|null} [proofHeight] MsgChannelCloseConfirm proofHeight + * @property {string|null} [signer] MsgChannelCloseConfirm signer + */ + + /** + * Constructs a new MsgChannelCloseConfirm. + * @memberof ibc.core.channel.v1 + * @classdesc Represents a MsgChannelCloseConfirm. + * @implements IMsgChannelCloseConfirm + * @constructor + * @param {ibc.core.channel.v1.IMsgChannelCloseConfirm=} [properties] Properties to set + */ + function MsgChannelCloseConfirm(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgChannelCloseConfirm portId. + * @member {string} portId + * @memberof ibc.core.channel.v1.MsgChannelCloseConfirm + * @instance + */ + MsgChannelCloseConfirm.prototype.portId = ""; + + /** + * MsgChannelCloseConfirm channelId. + * @member {string} channelId + * @memberof ibc.core.channel.v1.MsgChannelCloseConfirm + * @instance + */ + MsgChannelCloseConfirm.prototype.channelId = ""; + + /** + * MsgChannelCloseConfirm proofInit. + * @member {Uint8Array} proofInit + * @memberof ibc.core.channel.v1.MsgChannelCloseConfirm + * @instance + */ + MsgChannelCloseConfirm.prototype.proofInit = $util.newBuffer([]); + + /** + * MsgChannelCloseConfirm proofHeight. + * @member {ibc.core.client.v1.IHeight|null|undefined} proofHeight + * @memberof ibc.core.channel.v1.MsgChannelCloseConfirm + * @instance + */ + MsgChannelCloseConfirm.prototype.proofHeight = null; + + /** + * MsgChannelCloseConfirm signer. + * @member {string} signer + * @memberof ibc.core.channel.v1.MsgChannelCloseConfirm + * @instance + */ + MsgChannelCloseConfirm.prototype.signer = ""; + + /** + * Creates a new MsgChannelCloseConfirm instance using the specified properties. + * @function create + * @memberof ibc.core.channel.v1.MsgChannelCloseConfirm + * @static + * @param {ibc.core.channel.v1.IMsgChannelCloseConfirm=} [properties] Properties to set + * @returns {ibc.core.channel.v1.MsgChannelCloseConfirm} MsgChannelCloseConfirm instance + */ + MsgChannelCloseConfirm.create = function create(properties) { + return new MsgChannelCloseConfirm(properties); + }; + + /** + * Encodes the specified MsgChannelCloseConfirm message. Does not implicitly {@link ibc.core.channel.v1.MsgChannelCloseConfirm.verify|verify} messages. + * @function encode + * @memberof ibc.core.channel.v1.MsgChannelCloseConfirm + * @static + * @param {ibc.core.channel.v1.IMsgChannelCloseConfirm} message MsgChannelCloseConfirm message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgChannelCloseConfirm.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.portId != null && Object.hasOwnProperty.call(message, "portId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.portId); + if (message.channelId != null && Object.hasOwnProperty.call(message, "channelId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.channelId); + if (message.proofInit != null && Object.hasOwnProperty.call(message, "proofInit")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.proofInit); + if (message.proofHeight != null && Object.hasOwnProperty.call(message, "proofHeight")) + $root.ibc.core.client.v1.Height.encode(message.proofHeight, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.signer); + return writer; + }; + + /** + * Encodes the specified MsgChannelCloseConfirm message, length delimited. Does not implicitly {@link ibc.core.channel.v1.MsgChannelCloseConfirm.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.channel.v1.MsgChannelCloseConfirm + * @static + * @param {ibc.core.channel.v1.IMsgChannelCloseConfirm} message MsgChannelCloseConfirm message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgChannelCloseConfirm.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgChannelCloseConfirm message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.channel.v1.MsgChannelCloseConfirm + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.channel.v1.MsgChannelCloseConfirm} MsgChannelCloseConfirm + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgChannelCloseConfirm.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.MsgChannelCloseConfirm(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.portId = reader.string(); + break; + case 2: + message.channelId = reader.string(); + break; + case 3: + message.proofInit = reader.bytes(); + break; + case 4: + message.proofHeight = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); + break; + case 5: + message.signer = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgChannelCloseConfirm message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.channel.v1.MsgChannelCloseConfirm + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.channel.v1.MsgChannelCloseConfirm} MsgChannelCloseConfirm + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgChannelCloseConfirm.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgChannelCloseConfirm message. + * @function verify + * @memberof ibc.core.channel.v1.MsgChannelCloseConfirm + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgChannelCloseConfirm.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.portId != null && message.hasOwnProperty("portId")) + if (!$util.isString(message.portId)) + return "portId: string expected"; + if (message.channelId != null && message.hasOwnProperty("channelId")) + if (!$util.isString(message.channelId)) + return "channelId: string expected"; + if (message.proofInit != null && message.hasOwnProperty("proofInit")) + if (!(message.proofInit && typeof message.proofInit.length === "number" || $util.isString(message.proofInit))) + return "proofInit: buffer expected"; + if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) { + let error = $root.ibc.core.client.v1.Height.verify(message.proofHeight); + if (error) + return "proofHeight." + error; + } + if (message.signer != null && message.hasOwnProperty("signer")) + if (!$util.isString(message.signer)) + return "signer: string expected"; + return null; + }; + + /** + * Creates a MsgChannelCloseConfirm message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.channel.v1.MsgChannelCloseConfirm + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.channel.v1.MsgChannelCloseConfirm} MsgChannelCloseConfirm + */ + MsgChannelCloseConfirm.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.channel.v1.MsgChannelCloseConfirm) + return object; + let message = new $root.ibc.core.channel.v1.MsgChannelCloseConfirm(); + if (object.portId != null) + message.portId = String(object.portId); + if (object.channelId != null) + message.channelId = String(object.channelId); + if (object.proofInit != null) + if (typeof object.proofInit === "string") + $util.base64.decode(object.proofInit, message.proofInit = $util.newBuffer($util.base64.length(object.proofInit)), 0); + else if (object.proofInit.length) + message.proofInit = object.proofInit; + if (object.proofHeight != null) { + if (typeof object.proofHeight !== "object") + throw TypeError(".ibc.core.channel.v1.MsgChannelCloseConfirm.proofHeight: object expected"); + message.proofHeight = $root.ibc.core.client.v1.Height.fromObject(object.proofHeight); + } + if (object.signer != null) + message.signer = String(object.signer); + return message; + }; + + /** + * Creates a plain object from a MsgChannelCloseConfirm message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.channel.v1.MsgChannelCloseConfirm + * @static + * @param {ibc.core.channel.v1.MsgChannelCloseConfirm} message MsgChannelCloseConfirm + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgChannelCloseConfirm.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.portId = ""; + object.channelId = ""; + if (options.bytes === String) + object.proofInit = ""; + else { + object.proofInit = []; + if (options.bytes !== Array) + object.proofInit = $util.newBuffer(object.proofInit); + } + object.proofHeight = null; + object.signer = ""; + } + if (message.portId != null && message.hasOwnProperty("portId")) + object.portId = message.portId; + if (message.channelId != null && message.hasOwnProperty("channelId")) + object.channelId = message.channelId; + if (message.proofInit != null && message.hasOwnProperty("proofInit")) + object.proofInit = options.bytes === String ? $util.base64.encode(message.proofInit, 0, message.proofInit.length) : options.bytes === Array ? Array.prototype.slice.call(message.proofInit) : message.proofInit; + if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) + object.proofHeight = $root.ibc.core.client.v1.Height.toObject(message.proofHeight, options); + if (message.signer != null && message.hasOwnProperty("signer")) + object.signer = message.signer; + return object; + }; + + /** + * Converts this MsgChannelCloseConfirm to JSON. + * @function toJSON + * @memberof ibc.core.channel.v1.MsgChannelCloseConfirm + * @instance + * @returns {Object.} JSON object + */ + MsgChannelCloseConfirm.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgChannelCloseConfirm; + })(v1.MsgChannelCloseConfirm || {}); + + v1.MsgChannelCloseConfirmResponse = (function(MsgChannelCloseConfirmResponse) { + + /** + * Properties of a MsgChannelCloseConfirmResponse. + * @memberof ibc.core.channel.v1 + * @interface IMsgChannelCloseConfirmResponse + */ + + /** + * Constructs a new MsgChannelCloseConfirmResponse. + * @memberof ibc.core.channel.v1 + * @classdesc Represents a MsgChannelCloseConfirmResponse. + * @implements IMsgChannelCloseConfirmResponse + * @constructor + * @param {ibc.core.channel.v1.IMsgChannelCloseConfirmResponse=} [properties] Properties to set + */ + function MsgChannelCloseConfirmResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new MsgChannelCloseConfirmResponse instance using the specified properties. + * @function create + * @memberof ibc.core.channel.v1.MsgChannelCloseConfirmResponse + * @static + * @param {ibc.core.channel.v1.IMsgChannelCloseConfirmResponse=} [properties] Properties to set + * @returns {ibc.core.channel.v1.MsgChannelCloseConfirmResponse} MsgChannelCloseConfirmResponse instance + */ + MsgChannelCloseConfirmResponse.create = function create(properties) { + return new MsgChannelCloseConfirmResponse(properties); + }; + + /** + * Encodes the specified MsgChannelCloseConfirmResponse message. Does not implicitly {@link ibc.core.channel.v1.MsgChannelCloseConfirmResponse.verify|verify} messages. + * @function encode + * @memberof ibc.core.channel.v1.MsgChannelCloseConfirmResponse + * @static + * @param {ibc.core.channel.v1.IMsgChannelCloseConfirmResponse} message MsgChannelCloseConfirmResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgChannelCloseConfirmResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MsgChannelCloseConfirmResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.MsgChannelCloseConfirmResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.channel.v1.MsgChannelCloseConfirmResponse + * @static + * @param {ibc.core.channel.v1.IMsgChannelCloseConfirmResponse} message MsgChannelCloseConfirmResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgChannelCloseConfirmResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgChannelCloseConfirmResponse message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.channel.v1.MsgChannelCloseConfirmResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.channel.v1.MsgChannelCloseConfirmResponse} MsgChannelCloseConfirmResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgChannelCloseConfirmResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.MsgChannelCloseConfirmResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgChannelCloseConfirmResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.channel.v1.MsgChannelCloseConfirmResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.channel.v1.MsgChannelCloseConfirmResponse} MsgChannelCloseConfirmResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgChannelCloseConfirmResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgChannelCloseConfirmResponse message. + * @function verify + * @memberof ibc.core.channel.v1.MsgChannelCloseConfirmResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgChannelCloseConfirmResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MsgChannelCloseConfirmResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.channel.v1.MsgChannelCloseConfirmResponse + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.channel.v1.MsgChannelCloseConfirmResponse} MsgChannelCloseConfirmResponse + */ + MsgChannelCloseConfirmResponse.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.channel.v1.MsgChannelCloseConfirmResponse) + return object; + return new $root.ibc.core.channel.v1.MsgChannelCloseConfirmResponse(); + }; + + /** + * Creates a plain object from a MsgChannelCloseConfirmResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.channel.v1.MsgChannelCloseConfirmResponse + * @static + * @param {ibc.core.channel.v1.MsgChannelCloseConfirmResponse} message MsgChannelCloseConfirmResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgChannelCloseConfirmResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MsgChannelCloseConfirmResponse to JSON. + * @function toJSON + * @memberof ibc.core.channel.v1.MsgChannelCloseConfirmResponse + * @instance + * @returns {Object.} JSON object + */ + MsgChannelCloseConfirmResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgChannelCloseConfirmResponse; + })(v1.MsgChannelCloseConfirmResponse || {}); + + v1.MsgRecvPacket = (function(MsgRecvPacket) { + + /** + * Properties of a MsgRecvPacket. + * @memberof ibc.core.channel.v1 + * @interface IMsgRecvPacket + * @property {ibc.core.channel.v1.IPacket|null} [packet] MsgRecvPacket packet + * @property {Uint8Array|null} [proofCommitment] MsgRecvPacket proofCommitment + * @property {ibc.core.client.v1.IHeight|null} [proofHeight] MsgRecvPacket proofHeight + * @property {string|null} [signer] MsgRecvPacket signer + */ + + /** + * Constructs a new MsgRecvPacket. + * @memberof ibc.core.channel.v1 + * @classdesc Represents a MsgRecvPacket. + * @implements IMsgRecvPacket + * @constructor + * @param {ibc.core.channel.v1.IMsgRecvPacket=} [properties] Properties to set + */ + function MsgRecvPacket(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgRecvPacket packet. + * @member {ibc.core.channel.v1.IPacket|null|undefined} packet + * @memberof ibc.core.channel.v1.MsgRecvPacket + * @instance + */ + MsgRecvPacket.prototype.packet = null; + + /** + * MsgRecvPacket proofCommitment. + * @member {Uint8Array} proofCommitment + * @memberof ibc.core.channel.v1.MsgRecvPacket + * @instance + */ + MsgRecvPacket.prototype.proofCommitment = $util.newBuffer([]); + + /** + * MsgRecvPacket proofHeight. + * @member {ibc.core.client.v1.IHeight|null|undefined} proofHeight + * @memberof ibc.core.channel.v1.MsgRecvPacket + * @instance + */ + MsgRecvPacket.prototype.proofHeight = null; + + /** + * MsgRecvPacket signer. + * @member {string} signer + * @memberof ibc.core.channel.v1.MsgRecvPacket + * @instance + */ + MsgRecvPacket.prototype.signer = ""; + + /** + * Creates a new MsgRecvPacket instance using the specified properties. + * @function create + * @memberof ibc.core.channel.v1.MsgRecvPacket + * @static + * @param {ibc.core.channel.v1.IMsgRecvPacket=} [properties] Properties to set + * @returns {ibc.core.channel.v1.MsgRecvPacket} MsgRecvPacket instance + */ + MsgRecvPacket.create = function create(properties) { + return new MsgRecvPacket(properties); + }; + + /** + * Encodes the specified MsgRecvPacket message. Does not implicitly {@link ibc.core.channel.v1.MsgRecvPacket.verify|verify} messages. + * @function encode + * @memberof ibc.core.channel.v1.MsgRecvPacket + * @static + * @param {ibc.core.channel.v1.IMsgRecvPacket} message MsgRecvPacket message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgRecvPacket.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.packet != null && Object.hasOwnProperty.call(message, "packet")) + $root.ibc.core.channel.v1.Packet.encode(message.packet, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.proofCommitment != null && Object.hasOwnProperty.call(message, "proofCommitment")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.proofCommitment); + if (message.proofHeight != null && Object.hasOwnProperty.call(message, "proofHeight")) + $root.ibc.core.client.v1.Height.encode(message.proofHeight, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.signer); + return writer; + }; + + /** + * Encodes the specified MsgRecvPacket message, length delimited. Does not implicitly {@link ibc.core.channel.v1.MsgRecvPacket.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.channel.v1.MsgRecvPacket + * @static + * @param {ibc.core.channel.v1.IMsgRecvPacket} message MsgRecvPacket message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgRecvPacket.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgRecvPacket message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.channel.v1.MsgRecvPacket + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.channel.v1.MsgRecvPacket} MsgRecvPacket + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgRecvPacket.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.MsgRecvPacket(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.packet = $root.ibc.core.channel.v1.Packet.decode(reader, reader.uint32()); + break; + case 2: + message.proofCommitment = reader.bytes(); + break; + case 3: + message.proofHeight = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); + break; + case 4: + message.signer = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgRecvPacket message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.channel.v1.MsgRecvPacket + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.channel.v1.MsgRecvPacket} MsgRecvPacket + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgRecvPacket.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgRecvPacket message. + * @function verify + * @memberof ibc.core.channel.v1.MsgRecvPacket + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgRecvPacket.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.packet != null && message.hasOwnProperty("packet")) { + let error = $root.ibc.core.channel.v1.Packet.verify(message.packet); + if (error) + return "packet." + error; + } + if (message.proofCommitment != null && message.hasOwnProperty("proofCommitment")) + if (!(message.proofCommitment && typeof message.proofCommitment.length === "number" || $util.isString(message.proofCommitment))) + return "proofCommitment: buffer expected"; + if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) { + let error = $root.ibc.core.client.v1.Height.verify(message.proofHeight); + if (error) + return "proofHeight." + error; + } + if (message.signer != null && message.hasOwnProperty("signer")) + if (!$util.isString(message.signer)) + return "signer: string expected"; + return null; + }; + + /** + * Creates a MsgRecvPacket message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.channel.v1.MsgRecvPacket + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.channel.v1.MsgRecvPacket} MsgRecvPacket + */ + MsgRecvPacket.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.channel.v1.MsgRecvPacket) + return object; + let message = new $root.ibc.core.channel.v1.MsgRecvPacket(); + if (object.packet != null) { + if (typeof object.packet !== "object") + throw TypeError(".ibc.core.channel.v1.MsgRecvPacket.packet: object expected"); + message.packet = $root.ibc.core.channel.v1.Packet.fromObject(object.packet); + } + if (object.proofCommitment != null) + if (typeof object.proofCommitment === "string") + $util.base64.decode(object.proofCommitment, message.proofCommitment = $util.newBuffer($util.base64.length(object.proofCommitment)), 0); + else if (object.proofCommitment.length) + message.proofCommitment = object.proofCommitment; + if (object.proofHeight != null) { + if (typeof object.proofHeight !== "object") + throw TypeError(".ibc.core.channel.v1.MsgRecvPacket.proofHeight: object expected"); + message.proofHeight = $root.ibc.core.client.v1.Height.fromObject(object.proofHeight); + } + if (object.signer != null) + message.signer = String(object.signer); + return message; + }; + + /** + * Creates a plain object from a MsgRecvPacket message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.channel.v1.MsgRecvPacket + * @static + * @param {ibc.core.channel.v1.MsgRecvPacket} message MsgRecvPacket + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgRecvPacket.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.packet = null; + if (options.bytes === String) + object.proofCommitment = ""; + else { + object.proofCommitment = []; + if (options.bytes !== Array) + object.proofCommitment = $util.newBuffer(object.proofCommitment); + } + object.proofHeight = null; + object.signer = ""; + } + if (message.packet != null && message.hasOwnProperty("packet")) + object.packet = $root.ibc.core.channel.v1.Packet.toObject(message.packet, options); + if (message.proofCommitment != null && message.hasOwnProperty("proofCommitment")) + object.proofCommitment = options.bytes === String ? $util.base64.encode(message.proofCommitment, 0, message.proofCommitment.length) : options.bytes === Array ? Array.prototype.slice.call(message.proofCommitment) : message.proofCommitment; + if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) + object.proofHeight = $root.ibc.core.client.v1.Height.toObject(message.proofHeight, options); + if (message.signer != null && message.hasOwnProperty("signer")) + object.signer = message.signer; + return object; + }; + + /** + * Converts this MsgRecvPacket to JSON. + * @function toJSON + * @memberof ibc.core.channel.v1.MsgRecvPacket + * @instance + * @returns {Object.} JSON object + */ + MsgRecvPacket.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgRecvPacket; + })(v1.MsgRecvPacket || {}); + + v1.MsgRecvPacketResponse = (function(MsgRecvPacketResponse) { + + /** + * Properties of a MsgRecvPacketResponse. + * @memberof ibc.core.channel.v1 + * @interface IMsgRecvPacketResponse + */ + + /** + * Constructs a new MsgRecvPacketResponse. + * @memberof ibc.core.channel.v1 + * @classdesc Represents a MsgRecvPacketResponse. + * @implements IMsgRecvPacketResponse + * @constructor + * @param {ibc.core.channel.v1.IMsgRecvPacketResponse=} [properties] Properties to set + */ + function MsgRecvPacketResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new MsgRecvPacketResponse instance using the specified properties. + * @function create + * @memberof ibc.core.channel.v1.MsgRecvPacketResponse + * @static + * @param {ibc.core.channel.v1.IMsgRecvPacketResponse=} [properties] Properties to set + * @returns {ibc.core.channel.v1.MsgRecvPacketResponse} MsgRecvPacketResponse instance + */ + MsgRecvPacketResponse.create = function create(properties) { + return new MsgRecvPacketResponse(properties); + }; + + /** + * Encodes the specified MsgRecvPacketResponse message. Does not implicitly {@link ibc.core.channel.v1.MsgRecvPacketResponse.verify|verify} messages. + * @function encode + * @memberof ibc.core.channel.v1.MsgRecvPacketResponse + * @static + * @param {ibc.core.channel.v1.IMsgRecvPacketResponse} message MsgRecvPacketResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgRecvPacketResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MsgRecvPacketResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.MsgRecvPacketResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.channel.v1.MsgRecvPacketResponse + * @static + * @param {ibc.core.channel.v1.IMsgRecvPacketResponse} message MsgRecvPacketResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgRecvPacketResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgRecvPacketResponse message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.channel.v1.MsgRecvPacketResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.channel.v1.MsgRecvPacketResponse} MsgRecvPacketResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgRecvPacketResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.MsgRecvPacketResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgRecvPacketResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.channel.v1.MsgRecvPacketResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.channel.v1.MsgRecvPacketResponse} MsgRecvPacketResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgRecvPacketResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgRecvPacketResponse message. + * @function verify + * @memberof ibc.core.channel.v1.MsgRecvPacketResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgRecvPacketResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MsgRecvPacketResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.channel.v1.MsgRecvPacketResponse + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.channel.v1.MsgRecvPacketResponse} MsgRecvPacketResponse + */ + MsgRecvPacketResponse.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.channel.v1.MsgRecvPacketResponse) + return object; + return new $root.ibc.core.channel.v1.MsgRecvPacketResponse(); + }; + + /** + * Creates a plain object from a MsgRecvPacketResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.channel.v1.MsgRecvPacketResponse + * @static + * @param {ibc.core.channel.v1.MsgRecvPacketResponse} message MsgRecvPacketResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgRecvPacketResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MsgRecvPacketResponse to JSON. + * @function toJSON + * @memberof ibc.core.channel.v1.MsgRecvPacketResponse + * @instance + * @returns {Object.} JSON object + */ + MsgRecvPacketResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgRecvPacketResponse; + })(v1.MsgRecvPacketResponse || {}); + + v1.MsgTimeout = (function(MsgTimeout) { + + /** + * Properties of a MsgTimeout. + * @memberof ibc.core.channel.v1 + * @interface IMsgTimeout + * @property {ibc.core.channel.v1.IPacket|null} [packet] MsgTimeout packet + * @property {Uint8Array|null} [proofUnreceived] MsgTimeout proofUnreceived + * @property {ibc.core.client.v1.IHeight|null} [proofHeight] MsgTimeout proofHeight + * @property {number|Long|null} [nextSequenceRecv] MsgTimeout nextSequenceRecv + * @property {string|null} [signer] MsgTimeout signer + */ + + /** + * Constructs a new MsgTimeout. + * @memberof ibc.core.channel.v1 + * @classdesc Represents a MsgTimeout. + * @implements IMsgTimeout + * @constructor + * @param {ibc.core.channel.v1.IMsgTimeout=} [properties] Properties to set + */ + function MsgTimeout(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgTimeout packet. + * @member {ibc.core.channel.v1.IPacket|null|undefined} packet + * @memberof ibc.core.channel.v1.MsgTimeout + * @instance + */ + MsgTimeout.prototype.packet = null; + + /** + * MsgTimeout proofUnreceived. + * @member {Uint8Array} proofUnreceived + * @memberof ibc.core.channel.v1.MsgTimeout + * @instance + */ + MsgTimeout.prototype.proofUnreceived = $util.newBuffer([]); + + /** + * MsgTimeout proofHeight. + * @member {ibc.core.client.v1.IHeight|null|undefined} proofHeight + * @memberof ibc.core.channel.v1.MsgTimeout + * @instance + */ + MsgTimeout.prototype.proofHeight = null; + + /** + * MsgTimeout nextSequenceRecv. + * @member {number|Long} nextSequenceRecv + * @memberof ibc.core.channel.v1.MsgTimeout + * @instance + */ + MsgTimeout.prototype.nextSequenceRecv = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * MsgTimeout signer. + * @member {string} signer + * @memberof ibc.core.channel.v1.MsgTimeout + * @instance + */ + MsgTimeout.prototype.signer = ""; + + /** + * Creates a new MsgTimeout instance using the specified properties. + * @function create + * @memberof ibc.core.channel.v1.MsgTimeout + * @static + * @param {ibc.core.channel.v1.IMsgTimeout=} [properties] Properties to set + * @returns {ibc.core.channel.v1.MsgTimeout} MsgTimeout instance + */ + MsgTimeout.create = function create(properties) { + return new MsgTimeout(properties); + }; + + /** + * Encodes the specified MsgTimeout message. Does not implicitly {@link ibc.core.channel.v1.MsgTimeout.verify|verify} messages. + * @function encode + * @memberof ibc.core.channel.v1.MsgTimeout + * @static + * @param {ibc.core.channel.v1.IMsgTimeout} message MsgTimeout message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgTimeout.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.packet != null && Object.hasOwnProperty.call(message, "packet")) + $root.ibc.core.channel.v1.Packet.encode(message.packet, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.proofUnreceived != null && Object.hasOwnProperty.call(message, "proofUnreceived")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.proofUnreceived); + if (message.proofHeight != null && Object.hasOwnProperty.call(message, "proofHeight")) + $root.ibc.core.client.v1.Height.encode(message.proofHeight, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.nextSequenceRecv != null && Object.hasOwnProperty.call(message, "nextSequenceRecv")) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.nextSequenceRecv); + if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.signer); + return writer; + }; + + /** + * Encodes the specified MsgTimeout message, length delimited. Does not implicitly {@link ibc.core.channel.v1.MsgTimeout.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.channel.v1.MsgTimeout + * @static + * @param {ibc.core.channel.v1.IMsgTimeout} message MsgTimeout message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgTimeout.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgTimeout message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.channel.v1.MsgTimeout + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.channel.v1.MsgTimeout} MsgTimeout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgTimeout.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.MsgTimeout(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.packet = $root.ibc.core.channel.v1.Packet.decode(reader, reader.uint32()); + break; + case 2: + message.proofUnreceived = reader.bytes(); + break; + case 3: + message.proofHeight = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); + break; + case 4: + message.nextSequenceRecv = reader.uint64(); + break; + case 5: + message.signer = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgTimeout message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.channel.v1.MsgTimeout + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.channel.v1.MsgTimeout} MsgTimeout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgTimeout.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgTimeout message. + * @function verify + * @memberof ibc.core.channel.v1.MsgTimeout + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgTimeout.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.packet != null && message.hasOwnProperty("packet")) { + let error = $root.ibc.core.channel.v1.Packet.verify(message.packet); + if (error) + return "packet." + error; + } + if (message.proofUnreceived != null && message.hasOwnProperty("proofUnreceived")) + if (!(message.proofUnreceived && typeof message.proofUnreceived.length === "number" || $util.isString(message.proofUnreceived))) + return "proofUnreceived: buffer expected"; + if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) { + let error = $root.ibc.core.client.v1.Height.verify(message.proofHeight); + if (error) + return "proofHeight." + error; + } + if (message.nextSequenceRecv != null && message.hasOwnProperty("nextSequenceRecv")) + if (!$util.isInteger(message.nextSequenceRecv) && !(message.nextSequenceRecv && $util.isInteger(message.nextSequenceRecv.low) && $util.isInteger(message.nextSequenceRecv.high))) + return "nextSequenceRecv: integer|Long expected"; + if (message.signer != null && message.hasOwnProperty("signer")) + if (!$util.isString(message.signer)) + return "signer: string expected"; + return null; + }; + + /** + * Creates a MsgTimeout message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.channel.v1.MsgTimeout + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.channel.v1.MsgTimeout} MsgTimeout + */ + MsgTimeout.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.channel.v1.MsgTimeout) + return object; + let message = new $root.ibc.core.channel.v1.MsgTimeout(); + if (object.packet != null) { + if (typeof object.packet !== "object") + throw TypeError(".ibc.core.channel.v1.MsgTimeout.packet: object expected"); + message.packet = $root.ibc.core.channel.v1.Packet.fromObject(object.packet); + } + if (object.proofUnreceived != null) + if (typeof object.proofUnreceived === "string") + $util.base64.decode(object.proofUnreceived, message.proofUnreceived = $util.newBuffer($util.base64.length(object.proofUnreceived)), 0); + else if (object.proofUnreceived.length) + message.proofUnreceived = object.proofUnreceived; + if (object.proofHeight != null) { + if (typeof object.proofHeight !== "object") + throw TypeError(".ibc.core.channel.v1.MsgTimeout.proofHeight: object expected"); + message.proofHeight = $root.ibc.core.client.v1.Height.fromObject(object.proofHeight); + } + if (object.nextSequenceRecv != null) + if ($util.Long) + (message.nextSequenceRecv = $util.Long.fromValue(object.nextSequenceRecv)).unsigned = true; + else if (typeof object.nextSequenceRecv === "string") + message.nextSequenceRecv = parseInt(object.nextSequenceRecv, 10); + else if (typeof object.nextSequenceRecv === "number") + message.nextSequenceRecv = object.nextSequenceRecv; + else if (typeof object.nextSequenceRecv === "object") + message.nextSequenceRecv = new $util.LongBits(object.nextSequenceRecv.low >>> 0, object.nextSequenceRecv.high >>> 0).toNumber(true); + if (object.signer != null) + message.signer = String(object.signer); + return message; + }; + + /** + * Creates a plain object from a MsgTimeout message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.channel.v1.MsgTimeout + * @static + * @param {ibc.core.channel.v1.MsgTimeout} message MsgTimeout + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgTimeout.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.packet = null; + if (options.bytes === String) + object.proofUnreceived = ""; + else { + object.proofUnreceived = []; + if (options.bytes !== Array) + object.proofUnreceived = $util.newBuffer(object.proofUnreceived); + } + object.proofHeight = null; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.nextSequenceRecv = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.nextSequenceRecv = options.longs === String ? "0" : 0; + object.signer = ""; + } + if (message.packet != null && message.hasOwnProperty("packet")) + object.packet = $root.ibc.core.channel.v1.Packet.toObject(message.packet, options); + if (message.proofUnreceived != null && message.hasOwnProperty("proofUnreceived")) + object.proofUnreceived = options.bytes === String ? $util.base64.encode(message.proofUnreceived, 0, message.proofUnreceived.length) : options.bytes === Array ? Array.prototype.slice.call(message.proofUnreceived) : message.proofUnreceived; + if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) + object.proofHeight = $root.ibc.core.client.v1.Height.toObject(message.proofHeight, options); + if (message.nextSequenceRecv != null && message.hasOwnProperty("nextSequenceRecv")) + if (typeof message.nextSequenceRecv === "number") + object.nextSequenceRecv = options.longs === String ? String(message.nextSequenceRecv) : message.nextSequenceRecv; + else + object.nextSequenceRecv = options.longs === String ? $util.Long.prototype.toString.call(message.nextSequenceRecv) : options.longs === Number ? new $util.LongBits(message.nextSequenceRecv.low >>> 0, message.nextSequenceRecv.high >>> 0).toNumber(true) : message.nextSequenceRecv; + if (message.signer != null && message.hasOwnProperty("signer")) + object.signer = message.signer; + return object; + }; + + /** + * Converts this MsgTimeout to JSON. + * @function toJSON + * @memberof ibc.core.channel.v1.MsgTimeout + * @instance + * @returns {Object.} JSON object + */ + MsgTimeout.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgTimeout; + })(v1.MsgTimeout || {}); + + v1.MsgTimeoutResponse = (function(MsgTimeoutResponse) { + + /** + * Properties of a MsgTimeoutResponse. + * @memberof ibc.core.channel.v1 + * @interface IMsgTimeoutResponse + */ + + /** + * Constructs a new MsgTimeoutResponse. + * @memberof ibc.core.channel.v1 + * @classdesc Represents a MsgTimeoutResponse. + * @implements IMsgTimeoutResponse + * @constructor + * @param {ibc.core.channel.v1.IMsgTimeoutResponse=} [properties] Properties to set + */ + function MsgTimeoutResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new MsgTimeoutResponse instance using the specified properties. + * @function create + * @memberof ibc.core.channel.v1.MsgTimeoutResponse + * @static + * @param {ibc.core.channel.v1.IMsgTimeoutResponse=} [properties] Properties to set + * @returns {ibc.core.channel.v1.MsgTimeoutResponse} MsgTimeoutResponse instance + */ + MsgTimeoutResponse.create = function create(properties) { + return new MsgTimeoutResponse(properties); + }; + + /** + * Encodes the specified MsgTimeoutResponse message. Does not implicitly {@link ibc.core.channel.v1.MsgTimeoutResponse.verify|verify} messages. + * @function encode + * @memberof ibc.core.channel.v1.MsgTimeoutResponse + * @static + * @param {ibc.core.channel.v1.IMsgTimeoutResponse} message MsgTimeoutResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgTimeoutResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MsgTimeoutResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.MsgTimeoutResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.channel.v1.MsgTimeoutResponse + * @static + * @param {ibc.core.channel.v1.IMsgTimeoutResponse} message MsgTimeoutResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgTimeoutResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgTimeoutResponse message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.channel.v1.MsgTimeoutResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.channel.v1.MsgTimeoutResponse} MsgTimeoutResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgTimeoutResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.MsgTimeoutResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgTimeoutResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.channel.v1.MsgTimeoutResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.channel.v1.MsgTimeoutResponse} MsgTimeoutResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgTimeoutResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgTimeoutResponse message. + * @function verify + * @memberof ibc.core.channel.v1.MsgTimeoutResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgTimeoutResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MsgTimeoutResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.channel.v1.MsgTimeoutResponse + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.channel.v1.MsgTimeoutResponse} MsgTimeoutResponse + */ + MsgTimeoutResponse.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.channel.v1.MsgTimeoutResponse) + return object; + return new $root.ibc.core.channel.v1.MsgTimeoutResponse(); + }; + + /** + * Creates a plain object from a MsgTimeoutResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.channel.v1.MsgTimeoutResponse + * @static + * @param {ibc.core.channel.v1.MsgTimeoutResponse} message MsgTimeoutResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgTimeoutResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MsgTimeoutResponse to JSON. + * @function toJSON + * @memberof ibc.core.channel.v1.MsgTimeoutResponse + * @instance + * @returns {Object.} JSON object + */ + MsgTimeoutResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgTimeoutResponse; + })(v1.MsgTimeoutResponse || {}); + + v1.MsgTimeoutOnClose = (function(MsgTimeoutOnClose) { + + /** + * Properties of a MsgTimeoutOnClose. + * @memberof ibc.core.channel.v1 + * @interface IMsgTimeoutOnClose + * @property {ibc.core.channel.v1.IPacket|null} [packet] MsgTimeoutOnClose packet + * @property {Uint8Array|null} [proofUnreceived] MsgTimeoutOnClose proofUnreceived + * @property {Uint8Array|null} [proofClose] MsgTimeoutOnClose proofClose + * @property {ibc.core.client.v1.IHeight|null} [proofHeight] MsgTimeoutOnClose proofHeight + * @property {number|Long|null} [nextSequenceRecv] MsgTimeoutOnClose nextSequenceRecv + * @property {string|null} [signer] MsgTimeoutOnClose signer + */ + + /** + * Constructs a new MsgTimeoutOnClose. + * @memberof ibc.core.channel.v1 + * @classdesc Represents a MsgTimeoutOnClose. + * @implements IMsgTimeoutOnClose + * @constructor + * @param {ibc.core.channel.v1.IMsgTimeoutOnClose=} [properties] Properties to set + */ + function MsgTimeoutOnClose(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgTimeoutOnClose packet. + * @member {ibc.core.channel.v1.IPacket|null|undefined} packet + * @memberof ibc.core.channel.v1.MsgTimeoutOnClose + * @instance + */ + MsgTimeoutOnClose.prototype.packet = null; + + /** + * MsgTimeoutOnClose proofUnreceived. + * @member {Uint8Array} proofUnreceived + * @memberof ibc.core.channel.v1.MsgTimeoutOnClose + * @instance + */ + MsgTimeoutOnClose.prototype.proofUnreceived = $util.newBuffer([]); + + /** + * MsgTimeoutOnClose proofClose. + * @member {Uint8Array} proofClose + * @memberof ibc.core.channel.v1.MsgTimeoutOnClose + * @instance + */ + MsgTimeoutOnClose.prototype.proofClose = $util.newBuffer([]); + + /** + * MsgTimeoutOnClose proofHeight. + * @member {ibc.core.client.v1.IHeight|null|undefined} proofHeight + * @memberof ibc.core.channel.v1.MsgTimeoutOnClose + * @instance + */ + MsgTimeoutOnClose.prototype.proofHeight = null; + + /** + * MsgTimeoutOnClose nextSequenceRecv. + * @member {number|Long} nextSequenceRecv + * @memberof ibc.core.channel.v1.MsgTimeoutOnClose + * @instance + */ + MsgTimeoutOnClose.prototype.nextSequenceRecv = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * MsgTimeoutOnClose signer. + * @member {string} signer + * @memberof ibc.core.channel.v1.MsgTimeoutOnClose + * @instance + */ + MsgTimeoutOnClose.prototype.signer = ""; + + /** + * Creates a new MsgTimeoutOnClose instance using the specified properties. + * @function create + * @memberof ibc.core.channel.v1.MsgTimeoutOnClose + * @static + * @param {ibc.core.channel.v1.IMsgTimeoutOnClose=} [properties] Properties to set + * @returns {ibc.core.channel.v1.MsgTimeoutOnClose} MsgTimeoutOnClose instance + */ + MsgTimeoutOnClose.create = function create(properties) { + return new MsgTimeoutOnClose(properties); + }; + + /** + * Encodes the specified MsgTimeoutOnClose message. Does not implicitly {@link ibc.core.channel.v1.MsgTimeoutOnClose.verify|verify} messages. + * @function encode + * @memberof ibc.core.channel.v1.MsgTimeoutOnClose + * @static + * @param {ibc.core.channel.v1.IMsgTimeoutOnClose} message MsgTimeoutOnClose message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgTimeoutOnClose.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.packet != null && Object.hasOwnProperty.call(message, "packet")) + $root.ibc.core.channel.v1.Packet.encode(message.packet, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.proofUnreceived != null && Object.hasOwnProperty.call(message, "proofUnreceived")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.proofUnreceived); + if (message.proofClose != null && Object.hasOwnProperty.call(message, "proofClose")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.proofClose); + if (message.proofHeight != null && Object.hasOwnProperty.call(message, "proofHeight")) + $root.ibc.core.client.v1.Height.encode(message.proofHeight, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.nextSequenceRecv != null && Object.hasOwnProperty.call(message, "nextSequenceRecv")) + writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.nextSequenceRecv); + if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.signer); + return writer; + }; + + /** + * Encodes the specified MsgTimeoutOnClose message, length delimited. Does not implicitly {@link ibc.core.channel.v1.MsgTimeoutOnClose.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.channel.v1.MsgTimeoutOnClose + * @static + * @param {ibc.core.channel.v1.IMsgTimeoutOnClose} message MsgTimeoutOnClose message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgTimeoutOnClose.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgTimeoutOnClose message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.channel.v1.MsgTimeoutOnClose + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.channel.v1.MsgTimeoutOnClose} MsgTimeoutOnClose + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgTimeoutOnClose.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.MsgTimeoutOnClose(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.packet = $root.ibc.core.channel.v1.Packet.decode(reader, reader.uint32()); + break; + case 2: + message.proofUnreceived = reader.bytes(); + break; + case 3: + message.proofClose = reader.bytes(); + break; + case 4: + message.proofHeight = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); + break; + case 5: + message.nextSequenceRecv = reader.uint64(); + break; + case 6: + message.signer = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgTimeoutOnClose message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.channel.v1.MsgTimeoutOnClose + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.channel.v1.MsgTimeoutOnClose} MsgTimeoutOnClose + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgTimeoutOnClose.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgTimeoutOnClose message. + * @function verify + * @memberof ibc.core.channel.v1.MsgTimeoutOnClose + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgTimeoutOnClose.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.packet != null && message.hasOwnProperty("packet")) { + let error = $root.ibc.core.channel.v1.Packet.verify(message.packet); + if (error) + return "packet." + error; + } + if (message.proofUnreceived != null && message.hasOwnProperty("proofUnreceived")) + if (!(message.proofUnreceived && typeof message.proofUnreceived.length === "number" || $util.isString(message.proofUnreceived))) + return "proofUnreceived: buffer expected"; + if (message.proofClose != null && message.hasOwnProperty("proofClose")) + if (!(message.proofClose && typeof message.proofClose.length === "number" || $util.isString(message.proofClose))) + return "proofClose: buffer expected"; + if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) { + let error = $root.ibc.core.client.v1.Height.verify(message.proofHeight); + if (error) + return "proofHeight." + error; + } + if (message.nextSequenceRecv != null && message.hasOwnProperty("nextSequenceRecv")) + if (!$util.isInteger(message.nextSequenceRecv) && !(message.nextSequenceRecv && $util.isInteger(message.nextSequenceRecv.low) && $util.isInteger(message.nextSequenceRecv.high))) + return "nextSequenceRecv: integer|Long expected"; + if (message.signer != null && message.hasOwnProperty("signer")) + if (!$util.isString(message.signer)) + return "signer: string expected"; + return null; + }; + + /** + * Creates a MsgTimeoutOnClose message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.channel.v1.MsgTimeoutOnClose + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.channel.v1.MsgTimeoutOnClose} MsgTimeoutOnClose + */ + MsgTimeoutOnClose.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.channel.v1.MsgTimeoutOnClose) + return object; + let message = new $root.ibc.core.channel.v1.MsgTimeoutOnClose(); + if (object.packet != null) { + if (typeof object.packet !== "object") + throw TypeError(".ibc.core.channel.v1.MsgTimeoutOnClose.packet: object expected"); + message.packet = $root.ibc.core.channel.v1.Packet.fromObject(object.packet); + } + if (object.proofUnreceived != null) + if (typeof object.proofUnreceived === "string") + $util.base64.decode(object.proofUnreceived, message.proofUnreceived = $util.newBuffer($util.base64.length(object.proofUnreceived)), 0); + else if (object.proofUnreceived.length) + message.proofUnreceived = object.proofUnreceived; + if (object.proofClose != null) + if (typeof object.proofClose === "string") + $util.base64.decode(object.proofClose, message.proofClose = $util.newBuffer($util.base64.length(object.proofClose)), 0); + else if (object.proofClose.length) + message.proofClose = object.proofClose; + if (object.proofHeight != null) { + if (typeof object.proofHeight !== "object") + throw TypeError(".ibc.core.channel.v1.MsgTimeoutOnClose.proofHeight: object expected"); + message.proofHeight = $root.ibc.core.client.v1.Height.fromObject(object.proofHeight); + } + if (object.nextSequenceRecv != null) + if ($util.Long) + (message.nextSequenceRecv = $util.Long.fromValue(object.nextSequenceRecv)).unsigned = true; + else if (typeof object.nextSequenceRecv === "string") + message.nextSequenceRecv = parseInt(object.nextSequenceRecv, 10); + else if (typeof object.nextSequenceRecv === "number") + message.nextSequenceRecv = object.nextSequenceRecv; + else if (typeof object.nextSequenceRecv === "object") + message.nextSequenceRecv = new $util.LongBits(object.nextSequenceRecv.low >>> 0, object.nextSequenceRecv.high >>> 0).toNumber(true); + if (object.signer != null) + message.signer = String(object.signer); + return message; + }; + + /** + * Creates a plain object from a MsgTimeoutOnClose message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.channel.v1.MsgTimeoutOnClose + * @static + * @param {ibc.core.channel.v1.MsgTimeoutOnClose} message MsgTimeoutOnClose + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgTimeoutOnClose.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.packet = null; + if (options.bytes === String) + object.proofUnreceived = ""; + else { + object.proofUnreceived = []; + if (options.bytes !== Array) + object.proofUnreceived = $util.newBuffer(object.proofUnreceived); + } + if (options.bytes === String) + object.proofClose = ""; + else { + object.proofClose = []; + if (options.bytes !== Array) + object.proofClose = $util.newBuffer(object.proofClose); + } + object.proofHeight = null; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.nextSequenceRecv = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.nextSequenceRecv = options.longs === String ? "0" : 0; + object.signer = ""; + } + if (message.packet != null && message.hasOwnProperty("packet")) + object.packet = $root.ibc.core.channel.v1.Packet.toObject(message.packet, options); + if (message.proofUnreceived != null && message.hasOwnProperty("proofUnreceived")) + object.proofUnreceived = options.bytes === String ? $util.base64.encode(message.proofUnreceived, 0, message.proofUnreceived.length) : options.bytes === Array ? Array.prototype.slice.call(message.proofUnreceived) : message.proofUnreceived; + if (message.proofClose != null && message.hasOwnProperty("proofClose")) + object.proofClose = options.bytes === String ? $util.base64.encode(message.proofClose, 0, message.proofClose.length) : options.bytes === Array ? Array.prototype.slice.call(message.proofClose) : message.proofClose; + if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) + object.proofHeight = $root.ibc.core.client.v1.Height.toObject(message.proofHeight, options); + if (message.nextSequenceRecv != null && message.hasOwnProperty("nextSequenceRecv")) + if (typeof message.nextSequenceRecv === "number") + object.nextSequenceRecv = options.longs === String ? String(message.nextSequenceRecv) : message.nextSequenceRecv; + else + object.nextSequenceRecv = options.longs === String ? $util.Long.prototype.toString.call(message.nextSequenceRecv) : options.longs === Number ? new $util.LongBits(message.nextSequenceRecv.low >>> 0, message.nextSequenceRecv.high >>> 0).toNumber(true) : message.nextSequenceRecv; + if (message.signer != null && message.hasOwnProperty("signer")) + object.signer = message.signer; + return object; + }; + + /** + * Converts this MsgTimeoutOnClose to JSON. + * @function toJSON + * @memberof ibc.core.channel.v1.MsgTimeoutOnClose + * @instance + * @returns {Object.} JSON object + */ + MsgTimeoutOnClose.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgTimeoutOnClose; + })(v1.MsgTimeoutOnClose || {}); + + v1.MsgTimeoutOnCloseResponse = (function(MsgTimeoutOnCloseResponse) { + + /** + * Properties of a MsgTimeoutOnCloseResponse. + * @memberof ibc.core.channel.v1 + * @interface IMsgTimeoutOnCloseResponse + */ + + /** + * Constructs a new MsgTimeoutOnCloseResponse. + * @memberof ibc.core.channel.v1 + * @classdesc Represents a MsgTimeoutOnCloseResponse. + * @implements IMsgTimeoutOnCloseResponse + * @constructor + * @param {ibc.core.channel.v1.IMsgTimeoutOnCloseResponse=} [properties] Properties to set + */ + function MsgTimeoutOnCloseResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new MsgTimeoutOnCloseResponse instance using the specified properties. + * @function create + * @memberof ibc.core.channel.v1.MsgTimeoutOnCloseResponse + * @static + * @param {ibc.core.channel.v1.IMsgTimeoutOnCloseResponse=} [properties] Properties to set + * @returns {ibc.core.channel.v1.MsgTimeoutOnCloseResponse} MsgTimeoutOnCloseResponse instance + */ + MsgTimeoutOnCloseResponse.create = function create(properties) { + return new MsgTimeoutOnCloseResponse(properties); + }; + + /** + * Encodes the specified MsgTimeoutOnCloseResponse message. Does not implicitly {@link ibc.core.channel.v1.MsgTimeoutOnCloseResponse.verify|verify} messages. + * @function encode + * @memberof ibc.core.channel.v1.MsgTimeoutOnCloseResponse + * @static + * @param {ibc.core.channel.v1.IMsgTimeoutOnCloseResponse} message MsgTimeoutOnCloseResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgTimeoutOnCloseResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MsgTimeoutOnCloseResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.MsgTimeoutOnCloseResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.channel.v1.MsgTimeoutOnCloseResponse + * @static + * @param {ibc.core.channel.v1.IMsgTimeoutOnCloseResponse} message MsgTimeoutOnCloseResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgTimeoutOnCloseResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgTimeoutOnCloseResponse message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.channel.v1.MsgTimeoutOnCloseResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.channel.v1.MsgTimeoutOnCloseResponse} MsgTimeoutOnCloseResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgTimeoutOnCloseResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.MsgTimeoutOnCloseResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgTimeoutOnCloseResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.channel.v1.MsgTimeoutOnCloseResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.channel.v1.MsgTimeoutOnCloseResponse} MsgTimeoutOnCloseResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgTimeoutOnCloseResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgTimeoutOnCloseResponse message. + * @function verify + * @memberof ibc.core.channel.v1.MsgTimeoutOnCloseResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgTimeoutOnCloseResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MsgTimeoutOnCloseResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.channel.v1.MsgTimeoutOnCloseResponse + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.channel.v1.MsgTimeoutOnCloseResponse} MsgTimeoutOnCloseResponse + */ + MsgTimeoutOnCloseResponse.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.channel.v1.MsgTimeoutOnCloseResponse) + return object; + return new $root.ibc.core.channel.v1.MsgTimeoutOnCloseResponse(); + }; + + /** + * Creates a plain object from a MsgTimeoutOnCloseResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.channel.v1.MsgTimeoutOnCloseResponse + * @static + * @param {ibc.core.channel.v1.MsgTimeoutOnCloseResponse} message MsgTimeoutOnCloseResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgTimeoutOnCloseResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MsgTimeoutOnCloseResponse to JSON. + * @function toJSON + * @memberof ibc.core.channel.v1.MsgTimeoutOnCloseResponse + * @instance + * @returns {Object.} JSON object + */ + MsgTimeoutOnCloseResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgTimeoutOnCloseResponse; + })(v1.MsgTimeoutOnCloseResponse || {}); + + v1.MsgAcknowledgement = (function(MsgAcknowledgement) { + + /** + * Properties of a MsgAcknowledgement. + * @memberof ibc.core.channel.v1 + * @interface IMsgAcknowledgement + * @property {ibc.core.channel.v1.IPacket|null} [packet] MsgAcknowledgement packet + * @property {Uint8Array|null} [acknowledgement] MsgAcknowledgement acknowledgement + * @property {Uint8Array|null} [proofAcked] MsgAcknowledgement proofAcked + * @property {ibc.core.client.v1.IHeight|null} [proofHeight] MsgAcknowledgement proofHeight + * @property {string|null} [signer] MsgAcknowledgement signer + */ + + /** + * Constructs a new MsgAcknowledgement. + * @memberof ibc.core.channel.v1 + * @classdesc Represents a MsgAcknowledgement. + * @implements IMsgAcknowledgement + * @constructor + * @param {ibc.core.channel.v1.IMsgAcknowledgement=} [properties] Properties to set + */ + function MsgAcknowledgement(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgAcknowledgement packet. + * @member {ibc.core.channel.v1.IPacket|null|undefined} packet + * @memberof ibc.core.channel.v1.MsgAcknowledgement + * @instance + */ + MsgAcknowledgement.prototype.packet = null; + + /** + * MsgAcknowledgement acknowledgement. + * @member {Uint8Array} acknowledgement + * @memberof ibc.core.channel.v1.MsgAcknowledgement + * @instance + */ + MsgAcknowledgement.prototype.acknowledgement = $util.newBuffer([]); + + /** + * MsgAcknowledgement proofAcked. + * @member {Uint8Array} proofAcked + * @memberof ibc.core.channel.v1.MsgAcknowledgement + * @instance + */ + MsgAcknowledgement.prototype.proofAcked = $util.newBuffer([]); + + /** + * MsgAcknowledgement proofHeight. + * @member {ibc.core.client.v1.IHeight|null|undefined} proofHeight + * @memberof ibc.core.channel.v1.MsgAcknowledgement + * @instance + */ + MsgAcknowledgement.prototype.proofHeight = null; + + /** + * MsgAcknowledgement signer. + * @member {string} signer + * @memberof ibc.core.channel.v1.MsgAcknowledgement + * @instance + */ + MsgAcknowledgement.prototype.signer = ""; + + /** + * Creates a new MsgAcknowledgement instance using the specified properties. + * @function create + * @memberof ibc.core.channel.v1.MsgAcknowledgement + * @static + * @param {ibc.core.channel.v1.IMsgAcknowledgement=} [properties] Properties to set + * @returns {ibc.core.channel.v1.MsgAcknowledgement} MsgAcknowledgement instance + */ + MsgAcknowledgement.create = function create(properties) { + return new MsgAcknowledgement(properties); + }; + + /** + * Encodes the specified MsgAcknowledgement message. Does not implicitly {@link ibc.core.channel.v1.MsgAcknowledgement.verify|verify} messages. + * @function encode + * @memberof ibc.core.channel.v1.MsgAcknowledgement + * @static + * @param {ibc.core.channel.v1.IMsgAcknowledgement} message MsgAcknowledgement message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgAcknowledgement.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.packet != null && Object.hasOwnProperty.call(message, "packet")) + $root.ibc.core.channel.v1.Packet.encode(message.packet, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.acknowledgement != null && Object.hasOwnProperty.call(message, "acknowledgement")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.acknowledgement); + if (message.proofAcked != null && Object.hasOwnProperty.call(message, "proofAcked")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.proofAcked); + if (message.proofHeight != null && Object.hasOwnProperty.call(message, "proofHeight")) + $root.ibc.core.client.v1.Height.encode(message.proofHeight, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.signer); + return writer; + }; + + /** + * Encodes the specified MsgAcknowledgement message, length delimited. Does not implicitly {@link ibc.core.channel.v1.MsgAcknowledgement.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.channel.v1.MsgAcknowledgement + * @static + * @param {ibc.core.channel.v1.IMsgAcknowledgement} message MsgAcknowledgement message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgAcknowledgement.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgAcknowledgement message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.channel.v1.MsgAcknowledgement + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.channel.v1.MsgAcknowledgement} MsgAcknowledgement + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgAcknowledgement.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.MsgAcknowledgement(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.packet = $root.ibc.core.channel.v1.Packet.decode(reader, reader.uint32()); + break; + case 2: + message.acknowledgement = reader.bytes(); + break; + case 3: + message.proofAcked = reader.bytes(); + break; + case 4: + message.proofHeight = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); + break; + case 5: + message.signer = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgAcknowledgement message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.channel.v1.MsgAcknowledgement + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.channel.v1.MsgAcknowledgement} MsgAcknowledgement + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgAcknowledgement.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgAcknowledgement message. + * @function verify + * @memberof ibc.core.channel.v1.MsgAcknowledgement + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgAcknowledgement.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.packet != null && message.hasOwnProperty("packet")) { + let error = $root.ibc.core.channel.v1.Packet.verify(message.packet); + if (error) + return "packet." + error; + } + if (message.acknowledgement != null && message.hasOwnProperty("acknowledgement")) + if (!(message.acknowledgement && typeof message.acknowledgement.length === "number" || $util.isString(message.acknowledgement))) + return "acknowledgement: buffer expected"; + if (message.proofAcked != null && message.hasOwnProperty("proofAcked")) + if (!(message.proofAcked && typeof message.proofAcked.length === "number" || $util.isString(message.proofAcked))) + return "proofAcked: buffer expected"; + if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) { + let error = $root.ibc.core.client.v1.Height.verify(message.proofHeight); + if (error) + return "proofHeight." + error; + } + if (message.signer != null && message.hasOwnProperty("signer")) + if (!$util.isString(message.signer)) + return "signer: string expected"; + return null; + }; + + /** + * Creates a MsgAcknowledgement message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.channel.v1.MsgAcknowledgement + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.channel.v1.MsgAcknowledgement} MsgAcknowledgement + */ + MsgAcknowledgement.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.channel.v1.MsgAcknowledgement) + return object; + let message = new $root.ibc.core.channel.v1.MsgAcknowledgement(); + if (object.packet != null) { + if (typeof object.packet !== "object") + throw TypeError(".ibc.core.channel.v1.MsgAcknowledgement.packet: object expected"); + message.packet = $root.ibc.core.channel.v1.Packet.fromObject(object.packet); + } + if (object.acknowledgement != null) + if (typeof object.acknowledgement === "string") + $util.base64.decode(object.acknowledgement, message.acknowledgement = $util.newBuffer($util.base64.length(object.acknowledgement)), 0); + else if (object.acknowledgement.length) + message.acknowledgement = object.acknowledgement; + if (object.proofAcked != null) + if (typeof object.proofAcked === "string") + $util.base64.decode(object.proofAcked, message.proofAcked = $util.newBuffer($util.base64.length(object.proofAcked)), 0); + else if (object.proofAcked.length) + message.proofAcked = object.proofAcked; + if (object.proofHeight != null) { + if (typeof object.proofHeight !== "object") + throw TypeError(".ibc.core.channel.v1.MsgAcknowledgement.proofHeight: object expected"); + message.proofHeight = $root.ibc.core.client.v1.Height.fromObject(object.proofHeight); + } + if (object.signer != null) + message.signer = String(object.signer); + return message; + }; + + /** + * Creates a plain object from a MsgAcknowledgement message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.channel.v1.MsgAcknowledgement + * @static + * @param {ibc.core.channel.v1.MsgAcknowledgement} message MsgAcknowledgement + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgAcknowledgement.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.packet = null; + if (options.bytes === String) + object.acknowledgement = ""; + else { + object.acknowledgement = []; + if (options.bytes !== Array) + object.acknowledgement = $util.newBuffer(object.acknowledgement); + } + if (options.bytes === String) + object.proofAcked = ""; + else { + object.proofAcked = []; + if (options.bytes !== Array) + object.proofAcked = $util.newBuffer(object.proofAcked); + } + object.proofHeight = null; + object.signer = ""; + } + if (message.packet != null && message.hasOwnProperty("packet")) + object.packet = $root.ibc.core.channel.v1.Packet.toObject(message.packet, options); + if (message.acknowledgement != null && message.hasOwnProperty("acknowledgement")) + object.acknowledgement = options.bytes === String ? $util.base64.encode(message.acknowledgement, 0, message.acknowledgement.length) : options.bytes === Array ? Array.prototype.slice.call(message.acknowledgement) : message.acknowledgement; + if (message.proofAcked != null && message.hasOwnProperty("proofAcked")) + object.proofAcked = options.bytes === String ? $util.base64.encode(message.proofAcked, 0, message.proofAcked.length) : options.bytes === Array ? Array.prototype.slice.call(message.proofAcked) : message.proofAcked; + if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) + object.proofHeight = $root.ibc.core.client.v1.Height.toObject(message.proofHeight, options); + if (message.signer != null && message.hasOwnProperty("signer")) + object.signer = message.signer; + return object; + }; + + /** + * Converts this MsgAcknowledgement to JSON. + * @function toJSON + * @memberof ibc.core.channel.v1.MsgAcknowledgement + * @instance + * @returns {Object.} JSON object + */ + MsgAcknowledgement.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgAcknowledgement; + })(v1.MsgAcknowledgement || {}); + + v1.MsgAcknowledgementResponse = (function(MsgAcknowledgementResponse) { + + /** + * Properties of a MsgAcknowledgementResponse. + * @memberof ibc.core.channel.v1 + * @interface IMsgAcknowledgementResponse + */ + + /** + * Constructs a new MsgAcknowledgementResponse. + * @memberof ibc.core.channel.v1 + * @classdesc Represents a MsgAcknowledgementResponse. + * @implements IMsgAcknowledgementResponse + * @constructor + * @param {ibc.core.channel.v1.IMsgAcknowledgementResponse=} [properties] Properties to set + */ + function MsgAcknowledgementResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new MsgAcknowledgementResponse instance using the specified properties. + * @function create + * @memberof ibc.core.channel.v1.MsgAcknowledgementResponse + * @static + * @param {ibc.core.channel.v1.IMsgAcknowledgementResponse=} [properties] Properties to set + * @returns {ibc.core.channel.v1.MsgAcknowledgementResponse} MsgAcknowledgementResponse instance + */ + MsgAcknowledgementResponse.create = function create(properties) { + return new MsgAcknowledgementResponse(properties); + }; + + /** + * Encodes the specified MsgAcknowledgementResponse message. Does not implicitly {@link ibc.core.channel.v1.MsgAcknowledgementResponse.verify|verify} messages. + * @function encode + * @memberof ibc.core.channel.v1.MsgAcknowledgementResponse + * @static + * @param {ibc.core.channel.v1.IMsgAcknowledgementResponse} message MsgAcknowledgementResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgAcknowledgementResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MsgAcknowledgementResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.MsgAcknowledgementResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.channel.v1.MsgAcknowledgementResponse + * @static + * @param {ibc.core.channel.v1.IMsgAcknowledgementResponse} message MsgAcknowledgementResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgAcknowledgementResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgAcknowledgementResponse message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.channel.v1.MsgAcknowledgementResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.channel.v1.MsgAcknowledgementResponse} MsgAcknowledgementResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgAcknowledgementResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.MsgAcknowledgementResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgAcknowledgementResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.channel.v1.MsgAcknowledgementResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.channel.v1.MsgAcknowledgementResponse} MsgAcknowledgementResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgAcknowledgementResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgAcknowledgementResponse message. + * @function verify + * @memberof ibc.core.channel.v1.MsgAcknowledgementResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgAcknowledgementResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MsgAcknowledgementResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.channel.v1.MsgAcknowledgementResponse + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.channel.v1.MsgAcknowledgementResponse} MsgAcknowledgementResponse + */ + MsgAcknowledgementResponse.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.channel.v1.MsgAcknowledgementResponse) + return object; + return new $root.ibc.core.channel.v1.MsgAcknowledgementResponse(); + }; + + /** + * Creates a plain object from a MsgAcknowledgementResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.channel.v1.MsgAcknowledgementResponse + * @static + * @param {ibc.core.channel.v1.MsgAcknowledgementResponse} message MsgAcknowledgementResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgAcknowledgementResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MsgAcknowledgementResponse to JSON. + * @function toJSON + * @memberof ibc.core.channel.v1.MsgAcknowledgementResponse + * @instance + * @returns {Object.} JSON object + */ + MsgAcknowledgementResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgAcknowledgementResponse; + })(v1.MsgAcknowledgementResponse || {}); + + return v1; + })(channel.v1 || {}); + + return channel; + })(core.channel || {}); + + /** + * Namespace client. + * @memberof ibc.core + * @namespace + */ + + core.client = (function(client) { + + /** + * Namespace v1. + * @memberof ibc.core.client + * @namespace + */ + + client.v1 = (function(v1) { + + v1.IdentifiedClientState = (function(IdentifiedClientState) { + + /** + * Properties of an IdentifiedClientState. + * @memberof ibc.core.client.v1 + * @interface IIdentifiedClientState + * @property {string|null} [clientId] IdentifiedClientState clientId + * @property {google.protobuf.IAny|null} [clientState] IdentifiedClientState clientState + */ + + /** + * Constructs a new IdentifiedClientState. + * @memberof ibc.core.client.v1 + * @classdesc Represents an IdentifiedClientState. + * @implements IIdentifiedClientState + * @constructor + * @param {ibc.core.client.v1.IIdentifiedClientState=} [properties] Properties to set + */ + function IdentifiedClientState(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * IdentifiedClientState clientId. + * @member {string} clientId + * @memberof ibc.core.client.v1.IdentifiedClientState + * @instance + */ + IdentifiedClientState.prototype.clientId = ""; + + /** + * IdentifiedClientState clientState. + * @member {google.protobuf.IAny|null|undefined} clientState + * @memberof ibc.core.client.v1.IdentifiedClientState + * @instance + */ + IdentifiedClientState.prototype.clientState = null; + + /** + * Creates a new IdentifiedClientState instance using the specified properties. + * @function create + * @memberof ibc.core.client.v1.IdentifiedClientState + * @static + * @param {ibc.core.client.v1.IIdentifiedClientState=} [properties] Properties to set + * @returns {ibc.core.client.v1.IdentifiedClientState} IdentifiedClientState instance + */ + IdentifiedClientState.create = function create(properties) { + return new IdentifiedClientState(properties); + }; + + /** + * Encodes the specified IdentifiedClientState message. Does not implicitly {@link ibc.core.client.v1.IdentifiedClientState.verify|verify} messages. + * @function encode + * @memberof ibc.core.client.v1.IdentifiedClientState + * @static + * @param {ibc.core.client.v1.IIdentifiedClientState} message IdentifiedClientState message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IdentifiedClientState.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.clientId != null && Object.hasOwnProperty.call(message, "clientId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.clientId); + if (message.clientState != null && Object.hasOwnProperty.call(message, "clientState")) + $root.google.protobuf.Any.encode(message.clientState, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified IdentifiedClientState message, length delimited. Does not implicitly {@link ibc.core.client.v1.IdentifiedClientState.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.client.v1.IdentifiedClientState + * @static + * @param {ibc.core.client.v1.IIdentifiedClientState} message IdentifiedClientState message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IdentifiedClientState.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IdentifiedClientState message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.client.v1.IdentifiedClientState + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.client.v1.IdentifiedClientState} IdentifiedClientState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IdentifiedClientState.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.IdentifiedClientState(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.clientId = reader.string(); + break; + case 2: + message.clientState = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IdentifiedClientState message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.client.v1.IdentifiedClientState + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.client.v1.IdentifiedClientState} IdentifiedClientState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IdentifiedClientState.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IdentifiedClientState message. + * @function verify + * @memberof ibc.core.client.v1.IdentifiedClientState + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IdentifiedClientState.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.clientId != null && message.hasOwnProperty("clientId")) + if (!$util.isString(message.clientId)) + return "clientId: string expected"; + if (message.clientState != null && message.hasOwnProperty("clientState")) { + let error = $root.google.protobuf.Any.verify(message.clientState); + if (error) + return "clientState." + error; + } + return null; + }; + + /** + * Creates an IdentifiedClientState message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.client.v1.IdentifiedClientState + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.client.v1.IdentifiedClientState} IdentifiedClientState + */ + IdentifiedClientState.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.client.v1.IdentifiedClientState) + return object; + let message = new $root.ibc.core.client.v1.IdentifiedClientState(); + if (object.clientId != null) + message.clientId = String(object.clientId); + if (object.clientState != null) { + if (typeof object.clientState !== "object") + throw TypeError(".ibc.core.client.v1.IdentifiedClientState.clientState: object expected"); + message.clientState = $root.google.protobuf.Any.fromObject(object.clientState); + } + return message; + }; + + /** + * Creates a plain object from an IdentifiedClientState message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.client.v1.IdentifiedClientState + * @static + * @param {ibc.core.client.v1.IdentifiedClientState} message IdentifiedClientState + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IdentifiedClientState.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.clientId = ""; + object.clientState = null; + } + if (message.clientId != null && message.hasOwnProperty("clientId")) + object.clientId = message.clientId; + if (message.clientState != null && message.hasOwnProperty("clientState")) + object.clientState = $root.google.protobuf.Any.toObject(message.clientState, options); + return object; + }; + + /** + * Converts this IdentifiedClientState to JSON. + * @function toJSON + * @memberof ibc.core.client.v1.IdentifiedClientState + * @instance + * @returns {Object.} JSON object + */ + IdentifiedClientState.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return IdentifiedClientState; + })(v1.IdentifiedClientState || {}); + + v1.ConsensusStateWithHeight = (function(ConsensusStateWithHeight) { + + /** + * Properties of a ConsensusStateWithHeight. + * @memberof ibc.core.client.v1 + * @interface IConsensusStateWithHeight + * @property {ibc.core.client.v1.IHeight|null} [height] ConsensusStateWithHeight height + * @property {google.protobuf.IAny|null} [consensusState] ConsensusStateWithHeight consensusState + */ + + /** + * Constructs a new ConsensusStateWithHeight. + * @memberof ibc.core.client.v1 + * @classdesc Represents a ConsensusStateWithHeight. + * @implements IConsensusStateWithHeight + * @constructor + * @param {ibc.core.client.v1.IConsensusStateWithHeight=} [properties] Properties to set + */ + function ConsensusStateWithHeight(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ConsensusStateWithHeight height. + * @member {ibc.core.client.v1.IHeight|null|undefined} height + * @memberof ibc.core.client.v1.ConsensusStateWithHeight + * @instance + */ + ConsensusStateWithHeight.prototype.height = null; + + /** + * ConsensusStateWithHeight consensusState. + * @member {google.protobuf.IAny|null|undefined} consensusState + * @memberof ibc.core.client.v1.ConsensusStateWithHeight + * @instance + */ + ConsensusStateWithHeight.prototype.consensusState = null; + + /** + * Creates a new ConsensusStateWithHeight instance using the specified properties. + * @function create + * @memberof ibc.core.client.v1.ConsensusStateWithHeight + * @static + * @param {ibc.core.client.v1.IConsensusStateWithHeight=} [properties] Properties to set + * @returns {ibc.core.client.v1.ConsensusStateWithHeight} ConsensusStateWithHeight instance + */ + ConsensusStateWithHeight.create = function create(properties) { + return new ConsensusStateWithHeight(properties); + }; + + /** + * Encodes the specified ConsensusStateWithHeight message. Does not implicitly {@link ibc.core.client.v1.ConsensusStateWithHeight.verify|verify} messages. + * @function encode + * @memberof ibc.core.client.v1.ConsensusStateWithHeight + * @static + * @param {ibc.core.client.v1.IConsensusStateWithHeight} message ConsensusStateWithHeight message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConsensusStateWithHeight.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.height != null && Object.hasOwnProperty.call(message, "height")) + $root.ibc.core.client.v1.Height.encode(message.height, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.consensusState != null && Object.hasOwnProperty.call(message, "consensusState")) + $root.google.protobuf.Any.encode(message.consensusState, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ConsensusStateWithHeight message, length delimited. Does not implicitly {@link ibc.core.client.v1.ConsensusStateWithHeight.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.client.v1.ConsensusStateWithHeight + * @static + * @param {ibc.core.client.v1.IConsensusStateWithHeight} message ConsensusStateWithHeight message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConsensusStateWithHeight.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConsensusStateWithHeight message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.client.v1.ConsensusStateWithHeight + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.client.v1.ConsensusStateWithHeight} ConsensusStateWithHeight + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConsensusStateWithHeight.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.ConsensusStateWithHeight(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); + break; + case 2: + message.consensusState = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ConsensusStateWithHeight message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.client.v1.ConsensusStateWithHeight + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.client.v1.ConsensusStateWithHeight} ConsensusStateWithHeight + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConsensusStateWithHeight.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConsensusStateWithHeight message. + * @function verify + * @memberof ibc.core.client.v1.ConsensusStateWithHeight + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConsensusStateWithHeight.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.height != null && message.hasOwnProperty("height")) { + let error = $root.ibc.core.client.v1.Height.verify(message.height); + if (error) + return "height." + error; + } + if (message.consensusState != null && message.hasOwnProperty("consensusState")) { + let error = $root.google.protobuf.Any.verify(message.consensusState); + if (error) + return "consensusState." + error; + } + return null; + }; + + /** + * Creates a ConsensusStateWithHeight message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.client.v1.ConsensusStateWithHeight + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.client.v1.ConsensusStateWithHeight} ConsensusStateWithHeight + */ + ConsensusStateWithHeight.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.client.v1.ConsensusStateWithHeight) + return object; + let message = new $root.ibc.core.client.v1.ConsensusStateWithHeight(); + if (object.height != null) { + if (typeof object.height !== "object") + throw TypeError(".ibc.core.client.v1.ConsensusStateWithHeight.height: object expected"); + message.height = $root.ibc.core.client.v1.Height.fromObject(object.height); + } + if (object.consensusState != null) { + if (typeof object.consensusState !== "object") + throw TypeError(".ibc.core.client.v1.ConsensusStateWithHeight.consensusState: object expected"); + message.consensusState = $root.google.protobuf.Any.fromObject(object.consensusState); + } + return message; + }; + + /** + * Creates a plain object from a ConsensusStateWithHeight message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.client.v1.ConsensusStateWithHeight + * @static + * @param {ibc.core.client.v1.ConsensusStateWithHeight} message ConsensusStateWithHeight + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConsensusStateWithHeight.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.height = null; + object.consensusState = null; + } + if (message.height != null && message.hasOwnProperty("height")) + object.height = $root.ibc.core.client.v1.Height.toObject(message.height, options); + if (message.consensusState != null && message.hasOwnProperty("consensusState")) + object.consensusState = $root.google.protobuf.Any.toObject(message.consensusState, options); + return object; + }; + + /** + * Converts this ConsensusStateWithHeight to JSON. + * @function toJSON + * @memberof ibc.core.client.v1.ConsensusStateWithHeight + * @instance + * @returns {Object.} JSON object + */ + ConsensusStateWithHeight.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ConsensusStateWithHeight; + })(v1.ConsensusStateWithHeight || {}); + + v1.ClientConsensusStates = (function(ClientConsensusStates) { + + /** + * Properties of a ClientConsensusStates. + * @memberof ibc.core.client.v1 + * @interface IClientConsensusStates + * @property {string|null} [clientId] ClientConsensusStates clientId + * @property {Array.|null} [consensusStates] ClientConsensusStates consensusStates + */ + + /** + * Constructs a new ClientConsensusStates. + * @memberof ibc.core.client.v1 + * @classdesc Represents a ClientConsensusStates. + * @implements IClientConsensusStates + * @constructor + * @param {ibc.core.client.v1.IClientConsensusStates=} [properties] Properties to set + */ + function ClientConsensusStates(properties) { + this.consensusStates = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ClientConsensusStates clientId. + * @member {string} clientId + * @memberof ibc.core.client.v1.ClientConsensusStates + * @instance + */ + ClientConsensusStates.prototype.clientId = ""; + + /** + * ClientConsensusStates consensusStates. + * @member {Array.} consensusStates + * @memberof ibc.core.client.v1.ClientConsensusStates + * @instance + */ + ClientConsensusStates.prototype.consensusStates = $util.emptyArray; + + /** + * Creates a new ClientConsensusStates instance using the specified properties. + * @function create + * @memberof ibc.core.client.v1.ClientConsensusStates + * @static + * @param {ibc.core.client.v1.IClientConsensusStates=} [properties] Properties to set + * @returns {ibc.core.client.v1.ClientConsensusStates} ClientConsensusStates instance + */ + ClientConsensusStates.create = function create(properties) { + return new ClientConsensusStates(properties); + }; + + /** + * Encodes the specified ClientConsensusStates message. Does not implicitly {@link ibc.core.client.v1.ClientConsensusStates.verify|verify} messages. + * @function encode + * @memberof ibc.core.client.v1.ClientConsensusStates + * @static + * @param {ibc.core.client.v1.IClientConsensusStates} message ClientConsensusStates message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientConsensusStates.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.clientId != null && Object.hasOwnProperty.call(message, "clientId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.clientId); + if (message.consensusStates != null && message.consensusStates.length) + for (let i = 0; i < message.consensusStates.length; ++i) + $root.ibc.core.client.v1.ConsensusStateWithHeight.encode(message.consensusStates[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ClientConsensusStates message, length delimited. Does not implicitly {@link ibc.core.client.v1.ClientConsensusStates.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.client.v1.ClientConsensusStates + * @static + * @param {ibc.core.client.v1.IClientConsensusStates} message ClientConsensusStates message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientConsensusStates.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ClientConsensusStates message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.client.v1.ClientConsensusStates + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.client.v1.ClientConsensusStates} ClientConsensusStates + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientConsensusStates.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.ClientConsensusStates(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.clientId = reader.string(); + break; + case 2: + if (!(message.consensusStates && message.consensusStates.length)) + message.consensusStates = []; + message.consensusStates.push($root.ibc.core.client.v1.ConsensusStateWithHeight.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ClientConsensusStates message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.client.v1.ClientConsensusStates + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.client.v1.ClientConsensusStates} ClientConsensusStates + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientConsensusStates.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ClientConsensusStates message. + * @function verify + * @memberof ibc.core.client.v1.ClientConsensusStates + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ClientConsensusStates.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.clientId != null && message.hasOwnProperty("clientId")) + if (!$util.isString(message.clientId)) + return "clientId: string expected"; + if (message.consensusStates != null && message.hasOwnProperty("consensusStates")) { + if (!Array.isArray(message.consensusStates)) + return "consensusStates: array expected"; + for (let i = 0; i < message.consensusStates.length; ++i) { + let error = $root.ibc.core.client.v1.ConsensusStateWithHeight.verify(message.consensusStates[i]); + if (error) + return "consensusStates." + error; + } + } + return null; + }; + + /** + * Creates a ClientConsensusStates message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.client.v1.ClientConsensusStates + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.client.v1.ClientConsensusStates} ClientConsensusStates + */ + ClientConsensusStates.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.client.v1.ClientConsensusStates) + return object; + let message = new $root.ibc.core.client.v1.ClientConsensusStates(); + if (object.clientId != null) + message.clientId = String(object.clientId); + if (object.consensusStates) { + if (!Array.isArray(object.consensusStates)) + throw TypeError(".ibc.core.client.v1.ClientConsensusStates.consensusStates: array expected"); + message.consensusStates = []; + for (let i = 0; i < object.consensusStates.length; ++i) { + if (typeof object.consensusStates[i] !== "object") + throw TypeError(".ibc.core.client.v1.ClientConsensusStates.consensusStates: object expected"); + message.consensusStates[i] = $root.ibc.core.client.v1.ConsensusStateWithHeight.fromObject(object.consensusStates[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ClientConsensusStates message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.client.v1.ClientConsensusStates + * @static + * @param {ibc.core.client.v1.ClientConsensusStates} message ClientConsensusStates + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ClientConsensusStates.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.consensusStates = []; + if (options.defaults) + object.clientId = ""; + if (message.clientId != null && message.hasOwnProperty("clientId")) + object.clientId = message.clientId; + if (message.consensusStates && message.consensusStates.length) { + object.consensusStates = []; + for (let j = 0; j < message.consensusStates.length; ++j) + object.consensusStates[j] = $root.ibc.core.client.v1.ConsensusStateWithHeight.toObject(message.consensusStates[j], options); + } + return object; + }; + + /** + * Converts this ClientConsensusStates to JSON. + * @function toJSON + * @memberof ibc.core.client.v1.ClientConsensusStates + * @instance + * @returns {Object.} JSON object + */ + ClientConsensusStates.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ClientConsensusStates; + })(v1.ClientConsensusStates || {}); + + v1.ClientUpdateProposal = (function(ClientUpdateProposal) { + + /** + * Properties of a ClientUpdateProposal. + * @memberof ibc.core.client.v1 + * @interface IClientUpdateProposal + * @property {string|null} [title] ClientUpdateProposal title + * @property {string|null} [description] ClientUpdateProposal description + * @property {string|null} [clientId] ClientUpdateProposal clientId + * @property {google.protobuf.IAny|null} [header] ClientUpdateProposal header + */ + + /** + * Constructs a new ClientUpdateProposal. + * @memberof ibc.core.client.v1 + * @classdesc Represents a ClientUpdateProposal. + * @implements IClientUpdateProposal + * @constructor + * @param {ibc.core.client.v1.IClientUpdateProposal=} [properties] Properties to set + */ + function ClientUpdateProposal(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ClientUpdateProposal title. + * @member {string} title + * @memberof ibc.core.client.v1.ClientUpdateProposal + * @instance + */ + ClientUpdateProposal.prototype.title = ""; + + /** + * ClientUpdateProposal description. + * @member {string} description + * @memberof ibc.core.client.v1.ClientUpdateProposal + * @instance + */ + ClientUpdateProposal.prototype.description = ""; + + /** + * ClientUpdateProposal clientId. + * @member {string} clientId + * @memberof ibc.core.client.v1.ClientUpdateProposal + * @instance + */ + ClientUpdateProposal.prototype.clientId = ""; + + /** + * ClientUpdateProposal header. + * @member {google.protobuf.IAny|null|undefined} header + * @memberof ibc.core.client.v1.ClientUpdateProposal + * @instance + */ + ClientUpdateProposal.prototype.header = null; + + /** + * Creates a new ClientUpdateProposal instance using the specified properties. + * @function create + * @memberof ibc.core.client.v1.ClientUpdateProposal + * @static + * @param {ibc.core.client.v1.IClientUpdateProposal=} [properties] Properties to set + * @returns {ibc.core.client.v1.ClientUpdateProposal} ClientUpdateProposal instance + */ + ClientUpdateProposal.create = function create(properties) { + return new ClientUpdateProposal(properties); + }; + + /** + * Encodes the specified ClientUpdateProposal message. Does not implicitly {@link ibc.core.client.v1.ClientUpdateProposal.verify|verify} messages. + * @function encode + * @memberof ibc.core.client.v1.ClientUpdateProposal + * @static + * @param {ibc.core.client.v1.IClientUpdateProposal} message ClientUpdateProposal message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientUpdateProposal.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.title != null && Object.hasOwnProperty.call(message, "title")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.title); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.clientId != null && Object.hasOwnProperty.call(message, "clientId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.clientId); + if (message.header != null && Object.hasOwnProperty.call(message, "header")) + $root.google.protobuf.Any.encode(message.header, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ClientUpdateProposal message, length delimited. Does not implicitly {@link ibc.core.client.v1.ClientUpdateProposal.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.client.v1.ClientUpdateProposal + * @static + * @param {ibc.core.client.v1.IClientUpdateProposal} message ClientUpdateProposal message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientUpdateProposal.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ClientUpdateProposal message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.client.v1.ClientUpdateProposal + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.client.v1.ClientUpdateProposal} ClientUpdateProposal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientUpdateProposal.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.ClientUpdateProposal(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.title = reader.string(); + break; + case 2: + message.description = reader.string(); + break; + case 3: + message.clientId = reader.string(); + break; + case 4: + message.header = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ClientUpdateProposal message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.client.v1.ClientUpdateProposal + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.client.v1.ClientUpdateProposal} ClientUpdateProposal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientUpdateProposal.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ClientUpdateProposal message. + * @function verify + * @memberof ibc.core.client.v1.ClientUpdateProposal + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ClientUpdateProposal.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.title != null && message.hasOwnProperty("title")) + if (!$util.isString(message.title)) + return "title: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.clientId != null && message.hasOwnProperty("clientId")) + if (!$util.isString(message.clientId)) + return "clientId: string expected"; + if (message.header != null && message.hasOwnProperty("header")) { + let error = $root.google.protobuf.Any.verify(message.header); + if (error) + return "header." + error; + } + return null; + }; + + /** + * Creates a ClientUpdateProposal message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.client.v1.ClientUpdateProposal + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.client.v1.ClientUpdateProposal} ClientUpdateProposal + */ + ClientUpdateProposal.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.client.v1.ClientUpdateProposal) + return object; + let message = new $root.ibc.core.client.v1.ClientUpdateProposal(); + if (object.title != null) + message.title = String(object.title); + if (object.description != null) + message.description = String(object.description); + if (object.clientId != null) + message.clientId = String(object.clientId); + if (object.header != null) { + if (typeof object.header !== "object") + throw TypeError(".ibc.core.client.v1.ClientUpdateProposal.header: object expected"); + message.header = $root.google.protobuf.Any.fromObject(object.header); + } + return message; + }; + + /** + * Creates a plain object from a ClientUpdateProposal message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.client.v1.ClientUpdateProposal + * @static + * @param {ibc.core.client.v1.ClientUpdateProposal} message ClientUpdateProposal + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ClientUpdateProposal.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.title = ""; + object.description = ""; + object.clientId = ""; + object.header = null; + } + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.clientId != null && message.hasOwnProperty("clientId")) + object.clientId = message.clientId; + if (message.header != null && message.hasOwnProperty("header")) + object.header = $root.google.protobuf.Any.toObject(message.header, options); + return object; + }; + + /** + * Converts this ClientUpdateProposal to JSON. + * @function toJSON + * @memberof ibc.core.client.v1.ClientUpdateProposal + * @instance + * @returns {Object.} JSON object + */ + ClientUpdateProposal.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ClientUpdateProposal; + })(v1.ClientUpdateProposal || {}); + + v1.Height = (function(Height) { + + /** + * Properties of an Height. + * @memberof ibc.core.client.v1 + * @interface IHeight + * @property {number|Long|null} [revisionNumber] Height revisionNumber + * @property {number|Long|null} [revisionHeight] Height revisionHeight + */ + + /** + * Constructs a new Height. + * @memberof ibc.core.client.v1 + * @classdesc Represents an Height. + * @implements IHeight + * @constructor + * @param {ibc.core.client.v1.IHeight=} [properties] Properties to set + */ + function Height(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Height revisionNumber. + * @member {number|Long} revisionNumber + * @memberof ibc.core.client.v1.Height + * @instance + */ + Height.prototype.revisionNumber = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Height revisionHeight. + * @member {number|Long} revisionHeight + * @memberof ibc.core.client.v1.Height + * @instance + */ + Height.prototype.revisionHeight = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new Height instance using the specified properties. + * @function create + * @memberof ibc.core.client.v1.Height + * @static + * @param {ibc.core.client.v1.IHeight=} [properties] Properties to set + * @returns {ibc.core.client.v1.Height} Height instance + */ + Height.create = function create(properties) { + return new Height(properties); + }; + + /** + * Encodes the specified Height message. Does not implicitly {@link ibc.core.client.v1.Height.verify|verify} messages. + * @function encode + * @memberof ibc.core.client.v1.Height + * @static + * @param {ibc.core.client.v1.IHeight} message Height message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Height.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.revisionNumber != null && Object.hasOwnProperty.call(message, "revisionNumber")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.revisionNumber); + if (message.revisionHeight != null && Object.hasOwnProperty.call(message, "revisionHeight")) + writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.revisionHeight); + return writer; + }; + + /** + * Encodes the specified Height message, length delimited. Does not implicitly {@link ibc.core.client.v1.Height.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.client.v1.Height + * @static + * @param {ibc.core.client.v1.IHeight} message Height message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Height.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Height message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.client.v1.Height + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.client.v1.Height} Height + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Height.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.Height(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.revisionNumber = reader.uint64(); + break; + case 2: + message.revisionHeight = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Height message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.client.v1.Height + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.client.v1.Height} Height + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Height.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Height message. + * @function verify + * @memberof ibc.core.client.v1.Height + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Height.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.revisionNumber != null && message.hasOwnProperty("revisionNumber")) + if (!$util.isInteger(message.revisionNumber) && !(message.revisionNumber && $util.isInteger(message.revisionNumber.low) && $util.isInteger(message.revisionNumber.high))) + return "revisionNumber: integer|Long expected"; + if (message.revisionHeight != null && message.hasOwnProperty("revisionHeight")) + if (!$util.isInteger(message.revisionHeight) && !(message.revisionHeight && $util.isInteger(message.revisionHeight.low) && $util.isInteger(message.revisionHeight.high))) + return "revisionHeight: integer|Long expected"; + return null; + }; + + /** + * Creates an Height message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.client.v1.Height + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.client.v1.Height} Height + */ + Height.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.client.v1.Height) + return object; + let message = new $root.ibc.core.client.v1.Height(); + if (object.revisionNumber != null) + if ($util.Long) + (message.revisionNumber = $util.Long.fromValue(object.revisionNumber)).unsigned = true; + else if (typeof object.revisionNumber === "string") + message.revisionNumber = parseInt(object.revisionNumber, 10); + else if (typeof object.revisionNumber === "number") + message.revisionNumber = object.revisionNumber; + else if (typeof object.revisionNumber === "object") + message.revisionNumber = new $util.LongBits(object.revisionNumber.low >>> 0, object.revisionNumber.high >>> 0).toNumber(true); + if (object.revisionHeight != null) + if ($util.Long) + (message.revisionHeight = $util.Long.fromValue(object.revisionHeight)).unsigned = true; + else if (typeof object.revisionHeight === "string") + message.revisionHeight = parseInt(object.revisionHeight, 10); + else if (typeof object.revisionHeight === "number") + message.revisionHeight = object.revisionHeight; + else if (typeof object.revisionHeight === "object") + message.revisionHeight = new $util.LongBits(object.revisionHeight.low >>> 0, object.revisionHeight.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from an Height message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.client.v1.Height + * @static + * @param {ibc.core.client.v1.Height} message Height + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Height.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.revisionNumber = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.revisionNumber = options.longs === String ? "0" : 0; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.revisionHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.revisionHeight = options.longs === String ? "0" : 0; + } + if (message.revisionNumber != null && message.hasOwnProperty("revisionNumber")) + if (typeof message.revisionNumber === "number") + object.revisionNumber = options.longs === String ? String(message.revisionNumber) : message.revisionNumber; + else + object.revisionNumber = options.longs === String ? $util.Long.prototype.toString.call(message.revisionNumber) : options.longs === Number ? new $util.LongBits(message.revisionNumber.low >>> 0, message.revisionNumber.high >>> 0).toNumber(true) : message.revisionNumber; + if (message.revisionHeight != null && message.hasOwnProperty("revisionHeight")) + if (typeof message.revisionHeight === "number") + object.revisionHeight = options.longs === String ? String(message.revisionHeight) : message.revisionHeight; + else + object.revisionHeight = options.longs === String ? $util.Long.prototype.toString.call(message.revisionHeight) : options.longs === Number ? new $util.LongBits(message.revisionHeight.low >>> 0, message.revisionHeight.high >>> 0).toNumber(true) : message.revisionHeight; + return object; + }; + + /** + * Converts this Height to JSON. + * @function toJSON + * @memberof ibc.core.client.v1.Height + * @instance + * @returns {Object.} JSON object + */ + Height.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Height; + })(v1.Height || {}); + + v1.Params = (function(Params) { + + /** + * Properties of a Params. + * @memberof ibc.core.client.v1 + * @interface IParams + * @property {Array.|null} [allowedClients] Params allowedClients + */ + + /** + * Constructs a new Params. + * @memberof ibc.core.client.v1 + * @classdesc Represents a Params. + * @implements IParams + * @constructor + * @param {ibc.core.client.v1.IParams=} [properties] Properties to set + */ + function Params(properties) { + this.allowedClients = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Params allowedClients. + * @member {Array.} allowedClients + * @memberof ibc.core.client.v1.Params + * @instance + */ + Params.prototype.allowedClients = $util.emptyArray; + + /** + * Creates a new Params instance using the specified properties. + * @function create + * @memberof ibc.core.client.v1.Params + * @static + * @param {ibc.core.client.v1.IParams=} [properties] Properties to set + * @returns {ibc.core.client.v1.Params} Params instance + */ + Params.create = function create(properties) { + return new Params(properties); + }; + + /** + * Encodes the specified Params message. Does not implicitly {@link ibc.core.client.v1.Params.verify|verify} messages. + * @function encode + * @memberof ibc.core.client.v1.Params + * @static + * @param {ibc.core.client.v1.IParams} message Params message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Params.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.allowedClients != null && message.allowedClients.length) + for (let i = 0; i < message.allowedClients.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.allowedClients[i]); + return writer; + }; + + /** + * Encodes the specified Params message, length delimited. Does not implicitly {@link ibc.core.client.v1.Params.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.client.v1.Params + * @static + * @param {ibc.core.client.v1.IParams} message Params message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Params.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Params message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.client.v1.Params + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.client.v1.Params} Params + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Params.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.Params(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.allowedClients && message.allowedClients.length)) + message.allowedClients = []; + message.allowedClients.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Params message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.client.v1.Params + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.client.v1.Params} Params + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Params.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Params message. + * @function verify + * @memberof ibc.core.client.v1.Params + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Params.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.allowedClients != null && message.hasOwnProperty("allowedClients")) { + if (!Array.isArray(message.allowedClients)) + return "allowedClients: array expected"; + for (let i = 0; i < message.allowedClients.length; ++i) + if (!$util.isString(message.allowedClients[i])) + return "allowedClients: string[] expected"; + } + return null; + }; + + /** + * Creates a Params message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.client.v1.Params + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.client.v1.Params} Params + */ + Params.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.client.v1.Params) + return object; + let message = new $root.ibc.core.client.v1.Params(); + if (object.allowedClients) { + if (!Array.isArray(object.allowedClients)) + throw TypeError(".ibc.core.client.v1.Params.allowedClients: array expected"); + message.allowedClients = []; + for (let i = 0; i < object.allowedClients.length; ++i) + message.allowedClients[i] = String(object.allowedClients[i]); + } + return message; + }; + + /** + * Creates a plain object from a Params message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.client.v1.Params + * @static + * @param {ibc.core.client.v1.Params} message Params + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Params.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.allowedClients = []; + if (message.allowedClients && message.allowedClients.length) { + object.allowedClients = []; + for (let j = 0; j < message.allowedClients.length; ++j) + object.allowedClients[j] = message.allowedClients[j]; + } + return object; + }; + + /** + * Converts this Params to JSON. + * @function toJSON + * @memberof ibc.core.client.v1.Params + * @instance + * @returns {Object.} JSON object + */ + Params.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Params; + })(v1.Params || {}); + + v1.GenesisState = (function(GenesisState) { + + /** + * Properties of a GenesisState. + * @memberof ibc.core.client.v1 + * @interface IGenesisState + * @property {Array.|null} [clients] GenesisState clients + * @property {Array.|null} [clientsConsensus] GenesisState clientsConsensus + * @property {Array.|null} [clientsMetadata] GenesisState clientsMetadata + * @property {ibc.core.client.v1.IParams|null} [params] GenesisState params + * @property {boolean|null} [createLocalhost] GenesisState createLocalhost + * @property {number|Long|null} [nextClientSequence] GenesisState nextClientSequence + */ + + /** + * Constructs a new GenesisState. + * @memberof ibc.core.client.v1 + * @classdesc Represents a GenesisState. + * @implements IGenesisState + * @constructor + * @param {ibc.core.client.v1.IGenesisState=} [properties] Properties to set + */ + function GenesisState(properties) { + this.clients = []; + this.clientsConsensus = []; + this.clientsMetadata = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GenesisState clients. + * @member {Array.} clients + * @memberof ibc.core.client.v1.GenesisState + * @instance + */ + GenesisState.prototype.clients = $util.emptyArray; + + /** + * GenesisState clientsConsensus. + * @member {Array.} clientsConsensus + * @memberof ibc.core.client.v1.GenesisState + * @instance + */ + GenesisState.prototype.clientsConsensus = $util.emptyArray; + + /** + * GenesisState clientsMetadata. + * @member {Array.} clientsMetadata + * @memberof ibc.core.client.v1.GenesisState + * @instance + */ + GenesisState.prototype.clientsMetadata = $util.emptyArray; + + /** + * GenesisState params. + * @member {ibc.core.client.v1.IParams|null|undefined} params + * @memberof ibc.core.client.v1.GenesisState + * @instance + */ + GenesisState.prototype.params = null; + + /** + * GenesisState createLocalhost. + * @member {boolean} createLocalhost + * @memberof ibc.core.client.v1.GenesisState + * @instance + */ + GenesisState.prototype.createLocalhost = false; + + /** + * GenesisState nextClientSequence. + * @member {number|Long} nextClientSequence + * @memberof ibc.core.client.v1.GenesisState + * @instance + */ + GenesisState.prototype.nextClientSequence = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new GenesisState instance using the specified properties. + * @function create + * @memberof ibc.core.client.v1.GenesisState + * @static + * @param {ibc.core.client.v1.IGenesisState=} [properties] Properties to set + * @returns {ibc.core.client.v1.GenesisState} GenesisState instance + */ + GenesisState.create = function create(properties) { + return new GenesisState(properties); + }; + + /** + * Encodes the specified GenesisState message. Does not implicitly {@link ibc.core.client.v1.GenesisState.verify|verify} messages. + * @function encode + * @memberof ibc.core.client.v1.GenesisState + * @static + * @param {ibc.core.client.v1.IGenesisState} message GenesisState message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenesisState.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.clients != null && message.clients.length) + for (let i = 0; i < message.clients.length; ++i) + $root.ibc.core.client.v1.IdentifiedClientState.encode(message.clients[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.clientsConsensus != null && message.clientsConsensus.length) + for (let i = 0; i < message.clientsConsensus.length; ++i) + $root.ibc.core.client.v1.ClientConsensusStates.encode(message.clientsConsensus[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.clientsMetadata != null && message.clientsMetadata.length) + for (let i = 0; i < message.clientsMetadata.length; ++i) + $root.ibc.core.client.v1.IdentifiedGenesisMetadata.encode(message.clientsMetadata[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.params != null && Object.hasOwnProperty.call(message, "params")) + $root.ibc.core.client.v1.Params.encode(message.params, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.createLocalhost != null && Object.hasOwnProperty.call(message, "createLocalhost")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.createLocalhost); + if (message.nextClientSequence != null && Object.hasOwnProperty.call(message, "nextClientSequence")) + writer.uint32(/* id 6, wireType 0 =*/48).uint64(message.nextClientSequence); + return writer; + }; + + /** + * Encodes the specified GenesisState message, length delimited. Does not implicitly {@link ibc.core.client.v1.GenesisState.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.client.v1.GenesisState + * @static + * @param {ibc.core.client.v1.IGenesisState} message GenesisState message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenesisState.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GenesisState message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.client.v1.GenesisState + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.client.v1.GenesisState} GenesisState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenesisState.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.GenesisState(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.clients && message.clients.length)) + message.clients = []; + message.clients.push($root.ibc.core.client.v1.IdentifiedClientState.decode(reader, reader.uint32())); + break; + case 2: + if (!(message.clientsConsensus && message.clientsConsensus.length)) + message.clientsConsensus = []; + message.clientsConsensus.push($root.ibc.core.client.v1.ClientConsensusStates.decode(reader, reader.uint32())); + break; + case 3: + if (!(message.clientsMetadata && message.clientsMetadata.length)) + message.clientsMetadata = []; + message.clientsMetadata.push($root.ibc.core.client.v1.IdentifiedGenesisMetadata.decode(reader, reader.uint32())); + break; + case 4: + message.params = $root.ibc.core.client.v1.Params.decode(reader, reader.uint32()); + break; + case 5: + message.createLocalhost = reader.bool(); + break; + case 6: + message.nextClientSequence = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GenesisState message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.client.v1.GenesisState + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.client.v1.GenesisState} GenesisState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenesisState.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GenesisState message. + * @function verify + * @memberof ibc.core.client.v1.GenesisState + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GenesisState.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.clients != null && message.hasOwnProperty("clients")) { + if (!Array.isArray(message.clients)) + return "clients: array expected"; + for (let i = 0; i < message.clients.length; ++i) { + let error = $root.ibc.core.client.v1.IdentifiedClientState.verify(message.clients[i]); + if (error) + return "clients." + error; + } + } + if (message.clientsConsensus != null && message.hasOwnProperty("clientsConsensus")) { + if (!Array.isArray(message.clientsConsensus)) + return "clientsConsensus: array expected"; + for (let i = 0; i < message.clientsConsensus.length; ++i) { + let error = $root.ibc.core.client.v1.ClientConsensusStates.verify(message.clientsConsensus[i]); + if (error) + return "clientsConsensus." + error; + } + } + if (message.clientsMetadata != null && message.hasOwnProperty("clientsMetadata")) { + if (!Array.isArray(message.clientsMetadata)) + return "clientsMetadata: array expected"; + for (let i = 0; i < message.clientsMetadata.length; ++i) { + let error = $root.ibc.core.client.v1.IdentifiedGenesisMetadata.verify(message.clientsMetadata[i]); + if (error) + return "clientsMetadata." + error; + } + } + if (message.params != null && message.hasOwnProperty("params")) { + let error = $root.ibc.core.client.v1.Params.verify(message.params); + if (error) + return "params." + error; + } + if (message.createLocalhost != null && message.hasOwnProperty("createLocalhost")) + if (typeof message.createLocalhost !== "boolean") + return "createLocalhost: boolean expected"; + if (message.nextClientSequence != null && message.hasOwnProperty("nextClientSequence")) + if (!$util.isInteger(message.nextClientSequence) && !(message.nextClientSequence && $util.isInteger(message.nextClientSequence.low) && $util.isInteger(message.nextClientSequence.high))) + return "nextClientSequence: integer|Long expected"; + return null; + }; + + /** + * Creates a GenesisState message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.client.v1.GenesisState + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.client.v1.GenesisState} GenesisState + */ + GenesisState.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.client.v1.GenesisState) + return object; + let message = new $root.ibc.core.client.v1.GenesisState(); + if (object.clients) { + if (!Array.isArray(object.clients)) + throw TypeError(".ibc.core.client.v1.GenesisState.clients: array expected"); + message.clients = []; + for (let i = 0; i < object.clients.length; ++i) { + if (typeof object.clients[i] !== "object") + throw TypeError(".ibc.core.client.v1.GenesisState.clients: object expected"); + message.clients[i] = $root.ibc.core.client.v1.IdentifiedClientState.fromObject(object.clients[i]); + } + } + if (object.clientsConsensus) { + if (!Array.isArray(object.clientsConsensus)) + throw TypeError(".ibc.core.client.v1.GenesisState.clientsConsensus: array expected"); + message.clientsConsensus = []; + for (let i = 0; i < object.clientsConsensus.length; ++i) { + if (typeof object.clientsConsensus[i] !== "object") + throw TypeError(".ibc.core.client.v1.GenesisState.clientsConsensus: object expected"); + message.clientsConsensus[i] = $root.ibc.core.client.v1.ClientConsensusStates.fromObject(object.clientsConsensus[i]); + } + } + if (object.clientsMetadata) { + if (!Array.isArray(object.clientsMetadata)) + throw TypeError(".ibc.core.client.v1.GenesisState.clientsMetadata: array expected"); + message.clientsMetadata = []; + for (let i = 0; i < object.clientsMetadata.length; ++i) { + if (typeof object.clientsMetadata[i] !== "object") + throw TypeError(".ibc.core.client.v1.GenesisState.clientsMetadata: object expected"); + message.clientsMetadata[i] = $root.ibc.core.client.v1.IdentifiedGenesisMetadata.fromObject(object.clientsMetadata[i]); + } + } + if (object.params != null) { + if (typeof object.params !== "object") + throw TypeError(".ibc.core.client.v1.GenesisState.params: object expected"); + message.params = $root.ibc.core.client.v1.Params.fromObject(object.params); + } + if (object.createLocalhost != null) + message.createLocalhost = Boolean(object.createLocalhost); + if (object.nextClientSequence != null) + if ($util.Long) + (message.nextClientSequence = $util.Long.fromValue(object.nextClientSequence)).unsigned = true; + else if (typeof object.nextClientSequence === "string") + message.nextClientSequence = parseInt(object.nextClientSequence, 10); + else if (typeof object.nextClientSequence === "number") + message.nextClientSequence = object.nextClientSequence; + else if (typeof object.nextClientSequence === "object") + message.nextClientSequence = new $util.LongBits(object.nextClientSequence.low >>> 0, object.nextClientSequence.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a GenesisState message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.client.v1.GenesisState + * @static + * @param {ibc.core.client.v1.GenesisState} message GenesisState + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GenesisState.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) { + object.clients = []; + object.clientsConsensus = []; + object.clientsMetadata = []; + } + if (options.defaults) { + object.params = null; + object.createLocalhost = false; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.nextClientSequence = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.nextClientSequence = options.longs === String ? "0" : 0; + } + if (message.clients && message.clients.length) { + object.clients = []; + for (let j = 0; j < message.clients.length; ++j) + object.clients[j] = $root.ibc.core.client.v1.IdentifiedClientState.toObject(message.clients[j], options); + } + if (message.clientsConsensus && message.clientsConsensus.length) { + object.clientsConsensus = []; + for (let j = 0; j < message.clientsConsensus.length; ++j) + object.clientsConsensus[j] = $root.ibc.core.client.v1.ClientConsensusStates.toObject(message.clientsConsensus[j], options); + } + if (message.clientsMetadata && message.clientsMetadata.length) { + object.clientsMetadata = []; + for (let j = 0; j < message.clientsMetadata.length; ++j) + object.clientsMetadata[j] = $root.ibc.core.client.v1.IdentifiedGenesisMetadata.toObject(message.clientsMetadata[j], options); + } + if (message.params != null && message.hasOwnProperty("params")) + object.params = $root.ibc.core.client.v1.Params.toObject(message.params, options); + if (message.createLocalhost != null && message.hasOwnProperty("createLocalhost")) + object.createLocalhost = message.createLocalhost; + if (message.nextClientSequence != null && message.hasOwnProperty("nextClientSequence")) + if (typeof message.nextClientSequence === "number") + object.nextClientSequence = options.longs === String ? String(message.nextClientSequence) : message.nextClientSequence; + else + object.nextClientSequence = options.longs === String ? $util.Long.prototype.toString.call(message.nextClientSequence) : options.longs === Number ? new $util.LongBits(message.nextClientSequence.low >>> 0, message.nextClientSequence.high >>> 0).toNumber(true) : message.nextClientSequence; + return object; + }; + + /** + * Converts this GenesisState to JSON. + * @function toJSON + * @memberof ibc.core.client.v1.GenesisState + * @instance + * @returns {Object.} JSON object + */ + GenesisState.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GenesisState; + })(v1.GenesisState || {}); + + v1.GenesisMetadata = (function(GenesisMetadata) { + + /** + * Properties of a GenesisMetadata. + * @memberof ibc.core.client.v1 + * @interface IGenesisMetadata + * @property {Uint8Array|null} [key] GenesisMetadata key + * @property {Uint8Array|null} [value] GenesisMetadata value + */ + + /** + * Constructs a new GenesisMetadata. + * @memberof ibc.core.client.v1 + * @classdesc Represents a GenesisMetadata. + * @implements IGenesisMetadata + * @constructor + * @param {ibc.core.client.v1.IGenesisMetadata=} [properties] Properties to set + */ + function GenesisMetadata(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GenesisMetadata key. + * @member {Uint8Array} key + * @memberof ibc.core.client.v1.GenesisMetadata + * @instance + */ + GenesisMetadata.prototype.key = $util.newBuffer([]); + + /** + * GenesisMetadata value. + * @member {Uint8Array} value + * @memberof ibc.core.client.v1.GenesisMetadata + * @instance + */ + GenesisMetadata.prototype.value = $util.newBuffer([]); + + /** + * Creates a new GenesisMetadata instance using the specified properties. + * @function create + * @memberof ibc.core.client.v1.GenesisMetadata + * @static + * @param {ibc.core.client.v1.IGenesisMetadata=} [properties] Properties to set + * @returns {ibc.core.client.v1.GenesisMetadata} GenesisMetadata instance + */ + GenesisMetadata.create = function create(properties) { + return new GenesisMetadata(properties); + }; + + /** + * Encodes the specified GenesisMetadata message. Does not implicitly {@link ibc.core.client.v1.GenesisMetadata.verify|verify} messages. + * @function encode + * @memberof ibc.core.client.v1.GenesisMetadata + * @static + * @param {ibc.core.client.v1.IGenesisMetadata} message GenesisMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenesisMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.key); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); + return writer; + }; + + /** + * Encodes the specified GenesisMetadata message, length delimited. Does not implicitly {@link ibc.core.client.v1.GenesisMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.client.v1.GenesisMetadata + * @static + * @param {ibc.core.client.v1.IGenesisMetadata} message GenesisMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenesisMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GenesisMetadata message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.client.v1.GenesisMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.client.v1.GenesisMetadata} GenesisMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenesisMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.GenesisMetadata(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.key = reader.bytes(); + break; + case 2: + message.value = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GenesisMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.client.v1.GenesisMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.client.v1.GenesisMetadata} GenesisMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenesisMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GenesisMetadata message. + * @function verify + * @memberof ibc.core.client.v1.GenesisMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GenesisMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.key != null && message.hasOwnProperty("key")) + if (!(message.key && typeof message.key.length === "number" || $util.isString(message.key))) + return "key: buffer expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; + return null; + }; + + /** + * Creates a GenesisMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.client.v1.GenesisMetadata + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.client.v1.GenesisMetadata} GenesisMetadata + */ + GenesisMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.client.v1.GenesisMetadata) + return object; + let message = new $root.ibc.core.client.v1.GenesisMetadata(); + if (object.key != null) + if (typeof object.key === "string") + $util.base64.decode(object.key, message.key = $util.newBuffer($util.base64.length(object.key)), 0); + else if (object.key.length) + message.key = object.key; + if (object.value != null) + if (typeof object.value === "string") + $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); + else if (object.value.length) + message.value = object.value; + return message; + }; + + /** + * Creates a plain object from a GenesisMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.client.v1.GenesisMetadata + * @static + * @param {ibc.core.client.v1.GenesisMetadata} message GenesisMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GenesisMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + if (options.bytes === String) + object.key = ""; + else { + object.key = []; + if (options.bytes !== Array) + object.key = $util.newBuffer(object.key); + } + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + } + if (message.key != null && message.hasOwnProperty("key")) + object.key = options.bytes === String ? $util.base64.encode(message.key, 0, message.key.length) : options.bytes === Array ? Array.prototype.slice.call(message.key) : message.key; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + return object; + }; + + /** + * Converts this GenesisMetadata to JSON. + * @function toJSON + * @memberof ibc.core.client.v1.GenesisMetadata + * @instance + * @returns {Object.} JSON object + */ + GenesisMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GenesisMetadata; + })(v1.GenesisMetadata || {}); + + v1.IdentifiedGenesisMetadata = (function(IdentifiedGenesisMetadata) { + + /** + * Properties of an IdentifiedGenesisMetadata. + * @memberof ibc.core.client.v1 + * @interface IIdentifiedGenesisMetadata + * @property {string|null} [clientId] IdentifiedGenesisMetadata clientId + * @property {Array.|null} [clientMetadata] IdentifiedGenesisMetadata clientMetadata + */ + + /** + * Constructs a new IdentifiedGenesisMetadata. + * @memberof ibc.core.client.v1 + * @classdesc Represents an IdentifiedGenesisMetadata. + * @implements IIdentifiedGenesisMetadata + * @constructor + * @param {ibc.core.client.v1.IIdentifiedGenesisMetadata=} [properties] Properties to set + */ + function IdentifiedGenesisMetadata(properties) { + this.clientMetadata = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * IdentifiedGenesisMetadata clientId. + * @member {string} clientId + * @memberof ibc.core.client.v1.IdentifiedGenesisMetadata + * @instance + */ + IdentifiedGenesisMetadata.prototype.clientId = ""; + + /** + * IdentifiedGenesisMetadata clientMetadata. + * @member {Array.} clientMetadata + * @memberof ibc.core.client.v1.IdentifiedGenesisMetadata + * @instance + */ + IdentifiedGenesisMetadata.prototype.clientMetadata = $util.emptyArray; + + /** + * Creates a new IdentifiedGenesisMetadata instance using the specified properties. + * @function create + * @memberof ibc.core.client.v1.IdentifiedGenesisMetadata + * @static + * @param {ibc.core.client.v1.IIdentifiedGenesisMetadata=} [properties] Properties to set + * @returns {ibc.core.client.v1.IdentifiedGenesisMetadata} IdentifiedGenesisMetadata instance + */ + IdentifiedGenesisMetadata.create = function create(properties) { + return new IdentifiedGenesisMetadata(properties); + }; + + /** + * Encodes the specified IdentifiedGenesisMetadata message. Does not implicitly {@link ibc.core.client.v1.IdentifiedGenesisMetadata.verify|verify} messages. + * @function encode + * @memberof ibc.core.client.v1.IdentifiedGenesisMetadata + * @static + * @param {ibc.core.client.v1.IIdentifiedGenesisMetadata} message IdentifiedGenesisMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IdentifiedGenesisMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.clientId != null && Object.hasOwnProperty.call(message, "clientId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.clientId); + if (message.clientMetadata != null && message.clientMetadata.length) + for (let i = 0; i < message.clientMetadata.length; ++i) + $root.ibc.core.client.v1.GenesisMetadata.encode(message.clientMetadata[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified IdentifiedGenesisMetadata message, length delimited. Does not implicitly {@link ibc.core.client.v1.IdentifiedGenesisMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.client.v1.IdentifiedGenesisMetadata + * @static + * @param {ibc.core.client.v1.IIdentifiedGenesisMetadata} message IdentifiedGenesisMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IdentifiedGenesisMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IdentifiedGenesisMetadata message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.client.v1.IdentifiedGenesisMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.client.v1.IdentifiedGenesisMetadata} IdentifiedGenesisMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IdentifiedGenesisMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.IdentifiedGenesisMetadata(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.clientId = reader.string(); + break; + case 2: + if (!(message.clientMetadata && message.clientMetadata.length)) + message.clientMetadata = []; + message.clientMetadata.push($root.ibc.core.client.v1.GenesisMetadata.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IdentifiedGenesisMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.client.v1.IdentifiedGenesisMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.client.v1.IdentifiedGenesisMetadata} IdentifiedGenesisMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IdentifiedGenesisMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IdentifiedGenesisMetadata message. + * @function verify + * @memberof ibc.core.client.v1.IdentifiedGenesisMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IdentifiedGenesisMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.clientId != null && message.hasOwnProperty("clientId")) + if (!$util.isString(message.clientId)) + return "clientId: string expected"; + if (message.clientMetadata != null && message.hasOwnProperty("clientMetadata")) { + if (!Array.isArray(message.clientMetadata)) + return "clientMetadata: array expected"; + for (let i = 0; i < message.clientMetadata.length; ++i) { + let error = $root.ibc.core.client.v1.GenesisMetadata.verify(message.clientMetadata[i]); + if (error) + return "clientMetadata." + error; + } + } + return null; + }; + + /** + * Creates an IdentifiedGenesisMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.client.v1.IdentifiedGenesisMetadata + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.client.v1.IdentifiedGenesisMetadata} IdentifiedGenesisMetadata + */ + IdentifiedGenesisMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.client.v1.IdentifiedGenesisMetadata) + return object; + let message = new $root.ibc.core.client.v1.IdentifiedGenesisMetadata(); + if (object.clientId != null) + message.clientId = String(object.clientId); + if (object.clientMetadata) { + if (!Array.isArray(object.clientMetadata)) + throw TypeError(".ibc.core.client.v1.IdentifiedGenesisMetadata.clientMetadata: array expected"); + message.clientMetadata = []; + for (let i = 0; i < object.clientMetadata.length; ++i) { + if (typeof object.clientMetadata[i] !== "object") + throw TypeError(".ibc.core.client.v1.IdentifiedGenesisMetadata.clientMetadata: object expected"); + message.clientMetadata[i] = $root.ibc.core.client.v1.GenesisMetadata.fromObject(object.clientMetadata[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an IdentifiedGenesisMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.client.v1.IdentifiedGenesisMetadata + * @static + * @param {ibc.core.client.v1.IdentifiedGenesisMetadata} message IdentifiedGenesisMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IdentifiedGenesisMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.clientMetadata = []; + if (options.defaults) + object.clientId = ""; + if (message.clientId != null && message.hasOwnProperty("clientId")) + object.clientId = message.clientId; + if (message.clientMetadata && message.clientMetadata.length) { + object.clientMetadata = []; + for (let j = 0; j < message.clientMetadata.length; ++j) + object.clientMetadata[j] = $root.ibc.core.client.v1.GenesisMetadata.toObject(message.clientMetadata[j], options); + } + return object; + }; + + /** + * Converts this IdentifiedGenesisMetadata to JSON. + * @function toJSON + * @memberof ibc.core.client.v1.IdentifiedGenesisMetadata + * @instance + * @returns {Object.} JSON object + */ + IdentifiedGenesisMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return IdentifiedGenesisMetadata; + })(v1.IdentifiedGenesisMetadata || {}); + + v1.Query = (function(Query) { + + /** + * Constructs a new Query service. + * @memberof ibc.core.client.v1 + * @classdesc Represents a Query + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Query(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Query.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Query; + + /** + * Creates new Query service using the specified rpc implementation. + * @function create + * @memberof ibc.core.client.v1.Query + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Query} RPC service. Useful where requests and/or responses are streamed. + */ + Query.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link ibc.core.client.v1.Query#clientState}. + * @memberof ibc.core.client.v1.Query + * @typedef ClientStateCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {ibc.core.client.v1.IQueryClientStateResponse} [response] QueryClientStateResponse + */ + + /** + * Calls ClientState. + * @function clientState + * @memberof ibc.core.client.v1.Query + * @instance + * @param {ibc.core.client.v1.IQueryClientStateRequest} request QueryClientStateRequest message or plain object + * @param {ibc.core.client.v1.Query.ClientStateCallback} callback Node-style callback called with the error, if any, and QueryClientStateResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.clientState = function clientState(request, callback) { + return this.rpcCall(clientState, $root.ibc.core.client.v1.QueryClientStateRequest, $root.ibc.core.client.v1.QueryClientStateResponse, request, callback); + }, "name", { value: "ClientState" }); + + /** + * Calls ClientState. + * @function clientState + * @memberof ibc.core.client.v1.Query + * @instance + * @param {ibc.core.client.v1.IQueryClientStateRequest} request QueryClientStateRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link ibc.core.client.v1.Query#clientStates}. + * @memberof ibc.core.client.v1.Query + * @typedef ClientStatesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {ibc.core.client.v1.IQueryClientStatesResponse} [response] QueryClientStatesResponse + */ + + /** + * Calls ClientStates. + * @function clientStates + * @memberof ibc.core.client.v1.Query + * @instance + * @param {ibc.core.client.v1.IQueryClientStatesRequest} request QueryClientStatesRequest message or plain object + * @param {ibc.core.client.v1.Query.ClientStatesCallback} callback Node-style callback called with the error, if any, and QueryClientStatesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.clientStates = function clientStates(request, callback) { + return this.rpcCall(clientStates, $root.ibc.core.client.v1.QueryClientStatesRequest, $root.ibc.core.client.v1.QueryClientStatesResponse, request, callback); + }, "name", { value: "ClientStates" }); + + /** + * Calls ClientStates. + * @function clientStates + * @memberof ibc.core.client.v1.Query + * @instance + * @param {ibc.core.client.v1.IQueryClientStatesRequest} request QueryClientStatesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link ibc.core.client.v1.Query#consensusState}. + * @memberof ibc.core.client.v1.Query + * @typedef ConsensusStateCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {ibc.core.client.v1.IQueryConsensusStateResponse} [response] QueryConsensusStateResponse + */ + + /** + * Calls ConsensusState. + * @function consensusState + * @memberof ibc.core.client.v1.Query + * @instance + * @param {ibc.core.client.v1.IQueryConsensusStateRequest} request QueryConsensusStateRequest message or plain object + * @param {ibc.core.client.v1.Query.ConsensusStateCallback} callback Node-style callback called with the error, if any, and QueryConsensusStateResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.consensusState = function consensusState(request, callback) { + return this.rpcCall(consensusState, $root.ibc.core.client.v1.QueryConsensusStateRequest, $root.ibc.core.client.v1.QueryConsensusStateResponse, request, callback); + }, "name", { value: "ConsensusState" }); + + /** + * Calls ConsensusState. + * @function consensusState + * @memberof ibc.core.client.v1.Query + * @instance + * @param {ibc.core.client.v1.IQueryConsensusStateRequest} request QueryConsensusStateRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link ibc.core.client.v1.Query#consensusStates}. + * @memberof ibc.core.client.v1.Query + * @typedef ConsensusStatesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {ibc.core.client.v1.IQueryConsensusStatesResponse} [response] QueryConsensusStatesResponse + */ + + /** + * Calls ConsensusStates. + * @function consensusStates + * @memberof ibc.core.client.v1.Query + * @instance + * @param {ibc.core.client.v1.IQueryConsensusStatesRequest} request QueryConsensusStatesRequest message or plain object + * @param {ibc.core.client.v1.Query.ConsensusStatesCallback} callback Node-style callback called with the error, if any, and QueryConsensusStatesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.consensusStates = function consensusStates(request, callback) { + return this.rpcCall(consensusStates, $root.ibc.core.client.v1.QueryConsensusStatesRequest, $root.ibc.core.client.v1.QueryConsensusStatesResponse, request, callback); + }, "name", { value: "ConsensusStates" }); + + /** + * Calls ConsensusStates. + * @function consensusStates + * @memberof ibc.core.client.v1.Query + * @instance + * @param {ibc.core.client.v1.IQueryConsensusStatesRequest} request QueryConsensusStatesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link ibc.core.client.v1.Query#clientParams}. + * @memberof ibc.core.client.v1.Query + * @typedef ClientParamsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {ibc.core.client.v1.IQueryClientParamsResponse} [response] QueryClientParamsResponse + */ + + /** + * Calls ClientParams. + * @function clientParams + * @memberof ibc.core.client.v1.Query + * @instance + * @param {ibc.core.client.v1.IQueryClientParamsRequest} request QueryClientParamsRequest message or plain object + * @param {ibc.core.client.v1.Query.ClientParamsCallback} callback Node-style callback called with the error, if any, and QueryClientParamsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.clientParams = function clientParams(request, callback) { + return this.rpcCall(clientParams, $root.ibc.core.client.v1.QueryClientParamsRequest, $root.ibc.core.client.v1.QueryClientParamsResponse, request, callback); + }, "name", { value: "ClientParams" }); + + /** + * Calls ClientParams. + * @function clientParams + * @memberof ibc.core.client.v1.Query + * @instance + * @param {ibc.core.client.v1.IQueryClientParamsRequest} request QueryClientParamsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Query; + })(v1.Query || {}); + + v1.QueryClientStateRequest = (function(QueryClientStateRequest) { + + /** + * Properties of a QueryClientStateRequest. + * @memberof ibc.core.client.v1 + * @interface IQueryClientStateRequest + * @property {string|null} [clientId] QueryClientStateRequest clientId + */ + + /** + * Constructs a new QueryClientStateRequest. + * @memberof ibc.core.client.v1 + * @classdesc Represents a QueryClientStateRequest. + * @implements IQueryClientStateRequest + * @constructor + * @param {ibc.core.client.v1.IQueryClientStateRequest=} [properties] Properties to set + */ + function QueryClientStateRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryClientStateRequest clientId. + * @member {string} clientId + * @memberof ibc.core.client.v1.QueryClientStateRequest + * @instance + */ + QueryClientStateRequest.prototype.clientId = ""; + + /** + * Creates a new QueryClientStateRequest instance using the specified properties. + * @function create + * @memberof ibc.core.client.v1.QueryClientStateRequest + * @static + * @param {ibc.core.client.v1.IQueryClientStateRequest=} [properties] Properties to set + * @returns {ibc.core.client.v1.QueryClientStateRequest} QueryClientStateRequest instance + */ + QueryClientStateRequest.create = function create(properties) { + return new QueryClientStateRequest(properties); + }; + + /** + * Encodes the specified QueryClientStateRequest message. Does not implicitly {@link ibc.core.client.v1.QueryClientStateRequest.verify|verify} messages. + * @function encode + * @memberof ibc.core.client.v1.QueryClientStateRequest + * @static + * @param {ibc.core.client.v1.IQueryClientStateRequest} message QueryClientStateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryClientStateRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.clientId != null && Object.hasOwnProperty.call(message, "clientId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.clientId); + return writer; + }; + + /** + * Encodes the specified QueryClientStateRequest message, length delimited. Does not implicitly {@link ibc.core.client.v1.QueryClientStateRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.client.v1.QueryClientStateRequest + * @static + * @param {ibc.core.client.v1.IQueryClientStateRequest} message QueryClientStateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryClientStateRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryClientStateRequest message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.client.v1.QueryClientStateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.client.v1.QueryClientStateRequest} QueryClientStateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryClientStateRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.QueryClientStateRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.clientId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryClientStateRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.client.v1.QueryClientStateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.client.v1.QueryClientStateRequest} QueryClientStateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryClientStateRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryClientStateRequest message. + * @function verify + * @memberof ibc.core.client.v1.QueryClientStateRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryClientStateRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.clientId != null && message.hasOwnProperty("clientId")) + if (!$util.isString(message.clientId)) + return "clientId: string expected"; + return null; + }; + + /** + * Creates a QueryClientStateRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.client.v1.QueryClientStateRequest + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.client.v1.QueryClientStateRequest} QueryClientStateRequest + */ + QueryClientStateRequest.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.client.v1.QueryClientStateRequest) + return object; + let message = new $root.ibc.core.client.v1.QueryClientStateRequest(); + if (object.clientId != null) + message.clientId = String(object.clientId); + return message; + }; + + /** + * Creates a plain object from a QueryClientStateRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.client.v1.QueryClientStateRequest + * @static + * @param {ibc.core.client.v1.QueryClientStateRequest} message QueryClientStateRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryClientStateRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.clientId = ""; + if (message.clientId != null && message.hasOwnProperty("clientId")) + object.clientId = message.clientId; + return object; + }; + + /** + * Converts this QueryClientStateRequest to JSON. + * @function toJSON + * @memberof ibc.core.client.v1.QueryClientStateRequest + * @instance + * @returns {Object.} JSON object + */ + QueryClientStateRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryClientStateRequest; + })(v1.QueryClientStateRequest || {}); + + v1.QueryClientStateResponse = (function(QueryClientStateResponse) { + + /** + * Properties of a QueryClientStateResponse. + * @memberof ibc.core.client.v1 + * @interface IQueryClientStateResponse + * @property {google.protobuf.IAny|null} [clientState] QueryClientStateResponse clientState + * @property {Uint8Array|null} [proof] QueryClientStateResponse proof + * @property {ibc.core.client.v1.IHeight|null} [proofHeight] QueryClientStateResponse proofHeight + */ + + /** + * Constructs a new QueryClientStateResponse. + * @memberof ibc.core.client.v1 + * @classdesc Represents a QueryClientStateResponse. + * @implements IQueryClientStateResponse + * @constructor + * @param {ibc.core.client.v1.IQueryClientStateResponse=} [properties] Properties to set + */ + function QueryClientStateResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryClientStateResponse clientState. + * @member {google.protobuf.IAny|null|undefined} clientState + * @memberof ibc.core.client.v1.QueryClientStateResponse + * @instance + */ + QueryClientStateResponse.prototype.clientState = null; + + /** + * QueryClientStateResponse proof. + * @member {Uint8Array} proof + * @memberof ibc.core.client.v1.QueryClientStateResponse + * @instance + */ + QueryClientStateResponse.prototype.proof = $util.newBuffer([]); + + /** + * QueryClientStateResponse proofHeight. + * @member {ibc.core.client.v1.IHeight|null|undefined} proofHeight + * @memberof ibc.core.client.v1.QueryClientStateResponse + * @instance + */ + QueryClientStateResponse.prototype.proofHeight = null; + + /** + * Creates a new QueryClientStateResponse instance using the specified properties. + * @function create + * @memberof ibc.core.client.v1.QueryClientStateResponse + * @static + * @param {ibc.core.client.v1.IQueryClientStateResponse=} [properties] Properties to set + * @returns {ibc.core.client.v1.QueryClientStateResponse} QueryClientStateResponse instance + */ + QueryClientStateResponse.create = function create(properties) { + return new QueryClientStateResponse(properties); + }; + + /** + * Encodes the specified QueryClientStateResponse message. Does not implicitly {@link ibc.core.client.v1.QueryClientStateResponse.verify|verify} messages. + * @function encode + * @memberof ibc.core.client.v1.QueryClientStateResponse + * @static + * @param {ibc.core.client.v1.IQueryClientStateResponse} message QueryClientStateResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryClientStateResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.clientState != null && Object.hasOwnProperty.call(message, "clientState")) + $root.google.protobuf.Any.encode(message.clientState, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.proof != null && Object.hasOwnProperty.call(message, "proof")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.proof); + if (message.proofHeight != null && Object.hasOwnProperty.call(message, "proofHeight")) + $root.ibc.core.client.v1.Height.encode(message.proofHeight, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryClientStateResponse message, length delimited. Does not implicitly {@link ibc.core.client.v1.QueryClientStateResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.client.v1.QueryClientStateResponse + * @static + * @param {ibc.core.client.v1.IQueryClientStateResponse} message QueryClientStateResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryClientStateResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryClientStateResponse message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.client.v1.QueryClientStateResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.client.v1.QueryClientStateResponse} QueryClientStateResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryClientStateResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.QueryClientStateResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.clientState = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + case 2: + message.proof = reader.bytes(); + break; + case 3: + message.proofHeight = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryClientStateResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.client.v1.QueryClientStateResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.client.v1.QueryClientStateResponse} QueryClientStateResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryClientStateResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryClientStateResponse message. + * @function verify + * @memberof ibc.core.client.v1.QueryClientStateResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryClientStateResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.clientState != null && message.hasOwnProperty("clientState")) { + let error = $root.google.protobuf.Any.verify(message.clientState); + if (error) + return "clientState." + error; + } + if (message.proof != null && message.hasOwnProperty("proof")) + if (!(message.proof && typeof message.proof.length === "number" || $util.isString(message.proof))) + return "proof: buffer expected"; + if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) { + let error = $root.ibc.core.client.v1.Height.verify(message.proofHeight); + if (error) + return "proofHeight." + error; + } + return null; + }; + + /** + * Creates a QueryClientStateResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.client.v1.QueryClientStateResponse + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.client.v1.QueryClientStateResponse} QueryClientStateResponse + */ + QueryClientStateResponse.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.client.v1.QueryClientStateResponse) + return object; + let message = new $root.ibc.core.client.v1.QueryClientStateResponse(); + if (object.clientState != null) { + if (typeof object.clientState !== "object") + throw TypeError(".ibc.core.client.v1.QueryClientStateResponse.clientState: object expected"); + message.clientState = $root.google.protobuf.Any.fromObject(object.clientState); + } + if (object.proof != null) + if (typeof object.proof === "string") + $util.base64.decode(object.proof, message.proof = $util.newBuffer($util.base64.length(object.proof)), 0); + else if (object.proof.length) + message.proof = object.proof; + if (object.proofHeight != null) { + if (typeof object.proofHeight !== "object") + throw TypeError(".ibc.core.client.v1.QueryClientStateResponse.proofHeight: object expected"); + message.proofHeight = $root.ibc.core.client.v1.Height.fromObject(object.proofHeight); + } + return message; + }; + + /** + * Creates a plain object from a QueryClientStateResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.client.v1.QueryClientStateResponse + * @static + * @param {ibc.core.client.v1.QueryClientStateResponse} message QueryClientStateResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryClientStateResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.clientState = null; + if (options.bytes === String) + object.proof = ""; + else { + object.proof = []; + if (options.bytes !== Array) + object.proof = $util.newBuffer(object.proof); + } + object.proofHeight = null; + } + if (message.clientState != null && message.hasOwnProperty("clientState")) + object.clientState = $root.google.protobuf.Any.toObject(message.clientState, options); + if (message.proof != null && message.hasOwnProperty("proof")) + object.proof = options.bytes === String ? $util.base64.encode(message.proof, 0, message.proof.length) : options.bytes === Array ? Array.prototype.slice.call(message.proof) : message.proof; + if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) + object.proofHeight = $root.ibc.core.client.v1.Height.toObject(message.proofHeight, options); + return object; + }; + + /** + * Converts this QueryClientStateResponse to JSON. + * @function toJSON + * @memberof ibc.core.client.v1.QueryClientStateResponse + * @instance + * @returns {Object.} JSON object + */ + QueryClientStateResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryClientStateResponse; + })(v1.QueryClientStateResponse || {}); + + v1.QueryClientStatesRequest = (function(QueryClientStatesRequest) { + + /** + * Properties of a QueryClientStatesRequest. + * @memberof ibc.core.client.v1 + * @interface IQueryClientStatesRequest + * @property {cosmos.base.query.v1beta1.IPageRequest|null} [pagination] QueryClientStatesRequest pagination + */ + + /** + * Constructs a new QueryClientStatesRequest. + * @memberof ibc.core.client.v1 + * @classdesc Represents a QueryClientStatesRequest. + * @implements IQueryClientStatesRequest + * @constructor + * @param {ibc.core.client.v1.IQueryClientStatesRequest=} [properties] Properties to set + */ + function QueryClientStatesRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryClientStatesRequest pagination. + * @member {cosmos.base.query.v1beta1.IPageRequest|null|undefined} pagination + * @memberof ibc.core.client.v1.QueryClientStatesRequest + * @instance + */ + QueryClientStatesRequest.prototype.pagination = null; + + /** + * Creates a new QueryClientStatesRequest instance using the specified properties. + * @function create + * @memberof ibc.core.client.v1.QueryClientStatesRequest + * @static + * @param {ibc.core.client.v1.IQueryClientStatesRequest=} [properties] Properties to set + * @returns {ibc.core.client.v1.QueryClientStatesRequest} QueryClientStatesRequest instance + */ + QueryClientStatesRequest.create = function create(properties) { + return new QueryClientStatesRequest(properties); + }; + + /** + * Encodes the specified QueryClientStatesRequest message. Does not implicitly {@link ibc.core.client.v1.QueryClientStatesRequest.verify|verify} messages. + * @function encode + * @memberof ibc.core.client.v1.QueryClientStatesRequest + * @static + * @param {ibc.core.client.v1.IQueryClientStatesRequest} message QueryClientStatesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryClientStatesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) + $root.cosmos.base.query.v1beta1.PageRequest.encode(message.pagination, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryClientStatesRequest message, length delimited. Does not implicitly {@link ibc.core.client.v1.QueryClientStatesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.client.v1.QueryClientStatesRequest + * @static + * @param {ibc.core.client.v1.IQueryClientStatesRequest} message QueryClientStatesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryClientStatesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryClientStatesRequest message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.client.v1.QueryClientStatesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.client.v1.QueryClientStatesRequest} QueryClientStatesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryClientStatesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.QueryClientStatesRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryClientStatesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.client.v1.QueryClientStatesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.client.v1.QueryClientStatesRequest} QueryClientStatesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryClientStatesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryClientStatesRequest message. + * @function verify + * @memberof ibc.core.client.v1.QueryClientStatesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryClientStatesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.pagination != null && message.hasOwnProperty("pagination")) { + let error = $root.cosmos.base.query.v1beta1.PageRequest.verify(message.pagination); + if (error) + return "pagination." + error; + } + return null; + }; + + /** + * Creates a QueryClientStatesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.client.v1.QueryClientStatesRequest + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.client.v1.QueryClientStatesRequest} QueryClientStatesRequest + */ + QueryClientStatesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.client.v1.QueryClientStatesRequest) + return object; + let message = new $root.ibc.core.client.v1.QueryClientStatesRequest(); + if (object.pagination != null) { + if (typeof object.pagination !== "object") + throw TypeError(".ibc.core.client.v1.QueryClientStatesRequest.pagination: object expected"); + message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.fromObject(object.pagination); + } + return message; + }; + + /** + * Creates a plain object from a QueryClientStatesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.client.v1.QueryClientStatesRequest + * @static + * @param {ibc.core.client.v1.QueryClientStatesRequest} message QueryClientStatesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryClientStatesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.pagination = null; + if (message.pagination != null && message.hasOwnProperty("pagination")) + object.pagination = $root.cosmos.base.query.v1beta1.PageRequest.toObject(message.pagination, options); + return object; + }; + + /** + * Converts this QueryClientStatesRequest to JSON. + * @function toJSON + * @memberof ibc.core.client.v1.QueryClientStatesRequest + * @instance + * @returns {Object.} JSON object + */ + QueryClientStatesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryClientStatesRequest; + })(v1.QueryClientStatesRequest || {}); + + v1.QueryClientStatesResponse = (function(QueryClientStatesResponse) { + + /** + * Properties of a QueryClientStatesResponse. + * @memberof ibc.core.client.v1 + * @interface IQueryClientStatesResponse + * @property {Array.|null} [clientStates] QueryClientStatesResponse clientStates + * @property {cosmos.base.query.v1beta1.IPageResponse|null} [pagination] QueryClientStatesResponse pagination + */ + + /** + * Constructs a new QueryClientStatesResponse. + * @memberof ibc.core.client.v1 + * @classdesc Represents a QueryClientStatesResponse. + * @implements IQueryClientStatesResponse + * @constructor + * @param {ibc.core.client.v1.IQueryClientStatesResponse=} [properties] Properties to set + */ + function QueryClientStatesResponse(properties) { + this.clientStates = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryClientStatesResponse clientStates. + * @member {Array.} clientStates + * @memberof ibc.core.client.v1.QueryClientStatesResponse + * @instance + */ + QueryClientStatesResponse.prototype.clientStates = $util.emptyArray; + + /** + * QueryClientStatesResponse pagination. + * @member {cosmos.base.query.v1beta1.IPageResponse|null|undefined} pagination + * @memberof ibc.core.client.v1.QueryClientStatesResponse + * @instance + */ + QueryClientStatesResponse.prototype.pagination = null; + + /** + * Creates a new QueryClientStatesResponse instance using the specified properties. + * @function create + * @memberof ibc.core.client.v1.QueryClientStatesResponse + * @static + * @param {ibc.core.client.v1.IQueryClientStatesResponse=} [properties] Properties to set + * @returns {ibc.core.client.v1.QueryClientStatesResponse} QueryClientStatesResponse instance + */ + QueryClientStatesResponse.create = function create(properties) { + return new QueryClientStatesResponse(properties); + }; + + /** + * Encodes the specified QueryClientStatesResponse message. Does not implicitly {@link ibc.core.client.v1.QueryClientStatesResponse.verify|verify} messages. + * @function encode + * @memberof ibc.core.client.v1.QueryClientStatesResponse + * @static + * @param {ibc.core.client.v1.IQueryClientStatesResponse} message QueryClientStatesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryClientStatesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.clientStates != null && message.clientStates.length) + for (let i = 0; i < message.clientStates.length; ++i) + $root.ibc.core.client.v1.IdentifiedClientState.encode(message.clientStates[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) + $root.cosmos.base.query.v1beta1.PageResponse.encode(message.pagination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryClientStatesResponse message, length delimited. Does not implicitly {@link ibc.core.client.v1.QueryClientStatesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.client.v1.QueryClientStatesResponse + * @static + * @param {ibc.core.client.v1.IQueryClientStatesResponse} message QueryClientStatesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryClientStatesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryClientStatesResponse message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.client.v1.QueryClientStatesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.client.v1.QueryClientStatesResponse} QueryClientStatesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryClientStatesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.QueryClientStatesResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.clientStates && message.clientStates.length)) + message.clientStates = []; + message.clientStates.push($root.ibc.core.client.v1.IdentifiedClientState.decode(reader, reader.uint32())); + break; + case 2: + message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryClientStatesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.client.v1.QueryClientStatesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.client.v1.QueryClientStatesResponse} QueryClientStatesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryClientStatesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryClientStatesResponse message. + * @function verify + * @memberof ibc.core.client.v1.QueryClientStatesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryClientStatesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.clientStates != null && message.hasOwnProperty("clientStates")) { + if (!Array.isArray(message.clientStates)) + return "clientStates: array expected"; + for (let i = 0; i < message.clientStates.length; ++i) { + let error = $root.ibc.core.client.v1.IdentifiedClientState.verify(message.clientStates[i]); + if (error) + return "clientStates." + error; + } + } + if (message.pagination != null && message.hasOwnProperty("pagination")) { + let error = $root.cosmos.base.query.v1beta1.PageResponse.verify(message.pagination); + if (error) + return "pagination." + error; + } + return null; + }; + + /** + * Creates a QueryClientStatesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.client.v1.QueryClientStatesResponse + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.client.v1.QueryClientStatesResponse} QueryClientStatesResponse + */ + QueryClientStatesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.client.v1.QueryClientStatesResponse) + return object; + let message = new $root.ibc.core.client.v1.QueryClientStatesResponse(); + if (object.clientStates) { + if (!Array.isArray(object.clientStates)) + throw TypeError(".ibc.core.client.v1.QueryClientStatesResponse.clientStates: array expected"); + message.clientStates = []; + for (let i = 0; i < object.clientStates.length; ++i) { + if (typeof object.clientStates[i] !== "object") + throw TypeError(".ibc.core.client.v1.QueryClientStatesResponse.clientStates: object expected"); + message.clientStates[i] = $root.ibc.core.client.v1.IdentifiedClientState.fromObject(object.clientStates[i]); + } + } + if (object.pagination != null) { + if (typeof object.pagination !== "object") + throw TypeError(".ibc.core.client.v1.QueryClientStatesResponse.pagination: object expected"); + message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.fromObject(object.pagination); + } + return message; + }; + + /** + * Creates a plain object from a QueryClientStatesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.client.v1.QueryClientStatesResponse + * @static + * @param {ibc.core.client.v1.QueryClientStatesResponse} message QueryClientStatesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryClientStatesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.clientStates = []; + if (options.defaults) + object.pagination = null; + if (message.clientStates && message.clientStates.length) { + object.clientStates = []; + for (let j = 0; j < message.clientStates.length; ++j) + object.clientStates[j] = $root.ibc.core.client.v1.IdentifiedClientState.toObject(message.clientStates[j], options); + } + if (message.pagination != null && message.hasOwnProperty("pagination")) + object.pagination = $root.cosmos.base.query.v1beta1.PageResponse.toObject(message.pagination, options); + return object; + }; + + /** + * Converts this QueryClientStatesResponse to JSON. + * @function toJSON + * @memberof ibc.core.client.v1.QueryClientStatesResponse + * @instance + * @returns {Object.} JSON object + */ + QueryClientStatesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryClientStatesResponse; + })(v1.QueryClientStatesResponse || {}); + + v1.QueryConsensusStateRequest = (function(QueryConsensusStateRequest) { + + /** + * Properties of a QueryConsensusStateRequest. + * @memberof ibc.core.client.v1 + * @interface IQueryConsensusStateRequest + * @property {string|null} [clientId] QueryConsensusStateRequest clientId + * @property {number|Long|null} [revisionNumber] QueryConsensusStateRequest revisionNumber + * @property {number|Long|null} [revisionHeight] QueryConsensusStateRequest revisionHeight + * @property {boolean|null} [latestHeight] QueryConsensusStateRequest latestHeight + */ + + /** + * Constructs a new QueryConsensusStateRequest. + * @memberof ibc.core.client.v1 + * @classdesc Represents a QueryConsensusStateRequest. + * @implements IQueryConsensusStateRequest + * @constructor + * @param {ibc.core.client.v1.IQueryConsensusStateRequest=} [properties] Properties to set + */ + function QueryConsensusStateRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryConsensusStateRequest clientId. + * @member {string} clientId + * @memberof ibc.core.client.v1.QueryConsensusStateRequest + * @instance + */ + QueryConsensusStateRequest.prototype.clientId = ""; + + /** + * QueryConsensusStateRequest revisionNumber. + * @member {number|Long} revisionNumber + * @memberof ibc.core.client.v1.QueryConsensusStateRequest + * @instance + */ + QueryConsensusStateRequest.prototype.revisionNumber = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * QueryConsensusStateRequest revisionHeight. + * @member {number|Long} revisionHeight + * @memberof ibc.core.client.v1.QueryConsensusStateRequest + * @instance + */ + QueryConsensusStateRequest.prototype.revisionHeight = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * QueryConsensusStateRequest latestHeight. + * @member {boolean} latestHeight + * @memberof ibc.core.client.v1.QueryConsensusStateRequest + * @instance + */ + QueryConsensusStateRequest.prototype.latestHeight = false; + + /** + * Creates a new QueryConsensusStateRequest instance using the specified properties. + * @function create + * @memberof ibc.core.client.v1.QueryConsensusStateRequest + * @static + * @param {ibc.core.client.v1.IQueryConsensusStateRequest=} [properties] Properties to set + * @returns {ibc.core.client.v1.QueryConsensusStateRequest} QueryConsensusStateRequest instance + */ + QueryConsensusStateRequest.create = function create(properties) { + return new QueryConsensusStateRequest(properties); + }; + + /** + * Encodes the specified QueryConsensusStateRequest message. Does not implicitly {@link ibc.core.client.v1.QueryConsensusStateRequest.verify|verify} messages. + * @function encode + * @memberof ibc.core.client.v1.QueryConsensusStateRequest + * @static + * @param {ibc.core.client.v1.IQueryConsensusStateRequest} message QueryConsensusStateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryConsensusStateRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.clientId != null && Object.hasOwnProperty.call(message, "clientId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.clientId); + if (message.revisionNumber != null && Object.hasOwnProperty.call(message, "revisionNumber")) + writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.revisionNumber); + if (message.revisionHeight != null && Object.hasOwnProperty.call(message, "revisionHeight")) + writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.revisionHeight); + if (message.latestHeight != null && Object.hasOwnProperty.call(message, "latestHeight")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.latestHeight); + return writer; + }; + + /** + * Encodes the specified QueryConsensusStateRequest message, length delimited. Does not implicitly {@link ibc.core.client.v1.QueryConsensusStateRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.client.v1.QueryConsensusStateRequest + * @static + * @param {ibc.core.client.v1.IQueryConsensusStateRequest} message QueryConsensusStateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryConsensusStateRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryConsensusStateRequest message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.client.v1.QueryConsensusStateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.client.v1.QueryConsensusStateRequest} QueryConsensusStateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryConsensusStateRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.QueryConsensusStateRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.clientId = reader.string(); + break; + case 2: + message.revisionNumber = reader.uint64(); + break; + case 3: + message.revisionHeight = reader.uint64(); + break; + case 4: + message.latestHeight = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryConsensusStateRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.client.v1.QueryConsensusStateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.client.v1.QueryConsensusStateRequest} QueryConsensusStateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryConsensusStateRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryConsensusStateRequest message. + * @function verify + * @memberof ibc.core.client.v1.QueryConsensusStateRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryConsensusStateRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.clientId != null && message.hasOwnProperty("clientId")) + if (!$util.isString(message.clientId)) + return "clientId: string expected"; + if (message.revisionNumber != null && message.hasOwnProperty("revisionNumber")) + if (!$util.isInteger(message.revisionNumber) && !(message.revisionNumber && $util.isInteger(message.revisionNumber.low) && $util.isInteger(message.revisionNumber.high))) + return "revisionNumber: integer|Long expected"; + if (message.revisionHeight != null && message.hasOwnProperty("revisionHeight")) + if (!$util.isInteger(message.revisionHeight) && !(message.revisionHeight && $util.isInteger(message.revisionHeight.low) && $util.isInteger(message.revisionHeight.high))) + return "revisionHeight: integer|Long expected"; + if (message.latestHeight != null && message.hasOwnProperty("latestHeight")) + if (typeof message.latestHeight !== "boolean") + return "latestHeight: boolean expected"; + return null; + }; + + /** + * Creates a QueryConsensusStateRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.client.v1.QueryConsensusStateRequest + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.client.v1.QueryConsensusStateRequest} QueryConsensusStateRequest + */ + QueryConsensusStateRequest.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.client.v1.QueryConsensusStateRequest) + return object; + let message = new $root.ibc.core.client.v1.QueryConsensusStateRequest(); + if (object.clientId != null) + message.clientId = String(object.clientId); + if (object.revisionNumber != null) + if ($util.Long) + (message.revisionNumber = $util.Long.fromValue(object.revisionNumber)).unsigned = true; + else if (typeof object.revisionNumber === "string") + message.revisionNumber = parseInt(object.revisionNumber, 10); + else if (typeof object.revisionNumber === "number") + message.revisionNumber = object.revisionNumber; + else if (typeof object.revisionNumber === "object") + message.revisionNumber = new $util.LongBits(object.revisionNumber.low >>> 0, object.revisionNumber.high >>> 0).toNumber(true); + if (object.revisionHeight != null) + if ($util.Long) + (message.revisionHeight = $util.Long.fromValue(object.revisionHeight)).unsigned = true; + else if (typeof object.revisionHeight === "string") + message.revisionHeight = parseInt(object.revisionHeight, 10); + else if (typeof object.revisionHeight === "number") + message.revisionHeight = object.revisionHeight; + else if (typeof object.revisionHeight === "object") + message.revisionHeight = new $util.LongBits(object.revisionHeight.low >>> 0, object.revisionHeight.high >>> 0).toNumber(true); + if (object.latestHeight != null) + message.latestHeight = Boolean(object.latestHeight); + return message; + }; + + /** + * Creates a plain object from a QueryConsensusStateRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.client.v1.QueryConsensusStateRequest + * @static + * @param {ibc.core.client.v1.QueryConsensusStateRequest} message QueryConsensusStateRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryConsensusStateRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.clientId = ""; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.revisionNumber = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.revisionNumber = options.longs === String ? "0" : 0; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.revisionHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.revisionHeight = options.longs === String ? "0" : 0; + object.latestHeight = false; + } + if (message.clientId != null && message.hasOwnProperty("clientId")) + object.clientId = message.clientId; + if (message.revisionNumber != null && message.hasOwnProperty("revisionNumber")) + if (typeof message.revisionNumber === "number") + object.revisionNumber = options.longs === String ? String(message.revisionNumber) : message.revisionNumber; + else + object.revisionNumber = options.longs === String ? $util.Long.prototype.toString.call(message.revisionNumber) : options.longs === Number ? new $util.LongBits(message.revisionNumber.low >>> 0, message.revisionNumber.high >>> 0).toNumber(true) : message.revisionNumber; + if (message.revisionHeight != null && message.hasOwnProperty("revisionHeight")) + if (typeof message.revisionHeight === "number") + object.revisionHeight = options.longs === String ? String(message.revisionHeight) : message.revisionHeight; + else + object.revisionHeight = options.longs === String ? $util.Long.prototype.toString.call(message.revisionHeight) : options.longs === Number ? new $util.LongBits(message.revisionHeight.low >>> 0, message.revisionHeight.high >>> 0).toNumber(true) : message.revisionHeight; + if (message.latestHeight != null && message.hasOwnProperty("latestHeight")) + object.latestHeight = message.latestHeight; + return object; + }; + + /** + * Converts this QueryConsensusStateRequest to JSON. + * @function toJSON + * @memberof ibc.core.client.v1.QueryConsensusStateRequest + * @instance + * @returns {Object.} JSON object + */ + QueryConsensusStateRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryConsensusStateRequest; + })(v1.QueryConsensusStateRequest || {}); + + v1.QueryConsensusStateResponse = (function(QueryConsensusStateResponse) { + + /** + * Properties of a QueryConsensusStateResponse. + * @memberof ibc.core.client.v1 + * @interface IQueryConsensusStateResponse + * @property {google.protobuf.IAny|null} [consensusState] QueryConsensusStateResponse consensusState + * @property {Uint8Array|null} [proof] QueryConsensusStateResponse proof + * @property {ibc.core.client.v1.IHeight|null} [proofHeight] QueryConsensusStateResponse proofHeight + */ + + /** + * Constructs a new QueryConsensusStateResponse. + * @memberof ibc.core.client.v1 + * @classdesc Represents a QueryConsensusStateResponse. + * @implements IQueryConsensusStateResponse + * @constructor + * @param {ibc.core.client.v1.IQueryConsensusStateResponse=} [properties] Properties to set + */ + function QueryConsensusStateResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryConsensusStateResponse consensusState. + * @member {google.protobuf.IAny|null|undefined} consensusState + * @memberof ibc.core.client.v1.QueryConsensusStateResponse + * @instance + */ + QueryConsensusStateResponse.prototype.consensusState = null; + + /** + * QueryConsensusStateResponse proof. + * @member {Uint8Array} proof + * @memberof ibc.core.client.v1.QueryConsensusStateResponse + * @instance + */ + QueryConsensusStateResponse.prototype.proof = $util.newBuffer([]); + + /** + * QueryConsensusStateResponse proofHeight. + * @member {ibc.core.client.v1.IHeight|null|undefined} proofHeight + * @memberof ibc.core.client.v1.QueryConsensusStateResponse + * @instance + */ + QueryConsensusStateResponse.prototype.proofHeight = null; + + /** + * Creates a new QueryConsensusStateResponse instance using the specified properties. + * @function create + * @memberof ibc.core.client.v1.QueryConsensusStateResponse + * @static + * @param {ibc.core.client.v1.IQueryConsensusStateResponse=} [properties] Properties to set + * @returns {ibc.core.client.v1.QueryConsensusStateResponse} QueryConsensusStateResponse instance + */ + QueryConsensusStateResponse.create = function create(properties) { + return new QueryConsensusStateResponse(properties); + }; + + /** + * Encodes the specified QueryConsensusStateResponse message. Does not implicitly {@link ibc.core.client.v1.QueryConsensusStateResponse.verify|verify} messages. + * @function encode + * @memberof ibc.core.client.v1.QueryConsensusStateResponse + * @static + * @param {ibc.core.client.v1.IQueryConsensusStateResponse} message QueryConsensusStateResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryConsensusStateResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.consensusState != null && Object.hasOwnProperty.call(message, "consensusState")) + $root.google.protobuf.Any.encode(message.consensusState, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.proof != null && Object.hasOwnProperty.call(message, "proof")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.proof); + if (message.proofHeight != null && Object.hasOwnProperty.call(message, "proofHeight")) + $root.ibc.core.client.v1.Height.encode(message.proofHeight, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryConsensusStateResponse message, length delimited. Does not implicitly {@link ibc.core.client.v1.QueryConsensusStateResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.client.v1.QueryConsensusStateResponse + * @static + * @param {ibc.core.client.v1.IQueryConsensusStateResponse} message QueryConsensusStateResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryConsensusStateResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryConsensusStateResponse message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.client.v1.QueryConsensusStateResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.client.v1.QueryConsensusStateResponse} QueryConsensusStateResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryConsensusStateResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.QueryConsensusStateResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.consensusState = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + case 2: + message.proof = reader.bytes(); + break; + case 3: + message.proofHeight = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryConsensusStateResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.client.v1.QueryConsensusStateResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.client.v1.QueryConsensusStateResponse} QueryConsensusStateResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryConsensusStateResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryConsensusStateResponse message. + * @function verify + * @memberof ibc.core.client.v1.QueryConsensusStateResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryConsensusStateResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.consensusState != null && message.hasOwnProperty("consensusState")) { + let error = $root.google.protobuf.Any.verify(message.consensusState); + if (error) + return "consensusState." + error; + } + if (message.proof != null && message.hasOwnProperty("proof")) + if (!(message.proof && typeof message.proof.length === "number" || $util.isString(message.proof))) + return "proof: buffer expected"; + if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) { + let error = $root.ibc.core.client.v1.Height.verify(message.proofHeight); + if (error) + return "proofHeight." + error; + } + return null; + }; + + /** + * Creates a QueryConsensusStateResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.client.v1.QueryConsensusStateResponse + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.client.v1.QueryConsensusStateResponse} QueryConsensusStateResponse + */ + QueryConsensusStateResponse.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.client.v1.QueryConsensusStateResponse) + return object; + let message = new $root.ibc.core.client.v1.QueryConsensusStateResponse(); + if (object.consensusState != null) { + if (typeof object.consensusState !== "object") + throw TypeError(".ibc.core.client.v1.QueryConsensusStateResponse.consensusState: object expected"); + message.consensusState = $root.google.protobuf.Any.fromObject(object.consensusState); + } + if (object.proof != null) + if (typeof object.proof === "string") + $util.base64.decode(object.proof, message.proof = $util.newBuffer($util.base64.length(object.proof)), 0); + else if (object.proof.length) + message.proof = object.proof; + if (object.proofHeight != null) { + if (typeof object.proofHeight !== "object") + throw TypeError(".ibc.core.client.v1.QueryConsensusStateResponse.proofHeight: object expected"); + message.proofHeight = $root.ibc.core.client.v1.Height.fromObject(object.proofHeight); + } + return message; + }; + + /** + * Creates a plain object from a QueryConsensusStateResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.client.v1.QueryConsensusStateResponse + * @static + * @param {ibc.core.client.v1.QueryConsensusStateResponse} message QueryConsensusStateResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryConsensusStateResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.consensusState = null; + if (options.bytes === String) + object.proof = ""; + else { + object.proof = []; + if (options.bytes !== Array) + object.proof = $util.newBuffer(object.proof); + } + object.proofHeight = null; + } + if (message.consensusState != null && message.hasOwnProperty("consensusState")) + object.consensusState = $root.google.protobuf.Any.toObject(message.consensusState, options); + if (message.proof != null && message.hasOwnProperty("proof")) + object.proof = options.bytes === String ? $util.base64.encode(message.proof, 0, message.proof.length) : options.bytes === Array ? Array.prototype.slice.call(message.proof) : message.proof; + if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) + object.proofHeight = $root.ibc.core.client.v1.Height.toObject(message.proofHeight, options); + return object; + }; + + /** + * Converts this QueryConsensusStateResponse to JSON. + * @function toJSON + * @memberof ibc.core.client.v1.QueryConsensusStateResponse + * @instance + * @returns {Object.} JSON object + */ + QueryConsensusStateResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryConsensusStateResponse; + })(v1.QueryConsensusStateResponse || {}); + + v1.QueryConsensusStatesRequest = (function(QueryConsensusStatesRequest) { + + /** + * Properties of a QueryConsensusStatesRequest. + * @memberof ibc.core.client.v1 + * @interface IQueryConsensusStatesRequest + * @property {string|null} [clientId] QueryConsensusStatesRequest clientId + * @property {cosmos.base.query.v1beta1.IPageRequest|null} [pagination] QueryConsensusStatesRequest pagination + */ + + /** + * Constructs a new QueryConsensusStatesRequest. + * @memberof ibc.core.client.v1 + * @classdesc Represents a QueryConsensusStatesRequest. + * @implements IQueryConsensusStatesRequest + * @constructor + * @param {ibc.core.client.v1.IQueryConsensusStatesRequest=} [properties] Properties to set + */ + function QueryConsensusStatesRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryConsensusStatesRequest clientId. + * @member {string} clientId + * @memberof ibc.core.client.v1.QueryConsensusStatesRequest + * @instance + */ + QueryConsensusStatesRequest.prototype.clientId = ""; + + /** + * QueryConsensusStatesRequest pagination. + * @member {cosmos.base.query.v1beta1.IPageRequest|null|undefined} pagination + * @memberof ibc.core.client.v1.QueryConsensusStatesRequest + * @instance + */ + QueryConsensusStatesRequest.prototype.pagination = null; + + /** + * Creates a new QueryConsensusStatesRequest instance using the specified properties. + * @function create + * @memberof ibc.core.client.v1.QueryConsensusStatesRequest + * @static + * @param {ibc.core.client.v1.IQueryConsensusStatesRequest=} [properties] Properties to set + * @returns {ibc.core.client.v1.QueryConsensusStatesRequest} QueryConsensusStatesRequest instance + */ + QueryConsensusStatesRequest.create = function create(properties) { + return new QueryConsensusStatesRequest(properties); + }; + + /** + * Encodes the specified QueryConsensusStatesRequest message. Does not implicitly {@link ibc.core.client.v1.QueryConsensusStatesRequest.verify|verify} messages. + * @function encode + * @memberof ibc.core.client.v1.QueryConsensusStatesRequest + * @static + * @param {ibc.core.client.v1.IQueryConsensusStatesRequest} message QueryConsensusStatesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryConsensusStatesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.clientId != null && Object.hasOwnProperty.call(message, "clientId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.clientId); + if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) + $root.cosmos.base.query.v1beta1.PageRequest.encode(message.pagination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryConsensusStatesRequest message, length delimited. Does not implicitly {@link ibc.core.client.v1.QueryConsensusStatesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.client.v1.QueryConsensusStatesRequest + * @static + * @param {ibc.core.client.v1.IQueryConsensusStatesRequest} message QueryConsensusStatesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryConsensusStatesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryConsensusStatesRequest message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.client.v1.QueryConsensusStatesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.client.v1.QueryConsensusStatesRequest} QueryConsensusStatesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryConsensusStatesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.QueryConsensusStatesRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.clientId = reader.string(); + break; + case 2: + message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryConsensusStatesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.client.v1.QueryConsensusStatesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.client.v1.QueryConsensusStatesRequest} QueryConsensusStatesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryConsensusStatesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryConsensusStatesRequest message. + * @function verify + * @memberof ibc.core.client.v1.QueryConsensusStatesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryConsensusStatesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.clientId != null && message.hasOwnProperty("clientId")) + if (!$util.isString(message.clientId)) + return "clientId: string expected"; + if (message.pagination != null && message.hasOwnProperty("pagination")) { + let error = $root.cosmos.base.query.v1beta1.PageRequest.verify(message.pagination); + if (error) + return "pagination." + error; + } + return null; + }; + + /** + * Creates a QueryConsensusStatesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.client.v1.QueryConsensusStatesRequest + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.client.v1.QueryConsensusStatesRequest} QueryConsensusStatesRequest + */ + QueryConsensusStatesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.client.v1.QueryConsensusStatesRequest) + return object; + let message = new $root.ibc.core.client.v1.QueryConsensusStatesRequest(); + if (object.clientId != null) + message.clientId = String(object.clientId); + if (object.pagination != null) { + if (typeof object.pagination !== "object") + throw TypeError(".ibc.core.client.v1.QueryConsensusStatesRequest.pagination: object expected"); + message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.fromObject(object.pagination); + } + return message; + }; + + /** + * Creates a plain object from a QueryConsensusStatesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.client.v1.QueryConsensusStatesRequest + * @static + * @param {ibc.core.client.v1.QueryConsensusStatesRequest} message QueryConsensusStatesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryConsensusStatesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.clientId = ""; + object.pagination = null; + } + if (message.clientId != null && message.hasOwnProperty("clientId")) + object.clientId = message.clientId; + if (message.pagination != null && message.hasOwnProperty("pagination")) + object.pagination = $root.cosmos.base.query.v1beta1.PageRequest.toObject(message.pagination, options); + return object; + }; + + /** + * Converts this QueryConsensusStatesRequest to JSON. + * @function toJSON + * @memberof ibc.core.client.v1.QueryConsensusStatesRequest + * @instance + * @returns {Object.} JSON object + */ + QueryConsensusStatesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryConsensusStatesRequest; + })(v1.QueryConsensusStatesRequest || {}); + + v1.QueryConsensusStatesResponse = (function(QueryConsensusStatesResponse) { + + /** + * Properties of a QueryConsensusStatesResponse. + * @memberof ibc.core.client.v1 + * @interface IQueryConsensusStatesResponse + * @property {Array.|null} [consensusStates] QueryConsensusStatesResponse consensusStates + * @property {cosmos.base.query.v1beta1.IPageResponse|null} [pagination] QueryConsensusStatesResponse pagination + */ + + /** + * Constructs a new QueryConsensusStatesResponse. + * @memberof ibc.core.client.v1 + * @classdesc Represents a QueryConsensusStatesResponse. + * @implements IQueryConsensusStatesResponse + * @constructor + * @param {ibc.core.client.v1.IQueryConsensusStatesResponse=} [properties] Properties to set + */ + function QueryConsensusStatesResponse(properties) { + this.consensusStates = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryConsensusStatesResponse consensusStates. + * @member {Array.} consensusStates + * @memberof ibc.core.client.v1.QueryConsensusStatesResponse + * @instance + */ + QueryConsensusStatesResponse.prototype.consensusStates = $util.emptyArray; + + /** + * QueryConsensusStatesResponse pagination. + * @member {cosmos.base.query.v1beta1.IPageResponse|null|undefined} pagination + * @memberof ibc.core.client.v1.QueryConsensusStatesResponse + * @instance + */ + QueryConsensusStatesResponse.prototype.pagination = null; + + /** + * Creates a new QueryConsensusStatesResponse instance using the specified properties. + * @function create + * @memberof ibc.core.client.v1.QueryConsensusStatesResponse + * @static + * @param {ibc.core.client.v1.IQueryConsensusStatesResponse=} [properties] Properties to set + * @returns {ibc.core.client.v1.QueryConsensusStatesResponse} QueryConsensusStatesResponse instance + */ + QueryConsensusStatesResponse.create = function create(properties) { + return new QueryConsensusStatesResponse(properties); + }; + + /** + * Encodes the specified QueryConsensusStatesResponse message. Does not implicitly {@link ibc.core.client.v1.QueryConsensusStatesResponse.verify|verify} messages. + * @function encode + * @memberof ibc.core.client.v1.QueryConsensusStatesResponse + * @static + * @param {ibc.core.client.v1.IQueryConsensusStatesResponse} message QueryConsensusStatesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryConsensusStatesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.consensusStates != null && message.consensusStates.length) + for (let i = 0; i < message.consensusStates.length; ++i) + $root.ibc.core.client.v1.ConsensusStateWithHeight.encode(message.consensusStates[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) + $root.cosmos.base.query.v1beta1.PageResponse.encode(message.pagination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryConsensusStatesResponse message, length delimited. Does not implicitly {@link ibc.core.client.v1.QueryConsensusStatesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.client.v1.QueryConsensusStatesResponse + * @static + * @param {ibc.core.client.v1.IQueryConsensusStatesResponse} message QueryConsensusStatesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryConsensusStatesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryConsensusStatesResponse message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.client.v1.QueryConsensusStatesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.client.v1.QueryConsensusStatesResponse} QueryConsensusStatesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryConsensusStatesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.QueryConsensusStatesResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.consensusStates && message.consensusStates.length)) + message.consensusStates = []; + message.consensusStates.push($root.ibc.core.client.v1.ConsensusStateWithHeight.decode(reader, reader.uint32())); + break; + case 2: + message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryConsensusStatesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.client.v1.QueryConsensusStatesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.client.v1.QueryConsensusStatesResponse} QueryConsensusStatesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryConsensusStatesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryConsensusStatesResponse message. + * @function verify + * @memberof ibc.core.client.v1.QueryConsensusStatesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryConsensusStatesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.consensusStates != null && message.hasOwnProperty("consensusStates")) { + if (!Array.isArray(message.consensusStates)) + return "consensusStates: array expected"; + for (let i = 0; i < message.consensusStates.length; ++i) { + let error = $root.ibc.core.client.v1.ConsensusStateWithHeight.verify(message.consensusStates[i]); + if (error) + return "consensusStates." + error; + } + } + if (message.pagination != null && message.hasOwnProperty("pagination")) { + let error = $root.cosmos.base.query.v1beta1.PageResponse.verify(message.pagination); + if (error) + return "pagination." + error; + } + return null; + }; + + /** + * Creates a QueryConsensusStatesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.client.v1.QueryConsensusStatesResponse + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.client.v1.QueryConsensusStatesResponse} QueryConsensusStatesResponse + */ + QueryConsensusStatesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.client.v1.QueryConsensusStatesResponse) + return object; + let message = new $root.ibc.core.client.v1.QueryConsensusStatesResponse(); + if (object.consensusStates) { + if (!Array.isArray(object.consensusStates)) + throw TypeError(".ibc.core.client.v1.QueryConsensusStatesResponse.consensusStates: array expected"); + message.consensusStates = []; + for (let i = 0; i < object.consensusStates.length; ++i) { + if (typeof object.consensusStates[i] !== "object") + throw TypeError(".ibc.core.client.v1.QueryConsensusStatesResponse.consensusStates: object expected"); + message.consensusStates[i] = $root.ibc.core.client.v1.ConsensusStateWithHeight.fromObject(object.consensusStates[i]); + } + } + if (object.pagination != null) { + if (typeof object.pagination !== "object") + throw TypeError(".ibc.core.client.v1.QueryConsensusStatesResponse.pagination: object expected"); + message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.fromObject(object.pagination); + } + return message; + }; + + /** + * Creates a plain object from a QueryConsensusStatesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.client.v1.QueryConsensusStatesResponse + * @static + * @param {ibc.core.client.v1.QueryConsensusStatesResponse} message QueryConsensusStatesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryConsensusStatesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.consensusStates = []; + if (options.defaults) + object.pagination = null; + if (message.consensusStates && message.consensusStates.length) { + object.consensusStates = []; + for (let j = 0; j < message.consensusStates.length; ++j) + object.consensusStates[j] = $root.ibc.core.client.v1.ConsensusStateWithHeight.toObject(message.consensusStates[j], options); + } + if (message.pagination != null && message.hasOwnProperty("pagination")) + object.pagination = $root.cosmos.base.query.v1beta1.PageResponse.toObject(message.pagination, options); + return object; + }; + + /** + * Converts this QueryConsensusStatesResponse to JSON. + * @function toJSON + * @memberof ibc.core.client.v1.QueryConsensusStatesResponse + * @instance + * @returns {Object.} JSON object + */ + QueryConsensusStatesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryConsensusStatesResponse; + })(v1.QueryConsensusStatesResponse || {}); + + v1.QueryClientParamsRequest = (function(QueryClientParamsRequest) { + + /** + * Properties of a QueryClientParamsRequest. + * @memberof ibc.core.client.v1 + * @interface IQueryClientParamsRequest + */ + + /** + * Constructs a new QueryClientParamsRequest. + * @memberof ibc.core.client.v1 + * @classdesc Represents a QueryClientParamsRequest. + * @implements IQueryClientParamsRequest + * @constructor + * @param {ibc.core.client.v1.IQueryClientParamsRequest=} [properties] Properties to set + */ + function QueryClientParamsRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new QueryClientParamsRequest instance using the specified properties. + * @function create + * @memberof ibc.core.client.v1.QueryClientParamsRequest + * @static + * @param {ibc.core.client.v1.IQueryClientParamsRequest=} [properties] Properties to set + * @returns {ibc.core.client.v1.QueryClientParamsRequest} QueryClientParamsRequest instance + */ + QueryClientParamsRequest.create = function create(properties) { + return new QueryClientParamsRequest(properties); + }; + + /** + * Encodes the specified QueryClientParamsRequest message. Does not implicitly {@link ibc.core.client.v1.QueryClientParamsRequest.verify|verify} messages. + * @function encode + * @memberof ibc.core.client.v1.QueryClientParamsRequest + * @static + * @param {ibc.core.client.v1.IQueryClientParamsRequest} message QueryClientParamsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryClientParamsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified QueryClientParamsRequest message, length delimited. Does not implicitly {@link ibc.core.client.v1.QueryClientParamsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.client.v1.QueryClientParamsRequest + * @static + * @param {ibc.core.client.v1.IQueryClientParamsRequest} message QueryClientParamsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryClientParamsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryClientParamsRequest message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.client.v1.QueryClientParamsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.client.v1.QueryClientParamsRequest} QueryClientParamsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryClientParamsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.QueryClientParamsRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryClientParamsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.client.v1.QueryClientParamsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.client.v1.QueryClientParamsRequest} QueryClientParamsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryClientParamsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryClientParamsRequest message. + * @function verify + * @memberof ibc.core.client.v1.QueryClientParamsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryClientParamsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a QueryClientParamsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.client.v1.QueryClientParamsRequest + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.client.v1.QueryClientParamsRequest} QueryClientParamsRequest + */ + QueryClientParamsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.client.v1.QueryClientParamsRequest) + return object; + return new $root.ibc.core.client.v1.QueryClientParamsRequest(); + }; + + /** + * Creates a plain object from a QueryClientParamsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.client.v1.QueryClientParamsRequest + * @static + * @param {ibc.core.client.v1.QueryClientParamsRequest} message QueryClientParamsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryClientParamsRequest.toObject = function toObject() { + return {}; + }; + + /** + * Converts this QueryClientParamsRequest to JSON. + * @function toJSON + * @memberof ibc.core.client.v1.QueryClientParamsRequest + * @instance + * @returns {Object.} JSON object + */ + QueryClientParamsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryClientParamsRequest; + })(v1.QueryClientParamsRequest || {}); + + v1.QueryClientParamsResponse = (function(QueryClientParamsResponse) { + + /** + * Properties of a QueryClientParamsResponse. + * @memberof ibc.core.client.v1 + * @interface IQueryClientParamsResponse + * @property {ibc.core.client.v1.IParams|null} [params] QueryClientParamsResponse params + */ + + /** + * Constructs a new QueryClientParamsResponse. + * @memberof ibc.core.client.v1 + * @classdesc Represents a QueryClientParamsResponse. + * @implements IQueryClientParamsResponse + * @constructor + * @param {ibc.core.client.v1.IQueryClientParamsResponse=} [properties] Properties to set + */ + function QueryClientParamsResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryClientParamsResponse params. + * @member {ibc.core.client.v1.IParams|null|undefined} params + * @memberof ibc.core.client.v1.QueryClientParamsResponse + * @instance + */ + QueryClientParamsResponse.prototype.params = null; + + /** + * Creates a new QueryClientParamsResponse instance using the specified properties. + * @function create + * @memberof ibc.core.client.v1.QueryClientParamsResponse + * @static + * @param {ibc.core.client.v1.IQueryClientParamsResponse=} [properties] Properties to set + * @returns {ibc.core.client.v1.QueryClientParamsResponse} QueryClientParamsResponse instance + */ + QueryClientParamsResponse.create = function create(properties) { + return new QueryClientParamsResponse(properties); + }; + + /** + * Encodes the specified QueryClientParamsResponse message. Does not implicitly {@link ibc.core.client.v1.QueryClientParamsResponse.verify|verify} messages. + * @function encode + * @memberof ibc.core.client.v1.QueryClientParamsResponse + * @static + * @param {ibc.core.client.v1.IQueryClientParamsResponse} message QueryClientParamsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryClientParamsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.params != null && Object.hasOwnProperty.call(message, "params")) + $root.ibc.core.client.v1.Params.encode(message.params, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryClientParamsResponse message, length delimited. Does not implicitly {@link ibc.core.client.v1.QueryClientParamsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.client.v1.QueryClientParamsResponse + * @static + * @param {ibc.core.client.v1.IQueryClientParamsResponse} message QueryClientParamsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryClientParamsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryClientParamsResponse message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.client.v1.QueryClientParamsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.client.v1.QueryClientParamsResponse} QueryClientParamsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryClientParamsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.QueryClientParamsResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.params = $root.ibc.core.client.v1.Params.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryClientParamsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.client.v1.QueryClientParamsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.client.v1.QueryClientParamsResponse} QueryClientParamsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryClientParamsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryClientParamsResponse message. + * @function verify + * @memberof ibc.core.client.v1.QueryClientParamsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryClientParamsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.params != null && message.hasOwnProperty("params")) { + let error = $root.ibc.core.client.v1.Params.verify(message.params); + if (error) + return "params." + error; + } + return null; + }; + + /** + * Creates a QueryClientParamsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.client.v1.QueryClientParamsResponse + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.client.v1.QueryClientParamsResponse} QueryClientParamsResponse + */ + QueryClientParamsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.client.v1.QueryClientParamsResponse) + return object; + let message = new $root.ibc.core.client.v1.QueryClientParamsResponse(); + if (object.params != null) { + if (typeof object.params !== "object") + throw TypeError(".ibc.core.client.v1.QueryClientParamsResponse.params: object expected"); + message.params = $root.ibc.core.client.v1.Params.fromObject(object.params); + } + return message; + }; + + /** + * Creates a plain object from a QueryClientParamsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.client.v1.QueryClientParamsResponse + * @static + * @param {ibc.core.client.v1.QueryClientParamsResponse} message QueryClientParamsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryClientParamsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.params = null; + if (message.params != null && message.hasOwnProperty("params")) + object.params = $root.ibc.core.client.v1.Params.toObject(message.params, options); + return object; + }; + + /** + * Converts this QueryClientParamsResponse to JSON. + * @function toJSON + * @memberof ibc.core.client.v1.QueryClientParamsResponse + * @instance + * @returns {Object.} JSON object + */ + QueryClientParamsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryClientParamsResponse; + })(v1.QueryClientParamsResponse || {}); + + v1.Msg = (function(Msg) { + + /** + * Constructs a new Msg service. + * @memberof ibc.core.client.v1 + * @classdesc Represents a Msg + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Msg(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Msg.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Msg; + + /** + * Creates new Msg service using the specified rpc implementation. + * @function create + * @memberof ibc.core.client.v1.Msg + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Msg} RPC service. Useful where requests and/or responses are streamed. + */ + Msg.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link ibc.core.client.v1.Msg#createClient}. + * @memberof ibc.core.client.v1.Msg + * @typedef CreateClientCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {ibc.core.client.v1.IMsgCreateClientResponse} [response] MsgCreateClientResponse + */ + + /** + * Calls CreateClient. + * @function createClient + * @memberof ibc.core.client.v1.Msg + * @instance + * @param {ibc.core.client.v1.IMsgCreateClient} request MsgCreateClient message or plain object + * @param {ibc.core.client.v1.Msg.CreateClientCallback} callback Node-style callback called with the error, if any, and MsgCreateClientResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Msg.prototype.createClient = function createClient(request, callback) { + return this.rpcCall(createClient, $root.ibc.core.client.v1.MsgCreateClient, $root.ibc.core.client.v1.MsgCreateClientResponse, request, callback); + }, "name", { value: "CreateClient" }); + + /** + * Calls CreateClient. + * @function createClient + * @memberof ibc.core.client.v1.Msg + * @instance + * @param {ibc.core.client.v1.IMsgCreateClient} request MsgCreateClient message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link ibc.core.client.v1.Msg#updateClient}. + * @memberof ibc.core.client.v1.Msg + * @typedef UpdateClientCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {ibc.core.client.v1.IMsgUpdateClientResponse} [response] MsgUpdateClientResponse + */ + + /** + * Calls UpdateClient. + * @function updateClient + * @memberof ibc.core.client.v1.Msg + * @instance + * @param {ibc.core.client.v1.IMsgUpdateClient} request MsgUpdateClient message or plain object + * @param {ibc.core.client.v1.Msg.UpdateClientCallback} callback Node-style callback called with the error, if any, and MsgUpdateClientResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Msg.prototype.updateClient = function updateClient(request, callback) { + return this.rpcCall(updateClient, $root.ibc.core.client.v1.MsgUpdateClient, $root.ibc.core.client.v1.MsgUpdateClientResponse, request, callback); + }, "name", { value: "UpdateClient" }); + + /** + * Calls UpdateClient. + * @function updateClient + * @memberof ibc.core.client.v1.Msg + * @instance + * @param {ibc.core.client.v1.IMsgUpdateClient} request MsgUpdateClient message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link ibc.core.client.v1.Msg#upgradeClient}. + * @memberof ibc.core.client.v1.Msg + * @typedef UpgradeClientCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {ibc.core.client.v1.IMsgUpgradeClientResponse} [response] MsgUpgradeClientResponse + */ + + /** + * Calls UpgradeClient. + * @function upgradeClient + * @memberof ibc.core.client.v1.Msg + * @instance + * @param {ibc.core.client.v1.IMsgUpgradeClient} request MsgUpgradeClient message or plain object + * @param {ibc.core.client.v1.Msg.UpgradeClientCallback} callback Node-style callback called with the error, if any, and MsgUpgradeClientResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Msg.prototype.upgradeClient = function upgradeClient(request, callback) { + return this.rpcCall(upgradeClient, $root.ibc.core.client.v1.MsgUpgradeClient, $root.ibc.core.client.v1.MsgUpgradeClientResponse, request, callback); + }, "name", { value: "UpgradeClient" }); + + /** + * Calls UpgradeClient. + * @function upgradeClient + * @memberof ibc.core.client.v1.Msg + * @instance + * @param {ibc.core.client.v1.IMsgUpgradeClient} request MsgUpgradeClient message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link ibc.core.client.v1.Msg#submitMisbehaviour}. + * @memberof ibc.core.client.v1.Msg + * @typedef SubmitMisbehaviourCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {ibc.core.client.v1.IMsgSubmitMisbehaviourResponse} [response] MsgSubmitMisbehaviourResponse + */ + + /** + * Calls SubmitMisbehaviour. + * @function submitMisbehaviour + * @memberof ibc.core.client.v1.Msg + * @instance + * @param {ibc.core.client.v1.IMsgSubmitMisbehaviour} request MsgSubmitMisbehaviour message or plain object + * @param {ibc.core.client.v1.Msg.SubmitMisbehaviourCallback} callback Node-style callback called with the error, if any, and MsgSubmitMisbehaviourResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Msg.prototype.submitMisbehaviour = function submitMisbehaviour(request, callback) { + return this.rpcCall(submitMisbehaviour, $root.ibc.core.client.v1.MsgSubmitMisbehaviour, $root.ibc.core.client.v1.MsgSubmitMisbehaviourResponse, request, callback); + }, "name", { value: "SubmitMisbehaviour" }); + + /** + * Calls SubmitMisbehaviour. + * @function submitMisbehaviour + * @memberof ibc.core.client.v1.Msg + * @instance + * @param {ibc.core.client.v1.IMsgSubmitMisbehaviour} request MsgSubmitMisbehaviour message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Msg; + })(v1.Msg || {}); + + v1.MsgCreateClient = (function(MsgCreateClient) { + + /** + * Properties of a MsgCreateClient. + * @memberof ibc.core.client.v1 + * @interface IMsgCreateClient + * @property {google.protobuf.IAny|null} [clientState] MsgCreateClient clientState + * @property {google.protobuf.IAny|null} [consensusState] MsgCreateClient consensusState + * @property {string|null} [signer] MsgCreateClient signer + */ + + /** + * Constructs a new MsgCreateClient. + * @memberof ibc.core.client.v1 + * @classdesc Represents a MsgCreateClient. + * @implements IMsgCreateClient + * @constructor + * @param {ibc.core.client.v1.IMsgCreateClient=} [properties] Properties to set + */ + function MsgCreateClient(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgCreateClient clientState. + * @member {google.protobuf.IAny|null|undefined} clientState + * @memberof ibc.core.client.v1.MsgCreateClient + * @instance + */ + MsgCreateClient.prototype.clientState = null; + + /** + * MsgCreateClient consensusState. + * @member {google.protobuf.IAny|null|undefined} consensusState + * @memberof ibc.core.client.v1.MsgCreateClient + * @instance + */ + MsgCreateClient.prototype.consensusState = null; + + /** + * MsgCreateClient signer. + * @member {string} signer + * @memberof ibc.core.client.v1.MsgCreateClient + * @instance + */ + MsgCreateClient.prototype.signer = ""; + + /** + * Creates a new MsgCreateClient instance using the specified properties. + * @function create + * @memberof ibc.core.client.v1.MsgCreateClient + * @static + * @param {ibc.core.client.v1.IMsgCreateClient=} [properties] Properties to set + * @returns {ibc.core.client.v1.MsgCreateClient} MsgCreateClient instance + */ + MsgCreateClient.create = function create(properties) { + return new MsgCreateClient(properties); + }; + + /** + * Encodes the specified MsgCreateClient message. Does not implicitly {@link ibc.core.client.v1.MsgCreateClient.verify|verify} messages. + * @function encode + * @memberof ibc.core.client.v1.MsgCreateClient + * @static + * @param {ibc.core.client.v1.IMsgCreateClient} message MsgCreateClient message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgCreateClient.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.clientState != null && Object.hasOwnProperty.call(message, "clientState")) + $root.google.protobuf.Any.encode(message.clientState, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.consensusState != null && Object.hasOwnProperty.call(message, "consensusState")) + $root.google.protobuf.Any.encode(message.consensusState, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.signer); + return writer; + }; + + /** + * Encodes the specified MsgCreateClient message, length delimited. Does not implicitly {@link ibc.core.client.v1.MsgCreateClient.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.client.v1.MsgCreateClient + * @static + * @param {ibc.core.client.v1.IMsgCreateClient} message MsgCreateClient message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgCreateClient.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgCreateClient message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.client.v1.MsgCreateClient + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.client.v1.MsgCreateClient} MsgCreateClient + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgCreateClient.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.MsgCreateClient(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.clientState = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + case 2: + message.consensusState = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + case 3: + message.signer = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgCreateClient message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.client.v1.MsgCreateClient + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.client.v1.MsgCreateClient} MsgCreateClient + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgCreateClient.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgCreateClient message. + * @function verify + * @memberof ibc.core.client.v1.MsgCreateClient + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgCreateClient.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.clientState != null && message.hasOwnProperty("clientState")) { + let error = $root.google.protobuf.Any.verify(message.clientState); + if (error) + return "clientState." + error; + } + if (message.consensusState != null && message.hasOwnProperty("consensusState")) { + let error = $root.google.protobuf.Any.verify(message.consensusState); + if (error) + return "consensusState." + error; + } + if (message.signer != null && message.hasOwnProperty("signer")) + if (!$util.isString(message.signer)) + return "signer: string expected"; + return null; + }; + + /** + * Creates a MsgCreateClient message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.client.v1.MsgCreateClient + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.client.v1.MsgCreateClient} MsgCreateClient + */ + MsgCreateClient.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.client.v1.MsgCreateClient) + return object; + let message = new $root.ibc.core.client.v1.MsgCreateClient(); + if (object.clientState != null) { + if (typeof object.clientState !== "object") + throw TypeError(".ibc.core.client.v1.MsgCreateClient.clientState: object expected"); + message.clientState = $root.google.protobuf.Any.fromObject(object.clientState); + } + if (object.consensusState != null) { + if (typeof object.consensusState !== "object") + throw TypeError(".ibc.core.client.v1.MsgCreateClient.consensusState: object expected"); + message.consensusState = $root.google.protobuf.Any.fromObject(object.consensusState); + } + if (object.signer != null) + message.signer = String(object.signer); + return message; + }; + + /** + * Creates a plain object from a MsgCreateClient message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.client.v1.MsgCreateClient + * @static + * @param {ibc.core.client.v1.MsgCreateClient} message MsgCreateClient + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgCreateClient.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.clientState = null; + object.consensusState = null; + object.signer = ""; + } + if (message.clientState != null && message.hasOwnProperty("clientState")) + object.clientState = $root.google.protobuf.Any.toObject(message.clientState, options); + if (message.consensusState != null && message.hasOwnProperty("consensusState")) + object.consensusState = $root.google.protobuf.Any.toObject(message.consensusState, options); + if (message.signer != null && message.hasOwnProperty("signer")) + object.signer = message.signer; + return object; + }; + + /** + * Converts this MsgCreateClient to JSON. + * @function toJSON + * @memberof ibc.core.client.v1.MsgCreateClient + * @instance + * @returns {Object.} JSON object + */ + MsgCreateClient.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgCreateClient; + })(v1.MsgCreateClient || {}); + + v1.MsgCreateClientResponse = (function(MsgCreateClientResponse) { + + /** + * Properties of a MsgCreateClientResponse. + * @memberof ibc.core.client.v1 + * @interface IMsgCreateClientResponse + */ + + /** + * Constructs a new MsgCreateClientResponse. + * @memberof ibc.core.client.v1 + * @classdesc Represents a MsgCreateClientResponse. + * @implements IMsgCreateClientResponse + * @constructor + * @param {ibc.core.client.v1.IMsgCreateClientResponse=} [properties] Properties to set + */ + function MsgCreateClientResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new MsgCreateClientResponse instance using the specified properties. + * @function create + * @memberof ibc.core.client.v1.MsgCreateClientResponse + * @static + * @param {ibc.core.client.v1.IMsgCreateClientResponse=} [properties] Properties to set + * @returns {ibc.core.client.v1.MsgCreateClientResponse} MsgCreateClientResponse instance + */ + MsgCreateClientResponse.create = function create(properties) { + return new MsgCreateClientResponse(properties); + }; + + /** + * Encodes the specified MsgCreateClientResponse message. Does not implicitly {@link ibc.core.client.v1.MsgCreateClientResponse.verify|verify} messages. + * @function encode + * @memberof ibc.core.client.v1.MsgCreateClientResponse + * @static + * @param {ibc.core.client.v1.IMsgCreateClientResponse} message MsgCreateClientResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgCreateClientResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MsgCreateClientResponse message, length delimited. Does not implicitly {@link ibc.core.client.v1.MsgCreateClientResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.client.v1.MsgCreateClientResponse + * @static + * @param {ibc.core.client.v1.IMsgCreateClientResponse} message MsgCreateClientResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgCreateClientResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgCreateClientResponse message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.client.v1.MsgCreateClientResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.client.v1.MsgCreateClientResponse} MsgCreateClientResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgCreateClientResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.MsgCreateClientResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgCreateClientResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.client.v1.MsgCreateClientResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.client.v1.MsgCreateClientResponse} MsgCreateClientResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgCreateClientResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgCreateClientResponse message. + * @function verify + * @memberof ibc.core.client.v1.MsgCreateClientResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgCreateClientResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MsgCreateClientResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.client.v1.MsgCreateClientResponse + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.client.v1.MsgCreateClientResponse} MsgCreateClientResponse + */ + MsgCreateClientResponse.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.client.v1.MsgCreateClientResponse) + return object; + return new $root.ibc.core.client.v1.MsgCreateClientResponse(); + }; + + /** + * Creates a plain object from a MsgCreateClientResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.client.v1.MsgCreateClientResponse + * @static + * @param {ibc.core.client.v1.MsgCreateClientResponse} message MsgCreateClientResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgCreateClientResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MsgCreateClientResponse to JSON. + * @function toJSON + * @memberof ibc.core.client.v1.MsgCreateClientResponse + * @instance + * @returns {Object.} JSON object + */ + MsgCreateClientResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgCreateClientResponse; + })(v1.MsgCreateClientResponse || {}); + + v1.MsgUpdateClient = (function(MsgUpdateClient) { + + /** + * Properties of a MsgUpdateClient. + * @memberof ibc.core.client.v1 + * @interface IMsgUpdateClient + * @property {string|null} [clientId] MsgUpdateClient clientId + * @property {google.protobuf.IAny|null} [header] MsgUpdateClient header + * @property {string|null} [signer] MsgUpdateClient signer + */ + + /** + * Constructs a new MsgUpdateClient. + * @memberof ibc.core.client.v1 + * @classdesc Represents a MsgUpdateClient. + * @implements IMsgUpdateClient + * @constructor + * @param {ibc.core.client.v1.IMsgUpdateClient=} [properties] Properties to set + */ + function MsgUpdateClient(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgUpdateClient clientId. + * @member {string} clientId + * @memberof ibc.core.client.v1.MsgUpdateClient + * @instance + */ + MsgUpdateClient.prototype.clientId = ""; + + /** + * MsgUpdateClient header. + * @member {google.protobuf.IAny|null|undefined} header + * @memberof ibc.core.client.v1.MsgUpdateClient + * @instance + */ + MsgUpdateClient.prototype.header = null; + + /** + * MsgUpdateClient signer. + * @member {string} signer + * @memberof ibc.core.client.v1.MsgUpdateClient + * @instance + */ + MsgUpdateClient.prototype.signer = ""; + + /** + * Creates a new MsgUpdateClient instance using the specified properties. + * @function create + * @memberof ibc.core.client.v1.MsgUpdateClient + * @static + * @param {ibc.core.client.v1.IMsgUpdateClient=} [properties] Properties to set + * @returns {ibc.core.client.v1.MsgUpdateClient} MsgUpdateClient instance + */ + MsgUpdateClient.create = function create(properties) { + return new MsgUpdateClient(properties); + }; + + /** + * Encodes the specified MsgUpdateClient message. Does not implicitly {@link ibc.core.client.v1.MsgUpdateClient.verify|verify} messages. + * @function encode + * @memberof ibc.core.client.v1.MsgUpdateClient + * @static + * @param {ibc.core.client.v1.IMsgUpdateClient} message MsgUpdateClient message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgUpdateClient.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.clientId != null && Object.hasOwnProperty.call(message, "clientId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.clientId); + if (message.header != null && Object.hasOwnProperty.call(message, "header")) + $root.google.protobuf.Any.encode(message.header, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.signer); + return writer; + }; + + /** + * Encodes the specified MsgUpdateClient message, length delimited. Does not implicitly {@link ibc.core.client.v1.MsgUpdateClient.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.client.v1.MsgUpdateClient + * @static + * @param {ibc.core.client.v1.IMsgUpdateClient} message MsgUpdateClient message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgUpdateClient.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgUpdateClient message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.client.v1.MsgUpdateClient + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.client.v1.MsgUpdateClient} MsgUpdateClient + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgUpdateClient.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.MsgUpdateClient(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.clientId = reader.string(); + break; + case 2: + message.header = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + case 3: + message.signer = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgUpdateClient message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.client.v1.MsgUpdateClient + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.client.v1.MsgUpdateClient} MsgUpdateClient + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgUpdateClient.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgUpdateClient message. + * @function verify + * @memberof ibc.core.client.v1.MsgUpdateClient + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgUpdateClient.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.clientId != null && message.hasOwnProperty("clientId")) + if (!$util.isString(message.clientId)) + return "clientId: string expected"; + if (message.header != null && message.hasOwnProperty("header")) { + let error = $root.google.protobuf.Any.verify(message.header); + if (error) + return "header." + error; + } + if (message.signer != null && message.hasOwnProperty("signer")) + if (!$util.isString(message.signer)) + return "signer: string expected"; + return null; + }; + + /** + * Creates a MsgUpdateClient message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.client.v1.MsgUpdateClient + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.client.v1.MsgUpdateClient} MsgUpdateClient + */ + MsgUpdateClient.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.client.v1.MsgUpdateClient) + return object; + let message = new $root.ibc.core.client.v1.MsgUpdateClient(); + if (object.clientId != null) + message.clientId = String(object.clientId); + if (object.header != null) { + if (typeof object.header !== "object") + throw TypeError(".ibc.core.client.v1.MsgUpdateClient.header: object expected"); + message.header = $root.google.protobuf.Any.fromObject(object.header); + } + if (object.signer != null) + message.signer = String(object.signer); + return message; + }; + + /** + * Creates a plain object from a MsgUpdateClient message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.client.v1.MsgUpdateClient + * @static + * @param {ibc.core.client.v1.MsgUpdateClient} message MsgUpdateClient + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgUpdateClient.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.clientId = ""; + object.header = null; + object.signer = ""; + } + if (message.clientId != null && message.hasOwnProperty("clientId")) + object.clientId = message.clientId; + if (message.header != null && message.hasOwnProperty("header")) + object.header = $root.google.protobuf.Any.toObject(message.header, options); + if (message.signer != null && message.hasOwnProperty("signer")) + object.signer = message.signer; + return object; + }; + + /** + * Converts this MsgUpdateClient to JSON. + * @function toJSON + * @memberof ibc.core.client.v1.MsgUpdateClient + * @instance + * @returns {Object.} JSON object + */ + MsgUpdateClient.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgUpdateClient; + })(v1.MsgUpdateClient || {}); + + v1.MsgUpdateClientResponse = (function(MsgUpdateClientResponse) { + + /** + * Properties of a MsgUpdateClientResponse. + * @memberof ibc.core.client.v1 + * @interface IMsgUpdateClientResponse + */ + + /** + * Constructs a new MsgUpdateClientResponse. + * @memberof ibc.core.client.v1 + * @classdesc Represents a MsgUpdateClientResponse. + * @implements IMsgUpdateClientResponse + * @constructor + * @param {ibc.core.client.v1.IMsgUpdateClientResponse=} [properties] Properties to set + */ + function MsgUpdateClientResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new MsgUpdateClientResponse instance using the specified properties. + * @function create + * @memberof ibc.core.client.v1.MsgUpdateClientResponse + * @static + * @param {ibc.core.client.v1.IMsgUpdateClientResponse=} [properties] Properties to set + * @returns {ibc.core.client.v1.MsgUpdateClientResponse} MsgUpdateClientResponse instance + */ + MsgUpdateClientResponse.create = function create(properties) { + return new MsgUpdateClientResponse(properties); + }; + + /** + * Encodes the specified MsgUpdateClientResponse message. Does not implicitly {@link ibc.core.client.v1.MsgUpdateClientResponse.verify|verify} messages. + * @function encode + * @memberof ibc.core.client.v1.MsgUpdateClientResponse + * @static + * @param {ibc.core.client.v1.IMsgUpdateClientResponse} message MsgUpdateClientResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgUpdateClientResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MsgUpdateClientResponse message, length delimited. Does not implicitly {@link ibc.core.client.v1.MsgUpdateClientResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.client.v1.MsgUpdateClientResponse + * @static + * @param {ibc.core.client.v1.IMsgUpdateClientResponse} message MsgUpdateClientResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgUpdateClientResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgUpdateClientResponse message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.client.v1.MsgUpdateClientResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.client.v1.MsgUpdateClientResponse} MsgUpdateClientResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgUpdateClientResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.MsgUpdateClientResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgUpdateClientResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.client.v1.MsgUpdateClientResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.client.v1.MsgUpdateClientResponse} MsgUpdateClientResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgUpdateClientResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgUpdateClientResponse message. + * @function verify + * @memberof ibc.core.client.v1.MsgUpdateClientResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgUpdateClientResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MsgUpdateClientResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.client.v1.MsgUpdateClientResponse + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.client.v1.MsgUpdateClientResponse} MsgUpdateClientResponse + */ + MsgUpdateClientResponse.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.client.v1.MsgUpdateClientResponse) + return object; + return new $root.ibc.core.client.v1.MsgUpdateClientResponse(); + }; + + /** + * Creates a plain object from a MsgUpdateClientResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.client.v1.MsgUpdateClientResponse + * @static + * @param {ibc.core.client.v1.MsgUpdateClientResponse} message MsgUpdateClientResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgUpdateClientResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MsgUpdateClientResponse to JSON. + * @function toJSON + * @memberof ibc.core.client.v1.MsgUpdateClientResponse + * @instance + * @returns {Object.} JSON object + */ + MsgUpdateClientResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgUpdateClientResponse; + })(v1.MsgUpdateClientResponse || {}); + + v1.MsgUpgradeClient = (function(MsgUpgradeClient) { + + /** + * Properties of a MsgUpgradeClient. + * @memberof ibc.core.client.v1 + * @interface IMsgUpgradeClient + * @property {string|null} [clientId] MsgUpgradeClient clientId + * @property {google.protobuf.IAny|null} [clientState] MsgUpgradeClient clientState + * @property {google.protobuf.IAny|null} [consensusState] MsgUpgradeClient consensusState + * @property {Uint8Array|null} [proofUpgradeClient] MsgUpgradeClient proofUpgradeClient + * @property {Uint8Array|null} [proofUpgradeConsensusState] MsgUpgradeClient proofUpgradeConsensusState + * @property {string|null} [signer] MsgUpgradeClient signer + */ + + /** + * Constructs a new MsgUpgradeClient. + * @memberof ibc.core.client.v1 + * @classdesc Represents a MsgUpgradeClient. + * @implements IMsgUpgradeClient + * @constructor + * @param {ibc.core.client.v1.IMsgUpgradeClient=} [properties] Properties to set + */ + function MsgUpgradeClient(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgUpgradeClient clientId. + * @member {string} clientId + * @memberof ibc.core.client.v1.MsgUpgradeClient + * @instance + */ + MsgUpgradeClient.prototype.clientId = ""; + + /** + * MsgUpgradeClient clientState. + * @member {google.protobuf.IAny|null|undefined} clientState + * @memberof ibc.core.client.v1.MsgUpgradeClient + * @instance + */ + MsgUpgradeClient.prototype.clientState = null; + + /** + * MsgUpgradeClient consensusState. + * @member {google.protobuf.IAny|null|undefined} consensusState + * @memberof ibc.core.client.v1.MsgUpgradeClient + * @instance + */ + MsgUpgradeClient.prototype.consensusState = null; + + /** + * MsgUpgradeClient proofUpgradeClient. + * @member {Uint8Array} proofUpgradeClient + * @memberof ibc.core.client.v1.MsgUpgradeClient + * @instance + */ + MsgUpgradeClient.prototype.proofUpgradeClient = $util.newBuffer([]); + + /** + * MsgUpgradeClient proofUpgradeConsensusState. + * @member {Uint8Array} proofUpgradeConsensusState + * @memberof ibc.core.client.v1.MsgUpgradeClient + * @instance + */ + MsgUpgradeClient.prototype.proofUpgradeConsensusState = $util.newBuffer([]); + + /** + * MsgUpgradeClient signer. + * @member {string} signer + * @memberof ibc.core.client.v1.MsgUpgradeClient + * @instance + */ + MsgUpgradeClient.prototype.signer = ""; + + /** + * Creates a new MsgUpgradeClient instance using the specified properties. + * @function create + * @memberof ibc.core.client.v1.MsgUpgradeClient + * @static + * @param {ibc.core.client.v1.IMsgUpgradeClient=} [properties] Properties to set + * @returns {ibc.core.client.v1.MsgUpgradeClient} MsgUpgradeClient instance + */ + MsgUpgradeClient.create = function create(properties) { + return new MsgUpgradeClient(properties); + }; + + /** + * Encodes the specified MsgUpgradeClient message. Does not implicitly {@link ibc.core.client.v1.MsgUpgradeClient.verify|verify} messages. + * @function encode + * @memberof ibc.core.client.v1.MsgUpgradeClient + * @static + * @param {ibc.core.client.v1.IMsgUpgradeClient} message MsgUpgradeClient message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgUpgradeClient.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.clientId != null && Object.hasOwnProperty.call(message, "clientId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.clientId); + if (message.clientState != null && Object.hasOwnProperty.call(message, "clientState")) + $root.google.protobuf.Any.encode(message.clientState, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.consensusState != null && Object.hasOwnProperty.call(message, "consensusState")) + $root.google.protobuf.Any.encode(message.consensusState, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.proofUpgradeClient != null && Object.hasOwnProperty.call(message, "proofUpgradeClient")) + writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.proofUpgradeClient); + if (message.proofUpgradeConsensusState != null && Object.hasOwnProperty.call(message, "proofUpgradeConsensusState")) + writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.proofUpgradeConsensusState); + if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.signer); + return writer; + }; + + /** + * Encodes the specified MsgUpgradeClient message, length delimited. Does not implicitly {@link ibc.core.client.v1.MsgUpgradeClient.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.client.v1.MsgUpgradeClient + * @static + * @param {ibc.core.client.v1.IMsgUpgradeClient} message MsgUpgradeClient message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgUpgradeClient.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgUpgradeClient message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.client.v1.MsgUpgradeClient + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.client.v1.MsgUpgradeClient} MsgUpgradeClient + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgUpgradeClient.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.MsgUpgradeClient(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.clientId = reader.string(); + break; + case 2: + message.clientState = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + case 3: + message.consensusState = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + case 4: + message.proofUpgradeClient = reader.bytes(); + break; + case 5: + message.proofUpgradeConsensusState = reader.bytes(); + break; + case 6: + message.signer = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgUpgradeClient message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.client.v1.MsgUpgradeClient + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.client.v1.MsgUpgradeClient} MsgUpgradeClient + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgUpgradeClient.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgUpgradeClient message. + * @function verify + * @memberof ibc.core.client.v1.MsgUpgradeClient + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgUpgradeClient.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.clientId != null && message.hasOwnProperty("clientId")) + if (!$util.isString(message.clientId)) + return "clientId: string expected"; + if (message.clientState != null && message.hasOwnProperty("clientState")) { + let error = $root.google.protobuf.Any.verify(message.clientState); + if (error) + return "clientState." + error; + } + if (message.consensusState != null && message.hasOwnProperty("consensusState")) { + let error = $root.google.protobuf.Any.verify(message.consensusState); + if (error) + return "consensusState." + error; + } + if (message.proofUpgradeClient != null && message.hasOwnProperty("proofUpgradeClient")) + if (!(message.proofUpgradeClient && typeof message.proofUpgradeClient.length === "number" || $util.isString(message.proofUpgradeClient))) + return "proofUpgradeClient: buffer expected"; + if (message.proofUpgradeConsensusState != null && message.hasOwnProperty("proofUpgradeConsensusState")) + if (!(message.proofUpgradeConsensusState && typeof message.proofUpgradeConsensusState.length === "number" || $util.isString(message.proofUpgradeConsensusState))) + return "proofUpgradeConsensusState: buffer expected"; + if (message.signer != null && message.hasOwnProperty("signer")) + if (!$util.isString(message.signer)) + return "signer: string expected"; + return null; + }; + + /** + * Creates a MsgUpgradeClient message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.client.v1.MsgUpgradeClient + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.client.v1.MsgUpgradeClient} MsgUpgradeClient + */ + MsgUpgradeClient.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.client.v1.MsgUpgradeClient) + return object; + let message = new $root.ibc.core.client.v1.MsgUpgradeClient(); + if (object.clientId != null) + message.clientId = String(object.clientId); + if (object.clientState != null) { + if (typeof object.clientState !== "object") + throw TypeError(".ibc.core.client.v1.MsgUpgradeClient.clientState: object expected"); + message.clientState = $root.google.protobuf.Any.fromObject(object.clientState); + } + if (object.consensusState != null) { + if (typeof object.consensusState !== "object") + throw TypeError(".ibc.core.client.v1.MsgUpgradeClient.consensusState: object expected"); + message.consensusState = $root.google.protobuf.Any.fromObject(object.consensusState); + } + if (object.proofUpgradeClient != null) + if (typeof object.proofUpgradeClient === "string") + $util.base64.decode(object.proofUpgradeClient, message.proofUpgradeClient = $util.newBuffer($util.base64.length(object.proofUpgradeClient)), 0); + else if (object.proofUpgradeClient.length) + message.proofUpgradeClient = object.proofUpgradeClient; + if (object.proofUpgradeConsensusState != null) + if (typeof object.proofUpgradeConsensusState === "string") + $util.base64.decode(object.proofUpgradeConsensusState, message.proofUpgradeConsensusState = $util.newBuffer($util.base64.length(object.proofUpgradeConsensusState)), 0); + else if (object.proofUpgradeConsensusState.length) + message.proofUpgradeConsensusState = object.proofUpgradeConsensusState; + if (object.signer != null) + message.signer = String(object.signer); + return message; + }; + + /** + * Creates a plain object from a MsgUpgradeClient message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.client.v1.MsgUpgradeClient + * @static + * @param {ibc.core.client.v1.MsgUpgradeClient} message MsgUpgradeClient + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgUpgradeClient.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.clientId = ""; + object.clientState = null; + object.consensusState = null; + if (options.bytes === String) + object.proofUpgradeClient = ""; + else { + object.proofUpgradeClient = []; + if (options.bytes !== Array) + object.proofUpgradeClient = $util.newBuffer(object.proofUpgradeClient); + } + if (options.bytes === String) + object.proofUpgradeConsensusState = ""; + else { + object.proofUpgradeConsensusState = []; + if (options.bytes !== Array) + object.proofUpgradeConsensusState = $util.newBuffer(object.proofUpgradeConsensusState); + } + object.signer = ""; + } + if (message.clientId != null && message.hasOwnProperty("clientId")) + object.clientId = message.clientId; + if (message.clientState != null && message.hasOwnProperty("clientState")) + object.clientState = $root.google.protobuf.Any.toObject(message.clientState, options); + if (message.consensusState != null && message.hasOwnProperty("consensusState")) + object.consensusState = $root.google.protobuf.Any.toObject(message.consensusState, options); + if (message.proofUpgradeClient != null && message.hasOwnProperty("proofUpgradeClient")) + object.proofUpgradeClient = options.bytes === String ? $util.base64.encode(message.proofUpgradeClient, 0, message.proofUpgradeClient.length) : options.bytes === Array ? Array.prototype.slice.call(message.proofUpgradeClient) : message.proofUpgradeClient; + if (message.proofUpgradeConsensusState != null && message.hasOwnProperty("proofUpgradeConsensusState")) + object.proofUpgradeConsensusState = options.bytes === String ? $util.base64.encode(message.proofUpgradeConsensusState, 0, message.proofUpgradeConsensusState.length) : options.bytes === Array ? Array.prototype.slice.call(message.proofUpgradeConsensusState) : message.proofUpgradeConsensusState; + if (message.signer != null && message.hasOwnProperty("signer")) + object.signer = message.signer; + return object; + }; + + /** + * Converts this MsgUpgradeClient to JSON. + * @function toJSON + * @memberof ibc.core.client.v1.MsgUpgradeClient + * @instance + * @returns {Object.} JSON object + */ + MsgUpgradeClient.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgUpgradeClient; + })(v1.MsgUpgradeClient || {}); + + v1.MsgUpgradeClientResponse = (function(MsgUpgradeClientResponse) { + + /** + * Properties of a MsgUpgradeClientResponse. + * @memberof ibc.core.client.v1 + * @interface IMsgUpgradeClientResponse + */ + + /** + * Constructs a new MsgUpgradeClientResponse. + * @memberof ibc.core.client.v1 + * @classdesc Represents a MsgUpgradeClientResponse. + * @implements IMsgUpgradeClientResponse + * @constructor + * @param {ibc.core.client.v1.IMsgUpgradeClientResponse=} [properties] Properties to set + */ + function MsgUpgradeClientResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new MsgUpgradeClientResponse instance using the specified properties. + * @function create + * @memberof ibc.core.client.v1.MsgUpgradeClientResponse + * @static + * @param {ibc.core.client.v1.IMsgUpgradeClientResponse=} [properties] Properties to set + * @returns {ibc.core.client.v1.MsgUpgradeClientResponse} MsgUpgradeClientResponse instance + */ + MsgUpgradeClientResponse.create = function create(properties) { + return new MsgUpgradeClientResponse(properties); + }; + + /** + * Encodes the specified MsgUpgradeClientResponse message. Does not implicitly {@link ibc.core.client.v1.MsgUpgradeClientResponse.verify|verify} messages. + * @function encode + * @memberof ibc.core.client.v1.MsgUpgradeClientResponse + * @static + * @param {ibc.core.client.v1.IMsgUpgradeClientResponse} message MsgUpgradeClientResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgUpgradeClientResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MsgUpgradeClientResponse message, length delimited. Does not implicitly {@link ibc.core.client.v1.MsgUpgradeClientResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.client.v1.MsgUpgradeClientResponse + * @static + * @param {ibc.core.client.v1.IMsgUpgradeClientResponse} message MsgUpgradeClientResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgUpgradeClientResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgUpgradeClientResponse message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.client.v1.MsgUpgradeClientResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.client.v1.MsgUpgradeClientResponse} MsgUpgradeClientResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgUpgradeClientResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.MsgUpgradeClientResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgUpgradeClientResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.client.v1.MsgUpgradeClientResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.client.v1.MsgUpgradeClientResponse} MsgUpgradeClientResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgUpgradeClientResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgUpgradeClientResponse message. + * @function verify + * @memberof ibc.core.client.v1.MsgUpgradeClientResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgUpgradeClientResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MsgUpgradeClientResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.client.v1.MsgUpgradeClientResponse + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.client.v1.MsgUpgradeClientResponse} MsgUpgradeClientResponse + */ + MsgUpgradeClientResponse.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.client.v1.MsgUpgradeClientResponse) + return object; + return new $root.ibc.core.client.v1.MsgUpgradeClientResponse(); + }; + + /** + * Creates a plain object from a MsgUpgradeClientResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.client.v1.MsgUpgradeClientResponse + * @static + * @param {ibc.core.client.v1.MsgUpgradeClientResponse} message MsgUpgradeClientResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgUpgradeClientResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MsgUpgradeClientResponse to JSON. + * @function toJSON + * @memberof ibc.core.client.v1.MsgUpgradeClientResponse + * @instance + * @returns {Object.} JSON object + */ + MsgUpgradeClientResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgUpgradeClientResponse; + })(v1.MsgUpgradeClientResponse || {}); + + v1.MsgSubmitMisbehaviour = (function(MsgSubmitMisbehaviour) { + + /** + * Properties of a MsgSubmitMisbehaviour. + * @memberof ibc.core.client.v1 + * @interface IMsgSubmitMisbehaviour + * @property {string|null} [clientId] MsgSubmitMisbehaviour clientId + * @property {google.protobuf.IAny|null} [misbehaviour] MsgSubmitMisbehaviour misbehaviour + * @property {string|null} [signer] MsgSubmitMisbehaviour signer + */ + + /** + * Constructs a new MsgSubmitMisbehaviour. + * @memberof ibc.core.client.v1 + * @classdesc Represents a MsgSubmitMisbehaviour. + * @implements IMsgSubmitMisbehaviour + * @constructor + * @param {ibc.core.client.v1.IMsgSubmitMisbehaviour=} [properties] Properties to set + */ + function MsgSubmitMisbehaviour(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgSubmitMisbehaviour clientId. + * @member {string} clientId + * @memberof ibc.core.client.v1.MsgSubmitMisbehaviour + * @instance + */ + MsgSubmitMisbehaviour.prototype.clientId = ""; + + /** + * MsgSubmitMisbehaviour misbehaviour. + * @member {google.protobuf.IAny|null|undefined} misbehaviour + * @memberof ibc.core.client.v1.MsgSubmitMisbehaviour + * @instance + */ + MsgSubmitMisbehaviour.prototype.misbehaviour = null; + + /** + * MsgSubmitMisbehaviour signer. + * @member {string} signer + * @memberof ibc.core.client.v1.MsgSubmitMisbehaviour + * @instance + */ + MsgSubmitMisbehaviour.prototype.signer = ""; + + /** + * Creates a new MsgSubmitMisbehaviour instance using the specified properties. + * @function create + * @memberof ibc.core.client.v1.MsgSubmitMisbehaviour + * @static + * @param {ibc.core.client.v1.IMsgSubmitMisbehaviour=} [properties] Properties to set + * @returns {ibc.core.client.v1.MsgSubmitMisbehaviour} MsgSubmitMisbehaviour instance + */ + MsgSubmitMisbehaviour.create = function create(properties) { + return new MsgSubmitMisbehaviour(properties); + }; + + /** + * Encodes the specified MsgSubmitMisbehaviour message. Does not implicitly {@link ibc.core.client.v1.MsgSubmitMisbehaviour.verify|verify} messages. + * @function encode + * @memberof ibc.core.client.v1.MsgSubmitMisbehaviour + * @static + * @param {ibc.core.client.v1.IMsgSubmitMisbehaviour} message MsgSubmitMisbehaviour message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgSubmitMisbehaviour.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.clientId != null && Object.hasOwnProperty.call(message, "clientId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.clientId); + if (message.misbehaviour != null && Object.hasOwnProperty.call(message, "misbehaviour")) + $root.google.protobuf.Any.encode(message.misbehaviour, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.signer); + return writer; + }; + + /** + * Encodes the specified MsgSubmitMisbehaviour message, length delimited. Does not implicitly {@link ibc.core.client.v1.MsgSubmitMisbehaviour.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.client.v1.MsgSubmitMisbehaviour + * @static + * @param {ibc.core.client.v1.IMsgSubmitMisbehaviour} message MsgSubmitMisbehaviour message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgSubmitMisbehaviour.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgSubmitMisbehaviour message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.client.v1.MsgSubmitMisbehaviour + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.client.v1.MsgSubmitMisbehaviour} MsgSubmitMisbehaviour + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgSubmitMisbehaviour.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.MsgSubmitMisbehaviour(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.clientId = reader.string(); + break; + case 2: + message.misbehaviour = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + case 3: + message.signer = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgSubmitMisbehaviour message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.client.v1.MsgSubmitMisbehaviour + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.client.v1.MsgSubmitMisbehaviour} MsgSubmitMisbehaviour + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgSubmitMisbehaviour.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgSubmitMisbehaviour message. + * @function verify + * @memberof ibc.core.client.v1.MsgSubmitMisbehaviour + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgSubmitMisbehaviour.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.clientId != null && message.hasOwnProperty("clientId")) + if (!$util.isString(message.clientId)) + return "clientId: string expected"; + if (message.misbehaviour != null && message.hasOwnProperty("misbehaviour")) { + let error = $root.google.protobuf.Any.verify(message.misbehaviour); + if (error) + return "misbehaviour." + error; + } + if (message.signer != null && message.hasOwnProperty("signer")) + if (!$util.isString(message.signer)) + return "signer: string expected"; + return null; + }; + + /** + * Creates a MsgSubmitMisbehaviour message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.client.v1.MsgSubmitMisbehaviour + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.client.v1.MsgSubmitMisbehaviour} MsgSubmitMisbehaviour + */ + MsgSubmitMisbehaviour.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.client.v1.MsgSubmitMisbehaviour) + return object; + let message = new $root.ibc.core.client.v1.MsgSubmitMisbehaviour(); + if (object.clientId != null) + message.clientId = String(object.clientId); + if (object.misbehaviour != null) { + if (typeof object.misbehaviour !== "object") + throw TypeError(".ibc.core.client.v1.MsgSubmitMisbehaviour.misbehaviour: object expected"); + message.misbehaviour = $root.google.protobuf.Any.fromObject(object.misbehaviour); + } + if (object.signer != null) + message.signer = String(object.signer); + return message; + }; + + /** + * Creates a plain object from a MsgSubmitMisbehaviour message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.client.v1.MsgSubmitMisbehaviour + * @static + * @param {ibc.core.client.v1.MsgSubmitMisbehaviour} message MsgSubmitMisbehaviour + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgSubmitMisbehaviour.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.clientId = ""; + object.misbehaviour = null; + object.signer = ""; + } + if (message.clientId != null && message.hasOwnProperty("clientId")) + object.clientId = message.clientId; + if (message.misbehaviour != null && message.hasOwnProperty("misbehaviour")) + object.misbehaviour = $root.google.protobuf.Any.toObject(message.misbehaviour, options); + if (message.signer != null && message.hasOwnProperty("signer")) + object.signer = message.signer; + return object; + }; + + /** + * Converts this MsgSubmitMisbehaviour to JSON. + * @function toJSON + * @memberof ibc.core.client.v1.MsgSubmitMisbehaviour + * @instance + * @returns {Object.} JSON object + */ + MsgSubmitMisbehaviour.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgSubmitMisbehaviour; + })(v1.MsgSubmitMisbehaviour || {}); + + v1.MsgSubmitMisbehaviourResponse = (function(MsgSubmitMisbehaviourResponse) { + + /** + * Properties of a MsgSubmitMisbehaviourResponse. + * @memberof ibc.core.client.v1 + * @interface IMsgSubmitMisbehaviourResponse + */ + + /** + * Constructs a new MsgSubmitMisbehaviourResponse. + * @memberof ibc.core.client.v1 + * @classdesc Represents a MsgSubmitMisbehaviourResponse. + * @implements IMsgSubmitMisbehaviourResponse + * @constructor + * @param {ibc.core.client.v1.IMsgSubmitMisbehaviourResponse=} [properties] Properties to set + */ + function MsgSubmitMisbehaviourResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new MsgSubmitMisbehaviourResponse instance using the specified properties. + * @function create + * @memberof ibc.core.client.v1.MsgSubmitMisbehaviourResponse + * @static + * @param {ibc.core.client.v1.IMsgSubmitMisbehaviourResponse=} [properties] Properties to set + * @returns {ibc.core.client.v1.MsgSubmitMisbehaviourResponse} MsgSubmitMisbehaviourResponse instance + */ + MsgSubmitMisbehaviourResponse.create = function create(properties) { + return new MsgSubmitMisbehaviourResponse(properties); + }; + + /** + * Encodes the specified MsgSubmitMisbehaviourResponse message. Does not implicitly {@link ibc.core.client.v1.MsgSubmitMisbehaviourResponse.verify|verify} messages. + * @function encode + * @memberof ibc.core.client.v1.MsgSubmitMisbehaviourResponse + * @static + * @param {ibc.core.client.v1.IMsgSubmitMisbehaviourResponse} message MsgSubmitMisbehaviourResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgSubmitMisbehaviourResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MsgSubmitMisbehaviourResponse message, length delimited. Does not implicitly {@link ibc.core.client.v1.MsgSubmitMisbehaviourResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.client.v1.MsgSubmitMisbehaviourResponse + * @static + * @param {ibc.core.client.v1.IMsgSubmitMisbehaviourResponse} message MsgSubmitMisbehaviourResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgSubmitMisbehaviourResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgSubmitMisbehaviourResponse message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.client.v1.MsgSubmitMisbehaviourResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.client.v1.MsgSubmitMisbehaviourResponse} MsgSubmitMisbehaviourResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgSubmitMisbehaviourResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.MsgSubmitMisbehaviourResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgSubmitMisbehaviourResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.client.v1.MsgSubmitMisbehaviourResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.client.v1.MsgSubmitMisbehaviourResponse} MsgSubmitMisbehaviourResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgSubmitMisbehaviourResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgSubmitMisbehaviourResponse message. + * @function verify + * @memberof ibc.core.client.v1.MsgSubmitMisbehaviourResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgSubmitMisbehaviourResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MsgSubmitMisbehaviourResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.client.v1.MsgSubmitMisbehaviourResponse + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.client.v1.MsgSubmitMisbehaviourResponse} MsgSubmitMisbehaviourResponse + */ + MsgSubmitMisbehaviourResponse.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.client.v1.MsgSubmitMisbehaviourResponse) + return object; + return new $root.ibc.core.client.v1.MsgSubmitMisbehaviourResponse(); + }; + + /** + * Creates a plain object from a MsgSubmitMisbehaviourResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.client.v1.MsgSubmitMisbehaviourResponse + * @static + * @param {ibc.core.client.v1.MsgSubmitMisbehaviourResponse} message MsgSubmitMisbehaviourResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgSubmitMisbehaviourResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MsgSubmitMisbehaviourResponse to JSON. + * @function toJSON + * @memberof ibc.core.client.v1.MsgSubmitMisbehaviourResponse + * @instance + * @returns {Object.} JSON object + */ + MsgSubmitMisbehaviourResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgSubmitMisbehaviourResponse; + })(v1.MsgSubmitMisbehaviourResponse || {}); + + return v1; + })(client.v1 || {}); + + return client; + })(core.client || {}); + + /** + * Namespace commitment. + * @memberof ibc.core + * @namespace + */ + + core.commitment = (function(commitment) { + + /** + * Namespace v1. + * @memberof ibc.core.commitment + * @namespace + */ + + commitment.v1 = (function(v1) { + + v1.MerkleRoot = (function(MerkleRoot) { + + /** + * Properties of a MerkleRoot. + * @memberof ibc.core.commitment.v1 + * @interface IMerkleRoot + * @property {Uint8Array|null} [hash] MerkleRoot hash + */ + + /** + * Constructs a new MerkleRoot. + * @memberof ibc.core.commitment.v1 + * @classdesc Represents a MerkleRoot. + * @implements IMerkleRoot + * @constructor + * @param {ibc.core.commitment.v1.IMerkleRoot=} [properties] Properties to set + */ + function MerkleRoot(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MerkleRoot hash. + * @member {Uint8Array} hash + * @memberof ibc.core.commitment.v1.MerkleRoot + * @instance + */ + MerkleRoot.prototype.hash = $util.newBuffer([]); + + /** + * Creates a new MerkleRoot instance using the specified properties. + * @function create + * @memberof ibc.core.commitment.v1.MerkleRoot + * @static + * @param {ibc.core.commitment.v1.IMerkleRoot=} [properties] Properties to set + * @returns {ibc.core.commitment.v1.MerkleRoot} MerkleRoot instance + */ + MerkleRoot.create = function create(properties) { + return new MerkleRoot(properties); + }; + + /** + * Encodes the specified MerkleRoot message. Does not implicitly {@link ibc.core.commitment.v1.MerkleRoot.verify|verify} messages. + * @function encode + * @memberof ibc.core.commitment.v1.MerkleRoot + * @static + * @param {ibc.core.commitment.v1.IMerkleRoot} message MerkleRoot message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MerkleRoot.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.hash != null && Object.hasOwnProperty.call(message, "hash")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.hash); + return writer; + }; + + /** + * Encodes the specified MerkleRoot message, length delimited. Does not implicitly {@link ibc.core.commitment.v1.MerkleRoot.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.commitment.v1.MerkleRoot + * @static + * @param {ibc.core.commitment.v1.IMerkleRoot} message MerkleRoot message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MerkleRoot.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MerkleRoot message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.commitment.v1.MerkleRoot + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.commitment.v1.MerkleRoot} MerkleRoot + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MerkleRoot.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.commitment.v1.MerkleRoot(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.hash = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MerkleRoot message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.commitment.v1.MerkleRoot + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.commitment.v1.MerkleRoot} MerkleRoot + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MerkleRoot.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MerkleRoot message. + * @function verify + * @memberof ibc.core.commitment.v1.MerkleRoot + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MerkleRoot.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.hash != null && message.hasOwnProperty("hash")) + if (!(message.hash && typeof message.hash.length === "number" || $util.isString(message.hash))) + return "hash: buffer expected"; + return null; + }; + + /** + * Creates a MerkleRoot message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.commitment.v1.MerkleRoot + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.commitment.v1.MerkleRoot} MerkleRoot + */ + MerkleRoot.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.commitment.v1.MerkleRoot) + return object; + let message = new $root.ibc.core.commitment.v1.MerkleRoot(); + if (object.hash != null) + if (typeof object.hash === "string") + $util.base64.decode(object.hash, message.hash = $util.newBuffer($util.base64.length(object.hash)), 0); + else if (object.hash.length) + message.hash = object.hash; + return message; + }; + + /** + * Creates a plain object from a MerkleRoot message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.commitment.v1.MerkleRoot + * @static + * @param {ibc.core.commitment.v1.MerkleRoot} message MerkleRoot + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MerkleRoot.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + if (options.bytes === String) + object.hash = ""; + else { + object.hash = []; + if (options.bytes !== Array) + object.hash = $util.newBuffer(object.hash); + } + if (message.hash != null && message.hasOwnProperty("hash")) + object.hash = options.bytes === String ? $util.base64.encode(message.hash, 0, message.hash.length) : options.bytes === Array ? Array.prototype.slice.call(message.hash) : message.hash; + return object; + }; + + /** + * Converts this MerkleRoot to JSON. + * @function toJSON + * @memberof ibc.core.commitment.v1.MerkleRoot + * @instance + * @returns {Object.} JSON object + */ + MerkleRoot.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MerkleRoot; + })(v1.MerkleRoot || {}); + + v1.MerklePrefix = (function(MerklePrefix) { + + /** + * Properties of a MerklePrefix. + * @memberof ibc.core.commitment.v1 + * @interface IMerklePrefix + * @property {Uint8Array|null} [keyPrefix] MerklePrefix keyPrefix + */ + + /** + * Constructs a new MerklePrefix. + * @memberof ibc.core.commitment.v1 + * @classdesc Represents a MerklePrefix. + * @implements IMerklePrefix + * @constructor + * @param {ibc.core.commitment.v1.IMerklePrefix=} [properties] Properties to set + */ + function MerklePrefix(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MerklePrefix keyPrefix. + * @member {Uint8Array} keyPrefix + * @memberof ibc.core.commitment.v1.MerklePrefix + * @instance + */ + MerklePrefix.prototype.keyPrefix = $util.newBuffer([]); + + /** + * Creates a new MerklePrefix instance using the specified properties. + * @function create + * @memberof ibc.core.commitment.v1.MerklePrefix + * @static + * @param {ibc.core.commitment.v1.IMerklePrefix=} [properties] Properties to set + * @returns {ibc.core.commitment.v1.MerklePrefix} MerklePrefix instance + */ + MerklePrefix.create = function create(properties) { + return new MerklePrefix(properties); + }; + + /** + * Encodes the specified MerklePrefix message. Does not implicitly {@link ibc.core.commitment.v1.MerklePrefix.verify|verify} messages. + * @function encode + * @memberof ibc.core.commitment.v1.MerklePrefix + * @static + * @param {ibc.core.commitment.v1.IMerklePrefix} message MerklePrefix message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MerklePrefix.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.keyPrefix != null && Object.hasOwnProperty.call(message, "keyPrefix")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.keyPrefix); + return writer; + }; + + /** + * Encodes the specified MerklePrefix message, length delimited. Does not implicitly {@link ibc.core.commitment.v1.MerklePrefix.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.commitment.v1.MerklePrefix + * @static + * @param {ibc.core.commitment.v1.IMerklePrefix} message MerklePrefix message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MerklePrefix.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MerklePrefix message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.commitment.v1.MerklePrefix + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.commitment.v1.MerklePrefix} MerklePrefix + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MerklePrefix.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.commitment.v1.MerklePrefix(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.keyPrefix = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MerklePrefix message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.commitment.v1.MerklePrefix + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.commitment.v1.MerklePrefix} MerklePrefix + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MerklePrefix.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MerklePrefix message. + * @function verify + * @memberof ibc.core.commitment.v1.MerklePrefix + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MerklePrefix.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.keyPrefix != null && message.hasOwnProperty("keyPrefix")) + if (!(message.keyPrefix && typeof message.keyPrefix.length === "number" || $util.isString(message.keyPrefix))) + return "keyPrefix: buffer expected"; + return null; + }; + + /** + * Creates a MerklePrefix message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.commitment.v1.MerklePrefix + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.commitment.v1.MerklePrefix} MerklePrefix + */ + MerklePrefix.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.commitment.v1.MerklePrefix) + return object; + let message = new $root.ibc.core.commitment.v1.MerklePrefix(); + if (object.keyPrefix != null) + if (typeof object.keyPrefix === "string") + $util.base64.decode(object.keyPrefix, message.keyPrefix = $util.newBuffer($util.base64.length(object.keyPrefix)), 0); + else if (object.keyPrefix.length) + message.keyPrefix = object.keyPrefix; + return message; + }; + + /** + * Creates a plain object from a MerklePrefix message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.commitment.v1.MerklePrefix + * @static + * @param {ibc.core.commitment.v1.MerklePrefix} message MerklePrefix + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MerklePrefix.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + if (options.bytes === String) + object.keyPrefix = ""; + else { + object.keyPrefix = []; + if (options.bytes !== Array) + object.keyPrefix = $util.newBuffer(object.keyPrefix); + } + if (message.keyPrefix != null && message.hasOwnProperty("keyPrefix")) + object.keyPrefix = options.bytes === String ? $util.base64.encode(message.keyPrefix, 0, message.keyPrefix.length) : options.bytes === Array ? Array.prototype.slice.call(message.keyPrefix) : message.keyPrefix; + return object; + }; + + /** + * Converts this MerklePrefix to JSON. + * @function toJSON + * @memberof ibc.core.commitment.v1.MerklePrefix + * @instance + * @returns {Object.} JSON object + */ + MerklePrefix.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MerklePrefix; + })(v1.MerklePrefix || {}); + + v1.MerklePath = (function(MerklePath) { + + /** + * Properties of a MerklePath. + * @memberof ibc.core.commitment.v1 + * @interface IMerklePath + * @property {Array.|null} [keyPath] MerklePath keyPath + */ + + /** + * Constructs a new MerklePath. + * @memberof ibc.core.commitment.v1 + * @classdesc Represents a MerklePath. + * @implements IMerklePath + * @constructor + * @param {ibc.core.commitment.v1.IMerklePath=} [properties] Properties to set + */ + function MerklePath(properties) { + this.keyPath = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MerklePath keyPath. + * @member {Array.} keyPath + * @memberof ibc.core.commitment.v1.MerklePath + * @instance + */ + MerklePath.prototype.keyPath = $util.emptyArray; + + /** + * Creates a new MerklePath instance using the specified properties. + * @function create + * @memberof ibc.core.commitment.v1.MerklePath + * @static + * @param {ibc.core.commitment.v1.IMerklePath=} [properties] Properties to set + * @returns {ibc.core.commitment.v1.MerklePath} MerklePath instance + */ + MerklePath.create = function create(properties) { + return new MerklePath(properties); + }; + + /** + * Encodes the specified MerklePath message. Does not implicitly {@link ibc.core.commitment.v1.MerklePath.verify|verify} messages. + * @function encode + * @memberof ibc.core.commitment.v1.MerklePath + * @static + * @param {ibc.core.commitment.v1.IMerklePath} message MerklePath message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MerklePath.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.keyPath != null && message.keyPath.length) + for (let i = 0; i < message.keyPath.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyPath[i]); + return writer; + }; + + /** + * Encodes the specified MerklePath message, length delimited. Does not implicitly {@link ibc.core.commitment.v1.MerklePath.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.commitment.v1.MerklePath + * @static + * @param {ibc.core.commitment.v1.IMerklePath} message MerklePath message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MerklePath.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MerklePath message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.commitment.v1.MerklePath + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.commitment.v1.MerklePath} MerklePath + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MerklePath.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.commitment.v1.MerklePath(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.keyPath && message.keyPath.length)) + message.keyPath = []; + message.keyPath.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MerklePath message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.commitment.v1.MerklePath + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.commitment.v1.MerklePath} MerklePath + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MerklePath.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MerklePath message. + * @function verify + * @memberof ibc.core.commitment.v1.MerklePath + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MerklePath.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.keyPath != null && message.hasOwnProperty("keyPath")) { + if (!Array.isArray(message.keyPath)) + return "keyPath: array expected"; + for (let i = 0; i < message.keyPath.length; ++i) + if (!$util.isString(message.keyPath[i])) + return "keyPath: string[] expected"; + } + return null; + }; + + /** + * Creates a MerklePath message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.commitment.v1.MerklePath + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.commitment.v1.MerklePath} MerklePath + */ + MerklePath.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.commitment.v1.MerklePath) + return object; + let message = new $root.ibc.core.commitment.v1.MerklePath(); + if (object.keyPath) { + if (!Array.isArray(object.keyPath)) + throw TypeError(".ibc.core.commitment.v1.MerklePath.keyPath: array expected"); + message.keyPath = []; + for (let i = 0; i < object.keyPath.length; ++i) + message.keyPath[i] = String(object.keyPath[i]); + } + return message; + }; + + /** + * Creates a plain object from a MerklePath message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.commitment.v1.MerklePath + * @static + * @param {ibc.core.commitment.v1.MerklePath} message MerklePath + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MerklePath.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.keyPath = []; + if (message.keyPath && message.keyPath.length) { + object.keyPath = []; + for (let j = 0; j < message.keyPath.length; ++j) + object.keyPath[j] = message.keyPath[j]; + } + return object; + }; + + /** + * Converts this MerklePath to JSON. + * @function toJSON + * @memberof ibc.core.commitment.v1.MerklePath + * @instance + * @returns {Object.} JSON object + */ + MerklePath.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MerklePath; + })(v1.MerklePath || {}); + + v1.MerkleProof = (function(MerkleProof) { + + /** + * Properties of a MerkleProof. + * @memberof ibc.core.commitment.v1 + * @interface IMerkleProof + * @property {Array.|null} [proofs] MerkleProof proofs + */ + + /** + * Constructs a new MerkleProof. + * @memberof ibc.core.commitment.v1 + * @classdesc Represents a MerkleProof. + * @implements IMerkleProof + * @constructor + * @param {ibc.core.commitment.v1.IMerkleProof=} [properties] Properties to set + */ + function MerkleProof(properties) { + this.proofs = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MerkleProof proofs. + * @member {Array.} proofs + * @memberof ibc.core.commitment.v1.MerkleProof + * @instance + */ + MerkleProof.prototype.proofs = $util.emptyArray; + + /** + * Creates a new MerkleProof instance using the specified properties. + * @function create + * @memberof ibc.core.commitment.v1.MerkleProof + * @static + * @param {ibc.core.commitment.v1.IMerkleProof=} [properties] Properties to set + * @returns {ibc.core.commitment.v1.MerkleProof} MerkleProof instance + */ + MerkleProof.create = function create(properties) { + return new MerkleProof(properties); + }; + + /** + * Encodes the specified MerkleProof message. Does not implicitly {@link ibc.core.commitment.v1.MerkleProof.verify|verify} messages. + * @function encode + * @memberof ibc.core.commitment.v1.MerkleProof + * @static + * @param {ibc.core.commitment.v1.IMerkleProof} message MerkleProof message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MerkleProof.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.proofs != null && message.proofs.length) + for (let i = 0; i < message.proofs.length; ++i) + $root.ics23.CommitmentProof.encode(message.proofs[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MerkleProof message, length delimited. Does not implicitly {@link ibc.core.commitment.v1.MerkleProof.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.commitment.v1.MerkleProof + * @static + * @param {ibc.core.commitment.v1.IMerkleProof} message MerkleProof message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MerkleProof.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MerkleProof message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.commitment.v1.MerkleProof + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.commitment.v1.MerkleProof} MerkleProof + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MerkleProof.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.commitment.v1.MerkleProof(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.proofs && message.proofs.length)) + message.proofs = []; + message.proofs.push($root.ics23.CommitmentProof.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MerkleProof message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.commitment.v1.MerkleProof + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.commitment.v1.MerkleProof} MerkleProof + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MerkleProof.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MerkleProof message. + * @function verify + * @memberof ibc.core.commitment.v1.MerkleProof + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MerkleProof.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.proofs != null && message.hasOwnProperty("proofs")) { + if (!Array.isArray(message.proofs)) + return "proofs: array expected"; + for (let i = 0; i < message.proofs.length; ++i) { + let error = $root.ics23.CommitmentProof.verify(message.proofs[i]); + if (error) + return "proofs." + error; + } + } + return null; + }; + + /** + * Creates a MerkleProof message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.commitment.v1.MerkleProof + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.commitment.v1.MerkleProof} MerkleProof + */ + MerkleProof.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.commitment.v1.MerkleProof) + return object; + let message = new $root.ibc.core.commitment.v1.MerkleProof(); + if (object.proofs) { + if (!Array.isArray(object.proofs)) + throw TypeError(".ibc.core.commitment.v1.MerkleProof.proofs: array expected"); + message.proofs = []; + for (let i = 0; i < object.proofs.length; ++i) { + if (typeof object.proofs[i] !== "object") + throw TypeError(".ibc.core.commitment.v1.MerkleProof.proofs: object expected"); + message.proofs[i] = $root.ics23.CommitmentProof.fromObject(object.proofs[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a MerkleProof message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.commitment.v1.MerkleProof + * @static + * @param {ibc.core.commitment.v1.MerkleProof} message MerkleProof + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MerkleProof.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.proofs = []; + if (message.proofs && message.proofs.length) { + object.proofs = []; + for (let j = 0; j < message.proofs.length; ++j) + object.proofs[j] = $root.ics23.CommitmentProof.toObject(message.proofs[j], options); + } + return object; + }; + + /** + * Converts this MerkleProof to JSON. + * @function toJSON + * @memberof ibc.core.commitment.v1.MerkleProof + * @instance + * @returns {Object.} JSON object + */ + MerkleProof.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MerkleProof; + })(v1.MerkleProof || {}); + + return v1; + })(commitment.v1 || {}); + + return commitment; + })(core.commitment || {}); + + /** + * Namespace connection. + * @memberof ibc.core + * @namespace + */ + + core.connection = (function(connection) { + + /** + * Namespace v1. + * @memberof ibc.core.connection + * @namespace + */ + + connection.v1 = (function(v1) { + + v1.ConnectionEnd = (function(ConnectionEnd) { + + /** + * Properties of a ConnectionEnd. + * @memberof ibc.core.connection.v1 + * @interface IConnectionEnd + * @property {string|null} [clientId] ConnectionEnd clientId + * @property {Array.|null} [versions] ConnectionEnd versions + * @property {ibc.core.connection.v1.State|null} [state] ConnectionEnd state + * @property {ibc.core.connection.v1.ICounterparty|null} [counterparty] ConnectionEnd counterparty + * @property {number|Long|null} [delayPeriod] ConnectionEnd delayPeriod + */ + + /** + * Constructs a new ConnectionEnd. + * @memberof ibc.core.connection.v1 + * @classdesc Represents a ConnectionEnd. + * @implements IConnectionEnd + * @constructor + * @param {ibc.core.connection.v1.IConnectionEnd=} [properties] Properties to set + */ + function ConnectionEnd(properties) { + this.versions = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ConnectionEnd clientId. + * @member {string} clientId + * @memberof ibc.core.connection.v1.ConnectionEnd + * @instance + */ + ConnectionEnd.prototype.clientId = ""; + + /** + * ConnectionEnd versions. + * @member {Array.} versions + * @memberof ibc.core.connection.v1.ConnectionEnd + * @instance + */ + ConnectionEnd.prototype.versions = $util.emptyArray; + + /** + * ConnectionEnd state. + * @member {ibc.core.connection.v1.State} state + * @memberof ibc.core.connection.v1.ConnectionEnd + * @instance + */ + ConnectionEnd.prototype.state = 0; + + /** + * ConnectionEnd counterparty. + * @member {ibc.core.connection.v1.ICounterparty|null|undefined} counterparty + * @memberof ibc.core.connection.v1.ConnectionEnd + * @instance + */ + ConnectionEnd.prototype.counterparty = null; + + /** + * ConnectionEnd delayPeriod. + * @member {number|Long} delayPeriod + * @memberof ibc.core.connection.v1.ConnectionEnd + * @instance + */ + ConnectionEnd.prototype.delayPeriod = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new ConnectionEnd instance using the specified properties. + * @function create + * @memberof ibc.core.connection.v1.ConnectionEnd + * @static + * @param {ibc.core.connection.v1.IConnectionEnd=} [properties] Properties to set + * @returns {ibc.core.connection.v1.ConnectionEnd} ConnectionEnd instance + */ + ConnectionEnd.create = function create(properties) { + return new ConnectionEnd(properties); + }; + + /** + * Encodes the specified ConnectionEnd message. Does not implicitly {@link ibc.core.connection.v1.ConnectionEnd.verify|verify} messages. + * @function encode + * @memberof ibc.core.connection.v1.ConnectionEnd + * @static + * @param {ibc.core.connection.v1.IConnectionEnd} message ConnectionEnd message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConnectionEnd.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.clientId != null && Object.hasOwnProperty.call(message, "clientId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.clientId); + if (message.versions != null && message.versions.length) + for (let i = 0; i < message.versions.length; ++i) + $root.ibc.core.connection.v1.Version.encode(message.versions[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.state); + if (message.counterparty != null && Object.hasOwnProperty.call(message, "counterparty")) + $root.ibc.core.connection.v1.Counterparty.encode(message.counterparty, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.delayPeriod != null && Object.hasOwnProperty.call(message, "delayPeriod")) + writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.delayPeriod); + return writer; + }; + + /** + * Encodes the specified ConnectionEnd message, length delimited. Does not implicitly {@link ibc.core.connection.v1.ConnectionEnd.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.connection.v1.ConnectionEnd + * @static + * @param {ibc.core.connection.v1.IConnectionEnd} message ConnectionEnd message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConnectionEnd.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConnectionEnd message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.connection.v1.ConnectionEnd + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.connection.v1.ConnectionEnd} ConnectionEnd + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConnectionEnd.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.connection.v1.ConnectionEnd(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.clientId = reader.string(); + break; + case 2: + if (!(message.versions && message.versions.length)) + message.versions = []; + message.versions.push($root.ibc.core.connection.v1.Version.decode(reader, reader.uint32())); + break; + case 3: + message.state = reader.int32(); + break; + case 4: + message.counterparty = $root.ibc.core.connection.v1.Counterparty.decode(reader, reader.uint32()); + break; + case 5: + message.delayPeriod = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ConnectionEnd message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.connection.v1.ConnectionEnd + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.connection.v1.ConnectionEnd} ConnectionEnd + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConnectionEnd.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConnectionEnd message. + * @function verify + * @memberof ibc.core.connection.v1.ConnectionEnd + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConnectionEnd.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.clientId != null && message.hasOwnProperty("clientId")) + if (!$util.isString(message.clientId)) + return "clientId: string expected"; + if (message.versions != null && message.hasOwnProperty("versions")) { + if (!Array.isArray(message.versions)) + return "versions: array expected"; + for (let i = 0; i < message.versions.length; ++i) { + let error = $root.ibc.core.connection.v1.Version.verify(message.versions[i]); + if (error) + return "versions." + error; + } + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.counterparty != null && message.hasOwnProperty("counterparty")) { + let error = $root.ibc.core.connection.v1.Counterparty.verify(message.counterparty); + if (error) + return "counterparty." + error; + } + if (message.delayPeriod != null && message.hasOwnProperty("delayPeriod")) + if (!$util.isInteger(message.delayPeriod) && !(message.delayPeriod && $util.isInteger(message.delayPeriod.low) && $util.isInteger(message.delayPeriod.high))) + return "delayPeriod: integer|Long expected"; + return null; + }; + + /** + * Creates a ConnectionEnd message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.connection.v1.ConnectionEnd + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.connection.v1.ConnectionEnd} ConnectionEnd + */ + ConnectionEnd.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.connection.v1.ConnectionEnd) + return object; + let message = new $root.ibc.core.connection.v1.ConnectionEnd(); + if (object.clientId != null) + message.clientId = String(object.clientId); + if (object.versions) { + if (!Array.isArray(object.versions)) + throw TypeError(".ibc.core.connection.v1.ConnectionEnd.versions: array expected"); + message.versions = []; + for (let i = 0; i < object.versions.length; ++i) { + if (typeof object.versions[i] !== "object") + throw TypeError(".ibc.core.connection.v1.ConnectionEnd.versions: object expected"); + message.versions[i] = $root.ibc.core.connection.v1.Version.fromObject(object.versions[i]); + } + } + switch (object.state) { + case "STATE_UNINITIALIZED_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "STATE_INIT": + case 1: + message.state = 1; + break; + case "STATE_TRYOPEN": + case 2: + message.state = 2; + break; + case "STATE_OPEN": + case 3: + message.state = 3; + break; + } + if (object.counterparty != null) { + if (typeof object.counterparty !== "object") + throw TypeError(".ibc.core.connection.v1.ConnectionEnd.counterparty: object expected"); + message.counterparty = $root.ibc.core.connection.v1.Counterparty.fromObject(object.counterparty); + } + if (object.delayPeriod != null) + if ($util.Long) + (message.delayPeriod = $util.Long.fromValue(object.delayPeriod)).unsigned = true; + else if (typeof object.delayPeriod === "string") + message.delayPeriod = parseInt(object.delayPeriod, 10); + else if (typeof object.delayPeriod === "number") + message.delayPeriod = object.delayPeriod; + else if (typeof object.delayPeriod === "object") + message.delayPeriod = new $util.LongBits(object.delayPeriod.low >>> 0, object.delayPeriod.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a ConnectionEnd message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.connection.v1.ConnectionEnd + * @static + * @param {ibc.core.connection.v1.ConnectionEnd} message ConnectionEnd + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConnectionEnd.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.versions = []; + if (options.defaults) { + object.clientId = ""; + object.state = options.enums === String ? "STATE_UNINITIALIZED_UNSPECIFIED" : 0; + object.counterparty = null; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.delayPeriod = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.delayPeriod = options.longs === String ? "0" : 0; + } + if (message.clientId != null && message.hasOwnProperty("clientId")) + object.clientId = message.clientId; + if (message.versions && message.versions.length) { + object.versions = []; + for (let j = 0; j < message.versions.length; ++j) + object.versions[j] = $root.ibc.core.connection.v1.Version.toObject(message.versions[j], options); + } + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.ibc.core.connection.v1.State[message.state] : message.state; + if (message.counterparty != null && message.hasOwnProperty("counterparty")) + object.counterparty = $root.ibc.core.connection.v1.Counterparty.toObject(message.counterparty, options); + if (message.delayPeriod != null && message.hasOwnProperty("delayPeriod")) + if (typeof message.delayPeriod === "number") + object.delayPeriod = options.longs === String ? String(message.delayPeriod) : message.delayPeriod; + else + object.delayPeriod = options.longs === String ? $util.Long.prototype.toString.call(message.delayPeriod) : options.longs === Number ? new $util.LongBits(message.delayPeriod.low >>> 0, message.delayPeriod.high >>> 0).toNumber(true) : message.delayPeriod; + return object; + }; + + /** + * Converts this ConnectionEnd to JSON. + * @function toJSON + * @memberof ibc.core.connection.v1.ConnectionEnd + * @instance + * @returns {Object.} JSON object + */ + ConnectionEnd.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ConnectionEnd; + })(v1.ConnectionEnd || {}); + + v1.IdentifiedConnection = (function(IdentifiedConnection) { + + /** + * Properties of an IdentifiedConnection. + * @memberof ibc.core.connection.v1 + * @interface IIdentifiedConnection + * @property {string|null} [id] IdentifiedConnection id + * @property {string|null} [clientId] IdentifiedConnection clientId + * @property {Array.|null} [versions] IdentifiedConnection versions + * @property {ibc.core.connection.v1.State|null} [state] IdentifiedConnection state + * @property {ibc.core.connection.v1.ICounterparty|null} [counterparty] IdentifiedConnection counterparty + * @property {number|Long|null} [delayPeriod] IdentifiedConnection delayPeriod + */ + + /** + * Constructs a new IdentifiedConnection. + * @memberof ibc.core.connection.v1 + * @classdesc Represents an IdentifiedConnection. + * @implements IIdentifiedConnection + * @constructor + * @param {ibc.core.connection.v1.IIdentifiedConnection=} [properties] Properties to set + */ + function IdentifiedConnection(properties) { + this.versions = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * IdentifiedConnection id. + * @member {string} id + * @memberof ibc.core.connection.v1.IdentifiedConnection + * @instance + */ + IdentifiedConnection.prototype.id = ""; + + /** + * IdentifiedConnection clientId. + * @member {string} clientId + * @memberof ibc.core.connection.v1.IdentifiedConnection + * @instance + */ + IdentifiedConnection.prototype.clientId = ""; + + /** + * IdentifiedConnection versions. + * @member {Array.} versions + * @memberof ibc.core.connection.v1.IdentifiedConnection + * @instance + */ + IdentifiedConnection.prototype.versions = $util.emptyArray; + + /** + * IdentifiedConnection state. + * @member {ibc.core.connection.v1.State} state + * @memberof ibc.core.connection.v1.IdentifiedConnection + * @instance + */ + IdentifiedConnection.prototype.state = 0; + + /** + * IdentifiedConnection counterparty. + * @member {ibc.core.connection.v1.ICounterparty|null|undefined} counterparty + * @memberof ibc.core.connection.v1.IdentifiedConnection + * @instance + */ + IdentifiedConnection.prototype.counterparty = null; + + /** + * IdentifiedConnection delayPeriod. + * @member {number|Long} delayPeriod + * @memberof ibc.core.connection.v1.IdentifiedConnection + * @instance + */ + IdentifiedConnection.prototype.delayPeriod = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new IdentifiedConnection instance using the specified properties. + * @function create + * @memberof ibc.core.connection.v1.IdentifiedConnection + * @static + * @param {ibc.core.connection.v1.IIdentifiedConnection=} [properties] Properties to set + * @returns {ibc.core.connection.v1.IdentifiedConnection} IdentifiedConnection instance + */ + IdentifiedConnection.create = function create(properties) { + return new IdentifiedConnection(properties); + }; + + /** + * Encodes the specified IdentifiedConnection message. Does not implicitly {@link ibc.core.connection.v1.IdentifiedConnection.verify|verify} messages. + * @function encode + * @memberof ibc.core.connection.v1.IdentifiedConnection + * @static + * @param {ibc.core.connection.v1.IIdentifiedConnection} message IdentifiedConnection message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IdentifiedConnection.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.clientId != null && Object.hasOwnProperty.call(message, "clientId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.clientId); + if (message.versions != null && message.versions.length) + for (let i = 0; i < message.versions.length; ++i) + $root.ibc.core.connection.v1.Version.encode(message.versions[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.state); + if (message.counterparty != null && Object.hasOwnProperty.call(message, "counterparty")) + $root.ibc.core.connection.v1.Counterparty.encode(message.counterparty, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.delayPeriod != null && Object.hasOwnProperty.call(message, "delayPeriod")) + writer.uint32(/* id 6, wireType 0 =*/48).uint64(message.delayPeriod); + return writer; + }; + + /** + * Encodes the specified IdentifiedConnection message, length delimited. Does not implicitly {@link ibc.core.connection.v1.IdentifiedConnection.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.connection.v1.IdentifiedConnection + * @static + * @param {ibc.core.connection.v1.IIdentifiedConnection} message IdentifiedConnection message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IdentifiedConnection.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IdentifiedConnection message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.connection.v1.IdentifiedConnection + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.connection.v1.IdentifiedConnection} IdentifiedConnection + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IdentifiedConnection.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.connection.v1.IdentifiedConnection(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.id = reader.string(); + break; + case 2: + message.clientId = reader.string(); + break; + case 3: + if (!(message.versions && message.versions.length)) + message.versions = []; + message.versions.push($root.ibc.core.connection.v1.Version.decode(reader, reader.uint32())); + break; + case 4: + message.state = reader.int32(); + break; + case 5: + message.counterparty = $root.ibc.core.connection.v1.Counterparty.decode(reader, reader.uint32()); + break; + case 6: + message.delayPeriod = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IdentifiedConnection message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.connection.v1.IdentifiedConnection + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.connection.v1.IdentifiedConnection} IdentifiedConnection + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IdentifiedConnection.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IdentifiedConnection message. + * @function verify + * @memberof ibc.core.connection.v1.IdentifiedConnection + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IdentifiedConnection.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.clientId != null && message.hasOwnProperty("clientId")) + if (!$util.isString(message.clientId)) + return "clientId: string expected"; + if (message.versions != null && message.hasOwnProperty("versions")) { + if (!Array.isArray(message.versions)) + return "versions: array expected"; + for (let i = 0; i < message.versions.length; ++i) { + let error = $root.ibc.core.connection.v1.Version.verify(message.versions[i]); + if (error) + return "versions." + error; + } + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.counterparty != null && message.hasOwnProperty("counterparty")) { + let error = $root.ibc.core.connection.v1.Counterparty.verify(message.counterparty); + if (error) + return "counterparty." + error; + } + if (message.delayPeriod != null && message.hasOwnProperty("delayPeriod")) + if (!$util.isInteger(message.delayPeriod) && !(message.delayPeriod && $util.isInteger(message.delayPeriod.low) && $util.isInteger(message.delayPeriod.high))) + return "delayPeriod: integer|Long expected"; + return null; + }; + + /** + * Creates an IdentifiedConnection message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.connection.v1.IdentifiedConnection + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.connection.v1.IdentifiedConnection} IdentifiedConnection + */ + IdentifiedConnection.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.connection.v1.IdentifiedConnection) + return object; + let message = new $root.ibc.core.connection.v1.IdentifiedConnection(); + if (object.id != null) + message.id = String(object.id); + if (object.clientId != null) + message.clientId = String(object.clientId); + if (object.versions) { + if (!Array.isArray(object.versions)) + throw TypeError(".ibc.core.connection.v1.IdentifiedConnection.versions: array expected"); + message.versions = []; + for (let i = 0; i < object.versions.length; ++i) { + if (typeof object.versions[i] !== "object") + throw TypeError(".ibc.core.connection.v1.IdentifiedConnection.versions: object expected"); + message.versions[i] = $root.ibc.core.connection.v1.Version.fromObject(object.versions[i]); + } + } + switch (object.state) { + case "STATE_UNINITIALIZED_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "STATE_INIT": + case 1: + message.state = 1; + break; + case "STATE_TRYOPEN": + case 2: + message.state = 2; + break; + case "STATE_OPEN": + case 3: + message.state = 3; + break; + } + if (object.counterparty != null) { + if (typeof object.counterparty !== "object") + throw TypeError(".ibc.core.connection.v1.IdentifiedConnection.counterparty: object expected"); + message.counterparty = $root.ibc.core.connection.v1.Counterparty.fromObject(object.counterparty); + } + if (object.delayPeriod != null) + if ($util.Long) + (message.delayPeriod = $util.Long.fromValue(object.delayPeriod)).unsigned = true; + else if (typeof object.delayPeriod === "string") + message.delayPeriod = parseInt(object.delayPeriod, 10); + else if (typeof object.delayPeriod === "number") + message.delayPeriod = object.delayPeriod; + else if (typeof object.delayPeriod === "object") + message.delayPeriod = new $util.LongBits(object.delayPeriod.low >>> 0, object.delayPeriod.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from an IdentifiedConnection message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.connection.v1.IdentifiedConnection + * @static + * @param {ibc.core.connection.v1.IdentifiedConnection} message IdentifiedConnection + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IdentifiedConnection.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.versions = []; + if (options.defaults) { + object.id = ""; + object.clientId = ""; + object.state = options.enums === String ? "STATE_UNINITIALIZED_UNSPECIFIED" : 0; + object.counterparty = null; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.delayPeriod = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.delayPeriod = options.longs === String ? "0" : 0; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.clientId != null && message.hasOwnProperty("clientId")) + object.clientId = message.clientId; + if (message.versions && message.versions.length) { + object.versions = []; + for (let j = 0; j < message.versions.length; ++j) + object.versions[j] = $root.ibc.core.connection.v1.Version.toObject(message.versions[j], options); + } + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.ibc.core.connection.v1.State[message.state] : message.state; + if (message.counterparty != null && message.hasOwnProperty("counterparty")) + object.counterparty = $root.ibc.core.connection.v1.Counterparty.toObject(message.counterparty, options); + if (message.delayPeriod != null && message.hasOwnProperty("delayPeriod")) + if (typeof message.delayPeriod === "number") + object.delayPeriod = options.longs === String ? String(message.delayPeriod) : message.delayPeriod; + else + object.delayPeriod = options.longs === String ? $util.Long.prototype.toString.call(message.delayPeriod) : options.longs === Number ? new $util.LongBits(message.delayPeriod.low >>> 0, message.delayPeriod.high >>> 0).toNumber(true) : message.delayPeriod; + return object; + }; + + /** + * Converts this IdentifiedConnection to JSON. + * @function toJSON + * @memberof ibc.core.connection.v1.IdentifiedConnection + * @instance + * @returns {Object.} JSON object + */ + IdentifiedConnection.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return IdentifiedConnection; + })(v1.IdentifiedConnection || {}); + + /** + * State enum. + * @name ibc.core.connection.v1.State + * @enum {string} + * @property {number} STATE_UNINITIALIZED_UNSPECIFIED=0 STATE_UNINITIALIZED_UNSPECIFIED value + * @property {number} STATE_INIT=1 STATE_INIT value + * @property {number} STATE_TRYOPEN=2 STATE_TRYOPEN value + * @property {number} STATE_OPEN=3 STATE_OPEN value + */ + v1.State = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNINITIALIZED_UNSPECIFIED"] = 0; + values[valuesById[1] = "STATE_INIT"] = 1; + values[valuesById[2] = "STATE_TRYOPEN"] = 2; + values[valuesById[3] = "STATE_OPEN"] = 3; + return values; + })(); + + v1.Counterparty = (function(Counterparty) { + + /** + * Properties of a Counterparty. + * @memberof ibc.core.connection.v1 + * @interface ICounterparty + * @property {string|null} [clientId] Counterparty clientId + * @property {string|null} [connectionId] Counterparty connectionId + * @property {ibc.core.commitment.v1.IMerklePrefix|null} [prefix] Counterparty prefix + */ + + /** + * Constructs a new Counterparty. + * @memberof ibc.core.connection.v1 + * @classdesc Represents a Counterparty. + * @implements ICounterparty + * @constructor + * @param {ibc.core.connection.v1.ICounterparty=} [properties] Properties to set + */ + function Counterparty(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Counterparty clientId. + * @member {string} clientId + * @memberof ibc.core.connection.v1.Counterparty + * @instance + */ + Counterparty.prototype.clientId = ""; + + /** + * Counterparty connectionId. + * @member {string} connectionId + * @memberof ibc.core.connection.v1.Counterparty + * @instance + */ + Counterparty.prototype.connectionId = ""; + + /** + * Counterparty prefix. + * @member {ibc.core.commitment.v1.IMerklePrefix|null|undefined} prefix + * @memberof ibc.core.connection.v1.Counterparty + * @instance + */ + Counterparty.prototype.prefix = null; + + /** + * Creates a new Counterparty instance using the specified properties. + * @function create + * @memberof ibc.core.connection.v1.Counterparty + * @static + * @param {ibc.core.connection.v1.ICounterparty=} [properties] Properties to set + * @returns {ibc.core.connection.v1.Counterparty} Counterparty instance + */ + Counterparty.create = function create(properties) { + return new Counterparty(properties); + }; + + /** + * Encodes the specified Counterparty message. Does not implicitly {@link ibc.core.connection.v1.Counterparty.verify|verify} messages. + * @function encode + * @memberof ibc.core.connection.v1.Counterparty + * @static + * @param {ibc.core.connection.v1.ICounterparty} message Counterparty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Counterparty.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.clientId != null && Object.hasOwnProperty.call(message, "clientId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.clientId); + if (message.connectionId != null && Object.hasOwnProperty.call(message, "connectionId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.connectionId); + if (message.prefix != null && Object.hasOwnProperty.call(message, "prefix")) + $root.ibc.core.commitment.v1.MerklePrefix.encode(message.prefix, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Counterparty message, length delimited. Does not implicitly {@link ibc.core.connection.v1.Counterparty.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.connection.v1.Counterparty + * @static + * @param {ibc.core.connection.v1.ICounterparty} message Counterparty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Counterparty.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Counterparty message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.connection.v1.Counterparty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.connection.v1.Counterparty} Counterparty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Counterparty.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.connection.v1.Counterparty(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.clientId = reader.string(); + break; + case 2: + message.connectionId = reader.string(); + break; + case 3: + message.prefix = $root.ibc.core.commitment.v1.MerklePrefix.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Counterparty message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.connection.v1.Counterparty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.connection.v1.Counterparty} Counterparty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Counterparty.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Counterparty message. + * @function verify + * @memberof ibc.core.connection.v1.Counterparty + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Counterparty.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.clientId != null && message.hasOwnProperty("clientId")) + if (!$util.isString(message.clientId)) + return "clientId: string expected"; + if (message.connectionId != null && message.hasOwnProperty("connectionId")) + if (!$util.isString(message.connectionId)) + return "connectionId: string expected"; + if (message.prefix != null && message.hasOwnProperty("prefix")) { + let error = $root.ibc.core.commitment.v1.MerklePrefix.verify(message.prefix); + if (error) + return "prefix." + error; + } + return null; + }; + + /** + * Creates a Counterparty message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.connection.v1.Counterparty + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.connection.v1.Counterparty} Counterparty + */ + Counterparty.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.connection.v1.Counterparty) + return object; + let message = new $root.ibc.core.connection.v1.Counterparty(); + if (object.clientId != null) + message.clientId = String(object.clientId); + if (object.connectionId != null) + message.connectionId = String(object.connectionId); + if (object.prefix != null) { + if (typeof object.prefix !== "object") + throw TypeError(".ibc.core.connection.v1.Counterparty.prefix: object expected"); + message.prefix = $root.ibc.core.commitment.v1.MerklePrefix.fromObject(object.prefix); + } + return message; + }; + + /** + * Creates a plain object from a Counterparty message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.connection.v1.Counterparty + * @static + * @param {ibc.core.connection.v1.Counterparty} message Counterparty + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Counterparty.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.clientId = ""; + object.connectionId = ""; + object.prefix = null; + } + if (message.clientId != null && message.hasOwnProperty("clientId")) + object.clientId = message.clientId; + if (message.connectionId != null && message.hasOwnProperty("connectionId")) + object.connectionId = message.connectionId; + if (message.prefix != null && message.hasOwnProperty("prefix")) + object.prefix = $root.ibc.core.commitment.v1.MerklePrefix.toObject(message.prefix, options); + return object; + }; + + /** + * Converts this Counterparty to JSON. + * @function toJSON + * @memberof ibc.core.connection.v1.Counterparty + * @instance + * @returns {Object.} JSON object + */ + Counterparty.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Counterparty; + })(v1.Counterparty || {}); + + v1.ClientPaths = (function(ClientPaths) { + + /** + * Properties of a ClientPaths. + * @memberof ibc.core.connection.v1 + * @interface IClientPaths + * @property {Array.|null} [paths] ClientPaths paths + */ + + /** + * Constructs a new ClientPaths. + * @memberof ibc.core.connection.v1 + * @classdesc Represents a ClientPaths. + * @implements IClientPaths + * @constructor + * @param {ibc.core.connection.v1.IClientPaths=} [properties] Properties to set + */ + function ClientPaths(properties) { + this.paths = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ClientPaths paths. + * @member {Array.} paths + * @memberof ibc.core.connection.v1.ClientPaths + * @instance + */ + ClientPaths.prototype.paths = $util.emptyArray; + + /** + * Creates a new ClientPaths instance using the specified properties. + * @function create + * @memberof ibc.core.connection.v1.ClientPaths + * @static + * @param {ibc.core.connection.v1.IClientPaths=} [properties] Properties to set + * @returns {ibc.core.connection.v1.ClientPaths} ClientPaths instance + */ + ClientPaths.create = function create(properties) { + return new ClientPaths(properties); + }; + + /** + * Encodes the specified ClientPaths message. Does not implicitly {@link ibc.core.connection.v1.ClientPaths.verify|verify} messages. + * @function encode + * @memberof ibc.core.connection.v1.ClientPaths + * @static + * @param {ibc.core.connection.v1.IClientPaths} message ClientPaths message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientPaths.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.paths != null && message.paths.length) + for (let i = 0; i < message.paths.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.paths[i]); + return writer; + }; + + /** + * Encodes the specified ClientPaths message, length delimited. Does not implicitly {@link ibc.core.connection.v1.ClientPaths.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.connection.v1.ClientPaths + * @static + * @param {ibc.core.connection.v1.IClientPaths} message ClientPaths message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientPaths.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ClientPaths message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.connection.v1.ClientPaths + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.connection.v1.ClientPaths} ClientPaths + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientPaths.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.connection.v1.ClientPaths(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ClientPaths message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.connection.v1.ClientPaths + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.connection.v1.ClientPaths} ClientPaths + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientPaths.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ClientPaths message. + * @function verify + * @memberof ibc.core.connection.v1.ClientPaths + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ClientPaths.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.paths != null && message.hasOwnProperty("paths")) { + if (!Array.isArray(message.paths)) + return "paths: array expected"; + for (let i = 0; i < message.paths.length; ++i) + if (!$util.isString(message.paths[i])) + return "paths: string[] expected"; + } + return null; + }; + + /** + * Creates a ClientPaths message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.connection.v1.ClientPaths + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.connection.v1.ClientPaths} ClientPaths + */ + ClientPaths.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.connection.v1.ClientPaths) + return object; + let message = new $root.ibc.core.connection.v1.ClientPaths(); + if (object.paths) { + if (!Array.isArray(object.paths)) + throw TypeError(".ibc.core.connection.v1.ClientPaths.paths: array expected"); + message.paths = []; + for (let i = 0; i < object.paths.length; ++i) + message.paths[i] = String(object.paths[i]); + } + return message; + }; + + /** + * Creates a plain object from a ClientPaths message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.connection.v1.ClientPaths + * @static + * @param {ibc.core.connection.v1.ClientPaths} message ClientPaths + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ClientPaths.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.paths = []; + if (message.paths && message.paths.length) { + object.paths = []; + for (let j = 0; j < message.paths.length; ++j) + object.paths[j] = message.paths[j]; + } + return object; + }; + + /** + * Converts this ClientPaths to JSON. + * @function toJSON + * @memberof ibc.core.connection.v1.ClientPaths + * @instance + * @returns {Object.} JSON object + */ + ClientPaths.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ClientPaths; + })(v1.ClientPaths || {}); + + v1.ConnectionPaths = (function(ConnectionPaths) { + + /** + * Properties of a ConnectionPaths. + * @memberof ibc.core.connection.v1 + * @interface IConnectionPaths + * @property {string|null} [clientId] ConnectionPaths clientId + * @property {Array.|null} [paths] ConnectionPaths paths + */ + + /** + * Constructs a new ConnectionPaths. + * @memberof ibc.core.connection.v1 + * @classdesc Represents a ConnectionPaths. + * @implements IConnectionPaths + * @constructor + * @param {ibc.core.connection.v1.IConnectionPaths=} [properties] Properties to set + */ + function ConnectionPaths(properties) { + this.paths = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ConnectionPaths clientId. + * @member {string} clientId + * @memberof ibc.core.connection.v1.ConnectionPaths + * @instance + */ + ConnectionPaths.prototype.clientId = ""; + + /** + * ConnectionPaths paths. + * @member {Array.} paths + * @memberof ibc.core.connection.v1.ConnectionPaths + * @instance + */ + ConnectionPaths.prototype.paths = $util.emptyArray; + + /** + * Creates a new ConnectionPaths instance using the specified properties. + * @function create + * @memberof ibc.core.connection.v1.ConnectionPaths + * @static + * @param {ibc.core.connection.v1.IConnectionPaths=} [properties] Properties to set + * @returns {ibc.core.connection.v1.ConnectionPaths} ConnectionPaths instance + */ + ConnectionPaths.create = function create(properties) { + return new ConnectionPaths(properties); + }; + + /** + * Encodes the specified ConnectionPaths message. Does not implicitly {@link ibc.core.connection.v1.ConnectionPaths.verify|verify} messages. + * @function encode + * @memberof ibc.core.connection.v1.ConnectionPaths + * @static + * @param {ibc.core.connection.v1.IConnectionPaths} message ConnectionPaths message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConnectionPaths.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.clientId != null && Object.hasOwnProperty.call(message, "clientId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.clientId); + if (message.paths != null && message.paths.length) + for (let i = 0; i < message.paths.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.paths[i]); + return writer; + }; + + /** + * Encodes the specified ConnectionPaths message, length delimited. Does not implicitly {@link ibc.core.connection.v1.ConnectionPaths.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.connection.v1.ConnectionPaths + * @static + * @param {ibc.core.connection.v1.IConnectionPaths} message ConnectionPaths message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConnectionPaths.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConnectionPaths message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.connection.v1.ConnectionPaths + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.connection.v1.ConnectionPaths} ConnectionPaths + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConnectionPaths.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.connection.v1.ConnectionPaths(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.clientId = reader.string(); + break; + case 2: + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ConnectionPaths message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.connection.v1.ConnectionPaths + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.connection.v1.ConnectionPaths} ConnectionPaths + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConnectionPaths.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConnectionPaths message. + * @function verify + * @memberof ibc.core.connection.v1.ConnectionPaths + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConnectionPaths.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.clientId != null && message.hasOwnProperty("clientId")) + if (!$util.isString(message.clientId)) + return "clientId: string expected"; + if (message.paths != null && message.hasOwnProperty("paths")) { + if (!Array.isArray(message.paths)) + return "paths: array expected"; + for (let i = 0; i < message.paths.length; ++i) + if (!$util.isString(message.paths[i])) + return "paths: string[] expected"; + } + return null; + }; + + /** + * Creates a ConnectionPaths message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.connection.v1.ConnectionPaths + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.connection.v1.ConnectionPaths} ConnectionPaths + */ + ConnectionPaths.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.connection.v1.ConnectionPaths) + return object; + let message = new $root.ibc.core.connection.v1.ConnectionPaths(); + if (object.clientId != null) + message.clientId = String(object.clientId); + if (object.paths) { + if (!Array.isArray(object.paths)) + throw TypeError(".ibc.core.connection.v1.ConnectionPaths.paths: array expected"); + message.paths = []; + for (let i = 0; i < object.paths.length; ++i) + message.paths[i] = String(object.paths[i]); + } + return message; + }; + + /** + * Creates a plain object from a ConnectionPaths message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.connection.v1.ConnectionPaths + * @static + * @param {ibc.core.connection.v1.ConnectionPaths} message ConnectionPaths + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConnectionPaths.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.paths = []; + if (options.defaults) + object.clientId = ""; + if (message.clientId != null && message.hasOwnProperty("clientId")) + object.clientId = message.clientId; + if (message.paths && message.paths.length) { + object.paths = []; + for (let j = 0; j < message.paths.length; ++j) + object.paths[j] = message.paths[j]; + } + return object; + }; + + /** + * Converts this ConnectionPaths to JSON. + * @function toJSON + * @memberof ibc.core.connection.v1.ConnectionPaths + * @instance + * @returns {Object.} JSON object + */ + ConnectionPaths.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ConnectionPaths; + })(v1.ConnectionPaths || {}); + + v1.Version = (function(Version) { + + /** + * Properties of a Version. + * @memberof ibc.core.connection.v1 + * @interface IVersion + * @property {string|null} [identifier] Version identifier + * @property {Array.|null} [features] Version features + */ + + /** + * Constructs a new Version. + * @memberof ibc.core.connection.v1 + * @classdesc Represents a Version. + * @implements IVersion + * @constructor + * @param {ibc.core.connection.v1.IVersion=} [properties] Properties to set + */ + function Version(properties) { + this.features = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Version identifier. + * @member {string} identifier + * @memberof ibc.core.connection.v1.Version + * @instance + */ + Version.prototype.identifier = ""; + + /** + * Version features. + * @member {Array.} features + * @memberof ibc.core.connection.v1.Version + * @instance + */ + Version.prototype.features = $util.emptyArray; + + /** + * Creates a new Version instance using the specified properties. + * @function create + * @memberof ibc.core.connection.v1.Version + * @static + * @param {ibc.core.connection.v1.IVersion=} [properties] Properties to set + * @returns {ibc.core.connection.v1.Version} Version instance + */ + Version.create = function create(properties) { + return new Version(properties); + }; + + /** + * Encodes the specified Version message. Does not implicitly {@link ibc.core.connection.v1.Version.verify|verify} messages. + * @function encode + * @memberof ibc.core.connection.v1.Version + * @static + * @param {ibc.core.connection.v1.IVersion} message Version message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Version.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.identifier != null && Object.hasOwnProperty.call(message, "identifier")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.identifier); + if (message.features != null && message.features.length) + for (let i = 0; i < message.features.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.features[i]); + return writer; + }; + + /** + * Encodes the specified Version message, length delimited. Does not implicitly {@link ibc.core.connection.v1.Version.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.connection.v1.Version + * @static + * @param {ibc.core.connection.v1.IVersion} message Version message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Version.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Version message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.connection.v1.Version + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.connection.v1.Version} Version + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Version.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.connection.v1.Version(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.identifier = reader.string(); + break; + case 2: + if (!(message.features && message.features.length)) + message.features = []; + message.features.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Version message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.connection.v1.Version + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.connection.v1.Version} Version + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Version.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Version message. + * @function verify + * @memberof ibc.core.connection.v1.Version + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Version.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.identifier != null && message.hasOwnProperty("identifier")) + if (!$util.isString(message.identifier)) + return "identifier: string expected"; + if (message.features != null && message.hasOwnProperty("features")) { + if (!Array.isArray(message.features)) + return "features: array expected"; + for (let i = 0; i < message.features.length; ++i) + if (!$util.isString(message.features[i])) + return "features: string[] expected"; + } + return null; + }; + + /** + * Creates a Version message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.connection.v1.Version + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.connection.v1.Version} Version + */ + Version.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.connection.v1.Version) + return object; + let message = new $root.ibc.core.connection.v1.Version(); + if (object.identifier != null) + message.identifier = String(object.identifier); + if (object.features) { + if (!Array.isArray(object.features)) + throw TypeError(".ibc.core.connection.v1.Version.features: array expected"); + message.features = []; + for (let i = 0; i < object.features.length; ++i) + message.features[i] = String(object.features[i]); + } + return message; + }; + + /** + * Creates a plain object from a Version message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.connection.v1.Version + * @static + * @param {ibc.core.connection.v1.Version} message Version + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Version.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.features = []; + if (options.defaults) + object.identifier = ""; + if (message.identifier != null && message.hasOwnProperty("identifier")) + object.identifier = message.identifier; + if (message.features && message.features.length) { + object.features = []; + for (let j = 0; j < message.features.length; ++j) + object.features[j] = message.features[j]; + } + return object; + }; + + /** + * Converts this Version to JSON. + * @function toJSON + * @memberof ibc.core.connection.v1.Version + * @instance + * @returns {Object.} JSON object + */ + Version.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Version; + })(v1.Version || {}); + + v1.GenesisState = (function(GenesisState) { + + /** + * Properties of a GenesisState. + * @memberof ibc.core.connection.v1 + * @interface IGenesisState + * @property {Array.|null} [connections] GenesisState connections + * @property {Array.|null} [clientConnectionPaths] GenesisState clientConnectionPaths + * @property {number|Long|null} [nextConnectionSequence] GenesisState nextConnectionSequence + */ + + /** + * Constructs a new GenesisState. + * @memberof ibc.core.connection.v1 + * @classdesc Represents a GenesisState. + * @implements IGenesisState + * @constructor + * @param {ibc.core.connection.v1.IGenesisState=} [properties] Properties to set + */ + function GenesisState(properties) { + this.connections = []; + this.clientConnectionPaths = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GenesisState connections. + * @member {Array.} connections + * @memberof ibc.core.connection.v1.GenesisState + * @instance + */ + GenesisState.prototype.connections = $util.emptyArray; + + /** + * GenesisState clientConnectionPaths. + * @member {Array.} clientConnectionPaths + * @memberof ibc.core.connection.v1.GenesisState + * @instance + */ + GenesisState.prototype.clientConnectionPaths = $util.emptyArray; + + /** + * GenesisState nextConnectionSequence. + * @member {number|Long} nextConnectionSequence + * @memberof ibc.core.connection.v1.GenesisState + * @instance + */ + GenesisState.prototype.nextConnectionSequence = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new GenesisState instance using the specified properties. + * @function create + * @memberof ibc.core.connection.v1.GenesisState + * @static + * @param {ibc.core.connection.v1.IGenesisState=} [properties] Properties to set + * @returns {ibc.core.connection.v1.GenesisState} GenesisState instance + */ + GenesisState.create = function create(properties) { + return new GenesisState(properties); + }; + + /** + * Encodes the specified GenesisState message. Does not implicitly {@link ibc.core.connection.v1.GenesisState.verify|verify} messages. + * @function encode + * @memberof ibc.core.connection.v1.GenesisState + * @static + * @param {ibc.core.connection.v1.IGenesisState} message GenesisState message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenesisState.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.connections != null && message.connections.length) + for (let i = 0; i < message.connections.length; ++i) + $root.ibc.core.connection.v1.IdentifiedConnection.encode(message.connections[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.clientConnectionPaths != null && message.clientConnectionPaths.length) + for (let i = 0; i < message.clientConnectionPaths.length; ++i) + $root.ibc.core.connection.v1.ConnectionPaths.encode(message.clientConnectionPaths[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.nextConnectionSequence != null && Object.hasOwnProperty.call(message, "nextConnectionSequence")) + writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.nextConnectionSequence); + return writer; + }; + + /** + * Encodes the specified GenesisState message, length delimited. Does not implicitly {@link ibc.core.connection.v1.GenesisState.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.connection.v1.GenesisState + * @static + * @param {ibc.core.connection.v1.IGenesisState} message GenesisState message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenesisState.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GenesisState message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.connection.v1.GenesisState + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.connection.v1.GenesisState} GenesisState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenesisState.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.connection.v1.GenesisState(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.connections && message.connections.length)) + message.connections = []; + message.connections.push($root.ibc.core.connection.v1.IdentifiedConnection.decode(reader, reader.uint32())); + break; + case 2: + if (!(message.clientConnectionPaths && message.clientConnectionPaths.length)) + message.clientConnectionPaths = []; + message.clientConnectionPaths.push($root.ibc.core.connection.v1.ConnectionPaths.decode(reader, reader.uint32())); + break; + case 3: + message.nextConnectionSequence = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GenesisState message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.connection.v1.GenesisState + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.connection.v1.GenesisState} GenesisState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenesisState.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GenesisState message. + * @function verify + * @memberof ibc.core.connection.v1.GenesisState + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GenesisState.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.connections != null && message.hasOwnProperty("connections")) { + if (!Array.isArray(message.connections)) + return "connections: array expected"; + for (let i = 0; i < message.connections.length; ++i) { + let error = $root.ibc.core.connection.v1.IdentifiedConnection.verify(message.connections[i]); + if (error) + return "connections." + error; + } + } + if (message.clientConnectionPaths != null && message.hasOwnProperty("clientConnectionPaths")) { + if (!Array.isArray(message.clientConnectionPaths)) + return "clientConnectionPaths: array expected"; + for (let i = 0; i < message.clientConnectionPaths.length; ++i) { + let error = $root.ibc.core.connection.v1.ConnectionPaths.verify(message.clientConnectionPaths[i]); + if (error) + return "clientConnectionPaths." + error; + } + } + if (message.nextConnectionSequence != null && message.hasOwnProperty("nextConnectionSequence")) + if (!$util.isInteger(message.nextConnectionSequence) && !(message.nextConnectionSequence && $util.isInteger(message.nextConnectionSequence.low) && $util.isInteger(message.nextConnectionSequence.high))) + return "nextConnectionSequence: integer|Long expected"; + return null; + }; + + /** + * Creates a GenesisState message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.connection.v1.GenesisState + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.connection.v1.GenesisState} GenesisState + */ + GenesisState.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.connection.v1.GenesisState) + return object; + let message = new $root.ibc.core.connection.v1.GenesisState(); + if (object.connections) { + if (!Array.isArray(object.connections)) + throw TypeError(".ibc.core.connection.v1.GenesisState.connections: array expected"); + message.connections = []; + for (let i = 0; i < object.connections.length; ++i) { + if (typeof object.connections[i] !== "object") + throw TypeError(".ibc.core.connection.v1.GenesisState.connections: object expected"); + message.connections[i] = $root.ibc.core.connection.v1.IdentifiedConnection.fromObject(object.connections[i]); + } + } + if (object.clientConnectionPaths) { + if (!Array.isArray(object.clientConnectionPaths)) + throw TypeError(".ibc.core.connection.v1.GenesisState.clientConnectionPaths: array expected"); + message.clientConnectionPaths = []; + for (let i = 0; i < object.clientConnectionPaths.length; ++i) { + if (typeof object.clientConnectionPaths[i] !== "object") + throw TypeError(".ibc.core.connection.v1.GenesisState.clientConnectionPaths: object expected"); + message.clientConnectionPaths[i] = $root.ibc.core.connection.v1.ConnectionPaths.fromObject(object.clientConnectionPaths[i]); + } + } + if (object.nextConnectionSequence != null) + if ($util.Long) + (message.nextConnectionSequence = $util.Long.fromValue(object.nextConnectionSequence)).unsigned = true; + else if (typeof object.nextConnectionSequence === "string") + message.nextConnectionSequence = parseInt(object.nextConnectionSequence, 10); + else if (typeof object.nextConnectionSequence === "number") + message.nextConnectionSequence = object.nextConnectionSequence; + else if (typeof object.nextConnectionSequence === "object") + message.nextConnectionSequence = new $util.LongBits(object.nextConnectionSequence.low >>> 0, object.nextConnectionSequence.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a GenesisState message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.connection.v1.GenesisState + * @static + * @param {ibc.core.connection.v1.GenesisState} message GenesisState + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GenesisState.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) { + object.connections = []; + object.clientConnectionPaths = []; + } + if (options.defaults) + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.nextConnectionSequence = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.nextConnectionSequence = options.longs === String ? "0" : 0; + if (message.connections && message.connections.length) { + object.connections = []; + for (let j = 0; j < message.connections.length; ++j) + object.connections[j] = $root.ibc.core.connection.v1.IdentifiedConnection.toObject(message.connections[j], options); + } + if (message.clientConnectionPaths && message.clientConnectionPaths.length) { + object.clientConnectionPaths = []; + for (let j = 0; j < message.clientConnectionPaths.length; ++j) + object.clientConnectionPaths[j] = $root.ibc.core.connection.v1.ConnectionPaths.toObject(message.clientConnectionPaths[j], options); + } + if (message.nextConnectionSequence != null && message.hasOwnProperty("nextConnectionSequence")) + if (typeof message.nextConnectionSequence === "number") + object.nextConnectionSequence = options.longs === String ? String(message.nextConnectionSequence) : message.nextConnectionSequence; + else + object.nextConnectionSequence = options.longs === String ? $util.Long.prototype.toString.call(message.nextConnectionSequence) : options.longs === Number ? new $util.LongBits(message.nextConnectionSequence.low >>> 0, message.nextConnectionSequence.high >>> 0).toNumber(true) : message.nextConnectionSequence; + return object; + }; + + /** + * Converts this GenesisState to JSON. + * @function toJSON + * @memberof ibc.core.connection.v1.GenesisState + * @instance + * @returns {Object.} JSON object + */ + GenesisState.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GenesisState; + })(v1.GenesisState || {}); + + v1.Query = (function(Query) { + + /** + * Constructs a new Query service. + * @memberof ibc.core.connection.v1 + * @classdesc Represents a Query + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Query(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Query.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Query; + + /** + * Creates new Query service using the specified rpc implementation. + * @function create + * @memberof ibc.core.connection.v1.Query + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Query} RPC service. Useful where requests and/or responses are streamed. + */ + Query.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link ibc.core.connection.v1.Query#connection}. + * @memberof ibc.core.connection.v1.Query + * @typedef ConnectionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {ibc.core.connection.v1.IQueryConnectionResponse} [response] QueryConnectionResponse + */ + + /** + * Calls Connection. + * @function connection + * @memberof ibc.core.connection.v1.Query + * @instance + * @param {ibc.core.connection.v1.IQueryConnectionRequest} request QueryConnectionRequest message or plain object + * @param {ibc.core.connection.v1.Query.ConnectionCallback} callback Node-style callback called with the error, if any, and QueryConnectionResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.connection = function connection(request, callback) { + return this.rpcCall(connection, $root.ibc.core.connection.v1.QueryConnectionRequest, $root.ibc.core.connection.v1.QueryConnectionResponse, request, callback); + }, "name", { value: "Connection" }); + + /** + * Calls Connection. + * @function connection + * @memberof ibc.core.connection.v1.Query + * @instance + * @param {ibc.core.connection.v1.IQueryConnectionRequest} request QueryConnectionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link ibc.core.connection.v1.Query#connections}. + * @memberof ibc.core.connection.v1.Query + * @typedef ConnectionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {ibc.core.connection.v1.IQueryConnectionsResponse} [response] QueryConnectionsResponse + */ + + /** + * Calls Connections. + * @function connections + * @memberof ibc.core.connection.v1.Query + * @instance + * @param {ibc.core.connection.v1.IQueryConnectionsRequest} request QueryConnectionsRequest message or plain object + * @param {ibc.core.connection.v1.Query.ConnectionsCallback} callback Node-style callback called with the error, if any, and QueryConnectionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.connections = function connections(request, callback) { + return this.rpcCall(connections, $root.ibc.core.connection.v1.QueryConnectionsRequest, $root.ibc.core.connection.v1.QueryConnectionsResponse, request, callback); + }, "name", { value: "Connections" }); + + /** + * Calls Connections. + * @function connections + * @memberof ibc.core.connection.v1.Query + * @instance + * @param {ibc.core.connection.v1.IQueryConnectionsRequest} request QueryConnectionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link ibc.core.connection.v1.Query#clientConnections}. + * @memberof ibc.core.connection.v1.Query + * @typedef ClientConnectionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {ibc.core.connection.v1.IQueryClientConnectionsResponse} [response] QueryClientConnectionsResponse + */ + + /** + * Calls ClientConnections. + * @function clientConnections + * @memberof ibc.core.connection.v1.Query + * @instance + * @param {ibc.core.connection.v1.IQueryClientConnectionsRequest} request QueryClientConnectionsRequest message or plain object + * @param {ibc.core.connection.v1.Query.ClientConnectionsCallback} callback Node-style callback called with the error, if any, and QueryClientConnectionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.clientConnections = function clientConnections(request, callback) { + return this.rpcCall(clientConnections, $root.ibc.core.connection.v1.QueryClientConnectionsRequest, $root.ibc.core.connection.v1.QueryClientConnectionsResponse, request, callback); + }, "name", { value: "ClientConnections" }); + + /** + * Calls ClientConnections. + * @function clientConnections + * @memberof ibc.core.connection.v1.Query + * @instance + * @param {ibc.core.connection.v1.IQueryClientConnectionsRequest} request QueryClientConnectionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link ibc.core.connection.v1.Query#connectionClientState}. + * @memberof ibc.core.connection.v1.Query + * @typedef ConnectionClientStateCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {ibc.core.connection.v1.IQueryConnectionClientStateResponse} [response] QueryConnectionClientStateResponse + */ + + /** + * Calls ConnectionClientState. + * @function connectionClientState + * @memberof ibc.core.connection.v1.Query + * @instance + * @param {ibc.core.connection.v1.IQueryConnectionClientStateRequest} request QueryConnectionClientStateRequest message or plain object + * @param {ibc.core.connection.v1.Query.ConnectionClientStateCallback} callback Node-style callback called with the error, if any, and QueryConnectionClientStateResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.connectionClientState = function connectionClientState(request, callback) { + return this.rpcCall(connectionClientState, $root.ibc.core.connection.v1.QueryConnectionClientStateRequest, $root.ibc.core.connection.v1.QueryConnectionClientStateResponse, request, callback); + }, "name", { value: "ConnectionClientState" }); + + /** + * Calls ConnectionClientState. + * @function connectionClientState + * @memberof ibc.core.connection.v1.Query + * @instance + * @param {ibc.core.connection.v1.IQueryConnectionClientStateRequest} request QueryConnectionClientStateRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link ibc.core.connection.v1.Query#connectionConsensusState}. + * @memberof ibc.core.connection.v1.Query + * @typedef ConnectionConsensusStateCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {ibc.core.connection.v1.IQueryConnectionConsensusStateResponse} [response] QueryConnectionConsensusStateResponse + */ + + /** + * Calls ConnectionConsensusState. + * @function connectionConsensusState + * @memberof ibc.core.connection.v1.Query + * @instance + * @param {ibc.core.connection.v1.IQueryConnectionConsensusStateRequest} request QueryConnectionConsensusStateRequest message or plain object + * @param {ibc.core.connection.v1.Query.ConnectionConsensusStateCallback} callback Node-style callback called with the error, if any, and QueryConnectionConsensusStateResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.connectionConsensusState = function connectionConsensusState(request, callback) { + return this.rpcCall(connectionConsensusState, $root.ibc.core.connection.v1.QueryConnectionConsensusStateRequest, $root.ibc.core.connection.v1.QueryConnectionConsensusStateResponse, request, callback); + }, "name", { value: "ConnectionConsensusState" }); + + /** + * Calls ConnectionConsensusState. + * @function connectionConsensusState + * @memberof ibc.core.connection.v1.Query + * @instance + * @param {ibc.core.connection.v1.IQueryConnectionConsensusStateRequest} request QueryConnectionConsensusStateRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Query; + })(v1.Query || {}); + + v1.QueryConnectionRequest = (function(QueryConnectionRequest) { + + /** + * Properties of a QueryConnectionRequest. + * @memberof ibc.core.connection.v1 + * @interface IQueryConnectionRequest + * @property {string|null} [connectionId] QueryConnectionRequest connectionId + */ + + /** + * Constructs a new QueryConnectionRequest. + * @memberof ibc.core.connection.v1 + * @classdesc Represents a QueryConnectionRequest. + * @implements IQueryConnectionRequest + * @constructor + * @param {ibc.core.connection.v1.IQueryConnectionRequest=} [properties] Properties to set + */ + function QueryConnectionRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryConnectionRequest connectionId. + * @member {string} connectionId + * @memberof ibc.core.connection.v1.QueryConnectionRequest + * @instance + */ + QueryConnectionRequest.prototype.connectionId = ""; + + /** + * Creates a new QueryConnectionRequest instance using the specified properties. + * @function create + * @memberof ibc.core.connection.v1.QueryConnectionRequest + * @static + * @param {ibc.core.connection.v1.IQueryConnectionRequest=} [properties] Properties to set + * @returns {ibc.core.connection.v1.QueryConnectionRequest} QueryConnectionRequest instance + */ + QueryConnectionRequest.create = function create(properties) { + return new QueryConnectionRequest(properties); + }; + + /** + * Encodes the specified QueryConnectionRequest message. Does not implicitly {@link ibc.core.connection.v1.QueryConnectionRequest.verify|verify} messages. + * @function encode + * @memberof ibc.core.connection.v1.QueryConnectionRequest + * @static + * @param {ibc.core.connection.v1.IQueryConnectionRequest} message QueryConnectionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryConnectionRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.connectionId != null && Object.hasOwnProperty.call(message, "connectionId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.connectionId); + return writer; + }; + + /** + * Encodes the specified QueryConnectionRequest message, length delimited. Does not implicitly {@link ibc.core.connection.v1.QueryConnectionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.connection.v1.QueryConnectionRequest + * @static + * @param {ibc.core.connection.v1.IQueryConnectionRequest} message QueryConnectionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryConnectionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryConnectionRequest message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.connection.v1.QueryConnectionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.connection.v1.QueryConnectionRequest} QueryConnectionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryConnectionRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.connection.v1.QueryConnectionRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.connectionId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryConnectionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.connection.v1.QueryConnectionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.connection.v1.QueryConnectionRequest} QueryConnectionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryConnectionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryConnectionRequest message. + * @function verify + * @memberof ibc.core.connection.v1.QueryConnectionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryConnectionRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.connectionId != null && message.hasOwnProperty("connectionId")) + if (!$util.isString(message.connectionId)) + return "connectionId: string expected"; + return null; + }; + + /** + * Creates a QueryConnectionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.connection.v1.QueryConnectionRequest + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.connection.v1.QueryConnectionRequest} QueryConnectionRequest + */ + QueryConnectionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.connection.v1.QueryConnectionRequest) + return object; + let message = new $root.ibc.core.connection.v1.QueryConnectionRequest(); + if (object.connectionId != null) + message.connectionId = String(object.connectionId); + return message; + }; + + /** + * Creates a plain object from a QueryConnectionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.connection.v1.QueryConnectionRequest + * @static + * @param {ibc.core.connection.v1.QueryConnectionRequest} message QueryConnectionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryConnectionRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.connectionId = ""; + if (message.connectionId != null && message.hasOwnProperty("connectionId")) + object.connectionId = message.connectionId; + return object; + }; + + /** + * Converts this QueryConnectionRequest to JSON. + * @function toJSON + * @memberof ibc.core.connection.v1.QueryConnectionRequest + * @instance + * @returns {Object.} JSON object + */ + QueryConnectionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryConnectionRequest; + })(v1.QueryConnectionRequest || {}); + + v1.QueryConnectionResponse = (function(QueryConnectionResponse) { + + /** + * Properties of a QueryConnectionResponse. + * @memberof ibc.core.connection.v1 + * @interface IQueryConnectionResponse + * @property {ibc.core.connection.v1.IConnectionEnd|null} [connection] QueryConnectionResponse connection + * @property {Uint8Array|null} [proof] QueryConnectionResponse proof + * @property {ibc.core.client.v1.IHeight|null} [proofHeight] QueryConnectionResponse proofHeight + */ + + /** + * Constructs a new QueryConnectionResponse. + * @memberof ibc.core.connection.v1 + * @classdesc Represents a QueryConnectionResponse. + * @implements IQueryConnectionResponse + * @constructor + * @param {ibc.core.connection.v1.IQueryConnectionResponse=} [properties] Properties to set + */ + function QueryConnectionResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryConnectionResponse connection. + * @member {ibc.core.connection.v1.IConnectionEnd|null|undefined} connection + * @memberof ibc.core.connection.v1.QueryConnectionResponse + * @instance + */ + QueryConnectionResponse.prototype.connection = null; + + /** + * QueryConnectionResponse proof. + * @member {Uint8Array} proof + * @memberof ibc.core.connection.v1.QueryConnectionResponse + * @instance + */ + QueryConnectionResponse.prototype.proof = $util.newBuffer([]); + + /** + * QueryConnectionResponse proofHeight. + * @member {ibc.core.client.v1.IHeight|null|undefined} proofHeight + * @memberof ibc.core.connection.v1.QueryConnectionResponse + * @instance + */ + QueryConnectionResponse.prototype.proofHeight = null; + + /** + * Creates a new QueryConnectionResponse instance using the specified properties. + * @function create + * @memberof ibc.core.connection.v1.QueryConnectionResponse + * @static + * @param {ibc.core.connection.v1.IQueryConnectionResponse=} [properties] Properties to set + * @returns {ibc.core.connection.v1.QueryConnectionResponse} QueryConnectionResponse instance + */ + QueryConnectionResponse.create = function create(properties) { + return new QueryConnectionResponse(properties); + }; + + /** + * Encodes the specified QueryConnectionResponse message. Does not implicitly {@link ibc.core.connection.v1.QueryConnectionResponse.verify|verify} messages. + * @function encode + * @memberof ibc.core.connection.v1.QueryConnectionResponse + * @static + * @param {ibc.core.connection.v1.IQueryConnectionResponse} message QueryConnectionResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryConnectionResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.connection != null && Object.hasOwnProperty.call(message, "connection")) + $root.ibc.core.connection.v1.ConnectionEnd.encode(message.connection, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.proof != null && Object.hasOwnProperty.call(message, "proof")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.proof); + if (message.proofHeight != null && Object.hasOwnProperty.call(message, "proofHeight")) + $root.ibc.core.client.v1.Height.encode(message.proofHeight, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryConnectionResponse message, length delimited. Does not implicitly {@link ibc.core.connection.v1.QueryConnectionResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.connection.v1.QueryConnectionResponse + * @static + * @param {ibc.core.connection.v1.IQueryConnectionResponse} message QueryConnectionResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryConnectionResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryConnectionResponse message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.connection.v1.QueryConnectionResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.connection.v1.QueryConnectionResponse} QueryConnectionResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryConnectionResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.connection.v1.QueryConnectionResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.connection = $root.ibc.core.connection.v1.ConnectionEnd.decode(reader, reader.uint32()); + break; + case 2: + message.proof = reader.bytes(); + break; + case 3: + message.proofHeight = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryConnectionResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.connection.v1.QueryConnectionResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.connection.v1.QueryConnectionResponse} QueryConnectionResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryConnectionResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryConnectionResponse message. + * @function verify + * @memberof ibc.core.connection.v1.QueryConnectionResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryConnectionResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.connection != null && message.hasOwnProperty("connection")) { + let error = $root.ibc.core.connection.v1.ConnectionEnd.verify(message.connection); + if (error) + return "connection." + error; + } + if (message.proof != null && message.hasOwnProperty("proof")) + if (!(message.proof && typeof message.proof.length === "number" || $util.isString(message.proof))) + return "proof: buffer expected"; + if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) { + let error = $root.ibc.core.client.v1.Height.verify(message.proofHeight); + if (error) + return "proofHeight." + error; + } + return null; + }; + + /** + * Creates a QueryConnectionResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.connection.v1.QueryConnectionResponse + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.connection.v1.QueryConnectionResponse} QueryConnectionResponse + */ + QueryConnectionResponse.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.connection.v1.QueryConnectionResponse) + return object; + let message = new $root.ibc.core.connection.v1.QueryConnectionResponse(); + if (object.connection != null) { + if (typeof object.connection !== "object") + throw TypeError(".ibc.core.connection.v1.QueryConnectionResponse.connection: object expected"); + message.connection = $root.ibc.core.connection.v1.ConnectionEnd.fromObject(object.connection); + } + if (object.proof != null) + if (typeof object.proof === "string") + $util.base64.decode(object.proof, message.proof = $util.newBuffer($util.base64.length(object.proof)), 0); + else if (object.proof.length) + message.proof = object.proof; + if (object.proofHeight != null) { + if (typeof object.proofHeight !== "object") + throw TypeError(".ibc.core.connection.v1.QueryConnectionResponse.proofHeight: object expected"); + message.proofHeight = $root.ibc.core.client.v1.Height.fromObject(object.proofHeight); + } + return message; + }; + + /** + * Creates a plain object from a QueryConnectionResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.connection.v1.QueryConnectionResponse + * @static + * @param {ibc.core.connection.v1.QueryConnectionResponse} message QueryConnectionResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryConnectionResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.connection = null; + if (options.bytes === String) + object.proof = ""; + else { + object.proof = []; + if (options.bytes !== Array) + object.proof = $util.newBuffer(object.proof); + } + object.proofHeight = null; + } + if (message.connection != null && message.hasOwnProperty("connection")) + object.connection = $root.ibc.core.connection.v1.ConnectionEnd.toObject(message.connection, options); + if (message.proof != null && message.hasOwnProperty("proof")) + object.proof = options.bytes === String ? $util.base64.encode(message.proof, 0, message.proof.length) : options.bytes === Array ? Array.prototype.slice.call(message.proof) : message.proof; + if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) + object.proofHeight = $root.ibc.core.client.v1.Height.toObject(message.proofHeight, options); + return object; + }; + + /** + * Converts this QueryConnectionResponse to JSON. + * @function toJSON + * @memberof ibc.core.connection.v1.QueryConnectionResponse + * @instance + * @returns {Object.} JSON object + */ + QueryConnectionResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryConnectionResponse; + })(v1.QueryConnectionResponse || {}); + + v1.QueryConnectionsRequest = (function(QueryConnectionsRequest) { + + /** + * Properties of a QueryConnectionsRequest. + * @memberof ibc.core.connection.v1 + * @interface IQueryConnectionsRequest + * @property {cosmos.base.query.v1beta1.IPageRequest|null} [pagination] QueryConnectionsRequest pagination + */ + + /** + * Constructs a new QueryConnectionsRequest. + * @memberof ibc.core.connection.v1 + * @classdesc Represents a QueryConnectionsRequest. + * @implements IQueryConnectionsRequest + * @constructor + * @param {ibc.core.connection.v1.IQueryConnectionsRequest=} [properties] Properties to set + */ + function QueryConnectionsRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryConnectionsRequest pagination. + * @member {cosmos.base.query.v1beta1.IPageRequest|null|undefined} pagination + * @memberof ibc.core.connection.v1.QueryConnectionsRequest + * @instance + */ + QueryConnectionsRequest.prototype.pagination = null; + + /** + * Creates a new QueryConnectionsRequest instance using the specified properties. + * @function create + * @memberof ibc.core.connection.v1.QueryConnectionsRequest + * @static + * @param {ibc.core.connection.v1.IQueryConnectionsRequest=} [properties] Properties to set + * @returns {ibc.core.connection.v1.QueryConnectionsRequest} QueryConnectionsRequest instance + */ + QueryConnectionsRequest.create = function create(properties) { + return new QueryConnectionsRequest(properties); + }; + + /** + * Encodes the specified QueryConnectionsRequest message. Does not implicitly {@link ibc.core.connection.v1.QueryConnectionsRequest.verify|verify} messages. + * @function encode + * @memberof ibc.core.connection.v1.QueryConnectionsRequest + * @static + * @param {ibc.core.connection.v1.IQueryConnectionsRequest} message QueryConnectionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryConnectionsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) + $root.cosmos.base.query.v1beta1.PageRequest.encode(message.pagination, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryConnectionsRequest message, length delimited. Does not implicitly {@link ibc.core.connection.v1.QueryConnectionsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.connection.v1.QueryConnectionsRequest + * @static + * @param {ibc.core.connection.v1.IQueryConnectionsRequest} message QueryConnectionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryConnectionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryConnectionsRequest message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.connection.v1.QueryConnectionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.connection.v1.QueryConnectionsRequest} QueryConnectionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryConnectionsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.connection.v1.QueryConnectionsRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryConnectionsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.connection.v1.QueryConnectionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.connection.v1.QueryConnectionsRequest} QueryConnectionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryConnectionsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryConnectionsRequest message. + * @function verify + * @memberof ibc.core.connection.v1.QueryConnectionsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryConnectionsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.pagination != null && message.hasOwnProperty("pagination")) { + let error = $root.cosmos.base.query.v1beta1.PageRequest.verify(message.pagination); + if (error) + return "pagination." + error; + } + return null; + }; + + /** + * Creates a QueryConnectionsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.connection.v1.QueryConnectionsRequest + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.connection.v1.QueryConnectionsRequest} QueryConnectionsRequest + */ + QueryConnectionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.connection.v1.QueryConnectionsRequest) + return object; + let message = new $root.ibc.core.connection.v1.QueryConnectionsRequest(); + if (object.pagination != null) { + if (typeof object.pagination !== "object") + throw TypeError(".ibc.core.connection.v1.QueryConnectionsRequest.pagination: object expected"); + message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.fromObject(object.pagination); + } + return message; + }; + + /** + * Creates a plain object from a QueryConnectionsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.connection.v1.QueryConnectionsRequest + * @static + * @param {ibc.core.connection.v1.QueryConnectionsRequest} message QueryConnectionsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryConnectionsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.pagination = null; + if (message.pagination != null && message.hasOwnProperty("pagination")) + object.pagination = $root.cosmos.base.query.v1beta1.PageRequest.toObject(message.pagination, options); + return object; + }; + + /** + * Converts this QueryConnectionsRequest to JSON. + * @function toJSON + * @memberof ibc.core.connection.v1.QueryConnectionsRequest + * @instance + * @returns {Object.} JSON object + */ + QueryConnectionsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryConnectionsRequest; + })(v1.QueryConnectionsRequest || {}); + + v1.QueryConnectionsResponse = (function(QueryConnectionsResponse) { + + /** + * Properties of a QueryConnectionsResponse. + * @memberof ibc.core.connection.v1 + * @interface IQueryConnectionsResponse + * @property {Array.|null} [connections] QueryConnectionsResponse connections + * @property {cosmos.base.query.v1beta1.IPageResponse|null} [pagination] QueryConnectionsResponse pagination + * @property {ibc.core.client.v1.IHeight|null} [height] QueryConnectionsResponse height + */ + + /** + * Constructs a new QueryConnectionsResponse. + * @memberof ibc.core.connection.v1 + * @classdesc Represents a QueryConnectionsResponse. + * @implements IQueryConnectionsResponse + * @constructor + * @param {ibc.core.connection.v1.IQueryConnectionsResponse=} [properties] Properties to set + */ + function QueryConnectionsResponse(properties) { + this.connections = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryConnectionsResponse connections. + * @member {Array.} connections + * @memberof ibc.core.connection.v1.QueryConnectionsResponse + * @instance + */ + QueryConnectionsResponse.prototype.connections = $util.emptyArray; + + /** + * QueryConnectionsResponse pagination. + * @member {cosmos.base.query.v1beta1.IPageResponse|null|undefined} pagination + * @memberof ibc.core.connection.v1.QueryConnectionsResponse + * @instance + */ + QueryConnectionsResponse.prototype.pagination = null; + + /** + * QueryConnectionsResponse height. + * @member {ibc.core.client.v1.IHeight|null|undefined} height + * @memberof ibc.core.connection.v1.QueryConnectionsResponse + * @instance + */ + QueryConnectionsResponse.prototype.height = null; + + /** + * Creates a new QueryConnectionsResponse instance using the specified properties. + * @function create + * @memberof ibc.core.connection.v1.QueryConnectionsResponse + * @static + * @param {ibc.core.connection.v1.IQueryConnectionsResponse=} [properties] Properties to set + * @returns {ibc.core.connection.v1.QueryConnectionsResponse} QueryConnectionsResponse instance + */ + QueryConnectionsResponse.create = function create(properties) { + return new QueryConnectionsResponse(properties); + }; + + /** + * Encodes the specified QueryConnectionsResponse message. Does not implicitly {@link ibc.core.connection.v1.QueryConnectionsResponse.verify|verify} messages. + * @function encode + * @memberof ibc.core.connection.v1.QueryConnectionsResponse + * @static + * @param {ibc.core.connection.v1.IQueryConnectionsResponse} message QueryConnectionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryConnectionsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.connections != null && message.connections.length) + for (let i = 0; i < message.connections.length; ++i) + $root.ibc.core.connection.v1.IdentifiedConnection.encode(message.connections[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) + $root.cosmos.base.query.v1beta1.PageResponse.encode(message.pagination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.height != null && Object.hasOwnProperty.call(message, "height")) + $root.ibc.core.client.v1.Height.encode(message.height, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryConnectionsResponse message, length delimited. Does not implicitly {@link ibc.core.connection.v1.QueryConnectionsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.connection.v1.QueryConnectionsResponse + * @static + * @param {ibc.core.connection.v1.IQueryConnectionsResponse} message QueryConnectionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryConnectionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryConnectionsResponse message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.connection.v1.QueryConnectionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.connection.v1.QueryConnectionsResponse} QueryConnectionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryConnectionsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.connection.v1.QueryConnectionsResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.connections && message.connections.length)) + message.connections = []; + message.connections.push($root.ibc.core.connection.v1.IdentifiedConnection.decode(reader, reader.uint32())); + break; + case 2: + message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.decode(reader, reader.uint32()); + break; + case 3: + message.height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryConnectionsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.connection.v1.QueryConnectionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.connection.v1.QueryConnectionsResponse} QueryConnectionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryConnectionsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryConnectionsResponse message. + * @function verify + * @memberof ibc.core.connection.v1.QueryConnectionsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryConnectionsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.connections != null && message.hasOwnProperty("connections")) { + if (!Array.isArray(message.connections)) + return "connections: array expected"; + for (let i = 0; i < message.connections.length; ++i) { + let error = $root.ibc.core.connection.v1.IdentifiedConnection.verify(message.connections[i]); + if (error) + return "connections." + error; + } + } + if (message.pagination != null && message.hasOwnProperty("pagination")) { + let error = $root.cosmos.base.query.v1beta1.PageResponse.verify(message.pagination); + if (error) + return "pagination." + error; + } + if (message.height != null && message.hasOwnProperty("height")) { + let error = $root.ibc.core.client.v1.Height.verify(message.height); + if (error) + return "height." + error; + } + return null; + }; + + /** + * Creates a QueryConnectionsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.connection.v1.QueryConnectionsResponse + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.connection.v1.QueryConnectionsResponse} QueryConnectionsResponse + */ + QueryConnectionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.connection.v1.QueryConnectionsResponse) + return object; + let message = new $root.ibc.core.connection.v1.QueryConnectionsResponse(); + if (object.connections) { + if (!Array.isArray(object.connections)) + throw TypeError(".ibc.core.connection.v1.QueryConnectionsResponse.connections: array expected"); + message.connections = []; + for (let i = 0; i < object.connections.length; ++i) { + if (typeof object.connections[i] !== "object") + throw TypeError(".ibc.core.connection.v1.QueryConnectionsResponse.connections: object expected"); + message.connections[i] = $root.ibc.core.connection.v1.IdentifiedConnection.fromObject(object.connections[i]); + } + } + if (object.pagination != null) { + if (typeof object.pagination !== "object") + throw TypeError(".ibc.core.connection.v1.QueryConnectionsResponse.pagination: object expected"); + message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.fromObject(object.pagination); + } + if (object.height != null) { + if (typeof object.height !== "object") + throw TypeError(".ibc.core.connection.v1.QueryConnectionsResponse.height: object expected"); + message.height = $root.ibc.core.client.v1.Height.fromObject(object.height); + } + return message; + }; + + /** + * Creates a plain object from a QueryConnectionsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.connection.v1.QueryConnectionsResponse + * @static + * @param {ibc.core.connection.v1.QueryConnectionsResponse} message QueryConnectionsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryConnectionsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.connections = []; + if (options.defaults) { + object.pagination = null; + object.height = null; + } + if (message.connections && message.connections.length) { + object.connections = []; + for (let j = 0; j < message.connections.length; ++j) + object.connections[j] = $root.ibc.core.connection.v1.IdentifiedConnection.toObject(message.connections[j], options); + } + if (message.pagination != null && message.hasOwnProperty("pagination")) + object.pagination = $root.cosmos.base.query.v1beta1.PageResponse.toObject(message.pagination, options); + if (message.height != null && message.hasOwnProperty("height")) + object.height = $root.ibc.core.client.v1.Height.toObject(message.height, options); + return object; + }; + + /** + * Converts this QueryConnectionsResponse to JSON. + * @function toJSON + * @memberof ibc.core.connection.v1.QueryConnectionsResponse + * @instance + * @returns {Object.} JSON object + */ + QueryConnectionsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryConnectionsResponse; + })(v1.QueryConnectionsResponse || {}); + + v1.QueryClientConnectionsRequest = (function(QueryClientConnectionsRequest) { + + /** + * Properties of a QueryClientConnectionsRequest. + * @memberof ibc.core.connection.v1 + * @interface IQueryClientConnectionsRequest + * @property {string|null} [clientId] QueryClientConnectionsRequest clientId + */ + + /** + * Constructs a new QueryClientConnectionsRequest. + * @memberof ibc.core.connection.v1 + * @classdesc Represents a QueryClientConnectionsRequest. + * @implements IQueryClientConnectionsRequest + * @constructor + * @param {ibc.core.connection.v1.IQueryClientConnectionsRequest=} [properties] Properties to set + */ + function QueryClientConnectionsRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryClientConnectionsRequest clientId. + * @member {string} clientId + * @memberof ibc.core.connection.v1.QueryClientConnectionsRequest + * @instance + */ + QueryClientConnectionsRequest.prototype.clientId = ""; + + /** + * Creates a new QueryClientConnectionsRequest instance using the specified properties. + * @function create + * @memberof ibc.core.connection.v1.QueryClientConnectionsRequest + * @static + * @param {ibc.core.connection.v1.IQueryClientConnectionsRequest=} [properties] Properties to set + * @returns {ibc.core.connection.v1.QueryClientConnectionsRequest} QueryClientConnectionsRequest instance + */ + QueryClientConnectionsRequest.create = function create(properties) { + return new QueryClientConnectionsRequest(properties); + }; + + /** + * Encodes the specified QueryClientConnectionsRequest message. Does not implicitly {@link ibc.core.connection.v1.QueryClientConnectionsRequest.verify|verify} messages. + * @function encode + * @memberof ibc.core.connection.v1.QueryClientConnectionsRequest + * @static + * @param {ibc.core.connection.v1.IQueryClientConnectionsRequest} message QueryClientConnectionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryClientConnectionsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.clientId != null && Object.hasOwnProperty.call(message, "clientId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.clientId); + return writer; + }; + + /** + * Encodes the specified QueryClientConnectionsRequest message, length delimited. Does not implicitly {@link ibc.core.connection.v1.QueryClientConnectionsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.connection.v1.QueryClientConnectionsRequest + * @static + * @param {ibc.core.connection.v1.IQueryClientConnectionsRequest} message QueryClientConnectionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryClientConnectionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryClientConnectionsRequest message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.connection.v1.QueryClientConnectionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.connection.v1.QueryClientConnectionsRequest} QueryClientConnectionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryClientConnectionsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.connection.v1.QueryClientConnectionsRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.clientId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryClientConnectionsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.connection.v1.QueryClientConnectionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.connection.v1.QueryClientConnectionsRequest} QueryClientConnectionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryClientConnectionsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryClientConnectionsRequest message. + * @function verify + * @memberof ibc.core.connection.v1.QueryClientConnectionsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryClientConnectionsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.clientId != null && message.hasOwnProperty("clientId")) + if (!$util.isString(message.clientId)) + return "clientId: string expected"; + return null; + }; + + /** + * Creates a QueryClientConnectionsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.connection.v1.QueryClientConnectionsRequest + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.connection.v1.QueryClientConnectionsRequest} QueryClientConnectionsRequest + */ + QueryClientConnectionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.connection.v1.QueryClientConnectionsRequest) + return object; + let message = new $root.ibc.core.connection.v1.QueryClientConnectionsRequest(); + if (object.clientId != null) + message.clientId = String(object.clientId); + return message; + }; + + /** + * Creates a plain object from a QueryClientConnectionsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.connection.v1.QueryClientConnectionsRequest + * @static + * @param {ibc.core.connection.v1.QueryClientConnectionsRequest} message QueryClientConnectionsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryClientConnectionsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.clientId = ""; + if (message.clientId != null && message.hasOwnProperty("clientId")) + object.clientId = message.clientId; + return object; + }; + + /** + * Converts this QueryClientConnectionsRequest to JSON. + * @function toJSON + * @memberof ibc.core.connection.v1.QueryClientConnectionsRequest + * @instance + * @returns {Object.} JSON object + */ + QueryClientConnectionsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryClientConnectionsRequest; + })(v1.QueryClientConnectionsRequest || {}); + + v1.QueryClientConnectionsResponse = (function(QueryClientConnectionsResponse) { + + /** + * Properties of a QueryClientConnectionsResponse. + * @memberof ibc.core.connection.v1 + * @interface IQueryClientConnectionsResponse + * @property {Array.|null} [connectionPaths] QueryClientConnectionsResponse connectionPaths + * @property {Uint8Array|null} [proof] QueryClientConnectionsResponse proof + * @property {ibc.core.client.v1.IHeight|null} [proofHeight] QueryClientConnectionsResponse proofHeight + */ + + /** + * Constructs a new QueryClientConnectionsResponse. + * @memberof ibc.core.connection.v1 + * @classdesc Represents a QueryClientConnectionsResponse. + * @implements IQueryClientConnectionsResponse + * @constructor + * @param {ibc.core.connection.v1.IQueryClientConnectionsResponse=} [properties] Properties to set + */ + function QueryClientConnectionsResponse(properties) { + this.connectionPaths = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryClientConnectionsResponse connectionPaths. + * @member {Array.} connectionPaths + * @memberof ibc.core.connection.v1.QueryClientConnectionsResponse + * @instance + */ + QueryClientConnectionsResponse.prototype.connectionPaths = $util.emptyArray; + + /** + * QueryClientConnectionsResponse proof. + * @member {Uint8Array} proof + * @memberof ibc.core.connection.v1.QueryClientConnectionsResponse + * @instance + */ + QueryClientConnectionsResponse.prototype.proof = $util.newBuffer([]); + + /** + * QueryClientConnectionsResponse proofHeight. + * @member {ibc.core.client.v1.IHeight|null|undefined} proofHeight + * @memberof ibc.core.connection.v1.QueryClientConnectionsResponse + * @instance + */ + QueryClientConnectionsResponse.prototype.proofHeight = null; + + /** + * Creates a new QueryClientConnectionsResponse instance using the specified properties. + * @function create + * @memberof ibc.core.connection.v1.QueryClientConnectionsResponse + * @static + * @param {ibc.core.connection.v1.IQueryClientConnectionsResponse=} [properties] Properties to set + * @returns {ibc.core.connection.v1.QueryClientConnectionsResponse} QueryClientConnectionsResponse instance + */ + QueryClientConnectionsResponse.create = function create(properties) { + return new QueryClientConnectionsResponse(properties); + }; + + /** + * Encodes the specified QueryClientConnectionsResponse message. Does not implicitly {@link ibc.core.connection.v1.QueryClientConnectionsResponse.verify|verify} messages. + * @function encode + * @memberof ibc.core.connection.v1.QueryClientConnectionsResponse + * @static + * @param {ibc.core.connection.v1.IQueryClientConnectionsResponse} message QueryClientConnectionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryClientConnectionsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.connectionPaths != null && message.connectionPaths.length) + for (let i = 0; i < message.connectionPaths.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.connectionPaths[i]); + if (message.proof != null && Object.hasOwnProperty.call(message, "proof")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.proof); + if (message.proofHeight != null && Object.hasOwnProperty.call(message, "proofHeight")) + $root.ibc.core.client.v1.Height.encode(message.proofHeight, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryClientConnectionsResponse message, length delimited. Does not implicitly {@link ibc.core.connection.v1.QueryClientConnectionsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.connection.v1.QueryClientConnectionsResponse + * @static + * @param {ibc.core.connection.v1.IQueryClientConnectionsResponse} message QueryClientConnectionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryClientConnectionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryClientConnectionsResponse message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.connection.v1.QueryClientConnectionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.connection.v1.QueryClientConnectionsResponse} QueryClientConnectionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryClientConnectionsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.connection.v1.QueryClientConnectionsResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.connectionPaths && message.connectionPaths.length)) + message.connectionPaths = []; + message.connectionPaths.push(reader.string()); + break; + case 2: + message.proof = reader.bytes(); + break; + case 3: + message.proofHeight = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryClientConnectionsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.connection.v1.QueryClientConnectionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.connection.v1.QueryClientConnectionsResponse} QueryClientConnectionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryClientConnectionsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryClientConnectionsResponse message. + * @function verify + * @memberof ibc.core.connection.v1.QueryClientConnectionsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryClientConnectionsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.connectionPaths != null && message.hasOwnProperty("connectionPaths")) { + if (!Array.isArray(message.connectionPaths)) + return "connectionPaths: array expected"; + for (let i = 0; i < message.connectionPaths.length; ++i) + if (!$util.isString(message.connectionPaths[i])) + return "connectionPaths: string[] expected"; + } + if (message.proof != null && message.hasOwnProperty("proof")) + if (!(message.proof && typeof message.proof.length === "number" || $util.isString(message.proof))) + return "proof: buffer expected"; + if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) { + let error = $root.ibc.core.client.v1.Height.verify(message.proofHeight); + if (error) + return "proofHeight." + error; + } + return null; + }; + + /** + * Creates a QueryClientConnectionsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.connection.v1.QueryClientConnectionsResponse + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.connection.v1.QueryClientConnectionsResponse} QueryClientConnectionsResponse + */ + QueryClientConnectionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.connection.v1.QueryClientConnectionsResponse) + return object; + let message = new $root.ibc.core.connection.v1.QueryClientConnectionsResponse(); + if (object.connectionPaths) { + if (!Array.isArray(object.connectionPaths)) + throw TypeError(".ibc.core.connection.v1.QueryClientConnectionsResponse.connectionPaths: array expected"); + message.connectionPaths = []; + for (let i = 0; i < object.connectionPaths.length; ++i) + message.connectionPaths[i] = String(object.connectionPaths[i]); + } + if (object.proof != null) + if (typeof object.proof === "string") + $util.base64.decode(object.proof, message.proof = $util.newBuffer($util.base64.length(object.proof)), 0); + else if (object.proof.length) + message.proof = object.proof; + if (object.proofHeight != null) { + if (typeof object.proofHeight !== "object") + throw TypeError(".ibc.core.connection.v1.QueryClientConnectionsResponse.proofHeight: object expected"); + message.proofHeight = $root.ibc.core.client.v1.Height.fromObject(object.proofHeight); + } + return message; + }; + + /** + * Creates a plain object from a QueryClientConnectionsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.connection.v1.QueryClientConnectionsResponse + * @static + * @param {ibc.core.connection.v1.QueryClientConnectionsResponse} message QueryClientConnectionsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryClientConnectionsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.connectionPaths = []; + if (options.defaults) { + if (options.bytes === String) + object.proof = ""; + else { + object.proof = []; + if (options.bytes !== Array) + object.proof = $util.newBuffer(object.proof); + } + object.proofHeight = null; + } + if (message.connectionPaths && message.connectionPaths.length) { + object.connectionPaths = []; + for (let j = 0; j < message.connectionPaths.length; ++j) + object.connectionPaths[j] = message.connectionPaths[j]; + } + if (message.proof != null && message.hasOwnProperty("proof")) + object.proof = options.bytes === String ? $util.base64.encode(message.proof, 0, message.proof.length) : options.bytes === Array ? Array.prototype.slice.call(message.proof) : message.proof; + if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) + object.proofHeight = $root.ibc.core.client.v1.Height.toObject(message.proofHeight, options); + return object; + }; + + /** + * Converts this QueryClientConnectionsResponse to JSON. + * @function toJSON + * @memberof ibc.core.connection.v1.QueryClientConnectionsResponse + * @instance + * @returns {Object.} JSON object + */ + QueryClientConnectionsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryClientConnectionsResponse; + })(v1.QueryClientConnectionsResponse || {}); + + v1.QueryConnectionClientStateRequest = (function(QueryConnectionClientStateRequest) { + + /** + * Properties of a QueryConnectionClientStateRequest. + * @memberof ibc.core.connection.v1 + * @interface IQueryConnectionClientStateRequest + * @property {string|null} [connectionId] QueryConnectionClientStateRequest connectionId + */ + + /** + * Constructs a new QueryConnectionClientStateRequest. + * @memberof ibc.core.connection.v1 + * @classdesc Represents a QueryConnectionClientStateRequest. + * @implements IQueryConnectionClientStateRequest + * @constructor + * @param {ibc.core.connection.v1.IQueryConnectionClientStateRequest=} [properties] Properties to set + */ + function QueryConnectionClientStateRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryConnectionClientStateRequest connectionId. + * @member {string} connectionId + * @memberof ibc.core.connection.v1.QueryConnectionClientStateRequest + * @instance + */ + QueryConnectionClientStateRequest.prototype.connectionId = ""; + + /** + * Creates a new QueryConnectionClientStateRequest instance using the specified properties. + * @function create + * @memberof ibc.core.connection.v1.QueryConnectionClientStateRequest + * @static + * @param {ibc.core.connection.v1.IQueryConnectionClientStateRequest=} [properties] Properties to set + * @returns {ibc.core.connection.v1.QueryConnectionClientStateRequest} QueryConnectionClientStateRequest instance + */ + QueryConnectionClientStateRequest.create = function create(properties) { + return new QueryConnectionClientStateRequest(properties); + }; + + /** + * Encodes the specified QueryConnectionClientStateRequest message. Does not implicitly {@link ibc.core.connection.v1.QueryConnectionClientStateRequest.verify|verify} messages. + * @function encode + * @memberof ibc.core.connection.v1.QueryConnectionClientStateRequest + * @static + * @param {ibc.core.connection.v1.IQueryConnectionClientStateRequest} message QueryConnectionClientStateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryConnectionClientStateRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.connectionId != null && Object.hasOwnProperty.call(message, "connectionId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.connectionId); + return writer; + }; + + /** + * Encodes the specified QueryConnectionClientStateRequest message, length delimited. Does not implicitly {@link ibc.core.connection.v1.QueryConnectionClientStateRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.connection.v1.QueryConnectionClientStateRequest + * @static + * @param {ibc.core.connection.v1.IQueryConnectionClientStateRequest} message QueryConnectionClientStateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryConnectionClientStateRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryConnectionClientStateRequest message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.connection.v1.QueryConnectionClientStateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.connection.v1.QueryConnectionClientStateRequest} QueryConnectionClientStateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryConnectionClientStateRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.connection.v1.QueryConnectionClientStateRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.connectionId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryConnectionClientStateRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.connection.v1.QueryConnectionClientStateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.connection.v1.QueryConnectionClientStateRequest} QueryConnectionClientStateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryConnectionClientStateRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryConnectionClientStateRequest message. + * @function verify + * @memberof ibc.core.connection.v1.QueryConnectionClientStateRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryConnectionClientStateRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.connectionId != null && message.hasOwnProperty("connectionId")) + if (!$util.isString(message.connectionId)) + return "connectionId: string expected"; + return null; + }; + + /** + * Creates a QueryConnectionClientStateRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.connection.v1.QueryConnectionClientStateRequest + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.connection.v1.QueryConnectionClientStateRequest} QueryConnectionClientStateRequest + */ + QueryConnectionClientStateRequest.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.connection.v1.QueryConnectionClientStateRequest) + return object; + let message = new $root.ibc.core.connection.v1.QueryConnectionClientStateRequest(); + if (object.connectionId != null) + message.connectionId = String(object.connectionId); + return message; + }; + + /** + * Creates a plain object from a QueryConnectionClientStateRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.connection.v1.QueryConnectionClientStateRequest + * @static + * @param {ibc.core.connection.v1.QueryConnectionClientStateRequest} message QueryConnectionClientStateRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryConnectionClientStateRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.connectionId = ""; + if (message.connectionId != null && message.hasOwnProperty("connectionId")) + object.connectionId = message.connectionId; + return object; + }; + + /** + * Converts this QueryConnectionClientStateRequest to JSON. + * @function toJSON + * @memberof ibc.core.connection.v1.QueryConnectionClientStateRequest + * @instance + * @returns {Object.} JSON object + */ + QueryConnectionClientStateRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryConnectionClientStateRequest; + })(v1.QueryConnectionClientStateRequest || {}); + + v1.QueryConnectionClientStateResponse = (function(QueryConnectionClientStateResponse) { + + /** + * Properties of a QueryConnectionClientStateResponse. + * @memberof ibc.core.connection.v1 + * @interface IQueryConnectionClientStateResponse + * @property {ibc.core.client.v1.IIdentifiedClientState|null} [identifiedClientState] QueryConnectionClientStateResponse identifiedClientState + * @property {Uint8Array|null} [proof] QueryConnectionClientStateResponse proof + * @property {ibc.core.client.v1.IHeight|null} [proofHeight] QueryConnectionClientStateResponse proofHeight + */ + + /** + * Constructs a new QueryConnectionClientStateResponse. + * @memberof ibc.core.connection.v1 + * @classdesc Represents a QueryConnectionClientStateResponse. + * @implements IQueryConnectionClientStateResponse + * @constructor + * @param {ibc.core.connection.v1.IQueryConnectionClientStateResponse=} [properties] Properties to set + */ + function QueryConnectionClientStateResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryConnectionClientStateResponse identifiedClientState. + * @member {ibc.core.client.v1.IIdentifiedClientState|null|undefined} identifiedClientState + * @memberof ibc.core.connection.v1.QueryConnectionClientStateResponse + * @instance + */ + QueryConnectionClientStateResponse.prototype.identifiedClientState = null; + + /** + * QueryConnectionClientStateResponse proof. + * @member {Uint8Array} proof + * @memberof ibc.core.connection.v1.QueryConnectionClientStateResponse + * @instance + */ + QueryConnectionClientStateResponse.prototype.proof = $util.newBuffer([]); + + /** + * QueryConnectionClientStateResponse proofHeight. + * @member {ibc.core.client.v1.IHeight|null|undefined} proofHeight + * @memberof ibc.core.connection.v1.QueryConnectionClientStateResponse + * @instance + */ + QueryConnectionClientStateResponse.prototype.proofHeight = null; + + /** + * Creates a new QueryConnectionClientStateResponse instance using the specified properties. + * @function create + * @memberof ibc.core.connection.v1.QueryConnectionClientStateResponse + * @static + * @param {ibc.core.connection.v1.IQueryConnectionClientStateResponse=} [properties] Properties to set + * @returns {ibc.core.connection.v1.QueryConnectionClientStateResponse} QueryConnectionClientStateResponse instance + */ + QueryConnectionClientStateResponse.create = function create(properties) { + return new QueryConnectionClientStateResponse(properties); + }; + + /** + * Encodes the specified QueryConnectionClientStateResponse message. Does not implicitly {@link ibc.core.connection.v1.QueryConnectionClientStateResponse.verify|verify} messages. + * @function encode + * @memberof ibc.core.connection.v1.QueryConnectionClientStateResponse + * @static + * @param {ibc.core.connection.v1.IQueryConnectionClientStateResponse} message QueryConnectionClientStateResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryConnectionClientStateResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.identifiedClientState != null && Object.hasOwnProperty.call(message, "identifiedClientState")) + $root.ibc.core.client.v1.IdentifiedClientState.encode(message.identifiedClientState, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.proof != null && Object.hasOwnProperty.call(message, "proof")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.proof); + if (message.proofHeight != null && Object.hasOwnProperty.call(message, "proofHeight")) + $root.ibc.core.client.v1.Height.encode(message.proofHeight, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryConnectionClientStateResponse message, length delimited. Does not implicitly {@link ibc.core.connection.v1.QueryConnectionClientStateResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.connection.v1.QueryConnectionClientStateResponse + * @static + * @param {ibc.core.connection.v1.IQueryConnectionClientStateResponse} message QueryConnectionClientStateResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryConnectionClientStateResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryConnectionClientStateResponse message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.connection.v1.QueryConnectionClientStateResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.connection.v1.QueryConnectionClientStateResponse} QueryConnectionClientStateResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryConnectionClientStateResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.connection.v1.QueryConnectionClientStateResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.identifiedClientState = $root.ibc.core.client.v1.IdentifiedClientState.decode(reader, reader.uint32()); + break; + case 2: + message.proof = reader.bytes(); + break; + case 3: + message.proofHeight = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryConnectionClientStateResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.connection.v1.QueryConnectionClientStateResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.connection.v1.QueryConnectionClientStateResponse} QueryConnectionClientStateResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryConnectionClientStateResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryConnectionClientStateResponse message. + * @function verify + * @memberof ibc.core.connection.v1.QueryConnectionClientStateResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryConnectionClientStateResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.identifiedClientState != null && message.hasOwnProperty("identifiedClientState")) { + let error = $root.ibc.core.client.v1.IdentifiedClientState.verify(message.identifiedClientState); + if (error) + return "identifiedClientState." + error; + } + if (message.proof != null && message.hasOwnProperty("proof")) + if (!(message.proof && typeof message.proof.length === "number" || $util.isString(message.proof))) + return "proof: buffer expected"; + if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) { + let error = $root.ibc.core.client.v1.Height.verify(message.proofHeight); + if (error) + return "proofHeight." + error; + } + return null; + }; + + /** + * Creates a QueryConnectionClientStateResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.connection.v1.QueryConnectionClientStateResponse + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.connection.v1.QueryConnectionClientStateResponse} QueryConnectionClientStateResponse + */ + QueryConnectionClientStateResponse.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.connection.v1.QueryConnectionClientStateResponse) + return object; + let message = new $root.ibc.core.connection.v1.QueryConnectionClientStateResponse(); + if (object.identifiedClientState != null) { + if (typeof object.identifiedClientState !== "object") + throw TypeError(".ibc.core.connection.v1.QueryConnectionClientStateResponse.identifiedClientState: object expected"); + message.identifiedClientState = $root.ibc.core.client.v1.IdentifiedClientState.fromObject(object.identifiedClientState); + } + if (object.proof != null) + if (typeof object.proof === "string") + $util.base64.decode(object.proof, message.proof = $util.newBuffer($util.base64.length(object.proof)), 0); + else if (object.proof.length) + message.proof = object.proof; + if (object.proofHeight != null) { + if (typeof object.proofHeight !== "object") + throw TypeError(".ibc.core.connection.v1.QueryConnectionClientStateResponse.proofHeight: object expected"); + message.proofHeight = $root.ibc.core.client.v1.Height.fromObject(object.proofHeight); + } + return message; + }; + + /** + * Creates a plain object from a QueryConnectionClientStateResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.connection.v1.QueryConnectionClientStateResponse + * @static + * @param {ibc.core.connection.v1.QueryConnectionClientStateResponse} message QueryConnectionClientStateResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryConnectionClientStateResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.identifiedClientState = null; + if (options.bytes === String) + object.proof = ""; + else { + object.proof = []; + if (options.bytes !== Array) + object.proof = $util.newBuffer(object.proof); + } + object.proofHeight = null; + } + if (message.identifiedClientState != null && message.hasOwnProperty("identifiedClientState")) + object.identifiedClientState = $root.ibc.core.client.v1.IdentifiedClientState.toObject(message.identifiedClientState, options); + if (message.proof != null && message.hasOwnProperty("proof")) + object.proof = options.bytes === String ? $util.base64.encode(message.proof, 0, message.proof.length) : options.bytes === Array ? Array.prototype.slice.call(message.proof) : message.proof; + if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) + object.proofHeight = $root.ibc.core.client.v1.Height.toObject(message.proofHeight, options); + return object; + }; + + /** + * Converts this QueryConnectionClientStateResponse to JSON. + * @function toJSON + * @memberof ibc.core.connection.v1.QueryConnectionClientStateResponse + * @instance + * @returns {Object.} JSON object + */ + QueryConnectionClientStateResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryConnectionClientStateResponse; + })(v1.QueryConnectionClientStateResponse || {}); + + v1.QueryConnectionConsensusStateRequest = (function(QueryConnectionConsensusStateRequest) { + + /** + * Properties of a QueryConnectionConsensusStateRequest. + * @memberof ibc.core.connection.v1 + * @interface IQueryConnectionConsensusStateRequest + * @property {string|null} [connectionId] QueryConnectionConsensusStateRequest connectionId + * @property {number|Long|null} [revisionNumber] QueryConnectionConsensusStateRequest revisionNumber + * @property {number|Long|null} [revisionHeight] QueryConnectionConsensusStateRequest revisionHeight + */ + + /** + * Constructs a new QueryConnectionConsensusStateRequest. + * @memberof ibc.core.connection.v1 + * @classdesc Represents a QueryConnectionConsensusStateRequest. + * @implements IQueryConnectionConsensusStateRequest + * @constructor + * @param {ibc.core.connection.v1.IQueryConnectionConsensusStateRequest=} [properties] Properties to set + */ + function QueryConnectionConsensusStateRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryConnectionConsensusStateRequest connectionId. + * @member {string} connectionId + * @memberof ibc.core.connection.v1.QueryConnectionConsensusStateRequest + * @instance + */ + QueryConnectionConsensusStateRequest.prototype.connectionId = ""; + + /** + * QueryConnectionConsensusStateRequest revisionNumber. + * @member {number|Long} revisionNumber + * @memberof ibc.core.connection.v1.QueryConnectionConsensusStateRequest + * @instance + */ + QueryConnectionConsensusStateRequest.prototype.revisionNumber = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * QueryConnectionConsensusStateRequest revisionHeight. + * @member {number|Long} revisionHeight + * @memberof ibc.core.connection.v1.QueryConnectionConsensusStateRequest + * @instance + */ + QueryConnectionConsensusStateRequest.prototype.revisionHeight = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new QueryConnectionConsensusStateRequest instance using the specified properties. + * @function create + * @memberof ibc.core.connection.v1.QueryConnectionConsensusStateRequest + * @static + * @param {ibc.core.connection.v1.IQueryConnectionConsensusStateRequest=} [properties] Properties to set + * @returns {ibc.core.connection.v1.QueryConnectionConsensusStateRequest} QueryConnectionConsensusStateRequest instance + */ + QueryConnectionConsensusStateRequest.create = function create(properties) { + return new QueryConnectionConsensusStateRequest(properties); + }; + + /** + * Encodes the specified QueryConnectionConsensusStateRequest message. Does not implicitly {@link ibc.core.connection.v1.QueryConnectionConsensusStateRequest.verify|verify} messages. + * @function encode + * @memberof ibc.core.connection.v1.QueryConnectionConsensusStateRequest + * @static + * @param {ibc.core.connection.v1.IQueryConnectionConsensusStateRequest} message QueryConnectionConsensusStateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryConnectionConsensusStateRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.connectionId != null && Object.hasOwnProperty.call(message, "connectionId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.connectionId); + if (message.revisionNumber != null && Object.hasOwnProperty.call(message, "revisionNumber")) + writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.revisionNumber); + if (message.revisionHeight != null && Object.hasOwnProperty.call(message, "revisionHeight")) + writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.revisionHeight); + return writer; + }; + + /** + * Encodes the specified QueryConnectionConsensusStateRequest message, length delimited. Does not implicitly {@link ibc.core.connection.v1.QueryConnectionConsensusStateRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.connection.v1.QueryConnectionConsensusStateRequest + * @static + * @param {ibc.core.connection.v1.IQueryConnectionConsensusStateRequest} message QueryConnectionConsensusStateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryConnectionConsensusStateRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryConnectionConsensusStateRequest message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.connection.v1.QueryConnectionConsensusStateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.connection.v1.QueryConnectionConsensusStateRequest} QueryConnectionConsensusStateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryConnectionConsensusStateRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.connection.v1.QueryConnectionConsensusStateRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.connectionId = reader.string(); + break; + case 2: + message.revisionNumber = reader.uint64(); + break; + case 3: + message.revisionHeight = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryConnectionConsensusStateRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.connection.v1.QueryConnectionConsensusStateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.connection.v1.QueryConnectionConsensusStateRequest} QueryConnectionConsensusStateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryConnectionConsensusStateRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryConnectionConsensusStateRequest message. + * @function verify + * @memberof ibc.core.connection.v1.QueryConnectionConsensusStateRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryConnectionConsensusStateRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.connectionId != null && message.hasOwnProperty("connectionId")) + if (!$util.isString(message.connectionId)) + return "connectionId: string expected"; + if (message.revisionNumber != null && message.hasOwnProperty("revisionNumber")) + if (!$util.isInteger(message.revisionNumber) && !(message.revisionNumber && $util.isInteger(message.revisionNumber.low) && $util.isInteger(message.revisionNumber.high))) + return "revisionNumber: integer|Long expected"; + if (message.revisionHeight != null && message.hasOwnProperty("revisionHeight")) + if (!$util.isInteger(message.revisionHeight) && !(message.revisionHeight && $util.isInteger(message.revisionHeight.low) && $util.isInteger(message.revisionHeight.high))) + return "revisionHeight: integer|Long expected"; + return null; + }; + + /** + * Creates a QueryConnectionConsensusStateRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.connection.v1.QueryConnectionConsensusStateRequest + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.connection.v1.QueryConnectionConsensusStateRequest} QueryConnectionConsensusStateRequest + */ + QueryConnectionConsensusStateRequest.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.connection.v1.QueryConnectionConsensusStateRequest) + return object; + let message = new $root.ibc.core.connection.v1.QueryConnectionConsensusStateRequest(); + if (object.connectionId != null) + message.connectionId = String(object.connectionId); + if (object.revisionNumber != null) + if ($util.Long) + (message.revisionNumber = $util.Long.fromValue(object.revisionNumber)).unsigned = true; + else if (typeof object.revisionNumber === "string") + message.revisionNumber = parseInt(object.revisionNumber, 10); + else if (typeof object.revisionNumber === "number") + message.revisionNumber = object.revisionNumber; + else if (typeof object.revisionNumber === "object") + message.revisionNumber = new $util.LongBits(object.revisionNumber.low >>> 0, object.revisionNumber.high >>> 0).toNumber(true); + if (object.revisionHeight != null) + if ($util.Long) + (message.revisionHeight = $util.Long.fromValue(object.revisionHeight)).unsigned = true; + else if (typeof object.revisionHeight === "string") + message.revisionHeight = parseInt(object.revisionHeight, 10); + else if (typeof object.revisionHeight === "number") + message.revisionHeight = object.revisionHeight; + else if (typeof object.revisionHeight === "object") + message.revisionHeight = new $util.LongBits(object.revisionHeight.low >>> 0, object.revisionHeight.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a QueryConnectionConsensusStateRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.connection.v1.QueryConnectionConsensusStateRequest + * @static + * @param {ibc.core.connection.v1.QueryConnectionConsensusStateRequest} message QueryConnectionConsensusStateRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryConnectionConsensusStateRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.connectionId = ""; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.revisionNumber = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.revisionNumber = options.longs === String ? "0" : 0; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.revisionHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.revisionHeight = options.longs === String ? "0" : 0; + } + if (message.connectionId != null && message.hasOwnProperty("connectionId")) + object.connectionId = message.connectionId; + if (message.revisionNumber != null && message.hasOwnProperty("revisionNumber")) + if (typeof message.revisionNumber === "number") + object.revisionNumber = options.longs === String ? String(message.revisionNumber) : message.revisionNumber; + else + object.revisionNumber = options.longs === String ? $util.Long.prototype.toString.call(message.revisionNumber) : options.longs === Number ? new $util.LongBits(message.revisionNumber.low >>> 0, message.revisionNumber.high >>> 0).toNumber(true) : message.revisionNumber; + if (message.revisionHeight != null && message.hasOwnProperty("revisionHeight")) + if (typeof message.revisionHeight === "number") + object.revisionHeight = options.longs === String ? String(message.revisionHeight) : message.revisionHeight; + else + object.revisionHeight = options.longs === String ? $util.Long.prototype.toString.call(message.revisionHeight) : options.longs === Number ? new $util.LongBits(message.revisionHeight.low >>> 0, message.revisionHeight.high >>> 0).toNumber(true) : message.revisionHeight; + return object; + }; + + /** + * Converts this QueryConnectionConsensusStateRequest to JSON. + * @function toJSON + * @memberof ibc.core.connection.v1.QueryConnectionConsensusStateRequest + * @instance + * @returns {Object.} JSON object + */ + QueryConnectionConsensusStateRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryConnectionConsensusStateRequest; + })(v1.QueryConnectionConsensusStateRequest || {}); + + v1.QueryConnectionConsensusStateResponse = (function(QueryConnectionConsensusStateResponse) { + + /** + * Properties of a QueryConnectionConsensusStateResponse. + * @memberof ibc.core.connection.v1 + * @interface IQueryConnectionConsensusStateResponse + * @property {google.protobuf.IAny|null} [consensusState] QueryConnectionConsensusStateResponse consensusState + * @property {string|null} [clientId] QueryConnectionConsensusStateResponse clientId + * @property {Uint8Array|null} [proof] QueryConnectionConsensusStateResponse proof + * @property {ibc.core.client.v1.IHeight|null} [proofHeight] QueryConnectionConsensusStateResponse proofHeight + */ + + /** + * Constructs a new QueryConnectionConsensusStateResponse. + * @memberof ibc.core.connection.v1 + * @classdesc Represents a QueryConnectionConsensusStateResponse. + * @implements IQueryConnectionConsensusStateResponse + * @constructor + * @param {ibc.core.connection.v1.IQueryConnectionConsensusStateResponse=} [properties] Properties to set + */ + function QueryConnectionConsensusStateResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryConnectionConsensusStateResponse consensusState. + * @member {google.protobuf.IAny|null|undefined} consensusState + * @memberof ibc.core.connection.v1.QueryConnectionConsensusStateResponse + * @instance + */ + QueryConnectionConsensusStateResponse.prototype.consensusState = null; + + /** + * QueryConnectionConsensusStateResponse clientId. + * @member {string} clientId + * @memberof ibc.core.connection.v1.QueryConnectionConsensusStateResponse + * @instance + */ + QueryConnectionConsensusStateResponse.prototype.clientId = ""; + + /** + * QueryConnectionConsensusStateResponse proof. + * @member {Uint8Array} proof + * @memberof ibc.core.connection.v1.QueryConnectionConsensusStateResponse + * @instance + */ + QueryConnectionConsensusStateResponse.prototype.proof = $util.newBuffer([]); + + /** + * QueryConnectionConsensusStateResponse proofHeight. + * @member {ibc.core.client.v1.IHeight|null|undefined} proofHeight + * @memberof ibc.core.connection.v1.QueryConnectionConsensusStateResponse + * @instance + */ + QueryConnectionConsensusStateResponse.prototype.proofHeight = null; + + /** + * Creates a new QueryConnectionConsensusStateResponse instance using the specified properties. + * @function create + * @memberof ibc.core.connection.v1.QueryConnectionConsensusStateResponse + * @static + * @param {ibc.core.connection.v1.IQueryConnectionConsensusStateResponse=} [properties] Properties to set + * @returns {ibc.core.connection.v1.QueryConnectionConsensusStateResponse} QueryConnectionConsensusStateResponse instance + */ + QueryConnectionConsensusStateResponse.create = function create(properties) { + return new QueryConnectionConsensusStateResponse(properties); + }; + + /** + * Encodes the specified QueryConnectionConsensusStateResponse message. Does not implicitly {@link ibc.core.connection.v1.QueryConnectionConsensusStateResponse.verify|verify} messages. + * @function encode + * @memberof ibc.core.connection.v1.QueryConnectionConsensusStateResponse + * @static + * @param {ibc.core.connection.v1.IQueryConnectionConsensusStateResponse} message QueryConnectionConsensusStateResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryConnectionConsensusStateResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.consensusState != null && Object.hasOwnProperty.call(message, "consensusState")) + $root.google.protobuf.Any.encode(message.consensusState, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.clientId != null && Object.hasOwnProperty.call(message, "clientId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.clientId); + if (message.proof != null && Object.hasOwnProperty.call(message, "proof")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.proof); + if (message.proofHeight != null && Object.hasOwnProperty.call(message, "proofHeight")) + $root.ibc.core.client.v1.Height.encode(message.proofHeight, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryConnectionConsensusStateResponse message, length delimited. Does not implicitly {@link ibc.core.connection.v1.QueryConnectionConsensusStateResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.connection.v1.QueryConnectionConsensusStateResponse + * @static + * @param {ibc.core.connection.v1.IQueryConnectionConsensusStateResponse} message QueryConnectionConsensusStateResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryConnectionConsensusStateResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryConnectionConsensusStateResponse message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.connection.v1.QueryConnectionConsensusStateResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.connection.v1.QueryConnectionConsensusStateResponse} QueryConnectionConsensusStateResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryConnectionConsensusStateResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.connection.v1.QueryConnectionConsensusStateResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.consensusState = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + case 2: + message.clientId = reader.string(); + break; + case 3: + message.proof = reader.bytes(); + break; + case 4: + message.proofHeight = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryConnectionConsensusStateResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.connection.v1.QueryConnectionConsensusStateResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.connection.v1.QueryConnectionConsensusStateResponse} QueryConnectionConsensusStateResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryConnectionConsensusStateResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryConnectionConsensusStateResponse message. + * @function verify + * @memberof ibc.core.connection.v1.QueryConnectionConsensusStateResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryConnectionConsensusStateResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.consensusState != null && message.hasOwnProperty("consensusState")) { + let error = $root.google.protobuf.Any.verify(message.consensusState); + if (error) + return "consensusState." + error; + } + if (message.clientId != null && message.hasOwnProperty("clientId")) + if (!$util.isString(message.clientId)) + return "clientId: string expected"; + if (message.proof != null && message.hasOwnProperty("proof")) + if (!(message.proof && typeof message.proof.length === "number" || $util.isString(message.proof))) + return "proof: buffer expected"; + if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) { + let error = $root.ibc.core.client.v1.Height.verify(message.proofHeight); + if (error) + return "proofHeight." + error; + } + return null; + }; + + /** + * Creates a QueryConnectionConsensusStateResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.connection.v1.QueryConnectionConsensusStateResponse + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.connection.v1.QueryConnectionConsensusStateResponse} QueryConnectionConsensusStateResponse + */ + QueryConnectionConsensusStateResponse.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.connection.v1.QueryConnectionConsensusStateResponse) + return object; + let message = new $root.ibc.core.connection.v1.QueryConnectionConsensusStateResponse(); + if (object.consensusState != null) { + if (typeof object.consensusState !== "object") + throw TypeError(".ibc.core.connection.v1.QueryConnectionConsensusStateResponse.consensusState: object expected"); + message.consensusState = $root.google.protobuf.Any.fromObject(object.consensusState); + } + if (object.clientId != null) + message.clientId = String(object.clientId); + if (object.proof != null) + if (typeof object.proof === "string") + $util.base64.decode(object.proof, message.proof = $util.newBuffer($util.base64.length(object.proof)), 0); + else if (object.proof.length) + message.proof = object.proof; + if (object.proofHeight != null) { + if (typeof object.proofHeight !== "object") + throw TypeError(".ibc.core.connection.v1.QueryConnectionConsensusStateResponse.proofHeight: object expected"); + message.proofHeight = $root.ibc.core.client.v1.Height.fromObject(object.proofHeight); + } + return message; + }; + + /** + * Creates a plain object from a QueryConnectionConsensusStateResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.connection.v1.QueryConnectionConsensusStateResponse + * @static + * @param {ibc.core.connection.v1.QueryConnectionConsensusStateResponse} message QueryConnectionConsensusStateResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryConnectionConsensusStateResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.consensusState = null; + object.clientId = ""; + if (options.bytes === String) + object.proof = ""; + else { + object.proof = []; + if (options.bytes !== Array) + object.proof = $util.newBuffer(object.proof); + } + object.proofHeight = null; + } + if (message.consensusState != null && message.hasOwnProperty("consensusState")) + object.consensusState = $root.google.protobuf.Any.toObject(message.consensusState, options); + if (message.clientId != null && message.hasOwnProperty("clientId")) + object.clientId = message.clientId; + if (message.proof != null && message.hasOwnProperty("proof")) + object.proof = options.bytes === String ? $util.base64.encode(message.proof, 0, message.proof.length) : options.bytes === Array ? Array.prototype.slice.call(message.proof) : message.proof; + if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) + object.proofHeight = $root.ibc.core.client.v1.Height.toObject(message.proofHeight, options); + return object; + }; + + /** + * Converts this QueryConnectionConsensusStateResponse to JSON. + * @function toJSON + * @memberof ibc.core.connection.v1.QueryConnectionConsensusStateResponse + * @instance + * @returns {Object.} JSON object + */ + QueryConnectionConsensusStateResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryConnectionConsensusStateResponse; + })(v1.QueryConnectionConsensusStateResponse || {}); + + v1.Msg = (function(Msg) { + + /** + * Constructs a new Msg service. + * @memberof ibc.core.connection.v1 + * @classdesc Represents a Msg + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Msg(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Msg.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Msg; + + /** + * Creates new Msg service using the specified rpc implementation. + * @function create + * @memberof ibc.core.connection.v1.Msg + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Msg} RPC service. Useful where requests and/or responses are streamed. + */ + Msg.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link ibc.core.connection.v1.Msg#connectionOpenInit}. + * @memberof ibc.core.connection.v1.Msg + * @typedef ConnectionOpenInitCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {ibc.core.connection.v1.IMsgConnectionOpenInitResponse} [response] MsgConnectionOpenInitResponse + */ + + /** + * Calls ConnectionOpenInit. + * @function connectionOpenInit + * @memberof ibc.core.connection.v1.Msg + * @instance + * @param {ibc.core.connection.v1.IMsgConnectionOpenInit} request MsgConnectionOpenInit message or plain object + * @param {ibc.core.connection.v1.Msg.ConnectionOpenInitCallback} callback Node-style callback called with the error, if any, and MsgConnectionOpenInitResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Msg.prototype.connectionOpenInit = function connectionOpenInit(request, callback) { + return this.rpcCall(connectionOpenInit, $root.ibc.core.connection.v1.MsgConnectionOpenInit, $root.ibc.core.connection.v1.MsgConnectionOpenInitResponse, request, callback); + }, "name", { value: "ConnectionOpenInit" }); + + /** + * Calls ConnectionOpenInit. + * @function connectionOpenInit + * @memberof ibc.core.connection.v1.Msg + * @instance + * @param {ibc.core.connection.v1.IMsgConnectionOpenInit} request MsgConnectionOpenInit message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link ibc.core.connection.v1.Msg#connectionOpenTry}. + * @memberof ibc.core.connection.v1.Msg + * @typedef ConnectionOpenTryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {ibc.core.connection.v1.IMsgConnectionOpenTryResponse} [response] MsgConnectionOpenTryResponse + */ + + /** + * Calls ConnectionOpenTry. + * @function connectionOpenTry + * @memberof ibc.core.connection.v1.Msg + * @instance + * @param {ibc.core.connection.v1.IMsgConnectionOpenTry} request MsgConnectionOpenTry message or plain object + * @param {ibc.core.connection.v1.Msg.ConnectionOpenTryCallback} callback Node-style callback called with the error, if any, and MsgConnectionOpenTryResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Msg.prototype.connectionOpenTry = function connectionOpenTry(request, callback) { + return this.rpcCall(connectionOpenTry, $root.ibc.core.connection.v1.MsgConnectionOpenTry, $root.ibc.core.connection.v1.MsgConnectionOpenTryResponse, request, callback); + }, "name", { value: "ConnectionOpenTry" }); + + /** + * Calls ConnectionOpenTry. + * @function connectionOpenTry + * @memberof ibc.core.connection.v1.Msg + * @instance + * @param {ibc.core.connection.v1.IMsgConnectionOpenTry} request MsgConnectionOpenTry message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link ibc.core.connection.v1.Msg#connectionOpenAck}. + * @memberof ibc.core.connection.v1.Msg + * @typedef ConnectionOpenAckCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {ibc.core.connection.v1.IMsgConnectionOpenAckResponse} [response] MsgConnectionOpenAckResponse + */ + + /** + * Calls ConnectionOpenAck. + * @function connectionOpenAck + * @memberof ibc.core.connection.v1.Msg + * @instance + * @param {ibc.core.connection.v1.IMsgConnectionOpenAck} request MsgConnectionOpenAck message or plain object + * @param {ibc.core.connection.v1.Msg.ConnectionOpenAckCallback} callback Node-style callback called with the error, if any, and MsgConnectionOpenAckResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Msg.prototype.connectionOpenAck = function connectionOpenAck(request, callback) { + return this.rpcCall(connectionOpenAck, $root.ibc.core.connection.v1.MsgConnectionOpenAck, $root.ibc.core.connection.v1.MsgConnectionOpenAckResponse, request, callback); + }, "name", { value: "ConnectionOpenAck" }); + + /** + * Calls ConnectionOpenAck. + * @function connectionOpenAck + * @memberof ibc.core.connection.v1.Msg + * @instance + * @param {ibc.core.connection.v1.IMsgConnectionOpenAck} request MsgConnectionOpenAck message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link ibc.core.connection.v1.Msg#connectionOpenConfirm}. + * @memberof ibc.core.connection.v1.Msg + * @typedef ConnectionOpenConfirmCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {ibc.core.connection.v1.IMsgConnectionOpenConfirmResponse} [response] MsgConnectionOpenConfirmResponse + */ + + /** + * Calls ConnectionOpenConfirm. + * @function connectionOpenConfirm + * @memberof ibc.core.connection.v1.Msg + * @instance + * @param {ibc.core.connection.v1.IMsgConnectionOpenConfirm} request MsgConnectionOpenConfirm message or plain object + * @param {ibc.core.connection.v1.Msg.ConnectionOpenConfirmCallback} callback Node-style callback called with the error, if any, and MsgConnectionOpenConfirmResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Msg.prototype.connectionOpenConfirm = function connectionOpenConfirm(request, callback) { + return this.rpcCall(connectionOpenConfirm, $root.ibc.core.connection.v1.MsgConnectionOpenConfirm, $root.ibc.core.connection.v1.MsgConnectionOpenConfirmResponse, request, callback); + }, "name", { value: "ConnectionOpenConfirm" }); + + /** + * Calls ConnectionOpenConfirm. + * @function connectionOpenConfirm + * @memberof ibc.core.connection.v1.Msg + * @instance + * @param {ibc.core.connection.v1.IMsgConnectionOpenConfirm} request MsgConnectionOpenConfirm message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Msg; + })(v1.Msg || {}); + + v1.MsgConnectionOpenInit = (function(MsgConnectionOpenInit) { + + /** + * Properties of a MsgConnectionOpenInit. + * @memberof ibc.core.connection.v1 + * @interface IMsgConnectionOpenInit + * @property {string|null} [clientId] MsgConnectionOpenInit clientId + * @property {ibc.core.connection.v1.ICounterparty|null} [counterparty] MsgConnectionOpenInit counterparty + * @property {ibc.core.connection.v1.IVersion|null} [version] MsgConnectionOpenInit version + * @property {number|Long|null} [delayPeriod] MsgConnectionOpenInit delayPeriod + * @property {string|null} [signer] MsgConnectionOpenInit signer + */ + + /** + * Constructs a new MsgConnectionOpenInit. + * @memberof ibc.core.connection.v1 + * @classdesc Represents a MsgConnectionOpenInit. + * @implements IMsgConnectionOpenInit + * @constructor + * @param {ibc.core.connection.v1.IMsgConnectionOpenInit=} [properties] Properties to set + */ + function MsgConnectionOpenInit(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgConnectionOpenInit clientId. + * @member {string} clientId + * @memberof ibc.core.connection.v1.MsgConnectionOpenInit + * @instance + */ + MsgConnectionOpenInit.prototype.clientId = ""; + + /** + * MsgConnectionOpenInit counterparty. + * @member {ibc.core.connection.v1.ICounterparty|null|undefined} counterparty + * @memberof ibc.core.connection.v1.MsgConnectionOpenInit + * @instance + */ + MsgConnectionOpenInit.prototype.counterparty = null; + + /** + * MsgConnectionOpenInit version. + * @member {ibc.core.connection.v1.IVersion|null|undefined} version + * @memberof ibc.core.connection.v1.MsgConnectionOpenInit + * @instance + */ + MsgConnectionOpenInit.prototype.version = null; + + /** + * MsgConnectionOpenInit delayPeriod. + * @member {number|Long} delayPeriod + * @memberof ibc.core.connection.v1.MsgConnectionOpenInit + * @instance + */ + MsgConnectionOpenInit.prototype.delayPeriod = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * MsgConnectionOpenInit signer. + * @member {string} signer + * @memberof ibc.core.connection.v1.MsgConnectionOpenInit + * @instance + */ + MsgConnectionOpenInit.prototype.signer = ""; + + /** + * Creates a new MsgConnectionOpenInit instance using the specified properties. + * @function create + * @memberof ibc.core.connection.v1.MsgConnectionOpenInit + * @static + * @param {ibc.core.connection.v1.IMsgConnectionOpenInit=} [properties] Properties to set + * @returns {ibc.core.connection.v1.MsgConnectionOpenInit} MsgConnectionOpenInit instance + */ + MsgConnectionOpenInit.create = function create(properties) { + return new MsgConnectionOpenInit(properties); + }; + + /** + * Encodes the specified MsgConnectionOpenInit message. Does not implicitly {@link ibc.core.connection.v1.MsgConnectionOpenInit.verify|verify} messages. + * @function encode + * @memberof ibc.core.connection.v1.MsgConnectionOpenInit + * @static + * @param {ibc.core.connection.v1.IMsgConnectionOpenInit} message MsgConnectionOpenInit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgConnectionOpenInit.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.clientId != null && Object.hasOwnProperty.call(message, "clientId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.clientId); + if (message.counterparty != null && Object.hasOwnProperty.call(message, "counterparty")) + $root.ibc.core.connection.v1.Counterparty.encode(message.counterparty, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + $root.ibc.core.connection.v1.Version.encode(message.version, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.delayPeriod != null && Object.hasOwnProperty.call(message, "delayPeriod")) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.delayPeriod); + if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.signer); + return writer; + }; + + /** + * Encodes the specified MsgConnectionOpenInit message, length delimited. Does not implicitly {@link ibc.core.connection.v1.MsgConnectionOpenInit.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.connection.v1.MsgConnectionOpenInit + * @static + * @param {ibc.core.connection.v1.IMsgConnectionOpenInit} message MsgConnectionOpenInit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgConnectionOpenInit.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgConnectionOpenInit message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.connection.v1.MsgConnectionOpenInit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.connection.v1.MsgConnectionOpenInit} MsgConnectionOpenInit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgConnectionOpenInit.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.connection.v1.MsgConnectionOpenInit(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.clientId = reader.string(); + break; + case 2: + message.counterparty = $root.ibc.core.connection.v1.Counterparty.decode(reader, reader.uint32()); + break; + case 3: + message.version = $root.ibc.core.connection.v1.Version.decode(reader, reader.uint32()); + break; + case 4: + message.delayPeriod = reader.uint64(); + break; + case 5: + message.signer = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgConnectionOpenInit message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.connection.v1.MsgConnectionOpenInit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.connection.v1.MsgConnectionOpenInit} MsgConnectionOpenInit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgConnectionOpenInit.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgConnectionOpenInit message. + * @function verify + * @memberof ibc.core.connection.v1.MsgConnectionOpenInit + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgConnectionOpenInit.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.clientId != null && message.hasOwnProperty("clientId")) + if (!$util.isString(message.clientId)) + return "clientId: string expected"; + if (message.counterparty != null && message.hasOwnProperty("counterparty")) { + let error = $root.ibc.core.connection.v1.Counterparty.verify(message.counterparty); + if (error) + return "counterparty." + error; + } + if (message.version != null && message.hasOwnProperty("version")) { + let error = $root.ibc.core.connection.v1.Version.verify(message.version); + if (error) + return "version." + error; + } + if (message.delayPeriod != null && message.hasOwnProperty("delayPeriod")) + if (!$util.isInteger(message.delayPeriod) && !(message.delayPeriod && $util.isInteger(message.delayPeriod.low) && $util.isInteger(message.delayPeriod.high))) + return "delayPeriod: integer|Long expected"; + if (message.signer != null && message.hasOwnProperty("signer")) + if (!$util.isString(message.signer)) + return "signer: string expected"; + return null; + }; + + /** + * Creates a MsgConnectionOpenInit message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.connection.v1.MsgConnectionOpenInit + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.connection.v1.MsgConnectionOpenInit} MsgConnectionOpenInit + */ + MsgConnectionOpenInit.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.connection.v1.MsgConnectionOpenInit) + return object; + let message = new $root.ibc.core.connection.v1.MsgConnectionOpenInit(); + if (object.clientId != null) + message.clientId = String(object.clientId); + if (object.counterparty != null) { + if (typeof object.counterparty !== "object") + throw TypeError(".ibc.core.connection.v1.MsgConnectionOpenInit.counterparty: object expected"); + message.counterparty = $root.ibc.core.connection.v1.Counterparty.fromObject(object.counterparty); + } + if (object.version != null) { + if (typeof object.version !== "object") + throw TypeError(".ibc.core.connection.v1.MsgConnectionOpenInit.version: object expected"); + message.version = $root.ibc.core.connection.v1.Version.fromObject(object.version); + } + if (object.delayPeriod != null) + if ($util.Long) + (message.delayPeriod = $util.Long.fromValue(object.delayPeriod)).unsigned = true; + else if (typeof object.delayPeriod === "string") + message.delayPeriod = parseInt(object.delayPeriod, 10); + else if (typeof object.delayPeriod === "number") + message.delayPeriod = object.delayPeriod; + else if (typeof object.delayPeriod === "object") + message.delayPeriod = new $util.LongBits(object.delayPeriod.low >>> 0, object.delayPeriod.high >>> 0).toNumber(true); + if (object.signer != null) + message.signer = String(object.signer); + return message; + }; + + /** + * Creates a plain object from a MsgConnectionOpenInit message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.connection.v1.MsgConnectionOpenInit + * @static + * @param {ibc.core.connection.v1.MsgConnectionOpenInit} message MsgConnectionOpenInit + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgConnectionOpenInit.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.clientId = ""; + object.counterparty = null; + object.version = null; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.delayPeriod = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.delayPeriod = options.longs === String ? "0" : 0; + object.signer = ""; + } + if (message.clientId != null && message.hasOwnProperty("clientId")) + object.clientId = message.clientId; + if (message.counterparty != null && message.hasOwnProperty("counterparty")) + object.counterparty = $root.ibc.core.connection.v1.Counterparty.toObject(message.counterparty, options); + if (message.version != null && message.hasOwnProperty("version")) + object.version = $root.ibc.core.connection.v1.Version.toObject(message.version, options); + if (message.delayPeriod != null && message.hasOwnProperty("delayPeriod")) + if (typeof message.delayPeriod === "number") + object.delayPeriod = options.longs === String ? String(message.delayPeriod) : message.delayPeriod; + else + object.delayPeriod = options.longs === String ? $util.Long.prototype.toString.call(message.delayPeriod) : options.longs === Number ? new $util.LongBits(message.delayPeriod.low >>> 0, message.delayPeriod.high >>> 0).toNumber(true) : message.delayPeriod; + if (message.signer != null && message.hasOwnProperty("signer")) + object.signer = message.signer; + return object; + }; + + /** + * Converts this MsgConnectionOpenInit to JSON. + * @function toJSON + * @memberof ibc.core.connection.v1.MsgConnectionOpenInit + * @instance + * @returns {Object.} JSON object + */ + MsgConnectionOpenInit.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgConnectionOpenInit; + })(v1.MsgConnectionOpenInit || {}); + + v1.MsgConnectionOpenInitResponse = (function(MsgConnectionOpenInitResponse) { + + /** + * Properties of a MsgConnectionOpenInitResponse. + * @memberof ibc.core.connection.v1 + * @interface IMsgConnectionOpenInitResponse + */ + + /** + * Constructs a new MsgConnectionOpenInitResponse. + * @memberof ibc.core.connection.v1 + * @classdesc Represents a MsgConnectionOpenInitResponse. + * @implements IMsgConnectionOpenInitResponse + * @constructor + * @param {ibc.core.connection.v1.IMsgConnectionOpenInitResponse=} [properties] Properties to set + */ + function MsgConnectionOpenInitResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new MsgConnectionOpenInitResponse instance using the specified properties. + * @function create + * @memberof ibc.core.connection.v1.MsgConnectionOpenInitResponse + * @static + * @param {ibc.core.connection.v1.IMsgConnectionOpenInitResponse=} [properties] Properties to set + * @returns {ibc.core.connection.v1.MsgConnectionOpenInitResponse} MsgConnectionOpenInitResponse instance + */ + MsgConnectionOpenInitResponse.create = function create(properties) { + return new MsgConnectionOpenInitResponse(properties); + }; + + /** + * Encodes the specified MsgConnectionOpenInitResponse message. Does not implicitly {@link ibc.core.connection.v1.MsgConnectionOpenInitResponse.verify|verify} messages. + * @function encode + * @memberof ibc.core.connection.v1.MsgConnectionOpenInitResponse + * @static + * @param {ibc.core.connection.v1.IMsgConnectionOpenInitResponse} message MsgConnectionOpenInitResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgConnectionOpenInitResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MsgConnectionOpenInitResponse message, length delimited. Does not implicitly {@link ibc.core.connection.v1.MsgConnectionOpenInitResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.connection.v1.MsgConnectionOpenInitResponse + * @static + * @param {ibc.core.connection.v1.IMsgConnectionOpenInitResponse} message MsgConnectionOpenInitResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgConnectionOpenInitResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgConnectionOpenInitResponse message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.connection.v1.MsgConnectionOpenInitResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.connection.v1.MsgConnectionOpenInitResponse} MsgConnectionOpenInitResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgConnectionOpenInitResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.connection.v1.MsgConnectionOpenInitResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgConnectionOpenInitResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.connection.v1.MsgConnectionOpenInitResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.connection.v1.MsgConnectionOpenInitResponse} MsgConnectionOpenInitResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgConnectionOpenInitResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgConnectionOpenInitResponse message. + * @function verify + * @memberof ibc.core.connection.v1.MsgConnectionOpenInitResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgConnectionOpenInitResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MsgConnectionOpenInitResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.connection.v1.MsgConnectionOpenInitResponse + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.connection.v1.MsgConnectionOpenInitResponse} MsgConnectionOpenInitResponse + */ + MsgConnectionOpenInitResponse.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.connection.v1.MsgConnectionOpenInitResponse) + return object; + return new $root.ibc.core.connection.v1.MsgConnectionOpenInitResponse(); + }; + + /** + * Creates a plain object from a MsgConnectionOpenInitResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.connection.v1.MsgConnectionOpenInitResponse + * @static + * @param {ibc.core.connection.v1.MsgConnectionOpenInitResponse} message MsgConnectionOpenInitResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgConnectionOpenInitResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MsgConnectionOpenInitResponse to JSON. + * @function toJSON + * @memberof ibc.core.connection.v1.MsgConnectionOpenInitResponse + * @instance + * @returns {Object.} JSON object + */ + MsgConnectionOpenInitResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgConnectionOpenInitResponse; + })(v1.MsgConnectionOpenInitResponse || {}); + + v1.MsgConnectionOpenTry = (function(MsgConnectionOpenTry) { + + /** + * Properties of a MsgConnectionOpenTry. + * @memberof ibc.core.connection.v1 + * @interface IMsgConnectionOpenTry + * @property {string|null} [clientId] MsgConnectionOpenTry clientId + * @property {string|null} [previousConnectionId] MsgConnectionOpenTry previousConnectionId + * @property {google.protobuf.IAny|null} [clientState] MsgConnectionOpenTry clientState + * @property {ibc.core.connection.v1.ICounterparty|null} [counterparty] MsgConnectionOpenTry counterparty + * @property {number|Long|null} [delayPeriod] MsgConnectionOpenTry delayPeriod + * @property {Array.|null} [counterpartyVersions] MsgConnectionOpenTry counterpartyVersions + * @property {ibc.core.client.v1.IHeight|null} [proofHeight] MsgConnectionOpenTry proofHeight + * @property {Uint8Array|null} [proofInit] MsgConnectionOpenTry proofInit + * @property {Uint8Array|null} [proofClient] MsgConnectionOpenTry proofClient + * @property {Uint8Array|null} [proofConsensus] MsgConnectionOpenTry proofConsensus + * @property {ibc.core.client.v1.IHeight|null} [consensusHeight] MsgConnectionOpenTry consensusHeight + * @property {string|null} [signer] MsgConnectionOpenTry signer + */ + + /** + * Constructs a new MsgConnectionOpenTry. + * @memberof ibc.core.connection.v1 + * @classdesc Represents a MsgConnectionOpenTry. + * @implements IMsgConnectionOpenTry + * @constructor + * @param {ibc.core.connection.v1.IMsgConnectionOpenTry=} [properties] Properties to set + */ + function MsgConnectionOpenTry(properties) { + this.counterpartyVersions = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgConnectionOpenTry clientId. + * @member {string} clientId + * @memberof ibc.core.connection.v1.MsgConnectionOpenTry + * @instance + */ + MsgConnectionOpenTry.prototype.clientId = ""; + + /** + * MsgConnectionOpenTry previousConnectionId. + * @member {string} previousConnectionId + * @memberof ibc.core.connection.v1.MsgConnectionOpenTry + * @instance + */ + MsgConnectionOpenTry.prototype.previousConnectionId = ""; + + /** + * MsgConnectionOpenTry clientState. + * @member {google.protobuf.IAny|null|undefined} clientState + * @memberof ibc.core.connection.v1.MsgConnectionOpenTry + * @instance + */ + MsgConnectionOpenTry.prototype.clientState = null; + + /** + * MsgConnectionOpenTry counterparty. + * @member {ibc.core.connection.v1.ICounterparty|null|undefined} counterparty + * @memberof ibc.core.connection.v1.MsgConnectionOpenTry + * @instance + */ + MsgConnectionOpenTry.prototype.counterparty = null; + + /** + * MsgConnectionOpenTry delayPeriod. + * @member {number|Long} delayPeriod + * @memberof ibc.core.connection.v1.MsgConnectionOpenTry + * @instance + */ + MsgConnectionOpenTry.prototype.delayPeriod = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * MsgConnectionOpenTry counterpartyVersions. + * @member {Array.} counterpartyVersions + * @memberof ibc.core.connection.v1.MsgConnectionOpenTry + * @instance + */ + MsgConnectionOpenTry.prototype.counterpartyVersions = $util.emptyArray; + + /** + * MsgConnectionOpenTry proofHeight. + * @member {ibc.core.client.v1.IHeight|null|undefined} proofHeight + * @memberof ibc.core.connection.v1.MsgConnectionOpenTry + * @instance + */ + MsgConnectionOpenTry.prototype.proofHeight = null; + + /** + * MsgConnectionOpenTry proofInit. + * @member {Uint8Array} proofInit + * @memberof ibc.core.connection.v1.MsgConnectionOpenTry + * @instance + */ + MsgConnectionOpenTry.prototype.proofInit = $util.newBuffer([]); + + /** + * MsgConnectionOpenTry proofClient. + * @member {Uint8Array} proofClient + * @memberof ibc.core.connection.v1.MsgConnectionOpenTry + * @instance + */ + MsgConnectionOpenTry.prototype.proofClient = $util.newBuffer([]); + + /** + * MsgConnectionOpenTry proofConsensus. + * @member {Uint8Array} proofConsensus + * @memberof ibc.core.connection.v1.MsgConnectionOpenTry + * @instance + */ + MsgConnectionOpenTry.prototype.proofConsensus = $util.newBuffer([]); + + /** + * MsgConnectionOpenTry consensusHeight. + * @member {ibc.core.client.v1.IHeight|null|undefined} consensusHeight + * @memberof ibc.core.connection.v1.MsgConnectionOpenTry + * @instance + */ + MsgConnectionOpenTry.prototype.consensusHeight = null; + + /** + * MsgConnectionOpenTry signer. + * @member {string} signer + * @memberof ibc.core.connection.v1.MsgConnectionOpenTry + * @instance + */ + MsgConnectionOpenTry.prototype.signer = ""; + + /** + * Creates a new MsgConnectionOpenTry instance using the specified properties. + * @function create + * @memberof ibc.core.connection.v1.MsgConnectionOpenTry + * @static + * @param {ibc.core.connection.v1.IMsgConnectionOpenTry=} [properties] Properties to set + * @returns {ibc.core.connection.v1.MsgConnectionOpenTry} MsgConnectionOpenTry instance + */ + MsgConnectionOpenTry.create = function create(properties) { + return new MsgConnectionOpenTry(properties); + }; + + /** + * Encodes the specified MsgConnectionOpenTry message. Does not implicitly {@link ibc.core.connection.v1.MsgConnectionOpenTry.verify|verify} messages. + * @function encode + * @memberof ibc.core.connection.v1.MsgConnectionOpenTry + * @static + * @param {ibc.core.connection.v1.IMsgConnectionOpenTry} message MsgConnectionOpenTry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgConnectionOpenTry.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.clientId != null && Object.hasOwnProperty.call(message, "clientId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.clientId); + if (message.previousConnectionId != null && Object.hasOwnProperty.call(message, "previousConnectionId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.previousConnectionId); + if (message.clientState != null && Object.hasOwnProperty.call(message, "clientState")) + $root.google.protobuf.Any.encode(message.clientState, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.counterparty != null && Object.hasOwnProperty.call(message, "counterparty")) + $root.ibc.core.connection.v1.Counterparty.encode(message.counterparty, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.delayPeriod != null && Object.hasOwnProperty.call(message, "delayPeriod")) + writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.delayPeriod); + if (message.counterpartyVersions != null && message.counterpartyVersions.length) + for (let i = 0; i < message.counterpartyVersions.length; ++i) + $root.ibc.core.connection.v1.Version.encode(message.counterpartyVersions[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.proofHeight != null && Object.hasOwnProperty.call(message, "proofHeight")) + $root.ibc.core.client.v1.Height.encode(message.proofHeight, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.proofInit != null && Object.hasOwnProperty.call(message, "proofInit")) + writer.uint32(/* id 8, wireType 2 =*/66).bytes(message.proofInit); + if (message.proofClient != null && Object.hasOwnProperty.call(message, "proofClient")) + writer.uint32(/* id 9, wireType 2 =*/74).bytes(message.proofClient); + if (message.proofConsensus != null && Object.hasOwnProperty.call(message, "proofConsensus")) + writer.uint32(/* id 10, wireType 2 =*/82).bytes(message.proofConsensus); + if (message.consensusHeight != null && Object.hasOwnProperty.call(message, "consensusHeight")) + $root.ibc.core.client.v1.Height.encode(message.consensusHeight, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.signer); + return writer; + }; + + /** + * Encodes the specified MsgConnectionOpenTry message, length delimited. Does not implicitly {@link ibc.core.connection.v1.MsgConnectionOpenTry.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.connection.v1.MsgConnectionOpenTry + * @static + * @param {ibc.core.connection.v1.IMsgConnectionOpenTry} message MsgConnectionOpenTry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgConnectionOpenTry.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgConnectionOpenTry message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.connection.v1.MsgConnectionOpenTry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.connection.v1.MsgConnectionOpenTry} MsgConnectionOpenTry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgConnectionOpenTry.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.connection.v1.MsgConnectionOpenTry(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.clientId = reader.string(); + break; + case 2: + message.previousConnectionId = reader.string(); + break; + case 3: + message.clientState = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + case 4: + message.counterparty = $root.ibc.core.connection.v1.Counterparty.decode(reader, reader.uint32()); + break; + case 5: + message.delayPeriod = reader.uint64(); + break; + case 6: + if (!(message.counterpartyVersions && message.counterpartyVersions.length)) + message.counterpartyVersions = []; + message.counterpartyVersions.push($root.ibc.core.connection.v1.Version.decode(reader, reader.uint32())); + break; + case 7: + message.proofHeight = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); + break; + case 8: + message.proofInit = reader.bytes(); + break; + case 9: + message.proofClient = reader.bytes(); + break; + case 10: + message.proofConsensus = reader.bytes(); + break; + case 11: + message.consensusHeight = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); + break; + case 12: + message.signer = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgConnectionOpenTry message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.connection.v1.MsgConnectionOpenTry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.connection.v1.MsgConnectionOpenTry} MsgConnectionOpenTry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgConnectionOpenTry.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgConnectionOpenTry message. + * @function verify + * @memberof ibc.core.connection.v1.MsgConnectionOpenTry + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgConnectionOpenTry.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.clientId != null && message.hasOwnProperty("clientId")) + if (!$util.isString(message.clientId)) + return "clientId: string expected"; + if (message.previousConnectionId != null && message.hasOwnProperty("previousConnectionId")) + if (!$util.isString(message.previousConnectionId)) + return "previousConnectionId: string expected"; + if (message.clientState != null && message.hasOwnProperty("clientState")) { + let error = $root.google.protobuf.Any.verify(message.clientState); + if (error) + return "clientState." + error; + } + if (message.counterparty != null && message.hasOwnProperty("counterparty")) { + let error = $root.ibc.core.connection.v1.Counterparty.verify(message.counterparty); + if (error) + return "counterparty." + error; + } + if (message.delayPeriod != null && message.hasOwnProperty("delayPeriod")) + if (!$util.isInteger(message.delayPeriod) && !(message.delayPeriod && $util.isInteger(message.delayPeriod.low) && $util.isInteger(message.delayPeriod.high))) + return "delayPeriod: integer|Long expected"; + if (message.counterpartyVersions != null && message.hasOwnProperty("counterpartyVersions")) { + if (!Array.isArray(message.counterpartyVersions)) + return "counterpartyVersions: array expected"; + for (let i = 0; i < message.counterpartyVersions.length; ++i) { + let error = $root.ibc.core.connection.v1.Version.verify(message.counterpartyVersions[i]); + if (error) + return "counterpartyVersions." + error; + } + } + if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) { + let error = $root.ibc.core.client.v1.Height.verify(message.proofHeight); + if (error) + return "proofHeight." + error; + } + if (message.proofInit != null && message.hasOwnProperty("proofInit")) + if (!(message.proofInit && typeof message.proofInit.length === "number" || $util.isString(message.proofInit))) + return "proofInit: buffer expected"; + if (message.proofClient != null && message.hasOwnProperty("proofClient")) + if (!(message.proofClient && typeof message.proofClient.length === "number" || $util.isString(message.proofClient))) + return "proofClient: buffer expected"; + if (message.proofConsensus != null && message.hasOwnProperty("proofConsensus")) + if (!(message.proofConsensus && typeof message.proofConsensus.length === "number" || $util.isString(message.proofConsensus))) + return "proofConsensus: buffer expected"; + if (message.consensusHeight != null && message.hasOwnProperty("consensusHeight")) { + let error = $root.ibc.core.client.v1.Height.verify(message.consensusHeight); + if (error) + return "consensusHeight." + error; + } + if (message.signer != null && message.hasOwnProperty("signer")) + if (!$util.isString(message.signer)) + return "signer: string expected"; + return null; + }; + + /** + * Creates a MsgConnectionOpenTry message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.connection.v1.MsgConnectionOpenTry + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.connection.v1.MsgConnectionOpenTry} MsgConnectionOpenTry + */ + MsgConnectionOpenTry.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.connection.v1.MsgConnectionOpenTry) + return object; + let message = new $root.ibc.core.connection.v1.MsgConnectionOpenTry(); + if (object.clientId != null) + message.clientId = String(object.clientId); + if (object.previousConnectionId != null) + message.previousConnectionId = String(object.previousConnectionId); + if (object.clientState != null) { + if (typeof object.clientState !== "object") + throw TypeError(".ibc.core.connection.v1.MsgConnectionOpenTry.clientState: object expected"); + message.clientState = $root.google.protobuf.Any.fromObject(object.clientState); + } + if (object.counterparty != null) { + if (typeof object.counterparty !== "object") + throw TypeError(".ibc.core.connection.v1.MsgConnectionOpenTry.counterparty: object expected"); + message.counterparty = $root.ibc.core.connection.v1.Counterparty.fromObject(object.counterparty); + } + if (object.delayPeriod != null) + if ($util.Long) + (message.delayPeriod = $util.Long.fromValue(object.delayPeriod)).unsigned = true; + else if (typeof object.delayPeriod === "string") + message.delayPeriod = parseInt(object.delayPeriod, 10); + else if (typeof object.delayPeriod === "number") + message.delayPeriod = object.delayPeriod; + else if (typeof object.delayPeriod === "object") + message.delayPeriod = new $util.LongBits(object.delayPeriod.low >>> 0, object.delayPeriod.high >>> 0).toNumber(true); + if (object.counterpartyVersions) { + if (!Array.isArray(object.counterpartyVersions)) + throw TypeError(".ibc.core.connection.v1.MsgConnectionOpenTry.counterpartyVersions: array expected"); + message.counterpartyVersions = []; + for (let i = 0; i < object.counterpartyVersions.length; ++i) { + if (typeof object.counterpartyVersions[i] !== "object") + throw TypeError(".ibc.core.connection.v1.MsgConnectionOpenTry.counterpartyVersions: object expected"); + message.counterpartyVersions[i] = $root.ibc.core.connection.v1.Version.fromObject(object.counterpartyVersions[i]); + } + } + if (object.proofHeight != null) { + if (typeof object.proofHeight !== "object") + throw TypeError(".ibc.core.connection.v1.MsgConnectionOpenTry.proofHeight: object expected"); + message.proofHeight = $root.ibc.core.client.v1.Height.fromObject(object.proofHeight); + } + if (object.proofInit != null) + if (typeof object.proofInit === "string") + $util.base64.decode(object.proofInit, message.proofInit = $util.newBuffer($util.base64.length(object.proofInit)), 0); + else if (object.proofInit.length) + message.proofInit = object.proofInit; + if (object.proofClient != null) + if (typeof object.proofClient === "string") + $util.base64.decode(object.proofClient, message.proofClient = $util.newBuffer($util.base64.length(object.proofClient)), 0); + else if (object.proofClient.length) + message.proofClient = object.proofClient; + if (object.proofConsensus != null) + if (typeof object.proofConsensus === "string") + $util.base64.decode(object.proofConsensus, message.proofConsensus = $util.newBuffer($util.base64.length(object.proofConsensus)), 0); + else if (object.proofConsensus.length) + message.proofConsensus = object.proofConsensus; + if (object.consensusHeight != null) { + if (typeof object.consensusHeight !== "object") + throw TypeError(".ibc.core.connection.v1.MsgConnectionOpenTry.consensusHeight: object expected"); + message.consensusHeight = $root.ibc.core.client.v1.Height.fromObject(object.consensusHeight); + } + if (object.signer != null) + message.signer = String(object.signer); + return message; + }; + + /** + * Creates a plain object from a MsgConnectionOpenTry message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.connection.v1.MsgConnectionOpenTry + * @static + * @param {ibc.core.connection.v1.MsgConnectionOpenTry} message MsgConnectionOpenTry + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgConnectionOpenTry.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.counterpartyVersions = []; + if (options.defaults) { + object.clientId = ""; + object.previousConnectionId = ""; + object.clientState = null; + object.counterparty = null; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.delayPeriod = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.delayPeriod = options.longs === String ? "0" : 0; + object.proofHeight = null; + if (options.bytes === String) + object.proofInit = ""; + else { + object.proofInit = []; + if (options.bytes !== Array) + object.proofInit = $util.newBuffer(object.proofInit); + } + if (options.bytes === String) + object.proofClient = ""; + else { + object.proofClient = []; + if (options.bytes !== Array) + object.proofClient = $util.newBuffer(object.proofClient); + } + if (options.bytes === String) + object.proofConsensus = ""; + else { + object.proofConsensus = []; + if (options.bytes !== Array) + object.proofConsensus = $util.newBuffer(object.proofConsensus); + } + object.consensusHeight = null; + object.signer = ""; + } + if (message.clientId != null && message.hasOwnProperty("clientId")) + object.clientId = message.clientId; + if (message.previousConnectionId != null && message.hasOwnProperty("previousConnectionId")) + object.previousConnectionId = message.previousConnectionId; + if (message.clientState != null && message.hasOwnProperty("clientState")) + object.clientState = $root.google.protobuf.Any.toObject(message.clientState, options); + if (message.counterparty != null && message.hasOwnProperty("counterparty")) + object.counterparty = $root.ibc.core.connection.v1.Counterparty.toObject(message.counterparty, options); + if (message.delayPeriod != null && message.hasOwnProperty("delayPeriod")) + if (typeof message.delayPeriod === "number") + object.delayPeriod = options.longs === String ? String(message.delayPeriod) : message.delayPeriod; + else + object.delayPeriod = options.longs === String ? $util.Long.prototype.toString.call(message.delayPeriod) : options.longs === Number ? new $util.LongBits(message.delayPeriod.low >>> 0, message.delayPeriod.high >>> 0).toNumber(true) : message.delayPeriod; + if (message.counterpartyVersions && message.counterpartyVersions.length) { + object.counterpartyVersions = []; + for (let j = 0; j < message.counterpartyVersions.length; ++j) + object.counterpartyVersions[j] = $root.ibc.core.connection.v1.Version.toObject(message.counterpartyVersions[j], options); + } + if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) + object.proofHeight = $root.ibc.core.client.v1.Height.toObject(message.proofHeight, options); + if (message.proofInit != null && message.hasOwnProperty("proofInit")) + object.proofInit = options.bytes === String ? $util.base64.encode(message.proofInit, 0, message.proofInit.length) : options.bytes === Array ? Array.prototype.slice.call(message.proofInit) : message.proofInit; + if (message.proofClient != null && message.hasOwnProperty("proofClient")) + object.proofClient = options.bytes === String ? $util.base64.encode(message.proofClient, 0, message.proofClient.length) : options.bytes === Array ? Array.prototype.slice.call(message.proofClient) : message.proofClient; + if (message.proofConsensus != null && message.hasOwnProperty("proofConsensus")) + object.proofConsensus = options.bytes === String ? $util.base64.encode(message.proofConsensus, 0, message.proofConsensus.length) : options.bytes === Array ? Array.prototype.slice.call(message.proofConsensus) : message.proofConsensus; + if (message.consensusHeight != null && message.hasOwnProperty("consensusHeight")) + object.consensusHeight = $root.ibc.core.client.v1.Height.toObject(message.consensusHeight, options); + if (message.signer != null && message.hasOwnProperty("signer")) + object.signer = message.signer; + return object; + }; + + /** + * Converts this MsgConnectionOpenTry to JSON. + * @function toJSON + * @memberof ibc.core.connection.v1.MsgConnectionOpenTry + * @instance + * @returns {Object.} JSON object + */ + MsgConnectionOpenTry.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgConnectionOpenTry; + })(v1.MsgConnectionOpenTry || {}); + + v1.MsgConnectionOpenTryResponse = (function(MsgConnectionOpenTryResponse) { + + /** + * Properties of a MsgConnectionOpenTryResponse. + * @memberof ibc.core.connection.v1 + * @interface IMsgConnectionOpenTryResponse + */ + + /** + * Constructs a new MsgConnectionOpenTryResponse. + * @memberof ibc.core.connection.v1 + * @classdesc Represents a MsgConnectionOpenTryResponse. + * @implements IMsgConnectionOpenTryResponse + * @constructor + * @param {ibc.core.connection.v1.IMsgConnectionOpenTryResponse=} [properties] Properties to set + */ + function MsgConnectionOpenTryResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new MsgConnectionOpenTryResponse instance using the specified properties. + * @function create + * @memberof ibc.core.connection.v1.MsgConnectionOpenTryResponse + * @static + * @param {ibc.core.connection.v1.IMsgConnectionOpenTryResponse=} [properties] Properties to set + * @returns {ibc.core.connection.v1.MsgConnectionOpenTryResponse} MsgConnectionOpenTryResponse instance + */ + MsgConnectionOpenTryResponse.create = function create(properties) { + return new MsgConnectionOpenTryResponse(properties); + }; + + /** + * Encodes the specified MsgConnectionOpenTryResponse message. Does not implicitly {@link ibc.core.connection.v1.MsgConnectionOpenTryResponse.verify|verify} messages. + * @function encode + * @memberof ibc.core.connection.v1.MsgConnectionOpenTryResponse + * @static + * @param {ibc.core.connection.v1.IMsgConnectionOpenTryResponse} message MsgConnectionOpenTryResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgConnectionOpenTryResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MsgConnectionOpenTryResponse message, length delimited. Does not implicitly {@link ibc.core.connection.v1.MsgConnectionOpenTryResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.connection.v1.MsgConnectionOpenTryResponse + * @static + * @param {ibc.core.connection.v1.IMsgConnectionOpenTryResponse} message MsgConnectionOpenTryResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgConnectionOpenTryResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgConnectionOpenTryResponse message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.connection.v1.MsgConnectionOpenTryResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.connection.v1.MsgConnectionOpenTryResponse} MsgConnectionOpenTryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgConnectionOpenTryResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.connection.v1.MsgConnectionOpenTryResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgConnectionOpenTryResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.connection.v1.MsgConnectionOpenTryResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.connection.v1.MsgConnectionOpenTryResponse} MsgConnectionOpenTryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgConnectionOpenTryResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgConnectionOpenTryResponse message. + * @function verify + * @memberof ibc.core.connection.v1.MsgConnectionOpenTryResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgConnectionOpenTryResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MsgConnectionOpenTryResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.connection.v1.MsgConnectionOpenTryResponse + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.connection.v1.MsgConnectionOpenTryResponse} MsgConnectionOpenTryResponse + */ + MsgConnectionOpenTryResponse.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.connection.v1.MsgConnectionOpenTryResponse) + return object; + return new $root.ibc.core.connection.v1.MsgConnectionOpenTryResponse(); + }; + + /** + * Creates a plain object from a MsgConnectionOpenTryResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.connection.v1.MsgConnectionOpenTryResponse + * @static + * @param {ibc.core.connection.v1.MsgConnectionOpenTryResponse} message MsgConnectionOpenTryResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgConnectionOpenTryResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MsgConnectionOpenTryResponse to JSON. + * @function toJSON + * @memberof ibc.core.connection.v1.MsgConnectionOpenTryResponse + * @instance + * @returns {Object.} JSON object + */ + MsgConnectionOpenTryResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgConnectionOpenTryResponse; + })(v1.MsgConnectionOpenTryResponse || {}); + + v1.MsgConnectionOpenAck = (function(MsgConnectionOpenAck) { + + /** + * Properties of a MsgConnectionOpenAck. + * @memberof ibc.core.connection.v1 + * @interface IMsgConnectionOpenAck + * @property {string|null} [connectionId] MsgConnectionOpenAck connectionId + * @property {string|null} [counterpartyConnectionId] MsgConnectionOpenAck counterpartyConnectionId + * @property {ibc.core.connection.v1.IVersion|null} [version] MsgConnectionOpenAck version + * @property {google.protobuf.IAny|null} [clientState] MsgConnectionOpenAck clientState + * @property {ibc.core.client.v1.IHeight|null} [proofHeight] MsgConnectionOpenAck proofHeight + * @property {Uint8Array|null} [proofTry] MsgConnectionOpenAck proofTry + * @property {Uint8Array|null} [proofClient] MsgConnectionOpenAck proofClient + * @property {Uint8Array|null} [proofConsensus] MsgConnectionOpenAck proofConsensus + * @property {ibc.core.client.v1.IHeight|null} [consensusHeight] MsgConnectionOpenAck consensusHeight + * @property {string|null} [signer] MsgConnectionOpenAck signer + */ + + /** + * Constructs a new MsgConnectionOpenAck. + * @memberof ibc.core.connection.v1 + * @classdesc Represents a MsgConnectionOpenAck. + * @implements IMsgConnectionOpenAck + * @constructor + * @param {ibc.core.connection.v1.IMsgConnectionOpenAck=} [properties] Properties to set + */ + function MsgConnectionOpenAck(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgConnectionOpenAck connectionId. + * @member {string} connectionId + * @memberof ibc.core.connection.v1.MsgConnectionOpenAck + * @instance + */ + MsgConnectionOpenAck.prototype.connectionId = ""; + + /** + * MsgConnectionOpenAck counterpartyConnectionId. + * @member {string} counterpartyConnectionId + * @memberof ibc.core.connection.v1.MsgConnectionOpenAck + * @instance + */ + MsgConnectionOpenAck.prototype.counterpartyConnectionId = ""; + + /** + * MsgConnectionOpenAck version. + * @member {ibc.core.connection.v1.IVersion|null|undefined} version + * @memberof ibc.core.connection.v1.MsgConnectionOpenAck + * @instance + */ + MsgConnectionOpenAck.prototype.version = null; + + /** + * MsgConnectionOpenAck clientState. + * @member {google.protobuf.IAny|null|undefined} clientState + * @memberof ibc.core.connection.v1.MsgConnectionOpenAck + * @instance + */ + MsgConnectionOpenAck.prototype.clientState = null; + + /** + * MsgConnectionOpenAck proofHeight. + * @member {ibc.core.client.v1.IHeight|null|undefined} proofHeight + * @memberof ibc.core.connection.v1.MsgConnectionOpenAck + * @instance + */ + MsgConnectionOpenAck.prototype.proofHeight = null; + + /** + * MsgConnectionOpenAck proofTry. + * @member {Uint8Array} proofTry + * @memberof ibc.core.connection.v1.MsgConnectionOpenAck + * @instance + */ + MsgConnectionOpenAck.prototype.proofTry = $util.newBuffer([]); + + /** + * MsgConnectionOpenAck proofClient. + * @member {Uint8Array} proofClient + * @memberof ibc.core.connection.v1.MsgConnectionOpenAck + * @instance + */ + MsgConnectionOpenAck.prototype.proofClient = $util.newBuffer([]); + + /** + * MsgConnectionOpenAck proofConsensus. + * @member {Uint8Array} proofConsensus + * @memberof ibc.core.connection.v1.MsgConnectionOpenAck + * @instance + */ + MsgConnectionOpenAck.prototype.proofConsensus = $util.newBuffer([]); + + /** + * MsgConnectionOpenAck consensusHeight. + * @member {ibc.core.client.v1.IHeight|null|undefined} consensusHeight + * @memberof ibc.core.connection.v1.MsgConnectionOpenAck + * @instance + */ + MsgConnectionOpenAck.prototype.consensusHeight = null; + + /** + * MsgConnectionOpenAck signer. + * @member {string} signer + * @memberof ibc.core.connection.v1.MsgConnectionOpenAck + * @instance + */ + MsgConnectionOpenAck.prototype.signer = ""; + + /** + * Creates a new MsgConnectionOpenAck instance using the specified properties. + * @function create + * @memberof ibc.core.connection.v1.MsgConnectionOpenAck + * @static + * @param {ibc.core.connection.v1.IMsgConnectionOpenAck=} [properties] Properties to set + * @returns {ibc.core.connection.v1.MsgConnectionOpenAck} MsgConnectionOpenAck instance + */ + MsgConnectionOpenAck.create = function create(properties) { + return new MsgConnectionOpenAck(properties); + }; + + /** + * Encodes the specified MsgConnectionOpenAck message. Does not implicitly {@link ibc.core.connection.v1.MsgConnectionOpenAck.verify|verify} messages. + * @function encode + * @memberof ibc.core.connection.v1.MsgConnectionOpenAck + * @static + * @param {ibc.core.connection.v1.IMsgConnectionOpenAck} message MsgConnectionOpenAck message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgConnectionOpenAck.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.connectionId != null && Object.hasOwnProperty.call(message, "connectionId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.connectionId); + if (message.counterpartyConnectionId != null && Object.hasOwnProperty.call(message, "counterpartyConnectionId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.counterpartyConnectionId); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + $root.ibc.core.connection.v1.Version.encode(message.version, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.clientState != null && Object.hasOwnProperty.call(message, "clientState")) + $root.google.protobuf.Any.encode(message.clientState, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.proofHeight != null && Object.hasOwnProperty.call(message, "proofHeight")) + $root.ibc.core.client.v1.Height.encode(message.proofHeight, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.proofTry != null && Object.hasOwnProperty.call(message, "proofTry")) + writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.proofTry); + if (message.proofClient != null && Object.hasOwnProperty.call(message, "proofClient")) + writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.proofClient); + if (message.proofConsensus != null && Object.hasOwnProperty.call(message, "proofConsensus")) + writer.uint32(/* id 8, wireType 2 =*/66).bytes(message.proofConsensus); + if (message.consensusHeight != null && Object.hasOwnProperty.call(message, "consensusHeight")) + $root.ibc.core.client.v1.Height.encode(message.consensusHeight, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.signer); + return writer; + }; + + /** + * Encodes the specified MsgConnectionOpenAck message, length delimited. Does not implicitly {@link ibc.core.connection.v1.MsgConnectionOpenAck.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.connection.v1.MsgConnectionOpenAck + * @static + * @param {ibc.core.connection.v1.IMsgConnectionOpenAck} message MsgConnectionOpenAck message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgConnectionOpenAck.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgConnectionOpenAck message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.connection.v1.MsgConnectionOpenAck + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.connection.v1.MsgConnectionOpenAck} MsgConnectionOpenAck + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgConnectionOpenAck.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.connection.v1.MsgConnectionOpenAck(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.connectionId = reader.string(); + break; + case 2: + message.counterpartyConnectionId = reader.string(); + break; + case 3: + message.version = $root.ibc.core.connection.v1.Version.decode(reader, reader.uint32()); + break; + case 4: + message.clientState = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + case 5: + message.proofHeight = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); + break; + case 6: + message.proofTry = reader.bytes(); + break; + case 7: + message.proofClient = reader.bytes(); + break; + case 8: + message.proofConsensus = reader.bytes(); + break; + case 9: + message.consensusHeight = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); + break; + case 10: + message.signer = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgConnectionOpenAck message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.connection.v1.MsgConnectionOpenAck + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.connection.v1.MsgConnectionOpenAck} MsgConnectionOpenAck + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgConnectionOpenAck.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgConnectionOpenAck message. + * @function verify + * @memberof ibc.core.connection.v1.MsgConnectionOpenAck + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgConnectionOpenAck.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.connectionId != null && message.hasOwnProperty("connectionId")) + if (!$util.isString(message.connectionId)) + return "connectionId: string expected"; + if (message.counterpartyConnectionId != null && message.hasOwnProperty("counterpartyConnectionId")) + if (!$util.isString(message.counterpartyConnectionId)) + return "counterpartyConnectionId: string expected"; + if (message.version != null && message.hasOwnProperty("version")) { + let error = $root.ibc.core.connection.v1.Version.verify(message.version); + if (error) + return "version." + error; + } + if (message.clientState != null && message.hasOwnProperty("clientState")) { + let error = $root.google.protobuf.Any.verify(message.clientState); + if (error) + return "clientState." + error; + } + if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) { + let error = $root.ibc.core.client.v1.Height.verify(message.proofHeight); + if (error) + return "proofHeight." + error; + } + if (message.proofTry != null && message.hasOwnProperty("proofTry")) + if (!(message.proofTry && typeof message.proofTry.length === "number" || $util.isString(message.proofTry))) + return "proofTry: buffer expected"; + if (message.proofClient != null && message.hasOwnProperty("proofClient")) + if (!(message.proofClient && typeof message.proofClient.length === "number" || $util.isString(message.proofClient))) + return "proofClient: buffer expected"; + if (message.proofConsensus != null && message.hasOwnProperty("proofConsensus")) + if (!(message.proofConsensus && typeof message.proofConsensus.length === "number" || $util.isString(message.proofConsensus))) + return "proofConsensus: buffer expected"; + if (message.consensusHeight != null && message.hasOwnProperty("consensusHeight")) { + let error = $root.ibc.core.client.v1.Height.verify(message.consensusHeight); + if (error) + return "consensusHeight." + error; + } + if (message.signer != null && message.hasOwnProperty("signer")) + if (!$util.isString(message.signer)) + return "signer: string expected"; + return null; + }; + + /** + * Creates a MsgConnectionOpenAck message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.connection.v1.MsgConnectionOpenAck + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.connection.v1.MsgConnectionOpenAck} MsgConnectionOpenAck + */ + MsgConnectionOpenAck.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.connection.v1.MsgConnectionOpenAck) + return object; + let message = new $root.ibc.core.connection.v1.MsgConnectionOpenAck(); + if (object.connectionId != null) + message.connectionId = String(object.connectionId); + if (object.counterpartyConnectionId != null) + message.counterpartyConnectionId = String(object.counterpartyConnectionId); + if (object.version != null) { + if (typeof object.version !== "object") + throw TypeError(".ibc.core.connection.v1.MsgConnectionOpenAck.version: object expected"); + message.version = $root.ibc.core.connection.v1.Version.fromObject(object.version); + } + if (object.clientState != null) { + if (typeof object.clientState !== "object") + throw TypeError(".ibc.core.connection.v1.MsgConnectionOpenAck.clientState: object expected"); + message.clientState = $root.google.protobuf.Any.fromObject(object.clientState); + } + if (object.proofHeight != null) { + if (typeof object.proofHeight !== "object") + throw TypeError(".ibc.core.connection.v1.MsgConnectionOpenAck.proofHeight: object expected"); + message.proofHeight = $root.ibc.core.client.v1.Height.fromObject(object.proofHeight); + } + if (object.proofTry != null) + if (typeof object.proofTry === "string") + $util.base64.decode(object.proofTry, message.proofTry = $util.newBuffer($util.base64.length(object.proofTry)), 0); + else if (object.proofTry.length) + message.proofTry = object.proofTry; + if (object.proofClient != null) + if (typeof object.proofClient === "string") + $util.base64.decode(object.proofClient, message.proofClient = $util.newBuffer($util.base64.length(object.proofClient)), 0); + else if (object.proofClient.length) + message.proofClient = object.proofClient; + if (object.proofConsensus != null) + if (typeof object.proofConsensus === "string") + $util.base64.decode(object.proofConsensus, message.proofConsensus = $util.newBuffer($util.base64.length(object.proofConsensus)), 0); + else if (object.proofConsensus.length) + message.proofConsensus = object.proofConsensus; + if (object.consensusHeight != null) { + if (typeof object.consensusHeight !== "object") + throw TypeError(".ibc.core.connection.v1.MsgConnectionOpenAck.consensusHeight: object expected"); + message.consensusHeight = $root.ibc.core.client.v1.Height.fromObject(object.consensusHeight); + } + if (object.signer != null) + message.signer = String(object.signer); + return message; + }; + + /** + * Creates a plain object from a MsgConnectionOpenAck message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.connection.v1.MsgConnectionOpenAck + * @static + * @param {ibc.core.connection.v1.MsgConnectionOpenAck} message MsgConnectionOpenAck + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgConnectionOpenAck.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.connectionId = ""; + object.counterpartyConnectionId = ""; + object.version = null; + object.clientState = null; + object.proofHeight = null; + if (options.bytes === String) + object.proofTry = ""; + else { + object.proofTry = []; + if (options.bytes !== Array) + object.proofTry = $util.newBuffer(object.proofTry); + } + if (options.bytes === String) + object.proofClient = ""; + else { + object.proofClient = []; + if (options.bytes !== Array) + object.proofClient = $util.newBuffer(object.proofClient); + } + if (options.bytes === String) + object.proofConsensus = ""; + else { + object.proofConsensus = []; + if (options.bytes !== Array) + object.proofConsensus = $util.newBuffer(object.proofConsensus); + } + object.consensusHeight = null; + object.signer = ""; + } + if (message.connectionId != null && message.hasOwnProperty("connectionId")) + object.connectionId = message.connectionId; + if (message.counterpartyConnectionId != null && message.hasOwnProperty("counterpartyConnectionId")) + object.counterpartyConnectionId = message.counterpartyConnectionId; + if (message.version != null && message.hasOwnProperty("version")) + object.version = $root.ibc.core.connection.v1.Version.toObject(message.version, options); + if (message.clientState != null && message.hasOwnProperty("clientState")) + object.clientState = $root.google.protobuf.Any.toObject(message.clientState, options); + if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) + object.proofHeight = $root.ibc.core.client.v1.Height.toObject(message.proofHeight, options); + if (message.proofTry != null && message.hasOwnProperty("proofTry")) + object.proofTry = options.bytes === String ? $util.base64.encode(message.proofTry, 0, message.proofTry.length) : options.bytes === Array ? Array.prototype.slice.call(message.proofTry) : message.proofTry; + if (message.proofClient != null && message.hasOwnProperty("proofClient")) + object.proofClient = options.bytes === String ? $util.base64.encode(message.proofClient, 0, message.proofClient.length) : options.bytes === Array ? Array.prototype.slice.call(message.proofClient) : message.proofClient; + if (message.proofConsensus != null && message.hasOwnProperty("proofConsensus")) + object.proofConsensus = options.bytes === String ? $util.base64.encode(message.proofConsensus, 0, message.proofConsensus.length) : options.bytes === Array ? Array.prototype.slice.call(message.proofConsensus) : message.proofConsensus; + if (message.consensusHeight != null && message.hasOwnProperty("consensusHeight")) + object.consensusHeight = $root.ibc.core.client.v1.Height.toObject(message.consensusHeight, options); + if (message.signer != null && message.hasOwnProperty("signer")) + object.signer = message.signer; + return object; + }; + + /** + * Converts this MsgConnectionOpenAck to JSON. + * @function toJSON + * @memberof ibc.core.connection.v1.MsgConnectionOpenAck + * @instance + * @returns {Object.} JSON object + */ + MsgConnectionOpenAck.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgConnectionOpenAck; + })(v1.MsgConnectionOpenAck || {}); + + v1.MsgConnectionOpenAckResponse = (function(MsgConnectionOpenAckResponse) { + + /** + * Properties of a MsgConnectionOpenAckResponse. + * @memberof ibc.core.connection.v1 + * @interface IMsgConnectionOpenAckResponse + */ + + /** + * Constructs a new MsgConnectionOpenAckResponse. + * @memberof ibc.core.connection.v1 + * @classdesc Represents a MsgConnectionOpenAckResponse. + * @implements IMsgConnectionOpenAckResponse + * @constructor + * @param {ibc.core.connection.v1.IMsgConnectionOpenAckResponse=} [properties] Properties to set + */ + function MsgConnectionOpenAckResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new MsgConnectionOpenAckResponse instance using the specified properties. + * @function create + * @memberof ibc.core.connection.v1.MsgConnectionOpenAckResponse + * @static + * @param {ibc.core.connection.v1.IMsgConnectionOpenAckResponse=} [properties] Properties to set + * @returns {ibc.core.connection.v1.MsgConnectionOpenAckResponse} MsgConnectionOpenAckResponse instance + */ + MsgConnectionOpenAckResponse.create = function create(properties) { + return new MsgConnectionOpenAckResponse(properties); + }; + + /** + * Encodes the specified MsgConnectionOpenAckResponse message. Does not implicitly {@link ibc.core.connection.v1.MsgConnectionOpenAckResponse.verify|verify} messages. + * @function encode + * @memberof ibc.core.connection.v1.MsgConnectionOpenAckResponse + * @static + * @param {ibc.core.connection.v1.IMsgConnectionOpenAckResponse} message MsgConnectionOpenAckResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgConnectionOpenAckResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MsgConnectionOpenAckResponse message, length delimited. Does not implicitly {@link ibc.core.connection.v1.MsgConnectionOpenAckResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.connection.v1.MsgConnectionOpenAckResponse + * @static + * @param {ibc.core.connection.v1.IMsgConnectionOpenAckResponse} message MsgConnectionOpenAckResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgConnectionOpenAckResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgConnectionOpenAckResponse message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.connection.v1.MsgConnectionOpenAckResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.connection.v1.MsgConnectionOpenAckResponse} MsgConnectionOpenAckResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgConnectionOpenAckResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.connection.v1.MsgConnectionOpenAckResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgConnectionOpenAckResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.connection.v1.MsgConnectionOpenAckResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.connection.v1.MsgConnectionOpenAckResponse} MsgConnectionOpenAckResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgConnectionOpenAckResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgConnectionOpenAckResponse message. + * @function verify + * @memberof ibc.core.connection.v1.MsgConnectionOpenAckResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgConnectionOpenAckResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MsgConnectionOpenAckResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.connection.v1.MsgConnectionOpenAckResponse + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.connection.v1.MsgConnectionOpenAckResponse} MsgConnectionOpenAckResponse + */ + MsgConnectionOpenAckResponse.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.connection.v1.MsgConnectionOpenAckResponse) + return object; + return new $root.ibc.core.connection.v1.MsgConnectionOpenAckResponse(); + }; + + /** + * Creates a plain object from a MsgConnectionOpenAckResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.connection.v1.MsgConnectionOpenAckResponse + * @static + * @param {ibc.core.connection.v1.MsgConnectionOpenAckResponse} message MsgConnectionOpenAckResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgConnectionOpenAckResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MsgConnectionOpenAckResponse to JSON. + * @function toJSON + * @memberof ibc.core.connection.v1.MsgConnectionOpenAckResponse + * @instance + * @returns {Object.} JSON object + */ + MsgConnectionOpenAckResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgConnectionOpenAckResponse; + })(v1.MsgConnectionOpenAckResponse || {}); + + v1.MsgConnectionOpenConfirm = (function(MsgConnectionOpenConfirm) { + + /** + * Properties of a MsgConnectionOpenConfirm. + * @memberof ibc.core.connection.v1 + * @interface IMsgConnectionOpenConfirm + * @property {string|null} [connectionId] MsgConnectionOpenConfirm connectionId + * @property {Uint8Array|null} [proofAck] MsgConnectionOpenConfirm proofAck + * @property {ibc.core.client.v1.IHeight|null} [proofHeight] MsgConnectionOpenConfirm proofHeight + * @property {string|null} [signer] MsgConnectionOpenConfirm signer + */ + + /** + * Constructs a new MsgConnectionOpenConfirm. + * @memberof ibc.core.connection.v1 + * @classdesc Represents a MsgConnectionOpenConfirm. + * @implements IMsgConnectionOpenConfirm + * @constructor + * @param {ibc.core.connection.v1.IMsgConnectionOpenConfirm=} [properties] Properties to set + */ + function MsgConnectionOpenConfirm(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgConnectionOpenConfirm connectionId. + * @member {string} connectionId + * @memberof ibc.core.connection.v1.MsgConnectionOpenConfirm + * @instance + */ + MsgConnectionOpenConfirm.prototype.connectionId = ""; + + /** + * MsgConnectionOpenConfirm proofAck. + * @member {Uint8Array} proofAck + * @memberof ibc.core.connection.v1.MsgConnectionOpenConfirm + * @instance + */ + MsgConnectionOpenConfirm.prototype.proofAck = $util.newBuffer([]); + + /** + * MsgConnectionOpenConfirm proofHeight. + * @member {ibc.core.client.v1.IHeight|null|undefined} proofHeight + * @memberof ibc.core.connection.v1.MsgConnectionOpenConfirm + * @instance + */ + MsgConnectionOpenConfirm.prototype.proofHeight = null; + + /** + * MsgConnectionOpenConfirm signer. + * @member {string} signer + * @memberof ibc.core.connection.v1.MsgConnectionOpenConfirm + * @instance + */ + MsgConnectionOpenConfirm.prototype.signer = ""; + + /** + * Creates a new MsgConnectionOpenConfirm instance using the specified properties. + * @function create + * @memberof ibc.core.connection.v1.MsgConnectionOpenConfirm + * @static + * @param {ibc.core.connection.v1.IMsgConnectionOpenConfirm=} [properties] Properties to set + * @returns {ibc.core.connection.v1.MsgConnectionOpenConfirm} MsgConnectionOpenConfirm instance + */ + MsgConnectionOpenConfirm.create = function create(properties) { + return new MsgConnectionOpenConfirm(properties); + }; + + /** + * Encodes the specified MsgConnectionOpenConfirm message. Does not implicitly {@link ibc.core.connection.v1.MsgConnectionOpenConfirm.verify|verify} messages. + * @function encode + * @memberof ibc.core.connection.v1.MsgConnectionOpenConfirm + * @static + * @param {ibc.core.connection.v1.IMsgConnectionOpenConfirm} message MsgConnectionOpenConfirm message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgConnectionOpenConfirm.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.connectionId != null && Object.hasOwnProperty.call(message, "connectionId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.connectionId); + if (message.proofAck != null && Object.hasOwnProperty.call(message, "proofAck")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.proofAck); + if (message.proofHeight != null && Object.hasOwnProperty.call(message, "proofHeight")) + $root.ibc.core.client.v1.Height.encode(message.proofHeight, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.signer); + return writer; + }; + + /** + * Encodes the specified MsgConnectionOpenConfirm message, length delimited. Does not implicitly {@link ibc.core.connection.v1.MsgConnectionOpenConfirm.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.connection.v1.MsgConnectionOpenConfirm + * @static + * @param {ibc.core.connection.v1.IMsgConnectionOpenConfirm} message MsgConnectionOpenConfirm message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgConnectionOpenConfirm.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgConnectionOpenConfirm message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.connection.v1.MsgConnectionOpenConfirm + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.connection.v1.MsgConnectionOpenConfirm} MsgConnectionOpenConfirm + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgConnectionOpenConfirm.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.connection.v1.MsgConnectionOpenConfirm(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.connectionId = reader.string(); + break; + case 2: + message.proofAck = reader.bytes(); + break; + case 3: + message.proofHeight = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); + break; + case 4: + message.signer = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgConnectionOpenConfirm message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.connection.v1.MsgConnectionOpenConfirm + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.connection.v1.MsgConnectionOpenConfirm} MsgConnectionOpenConfirm + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgConnectionOpenConfirm.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgConnectionOpenConfirm message. + * @function verify + * @memberof ibc.core.connection.v1.MsgConnectionOpenConfirm + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgConnectionOpenConfirm.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.connectionId != null && message.hasOwnProperty("connectionId")) + if (!$util.isString(message.connectionId)) + return "connectionId: string expected"; + if (message.proofAck != null && message.hasOwnProperty("proofAck")) + if (!(message.proofAck && typeof message.proofAck.length === "number" || $util.isString(message.proofAck))) + return "proofAck: buffer expected"; + if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) { + let error = $root.ibc.core.client.v1.Height.verify(message.proofHeight); + if (error) + return "proofHeight." + error; + } + if (message.signer != null && message.hasOwnProperty("signer")) + if (!$util.isString(message.signer)) + return "signer: string expected"; + return null; + }; + + /** + * Creates a MsgConnectionOpenConfirm message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.connection.v1.MsgConnectionOpenConfirm + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.connection.v1.MsgConnectionOpenConfirm} MsgConnectionOpenConfirm + */ + MsgConnectionOpenConfirm.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.connection.v1.MsgConnectionOpenConfirm) + return object; + let message = new $root.ibc.core.connection.v1.MsgConnectionOpenConfirm(); + if (object.connectionId != null) + message.connectionId = String(object.connectionId); + if (object.proofAck != null) + if (typeof object.proofAck === "string") + $util.base64.decode(object.proofAck, message.proofAck = $util.newBuffer($util.base64.length(object.proofAck)), 0); + else if (object.proofAck.length) + message.proofAck = object.proofAck; + if (object.proofHeight != null) { + if (typeof object.proofHeight !== "object") + throw TypeError(".ibc.core.connection.v1.MsgConnectionOpenConfirm.proofHeight: object expected"); + message.proofHeight = $root.ibc.core.client.v1.Height.fromObject(object.proofHeight); + } + if (object.signer != null) + message.signer = String(object.signer); + return message; + }; + + /** + * Creates a plain object from a MsgConnectionOpenConfirm message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.connection.v1.MsgConnectionOpenConfirm + * @static + * @param {ibc.core.connection.v1.MsgConnectionOpenConfirm} message MsgConnectionOpenConfirm + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgConnectionOpenConfirm.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.connectionId = ""; + if (options.bytes === String) + object.proofAck = ""; + else { + object.proofAck = []; + if (options.bytes !== Array) + object.proofAck = $util.newBuffer(object.proofAck); + } + object.proofHeight = null; + object.signer = ""; + } + if (message.connectionId != null && message.hasOwnProperty("connectionId")) + object.connectionId = message.connectionId; + if (message.proofAck != null && message.hasOwnProperty("proofAck")) + object.proofAck = options.bytes === String ? $util.base64.encode(message.proofAck, 0, message.proofAck.length) : options.bytes === Array ? Array.prototype.slice.call(message.proofAck) : message.proofAck; + if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) + object.proofHeight = $root.ibc.core.client.v1.Height.toObject(message.proofHeight, options); + if (message.signer != null && message.hasOwnProperty("signer")) + object.signer = message.signer; + return object; + }; + + /** + * Converts this MsgConnectionOpenConfirm to JSON. + * @function toJSON + * @memberof ibc.core.connection.v1.MsgConnectionOpenConfirm + * @instance + * @returns {Object.} JSON object + */ + MsgConnectionOpenConfirm.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgConnectionOpenConfirm; + })(v1.MsgConnectionOpenConfirm || {}); + + v1.MsgConnectionOpenConfirmResponse = (function(MsgConnectionOpenConfirmResponse) { + + /** + * Properties of a MsgConnectionOpenConfirmResponse. + * @memberof ibc.core.connection.v1 + * @interface IMsgConnectionOpenConfirmResponse + */ + + /** + * Constructs a new MsgConnectionOpenConfirmResponse. + * @memberof ibc.core.connection.v1 + * @classdesc Represents a MsgConnectionOpenConfirmResponse. + * @implements IMsgConnectionOpenConfirmResponse + * @constructor + * @param {ibc.core.connection.v1.IMsgConnectionOpenConfirmResponse=} [properties] Properties to set + */ + function MsgConnectionOpenConfirmResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new MsgConnectionOpenConfirmResponse instance using the specified properties. + * @function create + * @memberof ibc.core.connection.v1.MsgConnectionOpenConfirmResponse + * @static + * @param {ibc.core.connection.v1.IMsgConnectionOpenConfirmResponse=} [properties] Properties to set + * @returns {ibc.core.connection.v1.MsgConnectionOpenConfirmResponse} MsgConnectionOpenConfirmResponse instance + */ + MsgConnectionOpenConfirmResponse.create = function create(properties) { + return new MsgConnectionOpenConfirmResponse(properties); + }; + + /** + * Encodes the specified MsgConnectionOpenConfirmResponse message. Does not implicitly {@link ibc.core.connection.v1.MsgConnectionOpenConfirmResponse.verify|verify} messages. + * @function encode + * @memberof ibc.core.connection.v1.MsgConnectionOpenConfirmResponse + * @static + * @param {ibc.core.connection.v1.IMsgConnectionOpenConfirmResponse} message MsgConnectionOpenConfirmResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgConnectionOpenConfirmResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MsgConnectionOpenConfirmResponse message, length delimited. Does not implicitly {@link ibc.core.connection.v1.MsgConnectionOpenConfirmResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.connection.v1.MsgConnectionOpenConfirmResponse + * @static + * @param {ibc.core.connection.v1.IMsgConnectionOpenConfirmResponse} message MsgConnectionOpenConfirmResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgConnectionOpenConfirmResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgConnectionOpenConfirmResponse message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.connection.v1.MsgConnectionOpenConfirmResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.connection.v1.MsgConnectionOpenConfirmResponse} MsgConnectionOpenConfirmResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgConnectionOpenConfirmResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.connection.v1.MsgConnectionOpenConfirmResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgConnectionOpenConfirmResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.connection.v1.MsgConnectionOpenConfirmResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.connection.v1.MsgConnectionOpenConfirmResponse} MsgConnectionOpenConfirmResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgConnectionOpenConfirmResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgConnectionOpenConfirmResponse message. + * @function verify + * @memberof ibc.core.connection.v1.MsgConnectionOpenConfirmResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgConnectionOpenConfirmResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MsgConnectionOpenConfirmResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.connection.v1.MsgConnectionOpenConfirmResponse + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.connection.v1.MsgConnectionOpenConfirmResponse} MsgConnectionOpenConfirmResponse + */ + MsgConnectionOpenConfirmResponse.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.connection.v1.MsgConnectionOpenConfirmResponse) + return object; + return new $root.ibc.core.connection.v1.MsgConnectionOpenConfirmResponse(); + }; + + /** + * Creates a plain object from a MsgConnectionOpenConfirmResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.connection.v1.MsgConnectionOpenConfirmResponse + * @static + * @param {ibc.core.connection.v1.MsgConnectionOpenConfirmResponse} message MsgConnectionOpenConfirmResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgConnectionOpenConfirmResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MsgConnectionOpenConfirmResponse to JSON. + * @function toJSON + * @memberof ibc.core.connection.v1.MsgConnectionOpenConfirmResponse + * @instance + * @returns {Object.} JSON object + */ + MsgConnectionOpenConfirmResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgConnectionOpenConfirmResponse; + })(v1.MsgConnectionOpenConfirmResponse || {}); + + return v1; + })(connection.v1 || {}); + + return connection; + })(core.connection || {}); + + /** + * Namespace types. + * @memberof ibc.core + * @namespace + */ + + core.types = (function(types) { + + /** + * Namespace v1. + * @memberof ibc.core.types + * @namespace + */ + + types.v1 = (function(v1) { + + v1.GenesisState = (function(GenesisState) { + + /** + * Properties of a GenesisState. + * @memberof ibc.core.types.v1 + * @interface IGenesisState + * @property {ibc.core.client.v1.IGenesisState|null} [clientGenesis] GenesisState clientGenesis + * @property {ibc.core.connection.v1.IGenesisState|null} [connectionGenesis] GenesisState connectionGenesis + * @property {ibc.core.channel.v1.IGenesisState|null} [channelGenesis] GenesisState channelGenesis + */ + + /** + * Constructs a new GenesisState. + * @memberof ibc.core.types.v1 + * @classdesc Represents a GenesisState. + * @implements IGenesisState + * @constructor + * @param {ibc.core.types.v1.IGenesisState=} [properties] Properties to set + */ + function GenesisState(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GenesisState clientGenesis. + * @member {ibc.core.client.v1.IGenesisState|null|undefined} clientGenesis + * @memberof ibc.core.types.v1.GenesisState + * @instance + */ + GenesisState.prototype.clientGenesis = null; + + /** + * GenesisState connectionGenesis. + * @member {ibc.core.connection.v1.IGenesisState|null|undefined} connectionGenesis + * @memberof ibc.core.types.v1.GenesisState + * @instance + */ + GenesisState.prototype.connectionGenesis = null; + + /** + * GenesisState channelGenesis. + * @member {ibc.core.channel.v1.IGenesisState|null|undefined} channelGenesis + * @memberof ibc.core.types.v1.GenesisState + * @instance + */ + GenesisState.prototype.channelGenesis = null; + + /** + * Creates a new GenesisState instance using the specified properties. + * @function create + * @memberof ibc.core.types.v1.GenesisState + * @static + * @param {ibc.core.types.v1.IGenesisState=} [properties] Properties to set + * @returns {ibc.core.types.v1.GenesisState} GenesisState instance + */ + GenesisState.create = function create(properties) { + return new GenesisState(properties); + }; + + /** + * Encodes the specified GenesisState message. Does not implicitly {@link ibc.core.types.v1.GenesisState.verify|verify} messages. + * @function encode + * @memberof ibc.core.types.v1.GenesisState + * @static + * @param {ibc.core.types.v1.IGenesisState} message GenesisState message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenesisState.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.clientGenesis != null && Object.hasOwnProperty.call(message, "clientGenesis")) + $root.ibc.core.client.v1.GenesisState.encode(message.clientGenesis, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.connectionGenesis != null && Object.hasOwnProperty.call(message, "connectionGenesis")) + $root.ibc.core.connection.v1.GenesisState.encode(message.connectionGenesis, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.channelGenesis != null && Object.hasOwnProperty.call(message, "channelGenesis")) + $root.ibc.core.channel.v1.GenesisState.encode(message.channelGenesis, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GenesisState message, length delimited. Does not implicitly {@link ibc.core.types.v1.GenesisState.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.types.v1.GenesisState + * @static + * @param {ibc.core.types.v1.IGenesisState} message GenesisState message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenesisState.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GenesisState message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.types.v1.GenesisState + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.types.v1.GenesisState} GenesisState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenesisState.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.types.v1.GenesisState(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.clientGenesis = $root.ibc.core.client.v1.GenesisState.decode(reader, reader.uint32()); + break; + case 2: + message.connectionGenesis = $root.ibc.core.connection.v1.GenesisState.decode(reader, reader.uint32()); + break; + case 3: + message.channelGenesis = $root.ibc.core.channel.v1.GenesisState.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GenesisState message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.types.v1.GenesisState + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.types.v1.GenesisState} GenesisState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenesisState.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GenesisState message. + * @function verify + * @memberof ibc.core.types.v1.GenesisState + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GenesisState.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.clientGenesis != null && message.hasOwnProperty("clientGenesis")) { + let error = $root.ibc.core.client.v1.GenesisState.verify(message.clientGenesis); + if (error) + return "clientGenesis." + error; + } + if (message.connectionGenesis != null && message.hasOwnProperty("connectionGenesis")) { + let error = $root.ibc.core.connection.v1.GenesisState.verify(message.connectionGenesis); + if (error) + return "connectionGenesis." + error; + } + if (message.channelGenesis != null && message.hasOwnProperty("channelGenesis")) { + let error = $root.ibc.core.channel.v1.GenesisState.verify(message.channelGenesis); + if (error) + return "channelGenesis." + error; + } + return null; + }; + + /** + * Creates a GenesisState message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.types.v1.GenesisState + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.types.v1.GenesisState} GenesisState + */ + GenesisState.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.types.v1.GenesisState) + return object; + let message = new $root.ibc.core.types.v1.GenesisState(); + if (object.clientGenesis != null) { + if (typeof object.clientGenesis !== "object") + throw TypeError(".ibc.core.types.v1.GenesisState.clientGenesis: object expected"); + message.clientGenesis = $root.ibc.core.client.v1.GenesisState.fromObject(object.clientGenesis); + } + if (object.connectionGenesis != null) { + if (typeof object.connectionGenesis !== "object") + throw TypeError(".ibc.core.types.v1.GenesisState.connectionGenesis: object expected"); + message.connectionGenesis = $root.ibc.core.connection.v1.GenesisState.fromObject(object.connectionGenesis); + } + if (object.channelGenesis != null) { + if (typeof object.channelGenesis !== "object") + throw TypeError(".ibc.core.types.v1.GenesisState.channelGenesis: object expected"); + message.channelGenesis = $root.ibc.core.channel.v1.GenesisState.fromObject(object.channelGenesis); + } + return message; + }; + + /** + * Creates a plain object from a GenesisState message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.types.v1.GenesisState + * @static + * @param {ibc.core.types.v1.GenesisState} message GenesisState + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GenesisState.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.clientGenesis = null; + object.connectionGenesis = null; + object.channelGenesis = null; + } + if (message.clientGenesis != null && message.hasOwnProperty("clientGenesis")) + object.clientGenesis = $root.ibc.core.client.v1.GenesisState.toObject(message.clientGenesis, options); + if (message.connectionGenesis != null && message.hasOwnProperty("connectionGenesis")) + object.connectionGenesis = $root.ibc.core.connection.v1.GenesisState.toObject(message.connectionGenesis, options); + if (message.channelGenesis != null && message.hasOwnProperty("channelGenesis")) + object.channelGenesis = $root.ibc.core.channel.v1.GenesisState.toObject(message.channelGenesis, options); + return object; + }; + + /** + * Converts this GenesisState to JSON. + * @function toJSON + * @memberof ibc.core.types.v1.GenesisState + * @instance + * @returns {Object.} JSON object + */ + GenesisState.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GenesisState; + })(v1.GenesisState || {}); + + return v1; + })(types.v1 || {}); + + return types; + })(core.types || {}); + + return core; + })(ibc.core || {}); + + return ibc; +})($root.ibc || {}); + +/** + * Namespace tendermint. + * @exports tendermint + * @namespace + */ + +export const tendermint = $root.tendermint = ((tendermint) => { + + /** + * Namespace abci. + * @memberof tendermint + * @namespace + */ + + tendermint.abci = (function(abci) { + + abci.Request = (function(Request) { + + /** + * Properties of a Request. + * @memberof tendermint.abci + * @interface IRequest + * @property {tendermint.abci.IRequestEcho|null} [echo] Request echo + * @property {tendermint.abci.IRequestFlush|null} [flush] Request flush + * @property {tendermint.abci.IRequestInfo|null} [info] Request info + * @property {tendermint.abci.IRequestSetOption|null} [setOption] Request setOption + * @property {tendermint.abci.IRequestInitChain|null} [initChain] Request initChain + * @property {tendermint.abci.IRequestQuery|null} [query] Request query + * @property {tendermint.abci.IRequestBeginBlock|null} [beginBlock] Request beginBlock + * @property {tendermint.abci.IRequestCheckTx|null} [checkTx] Request checkTx + * @property {tendermint.abci.IRequestDeliverTx|null} [deliverTx] Request deliverTx + * @property {tendermint.abci.IRequestEndBlock|null} [endBlock] Request endBlock + * @property {tendermint.abci.IRequestCommit|null} [commit] Request commit + * @property {tendermint.abci.IRequestListSnapshots|null} [listSnapshots] Request listSnapshots + * @property {tendermint.abci.IRequestOfferSnapshot|null} [offerSnapshot] Request offerSnapshot + * @property {tendermint.abci.IRequestLoadSnapshotChunk|null} [loadSnapshotChunk] Request loadSnapshotChunk + * @property {tendermint.abci.IRequestApplySnapshotChunk|null} [applySnapshotChunk] Request applySnapshotChunk + */ + + /** + * Constructs a new Request. + * @memberof tendermint.abci + * @classdesc Represents a Request. + * @implements IRequest + * @constructor + * @param {tendermint.abci.IRequest=} [properties] Properties to set + */ + function Request(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Request echo. + * @member {tendermint.abci.IRequestEcho|null|undefined} echo + * @memberof tendermint.abci.Request + * @instance + */ + Request.prototype.echo = null; + + /** + * Request flush. + * @member {tendermint.abci.IRequestFlush|null|undefined} flush + * @memberof tendermint.abci.Request + * @instance + */ + Request.prototype.flush = null; + + /** + * Request info. + * @member {tendermint.abci.IRequestInfo|null|undefined} info + * @memberof tendermint.abci.Request + * @instance + */ + Request.prototype.info = null; + + /** + * Request setOption. + * @member {tendermint.abci.IRequestSetOption|null|undefined} setOption + * @memberof tendermint.abci.Request + * @instance + */ + Request.prototype.setOption = null; + + /** + * Request initChain. + * @member {tendermint.abci.IRequestInitChain|null|undefined} initChain + * @memberof tendermint.abci.Request + * @instance + */ + Request.prototype.initChain = null; + + /** + * Request query. + * @member {tendermint.abci.IRequestQuery|null|undefined} query + * @memberof tendermint.abci.Request + * @instance + */ + Request.prototype.query = null; + + /** + * Request beginBlock. + * @member {tendermint.abci.IRequestBeginBlock|null|undefined} beginBlock + * @memberof tendermint.abci.Request + * @instance + */ + Request.prototype.beginBlock = null; + + /** + * Request checkTx. + * @member {tendermint.abci.IRequestCheckTx|null|undefined} checkTx + * @memberof tendermint.abci.Request + * @instance + */ + Request.prototype.checkTx = null; + + /** + * Request deliverTx. + * @member {tendermint.abci.IRequestDeliverTx|null|undefined} deliverTx + * @memberof tendermint.abci.Request + * @instance + */ + Request.prototype.deliverTx = null; + + /** + * Request endBlock. + * @member {tendermint.abci.IRequestEndBlock|null|undefined} endBlock + * @memberof tendermint.abci.Request + * @instance + */ + Request.prototype.endBlock = null; + + /** + * Request commit. + * @member {tendermint.abci.IRequestCommit|null|undefined} commit + * @memberof tendermint.abci.Request + * @instance + */ + Request.prototype.commit = null; + + /** + * Request listSnapshots. + * @member {tendermint.abci.IRequestListSnapshots|null|undefined} listSnapshots + * @memberof tendermint.abci.Request + * @instance + */ + Request.prototype.listSnapshots = null; + + /** + * Request offerSnapshot. + * @member {tendermint.abci.IRequestOfferSnapshot|null|undefined} offerSnapshot + * @memberof tendermint.abci.Request + * @instance + */ + Request.prototype.offerSnapshot = null; + + /** + * Request loadSnapshotChunk. + * @member {tendermint.abci.IRequestLoadSnapshotChunk|null|undefined} loadSnapshotChunk + * @memberof tendermint.abci.Request + * @instance + */ + Request.prototype.loadSnapshotChunk = null; + + /** + * Request applySnapshotChunk. + * @member {tendermint.abci.IRequestApplySnapshotChunk|null|undefined} applySnapshotChunk + * @memberof tendermint.abci.Request + * @instance + */ + Request.prototype.applySnapshotChunk = null; + + // OneOf field names bound to virtual getters and setters + let $oneOfFields; + + /** + * Request value. + * @member {"echo"|"flush"|"info"|"setOption"|"initChain"|"query"|"beginBlock"|"checkTx"|"deliverTx"|"endBlock"|"commit"|"listSnapshots"|"offerSnapshot"|"loadSnapshotChunk"|"applySnapshotChunk"|undefined} value + * @memberof tendermint.abci.Request + * @instance + */ + Object.defineProperty(Request.prototype, "value", { + get: $util.oneOfGetter($oneOfFields = ["echo", "flush", "info", "setOption", "initChain", "query", "beginBlock", "checkTx", "deliverTx", "endBlock", "commit", "listSnapshots", "offerSnapshot", "loadSnapshotChunk", "applySnapshotChunk"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Request instance using the specified properties. + * @function create + * @memberof tendermint.abci.Request + * @static + * @param {tendermint.abci.IRequest=} [properties] Properties to set + * @returns {tendermint.abci.Request} Request instance + */ + Request.create = function create(properties) { + return new Request(properties); + }; + + /** + * Encodes the specified Request message. Does not implicitly {@link tendermint.abci.Request.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.Request + * @static + * @param {tendermint.abci.IRequest} message Request message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Request.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.echo != null && Object.hasOwnProperty.call(message, "echo")) + $root.tendermint.abci.RequestEcho.encode(message.echo, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.flush != null && Object.hasOwnProperty.call(message, "flush")) + $root.tendermint.abci.RequestFlush.encode(message.flush, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.info != null && Object.hasOwnProperty.call(message, "info")) + $root.tendermint.abci.RequestInfo.encode(message.info, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.setOption != null && Object.hasOwnProperty.call(message, "setOption")) + $root.tendermint.abci.RequestSetOption.encode(message.setOption, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.initChain != null && Object.hasOwnProperty.call(message, "initChain")) + $root.tendermint.abci.RequestInitChain.encode(message.initChain, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.query != null && Object.hasOwnProperty.call(message, "query")) + $root.tendermint.abci.RequestQuery.encode(message.query, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.beginBlock != null && Object.hasOwnProperty.call(message, "beginBlock")) + $root.tendermint.abci.RequestBeginBlock.encode(message.beginBlock, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.checkTx != null && Object.hasOwnProperty.call(message, "checkTx")) + $root.tendermint.abci.RequestCheckTx.encode(message.checkTx, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.deliverTx != null && Object.hasOwnProperty.call(message, "deliverTx")) + $root.tendermint.abci.RequestDeliverTx.encode(message.deliverTx, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.endBlock != null && Object.hasOwnProperty.call(message, "endBlock")) + $root.tendermint.abci.RequestEndBlock.encode(message.endBlock, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.commit != null && Object.hasOwnProperty.call(message, "commit")) + $root.tendermint.abci.RequestCommit.encode(message.commit, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.listSnapshots != null && Object.hasOwnProperty.call(message, "listSnapshots")) + $root.tendermint.abci.RequestListSnapshots.encode(message.listSnapshots, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.offerSnapshot != null && Object.hasOwnProperty.call(message, "offerSnapshot")) + $root.tendermint.abci.RequestOfferSnapshot.encode(message.offerSnapshot, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.loadSnapshotChunk != null && Object.hasOwnProperty.call(message, "loadSnapshotChunk")) + $root.tendermint.abci.RequestLoadSnapshotChunk.encode(message.loadSnapshotChunk, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.applySnapshotChunk != null && Object.hasOwnProperty.call(message, "applySnapshotChunk")) + $root.tendermint.abci.RequestApplySnapshotChunk.encode(message.applySnapshotChunk, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Request message, length delimited. Does not implicitly {@link tendermint.abci.Request.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.Request + * @static + * @param {tendermint.abci.IRequest} message Request message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Request.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Request message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.Request + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.Request} Request + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Request.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.Request(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.echo = $root.tendermint.abci.RequestEcho.decode(reader, reader.uint32()); + break; + case 2: + message.flush = $root.tendermint.abci.RequestFlush.decode(reader, reader.uint32()); + break; + case 3: + message.info = $root.tendermint.abci.RequestInfo.decode(reader, reader.uint32()); + break; + case 4: + message.setOption = $root.tendermint.abci.RequestSetOption.decode(reader, reader.uint32()); + break; + case 5: + message.initChain = $root.tendermint.abci.RequestInitChain.decode(reader, reader.uint32()); + break; + case 6: + message.query = $root.tendermint.abci.RequestQuery.decode(reader, reader.uint32()); + break; + case 7: + message.beginBlock = $root.tendermint.abci.RequestBeginBlock.decode(reader, reader.uint32()); + break; + case 8: + message.checkTx = $root.tendermint.abci.RequestCheckTx.decode(reader, reader.uint32()); + break; + case 9: + message.deliverTx = $root.tendermint.abci.RequestDeliverTx.decode(reader, reader.uint32()); + break; + case 10: + message.endBlock = $root.tendermint.abci.RequestEndBlock.decode(reader, reader.uint32()); + break; + case 11: + message.commit = $root.tendermint.abci.RequestCommit.decode(reader, reader.uint32()); + break; + case 12: + message.listSnapshots = $root.tendermint.abci.RequestListSnapshots.decode(reader, reader.uint32()); + break; + case 13: + message.offerSnapshot = $root.tendermint.abci.RequestOfferSnapshot.decode(reader, reader.uint32()); + break; + case 14: + message.loadSnapshotChunk = $root.tendermint.abci.RequestLoadSnapshotChunk.decode(reader, reader.uint32()); + break; + case 15: + message.applySnapshotChunk = $root.tendermint.abci.RequestApplySnapshotChunk.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Request message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.Request + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.Request} Request + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Request.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Request message. + * @function verify + * @memberof tendermint.abci.Request + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Request.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + let properties = {}; + if (message.echo != null && message.hasOwnProperty("echo")) { + properties.value = 1; + { + let error = $root.tendermint.abci.RequestEcho.verify(message.echo); + if (error) + return "echo." + error; + } + } + if (message.flush != null && message.hasOwnProperty("flush")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + let error = $root.tendermint.abci.RequestFlush.verify(message.flush); + if (error) + return "flush." + error; + } + } + if (message.info != null && message.hasOwnProperty("info")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + let error = $root.tendermint.abci.RequestInfo.verify(message.info); + if (error) + return "info." + error; + } + } + if (message.setOption != null && message.hasOwnProperty("setOption")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + let error = $root.tendermint.abci.RequestSetOption.verify(message.setOption); + if (error) + return "setOption." + error; + } + } + if (message.initChain != null && message.hasOwnProperty("initChain")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + let error = $root.tendermint.abci.RequestInitChain.verify(message.initChain); + if (error) + return "initChain." + error; + } + } + if (message.query != null && message.hasOwnProperty("query")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + let error = $root.tendermint.abci.RequestQuery.verify(message.query); + if (error) + return "query." + error; + } + } + if (message.beginBlock != null && message.hasOwnProperty("beginBlock")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + let error = $root.tendermint.abci.RequestBeginBlock.verify(message.beginBlock); + if (error) + return "beginBlock." + error; + } + } + if (message.checkTx != null && message.hasOwnProperty("checkTx")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + let error = $root.tendermint.abci.RequestCheckTx.verify(message.checkTx); + if (error) + return "checkTx." + error; + } + } + if (message.deliverTx != null && message.hasOwnProperty("deliverTx")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + let error = $root.tendermint.abci.RequestDeliverTx.verify(message.deliverTx); + if (error) + return "deliverTx." + error; + } + } + if (message.endBlock != null && message.hasOwnProperty("endBlock")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + let error = $root.tendermint.abci.RequestEndBlock.verify(message.endBlock); + if (error) + return "endBlock." + error; + } + } + if (message.commit != null && message.hasOwnProperty("commit")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + let error = $root.tendermint.abci.RequestCommit.verify(message.commit); + if (error) + return "commit." + error; + } + } + if (message.listSnapshots != null && message.hasOwnProperty("listSnapshots")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + let error = $root.tendermint.abci.RequestListSnapshots.verify(message.listSnapshots); + if (error) + return "listSnapshots." + error; + } + } + if (message.offerSnapshot != null && message.hasOwnProperty("offerSnapshot")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + let error = $root.tendermint.abci.RequestOfferSnapshot.verify(message.offerSnapshot); + if (error) + return "offerSnapshot." + error; + } + } + if (message.loadSnapshotChunk != null && message.hasOwnProperty("loadSnapshotChunk")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + let error = $root.tendermint.abci.RequestLoadSnapshotChunk.verify(message.loadSnapshotChunk); + if (error) + return "loadSnapshotChunk." + error; + } + } + if (message.applySnapshotChunk != null && message.hasOwnProperty("applySnapshotChunk")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + let error = $root.tendermint.abci.RequestApplySnapshotChunk.verify(message.applySnapshotChunk); + if (error) + return "applySnapshotChunk." + error; + } + } + return null; + }; + + /** + * Creates a Request message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.Request + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.Request} Request + */ + Request.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.Request) + return object; + let message = new $root.tendermint.abci.Request(); + if (object.echo != null) { + if (typeof object.echo !== "object") + throw TypeError(".tendermint.abci.Request.echo: object expected"); + message.echo = $root.tendermint.abci.RequestEcho.fromObject(object.echo); + } + if (object.flush != null) { + if (typeof object.flush !== "object") + throw TypeError(".tendermint.abci.Request.flush: object expected"); + message.flush = $root.tendermint.abci.RequestFlush.fromObject(object.flush); + } + if (object.info != null) { + if (typeof object.info !== "object") + throw TypeError(".tendermint.abci.Request.info: object expected"); + message.info = $root.tendermint.abci.RequestInfo.fromObject(object.info); + } + if (object.setOption != null) { + if (typeof object.setOption !== "object") + throw TypeError(".tendermint.abci.Request.setOption: object expected"); + message.setOption = $root.tendermint.abci.RequestSetOption.fromObject(object.setOption); + } + if (object.initChain != null) { + if (typeof object.initChain !== "object") + throw TypeError(".tendermint.abci.Request.initChain: object expected"); + message.initChain = $root.tendermint.abci.RequestInitChain.fromObject(object.initChain); + } + if (object.query != null) { + if (typeof object.query !== "object") + throw TypeError(".tendermint.abci.Request.query: object expected"); + message.query = $root.tendermint.abci.RequestQuery.fromObject(object.query); + } + if (object.beginBlock != null) { + if (typeof object.beginBlock !== "object") + throw TypeError(".tendermint.abci.Request.beginBlock: object expected"); + message.beginBlock = $root.tendermint.abci.RequestBeginBlock.fromObject(object.beginBlock); + } + if (object.checkTx != null) { + if (typeof object.checkTx !== "object") + throw TypeError(".tendermint.abci.Request.checkTx: object expected"); + message.checkTx = $root.tendermint.abci.RequestCheckTx.fromObject(object.checkTx); + } + if (object.deliverTx != null) { + if (typeof object.deliverTx !== "object") + throw TypeError(".tendermint.abci.Request.deliverTx: object expected"); + message.deliverTx = $root.tendermint.abci.RequestDeliverTx.fromObject(object.deliverTx); + } + if (object.endBlock != null) { + if (typeof object.endBlock !== "object") + throw TypeError(".tendermint.abci.Request.endBlock: object expected"); + message.endBlock = $root.tendermint.abci.RequestEndBlock.fromObject(object.endBlock); + } + if (object.commit != null) { + if (typeof object.commit !== "object") + throw TypeError(".tendermint.abci.Request.commit: object expected"); + message.commit = $root.tendermint.abci.RequestCommit.fromObject(object.commit); + } + if (object.listSnapshots != null) { + if (typeof object.listSnapshots !== "object") + throw TypeError(".tendermint.abci.Request.listSnapshots: object expected"); + message.listSnapshots = $root.tendermint.abci.RequestListSnapshots.fromObject(object.listSnapshots); + } + if (object.offerSnapshot != null) { + if (typeof object.offerSnapshot !== "object") + throw TypeError(".tendermint.abci.Request.offerSnapshot: object expected"); + message.offerSnapshot = $root.tendermint.abci.RequestOfferSnapshot.fromObject(object.offerSnapshot); + } + if (object.loadSnapshotChunk != null) { + if (typeof object.loadSnapshotChunk !== "object") + throw TypeError(".tendermint.abci.Request.loadSnapshotChunk: object expected"); + message.loadSnapshotChunk = $root.tendermint.abci.RequestLoadSnapshotChunk.fromObject(object.loadSnapshotChunk); + } + if (object.applySnapshotChunk != null) { + if (typeof object.applySnapshotChunk !== "object") + throw TypeError(".tendermint.abci.Request.applySnapshotChunk: object expected"); + message.applySnapshotChunk = $root.tendermint.abci.RequestApplySnapshotChunk.fromObject(object.applySnapshotChunk); + } + return message; + }; + + /** + * Creates a plain object from a Request message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.Request + * @static + * @param {tendermint.abci.Request} message Request + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Request.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (message.echo != null && message.hasOwnProperty("echo")) { + object.echo = $root.tendermint.abci.RequestEcho.toObject(message.echo, options); + if (options.oneofs) + object.value = "echo"; + } + if (message.flush != null && message.hasOwnProperty("flush")) { + object.flush = $root.tendermint.abci.RequestFlush.toObject(message.flush, options); + if (options.oneofs) + object.value = "flush"; + } + if (message.info != null && message.hasOwnProperty("info")) { + object.info = $root.tendermint.abci.RequestInfo.toObject(message.info, options); + if (options.oneofs) + object.value = "info"; + } + if (message.setOption != null && message.hasOwnProperty("setOption")) { + object.setOption = $root.tendermint.abci.RequestSetOption.toObject(message.setOption, options); + if (options.oneofs) + object.value = "setOption"; + } + if (message.initChain != null && message.hasOwnProperty("initChain")) { + object.initChain = $root.tendermint.abci.RequestInitChain.toObject(message.initChain, options); + if (options.oneofs) + object.value = "initChain"; + } + if (message.query != null && message.hasOwnProperty("query")) { + object.query = $root.tendermint.abci.RequestQuery.toObject(message.query, options); + if (options.oneofs) + object.value = "query"; + } + if (message.beginBlock != null && message.hasOwnProperty("beginBlock")) { + object.beginBlock = $root.tendermint.abci.RequestBeginBlock.toObject(message.beginBlock, options); + if (options.oneofs) + object.value = "beginBlock"; + } + if (message.checkTx != null && message.hasOwnProperty("checkTx")) { + object.checkTx = $root.tendermint.abci.RequestCheckTx.toObject(message.checkTx, options); + if (options.oneofs) + object.value = "checkTx"; + } + if (message.deliverTx != null && message.hasOwnProperty("deliverTx")) { + object.deliverTx = $root.tendermint.abci.RequestDeliverTx.toObject(message.deliverTx, options); + if (options.oneofs) + object.value = "deliverTx"; + } + if (message.endBlock != null && message.hasOwnProperty("endBlock")) { + object.endBlock = $root.tendermint.abci.RequestEndBlock.toObject(message.endBlock, options); + if (options.oneofs) + object.value = "endBlock"; + } + if (message.commit != null && message.hasOwnProperty("commit")) { + object.commit = $root.tendermint.abci.RequestCommit.toObject(message.commit, options); + if (options.oneofs) + object.value = "commit"; + } + if (message.listSnapshots != null && message.hasOwnProperty("listSnapshots")) { + object.listSnapshots = $root.tendermint.abci.RequestListSnapshots.toObject(message.listSnapshots, options); + if (options.oneofs) + object.value = "listSnapshots"; + } + if (message.offerSnapshot != null && message.hasOwnProperty("offerSnapshot")) { + object.offerSnapshot = $root.tendermint.abci.RequestOfferSnapshot.toObject(message.offerSnapshot, options); + if (options.oneofs) + object.value = "offerSnapshot"; + } + if (message.loadSnapshotChunk != null && message.hasOwnProperty("loadSnapshotChunk")) { + object.loadSnapshotChunk = $root.tendermint.abci.RequestLoadSnapshotChunk.toObject(message.loadSnapshotChunk, options); + if (options.oneofs) + object.value = "loadSnapshotChunk"; + } + if (message.applySnapshotChunk != null && message.hasOwnProperty("applySnapshotChunk")) { + object.applySnapshotChunk = $root.tendermint.abci.RequestApplySnapshotChunk.toObject(message.applySnapshotChunk, options); + if (options.oneofs) + object.value = "applySnapshotChunk"; + } + return object; + }; + + /** + * Converts this Request to JSON. + * @function toJSON + * @memberof tendermint.abci.Request + * @instance + * @returns {Object.} JSON object + */ + Request.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Request; + })(abci.Request || {}); + + abci.RequestEcho = (function(RequestEcho) { + + /** + * Properties of a RequestEcho. + * @memberof tendermint.abci + * @interface IRequestEcho + * @property {string|null} [message] RequestEcho message + */ + + /** + * Constructs a new RequestEcho. + * @memberof tendermint.abci + * @classdesc Represents a RequestEcho. + * @implements IRequestEcho + * @constructor + * @param {tendermint.abci.IRequestEcho=} [properties] Properties to set + */ + function RequestEcho(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RequestEcho message. + * @member {string} message + * @memberof tendermint.abci.RequestEcho + * @instance + */ + RequestEcho.prototype.message = ""; + + /** + * Creates a new RequestEcho instance using the specified properties. + * @function create + * @memberof tendermint.abci.RequestEcho + * @static + * @param {tendermint.abci.IRequestEcho=} [properties] Properties to set + * @returns {tendermint.abci.RequestEcho} RequestEcho instance + */ + RequestEcho.create = function create(properties) { + return new RequestEcho(properties); + }; + + /** + * Encodes the specified RequestEcho message. Does not implicitly {@link tendermint.abci.RequestEcho.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.RequestEcho + * @static + * @param {tendermint.abci.IRequestEcho} message RequestEcho message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestEcho.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.message); + return writer; + }; + + /** + * Encodes the specified RequestEcho message, length delimited. Does not implicitly {@link tendermint.abci.RequestEcho.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.RequestEcho + * @static + * @param {tendermint.abci.IRequestEcho} message RequestEcho message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestEcho.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RequestEcho message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.RequestEcho + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.RequestEcho} RequestEcho + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestEcho.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.RequestEcho(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.message = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RequestEcho message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.RequestEcho + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.RequestEcho} RequestEcho + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestEcho.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RequestEcho message. + * @function verify + * @memberof tendermint.abci.RequestEcho + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RequestEcho.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + return null; + }; + + /** + * Creates a RequestEcho message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.RequestEcho + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.RequestEcho} RequestEcho + */ + RequestEcho.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.RequestEcho) + return object; + let message = new $root.tendermint.abci.RequestEcho(); + if (object.message != null) + message.message = String(object.message); + return message; + }; + + /** + * Creates a plain object from a RequestEcho message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.RequestEcho + * @static + * @param {tendermint.abci.RequestEcho} message RequestEcho + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RequestEcho.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.message = ""; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + return object; + }; + + /** + * Converts this RequestEcho to JSON. + * @function toJSON + * @memberof tendermint.abci.RequestEcho + * @instance + * @returns {Object.} JSON object + */ + RequestEcho.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RequestEcho; + })(abci.RequestEcho || {}); + + abci.RequestFlush = (function(RequestFlush) { + + /** + * Properties of a RequestFlush. + * @memberof tendermint.abci + * @interface IRequestFlush + */ + + /** + * Constructs a new RequestFlush. + * @memberof tendermint.abci + * @classdesc Represents a RequestFlush. + * @implements IRequestFlush + * @constructor + * @param {tendermint.abci.IRequestFlush=} [properties] Properties to set + */ + function RequestFlush(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new RequestFlush instance using the specified properties. + * @function create + * @memberof tendermint.abci.RequestFlush + * @static + * @param {tendermint.abci.IRequestFlush=} [properties] Properties to set + * @returns {tendermint.abci.RequestFlush} RequestFlush instance + */ + RequestFlush.create = function create(properties) { + return new RequestFlush(properties); + }; + + /** + * Encodes the specified RequestFlush message. Does not implicitly {@link tendermint.abci.RequestFlush.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.RequestFlush + * @static + * @param {tendermint.abci.IRequestFlush} message RequestFlush message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestFlush.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified RequestFlush message, length delimited. Does not implicitly {@link tendermint.abci.RequestFlush.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.RequestFlush + * @static + * @param {tendermint.abci.IRequestFlush} message RequestFlush message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestFlush.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RequestFlush message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.RequestFlush + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.RequestFlush} RequestFlush + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestFlush.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.RequestFlush(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RequestFlush message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.RequestFlush + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.RequestFlush} RequestFlush + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestFlush.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RequestFlush message. + * @function verify + * @memberof tendermint.abci.RequestFlush + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RequestFlush.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a RequestFlush message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.RequestFlush + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.RequestFlush} RequestFlush + */ + RequestFlush.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.RequestFlush) + return object; + return new $root.tendermint.abci.RequestFlush(); + }; + + /** + * Creates a plain object from a RequestFlush message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.RequestFlush + * @static + * @param {tendermint.abci.RequestFlush} message RequestFlush + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RequestFlush.toObject = function toObject() { + return {}; + }; + + /** + * Converts this RequestFlush to JSON. + * @function toJSON + * @memberof tendermint.abci.RequestFlush + * @instance + * @returns {Object.} JSON object + */ + RequestFlush.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RequestFlush; + })(abci.RequestFlush || {}); + + abci.RequestInfo = (function(RequestInfo) { + + /** + * Properties of a RequestInfo. + * @memberof tendermint.abci + * @interface IRequestInfo + * @property {string|null} [version] RequestInfo version + * @property {number|Long|null} [blockVersion] RequestInfo blockVersion + * @property {number|Long|null} [p2pVersion] RequestInfo p2pVersion + */ + + /** + * Constructs a new RequestInfo. + * @memberof tendermint.abci + * @classdesc Represents a RequestInfo. + * @implements IRequestInfo + * @constructor + * @param {tendermint.abci.IRequestInfo=} [properties] Properties to set + */ + function RequestInfo(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RequestInfo version. + * @member {string} version + * @memberof tendermint.abci.RequestInfo + * @instance + */ + RequestInfo.prototype.version = ""; + + /** + * RequestInfo blockVersion. + * @member {number|Long} blockVersion + * @memberof tendermint.abci.RequestInfo + * @instance + */ + RequestInfo.prototype.blockVersion = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * RequestInfo p2pVersion. + * @member {number|Long} p2pVersion + * @memberof tendermint.abci.RequestInfo + * @instance + */ + RequestInfo.prototype.p2pVersion = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new RequestInfo instance using the specified properties. + * @function create + * @memberof tendermint.abci.RequestInfo + * @static + * @param {tendermint.abci.IRequestInfo=} [properties] Properties to set + * @returns {tendermint.abci.RequestInfo} RequestInfo instance + */ + RequestInfo.create = function create(properties) { + return new RequestInfo(properties); + }; + + /** + * Encodes the specified RequestInfo message. Does not implicitly {@link tendermint.abci.RequestInfo.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.RequestInfo + * @static + * @param {tendermint.abci.IRequestInfo} message RequestInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); + if (message.blockVersion != null && Object.hasOwnProperty.call(message, "blockVersion")) + writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.blockVersion); + if (message.p2pVersion != null && Object.hasOwnProperty.call(message, "p2pVersion")) + writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.p2pVersion); + return writer; + }; + + /** + * Encodes the specified RequestInfo message, length delimited. Does not implicitly {@link tendermint.abci.RequestInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.RequestInfo + * @static + * @param {tendermint.abci.IRequestInfo} message RequestInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RequestInfo message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.RequestInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.RequestInfo} RequestInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.RequestInfo(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.version = reader.string(); + break; + case 2: + message.blockVersion = reader.uint64(); + break; + case 3: + message.p2pVersion = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RequestInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.RequestInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.RequestInfo} RequestInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RequestInfo message. + * @function verify + * @memberof tendermint.abci.RequestInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RequestInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.blockVersion != null && message.hasOwnProperty("blockVersion")) + if (!$util.isInteger(message.blockVersion) && !(message.blockVersion && $util.isInteger(message.blockVersion.low) && $util.isInteger(message.blockVersion.high))) + return "blockVersion: integer|Long expected"; + if (message.p2pVersion != null && message.hasOwnProperty("p2pVersion")) + if (!$util.isInteger(message.p2pVersion) && !(message.p2pVersion && $util.isInteger(message.p2pVersion.low) && $util.isInteger(message.p2pVersion.high))) + return "p2pVersion: integer|Long expected"; + return null; + }; + + /** + * Creates a RequestInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.RequestInfo + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.RequestInfo} RequestInfo + */ + RequestInfo.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.RequestInfo) + return object; + let message = new $root.tendermint.abci.RequestInfo(); + if (object.version != null) + message.version = String(object.version); + if (object.blockVersion != null) + if ($util.Long) + (message.blockVersion = $util.Long.fromValue(object.blockVersion)).unsigned = true; + else if (typeof object.blockVersion === "string") + message.blockVersion = parseInt(object.blockVersion, 10); + else if (typeof object.blockVersion === "number") + message.blockVersion = object.blockVersion; + else if (typeof object.blockVersion === "object") + message.blockVersion = new $util.LongBits(object.blockVersion.low >>> 0, object.blockVersion.high >>> 0).toNumber(true); + if (object.p2pVersion != null) + if ($util.Long) + (message.p2pVersion = $util.Long.fromValue(object.p2pVersion)).unsigned = true; + else if (typeof object.p2pVersion === "string") + message.p2pVersion = parseInt(object.p2pVersion, 10); + else if (typeof object.p2pVersion === "number") + message.p2pVersion = object.p2pVersion; + else if (typeof object.p2pVersion === "object") + message.p2pVersion = new $util.LongBits(object.p2pVersion.low >>> 0, object.p2pVersion.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a RequestInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.RequestInfo + * @static + * @param {tendermint.abci.RequestInfo} message RequestInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RequestInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.version = ""; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.blockVersion = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.blockVersion = options.longs === String ? "0" : 0; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.p2pVersion = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.p2pVersion = options.longs === String ? "0" : 0; + } + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.blockVersion != null && message.hasOwnProperty("blockVersion")) + if (typeof message.blockVersion === "number") + object.blockVersion = options.longs === String ? String(message.blockVersion) : message.blockVersion; + else + object.blockVersion = options.longs === String ? $util.Long.prototype.toString.call(message.blockVersion) : options.longs === Number ? new $util.LongBits(message.blockVersion.low >>> 0, message.blockVersion.high >>> 0).toNumber(true) : message.blockVersion; + if (message.p2pVersion != null && message.hasOwnProperty("p2pVersion")) + if (typeof message.p2pVersion === "number") + object.p2pVersion = options.longs === String ? String(message.p2pVersion) : message.p2pVersion; + else + object.p2pVersion = options.longs === String ? $util.Long.prototype.toString.call(message.p2pVersion) : options.longs === Number ? new $util.LongBits(message.p2pVersion.low >>> 0, message.p2pVersion.high >>> 0).toNumber(true) : message.p2pVersion; + return object; + }; + + /** + * Converts this RequestInfo to JSON. + * @function toJSON + * @memberof tendermint.abci.RequestInfo + * @instance + * @returns {Object.} JSON object + */ + RequestInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RequestInfo; + })(abci.RequestInfo || {}); + + abci.RequestSetOption = (function(RequestSetOption) { + + /** + * Properties of a RequestSetOption. + * @memberof tendermint.abci + * @interface IRequestSetOption + * @property {string|null} [key] RequestSetOption key + * @property {string|null} [value] RequestSetOption value + */ + + /** + * Constructs a new RequestSetOption. + * @memberof tendermint.abci + * @classdesc Represents a RequestSetOption. + * @implements IRequestSetOption + * @constructor + * @param {tendermint.abci.IRequestSetOption=} [properties] Properties to set + */ + function RequestSetOption(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RequestSetOption key. + * @member {string} key + * @memberof tendermint.abci.RequestSetOption + * @instance + */ + RequestSetOption.prototype.key = ""; + + /** + * RequestSetOption value. + * @member {string} value + * @memberof tendermint.abci.RequestSetOption + * @instance + */ + RequestSetOption.prototype.value = ""; + + /** + * Creates a new RequestSetOption instance using the specified properties. + * @function create + * @memberof tendermint.abci.RequestSetOption + * @static + * @param {tendermint.abci.IRequestSetOption=} [properties] Properties to set + * @returns {tendermint.abci.RequestSetOption} RequestSetOption instance + */ + RequestSetOption.create = function create(properties) { + return new RequestSetOption(properties); + }; + + /** + * Encodes the specified RequestSetOption message. Does not implicitly {@link tendermint.abci.RequestSetOption.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.RequestSetOption + * @static + * @param {tendermint.abci.IRequestSetOption} message RequestSetOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestSetOption.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + return writer; + }; + + /** + * Encodes the specified RequestSetOption message, length delimited. Does not implicitly {@link tendermint.abci.RequestSetOption.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.RequestSetOption + * @static + * @param {tendermint.abci.IRequestSetOption} message RequestSetOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestSetOption.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RequestSetOption message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.RequestSetOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.RequestSetOption} RequestSetOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestSetOption.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.RequestSetOption(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.key = reader.string(); + break; + case 2: + message.value = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RequestSetOption message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.RequestSetOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.RequestSetOption} RequestSetOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestSetOption.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RequestSetOption message. + * @function verify + * @memberof tendermint.abci.RequestSetOption + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RequestSetOption.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.key != null && message.hasOwnProperty("key")) + if (!$util.isString(message.key)) + return "key: string expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + return null; + }; + + /** + * Creates a RequestSetOption message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.RequestSetOption + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.RequestSetOption} RequestSetOption + */ + RequestSetOption.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.RequestSetOption) + return object; + let message = new $root.tendermint.abci.RequestSetOption(); + if (object.key != null) + message.key = String(object.key); + if (object.value != null) + message.value = String(object.value); + return message; + }; + + /** + * Creates a plain object from a RequestSetOption message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.RequestSetOption + * @static + * @param {tendermint.abci.RequestSetOption} message RequestSetOption + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RequestSetOption.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.key = ""; + object.value = ""; + } + if (message.key != null && message.hasOwnProperty("key")) + object.key = message.key; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + return object; + }; + + /** + * Converts this RequestSetOption to JSON. + * @function toJSON + * @memberof tendermint.abci.RequestSetOption + * @instance + * @returns {Object.} JSON object + */ + RequestSetOption.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RequestSetOption; + })(abci.RequestSetOption || {}); + + abci.RequestInitChain = (function(RequestInitChain) { + + /** + * Properties of a RequestInitChain. + * @memberof tendermint.abci + * @interface IRequestInitChain + * @property {google.protobuf.ITimestamp|null} [time] RequestInitChain time + * @property {string|null} [chainId] RequestInitChain chainId + * @property {tendermint.abci.IConsensusParams|null} [consensusParams] RequestInitChain consensusParams + * @property {Array.|null} [validators] RequestInitChain validators + * @property {Uint8Array|null} [appStateBytes] RequestInitChain appStateBytes + * @property {number|Long|null} [initialHeight] RequestInitChain initialHeight + */ + + /** + * Constructs a new RequestInitChain. + * @memberof tendermint.abci + * @classdesc Represents a RequestInitChain. + * @implements IRequestInitChain + * @constructor + * @param {tendermint.abci.IRequestInitChain=} [properties] Properties to set + */ + function RequestInitChain(properties) { + this.validators = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RequestInitChain time. + * @member {google.protobuf.ITimestamp|null|undefined} time + * @memberof tendermint.abci.RequestInitChain + * @instance + */ + RequestInitChain.prototype.time = null; + + /** + * RequestInitChain chainId. + * @member {string} chainId + * @memberof tendermint.abci.RequestInitChain + * @instance + */ + RequestInitChain.prototype.chainId = ""; + + /** + * RequestInitChain consensusParams. + * @member {tendermint.abci.IConsensusParams|null|undefined} consensusParams + * @memberof tendermint.abci.RequestInitChain + * @instance + */ + RequestInitChain.prototype.consensusParams = null; + + /** + * RequestInitChain validators. + * @member {Array.} validators + * @memberof tendermint.abci.RequestInitChain + * @instance + */ + RequestInitChain.prototype.validators = $util.emptyArray; + + /** + * RequestInitChain appStateBytes. + * @member {Uint8Array} appStateBytes + * @memberof tendermint.abci.RequestInitChain + * @instance + */ + RequestInitChain.prototype.appStateBytes = $util.newBuffer([]); + + /** + * RequestInitChain initialHeight. + * @member {number|Long} initialHeight + * @memberof tendermint.abci.RequestInitChain + * @instance + */ + RequestInitChain.prototype.initialHeight = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new RequestInitChain instance using the specified properties. + * @function create + * @memberof tendermint.abci.RequestInitChain + * @static + * @param {tendermint.abci.IRequestInitChain=} [properties] Properties to set + * @returns {tendermint.abci.RequestInitChain} RequestInitChain instance + */ + RequestInitChain.create = function create(properties) { + return new RequestInitChain(properties); + }; + + /** + * Encodes the specified RequestInitChain message. Does not implicitly {@link tendermint.abci.RequestInitChain.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.RequestInitChain + * @static + * @param {tendermint.abci.IRequestInitChain} message RequestInitChain message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestInitChain.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.time != null && Object.hasOwnProperty.call(message, "time")) + $root.google.protobuf.Timestamp.encode(message.time, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.chainId != null && Object.hasOwnProperty.call(message, "chainId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.chainId); + if (message.consensusParams != null && Object.hasOwnProperty.call(message, "consensusParams")) + $root.tendermint.abci.ConsensusParams.encode(message.consensusParams, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.validators != null && message.validators.length) + for (let i = 0; i < message.validators.length; ++i) + $root.tendermint.abci.ValidatorUpdate.encode(message.validators[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.appStateBytes != null && Object.hasOwnProperty.call(message, "appStateBytes")) + writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.appStateBytes); + if (message.initialHeight != null && Object.hasOwnProperty.call(message, "initialHeight")) + writer.uint32(/* id 6, wireType 0 =*/48).int64(message.initialHeight); + return writer; + }; + + /** + * Encodes the specified RequestInitChain message, length delimited. Does not implicitly {@link tendermint.abci.RequestInitChain.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.RequestInitChain + * @static + * @param {tendermint.abci.IRequestInitChain} message RequestInitChain message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestInitChain.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RequestInitChain message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.RequestInitChain + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.RequestInitChain} RequestInitChain + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestInitChain.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.RequestInitChain(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.time = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 2: + message.chainId = reader.string(); + break; + case 3: + message.consensusParams = $root.tendermint.abci.ConsensusParams.decode(reader, reader.uint32()); + break; + case 4: + if (!(message.validators && message.validators.length)) + message.validators = []; + message.validators.push($root.tendermint.abci.ValidatorUpdate.decode(reader, reader.uint32())); + break; + case 5: + message.appStateBytes = reader.bytes(); + break; + case 6: + message.initialHeight = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RequestInitChain message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.RequestInitChain + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.RequestInitChain} RequestInitChain + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestInitChain.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RequestInitChain message. + * @function verify + * @memberof tendermint.abci.RequestInitChain + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RequestInitChain.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.time != null && message.hasOwnProperty("time")) { + let error = $root.google.protobuf.Timestamp.verify(message.time); + if (error) + return "time." + error; + } + if (message.chainId != null && message.hasOwnProperty("chainId")) + if (!$util.isString(message.chainId)) + return "chainId: string expected"; + if (message.consensusParams != null && message.hasOwnProperty("consensusParams")) { + let error = $root.tendermint.abci.ConsensusParams.verify(message.consensusParams); + if (error) + return "consensusParams." + error; + } + if (message.validators != null && message.hasOwnProperty("validators")) { + if (!Array.isArray(message.validators)) + return "validators: array expected"; + for (let i = 0; i < message.validators.length; ++i) { + let error = $root.tendermint.abci.ValidatorUpdate.verify(message.validators[i]); + if (error) + return "validators." + error; + } + } + if (message.appStateBytes != null && message.hasOwnProperty("appStateBytes")) + if (!(message.appStateBytes && typeof message.appStateBytes.length === "number" || $util.isString(message.appStateBytes))) + return "appStateBytes: buffer expected"; + if (message.initialHeight != null && message.hasOwnProperty("initialHeight")) + if (!$util.isInteger(message.initialHeight) && !(message.initialHeight && $util.isInteger(message.initialHeight.low) && $util.isInteger(message.initialHeight.high))) + return "initialHeight: integer|Long expected"; + return null; + }; + + /** + * Creates a RequestInitChain message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.RequestInitChain + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.RequestInitChain} RequestInitChain + */ + RequestInitChain.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.RequestInitChain) + return object; + let message = new $root.tendermint.abci.RequestInitChain(); + if (object.time != null) { + if (typeof object.time !== "object") + throw TypeError(".tendermint.abci.RequestInitChain.time: object expected"); + message.time = $root.google.protobuf.Timestamp.fromObject(object.time); + } + if (object.chainId != null) + message.chainId = String(object.chainId); + if (object.consensusParams != null) { + if (typeof object.consensusParams !== "object") + throw TypeError(".tendermint.abci.RequestInitChain.consensusParams: object expected"); + message.consensusParams = $root.tendermint.abci.ConsensusParams.fromObject(object.consensusParams); + } + if (object.validators) { + if (!Array.isArray(object.validators)) + throw TypeError(".tendermint.abci.RequestInitChain.validators: array expected"); + message.validators = []; + for (let i = 0; i < object.validators.length; ++i) { + if (typeof object.validators[i] !== "object") + throw TypeError(".tendermint.abci.RequestInitChain.validators: object expected"); + message.validators[i] = $root.tendermint.abci.ValidatorUpdate.fromObject(object.validators[i]); + } + } + if (object.appStateBytes != null) + if (typeof object.appStateBytes === "string") + $util.base64.decode(object.appStateBytes, message.appStateBytes = $util.newBuffer($util.base64.length(object.appStateBytes)), 0); + else if (object.appStateBytes.length) + message.appStateBytes = object.appStateBytes; + if (object.initialHeight != null) + if ($util.Long) + (message.initialHeight = $util.Long.fromValue(object.initialHeight)).unsigned = false; + else if (typeof object.initialHeight === "string") + message.initialHeight = parseInt(object.initialHeight, 10); + else if (typeof object.initialHeight === "number") + message.initialHeight = object.initialHeight; + else if (typeof object.initialHeight === "object") + message.initialHeight = new $util.LongBits(object.initialHeight.low >>> 0, object.initialHeight.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a RequestInitChain message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.RequestInitChain + * @static + * @param {tendermint.abci.RequestInitChain} message RequestInitChain + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RequestInitChain.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.validators = []; + if (options.defaults) { + object.time = null; + object.chainId = ""; + object.consensusParams = null; + if (options.bytes === String) + object.appStateBytes = ""; + else { + object.appStateBytes = []; + if (options.bytes !== Array) + object.appStateBytes = $util.newBuffer(object.appStateBytes); + } + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.initialHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.initialHeight = options.longs === String ? "0" : 0; + } + if (message.time != null && message.hasOwnProperty("time")) + object.time = $root.google.protobuf.Timestamp.toObject(message.time, options); + if (message.chainId != null && message.hasOwnProperty("chainId")) + object.chainId = message.chainId; + if (message.consensusParams != null && message.hasOwnProperty("consensusParams")) + object.consensusParams = $root.tendermint.abci.ConsensusParams.toObject(message.consensusParams, options); + if (message.validators && message.validators.length) { + object.validators = []; + for (let j = 0; j < message.validators.length; ++j) + object.validators[j] = $root.tendermint.abci.ValidatorUpdate.toObject(message.validators[j], options); + } + if (message.appStateBytes != null && message.hasOwnProperty("appStateBytes")) + object.appStateBytes = options.bytes === String ? $util.base64.encode(message.appStateBytes, 0, message.appStateBytes.length) : options.bytes === Array ? Array.prototype.slice.call(message.appStateBytes) : message.appStateBytes; + if (message.initialHeight != null && message.hasOwnProperty("initialHeight")) + if (typeof message.initialHeight === "number") + object.initialHeight = options.longs === String ? String(message.initialHeight) : message.initialHeight; + else + object.initialHeight = options.longs === String ? $util.Long.prototype.toString.call(message.initialHeight) : options.longs === Number ? new $util.LongBits(message.initialHeight.low >>> 0, message.initialHeight.high >>> 0).toNumber() : message.initialHeight; + return object; + }; + + /** + * Converts this RequestInitChain to JSON. + * @function toJSON + * @memberof tendermint.abci.RequestInitChain + * @instance + * @returns {Object.} JSON object + */ + RequestInitChain.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RequestInitChain; + })(abci.RequestInitChain || {}); + + abci.RequestQuery = (function(RequestQuery) { + + /** + * Properties of a RequestQuery. + * @memberof tendermint.abci + * @interface IRequestQuery + * @property {Uint8Array|null} [data] RequestQuery data + * @property {string|null} [path] RequestQuery path + * @property {number|Long|null} [height] RequestQuery height + * @property {boolean|null} [prove] RequestQuery prove + */ + + /** + * Constructs a new RequestQuery. + * @memberof tendermint.abci + * @classdesc Represents a RequestQuery. + * @implements IRequestQuery + * @constructor + * @param {tendermint.abci.IRequestQuery=} [properties] Properties to set + */ + function RequestQuery(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RequestQuery data. + * @member {Uint8Array} data + * @memberof tendermint.abci.RequestQuery + * @instance + */ + RequestQuery.prototype.data = $util.newBuffer([]); + + /** + * RequestQuery path. + * @member {string} path + * @memberof tendermint.abci.RequestQuery + * @instance + */ + RequestQuery.prototype.path = ""; + + /** + * RequestQuery height. + * @member {number|Long} height + * @memberof tendermint.abci.RequestQuery + * @instance + */ + RequestQuery.prototype.height = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * RequestQuery prove. + * @member {boolean} prove + * @memberof tendermint.abci.RequestQuery + * @instance + */ + RequestQuery.prototype.prove = false; + + /** + * Creates a new RequestQuery instance using the specified properties. + * @function create + * @memberof tendermint.abci.RequestQuery + * @static + * @param {tendermint.abci.IRequestQuery=} [properties] Properties to set + * @returns {tendermint.abci.RequestQuery} RequestQuery instance + */ + RequestQuery.create = function create(properties) { + return new RequestQuery(properties); + }; + + /** + * Encodes the specified RequestQuery message. Does not implicitly {@link tendermint.abci.RequestQuery.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.RequestQuery + * @static + * @param {tendermint.abci.IRequestQuery} message RequestQuery message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestQuery.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.data != null && Object.hasOwnProperty.call(message, "data")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.data); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + if (message.height != null && Object.hasOwnProperty.call(message, "height")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.height); + if (message.prove != null && Object.hasOwnProperty.call(message, "prove")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.prove); + return writer; + }; + + /** + * Encodes the specified RequestQuery message, length delimited. Does not implicitly {@link tendermint.abci.RequestQuery.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.RequestQuery + * @static + * @param {tendermint.abci.IRequestQuery} message RequestQuery message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestQuery.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RequestQuery message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.RequestQuery + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.RequestQuery} RequestQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestQuery.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.RequestQuery(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.data = reader.bytes(); + break; + case 2: + message.path = reader.string(); + break; + case 3: + message.height = reader.int64(); + break; + case 4: + message.prove = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RequestQuery message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.RequestQuery + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.RequestQuery} RequestQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestQuery.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RequestQuery message. + * @function verify + * @memberof tendermint.abci.RequestQuery + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RequestQuery.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.data != null && message.hasOwnProperty("data")) + if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) + return "data: buffer expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + if (message.height != null && message.hasOwnProperty("height")) + if (!$util.isInteger(message.height) && !(message.height && $util.isInteger(message.height.low) && $util.isInteger(message.height.high))) + return "height: integer|Long expected"; + if (message.prove != null && message.hasOwnProperty("prove")) + if (typeof message.prove !== "boolean") + return "prove: boolean expected"; + return null; + }; + + /** + * Creates a RequestQuery message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.RequestQuery + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.RequestQuery} RequestQuery + */ + RequestQuery.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.RequestQuery) + return object; + let message = new $root.tendermint.abci.RequestQuery(); + if (object.data != null) + if (typeof object.data === "string") + $util.base64.decode(object.data, message.data = $util.newBuffer($util.base64.length(object.data)), 0); + else if (object.data.length) + message.data = object.data; + if (object.path != null) + message.path = String(object.path); + if (object.height != null) + if ($util.Long) + (message.height = $util.Long.fromValue(object.height)).unsigned = false; + else if (typeof object.height === "string") + message.height = parseInt(object.height, 10); + else if (typeof object.height === "number") + message.height = object.height; + else if (typeof object.height === "object") + message.height = new $util.LongBits(object.height.low >>> 0, object.height.high >>> 0).toNumber(); + if (object.prove != null) + message.prove = Boolean(object.prove); + return message; + }; + + /** + * Creates a plain object from a RequestQuery message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.RequestQuery + * @static + * @param {tendermint.abci.RequestQuery} message RequestQuery + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RequestQuery.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + if (options.bytes === String) + object.data = ""; + else { + object.data = []; + if (options.bytes !== Array) + object.data = $util.newBuffer(object.data); + } + object.path = ""; + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.height = options.longs === String ? "0" : 0; + object.prove = false; + } + if (message.data != null && message.hasOwnProperty("data")) + object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + if (message.height != null && message.hasOwnProperty("height")) + if (typeof message.height === "number") + object.height = options.longs === String ? String(message.height) : message.height; + else + object.height = options.longs === String ? $util.Long.prototype.toString.call(message.height) : options.longs === Number ? new $util.LongBits(message.height.low >>> 0, message.height.high >>> 0).toNumber() : message.height; + if (message.prove != null && message.hasOwnProperty("prove")) + object.prove = message.prove; + return object; + }; + + /** + * Converts this RequestQuery to JSON. + * @function toJSON + * @memberof tendermint.abci.RequestQuery + * @instance + * @returns {Object.} JSON object + */ + RequestQuery.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RequestQuery; + })(abci.RequestQuery || {}); + + abci.RequestBeginBlock = (function(RequestBeginBlock) { + + /** + * Properties of a RequestBeginBlock. + * @memberof tendermint.abci + * @interface IRequestBeginBlock + * @property {Uint8Array|null} [hash] RequestBeginBlock hash + * @property {tendermint.types.IHeader|null} [header] RequestBeginBlock header + * @property {tendermint.abci.ILastCommitInfo|null} [lastCommitInfo] RequestBeginBlock lastCommitInfo + * @property {Array.|null} [byzantineValidators] RequestBeginBlock byzantineValidators + */ + + /** + * Constructs a new RequestBeginBlock. + * @memberof tendermint.abci + * @classdesc Represents a RequestBeginBlock. + * @implements IRequestBeginBlock + * @constructor + * @param {tendermint.abci.IRequestBeginBlock=} [properties] Properties to set + */ + function RequestBeginBlock(properties) { + this.byzantineValidators = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RequestBeginBlock hash. + * @member {Uint8Array} hash + * @memberof tendermint.abci.RequestBeginBlock + * @instance + */ + RequestBeginBlock.prototype.hash = $util.newBuffer([]); + + /** + * RequestBeginBlock header. + * @member {tendermint.types.IHeader|null|undefined} header + * @memberof tendermint.abci.RequestBeginBlock + * @instance + */ + RequestBeginBlock.prototype.header = null; + + /** + * RequestBeginBlock lastCommitInfo. + * @member {tendermint.abci.ILastCommitInfo|null|undefined} lastCommitInfo + * @memberof tendermint.abci.RequestBeginBlock + * @instance + */ + RequestBeginBlock.prototype.lastCommitInfo = null; + + /** + * RequestBeginBlock byzantineValidators. + * @member {Array.} byzantineValidators + * @memberof tendermint.abci.RequestBeginBlock + * @instance + */ + RequestBeginBlock.prototype.byzantineValidators = $util.emptyArray; + + /** + * Creates a new RequestBeginBlock instance using the specified properties. + * @function create + * @memberof tendermint.abci.RequestBeginBlock + * @static + * @param {tendermint.abci.IRequestBeginBlock=} [properties] Properties to set + * @returns {tendermint.abci.RequestBeginBlock} RequestBeginBlock instance + */ + RequestBeginBlock.create = function create(properties) { + return new RequestBeginBlock(properties); + }; + + /** + * Encodes the specified RequestBeginBlock message. Does not implicitly {@link tendermint.abci.RequestBeginBlock.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.RequestBeginBlock + * @static + * @param {tendermint.abci.IRequestBeginBlock} message RequestBeginBlock message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestBeginBlock.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.hash != null && Object.hasOwnProperty.call(message, "hash")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.hash); + if (message.header != null && Object.hasOwnProperty.call(message, "header")) + $root.tendermint.types.Header.encode(message.header, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.lastCommitInfo != null && Object.hasOwnProperty.call(message, "lastCommitInfo")) + $root.tendermint.abci.LastCommitInfo.encode(message.lastCommitInfo, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.byzantineValidators != null && message.byzantineValidators.length) + for (let i = 0; i < message.byzantineValidators.length; ++i) + $root.tendermint.abci.Evidence.encode(message.byzantineValidators[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RequestBeginBlock message, length delimited. Does not implicitly {@link tendermint.abci.RequestBeginBlock.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.RequestBeginBlock + * @static + * @param {tendermint.abci.IRequestBeginBlock} message RequestBeginBlock message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestBeginBlock.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RequestBeginBlock message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.RequestBeginBlock + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.RequestBeginBlock} RequestBeginBlock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestBeginBlock.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.RequestBeginBlock(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.hash = reader.bytes(); + break; + case 2: + message.header = $root.tendermint.types.Header.decode(reader, reader.uint32()); + break; + case 3: + message.lastCommitInfo = $root.tendermint.abci.LastCommitInfo.decode(reader, reader.uint32()); + break; + case 4: + if (!(message.byzantineValidators && message.byzantineValidators.length)) + message.byzantineValidators = []; + message.byzantineValidators.push($root.tendermint.abci.Evidence.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RequestBeginBlock message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.RequestBeginBlock + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.RequestBeginBlock} RequestBeginBlock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestBeginBlock.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RequestBeginBlock message. + * @function verify + * @memberof tendermint.abci.RequestBeginBlock + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RequestBeginBlock.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.hash != null && message.hasOwnProperty("hash")) + if (!(message.hash && typeof message.hash.length === "number" || $util.isString(message.hash))) + return "hash: buffer expected"; + if (message.header != null && message.hasOwnProperty("header")) { + let error = $root.tendermint.types.Header.verify(message.header); + if (error) + return "header." + error; + } + if (message.lastCommitInfo != null && message.hasOwnProperty("lastCommitInfo")) { + let error = $root.tendermint.abci.LastCommitInfo.verify(message.lastCommitInfo); + if (error) + return "lastCommitInfo." + error; + } + if (message.byzantineValidators != null && message.hasOwnProperty("byzantineValidators")) { + if (!Array.isArray(message.byzantineValidators)) + return "byzantineValidators: array expected"; + for (let i = 0; i < message.byzantineValidators.length; ++i) { + let error = $root.tendermint.abci.Evidence.verify(message.byzantineValidators[i]); + if (error) + return "byzantineValidators." + error; + } + } + return null; + }; + + /** + * Creates a RequestBeginBlock message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.RequestBeginBlock + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.RequestBeginBlock} RequestBeginBlock + */ + RequestBeginBlock.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.RequestBeginBlock) + return object; + let message = new $root.tendermint.abci.RequestBeginBlock(); + if (object.hash != null) + if (typeof object.hash === "string") + $util.base64.decode(object.hash, message.hash = $util.newBuffer($util.base64.length(object.hash)), 0); + else if (object.hash.length) + message.hash = object.hash; + if (object.header != null) { + if (typeof object.header !== "object") + throw TypeError(".tendermint.abci.RequestBeginBlock.header: object expected"); + message.header = $root.tendermint.types.Header.fromObject(object.header); + } + if (object.lastCommitInfo != null) { + if (typeof object.lastCommitInfo !== "object") + throw TypeError(".tendermint.abci.RequestBeginBlock.lastCommitInfo: object expected"); + message.lastCommitInfo = $root.tendermint.abci.LastCommitInfo.fromObject(object.lastCommitInfo); + } + if (object.byzantineValidators) { + if (!Array.isArray(object.byzantineValidators)) + throw TypeError(".tendermint.abci.RequestBeginBlock.byzantineValidators: array expected"); + message.byzantineValidators = []; + for (let i = 0; i < object.byzantineValidators.length; ++i) { + if (typeof object.byzantineValidators[i] !== "object") + throw TypeError(".tendermint.abci.RequestBeginBlock.byzantineValidators: object expected"); + message.byzantineValidators[i] = $root.tendermint.abci.Evidence.fromObject(object.byzantineValidators[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a RequestBeginBlock message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.RequestBeginBlock + * @static + * @param {tendermint.abci.RequestBeginBlock} message RequestBeginBlock + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RequestBeginBlock.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.byzantineValidators = []; + if (options.defaults) { + if (options.bytes === String) + object.hash = ""; + else { + object.hash = []; + if (options.bytes !== Array) + object.hash = $util.newBuffer(object.hash); + } + object.header = null; + object.lastCommitInfo = null; + } + if (message.hash != null && message.hasOwnProperty("hash")) + object.hash = options.bytes === String ? $util.base64.encode(message.hash, 0, message.hash.length) : options.bytes === Array ? Array.prototype.slice.call(message.hash) : message.hash; + if (message.header != null && message.hasOwnProperty("header")) + object.header = $root.tendermint.types.Header.toObject(message.header, options); + if (message.lastCommitInfo != null && message.hasOwnProperty("lastCommitInfo")) + object.lastCommitInfo = $root.tendermint.abci.LastCommitInfo.toObject(message.lastCommitInfo, options); + if (message.byzantineValidators && message.byzantineValidators.length) { + object.byzantineValidators = []; + for (let j = 0; j < message.byzantineValidators.length; ++j) + object.byzantineValidators[j] = $root.tendermint.abci.Evidence.toObject(message.byzantineValidators[j], options); + } + return object; + }; + + /** + * Converts this RequestBeginBlock to JSON. + * @function toJSON + * @memberof tendermint.abci.RequestBeginBlock + * @instance + * @returns {Object.} JSON object + */ + RequestBeginBlock.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RequestBeginBlock; + })(abci.RequestBeginBlock || {}); + + /** + * CheckTxType enum. + * @name tendermint.abci.CheckTxType + * @enum {string} + * @property {number} NEW=0 NEW value + * @property {number} RECHECK=1 RECHECK value + */ + abci.CheckTxType = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NEW"] = 0; + values[valuesById[1] = "RECHECK"] = 1; + return values; + })(); + + abci.RequestCheckTx = (function(RequestCheckTx) { + + /** + * Properties of a RequestCheckTx. + * @memberof tendermint.abci + * @interface IRequestCheckTx + * @property {Uint8Array|null} [tx] RequestCheckTx tx + * @property {tendermint.abci.CheckTxType|null} [type] RequestCheckTx type + */ + + /** + * Constructs a new RequestCheckTx. + * @memberof tendermint.abci + * @classdesc Represents a RequestCheckTx. + * @implements IRequestCheckTx + * @constructor + * @param {tendermint.abci.IRequestCheckTx=} [properties] Properties to set + */ + function RequestCheckTx(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RequestCheckTx tx. + * @member {Uint8Array} tx + * @memberof tendermint.abci.RequestCheckTx + * @instance + */ + RequestCheckTx.prototype.tx = $util.newBuffer([]); + + /** + * RequestCheckTx type. + * @member {tendermint.abci.CheckTxType} type + * @memberof tendermint.abci.RequestCheckTx + * @instance + */ + RequestCheckTx.prototype.type = 0; + + /** + * Creates a new RequestCheckTx instance using the specified properties. + * @function create + * @memberof tendermint.abci.RequestCheckTx + * @static + * @param {tendermint.abci.IRequestCheckTx=} [properties] Properties to set + * @returns {tendermint.abci.RequestCheckTx} RequestCheckTx instance + */ + RequestCheckTx.create = function create(properties) { + return new RequestCheckTx(properties); + }; + + /** + * Encodes the specified RequestCheckTx message. Does not implicitly {@link tendermint.abci.RequestCheckTx.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.RequestCheckTx + * @static + * @param {tendermint.abci.IRequestCheckTx} message RequestCheckTx message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestCheckTx.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tx != null && Object.hasOwnProperty.call(message, "tx")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.tx); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); + return writer; + }; + + /** + * Encodes the specified RequestCheckTx message, length delimited. Does not implicitly {@link tendermint.abci.RequestCheckTx.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.RequestCheckTx + * @static + * @param {tendermint.abci.IRequestCheckTx} message RequestCheckTx message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestCheckTx.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RequestCheckTx message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.RequestCheckTx + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.RequestCheckTx} RequestCheckTx + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestCheckTx.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.RequestCheckTx(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.tx = reader.bytes(); + break; + case 2: + message.type = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RequestCheckTx message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.RequestCheckTx + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.RequestCheckTx} RequestCheckTx + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestCheckTx.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RequestCheckTx message. + * @function verify + * @memberof tendermint.abci.RequestCheckTx + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RequestCheckTx.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tx != null && message.hasOwnProperty("tx")) + if (!(message.tx && typeof message.tx.length === "number" || $util.isString(message.tx))) + return "tx: buffer expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + break; + } + return null; + }; + + /** + * Creates a RequestCheckTx message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.RequestCheckTx + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.RequestCheckTx} RequestCheckTx + */ + RequestCheckTx.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.RequestCheckTx) + return object; + let message = new $root.tendermint.abci.RequestCheckTx(); + if (object.tx != null) + if (typeof object.tx === "string") + $util.base64.decode(object.tx, message.tx = $util.newBuffer($util.base64.length(object.tx)), 0); + else if (object.tx.length) + message.tx = object.tx; + switch (object.type) { + case "NEW": + case 0: + message.type = 0; + break; + case "RECHECK": + case 1: + message.type = 1; + break; + } + return message; + }; + + /** + * Creates a plain object from a RequestCheckTx message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.RequestCheckTx + * @static + * @param {tendermint.abci.RequestCheckTx} message RequestCheckTx + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RequestCheckTx.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + if (options.bytes === String) + object.tx = ""; + else { + object.tx = []; + if (options.bytes !== Array) + object.tx = $util.newBuffer(object.tx); + } + object.type = options.enums === String ? "NEW" : 0; + } + if (message.tx != null && message.hasOwnProperty("tx")) + object.tx = options.bytes === String ? $util.base64.encode(message.tx, 0, message.tx.length) : options.bytes === Array ? Array.prototype.slice.call(message.tx) : message.tx; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.tendermint.abci.CheckTxType[message.type] : message.type; + return object; + }; + + /** + * Converts this RequestCheckTx to JSON. + * @function toJSON + * @memberof tendermint.abci.RequestCheckTx + * @instance + * @returns {Object.} JSON object + */ + RequestCheckTx.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RequestCheckTx; + })(abci.RequestCheckTx || {}); + + abci.RequestDeliverTx = (function(RequestDeliverTx) { + + /** + * Properties of a RequestDeliverTx. + * @memberof tendermint.abci + * @interface IRequestDeliverTx + * @property {Uint8Array|null} [tx] RequestDeliverTx tx + */ + + /** + * Constructs a new RequestDeliverTx. + * @memberof tendermint.abci + * @classdesc Represents a RequestDeliverTx. + * @implements IRequestDeliverTx + * @constructor + * @param {tendermint.abci.IRequestDeliverTx=} [properties] Properties to set + */ + function RequestDeliverTx(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RequestDeliverTx tx. + * @member {Uint8Array} tx + * @memberof tendermint.abci.RequestDeliverTx + * @instance + */ + RequestDeliverTx.prototype.tx = $util.newBuffer([]); + + /** + * Creates a new RequestDeliverTx instance using the specified properties. + * @function create + * @memberof tendermint.abci.RequestDeliverTx + * @static + * @param {tendermint.abci.IRequestDeliverTx=} [properties] Properties to set + * @returns {tendermint.abci.RequestDeliverTx} RequestDeliverTx instance + */ + RequestDeliverTx.create = function create(properties) { + return new RequestDeliverTx(properties); + }; + + /** + * Encodes the specified RequestDeliverTx message. Does not implicitly {@link tendermint.abci.RequestDeliverTx.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.RequestDeliverTx + * @static + * @param {tendermint.abci.IRequestDeliverTx} message RequestDeliverTx message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestDeliverTx.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tx != null && Object.hasOwnProperty.call(message, "tx")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.tx); + return writer; + }; + + /** + * Encodes the specified RequestDeliverTx message, length delimited. Does not implicitly {@link tendermint.abci.RequestDeliverTx.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.RequestDeliverTx + * @static + * @param {tendermint.abci.IRequestDeliverTx} message RequestDeliverTx message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestDeliverTx.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RequestDeliverTx message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.RequestDeliverTx + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.RequestDeliverTx} RequestDeliverTx + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestDeliverTx.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.RequestDeliverTx(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.tx = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RequestDeliverTx message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.RequestDeliverTx + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.RequestDeliverTx} RequestDeliverTx + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestDeliverTx.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RequestDeliverTx message. + * @function verify + * @memberof tendermint.abci.RequestDeliverTx + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RequestDeliverTx.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tx != null && message.hasOwnProperty("tx")) + if (!(message.tx && typeof message.tx.length === "number" || $util.isString(message.tx))) + return "tx: buffer expected"; + return null; + }; + + /** + * Creates a RequestDeliverTx message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.RequestDeliverTx + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.RequestDeliverTx} RequestDeliverTx + */ + RequestDeliverTx.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.RequestDeliverTx) + return object; + let message = new $root.tendermint.abci.RequestDeliverTx(); + if (object.tx != null) + if (typeof object.tx === "string") + $util.base64.decode(object.tx, message.tx = $util.newBuffer($util.base64.length(object.tx)), 0); + else if (object.tx.length) + message.tx = object.tx; + return message; + }; + + /** + * Creates a plain object from a RequestDeliverTx message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.RequestDeliverTx + * @static + * @param {tendermint.abci.RequestDeliverTx} message RequestDeliverTx + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RequestDeliverTx.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + if (options.bytes === String) + object.tx = ""; + else { + object.tx = []; + if (options.bytes !== Array) + object.tx = $util.newBuffer(object.tx); + } + if (message.tx != null && message.hasOwnProperty("tx")) + object.tx = options.bytes === String ? $util.base64.encode(message.tx, 0, message.tx.length) : options.bytes === Array ? Array.prototype.slice.call(message.tx) : message.tx; + return object; + }; + + /** + * Converts this RequestDeliverTx to JSON. + * @function toJSON + * @memberof tendermint.abci.RequestDeliverTx + * @instance + * @returns {Object.} JSON object + */ + RequestDeliverTx.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RequestDeliverTx; + })(abci.RequestDeliverTx || {}); + + abci.RequestEndBlock = (function(RequestEndBlock) { + + /** + * Properties of a RequestEndBlock. + * @memberof tendermint.abci + * @interface IRequestEndBlock + * @property {number|Long|null} [height] RequestEndBlock height + */ + + /** + * Constructs a new RequestEndBlock. + * @memberof tendermint.abci + * @classdesc Represents a RequestEndBlock. + * @implements IRequestEndBlock + * @constructor + * @param {tendermint.abci.IRequestEndBlock=} [properties] Properties to set + */ + function RequestEndBlock(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RequestEndBlock height. + * @member {number|Long} height + * @memberof tendermint.abci.RequestEndBlock + * @instance + */ + RequestEndBlock.prototype.height = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new RequestEndBlock instance using the specified properties. + * @function create + * @memberof tendermint.abci.RequestEndBlock + * @static + * @param {tendermint.abci.IRequestEndBlock=} [properties] Properties to set + * @returns {tendermint.abci.RequestEndBlock} RequestEndBlock instance + */ + RequestEndBlock.create = function create(properties) { + return new RequestEndBlock(properties); + }; + + /** + * Encodes the specified RequestEndBlock message. Does not implicitly {@link tendermint.abci.RequestEndBlock.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.RequestEndBlock + * @static + * @param {tendermint.abci.IRequestEndBlock} message RequestEndBlock message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestEndBlock.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.height != null && Object.hasOwnProperty.call(message, "height")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.height); + return writer; + }; + + /** + * Encodes the specified RequestEndBlock message, length delimited. Does not implicitly {@link tendermint.abci.RequestEndBlock.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.RequestEndBlock + * @static + * @param {tendermint.abci.IRequestEndBlock} message RequestEndBlock message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestEndBlock.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RequestEndBlock message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.RequestEndBlock + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.RequestEndBlock} RequestEndBlock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestEndBlock.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.RequestEndBlock(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.height = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RequestEndBlock message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.RequestEndBlock + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.RequestEndBlock} RequestEndBlock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestEndBlock.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RequestEndBlock message. + * @function verify + * @memberof tendermint.abci.RequestEndBlock + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RequestEndBlock.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.height != null && message.hasOwnProperty("height")) + if (!$util.isInteger(message.height) && !(message.height && $util.isInteger(message.height.low) && $util.isInteger(message.height.high))) + return "height: integer|Long expected"; + return null; + }; + + /** + * Creates a RequestEndBlock message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.RequestEndBlock + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.RequestEndBlock} RequestEndBlock + */ + RequestEndBlock.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.RequestEndBlock) + return object; + let message = new $root.tendermint.abci.RequestEndBlock(); + if (object.height != null) + if ($util.Long) + (message.height = $util.Long.fromValue(object.height)).unsigned = false; + else if (typeof object.height === "string") + message.height = parseInt(object.height, 10); + else if (typeof object.height === "number") + message.height = object.height; + else if (typeof object.height === "object") + message.height = new $util.LongBits(object.height.low >>> 0, object.height.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a RequestEndBlock message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.RequestEndBlock + * @static + * @param {tendermint.abci.RequestEndBlock} message RequestEndBlock + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RequestEndBlock.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.height = options.longs === String ? "0" : 0; + if (message.height != null && message.hasOwnProperty("height")) + if (typeof message.height === "number") + object.height = options.longs === String ? String(message.height) : message.height; + else + object.height = options.longs === String ? $util.Long.prototype.toString.call(message.height) : options.longs === Number ? new $util.LongBits(message.height.low >>> 0, message.height.high >>> 0).toNumber() : message.height; + return object; + }; + + /** + * Converts this RequestEndBlock to JSON. + * @function toJSON + * @memberof tendermint.abci.RequestEndBlock + * @instance + * @returns {Object.} JSON object + */ + RequestEndBlock.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RequestEndBlock; + })(abci.RequestEndBlock || {}); + + abci.RequestCommit = (function(RequestCommit) { + + /** + * Properties of a RequestCommit. + * @memberof tendermint.abci + * @interface IRequestCommit + */ + + /** + * Constructs a new RequestCommit. + * @memberof tendermint.abci + * @classdesc Represents a RequestCommit. + * @implements IRequestCommit + * @constructor + * @param {tendermint.abci.IRequestCommit=} [properties] Properties to set + */ + function RequestCommit(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new RequestCommit instance using the specified properties. + * @function create + * @memberof tendermint.abci.RequestCommit + * @static + * @param {tendermint.abci.IRequestCommit=} [properties] Properties to set + * @returns {tendermint.abci.RequestCommit} RequestCommit instance + */ + RequestCommit.create = function create(properties) { + return new RequestCommit(properties); + }; + + /** + * Encodes the specified RequestCommit message. Does not implicitly {@link tendermint.abci.RequestCommit.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.RequestCommit + * @static + * @param {tendermint.abci.IRequestCommit} message RequestCommit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestCommit.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified RequestCommit message, length delimited. Does not implicitly {@link tendermint.abci.RequestCommit.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.RequestCommit + * @static + * @param {tendermint.abci.IRequestCommit} message RequestCommit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestCommit.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RequestCommit message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.RequestCommit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.RequestCommit} RequestCommit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestCommit.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.RequestCommit(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RequestCommit message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.RequestCommit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.RequestCommit} RequestCommit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestCommit.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RequestCommit message. + * @function verify + * @memberof tendermint.abci.RequestCommit + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RequestCommit.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a RequestCommit message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.RequestCommit + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.RequestCommit} RequestCommit + */ + RequestCommit.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.RequestCommit) + return object; + return new $root.tendermint.abci.RequestCommit(); + }; + + /** + * Creates a plain object from a RequestCommit message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.RequestCommit + * @static + * @param {tendermint.abci.RequestCommit} message RequestCommit + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RequestCommit.toObject = function toObject() { + return {}; + }; + + /** + * Converts this RequestCommit to JSON. + * @function toJSON + * @memberof tendermint.abci.RequestCommit + * @instance + * @returns {Object.} JSON object + */ + RequestCommit.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RequestCommit; + })(abci.RequestCommit || {}); + + abci.RequestListSnapshots = (function(RequestListSnapshots) { + + /** + * Properties of a RequestListSnapshots. + * @memberof tendermint.abci + * @interface IRequestListSnapshots + */ + + /** + * Constructs a new RequestListSnapshots. + * @memberof tendermint.abci + * @classdesc Represents a RequestListSnapshots. + * @implements IRequestListSnapshots + * @constructor + * @param {tendermint.abci.IRequestListSnapshots=} [properties] Properties to set + */ + function RequestListSnapshots(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new RequestListSnapshots instance using the specified properties. + * @function create + * @memberof tendermint.abci.RequestListSnapshots + * @static + * @param {tendermint.abci.IRequestListSnapshots=} [properties] Properties to set + * @returns {tendermint.abci.RequestListSnapshots} RequestListSnapshots instance + */ + RequestListSnapshots.create = function create(properties) { + return new RequestListSnapshots(properties); + }; + + /** + * Encodes the specified RequestListSnapshots message. Does not implicitly {@link tendermint.abci.RequestListSnapshots.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.RequestListSnapshots + * @static + * @param {tendermint.abci.IRequestListSnapshots} message RequestListSnapshots message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestListSnapshots.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified RequestListSnapshots message, length delimited. Does not implicitly {@link tendermint.abci.RequestListSnapshots.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.RequestListSnapshots + * @static + * @param {tendermint.abci.IRequestListSnapshots} message RequestListSnapshots message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestListSnapshots.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RequestListSnapshots message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.RequestListSnapshots + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.RequestListSnapshots} RequestListSnapshots + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestListSnapshots.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.RequestListSnapshots(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RequestListSnapshots message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.RequestListSnapshots + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.RequestListSnapshots} RequestListSnapshots + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestListSnapshots.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RequestListSnapshots message. + * @function verify + * @memberof tendermint.abci.RequestListSnapshots + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RequestListSnapshots.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a RequestListSnapshots message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.RequestListSnapshots + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.RequestListSnapshots} RequestListSnapshots + */ + RequestListSnapshots.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.RequestListSnapshots) + return object; + return new $root.tendermint.abci.RequestListSnapshots(); + }; + + /** + * Creates a plain object from a RequestListSnapshots message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.RequestListSnapshots + * @static + * @param {tendermint.abci.RequestListSnapshots} message RequestListSnapshots + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RequestListSnapshots.toObject = function toObject() { + return {}; + }; + + /** + * Converts this RequestListSnapshots to JSON. + * @function toJSON + * @memberof tendermint.abci.RequestListSnapshots + * @instance + * @returns {Object.} JSON object + */ + RequestListSnapshots.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RequestListSnapshots; + })(abci.RequestListSnapshots || {}); + + abci.RequestOfferSnapshot = (function(RequestOfferSnapshot) { + + /** + * Properties of a RequestOfferSnapshot. + * @memberof tendermint.abci + * @interface IRequestOfferSnapshot + * @property {tendermint.abci.ISnapshot|null} [snapshot] RequestOfferSnapshot snapshot + * @property {Uint8Array|null} [appHash] RequestOfferSnapshot appHash + */ + + /** + * Constructs a new RequestOfferSnapshot. + * @memberof tendermint.abci + * @classdesc Represents a RequestOfferSnapshot. + * @implements IRequestOfferSnapshot + * @constructor + * @param {tendermint.abci.IRequestOfferSnapshot=} [properties] Properties to set + */ + function RequestOfferSnapshot(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RequestOfferSnapshot snapshot. + * @member {tendermint.abci.ISnapshot|null|undefined} snapshot + * @memberof tendermint.abci.RequestOfferSnapshot + * @instance + */ + RequestOfferSnapshot.prototype.snapshot = null; + + /** + * RequestOfferSnapshot appHash. + * @member {Uint8Array} appHash + * @memberof tendermint.abci.RequestOfferSnapshot + * @instance + */ + RequestOfferSnapshot.prototype.appHash = $util.newBuffer([]); + + /** + * Creates a new RequestOfferSnapshot instance using the specified properties. + * @function create + * @memberof tendermint.abci.RequestOfferSnapshot + * @static + * @param {tendermint.abci.IRequestOfferSnapshot=} [properties] Properties to set + * @returns {tendermint.abci.RequestOfferSnapshot} RequestOfferSnapshot instance + */ + RequestOfferSnapshot.create = function create(properties) { + return new RequestOfferSnapshot(properties); + }; + + /** + * Encodes the specified RequestOfferSnapshot message. Does not implicitly {@link tendermint.abci.RequestOfferSnapshot.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.RequestOfferSnapshot + * @static + * @param {tendermint.abci.IRequestOfferSnapshot} message RequestOfferSnapshot message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestOfferSnapshot.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.snapshot != null && Object.hasOwnProperty.call(message, "snapshot")) + $root.tendermint.abci.Snapshot.encode(message.snapshot, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.appHash != null && Object.hasOwnProperty.call(message, "appHash")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.appHash); + return writer; + }; + + /** + * Encodes the specified RequestOfferSnapshot message, length delimited. Does not implicitly {@link tendermint.abci.RequestOfferSnapshot.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.RequestOfferSnapshot + * @static + * @param {tendermint.abci.IRequestOfferSnapshot} message RequestOfferSnapshot message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestOfferSnapshot.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RequestOfferSnapshot message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.RequestOfferSnapshot + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.RequestOfferSnapshot} RequestOfferSnapshot + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestOfferSnapshot.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.RequestOfferSnapshot(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.snapshot = $root.tendermint.abci.Snapshot.decode(reader, reader.uint32()); + break; + case 2: + message.appHash = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RequestOfferSnapshot message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.RequestOfferSnapshot + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.RequestOfferSnapshot} RequestOfferSnapshot + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestOfferSnapshot.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RequestOfferSnapshot message. + * @function verify + * @memberof tendermint.abci.RequestOfferSnapshot + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RequestOfferSnapshot.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.snapshot != null && message.hasOwnProperty("snapshot")) { + let error = $root.tendermint.abci.Snapshot.verify(message.snapshot); + if (error) + return "snapshot." + error; + } + if (message.appHash != null && message.hasOwnProperty("appHash")) + if (!(message.appHash && typeof message.appHash.length === "number" || $util.isString(message.appHash))) + return "appHash: buffer expected"; + return null; + }; + + /** + * Creates a RequestOfferSnapshot message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.RequestOfferSnapshot + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.RequestOfferSnapshot} RequestOfferSnapshot + */ + RequestOfferSnapshot.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.RequestOfferSnapshot) + return object; + let message = new $root.tendermint.abci.RequestOfferSnapshot(); + if (object.snapshot != null) { + if (typeof object.snapshot !== "object") + throw TypeError(".tendermint.abci.RequestOfferSnapshot.snapshot: object expected"); + message.snapshot = $root.tendermint.abci.Snapshot.fromObject(object.snapshot); + } + if (object.appHash != null) + if (typeof object.appHash === "string") + $util.base64.decode(object.appHash, message.appHash = $util.newBuffer($util.base64.length(object.appHash)), 0); + else if (object.appHash.length) + message.appHash = object.appHash; + return message; + }; + + /** + * Creates a plain object from a RequestOfferSnapshot message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.RequestOfferSnapshot + * @static + * @param {tendermint.abci.RequestOfferSnapshot} message RequestOfferSnapshot + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RequestOfferSnapshot.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.snapshot = null; + if (options.bytes === String) + object.appHash = ""; + else { + object.appHash = []; + if (options.bytes !== Array) + object.appHash = $util.newBuffer(object.appHash); + } + } + if (message.snapshot != null && message.hasOwnProperty("snapshot")) + object.snapshot = $root.tendermint.abci.Snapshot.toObject(message.snapshot, options); + if (message.appHash != null && message.hasOwnProperty("appHash")) + object.appHash = options.bytes === String ? $util.base64.encode(message.appHash, 0, message.appHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.appHash) : message.appHash; + return object; + }; + + /** + * Converts this RequestOfferSnapshot to JSON. + * @function toJSON + * @memberof tendermint.abci.RequestOfferSnapshot + * @instance + * @returns {Object.} JSON object + */ + RequestOfferSnapshot.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RequestOfferSnapshot; + })(abci.RequestOfferSnapshot || {}); + + abci.RequestLoadSnapshotChunk = (function(RequestLoadSnapshotChunk) { + + /** + * Properties of a RequestLoadSnapshotChunk. + * @memberof tendermint.abci + * @interface IRequestLoadSnapshotChunk + * @property {number|Long|null} [height] RequestLoadSnapshotChunk height + * @property {number|null} [format] RequestLoadSnapshotChunk format + * @property {number|null} [chunk] RequestLoadSnapshotChunk chunk + */ + + /** + * Constructs a new RequestLoadSnapshotChunk. + * @memberof tendermint.abci + * @classdesc Represents a RequestLoadSnapshotChunk. + * @implements IRequestLoadSnapshotChunk + * @constructor + * @param {tendermint.abci.IRequestLoadSnapshotChunk=} [properties] Properties to set + */ + function RequestLoadSnapshotChunk(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RequestLoadSnapshotChunk height. + * @member {number|Long} height + * @memberof tendermint.abci.RequestLoadSnapshotChunk + * @instance + */ + RequestLoadSnapshotChunk.prototype.height = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * RequestLoadSnapshotChunk format. + * @member {number} format + * @memberof tendermint.abci.RequestLoadSnapshotChunk + * @instance + */ + RequestLoadSnapshotChunk.prototype.format = 0; + + /** + * RequestLoadSnapshotChunk chunk. + * @member {number} chunk + * @memberof tendermint.abci.RequestLoadSnapshotChunk + * @instance + */ + RequestLoadSnapshotChunk.prototype.chunk = 0; + + /** + * Creates a new RequestLoadSnapshotChunk instance using the specified properties. + * @function create + * @memberof tendermint.abci.RequestLoadSnapshotChunk + * @static + * @param {tendermint.abci.IRequestLoadSnapshotChunk=} [properties] Properties to set + * @returns {tendermint.abci.RequestLoadSnapshotChunk} RequestLoadSnapshotChunk instance + */ + RequestLoadSnapshotChunk.create = function create(properties) { + return new RequestLoadSnapshotChunk(properties); + }; + + /** + * Encodes the specified RequestLoadSnapshotChunk message. Does not implicitly {@link tendermint.abci.RequestLoadSnapshotChunk.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.RequestLoadSnapshotChunk + * @static + * @param {tendermint.abci.IRequestLoadSnapshotChunk} message RequestLoadSnapshotChunk message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestLoadSnapshotChunk.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.height != null && Object.hasOwnProperty.call(message, "height")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.height); + if (message.format != null && Object.hasOwnProperty.call(message, "format")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.format); + if (message.chunk != null && Object.hasOwnProperty.call(message, "chunk")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.chunk); + return writer; + }; + + /** + * Encodes the specified RequestLoadSnapshotChunk message, length delimited. Does not implicitly {@link tendermint.abci.RequestLoadSnapshotChunk.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.RequestLoadSnapshotChunk + * @static + * @param {tendermint.abci.IRequestLoadSnapshotChunk} message RequestLoadSnapshotChunk message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestLoadSnapshotChunk.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RequestLoadSnapshotChunk message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.RequestLoadSnapshotChunk + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.RequestLoadSnapshotChunk} RequestLoadSnapshotChunk + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestLoadSnapshotChunk.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.RequestLoadSnapshotChunk(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.height = reader.uint64(); + break; + case 2: + message.format = reader.uint32(); + break; + case 3: + message.chunk = reader.uint32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RequestLoadSnapshotChunk message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.RequestLoadSnapshotChunk + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.RequestLoadSnapshotChunk} RequestLoadSnapshotChunk + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestLoadSnapshotChunk.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RequestLoadSnapshotChunk message. + * @function verify + * @memberof tendermint.abci.RequestLoadSnapshotChunk + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RequestLoadSnapshotChunk.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.height != null && message.hasOwnProperty("height")) + if (!$util.isInteger(message.height) && !(message.height && $util.isInteger(message.height.low) && $util.isInteger(message.height.high))) + return "height: integer|Long expected"; + if (message.format != null && message.hasOwnProperty("format")) + if (!$util.isInteger(message.format)) + return "format: integer expected"; + if (message.chunk != null && message.hasOwnProperty("chunk")) + if (!$util.isInteger(message.chunk)) + return "chunk: integer expected"; + return null; + }; + + /** + * Creates a RequestLoadSnapshotChunk message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.RequestLoadSnapshotChunk + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.RequestLoadSnapshotChunk} RequestLoadSnapshotChunk + */ + RequestLoadSnapshotChunk.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.RequestLoadSnapshotChunk) + return object; + let message = new $root.tendermint.abci.RequestLoadSnapshotChunk(); + if (object.height != null) + if ($util.Long) + (message.height = $util.Long.fromValue(object.height)).unsigned = true; + else if (typeof object.height === "string") + message.height = parseInt(object.height, 10); + else if (typeof object.height === "number") + message.height = object.height; + else if (typeof object.height === "object") + message.height = new $util.LongBits(object.height.low >>> 0, object.height.high >>> 0).toNumber(true); + if (object.format != null) + message.format = object.format >>> 0; + if (object.chunk != null) + message.chunk = object.chunk >>> 0; + return message; + }; + + /** + * Creates a plain object from a RequestLoadSnapshotChunk message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.RequestLoadSnapshotChunk + * @static + * @param {tendermint.abci.RequestLoadSnapshotChunk} message RequestLoadSnapshotChunk + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RequestLoadSnapshotChunk.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.height = options.longs === String ? "0" : 0; + object.format = 0; + object.chunk = 0; + } + if (message.height != null && message.hasOwnProperty("height")) + if (typeof message.height === "number") + object.height = options.longs === String ? String(message.height) : message.height; + else + object.height = options.longs === String ? $util.Long.prototype.toString.call(message.height) : options.longs === Number ? new $util.LongBits(message.height.low >>> 0, message.height.high >>> 0).toNumber(true) : message.height; + if (message.format != null && message.hasOwnProperty("format")) + object.format = message.format; + if (message.chunk != null && message.hasOwnProperty("chunk")) + object.chunk = message.chunk; + return object; + }; + + /** + * Converts this RequestLoadSnapshotChunk to JSON. + * @function toJSON + * @memberof tendermint.abci.RequestLoadSnapshotChunk + * @instance + * @returns {Object.} JSON object + */ + RequestLoadSnapshotChunk.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RequestLoadSnapshotChunk; + })(abci.RequestLoadSnapshotChunk || {}); + + abci.RequestApplySnapshotChunk = (function(RequestApplySnapshotChunk) { + + /** + * Properties of a RequestApplySnapshotChunk. + * @memberof tendermint.abci + * @interface IRequestApplySnapshotChunk + * @property {number|null} [index] RequestApplySnapshotChunk index + * @property {Uint8Array|null} [chunk] RequestApplySnapshotChunk chunk + * @property {string|null} [sender] RequestApplySnapshotChunk sender + */ + + /** + * Constructs a new RequestApplySnapshotChunk. + * @memberof tendermint.abci + * @classdesc Represents a RequestApplySnapshotChunk. + * @implements IRequestApplySnapshotChunk + * @constructor + * @param {tendermint.abci.IRequestApplySnapshotChunk=} [properties] Properties to set + */ + function RequestApplySnapshotChunk(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RequestApplySnapshotChunk index. + * @member {number} index + * @memberof tendermint.abci.RequestApplySnapshotChunk + * @instance + */ + RequestApplySnapshotChunk.prototype.index = 0; + + /** + * RequestApplySnapshotChunk chunk. + * @member {Uint8Array} chunk + * @memberof tendermint.abci.RequestApplySnapshotChunk + * @instance + */ + RequestApplySnapshotChunk.prototype.chunk = $util.newBuffer([]); + + /** + * RequestApplySnapshotChunk sender. + * @member {string} sender + * @memberof tendermint.abci.RequestApplySnapshotChunk + * @instance + */ + RequestApplySnapshotChunk.prototype.sender = ""; + + /** + * Creates a new RequestApplySnapshotChunk instance using the specified properties. + * @function create + * @memberof tendermint.abci.RequestApplySnapshotChunk + * @static + * @param {tendermint.abci.IRequestApplySnapshotChunk=} [properties] Properties to set + * @returns {tendermint.abci.RequestApplySnapshotChunk} RequestApplySnapshotChunk instance + */ + RequestApplySnapshotChunk.create = function create(properties) { + return new RequestApplySnapshotChunk(properties); + }; + + /** + * Encodes the specified RequestApplySnapshotChunk message. Does not implicitly {@link tendermint.abci.RequestApplySnapshotChunk.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.RequestApplySnapshotChunk + * @static + * @param {tendermint.abci.IRequestApplySnapshotChunk} message RequestApplySnapshotChunk message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestApplySnapshotChunk.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.index != null && Object.hasOwnProperty.call(message, "index")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.index); + if (message.chunk != null && Object.hasOwnProperty.call(message, "chunk")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.chunk); + if (message.sender != null && Object.hasOwnProperty.call(message, "sender")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.sender); + return writer; + }; + + /** + * Encodes the specified RequestApplySnapshotChunk message, length delimited. Does not implicitly {@link tendermint.abci.RequestApplySnapshotChunk.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.RequestApplySnapshotChunk + * @static + * @param {tendermint.abci.IRequestApplySnapshotChunk} message RequestApplySnapshotChunk message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestApplySnapshotChunk.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RequestApplySnapshotChunk message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.RequestApplySnapshotChunk + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.RequestApplySnapshotChunk} RequestApplySnapshotChunk + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestApplySnapshotChunk.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.RequestApplySnapshotChunk(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.index = reader.uint32(); + break; + case 2: + message.chunk = reader.bytes(); + break; + case 3: + message.sender = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RequestApplySnapshotChunk message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.RequestApplySnapshotChunk + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.RequestApplySnapshotChunk} RequestApplySnapshotChunk + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestApplySnapshotChunk.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RequestApplySnapshotChunk message. + * @function verify + * @memberof tendermint.abci.RequestApplySnapshotChunk + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RequestApplySnapshotChunk.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.index != null && message.hasOwnProperty("index")) + if (!$util.isInteger(message.index)) + return "index: integer expected"; + if (message.chunk != null && message.hasOwnProperty("chunk")) + if (!(message.chunk && typeof message.chunk.length === "number" || $util.isString(message.chunk))) + return "chunk: buffer expected"; + if (message.sender != null && message.hasOwnProperty("sender")) + if (!$util.isString(message.sender)) + return "sender: string expected"; + return null; + }; + + /** + * Creates a RequestApplySnapshotChunk message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.RequestApplySnapshotChunk + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.RequestApplySnapshotChunk} RequestApplySnapshotChunk + */ + RequestApplySnapshotChunk.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.RequestApplySnapshotChunk) + return object; + let message = new $root.tendermint.abci.RequestApplySnapshotChunk(); + if (object.index != null) + message.index = object.index >>> 0; + if (object.chunk != null) + if (typeof object.chunk === "string") + $util.base64.decode(object.chunk, message.chunk = $util.newBuffer($util.base64.length(object.chunk)), 0); + else if (object.chunk.length) + message.chunk = object.chunk; + if (object.sender != null) + message.sender = String(object.sender); + return message; + }; + + /** + * Creates a plain object from a RequestApplySnapshotChunk message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.RequestApplySnapshotChunk + * @static + * @param {tendermint.abci.RequestApplySnapshotChunk} message RequestApplySnapshotChunk + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RequestApplySnapshotChunk.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.index = 0; + if (options.bytes === String) + object.chunk = ""; + else { + object.chunk = []; + if (options.bytes !== Array) + object.chunk = $util.newBuffer(object.chunk); + } + object.sender = ""; + } + if (message.index != null && message.hasOwnProperty("index")) + object.index = message.index; + if (message.chunk != null && message.hasOwnProperty("chunk")) + object.chunk = options.bytes === String ? $util.base64.encode(message.chunk, 0, message.chunk.length) : options.bytes === Array ? Array.prototype.slice.call(message.chunk) : message.chunk; + if (message.sender != null && message.hasOwnProperty("sender")) + object.sender = message.sender; + return object; + }; + + /** + * Converts this RequestApplySnapshotChunk to JSON. + * @function toJSON + * @memberof tendermint.abci.RequestApplySnapshotChunk + * @instance + * @returns {Object.} JSON object + */ + RequestApplySnapshotChunk.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RequestApplySnapshotChunk; + })(abci.RequestApplySnapshotChunk || {}); + + abci.Response = (function(Response) { + + /** + * Properties of a Response. + * @memberof tendermint.abci + * @interface IResponse + * @property {tendermint.abci.IResponseException|null} [exception] Response exception + * @property {tendermint.abci.IResponseEcho|null} [echo] Response echo + * @property {tendermint.abci.IResponseFlush|null} [flush] Response flush + * @property {tendermint.abci.IResponseInfo|null} [info] Response info + * @property {tendermint.abci.IResponseSetOption|null} [setOption] Response setOption + * @property {tendermint.abci.IResponseInitChain|null} [initChain] Response initChain + * @property {tendermint.abci.IResponseQuery|null} [query] Response query + * @property {tendermint.abci.IResponseBeginBlock|null} [beginBlock] Response beginBlock + * @property {tendermint.abci.IResponseCheckTx|null} [checkTx] Response checkTx + * @property {tendermint.abci.IResponseDeliverTx|null} [deliverTx] Response deliverTx + * @property {tendermint.abci.IResponseEndBlock|null} [endBlock] Response endBlock + * @property {tendermint.abci.IResponseCommit|null} [commit] Response commit + * @property {tendermint.abci.IResponseListSnapshots|null} [listSnapshots] Response listSnapshots + * @property {tendermint.abci.IResponseOfferSnapshot|null} [offerSnapshot] Response offerSnapshot + * @property {tendermint.abci.IResponseLoadSnapshotChunk|null} [loadSnapshotChunk] Response loadSnapshotChunk + * @property {tendermint.abci.IResponseApplySnapshotChunk|null} [applySnapshotChunk] Response applySnapshotChunk + */ + + /** + * Constructs a new Response. + * @memberof tendermint.abci + * @classdesc Represents a Response. + * @implements IResponse + * @constructor + * @param {tendermint.abci.IResponse=} [properties] Properties to set + */ + function Response(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Response exception. + * @member {tendermint.abci.IResponseException|null|undefined} exception + * @memberof tendermint.abci.Response + * @instance + */ + Response.prototype.exception = null; + + /** + * Response echo. + * @member {tendermint.abci.IResponseEcho|null|undefined} echo + * @memberof tendermint.abci.Response + * @instance + */ + Response.prototype.echo = null; + + /** + * Response flush. + * @member {tendermint.abci.IResponseFlush|null|undefined} flush + * @memberof tendermint.abci.Response + * @instance + */ + Response.prototype.flush = null; + + /** + * Response info. + * @member {tendermint.abci.IResponseInfo|null|undefined} info + * @memberof tendermint.abci.Response + * @instance + */ + Response.prototype.info = null; + + /** + * Response setOption. + * @member {tendermint.abci.IResponseSetOption|null|undefined} setOption + * @memberof tendermint.abci.Response + * @instance + */ + Response.prototype.setOption = null; + + /** + * Response initChain. + * @member {tendermint.abci.IResponseInitChain|null|undefined} initChain + * @memberof tendermint.abci.Response + * @instance + */ + Response.prototype.initChain = null; + + /** + * Response query. + * @member {tendermint.abci.IResponseQuery|null|undefined} query + * @memberof tendermint.abci.Response + * @instance + */ + Response.prototype.query = null; + + /** + * Response beginBlock. + * @member {tendermint.abci.IResponseBeginBlock|null|undefined} beginBlock + * @memberof tendermint.abci.Response + * @instance + */ + Response.prototype.beginBlock = null; + + /** + * Response checkTx. + * @member {tendermint.abci.IResponseCheckTx|null|undefined} checkTx + * @memberof tendermint.abci.Response + * @instance + */ + Response.prototype.checkTx = null; + + /** + * Response deliverTx. + * @member {tendermint.abci.IResponseDeliverTx|null|undefined} deliverTx + * @memberof tendermint.abci.Response + * @instance + */ + Response.prototype.deliverTx = null; + + /** + * Response endBlock. + * @member {tendermint.abci.IResponseEndBlock|null|undefined} endBlock + * @memberof tendermint.abci.Response + * @instance + */ + Response.prototype.endBlock = null; + + /** + * Response commit. + * @member {tendermint.abci.IResponseCommit|null|undefined} commit + * @memberof tendermint.abci.Response + * @instance + */ + Response.prototype.commit = null; + + /** + * Response listSnapshots. + * @member {tendermint.abci.IResponseListSnapshots|null|undefined} listSnapshots + * @memberof tendermint.abci.Response + * @instance + */ + Response.prototype.listSnapshots = null; + + /** + * Response offerSnapshot. + * @member {tendermint.abci.IResponseOfferSnapshot|null|undefined} offerSnapshot + * @memberof tendermint.abci.Response + * @instance + */ + Response.prototype.offerSnapshot = null; + + /** + * Response loadSnapshotChunk. + * @member {tendermint.abci.IResponseLoadSnapshotChunk|null|undefined} loadSnapshotChunk + * @memberof tendermint.abci.Response + * @instance + */ + Response.prototype.loadSnapshotChunk = null; + + /** + * Response applySnapshotChunk. + * @member {tendermint.abci.IResponseApplySnapshotChunk|null|undefined} applySnapshotChunk + * @memberof tendermint.abci.Response + * @instance + */ + Response.prototype.applySnapshotChunk = null; + + // OneOf field names bound to virtual getters and setters + let $oneOfFields; + + /** + * Response value. + * @member {"exception"|"echo"|"flush"|"info"|"setOption"|"initChain"|"query"|"beginBlock"|"checkTx"|"deliverTx"|"endBlock"|"commit"|"listSnapshots"|"offerSnapshot"|"loadSnapshotChunk"|"applySnapshotChunk"|undefined} value + * @memberof tendermint.abci.Response + * @instance + */ + Object.defineProperty(Response.prototype, "value", { + get: $util.oneOfGetter($oneOfFields = ["exception", "echo", "flush", "info", "setOption", "initChain", "query", "beginBlock", "checkTx", "deliverTx", "endBlock", "commit", "listSnapshots", "offerSnapshot", "loadSnapshotChunk", "applySnapshotChunk"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Response instance using the specified properties. + * @function create + * @memberof tendermint.abci.Response + * @static + * @param {tendermint.abci.IResponse=} [properties] Properties to set + * @returns {tendermint.abci.Response} Response instance + */ + Response.create = function create(properties) { + return new Response(properties); + }; + + /** + * Encodes the specified Response message. Does not implicitly {@link tendermint.abci.Response.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.Response + * @static + * @param {tendermint.abci.IResponse} message Response message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Response.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.exception != null && Object.hasOwnProperty.call(message, "exception")) + $root.tendermint.abci.ResponseException.encode(message.exception, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.echo != null && Object.hasOwnProperty.call(message, "echo")) + $root.tendermint.abci.ResponseEcho.encode(message.echo, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.flush != null && Object.hasOwnProperty.call(message, "flush")) + $root.tendermint.abci.ResponseFlush.encode(message.flush, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.info != null && Object.hasOwnProperty.call(message, "info")) + $root.tendermint.abci.ResponseInfo.encode(message.info, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.setOption != null && Object.hasOwnProperty.call(message, "setOption")) + $root.tendermint.abci.ResponseSetOption.encode(message.setOption, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.initChain != null && Object.hasOwnProperty.call(message, "initChain")) + $root.tendermint.abci.ResponseInitChain.encode(message.initChain, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.query != null && Object.hasOwnProperty.call(message, "query")) + $root.tendermint.abci.ResponseQuery.encode(message.query, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.beginBlock != null && Object.hasOwnProperty.call(message, "beginBlock")) + $root.tendermint.abci.ResponseBeginBlock.encode(message.beginBlock, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.checkTx != null && Object.hasOwnProperty.call(message, "checkTx")) + $root.tendermint.abci.ResponseCheckTx.encode(message.checkTx, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.deliverTx != null && Object.hasOwnProperty.call(message, "deliverTx")) + $root.tendermint.abci.ResponseDeliverTx.encode(message.deliverTx, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.endBlock != null && Object.hasOwnProperty.call(message, "endBlock")) + $root.tendermint.abci.ResponseEndBlock.encode(message.endBlock, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.commit != null && Object.hasOwnProperty.call(message, "commit")) + $root.tendermint.abci.ResponseCommit.encode(message.commit, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.listSnapshots != null && Object.hasOwnProperty.call(message, "listSnapshots")) + $root.tendermint.abci.ResponseListSnapshots.encode(message.listSnapshots, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.offerSnapshot != null && Object.hasOwnProperty.call(message, "offerSnapshot")) + $root.tendermint.abci.ResponseOfferSnapshot.encode(message.offerSnapshot, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.loadSnapshotChunk != null && Object.hasOwnProperty.call(message, "loadSnapshotChunk")) + $root.tendermint.abci.ResponseLoadSnapshotChunk.encode(message.loadSnapshotChunk, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.applySnapshotChunk != null && Object.hasOwnProperty.call(message, "applySnapshotChunk")) + $root.tendermint.abci.ResponseApplySnapshotChunk.encode(message.applySnapshotChunk, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Response message, length delimited. Does not implicitly {@link tendermint.abci.Response.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.Response + * @static + * @param {tendermint.abci.IResponse} message Response message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Response.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Response message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.Response + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.Response} Response + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Response.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.Response(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.exception = $root.tendermint.abci.ResponseException.decode(reader, reader.uint32()); + break; + case 2: + message.echo = $root.tendermint.abci.ResponseEcho.decode(reader, reader.uint32()); + break; + case 3: + message.flush = $root.tendermint.abci.ResponseFlush.decode(reader, reader.uint32()); + break; + case 4: + message.info = $root.tendermint.abci.ResponseInfo.decode(reader, reader.uint32()); + break; + case 5: + message.setOption = $root.tendermint.abci.ResponseSetOption.decode(reader, reader.uint32()); + break; + case 6: + message.initChain = $root.tendermint.abci.ResponseInitChain.decode(reader, reader.uint32()); + break; + case 7: + message.query = $root.tendermint.abci.ResponseQuery.decode(reader, reader.uint32()); + break; + case 8: + message.beginBlock = $root.tendermint.abci.ResponseBeginBlock.decode(reader, reader.uint32()); + break; + case 9: + message.checkTx = $root.tendermint.abci.ResponseCheckTx.decode(reader, reader.uint32()); + break; + case 10: + message.deliverTx = $root.tendermint.abci.ResponseDeliverTx.decode(reader, reader.uint32()); + break; + case 11: + message.endBlock = $root.tendermint.abci.ResponseEndBlock.decode(reader, reader.uint32()); + break; + case 12: + message.commit = $root.tendermint.abci.ResponseCommit.decode(reader, reader.uint32()); + break; + case 13: + message.listSnapshots = $root.tendermint.abci.ResponseListSnapshots.decode(reader, reader.uint32()); + break; + case 14: + message.offerSnapshot = $root.tendermint.abci.ResponseOfferSnapshot.decode(reader, reader.uint32()); + break; + case 15: + message.loadSnapshotChunk = $root.tendermint.abci.ResponseLoadSnapshotChunk.decode(reader, reader.uint32()); + break; + case 16: + message.applySnapshotChunk = $root.tendermint.abci.ResponseApplySnapshotChunk.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Response message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.Response + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.Response} Response + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Response.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Response message. + * @function verify + * @memberof tendermint.abci.Response + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Response.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + let properties = {}; + if (message.exception != null && message.hasOwnProperty("exception")) { + properties.value = 1; + { + let error = $root.tendermint.abci.ResponseException.verify(message.exception); + if (error) + return "exception." + error; + } + } + if (message.echo != null && message.hasOwnProperty("echo")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + let error = $root.tendermint.abci.ResponseEcho.verify(message.echo); + if (error) + return "echo." + error; + } + } + if (message.flush != null && message.hasOwnProperty("flush")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + let error = $root.tendermint.abci.ResponseFlush.verify(message.flush); + if (error) + return "flush." + error; + } + } + if (message.info != null && message.hasOwnProperty("info")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + let error = $root.tendermint.abci.ResponseInfo.verify(message.info); + if (error) + return "info." + error; + } + } + if (message.setOption != null && message.hasOwnProperty("setOption")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + let error = $root.tendermint.abci.ResponseSetOption.verify(message.setOption); + if (error) + return "setOption." + error; + } + } + if (message.initChain != null && message.hasOwnProperty("initChain")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + let error = $root.tendermint.abci.ResponseInitChain.verify(message.initChain); + if (error) + return "initChain." + error; + } + } + if (message.query != null && message.hasOwnProperty("query")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + let error = $root.tendermint.abci.ResponseQuery.verify(message.query); + if (error) + return "query." + error; + } + } + if (message.beginBlock != null && message.hasOwnProperty("beginBlock")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + let error = $root.tendermint.abci.ResponseBeginBlock.verify(message.beginBlock); + if (error) + return "beginBlock." + error; + } + } + if (message.checkTx != null && message.hasOwnProperty("checkTx")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + let error = $root.tendermint.abci.ResponseCheckTx.verify(message.checkTx); + if (error) + return "checkTx." + error; + } + } + if (message.deliverTx != null && message.hasOwnProperty("deliverTx")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + let error = $root.tendermint.abci.ResponseDeliverTx.verify(message.deliverTx); + if (error) + return "deliverTx." + error; + } + } + if (message.endBlock != null && message.hasOwnProperty("endBlock")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + let error = $root.tendermint.abci.ResponseEndBlock.verify(message.endBlock); + if (error) + return "endBlock." + error; + } + } + if (message.commit != null && message.hasOwnProperty("commit")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + let error = $root.tendermint.abci.ResponseCommit.verify(message.commit); + if (error) + return "commit." + error; + } + } + if (message.listSnapshots != null && message.hasOwnProperty("listSnapshots")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + let error = $root.tendermint.abci.ResponseListSnapshots.verify(message.listSnapshots); + if (error) + return "listSnapshots." + error; + } + } + if (message.offerSnapshot != null && message.hasOwnProperty("offerSnapshot")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + let error = $root.tendermint.abci.ResponseOfferSnapshot.verify(message.offerSnapshot); + if (error) + return "offerSnapshot." + error; + } + } + if (message.loadSnapshotChunk != null && message.hasOwnProperty("loadSnapshotChunk")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + let error = $root.tendermint.abci.ResponseLoadSnapshotChunk.verify(message.loadSnapshotChunk); + if (error) + return "loadSnapshotChunk." + error; + } + } + if (message.applySnapshotChunk != null && message.hasOwnProperty("applySnapshotChunk")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + let error = $root.tendermint.abci.ResponseApplySnapshotChunk.verify(message.applySnapshotChunk); + if (error) + return "applySnapshotChunk." + error; + } + } + return null; + }; + + /** + * Creates a Response message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.Response + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.Response} Response + */ + Response.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.Response) + return object; + let message = new $root.tendermint.abci.Response(); + if (object.exception != null) { + if (typeof object.exception !== "object") + throw TypeError(".tendermint.abci.Response.exception: object expected"); + message.exception = $root.tendermint.abci.ResponseException.fromObject(object.exception); + } + if (object.echo != null) { + if (typeof object.echo !== "object") + throw TypeError(".tendermint.abci.Response.echo: object expected"); + message.echo = $root.tendermint.abci.ResponseEcho.fromObject(object.echo); + } + if (object.flush != null) { + if (typeof object.flush !== "object") + throw TypeError(".tendermint.abci.Response.flush: object expected"); + message.flush = $root.tendermint.abci.ResponseFlush.fromObject(object.flush); + } + if (object.info != null) { + if (typeof object.info !== "object") + throw TypeError(".tendermint.abci.Response.info: object expected"); + message.info = $root.tendermint.abci.ResponseInfo.fromObject(object.info); + } + if (object.setOption != null) { + if (typeof object.setOption !== "object") + throw TypeError(".tendermint.abci.Response.setOption: object expected"); + message.setOption = $root.tendermint.abci.ResponseSetOption.fromObject(object.setOption); + } + if (object.initChain != null) { + if (typeof object.initChain !== "object") + throw TypeError(".tendermint.abci.Response.initChain: object expected"); + message.initChain = $root.tendermint.abci.ResponseInitChain.fromObject(object.initChain); + } + if (object.query != null) { + if (typeof object.query !== "object") + throw TypeError(".tendermint.abci.Response.query: object expected"); + message.query = $root.tendermint.abci.ResponseQuery.fromObject(object.query); + } + if (object.beginBlock != null) { + if (typeof object.beginBlock !== "object") + throw TypeError(".tendermint.abci.Response.beginBlock: object expected"); + message.beginBlock = $root.tendermint.abci.ResponseBeginBlock.fromObject(object.beginBlock); + } + if (object.checkTx != null) { + if (typeof object.checkTx !== "object") + throw TypeError(".tendermint.abci.Response.checkTx: object expected"); + message.checkTx = $root.tendermint.abci.ResponseCheckTx.fromObject(object.checkTx); + } + if (object.deliverTx != null) { + if (typeof object.deliverTx !== "object") + throw TypeError(".tendermint.abci.Response.deliverTx: object expected"); + message.deliverTx = $root.tendermint.abci.ResponseDeliverTx.fromObject(object.deliverTx); + } + if (object.endBlock != null) { + if (typeof object.endBlock !== "object") + throw TypeError(".tendermint.abci.Response.endBlock: object expected"); + message.endBlock = $root.tendermint.abci.ResponseEndBlock.fromObject(object.endBlock); + } + if (object.commit != null) { + if (typeof object.commit !== "object") + throw TypeError(".tendermint.abci.Response.commit: object expected"); + message.commit = $root.tendermint.abci.ResponseCommit.fromObject(object.commit); + } + if (object.listSnapshots != null) { + if (typeof object.listSnapshots !== "object") + throw TypeError(".tendermint.abci.Response.listSnapshots: object expected"); + message.listSnapshots = $root.tendermint.abci.ResponseListSnapshots.fromObject(object.listSnapshots); + } + if (object.offerSnapshot != null) { + if (typeof object.offerSnapshot !== "object") + throw TypeError(".tendermint.abci.Response.offerSnapshot: object expected"); + message.offerSnapshot = $root.tendermint.abci.ResponseOfferSnapshot.fromObject(object.offerSnapshot); + } + if (object.loadSnapshotChunk != null) { + if (typeof object.loadSnapshotChunk !== "object") + throw TypeError(".tendermint.abci.Response.loadSnapshotChunk: object expected"); + message.loadSnapshotChunk = $root.tendermint.abci.ResponseLoadSnapshotChunk.fromObject(object.loadSnapshotChunk); + } + if (object.applySnapshotChunk != null) { + if (typeof object.applySnapshotChunk !== "object") + throw TypeError(".tendermint.abci.Response.applySnapshotChunk: object expected"); + message.applySnapshotChunk = $root.tendermint.abci.ResponseApplySnapshotChunk.fromObject(object.applySnapshotChunk); + } + return message; + }; + + /** + * Creates a plain object from a Response message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.Response + * @static + * @param {tendermint.abci.Response} message Response + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Response.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (message.exception != null && message.hasOwnProperty("exception")) { + object.exception = $root.tendermint.abci.ResponseException.toObject(message.exception, options); + if (options.oneofs) + object.value = "exception"; + } + if (message.echo != null && message.hasOwnProperty("echo")) { + object.echo = $root.tendermint.abci.ResponseEcho.toObject(message.echo, options); + if (options.oneofs) + object.value = "echo"; + } + if (message.flush != null && message.hasOwnProperty("flush")) { + object.flush = $root.tendermint.abci.ResponseFlush.toObject(message.flush, options); + if (options.oneofs) + object.value = "flush"; + } + if (message.info != null && message.hasOwnProperty("info")) { + object.info = $root.tendermint.abci.ResponseInfo.toObject(message.info, options); + if (options.oneofs) + object.value = "info"; + } + if (message.setOption != null && message.hasOwnProperty("setOption")) { + object.setOption = $root.tendermint.abci.ResponseSetOption.toObject(message.setOption, options); + if (options.oneofs) + object.value = "setOption"; + } + if (message.initChain != null && message.hasOwnProperty("initChain")) { + object.initChain = $root.tendermint.abci.ResponseInitChain.toObject(message.initChain, options); + if (options.oneofs) + object.value = "initChain"; + } + if (message.query != null && message.hasOwnProperty("query")) { + object.query = $root.tendermint.abci.ResponseQuery.toObject(message.query, options); + if (options.oneofs) + object.value = "query"; + } + if (message.beginBlock != null && message.hasOwnProperty("beginBlock")) { + object.beginBlock = $root.tendermint.abci.ResponseBeginBlock.toObject(message.beginBlock, options); + if (options.oneofs) + object.value = "beginBlock"; + } + if (message.checkTx != null && message.hasOwnProperty("checkTx")) { + object.checkTx = $root.tendermint.abci.ResponseCheckTx.toObject(message.checkTx, options); + if (options.oneofs) + object.value = "checkTx"; + } + if (message.deliverTx != null && message.hasOwnProperty("deliverTx")) { + object.deliverTx = $root.tendermint.abci.ResponseDeliverTx.toObject(message.deliverTx, options); + if (options.oneofs) + object.value = "deliverTx"; + } + if (message.endBlock != null && message.hasOwnProperty("endBlock")) { + object.endBlock = $root.tendermint.abci.ResponseEndBlock.toObject(message.endBlock, options); + if (options.oneofs) + object.value = "endBlock"; + } + if (message.commit != null && message.hasOwnProperty("commit")) { + object.commit = $root.tendermint.abci.ResponseCommit.toObject(message.commit, options); + if (options.oneofs) + object.value = "commit"; + } + if (message.listSnapshots != null && message.hasOwnProperty("listSnapshots")) { + object.listSnapshots = $root.tendermint.abci.ResponseListSnapshots.toObject(message.listSnapshots, options); + if (options.oneofs) + object.value = "listSnapshots"; + } + if (message.offerSnapshot != null && message.hasOwnProperty("offerSnapshot")) { + object.offerSnapshot = $root.tendermint.abci.ResponseOfferSnapshot.toObject(message.offerSnapshot, options); + if (options.oneofs) + object.value = "offerSnapshot"; + } + if (message.loadSnapshotChunk != null && message.hasOwnProperty("loadSnapshotChunk")) { + object.loadSnapshotChunk = $root.tendermint.abci.ResponseLoadSnapshotChunk.toObject(message.loadSnapshotChunk, options); + if (options.oneofs) + object.value = "loadSnapshotChunk"; + } + if (message.applySnapshotChunk != null && message.hasOwnProperty("applySnapshotChunk")) { + object.applySnapshotChunk = $root.tendermint.abci.ResponseApplySnapshotChunk.toObject(message.applySnapshotChunk, options); + if (options.oneofs) + object.value = "applySnapshotChunk"; + } + return object; + }; + + /** + * Converts this Response to JSON. + * @function toJSON + * @memberof tendermint.abci.Response + * @instance + * @returns {Object.} JSON object + */ + Response.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Response; + })(abci.Response || {}); + + abci.ResponseException = (function(ResponseException) { + + /** + * Properties of a ResponseException. + * @memberof tendermint.abci + * @interface IResponseException + * @property {string|null} [error] ResponseException error + */ + + /** + * Constructs a new ResponseException. + * @memberof tendermint.abci + * @classdesc Represents a ResponseException. + * @implements IResponseException + * @constructor + * @param {tendermint.abci.IResponseException=} [properties] Properties to set + */ + function ResponseException(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResponseException error. + * @member {string} error + * @memberof tendermint.abci.ResponseException + * @instance + */ + ResponseException.prototype.error = ""; + + /** + * Creates a new ResponseException instance using the specified properties. + * @function create + * @memberof tendermint.abci.ResponseException + * @static + * @param {tendermint.abci.IResponseException=} [properties] Properties to set + * @returns {tendermint.abci.ResponseException} ResponseException instance + */ + ResponseException.create = function create(properties) { + return new ResponseException(properties); + }; + + /** + * Encodes the specified ResponseException message. Does not implicitly {@link tendermint.abci.ResponseException.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.ResponseException + * @static + * @param {tendermint.abci.IResponseException} message ResponseException message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseException.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.error != null && Object.hasOwnProperty.call(message, "error")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.error); + return writer; + }; + + /** + * Encodes the specified ResponseException message, length delimited. Does not implicitly {@link tendermint.abci.ResponseException.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.ResponseException + * @static + * @param {tendermint.abci.IResponseException} message ResponseException message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseException.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResponseException message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.ResponseException + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.ResponseException} ResponseException + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseException.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.ResponseException(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.error = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResponseException message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.ResponseException + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.ResponseException} ResponseException + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseException.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResponseException message. + * @function verify + * @memberof tendermint.abci.ResponseException + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResponseException.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.error != null && message.hasOwnProperty("error")) + if (!$util.isString(message.error)) + return "error: string expected"; + return null; + }; + + /** + * Creates a ResponseException message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.ResponseException + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.ResponseException} ResponseException + */ + ResponseException.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.ResponseException) + return object; + let message = new $root.tendermint.abci.ResponseException(); + if (object.error != null) + message.error = String(object.error); + return message; + }; + + /** + * Creates a plain object from a ResponseException message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.ResponseException + * @static + * @param {tendermint.abci.ResponseException} message ResponseException + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResponseException.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.error = ""; + if (message.error != null && message.hasOwnProperty("error")) + object.error = message.error; + return object; + }; + + /** + * Converts this ResponseException to JSON. + * @function toJSON + * @memberof tendermint.abci.ResponseException + * @instance + * @returns {Object.} JSON object + */ + ResponseException.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ResponseException; + })(abci.ResponseException || {}); + + abci.ResponseEcho = (function(ResponseEcho) { + + /** + * Properties of a ResponseEcho. + * @memberof tendermint.abci + * @interface IResponseEcho + * @property {string|null} [message] ResponseEcho message + */ + + /** + * Constructs a new ResponseEcho. + * @memberof tendermint.abci + * @classdesc Represents a ResponseEcho. + * @implements IResponseEcho + * @constructor + * @param {tendermint.abci.IResponseEcho=} [properties] Properties to set + */ + function ResponseEcho(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResponseEcho message. + * @member {string} message + * @memberof tendermint.abci.ResponseEcho + * @instance + */ + ResponseEcho.prototype.message = ""; + + /** + * Creates a new ResponseEcho instance using the specified properties. + * @function create + * @memberof tendermint.abci.ResponseEcho + * @static + * @param {tendermint.abci.IResponseEcho=} [properties] Properties to set + * @returns {tendermint.abci.ResponseEcho} ResponseEcho instance + */ + ResponseEcho.create = function create(properties) { + return new ResponseEcho(properties); + }; + + /** + * Encodes the specified ResponseEcho message. Does not implicitly {@link tendermint.abci.ResponseEcho.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.ResponseEcho + * @static + * @param {tendermint.abci.IResponseEcho} message ResponseEcho message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseEcho.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.message); + return writer; + }; + + /** + * Encodes the specified ResponseEcho message, length delimited. Does not implicitly {@link tendermint.abci.ResponseEcho.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.ResponseEcho + * @static + * @param {tendermint.abci.IResponseEcho} message ResponseEcho message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseEcho.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResponseEcho message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.ResponseEcho + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.ResponseEcho} ResponseEcho + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseEcho.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.ResponseEcho(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.message = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResponseEcho message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.ResponseEcho + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.ResponseEcho} ResponseEcho + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseEcho.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResponseEcho message. + * @function verify + * @memberof tendermint.abci.ResponseEcho + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResponseEcho.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + return null; + }; + + /** + * Creates a ResponseEcho message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.ResponseEcho + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.ResponseEcho} ResponseEcho + */ + ResponseEcho.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.ResponseEcho) + return object; + let message = new $root.tendermint.abci.ResponseEcho(); + if (object.message != null) + message.message = String(object.message); + return message; + }; + + /** + * Creates a plain object from a ResponseEcho message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.ResponseEcho + * @static + * @param {tendermint.abci.ResponseEcho} message ResponseEcho + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResponseEcho.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.message = ""; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + return object; + }; + + /** + * Converts this ResponseEcho to JSON. + * @function toJSON + * @memberof tendermint.abci.ResponseEcho + * @instance + * @returns {Object.} JSON object + */ + ResponseEcho.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ResponseEcho; + })(abci.ResponseEcho || {}); + + abci.ResponseFlush = (function(ResponseFlush) { + + /** + * Properties of a ResponseFlush. + * @memberof tendermint.abci + * @interface IResponseFlush + */ + + /** + * Constructs a new ResponseFlush. + * @memberof tendermint.abci + * @classdesc Represents a ResponseFlush. + * @implements IResponseFlush + * @constructor + * @param {tendermint.abci.IResponseFlush=} [properties] Properties to set + */ + function ResponseFlush(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new ResponseFlush instance using the specified properties. + * @function create + * @memberof tendermint.abci.ResponseFlush + * @static + * @param {tendermint.abci.IResponseFlush=} [properties] Properties to set + * @returns {tendermint.abci.ResponseFlush} ResponseFlush instance + */ + ResponseFlush.create = function create(properties) { + return new ResponseFlush(properties); + }; + + /** + * Encodes the specified ResponseFlush message. Does not implicitly {@link tendermint.abci.ResponseFlush.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.ResponseFlush + * @static + * @param {tendermint.abci.IResponseFlush} message ResponseFlush message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseFlush.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified ResponseFlush message, length delimited. Does not implicitly {@link tendermint.abci.ResponseFlush.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.ResponseFlush + * @static + * @param {tendermint.abci.IResponseFlush} message ResponseFlush message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseFlush.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResponseFlush message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.ResponseFlush + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.ResponseFlush} ResponseFlush + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseFlush.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.ResponseFlush(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResponseFlush message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.ResponseFlush + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.ResponseFlush} ResponseFlush + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseFlush.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResponseFlush message. + * @function verify + * @memberof tendermint.abci.ResponseFlush + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResponseFlush.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a ResponseFlush message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.ResponseFlush + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.ResponseFlush} ResponseFlush + */ + ResponseFlush.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.ResponseFlush) + return object; + return new $root.tendermint.abci.ResponseFlush(); + }; + + /** + * Creates a plain object from a ResponseFlush message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.ResponseFlush + * @static + * @param {tendermint.abci.ResponseFlush} message ResponseFlush + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResponseFlush.toObject = function toObject() { + return {}; + }; + + /** + * Converts this ResponseFlush to JSON. + * @function toJSON + * @memberof tendermint.abci.ResponseFlush + * @instance + * @returns {Object.} JSON object + */ + ResponseFlush.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ResponseFlush; + })(abci.ResponseFlush || {}); + + abci.ResponseInfo = (function(ResponseInfo) { + + /** + * Properties of a ResponseInfo. + * @memberof tendermint.abci + * @interface IResponseInfo + * @property {string|null} [data] ResponseInfo data + * @property {string|null} [version] ResponseInfo version + * @property {number|Long|null} [appVersion] ResponseInfo appVersion + * @property {number|Long|null} [lastBlockHeight] ResponseInfo lastBlockHeight + * @property {Uint8Array|null} [lastBlockAppHash] ResponseInfo lastBlockAppHash + */ + + /** + * Constructs a new ResponseInfo. + * @memberof tendermint.abci + * @classdesc Represents a ResponseInfo. + * @implements IResponseInfo + * @constructor + * @param {tendermint.abci.IResponseInfo=} [properties] Properties to set + */ + function ResponseInfo(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResponseInfo data. + * @member {string} data + * @memberof tendermint.abci.ResponseInfo + * @instance + */ + ResponseInfo.prototype.data = ""; + + /** + * ResponseInfo version. + * @member {string} version + * @memberof tendermint.abci.ResponseInfo + * @instance + */ + ResponseInfo.prototype.version = ""; + + /** + * ResponseInfo appVersion. + * @member {number|Long} appVersion + * @memberof tendermint.abci.ResponseInfo + * @instance + */ + ResponseInfo.prototype.appVersion = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * ResponseInfo lastBlockHeight. + * @member {number|Long} lastBlockHeight + * @memberof tendermint.abci.ResponseInfo + * @instance + */ + ResponseInfo.prototype.lastBlockHeight = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ResponseInfo lastBlockAppHash. + * @member {Uint8Array} lastBlockAppHash + * @memberof tendermint.abci.ResponseInfo + * @instance + */ + ResponseInfo.prototype.lastBlockAppHash = $util.newBuffer([]); + + /** + * Creates a new ResponseInfo instance using the specified properties. + * @function create + * @memberof tendermint.abci.ResponseInfo + * @static + * @param {tendermint.abci.IResponseInfo=} [properties] Properties to set + * @returns {tendermint.abci.ResponseInfo} ResponseInfo instance + */ + ResponseInfo.create = function create(properties) { + return new ResponseInfo(properties); + }; + + /** + * Encodes the specified ResponseInfo message. Does not implicitly {@link tendermint.abci.ResponseInfo.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.ResponseInfo + * @static + * @param {tendermint.abci.IResponseInfo} message ResponseInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.data != null && Object.hasOwnProperty.call(message, "data")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.data); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.version); + if (message.appVersion != null && Object.hasOwnProperty.call(message, "appVersion")) + writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.appVersion); + if (message.lastBlockHeight != null && Object.hasOwnProperty.call(message, "lastBlockHeight")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.lastBlockHeight); + if (message.lastBlockAppHash != null && Object.hasOwnProperty.call(message, "lastBlockAppHash")) + writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.lastBlockAppHash); + return writer; + }; + + /** + * Encodes the specified ResponseInfo message, length delimited. Does not implicitly {@link tendermint.abci.ResponseInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.ResponseInfo + * @static + * @param {tendermint.abci.IResponseInfo} message ResponseInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResponseInfo message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.ResponseInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.ResponseInfo} ResponseInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.ResponseInfo(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.data = reader.string(); + break; + case 2: + message.version = reader.string(); + break; + case 3: + message.appVersion = reader.uint64(); + break; + case 4: + message.lastBlockHeight = reader.int64(); + break; + case 5: + message.lastBlockAppHash = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResponseInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.ResponseInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.ResponseInfo} ResponseInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResponseInfo message. + * @function verify + * @memberof tendermint.abci.ResponseInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResponseInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.data != null && message.hasOwnProperty("data")) + if (!$util.isString(message.data)) + return "data: string expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.appVersion != null && message.hasOwnProperty("appVersion")) + if (!$util.isInteger(message.appVersion) && !(message.appVersion && $util.isInteger(message.appVersion.low) && $util.isInteger(message.appVersion.high))) + return "appVersion: integer|Long expected"; + if (message.lastBlockHeight != null && message.hasOwnProperty("lastBlockHeight")) + if (!$util.isInteger(message.lastBlockHeight) && !(message.lastBlockHeight && $util.isInteger(message.lastBlockHeight.low) && $util.isInteger(message.lastBlockHeight.high))) + return "lastBlockHeight: integer|Long expected"; + if (message.lastBlockAppHash != null && message.hasOwnProperty("lastBlockAppHash")) + if (!(message.lastBlockAppHash && typeof message.lastBlockAppHash.length === "number" || $util.isString(message.lastBlockAppHash))) + return "lastBlockAppHash: buffer expected"; + return null; + }; + + /** + * Creates a ResponseInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.ResponseInfo + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.ResponseInfo} ResponseInfo + */ + ResponseInfo.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.ResponseInfo) + return object; + let message = new $root.tendermint.abci.ResponseInfo(); + if (object.data != null) + message.data = String(object.data); + if (object.version != null) + message.version = String(object.version); + if (object.appVersion != null) + if ($util.Long) + (message.appVersion = $util.Long.fromValue(object.appVersion)).unsigned = true; + else if (typeof object.appVersion === "string") + message.appVersion = parseInt(object.appVersion, 10); + else if (typeof object.appVersion === "number") + message.appVersion = object.appVersion; + else if (typeof object.appVersion === "object") + message.appVersion = new $util.LongBits(object.appVersion.low >>> 0, object.appVersion.high >>> 0).toNumber(true); + if (object.lastBlockHeight != null) + if ($util.Long) + (message.lastBlockHeight = $util.Long.fromValue(object.lastBlockHeight)).unsigned = false; + else if (typeof object.lastBlockHeight === "string") + message.lastBlockHeight = parseInt(object.lastBlockHeight, 10); + else if (typeof object.lastBlockHeight === "number") + message.lastBlockHeight = object.lastBlockHeight; + else if (typeof object.lastBlockHeight === "object") + message.lastBlockHeight = new $util.LongBits(object.lastBlockHeight.low >>> 0, object.lastBlockHeight.high >>> 0).toNumber(); + if (object.lastBlockAppHash != null) + if (typeof object.lastBlockAppHash === "string") + $util.base64.decode(object.lastBlockAppHash, message.lastBlockAppHash = $util.newBuffer($util.base64.length(object.lastBlockAppHash)), 0); + else if (object.lastBlockAppHash.length) + message.lastBlockAppHash = object.lastBlockAppHash; + return message; + }; + + /** + * Creates a plain object from a ResponseInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.ResponseInfo + * @static + * @param {tendermint.abci.ResponseInfo} message ResponseInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResponseInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.data = ""; + object.version = ""; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.appVersion = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.appVersion = options.longs === String ? "0" : 0; + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.lastBlockHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.lastBlockHeight = options.longs === String ? "0" : 0; + if (options.bytes === String) + object.lastBlockAppHash = ""; + else { + object.lastBlockAppHash = []; + if (options.bytes !== Array) + object.lastBlockAppHash = $util.newBuffer(object.lastBlockAppHash); + } + } + if (message.data != null && message.hasOwnProperty("data")) + object.data = message.data; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.appVersion != null && message.hasOwnProperty("appVersion")) + if (typeof message.appVersion === "number") + object.appVersion = options.longs === String ? String(message.appVersion) : message.appVersion; + else + object.appVersion = options.longs === String ? $util.Long.prototype.toString.call(message.appVersion) : options.longs === Number ? new $util.LongBits(message.appVersion.low >>> 0, message.appVersion.high >>> 0).toNumber(true) : message.appVersion; + if (message.lastBlockHeight != null && message.hasOwnProperty("lastBlockHeight")) + if (typeof message.lastBlockHeight === "number") + object.lastBlockHeight = options.longs === String ? String(message.lastBlockHeight) : message.lastBlockHeight; + else + object.lastBlockHeight = options.longs === String ? $util.Long.prototype.toString.call(message.lastBlockHeight) : options.longs === Number ? new $util.LongBits(message.lastBlockHeight.low >>> 0, message.lastBlockHeight.high >>> 0).toNumber() : message.lastBlockHeight; + if (message.lastBlockAppHash != null && message.hasOwnProperty("lastBlockAppHash")) + object.lastBlockAppHash = options.bytes === String ? $util.base64.encode(message.lastBlockAppHash, 0, message.lastBlockAppHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.lastBlockAppHash) : message.lastBlockAppHash; + return object; + }; + + /** + * Converts this ResponseInfo to JSON. + * @function toJSON + * @memberof tendermint.abci.ResponseInfo + * @instance + * @returns {Object.} JSON object + */ + ResponseInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ResponseInfo; + })(abci.ResponseInfo || {}); + + abci.ResponseSetOption = (function(ResponseSetOption) { + + /** + * Properties of a ResponseSetOption. + * @memberof tendermint.abci + * @interface IResponseSetOption + * @property {number|null} [code] ResponseSetOption code + * @property {string|null} [log] ResponseSetOption log + * @property {string|null} [info] ResponseSetOption info + */ + + /** + * Constructs a new ResponseSetOption. + * @memberof tendermint.abci + * @classdesc Represents a ResponseSetOption. + * @implements IResponseSetOption + * @constructor + * @param {tendermint.abci.IResponseSetOption=} [properties] Properties to set + */ + function ResponseSetOption(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResponseSetOption code. + * @member {number} code + * @memberof tendermint.abci.ResponseSetOption + * @instance + */ + ResponseSetOption.prototype.code = 0; + + /** + * ResponseSetOption log. + * @member {string} log + * @memberof tendermint.abci.ResponseSetOption + * @instance + */ + ResponseSetOption.prototype.log = ""; + + /** + * ResponseSetOption info. + * @member {string} info + * @memberof tendermint.abci.ResponseSetOption + * @instance + */ + ResponseSetOption.prototype.info = ""; + + /** + * Creates a new ResponseSetOption instance using the specified properties. + * @function create + * @memberof tendermint.abci.ResponseSetOption + * @static + * @param {tendermint.abci.IResponseSetOption=} [properties] Properties to set + * @returns {tendermint.abci.ResponseSetOption} ResponseSetOption instance + */ + ResponseSetOption.create = function create(properties) { + return new ResponseSetOption(properties); + }; + + /** + * Encodes the specified ResponseSetOption message. Does not implicitly {@link tendermint.abci.ResponseSetOption.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.ResponseSetOption + * @static + * @param {tendermint.abci.IResponseSetOption} message ResponseSetOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseSetOption.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.code != null && Object.hasOwnProperty.call(message, "code")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.code); + if (message.log != null && Object.hasOwnProperty.call(message, "log")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.log); + if (message.info != null && Object.hasOwnProperty.call(message, "info")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.info); + return writer; + }; + + /** + * Encodes the specified ResponseSetOption message, length delimited. Does not implicitly {@link tendermint.abci.ResponseSetOption.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.ResponseSetOption + * @static + * @param {tendermint.abci.IResponseSetOption} message ResponseSetOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseSetOption.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResponseSetOption message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.ResponseSetOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.ResponseSetOption} ResponseSetOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseSetOption.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.ResponseSetOption(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.code = reader.uint32(); + break; + case 3: + message.log = reader.string(); + break; + case 4: + message.info = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResponseSetOption message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.ResponseSetOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.ResponseSetOption} ResponseSetOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseSetOption.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResponseSetOption message. + * @function verify + * @memberof tendermint.abci.ResponseSetOption + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResponseSetOption.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.code != null && message.hasOwnProperty("code")) + if (!$util.isInteger(message.code)) + return "code: integer expected"; + if (message.log != null && message.hasOwnProperty("log")) + if (!$util.isString(message.log)) + return "log: string expected"; + if (message.info != null && message.hasOwnProperty("info")) + if (!$util.isString(message.info)) + return "info: string expected"; + return null; + }; + + /** + * Creates a ResponseSetOption message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.ResponseSetOption + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.ResponseSetOption} ResponseSetOption + */ + ResponseSetOption.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.ResponseSetOption) + return object; + let message = new $root.tendermint.abci.ResponseSetOption(); + if (object.code != null) + message.code = object.code >>> 0; + if (object.log != null) + message.log = String(object.log); + if (object.info != null) + message.info = String(object.info); + return message; + }; + + /** + * Creates a plain object from a ResponseSetOption message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.ResponseSetOption + * @static + * @param {tendermint.abci.ResponseSetOption} message ResponseSetOption + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResponseSetOption.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.code = 0; + object.log = ""; + object.info = ""; + } + if (message.code != null && message.hasOwnProperty("code")) + object.code = message.code; + if (message.log != null && message.hasOwnProperty("log")) + object.log = message.log; + if (message.info != null && message.hasOwnProperty("info")) + object.info = message.info; + return object; + }; + + /** + * Converts this ResponseSetOption to JSON. + * @function toJSON + * @memberof tendermint.abci.ResponseSetOption + * @instance + * @returns {Object.} JSON object + */ + ResponseSetOption.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ResponseSetOption; + })(abci.ResponseSetOption || {}); + + abci.ResponseInitChain = (function(ResponseInitChain) { + + /** + * Properties of a ResponseInitChain. + * @memberof tendermint.abci + * @interface IResponseInitChain + * @property {tendermint.abci.IConsensusParams|null} [consensusParams] ResponseInitChain consensusParams + * @property {Array.|null} [validators] ResponseInitChain validators + * @property {Uint8Array|null} [appHash] ResponseInitChain appHash + */ + + /** + * Constructs a new ResponseInitChain. + * @memberof tendermint.abci + * @classdesc Represents a ResponseInitChain. + * @implements IResponseInitChain + * @constructor + * @param {tendermint.abci.IResponseInitChain=} [properties] Properties to set + */ + function ResponseInitChain(properties) { + this.validators = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResponseInitChain consensusParams. + * @member {tendermint.abci.IConsensusParams|null|undefined} consensusParams + * @memberof tendermint.abci.ResponseInitChain + * @instance + */ + ResponseInitChain.prototype.consensusParams = null; + + /** + * ResponseInitChain validators. + * @member {Array.} validators + * @memberof tendermint.abci.ResponseInitChain + * @instance + */ + ResponseInitChain.prototype.validators = $util.emptyArray; + + /** + * ResponseInitChain appHash. + * @member {Uint8Array} appHash + * @memberof tendermint.abci.ResponseInitChain + * @instance + */ + ResponseInitChain.prototype.appHash = $util.newBuffer([]); + + /** + * Creates a new ResponseInitChain instance using the specified properties. + * @function create + * @memberof tendermint.abci.ResponseInitChain + * @static + * @param {tendermint.abci.IResponseInitChain=} [properties] Properties to set + * @returns {tendermint.abci.ResponseInitChain} ResponseInitChain instance + */ + ResponseInitChain.create = function create(properties) { + return new ResponseInitChain(properties); + }; + + /** + * Encodes the specified ResponseInitChain message. Does not implicitly {@link tendermint.abci.ResponseInitChain.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.ResponseInitChain + * @static + * @param {tendermint.abci.IResponseInitChain} message ResponseInitChain message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseInitChain.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.consensusParams != null && Object.hasOwnProperty.call(message, "consensusParams")) + $root.tendermint.abci.ConsensusParams.encode(message.consensusParams, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.validators != null && message.validators.length) + for (let i = 0; i < message.validators.length; ++i) + $root.tendermint.abci.ValidatorUpdate.encode(message.validators[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.appHash != null && Object.hasOwnProperty.call(message, "appHash")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.appHash); + return writer; + }; + + /** + * Encodes the specified ResponseInitChain message, length delimited. Does not implicitly {@link tendermint.abci.ResponseInitChain.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.ResponseInitChain + * @static + * @param {tendermint.abci.IResponseInitChain} message ResponseInitChain message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseInitChain.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResponseInitChain message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.ResponseInitChain + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.ResponseInitChain} ResponseInitChain + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseInitChain.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.ResponseInitChain(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.consensusParams = $root.tendermint.abci.ConsensusParams.decode(reader, reader.uint32()); + break; + case 2: + if (!(message.validators && message.validators.length)) + message.validators = []; + message.validators.push($root.tendermint.abci.ValidatorUpdate.decode(reader, reader.uint32())); + break; + case 3: + message.appHash = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResponseInitChain message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.ResponseInitChain + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.ResponseInitChain} ResponseInitChain + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseInitChain.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResponseInitChain message. + * @function verify + * @memberof tendermint.abci.ResponseInitChain + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResponseInitChain.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.consensusParams != null && message.hasOwnProperty("consensusParams")) { + let error = $root.tendermint.abci.ConsensusParams.verify(message.consensusParams); + if (error) + return "consensusParams." + error; + } + if (message.validators != null && message.hasOwnProperty("validators")) { + if (!Array.isArray(message.validators)) + return "validators: array expected"; + for (let i = 0; i < message.validators.length; ++i) { + let error = $root.tendermint.abci.ValidatorUpdate.verify(message.validators[i]); + if (error) + return "validators." + error; + } + } + if (message.appHash != null && message.hasOwnProperty("appHash")) + if (!(message.appHash && typeof message.appHash.length === "number" || $util.isString(message.appHash))) + return "appHash: buffer expected"; + return null; + }; + + /** + * Creates a ResponseInitChain message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.ResponseInitChain + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.ResponseInitChain} ResponseInitChain + */ + ResponseInitChain.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.ResponseInitChain) + return object; + let message = new $root.tendermint.abci.ResponseInitChain(); + if (object.consensusParams != null) { + if (typeof object.consensusParams !== "object") + throw TypeError(".tendermint.abci.ResponseInitChain.consensusParams: object expected"); + message.consensusParams = $root.tendermint.abci.ConsensusParams.fromObject(object.consensusParams); + } + if (object.validators) { + if (!Array.isArray(object.validators)) + throw TypeError(".tendermint.abci.ResponseInitChain.validators: array expected"); + message.validators = []; + for (let i = 0; i < object.validators.length; ++i) { + if (typeof object.validators[i] !== "object") + throw TypeError(".tendermint.abci.ResponseInitChain.validators: object expected"); + message.validators[i] = $root.tendermint.abci.ValidatorUpdate.fromObject(object.validators[i]); + } + } + if (object.appHash != null) + if (typeof object.appHash === "string") + $util.base64.decode(object.appHash, message.appHash = $util.newBuffer($util.base64.length(object.appHash)), 0); + else if (object.appHash.length) + message.appHash = object.appHash; + return message; + }; + + /** + * Creates a plain object from a ResponseInitChain message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.ResponseInitChain + * @static + * @param {tendermint.abci.ResponseInitChain} message ResponseInitChain + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResponseInitChain.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.validators = []; + if (options.defaults) { + object.consensusParams = null; + if (options.bytes === String) + object.appHash = ""; + else { + object.appHash = []; + if (options.bytes !== Array) + object.appHash = $util.newBuffer(object.appHash); + } + } + if (message.consensusParams != null && message.hasOwnProperty("consensusParams")) + object.consensusParams = $root.tendermint.abci.ConsensusParams.toObject(message.consensusParams, options); + if (message.validators && message.validators.length) { + object.validators = []; + for (let j = 0; j < message.validators.length; ++j) + object.validators[j] = $root.tendermint.abci.ValidatorUpdate.toObject(message.validators[j], options); + } + if (message.appHash != null && message.hasOwnProperty("appHash")) + object.appHash = options.bytes === String ? $util.base64.encode(message.appHash, 0, message.appHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.appHash) : message.appHash; + return object; + }; + + /** + * Converts this ResponseInitChain to JSON. + * @function toJSON + * @memberof tendermint.abci.ResponseInitChain + * @instance + * @returns {Object.} JSON object + */ + ResponseInitChain.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ResponseInitChain; + })(abci.ResponseInitChain || {}); + + abci.ResponseQuery = (function(ResponseQuery) { + + /** + * Properties of a ResponseQuery. + * @memberof tendermint.abci + * @interface IResponseQuery + * @property {number|null} [code] ResponseQuery code + * @property {string|null} [log] ResponseQuery log + * @property {string|null} [info] ResponseQuery info + * @property {number|Long|null} [index] ResponseQuery index + * @property {Uint8Array|null} [key] ResponseQuery key + * @property {Uint8Array|null} [value] ResponseQuery value + * @property {tendermint.crypto.IProofOps|null} [proofOps] ResponseQuery proofOps + * @property {number|Long|null} [height] ResponseQuery height + * @property {string|null} [codespace] ResponseQuery codespace + */ + + /** + * Constructs a new ResponseQuery. + * @memberof tendermint.abci + * @classdesc Represents a ResponseQuery. + * @implements IResponseQuery + * @constructor + * @param {tendermint.abci.IResponseQuery=} [properties] Properties to set + */ + function ResponseQuery(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResponseQuery code. + * @member {number} code + * @memberof tendermint.abci.ResponseQuery + * @instance + */ + ResponseQuery.prototype.code = 0; + + /** + * ResponseQuery log. + * @member {string} log + * @memberof tendermint.abci.ResponseQuery + * @instance + */ + ResponseQuery.prototype.log = ""; + + /** + * ResponseQuery info. + * @member {string} info + * @memberof tendermint.abci.ResponseQuery + * @instance + */ + ResponseQuery.prototype.info = ""; + + /** + * ResponseQuery index. + * @member {number|Long} index + * @memberof tendermint.abci.ResponseQuery + * @instance + */ + ResponseQuery.prototype.index = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ResponseQuery key. + * @member {Uint8Array} key + * @memberof tendermint.abci.ResponseQuery + * @instance + */ + ResponseQuery.prototype.key = $util.newBuffer([]); + + /** + * ResponseQuery value. + * @member {Uint8Array} value + * @memberof tendermint.abci.ResponseQuery + * @instance + */ + ResponseQuery.prototype.value = $util.newBuffer([]); + + /** + * ResponseQuery proofOps. + * @member {tendermint.crypto.IProofOps|null|undefined} proofOps + * @memberof tendermint.abci.ResponseQuery + * @instance + */ + ResponseQuery.prototype.proofOps = null; + + /** + * ResponseQuery height. + * @member {number|Long} height + * @memberof tendermint.abci.ResponseQuery + * @instance + */ + ResponseQuery.prototype.height = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ResponseQuery codespace. + * @member {string} codespace + * @memberof tendermint.abci.ResponseQuery + * @instance + */ + ResponseQuery.prototype.codespace = ""; + + /** + * Creates a new ResponseQuery instance using the specified properties. + * @function create + * @memberof tendermint.abci.ResponseQuery + * @static + * @param {tendermint.abci.IResponseQuery=} [properties] Properties to set + * @returns {tendermint.abci.ResponseQuery} ResponseQuery instance + */ + ResponseQuery.create = function create(properties) { + return new ResponseQuery(properties); + }; + + /** + * Encodes the specified ResponseQuery message. Does not implicitly {@link tendermint.abci.ResponseQuery.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.ResponseQuery + * @static + * @param {tendermint.abci.IResponseQuery} message ResponseQuery message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseQuery.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.code != null && Object.hasOwnProperty.call(message, "code")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.code); + if (message.log != null && Object.hasOwnProperty.call(message, "log")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.log); + if (message.info != null && Object.hasOwnProperty.call(message, "info")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.info); + if (message.index != null && Object.hasOwnProperty.call(message, "index")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.index); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.key); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.value); + if (message.proofOps != null && Object.hasOwnProperty.call(message, "proofOps")) + $root.tendermint.crypto.ProofOps.encode(message.proofOps, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.height != null && Object.hasOwnProperty.call(message, "height")) + writer.uint32(/* id 9, wireType 0 =*/72).int64(message.height); + if (message.codespace != null && Object.hasOwnProperty.call(message, "codespace")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.codespace); + return writer; + }; + + /** + * Encodes the specified ResponseQuery message, length delimited. Does not implicitly {@link tendermint.abci.ResponseQuery.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.ResponseQuery + * @static + * @param {tendermint.abci.IResponseQuery} message ResponseQuery message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseQuery.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResponseQuery message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.ResponseQuery + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.ResponseQuery} ResponseQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseQuery.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.ResponseQuery(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.code = reader.uint32(); + break; + case 3: + message.log = reader.string(); + break; + case 4: + message.info = reader.string(); + break; + case 5: + message.index = reader.int64(); + break; + case 6: + message.key = reader.bytes(); + break; + case 7: + message.value = reader.bytes(); + break; + case 8: + message.proofOps = $root.tendermint.crypto.ProofOps.decode(reader, reader.uint32()); + break; + case 9: + message.height = reader.int64(); + break; + case 10: + message.codespace = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResponseQuery message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.ResponseQuery + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.ResponseQuery} ResponseQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseQuery.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResponseQuery message. + * @function verify + * @memberof tendermint.abci.ResponseQuery + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResponseQuery.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.code != null && message.hasOwnProperty("code")) + if (!$util.isInteger(message.code)) + return "code: integer expected"; + if (message.log != null && message.hasOwnProperty("log")) + if (!$util.isString(message.log)) + return "log: string expected"; + if (message.info != null && message.hasOwnProperty("info")) + if (!$util.isString(message.info)) + return "info: string expected"; + if (message.index != null && message.hasOwnProperty("index")) + if (!$util.isInteger(message.index) && !(message.index && $util.isInteger(message.index.low) && $util.isInteger(message.index.high))) + return "index: integer|Long expected"; + if (message.key != null && message.hasOwnProperty("key")) + if (!(message.key && typeof message.key.length === "number" || $util.isString(message.key))) + return "key: buffer expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; + if (message.proofOps != null && message.hasOwnProperty("proofOps")) { + let error = $root.tendermint.crypto.ProofOps.verify(message.proofOps); + if (error) + return "proofOps." + error; + } + if (message.height != null && message.hasOwnProperty("height")) + if (!$util.isInteger(message.height) && !(message.height && $util.isInteger(message.height.low) && $util.isInteger(message.height.high))) + return "height: integer|Long expected"; + if (message.codespace != null && message.hasOwnProperty("codespace")) + if (!$util.isString(message.codespace)) + return "codespace: string expected"; + return null; + }; + + /** + * Creates a ResponseQuery message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.ResponseQuery + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.ResponseQuery} ResponseQuery + */ + ResponseQuery.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.ResponseQuery) + return object; + let message = new $root.tendermint.abci.ResponseQuery(); + if (object.code != null) + message.code = object.code >>> 0; + if (object.log != null) + message.log = String(object.log); + if (object.info != null) + message.info = String(object.info); + if (object.index != null) + if ($util.Long) + (message.index = $util.Long.fromValue(object.index)).unsigned = false; + else if (typeof object.index === "string") + message.index = parseInt(object.index, 10); + else if (typeof object.index === "number") + message.index = object.index; + else if (typeof object.index === "object") + message.index = new $util.LongBits(object.index.low >>> 0, object.index.high >>> 0).toNumber(); + if (object.key != null) + if (typeof object.key === "string") + $util.base64.decode(object.key, message.key = $util.newBuffer($util.base64.length(object.key)), 0); + else if (object.key.length) + message.key = object.key; + if (object.value != null) + if (typeof object.value === "string") + $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); + else if (object.value.length) + message.value = object.value; + if (object.proofOps != null) { + if (typeof object.proofOps !== "object") + throw TypeError(".tendermint.abci.ResponseQuery.proofOps: object expected"); + message.proofOps = $root.tendermint.crypto.ProofOps.fromObject(object.proofOps); + } + if (object.height != null) + if ($util.Long) + (message.height = $util.Long.fromValue(object.height)).unsigned = false; + else if (typeof object.height === "string") + message.height = parseInt(object.height, 10); + else if (typeof object.height === "number") + message.height = object.height; + else if (typeof object.height === "object") + message.height = new $util.LongBits(object.height.low >>> 0, object.height.high >>> 0).toNumber(); + if (object.codespace != null) + message.codespace = String(object.codespace); + return message; + }; + + /** + * Creates a plain object from a ResponseQuery message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.ResponseQuery + * @static + * @param {tendermint.abci.ResponseQuery} message ResponseQuery + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResponseQuery.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.code = 0; + object.log = ""; + object.info = ""; + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.index = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.index = options.longs === String ? "0" : 0; + if (options.bytes === String) + object.key = ""; + else { + object.key = []; + if (options.bytes !== Array) + object.key = $util.newBuffer(object.key); + } + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + object.proofOps = null; + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.height = options.longs === String ? "0" : 0; + object.codespace = ""; + } + if (message.code != null && message.hasOwnProperty("code")) + object.code = message.code; + if (message.log != null && message.hasOwnProperty("log")) + object.log = message.log; + if (message.info != null && message.hasOwnProperty("info")) + object.info = message.info; + if (message.index != null && message.hasOwnProperty("index")) + if (typeof message.index === "number") + object.index = options.longs === String ? String(message.index) : message.index; + else + object.index = options.longs === String ? $util.Long.prototype.toString.call(message.index) : options.longs === Number ? new $util.LongBits(message.index.low >>> 0, message.index.high >>> 0).toNumber() : message.index; + if (message.key != null && message.hasOwnProperty("key")) + object.key = options.bytes === String ? $util.base64.encode(message.key, 0, message.key.length) : options.bytes === Array ? Array.prototype.slice.call(message.key) : message.key; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + if (message.proofOps != null && message.hasOwnProperty("proofOps")) + object.proofOps = $root.tendermint.crypto.ProofOps.toObject(message.proofOps, options); + if (message.height != null && message.hasOwnProperty("height")) + if (typeof message.height === "number") + object.height = options.longs === String ? String(message.height) : message.height; + else + object.height = options.longs === String ? $util.Long.prototype.toString.call(message.height) : options.longs === Number ? new $util.LongBits(message.height.low >>> 0, message.height.high >>> 0).toNumber() : message.height; + if (message.codespace != null && message.hasOwnProperty("codespace")) + object.codespace = message.codespace; + return object; + }; + + /** + * Converts this ResponseQuery to JSON. + * @function toJSON + * @memberof tendermint.abci.ResponseQuery + * @instance + * @returns {Object.} JSON object + */ + ResponseQuery.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ResponseQuery; + })(abci.ResponseQuery || {}); + + abci.ResponseBeginBlock = (function(ResponseBeginBlock) { + + /** + * Properties of a ResponseBeginBlock. + * @memberof tendermint.abci + * @interface IResponseBeginBlock + * @property {Array.|null} [events] ResponseBeginBlock events + */ + + /** + * Constructs a new ResponseBeginBlock. + * @memberof tendermint.abci + * @classdesc Represents a ResponseBeginBlock. + * @implements IResponseBeginBlock + * @constructor + * @param {tendermint.abci.IResponseBeginBlock=} [properties] Properties to set + */ + function ResponseBeginBlock(properties) { + this.events = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResponseBeginBlock events. + * @member {Array.} events + * @memberof tendermint.abci.ResponseBeginBlock + * @instance + */ + ResponseBeginBlock.prototype.events = $util.emptyArray; + + /** + * Creates a new ResponseBeginBlock instance using the specified properties. + * @function create + * @memberof tendermint.abci.ResponseBeginBlock + * @static + * @param {tendermint.abci.IResponseBeginBlock=} [properties] Properties to set + * @returns {tendermint.abci.ResponseBeginBlock} ResponseBeginBlock instance + */ + ResponseBeginBlock.create = function create(properties) { + return new ResponseBeginBlock(properties); + }; + + /** + * Encodes the specified ResponseBeginBlock message. Does not implicitly {@link tendermint.abci.ResponseBeginBlock.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.ResponseBeginBlock + * @static + * @param {tendermint.abci.IResponseBeginBlock} message ResponseBeginBlock message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseBeginBlock.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.events != null && message.events.length) + for (let i = 0; i < message.events.length; ++i) + $root.tendermint.abci.Event.encode(message.events[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ResponseBeginBlock message, length delimited. Does not implicitly {@link tendermint.abci.ResponseBeginBlock.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.ResponseBeginBlock + * @static + * @param {tendermint.abci.IResponseBeginBlock} message ResponseBeginBlock message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseBeginBlock.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResponseBeginBlock message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.ResponseBeginBlock + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.ResponseBeginBlock} ResponseBeginBlock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseBeginBlock.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.ResponseBeginBlock(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.events && message.events.length)) + message.events = []; + message.events.push($root.tendermint.abci.Event.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResponseBeginBlock message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.ResponseBeginBlock + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.ResponseBeginBlock} ResponseBeginBlock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseBeginBlock.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResponseBeginBlock message. + * @function verify + * @memberof tendermint.abci.ResponseBeginBlock + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResponseBeginBlock.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.events != null && message.hasOwnProperty("events")) { + if (!Array.isArray(message.events)) + return "events: array expected"; + for (let i = 0; i < message.events.length; ++i) { + let error = $root.tendermint.abci.Event.verify(message.events[i]); + if (error) + return "events." + error; + } + } + return null; + }; + + /** + * Creates a ResponseBeginBlock message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.ResponseBeginBlock + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.ResponseBeginBlock} ResponseBeginBlock + */ + ResponseBeginBlock.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.ResponseBeginBlock) + return object; + let message = new $root.tendermint.abci.ResponseBeginBlock(); + if (object.events) { + if (!Array.isArray(object.events)) + throw TypeError(".tendermint.abci.ResponseBeginBlock.events: array expected"); + message.events = []; + for (let i = 0; i < object.events.length; ++i) { + if (typeof object.events[i] !== "object") + throw TypeError(".tendermint.abci.ResponseBeginBlock.events: object expected"); + message.events[i] = $root.tendermint.abci.Event.fromObject(object.events[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ResponseBeginBlock message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.ResponseBeginBlock + * @static + * @param {tendermint.abci.ResponseBeginBlock} message ResponseBeginBlock + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResponseBeginBlock.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.events = []; + if (message.events && message.events.length) { + object.events = []; + for (let j = 0; j < message.events.length; ++j) + object.events[j] = $root.tendermint.abci.Event.toObject(message.events[j], options); + } + return object; + }; + + /** + * Converts this ResponseBeginBlock to JSON. + * @function toJSON + * @memberof tendermint.abci.ResponseBeginBlock + * @instance + * @returns {Object.} JSON object + */ + ResponseBeginBlock.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ResponseBeginBlock; + })(abci.ResponseBeginBlock || {}); + + abci.ResponseCheckTx = (function(ResponseCheckTx) { + + /** + * Properties of a ResponseCheckTx. + * @memberof tendermint.abci + * @interface IResponseCheckTx + * @property {number|null} [code] ResponseCheckTx code + * @property {Uint8Array|null} [data] ResponseCheckTx data + * @property {string|null} [log] ResponseCheckTx log + * @property {string|null} [info] ResponseCheckTx info + * @property {number|Long|null} [gasWanted] ResponseCheckTx gasWanted + * @property {number|Long|null} [gasUsed] ResponseCheckTx gasUsed + * @property {Array.|null} [events] ResponseCheckTx events + * @property {string|null} [codespace] ResponseCheckTx codespace + */ + + /** + * Constructs a new ResponseCheckTx. + * @memberof tendermint.abci + * @classdesc Represents a ResponseCheckTx. + * @implements IResponseCheckTx + * @constructor + * @param {tendermint.abci.IResponseCheckTx=} [properties] Properties to set + */ + function ResponseCheckTx(properties) { + this.events = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResponseCheckTx code. + * @member {number} code + * @memberof tendermint.abci.ResponseCheckTx + * @instance + */ + ResponseCheckTx.prototype.code = 0; + + /** + * ResponseCheckTx data. + * @member {Uint8Array} data + * @memberof tendermint.abci.ResponseCheckTx + * @instance + */ + ResponseCheckTx.prototype.data = $util.newBuffer([]); + + /** + * ResponseCheckTx log. + * @member {string} log + * @memberof tendermint.abci.ResponseCheckTx + * @instance + */ + ResponseCheckTx.prototype.log = ""; + + /** + * ResponseCheckTx info. + * @member {string} info + * @memberof tendermint.abci.ResponseCheckTx + * @instance + */ + ResponseCheckTx.prototype.info = ""; + + /** + * ResponseCheckTx gasWanted. + * @member {number|Long} gasWanted + * @memberof tendermint.abci.ResponseCheckTx + * @instance + */ + ResponseCheckTx.prototype.gasWanted = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ResponseCheckTx gasUsed. + * @member {number|Long} gasUsed + * @memberof tendermint.abci.ResponseCheckTx + * @instance + */ + ResponseCheckTx.prototype.gasUsed = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ResponseCheckTx events. + * @member {Array.} events + * @memberof tendermint.abci.ResponseCheckTx + * @instance + */ + ResponseCheckTx.prototype.events = $util.emptyArray; + + /** + * ResponseCheckTx codespace. + * @member {string} codespace + * @memberof tendermint.abci.ResponseCheckTx + * @instance + */ + ResponseCheckTx.prototype.codespace = ""; + + /** + * Creates a new ResponseCheckTx instance using the specified properties. + * @function create + * @memberof tendermint.abci.ResponseCheckTx + * @static + * @param {tendermint.abci.IResponseCheckTx=} [properties] Properties to set + * @returns {tendermint.abci.ResponseCheckTx} ResponseCheckTx instance + */ + ResponseCheckTx.create = function create(properties) { + return new ResponseCheckTx(properties); + }; + + /** + * Encodes the specified ResponseCheckTx message. Does not implicitly {@link tendermint.abci.ResponseCheckTx.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.ResponseCheckTx + * @static + * @param {tendermint.abci.IResponseCheckTx} message ResponseCheckTx message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseCheckTx.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.code != null && Object.hasOwnProperty.call(message, "code")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.code); + if (message.data != null && Object.hasOwnProperty.call(message, "data")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.data); + if (message.log != null && Object.hasOwnProperty.call(message, "log")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.log); + if (message.info != null && Object.hasOwnProperty.call(message, "info")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.info); + if (message.gasWanted != null && Object.hasOwnProperty.call(message, "gasWanted")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.gasWanted); + if (message.gasUsed != null && Object.hasOwnProperty.call(message, "gasUsed")) + writer.uint32(/* id 6, wireType 0 =*/48).int64(message.gasUsed); + if (message.events != null && message.events.length) + for (let i = 0; i < message.events.length; ++i) + $root.tendermint.abci.Event.encode(message.events[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.codespace != null && Object.hasOwnProperty.call(message, "codespace")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.codespace); + return writer; + }; + + /** + * Encodes the specified ResponseCheckTx message, length delimited. Does not implicitly {@link tendermint.abci.ResponseCheckTx.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.ResponseCheckTx + * @static + * @param {tendermint.abci.IResponseCheckTx} message ResponseCheckTx message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseCheckTx.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResponseCheckTx message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.ResponseCheckTx + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.ResponseCheckTx} ResponseCheckTx + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseCheckTx.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.ResponseCheckTx(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.code = reader.uint32(); + break; + case 2: + message.data = reader.bytes(); + break; + case 3: + message.log = reader.string(); + break; + case 4: + message.info = reader.string(); + break; + case 5: + message.gasWanted = reader.int64(); + break; + case 6: + message.gasUsed = reader.int64(); + break; + case 7: + if (!(message.events && message.events.length)) + message.events = []; + message.events.push($root.tendermint.abci.Event.decode(reader, reader.uint32())); + break; + case 8: + message.codespace = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResponseCheckTx message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.ResponseCheckTx + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.ResponseCheckTx} ResponseCheckTx + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseCheckTx.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResponseCheckTx message. + * @function verify + * @memberof tendermint.abci.ResponseCheckTx + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResponseCheckTx.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.code != null && message.hasOwnProperty("code")) + if (!$util.isInteger(message.code)) + return "code: integer expected"; + if (message.data != null && message.hasOwnProperty("data")) + if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) + return "data: buffer expected"; + if (message.log != null && message.hasOwnProperty("log")) + if (!$util.isString(message.log)) + return "log: string expected"; + if (message.info != null && message.hasOwnProperty("info")) + if (!$util.isString(message.info)) + return "info: string expected"; + if (message.gasWanted != null && message.hasOwnProperty("gasWanted")) + if (!$util.isInteger(message.gasWanted) && !(message.gasWanted && $util.isInteger(message.gasWanted.low) && $util.isInteger(message.gasWanted.high))) + return "gasWanted: integer|Long expected"; + if (message.gasUsed != null && message.hasOwnProperty("gasUsed")) + if (!$util.isInteger(message.gasUsed) && !(message.gasUsed && $util.isInteger(message.gasUsed.low) && $util.isInteger(message.gasUsed.high))) + return "gasUsed: integer|Long expected"; + if (message.events != null && message.hasOwnProperty("events")) { + if (!Array.isArray(message.events)) + return "events: array expected"; + for (let i = 0; i < message.events.length; ++i) { + let error = $root.tendermint.abci.Event.verify(message.events[i]); + if (error) + return "events." + error; + } + } + if (message.codespace != null && message.hasOwnProperty("codespace")) + if (!$util.isString(message.codespace)) + return "codespace: string expected"; + return null; + }; + + /** + * Creates a ResponseCheckTx message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.ResponseCheckTx + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.ResponseCheckTx} ResponseCheckTx + */ + ResponseCheckTx.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.ResponseCheckTx) + return object; + let message = new $root.tendermint.abci.ResponseCheckTx(); + if (object.code != null) + message.code = object.code >>> 0; + if (object.data != null) + if (typeof object.data === "string") + $util.base64.decode(object.data, message.data = $util.newBuffer($util.base64.length(object.data)), 0); + else if (object.data.length) + message.data = object.data; + if (object.log != null) + message.log = String(object.log); + if (object.info != null) + message.info = String(object.info); + if (object.gasWanted != null) + if ($util.Long) + (message.gasWanted = $util.Long.fromValue(object.gasWanted)).unsigned = false; + else if (typeof object.gasWanted === "string") + message.gasWanted = parseInt(object.gasWanted, 10); + else if (typeof object.gasWanted === "number") + message.gasWanted = object.gasWanted; + else if (typeof object.gasWanted === "object") + message.gasWanted = new $util.LongBits(object.gasWanted.low >>> 0, object.gasWanted.high >>> 0).toNumber(); + if (object.gasUsed != null) + if ($util.Long) + (message.gasUsed = $util.Long.fromValue(object.gasUsed)).unsigned = false; + else if (typeof object.gasUsed === "string") + message.gasUsed = parseInt(object.gasUsed, 10); + else if (typeof object.gasUsed === "number") + message.gasUsed = object.gasUsed; + else if (typeof object.gasUsed === "object") + message.gasUsed = new $util.LongBits(object.gasUsed.low >>> 0, object.gasUsed.high >>> 0).toNumber(); + if (object.events) { + if (!Array.isArray(object.events)) + throw TypeError(".tendermint.abci.ResponseCheckTx.events: array expected"); + message.events = []; + for (let i = 0; i < object.events.length; ++i) { + if (typeof object.events[i] !== "object") + throw TypeError(".tendermint.abci.ResponseCheckTx.events: object expected"); + message.events[i] = $root.tendermint.abci.Event.fromObject(object.events[i]); + } + } + if (object.codespace != null) + message.codespace = String(object.codespace); + return message; + }; + + /** + * Creates a plain object from a ResponseCheckTx message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.ResponseCheckTx + * @static + * @param {tendermint.abci.ResponseCheckTx} message ResponseCheckTx + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResponseCheckTx.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.events = []; + if (options.defaults) { + object.code = 0; + if (options.bytes === String) + object.data = ""; + else { + object.data = []; + if (options.bytes !== Array) + object.data = $util.newBuffer(object.data); + } + object.log = ""; + object.info = ""; + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.gasWanted = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.gasWanted = options.longs === String ? "0" : 0; + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.gasUsed = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.gasUsed = options.longs === String ? "0" : 0; + object.codespace = ""; + } + if (message.code != null && message.hasOwnProperty("code")) + object.code = message.code; + if (message.data != null && message.hasOwnProperty("data")) + object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; + if (message.log != null && message.hasOwnProperty("log")) + object.log = message.log; + if (message.info != null && message.hasOwnProperty("info")) + object.info = message.info; + if (message.gasWanted != null && message.hasOwnProperty("gasWanted")) + if (typeof message.gasWanted === "number") + object.gasWanted = options.longs === String ? String(message.gasWanted) : message.gasWanted; + else + object.gasWanted = options.longs === String ? $util.Long.prototype.toString.call(message.gasWanted) : options.longs === Number ? new $util.LongBits(message.gasWanted.low >>> 0, message.gasWanted.high >>> 0).toNumber() : message.gasWanted; + if (message.gasUsed != null && message.hasOwnProperty("gasUsed")) + if (typeof message.gasUsed === "number") + object.gasUsed = options.longs === String ? String(message.gasUsed) : message.gasUsed; + else + object.gasUsed = options.longs === String ? $util.Long.prototype.toString.call(message.gasUsed) : options.longs === Number ? new $util.LongBits(message.gasUsed.low >>> 0, message.gasUsed.high >>> 0).toNumber() : message.gasUsed; + if (message.events && message.events.length) { + object.events = []; + for (let j = 0; j < message.events.length; ++j) + object.events[j] = $root.tendermint.abci.Event.toObject(message.events[j], options); + } + if (message.codespace != null && message.hasOwnProperty("codespace")) + object.codespace = message.codespace; + return object; + }; + + /** + * Converts this ResponseCheckTx to JSON. + * @function toJSON + * @memberof tendermint.abci.ResponseCheckTx + * @instance + * @returns {Object.} JSON object + */ + ResponseCheckTx.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ResponseCheckTx; + })(abci.ResponseCheckTx || {}); + + abci.ResponseDeliverTx = (function(ResponseDeliverTx) { + + /** + * Properties of a ResponseDeliverTx. + * @memberof tendermint.abci + * @interface IResponseDeliverTx + * @property {number|null} [code] ResponseDeliverTx code + * @property {Uint8Array|null} [data] ResponseDeliverTx data + * @property {string|null} [log] ResponseDeliverTx log + * @property {string|null} [info] ResponseDeliverTx info + * @property {number|Long|null} [gasWanted] ResponseDeliverTx gasWanted + * @property {number|Long|null} [gasUsed] ResponseDeliverTx gasUsed + * @property {Array.|null} [events] ResponseDeliverTx events + * @property {string|null} [codespace] ResponseDeliverTx codespace + */ + + /** + * Constructs a new ResponseDeliverTx. + * @memberof tendermint.abci + * @classdesc Represents a ResponseDeliverTx. + * @implements IResponseDeliverTx + * @constructor + * @param {tendermint.abci.IResponseDeliverTx=} [properties] Properties to set + */ + function ResponseDeliverTx(properties) { + this.events = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResponseDeliverTx code. + * @member {number} code + * @memberof tendermint.abci.ResponseDeliverTx + * @instance + */ + ResponseDeliverTx.prototype.code = 0; + + /** + * ResponseDeliverTx data. + * @member {Uint8Array} data + * @memberof tendermint.abci.ResponseDeliverTx + * @instance + */ + ResponseDeliverTx.prototype.data = $util.newBuffer([]); + + /** + * ResponseDeliverTx log. + * @member {string} log + * @memberof tendermint.abci.ResponseDeliverTx + * @instance + */ + ResponseDeliverTx.prototype.log = ""; + + /** + * ResponseDeliverTx info. + * @member {string} info + * @memberof tendermint.abci.ResponseDeliverTx + * @instance + */ + ResponseDeliverTx.prototype.info = ""; + + /** + * ResponseDeliverTx gasWanted. + * @member {number|Long} gasWanted + * @memberof tendermint.abci.ResponseDeliverTx + * @instance + */ + ResponseDeliverTx.prototype.gasWanted = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ResponseDeliverTx gasUsed. + * @member {number|Long} gasUsed + * @memberof tendermint.abci.ResponseDeliverTx + * @instance + */ + ResponseDeliverTx.prototype.gasUsed = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ResponseDeliverTx events. + * @member {Array.} events + * @memberof tendermint.abci.ResponseDeliverTx + * @instance + */ + ResponseDeliverTx.prototype.events = $util.emptyArray; + + /** + * ResponseDeliverTx codespace. + * @member {string} codespace + * @memberof tendermint.abci.ResponseDeliverTx + * @instance + */ + ResponseDeliverTx.prototype.codespace = ""; + + /** + * Creates a new ResponseDeliverTx instance using the specified properties. + * @function create + * @memberof tendermint.abci.ResponseDeliverTx + * @static + * @param {tendermint.abci.IResponseDeliverTx=} [properties] Properties to set + * @returns {tendermint.abci.ResponseDeliverTx} ResponseDeliverTx instance + */ + ResponseDeliverTx.create = function create(properties) { + return new ResponseDeliverTx(properties); + }; + + /** + * Encodes the specified ResponseDeliverTx message. Does not implicitly {@link tendermint.abci.ResponseDeliverTx.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.ResponseDeliverTx + * @static + * @param {tendermint.abci.IResponseDeliverTx} message ResponseDeliverTx message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseDeliverTx.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.code != null && Object.hasOwnProperty.call(message, "code")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.code); + if (message.data != null && Object.hasOwnProperty.call(message, "data")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.data); + if (message.log != null && Object.hasOwnProperty.call(message, "log")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.log); + if (message.info != null && Object.hasOwnProperty.call(message, "info")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.info); + if (message.gasWanted != null && Object.hasOwnProperty.call(message, "gasWanted")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.gasWanted); + if (message.gasUsed != null && Object.hasOwnProperty.call(message, "gasUsed")) + writer.uint32(/* id 6, wireType 0 =*/48).int64(message.gasUsed); + if (message.events != null && message.events.length) + for (let i = 0; i < message.events.length; ++i) + $root.tendermint.abci.Event.encode(message.events[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.codespace != null && Object.hasOwnProperty.call(message, "codespace")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.codespace); + return writer; + }; + + /** + * Encodes the specified ResponseDeliverTx message, length delimited. Does not implicitly {@link tendermint.abci.ResponseDeliverTx.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.ResponseDeliverTx + * @static + * @param {tendermint.abci.IResponseDeliverTx} message ResponseDeliverTx message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseDeliverTx.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResponseDeliverTx message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.ResponseDeliverTx + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.ResponseDeliverTx} ResponseDeliverTx + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseDeliverTx.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.ResponseDeliverTx(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.code = reader.uint32(); + break; + case 2: + message.data = reader.bytes(); + break; + case 3: + message.log = reader.string(); + break; + case 4: + message.info = reader.string(); + break; + case 5: + message.gasWanted = reader.int64(); + break; + case 6: + message.gasUsed = reader.int64(); + break; + case 7: + if (!(message.events && message.events.length)) + message.events = []; + message.events.push($root.tendermint.abci.Event.decode(reader, reader.uint32())); + break; + case 8: + message.codespace = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResponseDeliverTx message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.ResponseDeliverTx + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.ResponseDeliverTx} ResponseDeliverTx + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseDeliverTx.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResponseDeliverTx message. + * @function verify + * @memberof tendermint.abci.ResponseDeliverTx + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResponseDeliverTx.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.code != null && message.hasOwnProperty("code")) + if (!$util.isInteger(message.code)) + return "code: integer expected"; + if (message.data != null && message.hasOwnProperty("data")) + if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) + return "data: buffer expected"; + if (message.log != null && message.hasOwnProperty("log")) + if (!$util.isString(message.log)) + return "log: string expected"; + if (message.info != null && message.hasOwnProperty("info")) + if (!$util.isString(message.info)) + return "info: string expected"; + if (message.gasWanted != null && message.hasOwnProperty("gasWanted")) + if (!$util.isInteger(message.gasWanted) && !(message.gasWanted && $util.isInteger(message.gasWanted.low) && $util.isInteger(message.gasWanted.high))) + return "gasWanted: integer|Long expected"; + if (message.gasUsed != null && message.hasOwnProperty("gasUsed")) + if (!$util.isInteger(message.gasUsed) && !(message.gasUsed && $util.isInteger(message.gasUsed.low) && $util.isInteger(message.gasUsed.high))) + return "gasUsed: integer|Long expected"; + if (message.events != null && message.hasOwnProperty("events")) { + if (!Array.isArray(message.events)) + return "events: array expected"; + for (let i = 0; i < message.events.length; ++i) { + let error = $root.tendermint.abci.Event.verify(message.events[i]); + if (error) + return "events." + error; + } + } + if (message.codespace != null && message.hasOwnProperty("codespace")) + if (!$util.isString(message.codespace)) + return "codespace: string expected"; + return null; + }; + + /** + * Creates a ResponseDeliverTx message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.ResponseDeliverTx + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.ResponseDeliverTx} ResponseDeliverTx + */ + ResponseDeliverTx.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.ResponseDeliverTx) + return object; + let message = new $root.tendermint.abci.ResponseDeliverTx(); + if (object.code != null) + message.code = object.code >>> 0; + if (object.data != null) + if (typeof object.data === "string") + $util.base64.decode(object.data, message.data = $util.newBuffer($util.base64.length(object.data)), 0); + else if (object.data.length) + message.data = object.data; + if (object.log != null) + message.log = String(object.log); + if (object.info != null) + message.info = String(object.info); + if (object.gasWanted != null) + if ($util.Long) + (message.gasWanted = $util.Long.fromValue(object.gasWanted)).unsigned = false; + else if (typeof object.gasWanted === "string") + message.gasWanted = parseInt(object.gasWanted, 10); + else if (typeof object.gasWanted === "number") + message.gasWanted = object.gasWanted; + else if (typeof object.gasWanted === "object") + message.gasWanted = new $util.LongBits(object.gasWanted.low >>> 0, object.gasWanted.high >>> 0).toNumber(); + if (object.gasUsed != null) + if ($util.Long) + (message.gasUsed = $util.Long.fromValue(object.gasUsed)).unsigned = false; + else if (typeof object.gasUsed === "string") + message.gasUsed = parseInt(object.gasUsed, 10); + else if (typeof object.gasUsed === "number") + message.gasUsed = object.gasUsed; + else if (typeof object.gasUsed === "object") + message.gasUsed = new $util.LongBits(object.gasUsed.low >>> 0, object.gasUsed.high >>> 0).toNumber(); + if (object.events) { + if (!Array.isArray(object.events)) + throw TypeError(".tendermint.abci.ResponseDeliverTx.events: array expected"); + message.events = []; + for (let i = 0; i < object.events.length; ++i) { + if (typeof object.events[i] !== "object") + throw TypeError(".tendermint.abci.ResponseDeliverTx.events: object expected"); + message.events[i] = $root.tendermint.abci.Event.fromObject(object.events[i]); + } + } + if (object.codespace != null) + message.codespace = String(object.codespace); + return message; + }; + + /** + * Creates a plain object from a ResponseDeliverTx message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.ResponseDeliverTx + * @static + * @param {tendermint.abci.ResponseDeliverTx} message ResponseDeliverTx + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResponseDeliverTx.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.events = []; + if (options.defaults) { + object.code = 0; + if (options.bytes === String) + object.data = ""; + else { + object.data = []; + if (options.bytes !== Array) + object.data = $util.newBuffer(object.data); + } + object.log = ""; + object.info = ""; + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.gasWanted = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.gasWanted = options.longs === String ? "0" : 0; + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.gasUsed = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.gasUsed = options.longs === String ? "0" : 0; + object.codespace = ""; + } + if (message.code != null && message.hasOwnProperty("code")) + object.code = message.code; + if (message.data != null && message.hasOwnProperty("data")) + object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; + if (message.log != null && message.hasOwnProperty("log")) + object.log = message.log; + if (message.info != null && message.hasOwnProperty("info")) + object.info = message.info; + if (message.gasWanted != null && message.hasOwnProperty("gasWanted")) + if (typeof message.gasWanted === "number") + object.gasWanted = options.longs === String ? String(message.gasWanted) : message.gasWanted; + else + object.gasWanted = options.longs === String ? $util.Long.prototype.toString.call(message.gasWanted) : options.longs === Number ? new $util.LongBits(message.gasWanted.low >>> 0, message.gasWanted.high >>> 0).toNumber() : message.gasWanted; + if (message.gasUsed != null && message.hasOwnProperty("gasUsed")) + if (typeof message.gasUsed === "number") + object.gasUsed = options.longs === String ? String(message.gasUsed) : message.gasUsed; + else + object.gasUsed = options.longs === String ? $util.Long.prototype.toString.call(message.gasUsed) : options.longs === Number ? new $util.LongBits(message.gasUsed.low >>> 0, message.gasUsed.high >>> 0).toNumber() : message.gasUsed; + if (message.events && message.events.length) { + object.events = []; + for (let j = 0; j < message.events.length; ++j) + object.events[j] = $root.tendermint.abci.Event.toObject(message.events[j], options); + } + if (message.codespace != null && message.hasOwnProperty("codespace")) + object.codespace = message.codespace; + return object; + }; + + /** + * Converts this ResponseDeliverTx to JSON. + * @function toJSON + * @memberof tendermint.abci.ResponseDeliverTx + * @instance + * @returns {Object.} JSON object + */ + ResponseDeliverTx.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ResponseDeliverTx; + })(abci.ResponseDeliverTx || {}); + + abci.ResponseEndBlock = (function(ResponseEndBlock) { + + /** + * Properties of a ResponseEndBlock. + * @memberof tendermint.abci + * @interface IResponseEndBlock + * @property {Array.|null} [validatorUpdates] ResponseEndBlock validatorUpdates + * @property {tendermint.abci.IConsensusParams|null} [consensusParamUpdates] ResponseEndBlock consensusParamUpdates + * @property {Array.|null} [events] ResponseEndBlock events + */ + + /** + * Constructs a new ResponseEndBlock. + * @memberof tendermint.abci + * @classdesc Represents a ResponseEndBlock. + * @implements IResponseEndBlock + * @constructor + * @param {tendermint.abci.IResponseEndBlock=} [properties] Properties to set + */ + function ResponseEndBlock(properties) { + this.validatorUpdates = []; + this.events = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResponseEndBlock validatorUpdates. + * @member {Array.} validatorUpdates + * @memberof tendermint.abci.ResponseEndBlock + * @instance + */ + ResponseEndBlock.prototype.validatorUpdates = $util.emptyArray; + + /** + * ResponseEndBlock consensusParamUpdates. + * @member {tendermint.abci.IConsensusParams|null|undefined} consensusParamUpdates + * @memberof tendermint.abci.ResponseEndBlock + * @instance + */ + ResponseEndBlock.prototype.consensusParamUpdates = null; + + /** + * ResponseEndBlock events. + * @member {Array.} events + * @memberof tendermint.abci.ResponseEndBlock + * @instance + */ + ResponseEndBlock.prototype.events = $util.emptyArray; + + /** + * Creates a new ResponseEndBlock instance using the specified properties. + * @function create + * @memberof tendermint.abci.ResponseEndBlock + * @static + * @param {tendermint.abci.IResponseEndBlock=} [properties] Properties to set + * @returns {tendermint.abci.ResponseEndBlock} ResponseEndBlock instance + */ + ResponseEndBlock.create = function create(properties) { + return new ResponseEndBlock(properties); + }; + + /** + * Encodes the specified ResponseEndBlock message. Does not implicitly {@link tendermint.abci.ResponseEndBlock.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.ResponseEndBlock + * @static + * @param {tendermint.abci.IResponseEndBlock} message ResponseEndBlock message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseEndBlock.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.validatorUpdates != null && message.validatorUpdates.length) + for (let i = 0; i < message.validatorUpdates.length; ++i) + $root.tendermint.abci.ValidatorUpdate.encode(message.validatorUpdates[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.consensusParamUpdates != null && Object.hasOwnProperty.call(message, "consensusParamUpdates")) + $root.tendermint.abci.ConsensusParams.encode(message.consensusParamUpdates, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.events != null && message.events.length) + for (let i = 0; i < message.events.length; ++i) + $root.tendermint.abci.Event.encode(message.events[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ResponseEndBlock message, length delimited. Does not implicitly {@link tendermint.abci.ResponseEndBlock.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.ResponseEndBlock + * @static + * @param {tendermint.abci.IResponseEndBlock} message ResponseEndBlock message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseEndBlock.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResponseEndBlock message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.ResponseEndBlock + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.ResponseEndBlock} ResponseEndBlock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseEndBlock.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.ResponseEndBlock(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.validatorUpdates && message.validatorUpdates.length)) + message.validatorUpdates = []; + message.validatorUpdates.push($root.tendermint.abci.ValidatorUpdate.decode(reader, reader.uint32())); + break; + case 2: + message.consensusParamUpdates = $root.tendermint.abci.ConsensusParams.decode(reader, reader.uint32()); + break; + case 3: + if (!(message.events && message.events.length)) + message.events = []; + message.events.push($root.tendermint.abci.Event.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResponseEndBlock message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.ResponseEndBlock + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.ResponseEndBlock} ResponseEndBlock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseEndBlock.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResponseEndBlock message. + * @function verify + * @memberof tendermint.abci.ResponseEndBlock + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResponseEndBlock.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.validatorUpdates != null && message.hasOwnProperty("validatorUpdates")) { + if (!Array.isArray(message.validatorUpdates)) + return "validatorUpdates: array expected"; + for (let i = 0; i < message.validatorUpdates.length; ++i) { + let error = $root.tendermint.abci.ValidatorUpdate.verify(message.validatorUpdates[i]); + if (error) + return "validatorUpdates." + error; + } + } + if (message.consensusParamUpdates != null && message.hasOwnProperty("consensusParamUpdates")) { + let error = $root.tendermint.abci.ConsensusParams.verify(message.consensusParamUpdates); + if (error) + return "consensusParamUpdates." + error; + } + if (message.events != null && message.hasOwnProperty("events")) { + if (!Array.isArray(message.events)) + return "events: array expected"; + for (let i = 0; i < message.events.length; ++i) { + let error = $root.tendermint.abci.Event.verify(message.events[i]); + if (error) + return "events." + error; + } + } + return null; + }; + + /** + * Creates a ResponseEndBlock message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.ResponseEndBlock + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.ResponseEndBlock} ResponseEndBlock + */ + ResponseEndBlock.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.ResponseEndBlock) + return object; + let message = new $root.tendermint.abci.ResponseEndBlock(); + if (object.validatorUpdates) { + if (!Array.isArray(object.validatorUpdates)) + throw TypeError(".tendermint.abci.ResponseEndBlock.validatorUpdates: array expected"); + message.validatorUpdates = []; + for (let i = 0; i < object.validatorUpdates.length; ++i) { + if (typeof object.validatorUpdates[i] !== "object") + throw TypeError(".tendermint.abci.ResponseEndBlock.validatorUpdates: object expected"); + message.validatorUpdates[i] = $root.tendermint.abci.ValidatorUpdate.fromObject(object.validatorUpdates[i]); + } + } + if (object.consensusParamUpdates != null) { + if (typeof object.consensusParamUpdates !== "object") + throw TypeError(".tendermint.abci.ResponseEndBlock.consensusParamUpdates: object expected"); + message.consensusParamUpdates = $root.tendermint.abci.ConsensusParams.fromObject(object.consensusParamUpdates); + } + if (object.events) { + if (!Array.isArray(object.events)) + throw TypeError(".tendermint.abci.ResponseEndBlock.events: array expected"); + message.events = []; + for (let i = 0; i < object.events.length; ++i) { + if (typeof object.events[i] !== "object") + throw TypeError(".tendermint.abci.ResponseEndBlock.events: object expected"); + message.events[i] = $root.tendermint.abci.Event.fromObject(object.events[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ResponseEndBlock message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.ResponseEndBlock + * @static + * @param {tendermint.abci.ResponseEndBlock} message ResponseEndBlock + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResponseEndBlock.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) { + object.validatorUpdates = []; + object.events = []; + } + if (options.defaults) + object.consensusParamUpdates = null; + if (message.validatorUpdates && message.validatorUpdates.length) { + object.validatorUpdates = []; + for (let j = 0; j < message.validatorUpdates.length; ++j) + object.validatorUpdates[j] = $root.tendermint.abci.ValidatorUpdate.toObject(message.validatorUpdates[j], options); + } + if (message.consensusParamUpdates != null && message.hasOwnProperty("consensusParamUpdates")) + object.consensusParamUpdates = $root.tendermint.abci.ConsensusParams.toObject(message.consensusParamUpdates, options); + if (message.events && message.events.length) { + object.events = []; + for (let j = 0; j < message.events.length; ++j) + object.events[j] = $root.tendermint.abci.Event.toObject(message.events[j], options); + } + return object; + }; + + /** + * Converts this ResponseEndBlock to JSON. + * @function toJSON + * @memberof tendermint.abci.ResponseEndBlock + * @instance + * @returns {Object.} JSON object + */ + ResponseEndBlock.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ResponseEndBlock; + })(abci.ResponseEndBlock || {}); + + abci.ResponseCommit = (function(ResponseCommit) { + + /** + * Properties of a ResponseCommit. + * @memberof tendermint.abci + * @interface IResponseCommit + * @property {Uint8Array|null} [data] ResponseCommit data + * @property {number|Long|null} [retainHeight] ResponseCommit retainHeight + */ + + /** + * Constructs a new ResponseCommit. + * @memberof tendermint.abci + * @classdesc Represents a ResponseCommit. + * @implements IResponseCommit + * @constructor + * @param {tendermint.abci.IResponseCommit=} [properties] Properties to set + */ + function ResponseCommit(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResponseCommit data. + * @member {Uint8Array} data + * @memberof tendermint.abci.ResponseCommit + * @instance + */ + ResponseCommit.prototype.data = $util.newBuffer([]); + + /** + * ResponseCommit retainHeight. + * @member {number|Long} retainHeight + * @memberof tendermint.abci.ResponseCommit + * @instance + */ + ResponseCommit.prototype.retainHeight = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new ResponseCommit instance using the specified properties. + * @function create + * @memberof tendermint.abci.ResponseCommit + * @static + * @param {tendermint.abci.IResponseCommit=} [properties] Properties to set + * @returns {tendermint.abci.ResponseCommit} ResponseCommit instance + */ + ResponseCommit.create = function create(properties) { + return new ResponseCommit(properties); + }; + + /** + * Encodes the specified ResponseCommit message. Does not implicitly {@link tendermint.abci.ResponseCommit.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.ResponseCommit + * @static + * @param {tendermint.abci.IResponseCommit} message ResponseCommit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseCommit.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.data != null && Object.hasOwnProperty.call(message, "data")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.data); + if (message.retainHeight != null && Object.hasOwnProperty.call(message, "retainHeight")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.retainHeight); + return writer; + }; + + /** + * Encodes the specified ResponseCommit message, length delimited. Does not implicitly {@link tendermint.abci.ResponseCommit.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.ResponseCommit + * @static + * @param {tendermint.abci.IResponseCommit} message ResponseCommit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseCommit.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResponseCommit message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.ResponseCommit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.ResponseCommit} ResponseCommit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseCommit.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.ResponseCommit(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + message.data = reader.bytes(); + break; + case 3: + message.retainHeight = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResponseCommit message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.ResponseCommit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.ResponseCommit} ResponseCommit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseCommit.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResponseCommit message. + * @function verify + * @memberof tendermint.abci.ResponseCommit + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResponseCommit.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.data != null && message.hasOwnProperty("data")) + if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) + return "data: buffer expected"; + if (message.retainHeight != null && message.hasOwnProperty("retainHeight")) + if (!$util.isInteger(message.retainHeight) && !(message.retainHeight && $util.isInteger(message.retainHeight.low) && $util.isInteger(message.retainHeight.high))) + return "retainHeight: integer|Long expected"; + return null; + }; + + /** + * Creates a ResponseCommit message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.ResponseCommit + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.ResponseCommit} ResponseCommit + */ + ResponseCommit.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.ResponseCommit) + return object; + let message = new $root.tendermint.abci.ResponseCommit(); + if (object.data != null) + if (typeof object.data === "string") + $util.base64.decode(object.data, message.data = $util.newBuffer($util.base64.length(object.data)), 0); + else if (object.data.length) + message.data = object.data; + if (object.retainHeight != null) + if ($util.Long) + (message.retainHeight = $util.Long.fromValue(object.retainHeight)).unsigned = false; + else if (typeof object.retainHeight === "string") + message.retainHeight = parseInt(object.retainHeight, 10); + else if (typeof object.retainHeight === "number") + message.retainHeight = object.retainHeight; + else if (typeof object.retainHeight === "object") + message.retainHeight = new $util.LongBits(object.retainHeight.low >>> 0, object.retainHeight.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a ResponseCommit message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.ResponseCommit + * @static + * @param {tendermint.abci.ResponseCommit} message ResponseCommit + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResponseCommit.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + if (options.bytes === String) + object.data = ""; + else { + object.data = []; + if (options.bytes !== Array) + object.data = $util.newBuffer(object.data); + } + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.retainHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.retainHeight = options.longs === String ? "0" : 0; + } + if (message.data != null && message.hasOwnProperty("data")) + object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; + if (message.retainHeight != null && message.hasOwnProperty("retainHeight")) + if (typeof message.retainHeight === "number") + object.retainHeight = options.longs === String ? String(message.retainHeight) : message.retainHeight; + else + object.retainHeight = options.longs === String ? $util.Long.prototype.toString.call(message.retainHeight) : options.longs === Number ? new $util.LongBits(message.retainHeight.low >>> 0, message.retainHeight.high >>> 0).toNumber() : message.retainHeight; + return object; + }; + + /** + * Converts this ResponseCommit to JSON. + * @function toJSON + * @memberof tendermint.abci.ResponseCommit + * @instance + * @returns {Object.} JSON object + */ + ResponseCommit.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ResponseCommit; + })(abci.ResponseCommit || {}); + + abci.ResponseListSnapshots = (function(ResponseListSnapshots) { + + /** + * Properties of a ResponseListSnapshots. + * @memberof tendermint.abci + * @interface IResponseListSnapshots + * @property {Array.|null} [snapshots] ResponseListSnapshots snapshots + */ + + /** + * Constructs a new ResponseListSnapshots. + * @memberof tendermint.abci + * @classdesc Represents a ResponseListSnapshots. + * @implements IResponseListSnapshots + * @constructor + * @param {tendermint.abci.IResponseListSnapshots=} [properties] Properties to set + */ + function ResponseListSnapshots(properties) { + this.snapshots = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResponseListSnapshots snapshots. + * @member {Array.} snapshots + * @memberof tendermint.abci.ResponseListSnapshots + * @instance + */ + ResponseListSnapshots.prototype.snapshots = $util.emptyArray; + + /** + * Creates a new ResponseListSnapshots instance using the specified properties. + * @function create + * @memberof tendermint.abci.ResponseListSnapshots + * @static + * @param {tendermint.abci.IResponseListSnapshots=} [properties] Properties to set + * @returns {tendermint.abci.ResponseListSnapshots} ResponseListSnapshots instance + */ + ResponseListSnapshots.create = function create(properties) { + return new ResponseListSnapshots(properties); + }; + + /** + * Encodes the specified ResponseListSnapshots message. Does not implicitly {@link tendermint.abci.ResponseListSnapshots.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.ResponseListSnapshots + * @static + * @param {tendermint.abci.IResponseListSnapshots} message ResponseListSnapshots message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseListSnapshots.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.snapshots != null && message.snapshots.length) + for (let i = 0; i < message.snapshots.length; ++i) + $root.tendermint.abci.Snapshot.encode(message.snapshots[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ResponseListSnapshots message, length delimited. Does not implicitly {@link tendermint.abci.ResponseListSnapshots.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.ResponseListSnapshots + * @static + * @param {tendermint.abci.IResponseListSnapshots} message ResponseListSnapshots message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseListSnapshots.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResponseListSnapshots message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.ResponseListSnapshots + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.ResponseListSnapshots} ResponseListSnapshots + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseListSnapshots.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.ResponseListSnapshots(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.snapshots && message.snapshots.length)) + message.snapshots = []; + message.snapshots.push($root.tendermint.abci.Snapshot.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResponseListSnapshots message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.ResponseListSnapshots + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.ResponseListSnapshots} ResponseListSnapshots + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseListSnapshots.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResponseListSnapshots message. + * @function verify + * @memberof tendermint.abci.ResponseListSnapshots + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResponseListSnapshots.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.snapshots != null && message.hasOwnProperty("snapshots")) { + if (!Array.isArray(message.snapshots)) + return "snapshots: array expected"; + for (let i = 0; i < message.snapshots.length; ++i) { + let error = $root.tendermint.abci.Snapshot.verify(message.snapshots[i]); + if (error) + return "snapshots." + error; + } + } + return null; + }; + + /** + * Creates a ResponseListSnapshots message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.ResponseListSnapshots + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.ResponseListSnapshots} ResponseListSnapshots + */ + ResponseListSnapshots.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.ResponseListSnapshots) + return object; + let message = new $root.tendermint.abci.ResponseListSnapshots(); + if (object.snapshots) { + if (!Array.isArray(object.snapshots)) + throw TypeError(".tendermint.abci.ResponseListSnapshots.snapshots: array expected"); + message.snapshots = []; + for (let i = 0; i < object.snapshots.length; ++i) { + if (typeof object.snapshots[i] !== "object") + throw TypeError(".tendermint.abci.ResponseListSnapshots.snapshots: object expected"); + message.snapshots[i] = $root.tendermint.abci.Snapshot.fromObject(object.snapshots[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ResponseListSnapshots message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.ResponseListSnapshots + * @static + * @param {tendermint.abci.ResponseListSnapshots} message ResponseListSnapshots + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResponseListSnapshots.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.snapshots = []; + if (message.snapshots && message.snapshots.length) { + object.snapshots = []; + for (let j = 0; j < message.snapshots.length; ++j) + object.snapshots[j] = $root.tendermint.abci.Snapshot.toObject(message.snapshots[j], options); + } + return object; + }; + + /** + * Converts this ResponseListSnapshots to JSON. + * @function toJSON + * @memberof tendermint.abci.ResponseListSnapshots + * @instance + * @returns {Object.} JSON object + */ + ResponseListSnapshots.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ResponseListSnapshots; + })(abci.ResponseListSnapshots || {}); + + abci.ResponseOfferSnapshot = (function(ResponseOfferSnapshot) { + + /** + * Properties of a ResponseOfferSnapshot. + * @memberof tendermint.abci + * @interface IResponseOfferSnapshot + * @property {tendermint.abci.ResponseOfferSnapshot.Result|null} [result] ResponseOfferSnapshot result + */ + + /** + * Constructs a new ResponseOfferSnapshot. + * @memberof tendermint.abci + * @classdesc Represents a ResponseOfferSnapshot. + * @implements IResponseOfferSnapshot + * @constructor + * @param {tendermint.abci.IResponseOfferSnapshot=} [properties] Properties to set + */ + function ResponseOfferSnapshot(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResponseOfferSnapshot result. + * @member {tendermint.abci.ResponseOfferSnapshot.Result} result + * @memberof tendermint.abci.ResponseOfferSnapshot + * @instance + */ + ResponseOfferSnapshot.prototype.result = 0; + + /** + * Creates a new ResponseOfferSnapshot instance using the specified properties. + * @function create + * @memberof tendermint.abci.ResponseOfferSnapshot + * @static + * @param {tendermint.abci.IResponseOfferSnapshot=} [properties] Properties to set + * @returns {tendermint.abci.ResponseOfferSnapshot} ResponseOfferSnapshot instance + */ + ResponseOfferSnapshot.create = function create(properties) { + return new ResponseOfferSnapshot(properties); + }; + + /** + * Encodes the specified ResponseOfferSnapshot message. Does not implicitly {@link tendermint.abci.ResponseOfferSnapshot.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.ResponseOfferSnapshot + * @static + * @param {tendermint.abci.IResponseOfferSnapshot} message ResponseOfferSnapshot message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseOfferSnapshot.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.result != null && Object.hasOwnProperty.call(message, "result")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.result); + return writer; + }; + + /** + * Encodes the specified ResponseOfferSnapshot message, length delimited. Does not implicitly {@link tendermint.abci.ResponseOfferSnapshot.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.ResponseOfferSnapshot + * @static + * @param {tendermint.abci.IResponseOfferSnapshot} message ResponseOfferSnapshot message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseOfferSnapshot.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResponseOfferSnapshot message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.ResponseOfferSnapshot + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.ResponseOfferSnapshot} ResponseOfferSnapshot + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseOfferSnapshot.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.ResponseOfferSnapshot(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.result = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResponseOfferSnapshot message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.ResponseOfferSnapshot + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.ResponseOfferSnapshot} ResponseOfferSnapshot + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseOfferSnapshot.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResponseOfferSnapshot message. + * @function verify + * @memberof tendermint.abci.ResponseOfferSnapshot + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResponseOfferSnapshot.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.result != null && message.hasOwnProperty("result")) + switch (message.result) { + default: + return "result: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + return null; + }; + + /** + * Creates a ResponseOfferSnapshot message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.ResponseOfferSnapshot + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.ResponseOfferSnapshot} ResponseOfferSnapshot + */ + ResponseOfferSnapshot.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.ResponseOfferSnapshot) + return object; + let message = new $root.tendermint.abci.ResponseOfferSnapshot(); + switch (object.result) { + case "UNKNOWN": + case 0: + message.result = 0; + break; + case "ACCEPT": + case 1: + message.result = 1; + break; + case "ABORT": + case 2: + message.result = 2; + break; + case "REJECT": + case 3: + message.result = 3; + break; + case "REJECT_FORMAT": + case 4: + message.result = 4; + break; + case "REJECT_SENDER": + case 5: + message.result = 5; + break; + } + return message; + }; + + /** + * Creates a plain object from a ResponseOfferSnapshot message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.ResponseOfferSnapshot + * @static + * @param {tendermint.abci.ResponseOfferSnapshot} message ResponseOfferSnapshot + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResponseOfferSnapshot.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.result = options.enums === String ? "UNKNOWN" : 0; + if (message.result != null && message.hasOwnProperty("result")) + object.result = options.enums === String ? $root.tendermint.abci.ResponseOfferSnapshot.Result[message.result] : message.result; + return object; + }; + + /** + * Converts this ResponseOfferSnapshot to JSON. + * @function toJSON + * @memberof tendermint.abci.ResponseOfferSnapshot + * @instance + * @returns {Object.} JSON object + */ + ResponseOfferSnapshot.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Result enum. + * @name tendermint.abci.ResponseOfferSnapshot.Result + * @enum {string} + * @property {number} UNKNOWN=0 UNKNOWN value + * @property {number} ACCEPT=1 ACCEPT value + * @property {number} ABORT=2 ABORT value + * @property {number} REJECT=3 REJECT value + * @property {number} REJECT_FORMAT=4 REJECT_FORMAT value + * @property {number} REJECT_SENDER=5 REJECT_SENDER value + */ + ResponseOfferSnapshot.Result = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNKNOWN"] = 0; + values[valuesById[1] = "ACCEPT"] = 1; + values[valuesById[2] = "ABORT"] = 2; + values[valuesById[3] = "REJECT"] = 3; + values[valuesById[4] = "REJECT_FORMAT"] = 4; + values[valuesById[5] = "REJECT_SENDER"] = 5; + return values; + })(); + + return ResponseOfferSnapshot; + })(abci.ResponseOfferSnapshot || {}); + + abci.ResponseLoadSnapshotChunk = (function(ResponseLoadSnapshotChunk) { + + /** + * Properties of a ResponseLoadSnapshotChunk. + * @memberof tendermint.abci + * @interface IResponseLoadSnapshotChunk + * @property {Uint8Array|null} [chunk] ResponseLoadSnapshotChunk chunk + */ + + /** + * Constructs a new ResponseLoadSnapshotChunk. + * @memberof tendermint.abci + * @classdesc Represents a ResponseLoadSnapshotChunk. + * @implements IResponseLoadSnapshotChunk + * @constructor + * @param {tendermint.abci.IResponseLoadSnapshotChunk=} [properties] Properties to set + */ + function ResponseLoadSnapshotChunk(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResponseLoadSnapshotChunk chunk. + * @member {Uint8Array} chunk + * @memberof tendermint.abci.ResponseLoadSnapshotChunk + * @instance + */ + ResponseLoadSnapshotChunk.prototype.chunk = $util.newBuffer([]); + + /** + * Creates a new ResponseLoadSnapshotChunk instance using the specified properties. + * @function create + * @memberof tendermint.abci.ResponseLoadSnapshotChunk + * @static + * @param {tendermint.abci.IResponseLoadSnapshotChunk=} [properties] Properties to set + * @returns {tendermint.abci.ResponseLoadSnapshotChunk} ResponseLoadSnapshotChunk instance + */ + ResponseLoadSnapshotChunk.create = function create(properties) { + return new ResponseLoadSnapshotChunk(properties); + }; + + /** + * Encodes the specified ResponseLoadSnapshotChunk message. Does not implicitly {@link tendermint.abci.ResponseLoadSnapshotChunk.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.ResponseLoadSnapshotChunk + * @static + * @param {tendermint.abci.IResponseLoadSnapshotChunk} message ResponseLoadSnapshotChunk message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseLoadSnapshotChunk.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.chunk != null && Object.hasOwnProperty.call(message, "chunk")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.chunk); + return writer; + }; + + /** + * Encodes the specified ResponseLoadSnapshotChunk message, length delimited. Does not implicitly {@link tendermint.abci.ResponseLoadSnapshotChunk.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.ResponseLoadSnapshotChunk + * @static + * @param {tendermint.abci.IResponseLoadSnapshotChunk} message ResponseLoadSnapshotChunk message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseLoadSnapshotChunk.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResponseLoadSnapshotChunk message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.ResponseLoadSnapshotChunk + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.ResponseLoadSnapshotChunk} ResponseLoadSnapshotChunk + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseLoadSnapshotChunk.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.ResponseLoadSnapshotChunk(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.chunk = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResponseLoadSnapshotChunk message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.ResponseLoadSnapshotChunk + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.ResponseLoadSnapshotChunk} ResponseLoadSnapshotChunk + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseLoadSnapshotChunk.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResponseLoadSnapshotChunk message. + * @function verify + * @memberof tendermint.abci.ResponseLoadSnapshotChunk + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResponseLoadSnapshotChunk.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.chunk != null && message.hasOwnProperty("chunk")) + if (!(message.chunk && typeof message.chunk.length === "number" || $util.isString(message.chunk))) + return "chunk: buffer expected"; + return null; + }; + + /** + * Creates a ResponseLoadSnapshotChunk message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.ResponseLoadSnapshotChunk + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.ResponseLoadSnapshotChunk} ResponseLoadSnapshotChunk + */ + ResponseLoadSnapshotChunk.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.ResponseLoadSnapshotChunk) + return object; + let message = new $root.tendermint.abci.ResponseLoadSnapshotChunk(); + if (object.chunk != null) + if (typeof object.chunk === "string") + $util.base64.decode(object.chunk, message.chunk = $util.newBuffer($util.base64.length(object.chunk)), 0); + else if (object.chunk.length) + message.chunk = object.chunk; + return message; + }; + + /** + * Creates a plain object from a ResponseLoadSnapshotChunk message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.ResponseLoadSnapshotChunk + * @static + * @param {tendermint.abci.ResponseLoadSnapshotChunk} message ResponseLoadSnapshotChunk + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResponseLoadSnapshotChunk.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + if (options.bytes === String) + object.chunk = ""; + else { + object.chunk = []; + if (options.bytes !== Array) + object.chunk = $util.newBuffer(object.chunk); + } + if (message.chunk != null && message.hasOwnProperty("chunk")) + object.chunk = options.bytes === String ? $util.base64.encode(message.chunk, 0, message.chunk.length) : options.bytes === Array ? Array.prototype.slice.call(message.chunk) : message.chunk; + return object; + }; + + /** + * Converts this ResponseLoadSnapshotChunk to JSON. + * @function toJSON + * @memberof tendermint.abci.ResponseLoadSnapshotChunk + * @instance + * @returns {Object.} JSON object + */ + ResponseLoadSnapshotChunk.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ResponseLoadSnapshotChunk; + })(abci.ResponseLoadSnapshotChunk || {}); + + abci.ResponseApplySnapshotChunk = (function(ResponseApplySnapshotChunk) { + + /** + * Properties of a ResponseApplySnapshotChunk. + * @memberof tendermint.abci + * @interface IResponseApplySnapshotChunk + * @property {tendermint.abci.ResponseApplySnapshotChunk.Result|null} [result] ResponseApplySnapshotChunk result + * @property {Array.|null} [refetchChunks] ResponseApplySnapshotChunk refetchChunks + * @property {Array.|null} [rejectSenders] ResponseApplySnapshotChunk rejectSenders + */ + + /** + * Constructs a new ResponseApplySnapshotChunk. + * @memberof tendermint.abci + * @classdesc Represents a ResponseApplySnapshotChunk. + * @implements IResponseApplySnapshotChunk + * @constructor + * @param {tendermint.abci.IResponseApplySnapshotChunk=} [properties] Properties to set + */ + function ResponseApplySnapshotChunk(properties) { + this.refetchChunks = []; + this.rejectSenders = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResponseApplySnapshotChunk result. + * @member {tendermint.abci.ResponseApplySnapshotChunk.Result} result + * @memberof tendermint.abci.ResponseApplySnapshotChunk + * @instance + */ + ResponseApplySnapshotChunk.prototype.result = 0; + + /** + * ResponseApplySnapshotChunk refetchChunks. + * @member {Array.} refetchChunks + * @memberof tendermint.abci.ResponseApplySnapshotChunk + * @instance + */ + ResponseApplySnapshotChunk.prototype.refetchChunks = $util.emptyArray; + + /** + * ResponseApplySnapshotChunk rejectSenders. + * @member {Array.} rejectSenders + * @memberof tendermint.abci.ResponseApplySnapshotChunk + * @instance + */ + ResponseApplySnapshotChunk.prototype.rejectSenders = $util.emptyArray; + + /** + * Creates a new ResponseApplySnapshotChunk instance using the specified properties. + * @function create + * @memberof tendermint.abci.ResponseApplySnapshotChunk + * @static + * @param {tendermint.abci.IResponseApplySnapshotChunk=} [properties] Properties to set + * @returns {tendermint.abci.ResponseApplySnapshotChunk} ResponseApplySnapshotChunk instance + */ + ResponseApplySnapshotChunk.create = function create(properties) { + return new ResponseApplySnapshotChunk(properties); + }; + + /** + * Encodes the specified ResponseApplySnapshotChunk message. Does not implicitly {@link tendermint.abci.ResponseApplySnapshotChunk.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.ResponseApplySnapshotChunk + * @static + * @param {tendermint.abci.IResponseApplySnapshotChunk} message ResponseApplySnapshotChunk message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseApplySnapshotChunk.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.result != null && Object.hasOwnProperty.call(message, "result")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.result); + if (message.refetchChunks != null && message.refetchChunks.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (let i = 0; i < message.refetchChunks.length; ++i) + writer.uint32(message.refetchChunks[i]); + writer.ldelim(); + } + if (message.rejectSenders != null && message.rejectSenders.length) + for (let i = 0; i < message.rejectSenders.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.rejectSenders[i]); + return writer; + }; + + /** + * Encodes the specified ResponseApplySnapshotChunk message, length delimited. Does not implicitly {@link tendermint.abci.ResponseApplySnapshotChunk.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.ResponseApplySnapshotChunk + * @static + * @param {tendermint.abci.IResponseApplySnapshotChunk} message ResponseApplySnapshotChunk message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseApplySnapshotChunk.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResponseApplySnapshotChunk message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.ResponseApplySnapshotChunk + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.ResponseApplySnapshotChunk} ResponseApplySnapshotChunk + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseApplySnapshotChunk.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.ResponseApplySnapshotChunk(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.result = reader.int32(); + break; + case 2: + if (!(message.refetchChunks && message.refetchChunks.length)) + message.refetchChunks = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.refetchChunks.push(reader.uint32()); + } else + message.refetchChunks.push(reader.uint32()); + break; + case 3: + if (!(message.rejectSenders && message.rejectSenders.length)) + message.rejectSenders = []; + message.rejectSenders.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResponseApplySnapshotChunk message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.ResponseApplySnapshotChunk + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.ResponseApplySnapshotChunk} ResponseApplySnapshotChunk + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseApplySnapshotChunk.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResponseApplySnapshotChunk message. + * @function verify + * @memberof tendermint.abci.ResponseApplySnapshotChunk + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResponseApplySnapshotChunk.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.result != null && message.hasOwnProperty("result")) + switch (message.result) { + default: + return "result: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.refetchChunks != null && message.hasOwnProperty("refetchChunks")) { + if (!Array.isArray(message.refetchChunks)) + return "refetchChunks: array expected"; + for (let i = 0; i < message.refetchChunks.length; ++i) + if (!$util.isInteger(message.refetchChunks[i])) + return "refetchChunks: integer[] expected"; + } + if (message.rejectSenders != null && message.hasOwnProperty("rejectSenders")) { + if (!Array.isArray(message.rejectSenders)) + return "rejectSenders: array expected"; + for (let i = 0; i < message.rejectSenders.length; ++i) + if (!$util.isString(message.rejectSenders[i])) + return "rejectSenders: string[] expected"; + } + return null; + }; + + /** + * Creates a ResponseApplySnapshotChunk message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.ResponseApplySnapshotChunk + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.ResponseApplySnapshotChunk} ResponseApplySnapshotChunk + */ + ResponseApplySnapshotChunk.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.ResponseApplySnapshotChunk) + return object; + let message = new $root.tendermint.abci.ResponseApplySnapshotChunk(); + switch (object.result) { + case "UNKNOWN": + case 0: + message.result = 0; + break; + case "ACCEPT": + case 1: + message.result = 1; + break; + case "ABORT": + case 2: + message.result = 2; + break; + case "RETRY": + case 3: + message.result = 3; + break; + case "RETRY_SNAPSHOT": + case 4: + message.result = 4; + break; + case "REJECT_SNAPSHOT": + case 5: + message.result = 5; + break; + } + if (object.refetchChunks) { + if (!Array.isArray(object.refetchChunks)) + throw TypeError(".tendermint.abci.ResponseApplySnapshotChunk.refetchChunks: array expected"); + message.refetchChunks = []; + for (let i = 0; i < object.refetchChunks.length; ++i) + message.refetchChunks[i] = object.refetchChunks[i] >>> 0; + } + if (object.rejectSenders) { + if (!Array.isArray(object.rejectSenders)) + throw TypeError(".tendermint.abci.ResponseApplySnapshotChunk.rejectSenders: array expected"); + message.rejectSenders = []; + for (let i = 0; i < object.rejectSenders.length; ++i) + message.rejectSenders[i] = String(object.rejectSenders[i]); + } + return message; + }; + + /** + * Creates a plain object from a ResponseApplySnapshotChunk message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.ResponseApplySnapshotChunk + * @static + * @param {tendermint.abci.ResponseApplySnapshotChunk} message ResponseApplySnapshotChunk + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResponseApplySnapshotChunk.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) { + object.refetchChunks = []; + object.rejectSenders = []; + } + if (options.defaults) + object.result = options.enums === String ? "UNKNOWN" : 0; + if (message.result != null && message.hasOwnProperty("result")) + object.result = options.enums === String ? $root.tendermint.abci.ResponseApplySnapshotChunk.Result[message.result] : message.result; + if (message.refetchChunks && message.refetchChunks.length) { + object.refetchChunks = []; + for (let j = 0; j < message.refetchChunks.length; ++j) + object.refetchChunks[j] = message.refetchChunks[j]; + } + if (message.rejectSenders && message.rejectSenders.length) { + object.rejectSenders = []; + for (let j = 0; j < message.rejectSenders.length; ++j) + object.rejectSenders[j] = message.rejectSenders[j]; + } + return object; + }; + + /** + * Converts this ResponseApplySnapshotChunk to JSON. + * @function toJSON + * @memberof tendermint.abci.ResponseApplySnapshotChunk + * @instance + * @returns {Object.} JSON object + */ + ResponseApplySnapshotChunk.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Result enum. + * @name tendermint.abci.ResponseApplySnapshotChunk.Result + * @enum {string} + * @property {number} UNKNOWN=0 UNKNOWN value + * @property {number} ACCEPT=1 ACCEPT value + * @property {number} ABORT=2 ABORT value + * @property {number} RETRY=3 RETRY value + * @property {number} RETRY_SNAPSHOT=4 RETRY_SNAPSHOT value + * @property {number} REJECT_SNAPSHOT=5 REJECT_SNAPSHOT value + */ + ResponseApplySnapshotChunk.Result = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNKNOWN"] = 0; + values[valuesById[1] = "ACCEPT"] = 1; + values[valuesById[2] = "ABORT"] = 2; + values[valuesById[3] = "RETRY"] = 3; + values[valuesById[4] = "RETRY_SNAPSHOT"] = 4; + values[valuesById[5] = "REJECT_SNAPSHOT"] = 5; + return values; + })(); + + return ResponseApplySnapshotChunk; + })(abci.ResponseApplySnapshotChunk || {}); + + abci.ConsensusParams = (function(ConsensusParams) { + + /** + * Properties of a ConsensusParams. + * @memberof tendermint.abci + * @interface IConsensusParams + * @property {tendermint.abci.IBlockParams|null} [block] ConsensusParams block + * @property {tendermint.types.IEvidenceParams|null} [evidence] ConsensusParams evidence + * @property {tendermint.types.IValidatorParams|null} [validator] ConsensusParams validator + * @property {tendermint.types.IVersionParams|null} [version] ConsensusParams version + */ + + /** + * Constructs a new ConsensusParams. + * @memberof tendermint.abci + * @classdesc Represents a ConsensusParams. + * @implements IConsensusParams + * @constructor + * @param {tendermint.abci.IConsensusParams=} [properties] Properties to set + */ + function ConsensusParams(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ConsensusParams block. + * @member {tendermint.abci.IBlockParams|null|undefined} block + * @memberof tendermint.abci.ConsensusParams + * @instance + */ + ConsensusParams.prototype.block = null; + + /** + * ConsensusParams evidence. + * @member {tendermint.types.IEvidenceParams|null|undefined} evidence + * @memberof tendermint.abci.ConsensusParams + * @instance + */ + ConsensusParams.prototype.evidence = null; + + /** + * ConsensusParams validator. + * @member {tendermint.types.IValidatorParams|null|undefined} validator + * @memberof tendermint.abci.ConsensusParams + * @instance + */ + ConsensusParams.prototype.validator = null; + + /** + * ConsensusParams version. + * @member {tendermint.types.IVersionParams|null|undefined} version + * @memberof tendermint.abci.ConsensusParams + * @instance + */ + ConsensusParams.prototype.version = null; + + /** + * Creates a new ConsensusParams instance using the specified properties. + * @function create + * @memberof tendermint.abci.ConsensusParams + * @static + * @param {tendermint.abci.IConsensusParams=} [properties] Properties to set + * @returns {tendermint.abci.ConsensusParams} ConsensusParams instance + */ + ConsensusParams.create = function create(properties) { + return new ConsensusParams(properties); + }; + + /** + * Encodes the specified ConsensusParams message. Does not implicitly {@link tendermint.abci.ConsensusParams.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.ConsensusParams + * @static + * @param {tendermint.abci.IConsensusParams} message ConsensusParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConsensusParams.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.block != null && Object.hasOwnProperty.call(message, "block")) + $root.tendermint.abci.BlockParams.encode(message.block, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.evidence != null && Object.hasOwnProperty.call(message, "evidence")) + $root.tendermint.types.EvidenceParams.encode(message.evidence, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.validator != null && Object.hasOwnProperty.call(message, "validator")) + $root.tendermint.types.ValidatorParams.encode(message.validator, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + $root.tendermint.types.VersionParams.encode(message.version, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ConsensusParams message, length delimited. Does not implicitly {@link tendermint.abci.ConsensusParams.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.ConsensusParams + * @static + * @param {tendermint.abci.IConsensusParams} message ConsensusParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConsensusParams.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConsensusParams message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.ConsensusParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.ConsensusParams} ConsensusParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConsensusParams.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.ConsensusParams(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.block = $root.tendermint.abci.BlockParams.decode(reader, reader.uint32()); + break; + case 2: + message.evidence = $root.tendermint.types.EvidenceParams.decode(reader, reader.uint32()); + break; + case 3: + message.validator = $root.tendermint.types.ValidatorParams.decode(reader, reader.uint32()); + break; + case 4: + message.version = $root.tendermint.types.VersionParams.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ConsensusParams message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.ConsensusParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.ConsensusParams} ConsensusParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConsensusParams.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConsensusParams message. + * @function verify + * @memberof tendermint.abci.ConsensusParams + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConsensusParams.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.block != null && message.hasOwnProperty("block")) { + let error = $root.tendermint.abci.BlockParams.verify(message.block); + if (error) + return "block." + error; + } + if (message.evidence != null && message.hasOwnProperty("evidence")) { + let error = $root.tendermint.types.EvidenceParams.verify(message.evidence); + if (error) + return "evidence." + error; + } + if (message.validator != null && message.hasOwnProperty("validator")) { + let error = $root.tendermint.types.ValidatorParams.verify(message.validator); + if (error) + return "validator." + error; + } + if (message.version != null && message.hasOwnProperty("version")) { + let error = $root.tendermint.types.VersionParams.verify(message.version); + if (error) + return "version." + error; + } + return null; + }; + + /** + * Creates a ConsensusParams message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.ConsensusParams + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.ConsensusParams} ConsensusParams + */ + ConsensusParams.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.ConsensusParams) + return object; + let message = new $root.tendermint.abci.ConsensusParams(); + if (object.block != null) { + if (typeof object.block !== "object") + throw TypeError(".tendermint.abci.ConsensusParams.block: object expected"); + message.block = $root.tendermint.abci.BlockParams.fromObject(object.block); + } + if (object.evidence != null) { + if (typeof object.evidence !== "object") + throw TypeError(".tendermint.abci.ConsensusParams.evidence: object expected"); + message.evidence = $root.tendermint.types.EvidenceParams.fromObject(object.evidence); + } + if (object.validator != null) { + if (typeof object.validator !== "object") + throw TypeError(".tendermint.abci.ConsensusParams.validator: object expected"); + message.validator = $root.tendermint.types.ValidatorParams.fromObject(object.validator); + } + if (object.version != null) { + if (typeof object.version !== "object") + throw TypeError(".tendermint.abci.ConsensusParams.version: object expected"); + message.version = $root.tendermint.types.VersionParams.fromObject(object.version); + } + return message; + }; + + /** + * Creates a plain object from a ConsensusParams message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.ConsensusParams + * @static + * @param {tendermint.abci.ConsensusParams} message ConsensusParams + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConsensusParams.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.block = null; + object.evidence = null; + object.validator = null; + object.version = null; + } + if (message.block != null && message.hasOwnProperty("block")) + object.block = $root.tendermint.abci.BlockParams.toObject(message.block, options); + if (message.evidence != null && message.hasOwnProperty("evidence")) + object.evidence = $root.tendermint.types.EvidenceParams.toObject(message.evidence, options); + if (message.validator != null && message.hasOwnProperty("validator")) + object.validator = $root.tendermint.types.ValidatorParams.toObject(message.validator, options); + if (message.version != null && message.hasOwnProperty("version")) + object.version = $root.tendermint.types.VersionParams.toObject(message.version, options); + return object; + }; + + /** + * Converts this ConsensusParams to JSON. + * @function toJSON + * @memberof tendermint.abci.ConsensusParams + * @instance + * @returns {Object.} JSON object + */ + ConsensusParams.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ConsensusParams; + })(abci.ConsensusParams || {}); + + abci.BlockParams = (function(BlockParams) { + + /** + * Properties of a BlockParams. + * @memberof tendermint.abci + * @interface IBlockParams + * @property {number|Long|null} [maxBytes] BlockParams maxBytes + * @property {number|Long|null} [maxGas] BlockParams maxGas + */ + + /** + * Constructs a new BlockParams. + * @memberof tendermint.abci + * @classdesc Represents a BlockParams. + * @implements IBlockParams + * @constructor + * @param {tendermint.abci.IBlockParams=} [properties] Properties to set + */ + function BlockParams(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BlockParams maxBytes. + * @member {number|Long} maxBytes + * @memberof tendermint.abci.BlockParams + * @instance + */ + BlockParams.prototype.maxBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * BlockParams maxGas. + * @member {number|Long} maxGas + * @memberof tendermint.abci.BlockParams + * @instance + */ + BlockParams.prototype.maxGas = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new BlockParams instance using the specified properties. + * @function create + * @memberof tendermint.abci.BlockParams + * @static + * @param {tendermint.abci.IBlockParams=} [properties] Properties to set + * @returns {tendermint.abci.BlockParams} BlockParams instance + */ + BlockParams.create = function create(properties) { + return new BlockParams(properties); + }; + + /** + * Encodes the specified BlockParams message. Does not implicitly {@link tendermint.abci.BlockParams.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.BlockParams + * @static + * @param {tendermint.abci.IBlockParams} message BlockParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BlockParams.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.maxBytes != null && Object.hasOwnProperty.call(message, "maxBytes")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.maxBytes); + if (message.maxGas != null && Object.hasOwnProperty.call(message, "maxGas")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.maxGas); + return writer; + }; + + /** + * Encodes the specified BlockParams message, length delimited. Does not implicitly {@link tendermint.abci.BlockParams.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.BlockParams + * @static + * @param {tendermint.abci.IBlockParams} message BlockParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BlockParams.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BlockParams message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.BlockParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.BlockParams} BlockParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BlockParams.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.BlockParams(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.maxBytes = reader.int64(); + break; + case 2: + message.maxGas = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BlockParams message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.BlockParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.BlockParams} BlockParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BlockParams.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BlockParams message. + * @function verify + * @memberof tendermint.abci.BlockParams + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BlockParams.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.maxBytes != null && message.hasOwnProperty("maxBytes")) + if (!$util.isInteger(message.maxBytes) && !(message.maxBytes && $util.isInteger(message.maxBytes.low) && $util.isInteger(message.maxBytes.high))) + return "maxBytes: integer|Long expected"; + if (message.maxGas != null && message.hasOwnProperty("maxGas")) + if (!$util.isInteger(message.maxGas) && !(message.maxGas && $util.isInteger(message.maxGas.low) && $util.isInteger(message.maxGas.high))) + return "maxGas: integer|Long expected"; + return null; + }; + + /** + * Creates a BlockParams message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.BlockParams + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.BlockParams} BlockParams + */ + BlockParams.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.BlockParams) + return object; + let message = new $root.tendermint.abci.BlockParams(); + if (object.maxBytes != null) + if ($util.Long) + (message.maxBytes = $util.Long.fromValue(object.maxBytes)).unsigned = false; + else if (typeof object.maxBytes === "string") + message.maxBytes = parseInt(object.maxBytes, 10); + else if (typeof object.maxBytes === "number") + message.maxBytes = object.maxBytes; + else if (typeof object.maxBytes === "object") + message.maxBytes = new $util.LongBits(object.maxBytes.low >>> 0, object.maxBytes.high >>> 0).toNumber(); + if (object.maxGas != null) + if ($util.Long) + (message.maxGas = $util.Long.fromValue(object.maxGas)).unsigned = false; + else if (typeof object.maxGas === "string") + message.maxGas = parseInt(object.maxGas, 10); + else if (typeof object.maxGas === "number") + message.maxGas = object.maxGas; + else if (typeof object.maxGas === "object") + message.maxGas = new $util.LongBits(object.maxGas.low >>> 0, object.maxGas.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a BlockParams message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.BlockParams + * @static + * @param {tendermint.abci.BlockParams} message BlockParams + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BlockParams.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.maxBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.maxBytes = options.longs === String ? "0" : 0; + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.maxGas = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.maxGas = options.longs === String ? "0" : 0; + } + if (message.maxBytes != null && message.hasOwnProperty("maxBytes")) + if (typeof message.maxBytes === "number") + object.maxBytes = options.longs === String ? String(message.maxBytes) : message.maxBytes; + else + object.maxBytes = options.longs === String ? $util.Long.prototype.toString.call(message.maxBytes) : options.longs === Number ? new $util.LongBits(message.maxBytes.low >>> 0, message.maxBytes.high >>> 0).toNumber() : message.maxBytes; + if (message.maxGas != null && message.hasOwnProperty("maxGas")) + if (typeof message.maxGas === "number") + object.maxGas = options.longs === String ? String(message.maxGas) : message.maxGas; + else + object.maxGas = options.longs === String ? $util.Long.prototype.toString.call(message.maxGas) : options.longs === Number ? new $util.LongBits(message.maxGas.low >>> 0, message.maxGas.high >>> 0).toNumber() : message.maxGas; + return object; + }; + + /** + * Converts this BlockParams to JSON. + * @function toJSON + * @memberof tendermint.abci.BlockParams + * @instance + * @returns {Object.} JSON object + */ + BlockParams.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return BlockParams; + })(abci.BlockParams || {}); + + abci.LastCommitInfo = (function(LastCommitInfo) { + + /** + * Properties of a LastCommitInfo. + * @memberof tendermint.abci + * @interface ILastCommitInfo + * @property {number|null} [round] LastCommitInfo round + * @property {Array.|null} [votes] LastCommitInfo votes + */ + + /** + * Constructs a new LastCommitInfo. + * @memberof tendermint.abci + * @classdesc Represents a LastCommitInfo. + * @implements ILastCommitInfo + * @constructor + * @param {tendermint.abci.ILastCommitInfo=} [properties] Properties to set + */ + function LastCommitInfo(properties) { + this.votes = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LastCommitInfo round. + * @member {number} round + * @memberof tendermint.abci.LastCommitInfo + * @instance + */ + LastCommitInfo.prototype.round = 0; + + /** + * LastCommitInfo votes. + * @member {Array.} votes + * @memberof tendermint.abci.LastCommitInfo + * @instance + */ + LastCommitInfo.prototype.votes = $util.emptyArray; + + /** + * Creates a new LastCommitInfo instance using the specified properties. + * @function create + * @memberof tendermint.abci.LastCommitInfo + * @static + * @param {tendermint.abci.ILastCommitInfo=} [properties] Properties to set + * @returns {tendermint.abci.LastCommitInfo} LastCommitInfo instance + */ + LastCommitInfo.create = function create(properties) { + return new LastCommitInfo(properties); + }; + + /** + * Encodes the specified LastCommitInfo message. Does not implicitly {@link tendermint.abci.LastCommitInfo.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.LastCommitInfo + * @static + * @param {tendermint.abci.ILastCommitInfo} message LastCommitInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LastCommitInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.round != null && Object.hasOwnProperty.call(message, "round")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.round); + if (message.votes != null && message.votes.length) + for (let i = 0; i < message.votes.length; ++i) + $root.tendermint.abci.VoteInfo.encode(message.votes[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LastCommitInfo message, length delimited. Does not implicitly {@link tendermint.abci.LastCommitInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.LastCommitInfo + * @static + * @param {tendermint.abci.ILastCommitInfo} message LastCommitInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LastCommitInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LastCommitInfo message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.LastCommitInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.LastCommitInfo} LastCommitInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LastCommitInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.LastCommitInfo(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.round = reader.int32(); + break; + case 2: + if (!(message.votes && message.votes.length)) + message.votes = []; + message.votes.push($root.tendermint.abci.VoteInfo.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LastCommitInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.LastCommitInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.LastCommitInfo} LastCommitInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LastCommitInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LastCommitInfo message. + * @function verify + * @memberof tendermint.abci.LastCommitInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LastCommitInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.round != null && message.hasOwnProperty("round")) + if (!$util.isInteger(message.round)) + return "round: integer expected"; + if (message.votes != null && message.hasOwnProperty("votes")) { + if (!Array.isArray(message.votes)) + return "votes: array expected"; + for (let i = 0; i < message.votes.length; ++i) { + let error = $root.tendermint.abci.VoteInfo.verify(message.votes[i]); + if (error) + return "votes." + error; + } + } + return null; + }; + + /** + * Creates a LastCommitInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.LastCommitInfo + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.LastCommitInfo} LastCommitInfo + */ + LastCommitInfo.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.LastCommitInfo) + return object; + let message = new $root.tendermint.abci.LastCommitInfo(); + if (object.round != null) + message.round = object.round | 0; + if (object.votes) { + if (!Array.isArray(object.votes)) + throw TypeError(".tendermint.abci.LastCommitInfo.votes: array expected"); + message.votes = []; + for (let i = 0; i < object.votes.length; ++i) { + if (typeof object.votes[i] !== "object") + throw TypeError(".tendermint.abci.LastCommitInfo.votes: object expected"); + message.votes[i] = $root.tendermint.abci.VoteInfo.fromObject(object.votes[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a LastCommitInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.LastCommitInfo + * @static + * @param {tendermint.abci.LastCommitInfo} message LastCommitInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LastCommitInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.votes = []; + if (options.defaults) + object.round = 0; + if (message.round != null && message.hasOwnProperty("round")) + object.round = message.round; + if (message.votes && message.votes.length) { + object.votes = []; + for (let j = 0; j < message.votes.length; ++j) + object.votes[j] = $root.tendermint.abci.VoteInfo.toObject(message.votes[j], options); + } + return object; + }; + + /** + * Converts this LastCommitInfo to JSON. + * @function toJSON + * @memberof tendermint.abci.LastCommitInfo + * @instance + * @returns {Object.} JSON object + */ + LastCommitInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return LastCommitInfo; + })(abci.LastCommitInfo || {}); + + abci.Event = (function(Event) { + + /** + * Properties of an Event. + * @memberof tendermint.abci + * @interface IEvent + * @property {string|null} [type] Event type + * @property {Array.|null} [attributes] Event attributes + */ + + /** + * Constructs a new Event. + * @memberof tendermint.abci + * @classdesc Represents an Event. + * @implements IEvent + * @constructor + * @param {tendermint.abci.IEvent=} [properties] Properties to set + */ + function Event(properties) { + this.attributes = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Event type. + * @member {string} type + * @memberof tendermint.abci.Event + * @instance + */ + Event.prototype.type = ""; + + /** + * Event attributes. + * @member {Array.} attributes + * @memberof tendermint.abci.Event + * @instance + */ + Event.prototype.attributes = $util.emptyArray; + + /** + * Creates a new Event instance using the specified properties. + * @function create + * @memberof tendermint.abci.Event + * @static + * @param {tendermint.abci.IEvent=} [properties] Properties to set + * @returns {tendermint.abci.Event} Event instance + */ + Event.create = function create(properties) { + return new Event(properties); + }; + + /** + * Encodes the specified Event message. Does not implicitly {@link tendermint.abci.Event.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.Event + * @static + * @param {tendermint.abci.IEvent} message Event message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Event.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.attributes != null && message.attributes.length) + for (let i = 0; i < message.attributes.length; ++i) + $root.tendermint.abci.EventAttribute.encode(message.attributes[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Event message, length delimited. Does not implicitly {@link tendermint.abci.Event.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.Event + * @static + * @param {tendermint.abci.IEvent} message Event message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Event.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Event message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.Event + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.Event} Event + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Event.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.Event(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type = reader.string(); + break; + case 2: + if (!(message.attributes && message.attributes.length)) + message.attributes = []; + message.attributes.push($root.tendermint.abci.EventAttribute.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Event message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.Event + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.Event} Event + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Event.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Event message. + * @function verify + * @memberof tendermint.abci.Event + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Event.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.attributes != null && message.hasOwnProperty("attributes")) { + if (!Array.isArray(message.attributes)) + return "attributes: array expected"; + for (let i = 0; i < message.attributes.length; ++i) { + let error = $root.tendermint.abci.EventAttribute.verify(message.attributes[i]); + if (error) + return "attributes." + error; + } + } + return null; + }; + + /** + * Creates an Event message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.Event + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.Event} Event + */ + Event.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.Event) + return object; + let message = new $root.tendermint.abci.Event(); + if (object.type != null) + message.type = String(object.type); + if (object.attributes) { + if (!Array.isArray(object.attributes)) + throw TypeError(".tendermint.abci.Event.attributes: array expected"); + message.attributes = []; + for (let i = 0; i < object.attributes.length; ++i) { + if (typeof object.attributes[i] !== "object") + throw TypeError(".tendermint.abci.Event.attributes: object expected"); + message.attributes[i] = $root.tendermint.abci.EventAttribute.fromObject(object.attributes[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an Event message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.Event + * @static + * @param {tendermint.abci.Event} message Event + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Event.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.attributes = []; + if (options.defaults) + object.type = ""; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.attributes && message.attributes.length) { + object.attributes = []; + for (let j = 0; j < message.attributes.length; ++j) + object.attributes[j] = $root.tendermint.abci.EventAttribute.toObject(message.attributes[j], options); + } + return object; + }; + + /** + * Converts this Event to JSON. + * @function toJSON + * @memberof tendermint.abci.Event + * @instance + * @returns {Object.} JSON object + */ + Event.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Event; + })(abci.Event || {}); + + abci.EventAttribute = (function(EventAttribute) { + + /** + * Properties of an EventAttribute. + * @memberof tendermint.abci + * @interface IEventAttribute + * @property {Uint8Array|null} [key] EventAttribute key + * @property {Uint8Array|null} [value] EventAttribute value + * @property {boolean|null} [index] EventAttribute index + */ + + /** + * Constructs a new EventAttribute. + * @memberof tendermint.abci + * @classdesc Represents an EventAttribute. + * @implements IEventAttribute + * @constructor + * @param {tendermint.abci.IEventAttribute=} [properties] Properties to set + */ + function EventAttribute(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EventAttribute key. + * @member {Uint8Array} key + * @memberof tendermint.abci.EventAttribute + * @instance + */ + EventAttribute.prototype.key = $util.newBuffer([]); + + /** + * EventAttribute value. + * @member {Uint8Array} value + * @memberof tendermint.abci.EventAttribute + * @instance + */ + EventAttribute.prototype.value = $util.newBuffer([]); + + /** + * EventAttribute index. + * @member {boolean} index + * @memberof tendermint.abci.EventAttribute + * @instance + */ + EventAttribute.prototype.index = false; + + /** + * Creates a new EventAttribute instance using the specified properties. + * @function create + * @memberof tendermint.abci.EventAttribute + * @static + * @param {tendermint.abci.IEventAttribute=} [properties] Properties to set + * @returns {tendermint.abci.EventAttribute} EventAttribute instance + */ + EventAttribute.create = function create(properties) { + return new EventAttribute(properties); + }; + + /** + * Encodes the specified EventAttribute message. Does not implicitly {@link tendermint.abci.EventAttribute.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.EventAttribute + * @static + * @param {tendermint.abci.IEventAttribute} message EventAttribute message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EventAttribute.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.key); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); + if (message.index != null && Object.hasOwnProperty.call(message, "index")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.index); + return writer; + }; + + /** + * Encodes the specified EventAttribute message, length delimited. Does not implicitly {@link tendermint.abci.EventAttribute.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.EventAttribute + * @static + * @param {tendermint.abci.IEventAttribute} message EventAttribute message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EventAttribute.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EventAttribute message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.EventAttribute + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.EventAttribute} EventAttribute + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EventAttribute.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.EventAttribute(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.key = reader.bytes(); + break; + case 2: + message.value = reader.bytes(); + break; + case 3: + message.index = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EventAttribute message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.EventAttribute + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.EventAttribute} EventAttribute + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EventAttribute.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EventAttribute message. + * @function verify + * @memberof tendermint.abci.EventAttribute + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EventAttribute.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.key != null && message.hasOwnProperty("key")) + if (!(message.key && typeof message.key.length === "number" || $util.isString(message.key))) + return "key: buffer expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; + if (message.index != null && message.hasOwnProperty("index")) + if (typeof message.index !== "boolean") + return "index: boolean expected"; + return null; + }; + + /** + * Creates an EventAttribute message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.EventAttribute + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.EventAttribute} EventAttribute + */ + EventAttribute.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.EventAttribute) + return object; + let message = new $root.tendermint.abci.EventAttribute(); + if (object.key != null) + if (typeof object.key === "string") + $util.base64.decode(object.key, message.key = $util.newBuffer($util.base64.length(object.key)), 0); + else if (object.key.length) + message.key = object.key; + if (object.value != null) + if (typeof object.value === "string") + $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); + else if (object.value.length) + message.value = object.value; + if (object.index != null) + message.index = Boolean(object.index); + return message; + }; + + /** + * Creates a plain object from an EventAttribute message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.EventAttribute + * @static + * @param {tendermint.abci.EventAttribute} message EventAttribute + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EventAttribute.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + if (options.bytes === String) + object.key = ""; + else { + object.key = []; + if (options.bytes !== Array) + object.key = $util.newBuffer(object.key); + } + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + object.index = false; + } + if (message.key != null && message.hasOwnProperty("key")) + object.key = options.bytes === String ? $util.base64.encode(message.key, 0, message.key.length) : options.bytes === Array ? Array.prototype.slice.call(message.key) : message.key; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + if (message.index != null && message.hasOwnProperty("index")) + object.index = message.index; + return object; + }; + + /** + * Converts this EventAttribute to JSON. + * @function toJSON + * @memberof tendermint.abci.EventAttribute + * @instance + * @returns {Object.} JSON object + */ + EventAttribute.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EventAttribute; + })(abci.EventAttribute || {}); + + abci.TxResult = (function(TxResult) { + + /** + * Properties of a TxResult. + * @memberof tendermint.abci + * @interface ITxResult + * @property {number|Long|null} [height] TxResult height + * @property {number|null} [index] TxResult index + * @property {Uint8Array|null} [tx] TxResult tx + * @property {tendermint.abci.IResponseDeliverTx|null} [result] TxResult result + */ + + /** + * Constructs a new TxResult. + * @memberof tendermint.abci + * @classdesc Represents a TxResult. + * @implements ITxResult + * @constructor + * @param {tendermint.abci.ITxResult=} [properties] Properties to set + */ + function TxResult(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TxResult height. + * @member {number|Long} height + * @memberof tendermint.abci.TxResult + * @instance + */ + TxResult.prototype.height = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * TxResult index. + * @member {number} index + * @memberof tendermint.abci.TxResult + * @instance + */ + TxResult.prototype.index = 0; + + /** + * TxResult tx. + * @member {Uint8Array} tx + * @memberof tendermint.abci.TxResult + * @instance + */ + TxResult.prototype.tx = $util.newBuffer([]); + + /** + * TxResult result. + * @member {tendermint.abci.IResponseDeliverTx|null|undefined} result + * @memberof tendermint.abci.TxResult + * @instance + */ + TxResult.prototype.result = null; + + /** + * Creates a new TxResult instance using the specified properties. + * @function create + * @memberof tendermint.abci.TxResult + * @static + * @param {tendermint.abci.ITxResult=} [properties] Properties to set + * @returns {tendermint.abci.TxResult} TxResult instance + */ + TxResult.create = function create(properties) { + return new TxResult(properties); + }; + + /** + * Encodes the specified TxResult message. Does not implicitly {@link tendermint.abci.TxResult.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.TxResult + * @static + * @param {tendermint.abci.ITxResult} message TxResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TxResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.height != null && Object.hasOwnProperty.call(message, "height")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.height); + if (message.index != null && Object.hasOwnProperty.call(message, "index")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.index); + if (message.tx != null && Object.hasOwnProperty.call(message, "tx")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.tx); + if (message.result != null && Object.hasOwnProperty.call(message, "result")) + $root.tendermint.abci.ResponseDeliverTx.encode(message.result, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TxResult message, length delimited. Does not implicitly {@link tendermint.abci.TxResult.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.TxResult + * @static + * @param {tendermint.abci.ITxResult} message TxResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TxResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TxResult message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.TxResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.TxResult} TxResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TxResult.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.TxResult(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.height = reader.int64(); + break; + case 2: + message.index = reader.uint32(); + break; + case 3: + message.tx = reader.bytes(); + break; + case 4: + message.result = $root.tendermint.abci.ResponseDeliverTx.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TxResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.TxResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.TxResult} TxResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TxResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TxResult message. + * @function verify + * @memberof tendermint.abci.TxResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TxResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.height != null && message.hasOwnProperty("height")) + if (!$util.isInteger(message.height) && !(message.height && $util.isInteger(message.height.low) && $util.isInteger(message.height.high))) + return "height: integer|Long expected"; + if (message.index != null && message.hasOwnProperty("index")) + if (!$util.isInteger(message.index)) + return "index: integer expected"; + if (message.tx != null && message.hasOwnProperty("tx")) + if (!(message.tx && typeof message.tx.length === "number" || $util.isString(message.tx))) + return "tx: buffer expected"; + if (message.result != null && message.hasOwnProperty("result")) { + let error = $root.tendermint.abci.ResponseDeliverTx.verify(message.result); + if (error) + return "result." + error; + } + return null; + }; + + /** + * Creates a TxResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.TxResult + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.TxResult} TxResult + */ + TxResult.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.TxResult) + return object; + let message = new $root.tendermint.abci.TxResult(); + if (object.height != null) + if ($util.Long) + (message.height = $util.Long.fromValue(object.height)).unsigned = false; + else if (typeof object.height === "string") + message.height = parseInt(object.height, 10); + else if (typeof object.height === "number") + message.height = object.height; + else if (typeof object.height === "object") + message.height = new $util.LongBits(object.height.low >>> 0, object.height.high >>> 0).toNumber(); + if (object.index != null) + message.index = object.index >>> 0; + if (object.tx != null) + if (typeof object.tx === "string") + $util.base64.decode(object.tx, message.tx = $util.newBuffer($util.base64.length(object.tx)), 0); + else if (object.tx.length) + message.tx = object.tx; + if (object.result != null) { + if (typeof object.result !== "object") + throw TypeError(".tendermint.abci.TxResult.result: object expected"); + message.result = $root.tendermint.abci.ResponseDeliverTx.fromObject(object.result); + } + return message; + }; + + /** + * Creates a plain object from a TxResult message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.TxResult + * @static + * @param {tendermint.abci.TxResult} message TxResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TxResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.height = options.longs === String ? "0" : 0; + object.index = 0; + if (options.bytes === String) + object.tx = ""; + else { + object.tx = []; + if (options.bytes !== Array) + object.tx = $util.newBuffer(object.tx); + } + object.result = null; + } + if (message.height != null && message.hasOwnProperty("height")) + if (typeof message.height === "number") + object.height = options.longs === String ? String(message.height) : message.height; + else + object.height = options.longs === String ? $util.Long.prototype.toString.call(message.height) : options.longs === Number ? new $util.LongBits(message.height.low >>> 0, message.height.high >>> 0).toNumber() : message.height; + if (message.index != null && message.hasOwnProperty("index")) + object.index = message.index; + if (message.tx != null && message.hasOwnProperty("tx")) + object.tx = options.bytes === String ? $util.base64.encode(message.tx, 0, message.tx.length) : options.bytes === Array ? Array.prototype.slice.call(message.tx) : message.tx; + if (message.result != null && message.hasOwnProperty("result")) + object.result = $root.tendermint.abci.ResponseDeliverTx.toObject(message.result, options); + return object; + }; + + /** + * Converts this TxResult to JSON. + * @function toJSON + * @memberof tendermint.abci.TxResult + * @instance + * @returns {Object.} JSON object + */ + TxResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TxResult; + })(abci.TxResult || {}); + + abci.Validator = (function(Validator) { + + /** + * Properties of a Validator. + * @memberof tendermint.abci + * @interface IValidator + * @property {Uint8Array|null} [address] Validator address + * @property {number|Long|null} [power] Validator power + */ + + /** + * Constructs a new Validator. + * @memberof tendermint.abci + * @classdesc Represents a Validator. + * @implements IValidator + * @constructor + * @param {tendermint.abci.IValidator=} [properties] Properties to set + */ + function Validator(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Validator address. + * @member {Uint8Array} address + * @memberof tendermint.abci.Validator + * @instance + */ + Validator.prototype.address = $util.newBuffer([]); + + /** + * Validator power. + * @member {number|Long} power + * @memberof tendermint.abci.Validator + * @instance + */ + Validator.prototype.power = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new Validator instance using the specified properties. + * @function create + * @memberof tendermint.abci.Validator + * @static + * @param {tendermint.abci.IValidator=} [properties] Properties to set + * @returns {tendermint.abci.Validator} Validator instance + */ + Validator.create = function create(properties) { + return new Validator(properties); + }; + + /** + * Encodes the specified Validator message. Does not implicitly {@link tendermint.abci.Validator.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.Validator + * @static + * @param {tendermint.abci.IValidator} message Validator message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Validator.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.address != null && Object.hasOwnProperty.call(message, "address")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.address); + if (message.power != null && Object.hasOwnProperty.call(message, "power")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.power); + return writer; + }; + + /** + * Encodes the specified Validator message, length delimited. Does not implicitly {@link tendermint.abci.Validator.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.Validator + * @static + * @param {tendermint.abci.IValidator} message Validator message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Validator.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Validator message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.Validator + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.Validator} Validator + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Validator.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.Validator(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.address = reader.bytes(); + break; + case 3: + message.power = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Validator message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.Validator + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.Validator} Validator + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Validator.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Validator message. + * @function verify + * @memberof tendermint.abci.Validator + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Validator.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.address != null && message.hasOwnProperty("address")) + if (!(message.address && typeof message.address.length === "number" || $util.isString(message.address))) + return "address: buffer expected"; + if (message.power != null && message.hasOwnProperty("power")) + if (!$util.isInteger(message.power) && !(message.power && $util.isInteger(message.power.low) && $util.isInteger(message.power.high))) + return "power: integer|Long expected"; + return null; + }; + + /** + * Creates a Validator message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.Validator + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.Validator} Validator + */ + Validator.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.Validator) + return object; + let message = new $root.tendermint.abci.Validator(); + if (object.address != null) + if (typeof object.address === "string") + $util.base64.decode(object.address, message.address = $util.newBuffer($util.base64.length(object.address)), 0); + else if (object.address.length) + message.address = object.address; + if (object.power != null) + if ($util.Long) + (message.power = $util.Long.fromValue(object.power)).unsigned = false; + else if (typeof object.power === "string") + message.power = parseInt(object.power, 10); + else if (typeof object.power === "number") + message.power = object.power; + else if (typeof object.power === "object") + message.power = new $util.LongBits(object.power.low >>> 0, object.power.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a Validator message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.Validator + * @static + * @param {tendermint.abci.Validator} message Validator + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Validator.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + if (options.bytes === String) + object.address = ""; + else { + object.address = []; + if (options.bytes !== Array) + object.address = $util.newBuffer(object.address); + } + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.power = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.power = options.longs === String ? "0" : 0; + } + if (message.address != null && message.hasOwnProperty("address")) + object.address = options.bytes === String ? $util.base64.encode(message.address, 0, message.address.length) : options.bytes === Array ? Array.prototype.slice.call(message.address) : message.address; + if (message.power != null && message.hasOwnProperty("power")) + if (typeof message.power === "number") + object.power = options.longs === String ? String(message.power) : message.power; + else + object.power = options.longs === String ? $util.Long.prototype.toString.call(message.power) : options.longs === Number ? new $util.LongBits(message.power.low >>> 0, message.power.high >>> 0).toNumber() : message.power; + return object; + }; + + /** + * Converts this Validator to JSON. + * @function toJSON + * @memberof tendermint.abci.Validator + * @instance + * @returns {Object.} JSON object + */ + Validator.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Validator; + })(abci.Validator || {}); + + abci.ValidatorUpdate = (function(ValidatorUpdate) { + + /** + * Properties of a ValidatorUpdate. + * @memberof tendermint.abci + * @interface IValidatorUpdate + * @property {tendermint.crypto.IPublicKey|null} [pubKey] ValidatorUpdate pubKey + * @property {number|Long|null} [power] ValidatorUpdate power + */ + + /** + * Constructs a new ValidatorUpdate. + * @memberof tendermint.abci + * @classdesc Represents a ValidatorUpdate. + * @implements IValidatorUpdate + * @constructor + * @param {tendermint.abci.IValidatorUpdate=} [properties] Properties to set + */ + function ValidatorUpdate(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ValidatorUpdate pubKey. + * @member {tendermint.crypto.IPublicKey|null|undefined} pubKey + * @memberof tendermint.abci.ValidatorUpdate + * @instance + */ + ValidatorUpdate.prototype.pubKey = null; + + /** + * ValidatorUpdate power. + * @member {number|Long} power + * @memberof tendermint.abci.ValidatorUpdate + * @instance + */ + ValidatorUpdate.prototype.power = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new ValidatorUpdate instance using the specified properties. + * @function create + * @memberof tendermint.abci.ValidatorUpdate + * @static + * @param {tendermint.abci.IValidatorUpdate=} [properties] Properties to set + * @returns {tendermint.abci.ValidatorUpdate} ValidatorUpdate instance + */ + ValidatorUpdate.create = function create(properties) { + return new ValidatorUpdate(properties); + }; + + /** + * Encodes the specified ValidatorUpdate message. Does not implicitly {@link tendermint.abci.ValidatorUpdate.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.ValidatorUpdate + * @static + * @param {tendermint.abci.IValidatorUpdate} message ValidatorUpdate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValidatorUpdate.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pubKey != null && Object.hasOwnProperty.call(message, "pubKey")) + $root.tendermint.crypto.PublicKey.encode(message.pubKey, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.power != null && Object.hasOwnProperty.call(message, "power")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.power); + return writer; + }; + + /** + * Encodes the specified ValidatorUpdate message, length delimited. Does not implicitly {@link tendermint.abci.ValidatorUpdate.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.ValidatorUpdate + * @static + * @param {tendermint.abci.IValidatorUpdate} message ValidatorUpdate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValidatorUpdate.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ValidatorUpdate message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.ValidatorUpdate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.ValidatorUpdate} ValidatorUpdate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValidatorUpdate.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.ValidatorUpdate(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.pubKey = $root.tendermint.crypto.PublicKey.decode(reader, reader.uint32()); + break; + case 2: + message.power = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ValidatorUpdate message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.ValidatorUpdate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.ValidatorUpdate} ValidatorUpdate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValidatorUpdate.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ValidatorUpdate message. + * @function verify + * @memberof tendermint.abci.ValidatorUpdate + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ValidatorUpdate.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.pubKey != null && message.hasOwnProperty("pubKey")) { + let error = $root.tendermint.crypto.PublicKey.verify(message.pubKey); + if (error) + return "pubKey." + error; + } + if (message.power != null && message.hasOwnProperty("power")) + if (!$util.isInteger(message.power) && !(message.power && $util.isInteger(message.power.low) && $util.isInteger(message.power.high))) + return "power: integer|Long expected"; + return null; + }; + + /** + * Creates a ValidatorUpdate message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.ValidatorUpdate + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.ValidatorUpdate} ValidatorUpdate + */ + ValidatorUpdate.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.ValidatorUpdate) + return object; + let message = new $root.tendermint.abci.ValidatorUpdate(); + if (object.pubKey != null) { + if (typeof object.pubKey !== "object") + throw TypeError(".tendermint.abci.ValidatorUpdate.pubKey: object expected"); + message.pubKey = $root.tendermint.crypto.PublicKey.fromObject(object.pubKey); + } + if (object.power != null) + if ($util.Long) + (message.power = $util.Long.fromValue(object.power)).unsigned = false; + else if (typeof object.power === "string") + message.power = parseInt(object.power, 10); + else if (typeof object.power === "number") + message.power = object.power; + else if (typeof object.power === "object") + message.power = new $util.LongBits(object.power.low >>> 0, object.power.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a ValidatorUpdate message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.ValidatorUpdate + * @static + * @param {tendermint.abci.ValidatorUpdate} message ValidatorUpdate + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ValidatorUpdate.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.pubKey = null; + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.power = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.power = options.longs === String ? "0" : 0; + } + if (message.pubKey != null && message.hasOwnProperty("pubKey")) + object.pubKey = $root.tendermint.crypto.PublicKey.toObject(message.pubKey, options); + if (message.power != null && message.hasOwnProperty("power")) + if (typeof message.power === "number") + object.power = options.longs === String ? String(message.power) : message.power; + else + object.power = options.longs === String ? $util.Long.prototype.toString.call(message.power) : options.longs === Number ? new $util.LongBits(message.power.low >>> 0, message.power.high >>> 0).toNumber() : message.power; + return object; + }; + + /** + * Converts this ValidatorUpdate to JSON. + * @function toJSON + * @memberof tendermint.abci.ValidatorUpdate + * @instance + * @returns {Object.} JSON object + */ + ValidatorUpdate.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ValidatorUpdate; + })(abci.ValidatorUpdate || {}); + + abci.VoteInfo = (function(VoteInfo) { + + /** + * Properties of a VoteInfo. + * @memberof tendermint.abci + * @interface IVoteInfo + * @property {tendermint.abci.IValidator|null} [validator] VoteInfo validator + * @property {boolean|null} [signedLastBlock] VoteInfo signedLastBlock + */ + + /** + * Constructs a new VoteInfo. + * @memberof tendermint.abci + * @classdesc Represents a VoteInfo. + * @implements IVoteInfo + * @constructor + * @param {tendermint.abci.IVoteInfo=} [properties] Properties to set + */ + function VoteInfo(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * VoteInfo validator. + * @member {tendermint.abci.IValidator|null|undefined} validator + * @memberof tendermint.abci.VoteInfo + * @instance + */ + VoteInfo.prototype.validator = null; + + /** + * VoteInfo signedLastBlock. + * @member {boolean} signedLastBlock + * @memberof tendermint.abci.VoteInfo + * @instance + */ + VoteInfo.prototype.signedLastBlock = false; + + /** + * Creates a new VoteInfo instance using the specified properties. + * @function create + * @memberof tendermint.abci.VoteInfo + * @static + * @param {tendermint.abci.IVoteInfo=} [properties] Properties to set + * @returns {tendermint.abci.VoteInfo} VoteInfo instance + */ + VoteInfo.create = function create(properties) { + return new VoteInfo(properties); + }; + + /** + * Encodes the specified VoteInfo message. Does not implicitly {@link tendermint.abci.VoteInfo.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.VoteInfo + * @static + * @param {tendermint.abci.IVoteInfo} message VoteInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VoteInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.validator != null && Object.hasOwnProperty.call(message, "validator")) + $root.tendermint.abci.Validator.encode(message.validator, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.signedLastBlock != null && Object.hasOwnProperty.call(message, "signedLastBlock")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.signedLastBlock); + return writer; + }; + + /** + * Encodes the specified VoteInfo message, length delimited. Does not implicitly {@link tendermint.abci.VoteInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.VoteInfo + * @static + * @param {tendermint.abci.IVoteInfo} message VoteInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VoteInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VoteInfo message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.VoteInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.VoteInfo} VoteInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VoteInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.VoteInfo(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.validator = $root.tendermint.abci.Validator.decode(reader, reader.uint32()); + break; + case 2: + message.signedLastBlock = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VoteInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.VoteInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.VoteInfo} VoteInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VoteInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VoteInfo message. + * @function verify + * @memberof tendermint.abci.VoteInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VoteInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.validator != null && message.hasOwnProperty("validator")) { + let error = $root.tendermint.abci.Validator.verify(message.validator); + if (error) + return "validator." + error; + } + if (message.signedLastBlock != null && message.hasOwnProperty("signedLastBlock")) + if (typeof message.signedLastBlock !== "boolean") + return "signedLastBlock: boolean expected"; + return null; + }; + + /** + * Creates a VoteInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.VoteInfo + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.VoteInfo} VoteInfo + */ + VoteInfo.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.VoteInfo) + return object; + let message = new $root.tendermint.abci.VoteInfo(); + if (object.validator != null) { + if (typeof object.validator !== "object") + throw TypeError(".tendermint.abci.VoteInfo.validator: object expected"); + message.validator = $root.tendermint.abci.Validator.fromObject(object.validator); + } + if (object.signedLastBlock != null) + message.signedLastBlock = Boolean(object.signedLastBlock); + return message; + }; + + /** + * Creates a plain object from a VoteInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.VoteInfo + * @static + * @param {tendermint.abci.VoteInfo} message VoteInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VoteInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.validator = null; + object.signedLastBlock = false; + } + if (message.validator != null && message.hasOwnProperty("validator")) + object.validator = $root.tendermint.abci.Validator.toObject(message.validator, options); + if (message.signedLastBlock != null && message.hasOwnProperty("signedLastBlock")) + object.signedLastBlock = message.signedLastBlock; + return object; + }; + + /** + * Converts this VoteInfo to JSON. + * @function toJSON + * @memberof tendermint.abci.VoteInfo + * @instance + * @returns {Object.} JSON object + */ + VoteInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return VoteInfo; + })(abci.VoteInfo || {}); + + /** + * EvidenceType enum. + * @name tendermint.abci.EvidenceType + * @enum {string} + * @property {number} UNKNOWN=0 UNKNOWN value + * @property {number} DUPLICATE_VOTE=1 DUPLICATE_VOTE value + * @property {number} LIGHT_CLIENT_ATTACK=2 LIGHT_CLIENT_ATTACK value + */ + abci.EvidenceType = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNKNOWN"] = 0; + values[valuesById[1] = "DUPLICATE_VOTE"] = 1; + values[valuesById[2] = "LIGHT_CLIENT_ATTACK"] = 2; + return values; + })(); + + abci.Evidence = (function(Evidence) { + + /** + * Properties of an Evidence. + * @memberof tendermint.abci + * @interface IEvidence + * @property {tendermint.abci.EvidenceType|null} [type] Evidence type + * @property {tendermint.abci.IValidator|null} [validator] Evidence validator + * @property {number|Long|null} [height] Evidence height + * @property {google.protobuf.ITimestamp|null} [time] Evidence time + * @property {number|Long|null} [totalVotingPower] Evidence totalVotingPower + */ + + /** + * Constructs a new Evidence. + * @memberof tendermint.abci + * @classdesc Represents an Evidence. + * @implements IEvidence + * @constructor + * @param {tendermint.abci.IEvidence=} [properties] Properties to set + */ + function Evidence(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Evidence type. + * @member {tendermint.abci.EvidenceType} type + * @memberof tendermint.abci.Evidence + * @instance + */ + Evidence.prototype.type = 0; + + /** + * Evidence validator. + * @member {tendermint.abci.IValidator|null|undefined} validator + * @memberof tendermint.abci.Evidence + * @instance + */ + Evidence.prototype.validator = null; + + /** + * Evidence height. + * @member {number|Long} height + * @memberof tendermint.abci.Evidence + * @instance + */ + Evidence.prototype.height = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Evidence time. + * @member {google.protobuf.ITimestamp|null|undefined} time + * @memberof tendermint.abci.Evidence + * @instance + */ + Evidence.prototype.time = null; + + /** + * Evidence totalVotingPower. + * @member {number|Long} totalVotingPower + * @memberof tendermint.abci.Evidence + * @instance + */ + Evidence.prototype.totalVotingPower = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new Evidence instance using the specified properties. + * @function create + * @memberof tendermint.abci.Evidence + * @static + * @param {tendermint.abci.IEvidence=} [properties] Properties to set + * @returns {tendermint.abci.Evidence} Evidence instance + */ + Evidence.create = function create(properties) { + return new Evidence(properties); + }; + + /** + * Encodes the specified Evidence message. Does not implicitly {@link tendermint.abci.Evidence.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.Evidence + * @static + * @param {tendermint.abci.IEvidence} message Evidence message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Evidence.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); + if (message.validator != null && Object.hasOwnProperty.call(message, "validator")) + $root.tendermint.abci.Validator.encode(message.validator, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.height != null && Object.hasOwnProperty.call(message, "height")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.height); + if (message.time != null && Object.hasOwnProperty.call(message, "time")) + $root.google.protobuf.Timestamp.encode(message.time, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.totalVotingPower != null && Object.hasOwnProperty.call(message, "totalVotingPower")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.totalVotingPower); + return writer; + }; + + /** + * Encodes the specified Evidence message, length delimited. Does not implicitly {@link tendermint.abci.Evidence.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.Evidence + * @static + * @param {tendermint.abci.IEvidence} message Evidence message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Evidence.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Evidence message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.Evidence + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.Evidence} Evidence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Evidence.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.Evidence(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type = reader.int32(); + break; + case 2: + message.validator = $root.tendermint.abci.Validator.decode(reader, reader.uint32()); + break; + case 3: + message.height = reader.int64(); + break; + case 4: + message.time = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 5: + message.totalVotingPower = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Evidence message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.Evidence + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.Evidence} Evidence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Evidence.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Evidence message. + * @function verify + * @memberof tendermint.abci.Evidence + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Evidence.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.validator != null && message.hasOwnProperty("validator")) { + let error = $root.tendermint.abci.Validator.verify(message.validator); + if (error) + return "validator." + error; + } + if (message.height != null && message.hasOwnProperty("height")) + if (!$util.isInteger(message.height) && !(message.height && $util.isInteger(message.height.low) && $util.isInteger(message.height.high))) + return "height: integer|Long expected"; + if (message.time != null && message.hasOwnProperty("time")) { + let error = $root.google.protobuf.Timestamp.verify(message.time); + if (error) + return "time." + error; + } + if (message.totalVotingPower != null && message.hasOwnProperty("totalVotingPower")) + if (!$util.isInteger(message.totalVotingPower) && !(message.totalVotingPower && $util.isInteger(message.totalVotingPower.low) && $util.isInteger(message.totalVotingPower.high))) + return "totalVotingPower: integer|Long expected"; + return null; + }; + + /** + * Creates an Evidence message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.Evidence + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.Evidence} Evidence + */ + Evidence.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.Evidence) + return object; + let message = new $root.tendermint.abci.Evidence(); + switch (object.type) { + case "UNKNOWN": + case 0: + message.type = 0; + break; + case "DUPLICATE_VOTE": + case 1: + message.type = 1; + break; + case "LIGHT_CLIENT_ATTACK": + case 2: + message.type = 2; + break; + } + if (object.validator != null) { + if (typeof object.validator !== "object") + throw TypeError(".tendermint.abci.Evidence.validator: object expected"); + message.validator = $root.tendermint.abci.Validator.fromObject(object.validator); + } + if (object.height != null) + if ($util.Long) + (message.height = $util.Long.fromValue(object.height)).unsigned = false; + else if (typeof object.height === "string") + message.height = parseInt(object.height, 10); + else if (typeof object.height === "number") + message.height = object.height; + else if (typeof object.height === "object") + message.height = new $util.LongBits(object.height.low >>> 0, object.height.high >>> 0).toNumber(); + if (object.time != null) { + if (typeof object.time !== "object") + throw TypeError(".tendermint.abci.Evidence.time: object expected"); + message.time = $root.google.protobuf.Timestamp.fromObject(object.time); + } + if (object.totalVotingPower != null) + if ($util.Long) + (message.totalVotingPower = $util.Long.fromValue(object.totalVotingPower)).unsigned = false; + else if (typeof object.totalVotingPower === "string") + message.totalVotingPower = parseInt(object.totalVotingPower, 10); + else if (typeof object.totalVotingPower === "number") + message.totalVotingPower = object.totalVotingPower; + else if (typeof object.totalVotingPower === "object") + message.totalVotingPower = new $util.LongBits(object.totalVotingPower.low >>> 0, object.totalVotingPower.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from an Evidence message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.Evidence + * @static + * @param {tendermint.abci.Evidence} message Evidence + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Evidence.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.type = options.enums === String ? "UNKNOWN" : 0; + object.validator = null; + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.height = options.longs === String ? "0" : 0; + object.time = null; + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.totalVotingPower = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.totalVotingPower = options.longs === String ? "0" : 0; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.tendermint.abci.EvidenceType[message.type] : message.type; + if (message.validator != null && message.hasOwnProperty("validator")) + object.validator = $root.tendermint.abci.Validator.toObject(message.validator, options); + if (message.height != null && message.hasOwnProperty("height")) + if (typeof message.height === "number") + object.height = options.longs === String ? String(message.height) : message.height; + else + object.height = options.longs === String ? $util.Long.prototype.toString.call(message.height) : options.longs === Number ? new $util.LongBits(message.height.low >>> 0, message.height.high >>> 0).toNumber() : message.height; + if (message.time != null && message.hasOwnProperty("time")) + object.time = $root.google.protobuf.Timestamp.toObject(message.time, options); + if (message.totalVotingPower != null && message.hasOwnProperty("totalVotingPower")) + if (typeof message.totalVotingPower === "number") + object.totalVotingPower = options.longs === String ? String(message.totalVotingPower) : message.totalVotingPower; + else + object.totalVotingPower = options.longs === String ? $util.Long.prototype.toString.call(message.totalVotingPower) : options.longs === Number ? new $util.LongBits(message.totalVotingPower.low >>> 0, message.totalVotingPower.high >>> 0).toNumber() : message.totalVotingPower; + return object; + }; + + /** + * Converts this Evidence to JSON. + * @function toJSON + * @memberof tendermint.abci.Evidence + * @instance + * @returns {Object.} JSON object + */ + Evidence.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Evidence; + })(abci.Evidence || {}); + + abci.Snapshot = (function(Snapshot) { + + /** + * Properties of a Snapshot. + * @memberof tendermint.abci + * @interface ISnapshot + * @property {number|Long|null} [height] Snapshot height + * @property {number|null} [format] Snapshot format + * @property {number|null} [chunks] Snapshot chunks + * @property {Uint8Array|null} [hash] Snapshot hash + * @property {Uint8Array|null} [metadata] Snapshot metadata + */ + + /** + * Constructs a new Snapshot. + * @memberof tendermint.abci + * @classdesc Represents a Snapshot. + * @implements ISnapshot + * @constructor + * @param {tendermint.abci.ISnapshot=} [properties] Properties to set + */ + function Snapshot(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Snapshot height. + * @member {number|Long} height + * @memberof tendermint.abci.Snapshot + * @instance + */ + Snapshot.prototype.height = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Snapshot format. + * @member {number} format + * @memberof tendermint.abci.Snapshot + * @instance + */ + Snapshot.prototype.format = 0; + + /** + * Snapshot chunks. + * @member {number} chunks + * @memberof tendermint.abci.Snapshot + * @instance + */ + Snapshot.prototype.chunks = 0; + + /** + * Snapshot hash. + * @member {Uint8Array} hash + * @memberof tendermint.abci.Snapshot + * @instance + */ + Snapshot.prototype.hash = $util.newBuffer([]); + + /** + * Snapshot metadata. + * @member {Uint8Array} metadata + * @memberof tendermint.abci.Snapshot + * @instance + */ + Snapshot.prototype.metadata = $util.newBuffer([]); + + /** + * Creates a new Snapshot instance using the specified properties. + * @function create + * @memberof tendermint.abci.Snapshot + * @static + * @param {tendermint.abci.ISnapshot=} [properties] Properties to set + * @returns {tendermint.abci.Snapshot} Snapshot instance + */ + Snapshot.create = function create(properties) { + return new Snapshot(properties); + }; + + /** + * Encodes the specified Snapshot message. Does not implicitly {@link tendermint.abci.Snapshot.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.Snapshot + * @static + * @param {tendermint.abci.ISnapshot} message Snapshot message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Snapshot.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.height != null && Object.hasOwnProperty.call(message, "height")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.height); + if (message.format != null && Object.hasOwnProperty.call(message, "format")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.format); + if (message.chunks != null && Object.hasOwnProperty.call(message, "chunks")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.chunks); + if (message.hash != null && Object.hasOwnProperty.call(message, "hash")) + writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.hash); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.metadata); + return writer; + }; + + /** + * Encodes the specified Snapshot message, length delimited. Does not implicitly {@link tendermint.abci.Snapshot.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.Snapshot + * @static + * @param {tendermint.abci.ISnapshot} message Snapshot message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Snapshot.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Snapshot message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.Snapshot + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.Snapshot} Snapshot + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Snapshot.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.Snapshot(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.height = reader.uint64(); + break; + case 2: + message.format = reader.uint32(); + break; + case 3: + message.chunks = reader.uint32(); + break; + case 4: + message.hash = reader.bytes(); + break; + case 5: + message.metadata = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Snapshot message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.Snapshot + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.Snapshot} Snapshot + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Snapshot.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Snapshot message. + * @function verify + * @memberof tendermint.abci.Snapshot + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Snapshot.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.height != null && message.hasOwnProperty("height")) + if (!$util.isInteger(message.height) && !(message.height && $util.isInteger(message.height.low) && $util.isInteger(message.height.high))) + return "height: integer|Long expected"; + if (message.format != null && message.hasOwnProperty("format")) + if (!$util.isInteger(message.format)) + return "format: integer expected"; + if (message.chunks != null && message.hasOwnProperty("chunks")) + if (!$util.isInteger(message.chunks)) + return "chunks: integer expected"; + if (message.hash != null && message.hasOwnProperty("hash")) + if (!(message.hash && typeof message.hash.length === "number" || $util.isString(message.hash))) + return "hash: buffer expected"; + if (message.metadata != null && message.hasOwnProperty("metadata")) + if (!(message.metadata && typeof message.metadata.length === "number" || $util.isString(message.metadata))) + return "metadata: buffer expected"; + return null; + }; + + /** + * Creates a Snapshot message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.Snapshot + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.Snapshot} Snapshot + */ + Snapshot.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.Snapshot) + return object; + let message = new $root.tendermint.abci.Snapshot(); + if (object.height != null) + if ($util.Long) + (message.height = $util.Long.fromValue(object.height)).unsigned = true; + else if (typeof object.height === "string") + message.height = parseInt(object.height, 10); + else if (typeof object.height === "number") + message.height = object.height; + else if (typeof object.height === "object") + message.height = new $util.LongBits(object.height.low >>> 0, object.height.high >>> 0).toNumber(true); + if (object.format != null) + message.format = object.format >>> 0; + if (object.chunks != null) + message.chunks = object.chunks >>> 0; + if (object.hash != null) + if (typeof object.hash === "string") + $util.base64.decode(object.hash, message.hash = $util.newBuffer($util.base64.length(object.hash)), 0); + else if (object.hash.length) + message.hash = object.hash; + if (object.metadata != null) + if (typeof object.metadata === "string") + $util.base64.decode(object.metadata, message.metadata = $util.newBuffer($util.base64.length(object.metadata)), 0); + else if (object.metadata.length) + message.metadata = object.metadata; + return message; + }; + + /** + * Creates a plain object from a Snapshot message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.Snapshot + * @static + * @param {tendermint.abci.Snapshot} message Snapshot + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Snapshot.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.height = options.longs === String ? "0" : 0; + object.format = 0; + object.chunks = 0; + if (options.bytes === String) + object.hash = ""; + else { + object.hash = []; + if (options.bytes !== Array) + object.hash = $util.newBuffer(object.hash); + } + if (options.bytes === String) + object.metadata = ""; + else { + object.metadata = []; + if (options.bytes !== Array) + object.metadata = $util.newBuffer(object.metadata); + } + } + if (message.height != null && message.hasOwnProperty("height")) + if (typeof message.height === "number") + object.height = options.longs === String ? String(message.height) : message.height; + else + object.height = options.longs === String ? $util.Long.prototype.toString.call(message.height) : options.longs === Number ? new $util.LongBits(message.height.low >>> 0, message.height.high >>> 0).toNumber(true) : message.height; + if (message.format != null && message.hasOwnProperty("format")) + object.format = message.format; + if (message.chunks != null && message.hasOwnProperty("chunks")) + object.chunks = message.chunks; + if (message.hash != null && message.hasOwnProperty("hash")) + object.hash = options.bytes === String ? $util.base64.encode(message.hash, 0, message.hash.length) : options.bytes === Array ? Array.prototype.slice.call(message.hash) : message.hash; + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = options.bytes === String ? $util.base64.encode(message.metadata, 0, message.metadata.length) : options.bytes === Array ? Array.prototype.slice.call(message.metadata) : message.metadata; + return object; + }; + + /** + * Converts this Snapshot to JSON. + * @function toJSON + * @memberof tendermint.abci.Snapshot + * @instance + * @returns {Object.} JSON object + */ + Snapshot.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Snapshot; + })(abci.Snapshot || {}); + + abci.ABCIApplication = (function(ABCIApplication) { + + /** + * Constructs a new ABCIApplication service. + * @memberof tendermint.abci + * @classdesc Represents a ABCIApplication + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function ABCIApplication(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (ABCIApplication.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ABCIApplication; + + /** + * Creates new ABCIApplication service using the specified rpc implementation. + * @function create + * @memberof tendermint.abci.ABCIApplication + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {ABCIApplication} RPC service. Useful where requests and/or responses are streamed. + */ + ABCIApplication.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link tendermint.abci.ABCIApplication#echo}. + * @memberof tendermint.abci.ABCIApplication + * @typedef EchoCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {tendermint.abci.IResponseEcho} [response] ResponseEcho + */ + + /** + * Calls Echo. + * @function echo + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestEcho} request RequestEcho message or plain object + * @param {tendermint.abci.ABCIApplication.EchoCallback} callback Node-style callback called with the error, if any, and ResponseEcho + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ABCIApplication.prototype.echo = function echo(request, callback) { + return this.rpcCall(echo, $root.tendermint.abci.RequestEcho, $root.tendermint.abci.ResponseEcho, request, callback); + }, "name", { value: "Echo" }); + + /** + * Calls Echo. + * @function echo + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestEcho} request RequestEcho message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link tendermint.abci.ABCIApplication#flush}. + * @memberof tendermint.abci.ABCIApplication + * @typedef FlushCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {tendermint.abci.IResponseFlush} [response] ResponseFlush + */ + + /** + * Calls Flush. + * @function flush + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestFlush} request RequestFlush message or plain object + * @param {tendermint.abci.ABCIApplication.FlushCallback} callback Node-style callback called with the error, if any, and ResponseFlush + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ABCIApplication.prototype.flush = function flush(request, callback) { + return this.rpcCall(flush, $root.tendermint.abci.RequestFlush, $root.tendermint.abci.ResponseFlush, request, callback); + }, "name", { value: "Flush" }); + + /** + * Calls Flush. + * @function flush + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestFlush} request RequestFlush message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link tendermint.abci.ABCIApplication#info}. + * @memberof tendermint.abci.ABCIApplication + * @typedef InfoCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {tendermint.abci.IResponseInfo} [response] ResponseInfo + */ + + /** + * Calls Info. + * @function info + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestInfo} request RequestInfo message or plain object + * @param {tendermint.abci.ABCIApplication.InfoCallback} callback Node-style callback called with the error, if any, and ResponseInfo + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ABCIApplication.prototype.info = function info(request, callback) { + return this.rpcCall(info, $root.tendermint.abci.RequestInfo, $root.tendermint.abci.ResponseInfo, request, callback); + }, "name", { value: "Info" }); + + /** + * Calls Info. + * @function info + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestInfo} request RequestInfo message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link tendermint.abci.ABCIApplication#setOption}. + * @memberof tendermint.abci.ABCIApplication + * @typedef SetOptionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {tendermint.abci.IResponseSetOption} [response] ResponseSetOption + */ + + /** + * Calls SetOption. + * @function setOption + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestSetOption} request RequestSetOption message or plain object + * @param {tendermint.abci.ABCIApplication.SetOptionCallback} callback Node-style callback called with the error, if any, and ResponseSetOption + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ABCIApplication.prototype.setOption = function setOption(request, callback) { + return this.rpcCall(setOption, $root.tendermint.abci.RequestSetOption, $root.tendermint.abci.ResponseSetOption, request, callback); + }, "name", { value: "SetOption" }); + + /** + * Calls SetOption. + * @function setOption + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestSetOption} request RequestSetOption message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link tendermint.abci.ABCIApplication#deliverTx}. + * @memberof tendermint.abci.ABCIApplication + * @typedef DeliverTxCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {tendermint.abci.IResponseDeliverTx} [response] ResponseDeliverTx + */ + + /** + * Calls DeliverTx. + * @function deliverTx + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestDeliverTx} request RequestDeliverTx message or plain object + * @param {tendermint.abci.ABCIApplication.DeliverTxCallback} callback Node-style callback called with the error, if any, and ResponseDeliverTx + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ABCIApplication.prototype.deliverTx = function deliverTx(request, callback) { + return this.rpcCall(deliverTx, $root.tendermint.abci.RequestDeliverTx, $root.tendermint.abci.ResponseDeliverTx, request, callback); + }, "name", { value: "DeliverTx" }); + + /** + * Calls DeliverTx. + * @function deliverTx + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestDeliverTx} request RequestDeliverTx message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link tendermint.abci.ABCIApplication#checkTx}. + * @memberof tendermint.abci.ABCIApplication + * @typedef CheckTxCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {tendermint.abci.IResponseCheckTx} [response] ResponseCheckTx + */ + + /** + * Calls CheckTx. + * @function checkTx + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestCheckTx} request RequestCheckTx message or plain object + * @param {tendermint.abci.ABCIApplication.CheckTxCallback} callback Node-style callback called with the error, if any, and ResponseCheckTx + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ABCIApplication.prototype.checkTx = function checkTx(request, callback) { + return this.rpcCall(checkTx, $root.tendermint.abci.RequestCheckTx, $root.tendermint.abci.ResponseCheckTx, request, callback); + }, "name", { value: "CheckTx" }); + + /** + * Calls CheckTx. + * @function checkTx + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestCheckTx} request RequestCheckTx message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link tendermint.abci.ABCIApplication#query}. + * @memberof tendermint.abci.ABCIApplication + * @typedef QueryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {tendermint.abci.IResponseQuery} [response] ResponseQuery + */ + + /** + * Calls Query. + * @function query + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestQuery} request RequestQuery message or plain object + * @param {tendermint.abci.ABCIApplication.QueryCallback} callback Node-style callback called with the error, if any, and ResponseQuery + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ABCIApplication.prototype.query = function query(request, callback) { + return this.rpcCall(query, $root.tendermint.abci.RequestQuery, $root.tendermint.abci.ResponseQuery, request, callback); + }, "name", { value: "Query" }); + + /** + * Calls Query. + * @function query + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestQuery} request RequestQuery message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link tendermint.abci.ABCIApplication#commit}. + * @memberof tendermint.abci.ABCIApplication + * @typedef CommitCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {tendermint.abci.IResponseCommit} [response] ResponseCommit + */ + + /** + * Calls Commit. + * @function commit + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestCommit} request RequestCommit message or plain object + * @param {tendermint.abci.ABCIApplication.CommitCallback} callback Node-style callback called with the error, if any, and ResponseCommit + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ABCIApplication.prototype.commit = function commit(request, callback) { + return this.rpcCall(commit, $root.tendermint.abci.RequestCommit, $root.tendermint.abci.ResponseCommit, request, callback); + }, "name", { value: "Commit" }); + + /** + * Calls Commit. + * @function commit + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestCommit} request RequestCommit message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link tendermint.abci.ABCIApplication#initChain}. + * @memberof tendermint.abci.ABCIApplication + * @typedef InitChainCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {tendermint.abci.IResponseInitChain} [response] ResponseInitChain + */ + + /** + * Calls InitChain. + * @function initChain + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestInitChain} request RequestInitChain message or plain object + * @param {tendermint.abci.ABCIApplication.InitChainCallback} callback Node-style callback called with the error, if any, and ResponseInitChain + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ABCIApplication.prototype.initChain = function initChain(request, callback) { + return this.rpcCall(initChain, $root.tendermint.abci.RequestInitChain, $root.tendermint.abci.ResponseInitChain, request, callback); + }, "name", { value: "InitChain" }); + + /** + * Calls InitChain. + * @function initChain + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestInitChain} request RequestInitChain message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link tendermint.abci.ABCIApplication#beginBlock}. + * @memberof tendermint.abci.ABCIApplication + * @typedef BeginBlockCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {tendermint.abci.IResponseBeginBlock} [response] ResponseBeginBlock + */ + + /** + * Calls BeginBlock. + * @function beginBlock + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestBeginBlock} request RequestBeginBlock message or plain object + * @param {tendermint.abci.ABCIApplication.BeginBlockCallback} callback Node-style callback called with the error, if any, and ResponseBeginBlock + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ABCIApplication.prototype.beginBlock = function beginBlock(request, callback) { + return this.rpcCall(beginBlock, $root.tendermint.abci.RequestBeginBlock, $root.tendermint.abci.ResponseBeginBlock, request, callback); + }, "name", { value: "BeginBlock" }); + + /** + * Calls BeginBlock. + * @function beginBlock + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestBeginBlock} request RequestBeginBlock message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link tendermint.abci.ABCIApplication#endBlock}. + * @memberof tendermint.abci.ABCIApplication + * @typedef EndBlockCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {tendermint.abci.IResponseEndBlock} [response] ResponseEndBlock + */ + + /** + * Calls EndBlock. + * @function endBlock + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestEndBlock} request RequestEndBlock message or plain object + * @param {tendermint.abci.ABCIApplication.EndBlockCallback} callback Node-style callback called with the error, if any, and ResponseEndBlock + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ABCIApplication.prototype.endBlock = function endBlock(request, callback) { + return this.rpcCall(endBlock, $root.tendermint.abci.RequestEndBlock, $root.tendermint.abci.ResponseEndBlock, request, callback); + }, "name", { value: "EndBlock" }); + + /** + * Calls EndBlock. + * @function endBlock + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestEndBlock} request RequestEndBlock message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link tendermint.abci.ABCIApplication#listSnapshots}. + * @memberof tendermint.abci.ABCIApplication + * @typedef ListSnapshotsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {tendermint.abci.IResponseListSnapshots} [response] ResponseListSnapshots + */ + + /** + * Calls ListSnapshots. + * @function listSnapshots + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestListSnapshots} request RequestListSnapshots message or plain object + * @param {tendermint.abci.ABCIApplication.ListSnapshotsCallback} callback Node-style callback called with the error, if any, and ResponseListSnapshots + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ABCIApplication.prototype.listSnapshots = function listSnapshots(request, callback) { + return this.rpcCall(listSnapshots, $root.tendermint.abci.RequestListSnapshots, $root.tendermint.abci.ResponseListSnapshots, request, callback); + }, "name", { value: "ListSnapshots" }); + + /** + * Calls ListSnapshots. + * @function listSnapshots + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestListSnapshots} request RequestListSnapshots message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link tendermint.abci.ABCIApplication#offerSnapshot}. + * @memberof tendermint.abci.ABCIApplication + * @typedef OfferSnapshotCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {tendermint.abci.IResponseOfferSnapshot} [response] ResponseOfferSnapshot + */ + + /** + * Calls OfferSnapshot. + * @function offerSnapshot + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestOfferSnapshot} request RequestOfferSnapshot message or plain object + * @param {tendermint.abci.ABCIApplication.OfferSnapshotCallback} callback Node-style callback called with the error, if any, and ResponseOfferSnapshot + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ABCIApplication.prototype.offerSnapshot = function offerSnapshot(request, callback) { + return this.rpcCall(offerSnapshot, $root.tendermint.abci.RequestOfferSnapshot, $root.tendermint.abci.ResponseOfferSnapshot, request, callback); + }, "name", { value: "OfferSnapshot" }); + + /** + * Calls OfferSnapshot. + * @function offerSnapshot + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestOfferSnapshot} request RequestOfferSnapshot message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link tendermint.abci.ABCIApplication#loadSnapshotChunk}. + * @memberof tendermint.abci.ABCIApplication + * @typedef LoadSnapshotChunkCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {tendermint.abci.IResponseLoadSnapshotChunk} [response] ResponseLoadSnapshotChunk + */ + + /** + * Calls LoadSnapshotChunk. + * @function loadSnapshotChunk + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestLoadSnapshotChunk} request RequestLoadSnapshotChunk message or plain object + * @param {tendermint.abci.ABCIApplication.LoadSnapshotChunkCallback} callback Node-style callback called with the error, if any, and ResponseLoadSnapshotChunk + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ABCIApplication.prototype.loadSnapshotChunk = function loadSnapshotChunk(request, callback) { + return this.rpcCall(loadSnapshotChunk, $root.tendermint.abci.RequestLoadSnapshotChunk, $root.tendermint.abci.ResponseLoadSnapshotChunk, request, callback); + }, "name", { value: "LoadSnapshotChunk" }); + + /** + * Calls LoadSnapshotChunk. + * @function loadSnapshotChunk + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestLoadSnapshotChunk} request RequestLoadSnapshotChunk message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link tendermint.abci.ABCIApplication#applySnapshotChunk}. + * @memberof tendermint.abci.ABCIApplication + * @typedef ApplySnapshotChunkCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {tendermint.abci.IResponseApplySnapshotChunk} [response] ResponseApplySnapshotChunk + */ + + /** + * Calls ApplySnapshotChunk. + * @function applySnapshotChunk + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestApplySnapshotChunk} request RequestApplySnapshotChunk message or plain object + * @param {tendermint.abci.ABCIApplication.ApplySnapshotChunkCallback} callback Node-style callback called with the error, if any, and ResponseApplySnapshotChunk + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ABCIApplication.prototype.applySnapshotChunk = function applySnapshotChunk(request, callback) { + return this.rpcCall(applySnapshotChunk, $root.tendermint.abci.RequestApplySnapshotChunk, $root.tendermint.abci.ResponseApplySnapshotChunk, request, callback); + }, "name", { value: "ApplySnapshotChunk" }); + + /** + * Calls ApplySnapshotChunk. + * @function applySnapshotChunk + * @memberof tendermint.abci.ABCIApplication + * @instance + * @param {tendermint.abci.IRequestApplySnapshotChunk} request RequestApplySnapshotChunk message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return ABCIApplication; + })(abci.ABCIApplication || {}); + + return abci; + })(tendermint.abci || {}); + + /** + * Namespace crypto. + * @memberof tendermint + * @namespace + */ + + tendermint.crypto = (function(crypto) { + + crypto.PublicKey = (function(PublicKey) { + + /** + * Properties of a PublicKey. + * @memberof tendermint.crypto + * @interface IPublicKey + * @property {Uint8Array|null} [ed25519] PublicKey ed25519 + * @property {Uint8Array|null} [secp256k1] PublicKey secp256k1 + */ + + /** + * Constructs a new PublicKey. + * @memberof tendermint.crypto + * @classdesc Represents a PublicKey. + * @implements IPublicKey + * @constructor + * @param {tendermint.crypto.IPublicKey=} [properties] Properties to set + */ + function PublicKey(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PublicKey ed25519. + * @member {Uint8Array} ed25519 + * @memberof tendermint.crypto.PublicKey + * @instance + */ + PublicKey.prototype.ed25519 = $util.newBuffer([]); + + /** + * PublicKey secp256k1. + * @member {Uint8Array} secp256k1 + * @memberof tendermint.crypto.PublicKey + * @instance + */ + PublicKey.prototype.secp256k1 = $util.newBuffer([]); + + // OneOf field names bound to virtual getters and setters + let $oneOfFields; + + /** + * PublicKey sum. + * @member {"ed25519"|"secp256k1"|undefined} sum + * @memberof tendermint.crypto.PublicKey + * @instance + */ + Object.defineProperty(PublicKey.prototype, "sum", { + get: $util.oneOfGetter($oneOfFields = ["ed25519", "secp256k1"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new PublicKey instance using the specified properties. + * @function create + * @memberof tendermint.crypto.PublicKey + * @static + * @param {tendermint.crypto.IPublicKey=} [properties] Properties to set + * @returns {tendermint.crypto.PublicKey} PublicKey instance + */ + PublicKey.create = function create(properties) { + return new PublicKey(properties); + }; + + /** + * Encodes the specified PublicKey message. Does not implicitly {@link tendermint.crypto.PublicKey.verify|verify} messages. + * @function encode + * @memberof tendermint.crypto.PublicKey + * @static + * @param {tendermint.crypto.IPublicKey} message PublicKey message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PublicKey.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ed25519 != null && Object.hasOwnProperty.call(message, "ed25519")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.ed25519); + if (message.secp256k1 != null && Object.hasOwnProperty.call(message, "secp256k1")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.secp256k1); + return writer; + }; + + /** + * Encodes the specified PublicKey message, length delimited. Does not implicitly {@link tendermint.crypto.PublicKey.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.crypto.PublicKey + * @static + * @param {tendermint.crypto.IPublicKey} message PublicKey message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PublicKey.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PublicKey message from the specified reader or buffer. + * @function decode + * @memberof tendermint.crypto.PublicKey + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.crypto.PublicKey} PublicKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PublicKey.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.crypto.PublicKey(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.ed25519 = reader.bytes(); + break; + case 2: + message.secp256k1 = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PublicKey message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.crypto.PublicKey + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.crypto.PublicKey} PublicKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PublicKey.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PublicKey message. + * @function verify + * @memberof tendermint.crypto.PublicKey + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PublicKey.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + let properties = {}; + if (message.ed25519 != null && message.hasOwnProperty("ed25519")) { + properties.sum = 1; + if (!(message.ed25519 && typeof message.ed25519.length === "number" || $util.isString(message.ed25519))) + return "ed25519: buffer expected"; + } + if (message.secp256k1 != null && message.hasOwnProperty("secp256k1")) { + if (properties.sum === 1) + return "sum: multiple values"; + properties.sum = 1; + if (!(message.secp256k1 && typeof message.secp256k1.length === "number" || $util.isString(message.secp256k1))) + return "secp256k1: buffer expected"; + } + return null; + }; + + /** + * Creates a PublicKey message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.crypto.PublicKey + * @static + * @param {Object.} object Plain object + * @returns {tendermint.crypto.PublicKey} PublicKey + */ + PublicKey.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.crypto.PublicKey) + return object; + let message = new $root.tendermint.crypto.PublicKey(); + if (object.ed25519 != null) + if (typeof object.ed25519 === "string") + $util.base64.decode(object.ed25519, message.ed25519 = $util.newBuffer($util.base64.length(object.ed25519)), 0); + else if (object.ed25519.length) + message.ed25519 = object.ed25519; + if (object.secp256k1 != null) + if (typeof object.secp256k1 === "string") + $util.base64.decode(object.secp256k1, message.secp256k1 = $util.newBuffer($util.base64.length(object.secp256k1)), 0); + else if (object.secp256k1.length) + message.secp256k1 = object.secp256k1; + return message; + }; + + /** + * Creates a plain object from a PublicKey message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.crypto.PublicKey + * @static + * @param {tendermint.crypto.PublicKey} message PublicKey + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PublicKey.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (message.ed25519 != null && message.hasOwnProperty("ed25519")) { + object.ed25519 = options.bytes === String ? $util.base64.encode(message.ed25519, 0, message.ed25519.length) : options.bytes === Array ? Array.prototype.slice.call(message.ed25519) : message.ed25519; + if (options.oneofs) + object.sum = "ed25519"; + } + if (message.secp256k1 != null && message.hasOwnProperty("secp256k1")) { + object.secp256k1 = options.bytes === String ? $util.base64.encode(message.secp256k1, 0, message.secp256k1.length) : options.bytes === Array ? Array.prototype.slice.call(message.secp256k1) : message.secp256k1; + if (options.oneofs) + object.sum = "secp256k1"; + } + return object; + }; + + /** + * Converts this PublicKey to JSON. + * @function toJSON + * @memberof tendermint.crypto.PublicKey + * @instance + * @returns {Object.} JSON object + */ + PublicKey.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PublicKey; + })(crypto.PublicKey || {}); + + crypto.Proof = (function(Proof) { + + /** + * Properties of a Proof. + * @memberof tendermint.crypto + * @interface IProof + * @property {number|Long|null} [total] Proof total + * @property {number|Long|null} [index] Proof index + * @property {Uint8Array|null} [leafHash] Proof leafHash + * @property {Array.|null} [aunts] Proof aunts + */ + + /** + * Constructs a new Proof. + * @memberof tendermint.crypto + * @classdesc Represents a Proof. + * @implements IProof + * @constructor + * @param {tendermint.crypto.IProof=} [properties] Properties to set + */ + function Proof(properties) { + this.aunts = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Proof total. + * @member {number|Long} total + * @memberof tendermint.crypto.Proof + * @instance + */ + Proof.prototype.total = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Proof index. + * @member {number|Long} index + * @memberof tendermint.crypto.Proof + * @instance + */ + Proof.prototype.index = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Proof leafHash. + * @member {Uint8Array} leafHash + * @memberof tendermint.crypto.Proof + * @instance + */ + Proof.prototype.leafHash = $util.newBuffer([]); + + /** + * Proof aunts. + * @member {Array.} aunts + * @memberof tendermint.crypto.Proof + * @instance + */ + Proof.prototype.aunts = $util.emptyArray; + + /** + * Creates a new Proof instance using the specified properties. + * @function create + * @memberof tendermint.crypto.Proof + * @static + * @param {tendermint.crypto.IProof=} [properties] Properties to set + * @returns {tendermint.crypto.Proof} Proof instance + */ + Proof.create = function create(properties) { + return new Proof(properties); + }; + + /** + * Encodes the specified Proof message. Does not implicitly {@link tendermint.crypto.Proof.verify|verify} messages. + * @function encode + * @memberof tendermint.crypto.Proof + * @static + * @param {tendermint.crypto.IProof} message Proof message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Proof.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.total != null && Object.hasOwnProperty.call(message, "total")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.total); + if (message.index != null && Object.hasOwnProperty.call(message, "index")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.index); + if (message.leafHash != null && Object.hasOwnProperty.call(message, "leafHash")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.leafHash); + if (message.aunts != null && message.aunts.length) + for (let i = 0; i < message.aunts.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.aunts[i]); + return writer; + }; + + /** + * Encodes the specified Proof message, length delimited. Does not implicitly {@link tendermint.crypto.Proof.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.crypto.Proof + * @static + * @param {tendermint.crypto.IProof} message Proof message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Proof.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Proof message from the specified reader or buffer. + * @function decode + * @memberof tendermint.crypto.Proof + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.crypto.Proof} Proof + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Proof.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.crypto.Proof(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.total = reader.int64(); + break; + case 2: + message.index = reader.int64(); + break; + case 3: + message.leafHash = reader.bytes(); + break; + case 4: + if (!(message.aunts && message.aunts.length)) + message.aunts = []; + message.aunts.push(reader.bytes()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Proof message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.crypto.Proof + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.crypto.Proof} Proof + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Proof.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Proof message. + * @function verify + * @memberof tendermint.crypto.Proof + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Proof.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.total != null && message.hasOwnProperty("total")) + if (!$util.isInteger(message.total) && !(message.total && $util.isInteger(message.total.low) && $util.isInteger(message.total.high))) + return "total: integer|Long expected"; + if (message.index != null && message.hasOwnProperty("index")) + if (!$util.isInteger(message.index) && !(message.index && $util.isInteger(message.index.low) && $util.isInteger(message.index.high))) + return "index: integer|Long expected"; + if (message.leafHash != null && message.hasOwnProperty("leafHash")) + if (!(message.leafHash && typeof message.leafHash.length === "number" || $util.isString(message.leafHash))) + return "leafHash: buffer expected"; + if (message.aunts != null && message.hasOwnProperty("aunts")) { + if (!Array.isArray(message.aunts)) + return "aunts: array expected"; + for (let i = 0; i < message.aunts.length; ++i) + if (!(message.aunts[i] && typeof message.aunts[i].length === "number" || $util.isString(message.aunts[i]))) + return "aunts: buffer[] expected"; + } + return null; + }; + + /** + * Creates a Proof message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.crypto.Proof + * @static + * @param {Object.} object Plain object + * @returns {tendermint.crypto.Proof} Proof + */ + Proof.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.crypto.Proof) + return object; + let message = new $root.tendermint.crypto.Proof(); + if (object.total != null) + if ($util.Long) + (message.total = $util.Long.fromValue(object.total)).unsigned = false; + else if (typeof object.total === "string") + message.total = parseInt(object.total, 10); + else if (typeof object.total === "number") + message.total = object.total; + else if (typeof object.total === "object") + message.total = new $util.LongBits(object.total.low >>> 0, object.total.high >>> 0).toNumber(); + if (object.index != null) + if ($util.Long) + (message.index = $util.Long.fromValue(object.index)).unsigned = false; + else if (typeof object.index === "string") + message.index = parseInt(object.index, 10); + else if (typeof object.index === "number") + message.index = object.index; + else if (typeof object.index === "object") + message.index = new $util.LongBits(object.index.low >>> 0, object.index.high >>> 0).toNumber(); + if (object.leafHash != null) + if (typeof object.leafHash === "string") + $util.base64.decode(object.leafHash, message.leafHash = $util.newBuffer($util.base64.length(object.leafHash)), 0); + else if (object.leafHash.length) + message.leafHash = object.leafHash; + if (object.aunts) { + if (!Array.isArray(object.aunts)) + throw TypeError(".tendermint.crypto.Proof.aunts: array expected"); + message.aunts = []; + for (let i = 0; i < object.aunts.length; ++i) + if (typeof object.aunts[i] === "string") + $util.base64.decode(object.aunts[i], message.aunts[i] = $util.newBuffer($util.base64.length(object.aunts[i])), 0); + else if (object.aunts[i].length) + message.aunts[i] = object.aunts[i]; + } + return message; + }; + + /** + * Creates a plain object from a Proof message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.crypto.Proof + * @static + * @param {tendermint.crypto.Proof} message Proof + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Proof.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.aunts = []; + if (options.defaults) { + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.total = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.total = options.longs === String ? "0" : 0; + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.index = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.index = options.longs === String ? "0" : 0; + if (options.bytes === String) + object.leafHash = ""; + else { + object.leafHash = []; + if (options.bytes !== Array) + object.leafHash = $util.newBuffer(object.leafHash); + } + } + if (message.total != null && message.hasOwnProperty("total")) + if (typeof message.total === "number") + object.total = options.longs === String ? String(message.total) : message.total; + else + object.total = options.longs === String ? $util.Long.prototype.toString.call(message.total) : options.longs === Number ? new $util.LongBits(message.total.low >>> 0, message.total.high >>> 0).toNumber() : message.total; + if (message.index != null && message.hasOwnProperty("index")) + if (typeof message.index === "number") + object.index = options.longs === String ? String(message.index) : message.index; + else + object.index = options.longs === String ? $util.Long.prototype.toString.call(message.index) : options.longs === Number ? new $util.LongBits(message.index.low >>> 0, message.index.high >>> 0).toNumber() : message.index; + if (message.leafHash != null && message.hasOwnProperty("leafHash")) + object.leafHash = options.bytes === String ? $util.base64.encode(message.leafHash, 0, message.leafHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.leafHash) : message.leafHash; + if (message.aunts && message.aunts.length) { + object.aunts = []; + for (let j = 0; j < message.aunts.length; ++j) + object.aunts[j] = options.bytes === String ? $util.base64.encode(message.aunts[j], 0, message.aunts[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.aunts[j]) : message.aunts[j]; + } + return object; + }; + + /** + * Converts this Proof to JSON. + * @function toJSON + * @memberof tendermint.crypto.Proof + * @instance + * @returns {Object.} JSON object + */ + Proof.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Proof; + })(crypto.Proof || {}); + + crypto.ValueOp = (function(ValueOp) { + + /** + * Properties of a ValueOp. + * @memberof tendermint.crypto + * @interface IValueOp + * @property {Uint8Array|null} [key] ValueOp key + * @property {tendermint.crypto.IProof|null} [proof] ValueOp proof + */ + + /** + * Constructs a new ValueOp. + * @memberof tendermint.crypto + * @classdesc Represents a ValueOp. + * @implements IValueOp + * @constructor + * @param {tendermint.crypto.IValueOp=} [properties] Properties to set + */ + function ValueOp(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ValueOp key. + * @member {Uint8Array} key + * @memberof tendermint.crypto.ValueOp + * @instance + */ + ValueOp.prototype.key = $util.newBuffer([]); + + /** + * ValueOp proof. + * @member {tendermint.crypto.IProof|null|undefined} proof + * @memberof tendermint.crypto.ValueOp + * @instance + */ + ValueOp.prototype.proof = null; + + /** + * Creates a new ValueOp instance using the specified properties. + * @function create + * @memberof tendermint.crypto.ValueOp + * @static + * @param {tendermint.crypto.IValueOp=} [properties] Properties to set + * @returns {tendermint.crypto.ValueOp} ValueOp instance + */ + ValueOp.create = function create(properties) { + return new ValueOp(properties); + }; + + /** + * Encodes the specified ValueOp message. Does not implicitly {@link tendermint.crypto.ValueOp.verify|verify} messages. + * @function encode + * @memberof tendermint.crypto.ValueOp + * @static + * @param {tendermint.crypto.IValueOp} message ValueOp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValueOp.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.key); + if (message.proof != null && Object.hasOwnProperty.call(message, "proof")) + $root.tendermint.crypto.Proof.encode(message.proof, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ValueOp message, length delimited. Does not implicitly {@link tendermint.crypto.ValueOp.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.crypto.ValueOp + * @static + * @param {tendermint.crypto.IValueOp} message ValueOp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValueOp.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ValueOp message from the specified reader or buffer. + * @function decode + * @memberof tendermint.crypto.ValueOp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.crypto.ValueOp} ValueOp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValueOp.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.crypto.ValueOp(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.key = reader.bytes(); + break; + case 2: + message.proof = $root.tendermint.crypto.Proof.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ValueOp message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.crypto.ValueOp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.crypto.ValueOp} ValueOp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValueOp.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ValueOp message. + * @function verify + * @memberof tendermint.crypto.ValueOp + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ValueOp.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.key != null && message.hasOwnProperty("key")) + if (!(message.key && typeof message.key.length === "number" || $util.isString(message.key))) + return "key: buffer expected"; + if (message.proof != null && message.hasOwnProperty("proof")) { + let error = $root.tendermint.crypto.Proof.verify(message.proof); + if (error) + return "proof." + error; + } + return null; + }; + + /** + * Creates a ValueOp message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.crypto.ValueOp + * @static + * @param {Object.} object Plain object + * @returns {tendermint.crypto.ValueOp} ValueOp + */ + ValueOp.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.crypto.ValueOp) + return object; + let message = new $root.tendermint.crypto.ValueOp(); + if (object.key != null) + if (typeof object.key === "string") + $util.base64.decode(object.key, message.key = $util.newBuffer($util.base64.length(object.key)), 0); + else if (object.key.length) + message.key = object.key; + if (object.proof != null) { + if (typeof object.proof !== "object") + throw TypeError(".tendermint.crypto.ValueOp.proof: object expected"); + message.proof = $root.tendermint.crypto.Proof.fromObject(object.proof); + } + return message; + }; + + /** + * Creates a plain object from a ValueOp message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.crypto.ValueOp + * @static + * @param {tendermint.crypto.ValueOp} message ValueOp + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ValueOp.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + if (options.bytes === String) + object.key = ""; + else { + object.key = []; + if (options.bytes !== Array) + object.key = $util.newBuffer(object.key); + } + object.proof = null; + } + if (message.key != null && message.hasOwnProperty("key")) + object.key = options.bytes === String ? $util.base64.encode(message.key, 0, message.key.length) : options.bytes === Array ? Array.prototype.slice.call(message.key) : message.key; + if (message.proof != null && message.hasOwnProperty("proof")) + object.proof = $root.tendermint.crypto.Proof.toObject(message.proof, options); + return object; + }; + + /** + * Converts this ValueOp to JSON. + * @function toJSON + * @memberof tendermint.crypto.ValueOp + * @instance + * @returns {Object.} JSON object + */ + ValueOp.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ValueOp; + })(crypto.ValueOp || {}); + + crypto.DominoOp = (function(DominoOp) { + + /** + * Properties of a DominoOp. + * @memberof tendermint.crypto + * @interface IDominoOp + * @property {string|null} [key] DominoOp key + * @property {string|null} [input] DominoOp input + * @property {string|null} [output] DominoOp output + */ + + /** + * Constructs a new DominoOp. + * @memberof tendermint.crypto + * @classdesc Represents a DominoOp. + * @implements IDominoOp + * @constructor + * @param {tendermint.crypto.IDominoOp=} [properties] Properties to set + */ + function DominoOp(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DominoOp key. + * @member {string} key + * @memberof tendermint.crypto.DominoOp + * @instance + */ + DominoOp.prototype.key = ""; + + /** + * DominoOp input. + * @member {string} input + * @memberof tendermint.crypto.DominoOp + * @instance + */ + DominoOp.prototype.input = ""; + + /** + * DominoOp output. + * @member {string} output + * @memberof tendermint.crypto.DominoOp + * @instance + */ + DominoOp.prototype.output = ""; + + /** + * Creates a new DominoOp instance using the specified properties. + * @function create + * @memberof tendermint.crypto.DominoOp + * @static + * @param {tendermint.crypto.IDominoOp=} [properties] Properties to set + * @returns {tendermint.crypto.DominoOp} DominoOp instance + */ + DominoOp.create = function create(properties) { + return new DominoOp(properties); + }; + + /** + * Encodes the specified DominoOp message. Does not implicitly {@link tendermint.crypto.DominoOp.verify|verify} messages. + * @function encode + * @memberof tendermint.crypto.DominoOp + * @static + * @param {tendermint.crypto.IDominoOp} message DominoOp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DominoOp.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); + if (message.input != null && Object.hasOwnProperty.call(message, "input")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.input); + if (message.output != null && Object.hasOwnProperty.call(message, "output")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.output); + return writer; + }; + + /** + * Encodes the specified DominoOp message, length delimited. Does not implicitly {@link tendermint.crypto.DominoOp.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.crypto.DominoOp + * @static + * @param {tendermint.crypto.IDominoOp} message DominoOp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DominoOp.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DominoOp message from the specified reader or buffer. + * @function decode + * @memberof tendermint.crypto.DominoOp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.crypto.DominoOp} DominoOp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DominoOp.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.crypto.DominoOp(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.key = reader.string(); + break; + case 2: + message.input = reader.string(); + break; + case 3: + message.output = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DominoOp message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.crypto.DominoOp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.crypto.DominoOp} DominoOp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DominoOp.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DominoOp message. + * @function verify + * @memberof tendermint.crypto.DominoOp + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DominoOp.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.key != null && message.hasOwnProperty("key")) + if (!$util.isString(message.key)) + return "key: string expected"; + if (message.input != null && message.hasOwnProperty("input")) + if (!$util.isString(message.input)) + return "input: string expected"; + if (message.output != null && message.hasOwnProperty("output")) + if (!$util.isString(message.output)) + return "output: string expected"; + return null; + }; + + /** + * Creates a DominoOp message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.crypto.DominoOp + * @static + * @param {Object.} object Plain object + * @returns {tendermint.crypto.DominoOp} DominoOp + */ + DominoOp.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.crypto.DominoOp) + return object; + let message = new $root.tendermint.crypto.DominoOp(); + if (object.key != null) + message.key = String(object.key); + if (object.input != null) + message.input = String(object.input); + if (object.output != null) + message.output = String(object.output); + return message; + }; + + /** + * Creates a plain object from a DominoOp message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.crypto.DominoOp + * @static + * @param {tendermint.crypto.DominoOp} message DominoOp + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DominoOp.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.key = ""; + object.input = ""; + object.output = ""; + } + if (message.key != null && message.hasOwnProperty("key")) + object.key = message.key; + if (message.input != null && message.hasOwnProperty("input")) + object.input = message.input; + if (message.output != null && message.hasOwnProperty("output")) + object.output = message.output; + return object; + }; + + /** + * Converts this DominoOp to JSON. + * @function toJSON + * @memberof tendermint.crypto.DominoOp + * @instance + * @returns {Object.} JSON object + */ + DominoOp.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DominoOp; + })(crypto.DominoOp || {}); + + crypto.ProofOp = (function(ProofOp) { + + /** + * Properties of a ProofOp. + * @memberof tendermint.crypto + * @interface IProofOp + * @property {string|null} [type] ProofOp type + * @property {Uint8Array|null} [key] ProofOp key + * @property {Uint8Array|null} [data] ProofOp data + */ + + /** + * Constructs a new ProofOp. + * @memberof tendermint.crypto + * @classdesc Represents a ProofOp. + * @implements IProofOp + * @constructor + * @param {tendermint.crypto.IProofOp=} [properties] Properties to set + */ + function ProofOp(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ProofOp type. + * @member {string} type + * @memberof tendermint.crypto.ProofOp + * @instance + */ + ProofOp.prototype.type = ""; + + /** + * ProofOp key. + * @member {Uint8Array} key + * @memberof tendermint.crypto.ProofOp + * @instance + */ + ProofOp.prototype.key = $util.newBuffer([]); + + /** + * ProofOp data. + * @member {Uint8Array} data + * @memberof tendermint.crypto.ProofOp + * @instance + */ + ProofOp.prototype.data = $util.newBuffer([]); + + /** + * Creates a new ProofOp instance using the specified properties. + * @function create + * @memberof tendermint.crypto.ProofOp + * @static + * @param {tendermint.crypto.IProofOp=} [properties] Properties to set + * @returns {tendermint.crypto.ProofOp} ProofOp instance + */ + ProofOp.create = function create(properties) { + return new ProofOp(properties); + }; + + /** + * Encodes the specified ProofOp message. Does not implicitly {@link tendermint.crypto.ProofOp.verify|verify} messages. + * @function encode + * @memberof tendermint.crypto.ProofOp + * @static + * @param {tendermint.crypto.IProofOp} message ProofOp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProofOp.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.key); + if (message.data != null && Object.hasOwnProperty.call(message, "data")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.data); + return writer; + }; + + /** + * Encodes the specified ProofOp message, length delimited. Does not implicitly {@link tendermint.crypto.ProofOp.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.crypto.ProofOp + * @static + * @param {tendermint.crypto.IProofOp} message ProofOp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProofOp.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ProofOp message from the specified reader or buffer. + * @function decode + * @memberof tendermint.crypto.ProofOp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.crypto.ProofOp} ProofOp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProofOp.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.crypto.ProofOp(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type = reader.string(); + break; + case 2: + message.key = reader.bytes(); + break; + case 3: + message.data = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ProofOp message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.crypto.ProofOp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.crypto.ProofOp} ProofOp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProofOp.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ProofOp message. + * @function verify + * @memberof tendermint.crypto.ProofOp + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ProofOp.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.key != null && message.hasOwnProperty("key")) + if (!(message.key && typeof message.key.length === "number" || $util.isString(message.key))) + return "key: buffer expected"; + if (message.data != null && message.hasOwnProperty("data")) + if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) + return "data: buffer expected"; + return null; + }; + + /** + * Creates a ProofOp message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.crypto.ProofOp + * @static + * @param {Object.} object Plain object + * @returns {tendermint.crypto.ProofOp} ProofOp + */ + ProofOp.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.crypto.ProofOp) + return object; + let message = new $root.tendermint.crypto.ProofOp(); + if (object.type != null) + message.type = String(object.type); + if (object.key != null) + if (typeof object.key === "string") + $util.base64.decode(object.key, message.key = $util.newBuffer($util.base64.length(object.key)), 0); + else if (object.key.length) + message.key = object.key; + if (object.data != null) + if (typeof object.data === "string") + $util.base64.decode(object.data, message.data = $util.newBuffer($util.base64.length(object.data)), 0); + else if (object.data.length) + message.data = object.data; + return message; + }; + + /** + * Creates a plain object from a ProofOp message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.crypto.ProofOp + * @static + * @param {tendermint.crypto.ProofOp} message ProofOp + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ProofOp.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.type = ""; + if (options.bytes === String) + object.key = ""; + else { + object.key = []; + if (options.bytes !== Array) + object.key = $util.newBuffer(object.key); + } + if (options.bytes === String) + object.data = ""; + else { + object.data = []; + if (options.bytes !== Array) + object.data = $util.newBuffer(object.data); + } + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.key != null && message.hasOwnProperty("key")) + object.key = options.bytes === String ? $util.base64.encode(message.key, 0, message.key.length) : options.bytes === Array ? Array.prototype.slice.call(message.key) : message.key; + if (message.data != null && message.hasOwnProperty("data")) + object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; + return object; + }; + + /** + * Converts this ProofOp to JSON. + * @function toJSON + * @memberof tendermint.crypto.ProofOp + * @instance + * @returns {Object.} JSON object + */ + ProofOp.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ProofOp; + })(crypto.ProofOp || {}); + + crypto.ProofOps = (function(ProofOps) { + + /** + * Properties of a ProofOps. + * @memberof tendermint.crypto + * @interface IProofOps + * @property {Array.|null} [ops] ProofOps ops + */ + + /** + * Constructs a new ProofOps. + * @memberof tendermint.crypto + * @classdesc Represents a ProofOps. + * @implements IProofOps + * @constructor + * @param {tendermint.crypto.IProofOps=} [properties] Properties to set + */ + function ProofOps(properties) { + this.ops = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ProofOps ops. + * @member {Array.} ops + * @memberof tendermint.crypto.ProofOps + * @instance + */ + ProofOps.prototype.ops = $util.emptyArray; + + /** + * Creates a new ProofOps instance using the specified properties. + * @function create + * @memberof tendermint.crypto.ProofOps + * @static + * @param {tendermint.crypto.IProofOps=} [properties] Properties to set + * @returns {tendermint.crypto.ProofOps} ProofOps instance + */ + ProofOps.create = function create(properties) { + return new ProofOps(properties); + }; + + /** + * Encodes the specified ProofOps message. Does not implicitly {@link tendermint.crypto.ProofOps.verify|verify} messages. + * @function encode + * @memberof tendermint.crypto.ProofOps + * @static + * @param {tendermint.crypto.IProofOps} message ProofOps message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProofOps.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ops != null && message.ops.length) + for (let i = 0; i < message.ops.length; ++i) + $root.tendermint.crypto.ProofOp.encode(message.ops[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ProofOps message, length delimited. Does not implicitly {@link tendermint.crypto.ProofOps.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.crypto.ProofOps + * @static + * @param {tendermint.crypto.IProofOps} message ProofOps message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProofOps.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ProofOps message from the specified reader or buffer. + * @function decode + * @memberof tendermint.crypto.ProofOps + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.crypto.ProofOps} ProofOps + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProofOps.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.crypto.ProofOps(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.ops && message.ops.length)) + message.ops = []; + message.ops.push($root.tendermint.crypto.ProofOp.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ProofOps message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.crypto.ProofOps + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.crypto.ProofOps} ProofOps + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProofOps.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ProofOps message. + * @function verify + * @memberof tendermint.crypto.ProofOps + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ProofOps.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.ops != null && message.hasOwnProperty("ops")) { + if (!Array.isArray(message.ops)) + return "ops: array expected"; + for (let i = 0; i < message.ops.length; ++i) { + let error = $root.tendermint.crypto.ProofOp.verify(message.ops[i]); + if (error) + return "ops." + error; + } + } + return null; + }; + + /** + * Creates a ProofOps message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.crypto.ProofOps + * @static + * @param {Object.} object Plain object + * @returns {tendermint.crypto.ProofOps} ProofOps + */ + ProofOps.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.crypto.ProofOps) + return object; + let message = new $root.tendermint.crypto.ProofOps(); + if (object.ops) { + if (!Array.isArray(object.ops)) + throw TypeError(".tendermint.crypto.ProofOps.ops: array expected"); + message.ops = []; + for (let i = 0; i < object.ops.length; ++i) { + if (typeof object.ops[i] !== "object") + throw TypeError(".tendermint.crypto.ProofOps.ops: object expected"); + message.ops[i] = $root.tendermint.crypto.ProofOp.fromObject(object.ops[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ProofOps message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.crypto.ProofOps + * @static + * @param {tendermint.crypto.ProofOps} message ProofOps + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ProofOps.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.ops = []; + if (message.ops && message.ops.length) { + object.ops = []; + for (let j = 0; j < message.ops.length; ++j) + object.ops[j] = $root.tendermint.crypto.ProofOp.toObject(message.ops[j], options); + } + return object; + }; + + /** + * Converts this ProofOps to JSON. + * @function toJSON + * @memberof tendermint.crypto.ProofOps + * @instance + * @returns {Object.} JSON object + */ + ProofOps.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ProofOps; + })(crypto.ProofOps || {}); + + return crypto; + })(tendermint.crypto || {}); + + /** + * Namespace libs. + * @memberof tendermint + * @namespace + */ + + tendermint.libs = (function(libs) { + + /** + * Namespace bits. + * @memberof tendermint.libs + * @namespace + */ + + libs.bits = (function(bits) { + + bits.BitArray = (function(BitArray) { + + /** + * Properties of a BitArray. + * @memberof tendermint.libs.bits + * @interface IBitArray + * @property {number|Long|null} [bits] BitArray bits + * @property {Array.|null} [elems] BitArray elems + */ + + /** + * Constructs a new BitArray. + * @memberof tendermint.libs.bits + * @classdesc Represents a BitArray. + * @implements IBitArray + * @constructor + * @param {tendermint.libs.bits.IBitArray=} [properties] Properties to set + */ + function BitArray(properties) { + this.elems = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BitArray bits. + * @member {number|Long} bits + * @memberof tendermint.libs.bits.BitArray + * @instance + */ + BitArray.prototype.bits = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * BitArray elems. + * @member {Array.} elems + * @memberof tendermint.libs.bits.BitArray + * @instance + */ + BitArray.prototype.elems = $util.emptyArray; + + /** + * Creates a new BitArray instance using the specified properties. + * @function create + * @memberof tendermint.libs.bits.BitArray + * @static + * @param {tendermint.libs.bits.IBitArray=} [properties] Properties to set + * @returns {tendermint.libs.bits.BitArray} BitArray instance + */ + BitArray.create = function create(properties) { + return new BitArray(properties); + }; + + /** + * Encodes the specified BitArray message. Does not implicitly {@link tendermint.libs.bits.BitArray.verify|verify} messages. + * @function encode + * @memberof tendermint.libs.bits.BitArray + * @static + * @param {tendermint.libs.bits.IBitArray} message BitArray message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BitArray.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.bits != null && Object.hasOwnProperty.call(message, "bits")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.bits); + if (message.elems != null && message.elems.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (let i = 0; i < message.elems.length; ++i) + writer.uint64(message.elems[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified BitArray message, length delimited. Does not implicitly {@link tendermint.libs.bits.BitArray.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.libs.bits.BitArray + * @static + * @param {tendermint.libs.bits.IBitArray} message BitArray message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BitArray.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BitArray message from the specified reader or buffer. + * @function decode + * @memberof tendermint.libs.bits.BitArray + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.libs.bits.BitArray} BitArray + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BitArray.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.libs.bits.BitArray(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.bits = reader.int64(); + break; + case 2: + if (!(message.elems && message.elems.length)) + message.elems = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.elems.push(reader.uint64()); + } else + message.elems.push(reader.uint64()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BitArray message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.libs.bits.BitArray + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.libs.bits.BitArray} BitArray + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BitArray.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BitArray message. + * @function verify + * @memberof tendermint.libs.bits.BitArray + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BitArray.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.bits != null && message.hasOwnProperty("bits")) + if (!$util.isInteger(message.bits) && !(message.bits && $util.isInteger(message.bits.low) && $util.isInteger(message.bits.high))) + return "bits: integer|Long expected"; + if (message.elems != null && message.hasOwnProperty("elems")) { + if (!Array.isArray(message.elems)) + return "elems: array expected"; + for (let i = 0; i < message.elems.length; ++i) + if (!$util.isInteger(message.elems[i]) && !(message.elems[i] && $util.isInteger(message.elems[i].low) && $util.isInteger(message.elems[i].high))) + return "elems: integer|Long[] expected"; + } + return null; + }; + + /** + * Creates a BitArray message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.libs.bits.BitArray + * @static + * @param {Object.} object Plain object + * @returns {tendermint.libs.bits.BitArray} BitArray + */ + BitArray.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.libs.bits.BitArray) + return object; + let message = new $root.tendermint.libs.bits.BitArray(); + if (object.bits != null) + if ($util.Long) + (message.bits = $util.Long.fromValue(object.bits)).unsigned = false; + else if (typeof object.bits === "string") + message.bits = parseInt(object.bits, 10); + else if (typeof object.bits === "number") + message.bits = object.bits; + else if (typeof object.bits === "object") + message.bits = new $util.LongBits(object.bits.low >>> 0, object.bits.high >>> 0).toNumber(); + if (object.elems) { + if (!Array.isArray(object.elems)) + throw TypeError(".tendermint.libs.bits.BitArray.elems: array expected"); + message.elems = []; + for (let i = 0; i < object.elems.length; ++i) + if ($util.Long) + (message.elems[i] = $util.Long.fromValue(object.elems[i])).unsigned = true; + else if (typeof object.elems[i] === "string") + message.elems[i] = parseInt(object.elems[i], 10); + else if (typeof object.elems[i] === "number") + message.elems[i] = object.elems[i]; + else if (typeof object.elems[i] === "object") + message.elems[i] = new $util.LongBits(object.elems[i].low >>> 0, object.elems[i].high >>> 0).toNumber(true); + } + return message; + }; + + /** + * Creates a plain object from a BitArray message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.libs.bits.BitArray + * @static + * @param {tendermint.libs.bits.BitArray} message BitArray + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BitArray.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.elems = []; + if (options.defaults) + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.bits = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.bits = options.longs === String ? "0" : 0; + if (message.bits != null && message.hasOwnProperty("bits")) + if (typeof message.bits === "number") + object.bits = options.longs === String ? String(message.bits) : message.bits; + else + object.bits = options.longs === String ? $util.Long.prototype.toString.call(message.bits) : options.longs === Number ? new $util.LongBits(message.bits.low >>> 0, message.bits.high >>> 0).toNumber() : message.bits; + if (message.elems && message.elems.length) { + object.elems = []; + for (let j = 0; j < message.elems.length; ++j) + if (typeof message.elems[j] === "number") + object.elems[j] = options.longs === String ? String(message.elems[j]) : message.elems[j]; + else + object.elems[j] = options.longs === String ? $util.Long.prototype.toString.call(message.elems[j]) : options.longs === Number ? new $util.LongBits(message.elems[j].low >>> 0, message.elems[j].high >>> 0).toNumber(true) : message.elems[j]; + } + return object; + }; + + /** + * Converts this BitArray to JSON. + * @function toJSON + * @memberof tendermint.libs.bits.BitArray + * @instance + * @returns {Object.} JSON object + */ + BitArray.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return BitArray; + })(bits.BitArray || {}); + + return bits; + })(libs.bits || {}); + + return libs; + })(tendermint.libs || {}); + + /** + * Namespace p2p. + * @memberof tendermint + * @namespace + */ + + tendermint.p2p = (function(p2p) { + + p2p.NetAddress = (function(NetAddress) { + + /** + * Properties of a NetAddress. + * @memberof tendermint.p2p + * @interface INetAddress + * @property {string|null} [id] NetAddress id + * @property {string|null} [ip] NetAddress ip + * @property {number|null} [port] NetAddress port + */ + + /** + * Constructs a new NetAddress. + * @memberof tendermint.p2p + * @classdesc Represents a NetAddress. + * @implements INetAddress + * @constructor + * @param {tendermint.p2p.INetAddress=} [properties] Properties to set + */ + function NetAddress(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NetAddress id. + * @member {string} id + * @memberof tendermint.p2p.NetAddress + * @instance + */ + NetAddress.prototype.id = ""; + + /** + * NetAddress ip. + * @member {string} ip + * @memberof tendermint.p2p.NetAddress + * @instance + */ + NetAddress.prototype.ip = ""; + + /** + * NetAddress port. + * @member {number} port + * @memberof tendermint.p2p.NetAddress + * @instance + */ + NetAddress.prototype.port = 0; + + /** + * Creates a new NetAddress instance using the specified properties. + * @function create + * @memberof tendermint.p2p.NetAddress + * @static + * @param {tendermint.p2p.INetAddress=} [properties] Properties to set + * @returns {tendermint.p2p.NetAddress} NetAddress instance + */ + NetAddress.create = function create(properties) { + return new NetAddress(properties); + }; + + /** + * Encodes the specified NetAddress message. Does not implicitly {@link tendermint.p2p.NetAddress.verify|verify} messages. + * @function encode + * @memberof tendermint.p2p.NetAddress + * @static + * @param {tendermint.p2p.INetAddress} message NetAddress message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NetAddress.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.ip != null && Object.hasOwnProperty.call(message, "ip")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.ip); + if (message.port != null && Object.hasOwnProperty.call(message, "port")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.port); + return writer; + }; + + /** + * Encodes the specified NetAddress message, length delimited. Does not implicitly {@link tendermint.p2p.NetAddress.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.p2p.NetAddress + * @static + * @param {tendermint.p2p.INetAddress} message NetAddress message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NetAddress.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NetAddress message from the specified reader or buffer. + * @function decode + * @memberof tendermint.p2p.NetAddress + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.p2p.NetAddress} NetAddress + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NetAddress.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.p2p.NetAddress(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.id = reader.string(); + break; + case 2: + message.ip = reader.string(); + break; + case 3: + message.port = reader.uint32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NetAddress message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.p2p.NetAddress + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.p2p.NetAddress} NetAddress + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NetAddress.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NetAddress message. + * @function verify + * @memberof tendermint.p2p.NetAddress + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NetAddress.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.ip != null && message.hasOwnProperty("ip")) + if (!$util.isString(message.ip)) + return "ip: string expected"; + if (message.port != null && message.hasOwnProperty("port")) + if (!$util.isInteger(message.port)) + return "port: integer expected"; + return null; + }; + + /** + * Creates a NetAddress message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.p2p.NetAddress + * @static + * @param {Object.} object Plain object + * @returns {tendermint.p2p.NetAddress} NetAddress + */ + NetAddress.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.p2p.NetAddress) + return object; + let message = new $root.tendermint.p2p.NetAddress(); + if (object.id != null) + message.id = String(object.id); + if (object.ip != null) + message.ip = String(object.ip); + if (object.port != null) + message.port = object.port >>> 0; + return message; + }; + + /** + * Creates a plain object from a NetAddress message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.p2p.NetAddress + * @static + * @param {tendermint.p2p.NetAddress} message NetAddress + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NetAddress.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.id = ""; + object.ip = ""; + object.port = 0; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.ip != null && message.hasOwnProperty("ip")) + object.ip = message.ip; + if (message.port != null && message.hasOwnProperty("port")) + object.port = message.port; + return object; + }; + + /** + * Converts this NetAddress to JSON. + * @function toJSON + * @memberof tendermint.p2p.NetAddress + * @instance + * @returns {Object.} JSON object + */ + NetAddress.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return NetAddress; + })(p2p.NetAddress || {}); + + p2p.ProtocolVersion = (function(ProtocolVersion) { + + /** + * Properties of a ProtocolVersion. + * @memberof tendermint.p2p + * @interface IProtocolVersion + * @property {number|Long|null} [p2p] ProtocolVersion p2p + * @property {number|Long|null} [block] ProtocolVersion block + * @property {number|Long|null} [app] ProtocolVersion app + */ + + /** + * Constructs a new ProtocolVersion. + * @memberof tendermint.p2p + * @classdesc Represents a ProtocolVersion. + * @implements IProtocolVersion + * @constructor + * @param {tendermint.p2p.IProtocolVersion=} [properties] Properties to set + */ + function ProtocolVersion(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ProtocolVersion p2p. + * @member {number|Long} p2p + * @memberof tendermint.p2p.ProtocolVersion + * @instance + */ + ProtocolVersion.prototype.p2p = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * ProtocolVersion block. + * @member {number|Long} block + * @memberof tendermint.p2p.ProtocolVersion + * @instance + */ + ProtocolVersion.prototype.block = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * ProtocolVersion app. + * @member {number|Long} app + * @memberof tendermint.p2p.ProtocolVersion + * @instance + */ + ProtocolVersion.prototype.app = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new ProtocolVersion instance using the specified properties. + * @function create + * @memberof tendermint.p2p.ProtocolVersion + * @static + * @param {tendermint.p2p.IProtocolVersion=} [properties] Properties to set + * @returns {tendermint.p2p.ProtocolVersion} ProtocolVersion instance + */ + ProtocolVersion.create = function create(properties) { + return new ProtocolVersion(properties); + }; + + /** + * Encodes the specified ProtocolVersion message. Does not implicitly {@link tendermint.p2p.ProtocolVersion.verify|verify} messages. + * @function encode + * @memberof tendermint.p2p.ProtocolVersion + * @static + * @param {tendermint.p2p.IProtocolVersion} message ProtocolVersion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProtocolVersion.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.p2p != null && Object.hasOwnProperty.call(message, "p2p")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.p2p); + if (message.block != null && Object.hasOwnProperty.call(message, "block")) + writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.block); + if (message.app != null && Object.hasOwnProperty.call(message, "app")) + writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.app); + return writer; + }; + + /** + * Encodes the specified ProtocolVersion message, length delimited. Does not implicitly {@link tendermint.p2p.ProtocolVersion.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.p2p.ProtocolVersion + * @static + * @param {tendermint.p2p.IProtocolVersion} message ProtocolVersion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProtocolVersion.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ProtocolVersion message from the specified reader or buffer. + * @function decode + * @memberof tendermint.p2p.ProtocolVersion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.p2p.ProtocolVersion} ProtocolVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProtocolVersion.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.p2p.ProtocolVersion(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.p2p = reader.uint64(); + break; + case 2: + message.block = reader.uint64(); + break; + case 3: + message.app = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ProtocolVersion message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.p2p.ProtocolVersion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.p2p.ProtocolVersion} ProtocolVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProtocolVersion.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ProtocolVersion message. + * @function verify + * @memberof tendermint.p2p.ProtocolVersion + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ProtocolVersion.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.p2p != null && message.hasOwnProperty("p2p")) + if (!$util.isInteger(message.p2p) && !(message.p2p && $util.isInteger(message.p2p.low) && $util.isInteger(message.p2p.high))) + return "p2p: integer|Long expected"; + if (message.block != null && message.hasOwnProperty("block")) + if (!$util.isInteger(message.block) && !(message.block && $util.isInteger(message.block.low) && $util.isInteger(message.block.high))) + return "block: integer|Long expected"; + if (message.app != null && message.hasOwnProperty("app")) + if (!$util.isInteger(message.app) && !(message.app && $util.isInteger(message.app.low) && $util.isInteger(message.app.high))) + return "app: integer|Long expected"; + return null; + }; + + /** + * Creates a ProtocolVersion message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.p2p.ProtocolVersion + * @static + * @param {Object.} object Plain object + * @returns {tendermint.p2p.ProtocolVersion} ProtocolVersion + */ + ProtocolVersion.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.p2p.ProtocolVersion) + return object; + let message = new $root.tendermint.p2p.ProtocolVersion(); + if (object.p2p != null) + if ($util.Long) + (message.p2p = $util.Long.fromValue(object.p2p)).unsigned = true; + else if (typeof object.p2p === "string") + message.p2p = parseInt(object.p2p, 10); + else if (typeof object.p2p === "number") + message.p2p = object.p2p; + else if (typeof object.p2p === "object") + message.p2p = new $util.LongBits(object.p2p.low >>> 0, object.p2p.high >>> 0).toNumber(true); + if (object.block != null) + if ($util.Long) + (message.block = $util.Long.fromValue(object.block)).unsigned = true; + else if (typeof object.block === "string") + message.block = parseInt(object.block, 10); + else if (typeof object.block === "number") + message.block = object.block; + else if (typeof object.block === "object") + message.block = new $util.LongBits(object.block.low >>> 0, object.block.high >>> 0).toNumber(true); + if (object.app != null) + if ($util.Long) + (message.app = $util.Long.fromValue(object.app)).unsigned = true; + else if (typeof object.app === "string") + message.app = parseInt(object.app, 10); + else if (typeof object.app === "number") + message.app = object.app; + else if (typeof object.app === "object") + message.app = new $util.LongBits(object.app.low >>> 0, object.app.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a ProtocolVersion message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.p2p.ProtocolVersion + * @static + * @param {tendermint.p2p.ProtocolVersion} message ProtocolVersion + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ProtocolVersion.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.p2p = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.p2p = options.longs === String ? "0" : 0; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.block = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.block = options.longs === String ? "0" : 0; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.app = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.app = options.longs === String ? "0" : 0; + } + if (message.p2p != null && message.hasOwnProperty("p2p")) + if (typeof message.p2p === "number") + object.p2p = options.longs === String ? String(message.p2p) : message.p2p; + else + object.p2p = options.longs === String ? $util.Long.prototype.toString.call(message.p2p) : options.longs === Number ? new $util.LongBits(message.p2p.low >>> 0, message.p2p.high >>> 0).toNumber(true) : message.p2p; + if (message.block != null && message.hasOwnProperty("block")) + if (typeof message.block === "number") + object.block = options.longs === String ? String(message.block) : message.block; + else + object.block = options.longs === String ? $util.Long.prototype.toString.call(message.block) : options.longs === Number ? new $util.LongBits(message.block.low >>> 0, message.block.high >>> 0).toNumber(true) : message.block; + if (message.app != null && message.hasOwnProperty("app")) + if (typeof message.app === "number") + object.app = options.longs === String ? String(message.app) : message.app; + else + object.app = options.longs === String ? $util.Long.prototype.toString.call(message.app) : options.longs === Number ? new $util.LongBits(message.app.low >>> 0, message.app.high >>> 0).toNumber(true) : message.app; + return object; + }; + + /** + * Converts this ProtocolVersion to JSON. + * @function toJSON + * @memberof tendermint.p2p.ProtocolVersion + * @instance + * @returns {Object.} JSON object + */ + ProtocolVersion.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ProtocolVersion; + })(p2p.ProtocolVersion || {}); + + p2p.DefaultNodeInfo = (function(DefaultNodeInfo) { + + /** + * Properties of a DefaultNodeInfo. + * @memberof tendermint.p2p + * @interface IDefaultNodeInfo + * @property {tendermint.p2p.IProtocolVersion|null} [protocolVersion] DefaultNodeInfo protocolVersion + * @property {string|null} [defaultNodeId] DefaultNodeInfo defaultNodeId + * @property {string|null} [listenAddr] DefaultNodeInfo listenAddr + * @property {string|null} [network] DefaultNodeInfo network + * @property {string|null} [version] DefaultNodeInfo version + * @property {Uint8Array|null} [channels] DefaultNodeInfo channels + * @property {string|null} [moniker] DefaultNodeInfo moniker + * @property {tendermint.p2p.IDefaultNodeInfoOther|null} [other] DefaultNodeInfo other + */ + + /** + * Constructs a new DefaultNodeInfo. + * @memberof tendermint.p2p + * @classdesc Represents a DefaultNodeInfo. + * @implements IDefaultNodeInfo + * @constructor + * @param {tendermint.p2p.IDefaultNodeInfo=} [properties] Properties to set + */ + function DefaultNodeInfo(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DefaultNodeInfo protocolVersion. + * @member {tendermint.p2p.IProtocolVersion|null|undefined} protocolVersion + * @memberof tendermint.p2p.DefaultNodeInfo + * @instance + */ + DefaultNodeInfo.prototype.protocolVersion = null; + + /** + * DefaultNodeInfo defaultNodeId. + * @member {string} defaultNodeId + * @memberof tendermint.p2p.DefaultNodeInfo + * @instance + */ + DefaultNodeInfo.prototype.defaultNodeId = ""; + + /** + * DefaultNodeInfo listenAddr. + * @member {string} listenAddr + * @memberof tendermint.p2p.DefaultNodeInfo + * @instance + */ + DefaultNodeInfo.prototype.listenAddr = ""; + + /** + * DefaultNodeInfo network. + * @member {string} network + * @memberof tendermint.p2p.DefaultNodeInfo + * @instance + */ + DefaultNodeInfo.prototype.network = ""; + + /** + * DefaultNodeInfo version. + * @member {string} version + * @memberof tendermint.p2p.DefaultNodeInfo + * @instance + */ + DefaultNodeInfo.prototype.version = ""; + + /** + * DefaultNodeInfo channels. + * @member {Uint8Array} channels + * @memberof tendermint.p2p.DefaultNodeInfo + * @instance + */ + DefaultNodeInfo.prototype.channels = $util.newBuffer([]); + + /** + * DefaultNodeInfo moniker. + * @member {string} moniker + * @memberof tendermint.p2p.DefaultNodeInfo + * @instance + */ + DefaultNodeInfo.prototype.moniker = ""; + + /** + * DefaultNodeInfo other. + * @member {tendermint.p2p.IDefaultNodeInfoOther|null|undefined} other + * @memberof tendermint.p2p.DefaultNodeInfo + * @instance + */ + DefaultNodeInfo.prototype.other = null; + + /** + * Creates a new DefaultNodeInfo instance using the specified properties. + * @function create + * @memberof tendermint.p2p.DefaultNodeInfo + * @static + * @param {tendermint.p2p.IDefaultNodeInfo=} [properties] Properties to set + * @returns {tendermint.p2p.DefaultNodeInfo} DefaultNodeInfo instance + */ + DefaultNodeInfo.create = function create(properties) { + return new DefaultNodeInfo(properties); + }; + + /** + * Encodes the specified DefaultNodeInfo message. Does not implicitly {@link tendermint.p2p.DefaultNodeInfo.verify|verify} messages. + * @function encode + * @memberof tendermint.p2p.DefaultNodeInfo + * @static + * @param {tendermint.p2p.IDefaultNodeInfo} message DefaultNodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DefaultNodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.protocolVersion != null && Object.hasOwnProperty.call(message, "protocolVersion")) + $root.tendermint.p2p.ProtocolVersion.encode(message.protocolVersion, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.defaultNodeId != null && Object.hasOwnProperty.call(message, "defaultNodeId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.defaultNodeId); + if (message.listenAddr != null && Object.hasOwnProperty.call(message, "listenAddr")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.listenAddr); + if (message.network != null && Object.hasOwnProperty.call(message, "network")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.network); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.version); + if (message.channels != null && Object.hasOwnProperty.call(message, "channels")) + writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.channels); + if (message.moniker != null && Object.hasOwnProperty.call(message, "moniker")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.moniker); + if (message.other != null && Object.hasOwnProperty.call(message, "other")) + $root.tendermint.p2p.DefaultNodeInfoOther.encode(message.other, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DefaultNodeInfo message, length delimited. Does not implicitly {@link tendermint.p2p.DefaultNodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.p2p.DefaultNodeInfo + * @static + * @param {tendermint.p2p.IDefaultNodeInfo} message DefaultNodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DefaultNodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DefaultNodeInfo message from the specified reader or buffer. + * @function decode + * @memberof tendermint.p2p.DefaultNodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.p2p.DefaultNodeInfo} DefaultNodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DefaultNodeInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.p2p.DefaultNodeInfo(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.protocolVersion = $root.tendermint.p2p.ProtocolVersion.decode(reader, reader.uint32()); + break; + case 2: + message.defaultNodeId = reader.string(); + break; + case 3: + message.listenAddr = reader.string(); + break; + case 4: + message.network = reader.string(); + break; + case 5: + message.version = reader.string(); + break; + case 6: + message.channels = reader.bytes(); + break; + case 7: + message.moniker = reader.string(); + break; + case 8: + message.other = $root.tendermint.p2p.DefaultNodeInfoOther.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DefaultNodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.p2p.DefaultNodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.p2p.DefaultNodeInfo} DefaultNodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DefaultNodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DefaultNodeInfo message. + * @function verify + * @memberof tendermint.p2p.DefaultNodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DefaultNodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.protocolVersion != null && message.hasOwnProperty("protocolVersion")) { + let error = $root.tendermint.p2p.ProtocolVersion.verify(message.protocolVersion); + if (error) + return "protocolVersion." + error; + } + if (message.defaultNodeId != null && message.hasOwnProperty("defaultNodeId")) + if (!$util.isString(message.defaultNodeId)) + return "defaultNodeId: string expected"; + if (message.listenAddr != null && message.hasOwnProperty("listenAddr")) + if (!$util.isString(message.listenAddr)) + return "listenAddr: string expected"; + if (message.network != null && message.hasOwnProperty("network")) + if (!$util.isString(message.network)) + return "network: string expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.channels != null && message.hasOwnProperty("channels")) + if (!(message.channels && typeof message.channels.length === "number" || $util.isString(message.channels))) + return "channels: buffer expected"; + if (message.moniker != null && message.hasOwnProperty("moniker")) + if (!$util.isString(message.moniker)) + return "moniker: string expected"; + if (message.other != null && message.hasOwnProperty("other")) { + let error = $root.tendermint.p2p.DefaultNodeInfoOther.verify(message.other); + if (error) + return "other." + error; + } + return null; + }; + + /** + * Creates a DefaultNodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.p2p.DefaultNodeInfo + * @static + * @param {Object.} object Plain object + * @returns {tendermint.p2p.DefaultNodeInfo} DefaultNodeInfo + */ + DefaultNodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.p2p.DefaultNodeInfo) + return object; + let message = new $root.tendermint.p2p.DefaultNodeInfo(); + if (object.protocolVersion != null) { + if (typeof object.protocolVersion !== "object") + throw TypeError(".tendermint.p2p.DefaultNodeInfo.protocolVersion: object expected"); + message.protocolVersion = $root.tendermint.p2p.ProtocolVersion.fromObject(object.protocolVersion); + } + if (object.defaultNodeId != null) + message.defaultNodeId = String(object.defaultNodeId); + if (object.listenAddr != null) + message.listenAddr = String(object.listenAddr); + if (object.network != null) + message.network = String(object.network); + if (object.version != null) + message.version = String(object.version); + if (object.channels != null) + if (typeof object.channels === "string") + $util.base64.decode(object.channels, message.channels = $util.newBuffer($util.base64.length(object.channels)), 0); + else if (object.channels.length) + message.channels = object.channels; + if (object.moniker != null) + message.moniker = String(object.moniker); + if (object.other != null) { + if (typeof object.other !== "object") + throw TypeError(".tendermint.p2p.DefaultNodeInfo.other: object expected"); + message.other = $root.tendermint.p2p.DefaultNodeInfoOther.fromObject(object.other); + } + return message; + }; + + /** + * Creates a plain object from a DefaultNodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.p2p.DefaultNodeInfo + * @static + * @param {tendermint.p2p.DefaultNodeInfo} message DefaultNodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DefaultNodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.protocolVersion = null; + object.defaultNodeId = ""; + object.listenAddr = ""; + object.network = ""; + object.version = ""; + if (options.bytes === String) + object.channels = ""; + else { + object.channels = []; + if (options.bytes !== Array) + object.channels = $util.newBuffer(object.channels); + } + object.moniker = ""; + object.other = null; + } + if (message.protocolVersion != null && message.hasOwnProperty("protocolVersion")) + object.protocolVersion = $root.tendermint.p2p.ProtocolVersion.toObject(message.protocolVersion, options); + if (message.defaultNodeId != null && message.hasOwnProperty("defaultNodeId")) + object.defaultNodeId = message.defaultNodeId; + if (message.listenAddr != null && message.hasOwnProperty("listenAddr")) + object.listenAddr = message.listenAddr; + if (message.network != null && message.hasOwnProperty("network")) + object.network = message.network; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.channels != null && message.hasOwnProperty("channels")) + object.channels = options.bytes === String ? $util.base64.encode(message.channels, 0, message.channels.length) : options.bytes === Array ? Array.prototype.slice.call(message.channels) : message.channels; + if (message.moniker != null && message.hasOwnProperty("moniker")) + object.moniker = message.moniker; + if (message.other != null && message.hasOwnProperty("other")) + object.other = $root.tendermint.p2p.DefaultNodeInfoOther.toObject(message.other, options); + return object; + }; + + /** + * Converts this DefaultNodeInfo to JSON. + * @function toJSON + * @memberof tendermint.p2p.DefaultNodeInfo + * @instance + * @returns {Object.} JSON object + */ + DefaultNodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DefaultNodeInfo; + })(p2p.DefaultNodeInfo || {}); + + p2p.DefaultNodeInfoOther = (function(DefaultNodeInfoOther) { + + /** + * Properties of a DefaultNodeInfoOther. + * @memberof tendermint.p2p + * @interface IDefaultNodeInfoOther + * @property {string|null} [txIndex] DefaultNodeInfoOther txIndex + * @property {string|null} [rpcAddress] DefaultNodeInfoOther rpcAddress + */ + + /** + * Constructs a new DefaultNodeInfoOther. + * @memberof tendermint.p2p + * @classdesc Represents a DefaultNodeInfoOther. + * @implements IDefaultNodeInfoOther + * @constructor + * @param {tendermint.p2p.IDefaultNodeInfoOther=} [properties] Properties to set + */ + function DefaultNodeInfoOther(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DefaultNodeInfoOther txIndex. + * @member {string} txIndex + * @memberof tendermint.p2p.DefaultNodeInfoOther + * @instance + */ + DefaultNodeInfoOther.prototype.txIndex = ""; + + /** + * DefaultNodeInfoOther rpcAddress. + * @member {string} rpcAddress + * @memberof tendermint.p2p.DefaultNodeInfoOther + * @instance + */ + DefaultNodeInfoOther.prototype.rpcAddress = ""; + + /** + * Creates a new DefaultNodeInfoOther instance using the specified properties. + * @function create + * @memberof tendermint.p2p.DefaultNodeInfoOther + * @static + * @param {tendermint.p2p.IDefaultNodeInfoOther=} [properties] Properties to set + * @returns {tendermint.p2p.DefaultNodeInfoOther} DefaultNodeInfoOther instance + */ + DefaultNodeInfoOther.create = function create(properties) { + return new DefaultNodeInfoOther(properties); + }; + + /** + * Encodes the specified DefaultNodeInfoOther message. Does not implicitly {@link tendermint.p2p.DefaultNodeInfoOther.verify|verify} messages. + * @function encode + * @memberof tendermint.p2p.DefaultNodeInfoOther + * @static + * @param {tendermint.p2p.IDefaultNodeInfoOther} message DefaultNodeInfoOther message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DefaultNodeInfoOther.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.txIndex != null && Object.hasOwnProperty.call(message, "txIndex")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.txIndex); + if (message.rpcAddress != null && Object.hasOwnProperty.call(message, "rpcAddress")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.rpcAddress); + return writer; + }; + + /** + * Encodes the specified DefaultNodeInfoOther message, length delimited. Does not implicitly {@link tendermint.p2p.DefaultNodeInfoOther.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.p2p.DefaultNodeInfoOther + * @static + * @param {tendermint.p2p.IDefaultNodeInfoOther} message DefaultNodeInfoOther message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DefaultNodeInfoOther.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DefaultNodeInfoOther message from the specified reader or buffer. + * @function decode + * @memberof tendermint.p2p.DefaultNodeInfoOther + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.p2p.DefaultNodeInfoOther} DefaultNodeInfoOther + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DefaultNodeInfoOther.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.p2p.DefaultNodeInfoOther(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.txIndex = reader.string(); + break; + case 2: + message.rpcAddress = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DefaultNodeInfoOther message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.p2p.DefaultNodeInfoOther + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.p2p.DefaultNodeInfoOther} DefaultNodeInfoOther + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DefaultNodeInfoOther.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DefaultNodeInfoOther message. + * @function verify + * @memberof tendermint.p2p.DefaultNodeInfoOther + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DefaultNodeInfoOther.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.txIndex != null && message.hasOwnProperty("txIndex")) + if (!$util.isString(message.txIndex)) + return "txIndex: string expected"; + if (message.rpcAddress != null && message.hasOwnProperty("rpcAddress")) + if (!$util.isString(message.rpcAddress)) + return "rpcAddress: string expected"; + return null; + }; + + /** + * Creates a DefaultNodeInfoOther message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.p2p.DefaultNodeInfoOther + * @static + * @param {Object.} object Plain object + * @returns {tendermint.p2p.DefaultNodeInfoOther} DefaultNodeInfoOther + */ + DefaultNodeInfoOther.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.p2p.DefaultNodeInfoOther) + return object; + let message = new $root.tendermint.p2p.DefaultNodeInfoOther(); + if (object.txIndex != null) + message.txIndex = String(object.txIndex); + if (object.rpcAddress != null) + message.rpcAddress = String(object.rpcAddress); + return message; + }; + + /** + * Creates a plain object from a DefaultNodeInfoOther message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.p2p.DefaultNodeInfoOther + * @static + * @param {tendermint.p2p.DefaultNodeInfoOther} message DefaultNodeInfoOther + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DefaultNodeInfoOther.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.txIndex = ""; + object.rpcAddress = ""; + } + if (message.txIndex != null && message.hasOwnProperty("txIndex")) + object.txIndex = message.txIndex; + if (message.rpcAddress != null && message.hasOwnProperty("rpcAddress")) + object.rpcAddress = message.rpcAddress; + return object; + }; + + /** + * Converts this DefaultNodeInfoOther to JSON. + * @function toJSON + * @memberof tendermint.p2p.DefaultNodeInfoOther + * @instance + * @returns {Object.} JSON object + */ + DefaultNodeInfoOther.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DefaultNodeInfoOther; + })(p2p.DefaultNodeInfoOther || {}); + + return p2p; + })(tendermint.p2p || {}); + + /** + * Namespace types. + * @memberof tendermint + * @namespace + */ + + tendermint.types = (function(types) { + + types.Block = (function(Block) { + + /** + * Properties of a Block. + * @memberof tendermint.types + * @interface IBlock + * @property {tendermint.types.IHeader|null} [header] Block header + * @property {tendermint.types.IData|null} [data] Block data + * @property {tendermint.types.IEvidenceList|null} [evidence] Block evidence + * @property {tendermint.types.ICommit|null} [lastCommit] Block lastCommit + */ + + /** + * Constructs a new Block. + * @memberof tendermint.types + * @classdesc Represents a Block. + * @implements IBlock + * @constructor + * @param {tendermint.types.IBlock=} [properties] Properties to set + */ + function Block(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Block header. + * @member {tendermint.types.IHeader|null|undefined} header + * @memberof tendermint.types.Block + * @instance + */ + Block.prototype.header = null; + + /** + * Block data. + * @member {tendermint.types.IData|null|undefined} data + * @memberof tendermint.types.Block + * @instance + */ + Block.prototype.data = null; + + /** + * Block evidence. + * @member {tendermint.types.IEvidenceList|null|undefined} evidence + * @memberof tendermint.types.Block + * @instance + */ + Block.prototype.evidence = null; + + /** + * Block lastCommit. + * @member {tendermint.types.ICommit|null|undefined} lastCommit + * @memberof tendermint.types.Block + * @instance + */ + Block.prototype.lastCommit = null; + + /** + * Creates a new Block instance using the specified properties. + * @function create + * @memberof tendermint.types.Block + * @static + * @param {tendermint.types.IBlock=} [properties] Properties to set + * @returns {tendermint.types.Block} Block instance + */ + Block.create = function create(properties) { + return new Block(properties); + }; + + /** + * Encodes the specified Block message. Does not implicitly {@link tendermint.types.Block.verify|verify} messages. + * @function encode + * @memberof tendermint.types.Block + * @static + * @param {tendermint.types.IBlock} message Block message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Block.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.header != null && Object.hasOwnProperty.call(message, "header")) + $root.tendermint.types.Header.encode(message.header, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.data != null && Object.hasOwnProperty.call(message, "data")) + $root.tendermint.types.Data.encode(message.data, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.evidence != null && Object.hasOwnProperty.call(message, "evidence")) + $root.tendermint.types.EvidenceList.encode(message.evidence, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.lastCommit != null && Object.hasOwnProperty.call(message, "lastCommit")) + $root.tendermint.types.Commit.encode(message.lastCommit, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Block message, length delimited. Does not implicitly {@link tendermint.types.Block.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.types.Block + * @static + * @param {tendermint.types.IBlock} message Block message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Block.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Block message from the specified reader or buffer. + * @function decode + * @memberof tendermint.types.Block + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.types.Block} Block + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Block.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.Block(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.header = $root.tendermint.types.Header.decode(reader, reader.uint32()); + break; + case 2: + message.data = $root.tendermint.types.Data.decode(reader, reader.uint32()); + break; + case 3: + message.evidence = $root.tendermint.types.EvidenceList.decode(reader, reader.uint32()); + break; + case 4: + message.lastCommit = $root.tendermint.types.Commit.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Block message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.types.Block + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.types.Block} Block + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Block.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Block message. + * @function verify + * @memberof tendermint.types.Block + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Block.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.header != null && message.hasOwnProperty("header")) { + let error = $root.tendermint.types.Header.verify(message.header); + if (error) + return "header." + error; + } + if (message.data != null && message.hasOwnProperty("data")) { + let error = $root.tendermint.types.Data.verify(message.data); + if (error) + return "data." + error; + } + if (message.evidence != null && message.hasOwnProperty("evidence")) { + let error = $root.tendermint.types.EvidenceList.verify(message.evidence); + if (error) + return "evidence." + error; + } + if (message.lastCommit != null && message.hasOwnProperty("lastCommit")) { + let error = $root.tendermint.types.Commit.verify(message.lastCommit); + if (error) + return "lastCommit." + error; + } + return null; + }; + + /** + * Creates a Block message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.types.Block + * @static + * @param {Object.} object Plain object + * @returns {tendermint.types.Block} Block + */ + Block.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.types.Block) + return object; + let message = new $root.tendermint.types.Block(); + if (object.header != null) { + if (typeof object.header !== "object") + throw TypeError(".tendermint.types.Block.header: object expected"); + message.header = $root.tendermint.types.Header.fromObject(object.header); + } + if (object.data != null) { + if (typeof object.data !== "object") + throw TypeError(".tendermint.types.Block.data: object expected"); + message.data = $root.tendermint.types.Data.fromObject(object.data); + } + if (object.evidence != null) { + if (typeof object.evidence !== "object") + throw TypeError(".tendermint.types.Block.evidence: object expected"); + message.evidence = $root.tendermint.types.EvidenceList.fromObject(object.evidence); + } + if (object.lastCommit != null) { + if (typeof object.lastCommit !== "object") + throw TypeError(".tendermint.types.Block.lastCommit: object expected"); + message.lastCommit = $root.tendermint.types.Commit.fromObject(object.lastCommit); + } + return message; + }; + + /** + * Creates a plain object from a Block message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.types.Block + * @static + * @param {tendermint.types.Block} message Block + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Block.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.header = null; + object.data = null; + object.evidence = null; + object.lastCommit = null; + } + if (message.header != null && message.hasOwnProperty("header")) + object.header = $root.tendermint.types.Header.toObject(message.header, options); + if (message.data != null && message.hasOwnProperty("data")) + object.data = $root.tendermint.types.Data.toObject(message.data, options); + if (message.evidence != null && message.hasOwnProperty("evidence")) + object.evidence = $root.tendermint.types.EvidenceList.toObject(message.evidence, options); + if (message.lastCommit != null && message.hasOwnProperty("lastCommit")) + object.lastCommit = $root.tendermint.types.Commit.toObject(message.lastCommit, options); + return object; + }; + + /** + * Converts this Block to JSON. + * @function toJSON + * @memberof tendermint.types.Block + * @instance + * @returns {Object.} JSON object + */ + Block.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Block; + })(types.Block || {}); + + types.Evidence = (function(Evidence) { + + /** + * Properties of an Evidence. + * @memberof tendermint.types + * @interface IEvidence + * @property {tendermint.types.IDuplicateVoteEvidence|null} [duplicateVoteEvidence] Evidence duplicateVoteEvidence + * @property {tendermint.types.ILightClientAttackEvidence|null} [lightClientAttackEvidence] Evidence lightClientAttackEvidence + */ + + /** + * Constructs a new Evidence. + * @memberof tendermint.types + * @classdesc Represents an Evidence. + * @implements IEvidence + * @constructor + * @param {tendermint.types.IEvidence=} [properties] Properties to set + */ + function Evidence(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Evidence duplicateVoteEvidence. + * @member {tendermint.types.IDuplicateVoteEvidence|null|undefined} duplicateVoteEvidence + * @memberof tendermint.types.Evidence + * @instance + */ + Evidence.prototype.duplicateVoteEvidence = null; + + /** + * Evidence lightClientAttackEvidence. + * @member {tendermint.types.ILightClientAttackEvidence|null|undefined} lightClientAttackEvidence + * @memberof tendermint.types.Evidence + * @instance + */ + Evidence.prototype.lightClientAttackEvidence = null; + + // OneOf field names bound to virtual getters and setters + let $oneOfFields; + + /** + * Evidence sum. + * @member {"duplicateVoteEvidence"|"lightClientAttackEvidence"|undefined} sum + * @memberof tendermint.types.Evidence + * @instance + */ + Object.defineProperty(Evidence.prototype, "sum", { + get: $util.oneOfGetter($oneOfFields = ["duplicateVoteEvidence", "lightClientAttackEvidence"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Evidence instance using the specified properties. + * @function create + * @memberof tendermint.types.Evidence + * @static + * @param {tendermint.types.IEvidence=} [properties] Properties to set + * @returns {tendermint.types.Evidence} Evidence instance + */ + Evidence.create = function create(properties) { + return new Evidence(properties); + }; + + /** + * Encodes the specified Evidence message. Does not implicitly {@link tendermint.types.Evidence.verify|verify} messages. + * @function encode + * @memberof tendermint.types.Evidence + * @static + * @param {tendermint.types.IEvidence} message Evidence message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Evidence.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.duplicateVoteEvidence != null && Object.hasOwnProperty.call(message, "duplicateVoteEvidence")) + $root.tendermint.types.DuplicateVoteEvidence.encode(message.duplicateVoteEvidence, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.lightClientAttackEvidence != null && Object.hasOwnProperty.call(message, "lightClientAttackEvidence")) + $root.tendermint.types.LightClientAttackEvidence.encode(message.lightClientAttackEvidence, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Evidence message, length delimited. Does not implicitly {@link tendermint.types.Evidence.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.types.Evidence + * @static + * @param {tendermint.types.IEvidence} message Evidence message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Evidence.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Evidence message from the specified reader or buffer. + * @function decode + * @memberof tendermint.types.Evidence + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.types.Evidence} Evidence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Evidence.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.Evidence(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.duplicateVoteEvidence = $root.tendermint.types.DuplicateVoteEvidence.decode(reader, reader.uint32()); + break; + case 2: + message.lightClientAttackEvidence = $root.tendermint.types.LightClientAttackEvidence.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Evidence message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.types.Evidence + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.types.Evidence} Evidence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Evidence.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Evidence message. + * @function verify + * @memberof tendermint.types.Evidence + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Evidence.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + let properties = {}; + if (message.duplicateVoteEvidence != null && message.hasOwnProperty("duplicateVoteEvidence")) { + properties.sum = 1; + { + let error = $root.tendermint.types.DuplicateVoteEvidence.verify(message.duplicateVoteEvidence); + if (error) + return "duplicateVoteEvidence." + error; + } + } + if (message.lightClientAttackEvidence != null && message.hasOwnProperty("lightClientAttackEvidence")) { + if (properties.sum === 1) + return "sum: multiple values"; + properties.sum = 1; + { + let error = $root.tendermint.types.LightClientAttackEvidence.verify(message.lightClientAttackEvidence); + if (error) + return "lightClientAttackEvidence." + error; + } + } + return null; + }; + + /** + * Creates an Evidence message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.types.Evidence + * @static + * @param {Object.} object Plain object + * @returns {tendermint.types.Evidence} Evidence + */ + Evidence.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.types.Evidence) + return object; + let message = new $root.tendermint.types.Evidence(); + if (object.duplicateVoteEvidence != null) { + if (typeof object.duplicateVoteEvidence !== "object") + throw TypeError(".tendermint.types.Evidence.duplicateVoteEvidence: object expected"); + message.duplicateVoteEvidence = $root.tendermint.types.DuplicateVoteEvidence.fromObject(object.duplicateVoteEvidence); + } + if (object.lightClientAttackEvidence != null) { + if (typeof object.lightClientAttackEvidence !== "object") + throw TypeError(".tendermint.types.Evidence.lightClientAttackEvidence: object expected"); + message.lightClientAttackEvidence = $root.tendermint.types.LightClientAttackEvidence.fromObject(object.lightClientAttackEvidence); + } + return message; + }; + + /** + * Creates a plain object from an Evidence message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.types.Evidence + * @static + * @param {tendermint.types.Evidence} message Evidence + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Evidence.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (message.duplicateVoteEvidence != null && message.hasOwnProperty("duplicateVoteEvidence")) { + object.duplicateVoteEvidence = $root.tendermint.types.DuplicateVoteEvidence.toObject(message.duplicateVoteEvidence, options); + if (options.oneofs) + object.sum = "duplicateVoteEvidence"; + } + if (message.lightClientAttackEvidence != null && message.hasOwnProperty("lightClientAttackEvidence")) { + object.lightClientAttackEvidence = $root.tendermint.types.LightClientAttackEvidence.toObject(message.lightClientAttackEvidence, options); + if (options.oneofs) + object.sum = "lightClientAttackEvidence"; + } + return object; + }; + + /** + * Converts this Evidence to JSON. + * @function toJSON + * @memberof tendermint.types.Evidence + * @instance + * @returns {Object.} JSON object + */ + Evidence.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Evidence; + })(types.Evidence || {}); + + types.DuplicateVoteEvidence = (function(DuplicateVoteEvidence) { + + /** + * Properties of a DuplicateVoteEvidence. + * @memberof tendermint.types + * @interface IDuplicateVoteEvidence + * @property {tendermint.types.IVote|null} [voteA] DuplicateVoteEvidence voteA + * @property {tendermint.types.IVote|null} [voteB] DuplicateVoteEvidence voteB + * @property {number|Long|null} [totalVotingPower] DuplicateVoteEvidence totalVotingPower + * @property {number|Long|null} [validatorPower] DuplicateVoteEvidence validatorPower + * @property {google.protobuf.ITimestamp|null} [timestamp] DuplicateVoteEvidence timestamp + */ + + /** + * Constructs a new DuplicateVoteEvidence. + * @memberof tendermint.types + * @classdesc Represents a DuplicateVoteEvidence. + * @implements IDuplicateVoteEvidence + * @constructor + * @param {tendermint.types.IDuplicateVoteEvidence=} [properties] Properties to set + */ + function DuplicateVoteEvidence(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DuplicateVoteEvidence voteA. + * @member {tendermint.types.IVote|null|undefined} voteA + * @memberof tendermint.types.DuplicateVoteEvidence + * @instance + */ + DuplicateVoteEvidence.prototype.voteA = null; + + /** + * DuplicateVoteEvidence voteB. + * @member {tendermint.types.IVote|null|undefined} voteB + * @memberof tendermint.types.DuplicateVoteEvidence + * @instance + */ + DuplicateVoteEvidence.prototype.voteB = null; + + /** + * DuplicateVoteEvidence totalVotingPower. + * @member {number|Long} totalVotingPower + * @memberof tendermint.types.DuplicateVoteEvidence + * @instance + */ + DuplicateVoteEvidence.prototype.totalVotingPower = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * DuplicateVoteEvidence validatorPower. + * @member {number|Long} validatorPower + * @memberof tendermint.types.DuplicateVoteEvidence + * @instance + */ + DuplicateVoteEvidence.prototype.validatorPower = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * DuplicateVoteEvidence timestamp. + * @member {google.protobuf.ITimestamp|null|undefined} timestamp + * @memberof tendermint.types.DuplicateVoteEvidence + * @instance + */ + DuplicateVoteEvidence.prototype.timestamp = null; + + /** + * Creates a new DuplicateVoteEvidence instance using the specified properties. + * @function create + * @memberof tendermint.types.DuplicateVoteEvidence + * @static + * @param {tendermint.types.IDuplicateVoteEvidence=} [properties] Properties to set + * @returns {tendermint.types.DuplicateVoteEvidence} DuplicateVoteEvidence instance + */ + DuplicateVoteEvidence.create = function create(properties) { + return new DuplicateVoteEvidence(properties); + }; + + /** + * Encodes the specified DuplicateVoteEvidence message. Does not implicitly {@link tendermint.types.DuplicateVoteEvidence.verify|verify} messages. + * @function encode + * @memberof tendermint.types.DuplicateVoteEvidence + * @static + * @param {tendermint.types.IDuplicateVoteEvidence} message DuplicateVoteEvidence message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DuplicateVoteEvidence.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.voteA != null && Object.hasOwnProperty.call(message, "voteA")) + $root.tendermint.types.Vote.encode(message.voteA, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.voteB != null && Object.hasOwnProperty.call(message, "voteB")) + $root.tendermint.types.Vote.encode(message.voteB, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.totalVotingPower != null && Object.hasOwnProperty.call(message, "totalVotingPower")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.totalVotingPower); + if (message.validatorPower != null && Object.hasOwnProperty.call(message, "validatorPower")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.validatorPower); + if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) + $root.google.protobuf.Timestamp.encode(message.timestamp, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DuplicateVoteEvidence message, length delimited. Does not implicitly {@link tendermint.types.DuplicateVoteEvidence.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.types.DuplicateVoteEvidence + * @static + * @param {tendermint.types.IDuplicateVoteEvidence} message DuplicateVoteEvidence message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DuplicateVoteEvidence.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DuplicateVoteEvidence message from the specified reader or buffer. + * @function decode + * @memberof tendermint.types.DuplicateVoteEvidence + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.types.DuplicateVoteEvidence} DuplicateVoteEvidence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DuplicateVoteEvidence.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.DuplicateVoteEvidence(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.voteA = $root.tendermint.types.Vote.decode(reader, reader.uint32()); + break; + case 2: + message.voteB = $root.tendermint.types.Vote.decode(reader, reader.uint32()); + break; + case 3: + message.totalVotingPower = reader.int64(); + break; + case 4: + message.validatorPower = reader.int64(); + break; + case 5: + message.timestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DuplicateVoteEvidence message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.types.DuplicateVoteEvidence + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.types.DuplicateVoteEvidence} DuplicateVoteEvidence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DuplicateVoteEvidence.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DuplicateVoteEvidence message. + * @function verify + * @memberof tendermint.types.DuplicateVoteEvidence + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DuplicateVoteEvidence.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.voteA != null && message.hasOwnProperty("voteA")) { + let error = $root.tendermint.types.Vote.verify(message.voteA); + if (error) + return "voteA." + error; + } + if (message.voteB != null && message.hasOwnProperty("voteB")) { + let error = $root.tendermint.types.Vote.verify(message.voteB); + if (error) + return "voteB." + error; + } + if (message.totalVotingPower != null && message.hasOwnProperty("totalVotingPower")) + if (!$util.isInteger(message.totalVotingPower) && !(message.totalVotingPower && $util.isInteger(message.totalVotingPower.low) && $util.isInteger(message.totalVotingPower.high))) + return "totalVotingPower: integer|Long expected"; + if (message.validatorPower != null && message.hasOwnProperty("validatorPower")) + if (!$util.isInteger(message.validatorPower) && !(message.validatorPower && $util.isInteger(message.validatorPower.low) && $util.isInteger(message.validatorPower.high))) + return "validatorPower: integer|Long expected"; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) { + let error = $root.google.protobuf.Timestamp.verify(message.timestamp); + if (error) + return "timestamp." + error; + } + return null; + }; + + /** + * Creates a DuplicateVoteEvidence message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.types.DuplicateVoteEvidence + * @static + * @param {Object.} object Plain object + * @returns {tendermint.types.DuplicateVoteEvidence} DuplicateVoteEvidence + */ + DuplicateVoteEvidence.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.types.DuplicateVoteEvidence) + return object; + let message = new $root.tendermint.types.DuplicateVoteEvidence(); + if (object.voteA != null) { + if (typeof object.voteA !== "object") + throw TypeError(".tendermint.types.DuplicateVoteEvidence.voteA: object expected"); + message.voteA = $root.tendermint.types.Vote.fromObject(object.voteA); + } + if (object.voteB != null) { + if (typeof object.voteB !== "object") + throw TypeError(".tendermint.types.DuplicateVoteEvidence.voteB: object expected"); + message.voteB = $root.tendermint.types.Vote.fromObject(object.voteB); + } + if (object.totalVotingPower != null) + if ($util.Long) + (message.totalVotingPower = $util.Long.fromValue(object.totalVotingPower)).unsigned = false; + else if (typeof object.totalVotingPower === "string") + message.totalVotingPower = parseInt(object.totalVotingPower, 10); + else if (typeof object.totalVotingPower === "number") + message.totalVotingPower = object.totalVotingPower; + else if (typeof object.totalVotingPower === "object") + message.totalVotingPower = new $util.LongBits(object.totalVotingPower.low >>> 0, object.totalVotingPower.high >>> 0).toNumber(); + if (object.validatorPower != null) + if ($util.Long) + (message.validatorPower = $util.Long.fromValue(object.validatorPower)).unsigned = false; + else if (typeof object.validatorPower === "string") + message.validatorPower = parseInt(object.validatorPower, 10); + else if (typeof object.validatorPower === "number") + message.validatorPower = object.validatorPower; + else if (typeof object.validatorPower === "object") + message.validatorPower = new $util.LongBits(object.validatorPower.low >>> 0, object.validatorPower.high >>> 0).toNumber(); + if (object.timestamp != null) { + if (typeof object.timestamp !== "object") + throw TypeError(".tendermint.types.DuplicateVoteEvidence.timestamp: object expected"); + message.timestamp = $root.google.protobuf.Timestamp.fromObject(object.timestamp); + } + return message; + }; + + /** + * Creates a plain object from a DuplicateVoteEvidence message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.types.DuplicateVoteEvidence + * @static + * @param {tendermint.types.DuplicateVoteEvidence} message DuplicateVoteEvidence + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DuplicateVoteEvidence.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.voteA = null; + object.voteB = null; + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.totalVotingPower = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.totalVotingPower = options.longs === String ? "0" : 0; + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.validatorPower = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.validatorPower = options.longs === String ? "0" : 0; + object.timestamp = null; + } + if (message.voteA != null && message.hasOwnProperty("voteA")) + object.voteA = $root.tendermint.types.Vote.toObject(message.voteA, options); + if (message.voteB != null && message.hasOwnProperty("voteB")) + object.voteB = $root.tendermint.types.Vote.toObject(message.voteB, options); + if (message.totalVotingPower != null && message.hasOwnProperty("totalVotingPower")) + if (typeof message.totalVotingPower === "number") + object.totalVotingPower = options.longs === String ? String(message.totalVotingPower) : message.totalVotingPower; + else + object.totalVotingPower = options.longs === String ? $util.Long.prototype.toString.call(message.totalVotingPower) : options.longs === Number ? new $util.LongBits(message.totalVotingPower.low >>> 0, message.totalVotingPower.high >>> 0).toNumber() : message.totalVotingPower; + if (message.validatorPower != null && message.hasOwnProperty("validatorPower")) + if (typeof message.validatorPower === "number") + object.validatorPower = options.longs === String ? String(message.validatorPower) : message.validatorPower; + else + object.validatorPower = options.longs === String ? $util.Long.prototype.toString.call(message.validatorPower) : options.longs === Number ? new $util.LongBits(message.validatorPower.low >>> 0, message.validatorPower.high >>> 0).toNumber() : message.validatorPower; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + object.timestamp = $root.google.protobuf.Timestamp.toObject(message.timestamp, options); + return object; + }; + + /** + * Converts this DuplicateVoteEvidence to JSON. + * @function toJSON + * @memberof tendermint.types.DuplicateVoteEvidence + * @instance + * @returns {Object.} JSON object + */ + DuplicateVoteEvidence.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DuplicateVoteEvidence; + })(types.DuplicateVoteEvidence || {}); + + types.LightClientAttackEvidence = (function(LightClientAttackEvidence) { + + /** + * Properties of a LightClientAttackEvidence. + * @memberof tendermint.types + * @interface ILightClientAttackEvidence + * @property {tendermint.types.ILightBlock|null} [conflictingBlock] LightClientAttackEvidence conflictingBlock + * @property {number|Long|null} [commonHeight] LightClientAttackEvidence commonHeight + * @property {Array.|null} [byzantineValidators] LightClientAttackEvidence byzantineValidators + * @property {number|Long|null} [totalVotingPower] LightClientAttackEvidence totalVotingPower + * @property {google.protobuf.ITimestamp|null} [timestamp] LightClientAttackEvidence timestamp + */ + + /** + * Constructs a new LightClientAttackEvidence. + * @memberof tendermint.types + * @classdesc Represents a LightClientAttackEvidence. + * @implements ILightClientAttackEvidence + * @constructor + * @param {tendermint.types.ILightClientAttackEvidence=} [properties] Properties to set + */ + function LightClientAttackEvidence(properties) { + this.byzantineValidators = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LightClientAttackEvidence conflictingBlock. + * @member {tendermint.types.ILightBlock|null|undefined} conflictingBlock + * @memberof tendermint.types.LightClientAttackEvidence + * @instance + */ + LightClientAttackEvidence.prototype.conflictingBlock = null; + + /** + * LightClientAttackEvidence commonHeight. + * @member {number|Long} commonHeight + * @memberof tendermint.types.LightClientAttackEvidence + * @instance + */ + LightClientAttackEvidence.prototype.commonHeight = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * LightClientAttackEvidence byzantineValidators. + * @member {Array.} byzantineValidators + * @memberof tendermint.types.LightClientAttackEvidence + * @instance + */ + LightClientAttackEvidence.prototype.byzantineValidators = $util.emptyArray; + + /** + * LightClientAttackEvidence totalVotingPower. + * @member {number|Long} totalVotingPower + * @memberof tendermint.types.LightClientAttackEvidence + * @instance + */ + LightClientAttackEvidence.prototype.totalVotingPower = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * LightClientAttackEvidence timestamp. + * @member {google.protobuf.ITimestamp|null|undefined} timestamp + * @memberof tendermint.types.LightClientAttackEvidence + * @instance + */ + LightClientAttackEvidence.prototype.timestamp = null; + + /** + * Creates a new LightClientAttackEvidence instance using the specified properties. + * @function create + * @memberof tendermint.types.LightClientAttackEvidence + * @static + * @param {tendermint.types.ILightClientAttackEvidence=} [properties] Properties to set + * @returns {tendermint.types.LightClientAttackEvidence} LightClientAttackEvidence instance + */ + LightClientAttackEvidence.create = function create(properties) { + return new LightClientAttackEvidence(properties); + }; + + /** + * Encodes the specified LightClientAttackEvidence message. Does not implicitly {@link tendermint.types.LightClientAttackEvidence.verify|verify} messages. + * @function encode + * @memberof tendermint.types.LightClientAttackEvidence + * @static + * @param {tendermint.types.ILightClientAttackEvidence} message LightClientAttackEvidence message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LightClientAttackEvidence.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.conflictingBlock != null && Object.hasOwnProperty.call(message, "conflictingBlock")) + $root.tendermint.types.LightBlock.encode(message.conflictingBlock, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.commonHeight != null && Object.hasOwnProperty.call(message, "commonHeight")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.commonHeight); + if (message.byzantineValidators != null && message.byzantineValidators.length) + for (let i = 0; i < message.byzantineValidators.length; ++i) + $root.tendermint.types.Validator.encode(message.byzantineValidators[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.totalVotingPower != null && Object.hasOwnProperty.call(message, "totalVotingPower")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.totalVotingPower); + if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) + $root.google.protobuf.Timestamp.encode(message.timestamp, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LightClientAttackEvidence message, length delimited. Does not implicitly {@link tendermint.types.LightClientAttackEvidence.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.types.LightClientAttackEvidence + * @static + * @param {tendermint.types.ILightClientAttackEvidence} message LightClientAttackEvidence message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LightClientAttackEvidence.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LightClientAttackEvidence message from the specified reader or buffer. + * @function decode + * @memberof tendermint.types.LightClientAttackEvidence + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.types.LightClientAttackEvidence} LightClientAttackEvidence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LightClientAttackEvidence.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.LightClientAttackEvidence(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.conflictingBlock = $root.tendermint.types.LightBlock.decode(reader, reader.uint32()); + break; + case 2: + message.commonHeight = reader.int64(); + break; + case 3: + if (!(message.byzantineValidators && message.byzantineValidators.length)) + message.byzantineValidators = []; + message.byzantineValidators.push($root.tendermint.types.Validator.decode(reader, reader.uint32())); + break; + case 4: + message.totalVotingPower = reader.int64(); + break; + case 5: + message.timestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LightClientAttackEvidence message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.types.LightClientAttackEvidence + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.types.LightClientAttackEvidence} LightClientAttackEvidence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LightClientAttackEvidence.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LightClientAttackEvidence message. + * @function verify + * @memberof tendermint.types.LightClientAttackEvidence + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LightClientAttackEvidence.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.conflictingBlock != null && message.hasOwnProperty("conflictingBlock")) { + let error = $root.tendermint.types.LightBlock.verify(message.conflictingBlock); + if (error) + return "conflictingBlock." + error; + } + if (message.commonHeight != null && message.hasOwnProperty("commonHeight")) + if (!$util.isInteger(message.commonHeight) && !(message.commonHeight && $util.isInteger(message.commonHeight.low) && $util.isInteger(message.commonHeight.high))) + return "commonHeight: integer|Long expected"; + if (message.byzantineValidators != null && message.hasOwnProperty("byzantineValidators")) { + if (!Array.isArray(message.byzantineValidators)) + return "byzantineValidators: array expected"; + for (let i = 0; i < message.byzantineValidators.length; ++i) { + let error = $root.tendermint.types.Validator.verify(message.byzantineValidators[i]); + if (error) + return "byzantineValidators." + error; + } + } + if (message.totalVotingPower != null && message.hasOwnProperty("totalVotingPower")) + if (!$util.isInteger(message.totalVotingPower) && !(message.totalVotingPower && $util.isInteger(message.totalVotingPower.low) && $util.isInteger(message.totalVotingPower.high))) + return "totalVotingPower: integer|Long expected"; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) { + let error = $root.google.protobuf.Timestamp.verify(message.timestamp); + if (error) + return "timestamp." + error; + } + return null; + }; + + /** + * Creates a LightClientAttackEvidence message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.types.LightClientAttackEvidence + * @static + * @param {Object.} object Plain object + * @returns {tendermint.types.LightClientAttackEvidence} LightClientAttackEvidence + */ + LightClientAttackEvidence.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.types.LightClientAttackEvidence) + return object; + let message = new $root.tendermint.types.LightClientAttackEvidence(); + if (object.conflictingBlock != null) { + if (typeof object.conflictingBlock !== "object") + throw TypeError(".tendermint.types.LightClientAttackEvidence.conflictingBlock: object expected"); + message.conflictingBlock = $root.tendermint.types.LightBlock.fromObject(object.conflictingBlock); + } + if (object.commonHeight != null) + if ($util.Long) + (message.commonHeight = $util.Long.fromValue(object.commonHeight)).unsigned = false; + else if (typeof object.commonHeight === "string") + message.commonHeight = parseInt(object.commonHeight, 10); + else if (typeof object.commonHeight === "number") + message.commonHeight = object.commonHeight; + else if (typeof object.commonHeight === "object") + message.commonHeight = new $util.LongBits(object.commonHeight.low >>> 0, object.commonHeight.high >>> 0).toNumber(); + if (object.byzantineValidators) { + if (!Array.isArray(object.byzantineValidators)) + throw TypeError(".tendermint.types.LightClientAttackEvidence.byzantineValidators: array expected"); + message.byzantineValidators = []; + for (let i = 0; i < object.byzantineValidators.length; ++i) { + if (typeof object.byzantineValidators[i] !== "object") + throw TypeError(".tendermint.types.LightClientAttackEvidence.byzantineValidators: object expected"); + message.byzantineValidators[i] = $root.tendermint.types.Validator.fromObject(object.byzantineValidators[i]); + } + } + if (object.totalVotingPower != null) + if ($util.Long) + (message.totalVotingPower = $util.Long.fromValue(object.totalVotingPower)).unsigned = false; + else if (typeof object.totalVotingPower === "string") + message.totalVotingPower = parseInt(object.totalVotingPower, 10); + else if (typeof object.totalVotingPower === "number") + message.totalVotingPower = object.totalVotingPower; + else if (typeof object.totalVotingPower === "object") + message.totalVotingPower = new $util.LongBits(object.totalVotingPower.low >>> 0, object.totalVotingPower.high >>> 0).toNumber(); + if (object.timestamp != null) { + if (typeof object.timestamp !== "object") + throw TypeError(".tendermint.types.LightClientAttackEvidence.timestamp: object expected"); + message.timestamp = $root.google.protobuf.Timestamp.fromObject(object.timestamp); + } + return message; + }; + + /** + * Creates a plain object from a LightClientAttackEvidence message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.types.LightClientAttackEvidence + * @static + * @param {tendermint.types.LightClientAttackEvidence} message LightClientAttackEvidence + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LightClientAttackEvidence.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.byzantineValidators = []; + if (options.defaults) { + object.conflictingBlock = null; + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.commonHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.commonHeight = options.longs === String ? "0" : 0; + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.totalVotingPower = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.totalVotingPower = options.longs === String ? "0" : 0; + object.timestamp = null; + } + if (message.conflictingBlock != null && message.hasOwnProperty("conflictingBlock")) + object.conflictingBlock = $root.tendermint.types.LightBlock.toObject(message.conflictingBlock, options); + if (message.commonHeight != null && message.hasOwnProperty("commonHeight")) + if (typeof message.commonHeight === "number") + object.commonHeight = options.longs === String ? String(message.commonHeight) : message.commonHeight; + else + object.commonHeight = options.longs === String ? $util.Long.prototype.toString.call(message.commonHeight) : options.longs === Number ? new $util.LongBits(message.commonHeight.low >>> 0, message.commonHeight.high >>> 0).toNumber() : message.commonHeight; + if (message.byzantineValidators && message.byzantineValidators.length) { + object.byzantineValidators = []; + for (let j = 0; j < message.byzantineValidators.length; ++j) + object.byzantineValidators[j] = $root.tendermint.types.Validator.toObject(message.byzantineValidators[j], options); + } + if (message.totalVotingPower != null && message.hasOwnProperty("totalVotingPower")) + if (typeof message.totalVotingPower === "number") + object.totalVotingPower = options.longs === String ? String(message.totalVotingPower) : message.totalVotingPower; + else + object.totalVotingPower = options.longs === String ? $util.Long.prototype.toString.call(message.totalVotingPower) : options.longs === Number ? new $util.LongBits(message.totalVotingPower.low >>> 0, message.totalVotingPower.high >>> 0).toNumber() : message.totalVotingPower; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + object.timestamp = $root.google.protobuf.Timestamp.toObject(message.timestamp, options); + return object; + }; + + /** + * Converts this LightClientAttackEvidence to JSON. + * @function toJSON + * @memberof tendermint.types.LightClientAttackEvidence + * @instance + * @returns {Object.} JSON object + */ + LightClientAttackEvidence.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return LightClientAttackEvidence; + })(types.LightClientAttackEvidence || {}); + + types.EvidenceList = (function(EvidenceList) { + + /** + * Properties of an EvidenceList. + * @memberof tendermint.types + * @interface IEvidenceList + * @property {Array.|null} [evidence] EvidenceList evidence + */ + + /** + * Constructs a new EvidenceList. + * @memberof tendermint.types + * @classdesc Represents an EvidenceList. + * @implements IEvidenceList + * @constructor + * @param {tendermint.types.IEvidenceList=} [properties] Properties to set + */ + function EvidenceList(properties) { + this.evidence = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EvidenceList evidence. + * @member {Array.} evidence + * @memberof tendermint.types.EvidenceList + * @instance + */ + EvidenceList.prototype.evidence = $util.emptyArray; + + /** + * Creates a new EvidenceList instance using the specified properties. + * @function create + * @memberof tendermint.types.EvidenceList + * @static + * @param {tendermint.types.IEvidenceList=} [properties] Properties to set + * @returns {tendermint.types.EvidenceList} EvidenceList instance + */ + EvidenceList.create = function create(properties) { + return new EvidenceList(properties); + }; + + /** + * Encodes the specified EvidenceList message. Does not implicitly {@link tendermint.types.EvidenceList.verify|verify} messages. + * @function encode + * @memberof tendermint.types.EvidenceList + * @static + * @param {tendermint.types.IEvidenceList} message EvidenceList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EvidenceList.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.evidence != null && message.evidence.length) + for (let i = 0; i < message.evidence.length; ++i) + $root.tendermint.types.Evidence.encode(message.evidence[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EvidenceList message, length delimited. Does not implicitly {@link tendermint.types.EvidenceList.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.types.EvidenceList + * @static + * @param {tendermint.types.IEvidenceList} message EvidenceList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EvidenceList.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EvidenceList message from the specified reader or buffer. + * @function decode + * @memberof tendermint.types.EvidenceList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.types.EvidenceList} EvidenceList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EvidenceList.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.EvidenceList(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.evidence && message.evidence.length)) + message.evidence = []; + message.evidence.push($root.tendermint.types.Evidence.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EvidenceList message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.types.EvidenceList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.types.EvidenceList} EvidenceList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EvidenceList.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EvidenceList message. + * @function verify + * @memberof tendermint.types.EvidenceList + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EvidenceList.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.evidence != null && message.hasOwnProperty("evidence")) { + if (!Array.isArray(message.evidence)) + return "evidence: array expected"; + for (let i = 0; i < message.evidence.length; ++i) { + let error = $root.tendermint.types.Evidence.verify(message.evidence[i]); + if (error) + return "evidence." + error; + } + } + return null; + }; + + /** + * Creates an EvidenceList message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.types.EvidenceList + * @static + * @param {Object.} object Plain object + * @returns {tendermint.types.EvidenceList} EvidenceList + */ + EvidenceList.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.types.EvidenceList) + return object; + let message = new $root.tendermint.types.EvidenceList(); + if (object.evidence) { + if (!Array.isArray(object.evidence)) + throw TypeError(".tendermint.types.EvidenceList.evidence: array expected"); + message.evidence = []; + for (let i = 0; i < object.evidence.length; ++i) { + if (typeof object.evidence[i] !== "object") + throw TypeError(".tendermint.types.EvidenceList.evidence: object expected"); + message.evidence[i] = $root.tendermint.types.Evidence.fromObject(object.evidence[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EvidenceList message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.types.EvidenceList + * @static + * @param {tendermint.types.EvidenceList} message EvidenceList + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EvidenceList.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.evidence = []; + if (message.evidence && message.evidence.length) { + object.evidence = []; + for (let j = 0; j < message.evidence.length; ++j) + object.evidence[j] = $root.tendermint.types.Evidence.toObject(message.evidence[j], options); + } + return object; + }; + + /** + * Converts this EvidenceList to JSON. + * @function toJSON + * @memberof tendermint.types.EvidenceList + * @instance + * @returns {Object.} JSON object + */ + EvidenceList.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EvidenceList; + })(types.EvidenceList || {}); + + types.ConsensusParams = (function(ConsensusParams) { + + /** + * Properties of a ConsensusParams. + * @memberof tendermint.types + * @interface IConsensusParams + * @property {tendermint.types.IBlockParams|null} [block] ConsensusParams block + * @property {tendermint.types.IEvidenceParams|null} [evidence] ConsensusParams evidence + * @property {tendermint.types.IValidatorParams|null} [validator] ConsensusParams validator + * @property {tendermint.types.IVersionParams|null} [version] ConsensusParams version + */ + + /** + * Constructs a new ConsensusParams. + * @memberof tendermint.types + * @classdesc Represents a ConsensusParams. + * @implements IConsensusParams + * @constructor + * @param {tendermint.types.IConsensusParams=} [properties] Properties to set + */ + function ConsensusParams(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ConsensusParams block. + * @member {tendermint.types.IBlockParams|null|undefined} block + * @memberof tendermint.types.ConsensusParams + * @instance + */ + ConsensusParams.prototype.block = null; + + /** + * ConsensusParams evidence. + * @member {tendermint.types.IEvidenceParams|null|undefined} evidence + * @memberof tendermint.types.ConsensusParams + * @instance + */ + ConsensusParams.prototype.evidence = null; + + /** + * ConsensusParams validator. + * @member {tendermint.types.IValidatorParams|null|undefined} validator + * @memberof tendermint.types.ConsensusParams + * @instance + */ + ConsensusParams.prototype.validator = null; + + /** + * ConsensusParams version. + * @member {tendermint.types.IVersionParams|null|undefined} version + * @memberof tendermint.types.ConsensusParams + * @instance + */ + ConsensusParams.prototype.version = null; + + /** + * Creates a new ConsensusParams instance using the specified properties. + * @function create + * @memberof tendermint.types.ConsensusParams + * @static + * @param {tendermint.types.IConsensusParams=} [properties] Properties to set + * @returns {tendermint.types.ConsensusParams} ConsensusParams instance + */ + ConsensusParams.create = function create(properties) { + return new ConsensusParams(properties); + }; + + /** + * Encodes the specified ConsensusParams message. Does not implicitly {@link tendermint.types.ConsensusParams.verify|verify} messages. + * @function encode + * @memberof tendermint.types.ConsensusParams + * @static + * @param {tendermint.types.IConsensusParams} message ConsensusParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConsensusParams.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.block != null && Object.hasOwnProperty.call(message, "block")) + $root.tendermint.types.BlockParams.encode(message.block, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.evidence != null && Object.hasOwnProperty.call(message, "evidence")) + $root.tendermint.types.EvidenceParams.encode(message.evidence, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.validator != null && Object.hasOwnProperty.call(message, "validator")) + $root.tendermint.types.ValidatorParams.encode(message.validator, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + $root.tendermint.types.VersionParams.encode(message.version, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ConsensusParams message, length delimited. Does not implicitly {@link tendermint.types.ConsensusParams.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.types.ConsensusParams + * @static + * @param {tendermint.types.IConsensusParams} message ConsensusParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConsensusParams.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConsensusParams message from the specified reader or buffer. + * @function decode + * @memberof tendermint.types.ConsensusParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.types.ConsensusParams} ConsensusParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConsensusParams.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.ConsensusParams(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.block = $root.tendermint.types.BlockParams.decode(reader, reader.uint32()); + break; + case 2: + message.evidence = $root.tendermint.types.EvidenceParams.decode(reader, reader.uint32()); + break; + case 3: + message.validator = $root.tendermint.types.ValidatorParams.decode(reader, reader.uint32()); + break; + case 4: + message.version = $root.tendermint.types.VersionParams.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ConsensusParams message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.types.ConsensusParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.types.ConsensusParams} ConsensusParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConsensusParams.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConsensusParams message. + * @function verify + * @memberof tendermint.types.ConsensusParams + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConsensusParams.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.block != null && message.hasOwnProperty("block")) { + let error = $root.tendermint.types.BlockParams.verify(message.block); + if (error) + return "block." + error; + } + if (message.evidence != null && message.hasOwnProperty("evidence")) { + let error = $root.tendermint.types.EvidenceParams.verify(message.evidence); + if (error) + return "evidence." + error; + } + if (message.validator != null && message.hasOwnProperty("validator")) { + let error = $root.tendermint.types.ValidatorParams.verify(message.validator); + if (error) + return "validator." + error; + } + if (message.version != null && message.hasOwnProperty("version")) { + let error = $root.tendermint.types.VersionParams.verify(message.version); + if (error) + return "version." + error; + } + return null; + }; + + /** + * Creates a ConsensusParams message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.types.ConsensusParams + * @static + * @param {Object.} object Plain object + * @returns {tendermint.types.ConsensusParams} ConsensusParams + */ + ConsensusParams.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.types.ConsensusParams) + return object; + let message = new $root.tendermint.types.ConsensusParams(); + if (object.block != null) { + if (typeof object.block !== "object") + throw TypeError(".tendermint.types.ConsensusParams.block: object expected"); + message.block = $root.tendermint.types.BlockParams.fromObject(object.block); + } + if (object.evidence != null) { + if (typeof object.evidence !== "object") + throw TypeError(".tendermint.types.ConsensusParams.evidence: object expected"); + message.evidence = $root.tendermint.types.EvidenceParams.fromObject(object.evidence); + } + if (object.validator != null) { + if (typeof object.validator !== "object") + throw TypeError(".tendermint.types.ConsensusParams.validator: object expected"); + message.validator = $root.tendermint.types.ValidatorParams.fromObject(object.validator); + } + if (object.version != null) { + if (typeof object.version !== "object") + throw TypeError(".tendermint.types.ConsensusParams.version: object expected"); + message.version = $root.tendermint.types.VersionParams.fromObject(object.version); + } + return message; + }; + + /** + * Creates a plain object from a ConsensusParams message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.types.ConsensusParams + * @static + * @param {tendermint.types.ConsensusParams} message ConsensusParams + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConsensusParams.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.block = null; + object.evidence = null; + object.validator = null; + object.version = null; + } + if (message.block != null && message.hasOwnProperty("block")) + object.block = $root.tendermint.types.BlockParams.toObject(message.block, options); + if (message.evidence != null && message.hasOwnProperty("evidence")) + object.evidence = $root.tendermint.types.EvidenceParams.toObject(message.evidence, options); + if (message.validator != null && message.hasOwnProperty("validator")) + object.validator = $root.tendermint.types.ValidatorParams.toObject(message.validator, options); + if (message.version != null && message.hasOwnProperty("version")) + object.version = $root.tendermint.types.VersionParams.toObject(message.version, options); + return object; + }; + + /** + * Converts this ConsensusParams to JSON. + * @function toJSON + * @memberof tendermint.types.ConsensusParams + * @instance + * @returns {Object.} JSON object + */ + ConsensusParams.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ConsensusParams; + })(types.ConsensusParams || {}); + + types.BlockParams = (function(BlockParams) { + + /** + * Properties of a BlockParams. + * @memberof tendermint.types + * @interface IBlockParams + * @property {number|Long|null} [maxBytes] BlockParams maxBytes + * @property {number|Long|null} [maxGas] BlockParams maxGas + * @property {number|Long|null} [timeIotaMs] BlockParams timeIotaMs + */ + + /** + * Constructs a new BlockParams. + * @memberof tendermint.types + * @classdesc Represents a BlockParams. + * @implements IBlockParams + * @constructor + * @param {tendermint.types.IBlockParams=} [properties] Properties to set + */ + function BlockParams(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BlockParams maxBytes. + * @member {number|Long} maxBytes + * @memberof tendermint.types.BlockParams + * @instance + */ + BlockParams.prototype.maxBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * BlockParams maxGas. + * @member {number|Long} maxGas + * @memberof tendermint.types.BlockParams + * @instance + */ + BlockParams.prototype.maxGas = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * BlockParams timeIotaMs. + * @member {number|Long} timeIotaMs + * @memberof tendermint.types.BlockParams + * @instance + */ + BlockParams.prototype.timeIotaMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new BlockParams instance using the specified properties. + * @function create + * @memberof tendermint.types.BlockParams + * @static + * @param {tendermint.types.IBlockParams=} [properties] Properties to set + * @returns {tendermint.types.BlockParams} BlockParams instance + */ + BlockParams.create = function create(properties) { + return new BlockParams(properties); + }; + + /** + * Encodes the specified BlockParams message. Does not implicitly {@link tendermint.types.BlockParams.verify|verify} messages. + * @function encode + * @memberof tendermint.types.BlockParams + * @static + * @param {tendermint.types.IBlockParams} message BlockParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BlockParams.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.maxBytes != null && Object.hasOwnProperty.call(message, "maxBytes")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.maxBytes); + if (message.maxGas != null && Object.hasOwnProperty.call(message, "maxGas")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.maxGas); + if (message.timeIotaMs != null && Object.hasOwnProperty.call(message, "timeIotaMs")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.timeIotaMs); + return writer; + }; + + /** + * Encodes the specified BlockParams message, length delimited. Does not implicitly {@link tendermint.types.BlockParams.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.types.BlockParams + * @static + * @param {tendermint.types.IBlockParams} message BlockParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BlockParams.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BlockParams message from the specified reader or buffer. + * @function decode + * @memberof tendermint.types.BlockParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.types.BlockParams} BlockParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BlockParams.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.BlockParams(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.maxBytes = reader.int64(); + break; + case 2: + message.maxGas = reader.int64(); + break; + case 3: + message.timeIotaMs = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BlockParams message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.types.BlockParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.types.BlockParams} BlockParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BlockParams.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BlockParams message. + * @function verify + * @memberof tendermint.types.BlockParams + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BlockParams.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.maxBytes != null && message.hasOwnProperty("maxBytes")) + if (!$util.isInteger(message.maxBytes) && !(message.maxBytes && $util.isInteger(message.maxBytes.low) && $util.isInteger(message.maxBytes.high))) + return "maxBytes: integer|Long expected"; + if (message.maxGas != null && message.hasOwnProperty("maxGas")) + if (!$util.isInteger(message.maxGas) && !(message.maxGas && $util.isInteger(message.maxGas.low) && $util.isInteger(message.maxGas.high))) + return "maxGas: integer|Long expected"; + if (message.timeIotaMs != null && message.hasOwnProperty("timeIotaMs")) + if (!$util.isInteger(message.timeIotaMs) && !(message.timeIotaMs && $util.isInteger(message.timeIotaMs.low) && $util.isInteger(message.timeIotaMs.high))) + return "timeIotaMs: integer|Long expected"; + return null; + }; + + /** + * Creates a BlockParams message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.types.BlockParams + * @static + * @param {Object.} object Plain object + * @returns {tendermint.types.BlockParams} BlockParams + */ + BlockParams.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.types.BlockParams) + return object; + let message = new $root.tendermint.types.BlockParams(); + if (object.maxBytes != null) + if ($util.Long) + (message.maxBytes = $util.Long.fromValue(object.maxBytes)).unsigned = false; + else if (typeof object.maxBytes === "string") + message.maxBytes = parseInt(object.maxBytes, 10); + else if (typeof object.maxBytes === "number") + message.maxBytes = object.maxBytes; + else if (typeof object.maxBytes === "object") + message.maxBytes = new $util.LongBits(object.maxBytes.low >>> 0, object.maxBytes.high >>> 0).toNumber(); + if (object.maxGas != null) + if ($util.Long) + (message.maxGas = $util.Long.fromValue(object.maxGas)).unsigned = false; + else if (typeof object.maxGas === "string") + message.maxGas = parseInt(object.maxGas, 10); + else if (typeof object.maxGas === "number") + message.maxGas = object.maxGas; + else if (typeof object.maxGas === "object") + message.maxGas = new $util.LongBits(object.maxGas.low >>> 0, object.maxGas.high >>> 0).toNumber(); + if (object.timeIotaMs != null) + if ($util.Long) + (message.timeIotaMs = $util.Long.fromValue(object.timeIotaMs)).unsigned = false; + else if (typeof object.timeIotaMs === "string") + message.timeIotaMs = parseInt(object.timeIotaMs, 10); + else if (typeof object.timeIotaMs === "number") + message.timeIotaMs = object.timeIotaMs; + else if (typeof object.timeIotaMs === "object") + message.timeIotaMs = new $util.LongBits(object.timeIotaMs.low >>> 0, object.timeIotaMs.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a BlockParams message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.types.BlockParams + * @static + * @param {tendermint.types.BlockParams} message BlockParams + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BlockParams.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.maxBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.maxBytes = options.longs === String ? "0" : 0; + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.maxGas = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.maxGas = options.longs === String ? "0" : 0; + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.timeIotaMs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.timeIotaMs = options.longs === String ? "0" : 0; + } + if (message.maxBytes != null && message.hasOwnProperty("maxBytes")) + if (typeof message.maxBytes === "number") + object.maxBytes = options.longs === String ? String(message.maxBytes) : message.maxBytes; + else + object.maxBytes = options.longs === String ? $util.Long.prototype.toString.call(message.maxBytes) : options.longs === Number ? new $util.LongBits(message.maxBytes.low >>> 0, message.maxBytes.high >>> 0).toNumber() : message.maxBytes; + if (message.maxGas != null && message.hasOwnProperty("maxGas")) + if (typeof message.maxGas === "number") + object.maxGas = options.longs === String ? String(message.maxGas) : message.maxGas; + else + object.maxGas = options.longs === String ? $util.Long.prototype.toString.call(message.maxGas) : options.longs === Number ? new $util.LongBits(message.maxGas.low >>> 0, message.maxGas.high >>> 0).toNumber() : message.maxGas; + if (message.timeIotaMs != null && message.hasOwnProperty("timeIotaMs")) + if (typeof message.timeIotaMs === "number") + object.timeIotaMs = options.longs === String ? String(message.timeIotaMs) : message.timeIotaMs; + else + object.timeIotaMs = options.longs === String ? $util.Long.prototype.toString.call(message.timeIotaMs) : options.longs === Number ? new $util.LongBits(message.timeIotaMs.low >>> 0, message.timeIotaMs.high >>> 0).toNumber() : message.timeIotaMs; + return object; + }; + + /** + * Converts this BlockParams to JSON. + * @function toJSON + * @memberof tendermint.types.BlockParams + * @instance + * @returns {Object.} JSON object + */ + BlockParams.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return BlockParams; + })(types.BlockParams || {}); + + types.EvidenceParams = (function(EvidenceParams) { + + /** + * Properties of an EvidenceParams. + * @memberof tendermint.types + * @interface IEvidenceParams + * @property {number|Long|null} [maxAgeNumBlocks] EvidenceParams maxAgeNumBlocks + * @property {google.protobuf.IDuration|null} [maxAgeDuration] EvidenceParams maxAgeDuration + * @property {number|Long|null} [maxBytes] EvidenceParams maxBytes + */ + + /** + * Constructs a new EvidenceParams. + * @memberof tendermint.types + * @classdesc Represents an EvidenceParams. + * @implements IEvidenceParams + * @constructor + * @param {tendermint.types.IEvidenceParams=} [properties] Properties to set + */ + function EvidenceParams(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EvidenceParams maxAgeNumBlocks. + * @member {number|Long} maxAgeNumBlocks + * @memberof tendermint.types.EvidenceParams + * @instance + */ + EvidenceParams.prototype.maxAgeNumBlocks = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * EvidenceParams maxAgeDuration. + * @member {google.protobuf.IDuration|null|undefined} maxAgeDuration + * @memberof tendermint.types.EvidenceParams + * @instance + */ + EvidenceParams.prototype.maxAgeDuration = null; + + /** + * EvidenceParams maxBytes. + * @member {number|Long} maxBytes + * @memberof tendermint.types.EvidenceParams + * @instance + */ + EvidenceParams.prototype.maxBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new EvidenceParams instance using the specified properties. + * @function create + * @memberof tendermint.types.EvidenceParams + * @static + * @param {tendermint.types.IEvidenceParams=} [properties] Properties to set + * @returns {tendermint.types.EvidenceParams} EvidenceParams instance + */ + EvidenceParams.create = function create(properties) { + return new EvidenceParams(properties); + }; + + /** + * Encodes the specified EvidenceParams message. Does not implicitly {@link tendermint.types.EvidenceParams.verify|verify} messages. + * @function encode + * @memberof tendermint.types.EvidenceParams + * @static + * @param {tendermint.types.IEvidenceParams} message EvidenceParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EvidenceParams.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.maxAgeNumBlocks != null && Object.hasOwnProperty.call(message, "maxAgeNumBlocks")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.maxAgeNumBlocks); + if (message.maxAgeDuration != null && Object.hasOwnProperty.call(message, "maxAgeDuration")) + $root.google.protobuf.Duration.encode(message.maxAgeDuration, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.maxBytes != null && Object.hasOwnProperty.call(message, "maxBytes")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.maxBytes); + return writer; + }; + + /** + * Encodes the specified EvidenceParams message, length delimited. Does not implicitly {@link tendermint.types.EvidenceParams.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.types.EvidenceParams + * @static + * @param {tendermint.types.IEvidenceParams} message EvidenceParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EvidenceParams.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EvidenceParams message from the specified reader or buffer. + * @function decode + * @memberof tendermint.types.EvidenceParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.types.EvidenceParams} EvidenceParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EvidenceParams.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.EvidenceParams(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.maxAgeNumBlocks = reader.int64(); + break; + case 2: + message.maxAgeDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + case 3: + message.maxBytes = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EvidenceParams message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.types.EvidenceParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.types.EvidenceParams} EvidenceParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EvidenceParams.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EvidenceParams message. + * @function verify + * @memberof tendermint.types.EvidenceParams + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EvidenceParams.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.maxAgeNumBlocks != null && message.hasOwnProperty("maxAgeNumBlocks")) + if (!$util.isInteger(message.maxAgeNumBlocks) && !(message.maxAgeNumBlocks && $util.isInteger(message.maxAgeNumBlocks.low) && $util.isInteger(message.maxAgeNumBlocks.high))) + return "maxAgeNumBlocks: integer|Long expected"; + if (message.maxAgeDuration != null && message.hasOwnProperty("maxAgeDuration")) { + let error = $root.google.protobuf.Duration.verify(message.maxAgeDuration); + if (error) + return "maxAgeDuration." + error; + } + if (message.maxBytes != null && message.hasOwnProperty("maxBytes")) + if (!$util.isInteger(message.maxBytes) && !(message.maxBytes && $util.isInteger(message.maxBytes.low) && $util.isInteger(message.maxBytes.high))) + return "maxBytes: integer|Long expected"; + return null; + }; + + /** + * Creates an EvidenceParams message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.types.EvidenceParams + * @static + * @param {Object.} object Plain object + * @returns {tendermint.types.EvidenceParams} EvidenceParams + */ + EvidenceParams.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.types.EvidenceParams) + return object; + let message = new $root.tendermint.types.EvidenceParams(); + if (object.maxAgeNumBlocks != null) + if ($util.Long) + (message.maxAgeNumBlocks = $util.Long.fromValue(object.maxAgeNumBlocks)).unsigned = false; + else if (typeof object.maxAgeNumBlocks === "string") + message.maxAgeNumBlocks = parseInt(object.maxAgeNumBlocks, 10); + else if (typeof object.maxAgeNumBlocks === "number") + message.maxAgeNumBlocks = object.maxAgeNumBlocks; + else if (typeof object.maxAgeNumBlocks === "object") + message.maxAgeNumBlocks = new $util.LongBits(object.maxAgeNumBlocks.low >>> 0, object.maxAgeNumBlocks.high >>> 0).toNumber(); + if (object.maxAgeDuration != null) { + if (typeof object.maxAgeDuration !== "object") + throw TypeError(".tendermint.types.EvidenceParams.maxAgeDuration: object expected"); + message.maxAgeDuration = $root.google.protobuf.Duration.fromObject(object.maxAgeDuration); + } + if (object.maxBytes != null) + if ($util.Long) + (message.maxBytes = $util.Long.fromValue(object.maxBytes)).unsigned = false; + else if (typeof object.maxBytes === "string") + message.maxBytes = parseInt(object.maxBytes, 10); + else if (typeof object.maxBytes === "number") + message.maxBytes = object.maxBytes; + else if (typeof object.maxBytes === "object") + message.maxBytes = new $util.LongBits(object.maxBytes.low >>> 0, object.maxBytes.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from an EvidenceParams message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.types.EvidenceParams + * @static + * @param {tendermint.types.EvidenceParams} message EvidenceParams + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EvidenceParams.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.maxAgeNumBlocks = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.maxAgeNumBlocks = options.longs === String ? "0" : 0; + object.maxAgeDuration = null; + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.maxBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.maxBytes = options.longs === String ? "0" : 0; + } + if (message.maxAgeNumBlocks != null && message.hasOwnProperty("maxAgeNumBlocks")) + if (typeof message.maxAgeNumBlocks === "number") + object.maxAgeNumBlocks = options.longs === String ? String(message.maxAgeNumBlocks) : message.maxAgeNumBlocks; + else + object.maxAgeNumBlocks = options.longs === String ? $util.Long.prototype.toString.call(message.maxAgeNumBlocks) : options.longs === Number ? new $util.LongBits(message.maxAgeNumBlocks.low >>> 0, message.maxAgeNumBlocks.high >>> 0).toNumber() : message.maxAgeNumBlocks; + if (message.maxAgeDuration != null && message.hasOwnProperty("maxAgeDuration")) + object.maxAgeDuration = $root.google.protobuf.Duration.toObject(message.maxAgeDuration, options); + if (message.maxBytes != null && message.hasOwnProperty("maxBytes")) + if (typeof message.maxBytes === "number") + object.maxBytes = options.longs === String ? String(message.maxBytes) : message.maxBytes; + else + object.maxBytes = options.longs === String ? $util.Long.prototype.toString.call(message.maxBytes) : options.longs === Number ? new $util.LongBits(message.maxBytes.low >>> 0, message.maxBytes.high >>> 0).toNumber() : message.maxBytes; + return object; + }; + + /** + * Converts this EvidenceParams to JSON. + * @function toJSON + * @memberof tendermint.types.EvidenceParams + * @instance + * @returns {Object.} JSON object + */ + EvidenceParams.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EvidenceParams; + })(types.EvidenceParams || {}); + + types.ValidatorParams = (function(ValidatorParams) { + + /** + * Properties of a ValidatorParams. + * @memberof tendermint.types + * @interface IValidatorParams + * @property {Array.|null} [pubKeyTypes] ValidatorParams pubKeyTypes + */ + + /** + * Constructs a new ValidatorParams. + * @memberof tendermint.types + * @classdesc Represents a ValidatorParams. + * @implements IValidatorParams + * @constructor + * @param {tendermint.types.IValidatorParams=} [properties] Properties to set + */ + function ValidatorParams(properties) { + this.pubKeyTypes = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ValidatorParams pubKeyTypes. + * @member {Array.} pubKeyTypes + * @memberof tendermint.types.ValidatorParams + * @instance + */ + ValidatorParams.prototype.pubKeyTypes = $util.emptyArray; + + /** + * Creates a new ValidatorParams instance using the specified properties. + * @function create + * @memberof tendermint.types.ValidatorParams + * @static + * @param {tendermint.types.IValidatorParams=} [properties] Properties to set + * @returns {tendermint.types.ValidatorParams} ValidatorParams instance + */ + ValidatorParams.create = function create(properties) { + return new ValidatorParams(properties); + }; + + /** + * Encodes the specified ValidatorParams message. Does not implicitly {@link tendermint.types.ValidatorParams.verify|verify} messages. + * @function encode + * @memberof tendermint.types.ValidatorParams + * @static + * @param {tendermint.types.IValidatorParams} message ValidatorParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValidatorParams.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pubKeyTypes != null && message.pubKeyTypes.length) + for (let i = 0; i < message.pubKeyTypes.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.pubKeyTypes[i]); + return writer; + }; + + /** + * Encodes the specified ValidatorParams message, length delimited. Does not implicitly {@link tendermint.types.ValidatorParams.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.types.ValidatorParams + * @static + * @param {tendermint.types.IValidatorParams} message ValidatorParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValidatorParams.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ValidatorParams message from the specified reader or buffer. + * @function decode + * @memberof tendermint.types.ValidatorParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.types.ValidatorParams} ValidatorParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValidatorParams.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.ValidatorParams(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.pubKeyTypes && message.pubKeyTypes.length)) + message.pubKeyTypes = []; + message.pubKeyTypes.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ValidatorParams message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.types.ValidatorParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.types.ValidatorParams} ValidatorParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValidatorParams.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ValidatorParams message. + * @function verify + * @memberof tendermint.types.ValidatorParams + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ValidatorParams.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.pubKeyTypes != null && message.hasOwnProperty("pubKeyTypes")) { + if (!Array.isArray(message.pubKeyTypes)) + return "pubKeyTypes: array expected"; + for (let i = 0; i < message.pubKeyTypes.length; ++i) + if (!$util.isString(message.pubKeyTypes[i])) + return "pubKeyTypes: string[] expected"; + } + return null; + }; + + /** + * Creates a ValidatorParams message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.types.ValidatorParams + * @static + * @param {Object.} object Plain object + * @returns {tendermint.types.ValidatorParams} ValidatorParams + */ + ValidatorParams.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.types.ValidatorParams) + return object; + let message = new $root.tendermint.types.ValidatorParams(); + if (object.pubKeyTypes) { + if (!Array.isArray(object.pubKeyTypes)) + throw TypeError(".tendermint.types.ValidatorParams.pubKeyTypes: array expected"); + message.pubKeyTypes = []; + for (let i = 0; i < object.pubKeyTypes.length; ++i) + message.pubKeyTypes[i] = String(object.pubKeyTypes[i]); + } + return message; + }; + + /** + * Creates a plain object from a ValidatorParams message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.types.ValidatorParams + * @static + * @param {tendermint.types.ValidatorParams} message ValidatorParams + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ValidatorParams.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.pubKeyTypes = []; + if (message.pubKeyTypes && message.pubKeyTypes.length) { + object.pubKeyTypes = []; + for (let j = 0; j < message.pubKeyTypes.length; ++j) + object.pubKeyTypes[j] = message.pubKeyTypes[j]; + } + return object; + }; + + /** + * Converts this ValidatorParams to JSON. + * @function toJSON + * @memberof tendermint.types.ValidatorParams + * @instance + * @returns {Object.} JSON object + */ + ValidatorParams.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ValidatorParams; + })(types.ValidatorParams || {}); + + types.VersionParams = (function(VersionParams) { + + /** + * Properties of a VersionParams. + * @memberof tendermint.types + * @interface IVersionParams + * @property {number|Long|null} [appVersion] VersionParams appVersion + */ + + /** + * Constructs a new VersionParams. + * @memberof tendermint.types + * @classdesc Represents a VersionParams. + * @implements IVersionParams + * @constructor + * @param {tendermint.types.IVersionParams=} [properties] Properties to set + */ + function VersionParams(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * VersionParams appVersion. + * @member {number|Long} appVersion + * @memberof tendermint.types.VersionParams + * @instance + */ + VersionParams.prototype.appVersion = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new VersionParams instance using the specified properties. + * @function create + * @memberof tendermint.types.VersionParams + * @static + * @param {tendermint.types.IVersionParams=} [properties] Properties to set + * @returns {tendermint.types.VersionParams} VersionParams instance + */ + VersionParams.create = function create(properties) { + return new VersionParams(properties); + }; + + /** + * Encodes the specified VersionParams message. Does not implicitly {@link tendermint.types.VersionParams.verify|verify} messages. + * @function encode + * @memberof tendermint.types.VersionParams + * @static + * @param {tendermint.types.IVersionParams} message VersionParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VersionParams.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.appVersion != null && Object.hasOwnProperty.call(message, "appVersion")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.appVersion); + return writer; + }; + + /** + * Encodes the specified VersionParams message, length delimited. Does not implicitly {@link tendermint.types.VersionParams.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.types.VersionParams + * @static + * @param {tendermint.types.IVersionParams} message VersionParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VersionParams.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VersionParams message from the specified reader or buffer. + * @function decode + * @memberof tendermint.types.VersionParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.types.VersionParams} VersionParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VersionParams.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.VersionParams(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.appVersion = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VersionParams message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.types.VersionParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.types.VersionParams} VersionParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VersionParams.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VersionParams message. + * @function verify + * @memberof tendermint.types.VersionParams + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VersionParams.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.appVersion != null && message.hasOwnProperty("appVersion")) + if (!$util.isInteger(message.appVersion) && !(message.appVersion && $util.isInteger(message.appVersion.low) && $util.isInteger(message.appVersion.high))) + return "appVersion: integer|Long expected"; + return null; + }; + + /** + * Creates a VersionParams message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.types.VersionParams + * @static + * @param {Object.} object Plain object + * @returns {tendermint.types.VersionParams} VersionParams + */ + VersionParams.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.types.VersionParams) + return object; + let message = new $root.tendermint.types.VersionParams(); + if (object.appVersion != null) + if ($util.Long) + (message.appVersion = $util.Long.fromValue(object.appVersion)).unsigned = true; + else if (typeof object.appVersion === "string") + message.appVersion = parseInt(object.appVersion, 10); + else if (typeof object.appVersion === "number") + message.appVersion = object.appVersion; + else if (typeof object.appVersion === "object") + message.appVersion = new $util.LongBits(object.appVersion.low >>> 0, object.appVersion.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a VersionParams message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.types.VersionParams + * @static + * @param {tendermint.types.VersionParams} message VersionParams + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VersionParams.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.appVersion = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.appVersion = options.longs === String ? "0" : 0; + if (message.appVersion != null && message.hasOwnProperty("appVersion")) + if (typeof message.appVersion === "number") + object.appVersion = options.longs === String ? String(message.appVersion) : message.appVersion; + else + object.appVersion = options.longs === String ? $util.Long.prototype.toString.call(message.appVersion) : options.longs === Number ? new $util.LongBits(message.appVersion.low >>> 0, message.appVersion.high >>> 0).toNumber(true) : message.appVersion; + return object; + }; + + /** + * Converts this VersionParams to JSON. + * @function toJSON + * @memberof tendermint.types.VersionParams + * @instance + * @returns {Object.} JSON object + */ + VersionParams.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return VersionParams; + })(types.VersionParams || {}); + + types.HashedParams = (function(HashedParams) { + + /** + * Properties of a HashedParams. + * @memberof tendermint.types + * @interface IHashedParams + * @property {number|Long|null} [blockMaxBytes] HashedParams blockMaxBytes + * @property {number|Long|null} [blockMaxGas] HashedParams blockMaxGas + */ + + /** + * Constructs a new HashedParams. + * @memberof tendermint.types + * @classdesc Represents a HashedParams. + * @implements IHashedParams + * @constructor + * @param {tendermint.types.IHashedParams=} [properties] Properties to set + */ + function HashedParams(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HashedParams blockMaxBytes. + * @member {number|Long} blockMaxBytes + * @memberof tendermint.types.HashedParams + * @instance + */ + HashedParams.prototype.blockMaxBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * HashedParams blockMaxGas. + * @member {number|Long} blockMaxGas + * @memberof tendermint.types.HashedParams + * @instance + */ + HashedParams.prototype.blockMaxGas = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new HashedParams instance using the specified properties. + * @function create + * @memberof tendermint.types.HashedParams + * @static + * @param {tendermint.types.IHashedParams=} [properties] Properties to set + * @returns {tendermint.types.HashedParams} HashedParams instance + */ + HashedParams.create = function create(properties) { + return new HashedParams(properties); + }; + + /** + * Encodes the specified HashedParams message. Does not implicitly {@link tendermint.types.HashedParams.verify|verify} messages. + * @function encode + * @memberof tendermint.types.HashedParams + * @static + * @param {tendermint.types.IHashedParams} message HashedParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HashedParams.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.blockMaxBytes != null && Object.hasOwnProperty.call(message, "blockMaxBytes")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.blockMaxBytes); + if (message.blockMaxGas != null && Object.hasOwnProperty.call(message, "blockMaxGas")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.blockMaxGas); + return writer; + }; + + /** + * Encodes the specified HashedParams message, length delimited. Does not implicitly {@link tendermint.types.HashedParams.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.types.HashedParams + * @static + * @param {tendermint.types.IHashedParams} message HashedParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HashedParams.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HashedParams message from the specified reader or buffer. + * @function decode + * @memberof tendermint.types.HashedParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.types.HashedParams} HashedParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HashedParams.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.HashedParams(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.blockMaxBytes = reader.int64(); + break; + case 2: + message.blockMaxGas = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HashedParams message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.types.HashedParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.types.HashedParams} HashedParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HashedParams.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HashedParams message. + * @function verify + * @memberof tendermint.types.HashedParams + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HashedParams.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.blockMaxBytes != null && message.hasOwnProperty("blockMaxBytes")) + if (!$util.isInteger(message.blockMaxBytes) && !(message.blockMaxBytes && $util.isInteger(message.blockMaxBytes.low) && $util.isInteger(message.blockMaxBytes.high))) + return "blockMaxBytes: integer|Long expected"; + if (message.blockMaxGas != null && message.hasOwnProperty("blockMaxGas")) + if (!$util.isInteger(message.blockMaxGas) && !(message.blockMaxGas && $util.isInteger(message.blockMaxGas.low) && $util.isInteger(message.blockMaxGas.high))) + return "blockMaxGas: integer|Long expected"; + return null; + }; + + /** + * Creates a HashedParams message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.types.HashedParams + * @static + * @param {Object.} object Plain object + * @returns {tendermint.types.HashedParams} HashedParams + */ + HashedParams.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.types.HashedParams) + return object; + let message = new $root.tendermint.types.HashedParams(); + if (object.blockMaxBytes != null) + if ($util.Long) + (message.blockMaxBytes = $util.Long.fromValue(object.blockMaxBytes)).unsigned = false; + else if (typeof object.blockMaxBytes === "string") + message.blockMaxBytes = parseInt(object.blockMaxBytes, 10); + else if (typeof object.blockMaxBytes === "number") + message.blockMaxBytes = object.blockMaxBytes; + else if (typeof object.blockMaxBytes === "object") + message.blockMaxBytes = new $util.LongBits(object.blockMaxBytes.low >>> 0, object.blockMaxBytes.high >>> 0).toNumber(); + if (object.blockMaxGas != null) + if ($util.Long) + (message.blockMaxGas = $util.Long.fromValue(object.blockMaxGas)).unsigned = false; + else if (typeof object.blockMaxGas === "string") + message.blockMaxGas = parseInt(object.blockMaxGas, 10); + else if (typeof object.blockMaxGas === "number") + message.blockMaxGas = object.blockMaxGas; + else if (typeof object.blockMaxGas === "object") + message.blockMaxGas = new $util.LongBits(object.blockMaxGas.low >>> 0, object.blockMaxGas.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a HashedParams message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.types.HashedParams + * @static + * @param {tendermint.types.HashedParams} message HashedParams + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HashedParams.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.blockMaxBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.blockMaxBytes = options.longs === String ? "0" : 0; + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.blockMaxGas = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.blockMaxGas = options.longs === String ? "0" : 0; + } + if (message.blockMaxBytes != null && message.hasOwnProperty("blockMaxBytes")) + if (typeof message.blockMaxBytes === "number") + object.blockMaxBytes = options.longs === String ? String(message.blockMaxBytes) : message.blockMaxBytes; + else + object.blockMaxBytes = options.longs === String ? $util.Long.prototype.toString.call(message.blockMaxBytes) : options.longs === Number ? new $util.LongBits(message.blockMaxBytes.low >>> 0, message.blockMaxBytes.high >>> 0).toNumber() : message.blockMaxBytes; + if (message.blockMaxGas != null && message.hasOwnProperty("blockMaxGas")) + if (typeof message.blockMaxGas === "number") + object.blockMaxGas = options.longs === String ? String(message.blockMaxGas) : message.blockMaxGas; + else + object.blockMaxGas = options.longs === String ? $util.Long.prototype.toString.call(message.blockMaxGas) : options.longs === Number ? new $util.LongBits(message.blockMaxGas.low >>> 0, message.blockMaxGas.high >>> 0).toNumber() : message.blockMaxGas; + return object; + }; + + /** + * Converts this HashedParams to JSON. + * @function toJSON + * @memberof tendermint.types.HashedParams + * @instance + * @returns {Object.} JSON object + */ + HashedParams.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return HashedParams; + })(types.HashedParams || {}); + + /** + * BlockIDFlag enum. + * @name tendermint.types.BlockIDFlag + * @enum {string} + * @property {number} BLOCK_ID_FLAG_UNKNOWN=0 BLOCK_ID_FLAG_UNKNOWN value + * @property {number} BLOCK_ID_FLAG_ABSENT=1 BLOCK_ID_FLAG_ABSENT value + * @property {number} BLOCK_ID_FLAG_COMMIT=2 BLOCK_ID_FLAG_COMMIT value + * @property {number} BLOCK_ID_FLAG_NIL=3 BLOCK_ID_FLAG_NIL value + */ + types.BlockIDFlag = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "BLOCK_ID_FLAG_UNKNOWN"] = 0; + values[valuesById[1] = "BLOCK_ID_FLAG_ABSENT"] = 1; + values[valuesById[2] = "BLOCK_ID_FLAG_COMMIT"] = 2; + values[valuesById[3] = "BLOCK_ID_FLAG_NIL"] = 3; + return values; + })(); + + /** + * SignedMsgType enum. + * @name tendermint.types.SignedMsgType + * @enum {string} + * @property {number} SIGNED_MSG_TYPE_UNKNOWN=0 SIGNED_MSG_TYPE_UNKNOWN value + * @property {number} SIGNED_MSG_TYPE_PREVOTE=1 SIGNED_MSG_TYPE_PREVOTE value + * @property {number} SIGNED_MSG_TYPE_PRECOMMIT=2 SIGNED_MSG_TYPE_PRECOMMIT value + * @property {number} SIGNED_MSG_TYPE_PROPOSAL=32 SIGNED_MSG_TYPE_PROPOSAL value + */ + types.SignedMsgType = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SIGNED_MSG_TYPE_UNKNOWN"] = 0; + values[valuesById[1] = "SIGNED_MSG_TYPE_PREVOTE"] = 1; + values[valuesById[2] = "SIGNED_MSG_TYPE_PRECOMMIT"] = 2; + values[valuesById[32] = "SIGNED_MSG_TYPE_PROPOSAL"] = 32; + return values; + })(); + + types.PartSetHeader = (function(PartSetHeader) { + + /** + * Properties of a PartSetHeader. + * @memberof tendermint.types + * @interface IPartSetHeader + * @property {number|null} [total] PartSetHeader total + * @property {Uint8Array|null} [hash] PartSetHeader hash + */ + + /** + * Constructs a new PartSetHeader. + * @memberof tendermint.types + * @classdesc Represents a PartSetHeader. + * @implements IPartSetHeader + * @constructor + * @param {tendermint.types.IPartSetHeader=} [properties] Properties to set + */ + function PartSetHeader(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PartSetHeader total. + * @member {number} total + * @memberof tendermint.types.PartSetHeader + * @instance + */ + PartSetHeader.prototype.total = 0; + + /** + * PartSetHeader hash. + * @member {Uint8Array} hash + * @memberof tendermint.types.PartSetHeader + * @instance + */ + PartSetHeader.prototype.hash = $util.newBuffer([]); + + /** + * Creates a new PartSetHeader instance using the specified properties. + * @function create + * @memberof tendermint.types.PartSetHeader + * @static + * @param {tendermint.types.IPartSetHeader=} [properties] Properties to set + * @returns {tendermint.types.PartSetHeader} PartSetHeader instance + */ + PartSetHeader.create = function create(properties) { + return new PartSetHeader(properties); + }; + + /** + * Encodes the specified PartSetHeader message. Does not implicitly {@link tendermint.types.PartSetHeader.verify|verify} messages. + * @function encode + * @memberof tendermint.types.PartSetHeader + * @static + * @param {tendermint.types.IPartSetHeader} message PartSetHeader message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PartSetHeader.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.total != null && Object.hasOwnProperty.call(message, "total")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.total); + if (message.hash != null && Object.hasOwnProperty.call(message, "hash")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.hash); + return writer; + }; + + /** + * Encodes the specified PartSetHeader message, length delimited. Does not implicitly {@link tendermint.types.PartSetHeader.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.types.PartSetHeader + * @static + * @param {tendermint.types.IPartSetHeader} message PartSetHeader message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PartSetHeader.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PartSetHeader message from the specified reader or buffer. + * @function decode + * @memberof tendermint.types.PartSetHeader + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.types.PartSetHeader} PartSetHeader + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PartSetHeader.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.PartSetHeader(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.total = reader.uint32(); + break; + case 2: + message.hash = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PartSetHeader message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.types.PartSetHeader + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.types.PartSetHeader} PartSetHeader + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PartSetHeader.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PartSetHeader message. + * @function verify + * @memberof tendermint.types.PartSetHeader + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PartSetHeader.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.total != null && message.hasOwnProperty("total")) + if (!$util.isInteger(message.total)) + return "total: integer expected"; + if (message.hash != null && message.hasOwnProperty("hash")) + if (!(message.hash && typeof message.hash.length === "number" || $util.isString(message.hash))) + return "hash: buffer expected"; + return null; + }; + + /** + * Creates a PartSetHeader message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.types.PartSetHeader + * @static + * @param {Object.} object Plain object + * @returns {tendermint.types.PartSetHeader} PartSetHeader + */ + PartSetHeader.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.types.PartSetHeader) + return object; + let message = new $root.tendermint.types.PartSetHeader(); + if (object.total != null) + message.total = object.total >>> 0; + if (object.hash != null) + if (typeof object.hash === "string") + $util.base64.decode(object.hash, message.hash = $util.newBuffer($util.base64.length(object.hash)), 0); + else if (object.hash.length) + message.hash = object.hash; + return message; + }; + + /** + * Creates a plain object from a PartSetHeader message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.types.PartSetHeader + * @static + * @param {tendermint.types.PartSetHeader} message PartSetHeader + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PartSetHeader.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.total = 0; + if (options.bytes === String) + object.hash = ""; + else { + object.hash = []; + if (options.bytes !== Array) + object.hash = $util.newBuffer(object.hash); + } + } + if (message.total != null && message.hasOwnProperty("total")) + object.total = message.total; + if (message.hash != null && message.hasOwnProperty("hash")) + object.hash = options.bytes === String ? $util.base64.encode(message.hash, 0, message.hash.length) : options.bytes === Array ? Array.prototype.slice.call(message.hash) : message.hash; + return object; + }; + + /** + * Converts this PartSetHeader to JSON. + * @function toJSON + * @memberof tendermint.types.PartSetHeader + * @instance + * @returns {Object.} JSON object + */ + PartSetHeader.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PartSetHeader; + })(types.PartSetHeader || {}); + + types.Part = (function(Part) { + + /** + * Properties of a Part. + * @memberof tendermint.types + * @interface IPart + * @property {number|null} [index] Part index + * @property {Uint8Array|null} [bytes] Part bytes + * @property {tendermint.crypto.IProof|null} [proof] Part proof + */ + + /** + * Constructs a new Part. + * @memberof tendermint.types + * @classdesc Represents a Part. + * @implements IPart + * @constructor + * @param {tendermint.types.IPart=} [properties] Properties to set + */ + function Part(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Part index. + * @member {number} index + * @memberof tendermint.types.Part + * @instance + */ + Part.prototype.index = 0; + + /** + * Part bytes. + * @member {Uint8Array} bytes + * @memberof tendermint.types.Part + * @instance + */ + Part.prototype.bytes = $util.newBuffer([]); + + /** + * Part proof. + * @member {tendermint.crypto.IProof|null|undefined} proof + * @memberof tendermint.types.Part + * @instance + */ + Part.prototype.proof = null; + + /** + * Creates a new Part instance using the specified properties. + * @function create + * @memberof tendermint.types.Part + * @static + * @param {tendermint.types.IPart=} [properties] Properties to set + * @returns {tendermint.types.Part} Part instance + */ + Part.create = function create(properties) { + return new Part(properties); + }; + + /** + * Encodes the specified Part message. Does not implicitly {@link tendermint.types.Part.verify|verify} messages. + * @function encode + * @memberof tendermint.types.Part + * @static + * @param {tendermint.types.IPart} message Part message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Part.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.index != null && Object.hasOwnProperty.call(message, "index")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.index); + if (message.bytes != null && Object.hasOwnProperty.call(message, "bytes")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.bytes); + if (message.proof != null && Object.hasOwnProperty.call(message, "proof")) + $root.tendermint.crypto.Proof.encode(message.proof, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Part message, length delimited. Does not implicitly {@link tendermint.types.Part.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.types.Part + * @static + * @param {tendermint.types.IPart} message Part message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Part.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Part message from the specified reader or buffer. + * @function decode + * @memberof tendermint.types.Part + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.types.Part} Part + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Part.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.Part(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.index = reader.uint32(); + break; + case 2: + message.bytes = reader.bytes(); + break; + case 3: + message.proof = $root.tendermint.crypto.Proof.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Part message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.types.Part + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.types.Part} Part + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Part.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Part message. + * @function verify + * @memberof tendermint.types.Part + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Part.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.index != null && message.hasOwnProperty("index")) + if (!$util.isInteger(message.index)) + return "index: integer expected"; + if (message.bytes != null && message.hasOwnProperty("bytes")) + if (!(message.bytes && typeof message.bytes.length === "number" || $util.isString(message.bytes))) + return "bytes: buffer expected"; + if (message.proof != null && message.hasOwnProperty("proof")) { + let error = $root.tendermint.crypto.Proof.verify(message.proof); + if (error) + return "proof." + error; + } + return null; + }; + + /** + * Creates a Part message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.types.Part + * @static + * @param {Object.} object Plain object + * @returns {tendermint.types.Part} Part + */ + Part.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.types.Part) + return object; + let message = new $root.tendermint.types.Part(); + if (object.index != null) + message.index = object.index >>> 0; + if (object.bytes != null) + if (typeof object.bytes === "string") + $util.base64.decode(object.bytes, message.bytes = $util.newBuffer($util.base64.length(object.bytes)), 0); + else if (object.bytes.length) + message.bytes = object.bytes; + if (object.proof != null) { + if (typeof object.proof !== "object") + throw TypeError(".tendermint.types.Part.proof: object expected"); + message.proof = $root.tendermint.crypto.Proof.fromObject(object.proof); + } + return message; + }; + + /** + * Creates a plain object from a Part message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.types.Part + * @static + * @param {tendermint.types.Part} message Part + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Part.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.index = 0; + if (options.bytes === String) + object.bytes = ""; + else { + object.bytes = []; + if (options.bytes !== Array) + object.bytes = $util.newBuffer(object.bytes); + } + object.proof = null; + } + if (message.index != null && message.hasOwnProperty("index")) + object.index = message.index; + if (message.bytes != null && message.hasOwnProperty("bytes")) + object.bytes = options.bytes === String ? $util.base64.encode(message.bytes, 0, message.bytes.length) : options.bytes === Array ? Array.prototype.slice.call(message.bytes) : message.bytes; + if (message.proof != null && message.hasOwnProperty("proof")) + object.proof = $root.tendermint.crypto.Proof.toObject(message.proof, options); + return object; + }; + + /** + * Converts this Part to JSON. + * @function toJSON + * @memberof tendermint.types.Part + * @instance + * @returns {Object.} JSON object + */ + Part.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Part; + })(types.Part || {}); + + types.BlockID = (function(BlockID) { + + /** + * Properties of a BlockID. + * @memberof tendermint.types + * @interface IBlockID + * @property {Uint8Array|null} [hash] BlockID hash + * @property {tendermint.types.IPartSetHeader|null} [partSetHeader] BlockID partSetHeader + */ + + /** + * Constructs a new BlockID. + * @memberof tendermint.types + * @classdesc Represents a BlockID. + * @implements IBlockID + * @constructor + * @param {tendermint.types.IBlockID=} [properties] Properties to set + */ + function BlockID(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BlockID hash. + * @member {Uint8Array} hash + * @memberof tendermint.types.BlockID + * @instance + */ + BlockID.prototype.hash = $util.newBuffer([]); + + /** + * BlockID partSetHeader. + * @member {tendermint.types.IPartSetHeader|null|undefined} partSetHeader + * @memberof tendermint.types.BlockID + * @instance + */ + BlockID.prototype.partSetHeader = null; + + /** + * Creates a new BlockID instance using the specified properties. + * @function create + * @memberof tendermint.types.BlockID + * @static + * @param {tendermint.types.IBlockID=} [properties] Properties to set + * @returns {tendermint.types.BlockID} BlockID instance + */ + BlockID.create = function create(properties) { + return new BlockID(properties); + }; + + /** + * Encodes the specified BlockID message. Does not implicitly {@link tendermint.types.BlockID.verify|verify} messages. + * @function encode + * @memberof tendermint.types.BlockID + * @static + * @param {tendermint.types.IBlockID} message BlockID message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BlockID.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.hash != null && Object.hasOwnProperty.call(message, "hash")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.hash); + if (message.partSetHeader != null && Object.hasOwnProperty.call(message, "partSetHeader")) + $root.tendermint.types.PartSetHeader.encode(message.partSetHeader, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BlockID message, length delimited. Does not implicitly {@link tendermint.types.BlockID.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.types.BlockID + * @static + * @param {tendermint.types.IBlockID} message BlockID message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BlockID.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BlockID message from the specified reader or buffer. + * @function decode + * @memberof tendermint.types.BlockID + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.types.BlockID} BlockID + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BlockID.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.BlockID(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.hash = reader.bytes(); + break; + case 2: + message.partSetHeader = $root.tendermint.types.PartSetHeader.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BlockID message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.types.BlockID + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.types.BlockID} BlockID + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BlockID.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BlockID message. + * @function verify + * @memberof tendermint.types.BlockID + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BlockID.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.hash != null && message.hasOwnProperty("hash")) + if (!(message.hash && typeof message.hash.length === "number" || $util.isString(message.hash))) + return "hash: buffer expected"; + if (message.partSetHeader != null && message.hasOwnProperty("partSetHeader")) { + let error = $root.tendermint.types.PartSetHeader.verify(message.partSetHeader); + if (error) + return "partSetHeader." + error; + } + return null; + }; + + /** + * Creates a BlockID message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.types.BlockID + * @static + * @param {Object.} object Plain object + * @returns {tendermint.types.BlockID} BlockID + */ + BlockID.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.types.BlockID) + return object; + let message = new $root.tendermint.types.BlockID(); + if (object.hash != null) + if (typeof object.hash === "string") + $util.base64.decode(object.hash, message.hash = $util.newBuffer($util.base64.length(object.hash)), 0); + else if (object.hash.length) + message.hash = object.hash; + if (object.partSetHeader != null) { + if (typeof object.partSetHeader !== "object") + throw TypeError(".tendermint.types.BlockID.partSetHeader: object expected"); + message.partSetHeader = $root.tendermint.types.PartSetHeader.fromObject(object.partSetHeader); + } + return message; + }; + + /** + * Creates a plain object from a BlockID message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.types.BlockID + * @static + * @param {tendermint.types.BlockID} message BlockID + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BlockID.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + if (options.bytes === String) + object.hash = ""; + else { + object.hash = []; + if (options.bytes !== Array) + object.hash = $util.newBuffer(object.hash); + } + object.partSetHeader = null; + } + if (message.hash != null && message.hasOwnProperty("hash")) + object.hash = options.bytes === String ? $util.base64.encode(message.hash, 0, message.hash.length) : options.bytes === Array ? Array.prototype.slice.call(message.hash) : message.hash; + if (message.partSetHeader != null && message.hasOwnProperty("partSetHeader")) + object.partSetHeader = $root.tendermint.types.PartSetHeader.toObject(message.partSetHeader, options); + return object; + }; + + /** + * Converts this BlockID to JSON. + * @function toJSON + * @memberof tendermint.types.BlockID + * @instance + * @returns {Object.} JSON object + */ + BlockID.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return BlockID; + })(types.BlockID || {}); + + types.Header = (function(Header) { + + /** + * Properties of a Header. + * @memberof tendermint.types + * @interface IHeader + * @property {tendermint.version.IConsensus|null} [version] Header version + * @property {string|null} [chainId] Header chainId + * @property {number|Long|null} [height] Header height + * @property {google.protobuf.ITimestamp|null} [time] Header time + * @property {tendermint.types.IBlockID|null} [lastBlockId] Header lastBlockId + * @property {Uint8Array|null} [lastCommitHash] Header lastCommitHash + * @property {Uint8Array|null} [dataHash] Header dataHash + * @property {Uint8Array|null} [validatorsHash] Header validatorsHash + * @property {Uint8Array|null} [nextValidatorsHash] Header nextValidatorsHash + * @property {Uint8Array|null} [consensusHash] Header consensusHash + * @property {Uint8Array|null} [appHash] Header appHash + * @property {Uint8Array|null} [lastResultsHash] Header lastResultsHash + * @property {Uint8Array|null} [evidenceHash] Header evidenceHash + * @property {Uint8Array|null} [proposerAddress] Header proposerAddress + */ + + /** + * Constructs a new Header. + * @memberof tendermint.types + * @classdesc Represents a Header. + * @implements IHeader + * @constructor + * @param {tendermint.types.IHeader=} [properties] Properties to set + */ + function Header(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Header version. + * @member {tendermint.version.IConsensus|null|undefined} version + * @memberof tendermint.types.Header + * @instance + */ + Header.prototype.version = null; + + /** + * Header chainId. + * @member {string} chainId + * @memberof tendermint.types.Header + * @instance + */ + Header.prototype.chainId = ""; + + /** + * Header height. + * @member {number|Long} height + * @memberof tendermint.types.Header + * @instance + */ + Header.prototype.height = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Header time. + * @member {google.protobuf.ITimestamp|null|undefined} time + * @memberof tendermint.types.Header + * @instance + */ + Header.prototype.time = null; + + /** + * Header lastBlockId. + * @member {tendermint.types.IBlockID|null|undefined} lastBlockId + * @memberof tendermint.types.Header + * @instance + */ + Header.prototype.lastBlockId = null; + + /** + * Header lastCommitHash. + * @member {Uint8Array} lastCommitHash + * @memberof tendermint.types.Header + * @instance + */ + Header.prototype.lastCommitHash = $util.newBuffer([]); + + /** + * Header dataHash. + * @member {Uint8Array} dataHash + * @memberof tendermint.types.Header + * @instance + */ + Header.prototype.dataHash = $util.newBuffer([]); + + /** + * Header validatorsHash. + * @member {Uint8Array} validatorsHash + * @memberof tendermint.types.Header + * @instance + */ + Header.prototype.validatorsHash = $util.newBuffer([]); + + /** + * Header nextValidatorsHash. + * @member {Uint8Array} nextValidatorsHash + * @memberof tendermint.types.Header + * @instance + */ + Header.prototype.nextValidatorsHash = $util.newBuffer([]); + + /** + * Header consensusHash. + * @member {Uint8Array} consensusHash + * @memberof tendermint.types.Header + * @instance + */ + Header.prototype.consensusHash = $util.newBuffer([]); + + /** + * Header appHash. + * @member {Uint8Array} appHash + * @memberof tendermint.types.Header + * @instance + */ + Header.prototype.appHash = $util.newBuffer([]); + + /** + * Header lastResultsHash. + * @member {Uint8Array} lastResultsHash + * @memberof tendermint.types.Header + * @instance + */ + Header.prototype.lastResultsHash = $util.newBuffer([]); + + /** + * Header evidenceHash. + * @member {Uint8Array} evidenceHash + * @memberof tendermint.types.Header + * @instance + */ + Header.prototype.evidenceHash = $util.newBuffer([]); + + /** + * Header proposerAddress. + * @member {Uint8Array} proposerAddress + * @memberof tendermint.types.Header + * @instance + */ + Header.prototype.proposerAddress = $util.newBuffer([]); + + /** + * Creates a new Header instance using the specified properties. + * @function create + * @memberof tendermint.types.Header + * @static + * @param {tendermint.types.IHeader=} [properties] Properties to set + * @returns {tendermint.types.Header} Header instance + */ + Header.create = function create(properties) { + return new Header(properties); + }; + + /** + * Encodes the specified Header message. Does not implicitly {@link tendermint.types.Header.verify|verify} messages. + * @function encode + * @memberof tendermint.types.Header + * @static + * @param {tendermint.types.IHeader} message Header message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Header.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + $root.tendermint.version.Consensus.encode(message.version, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.chainId != null && Object.hasOwnProperty.call(message, "chainId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.chainId); + if (message.height != null && Object.hasOwnProperty.call(message, "height")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.height); + if (message.time != null && Object.hasOwnProperty.call(message, "time")) + $root.google.protobuf.Timestamp.encode(message.time, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.lastBlockId != null && Object.hasOwnProperty.call(message, "lastBlockId")) + $root.tendermint.types.BlockID.encode(message.lastBlockId, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.lastCommitHash != null && Object.hasOwnProperty.call(message, "lastCommitHash")) + writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.lastCommitHash); + if (message.dataHash != null && Object.hasOwnProperty.call(message, "dataHash")) + writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.dataHash); + if (message.validatorsHash != null && Object.hasOwnProperty.call(message, "validatorsHash")) + writer.uint32(/* id 8, wireType 2 =*/66).bytes(message.validatorsHash); + if (message.nextValidatorsHash != null && Object.hasOwnProperty.call(message, "nextValidatorsHash")) + writer.uint32(/* id 9, wireType 2 =*/74).bytes(message.nextValidatorsHash); + if (message.consensusHash != null && Object.hasOwnProperty.call(message, "consensusHash")) + writer.uint32(/* id 10, wireType 2 =*/82).bytes(message.consensusHash); + if (message.appHash != null && Object.hasOwnProperty.call(message, "appHash")) + writer.uint32(/* id 11, wireType 2 =*/90).bytes(message.appHash); + if (message.lastResultsHash != null && Object.hasOwnProperty.call(message, "lastResultsHash")) + writer.uint32(/* id 12, wireType 2 =*/98).bytes(message.lastResultsHash); + if (message.evidenceHash != null && Object.hasOwnProperty.call(message, "evidenceHash")) + writer.uint32(/* id 13, wireType 2 =*/106).bytes(message.evidenceHash); + if (message.proposerAddress != null && Object.hasOwnProperty.call(message, "proposerAddress")) + writer.uint32(/* id 14, wireType 2 =*/114).bytes(message.proposerAddress); + return writer; + }; + + /** + * Encodes the specified Header message, length delimited. Does not implicitly {@link tendermint.types.Header.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.types.Header + * @static + * @param {tendermint.types.IHeader} message Header message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Header.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Header message from the specified reader or buffer. + * @function decode + * @memberof tendermint.types.Header + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.types.Header} Header + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Header.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.Header(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.version = $root.tendermint.version.Consensus.decode(reader, reader.uint32()); + break; + case 2: + message.chainId = reader.string(); + break; + case 3: + message.height = reader.int64(); + break; + case 4: + message.time = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 5: + message.lastBlockId = $root.tendermint.types.BlockID.decode(reader, reader.uint32()); + break; + case 6: + message.lastCommitHash = reader.bytes(); + break; + case 7: + message.dataHash = reader.bytes(); + break; + case 8: + message.validatorsHash = reader.bytes(); + break; + case 9: + message.nextValidatorsHash = reader.bytes(); + break; + case 10: + message.consensusHash = reader.bytes(); + break; + case 11: + message.appHash = reader.bytes(); + break; + case 12: + message.lastResultsHash = reader.bytes(); + break; + case 13: + message.evidenceHash = reader.bytes(); + break; + case 14: + message.proposerAddress = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Header message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.types.Header + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.types.Header} Header + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Header.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Header message. + * @function verify + * @memberof tendermint.types.Header + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Header.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.version != null && message.hasOwnProperty("version")) { + let error = $root.tendermint.version.Consensus.verify(message.version); + if (error) + return "version." + error; + } + if (message.chainId != null && message.hasOwnProperty("chainId")) + if (!$util.isString(message.chainId)) + return "chainId: string expected"; + if (message.height != null && message.hasOwnProperty("height")) + if (!$util.isInteger(message.height) && !(message.height && $util.isInteger(message.height.low) && $util.isInteger(message.height.high))) + return "height: integer|Long expected"; + if (message.time != null && message.hasOwnProperty("time")) { + let error = $root.google.protobuf.Timestamp.verify(message.time); + if (error) + return "time." + error; + } + if (message.lastBlockId != null && message.hasOwnProperty("lastBlockId")) { + let error = $root.tendermint.types.BlockID.verify(message.lastBlockId); + if (error) + return "lastBlockId." + error; + } + if (message.lastCommitHash != null && message.hasOwnProperty("lastCommitHash")) + if (!(message.lastCommitHash && typeof message.lastCommitHash.length === "number" || $util.isString(message.lastCommitHash))) + return "lastCommitHash: buffer expected"; + if (message.dataHash != null && message.hasOwnProperty("dataHash")) + if (!(message.dataHash && typeof message.dataHash.length === "number" || $util.isString(message.dataHash))) + return "dataHash: buffer expected"; + if (message.validatorsHash != null && message.hasOwnProperty("validatorsHash")) + if (!(message.validatorsHash && typeof message.validatorsHash.length === "number" || $util.isString(message.validatorsHash))) + return "validatorsHash: buffer expected"; + if (message.nextValidatorsHash != null && message.hasOwnProperty("nextValidatorsHash")) + if (!(message.nextValidatorsHash && typeof message.nextValidatorsHash.length === "number" || $util.isString(message.nextValidatorsHash))) + return "nextValidatorsHash: buffer expected"; + if (message.consensusHash != null && message.hasOwnProperty("consensusHash")) + if (!(message.consensusHash && typeof message.consensusHash.length === "number" || $util.isString(message.consensusHash))) + return "consensusHash: buffer expected"; + if (message.appHash != null && message.hasOwnProperty("appHash")) + if (!(message.appHash && typeof message.appHash.length === "number" || $util.isString(message.appHash))) + return "appHash: buffer expected"; + if (message.lastResultsHash != null && message.hasOwnProperty("lastResultsHash")) + if (!(message.lastResultsHash && typeof message.lastResultsHash.length === "number" || $util.isString(message.lastResultsHash))) + return "lastResultsHash: buffer expected"; + if (message.evidenceHash != null && message.hasOwnProperty("evidenceHash")) + if (!(message.evidenceHash && typeof message.evidenceHash.length === "number" || $util.isString(message.evidenceHash))) + return "evidenceHash: buffer expected"; + if (message.proposerAddress != null && message.hasOwnProperty("proposerAddress")) + if (!(message.proposerAddress && typeof message.proposerAddress.length === "number" || $util.isString(message.proposerAddress))) + return "proposerAddress: buffer expected"; + return null; + }; + + /** + * Creates a Header message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.types.Header + * @static + * @param {Object.} object Plain object + * @returns {tendermint.types.Header} Header + */ + Header.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.types.Header) + return object; + let message = new $root.tendermint.types.Header(); + if (object.version != null) { + if (typeof object.version !== "object") + throw TypeError(".tendermint.types.Header.version: object expected"); + message.version = $root.tendermint.version.Consensus.fromObject(object.version); + } + if (object.chainId != null) + message.chainId = String(object.chainId); + if (object.height != null) + if ($util.Long) + (message.height = $util.Long.fromValue(object.height)).unsigned = false; + else if (typeof object.height === "string") + message.height = parseInt(object.height, 10); + else if (typeof object.height === "number") + message.height = object.height; + else if (typeof object.height === "object") + message.height = new $util.LongBits(object.height.low >>> 0, object.height.high >>> 0).toNumber(); + if (object.time != null) { + if (typeof object.time !== "object") + throw TypeError(".tendermint.types.Header.time: object expected"); + message.time = $root.google.protobuf.Timestamp.fromObject(object.time); + } + if (object.lastBlockId != null) { + if (typeof object.lastBlockId !== "object") + throw TypeError(".tendermint.types.Header.lastBlockId: object expected"); + message.lastBlockId = $root.tendermint.types.BlockID.fromObject(object.lastBlockId); + } + if (object.lastCommitHash != null) + if (typeof object.lastCommitHash === "string") + $util.base64.decode(object.lastCommitHash, message.lastCommitHash = $util.newBuffer($util.base64.length(object.lastCommitHash)), 0); + else if (object.lastCommitHash.length) + message.lastCommitHash = object.lastCommitHash; + if (object.dataHash != null) + if (typeof object.dataHash === "string") + $util.base64.decode(object.dataHash, message.dataHash = $util.newBuffer($util.base64.length(object.dataHash)), 0); + else if (object.dataHash.length) + message.dataHash = object.dataHash; + if (object.validatorsHash != null) + if (typeof object.validatorsHash === "string") + $util.base64.decode(object.validatorsHash, message.validatorsHash = $util.newBuffer($util.base64.length(object.validatorsHash)), 0); + else if (object.validatorsHash.length) + message.validatorsHash = object.validatorsHash; + if (object.nextValidatorsHash != null) + if (typeof object.nextValidatorsHash === "string") + $util.base64.decode(object.nextValidatorsHash, message.nextValidatorsHash = $util.newBuffer($util.base64.length(object.nextValidatorsHash)), 0); + else if (object.nextValidatorsHash.length) + message.nextValidatorsHash = object.nextValidatorsHash; + if (object.consensusHash != null) + if (typeof object.consensusHash === "string") + $util.base64.decode(object.consensusHash, message.consensusHash = $util.newBuffer($util.base64.length(object.consensusHash)), 0); + else if (object.consensusHash.length) + message.consensusHash = object.consensusHash; + if (object.appHash != null) + if (typeof object.appHash === "string") + $util.base64.decode(object.appHash, message.appHash = $util.newBuffer($util.base64.length(object.appHash)), 0); + else if (object.appHash.length) + message.appHash = object.appHash; + if (object.lastResultsHash != null) + if (typeof object.lastResultsHash === "string") + $util.base64.decode(object.lastResultsHash, message.lastResultsHash = $util.newBuffer($util.base64.length(object.lastResultsHash)), 0); + else if (object.lastResultsHash.length) + message.lastResultsHash = object.lastResultsHash; + if (object.evidenceHash != null) + if (typeof object.evidenceHash === "string") + $util.base64.decode(object.evidenceHash, message.evidenceHash = $util.newBuffer($util.base64.length(object.evidenceHash)), 0); + else if (object.evidenceHash.length) + message.evidenceHash = object.evidenceHash; + if (object.proposerAddress != null) + if (typeof object.proposerAddress === "string") + $util.base64.decode(object.proposerAddress, message.proposerAddress = $util.newBuffer($util.base64.length(object.proposerAddress)), 0); + else if (object.proposerAddress.length) + message.proposerAddress = object.proposerAddress; + return message; + }; + + /** + * Creates a plain object from a Header message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.types.Header + * @static + * @param {tendermint.types.Header} message Header + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Header.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.version = null; + object.chainId = ""; + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.height = options.longs === String ? "0" : 0; + object.time = null; + object.lastBlockId = null; + if (options.bytes === String) + object.lastCommitHash = ""; + else { + object.lastCommitHash = []; + if (options.bytes !== Array) + object.lastCommitHash = $util.newBuffer(object.lastCommitHash); + } + if (options.bytes === String) + object.dataHash = ""; + else { + object.dataHash = []; + if (options.bytes !== Array) + object.dataHash = $util.newBuffer(object.dataHash); + } + if (options.bytes === String) + object.validatorsHash = ""; + else { + object.validatorsHash = []; + if (options.bytes !== Array) + object.validatorsHash = $util.newBuffer(object.validatorsHash); + } + if (options.bytes === String) + object.nextValidatorsHash = ""; + else { + object.nextValidatorsHash = []; + if (options.bytes !== Array) + object.nextValidatorsHash = $util.newBuffer(object.nextValidatorsHash); + } + if (options.bytes === String) + object.consensusHash = ""; + else { + object.consensusHash = []; + if (options.bytes !== Array) + object.consensusHash = $util.newBuffer(object.consensusHash); + } + if (options.bytes === String) + object.appHash = ""; + else { + object.appHash = []; + if (options.bytes !== Array) + object.appHash = $util.newBuffer(object.appHash); + } + if (options.bytes === String) + object.lastResultsHash = ""; + else { + object.lastResultsHash = []; + if (options.bytes !== Array) + object.lastResultsHash = $util.newBuffer(object.lastResultsHash); + } + if (options.bytes === String) + object.evidenceHash = ""; + else { + object.evidenceHash = []; + if (options.bytes !== Array) + object.evidenceHash = $util.newBuffer(object.evidenceHash); + } + if (options.bytes === String) + object.proposerAddress = ""; + else { + object.proposerAddress = []; + if (options.bytes !== Array) + object.proposerAddress = $util.newBuffer(object.proposerAddress); + } + } + if (message.version != null && message.hasOwnProperty("version")) + object.version = $root.tendermint.version.Consensus.toObject(message.version, options); + if (message.chainId != null && message.hasOwnProperty("chainId")) + object.chainId = message.chainId; + if (message.height != null && message.hasOwnProperty("height")) + if (typeof message.height === "number") + object.height = options.longs === String ? String(message.height) : message.height; + else + object.height = options.longs === String ? $util.Long.prototype.toString.call(message.height) : options.longs === Number ? new $util.LongBits(message.height.low >>> 0, message.height.high >>> 0).toNumber() : message.height; + if (message.time != null && message.hasOwnProperty("time")) + object.time = $root.google.protobuf.Timestamp.toObject(message.time, options); + if (message.lastBlockId != null && message.hasOwnProperty("lastBlockId")) + object.lastBlockId = $root.tendermint.types.BlockID.toObject(message.lastBlockId, options); + if (message.lastCommitHash != null && message.hasOwnProperty("lastCommitHash")) + object.lastCommitHash = options.bytes === String ? $util.base64.encode(message.lastCommitHash, 0, message.lastCommitHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.lastCommitHash) : message.lastCommitHash; + if (message.dataHash != null && message.hasOwnProperty("dataHash")) + object.dataHash = options.bytes === String ? $util.base64.encode(message.dataHash, 0, message.dataHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.dataHash) : message.dataHash; + if (message.validatorsHash != null && message.hasOwnProperty("validatorsHash")) + object.validatorsHash = options.bytes === String ? $util.base64.encode(message.validatorsHash, 0, message.validatorsHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.validatorsHash) : message.validatorsHash; + if (message.nextValidatorsHash != null && message.hasOwnProperty("nextValidatorsHash")) + object.nextValidatorsHash = options.bytes === String ? $util.base64.encode(message.nextValidatorsHash, 0, message.nextValidatorsHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.nextValidatorsHash) : message.nextValidatorsHash; + if (message.consensusHash != null && message.hasOwnProperty("consensusHash")) + object.consensusHash = options.bytes === String ? $util.base64.encode(message.consensusHash, 0, message.consensusHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.consensusHash) : message.consensusHash; + if (message.appHash != null && message.hasOwnProperty("appHash")) + object.appHash = options.bytes === String ? $util.base64.encode(message.appHash, 0, message.appHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.appHash) : message.appHash; + if (message.lastResultsHash != null && message.hasOwnProperty("lastResultsHash")) + object.lastResultsHash = options.bytes === String ? $util.base64.encode(message.lastResultsHash, 0, message.lastResultsHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.lastResultsHash) : message.lastResultsHash; + if (message.evidenceHash != null && message.hasOwnProperty("evidenceHash")) + object.evidenceHash = options.bytes === String ? $util.base64.encode(message.evidenceHash, 0, message.evidenceHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.evidenceHash) : message.evidenceHash; + if (message.proposerAddress != null && message.hasOwnProperty("proposerAddress")) + object.proposerAddress = options.bytes === String ? $util.base64.encode(message.proposerAddress, 0, message.proposerAddress.length) : options.bytes === Array ? Array.prototype.slice.call(message.proposerAddress) : message.proposerAddress; + return object; + }; + + /** + * Converts this Header to JSON. + * @function toJSON + * @memberof tendermint.types.Header + * @instance + * @returns {Object.} JSON object + */ + Header.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Header; + })(types.Header || {}); + + types.Data = (function(Data) { + + /** + * Properties of a Data. + * @memberof tendermint.types + * @interface IData + * @property {Array.|null} [txs] Data txs + */ + + /** + * Constructs a new Data. + * @memberof tendermint.types + * @classdesc Represents a Data. + * @implements IData + * @constructor + * @param {tendermint.types.IData=} [properties] Properties to set + */ + function Data(properties) { + this.txs = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Data txs. + * @member {Array.} txs + * @memberof tendermint.types.Data + * @instance + */ + Data.prototype.txs = $util.emptyArray; + + /** + * Creates a new Data instance using the specified properties. + * @function create + * @memberof tendermint.types.Data + * @static + * @param {tendermint.types.IData=} [properties] Properties to set + * @returns {tendermint.types.Data} Data instance + */ + Data.create = function create(properties) { + return new Data(properties); + }; + + /** + * Encodes the specified Data message. Does not implicitly {@link tendermint.types.Data.verify|verify} messages. + * @function encode + * @memberof tendermint.types.Data + * @static + * @param {tendermint.types.IData} message Data message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Data.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.txs != null && message.txs.length) + for (let i = 0; i < message.txs.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.txs[i]); + return writer; + }; + + /** + * Encodes the specified Data message, length delimited. Does not implicitly {@link tendermint.types.Data.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.types.Data + * @static + * @param {tendermint.types.IData} message Data message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Data.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Data message from the specified reader or buffer. + * @function decode + * @memberof tendermint.types.Data + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.types.Data} Data + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Data.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.Data(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.txs && message.txs.length)) + message.txs = []; + message.txs.push(reader.bytes()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Data message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.types.Data + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.types.Data} Data + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Data.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Data message. + * @function verify + * @memberof tendermint.types.Data + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Data.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.txs != null && message.hasOwnProperty("txs")) { + if (!Array.isArray(message.txs)) + return "txs: array expected"; + for (let i = 0; i < message.txs.length; ++i) + if (!(message.txs[i] && typeof message.txs[i].length === "number" || $util.isString(message.txs[i]))) + return "txs: buffer[] expected"; + } + return null; + }; + + /** + * Creates a Data message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.types.Data + * @static + * @param {Object.} object Plain object + * @returns {tendermint.types.Data} Data + */ + Data.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.types.Data) + return object; + let message = new $root.tendermint.types.Data(); + if (object.txs) { + if (!Array.isArray(object.txs)) + throw TypeError(".tendermint.types.Data.txs: array expected"); + message.txs = []; + for (let i = 0; i < object.txs.length; ++i) + if (typeof object.txs[i] === "string") + $util.base64.decode(object.txs[i], message.txs[i] = $util.newBuffer($util.base64.length(object.txs[i])), 0); + else if (object.txs[i].length) + message.txs[i] = object.txs[i]; + } + return message; + }; + + /** + * Creates a plain object from a Data message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.types.Data + * @static + * @param {tendermint.types.Data} message Data + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Data.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.txs = []; + if (message.txs && message.txs.length) { + object.txs = []; + for (let j = 0; j < message.txs.length; ++j) + object.txs[j] = options.bytes === String ? $util.base64.encode(message.txs[j], 0, message.txs[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.txs[j]) : message.txs[j]; + } + return object; + }; + + /** + * Converts this Data to JSON. + * @function toJSON + * @memberof tendermint.types.Data + * @instance + * @returns {Object.} JSON object + */ + Data.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Data; + })(types.Data || {}); + + types.Vote = (function(Vote) { + + /** + * Properties of a Vote. + * @memberof tendermint.types + * @interface IVote + * @property {tendermint.types.SignedMsgType|null} [type] Vote type + * @property {number|Long|null} [height] Vote height + * @property {number|null} [round] Vote round + * @property {tendermint.types.IBlockID|null} [blockId] Vote blockId + * @property {google.protobuf.ITimestamp|null} [timestamp] Vote timestamp + * @property {Uint8Array|null} [validatorAddress] Vote validatorAddress + * @property {number|null} [validatorIndex] Vote validatorIndex + * @property {Uint8Array|null} [signature] Vote signature + */ + + /** + * Constructs a new Vote. + * @memberof tendermint.types + * @classdesc Represents a Vote. + * @implements IVote + * @constructor + * @param {tendermint.types.IVote=} [properties] Properties to set + */ + function Vote(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Vote type. + * @member {tendermint.types.SignedMsgType} type + * @memberof tendermint.types.Vote + * @instance + */ + Vote.prototype.type = 0; + + /** + * Vote height. + * @member {number|Long} height + * @memberof tendermint.types.Vote + * @instance + */ + Vote.prototype.height = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Vote round. + * @member {number} round + * @memberof tendermint.types.Vote + * @instance + */ + Vote.prototype.round = 0; + + /** + * Vote blockId. + * @member {tendermint.types.IBlockID|null|undefined} blockId + * @memberof tendermint.types.Vote + * @instance + */ + Vote.prototype.blockId = null; + + /** + * Vote timestamp. + * @member {google.protobuf.ITimestamp|null|undefined} timestamp + * @memberof tendermint.types.Vote + * @instance + */ + Vote.prototype.timestamp = null; + + /** + * Vote validatorAddress. + * @member {Uint8Array} validatorAddress + * @memberof tendermint.types.Vote + * @instance + */ + Vote.prototype.validatorAddress = $util.newBuffer([]); + + /** + * Vote validatorIndex. + * @member {number} validatorIndex + * @memberof tendermint.types.Vote + * @instance + */ + Vote.prototype.validatorIndex = 0; + + /** + * Vote signature. + * @member {Uint8Array} signature + * @memberof tendermint.types.Vote + * @instance + */ + Vote.prototype.signature = $util.newBuffer([]); + + /** + * Creates a new Vote instance using the specified properties. + * @function create + * @memberof tendermint.types.Vote + * @static + * @param {tendermint.types.IVote=} [properties] Properties to set + * @returns {tendermint.types.Vote} Vote instance + */ + Vote.create = function create(properties) { + return new Vote(properties); + }; + + /** + * Encodes the specified Vote message. Does not implicitly {@link tendermint.types.Vote.verify|verify} messages. + * @function encode + * @memberof tendermint.types.Vote + * @static + * @param {tendermint.types.IVote} message Vote message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Vote.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); + if (message.height != null && Object.hasOwnProperty.call(message, "height")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.height); + if (message.round != null && Object.hasOwnProperty.call(message, "round")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.round); + if (message.blockId != null && Object.hasOwnProperty.call(message, "blockId")) + $root.tendermint.types.BlockID.encode(message.blockId, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) + $root.google.protobuf.Timestamp.encode(message.timestamp, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.validatorAddress != null && Object.hasOwnProperty.call(message, "validatorAddress")) + writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.validatorAddress); + if (message.validatorIndex != null && Object.hasOwnProperty.call(message, "validatorIndex")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.validatorIndex); + if (message.signature != null && Object.hasOwnProperty.call(message, "signature")) + writer.uint32(/* id 8, wireType 2 =*/66).bytes(message.signature); + return writer; + }; + + /** + * Encodes the specified Vote message, length delimited. Does not implicitly {@link tendermint.types.Vote.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.types.Vote + * @static + * @param {tendermint.types.IVote} message Vote message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Vote.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Vote message from the specified reader or buffer. + * @function decode + * @memberof tendermint.types.Vote + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.types.Vote} Vote + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Vote.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.Vote(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type = reader.int32(); + break; + case 2: + message.height = reader.int64(); + break; + case 3: + message.round = reader.int32(); + break; + case 4: + message.blockId = $root.tendermint.types.BlockID.decode(reader, reader.uint32()); + break; + case 5: + message.timestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 6: + message.validatorAddress = reader.bytes(); + break; + case 7: + message.validatorIndex = reader.int32(); + break; + case 8: + message.signature = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Vote message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.types.Vote + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.types.Vote} Vote + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Vote.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Vote message. + * @function verify + * @memberof tendermint.types.Vote + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Vote.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 32: + break; + } + if (message.height != null && message.hasOwnProperty("height")) + if (!$util.isInteger(message.height) && !(message.height && $util.isInteger(message.height.low) && $util.isInteger(message.height.high))) + return "height: integer|Long expected"; + if (message.round != null && message.hasOwnProperty("round")) + if (!$util.isInteger(message.round)) + return "round: integer expected"; + if (message.blockId != null && message.hasOwnProperty("blockId")) { + let error = $root.tendermint.types.BlockID.verify(message.blockId); + if (error) + return "blockId." + error; + } + if (message.timestamp != null && message.hasOwnProperty("timestamp")) { + let error = $root.google.protobuf.Timestamp.verify(message.timestamp); + if (error) + return "timestamp." + error; + } + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + if (!(message.validatorAddress && typeof message.validatorAddress.length === "number" || $util.isString(message.validatorAddress))) + return "validatorAddress: buffer expected"; + if (message.validatorIndex != null && message.hasOwnProperty("validatorIndex")) + if (!$util.isInteger(message.validatorIndex)) + return "validatorIndex: integer expected"; + if (message.signature != null && message.hasOwnProperty("signature")) + if (!(message.signature && typeof message.signature.length === "number" || $util.isString(message.signature))) + return "signature: buffer expected"; + return null; + }; + + /** + * Creates a Vote message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.types.Vote + * @static + * @param {Object.} object Plain object + * @returns {tendermint.types.Vote} Vote + */ + Vote.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.types.Vote) + return object; + let message = new $root.tendermint.types.Vote(); + switch (object.type) { + case "SIGNED_MSG_TYPE_UNKNOWN": + case 0: + message.type = 0; + break; + case "SIGNED_MSG_TYPE_PREVOTE": + case 1: + message.type = 1; + break; + case "SIGNED_MSG_TYPE_PRECOMMIT": + case 2: + message.type = 2; + break; + case "SIGNED_MSG_TYPE_PROPOSAL": + case 32: + message.type = 32; + break; + } + if (object.height != null) + if ($util.Long) + (message.height = $util.Long.fromValue(object.height)).unsigned = false; + else if (typeof object.height === "string") + message.height = parseInt(object.height, 10); + else if (typeof object.height === "number") + message.height = object.height; + else if (typeof object.height === "object") + message.height = new $util.LongBits(object.height.low >>> 0, object.height.high >>> 0).toNumber(); + if (object.round != null) + message.round = object.round | 0; + if (object.blockId != null) { + if (typeof object.blockId !== "object") + throw TypeError(".tendermint.types.Vote.blockId: object expected"); + message.blockId = $root.tendermint.types.BlockID.fromObject(object.blockId); + } + if (object.timestamp != null) { + if (typeof object.timestamp !== "object") + throw TypeError(".tendermint.types.Vote.timestamp: object expected"); + message.timestamp = $root.google.protobuf.Timestamp.fromObject(object.timestamp); + } + if (object.validatorAddress != null) + if (typeof object.validatorAddress === "string") + $util.base64.decode(object.validatorAddress, message.validatorAddress = $util.newBuffer($util.base64.length(object.validatorAddress)), 0); + else if (object.validatorAddress.length) + message.validatorAddress = object.validatorAddress; + if (object.validatorIndex != null) + message.validatorIndex = object.validatorIndex | 0; + if (object.signature != null) + if (typeof object.signature === "string") + $util.base64.decode(object.signature, message.signature = $util.newBuffer($util.base64.length(object.signature)), 0); + else if (object.signature.length) + message.signature = object.signature; + return message; + }; + + /** + * Creates a plain object from a Vote message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.types.Vote + * @static + * @param {tendermint.types.Vote} message Vote + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Vote.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.type = options.enums === String ? "SIGNED_MSG_TYPE_UNKNOWN" : 0; + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.height = options.longs === String ? "0" : 0; + object.round = 0; + object.blockId = null; + object.timestamp = null; + if (options.bytes === String) + object.validatorAddress = ""; + else { + object.validatorAddress = []; + if (options.bytes !== Array) + object.validatorAddress = $util.newBuffer(object.validatorAddress); + } + object.validatorIndex = 0; + if (options.bytes === String) + object.signature = ""; + else { + object.signature = []; + if (options.bytes !== Array) + object.signature = $util.newBuffer(object.signature); + } + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.tendermint.types.SignedMsgType[message.type] : message.type; + if (message.height != null && message.hasOwnProperty("height")) + if (typeof message.height === "number") + object.height = options.longs === String ? String(message.height) : message.height; + else + object.height = options.longs === String ? $util.Long.prototype.toString.call(message.height) : options.longs === Number ? new $util.LongBits(message.height.low >>> 0, message.height.high >>> 0).toNumber() : message.height; + if (message.round != null && message.hasOwnProperty("round")) + object.round = message.round; + if (message.blockId != null && message.hasOwnProperty("blockId")) + object.blockId = $root.tendermint.types.BlockID.toObject(message.blockId, options); + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + object.timestamp = $root.google.protobuf.Timestamp.toObject(message.timestamp, options); + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + object.validatorAddress = options.bytes === String ? $util.base64.encode(message.validatorAddress, 0, message.validatorAddress.length) : options.bytes === Array ? Array.prototype.slice.call(message.validatorAddress) : message.validatorAddress; + if (message.validatorIndex != null && message.hasOwnProperty("validatorIndex")) + object.validatorIndex = message.validatorIndex; + if (message.signature != null && message.hasOwnProperty("signature")) + object.signature = options.bytes === String ? $util.base64.encode(message.signature, 0, message.signature.length) : options.bytes === Array ? Array.prototype.slice.call(message.signature) : message.signature; + return object; + }; + + /** + * Converts this Vote to JSON. + * @function toJSON + * @memberof tendermint.types.Vote + * @instance + * @returns {Object.} JSON object + */ + Vote.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Vote; + })(types.Vote || {}); + + types.Commit = (function(Commit) { + + /** + * Properties of a Commit. + * @memberof tendermint.types + * @interface ICommit + * @property {number|Long|null} [height] Commit height + * @property {number|null} [round] Commit round + * @property {tendermint.types.IBlockID|null} [blockId] Commit blockId + * @property {Array.|null} [signatures] Commit signatures + */ + + /** + * Constructs a new Commit. + * @memberof tendermint.types + * @classdesc Represents a Commit. + * @implements ICommit + * @constructor + * @param {tendermint.types.ICommit=} [properties] Properties to set + */ + function Commit(properties) { + this.signatures = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Commit height. + * @member {number|Long} height + * @memberof tendermint.types.Commit + * @instance + */ + Commit.prototype.height = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Commit round. + * @member {number} round + * @memberof tendermint.types.Commit + * @instance + */ + Commit.prototype.round = 0; + + /** + * Commit blockId. + * @member {tendermint.types.IBlockID|null|undefined} blockId + * @memberof tendermint.types.Commit + * @instance + */ + Commit.prototype.blockId = null; + + /** + * Commit signatures. + * @member {Array.} signatures + * @memberof tendermint.types.Commit + * @instance + */ + Commit.prototype.signatures = $util.emptyArray; + + /** + * Creates a new Commit instance using the specified properties. + * @function create + * @memberof tendermint.types.Commit + * @static + * @param {tendermint.types.ICommit=} [properties] Properties to set + * @returns {tendermint.types.Commit} Commit instance + */ + Commit.create = function create(properties) { + return new Commit(properties); + }; + + /** + * Encodes the specified Commit message. Does not implicitly {@link tendermint.types.Commit.verify|verify} messages. + * @function encode + * @memberof tendermint.types.Commit + * @static + * @param {tendermint.types.ICommit} message Commit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Commit.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.height != null && Object.hasOwnProperty.call(message, "height")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.height); + if (message.round != null && Object.hasOwnProperty.call(message, "round")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.round); + if (message.blockId != null && Object.hasOwnProperty.call(message, "blockId")) + $root.tendermint.types.BlockID.encode(message.blockId, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.signatures != null && message.signatures.length) + for (let i = 0; i < message.signatures.length; ++i) + $root.tendermint.types.CommitSig.encode(message.signatures[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Commit message, length delimited. Does not implicitly {@link tendermint.types.Commit.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.types.Commit + * @static + * @param {tendermint.types.ICommit} message Commit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Commit.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Commit message from the specified reader or buffer. + * @function decode + * @memberof tendermint.types.Commit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.types.Commit} Commit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Commit.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.Commit(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.height = reader.int64(); + break; + case 2: + message.round = reader.int32(); + break; + case 3: + message.blockId = $root.tendermint.types.BlockID.decode(reader, reader.uint32()); + break; + case 4: + if (!(message.signatures && message.signatures.length)) + message.signatures = []; + message.signatures.push($root.tendermint.types.CommitSig.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Commit message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.types.Commit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.types.Commit} Commit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Commit.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Commit message. + * @function verify + * @memberof tendermint.types.Commit + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Commit.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.height != null && message.hasOwnProperty("height")) + if (!$util.isInteger(message.height) && !(message.height && $util.isInteger(message.height.low) && $util.isInteger(message.height.high))) + return "height: integer|Long expected"; + if (message.round != null && message.hasOwnProperty("round")) + if (!$util.isInteger(message.round)) + return "round: integer expected"; + if (message.blockId != null && message.hasOwnProperty("blockId")) { + let error = $root.tendermint.types.BlockID.verify(message.blockId); + if (error) + return "blockId." + error; + } + if (message.signatures != null && message.hasOwnProperty("signatures")) { + if (!Array.isArray(message.signatures)) + return "signatures: array expected"; + for (let i = 0; i < message.signatures.length; ++i) { + let error = $root.tendermint.types.CommitSig.verify(message.signatures[i]); + if (error) + return "signatures." + error; + } + } + return null; + }; + + /** + * Creates a Commit message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.types.Commit + * @static + * @param {Object.} object Plain object + * @returns {tendermint.types.Commit} Commit + */ + Commit.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.types.Commit) + return object; + let message = new $root.tendermint.types.Commit(); + if (object.height != null) + if ($util.Long) + (message.height = $util.Long.fromValue(object.height)).unsigned = false; + else if (typeof object.height === "string") + message.height = parseInt(object.height, 10); + else if (typeof object.height === "number") + message.height = object.height; + else if (typeof object.height === "object") + message.height = new $util.LongBits(object.height.low >>> 0, object.height.high >>> 0).toNumber(); + if (object.round != null) + message.round = object.round | 0; + if (object.blockId != null) { + if (typeof object.blockId !== "object") + throw TypeError(".tendermint.types.Commit.blockId: object expected"); + message.blockId = $root.tendermint.types.BlockID.fromObject(object.blockId); + } + if (object.signatures) { + if (!Array.isArray(object.signatures)) + throw TypeError(".tendermint.types.Commit.signatures: array expected"); + message.signatures = []; + for (let i = 0; i < object.signatures.length; ++i) { + if (typeof object.signatures[i] !== "object") + throw TypeError(".tendermint.types.Commit.signatures: object expected"); + message.signatures[i] = $root.tendermint.types.CommitSig.fromObject(object.signatures[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Commit message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.types.Commit + * @static + * @param {tendermint.types.Commit} message Commit + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Commit.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.signatures = []; + if (options.defaults) { + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.height = options.longs === String ? "0" : 0; + object.round = 0; + object.blockId = null; + } + if (message.height != null && message.hasOwnProperty("height")) + if (typeof message.height === "number") + object.height = options.longs === String ? String(message.height) : message.height; + else + object.height = options.longs === String ? $util.Long.prototype.toString.call(message.height) : options.longs === Number ? new $util.LongBits(message.height.low >>> 0, message.height.high >>> 0).toNumber() : message.height; + if (message.round != null && message.hasOwnProperty("round")) + object.round = message.round; + if (message.blockId != null && message.hasOwnProperty("blockId")) + object.blockId = $root.tendermint.types.BlockID.toObject(message.blockId, options); + if (message.signatures && message.signatures.length) { + object.signatures = []; + for (let j = 0; j < message.signatures.length; ++j) + object.signatures[j] = $root.tendermint.types.CommitSig.toObject(message.signatures[j], options); + } + return object; + }; + + /** + * Converts this Commit to JSON. + * @function toJSON + * @memberof tendermint.types.Commit + * @instance + * @returns {Object.} JSON object + */ + Commit.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Commit; + })(types.Commit || {}); + + types.CommitSig = (function(CommitSig) { + + /** + * Properties of a CommitSig. + * @memberof tendermint.types + * @interface ICommitSig + * @property {tendermint.types.BlockIDFlag|null} [blockIdFlag] CommitSig blockIdFlag + * @property {Uint8Array|null} [validatorAddress] CommitSig validatorAddress + * @property {google.protobuf.ITimestamp|null} [timestamp] CommitSig timestamp + * @property {Uint8Array|null} [signature] CommitSig signature + */ + + /** + * Constructs a new CommitSig. + * @memberof tendermint.types + * @classdesc Represents a CommitSig. + * @implements ICommitSig + * @constructor + * @param {tendermint.types.ICommitSig=} [properties] Properties to set + */ + function CommitSig(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CommitSig blockIdFlag. + * @member {tendermint.types.BlockIDFlag} blockIdFlag + * @memberof tendermint.types.CommitSig + * @instance + */ + CommitSig.prototype.blockIdFlag = 0; + + /** + * CommitSig validatorAddress. + * @member {Uint8Array} validatorAddress + * @memberof tendermint.types.CommitSig + * @instance + */ + CommitSig.prototype.validatorAddress = $util.newBuffer([]); + + /** + * CommitSig timestamp. + * @member {google.protobuf.ITimestamp|null|undefined} timestamp + * @memberof tendermint.types.CommitSig + * @instance + */ + CommitSig.prototype.timestamp = null; + + /** + * CommitSig signature. + * @member {Uint8Array} signature + * @memberof tendermint.types.CommitSig + * @instance + */ + CommitSig.prototype.signature = $util.newBuffer([]); + + /** + * Creates a new CommitSig instance using the specified properties. + * @function create + * @memberof tendermint.types.CommitSig + * @static + * @param {tendermint.types.ICommitSig=} [properties] Properties to set + * @returns {tendermint.types.CommitSig} CommitSig instance + */ + CommitSig.create = function create(properties) { + return new CommitSig(properties); + }; + + /** + * Encodes the specified CommitSig message. Does not implicitly {@link tendermint.types.CommitSig.verify|verify} messages. + * @function encode + * @memberof tendermint.types.CommitSig + * @static + * @param {tendermint.types.ICommitSig} message CommitSig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommitSig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.blockIdFlag != null && Object.hasOwnProperty.call(message, "blockIdFlag")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.blockIdFlag); + if (message.validatorAddress != null && Object.hasOwnProperty.call(message, "validatorAddress")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.validatorAddress); + if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) + $root.google.protobuf.Timestamp.encode(message.timestamp, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.signature != null && Object.hasOwnProperty.call(message, "signature")) + writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.signature); + return writer; + }; + + /** + * Encodes the specified CommitSig message, length delimited. Does not implicitly {@link tendermint.types.CommitSig.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.types.CommitSig + * @static + * @param {tendermint.types.ICommitSig} message CommitSig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommitSig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CommitSig message from the specified reader or buffer. + * @function decode + * @memberof tendermint.types.CommitSig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.types.CommitSig} CommitSig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommitSig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.CommitSig(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.blockIdFlag = reader.int32(); + break; + case 2: + message.validatorAddress = reader.bytes(); + break; + case 3: + message.timestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 4: + message.signature = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CommitSig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.types.CommitSig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.types.CommitSig} CommitSig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommitSig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CommitSig message. + * @function verify + * @memberof tendermint.types.CommitSig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CommitSig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.blockIdFlag != null && message.hasOwnProperty("blockIdFlag")) + switch (message.blockIdFlag) { + default: + return "blockIdFlag: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + if (!(message.validatorAddress && typeof message.validatorAddress.length === "number" || $util.isString(message.validatorAddress))) + return "validatorAddress: buffer expected"; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) { + let error = $root.google.protobuf.Timestamp.verify(message.timestamp); + if (error) + return "timestamp." + error; + } + if (message.signature != null && message.hasOwnProperty("signature")) + if (!(message.signature && typeof message.signature.length === "number" || $util.isString(message.signature))) + return "signature: buffer expected"; + return null; + }; + + /** + * Creates a CommitSig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.types.CommitSig + * @static + * @param {Object.} object Plain object + * @returns {tendermint.types.CommitSig} CommitSig + */ + CommitSig.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.types.CommitSig) + return object; + let message = new $root.tendermint.types.CommitSig(); + switch (object.blockIdFlag) { + case "BLOCK_ID_FLAG_UNKNOWN": + case 0: + message.blockIdFlag = 0; + break; + case "BLOCK_ID_FLAG_ABSENT": + case 1: + message.blockIdFlag = 1; + break; + case "BLOCK_ID_FLAG_COMMIT": + case 2: + message.blockIdFlag = 2; + break; + case "BLOCK_ID_FLAG_NIL": + case 3: + message.blockIdFlag = 3; + break; + } + if (object.validatorAddress != null) + if (typeof object.validatorAddress === "string") + $util.base64.decode(object.validatorAddress, message.validatorAddress = $util.newBuffer($util.base64.length(object.validatorAddress)), 0); + else if (object.validatorAddress.length) + message.validatorAddress = object.validatorAddress; + if (object.timestamp != null) { + if (typeof object.timestamp !== "object") + throw TypeError(".tendermint.types.CommitSig.timestamp: object expected"); + message.timestamp = $root.google.protobuf.Timestamp.fromObject(object.timestamp); + } + if (object.signature != null) + if (typeof object.signature === "string") + $util.base64.decode(object.signature, message.signature = $util.newBuffer($util.base64.length(object.signature)), 0); + else if (object.signature.length) + message.signature = object.signature; + return message; + }; + + /** + * Creates a plain object from a CommitSig message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.types.CommitSig + * @static + * @param {tendermint.types.CommitSig} message CommitSig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CommitSig.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.blockIdFlag = options.enums === String ? "BLOCK_ID_FLAG_UNKNOWN" : 0; + if (options.bytes === String) + object.validatorAddress = ""; + else { + object.validatorAddress = []; + if (options.bytes !== Array) + object.validatorAddress = $util.newBuffer(object.validatorAddress); + } + object.timestamp = null; + if (options.bytes === String) + object.signature = ""; + else { + object.signature = []; + if (options.bytes !== Array) + object.signature = $util.newBuffer(object.signature); + } + } + if (message.blockIdFlag != null && message.hasOwnProperty("blockIdFlag")) + object.blockIdFlag = options.enums === String ? $root.tendermint.types.BlockIDFlag[message.blockIdFlag] : message.blockIdFlag; + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + object.validatorAddress = options.bytes === String ? $util.base64.encode(message.validatorAddress, 0, message.validatorAddress.length) : options.bytes === Array ? Array.prototype.slice.call(message.validatorAddress) : message.validatorAddress; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + object.timestamp = $root.google.protobuf.Timestamp.toObject(message.timestamp, options); + if (message.signature != null && message.hasOwnProperty("signature")) + object.signature = options.bytes === String ? $util.base64.encode(message.signature, 0, message.signature.length) : options.bytes === Array ? Array.prototype.slice.call(message.signature) : message.signature; + return object; + }; + + /** + * Converts this CommitSig to JSON. + * @function toJSON + * @memberof tendermint.types.CommitSig + * @instance + * @returns {Object.} JSON object + */ + CommitSig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CommitSig; + })(types.CommitSig || {}); + + types.Proposal = (function(Proposal) { + + /** + * Properties of a Proposal. + * @memberof tendermint.types + * @interface IProposal + * @property {tendermint.types.SignedMsgType|null} [type] Proposal type + * @property {number|Long|null} [height] Proposal height + * @property {number|null} [round] Proposal round + * @property {number|null} [polRound] Proposal polRound + * @property {tendermint.types.IBlockID|null} [blockId] Proposal blockId + * @property {google.protobuf.ITimestamp|null} [timestamp] Proposal timestamp + * @property {Uint8Array|null} [signature] Proposal signature + */ + + /** + * Constructs a new Proposal. + * @memberof tendermint.types + * @classdesc Represents a Proposal. + * @implements IProposal + * @constructor + * @param {tendermint.types.IProposal=} [properties] Properties to set + */ + function Proposal(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Proposal type. + * @member {tendermint.types.SignedMsgType} type + * @memberof tendermint.types.Proposal + * @instance + */ + Proposal.prototype.type = 0; + + /** + * Proposal height. + * @member {number|Long} height + * @memberof tendermint.types.Proposal + * @instance + */ + Proposal.prototype.height = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Proposal round. + * @member {number} round + * @memberof tendermint.types.Proposal + * @instance + */ + Proposal.prototype.round = 0; + + /** + * Proposal polRound. + * @member {number} polRound + * @memberof tendermint.types.Proposal + * @instance + */ + Proposal.prototype.polRound = 0; + + /** + * Proposal blockId. + * @member {tendermint.types.IBlockID|null|undefined} blockId + * @memberof tendermint.types.Proposal + * @instance + */ + Proposal.prototype.blockId = null; + + /** + * Proposal timestamp. + * @member {google.protobuf.ITimestamp|null|undefined} timestamp + * @memberof tendermint.types.Proposal + * @instance + */ + Proposal.prototype.timestamp = null; + + /** + * Proposal signature. + * @member {Uint8Array} signature + * @memberof tendermint.types.Proposal + * @instance + */ + Proposal.prototype.signature = $util.newBuffer([]); + + /** + * Creates a new Proposal instance using the specified properties. + * @function create + * @memberof tendermint.types.Proposal + * @static + * @param {tendermint.types.IProposal=} [properties] Properties to set + * @returns {tendermint.types.Proposal} Proposal instance + */ + Proposal.create = function create(properties) { + return new Proposal(properties); + }; + + /** + * Encodes the specified Proposal message. Does not implicitly {@link tendermint.types.Proposal.verify|verify} messages. + * @function encode + * @memberof tendermint.types.Proposal + * @static + * @param {tendermint.types.IProposal} message Proposal message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Proposal.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); + if (message.height != null && Object.hasOwnProperty.call(message, "height")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.height); + if (message.round != null && Object.hasOwnProperty.call(message, "round")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.round); + if (message.polRound != null && Object.hasOwnProperty.call(message, "polRound")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.polRound); + if (message.blockId != null && Object.hasOwnProperty.call(message, "blockId")) + $root.tendermint.types.BlockID.encode(message.blockId, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) + $root.google.protobuf.Timestamp.encode(message.timestamp, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.signature != null && Object.hasOwnProperty.call(message, "signature")) + writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.signature); + return writer; + }; + + /** + * Encodes the specified Proposal message, length delimited. Does not implicitly {@link tendermint.types.Proposal.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.types.Proposal + * @static + * @param {tendermint.types.IProposal} message Proposal message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Proposal.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Proposal message from the specified reader or buffer. + * @function decode + * @memberof tendermint.types.Proposal + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.types.Proposal} Proposal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Proposal.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.Proposal(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type = reader.int32(); + break; + case 2: + message.height = reader.int64(); + break; + case 3: + message.round = reader.int32(); + break; + case 4: + message.polRound = reader.int32(); + break; + case 5: + message.blockId = $root.tendermint.types.BlockID.decode(reader, reader.uint32()); + break; + case 6: + message.timestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 7: + message.signature = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Proposal message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.types.Proposal + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.types.Proposal} Proposal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Proposal.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Proposal message. + * @function verify + * @memberof tendermint.types.Proposal + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Proposal.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 32: + break; + } + if (message.height != null && message.hasOwnProperty("height")) + if (!$util.isInteger(message.height) && !(message.height && $util.isInteger(message.height.low) && $util.isInteger(message.height.high))) + return "height: integer|Long expected"; + if (message.round != null && message.hasOwnProperty("round")) + if (!$util.isInteger(message.round)) + return "round: integer expected"; + if (message.polRound != null && message.hasOwnProperty("polRound")) + if (!$util.isInteger(message.polRound)) + return "polRound: integer expected"; + if (message.blockId != null && message.hasOwnProperty("blockId")) { + let error = $root.tendermint.types.BlockID.verify(message.blockId); + if (error) + return "blockId." + error; + } + if (message.timestamp != null && message.hasOwnProperty("timestamp")) { + let error = $root.google.protobuf.Timestamp.verify(message.timestamp); + if (error) + return "timestamp." + error; + } + if (message.signature != null && message.hasOwnProperty("signature")) + if (!(message.signature && typeof message.signature.length === "number" || $util.isString(message.signature))) + return "signature: buffer expected"; + return null; + }; + + /** + * Creates a Proposal message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.types.Proposal + * @static + * @param {Object.} object Plain object + * @returns {tendermint.types.Proposal} Proposal + */ + Proposal.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.types.Proposal) + return object; + let message = new $root.tendermint.types.Proposal(); + switch (object.type) { + case "SIGNED_MSG_TYPE_UNKNOWN": + case 0: + message.type = 0; + break; + case "SIGNED_MSG_TYPE_PREVOTE": + case 1: + message.type = 1; + break; + case "SIGNED_MSG_TYPE_PRECOMMIT": + case 2: + message.type = 2; + break; + case "SIGNED_MSG_TYPE_PROPOSAL": + case 32: + message.type = 32; + break; + } + if (object.height != null) + if ($util.Long) + (message.height = $util.Long.fromValue(object.height)).unsigned = false; + else if (typeof object.height === "string") + message.height = parseInt(object.height, 10); + else if (typeof object.height === "number") + message.height = object.height; + else if (typeof object.height === "object") + message.height = new $util.LongBits(object.height.low >>> 0, object.height.high >>> 0).toNumber(); + if (object.round != null) + message.round = object.round | 0; + if (object.polRound != null) + message.polRound = object.polRound | 0; + if (object.blockId != null) { + if (typeof object.blockId !== "object") + throw TypeError(".tendermint.types.Proposal.blockId: object expected"); + message.blockId = $root.tendermint.types.BlockID.fromObject(object.blockId); + } + if (object.timestamp != null) { + if (typeof object.timestamp !== "object") + throw TypeError(".tendermint.types.Proposal.timestamp: object expected"); + message.timestamp = $root.google.protobuf.Timestamp.fromObject(object.timestamp); + } + if (object.signature != null) + if (typeof object.signature === "string") + $util.base64.decode(object.signature, message.signature = $util.newBuffer($util.base64.length(object.signature)), 0); + else if (object.signature.length) + message.signature = object.signature; + return message; + }; + + /** + * Creates a plain object from a Proposal message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.types.Proposal + * @static + * @param {tendermint.types.Proposal} message Proposal + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Proposal.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.type = options.enums === String ? "SIGNED_MSG_TYPE_UNKNOWN" : 0; + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.height = options.longs === String ? "0" : 0; + object.round = 0; + object.polRound = 0; + object.blockId = null; + object.timestamp = null; + if (options.bytes === String) + object.signature = ""; + else { + object.signature = []; + if (options.bytes !== Array) + object.signature = $util.newBuffer(object.signature); + } + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.tendermint.types.SignedMsgType[message.type] : message.type; + if (message.height != null && message.hasOwnProperty("height")) + if (typeof message.height === "number") + object.height = options.longs === String ? String(message.height) : message.height; + else + object.height = options.longs === String ? $util.Long.prototype.toString.call(message.height) : options.longs === Number ? new $util.LongBits(message.height.low >>> 0, message.height.high >>> 0).toNumber() : message.height; + if (message.round != null && message.hasOwnProperty("round")) + object.round = message.round; + if (message.polRound != null && message.hasOwnProperty("polRound")) + object.polRound = message.polRound; + if (message.blockId != null && message.hasOwnProperty("blockId")) + object.blockId = $root.tendermint.types.BlockID.toObject(message.blockId, options); + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + object.timestamp = $root.google.protobuf.Timestamp.toObject(message.timestamp, options); + if (message.signature != null && message.hasOwnProperty("signature")) + object.signature = options.bytes === String ? $util.base64.encode(message.signature, 0, message.signature.length) : options.bytes === Array ? Array.prototype.slice.call(message.signature) : message.signature; + return object; + }; + + /** + * Converts this Proposal to JSON. + * @function toJSON + * @memberof tendermint.types.Proposal + * @instance + * @returns {Object.} JSON object + */ + Proposal.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Proposal; + })(types.Proposal || {}); + + types.SignedHeader = (function(SignedHeader) { + + /** + * Properties of a SignedHeader. + * @memberof tendermint.types + * @interface ISignedHeader + * @property {tendermint.types.IHeader|null} [header] SignedHeader header + * @property {tendermint.types.ICommit|null} [commit] SignedHeader commit + */ + + /** + * Constructs a new SignedHeader. + * @memberof tendermint.types + * @classdesc Represents a SignedHeader. + * @implements ISignedHeader + * @constructor + * @param {tendermint.types.ISignedHeader=} [properties] Properties to set + */ + function SignedHeader(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SignedHeader header. + * @member {tendermint.types.IHeader|null|undefined} header + * @memberof tendermint.types.SignedHeader + * @instance + */ + SignedHeader.prototype.header = null; + + /** + * SignedHeader commit. + * @member {tendermint.types.ICommit|null|undefined} commit + * @memberof tendermint.types.SignedHeader + * @instance + */ + SignedHeader.prototype.commit = null; + + /** + * Creates a new SignedHeader instance using the specified properties. + * @function create + * @memberof tendermint.types.SignedHeader + * @static + * @param {tendermint.types.ISignedHeader=} [properties] Properties to set + * @returns {tendermint.types.SignedHeader} SignedHeader instance + */ + SignedHeader.create = function create(properties) { + return new SignedHeader(properties); + }; + + /** + * Encodes the specified SignedHeader message. Does not implicitly {@link tendermint.types.SignedHeader.verify|verify} messages. + * @function encode + * @memberof tendermint.types.SignedHeader + * @static + * @param {tendermint.types.ISignedHeader} message SignedHeader message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SignedHeader.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.header != null && Object.hasOwnProperty.call(message, "header")) + $root.tendermint.types.Header.encode(message.header, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.commit != null && Object.hasOwnProperty.call(message, "commit")) + $root.tendermint.types.Commit.encode(message.commit, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SignedHeader message, length delimited. Does not implicitly {@link tendermint.types.SignedHeader.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.types.SignedHeader + * @static + * @param {tendermint.types.ISignedHeader} message SignedHeader message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SignedHeader.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SignedHeader message from the specified reader or buffer. + * @function decode + * @memberof tendermint.types.SignedHeader + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.types.SignedHeader} SignedHeader + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SignedHeader.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.SignedHeader(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.header = $root.tendermint.types.Header.decode(reader, reader.uint32()); + break; + case 2: + message.commit = $root.tendermint.types.Commit.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SignedHeader message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.types.SignedHeader + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.types.SignedHeader} SignedHeader + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SignedHeader.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SignedHeader message. + * @function verify + * @memberof tendermint.types.SignedHeader + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SignedHeader.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.header != null && message.hasOwnProperty("header")) { + let error = $root.tendermint.types.Header.verify(message.header); + if (error) + return "header." + error; + } + if (message.commit != null && message.hasOwnProperty("commit")) { + let error = $root.tendermint.types.Commit.verify(message.commit); + if (error) + return "commit." + error; + } + return null; + }; + + /** + * Creates a SignedHeader message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.types.SignedHeader + * @static + * @param {Object.} object Plain object + * @returns {tendermint.types.SignedHeader} SignedHeader + */ + SignedHeader.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.types.SignedHeader) + return object; + let message = new $root.tendermint.types.SignedHeader(); + if (object.header != null) { + if (typeof object.header !== "object") + throw TypeError(".tendermint.types.SignedHeader.header: object expected"); + message.header = $root.tendermint.types.Header.fromObject(object.header); + } + if (object.commit != null) { + if (typeof object.commit !== "object") + throw TypeError(".tendermint.types.SignedHeader.commit: object expected"); + message.commit = $root.tendermint.types.Commit.fromObject(object.commit); + } + return message; + }; + + /** + * Creates a plain object from a SignedHeader message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.types.SignedHeader + * @static + * @param {tendermint.types.SignedHeader} message SignedHeader + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SignedHeader.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.header = null; + object.commit = null; + } + if (message.header != null && message.hasOwnProperty("header")) + object.header = $root.tendermint.types.Header.toObject(message.header, options); + if (message.commit != null && message.hasOwnProperty("commit")) + object.commit = $root.tendermint.types.Commit.toObject(message.commit, options); + return object; + }; + + /** + * Converts this SignedHeader to JSON. + * @function toJSON + * @memberof tendermint.types.SignedHeader + * @instance + * @returns {Object.} JSON object + */ + SignedHeader.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SignedHeader; + })(types.SignedHeader || {}); + + types.LightBlock = (function(LightBlock) { + + /** + * Properties of a LightBlock. + * @memberof tendermint.types + * @interface ILightBlock + * @property {tendermint.types.ISignedHeader|null} [signedHeader] LightBlock signedHeader + * @property {tendermint.types.IValidatorSet|null} [validatorSet] LightBlock validatorSet + */ + + /** + * Constructs a new LightBlock. + * @memberof tendermint.types + * @classdesc Represents a LightBlock. + * @implements ILightBlock + * @constructor + * @param {tendermint.types.ILightBlock=} [properties] Properties to set + */ + function LightBlock(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LightBlock signedHeader. + * @member {tendermint.types.ISignedHeader|null|undefined} signedHeader + * @memberof tendermint.types.LightBlock + * @instance + */ + LightBlock.prototype.signedHeader = null; + + /** + * LightBlock validatorSet. + * @member {tendermint.types.IValidatorSet|null|undefined} validatorSet + * @memberof tendermint.types.LightBlock + * @instance + */ + LightBlock.prototype.validatorSet = null; + + /** + * Creates a new LightBlock instance using the specified properties. + * @function create + * @memberof tendermint.types.LightBlock + * @static + * @param {tendermint.types.ILightBlock=} [properties] Properties to set + * @returns {tendermint.types.LightBlock} LightBlock instance + */ + LightBlock.create = function create(properties) { + return new LightBlock(properties); + }; + + /** + * Encodes the specified LightBlock message. Does not implicitly {@link tendermint.types.LightBlock.verify|verify} messages. + * @function encode + * @memberof tendermint.types.LightBlock + * @static + * @param {tendermint.types.ILightBlock} message LightBlock message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LightBlock.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.signedHeader != null && Object.hasOwnProperty.call(message, "signedHeader")) + $root.tendermint.types.SignedHeader.encode(message.signedHeader, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.validatorSet != null && Object.hasOwnProperty.call(message, "validatorSet")) + $root.tendermint.types.ValidatorSet.encode(message.validatorSet, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LightBlock message, length delimited. Does not implicitly {@link tendermint.types.LightBlock.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.types.LightBlock + * @static + * @param {tendermint.types.ILightBlock} message LightBlock message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LightBlock.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LightBlock message from the specified reader or buffer. + * @function decode + * @memberof tendermint.types.LightBlock + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.types.LightBlock} LightBlock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LightBlock.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.LightBlock(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.signedHeader = $root.tendermint.types.SignedHeader.decode(reader, reader.uint32()); + break; + case 2: + message.validatorSet = $root.tendermint.types.ValidatorSet.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LightBlock message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.types.LightBlock + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.types.LightBlock} LightBlock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LightBlock.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LightBlock message. + * @function verify + * @memberof tendermint.types.LightBlock + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LightBlock.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.signedHeader != null && message.hasOwnProperty("signedHeader")) { + let error = $root.tendermint.types.SignedHeader.verify(message.signedHeader); + if (error) + return "signedHeader." + error; + } + if (message.validatorSet != null && message.hasOwnProperty("validatorSet")) { + let error = $root.tendermint.types.ValidatorSet.verify(message.validatorSet); + if (error) + return "validatorSet." + error; + } + return null; + }; + + /** + * Creates a LightBlock message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.types.LightBlock + * @static + * @param {Object.} object Plain object + * @returns {tendermint.types.LightBlock} LightBlock + */ + LightBlock.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.types.LightBlock) + return object; + let message = new $root.tendermint.types.LightBlock(); + if (object.signedHeader != null) { + if (typeof object.signedHeader !== "object") + throw TypeError(".tendermint.types.LightBlock.signedHeader: object expected"); + message.signedHeader = $root.tendermint.types.SignedHeader.fromObject(object.signedHeader); + } + if (object.validatorSet != null) { + if (typeof object.validatorSet !== "object") + throw TypeError(".tendermint.types.LightBlock.validatorSet: object expected"); + message.validatorSet = $root.tendermint.types.ValidatorSet.fromObject(object.validatorSet); + } + return message; + }; + + /** + * Creates a plain object from a LightBlock message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.types.LightBlock + * @static + * @param {tendermint.types.LightBlock} message LightBlock + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LightBlock.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.signedHeader = null; + object.validatorSet = null; + } + if (message.signedHeader != null && message.hasOwnProperty("signedHeader")) + object.signedHeader = $root.tendermint.types.SignedHeader.toObject(message.signedHeader, options); + if (message.validatorSet != null && message.hasOwnProperty("validatorSet")) + object.validatorSet = $root.tendermint.types.ValidatorSet.toObject(message.validatorSet, options); + return object; + }; + + /** + * Converts this LightBlock to JSON. + * @function toJSON + * @memberof tendermint.types.LightBlock + * @instance + * @returns {Object.} JSON object + */ + LightBlock.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return LightBlock; + })(types.LightBlock || {}); + + types.BlockMeta = (function(BlockMeta) { + + /** + * Properties of a BlockMeta. + * @memberof tendermint.types + * @interface IBlockMeta + * @property {tendermint.types.IBlockID|null} [blockId] BlockMeta blockId + * @property {number|Long|null} [blockSize] BlockMeta blockSize + * @property {tendermint.types.IHeader|null} [header] BlockMeta header + * @property {number|Long|null} [numTxs] BlockMeta numTxs + */ + + /** + * Constructs a new BlockMeta. + * @memberof tendermint.types + * @classdesc Represents a BlockMeta. + * @implements IBlockMeta + * @constructor + * @param {tendermint.types.IBlockMeta=} [properties] Properties to set + */ + function BlockMeta(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BlockMeta blockId. + * @member {tendermint.types.IBlockID|null|undefined} blockId + * @memberof tendermint.types.BlockMeta + * @instance + */ + BlockMeta.prototype.blockId = null; + + /** + * BlockMeta blockSize. + * @member {number|Long} blockSize + * @memberof tendermint.types.BlockMeta + * @instance + */ + BlockMeta.prototype.blockSize = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * BlockMeta header. + * @member {tendermint.types.IHeader|null|undefined} header + * @memberof tendermint.types.BlockMeta + * @instance + */ + BlockMeta.prototype.header = null; + + /** + * BlockMeta numTxs. + * @member {number|Long} numTxs + * @memberof tendermint.types.BlockMeta + * @instance + */ + BlockMeta.prototype.numTxs = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new BlockMeta instance using the specified properties. + * @function create + * @memberof tendermint.types.BlockMeta + * @static + * @param {tendermint.types.IBlockMeta=} [properties] Properties to set + * @returns {tendermint.types.BlockMeta} BlockMeta instance + */ + BlockMeta.create = function create(properties) { + return new BlockMeta(properties); + }; + + /** + * Encodes the specified BlockMeta message. Does not implicitly {@link tendermint.types.BlockMeta.verify|verify} messages. + * @function encode + * @memberof tendermint.types.BlockMeta + * @static + * @param {tendermint.types.IBlockMeta} message BlockMeta message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BlockMeta.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.blockId != null && Object.hasOwnProperty.call(message, "blockId")) + $root.tendermint.types.BlockID.encode(message.blockId, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.blockSize != null && Object.hasOwnProperty.call(message, "blockSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.blockSize); + if (message.header != null && Object.hasOwnProperty.call(message, "header")) + $root.tendermint.types.Header.encode(message.header, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.numTxs != null && Object.hasOwnProperty.call(message, "numTxs")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.numTxs); + return writer; + }; + + /** + * Encodes the specified BlockMeta message, length delimited. Does not implicitly {@link tendermint.types.BlockMeta.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.types.BlockMeta + * @static + * @param {tendermint.types.IBlockMeta} message BlockMeta message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BlockMeta.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BlockMeta message from the specified reader or buffer. + * @function decode + * @memberof tendermint.types.BlockMeta + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.types.BlockMeta} BlockMeta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BlockMeta.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.BlockMeta(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.blockId = $root.tendermint.types.BlockID.decode(reader, reader.uint32()); + break; + case 2: + message.blockSize = reader.int64(); + break; + case 3: + message.header = $root.tendermint.types.Header.decode(reader, reader.uint32()); + break; + case 4: + message.numTxs = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BlockMeta message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.types.BlockMeta + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.types.BlockMeta} BlockMeta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BlockMeta.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BlockMeta message. + * @function verify + * @memberof tendermint.types.BlockMeta + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BlockMeta.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.blockId != null && message.hasOwnProperty("blockId")) { + let error = $root.tendermint.types.BlockID.verify(message.blockId); + if (error) + return "blockId." + error; + } + if (message.blockSize != null && message.hasOwnProperty("blockSize")) + if (!$util.isInteger(message.blockSize) && !(message.blockSize && $util.isInteger(message.blockSize.low) && $util.isInteger(message.blockSize.high))) + return "blockSize: integer|Long expected"; + if (message.header != null && message.hasOwnProperty("header")) { + let error = $root.tendermint.types.Header.verify(message.header); + if (error) + return "header." + error; + } + if (message.numTxs != null && message.hasOwnProperty("numTxs")) + if (!$util.isInteger(message.numTxs) && !(message.numTxs && $util.isInteger(message.numTxs.low) && $util.isInteger(message.numTxs.high))) + return "numTxs: integer|Long expected"; + return null; + }; + + /** + * Creates a BlockMeta message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.types.BlockMeta + * @static + * @param {Object.} object Plain object + * @returns {tendermint.types.BlockMeta} BlockMeta + */ + BlockMeta.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.types.BlockMeta) + return object; + let message = new $root.tendermint.types.BlockMeta(); + if (object.blockId != null) { + if (typeof object.blockId !== "object") + throw TypeError(".tendermint.types.BlockMeta.blockId: object expected"); + message.blockId = $root.tendermint.types.BlockID.fromObject(object.blockId); + } + if (object.blockSize != null) + if ($util.Long) + (message.blockSize = $util.Long.fromValue(object.blockSize)).unsigned = false; + else if (typeof object.blockSize === "string") + message.blockSize = parseInt(object.blockSize, 10); + else if (typeof object.blockSize === "number") + message.blockSize = object.blockSize; + else if (typeof object.blockSize === "object") + message.blockSize = new $util.LongBits(object.blockSize.low >>> 0, object.blockSize.high >>> 0).toNumber(); + if (object.header != null) { + if (typeof object.header !== "object") + throw TypeError(".tendermint.types.BlockMeta.header: object expected"); + message.header = $root.tendermint.types.Header.fromObject(object.header); + } + if (object.numTxs != null) + if ($util.Long) + (message.numTxs = $util.Long.fromValue(object.numTxs)).unsigned = false; + else if (typeof object.numTxs === "string") + message.numTxs = parseInt(object.numTxs, 10); + else if (typeof object.numTxs === "number") + message.numTxs = object.numTxs; + else if (typeof object.numTxs === "object") + message.numTxs = new $util.LongBits(object.numTxs.low >>> 0, object.numTxs.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a BlockMeta message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.types.BlockMeta + * @static + * @param {tendermint.types.BlockMeta} message BlockMeta + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BlockMeta.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.blockId = null; + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.blockSize = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.blockSize = options.longs === String ? "0" : 0; + object.header = null; + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.numTxs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.numTxs = options.longs === String ? "0" : 0; + } + if (message.blockId != null && message.hasOwnProperty("blockId")) + object.blockId = $root.tendermint.types.BlockID.toObject(message.blockId, options); + if (message.blockSize != null && message.hasOwnProperty("blockSize")) + if (typeof message.blockSize === "number") + object.blockSize = options.longs === String ? String(message.blockSize) : message.blockSize; + else + object.blockSize = options.longs === String ? $util.Long.prototype.toString.call(message.blockSize) : options.longs === Number ? new $util.LongBits(message.blockSize.low >>> 0, message.blockSize.high >>> 0).toNumber() : message.blockSize; + if (message.header != null && message.hasOwnProperty("header")) + object.header = $root.tendermint.types.Header.toObject(message.header, options); + if (message.numTxs != null && message.hasOwnProperty("numTxs")) + if (typeof message.numTxs === "number") + object.numTxs = options.longs === String ? String(message.numTxs) : message.numTxs; + else + object.numTxs = options.longs === String ? $util.Long.prototype.toString.call(message.numTxs) : options.longs === Number ? new $util.LongBits(message.numTxs.low >>> 0, message.numTxs.high >>> 0).toNumber() : message.numTxs; + return object; + }; + + /** + * Converts this BlockMeta to JSON. + * @function toJSON + * @memberof tendermint.types.BlockMeta + * @instance + * @returns {Object.} JSON object + */ + BlockMeta.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return BlockMeta; + })(types.BlockMeta || {}); + + types.TxProof = (function(TxProof) { + + /** + * Properties of a TxProof. + * @memberof tendermint.types + * @interface ITxProof + * @property {Uint8Array|null} [rootHash] TxProof rootHash + * @property {Uint8Array|null} [data] TxProof data + * @property {tendermint.crypto.IProof|null} [proof] TxProof proof + */ + + /** + * Constructs a new TxProof. + * @memberof tendermint.types + * @classdesc Represents a TxProof. + * @implements ITxProof + * @constructor + * @param {tendermint.types.ITxProof=} [properties] Properties to set + */ + function TxProof(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TxProof rootHash. + * @member {Uint8Array} rootHash + * @memberof tendermint.types.TxProof + * @instance + */ + TxProof.prototype.rootHash = $util.newBuffer([]); + + /** + * TxProof data. + * @member {Uint8Array} data + * @memberof tendermint.types.TxProof + * @instance + */ + TxProof.prototype.data = $util.newBuffer([]); + + /** + * TxProof proof. + * @member {tendermint.crypto.IProof|null|undefined} proof + * @memberof tendermint.types.TxProof + * @instance + */ + TxProof.prototype.proof = null; + + /** + * Creates a new TxProof instance using the specified properties. + * @function create + * @memberof tendermint.types.TxProof + * @static + * @param {tendermint.types.ITxProof=} [properties] Properties to set + * @returns {tendermint.types.TxProof} TxProof instance + */ + TxProof.create = function create(properties) { + return new TxProof(properties); + }; + + /** + * Encodes the specified TxProof message. Does not implicitly {@link tendermint.types.TxProof.verify|verify} messages. + * @function encode + * @memberof tendermint.types.TxProof + * @static + * @param {tendermint.types.ITxProof} message TxProof message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TxProof.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rootHash != null && Object.hasOwnProperty.call(message, "rootHash")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.rootHash); + if (message.data != null && Object.hasOwnProperty.call(message, "data")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.data); + if (message.proof != null && Object.hasOwnProperty.call(message, "proof")) + $root.tendermint.crypto.Proof.encode(message.proof, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TxProof message, length delimited. Does not implicitly {@link tendermint.types.TxProof.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.types.TxProof + * @static + * @param {tendermint.types.ITxProof} message TxProof message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TxProof.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TxProof message from the specified reader or buffer. + * @function decode + * @memberof tendermint.types.TxProof + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.types.TxProof} TxProof + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TxProof.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.TxProof(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.rootHash = reader.bytes(); + break; + case 2: + message.data = reader.bytes(); + break; + case 3: + message.proof = $root.tendermint.crypto.Proof.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TxProof message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.types.TxProof + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.types.TxProof} TxProof + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TxProof.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TxProof message. + * @function verify + * @memberof tendermint.types.TxProof + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TxProof.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rootHash != null && message.hasOwnProperty("rootHash")) + if (!(message.rootHash && typeof message.rootHash.length === "number" || $util.isString(message.rootHash))) + return "rootHash: buffer expected"; + if (message.data != null && message.hasOwnProperty("data")) + if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) + return "data: buffer expected"; + if (message.proof != null && message.hasOwnProperty("proof")) { + let error = $root.tendermint.crypto.Proof.verify(message.proof); + if (error) + return "proof." + error; + } + return null; + }; + + /** + * Creates a TxProof message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.types.TxProof + * @static + * @param {Object.} object Plain object + * @returns {tendermint.types.TxProof} TxProof + */ + TxProof.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.types.TxProof) + return object; + let message = new $root.tendermint.types.TxProof(); + if (object.rootHash != null) + if (typeof object.rootHash === "string") + $util.base64.decode(object.rootHash, message.rootHash = $util.newBuffer($util.base64.length(object.rootHash)), 0); + else if (object.rootHash.length) + message.rootHash = object.rootHash; + if (object.data != null) + if (typeof object.data === "string") + $util.base64.decode(object.data, message.data = $util.newBuffer($util.base64.length(object.data)), 0); + else if (object.data.length) + message.data = object.data; + if (object.proof != null) { + if (typeof object.proof !== "object") + throw TypeError(".tendermint.types.TxProof.proof: object expected"); + message.proof = $root.tendermint.crypto.Proof.fromObject(object.proof); + } + return message; + }; + + /** + * Creates a plain object from a TxProof message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.types.TxProof + * @static + * @param {tendermint.types.TxProof} message TxProof + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TxProof.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + if (options.bytes === String) + object.rootHash = ""; + else { + object.rootHash = []; + if (options.bytes !== Array) + object.rootHash = $util.newBuffer(object.rootHash); + } + if (options.bytes === String) + object.data = ""; + else { + object.data = []; + if (options.bytes !== Array) + object.data = $util.newBuffer(object.data); + } + object.proof = null; + } + if (message.rootHash != null && message.hasOwnProperty("rootHash")) + object.rootHash = options.bytes === String ? $util.base64.encode(message.rootHash, 0, message.rootHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.rootHash) : message.rootHash; + if (message.data != null && message.hasOwnProperty("data")) + object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; + if (message.proof != null && message.hasOwnProperty("proof")) + object.proof = $root.tendermint.crypto.Proof.toObject(message.proof, options); + return object; + }; + + /** + * Converts this TxProof to JSON. + * @function toJSON + * @memberof tendermint.types.TxProof + * @instance + * @returns {Object.} JSON object + */ + TxProof.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TxProof; + })(types.TxProof || {}); + + types.ValidatorSet = (function(ValidatorSet) { + + /** + * Properties of a ValidatorSet. + * @memberof tendermint.types + * @interface IValidatorSet + * @property {Array.|null} [validators] ValidatorSet validators + * @property {tendermint.types.IValidator|null} [proposer] ValidatorSet proposer + * @property {number|Long|null} [totalVotingPower] ValidatorSet totalVotingPower + */ + + /** + * Constructs a new ValidatorSet. + * @memberof tendermint.types + * @classdesc Represents a ValidatorSet. + * @implements IValidatorSet + * @constructor + * @param {tendermint.types.IValidatorSet=} [properties] Properties to set + */ + function ValidatorSet(properties) { + this.validators = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ValidatorSet validators. + * @member {Array.} validators + * @memberof tendermint.types.ValidatorSet + * @instance + */ + ValidatorSet.prototype.validators = $util.emptyArray; + + /** + * ValidatorSet proposer. + * @member {tendermint.types.IValidator|null|undefined} proposer + * @memberof tendermint.types.ValidatorSet + * @instance + */ + ValidatorSet.prototype.proposer = null; + + /** + * ValidatorSet totalVotingPower. + * @member {number|Long} totalVotingPower + * @memberof tendermint.types.ValidatorSet + * @instance + */ + ValidatorSet.prototype.totalVotingPower = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new ValidatorSet instance using the specified properties. + * @function create + * @memberof tendermint.types.ValidatorSet + * @static + * @param {tendermint.types.IValidatorSet=} [properties] Properties to set + * @returns {tendermint.types.ValidatorSet} ValidatorSet instance + */ + ValidatorSet.create = function create(properties) { + return new ValidatorSet(properties); + }; + + /** + * Encodes the specified ValidatorSet message. Does not implicitly {@link tendermint.types.ValidatorSet.verify|verify} messages. + * @function encode + * @memberof tendermint.types.ValidatorSet + * @static + * @param {tendermint.types.IValidatorSet} message ValidatorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValidatorSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.validators != null && message.validators.length) + for (let i = 0; i < message.validators.length; ++i) + $root.tendermint.types.Validator.encode(message.validators[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.proposer != null && Object.hasOwnProperty.call(message, "proposer")) + $root.tendermint.types.Validator.encode(message.proposer, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.totalVotingPower != null && Object.hasOwnProperty.call(message, "totalVotingPower")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.totalVotingPower); + return writer; + }; + + /** + * Encodes the specified ValidatorSet message, length delimited. Does not implicitly {@link tendermint.types.ValidatorSet.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.types.ValidatorSet + * @static + * @param {tendermint.types.IValidatorSet} message ValidatorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValidatorSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ValidatorSet message from the specified reader or buffer. + * @function decode + * @memberof tendermint.types.ValidatorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.types.ValidatorSet} ValidatorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValidatorSet.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.ValidatorSet(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.validators && message.validators.length)) + message.validators = []; + message.validators.push($root.tendermint.types.Validator.decode(reader, reader.uint32())); + break; + case 2: + message.proposer = $root.tendermint.types.Validator.decode(reader, reader.uint32()); + break; + case 3: + message.totalVotingPower = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ValidatorSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.types.ValidatorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.types.ValidatorSet} ValidatorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValidatorSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ValidatorSet message. + * @function verify + * @memberof tendermint.types.ValidatorSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ValidatorSet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.validators != null && message.hasOwnProperty("validators")) { + if (!Array.isArray(message.validators)) + return "validators: array expected"; + for (let i = 0; i < message.validators.length; ++i) { + let error = $root.tendermint.types.Validator.verify(message.validators[i]); + if (error) + return "validators." + error; + } + } + if (message.proposer != null && message.hasOwnProperty("proposer")) { + let error = $root.tendermint.types.Validator.verify(message.proposer); + if (error) + return "proposer." + error; + } + if (message.totalVotingPower != null && message.hasOwnProperty("totalVotingPower")) + if (!$util.isInteger(message.totalVotingPower) && !(message.totalVotingPower && $util.isInteger(message.totalVotingPower.low) && $util.isInteger(message.totalVotingPower.high))) + return "totalVotingPower: integer|Long expected"; + return null; + }; + + /** + * Creates a ValidatorSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.types.ValidatorSet + * @static + * @param {Object.} object Plain object + * @returns {tendermint.types.ValidatorSet} ValidatorSet + */ + ValidatorSet.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.types.ValidatorSet) + return object; + let message = new $root.tendermint.types.ValidatorSet(); + if (object.validators) { + if (!Array.isArray(object.validators)) + throw TypeError(".tendermint.types.ValidatorSet.validators: array expected"); + message.validators = []; + for (let i = 0; i < object.validators.length; ++i) { + if (typeof object.validators[i] !== "object") + throw TypeError(".tendermint.types.ValidatorSet.validators: object expected"); + message.validators[i] = $root.tendermint.types.Validator.fromObject(object.validators[i]); + } + } + if (object.proposer != null) { + if (typeof object.proposer !== "object") + throw TypeError(".tendermint.types.ValidatorSet.proposer: object expected"); + message.proposer = $root.tendermint.types.Validator.fromObject(object.proposer); + } + if (object.totalVotingPower != null) + if ($util.Long) + (message.totalVotingPower = $util.Long.fromValue(object.totalVotingPower)).unsigned = false; + else if (typeof object.totalVotingPower === "string") + message.totalVotingPower = parseInt(object.totalVotingPower, 10); + else if (typeof object.totalVotingPower === "number") + message.totalVotingPower = object.totalVotingPower; + else if (typeof object.totalVotingPower === "object") + message.totalVotingPower = new $util.LongBits(object.totalVotingPower.low >>> 0, object.totalVotingPower.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a ValidatorSet message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.types.ValidatorSet + * @static + * @param {tendermint.types.ValidatorSet} message ValidatorSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ValidatorSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.validators = []; + if (options.defaults) { + object.proposer = null; + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.totalVotingPower = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.totalVotingPower = options.longs === String ? "0" : 0; + } + if (message.validators && message.validators.length) { + object.validators = []; + for (let j = 0; j < message.validators.length; ++j) + object.validators[j] = $root.tendermint.types.Validator.toObject(message.validators[j], options); + } + if (message.proposer != null && message.hasOwnProperty("proposer")) + object.proposer = $root.tendermint.types.Validator.toObject(message.proposer, options); + if (message.totalVotingPower != null && message.hasOwnProperty("totalVotingPower")) + if (typeof message.totalVotingPower === "number") + object.totalVotingPower = options.longs === String ? String(message.totalVotingPower) : message.totalVotingPower; + else + object.totalVotingPower = options.longs === String ? $util.Long.prototype.toString.call(message.totalVotingPower) : options.longs === Number ? new $util.LongBits(message.totalVotingPower.low >>> 0, message.totalVotingPower.high >>> 0).toNumber() : message.totalVotingPower; + return object; + }; + + /** + * Converts this ValidatorSet to JSON. + * @function toJSON + * @memberof tendermint.types.ValidatorSet + * @instance + * @returns {Object.} JSON object + */ + ValidatorSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ValidatorSet; + })(types.ValidatorSet || {}); + + types.Validator = (function(Validator) { + + /** + * Properties of a Validator. + * @memberof tendermint.types + * @interface IValidator + * @property {Uint8Array|null} [address] Validator address + * @property {tendermint.crypto.IPublicKey|null} [pubKey] Validator pubKey + * @property {number|Long|null} [votingPower] Validator votingPower + * @property {number|Long|null} [proposerPriority] Validator proposerPriority + */ + + /** + * Constructs a new Validator. + * @memberof tendermint.types + * @classdesc Represents a Validator. + * @implements IValidator + * @constructor + * @param {tendermint.types.IValidator=} [properties] Properties to set + */ + function Validator(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Validator address. + * @member {Uint8Array} address + * @memberof tendermint.types.Validator + * @instance + */ + Validator.prototype.address = $util.newBuffer([]); + + /** + * Validator pubKey. + * @member {tendermint.crypto.IPublicKey|null|undefined} pubKey + * @memberof tendermint.types.Validator + * @instance + */ + Validator.prototype.pubKey = null; + + /** + * Validator votingPower. + * @member {number|Long} votingPower + * @memberof tendermint.types.Validator + * @instance + */ + Validator.prototype.votingPower = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Validator proposerPriority. + * @member {number|Long} proposerPriority + * @memberof tendermint.types.Validator + * @instance + */ + Validator.prototype.proposerPriority = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new Validator instance using the specified properties. + * @function create + * @memberof tendermint.types.Validator + * @static + * @param {tendermint.types.IValidator=} [properties] Properties to set + * @returns {tendermint.types.Validator} Validator instance + */ + Validator.create = function create(properties) { + return new Validator(properties); + }; + + /** + * Encodes the specified Validator message. Does not implicitly {@link tendermint.types.Validator.verify|verify} messages. + * @function encode + * @memberof tendermint.types.Validator + * @static + * @param {tendermint.types.IValidator} message Validator message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Validator.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.address != null && Object.hasOwnProperty.call(message, "address")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.address); + if (message.pubKey != null && Object.hasOwnProperty.call(message, "pubKey")) + $root.tendermint.crypto.PublicKey.encode(message.pubKey, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.votingPower != null && Object.hasOwnProperty.call(message, "votingPower")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.votingPower); + if (message.proposerPriority != null && Object.hasOwnProperty.call(message, "proposerPriority")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.proposerPriority); + return writer; + }; + + /** + * Encodes the specified Validator message, length delimited. Does not implicitly {@link tendermint.types.Validator.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.types.Validator + * @static + * @param {tendermint.types.IValidator} message Validator message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Validator.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Validator message from the specified reader or buffer. + * @function decode + * @memberof tendermint.types.Validator + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.types.Validator} Validator + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Validator.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.Validator(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.address = reader.bytes(); + break; + case 2: + message.pubKey = $root.tendermint.crypto.PublicKey.decode(reader, reader.uint32()); + break; + case 3: + message.votingPower = reader.int64(); + break; + case 4: + message.proposerPriority = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Validator message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.types.Validator + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.types.Validator} Validator + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Validator.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Validator message. + * @function verify + * @memberof tendermint.types.Validator + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Validator.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.address != null && message.hasOwnProperty("address")) + if (!(message.address && typeof message.address.length === "number" || $util.isString(message.address))) + return "address: buffer expected"; + if (message.pubKey != null && message.hasOwnProperty("pubKey")) { + let error = $root.tendermint.crypto.PublicKey.verify(message.pubKey); + if (error) + return "pubKey." + error; + } + if (message.votingPower != null && message.hasOwnProperty("votingPower")) + if (!$util.isInteger(message.votingPower) && !(message.votingPower && $util.isInteger(message.votingPower.low) && $util.isInteger(message.votingPower.high))) + return "votingPower: integer|Long expected"; + if (message.proposerPriority != null && message.hasOwnProperty("proposerPriority")) + if (!$util.isInteger(message.proposerPriority) && !(message.proposerPriority && $util.isInteger(message.proposerPriority.low) && $util.isInteger(message.proposerPriority.high))) + return "proposerPriority: integer|Long expected"; + return null; + }; + + /** + * Creates a Validator message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.types.Validator + * @static + * @param {Object.} object Plain object + * @returns {tendermint.types.Validator} Validator + */ + Validator.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.types.Validator) + return object; + let message = new $root.tendermint.types.Validator(); + if (object.address != null) + if (typeof object.address === "string") + $util.base64.decode(object.address, message.address = $util.newBuffer($util.base64.length(object.address)), 0); + else if (object.address.length) + message.address = object.address; + if (object.pubKey != null) { + if (typeof object.pubKey !== "object") + throw TypeError(".tendermint.types.Validator.pubKey: object expected"); + message.pubKey = $root.tendermint.crypto.PublicKey.fromObject(object.pubKey); + } + if (object.votingPower != null) + if ($util.Long) + (message.votingPower = $util.Long.fromValue(object.votingPower)).unsigned = false; + else if (typeof object.votingPower === "string") + message.votingPower = parseInt(object.votingPower, 10); + else if (typeof object.votingPower === "number") + message.votingPower = object.votingPower; + else if (typeof object.votingPower === "object") + message.votingPower = new $util.LongBits(object.votingPower.low >>> 0, object.votingPower.high >>> 0).toNumber(); + if (object.proposerPriority != null) + if ($util.Long) + (message.proposerPriority = $util.Long.fromValue(object.proposerPriority)).unsigned = false; + else if (typeof object.proposerPriority === "string") + message.proposerPriority = parseInt(object.proposerPriority, 10); + else if (typeof object.proposerPriority === "number") + message.proposerPriority = object.proposerPriority; + else if (typeof object.proposerPriority === "object") + message.proposerPriority = new $util.LongBits(object.proposerPriority.low >>> 0, object.proposerPriority.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a Validator message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.types.Validator + * @static + * @param {tendermint.types.Validator} message Validator + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Validator.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + if (options.bytes === String) + object.address = ""; + else { + object.address = []; + if (options.bytes !== Array) + object.address = $util.newBuffer(object.address); + } + object.pubKey = null; + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.votingPower = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.votingPower = options.longs === String ? "0" : 0; + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.proposerPriority = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.proposerPriority = options.longs === String ? "0" : 0; + } + if (message.address != null && message.hasOwnProperty("address")) + object.address = options.bytes === String ? $util.base64.encode(message.address, 0, message.address.length) : options.bytes === Array ? Array.prototype.slice.call(message.address) : message.address; + if (message.pubKey != null && message.hasOwnProperty("pubKey")) + object.pubKey = $root.tendermint.crypto.PublicKey.toObject(message.pubKey, options); + if (message.votingPower != null && message.hasOwnProperty("votingPower")) + if (typeof message.votingPower === "number") + object.votingPower = options.longs === String ? String(message.votingPower) : message.votingPower; + else + object.votingPower = options.longs === String ? $util.Long.prototype.toString.call(message.votingPower) : options.longs === Number ? new $util.LongBits(message.votingPower.low >>> 0, message.votingPower.high >>> 0).toNumber() : message.votingPower; + if (message.proposerPriority != null && message.hasOwnProperty("proposerPriority")) + if (typeof message.proposerPriority === "number") + object.proposerPriority = options.longs === String ? String(message.proposerPriority) : message.proposerPriority; + else + object.proposerPriority = options.longs === String ? $util.Long.prototype.toString.call(message.proposerPriority) : options.longs === Number ? new $util.LongBits(message.proposerPriority.low >>> 0, message.proposerPriority.high >>> 0).toNumber() : message.proposerPriority; + return object; + }; + + /** + * Converts this Validator to JSON. + * @function toJSON + * @memberof tendermint.types.Validator + * @instance + * @returns {Object.} JSON object + */ + Validator.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Validator; + })(types.Validator || {}); + + types.SimpleValidator = (function(SimpleValidator) { + + /** + * Properties of a SimpleValidator. + * @memberof tendermint.types + * @interface ISimpleValidator + * @property {tendermint.crypto.IPublicKey|null} [pubKey] SimpleValidator pubKey + * @property {number|Long|null} [votingPower] SimpleValidator votingPower + */ + + /** + * Constructs a new SimpleValidator. + * @memberof tendermint.types + * @classdesc Represents a SimpleValidator. + * @implements ISimpleValidator + * @constructor + * @param {tendermint.types.ISimpleValidator=} [properties] Properties to set + */ + function SimpleValidator(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SimpleValidator pubKey. + * @member {tendermint.crypto.IPublicKey|null|undefined} pubKey + * @memberof tendermint.types.SimpleValidator + * @instance + */ + SimpleValidator.prototype.pubKey = null; + + /** + * SimpleValidator votingPower. + * @member {number|Long} votingPower + * @memberof tendermint.types.SimpleValidator + * @instance + */ + SimpleValidator.prototype.votingPower = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new SimpleValidator instance using the specified properties. + * @function create + * @memberof tendermint.types.SimpleValidator + * @static + * @param {tendermint.types.ISimpleValidator=} [properties] Properties to set + * @returns {tendermint.types.SimpleValidator} SimpleValidator instance + */ + SimpleValidator.create = function create(properties) { + return new SimpleValidator(properties); + }; + + /** + * Encodes the specified SimpleValidator message. Does not implicitly {@link tendermint.types.SimpleValidator.verify|verify} messages. + * @function encode + * @memberof tendermint.types.SimpleValidator + * @static + * @param {tendermint.types.ISimpleValidator} message SimpleValidator message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SimpleValidator.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pubKey != null && Object.hasOwnProperty.call(message, "pubKey")) + $root.tendermint.crypto.PublicKey.encode(message.pubKey, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.votingPower != null && Object.hasOwnProperty.call(message, "votingPower")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.votingPower); + return writer; + }; + + /** + * Encodes the specified SimpleValidator message, length delimited. Does not implicitly {@link tendermint.types.SimpleValidator.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.types.SimpleValidator + * @static + * @param {tendermint.types.ISimpleValidator} message SimpleValidator message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SimpleValidator.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SimpleValidator message from the specified reader or buffer. + * @function decode + * @memberof tendermint.types.SimpleValidator + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.types.SimpleValidator} SimpleValidator + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SimpleValidator.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.SimpleValidator(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.pubKey = $root.tendermint.crypto.PublicKey.decode(reader, reader.uint32()); + break; + case 2: + message.votingPower = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SimpleValidator message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.types.SimpleValidator + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.types.SimpleValidator} SimpleValidator + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SimpleValidator.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SimpleValidator message. + * @function verify + * @memberof tendermint.types.SimpleValidator + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SimpleValidator.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.pubKey != null && message.hasOwnProperty("pubKey")) { + let error = $root.tendermint.crypto.PublicKey.verify(message.pubKey); + if (error) + return "pubKey." + error; + } + if (message.votingPower != null && message.hasOwnProperty("votingPower")) + if (!$util.isInteger(message.votingPower) && !(message.votingPower && $util.isInteger(message.votingPower.low) && $util.isInteger(message.votingPower.high))) + return "votingPower: integer|Long expected"; + return null; + }; + + /** + * Creates a SimpleValidator message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.types.SimpleValidator + * @static + * @param {Object.} object Plain object + * @returns {tendermint.types.SimpleValidator} SimpleValidator + */ + SimpleValidator.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.types.SimpleValidator) + return object; + let message = new $root.tendermint.types.SimpleValidator(); + if (object.pubKey != null) { + if (typeof object.pubKey !== "object") + throw TypeError(".tendermint.types.SimpleValidator.pubKey: object expected"); + message.pubKey = $root.tendermint.crypto.PublicKey.fromObject(object.pubKey); + } + if (object.votingPower != null) + if ($util.Long) + (message.votingPower = $util.Long.fromValue(object.votingPower)).unsigned = false; + else if (typeof object.votingPower === "string") + message.votingPower = parseInt(object.votingPower, 10); + else if (typeof object.votingPower === "number") + message.votingPower = object.votingPower; + else if (typeof object.votingPower === "object") + message.votingPower = new $util.LongBits(object.votingPower.low >>> 0, object.votingPower.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a SimpleValidator message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.types.SimpleValidator + * @static + * @param {tendermint.types.SimpleValidator} message SimpleValidator + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SimpleValidator.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.pubKey = null; + if ($util.Long) { + let long = new $util.Long(0, 0, false); + object.votingPower = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.votingPower = options.longs === String ? "0" : 0; + } + if (message.pubKey != null && message.hasOwnProperty("pubKey")) + object.pubKey = $root.tendermint.crypto.PublicKey.toObject(message.pubKey, options); + if (message.votingPower != null && message.hasOwnProperty("votingPower")) + if (typeof message.votingPower === "number") + object.votingPower = options.longs === String ? String(message.votingPower) : message.votingPower; + else + object.votingPower = options.longs === String ? $util.Long.prototype.toString.call(message.votingPower) : options.longs === Number ? new $util.LongBits(message.votingPower.low >>> 0, message.votingPower.high >>> 0).toNumber() : message.votingPower; + return object; + }; + + /** + * Converts this SimpleValidator to JSON. + * @function toJSON + * @memberof tendermint.types.SimpleValidator + * @instance + * @returns {Object.} JSON object + */ + SimpleValidator.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SimpleValidator; + })(types.SimpleValidator || {}); + + return types; + })(tendermint.types || {}); + + /** + * Namespace version. + * @memberof tendermint + * @namespace + */ + + tendermint.version = (function(version) { + + version.App = (function(App) { + + /** + * Properties of an App. + * @memberof tendermint.version + * @interface IApp + * @property {number|Long|null} [protocol] App protocol + * @property {string|null} [software] App software + */ + + /** + * Constructs a new App. + * @memberof tendermint.version + * @classdesc Represents an App. + * @implements IApp + * @constructor + * @param {tendermint.version.IApp=} [properties] Properties to set + */ + function App(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * App protocol. + * @member {number|Long} protocol + * @memberof tendermint.version.App + * @instance + */ + App.prototype.protocol = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * App software. + * @member {string} software + * @memberof tendermint.version.App + * @instance + */ + App.prototype.software = ""; + + /** + * Creates a new App instance using the specified properties. + * @function create + * @memberof tendermint.version.App + * @static + * @param {tendermint.version.IApp=} [properties] Properties to set + * @returns {tendermint.version.App} App instance + */ + App.create = function create(properties) { + return new App(properties); + }; + + /** + * Encodes the specified App message. Does not implicitly {@link tendermint.version.App.verify|verify} messages. + * @function encode + * @memberof tendermint.version.App + * @static + * @param {tendermint.version.IApp} message App message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + App.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.protocol != null && Object.hasOwnProperty.call(message, "protocol")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.protocol); + if (message.software != null && Object.hasOwnProperty.call(message, "software")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.software); + return writer; + }; + + /** + * Encodes the specified App message, length delimited. Does not implicitly {@link tendermint.version.App.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.version.App + * @static + * @param {tendermint.version.IApp} message App message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + App.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an App message from the specified reader or buffer. + * @function decode + * @memberof tendermint.version.App + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.version.App} App + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + App.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.version.App(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.protocol = reader.uint64(); + break; + case 2: + message.software = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an App message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.version.App + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.version.App} App + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + App.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an App message. + * @function verify + * @memberof tendermint.version.App + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + App.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.protocol != null && message.hasOwnProperty("protocol")) + if (!$util.isInteger(message.protocol) && !(message.protocol && $util.isInteger(message.protocol.low) && $util.isInteger(message.protocol.high))) + return "protocol: integer|Long expected"; + if (message.software != null && message.hasOwnProperty("software")) + if (!$util.isString(message.software)) + return "software: string expected"; + return null; + }; + + /** + * Creates an App message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.version.App + * @static + * @param {Object.} object Plain object + * @returns {tendermint.version.App} App + */ + App.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.version.App) + return object; + let message = new $root.tendermint.version.App(); + if (object.protocol != null) + if ($util.Long) + (message.protocol = $util.Long.fromValue(object.protocol)).unsigned = true; + else if (typeof object.protocol === "string") + message.protocol = parseInt(object.protocol, 10); + else if (typeof object.protocol === "number") + message.protocol = object.protocol; + else if (typeof object.protocol === "object") + message.protocol = new $util.LongBits(object.protocol.low >>> 0, object.protocol.high >>> 0).toNumber(true); + if (object.software != null) + message.software = String(object.software); + return message; + }; + + /** + * Creates a plain object from an App message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.version.App + * @static + * @param {tendermint.version.App} message App + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + App.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.protocol = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.protocol = options.longs === String ? "0" : 0; + object.software = ""; + } + if (message.protocol != null && message.hasOwnProperty("protocol")) + if (typeof message.protocol === "number") + object.protocol = options.longs === String ? String(message.protocol) : message.protocol; + else + object.protocol = options.longs === String ? $util.Long.prototype.toString.call(message.protocol) : options.longs === Number ? new $util.LongBits(message.protocol.low >>> 0, message.protocol.high >>> 0).toNumber(true) : message.protocol; + if (message.software != null && message.hasOwnProperty("software")) + object.software = message.software; + return object; + }; + + /** + * Converts this App to JSON. + * @function toJSON + * @memberof tendermint.version.App + * @instance + * @returns {Object.} JSON object + */ + App.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return App; + })(version.App || {}); + + version.Consensus = (function(Consensus) { + + /** + * Properties of a Consensus. + * @memberof tendermint.version + * @interface IConsensus + * @property {number|Long|null} [block] Consensus block + * @property {number|Long|null} [app] Consensus app + */ + + /** + * Constructs a new Consensus. + * @memberof tendermint.version + * @classdesc Represents a Consensus. + * @implements IConsensus + * @constructor + * @param {tendermint.version.IConsensus=} [properties] Properties to set + */ + function Consensus(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Consensus block. + * @member {number|Long} block + * @memberof tendermint.version.Consensus + * @instance + */ + Consensus.prototype.block = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Consensus app. + * @member {number|Long} app + * @memberof tendermint.version.Consensus + * @instance + */ + Consensus.prototype.app = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new Consensus instance using the specified properties. + * @function create + * @memberof tendermint.version.Consensus + * @static + * @param {tendermint.version.IConsensus=} [properties] Properties to set + * @returns {tendermint.version.Consensus} Consensus instance + */ + Consensus.create = function create(properties) { + return new Consensus(properties); + }; + + /** + * Encodes the specified Consensus message. Does not implicitly {@link tendermint.version.Consensus.verify|verify} messages. + * @function encode + * @memberof tendermint.version.Consensus + * @static + * @param {tendermint.version.IConsensus} message Consensus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Consensus.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.block != null && Object.hasOwnProperty.call(message, "block")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.block); + if (message.app != null && Object.hasOwnProperty.call(message, "app")) + writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.app); + return writer; + }; + + /** + * Encodes the specified Consensus message, length delimited. Does not implicitly {@link tendermint.version.Consensus.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.version.Consensus + * @static + * @param {tendermint.version.IConsensus} message Consensus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Consensus.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Consensus message from the specified reader or buffer. + * @function decode + * @memberof tendermint.version.Consensus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.version.Consensus} Consensus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Consensus.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.version.Consensus(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.block = reader.uint64(); + break; + case 2: + message.app = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Consensus message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.version.Consensus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.version.Consensus} Consensus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Consensus.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Consensus message. + * @function verify + * @memberof tendermint.version.Consensus + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Consensus.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.block != null && message.hasOwnProperty("block")) + if (!$util.isInteger(message.block) && !(message.block && $util.isInteger(message.block.low) && $util.isInteger(message.block.high))) + return "block: integer|Long expected"; + if (message.app != null && message.hasOwnProperty("app")) + if (!$util.isInteger(message.app) && !(message.app && $util.isInteger(message.app.low) && $util.isInteger(message.app.high))) + return "app: integer|Long expected"; + return null; + }; + + /** + * Creates a Consensus message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.version.Consensus + * @static + * @param {Object.} object Plain object + * @returns {tendermint.version.Consensus} Consensus + */ + Consensus.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.version.Consensus) + return object; + let message = new $root.tendermint.version.Consensus(); + if (object.block != null) + if ($util.Long) + (message.block = $util.Long.fromValue(object.block)).unsigned = true; + else if (typeof object.block === "string") + message.block = parseInt(object.block, 10); + else if (typeof object.block === "number") + message.block = object.block; + else if (typeof object.block === "object") + message.block = new $util.LongBits(object.block.low >>> 0, object.block.high >>> 0).toNumber(true); + if (object.app != null) + if ($util.Long) + (message.app = $util.Long.fromValue(object.app)).unsigned = true; + else if (typeof object.app === "string") + message.app = parseInt(object.app, 10); + else if (typeof object.app === "number") + message.app = object.app; + else if (typeof object.app === "object") + message.app = new $util.LongBits(object.app.low >>> 0, object.app.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a Consensus message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.version.Consensus + * @static + * @param {tendermint.version.Consensus} message Consensus + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Consensus.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.block = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.block = options.longs === String ? "0" : 0; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.app = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.app = options.longs === String ? "0" : 0; + } + if (message.block != null && message.hasOwnProperty("block")) + if (typeof message.block === "number") + object.block = options.longs === String ? String(message.block) : message.block; + else + object.block = options.longs === String ? $util.Long.prototype.toString.call(message.block) : options.longs === Number ? new $util.LongBits(message.block.low >>> 0, message.block.high >>> 0).toNumber(true) : message.block; + if (message.app != null && message.hasOwnProperty("app")) + if (typeof message.app === "number") + object.app = options.longs === String ? String(message.app) : message.app; + else + object.app = options.longs === String ? $util.Long.prototype.toString.call(message.app) : options.longs === Number ? new $util.LongBits(message.app.low >>> 0, message.app.high >>> 0).toNumber(true) : message.app; + return object; + }; + + /** + * Converts this Consensus to JSON. + * @function toJSON + * @memberof tendermint.version.Consensus + * @instance + * @returns {Object.} JSON object + */ + Consensus.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Consensus; + })(version.Consensus || {}); + + return version; + })(tendermint.version || {}); + + return tendermint; +})($root.tendermint || {}); + +/** + * Namespace ics23. + * @exports ics23 + * @namespace + */ + +export const ics23 = $root.ics23 = ((ics23) => { + + /** + * HashOp enum. + * @name ics23.HashOp + * @enum {string} + * @property {number} NO_HASH=0 NO_HASH value + * @property {number} SHA256=1 SHA256 value + * @property {number} SHA512=2 SHA512 value + * @property {number} KECCAK=3 KECCAK value + * @property {number} RIPEMD160=4 RIPEMD160 value + * @property {number} BITCOIN=5 BITCOIN value + */ + ics23.HashOp = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NO_HASH"] = 0; + values[valuesById[1] = "SHA256"] = 1; + values[valuesById[2] = "SHA512"] = 2; + values[valuesById[3] = "KECCAK"] = 3; + values[valuesById[4] = "RIPEMD160"] = 4; + values[valuesById[5] = "BITCOIN"] = 5; + return values; + })(); + + /** + * LengthOp defines how to process the key and value of the LeafOp + * to include length information. After encoding the length with the given + * algorithm, the length will be prepended to the key and value bytes. + * (Each one with it's own encoded length) + * @name ics23.LengthOp + * @enum {string} + * @property {number} NO_PREFIX=0 NO_PREFIX value + * @property {number} VAR_PROTO=1 VAR_PROTO value + * @property {number} VAR_RLP=2 VAR_RLP value + * @property {number} FIXED32_BIG=3 FIXED32_BIG value + * @property {number} FIXED32_LITTLE=4 FIXED32_LITTLE value + * @property {number} FIXED64_BIG=5 FIXED64_BIG value + * @property {number} FIXED64_LITTLE=6 FIXED64_LITTLE value + * @property {number} REQUIRE_32_BYTES=7 REQUIRE_32_BYTES value + * @property {number} REQUIRE_64_BYTES=8 REQUIRE_64_BYTES value + */ + ics23.LengthOp = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NO_PREFIX"] = 0; + values[valuesById[1] = "VAR_PROTO"] = 1; + values[valuesById[2] = "VAR_RLP"] = 2; + values[valuesById[3] = "FIXED32_BIG"] = 3; + values[valuesById[4] = "FIXED32_LITTLE"] = 4; + values[valuesById[5] = "FIXED64_BIG"] = 5; + values[valuesById[6] = "FIXED64_LITTLE"] = 6; + values[valuesById[7] = "REQUIRE_32_BYTES"] = 7; + values[valuesById[8] = "REQUIRE_64_BYTES"] = 8; + return values; + })(); + + ics23.ExistenceProof = (function(ExistenceProof) { + + /** + * Properties of an ExistenceProof. + * @memberof ics23 + * @interface IExistenceProof + * @property {Uint8Array|null} [key] ExistenceProof key + * @property {Uint8Array|null} [value] ExistenceProof value + * @property {ics23.ILeafOp|null} [leaf] ExistenceProof leaf + * @property {Array.|null} [path] ExistenceProof path + */ + + /** + * Constructs a new ExistenceProof. + * @memberof ics23 + * @classdesc ExistenceProof takes a key and a value and a set of steps to perform on it. + * The result of peforming all these steps will provide a "root hash", which can + * be compared to the value in a header. + * + * Since it is computationally infeasible to produce a hash collission for any of the used + * cryptographic hash functions, if someone can provide a series of operations to transform + * a given key and value into a root hash that matches some trusted root, these key and values + * must be in the referenced merkle tree. + * + * The only possible issue is maliablity in LeafOp, such as providing extra prefix data, + * which should be controlled by a spec. Eg. with lengthOp as NONE, + * prefix = FOO, key = BAR, value = CHOICE + * and + * prefix = F, key = OOBAR, value = CHOICE + * would produce the same value. + * + * With LengthOp this is tricker but not impossible. Which is why the "leafPrefixEqual" field + * in the ProofSpec is valuable to prevent this mutability. And why all trees should + * length-prefix the data before hashing it. + * @implements IExistenceProof + * @constructor + * @param {ics23.IExistenceProof=} [properties] Properties to set + */ + function ExistenceProof(properties) { + this.path = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExistenceProof key. + * @member {Uint8Array} key + * @memberof ics23.ExistenceProof + * @instance + */ + ExistenceProof.prototype.key = $util.newBuffer([]); + + /** + * ExistenceProof value. + * @member {Uint8Array} value + * @memberof ics23.ExistenceProof + * @instance + */ + ExistenceProof.prototype.value = $util.newBuffer([]); + + /** + * ExistenceProof leaf. + * @member {ics23.ILeafOp|null|undefined} leaf + * @memberof ics23.ExistenceProof + * @instance + */ + ExistenceProof.prototype.leaf = null; + + /** + * ExistenceProof path. + * @member {Array.} path + * @memberof ics23.ExistenceProof + * @instance + */ + ExistenceProof.prototype.path = $util.emptyArray; + + /** + * Creates a new ExistenceProof instance using the specified properties. + * @function create + * @memberof ics23.ExistenceProof + * @static + * @param {ics23.IExistenceProof=} [properties] Properties to set + * @returns {ics23.ExistenceProof} ExistenceProof instance + */ + ExistenceProof.create = function create(properties) { + return new ExistenceProof(properties); + }; + + /** + * Encodes the specified ExistenceProof message. Does not implicitly {@link ics23.ExistenceProof.verify|verify} messages. + * @function encode + * @memberof ics23.ExistenceProof + * @static + * @param {ics23.IExistenceProof} message ExistenceProof message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExistenceProof.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.key); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); + if (message.leaf != null && Object.hasOwnProperty.call(message, "leaf")) + $root.ics23.LeafOp.encode(message.leaf, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.path != null && message.path.length) + for (let i = 0; i < message.path.length; ++i) + $root.ics23.InnerOp.encode(message.path[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExistenceProof message, length delimited. Does not implicitly {@link ics23.ExistenceProof.verify|verify} messages. + * @function encodeDelimited + * @memberof ics23.ExistenceProof + * @static + * @param {ics23.IExistenceProof} message ExistenceProof message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExistenceProof.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExistenceProof message from the specified reader or buffer. + * @function decode + * @memberof ics23.ExistenceProof + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ics23.ExistenceProof} ExistenceProof + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExistenceProof.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ics23.ExistenceProof(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.key = reader.bytes(); + break; + case 2: + message.value = reader.bytes(); + break; + case 3: + message.leaf = $root.ics23.LeafOp.decode(reader, reader.uint32()); + break; + case 4: + if (!(message.path && message.path.length)) + message.path = []; + message.path.push($root.ics23.InnerOp.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExistenceProof message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ics23.ExistenceProof + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ics23.ExistenceProof} ExistenceProof + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExistenceProof.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExistenceProof message. + * @function verify + * @memberof ics23.ExistenceProof + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExistenceProof.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.key != null && message.hasOwnProperty("key")) + if (!(message.key && typeof message.key.length === "number" || $util.isString(message.key))) + return "key: buffer expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; + if (message.leaf != null && message.hasOwnProperty("leaf")) { + let error = $root.ics23.LeafOp.verify(message.leaf); + if (error) + return "leaf." + error; + } + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (let i = 0; i < message.path.length; ++i) { + let error = $root.ics23.InnerOp.verify(message.path[i]); + if (error) + return "path." + error; + } + } + return null; + }; + + /** + * Creates an ExistenceProof message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ics23.ExistenceProof + * @static + * @param {Object.} object Plain object + * @returns {ics23.ExistenceProof} ExistenceProof + */ + ExistenceProof.fromObject = function fromObject(object) { + if (object instanceof $root.ics23.ExistenceProof) + return object; + let message = new $root.ics23.ExistenceProof(); + if (object.key != null) + if (typeof object.key === "string") + $util.base64.decode(object.key, message.key = $util.newBuffer($util.base64.length(object.key)), 0); + else if (object.key.length) + message.key = object.key; + if (object.value != null) + if (typeof object.value === "string") + $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); + else if (object.value.length) + message.value = object.value; + if (object.leaf != null) { + if (typeof object.leaf !== "object") + throw TypeError(".ics23.ExistenceProof.leaf: object expected"); + message.leaf = $root.ics23.LeafOp.fromObject(object.leaf); + } + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".ics23.ExistenceProof.path: array expected"); + message.path = []; + for (let i = 0; i < object.path.length; ++i) { + if (typeof object.path[i] !== "object") + throw TypeError(".ics23.ExistenceProof.path: object expected"); + message.path[i] = $root.ics23.InnerOp.fromObject(object.path[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an ExistenceProof message. Also converts values to other types if specified. + * @function toObject + * @memberof ics23.ExistenceProof + * @static + * @param {ics23.ExistenceProof} message ExistenceProof + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExistenceProof.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.path = []; + if (options.defaults) { + if (options.bytes === String) + object.key = ""; + else { + object.key = []; + if (options.bytes !== Array) + object.key = $util.newBuffer(object.key); + } + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + object.leaf = null; + } + if (message.key != null && message.hasOwnProperty("key")) + object.key = options.bytes === String ? $util.base64.encode(message.key, 0, message.key.length) : options.bytes === Array ? Array.prototype.slice.call(message.key) : message.key; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + if (message.leaf != null && message.hasOwnProperty("leaf")) + object.leaf = $root.ics23.LeafOp.toObject(message.leaf, options); + if (message.path && message.path.length) { + object.path = []; + for (let j = 0; j < message.path.length; ++j) + object.path[j] = $root.ics23.InnerOp.toObject(message.path[j], options); + } + return object; + }; + + /** + * Converts this ExistenceProof to JSON. + * @function toJSON + * @memberof ics23.ExistenceProof + * @instance + * @returns {Object.} JSON object + */ + ExistenceProof.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ExistenceProof; + })(ics23.ExistenceProof || {}); + + ics23.NonExistenceProof = (function(NonExistenceProof) { + + /** + * Properties of a NonExistenceProof. + * @memberof ics23 + * @interface INonExistenceProof + * @property {Uint8Array|null} [key] NonExistenceProof key + * @property {ics23.IExistenceProof|null} [left] NonExistenceProof left + * @property {ics23.IExistenceProof|null} [right] NonExistenceProof right + */ + + /** + * Constructs a new NonExistenceProof. + * @memberof ics23 + * @classdesc Represents a NonExistenceProof. + * @implements INonExistenceProof + * @constructor + * @param {ics23.INonExistenceProof=} [properties] Properties to set + */ + function NonExistenceProof(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NonExistenceProof key. + * @member {Uint8Array} key + * @memberof ics23.NonExistenceProof + * @instance + */ + NonExistenceProof.prototype.key = $util.newBuffer([]); + + /** + * NonExistenceProof left. + * @member {ics23.IExistenceProof|null|undefined} left + * @memberof ics23.NonExistenceProof + * @instance + */ + NonExistenceProof.prototype.left = null; + + /** + * NonExistenceProof right. + * @member {ics23.IExistenceProof|null|undefined} right + * @memberof ics23.NonExistenceProof + * @instance + */ + NonExistenceProof.prototype.right = null; + + /** + * Creates a new NonExistenceProof instance using the specified properties. + * @function create + * @memberof ics23.NonExistenceProof + * @static + * @param {ics23.INonExistenceProof=} [properties] Properties to set + * @returns {ics23.NonExistenceProof} NonExistenceProof instance + */ + NonExistenceProof.create = function create(properties) { + return new NonExistenceProof(properties); + }; + + /** + * Encodes the specified NonExistenceProof message. Does not implicitly {@link ics23.NonExistenceProof.verify|verify} messages. + * @function encode + * @memberof ics23.NonExistenceProof + * @static + * @param {ics23.INonExistenceProof} message NonExistenceProof message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NonExistenceProof.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.key); + if (message.left != null && Object.hasOwnProperty.call(message, "left")) + $root.ics23.ExistenceProof.encode(message.left, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.right != null && Object.hasOwnProperty.call(message, "right")) + $root.ics23.ExistenceProof.encode(message.right, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified NonExistenceProof message, length delimited. Does not implicitly {@link ics23.NonExistenceProof.verify|verify} messages. + * @function encodeDelimited + * @memberof ics23.NonExistenceProof + * @static + * @param {ics23.INonExistenceProof} message NonExistenceProof message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NonExistenceProof.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NonExistenceProof message from the specified reader or buffer. + * @function decode + * @memberof ics23.NonExistenceProof + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ics23.NonExistenceProof} NonExistenceProof + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NonExistenceProof.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ics23.NonExistenceProof(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.key = reader.bytes(); + break; + case 2: + message.left = $root.ics23.ExistenceProof.decode(reader, reader.uint32()); + break; + case 3: + message.right = $root.ics23.ExistenceProof.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NonExistenceProof message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ics23.NonExistenceProof + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ics23.NonExistenceProof} NonExistenceProof + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NonExistenceProof.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NonExistenceProof message. + * @function verify + * @memberof ics23.NonExistenceProof + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NonExistenceProof.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.key != null && message.hasOwnProperty("key")) + if (!(message.key && typeof message.key.length === "number" || $util.isString(message.key))) + return "key: buffer expected"; + if (message.left != null && message.hasOwnProperty("left")) { + let error = $root.ics23.ExistenceProof.verify(message.left); + if (error) + return "left." + error; + } + if (message.right != null && message.hasOwnProperty("right")) { + let error = $root.ics23.ExistenceProof.verify(message.right); + if (error) + return "right." + error; + } + return null; + }; + + /** + * Creates a NonExistenceProof message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ics23.NonExistenceProof + * @static + * @param {Object.} object Plain object + * @returns {ics23.NonExistenceProof} NonExistenceProof + */ + NonExistenceProof.fromObject = function fromObject(object) { + if (object instanceof $root.ics23.NonExistenceProof) + return object; + let message = new $root.ics23.NonExistenceProof(); + if (object.key != null) + if (typeof object.key === "string") + $util.base64.decode(object.key, message.key = $util.newBuffer($util.base64.length(object.key)), 0); + else if (object.key.length) + message.key = object.key; + if (object.left != null) { + if (typeof object.left !== "object") + throw TypeError(".ics23.NonExistenceProof.left: object expected"); + message.left = $root.ics23.ExistenceProof.fromObject(object.left); + } + if (object.right != null) { + if (typeof object.right !== "object") + throw TypeError(".ics23.NonExistenceProof.right: object expected"); + message.right = $root.ics23.ExistenceProof.fromObject(object.right); + } + return message; + }; + + /** + * Creates a plain object from a NonExistenceProof message. Also converts values to other types if specified. + * @function toObject + * @memberof ics23.NonExistenceProof + * @static + * @param {ics23.NonExistenceProof} message NonExistenceProof + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NonExistenceProof.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + if (options.bytes === String) + object.key = ""; + else { + object.key = []; + if (options.bytes !== Array) + object.key = $util.newBuffer(object.key); + } + object.left = null; + object.right = null; + } + if (message.key != null && message.hasOwnProperty("key")) + object.key = options.bytes === String ? $util.base64.encode(message.key, 0, message.key.length) : options.bytes === Array ? Array.prototype.slice.call(message.key) : message.key; + if (message.left != null && message.hasOwnProperty("left")) + object.left = $root.ics23.ExistenceProof.toObject(message.left, options); + if (message.right != null && message.hasOwnProperty("right")) + object.right = $root.ics23.ExistenceProof.toObject(message.right, options); + return object; + }; + + /** + * Converts this NonExistenceProof to JSON. + * @function toJSON + * @memberof ics23.NonExistenceProof + * @instance + * @returns {Object.} JSON object + */ + NonExistenceProof.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return NonExistenceProof; + })(ics23.NonExistenceProof || {}); + + ics23.CommitmentProof = (function(CommitmentProof) { + + /** + * Properties of a CommitmentProof. + * @memberof ics23 + * @interface ICommitmentProof + * @property {ics23.IExistenceProof|null} [exist] CommitmentProof exist + * @property {ics23.INonExistenceProof|null} [nonexist] CommitmentProof nonexist + * @property {ics23.IBatchProof|null} [batch] CommitmentProof batch + * @property {ics23.ICompressedBatchProof|null} [compressed] CommitmentProof compressed + */ + + /** + * Constructs a new CommitmentProof. + * @memberof ics23 + * @classdesc Represents a CommitmentProof. + * @implements ICommitmentProof + * @constructor + * @param {ics23.ICommitmentProof=} [properties] Properties to set + */ + function CommitmentProof(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CommitmentProof exist. + * @member {ics23.IExistenceProof|null|undefined} exist + * @memberof ics23.CommitmentProof + * @instance + */ + CommitmentProof.prototype.exist = null; + + /** + * CommitmentProof nonexist. + * @member {ics23.INonExistenceProof|null|undefined} nonexist + * @memberof ics23.CommitmentProof + * @instance + */ + CommitmentProof.prototype.nonexist = null; + + /** + * CommitmentProof batch. + * @member {ics23.IBatchProof|null|undefined} batch + * @memberof ics23.CommitmentProof + * @instance + */ + CommitmentProof.prototype.batch = null; + + /** + * CommitmentProof compressed. + * @member {ics23.ICompressedBatchProof|null|undefined} compressed + * @memberof ics23.CommitmentProof + * @instance + */ + CommitmentProof.prototype.compressed = null; + + // OneOf field names bound to virtual getters and setters + let $oneOfFields; + + /** + * CommitmentProof proof. + * @member {"exist"|"nonexist"|"batch"|"compressed"|undefined} proof + * @memberof ics23.CommitmentProof + * @instance + */ + Object.defineProperty(CommitmentProof.prototype, "proof", { + get: $util.oneOfGetter($oneOfFields = ["exist", "nonexist", "batch", "compressed"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new CommitmentProof instance using the specified properties. + * @function create + * @memberof ics23.CommitmentProof + * @static + * @param {ics23.ICommitmentProof=} [properties] Properties to set + * @returns {ics23.CommitmentProof} CommitmentProof instance + */ + CommitmentProof.create = function create(properties) { + return new CommitmentProof(properties); + }; + + /** + * Encodes the specified CommitmentProof message. Does not implicitly {@link ics23.CommitmentProof.verify|verify} messages. + * @function encode + * @memberof ics23.CommitmentProof + * @static + * @param {ics23.ICommitmentProof} message CommitmentProof message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommitmentProof.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.exist != null && Object.hasOwnProperty.call(message, "exist")) + $root.ics23.ExistenceProof.encode(message.exist, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nonexist != null && Object.hasOwnProperty.call(message, "nonexist")) + $root.ics23.NonExistenceProof.encode(message.nonexist, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.batch != null && Object.hasOwnProperty.call(message, "batch")) + $root.ics23.BatchProof.encode(message.batch, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.compressed != null && Object.hasOwnProperty.call(message, "compressed")) + $root.ics23.CompressedBatchProof.encode(message.compressed, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CommitmentProof message, length delimited. Does not implicitly {@link ics23.CommitmentProof.verify|verify} messages. + * @function encodeDelimited + * @memberof ics23.CommitmentProof + * @static + * @param {ics23.ICommitmentProof} message CommitmentProof message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommitmentProof.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CommitmentProof message from the specified reader or buffer. + * @function decode + * @memberof ics23.CommitmentProof + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ics23.CommitmentProof} CommitmentProof + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommitmentProof.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ics23.CommitmentProof(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.exist = $root.ics23.ExistenceProof.decode(reader, reader.uint32()); + break; + case 2: + message.nonexist = $root.ics23.NonExistenceProof.decode(reader, reader.uint32()); + break; + case 3: + message.batch = $root.ics23.BatchProof.decode(reader, reader.uint32()); + break; + case 4: + message.compressed = $root.ics23.CompressedBatchProof.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CommitmentProof message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ics23.CommitmentProof + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ics23.CommitmentProof} CommitmentProof + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommitmentProof.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CommitmentProof message. + * @function verify + * @memberof ics23.CommitmentProof + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CommitmentProof.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + let properties = {}; + if (message.exist != null && message.hasOwnProperty("exist")) { + properties.proof = 1; + { + let error = $root.ics23.ExistenceProof.verify(message.exist); + if (error) + return "exist." + error; + } + } + if (message.nonexist != null && message.hasOwnProperty("nonexist")) { + if (properties.proof === 1) + return "proof: multiple values"; + properties.proof = 1; + { + let error = $root.ics23.NonExistenceProof.verify(message.nonexist); + if (error) + return "nonexist." + error; + } + } + if (message.batch != null && message.hasOwnProperty("batch")) { + if (properties.proof === 1) + return "proof: multiple values"; + properties.proof = 1; + { + let error = $root.ics23.BatchProof.verify(message.batch); + if (error) + return "batch." + error; + } + } + if (message.compressed != null && message.hasOwnProperty("compressed")) { + if (properties.proof === 1) + return "proof: multiple values"; + properties.proof = 1; + { + let error = $root.ics23.CompressedBatchProof.verify(message.compressed); + if (error) + return "compressed." + error; + } + } + return null; + }; + + /** + * Creates a CommitmentProof message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ics23.CommitmentProof + * @static + * @param {Object.} object Plain object + * @returns {ics23.CommitmentProof} CommitmentProof + */ + CommitmentProof.fromObject = function fromObject(object) { + if (object instanceof $root.ics23.CommitmentProof) + return object; + let message = new $root.ics23.CommitmentProof(); + if (object.exist != null) { + if (typeof object.exist !== "object") + throw TypeError(".ics23.CommitmentProof.exist: object expected"); + message.exist = $root.ics23.ExistenceProof.fromObject(object.exist); + } + if (object.nonexist != null) { + if (typeof object.nonexist !== "object") + throw TypeError(".ics23.CommitmentProof.nonexist: object expected"); + message.nonexist = $root.ics23.NonExistenceProof.fromObject(object.nonexist); + } + if (object.batch != null) { + if (typeof object.batch !== "object") + throw TypeError(".ics23.CommitmentProof.batch: object expected"); + message.batch = $root.ics23.BatchProof.fromObject(object.batch); + } + if (object.compressed != null) { + if (typeof object.compressed !== "object") + throw TypeError(".ics23.CommitmentProof.compressed: object expected"); + message.compressed = $root.ics23.CompressedBatchProof.fromObject(object.compressed); + } + return message; + }; + + /** + * Creates a plain object from a CommitmentProof message. Also converts values to other types if specified. + * @function toObject + * @memberof ics23.CommitmentProof + * @static + * @param {ics23.CommitmentProof} message CommitmentProof + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CommitmentProof.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (message.exist != null && message.hasOwnProperty("exist")) { + object.exist = $root.ics23.ExistenceProof.toObject(message.exist, options); + if (options.oneofs) + object.proof = "exist"; + } + if (message.nonexist != null && message.hasOwnProperty("nonexist")) { + object.nonexist = $root.ics23.NonExistenceProof.toObject(message.nonexist, options); + if (options.oneofs) + object.proof = "nonexist"; + } + if (message.batch != null && message.hasOwnProperty("batch")) { + object.batch = $root.ics23.BatchProof.toObject(message.batch, options); + if (options.oneofs) + object.proof = "batch"; + } + if (message.compressed != null && message.hasOwnProperty("compressed")) { + object.compressed = $root.ics23.CompressedBatchProof.toObject(message.compressed, options); + if (options.oneofs) + object.proof = "compressed"; + } + return object; + }; + + /** + * Converts this CommitmentProof to JSON. + * @function toJSON + * @memberof ics23.CommitmentProof + * @instance + * @returns {Object.} JSON object + */ + CommitmentProof.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CommitmentProof; + })(ics23.CommitmentProof || {}); + + ics23.LeafOp = (function(LeafOp) { + + /** + * Properties of a LeafOp. + * @memberof ics23 + * @interface ILeafOp + * @property {ics23.HashOp|null} [hash] LeafOp hash + * @property {ics23.HashOp|null} [prehashKey] LeafOp prehashKey + * @property {ics23.HashOp|null} [prehashValue] LeafOp prehashValue + * @property {ics23.LengthOp|null} [length] LeafOp length + * @property {Uint8Array|null} [prefix] LeafOp prefix + */ + + /** + * Constructs a new LeafOp. + * @memberof ics23 + * @classdesc LeafOp represents the raw key-value data we wish to prove, and + * must be flexible to represent the internal transformation from + * the original key-value pairs into the basis hash, for many existing + * merkle trees. + * + * key and value are passed in. So that the signature of this operation is: + * leafOp(key, value) -> output + * + * To process this, first prehash the keys and values if needed (ANY means no hash in this case): + * hkey = prehashKey(key) + * hvalue = prehashValue(value) + * + * Then combine the bytes, and hash it + * output = hash(prefix || length(hkey) || hkey || length(hvalue) || hvalue) + * @implements ILeafOp + * @constructor + * @param {ics23.ILeafOp=} [properties] Properties to set + */ + function LeafOp(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LeafOp hash. + * @member {ics23.HashOp} hash + * @memberof ics23.LeafOp + * @instance + */ + LeafOp.prototype.hash = 0; + + /** + * LeafOp prehashKey. + * @member {ics23.HashOp} prehashKey + * @memberof ics23.LeafOp + * @instance + */ + LeafOp.prototype.prehashKey = 0; + + /** + * LeafOp prehashValue. + * @member {ics23.HashOp} prehashValue + * @memberof ics23.LeafOp + * @instance + */ + LeafOp.prototype.prehashValue = 0; + + /** + * LeafOp length. + * @member {ics23.LengthOp} length + * @memberof ics23.LeafOp + * @instance + */ + LeafOp.prototype.length = 0; + + /** + * LeafOp prefix. + * @member {Uint8Array} prefix + * @memberof ics23.LeafOp + * @instance + */ + LeafOp.prototype.prefix = $util.newBuffer([]); + + /** + * Creates a new LeafOp instance using the specified properties. + * @function create + * @memberof ics23.LeafOp + * @static + * @param {ics23.ILeafOp=} [properties] Properties to set + * @returns {ics23.LeafOp} LeafOp instance + */ + LeafOp.create = function create(properties) { + return new LeafOp(properties); + }; + + /** + * Encodes the specified LeafOp message. Does not implicitly {@link ics23.LeafOp.verify|verify} messages. + * @function encode + * @memberof ics23.LeafOp + * @static + * @param {ics23.ILeafOp} message LeafOp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LeafOp.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.hash != null && Object.hasOwnProperty.call(message, "hash")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.hash); + if (message.prehashKey != null && Object.hasOwnProperty.call(message, "prehashKey")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.prehashKey); + if (message.prehashValue != null && Object.hasOwnProperty.call(message, "prehashValue")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.prehashValue); + if (message.length != null && Object.hasOwnProperty.call(message, "length")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.length); + if (message.prefix != null && Object.hasOwnProperty.call(message, "prefix")) + writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.prefix); + return writer; + }; + + /** + * Encodes the specified LeafOp message, length delimited. Does not implicitly {@link ics23.LeafOp.verify|verify} messages. + * @function encodeDelimited + * @memberof ics23.LeafOp + * @static + * @param {ics23.ILeafOp} message LeafOp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LeafOp.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LeafOp message from the specified reader or buffer. + * @function decode + * @memberof ics23.LeafOp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ics23.LeafOp} LeafOp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LeafOp.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ics23.LeafOp(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.hash = reader.int32(); + break; + case 2: + message.prehashKey = reader.int32(); + break; + case 3: + message.prehashValue = reader.int32(); + break; + case 4: + message.length = reader.int32(); + break; + case 5: + message.prefix = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LeafOp message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ics23.LeafOp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ics23.LeafOp} LeafOp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LeafOp.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LeafOp message. + * @function verify + * @memberof ics23.LeafOp + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LeafOp.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.hash != null && message.hasOwnProperty("hash")) + switch (message.hash) { + default: + return "hash: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.prehashKey != null && message.hasOwnProperty("prehashKey")) + switch (message.prehashKey) { + default: + return "prehashKey: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.prehashValue != null && message.hasOwnProperty("prehashValue")) + switch (message.prehashValue) { + default: + return "prehashValue: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.length != null && message.hasOwnProperty("length")) + switch (message.length) { + default: + return "length: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + break; + } + if (message.prefix != null && message.hasOwnProperty("prefix")) + if (!(message.prefix && typeof message.prefix.length === "number" || $util.isString(message.prefix))) + return "prefix: buffer expected"; + return null; + }; + + /** + * Creates a LeafOp message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ics23.LeafOp + * @static + * @param {Object.} object Plain object + * @returns {ics23.LeafOp} LeafOp + */ + LeafOp.fromObject = function fromObject(object) { + if (object instanceof $root.ics23.LeafOp) + return object; + let message = new $root.ics23.LeafOp(); + switch (object.hash) { + case "NO_HASH": + case 0: + message.hash = 0; + break; + case "SHA256": + case 1: + message.hash = 1; + break; + case "SHA512": + case 2: + message.hash = 2; + break; + case "KECCAK": + case 3: + message.hash = 3; + break; + case "RIPEMD160": + case 4: + message.hash = 4; + break; + case "BITCOIN": + case 5: + message.hash = 5; + break; + } + switch (object.prehashKey) { + case "NO_HASH": + case 0: + message.prehashKey = 0; + break; + case "SHA256": + case 1: + message.prehashKey = 1; + break; + case "SHA512": + case 2: + message.prehashKey = 2; + break; + case "KECCAK": + case 3: + message.prehashKey = 3; + break; + case "RIPEMD160": + case 4: + message.prehashKey = 4; + break; + case "BITCOIN": + case 5: + message.prehashKey = 5; + break; + } + switch (object.prehashValue) { + case "NO_HASH": + case 0: + message.prehashValue = 0; + break; + case "SHA256": + case 1: + message.prehashValue = 1; + break; + case "SHA512": + case 2: + message.prehashValue = 2; + break; + case "KECCAK": + case 3: + message.prehashValue = 3; + break; + case "RIPEMD160": + case 4: + message.prehashValue = 4; + break; + case "BITCOIN": + case 5: + message.prehashValue = 5; + break; + } + switch (object.length) { + case "NO_PREFIX": + case 0: + message.length = 0; + break; + case "VAR_PROTO": + case 1: + message.length = 1; + break; + case "VAR_RLP": + case 2: + message.length = 2; + break; + case "FIXED32_BIG": + case 3: + message.length = 3; + break; + case "FIXED32_LITTLE": + case 4: + message.length = 4; + break; + case "FIXED64_BIG": + case 5: + message.length = 5; + break; + case "FIXED64_LITTLE": + case 6: + message.length = 6; + break; + case "REQUIRE_32_BYTES": + case 7: + message.length = 7; + break; + case "REQUIRE_64_BYTES": + case 8: + message.length = 8; + break; + } + if (object.prefix != null) + if (typeof object.prefix === "string") + $util.base64.decode(object.prefix, message.prefix = $util.newBuffer($util.base64.length(object.prefix)), 0); + else if (object.prefix.length) + message.prefix = object.prefix; + return message; + }; + + /** + * Creates a plain object from a LeafOp message. Also converts values to other types if specified. + * @function toObject + * @memberof ics23.LeafOp + * @static + * @param {ics23.LeafOp} message LeafOp + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LeafOp.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.hash = options.enums === String ? "NO_HASH" : 0; + object.prehashKey = options.enums === String ? "NO_HASH" : 0; + object.prehashValue = options.enums === String ? "NO_HASH" : 0; + object.length = options.enums === String ? "NO_PREFIX" : 0; + if (options.bytes === String) + object.prefix = ""; + else { + object.prefix = []; + if (options.bytes !== Array) + object.prefix = $util.newBuffer(object.prefix); + } + } + if (message.hash != null && message.hasOwnProperty("hash")) + object.hash = options.enums === String ? $root.ics23.HashOp[message.hash] : message.hash; + if (message.prehashKey != null && message.hasOwnProperty("prehashKey")) + object.prehashKey = options.enums === String ? $root.ics23.HashOp[message.prehashKey] : message.prehashKey; + if (message.prehashValue != null && message.hasOwnProperty("prehashValue")) + object.prehashValue = options.enums === String ? $root.ics23.HashOp[message.prehashValue] : message.prehashValue; + if (message.length != null && message.hasOwnProperty("length")) + object.length = options.enums === String ? $root.ics23.LengthOp[message.length] : message.length; + if (message.prefix != null && message.hasOwnProperty("prefix")) + object.prefix = options.bytes === String ? $util.base64.encode(message.prefix, 0, message.prefix.length) : options.bytes === Array ? Array.prototype.slice.call(message.prefix) : message.prefix; + return object; + }; + + /** + * Converts this LeafOp to JSON. + * @function toJSON + * @memberof ics23.LeafOp + * @instance + * @returns {Object.} JSON object + */ + LeafOp.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return LeafOp; + })(ics23.LeafOp || {}); + + ics23.InnerOp = (function(InnerOp) { + + /** + * Properties of an InnerOp. + * @memberof ics23 + * @interface IInnerOp + * @property {ics23.HashOp|null} [hash] InnerOp hash + * @property {Uint8Array|null} [prefix] InnerOp prefix + * @property {Uint8Array|null} [suffix] InnerOp suffix + */ + + /** + * Constructs a new InnerOp. + * @memberof ics23 + * @classdesc InnerOp represents a merkle-proof step that is not a leaf. + * It represents concatenating two children and hashing them to provide the next result. + * + * The result of the previous step is passed in, so the signature of this op is: + * innerOp(child) -> output + * + * The result of applying InnerOp should be: + * output = op.hash(op.prefix || child || op.suffix) + * + * where the || operator is concatenation of binary data, + * and child is the result of hashing all the tree below this step. + * + * Any special data, like prepending child with the length, or prepending the entire operation with + * some value to differentiate from leaf nodes, should be included in prefix and suffix. + * If either of prefix or suffix is empty, we just treat it as an empty string + * @implements IInnerOp + * @constructor + * @param {ics23.IInnerOp=} [properties] Properties to set + */ + function InnerOp(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * InnerOp hash. + * @member {ics23.HashOp} hash + * @memberof ics23.InnerOp + * @instance + */ + InnerOp.prototype.hash = 0; + + /** + * InnerOp prefix. + * @member {Uint8Array} prefix + * @memberof ics23.InnerOp + * @instance + */ + InnerOp.prototype.prefix = $util.newBuffer([]); + + /** + * InnerOp suffix. + * @member {Uint8Array} suffix + * @memberof ics23.InnerOp + * @instance + */ + InnerOp.prototype.suffix = $util.newBuffer([]); + + /** + * Creates a new InnerOp instance using the specified properties. + * @function create + * @memberof ics23.InnerOp + * @static + * @param {ics23.IInnerOp=} [properties] Properties to set + * @returns {ics23.InnerOp} InnerOp instance + */ + InnerOp.create = function create(properties) { + return new InnerOp(properties); + }; + + /** + * Encodes the specified InnerOp message. Does not implicitly {@link ics23.InnerOp.verify|verify} messages. + * @function encode + * @memberof ics23.InnerOp + * @static + * @param {ics23.IInnerOp} message InnerOp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InnerOp.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.hash != null && Object.hasOwnProperty.call(message, "hash")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.hash); + if (message.prefix != null && Object.hasOwnProperty.call(message, "prefix")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.prefix); + if (message.suffix != null && Object.hasOwnProperty.call(message, "suffix")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.suffix); + return writer; + }; + + /** + * Encodes the specified InnerOp message, length delimited. Does not implicitly {@link ics23.InnerOp.verify|verify} messages. + * @function encodeDelimited + * @memberof ics23.InnerOp + * @static + * @param {ics23.IInnerOp} message InnerOp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InnerOp.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InnerOp message from the specified reader or buffer. + * @function decode + * @memberof ics23.InnerOp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ics23.InnerOp} InnerOp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InnerOp.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ics23.InnerOp(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.hash = reader.int32(); + break; + case 2: + message.prefix = reader.bytes(); + break; + case 3: + message.suffix = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an InnerOp message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ics23.InnerOp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ics23.InnerOp} InnerOp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InnerOp.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InnerOp message. + * @function verify + * @memberof ics23.InnerOp + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InnerOp.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.hash != null && message.hasOwnProperty("hash")) + switch (message.hash) { + default: + return "hash: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.prefix != null && message.hasOwnProperty("prefix")) + if (!(message.prefix && typeof message.prefix.length === "number" || $util.isString(message.prefix))) + return "prefix: buffer expected"; + if (message.suffix != null && message.hasOwnProperty("suffix")) + if (!(message.suffix && typeof message.suffix.length === "number" || $util.isString(message.suffix))) + return "suffix: buffer expected"; + return null; + }; + + /** + * Creates an InnerOp message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ics23.InnerOp + * @static + * @param {Object.} object Plain object + * @returns {ics23.InnerOp} InnerOp + */ + InnerOp.fromObject = function fromObject(object) { + if (object instanceof $root.ics23.InnerOp) + return object; + let message = new $root.ics23.InnerOp(); + switch (object.hash) { + case "NO_HASH": + case 0: + message.hash = 0; + break; + case "SHA256": + case 1: + message.hash = 1; + break; + case "SHA512": + case 2: + message.hash = 2; + break; + case "KECCAK": + case 3: + message.hash = 3; + break; + case "RIPEMD160": + case 4: + message.hash = 4; + break; + case "BITCOIN": + case 5: + message.hash = 5; + break; + } + if (object.prefix != null) + if (typeof object.prefix === "string") + $util.base64.decode(object.prefix, message.prefix = $util.newBuffer($util.base64.length(object.prefix)), 0); + else if (object.prefix.length) + message.prefix = object.prefix; + if (object.suffix != null) + if (typeof object.suffix === "string") + $util.base64.decode(object.suffix, message.suffix = $util.newBuffer($util.base64.length(object.suffix)), 0); + else if (object.suffix.length) + message.suffix = object.suffix; + return message; + }; + + /** + * Creates a plain object from an InnerOp message. Also converts values to other types if specified. + * @function toObject + * @memberof ics23.InnerOp + * @static + * @param {ics23.InnerOp} message InnerOp + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InnerOp.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.hash = options.enums === String ? "NO_HASH" : 0; + if (options.bytes === String) + object.prefix = ""; + else { + object.prefix = []; + if (options.bytes !== Array) + object.prefix = $util.newBuffer(object.prefix); + } + if (options.bytes === String) + object.suffix = ""; + else { + object.suffix = []; + if (options.bytes !== Array) + object.suffix = $util.newBuffer(object.suffix); + } + } + if (message.hash != null && message.hasOwnProperty("hash")) + object.hash = options.enums === String ? $root.ics23.HashOp[message.hash] : message.hash; + if (message.prefix != null && message.hasOwnProperty("prefix")) + object.prefix = options.bytes === String ? $util.base64.encode(message.prefix, 0, message.prefix.length) : options.bytes === Array ? Array.prototype.slice.call(message.prefix) : message.prefix; + if (message.suffix != null && message.hasOwnProperty("suffix")) + object.suffix = options.bytes === String ? $util.base64.encode(message.suffix, 0, message.suffix.length) : options.bytes === Array ? Array.prototype.slice.call(message.suffix) : message.suffix; + return object; + }; + + /** + * Converts this InnerOp to JSON. + * @function toJSON + * @memberof ics23.InnerOp + * @instance + * @returns {Object.} JSON object + */ + InnerOp.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return InnerOp; + })(ics23.InnerOp || {}); + + ics23.ProofSpec = (function(ProofSpec) { + + /** + * Properties of a ProofSpec. + * @memberof ics23 + * @interface IProofSpec + * @property {ics23.ILeafOp|null} [leafSpec] ProofSpec leafSpec + * @property {ics23.IInnerSpec|null} [innerSpec] ProofSpec innerSpec + * @property {number|null} [maxDepth] ProofSpec maxDepth + * @property {number|null} [minDepth] ProofSpec minDepth + */ + + /** + * Constructs a new ProofSpec. + * @memberof ics23 + * @classdesc ProofSpec defines what the expected parameters are for a given proof type. + * This can be stored in the client and used to validate any incoming proofs. + * + * verify(ProofSpec, Proof) -> Proof | Error + * + * As demonstrated in tests, if we don't fix the algorithm used to calculate the + * LeafHash for a given tree, there are many possible key-value pairs that can + * generate a given hash (by interpretting the preimage differently). + * We need this for proper security, requires client knows a priori what + * tree format server uses. But not in code, rather a configuration object. + * @implements IProofSpec + * @constructor + * @param {ics23.IProofSpec=} [properties] Properties to set + */ + function ProofSpec(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ProofSpec leafSpec. + * @member {ics23.ILeafOp|null|undefined} leafSpec + * @memberof ics23.ProofSpec + * @instance + */ + ProofSpec.prototype.leafSpec = null; + + /** + * ProofSpec innerSpec. + * @member {ics23.IInnerSpec|null|undefined} innerSpec + * @memberof ics23.ProofSpec + * @instance + */ + ProofSpec.prototype.innerSpec = null; + + /** + * ProofSpec maxDepth. + * @member {number} maxDepth + * @memberof ics23.ProofSpec + * @instance + */ + ProofSpec.prototype.maxDepth = 0; + + /** + * ProofSpec minDepth. + * @member {number} minDepth + * @memberof ics23.ProofSpec + * @instance + */ + ProofSpec.prototype.minDepth = 0; + + /** + * Creates a new ProofSpec instance using the specified properties. + * @function create + * @memberof ics23.ProofSpec + * @static + * @param {ics23.IProofSpec=} [properties] Properties to set + * @returns {ics23.ProofSpec} ProofSpec instance + */ + ProofSpec.create = function create(properties) { + return new ProofSpec(properties); + }; + + /** + * Encodes the specified ProofSpec message. Does not implicitly {@link ics23.ProofSpec.verify|verify} messages. + * @function encode + * @memberof ics23.ProofSpec + * @static + * @param {ics23.IProofSpec} message ProofSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProofSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.leafSpec != null && Object.hasOwnProperty.call(message, "leafSpec")) + $root.ics23.LeafOp.encode(message.leafSpec, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.innerSpec != null && Object.hasOwnProperty.call(message, "innerSpec")) + $root.ics23.InnerSpec.encode(message.innerSpec, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.maxDepth != null && Object.hasOwnProperty.call(message, "maxDepth")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.maxDepth); + if (message.minDepth != null && Object.hasOwnProperty.call(message, "minDepth")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.minDepth); + return writer; + }; + + /** + * Encodes the specified ProofSpec message, length delimited. Does not implicitly {@link ics23.ProofSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof ics23.ProofSpec + * @static + * @param {ics23.IProofSpec} message ProofSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProofSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ProofSpec message from the specified reader or buffer. + * @function decode + * @memberof ics23.ProofSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ics23.ProofSpec} ProofSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProofSpec.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ics23.ProofSpec(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.leafSpec = $root.ics23.LeafOp.decode(reader, reader.uint32()); + break; + case 2: + message.innerSpec = $root.ics23.InnerSpec.decode(reader, reader.uint32()); + break; + case 3: + message.maxDepth = reader.int32(); + break; + case 4: + message.minDepth = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ProofSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ics23.ProofSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ics23.ProofSpec} ProofSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProofSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ProofSpec message. + * @function verify + * @memberof ics23.ProofSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ProofSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.leafSpec != null && message.hasOwnProperty("leafSpec")) { + let error = $root.ics23.LeafOp.verify(message.leafSpec); + if (error) + return "leafSpec." + error; + } + if (message.innerSpec != null && message.hasOwnProperty("innerSpec")) { + let error = $root.ics23.InnerSpec.verify(message.innerSpec); + if (error) + return "innerSpec." + error; + } + if (message.maxDepth != null && message.hasOwnProperty("maxDepth")) + if (!$util.isInteger(message.maxDepth)) + return "maxDepth: integer expected"; + if (message.minDepth != null && message.hasOwnProperty("minDepth")) + if (!$util.isInteger(message.minDepth)) + return "minDepth: integer expected"; + return null; + }; + + /** + * Creates a ProofSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ics23.ProofSpec + * @static + * @param {Object.} object Plain object + * @returns {ics23.ProofSpec} ProofSpec + */ + ProofSpec.fromObject = function fromObject(object) { + if (object instanceof $root.ics23.ProofSpec) + return object; + let message = new $root.ics23.ProofSpec(); + if (object.leafSpec != null) { + if (typeof object.leafSpec !== "object") + throw TypeError(".ics23.ProofSpec.leafSpec: object expected"); + message.leafSpec = $root.ics23.LeafOp.fromObject(object.leafSpec); + } + if (object.innerSpec != null) { + if (typeof object.innerSpec !== "object") + throw TypeError(".ics23.ProofSpec.innerSpec: object expected"); + message.innerSpec = $root.ics23.InnerSpec.fromObject(object.innerSpec); + } + if (object.maxDepth != null) + message.maxDepth = object.maxDepth | 0; + if (object.minDepth != null) + message.minDepth = object.minDepth | 0; + return message; + }; + + /** + * Creates a plain object from a ProofSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof ics23.ProofSpec + * @static + * @param {ics23.ProofSpec} message ProofSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ProofSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.leafSpec = null; + object.innerSpec = null; + object.maxDepth = 0; + object.minDepth = 0; + } + if (message.leafSpec != null && message.hasOwnProperty("leafSpec")) + object.leafSpec = $root.ics23.LeafOp.toObject(message.leafSpec, options); + if (message.innerSpec != null && message.hasOwnProperty("innerSpec")) + object.innerSpec = $root.ics23.InnerSpec.toObject(message.innerSpec, options); + if (message.maxDepth != null && message.hasOwnProperty("maxDepth")) + object.maxDepth = message.maxDepth; + if (message.minDepth != null && message.hasOwnProperty("minDepth")) + object.minDepth = message.minDepth; + return object; + }; + + /** + * Converts this ProofSpec to JSON. + * @function toJSON + * @memberof ics23.ProofSpec + * @instance + * @returns {Object.} JSON object + */ + ProofSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ProofSpec; + })(ics23.ProofSpec || {}); + + ics23.InnerSpec = (function(InnerSpec) { + + /** + * Properties of an InnerSpec. + * @memberof ics23 + * @interface IInnerSpec + * @property {Array.|null} [childOrder] InnerSpec childOrder + * @property {number|null} [childSize] InnerSpec childSize + * @property {number|null} [minPrefixLength] InnerSpec minPrefixLength + * @property {number|null} [maxPrefixLength] InnerSpec maxPrefixLength + * @property {Uint8Array|null} [emptyChild] InnerSpec emptyChild + * @property {ics23.HashOp|null} [hash] InnerSpec hash + */ + + /** + * Constructs a new InnerSpec. + * @memberof ics23 + * @classdesc Represents an InnerSpec. + * @implements IInnerSpec + * @constructor + * @param {ics23.IInnerSpec=} [properties] Properties to set + */ + function InnerSpec(properties) { + this.childOrder = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * InnerSpec childOrder. + * @member {Array.} childOrder + * @memberof ics23.InnerSpec + * @instance + */ + InnerSpec.prototype.childOrder = $util.emptyArray; + + /** + * InnerSpec childSize. + * @member {number} childSize + * @memberof ics23.InnerSpec + * @instance + */ + InnerSpec.prototype.childSize = 0; + + /** + * InnerSpec minPrefixLength. + * @member {number} minPrefixLength + * @memberof ics23.InnerSpec + * @instance + */ + InnerSpec.prototype.minPrefixLength = 0; + + /** + * InnerSpec maxPrefixLength. + * @member {number} maxPrefixLength + * @memberof ics23.InnerSpec + * @instance + */ + InnerSpec.prototype.maxPrefixLength = 0; + + /** + * InnerSpec emptyChild. + * @member {Uint8Array} emptyChild + * @memberof ics23.InnerSpec + * @instance + */ + InnerSpec.prototype.emptyChild = $util.newBuffer([]); + + /** + * InnerSpec hash. + * @member {ics23.HashOp} hash + * @memberof ics23.InnerSpec + * @instance + */ + InnerSpec.prototype.hash = 0; + + /** + * Creates a new InnerSpec instance using the specified properties. + * @function create + * @memberof ics23.InnerSpec + * @static + * @param {ics23.IInnerSpec=} [properties] Properties to set + * @returns {ics23.InnerSpec} InnerSpec instance + */ + InnerSpec.create = function create(properties) { + return new InnerSpec(properties); + }; + + /** + * Encodes the specified InnerSpec message. Does not implicitly {@link ics23.InnerSpec.verify|verify} messages. + * @function encode + * @memberof ics23.InnerSpec + * @static + * @param {ics23.IInnerSpec} message InnerSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InnerSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.childOrder != null && message.childOrder.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (let i = 0; i < message.childOrder.length; ++i) + writer.int32(message.childOrder[i]); + writer.ldelim(); + } + if (message.childSize != null && Object.hasOwnProperty.call(message, "childSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.childSize); + if (message.minPrefixLength != null && Object.hasOwnProperty.call(message, "minPrefixLength")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.minPrefixLength); + if (message.maxPrefixLength != null && Object.hasOwnProperty.call(message, "maxPrefixLength")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.maxPrefixLength); + if (message.emptyChild != null && Object.hasOwnProperty.call(message, "emptyChild")) + writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.emptyChild); + if (message.hash != null && Object.hasOwnProperty.call(message, "hash")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.hash); + return writer; + }; + + /** + * Encodes the specified InnerSpec message, length delimited. Does not implicitly {@link ics23.InnerSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof ics23.InnerSpec + * @static + * @param {ics23.IInnerSpec} message InnerSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InnerSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InnerSpec message from the specified reader or buffer. + * @function decode + * @memberof ics23.InnerSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ics23.InnerSpec} InnerSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InnerSpec.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ics23.InnerSpec(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.childOrder && message.childOrder.length)) + message.childOrder = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.childOrder.push(reader.int32()); + } else + message.childOrder.push(reader.int32()); + break; + case 2: + message.childSize = reader.int32(); + break; + case 3: + message.minPrefixLength = reader.int32(); + break; + case 4: + message.maxPrefixLength = reader.int32(); + break; + case 5: + message.emptyChild = reader.bytes(); + break; + case 6: + message.hash = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an InnerSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ics23.InnerSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ics23.InnerSpec} InnerSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InnerSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InnerSpec message. + * @function verify + * @memberof ics23.InnerSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InnerSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.childOrder != null && message.hasOwnProperty("childOrder")) { + if (!Array.isArray(message.childOrder)) + return "childOrder: array expected"; + for (let i = 0; i < message.childOrder.length; ++i) + if (!$util.isInteger(message.childOrder[i])) + return "childOrder: integer[] expected"; + } + if (message.childSize != null && message.hasOwnProperty("childSize")) + if (!$util.isInteger(message.childSize)) + return "childSize: integer expected"; + if (message.minPrefixLength != null && message.hasOwnProperty("minPrefixLength")) + if (!$util.isInteger(message.minPrefixLength)) + return "minPrefixLength: integer expected"; + if (message.maxPrefixLength != null && message.hasOwnProperty("maxPrefixLength")) + if (!$util.isInteger(message.maxPrefixLength)) + return "maxPrefixLength: integer expected"; + if (message.emptyChild != null && message.hasOwnProperty("emptyChild")) + if (!(message.emptyChild && typeof message.emptyChild.length === "number" || $util.isString(message.emptyChild))) + return "emptyChild: buffer expected"; + if (message.hash != null && message.hasOwnProperty("hash")) + switch (message.hash) { + default: + return "hash: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + return null; + }; + + /** + * Creates an InnerSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ics23.InnerSpec + * @static + * @param {Object.} object Plain object + * @returns {ics23.InnerSpec} InnerSpec + */ + InnerSpec.fromObject = function fromObject(object) { + if (object instanceof $root.ics23.InnerSpec) + return object; + let message = new $root.ics23.InnerSpec(); + if (object.childOrder) { + if (!Array.isArray(object.childOrder)) + throw TypeError(".ics23.InnerSpec.childOrder: array expected"); + message.childOrder = []; + for (let i = 0; i < object.childOrder.length; ++i) + message.childOrder[i] = object.childOrder[i] | 0; + } + if (object.childSize != null) + message.childSize = object.childSize | 0; + if (object.minPrefixLength != null) + message.minPrefixLength = object.minPrefixLength | 0; + if (object.maxPrefixLength != null) + message.maxPrefixLength = object.maxPrefixLength | 0; + if (object.emptyChild != null) + if (typeof object.emptyChild === "string") + $util.base64.decode(object.emptyChild, message.emptyChild = $util.newBuffer($util.base64.length(object.emptyChild)), 0); + else if (object.emptyChild.length) + message.emptyChild = object.emptyChild; + switch (object.hash) { + case "NO_HASH": + case 0: + message.hash = 0; + break; + case "SHA256": + case 1: + message.hash = 1; + break; + case "SHA512": + case 2: + message.hash = 2; + break; + case "KECCAK": + case 3: + message.hash = 3; + break; + case "RIPEMD160": + case 4: + message.hash = 4; + break; + case "BITCOIN": + case 5: + message.hash = 5; + break; + } + return message; + }; + + /** + * Creates a plain object from an InnerSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof ics23.InnerSpec + * @static + * @param {ics23.InnerSpec} message InnerSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InnerSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.childOrder = []; + if (options.defaults) { + object.childSize = 0; + object.minPrefixLength = 0; + object.maxPrefixLength = 0; + if (options.bytes === String) + object.emptyChild = ""; + else { + object.emptyChild = []; + if (options.bytes !== Array) + object.emptyChild = $util.newBuffer(object.emptyChild); + } + object.hash = options.enums === String ? "NO_HASH" : 0; + } + if (message.childOrder && message.childOrder.length) { + object.childOrder = []; + for (let j = 0; j < message.childOrder.length; ++j) + object.childOrder[j] = message.childOrder[j]; + } + if (message.childSize != null && message.hasOwnProperty("childSize")) + object.childSize = message.childSize; + if (message.minPrefixLength != null && message.hasOwnProperty("minPrefixLength")) + object.minPrefixLength = message.minPrefixLength; + if (message.maxPrefixLength != null && message.hasOwnProperty("maxPrefixLength")) + object.maxPrefixLength = message.maxPrefixLength; + if (message.emptyChild != null && message.hasOwnProperty("emptyChild")) + object.emptyChild = options.bytes === String ? $util.base64.encode(message.emptyChild, 0, message.emptyChild.length) : options.bytes === Array ? Array.prototype.slice.call(message.emptyChild) : message.emptyChild; + if (message.hash != null && message.hasOwnProperty("hash")) + object.hash = options.enums === String ? $root.ics23.HashOp[message.hash] : message.hash; + return object; + }; + + /** + * Converts this InnerSpec to JSON. + * @function toJSON + * @memberof ics23.InnerSpec + * @instance + * @returns {Object.} JSON object + */ + InnerSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return InnerSpec; + })(ics23.InnerSpec || {}); + + ics23.BatchProof = (function(BatchProof) { + + /** + * Properties of a BatchProof. + * @memberof ics23 + * @interface IBatchProof + * @property {Array.|null} [entries] BatchProof entries + */ + + /** + * Constructs a new BatchProof. + * @memberof ics23 + * @classdesc Represents a BatchProof. + * @implements IBatchProof + * @constructor + * @param {ics23.IBatchProof=} [properties] Properties to set + */ + function BatchProof(properties) { + this.entries = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BatchProof entries. + * @member {Array.} entries + * @memberof ics23.BatchProof + * @instance + */ + BatchProof.prototype.entries = $util.emptyArray; + + /** + * Creates a new BatchProof instance using the specified properties. + * @function create + * @memberof ics23.BatchProof + * @static + * @param {ics23.IBatchProof=} [properties] Properties to set + * @returns {ics23.BatchProof} BatchProof instance + */ + BatchProof.create = function create(properties) { + return new BatchProof(properties); + }; + + /** + * Encodes the specified BatchProof message. Does not implicitly {@link ics23.BatchProof.verify|verify} messages. + * @function encode + * @memberof ics23.BatchProof + * @static + * @param {ics23.IBatchProof} message BatchProof message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchProof.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.entries != null && message.entries.length) + for (let i = 0; i < message.entries.length; ++i) + $root.ics23.BatchEntry.encode(message.entries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BatchProof message, length delimited. Does not implicitly {@link ics23.BatchProof.verify|verify} messages. + * @function encodeDelimited + * @memberof ics23.BatchProof + * @static + * @param {ics23.IBatchProof} message BatchProof message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchProof.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BatchProof message from the specified reader or buffer. + * @function decode + * @memberof ics23.BatchProof + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ics23.BatchProof} BatchProof + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchProof.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ics23.BatchProof(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.entries && message.entries.length)) + message.entries = []; + message.entries.push($root.ics23.BatchEntry.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BatchProof message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ics23.BatchProof + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ics23.BatchProof} BatchProof + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchProof.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BatchProof message. + * @function verify + * @memberof ics23.BatchProof + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BatchProof.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.entries != null && message.hasOwnProperty("entries")) { + if (!Array.isArray(message.entries)) + return "entries: array expected"; + for (let i = 0; i < message.entries.length; ++i) { + let error = $root.ics23.BatchEntry.verify(message.entries[i]); + if (error) + return "entries." + error; + } + } + return null; + }; + + /** + * Creates a BatchProof message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ics23.BatchProof + * @static + * @param {Object.} object Plain object + * @returns {ics23.BatchProof} BatchProof + */ + BatchProof.fromObject = function fromObject(object) { + if (object instanceof $root.ics23.BatchProof) + return object; + let message = new $root.ics23.BatchProof(); + if (object.entries) { + if (!Array.isArray(object.entries)) + throw TypeError(".ics23.BatchProof.entries: array expected"); + message.entries = []; + for (let i = 0; i < object.entries.length; ++i) { + if (typeof object.entries[i] !== "object") + throw TypeError(".ics23.BatchProof.entries: object expected"); + message.entries[i] = $root.ics23.BatchEntry.fromObject(object.entries[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a BatchProof message. Also converts values to other types if specified. + * @function toObject + * @memberof ics23.BatchProof + * @static + * @param {ics23.BatchProof} message BatchProof + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BatchProof.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.entries = []; + if (message.entries && message.entries.length) { + object.entries = []; + for (let j = 0; j < message.entries.length; ++j) + object.entries[j] = $root.ics23.BatchEntry.toObject(message.entries[j], options); + } + return object; + }; + + /** + * Converts this BatchProof to JSON. + * @function toJSON + * @memberof ics23.BatchProof + * @instance + * @returns {Object.} JSON object + */ + BatchProof.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return BatchProof; + })(ics23.BatchProof || {}); + + ics23.BatchEntry = (function(BatchEntry) { + + /** + * Properties of a BatchEntry. + * @memberof ics23 + * @interface IBatchEntry + * @property {ics23.IExistenceProof|null} [exist] BatchEntry exist + * @property {ics23.INonExistenceProof|null} [nonexist] BatchEntry nonexist + */ + + /** + * Constructs a new BatchEntry. + * @memberof ics23 + * @classdesc Represents a BatchEntry. + * @implements IBatchEntry + * @constructor + * @param {ics23.IBatchEntry=} [properties] Properties to set + */ + function BatchEntry(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BatchEntry exist. + * @member {ics23.IExistenceProof|null|undefined} exist + * @memberof ics23.BatchEntry + * @instance + */ + BatchEntry.prototype.exist = null; + + /** + * BatchEntry nonexist. + * @member {ics23.INonExistenceProof|null|undefined} nonexist + * @memberof ics23.BatchEntry + * @instance + */ + BatchEntry.prototype.nonexist = null; + + // OneOf field names bound to virtual getters and setters + let $oneOfFields; + + /** + * BatchEntry proof. + * @member {"exist"|"nonexist"|undefined} proof + * @memberof ics23.BatchEntry + * @instance + */ + Object.defineProperty(BatchEntry.prototype, "proof", { + get: $util.oneOfGetter($oneOfFields = ["exist", "nonexist"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new BatchEntry instance using the specified properties. + * @function create + * @memberof ics23.BatchEntry + * @static + * @param {ics23.IBatchEntry=} [properties] Properties to set + * @returns {ics23.BatchEntry} BatchEntry instance + */ + BatchEntry.create = function create(properties) { + return new BatchEntry(properties); + }; + + /** + * Encodes the specified BatchEntry message. Does not implicitly {@link ics23.BatchEntry.verify|verify} messages. + * @function encode + * @memberof ics23.BatchEntry + * @static + * @param {ics23.IBatchEntry} message BatchEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchEntry.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.exist != null && Object.hasOwnProperty.call(message, "exist")) + $root.ics23.ExistenceProof.encode(message.exist, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nonexist != null && Object.hasOwnProperty.call(message, "nonexist")) + $root.ics23.NonExistenceProof.encode(message.nonexist, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BatchEntry message, length delimited. Does not implicitly {@link ics23.BatchEntry.verify|verify} messages. + * @function encodeDelimited + * @memberof ics23.BatchEntry + * @static + * @param {ics23.IBatchEntry} message BatchEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchEntry.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BatchEntry message from the specified reader or buffer. + * @function decode + * @memberof ics23.BatchEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ics23.BatchEntry} BatchEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchEntry.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ics23.BatchEntry(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.exist = $root.ics23.ExistenceProof.decode(reader, reader.uint32()); + break; + case 2: + message.nonexist = $root.ics23.NonExistenceProof.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BatchEntry message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ics23.BatchEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ics23.BatchEntry} BatchEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchEntry.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BatchEntry message. + * @function verify + * @memberof ics23.BatchEntry + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BatchEntry.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + let properties = {}; + if (message.exist != null && message.hasOwnProperty("exist")) { + properties.proof = 1; + { + let error = $root.ics23.ExistenceProof.verify(message.exist); + if (error) + return "exist." + error; + } + } + if (message.nonexist != null && message.hasOwnProperty("nonexist")) { + if (properties.proof === 1) + return "proof: multiple values"; + properties.proof = 1; + { + let error = $root.ics23.NonExistenceProof.verify(message.nonexist); + if (error) + return "nonexist." + error; + } + } + return null; + }; + + /** + * Creates a BatchEntry message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ics23.BatchEntry + * @static + * @param {Object.} object Plain object + * @returns {ics23.BatchEntry} BatchEntry + */ + BatchEntry.fromObject = function fromObject(object) { + if (object instanceof $root.ics23.BatchEntry) + return object; + let message = new $root.ics23.BatchEntry(); + if (object.exist != null) { + if (typeof object.exist !== "object") + throw TypeError(".ics23.BatchEntry.exist: object expected"); + message.exist = $root.ics23.ExistenceProof.fromObject(object.exist); + } + if (object.nonexist != null) { + if (typeof object.nonexist !== "object") + throw TypeError(".ics23.BatchEntry.nonexist: object expected"); + message.nonexist = $root.ics23.NonExistenceProof.fromObject(object.nonexist); + } + return message; + }; + + /** + * Creates a plain object from a BatchEntry message. Also converts values to other types if specified. + * @function toObject + * @memberof ics23.BatchEntry + * @static + * @param {ics23.BatchEntry} message BatchEntry + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BatchEntry.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (message.exist != null && message.hasOwnProperty("exist")) { + object.exist = $root.ics23.ExistenceProof.toObject(message.exist, options); + if (options.oneofs) + object.proof = "exist"; + } + if (message.nonexist != null && message.hasOwnProperty("nonexist")) { + object.nonexist = $root.ics23.NonExistenceProof.toObject(message.nonexist, options); + if (options.oneofs) + object.proof = "nonexist"; + } + return object; + }; + + /** + * Converts this BatchEntry to JSON. + * @function toJSON + * @memberof ics23.BatchEntry + * @instance + * @returns {Object.} JSON object + */ + BatchEntry.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return BatchEntry; + })(ics23.BatchEntry || {}); + + ics23.CompressedBatchProof = (function(CompressedBatchProof) { + + /** + * Properties of a CompressedBatchProof. + * @memberof ics23 + * @interface ICompressedBatchProof + * @property {Array.|null} [entries] CompressedBatchProof entries + * @property {Array.|null} [lookupInners] CompressedBatchProof lookupInners + */ + + /** + * Constructs a new CompressedBatchProof. + * @memberof ics23 + * @classdesc Represents a CompressedBatchProof. + * @implements ICompressedBatchProof + * @constructor + * @param {ics23.ICompressedBatchProof=} [properties] Properties to set + */ + function CompressedBatchProof(properties) { + this.entries = []; + this.lookupInners = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CompressedBatchProof entries. + * @member {Array.} entries + * @memberof ics23.CompressedBatchProof + * @instance + */ + CompressedBatchProof.prototype.entries = $util.emptyArray; + + /** + * CompressedBatchProof lookupInners. + * @member {Array.} lookupInners + * @memberof ics23.CompressedBatchProof + * @instance + */ + CompressedBatchProof.prototype.lookupInners = $util.emptyArray; + + /** + * Creates a new CompressedBatchProof instance using the specified properties. + * @function create + * @memberof ics23.CompressedBatchProof + * @static + * @param {ics23.ICompressedBatchProof=} [properties] Properties to set + * @returns {ics23.CompressedBatchProof} CompressedBatchProof instance + */ + CompressedBatchProof.create = function create(properties) { + return new CompressedBatchProof(properties); + }; + + /** + * Encodes the specified CompressedBatchProof message. Does not implicitly {@link ics23.CompressedBatchProof.verify|verify} messages. + * @function encode + * @memberof ics23.CompressedBatchProof + * @static + * @param {ics23.ICompressedBatchProof} message CompressedBatchProof message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompressedBatchProof.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.entries != null && message.entries.length) + for (let i = 0; i < message.entries.length; ++i) + $root.ics23.CompressedBatchEntry.encode(message.entries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.lookupInners != null && message.lookupInners.length) + for (let i = 0; i < message.lookupInners.length; ++i) + $root.ics23.InnerOp.encode(message.lookupInners[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CompressedBatchProof message, length delimited. Does not implicitly {@link ics23.CompressedBatchProof.verify|verify} messages. + * @function encodeDelimited + * @memberof ics23.CompressedBatchProof + * @static + * @param {ics23.ICompressedBatchProof} message CompressedBatchProof message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompressedBatchProof.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CompressedBatchProof message from the specified reader or buffer. + * @function decode + * @memberof ics23.CompressedBatchProof + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ics23.CompressedBatchProof} CompressedBatchProof + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompressedBatchProof.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ics23.CompressedBatchProof(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.entries && message.entries.length)) + message.entries = []; + message.entries.push($root.ics23.CompressedBatchEntry.decode(reader, reader.uint32())); + break; + case 2: + if (!(message.lookupInners && message.lookupInners.length)) + message.lookupInners = []; + message.lookupInners.push($root.ics23.InnerOp.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CompressedBatchProof message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ics23.CompressedBatchProof + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ics23.CompressedBatchProof} CompressedBatchProof + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompressedBatchProof.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CompressedBatchProof message. + * @function verify + * @memberof ics23.CompressedBatchProof + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CompressedBatchProof.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.entries != null && message.hasOwnProperty("entries")) { + if (!Array.isArray(message.entries)) + return "entries: array expected"; + for (let i = 0; i < message.entries.length; ++i) { + let error = $root.ics23.CompressedBatchEntry.verify(message.entries[i]); + if (error) + return "entries." + error; + } + } + if (message.lookupInners != null && message.hasOwnProperty("lookupInners")) { + if (!Array.isArray(message.lookupInners)) + return "lookupInners: array expected"; + for (let i = 0; i < message.lookupInners.length; ++i) { + let error = $root.ics23.InnerOp.verify(message.lookupInners[i]); + if (error) + return "lookupInners." + error; + } + } + return null; + }; + + /** + * Creates a CompressedBatchProof message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ics23.CompressedBatchProof + * @static + * @param {Object.} object Plain object + * @returns {ics23.CompressedBatchProof} CompressedBatchProof + */ + CompressedBatchProof.fromObject = function fromObject(object) { + if (object instanceof $root.ics23.CompressedBatchProof) + return object; + let message = new $root.ics23.CompressedBatchProof(); + if (object.entries) { + if (!Array.isArray(object.entries)) + throw TypeError(".ics23.CompressedBatchProof.entries: array expected"); + message.entries = []; + for (let i = 0; i < object.entries.length; ++i) { + if (typeof object.entries[i] !== "object") + throw TypeError(".ics23.CompressedBatchProof.entries: object expected"); + message.entries[i] = $root.ics23.CompressedBatchEntry.fromObject(object.entries[i]); + } + } + if (object.lookupInners) { + if (!Array.isArray(object.lookupInners)) + throw TypeError(".ics23.CompressedBatchProof.lookupInners: array expected"); + message.lookupInners = []; + for (let i = 0; i < object.lookupInners.length; ++i) { + if (typeof object.lookupInners[i] !== "object") + throw TypeError(".ics23.CompressedBatchProof.lookupInners: object expected"); + message.lookupInners[i] = $root.ics23.InnerOp.fromObject(object.lookupInners[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a CompressedBatchProof message. Also converts values to other types if specified. + * @function toObject + * @memberof ics23.CompressedBatchProof + * @static + * @param {ics23.CompressedBatchProof} message CompressedBatchProof + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CompressedBatchProof.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) { + object.entries = []; + object.lookupInners = []; + } + if (message.entries && message.entries.length) { + object.entries = []; + for (let j = 0; j < message.entries.length; ++j) + object.entries[j] = $root.ics23.CompressedBatchEntry.toObject(message.entries[j], options); + } + if (message.lookupInners && message.lookupInners.length) { + object.lookupInners = []; + for (let j = 0; j < message.lookupInners.length; ++j) + object.lookupInners[j] = $root.ics23.InnerOp.toObject(message.lookupInners[j], options); + } + return object; + }; + + /** + * Converts this CompressedBatchProof to JSON. + * @function toJSON + * @memberof ics23.CompressedBatchProof + * @instance + * @returns {Object.} JSON object + */ + CompressedBatchProof.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CompressedBatchProof; + })(ics23.CompressedBatchProof || {}); + + ics23.CompressedBatchEntry = (function(CompressedBatchEntry) { + + /** + * Properties of a CompressedBatchEntry. + * @memberof ics23 + * @interface ICompressedBatchEntry + * @property {ics23.ICompressedExistenceProof|null} [exist] CompressedBatchEntry exist + * @property {ics23.ICompressedNonExistenceProof|null} [nonexist] CompressedBatchEntry nonexist + */ + + /** + * Constructs a new CompressedBatchEntry. + * @memberof ics23 + * @classdesc Represents a CompressedBatchEntry. + * @implements ICompressedBatchEntry + * @constructor + * @param {ics23.ICompressedBatchEntry=} [properties] Properties to set + */ + function CompressedBatchEntry(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CompressedBatchEntry exist. + * @member {ics23.ICompressedExistenceProof|null|undefined} exist + * @memberof ics23.CompressedBatchEntry + * @instance + */ + CompressedBatchEntry.prototype.exist = null; + + /** + * CompressedBatchEntry nonexist. + * @member {ics23.ICompressedNonExistenceProof|null|undefined} nonexist + * @memberof ics23.CompressedBatchEntry + * @instance + */ + CompressedBatchEntry.prototype.nonexist = null; + + // OneOf field names bound to virtual getters and setters + let $oneOfFields; + + /** + * CompressedBatchEntry proof. + * @member {"exist"|"nonexist"|undefined} proof + * @memberof ics23.CompressedBatchEntry + * @instance + */ + Object.defineProperty(CompressedBatchEntry.prototype, "proof", { + get: $util.oneOfGetter($oneOfFields = ["exist", "nonexist"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new CompressedBatchEntry instance using the specified properties. + * @function create + * @memberof ics23.CompressedBatchEntry + * @static + * @param {ics23.ICompressedBatchEntry=} [properties] Properties to set + * @returns {ics23.CompressedBatchEntry} CompressedBatchEntry instance + */ + CompressedBatchEntry.create = function create(properties) { + return new CompressedBatchEntry(properties); + }; + + /** + * Encodes the specified CompressedBatchEntry message. Does not implicitly {@link ics23.CompressedBatchEntry.verify|verify} messages. + * @function encode + * @memberof ics23.CompressedBatchEntry + * @static + * @param {ics23.ICompressedBatchEntry} message CompressedBatchEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompressedBatchEntry.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.exist != null && Object.hasOwnProperty.call(message, "exist")) + $root.ics23.CompressedExistenceProof.encode(message.exist, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nonexist != null && Object.hasOwnProperty.call(message, "nonexist")) + $root.ics23.CompressedNonExistenceProof.encode(message.nonexist, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CompressedBatchEntry message, length delimited. Does not implicitly {@link ics23.CompressedBatchEntry.verify|verify} messages. + * @function encodeDelimited + * @memberof ics23.CompressedBatchEntry + * @static + * @param {ics23.ICompressedBatchEntry} message CompressedBatchEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompressedBatchEntry.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CompressedBatchEntry message from the specified reader or buffer. + * @function decode + * @memberof ics23.CompressedBatchEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ics23.CompressedBatchEntry} CompressedBatchEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompressedBatchEntry.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ics23.CompressedBatchEntry(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.exist = $root.ics23.CompressedExistenceProof.decode(reader, reader.uint32()); + break; + case 2: + message.nonexist = $root.ics23.CompressedNonExistenceProof.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CompressedBatchEntry message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ics23.CompressedBatchEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ics23.CompressedBatchEntry} CompressedBatchEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompressedBatchEntry.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CompressedBatchEntry message. + * @function verify + * @memberof ics23.CompressedBatchEntry + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CompressedBatchEntry.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + let properties = {}; + if (message.exist != null && message.hasOwnProperty("exist")) { + properties.proof = 1; + { + let error = $root.ics23.CompressedExistenceProof.verify(message.exist); + if (error) + return "exist." + error; + } + } + if (message.nonexist != null && message.hasOwnProperty("nonexist")) { + if (properties.proof === 1) + return "proof: multiple values"; + properties.proof = 1; + { + let error = $root.ics23.CompressedNonExistenceProof.verify(message.nonexist); + if (error) + return "nonexist." + error; + } + } + return null; + }; + + /** + * Creates a CompressedBatchEntry message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ics23.CompressedBatchEntry + * @static + * @param {Object.} object Plain object + * @returns {ics23.CompressedBatchEntry} CompressedBatchEntry + */ + CompressedBatchEntry.fromObject = function fromObject(object) { + if (object instanceof $root.ics23.CompressedBatchEntry) + return object; + let message = new $root.ics23.CompressedBatchEntry(); + if (object.exist != null) { + if (typeof object.exist !== "object") + throw TypeError(".ics23.CompressedBatchEntry.exist: object expected"); + message.exist = $root.ics23.CompressedExistenceProof.fromObject(object.exist); + } + if (object.nonexist != null) { + if (typeof object.nonexist !== "object") + throw TypeError(".ics23.CompressedBatchEntry.nonexist: object expected"); + message.nonexist = $root.ics23.CompressedNonExistenceProof.fromObject(object.nonexist); + } + return message; + }; + + /** + * Creates a plain object from a CompressedBatchEntry message. Also converts values to other types if specified. + * @function toObject + * @memberof ics23.CompressedBatchEntry + * @static + * @param {ics23.CompressedBatchEntry} message CompressedBatchEntry + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CompressedBatchEntry.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (message.exist != null && message.hasOwnProperty("exist")) { + object.exist = $root.ics23.CompressedExistenceProof.toObject(message.exist, options); + if (options.oneofs) + object.proof = "exist"; + } + if (message.nonexist != null && message.hasOwnProperty("nonexist")) { + object.nonexist = $root.ics23.CompressedNonExistenceProof.toObject(message.nonexist, options); + if (options.oneofs) + object.proof = "nonexist"; + } + return object; + }; + + /** + * Converts this CompressedBatchEntry to JSON. + * @function toJSON + * @memberof ics23.CompressedBatchEntry + * @instance + * @returns {Object.} JSON object + */ + CompressedBatchEntry.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CompressedBatchEntry; + })(ics23.CompressedBatchEntry || {}); + + ics23.CompressedExistenceProof = (function(CompressedExistenceProof) { + + /** + * Properties of a CompressedExistenceProof. + * @memberof ics23 + * @interface ICompressedExistenceProof + * @property {Uint8Array|null} [key] CompressedExistenceProof key + * @property {Uint8Array|null} [value] CompressedExistenceProof value + * @property {ics23.ILeafOp|null} [leaf] CompressedExistenceProof leaf + * @property {Array.|null} [path] CompressedExistenceProof path + */ + + /** + * Constructs a new CompressedExistenceProof. + * @memberof ics23 + * @classdesc Represents a CompressedExistenceProof. + * @implements ICompressedExistenceProof + * @constructor + * @param {ics23.ICompressedExistenceProof=} [properties] Properties to set + */ + function CompressedExistenceProof(properties) { + this.path = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CompressedExistenceProof key. + * @member {Uint8Array} key + * @memberof ics23.CompressedExistenceProof + * @instance + */ + CompressedExistenceProof.prototype.key = $util.newBuffer([]); + + /** + * CompressedExistenceProof value. + * @member {Uint8Array} value + * @memberof ics23.CompressedExistenceProof + * @instance + */ + CompressedExistenceProof.prototype.value = $util.newBuffer([]); + + /** + * CompressedExistenceProof leaf. + * @member {ics23.ILeafOp|null|undefined} leaf + * @memberof ics23.CompressedExistenceProof + * @instance + */ + CompressedExistenceProof.prototype.leaf = null; + + /** + * CompressedExistenceProof path. + * @member {Array.} path + * @memberof ics23.CompressedExistenceProof + * @instance + */ + CompressedExistenceProof.prototype.path = $util.emptyArray; + + /** + * Creates a new CompressedExistenceProof instance using the specified properties. + * @function create + * @memberof ics23.CompressedExistenceProof + * @static + * @param {ics23.ICompressedExistenceProof=} [properties] Properties to set + * @returns {ics23.CompressedExistenceProof} CompressedExistenceProof instance + */ + CompressedExistenceProof.create = function create(properties) { + return new CompressedExistenceProof(properties); + }; + + /** + * Encodes the specified CompressedExistenceProof message. Does not implicitly {@link ics23.CompressedExistenceProof.verify|verify} messages. + * @function encode + * @memberof ics23.CompressedExistenceProof + * @static + * @param {ics23.ICompressedExistenceProof} message CompressedExistenceProof message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompressedExistenceProof.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.key); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); + if (message.leaf != null && Object.hasOwnProperty.call(message, "leaf")) + $root.ics23.LeafOp.encode(message.leaf, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 4, wireType 2 =*/34).fork(); + for (let i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified CompressedExistenceProof message, length delimited. Does not implicitly {@link ics23.CompressedExistenceProof.verify|verify} messages. + * @function encodeDelimited + * @memberof ics23.CompressedExistenceProof + * @static + * @param {ics23.ICompressedExistenceProof} message CompressedExistenceProof message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompressedExistenceProof.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CompressedExistenceProof message from the specified reader or buffer. + * @function decode + * @memberof ics23.CompressedExistenceProof + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ics23.CompressedExistenceProof} CompressedExistenceProof + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompressedExistenceProof.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ics23.CompressedExistenceProof(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.key = reader.bytes(); + break; + case 2: + message.value = reader.bytes(); + break; + case 3: + message.leaf = $root.ics23.LeafOp.decode(reader, reader.uint32()); + break; + case 4: + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + let end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CompressedExistenceProof message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ics23.CompressedExistenceProof + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ics23.CompressedExistenceProof} CompressedExistenceProof + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompressedExistenceProof.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CompressedExistenceProof message. + * @function verify + * @memberof ics23.CompressedExistenceProof + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CompressedExistenceProof.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.key != null && message.hasOwnProperty("key")) + if (!(message.key && typeof message.key.length === "number" || $util.isString(message.key))) + return "key: buffer expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; + if (message.leaf != null && message.hasOwnProperty("leaf")) { + let error = $root.ics23.LeafOp.verify(message.leaf); + if (error) + return "leaf." + error; + } + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (let i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + return null; + }; + + /** + * Creates a CompressedExistenceProof message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ics23.CompressedExistenceProof + * @static + * @param {Object.} object Plain object + * @returns {ics23.CompressedExistenceProof} CompressedExistenceProof + */ + CompressedExistenceProof.fromObject = function fromObject(object) { + if (object instanceof $root.ics23.CompressedExistenceProof) + return object; + let message = new $root.ics23.CompressedExistenceProof(); + if (object.key != null) + if (typeof object.key === "string") + $util.base64.decode(object.key, message.key = $util.newBuffer($util.base64.length(object.key)), 0); + else if (object.key.length) + message.key = object.key; + if (object.value != null) + if (typeof object.value === "string") + $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); + else if (object.value.length) + message.value = object.value; + if (object.leaf != null) { + if (typeof object.leaf !== "object") + throw TypeError(".ics23.CompressedExistenceProof.leaf: object expected"); + message.leaf = $root.ics23.LeafOp.fromObject(object.leaf); + } + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".ics23.CompressedExistenceProof.path: array expected"); + message.path = []; + for (let i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + return message; + }; + + /** + * Creates a plain object from a CompressedExistenceProof message. Also converts values to other types if specified. + * @function toObject + * @memberof ics23.CompressedExistenceProof + * @static + * @param {ics23.CompressedExistenceProof} message CompressedExistenceProof + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CompressedExistenceProof.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.path = []; + if (options.defaults) { + if (options.bytes === String) + object.key = ""; + else { + object.key = []; + if (options.bytes !== Array) + object.key = $util.newBuffer(object.key); + } + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + object.leaf = null; + } + if (message.key != null && message.hasOwnProperty("key")) + object.key = options.bytes === String ? $util.base64.encode(message.key, 0, message.key.length) : options.bytes === Array ? Array.prototype.slice.call(message.key) : message.key; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + if (message.leaf != null && message.hasOwnProperty("leaf")) + object.leaf = $root.ics23.LeafOp.toObject(message.leaf, options); + if (message.path && message.path.length) { + object.path = []; + for (let j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + return object; + }; + + /** + * Converts this CompressedExistenceProof to JSON. + * @function toJSON + * @memberof ics23.CompressedExistenceProof + * @instance + * @returns {Object.} JSON object + */ + CompressedExistenceProof.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CompressedExistenceProof; + })(ics23.CompressedExistenceProof || {}); + + ics23.CompressedNonExistenceProof = (function(CompressedNonExistenceProof) { + + /** + * Properties of a CompressedNonExistenceProof. + * @memberof ics23 + * @interface ICompressedNonExistenceProof + * @property {Uint8Array|null} [key] CompressedNonExistenceProof key + * @property {ics23.ICompressedExistenceProof|null} [left] CompressedNonExistenceProof left + * @property {ics23.ICompressedExistenceProof|null} [right] CompressedNonExistenceProof right + */ + + /** + * Constructs a new CompressedNonExistenceProof. + * @memberof ics23 + * @classdesc Represents a CompressedNonExistenceProof. + * @implements ICompressedNonExistenceProof + * @constructor + * @param {ics23.ICompressedNonExistenceProof=} [properties] Properties to set + */ + function CompressedNonExistenceProof(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CompressedNonExistenceProof key. + * @member {Uint8Array} key + * @memberof ics23.CompressedNonExistenceProof + * @instance + */ + CompressedNonExistenceProof.prototype.key = $util.newBuffer([]); + + /** + * CompressedNonExistenceProof left. + * @member {ics23.ICompressedExistenceProof|null|undefined} left + * @memberof ics23.CompressedNonExistenceProof + * @instance + */ + CompressedNonExistenceProof.prototype.left = null; + + /** + * CompressedNonExistenceProof right. + * @member {ics23.ICompressedExistenceProof|null|undefined} right + * @memberof ics23.CompressedNonExistenceProof + * @instance + */ + CompressedNonExistenceProof.prototype.right = null; + + /** + * Creates a new CompressedNonExistenceProof instance using the specified properties. + * @function create + * @memberof ics23.CompressedNonExistenceProof + * @static + * @param {ics23.ICompressedNonExistenceProof=} [properties] Properties to set + * @returns {ics23.CompressedNonExistenceProof} CompressedNonExistenceProof instance + */ + CompressedNonExistenceProof.create = function create(properties) { + return new CompressedNonExistenceProof(properties); + }; + + /** + * Encodes the specified CompressedNonExistenceProof message. Does not implicitly {@link ics23.CompressedNonExistenceProof.verify|verify} messages. + * @function encode + * @memberof ics23.CompressedNonExistenceProof + * @static + * @param {ics23.ICompressedNonExistenceProof} message CompressedNonExistenceProof message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompressedNonExistenceProof.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.key); + if (message.left != null && Object.hasOwnProperty.call(message, "left")) + $root.ics23.CompressedExistenceProof.encode(message.left, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.right != null && Object.hasOwnProperty.call(message, "right")) + $root.ics23.CompressedExistenceProof.encode(message.right, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CompressedNonExistenceProof message, length delimited. Does not implicitly {@link ics23.CompressedNonExistenceProof.verify|verify} messages. + * @function encodeDelimited + * @memberof ics23.CompressedNonExistenceProof + * @static + * @param {ics23.ICompressedNonExistenceProof} message CompressedNonExistenceProof message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompressedNonExistenceProof.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CompressedNonExistenceProof message from the specified reader or buffer. + * @function decode + * @memberof ics23.CompressedNonExistenceProof + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ics23.CompressedNonExistenceProof} CompressedNonExistenceProof + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompressedNonExistenceProof.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ics23.CompressedNonExistenceProof(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.key = reader.bytes(); + break; + case 2: + message.left = $root.ics23.CompressedExistenceProof.decode(reader, reader.uint32()); + break; + case 3: + message.right = $root.ics23.CompressedExistenceProof.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CompressedNonExistenceProof message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ics23.CompressedNonExistenceProof + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ics23.CompressedNonExistenceProof} CompressedNonExistenceProof + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompressedNonExistenceProof.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CompressedNonExistenceProof message. + * @function verify + * @memberof ics23.CompressedNonExistenceProof + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CompressedNonExistenceProof.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.key != null && message.hasOwnProperty("key")) + if (!(message.key && typeof message.key.length === "number" || $util.isString(message.key))) + return "key: buffer expected"; + if (message.left != null && message.hasOwnProperty("left")) { + let error = $root.ics23.CompressedExistenceProof.verify(message.left); + if (error) + return "left." + error; + } + if (message.right != null && message.hasOwnProperty("right")) { + let error = $root.ics23.CompressedExistenceProof.verify(message.right); + if (error) + return "right." + error; + } + return null; + }; + + /** + * Creates a CompressedNonExistenceProof message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ics23.CompressedNonExistenceProof + * @static + * @param {Object.} object Plain object + * @returns {ics23.CompressedNonExistenceProof} CompressedNonExistenceProof + */ + CompressedNonExistenceProof.fromObject = function fromObject(object) { + if (object instanceof $root.ics23.CompressedNonExistenceProof) + return object; + let message = new $root.ics23.CompressedNonExistenceProof(); + if (object.key != null) + if (typeof object.key === "string") + $util.base64.decode(object.key, message.key = $util.newBuffer($util.base64.length(object.key)), 0); + else if (object.key.length) + message.key = object.key; + if (object.left != null) { + if (typeof object.left !== "object") + throw TypeError(".ics23.CompressedNonExistenceProof.left: object expected"); + message.left = $root.ics23.CompressedExistenceProof.fromObject(object.left); + } + if (object.right != null) { + if (typeof object.right !== "object") + throw TypeError(".ics23.CompressedNonExistenceProof.right: object expected"); + message.right = $root.ics23.CompressedExistenceProof.fromObject(object.right); + } + return message; + }; + + /** + * Creates a plain object from a CompressedNonExistenceProof message. Also converts values to other types if specified. + * @function toObject + * @memberof ics23.CompressedNonExistenceProof + * @static + * @param {ics23.CompressedNonExistenceProof} message CompressedNonExistenceProof + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CompressedNonExistenceProof.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + if (options.bytes === String) + object.key = ""; + else { + object.key = []; + if (options.bytes !== Array) + object.key = $util.newBuffer(object.key); + } + object.left = null; + object.right = null; + } + if (message.key != null && message.hasOwnProperty("key")) + object.key = options.bytes === String ? $util.base64.encode(message.key, 0, message.key.length) : options.bytes === Array ? Array.prototype.slice.call(message.key) : message.key; + if (message.left != null && message.hasOwnProperty("left")) + object.left = $root.ics23.CompressedExistenceProof.toObject(message.left, options); + if (message.right != null && message.hasOwnProperty("right")) + object.right = $root.ics23.CompressedExistenceProof.toObject(message.right, options); + return object; + }; + + /** + * Converts this CompressedNonExistenceProof to JSON. + * @function toJSON + * @memberof ics23.CompressedNonExistenceProof + * @instance + * @returns {Object.} JSON object + */ + CompressedNonExistenceProof.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CompressedNonExistenceProof; + })(ics23.CompressedNonExistenceProof || {}); + + return ics23; +})($root.ics23 || {}); + +export { $root as default }; diff --git a/src/libs/fetch.js b/src/libs/fetch.js index 244c8c24..4b7b2990 100644 --- a/src/libs/fetch.js +++ b/src/libs/fetch.js @@ -335,6 +335,12 @@ export default class ChainFetch { return this.get(`/ibc/core/channel/v1beta1/channels/${channel_id}/ports/${port_id}/client_state`, config).then(data => commonProcess(data)) } + // eslint-disable-next-line camelcase + async getIBCChannel(channel_id, port_id, config = null) { + // eslint-disable-next-line camelcase + return this.get(`/ibc/core/channel/v1beta1/channels/${channel_id}/ports/${port_id}`, config).then(data => commonProcess(data)) + } + static async getBankBalance(baseurl, address) { return ChainFetch.fetch(baseurl, '/bank/balances/'.concat(address)).then(data => commonProcess(data)) } diff --git a/src/libs/ibc.js b/src/libs/ibc.js new file mode 100644 index 00000000..71906d71 --- /dev/null +++ b/src/libs/ibc.js @@ -0,0 +1,8731 @@ +/* eslint-disable */ +import * as $protobuf from "protobufjs-dbx/minimal"; + +// Common aliases +const $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; + +// Exported root namespace +const $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {}); + +/** + * Namespace ibc. + * @exports ibc + * @namespace + */ + +export const ibc = $root.ibc = ((ibc) => { + + /** + * Namespace applications. + * @memberof ibc + * @namespace + */ + + ibc.applications = (function(applications) { + + /** + * Namespace transfer. + * @memberof ibc.applications + * @namespace + */ + + applications.transfer = (function(transfer) { + + /** + * Namespace v1. + * @memberof ibc.applications.transfer + * @namespace + */ + + transfer.v1 = (function(v1) { + + v1.Msg = (function(Msg) { + + /** + * Constructs a new Msg service. + * @memberof ibc.applications.transfer.v1 + * @classdesc Represents a Msg + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Msg(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Msg.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Msg; + + /** + * Creates new Msg service using the specified rpc implementation. + * @function create + * @memberof ibc.applications.transfer.v1.Msg + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Msg} RPC service. Useful where requests and/or responses are streamed. + */ + Msg.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link ibc.applications.transfer.v1.Msg#transfer}. + * @memberof ibc.applications.transfer.v1.Msg + * @typedef TransferCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {ibc.applications.transfer.v1.IMsgTransferResponse} [response] MsgTransferResponse + */ + + /** + * Calls Transfer. + * @function transfer + * @memberof ibc.applications.transfer.v1.Msg + * @instance + * @param {ibc.applications.transfer.v1.IMsgTransfer} request MsgTransfer message or plain object + * @param {ibc.applications.transfer.v1.Msg.TransferCallback} callback Node-style callback called with the error, if any, and MsgTransferResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Msg.prototype.transfer = function transfer(request, callback) { + return this.rpcCall(transfer, $root.ibc.applications.transfer.v1.MsgTransfer, $root.ibc.applications.transfer.v1.MsgTransferResponse, request, callback); + }, "name", { value: "Transfer" }); + + /** + * Calls Transfer. + * @function transfer + * @memberof ibc.applications.transfer.v1.Msg + * @instance + * @param {ibc.applications.transfer.v1.IMsgTransfer} request MsgTransfer message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Msg; + })(v1.Msg || {}); + + v1.MsgTransfer = (function(MsgTransfer) { + + /** + * Properties of a MsgTransfer. + * @memberof ibc.applications.transfer.v1 + * @interface IMsgTransfer + * @property {string|null} [sourcePort] MsgTransfer sourcePort + * @property {string|null} [sourceChannel] MsgTransfer sourceChannel + * @property {cosmos.base.v1beta1.ICoin|null} [token] MsgTransfer token + * @property {string|null} [sender] MsgTransfer sender + * @property {string|null} [receiver] MsgTransfer receiver + * @property {ibc.core.client.v1.IHeight|null} [timeoutHeight] MsgTransfer timeoutHeight + * @property {number|Long|null} [timeoutTimestamp] MsgTransfer timeoutTimestamp + */ + + /** + * Constructs a new MsgTransfer. + * @memberof ibc.applications.transfer.v1 + * @classdesc Represents a MsgTransfer. + * @implements IMsgTransfer + * @constructor + * @param {ibc.applications.transfer.v1.IMsgTransfer=} [properties] Properties to set + */ + function MsgTransfer(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgTransfer sourcePort. + * @member {string} sourcePort + * @memberof ibc.applications.transfer.v1.MsgTransfer + * @instance + */ + MsgTransfer.prototype.sourcePort = ""; + + /** + * MsgTransfer sourceChannel. + * @member {string} sourceChannel + * @memberof ibc.applications.transfer.v1.MsgTransfer + * @instance + */ + MsgTransfer.prototype.sourceChannel = ""; + + /** + * MsgTransfer token. + * @member {cosmos.base.v1beta1.ICoin|null|undefined} token + * @memberof ibc.applications.transfer.v1.MsgTransfer + * @instance + */ + MsgTransfer.prototype.token = null; + + /** + * MsgTransfer sender. + * @member {string} sender + * @memberof ibc.applications.transfer.v1.MsgTransfer + * @instance + */ + MsgTransfer.prototype.sender = ""; + + /** + * MsgTransfer receiver. + * @member {string} receiver + * @memberof ibc.applications.transfer.v1.MsgTransfer + * @instance + */ + MsgTransfer.prototype.receiver = ""; + + /** + * MsgTransfer timeoutHeight. + * @member {ibc.core.client.v1.IHeight|null|undefined} timeoutHeight + * @memberof ibc.applications.transfer.v1.MsgTransfer + * @instance + */ + MsgTransfer.prototype.timeoutHeight = null; + + /** + * MsgTransfer timeoutTimestamp. + * @member {number|Long} timeoutTimestamp + * @memberof ibc.applications.transfer.v1.MsgTransfer + * @instance + */ + MsgTransfer.prototype.timeoutTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new MsgTransfer instance using the specified properties. + * @function create + * @memberof ibc.applications.transfer.v1.MsgTransfer + * @static + * @param {ibc.applications.transfer.v1.IMsgTransfer=} [properties] Properties to set + * @returns {ibc.applications.transfer.v1.MsgTransfer} MsgTransfer instance + */ + MsgTransfer.create = function create(properties) { + return new MsgTransfer(properties); + }; + + /** + * Encodes the specified MsgTransfer message. Does not implicitly {@link ibc.applications.transfer.v1.MsgTransfer.verify|verify} messages. + * @function encode + * @memberof ibc.applications.transfer.v1.MsgTransfer + * @static + * @param {ibc.applications.transfer.v1.IMsgTransfer} message MsgTransfer message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgTransfer.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sourcePort != null && Object.hasOwnProperty.call(message, "sourcePort")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.sourcePort); + if (message.sourceChannel != null && Object.hasOwnProperty.call(message, "sourceChannel")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceChannel); + if (message.token != null && Object.hasOwnProperty.call(message, "token")) + $root.cosmos.base.v1beta1.Coin.encode(message.token, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.sender != null && Object.hasOwnProperty.call(message, "sender")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.sender); + if (message.receiver != null && Object.hasOwnProperty.call(message, "receiver")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.receiver); + if (message.timeoutHeight != null && Object.hasOwnProperty.call(message, "timeoutHeight")) + $root.ibc.core.client.v1.Height.encode(message.timeoutHeight, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.timeoutTimestamp != null && Object.hasOwnProperty.call(message, "timeoutTimestamp")) + writer.uint32(/* id 7, wireType 0 =*/56).uint64(message.timeoutTimestamp); + return writer; + }; + + /** + * Encodes the specified MsgTransfer message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.MsgTransfer.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.applications.transfer.v1.MsgTransfer + * @static + * @param {ibc.applications.transfer.v1.IMsgTransfer} message MsgTransfer message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgTransfer.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgTransfer message from the specified reader or buffer. + * @function decode + * @memberof ibc.applications.transfer.v1.MsgTransfer + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.applications.transfer.v1.MsgTransfer} MsgTransfer + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgTransfer.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.transfer.v1.MsgTransfer(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.sourcePort = reader.string(); + break; + case 2: + message.sourceChannel = reader.string(); + break; + case 3: + message.token = $root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32()); + break; + case 4: + message.sender = reader.string(); + break; + case 5: + message.receiver = reader.string(); + break; + case 6: + message.timeoutHeight = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); + break; + case 7: + message.timeoutTimestamp = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgTransfer message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.applications.transfer.v1.MsgTransfer + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.applications.transfer.v1.MsgTransfer} MsgTransfer + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgTransfer.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgTransfer message. + * @function verify + * @memberof ibc.applications.transfer.v1.MsgTransfer + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgTransfer.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sourcePort != null && message.hasOwnProperty("sourcePort")) + if (!$util.isString(message.sourcePort)) + return "sourcePort: string expected"; + if (message.sourceChannel != null && message.hasOwnProperty("sourceChannel")) + if (!$util.isString(message.sourceChannel)) + return "sourceChannel: string expected"; + if (message.token != null && message.hasOwnProperty("token")) { + let error = $root.cosmos.base.v1beta1.Coin.verify(message.token); + if (error) + return "token." + error; + } + if (message.sender != null && message.hasOwnProperty("sender")) + if (!$util.isString(message.sender)) + return "sender: string expected"; + if (message.receiver != null && message.hasOwnProperty("receiver")) + if (!$util.isString(message.receiver)) + return "receiver: string expected"; + if (message.timeoutHeight != null && message.hasOwnProperty("timeoutHeight")) { + let error = $root.ibc.core.client.v1.Height.verify(message.timeoutHeight); + if (error) + return "timeoutHeight." + error; + } + if (message.timeoutTimestamp != null && message.hasOwnProperty("timeoutTimestamp")) + if (!$util.isInteger(message.timeoutTimestamp) && !(message.timeoutTimestamp && $util.isInteger(message.timeoutTimestamp.low) && $util.isInteger(message.timeoutTimestamp.high))) + return "timeoutTimestamp: integer|Long expected"; + return null; + }; + + /** + * Creates a MsgTransfer message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.applications.transfer.v1.MsgTransfer + * @static + * @param {Object.} object Plain object + * @returns {ibc.applications.transfer.v1.MsgTransfer} MsgTransfer + */ + MsgTransfer.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.applications.transfer.v1.MsgTransfer) + return object; + let message = new $root.ibc.applications.transfer.v1.MsgTransfer(); + if (object.sourcePort != null) + message.sourcePort = String(object.sourcePort); + if (object.sourceChannel != null) + message.sourceChannel = String(object.sourceChannel); + if (object.token != null) { + if (typeof object.token !== "object") + throw TypeError(".ibc.applications.transfer.v1.MsgTransfer.token: object expected"); + message.token = $root.cosmos.base.v1beta1.Coin.fromObject(object.token); + } + if (object.sender != null) + message.sender = String(object.sender); + if (object.receiver != null) + message.receiver = String(object.receiver); + if (object.timeoutHeight != null) { + if (typeof object.timeoutHeight !== "object") + throw TypeError(".ibc.applications.transfer.v1.MsgTransfer.timeoutHeight: object expected"); + message.timeoutHeight = $root.ibc.core.client.v1.Height.fromObject(object.timeoutHeight); + } + if (object.timeoutTimestamp != null) + if ($util.Long) + (message.timeoutTimestamp = $util.Long.fromValue(object.timeoutTimestamp)).unsigned = true; + else if (typeof object.timeoutTimestamp === "string") + message.timeoutTimestamp = parseInt(object.timeoutTimestamp, 10); + else if (typeof object.timeoutTimestamp === "number") + message.timeoutTimestamp = object.timeoutTimestamp; + else if (typeof object.timeoutTimestamp === "object") + message.timeoutTimestamp = new $util.LongBits(object.timeoutTimestamp.low >>> 0, object.timeoutTimestamp.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a MsgTransfer message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.applications.transfer.v1.MsgTransfer + * @static + * @param {ibc.applications.transfer.v1.MsgTransfer} message MsgTransfer + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgTransfer.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.sourcePort = ""; + object.sourceChannel = ""; + object.token = null; + object.sender = ""; + object.receiver = ""; + object.timeoutHeight = null; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.timeoutTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.timeoutTimestamp = options.longs === String ? "0" : 0; + } + if (message.sourcePort != null && message.hasOwnProperty("sourcePort")) + object.sourcePort = message.sourcePort; + if (message.sourceChannel != null && message.hasOwnProperty("sourceChannel")) + object.sourceChannel = message.sourceChannel; + if (message.token != null && message.hasOwnProperty("token")) + object.token = $root.cosmos.base.v1beta1.Coin.toObject(message.token, options); + if (message.sender != null && message.hasOwnProperty("sender")) + object.sender = message.sender; + if (message.receiver != null && message.hasOwnProperty("receiver")) + object.receiver = message.receiver; + if (message.timeoutHeight != null && message.hasOwnProperty("timeoutHeight")) + object.timeoutHeight = $root.ibc.core.client.v1.Height.toObject(message.timeoutHeight, options); + if (message.timeoutTimestamp != null && message.hasOwnProperty("timeoutTimestamp")) + if (typeof message.timeoutTimestamp === "number") + object.timeoutTimestamp = options.longs === String ? String(message.timeoutTimestamp) : message.timeoutTimestamp; + else + object.timeoutTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.timeoutTimestamp) : options.longs === Number ? new $util.LongBits(message.timeoutTimestamp.low >>> 0, message.timeoutTimestamp.high >>> 0).toNumber(true) : message.timeoutTimestamp; + return object; + }; + + /** + * Converts this MsgTransfer to JSON. + * @function toJSON + * @memberof ibc.applications.transfer.v1.MsgTransfer + * @instance + * @returns {Object.} JSON object + */ + MsgTransfer.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgTransfer; + })(v1.MsgTransfer || {}); + + v1.MsgTransferResponse = (function(MsgTransferResponse) { + + /** + * Properties of a MsgTransferResponse. + * @memberof ibc.applications.transfer.v1 + * @interface IMsgTransferResponse + */ + + /** + * Constructs a new MsgTransferResponse. + * @memberof ibc.applications.transfer.v1 + * @classdesc Represents a MsgTransferResponse. + * @implements IMsgTransferResponse + * @constructor + * @param {ibc.applications.transfer.v1.IMsgTransferResponse=} [properties] Properties to set + */ + function MsgTransferResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new MsgTransferResponse instance using the specified properties. + * @function create + * @memberof ibc.applications.transfer.v1.MsgTransferResponse + * @static + * @param {ibc.applications.transfer.v1.IMsgTransferResponse=} [properties] Properties to set + * @returns {ibc.applications.transfer.v1.MsgTransferResponse} MsgTransferResponse instance + */ + MsgTransferResponse.create = function create(properties) { + return new MsgTransferResponse(properties); + }; + + /** + * Encodes the specified MsgTransferResponse message. Does not implicitly {@link ibc.applications.transfer.v1.MsgTransferResponse.verify|verify} messages. + * @function encode + * @memberof ibc.applications.transfer.v1.MsgTransferResponse + * @static + * @param {ibc.applications.transfer.v1.IMsgTransferResponse} message MsgTransferResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgTransferResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MsgTransferResponse message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.MsgTransferResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.applications.transfer.v1.MsgTransferResponse + * @static + * @param {ibc.applications.transfer.v1.IMsgTransferResponse} message MsgTransferResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgTransferResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgTransferResponse message from the specified reader or buffer. + * @function decode + * @memberof ibc.applications.transfer.v1.MsgTransferResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.applications.transfer.v1.MsgTransferResponse} MsgTransferResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgTransferResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.transfer.v1.MsgTransferResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgTransferResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.applications.transfer.v1.MsgTransferResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.applications.transfer.v1.MsgTransferResponse} MsgTransferResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgTransferResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgTransferResponse message. + * @function verify + * @memberof ibc.applications.transfer.v1.MsgTransferResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgTransferResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MsgTransferResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.applications.transfer.v1.MsgTransferResponse + * @static + * @param {Object.} object Plain object + * @returns {ibc.applications.transfer.v1.MsgTransferResponse} MsgTransferResponse + */ + MsgTransferResponse.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.applications.transfer.v1.MsgTransferResponse) + return object; + return new $root.ibc.applications.transfer.v1.MsgTransferResponse(); + }; + + /** + * Creates a plain object from a MsgTransferResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.applications.transfer.v1.MsgTransferResponse + * @static + * @param {ibc.applications.transfer.v1.MsgTransferResponse} message MsgTransferResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgTransferResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MsgTransferResponse to JSON. + * @function toJSON + * @memberof ibc.applications.transfer.v1.MsgTransferResponse + * @instance + * @returns {Object.} JSON object + */ + MsgTransferResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgTransferResponse; + })(v1.MsgTransferResponse || {}); + + return v1; + })(transfer.v1 || {}); + + return transfer; + })(applications.transfer || {}); + + return applications; + })(ibc.applications || {}); + + /** + * Namespace core. + * @memberof ibc + * @namespace + */ + + ibc.core = (function(core) { + + /** + * Namespace client. + * @memberof ibc.core + * @namespace + */ + + core.client = (function(client) { + + /** + * Namespace v1. + * @memberof ibc.core.client + * @namespace + */ + + client.v1 = (function(v1) { + + v1.IdentifiedClientState = (function(IdentifiedClientState) { + + /** + * Properties of an IdentifiedClientState. + * @memberof ibc.core.client.v1 + * @interface IIdentifiedClientState + * @property {string|null} [clientId] IdentifiedClientState clientId + * @property {google.protobuf.IAny|null} [clientState] IdentifiedClientState clientState + */ + + /** + * Constructs a new IdentifiedClientState. + * @memberof ibc.core.client.v1 + * @classdesc Represents an IdentifiedClientState. + * @implements IIdentifiedClientState + * @constructor + * @param {ibc.core.client.v1.IIdentifiedClientState=} [properties] Properties to set + */ + function IdentifiedClientState(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * IdentifiedClientState clientId. + * @member {string} clientId + * @memberof ibc.core.client.v1.IdentifiedClientState + * @instance + */ + IdentifiedClientState.prototype.clientId = ""; + + /** + * IdentifiedClientState clientState. + * @member {google.protobuf.IAny|null|undefined} clientState + * @memberof ibc.core.client.v1.IdentifiedClientState + * @instance + */ + IdentifiedClientState.prototype.clientState = null; + + /** + * Creates a new IdentifiedClientState instance using the specified properties. + * @function create + * @memberof ibc.core.client.v1.IdentifiedClientState + * @static + * @param {ibc.core.client.v1.IIdentifiedClientState=} [properties] Properties to set + * @returns {ibc.core.client.v1.IdentifiedClientState} IdentifiedClientState instance + */ + IdentifiedClientState.create = function create(properties) { + return new IdentifiedClientState(properties); + }; + + /** + * Encodes the specified IdentifiedClientState message. Does not implicitly {@link ibc.core.client.v1.IdentifiedClientState.verify|verify} messages. + * @function encode + * @memberof ibc.core.client.v1.IdentifiedClientState + * @static + * @param {ibc.core.client.v1.IIdentifiedClientState} message IdentifiedClientState message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IdentifiedClientState.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.clientId != null && Object.hasOwnProperty.call(message, "clientId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.clientId); + if (message.clientState != null && Object.hasOwnProperty.call(message, "clientState")) + $root.google.protobuf.Any.encode(message.clientState, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified IdentifiedClientState message, length delimited. Does not implicitly {@link ibc.core.client.v1.IdentifiedClientState.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.client.v1.IdentifiedClientState + * @static + * @param {ibc.core.client.v1.IIdentifiedClientState} message IdentifiedClientState message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IdentifiedClientState.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IdentifiedClientState message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.client.v1.IdentifiedClientState + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.client.v1.IdentifiedClientState} IdentifiedClientState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IdentifiedClientState.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.IdentifiedClientState(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.clientId = reader.string(); + break; + case 2: + message.clientState = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IdentifiedClientState message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.client.v1.IdentifiedClientState + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.client.v1.IdentifiedClientState} IdentifiedClientState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IdentifiedClientState.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IdentifiedClientState message. + * @function verify + * @memberof ibc.core.client.v1.IdentifiedClientState + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IdentifiedClientState.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.clientId != null && message.hasOwnProperty("clientId")) + if (!$util.isString(message.clientId)) + return "clientId: string expected"; + if (message.clientState != null && message.hasOwnProperty("clientState")) { + let error = $root.google.protobuf.Any.verify(message.clientState); + if (error) + return "clientState." + error; + } + return null; + }; + + /** + * Creates an IdentifiedClientState message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.client.v1.IdentifiedClientState + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.client.v1.IdentifiedClientState} IdentifiedClientState + */ + IdentifiedClientState.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.client.v1.IdentifiedClientState) + return object; + let message = new $root.ibc.core.client.v1.IdentifiedClientState(); + if (object.clientId != null) + message.clientId = String(object.clientId); + if (object.clientState != null) { + if (typeof object.clientState !== "object") + throw TypeError(".ibc.core.client.v1.IdentifiedClientState.clientState: object expected"); + message.clientState = $root.google.protobuf.Any.fromObject(object.clientState); + } + return message; + }; + + /** + * Creates a plain object from an IdentifiedClientState message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.client.v1.IdentifiedClientState + * @static + * @param {ibc.core.client.v1.IdentifiedClientState} message IdentifiedClientState + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IdentifiedClientState.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.clientId = ""; + object.clientState = null; + } + if (message.clientId != null && message.hasOwnProperty("clientId")) + object.clientId = message.clientId; + if (message.clientState != null && message.hasOwnProperty("clientState")) + object.clientState = $root.google.protobuf.Any.toObject(message.clientState, options); + return object; + }; + + /** + * Converts this IdentifiedClientState to JSON. + * @function toJSON + * @memberof ibc.core.client.v1.IdentifiedClientState + * @instance + * @returns {Object.} JSON object + */ + IdentifiedClientState.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return IdentifiedClientState; + })(v1.IdentifiedClientState || {}); + + v1.ConsensusStateWithHeight = (function(ConsensusStateWithHeight) { + + /** + * Properties of a ConsensusStateWithHeight. + * @memberof ibc.core.client.v1 + * @interface IConsensusStateWithHeight + * @property {ibc.core.client.v1.IHeight|null} [height] ConsensusStateWithHeight height + * @property {google.protobuf.IAny|null} [consensusState] ConsensusStateWithHeight consensusState + */ + + /** + * Constructs a new ConsensusStateWithHeight. + * @memberof ibc.core.client.v1 + * @classdesc Represents a ConsensusStateWithHeight. + * @implements IConsensusStateWithHeight + * @constructor + * @param {ibc.core.client.v1.IConsensusStateWithHeight=} [properties] Properties to set + */ + function ConsensusStateWithHeight(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ConsensusStateWithHeight height. + * @member {ibc.core.client.v1.IHeight|null|undefined} height + * @memberof ibc.core.client.v1.ConsensusStateWithHeight + * @instance + */ + ConsensusStateWithHeight.prototype.height = null; + + /** + * ConsensusStateWithHeight consensusState. + * @member {google.protobuf.IAny|null|undefined} consensusState + * @memberof ibc.core.client.v1.ConsensusStateWithHeight + * @instance + */ + ConsensusStateWithHeight.prototype.consensusState = null; + + /** + * Creates a new ConsensusStateWithHeight instance using the specified properties. + * @function create + * @memberof ibc.core.client.v1.ConsensusStateWithHeight + * @static + * @param {ibc.core.client.v1.IConsensusStateWithHeight=} [properties] Properties to set + * @returns {ibc.core.client.v1.ConsensusStateWithHeight} ConsensusStateWithHeight instance + */ + ConsensusStateWithHeight.create = function create(properties) { + return new ConsensusStateWithHeight(properties); + }; + + /** + * Encodes the specified ConsensusStateWithHeight message. Does not implicitly {@link ibc.core.client.v1.ConsensusStateWithHeight.verify|verify} messages. + * @function encode + * @memberof ibc.core.client.v1.ConsensusStateWithHeight + * @static + * @param {ibc.core.client.v1.IConsensusStateWithHeight} message ConsensusStateWithHeight message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConsensusStateWithHeight.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.height != null && Object.hasOwnProperty.call(message, "height")) + $root.ibc.core.client.v1.Height.encode(message.height, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.consensusState != null && Object.hasOwnProperty.call(message, "consensusState")) + $root.google.protobuf.Any.encode(message.consensusState, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ConsensusStateWithHeight message, length delimited. Does not implicitly {@link ibc.core.client.v1.ConsensusStateWithHeight.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.client.v1.ConsensusStateWithHeight + * @static + * @param {ibc.core.client.v1.IConsensusStateWithHeight} message ConsensusStateWithHeight message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConsensusStateWithHeight.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConsensusStateWithHeight message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.client.v1.ConsensusStateWithHeight + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.client.v1.ConsensusStateWithHeight} ConsensusStateWithHeight + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConsensusStateWithHeight.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.ConsensusStateWithHeight(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); + break; + case 2: + message.consensusState = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ConsensusStateWithHeight message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.client.v1.ConsensusStateWithHeight + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.client.v1.ConsensusStateWithHeight} ConsensusStateWithHeight + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConsensusStateWithHeight.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConsensusStateWithHeight message. + * @function verify + * @memberof ibc.core.client.v1.ConsensusStateWithHeight + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConsensusStateWithHeight.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.height != null && message.hasOwnProperty("height")) { + let error = $root.ibc.core.client.v1.Height.verify(message.height); + if (error) + return "height." + error; + } + if (message.consensusState != null && message.hasOwnProperty("consensusState")) { + let error = $root.google.protobuf.Any.verify(message.consensusState); + if (error) + return "consensusState." + error; + } + return null; + }; + + /** + * Creates a ConsensusStateWithHeight message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.client.v1.ConsensusStateWithHeight + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.client.v1.ConsensusStateWithHeight} ConsensusStateWithHeight + */ + ConsensusStateWithHeight.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.client.v1.ConsensusStateWithHeight) + return object; + let message = new $root.ibc.core.client.v1.ConsensusStateWithHeight(); + if (object.height != null) { + if (typeof object.height !== "object") + throw TypeError(".ibc.core.client.v1.ConsensusStateWithHeight.height: object expected"); + message.height = $root.ibc.core.client.v1.Height.fromObject(object.height); + } + if (object.consensusState != null) { + if (typeof object.consensusState !== "object") + throw TypeError(".ibc.core.client.v1.ConsensusStateWithHeight.consensusState: object expected"); + message.consensusState = $root.google.protobuf.Any.fromObject(object.consensusState); + } + return message; + }; + + /** + * Creates a plain object from a ConsensusStateWithHeight message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.client.v1.ConsensusStateWithHeight + * @static + * @param {ibc.core.client.v1.ConsensusStateWithHeight} message ConsensusStateWithHeight + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConsensusStateWithHeight.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.height = null; + object.consensusState = null; + } + if (message.height != null && message.hasOwnProperty("height")) + object.height = $root.ibc.core.client.v1.Height.toObject(message.height, options); + if (message.consensusState != null && message.hasOwnProperty("consensusState")) + object.consensusState = $root.google.protobuf.Any.toObject(message.consensusState, options); + return object; + }; + + /** + * Converts this ConsensusStateWithHeight to JSON. + * @function toJSON + * @memberof ibc.core.client.v1.ConsensusStateWithHeight + * @instance + * @returns {Object.} JSON object + */ + ConsensusStateWithHeight.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ConsensusStateWithHeight; + })(v1.ConsensusStateWithHeight || {}); + + v1.ClientConsensusStates = (function(ClientConsensusStates) { + + /** + * Properties of a ClientConsensusStates. + * @memberof ibc.core.client.v1 + * @interface IClientConsensusStates + * @property {string|null} [clientId] ClientConsensusStates clientId + * @property {Array.|null} [consensusStates] ClientConsensusStates consensusStates + */ + + /** + * Constructs a new ClientConsensusStates. + * @memberof ibc.core.client.v1 + * @classdesc Represents a ClientConsensusStates. + * @implements IClientConsensusStates + * @constructor + * @param {ibc.core.client.v1.IClientConsensusStates=} [properties] Properties to set + */ + function ClientConsensusStates(properties) { + this.consensusStates = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ClientConsensusStates clientId. + * @member {string} clientId + * @memberof ibc.core.client.v1.ClientConsensusStates + * @instance + */ + ClientConsensusStates.prototype.clientId = ""; + + /** + * ClientConsensusStates consensusStates. + * @member {Array.} consensusStates + * @memberof ibc.core.client.v1.ClientConsensusStates + * @instance + */ + ClientConsensusStates.prototype.consensusStates = $util.emptyArray; + + /** + * Creates a new ClientConsensusStates instance using the specified properties. + * @function create + * @memberof ibc.core.client.v1.ClientConsensusStates + * @static + * @param {ibc.core.client.v1.IClientConsensusStates=} [properties] Properties to set + * @returns {ibc.core.client.v1.ClientConsensusStates} ClientConsensusStates instance + */ + ClientConsensusStates.create = function create(properties) { + return new ClientConsensusStates(properties); + }; + + /** + * Encodes the specified ClientConsensusStates message. Does not implicitly {@link ibc.core.client.v1.ClientConsensusStates.verify|verify} messages. + * @function encode + * @memberof ibc.core.client.v1.ClientConsensusStates + * @static + * @param {ibc.core.client.v1.IClientConsensusStates} message ClientConsensusStates message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientConsensusStates.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.clientId != null && Object.hasOwnProperty.call(message, "clientId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.clientId); + if (message.consensusStates != null && message.consensusStates.length) + for (let i = 0; i < message.consensusStates.length; ++i) + $root.ibc.core.client.v1.ConsensusStateWithHeight.encode(message.consensusStates[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ClientConsensusStates message, length delimited. Does not implicitly {@link ibc.core.client.v1.ClientConsensusStates.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.client.v1.ClientConsensusStates + * @static + * @param {ibc.core.client.v1.IClientConsensusStates} message ClientConsensusStates message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientConsensusStates.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ClientConsensusStates message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.client.v1.ClientConsensusStates + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.client.v1.ClientConsensusStates} ClientConsensusStates + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientConsensusStates.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.ClientConsensusStates(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.clientId = reader.string(); + break; + case 2: + if (!(message.consensusStates && message.consensusStates.length)) + message.consensusStates = []; + message.consensusStates.push($root.ibc.core.client.v1.ConsensusStateWithHeight.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ClientConsensusStates message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.client.v1.ClientConsensusStates + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.client.v1.ClientConsensusStates} ClientConsensusStates + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientConsensusStates.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ClientConsensusStates message. + * @function verify + * @memberof ibc.core.client.v1.ClientConsensusStates + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ClientConsensusStates.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.clientId != null && message.hasOwnProperty("clientId")) + if (!$util.isString(message.clientId)) + return "clientId: string expected"; + if (message.consensusStates != null && message.hasOwnProperty("consensusStates")) { + if (!Array.isArray(message.consensusStates)) + return "consensusStates: array expected"; + for (let i = 0; i < message.consensusStates.length; ++i) { + let error = $root.ibc.core.client.v1.ConsensusStateWithHeight.verify(message.consensusStates[i]); + if (error) + return "consensusStates." + error; + } + } + return null; + }; + + /** + * Creates a ClientConsensusStates message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.client.v1.ClientConsensusStates + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.client.v1.ClientConsensusStates} ClientConsensusStates + */ + ClientConsensusStates.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.client.v1.ClientConsensusStates) + return object; + let message = new $root.ibc.core.client.v1.ClientConsensusStates(); + if (object.clientId != null) + message.clientId = String(object.clientId); + if (object.consensusStates) { + if (!Array.isArray(object.consensusStates)) + throw TypeError(".ibc.core.client.v1.ClientConsensusStates.consensusStates: array expected"); + message.consensusStates = []; + for (let i = 0; i < object.consensusStates.length; ++i) { + if (typeof object.consensusStates[i] !== "object") + throw TypeError(".ibc.core.client.v1.ClientConsensusStates.consensusStates: object expected"); + message.consensusStates[i] = $root.ibc.core.client.v1.ConsensusStateWithHeight.fromObject(object.consensusStates[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ClientConsensusStates message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.client.v1.ClientConsensusStates + * @static + * @param {ibc.core.client.v1.ClientConsensusStates} message ClientConsensusStates + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ClientConsensusStates.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.consensusStates = []; + if (options.defaults) + object.clientId = ""; + if (message.clientId != null && message.hasOwnProperty("clientId")) + object.clientId = message.clientId; + if (message.consensusStates && message.consensusStates.length) { + object.consensusStates = []; + for (let j = 0; j < message.consensusStates.length; ++j) + object.consensusStates[j] = $root.ibc.core.client.v1.ConsensusStateWithHeight.toObject(message.consensusStates[j], options); + } + return object; + }; + + /** + * Converts this ClientConsensusStates to JSON. + * @function toJSON + * @memberof ibc.core.client.v1.ClientConsensusStates + * @instance + * @returns {Object.} JSON object + */ + ClientConsensusStates.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ClientConsensusStates; + })(v1.ClientConsensusStates || {}); + + v1.ClientUpdateProposal = (function(ClientUpdateProposal) { + + /** + * Properties of a ClientUpdateProposal. + * @memberof ibc.core.client.v1 + * @interface IClientUpdateProposal + * @property {string|null} [title] ClientUpdateProposal title + * @property {string|null} [description] ClientUpdateProposal description + * @property {string|null} [clientId] ClientUpdateProposal clientId + * @property {google.protobuf.IAny|null} [header] ClientUpdateProposal header + */ + + /** + * Constructs a new ClientUpdateProposal. + * @memberof ibc.core.client.v1 + * @classdesc Represents a ClientUpdateProposal. + * @implements IClientUpdateProposal + * @constructor + * @param {ibc.core.client.v1.IClientUpdateProposal=} [properties] Properties to set + */ + function ClientUpdateProposal(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ClientUpdateProposal title. + * @member {string} title + * @memberof ibc.core.client.v1.ClientUpdateProposal + * @instance + */ + ClientUpdateProposal.prototype.title = ""; + + /** + * ClientUpdateProposal description. + * @member {string} description + * @memberof ibc.core.client.v1.ClientUpdateProposal + * @instance + */ + ClientUpdateProposal.prototype.description = ""; + + /** + * ClientUpdateProposal clientId. + * @member {string} clientId + * @memberof ibc.core.client.v1.ClientUpdateProposal + * @instance + */ + ClientUpdateProposal.prototype.clientId = ""; + + /** + * ClientUpdateProposal header. + * @member {google.protobuf.IAny|null|undefined} header + * @memberof ibc.core.client.v1.ClientUpdateProposal + * @instance + */ + ClientUpdateProposal.prototype.header = null; + + /** + * Creates a new ClientUpdateProposal instance using the specified properties. + * @function create + * @memberof ibc.core.client.v1.ClientUpdateProposal + * @static + * @param {ibc.core.client.v1.IClientUpdateProposal=} [properties] Properties to set + * @returns {ibc.core.client.v1.ClientUpdateProposal} ClientUpdateProposal instance + */ + ClientUpdateProposal.create = function create(properties) { + return new ClientUpdateProposal(properties); + }; + + /** + * Encodes the specified ClientUpdateProposal message. Does not implicitly {@link ibc.core.client.v1.ClientUpdateProposal.verify|verify} messages. + * @function encode + * @memberof ibc.core.client.v1.ClientUpdateProposal + * @static + * @param {ibc.core.client.v1.IClientUpdateProposal} message ClientUpdateProposal message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientUpdateProposal.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.title != null && Object.hasOwnProperty.call(message, "title")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.title); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.clientId != null && Object.hasOwnProperty.call(message, "clientId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.clientId); + if (message.header != null && Object.hasOwnProperty.call(message, "header")) + $root.google.protobuf.Any.encode(message.header, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ClientUpdateProposal message, length delimited. Does not implicitly {@link ibc.core.client.v1.ClientUpdateProposal.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.client.v1.ClientUpdateProposal + * @static + * @param {ibc.core.client.v1.IClientUpdateProposal} message ClientUpdateProposal message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientUpdateProposal.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ClientUpdateProposal message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.client.v1.ClientUpdateProposal + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.client.v1.ClientUpdateProposal} ClientUpdateProposal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientUpdateProposal.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.ClientUpdateProposal(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.title = reader.string(); + break; + case 2: + message.description = reader.string(); + break; + case 3: + message.clientId = reader.string(); + break; + case 4: + message.header = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ClientUpdateProposal message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.client.v1.ClientUpdateProposal + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.client.v1.ClientUpdateProposal} ClientUpdateProposal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientUpdateProposal.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ClientUpdateProposal message. + * @function verify + * @memberof ibc.core.client.v1.ClientUpdateProposal + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ClientUpdateProposal.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.title != null && message.hasOwnProperty("title")) + if (!$util.isString(message.title)) + return "title: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.clientId != null && message.hasOwnProperty("clientId")) + if (!$util.isString(message.clientId)) + return "clientId: string expected"; + if (message.header != null && message.hasOwnProperty("header")) { + let error = $root.google.protobuf.Any.verify(message.header); + if (error) + return "header." + error; + } + return null; + }; + + /** + * Creates a ClientUpdateProposal message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.client.v1.ClientUpdateProposal + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.client.v1.ClientUpdateProposal} ClientUpdateProposal + */ + ClientUpdateProposal.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.client.v1.ClientUpdateProposal) + return object; + let message = new $root.ibc.core.client.v1.ClientUpdateProposal(); + if (object.title != null) + message.title = String(object.title); + if (object.description != null) + message.description = String(object.description); + if (object.clientId != null) + message.clientId = String(object.clientId); + if (object.header != null) { + if (typeof object.header !== "object") + throw TypeError(".ibc.core.client.v1.ClientUpdateProposal.header: object expected"); + message.header = $root.google.protobuf.Any.fromObject(object.header); + } + return message; + }; + + /** + * Creates a plain object from a ClientUpdateProposal message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.client.v1.ClientUpdateProposal + * @static + * @param {ibc.core.client.v1.ClientUpdateProposal} message ClientUpdateProposal + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ClientUpdateProposal.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.title = ""; + object.description = ""; + object.clientId = ""; + object.header = null; + } + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.clientId != null && message.hasOwnProperty("clientId")) + object.clientId = message.clientId; + if (message.header != null && message.hasOwnProperty("header")) + object.header = $root.google.protobuf.Any.toObject(message.header, options); + return object; + }; + + /** + * Converts this ClientUpdateProposal to JSON. + * @function toJSON + * @memberof ibc.core.client.v1.ClientUpdateProposal + * @instance + * @returns {Object.} JSON object + */ + ClientUpdateProposal.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ClientUpdateProposal; + })(v1.ClientUpdateProposal || {}); + + v1.Height = (function(Height) { + + /** + * Properties of an Height. + * @memberof ibc.core.client.v1 + * @interface IHeight + * @property {number|Long|null} [revisionNumber] Height revisionNumber + * @property {number|Long|null} [revisionHeight] Height revisionHeight + */ + + /** + * Constructs a new Height. + * @memberof ibc.core.client.v1 + * @classdesc Represents an Height. + * @implements IHeight + * @constructor + * @param {ibc.core.client.v1.IHeight=} [properties] Properties to set + */ + function Height(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Height revisionNumber. + * @member {number|Long} revisionNumber + * @memberof ibc.core.client.v1.Height + * @instance + */ + Height.prototype.revisionNumber = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Height revisionHeight. + * @member {number|Long} revisionHeight + * @memberof ibc.core.client.v1.Height + * @instance + */ + Height.prototype.revisionHeight = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new Height instance using the specified properties. + * @function create + * @memberof ibc.core.client.v1.Height + * @static + * @param {ibc.core.client.v1.IHeight=} [properties] Properties to set + * @returns {ibc.core.client.v1.Height} Height instance + */ + Height.create = function create(properties) { + return new Height(properties); + }; + + /** + * Encodes the specified Height message. Does not implicitly {@link ibc.core.client.v1.Height.verify|verify} messages. + * @function encode + * @memberof ibc.core.client.v1.Height + * @static + * @param {ibc.core.client.v1.IHeight} message Height message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Height.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.revisionNumber != null && Object.hasOwnProperty.call(message, "revisionNumber")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.revisionNumber); + if (message.revisionHeight != null && Object.hasOwnProperty.call(message, "revisionHeight")) + writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.revisionHeight); + return writer; + }; + + /** + * Encodes the specified Height message, length delimited. Does not implicitly {@link ibc.core.client.v1.Height.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.client.v1.Height + * @static + * @param {ibc.core.client.v1.IHeight} message Height message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Height.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Height message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.client.v1.Height + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.client.v1.Height} Height + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Height.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.Height(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.revisionNumber = reader.uint64(); + break; + case 2: + message.revisionHeight = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Height message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.client.v1.Height + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.client.v1.Height} Height + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Height.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Height message. + * @function verify + * @memberof ibc.core.client.v1.Height + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Height.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.revisionNumber != null && message.hasOwnProperty("revisionNumber")) + if (!$util.isInteger(message.revisionNumber) && !(message.revisionNumber && $util.isInteger(message.revisionNumber.low) && $util.isInteger(message.revisionNumber.high))) + return "revisionNumber: integer|Long expected"; + if (message.revisionHeight != null && message.hasOwnProperty("revisionHeight")) + if (!$util.isInteger(message.revisionHeight) && !(message.revisionHeight && $util.isInteger(message.revisionHeight.low) && $util.isInteger(message.revisionHeight.high))) + return "revisionHeight: integer|Long expected"; + return null; + }; + + /** + * Creates an Height message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.client.v1.Height + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.client.v1.Height} Height + */ + Height.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.client.v1.Height) + return object; + let message = new $root.ibc.core.client.v1.Height(); + if (object.revisionNumber != null) + if ($util.Long) + (message.revisionNumber = $util.Long.fromValue(object.revisionNumber)).unsigned = true; + else if (typeof object.revisionNumber === "string") + message.revisionNumber = parseInt(object.revisionNumber, 10); + else if (typeof object.revisionNumber === "number") + message.revisionNumber = object.revisionNumber; + else if (typeof object.revisionNumber === "object") + message.revisionNumber = new $util.LongBits(object.revisionNumber.low >>> 0, object.revisionNumber.high >>> 0).toNumber(true); + if (object.revisionHeight != null) + if ($util.Long) + (message.revisionHeight = $util.Long.fromValue(object.revisionHeight)).unsigned = true; + else if (typeof object.revisionHeight === "string") + message.revisionHeight = parseInt(object.revisionHeight, 10); + else if (typeof object.revisionHeight === "number") + message.revisionHeight = object.revisionHeight; + else if (typeof object.revisionHeight === "object") + message.revisionHeight = new $util.LongBits(object.revisionHeight.low >>> 0, object.revisionHeight.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from an Height message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.client.v1.Height + * @static + * @param {ibc.core.client.v1.Height} message Height + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Height.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.revisionNumber = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.revisionNumber = options.longs === String ? "0" : 0; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.revisionHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.revisionHeight = options.longs === String ? "0" : 0; + } + if (message.revisionNumber != null && message.hasOwnProperty("revisionNumber")) + if (typeof message.revisionNumber === "number") + object.revisionNumber = options.longs === String ? String(message.revisionNumber) : message.revisionNumber; + else + object.revisionNumber = options.longs === String ? $util.Long.prototype.toString.call(message.revisionNumber) : options.longs === Number ? new $util.LongBits(message.revisionNumber.low >>> 0, message.revisionNumber.high >>> 0).toNumber(true) : message.revisionNumber; + if (message.revisionHeight != null && message.hasOwnProperty("revisionHeight")) + if (typeof message.revisionHeight === "number") + object.revisionHeight = options.longs === String ? String(message.revisionHeight) : message.revisionHeight; + else + object.revisionHeight = options.longs === String ? $util.Long.prototype.toString.call(message.revisionHeight) : options.longs === Number ? new $util.LongBits(message.revisionHeight.low >>> 0, message.revisionHeight.high >>> 0).toNumber(true) : message.revisionHeight; + return object; + }; + + /** + * Converts this Height to JSON. + * @function toJSON + * @memberof ibc.core.client.v1.Height + * @instance + * @returns {Object.} JSON object + */ + Height.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Height; + })(v1.Height || {}); + + v1.Params = (function(Params) { + + /** + * Properties of a Params. + * @memberof ibc.core.client.v1 + * @interface IParams + * @property {Array.|null} [allowedClients] Params allowedClients + */ + + /** + * Constructs a new Params. + * @memberof ibc.core.client.v1 + * @classdesc Represents a Params. + * @implements IParams + * @constructor + * @param {ibc.core.client.v1.IParams=} [properties] Properties to set + */ + function Params(properties) { + this.allowedClients = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Params allowedClients. + * @member {Array.} allowedClients + * @memberof ibc.core.client.v1.Params + * @instance + */ + Params.prototype.allowedClients = $util.emptyArray; + + /** + * Creates a new Params instance using the specified properties. + * @function create + * @memberof ibc.core.client.v1.Params + * @static + * @param {ibc.core.client.v1.IParams=} [properties] Properties to set + * @returns {ibc.core.client.v1.Params} Params instance + */ + Params.create = function create(properties) { + return new Params(properties); + }; + + /** + * Encodes the specified Params message. Does not implicitly {@link ibc.core.client.v1.Params.verify|verify} messages. + * @function encode + * @memberof ibc.core.client.v1.Params + * @static + * @param {ibc.core.client.v1.IParams} message Params message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Params.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.allowedClients != null && message.allowedClients.length) + for (let i = 0; i < message.allowedClients.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.allowedClients[i]); + return writer; + }; + + /** + * Encodes the specified Params message, length delimited. Does not implicitly {@link ibc.core.client.v1.Params.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.client.v1.Params + * @static + * @param {ibc.core.client.v1.IParams} message Params message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Params.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Params message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.client.v1.Params + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.client.v1.Params} Params + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Params.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.Params(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.allowedClients && message.allowedClients.length)) + message.allowedClients = []; + message.allowedClients.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Params message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.client.v1.Params + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.client.v1.Params} Params + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Params.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Params message. + * @function verify + * @memberof ibc.core.client.v1.Params + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Params.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.allowedClients != null && message.hasOwnProperty("allowedClients")) { + if (!Array.isArray(message.allowedClients)) + return "allowedClients: array expected"; + for (let i = 0; i < message.allowedClients.length; ++i) + if (!$util.isString(message.allowedClients[i])) + return "allowedClients: string[] expected"; + } + return null; + }; + + /** + * Creates a Params message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.client.v1.Params + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.client.v1.Params} Params + */ + Params.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.client.v1.Params) + return object; + let message = new $root.ibc.core.client.v1.Params(); + if (object.allowedClients) { + if (!Array.isArray(object.allowedClients)) + throw TypeError(".ibc.core.client.v1.Params.allowedClients: array expected"); + message.allowedClients = []; + for (let i = 0; i < object.allowedClients.length; ++i) + message.allowedClients[i] = String(object.allowedClients[i]); + } + return message; + }; + + /** + * Creates a plain object from a Params message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.client.v1.Params + * @static + * @param {ibc.core.client.v1.Params} message Params + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Params.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.allowedClients = []; + if (message.allowedClients && message.allowedClients.length) { + object.allowedClients = []; + for (let j = 0; j < message.allowedClients.length; ++j) + object.allowedClients[j] = message.allowedClients[j]; + } + return object; + }; + + /** + * Converts this Params to JSON. + * @function toJSON + * @memberof ibc.core.client.v1.Params + * @instance + * @returns {Object.} JSON object + */ + Params.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Params; + })(v1.Params || {}); + + v1.GenesisState = (function(GenesisState) { + + /** + * Properties of a GenesisState. + * @memberof ibc.core.client.v1 + * @interface IGenesisState + * @property {Array.|null} [clients] GenesisState clients + * @property {Array.|null} [clientsConsensus] GenesisState clientsConsensus + * @property {Array.|null} [clientsMetadata] GenesisState clientsMetadata + * @property {ibc.core.client.v1.IParams|null} [params] GenesisState params + * @property {boolean|null} [createLocalhost] GenesisState createLocalhost + * @property {number|Long|null} [nextClientSequence] GenesisState nextClientSequence + */ + + /** + * Constructs a new GenesisState. + * @memberof ibc.core.client.v1 + * @classdesc Represents a GenesisState. + * @implements IGenesisState + * @constructor + * @param {ibc.core.client.v1.IGenesisState=} [properties] Properties to set + */ + function GenesisState(properties) { + this.clients = []; + this.clientsConsensus = []; + this.clientsMetadata = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GenesisState clients. + * @member {Array.} clients + * @memberof ibc.core.client.v1.GenesisState + * @instance + */ + GenesisState.prototype.clients = $util.emptyArray; + + /** + * GenesisState clientsConsensus. + * @member {Array.} clientsConsensus + * @memberof ibc.core.client.v1.GenesisState + * @instance + */ + GenesisState.prototype.clientsConsensus = $util.emptyArray; + + /** + * GenesisState clientsMetadata. + * @member {Array.} clientsMetadata + * @memberof ibc.core.client.v1.GenesisState + * @instance + */ + GenesisState.prototype.clientsMetadata = $util.emptyArray; + + /** + * GenesisState params. + * @member {ibc.core.client.v1.IParams|null|undefined} params + * @memberof ibc.core.client.v1.GenesisState + * @instance + */ + GenesisState.prototype.params = null; + + /** + * GenesisState createLocalhost. + * @member {boolean} createLocalhost + * @memberof ibc.core.client.v1.GenesisState + * @instance + */ + GenesisState.prototype.createLocalhost = false; + + /** + * GenesisState nextClientSequence. + * @member {number|Long} nextClientSequence + * @memberof ibc.core.client.v1.GenesisState + * @instance + */ + GenesisState.prototype.nextClientSequence = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new GenesisState instance using the specified properties. + * @function create + * @memberof ibc.core.client.v1.GenesisState + * @static + * @param {ibc.core.client.v1.IGenesisState=} [properties] Properties to set + * @returns {ibc.core.client.v1.GenesisState} GenesisState instance + */ + GenesisState.create = function create(properties) { + return new GenesisState(properties); + }; + + /** + * Encodes the specified GenesisState message. Does not implicitly {@link ibc.core.client.v1.GenesisState.verify|verify} messages. + * @function encode + * @memberof ibc.core.client.v1.GenesisState + * @static + * @param {ibc.core.client.v1.IGenesisState} message GenesisState message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenesisState.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.clients != null && message.clients.length) + for (let i = 0; i < message.clients.length; ++i) + $root.ibc.core.client.v1.IdentifiedClientState.encode(message.clients[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.clientsConsensus != null && message.clientsConsensus.length) + for (let i = 0; i < message.clientsConsensus.length; ++i) + $root.ibc.core.client.v1.ClientConsensusStates.encode(message.clientsConsensus[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.clientsMetadata != null && message.clientsMetadata.length) + for (let i = 0; i < message.clientsMetadata.length; ++i) + $root.ibc.core.client.v1.IdentifiedGenesisMetadata.encode(message.clientsMetadata[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.params != null && Object.hasOwnProperty.call(message, "params")) + $root.ibc.core.client.v1.Params.encode(message.params, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.createLocalhost != null && Object.hasOwnProperty.call(message, "createLocalhost")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.createLocalhost); + if (message.nextClientSequence != null && Object.hasOwnProperty.call(message, "nextClientSequence")) + writer.uint32(/* id 6, wireType 0 =*/48).uint64(message.nextClientSequence); + return writer; + }; + + /** + * Encodes the specified GenesisState message, length delimited. Does not implicitly {@link ibc.core.client.v1.GenesisState.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.client.v1.GenesisState + * @static + * @param {ibc.core.client.v1.IGenesisState} message GenesisState message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenesisState.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GenesisState message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.client.v1.GenesisState + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.client.v1.GenesisState} GenesisState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenesisState.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.GenesisState(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.clients && message.clients.length)) + message.clients = []; + message.clients.push($root.ibc.core.client.v1.IdentifiedClientState.decode(reader, reader.uint32())); + break; + case 2: + if (!(message.clientsConsensus && message.clientsConsensus.length)) + message.clientsConsensus = []; + message.clientsConsensus.push($root.ibc.core.client.v1.ClientConsensusStates.decode(reader, reader.uint32())); + break; + case 3: + if (!(message.clientsMetadata && message.clientsMetadata.length)) + message.clientsMetadata = []; + message.clientsMetadata.push($root.ibc.core.client.v1.IdentifiedGenesisMetadata.decode(reader, reader.uint32())); + break; + case 4: + message.params = $root.ibc.core.client.v1.Params.decode(reader, reader.uint32()); + break; + case 5: + message.createLocalhost = reader.bool(); + break; + case 6: + message.nextClientSequence = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GenesisState message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.client.v1.GenesisState + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.client.v1.GenesisState} GenesisState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenesisState.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GenesisState message. + * @function verify + * @memberof ibc.core.client.v1.GenesisState + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GenesisState.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.clients != null && message.hasOwnProperty("clients")) { + if (!Array.isArray(message.clients)) + return "clients: array expected"; + for (let i = 0; i < message.clients.length; ++i) { + let error = $root.ibc.core.client.v1.IdentifiedClientState.verify(message.clients[i]); + if (error) + return "clients." + error; + } + } + if (message.clientsConsensus != null && message.hasOwnProperty("clientsConsensus")) { + if (!Array.isArray(message.clientsConsensus)) + return "clientsConsensus: array expected"; + for (let i = 0; i < message.clientsConsensus.length; ++i) { + let error = $root.ibc.core.client.v1.ClientConsensusStates.verify(message.clientsConsensus[i]); + if (error) + return "clientsConsensus." + error; + } + } + if (message.clientsMetadata != null && message.hasOwnProperty("clientsMetadata")) { + if (!Array.isArray(message.clientsMetadata)) + return "clientsMetadata: array expected"; + for (let i = 0; i < message.clientsMetadata.length; ++i) { + let error = $root.ibc.core.client.v1.IdentifiedGenesisMetadata.verify(message.clientsMetadata[i]); + if (error) + return "clientsMetadata." + error; + } + } + if (message.params != null && message.hasOwnProperty("params")) { + let error = $root.ibc.core.client.v1.Params.verify(message.params); + if (error) + return "params." + error; + } + if (message.createLocalhost != null && message.hasOwnProperty("createLocalhost")) + if (typeof message.createLocalhost !== "boolean") + return "createLocalhost: boolean expected"; + if (message.nextClientSequence != null && message.hasOwnProperty("nextClientSequence")) + if (!$util.isInteger(message.nextClientSequence) && !(message.nextClientSequence && $util.isInteger(message.nextClientSequence.low) && $util.isInteger(message.nextClientSequence.high))) + return "nextClientSequence: integer|Long expected"; + return null; + }; + + /** + * Creates a GenesisState message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.client.v1.GenesisState + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.client.v1.GenesisState} GenesisState + */ + GenesisState.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.client.v1.GenesisState) + return object; + let message = new $root.ibc.core.client.v1.GenesisState(); + if (object.clients) { + if (!Array.isArray(object.clients)) + throw TypeError(".ibc.core.client.v1.GenesisState.clients: array expected"); + message.clients = []; + for (let i = 0; i < object.clients.length; ++i) { + if (typeof object.clients[i] !== "object") + throw TypeError(".ibc.core.client.v1.GenesisState.clients: object expected"); + message.clients[i] = $root.ibc.core.client.v1.IdentifiedClientState.fromObject(object.clients[i]); + } + } + if (object.clientsConsensus) { + if (!Array.isArray(object.clientsConsensus)) + throw TypeError(".ibc.core.client.v1.GenesisState.clientsConsensus: array expected"); + message.clientsConsensus = []; + for (let i = 0; i < object.clientsConsensus.length; ++i) { + if (typeof object.clientsConsensus[i] !== "object") + throw TypeError(".ibc.core.client.v1.GenesisState.clientsConsensus: object expected"); + message.clientsConsensus[i] = $root.ibc.core.client.v1.ClientConsensusStates.fromObject(object.clientsConsensus[i]); + } + } + if (object.clientsMetadata) { + if (!Array.isArray(object.clientsMetadata)) + throw TypeError(".ibc.core.client.v1.GenesisState.clientsMetadata: array expected"); + message.clientsMetadata = []; + for (let i = 0; i < object.clientsMetadata.length; ++i) { + if (typeof object.clientsMetadata[i] !== "object") + throw TypeError(".ibc.core.client.v1.GenesisState.clientsMetadata: object expected"); + message.clientsMetadata[i] = $root.ibc.core.client.v1.IdentifiedGenesisMetadata.fromObject(object.clientsMetadata[i]); + } + } + if (object.params != null) { + if (typeof object.params !== "object") + throw TypeError(".ibc.core.client.v1.GenesisState.params: object expected"); + message.params = $root.ibc.core.client.v1.Params.fromObject(object.params); + } + if (object.createLocalhost != null) + message.createLocalhost = Boolean(object.createLocalhost); + if (object.nextClientSequence != null) + if ($util.Long) + (message.nextClientSequence = $util.Long.fromValue(object.nextClientSequence)).unsigned = true; + else if (typeof object.nextClientSequence === "string") + message.nextClientSequence = parseInt(object.nextClientSequence, 10); + else if (typeof object.nextClientSequence === "number") + message.nextClientSequence = object.nextClientSequence; + else if (typeof object.nextClientSequence === "object") + message.nextClientSequence = new $util.LongBits(object.nextClientSequence.low >>> 0, object.nextClientSequence.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a GenesisState message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.client.v1.GenesisState + * @static + * @param {ibc.core.client.v1.GenesisState} message GenesisState + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GenesisState.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) { + object.clients = []; + object.clientsConsensus = []; + object.clientsMetadata = []; + } + if (options.defaults) { + object.params = null; + object.createLocalhost = false; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.nextClientSequence = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.nextClientSequence = options.longs === String ? "0" : 0; + } + if (message.clients && message.clients.length) { + object.clients = []; + for (let j = 0; j < message.clients.length; ++j) + object.clients[j] = $root.ibc.core.client.v1.IdentifiedClientState.toObject(message.clients[j], options); + } + if (message.clientsConsensus && message.clientsConsensus.length) { + object.clientsConsensus = []; + for (let j = 0; j < message.clientsConsensus.length; ++j) + object.clientsConsensus[j] = $root.ibc.core.client.v1.ClientConsensusStates.toObject(message.clientsConsensus[j], options); + } + if (message.clientsMetadata && message.clientsMetadata.length) { + object.clientsMetadata = []; + for (let j = 0; j < message.clientsMetadata.length; ++j) + object.clientsMetadata[j] = $root.ibc.core.client.v1.IdentifiedGenesisMetadata.toObject(message.clientsMetadata[j], options); + } + if (message.params != null && message.hasOwnProperty("params")) + object.params = $root.ibc.core.client.v1.Params.toObject(message.params, options); + if (message.createLocalhost != null && message.hasOwnProperty("createLocalhost")) + object.createLocalhost = message.createLocalhost; + if (message.nextClientSequence != null && message.hasOwnProperty("nextClientSequence")) + if (typeof message.nextClientSequence === "number") + object.nextClientSequence = options.longs === String ? String(message.nextClientSequence) : message.nextClientSequence; + else + object.nextClientSequence = options.longs === String ? $util.Long.prototype.toString.call(message.nextClientSequence) : options.longs === Number ? new $util.LongBits(message.nextClientSequence.low >>> 0, message.nextClientSequence.high >>> 0).toNumber(true) : message.nextClientSequence; + return object; + }; + + /** + * Converts this GenesisState to JSON. + * @function toJSON + * @memberof ibc.core.client.v1.GenesisState + * @instance + * @returns {Object.} JSON object + */ + GenesisState.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GenesisState; + })(v1.GenesisState || {}); + + v1.GenesisMetadata = (function(GenesisMetadata) { + + /** + * Properties of a GenesisMetadata. + * @memberof ibc.core.client.v1 + * @interface IGenesisMetadata + * @property {Uint8Array|null} [key] GenesisMetadata key + * @property {Uint8Array|null} [value] GenesisMetadata value + */ + + /** + * Constructs a new GenesisMetadata. + * @memberof ibc.core.client.v1 + * @classdesc Represents a GenesisMetadata. + * @implements IGenesisMetadata + * @constructor + * @param {ibc.core.client.v1.IGenesisMetadata=} [properties] Properties to set + */ + function GenesisMetadata(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GenesisMetadata key. + * @member {Uint8Array} key + * @memberof ibc.core.client.v1.GenesisMetadata + * @instance + */ + GenesisMetadata.prototype.key = $util.newBuffer([]); + + /** + * GenesisMetadata value. + * @member {Uint8Array} value + * @memberof ibc.core.client.v1.GenesisMetadata + * @instance + */ + GenesisMetadata.prototype.value = $util.newBuffer([]); + + /** + * Creates a new GenesisMetadata instance using the specified properties. + * @function create + * @memberof ibc.core.client.v1.GenesisMetadata + * @static + * @param {ibc.core.client.v1.IGenesisMetadata=} [properties] Properties to set + * @returns {ibc.core.client.v1.GenesisMetadata} GenesisMetadata instance + */ + GenesisMetadata.create = function create(properties) { + return new GenesisMetadata(properties); + }; + + /** + * Encodes the specified GenesisMetadata message. Does not implicitly {@link ibc.core.client.v1.GenesisMetadata.verify|verify} messages. + * @function encode + * @memberof ibc.core.client.v1.GenesisMetadata + * @static + * @param {ibc.core.client.v1.IGenesisMetadata} message GenesisMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenesisMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.key); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); + return writer; + }; + + /** + * Encodes the specified GenesisMetadata message, length delimited. Does not implicitly {@link ibc.core.client.v1.GenesisMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.client.v1.GenesisMetadata + * @static + * @param {ibc.core.client.v1.IGenesisMetadata} message GenesisMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenesisMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GenesisMetadata message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.client.v1.GenesisMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.client.v1.GenesisMetadata} GenesisMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenesisMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.GenesisMetadata(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.key = reader.bytes(); + break; + case 2: + message.value = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GenesisMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.client.v1.GenesisMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.client.v1.GenesisMetadata} GenesisMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenesisMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GenesisMetadata message. + * @function verify + * @memberof ibc.core.client.v1.GenesisMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GenesisMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.key != null && message.hasOwnProperty("key")) + if (!(message.key && typeof message.key.length === "number" || $util.isString(message.key))) + return "key: buffer expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; + return null; + }; + + /** + * Creates a GenesisMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.client.v1.GenesisMetadata + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.client.v1.GenesisMetadata} GenesisMetadata + */ + GenesisMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.client.v1.GenesisMetadata) + return object; + let message = new $root.ibc.core.client.v1.GenesisMetadata(); + if (object.key != null) + if (typeof object.key === "string") + $util.base64.decode(object.key, message.key = $util.newBuffer($util.base64.length(object.key)), 0); + else if (object.key.length) + message.key = object.key; + if (object.value != null) + if (typeof object.value === "string") + $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); + else if (object.value.length) + message.value = object.value; + return message; + }; + + /** + * Creates a plain object from a GenesisMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.client.v1.GenesisMetadata + * @static + * @param {ibc.core.client.v1.GenesisMetadata} message GenesisMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GenesisMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + if (options.bytes === String) + object.key = ""; + else { + object.key = []; + if (options.bytes !== Array) + object.key = $util.newBuffer(object.key); + } + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + } + if (message.key != null && message.hasOwnProperty("key")) + object.key = options.bytes === String ? $util.base64.encode(message.key, 0, message.key.length) : options.bytes === Array ? Array.prototype.slice.call(message.key) : message.key; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + return object; + }; + + /** + * Converts this GenesisMetadata to JSON. + * @function toJSON + * @memberof ibc.core.client.v1.GenesisMetadata + * @instance + * @returns {Object.} JSON object + */ + GenesisMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GenesisMetadata; + })(v1.GenesisMetadata || {}); + + v1.IdentifiedGenesisMetadata = (function(IdentifiedGenesisMetadata) { + + /** + * Properties of an IdentifiedGenesisMetadata. + * @memberof ibc.core.client.v1 + * @interface IIdentifiedGenesisMetadata + * @property {string|null} [clientId] IdentifiedGenesisMetadata clientId + * @property {Array.|null} [clientMetadata] IdentifiedGenesisMetadata clientMetadata + */ + + /** + * Constructs a new IdentifiedGenesisMetadata. + * @memberof ibc.core.client.v1 + * @classdesc Represents an IdentifiedGenesisMetadata. + * @implements IIdentifiedGenesisMetadata + * @constructor + * @param {ibc.core.client.v1.IIdentifiedGenesisMetadata=} [properties] Properties to set + */ + function IdentifiedGenesisMetadata(properties) { + this.clientMetadata = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * IdentifiedGenesisMetadata clientId. + * @member {string} clientId + * @memberof ibc.core.client.v1.IdentifiedGenesisMetadata + * @instance + */ + IdentifiedGenesisMetadata.prototype.clientId = ""; + + /** + * IdentifiedGenesisMetadata clientMetadata. + * @member {Array.} clientMetadata + * @memberof ibc.core.client.v1.IdentifiedGenesisMetadata + * @instance + */ + IdentifiedGenesisMetadata.prototype.clientMetadata = $util.emptyArray; + + /** + * Creates a new IdentifiedGenesisMetadata instance using the specified properties. + * @function create + * @memberof ibc.core.client.v1.IdentifiedGenesisMetadata + * @static + * @param {ibc.core.client.v1.IIdentifiedGenesisMetadata=} [properties] Properties to set + * @returns {ibc.core.client.v1.IdentifiedGenesisMetadata} IdentifiedGenesisMetadata instance + */ + IdentifiedGenesisMetadata.create = function create(properties) { + return new IdentifiedGenesisMetadata(properties); + }; + + /** + * Encodes the specified IdentifiedGenesisMetadata message. Does not implicitly {@link ibc.core.client.v1.IdentifiedGenesisMetadata.verify|verify} messages. + * @function encode + * @memberof ibc.core.client.v1.IdentifiedGenesisMetadata + * @static + * @param {ibc.core.client.v1.IIdentifiedGenesisMetadata} message IdentifiedGenesisMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IdentifiedGenesisMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.clientId != null && Object.hasOwnProperty.call(message, "clientId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.clientId); + if (message.clientMetadata != null && message.clientMetadata.length) + for (let i = 0; i < message.clientMetadata.length; ++i) + $root.ibc.core.client.v1.GenesisMetadata.encode(message.clientMetadata[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified IdentifiedGenesisMetadata message, length delimited. Does not implicitly {@link ibc.core.client.v1.IdentifiedGenesisMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.client.v1.IdentifiedGenesisMetadata + * @static + * @param {ibc.core.client.v1.IIdentifiedGenesisMetadata} message IdentifiedGenesisMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IdentifiedGenesisMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IdentifiedGenesisMetadata message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.client.v1.IdentifiedGenesisMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.client.v1.IdentifiedGenesisMetadata} IdentifiedGenesisMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IdentifiedGenesisMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.IdentifiedGenesisMetadata(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.clientId = reader.string(); + break; + case 2: + if (!(message.clientMetadata && message.clientMetadata.length)) + message.clientMetadata = []; + message.clientMetadata.push($root.ibc.core.client.v1.GenesisMetadata.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IdentifiedGenesisMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.client.v1.IdentifiedGenesisMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.client.v1.IdentifiedGenesisMetadata} IdentifiedGenesisMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IdentifiedGenesisMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IdentifiedGenesisMetadata message. + * @function verify + * @memberof ibc.core.client.v1.IdentifiedGenesisMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IdentifiedGenesisMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.clientId != null && message.hasOwnProperty("clientId")) + if (!$util.isString(message.clientId)) + return "clientId: string expected"; + if (message.clientMetadata != null && message.hasOwnProperty("clientMetadata")) { + if (!Array.isArray(message.clientMetadata)) + return "clientMetadata: array expected"; + for (let i = 0; i < message.clientMetadata.length; ++i) { + let error = $root.ibc.core.client.v1.GenesisMetadata.verify(message.clientMetadata[i]); + if (error) + return "clientMetadata." + error; + } + } + return null; + }; + + /** + * Creates an IdentifiedGenesisMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.client.v1.IdentifiedGenesisMetadata + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.client.v1.IdentifiedGenesisMetadata} IdentifiedGenesisMetadata + */ + IdentifiedGenesisMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.client.v1.IdentifiedGenesisMetadata) + return object; + let message = new $root.ibc.core.client.v1.IdentifiedGenesisMetadata(); + if (object.clientId != null) + message.clientId = String(object.clientId); + if (object.clientMetadata) { + if (!Array.isArray(object.clientMetadata)) + throw TypeError(".ibc.core.client.v1.IdentifiedGenesisMetadata.clientMetadata: array expected"); + message.clientMetadata = []; + for (let i = 0; i < object.clientMetadata.length; ++i) { + if (typeof object.clientMetadata[i] !== "object") + throw TypeError(".ibc.core.client.v1.IdentifiedGenesisMetadata.clientMetadata: object expected"); + message.clientMetadata[i] = $root.ibc.core.client.v1.GenesisMetadata.fromObject(object.clientMetadata[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an IdentifiedGenesisMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.client.v1.IdentifiedGenesisMetadata + * @static + * @param {ibc.core.client.v1.IdentifiedGenesisMetadata} message IdentifiedGenesisMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IdentifiedGenesisMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.clientMetadata = []; + if (options.defaults) + object.clientId = ""; + if (message.clientId != null && message.hasOwnProperty("clientId")) + object.clientId = message.clientId; + if (message.clientMetadata && message.clientMetadata.length) { + object.clientMetadata = []; + for (let j = 0; j < message.clientMetadata.length; ++j) + object.clientMetadata[j] = $root.ibc.core.client.v1.GenesisMetadata.toObject(message.clientMetadata[j], options); + } + return object; + }; + + /** + * Converts this IdentifiedGenesisMetadata to JSON. + * @function toJSON + * @memberof ibc.core.client.v1.IdentifiedGenesisMetadata + * @instance + * @returns {Object.} JSON object + */ + IdentifiedGenesisMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return IdentifiedGenesisMetadata; + })(v1.IdentifiedGenesisMetadata || {}); + + v1.Query = (function(Query) { + + /** + * Constructs a new Query service. + * @memberof ibc.core.client.v1 + * @classdesc Represents a Query + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Query(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Query.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Query; + + /** + * Creates new Query service using the specified rpc implementation. + * @function create + * @memberof ibc.core.client.v1.Query + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Query} RPC service. Useful where requests and/or responses are streamed. + */ + Query.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link ibc.core.client.v1.Query#clientState}. + * @memberof ibc.core.client.v1.Query + * @typedef ClientStateCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {ibc.core.client.v1.IQueryClientStateResponse} [response] QueryClientStateResponse + */ + + /** + * Calls ClientState. + * @function clientState + * @memberof ibc.core.client.v1.Query + * @instance + * @param {ibc.core.client.v1.IQueryClientStateRequest} request QueryClientStateRequest message or plain object + * @param {ibc.core.client.v1.Query.ClientStateCallback} callback Node-style callback called with the error, if any, and QueryClientStateResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.clientState = function clientState(request, callback) { + return this.rpcCall(clientState, $root.ibc.core.client.v1.QueryClientStateRequest, $root.ibc.core.client.v1.QueryClientStateResponse, request, callback); + }, "name", { value: "ClientState" }); + + /** + * Calls ClientState. + * @function clientState + * @memberof ibc.core.client.v1.Query + * @instance + * @param {ibc.core.client.v1.IQueryClientStateRequest} request QueryClientStateRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link ibc.core.client.v1.Query#clientStates}. + * @memberof ibc.core.client.v1.Query + * @typedef ClientStatesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {ibc.core.client.v1.IQueryClientStatesResponse} [response] QueryClientStatesResponse + */ + + /** + * Calls ClientStates. + * @function clientStates + * @memberof ibc.core.client.v1.Query + * @instance + * @param {ibc.core.client.v1.IQueryClientStatesRequest} request QueryClientStatesRequest message or plain object + * @param {ibc.core.client.v1.Query.ClientStatesCallback} callback Node-style callback called with the error, if any, and QueryClientStatesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.clientStates = function clientStates(request, callback) { + return this.rpcCall(clientStates, $root.ibc.core.client.v1.QueryClientStatesRequest, $root.ibc.core.client.v1.QueryClientStatesResponse, request, callback); + }, "name", { value: "ClientStates" }); + + /** + * Calls ClientStates. + * @function clientStates + * @memberof ibc.core.client.v1.Query + * @instance + * @param {ibc.core.client.v1.IQueryClientStatesRequest} request QueryClientStatesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link ibc.core.client.v1.Query#consensusState}. + * @memberof ibc.core.client.v1.Query + * @typedef ConsensusStateCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {ibc.core.client.v1.IQueryConsensusStateResponse} [response] QueryConsensusStateResponse + */ + + /** + * Calls ConsensusState. + * @function consensusState + * @memberof ibc.core.client.v1.Query + * @instance + * @param {ibc.core.client.v1.IQueryConsensusStateRequest} request QueryConsensusStateRequest message or plain object + * @param {ibc.core.client.v1.Query.ConsensusStateCallback} callback Node-style callback called with the error, if any, and QueryConsensusStateResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.consensusState = function consensusState(request, callback) { + return this.rpcCall(consensusState, $root.ibc.core.client.v1.QueryConsensusStateRequest, $root.ibc.core.client.v1.QueryConsensusStateResponse, request, callback); + }, "name", { value: "ConsensusState" }); + + /** + * Calls ConsensusState. + * @function consensusState + * @memberof ibc.core.client.v1.Query + * @instance + * @param {ibc.core.client.v1.IQueryConsensusStateRequest} request QueryConsensusStateRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link ibc.core.client.v1.Query#consensusStates}. + * @memberof ibc.core.client.v1.Query + * @typedef ConsensusStatesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {ibc.core.client.v1.IQueryConsensusStatesResponse} [response] QueryConsensusStatesResponse + */ + + /** + * Calls ConsensusStates. + * @function consensusStates + * @memberof ibc.core.client.v1.Query + * @instance + * @param {ibc.core.client.v1.IQueryConsensusStatesRequest} request QueryConsensusStatesRequest message or plain object + * @param {ibc.core.client.v1.Query.ConsensusStatesCallback} callback Node-style callback called with the error, if any, and QueryConsensusStatesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.consensusStates = function consensusStates(request, callback) { + return this.rpcCall(consensusStates, $root.ibc.core.client.v1.QueryConsensusStatesRequest, $root.ibc.core.client.v1.QueryConsensusStatesResponse, request, callback); + }, "name", { value: "ConsensusStates" }); + + /** + * Calls ConsensusStates. + * @function consensusStates + * @memberof ibc.core.client.v1.Query + * @instance + * @param {ibc.core.client.v1.IQueryConsensusStatesRequest} request QueryConsensusStatesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link ibc.core.client.v1.Query#clientParams}. + * @memberof ibc.core.client.v1.Query + * @typedef ClientParamsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {ibc.core.client.v1.IQueryClientParamsResponse} [response] QueryClientParamsResponse + */ + + /** + * Calls ClientParams. + * @function clientParams + * @memberof ibc.core.client.v1.Query + * @instance + * @param {ibc.core.client.v1.IQueryClientParamsRequest} request QueryClientParamsRequest message or plain object + * @param {ibc.core.client.v1.Query.ClientParamsCallback} callback Node-style callback called with the error, if any, and QueryClientParamsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.clientParams = function clientParams(request, callback) { + return this.rpcCall(clientParams, $root.ibc.core.client.v1.QueryClientParamsRequest, $root.ibc.core.client.v1.QueryClientParamsResponse, request, callback); + }, "name", { value: "ClientParams" }); + + /** + * Calls ClientParams. + * @function clientParams + * @memberof ibc.core.client.v1.Query + * @instance + * @param {ibc.core.client.v1.IQueryClientParamsRequest} request QueryClientParamsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Query; + })(v1.Query || {}); + + v1.QueryClientStateRequest = (function(QueryClientStateRequest) { + + /** + * Properties of a QueryClientStateRequest. + * @memberof ibc.core.client.v1 + * @interface IQueryClientStateRequest + * @property {string|null} [clientId] QueryClientStateRequest clientId + */ + + /** + * Constructs a new QueryClientStateRequest. + * @memberof ibc.core.client.v1 + * @classdesc Represents a QueryClientStateRequest. + * @implements IQueryClientStateRequest + * @constructor + * @param {ibc.core.client.v1.IQueryClientStateRequest=} [properties] Properties to set + */ + function QueryClientStateRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryClientStateRequest clientId. + * @member {string} clientId + * @memberof ibc.core.client.v1.QueryClientStateRequest + * @instance + */ + QueryClientStateRequest.prototype.clientId = ""; + + /** + * Creates a new QueryClientStateRequest instance using the specified properties. + * @function create + * @memberof ibc.core.client.v1.QueryClientStateRequest + * @static + * @param {ibc.core.client.v1.IQueryClientStateRequest=} [properties] Properties to set + * @returns {ibc.core.client.v1.QueryClientStateRequest} QueryClientStateRequest instance + */ + QueryClientStateRequest.create = function create(properties) { + return new QueryClientStateRequest(properties); + }; + + /** + * Encodes the specified QueryClientStateRequest message. Does not implicitly {@link ibc.core.client.v1.QueryClientStateRequest.verify|verify} messages. + * @function encode + * @memberof ibc.core.client.v1.QueryClientStateRequest + * @static + * @param {ibc.core.client.v1.IQueryClientStateRequest} message QueryClientStateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryClientStateRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.clientId != null && Object.hasOwnProperty.call(message, "clientId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.clientId); + return writer; + }; + + /** + * Encodes the specified QueryClientStateRequest message, length delimited. Does not implicitly {@link ibc.core.client.v1.QueryClientStateRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.client.v1.QueryClientStateRequest + * @static + * @param {ibc.core.client.v1.IQueryClientStateRequest} message QueryClientStateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryClientStateRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryClientStateRequest message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.client.v1.QueryClientStateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.client.v1.QueryClientStateRequest} QueryClientStateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryClientStateRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.QueryClientStateRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.clientId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryClientStateRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.client.v1.QueryClientStateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.client.v1.QueryClientStateRequest} QueryClientStateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryClientStateRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryClientStateRequest message. + * @function verify + * @memberof ibc.core.client.v1.QueryClientStateRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryClientStateRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.clientId != null && message.hasOwnProperty("clientId")) + if (!$util.isString(message.clientId)) + return "clientId: string expected"; + return null; + }; + + /** + * Creates a QueryClientStateRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.client.v1.QueryClientStateRequest + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.client.v1.QueryClientStateRequest} QueryClientStateRequest + */ + QueryClientStateRequest.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.client.v1.QueryClientStateRequest) + return object; + let message = new $root.ibc.core.client.v1.QueryClientStateRequest(); + if (object.clientId != null) + message.clientId = String(object.clientId); + return message; + }; + + /** + * Creates a plain object from a QueryClientStateRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.client.v1.QueryClientStateRequest + * @static + * @param {ibc.core.client.v1.QueryClientStateRequest} message QueryClientStateRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryClientStateRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.clientId = ""; + if (message.clientId != null && message.hasOwnProperty("clientId")) + object.clientId = message.clientId; + return object; + }; + + /** + * Converts this QueryClientStateRequest to JSON. + * @function toJSON + * @memberof ibc.core.client.v1.QueryClientStateRequest + * @instance + * @returns {Object.} JSON object + */ + QueryClientStateRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryClientStateRequest; + })(v1.QueryClientStateRequest || {}); + + v1.QueryClientStateResponse = (function(QueryClientStateResponse) { + + /** + * Properties of a QueryClientStateResponse. + * @memberof ibc.core.client.v1 + * @interface IQueryClientStateResponse + * @property {google.protobuf.IAny|null} [clientState] QueryClientStateResponse clientState + * @property {Uint8Array|null} [proof] QueryClientStateResponse proof + * @property {ibc.core.client.v1.IHeight|null} [proofHeight] QueryClientStateResponse proofHeight + */ + + /** + * Constructs a new QueryClientStateResponse. + * @memberof ibc.core.client.v1 + * @classdesc Represents a QueryClientStateResponse. + * @implements IQueryClientStateResponse + * @constructor + * @param {ibc.core.client.v1.IQueryClientStateResponse=} [properties] Properties to set + */ + function QueryClientStateResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryClientStateResponse clientState. + * @member {google.protobuf.IAny|null|undefined} clientState + * @memberof ibc.core.client.v1.QueryClientStateResponse + * @instance + */ + QueryClientStateResponse.prototype.clientState = null; + + /** + * QueryClientStateResponse proof. + * @member {Uint8Array} proof + * @memberof ibc.core.client.v1.QueryClientStateResponse + * @instance + */ + QueryClientStateResponse.prototype.proof = $util.newBuffer([]); + + /** + * QueryClientStateResponse proofHeight. + * @member {ibc.core.client.v1.IHeight|null|undefined} proofHeight + * @memberof ibc.core.client.v1.QueryClientStateResponse + * @instance + */ + QueryClientStateResponse.prototype.proofHeight = null; + + /** + * Creates a new QueryClientStateResponse instance using the specified properties. + * @function create + * @memberof ibc.core.client.v1.QueryClientStateResponse + * @static + * @param {ibc.core.client.v1.IQueryClientStateResponse=} [properties] Properties to set + * @returns {ibc.core.client.v1.QueryClientStateResponse} QueryClientStateResponse instance + */ + QueryClientStateResponse.create = function create(properties) { + return new QueryClientStateResponse(properties); + }; + + /** + * Encodes the specified QueryClientStateResponse message. Does not implicitly {@link ibc.core.client.v1.QueryClientStateResponse.verify|verify} messages. + * @function encode + * @memberof ibc.core.client.v1.QueryClientStateResponse + * @static + * @param {ibc.core.client.v1.IQueryClientStateResponse} message QueryClientStateResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryClientStateResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.clientState != null && Object.hasOwnProperty.call(message, "clientState")) + $root.google.protobuf.Any.encode(message.clientState, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.proof != null && Object.hasOwnProperty.call(message, "proof")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.proof); + if (message.proofHeight != null && Object.hasOwnProperty.call(message, "proofHeight")) + $root.ibc.core.client.v1.Height.encode(message.proofHeight, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryClientStateResponse message, length delimited. Does not implicitly {@link ibc.core.client.v1.QueryClientStateResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.client.v1.QueryClientStateResponse + * @static + * @param {ibc.core.client.v1.IQueryClientStateResponse} message QueryClientStateResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryClientStateResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryClientStateResponse message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.client.v1.QueryClientStateResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.client.v1.QueryClientStateResponse} QueryClientStateResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryClientStateResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.QueryClientStateResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.clientState = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + case 2: + message.proof = reader.bytes(); + break; + case 3: + message.proofHeight = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryClientStateResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.client.v1.QueryClientStateResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.client.v1.QueryClientStateResponse} QueryClientStateResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryClientStateResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryClientStateResponse message. + * @function verify + * @memberof ibc.core.client.v1.QueryClientStateResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryClientStateResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.clientState != null && message.hasOwnProperty("clientState")) { + let error = $root.google.protobuf.Any.verify(message.clientState); + if (error) + return "clientState." + error; + } + if (message.proof != null && message.hasOwnProperty("proof")) + if (!(message.proof && typeof message.proof.length === "number" || $util.isString(message.proof))) + return "proof: buffer expected"; + if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) { + let error = $root.ibc.core.client.v1.Height.verify(message.proofHeight); + if (error) + return "proofHeight." + error; + } + return null; + }; + + /** + * Creates a QueryClientStateResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.client.v1.QueryClientStateResponse + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.client.v1.QueryClientStateResponse} QueryClientStateResponse + */ + QueryClientStateResponse.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.client.v1.QueryClientStateResponse) + return object; + let message = new $root.ibc.core.client.v1.QueryClientStateResponse(); + if (object.clientState != null) { + if (typeof object.clientState !== "object") + throw TypeError(".ibc.core.client.v1.QueryClientStateResponse.clientState: object expected"); + message.clientState = $root.google.protobuf.Any.fromObject(object.clientState); + } + if (object.proof != null) + if (typeof object.proof === "string") + $util.base64.decode(object.proof, message.proof = $util.newBuffer($util.base64.length(object.proof)), 0); + else if (object.proof.length) + message.proof = object.proof; + if (object.proofHeight != null) { + if (typeof object.proofHeight !== "object") + throw TypeError(".ibc.core.client.v1.QueryClientStateResponse.proofHeight: object expected"); + message.proofHeight = $root.ibc.core.client.v1.Height.fromObject(object.proofHeight); + } + return message; + }; + + /** + * Creates a plain object from a QueryClientStateResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.client.v1.QueryClientStateResponse + * @static + * @param {ibc.core.client.v1.QueryClientStateResponse} message QueryClientStateResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryClientStateResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.clientState = null; + if (options.bytes === String) + object.proof = ""; + else { + object.proof = []; + if (options.bytes !== Array) + object.proof = $util.newBuffer(object.proof); + } + object.proofHeight = null; + } + if (message.clientState != null && message.hasOwnProperty("clientState")) + object.clientState = $root.google.protobuf.Any.toObject(message.clientState, options); + if (message.proof != null && message.hasOwnProperty("proof")) + object.proof = options.bytes === String ? $util.base64.encode(message.proof, 0, message.proof.length) : options.bytes === Array ? Array.prototype.slice.call(message.proof) : message.proof; + if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) + object.proofHeight = $root.ibc.core.client.v1.Height.toObject(message.proofHeight, options); + return object; + }; + + /** + * Converts this QueryClientStateResponse to JSON. + * @function toJSON + * @memberof ibc.core.client.v1.QueryClientStateResponse + * @instance + * @returns {Object.} JSON object + */ + QueryClientStateResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryClientStateResponse; + })(v1.QueryClientStateResponse || {}); + + v1.QueryClientStatesRequest = (function(QueryClientStatesRequest) { + + /** + * Properties of a QueryClientStatesRequest. + * @memberof ibc.core.client.v1 + * @interface IQueryClientStatesRequest + * @property {cosmos.base.query.v1beta1.IPageRequest|null} [pagination] QueryClientStatesRequest pagination + */ + + /** + * Constructs a new QueryClientStatesRequest. + * @memberof ibc.core.client.v1 + * @classdesc Represents a QueryClientStatesRequest. + * @implements IQueryClientStatesRequest + * @constructor + * @param {ibc.core.client.v1.IQueryClientStatesRequest=} [properties] Properties to set + */ + function QueryClientStatesRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryClientStatesRequest pagination. + * @member {cosmos.base.query.v1beta1.IPageRequest|null|undefined} pagination + * @memberof ibc.core.client.v1.QueryClientStatesRequest + * @instance + */ + QueryClientStatesRequest.prototype.pagination = null; + + /** + * Creates a new QueryClientStatesRequest instance using the specified properties. + * @function create + * @memberof ibc.core.client.v1.QueryClientStatesRequest + * @static + * @param {ibc.core.client.v1.IQueryClientStatesRequest=} [properties] Properties to set + * @returns {ibc.core.client.v1.QueryClientStatesRequest} QueryClientStatesRequest instance + */ + QueryClientStatesRequest.create = function create(properties) { + return new QueryClientStatesRequest(properties); + }; + + /** + * Encodes the specified QueryClientStatesRequest message. Does not implicitly {@link ibc.core.client.v1.QueryClientStatesRequest.verify|verify} messages. + * @function encode + * @memberof ibc.core.client.v1.QueryClientStatesRequest + * @static + * @param {ibc.core.client.v1.IQueryClientStatesRequest} message QueryClientStatesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryClientStatesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) + $root.cosmos.base.query.v1beta1.PageRequest.encode(message.pagination, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryClientStatesRequest message, length delimited. Does not implicitly {@link ibc.core.client.v1.QueryClientStatesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.client.v1.QueryClientStatesRequest + * @static + * @param {ibc.core.client.v1.IQueryClientStatesRequest} message QueryClientStatesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryClientStatesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryClientStatesRequest message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.client.v1.QueryClientStatesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.client.v1.QueryClientStatesRequest} QueryClientStatesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryClientStatesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.QueryClientStatesRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryClientStatesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.client.v1.QueryClientStatesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.client.v1.QueryClientStatesRequest} QueryClientStatesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryClientStatesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryClientStatesRequest message. + * @function verify + * @memberof ibc.core.client.v1.QueryClientStatesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryClientStatesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.pagination != null && message.hasOwnProperty("pagination")) { + let error = $root.cosmos.base.query.v1beta1.PageRequest.verify(message.pagination); + if (error) + return "pagination." + error; + } + return null; + }; + + /** + * Creates a QueryClientStatesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.client.v1.QueryClientStatesRequest + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.client.v1.QueryClientStatesRequest} QueryClientStatesRequest + */ + QueryClientStatesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.client.v1.QueryClientStatesRequest) + return object; + let message = new $root.ibc.core.client.v1.QueryClientStatesRequest(); + if (object.pagination != null) { + if (typeof object.pagination !== "object") + throw TypeError(".ibc.core.client.v1.QueryClientStatesRequest.pagination: object expected"); + message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.fromObject(object.pagination); + } + return message; + }; + + /** + * Creates a plain object from a QueryClientStatesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.client.v1.QueryClientStatesRequest + * @static + * @param {ibc.core.client.v1.QueryClientStatesRequest} message QueryClientStatesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryClientStatesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.pagination = null; + if (message.pagination != null && message.hasOwnProperty("pagination")) + object.pagination = $root.cosmos.base.query.v1beta1.PageRequest.toObject(message.pagination, options); + return object; + }; + + /** + * Converts this QueryClientStatesRequest to JSON. + * @function toJSON + * @memberof ibc.core.client.v1.QueryClientStatesRequest + * @instance + * @returns {Object.} JSON object + */ + QueryClientStatesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryClientStatesRequest; + })(v1.QueryClientStatesRequest || {}); + + v1.QueryClientStatesResponse = (function(QueryClientStatesResponse) { + + /** + * Properties of a QueryClientStatesResponse. + * @memberof ibc.core.client.v1 + * @interface IQueryClientStatesResponse + * @property {Array.|null} [clientStates] QueryClientStatesResponse clientStates + * @property {cosmos.base.query.v1beta1.IPageResponse|null} [pagination] QueryClientStatesResponse pagination + */ + + /** + * Constructs a new QueryClientStatesResponse. + * @memberof ibc.core.client.v1 + * @classdesc Represents a QueryClientStatesResponse. + * @implements IQueryClientStatesResponse + * @constructor + * @param {ibc.core.client.v1.IQueryClientStatesResponse=} [properties] Properties to set + */ + function QueryClientStatesResponse(properties) { + this.clientStates = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryClientStatesResponse clientStates. + * @member {Array.} clientStates + * @memberof ibc.core.client.v1.QueryClientStatesResponse + * @instance + */ + QueryClientStatesResponse.prototype.clientStates = $util.emptyArray; + + /** + * QueryClientStatesResponse pagination. + * @member {cosmos.base.query.v1beta1.IPageResponse|null|undefined} pagination + * @memberof ibc.core.client.v1.QueryClientStatesResponse + * @instance + */ + QueryClientStatesResponse.prototype.pagination = null; + + /** + * Creates a new QueryClientStatesResponse instance using the specified properties. + * @function create + * @memberof ibc.core.client.v1.QueryClientStatesResponse + * @static + * @param {ibc.core.client.v1.IQueryClientStatesResponse=} [properties] Properties to set + * @returns {ibc.core.client.v1.QueryClientStatesResponse} QueryClientStatesResponse instance + */ + QueryClientStatesResponse.create = function create(properties) { + return new QueryClientStatesResponse(properties); + }; + + /** + * Encodes the specified QueryClientStatesResponse message. Does not implicitly {@link ibc.core.client.v1.QueryClientStatesResponse.verify|verify} messages. + * @function encode + * @memberof ibc.core.client.v1.QueryClientStatesResponse + * @static + * @param {ibc.core.client.v1.IQueryClientStatesResponse} message QueryClientStatesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryClientStatesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.clientStates != null && message.clientStates.length) + for (let i = 0; i < message.clientStates.length; ++i) + $root.ibc.core.client.v1.IdentifiedClientState.encode(message.clientStates[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) + $root.cosmos.base.query.v1beta1.PageResponse.encode(message.pagination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryClientStatesResponse message, length delimited. Does not implicitly {@link ibc.core.client.v1.QueryClientStatesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.client.v1.QueryClientStatesResponse + * @static + * @param {ibc.core.client.v1.IQueryClientStatesResponse} message QueryClientStatesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryClientStatesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryClientStatesResponse message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.client.v1.QueryClientStatesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.client.v1.QueryClientStatesResponse} QueryClientStatesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryClientStatesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.QueryClientStatesResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.clientStates && message.clientStates.length)) + message.clientStates = []; + message.clientStates.push($root.ibc.core.client.v1.IdentifiedClientState.decode(reader, reader.uint32())); + break; + case 2: + message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryClientStatesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.client.v1.QueryClientStatesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.client.v1.QueryClientStatesResponse} QueryClientStatesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryClientStatesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryClientStatesResponse message. + * @function verify + * @memberof ibc.core.client.v1.QueryClientStatesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryClientStatesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.clientStates != null && message.hasOwnProperty("clientStates")) { + if (!Array.isArray(message.clientStates)) + return "clientStates: array expected"; + for (let i = 0; i < message.clientStates.length; ++i) { + let error = $root.ibc.core.client.v1.IdentifiedClientState.verify(message.clientStates[i]); + if (error) + return "clientStates." + error; + } + } + if (message.pagination != null && message.hasOwnProperty("pagination")) { + let error = $root.cosmos.base.query.v1beta1.PageResponse.verify(message.pagination); + if (error) + return "pagination." + error; + } + return null; + }; + + /** + * Creates a QueryClientStatesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.client.v1.QueryClientStatesResponse + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.client.v1.QueryClientStatesResponse} QueryClientStatesResponse + */ + QueryClientStatesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.client.v1.QueryClientStatesResponse) + return object; + let message = new $root.ibc.core.client.v1.QueryClientStatesResponse(); + if (object.clientStates) { + if (!Array.isArray(object.clientStates)) + throw TypeError(".ibc.core.client.v1.QueryClientStatesResponse.clientStates: array expected"); + message.clientStates = []; + for (let i = 0; i < object.clientStates.length; ++i) { + if (typeof object.clientStates[i] !== "object") + throw TypeError(".ibc.core.client.v1.QueryClientStatesResponse.clientStates: object expected"); + message.clientStates[i] = $root.ibc.core.client.v1.IdentifiedClientState.fromObject(object.clientStates[i]); + } + } + if (object.pagination != null) { + if (typeof object.pagination !== "object") + throw TypeError(".ibc.core.client.v1.QueryClientStatesResponse.pagination: object expected"); + message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.fromObject(object.pagination); + } + return message; + }; + + /** + * Creates a plain object from a QueryClientStatesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.client.v1.QueryClientStatesResponse + * @static + * @param {ibc.core.client.v1.QueryClientStatesResponse} message QueryClientStatesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryClientStatesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.clientStates = []; + if (options.defaults) + object.pagination = null; + if (message.clientStates && message.clientStates.length) { + object.clientStates = []; + for (let j = 0; j < message.clientStates.length; ++j) + object.clientStates[j] = $root.ibc.core.client.v1.IdentifiedClientState.toObject(message.clientStates[j], options); + } + if (message.pagination != null && message.hasOwnProperty("pagination")) + object.pagination = $root.cosmos.base.query.v1beta1.PageResponse.toObject(message.pagination, options); + return object; + }; + + /** + * Converts this QueryClientStatesResponse to JSON. + * @function toJSON + * @memberof ibc.core.client.v1.QueryClientStatesResponse + * @instance + * @returns {Object.} JSON object + */ + QueryClientStatesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryClientStatesResponse; + })(v1.QueryClientStatesResponse || {}); + + v1.QueryConsensusStateRequest = (function(QueryConsensusStateRequest) { + + /** + * Properties of a QueryConsensusStateRequest. + * @memberof ibc.core.client.v1 + * @interface IQueryConsensusStateRequest + * @property {string|null} [clientId] QueryConsensusStateRequest clientId + * @property {number|Long|null} [revisionNumber] QueryConsensusStateRequest revisionNumber + * @property {number|Long|null} [revisionHeight] QueryConsensusStateRequest revisionHeight + * @property {boolean|null} [latestHeight] QueryConsensusStateRequest latestHeight + */ + + /** + * Constructs a new QueryConsensusStateRequest. + * @memberof ibc.core.client.v1 + * @classdesc Represents a QueryConsensusStateRequest. + * @implements IQueryConsensusStateRequest + * @constructor + * @param {ibc.core.client.v1.IQueryConsensusStateRequest=} [properties] Properties to set + */ + function QueryConsensusStateRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryConsensusStateRequest clientId. + * @member {string} clientId + * @memberof ibc.core.client.v1.QueryConsensusStateRequest + * @instance + */ + QueryConsensusStateRequest.prototype.clientId = ""; + + /** + * QueryConsensusStateRequest revisionNumber. + * @member {number|Long} revisionNumber + * @memberof ibc.core.client.v1.QueryConsensusStateRequest + * @instance + */ + QueryConsensusStateRequest.prototype.revisionNumber = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * QueryConsensusStateRequest revisionHeight. + * @member {number|Long} revisionHeight + * @memberof ibc.core.client.v1.QueryConsensusStateRequest + * @instance + */ + QueryConsensusStateRequest.prototype.revisionHeight = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * QueryConsensusStateRequest latestHeight. + * @member {boolean} latestHeight + * @memberof ibc.core.client.v1.QueryConsensusStateRequest + * @instance + */ + QueryConsensusStateRequest.prototype.latestHeight = false; + + /** + * Creates a new QueryConsensusStateRequest instance using the specified properties. + * @function create + * @memberof ibc.core.client.v1.QueryConsensusStateRequest + * @static + * @param {ibc.core.client.v1.IQueryConsensusStateRequest=} [properties] Properties to set + * @returns {ibc.core.client.v1.QueryConsensusStateRequest} QueryConsensusStateRequest instance + */ + QueryConsensusStateRequest.create = function create(properties) { + return new QueryConsensusStateRequest(properties); + }; + + /** + * Encodes the specified QueryConsensusStateRequest message. Does not implicitly {@link ibc.core.client.v1.QueryConsensusStateRequest.verify|verify} messages. + * @function encode + * @memberof ibc.core.client.v1.QueryConsensusStateRequest + * @static + * @param {ibc.core.client.v1.IQueryConsensusStateRequest} message QueryConsensusStateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryConsensusStateRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.clientId != null && Object.hasOwnProperty.call(message, "clientId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.clientId); + if (message.revisionNumber != null && Object.hasOwnProperty.call(message, "revisionNumber")) + writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.revisionNumber); + if (message.revisionHeight != null && Object.hasOwnProperty.call(message, "revisionHeight")) + writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.revisionHeight); + if (message.latestHeight != null && Object.hasOwnProperty.call(message, "latestHeight")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.latestHeight); + return writer; + }; + + /** + * Encodes the specified QueryConsensusStateRequest message, length delimited. Does not implicitly {@link ibc.core.client.v1.QueryConsensusStateRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.client.v1.QueryConsensusStateRequest + * @static + * @param {ibc.core.client.v1.IQueryConsensusStateRequest} message QueryConsensusStateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryConsensusStateRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryConsensusStateRequest message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.client.v1.QueryConsensusStateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.client.v1.QueryConsensusStateRequest} QueryConsensusStateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryConsensusStateRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.QueryConsensusStateRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.clientId = reader.string(); + break; + case 2: + message.revisionNumber = reader.uint64(); + break; + case 3: + message.revisionHeight = reader.uint64(); + break; + case 4: + message.latestHeight = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryConsensusStateRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.client.v1.QueryConsensusStateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.client.v1.QueryConsensusStateRequest} QueryConsensusStateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryConsensusStateRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryConsensusStateRequest message. + * @function verify + * @memberof ibc.core.client.v1.QueryConsensusStateRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryConsensusStateRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.clientId != null && message.hasOwnProperty("clientId")) + if (!$util.isString(message.clientId)) + return "clientId: string expected"; + if (message.revisionNumber != null && message.hasOwnProperty("revisionNumber")) + if (!$util.isInteger(message.revisionNumber) && !(message.revisionNumber && $util.isInteger(message.revisionNumber.low) && $util.isInteger(message.revisionNumber.high))) + return "revisionNumber: integer|Long expected"; + if (message.revisionHeight != null && message.hasOwnProperty("revisionHeight")) + if (!$util.isInteger(message.revisionHeight) && !(message.revisionHeight && $util.isInteger(message.revisionHeight.low) && $util.isInteger(message.revisionHeight.high))) + return "revisionHeight: integer|Long expected"; + if (message.latestHeight != null && message.hasOwnProperty("latestHeight")) + if (typeof message.latestHeight !== "boolean") + return "latestHeight: boolean expected"; + return null; + }; + + /** + * Creates a QueryConsensusStateRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.client.v1.QueryConsensusStateRequest + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.client.v1.QueryConsensusStateRequest} QueryConsensusStateRequest + */ + QueryConsensusStateRequest.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.client.v1.QueryConsensusStateRequest) + return object; + let message = new $root.ibc.core.client.v1.QueryConsensusStateRequest(); + if (object.clientId != null) + message.clientId = String(object.clientId); + if (object.revisionNumber != null) + if ($util.Long) + (message.revisionNumber = $util.Long.fromValue(object.revisionNumber)).unsigned = true; + else if (typeof object.revisionNumber === "string") + message.revisionNumber = parseInt(object.revisionNumber, 10); + else if (typeof object.revisionNumber === "number") + message.revisionNumber = object.revisionNumber; + else if (typeof object.revisionNumber === "object") + message.revisionNumber = new $util.LongBits(object.revisionNumber.low >>> 0, object.revisionNumber.high >>> 0).toNumber(true); + if (object.revisionHeight != null) + if ($util.Long) + (message.revisionHeight = $util.Long.fromValue(object.revisionHeight)).unsigned = true; + else if (typeof object.revisionHeight === "string") + message.revisionHeight = parseInt(object.revisionHeight, 10); + else if (typeof object.revisionHeight === "number") + message.revisionHeight = object.revisionHeight; + else if (typeof object.revisionHeight === "object") + message.revisionHeight = new $util.LongBits(object.revisionHeight.low >>> 0, object.revisionHeight.high >>> 0).toNumber(true); + if (object.latestHeight != null) + message.latestHeight = Boolean(object.latestHeight); + return message; + }; + + /** + * Creates a plain object from a QueryConsensusStateRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.client.v1.QueryConsensusStateRequest + * @static + * @param {ibc.core.client.v1.QueryConsensusStateRequest} message QueryConsensusStateRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryConsensusStateRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.clientId = ""; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.revisionNumber = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.revisionNumber = options.longs === String ? "0" : 0; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.revisionHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.revisionHeight = options.longs === String ? "0" : 0; + object.latestHeight = false; + } + if (message.clientId != null && message.hasOwnProperty("clientId")) + object.clientId = message.clientId; + if (message.revisionNumber != null && message.hasOwnProperty("revisionNumber")) + if (typeof message.revisionNumber === "number") + object.revisionNumber = options.longs === String ? String(message.revisionNumber) : message.revisionNumber; + else + object.revisionNumber = options.longs === String ? $util.Long.prototype.toString.call(message.revisionNumber) : options.longs === Number ? new $util.LongBits(message.revisionNumber.low >>> 0, message.revisionNumber.high >>> 0).toNumber(true) : message.revisionNumber; + if (message.revisionHeight != null && message.hasOwnProperty("revisionHeight")) + if (typeof message.revisionHeight === "number") + object.revisionHeight = options.longs === String ? String(message.revisionHeight) : message.revisionHeight; + else + object.revisionHeight = options.longs === String ? $util.Long.prototype.toString.call(message.revisionHeight) : options.longs === Number ? new $util.LongBits(message.revisionHeight.low >>> 0, message.revisionHeight.high >>> 0).toNumber(true) : message.revisionHeight; + if (message.latestHeight != null && message.hasOwnProperty("latestHeight")) + object.latestHeight = message.latestHeight; + return object; + }; + + /** + * Converts this QueryConsensusStateRequest to JSON. + * @function toJSON + * @memberof ibc.core.client.v1.QueryConsensusStateRequest + * @instance + * @returns {Object.} JSON object + */ + QueryConsensusStateRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryConsensusStateRequest; + })(v1.QueryConsensusStateRequest || {}); + + v1.QueryConsensusStateResponse = (function(QueryConsensusStateResponse) { + + /** + * Properties of a QueryConsensusStateResponse. + * @memberof ibc.core.client.v1 + * @interface IQueryConsensusStateResponse + * @property {google.protobuf.IAny|null} [consensusState] QueryConsensusStateResponse consensusState + * @property {Uint8Array|null} [proof] QueryConsensusStateResponse proof + * @property {ibc.core.client.v1.IHeight|null} [proofHeight] QueryConsensusStateResponse proofHeight + */ + + /** + * Constructs a new QueryConsensusStateResponse. + * @memberof ibc.core.client.v1 + * @classdesc Represents a QueryConsensusStateResponse. + * @implements IQueryConsensusStateResponse + * @constructor + * @param {ibc.core.client.v1.IQueryConsensusStateResponse=} [properties] Properties to set + */ + function QueryConsensusStateResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryConsensusStateResponse consensusState. + * @member {google.protobuf.IAny|null|undefined} consensusState + * @memberof ibc.core.client.v1.QueryConsensusStateResponse + * @instance + */ + QueryConsensusStateResponse.prototype.consensusState = null; + + /** + * QueryConsensusStateResponse proof. + * @member {Uint8Array} proof + * @memberof ibc.core.client.v1.QueryConsensusStateResponse + * @instance + */ + QueryConsensusStateResponse.prototype.proof = $util.newBuffer([]); + + /** + * QueryConsensusStateResponse proofHeight. + * @member {ibc.core.client.v1.IHeight|null|undefined} proofHeight + * @memberof ibc.core.client.v1.QueryConsensusStateResponse + * @instance + */ + QueryConsensusStateResponse.prototype.proofHeight = null; + + /** + * Creates a new QueryConsensusStateResponse instance using the specified properties. + * @function create + * @memberof ibc.core.client.v1.QueryConsensusStateResponse + * @static + * @param {ibc.core.client.v1.IQueryConsensusStateResponse=} [properties] Properties to set + * @returns {ibc.core.client.v1.QueryConsensusStateResponse} QueryConsensusStateResponse instance + */ + QueryConsensusStateResponse.create = function create(properties) { + return new QueryConsensusStateResponse(properties); + }; + + /** + * Encodes the specified QueryConsensusStateResponse message. Does not implicitly {@link ibc.core.client.v1.QueryConsensusStateResponse.verify|verify} messages. + * @function encode + * @memberof ibc.core.client.v1.QueryConsensusStateResponse + * @static + * @param {ibc.core.client.v1.IQueryConsensusStateResponse} message QueryConsensusStateResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryConsensusStateResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.consensusState != null && Object.hasOwnProperty.call(message, "consensusState")) + $root.google.protobuf.Any.encode(message.consensusState, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.proof != null && Object.hasOwnProperty.call(message, "proof")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.proof); + if (message.proofHeight != null && Object.hasOwnProperty.call(message, "proofHeight")) + $root.ibc.core.client.v1.Height.encode(message.proofHeight, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryConsensusStateResponse message, length delimited. Does not implicitly {@link ibc.core.client.v1.QueryConsensusStateResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.client.v1.QueryConsensusStateResponse + * @static + * @param {ibc.core.client.v1.IQueryConsensusStateResponse} message QueryConsensusStateResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryConsensusStateResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryConsensusStateResponse message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.client.v1.QueryConsensusStateResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.client.v1.QueryConsensusStateResponse} QueryConsensusStateResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryConsensusStateResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.QueryConsensusStateResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.consensusState = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + case 2: + message.proof = reader.bytes(); + break; + case 3: + message.proofHeight = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryConsensusStateResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.client.v1.QueryConsensusStateResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.client.v1.QueryConsensusStateResponse} QueryConsensusStateResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryConsensusStateResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryConsensusStateResponse message. + * @function verify + * @memberof ibc.core.client.v1.QueryConsensusStateResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryConsensusStateResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.consensusState != null && message.hasOwnProperty("consensusState")) { + let error = $root.google.protobuf.Any.verify(message.consensusState); + if (error) + return "consensusState." + error; + } + if (message.proof != null && message.hasOwnProperty("proof")) + if (!(message.proof && typeof message.proof.length === "number" || $util.isString(message.proof))) + return "proof: buffer expected"; + if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) { + let error = $root.ibc.core.client.v1.Height.verify(message.proofHeight); + if (error) + return "proofHeight." + error; + } + return null; + }; + + /** + * Creates a QueryConsensusStateResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.client.v1.QueryConsensusStateResponse + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.client.v1.QueryConsensusStateResponse} QueryConsensusStateResponse + */ + QueryConsensusStateResponse.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.client.v1.QueryConsensusStateResponse) + return object; + let message = new $root.ibc.core.client.v1.QueryConsensusStateResponse(); + if (object.consensusState != null) { + if (typeof object.consensusState !== "object") + throw TypeError(".ibc.core.client.v1.QueryConsensusStateResponse.consensusState: object expected"); + message.consensusState = $root.google.protobuf.Any.fromObject(object.consensusState); + } + if (object.proof != null) + if (typeof object.proof === "string") + $util.base64.decode(object.proof, message.proof = $util.newBuffer($util.base64.length(object.proof)), 0); + else if (object.proof.length) + message.proof = object.proof; + if (object.proofHeight != null) { + if (typeof object.proofHeight !== "object") + throw TypeError(".ibc.core.client.v1.QueryConsensusStateResponse.proofHeight: object expected"); + message.proofHeight = $root.ibc.core.client.v1.Height.fromObject(object.proofHeight); + } + return message; + }; + + /** + * Creates a plain object from a QueryConsensusStateResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.client.v1.QueryConsensusStateResponse + * @static + * @param {ibc.core.client.v1.QueryConsensusStateResponse} message QueryConsensusStateResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryConsensusStateResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.consensusState = null; + if (options.bytes === String) + object.proof = ""; + else { + object.proof = []; + if (options.bytes !== Array) + object.proof = $util.newBuffer(object.proof); + } + object.proofHeight = null; + } + if (message.consensusState != null && message.hasOwnProperty("consensusState")) + object.consensusState = $root.google.protobuf.Any.toObject(message.consensusState, options); + if (message.proof != null && message.hasOwnProperty("proof")) + object.proof = options.bytes === String ? $util.base64.encode(message.proof, 0, message.proof.length) : options.bytes === Array ? Array.prototype.slice.call(message.proof) : message.proof; + if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) + object.proofHeight = $root.ibc.core.client.v1.Height.toObject(message.proofHeight, options); + return object; + }; + + /** + * Converts this QueryConsensusStateResponse to JSON. + * @function toJSON + * @memberof ibc.core.client.v1.QueryConsensusStateResponse + * @instance + * @returns {Object.} JSON object + */ + QueryConsensusStateResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryConsensusStateResponse; + })(v1.QueryConsensusStateResponse || {}); + + v1.QueryConsensusStatesRequest = (function(QueryConsensusStatesRequest) { + + /** + * Properties of a QueryConsensusStatesRequest. + * @memberof ibc.core.client.v1 + * @interface IQueryConsensusStatesRequest + * @property {string|null} [clientId] QueryConsensusStatesRequest clientId + * @property {cosmos.base.query.v1beta1.IPageRequest|null} [pagination] QueryConsensusStatesRequest pagination + */ + + /** + * Constructs a new QueryConsensusStatesRequest. + * @memberof ibc.core.client.v1 + * @classdesc Represents a QueryConsensusStatesRequest. + * @implements IQueryConsensusStatesRequest + * @constructor + * @param {ibc.core.client.v1.IQueryConsensusStatesRequest=} [properties] Properties to set + */ + function QueryConsensusStatesRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryConsensusStatesRequest clientId. + * @member {string} clientId + * @memberof ibc.core.client.v1.QueryConsensusStatesRequest + * @instance + */ + QueryConsensusStatesRequest.prototype.clientId = ""; + + /** + * QueryConsensusStatesRequest pagination. + * @member {cosmos.base.query.v1beta1.IPageRequest|null|undefined} pagination + * @memberof ibc.core.client.v1.QueryConsensusStatesRequest + * @instance + */ + QueryConsensusStatesRequest.prototype.pagination = null; + + /** + * Creates a new QueryConsensusStatesRequest instance using the specified properties. + * @function create + * @memberof ibc.core.client.v1.QueryConsensusStatesRequest + * @static + * @param {ibc.core.client.v1.IQueryConsensusStatesRequest=} [properties] Properties to set + * @returns {ibc.core.client.v1.QueryConsensusStatesRequest} QueryConsensusStatesRequest instance + */ + QueryConsensusStatesRequest.create = function create(properties) { + return new QueryConsensusStatesRequest(properties); + }; + + /** + * Encodes the specified QueryConsensusStatesRequest message. Does not implicitly {@link ibc.core.client.v1.QueryConsensusStatesRequest.verify|verify} messages. + * @function encode + * @memberof ibc.core.client.v1.QueryConsensusStatesRequest + * @static + * @param {ibc.core.client.v1.IQueryConsensusStatesRequest} message QueryConsensusStatesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryConsensusStatesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.clientId != null && Object.hasOwnProperty.call(message, "clientId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.clientId); + if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) + $root.cosmos.base.query.v1beta1.PageRequest.encode(message.pagination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryConsensusStatesRequest message, length delimited. Does not implicitly {@link ibc.core.client.v1.QueryConsensusStatesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.client.v1.QueryConsensusStatesRequest + * @static + * @param {ibc.core.client.v1.IQueryConsensusStatesRequest} message QueryConsensusStatesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryConsensusStatesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryConsensusStatesRequest message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.client.v1.QueryConsensusStatesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.client.v1.QueryConsensusStatesRequest} QueryConsensusStatesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryConsensusStatesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.QueryConsensusStatesRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.clientId = reader.string(); + break; + case 2: + message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryConsensusStatesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.client.v1.QueryConsensusStatesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.client.v1.QueryConsensusStatesRequest} QueryConsensusStatesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryConsensusStatesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryConsensusStatesRequest message. + * @function verify + * @memberof ibc.core.client.v1.QueryConsensusStatesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryConsensusStatesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.clientId != null && message.hasOwnProperty("clientId")) + if (!$util.isString(message.clientId)) + return "clientId: string expected"; + if (message.pagination != null && message.hasOwnProperty("pagination")) { + let error = $root.cosmos.base.query.v1beta1.PageRequest.verify(message.pagination); + if (error) + return "pagination." + error; + } + return null; + }; + + /** + * Creates a QueryConsensusStatesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.client.v1.QueryConsensusStatesRequest + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.client.v1.QueryConsensusStatesRequest} QueryConsensusStatesRequest + */ + QueryConsensusStatesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.client.v1.QueryConsensusStatesRequest) + return object; + let message = new $root.ibc.core.client.v1.QueryConsensusStatesRequest(); + if (object.clientId != null) + message.clientId = String(object.clientId); + if (object.pagination != null) { + if (typeof object.pagination !== "object") + throw TypeError(".ibc.core.client.v1.QueryConsensusStatesRequest.pagination: object expected"); + message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.fromObject(object.pagination); + } + return message; + }; + + /** + * Creates a plain object from a QueryConsensusStatesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.client.v1.QueryConsensusStatesRequest + * @static + * @param {ibc.core.client.v1.QueryConsensusStatesRequest} message QueryConsensusStatesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryConsensusStatesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.clientId = ""; + object.pagination = null; + } + if (message.clientId != null && message.hasOwnProperty("clientId")) + object.clientId = message.clientId; + if (message.pagination != null && message.hasOwnProperty("pagination")) + object.pagination = $root.cosmos.base.query.v1beta1.PageRequest.toObject(message.pagination, options); + return object; + }; + + /** + * Converts this QueryConsensusStatesRequest to JSON. + * @function toJSON + * @memberof ibc.core.client.v1.QueryConsensusStatesRequest + * @instance + * @returns {Object.} JSON object + */ + QueryConsensusStatesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryConsensusStatesRequest; + })(v1.QueryConsensusStatesRequest || {}); + + v1.QueryConsensusStatesResponse = (function(QueryConsensusStatesResponse) { + + /** + * Properties of a QueryConsensusStatesResponse. + * @memberof ibc.core.client.v1 + * @interface IQueryConsensusStatesResponse + * @property {Array.|null} [consensusStates] QueryConsensusStatesResponse consensusStates + * @property {cosmos.base.query.v1beta1.IPageResponse|null} [pagination] QueryConsensusStatesResponse pagination + */ + + /** + * Constructs a new QueryConsensusStatesResponse. + * @memberof ibc.core.client.v1 + * @classdesc Represents a QueryConsensusStatesResponse. + * @implements IQueryConsensusStatesResponse + * @constructor + * @param {ibc.core.client.v1.IQueryConsensusStatesResponse=} [properties] Properties to set + */ + function QueryConsensusStatesResponse(properties) { + this.consensusStates = []; + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryConsensusStatesResponse consensusStates. + * @member {Array.} consensusStates + * @memberof ibc.core.client.v1.QueryConsensusStatesResponse + * @instance + */ + QueryConsensusStatesResponse.prototype.consensusStates = $util.emptyArray; + + /** + * QueryConsensusStatesResponse pagination. + * @member {cosmos.base.query.v1beta1.IPageResponse|null|undefined} pagination + * @memberof ibc.core.client.v1.QueryConsensusStatesResponse + * @instance + */ + QueryConsensusStatesResponse.prototype.pagination = null; + + /** + * Creates a new QueryConsensusStatesResponse instance using the specified properties. + * @function create + * @memberof ibc.core.client.v1.QueryConsensusStatesResponse + * @static + * @param {ibc.core.client.v1.IQueryConsensusStatesResponse=} [properties] Properties to set + * @returns {ibc.core.client.v1.QueryConsensusStatesResponse} QueryConsensusStatesResponse instance + */ + QueryConsensusStatesResponse.create = function create(properties) { + return new QueryConsensusStatesResponse(properties); + }; + + /** + * Encodes the specified QueryConsensusStatesResponse message. Does not implicitly {@link ibc.core.client.v1.QueryConsensusStatesResponse.verify|verify} messages. + * @function encode + * @memberof ibc.core.client.v1.QueryConsensusStatesResponse + * @static + * @param {ibc.core.client.v1.IQueryConsensusStatesResponse} message QueryConsensusStatesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryConsensusStatesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.consensusStates != null && message.consensusStates.length) + for (let i = 0; i < message.consensusStates.length; ++i) + $root.ibc.core.client.v1.ConsensusStateWithHeight.encode(message.consensusStates[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) + $root.cosmos.base.query.v1beta1.PageResponse.encode(message.pagination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryConsensusStatesResponse message, length delimited. Does not implicitly {@link ibc.core.client.v1.QueryConsensusStatesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.client.v1.QueryConsensusStatesResponse + * @static + * @param {ibc.core.client.v1.IQueryConsensusStatesResponse} message QueryConsensusStatesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryConsensusStatesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryConsensusStatesResponse message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.client.v1.QueryConsensusStatesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.client.v1.QueryConsensusStatesResponse} QueryConsensusStatesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryConsensusStatesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.QueryConsensusStatesResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.consensusStates && message.consensusStates.length)) + message.consensusStates = []; + message.consensusStates.push($root.ibc.core.client.v1.ConsensusStateWithHeight.decode(reader, reader.uint32())); + break; + case 2: + message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryConsensusStatesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.client.v1.QueryConsensusStatesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.client.v1.QueryConsensusStatesResponse} QueryConsensusStatesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryConsensusStatesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryConsensusStatesResponse message. + * @function verify + * @memberof ibc.core.client.v1.QueryConsensusStatesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryConsensusStatesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.consensusStates != null && message.hasOwnProperty("consensusStates")) { + if (!Array.isArray(message.consensusStates)) + return "consensusStates: array expected"; + for (let i = 0; i < message.consensusStates.length; ++i) { + let error = $root.ibc.core.client.v1.ConsensusStateWithHeight.verify(message.consensusStates[i]); + if (error) + return "consensusStates." + error; + } + } + if (message.pagination != null && message.hasOwnProperty("pagination")) { + let error = $root.cosmos.base.query.v1beta1.PageResponse.verify(message.pagination); + if (error) + return "pagination." + error; + } + return null; + }; + + /** + * Creates a QueryConsensusStatesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.client.v1.QueryConsensusStatesResponse + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.client.v1.QueryConsensusStatesResponse} QueryConsensusStatesResponse + */ + QueryConsensusStatesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.client.v1.QueryConsensusStatesResponse) + return object; + let message = new $root.ibc.core.client.v1.QueryConsensusStatesResponse(); + if (object.consensusStates) { + if (!Array.isArray(object.consensusStates)) + throw TypeError(".ibc.core.client.v1.QueryConsensusStatesResponse.consensusStates: array expected"); + message.consensusStates = []; + for (let i = 0; i < object.consensusStates.length; ++i) { + if (typeof object.consensusStates[i] !== "object") + throw TypeError(".ibc.core.client.v1.QueryConsensusStatesResponse.consensusStates: object expected"); + message.consensusStates[i] = $root.ibc.core.client.v1.ConsensusStateWithHeight.fromObject(object.consensusStates[i]); + } + } + if (object.pagination != null) { + if (typeof object.pagination !== "object") + throw TypeError(".ibc.core.client.v1.QueryConsensusStatesResponse.pagination: object expected"); + message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.fromObject(object.pagination); + } + return message; + }; + + /** + * Creates a plain object from a QueryConsensusStatesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.client.v1.QueryConsensusStatesResponse + * @static + * @param {ibc.core.client.v1.QueryConsensusStatesResponse} message QueryConsensusStatesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryConsensusStatesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.arrays || options.defaults) + object.consensusStates = []; + if (options.defaults) + object.pagination = null; + if (message.consensusStates && message.consensusStates.length) { + object.consensusStates = []; + for (let j = 0; j < message.consensusStates.length; ++j) + object.consensusStates[j] = $root.ibc.core.client.v1.ConsensusStateWithHeight.toObject(message.consensusStates[j], options); + } + if (message.pagination != null && message.hasOwnProperty("pagination")) + object.pagination = $root.cosmos.base.query.v1beta1.PageResponse.toObject(message.pagination, options); + return object; + }; + + /** + * Converts this QueryConsensusStatesResponse to JSON. + * @function toJSON + * @memberof ibc.core.client.v1.QueryConsensusStatesResponse + * @instance + * @returns {Object.} JSON object + */ + QueryConsensusStatesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryConsensusStatesResponse; + })(v1.QueryConsensusStatesResponse || {}); + + v1.QueryClientParamsRequest = (function(QueryClientParamsRequest) { + + /** + * Properties of a QueryClientParamsRequest. + * @memberof ibc.core.client.v1 + * @interface IQueryClientParamsRequest + */ + + /** + * Constructs a new QueryClientParamsRequest. + * @memberof ibc.core.client.v1 + * @classdesc Represents a QueryClientParamsRequest. + * @implements IQueryClientParamsRequest + * @constructor + * @param {ibc.core.client.v1.IQueryClientParamsRequest=} [properties] Properties to set + */ + function QueryClientParamsRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new QueryClientParamsRequest instance using the specified properties. + * @function create + * @memberof ibc.core.client.v1.QueryClientParamsRequest + * @static + * @param {ibc.core.client.v1.IQueryClientParamsRequest=} [properties] Properties to set + * @returns {ibc.core.client.v1.QueryClientParamsRequest} QueryClientParamsRequest instance + */ + QueryClientParamsRequest.create = function create(properties) { + return new QueryClientParamsRequest(properties); + }; + + /** + * Encodes the specified QueryClientParamsRequest message. Does not implicitly {@link ibc.core.client.v1.QueryClientParamsRequest.verify|verify} messages. + * @function encode + * @memberof ibc.core.client.v1.QueryClientParamsRequest + * @static + * @param {ibc.core.client.v1.IQueryClientParamsRequest} message QueryClientParamsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryClientParamsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified QueryClientParamsRequest message, length delimited. Does not implicitly {@link ibc.core.client.v1.QueryClientParamsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.client.v1.QueryClientParamsRequest + * @static + * @param {ibc.core.client.v1.IQueryClientParamsRequest} message QueryClientParamsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryClientParamsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryClientParamsRequest message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.client.v1.QueryClientParamsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.client.v1.QueryClientParamsRequest} QueryClientParamsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryClientParamsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.QueryClientParamsRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryClientParamsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.client.v1.QueryClientParamsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.client.v1.QueryClientParamsRequest} QueryClientParamsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryClientParamsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryClientParamsRequest message. + * @function verify + * @memberof ibc.core.client.v1.QueryClientParamsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryClientParamsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a QueryClientParamsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.client.v1.QueryClientParamsRequest + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.client.v1.QueryClientParamsRequest} QueryClientParamsRequest + */ + QueryClientParamsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.client.v1.QueryClientParamsRequest) + return object; + return new $root.ibc.core.client.v1.QueryClientParamsRequest(); + }; + + /** + * Creates a plain object from a QueryClientParamsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.client.v1.QueryClientParamsRequest + * @static + * @param {ibc.core.client.v1.QueryClientParamsRequest} message QueryClientParamsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryClientParamsRequest.toObject = function toObject() { + return {}; + }; + + /** + * Converts this QueryClientParamsRequest to JSON. + * @function toJSON + * @memberof ibc.core.client.v1.QueryClientParamsRequest + * @instance + * @returns {Object.} JSON object + */ + QueryClientParamsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryClientParamsRequest; + })(v1.QueryClientParamsRequest || {}); + + v1.QueryClientParamsResponse = (function(QueryClientParamsResponse) { + + /** + * Properties of a QueryClientParamsResponse. + * @memberof ibc.core.client.v1 + * @interface IQueryClientParamsResponse + * @property {ibc.core.client.v1.IParams|null} [params] QueryClientParamsResponse params + */ + + /** + * Constructs a new QueryClientParamsResponse. + * @memberof ibc.core.client.v1 + * @classdesc Represents a QueryClientParamsResponse. + * @implements IQueryClientParamsResponse + * @constructor + * @param {ibc.core.client.v1.IQueryClientParamsResponse=} [properties] Properties to set + */ + function QueryClientParamsResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryClientParamsResponse params. + * @member {ibc.core.client.v1.IParams|null|undefined} params + * @memberof ibc.core.client.v1.QueryClientParamsResponse + * @instance + */ + QueryClientParamsResponse.prototype.params = null; + + /** + * Creates a new QueryClientParamsResponse instance using the specified properties. + * @function create + * @memberof ibc.core.client.v1.QueryClientParamsResponse + * @static + * @param {ibc.core.client.v1.IQueryClientParamsResponse=} [properties] Properties to set + * @returns {ibc.core.client.v1.QueryClientParamsResponse} QueryClientParamsResponse instance + */ + QueryClientParamsResponse.create = function create(properties) { + return new QueryClientParamsResponse(properties); + }; + + /** + * Encodes the specified QueryClientParamsResponse message. Does not implicitly {@link ibc.core.client.v1.QueryClientParamsResponse.verify|verify} messages. + * @function encode + * @memberof ibc.core.client.v1.QueryClientParamsResponse + * @static + * @param {ibc.core.client.v1.IQueryClientParamsResponse} message QueryClientParamsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryClientParamsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.params != null && Object.hasOwnProperty.call(message, "params")) + $root.ibc.core.client.v1.Params.encode(message.params, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryClientParamsResponse message, length delimited. Does not implicitly {@link ibc.core.client.v1.QueryClientParamsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.client.v1.QueryClientParamsResponse + * @static + * @param {ibc.core.client.v1.IQueryClientParamsResponse} message QueryClientParamsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryClientParamsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryClientParamsResponse message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.client.v1.QueryClientParamsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.client.v1.QueryClientParamsResponse} QueryClientParamsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryClientParamsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.QueryClientParamsResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.params = $root.ibc.core.client.v1.Params.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryClientParamsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.client.v1.QueryClientParamsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.client.v1.QueryClientParamsResponse} QueryClientParamsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryClientParamsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryClientParamsResponse message. + * @function verify + * @memberof ibc.core.client.v1.QueryClientParamsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryClientParamsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.params != null && message.hasOwnProperty("params")) { + let error = $root.ibc.core.client.v1.Params.verify(message.params); + if (error) + return "params." + error; + } + return null; + }; + + /** + * Creates a QueryClientParamsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.client.v1.QueryClientParamsResponse + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.client.v1.QueryClientParamsResponse} QueryClientParamsResponse + */ + QueryClientParamsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.client.v1.QueryClientParamsResponse) + return object; + let message = new $root.ibc.core.client.v1.QueryClientParamsResponse(); + if (object.params != null) { + if (typeof object.params !== "object") + throw TypeError(".ibc.core.client.v1.QueryClientParamsResponse.params: object expected"); + message.params = $root.ibc.core.client.v1.Params.fromObject(object.params); + } + return message; + }; + + /** + * Creates a plain object from a QueryClientParamsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.client.v1.QueryClientParamsResponse + * @static + * @param {ibc.core.client.v1.QueryClientParamsResponse} message QueryClientParamsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryClientParamsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.params = null; + if (message.params != null && message.hasOwnProperty("params")) + object.params = $root.ibc.core.client.v1.Params.toObject(message.params, options); + return object; + }; + + /** + * Converts this QueryClientParamsResponse to JSON. + * @function toJSON + * @memberof ibc.core.client.v1.QueryClientParamsResponse + * @instance + * @returns {Object.} JSON object + */ + QueryClientParamsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryClientParamsResponse; + })(v1.QueryClientParamsResponse || {}); + + v1.Msg = (function(Msg) { + + /** + * Constructs a new Msg service. + * @memberof ibc.core.client.v1 + * @classdesc Represents a Msg + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Msg(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Msg.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Msg; + + /** + * Creates new Msg service using the specified rpc implementation. + * @function create + * @memberof ibc.core.client.v1.Msg + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Msg} RPC service. Useful where requests and/or responses are streamed. + */ + Msg.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link ibc.core.client.v1.Msg#createClient}. + * @memberof ibc.core.client.v1.Msg + * @typedef CreateClientCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {ibc.core.client.v1.IMsgCreateClientResponse} [response] MsgCreateClientResponse + */ + + /** + * Calls CreateClient. + * @function createClient + * @memberof ibc.core.client.v1.Msg + * @instance + * @param {ibc.core.client.v1.IMsgCreateClient} request MsgCreateClient message or plain object + * @param {ibc.core.client.v1.Msg.CreateClientCallback} callback Node-style callback called with the error, if any, and MsgCreateClientResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Msg.prototype.createClient = function createClient(request, callback) { + return this.rpcCall(createClient, $root.ibc.core.client.v1.MsgCreateClient, $root.ibc.core.client.v1.MsgCreateClientResponse, request, callback); + }, "name", { value: "CreateClient" }); + + /** + * Calls CreateClient. + * @function createClient + * @memberof ibc.core.client.v1.Msg + * @instance + * @param {ibc.core.client.v1.IMsgCreateClient} request MsgCreateClient message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link ibc.core.client.v1.Msg#updateClient}. + * @memberof ibc.core.client.v1.Msg + * @typedef UpdateClientCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {ibc.core.client.v1.IMsgUpdateClientResponse} [response] MsgUpdateClientResponse + */ + + /** + * Calls UpdateClient. + * @function updateClient + * @memberof ibc.core.client.v1.Msg + * @instance + * @param {ibc.core.client.v1.IMsgUpdateClient} request MsgUpdateClient message or plain object + * @param {ibc.core.client.v1.Msg.UpdateClientCallback} callback Node-style callback called with the error, if any, and MsgUpdateClientResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Msg.prototype.updateClient = function updateClient(request, callback) { + return this.rpcCall(updateClient, $root.ibc.core.client.v1.MsgUpdateClient, $root.ibc.core.client.v1.MsgUpdateClientResponse, request, callback); + }, "name", { value: "UpdateClient" }); + + /** + * Calls UpdateClient. + * @function updateClient + * @memberof ibc.core.client.v1.Msg + * @instance + * @param {ibc.core.client.v1.IMsgUpdateClient} request MsgUpdateClient message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link ibc.core.client.v1.Msg#upgradeClient}. + * @memberof ibc.core.client.v1.Msg + * @typedef UpgradeClientCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {ibc.core.client.v1.IMsgUpgradeClientResponse} [response] MsgUpgradeClientResponse + */ + + /** + * Calls UpgradeClient. + * @function upgradeClient + * @memberof ibc.core.client.v1.Msg + * @instance + * @param {ibc.core.client.v1.IMsgUpgradeClient} request MsgUpgradeClient message or plain object + * @param {ibc.core.client.v1.Msg.UpgradeClientCallback} callback Node-style callback called with the error, if any, and MsgUpgradeClientResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Msg.prototype.upgradeClient = function upgradeClient(request, callback) { + return this.rpcCall(upgradeClient, $root.ibc.core.client.v1.MsgUpgradeClient, $root.ibc.core.client.v1.MsgUpgradeClientResponse, request, callback); + }, "name", { value: "UpgradeClient" }); + + /** + * Calls UpgradeClient. + * @function upgradeClient + * @memberof ibc.core.client.v1.Msg + * @instance + * @param {ibc.core.client.v1.IMsgUpgradeClient} request MsgUpgradeClient message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link ibc.core.client.v1.Msg#submitMisbehaviour}. + * @memberof ibc.core.client.v1.Msg + * @typedef SubmitMisbehaviourCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {ibc.core.client.v1.IMsgSubmitMisbehaviourResponse} [response] MsgSubmitMisbehaviourResponse + */ + + /** + * Calls SubmitMisbehaviour. + * @function submitMisbehaviour + * @memberof ibc.core.client.v1.Msg + * @instance + * @param {ibc.core.client.v1.IMsgSubmitMisbehaviour} request MsgSubmitMisbehaviour message or plain object + * @param {ibc.core.client.v1.Msg.SubmitMisbehaviourCallback} callback Node-style callback called with the error, if any, and MsgSubmitMisbehaviourResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Msg.prototype.submitMisbehaviour = function submitMisbehaviour(request, callback) { + return this.rpcCall(submitMisbehaviour, $root.ibc.core.client.v1.MsgSubmitMisbehaviour, $root.ibc.core.client.v1.MsgSubmitMisbehaviourResponse, request, callback); + }, "name", { value: "SubmitMisbehaviour" }); + + /** + * Calls SubmitMisbehaviour. + * @function submitMisbehaviour + * @memberof ibc.core.client.v1.Msg + * @instance + * @param {ibc.core.client.v1.IMsgSubmitMisbehaviour} request MsgSubmitMisbehaviour message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Msg; + })(v1.Msg || {}); + + v1.MsgCreateClient = (function(MsgCreateClient) { + + /** + * Properties of a MsgCreateClient. + * @memberof ibc.core.client.v1 + * @interface IMsgCreateClient + * @property {google.protobuf.IAny|null} [clientState] MsgCreateClient clientState + * @property {google.protobuf.IAny|null} [consensusState] MsgCreateClient consensusState + * @property {string|null} [signer] MsgCreateClient signer + */ + + /** + * Constructs a new MsgCreateClient. + * @memberof ibc.core.client.v1 + * @classdesc Represents a MsgCreateClient. + * @implements IMsgCreateClient + * @constructor + * @param {ibc.core.client.v1.IMsgCreateClient=} [properties] Properties to set + */ + function MsgCreateClient(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgCreateClient clientState. + * @member {google.protobuf.IAny|null|undefined} clientState + * @memberof ibc.core.client.v1.MsgCreateClient + * @instance + */ + MsgCreateClient.prototype.clientState = null; + + /** + * MsgCreateClient consensusState. + * @member {google.protobuf.IAny|null|undefined} consensusState + * @memberof ibc.core.client.v1.MsgCreateClient + * @instance + */ + MsgCreateClient.prototype.consensusState = null; + + /** + * MsgCreateClient signer. + * @member {string} signer + * @memberof ibc.core.client.v1.MsgCreateClient + * @instance + */ + MsgCreateClient.prototype.signer = ""; + + /** + * Creates a new MsgCreateClient instance using the specified properties. + * @function create + * @memberof ibc.core.client.v1.MsgCreateClient + * @static + * @param {ibc.core.client.v1.IMsgCreateClient=} [properties] Properties to set + * @returns {ibc.core.client.v1.MsgCreateClient} MsgCreateClient instance + */ + MsgCreateClient.create = function create(properties) { + return new MsgCreateClient(properties); + }; + + /** + * Encodes the specified MsgCreateClient message. Does not implicitly {@link ibc.core.client.v1.MsgCreateClient.verify|verify} messages. + * @function encode + * @memberof ibc.core.client.v1.MsgCreateClient + * @static + * @param {ibc.core.client.v1.IMsgCreateClient} message MsgCreateClient message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgCreateClient.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.clientState != null && Object.hasOwnProperty.call(message, "clientState")) + $root.google.protobuf.Any.encode(message.clientState, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.consensusState != null && Object.hasOwnProperty.call(message, "consensusState")) + $root.google.protobuf.Any.encode(message.consensusState, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.signer); + return writer; + }; + + /** + * Encodes the specified MsgCreateClient message, length delimited. Does not implicitly {@link ibc.core.client.v1.MsgCreateClient.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.client.v1.MsgCreateClient + * @static + * @param {ibc.core.client.v1.IMsgCreateClient} message MsgCreateClient message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgCreateClient.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgCreateClient message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.client.v1.MsgCreateClient + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.client.v1.MsgCreateClient} MsgCreateClient + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgCreateClient.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.MsgCreateClient(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.clientState = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + case 2: + message.consensusState = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + case 3: + message.signer = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgCreateClient message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.client.v1.MsgCreateClient + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.client.v1.MsgCreateClient} MsgCreateClient + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgCreateClient.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgCreateClient message. + * @function verify + * @memberof ibc.core.client.v1.MsgCreateClient + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgCreateClient.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.clientState != null && message.hasOwnProperty("clientState")) { + let error = $root.google.protobuf.Any.verify(message.clientState); + if (error) + return "clientState." + error; + } + if (message.consensusState != null && message.hasOwnProperty("consensusState")) { + let error = $root.google.protobuf.Any.verify(message.consensusState); + if (error) + return "consensusState." + error; + } + if (message.signer != null && message.hasOwnProperty("signer")) + if (!$util.isString(message.signer)) + return "signer: string expected"; + return null; + }; + + /** + * Creates a MsgCreateClient message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.client.v1.MsgCreateClient + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.client.v1.MsgCreateClient} MsgCreateClient + */ + MsgCreateClient.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.client.v1.MsgCreateClient) + return object; + let message = new $root.ibc.core.client.v1.MsgCreateClient(); + if (object.clientState != null) { + if (typeof object.clientState !== "object") + throw TypeError(".ibc.core.client.v1.MsgCreateClient.clientState: object expected"); + message.clientState = $root.google.protobuf.Any.fromObject(object.clientState); + } + if (object.consensusState != null) { + if (typeof object.consensusState !== "object") + throw TypeError(".ibc.core.client.v1.MsgCreateClient.consensusState: object expected"); + message.consensusState = $root.google.protobuf.Any.fromObject(object.consensusState); + } + if (object.signer != null) + message.signer = String(object.signer); + return message; + }; + + /** + * Creates a plain object from a MsgCreateClient message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.client.v1.MsgCreateClient + * @static + * @param {ibc.core.client.v1.MsgCreateClient} message MsgCreateClient + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgCreateClient.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.clientState = null; + object.consensusState = null; + object.signer = ""; + } + if (message.clientState != null && message.hasOwnProperty("clientState")) + object.clientState = $root.google.protobuf.Any.toObject(message.clientState, options); + if (message.consensusState != null && message.hasOwnProperty("consensusState")) + object.consensusState = $root.google.protobuf.Any.toObject(message.consensusState, options); + if (message.signer != null && message.hasOwnProperty("signer")) + object.signer = message.signer; + return object; + }; + + /** + * Converts this MsgCreateClient to JSON. + * @function toJSON + * @memberof ibc.core.client.v1.MsgCreateClient + * @instance + * @returns {Object.} JSON object + */ + MsgCreateClient.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgCreateClient; + })(v1.MsgCreateClient || {}); + + v1.MsgCreateClientResponse = (function(MsgCreateClientResponse) { + + /** + * Properties of a MsgCreateClientResponse. + * @memberof ibc.core.client.v1 + * @interface IMsgCreateClientResponse + */ + + /** + * Constructs a new MsgCreateClientResponse. + * @memberof ibc.core.client.v1 + * @classdesc Represents a MsgCreateClientResponse. + * @implements IMsgCreateClientResponse + * @constructor + * @param {ibc.core.client.v1.IMsgCreateClientResponse=} [properties] Properties to set + */ + function MsgCreateClientResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new MsgCreateClientResponse instance using the specified properties. + * @function create + * @memberof ibc.core.client.v1.MsgCreateClientResponse + * @static + * @param {ibc.core.client.v1.IMsgCreateClientResponse=} [properties] Properties to set + * @returns {ibc.core.client.v1.MsgCreateClientResponse} MsgCreateClientResponse instance + */ + MsgCreateClientResponse.create = function create(properties) { + return new MsgCreateClientResponse(properties); + }; + + /** + * Encodes the specified MsgCreateClientResponse message. Does not implicitly {@link ibc.core.client.v1.MsgCreateClientResponse.verify|verify} messages. + * @function encode + * @memberof ibc.core.client.v1.MsgCreateClientResponse + * @static + * @param {ibc.core.client.v1.IMsgCreateClientResponse} message MsgCreateClientResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgCreateClientResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MsgCreateClientResponse message, length delimited. Does not implicitly {@link ibc.core.client.v1.MsgCreateClientResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.client.v1.MsgCreateClientResponse + * @static + * @param {ibc.core.client.v1.IMsgCreateClientResponse} message MsgCreateClientResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgCreateClientResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgCreateClientResponse message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.client.v1.MsgCreateClientResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.client.v1.MsgCreateClientResponse} MsgCreateClientResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgCreateClientResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.MsgCreateClientResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgCreateClientResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.client.v1.MsgCreateClientResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.client.v1.MsgCreateClientResponse} MsgCreateClientResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgCreateClientResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgCreateClientResponse message. + * @function verify + * @memberof ibc.core.client.v1.MsgCreateClientResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgCreateClientResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MsgCreateClientResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.client.v1.MsgCreateClientResponse + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.client.v1.MsgCreateClientResponse} MsgCreateClientResponse + */ + MsgCreateClientResponse.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.client.v1.MsgCreateClientResponse) + return object; + return new $root.ibc.core.client.v1.MsgCreateClientResponse(); + }; + + /** + * Creates a plain object from a MsgCreateClientResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.client.v1.MsgCreateClientResponse + * @static + * @param {ibc.core.client.v1.MsgCreateClientResponse} message MsgCreateClientResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgCreateClientResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MsgCreateClientResponse to JSON. + * @function toJSON + * @memberof ibc.core.client.v1.MsgCreateClientResponse + * @instance + * @returns {Object.} JSON object + */ + MsgCreateClientResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgCreateClientResponse; + })(v1.MsgCreateClientResponse || {}); + + v1.MsgUpdateClient = (function(MsgUpdateClient) { + + /** + * Properties of a MsgUpdateClient. + * @memberof ibc.core.client.v1 + * @interface IMsgUpdateClient + * @property {string|null} [clientId] MsgUpdateClient clientId + * @property {google.protobuf.IAny|null} [header] MsgUpdateClient header + * @property {string|null} [signer] MsgUpdateClient signer + */ + + /** + * Constructs a new MsgUpdateClient. + * @memberof ibc.core.client.v1 + * @classdesc Represents a MsgUpdateClient. + * @implements IMsgUpdateClient + * @constructor + * @param {ibc.core.client.v1.IMsgUpdateClient=} [properties] Properties to set + */ + function MsgUpdateClient(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgUpdateClient clientId. + * @member {string} clientId + * @memberof ibc.core.client.v1.MsgUpdateClient + * @instance + */ + MsgUpdateClient.prototype.clientId = ""; + + /** + * MsgUpdateClient header. + * @member {google.protobuf.IAny|null|undefined} header + * @memberof ibc.core.client.v1.MsgUpdateClient + * @instance + */ + MsgUpdateClient.prototype.header = null; + + /** + * MsgUpdateClient signer. + * @member {string} signer + * @memberof ibc.core.client.v1.MsgUpdateClient + * @instance + */ + MsgUpdateClient.prototype.signer = ""; + + /** + * Creates a new MsgUpdateClient instance using the specified properties. + * @function create + * @memberof ibc.core.client.v1.MsgUpdateClient + * @static + * @param {ibc.core.client.v1.IMsgUpdateClient=} [properties] Properties to set + * @returns {ibc.core.client.v1.MsgUpdateClient} MsgUpdateClient instance + */ + MsgUpdateClient.create = function create(properties) { + return new MsgUpdateClient(properties); + }; + + /** + * Encodes the specified MsgUpdateClient message. Does not implicitly {@link ibc.core.client.v1.MsgUpdateClient.verify|verify} messages. + * @function encode + * @memberof ibc.core.client.v1.MsgUpdateClient + * @static + * @param {ibc.core.client.v1.IMsgUpdateClient} message MsgUpdateClient message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgUpdateClient.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.clientId != null && Object.hasOwnProperty.call(message, "clientId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.clientId); + if (message.header != null && Object.hasOwnProperty.call(message, "header")) + $root.google.protobuf.Any.encode(message.header, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.signer); + return writer; + }; + + /** + * Encodes the specified MsgUpdateClient message, length delimited. Does not implicitly {@link ibc.core.client.v1.MsgUpdateClient.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.client.v1.MsgUpdateClient + * @static + * @param {ibc.core.client.v1.IMsgUpdateClient} message MsgUpdateClient message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgUpdateClient.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgUpdateClient message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.client.v1.MsgUpdateClient + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.client.v1.MsgUpdateClient} MsgUpdateClient + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgUpdateClient.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.MsgUpdateClient(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.clientId = reader.string(); + break; + case 2: + message.header = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + case 3: + message.signer = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgUpdateClient message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.client.v1.MsgUpdateClient + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.client.v1.MsgUpdateClient} MsgUpdateClient + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgUpdateClient.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgUpdateClient message. + * @function verify + * @memberof ibc.core.client.v1.MsgUpdateClient + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgUpdateClient.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.clientId != null && message.hasOwnProperty("clientId")) + if (!$util.isString(message.clientId)) + return "clientId: string expected"; + if (message.header != null && message.hasOwnProperty("header")) { + let error = $root.google.protobuf.Any.verify(message.header); + if (error) + return "header." + error; + } + if (message.signer != null && message.hasOwnProperty("signer")) + if (!$util.isString(message.signer)) + return "signer: string expected"; + return null; + }; + + /** + * Creates a MsgUpdateClient message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.client.v1.MsgUpdateClient + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.client.v1.MsgUpdateClient} MsgUpdateClient + */ + MsgUpdateClient.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.client.v1.MsgUpdateClient) + return object; + let message = new $root.ibc.core.client.v1.MsgUpdateClient(); + if (object.clientId != null) + message.clientId = String(object.clientId); + if (object.header != null) { + if (typeof object.header !== "object") + throw TypeError(".ibc.core.client.v1.MsgUpdateClient.header: object expected"); + message.header = $root.google.protobuf.Any.fromObject(object.header); + } + if (object.signer != null) + message.signer = String(object.signer); + return message; + }; + + /** + * Creates a plain object from a MsgUpdateClient message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.client.v1.MsgUpdateClient + * @static + * @param {ibc.core.client.v1.MsgUpdateClient} message MsgUpdateClient + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgUpdateClient.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.clientId = ""; + object.header = null; + object.signer = ""; + } + if (message.clientId != null && message.hasOwnProperty("clientId")) + object.clientId = message.clientId; + if (message.header != null && message.hasOwnProperty("header")) + object.header = $root.google.protobuf.Any.toObject(message.header, options); + if (message.signer != null && message.hasOwnProperty("signer")) + object.signer = message.signer; + return object; + }; + + /** + * Converts this MsgUpdateClient to JSON. + * @function toJSON + * @memberof ibc.core.client.v1.MsgUpdateClient + * @instance + * @returns {Object.} JSON object + */ + MsgUpdateClient.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgUpdateClient; + })(v1.MsgUpdateClient || {}); + + v1.MsgUpdateClientResponse = (function(MsgUpdateClientResponse) { + + /** + * Properties of a MsgUpdateClientResponse. + * @memberof ibc.core.client.v1 + * @interface IMsgUpdateClientResponse + */ + + /** + * Constructs a new MsgUpdateClientResponse. + * @memberof ibc.core.client.v1 + * @classdesc Represents a MsgUpdateClientResponse. + * @implements IMsgUpdateClientResponse + * @constructor + * @param {ibc.core.client.v1.IMsgUpdateClientResponse=} [properties] Properties to set + */ + function MsgUpdateClientResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new MsgUpdateClientResponse instance using the specified properties. + * @function create + * @memberof ibc.core.client.v1.MsgUpdateClientResponse + * @static + * @param {ibc.core.client.v1.IMsgUpdateClientResponse=} [properties] Properties to set + * @returns {ibc.core.client.v1.MsgUpdateClientResponse} MsgUpdateClientResponse instance + */ + MsgUpdateClientResponse.create = function create(properties) { + return new MsgUpdateClientResponse(properties); + }; + + /** + * Encodes the specified MsgUpdateClientResponse message. Does not implicitly {@link ibc.core.client.v1.MsgUpdateClientResponse.verify|verify} messages. + * @function encode + * @memberof ibc.core.client.v1.MsgUpdateClientResponse + * @static + * @param {ibc.core.client.v1.IMsgUpdateClientResponse} message MsgUpdateClientResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgUpdateClientResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MsgUpdateClientResponse message, length delimited. Does not implicitly {@link ibc.core.client.v1.MsgUpdateClientResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.client.v1.MsgUpdateClientResponse + * @static + * @param {ibc.core.client.v1.IMsgUpdateClientResponse} message MsgUpdateClientResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgUpdateClientResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgUpdateClientResponse message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.client.v1.MsgUpdateClientResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.client.v1.MsgUpdateClientResponse} MsgUpdateClientResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgUpdateClientResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.MsgUpdateClientResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgUpdateClientResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.client.v1.MsgUpdateClientResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.client.v1.MsgUpdateClientResponse} MsgUpdateClientResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgUpdateClientResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgUpdateClientResponse message. + * @function verify + * @memberof ibc.core.client.v1.MsgUpdateClientResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgUpdateClientResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MsgUpdateClientResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.client.v1.MsgUpdateClientResponse + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.client.v1.MsgUpdateClientResponse} MsgUpdateClientResponse + */ + MsgUpdateClientResponse.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.client.v1.MsgUpdateClientResponse) + return object; + return new $root.ibc.core.client.v1.MsgUpdateClientResponse(); + }; + + /** + * Creates a plain object from a MsgUpdateClientResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.client.v1.MsgUpdateClientResponse + * @static + * @param {ibc.core.client.v1.MsgUpdateClientResponse} message MsgUpdateClientResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgUpdateClientResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MsgUpdateClientResponse to JSON. + * @function toJSON + * @memberof ibc.core.client.v1.MsgUpdateClientResponse + * @instance + * @returns {Object.} JSON object + */ + MsgUpdateClientResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgUpdateClientResponse; + })(v1.MsgUpdateClientResponse || {}); + + v1.MsgUpgradeClient = (function(MsgUpgradeClient) { + + /** + * Properties of a MsgUpgradeClient. + * @memberof ibc.core.client.v1 + * @interface IMsgUpgradeClient + * @property {string|null} [clientId] MsgUpgradeClient clientId + * @property {google.protobuf.IAny|null} [clientState] MsgUpgradeClient clientState + * @property {google.protobuf.IAny|null} [consensusState] MsgUpgradeClient consensusState + * @property {Uint8Array|null} [proofUpgradeClient] MsgUpgradeClient proofUpgradeClient + * @property {Uint8Array|null} [proofUpgradeConsensusState] MsgUpgradeClient proofUpgradeConsensusState + * @property {string|null} [signer] MsgUpgradeClient signer + */ + + /** + * Constructs a new MsgUpgradeClient. + * @memberof ibc.core.client.v1 + * @classdesc Represents a MsgUpgradeClient. + * @implements IMsgUpgradeClient + * @constructor + * @param {ibc.core.client.v1.IMsgUpgradeClient=} [properties] Properties to set + */ + function MsgUpgradeClient(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgUpgradeClient clientId. + * @member {string} clientId + * @memberof ibc.core.client.v1.MsgUpgradeClient + * @instance + */ + MsgUpgradeClient.prototype.clientId = ""; + + /** + * MsgUpgradeClient clientState. + * @member {google.protobuf.IAny|null|undefined} clientState + * @memberof ibc.core.client.v1.MsgUpgradeClient + * @instance + */ + MsgUpgradeClient.prototype.clientState = null; + + /** + * MsgUpgradeClient consensusState. + * @member {google.protobuf.IAny|null|undefined} consensusState + * @memberof ibc.core.client.v1.MsgUpgradeClient + * @instance + */ + MsgUpgradeClient.prototype.consensusState = null; + + /** + * MsgUpgradeClient proofUpgradeClient. + * @member {Uint8Array} proofUpgradeClient + * @memberof ibc.core.client.v1.MsgUpgradeClient + * @instance + */ + MsgUpgradeClient.prototype.proofUpgradeClient = $util.newBuffer([]); + + /** + * MsgUpgradeClient proofUpgradeConsensusState. + * @member {Uint8Array} proofUpgradeConsensusState + * @memberof ibc.core.client.v1.MsgUpgradeClient + * @instance + */ + MsgUpgradeClient.prototype.proofUpgradeConsensusState = $util.newBuffer([]); + + /** + * MsgUpgradeClient signer. + * @member {string} signer + * @memberof ibc.core.client.v1.MsgUpgradeClient + * @instance + */ + MsgUpgradeClient.prototype.signer = ""; + + /** + * Creates a new MsgUpgradeClient instance using the specified properties. + * @function create + * @memberof ibc.core.client.v1.MsgUpgradeClient + * @static + * @param {ibc.core.client.v1.IMsgUpgradeClient=} [properties] Properties to set + * @returns {ibc.core.client.v1.MsgUpgradeClient} MsgUpgradeClient instance + */ + MsgUpgradeClient.create = function create(properties) { + return new MsgUpgradeClient(properties); + }; + + /** + * Encodes the specified MsgUpgradeClient message. Does not implicitly {@link ibc.core.client.v1.MsgUpgradeClient.verify|verify} messages. + * @function encode + * @memberof ibc.core.client.v1.MsgUpgradeClient + * @static + * @param {ibc.core.client.v1.IMsgUpgradeClient} message MsgUpgradeClient message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgUpgradeClient.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.clientId != null && Object.hasOwnProperty.call(message, "clientId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.clientId); + if (message.clientState != null && Object.hasOwnProperty.call(message, "clientState")) + $root.google.protobuf.Any.encode(message.clientState, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.consensusState != null && Object.hasOwnProperty.call(message, "consensusState")) + $root.google.protobuf.Any.encode(message.consensusState, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.proofUpgradeClient != null && Object.hasOwnProperty.call(message, "proofUpgradeClient")) + writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.proofUpgradeClient); + if (message.proofUpgradeConsensusState != null && Object.hasOwnProperty.call(message, "proofUpgradeConsensusState")) + writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.proofUpgradeConsensusState); + if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.signer); + return writer; + }; + + /** + * Encodes the specified MsgUpgradeClient message, length delimited. Does not implicitly {@link ibc.core.client.v1.MsgUpgradeClient.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.client.v1.MsgUpgradeClient + * @static + * @param {ibc.core.client.v1.IMsgUpgradeClient} message MsgUpgradeClient message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgUpgradeClient.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgUpgradeClient message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.client.v1.MsgUpgradeClient + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.client.v1.MsgUpgradeClient} MsgUpgradeClient + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgUpgradeClient.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.MsgUpgradeClient(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.clientId = reader.string(); + break; + case 2: + message.clientState = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + case 3: + message.consensusState = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + case 4: + message.proofUpgradeClient = reader.bytes(); + break; + case 5: + message.proofUpgradeConsensusState = reader.bytes(); + break; + case 6: + message.signer = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgUpgradeClient message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.client.v1.MsgUpgradeClient + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.client.v1.MsgUpgradeClient} MsgUpgradeClient + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgUpgradeClient.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgUpgradeClient message. + * @function verify + * @memberof ibc.core.client.v1.MsgUpgradeClient + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgUpgradeClient.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.clientId != null && message.hasOwnProperty("clientId")) + if (!$util.isString(message.clientId)) + return "clientId: string expected"; + if (message.clientState != null && message.hasOwnProperty("clientState")) { + let error = $root.google.protobuf.Any.verify(message.clientState); + if (error) + return "clientState." + error; + } + if (message.consensusState != null && message.hasOwnProperty("consensusState")) { + let error = $root.google.protobuf.Any.verify(message.consensusState); + if (error) + return "consensusState." + error; + } + if (message.proofUpgradeClient != null && message.hasOwnProperty("proofUpgradeClient")) + if (!(message.proofUpgradeClient && typeof message.proofUpgradeClient.length === "number" || $util.isString(message.proofUpgradeClient))) + return "proofUpgradeClient: buffer expected"; + if (message.proofUpgradeConsensusState != null && message.hasOwnProperty("proofUpgradeConsensusState")) + if (!(message.proofUpgradeConsensusState && typeof message.proofUpgradeConsensusState.length === "number" || $util.isString(message.proofUpgradeConsensusState))) + return "proofUpgradeConsensusState: buffer expected"; + if (message.signer != null && message.hasOwnProperty("signer")) + if (!$util.isString(message.signer)) + return "signer: string expected"; + return null; + }; + + /** + * Creates a MsgUpgradeClient message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.client.v1.MsgUpgradeClient + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.client.v1.MsgUpgradeClient} MsgUpgradeClient + */ + MsgUpgradeClient.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.client.v1.MsgUpgradeClient) + return object; + let message = new $root.ibc.core.client.v1.MsgUpgradeClient(); + if (object.clientId != null) + message.clientId = String(object.clientId); + if (object.clientState != null) { + if (typeof object.clientState !== "object") + throw TypeError(".ibc.core.client.v1.MsgUpgradeClient.clientState: object expected"); + message.clientState = $root.google.protobuf.Any.fromObject(object.clientState); + } + if (object.consensusState != null) { + if (typeof object.consensusState !== "object") + throw TypeError(".ibc.core.client.v1.MsgUpgradeClient.consensusState: object expected"); + message.consensusState = $root.google.protobuf.Any.fromObject(object.consensusState); + } + if (object.proofUpgradeClient != null) + if (typeof object.proofUpgradeClient === "string") + $util.base64.decode(object.proofUpgradeClient, message.proofUpgradeClient = $util.newBuffer($util.base64.length(object.proofUpgradeClient)), 0); + else if (object.proofUpgradeClient.length) + message.proofUpgradeClient = object.proofUpgradeClient; + if (object.proofUpgradeConsensusState != null) + if (typeof object.proofUpgradeConsensusState === "string") + $util.base64.decode(object.proofUpgradeConsensusState, message.proofUpgradeConsensusState = $util.newBuffer($util.base64.length(object.proofUpgradeConsensusState)), 0); + else if (object.proofUpgradeConsensusState.length) + message.proofUpgradeConsensusState = object.proofUpgradeConsensusState; + if (object.signer != null) + message.signer = String(object.signer); + return message; + }; + + /** + * Creates a plain object from a MsgUpgradeClient message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.client.v1.MsgUpgradeClient + * @static + * @param {ibc.core.client.v1.MsgUpgradeClient} message MsgUpgradeClient + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgUpgradeClient.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.clientId = ""; + object.clientState = null; + object.consensusState = null; + if (options.bytes === String) + object.proofUpgradeClient = ""; + else { + object.proofUpgradeClient = []; + if (options.bytes !== Array) + object.proofUpgradeClient = $util.newBuffer(object.proofUpgradeClient); + } + if (options.bytes === String) + object.proofUpgradeConsensusState = ""; + else { + object.proofUpgradeConsensusState = []; + if (options.bytes !== Array) + object.proofUpgradeConsensusState = $util.newBuffer(object.proofUpgradeConsensusState); + } + object.signer = ""; + } + if (message.clientId != null && message.hasOwnProperty("clientId")) + object.clientId = message.clientId; + if (message.clientState != null && message.hasOwnProperty("clientState")) + object.clientState = $root.google.protobuf.Any.toObject(message.clientState, options); + if (message.consensusState != null && message.hasOwnProperty("consensusState")) + object.consensusState = $root.google.protobuf.Any.toObject(message.consensusState, options); + if (message.proofUpgradeClient != null && message.hasOwnProperty("proofUpgradeClient")) + object.proofUpgradeClient = options.bytes === String ? $util.base64.encode(message.proofUpgradeClient, 0, message.proofUpgradeClient.length) : options.bytes === Array ? Array.prototype.slice.call(message.proofUpgradeClient) : message.proofUpgradeClient; + if (message.proofUpgradeConsensusState != null && message.hasOwnProperty("proofUpgradeConsensusState")) + object.proofUpgradeConsensusState = options.bytes === String ? $util.base64.encode(message.proofUpgradeConsensusState, 0, message.proofUpgradeConsensusState.length) : options.bytes === Array ? Array.prototype.slice.call(message.proofUpgradeConsensusState) : message.proofUpgradeConsensusState; + if (message.signer != null && message.hasOwnProperty("signer")) + object.signer = message.signer; + return object; + }; + + /** + * Converts this MsgUpgradeClient to JSON. + * @function toJSON + * @memberof ibc.core.client.v1.MsgUpgradeClient + * @instance + * @returns {Object.} JSON object + */ + MsgUpgradeClient.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgUpgradeClient; + })(v1.MsgUpgradeClient || {}); + + v1.MsgUpgradeClientResponse = (function(MsgUpgradeClientResponse) { + + /** + * Properties of a MsgUpgradeClientResponse. + * @memberof ibc.core.client.v1 + * @interface IMsgUpgradeClientResponse + */ + + /** + * Constructs a new MsgUpgradeClientResponse. + * @memberof ibc.core.client.v1 + * @classdesc Represents a MsgUpgradeClientResponse. + * @implements IMsgUpgradeClientResponse + * @constructor + * @param {ibc.core.client.v1.IMsgUpgradeClientResponse=} [properties] Properties to set + */ + function MsgUpgradeClientResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new MsgUpgradeClientResponse instance using the specified properties. + * @function create + * @memberof ibc.core.client.v1.MsgUpgradeClientResponse + * @static + * @param {ibc.core.client.v1.IMsgUpgradeClientResponse=} [properties] Properties to set + * @returns {ibc.core.client.v1.MsgUpgradeClientResponse} MsgUpgradeClientResponse instance + */ + MsgUpgradeClientResponse.create = function create(properties) { + return new MsgUpgradeClientResponse(properties); + }; + + /** + * Encodes the specified MsgUpgradeClientResponse message. Does not implicitly {@link ibc.core.client.v1.MsgUpgradeClientResponse.verify|verify} messages. + * @function encode + * @memberof ibc.core.client.v1.MsgUpgradeClientResponse + * @static + * @param {ibc.core.client.v1.IMsgUpgradeClientResponse} message MsgUpgradeClientResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgUpgradeClientResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MsgUpgradeClientResponse message, length delimited. Does not implicitly {@link ibc.core.client.v1.MsgUpgradeClientResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.client.v1.MsgUpgradeClientResponse + * @static + * @param {ibc.core.client.v1.IMsgUpgradeClientResponse} message MsgUpgradeClientResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgUpgradeClientResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgUpgradeClientResponse message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.client.v1.MsgUpgradeClientResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.client.v1.MsgUpgradeClientResponse} MsgUpgradeClientResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgUpgradeClientResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.MsgUpgradeClientResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgUpgradeClientResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.client.v1.MsgUpgradeClientResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.client.v1.MsgUpgradeClientResponse} MsgUpgradeClientResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgUpgradeClientResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgUpgradeClientResponse message. + * @function verify + * @memberof ibc.core.client.v1.MsgUpgradeClientResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgUpgradeClientResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MsgUpgradeClientResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.client.v1.MsgUpgradeClientResponse + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.client.v1.MsgUpgradeClientResponse} MsgUpgradeClientResponse + */ + MsgUpgradeClientResponse.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.client.v1.MsgUpgradeClientResponse) + return object; + return new $root.ibc.core.client.v1.MsgUpgradeClientResponse(); + }; + + /** + * Creates a plain object from a MsgUpgradeClientResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.client.v1.MsgUpgradeClientResponse + * @static + * @param {ibc.core.client.v1.MsgUpgradeClientResponse} message MsgUpgradeClientResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgUpgradeClientResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MsgUpgradeClientResponse to JSON. + * @function toJSON + * @memberof ibc.core.client.v1.MsgUpgradeClientResponse + * @instance + * @returns {Object.} JSON object + */ + MsgUpgradeClientResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgUpgradeClientResponse; + })(v1.MsgUpgradeClientResponse || {}); + + v1.MsgSubmitMisbehaviour = (function(MsgSubmitMisbehaviour) { + + /** + * Properties of a MsgSubmitMisbehaviour. + * @memberof ibc.core.client.v1 + * @interface IMsgSubmitMisbehaviour + * @property {string|null} [clientId] MsgSubmitMisbehaviour clientId + * @property {google.protobuf.IAny|null} [misbehaviour] MsgSubmitMisbehaviour misbehaviour + * @property {string|null} [signer] MsgSubmitMisbehaviour signer + */ + + /** + * Constructs a new MsgSubmitMisbehaviour. + * @memberof ibc.core.client.v1 + * @classdesc Represents a MsgSubmitMisbehaviour. + * @implements IMsgSubmitMisbehaviour + * @constructor + * @param {ibc.core.client.v1.IMsgSubmitMisbehaviour=} [properties] Properties to set + */ + function MsgSubmitMisbehaviour(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgSubmitMisbehaviour clientId. + * @member {string} clientId + * @memberof ibc.core.client.v1.MsgSubmitMisbehaviour + * @instance + */ + MsgSubmitMisbehaviour.prototype.clientId = ""; + + /** + * MsgSubmitMisbehaviour misbehaviour. + * @member {google.protobuf.IAny|null|undefined} misbehaviour + * @memberof ibc.core.client.v1.MsgSubmitMisbehaviour + * @instance + */ + MsgSubmitMisbehaviour.prototype.misbehaviour = null; + + /** + * MsgSubmitMisbehaviour signer. + * @member {string} signer + * @memberof ibc.core.client.v1.MsgSubmitMisbehaviour + * @instance + */ + MsgSubmitMisbehaviour.prototype.signer = ""; + + /** + * Creates a new MsgSubmitMisbehaviour instance using the specified properties. + * @function create + * @memberof ibc.core.client.v1.MsgSubmitMisbehaviour + * @static + * @param {ibc.core.client.v1.IMsgSubmitMisbehaviour=} [properties] Properties to set + * @returns {ibc.core.client.v1.MsgSubmitMisbehaviour} MsgSubmitMisbehaviour instance + */ + MsgSubmitMisbehaviour.create = function create(properties) { + return new MsgSubmitMisbehaviour(properties); + }; + + /** + * Encodes the specified MsgSubmitMisbehaviour message. Does not implicitly {@link ibc.core.client.v1.MsgSubmitMisbehaviour.verify|verify} messages. + * @function encode + * @memberof ibc.core.client.v1.MsgSubmitMisbehaviour + * @static + * @param {ibc.core.client.v1.IMsgSubmitMisbehaviour} message MsgSubmitMisbehaviour message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgSubmitMisbehaviour.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.clientId != null && Object.hasOwnProperty.call(message, "clientId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.clientId); + if (message.misbehaviour != null && Object.hasOwnProperty.call(message, "misbehaviour")) + $root.google.protobuf.Any.encode(message.misbehaviour, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.signer); + return writer; + }; + + /** + * Encodes the specified MsgSubmitMisbehaviour message, length delimited. Does not implicitly {@link ibc.core.client.v1.MsgSubmitMisbehaviour.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.client.v1.MsgSubmitMisbehaviour + * @static + * @param {ibc.core.client.v1.IMsgSubmitMisbehaviour} message MsgSubmitMisbehaviour message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgSubmitMisbehaviour.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgSubmitMisbehaviour message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.client.v1.MsgSubmitMisbehaviour + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.client.v1.MsgSubmitMisbehaviour} MsgSubmitMisbehaviour + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgSubmitMisbehaviour.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.MsgSubmitMisbehaviour(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.clientId = reader.string(); + break; + case 2: + message.misbehaviour = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + case 3: + message.signer = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgSubmitMisbehaviour message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.client.v1.MsgSubmitMisbehaviour + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.client.v1.MsgSubmitMisbehaviour} MsgSubmitMisbehaviour + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgSubmitMisbehaviour.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgSubmitMisbehaviour message. + * @function verify + * @memberof ibc.core.client.v1.MsgSubmitMisbehaviour + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgSubmitMisbehaviour.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.clientId != null && message.hasOwnProperty("clientId")) + if (!$util.isString(message.clientId)) + return "clientId: string expected"; + if (message.misbehaviour != null && message.hasOwnProperty("misbehaviour")) { + let error = $root.google.protobuf.Any.verify(message.misbehaviour); + if (error) + return "misbehaviour." + error; + } + if (message.signer != null && message.hasOwnProperty("signer")) + if (!$util.isString(message.signer)) + return "signer: string expected"; + return null; + }; + + /** + * Creates a MsgSubmitMisbehaviour message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.client.v1.MsgSubmitMisbehaviour + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.client.v1.MsgSubmitMisbehaviour} MsgSubmitMisbehaviour + */ + MsgSubmitMisbehaviour.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.client.v1.MsgSubmitMisbehaviour) + return object; + let message = new $root.ibc.core.client.v1.MsgSubmitMisbehaviour(); + if (object.clientId != null) + message.clientId = String(object.clientId); + if (object.misbehaviour != null) { + if (typeof object.misbehaviour !== "object") + throw TypeError(".ibc.core.client.v1.MsgSubmitMisbehaviour.misbehaviour: object expected"); + message.misbehaviour = $root.google.protobuf.Any.fromObject(object.misbehaviour); + } + if (object.signer != null) + message.signer = String(object.signer); + return message; + }; + + /** + * Creates a plain object from a MsgSubmitMisbehaviour message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.client.v1.MsgSubmitMisbehaviour + * @static + * @param {ibc.core.client.v1.MsgSubmitMisbehaviour} message MsgSubmitMisbehaviour + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgSubmitMisbehaviour.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.clientId = ""; + object.misbehaviour = null; + object.signer = ""; + } + if (message.clientId != null && message.hasOwnProperty("clientId")) + object.clientId = message.clientId; + if (message.misbehaviour != null && message.hasOwnProperty("misbehaviour")) + object.misbehaviour = $root.google.protobuf.Any.toObject(message.misbehaviour, options); + if (message.signer != null && message.hasOwnProperty("signer")) + object.signer = message.signer; + return object; + }; + + /** + * Converts this MsgSubmitMisbehaviour to JSON. + * @function toJSON + * @memberof ibc.core.client.v1.MsgSubmitMisbehaviour + * @instance + * @returns {Object.} JSON object + */ + MsgSubmitMisbehaviour.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgSubmitMisbehaviour; + })(v1.MsgSubmitMisbehaviour || {}); + + v1.MsgSubmitMisbehaviourResponse = (function(MsgSubmitMisbehaviourResponse) { + + /** + * Properties of a MsgSubmitMisbehaviourResponse. + * @memberof ibc.core.client.v1 + * @interface IMsgSubmitMisbehaviourResponse + */ + + /** + * Constructs a new MsgSubmitMisbehaviourResponse. + * @memberof ibc.core.client.v1 + * @classdesc Represents a MsgSubmitMisbehaviourResponse. + * @implements IMsgSubmitMisbehaviourResponse + * @constructor + * @param {ibc.core.client.v1.IMsgSubmitMisbehaviourResponse=} [properties] Properties to set + */ + function MsgSubmitMisbehaviourResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new MsgSubmitMisbehaviourResponse instance using the specified properties. + * @function create + * @memberof ibc.core.client.v1.MsgSubmitMisbehaviourResponse + * @static + * @param {ibc.core.client.v1.IMsgSubmitMisbehaviourResponse=} [properties] Properties to set + * @returns {ibc.core.client.v1.MsgSubmitMisbehaviourResponse} MsgSubmitMisbehaviourResponse instance + */ + MsgSubmitMisbehaviourResponse.create = function create(properties) { + return new MsgSubmitMisbehaviourResponse(properties); + }; + + /** + * Encodes the specified MsgSubmitMisbehaviourResponse message. Does not implicitly {@link ibc.core.client.v1.MsgSubmitMisbehaviourResponse.verify|verify} messages. + * @function encode + * @memberof ibc.core.client.v1.MsgSubmitMisbehaviourResponse + * @static + * @param {ibc.core.client.v1.IMsgSubmitMisbehaviourResponse} message MsgSubmitMisbehaviourResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgSubmitMisbehaviourResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MsgSubmitMisbehaviourResponse message, length delimited. Does not implicitly {@link ibc.core.client.v1.MsgSubmitMisbehaviourResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof ibc.core.client.v1.MsgSubmitMisbehaviourResponse + * @static + * @param {ibc.core.client.v1.IMsgSubmitMisbehaviourResponse} message MsgSubmitMisbehaviourResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgSubmitMisbehaviourResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgSubmitMisbehaviourResponse message from the specified reader or buffer. + * @function decode + * @memberof ibc.core.client.v1.MsgSubmitMisbehaviourResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {ibc.core.client.v1.MsgSubmitMisbehaviourResponse} MsgSubmitMisbehaviourResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgSubmitMisbehaviourResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.MsgSubmitMisbehaviourResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgSubmitMisbehaviourResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof ibc.core.client.v1.MsgSubmitMisbehaviourResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {ibc.core.client.v1.MsgSubmitMisbehaviourResponse} MsgSubmitMisbehaviourResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgSubmitMisbehaviourResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgSubmitMisbehaviourResponse message. + * @function verify + * @memberof ibc.core.client.v1.MsgSubmitMisbehaviourResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgSubmitMisbehaviourResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MsgSubmitMisbehaviourResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof ibc.core.client.v1.MsgSubmitMisbehaviourResponse + * @static + * @param {Object.} object Plain object + * @returns {ibc.core.client.v1.MsgSubmitMisbehaviourResponse} MsgSubmitMisbehaviourResponse + */ + MsgSubmitMisbehaviourResponse.fromObject = function fromObject(object) { + if (object instanceof $root.ibc.core.client.v1.MsgSubmitMisbehaviourResponse) + return object; + return new $root.ibc.core.client.v1.MsgSubmitMisbehaviourResponse(); + }; + + /** + * Creates a plain object from a MsgSubmitMisbehaviourResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof ibc.core.client.v1.MsgSubmitMisbehaviourResponse + * @static + * @param {ibc.core.client.v1.MsgSubmitMisbehaviourResponse} message MsgSubmitMisbehaviourResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgSubmitMisbehaviourResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MsgSubmitMisbehaviourResponse to JSON. + * @function toJSON + * @memberof ibc.core.client.v1.MsgSubmitMisbehaviourResponse + * @instance + * @returns {Object.} JSON object + */ + MsgSubmitMisbehaviourResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgSubmitMisbehaviourResponse; + })(v1.MsgSubmitMisbehaviourResponse || {}); + + return v1; + })(client.v1 || {}); + + return client; + })(core.client || {}); + + return core; + })(ibc.core || {}); + + return ibc; +})($root.ibc || {}); + +/** + * Namespace cosmos. + * @exports cosmos + * @namespace + */ + +export const cosmos = $root.cosmos = ((cosmos) => { + + /** + * Namespace base. + * @memberof cosmos + * @namespace + */ + + cosmos.base = (function(base) { + + /** + * Namespace v1beta1. + * @memberof cosmos.base + * @namespace + */ + + base.v1beta1 = (function(v1beta1) { + + v1beta1.Coin = (function(Coin) { + + /** + * Properties of a Coin. + * @memberof cosmos.base.v1beta1 + * @interface ICoin + * @property {string|null} [denom] Coin denom + * @property {string|null} [amount] Coin amount + */ + + /** + * Constructs a new Coin. + * @memberof cosmos.base.v1beta1 + * @classdesc Represents a Coin. + * @implements ICoin + * @constructor + * @param {cosmos.base.v1beta1.ICoin=} [properties] Properties to set + */ + function Coin(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Coin denom. + * @member {string} denom + * @memberof cosmos.base.v1beta1.Coin + * @instance + */ + Coin.prototype.denom = ""; + + /** + * Coin amount. + * @member {string} amount + * @memberof cosmos.base.v1beta1.Coin + * @instance + */ + Coin.prototype.amount = ""; + + /** + * Creates a new Coin instance using the specified properties. + * @function create + * @memberof cosmos.base.v1beta1.Coin + * @static + * @param {cosmos.base.v1beta1.ICoin=} [properties] Properties to set + * @returns {cosmos.base.v1beta1.Coin} Coin instance + */ + Coin.create = function create(properties) { + return new Coin(properties); + }; + + /** + * Encodes the specified Coin message. Does not implicitly {@link cosmos.base.v1beta1.Coin.verify|verify} messages. + * @function encode + * @memberof cosmos.base.v1beta1.Coin + * @static + * @param {cosmos.base.v1beta1.ICoin} message Coin message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Coin.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.denom != null && Object.hasOwnProperty.call(message, "denom")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.denom); + if (message.amount != null && Object.hasOwnProperty.call(message, "amount")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.amount); + return writer; + }; + + /** + * Encodes the specified Coin message, length delimited. Does not implicitly {@link cosmos.base.v1beta1.Coin.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.base.v1beta1.Coin + * @static + * @param {cosmos.base.v1beta1.ICoin} message Coin message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Coin.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Coin message from the specified reader or buffer. + * @function decode + * @memberof cosmos.base.v1beta1.Coin + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.base.v1beta1.Coin} Coin + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Coin.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.v1beta1.Coin(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.denom = reader.string(); + break; + case 2: + message.amount = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Coin message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.base.v1beta1.Coin + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.base.v1beta1.Coin} Coin + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Coin.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Coin message. + * @function verify + * @memberof cosmos.base.v1beta1.Coin + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Coin.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.denom != null && message.hasOwnProperty("denom")) + if (!$util.isString(message.denom)) + return "denom: string expected"; + if (message.amount != null && message.hasOwnProperty("amount")) + if (!$util.isString(message.amount)) + return "amount: string expected"; + return null; + }; + + /** + * Creates a Coin message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.base.v1beta1.Coin + * @static + * @param {Object.} object Plain object + * @returns {cosmos.base.v1beta1.Coin} Coin + */ + Coin.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.base.v1beta1.Coin) + return object; + let message = new $root.cosmos.base.v1beta1.Coin(); + if (object.denom != null) + message.denom = String(object.denom); + if (object.amount != null) + message.amount = String(object.amount); + return message; + }; + + /** + * Creates a plain object from a Coin message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.base.v1beta1.Coin + * @static + * @param {cosmos.base.v1beta1.Coin} message Coin + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Coin.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.denom = ""; + object.amount = ""; + } + if (message.denom != null && message.hasOwnProperty("denom")) + object.denom = message.denom; + if (message.amount != null && message.hasOwnProperty("amount")) + object.amount = message.amount; + return object; + }; + + /** + * Converts this Coin to JSON. + * @function toJSON + * @memberof cosmos.base.v1beta1.Coin + * @instance + * @returns {Object.} JSON object + */ + Coin.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Coin; + })(v1beta1.Coin || {}); + + v1beta1.DecCoin = (function(DecCoin) { + + /** + * Properties of a DecCoin. + * @memberof cosmos.base.v1beta1 + * @interface IDecCoin + * @property {string|null} [denom] DecCoin denom + * @property {string|null} [amount] DecCoin amount + */ + + /** + * Constructs a new DecCoin. + * @memberof cosmos.base.v1beta1 + * @classdesc Represents a DecCoin. + * @implements IDecCoin + * @constructor + * @param {cosmos.base.v1beta1.IDecCoin=} [properties] Properties to set + */ + function DecCoin(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DecCoin denom. + * @member {string} denom + * @memberof cosmos.base.v1beta1.DecCoin + * @instance + */ + DecCoin.prototype.denom = ""; + + /** + * DecCoin amount. + * @member {string} amount + * @memberof cosmos.base.v1beta1.DecCoin + * @instance + */ + DecCoin.prototype.amount = ""; + + /** + * Creates a new DecCoin instance using the specified properties. + * @function create + * @memberof cosmos.base.v1beta1.DecCoin + * @static + * @param {cosmos.base.v1beta1.IDecCoin=} [properties] Properties to set + * @returns {cosmos.base.v1beta1.DecCoin} DecCoin instance + */ + DecCoin.create = function create(properties) { + return new DecCoin(properties); + }; + + /** + * Encodes the specified DecCoin message. Does not implicitly {@link cosmos.base.v1beta1.DecCoin.verify|verify} messages. + * @function encode + * @memberof cosmos.base.v1beta1.DecCoin + * @static + * @param {cosmos.base.v1beta1.IDecCoin} message DecCoin message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DecCoin.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.denom != null && Object.hasOwnProperty.call(message, "denom")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.denom); + if (message.amount != null && Object.hasOwnProperty.call(message, "amount")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.amount); + return writer; + }; + + /** + * Encodes the specified DecCoin message, length delimited. Does not implicitly {@link cosmos.base.v1beta1.DecCoin.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.base.v1beta1.DecCoin + * @static + * @param {cosmos.base.v1beta1.IDecCoin} message DecCoin message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DecCoin.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DecCoin message from the specified reader or buffer. + * @function decode + * @memberof cosmos.base.v1beta1.DecCoin + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.base.v1beta1.DecCoin} DecCoin + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DecCoin.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.v1beta1.DecCoin(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.denom = reader.string(); + break; + case 2: + message.amount = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DecCoin message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.base.v1beta1.DecCoin + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.base.v1beta1.DecCoin} DecCoin + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DecCoin.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DecCoin message. + * @function verify + * @memberof cosmos.base.v1beta1.DecCoin + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DecCoin.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.denom != null && message.hasOwnProperty("denom")) + if (!$util.isString(message.denom)) + return "denom: string expected"; + if (message.amount != null && message.hasOwnProperty("amount")) + if (!$util.isString(message.amount)) + return "amount: string expected"; + return null; + }; + + /** + * Creates a DecCoin message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.base.v1beta1.DecCoin + * @static + * @param {Object.} object Plain object + * @returns {cosmos.base.v1beta1.DecCoin} DecCoin + */ + DecCoin.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.base.v1beta1.DecCoin) + return object; + let message = new $root.cosmos.base.v1beta1.DecCoin(); + if (object.denom != null) + message.denom = String(object.denom); + if (object.amount != null) + message.amount = String(object.amount); + return message; + }; + + /** + * Creates a plain object from a DecCoin message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.base.v1beta1.DecCoin + * @static + * @param {cosmos.base.v1beta1.DecCoin} message DecCoin + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DecCoin.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.denom = ""; + object.amount = ""; + } + if (message.denom != null && message.hasOwnProperty("denom")) + object.denom = message.denom; + if (message.amount != null && message.hasOwnProperty("amount")) + object.amount = message.amount; + return object; + }; + + /** + * Converts this DecCoin to JSON. + * @function toJSON + * @memberof cosmos.base.v1beta1.DecCoin + * @instance + * @returns {Object.} JSON object + */ + DecCoin.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DecCoin; + })(v1beta1.DecCoin || {}); + + v1beta1.IntProto = (function(IntProto) { + + /** + * Properties of an IntProto. + * @memberof cosmos.base.v1beta1 + * @interface IIntProto + * @property {string|null} [int] IntProto int + */ + + /** + * Constructs a new IntProto. + * @memberof cosmos.base.v1beta1 + * @classdesc Represents an IntProto. + * @implements IIntProto + * @constructor + * @param {cosmos.base.v1beta1.IIntProto=} [properties] Properties to set + */ + function IntProto(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * IntProto int. + * @member {string} int + * @memberof cosmos.base.v1beta1.IntProto + * @instance + */ + IntProto.prototype.int = ""; + + /** + * Creates a new IntProto instance using the specified properties. + * @function create + * @memberof cosmos.base.v1beta1.IntProto + * @static + * @param {cosmos.base.v1beta1.IIntProto=} [properties] Properties to set + * @returns {cosmos.base.v1beta1.IntProto} IntProto instance + */ + IntProto.create = function create(properties) { + return new IntProto(properties); + }; + + /** + * Encodes the specified IntProto message. Does not implicitly {@link cosmos.base.v1beta1.IntProto.verify|verify} messages. + * @function encode + * @memberof cosmos.base.v1beta1.IntProto + * @static + * @param {cosmos.base.v1beta1.IIntProto} message IntProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IntProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.int != null && Object.hasOwnProperty.call(message, "int")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.int); + return writer; + }; + + /** + * Encodes the specified IntProto message, length delimited. Does not implicitly {@link cosmos.base.v1beta1.IntProto.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.base.v1beta1.IntProto + * @static + * @param {cosmos.base.v1beta1.IIntProto} message IntProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IntProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IntProto message from the specified reader or buffer. + * @function decode + * @memberof cosmos.base.v1beta1.IntProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.base.v1beta1.IntProto} IntProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IntProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.v1beta1.IntProto(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.int = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IntProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.base.v1beta1.IntProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.base.v1beta1.IntProto} IntProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IntProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IntProto message. + * @function verify + * @memberof cosmos.base.v1beta1.IntProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IntProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.int != null && message.hasOwnProperty("int")) + if (!$util.isString(message.int)) + return "int: string expected"; + return null; + }; + + /** + * Creates an IntProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.base.v1beta1.IntProto + * @static + * @param {Object.} object Plain object + * @returns {cosmos.base.v1beta1.IntProto} IntProto + */ + IntProto.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.base.v1beta1.IntProto) + return object; + let message = new $root.cosmos.base.v1beta1.IntProto(); + if (object.int != null) + message.int = String(object.int); + return message; + }; + + /** + * Creates a plain object from an IntProto message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.base.v1beta1.IntProto + * @static + * @param {cosmos.base.v1beta1.IntProto} message IntProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IntProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.int = ""; + if (message.int != null && message.hasOwnProperty("int")) + object.int = message.int; + return object; + }; + + /** + * Converts this IntProto to JSON. + * @function toJSON + * @memberof cosmos.base.v1beta1.IntProto + * @instance + * @returns {Object.} JSON object + */ + IntProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return IntProto; + })(v1beta1.IntProto || {}); + + v1beta1.DecProto = (function(DecProto) { + + /** + * Properties of a DecProto. + * @memberof cosmos.base.v1beta1 + * @interface IDecProto + * @property {string|null} [dec] DecProto dec + */ + + /** + * Constructs a new DecProto. + * @memberof cosmos.base.v1beta1 + * @classdesc Represents a DecProto. + * @implements IDecProto + * @constructor + * @param {cosmos.base.v1beta1.IDecProto=} [properties] Properties to set + */ + function DecProto(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DecProto dec. + * @member {string} dec + * @memberof cosmos.base.v1beta1.DecProto + * @instance + */ + DecProto.prototype.dec = ""; + + /** + * Creates a new DecProto instance using the specified properties. + * @function create + * @memberof cosmos.base.v1beta1.DecProto + * @static + * @param {cosmos.base.v1beta1.IDecProto=} [properties] Properties to set + * @returns {cosmos.base.v1beta1.DecProto} DecProto instance + */ + DecProto.create = function create(properties) { + return new DecProto(properties); + }; + + /** + * Encodes the specified DecProto message. Does not implicitly {@link cosmos.base.v1beta1.DecProto.verify|verify} messages. + * @function encode + * @memberof cosmos.base.v1beta1.DecProto + * @static + * @param {cosmos.base.v1beta1.IDecProto} message DecProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DecProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dec != null && Object.hasOwnProperty.call(message, "dec")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.dec); + return writer; + }; + + /** + * Encodes the specified DecProto message, length delimited. Does not implicitly {@link cosmos.base.v1beta1.DecProto.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.base.v1beta1.DecProto + * @static + * @param {cosmos.base.v1beta1.IDecProto} message DecProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DecProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DecProto message from the specified reader or buffer. + * @function decode + * @memberof cosmos.base.v1beta1.DecProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.base.v1beta1.DecProto} DecProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DecProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.v1beta1.DecProto(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.dec = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DecProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.base.v1beta1.DecProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.base.v1beta1.DecProto} DecProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DecProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DecProto message. + * @function verify + * @memberof cosmos.base.v1beta1.DecProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DecProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dec != null && message.hasOwnProperty("dec")) + if (!$util.isString(message.dec)) + return "dec: string expected"; + return null; + }; + + /** + * Creates a DecProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.base.v1beta1.DecProto + * @static + * @param {Object.} object Plain object + * @returns {cosmos.base.v1beta1.DecProto} DecProto + */ + DecProto.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.base.v1beta1.DecProto) + return object; + let message = new $root.cosmos.base.v1beta1.DecProto(); + if (object.dec != null) + message.dec = String(object.dec); + return message; + }; + + /** + * Creates a plain object from a DecProto message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.base.v1beta1.DecProto + * @static + * @param {cosmos.base.v1beta1.DecProto} message DecProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DecProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) + object.dec = ""; + if (message.dec != null && message.hasOwnProperty("dec")) + object.dec = message.dec; + return object; + }; + + /** + * Converts this DecProto to JSON. + * @function toJSON + * @memberof cosmos.base.v1beta1.DecProto + * @instance + * @returns {Object.} JSON object + */ + DecProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DecProto; + })(v1beta1.DecProto || {}); + + return v1beta1; + })(base.v1beta1 || {}); + + /** + * Namespace query. + * @memberof cosmos.base + * @namespace + */ + + base.query = (function(query) { + + /** + * Namespace v1beta1. + * @memberof cosmos.base.query + * @namespace + */ + + query.v1beta1 = (function(v1beta1) { + + v1beta1.PageRequest = (function(PageRequest) { + + /** + * Properties of a PageRequest. + * @memberof cosmos.base.query.v1beta1 + * @interface IPageRequest + * @property {Uint8Array|null} [key] PageRequest key + * @property {number|Long|null} [offset] PageRequest offset + * @property {number|Long|null} [limit] PageRequest limit + * @property {boolean|null} [countTotal] PageRequest countTotal + */ + + /** + * Constructs a new PageRequest. + * @memberof cosmos.base.query.v1beta1 + * @classdesc Represents a PageRequest. + * @implements IPageRequest + * @constructor + * @param {cosmos.base.query.v1beta1.IPageRequest=} [properties] Properties to set + */ + function PageRequest(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PageRequest key. + * @member {Uint8Array} key + * @memberof cosmos.base.query.v1beta1.PageRequest + * @instance + */ + PageRequest.prototype.key = $util.newBuffer([]); + + /** + * PageRequest offset. + * @member {number|Long} offset + * @memberof cosmos.base.query.v1beta1.PageRequest + * @instance + */ + PageRequest.prototype.offset = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * PageRequest limit. + * @member {number|Long} limit + * @memberof cosmos.base.query.v1beta1.PageRequest + * @instance + */ + PageRequest.prototype.limit = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * PageRequest countTotal. + * @member {boolean} countTotal + * @memberof cosmos.base.query.v1beta1.PageRequest + * @instance + */ + PageRequest.prototype.countTotal = false; + + /** + * Creates a new PageRequest instance using the specified properties. + * @function create + * @memberof cosmos.base.query.v1beta1.PageRequest + * @static + * @param {cosmos.base.query.v1beta1.IPageRequest=} [properties] Properties to set + * @returns {cosmos.base.query.v1beta1.PageRequest} PageRequest instance + */ + PageRequest.create = function create(properties) { + return new PageRequest(properties); + }; + + /** + * Encodes the specified PageRequest message. Does not implicitly {@link cosmos.base.query.v1beta1.PageRequest.verify|verify} messages. + * @function encode + * @memberof cosmos.base.query.v1beta1.PageRequest + * @static + * @param {cosmos.base.query.v1beta1.IPageRequest} message PageRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PageRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.key); + if (message.offset != null && Object.hasOwnProperty.call(message, "offset")) + writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.offset); + if (message.limit != null && Object.hasOwnProperty.call(message, "limit")) + writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.limit); + if (message.countTotal != null && Object.hasOwnProperty.call(message, "countTotal")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.countTotal); + return writer; + }; + + /** + * Encodes the specified PageRequest message, length delimited. Does not implicitly {@link cosmos.base.query.v1beta1.PageRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.base.query.v1beta1.PageRequest + * @static + * @param {cosmos.base.query.v1beta1.IPageRequest} message PageRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PageRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PageRequest message from the specified reader or buffer. + * @function decode + * @memberof cosmos.base.query.v1beta1.PageRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.base.query.v1beta1.PageRequest} PageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PageRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.query.v1beta1.PageRequest(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.key = reader.bytes(); + break; + case 2: + message.offset = reader.uint64(); + break; + case 3: + message.limit = reader.uint64(); + break; + case 4: + message.countTotal = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PageRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.base.query.v1beta1.PageRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.base.query.v1beta1.PageRequest} PageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PageRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PageRequest message. + * @function verify + * @memberof cosmos.base.query.v1beta1.PageRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PageRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.key != null && message.hasOwnProperty("key")) + if (!(message.key && typeof message.key.length === "number" || $util.isString(message.key))) + return "key: buffer expected"; + if (message.offset != null && message.hasOwnProperty("offset")) + if (!$util.isInteger(message.offset) && !(message.offset && $util.isInteger(message.offset.low) && $util.isInteger(message.offset.high))) + return "offset: integer|Long expected"; + if (message.limit != null && message.hasOwnProperty("limit")) + if (!$util.isInteger(message.limit) && !(message.limit && $util.isInteger(message.limit.low) && $util.isInteger(message.limit.high))) + return "limit: integer|Long expected"; + if (message.countTotal != null && message.hasOwnProperty("countTotal")) + if (typeof message.countTotal !== "boolean") + return "countTotal: boolean expected"; + return null; + }; + + /** + * Creates a PageRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.base.query.v1beta1.PageRequest + * @static + * @param {Object.} object Plain object + * @returns {cosmos.base.query.v1beta1.PageRequest} PageRequest + */ + PageRequest.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.base.query.v1beta1.PageRequest) + return object; + let message = new $root.cosmos.base.query.v1beta1.PageRequest(); + if (object.key != null) + if (typeof object.key === "string") + $util.base64.decode(object.key, message.key = $util.newBuffer($util.base64.length(object.key)), 0); + else if (object.key.length) + message.key = object.key; + if (object.offset != null) + if ($util.Long) + (message.offset = $util.Long.fromValue(object.offset)).unsigned = true; + else if (typeof object.offset === "string") + message.offset = parseInt(object.offset, 10); + else if (typeof object.offset === "number") + message.offset = object.offset; + else if (typeof object.offset === "object") + message.offset = new $util.LongBits(object.offset.low >>> 0, object.offset.high >>> 0).toNumber(true); + if (object.limit != null) + if ($util.Long) + (message.limit = $util.Long.fromValue(object.limit)).unsigned = true; + else if (typeof object.limit === "string") + message.limit = parseInt(object.limit, 10); + else if (typeof object.limit === "number") + message.limit = object.limit; + else if (typeof object.limit === "object") + message.limit = new $util.LongBits(object.limit.low >>> 0, object.limit.high >>> 0).toNumber(true); + if (object.countTotal != null) + message.countTotal = Boolean(object.countTotal); + return message; + }; + + /** + * Creates a plain object from a PageRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.base.query.v1beta1.PageRequest + * @static + * @param {cosmos.base.query.v1beta1.PageRequest} message PageRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PageRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + if (options.bytes === String) + object.key = ""; + else { + object.key = []; + if (options.bytes !== Array) + object.key = $util.newBuffer(object.key); + } + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.offset = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.offset = options.longs === String ? "0" : 0; + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.limit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.limit = options.longs === String ? "0" : 0; + object.countTotal = false; + } + if (message.key != null && message.hasOwnProperty("key")) + object.key = options.bytes === String ? $util.base64.encode(message.key, 0, message.key.length) : options.bytes === Array ? Array.prototype.slice.call(message.key) : message.key; + if (message.offset != null && message.hasOwnProperty("offset")) + if (typeof message.offset === "number") + object.offset = options.longs === String ? String(message.offset) : message.offset; + else + object.offset = options.longs === String ? $util.Long.prototype.toString.call(message.offset) : options.longs === Number ? new $util.LongBits(message.offset.low >>> 0, message.offset.high >>> 0).toNumber(true) : message.offset; + if (message.limit != null && message.hasOwnProperty("limit")) + if (typeof message.limit === "number") + object.limit = options.longs === String ? String(message.limit) : message.limit; + else + object.limit = options.longs === String ? $util.Long.prototype.toString.call(message.limit) : options.longs === Number ? new $util.LongBits(message.limit.low >>> 0, message.limit.high >>> 0).toNumber(true) : message.limit; + if (message.countTotal != null && message.hasOwnProperty("countTotal")) + object.countTotal = message.countTotal; + return object; + }; + + /** + * Converts this PageRequest to JSON. + * @function toJSON + * @memberof cosmos.base.query.v1beta1.PageRequest + * @instance + * @returns {Object.} JSON object + */ + PageRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PageRequest; + })(v1beta1.PageRequest || {}); + + v1beta1.PageResponse = (function(PageResponse) { + + /** + * Properties of a PageResponse. + * @memberof cosmos.base.query.v1beta1 + * @interface IPageResponse + * @property {Uint8Array|null} [nextKey] PageResponse nextKey + * @property {number|Long|null} [total] PageResponse total + */ + + /** + * Constructs a new PageResponse. + * @memberof cosmos.base.query.v1beta1 + * @classdesc Represents a PageResponse. + * @implements IPageResponse + * @constructor + * @param {cosmos.base.query.v1beta1.IPageResponse=} [properties] Properties to set + */ + function PageResponse(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PageResponse nextKey. + * @member {Uint8Array} nextKey + * @memberof cosmos.base.query.v1beta1.PageResponse + * @instance + */ + PageResponse.prototype.nextKey = $util.newBuffer([]); + + /** + * PageResponse total. + * @member {number|Long} total + * @memberof cosmos.base.query.v1beta1.PageResponse + * @instance + */ + PageResponse.prototype.total = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new PageResponse instance using the specified properties. + * @function create + * @memberof cosmos.base.query.v1beta1.PageResponse + * @static + * @param {cosmos.base.query.v1beta1.IPageResponse=} [properties] Properties to set + * @returns {cosmos.base.query.v1beta1.PageResponse} PageResponse instance + */ + PageResponse.create = function create(properties) { + return new PageResponse(properties); + }; + + /** + * Encodes the specified PageResponse message. Does not implicitly {@link cosmos.base.query.v1beta1.PageResponse.verify|verify} messages. + * @function encode + * @memberof cosmos.base.query.v1beta1.PageResponse + * @static + * @param {cosmos.base.query.v1beta1.IPageResponse} message PageResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PageResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.nextKey != null && Object.hasOwnProperty.call(message, "nextKey")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.nextKey); + if (message.total != null && Object.hasOwnProperty.call(message, "total")) + writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.total); + return writer; + }; + + /** + * Encodes the specified PageResponse message, length delimited. Does not implicitly {@link cosmos.base.query.v1beta1.PageResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos.base.query.v1beta1.PageResponse + * @static + * @param {cosmos.base.query.v1beta1.IPageResponse} message PageResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PageResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PageResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos.base.query.v1beta1.PageResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos.base.query.v1beta1.PageResponse} PageResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PageResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.query.v1beta1.PageResponse(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.nextKey = reader.bytes(); + break; + case 2: + message.total = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PageResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos.base.query.v1beta1.PageResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos.base.query.v1beta1.PageResponse} PageResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PageResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PageResponse message. + * @function verify + * @memberof cosmos.base.query.v1beta1.PageResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PageResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.nextKey != null && message.hasOwnProperty("nextKey")) + if (!(message.nextKey && typeof message.nextKey.length === "number" || $util.isString(message.nextKey))) + return "nextKey: buffer expected"; + if (message.total != null && message.hasOwnProperty("total")) + if (!$util.isInteger(message.total) && !(message.total && $util.isInteger(message.total.low) && $util.isInteger(message.total.high))) + return "total: integer|Long expected"; + return null; + }; + + /** + * Creates a PageResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos.base.query.v1beta1.PageResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos.base.query.v1beta1.PageResponse} PageResponse + */ + PageResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos.base.query.v1beta1.PageResponse) + return object; + let message = new $root.cosmos.base.query.v1beta1.PageResponse(); + if (object.nextKey != null) + if (typeof object.nextKey === "string") + $util.base64.decode(object.nextKey, message.nextKey = $util.newBuffer($util.base64.length(object.nextKey)), 0); + else if (object.nextKey.length) + message.nextKey = object.nextKey; + if (object.total != null) + if ($util.Long) + (message.total = $util.Long.fromValue(object.total)).unsigned = true; + else if (typeof object.total === "string") + message.total = parseInt(object.total, 10); + else if (typeof object.total === "number") + message.total = object.total; + else if (typeof object.total === "object") + message.total = new $util.LongBits(object.total.low >>> 0, object.total.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a PageResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos.base.query.v1beta1.PageResponse + * @static + * @param {cosmos.base.query.v1beta1.PageResponse} message PageResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PageResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + if (options.bytes === String) + object.nextKey = ""; + else { + object.nextKey = []; + if (options.bytes !== Array) + object.nextKey = $util.newBuffer(object.nextKey); + } + if ($util.Long) { + let long = new $util.Long(0, 0, true); + object.total = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.total = options.longs === String ? "0" : 0; + } + if (message.nextKey != null && message.hasOwnProperty("nextKey")) + object.nextKey = options.bytes === String ? $util.base64.encode(message.nextKey, 0, message.nextKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.nextKey) : message.nextKey; + if (message.total != null && message.hasOwnProperty("total")) + if (typeof message.total === "number") + object.total = options.longs === String ? String(message.total) : message.total; + else + object.total = options.longs === String ? $util.Long.prototype.toString.call(message.total) : options.longs === Number ? new $util.LongBits(message.total.low >>> 0, message.total.high >>> 0).toNumber(true) : message.total; + return object; + }; + + /** + * Converts this PageResponse to JSON. + * @function toJSON + * @memberof cosmos.base.query.v1beta1.PageResponse + * @instance + * @returns {Object.} JSON object + */ + PageResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PageResponse; + })(v1beta1.PageResponse || {}); + + return v1beta1; + })(query.v1beta1 || {}); + + return query; + })(base.query || {}); + + return base; + })(cosmos.base || {}); + + return cosmos; +})($root.cosmos || {}); + +/** + * Namespace google. + * @exports google + * @namespace + */ + +export const google = $root.google = ((google) => { + + /** + * Namespace protobuf. + * @memberof google + * @namespace + */ + + google.protobuf = (function(protobuf) { + + protobuf.Any = (function(Any) { + + /** + * Properties of an Any. + * @memberof google.protobuf + * @interface IAny + * @property {string|null} [type_url] Any type_url + * @property {Uint8Array|null} [value] Any value + */ + + /** + * Constructs a new Any. + * @memberof google.protobuf + * @classdesc Represents an Any. + * @implements IAny + * @constructor + * @param {google.protobuf.IAny=} [properties] Properties to set + */ + function Any(properties) { + if (properties) + for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Any type_url. + * @member {string} type_url + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.type_url = ""; + + /** + * Any value. + * @member {Uint8Array} value + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.value = $util.newBuffer([]); + + /** + * Creates a new Any instance using the specified properties. + * @function create + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny=} [properties] Properties to set + * @returns {google.protobuf.Any} Any instance + */ + Any.create = function create(properties) { + return new Any(properties); + }; + + /** + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Any.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type_url != null && Object.hasOwnProperty.call(message, "type_url")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type_url); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); + return writer; + }; + + /** + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Any.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Any message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Any + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Any} Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Any.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Any(); + while (reader.pos < end) { + let tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type_url = reader.string(); + break; + case 2: + message.value = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Any message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Any + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Any} Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Any.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Any message. + * @function verify + * @memberof google.protobuf.Any + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Any.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type_url != null && message.hasOwnProperty("type_url")) + if (!$util.isString(message.type_url)) + return "type_url: string expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; + return null; + }; + + /** + * Creates an Any message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Any + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Any} Any + */ + Any.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Any) + return object; + let message = new $root.google.protobuf.Any(); + if (object.type_url != null) + message.type_url = String(object.type_url); + if (object.value != null) + if (typeof object.value === "string") + $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); + else if (object.value.length) + message.value = object.value; + return message; + }; + + /** + * Creates a plain object from an Any message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.Any} message Any + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Any.toObject = function toObject(message, options) { + if (!options) + options = {}; + let object = {}; + if (options.defaults) { + object.type_url = ""; + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + } + if (message.type_url != null && message.hasOwnProperty("type_url")) + object.type_url = message.type_url; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + return object; + }; + + /** + * Converts this Any to JSON. + * @function toJSON + * @memberof google.protobuf.Any + * @instance + * @returns {Object.} JSON object + */ + Any.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Any; + })(protobuf.Any || {}); + + return protobuf; + })(google.protobuf || {}); + + return google; +})($root.google || {}); + +export { $root as default }; diff --git a/src/libs/msg.js b/src/libs/msg.js new file mode 100644 index 00000000..63849e80 --- /dev/null +++ b/src/libs/msg.js @@ -0,0 +1,270 @@ +/* eslint-disable */ +import Long from "long"; +import _m0 from "protobufjs/minimal"; +export const protobufPackage = "osmosis.gamm.v1beta1"; +const baseSwapAmountInRoute = { poolId: Long.UZERO, tokenOutDenom: "" }; +export const SwapAmountInRoute = { + encode(message, writer = _m0.Writer.create()) { + if (!message.poolId.isZero()) { + writer.uint32(8).uint64(message.poolId); + } + if (message.tokenOutDenom !== "") { + writer.uint32(18).string(message.tokenOutDenom); + } + return writer; + }, + decode(input, length) { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = Object.assign({}, baseSwapAmountInRoute); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.poolId = reader.uint64(); + break; + case 2: + message.tokenOutDenom = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object) { + const message = Object.assign({}, baseSwapAmountInRoute); + if (object.poolId !== undefined && object.poolId !== null) { + message.poolId = Long.fromString(object.poolId); + } + else { + message.poolId = Long.UZERO; + } + if (object.tokenOutDenom !== undefined && object.tokenOutDenom !== null) { + message.tokenOutDenom = String(object.tokenOutDenom); + } + else { + message.tokenOutDenom = ""; + } + return message; + }, + toJSON(message) { + const obj = {}; + message.poolId !== undefined && + (obj.poolId = (message.poolId || Long.UZERO).toString()); + message.tokenOutDenom !== undefined && + (obj.tokenOutDenom = message.tokenOutDenom); + return obj; + }, + fromPartial(object) { + const message = Object.assign({}, baseSwapAmountInRoute); + if (object.poolId !== undefined && object.poolId !== null) { + message.poolId = object.poolId; + } + else { + message.poolId = Long.UZERO; + } + if (object.tokenOutDenom !== undefined && object.tokenOutDenom !== null) { + message.tokenOutDenom = object.tokenOutDenom; + } + else { + message.tokenOutDenom = ""; + } + return message; + }, +}; +const baseCoin = { denom: "", amount: "" }; +export const Coin = { + encode(message, writer = _m0.Writer.create()) { + if (message.denom !== "") { + writer.uint32(10).string(message.denom); + } + if (message.amount !== "") { + writer.uint32(18).string(message.amount); + } + return writer; + }, + decode(input, length) { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = Object.assign({}, baseCoin); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.denom = reader.string(); + break; + case 2: + message.amount = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object) { + const message = Object.assign({}, baseCoin); + if (object.denom !== undefined && object.denom !== null) { + message.denom = String(object.denom); + } + else { + message.denom = ""; + } + if (object.amount !== undefined && object.amount !== null) { + message.amount = String(object.amount); + } + else { + message.amount = ""; + } + return message; + }, + toJSON(message) { + const obj = {}; + message.denom !== undefined && (obj.denom = message.denom); + message.amount !== undefined && (obj.amount = message.amount); + return obj; + }, + fromPartial(object) { + const message = Object.assign({}, baseCoin); + if (object.denom !== undefined && object.denom !== null) { + message.denom = object.denom; + } + else { + message.denom = ""; + } + if (object.amount !== undefined && object.amount !== null) { + message.amount = object.amount; + } + else { + message.amount = ""; + } + return message; + }, +}; +const baseMsgSwapExactAmountIn = { sender: "", tokenOutMinAmount: "" }; +export const MsgSwapExactAmountIn = { + encode(message, writer = _m0.Writer.create()) { + if (message.sender !== "") { + writer.uint32(10).string(message.sender); + } + for (const v of message.routes) { + SwapAmountInRoute.encode(v, writer.uint32(18).fork()).ldelim(); + } + if (message.tokenIn !== undefined) { + Coin.encode(message.tokenIn, writer.uint32(26).fork()).ldelim(); + } + if (message.tokenOutMinAmount !== "") { + writer.uint32(34).string(message.tokenOutMinAmount); + } + return writer; + }, + decode(input, length) { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = Object.assign({}, baseMsgSwapExactAmountIn); + message.routes = []; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.sender = reader.string(); + break; + case 2: + message.routes.push(SwapAmountInRoute.decode(reader, reader.uint32())); + break; + case 3: + message.tokenIn = Coin.decode(reader, reader.uint32()); + break; + case 4: + message.tokenOutMinAmount = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + fromJSON(object) { + const message = Object.assign({}, baseMsgSwapExactAmountIn); + message.routes = []; + if (object.sender !== undefined && object.sender !== null) { + message.sender = String(object.sender); + } + else { + message.sender = ""; + } + if (object.routes !== undefined && object.routes !== null) { + for (const e of object.routes) { + message.routes.push(SwapAmountInRoute.fromJSON(e)); + } + } + if (object.tokenIn !== undefined && object.tokenIn !== null) { + message.tokenIn = Coin.fromJSON(object.tokenIn); + } + else { + message.tokenIn = undefined; + } + if (object.tokenOutMinAmount !== undefined && + object.tokenOutMinAmount !== null) { + message.tokenOutMinAmount = String(object.tokenOutMinAmount); + } + else { + message.tokenOutMinAmount = ""; + } + return message; + }, + toJSON(message) { + const obj = {}; + message.sender !== undefined && (obj.sender = message.sender); + if (message.routes) { + obj.routes = message.routes.map((e) => e ? SwapAmountInRoute.toJSON(e) : undefined); + } + else { + obj.routes = []; + } + message.tokenIn !== undefined && + (obj.tokenIn = message.tokenIn + ? Coin.toJSON(message.tokenIn) + : undefined); + message.tokenOutMinAmount !== undefined && + (obj.tokenOutMinAmount = message.tokenOutMinAmount); + return obj; + }, + fromPartial(object) { + const message = Object.assign({}, baseMsgSwapExactAmountIn); + message.routes = []; + if (object.sender !== undefined && object.sender !== null) { + message.sender = object.sender; + } + else { + message.sender = ""; + } + if (object.routes !== undefined && object.routes !== null) { + for (const e of object.routes) { + message.routes.push(SwapAmountInRoute.fromPartial(e)); + } + } + if (object.tokenIn !== undefined && object.tokenIn !== null) { + message.tokenIn = Coin.fromPartial(object.tokenIn); + } + else { + message.tokenIn = undefined; + } + if (object.tokenOutMinAmount !== undefined && + object.tokenOutMinAmount !== null) { + message.tokenOutMinAmount = object.tokenOutMinAmount; + } + else { + message.tokenOutMinAmount = ""; + } + return message; + }, +}; +if (_m0.util.Long !== Long) { + _m0.util.Long = Long; + _m0.configure(); +} \ No newline at end of file diff --git a/src/libs/osmos.js b/src/libs/osmos.js index 64549e15..c5bd64ce 100644 --- a/src/libs/osmos.js +++ b/src/libs/osmos.js @@ -1,5 +1,88 @@ +/* + * @Description: file + * @Autor: dingyiming + * @Date: 2021-11-22 21:20:10 + * @LastEditors: dingyiming + * @LastEditTime: 2021-11-25 00:45:16 + */ +import { sha256 } from '@cosmjs/crypto' +import { toHex } from '@cosmjs/encoding' import fetch from 'node-fetch' -import { getLocalChains } from './data/data' +import { formatTokenDenom, getLocalChains } from './data/data' + +export const poolIds = { + 1: true, + 2: true, + 3: true, + 4: true, + 5: true, + 6: true, + 7: true, + 8: true, + 9: true, + 10: true, + 13: true, + 15: true, + 461: true, + 482: true, + 497: true, + 498: true, + 548: true, + // 557: true, + // 558: true, + // 571: true, + // 572: true, +} + +export const CoinGeckoMap = { + ATOM: ['cosmos'], + OSMO: ['osmosis'], + IRIS: ['iris-network'], + AKT: ['akash-network'], + LUNA: ['terra-luna'], + UST: ['terrausd'], + KRT: ['terra-krw'], + BAND: ['band-protocol'], + CRO: ['crypto-com-chain'], + KAVA: ['kava'], + OKT: ['okexchain'], + CTK: ['certik'], + XPRT: ['persistence'], + REGEN: ['regen'], + SCRT: ['secret'], + DVPN: ['sentinel'], + ION: ['ion'], + ROWAN: ['sifchain'], + IOV: ['starname'], + BTSG: ['bitsong'], + NGM: ['e-money'], + EEUR: ['e-money-eur'], + LIKE: ['likecoin'], + JUNO: ['juno-network'], + STGZ: ['stargaze-protocol'], + VDL: ['vidulum'], + XKI: ['ki'], + INJ: ['injective-protocol'], +} + +export function getChainConfigForSymbol(symbol) { + const key = CoinGeckoMap[symbol] + if (key) { + const confs = getLocalChains() + return Object.values(confs).find(x => x.coingecko === key[0]) + } + return null +} + +export function getPairName(pool, denomTrace, type = 'base', isFormat = true) { + const index = type === 'base' ? 0 : 1 + if (pool && pool.poolAssets) { + const denom = pool.poolAssets[index].token.denom.startsWith('ibc') + ? denomTrace[pool.poolAssets[index].token.denom]?.base_denom : pool.poolAssets[index].token.denom + return isFormat ? formatTokenDenom(denom) : denom + } + return '-' +} export default class OsmosAPI { preHandler() { @@ -12,9 +95,83 @@ export default class OsmosAPI { return fetch(`${this.host}${url}`).then(res => res.json()) } + async getMarketData(from, to, days = 14) { + if (from && to) { + this.exe_time = '' + return Promise.all( + [fetch(`https://api.coingecko.com/api/v3/coins/${from}/market_chart?vs_currency=usd&days=${days}`).then(res => res.json()), + fetch(`https://api.coingecko.com/api/v3/coins/${to}/market_chart?vs_currency=usd&days=${days}`).then(res => res.json())], + ).then(data => { + const output = [] + if (data.length >= 2) { + data[0].prices.forEach((x, i) => { + if (data[1].prices[i]) { + output.push([x[0], (x[1] / data[1].prices[i][1]).toFixed(6)]) + } + }) + } + return { prices: output } + }) + } + return { prices: [] } + } + + async getOHCL4Pairs(from, to) { + if (from && to) { + this.exe_time = '' + return Promise.all( + [fetch(`https://api.coingecko.com/api/v3/coins/${from}/ohlc?vs_currency=usd&days=1`).then(res => res.json()), + fetch(`https://api.coingecko.com/api/v3/coins/${to}/ohlc?vs_currency=usd&days=1`).then(res => res.json())], + ).then(ohlc => { + const output = [] + ohlc[0].forEach((e, i) => { + const price = [e[0]] + for (let j = 1; j <= 4; j += 1) { + price.push(e[j] / ohlc?.[1]?.[i]?.[j]) + } + output.push(price) + }) + const result = [] + for (let i = 0; i < output.length; i += 1) { + const itemArr = output[i] + result.push([ + itemArr[0], + itemArr[1], // open + itemArr[2], // high + itemArr[3], // low + itemArr[4], // close + 0, // volume + ]) + } + return result + }) + } + return null + } + // Custom Module async getPools() { - return this.get('/osmosis/gamm/v1beta1/pools?pagination.limit=700') + const tradeable = [] + Object.keys(poolIds).forEach(k => { + if (poolIds[k]) { + tradeable.push(k) + } + }) + return this.get('/osmosis/gamm/v1beta1/pools?pagination.limit=700').then(res => { + const output = res.pools.filter(x => tradeable.includes(x.id)) + return output + }) + } + + async getDenomTraces() { + return this.get('/ibc/applications/transfer/v1beta1/denom_traces?pagination.limit=300').then(x => { + const combined = {} + x.denom_traces.forEach(item => { + const k = 'ibc/'.concat(toHex(sha256(new TextEncoder('utf-8').encode(`${item.path}/${item.base_denom}`))).toUpperCase()) + combined[k] = item + }) + return combined + }) } async getIncentivesPools() { diff --git a/src/navigation/vertical/index.js b/src/navigation/vertical/index.js index 9ad9da77..1bc636cb 100644 --- a/src/navigation/vertical/index.js +++ b/src/navigation/vertical/index.js @@ -34,9 +34,9 @@ const modules = [ route: 'gravity', }, { - scope: 'osm-osis', - title: 'pools', - route: 'osmosis-pool', + scope: 'osmosis', + title: 'trade', + route: 'osmosis-trade', }, ] diff --git a/src/router/index.js b/src/router/index.js index b1f25aad..5cce269c 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -56,6 +56,7 @@ const router = new VueRouter({ }, { path: '/wallet/accounts', + alias: '/wallet', name: 'accounts', component: () => import('@/views/WalletAccounts.vue'), meta: { @@ -279,7 +280,7 @@ const router = new VueRouter({ // custom modules for specified chains // 1. cosmos { - path: '/:chain/cosmos/pools', + path: '/:chain/cosmos/trade', name: 'gravity', component: () => import('@/views/GravityPool.vue'), meta: { @@ -294,14 +295,18 @@ const router = new VueRouter({ }, // 2. OSMOSIS { - path: '/:chain/osmosis/pools', - name: 'osmosis-pool', - component: () => import('@/views/OsmosisPools.vue'), + path: '/:chain/osmosis/trade/:poolid?', + name: 'osmosis-trade', + component: () => import('@/views/OsmosisTrade.vue'), meta: { - pageTitle: 'Pools', + pageTitle: 'Classic Trade', breadcrumb: [ { - text: 'Pools', + text: 'DEX', + active: true, + }, + { + text: 'Classic Trade', active: true, }, ], diff --git a/src/store/chains/index.js b/src/store/chains/index.js index 61a6bdfe..bf20bfb7 100644 --- a/src/store/chains/index.js +++ b/src/store/chains/index.js @@ -1,3 +1,10 @@ +/* + * @Description: file + * @Autor: dingyiming + * @Date: 2021-11-20 15:26:27 + * @LastEditors: dingyiming + * @LastEditTime: 2021-11-20 15:33:07 + */ import { isTestnet } from '@/libs/data/data' let chains = {} diff --git a/src/views/OsmosisPools.vue b/src/views/OsmosisPools.vue deleted file mode 100644 index 03e79007..00000000 --- a/src/views/OsmosisPools.vue +++ /dev/null @@ -1,112 +0,0 @@ - - - diff --git a/src/views/OsmosisTrade.vue b/src/views/OsmosisTrade.vue new file mode 100644 index 00000000..6b16436b --- /dev/null +++ b/src/views/OsmosisTrade.vue @@ -0,0 +1,258 @@ + + + + + diff --git a/src/views/WalletAccounts.vue b/src/views/WalletAccounts.vue index 9e41dd16..f2bd373c 100644 --- a/src/views/WalletAccounts.vue +++ b/src/views/WalletAccounts.vue @@ -239,7 +239,7 @@
    - + Connect Wallet diff --git a/src/views/components/KlineTrade/DepositeWindow.vue b/src/views/components/KlineTrade/DepositeWindow.vue new file mode 100644 index 00000000..e166279c --- /dev/null +++ b/src/views/components/KlineTrade/DepositeWindow.vue @@ -0,0 +1,501 @@ +